diff --git a/sdk/compute/azure-mgmt-compute/HISTORY.rst b/sdk/compute/azure-mgmt-compute/HISTORY.rst index 247e7d970cd8..0aeee142b5ab 100644 --- a/sdk/compute/azure-mgmt-compute/HISTORY.rst +++ b/sdk/compute/azure-mgmt-compute/HISTORY.rst @@ -3,6 +3,35 @@ Release History =============== +6.0.0 (2019-07-20) +++++++++++++++++++ + +**Features** + +- Model VirtualMachine has a new parameter host +- Model VirtualMachineUpdate has a new parameter host +- Model VirtualMachineInstanceView has a new parameter hyper_vgeneration +- Added operation group GalleryApplicationVersionsOperations +- Added operation group GalleryApplicationsOperations +- Added operation group DedicatedHostsOperations +- Added operation group DedicatedHostGroupsOperations + +**Breaking changes** + +- Model GalleryArtifactPublishingProfileBase has a new signature + +**General Breaking changes** + +This version uses a next-generation code generator that *might* introduce breaking changes if you were importing from the v20xx_yy_zz API folders. +In summary, some modules were incorrectly visible/importable and have been renamed. This fixed several issues caused by usage of classes that were not supposed to be used in the first place. + +- ComputeManagementClient cannot be imported from `azure.mgmt.compute.v20xx_yy_zz.compute_management_client` anymore (import from `azure.mgmt.compute.v20xx_yy_zz` works like before) +- ComputeManagementClientConfiguration import has been moved from `azure.mgmt.compute.v20xx_yy_zz.compute_management_client` to `azure.mgmt.compute.v20xx_yy_zz` +- A model `MyClass` from a "models" sub-module cannot be imported anymore using `azure.mgmt.compute.v20xx_yy_zz.models.my_class` (import from `azure.mgmt.compute.v20xx_yy_zz.models` works like before) +- An operation class `MyClassOperations` from an `operations` sub-module cannot be imported anymore using `azure.mgmt.compute.v20xx_yy_zz.operations.my_class_operations` (import from `azure.mgmt.compute.v20xx_yy_zz.operations` works like before) + +Last but not least, HTTP connection pooling is now enabled by default. You should always use a client as a context manager, or call close(), or use no more than one client per process. + 5.0.0 (2019-04-26) ++++++++++++++++++ diff --git a/sdk/compute/azure-mgmt-compute/README.rst b/sdk/compute/azure-mgmt-compute/README.rst index 9b6c3e976102..58dcf230377b 100644 --- a/sdk/compute/azure-mgmt-compute/README.rst +++ b/sdk/compute/azure-mgmt-compute/README.rst @@ -6,7 +6,7 @@ This is the Microsoft Azure Compute Management Client Library. Azure Resource Manager (ARM) is the next generation of management APIs that replace the old Azure Service Management (ASM). -This package has been tested with Python 2.7, 3.4, 3.5, 3.6 and 3.7. +This package has been tested with Python 2.7, 3.5, 3.6 and 3.7. For the older Azure Service Management (ASM) libraries, see `azure-servicemanagement-legacy `__ library. diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/__init__.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/__init__.py index b90fb2a2984c..a7bc1ce68e37 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/__init__.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/__init__.py @@ -1,12 +1,19 @@ -# coding=utf-8 +# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. # -------------------------------------------------------------------------- -from .compute_management_client import ComputeManagementClient +from ._configuration import ComputeManagementClientConfiguration +from ._compute_management_client import ComputeManagementClient +__all__ = ['ComputeManagementClient', 'ComputeManagementClientConfiguration'] + from .version import VERSION __version__ = VERSION -__all__ = ['ComputeManagementClient'] + diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/_compute_management_client.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/_compute_management_client.py new file mode 100644 index 000000000000..d7b57295c524 --- /dev/null +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/_compute_management_client.py @@ -0,0 +1,838 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.service_client import SDKClient +from msrest import Serializer, Deserializer + +from azure.profiles import KnownProfiles, ProfileDefinition +from azure.profiles.multiapiclient import MultiApiClientMixin +from ._configuration import ComputeManagementClientConfiguration + + + +class ComputeManagementClient(MultiApiClientMixin, SDKClient): + """Compute Client + + This ready contains multiple API versions, to help you deal with all Azure clouds + (Azure Stack, Azure Government, Azure China, etc.). + By default, uses latest API version available on public Azure. + For production, you should stick a particular api-version and/or profile. + The profile sets a mapping between the operation group and an API version. + The api-version parameter sets the default API version if the operation + group is not described in the profile. + + :ivar config: Configuration for client. + :vartype config: ComputeManagementClientConfiguration + + :param credentials: Credentials needed for the client to connect to Azure. + :type credentials: :mod:`A msrestazure Credentials + object` + :param subscription_id: Subscription credentials which uniquely identify + Microsoft Azure subscription. The subscription ID forms part of the URI + for every service call. + :type subscription_id: str + :param str api_version: API version to use if no profile is provided, or if + missing in profile. + :param str base_url: Service URL + :param profile: A profile definition, from KnownProfiles to dict. + :type profile: azure.profiles.KnownProfiles + """ + + DEFAULT_API_VERSION = '2019-04-01' + _PROFILE_TAG = "azure.mgmt.compute.ComputeManagementClient" + LATEST_PROFILE = ProfileDefinition({ + _PROFILE_TAG: { + None: DEFAULT_API_VERSION, + 'availability_sets': '2019-03-01', + 'dedicated_host_groups': '2019-03-01', + 'dedicated_hosts': '2019-03-01', + 'disks': '2018-09-30', + 'galleries': '2019-03-01', + 'gallery_application_versions': '2019-03-01', + 'gallery_applications': '2019-03-01', + 'gallery_image_versions': '2019-03-01', + 'gallery_images': '2019-03-01', + 'images': '2019-03-01', + 'log_analytics': '2019-03-01', + 'operations': '2019-03-01', + 'proximity_placement_groups': '2019-03-01', + 'snapshots': '2018-09-30', + 'usage': '2019-03-01', + 'virtual_machine_extension_images': '2019-03-01', + 'virtual_machine_extensions': '2019-03-01', + 'virtual_machine_images': '2019-03-01', + 'virtual_machine_run_commands': '2019-03-01', + 'virtual_machine_scale_set_extensions': '2019-03-01', + 'virtual_machine_scale_set_rolling_upgrades': '2019-03-01', + 'virtual_machine_scale_set_vms': '2019-03-01', + 'virtual_machine_scale_sets': '2019-03-01', + 'virtual_machine_sizes': '2019-03-01', + 'virtual_machines': '2019-03-01', + }}, + _PROFILE_TAG + " latest" + ) + + def __init__(self, credentials, subscription_id, api_version=None, base_url=None, profile=KnownProfiles.default): + self.config = ComputeManagementClientConfiguration(credentials, subscription_id, base_url) + super(ComputeManagementClient, self).__init__( + credentials, + self.config, + api_version=api_version, + profile=profile + ) + + @classmethod + def _models_dict(cls, api_version): + return {k: v for k, v in cls.models(api_version).__dict__.items() if isinstance(v, type)} + + @classmethod + def models(cls, api_version=DEFAULT_API_VERSION): + """Module depends on the API version: + + * 2015-06-15: :mod:`v2015_06_15.models` + * 2016-03-30: :mod:`v2016_03_30.models` + * 2016-04-30-preview: :mod:`v2016_04_30_preview.models` + * 2017-03-30: :mod:`v2017_03_30.models` + * 2017-09-01: :mod:`v2017_09_01.models` + * 2017-12-01: :mod:`v2017_12_01.models` + * 2018-04-01: :mod:`v2018_04_01.models` + * 2018-06-01: :mod:`v2018_06_01.models` + * 2018-09-30: :mod:`v2018_09_30.models` + * 2018-10-01: :mod:`v2018_10_01.models` + * 2019-03-01: :mod:`v2019_03_01.models` + * 2019-04-01: :mod:`v2019_04_01.models` + """ + if api_version == '2015-06-15': + from .v2015_06_15 import models + return models + elif api_version == '2016-03-30': + from .v2016_03_30 import models + return models + elif api_version == '2016-04-30-preview': + from .v2016_04_30_preview import models + return models + elif api_version == '2017-03-30': + from .v2017_03_30 import models + return models + elif api_version == '2017-09-01': + from .v2017_09_01 import models + return models + elif api_version == '2017-12-01': + from .v2017_12_01 import models + return models + elif api_version == '2018-04-01': + from .v2018_04_01 import models + return models + elif api_version == '2018-06-01': + from .v2018_06_01 import models + return models + elif api_version == '2018-09-30': + from .v2018_09_30 import models + return models + elif api_version == '2018-10-01': + from .v2018_10_01 import models + return models + elif api_version == '2019-03-01': + from .v2019_03_01 import models + return models + elif api_version == '2019-04-01': + from .v2019_04_01 import models + return models + raise NotImplementedError("APIVersion {} is not available".format(api_version)) + + @property + def availability_sets(self): + """Instance depends on the API version: + + * 2015-06-15: :class:`AvailabilitySetsOperations` + * 2016-03-30: :class:`AvailabilitySetsOperations` + * 2016-04-30-preview: :class:`AvailabilitySetsOperations` + * 2017-03-30: :class:`AvailabilitySetsOperations` + * 2017-12-01: :class:`AvailabilitySetsOperations` + * 2018-04-01: :class:`AvailabilitySetsOperations` + * 2018-06-01: :class:`AvailabilitySetsOperations` + * 2018-10-01: :class:`AvailabilitySetsOperations` + * 2019-03-01: :class:`AvailabilitySetsOperations` + """ + api_version = self._get_api_version('availability_sets') + if api_version == '2015-06-15': + from .v2015_06_15.operations import AvailabilitySetsOperations as OperationClass + elif api_version == '2016-03-30': + from .v2016_03_30.operations import AvailabilitySetsOperations as OperationClass + elif api_version == '2016-04-30-preview': + from .v2016_04_30_preview.operations import AvailabilitySetsOperations as OperationClass + elif api_version == '2017-03-30': + from .v2017_03_30.operations import AvailabilitySetsOperations as OperationClass + elif api_version == '2017-12-01': + from .v2017_12_01.operations import AvailabilitySetsOperations as OperationClass + elif api_version == '2018-04-01': + from .v2018_04_01.operations import AvailabilitySetsOperations as OperationClass + elif api_version == '2018-06-01': + from .v2018_06_01.operations import AvailabilitySetsOperations as OperationClass + elif api_version == '2018-10-01': + from .v2018_10_01.operations import AvailabilitySetsOperations as OperationClass + elif api_version == '2019-03-01': + from .v2019_03_01.operations import AvailabilitySetsOperations as OperationClass + else: + raise NotImplementedError("APIVersion {} is not available".format(api_version)) + return OperationClass(self._client, self.config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + + @property + def dedicated_host_groups(self): + """Instance depends on the API version: + + * 2019-03-01: :class:`DedicatedHostGroupsOperations` + """ + api_version = self._get_api_version('dedicated_host_groups') + if api_version == '2019-03-01': + from .v2019_03_01.operations import DedicatedHostGroupsOperations as OperationClass + else: + raise NotImplementedError("APIVersion {} is not available".format(api_version)) + return OperationClass(self._client, self.config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + + @property + def dedicated_hosts(self): + """Instance depends on the API version: + + * 2019-03-01: :class:`DedicatedHostsOperations` + """ + api_version = self._get_api_version('dedicated_hosts') + if api_version == '2019-03-01': + from .v2019_03_01.operations import DedicatedHostsOperations as OperationClass + else: + raise NotImplementedError("APIVersion {} is not available".format(api_version)) + return OperationClass(self._client, self.config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + + @property + def disks(self): + """Instance depends on the API version: + + * 2016-04-30-preview: :class:`DisksOperations` + * 2017-03-30: :class:`DisksOperations` + * 2018-04-01: :class:`DisksOperations` + * 2018-06-01: :class:`DisksOperations` + * 2018-09-30: :class:`DisksOperations` + """ + api_version = self._get_api_version('disks') + if api_version == '2016-04-30-preview': + from .v2016_04_30_preview.operations import DisksOperations as OperationClass + elif api_version == '2017-03-30': + from .v2017_03_30.operations import DisksOperations as OperationClass + elif api_version == '2018-04-01': + from .v2018_04_01.operations import DisksOperations as OperationClass + elif api_version == '2018-06-01': + from .v2018_06_01.operations import DisksOperations as OperationClass + elif api_version == '2018-09-30': + from .v2018_09_30.operations import DisksOperations as OperationClass + else: + raise NotImplementedError("APIVersion {} is not available".format(api_version)) + return OperationClass(self._client, self.config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + + @property + def galleries(self): + """Instance depends on the API version: + + * 2018-06-01: :class:`GalleriesOperations` + * 2019-03-01: :class:`GalleriesOperations` + """ + api_version = self._get_api_version('galleries') + if api_version == '2018-06-01': + from .v2018_06_01.operations import GalleriesOperations as OperationClass + elif api_version == '2019-03-01': + from .v2019_03_01.operations import GalleriesOperations as OperationClass + else: + raise NotImplementedError("APIVersion {} is not available".format(api_version)) + return OperationClass(self._client, self.config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + + @property + def gallery_application_versions(self): + """Instance depends on the API version: + + * 2019-03-01: :class:`GalleryApplicationVersionsOperations` + """ + api_version = self._get_api_version('gallery_application_versions') + if api_version == '2019-03-01': + from .v2019_03_01.operations import GalleryApplicationVersionsOperations as OperationClass + else: + raise NotImplementedError("APIVersion {} is not available".format(api_version)) + return OperationClass(self._client, self.config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + + @property + def gallery_applications(self): + """Instance depends on the API version: + + * 2019-03-01: :class:`GalleryApplicationsOperations` + """ + api_version = self._get_api_version('gallery_applications') + if api_version == '2019-03-01': + from .v2019_03_01.operations import GalleryApplicationsOperations as OperationClass + else: + raise NotImplementedError("APIVersion {} is not available".format(api_version)) + return OperationClass(self._client, self.config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + + @property + def gallery_image_versions(self): + """Instance depends on the API version: + + * 2018-06-01: :class:`GalleryImageVersionsOperations` + * 2019-03-01: :class:`GalleryImageVersionsOperations` + """ + api_version = self._get_api_version('gallery_image_versions') + if api_version == '2018-06-01': + from .v2018_06_01.operations import GalleryImageVersionsOperations as OperationClass + elif api_version == '2019-03-01': + from .v2019_03_01.operations import GalleryImageVersionsOperations as OperationClass + else: + raise NotImplementedError("APIVersion {} is not available".format(api_version)) + return OperationClass(self._client, self.config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + + @property + def gallery_images(self): + """Instance depends on the API version: + + * 2018-06-01: :class:`GalleryImagesOperations` + * 2019-03-01: :class:`GalleryImagesOperations` + """ + api_version = self._get_api_version('gallery_images') + if api_version == '2018-06-01': + from .v2018_06_01.operations import GalleryImagesOperations as OperationClass + elif api_version == '2019-03-01': + from .v2019_03_01.operations import GalleryImagesOperations as OperationClass + else: + raise NotImplementedError("APIVersion {} is not available".format(api_version)) + return OperationClass(self._client, self.config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + + @property + def images(self): + """Instance depends on the API version: + + * 2016-04-30-preview: :class:`ImagesOperations` + * 2017-03-30: :class:`ImagesOperations` + * 2017-12-01: :class:`ImagesOperations` + * 2018-04-01: :class:`ImagesOperations` + * 2018-06-01: :class:`ImagesOperations` + * 2018-10-01: :class:`ImagesOperations` + * 2019-03-01: :class:`ImagesOperations` + """ + api_version = self._get_api_version('images') + if api_version == '2016-04-30-preview': + from .v2016_04_30_preview.operations import ImagesOperations as OperationClass + elif api_version == '2017-03-30': + from .v2017_03_30.operations import ImagesOperations as OperationClass + elif api_version == '2017-12-01': + from .v2017_12_01.operations import ImagesOperations as OperationClass + elif api_version == '2018-04-01': + from .v2018_04_01.operations import ImagesOperations as OperationClass + elif api_version == '2018-06-01': + from .v2018_06_01.operations import ImagesOperations as OperationClass + elif api_version == '2018-10-01': + from .v2018_10_01.operations import ImagesOperations as OperationClass + elif api_version == '2019-03-01': + from .v2019_03_01.operations import ImagesOperations as OperationClass + else: + raise NotImplementedError("APIVersion {} is not available".format(api_version)) + return OperationClass(self._client, self.config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + + @property + def log_analytics(self): + """Instance depends on the API version: + + * 2017-12-01: :class:`LogAnalyticsOperations` + * 2018-04-01: :class:`LogAnalyticsOperations` + * 2018-06-01: :class:`LogAnalyticsOperations` + * 2018-10-01: :class:`LogAnalyticsOperations` + * 2019-03-01: :class:`LogAnalyticsOperations` + """ + api_version = self._get_api_version('log_analytics') + if api_version == '2017-12-01': + from .v2017_12_01.operations import LogAnalyticsOperations as OperationClass + elif api_version == '2018-04-01': + from .v2018_04_01.operations import LogAnalyticsOperations as OperationClass + elif api_version == '2018-06-01': + from .v2018_06_01.operations import LogAnalyticsOperations as OperationClass + elif api_version == '2018-10-01': + from .v2018_10_01.operations import LogAnalyticsOperations as OperationClass + elif api_version == '2019-03-01': + from .v2019_03_01.operations import LogAnalyticsOperations as OperationClass + else: + raise NotImplementedError("APIVersion {} is not available".format(api_version)) + return OperationClass(self._client, self.config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + + @property + def operations(self): + """Instance depends on the API version: + + * 2017-12-01: :class:`Operations` + * 2018-04-01: :class:`Operations` + * 2018-06-01: :class:`Operations` + * 2018-10-01: :class:`Operations` + * 2019-03-01: :class:`Operations` + """ + api_version = self._get_api_version('operations') + if api_version == '2017-12-01': + from .v2017_12_01.operations import Operations as OperationClass + elif api_version == '2018-04-01': + from .v2018_04_01.operations import Operations as OperationClass + elif api_version == '2018-06-01': + from .v2018_06_01.operations import Operations as OperationClass + elif api_version == '2018-10-01': + from .v2018_10_01.operations import Operations as OperationClass + elif api_version == '2019-03-01': + from .v2019_03_01.operations import Operations as OperationClass + else: + raise NotImplementedError("APIVersion {} is not available".format(api_version)) + return OperationClass(self._client, self.config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + + @property + def proximity_placement_groups(self): + """Instance depends on the API version: + + * 2018-04-01: :class:`ProximityPlacementGroupsOperations` + * 2018-06-01: :class:`ProximityPlacementGroupsOperations` + * 2018-10-01: :class:`ProximityPlacementGroupsOperations` + * 2019-03-01: :class:`ProximityPlacementGroupsOperations` + """ + api_version = self._get_api_version('proximity_placement_groups') + if api_version == '2018-04-01': + from .v2018_04_01.operations import ProximityPlacementGroupsOperations as OperationClass + elif api_version == '2018-06-01': + from .v2018_06_01.operations import ProximityPlacementGroupsOperations as OperationClass + elif api_version == '2018-10-01': + from .v2018_10_01.operations import ProximityPlacementGroupsOperations as OperationClass + elif api_version == '2019-03-01': + from .v2019_03_01.operations import ProximityPlacementGroupsOperations as OperationClass + else: + raise NotImplementedError("APIVersion {} is not available".format(api_version)) + return OperationClass(self._client, self.config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + + @property + def resource_skus(self): + """Instance depends on the API version: + + * 2017-03-30: :class:`ResourceSkusOperations` + * 2017-09-01: :class:`ResourceSkusOperations` + * 2019-04-01: :class:`ResourceSkusOperations` + """ + api_version = self._get_api_version('resource_skus') + if api_version == '2017-03-30': + from .v2017_03_30.operations import ResourceSkusOperations as OperationClass + elif api_version == '2017-09-01': + from .v2017_09_01.operations import ResourceSkusOperations as OperationClass + elif api_version == '2019-04-01': + from .v2019_04_01.operations import ResourceSkusOperations as OperationClass + else: + raise NotImplementedError("APIVersion {} is not available".format(api_version)) + return OperationClass(self._client, self.config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + + @property + def snapshots(self): + """Instance depends on the API version: + + * 2016-04-30-preview: :class:`SnapshotsOperations` + * 2017-03-30: :class:`SnapshotsOperations` + * 2018-04-01: :class:`SnapshotsOperations` + * 2018-06-01: :class:`SnapshotsOperations` + * 2018-09-30: :class:`SnapshotsOperations` + """ + api_version = self._get_api_version('snapshots') + if api_version == '2016-04-30-preview': + from .v2016_04_30_preview.operations import SnapshotsOperations as OperationClass + elif api_version == '2017-03-30': + from .v2017_03_30.operations import SnapshotsOperations as OperationClass + elif api_version == '2018-04-01': + from .v2018_04_01.operations import SnapshotsOperations as OperationClass + elif api_version == '2018-06-01': + from .v2018_06_01.operations import SnapshotsOperations as OperationClass + elif api_version == '2018-09-30': + from .v2018_09_30.operations import SnapshotsOperations as OperationClass + else: + raise NotImplementedError("APIVersion {} is not available".format(api_version)) + return OperationClass(self._client, self.config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + + @property + def usage(self): + """Instance depends on the API version: + + * 2015-06-15: :class:`UsageOperations` + * 2016-03-30: :class:`UsageOperations` + * 2016-04-30-preview: :class:`UsageOperations` + * 2017-03-30: :class:`UsageOperations` + * 2017-12-01: :class:`UsageOperations` + * 2018-04-01: :class:`UsageOperations` + * 2018-06-01: :class:`UsageOperations` + * 2018-10-01: :class:`UsageOperations` + * 2019-03-01: :class:`UsageOperations` + """ + api_version = self._get_api_version('usage') + if api_version == '2015-06-15': + from .v2015_06_15.operations import UsageOperations as OperationClass + elif api_version == '2016-03-30': + from .v2016_03_30.operations import UsageOperations as OperationClass + elif api_version == '2016-04-30-preview': + from .v2016_04_30_preview.operations import UsageOperations as OperationClass + elif api_version == '2017-03-30': + from .v2017_03_30.operations import UsageOperations as OperationClass + elif api_version == '2017-12-01': + from .v2017_12_01.operations import UsageOperations as OperationClass + elif api_version == '2018-04-01': + from .v2018_04_01.operations import UsageOperations as OperationClass + elif api_version == '2018-06-01': + from .v2018_06_01.operations import UsageOperations as OperationClass + elif api_version == '2018-10-01': + from .v2018_10_01.operations import UsageOperations as OperationClass + elif api_version == '2019-03-01': + from .v2019_03_01.operations import UsageOperations as OperationClass + else: + raise NotImplementedError("APIVersion {} is not available".format(api_version)) + return OperationClass(self._client, self.config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + + @property + def virtual_machine_extension_images(self): + """Instance depends on the API version: + + * 2015-06-15: :class:`VirtualMachineExtensionImagesOperations` + * 2016-03-30: :class:`VirtualMachineExtensionImagesOperations` + * 2016-04-30-preview: :class:`VirtualMachineExtensionImagesOperations` + * 2017-03-30: :class:`VirtualMachineExtensionImagesOperations` + * 2017-12-01: :class:`VirtualMachineExtensionImagesOperations` + * 2018-04-01: :class:`VirtualMachineExtensionImagesOperations` + * 2018-06-01: :class:`VirtualMachineExtensionImagesOperations` + * 2018-10-01: :class:`VirtualMachineExtensionImagesOperations` + * 2019-03-01: :class:`VirtualMachineExtensionImagesOperations` + """ + api_version = self._get_api_version('virtual_machine_extension_images') + if api_version == '2015-06-15': + from .v2015_06_15.operations import VirtualMachineExtensionImagesOperations as OperationClass + elif api_version == '2016-03-30': + from .v2016_03_30.operations import VirtualMachineExtensionImagesOperations as OperationClass + elif api_version == '2016-04-30-preview': + from .v2016_04_30_preview.operations import VirtualMachineExtensionImagesOperations as OperationClass + elif api_version == '2017-03-30': + from .v2017_03_30.operations import VirtualMachineExtensionImagesOperations as OperationClass + elif api_version == '2017-12-01': + from .v2017_12_01.operations import VirtualMachineExtensionImagesOperations as OperationClass + elif api_version == '2018-04-01': + from .v2018_04_01.operations import VirtualMachineExtensionImagesOperations as OperationClass + elif api_version == '2018-06-01': + from .v2018_06_01.operations import VirtualMachineExtensionImagesOperations as OperationClass + elif api_version == '2018-10-01': + from .v2018_10_01.operations import VirtualMachineExtensionImagesOperations as OperationClass + elif api_version == '2019-03-01': + from .v2019_03_01.operations import VirtualMachineExtensionImagesOperations as OperationClass + else: + raise NotImplementedError("APIVersion {} is not available".format(api_version)) + return OperationClass(self._client, self.config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + + @property + def virtual_machine_extensions(self): + """Instance depends on the API version: + + * 2015-06-15: :class:`VirtualMachineExtensionsOperations` + * 2016-03-30: :class:`VirtualMachineExtensionsOperations` + * 2016-04-30-preview: :class:`VirtualMachineExtensionsOperations` + * 2017-03-30: :class:`VirtualMachineExtensionsOperations` + * 2017-12-01: :class:`VirtualMachineExtensionsOperations` + * 2018-04-01: :class:`VirtualMachineExtensionsOperations` + * 2018-06-01: :class:`VirtualMachineExtensionsOperations` + * 2018-10-01: :class:`VirtualMachineExtensionsOperations` + * 2019-03-01: :class:`VirtualMachineExtensionsOperations` + """ + api_version = self._get_api_version('virtual_machine_extensions') + if api_version == '2015-06-15': + from .v2015_06_15.operations import VirtualMachineExtensionsOperations as OperationClass + elif api_version == '2016-03-30': + from .v2016_03_30.operations import VirtualMachineExtensionsOperations as OperationClass + elif api_version == '2016-04-30-preview': + from .v2016_04_30_preview.operations import VirtualMachineExtensionsOperations as OperationClass + elif api_version == '2017-03-30': + from .v2017_03_30.operations import VirtualMachineExtensionsOperations as OperationClass + elif api_version == '2017-12-01': + from .v2017_12_01.operations import VirtualMachineExtensionsOperations as OperationClass + elif api_version == '2018-04-01': + from .v2018_04_01.operations import VirtualMachineExtensionsOperations as OperationClass + elif api_version == '2018-06-01': + from .v2018_06_01.operations import VirtualMachineExtensionsOperations as OperationClass + elif api_version == '2018-10-01': + from .v2018_10_01.operations import VirtualMachineExtensionsOperations as OperationClass + elif api_version == '2019-03-01': + from .v2019_03_01.operations import VirtualMachineExtensionsOperations as OperationClass + else: + raise NotImplementedError("APIVersion {} is not available".format(api_version)) + return OperationClass(self._client, self.config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + + @property + def virtual_machine_images(self): + """Instance depends on the API version: + + * 2015-06-15: :class:`VirtualMachineImagesOperations` + * 2016-03-30: :class:`VirtualMachineImagesOperations` + * 2016-04-30-preview: :class:`VirtualMachineImagesOperations` + * 2017-03-30: :class:`VirtualMachineImagesOperations` + * 2017-12-01: :class:`VirtualMachineImagesOperations` + * 2018-04-01: :class:`VirtualMachineImagesOperations` + * 2018-06-01: :class:`VirtualMachineImagesOperations` + * 2018-10-01: :class:`VirtualMachineImagesOperations` + * 2019-03-01: :class:`VirtualMachineImagesOperations` + """ + api_version = self._get_api_version('virtual_machine_images') + if api_version == '2015-06-15': + from .v2015_06_15.operations import VirtualMachineImagesOperations as OperationClass + elif api_version == '2016-03-30': + from .v2016_03_30.operations import VirtualMachineImagesOperations as OperationClass + elif api_version == '2016-04-30-preview': + from .v2016_04_30_preview.operations import VirtualMachineImagesOperations as OperationClass + elif api_version == '2017-03-30': + from .v2017_03_30.operations import VirtualMachineImagesOperations as OperationClass + elif api_version == '2017-12-01': + from .v2017_12_01.operations import VirtualMachineImagesOperations as OperationClass + elif api_version == '2018-04-01': + from .v2018_04_01.operations import VirtualMachineImagesOperations as OperationClass + elif api_version == '2018-06-01': + from .v2018_06_01.operations import VirtualMachineImagesOperations as OperationClass + elif api_version == '2018-10-01': + from .v2018_10_01.operations import VirtualMachineImagesOperations as OperationClass + elif api_version == '2019-03-01': + from .v2019_03_01.operations import VirtualMachineImagesOperations as OperationClass + else: + raise NotImplementedError("APIVersion {} is not available".format(api_version)) + return OperationClass(self._client, self.config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + + @property + def virtual_machine_run_commands(self): + """Instance depends on the API version: + + * 2017-03-30: :class:`VirtualMachineRunCommandsOperations` + * 2017-12-01: :class:`VirtualMachineRunCommandsOperations` + * 2018-04-01: :class:`VirtualMachineRunCommandsOperations` + * 2018-06-01: :class:`VirtualMachineRunCommandsOperations` + * 2018-10-01: :class:`VirtualMachineRunCommandsOperations` + * 2019-03-01: :class:`VirtualMachineRunCommandsOperations` + """ + api_version = self._get_api_version('virtual_machine_run_commands') + if api_version == '2017-03-30': + from .v2017_03_30.operations import VirtualMachineRunCommandsOperations as OperationClass + elif api_version == '2017-12-01': + from .v2017_12_01.operations import VirtualMachineRunCommandsOperations as OperationClass + elif api_version == '2018-04-01': + from .v2018_04_01.operations import VirtualMachineRunCommandsOperations as OperationClass + elif api_version == '2018-06-01': + from .v2018_06_01.operations import VirtualMachineRunCommandsOperations as OperationClass + elif api_version == '2018-10-01': + from .v2018_10_01.operations import VirtualMachineRunCommandsOperations as OperationClass + elif api_version == '2019-03-01': + from .v2019_03_01.operations import VirtualMachineRunCommandsOperations as OperationClass + else: + raise NotImplementedError("APIVersion {} is not available".format(api_version)) + return OperationClass(self._client, self.config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + + @property + def virtual_machine_scale_set_extensions(self): + """Instance depends on the API version: + + * 2017-03-30: :class:`VirtualMachineScaleSetExtensionsOperations` + * 2017-12-01: :class:`VirtualMachineScaleSetExtensionsOperations` + * 2018-04-01: :class:`VirtualMachineScaleSetExtensionsOperations` + * 2018-06-01: :class:`VirtualMachineScaleSetExtensionsOperations` + * 2018-10-01: :class:`VirtualMachineScaleSetExtensionsOperations` + * 2019-03-01: :class:`VirtualMachineScaleSetExtensionsOperations` + """ + api_version = self._get_api_version('virtual_machine_scale_set_extensions') + if api_version == '2017-03-30': + from .v2017_03_30.operations import VirtualMachineScaleSetExtensionsOperations as OperationClass + elif api_version == '2017-12-01': + from .v2017_12_01.operations import VirtualMachineScaleSetExtensionsOperations as OperationClass + elif api_version == '2018-04-01': + from .v2018_04_01.operations import VirtualMachineScaleSetExtensionsOperations as OperationClass + elif api_version == '2018-06-01': + from .v2018_06_01.operations import VirtualMachineScaleSetExtensionsOperations as OperationClass + elif api_version == '2018-10-01': + from .v2018_10_01.operations import VirtualMachineScaleSetExtensionsOperations as OperationClass + elif api_version == '2019-03-01': + from .v2019_03_01.operations import VirtualMachineScaleSetExtensionsOperations as OperationClass + else: + raise NotImplementedError("APIVersion {} is not available".format(api_version)) + return OperationClass(self._client, self.config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + + @property + def virtual_machine_scale_set_rolling_upgrades(self): + """Instance depends on the API version: + + * 2017-03-30: :class:`VirtualMachineScaleSetRollingUpgradesOperations` + * 2017-12-01: :class:`VirtualMachineScaleSetRollingUpgradesOperations` + * 2018-04-01: :class:`VirtualMachineScaleSetRollingUpgradesOperations` + * 2018-06-01: :class:`VirtualMachineScaleSetRollingUpgradesOperations` + * 2018-10-01: :class:`VirtualMachineScaleSetRollingUpgradesOperations` + * 2019-03-01: :class:`VirtualMachineScaleSetRollingUpgradesOperations` + """ + api_version = self._get_api_version('virtual_machine_scale_set_rolling_upgrades') + if api_version == '2017-03-30': + from .v2017_03_30.operations import VirtualMachineScaleSetRollingUpgradesOperations as OperationClass + elif api_version == '2017-12-01': + from .v2017_12_01.operations import VirtualMachineScaleSetRollingUpgradesOperations as OperationClass + elif api_version == '2018-04-01': + from .v2018_04_01.operations import VirtualMachineScaleSetRollingUpgradesOperations as OperationClass + elif api_version == '2018-06-01': + from .v2018_06_01.operations import VirtualMachineScaleSetRollingUpgradesOperations as OperationClass + elif api_version == '2018-10-01': + from .v2018_10_01.operations import VirtualMachineScaleSetRollingUpgradesOperations as OperationClass + elif api_version == '2019-03-01': + from .v2019_03_01.operations import VirtualMachineScaleSetRollingUpgradesOperations as OperationClass + else: + raise NotImplementedError("APIVersion {} is not available".format(api_version)) + return OperationClass(self._client, self.config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + + @property + def virtual_machine_scale_set_vms(self): + """Instance depends on the API version: + + * 2015-06-15: :class:`VirtualMachineScaleSetVMsOperations` + * 2016-03-30: :class:`VirtualMachineScaleSetVMsOperations` + * 2016-04-30-preview: :class:`VirtualMachineScaleSetVMsOperations` + * 2017-03-30: :class:`VirtualMachineScaleSetVMsOperations` + * 2017-12-01: :class:`VirtualMachineScaleSetVMsOperations` + * 2018-04-01: :class:`VirtualMachineScaleSetVMsOperations` + * 2018-06-01: :class:`VirtualMachineScaleSetVMsOperations` + * 2018-10-01: :class:`VirtualMachineScaleSetVMsOperations` + * 2019-03-01: :class:`VirtualMachineScaleSetVMsOperations` + """ + api_version = self._get_api_version('virtual_machine_scale_set_vms') + if api_version == '2015-06-15': + from .v2015_06_15.operations import VirtualMachineScaleSetVMsOperations as OperationClass + elif api_version == '2016-03-30': + from .v2016_03_30.operations import VirtualMachineScaleSetVMsOperations as OperationClass + elif api_version == '2016-04-30-preview': + from .v2016_04_30_preview.operations import VirtualMachineScaleSetVMsOperations as OperationClass + elif api_version == '2017-03-30': + from .v2017_03_30.operations import VirtualMachineScaleSetVMsOperations as OperationClass + elif api_version == '2017-12-01': + from .v2017_12_01.operations import VirtualMachineScaleSetVMsOperations as OperationClass + elif api_version == '2018-04-01': + from .v2018_04_01.operations import VirtualMachineScaleSetVMsOperations as OperationClass + elif api_version == '2018-06-01': + from .v2018_06_01.operations import VirtualMachineScaleSetVMsOperations as OperationClass + elif api_version == '2018-10-01': + from .v2018_10_01.operations import VirtualMachineScaleSetVMsOperations as OperationClass + elif api_version == '2019-03-01': + from .v2019_03_01.operations import VirtualMachineScaleSetVMsOperations as OperationClass + else: + raise NotImplementedError("APIVersion {} is not available".format(api_version)) + return OperationClass(self._client, self.config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + + @property + def virtual_machine_scale_sets(self): + """Instance depends on the API version: + + * 2015-06-15: :class:`VirtualMachineScaleSetsOperations` + * 2016-03-30: :class:`VirtualMachineScaleSetsOperations` + * 2016-04-30-preview: :class:`VirtualMachineScaleSetsOperations` + * 2017-03-30: :class:`VirtualMachineScaleSetsOperations` + * 2017-12-01: :class:`VirtualMachineScaleSetsOperations` + * 2018-04-01: :class:`VirtualMachineScaleSetsOperations` + * 2018-06-01: :class:`VirtualMachineScaleSetsOperations` + * 2018-10-01: :class:`VirtualMachineScaleSetsOperations` + * 2019-03-01: :class:`VirtualMachineScaleSetsOperations` + """ + api_version = self._get_api_version('virtual_machine_scale_sets') + if api_version == '2015-06-15': + from .v2015_06_15.operations import VirtualMachineScaleSetsOperations as OperationClass + elif api_version == '2016-03-30': + from .v2016_03_30.operations import VirtualMachineScaleSetsOperations as OperationClass + elif api_version == '2016-04-30-preview': + from .v2016_04_30_preview.operations import VirtualMachineScaleSetsOperations as OperationClass + elif api_version == '2017-03-30': + from .v2017_03_30.operations import VirtualMachineScaleSetsOperations as OperationClass + elif api_version == '2017-12-01': + from .v2017_12_01.operations import VirtualMachineScaleSetsOperations as OperationClass + elif api_version == '2018-04-01': + from .v2018_04_01.operations import VirtualMachineScaleSetsOperations as OperationClass + elif api_version == '2018-06-01': + from .v2018_06_01.operations import VirtualMachineScaleSetsOperations as OperationClass + elif api_version == '2018-10-01': + from .v2018_10_01.operations import VirtualMachineScaleSetsOperations as OperationClass + elif api_version == '2019-03-01': + from .v2019_03_01.operations import VirtualMachineScaleSetsOperations as OperationClass + else: + raise NotImplementedError("APIVersion {} is not available".format(api_version)) + return OperationClass(self._client, self.config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + + @property + def virtual_machine_sizes(self): + """Instance depends on the API version: + + * 2015-06-15: :class:`VirtualMachineSizesOperations` + * 2016-03-30: :class:`VirtualMachineSizesOperations` + * 2016-04-30-preview: :class:`VirtualMachineSizesOperations` + * 2017-03-30: :class:`VirtualMachineSizesOperations` + * 2017-12-01: :class:`VirtualMachineSizesOperations` + * 2018-04-01: :class:`VirtualMachineSizesOperations` + * 2018-06-01: :class:`VirtualMachineSizesOperations` + * 2018-10-01: :class:`VirtualMachineSizesOperations` + * 2019-03-01: :class:`VirtualMachineSizesOperations` + """ + api_version = self._get_api_version('virtual_machine_sizes') + if api_version == '2015-06-15': + from .v2015_06_15.operations import VirtualMachineSizesOperations as OperationClass + elif api_version == '2016-03-30': + from .v2016_03_30.operations import VirtualMachineSizesOperations as OperationClass + elif api_version == '2016-04-30-preview': + from .v2016_04_30_preview.operations import VirtualMachineSizesOperations as OperationClass + elif api_version == '2017-03-30': + from .v2017_03_30.operations import VirtualMachineSizesOperations as OperationClass + elif api_version == '2017-12-01': + from .v2017_12_01.operations import VirtualMachineSizesOperations as OperationClass + elif api_version == '2018-04-01': + from .v2018_04_01.operations import VirtualMachineSizesOperations as OperationClass + elif api_version == '2018-06-01': + from .v2018_06_01.operations import VirtualMachineSizesOperations as OperationClass + elif api_version == '2018-10-01': + from .v2018_10_01.operations import VirtualMachineSizesOperations as OperationClass + elif api_version == '2019-03-01': + from .v2019_03_01.operations import VirtualMachineSizesOperations as OperationClass + else: + raise NotImplementedError("APIVersion {} is not available".format(api_version)) + return OperationClass(self._client, self.config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + + @property + def virtual_machines(self): + """Instance depends on the API version: + + * 2015-06-15: :class:`VirtualMachinesOperations` + * 2016-03-30: :class:`VirtualMachinesOperations` + * 2016-04-30-preview: :class:`VirtualMachinesOperations` + * 2017-03-30: :class:`VirtualMachinesOperations` + * 2017-12-01: :class:`VirtualMachinesOperations` + * 2018-04-01: :class:`VirtualMachinesOperations` + * 2018-06-01: :class:`VirtualMachinesOperations` + * 2018-10-01: :class:`VirtualMachinesOperations` + * 2019-03-01: :class:`VirtualMachinesOperations` + """ + api_version = self._get_api_version('virtual_machines') + if api_version == '2015-06-15': + from .v2015_06_15.operations import VirtualMachinesOperations as OperationClass + elif api_version == '2016-03-30': + from .v2016_03_30.operations import VirtualMachinesOperations as OperationClass + elif api_version == '2016-04-30-preview': + from .v2016_04_30_preview.operations import VirtualMachinesOperations as OperationClass + elif api_version == '2017-03-30': + from .v2017_03_30.operations import VirtualMachinesOperations as OperationClass + elif api_version == '2017-12-01': + from .v2017_12_01.operations import VirtualMachinesOperations as OperationClass + elif api_version == '2018-04-01': + from .v2018_04_01.operations import VirtualMachinesOperations as OperationClass + elif api_version == '2018-06-01': + from .v2018_06_01.operations import VirtualMachinesOperations as OperationClass + elif api_version == '2018-10-01': + from .v2018_10_01.operations import VirtualMachinesOperations as OperationClass + elif api_version == '2019-03-01': + from .v2019_03_01.operations import VirtualMachinesOperations as OperationClass + else: + raise NotImplementedError("APIVersion {} is not available".format(api_version)) + return OperationClass(self._client, self.config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/_configuration.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/_configuration.py new file mode 100644 index 000000000000..0fcf5984e2ca --- /dev/null +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/_configuration.py @@ -0,0 +1,50 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- +from msrestazure import AzureConfiguration + +from .version import VERSION + + +class ComputeManagementClientConfiguration(AzureConfiguration): + """Configuration for ComputeManagementClient + Note that all parameters used to create this instance are saved as instance + attributes. + + :param credentials: Credentials needed for the client to connect to Azure. + :type credentials: :mod:`A msrestazure Credentials + object` + :param subscription_id: Subscription credentials which uniquely identify + Microsoft Azure subscription. The subscription ID forms part of the URI + for every service call. + :type subscription_id: str + :param str base_url: Service URL + """ + + def __init__( + self, credentials, subscription_id, base_url=None): + + if credentials is None: + raise ValueError("Parameter 'credentials' must not be None.") + if subscription_id is None: + raise ValueError("Parameter 'subscription_id' must not be None.") + if not base_url: + base_url = 'https://management.azure.com' + + super(ComputeManagementClientConfiguration, self).__init__(base_url) + + # Starting Autorest.Python 4.0.64, make connection pool activated by default + self.keep_alive = True + + self.add_user_agent('azure-mgmt-compute/{}'.format(VERSION)) + self.add_user_agent('Azure-SDK-For-Python') + + self.credentials = credentials + self.subscription_id = subscription_id diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/compute_management_client.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/compute_management_client.py deleted file mode 100644 index 79f7afc290b7..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/compute_management_client.py +++ /dev/null @@ -1,800 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.service_client import SDKClient -from msrest import Serializer, Deserializer -from msrestazure import AzureConfiguration - -from azure.profiles import KnownProfiles, ProfileDefinition -from azure.profiles.multiapiclient import MultiApiClientMixin -from .version import VERSION - - -class ComputeManagementClientConfiguration(AzureConfiguration): - """Configuration for ComputeManagementClient - Note that all parameters used to create this instance are saved as instance - attributes. - - :param credentials: Credentials needed for the client to connect to Azure. - :type credentials: :mod:`A msrestazure Credentials - object` - :param subscription_id: Subscription credentials which uniquely identify - Microsoft Azure subscription. The subscription ID forms part of the URI - for every service call. - :type subscription_id: str - :param str base_url: Service URL - """ - - def __init__( - self, credentials, subscription_id, base_url=None): - - if credentials is None: - raise ValueError("Parameter 'credentials' must not be None.") - if subscription_id is None: - raise ValueError("Parameter 'subscription_id' must not be None.") - if not base_url: - base_url = 'https://management.azure.com' - - super(ComputeManagementClientConfiguration, self).__init__(base_url) - - self.add_user_agent('computemanagementclient/{}'.format(VERSION)) - self.add_user_agent('Azure-SDK-For-Python') - - self.credentials = credentials - self.subscription_id = subscription_id - - -class ComputeManagementClient(MultiApiClientMixin, SDKClient): - """Compute Client. - - This ready contains multiple API versions, to help you deal with all Azure clouds - (Azure Stack, Azure Government, Azure China, etc.). - By default, uses latest API version available on public Azure. - For production, you should stick a particular api-version and/or profile. - The profile sets a mapping between the operation group and an API version. - The api-version parameter sets the default API version if the operation - group is not described in the profile. - - :ivar config: Configuration for client. - :vartype config: ComputeManagementClientConfiguration - - :param credentials: Credentials needed for the client to connect to Azure. - :type credentials: :mod:`A msrestazure Credentials - object` - :param subscription_id: Subscription credentials which uniquely identify - Microsoft Azure subscription. The subscription ID forms part of the URI - for every service call. - :type subscription_id: str - :param str api_version: API version to use if no profile is provided, or if - missing in profile. - :param str base_url: Service URL - :param profile: A profile definition, from KnownProfiles to dict. - :type profile: azure.profiles.KnownProfiles - """ - - DEFAULT_API_VERSION = '2019-03-01' - _PROFILE_TAG = "azure.mgmt.compute.ComputeManagementClient" - LATEST_PROFILE = ProfileDefinition({ - _PROFILE_TAG: { - 'resource_skus': '2019-04-01', - 'disks': '2018-09-30', - 'snapshots': '2018-09-30', - None: DEFAULT_API_VERSION - }}, - _PROFILE_TAG + " latest" - ) - - def __init__(self, credentials, subscription_id, api_version=None, base_url=None, profile=KnownProfiles.default): - self.config = ComputeManagementClientConfiguration(credentials, subscription_id, base_url) - super(ComputeManagementClient, self).__init__( - credentials, - self.config, - api_version=api_version, - profile=profile - ) - -############ Generated from here ############ - - @classmethod - def _models_dict(cls, api_version): - return {k: v for k, v in cls.models(api_version).__dict__.items() if isinstance(v, type)} - - @classmethod - def models(cls, api_version=DEFAULT_API_VERSION): - """Module depends on the API version: - - * 2015-06-15: :mod:`v2015_06_15.models` - * 2016-03-30: :mod:`v2016_03_30.models` - * 2016-04-30-preview: :mod:`v2016_04_30_preview.models` - * 2017-03-30: :mod:`v2017_03_30.models` - * 2017-09-01: :mod:`v2017_09_01.models` - * 2017-12-01: :mod:`v2017_12_01.models` - * 2018-04-01: :mod:`v2018_04_01.models` - * 2018-06-01: :mod:`v2018_06_01.models` - * 2018-09-30: :mod:`v2018_09_30.models` - * 2018-10-01: :mod:`v2018_10_01.models` - * 2019-03-01: :mod:`v2019_03_01.models` - * 2019-04-01: :mod:`v2019_04_01.models` - """ - if api_version == '2015-06-15': - from .v2015_06_15 import models - return models - elif api_version == '2016-03-30': - from .v2016_03_30 import models - return models - elif api_version == '2016-04-30-preview': - from .v2016_04_30_preview import models - return models - elif api_version == '2017-03-30': - from .v2017_03_30 import models - return models - elif api_version == '2017-09-01': - from .v2017_09_01 import models - return models - elif api_version == '2017-12-01': - from .v2017_12_01 import models - return models - elif api_version == '2018-04-01': - from .v2018_04_01 import models - return models - elif api_version == '2018-06-01': - from .v2018_06_01 import models - return models - elif api_version == '2018-09-30': - from .v2018_09_30 import models - return models - elif api_version == '2018-10-01': - from .v2018_10_01 import models - return models - elif api_version == '2019-03-01': - from .v2019_03_01 import models - return models - elif api_version == '2019-04-01': - from .v2019_04_01 import models - return models - raise NotImplementedError("APIVersion {} is not available".format(api_version)) - - @property - def availability_sets(self): - """Instance depends on the API version: - - * 2015-06-15: :class:`AvailabilitySetsOperations` - * 2016-03-30: :class:`AvailabilitySetsOperations` - * 2016-04-30-preview: :class:`AvailabilitySetsOperations` - * 2017-03-30: :class:`AvailabilitySetsOperations` - * 2017-12-01: :class:`AvailabilitySetsOperations` - * 2018-04-01: :class:`AvailabilitySetsOperations` - * 2018-06-01: :class:`AvailabilitySetsOperations` - * 2018-10-01: :class:`AvailabilitySetsOperations` - * 2019-03-01: :class:`AvailabilitySetsOperations` - """ - api_version = self._get_api_version('availability_sets') - if api_version == '2015-06-15': - from .v2015_06_15.operations import AvailabilitySetsOperations as OperationClass - elif api_version == '2016-03-30': - from .v2016_03_30.operations import AvailabilitySetsOperations as OperationClass - elif api_version == '2016-04-30-preview': - from .v2016_04_30_preview.operations import AvailabilitySetsOperations as OperationClass - elif api_version == '2017-03-30': - from .v2017_03_30.operations import AvailabilitySetsOperations as OperationClass - elif api_version == '2017-12-01': - from .v2017_12_01.operations import AvailabilitySetsOperations as OperationClass - elif api_version == '2018-04-01': - from .v2018_04_01.operations import AvailabilitySetsOperations as OperationClass - elif api_version == '2018-06-01': - from .v2018_06_01.operations import AvailabilitySetsOperations as OperationClass - elif api_version == '2018-10-01': - from .v2018_10_01.operations import AvailabilitySetsOperations as OperationClass - elif api_version == '2019-03-01': - from .v2019_03_01.operations import AvailabilitySetsOperations as OperationClass - else: - raise NotImplementedError("APIVersion {} is not available".format(api_version)) - return OperationClass(self._client, self.config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) - - @property - def disks(self): - """Instance depends on the API version: - - * 2016-04-30-preview: :class:`DisksOperations` - * 2017-03-30: :class:`DisksOperations` - * 2018-04-01: :class:`DisksOperations` - * 2018-06-01: :class:`DisksOperations` - * 2018-09-30: :class:`DisksOperations` - """ - api_version = self._get_api_version('disks') - if api_version == '2016-04-30-preview': - from .v2016_04_30_preview.operations import DisksOperations as OperationClass - elif api_version == '2017-03-30': - from .v2017_03_30.operations import DisksOperations as OperationClass - elif api_version == '2018-04-01': - from .v2018_04_01.operations import DisksOperations as OperationClass - elif api_version == '2018-06-01': - from .v2018_06_01.operations import DisksOperations as OperationClass - elif api_version == '2018-09-30': - from .v2018_09_30.operations import DisksOperations as OperationClass - else: - raise NotImplementedError("APIVersion {} is not available".format(api_version)) - return OperationClass(self._client, self.config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) - - @property - def galleries(self): - """Instance depends on the API version: - - * 2018-06-01: :class:`GalleriesOperations` - * 2019-03-01: :class:`GalleriesOperations` - """ - api_version = self._get_api_version('galleries') - if api_version == '2018-06-01': - from .v2018_06_01.operations import GalleriesOperations as OperationClass - elif api_version == '2019-03-01': - from .v2019_03_01.operations import GalleriesOperations as OperationClass - else: - raise NotImplementedError("APIVersion {} is not available".format(api_version)) - return OperationClass(self._client, self.config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) - - @property - def gallery_image_versions(self): - """Instance depends on the API version: - - * 2018-06-01: :class:`GalleryImageVersionsOperations` - * 2019-03-01: :class:`GalleryImageVersionsOperations` - """ - api_version = self._get_api_version('gallery_image_versions') - if api_version == '2018-06-01': - from .v2018_06_01.operations import GalleryImageVersionsOperations as OperationClass - elif api_version == '2019-03-01': - from .v2019_03_01.operations import GalleryImageVersionsOperations as OperationClass - else: - raise NotImplementedError("APIVersion {} is not available".format(api_version)) - return OperationClass(self._client, self.config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) - - @property - def gallery_images(self): - """Instance depends on the API version: - - * 2018-06-01: :class:`GalleryImagesOperations` - * 2019-03-01: :class:`GalleryImagesOperations` - """ - api_version = self._get_api_version('gallery_images') - if api_version == '2018-06-01': - from .v2018_06_01.operations import GalleryImagesOperations as OperationClass - elif api_version == '2019-03-01': - from .v2019_03_01.operations import GalleryImagesOperations as OperationClass - else: - raise NotImplementedError("APIVersion {} is not available".format(api_version)) - return OperationClass(self._client, self.config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) - - @property - def images(self): - """Instance depends on the API version: - - * 2016-04-30-preview: :class:`ImagesOperations` - * 2017-03-30: :class:`ImagesOperations` - * 2017-12-01: :class:`ImagesOperations` - * 2018-04-01: :class:`ImagesOperations` - * 2018-06-01: :class:`ImagesOperations` - * 2018-10-01: :class:`ImagesOperations` - * 2019-03-01: :class:`ImagesOperations` - """ - api_version = self._get_api_version('images') - if api_version == '2016-04-30-preview': - from .v2016_04_30_preview.operations import ImagesOperations as OperationClass - elif api_version == '2017-03-30': - from .v2017_03_30.operations import ImagesOperations as OperationClass - elif api_version == '2017-12-01': - from .v2017_12_01.operations import ImagesOperations as OperationClass - elif api_version == '2018-04-01': - from .v2018_04_01.operations import ImagesOperations as OperationClass - elif api_version == '2018-06-01': - from .v2018_06_01.operations import ImagesOperations as OperationClass - elif api_version == '2018-10-01': - from .v2018_10_01.operations import ImagesOperations as OperationClass - elif api_version == '2019-03-01': - from .v2019_03_01.operations import ImagesOperations as OperationClass - else: - raise NotImplementedError("APIVersion {} is not available".format(api_version)) - return OperationClass(self._client, self.config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) - - @property - def log_analytics(self): - """Instance depends on the API version: - - * 2017-12-01: :class:`LogAnalyticsOperations` - * 2018-04-01: :class:`LogAnalyticsOperations` - * 2018-06-01: :class:`LogAnalyticsOperations` - * 2018-10-01: :class:`LogAnalyticsOperations` - * 2019-03-01: :class:`LogAnalyticsOperations` - """ - api_version = self._get_api_version('log_analytics') - if api_version == '2017-12-01': - from .v2017_12_01.operations import LogAnalyticsOperations as OperationClass - elif api_version == '2018-04-01': - from .v2018_04_01.operations import LogAnalyticsOperations as OperationClass - elif api_version == '2018-06-01': - from .v2018_06_01.operations import LogAnalyticsOperations as OperationClass - elif api_version == '2018-10-01': - from .v2018_10_01.operations import LogAnalyticsOperations as OperationClass - elif api_version == '2019-03-01': - from .v2019_03_01.operations import LogAnalyticsOperations as OperationClass - else: - raise NotImplementedError("APIVersion {} is not available".format(api_version)) - return OperationClass(self._client, self.config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) - - @property - def operations(self): - """Instance depends on the API version: - - * 2017-12-01: :class:`Operations` - * 2018-04-01: :class:`Operations` - * 2018-06-01: :class:`Operations` - * 2018-10-01: :class:`Operations` - * 2019-03-01: :class:`Operations` - """ - api_version = self._get_api_version('operations') - if api_version == '2017-12-01': - from .v2017_12_01.operations import Operations as OperationClass - elif api_version == '2018-04-01': - from .v2018_04_01.operations import Operations as OperationClass - elif api_version == '2018-06-01': - from .v2018_06_01.operations import Operations as OperationClass - elif api_version == '2018-10-01': - from .v2018_10_01.operations import Operations as OperationClass - elif api_version == '2019-03-01': - from .v2019_03_01.operations import Operations as OperationClass - else: - raise NotImplementedError("APIVersion {} is not available".format(api_version)) - return OperationClass(self._client, self.config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) - - @property - def proximity_placement_groups(self): - """Instance depends on the API version: - - * 2018-04-01: :class:`ProximityPlacementGroupsOperations` - * 2018-06-01: :class:`ProximityPlacementGroupsOperations` - * 2018-10-01: :class:`ProximityPlacementGroupsOperations` - * 2019-03-01: :class:`ProximityPlacementGroupsOperations` - """ - api_version = self._get_api_version('proximity_placement_groups') - if api_version == '2018-04-01': - from .v2018_04_01.operations import ProximityPlacementGroupsOperations as OperationClass - elif api_version == '2018-06-01': - from .v2018_06_01.operations import ProximityPlacementGroupsOperations as OperationClass - elif api_version == '2018-10-01': - from .v2018_10_01.operations import ProximityPlacementGroupsOperations as OperationClass - elif api_version == '2019-03-01': - from .v2019_03_01.operations import ProximityPlacementGroupsOperations as OperationClass - else: - raise NotImplementedError("APIVersion {} is not available".format(api_version)) - return OperationClass(self._client, self.config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) - - @property - def resource_skus(self): - """Instance depends on the API version: - - * 2017-03-30: :class:`ResourceSkusOperations` - * 2017-09-01: :class:`ResourceSkusOperations` - * 2019-04-01: :class:`ResourceSkusOperations` - """ - api_version = self._get_api_version('resource_skus') - if api_version == '2017-03-30': - from .v2017_03_30.operations import ResourceSkusOperations as OperationClass - elif api_version == '2017-09-01': - from .v2017_09_01.operations import ResourceSkusOperations as OperationClass - elif api_version == '2019-04-01': - from .v2019_04_01.operations import ResourceSkusOperations as OperationClass - else: - raise NotImplementedError("APIVersion {} is not available".format(api_version)) - return OperationClass(self._client, self.config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) - - @property - def snapshots(self): - """Instance depends on the API version: - - * 2016-04-30-preview: :class:`SnapshotsOperations` - * 2017-03-30: :class:`SnapshotsOperations` - * 2018-04-01: :class:`SnapshotsOperations` - * 2018-06-01: :class:`SnapshotsOperations` - * 2018-09-30: :class:`SnapshotsOperations` - """ - api_version = self._get_api_version('snapshots') - if api_version == '2016-04-30-preview': - from .v2016_04_30_preview.operations import SnapshotsOperations as OperationClass - elif api_version == '2017-03-30': - from .v2017_03_30.operations import SnapshotsOperations as OperationClass - elif api_version == '2018-04-01': - from .v2018_04_01.operations import SnapshotsOperations as OperationClass - elif api_version == '2018-06-01': - from .v2018_06_01.operations import SnapshotsOperations as OperationClass - elif api_version == '2018-09-30': - from .v2018_09_30.operations import SnapshotsOperations as OperationClass - else: - raise NotImplementedError("APIVersion {} is not available".format(api_version)) - return OperationClass(self._client, self.config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) - - @property - def usage(self): - """Instance depends on the API version: - - * 2015-06-15: :class:`UsageOperations` - * 2016-03-30: :class:`UsageOperations` - * 2016-04-30-preview: :class:`UsageOperations` - * 2017-03-30: :class:`UsageOperations` - * 2017-12-01: :class:`UsageOperations` - * 2018-04-01: :class:`UsageOperations` - * 2018-06-01: :class:`UsageOperations` - * 2018-10-01: :class:`UsageOperations` - * 2019-03-01: :class:`UsageOperations` - """ - api_version = self._get_api_version('usage') - if api_version == '2015-06-15': - from .v2015_06_15.operations import UsageOperations as OperationClass - elif api_version == '2016-03-30': - from .v2016_03_30.operations import UsageOperations as OperationClass - elif api_version == '2016-04-30-preview': - from .v2016_04_30_preview.operations import UsageOperations as OperationClass - elif api_version == '2017-03-30': - from .v2017_03_30.operations import UsageOperations as OperationClass - elif api_version == '2017-12-01': - from .v2017_12_01.operations import UsageOperations as OperationClass - elif api_version == '2018-04-01': - from .v2018_04_01.operations import UsageOperations as OperationClass - elif api_version == '2018-06-01': - from .v2018_06_01.operations import UsageOperations as OperationClass - elif api_version == '2018-10-01': - from .v2018_10_01.operations import UsageOperations as OperationClass - elif api_version == '2019-03-01': - from .v2019_03_01.operations import UsageOperations as OperationClass - else: - raise NotImplementedError("APIVersion {} is not available".format(api_version)) - return OperationClass(self._client, self.config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) - - @property - def virtual_machine_extension_images(self): - """Instance depends on the API version: - - * 2015-06-15: :class:`VirtualMachineExtensionImagesOperations` - * 2016-03-30: :class:`VirtualMachineExtensionImagesOperations` - * 2016-04-30-preview: :class:`VirtualMachineExtensionImagesOperations` - * 2017-03-30: :class:`VirtualMachineExtensionImagesOperations` - * 2017-12-01: :class:`VirtualMachineExtensionImagesOperations` - * 2018-04-01: :class:`VirtualMachineExtensionImagesOperations` - * 2018-06-01: :class:`VirtualMachineExtensionImagesOperations` - * 2018-10-01: :class:`VirtualMachineExtensionImagesOperations` - * 2019-03-01: :class:`VirtualMachineExtensionImagesOperations` - """ - api_version = self._get_api_version('virtual_machine_extension_images') - if api_version == '2015-06-15': - from .v2015_06_15.operations import VirtualMachineExtensionImagesOperations as OperationClass - elif api_version == '2016-03-30': - from .v2016_03_30.operations import VirtualMachineExtensionImagesOperations as OperationClass - elif api_version == '2016-04-30-preview': - from .v2016_04_30_preview.operations import VirtualMachineExtensionImagesOperations as OperationClass - elif api_version == '2017-03-30': - from .v2017_03_30.operations import VirtualMachineExtensionImagesOperations as OperationClass - elif api_version == '2017-12-01': - from .v2017_12_01.operations import VirtualMachineExtensionImagesOperations as OperationClass - elif api_version == '2018-04-01': - from .v2018_04_01.operations import VirtualMachineExtensionImagesOperations as OperationClass - elif api_version == '2018-06-01': - from .v2018_06_01.operations import VirtualMachineExtensionImagesOperations as OperationClass - elif api_version == '2018-10-01': - from .v2018_10_01.operations import VirtualMachineExtensionImagesOperations as OperationClass - elif api_version == '2019-03-01': - from .v2019_03_01.operations import VirtualMachineExtensionImagesOperations as OperationClass - else: - raise NotImplementedError("APIVersion {} is not available".format(api_version)) - return OperationClass(self._client, self.config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) - - @property - def virtual_machine_extensions(self): - """Instance depends on the API version: - - * 2015-06-15: :class:`VirtualMachineExtensionsOperations` - * 2016-03-30: :class:`VirtualMachineExtensionsOperations` - * 2016-04-30-preview: :class:`VirtualMachineExtensionsOperations` - * 2017-03-30: :class:`VirtualMachineExtensionsOperations` - * 2017-12-01: :class:`VirtualMachineExtensionsOperations` - * 2018-04-01: :class:`VirtualMachineExtensionsOperations` - * 2018-06-01: :class:`VirtualMachineExtensionsOperations` - * 2018-10-01: :class:`VirtualMachineExtensionsOperations` - * 2019-03-01: :class:`VirtualMachineExtensionsOperations` - """ - api_version = self._get_api_version('virtual_machine_extensions') - if api_version == '2015-06-15': - from .v2015_06_15.operations import VirtualMachineExtensionsOperations as OperationClass - elif api_version == '2016-03-30': - from .v2016_03_30.operations import VirtualMachineExtensionsOperations as OperationClass - elif api_version == '2016-04-30-preview': - from .v2016_04_30_preview.operations import VirtualMachineExtensionsOperations as OperationClass - elif api_version == '2017-03-30': - from .v2017_03_30.operations import VirtualMachineExtensionsOperations as OperationClass - elif api_version == '2017-12-01': - from .v2017_12_01.operations import VirtualMachineExtensionsOperations as OperationClass - elif api_version == '2018-04-01': - from .v2018_04_01.operations import VirtualMachineExtensionsOperations as OperationClass - elif api_version == '2018-06-01': - from .v2018_06_01.operations import VirtualMachineExtensionsOperations as OperationClass - elif api_version == '2018-10-01': - from .v2018_10_01.operations import VirtualMachineExtensionsOperations as OperationClass - elif api_version == '2019-03-01': - from .v2019_03_01.operations import VirtualMachineExtensionsOperations as OperationClass - else: - raise NotImplementedError("APIVersion {} is not available".format(api_version)) - return OperationClass(self._client, self.config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) - - @property - def virtual_machine_images(self): - """Instance depends on the API version: - - * 2015-06-15: :class:`VirtualMachineImagesOperations` - * 2016-03-30: :class:`VirtualMachineImagesOperations` - * 2016-04-30-preview: :class:`VirtualMachineImagesOperations` - * 2017-03-30: :class:`VirtualMachineImagesOperations` - * 2017-12-01: :class:`VirtualMachineImagesOperations` - * 2018-04-01: :class:`VirtualMachineImagesOperations` - * 2018-06-01: :class:`VirtualMachineImagesOperations` - * 2018-10-01: :class:`VirtualMachineImagesOperations` - * 2019-03-01: :class:`VirtualMachineImagesOperations` - """ - api_version = self._get_api_version('virtual_machine_images') - if api_version == '2015-06-15': - from .v2015_06_15.operations import VirtualMachineImagesOperations as OperationClass - elif api_version == '2016-03-30': - from .v2016_03_30.operations import VirtualMachineImagesOperations as OperationClass - elif api_version == '2016-04-30-preview': - from .v2016_04_30_preview.operations import VirtualMachineImagesOperations as OperationClass - elif api_version == '2017-03-30': - from .v2017_03_30.operations import VirtualMachineImagesOperations as OperationClass - elif api_version == '2017-12-01': - from .v2017_12_01.operations import VirtualMachineImagesOperations as OperationClass - elif api_version == '2018-04-01': - from .v2018_04_01.operations import VirtualMachineImagesOperations as OperationClass - elif api_version == '2018-06-01': - from .v2018_06_01.operations import VirtualMachineImagesOperations as OperationClass - elif api_version == '2018-10-01': - from .v2018_10_01.operations import VirtualMachineImagesOperations as OperationClass - elif api_version == '2019-03-01': - from .v2019_03_01.operations import VirtualMachineImagesOperations as OperationClass - else: - raise NotImplementedError("APIVersion {} is not available".format(api_version)) - return OperationClass(self._client, self.config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) - - @property - def virtual_machine_run_commands(self): - """Instance depends on the API version: - - * 2017-03-30: :class:`VirtualMachineRunCommandsOperations` - * 2017-12-01: :class:`VirtualMachineRunCommandsOperations` - * 2018-04-01: :class:`VirtualMachineRunCommandsOperations` - * 2018-06-01: :class:`VirtualMachineRunCommandsOperations` - * 2018-10-01: :class:`VirtualMachineRunCommandsOperations` - * 2019-03-01: :class:`VirtualMachineRunCommandsOperations` - """ - api_version = self._get_api_version('virtual_machine_run_commands') - if api_version == '2017-03-30': - from .v2017_03_30.operations import VirtualMachineRunCommandsOperations as OperationClass - elif api_version == '2017-12-01': - from .v2017_12_01.operations import VirtualMachineRunCommandsOperations as OperationClass - elif api_version == '2018-04-01': - from .v2018_04_01.operations import VirtualMachineRunCommandsOperations as OperationClass - elif api_version == '2018-06-01': - from .v2018_06_01.operations import VirtualMachineRunCommandsOperations as OperationClass - elif api_version == '2018-10-01': - from .v2018_10_01.operations import VirtualMachineRunCommandsOperations as OperationClass - elif api_version == '2019-03-01': - from .v2019_03_01.operations import VirtualMachineRunCommandsOperations as OperationClass - else: - raise NotImplementedError("APIVersion {} is not available".format(api_version)) - return OperationClass(self._client, self.config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) - - @property - def virtual_machine_scale_set_extensions(self): - """Instance depends on the API version: - - * 2017-03-30: :class:`VirtualMachineScaleSetExtensionsOperations` - * 2017-12-01: :class:`VirtualMachineScaleSetExtensionsOperations` - * 2018-04-01: :class:`VirtualMachineScaleSetExtensionsOperations` - * 2018-06-01: :class:`VirtualMachineScaleSetExtensionsOperations` - * 2018-10-01: :class:`VirtualMachineScaleSetExtensionsOperations` - * 2019-03-01: :class:`VirtualMachineScaleSetExtensionsOperations` - """ - api_version = self._get_api_version('virtual_machine_scale_set_extensions') - if api_version == '2017-03-30': - from .v2017_03_30.operations import VirtualMachineScaleSetExtensionsOperations as OperationClass - elif api_version == '2017-12-01': - from .v2017_12_01.operations import VirtualMachineScaleSetExtensionsOperations as OperationClass - elif api_version == '2018-04-01': - from .v2018_04_01.operations import VirtualMachineScaleSetExtensionsOperations as OperationClass - elif api_version == '2018-06-01': - from .v2018_06_01.operations import VirtualMachineScaleSetExtensionsOperations as OperationClass - elif api_version == '2018-10-01': - from .v2018_10_01.operations import VirtualMachineScaleSetExtensionsOperations as OperationClass - elif api_version == '2019-03-01': - from .v2019_03_01.operations import VirtualMachineScaleSetExtensionsOperations as OperationClass - else: - raise NotImplementedError("APIVersion {} is not available".format(api_version)) - return OperationClass(self._client, self.config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) - - @property - def virtual_machine_scale_set_rolling_upgrades(self): - """Instance depends on the API version: - - * 2017-03-30: :class:`VirtualMachineScaleSetRollingUpgradesOperations` - * 2017-12-01: :class:`VirtualMachineScaleSetRollingUpgradesOperations` - * 2018-04-01: :class:`VirtualMachineScaleSetRollingUpgradesOperations` - * 2018-06-01: :class:`VirtualMachineScaleSetRollingUpgradesOperations` - * 2018-10-01: :class:`VirtualMachineScaleSetRollingUpgradesOperations` - * 2019-03-01: :class:`VirtualMachineScaleSetRollingUpgradesOperations` - """ - api_version = self._get_api_version('virtual_machine_scale_set_rolling_upgrades') - if api_version == '2017-03-30': - from .v2017_03_30.operations import VirtualMachineScaleSetRollingUpgradesOperations as OperationClass - elif api_version == '2017-12-01': - from .v2017_12_01.operations import VirtualMachineScaleSetRollingUpgradesOperations as OperationClass - elif api_version == '2018-04-01': - from .v2018_04_01.operations import VirtualMachineScaleSetRollingUpgradesOperations as OperationClass - elif api_version == '2018-06-01': - from .v2018_06_01.operations import VirtualMachineScaleSetRollingUpgradesOperations as OperationClass - elif api_version == '2018-10-01': - from .v2018_10_01.operations import VirtualMachineScaleSetRollingUpgradesOperations as OperationClass - elif api_version == '2019-03-01': - from .v2019_03_01.operations import VirtualMachineScaleSetRollingUpgradesOperations as OperationClass - else: - raise NotImplementedError("APIVersion {} is not available".format(api_version)) - return OperationClass(self._client, self.config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) - - @property - def virtual_machine_scale_set_vms(self): - """Instance depends on the API version: - - * 2015-06-15: :class:`VirtualMachineScaleSetVMsOperations` - * 2016-03-30: :class:`VirtualMachineScaleSetVMsOperations` - * 2016-04-30-preview: :class:`VirtualMachineScaleSetVMsOperations` - * 2017-03-30: :class:`VirtualMachineScaleSetVMsOperations` - * 2017-12-01: :class:`VirtualMachineScaleSetVMsOperations` - * 2018-04-01: :class:`VirtualMachineScaleSetVMsOperations` - * 2018-06-01: :class:`VirtualMachineScaleSetVMsOperations` - * 2018-10-01: :class:`VirtualMachineScaleSetVMsOperations` - * 2019-03-01: :class:`VirtualMachineScaleSetVMsOperations` - """ - api_version = self._get_api_version('virtual_machine_scale_set_vms') - if api_version == '2015-06-15': - from .v2015_06_15.operations import VirtualMachineScaleSetVMsOperations as OperationClass - elif api_version == '2016-03-30': - from .v2016_03_30.operations import VirtualMachineScaleSetVMsOperations as OperationClass - elif api_version == '2016-04-30-preview': - from .v2016_04_30_preview.operations import VirtualMachineScaleSetVMsOperations as OperationClass - elif api_version == '2017-03-30': - from .v2017_03_30.operations import VirtualMachineScaleSetVMsOperations as OperationClass - elif api_version == '2017-12-01': - from .v2017_12_01.operations import VirtualMachineScaleSetVMsOperations as OperationClass - elif api_version == '2018-04-01': - from .v2018_04_01.operations import VirtualMachineScaleSetVMsOperations as OperationClass - elif api_version == '2018-06-01': - from .v2018_06_01.operations import VirtualMachineScaleSetVMsOperations as OperationClass - elif api_version == '2018-10-01': - from .v2018_10_01.operations import VirtualMachineScaleSetVMsOperations as OperationClass - elif api_version == '2019-03-01': - from .v2019_03_01.operations import VirtualMachineScaleSetVMsOperations as OperationClass - else: - raise NotImplementedError("APIVersion {} is not available".format(api_version)) - return OperationClass(self._client, self.config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) - - @property - def virtual_machine_scale_sets(self): - """Instance depends on the API version: - - * 2015-06-15: :class:`VirtualMachineScaleSetsOperations` - * 2016-03-30: :class:`VirtualMachineScaleSetsOperations` - * 2016-04-30-preview: :class:`VirtualMachineScaleSetsOperations` - * 2017-03-30: :class:`VirtualMachineScaleSetsOperations` - * 2017-12-01: :class:`VirtualMachineScaleSetsOperations` - * 2018-04-01: :class:`VirtualMachineScaleSetsOperations` - * 2018-06-01: :class:`VirtualMachineScaleSetsOperations` - * 2018-10-01: :class:`VirtualMachineScaleSetsOperations` - * 2019-03-01: :class:`VirtualMachineScaleSetsOperations` - """ - api_version = self._get_api_version('virtual_machine_scale_sets') - if api_version == '2015-06-15': - from .v2015_06_15.operations import VirtualMachineScaleSetsOperations as OperationClass - elif api_version == '2016-03-30': - from .v2016_03_30.operations import VirtualMachineScaleSetsOperations as OperationClass - elif api_version == '2016-04-30-preview': - from .v2016_04_30_preview.operations import VirtualMachineScaleSetsOperations as OperationClass - elif api_version == '2017-03-30': - from .v2017_03_30.operations import VirtualMachineScaleSetsOperations as OperationClass - elif api_version == '2017-12-01': - from .v2017_12_01.operations import VirtualMachineScaleSetsOperations as OperationClass - elif api_version == '2018-04-01': - from .v2018_04_01.operations import VirtualMachineScaleSetsOperations as OperationClass - elif api_version == '2018-06-01': - from .v2018_06_01.operations import VirtualMachineScaleSetsOperations as OperationClass - elif api_version == '2018-10-01': - from .v2018_10_01.operations import VirtualMachineScaleSetsOperations as OperationClass - elif api_version == '2019-03-01': - from .v2019_03_01.operations import VirtualMachineScaleSetsOperations as OperationClass - else: - raise NotImplementedError("APIVersion {} is not available".format(api_version)) - return OperationClass(self._client, self.config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) - - @property - def virtual_machine_sizes(self): - """Instance depends on the API version: - - * 2015-06-15: :class:`VirtualMachineSizesOperations` - * 2016-03-30: :class:`VirtualMachineSizesOperations` - * 2016-04-30-preview: :class:`VirtualMachineSizesOperations` - * 2017-03-30: :class:`VirtualMachineSizesOperations` - * 2017-12-01: :class:`VirtualMachineSizesOperations` - * 2018-04-01: :class:`VirtualMachineSizesOperations` - * 2018-06-01: :class:`VirtualMachineSizesOperations` - * 2018-10-01: :class:`VirtualMachineSizesOperations` - * 2019-03-01: :class:`VirtualMachineSizesOperations` - """ - api_version = self._get_api_version('virtual_machine_sizes') - if api_version == '2015-06-15': - from .v2015_06_15.operations import VirtualMachineSizesOperations as OperationClass - elif api_version == '2016-03-30': - from .v2016_03_30.operations import VirtualMachineSizesOperations as OperationClass - elif api_version == '2016-04-30-preview': - from .v2016_04_30_preview.operations import VirtualMachineSizesOperations as OperationClass - elif api_version == '2017-03-30': - from .v2017_03_30.operations import VirtualMachineSizesOperations as OperationClass - elif api_version == '2017-12-01': - from .v2017_12_01.operations import VirtualMachineSizesOperations as OperationClass - elif api_version == '2018-04-01': - from .v2018_04_01.operations import VirtualMachineSizesOperations as OperationClass - elif api_version == '2018-06-01': - from .v2018_06_01.operations import VirtualMachineSizesOperations as OperationClass - elif api_version == '2018-10-01': - from .v2018_10_01.operations import VirtualMachineSizesOperations as OperationClass - elif api_version == '2019-03-01': - from .v2019_03_01.operations import VirtualMachineSizesOperations as OperationClass - else: - raise NotImplementedError("APIVersion {} is not available".format(api_version)) - return OperationClass(self._client, self.config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) - - @property - def virtual_machines(self): - """Instance depends on the API version: - - * 2015-06-15: :class:`VirtualMachinesOperations` - * 2016-03-30: :class:`VirtualMachinesOperations` - * 2016-04-30-preview: :class:`VirtualMachinesOperations` - * 2017-03-30: :class:`VirtualMachinesOperations` - * 2017-12-01: :class:`VirtualMachinesOperations` - * 2018-04-01: :class:`VirtualMachinesOperations` - * 2018-06-01: :class:`VirtualMachinesOperations` - * 2018-10-01: :class:`VirtualMachinesOperations` - * 2019-03-01: :class:`VirtualMachinesOperations` - """ - api_version = self._get_api_version('virtual_machines') - if api_version == '2015-06-15': - from .v2015_06_15.operations import VirtualMachinesOperations as OperationClass - elif api_version == '2016-03-30': - from .v2016_03_30.operations import VirtualMachinesOperations as OperationClass - elif api_version == '2016-04-30-preview': - from .v2016_04_30_preview.operations import VirtualMachinesOperations as OperationClass - elif api_version == '2017-03-30': - from .v2017_03_30.operations import VirtualMachinesOperations as OperationClass - elif api_version == '2017-12-01': - from .v2017_12_01.operations import VirtualMachinesOperations as OperationClass - elif api_version == '2018-04-01': - from .v2018_04_01.operations import VirtualMachinesOperations as OperationClass - elif api_version == '2018-06-01': - from .v2018_06_01.operations import VirtualMachinesOperations as OperationClass - elif api_version == '2018-10-01': - from .v2018_10_01.operations import VirtualMachinesOperations as OperationClass - elif api_version == '2019-03-01': - from .v2019_03_01.operations import VirtualMachinesOperations as OperationClass - else: - raise NotImplementedError("APIVersion {} is not available".format(api_version)) - return OperationClass(self._client, self.config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/models.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/models.py index eac53a5ee64c..6cca52f9462c 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/models.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/models.py @@ -1,14 +1,9 @@ -# coding=utf-8 +# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. # -------------------------------------------------------------------------- -import warnings - from .v2018_09_30.models import * -from .v2019_03_01.models import * # Note that this line is overriding some models of 2018-09-01. See link below for details. +from .v2019_03_01.models import * from .v2019_04_01.models import * - -warnings.warn("Import models from this file is deprecated. See https://aka.ms/pysdkmodels", - DeprecationWarning) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/__init__.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/__init__.py index 88ded2f640de..a7bc1ce68e37 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/__init__.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/__init__.py @@ -9,10 +9,11 @@ # regenerated. # -------------------------------------------------------------------------- -from .compute_management_client import ComputeManagementClient -from .version import VERSION +from ._configuration import ComputeManagementClientConfiguration +from ._compute_management_client import ComputeManagementClient +__all__ = ['ComputeManagementClient', 'ComputeManagementClientConfiguration'] -__all__ = ['ComputeManagementClient'] +from .version import VERSION __version__ = VERSION diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/_compute_management_client.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/_compute_management_client.py new file mode 100644 index 000000000000..67f8e0a2503e --- /dev/null +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/_compute_management_client.py @@ -0,0 +1,91 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.service_client import SDKClient +from msrest import Serializer, Deserializer + +from ._configuration import ComputeManagementClientConfiguration +from .operations import AvailabilitySetsOperations +from .operations import VirtualMachineExtensionImagesOperations +from .operations import VirtualMachineExtensionsOperations +from .operations import VirtualMachineImagesOperations +from .operations import UsageOperations +from .operations import VirtualMachineSizesOperations +from .operations import VirtualMachinesOperations +from .operations import VirtualMachineScaleSetsOperations +from .operations import VirtualMachineScaleSetVMsOperations +from . import models + + +class ComputeManagementClient(SDKClient): + """Compute Client + + :ivar config: Configuration for client. + :vartype config: ComputeManagementClientConfiguration + + :ivar availability_sets: AvailabilitySets operations + :vartype availability_sets: azure.mgmt.compute.v2015_06_15.operations.AvailabilitySetsOperations + :ivar virtual_machine_extension_images: VirtualMachineExtensionImages operations + :vartype virtual_machine_extension_images: azure.mgmt.compute.v2015_06_15.operations.VirtualMachineExtensionImagesOperations + :ivar virtual_machine_extensions: VirtualMachineExtensions operations + :vartype virtual_machine_extensions: azure.mgmt.compute.v2015_06_15.operations.VirtualMachineExtensionsOperations + :ivar virtual_machine_images: VirtualMachineImages operations + :vartype virtual_machine_images: azure.mgmt.compute.v2015_06_15.operations.VirtualMachineImagesOperations + :ivar usage: Usage operations + :vartype usage: azure.mgmt.compute.v2015_06_15.operations.UsageOperations + :ivar virtual_machine_sizes: VirtualMachineSizes operations + :vartype virtual_machine_sizes: azure.mgmt.compute.v2015_06_15.operations.VirtualMachineSizesOperations + :ivar virtual_machines: VirtualMachines operations + :vartype virtual_machines: azure.mgmt.compute.v2015_06_15.operations.VirtualMachinesOperations + :ivar virtual_machine_scale_sets: VirtualMachineScaleSets operations + :vartype virtual_machine_scale_sets: azure.mgmt.compute.v2015_06_15.operations.VirtualMachineScaleSetsOperations + :ivar virtual_machine_scale_set_vms: VirtualMachineScaleSetVMs operations + :vartype virtual_machine_scale_set_vms: azure.mgmt.compute.v2015_06_15.operations.VirtualMachineScaleSetVMsOperations + + :param credentials: Credentials needed for the client to connect to Azure. + :type credentials: :mod:`A msrestazure Credentials + object` + :param subscription_id: Subscription credentials which uniquely identify + Microsoft Azure subscription. The subscription ID forms part of the URI + for every service call. + :type subscription_id: str + :param str base_url: Service URL + """ + + def __init__( + self, credentials, subscription_id, base_url=None): + + self.config = ComputeManagementClientConfiguration(credentials, subscription_id, base_url) + super(ComputeManagementClient, self).__init__(self.config.credentials, self.config) + + client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} + self.api_version = '2015-06-15' + self._serialize = Serializer(client_models) + self._deserialize = Deserializer(client_models) + + self.availability_sets = AvailabilitySetsOperations( + self._client, self.config, self._serialize, self._deserialize) + self.virtual_machine_extension_images = VirtualMachineExtensionImagesOperations( + self._client, self.config, self._serialize, self._deserialize) + self.virtual_machine_extensions = VirtualMachineExtensionsOperations( + self._client, self.config, self._serialize, self._deserialize) + self.virtual_machine_images = VirtualMachineImagesOperations( + self._client, self.config, self._serialize, self._deserialize) + self.usage = UsageOperations( + self._client, self.config, self._serialize, self._deserialize) + self.virtual_machine_sizes = VirtualMachineSizesOperations( + self._client, self.config, self._serialize, self._deserialize) + self.virtual_machines = VirtualMachinesOperations( + self._client, self.config, self._serialize, self._deserialize) + self.virtual_machine_scale_sets = VirtualMachineScaleSetsOperations( + self._client, self.config, self._serialize, self._deserialize) + self.virtual_machine_scale_set_vms = VirtualMachineScaleSetVMsOperations( + self._client, self.config, self._serialize, self._deserialize) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/_configuration.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/_configuration.py new file mode 100644 index 000000000000..0fcf5984e2ca --- /dev/null +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/_configuration.py @@ -0,0 +1,50 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- +from msrestazure import AzureConfiguration + +from .version import VERSION + + +class ComputeManagementClientConfiguration(AzureConfiguration): + """Configuration for ComputeManagementClient + Note that all parameters used to create this instance are saved as instance + attributes. + + :param credentials: Credentials needed for the client to connect to Azure. + :type credentials: :mod:`A msrestazure Credentials + object` + :param subscription_id: Subscription credentials which uniquely identify + Microsoft Azure subscription. The subscription ID forms part of the URI + for every service call. + :type subscription_id: str + :param str base_url: Service URL + """ + + def __init__( + self, credentials, subscription_id, base_url=None): + + if credentials is None: + raise ValueError("Parameter 'credentials' must not be None.") + if subscription_id is None: + raise ValueError("Parameter 'subscription_id' must not be None.") + if not base_url: + base_url = 'https://management.azure.com' + + super(ComputeManagementClientConfiguration, self).__init__(base_url) + + # Starting Autorest.Python 4.0.64, make connection pool activated by default + self.keep_alive = True + + self.add_user_agent('azure-mgmt-compute/{}'.format(VERSION)) + self.add_user_agent('Azure-SDK-For-Python') + + self.credentials = credentials + self.subscription_id = subscription_id diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/compute_management_client.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/compute_management_client.py deleted file mode 100644 index ffcfe0787b8c..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/compute_management_client.py +++ /dev/null @@ -1,125 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.service_client import SDKClient -from msrest import Serializer, Deserializer -from msrestazure import AzureConfiguration -from .version import VERSION -from .operations.availability_sets_operations import AvailabilitySetsOperations -from .operations.virtual_machine_extension_images_operations import VirtualMachineExtensionImagesOperations -from .operations.virtual_machine_extensions_operations import VirtualMachineExtensionsOperations -from .operations.virtual_machine_images_operations import VirtualMachineImagesOperations -from .operations.usage_operations import UsageOperations -from .operations.virtual_machine_sizes_operations import VirtualMachineSizesOperations -from .operations.virtual_machines_operations import VirtualMachinesOperations -from .operations.virtual_machine_scale_sets_operations import VirtualMachineScaleSetsOperations -from .operations.virtual_machine_scale_set_vms_operations import VirtualMachineScaleSetVMsOperations -from . import models - - -class ComputeManagementClientConfiguration(AzureConfiguration): - """Configuration for ComputeManagementClient - Note that all parameters used to create this instance are saved as instance - attributes. - - :param credentials: Credentials needed for the client to connect to Azure. - :type credentials: :mod:`A msrestazure Credentials - object` - :param subscription_id: Subscription credentials which uniquely identify - Microsoft Azure subscription. The subscription ID forms part of the URI - for every service call. - :type subscription_id: str - :param str base_url: Service URL - """ - - def __init__( - self, credentials, subscription_id, base_url=None): - - if credentials is None: - raise ValueError("Parameter 'credentials' must not be None.") - if subscription_id is None: - raise ValueError("Parameter 'subscription_id' must not be None.") - if not base_url: - base_url = 'https://management.azure.com' - - super(ComputeManagementClientConfiguration, self).__init__(base_url) - - self.add_user_agent('azure-mgmt-compute/{}'.format(VERSION)) - self.add_user_agent('Azure-SDK-For-Python') - - self.credentials = credentials - self.subscription_id = subscription_id - - -class ComputeManagementClient(SDKClient): - """Compute Client - - :ivar config: Configuration for client. - :vartype config: ComputeManagementClientConfiguration - - :ivar availability_sets: AvailabilitySets operations - :vartype availability_sets: azure.mgmt.compute.v2015_06_15.operations.AvailabilitySetsOperations - :ivar virtual_machine_extension_images: VirtualMachineExtensionImages operations - :vartype virtual_machine_extension_images: azure.mgmt.compute.v2015_06_15.operations.VirtualMachineExtensionImagesOperations - :ivar virtual_machine_extensions: VirtualMachineExtensions operations - :vartype virtual_machine_extensions: azure.mgmt.compute.v2015_06_15.operations.VirtualMachineExtensionsOperations - :ivar virtual_machine_images: VirtualMachineImages operations - :vartype virtual_machine_images: azure.mgmt.compute.v2015_06_15.operations.VirtualMachineImagesOperations - :ivar usage: Usage operations - :vartype usage: azure.mgmt.compute.v2015_06_15.operations.UsageOperations - :ivar virtual_machine_sizes: VirtualMachineSizes operations - :vartype virtual_machine_sizes: azure.mgmt.compute.v2015_06_15.operations.VirtualMachineSizesOperations - :ivar virtual_machines: VirtualMachines operations - :vartype virtual_machines: azure.mgmt.compute.v2015_06_15.operations.VirtualMachinesOperations - :ivar virtual_machine_scale_sets: VirtualMachineScaleSets operations - :vartype virtual_machine_scale_sets: azure.mgmt.compute.v2015_06_15.operations.VirtualMachineScaleSetsOperations - :ivar virtual_machine_scale_set_vms: VirtualMachineScaleSetVMs operations - :vartype virtual_machine_scale_set_vms: azure.mgmt.compute.v2015_06_15.operations.VirtualMachineScaleSetVMsOperations - - :param credentials: Credentials needed for the client to connect to Azure. - :type credentials: :mod:`A msrestazure Credentials - object` - :param subscription_id: Subscription credentials which uniquely identify - Microsoft Azure subscription. The subscription ID forms part of the URI - for every service call. - :type subscription_id: str - :param str base_url: Service URL - """ - - def __init__( - self, credentials, subscription_id, base_url=None): - - self.config = ComputeManagementClientConfiguration(credentials, subscription_id, base_url) - super(ComputeManagementClient, self).__init__(self.config.credentials, self.config) - - client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} - self.api_version = '2015-06-15' - self._serialize = Serializer(client_models) - self._deserialize = Deserializer(client_models) - - self.availability_sets = AvailabilitySetsOperations( - self._client, self.config, self._serialize, self._deserialize) - self.virtual_machine_extension_images = VirtualMachineExtensionImagesOperations( - self._client, self.config, self._serialize, self._deserialize) - self.virtual_machine_extensions = VirtualMachineExtensionsOperations( - self._client, self.config, self._serialize, self._deserialize) - self.virtual_machine_images = VirtualMachineImagesOperations( - self._client, self.config, self._serialize, self._deserialize) - self.usage = UsageOperations( - self._client, self.config, self._serialize, self._deserialize) - self.virtual_machine_sizes = VirtualMachineSizesOperations( - self._client, self.config, self._serialize, self._deserialize) - self.virtual_machines = VirtualMachinesOperations( - self._client, self.config, self._serialize, self._deserialize) - self.virtual_machine_scale_sets = VirtualMachineScaleSetsOperations( - self._client, self.config, self._serialize, self._deserialize) - self.virtual_machine_scale_set_vms = VirtualMachineScaleSetVMsOperations( - self._client, self.config, self._serialize, self._deserialize) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/__init__.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/__init__.py index bcfde62fcd03..de8fe0774551 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/__init__.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/__init__.py @@ -10,169 +10,169 @@ # -------------------------------------------------------------------------- try: - from .instance_view_status_py3 import InstanceViewStatus - from .sub_resource_py3 import SubResource - from .availability_set_py3 import AvailabilitySet - from .virtual_machine_size_py3 import VirtualMachineSize - from .virtual_machine_extension_image_py3 import VirtualMachineExtensionImage - from .virtual_machine_image_resource_py3 import VirtualMachineImageResource - from .virtual_machine_extension_instance_view_py3 import VirtualMachineExtensionInstanceView - from .virtual_machine_extension_py3 import VirtualMachineExtension - from .virtual_machine_extension_update_py3 import VirtualMachineExtensionUpdate - from .purchase_plan_py3 import PurchasePlan - from .os_disk_image_py3 import OSDiskImage - from .data_disk_image_py3 import DataDiskImage - from .virtual_machine_image_py3 import VirtualMachineImage - from .usage_name_py3 import UsageName - from .usage_py3 import Usage - from .virtual_machine_capture_parameters_py3 import VirtualMachineCaptureParameters - from .virtual_machine_capture_result_py3 import VirtualMachineCaptureResult - from .plan_py3 import Plan - from .hardware_profile_py3 import HardwareProfile - from .image_reference_py3 import ImageReference - from .key_vault_secret_reference_py3 import KeyVaultSecretReference - from .key_vault_key_reference_py3 import KeyVaultKeyReference - from .disk_encryption_settings_py3 import DiskEncryptionSettings - from .virtual_hard_disk_py3 import VirtualHardDisk - from .os_disk_py3 import OSDisk - from .data_disk_py3 import DataDisk - from .storage_profile_py3 import StorageProfile - from .additional_unattend_content_py3 import AdditionalUnattendContent - from .win_rm_listener_py3 import WinRMListener - from .win_rm_configuration_py3 import WinRMConfiguration - from .windows_configuration_py3 import WindowsConfiguration - from .ssh_public_key_py3 import SshPublicKey - from .ssh_configuration_py3 import SshConfiguration - from .linux_configuration_py3 import LinuxConfiguration - from .vault_certificate_py3 import VaultCertificate - from .vault_secret_group_py3 import VaultSecretGroup - from .os_profile_py3 import OSProfile - from .network_interface_reference_py3 import NetworkInterfaceReference - from .network_profile_py3 import NetworkProfile - from .boot_diagnostics_py3 import BootDiagnostics - from .diagnostics_profile_py3 import DiagnosticsProfile - from .virtual_machine_extension_handler_instance_view_py3 import VirtualMachineExtensionHandlerInstanceView - from .virtual_machine_agent_instance_view_py3 import VirtualMachineAgentInstanceView - from .disk_instance_view_py3 import DiskInstanceView - from .boot_diagnostics_instance_view_py3 import BootDiagnosticsInstanceView - from .virtual_machine_instance_view_py3 import VirtualMachineInstanceView - from .virtual_machine_py3 import VirtualMachine - from .sku_py3 import Sku - from .upgrade_policy_py3 import UpgradePolicy - from .virtual_machine_scale_set_os_profile_py3 import VirtualMachineScaleSetOSProfile - from .virtual_machine_scale_set_os_disk_py3 import VirtualMachineScaleSetOSDisk - from .virtual_machine_scale_set_storage_profile_py3 import VirtualMachineScaleSetStorageProfile - from .api_entity_reference_py3 import ApiEntityReference - from .virtual_machine_scale_set_ip_configuration_py3 import VirtualMachineScaleSetIPConfiguration - from .virtual_machine_scale_set_network_configuration_py3 import VirtualMachineScaleSetNetworkConfiguration - from .virtual_machine_scale_set_network_profile_py3 import VirtualMachineScaleSetNetworkProfile - from .virtual_machine_scale_set_extension_py3 import VirtualMachineScaleSetExtension - from .virtual_machine_scale_set_extension_profile_py3 import VirtualMachineScaleSetExtensionProfile - from .virtual_machine_scale_set_vm_profile_py3 import VirtualMachineScaleSetVMProfile - from .virtual_machine_scale_set_py3 import VirtualMachineScaleSet - from .virtual_machine_scale_set_vm_instance_ids_py3 import VirtualMachineScaleSetVMInstanceIDs - from .virtual_machine_scale_set_vm_instance_required_ids_py3 import VirtualMachineScaleSetVMInstanceRequiredIDs - from .virtual_machine_status_code_count_py3 import VirtualMachineStatusCodeCount - from .virtual_machine_scale_set_instance_view_statuses_summary_py3 import VirtualMachineScaleSetInstanceViewStatusesSummary - from .virtual_machine_scale_set_vm_extensions_summary_py3 import VirtualMachineScaleSetVMExtensionsSummary - from .virtual_machine_scale_set_instance_view_py3 import VirtualMachineScaleSetInstanceView - from .virtual_machine_scale_set_sku_capacity_py3 import VirtualMachineScaleSetSkuCapacity - from .virtual_machine_scale_set_sku_py3 import VirtualMachineScaleSetSku - from .virtual_machine_scale_set_vm_instance_view_py3 import VirtualMachineScaleSetVMInstanceView - from .virtual_machine_scale_set_vm_py3 import VirtualMachineScaleSetVM - from .api_error_base_py3 import ApiErrorBase - from .inner_error_py3 import InnerError - from .api_error_py3 import ApiError - from .compute_long_running_operation_properties_py3 import ComputeLongRunningOperationProperties - from .resource_py3 import Resource - from .update_resource_py3 import UpdateResource - from .operation_status_response_py3 import OperationStatusResponse + from ._models_py3 import AdditionalUnattendContent + from ._models_py3 import ApiEntityReference + from ._models_py3 import ApiError + from ._models_py3 import ApiErrorBase + from ._models_py3 import AvailabilitySet + from ._models_py3 import BootDiagnostics + from ._models_py3 import BootDiagnosticsInstanceView + from ._models_py3 import ComputeLongRunningOperationProperties + from ._models_py3 import DataDisk + from ._models_py3 import DataDiskImage + from ._models_py3 import DiagnosticsProfile + from ._models_py3 import DiskEncryptionSettings + from ._models_py3 import DiskInstanceView + from ._models_py3 import HardwareProfile + from ._models_py3 import ImageReference + from ._models_py3 import InnerError + from ._models_py3 import InstanceViewStatus + from ._models_py3 import KeyVaultKeyReference + from ._models_py3 import KeyVaultSecretReference + from ._models_py3 import LinuxConfiguration + from ._models_py3 import NetworkInterfaceReference + from ._models_py3 import NetworkProfile + from ._models_py3 import OperationStatusResponse + from ._models_py3 import OSDisk + from ._models_py3 import OSDiskImage + from ._models_py3 import OSProfile + from ._models_py3 import Plan + from ._models_py3 import PurchasePlan + from ._models_py3 import Resource + from ._models_py3 import Sku + from ._models_py3 import SshConfiguration + from ._models_py3 import SshPublicKey + from ._models_py3 import StorageProfile + from ._models_py3 import SubResource + from ._models_py3 import UpdateResource + from ._models_py3 import UpgradePolicy + from ._models_py3 import Usage + from ._models_py3 import UsageName + from ._models_py3 import VaultCertificate + from ._models_py3 import VaultSecretGroup + from ._models_py3 import VirtualHardDisk + from ._models_py3 import VirtualMachine + from ._models_py3 import VirtualMachineAgentInstanceView + from ._models_py3 import VirtualMachineCaptureParameters + from ._models_py3 import VirtualMachineCaptureResult + from ._models_py3 import VirtualMachineExtension + from ._models_py3 import VirtualMachineExtensionHandlerInstanceView + from ._models_py3 import VirtualMachineExtensionImage + from ._models_py3 import VirtualMachineExtensionInstanceView + from ._models_py3 import VirtualMachineExtensionUpdate + from ._models_py3 import VirtualMachineImage + from ._models_py3 import VirtualMachineImageResource + from ._models_py3 import VirtualMachineInstanceView + from ._models_py3 import VirtualMachineScaleSet + from ._models_py3 import VirtualMachineScaleSetExtension + from ._models_py3 import VirtualMachineScaleSetExtensionProfile + from ._models_py3 import VirtualMachineScaleSetInstanceView + from ._models_py3 import VirtualMachineScaleSetInstanceViewStatusesSummary + from ._models_py3 import VirtualMachineScaleSetIPConfiguration + from ._models_py3 import VirtualMachineScaleSetNetworkConfiguration + from ._models_py3 import VirtualMachineScaleSetNetworkProfile + from ._models_py3 import VirtualMachineScaleSetOSDisk + from ._models_py3 import VirtualMachineScaleSetOSProfile + from ._models_py3 import VirtualMachineScaleSetSku + from ._models_py3 import VirtualMachineScaleSetSkuCapacity + from ._models_py3 import VirtualMachineScaleSetStorageProfile + from ._models_py3 import VirtualMachineScaleSetVM + from ._models_py3 import VirtualMachineScaleSetVMExtensionsSummary + from ._models_py3 import VirtualMachineScaleSetVMInstanceIDs + from ._models_py3 import VirtualMachineScaleSetVMInstanceRequiredIDs + from ._models_py3 import VirtualMachineScaleSetVMInstanceView + from ._models_py3 import VirtualMachineScaleSetVMProfile + from ._models_py3 import VirtualMachineSize + from ._models_py3 import VirtualMachineStatusCodeCount + from ._models_py3 import WindowsConfiguration + from ._models_py3 import WinRMConfiguration + from ._models_py3 import WinRMListener except (SyntaxError, ImportError): - from .instance_view_status import InstanceViewStatus - from .sub_resource import SubResource - from .availability_set import AvailabilitySet - from .virtual_machine_size import VirtualMachineSize - from .virtual_machine_extension_image import VirtualMachineExtensionImage - from .virtual_machine_image_resource import VirtualMachineImageResource - from .virtual_machine_extension_instance_view import VirtualMachineExtensionInstanceView - from .virtual_machine_extension import VirtualMachineExtension - from .virtual_machine_extension_update import VirtualMachineExtensionUpdate - from .purchase_plan import PurchasePlan - from .os_disk_image import OSDiskImage - from .data_disk_image import DataDiskImage - from .virtual_machine_image import VirtualMachineImage - from .usage_name import UsageName - from .usage import Usage - from .virtual_machine_capture_parameters import VirtualMachineCaptureParameters - from .virtual_machine_capture_result import VirtualMachineCaptureResult - from .plan import Plan - from .hardware_profile import HardwareProfile - from .image_reference import ImageReference - from .key_vault_secret_reference import KeyVaultSecretReference - from .key_vault_key_reference import KeyVaultKeyReference - from .disk_encryption_settings import DiskEncryptionSettings - from .virtual_hard_disk import VirtualHardDisk - from .os_disk import OSDisk - from .data_disk import DataDisk - from .storage_profile import StorageProfile - from .additional_unattend_content import AdditionalUnattendContent - from .win_rm_listener import WinRMListener - from .win_rm_configuration import WinRMConfiguration - from .windows_configuration import WindowsConfiguration - from .ssh_public_key import SshPublicKey - from .ssh_configuration import SshConfiguration - from .linux_configuration import LinuxConfiguration - from .vault_certificate import VaultCertificate - from .vault_secret_group import VaultSecretGroup - from .os_profile import OSProfile - from .network_interface_reference import NetworkInterfaceReference - from .network_profile import NetworkProfile - from .boot_diagnostics import BootDiagnostics - from .diagnostics_profile import DiagnosticsProfile - from .virtual_machine_extension_handler_instance_view import VirtualMachineExtensionHandlerInstanceView - from .virtual_machine_agent_instance_view import VirtualMachineAgentInstanceView - from .disk_instance_view import DiskInstanceView - from .boot_diagnostics_instance_view import BootDiagnosticsInstanceView - from .virtual_machine_instance_view import VirtualMachineInstanceView - from .virtual_machine import VirtualMachine - from .sku import Sku - from .upgrade_policy import UpgradePolicy - from .virtual_machine_scale_set_os_profile import VirtualMachineScaleSetOSProfile - from .virtual_machine_scale_set_os_disk import VirtualMachineScaleSetOSDisk - from .virtual_machine_scale_set_storage_profile import VirtualMachineScaleSetStorageProfile - from .api_entity_reference import ApiEntityReference - from .virtual_machine_scale_set_ip_configuration import VirtualMachineScaleSetIPConfiguration - from .virtual_machine_scale_set_network_configuration import VirtualMachineScaleSetNetworkConfiguration - from .virtual_machine_scale_set_network_profile import VirtualMachineScaleSetNetworkProfile - from .virtual_machine_scale_set_extension import VirtualMachineScaleSetExtension - from .virtual_machine_scale_set_extension_profile import VirtualMachineScaleSetExtensionProfile - from .virtual_machine_scale_set_vm_profile import VirtualMachineScaleSetVMProfile - from .virtual_machine_scale_set import VirtualMachineScaleSet - from .virtual_machine_scale_set_vm_instance_ids import VirtualMachineScaleSetVMInstanceIDs - from .virtual_machine_scale_set_vm_instance_required_ids import VirtualMachineScaleSetVMInstanceRequiredIDs - from .virtual_machine_status_code_count import VirtualMachineStatusCodeCount - from .virtual_machine_scale_set_instance_view_statuses_summary import VirtualMachineScaleSetInstanceViewStatusesSummary - from .virtual_machine_scale_set_vm_extensions_summary import VirtualMachineScaleSetVMExtensionsSummary - from .virtual_machine_scale_set_instance_view import VirtualMachineScaleSetInstanceView - from .virtual_machine_scale_set_sku_capacity import VirtualMachineScaleSetSkuCapacity - from .virtual_machine_scale_set_sku import VirtualMachineScaleSetSku - from .virtual_machine_scale_set_vm_instance_view import VirtualMachineScaleSetVMInstanceView - from .virtual_machine_scale_set_vm import VirtualMachineScaleSetVM - from .api_error_base import ApiErrorBase - from .inner_error import InnerError - from .api_error import ApiError - from .compute_long_running_operation_properties import ComputeLongRunningOperationProperties - from .resource import Resource - from .update_resource import UpdateResource - from .operation_status_response import OperationStatusResponse -from .availability_set_paged import AvailabilitySetPaged -from .virtual_machine_size_paged import VirtualMachineSizePaged -from .usage_paged import UsagePaged -from .virtual_machine_paged import VirtualMachinePaged -from .virtual_machine_scale_set_paged import VirtualMachineScaleSetPaged -from .virtual_machine_scale_set_sku_paged import VirtualMachineScaleSetSkuPaged -from .virtual_machine_scale_set_vm_paged import VirtualMachineScaleSetVMPaged -from .compute_management_client_enums import ( + from ._models import AdditionalUnattendContent + from ._models import ApiEntityReference + from ._models import ApiError + from ._models import ApiErrorBase + from ._models import AvailabilitySet + from ._models import BootDiagnostics + from ._models import BootDiagnosticsInstanceView + from ._models import ComputeLongRunningOperationProperties + from ._models import DataDisk + from ._models import DataDiskImage + from ._models import DiagnosticsProfile + from ._models import DiskEncryptionSettings + from ._models import DiskInstanceView + from ._models import HardwareProfile + from ._models import ImageReference + from ._models import InnerError + from ._models import InstanceViewStatus + from ._models import KeyVaultKeyReference + from ._models import KeyVaultSecretReference + from ._models import LinuxConfiguration + from ._models import NetworkInterfaceReference + from ._models import NetworkProfile + from ._models import OperationStatusResponse + from ._models import OSDisk + from ._models import OSDiskImage + from ._models import OSProfile + from ._models import Plan + from ._models import PurchasePlan + from ._models import Resource + from ._models import Sku + from ._models import SshConfiguration + from ._models import SshPublicKey + from ._models import StorageProfile + from ._models import SubResource + from ._models import UpdateResource + from ._models import UpgradePolicy + from ._models import Usage + from ._models import UsageName + from ._models import VaultCertificate + from ._models import VaultSecretGroup + from ._models import VirtualHardDisk + from ._models import VirtualMachine + from ._models import VirtualMachineAgentInstanceView + from ._models import VirtualMachineCaptureParameters + from ._models import VirtualMachineCaptureResult + from ._models import VirtualMachineExtension + from ._models import VirtualMachineExtensionHandlerInstanceView + from ._models import VirtualMachineExtensionImage + from ._models import VirtualMachineExtensionInstanceView + from ._models import VirtualMachineExtensionUpdate + from ._models import VirtualMachineImage + from ._models import VirtualMachineImageResource + from ._models import VirtualMachineInstanceView + from ._models import VirtualMachineScaleSet + from ._models import VirtualMachineScaleSetExtension + from ._models import VirtualMachineScaleSetExtensionProfile + from ._models import VirtualMachineScaleSetInstanceView + from ._models import VirtualMachineScaleSetInstanceViewStatusesSummary + from ._models import VirtualMachineScaleSetIPConfiguration + from ._models import VirtualMachineScaleSetNetworkConfiguration + from ._models import VirtualMachineScaleSetNetworkProfile + from ._models import VirtualMachineScaleSetOSDisk + from ._models import VirtualMachineScaleSetOSProfile + from ._models import VirtualMachineScaleSetSku + from ._models import VirtualMachineScaleSetSkuCapacity + from ._models import VirtualMachineScaleSetStorageProfile + from ._models import VirtualMachineScaleSetVM + from ._models import VirtualMachineScaleSetVMExtensionsSummary + from ._models import VirtualMachineScaleSetVMInstanceIDs + from ._models import VirtualMachineScaleSetVMInstanceRequiredIDs + from ._models import VirtualMachineScaleSetVMInstanceView + from ._models import VirtualMachineScaleSetVMProfile + from ._models import VirtualMachineSize + from ._models import VirtualMachineStatusCodeCount + from ._models import WindowsConfiguration + from ._models import WinRMConfiguration + from ._models import WinRMListener +from ._paged_models import AvailabilitySetPaged +from ._paged_models import UsagePaged +from ._paged_models import VirtualMachinePaged +from ._paged_models import VirtualMachineScaleSetPaged +from ._paged_models import VirtualMachineScaleSetSkuPaged +from ._paged_models import VirtualMachineScaleSetVMPaged +from ._paged_models import VirtualMachineSizePaged +from ._compute_management_client_enums import ( StatusLevelTypes, OperatingSystemTypes, VirtualMachineSizeTypes, @@ -188,83 +188,83 @@ ) __all__ = [ - 'InstanceViewStatus', - 'SubResource', + 'AdditionalUnattendContent', + 'ApiEntityReference', + 'ApiError', + 'ApiErrorBase', 'AvailabilitySet', - 'VirtualMachineSize', - 'VirtualMachineExtensionImage', - 'VirtualMachineImageResource', - 'VirtualMachineExtensionInstanceView', - 'VirtualMachineExtension', - 'VirtualMachineExtensionUpdate', - 'PurchasePlan', - 'OSDiskImage', + 'BootDiagnostics', + 'BootDiagnosticsInstanceView', + 'ComputeLongRunningOperationProperties', + 'DataDisk', 'DataDiskImage', - 'VirtualMachineImage', - 'UsageName', - 'Usage', - 'VirtualMachineCaptureParameters', - 'VirtualMachineCaptureResult', - 'Plan', + 'DiagnosticsProfile', + 'DiskEncryptionSettings', + 'DiskInstanceView', 'HardwareProfile', 'ImageReference', - 'KeyVaultSecretReference', + 'InnerError', + 'InstanceViewStatus', 'KeyVaultKeyReference', - 'DiskEncryptionSettings', - 'VirtualHardDisk', + 'KeyVaultSecretReference', + 'LinuxConfiguration', + 'NetworkInterfaceReference', + 'NetworkProfile', + 'OperationStatusResponse', 'OSDisk', - 'DataDisk', - 'StorageProfile', - 'AdditionalUnattendContent', - 'WinRMListener', - 'WinRMConfiguration', - 'WindowsConfiguration', - 'SshPublicKey', + 'OSDiskImage', + 'OSProfile', + 'Plan', + 'PurchasePlan', + 'Resource', + 'Sku', 'SshConfiguration', - 'LinuxConfiguration', + 'SshPublicKey', + 'StorageProfile', + 'SubResource', + 'UpdateResource', + 'UpgradePolicy', + 'Usage', + 'UsageName', 'VaultCertificate', 'VaultSecretGroup', - 'OSProfile', - 'NetworkInterfaceReference', - 'NetworkProfile', - 'BootDiagnostics', - 'DiagnosticsProfile', - 'VirtualMachineExtensionHandlerInstanceView', + 'VirtualHardDisk', + 'VirtualMachine', 'VirtualMachineAgentInstanceView', - 'DiskInstanceView', - 'BootDiagnosticsInstanceView', + 'VirtualMachineCaptureParameters', + 'VirtualMachineCaptureResult', + 'VirtualMachineExtension', + 'VirtualMachineExtensionHandlerInstanceView', + 'VirtualMachineExtensionImage', + 'VirtualMachineExtensionInstanceView', + 'VirtualMachineExtensionUpdate', + 'VirtualMachineImage', + 'VirtualMachineImageResource', 'VirtualMachineInstanceView', - 'VirtualMachine', - 'Sku', - 'UpgradePolicy', - 'VirtualMachineScaleSetOSProfile', - 'VirtualMachineScaleSetOSDisk', - 'VirtualMachineScaleSetStorageProfile', - 'ApiEntityReference', + 'VirtualMachineScaleSet', + 'VirtualMachineScaleSetExtension', + 'VirtualMachineScaleSetExtensionProfile', + 'VirtualMachineScaleSetInstanceView', + 'VirtualMachineScaleSetInstanceViewStatusesSummary', 'VirtualMachineScaleSetIPConfiguration', 'VirtualMachineScaleSetNetworkConfiguration', 'VirtualMachineScaleSetNetworkProfile', - 'VirtualMachineScaleSetExtension', - 'VirtualMachineScaleSetExtensionProfile', - 'VirtualMachineScaleSetVMProfile', - 'VirtualMachineScaleSet', + 'VirtualMachineScaleSetOSDisk', + 'VirtualMachineScaleSetOSProfile', + 'VirtualMachineScaleSetSku', + 'VirtualMachineScaleSetSkuCapacity', + 'VirtualMachineScaleSetStorageProfile', + 'VirtualMachineScaleSetVM', + 'VirtualMachineScaleSetVMExtensionsSummary', 'VirtualMachineScaleSetVMInstanceIDs', 'VirtualMachineScaleSetVMInstanceRequiredIDs', - 'VirtualMachineStatusCodeCount', - 'VirtualMachineScaleSetInstanceViewStatusesSummary', - 'VirtualMachineScaleSetVMExtensionsSummary', - 'VirtualMachineScaleSetInstanceView', - 'VirtualMachineScaleSetSkuCapacity', - 'VirtualMachineScaleSetSku', 'VirtualMachineScaleSetVMInstanceView', - 'VirtualMachineScaleSetVM', - 'ApiErrorBase', - 'InnerError', - 'ApiError', - 'ComputeLongRunningOperationProperties', - 'Resource', - 'UpdateResource', - 'OperationStatusResponse', + 'VirtualMachineScaleSetVMProfile', + 'VirtualMachineSize', + 'VirtualMachineStatusCodeCount', + 'WindowsConfiguration', + 'WinRMConfiguration', + 'WinRMListener', 'AvailabilitySetPaged', 'VirtualMachineSizePaged', 'UsagePaged', diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/compute_management_client_enums.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/_compute_management_client_enums.py similarity index 100% rename from sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/compute_management_client_enums.py rename to sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/_compute_management_client_enums.py diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/_models.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/_models.py new file mode 100644 index 000000000000..05bf39c9a37d --- /dev/null +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/_models.py @@ -0,0 +1,2909 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class AdditionalUnattendContent(Model): + """Specifies additional XML formatted information that can be included in the + Unattend.xml file, which is used by Windows Setup. Contents are defined by + setting name, component name, and the pass in which the content is applied. + + :param pass_name: The pass name. Currently, the only allowable value is + OobeSystem. Possible values include: 'OobeSystem' + :type pass_name: str or ~azure.mgmt.compute.v2015_06_15.models.PassNames + :param component_name: The component name. Currently, the only allowable + value is Microsoft-Windows-Shell-Setup. Possible values include: + 'Microsoft-Windows-Shell-Setup' + :type component_name: str or + ~azure.mgmt.compute.v2015_06_15.models.ComponentNames + :param setting_name: Specifies the name of the setting to which the + content applies. Possible values are: FirstLogonCommands and AutoLogon. + Possible values include: 'AutoLogon', 'FirstLogonCommands' + :type setting_name: str or + ~azure.mgmt.compute.v2015_06_15.models.SettingNames + :param content: Specifies the XML formatted content that is added to the + unattend.xml file for the specified path and component. The XML must be + less than 4KB and must include the root element for the setting or feature + that is being inserted. + :type content: str + """ + + _attribute_map = { + 'pass_name': {'key': 'passName', 'type': 'PassNames'}, + 'component_name': {'key': 'componentName', 'type': 'ComponentNames'}, + 'setting_name': {'key': 'settingName', 'type': 'SettingNames'}, + 'content': {'key': 'content', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(AdditionalUnattendContent, self).__init__(**kwargs) + self.pass_name = kwargs.get('pass_name', None) + self.component_name = kwargs.get('component_name', None) + self.setting_name = kwargs.get('setting_name', None) + self.content = kwargs.get('content', None) + + +class ApiEntityReference(Model): + """The API entity reference. + + :param id: The ARM resource id in the form of + /subscriptions/{SubscriptionId}/resourceGroups/{ResourceGroupName}/... + :type id: str + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ApiEntityReference, self).__init__(**kwargs) + self.id = kwargs.get('id', None) + + +class ApiError(Model): + """Api error. + + :param details: The Api error details + :type details: list[~azure.mgmt.compute.v2015_06_15.models.ApiErrorBase] + :param innererror: The Api inner error + :type innererror: ~azure.mgmt.compute.v2015_06_15.models.InnerError + :param code: The error code. + :type code: str + :param target: The target of the particular error. + :type target: str + :param message: The error message. + :type message: str + """ + + _attribute_map = { + 'details': {'key': 'details', 'type': '[ApiErrorBase]'}, + 'innererror': {'key': 'innererror', 'type': 'InnerError'}, + 'code': {'key': 'code', 'type': 'str'}, + 'target': {'key': 'target', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ApiError, self).__init__(**kwargs) + self.details = kwargs.get('details', None) + self.innererror = kwargs.get('innererror', None) + self.code = kwargs.get('code', None) + self.target = kwargs.get('target', None) + self.message = kwargs.get('message', None) + + +class ApiErrorBase(Model): + """Api error base. + + :param code: The error code. + :type code: str + :param target: The target of the particular error. + :type target: str + :param message: The error message. + :type message: str + """ + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + 'target': {'key': 'target', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ApiErrorBase, self).__init__(**kwargs) + self.code = kwargs.get('code', None) + self.target = kwargs.get('target', None) + self.message = kwargs.get('message', None) + + +class Resource(Model): + """The Resource model definition. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource Id + :vartype id: str + :ivar name: Resource name + :vartype name: str + :ivar type: Resource type + :vartype type: str + :param location: Required. Resource location + :type location: str + :param tags: Resource tags + :type tags: dict[str, str] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__(self, **kwargs): + super(Resource, self).__init__(**kwargs) + self.id = None + self.name = None + self.type = None + self.location = kwargs.get('location', None) + self.tags = kwargs.get('tags', None) + + +class AvailabilitySet(Resource): + """Specifies information about the availability set that the virtual machine + should be assigned to. Virtual machines specified in the same availability + set are allocated to different nodes to maximize availability. For more + information about availability sets, see [Manage the availability of + virtual + machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-manage-availability?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). +

For more information on Azure planned maintenance, see [Planned + maintenance for virtual machines in + Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-planned-maintenance?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json) +

Currently, a VM can only be added to availability set at creation + time. An existing VM cannot be added to an availability set. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource Id + :vartype id: str + :ivar name: Resource name + :vartype name: str + :ivar type: Resource type + :vartype type: str + :param location: Required. Resource location + :type location: str + :param tags: Resource tags + :type tags: dict[str, str] + :param platform_update_domain_count: Update Domain count. + :type platform_update_domain_count: int + :param platform_fault_domain_count: Fault Domain count. + :type platform_fault_domain_count: int + :param virtual_machines: A list of references to all virtual machines in + the availability set. + :type virtual_machines: + list[~azure.mgmt.compute.v2015_06_15.models.SubResource] + :ivar statuses: The resource status information. + :vartype statuses: + list[~azure.mgmt.compute.v2015_06_15.models.InstanceViewStatus] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + 'statuses': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'platform_update_domain_count': {'key': 'properties.platformUpdateDomainCount', 'type': 'int'}, + 'platform_fault_domain_count': {'key': 'properties.platformFaultDomainCount', 'type': 'int'}, + 'virtual_machines': {'key': 'properties.virtualMachines', 'type': '[SubResource]'}, + 'statuses': {'key': 'properties.statuses', 'type': '[InstanceViewStatus]'}, + } + + def __init__(self, **kwargs): + super(AvailabilitySet, self).__init__(**kwargs) + self.platform_update_domain_count = kwargs.get('platform_update_domain_count', None) + self.platform_fault_domain_count = kwargs.get('platform_fault_domain_count', None) + self.virtual_machines = kwargs.get('virtual_machines', None) + self.statuses = None + + +class BootDiagnostics(Model): + """Boot Diagnostics is a debugging feature which allows you to view Console + Output and Screenshot to diagnose VM status.

You can easily view + the output of your console log.

Azure also enables you to see a + screenshot of the VM from the hypervisor. + + :param enabled: Whether boot diagnostics should be enabled on the Virtual + Machine. + :type enabled: bool + :param storage_uri: Uri of the storage account to use for placing the + console output and screenshot. + :type storage_uri: str + """ + + _attribute_map = { + 'enabled': {'key': 'enabled', 'type': 'bool'}, + 'storage_uri': {'key': 'storageUri', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(BootDiagnostics, self).__init__(**kwargs) + self.enabled = kwargs.get('enabled', None) + self.storage_uri = kwargs.get('storage_uri', None) + + +class BootDiagnosticsInstanceView(Model): + """The instance view of a virtual machine boot diagnostics. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar console_screenshot_blob_uri: The console screenshot blob URI. + :vartype console_screenshot_blob_uri: str + :ivar serial_console_log_blob_uri: The Linux serial console log blob Uri. + :vartype serial_console_log_blob_uri: str + """ + + _validation = { + 'console_screenshot_blob_uri': {'readonly': True}, + 'serial_console_log_blob_uri': {'readonly': True}, + } + + _attribute_map = { + 'console_screenshot_blob_uri': {'key': 'consoleScreenshotBlobUri', 'type': 'str'}, + 'serial_console_log_blob_uri': {'key': 'serialConsoleLogBlobUri', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(BootDiagnosticsInstanceView, self).__init__(**kwargs) + self.console_screenshot_blob_uri = None + self.serial_console_log_blob_uri = None + + +class CloudError(Model): + """CloudError. + """ + + _attribute_map = { + } + + +class ComputeLongRunningOperationProperties(Model): + """Compute-specific operation properties, including output. + + :param output: Operation output data (raw JSON) + :type output: object + """ + + _attribute_map = { + 'output': {'key': 'output', 'type': 'object'}, + } + + def __init__(self, **kwargs): + super(ComputeLongRunningOperationProperties, self).__init__(**kwargs) + self.output = kwargs.get('output', None) + + +class DataDisk(Model): + """Describes a data disk. + + All required parameters must be populated in order to send to Azure. + + :param lun: Required. Specifies the logical unit number of the data disk. + This value is used to identify data disks within the VM and therefore must + be unique for each data disk attached to a VM. + :type lun: int + :param name: Required. The disk name. + :type name: str + :param vhd: Required. The virtual hard disk. + :type vhd: ~azure.mgmt.compute.v2015_06_15.models.VirtualHardDisk + :param image: The source user image virtual hard disk. The virtual hard + disk will be copied before being attached to the virtual machine. If + SourceImage is provided, the destination virtual hard drive must not + exist. + :type image: ~azure.mgmt.compute.v2015_06_15.models.VirtualHardDisk + :param caching: Specifies the caching requirements.

Possible + values are:

**None**

**ReadOnly**

**ReadWrite** +

Default: **None for Standard storage. ReadOnly for Premium + storage**. Possible values include: 'None', 'ReadOnly', 'ReadWrite' + :type caching: str or ~azure.mgmt.compute.v2015_06_15.models.CachingTypes + :param create_option: Required. Specifies how the virtual machine should + be created.

Possible values are:

**Attach** \\u2013 This + value is used when you are using a specialized disk to create the virtual + machine.

**FromImage** \\u2013 This value is used when you are + using an image to create the virtual machine. If you are using a platform + image, you also use the imageReference element described above. If you are + using a marketplace image, you also use the plan element previously + described. Possible values include: 'FromImage', 'Empty', 'Attach' + :type create_option: str or + ~azure.mgmt.compute.v2015_06_15.models.DiskCreateOptionTypes + :param disk_size_gb: Specifies the size of an empty data disk in + gigabytes. This element can be used to overwrite the size of the disk in a + virtual machine image.

This value cannot be larger than 1023 GB + :type disk_size_gb: int + """ + + _validation = { + 'lun': {'required': True}, + 'name': {'required': True}, + 'vhd': {'required': True}, + 'create_option': {'required': True}, + } + + _attribute_map = { + 'lun': {'key': 'lun', 'type': 'int'}, + 'name': {'key': 'name', 'type': 'str'}, + 'vhd': {'key': 'vhd', 'type': 'VirtualHardDisk'}, + 'image': {'key': 'image', 'type': 'VirtualHardDisk'}, + 'caching': {'key': 'caching', 'type': 'CachingTypes'}, + 'create_option': {'key': 'createOption', 'type': 'DiskCreateOptionTypes'}, + 'disk_size_gb': {'key': 'diskSizeGB', 'type': 'int'}, + } + + def __init__(self, **kwargs): + super(DataDisk, self).__init__(**kwargs) + self.lun = kwargs.get('lun', None) + self.name = kwargs.get('name', None) + self.vhd = kwargs.get('vhd', None) + self.image = kwargs.get('image', None) + self.caching = kwargs.get('caching', None) + self.create_option = kwargs.get('create_option', None) + self.disk_size_gb = kwargs.get('disk_size_gb', None) + + +class DataDiskImage(Model): + """Contains the data disk images information. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar lun: Specifies the logical unit number of the data disk. This value + is used to identify data disks within the VM and therefore must be unique + for each data disk attached to a VM. + :vartype lun: int + """ + + _validation = { + 'lun': {'readonly': True}, + } + + _attribute_map = { + 'lun': {'key': 'lun', 'type': 'int'}, + } + + def __init__(self, **kwargs): + super(DataDiskImage, self).__init__(**kwargs) + self.lun = None + + +class DiagnosticsProfile(Model): + """Specifies the boot diagnostic settings state.

Minimum api-version: + 2015-06-15. + + :param boot_diagnostics: Boot Diagnostics is a debugging feature which + allows you to view Console Output and Screenshot to diagnose VM status. +

You can easily view the output of your console log.

+ Azure also enables you to see a screenshot of the VM from the hypervisor. + :type boot_diagnostics: + ~azure.mgmt.compute.v2015_06_15.models.BootDiagnostics + """ + + _attribute_map = { + 'boot_diagnostics': {'key': 'bootDiagnostics', 'type': 'BootDiagnostics'}, + } + + def __init__(self, **kwargs): + super(DiagnosticsProfile, self).__init__(**kwargs) + self.boot_diagnostics = kwargs.get('boot_diagnostics', None) + + +class DiskEncryptionSettings(Model): + """Describes a Encryption Settings for a Disk. + + All required parameters must be populated in order to send to Azure. + + :param disk_encryption_key: Required. Specifies the location of the disk + encryption key, which is a Key Vault Secret. + :type disk_encryption_key: + ~azure.mgmt.compute.v2015_06_15.models.KeyVaultSecretReference + :param key_encryption_key: Specifies the location of the key encryption + key in Key Vault. + :type key_encryption_key: + ~azure.mgmt.compute.v2015_06_15.models.KeyVaultKeyReference + :param enabled: Specifies whether disk encryption should be enabled on the + virtual machine. + :type enabled: bool + """ + + _validation = { + 'disk_encryption_key': {'required': True}, + } + + _attribute_map = { + 'disk_encryption_key': {'key': 'diskEncryptionKey', 'type': 'KeyVaultSecretReference'}, + 'key_encryption_key': {'key': 'keyEncryptionKey', 'type': 'KeyVaultKeyReference'}, + 'enabled': {'key': 'enabled', 'type': 'bool'}, + } + + def __init__(self, **kwargs): + super(DiskEncryptionSettings, self).__init__(**kwargs) + self.disk_encryption_key = kwargs.get('disk_encryption_key', None) + self.key_encryption_key = kwargs.get('key_encryption_key', None) + self.enabled = kwargs.get('enabled', None) + + +class DiskInstanceView(Model): + """The instance view of the disk. + + :param name: The disk name. + :type name: str + :param statuses: The resource status information. + :type statuses: + list[~azure.mgmt.compute.v2015_06_15.models.InstanceViewStatus] + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'statuses': {'key': 'statuses', 'type': '[InstanceViewStatus]'}, + } + + def __init__(self, **kwargs): + super(DiskInstanceView, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.statuses = kwargs.get('statuses', None) + + +class HardwareProfile(Model): + """Specifies the hardware settings for the virtual machine. + + :param vm_size: Specifies the size of the virtual machine. For more + information about virtual machine sizes, see [Sizes for virtual + machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-sizes?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). +

The available VM sizes depend on region and availability set. For + a list of available sizes use these APIs:

[List all available + virtual machine sizes in an availability + set](https://docs.microsoft.com/rest/api/compute/availabilitysets/listavailablesizes) +

[List all available virtual machine sizes in a + region](https://docs.microsoft.com/rest/api/compute/virtualmachinesizes/list) +

[List all available virtual machine sizes for + resizing](https://docs.microsoft.com/rest/api/compute/virtualmachines/listavailablesizes). + Possible values include: 'Basic_A0', 'Basic_A1', 'Basic_A2', 'Basic_A3', + 'Basic_A4', 'Standard_A0', 'Standard_A1', 'Standard_A2', 'Standard_A3', + 'Standard_A4', 'Standard_A5', 'Standard_A6', 'Standard_A7', 'Standard_A8', + 'Standard_A9', 'Standard_A10', 'Standard_A11', 'Standard_D1', + 'Standard_D2', 'Standard_D3', 'Standard_D4', 'Standard_D11', + 'Standard_D12', 'Standard_D13', 'Standard_D14', 'Standard_D1_v2', + 'Standard_D2_v2', 'Standard_D3_v2', 'Standard_D4_v2', 'Standard_D5_v2', + 'Standard_D11_v2', 'Standard_D12_v2', 'Standard_D13_v2', + 'Standard_D14_v2', 'Standard_DS1', 'Standard_DS2', 'Standard_DS3', + 'Standard_DS4', 'Standard_DS11', 'Standard_DS12', 'Standard_DS13', + 'Standard_DS14', 'Standard_G1', 'Standard_G2', 'Standard_G3', + 'Standard_G4', 'Standard_G5', 'Standard_GS1', 'Standard_GS2', + 'Standard_GS3', 'Standard_GS4', 'Standard_GS5' + :type vm_size: str or + ~azure.mgmt.compute.v2015_06_15.models.VirtualMachineSizeTypes + """ + + _attribute_map = { + 'vm_size': {'key': 'vmSize', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(HardwareProfile, self).__init__(**kwargs) + self.vm_size = kwargs.get('vm_size', None) + + +class ImageReference(Model): + """Specifies information about the image to use. You can specify information + about platform images, marketplace images, or virtual machine images. This + element is required when you want to use a platform image, marketplace + image, or virtual machine image, but is not used in other creation + operations. + + :param publisher: The image publisher. + :type publisher: str + :param offer: Specifies the offer of the platform image or marketplace + image used to create the virtual machine. + :type offer: str + :param sku: The image SKU. + :type sku: str + :param version: Specifies the version of the platform image or marketplace + image used to create the virtual machine. The allowed formats are + Major.Minor.Build or 'latest'. Major, Minor, and Build are decimal + numbers. Specify 'latest' to use the latest version of an image available + at deploy time. Even if you use 'latest', the VM image will not + automatically update after deploy time even if a new version becomes + available. + :type version: str + """ + + _attribute_map = { + 'publisher': {'key': 'publisher', 'type': 'str'}, + 'offer': {'key': 'offer', 'type': 'str'}, + 'sku': {'key': 'sku', 'type': 'str'}, + 'version': {'key': 'version', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ImageReference, self).__init__(**kwargs) + self.publisher = kwargs.get('publisher', None) + self.offer = kwargs.get('offer', None) + self.sku = kwargs.get('sku', None) + self.version = kwargs.get('version', None) + + +class InnerError(Model): + """Inner error details. + + :param exceptiontype: The exception type. + :type exceptiontype: str + :param errordetail: The internal error message or exception dump. + :type errordetail: str + """ + + _attribute_map = { + 'exceptiontype': {'key': 'exceptiontype', 'type': 'str'}, + 'errordetail': {'key': 'errordetail', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(InnerError, self).__init__(**kwargs) + self.exceptiontype = kwargs.get('exceptiontype', None) + self.errordetail = kwargs.get('errordetail', None) + + +class InstanceViewStatus(Model): + """Instance view status. + + :param code: The status code. + :type code: str + :param level: The level code. Possible values include: 'Info', 'Warning', + 'Error' + :type level: str or + ~azure.mgmt.compute.v2015_06_15.models.StatusLevelTypes + :param display_status: The short localizable label for the status. + :type display_status: str + :param message: The detailed status message, including for alerts and + error messages. + :type message: str + :param time: The time of the status. + :type time: datetime + """ + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + 'level': {'key': 'level', 'type': 'StatusLevelTypes'}, + 'display_status': {'key': 'displayStatus', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + 'time': {'key': 'time', 'type': 'iso-8601'}, + } + + def __init__(self, **kwargs): + super(InstanceViewStatus, self).__init__(**kwargs) + self.code = kwargs.get('code', None) + self.level = kwargs.get('level', None) + self.display_status = kwargs.get('display_status', None) + self.message = kwargs.get('message', None) + self.time = kwargs.get('time', None) + + +class KeyVaultKeyReference(Model): + """Describes a reference to Key Vault Key. + + All required parameters must be populated in order to send to Azure. + + :param key_url: Required. The URL referencing a key encryption key in Key + Vault. + :type key_url: str + :param source_vault: Required. The relative URL of the Key Vault + containing the key. + :type source_vault: ~azure.mgmt.compute.v2015_06_15.models.SubResource + """ + + _validation = { + 'key_url': {'required': True}, + 'source_vault': {'required': True}, + } + + _attribute_map = { + 'key_url': {'key': 'keyUrl', 'type': 'str'}, + 'source_vault': {'key': 'sourceVault', 'type': 'SubResource'}, + } + + def __init__(self, **kwargs): + super(KeyVaultKeyReference, self).__init__(**kwargs) + self.key_url = kwargs.get('key_url', None) + self.source_vault = kwargs.get('source_vault', None) + + +class KeyVaultSecretReference(Model): + """Describes a reference to Key Vault Secret. + + All required parameters must be populated in order to send to Azure. + + :param secret_url: Required. The URL referencing a secret in a Key Vault. + :type secret_url: str + :param source_vault: Required. The relative URL of the Key Vault + containing the secret. + :type source_vault: ~azure.mgmt.compute.v2015_06_15.models.SubResource + """ + + _validation = { + 'secret_url': {'required': True}, + 'source_vault': {'required': True}, + } + + _attribute_map = { + 'secret_url': {'key': 'secretUrl', 'type': 'str'}, + 'source_vault': {'key': 'sourceVault', 'type': 'SubResource'}, + } + + def __init__(self, **kwargs): + super(KeyVaultSecretReference, self).__init__(**kwargs) + self.secret_url = kwargs.get('secret_url', None) + self.source_vault = kwargs.get('source_vault', None) + + +class LinuxConfiguration(Model): + """Specifies the Linux operating system settings on the virtual machine. +

For a list of supported Linux distributions, see [Linux on + Azure-Endorsed + Distributions](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-endorsed-distros?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json) +

For running non-endorsed distributions, see [Information for + Non-Endorsed + Distributions](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-create-upload-generic?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json). + + :param disable_password_authentication: Specifies whether password + authentication should be disabled. + :type disable_password_authentication: bool + :param ssh: Specifies the ssh key configuration for a Linux OS. + :type ssh: ~azure.mgmt.compute.v2015_06_15.models.SshConfiguration + """ + + _attribute_map = { + 'disable_password_authentication': {'key': 'disablePasswordAuthentication', 'type': 'bool'}, + 'ssh': {'key': 'ssh', 'type': 'SshConfiguration'}, + } + + def __init__(self, **kwargs): + super(LinuxConfiguration, self).__init__(**kwargs) + self.disable_password_authentication = kwargs.get('disable_password_authentication', None) + self.ssh = kwargs.get('ssh', None) + + +class SubResource(Model): + """SubResource. + + :param id: Resource Id + :type id: str + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(SubResource, self).__init__(**kwargs) + self.id = kwargs.get('id', None) + + +class NetworkInterfaceReference(SubResource): + """Describes a network interface reference. + + :param id: Resource Id + :type id: str + :param primary: Specifies the primary network interface in case the + virtual machine has more than 1 network interface. + :type primary: bool + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'primary': {'key': 'properties.primary', 'type': 'bool'}, + } + + def __init__(self, **kwargs): + super(NetworkInterfaceReference, self).__init__(**kwargs) + self.primary = kwargs.get('primary', None) + + +class NetworkProfile(Model): + """Specifies the network interfaces of the virtual machine. + + :param network_interfaces: Specifies the list of resource Ids for the + network interfaces associated with the virtual machine. + :type network_interfaces: + list[~azure.mgmt.compute.v2015_06_15.models.NetworkInterfaceReference] + """ + + _attribute_map = { + 'network_interfaces': {'key': 'networkInterfaces', 'type': '[NetworkInterfaceReference]'}, + } + + def __init__(self, **kwargs): + super(NetworkProfile, self).__init__(**kwargs) + self.network_interfaces = kwargs.get('network_interfaces', None) + + +class OperationStatusResponse(Model): + """Operation status response. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar name: Operation ID + :vartype name: str + :ivar status: Operation status + :vartype status: str + :ivar start_time: Start time of the operation + :vartype start_time: datetime + :ivar end_time: End time of the operation + :vartype end_time: datetime + :ivar error: Api error + :vartype error: ~azure.mgmt.compute.v2015_06_15.models.ApiError + """ + + _validation = { + 'name': {'readonly': True}, + 'status': {'readonly': True}, + 'start_time': {'readonly': True}, + 'end_time': {'readonly': True}, + 'error': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'status': {'key': 'status', 'type': 'str'}, + 'start_time': {'key': 'startTime', 'type': 'iso-8601'}, + 'end_time': {'key': 'endTime', 'type': 'iso-8601'}, + 'error': {'key': 'error', 'type': 'ApiError'}, + } + + def __init__(self, **kwargs): + super(OperationStatusResponse, self).__init__(**kwargs) + self.name = None + self.status = None + self.start_time = None + self.end_time = None + self.error = None + + +class OSDisk(Model): + """Specifies information about the operating system disk used by the virtual + machine.

For more information about disks, see [About disks and + VHDs for Azure virtual + machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-about-disks-vhds?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). + + All required parameters must be populated in order to send to Azure. + + :param os_type: This property allows you to specify the type of the OS + that is included in the disk if creating a VM from user-image or a + specialized VHD.

Possible values are:

**Windows** +

**Linux**. Possible values include: 'Windows', 'Linux' + :type os_type: str or + ~azure.mgmt.compute.v2015_06_15.models.OperatingSystemTypes + :param encryption_settings: Specifies the encryption settings for the OS + Disk.

Minimum api-version: 2015-06-15 + :type encryption_settings: + ~azure.mgmt.compute.v2015_06_15.models.DiskEncryptionSettings + :param name: Required. The disk name. + :type name: str + :param vhd: Required. The virtual hard disk. + :type vhd: ~azure.mgmt.compute.v2015_06_15.models.VirtualHardDisk + :param image: The source user image virtual hard disk. The virtual hard + disk will be copied before being attached to the virtual machine. If + SourceImage is provided, the destination virtual hard drive must not + exist. + :type image: ~azure.mgmt.compute.v2015_06_15.models.VirtualHardDisk + :param caching: Specifies the caching requirements.

Possible + values are:

**None**

**ReadOnly**

**ReadWrite** +

Default: **None for Standard storage. ReadOnly for Premium + storage**. Possible values include: 'None', 'ReadOnly', 'ReadWrite' + :type caching: str or ~azure.mgmt.compute.v2015_06_15.models.CachingTypes + :param create_option: Required. Specifies how the virtual machine should + be created.

Possible values are:

**Attach** \\u2013 This + value is used when you are using a specialized disk to create the virtual + machine.

**FromImage** \\u2013 This value is used when you are + using an image to create the virtual machine. If you are using a platform + image, you also use the imageReference element described above. If you are + using a marketplace image, you also use the plan element previously + described. Possible values include: 'FromImage', 'Empty', 'Attach' + :type create_option: str or + ~azure.mgmt.compute.v2015_06_15.models.DiskCreateOptionTypes + :param disk_size_gb: Specifies the size of an empty data disk in + gigabytes. This element can be used to overwrite the size of the disk in a + virtual machine image.

This value cannot be larger than 1023 GB + :type disk_size_gb: int + """ + + _validation = { + 'name': {'required': True}, + 'vhd': {'required': True}, + 'create_option': {'required': True}, + } + + _attribute_map = { + 'os_type': {'key': 'osType', 'type': 'OperatingSystemTypes'}, + 'encryption_settings': {'key': 'encryptionSettings', 'type': 'DiskEncryptionSettings'}, + 'name': {'key': 'name', 'type': 'str'}, + 'vhd': {'key': 'vhd', 'type': 'VirtualHardDisk'}, + 'image': {'key': 'image', 'type': 'VirtualHardDisk'}, + 'caching': {'key': 'caching', 'type': 'CachingTypes'}, + 'create_option': {'key': 'createOption', 'type': 'DiskCreateOptionTypes'}, + 'disk_size_gb': {'key': 'diskSizeGB', 'type': 'int'}, + } + + def __init__(self, **kwargs): + super(OSDisk, self).__init__(**kwargs) + self.os_type = kwargs.get('os_type', None) + self.encryption_settings = kwargs.get('encryption_settings', None) + self.name = kwargs.get('name', None) + self.vhd = kwargs.get('vhd', None) + self.image = kwargs.get('image', None) + self.caching = kwargs.get('caching', None) + self.create_option = kwargs.get('create_option', None) + self.disk_size_gb = kwargs.get('disk_size_gb', None) + + +class OSDiskImage(Model): + """Contains the os disk image information. + + All required parameters must be populated in order to send to Azure. + + :param operating_system: Required. The operating system of the + osDiskImage. Possible values include: 'Windows', 'Linux' + :type operating_system: str or + ~azure.mgmt.compute.v2015_06_15.models.OperatingSystemTypes + """ + + _validation = { + 'operating_system': {'required': True}, + } + + _attribute_map = { + 'operating_system': {'key': 'operatingSystem', 'type': 'OperatingSystemTypes'}, + } + + def __init__(self, **kwargs): + super(OSDiskImage, self).__init__(**kwargs) + self.operating_system = kwargs.get('operating_system', None) + + +class OSProfile(Model): + """Specifies the operating system settings for the virtual machine. + + :param computer_name: Specifies the host OS name of the virtual machine. +

This name cannot be updated after the VM is created.

+ **Max-length (Windows):** 15 characters

**Max-length (Linux):** + 64 characters.

For naming conventions and restrictions see [Azure + infrastructure services implementation + guidelines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-infrastructure-subscription-accounts-guidelines?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json#1-naming-conventions). + :type computer_name: str + :param admin_username: Specifies the name of the administrator account. +

**Windows-only restriction:** Cannot end in "."

+ **Disallowed values:** "administrator", "admin", "user", "user1", "test", + "user2", "test1", "user3", "admin1", "1", "123", "a", "actuser", "adm", + "admin2", "aspnet", "backup", "console", "david", "guest", "john", + "owner", "root", "server", "sql", "support", "support_388945a0", "sys", + "test2", "test3", "user4", "user5".

**Minimum-length (Linux):** 1 + character

**Max-length (Linux):** 64 characters

+ **Max-length (Windows):** 20 characters

  • For root access to + the Linux VM, see [Using root privileges on Linux virtual machines in + Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-use-root-privileges?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json)
  • + For a list of built-in system users on Linux that should not be used in + this field, see [Selecting User Names for Linux on + Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-usernames?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json) + :type admin_username: str + :param admin_password: Specifies the password of the administrator + account.

    **Minimum-length (Windows):** 8 characters

    + **Minimum-length (Linux):** 6 characters

    **Max-length + (Windows):** 123 characters

    **Max-length (Linux):** 72 characters +

    **Complexity requirements:** 3 out of 4 conditions below need to + be fulfilled
    Has lower characters
    Has upper characters
    Has a + digit
    Has a special character (Regex match [\\W_])

    + **Disallowed values:** "abc@123", "P@$$w0rd", "P@ssw0rd", "P@ssword123", + "Pa$$word", "pass@word1", "Password!", "Password1", "Password22", + "iloveyou!"

    For resetting the password, see [How to reset the + Remote Desktop service or its login password in a Windows + VM](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-reset-rdp?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json) +

    For resetting root password, see [Manage users, SSH, and check or + repair disks on Azure Linux VMs using the VMAccess + Extension](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-using-vmaccess-extension?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json#reset-root-password) + :type admin_password: str + :param custom_data: Specifies a base-64 encoded string of custom data. The + base-64 encoded string is decoded to a binary array that is saved as a + file on the Virtual Machine. The maximum length of the binary array is + 65535 bytes.

    For using cloud-init for your VM, see [Using + cloud-init to customize a Linux VM during + creation](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-using-cloud-init?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json) + :type custom_data: str + :param windows_configuration: Specifies Windows operating system settings + on the virtual machine. + :type windows_configuration: + ~azure.mgmt.compute.v2015_06_15.models.WindowsConfiguration + :param linux_configuration: Specifies the Linux operating system settings + on the virtual machine.

    For a list of supported Linux + distributions, see [Linux on Azure-Endorsed + Distributions](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-endorsed-distros?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json) +

    For running non-endorsed distributions, see [Information for + Non-Endorsed + Distributions](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-create-upload-generic?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json). + :type linux_configuration: + ~azure.mgmt.compute.v2015_06_15.models.LinuxConfiguration + :param secrets: Specifies set of certificates that should be installed + onto the virtual machine. + :type secrets: + list[~azure.mgmt.compute.v2015_06_15.models.VaultSecretGroup] + """ + + _attribute_map = { + 'computer_name': {'key': 'computerName', 'type': 'str'}, + 'admin_username': {'key': 'adminUsername', 'type': 'str'}, + 'admin_password': {'key': 'adminPassword', 'type': 'str'}, + 'custom_data': {'key': 'customData', 'type': 'str'}, + 'windows_configuration': {'key': 'windowsConfiguration', 'type': 'WindowsConfiguration'}, + 'linux_configuration': {'key': 'linuxConfiguration', 'type': 'LinuxConfiguration'}, + 'secrets': {'key': 'secrets', 'type': '[VaultSecretGroup]'}, + } + + def __init__(self, **kwargs): + super(OSProfile, self).__init__(**kwargs) + self.computer_name = kwargs.get('computer_name', None) + self.admin_username = kwargs.get('admin_username', None) + self.admin_password = kwargs.get('admin_password', None) + self.custom_data = kwargs.get('custom_data', None) + self.windows_configuration = kwargs.get('windows_configuration', None) + self.linux_configuration = kwargs.get('linux_configuration', None) + self.secrets = kwargs.get('secrets', None) + + +class Plan(Model): + """Specifies information about the marketplace image used to create the + virtual machine. This element is only used for marketplace images. Before + you can use a marketplace image from an API, you must enable the image for + programmatic use. In the Azure portal, find the marketplace image that you + want to use and then click **Want to deploy programmatically, Get Started + ->**. Enter any required information and then click **Save**. + + :param name: The plan ID. + :type name: str + :param publisher: The publisher ID. + :type publisher: str + :param product: Specifies the product of the image from the marketplace. + This is the same value as Offer under the imageReference element. + :type product: str + :param promotion_code: The promotion code. + :type promotion_code: str + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'publisher': {'key': 'publisher', 'type': 'str'}, + 'product': {'key': 'product', 'type': 'str'}, + 'promotion_code': {'key': 'promotionCode', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(Plan, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.publisher = kwargs.get('publisher', None) + self.product = kwargs.get('product', None) + self.promotion_code = kwargs.get('promotion_code', None) + + +class PurchasePlan(Model): + """Used for establishing the purchase context of any 3rd Party artifact + through MarketPlace. + + All required parameters must be populated in order to send to Azure. + + :param publisher: Required. The publisher ID. + :type publisher: str + :param name: Required. The plan ID. + :type name: str + :param product: Required. Specifies the product of the image from the + marketplace. This is the same value as Offer under the imageReference + element. + :type product: str + """ + + _validation = { + 'publisher': {'required': True}, + 'name': {'required': True}, + 'product': {'required': True}, + } + + _attribute_map = { + 'publisher': {'key': 'publisher', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'product': {'key': 'product', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(PurchasePlan, self).__init__(**kwargs) + self.publisher = kwargs.get('publisher', None) + self.name = kwargs.get('name', None) + self.product = kwargs.get('product', None) + + +class Sku(Model): + """Describes a virtual machine scale set sku. + + :param name: The sku name. + :type name: str + :param tier: Specifies the tier of virtual machines in a scale set.

    Possible Values:

    **Standard**

    **Basic** + :type tier: str + :param capacity: Specifies the number of virtual machines in the scale + set. + :type capacity: long + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'tier': {'key': 'tier', 'type': 'str'}, + 'capacity': {'key': 'capacity', 'type': 'long'}, + } + + def __init__(self, **kwargs): + super(Sku, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.tier = kwargs.get('tier', None) + self.capacity = kwargs.get('capacity', None) + + +class SshConfiguration(Model): + """SSH configuration for Linux based VMs running on Azure. + + :param public_keys: The list of SSH public keys used to authenticate with + linux based VMs. + :type public_keys: + list[~azure.mgmt.compute.v2015_06_15.models.SshPublicKey] + """ + + _attribute_map = { + 'public_keys': {'key': 'publicKeys', 'type': '[SshPublicKey]'}, + } + + def __init__(self, **kwargs): + super(SshConfiguration, self).__init__(**kwargs) + self.public_keys = kwargs.get('public_keys', None) + + +class SshPublicKey(Model): + """Contains information about SSH certificate public key and the path on the + Linux VM where the public key is placed. + + :param path: Specifies the full path on the created VM where ssh public + key is stored. If the file already exists, the specified key is appended + to the file. Example: /home/user/.ssh/authorized_keys + :type path: str + :param key_data: SSH public key certificate used to authenticate with the + VM through ssh. The key needs to be at least 2048-bit and in ssh-rsa + format.

    For creating ssh keys, see [Create SSH keys on Linux and + Mac for Linux VMs in + Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-mac-create-ssh-keys?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json). + :type key_data: str + """ + + _attribute_map = { + 'path': {'key': 'path', 'type': 'str'}, + 'key_data': {'key': 'keyData', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(SshPublicKey, self).__init__(**kwargs) + self.path = kwargs.get('path', None) + self.key_data = kwargs.get('key_data', None) + + +class StorageProfile(Model): + """Specifies the storage settings for the virtual machine disks. + + :param image_reference: Specifies information about the image to use. You + can specify information about platform images, marketplace images, or + virtual machine images. This element is required when you want to use a + platform image, marketplace image, or virtual machine image, but is not + used in other creation operations. + :type image_reference: + ~azure.mgmt.compute.v2015_06_15.models.ImageReference + :param os_disk: Specifies information about the operating system disk used + by the virtual machine.

    For more information about disks, see + [About disks and VHDs for Azure virtual + machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-about-disks-vhds?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). + :type os_disk: ~azure.mgmt.compute.v2015_06_15.models.OSDisk + :param data_disks: Specifies the parameters that are used to add a data + disk to a virtual machine.

    For more information about disks, see + [About disks and VHDs for Azure virtual + machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-about-disks-vhds?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). + :type data_disks: list[~azure.mgmt.compute.v2015_06_15.models.DataDisk] + """ + + _attribute_map = { + 'image_reference': {'key': 'imageReference', 'type': 'ImageReference'}, + 'os_disk': {'key': 'osDisk', 'type': 'OSDisk'}, + 'data_disks': {'key': 'dataDisks', 'type': '[DataDisk]'}, + } + + def __init__(self, **kwargs): + super(StorageProfile, self).__init__(**kwargs) + self.image_reference = kwargs.get('image_reference', None) + self.os_disk = kwargs.get('os_disk', None) + self.data_disks = kwargs.get('data_disks', None) + + +class UpdateResource(Model): + """The Update Resource model definition. + + :param tags: Resource tags + :type tags: dict[str, str] + """ + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__(self, **kwargs): + super(UpdateResource, self).__init__(**kwargs) + self.tags = kwargs.get('tags', None) + + +class UpgradePolicy(Model): + """Describes an upgrade policy - automatic or manual. + + :param mode: Specifies the mode of an upgrade to virtual machines in the + scale set.

    Possible values are:

    **Manual** - You + control the application of updates to virtual machines in the scale set. + You do this by using the manualUpgrade action.

    **Automatic** - + All virtual machines in the scale set are automatically updated at the + same time. Possible values include: 'Automatic', 'Manual' + :type mode: str or ~azure.mgmt.compute.v2015_06_15.models.UpgradeMode + """ + + _attribute_map = { + 'mode': {'key': 'mode', 'type': 'UpgradeMode'}, + } + + def __init__(self, **kwargs): + super(UpgradePolicy, self).__init__(**kwargs) + self.mode = kwargs.get('mode', None) + + +class Usage(Model): + """Describes Compute Resource Usage. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar unit: Required. An enum describing the unit of usage measurement. + Default value: "Count" . + :vartype unit: str + :param current_value: Required. The current usage of the resource. + :type current_value: int + :param limit: Required. The maximum permitted usage of the resource. + :type limit: long + :param name: Required. The name of the type of usage. + :type name: ~azure.mgmt.compute.v2015_06_15.models.UsageName + """ + + _validation = { + 'unit': {'required': True, 'constant': True}, + 'current_value': {'required': True}, + 'limit': {'required': True}, + 'name': {'required': True}, + } + + _attribute_map = { + 'unit': {'key': 'unit', 'type': 'str'}, + 'current_value': {'key': 'currentValue', 'type': 'int'}, + 'limit': {'key': 'limit', 'type': 'long'}, + 'name': {'key': 'name', 'type': 'UsageName'}, + } + + unit = "Count" + + def __init__(self, **kwargs): + super(Usage, self).__init__(**kwargs) + self.current_value = kwargs.get('current_value', None) + self.limit = kwargs.get('limit', None) + self.name = kwargs.get('name', None) + + +class UsageName(Model): + """The Usage Names. + + :param value: The name of the resource. + :type value: str + :param localized_value: The localized name of the resource. + :type localized_value: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': 'str'}, + 'localized_value': {'key': 'localizedValue', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(UsageName, self).__init__(**kwargs) + self.value = kwargs.get('value', None) + self.localized_value = kwargs.get('localized_value', None) + + +class VaultCertificate(Model): + """Describes a single certificate reference in a Key Vault, and where the + certificate should reside on the VM. + + :param certificate_url: This is the URL of a certificate that has been + uploaded to Key Vault as a secret. For adding a secret to the Key Vault, + see [Add a key or secret to the key + vault](https://docs.microsoft.com/azure/key-vault/key-vault-get-started/#add). + In this case, your certificate needs to be It is the Base64 encoding of + the following JSON Object which is encoded in UTF-8:

    {
    + "data":"",
    "dataType":"pfx",
    + "password":""
    } + :type certificate_url: str + :param certificate_store: For Windows VMs, specifies the certificate store + on the Virtual Machine to which the certificate should be added. The + specified certificate store is implicitly in the LocalMachine account. +

    For Linux VMs, the certificate file is placed under the + /var/lib/waagent directory, with the file name + <UppercaseThumbprint>.crt for the X509 certificate file and + <UppercaseThumbprint>.prv for private key. Both of these files are + .pem formatted. + :type certificate_store: str + """ + + _attribute_map = { + 'certificate_url': {'key': 'certificateUrl', 'type': 'str'}, + 'certificate_store': {'key': 'certificateStore', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(VaultCertificate, self).__init__(**kwargs) + self.certificate_url = kwargs.get('certificate_url', None) + self.certificate_store = kwargs.get('certificate_store', None) + + +class VaultSecretGroup(Model): + """Describes a set of certificates which are all in the same Key Vault. + + :param source_vault: The relative URL of the Key Vault containing all of + the certificates in VaultCertificates. + :type source_vault: ~azure.mgmt.compute.v2015_06_15.models.SubResource + :param vault_certificates: The list of key vault references in SourceVault + which contain certificates. + :type vault_certificates: + list[~azure.mgmt.compute.v2015_06_15.models.VaultCertificate] + """ + + _attribute_map = { + 'source_vault': {'key': 'sourceVault', 'type': 'SubResource'}, + 'vault_certificates': {'key': 'vaultCertificates', 'type': '[VaultCertificate]'}, + } + + def __init__(self, **kwargs): + super(VaultSecretGroup, self).__init__(**kwargs) + self.source_vault = kwargs.get('source_vault', None) + self.vault_certificates = kwargs.get('vault_certificates', None) + + +class VirtualHardDisk(Model): + """Describes the uri of a disk. + + :param uri: Specifies the virtual hard disk's uri. + :type uri: str + """ + + _attribute_map = { + 'uri': {'key': 'uri', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(VirtualHardDisk, self).__init__(**kwargs) + self.uri = kwargs.get('uri', None) + + +class VirtualMachine(Resource): + """Describes a Virtual Machine. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource Id + :vartype id: str + :ivar name: Resource name + :vartype name: str + :ivar type: Resource type + :vartype type: str + :param location: Required. Resource location + :type location: str + :param tags: Resource tags + :type tags: dict[str, str] + :param plan: Specifies information about the marketplace image used to + create the virtual machine. This element is only used for marketplace + images. Before you can use a marketplace image from an API, you must + enable the image for programmatic use. In the Azure portal, find the + marketplace image that you want to use and then click **Want to deploy + programmatically, Get Started ->**. Enter any required information and + then click **Save**. + :type plan: ~azure.mgmt.compute.v2015_06_15.models.Plan + :param hardware_profile: Specifies the hardware settings for the virtual + machine. + :type hardware_profile: + ~azure.mgmt.compute.v2015_06_15.models.HardwareProfile + :param storage_profile: Specifies the storage settings for the virtual + machine disks. + :type storage_profile: + ~azure.mgmt.compute.v2015_06_15.models.StorageProfile + :param os_profile: Specifies the operating system settings for the virtual + machine. + :type os_profile: ~azure.mgmt.compute.v2015_06_15.models.OSProfile + :param network_profile: Specifies the network interfaces of the virtual + machine. + :type network_profile: + ~azure.mgmt.compute.v2015_06_15.models.NetworkProfile + :param diagnostics_profile: Specifies the boot diagnostic settings state. +

    Minimum api-version: 2015-06-15. + :type diagnostics_profile: + ~azure.mgmt.compute.v2015_06_15.models.DiagnosticsProfile + :param availability_set: Specifies information about the availability set + that the virtual machine should be assigned to. Virtual machines specified + in the same availability set are allocated to different nodes to maximize + availability. For more information about availability sets, see [Manage + the availability of virtual + machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-manage-availability?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). +

    For more information on Azure planned maintenance, see [Planned + maintenance for virtual machines in + Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-planned-maintenance?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json) +

    Currently, a VM can only be added to availability set at creation + time. An existing VM cannot be added to an availability set. + :type availability_set: ~azure.mgmt.compute.v2015_06_15.models.SubResource + :ivar provisioning_state: The provisioning state, which only appears in + the response. + :vartype provisioning_state: str + :ivar instance_view: The virtual machine instance view. + :vartype instance_view: + ~azure.mgmt.compute.v2015_06_15.models.VirtualMachineInstanceView + :param license_type: Specifies that the image or disk that is being used + was licensed on-premises. This element is only used for images that + contain the Windows Server operating system.

    Possible values are: +

    Windows_Client

    Windows_Server

    If this element + is included in a request for an update, the value must match the initial + value. This value cannot be updated.

    For more information, see + [Azure Hybrid Use Benefit for Windows + Server](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-hybrid-use-benefit-licensing?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json) +

    Minimum api-version: 2015-06-15 + :type license_type: str + :ivar resources: The virtual machine child extension resources. + :vartype resources: + list[~azure.mgmt.compute.v2015_06_15.models.VirtualMachineExtension] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + 'provisioning_state': {'readonly': True}, + 'instance_view': {'readonly': True}, + 'resources': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'plan': {'key': 'plan', 'type': 'Plan'}, + 'hardware_profile': {'key': 'properties.hardwareProfile', 'type': 'HardwareProfile'}, + 'storage_profile': {'key': 'properties.storageProfile', 'type': 'StorageProfile'}, + 'os_profile': {'key': 'properties.osProfile', 'type': 'OSProfile'}, + 'network_profile': {'key': 'properties.networkProfile', 'type': 'NetworkProfile'}, + 'diagnostics_profile': {'key': 'properties.diagnosticsProfile', 'type': 'DiagnosticsProfile'}, + 'availability_set': {'key': 'properties.availabilitySet', 'type': 'SubResource'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'instance_view': {'key': 'properties.instanceView', 'type': 'VirtualMachineInstanceView'}, + 'license_type': {'key': 'properties.licenseType', 'type': 'str'}, + 'resources': {'key': 'resources', 'type': '[VirtualMachineExtension]'}, + } + + def __init__(self, **kwargs): + super(VirtualMachine, self).__init__(**kwargs) + self.plan = kwargs.get('plan', None) + self.hardware_profile = kwargs.get('hardware_profile', None) + self.storage_profile = kwargs.get('storage_profile', None) + self.os_profile = kwargs.get('os_profile', None) + self.network_profile = kwargs.get('network_profile', None) + self.diagnostics_profile = kwargs.get('diagnostics_profile', None) + self.availability_set = kwargs.get('availability_set', None) + self.provisioning_state = None + self.instance_view = None + self.license_type = kwargs.get('license_type', None) + self.resources = None + + +class VirtualMachineAgentInstanceView(Model): + """The instance view of the VM Agent running on the virtual machine. + + :param vm_agent_version: The VM Agent full version. + :type vm_agent_version: str + :param extension_handlers: The virtual machine extension handler instance + view. + :type extension_handlers: + list[~azure.mgmt.compute.v2015_06_15.models.VirtualMachineExtensionHandlerInstanceView] + :param statuses: The resource status information. + :type statuses: + list[~azure.mgmt.compute.v2015_06_15.models.InstanceViewStatus] + """ + + _attribute_map = { + 'vm_agent_version': {'key': 'vmAgentVersion', 'type': 'str'}, + 'extension_handlers': {'key': 'extensionHandlers', 'type': '[VirtualMachineExtensionHandlerInstanceView]'}, + 'statuses': {'key': 'statuses', 'type': '[InstanceViewStatus]'}, + } + + def __init__(self, **kwargs): + super(VirtualMachineAgentInstanceView, self).__init__(**kwargs) + self.vm_agent_version = kwargs.get('vm_agent_version', None) + self.extension_handlers = kwargs.get('extension_handlers', None) + self.statuses = kwargs.get('statuses', None) + + +class VirtualMachineCaptureParameters(Model): + """Capture Virtual Machine parameters. + + All required parameters must be populated in order to send to Azure. + + :param vhd_prefix: Required. The captured virtual hard disk's name prefix. + :type vhd_prefix: str + :param destination_container_name: Required. The destination container + name. + :type destination_container_name: str + :param overwrite_vhds: Required. Specifies whether to overwrite the + destination virtual hard disk, in case of conflict. + :type overwrite_vhds: bool + """ + + _validation = { + 'vhd_prefix': {'required': True}, + 'destination_container_name': {'required': True}, + 'overwrite_vhds': {'required': True}, + } + + _attribute_map = { + 'vhd_prefix': {'key': 'vhdPrefix', 'type': 'str'}, + 'destination_container_name': {'key': 'destinationContainerName', 'type': 'str'}, + 'overwrite_vhds': {'key': 'overwriteVhds', 'type': 'bool'}, + } + + def __init__(self, **kwargs): + super(VirtualMachineCaptureParameters, self).__init__(**kwargs) + self.vhd_prefix = kwargs.get('vhd_prefix', None) + self.destination_container_name = kwargs.get('destination_container_name', None) + self.overwrite_vhds = kwargs.get('overwrite_vhds', None) + + +class VirtualMachineCaptureResult(SubResource): + """Resource Id. + + :param id: Resource Id + :type id: str + :param output: Operation output data (raw JSON) + :type output: object + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'output': {'key': 'properties.output', 'type': 'object'}, + } + + def __init__(self, **kwargs): + super(VirtualMachineCaptureResult, self).__init__(**kwargs) + self.output = kwargs.get('output', None) + + +class VirtualMachineExtension(Resource): + """Describes a Virtual Machine Extension. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource Id + :vartype id: str + :ivar name: Resource name + :vartype name: str + :ivar type: Resource type + :vartype type: str + :param location: Required. Resource location + :type location: str + :param tags: Resource tags + :type tags: dict[str, str] + :param force_update_tag: How the extension handler should be forced to + update even if the extension configuration has not changed. + :type force_update_tag: str + :param publisher: The name of the extension handler publisher. + :type publisher: str + :param virtual_machine_extension_type: Specifies the type of the + extension; an example is "CustomScriptExtension". + :type virtual_machine_extension_type: str + :param type_handler_version: Specifies the version of the script handler. + :type type_handler_version: str + :param auto_upgrade_minor_version: Indicates whether the extension should + use a newer minor version if one is available at deployment time. Once + deployed, however, the extension will not upgrade minor versions unless + redeployed, even with this property set to true. + :type auto_upgrade_minor_version: bool + :param settings: Json formatted public settings for the extension. + :type settings: object + :param protected_settings: The extension can contain either + protectedSettings or protectedSettingsFromKeyVault or no protected + settings at all. + :type protected_settings: object + :ivar provisioning_state: The provisioning state, which only appears in + the response. + :vartype provisioning_state: str + :param instance_view: The virtual machine extension instance view. + :type instance_view: + ~azure.mgmt.compute.v2015_06_15.models.VirtualMachineExtensionInstanceView + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'force_update_tag': {'key': 'properties.forceUpdateTag', 'type': 'str'}, + 'publisher': {'key': 'properties.publisher', 'type': 'str'}, + 'virtual_machine_extension_type': {'key': 'properties.type', 'type': 'str'}, + 'type_handler_version': {'key': 'properties.typeHandlerVersion', 'type': 'str'}, + 'auto_upgrade_minor_version': {'key': 'properties.autoUpgradeMinorVersion', 'type': 'bool'}, + 'settings': {'key': 'properties.settings', 'type': 'object'}, + 'protected_settings': {'key': 'properties.protectedSettings', 'type': 'object'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'instance_view': {'key': 'properties.instanceView', 'type': 'VirtualMachineExtensionInstanceView'}, + } + + def __init__(self, **kwargs): + super(VirtualMachineExtension, self).__init__(**kwargs) + self.force_update_tag = kwargs.get('force_update_tag', None) + self.publisher = kwargs.get('publisher', None) + self.virtual_machine_extension_type = kwargs.get('virtual_machine_extension_type', None) + self.type_handler_version = kwargs.get('type_handler_version', None) + self.auto_upgrade_minor_version = kwargs.get('auto_upgrade_minor_version', None) + self.settings = kwargs.get('settings', None) + self.protected_settings = kwargs.get('protected_settings', None) + self.provisioning_state = None + self.instance_view = kwargs.get('instance_view', None) + + +class VirtualMachineExtensionHandlerInstanceView(Model): + """The instance view of a virtual machine extension handler. + + :param type: Specifies the type of the extension; an example is + "CustomScriptExtension". + :type type: str + :param type_handler_version: Specifies the version of the script handler. + :type type_handler_version: str + :param status: The extension handler status. + :type status: ~azure.mgmt.compute.v2015_06_15.models.InstanceViewStatus + """ + + _attribute_map = { + 'type': {'key': 'type', 'type': 'str'}, + 'type_handler_version': {'key': 'typeHandlerVersion', 'type': 'str'}, + 'status': {'key': 'status', 'type': 'InstanceViewStatus'}, + } + + def __init__(self, **kwargs): + super(VirtualMachineExtensionHandlerInstanceView, self).__init__(**kwargs) + self.type = kwargs.get('type', None) + self.type_handler_version = kwargs.get('type_handler_version', None) + self.status = kwargs.get('status', None) + + +class VirtualMachineExtensionImage(Resource): + """Describes a Virtual Machine Extension Image. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource Id + :vartype id: str + :ivar name: Resource name + :vartype name: str + :ivar type: Resource type + :vartype type: str + :param location: Required. Resource location + :type location: str + :param tags: Resource tags + :type tags: dict[str, str] + :param operating_system: Required. The operating system this extension + supports. + :type operating_system: str + :param compute_role: Required. The type of role (IaaS or PaaS) this + extension supports. + :type compute_role: str + :param handler_schema: Required. The schema defined by publisher, where + extension consumers should provide settings in a matching schema. + :type handler_schema: str + :param vm_scale_set_enabled: Whether the extension can be used on xRP + VMScaleSets. By default existing extensions are usable on scalesets, but + there might be cases where a publisher wants to explicitly indicate the + extension is only enabled for CRP VMs but not VMSS. + :type vm_scale_set_enabled: bool + :param supports_multiple_extensions: Whether the handler can support + multiple extensions. + :type supports_multiple_extensions: bool + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + 'operating_system': {'required': True}, + 'compute_role': {'required': True}, + 'handler_schema': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'operating_system': {'key': 'properties.operatingSystem', 'type': 'str'}, + 'compute_role': {'key': 'properties.computeRole', 'type': 'str'}, + 'handler_schema': {'key': 'properties.handlerSchema', 'type': 'str'}, + 'vm_scale_set_enabled': {'key': 'properties.vmScaleSetEnabled', 'type': 'bool'}, + 'supports_multiple_extensions': {'key': 'properties.supportsMultipleExtensions', 'type': 'bool'}, + } + + def __init__(self, **kwargs): + super(VirtualMachineExtensionImage, self).__init__(**kwargs) + self.operating_system = kwargs.get('operating_system', None) + self.compute_role = kwargs.get('compute_role', None) + self.handler_schema = kwargs.get('handler_schema', None) + self.vm_scale_set_enabled = kwargs.get('vm_scale_set_enabled', None) + self.supports_multiple_extensions = kwargs.get('supports_multiple_extensions', None) + + +class VirtualMachineExtensionInstanceView(Model): + """The instance view of a virtual machine extension. + + :param name: The virtual machine extension name. + :type name: str + :param type: Specifies the type of the extension; an example is + "CustomScriptExtension". + :type type: str + :param type_handler_version: Specifies the version of the script handler. + :type type_handler_version: str + :param substatuses: The resource status information. + :type substatuses: + list[~azure.mgmt.compute.v2015_06_15.models.InstanceViewStatus] + :param statuses: The resource status information. + :type statuses: + list[~azure.mgmt.compute.v2015_06_15.models.InstanceViewStatus] + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'type_handler_version': {'key': 'typeHandlerVersion', 'type': 'str'}, + 'substatuses': {'key': 'substatuses', 'type': '[InstanceViewStatus]'}, + 'statuses': {'key': 'statuses', 'type': '[InstanceViewStatus]'}, + } + + def __init__(self, **kwargs): + super(VirtualMachineExtensionInstanceView, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.type = kwargs.get('type', None) + self.type_handler_version = kwargs.get('type_handler_version', None) + self.substatuses = kwargs.get('substatuses', None) + self.statuses = kwargs.get('statuses', None) + + +class VirtualMachineExtensionUpdate(UpdateResource): + """Describes a Virtual Machine Extension. + + :param tags: Resource tags + :type tags: dict[str, str] + :param force_update_tag: How the extension handler should be forced to + update even if the extension configuration has not changed. + :type force_update_tag: str + :param publisher: The name of the extension handler publisher. + :type publisher: str + :param type: Specifies the type of the extension; an example is + "CustomScriptExtension". + :type type: str + :param type_handler_version: Specifies the version of the script handler. + :type type_handler_version: str + :param auto_upgrade_minor_version: Indicates whether the extension should + use a newer minor version if one is available at deployment time. Once + deployed, however, the extension will not upgrade minor versions unless + redeployed, even with this property set to true. + :type auto_upgrade_minor_version: bool + :param settings: Json formatted public settings for the extension. + :type settings: object + :param protected_settings: The extension can contain either + protectedSettings or protectedSettingsFromKeyVault or no protected + settings at all. + :type protected_settings: object + """ + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + 'force_update_tag': {'key': 'properties.forceUpdateTag', 'type': 'str'}, + 'publisher': {'key': 'properties.publisher', 'type': 'str'}, + 'type': {'key': 'properties.type', 'type': 'str'}, + 'type_handler_version': {'key': 'properties.typeHandlerVersion', 'type': 'str'}, + 'auto_upgrade_minor_version': {'key': 'properties.autoUpgradeMinorVersion', 'type': 'bool'}, + 'settings': {'key': 'properties.settings', 'type': 'object'}, + 'protected_settings': {'key': 'properties.protectedSettings', 'type': 'object'}, + } + + def __init__(self, **kwargs): + super(VirtualMachineExtensionUpdate, self).__init__(**kwargs) + self.force_update_tag = kwargs.get('force_update_tag', None) + self.publisher = kwargs.get('publisher', None) + self.type = kwargs.get('type', None) + self.type_handler_version = kwargs.get('type_handler_version', None) + self.auto_upgrade_minor_version = kwargs.get('auto_upgrade_minor_version', None) + self.settings = kwargs.get('settings', None) + self.protected_settings = kwargs.get('protected_settings', None) + + +class VirtualMachineImageResource(SubResource): + """Virtual machine image resource information. + + All required parameters must be populated in order to send to Azure. + + :param id: Resource Id + :type id: str + :param name: Required. The name of the resource. + :type name: str + :param location: Required. The supported Azure location of the resource. + :type location: str + :param tags: Specifies the tags that are assigned to the virtual machine. + For more information about using tags, see [Using tags to organize your + Azure + resources](https://docs.microsoft.com/azure/azure-resource-manager/resource-group-using-tags.md). + :type tags: dict[str, str] + """ + + _validation = { + 'name': {'required': True}, + 'location': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__(self, **kwargs): + super(VirtualMachineImageResource, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.location = kwargs.get('location', None) + self.tags = kwargs.get('tags', None) + + +class VirtualMachineImage(VirtualMachineImageResource): + """Describes a Virtual Machine Image. + + All required parameters must be populated in order to send to Azure. + + :param id: Resource Id + :type id: str + :param name: Required. The name of the resource. + :type name: str + :param location: Required. The supported Azure location of the resource. + :type location: str + :param tags: Specifies the tags that are assigned to the virtual machine. + For more information about using tags, see [Using tags to organize your + Azure + resources](https://docs.microsoft.com/azure/azure-resource-manager/resource-group-using-tags.md). + :type tags: dict[str, str] + :param plan: + :type plan: ~azure.mgmt.compute.v2015_06_15.models.PurchasePlan + :param os_disk_image: + :type os_disk_image: ~azure.mgmt.compute.v2015_06_15.models.OSDiskImage + :param data_disk_images: + :type data_disk_images: + list[~azure.mgmt.compute.v2015_06_15.models.DataDiskImage] + """ + + _validation = { + 'name': {'required': True}, + 'location': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'plan': {'key': 'properties.plan', 'type': 'PurchasePlan'}, + 'os_disk_image': {'key': 'properties.osDiskImage', 'type': 'OSDiskImage'}, + 'data_disk_images': {'key': 'properties.dataDiskImages', 'type': '[DataDiskImage]'}, + } + + def __init__(self, **kwargs): + super(VirtualMachineImage, self).__init__(**kwargs) + self.plan = kwargs.get('plan', None) + self.os_disk_image = kwargs.get('os_disk_image', None) + self.data_disk_images = kwargs.get('data_disk_images', None) + + +class VirtualMachineInstanceView(Model): + """The instance view of a virtual machine. + + :param platform_update_domain: Specifies the update domain of the virtual + machine. + :type platform_update_domain: int + :param platform_fault_domain: Specifies the fault domain of the virtual + machine. + :type platform_fault_domain: int + :param rdp_thumb_print: The Remote desktop certificate thumbprint. + :type rdp_thumb_print: str + :param vm_agent: The VM Agent running on the virtual machine. + :type vm_agent: + ~azure.mgmt.compute.v2015_06_15.models.VirtualMachineAgentInstanceView + :param disks: The virtual machine disk information. + :type disks: list[~azure.mgmt.compute.v2015_06_15.models.DiskInstanceView] + :param extensions: The extensions information. + :type extensions: + list[~azure.mgmt.compute.v2015_06_15.models.VirtualMachineExtensionInstanceView] + :param boot_diagnostics: Boot Diagnostics is a debugging feature which + allows you to view Console Output and Screenshot to diagnose VM status. +

    You can easily view the output of your console log.

    + Azure also enables you to see a screenshot of the VM from the hypervisor. + :type boot_diagnostics: + ~azure.mgmt.compute.v2015_06_15.models.BootDiagnosticsInstanceView + :param statuses: The resource status information. + :type statuses: + list[~azure.mgmt.compute.v2015_06_15.models.InstanceViewStatus] + """ + + _attribute_map = { + 'platform_update_domain': {'key': 'platformUpdateDomain', 'type': 'int'}, + 'platform_fault_domain': {'key': 'platformFaultDomain', 'type': 'int'}, + 'rdp_thumb_print': {'key': 'rdpThumbPrint', 'type': 'str'}, + 'vm_agent': {'key': 'vmAgent', 'type': 'VirtualMachineAgentInstanceView'}, + 'disks': {'key': 'disks', 'type': '[DiskInstanceView]'}, + 'extensions': {'key': 'extensions', 'type': '[VirtualMachineExtensionInstanceView]'}, + 'boot_diagnostics': {'key': 'bootDiagnostics', 'type': 'BootDiagnosticsInstanceView'}, + 'statuses': {'key': 'statuses', 'type': '[InstanceViewStatus]'}, + } + + def __init__(self, **kwargs): + super(VirtualMachineInstanceView, self).__init__(**kwargs) + self.platform_update_domain = kwargs.get('platform_update_domain', None) + self.platform_fault_domain = kwargs.get('platform_fault_domain', None) + self.rdp_thumb_print = kwargs.get('rdp_thumb_print', None) + self.vm_agent = kwargs.get('vm_agent', None) + self.disks = kwargs.get('disks', None) + self.extensions = kwargs.get('extensions', None) + self.boot_diagnostics = kwargs.get('boot_diagnostics', None) + self.statuses = kwargs.get('statuses', None) + + +class VirtualMachineScaleSet(Resource): + """Describes a Virtual Machine Scale Set. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource Id + :vartype id: str + :ivar name: Resource name + :vartype name: str + :ivar type: Resource type + :vartype type: str + :param location: Required. Resource location + :type location: str + :param tags: Resource tags + :type tags: dict[str, str] + :param sku: The virtual machine scale set sku. + :type sku: ~azure.mgmt.compute.v2015_06_15.models.Sku + :param upgrade_policy: The upgrade policy. + :type upgrade_policy: ~azure.mgmt.compute.v2015_06_15.models.UpgradePolicy + :param virtual_machine_profile: The virtual machine profile. + :type virtual_machine_profile: + ~azure.mgmt.compute.v2015_06_15.models.VirtualMachineScaleSetVMProfile + :param provisioning_state: The provisioning state, which only appears in + the response. + :type provisioning_state: str + :param over_provision: Specifies whether the Virtual Machine Scale Set + should be overprovisioned. + :type over_provision: bool + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'sku': {'key': 'sku', 'type': 'Sku'}, + 'upgrade_policy': {'key': 'properties.upgradePolicy', 'type': 'UpgradePolicy'}, + 'virtual_machine_profile': {'key': 'properties.virtualMachineProfile', 'type': 'VirtualMachineScaleSetVMProfile'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'over_provision': {'key': 'properties.overProvision', 'type': 'bool'}, + } + + def __init__(self, **kwargs): + super(VirtualMachineScaleSet, self).__init__(**kwargs) + self.sku = kwargs.get('sku', None) + self.upgrade_policy = kwargs.get('upgrade_policy', None) + self.virtual_machine_profile = kwargs.get('virtual_machine_profile', None) + self.provisioning_state = kwargs.get('provisioning_state', None) + self.over_provision = kwargs.get('over_provision', None) + + +class VirtualMachineScaleSetExtension(SubResource): + """Describes a Virtual Machine Scale Set Extension. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :param id: Resource Id + :type id: str + :param name: The name of the extension. + :type name: str + :param publisher: The name of the extension handler publisher. + :type publisher: str + :param type: The type of the extension handler. + :type type: str + :param type_handler_version: The type version of the extension handler. + :type type_handler_version: str + :param auto_upgrade_minor_version: Whether the extension handler should be + automatically upgraded across minor versions. + :type auto_upgrade_minor_version: bool + :param settings: Json formatted public settings for the extension. + :type settings: object + :param protected_settings: Json formatted protected settings for the + extension. + :type protected_settings: object + :ivar provisioning_state: The provisioning state, which only appears in + the response. + :vartype provisioning_state: str + """ + + _validation = { + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'publisher': {'key': 'properties.publisher', 'type': 'str'}, + 'type': {'key': 'properties.type', 'type': 'str'}, + 'type_handler_version': {'key': 'properties.typeHandlerVersion', 'type': 'str'}, + 'auto_upgrade_minor_version': {'key': 'properties.autoUpgradeMinorVersion', 'type': 'bool'}, + 'settings': {'key': 'properties.settings', 'type': 'object'}, + 'protected_settings': {'key': 'properties.protectedSettings', 'type': 'object'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(VirtualMachineScaleSetExtension, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.publisher = kwargs.get('publisher', None) + self.type = kwargs.get('type', None) + self.type_handler_version = kwargs.get('type_handler_version', None) + self.auto_upgrade_minor_version = kwargs.get('auto_upgrade_minor_version', None) + self.settings = kwargs.get('settings', None) + self.protected_settings = kwargs.get('protected_settings', None) + self.provisioning_state = None + + +class VirtualMachineScaleSetExtensionProfile(Model): + """Describes a virtual machine scale set extension profile. + + :param extensions: The virtual machine scale set child extension + resources. + :type extensions: + list[~azure.mgmt.compute.v2015_06_15.models.VirtualMachineScaleSetExtension] + """ + + _attribute_map = { + 'extensions': {'key': 'extensions', 'type': '[VirtualMachineScaleSetExtension]'}, + } + + def __init__(self, **kwargs): + super(VirtualMachineScaleSetExtensionProfile, self).__init__(**kwargs) + self.extensions = kwargs.get('extensions', None) + + +class VirtualMachineScaleSetInstanceView(Model): + """The instance view of a virtual machine scale set. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar virtual_machine: The instance view status summary for the virtual + machine scale set. + :vartype virtual_machine: + ~azure.mgmt.compute.v2015_06_15.models.VirtualMachineScaleSetInstanceViewStatusesSummary + :ivar extensions: The extensions information. + :vartype extensions: + list[~azure.mgmt.compute.v2015_06_15.models.VirtualMachineScaleSetVMExtensionsSummary] + :param statuses: The resource status information. + :type statuses: + list[~azure.mgmt.compute.v2015_06_15.models.InstanceViewStatus] + """ + + _validation = { + 'virtual_machine': {'readonly': True}, + 'extensions': {'readonly': True}, + } + + _attribute_map = { + 'virtual_machine': {'key': 'virtualMachine', 'type': 'VirtualMachineScaleSetInstanceViewStatusesSummary'}, + 'extensions': {'key': 'extensions', 'type': '[VirtualMachineScaleSetVMExtensionsSummary]'}, + 'statuses': {'key': 'statuses', 'type': '[InstanceViewStatus]'}, + } + + def __init__(self, **kwargs): + super(VirtualMachineScaleSetInstanceView, self).__init__(**kwargs) + self.virtual_machine = None + self.extensions = None + self.statuses = kwargs.get('statuses', None) + + +class VirtualMachineScaleSetInstanceViewStatusesSummary(Model): + """Instance view statuses summary for virtual machines of a virtual machine + scale set. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar statuses_summary: The extensions information. + :vartype statuses_summary: + list[~azure.mgmt.compute.v2015_06_15.models.VirtualMachineStatusCodeCount] + """ + + _validation = { + 'statuses_summary': {'readonly': True}, + } + + _attribute_map = { + 'statuses_summary': {'key': 'statusesSummary', 'type': '[VirtualMachineStatusCodeCount]'}, + } + + def __init__(self, **kwargs): + super(VirtualMachineScaleSetInstanceViewStatusesSummary, self).__init__(**kwargs) + self.statuses_summary = None + + +class VirtualMachineScaleSetIPConfiguration(SubResource): + """Describes a virtual machine scale set network profile's IP configuration. + + All required parameters must be populated in order to send to Azure. + + :param id: Resource Id + :type id: str + :param name: Required. The IP configuration name. + :type name: str + :param subnet: Required. The subnet. + :type subnet: ~azure.mgmt.compute.v2015_06_15.models.ApiEntityReference + :param load_balancer_backend_address_pools: The load balancer backend + address pools. + :type load_balancer_backend_address_pools: + list[~azure.mgmt.compute.v2015_06_15.models.SubResource] + :param load_balancer_inbound_nat_pools: The load balancer inbound nat + pools. + :type load_balancer_inbound_nat_pools: + list[~azure.mgmt.compute.v2015_06_15.models.SubResource] + """ + + _validation = { + 'name': {'required': True}, + 'subnet': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'subnet': {'key': 'properties.subnet', 'type': 'ApiEntityReference'}, + 'load_balancer_backend_address_pools': {'key': 'properties.loadBalancerBackendAddressPools', 'type': '[SubResource]'}, + 'load_balancer_inbound_nat_pools': {'key': 'properties.loadBalancerInboundNatPools', 'type': '[SubResource]'}, + } + + def __init__(self, **kwargs): + super(VirtualMachineScaleSetIPConfiguration, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.subnet = kwargs.get('subnet', None) + self.load_balancer_backend_address_pools = kwargs.get('load_balancer_backend_address_pools', None) + self.load_balancer_inbound_nat_pools = kwargs.get('load_balancer_inbound_nat_pools', None) + + +class VirtualMachineScaleSetNetworkConfiguration(SubResource): + """Describes a virtual machine scale set network profile's network + configurations. + + All required parameters must be populated in order to send to Azure. + + :param id: Resource Id + :type id: str + :param name: Required. The network configuration name. + :type name: str + :param primary: Whether this is a primary NIC on a virtual machine. + :type primary: bool + :param ip_configurations: Required. The virtual machine scale set IP + Configuration. + :type ip_configurations: + list[~azure.mgmt.compute.v2015_06_15.models.VirtualMachineScaleSetIPConfiguration] + """ + + _validation = { + 'name': {'required': True}, + 'ip_configurations': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'primary': {'key': 'properties.primary', 'type': 'bool'}, + 'ip_configurations': {'key': 'properties.ipConfigurations', 'type': '[VirtualMachineScaleSetIPConfiguration]'}, + } + + def __init__(self, **kwargs): + super(VirtualMachineScaleSetNetworkConfiguration, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.primary = kwargs.get('primary', None) + self.ip_configurations = kwargs.get('ip_configurations', None) + + +class VirtualMachineScaleSetNetworkProfile(Model): + """Describes a virtual machine scale set network profile. + + :param network_interface_configurations: The list of network + configurations. + :type network_interface_configurations: + list[~azure.mgmt.compute.v2015_06_15.models.VirtualMachineScaleSetNetworkConfiguration] + """ + + _attribute_map = { + 'network_interface_configurations': {'key': 'networkInterfaceConfigurations', 'type': '[VirtualMachineScaleSetNetworkConfiguration]'}, + } + + def __init__(self, **kwargs): + super(VirtualMachineScaleSetNetworkProfile, self).__init__(**kwargs) + self.network_interface_configurations = kwargs.get('network_interface_configurations', None) + + +class VirtualMachineScaleSetOSDisk(Model): + """Describes a virtual machine scale set operating system disk. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. The disk name. + :type name: str + :param caching: Specifies the caching requirements.

    Possible + values are:

    **None**

    **ReadOnly**

    **ReadWrite** +

    Default: **None for Standard storage. ReadOnly for Premium + storage**. Possible values include: 'None', 'ReadOnly', 'ReadWrite' + :type caching: str or ~azure.mgmt.compute.v2015_06_15.models.CachingTypes + :param create_option: Required. Specifies how the virtual machines in the + scale set should be created.

    The only allowed value is: + **FromImage** \\u2013 This value is used when you are using an image to + create the virtual machine. If you are using a platform image, you also + use the imageReference element described above. If you are using a + marketplace image, you also use the plan element previously described. + Possible values include: 'FromImage', 'Empty', 'Attach' + :type create_option: str or + ~azure.mgmt.compute.v2015_06_15.models.DiskCreateOptionTypes + :param os_type: This property allows you to specify the type of the OS + that is included in the disk if creating a VM from user-image or a + specialized VHD.

    Possible values are:

    **Windows** +

    **Linux**. Possible values include: 'Windows', 'Linux' + :type os_type: str or + ~azure.mgmt.compute.v2015_06_15.models.OperatingSystemTypes + :param image: The Source User Image VirtualHardDisk. This VirtualHardDisk + will be copied before using it to attach to the Virtual Machine. If + SourceImage is provided, the destination VirtualHardDisk should not exist. + :type image: ~azure.mgmt.compute.v2015_06_15.models.VirtualHardDisk + :param vhd_containers: The list of virtual hard disk container uris. + :type vhd_containers: list[str] + """ + + _validation = { + 'name': {'required': True}, + 'create_option': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'caching': {'key': 'caching', 'type': 'CachingTypes'}, + 'create_option': {'key': 'createOption', 'type': 'DiskCreateOptionTypes'}, + 'os_type': {'key': 'osType', 'type': 'OperatingSystemTypes'}, + 'image': {'key': 'image', 'type': 'VirtualHardDisk'}, + 'vhd_containers': {'key': 'vhdContainers', 'type': '[str]'}, + } + + def __init__(self, **kwargs): + super(VirtualMachineScaleSetOSDisk, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.caching = kwargs.get('caching', None) + self.create_option = kwargs.get('create_option', None) + self.os_type = kwargs.get('os_type', None) + self.image = kwargs.get('image', None) + self.vhd_containers = kwargs.get('vhd_containers', None) + + +class VirtualMachineScaleSetOSProfile(Model): + """Describes a virtual machine scale set OS profile. + + :param computer_name_prefix: Specifies the computer name prefix for all of + the virtual machines in the scale set. Computer name prefixes must be 1 to + 15 characters long. + :type computer_name_prefix: str + :param admin_username: Specifies the name of the administrator account. +

    **Windows-only restriction:** Cannot end in "."

    + **Disallowed values:** "administrator", "admin", "user", "user1", "test", + "user2", "test1", "user3", "admin1", "1", "123", "a", "actuser", "adm", + "admin2", "aspnet", "backup", "console", "david", "guest", "john", + "owner", "root", "server", "sql", "support", "support_388945a0", "sys", + "test2", "test3", "user4", "user5".

    **Minimum-length (Linux):** 1 + character

    **Max-length (Linux):** 64 characters

    + **Max-length (Windows):** 20 characters

  • For root access to + the Linux VM, see [Using root privileges on Linux virtual machines in + Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-use-root-privileges?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json)
  • + For a list of built-in system users on Linux that should not be used in + this field, see [Selecting User Names for Linux on + Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-usernames?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json) + :type admin_username: str + :param admin_password: Specifies the password of the administrator + account.

    **Minimum-length (Windows):** 8 characters

    + **Minimum-length (Linux):** 6 characters

    **Max-length + (Windows):** 123 characters

    **Max-length (Linux):** 72 characters +

    **Complexity requirements:** 3 out of 4 conditions below need to + be fulfilled
    Has lower characters
    Has upper characters
    Has a + digit
    Has a special character (Regex match [\\W_])

    + **Disallowed values:** "abc@123", "P@$$w0rd", "P@ssw0rd", "P@ssword123", + "Pa$$word", "pass@word1", "Password!", "Password1", "Password22", + "iloveyou!"

    For resetting the password, see [How to reset the + Remote Desktop service or its login password in a Windows + VM](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-reset-rdp?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json) +

    For resetting root password, see [Manage users, SSH, and check or + repair disks on Azure Linux VMs using the VMAccess + Extension](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-using-vmaccess-extension?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json#reset-root-password) + :type admin_password: str + :param custom_data: A base-64 encoded string of custom data. + :type custom_data: str + :param windows_configuration: The Windows Configuration of the OS profile. + :type windows_configuration: + ~azure.mgmt.compute.v2015_06_15.models.WindowsConfiguration + :param linux_configuration: The Linux Configuration of the OS profile. + :type linux_configuration: + ~azure.mgmt.compute.v2015_06_15.models.LinuxConfiguration + :param secrets: The List of certificates for addition to the VM. + :type secrets: + list[~azure.mgmt.compute.v2015_06_15.models.VaultSecretGroup] + """ + + _attribute_map = { + 'computer_name_prefix': {'key': 'computerNamePrefix', 'type': 'str'}, + 'admin_username': {'key': 'adminUsername', 'type': 'str'}, + 'admin_password': {'key': 'adminPassword', 'type': 'str'}, + 'custom_data': {'key': 'customData', 'type': 'str'}, + 'windows_configuration': {'key': 'windowsConfiguration', 'type': 'WindowsConfiguration'}, + 'linux_configuration': {'key': 'linuxConfiguration', 'type': 'LinuxConfiguration'}, + 'secrets': {'key': 'secrets', 'type': '[VaultSecretGroup]'}, + } + + def __init__(self, **kwargs): + super(VirtualMachineScaleSetOSProfile, self).__init__(**kwargs) + self.computer_name_prefix = kwargs.get('computer_name_prefix', None) + self.admin_username = kwargs.get('admin_username', None) + self.admin_password = kwargs.get('admin_password', None) + self.custom_data = kwargs.get('custom_data', None) + self.windows_configuration = kwargs.get('windows_configuration', None) + self.linux_configuration = kwargs.get('linux_configuration', None) + self.secrets = kwargs.get('secrets', None) + + +class VirtualMachineScaleSetSku(Model): + """Describes an available virtual machine scale set sku. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar resource_type: The type of resource the sku applies to. + :vartype resource_type: str + :ivar sku: The Sku. + :vartype sku: ~azure.mgmt.compute.v2015_06_15.models.Sku + :ivar capacity: Specifies the number of virtual machines in the scale set. + :vartype capacity: + ~azure.mgmt.compute.v2015_06_15.models.VirtualMachineScaleSetSkuCapacity + """ + + _validation = { + 'resource_type': {'readonly': True}, + 'sku': {'readonly': True}, + 'capacity': {'readonly': True}, + } + + _attribute_map = { + 'resource_type': {'key': 'resourceType', 'type': 'str'}, + 'sku': {'key': 'sku', 'type': 'Sku'}, + 'capacity': {'key': 'capacity', 'type': 'VirtualMachineScaleSetSkuCapacity'}, + } + + def __init__(self, **kwargs): + super(VirtualMachineScaleSetSku, self).__init__(**kwargs) + self.resource_type = None + self.sku = None + self.capacity = None + + +class VirtualMachineScaleSetSkuCapacity(Model): + """Describes scaling information of a sku. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar minimum: The minimum capacity. + :vartype minimum: long + :ivar maximum: The maximum capacity that can be set. + :vartype maximum: long + :ivar default_capacity: The default capacity. + :vartype default_capacity: long + :ivar scale_type: The scale type applicable to the sku. Possible values + include: 'Automatic', 'None' + :vartype scale_type: str or + ~azure.mgmt.compute.v2015_06_15.models.VirtualMachineScaleSetSkuScaleType + """ + + _validation = { + 'minimum': {'readonly': True}, + 'maximum': {'readonly': True}, + 'default_capacity': {'readonly': True}, + 'scale_type': {'readonly': True}, + } + + _attribute_map = { + 'minimum': {'key': 'minimum', 'type': 'long'}, + 'maximum': {'key': 'maximum', 'type': 'long'}, + 'default_capacity': {'key': 'defaultCapacity', 'type': 'long'}, + 'scale_type': {'key': 'scaleType', 'type': 'VirtualMachineScaleSetSkuScaleType'}, + } + + def __init__(self, **kwargs): + super(VirtualMachineScaleSetSkuCapacity, self).__init__(**kwargs) + self.minimum = None + self.maximum = None + self.default_capacity = None + self.scale_type = None + + +class VirtualMachineScaleSetStorageProfile(Model): + """Describes a virtual machine scale set storage profile. + + :param image_reference: The image reference. + :type image_reference: + ~azure.mgmt.compute.v2015_06_15.models.ImageReference + :param os_disk: The OS disk. + :type os_disk: + ~azure.mgmt.compute.v2015_06_15.models.VirtualMachineScaleSetOSDisk + """ + + _attribute_map = { + 'image_reference': {'key': 'imageReference', 'type': 'ImageReference'}, + 'os_disk': {'key': 'osDisk', 'type': 'VirtualMachineScaleSetOSDisk'}, + } + + def __init__(self, **kwargs): + super(VirtualMachineScaleSetStorageProfile, self).__init__(**kwargs) + self.image_reference = kwargs.get('image_reference', None) + self.os_disk = kwargs.get('os_disk', None) + + +class VirtualMachineScaleSetVM(Resource): + """Describes a virtual machine scale set virtual machine. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource Id + :vartype id: str + :ivar name: Resource name + :vartype name: str + :ivar type: Resource type + :vartype type: str + :param location: Required. Resource location + :type location: str + :param tags: Resource tags + :type tags: dict[str, str] + :ivar instance_id: The virtual machine instance ID. + :vartype instance_id: str + :ivar sku: The virtual machine SKU. + :vartype sku: ~azure.mgmt.compute.v2015_06_15.models.Sku + :ivar latest_model_applied: Specifies whether the latest model has been + applied to the virtual machine. + :vartype latest_model_applied: bool + :ivar instance_view: The virtual machine instance view. + :vartype instance_view: + ~azure.mgmt.compute.v2015_06_15.models.VirtualMachineScaleSetVMInstanceView + :param hardware_profile: Specifies the hardware settings for the virtual + machine. + :type hardware_profile: + ~azure.mgmt.compute.v2015_06_15.models.HardwareProfile + :param storage_profile: Specifies the storage settings for the virtual + machine disks. + :type storage_profile: + ~azure.mgmt.compute.v2015_06_15.models.StorageProfile + :param os_profile: Specifies the operating system settings for the virtual + machine. + :type os_profile: ~azure.mgmt.compute.v2015_06_15.models.OSProfile + :param network_profile: Specifies the network interfaces of the virtual + machine. + :type network_profile: + ~azure.mgmt.compute.v2015_06_15.models.NetworkProfile + :param diagnostics_profile: Specifies the boot diagnostic settings state. +

    Minimum api-version: 2015-06-15. + :type diagnostics_profile: + ~azure.mgmt.compute.v2015_06_15.models.DiagnosticsProfile + :param availability_set: Specifies information about the availability set + that the virtual machine should be assigned to. Virtual machines specified + in the same availability set are allocated to different nodes to maximize + availability. For more information about availability sets, see [Manage + the availability of virtual + machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-manage-availability?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). +

    For more information on Azure planned maintenance, see [Planned + maintenance for virtual machines in + Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-planned-maintenance?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json) +

    Currently, a VM can only be added to availability set at creation + time. An existing VM cannot be added to an availability set. + :type availability_set: ~azure.mgmt.compute.v2015_06_15.models.SubResource + :param provisioning_state: The provisioning state, which only appears in + the response. + :type provisioning_state: str + :param license_type: Specifies that the image or disk that is being used + was licensed on-premises. This element is only used for images that + contain the Windows Server operating system.

    Possible values are: +

    Windows_Client

    Windows_Server

    If this element + is included in a request for an update, the value must match the initial + value. This value cannot be updated.

    For more information, see + [Azure Hybrid Use Benefit for Windows + Server](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-hybrid-use-benefit-licensing?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json) +

    Minimum api-version: 2015-06-15 + :type license_type: str + :param plan: Specifies information about the marketplace image used to + create the virtual machine. This element is only used for marketplace + images. Before you can use a marketplace image from an API, you must + enable the image for programmatic use. In the Azure portal, find the + marketplace image that you want to use and then click **Want to deploy + programmatically, Get Started ->**. Enter any required information and + then click **Save**. + :type plan: ~azure.mgmt.compute.v2015_06_15.models.Plan + :ivar resources: The virtual machine child extension resources. + :vartype resources: + list[~azure.mgmt.compute.v2015_06_15.models.VirtualMachineExtension] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + 'instance_id': {'readonly': True}, + 'sku': {'readonly': True}, + 'latest_model_applied': {'readonly': True}, + 'instance_view': {'readonly': True}, + 'resources': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'instance_id': {'key': 'instanceId', 'type': 'str'}, + 'sku': {'key': 'sku', 'type': 'Sku'}, + 'latest_model_applied': {'key': 'properties.latestModelApplied', 'type': 'bool'}, + 'instance_view': {'key': 'properties.instanceView', 'type': 'VirtualMachineScaleSetVMInstanceView'}, + 'hardware_profile': {'key': 'properties.hardwareProfile', 'type': 'HardwareProfile'}, + 'storage_profile': {'key': 'properties.storageProfile', 'type': 'StorageProfile'}, + 'os_profile': {'key': 'properties.osProfile', 'type': 'OSProfile'}, + 'network_profile': {'key': 'properties.networkProfile', 'type': 'NetworkProfile'}, + 'diagnostics_profile': {'key': 'properties.diagnosticsProfile', 'type': 'DiagnosticsProfile'}, + 'availability_set': {'key': 'properties.availabilitySet', 'type': 'SubResource'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'license_type': {'key': 'properties.licenseType', 'type': 'str'}, + 'plan': {'key': 'plan', 'type': 'Plan'}, + 'resources': {'key': 'resources', 'type': '[VirtualMachineExtension]'}, + } + + def __init__(self, **kwargs): + super(VirtualMachineScaleSetVM, self).__init__(**kwargs) + self.instance_id = None + self.sku = None + self.latest_model_applied = None + self.instance_view = None + self.hardware_profile = kwargs.get('hardware_profile', None) + self.storage_profile = kwargs.get('storage_profile', None) + self.os_profile = kwargs.get('os_profile', None) + self.network_profile = kwargs.get('network_profile', None) + self.diagnostics_profile = kwargs.get('diagnostics_profile', None) + self.availability_set = kwargs.get('availability_set', None) + self.provisioning_state = kwargs.get('provisioning_state', None) + self.license_type = kwargs.get('license_type', None) + self.plan = kwargs.get('plan', None) + self.resources = None + + +class VirtualMachineScaleSetVMExtensionsSummary(Model): + """Extensions summary for virtual machines of a virtual machine scale set. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar name: The extension name. + :vartype name: str + :ivar statuses_summary: The extensions information. + :vartype statuses_summary: + list[~azure.mgmt.compute.v2015_06_15.models.VirtualMachineStatusCodeCount] + """ + + _validation = { + 'name': {'readonly': True}, + 'statuses_summary': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'statuses_summary': {'key': 'statusesSummary', 'type': '[VirtualMachineStatusCodeCount]'}, + } + + def __init__(self, **kwargs): + super(VirtualMachineScaleSetVMExtensionsSummary, self).__init__(**kwargs) + self.name = None + self.statuses_summary = None + + +class VirtualMachineScaleSetVMInstanceIDs(Model): + """Specifies a list of virtual machine instance IDs from the VM scale set. + + :param instance_ids: The virtual machine scale set instance ids. Omitting + the virtual machine scale set instance ids will result in the operation + being performed on all virtual machines in the virtual machine scale set. + :type instance_ids: list[str] + """ + + _attribute_map = { + 'instance_ids': {'key': 'instanceIds', 'type': '[str]'}, + } + + def __init__(self, **kwargs): + super(VirtualMachineScaleSetVMInstanceIDs, self).__init__(**kwargs) + self.instance_ids = kwargs.get('instance_ids', None) + + +class VirtualMachineScaleSetVMInstanceRequiredIDs(Model): + """Specifies a list of virtual machine instance IDs from the VM scale set. + + All required parameters must be populated in order to send to Azure. + + :param instance_ids: Required. The virtual machine scale set instance ids. + :type instance_ids: list[str] + """ + + _validation = { + 'instance_ids': {'required': True}, + } + + _attribute_map = { + 'instance_ids': {'key': 'instanceIds', 'type': '[str]'}, + } + + def __init__(self, **kwargs): + super(VirtualMachineScaleSetVMInstanceRequiredIDs, self).__init__(**kwargs) + self.instance_ids = kwargs.get('instance_ids', None) + + +class VirtualMachineScaleSetVMInstanceView(Model): + """The instance view of a virtual machine scale set VM. + + :param platform_update_domain: The Update Domain count. + :type platform_update_domain: int + :param platform_fault_domain: The Fault Domain count. + :type platform_fault_domain: int + :param rdp_thumb_print: The Remote desktop certificate thumbprint. + :type rdp_thumb_print: str + :param vm_agent: The VM Agent running on the virtual machine. + :type vm_agent: + ~azure.mgmt.compute.v2015_06_15.models.VirtualMachineAgentInstanceView + :param disks: The disks information. + :type disks: list[~azure.mgmt.compute.v2015_06_15.models.DiskInstanceView] + :param extensions: The extensions information. + :type extensions: + list[~azure.mgmt.compute.v2015_06_15.models.VirtualMachineExtensionInstanceView] + :param boot_diagnostics: Boot Diagnostics is a debugging feature which + allows you to view Console Output and Screenshot to diagnose VM status. +

    You can easily view the output of your console log.

    + Azure also enables you to see a screenshot of the VM from the hypervisor. + :type boot_diagnostics: + ~azure.mgmt.compute.v2015_06_15.models.BootDiagnosticsInstanceView + :param statuses: The resource status information. + :type statuses: + list[~azure.mgmt.compute.v2015_06_15.models.InstanceViewStatus] + """ + + _attribute_map = { + 'platform_update_domain': {'key': 'platformUpdateDomain', 'type': 'int'}, + 'platform_fault_domain': {'key': 'platformFaultDomain', 'type': 'int'}, + 'rdp_thumb_print': {'key': 'rdpThumbPrint', 'type': 'str'}, + 'vm_agent': {'key': 'vmAgent', 'type': 'VirtualMachineAgentInstanceView'}, + 'disks': {'key': 'disks', 'type': '[DiskInstanceView]'}, + 'extensions': {'key': 'extensions', 'type': '[VirtualMachineExtensionInstanceView]'}, + 'boot_diagnostics': {'key': 'bootDiagnostics', 'type': 'BootDiagnosticsInstanceView'}, + 'statuses': {'key': 'statuses', 'type': '[InstanceViewStatus]'}, + } + + def __init__(self, **kwargs): + super(VirtualMachineScaleSetVMInstanceView, self).__init__(**kwargs) + self.platform_update_domain = kwargs.get('platform_update_domain', None) + self.platform_fault_domain = kwargs.get('platform_fault_domain', None) + self.rdp_thumb_print = kwargs.get('rdp_thumb_print', None) + self.vm_agent = kwargs.get('vm_agent', None) + self.disks = kwargs.get('disks', None) + self.extensions = kwargs.get('extensions', None) + self.boot_diagnostics = kwargs.get('boot_diagnostics', None) + self.statuses = kwargs.get('statuses', None) + + +class VirtualMachineScaleSetVMProfile(Model): + """Describes a virtual machine scale set virtual machine profile. + + :param os_profile: The virtual machine scale set OS profile. + :type os_profile: + ~azure.mgmt.compute.v2015_06_15.models.VirtualMachineScaleSetOSProfile + :param storage_profile: The virtual machine scale set storage profile. + :type storage_profile: + ~azure.mgmt.compute.v2015_06_15.models.VirtualMachineScaleSetStorageProfile + :param network_profile: The virtual machine scale set network profile. + :type network_profile: + ~azure.mgmt.compute.v2015_06_15.models.VirtualMachineScaleSetNetworkProfile + :param extension_profile: The virtual machine scale set extension profile. + :type extension_profile: + ~azure.mgmt.compute.v2015_06_15.models.VirtualMachineScaleSetExtensionProfile + """ + + _attribute_map = { + 'os_profile': {'key': 'osProfile', 'type': 'VirtualMachineScaleSetOSProfile'}, + 'storage_profile': {'key': 'storageProfile', 'type': 'VirtualMachineScaleSetStorageProfile'}, + 'network_profile': {'key': 'networkProfile', 'type': 'VirtualMachineScaleSetNetworkProfile'}, + 'extension_profile': {'key': 'extensionProfile', 'type': 'VirtualMachineScaleSetExtensionProfile'}, + } + + def __init__(self, **kwargs): + super(VirtualMachineScaleSetVMProfile, self).__init__(**kwargs) + self.os_profile = kwargs.get('os_profile', None) + self.storage_profile = kwargs.get('storage_profile', None) + self.network_profile = kwargs.get('network_profile', None) + self.extension_profile = kwargs.get('extension_profile', None) + + +class VirtualMachineSize(Model): + """Describes the properties of a VM size. + + :param name: The name of the virtual machine size. + :type name: str + :param number_of_cores: The number of cores supported by the virtual + machine size. + :type number_of_cores: int + :param os_disk_size_in_mb: The OS disk size, in MB, allowed by the virtual + machine size. + :type os_disk_size_in_mb: int + :param resource_disk_size_in_mb: The resource disk size, in MB, allowed by + the virtual machine size. + :type resource_disk_size_in_mb: int + :param memory_in_mb: The amount of memory, in MB, supported by the virtual + machine size. + :type memory_in_mb: int + :param max_data_disk_count: The maximum number of data disks that can be + attached to the virtual machine size. + :type max_data_disk_count: int + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'number_of_cores': {'key': 'numberOfCores', 'type': 'int'}, + 'os_disk_size_in_mb': {'key': 'osDiskSizeInMB', 'type': 'int'}, + 'resource_disk_size_in_mb': {'key': 'resourceDiskSizeInMB', 'type': 'int'}, + 'memory_in_mb': {'key': 'memoryInMB', 'type': 'int'}, + 'max_data_disk_count': {'key': 'maxDataDiskCount', 'type': 'int'}, + } + + def __init__(self, **kwargs): + super(VirtualMachineSize, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.number_of_cores = kwargs.get('number_of_cores', None) + self.os_disk_size_in_mb = kwargs.get('os_disk_size_in_mb', None) + self.resource_disk_size_in_mb = kwargs.get('resource_disk_size_in_mb', None) + self.memory_in_mb = kwargs.get('memory_in_mb', None) + self.max_data_disk_count = kwargs.get('max_data_disk_count', None) + + +class VirtualMachineStatusCodeCount(Model): + """The status code and count of the virtual machine scale set instance view + status summary. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar code: The instance view status code. + :vartype code: str + :ivar count: The number of instances having a particular status code. + :vartype count: int + """ + + _validation = { + 'code': {'readonly': True}, + 'count': {'readonly': True}, + } + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + 'count': {'key': 'count', 'type': 'int'}, + } + + def __init__(self, **kwargs): + super(VirtualMachineStatusCodeCount, self).__init__(**kwargs) + self.code = None + self.count = None + + +class WindowsConfiguration(Model): + """Specifies Windows operating system settings on the virtual machine. + + :param provision_vm_agent: Indicates whether virtual machine agent should + be provisioned on the virtual machine.

    When this property is not + specified in the request body, default behavior is to set it to true. + This will ensure that VM Agent is installed on the VM so that extensions + can be added to the VM later. + :type provision_vm_agent: bool + :param enable_automatic_updates: Indicates whether virtual machine is + enabled for automatic updates. + :type enable_automatic_updates: bool + :param time_zone: Specifies the time zone of the virtual machine. e.g. + "Pacific Standard Time" + :type time_zone: str + :param additional_unattend_content: Specifies additional base-64 encoded + XML formatted information that can be included in the Unattend.xml file, + which is used by Windows Setup. + :type additional_unattend_content: + list[~azure.mgmt.compute.v2015_06_15.models.AdditionalUnattendContent] + :param win_rm: Specifies the Windows Remote Management listeners. This + enables remote Windows PowerShell. + :type win_rm: ~azure.mgmt.compute.v2015_06_15.models.WinRMConfiguration + """ + + _attribute_map = { + 'provision_vm_agent': {'key': 'provisionVMAgent', 'type': 'bool'}, + 'enable_automatic_updates': {'key': 'enableAutomaticUpdates', 'type': 'bool'}, + 'time_zone': {'key': 'timeZone', 'type': 'str'}, + 'additional_unattend_content': {'key': 'additionalUnattendContent', 'type': '[AdditionalUnattendContent]'}, + 'win_rm': {'key': 'winRM', 'type': 'WinRMConfiguration'}, + } + + def __init__(self, **kwargs): + super(WindowsConfiguration, self).__init__(**kwargs) + self.provision_vm_agent = kwargs.get('provision_vm_agent', None) + self.enable_automatic_updates = kwargs.get('enable_automatic_updates', None) + self.time_zone = kwargs.get('time_zone', None) + self.additional_unattend_content = kwargs.get('additional_unattend_content', None) + self.win_rm = kwargs.get('win_rm', None) + + +class WinRMConfiguration(Model): + """Describes Windows Remote Management configuration of the VM. + + :param listeners: The list of Windows Remote Management listeners + :type listeners: + list[~azure.mgmt.compute.v2015_06_15.models.WinRMListener] + """ + + _attribute_map = { + 'listeners': {'key': 'listeners', 'type': '[WinRMListener]'}, + } + + def __init__(self, **kwargs): + super(WinRMConfiguration, self).__init__(**kwargs) + self.listeners = kwargs.get('listeners', None) + + +class WinRMListener(Model): + """Describes Protocol and thumbprint of Windows Remote Management listener. + + :param protocol: Specifies the protocol of listener.

    Possible + values are:
    **http**

    **https**. Possible values include: + 'Http', 'Https' + :type protocol: str or + ~azure.mgmt.compute.v2015_06_15.models.ProtocolTypes + :param certificate_url: This is the URL of a certificate that has been + uploaded to Key Vault as a secret. For adding a secret to the Key Vault, + see [Add a key or secret to the key + vault](https://docs.microsoft.com/azure/key-vault/key-vault-get-started/#add). + In this case, your certificate needs to be It is the Base64 encoding of + the following JSON Object which is encoded in UTF-8:

    {
    + "data":"",
    "dataType":"pfx",
    + "password":""
    } + :type certificate_url: str + """ + + _attribute_map = { + 'protocol': {'key': 'protocol', 'type': 'ProtocolTypes'}, + 'certificate_url': {'key': 'certificateUrl', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(WinRMListener, self).__init__(**kwargs) + self.protocol = kwargs.get('protocol', None) + self.certificate_url = kwargs.get('certificate_url', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/_models_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/_models_py3.py new file mode 100644 index 000000000000..0c38d43b99e2 --- /dev/null +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/_models_py3.py @@ -0,0 +1,2909 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class AdditionalUnattendContent(Model): + """Specifies additional XML formatted information that can be included in the + Unattend.xml file, which is used by Windows Setup. Contents are defined by + setting name, component name, and the pass in which the content is applied. + + :param pass_name: The pass name. Currently, the only allowable value is + OobeSystem. Possible values include: 'OobeSystem' + :type pass_name: str or ~azure.mgmt.compute.v2015_06_15.models.PassNames + :param component_name: The component name. Currently, the only allowable + value is Microsoft-Windows-Shell-Setup. Possible values include: + 'Microsoft-Windows-Shell-Setup' + :type component_name: str or + ~azure.mgmt.compute.v2015_06_15.models.ComponentNames + :param setting_name: Specifies the name of the setting to which the + content applies. Possible values are: FirstLogonCommands and AutoLogon. + Possible values include: 'AutoLogon', 'FirstLogonCommands' + :type setting_name: str or + ~azure.mgmt.compute.v2015_06_15.models.SettingNames + :param content: Specifies the XML formatted content that is added to the + unattend.xml file for the specified path and component. The XML must be + less than 4KB and must include the root element for the setting or feature + that is being inserted. + :type content: str + """ + + _attribute_map = { + 'pass_name': {'key': 'passName', 'type': 'PassNames'}, + 'component_name': {'key': 'componentName', 'type': 'ComponentNames'}, + 'setting_name': {'key': 'settingName', 'type': 'SettingNames'}, + 'content': {'key': 'content', 'type': 'str'}, + } + + def __init__(self, *, pass_name=None, component_name=None, setting_name=None, content: str=None, **kwargs) -> None: + super(AdditionalUnattendContent, self).__init__(**kwargs) + self.pass_name = pass_name + self.component_name = component_name + self.setting_name = setting_name + self.content = content + + +class ApiEntityReference(Model): + """The API entity reference. + + :param id: The ARM resource id in the form of + /subscriptions/{SubscriptionId}/resourceGroups/{ResourceGroupName}/... + :type id: str + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + } + + def __init__(self, *, id: str=None, **kwargs) -> None: + super(ApiEntityReference, self).__init__(**kwargs) + self.id = id + + +class ApiError(Model): + """Api error. + + :param details: The Api error details + :type details: list[~azure.mgmt.compute.v2015_06_15.models.ApiErrorBase] + :param innererror: The Api inner error + :type innererror: ~azure.mgmt.compute.v2015_06_15.models.InnerError + :param code: The error code. + :type code: str + :param target: The target of the particular error. + :type target: str + :param message: The error message. + :type message: str + """ + + _attribute_map = { + 'details': {'key': 'details', 'type': '[ApiErrorBase]'}, + 'innererror': {'key': 'innererror', 'type': 'InnerError'}, + 'code': {'key': 'code', 'type': 'str'}, + 'target': {'key': 'target', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + } + + def __init__(self, *, details=None, innererror=None, code: str=None, target: str=None, message: str=None, **kwargs) -> None: + super(ApiError, self).__init__(**kwargs) + self.details = details + self.innererror = innererror + self.code = code + self.target = target + self.message = message + + +class ApiErrorBase(Model): + """Api error base. + + :param code: The error code. + :type code: str + :param target: The target of the particular error. + :type target: str + :param message: The error message. + :type message: str + """ + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + 'target': {'key': 'target', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + } + + def __init__(self, *, code: str=None, target: str=None, message: str=None, **kwargs) -> None: + super(ApiErrorBase, self).__init__(**kwargs) + self.code = code + self.target = target + self.message = message + + +class Resource(Model): + """The Resource model definition. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource Id + :vartype id: str + :ivar name: Resource name + :vartype name: str + :ivar type: Resource type + :vartype type: str + :param location: Required. Resource location + :type location: str + :param tags: Resource tags + :type tags: dict[str, str] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__(self, *, location: str, tags=None, **kwargs) -> None: + super(Resource, self).__init__(**kwargs) + self.id = None + self.name = None + self.type = None + self.location = location + self.tags = tags + + +class AvailabilitySet(Resource): + """Specifies information about the availability set that the virtual machine + should be assigned to. Virtual machines specified in the same availability + set are allocated to different nodes to maximize availability. For more + information about availability sets, see [Manage the availability of + virtual + machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-manage-availability?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). +

    For more information on Azure planned maintenance, see [Planned + maintenance for virtual machines in + Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-planned-maintenance?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json) +

    Currently, a VM can only be added to availability set at creation + time. An existing VM cannot be added to an availability set. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource Id + :vartype id: str + :ivar name: Resource name + :vartype name: str + :ivar type: Resource type + :vartype type: str + :param location: Required. Resource location + :type location: str + :param tags: Resource tags + :type tags: dict[str, str] + :param platform_update_domain_count: Update Domain count. + :type platform_update_domain_count: int + :param platform_fault_domain_count: Fault Domain count. + :type platform_fault_domain_count: int + :param virtual_machines: A list of references to all virtual machines in + the availability set. + :type virtual_machines: + list[~azure.mgmt.compute.v2015_06_15.models.SubResource] + :ivar statuses: The resource status information. + :vartype statuses: + list[~azure.mgmt.compute.v2015_06_15.models.InstanceViewStatus] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + 'statuses': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'platform_update_domain_count': {'key': 'properties.platformUpdateDomainCount', 'type': 'int'}, + 'platform_fault_domain_count': {'key': 'properties.platformFaultDomainCount', 'type': 'int'}, + 'virtual_machines': {'key': 'properties.virtualMachines', 'type': '[SubResource]'}, + 'statuses': {'key': 'properties.statuses', 'type': '[InstanceViewStatus]'}, + } + + def __init__(self, *, location: str, tags=None, platform_update_domain_count: int=None, platform_fault_domain_count: int=None, virtual_machines=None, **kwargs) -> None: + super(AvailabilitySet, self).__init__(location=location, tags=tags, **kwargs) + self.platform_update_domain_count = platform_update_domain_count + self.platform_fault_domain_count = platform_fault_domain_count + self.virtual_machines = virtual_machines + self.statuses = None + + +class BootDiagnostics(Model): + """Boot Diagnostics is a debugging feature which allows you to view Console + Output and Screenshot to diagnose VM status.

    You can easily view + the output of your console log.

    Azure also enables you to see a + screenshot of the VM from the hypervisor. + + :param enabled: Whether boot diagnostics should be enabled on the Virtual + Machine. + :type enabled: bool + :param storage_uri: Uri of the storage account to use for placing the + console output and screenshot. + :type storage_uri: str + """ + + _attribute_map = { + 'enabled': {'key': 'enabled', 'type': 'bool'}, + 'storage_uri': {'key': 'storageUri', 'type': 'str'}, + } + + def __init__(self, *, enabled: bool=None, storage_uri: str=None, **kwargs) -> None: + super(BootDiagnostics, self).__init__(**kwargs) + self.enabled = enabled + self.storage_uri = storage_uri + + +class BootDiagnosticsInstanceView(Model): + """The instance view of a virtual machine boot diagnostics. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar console_screenshot_blob_uri: The console screenshot blob URI. + :vartype console_screenshot_blob_uri: str + :ivar serial_console_log_blob_uri: The Linux serial console log blob Uri. + :vartype serial_console_log_blob_uri: str + """ + + _validation = { + 'console_screenshot_blob_uri': {'readonly': True}, + 'serial_console_log_blob_uri': {'readonly': True}, + } + + _attribute_map = { + 'console_screenshot_blob_uri': {'key': 'consoleScreenshotBlobUri', 'type': 'str'}, + 'serial_console_log_blob_uri': {'key': 'serialConsoleLogBlobUri', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(BootDiagnosticsInstanceView, self).__init__(**kwargs) + self.console_screenshot_blob_uri = None + self.serial_console_log_blob_uri = None + + +class CloudError(Model): + """CloudError. + """ + + _attribute_map = { + } + + +class ComputeLongRunningOperationProperties(Model): + """Compute-specific operation properties, including output. + + :param output: Operation output data (raw JSON) + :type output: object + """ + + _attribute_map = { + 'output': {'key': 'output', 'type': 'object'}, + } + + def __init__(self, *, output=None, **kwargs) -> None: + super(ComputeLongRunningOperationProperties, self).__init__(**kwargs) + self.output = output + + +class DataDisk(Model): + """Describes a data disk. + + All required parameters must be populated in order to send to Azure. + + :param lun: Required. Specifies the logical unit number of the data disk. + This value is used to identify data disks within the VM and therefore must + be unique for each data disk attached to a VM. + :type lun: int + :param name: Required. The disk name. + :type name: str + :param vhd: Required. The virtual hard disk. + :type vhd: ~azure.mgmt.compute.v2015_06_15.models.VirtualHardDisk + :param image: The source user image virtual hard disk. The virtual hard + disk will be copied before being attached to the virtual machine. If + SourceImage is provided, the destination virtual hard drive must not + exist. + :type image: ~azure.mgmt.compute.v2015_06_15.models.VirtualHardDisk + :param caching: Specifies the caching requirements.

    Possible + values are:

    **None**

    **ReadOnly**

    **ReadWrite** +

    Default: **None for Standard storage. ReadOnly for Premium + storage**. Possible values include: 'None', 'ReadOnly', 'ReadWrite' + :type caching: str or ~azure.mgmt.compute.v2015_06_15.models.CachingTypes + :param create_option: Required. Specifies how the virtual machine should + be created.

    Possible values are:

    **Attach** \\u2013 This + value is used when you are using a specialized disk to create the virtual + machine.

    **FromImage** \\u2013 This value is used when you are + using an image to create the virtual machine. If you are using a platform + image, you also use the imageReference element described above. If you are + using a marketplace image, you also use the plan element previously + described. Possible values include: 'FromImage', 'Empty', 'Attach' + :type create_option: str or + ~azure.mgmt.compute.v2015_06_15.models.DiskCreateOptionTypes + :param disk_size_gb: Specifies the size of an empty data disk in + gigabytes. This element can be used to overwrite the size of the disk in a + virtual machine image.

    This value cannot be larger than 1023 GB + :type disk_size_gb: int + """ + + _validation = { + 'lun': {'required': True}, + 'name': {'required': True}, + 'vhd': {'required': True}, + 'create_option': {'required': True}, + } + + _attribute_map = { + 'lun': {'key': 'lun', 'type': 'int'}, + 'name': {'key': 'name', 'type': 'str'}, + 'vhd': {'key': 'vhd', 'type': 'VirtualHardDisk'}, + 'image': {'key': 'image', 'type': 'VirtualHardDisk'}, + 'caching': {'key': 'caching', 'type': 'CachingTypes'}, + 'create_option': {'key': 'createOption', 'type': 'DiskCreateOptionTypes'}, + 'disk_size_gb': {'key': 'diskSizeGB', 'type': 'int'}, + } + + def __init__(self, *, lun: int, name: str, vhd, create_option, image=None, caching=None, disk_size_gb: int=None, **kwargs) -> None: + super(DataDisk, self).__init__(**kwargs) + self.lun = lun + self.name = name + self.vhd = vhd + self.image = image + self.caching = caching + self.create_option = create_option + self.disk_size_gb = disk_size_gb + + +class DataDiskImage(Model): + """Contains the data disk images information. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar lun: Specifies the logical unit number of the data disk. This value + is used to identify data disks within the VM and therefore must be unique + for each data disk attached to a VM. + :vartype lun: int + """ + + _validation = { + 'lun': {'readonly': True}, + } + + _attribute_map = { + 'lun': {'key': 'lun', 'type': 'int'}, + } + + def __init__(self, **kwargs) -> None: + super(DataDiskImage, self).__init__(**kwargs) + self.lun = None + + +class DiagnosticsProfile(Model): + """Specifies the boot diagnostic settings state.

    Minimum api-version: + 2015-06-15. + + :param boot_diagnostics: Boot Diagnostics is a debugging feature which + allows you to view Console Output and Screenshot to diagnose VM status. +

    You can easily view the output of your console log.

    + Azure also enables you to see a screenshot of the VM from the hypervisor. + :type boot_diagnostics: + ~azure.mgmt.compute.v2015_06_15.models.BootDiagnostics + """ + + _attribute_map = { + 'boot_diagnostics': {'key': 'bootDiagnostics', 'type': 'BootDiagnostics'}, + } + + def __init__(self, *, boot_diagnostics=None, **kwargs) -> None: + super(DiagnosticsProfile, self).__init__(**kwargs) + self.boot_diagnostics = boot_diagnostics + + +class DiskEncryptionSettings(Model): + """Describes a Encryption Settings for a Disk. + + All required parameters must be populated in order to send to Azure. + + :param disk_encryption_key: Required. Specifies the location of the disk + encryption key, which is a Key Vault Secret. + :type disk_encryption_key: + ~azure.mgmt.compute.v2015_06_15.models.KeyVaultSecretReference + :param key_encryption_key: Specifies the location of the key encryption + key in Key Vault. + :type key_encryption_key: + ~azure.mgmt.compute.v2015_06_15.models.KeyVaultKeyReference + :param enabled: Specifies whether disk encryption should be enabled on the + virtual machine. + :type enabled: bool + """ + + _validation = { + 'disk_encryption_key': {'required': True}, + } + + _attribute_map = { + 'disk_encryption_key': {'key': 'diskEncryptionKey', 'type': 'KeyVaultSecretReference'}, + 'key_encryption_key': {'key': 'keyEncryptionKey', 'type': 'KeyVaultKeyReference'}, + 'enabled': {'key': 'enabled', 'type': 'bool'}, + } + + def __init__(self, *, disk_encryption_key, key_encryption_key=None, enabled: bool=None, **kwargs) -> None: + super(DiskEncryptionSettings, self).__init__(**kwargs) + self.disk_encryption_key = disk_encryption_key + self.key_encryption_key = key_encryption_key + self.enabled = enabled + + +class DiskInstanceView(Model): + """The instance view of the disk. + + :param name: The disk name. + :type name: str + :param statuses: The resource status information. + :type statuses: + list[~azure.mgmt.compute.v2015_06_15.models.InstanceViewStatus] + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'statuses': {'key': 'statuses', 'type': '[InstanceViewStatus]'}, + } + + def __init__(self, *, name: str=None, statuses=None, **kwargs) -> None: + super(DiskInstanceView, self).__init__(**kwargs) + self.name = name + self.statuses = statuses + + +class HardwareProfile(Model): + """Specifies the hardware settings for the virtual machine. + + :param vm_size: Specifies the size of the virtual machine. For more + information about virtual machine sizes, see [Sizes for virtual + machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-sizes?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). +

    The available VM sizes depend on region and availability set. For + a list of available sizes use these APIs:

    [List all available + virtual machine sizes in an availability + set](https://docs.microsoft.com/rest/api/compute/availabilitysets/listavailablesizes) +

    [List all available virtual machine sizes in a + region](https://docs.microsoft.com/rest/api/compute/virtualmachinesizes/list) +

    [List all available virtual machine sizes for + resizing](https://docs.microsoft.com/rest/api/compute/virtualmachines/listavailablesizes). + Possible values include: 'Basic_A0', 'Basic_A1', 'Basic_A2', 'Basic_A3', + 'Basic_A4', 'Standard_A0', 'Standard_A1', 'Standard_A2', 'Standard_A3', + 'Standard_A4', 'Standard_A5', 'Standard_A6', 'Standard_A7', 'Standard_A8', + 'Standard_A9', 'Standard_A10', 'Standard_A11', 'Standard_D1', + 'Standard_D2', 'Standard_D3', 'Standard_D4', 'Standard_D11', + 'Standard_D12', 'Standard_D13', 'Standard_D14', 'Standard_D1_v2', + 'Standard_D2_v2', 'Standard_D3_v2', 'Standard_D4_v2', 'Standard_D5_v2', + 'Standard_D11_v2', 'Standard_D12_v2', 'Standard_D13_v2', + 'Standard_D14_v2', 'Standard_DS1', 'Standard_DS2', 'Standard_DS3', + 'Standard_DS4', 'Standard_DS11', 'Standard_DS12', 'Standard_DS13', + 'Standard_DS14', 'Standard_G1', 'Standard_G2', 'Standard_G3', + 'Standard_G4', 'Standard_G5', 'Standard_GS1', 'Standard_GS2', + 'Standard_GS3', 'Standard_GS4', 'Standard_GS5' + :type vm_size: str or + ~azure.mgmt.compute.v2015_06_15.models.VirtualMachineSizeTypes + """ + + _attribute_map = { + 'vm_size': {'key': 'vmSize', 'type': 'str'}, + } + + def __init__(self, *, vm_size=None, **kwargs) -> None: + super(HardwareProfile, self).__init__(**kwargs) + self.vm_size = vm_size + + +class ImageReference(Model): + """Specifies information about the image to use. You can specify information + about platform images, marketplace images, or virtual machine images. This + element is required when you want to use a platform image, marketplace + image, or virtual machine image, but is not used in other creation + operations. + + :param publisher: The image publisher. + :type publisher: str + :param offer: Specifies the offer of the platform image or marketplace + image used to create the virtual machine. + :type offer: str + :param sku: The image SKU. + :type sku: str + :param version: Specifies the version of the platform image or marketplace + image used to create the virtual machine. The allowed formats are + Major.Minor.Build or 'latest'. Major, Minor, and Build are decimal + numbers. Specify 'latest' to use the latest version of an image available + at deploy time. Even if you use 'latest', the VM image will not + automatically update after deploy time even if a new version becomes + available. + :type version: str + """ + + _attribute_map = { + 'publisher': {'key': 'publisher', 'type': 'str'}, + 'offer': {'key': 'offer', 'type': 'str'}, + 'sku': {'key': 'sku', 'type': 'str'}, + 'version': {'key': 'version', 'type': 'str'}, + } + + def __init__(self, *, publisher: str=None, offer: str=None, sku: str=None, version: str=None, **kwargs) -> None: + super(ImageReference, self).__init__(**kwargs) + self.publisher = publisher + self.offer = offer + self.sku = sku + self.version = version + + +class InnerError(Model): + """Inner error details. + + :param exceptiontype: The exception type. + :type exceptiontype: str + :param errordetail: The internal error message or exception dump. + :type errordetail: str + """ + + _attribute_map = { + 'exceptiontype': {'key': 'exceptiontype', 'type': 'str'}, + 'errordetail': {'key': 'errordetail', 'type': 'str'}, + } + + def __init__(self, *, exceptiontype: str=None, errordetail: str=None, **kwargs) -> None: + super(InnerError, self).__init__(**kwargs) + self.exceptiontype = exceptiontype + self.errordetail = errordetail + + +class InstanceViewStatus(Model): + """Instance view status. + + :param code: The status code. + :type code: str + :param level: The level code. Possible values include: 'Info', 'Warning', + 'Error' + :type level: str or + ~azure.mgmt.compute.v2015_06_15.models.StatusLevelTypes + :param display_status: The short localizable label for the status. + :type display_status: str + :param message: The detailed status message, including for alerts and + error messages. + :type message: str + :param time: The time of the status. + :type time: datetime + """ + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + 'level': {'key': 'level', 'type': 'StatusLevelTypes'}, + 'display_status': {'key': 'displayStatus', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + 'time': {'key': 'time', 'type': 'iso-8601'}, + } + + def __init__(self, *, code: str=None, level=None, display_status: str=None, message: str=None, time=None, **kwargs) -> None: + super(InstanceViewStatus, self).__init__(**kwargs) + self.code = code + self.level = level + self.display_status = display_status + self.message = message + self.time = time + + +class KeyVaultKeyReference(Model): + """Describes a reference to Key Vault Key. + + All required parameters must be populated in order to send to Azure. + + :param key_url: Required. The URL referencing a key encryption key in Key + Vault. + :type key_url: str + :param source_vault: Required. The relative URL of the Key Vault + containing the key. + :type source_vault: ~azure.mgmt.compute.v2015_06_15.models.SubResource + """ + + _validation = { + 'key_url': {'required': True}, + 'source_vault': {'required': True}, + } + + _attribute_map = { + 'key_url': {'key': 'keyUrl', 'type': 'str'}, + 'source_vault': {'key': 'sourceVault', 'type': 'SubResource'}, + } + + def __init__(self, *, key_url: str, source_vault, **kwargs) -> None: + super(KeyVaultKeyReference, self).__init__(**kwargs) + self.key_url = key_url + self.source_vault = source_vault + + +class KeyVaultSecretReference(Model): + """Describes a reference to Key Vault Secret. + + All required parameters must be populated in order to send to Azure. + + :param secret_url: Required. The URL referencing a secret in a Key Vault. + :type secret_url: str + :param source_vault: Required. The relative URL of the Key Vault + containing the secret. + :type source_vault: ~azure.mgmt.compute.v2015_06_15.models.SubResource + """ + + _validation = { + 'secret_url': {'required': True}, + 'source_vault': {'required': True}, + } + + _attribute_map = { + 'secret_url': {'key': 'secretUrl', 'type': 'str'}, + 'source_vault': {'key': 'sourceVault', 'type': 'SubResource'}, + } + + def __init__(self, *, secret_url: str, source_vault, **kwargs) -> None: + super(KeyVaultSecretReference, self).__init__(**kwargs) + self.secret_url = secret_url + self.source_vault = source_vault + + +class LinuxConfiguration(Model): + """Specifies the Linux operating system settings on the virtual machine. +

    For a list of supported Linux distributions, see [Linux on + Azure-Endorsed + Distributions](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-endorsed-distros?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json) +

    For running non-endorsed distributions, see [Information for + Non-Endorsed + Distributions](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-create-upload-generic?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json). + + :param disable_password_authentication: Specifies whether password + authentication should be disabled. + :type disable_password_authentication: bool + :param ssh: Specifies the ssh key configuration for a Linux OS. + :type ssh: ~azure.mgmt.compute.v2015_06_15.models.SshConfiguration + """ + + _attribute_map = { + 'disable_password_authentication': {'key': 'disablePasswordAuthentication', 'type': 'bool'}, + 'ssh': {'key': 'ssh', 'type': 'SshConfiguration'}, + } + + def __init__(self, *, disable_password_authentication: bool=None, ssh=None, **kwargs) -> None: + super(LinuxConfiguration, self).__init__(**kwargs) + self.disable_password_authentication = disable_password_authentication + self.ssh = ssh + + +class SubResource(Model): + """SubResource. + + :param id: Resource Id + :type id: str + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + } + + def __init__(self, *, id: str=None, **kwargs) -> None: + super(SubResource, self).__init__(**kwargs) + self.id = id + + +class NetworkInterfaceReference(SubResource): + """Describes a network interface reference. + + :param id: Resource Id + :type id: str + :param primary: Specifies the primary network interface in case the + virtual machine has more than 1 network interface. + :type primary: bool + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'primary': {'key': 'properties.primary', 'type': 'bool'}, + } + + def __init__(self, *, id: str=None, primary: bool=None, **kwargs) -> None: + super(NetworkInterfaceReference, self).__init__(id=id, **kwargs) + self.primary = primary + + +class NetworkProfile(Model): + """Specifies the network interfaces of the virtual machine. + + :param network_interfaces: Specifies the list of resource Ids for the + network interfaces associated with the virtual machine. + :type network_interfaces: + list[~azure.mgmt.compute.v2015_06_15.models.NetworkInterfaceReference] + """ + + _attribute_map = { + 'network_interfaces': {'key': 'networkInterfaces', 'type': '[NetworkInterfaceReference]'}, + } + + def __init__(self, *, network_interfaces=None, **kwargs) -> None: + super(NetworkProfile, self).__init__(**kwargs) + self.network_interfaces = network_interfaces + + +class OperationStatusResponse(Model): + """Operation status response. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar name: Operation ID + :vartype name: str + :ivar status: Operation status + :vartype status: str + :ivar start_time: Start time of the operation + :vartype start_time: datetime + :ivar end_time: End time of the operation + :vartype end_time: datetime + :ivar error: Api error + :vartype error: ~azure.mgmt.compute.v2015_06_15.models.ApiError + """ + + _validation = { + 'name': {'readonly': True}, + 'status': {'readonly': True}, + 'start_time': {'readonly': True}, + 'end_time': {'readonly': True}, + 'error': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'status': {'key': 'status', 'type': 'str'}, + 'start_time': {'key': 'startTime', 'type': 'iso-8601'}, + 'end_time': {'key': 'endTime', 'type': 'iso-8601'}, + 'error': {'key': 'error', 'type': 'ApiError'}, + } + + def __init__(self, **kwargs) -> None: + super(OperationStatusResponse, self).__init__(**kwargs) + self.name = None + self.status = None + self.start_time = None + self.end_time = None + self.error = None + + +class OSDisk(Model): + """Specifies information about the operating system disk used by the virtual + machine.

    For more information about disks, see [About disks and + VHDs for Azure virtual + machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-about-disks-vhds?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). + + All required parameters must be populated in order to send to Azure. + + :param os_type: This property allows you to specify the type of the OS + that is included in the disk if creating a VM from user-image or a + specialized VHD.

    Possible values are:

    **Windows** +

    **Linux**. Possible values include: 'Windows', 'Linux' + :type os_type: str or + ~azure.mgmt.compute.v2015_06_15.models.OperatingSystemTypes + :param encryption_settings: Specifies the encryption settings for the OS + Disk.

    Minimum api-version: 2015-06-15 + :type encryption_settings: + ~azure.mgmt.compute.v2015_06_15.models.DiskEncryptionSettings + :param name: Required. The disk name. + :type name: str + :param vhd: Required. The virtual hard disk. + :type vhd: ~azure.mgmt.compute.v2015_06_15.models.VirtualHardDisk + :param image: The source user image virtual hard disk. The virtual hard + disk will be copied before being attached to the virtual machine. If + SourceImage is provided, the destination virtual hard drive must not + exist. + :type image: ~azure.mgmt.compute.v2015_06_15.models.VirtualHardDisk + :param caching: Specifies the caching requirements.

    Possible + values are:

    **None**

    **ReadOnly**

    **ReadWrite** +

    Default: **None for Standard storage. ReadOnly for Premium + storage**. Possible values include: 'None', 'ReadOnly', 'ReadWrite' + :type caching: str or ~azure.mgmt.compute.v2015_06_15.models.CachingTypes + :param create_option: Required. Specifies how the virtual machine should + be created.

    Possible values are:

    **Attach** \\u2013 This + value is used when you are using a specialized disk to create the virtual + machine.

    **FromImage** \\u2013 This value is used when you are + using an image to create the virtual machine. If you are using a platform + image, you also use the imageReference element described above. If you are + using a marketplace image, you also use the plan element previously + described. Possible values include: 'FromImage', 'Empty', 'Attach' + :type create_option: str or + ~azure.mgmt.compute.v2015_06_15.models.DiskCreateOptionTypes + :param disk_size_gb: Specifies the size of an empty data disk in + gigabytes. This element can be used to overwrite the size of the disk in a + virtual machine image.

    This value cannot be larger than 1023 GB + :type disk_size_gb: int + """ + + _validation = { + 'name': {'required': True}, + 'vhd': {'required': True}, + 'create_option': {'required': True}, + } + + _attribute_map = { + 'os_type': {'key': 'osType', 'type': 'OperatingSystemTypes'}, + 'encryption_settings': {'key': 'encryptionSettings', 'type': 'DiskEncryptionSettings'}, + 'name': {'key': 'name', 'type': 'str'}, + 'vhd': {'key': 'vhd', 'type': 'VirtualHardDisk'}, + 'image': {'key': 'image', 'type': 'VirtualHardDisk'}, + 'caching': {'key': 'caching', 'type': 'CachingTypes'}, + 'create_option': {'key': 'createOption', 'type': 'DiskCreateOptionTypes'}, + 'disk_size_gb': {'key': 'diskSizeGB', 'type': 'int'}, + } + + def __init__(self, *, name: str, vhd, create_option, os_type=None, encryption_settings=None, image=None, caching=None, disk_size_gb: int=None, **kwargs) -> None: + super(OSDisk, self).__init__(**kwargs) + self.os_type = os_type + self.encryption_settings = encryption_settings + self.name = name + self.vhd = vhd + self.image = image + self.caching = caching + self.create_option = create_option + self.disk_size_gb = disk_size_gb + + +class OSDiskImage(Model): + """Contains the os disk image information. + + All required parameters must be populated in order to send to Azure. + + :param operating_system: Required. The operating system of the + osDiskImage. Possible values include: 'Windows', 'Linux' + :type operating_system: str or + ~azure.mgmt.compute.v2015_06_15.models.OperatingSystemTypes + """ + + _validation = { + 'operating_system': {'required': True}, + } + + _attribute_map = { + 'operating_system': {'key': 'operatingSystem', 'type': 'OperatingSystemTypes'}, + } + + def __init__(self, *, operating_system, **kwargs) -> None: + super(OSDiskImage, self).__init__(**kwargs) + self.operating_system = operating_system + + +class OSProfile(Model): + """Specifies the operating system settings for the virtual machine. + + :param computer_name: Specifies the host OS name of the virtual machine. +

    This name cannot be updated after the VM is created.

    + **Max-length (Windows):** 15 characters

    **Max-length (Linux):** + 64 characters.

    For naming conventions and restrictions see [Azure + infrastructure services implementation + guidelines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-infrastructure-subscription-accounts-guidelines?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json#1-naming-conventions). + :type computer_name: str + :param admin_username: Specifies the name of the administrator account. +

    **Windows-only restriction:** Cannot end in "."

    + **Disallowed values:** "administrator", "admin", "user", "user1", "test", + "user2", "test1", "user3", "admin1", "1", "123", "a", "actuser", "adm", + "admin2", "aspnet", "backup", "console", "david", "guest", "john", + "owner", "root", "server", "sql", "support", "support_388945a0", "sys", + "test2", "test3", "user4", "user5".

    **Minimum-length (Linux):** 1 + character

    **Max-length (Linux):** 64 characters

    + **Max-length (Windows):** 20 characters

  • For root access to + the Linux VM, see [Using root privileges on Linux virtual machines in + Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-use-root-privileges?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json)
  • + For a list of built-in system users on Linux that should not be used in + this field, see [Selecting User Names for Linux on + Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-usernames?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json) + :type admin_username: str + :param admin_password: Specifies the password of the administrator + account.

    **Minimum-length (Windows):** 8 characters

    + **Minimum-length (Linux):** 6 characters

    **Max-length + (Windows):** 123 characters

    **Max-length (Linux):** 72 characters +

    **Complexity requirements:** 3 out of 4 conditions below need to + be fulfilled
    Has lower characters
    Has upper characters
    Has a + digit
    Has a special character (Regex match [\\W_])

    + **Disallowed values:** "abc@123", "P@$$w0rd", "P@ssw0rd", "P@ssword123", + "Pa$$word", "pass@word1", "Password!", "Password1", "Password22", + "iloveyou!"

    For resetting the password, see [How to reset the + Remote Desktop service or its login password in a Windows + VM](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-reset-rdp?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json) +

    For resetting root password, see [Manage users, SSH, and check or + repair disks on Azure Linux VMs using the VMAccess + Extension](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-using-vmaccess-extension?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json#reset-root-password) + :type admin_password: str + :param custom_data: Specifies a base-64 encoded string of custom data. The + base-64 encoded string is decoded to a binary array that is saved as a + file on the Virtual Machine. The maximum length of the binary array is + 65535 bytes.

    For using cloud-init for your VM, see [Using + cloud-init to customize a Linux VM during + creation](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-using-cloud-init?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json) + :type custom_data: str + :param windows_configuration: Specifies Windows operating system settings + on the virtual machine. + :type windows_configuration: + ~azure.mgmt.compute.v2015_06_15.models.WindowsConfiguration + :param linux_configuration: Specifies the Linux operating system settings + on the virtual machine.

    For a list of supported Linux + distributions, see [Linux on Azure-Endorsed + Distributions](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-endorsed-distros?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json) +

    For running non-endorsed distributions, see [Information for + Non-Endorsed + Distributions](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-create-upload-generic?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json). + :type linux_configuration: + ~azure.mgmt.compute.v2015_06_15.models.LinuxConfiguration + :param secrets: Specifies set of certificates that should be installed + onto the virtual machine. + :type secrets: + list[~azure.mgmt.compute.v2015_06_15.models.VaultSecretGroup] + """ + + _attribute_map = { + 'computer_name': {'key': 'computerName', 'type': 'str'}, + 'admin_username': {'key': 'adminUsername', 'type': 'str'}, + 'admin_password': {'key': 'adminPassword', 'type': 'str'}, + 'custom_data': {'key': 'customData', 'type': 'str'}, + 'windows_configuration': {'key': 'windowsConfiguration', 'type': 'WindowsConfiguration'}, + 'linux_configuration': {'key': 'linuxConfiguration', 'type': 'LinuxConfiguration'}, + 'secrets': {'key': 'secrets', 'type': '[VaultSecretGroup]'}, + } + + def __init__(self, *, computer_name: str=None, admin_username: str=None, admin_password: str=None, custom_data: str=None, windows_configuration=None, linux_configuration=None, secrets=None, **kwargs) -> None: + super(OSProfile, self).__init__(**kwargs) + self.computer_name = computer_name + self.admin_username = admin_username + self.admin_password = admin_password + self.custom_data = custom_data + self.windows_configuration = windows_configuration + self.linux_configuration = linux_configuration + self.secrets = secrets + + +class Plan(Model): + """Specifies information about the marketplace image used to create the + virtual machine. This element is only used for marketplace images. Before + you can use a marketplace image from an API, you must enable the image for + programmatic use. In the Azure portal, find the marketplace image that you + want to use and then click **Want to deploy programmatically, Get Started + ->**. Enter any required information and then click **Save**. + + :param name: The plan ID. + :type name: str + :param publisher: The publisher ID. + :type publisher: str + :param product: Specifies the product of the image from the marketplace. + This is the same value as Offer under the imageReference element. + :type product: str + :param promotion_code: The promotion code. + :type promotion_code: str + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'publisher': {'key': 'publisher', 'type': 'str'}, + 'product': {'key': 'product', 'type': 'str'}, + 'promotion_code': {'key': 'promotionCode', 'type': 'str'}, + } + + def __init__(self, *, name: str=None, publisher: str=None, product: str=None, promotion_code: str=None, **kwargs) -> None: + super(Plan, self).__init__(**kwargs) + self.name = name + self.publisher = publisher + self.product = product + self.promotion_code = promotion_code + + +class PurchasePlan(Model): + """Used for establishing the purchase context of any 3rd Party artifact + through MarketPlace. + + All required parameters must be populated in order to send to Azure. + + :param publisher: Required. The publisher ID. + :type publisher: str + :param name: Required. The plan ID. + :type name: str + :param product: Required. Specifies the product of the image from the + marketplace. This is the same value as Offer under the imageReference + element. + :type product: str + """ + + _validation = { + 'publisher': {'required': True}, + 'name': {'required': True}, + 'product': {'required': True}, + } + + _attribute_map = { + 'publisher': {'key': 'publisher', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'product': {'key': 'product', 'type': 'str'}, + } + + def __init__(self, *, publisher: str, name: str, product: str, **kwargs) -> None: + super(PurchasePlan, self).__init__(**kwargs) + self.publisher = publisher + self.name = name + self.product = product + + +class Sku(Model): + """Describes a virtual machine scale set sku. + + :param name: The sku name. + :type name: str + :param tier: Specifies the tier of virtual machines in a scale set.

    Possible Values:

    **Standard**

    **Basic** + :type tier: str + :param capacity: Specifies the number of virtual machines in the scale + set. + :type capacity: long + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'tier': {'key': 'tier', 'type': 'str'}, + 'capacity': {'key': 'capacity', 'type': 'long'}, + } + + def __init__(self, *, name: str=None, tier: str=None, capacity: int=None, **kwargs) -> None: + super(Sku, self).__init__(**kwargs) + self.name = name + self.tier = tier + self.capacity = capacity + + +class SshConfiguration(Model): + """SSH configuration for Linux based VMs running on Azure. + + :param public_keys: The list of SSH public keys used to authenticate with + linux based VMs. + :type public_keys: + list[~azure.mgmt.compute.v2015_06_15.models.SshPublicKey] + """ + + _attribute_map = { + 'public_keys': {'key': 'publicKeys', 'type': '[SshPublicKey]'}, + } + + def __init__(self, *, public_keys=None, **kwargs) -> None: + super(SshConfiguration, self).__init__(**kwargs) + self.public_keys = public_keys + + +class SshPublicKey(Model): + """Contains information about SSH certificate public key and the path on the + Linux VM where the public key is placed. + + :param path: Specifies the full path on the created VM where ssh public + key is stored. If the file already exists, the specified key is appended + to the file. Example: /home/user/.ssh/authorized_keys + :type path: str + :param key_data: SSH public key certificate used to authenticate with the + VM through ssh. The key needs to be at least 2048-bit and in ssh-rsa + format.

    For creating ssh keys, see [Create SSH keys on Linux and + Mac for Linux VMs in + Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-mac-create-ssh-keys?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json). + :type key_data: str + """ + + _attribute_map = { + 'path': {'key': 'path', 'type': 'str'}, + 'key_data': {'key': 'keyData', 'type': 'str'}, + } + + def __init__(self, *, path: str=None, key_data: str=None, **kwargs) -> None: + super(SshPublicKey, self).__init__(**kwargs) + self.path = path + self.key_data = key_data + + +class StorageProfile(Model): + """Specifies the storage settings for the virtual machine disks. + + :param image_reference: Specifies information about the image to use. You + can specify information about platform images, marketplace images, or + virtual machine images. This element is required when you want to use a + platform image, marketplace image, or virtual machine image, but is not + used in other creation operations. + :type image_reference: + ~azure.mgmt.compute.v2015_06_15.models.ImageReference + :param os_disk: Specifies information about the operating system disk used + by the virtual machine.

    For more information about disks, see + [About disks and VHDs for Azure virtual + machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-about-disks-vhds?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). + :type os_disk: ~azure.mgmt.compute.v2015_06_15.models.OSDisk + :param data_disks: Specifies the parameters that are used to add a data + disk to a virtual machine.

    For more information about disks, see + [About disks and VHDs for Azure virtual + machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-about-disks-vhds?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). + :type data_disks: list[~azure.mgmt.compute.v2015_06_15.models.DataDisk] + """ + + _attribute_map = { + 'image_reference': {'key': 'imageReference', 'type': 'ImageReference'}, + 'os_disk': {'key': 'osDisk', 'type': 'OSDisk'}, + 'data_disks': {'key': 'dataDisks', 'type': '[DataDisk]'}, + } + + def __init__(self, *, image_reference=None, os_disk=None, data_disks=None, **kwargs) -> None: + super(StorageProfile, self).__init__(**kwargs) + self.image_reference = image_reference + self.os_disk = os_disk + self.data_disks = data_disks + + +class UpdateResource(Model): + """The Update Resource model definition. + + :param tags: Resource tags + :type tags: dict[str, str] + """ + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__(self, *, tags=None, **kwargs) -> None: + super(UpdateResource, self).__init__(**kwargs) + self.tags = tags + + +class UpgradePolicy(Model): + """Describes an upgrade policy - automatic or manual. + + :param mode: Specifies the mode of an upgrade to virtual machines in the + scale set.

    Possible values are:

    **Manual** - You + control the application of updates to virtual machines in the scale set. + You do this by using the manualUpgrade action.

    **Automatic** - + All virtual machines in the scale set are automatically updated at the + same time. Possible values include: 'Automatic', 'Manual' + :type mode: str or ~azure.mgmt.compute.v2015_06_15.models.UpgradeMode + """ + + _attribute_map = { + 'mode': {'key': 'mode', 'type': 'UpgradeMode'}, + } + + def __init__(self, *, mode=None, **kwargs) -> None: + super(UpgradePolicy, self).__init__(**kwargs) + self.mode = mode + + +class Usage(Model): + """Describes Compute Resource Usage. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar unit: Required. An enum describing the unit of usage measurement. + Default value: "Count" . + :vartype unit: str + :param current_value: Required. The current usage of the resource. + :type current_value: int + :param limit: Required. The maximum permitted usage of the resource. + :type limit: long + :param name: Required. The name of the type of usage. + :type name: ~azure.mgmt.compute.v2015_06_15.models.UsageName + """ + + _validation = { + 'unit': {'required': True, 'constant': True}, + 'current_value': {'required': True}, + 'limit': {'required': True}, + 'name': {'required': True}, + } + + _attribute_map = { + 'unit': {'key': 'unit', 'type': 'str'}, + 'current_value': {'key': 'currentValue', 'type': 'int'}, + 'limit': {'key': 'limit', 'type': 'long'}, + 'name': {'key': 'name', 'type': 'UsageName'}, + } + + unit = "Count" + + def __init__(self, *, current_value: int, limit: int, name, **kwargs) -> None: + super(Usage, self).__init__(**kwargs) + self.current_value = current_value + self.limit = limit + self.name = name + + +class UsageName(Model): + """The Usage Names. + + :param value: The name of the resource. + :type value: str + :param localized_value: The localized name of the resource. + :type localized_value: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': 'str'}, + 'localized_value': {'key': 'localizedValue', 'type': 'str'}, + } + + def __init__(self, *, value: str=None, localized_value: str=None, **kwargs) -> None: + super(UsageName, self).__init__(**kwargs) + self.value = value + self.localized_value = localized_value + + +class VaultCertificate(Model): + """Describes a single certificate reference in a Key Vault, and where the + certificate should reside on the VM. + + :param certificate_url: This is the URL of a certificate that has been + uploaded to Key Vault as a secret. For adding a secret to the Key Vault, + see [Add a key or secret to the key + vault](https://docs.microsoft.com/azure/key-vault/key-vault-get-started/#add). + In this case, your certificate needs to be It is the Base64 encoding of + the following JSON Object which is encoded in UTF-8:

    {
    + "data":"",
    "dataType":"pfx",
    + "password":""
    } + :type certificate_url: str + :param certificate_store: For Windows VMs, specifies the certificate store + on the Virtual Machine to which the certificate should be added. The + specified certificate store is implicitly in the LocalMachine account. +

    For Linux VMs, the certificate file is placed under the + /var/lib/waagent directory, with the file name + <UppercaseThumbprint>.crt for the X509 certificate file and + <UppercaseThumbprint>.prv for private key. Both of these files are + .pem formatted. + :type certificate_store: str + """ + + _attribute_map = { + 'certificate_url': {'key': 'certificateUrl', 'type': 'str'}, + 'certificate_store': {'key': 'certificateStore', 'type': 'str'}, + } + + def __init__(self, *, certificate_url: str=None, certificate_store: str=None, **kwargs) -> None: + super(VaultCertificate, self).__init__(**kwargs) + self.certificate_url = certificate_url + self.certificate_store = certificate_store + + +class VaultSecretGroup(Model): + """Describes a set of certificates which are all in the same Key Vault. + + :param source_vault: The relative URL of the Key Vault containing all of + the certificates in VaultCertificates. + :type source_vault: ~azure.mgmt.compute.v2015_06_15.models.SubResource + :param vault_certificates: The list of key vault references in SourceVault + which contain certificates. + :type vault_certificates: + list[~azure.mgmt.compute.v2015_06_15.models.VaultCertificate] + """ + + _attribute_map = { + 'source_vault': {'key': 'sourceVault', 'type': 'SubResource'}, + 'vault_certificates': {'key': 'vaultCertificates', 'type': '[VaultCertificate]'}, + } + + def __init__(self, *, source_vault=None, vault_certificates=None, **kwargs) -> None: + super(VaultSecretGroup, self).__init__(**kwargs) + self.source_vault = source_vault + self.vault_certificates = vault_certificates + + +class VirtualHardDisk(Model): + """Describes the uri of a disk. + + :param uri: Specifies the virtual hard disk's uri. + :type uri: str + """ + + _attribute_map = { + 'uri': {'key': 'uri', 'type': 'str'}, + } + + def __init__(self, *, uri: str=None, **kwargs) -> None: + super(VirtualHardDisk, self).__init__(**kwargs) + self.uri = uri + + +class VirtualMachine(Resource): + """Describes a Virtual Machine. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource Id + :vartype id: str + :ivar name: Resource name + :vartype name: str + :ivar type: Resource type + :vartype type: str + :param location: Required. Resource location + :type location: str + :param tags: Resource tags + :type tags: dict[str, str] + :param plan: Specifies information about the marketplace image used to + create the virtual machine. This element is only used for marketplace + images. Before you can use a marketplace image from an API, you must + enable the image for programmatic use. In the Azure portal, find the + marketplace image that you want to use and then click **Want to deploy + programmatically, Get Started ->**. Enter any required information and + then click **Save**. + :type plan: ~azure.mgmt.compute.v2015_06_15.models.Plan + :param hardware_profile: Specifies the hardware settings for the virtual + machine. + :type hardware_profile: + ~azure.mgmt.compute.v2015_06_15.models.HardwareProfile + :param storage_profile: Specifies the storage settings for the virtual + machine disks. + :type storage_profile: + ~azure.mgmt.compute.v2015_06_15.models.StorageProfile + :param os_profile: Specifies the operating system settings for the virtual + machine. + :type os_profile: ~azure.mgmt.compute.v2015_06_15.models.OSProfile + :param network_profile: Specifies the network interfaces of the virtual + machine. + :type network_profile: + ~azure.mgmt.compute.v2015_06_15.models.NetworkProfile + :param diagnostics_profile: Specifies the boot diagnostic settings state. +

    Minimum api-version: 2015-06-15. + :type diagnostics_profile: + ~azure.mgmt.compute.v2015_06_15.models.DiagnosticsProfile + :param availability_set: Specifies information about the availability set + that the virtual machine should be assigned to. Virtual machines specified + in the same availability set are allocated to different nodes to maximize + availability. For more information about availability sets, see [Manage + the availability of virtual + machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-manage-availability?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). +

    For more information on Azure planned maintenance, see [Planned + maintenance for virtual machines in + Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-planned-maintenance?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json) +

    Currently, a VM can only be added to availability set at creation + time. An existing VM cannot be added to an availability set. + :type availability_set: ~azure.mgmt.compute.v2015_06_15.models.SubResource + :ivar provisioning_state: The provisioning state, which only appears in + the response. + :vartype provisioning_state: str + :ivar instance_view: The virtual machine instance view. + :vartype instance_view: + ~azure.mgmt.compute.v2015_06_15.models.VirtualMachineInstanceView + :param license_type: Specifies that the image or disk that is being used + was licensed on-premises. This element is only used for images that + contain the Windows Server operating system.

    Possible values are: +

    Windows_Client

    Windows_Server

    If this element + is included in a request for an update, the value must match the initial + value. This value cannot be updated.

    For more information, see + [Azure Hybrid Use Benefit for Windows + Server](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-hybrid-use-benefit-licensing?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json) +

    Minimum api-version: 2015-06-15 + :type license_type: str + :ivar resources: The virtual machine child extension resources. + :vartype resources: + list[~azure.mgmt.compute.v2015_06_15.models.VirtualMachineExtension] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + 'provisioning_state': {'readonly': True}, + 'instance_view': {'readonly': True}, + 'resources': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'plan': {'key': 'plan', 'type': 'Plan'}, + 'hardware_profile': {'key': 'properties.hardwareProfile', 'type': 'HardwareProfile'}, + 'storage_profile': {'key': 'properties.storageProfile', 'type': 'StorageProfile'}, + 'os_profile': {'key': 'properties.osProfile', 'type': 'OSProfile'}, + 'network_profile': {'key': 'properties.networkProfile', 'type': 'NetworkProfile'}, + 'diagnostics_profile': {'key': 'properties.diagnosticsProfile', 'type': 'DiagnosticsProfile'}, + 'availability_set': {'key': 'properties.availabilitySet', 'type': 'SubResource'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'instance_view': {'key': 'properties.instanceView', 'type': 'VirtualMachineInstanceView'}, + 'license_type': {'key': 'properties.licenseType', 'type': 'str'}, + 'resources': {'key': 'resources', 'type': '[VirtualMachineExtension]'}, + } + + def __init__(self, *, location: str, tags=None, plan=None, hardware_profile=None, storage_profile=None, os_profile=None, network_profile=None, diagnostics_profile=None, availability_set=None, license_type: str=None, **kwargs) -> None: + super(VirtualMachine, self).__init__(location=location, tags=tags, **kwargs) + self.plan = plan + self.hardware_profile = hardware_profile + self.storage_profile = storage_profile + self.os_profile = os_profile + self.network_profile = network_profile + self.diagnostics_profile = diagnostics_profile + self.availability_set = availability_set + self.provisioning_state = None + self.instance_view = None + self.license_type = license_type + self.resources = None + + +class VirtualMachineAgentInstanceView(Model): + """The instance view of the VM Agent running on the virtual machine. + + :param vm_agent_version: The VM Agent full version. + :type vm_agent_version: str + :param extension_handlers: The virtual machine extension handler instance + view. + :type extension_handlers: + list[~azure.mgmt.compute.v2015_06_15.models.VirtualMachineExtensionHandlerInstanceView] + :param statuses: The resource status information. + :type statuses: + list[~azure.mgmt.compute.v2015_06_15.models.InstanceViewStatus] + """ + + _attribute_map = { + 'vm_agent_version': {'key': 'vmAgentVersion', 'type': 'str'}, + 'extension_handlers': {'key': 'extensionHandlers', 'type': '[VirtualMachineExtensionHandlerInstanceView]'}, + 'statuses': {'key': 'statuses', 'type': '[InstanceViewStatus]'}, + } + + def __init__(self, *, vm_agent_version: str=None, extension_handlers=None, statuses=None, **kwargs) -> None: + super(VirtualMachineAgentInstanceView, self).__init__(**kwargs) + self.vm_agent_version = vm_agent_version + self.extension_handlers = extension_handlers + self.statuses = statuses + + +class VirtualMachineCaptureParameters(Model): + """Capture Virtual Machine parameters. + + All required parameters must be populated in order to send to Azure. + + :param vhd_prefix: Required. The captured virtual hard disk's name prefix. + :type vhd_prefix: str + :param destination_container_name: Required. The destination container + name. + :type destination_container_name: str + :param overwrite_vhds: Required. Specifies whether to overwrite the + destination virtual hard disk, in case of conflict. + :type overwrite_vhds: bool + """ + + _validation = { + 'vhd_prefix': {'required': True}, + 'destination_container_name': {'required': True}, + 'overwrite_vhds': {'required': True}, + } + + _attribute_map = { + 'vhd_prefix': {'key': 'vhdPrefix', 'type': 'str'}, + 'destination_container_name': {'key': 'destinationContainerName', 'type': 'str'}, + 'overwrite_vhds': {'key': 'overwriteVhds', 'type': 'bool'}, + } + + def __init__(self, *, vhd_prefix: str, destination_container_name: str, overwrite_vhds: bool, **kwargs) -> None: + super(VirtualMachineCaptureParameters, self).__init__(**kwargs) + self.vhd_prefix = vhd_prefix + self.destination_container_name = destination_container_name + self.overwrite_vhds = overwrite_vhds + + +class VirtualMachineCaptureResult(SubResource): + """Resource Id. + + :param id: Resource Id + :type id: str + :param output: Operation output data (raw JSON) + :type output: object + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'output': {'key': 'properties.output', 'type': 'object'}, + } + + def __init__(self, *, id: str=None, output=None, **kwargs) -> None: + super(VirtualMachineCaptureResult, self).__init__(id=id, **kwargs) + self.output = output + + +class VirtualMachineExtension(Resource): + """Describes a Virtual Machine Extension. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource Id + :vartype id: str + :ivar name: Resource name + :vartype name: str + :ivar type: Resource type + :vartype type: str + :param location: Required. Resource location + :type location: str + :param tags: Resource tags + :type tags: dict[str, str] + :param force_update_tag: How the extension handler should be forced to + update even if the extension configuration has not changed. + :type force_update_tag: str + :param publisher: The name of the extension handler publisher. + :type publisher: str + :param virtual_machine_extension_type: Specifies the type of the + extension; an example is "CustomScriptExtension". + :type virtual_machine_extension_type: str + :param type_handler_version: Specifies the version of the script handler. + :type type_handler_version: str + :param auto_upgrade_minor_version: Indicates whether the extension should + use a newer minor version if one is available at deployment time. Once + deployed, however, the extension will not upgrade minor versions unless + redeployed, even with this property set to true. + :type auto_upgrade_minor_version: bool + :param settings: Json formatted public settings for the extension. + :type settings: object + :param protected_settings: The extension can contain either + protectedSettings or protectedSettingsFromKeyVault or no protected + settings at all. + :type protected_settings: object + :ivar provisioning_state: The provisioning state, which only appears in + the response. + :vartype provisioning_state: str + :param instance_view: The virtual machine extension instance view. + :type instance_view: + ~azure.mgmt.compute.v2015_06_15.models.VirtualMachineExtensionInstanceView + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'force_update_tag': {'key': 'properties.forceUpdateTag', 'type': 'str'}, + 'publisher': {'key': 'properties.publisher', 'type': 'str'}, + 'virtual_machine_extension_type': {'key': 'properties.type', 'type': 'str'}, + 'type_handler_version': {'key': 'properties.typeHandlerVersion', 'type': 'str'}, + 'auto_upgrade_minor_version': {'key': 'properties.autoUpgradeMinorVersion', 'type': 'bool'}, + 'settings': {'key': 'properties.settings', 'type': 'object'}, + 'protected_settings': {'key': 'properties.protectedSettings', 'type': 'object'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'instance_view': {'key': 'properties.instanceView', 'type': 'VirtualMachineExtensionInstanceView'}, + } + + def __init__(self, *, location: str, tags=None, force_update_tag: str=None, publisher: str=None, virtual_machine_extension_type: str=None, type_handler_version: str=None, auto_upgrade_minor_version: bool=None, settings=None, protected_settings=None, instance_view=None, **kwargs) -> None: + super(VirtualMachineExtension, self).__init__(location=location, tags=tags, **kwargs) + self.force_update_tag = force_update_tag + self.publisher = publisher + self.virtual_machine_extension_type = virtual_machine_extension_type + self.type_handler_version = type_handler_version + self.auto_upgrade_minor_version = auto_upgrade_minor_version + self.settings = settings + self.protected_settings = protected_settings + self.provisioning_state = None + self.instance_view = instance_view + + +class VirtualMachineExtensionHandlerInstanceView(Model): + """The instance view of a virtual machine extension handler. + + :param type: Specifies the type of the extension; an example is + "CustomScriptExtension". + :type type: str + :param type_handler_version: Specifies the version of the script handler. + :type type_handler_version: str + :param status: The extension handler status. + :type status: ~azure.mgmt.compute.v2015_06_15.models.InstanceViewStatus + """ + + _attribute_map = { + 'type': {'key': 'type', 'type': 'str'}, + 'type_handler_version': {'key': 'typeHandlerVersion', 'type': 'str'}, + 'status': {'key': 'status', 'type': 'InstanceViewStatus'}, + } + + def __init__(self, *, type: str=None, type_handler_version: str=None, status=None, **kwargs) -> None: + super(VirtualMachineExtensionHandlerInstanceView, self).__init__(**kwargs) + self.type = type + self.type_handler_version = type_handler_version + self.status = status + + +class VirtualMachineExtensionImage(Resource): + """Describes a Virtual Machine Extension Image. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource Id + :vartype id: str + :ivar name: Resource name + :vartype name: str + :ivar type: Resource type + :vartype type: str + :param location: Required. Resource location + :type location: str + :param tags: Resource tags + :type tags: dict[str, str] + :param operating_system: Required. The operating system this extension + supports. + :type operating_system: str + :param compute_role: Required. The type of role (IaaS or PaaS) this + extension supports. + :type compute_role: str + :param handler_schema: Required. The schema defined by publisher, where + extension consumers should provide settings in a matching schema. + :type handler_schema: str + :param vm_scale_set_enabled: Whether the extension can be used on xRP + VMScaleSets. By default existing extensions are usable on scalesets, but + there might be cases where a publisher wants to explicitly indicate the + extension is only enabled for CRP VMs but not VMSS. + :type vm_scale_set_enabled: bool + :param supports_multiple_extensions: Whether the handler can support + multiple extensions. + :type supports_multiple_extensions: bool + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + 'operating_system': {'required': True}, + 'compute_role': {'required': True}, + 'handler_schema': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'operating_system': {'key': 'properties.operatingSystem', 'type': 'str'}, + 'compute_role': {'key': 'properties.computeRole', 'type': 'str'}, + 'handler_schema': {'key': 'properties.handlerSchema', 'type': 'str'}, + 'vm_scale_set_enabled': {'key': 'properties.vmScaleSetEnabled', 'type': 'bool'}, + 'supports_multiple_extensions': {'key': 'properties.supportsMultipleExtensions', 'type': 'bool'}, + } + + def __init__(self, *, location: str, operating_system: str, compute_role: str, handler_schema: str, tags=None, vm_scale_set_enabled: bool=None, supports_multiple_extensions: bool=None, **kwargs) -> None: + super(VirtualMachineExtensionImage, self).__init__(location=location, tags=tags, **kwargs) + self.operating_system = operating_system + self.compute_role = compute_role + self.handler_schema = handler_schema + self.vm_scale_set_enabled = vm_scale_set_enabled + self.supports_multiple_extensions = supports_multiple_extensions + + +class VirtualMachineExtensionInstanceView(Model): + """The instance view of a virtual machine extension. + + :param name: The virtual machine extension name. + :type name: str + :param type: Specifies the type of the extension; an example is + "CustomScriptExtension". + :type type: str + :param type_handler_version: Specifies the version of the script handler. + :type type_handler_version: str + :param substatuses: The resource status information. + :type substatuses: + list[~azure.mgmt.compute.v2015_06_15.models.InstanceViewStatus] + :param statuses: The resource status information. + :type statuses: + list[~azure.mgmt.compute.v2015_06_15.models.InstanceViewStatus] + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'type_handler_version': {'key': 'typeHandlerVersion', 'type': 'str'}, + 'substatuses': {'key': 'substatuses', 'type': '[InstanceViewStatus]'}, + 'statuses': {'key': 'statuses', 'type': '[InstanceViewStatus]'}, + } + + def __init__(self, *, name: str=None, type: str=None, type_handler_version: str=None, substatuses=None, statuses=None, **kwargs) -> None: + super(VirtualMachineExtensionInstanceView, self).__init__(**kwargs) + self.name = name + self.type = type + self.type_handler_version = type_handler_version + self.substatuses = substatuses + self.statuses = statuses + + +class VirtualMachineExtensionUpdate(UpdateResource): + """Describes a Virtual Machine Extension. + + :param tags: Resource tags + :type tags: dict[str, str] + :param force_update_tag: How the extension handler should be forced to + update even if the extension configuration has not changed. + :type force_update_tag: str + :param publisher: The name of the extension handler publisher. + :type publisher: str + :param type: Specifies the type of the extension; an example is + "CustomScriptExtension". + :type type: str + :param type_handler_version: Specifies the version of the script handler. + :type type_handler_version: str + :param auto_upgrade_minor_version: Indicates whether the extension should + use a newer minor version if one is available at deployment time. Once + deployed, however, the extension will not upgrade minor versions unless + redeployed, even with this property set to true. + :type auto_upgrade_minor_version: bool + :param settings: Json formatted public settings for the extension. + :type settings: object + :param protected_settings: The extension can contain either + protectedSettings or protectedSettingsFromKeyVault or no protected + settings at all. + :type protected_settings: object + """ + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + 'force_update_tag': {'key': 'properties.forceUpdateTag', 'type': 'str'}, + 'publisher': {'key': 'properties.publisher', 'type': 'str'}, + 'type': {'key': 'properties.type', 'type': 'str'}, + 'type_handler_version': {'key': 'properties.typeHandlerVersion', 'type': 'str'}, + 'auto_upgrade_minor_version': {'key': 'properties.autoUpgradeMinorVersion', 'type': 'bool'}, + 'settings': {'key': 'properties.settings', 'type': 'object'}, + 'protected_settings': {'key': 'properties.protectedSettings', 'type': 'object'}, + } + + def __init__(self, *, tags=None, force_update_tag: str=None, publisher: str=None, type: str=None, type_handler_version: str=None, auto_upgrade_minor_version: bool=None, settings=None, protected_settings=None, **kwargs) -> None: + super(VirtualMachineExtensionUpdate, self).__init__(tags=tags, **kwargs) + self.force_update_tag = force_update_tag + self.publisher = publisher + self.type = type + self.type_handler_version = type_handler_version + self.auto_upgrade_minor_version = auto_upgrade_minor_version + self.settings = settings + self.protected_settings = protected_settings + + +class VirtualMachineImageResource(SubResource): + """Virtual machine image resource information. + + All required parameters must be populated in order to send to Azure. + + :param id: Resource Id + :type id: str + :param name: Required. The name of the resource. + :type name: str + :param location: Required. The supported Azure location of the resource. + :type location: str + :param tags: Specifies the tags that are assigned to the virtual machine. + For more information about using tags, see [Using tags to organize your + Azure + resources](https://docs.microsoft.com/azure/azure-resource-manager/resource-group-using-tags.md). + :type tags: dict[str, str] + """ + + _validation = { + 'name': {'required': True}, + 'location': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__(self, *, name: str, location: str, id: str=None, tags=None, **kwargs) -> None: + super(VirtualMachineImageResource, self).__init__(id=id, **kwargs) + self.name = name + self.location = location + self.tags = tags + + +class VirtualMachineImage(VirtualMachineImageResource): + """Describes a Virtual Machine Image. + + All required parameters must be populated in order to send to Azure. + + :param id: Resource Id + :type id: str + :param name: Required. The name of the resource. + :type name: str + :param location: Required. The supported Azure location of the resource. + :type location: str + :param tags: Specifies the tags that are assigned to the virtual machine. + For more information about using tags, see [Using tags to organize your + Azure + resources](https://docs.microsoft.com/azure/azure-resource-manager/resource-group-using-tags.md). + :type tags: dict[str, str] + :param plan: + :type plan: ~azure.mgmt.compute.v2015_06_15.models.PurchasePlan + :param os_disk_image: + :type os_disk_image: ~azure.mgmt.compute.v2015_06_15.models.OSDiskImage + :param data_disk_images: + :type data_disk_images: + list[~azure.mgmt.compute.v2015_06_15.models.DataDiskImage] + """ + + _validation = { + 'name': {'required': True}, + 'location': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'plan': {'key': 'properties.plan', 'type': 'PurchasePlan'}, + 'os_disk_image': {'key': 'properties.osDiskImage', 'type': 'OSDiskImage'}, + 'data_disk_images': {'key': 'properties.dataDiskImages', 'type': '[DataDiskImage]'}, + } + + def __init__(self, *, name: str, location: str, id: str=None, tags=None, plan=None, os_disk_image=None, data_disk_images=None, **kwargs) -> None: + super(VirtualMachineImage, self).__init__(id=id, name=name, location=location, tags=tags, **kwargs) + self.plan = plan + self.os_disk_image = os_disk_image + self.data_disk_images = data_disk_images + + +class VirtualMachineInstanceView(Model): + """The instance view of a virtual machine. + + :param platform_update_domain: Specifies the update domain of the virtual + machine. + :type platform_update_domain: int + :param platform_fault_domain: Specifies the fault domain of the virtual + machine. + :type platform_fault_domain: int + :param rdp_thumb_print: The Remote desktop certificate thumbprint. + :type rdp_thumb_print: str + :param vm_agent: The VM Agent running on the virtual machine. + :type vm_agent: + ~azure.mgmt.compute.v2015_06_15.models.VirtualMachineAgentInstanceView + :param disks: The virtual machine disk information. + :type disks: list[~azure.mgmt.compute.v2015_06_15.models.DiskInstanceView] + :param extensions: The extensions information. + :type extensions: + list[~azure.mgmt.compute.v2015_06_15.models.VirtualMachineExtensionInstanceView] + :param boot_diagnostics: Boot Diagnostics is a debugging feature which + allows you to view Console Output and Screenshot to diagnose VM status. +

    You can easily view the output of your console log.

    + Azure also enables you to see a screenshot of the VM from the hypervisor. + :type boot_diagnostics: + ~azure.mgmt.compute.v2015_06_15.models.BootDiagnosticsInstanceView + :param statuses: The resource status information. + :type statuses: + list[~azure.mgmt.compute.v2015_06_15.models.InstanceViewStatus] + """ + + _attribute_map = { + 'platform_update_domain': {'key': 'platformUpdateDomain', 'type': 'int'}, + 'platform_fault_domain': {'key': 'platformFaultDomain', 'type': 'int'}, + 'rdp_thumb_print': {'key': 'rdpThumbPrint', 'type': 'str'}, + 'vm_agent': {'key': 'vmAgent', 'type': 'VirtualMachineAgentInstanceView'}, + 'disks': {'key': 'disks', 'type': '[DiskInstanceView]'}, + 'extensions': {'key': 'extensions', 'type': '[VirtualMachineExtensionInstanceView]'}, + 'boot_diagnostics': {'key': 'bootDiagnostics', 'type': 'BootDiagnosticsInstanceView'}, + 'statuses': {'key': 'statuses', 'type': '[InstanceViewStatus]'}, + } + + def __init__(self, *, platform_update_domain: int=None, platform_fault_domain: int=None, rdp_thumb_print: str=None, vm_agent=None, disks=None, extensions=None, boot_diagnostics=None, statuses=None, **kwargs) -> None: + super(VirtualMachineInstanceView, self).__init__(**kwargs) + self.platform_update_domain = platform_update_domain + self.platform_fault_domain = platform_fault_domain + self.rdp_thumb_print = rdp_thumb_print + self.vm_agent = vm_agent + self.disks = disks + self.extensions = extensions + self.boot_diagnostics = boot_diagnostics + self.statuses = statuses + + +class VirtualMachineScaleSet(Resource): + """Describes a Virtual Machine Scale Set. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource Id + :vartype id: str + :ivar name: Resource name + :vartype name: str + :ivar type: Resource type + :vartype type: str + :param location: Required. Resource location + :type location: str + :param tags: Resource tags + :type tags: dict[str, str] + :param sku: The virtual machine scale set sku. + :type sku: ~azure.mgmt.compute.v2015_06_15.models.Sku + :param upgrade_policy: The upgrade policy. + :type upgrade_policy: ~azure.mgmt.compute.v2015_06_15.models.UpgradePolicy + :param virtual_machine_profile: The virtual machine profile. + :type virtual_machine_profile: + ~azure.mgmt.compute.v2015_06_15.models.VirtualMachineScaleSetVMProfile + :param provisioning_state: The provisioning state, which only appears in + the response. + :type provisioning_state: str + :param over_provision: Specifies whether the Virtual Machine Scale Set + should be overprovisioned. + :type over_provision: bool + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'sku': {'key': 'sku', 'type': 'Sku'}, + 'upgrade_policy': {'key': 'properties.upgradePolicy', 'type': 'UpgradePolicy'}, + 'virtual_machine_profile': {'key': 'properties.virtualMachineProfile', 'type': 'VirtualMachineScaleSetVMProfile'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'over_provision': {'key': 'properties.overProvision', 'type': 'bool'}, + } + + def __init__(self, *, location: str, tags=None, sku=None, upgrade_policy=None, virtual_machine_profile=None, provisioning_state: str=None, over_provision: bool=None, **kwargs) -> None: + super(VirtualMachineScaleSet, self).__init__(location=location, tags=tags, **kwargs) + self.sku = sku + self.upgrade_policy = upgrade_policy + self.virtual_machine_profile = virtual_machine_profile + self.provisioning_state = provisioning_state + self.over_provision = over_provision + + +class VirtualMachineScaleSetExtension(SubResource): + """Describes a Virtual Machine Scale Set Extension. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :param id: Resource Id + :type id: str + :param name: The name of the extension. + :type name: str + :param publisher: The name of the extension handler publisher. + :type publisher: str + :param type: The type of the extension handler. + :type type: str + :param type_handler_version: The type version of the extension handler. + :type type_handler_version: str + :param auto_upgrade_minor_version: Whether the extension handler should be + automatically upgraded across minor versions. + :type auto_upgrade_minor_version: bool + :param settings: Json formatted public settings for the extension. + :type settings: object + :param protected_settings: Json formatted protected settings for the + extension. + :type protected_settings: object + :ivar provisioning_state: The provisioning state, which only appears in + the response. + :vartype provisioning_state: str + """ + + _validation = { + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'publisher': {'key': 'properties.publisher', 'type': 'str'}, + 'type': {'key': 'properties.type', 'type': 'str'}, + 'type_handler_version': {'key': 'properties.typeHandlerVersion', 'type': 'str'}, + 'auto_upgrade_minor_version': {'key': 'properties.autoUpgradeMinorVersion', 'type': 'bool'}, + 'settings': {'key': 'properties.settings', 'type': 'object'}, + 'protected_settings': {'key': 'properties.protectedSettings', 'type': 'object'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + } + + def __init__(self, *, id: str=None, name: str=None, publisher: str=None, type: str=None, type_handler_version: str=None, auto_upgrade_minor_version: bool=None, settings=None, protected_settings=None, **kwargs) -> None: + super(VirtualMachineScaleSetExtension, self).__init__(id=id, **kwargs) + self.name = name + self.publisher = publisher + self.type = type + self.type_handler_version = type_handler_version + self.auto_upgrade_minor_version = auto_upgrade_minor_version + self.settings = settings + self.protected_settings = protected_settings + self.provisioning_state = None + + +class VirtualMachineScaleSetExtensionProfile(Model): + """Describes a virtual machine scale set extension profile. + + :param extensions: The virtual machine scale set child extension + resources. + :type extensions: + list[~azure.mgmt.compute.v2015_06_15.models.VirtualMachineScaleSetExtension] + """ + + _attribute_map = { + 'extensions': {'key': 'extensions', 'type': '[VirtualMachineScaleSetExtension]'}, + } + + def __init__(self, *, extensions=None, **kwargs) -> None: + super(VirtualMachineScaleSetExtensionProfile, self).__init__(**kwargs) + self.extensions = extensions + + +class VirtualMachineScaleSetInstanceView(Model): + """The instance view of a virtual machine scale set. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar virtual_machine: The instance view status summary for the virtual + machine scale set. + :vartype virtual_machine: + ~azure.mgmt.compute.v2015_06_15.models.VirtualMachineScaleSetInstanceViewStatusesSummary + :ivar extensions: The extensions information. + :vartype extensions: + list[~azure.mgmt.compute.v2015_06_15.models.VirtualMachineScaleSetVMExtensionsSummary] + :param statuses: The resource status information. + :type statuses: + list[~azure.mgmt.compute.v2015_06_15.models.InstanceViewStatus] + """ + + _validation = { + 'virtual_machine': {'readonly': True}, + 'extensions': {'readonly': True}, + } + + _attribute_map = { + 'virtual_machine': {'key': 'virtualMachine', 'type': 'VirtualMachineScaleSetInstanceViewStatusesSummary'}, + 'extensions': {'key': 'extensions', 'type': '[VirtualMachineScaleSetVMExtensionsSummary]'}, + 'statuses': {'key': 'statuses', 'type': '[InstanceViewStatus]'}, + } + + def __init__(self, *, statuses=None, **kwargs) -> None: + super(VirtualMachineScaleSetInstanceView, self).__init__(**kwargs) + self.virtual_machine = None + self.extensions = None + self.statuses = statuses + + +class VirtualMachineScaleSetInstanceViewStatusesSummary(Model): + """Instance view statuses summary for virtual machines of a virtual machine + scale set. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar statuses_summary: The extensions information. + :vartype statuses_summary: + list[~azure.mgmt.compute.v2015_06_15.models.VirtualMachineStatusCodeCount] + """ + + _validation = { + 'statuses_summary': {'readonly': True}, + } + + _attribute_map = { + 'statuses_summary': {'key': 'statusesSummary', 'type': '[VirtualMachineStatusCodeCount]'}, + } + + def __init__(self, **kwargs) -> None: + super(VirtualMachineScaleSetInstanceViewStatusesSummary, self).__init__(**kwargs) + self.statuses_summary = None + + +class VirtualMachineScaleSetIPConfiguration(SubResource): + """Describes a virtual machine scale set network profile's IP configuration. + + All required parameters must be populated in order to send to Azure. + + :param id: Resource Id + :type id: str + :param name: Required. The IP configuration name. + :type name: str + :param subnet: Required. The subnet. + :type subnet: ~azure.mgmt.compute.v2015_06_15.models.ApiEntityReference + :param load_balancer_backend_address_pools: The load balancer backend + address pools. + :type load_balancer_backend_address_pools: + list[~azure.mgmt.compute.v2015_06_15.models.SubResource] + :param load_balancer_inbound_nat_pools: The load balancer inbound nat + pools. + :type load_balancer_inbound_nat_pools: + list[~azure.mgmt.compute.v2015_06_15.models.SubResource] + """ + + _validation = { + 'name': {'required': True}, + 'subnet': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'subnet': {'key': 'properties.subnet', 'type': 'ApiEntityReference'}, + 'load_balancer_backend_address_pools': {'key': 'properties.loadBalancerBackendAddressPools', 'type': '[SubResource]'}, + 'load_balancer_inbound_nat_pools': {'key': 'properties.loadBalancerInboundNatPools', 'type': '[SubResource]'}, + } + + def __init__(self, *, name: str, subnet, id: str=None, load_balancer_backend_address_pools=None, load_balancer_inbound_nat_pools=None, **kwargs) -> None: + super(VirtualMachineScaleSetIPConfiguration, self).__init__(id=id, **kwargs) + self.name = name + self.subnet = subnet + self.load_balancer_backend_address_pools = load_balancer_backend_address_pools + self.load_balancer_inbound_nat_pools = load_balancer_inbound_nat_pools + + +class VirtualMachineScaleSetNetworkConfiguration(SubResource): + """Describes a virtual machine scale set network profile's network + configurations. + + All required parameters must be populated in order to send to Azure. + + :param id: Resource Id + :type id: str + :param name: Required. The network configuration name. + :type name: str + :param primary: Whether this is a primary NIC on a virtual machine. + :type primary: bool + :param ip_configurations: Required. The virtual machine scale set IP + Configuration. + :type ip_configurations: + list[~azure.mgmt.compute.v2015_06_15.models.VirtualMachineScaleSetIPConfiguration] + """ + + _validation = { + 'name': {'required': True}, + 'ip_configurations': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'primary': {'key': 'properties.primary', 'type': 'bool'}, + 'ip_configurations': {'key': 'properties.ipConfigurations', 'type': '[VirtualMachineScaleSetIPConfiguration]'}, + } + + def __init__(self, *, name: str, ip_configurations, id: str=None, primary: bool=None, **kwargs) -> None: + super(VirtualMachineScaleSetNetworkConfiguration, self).__init__(id=id, **kwargs) + self.name = name + self.primary = primary + self.ip_configurations = ip_configurations + + +class VirtualMachineScaleSetNetworkProfile(Model): + """Describes a virtual machine scale set network profile. + + :param network_interface_configurations: The list of network + configurations. + :type network_interface_configurations: + list[~azure.mgmt.compute.v2015_06_15.models.VirtualMachineScaleSetNetworkConfiguration] + """ + + _attribute_map = { + 'network_interface_configurations': {'key': 'networkInterfaceConfigurations', 'type': '[VirtualMachineScaleSetNetworkConfiguration]'}, + } + + def __init__(self, *, network_interface_configurations=None, **kwargs) -> None: + super(VirtualMachineScaleSetNetworkProfile, self).__init__(**kwargs) + self.network_interface_configurations = network_interface_configurations + + +class VirtualMachineScaleSetOSDisk(Model): + """Describes a virtual machine scale set operating system disk. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. The disk name. + :type name: str + :param caching: Specifies the caching requirements.

    Possible + values are:

    **None**

    **ReadOnly**

    **ReadWrite** +

    Default: **None for Standard storage. ReadOnly for Premium + storage**. Possible values include: 'None', 'ReadOnly', 'ReadWrite' + :type caching: str or ~azure.mgmt.compute.v2015_06_15.models.CachingTypes + :param create_option: Required. Specifies how the virtual machines in the + scale set should be created.

    The only allowed value is: + **FromImage** \\u2013 This value is used when you are using an image to + create the virtual machine. If you are using a platform image, you also + use the imageReference element described above. If you are using a + marketplace image, you also use the plan element previously described. + Possible values include: 'FromImage', 'Empty', 'Attach' + :type create_option: str or + ~azure.mgmt.compute.v2015_06_15.models.DiskCreateOptionTypes + :param os_type: This property allows you to specify the type of the OS + that is included in the disk if creating a VM from user-image or a + specialized VHD.

    Possible values are:

    **Windows** +

    **Linux**. Possible values include: 'Windows', 'Linux' + :type os_type: str or + ~azure.mgmt.compute.v2015_06_15.models.OperatingSystemTypes + :param image: The Source User Image VirtualHardDisk. This VirtualHardDisk + will be copied before using it to attach to the Virtual Machine. If + SourceImage is provided, the destination VirtualHardDisk should not exist. + :type image: ~azure.mgmt.compute.v2015_06_15.models.VirtualHardDisk + :param vhd_containers: The list of virtual hard disk container uris. + :type vhd_containers: list[str] + """ + + _validation = { + 'name': {'required': True}, + 'create_option': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'caching': {'key': 'caching', 'type': 'CachingTypes'}, + 'create_option': {'key': 'createOption', 'type': 'DiskCreateOptionTypes'}, + 'os_type': {'key': 'osType', 'type': 'OperatingSystemTypes'}, + 'image': {'key': 'image', 'type': 'VirtualHardDisk'}, + 'vhd_containers': {'key': 'vhdContainers', 'type': '[str]'}, + } + + def __init__(self, *, name: str, create_option, caching=None, os_type=None, image=None, vhd_containers=None, **kwargs) -> None: + super(VirtualMachineScaleSetOSDisk, self).__init__(**kwargs) + self.name = name + self.caching = caching + self.create_option = create_option + self.os_type = os_type + self.image = image + self.vhd_containers = vhd_containers + + +class VirtualMachineScaleSetOSProfile(Model): + """Describes a virtual machine scale set OS profile. + + :param computer_name_prefix: Specifies the computer name prefix for all of + the virtual machines in the scale set. Computer name prefixes must be 1 to + 15 characters long. + :type computer_name_prefix: str + :param admin_username: Specifies the name of the administrator account. +

    **Windows-only restriction:** Cannot end in "."

    + **Disallowed values:** "administrator", "admin", "user", "user1", "test", + "user2", "test1", "user3", "admin1", "1", "123", "a", "actuser", "adm", + "admin2", "aspnet", "backup", "console", "david", "guest", "john", + "owner", "root", "server", "sql", "support", "support_388945a0", "sys", + "test2", "test3", "user4", "user5".

    **Minimum-length (Linux):** 1 + character

    **Max-length (Linux):** 64 characters

    + **Max-length (Windows):** 20 characters

  • For root access to + the Linux VM, see [Using root privileges on Linux virtual machines in + Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-use-root-privileges?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json)
  • + For a list of built-in system users on Linux that should not be used in + this field, see [Selecting User Names for Linux on + Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-usernames?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json) + :type admin_username: str + :param admin_password: Specifies the password of the administrator + account.

    **Minimum-length (Windows):** 8 characters

    + **Minimum-length (Linux):** 6 characters

    **Max-length + (Windows):** 123 characters

    **Max-length (Linux):** 72 characters +

    **Complexity requirements:** 3 out of 4 conditions below need to + be fulfilled
    Has lower characters
    Has upper characters
    Has a + digit
    Has a special character (Regex match [\\W_])

    + **Disallowed values:** "abc@123", "P@$$w0rd", "P@ssw0rd", "P@ssword123", + "Pa$$word", "pass@word1", "Password!", "Password1", "Password22", + "iloveyou!"

    For resetting the password, see [How to reset the + Remote Desktop service or its login password in a Windows + VM](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-reset-rdp?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json) +

    For resetting root password, see [Manage users, SSH, and check or + repair disks on Azure Linux VMs using the VMAccess + Extension](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-using-vmaccess-extension?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json#reset-root-password) + :type admin_password: str + :param custom_data: A base-64 encoded string of custom data. + :type custom_data: str + :param windows_configuration: The Windows Configuration of the OS profile. + :type windows_configuration: + ~azure.mgmt.compute.v2015_06_15.models.WindowsConfiguration + :param linux_configuration: The Linux Configuration of the OS profile. + :type linux_configuration: + ~azure.mgmt.compute.v2015_06_15.models.LinuxConfiguration + :param secrets: The List of certificates for addition to the VM. + :type secrets: + list[~azure.mgmt.compute.v2015_06_15.models.VaultSecretGroup] + """ + + _attribute_map = { + 'computer_name_prefix': {'key': 'computerNamePrefix', 'type': 'str'}, + 'admin_username': {'key': 'adminUsername', 'type': 'str'}, + 'admin_password': {'key': 'adminPassword', 'type': 'str'}, + 'custom_data': {'key': 'customData', 'type': 'str'}, + 'windows_configuration': {'key': 'windowsConfiguration', 'type': 'WindowsConfiguration'}, + 'linux_configuration': {'key': 'linuxConfiguration', 'type': 'LinuxConfiguration'}, + 'secrets': {'key': 'secrets', 'type': '[VaultSecretGroup]'}, + } + + def __init__(self, *, computer_name_prefix: str=None, admin_username: str=None, admin_password: str=None, custom_data: str=None, windows_configuration=None, linux_configuration=None, secrets=None, **kwargs) -> None: + super(VirtualMachineScaleSetOSProfile, self).__init__(**kwargs) + self.computer_name_prefix = computer_name_prefix + self.admin_username = admin_username + self.admin_password = admin_password + self.custom_data = custom_data + self.windows_configuration = windows_configuration + self.linux_configuration = linux_configuration + self.secrets = secrets + + +class VirtualMachineScaleSetSku(Model): + """Describes an available virtual machine scale set sku. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar resource_type: The type of resource the sku applies to. + :vartype resource_type: str + :ivar sku: The Sku. + :vartype sku: ~azure.mgmt.compute.v2015_06_15.models.Sku + :ivar capacity: Specifies the number of virtual machines in the scale set. + :vartype capacity: + ~azure.mgmt.compute.v2015_06_15.models.VirtualMachineScaleSetSkuCapacity + """ + + _validation = { + 'resource_type': {'readonly': True}, + 'sku': {'readonly': True}, + 'capacity': {'readonly': True}, + } + + _attribute_map = { + 'resource_type': {'key': 'resourceType', 'type': 'str'}, + 'sku': {'key': 'sku', 'type': 'Sku'}, + 'capacity': {'key': 'capacity', 'type': 'VirtualMachineScaleSetSkuCapacity'}, + } + + def __init__(self, **kwargs) -> None: + super(VirtualMachineScaleSetSku, self).__init__(**kwargs) + self.resource_type = None + self.sku = None + self.capacity = None + + +class VirtualMachineScaleSetSkuCapacity(Model): + """Describes scaling information of a sku. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar minimum: The minimum capacity. + :vartype minimum: long + :ivar maximum: The maximum capacity that can be set. + :vartype maximum: long + :ivar default_capacity: The default capacity. + :vartype default_capacity: long + :ivar scale_type: The scale type applicable to the sku. Possible values + include: 'Automatic', 'None' + :vartype scale_type: str or + ~azure.mgmt.compute.v2015_06_15.models.VirtualMachineScaleSetSkuScaleType + """ + + _validation = { + 'minimum': {'readonly': True}, + 'maximum': {'readonly': True}, + 'default_capacity': {'readonly': True}, + 'scale_type': {'readonly': True}, + } + + _attribute_map = { + 'minimum': {'key': 'minimum', 'type': 'long'}, + 'maximum': {'key': 'maximum', 'type': 'long'}, + 'default_capacity': {'key': 'defaultCapacity', 'type': 'long'}, + 'scale_type': {'key': 'scaleType', 'type': 'VirtualMachineScaleSetSkuScaleType'}, + } + + def __init__(self, **kwargs) -> None: + super(VirtualMachineScaleSetSkuCapacity, self).__init__(**kwargs) + self.minimum = None + self.maximum = None + self.default_capacity = None + self.scale_type = None + + +class VirtualMachineScaleSetStorageProfile(Model): + """Describes a virtual machine scale set storage profile. + + :param image_reference: The image reference. + :type image_reference: + ~azure.mgmt.compute.v2015_06_15.models.ImageReference + :param os_disk: The OS disk. + :type os_disk: + ~azure.mgmt.compute.v2015_06_15.models.VirtualMachineScaleSetOSDisk + """ + + _attribute_map = { + 'image_reference': {'key': 'imageReference', 'type': 'ImageReference'}, + 'os_disk': {'key': 'osDisk', 'type': 'VirtualMachineScaleSetOSDisk'}, + } + + def __init__(self, *, image_reference=None, os_disk=None, **kwargs) -> None: + super(VirtualMachineScaleSetStorageProfile, self).__init__(**kwargs) + self.image_reference = image_reference + self.os_disk = os_disk + + +class VirtualMachineScaleSetVM(Resource): + """Describes a virtual machine scale set virtual machine. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource Id + :vartype id: str + :ivar name: Resource name + :vartype name: str + :ivar type: Resource type + :vartype type: str + :param location: Required. Resource location + :type location: str + :param tags: Resource tags + :type tags: dict[str, str] + :ivar instance_id: The virtual machine instance ID. + :vartype instance_id: str + :ivar sku: The virtual machine SKU. + :vartype sku: ~azure.mgmt.compute.v2015_06_15.models.Sku + :ivar latest_model_applied: Specifies whether the latest model has been + applied to the virtual machine. + :vartype latest_model_applied: bool + :ivar instance_view: The virtual machine instance view. + :vartype instance_view: + ~azure.mgmt.compute.v2015_06_15.models.VirtualMachineScaleSetVMInstanceView + :param hardware_profile: Specifies the hardware settings for the virtual + machine. + :type hardware_profile: + ~azure.mgmt.compute.v2015_06_15.models.HardwareProfile + :param storage_profile: Specifies the storage settings for the virtual + machine disks. + :type storage_profile: + ~azure.mgmt.compute.v2015_06_15.models.StorageProfile + :param os_profile: Specifies the operating system settings for the virtual + machine. + :type os_profile: ~azure.mgmt.compute.v2015_06_15.models.OSProfile + :param network_profile: Specifies the network interfaces of the virtual + machine. + :type network_profile: + ~azure.mgmt.compute.v2015_06_15.models.NetworkProfile + :param diagnostics_profile: Specifies the boot diagnostic settings state. +

    Minimum api-version: 2015-06-15. + :type diagnostics_profile: + ~azure.mgmt.compute.v2015_06_15.models.DiagnosticsProfile + :param availability_set: Specifies information about the availability set + that the virtual machine should be assigned to. Virtual machines specified + in the same availability set are allocated to different nodes to maximize + availability. For more information about availability sets, see [Manage + the availability of virtual + machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-manage-availability?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). +

    For more information on Azure planned maintenance, see [Planned + maintenance for virtual machines in + Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-planned-maintenance?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json) +

    Currently, a VM can only be added to availability set at creation + time. An existing VM cannot be added to an availability set. + :type availability_set: ~azure.mgmt.compute.v2015_06_15.models.SubResource + :param provisioning_state: The provisioning state, which only appears in + the response. + :type provisioning_state: str + :param license_type: Specifies that the image or disk that is being used + was licensed on-premises. This element is only used for images that + contain the Windows Server operating system.

    Possible values are: +

    Windows_Client

    Windows_Server

    If this element + is included in a request for an update, the value must match the initial + value. This value cannot be updated.

    For more information, see + [Azure Hybrid Use Benefit for Windows + Server](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-hybrid-use-benefit-licensing?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json) +

    Minimum api-version: 2015-06-15 + :type license_type: str + :param plan: Specifies information about the marketplace image used to + create the virtual machine. This element is only used for marketplace + images. Before you can use a marketplace image from an API, you must + enable the image for programmatic use. In the Azure portal, find the + marketplace image that you want to use and then click **Want to deploy + programmatically, Get Started ->**. Enter any required information and + then click **Save**. + :type plan: ~azure.mgmt.compute.v2015_06_15.models.Plan + :ivar resources: The virtual machine child extension resources. + :vartype resources: + list[~azure.mgmt.compute.v2015_06_15.models.VirtualMachineExtension] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + 'instance_id': {'readonly': True}, + 'sku': {'readonly': True}, + 'latest_model_applied': {'readonly': True}, + 'instance_view': {'readonly': True}, + 'resources': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'instance_id': {'key': 'instanceId', 'type': 'str'}, + 'sku': {'key': 'sku', 'type': 'Sku'}, + 'latest_model_applied': {'key': 'properties.latestModelApplied', 'type': 'bool'}, + 'instance_view': {'key': 'properties.instanceView', 'type': 'VirtualMachineScaleSetVMInstanceView'}, + 'hardware_profile': {'key': 'properties.hardwareProfile', 'type': 'HardwareProfile'}, + 'storage_profile': {'key': 'properties.storageProfile', 'type': 'StorageProfile'}, + 'os_profile': {'key': 'properties.osProfile', 'type': 'OSProfile'}, + 'network_profile': {'key': 'properties.networkProfile', 'type': 'NetworkProfile'}, + 'diagnostics_profile': {'key': 'properties.diagnosticsProfile', 'type': 'DiagnosticsProfile'}, + 'availability_set': {'key': 'properties.availabilitySet', 'type': 'SubResource'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'license_type': {'key': 'properties.licenseType', 'type': 'str'}, + 'plan': {'key': 'plan', 'type': 'Plan'}, + 'resources': {'key': 'resources', 'type': '[VirtualMachineExtension]'}, + } + + def __init__(self, *, location: str, tags=None, hardware_profile=None, storage_profile=None, os_profile=None, network_profile=None, diagnostics_profile=None, availability_set=None, provisioning_state: str=None, license_type: str=None, plan=None, **kwargs) -> None: + super(VirtualMachineScaleSetVM, self).__init__(location=location, tags=tags, **kwargs) + self.instance_id = None + self.sku = None + self.latest_model_applied = None + self.instance_view = None + self.hardware_profile = hardware_profile + self.storage_profile = storage_profile + self.os_profile = os_profile + self.network_profile = network_profile + self.diagnostics_profile = diagnostics_profile + self.availability_set = availability_set + self.provisioning_state = provisioning_state + self.license_type = license_type + self.plan = plan + self.resources = None + + +class VirtualMachineScaleSetVMExtensionsSummary(Model): + """Extensions summary for virtual machines of a virtual machine scale set. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar name: The extension name. + :vartype name: str + :ivar statuses_summary: The extensions information. + :vartype statuses_summary: + list[~azure.mgmt.compute.v2015_06_15.models.VirtualMachineStatusCodeCount] + """ + + _validation = { + 'name': {'readonly': True}, + 'statuses_summary': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'statuses_summary': {'key': 'statusesSummary', 'type': '[VirtualMachineStatusCodeCount]'}, + } + + def __init__(self, **kwargs) -> None: + super(VirtualMachineScaleSetVMExtensionsSummary, self).__init__(**kwargs) + self.name = None + self.statuses_summary = None + + +class VirtualMachineScaleSetVMInstanceIDs(Model): + """Specifies a list of virtual machine instance IDs from the VM scale set. + + :param instance_ids: The virtual machine scale set instance ids. Omitting + the virtual machine scale set instance ids will result in the operation + being performed on all virtual machines in the virtual machine scale set. + :type instance_ids: list[str] + """ + + _attribute_map = { + 'instance_ids': {'key': 'instanceIds', 'type': '[str]'}, + } + + def __init__(self, *, instance_ids=None, **kwargs) -> None: + super(VirtualMachineScaleSetVMInstanceIDs, self).__init__(**kwargs) + self.instance_ids = instance_ids + + +class VirtualMachineScaleSetVMInstanceRequiredIDs(Model): + """Specifies a list of virtual machine instance IDs from the VM scale set. + + All required parameters must be populated in order to send to Azure. + + :param instance_ids: Required. The virtual machine scale set instance ids. + :type instance_ids: list[str] + """ + + _validation = { + 'instance_ids': {'required': True}, + } + + _attribute_map = { + 'instance_ids': {'key': 'instanceIds', 'type': '[str]'}, + } + + def __init__(self, *, instance_ids, **kwargs) -> None: + super(VirtualMachineScaleSetVMInstanceRequiredIDs, self).__init__(**kwargs) + self.instance_ids = instance_ids + + +class VirtualMachineScaleSetVMInstanceView(Model): + """The instance view of a virtual machine scale set VM. + + :param platform_update_domain: The Update Domain count. + :type platform_update_domain: int + :param platform_fault_domain: The Fault Domain count. + :type platform_fault_domain: int + :param rdp_thumb_print: The Remote desktop certificate thumbprint. + :type rdp_thumb_print: str + :param vm_agent: The VM Agent running on the virtual machine. + :type vm_agent: + ~azure.mgmt.compute.v2015_06_15.models.VirtualMachineAgentInstanceView + :param disks: The disks information. + :type disks: list[~azure.mgmt.compute.v2015_06_15.models.DiskInstanceView] + :param extensions: The extensions information. + :type extensions: + list[~azure.mgmt.compute.v2015_06_15.models.VirtualMachineExtensionInstanceView] + :param boot_diagnostics: Boot Diagnostics is a debugging feature which + allows you to view Console Output and Screenshot to diagnose VM status. +

    You can easily view the output of your console log.

    + Azure also enables you to see a screenshot of the VM from the hypervisor. + :type boot_diagnostics: + ~azure.mgmt.compute.v2015_06_15.models.BootDiagnosticsInstanceView + :param statuses: The resource status information. + :type statuses: + list[~azure.mgmt.compute.v2015_06_15.models.InstanceViewStatus] + """ + + _attribute_map = { + 'platform_update_domain': {'key': 'platformUpdateDomain', 'type': 'int'}, + 'platform_fault_domain': {'key': 'platformFaultDomain', 'type': 'int'}, + 'rdp_thumb_print': {'key': 'rdpThumbPrint', 'type': 'str'}, + 'vm_agent': {'key': 'vmAgent', 'type': 'VirtualMachineAgentInstanceView'}, + 'disks': {'key': 'disks', 'type': '[DiskInstanceView]'}, + 'extensions': {'key': 'extensions', 'type': '[VirtualMachineExtensionInstanceView]'}, + 'boot_diagnostics': {'key': 'bootDiagnostics', 'type': 'BootDiagnosticsInstanceView'}, + 'statuses': {'key': 'statuses', 'type': '[InstanceViewStatus]'}, + } + + def __init__(self, *, platform_update_domain: int=None, platform_fault_domain: int=None, rdp_thumb_print: str=None, vm_agent=None, disks=None, extensions=None, boot_diagnostics=None, statuses=None, **kwargs) -> None: + super(VirtualMachineScaleSetVMInstanceView, self).__init__(**kwargs) + self.platform_update_domain = platform_update_domain + self.platform_fault_domain = platform_fault_domain + self.rdp_thumb_print = rdp_thumb_print + self.vm_agent = vm_agent + self.disks = disks + self.extensions = extensions + self.boot_diagnostics = boot_diagnostics + self.statuses = statuses + + +class VirtualMachineScaleSetVMProfile(Model): + """Describes a virtual machine scale set virtual machine profile. + + :param os_profile: The virtual machine scale set OS profile. + :type os_profile: + ~azure.mgmt.compute.v2015_06_15.models.VirtualMachineScaleSetOSProfile + :param storage_profile: The virtual machine scale set storage profile. + :type storage_profile: + ~azure.mgmt.compute.v2015_06_15.models.VirtualMachineScaleSetStorageProfile + :param network_profile: The virtual machine scale set network profile. + :type network_profile: + ~azure.mgmt.compute.v2015_06_15.models.VirtualMachineScaleSetNetworkProfile + :param extension_profile: The virtual machine scale set extension profile. + :type extension_profile: + ~azure.mgmt.compute.v2015_06_15.models.VirtualMachineScaleSetExtensionProfile + """ + + _attribute_map = { + 'os_profile': {'key': 'osProfile', 'type': 'VirtualMachineScaleSetOSProfile'}, + 'storage_profile': {'key': 'storageProfile', 'type': 'VirtualMachineScaleSetStorageProfile'}, + 'network_profile': {'key': 'networkProfile', 'type': 'VirtualMachineScaleSetNetworkProfile'}, + 'extension_profile': {'key': 'extensionProfile', 'type': 'VirtualMachineScaleSetExtensionProfile'}, + } + + def __init__(self, *, os_profile=None, storage_profile=None, network_profile=None, extension_profile=None, **kwargs) -> None: + super(VirtualMachineScaleSetVMProfile, self).__init__(**kwargs) + self.os_profile = os_profile + self.storage_profile = storage_profile + self.network_profile = network_profile + self.extension_profile = extension_profile + + +class VirtualMachineSize(Model): + """Describes the properties of a VM size. + + :param name: The name of the virtual machine size. + :type name: str + :param number_of_cores: The number of cores supported by the virtual + machine size. + :type number_of_cores: int + :param os_disk_size_in_mb: The OS disk size, in MB, allowed by the virtual + machine size. + :type os_disk_size_in_mb: int + :param resource_disk_size_in_mb: The resource disk size, in MB, allowed by + the virtual machine size. + :type resource_disk_size_in_mb: int + :param memory_in_mb: The amount of memory, in MB, supported by the virtual + machine size. + :type memory_in_mb: int + :param max_data_disk_count: The maximum number of data disks that can be + attached to the virtual machine size. + :type max_data_disk_count: int + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'number_of_cores': {'key': 'numberOfCores', 'type': 'int'}, + 'os_disk_size_in_mb': {'key': 'osDiskSizeInMB', 'type': 'int'}, + 'resource_disk_size_in_mb': {'key': 'resourceDiskSizeInMB', 'type': 'int'}, + 'memory_in_mb': {'key': 'memoryInMB', 'type': 'int'}, + 'max_data_disk_count': {'key': 'maxDataDiskCount', 'type': 'int'}, + } + + def __init__(self, *, name: str=None, number_of_cores: int=None, os_disk_size_in_mb: int=None, resource_disk_size_in_mb: int=None, memory_in_mb: int=None, max_data_disk_count: int=None, **kwargs) -> None: + super(VirtualMachineSize, self).__init__(**kwargs) + self.name = name + self.number_of_cores = number_of_cores + self.os_disk_size_in_mb = os_disk_size_in_mb + self.resource_disk_size_in_mb = resource_disk_size_in_mb + self.memory_in_mb = memory_in_mb + self.max_data_disk_count = max_data_disk_count + + +class VirtualMachineStatusCodeCount(Model): + """The status code and count of the virtual machine scale set instance view + status summary. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar code: The instance view status code. + :vartype code: str + :ivar count: The number of instances having a particular status code. + :vartype count: int + """ + + _validation = { + 'code': {'readonly': True}, + 'count': {'readonly': True}, + } + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + 'count': {'key': 'count', 'type': 'int'}, + } + + def __init__(self, **kwargs) -> None: + super(VirtualMachineStatusCodeCount, self).__init__(**kwargs) + self.code = None + self.count = None + + +class WindowsConfiguration(Model): + """Specifies Windows operating system settings on the virtual machine. + + :param provision_vm_agent: Indicates whether virtual machine agent should + be provisioned on the virtual machine.

    When this property is not + specified in the request body, default behavior is to set it to true. + This will ensure that VM Agent is installed on the VM so that extensions + can be added to the VM later. + :type provision_vm_agent: bool + :param enable_automatic_updates: Indicates whether virtual machine is + enabled for automatic updates. + :type enable_automatic_updates: bool + :param time_zone: Specifies the time zone of the virtual machine. e.g. + "Pacific Standard Time" + :type time_zone: str + :param additional_unattend_content: Specifies additional base-64 encoded + XML formatted information that can be included in the Unattend.xml file, + which is used by Windows Setup. + :type additional_unattend_content: + list[~azure.mgmt.compute.v2015_06_15.models.AdditionalUnattendContent] + :param win_rm: Specifies the Windows Remote Management listeners. This + enables remote Windows PowerShell. + :type win_rm: ~azure.mgmt.compute.v2015_06_15.models.WinRMConfiguration + """ + + _attribute_map = { + 'provision_vm_agent': {'key': 'provisionVMAgent', 'type': 'bool'}, + 'enable_automatic_updates': {'key': 'enableAutomaticUpdates', 'type': 'bool'}, + 'time_zone': {'key': 'timeZone', 'type': 'str'}, + 'additional_unattend_content': {'key': 'additionalUnattendContent', 'type': '[AdditionalUnattendContent]'}, + 'win_rm': {'key': 'winRM', 'type': 'WinRMConfiguration'}, + } + + def __init__(self, *, provision_vm_agent: bool=None, enable_automatic_updates: bool=None, time_zone: str=None, additional_unattend_content=None, win_rm=None, **kwargs) -> None: + super(WindowsConfiguration, self).__init__(**kwargs) + self.provision_vm_agent = provision_vm_agent + self.enable_automatic_updates = enable_automatic_updates + self.time_zone = time_zone + self.additional_unattend_content = additional_unattend_content + self.win_rm = win_rm + + +class WinRMConfiguration(Model): + """Describes Windows Remote Management configuration of the VM. + + :param listeners: The list of Windows Remote Management listeners + :type listeners: + list[~azure.mgmt.compute.v2015_06_15.models.WinRMListener] + """ + + _attribute_map = { + 'listeners': {'key': 'listeners', 'type': '[WinRMListener]'}, + } + + def __init__(self, *, listeners=None, **kwargs) -> None: + super(WinRMConfiguration, self).__init__(**kwargs) + self.listeners = listeners + + +class WinRMListener(Model): + """Describes Protocol and thumbprint of Windows Remote Management listener. + + :param protocol: Specifies the protocol of listener.

    Possible + values are:
    **http**

    **https**. Possible values include: + 'Http', 'Https' + :type protocol: str or + ~azure.mgmt.compute.v2015_06_15.models.ProtocolTypes + :param certificate_url: This is the URL of a certificate that has been + uploaded to Key Vault as a secret. For adding a secret to the Key Vault, + see [Add a key or secret to the key + vault](https://docs.microsoft.com/azure/key-vault/key-vault-get-started/#add). + In this case, your certificate needs to be It is the Base64 encoding of + the following JSON Object which is encoded in UTF-8:

    {
    + "data":"",
    "dataType":"pfx",
    + "password":""
    } + :type certificate_url: str + """ + + _attribute_map = { + 'protocol': {'key': 'protocol', 'type': 'ProtocolTypes'}, + 'certificate_url': {'key': 'certificateUrl', 'type': 'str'}, + } + + def __init__(self, *, protocol=None, certificate_url: str=None, **kwargs) -> None: + super(WinRMListener, self).__init__(**kwargs) + self.protocol = protocol + self.certificate_url = certificate_url diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/_paged_models.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/_paged_models.py new file mode 100644 index 000000000000..f4b17f98fba5 --- /dev/null +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/_paged_models.py @@ -0,0 +1,105 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.paging import Paged + + +class AvailabilitySetPaged(Paged): + """ + A paging container for iterating over a list of :class:`AvailabilitySet ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[AvailabilitySet]'} + } + + def __init__(self, *args, **kwargs): + + super(AvailabilitySetPaged, self).__init__(*args, **kwargs) +class VirtualMachineSizePaged(Paged): + """ + A paging container for iterating over a list of :class:`VirtualMachineSize ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[VirtualMachineSize]'} + } + + def __init__(self, *args, **kwargs): + + super(VirtualMachineSizePaged, self).__init__(*args, **kwargs) +class UsagePaged(Paged): + """ + A paging container for iterating over a list of :class:`Usage ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[Usage]'} + } + + def __init__(self, *args, **kwargs): + + super(UsagePaged, self).__init__(*args, **kwargs) +class VirtualMachinePaged(Paged): + """ + A paging container for iterating over a list of :class:`VirtualMachine ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[VirtualMachine]'} + } + + def __init__(self, *args, **kwargs): + + super(VirtualMachinePaged, self).__init__(*args, **kwargs) +class VirtualMachineScaleSetPaged(Paged): + """ + A paging container for iterating over a list of :class:`VirtualMachineScaleSet ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[VirtualMachineScaleSet]'} + } + + def __init__(self, *args, **kwargs): + + super(VirtualMachineScaleSetPaged, self).__init__(*args, **kwargs) +class VirtualMachineScaleSetSkuPaged(Paged): + """ + A paging container for iterating over a list of :class:`VirtualMachineScaleSetSku ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[VirtualMachineScaleSetSku]'} + } + + def __init__(self, *args, **kwargs): + + super(VirtualMachineScaleSetSkuPaged, self).__init__(*args, **kwargs) +class VirtualMachineScaleSetVMPaged(Paged): + """ + A paging container for iterating over a list of :class:`VirtualMachineScaleSetVM ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[VirtualMachineScaleSetVM]'} + } + + def __init__(self, *args, **kwargs): + + super(VirtualMachineScaleSetVMPaged, self).__init__(*args, **kwargs) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/additional_unattend_content.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/additional_unattend_content.py deleted file mode 100644 index 13297864f6d3..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/additional_unattend_content.py +++ /dev/null @@ -1,52 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class AdditionalUnattendContent(Model): - """Specifies additional XML formatted information that can be included in the - Unattend.xml file, which is used by Windows Setup. Contents are defined by - setting name, component name, and the pass in which the content is applied. - - :param pass_name: The pass name. Currently, the only allowable value is - OobeSystem. Possible values include: 'OobeSystem' - :type pass_name: str or ~azure.mgmt.compute.v2015_06_15.models.PassNames - :param component_name: The component name. Currently, the only allowable - value is Microsoft-Windows-Shell-Setup. Possible values include: - 'Microsoft-Windows-Shell-Setup' - :type component_name: str or - ~azure.mgmt.compute.v2015_06_15.models.ComponentNames - :param setting_name: Specifies the name of the setting to which the - content applies. Possible values are: FirstLogonCommands and AutoLogon. - Possible values include: 'AutoLogon', 'FirstLogonCommands' - :type setting_name: str or - ~azure.mgmt.compute.v2015_06_15.models.SettingNames - :param content: Specifies the XML formatted content that is added to the - unattend.xml file for the specified path and component. The XML must be - less than 4KB and must include the root element for the setting or feature - that is being inserted. - :type content: str - """ - - _attribute_map = { - 'pass_name': {'key': 'passName', 'type': 'PassNames'}, - 'component_name': {'key': 'componentName', 'type': 'ComponentNames'}, - 'setting_name': {'key': 'settingName', 'type': 'SettingNames'}, - 'content': {'key': 'content', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(AdditionalUnattendContent, self).__init__(**kwargs) - self.pass_name = kwargs.get('pass_name', None) - self.component_name = kwargs.get('component_name', None) - self.setting_name = kwargs.get('setting_name', None) - self.content = kwargs.get('content', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/additional_unattend_content_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/additional_unattend_content_py3.py deleted file mode 100644 index c003a69e41a0..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/additional_unattend_content_py3.py +++ /dev/null @@ -1,52 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class AdditionalUnattendContent(Model): - """Specifies additional XML formatted information that can be included in the - Unattend.xml file, which is used by Windows Setup. Contents are defined by - setting name, component name, and the pass in which the content is applied. - - :param pass_name: The pass name. Currently, the only allowable value is - OobeSystem. Possible values include: 'OobeSystem' - :type pass_name: str or ~azure.mgmt.compute.v2015_06_15.models.PassNames - :param component_name: The component name. Currently, the only allowable - value is Microsoft-Windows-Shell-Setup. Possible values include: - 'Microsoft-Windows-Shell-Setup' - :type component_name: str or - ~azure.mgmt.compute.v2015_06_15.models.ComponentNames - :param setting_name: Specifies the name of the setting to which the - content applies. Possible values are: FirstLogonCommands and AutoLogon. - Possible values include: 'AutoLogon', 'FirstLogonCommands' - :type setting_name: str or - ~azure.mgmt.compute.v2015_06_15.models.SettingNames - :param content: Specifies the XML formatted content that is added to the - unattend.xml file for the specified path and component. The XML must be - less than 4KB and must include the root element for the setting or feature - that is being inserted. - :type content: str - """ - - _attribute_map = { - 'pass_name': {'key': 'passName', 'type': 'PassNames'}, - 'component_name': {'key': 'componentName', 'type': 'ComponentNames'}, - 'setting_name': {'key': 'settingName', 'type': 'SettingNames'}, - 'content': {'key': 'content', 'type': 'str'}, - } - - def __init__(self, *, pass_name=None, component_name=None, setting_name=None, content: str=None, **kwargs) -> None: - super(AdditionalUnattendContent, self).__init__(**kwargs) - self.pass_name = pass_name - self.component_name = component_name - self.setting_name = setting_name - self.content = content diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/api_entity_reference.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/api_entity_reference.py deleted file mode 100644 index d43730af3659..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/api_entity_reference.py +++ /dev/null @@ -1,29 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ApiEntityReference(Model): - """The API entity reference. - - :param id: The ARM resource id in the form of - /subscriptions/{SubscriptionId}/resourceGroups/{ResourceGroupName}/... - :type id: str - """ - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ApiEntityReference, self).__init__(**kwargs) - self.id = kwargs.get('id', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/api_entity_reference_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/api_entity_reference_py3.py deleted file mode 100644 index d42dfb1a5fd0..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/api_entity_reference_py3.py +++ /dev/null @@ -1,29 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ApiEntityReference(Model): - """The API entity reference. - - :param id: The ARM resource id in the form of - /subscriptions/{SubscriptionId}/resourceGroups/{ResourceGroupName}/... - :type id: str - """ - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - } - - def __init__(self, *, id: str=None, **kwargs) -> None: - super(ApiEntityReference, self).__init__(**kwargs) - self.id = id diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/api_error.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/api_error.py deleted file mode 100644 index 79b4f00b21d6..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/api_error.py +++ /dev/null @@ -1,44 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ApiError(Model): - """Api error. - - :param details: The Api error details - :type details: list[~azure.mgmt.compute.v2015_06_15.models.ApiErrorBase] - :param innererror: The Api inner error - :type innererror: ~azure.mgmt.compute.v2015_06_15.models.InnerError - :param code: The error code. - :type code: str - :param target: The target of the particular error. - :type target: str - :param message: The error message. - :type message: str - """ - - _attribute_map = { - 'details': {'key': 'details', 'type': '[ApiErrorBase]'}, - 'innererror': {'key': 'innererror', 'type': 'InnerError'}, - 'code': {'key': 'code', 'type': 'str'}, - 'target': {'key': 'target', 'type': 'str'}, - 'message': {'key': 'message', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ApiError, self).__init__(**kwargs) - self.details = kwargs.get('details', None) - self.innererror = kwargs.get('innererror', None) - self.code = kwargs.get('code', None) - self.target = kwargs.get('target', None) - self.message = kwargs.get('message', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/api_error_base.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/api_error_base.py deleted file mode 100644 index 655c08638905..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/api_error_base.py +++ /dev/null @@ -1,36 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ApiErrorBase(Model): - """Api error base. - - :param code: The error code. - :type code: str - :param target: The target of the particular error. - :type target: str - :param message: The error message. - :type message: str - """ - - _attribute_map = { - 'code': {'key': 'code', 'type': 'str'}, - 'target': {'key': 'target', 'type': 'str'}, - 'message': {'key': 'message', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ApiErrorBase, self).__init__(**kwargs) - self.code = kwargs.get('code', None) - self.target = kwargs.get('target', None) - self.message = kwargs.get('message', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/api_error_base_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/api_error_base_py3.py deleted file mode 100644 index 5ba95aa0283e..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/api_error_base_py3.py +++ /dev/null @@ -1,36 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ApiErrorBase(Model): - """Api error base. - - :param code: The error code. - :type code: str - :param target: The target of the particular error. - :type target: str - :param message: The error message. - :type message: str - """ - - _attribute_map = { - 'code': {'key': 'code', 'type': 'str'}, - 'target': {'key': 'target', 'type': 'str'}, - 'message': {'key': 'message', 'type': 'str'}, - } - - def __init__(self, *, code: str=None, target: str=None, message: str=None, **kwargs) -> None: - super(ApiErrorBase, self).__init__(**kwargs) - self.code = code - self.target = target - self.message = message diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/api_error_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/api_error_py3.py deleted file mode 100644 index 5aa2f113bea0..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/api_error_py3.py +++ /dev/null @@ -1,44 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ApiError(Model): - """Api error. - - :param details: The Api error details - :type details: list[~azure.mgmt.compute.v2015_06_15.models.ApiErrorBase] - :param innererror: The Api inner error - :type innererror: ~azure.mgmt.compute.v2015_06_15.models.InnerError - :param code: The error code. - :type code: str - :param target: The target of the particular error. - :type target: str - :param message: The error message. - :type message: str - """ - - _attribute_map = { - 'details': {'key': 'details', 'type': '[ApiErrorBase]'}, - 'innererror': {'key': 'innererror', 'type': 'InnerError'}, - 'code': {'key': 'code', 'type': 'str'}, - 'target': {'key': 'target', 'type': 'str'}, - 'message': {'key': 'message', 'type': 'str'}, - } - - def __init__(self, *, details=None, innererror=None, code: str=None, target: str=None, message: str=None, **kwargs) -> None: - super(ApiError, self).__init__(**kwargs) - self.details = details - self.innererror = innererror - self.code = code - self.target = target - self.message = message diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/availability_set.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/availability_set.py deleted file mode 100644 index 46a442228625..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/availability_set.py +++ /dev/null @@ -1,81 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource import Resource - - -class AvailabilitySet(Resource): - """Specifies information about the availability set that the virtual machine - should be assigned to. Virtual machines specified in the same availability - set are allocated to different nodes to maximize availability. For more - information about availability sets, see [Manage the availability of - virtual - machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-manage-availability?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). -

    For more information on Azure planned maintenance, see [Planned - maintenance for virtual machines in - Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-planned-maintenance?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json) -

    Currently, a VM can only be added to availability set at creation - time. An existing VM cannot be added to an availability set. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource Id - :vartype id: str - :ivar name: Resource name - :vartype name: str - :ivar type: Resource type - :vartype type: str - :param location: Required. Resource location - :type location: str - :param tags: Resource tags - :type tags: dict[str, str] - :param platform_update_domain_count: Update Domain count. - :type platform_update_domain_count: int - :param platform_fault_domain_count: Fault Domain count. - :type platform_fault_domain_count: int - :param virtual_machines: A list of references to all virtual machines in - the availability set. - :type virtual_machines: - list[~azure.mgmt.compute.v2015_06_15.models.SubResource] - :ivar statuses: The resource status information. - :vartype statuses: - list[~azure.mgmt.compute.v2015_06_15.models.InstanceViewStatus] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - 'statuses': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'platform_update_domain_count': {'key': 'properties.platformUpdateDomainCount', 'type': 'int'}, - 'platform_fault_domain_count': {'key': 'properties.platformFaultDomainCount', 'type': 'int'}, - 'virtual_machines': {'key': 'properties.virtualMachines', 'type': '[SubResource]'}, - 'statuses': {'key': 'properties.statuses', 'type': '[InstanceViewStatus]'}, - } - - def __init__(self, **kwargs): - super(AvailabilitySet, self).__init__(**kwargs) - self.platform_update_domain_count = kwargs.get('platform_update_domain_count', None) - self.platform_fault_domain_count = kwargs.get('platform_fault_domain_count', None) - self.virtual_machines = kwargs.get('virtual_machines', None) - self.statuses = None diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/availability_set_paged.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/availability_set_paged.py deleted file mode 100644 index 7e663e633536..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/availability_set_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class AvailabilitySetPaged(Paged): - """ - A paging container for iterating over a list of :class:`AvailabilitySet ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[AvailabilitySet]'} - } - - def __init__(self, *args, **kwargs): - - super(AvailabilitySetPaged, self).__init__(*args, **kwargs) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/availability_set_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/availability_set_py3.py deleted file mode 100644 index 5749077b8a79..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/availability_set_py3.py +++ /dev/null @@ -1,81 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource_py3 import Resource - - -class AvailabilitySet(Resource): - """Specifies information about the availability set that the virtual machine - should be assigned to. Virtual machines specified in the same availability - set are allocated to different nodes to maximize availability. For more - information about availability sets, see [Manage the availability of - virtual - machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-manage-availability?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). -

    For more information on Azure planned maintenance, see [Planned - maintenance for virtual machines in - Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-planned-maintenance?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json) -

    Currently, a VM can only be added to availability set at creation - time. An existing VM cannot be added to an availability set. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource Id - :vartype id: str - :ivar name: Resource name - :vartype name: str - :ivar type: Resource type - :vartype type: str - :param location: Required. Resource location - :type location: str - :param tags: Resource tags - :type tags: dict[str, str] - :param platform_update_domain_count: Update Domain count. - :type platform_update_domain_count: int - :param platform_fault_domain_count: Fault Domain count. - :type platform_fault_domain_count: int - :param virtual_machines: A list of references to all virtual machines in - the availability set. - :type virtual_machines: - list[~azure.mgmt.compute.v2015_06_15.models.SubResource] - :ivar statuses: The resource status information. - :vartype statuses: - list[~azure.mgmt.compute.v2015_06_15.models.InstanceViewStatus] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - 'statuses': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'platform_update_domain_count': {'key': 'properties.platformUpdateDomainCount', 'type': 'int'}, - 'platform_fault_domain_count': {'key': 'properties.platformFaultDomainCount', 'type': 'int'}, - 'virtual_machines': {'key': 'properties.virtualMachines', 'type': '[SubResource]'}, - 'statuses': {'key': 'properties.statuses', 'type': '[InstanceViewStatus]'}, - } - - def __init__(self, *, location: str, tags=None, platform_update_domain_count: int=None, platform_fault_domain_count: int=None, virtual_machines=None, **kwargs) -> None: - super(AvailabilitySet, self).__init__(location=location, tags=tags, **kwargs) - self.platform_update_domain_count = platform_update_domain_count - self.platform_fault_domain_count = platform_fault_domain_count - self.virtual_machines = virtual_machines - self.statuses = None diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/boot_diagnostics.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/boot_diagnostics.py deleted file mode 100644 index 4a1f77c4d7d0..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/boot_diagnostics.py +++ /dev/null @@ -1,37 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class BootDiagnostics(Model): - """Boot Diagnostics is a debugging feature which allows you to view Console - Output and Screenshot to diagnose VM status.

    You can easily view - the output of your console log.

    Azure also enables you to see a - screenshot of the VM from the hypervisor. - - :param enabled: Whether boot diagnostics should be enabled on the Virtual - Machine. - :type enabled: bool - :param storage_uri: Uri of the storage account to use for placing the - console output and screenshot. - :type storage_uri: str - """ - - _attribute_map = { - 'enabled': {'key': 'enabled', 'type': 'bool'}, - 'storage_uri': {'key': 'storageUri', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(BootDiagnostics, self).__init__(**kwargs) - self.enabled = kwargs.get('enabled', None) - self.storage_uri = kwargs.get('storage_uri', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/boot_diagnostics_instance_view.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/boot_diagnostics_instance_view.py deleted file mode 100644 index 05ca725929f6..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/boot_diagnostics_instance_view.py +++ /dev/null @@ -1,40 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class BootDiagnosticsInstanceView(Model): - """The instance view of a virtual machine boot diagnostics. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar console_screenshot_blob_uri: The console screenshot blob URI. - :vartype console_screenshot_blob_uri: str - :ivar serial_console_log_blob_uri: The Linux serial console log blob Uri. - :vartype serial_console_log_blob_uri: str - """ - - _validation = { - 'console_screenshot_blob_uri': {'readonly': True}, - 'serial_console_log_blob_uri': {'readonly': True}, - } - - _attribute_map = { - 'console_screenshot_blob_uri': {'key': 'consoleScreenshotBlobUri', 'type': 'str'}, - 'serial_console_log_blob_uri': {'key': 'serialConsoleLogBlobUri', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(BootDiagnosticsInstanceView, self).__init__(**kwargs) - self.console_screenshot_blob_uri = None - self.serial_console_log_blob_uri = None diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/boot_diagnostics_instance_view_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/boot_diagnostics_instance_view_py3.py deleted file mode 100644 index 97e4cdba67c4..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/boot_diagnostics_instance_view_py3.py +++ /dev/null @@ -1,40 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class BootDiagnosticsInstanceView(Model): - """The instance view of a virtual machine boot diagnostics. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar console_screenshot_blob_uri: The console screenshot blob URI. - :vartype console_screenshot_blob_uri: str - :ivar serial_console_log_blob_uri: The Linux serial console log blob Uri. - :vartype serial_console_log_blob_uri: str - """ - - _validation = { - 'console_screenshot_blob_uri': {'readonly': True}, - 'serial_console_log_blob_uri': {'readonly': True}, - } - - _attribute_map = { - 'console_screenshot_blob_uri': {'key': 'consoleScreenshotBlobUri', 'type': 'str'}, - 'serial_console_log_blob_uri': {'key': 'serialConsoleLogBlobUri', 'type': 'str'}, - } - - def __init__(self, **kwargs) -> None: - super(BootDiagnosticsInstanceView, self).__init__(**kwargs) - self.console_screenshot_blob_uri = None - self.serial_console_log_blob_uri = None diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/boot_diagnostics_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/boot_diagnostics_py3.py deleted file mode 100644 index b64ae5b4adde..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/boot_diagnostics_py3.py +++ /dev/null @@ -1,37 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class BootDiagnostics(Model): - """Boot Diagnostics is a debugging feature which allows you to view Console - Output and Screenshot to diagnose VM status.

    You can easily view - the output of your console log.

    Azure also enables you to see a - screenshot of the VM from the hypervisor. - - :param enabled: Whether boot diagnostics should be enabled on the Virtual - Machine. - :type enabled: bool - :param storage_uri: Uri of the storage account to use for placing the - console output and screenshot. - :type storage_uri: str - """ - - _attribute_map = { - 'enabled': {'key': 'enabled', 'type': 'bool'}, - 'storage_uri': {'key': 'storageUri', 'type': 'str'}, - } - - def __init__(self, *, enabled: bool=None, storage_uri: str=None, **kwargs) -> None: - super(BootDiagnostics, self).__init__(**kwargs) - self.enabled = enabled - self.storage_uri = storage_uri diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/compute_long_running_operation_properties.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/compute_long_running_operation_properties.py deleted file mode 100644 index 66ff353eb206..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/compute_long_running_operation_properties.py +++ /dev/null @@ -1,28 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ComputeLongRunningOperationProperties(Model): - """Compute-specific operation properties, including output. - - :param output: Operation output data (raw JSON) - :type output: object - """ - - _attribute_map = { - 'output': {'key': 'output', 'type': 'object'}, - } - - def __init__(self, **kwargs): - super(ComputeLongRunningOperationProperties, self).__init__(**kwargs) - self.output = kwargs.get('output', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/compute_long_running_operation_properties_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/compute_long_running_operation_properties_py3.py deleted file mode 100644 index a4ffd6c8c32f..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/compute_long_running_operation_properties_py3.py +++ /dev/null @@ -1,28 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ComputeLongRunningOperationProperties(Model): - """Compute-specific operation properties, including output. - - :param output: Operation output data (raw JSON) - :type output: object - """ - - _attribute_map = { - 'output': {'key': 'output', 'type': 'object'}, - } - - def __init__(self, *, output=None, **kwargs) -> None: - super(ComputeLongRunningOperationProperties, self).__init__(**kwargs) - self.output = output diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/data_disk.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/data_disk.py deleted file mode 100644 index 83f4e11cb9cd..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/data_disk.py +++ /dev/null @@ -1,79 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class DataDisk(Model): - """Describes a data disk. - - All required parameters must be populated in order to send to Azure. - - :param lun: Required. Specifies the logical unit number of the data disk. - This value is used to identify data disks within the VM and therefore must - be unique for each data disk attached to a VM. - :type lun: int - :param name: Required. The disk name. - :type name: str - :param vhd: Required. The virtual hard disk. - :type vhd: ~azure.mgmt.compute.v2015_06_15.models.VirtualHardDisk - :param image: The source user image virtual hard disk. The virtual hard - disk will be copied before being attached to the virtual machine. If - SourceImage is provided, the destination virtual hard drive must not - exist. - :type image: ~azure.mgmt.compute.v2015_06_15.models.VirtualHardDisk - :param caching: Specifies the caching requirements.

    Possible - values are:

    **None**

    **ReadOnly**

    **ReadWrite** -

    Default: **None for Standard storage. ReadOnly for Premium - storage**. Possible values include: 'None', 'ReadOnly', 'ReadWrite' - :type caching: str or ~azure.mgmt.compute.v2015_06_15.models.CachingTypes - :param create_option: Required. Specifies how the virtual machine should - be created.

    Possible values are:

    **Attach** \\u2013 This - value is used when you are using a specialized disk to create the virtual - machine.

    **FromImage** \\u2013 This value is used when you are - using an image to create the virtual machine. If you are using a platform - image, you also use the imageReference element described above. If you are - using a marketplace image, you also use the plan element previously - described. Possible values include: 'FromImage', 'Empty', 'Attach' - :type create_option: str or - ~azure.mgmt.compute.v2015_06_15.models.DiskCreateOptionTypes - :param disk_size_gb: Specifies the size of an empty data disk in - gigabytes. This element can be used to overwrite the size of the disk in a - virtual machine image.

    This value cannot be larger than 1023 GB - :type disk_size_gb: int - """ - - _validation = { - 'lun': {'required': True}, - 'name': {'required': True}, - 'vhd': {'required': True}, - 'create_option': {'required': True}, - } - - _attribute_map = { - 'lun': {'key': 'lun', 'type': 'int'}, - 'name': {'key': 'name', 'type': 'str'}, - 'vhd': {'key': 'vhd', 'type': 'VirtualHardDisk'}, - 'image': {'key': 'image', 'type': 'VirtualHardDisk'}, - 'caching': {'key': 'caching', 'type': 'CachingTypes'}, - 'create_option': {'key': 'createOption', 'type': 'DiskCreateOptionTypes'}, - 'disk_size_gb': {'key': 'diskSizeGB', 'type': 'int'}, - } - - def __init__(self, **kwargs): - super(DataDisk, self).__init__(**kwargs) - self.lun = kwargs.get('lun', None) - self.name = kwargs.get('name', None) - self.vhd = kwargs.get('vhd', None) - self.image = kwargs.get('image', None) - self.caching = kwargs.get('caching', None) - self.create_option = kwargs.get('create_option', None) - self.disk_size_gb = kwargs.get('disk_size_gb', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/data_disk_image.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/data_disk_image.py deleted file mode 100644 index b5dbfcefb472..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/data_disk_image.py +++ /dev/null @@ -1,37 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class DataDiskImage(Model): - """Contains the data disk images information. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar lun: Specifies the logical unit number of the data disk. This value - is used to identify data disks within the VM and therefore must be unique - for each data disk attached to a VM. - :vartype lun: int - """ - - _validation = { - 'lun': {'readonly': True}, - } - - _attribute_map = { - 'lun': {'key': 'lun', 'type': 'int'}, - } - - def __init__(self, **kwargs): - super(DataDiskImage, self).__init__(**kwargs) - self.lun = None diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/data_disk_image_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/data_disk_image_py3.py deleted file mode 100644 index 8431a3988502..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/data_disk_image_py3.py +++ /dev/null @@ -1,37 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class DataDiskImage(Model): - """Contains the data disk images information. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar lun: Specifies the logical unit number of the data disk. This value - is used to identify data disks within the VM and therefore must be unique - for each data disk attached to a VM. - :vartype lun: int - """ - - _validation = { - 'lun': {'readonly': True}, - } - - _attribute_map = { - 'lun': {'key': 'lun', 'type': 'int'}, - } - - def __init__(self, **kwargs) -> None: - super(DataDiskImage, self).__init__(**kwargs) - self.lun = None diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/data_disk_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/data_disk_py3.py deleted file mode 100644 index d3b72348ed17..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/data_disk_py3.py +++ /dev/null @@ -1,79 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class DataDisk(Model): - """Describes a data disk. - - All required parameters must be populated in order to send to Azure. - - :param lun: Required. Specifies the logical unit number of the data disk. - This value is used to identify data disks within the VM and therefore must - be unique for each data disk attached to a VM. - :type lun: int - :param name: Required. The disk name. - :type name: str - :param vhd: Required. The virtual hard disk. - :type vhd: ~azure.mgmt.compute.v2015_06_15.models.VirtualHardDisk - :param image: The source user image virtual hard disk. The virtual hard - disk will be copied before being attached to the virtual machine. If - SourceImage is provided, the destination virtual hard drive must not - exist. - :type image: ~azure.mgmt.compute.v2015_06_15.models.VirtualHardDisk - :param caching: Specifies the caching requirements.

    Possible - values are:

    **None**

    **ReadOnly**

    **ReadWrite** -

    Default: **None for Standard storage. ReadOnly for Premium - storage**. Possible values include: 'None', 'ReadOnly', 'ReadWrite' - :type caching: str or ~azure.mgmt.compute.v2015_06_15.models.CachingTypes - :param create_option: Required. Specifies how the virtual machine should - be created.

    Possible values are:

    **Attach** \\u2013 This - value is used when you are using a specialized disk to create the virtual - machine.

    **FromImage** \\u2013 This value is used when you are - using an image to create the virtual machine. If you are using a platform - image, you also use the imageReference element described above. If you are - using a marketplace image, you also use the plan element previously - described. Possible values include: 'FromImage', 'Empty', 'Attach' - :type create_option: str or - ~azure.mgmt.compute.v2015_06_15.models.DiskCreateOptionTypes - :param disk_size_gb: Specifies the size of an empty data disk in - gigabytes. This element can be used to overwrite the size of the disk in a - virtual machine image.

    This value cannot be larger than 1023 GB - :type disk_size_gb: int - """ - - _validation = { - 'lun': {'required': True}, - 'name': {'required': True}, - 'vhd': {'required': True}, - 'create_option': {'required': True}, - } - - _attribute_map = { - 'lun': {'key': 'lun', 'type': 'int'}, - 'name': {'key': 'name', 'type': 'str'}, - 'vhd': {'key': 'vhd', 'type': 'VirtualHardDisk'}, - 'image': {'key': 'image', 'type': 'VirtualHardDisk'}, - 'caching': {'key': 'caching', 'type': 'CachingTypes'}, - 'create_option': {'key': 'createOption', 'type': 'DiskCreateOptionTypes'}, - 'disk_size_gb': {'key': 'diskSizeGB', 'type': 'int'}, - } - - def __init__(self, *, lun: int, name: str, vhd, create_option, image=None, caching=None, disk_size_gb: int=None, **kwargs) -> None: - super(DataDisk, self).__init__(**kwargs) - self.lun = lun - self.name = name - self.vhd = vhd - self.image = image - self.caching = caching - self.create_option = create_option - self.disk_size_gb = disk_size_gb diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/diagnostics_profile.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/diagnostics_profile.py deleted file mode 100644 index d8dbd83039f3..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/diagnostics_profile.py +++ /dev/null @@ -1,33 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class DiagnosticsProfile(Model): - """Specifies the boot diagnostic settings state.

    Minimum api-version: - 2015-06-15. - - :param boot_diagnostics: Boot Diagnostics is a debugging feature which - allows you to view Console Output and Screenshot to diagnose VM status. -

    You can easily view the output of your console log.

    - Azure also enables you to see a screenshot of the VM from the hypervisor. - :type boot_diagnostics: - ~azure.mgmt.compute.v2015_06_15.models.BootDiagnostics - """ - - _attribute_map = { - 'boot_diagnostics': {'key': 'bootDiagnostics', 'type': 'BootDiagnostics'}, - } - - def __init__(self, **kwargs): - super(DiagnosticsProfile, self).__init__(**kwargs) - self.boot_diagnostics = kwargs.get('boot_diagnostics', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/diagnostics_profile_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/diagnostics_profile_py3.py deleted file mode 100644 index 474722c3fb39..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/diagnostics_profile_py3.py +++ /dev/null @@ -1,33 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class DiagnosticsProfile(Model): - """Specifies the boot diagnostic settings state.

    Minimum api-version: - 2015-06-15. - - :param boot_diagnostics: Boot Diagnostics is a debugging feature which - allows you to view Console Output and Screenshot to diagnose VM status. -

    You can easily view the output of your console log.

    - Azure also enables you to see a screenshot of the VM from the hypervisor. - :type boot_diagnostics: - ~azure.mgmt.compute.v2015_06_15.models.BootDiagnostics - """ - - _attribute_map = { - 'boot_diagnostics': {'key': 'bootDiagnostics', 'type': 'BootDiagnostics'}, - } - - def __init__(self, *, boot_diagnostics=None, **kwargs) -> None: - super(DiagnosticsProfile, self).__init__(**kwargs) - self.boot_diagnostics = boot_diagnostics diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/disk_encryption_settings.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/disk_encryption_settings.py deleted file mode 100644 index 145e72b0f2c9..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/disk_encryption_settings.py +++ /dev/null @@ -1,47 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class DiskEncryptionSettings(Model): - """Describes a Encryption Settings for a Disk. - - All required parameters must be populated in order to send to Azure. - - :param disk_encryption_key: Required. Specifies the location of the disk - encryption key, which is a Key Vault Secret. - :type disk_encryption_key: - ~azure.mgmt.compute.v2015_06_15.models.KeyVaultSecretReference - :param key_encryption_key: Specifies the location of the key encryption - key in Key Vault. - :type key_encryption_key: - ~azure.mgmt.compute.v2015_06_15.models.KeyVaultKeyReference - :param enabled: Specifies whether disk encryption should be enabled on the - virtual machine. - :type enabled: bool - """ - - _validation = { - 'disk_encryption_key': {'required': True}, - } - - _attribute_map = { - 'disk_encryption_key': {'key': 'diskEncryptionKey', 'type': 'KeyVaultSecretReference'}, - 'key_encryption_key': {'key': 'keyEncryptionKey', 'type': 'KeyVaultKeyReference'}, - 'enabled': {'key': 'enabled', 'type': 'bool'}, - } - - def __init__(self, **kwargs): - super(DiskEncryptionSettings, self).__init__(**kwargs) - self.disk_encryption_key = kwargs.get('disk_encryption_key', None) - self.key_encryption_key = kwargs.get('key_encryption_key', None) - self.enabled = kwargs.get('enabled', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/disk_encryption_settings_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/disk_encryption_settings_py3.py deleted file mode 100644 index a260d7468780..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/disk_encryption_settings_py3.py +++ /dev/null @@ -1,47 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class DiskEncryptionSettings(Model): - """Describes a Encryption Settings for a Disk. - - All required parameters must be populated in order to send to Azure. - - :param disk_encryption_key: Required. Specifies the location of the disk - encryption key, which is a Key Vault Secret. - :type disk_encryption_key: - ~azure.mgmt.compute.v2015_06_15.models.KeyVaultSecretReference - :param key_encryption_key: Specifies the location of the key encryption - key in Key Vault. - :type key_encryption_key: - ~azure.mgmt.compute.v2015_06_15.models.KeyVaultKeyReference - :param enabled: Specifies whether disk encryption should be enabled on the - virtual machine. - :type enabled: bool - """ - - _validation = { - 'disk_encryption_key': {'required': True}, - } - - _attribute_map = { - 'disk_encryption_key': {'key': 'diskEncryptionKey', 'type': 'KeyVaultSecretReference'}, - 'key_encryption_key': {'key': 'keyEncryptionKey', 'type': 'KeyVaultKeyReference'}, - 'enabled': {'key': 'enabled', 'type': 'bool'}, - } - - def __init__(self, *, disk_encryption_key, key_encryption_key=None, enabled: bool=None, **kwargs) -> None: - super(DiskEncryptionSettings, self).__init__(**kwargs) - self.disk_encryption_key = disk_encryption_key - self.key_encryption_key = key_encryption_key - self.enabled = enabled diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/disk_instance_view.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/disk_instance_view.py deleted file mode 100644 index 027d59e825e3..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/disk_instance_view.py +++ /dev/null @@ -1,33 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class DiskInstanceView(Model): - """The instance view of the disk. - - :param name: The disk name. - :type name: str - :param statuses: The resource status information. - :type statuses: - list[~azure.mgmt.compute.v2015_06_15.models.InstanceViewStatus] - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'statuses': {'key': 'statuses', 'type': '[InstanceViewStatus]'}, - } - - def __init__(self, **kwargs): - super(DiskInstanceView, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.statuses = kwargs.get('statuses', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/disk_instance_view_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/disk_instance_view_py3.py deleted file mode 100644 index cc4b78b3c2b3..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/disk_instance_view_py3.py +++ /dev/null @@ -1,33 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class DiskInstanceView(Model): - """The instance view of the disk. - - :param name: The disk name. - :type name: str - :param statuses: The resource status information. - :type statuses: - list[~azure.mgmt.compute.v2015_06_15.models.InstanceViewStatus] - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'statuses': {'key': 'statuses', 'type': '[InstanceViewStatus]'}, - } - - def __init__(self, *, name: str=None, statuses=None, **kwargs) -> None: - super(DiskInstanceView, self).__init__(**kwargs) - self.name = name - self.statuses = statuses diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/hardware_profile.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/hardware_profile.py deleted file mode 100644 index 2aeef4d376d9..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/hardware_profile.py +++ /dev/null @@ -1,52 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class HardwareProfile(Model): - """Specifies the hardware settings for the virtual machine. - - :param vm_size: Specifies the size of the virtual machine. For more - information about virtual machine sizes, see [Sizes for virtual - machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-sizes?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). -

    The available VM sizes depend on region and availability set. For - a list of available sizes use these APIs:

    [List all available - virtual machine sizes in an availability - set](https://docs.microsoft.com/rest/api/compute/availabilitysets/listavailablesizes) -

    [List all available virtual machine sizes in a - region](https://docs.microsoft.com/rest/api/compute/virtualmachinesizes/list) -

    [List all available virtual machine sizes for - resizing](https://docs.microsoft.com/rest/api/compute/virtualmachines/listavailablesizes). - Possible values include: 'Basic_A0', 'Basic_A1', 'Basic_A2', 'Basic_A3', - 'Basic_A4', 'Standard_A0', 'Standard_A1', 'Standard_A2', 'Standard_A3', - 'Standard_A4', 'Standard_A5', 'Standard_A6', 'Standard_A7', 'Standard_A8', - 'Standard_A9', 'Standard_A10', 'Standard_A11', 'Standard_D1', - 'Standard_D2', 'Standard_D3', 'Standard_D4', 'Standard_D11', - 'Standard_D12', 'Standard_D13', 'Standard_D14', 'Standard_D1_v2', - 'Standard_D2_v2', 'Standard_D3_v2', 'Standard_D4_v2', 'Standard_D5_v2', - 'Standard_D11_v2', 'Standard_D12_v2', 'Standard_D13_v2', - 'Standard_D14_v2', 'Standard_DS1', 'Standard_DS2', 'Standard_DS3', - 'Standard_DS4', 'Standard_DS11', 'Standard_DS12', 'Standard_DS13', - 'Standard_DS14', 'Standard_G1', 'Standard_G2', 'Standard_G3', - 'Standard_G4', 'Standard_G5', 'Standard_GS1', 'Standard_GS2', - 'Standard_GS3', 'Standard_GS4', 'Standard_GS5' - :type vm_size: str or - ~azure.mgmt.compute.v2015_06_15.models.VirtualMachineSizeTypes - """ - - _attribute_map = { - 'vm_size': {'key': 'vmSize', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(HardwareProfile, self).__init__(**kwargs) - self.vm_size = kwargs.get('vm_size', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/hardware_profile_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/hardware_profile_py3.py deleted file mode 100644 index a71a089c5e54..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/hardware_profile_py3.py +++ /dev/null @@ -1,52 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class HardwareProfile(Model): - """Specifies the hardware settings for the virtual machine. - - :param vm_size: Specifies the size of the virtual machine. For more - information about virtual machine sizes, see [Sizes for virtual - machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-sizes?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). -

    The available VM sizes depend on region and availability set. For - a list of available sizes use these APIs:

    [List all available - virtual machine sizes in an availability - set](https://docs.microsoft.com/rest/api/compute/availabilitysets/listavailablesizes) -

    [List all available virtual machine sizes in a - region](https://docs.microsoft.com/rest/api/compute/virtualmachinesizes/list) -

    [List all available virtual machine sizes for - resizing](https://docs.microsoft.com/rest/api/compute/virtualmachines/listavailablesizes). - Possible values include: 'Basic_A0', 'Basic_A1', 'Basic_A2', 'Basic_A3', - 'Basic_A4', 'Standard_A0', 'Standard_A1', 'Standard_A2', 'Standard_A3', - 'Standard_A4', 'Standard_A5', 'Standard_A6', 'Standard_A7', 'Standard_A8', - 'Standard_A9', 'Standard_A10', 'Standard_A11', 'Standard_D1', - 'Standard_D2', 'Standard_D3', 'Standard_D4', 'Standard_D11', - 'Standard_D12', 'Standard_D13', 'Standard_D14', 'Standard_D1_v2', - 'Standard_D2_v2', 'Standard_D3_v2', 'Standard_D4_v2', 'Standard_D5_v2', - 'Standard_D11_v2', 'Standard_D12_v2', 'Standard_D13_v2', - 'Standard_D14_v2', 'Standard_DS1', 'Standard_DS2', 'Standard_DS3', - 'Standard_DS4', 'Standard_DS11', 'Standard_DS12', 'Standard_DS13', - 'Standard_DS14', 'Standard_G1', 'Standard_G2', 'Standard_G3', - 'Standard_G4', 'Standard_G5', 'Standard_GS1', 'Standard_GS2', - 'Standard_GS3', 'Standard_GS4', 'Standard_GS5' - :type vm_size: str or - ~azure.mgmt.compute.v2015_06_15.models.VirtualMachineSizeTypes - """ - - _attribute_map = { - 'vm_size': {'key': 'vmSize', 'type': 'str'}, - } - - def __init__(self, *, vm_size=None, **kwargs) -> None: - super(HardwareProfile, self).__init__(**kwargs) - self.vm_size = vm_size diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/image_reference.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/image_reference.py deleted file mode 100644 index d83cc00f394f..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/image_reference.py +++ /dev/null @@ -1,51 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ImageReference(Model): - """Specifies information about the image to use. You can specify information - about platform images, marketplace images, or virtual machine images. This - element is required when you want to use a platform image, marketplace - image, or virtual machine image, but is not used in other creation - operations. - - :param publisher: The image publisher. - :type publisher: str - :param offer: Specifies the offer of the platform image or marketplace - image used to create the virtual machine. - :type offer: str - :param sku: The image SKU. - :type sku: str - :param version: Specifies the version of the platform image or marketplace - image used to create the virtual machine. The allowed formats are - Major.Minor.Build or 'latest'. Major, Minor, and Build are decimal - numbers. Specify 'latest' to use the latest version of an image available - at deploy time. Even if you use 'latest', the VM image will not - automatically update after deploy time even if a new version becomes - available. - :type version: str - """ - - _attribute_map = { - 'publisher': {'key': 'publisher', 'type': 'str'}, - 'offer': {'key': 'offer', 'type': 'str'}, - 'sku': {'key': 'sku', 'type': 'str'}, - 'version': {'key': 'version', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ImageReference, self).__init__(**kwargs) - self.publisher = kwargs.get('publisher', None) - self.offer = kwargs.get('offer', None) - self.sku = kwargs.get('sku', None) - self.version = kwargs.get('version', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/image_reference_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/image_reference_py3.py deleted file mode 100644 index ec4e3f91dee4..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/image_reference_py3.py +++ /dev/null @@ -1,51 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ImageReference(Model): - """Specifies information about the image to use. You can specify information - about platform images, marketplace images, or virtual machine images. This - element is required when you want to use a platform image, marketplace - image, or virtual machine image, but is not used in other creation - operations. - - :param publisher: The image publisher. - :type publisher: str - :param offer: Specifies the offer of the platform image or marketplace - image used to create the virtual machine. - :type offer: str - :param sku: The image SKU. - :type sku: str - :param version: Specifies the version of the platform image or marketplace - image used to create the virtual machine. The allowed formats are - Major.Minor.Build or 'latest'. Major, Minor, and Build are decimal - numbers. Specify 'latest' to use the latest version of an image available - at deploy time. Even if you use 'latest', the VM image will not - automatically update after deploy time even if a new version becomes - available. - :type version: str - """ - - _attribute_map = { - 'publisher': {'key': 'publisher', 'type': 'str'}, - 'offer': {'key': 'offer', 'type': 'str'}, - 'sku': {'key': 'sku', 'type': 'str'}, - 'version': {'key': 'version', 'type': 'str'}, - } - - def __init__(self, *, publisher: str=None, offer: str=None, sku: str=None, version: str=None, **kwargs) -> None: - super(ImageReference, self).__init__(**kwargs) - self.publisher = publisher - self.offer = offer - self.sku = sku - self.version = version diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/inner_error.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/inner_error.py deleted file mode 100644 index 6324249d7c19..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/inner_error.py +++ /dev/null @@ -1,32 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class InnerError(Model): - """Inner error details. - - :param exceptiontype: The exception type. - :type exceptiontype: str - :param errordetail: The internal error message or exception dump. - :type errordetail: str - """ - - _attribute_map = { - 'exceptiontype': {'key': 'exceptiontype', 'type': 'str'}, - 'errordetail': {'key': 'errordetail', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(InnerError, self).__init__(**kwargs) - self.exceptiontype = kwargs.get('exceptiontype', None) - self.errordetail = kwargs.get('errordetail', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/inner_error_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/inner_error_py3.py deleted file mode 100644 index ccec30d7b53f..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/inner_error_py3.py +++ /dev/null @@ -1,32 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class InnerError(Model): - """Inner error details. - - :param exceptiontype: The exception type. - :type exceptiontype: str - :param errordetail: The internal error message or exception dump. - :type errordetail: str - """ - - _attribute_map = { - 'exceptiontype': {'key': 'exceptiontype', 'type': 'str'}, - 'errordetail': {'key': 'errordetail', 'type': 'str'}, - } - - def __init__(self, *, exceptiontype: str=None, errordetail: str=None, **kwargs) -> None: - super(InnerError, self).__init__(**kwargs) - self.exceptiontype = exceptiontype - self.errordetail = errordetail diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/instance_view_status.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/instance_view_status.py deleted file mode 100644 index c1932d34ba85..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/instance_view_status.py +++ /dev/null @@ -1,47 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class InstanceViewStatus(Model): - """Instance view status. - - :param code: The status code. - :type code: str - :param level: The level code. Possible values include: 'Info', 'Warning', - 'Error' - :type level: str or - ~azure.mgmt.compute.v2015_06_15.models.StatusLevelTypes - :param display_status: The short localizable label for the status. - :type display_status: str - :param message: The detailed status message, including for alerts and - error messages. - :type message: str - :param time: The time of the status. - :type time: datetime - """ - - _attribute_map = { - 'code': {'key': 'code', 'type': 'str'}, - 'level': {'key': 'level', 'type': 'StatusLevelTypes'}, - 'display_status': {'key': 'displayStatus', 'type': 'str'}, - 'message': {'key': 'message', 'type': 'str'}, - 'time': {'key': 'time', 'type': 'iso-8601'}, - } - - def __init__(self, **kwargs): - super(InstanceViewStatus, self).__init__(**kwargs) - self.code = kwargs.get('code', None) - self.level = kwargs.get('level', None) - self.display_status = kwargs.get('display_status', None) - self.message = kwargs.get('message', None) - self.time = kwargs.get('time', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/instance_view_status_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/instance_view_status_py3.py deleted file mode 100644 index cb721ac714cc..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/instance_view_status_py3.py +++ /dev/null @@ -1,47 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class InstanceViewStatus(Model): - """Instance view status. - - :param code: The status code. - :type code: str - :param level: The level code. Possible values include: 'Info', 'Warning', - 'Error' - :type level: str or - ~azure.mgmt.compute.v2015_06_15.models.StatusLevelTypes - :param display_status: The short localizable label for the status. - :type display_status: str - :param message: The detailed status message, including for alerts and - error messages. - :type message: str - :param time: The time of the status. - :type time: datetime - """ - - _attribute_map = { - 'code': {'key': 'code', 'type': 'str'}, - 'level': {'key': 'level', 'type': 'StatusLevelTypes'}, - 'display_status': {'key': 'displayStatus', 'type': 'str'}, - 'message': {'key': 'message', 'type': 'str'}, - 'time': {'key': 'time', 'type': 'iso-8601'}, - } - - def __init__(self, *, code: str=None, level=None, display_status: str=None, message: str=None, time=None, **kwargs) -> None: - super(InstanceViewStatus, self).__init__(**kwargs) - self.code = code - self.level = level - self.display_status = display_status - self.message = message - self.time = time diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/key_vault_key_reference.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/key_vault_key_reference.py deleted file mode 100644 index 8d508c43671c..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/key_vault_key_reference.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class KeyVaultKeyReference(Model): - """Describes a reference to Key Vault Key. - - All required parameters must be populated in order to send to Azure. - - :param key_url: Required. The URL referencing a key encryption key in Key - Vault. - :type key_url: str - :param source_vault: Required. The relative URL of the Key Vault - containing the key. - :type source_vault: ~azure.mgmt.compute.v2015_06_15.models.SubResource - """ - - _validation = { - 'key_url': {'required': True}, - 'source_vault': {'required': True}, - } - - _attribute_map = { - 'key_url': {'key': 'keyUrl', 'type': 'str'}, - 'source_vault': {'key': 'sourceVault', 'type': 'SubResource'}, - } - - def __init__(self, **kwargs): - super(KeyVaultKeyReference, self).__init__(**kwargs) - self.key_url = kwargs.get('key_url', None) - self.source_vault = kwargs.get('source_vault', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/key_vault_key_reference_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/key_vault_key_reference_py3.py deleted file mode 100644 index 630042c29596..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/key_vault_key_reference_py3.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class KeyVaultKeyReference(Model): - """Describes a reference to Key Vault Key. - - All required parameters must be populated in order to send to Azure. - - :param key_url: Required. The URL referencing a key encryption key in Key - Vault. - :type key_url: str - :param source_vault: Required. The relative URL of the Key Vault - containing the key. - :type source_vault: ~azure.mgmt.compute.v2015_06_15.models.SubResource - """ - - _validation = { - 'key_url': {'required': True}, - 'source_vault': {'required': True}, - } - - _attribute_map = { - 'key_url': {'key': 'keyUrl', 'type': 'str'}, - 'source_vault': {'key': 'sourceVault', 'type': 'SubResource'}, - } - - def __init__(self, *, key_url: str, source_vault, **kwargs) -> None: - super(KeyVaultKeyReference, self).__init__(**kwargs) - self.key_url = key_url - self.source_vault = source_vault diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/key_vault_secret_reference.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/key_vault_secret_reference.py deleted file mode 100644 index ddd5ce2a668a..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/key_vault_secret_reference.py +++ /dev/null @@ -1,40 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class KeyVaultSecretReference(Model): - """Describes a reference to Key Vault Secret. - - All required parameters must be populated in order to send to Azure. - - :param secret_url: Required. The URL referencing a secret in a Key Vault. - :type secret_url: str - :param source_vault: Required. The relative URL of the Key Vault - containing the secret. - :type source_vault: ~azure.mgmt.compute.v2015_06_15.models.SubResource - """ - - _validation = { - 'secret_url': {'required': True}, - 'source_vault': {'required': True}, - } - - _attribute_map = { - 'secret_url': {'key': 'secretUrl', 'type': 'str'}, - 'source_vault': {'key': 'sourceVault', 'type': 'SubResource'}, - } - - def __init__(self, **kwargs): - super(KeyVaultSecretReference, self).__init__(**kwargs) - self.secret_url = kwargs.get('secret_url', None) - self.source_vault = kwargs.get('source_vault', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/key_vault_secret_reference_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/key_vault_secret_reference_py3.py deleted file mode 100644 index 517f66ed3180..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/key_vault_secret_reference_py3.py +++ /dev/null @@ -1,40 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class KeyVaultSecretReference(Model): - """Describes a reference to Key Vault Secret. - - All required parameters must be populated in order to send to Azure. - - :param secret_url: Required. The URL referencing a secret in a Key Vault. - :type secret_url: str - :param source_vault: Required. The relative URL of the Key Vault - containing the secret. - :type source_vault: ~azure.mgmt.compute.v2015_06_15.models.SubResource - """ - - _validation = { - 'secret_url': {'required': True}, - 'source_vault': {'required': True}, - } - - _attribute_map = { - 'secret_url': {'key': 'secretUrl', 'type': 'str'}, - 'source_vault': {'key': 'sourceVault', 'type': 'SubResource'}, - } - - def __init__(self, *, secret_url: str, source_vault, **kwargs) -> None: - super(KeyVaultSecretReference, self).__init__(**kwargs) - self.secret_url = secret_url - self.source_vault = source_vault diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/linux_configuration.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/linux_configuration.py deleted file mode 100644 index 562b1fbb78ce..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/linux_configuration.py +++ /dev/null @@ -1,39 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class LinuxConfiguration(Model): - """Specifies the Linux operating system settings on the virtual machine. -

    For a list of supported Linux distributions, see [Linux on - Azure-Endorsed - Distributions](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-endorsed-distros?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json) -

    For running non-endorsed distributions, see [Information for - Non-Endorsed - Distributions](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-create-upload-generic?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json). - - :param disable_password_authentication: Specifies whether password - authentication should be disabled. - :type disable_password_authentication: bool - :param ssh: Specifies the ssh key configuration for a Linux OS. - :type ssh: ~azure.mgmt.compute.v2015_06_15.models.SshConfiguration - """ - - _attribute_map = { - 'disable_password_authentication': {'key': 'disablePasswordAuthentication', 'type': 'bool'}, - 'ssh': {'key': 'ssh', 'type': 'SshConfiguration'}, - } - - def __init__(self, **kwargs): - super(LinuxConfiguration, self).__init__(**kwargs) - self.disable_password_authentication = kwargs.get('disable_password_authentication', None) - self.ssh = kwargs.get('ssh', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/linux_configuration_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/linux_configuration_py3.py deleted file mode 100644 index bfc384d66e23..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/linux_configuration_py3.py +++ /dev/null @@ -1,39 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class LinuxConfiguration(Model): - """Specifies the Linux operating system settings on the virtual machine. -

    For a list of supported Linux distributions, see [Linux on - Azure-Endorsed - Distributions](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-endorsed-distros?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json) -

    For running non-endorsed distributions, see [Information for - Non-Endorsed - Distributions](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-create-upload-generic?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json). - - :param disable_password_authentication: Specifies whether password - authentication should be disabled. - :type disable_password_authentication: bool - :param ssh: Specifies the ssh key configuration for a Linux OS. - :type ssh: ~azure.mgmt.compute.v2015_06_15.models.SshConfiguration - """ - - _attribute_map = { - 'disable_password_authentication': {'key': 'disablePasswordAuthentication', 'type': 'bool'}, - 'ssh': {'key': 'ssh', 'type': 'SshConfiguration'}, - } - - def __init__(self, *, disable_password_authentication: bool=None, ssh=None, **kwargs) -> None: - super(LinuxConfiguration, self).__init__(**kwargs) - self.disable_password_authentication = disable_password_authentication - self.ssh = ssh diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/network_interface_reference.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/network_interface_reference.py deleted file mode 100644 index b86e305e3f74..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/network_interface_reference.py +++ /dev/null @@ -1,32 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .sub_resource import SubResource - - -class NetworkInterfaceReference(SubResource): - """Describes a network interface reference. - - :param id: Resource Id - :type id: str - :param primary: Specifies the primary network interface in case the - virtual machine has more than 1 network interface. - :type primary: bool - """ - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'primary': {'key': 'properties.primary', 'type': 'bool'}, - } - - def __init__(self, **kwargs): - super(NetworkInterfaceReference, self).__init__(**kwargs) - self.primary = kwargs.get('primary', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/network_interface_reference_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/network_interface_reference_py3.py deleted file mode 100644 index 47da29278832..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/network_interface_reference_py3.py +++ /dev/null @@ -1,32 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .sub_resource_py3 import SubResource - - -class NetworkInterfaceReference(SubResource): - """Describes a network interface reference. - - :param id: Resource Id - :type id: str - :param primary: Specifies the primary network interface in case the - virtual machine has more than 1 network interface. - :type primary: bool - """ - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'primary': {'key': 'properties.primary', 'type': 'bool'}, - } - - def __init__(self, *, id: str=None, primary: bool=None, **kwargs) -> None: - super(NetworkInterfaceReference, self).__init__(id=id, **kwargs) - self.primary = primary diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/network_profile.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/network_profile.py deleted file mode 100644 index 4ac8348e2f50..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/network_profile.py +++ /dev/null @@ -1,30 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class NetworkProfile(Model): - """Specifies the network interfaces of the virtual machine. - - :param network_interfaces: Specifies the list of resource Ids for the - network interfaces associated with the virtual machine. - :type network_interfaces: - list[~azure.mgmt.compute.v2015_06_15.models.NetworkInterfaceReference] - """ - - _attribute_map = { - 'network_interfaces': {'key': 'networkInterfaces', 'type': '[NetworkInterfaceReference]'}, - } - - def __init__(self, **kwargs): - super(NetworkProfile, self).__init__(**kwargs) - self.network_interfaces = kwargs.get('network_interfaces', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/network_profile_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/network_profile_py3.py deleted file mode 100644 index 83519262caa0..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/network_profile_py3.py +++ /dev/null @@ -1,30 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class NetworkProfile(Model): - """Specifies the network interfaces of the virtual machine. - - :param network_interfaces: Specifies the list of resource Ids for the - network interfaces associated with the virtual machine. - :type network_interfaces: - list[~azure.mgmt.compute.v2015_06_15.models.NetworkInterfaceReference] - """ - - _attribute_map = { - 'network_interfaces': {'key': 'networkInterfaces', 'type': '[NetworkInterfaceReference]'}, - } - - def __init__(self, *, network_interfaces=None, **kwargs) -> None: - super(NetworkProfile, self).__init__(**kwargs) - self.network_interfaces = network_interfaces diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/operation_status_response.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/operation_status_response.py deleted file mode 100644 index 6d351d32b65a..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/operation_status_response.py +++ /dev/null @@ -1,55 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class OperationStatusResponse(Model): - """Operation status response. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar name: Operation ID - :vartype name: str - :ivar status: Operation status - :vartype status: str - :ivar start_time: Start time of the operation - :vartype start_time: datetime - :ivar end_time: End time of the operation - :vartype end_time: datetime - :ivar error: Api error - :vartype error: ~azure.mgmt.compute.v2015_06_15.models.ApiError - """ - - _validation = { - 'name': {'readonly': True}, - 'status': {'readonly': True}, - 'start_time': {'readonly': True}, - 'end_time': {'readonly': True}, - 'error': {'readonly': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'status': {'key': 'status', 'type': 'str'}, - 'start_time': {'key': 'startTime', 'type': 'iso-8601'}, - 'end_time': {'key': 'endTime', 'type': 'iso-8601'}, - 'error': {'key': 'error', 'type': 'ApiError'}, - } - - def __init__(self, **kwargs): - super(OperationStatusResponse, self).__init__(**kwargs) - self.name = None - self.status = None - self.start_time = None - self.end_time = None - self.error = None diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/operation_status_response_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/operation_status_response_py3.py deleted file mode 100644 index 3528bd0d9434..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/operation_status_response_py3.py +++ /dev/null @@ -1,55 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class OperationStatusResponse(Model): - """Operation status response. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar name: Operation ID - :vartype name: str - :ivar status: Operation status - :vartype status: str - :ivar start_time: Start time of the operation - :vartype start_time: datetime - :ivar end_time: End time of the operation - :vartype end_time: datetime - :ivar error: Api error - :vartype error: ~azure.mgmt.compute.v2015_06_15.models.ApiError - """ - - _validation = { - 'name': {'readonly': True}, - 'status': {'readonly': True}, - 'start_time': {'readonly': True}, - 'end_time': {'readonly': True}, - 'error': {'readonly': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'status': {'key': 'status', 'type': 'str'}, - 'start_time': {'key': 'startTime', 'type': 'iso-8601'}, - 'end_time': {'key': 'endTime', 'type': 'iso-8601'}, - 'error': {'key': 'error', 'type': 'ApiError'}, - } - - def __init__(self, **kwargs) -> None: - super(OperationStatusResponse, self).__init__(**kwargs) - self.name = None - self.status = None - self.start_time = None - self.end_time = None - self.error = None diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/os_disk.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/os_disk.py deleted file mode 100644 index 68c332c68631..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/os_disk.py +++ /dev/null @@ -1,89 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class OSDisk(Model): - """Specifies information about the operating system disk used by the virtual - machine.

    For more information about disks, see [About disks and - VHDs for Azure virtual - machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-about-disks-vhds?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). - - All required parameters must be populated in order to send to Azure. - - :param os_type: This property allows you to specify the type of the OS - that is included in the disk if creating a VM from user-image or a - specialized VHD.

    Possible values are:

    **Windows** -

    **Linux**. Possible values include: 'Windows', 'Linux' - :type os_type: str or - ~azure.mgmt.compute.v2015_06_15.models.OperatingSystemTypes - :param encryption_settings: Specifies the encryption settings for the OS - Disk.

    Minimum api-version: 2015-06-15 - :type encryption_settings: - ~azure.mgmt.compute.v2015_06_15.models.DiskEncryptionSettings - :param name: Required. The disk name. - :type name: str - :param vhd: Required. The virtual hard disk. - :type vhd: ~azure.mgmt.compute.v2015_06_15.models.VirtualHardDisk - :param image: The source user image virtual hard disk. The virtual hard - disk will be copied before being attached to the virtual machine. If - SourceImage is provided, the destination virtual hard drive must not - exist. - :type image: ~azure.mgmt.compute.v2015_06_15.models.VirtualHardDisk - :param caching: Specifies the caching requirements.

    Possible - values are:

    **None**

    **ReadOnly**

    **ReadWrite** -

    Default: **None for Standard storage. ReadOnly for Premium - storage**. Possible values include: 'None', 'ReadOnly', 'ReadWrite' - :type caching: str or ~azure.mgmt.compute.v2015_06_15.models.CachingTypes - :param create_option: Required. Specifies how the virtual machine should - be created.

    Possible values are:

    **Attach** \\u2013 This - value is used when you are using a specialized disk to create the virtual - machine.

    **FromImage** \\u2013 This value is used when you are - using an image to create the virtual machine. If you are using a platform - image, you also use the imageReference element described above. If you are - using a marketplace image, you also use the plan element previously - described. Possible values include: 'FromImage', 'Empty', 'Attach' - :type create_option: str or - ~azure.mgmt.compute.v2015_06_15.models.DiskCreateOptionTypes - :param disk_size_gb: Specifies the size of an empty data disk in - gigabytes. This element can be used to overwrite the size of the disk in a - virtual machine image.

    This value cannot be larger than 1023 GB - :type disk_size_gb: int - """ - - _validation = { - 'name': {'required': True}, - 'vhd': {'required': True}, - 'create_option': {'required': True}, - } - - _attribute_map = { - 'os_type': {'key': 'osType', 'type': 'OperatingSystemTypes'}, - 'encryption_settings': {'key': 'encryptionSettings', 'type': 'DiskEncryptionSettings'}, - 'name': {'key': 'name', 'type': 'str'}, - 'vhd': {'key': 'vhd', 'type': 'VirtualHardDisk'}, - 'image': {'key': 'image', 'type': 'VirtualHardDisk'}, - 'caching': {'key': 'caching', 'type': 'CachingTypes'}, - 'create_option': {'key': 'createOption', 'type': 'DiskCreateOptionTypes'}, - 'disk_size_gb': {'key': 'diskSizeGB', 'type': 'int'}, - } - - def __init__(self, **kwargs): - super(OSDisk, self).__init__(**kwargs) - self.os_type = kwargs.get('os_type', None) - self.encryption_settings = kwargs.get('encryption_settings', None) - self.name = kwargs.get('name', None) - self.vhd = kwargs.get('vhd', None) - self.image = kwargs.get('image', None) - self.caching = kwargs.get('caching', None) - self.create_option = kwargs.get('create_option', None) - self.disk_size_gb = kwargs.get('disk_size_gb', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/os_disk_image.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/os_disk_image.py deleted file mode 100644 index 75d1d853bee4..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/os_disk_image.py +++ /dev/null @@ -1,36 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class OSDiskImage(Model): - """Contains the os disk image information. - - All required parameters must be populated in order to send to Azure. - - :param operating_system: Required. The operating system of the - osDiskImage. Possible values include: 'Windows', 'Linux' - :type operating_system: str or - ~azure.mgmt.compute.v2015_06_15.models.OperatingSystemTypes - """ - - _validation = { - 'operating_system': {'required': True}, - } - - _attribute_map = { - 'operating_system': {'key': 'operatingSystem', 'type': 'OperatingSystemTypes'}, - } - - def __init__(self, **kwargs): - super(OSDiskImage, self).__init__(**kwargs) - self.operating_system = kwargs.get('operating_system', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/os_disk_image_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/os_disk_image_py3.py deleted file mode 100644 index 8a13d6b47d8f..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/os_disk_image_py3.py +++ /dev/null @@ -1,36 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class OSDiskImage(Model): - """Contains the os disk image information. - - All required parameters must be populated in order to send to Azure. - - :param operating_system: Required. The operating system of the - osDiskImage. Possible values include: 'Windows', 'Linux' - :type operating_system: str or - ~azure.mgmt.compute.v2015_06_15.models.OperatingSystemTypes - """ - - _validation = { - 'operating_system': {'required': True}, - } - - _attribute_map = { - 'operating_system': {'key': 'operatingSystem', 'type': 'OperatingSystemTypes'}, - } - - def __init__(self, *, operating_system, **kwargs) -> None: - super(OSDiskImage, self).__init__(**kwargs) - self.operating_system = operating_system diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/os_disk_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/os_disk_py3.py deleted file mode 100644 index 91f30add6e2f..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/os_disk_py3.py +++ /dev/null @@ -1,89 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class OSDisk(Model): - """Specifies information about the operating system disk used by the virtual - machine.

    For more information about disks, see [About disks and - VHDs for Azure virtual - machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-about-disks-vhds?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). - - All required parameters must be populated in order to send to Azure. - - :param os_type: This property allows you to specify the type of the OS - that is included in the disk if creating a VM from user-image or a - specialized VHD.

    Possible values are:

    **Windows** -

    **Linux**. Possible values include: 'Windows', 'Linux' - :type os_type: str or - ~azure.mgmt.compute.v2015_06_15.models.OperatingSystemTypes - :param encryption_settings: Specifies the encryption settings for the OS - Disk.

    Minimum api-version: 2015-06-15 - :type encryption_settings: - ~azure.mgmt.compute.v2015_06_15.models.DiskEncryptionSettings - :param name: Required. The disk name. - :type name: str - :param vhd: Required. The virtual hard disk. - :type vhd: ~azure.mgmt.compute.v2015_06_15.models.VirtualHardDisk - :param image: The source user image virtual hard disk. The virtual hard - disk will be copied before being attached to the virtual machine. If - SourceImage is provided, the destination virtual hard drive must not - exist. - :type image: ~azure.mgmt.compute.v2015_06_15.models.VirtualHardDisk - :param caching: Specifies the caching requirements.

    Possible - values are:

    **None**

    **ReadOnly**

    **ReadWrite** -

    Default: **None for Standard storage. ReadOnly for Premium - storage**. Possible values include: 'None', 'ReadOnly', 'ReadWrite' - :type caching: str or ~azure.mgmt.compute.v2015_06_15.models.CachingTypes - :param create_option: Required. Specifies how the virtual machine should - be created.

    Possible values are:

    **Attach** \\u2013 This - value is used when you are using a specialized disk to create the virtual - machine.

    **FromImage** \\u2013 This value is used when you are - using an image to create the virtual machine. If you are using a platform - image, you also use the imageReference element described above. If you are - using a marketplace image, you also use the plan element previously - described. Possible values include: 'FromImage', 'Empty', 'Attach' - :type create_option: str or - ~azure.mgmt.compute.v2015_06_15.models.DiskCreateOptionTypes - :param disk_size_gb: Specifies the size of an empty data disk in - gigabytes. This element can be used to overwrite the size of the disk in a - virtual machine image.

    This value cannot be larger than 1023 GB - :type disk_size_gb: int - """ - - _validation = { - 'name': {'required': True}, - 'vhd': {'required': True}, - 'create_option': {'required': True}, - } - - _attribute_map = { - 'os_type': {'key': 'osType', 'type': 'OperatingSystemTypes'}, - 'encryption_settings': {'key': 'encryptionSettings', 'type': 'DiskEncryptionSettings'}, - 'name': {'key': 'name', 'type': 'str'}, - 'vhd': {'key': 'vhd', 'type': 'VirtualHardDisk'}, - 'image': {'key': 'image', 'type': 'VirtualHardDisk'}, - 'caching': {'key': 'caching', 'type': 'CachingTypes'}, - 'create_option': {'key': 'createOption', 'type': 'DiskCreateOptionTypes'}, - 'disk_size_gb': {'key': 'diskSizeGB', 'type': 'int'}, - } - - def __init__(self, *, name: str, vhd, create_option, os_type=None, encryption_settings=None, image=None, caching=None, disk_size_gb: int=None, **kwargs) -> None: - super(OSDisk, self).__init__(**kwargs) - self.os_type = os_type - self.encryption_settings = encryption_settings - self.name = name - self.vhd = vhd - self.image = image - self.caching = caching - self.create_option = create_option - self.disk_size_gb = disk_size_gb diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/os_profile.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/os_profile.py deleted file mode 100644 index 807cb3e38e05..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/os_profile.py +++ /dev/null @@ -1,100 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class OSProfile(Model): - """Specifies the operating system settings for the virtual machine. - - :param computer_name: Specifies the host OS name of the virtual machine. -

    This name cannot be updated after the VM is created.

    - **Max-length (Windows):** 15 characters

    **Max-length (Linux):** - 64 characters.

    For naming conventions and restrictions see [Azure - infrastructure services implementation - guidelines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-infrastructure-subscription-accounts-guidelines?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json#1-naming-conventions). - :type computer_name: str - :param admin_username: Specifies the name of the administrator account. -

    **Windows-only restriction:** Cannot end in "."

    - **Disallowed values:** "administrator", "admin", "user", "user1", "test", - "user2", "test1", "user3", "admin1", "1", "123", "a", "actuser", "adm", - "admin2", "aspnet", "backup", "console", "david", "guest", "john", - "owner", "root", "server", "sql", "support", "support_388945a0", "sys", - "test2", "test3", "user4", "user5".

    **Minimum-length (Linux):** 1 - character

    **Max-length (Linux):** 64 characters

    - **Max-length (Windows):** 20 characters

  • For root access to - the Linux VM, see [Using root privileges on Linux virtual machines in - Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-use-root-privileges?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json)
  • - For a list of built-in system users on Linux that should not be used in - this field, see [Selecting User Names for Linux on - Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-usernames?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json) - :type admin_username: str - :param admin_password: Specifies the password of the administrator - account.

    **Minimum-length (Windows):** 8 characters

    - **Minimum-length (Linux):** 6 characters

    **Max-length - (Windows):** 123 characters

    **Max-length (Linux):** 72 characters -

    **Complexity requirements:** 3 out of 4 conditions below need to - be fulfilled
    Has lower characters
    Has upper characters
    Has a - digit
    Has a special character (Regex match [\\W_])

    - **Disallowed values:** "abc@123", "P@$$w0rd", "P@ssw0rd", "P@ssword123", - "Pa$$word", "pass@word1", "Password!", "Password1", "Password22", - "iloveyou!"

    For resetting the password, see [How to reset the - Remote Desktop service or its login password in a Windows - VM](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-reset-rdp?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json) -

    For resetting root password, see [Manage users, SSH, and check or - repair disks on Azure Linux VMs using the VMAccess - Extension](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-using-vmaccess-extension?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json#reset-root-password) - :type admin_password: str - :param custom_data: Specifies a base-64 encoded string of custom data. The - base-64 encoded string is decoded to a binary array that is saved as a - file on the Virtual Machine. The maximum length of the binary array is - 65535 bytes.

    For using cloud-init for your VM, see [Using - cloud-init to customize a Linux VM during - creation](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-using-cloud-init?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json) - :type custom_data: str - :param windows_configuration: Specifies Windows operating system settings - on the virtual machine. - :type windows_configuration: - ~azure.mgmt.compute.v2015_06_15.models.WindowsConfiguration - :param linux_configuration: Specifies the Linux operating system settings - on the virtual machine.

    For a list of supported Linux - distributions, see [Linux on Azure-Endorsed - Distributions](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-endorsed-distros?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json) -

    For running non-endorsed distributions, see [Information for - Non-Endorsed - Distributions](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-create-upload-generic?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json). - :type linux_configuration: - ~azure.mgmt.compute.v2015_06_15.models.LinuxConfiguration - :param secrets: Specifies set of certificates that should be installed - onto the virtual machine. - :type secrets: - list[~azure.mgmt.compute.v2015_06_15.models.VaultSecretGroup] - """ - - _attribute_map = { - 'computer_name': {'key': 'computerName', 'type': 'str'}, - 'admin_username': {'key': 'adminUsername', 'type': 'str'}, - 'admin_password': {'key': 'adminPassword', 'type': 'str'}, - 'custom_data': {'key': 'customData', 'type': 'str'}, - 'windows_configuration': {'key': 'windowsConfiguration', 'type': 'WindowsConfiguration'}, - 'linux_configuration': {'key': 'linuxConfiguration', 'type': 'LinuxConfiguration'}, - 'secrets': {'key': 'secrets', 'type': '[VaultSecretGroup]'}, - } - - def __init__(self, **kwargs): - super(OSProfile, self).__init__(**kwargs) - self.computer_name = kwargs.get('computer_name', None) - self.admin_username = kwargs.get('admin_username', None) - self.admin_password = kwargs.get('admin_password', None) - self.custom_data = kwargs.get('custom_data', None) - self.windows_configuration = kwargs.get('windows_configuration', None) - self.linux_configuration = kwargs.get('linux_configuration', None) - self.secrets = kwargs.get('secrets', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/os_profile_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/os_profile_py3.py deleted file mode 100644 index 8e88f2838a81..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/os_profile_py3.py +++ /dev/null @@ -1,100 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class OSProfile(Model): - """Specifies the operating system settings for the virtual machine. - - :param computer_name: Specifies the host OS name of the virtual machine. -

    This name cannot be updated after the VM is created.

    - **Max-length (Windows):** 15 characters

    **Max-length (Linux):** - 64 characters.

    For naming conventions and restrictions see [Azure - infrastructure services implementation - guidelines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-infrastructure-subscription-accounts-guidelines?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json#1-naming-conventions). - :type computer_name: str - :param admin_username: Specifies the name of the administrator account. -

    **Windows-only restriction:** Cannot end in "."

    - **Disallowed values:** "administrator", "admin", "user", "user1", "test", - "user2", "test1", "user3", "admin1", "1", "123", "a", "actuser", "adm", - "admin2", "aspnet", "backup", "console", "david", "guest", "john", - "owner", "root", "server", "sql", "support", "support_388945a0", "sys", - "test2", "test3", "user4", "user5".

    **Minimum-length (Linux):** 1 - character

    **Max-length (Linux):** 64 characters

    - **Max-length (Windows):** 20 characters

  • For root access to - the Linux VM, see [Using root privileges on Linux virtual machines in - Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-use-root-privileges?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json)
  • - For a list of built-in system users on Linux that should not be used in - this field, see [Selecting User Names for Linux on - Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-usernames?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json) - :type admin_username: str - :param admin_password: Specifies the password of the administrator - account.

    **Minimum-length (Windows):** 8 characters

    - **Minimum-length (Linux):** 6 characters

    **Max-length - (Windows):** 123 characters

    **Max-length (Linux):** 72 characters -

    **Complexity requirements:** 3 out of 4 conditions below need to - be fulfilled
    Has lower characters
    Has upper characters
    Has a - digit
    Has a special character (Regex match [\\W_])

    - **Disallowed values:** "abc@123", "P@$$w0rd", "P@ssw0rd", "P@ssword123", - "Pa$$word", "pass@word1", "Password!", "Password1", "Password22", - "iloveyou!"

    For resetting the password, see [How to reset the - Remote Desktop service or its login password in a Windows - VM](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-reset-rdp?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json) -

    For resetting root password, see [Manage users, SSH, and check or - repair disks on Azure Linux VMs using the VMAccess - Extension](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-using-vmaccess-extension?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json#reset-root-password) - :type admin_password: str - :param custom_data: Specifies a base-64 encoded string of custom data. The - base-64 encoded string is decoded to a binary array that is saved as a - file on the Virtual Machine. The maximum length of the binary array is - 65535 bytes.

    For using cloud-init for your VM, see [Using - cloud-init to customize a Linux VM during - creation](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-using-cloud-init?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json) - :type custom_data: str - :param windows_configuration: Specifies Windows operating system settings - on the virtual machine. - :type windows_configuration: - ~azure.mgmt.compute.v2015_06_15.models.WindowsConfiguration - :param linux_configuration: Specifies the Linux operating system settings - on the virtual machine.

    For a list of supported Linux - distributions, see [Linux on Azure-Endorsed - Distributions](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-endorsed-distros?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json) -

    For running non-endorsed distributions, see [Information for - Non-Endorsed - Distributions](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-create-upload-generic?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json). - :type linux_configuration: - ~azure.mgmt.compute.v2015_06_15.models.LinuxConfiguration - :param secrets: Specifies set of certificates that should be installed - onto the virtual machine. - :type secrets: - list[~azure.mgmt.compute.v2015_06_15.models.VaultSecretGroup] - """ - - _attribute_map = { - 'computer_name': {'key': 'computerName', 'type': 'str'}, - 'admin_username': {'key': 'adminUsername', 'type': 'str'}, - 'admin_password': {'key': 'adminPassword', 'type': 'str'}, - 'custom_data': {'key': 'customData', 'type': 'str'}, - 'windows_configuration': {'key': 'windowsConfiguration', 'type': 'WindowsConfiguration'}, - 'linux_configuration': {'key': 'linuxConfiguration', 'type': 'LinuxConfiguration'}, - 'secrets': {'key': 'secrets', 'type': '[VaultSecretGroup]'}, - } - - def __init__(self, *, computer_name: str=None, admin_username: str=None, admin_password: str=None, custom_data: str=None, windows_configuration=None, linux_configuration=None, secrets=None, **kwargs) -> None: - super(OSProfile, self).__init__(**kwargs) - self.computer_name = computer_name - self.admin_username = admin_username - self.admin_password = admin_password - self.custom_data = custom_data - self.windows_configuration = windows_configuration - self.linux_configuration = linux_configuration - self.secrets = secrets diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/plan.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/plan.py deleted file mode 100644 index d42b6b32cfac..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/plan.py +++ /dev/null @@ -1,46 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class Plan(Model): - """Specifies information about the marketplace image used to create the - virtual machine. This element is only used for marketplace images. Before - you can use a marketplace image from an API, you must enable the image for - programmatic use. In the Azure portal, find the marketplace image that you - want to use and then click **Want to deploy programmatically, Get Started - ->**. Enter any required information and then click **Save**. - - :param name: The plan ID. - :type name: str - :param publisher: The publisher ID. - :type publisher: str - :param product: Specifies the product of the image from the marketplace. - This is the same value as Offer under the imageReference element. - :type product: str - :param promotion_code: The promotion code. - :type promotion_code: str - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'publisher': {'key': 'publisher', 'type': 'str'}, - 'product': {'key': 'product', 'type': 'str'}, - 'promotion_code': {'key': 'promotionCode', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(Plan, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.publisher = kwargs.get('publisher', None) - self.product = kwargs.get('product', None) - self.promotion_code = kwargs.get('promotion_code', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/plan_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/plan_py3.py deleted file mode 100644 index 9cca2c78a123..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/plan_py3.py +++ /dev/null @@ -1,46 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class Plan(Model): - """Specifies information about the marketplace image used to create the - virtual machine. This element is only used for marketplace images. Before - you can use a marketplace image from an API, you must enable the image for - programmatic use. In the Azure portal, find the marketplace image that you - want to use and then click **Want to deploy programmatically, Get Started - ->**. Enter any required information and then click **Save**. - - :param name: The plan ID. - :type name: str - :param publisher: The publisher ID. - :type publisher: str - :param product: Specifies the product of the image from the marketplace. - This is the same value as Offer under the imageReference element. - :type product: str - :param promotion_code: The promotion code. - :type promotion_code: str - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'publisher': {'key': 'publisher', 'type': 'str'}, - 'product': {'key': 'product', 'type': 'str'}, - 'promotion_code': {'key': 'promotionCode', 'type': 'str'}, - } - - def __init__(self, *, name: str=None, publisher: str=None, product: str=None, promotion_code: str=None, **kwargs) -> None: - super(Plan, self).__init__(**kwargs) - self.name = name - self.publisher = publisher - self.product = product - self.promotion_code = promotion_code diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/purchase_plan.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/purchase_plan.py deleted file mode 100644 index 2e1509addca6..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/purchase_plan.py +++ /dev/null @@ -1,47 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class PurchasePlan(Model): - """Used for establishing the purchase context of any 3rd Party artifact - through MarketPlace. - - All required parameters must be populated in order to send to Azure. - - :param publisher: Required. The publisher ID. - :type publisher: str - :param name: Required. The plan ID. - :type name: str - :param product: Required. Specifies the product of the image from the - marketplace. This is the same value as Offer under the imageReference - element. - :type product: str - """ - - _validation = { - 'publisher': {'required': True}, - 'name': {'required': True}, - 'product': {'required': True}, - } - - _attribute_map = { - 'publisher': {'key': 'publisher', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'product': {'key': 'product', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(PurchasePlan, self).__init__(**kwargs) - self.publisher = kwargs.get('publisher', None) - self.name = kwargs.get('name', None) - self.product = kwargs.get('product', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/purchase_plan_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/purchase_plan_py3.py deleted file mode 100644 index 26f7996f1633..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/purchase_plan_py3.py +++ /dev/null @@ -1,47 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class PurchasePlan(Model): - """Used for establishing the purchase context of any 3rd Party artifact - through MarketPlace. - - All required parameters must be populated in order to send to Azure. - - :param publisher: Required. The publisher ID. - :type publisher: str - :param name: Required. The plan ID. - :type name: str - :param product: Required. Specifies the product of the image from the - marketplace. This is the same value as Offer under the imageReference - element. - :type product: str - """ - - _validation = { - 'publisher': {'required': True}, - 'name': {'required': True}, - 'product': {'required': True}, - } - - _attribute_map = { - 'publisher': {'key': 'publisher', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'product': {'key': 'product', 'type': 'str'}, - } - - def __init__(self, *, publisher: str, name: str, product: str, **kwargs) -> None: - super(PurchasePlan, self).__init__(**kwargs) - self.publisher = publisher - self.name = name - self.product = product diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/resource.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/resource.py deleted file mode 100644 index 5dd7d481c685..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/resource.py +++ /dev/null @@ -1,56 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class Resource(Model): - """The Resource model definition. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource Id - :vartype id: str - :ivar name: Resource name - :vartype name: str - :ivar type: Resource type - :vartype type: str - :param location: Required. Resource location - :type location: str - :param tags: Resource tags - :type tags: dict[str, str] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - } - - def __init__(self, **kwargs): - super(Resource, self).__init__(**kwargs) - self.id = None - self.name = None - self.type = None - self.location = kwargs.get('location', None) - self.tags = kwargs.get('tags', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/resource_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/resource_py3.py deleted file mode 100644 index 2f3702caf609..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/resource_py3.py +++ /dev/null @@ -1,56 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class Resource(Model): - """The Resource model definition. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource Id - :vartype id: str - :ivar name: Resource name - :vartype name: str - :ivar type: Resource type - :vartype type: str - :param location: Required. Resource location - :type location: str - :param tags: Resource tags - :type tags: dict[str, str] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - } - - def __init__(self, *, location: str, tags=None, **kwargs) -> None: - super(Resource, self).__init__(**kwargs) - self.id = None - self.name = None - self.type = None - self.location = location - self.tags = tags diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/sku.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/sku.py deleted file mode 100644 index 5c07709435e0..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/sku.py +++ /dev/null @@ -1,38 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class Sku(Model): - """Describes a virtual machine scale set sku. - - :param name: The sku name. - :type name: str - :param tier: Specifies the tier of virtual machines in a scale set.

    Possible Values:

    **Standard**

    **Basic** - :type tier: str - :param capacity: Specifies the number of virtual machines in the scale - set. - :type capacity: long - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'tier': {'key': 'tier', 'type': 'str'}, - 'capacity': {'key': 'capacity', 'type': 'long'}, - } - - def __init__(self, **kwargs): - super(Sku, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.tier = kwargs.get('tier', None) - self.capacity = kwargs.get('capacity', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/sku_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/sku_py3.py deleted file mode 100644 index f6bc74afaadc..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/sku_py3.py +++ /dev/null @@ -1,38 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class Sku(Model): - """Describes a virtual machine scale set sku. - - :param name: The sku name. - :type name: str - :param tier: Specifies the tier of virtual machines in a scale set.

    Possible Values:

    **Standard**

    **Basic** - :type tier: str - :param capacity: Specifies the number of virtual machines in the scale - set. - :type capacity: long - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'tier': {'key': 'tier', 'type': 'str'}, - 'capacity': {'key': 'capacity', 'type': 'long'}, - } - - def __init__(self, *, name: str=None, tier: str=None, capacity: int=None, **kwargs) -> None: - super(Sku, self).__init__(**kwargs) - self.name = name - self.tier = tier - self.capacity = capacity diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/ssh_configuration.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/ssh_configuration.py deleted file mode 100644 index 10c604242030..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/ssh_configuration.py +++ /dev/null @@ -1,30 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class SshConfiguration(Model): - """SSH configuration for Linux based VMs running on Azure. - - :param public_keys: The list of SSH public keys used to authenticate with - linux based VMs. - :type public_keys: - list[~azure.mgmt.compute.v2015_06_15.models.SshPublicKey] - """ - - _attribute_map = { - 'public_keys': {'key': 'publicKeys', 'type': '[SshPublicKey]'}, - } - - def __init__(self, **kwargs): - super(SshConfiguration, self).__init__(**kwargs) - self.public_keys = kwargs.get('public_keys', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/ssh_configuration_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/ssh_configuration_py3.py deleted file mode 100644 index 6781d53e3e3a..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/ssh_configuration_py3.py +++ /dev/null @@ -1,30 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class SshConfiguration(Model): - """SSH configuration for Linux based VMs running on Azure. - - :param public_keys: The list of SSH public keys used to authenticate with - linux based VMs. - :type public_keys: - list[~azure.mgmt.compute.v2015_06_15.models.SshPublicKey] - """ - - _attribute_map = { - 'public_keys': {'key': 'publicKeys', 'type': '[SshPublicKey]'}, - } - - def __init__(self, *, public_keys=None, **kwargs) -> None: - super(SshConfiguration, self).__init__(**kwargs) - self.public_keys = public_keys diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/ssh_public_key.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/ssh_public_key.py deleted file mode 100644 index 122e0d3b9fdd..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/ssh_public_key.py +++ /dev/null @@ -1,39 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class SshPublicKey(Model): - """Contains information about SSH certificate public key and the path on the - Linux VM where the public key is placed. - - :param path: Specifies the full path on the created VM where ssh public - key is stored. If the file already exists, the specified key is appended - to the file. Example: /home/user/.ssh/authorized_keys - :type path: str - :param key_data: SSH public key certificate used to authenticate with the - VM through ssh. The key needs to be at least 2048-bit and in ssh-rsa - format.

    For creating ssh keys, see [Create SSH keys on Linux and - Mac for Linux VMs in - Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-mac-create-ssh-keys?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json). - :type key_data: str - """ - - _attribute_map = { - 'path': {'key': 'path', 'type': 'str'}, - 'key_data': {'key': 'keyData', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(SshPublicKey, self).__init__(**kwargs) - self.path = kwargs.get('path', None) - self.key_data = kwargs.get('key_data', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/ssh_public_key_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/ssh_public_key_py3.py deleted file mode 100644 index b16ee085b36b..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/ssh_public_key_py3.py +++ /dev/null @@ -1,39 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class SshPublicKey(Model): - """Contains information about SSH certificate public key and the path on the - Linux VM where the public key is placed. - - :param path: Specifies the full path on the created VM where ssh public - key is stored. If the file already exists, the specified key is appended - to the file. Example: /home/user/.ssh/authorized_keys - :type path: str - :param key_data: SSH public key certificate used to authenticate with the - VM through ssh. The key needs to be at least 2048-bit and in ssh-rsa - format.

    For creating ssh keys, see [Create SSH keys on Linux and - Mac for Linux VMs in - Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-mac-create-ssh-keys?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json). - :type key_data: str - """ - - _attribute_map = { - 'path': {'key': 'path', 'type': 'str'}, - 'key_data': {'key': 'keyData', 'type': 'str'}, - } - - def __init__(self, *, path: str=None, key_data: str=None, **kwargs) -> None: - super(SshPublicKey, self).__init__(**kwargs) - self.path = path - self.key_data = key_data diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/storage_profile.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/storage_profile.py deleted file mode 100644 index 867bd965561e..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/storage_profile.py +++ /dev/null @@ -1,47 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class StorageProfile(Model): - """Specifies the storage settings for the virtual machine disks. - - :param image_reference: Specifies information about the image to use. You - can specify information about platform images, marketplace images, or - virtual machine images. This element is required when you want to use a - platform image, marketplace image, or virtual machine image, but is not - used in other creation operations. - :type image_reference: - ~azure.mgmt.compute.v2015_06_15.models.ImageReference - :param os_disk: Specifies information about the operating system disk used - by the virtual machine.

    For more information about disks, see - [About disks and VHDs for Azure virtual - machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-about-disks-vhds?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). - :type os_disk: ~azure.mgmt.compute.v2015_06_15.models.OSDisk - :param data_disks: Specifies the parameters that are used to add a data - disk to a virtual machine.

    For more information about disks, see - [About disks and VHDs for Azure virtual - machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-about-disks-vhds?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). - :type data_disks: list[~azure.mgmt.compute.v2015_06_15.models.DataDisk] - """ - - _attribute_map = { - 'image_reference': {'key': 'imageReference', 'type': 'ImageReference'}, - 'os_disk': {'key': 'osDisk', 'type': 'OSDisk'}, - 'data_disks': {'key': 'dataDisks', 'type': '[DataDisk]'}, - } - - def __init__(self, **kwargs): - super(StorageProfile, self).__init__(**kwargs) - self.image_reference = kwargs.get('image_reference', None) - self.os_disk = kwargs.get('os_disk', None) - self.data_disks = kwargs.get('data_disks', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/storage_profile_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/storage_profile_py3.py deleted file mode 100644 index 6fbf8335d47a..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/storage_profile_py3.py +++ /dev/null @@ -1,47 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class StorageProfile(Model): - """Specifies the storage settings for the virtual machine disks. - - :param image_reference: Specifies information about the image to use. You - can specify information about platform images, marketplace images, or - virtual machine images. This element is required when you want to use a - platform image, marketplace image, or virtual machine image, but is not - used in other creation operations. - :type image_reference: - ~azure.mgmt.compute.v2015_06_15.models.ImageReference - :param os_disk: Specifies information about the operating system disk used - by the virtual machine.

    For more information about disks, see - [About disks and VHDs for Azure virtual - machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-about-disks-vhds?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). - :type os_disk: ~azure.mgmt.compute.v2015_06_15.models.OSDisk - :param data_disks: Specifies the parameters that are used to add a data - disk to a virtual machine.

    For more information about disks, see - [About disks and VHDs for Azure virtual - machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-about-disks-vhds?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). - :type data_disks: list[~azure.mgmt.compute.v2015_06_15.models.DataDisk] - """ - - _attribute_map = { - 'image_reference': {'key': 'imageReference', 'type': 'ImageReference'}, - 'os_disk': {'key': 'osDisk', 'type': 'OSDisk'}, - 'data_disks': {'key': 'dataDisks', 'type': '[DataDisk]'}, - } - - def __init__(self, *, image_reference=None, os_disk=None, data_disks=None, **kwargs) -> None: - super(StorageProfile, self).__init__(**kwargs) - self.image_reference = image_reference - self.os_disk = os_disk - self.data_disks = data_disks diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/sub_resource.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/sub_resource.py deleted file mode 100644 index 11e092cc6ff5..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/sub_resource.py +++ /dev/null @@ -1,28 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class SubResource(Model): - """SubResource. - - :param id: Resource Id - :type id: str - """ - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(SubResource, self).__init__(**kwargs) - self.id = kwargs.get('id', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/sub_resource_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/sub_resource_py3.py deleted file mode 100644 index 29e5afee38f9..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/sub_resource_py3.py +++ /dev/null @@ -1,28 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class SubResource(Model): - """SubResource. - - :param id: Resource Id - :type id: str - """ - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - } - - def __init__(self, *, id: str=None, **kwargs) -> None: - super(SubResource, self).__init__(**kwargs) - self.id = id diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/update_resource.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/update_resource.py deleted file mode 100644 index b1d2898ff082..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/update_resource.py +++ /dev/null @@ -1,28 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class UpdateResource(Model): - """The Update Resource model definition. - - :param tags: Resource tags - :type tags: dict[str, str] - """ - - _attribute_map = { - 'tags': {'key': 'tags', 'type': '{str}'}, - } - - def __init__(self, **kwargs): - super(UpdateResource, self).__init__(**kwargs) - self.tags = kwargs.get('tags', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/update_resource_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/update_resource_py3.py deleted file mode 100644 index c06c17c124d9..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/update_resource_py3.py +++ /dev/null @@ -1,28 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class UpdateResource(Model): - """The Update Resource model definition. - - :param tags: Resource tags - :type tags: dict[str, str] - """ - - _attribute_map = { - 'tags': {'key': 'tags', 'type': '{str}'}, - } - - def __init__(self, *, tags=None, **kwargs) -> None: - super(UpdateResource, self).__init__(**kwargs) - self.tags = tags diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/upgrade_policy.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/upgrade_policy.py deleted file mode 100644 index 44f90ffe6ee6..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/upgrade_policy.py +++ /dev/null @@ -1,33 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class UpgradePolicy(Model): - """Describes an upgrade policy - automatic or manual. - - :param mode: Specifies the mode of an upgrade to virtual machines in the - scale set.

    Possible values are:

    **Manual** - You - control the application of updates to virtual machines in the scale set. - You do this by using the manualUpgrade action.

    **Automatic** - - All virtual machines in the scale set are automatically updated at the - same time. Possible values include: 'Automatic', 'Manual' - :type mode: str or ~azure.mgmt.compute.v2015_06_15.models.UpgradeMode - """ - - _attribute_map = { - 'mode': {'key': 'mode', 'type': 'UpgradeMode'}, - } - - def __init__(self, **kwargs): - super(UpgradePolicy, self).__init__(**kwargs) - self.mode = kwargs.get('mode', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/upgrade_policy_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/upgrade_policy_py3.py deleted file mode 100644 index c12f9aa7f3b1..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/upgrade_policy_py3.py +++ /dev/null @@ -1,33 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class UpgradePolicy(Model): - """Describes an upgrade policy - automatic or manual. - - :param mode: Specifies the mode of an upgrade to virtual machines in the - scale set.

    Possible values are:

    **Manual** - You - control the application of updates to virtual machines in the scale set. - You do this by using the manualUpgrade action.

    **Automatic** - - All virtual machines in the scale set are automatically updated at the - same time. Possible values include: 'Automatic', 'Manual' - :type mode: str or ~azure.mgmt.compute.v2015_06_15.models.UpgradeMode - """ - - _attribute_map = { - 'mode': {'key': 'mode', 'type': 'UpgradeMode'}, - } - - def __init__(self, *, mode=None, **kwargs) -> None: - super(UpgradePolicy, self).__init__(**kwargs) - self.mode = mode diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/usage.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/usage.py deleted file mode 100644 index 01ed97fc4de6..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/usage.py +++ /dev/null @@ -1,54 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class Usage(Model): - """Describes Compute Resource Usage. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar unit: Required. An enum describing the unit of usage measurement. - Default value: "Count" . - :vartype unit: str - :param current_value: Required. The current usage of the resource. - :type current_value: int - :param limit: Required. The maximum permitted usage of the resource. - :type limit: long - :param name: Required. The name of the type of usage. - :type name: ~azure.mgmt.compute.v2015_06_15.models.UsageName - """ - - _validation = { - 'unit': {'required': True, 'constant': True}, - 'current_value': {'required': True}, - 'limit': {'required': True}, - 'name': {'required': True}, - } - - _attribute_map = { - 'unit': {'key': 'unit', 'type': 'str'}, - 'current_value': {'key': 'currentValue', 'type': 'int'}, - 'limit': {'key': 'limit', 'type': 'long'}, - 'name': {'key': 'name', 'type': 'UsageName'}, - } - - unit = "Count" - - def __init__(self, **kwargs): - super(Usage, self).__init__(**kwargs) - self.current_value = kwargs.get('current_value', None) - self.limit = kwargs.get('limit', None) - self.name = kwargs.get('name', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/usage_name.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/usage_name.py deleted file mode 100644 index e2560936493e..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/usage_name.py +++ /dev/null @@ -1,32 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class UsageName(Model): - """The Usage Names. - - :param value: The name of the resource. - :type value: str - :param localized_value: The localized name of the resource. - :type localized_value: str - """ - - _attribute_map = { - 'value': {'key': 'value', 'type': 'str'}, - 'localized_value': {'key': 'localizedValue', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(UsageName, self).__init__(**kwargs) - self.value = kwargs.get('value', None) - self.localized_value = kwargs.get('localized_value', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/usage_name_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/usage_name_py3.py deleted file mode 100644 index ad0b77459f75..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/usage_name_py3.py +++ /dev/null @@ -1,32 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class UsageName(Model): - """The Usage Names. - - :param value: The name of the resource. - :type value: str - :param localized_value: The localized name of the resource. - :type localized_value: str - """ - - _attribute_map = { - 'value': {'key': 'value', 'type': 'str'}, - 'localized_value': {'key': 'localizedValue', 'type': 'str'}, - } - - def __init__(self, *, value: str=None, localized_value: str=None, **kwargs) -> None: - super(UsageName, self).__init__(**kwargs) - self.value = value - self.localized_value = localized_value diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/usage_paged.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/usage_paged.py deleted file mode 100644 index 11d1359b9008..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/usage_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class UsagePaged(Paged): - """ - A paging container for iterating over a list of :class:`Usage ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[Usage]'} - } - - def __init__(self, *args, **kwargs): - - super(UsagePaged, self).__init__(*args, **kwargs) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/usage_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/usage_py3.py deleted file mode 100644 index 73b319c36b9d..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/usage_py3.py +++ /dev/null @@ -1,54 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class Usage(Model): - """Describes Compute Resource Usage. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar unit: Required. An enum describing the unit of usage measurement. - Default value: "Count" . - :vartype unit: str - :param current_value: Required. The current usage of the resource. - :type current_value: int - :param limit: Required. The maximum permitted usage of the resource. - :type limit: long - :param name: Required. The name of the type of usage. - :type name: ~azure.mgmt.compute.v2015_06_15.models.UsageName - """ - - _validation = { - 'unit': {'required': True, 'constant': True}, - 'current_value': {'required': True}, - 'limit': {'required': True}, - 'name': {'required': True}, - } - - _attribute_map = { - 'unit': {'key': 'unit', 'type': 'str'}, - 'current_value': {'key': 'currentValue', 'type': 'int'}, - 'limit': {'key': 'limit', 'type': 'long'}, - 'name': {'key': 'name', 'type': 'UsageName'}, - } - - unit = "Count" - - def __init__(self, *, current_value: int, limit: int, name, **kwargs) -> None: - super(Usage, self).__init__(**kwargs) - self.current_value = current_value - self.limit = limit - self.name = name diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/vault_certificate.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/vault_certificate.py deleted file mode 100644 index 2dd179480e76..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/vault_certificate.py +++ /dev/null @@ -1,47 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VaultCertificate(Model): - """Describes a single certificate reference in a Key Vault, and where the - certificate should reside on the VM. - - :param certificate_url: This is the URL of a certificate that has been - uploaded to Key Vault as a secret. For adding a secret to the Key Vault, - see [Add a key or secret to the key - vault](https://docs.microsoft.com/azure/key-vault/key-vault-get-started/#add). - In this case, your certificate needs to be It is the Base64 encoding of - the following JSON Object which is encoded in UTF-8:

    {
    - "data":"",
    "dataType":"pfx",
    - "password":""
    } - :type certificate_url: str - :param certificate_store: For Windows VMs, specifies the certificate store - on the Virtual Machine to which the certificate should be added. The - specified certificate store is implicitly in the LocalMachine account. -

    For Linux VMs, the certificate file is placed under the - /var/lib/waagent directory, with the file name - <UppercaseThumbprint>.crt for the X509 certificate file and - <UppercaseThumbprint>.prv for private key. Both of these files are - .pem formatted. - :type certificate_store: str - """ - - _attribute_map = { - 'certificate_url': {'key': 'certificateUrl', 'type': 'str'}, - 'certificate_store': {'key': 'certificateStore', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(VaultCertificate, self).__init__(**kwargs) - self.certificate_url = kwargs.get('certificate_url', None) - self.certificate_store = kwargs.get('certificate_store', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/vault_certificate_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/vault_certificate_py3.py deleted file mode 100644 index 23ecc8101793..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/vault_certificate_py3.py +++ /dev/null @@ -1,47 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VaultCertificate(Model): - """Describes a single certificate reference in a Key Vault, and where the - certificate should reside on the VM. - - :param certificate_url: This is the URL of a certificate that has been - uploaded to Key Vault as a secret. For adding a secret to the Key Vault, - see [Add a key or secret to the key - vault](https://docs.microsoft.com/azure/key-vault/key-vault-get-started/#add). - In this case, your certificate needs to be It is the Base64 encoding of - the following JSON Object which is encoded in UTF-8:

    {
    - "data":"",
    "dataType":"pfx",
    - "password":""
    } - :type certificate_url: str - :param certificate_store: For Windows VMs, specifies the certificate store - on the Virtual Machine to which the certificate should be added. The - specified certificate store is implicitly in the LocalMachine account. -

    For Linux VMs, the certificate file is placed under the - /var/lib/waagent directory, with the file name - <UppercaseThumbprint>.crt for the X509 certificate file and - <UppercaseThumbprint>.prv for private key. Both of these files are - .pem formatted. - :type certificate_store: str - """ - - _attribute_map = { - 'certificate_url': {'key': 'certificateUrl', 'type': 'str'}, - 'certificate_store': {'key': 'certificateStore', 'type': 'str'}, - } - - def __init__(self, *, certificate_url: str=None, certificate_store: str=None, **kwargs) -> None: - super(VaultCertificate, self).__init__(**kwargs) - self.certificate_url = certificate_url - self.certificate_store = certificate_store diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/vault_secret_group.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/vault_secret_group.py deleted file mode 100644 index 404557b15d2a..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/vault_secret_group.py +++ /dev/null @@ -1,35 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VaultSecretGroup(Model): - """Describes a set of certificates which are all in the same Key Vault. - - :param source_vault: The relative URL of the Key Vault containing all of - the certificates in VaultCertificates. - :type source_vault: ~azure.mgmt.compute.v2015_06_15.models.SubResource - :param vault_certificates: The list of key vault references in SourceVault - which contain certificates. - :type vault_certificates: - list[~azure.mgmt.compute.v2015_06_15.models.VaultCertificate] - """ - - _attribute_map = { - 'source_vault': {'key': 'sourceVault', 'type': 'SubResource'}, - 'vault_certificates': {'key': 'vaultCertificates', 'type': '[VaultCertificate]'}, - } - - def __init__(self, **kwargs): - super(VaultSecretGroup, self).__init__(**kwargs) - self.source_vault = kwargs.get('source_vault', None) - self.vault_certificates = kwargs.get('vault_certificates', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/vault_secret_group_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/vault_secret_group_py3.py deleted file mode 100644 index f9b4e9def34d..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/vault_secret_group_py3.py +++ /dev/null @@ -1,35 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VaultSecretGroup(Model): - """Describes a set of certificates which are all in the same Key Vault. - - :param source_vault: The relative URL of the Key Vault containing all of - the certificates in VaultCertificates. - :type source_vault: ~azure.mgmt.compute.v2015_06_15.models.SubResource - :param vault_certificates: The list of key vault references in SourceVault - which contain certificates. - :type vault_certificates: - list[~azure.mgmt.compute.v2015_06_15.models.VaultCertificate] - """ - - _attribute_map = { - 'source_vault': {'key': 'sourceVault', 'type': 'SubResource'}, - 'vault_certificates': {'key': 'vaultCertificates', 'type': '[VaultCertificate]'}, - } - - def __init__(self, *, source_vault=None, vault_certificates=None, **kwargs) -> None: - super(VaultSecretGroup, self).__init__(**kwargs) - self.source_vault = source_vault - self.vault_certificates = vault_certificates diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/virtual_hard_disk.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/virtual_hard_disk.py deleted file mode 100644 index 5e3ad9dea7d4..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/virtual_hard_disk.py +++ /dev/null @@ -1,28 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualHardDisk(Model): - """Describes the uri of a disk. - - :param uri: Specifies the virtual hard disk's uri. - :type uri: str - """ - - _attribute_map = { - 'uri': {'key': 'uri', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(VirtualHardDisk, self).__init__(**kwargs) - self.uri = kwargs.get('uri', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/virtual_hard_disk_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/virtual_hard_disk_py3.py deleted file mode 100644 index 9c069b95f084..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/virtual_hard_disk_py3.py +++ /dev/null @@ -1,28 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualHardDisk(Model): - """Describes the uri of a disk. - - :param uri: Specifies the virtual hard disk's uri. - :type uri: str - """ - - _attribute_map = { - 'uri': {'key': 'uri', 'type': 'str'}, - } - - def __init__(self, *, uri: str=None, **kwargs) -> None: - super(VirtualHardDisk, self).__init__(**kwargs) - self.uri = uri diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/virtual_machine.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/virtual_machine.py deleted file mode 100644 index 97a10493fc9e..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/virtual_machine.py +++ /dev/null @@ -1,134 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource import Resource - - -class VirtualMachine(Resource): - """Describes a Virtual Machine. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource Id - :vartype id: str - :ivar name: Resource name - :vartype name: str - :ivar type: Resource type - :vartype type: str - :param location: Required. Resource location - :type location: str - :param tags: Resource tags - :type tags: dict[str, str] - :param plan: Specifies information about the marketplace image used to - create the virtual machine. This element is only used for marketplace - images. Before you can use a marketplace image from an API, you must - enable the image for programmatic use. In the Azure portal, find the - marketplace image that you want to use and then click **Want to deploy - programmatically, Get Started ->**. Enter any required information and - then click **Save**. - :type plan: ~azure.mgmt.compute.v2015_06_15.models.Plan - :param hardware_profile: Specifies the hardware settings for the virtual - machine. - :type hardware_profile: - ~azure.mgmt.compute.v2015_06_15.models.HardwareProfile - :param storage_profile: Specifies the storage settings for the virtual - machine disks. - :type storage_profile: - ~azure.mgmt.compute.v2015_06_15.models.StorageProfile - :param os_profile: Specifies the operating system settings for the virtual - machine. - :type os_profile: ~azure.mgmt.compute.v2015_06_15.models.OSProfile - :param network_profile: Specifies the network interfaces of the virtual - machine. - :type network_profile: - ~azure.mgmt.compute.v2015_06_15.models.NetworkProfile - :param diagnostics_profile: Specifies the boot diagnostic settings state. -

    Minimum api-version: 2015-06-15. - :type diagnostics_profile: - ~azure.mgmt.compute.v2015_06_15.models.DiagnosticsProfile - :param availability_set: Specifies information about the availability set - that the virtual machine should be assigned to. Virtual machines specified - in the same availability set are allocated to different nodes to maximize - availability. For more information about availability sets, see [Manage - the availability of virtual - machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-manage-availability?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). -

    For more information on Azure planned maintenance, see [Planned - maintenance for virtual machines in - Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-planned-maintenance?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json) -

    Currently, a VM can only be added to availability set at creation - time. An existing VM cannot be added to an availability set. - :type availability_set: ~azure.mgmt.compute.v2015_06_15.models.SubResource - :ivar provisioning_state: The provisioning state, which only appears in - the response. - :vartype provisioning_state: str - :ivar instance_view: The virtual machine instance view. - :vartype instance_view: - ~azure.mgmt.compute.v2015_06_15.models.VirtualMachineInstanceView - :param license_type: Specifies that the image or disk that is being used - was licensed on-premises. This element is only used for images that - contain the Windows Server operating system.

    Possible values are: -

    Windows_Client

    Windows_Server

    If this element - is included in a request for an update, the value must match the initial - value. This value cannot be updated.

    For more information, see - [Azure Hybrid Use Benefit for Windows - Server](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-hybrid-use-benefit-licensing?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json) -

    Minimum api-version: 2015-06-15 - :type license_type: str - :ivar resources: The virtual machine child extension resources. - :vartype resources: - list[~azure.mgmt.compute.v2015_06_15.models.VirtualMachineExtension] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - 'provisioning_state': {'readonly': True}, - 'instance_view': {'readonly': True}, - 'resources': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'plan': {'key': 'plan', 'type': 'Plan'}, - 'hardware_profile': {'key': 'properties.hardwareProfile', 'type': 'HardwareProfile'}, - 'storage_profile': {'key': 'properties.storageProfile', 'type': 'StorageProfile'}, - 'os_profile': {'key': 'properties.osProfile', 'type': 'OSProfile'}, - 'network_profile': {'key': 'properties.networkProfile', 'type': 'NetworkProfile'}, - 'diagnostics_profile': {'key': 'properties.diagnosticsProfile', 'type': 'DiagnosticsProfile'}, - 'availability_set': {'key': 'properties.availabilitySet', 'type': 'SubResource'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'instance_view': {'key': 'properties.instanceView', 'type': 'VirtualMachineInstanceView'}, - 'license_type': {'key': 'properties.licenseType', 'type': 'str'}, - 'resources': {'key': 'resources', 'type': '[VirtualMachineExtension]'}, - } - - def __init__(self, **kwargs): - super(VirtualMachine, self).__init__(**kwargs) - self.plan = kwargs.get('plan', None) - self.hardware_profile = kwargs.get('hardware_profile', None) - self.storage_profile = kwargs.get('storage_profile', None) - self.os_profile = kwargs.get('os_profile', None) - self.network_profile = kwargs.get('network_profile', None) - self.diagnostics_profile = kwargs.get('diagnostics_profile', None) - self.availability_set = kwargs.get('availability_set', None) - self.provisioning_state = None - self.instance_view = None - self.license_type = kwargs.get('license_type', None) - self.resources = None diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/virtual_machine_agent_instance_view.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/virtual_machine_agent_instance_view.py deleted file mode 100644 index 2354a65bf52b..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/virtual_machine_agent_instance_view.py +++ /dev/null @@ -1,39 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineAgentInstanceView(Model): - """The instance view of the VM Agent running on the virtual machine. - - :param vm_agent_version: The VM Agent full version. - :type vm_agent_version: str - :param extension_handlers: The virtual machine extension handler instance - view. - :type extension_handlers: - list[~azure.mgmt.compute.v2015_06_15.models.VirtualMachineExtensionHandlerInstanceView] - :param statuses: The resource status information. - :type statuses: - list[~azure.mgmt.compute.v2015_06_15.models.InstanceViewStatus] - """ - - _attribute_map = { - 'vm_agent_version': {'key': 'vmAgentVersion', 'type': 'str'}, - 'extension_handlers': {'key': 'extensionHandlers', 'type': '[VirtualMachineExtensionHandlerInstanceView]'}, - 'statuses': {'key': 'statuses', 'type': '[InstanceViewStatus]'}, - } - - def __init__(self, **kwargs): - super(VirtualMachineAgentInstanceView, self).__init__(**kwargs) - self.vm_agent_version = kwargs.get('vm_agent_version', None) - self.extension_handlers = kwargs.get('extension_handlers', None) - self.statuses = kwargs.get('statuses', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/virtual_machine_agent_instance_view_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/virtual_machine_agent_instance_view_py3.py deleted file mode 100644 index 26483dd9ebbb..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/virtual_machine_agent_instance_view_py3.py +++ /dev/null @@ -1,39 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineAgentInstanceView(Model): - """The instance view of the VM Agent running on the virtual machine. - - :param vm_agent_version: The VM Agent full version. - :type vm_agent_version: str - :param extension_handlers: The virtual machine extension handler instance - view. - :type extension_handlers: - list[~azure.mgmt.compute.v2015_06_15.models.VirtualMachineExtensionHandlerInstanceView] - :param statuses: The resource status information. - :type statuses: - list[~azure.mgmt.compute.v2015_06_15.models.InstanceViewStatus] - """ - - _attribute_map = { - 'vm_agent_version': {'key': 'vmAgentVersion', 'type': 'str'}, - 'extension_handlers': {'key': 'extensionHandlers', 'type': '[VirtualMachineExtensionHandlerInstanceView]'}, - 'statuses': {'key': 'statuses', 'type': '[InstanceViewStatus]'}, - } - - def __init__(self, *, vm_agent_version: str=None, extension_handlers=None, statuses=None, **kwargs) -> None: - super(VirtualMachineAgentInstanceView, self).__init__(**kwargs) - self.vm_agent_version = vm_agent_version - self.extension_handlers = extension_handlers - self.statuses = statuses diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/virtual_machine_capture_parameters.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/virtual_machine_capture_parameters.py deleted file mode 100644 index 4e6ffbea7a4f..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/virtual_machine_capture_parameters.py +++ /dev/null @@ -1,46 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineCaptureParameters(Model): - """Capture Virtual Machine parameters. - - All required parameters must be populated in order to send to Azure. - - :param vhd_prefix: Required. The captured virtual hard disk's name prefix. - :type vhd_prefix: str - :param destination_container_name: Required. The destination container - name. - :type destination_container_name: str - :param overwrite_vhds: Required. Specifies whether to overwrite the - destination virtual hard disk, in case of conflict. - :type overwrite_vhds: bool - """ - - _validation = { - 'vhd_prefix': {'required': True}, - 'destination_container_name': {'required': True}, - 'overwrite_vhds': {'required': True}, - } - - _attribute_map = { - 'vhd_prefix': {'key': 'vhdPrefix', 'type': 'str'}, - 'destination_container_name': {'key': 'destinationContainerName', 'type': 'str'}, - 'overwrite_vhds': {'key': 'overwriteVhds', 'type': 'bool'}, - } - - def __init__(self, **kwargs): - super(VirtualMachineCaptureParameters, self).__init__(**kwargs) - self.vhd_prefix = kwargs.get('vhd_prefix', None) - self.destination_container_name = kwargs.get('destination_container_name', None) - self.overwrite_vhds = kwargs.get('overwrite_vhds', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/virtual_machine_capture_parameters_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/virtual_machine_capture_parameters_py3.py deleted file mode 100644 index 1866cdc23300..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/virtual_machine_capture_parameters_py3.py +++ /dev/null @@ -1,46 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineCaptureParameters(Model): - """Capture Virtual Machine parameters. - - All required parameters must be populated in order to send to Azure. - - :param vhd_prefix: Required. The captured virtual hard disk's name prefix. - :type vhd_prefix: str - :param destination_container_name: Required. The destination container - name. - :type destination_container_name: str - :param overwrite_vhds: Required. Specifies whether to overwrite the - destination virtual hard disk, in case of conflict. - :type overwrite_vhds: bool - """ - - _validation = { - 'vhd_prefix': {'required': True}, - 'destination_container_name': {'required': True}, - 'overwrite_vhds': {'required': True}, - } - - _attribute_map = { - 'vhd_prefix': {'key': 'vhdPrefix', 'type': 'str'}, - 'destination_container_name': {'key': 'destinationContainerName', 'type': 'str'}, - 'overwrite_vhds': {'key': 'overwriteVhds', 'type': 'bool'}, - } - - def __init__(self, *, vhd_prefix: str, destination_container_name: str, overwrite_vhds: bool, **kwargs) -> None: - super(VirtualMachineCaptureParameters, self).__init__(**kwargs) - self.vhd_prefix = vhd_prefix - self.destination_container_name = destination_container_name - self.overwrite_vhds = overwrite_vhds diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/virtual_machine_capture_result.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/virtual_machine_capture_result.py deleted file mode 100644 index 2b0df7406a34..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/virtual_machine_capture_result.py +++ /dev/null @@ -1,31 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .sub_resource import SubResource - - -class VirtualMachineCaptureResult(SubResource): - """Resource Id. - - :param id: Resource Id - :type id: str - :param output: Operation output data (raw JSON) - :type output: object - """ - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'output': {'key': 'properties.output', 'type': 'object'}, - } - - def __init__(self, **kwargs): - super(VirtualMachineCaptureResult, self).__init__(**kwargs) - self.output = kwargs.get('output', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/virtual_machine_capture_result_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/virtual_machine_capture_result_py3.py deleted file mode 100644 index f2aba4286bb0..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/virtual_machine_capture_result_py3.py +++ /dev/null @@ -1,31 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .sub_resource_py3 import SubResource - - -class VirtualMachineCaptureResult(SubResource): - """Resource Id. - - :param id: Resource Id - :type id: str - :param output: Operation output data (raw JSON) - :type output: object - """ - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'output': {'key': 'properties.output', 'type': 'object'}, - } - - def __init__(self, *, id: str=None, output=None, **kwargs) -> None: - super(VirtualMachineCaptureResult, self).__init__(id=id, **kwargs) - self.output = output diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/virtual_machine_extension.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/virtual_machine_extension.py deleted file mode 100644 index f8518c889105..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/virtual_machine_extension.py +++ /dev/null @@ -1,97 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource import Resource - - -class VirtualMachineExtension(Resource): - """Describes a Virtual Machine Extension. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource Id - :vartype id: str - :ivar name: Resource name - :vartype name: str - :ivar type: Resource type - :vartype type: str - :param location: Required. Resource location - :type location: str - :param tags: Resource tags - :type tags: dict[str, str] - :param force_update_tag: How the extension handler should be forced to - update even if the extension configuration has not changed. - :type force_update_tag: str - :param publisher: The name of the extension handler publisher. - :type publisher: str - :param virtual_machine_extension_type: Specifies the type of the - extension; an example is "CustomScriptExtension". - :type virtual_machine_extension_type: str - :param type_handler_version: Specifies the version of the script handler. - :type type_handler_version: str - :param auto_upgrade_minor_version: Indicates whether the extension should - use a newer minor version if one is available at deployment time. Once - deployed, however, the extension will not upgrade minor versions unless - redeployed, even with this property set to true. - :type auto_upgrade_minor_version: bool - :param settings: Json formatted public settings for the extension. - :type settings: object - :param protected_settings: The extension can contain either - protectedSettings or protectedSettingsFromKeyVault or no protected - settings at all. - :type protected_settings: object - :ivar provisioning_state: The provisioning state, which only appears in - the response. - :vartype provisioning_state: str - :param instance_view: The virtual machine extension instance view. - :type instance_view: - ~azure.mgmt.compute.v2015_06_15.models.VirtualMachineExtensionInstanceView - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - 'provisioning_state': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'force_update_tag': {'key': 'properties.forceUpdateTag', 'type': 'str'}, - 'publisher': {'key': 'properties.publisher', 'type': 'str'}, - 'virtual_machine_extension_type': {'key': 'properties.type', 'type': 'str'}, - 'type_handler_version': {'key': 'properties.typeHandlerVersion', 'type': 'str'}, - 'auto_upgrade_minor_version': {'key': 'properties.autoUpgradeMinorVersion', 'type': 'bool'}, - 'settings': {'key': 'properties.settings', 'type': 'object'}, - 'protected_settings': {'key': 'properties.protectedSettings', 'type': 'object'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'instance_view': {'key': 'properties.instanceView', 'type': 'VirtualMachineExtensionInstanceView'}, - } - - def __init__(self, **kwargs): - super(VirtualMachineExtension, self).__init__(**kwargs) - self.force_update_tag = kwargs.get('force_update_tag', None) - self.publisher = kwargs.get('publisher', None) - self.virtual_machine_extension_type = kwargs.get('virtual_machine_extension_type', None) - self.type_handler_version = kwargs.get('type_handler_version', None) - self.auto_upgrade_minor_version = kwargs.get('auto_upgrade_minor_version', None) - self.settings = kwargs.get('settings', None) - self.protected_settings = kwargs.get('protected_settings', None) - self.provisioning_state = None - self.instance_view = kwargs.get('instance_view', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/virtual_machine_extension_handler_instance_view.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/virtual_machine_extension_handler_instance_view.py deleted file mode 100644 index 68fc656cac2f..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/virtual_machine_extension_handler_instance_view.py +++ /dev/null @@ -1,37 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineExtensionHandlerInstanceView(Model): - """The instance view of a virtual machine extension handler. - - :param type: Specifies the type of the extension; an example is - "CustomScriptExtension". - :type type: str - :param type_handler_version: Specifies the version of the script handler. - :type type_handler_version: str - :param status: The extension handler status. - :type status: ~azure.mgmt.compute.v2015_06_15.models.InstanceViewStatus - """ - - _attribute_map = { - 'type': {'key': 'type', 'type': 'str'}, - 'type_handler_version': {'key': 'typeHandlerVersion', 'type': 'str'}, - 'status': {'key': 'status', 'type': 'InstanceViewStatus'}, - } - - def __init__(self, **kwargs): - super(VirtualMachineExtensionHandlerInstanceView, self).__init__(**kwargs) - self.type = kwargs.get('type', None) - self.type_handler_version = kwargs.get('type_handler_version', None) - self.status = kwargs.get('status', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/virtual_machine_extension_handler_instance_view_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/virtual_machine_extension_handler_instance_view_py3.py deleted file mode 100644 index 2b6383f78fcc..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/virtual_machine_extension_handler_instance_view_py3.py +++ /dev/null @@ -1,37 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineExtensionHandlerInstanceView(Model): - """The instance view of a virtual machine extension handler. - - :param type: Specifies the type of the extension; an example is - "CustomScriptExtension". - :type type: str - :param type_handler_version: Specifies the version of the script handler. - :type type_handler_version: str - :param status: The extension handler status. - :type status: ~azure.mgmt.compute.v2015_06_15.models.InstanceViewStatus - """ - - _attribute_map = { - 'type': {'key': 'type', 'type': 'str'}, - 'type_handler_version': {'key': 'typeHandlerVersion', 'type': 'str'}, - 'status': {'key': 'status', 'type': 'InstanceViewStatus'}, - } - - def __init__(self, *, type: str=None, type_handler_version: str=None, status=None, **kwargs) -> None: - super(VirtualMachineExtensionHandlerInstanceView, self).__init__(**kwargs) - self.type = type - self.type_handler_version = type_handler_version - self.status = status diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/virtual_machine_extension_image.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/virtual_machine_extension_image.py deleted file mode 100644 index 7273e2b84754..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/virtual_machine_extension_image.py +++ /dev/null @@ -1,81 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource import Resource - - -class VirtualMachineExtensionImage(Resource): - """Describes a Virtual Machine Extension Image. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource Id - :vartype id: str - :ivar name: Resource name - :vartype name: str - :ivar type: Resource type - :vartype type: str - :param location: Required. Resource location - :type location: str - :param tags: Resource tags - :type tags: dict[str, str] - :param operating_system: Required. The operating system this extension - supports. - :type operating_system: str - :param compute_role: Required. The type of role (IaaS or PaaS) this - extension supports. - :type compute_role: str - :param handler_schema: Required. The schema defined by publisher, where - extension consumers should provide settings in a matching schema. - :type handler_schema: str - :param vm_scale_set_enabled: Whether the extension can be used on xRP - VMScaleSets. By default existing extensions are usable on scalesets, but - there might be cases where a publisher wants to explicitly indicate the - extension is only enabled for CRP VMs but not VMSS. - :type vm_scale_set_enabled: bool - :param supports_multiple_extensions: Whether the handler can support - multiple extensions. - :type supports_multiple_extensions: bool - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - 'operating_system': {'required': True}, - 'compute_role': {'required': True}, - 'handler_schema': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'operating_system': {'key': 'properties.operatingSystem', 'type': 'str'}, - 'compute_role': {'key': 'properties.computeRole', 'type': 'str'}, - 'handler_schema': {'key': 'properties.handlerSchema', 'type': 'str'}, - 'vm_scale_set_enabled': {'key': 'properties.vmScaleSetEnabled', 'type': 'bool'}, - 'supports_multiple_extensions': {'key': 'properties.supportsMultipleExtensions', 'type': 'bool'}, - } - - def __init__(self, **kwargs): - super(VirtualMachineExtensionImage, self).__init__(**kwargs) - self.operating_system = kwargs.get('operating_system', None) - self.compute_role = kwargs.get('compute_role', None) - self.handler_schema = kwargs.get('handler_schema', None) - self.vm_scale_set_enabled = kwargs.get('vm_scale_set_enabled', None) - self.supports_multiple_extensions = kwargs.get('supports_multiple_extensions', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/virtual_machine_extension_image_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/virtual_machine_extension_image_py3.py deleted file mode 100644 index 3d48c3a87fb0..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/virtual_machine_extension_image_py3.py +++ /dev/null @@ -1,81 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource_py3 import Resource - - -class VirtualMachineExtensionImage(Resource): - """Describes a Virtual Machine Extension Image. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource Id - :vartype id: str - :ivar name: Resource name - :vartype name: str - :ivar type: Resource type - :vartype type: str - :param location: Required. Resource location - :type location: str - :param tags: Resource tags - :type tags: dict[str, str] - :param operating_system: Required. The operating system this extension - supports. - :type operating_system: str - :param compute_role: Required. The type of role (IaaS or PaaS) this - extension supports. - :type compute_role: str - :param handler_schema: Required. The schema defined by publisher, where - extension consumers should provide settings in a matching schema. - :type handler_schema: str - :param vm_scale_set_enabled: Whether the extension can be used on xRP - VMScaleSets. By default existing extensions are usable on scalesets, but - there might be cases where a publisher wants to explicitly indicate the - extension is only enabled for CRP VMs but not VMSS. - :type vm_scale_set_enabled: bool - :param supports_multiple_extensions: Whether the handler can support - multiple extensions. - :type supports_multiple_extensions: bool - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - 'operating_system': {'required': True}, - 'compute_role': {'required': True}, - 'handler_schema': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'operating_system': {'key': 'properties.operatingSystem', 'type': 'str'}, - 'compute_role': {'key': 'properties.computeRole', 'type': 'str'}, - 'handler_schema': {'key': 'properties.handlerSchema', 'type': 'str'}, - 'vm_scale_set_enabled': {'key': 'properties.vmScaleSetEnabled', 'type': 'bool'}, - 'supports_multiple_extensions': {'key': 'properties.supportsMultipleExtensions', 'type': 'bool'}, - } - - def __init__(self, *, location: str, operating_system: str, compute_role: str, handler_schema: str, tags=None, vm_scale_set_enabled: bool=None, supports_multiple_extensions: bool=None, **kwargs) -> None: - super(VirtualMachineExtensionImage, self).__init__(location=location, tags=tags, **kwargs) - self.operating_system = operating_system - self.compute_role = compute_role - self.handler_schema = handler_schema - self.vm_scale_set_enabled = vm_scale_set_enabled - self.supports_multiple_extensions = supports_multiple_extensions diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/virtual_machine_extension_instance_view.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/virtual_machine_extension_instance_view.py deleted file mode 100644 index aa4725b23c88..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/virtual_machine_extension_instance_view.py +++ /dev/null @@ -1,47 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineExtensionInstanceView(Model): - """The instance view of a virtual machine extension. - - :param name: The virtual machine extension name. - :type name: str - :param type: Specifies the type of the extension; an example is - "CustomScriptExtension". - :type type: str - :param type_handler_version: Specifies the version of the script handler. - :type type_handler_version: str - :param substatuses: The resource status information. - :type substatuses: - list[~azure.mgmt.compute.v2015_06_15.models.InstanceViewStatus] - :param statuses: The resource status information. - :type statuses: - list[~azure.mgmt.compute.v2015_06_15.models.InstanceViewStatus] - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'type_handler_version': {'key': 'typeHandlerVersion', 'type': 'str'}, - 'substatuses': {'key': 'substatuses', 'type': '[InstanceViewStatus]'}, - 'statuses': {'key': 'statuses', 'type': '[InstanceViewStatus]'}, - } - - def __init__(self, **kwargs): - super(VirtualMachineExtensionInstanceView, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.type = kwargs.get('type', None) - self.type_handler_version = kwargs.get('type_handler_version', None) - self.substatuses = kwargs.get('substatuses', None) - self.statuses = kwargs.get('statuses', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/virtual_machine_extension_instance_view_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/virtual_machine_extension_instance_view_py3.py deleted file mode 100644 index 2b6ecac3802c..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/virtual_machine_extension_instance_view_py3.py +++ /dev/null @@ -1,47 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineExtensionInstanceView(Model): - """The instance view of a virtual machine extension. - - :param name: The virtual machine extension name. - :type name: str - :param type: Specifies the type of the extension; an example is - "CustomScriptExtension". - :type type: str - :param type_handler_version: Specifies the version of the script handler. - :type type_handler_version: str - :param substatuses: The resource status information. - :type substatuses: - list[~azure.mgmt.compute.v2015_06_15.models.InstanceViewStatus] - :param statuses: The resource status information. - :type statuses: - list[~azure.mgmt.compute.v2015_06_15.models.InstanceViewStatus] - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'type_handler_version': {'key': 'typeHandlerVersion', 'type': 'str'}, - 'substatuses': {'key': 'substatuses', 'type': '[InstanceViewStatus]'}, - 'statuses': {'key': 'statuses', 'type': '[InstanceViewStatus]'}, - } - - def __init__(self, *, name: str=None, type: str=None, type_handler_version: str=None, substatuses=None, statuses=None, **kwargs) -> None: - super(VirtualMachineExtensionInstanceView, self).__init__(**kwargs) - self.name = name - self.type = type - self.type_handler_version = type_handler_version - self.substatuses = substatuses - self.statuses = statuses diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/virtual_machine_extension_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/virtual_machine_extension_py3.py deleted file mode 100644 index 9aad21dc36fc..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/virtual_machine_extension_py3.py +++ /dev/null @@ -1,97 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource_py3 import Resource - - -class VirtualMachineExtension(Resource): - """Describes a Virtual Machine Extension. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource Id - :vartype id: str - :ivar name: Resource name - :vartype name: str - :ivar type: Resource type - :vartype type: str - :param location: Required. Resource location - :type location: str - :param tags: Resource tags - :type tags: dict[str, str] - :param force_update_tag: How the extension handler should be forced to - update even if the extension configuration has not changed. - :type force_update_tag: str - :param publisher: The name of the extension handler publisher. - :type publisher: str - :param virtual_machine_extension_type: Specifies the type of the - extension; an example is "CustomScriptExtension". - :type virtual_machine_extension_type: str - :param type_handler_version: Specifies the version of the script handler. - :type type_handler_version: str - :param auto_upgrade_minor_version: Indicates whether the extension should - use a newer minor version if one is available at deployment time. Once - deployed, however, the extension will not upgrade minor versions unless - redeployed, even with this property set to true. - :type auto_upgrade_minor_version: bool - :param settings: Json formatted public settings for the extension. - :type settings: object - :param protected_settings: The extension can contain either - protectedSettings or protectedSettingsFromKeyVault or no protected - settings at all. - :type protected_settings: object - :ivar provisioning_state: The provisioning state, which only appears in - the response. - :vartype provisioning_state: str - :param instance_view: The virtual machine extension instance view. - :type instance_view: - ~azure.mgmt.compute.v2015_06_15.models.VirtualMachineExtensionInstanceView - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - 'provisioning_state': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'force_update_tag': {'key': 'properties.forceUpdateTag', 'type': 'str'}, - 'publisher': {'key': 'properties.publisher', 'type': 'str'}, - 'virtual_machine_extension_type': {'key': 'properties.type', 'type': 'str'}, - 'type_handler_version': {'key': 'properties.typeHandlerVersion', 'type': 'str'}, - 'auto_upgrade_minor_version': {'key': 'properties.autoUpgradeMinorVersion', 'type': 'bool'}, - 'settings': {'key': 'properties.settings', 'type': 'object'}, - 'protected_settings': {'key': 'properties.protectedSettings', 'type': 'object'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'instance_view': {'key': 'properties.instanceView', 'type': 'VirtualMachineExtensionInstanceView'}, - } - - def __init__(self, *, location: str, tags=None, force_update_tag: str=None, publisher: str=None, virtual_machine_extension_type: str=None, type_handler_version: str=None, auto_upgrade_minor_version: bool=None, settings=None, protected_settings=None, instance_view=None, **kwargs) -> None: - super(VirtualMachineExtension, self).__init__(location=location, tags=tags, **kwargs) - self.force_update_tag = force_update_tag - self.publisher = publisher - self.virtual_machine_extension_type = virtual_machine_extension_type - self.type_handler_version = type_handler_version - self.auto_upgrade_minor_version = auto_upgrade_minor_version - self.settings = settings - self.protected_settings = protected_settings - self.provisioning_state = None - self.instance_view = instance_view diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/virtual_machine_extension_update.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/virtual_machine_extension_update.py deleted file mode 100644 index b920ff57ff96..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/virtual_machine_extension_update.py +++ /dev/null @@ -1,62 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .update_resource import UpdateResource - - -class VirtualMachineExtensionUpdate(UpdateResource): - """Describes a Virtual Machine Extension. - - :param tags: Resource tags - :type tags: dict[str, str] - :param force_update_tag: How the extension handler should be forced to - update even if the extension configuration has not changed. - :type force_update_tag: str - :param publisher: The name of the extension handler publisher. - :type publisher: str - :param type: Specifies the type of the extension; an example is - "CustomScriptExtension". - :type type: str - :param type_handler_version: Specifies the version of the script handler. - :type type_handler_version: str - :param auto_upgrade_minor_version: Indicates whether the extension should - use a newer minor version if one is available at deployment time. Once - deployed, however, the extension will not upgrade minor versions unless - redeployed, even with this property set to true. - :type auto_upgrade_minor_version: bool - :param settings: Json formatted public settings for the extension. - :type settings: object - :param protected_settings: The extension can contain either - protectedSettings or protectedSettingsFromKeyVault or no protected - settings at all. - :type protected_settings: object - """ - - _attribute_map = { - 'tags': {'key': 'tags', 'type': '{str}'}, - 'force_update_tag': {'key': 'properties.forceUpdateTag', 'type': 'str'}, - 'publisher': {'key': 'properties.publisher', 'type': 'str'}, - 'type': {'key': 'properties.type', 'type': 'str'}, - 'type_handler_version': {'key': 'properties.typeHandlerVersion', 'type': 'str'}, - 'auto_upgrade_minor_version': {'key': 'properties.autoUpgradeMinorVersion', 'type': 'bool'}, - 'settings': {'key': 'properties.settings', 'type': 'object'}, - 'protected_settings': {'key': 'properties.protectedSettings', 'type': 'object'}, - } - - def __init__(self, **kwargs): - super(VirtualMachineExtensionUpdate, self).__init__(**kwargs) - self.force_update_tag = kwargs.get('force_update_tag', None) - self.publisher = kwargs.get('publisher', None) - self.type = kwargs.get('type', None) - self.type_handler_version = kwargs.get('type_handler_version', None) - self.auto_upgrade_minor_version = kwargs.get('auto_upgrade_minor_version', None) - self.settings = kwargs.get('settings', None) - self.protected_settings = kwargs.get('protected_settings', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/virtual_machine_extension_update_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/virtual_machine_extension_update_py3.py deleted file mode 100644 index c32c18d32759..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/virtual_machine_extension_update_py3.py +++ /dev/null @@ -1,62 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .update_resource_py3 import UpdateResource - - -class VirtualMachineExtensionUpdate(UpdateResource): - """Describes a Virtual Machine Extension. - - :param tags: Resource tags - :type tags: dict[str, str] - :param force_update_tag: How the extension handler should be forced to - update even if the extension configuration has not changed. - :type force_update_tag: str - :param publisher: The name of the extension handler publisher. - :type publisher: str - :param type: Specifies the type of the extension; an example is - "CustomScriptExtension". - :type type: str - :param type_handler_version: Specifies the version of the script handler. - :type type_handler_version: str - :param auto_upgrade_minor_version: Indicates whether the extension should - use a newer minor version if one is available at deployment time. Once - deployed, however, the extension will not upgrade minor versions unless - redeployed, even with this property set to true. - :type auto_upgrade_minor_version: bool - :param settings: Json formatted public settings for the extension. - :type settings: object - :param protected_settings: The extension can contain either - protectedSettings or protectedSettingsFromKeyVault or no protected - settings at all. - :type protected_settings: object - """ - - _attribute_map = { - 'tags': {'key': 'tags', 'type': '{str}'}, - 'force_update_tag': {'key': 'properties.forceUpdateTag', 'type': 'str'}, - 'publisher': {'key': 'properties.publisher', 'type': 'str'}, - 'type': {'key': 'properties.type', 'type': 'str'}, - 'type_handler_version': {'key': 'properties.typeHandlerVersion', 'type': 'str'}, - 'auto_upgrade_minor_version': {'key': 'properties.autoUpgradeMinorVersion', 'type': 'bool'}, - 'settings': {'key': 'properties.settings', 'type': 'object'}, - 'protected_settings': {'key': 'properties.protectedSettings', 'type': 'object'}, - } - - def __init__(self, *, tags=None, force_update_tag: str=None, publisher: str=None, type: str=None, type_handler_version: str=None, auto_upgrade_minor_version: bool=None, settings=None, protected_settings=None, **kwargs) -> None: - super(VirtualMachineExtensionUpdate, self).__init__(tags=tags, **kwargs) - self.force_update_tag = force_update_tag - self.publisher = publisher - self.type = type - self.type_handler_version = type_handler_version - self.auto_upgrade_minor_version = auto_upgrade_minor_version - self.settings = settings - self.protected_settings = protected_settings diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/virtual_machine_image.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/virtual_machine_image.py deleted file mode 100644 index 5c1873173b95..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/virtual_machine_image.py +++ /dev/null @@ -1,59 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .virtual_machine_image_resource import VirtualMachineImageResource - - -class VirtualMachineImage(VirtualMachineImageResource): - """Describes a Virtual Machine Image. - - All required parameters must be populated in order to send to Azure. - - :param id: Resource Id - :type id: str - :param name: Required. The name of the resource. - :type name: str - :param location: Required. The supported Azure location of the resource. - :type location: str - :param tags: Specifies the tags that are assigned to the virtual machine. - For more information about using tags, see [Using tags to organize your - Azure - resources](https://docs.microsoft.com/azure/azure-resource-manager/resource-group-using-tags.md). - :type tags: dict[str, str] - :param plan: - :type plan: ~azure.mgmt.compute.v2015_06_15.models.PurchasePlan - :param os_disk_image: - :type os_disk_image: ~azure.mgmt.compute.v2015_06_15.models.OSDiskImage - :param data_disk_images: - :type data_disk_images: - list[~azure.mgmt.compute.v2015_06_15.models.DataDiskImage] - """ - - _validation = { - 'name': {'required': True}, - 'location': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'plan': {'key': 'properties.plan', 'type': 'PurchasePlan'}, - 'os_disk_image': {'key': 'properties.osDiskImage', 'type': 'OSDiskImage'}, - 'data_disk_images': {'key': 'properties.dataDiskImages', 'type': '[DataDiskImage]'}, - } - - def __init__(self, **kwargs): - super(VirtualMachineImage, self).__init__(**kwargs) - self.plan = kwargs.get('plan', None) - self.os_disk_image = kwargs.get('os_disk_image', None) - self.data_disk_images = kwargs.get('data_disk_images', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/virtual_machine_image_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/virtual_machine_image_py3.py deleted file mode 100644 index 61fa10d90a3c..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/virtual_machine_image_py3.py +++ /dev/null @@ -1,59 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .virtual_machine_image_resource_py3 import VirtualMachineImageResource - - -class VirtualMachineImage(VirtualMachineImageResource): - """Describes a Virtual Machine Image. - - All required parameters must be populated in order to send to Azure. - - :param id: Resource Id - :type id: str - :param name: Required. The name of the resource. - :type name: str - :param location: Required. The supported Azure location of the resource. - :type location: str - :param tags: Specifies the tags that are assigned to the virtual machine. - For more information about using tags, see [Using tags to organize your - Azure - resources](https://docs.microsoft.com/azure/azure-resource-manager/resource-group-using-tags.md). - :type tags: dict[str, str] - :param plan: - :type plan: ~azure.mgmt.compute.v2015_06_15.models.PurchasePlan - :param os_disk_image: - :type os_disk_image: ~azure.mgmt.compute.v2015_06_15.models.OSDiskImage - :param data_disk_images: - :type data_disk_images: - list[~azure.mgmt.compute.v2015_06_15.models.DataDiskImage] - """ - - _validation = { - 'name': {'required': True}, - 'location': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'plan': {'key': 'properties.plan', 'type': 'PurchasePlan'}, - 'os_disk_image': {'key': 'properties.osDiskImage', 'type': 'OSDiskImage'}, - 'data_disk_images': {'key': 'properties.dataDiskImages', 'type': '[DataDiskImage]'}, - } - - def __init__(self, *, name: str, location: str, id: str=None, tags=None, plan=None, os_disk_image=None, data_disk_images=None, **kwargs) -> None: - super(VirtualMachineImage, self).__init__(id=id, name=name, location=location, tags=tags, **kwargs) - self.plan = plan - self.os_disk_image = os_disk_image - self.data_disk_images = data_disk_images diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/virtual_machine_image_resource.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/virtual_machine_image_resource.py deleted file mode 100644 index 8807cc8f391b..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/virtual_machine_image_resource.py +++ /dev/null @@ -1,49 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .sub_resource import SubResource - - -class VirtualMachineImageResource(SubResource): - """Virtual machine image resource information. - - All required parameters must be populated in order to send to Azure. - - :param id: Resource Id - :type id: str - :param name: Required. The name of the resource. - :type name: str - :param location: Required. The supported Azure location of the resource. - :type location: str - :param tags: Specifies the tags that are assigned to the virtual machine. - For more information about using tags, see [Using tags to organize your - Azure - resources](https://docs.microsoft.com/azure/azure-resource-manager/resource-group-using-tags.md). - :type tags: dict[str, str] - """ - - _validation = { - 'name': {'required': True}, - 'location': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - } - - def __init__(self, **kwargs): - super(VirtualMachineImageResource, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.location = kwargs.get('location', None) - self.tags = kwargs.get('tags', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/virtual_machine_image_resource_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/virtual_machine_image_resource_py3.py deleted file mode 100644 index b9d63a8bc9e0..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/virtual_machine_image_resource_py3.py +++ /dev/null @@ -1,49 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .sub_resource_py3 import SubResource - - -class VirtualMachineImageResource(SubResource): - """Virtual machine image resource information. - - All required parameters must be populated in order to send to Azure. - - :param id: Resource Id - :type id: str - :param name: Required. The name of the resource. - :type name: str - :param location: Required. The supported Azure location of the resource. - :type location: str - :param tags: Specifies the tags that are assigned to the virtual machine. - For more information about using tags, see [Using tags to organize your - Azure - resources](https://docs.microsoft.com/azure/azure-resource-manager/resource-group-using-tags.md). - :type tags: dict[str, str] - """ - - _validation = { - 'name': {'required': True}, - 'location': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - } - - def __init__(self, *, name: str, location: str, id: str=None, tags=None, **kwargs) -> None: - super(VirtualMachineImageResource, self).__init__(id=id, **kwargs) - self.name = name - self.location = location - self.tags = tags diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/virtual_machine_instance_view.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/virtual_machine_instance_view.py deleted file mode 100644 index aea1d35f16ed..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/virtual_machine_instance_view.py +++ /dev/null @@ -1,65 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineInstanceView(Model): - """The instance view of a virtual machine. - - :param platform_update_domain: Specifies the update domain of the virtual - machine. - :type platform_update_domain: int - :param platform_fault_domain: Specifies the fault domain of the virtual - machine. - :type platform_fault_domain: int - :param rdp_thumb_print: The Remote desktop certificate thumbprint. - :type rdp_thumb_print: str - :param vm_agent: The VM Agent running on the virtual machine. - :type vm_agent: - ~azure.mgmt.compute.v2015_06_15.models.VirtualMachineAgentInstanceView - :param disks: The virtual machine disk information. - :type disks: list[~azure.mgmt.compute.v2015_06_15.models.DiskInstanceView] - :param extensions: The extensions information. - :type extensions: - list[~azure.mgmt.compute.v2015_06_15.models.VirtualMachineExtensionInstanceView] - :param boot_diagnostics: Boot Diagnostics is a debugging feature which - allows you to view Console Output and Screenshot to diagnose VM status. -

    You can easily view the output of your console log.

    - Azure also enables you to see a screenshot of the VM from the hypervisor. - :type boot_diagnostics: - ~azure.mgmt.compute.v2015_06_15.models.BootDiagnosticsInstanceView - :param statuses: The resource status information. - :type statuses: - list[~azure.mgmt.compute.v2015_06_15.models.InstanceViewStatus] - """ - - _attribute_map = { - 'platform_update_domain': {'key': 'platformUpdateDomain', 'type': 'int'}, - 'platform_fault_domain': {'key': 'platformFaultDomain', 'type': 'int'}, - 'rdp_thumb_print': {'key': 'rdpThumbPrint', 'type': 'str'}, - 'vm_agent': {'key': 'vmAgent', 'type': 'VirtualMachineAgentInstanceView'}, - 'disks': {'key': 'disks', 'type': '[DiskInstanceView]'}, - 'extensions': {'key': 'extensions', 'type': '[VirtualMachineExtensionInstanceView]'}, - 'boot_diagnostics': {'key': 'bootDiagnostics', 'type': 'BootDiagnosticsInstanceView'}, - 'statuses': {'key': 'statuses', 'type': '[InstanceViewStatus]'}, - } - - def __init__(self, **kwargs): - super(VirtualMachineInstanceView, self).__init__(**kwargs) - self.platform_update_domain = kwargs.get('platform_update_domain', None) - self.platform_fault_domain = kwargs.get('platform_fault_domain', None) - self.rdp_thumb_print = kwargs.get('rdp_thumb_print', None) - self.vm_agent = kwargs.get('vm_agent', None) - self.disks = kwargs.get('disks', None) - self.extensions = kwargs.get('extensions', None) - self.boot_diagnostics = kwargs.get('boot_diagnostics', None) - self.statuses = kwargs.get('statuses', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/virtual_machine_instance_view_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/virtual_machine_instance_view_py3.py deleted file mode 100644 index 20ca416f12f2..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/virtual_machine_instance_view_py3.py +++ /dev/null @@ -1,65 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineInstanceView(Model): - """The instance view of a virtual machine. - - :param platform_update_domain: Specifies the update domain of the virtual - machine. - :type platform_update_domain: int - :param platform_fault_domain: Specifies the fault domain of the virtual - machine. - :type platform_fault_domain: int - :param rdp_thumb_print: The Remote desktop certificate thumbprint. - :type rdp_thumb_print: str - :param vm_agent: The VM Agent running on the virtual machine. - :type vm_agent: - ~azure.mgmt.compute.v2015_06_15.models.VirtualMachineAgentInstanceView - :param disks: The virtual machine disk information. - :type disks: list[~azure.mgmt.compute.v2015_06_15.models.DiskInstanceView] - :param extensions: The extensions information. - :type extensions: - list[~azure.mgmt.compute.v2015_06_15.models.VirtualMachineExtensionInstanceView] - :param boot_diagnostics: Boot Diagnostics is a debugging feature which - allows you to view Console Output and Screenshot to diagnose VM status. -

    You can easily view the output of your console log.

    - Azure also enables you to see a screenshot of the VM from the hypervisor. - :type boot_diagnostics: - ~azure.mgmt.compute.v2015_06_15.models.BootDiagnosticsInstanceView - :param statuses: The resource status information. - :type statuses: - list[~azure.mgmt.compute.v2015_06_15.models.InstanceViewStatus] - """ - - _attribute_map = { - 'platform_update_domain': {'key': 'platformUpdateDomain', 'type': 'int'}, - 'platform_fault_domain': {'key': 'platformFaultDomain', 'type': 'int'}, - 'rdp_thumb_print': {'key': 'rdpThumbPrint', 'type': 'str'}, - 'vm_agent': {'key': 'vmAgent', 'type': 'VirtualMachineAgentInstanceView'}, - 'disks': {'key': 'disks', 'type': '[DiskInstanceView]'}, - 'extensions': {'key': 'extensions', 'type': '[VirtualMachineExtensionInstanceView]'}, - 'boot_diagnostics': {'key': 'bootDiagnostics', 'type': 'BootDiagnosticsInstanceView'}, - 'statuses': {'key': 'statuses', 'type': '[InstanceViewStatus]'}, - } - - def __init__(self, *, platform_update_domain: int=None, platform_fault_domain: int=None, rdp_thumb_print: str=None, vm_agent=None, disks=None, extensions=None, boot_diagnostics=None, statuses=None, **kwargs) -> None: - super(VirtualMachineInstanceView, self).__init__(**kwargs) - self.platform_update_domain = platform_update_domain - self.platform_fault_domain = platform_fault_domain - self.rdp_thumb_print = rdp_thumb_print - self.vm_agent = vm_agent - self.disks = disks - self.extensions = extensions - self.boot_diagnostics = boot_diagnostics - self.statuses = statuses diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/virtual_machine_paged.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/virtual_machine_paged.py deleted file mode 100644 index 8d60a5149d1d..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/virtual_machine_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class VirtualMachinePaged(Paged): - """ - A paging container for iterating over a list of :class:`VirtualMachine ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[VirtualMachine]'} - } - - def __init__(self, *args, **kwargs): - - super(VirtualMachinePaged, self).__init__(*args, **kwargs) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/virtual_machine_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/virtual_machine_py3.py deleted file mode 100644 index 9c4435f88197..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/virtual_machine_py3.py +++ /dev/null @@ -1,134 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource_py3 import Resource - - -class VirtualMachine(Resource): - """Describes a Virtual Machine. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource Id - :vartype id: str - :ivar name: Resource name - :vartype name: str - :ivar type: Resource type - :vartype type: str - :param location: Required. Resource location - :type location: str - :param tags: Resource tags - :type tags: dict[str, str] - :param plan: Specifies information about the marketplace image used to - create the virtual machine. This element is only used for marketplace - images. Before you can use a marketplace image from an API, you must - enable the image for programmatic use. In the Azure portal, find the - marketplace image that you want to use and then click **Want to deploy - programmatically, Get Started ->**. Enter any required information and - then click **Save**. - :type plan: ~azure.mgmt.compute.v2015_06_15.models.Plan - :param hardware_profile: Specifies the hardware settings for the virtual - machine. - :type hardware_profile: - ~azure.mgmt.compute.v2015_06_15.models.HardwareProfile - :param storage_profile: Specifies the storage settings for the virtual - machine disks. - :type storage_profile: - ~azure.mgmt.compute.v2015_06_15.models.StorageProfile - :param os_profile: Specifies the operating system settings for the virtual - machine. - :type os_profile: ~azure.mgmt.compute.v2015_06_15.models.OSProfile - :param network_profile: Specifies the network interfaces of the virtual - machine. - :type network_profile: - ~azure.mgmt.compute.v2015_06_15.models.NetworkProfile - :param diagnostics_profile: Specifies the boot diagnostic settings state. -

    Minimum api-version: 2015-06-15. - :type diagnostics_profile: - ~azure.mgmt.compute.v2015_06_15.models.DiagnosticsProfile - :param availability_set: Specifies information about the availability set - that the virtual machine should be assigned to. Virtual machines specified - in the same availability set are allocated to different nodes to maximize - availability. For more information about availability sets, see [Manage - the availability of virtual - machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-manage-availability?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). -

    For more information on Azure planned maintenance, see [Planned - maintenance for virtual machines in - Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-planned-maintenance?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json) -

    Currently, a VM can only be added to availability set at creation - time. An existing VM cannot be added to an availability set. - :type availability_set: ~azure.mgmt.compute.v2015_06_15.models.SubResource - :ivar provisioning_state: The provisioning state, which only appears in - the response. - :vartype provisioning_state: str - :ivar instance_view: The virtual machine instance view. - :vartype instance_view: - ~azure.mgmt.compute.v2015_06_15.models.VirtualMachineInstanceView - :param license_type: Specifies that the image or disk that is being used - was licensed on-premises. This element is only used for images that - contain the Windows Server operating system.

    Possible values are: -

    Windows_Client

    Windows_Server

    If this element - is included in a request for an update, the value must match the initial - value. This value cannot be updated.

    For more information, see - [Azure Hybrid Use Benefit for Windows - Server](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-hybrid-use-benefit-licensing?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json) -

    Minimum api-version: 2015-06-15 - :type license_type: str - :ivar resources: The virtual machine child extension resources. - :vartype resources: - list[~azure.mgmt.compute.v2015_06_15.models.VirtualMachineExtension] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - 'provisioning_state': {'readonly': True}, - 'instance_view': {'readonly': True}, - 'resources': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'plan': {'key': 'plan', 'type': 'Plan'}, - 'hardware_profile': {'key': 'properties.hardwareProfile', 'type': 'HardwareProfile'}, - 'storage_profile': {'key': 'properties.storageProfile', 'type': 'StorageProfile'}, - 'os_profile': {'key': 'properties.osProfile', 'type': 'OSProfile'}, - 'network_profile': {'key': 'properties.networkProfile', 'type': 'NetworkProfile'}, - 'diagnostics_profile': {'key': 'properties.diagnosticsProfile', 'type': 'DiagnosticsProfile'}, - 'availability_set': {'key': 'properties.availabilitySet', 'type': 'SubResource'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'instance_view': {'key': 'properties.instanceView', 'type': 'VirtualMachineInstanceView'}, - 'license_type': {'key': 'properties.licenseType', 'type': 'str'}, - 'resources': {'key': 'resources', 'type': '[VirtualMachineExtension]'}, - } - - def __init__(self, *, location: str, tags=None, plan=None, hardware_profile=None, storage_profile=None, os_profile=None, network_profile=None, diagnostics_profile=None, availability_set=None, license_type: str=None, **kwargs) -> None: - super(VirtualMachine, self).__init__(location=location, tags=tags, **kwargs) - self.plan = plan - self.hardware_profile = hardware_profile - self.storage_profile = storage_profile - self.os_profile = os_profile - self.network_profile = network_profile - self.diagnostics_profile = diagnostics_profile - self.availability_set = availability_set - self.provisioning_state = None - self.instance_view = None - self.license_type = license_type - self.resources = None diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/virtual_machine_scale_set.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/virtual_machine_scale_set.py deleted file mode 100644 index 5f4d8d0f7ee4..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/virtual_machine_scale_set.py +++ /dev/null @@ -1,74 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource import Resource - - -class VirtualMachineScaleSet(Resource): - """Describes a Virtual Machine Scale Set. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource Id - :vartype id: str - :ivar name: Resource name - :vartype name: str - :ivar type: Resource type - :vartype type: str - :param location: Required. Resource location - :type location: str - :param tags: Resource tags - :type tags: dict[str, str] - :param sku: The virtual machine scale set sku. - :type sku: ~azure.mgmt.compute.v2015_06_15.models.Sku - :param upgrade_policy: The upgrade policy. - :type upgrade_policy: ~azure.mgmt.compute.v2015_06_15.models.UpgradePolicy - :param virtual_machine_profile: The virtual machine profile. - :type virtual_machine_profile: - ~azure.mgmt.compute.v2015_06_15.models.VirtualMachineScaleSetVMProfile - :param provisioning_state: The provisioning state, which only appears in - the response. - :type provisioning_state: str - :param over_provision: Specifies whether the Virtual Machine Scale Set - should be overprovisioned. - :type over_provision: bool - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'sku': {'key': 'sku', 'type': 'Sku'}, - 'upgrade_policy': {'key': 'properties.upgradePolicy', 'type': 'UpgradePolicy'}, - 'virtual_machine_profile': {'key': 'properties.virtualMachineProfile', 'type': 'VirtualMachineScaleSetVMProfile'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'over_provision': {'key': 'properties.overProvision', 'type': 'bool'}, - } - - def __init__(self, **kwargs): - super(VirtualMachineScaleSet, self).__init__(**kwargs) - self.sku = kwargs.get('sku', None) - self.upgrade_policy = kwargs.get('upgrade_policy', None) - self.virtual_machine_profile = kwargs.get('virtual_machine_profile', None) - self.provisioning_state = kwargs.get('provisioning_state', None) - self.over_provision = kwargs.get('over_provision', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/virtual_machine_scale_set_extension.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/virtual_machine_scale_set_extension.py deleted file mode 100644 index d6d8b5fbc51e..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/virtual_machine_scale_set_extension.py +++ /dev/null @@ -1,69 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .sub_resource import SubResource - - -class VirtualMachineScaleSetExtension(SubResource): - """Describes a Virtual Machine Scale Set Extension. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :param id: Resource Id - :type id: str - :param name: The name of the extension. - :type name: str - :param publisher: The name of the extension handler publisher. - :type publisher: str - :param type: The type of the extension handler. - :type type: str - :param type_handler_version: The type version of the extension handler. - :type type_handler_version: str - :param auto_upgrade_minor_version: Whether the extension handler should be - automatically upgraded across minor versions. - :type auto_upgrade_minor_version: bool - :param settings: Json formatted public settings for the extension. - :type settings: object - :param protected_settings: Json formatted protected settings for the - extension. - :type protected_settings: object - :ivar provisioning_state: The provisioning state, which only appears in - the response. - :vartype provisioning_state: str - """ - - _validation = { - 'provisioning_state': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'publisher': {'key': 'properties.publisher', 'type': 'str'}, - 'type': {'key': 'properties.type', 'type': 'str'}, - 'type_handler_version': {'key': 'properties.typeHandlerVersion', 'type': 'str'}, - 'auto_upgrade_minor_version': {'key': 'properties.autoUpgradeMinorVersion', 'type': 'bool'}, - 'settings': {'key': 'properties.settings', 'type': 'object'}, - 'protected_settings': {'key': 'properties.protectedSettings', 'type': 'object'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(VirtualMachineScaleSetExtension, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.publisher = kwargs.get('publisher', None) - self.type = kwargs.get('type', None) - self.type_handler_version = kwargs.get('type_handler_version', None) - self.auto_upgrade_minor_version = kwargs.get('auto_upgrade_minor_version', None) - self.settings = kwargs.get('settings', None) - self.protected_settings = kwargs.get('protected_settings', None) - self.provisioning_state = None diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/virtual_machine_scale_set_extension_profile.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/virtual_machine_scale_set_extension_profile.py deleted file mode 100644 index a231db28e10a..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/virtual_machine_scale_set_extension_profile.py +++ /dev/null @@ -1,30 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineScaleSetExtensionProfile(Model): - """Describes a virtual machine scale set extension profile. - - :param extensions: The virtual machine scale set child extension - resources. - :type extensions: - list[~azure.mgmt.compute.v2015_06_15.models.VirtualMachineScaleSetExtension] - """ - - _attribute_map = { - 'extensions': {'key': 'extensions', 'type': '[VirtualMachineScaleSetExtension]'}, - } - - def __init__(self, **kwargs): - super(VirtualMachineScaleSetExtensionProfile, self).__init__(**kwargs) - self.extensions = kwargs.get('extensions', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/virtual_machine_scale_set_extension_profile_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/virtual_machine_scale_set_extension_profile_py3.py deleted file mode 100644 index 514556c9d425..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/virtual_machine_scale_set_extension_profile_py3.py +++ /dev/null @@ -1,30 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineScaleSetExtensionProfile(Model): - """Describes a virtual machine scale set extension profile. - - :param extensions: The virtual machine scale set child extension - resources. - :type extensions: - list[~azure.mgmt.compute.v2015_06_15.models.VirtualMachineScaleSetExtension] - """ - - _attribute_map = { - 'extensions': {'key': 'extensions', 'type': '[VirtualMachineScaleSetExtension]'}, - } - - def __init__(self, *, extensions=None, **kwargs) -> None: - super(VirtualMachineScaleSetExtensionProfile, self).__init__(**kwargs) - self.extensions = extensions diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/virtual_machine_scale_set_extension_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/virtual_machine_scale_set_extension_py3.py deleted file mode 100644 index 5c0ffe9af348..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/virtual_machine_scale_set_extension_py3.py +++ /dev/null @@ -1,69 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .sub_resource_py3 import SubResource - - -class VirtualMachineScaleSetExtension(SubResource): - """Describes a Virtual Machine Scale Set Extension. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :param id: Resource Id - :type id: str - :param name: The name of the extension. - :type name: str - :param publisher: The name of the extension handler publisher. - :type publisher: str - :param type: The type of the extension handler. - :type type: str - :param type_handler_version: The type version of the extension handler. - :type type_handler_version: str - :param auto_upgrade_minor_version: Whether the extension handler should be - automatically upgraded across minor versions. - :type auto_upgrade_minor_version: bool - :param settings: Json formatted public settings for the extension. - :type settings: object - :param protected_settings: Json formatted protected settings for the - extension. - :type protected_settings: object - :ivar provisioning_state: The provisioning state, which only appears in - the response. - :vartype provisioning_state: str - """ - - _validation = { - 'provisioning_state': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'publisher': {'key': 'properties.publisher', 'type': 'str'}, - 'type': {'key': 'properties.type', 'type': 'str'}, - 'type_handler_version': {'key': 'properties.typeHandlerVersion', 'type': 'str'}, - 'auto_upgrade_minor_version': {'key': 'properties.autoUpgradeMinorVersion', 'type': 'bool'}, - 'settings': {'key': 'properties.settings', 'type': 'object'}, - 'protected_settings': {'key': 'properties.protectedSettings', 'type': 'object'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - } - - def __init__(self, *, id: str=None, name: str=None, publisher: str=None, type: str=None, type_handler_version: str=None, auto_upgrade_minor_version: bool=None, settings=None, protected_settings=None, **kwargs) -> None: - super(VirtualMachineScaleSetExtension, self).__init__(id=id, **kwargs) - self.name = name - self.publisher = publisher - self.type = type - self.type_handler_version = type_handler_version - self.auto_upgrade_minor_version = auto_upgrade_minor_version - self.settings = settings - self.protected_settings = protected_settings - self.provisioning_state = None diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/virtual_machine_scale_set_instance_view.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/virtual_machine_scale_set_instance_view.py deleted file mode 100644 index 6facbd710730..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/virtual_machine_scale_set_instance_view.py +++ /dev/null @@ -1,48 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineScaleSetInstanceView(Model): - """The instance view of a virtual machine scale set. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar virtual_machine: The instance view status summary for the virtual - machine scale set. - :vartype virtual_machine: - ~azure.mgmt.compute.v2015_06_15.models.VirtualMachineScaleSetInstanceViewStatusesSummary - :ivar extensions: The extensions information. - :vartype extensions: - list[~azure.mgmt.compute.v2015_06_15.models.VirtualMachineScaleSetVMExtensionsSummary] - :param statuses: The resource status information. - :type statuses: - list[~azure.mgmt.compute.v2015_06_15.models.InstanceViewStatus] - """ - - _validation = { - 'virtual_machine': {'readonly': True}, - 'extensions': {'readonly': True}, - } - - _attribute_map = { - 'virtual_machine': {'key': 'virtualMachine', 'type': 'VirtualMachineScaleSetInstanceViewStatusesSummary'}, - 'extensions': {'key': 'extensions', 'type': '[VirtualMachineScaleSetVMExtensionsSummary]'}, - 'statuses': {'key': 'statuses', 'type': '[InstanceViewStatus]'}, - } - - def __init__(self, **kwargs): - super(VirtualMachineScaleSetInstanceView, self).__init__(**kwargs) - self.virtual_machine = None - self.extensions = None - self.statuses = kwargs.get('statuses', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/virtual_machine_scale_set_instance_view_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/virtual_machine_scale_set_instance_view_py3.py deleted file mode 100644 index 61e39b4ea912..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/virtual_machine_scale_set_instance_view_py3.py +++ /dev/null @@ -1,48 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineScaleSetInstanceView(Model): - """The instance view of a virtual machine scale set. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar virtual_machine: The instance view status summary for the virtual - machine scale set. - :vartype virtual_machine: - ~azure.mgmt.compute.v2015_06_15.models.VirtualMachineScaleSetInstanceViewStatusesSummary - :ivar extensions: The extensions information. - :vartype extensions: - list[~azure.mgmt.compute.v2015_06_15.models.VirtualMachineScaleSetVMExtensionsSummary] - :param statuses: The resource status information. - :type statuses: - list[~azure.mgmt.compute.v2015_06_15.models.InstanceViewStatus] - """ - - _validation = { - 'virtual_machine': {'readonly': True}, - 'extensions': {'readonly': True}, - } - - _attribute_map = { - 'virtual_machine': {'key': 'virtualMachine', 'type': 'VirtualMachineScaleSetInstanceViewStatusesSummary'}, - 'extensions': {'key': 'extensions', 'type': '[VirtualMachineScaleSetVMExtensionsSummary]'}, - 'statuses': {'key': 'statuses', 'type': '[InstanceViewStatus]'}, - } - - def __init__(self, *, statuses=None, **kwargs) -> None: - super(VirtualMachineScaleSetInstanceView, self).__init__(**kwargs) - self.virtual_machine = None - self.extensions = None - self.statuses = statuses diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/virtual_machine_scale_set_instance_view_statuses_summary.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/virtual_machine_scale_set_instance_view_statuses_summary.py deleted file mode 100644 index 7654505381d7..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/virtual_machine_scale_set_instance_view_statuses_summary.py +++ /dev/null @@ -1,37 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineScaleSetInstanceViewStatusesSummary(Model): - """Instance view statuses summary for virtual machines of a virtual machine - scale set. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar statuses_summary: The extensions information. - :vartype statuses_summary: - list[~azure.mgmt.compute.v2015_06_15.models.VirtualMachineStatusCodeCount] - """ - - _validation = { - 'statuses_summary': {'readonly': True}, - } - - _attribute_map = { - 'statuses_summary': {'key': 'statusesSummary', 'type': '[VirtualMachineStatusCodeCount]'}, - } - - def __init__(self, **kwargs): - super(VirtualMachineScaleSetInstanceViewStatusesSummary, self).__init__(**kwargs) - self.statuses_summary = None diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/virtual_machine_scale_set_instance_view_statuses_summary_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/virtual_machine_scale_set_instance_view_statuses_summary_py3.py deleted file mode 100644 index aa1958c81a66..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/virtual_machine_scale_set_instance_view_statuses_summary_py3.py +++ /dev/null @@ -1,37 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineScaleSetInstanceViewStatusesSummary(Model): - """Instance view statuses summary for virtual machines of a virtual machine - scale set. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar statuses_summary: The extensions information. - :vartype statuses_summary: - list[~azure.mgmt.compute.v2015_06_15.models.VirtualMachineStatusCodeCount] - """ - - _validation = { - 'statuses_summary': {'readonly': True}, - } - - _attribute_map = { - 'statuses_summary': {'key': 'statusesSummary', 'type': '[VirtualMachineStatusCodeCount]'}, - } - - def __init__(self, **kwargs) -> None: - super(VirtualMachineScaleSetInstanceViewStatusesSummary, self).__init__(**kwargs) - self.statuses_summary = None diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/virtual_machine_scale_set_ip_configuration.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/virtual_machine_scale_set_ip_configuration.py deleted file mode 100644 index 0461dad30d7f..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/virtual_machine_scale_set_ip_configuration.py +++ /dev/null @@ -1,54 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .sub_resource import SubResource - - -class VirtualMachineScaleSetIPConfiguration(SubResource): - """Describes a virtual machine scale set network profile's IP configuration. - - All required parameters must be populated in order to send to Azure. - - :param id: Resource Id - :type id: str - :param name: Required. The IP configuration name. - :type name: str - :param subnet: Required. The subnet. - :type subnet: ~azure.mgmt.compute.v2015_06_15.models.ApiEntityReference - :param load_balancer_backend_address_pools: The load balancer backend - address pools. - :type load_balancer_backend_address_pools: - list[~azure.mgmt.compute.v2015_06_15.models.SubResource] - :param load_balancer_inbound_nat_pools: The load balancer inbound nat - pools. - :type load_balancer_inbound_nat_pools: - list[~azure.mgmt.compute.v2015_06_15.models.SubResource] - """ - - _validation = { - 'name': {'required': True}, - 'subnet': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'subnet': {'key': 'properties.subnet', 'type': 'ApiEntityReference'}, - 'load_balancer_backend_address_pools': {'key': 'properties.loadBalancerBackendAddressPools', 'type': '[SubResource]'}, - 'load_balancer_inbound_nat_pools': {'key': 'properties.loadBalancerInboundNatPools', 'type': '[SubResource]'}, - } - - def __init__(self, **kwargs): - super(VirtualMachineScaleSetIPConfiguration, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.subnet = kwargs.get('subnet', None) - self.load_balancer_backend_address_pools = kwargs.get('load_balancer_backend_address_pools', None) - self.load_balancer_inbound_nat_pools = kwargs.get('load_balancer_inbound_nat_pools', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/virtual_machine_scale_set_ip_configuration_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/virtual_machine_scale_set_ip_configuration_py3.py deleted file mode 100644 index 91e163b09412..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/virtual_machine_scale_set_ip_configuration_py3.py +++ /dev/null @@ -1,54 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .sub_resource_py3 import SubResource - - -class VirtualMachineScaleSetIPConfiguration(SubResource): - """Describes a virtual machine scale set network profile's IP configuration. - - All required parameters must be populated in order to send to Azure. - - :param id: Resource Id - :type id: str - :param name: Required. The IP configuration name. - :type name: str - :param subnet: Required. The subnet. - :type subnet: ~azure.mgmt.compute.v2015_06_15.models.ApiEntityReference - :param load_balancer_backend_address_pools: The load balancer backend - address pools. - :type load_balancer_backend_address_pools: - list[~azure.mgmt.compute.v2015_06_15.models.SubResource] - :param load_balancer_inbound_nat_pools: The load balancer inbound nat - pools. - :type load_balancer_inbound_nat_pools: - list[~azure.mgmt.compute.v2015_06_15.models.SubResource] - """ - - _validation = { - 'name': {'required': True}, - 'subnet': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'subnet': {'key': 'properties.subnet', 'type': 'ApiEntityReference'}, - 'load_balancer_backend_address_pools': {'key': 'properties.loadBalancerBackendAddressPools', 'type': '[SubResource]'}, - 'load_balancer_inbound_nat_pools': {'key': 'properties.loadBalancerInboundNatPools', 'type': '[SubResource]'}, - } - - def __init__(self, *, name: str, subnet, id: str=None, load_balancer_backend_address_pools=None, load_balancer_inbound_nat_pools=None, **kwargs) -> None: - super(VirtualMachineScaleSetIPConfiguration, self).__init__(id=id, **kwargs) - self.name = name - self.subnet = subnet - self.load_balancer_backend_address_pools = load_balancer_backend_address_pools - self.load_balancer_inbound_nat_pools = load_balancer_inbound_nat_pools diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/virtual_machine_scale_set_network_configuration.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/virtual_machine_scale_set_network_configuration.py deleted file mode 100644 index ee5c117f24b2..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/virtual_machine_scale_set_network_configuration.py +++ /dev/null @@ -1,49 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .sub_resource import SubResource - - -class VirtualMachineScaleSetNetworkConfiguration(SubResource): - """Describes a virtual machine scale set network profile's network - configurations. - - All required parameters must be populated in order to send to Azure. - - :param id: Resource Id - :type id: str - :param name: Required. The network configuration name. - :type name: str - :param primary: Whether this is a primary NIC on a virtual machine. - :type primary: bool - :param ip_configurations: Required. The virtual machine scale set IP - Configuration. - :type ip_configurations: - list[~azure.mgmt.compute.v2015_06_15.models.VirtualMachineScaleSetIPConfiguration] - """ - - _validation = { - 'name': {'required': True}, - 'ip_configurations': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'primary': {'key': 'properties.primary', 'type': 'bool'}, - 'ip_configurations': {'key': 'properties.ipConfigurations', 'type': '[VirtualMachineScaleSetIPConfiguration]'}, - } - - def __init__(self, **kwargs): - super(VirtualMachineScaleSetNetworkConfiguration, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.primary = kwargs.get('primary', None) - self.ip_configurations = kwargs.get('ip_configurations', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/virtual_machine_scale_set_network_configuration_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/virtual_machine_scale_set_network_configuration_py3.py deleted file mode 100644 index 939cb61499ab..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/virtual_machine_scale_set_network_configuration_py3.py +++ /dev/null @@ -1,49 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .sub_resource_py3 import SubResource - - -class VirtualMachineScaleSetNetworkConfiguration(SubResource): - """Describes a virtual machine scale set network profile's network - configurations. - - All required parameters must be populated in order to send to Azure. - - :param id: Resource Id - :type id: str - :param name: Required. The network configuration name. - :type name: str - :param primary: Whether this is a primary NIC on a virtual machine. - :type primary: bool - :param ip_configurations: Required. The virtual machine scale set IP - Configuration. - :type ip_configurations: - list[~azure.mgmt.compute.v2015_06_15.models.VirtualMachineScaleSetIPConfiguration] - """ - - _validation = { - 'name': {'required': True}, - 'ip_configurations': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'primary': {'key': 'properties.primary', 'type': 'bool'}, - 'ip_configurations': {'key': 'properties.ipConfigurations', 'type': '[VirtualMachineScaleSetIPConfiguration]'}, - } - - def __init__(self, *, name: str, ip_configurations, id: str=None, primary: bool=None, **kwargs) -> None: - super(VirtualMachineScaleSetNetworkConfiguration, self).__init__(id=id, **kwargs) - self.name = name - self.primary = primary - self.ip_configurations = ip_configurations diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/virtual_machine_scale_set_network_profile.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/virtual_machine_scale_set_network_profile.py deleted file mode 100644 index e710af393b0c..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/virtual_machine_scale_set_network_profile.py +++ /dev/null @@ -1,30 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineScaleSetNetworkProfile(Model): - """Describes a virtual machine scale set network profile. - - :param network_interface_configurations: The list of network - configurations. - :type network_interface_configurations: - list[~azure.mgmt.compute.v2015_06_15.models.VirtualMachineScaleSetNetworkConfiguration] - """ - - _attribute_map = { - 'network_interface_configurations': {'key': 'networkInterfaceConfigurations', 'type': '[VirtualMachineScaleSetNetworkConfiguration]'}, - } - - def __init__(self, **kwargs): - super(VirtualMachineScaleSetNetworkProfile, self).__init__(**kwargs) - self.network_interface_configurations = kwargs.get('network_interface_configurations', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/virtual_machine_scale_set_network_profile_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/virtual_machine_scale_set_network_profile_py3.py deleted file mode 100644 index b0b43ccb35d6..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/virtual_machine_scale_set_network_profile_py3.py +++ /dev/null @@ -1,30 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineScaleSetNetworkProfile(Model): - """Describes a virtual machine scale set network profile. - - :param network_interface_configurations: The list of network - configurations. - :type network_interface_configurations: - list[~azure.mgmt.compute.v2015_06_15.models.VirtualMachineScaleSetNetworkConfiguration] - """ - - _attribute_map = { - 'network_interface_configurations': {'key': 'networkInterfaceConfigurations', 'type': '[VirtualMachineScaleSetNetworkConfiguration]'}, - } - - def __init__(self, *, network_interface_configurations=None, **kwargs) -> None: - super(VirtualMachineScaleSetNetworkProfile, self).__init__(**kwargs) - self.network_interface_configurations = network_interface_configurations diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/virtual_machine_scale_set_os_disk.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/virtual_machine_scale_set_os_disk.py deleted file mode 100644 index 779a5b58bb71..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/virtual_machine_scale_set_os_disk.py +++ /dev/null @@ -1,71 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineScaleSetOSDisk(Model): - """Describes a virtual machine scale set operating system disk. - - All required parameters must be populated in order to send to Azure. - - :param name: Required. The disk name. - :type name: str - :param caching: Specifies the caching requirements.

    Possible - values are:

    **None**

    **ReadOnly**

    **ReadWrite** -

    Default: **None for Standard storage. ReadOnly for Premium - storage**. Possible values include: 'None', 'ReadOnly', 'ReadWrite' - :type caching: str or ~azure.mgmt.compute.v2015_06_15.models.CachingTypes - :param create_option: Required. Specifies how the virtual machines in the - scale set should be created.

    The only allowed value is: - **FromImage** \\u2013 This value is used when you are using an image to - create the virtual machine. If you are using a platform image, you also - use the imageReference element described above. If you are using a - marketplace image, you also use the plan element previously described. - Possible values include: 'FromImage', 'Empty', 'Attach' - :type create_option: str or - ~azure.mgmt.compute.v2015_06_15.models.DiskCreateOptionTypes - :param os_type: This property allows you to specify the type of the OS - that is included in the disk if creating a VM from user-image or a - specialized VHD.

    Possible values are:

    **Windows** -

    **Linux**. Possible values include: 'Windows', 'Linux' - :type os_type: str or - ~azure.mgmt.compute.v2015_06_15.models.OperatingSystemTypes - :param image: The Source User Image VirtualHardDisk. This VirtualHardDisk - will be copied before using it to attach to the Virtual Machine. If - SourceImage is provided, the destination VirtualHardDisk should not exist. - :type image: ~azure.mgmt.compute.v2015_06_15.models.VirtualHardDisk - :param vhd_containers: The list of virtual hard disk container uris. - :type vhd_containers: list[str] - """ - - _validation = { - 'name': {'required': True}, - 'create_option': {'required': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'caching': {'key': 'caching', 'type': 'CachingTypes'}, - 'create_option': {'key': 'createOption', 'type': 'DiskCreateOptionTypes'}, - 'os_type': {'key': 'osType', 'type': 'OperatingSystemTypes'}, - 'image': {'key': 'image', 'type': 'VirtualHardDisk'}, - 'vhd_containers': {'key': 'vhdContainers', 'type': '[str]'}, - } - - def __init__(self, **kwargs): - super(VirtualMachineScaleSetOSDisk, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.caching = kwargs.get('caching', None) - self.create_option = kwargs.get('create_option', None) - self.os_type = kwargs.get('os_type', None) - self.image = kwargs.get('image', None) - self.vhd_containers = kwargs.get('vhd_containers', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/virtual_machine_scale_set_os_disk_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/virtual_machine_scale_set_os_disk_py3.py deleted file mode 100644 index 2a4f5f962911..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/virtual_machine_scale_set_os_disk_py3.py +++ /dev/null @@ -1,71 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineScaleSetOSDisk(Model): - """Describes a virtual machine scale set operating system disk. - - All required parameters must be populated in order to send to Azure. - - :param name: Required. The disk name. - :type name: str - :param caching: Specifies the caching requirements.

    Possible - values are:

    **None**

    **ReadOnly**

    **ReadWrite** -

    Default: **None for Standard storage. ReadOnly for Premium - storage**. Possible values include: 'None', 'ReadOnly', 'ReadWrite' - :type caching: str or ~azure.mgmt.compute.v2015_06_15.models.CachingTypes - :param create_option: Required. Specifies how the virtual machines in the - scale set should be created.

    The only allowed value is: - **FromImage** \\u2013 This value is used when you are using an image to - create the virtual machine. If you are using a platform image, you also - use the imageReference element described above. If you are using a - marketplace image, you also use the plan element previously described. - Possible values include: 'FromImage', 'Empty', 'Attach' - :type create_option: str or - ~azure.mgmt.compute.v2015_06_15.models.DiskCreateOptionTypes - :param os_type: This property allows you to specify the type of the OS - that is included in the disk if creating a VM from user-image or a - specialized VHD.

    Possible values are:

    **Windows** -

    **Linux**. Possible values include: 'Windows', 'Linux' - :type os_type: str or - ~azure.mgmt.compute.v2015_06_15.models.OperatingSystemTypes - :param image: The Source User Image VirtualHardDisk. This VirtualHardDisk - will be copied before using it to attach to the Virtual Machine. If - SourceImage is provided, the destination VirtualHardDisk should not exist. - :type image: ~azure.mgmt.compute.v2015_06_15.models.VirtualHardDisk - :param vhd_containers: The list of virtual hard disk container uris. - :type vhd_containers: list[str] - """ - - _validation = { - 'name': {'required': True}, - 'create_option': {'required': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'caching': {'key': 'caching', 'type': 'CachingTypes'}, - 'create_option': {'key': 'createOption', 'type': 'DiskCreateOptionTypes'}, - 'os_type': {'key': 'osType', 'type': 'OperatingSystemTypes'}, - 'image': {'key': 'image', 'type': 'VirtualHardDisk'}, - 'vhd_containers': {'key': 'vhdContainers', 'type': '[str]'}, - } - - def __init__(self, *, name: str, create_option, caching=None, os_type=None, image=None, vhd_containers=None, **kwargs) -> None: - super(VirtualMachineScaleSetOSDisk, self).__init__(**kwargs) - self.name = name - self.caching = caching - self.create_option = create_option - self.os_type = os_type - self.image = image - self.vhd_containers = vhd_containers diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/virtual_machine_scale_set_os_profile.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/virtual_machine_scale_set_os_profile.py deleted file mode 100644 index 3de628b7b60c..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/virtual_machine_scale_set_os_profile.py +++ /dev/null @@ -1,84 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineScaleSetOSProfile(Model): - """Describes a virtual machine scale set OS profile. - - :param computer_name_prefix: Specifies the computer name prefix for all of - the virtual machines in the scale set. Computer name prefixes must be 1 to - 15 characters long. - :type computer_name_prefix: str - :param admin_username: Specifies the name of the administrator account. -

    **Windows-only restriction:** Cannot end in "."

    - **Disallowed values:** "administrator", "admin", "user", "user1", "test", - "user2", "test1", "user3", "admin1", "1", "123", "a", "actuser", "adm", - "admin2", "aspnet", "backup", "console", "david", "guest", "john", - "owner", "root", "server", "sql", "support", "support_388945a0", "sys", - "test2", "test3", "user4", "user5".

    **Minimum-length (Linux):** 1 - character

    **Max-length (Linux):** 64 characters

    - **Max-length (Windows):** 20 characters

  • For root access to - the Linux VM, see [Using root privileges on Linux virtual machines in - Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-use-root-privileges?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json)
  • - For a list of built-in system users on Linux that should not be used in - this field, see [Selecting User Names for Linux on - Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-usernames?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json) - :type admin_username: str - :param admin_password: Specifies the password of the administrator - account.

    **Minimum-length (Windows):** 8 characters

    - **Minimum-length (Linux):** 6 characters

    **Max-length - (Windows):** 123 characters

    **Max-length (Linux):** 72 characters -

    **Complexity requirements:** 3 out of 4 conditions below need to - be fulfilled
    Has lower characters
    Has upper characters
    Has a - digit
    Has a special character (Regex match [\\W_])

    - **Disallowed values:** "abc@123", "P@$$w0rd", "P@ssw0rd", "P@ssword123", - "Pa$$word", "pass@word1", "Password!", "Password1", "Password22", - "iloveyou!"

    For resetting the password, see [How to reset the - Remote Desktop service or its login password in a Windows - VM](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-reset-rdp?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json) -

    For resetting root password, see [Manage users, SSH, and check or - repair disks on Azure Linux VMs using the VMAccess - Extension](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-using-vmaccess-extension?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json#reset-root-password) - :type admin_password: str - :param custom_data: A base-64 encoded string of custom data. - :type custom_data: str - :param windows_configuration: The Windows Configuration of the OS profile. - :type windows_configuration: - ~azure.mgmt.compute.v2015_06_15.models.WindowsConfiguration - :param linux_configuration: The Linux Configuration of the OS profile. - :type linux_configuration: - ~azure.mgmt.compute.v2015_06_15.models.LinuxConfiguration - :param secrets: The List of certificates for addition to the VM. - :type secrets: - list[~azure.mgmt.compute.v2015_06_15.models.VaultSecretGroup] - """ - - _attribute_map = { - 'computer_name_prefix': {'key': 'computerNamePrefix', 'type': 'str'}, - 'admin_username': {'key': 'adminUsername', 'type': 'str'}, - 'admin_password': {'key': 'adminPassword', 'type': 'str'}, - 'custom_data': {'key': 'customData', 'type': 'str'}, - 'windows_configuration': {'key': 'windowsConfiguration', 'type': 'WindowsConfiguration'}, - 'linux_configuration': {'key': 'linuxConfiguration', 'type': 'LinuxConfiguration'}, - 'secrets': {'key': 'secrets', 'type': '[VaultSecretGroup]'}, - } - - def __init__(self, **kwargs): - super(VirtualMachineScaleSetOSProfile, self).__init__(**kwargs) - self.computer_name_prefix = kwargs.get('computer_name_prefix', None) - self.admin_username = kwargs.get('admin_username', None) - self.admin_password = kwargs.get('admin_password', None) - self.custom_data = kwargs.get('custom_data', None) - self.windows_configuration = kwargs.get('windows_configuration', None) - self.linux_configuration = kwargs.get('linux_configuration', None) - self.secrets = kwargs.get('secrets', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/virtual_machine_scale_set_os_profile_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/virtual_machine_scale_set_os_profile_py3.py deleted file mode 100644 index e28f4c4ac123..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/virtual_machine_scale_set_os_profile_py3.py +++ /dev/null @@ -1,84 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineScaleSetOSProfile(Model): - """Describes a virtual machine scale set OS profile. - - :param computer_name_prefix: Specifies the computer name prefix for all of - the virtual machines in the scale set. Computer name prefixes must be 1 to - 15 characters long. - :type computer_name_prefix: str - :param admin_username: Specifies the name of the administrator account. -

    **Windows-only restriction:** Cannot end in "."

    - **Disallowed values:** "administrator", "admin", "user", "user1", "test", - "user2", "test1", "user3", "admin1", "1", "123", "a", "actuser", "adm", - "admin2", "aspnet", "backup", "console", "david", "guest", "john", - "owner", "root", "server", "sql", "support", "support_388945a0", "sys", - "test2", "test3", "user4", "user5".

    **Minimum-length (Linux):** 1 - character

    **Max-length (Linux):** 64 characters

    - **Max-length (Windows):** 20 characters

  • For root access to - the Linux VM, see [Using root privileges on Linux virtual machines in - Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-use-root-privileges?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json)
  • - For a list of built-in system users on Linux that should not be used in - this field, see [Selecting User Names for Linux on - Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-usernames?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json) - :type admin_username: str - :param admin_password: Specifies the password of the administrator - account.

    **Minimum-length (Windows):** 8 characters

    - **Minimum-length (Linux):** 6 characters

    **Max-length - (Windows):** 123 characters

    **Max-length (Linux):** 72 characters -

    **Complexity requirements:** 3 out of 4 conditions below need to - be fulfilled
    Has lower characters
    Has upper characters
    Has a - digit
    Has a special character (Regex match [\\W_])

    - **Disallowed values:** "abc@123", "P@$$w0rd", "P@ssw0rd", "P@ssword123", - "Pa$$word", "pass@word1", "Password!", "Password1", "Password22", - "iloveyou!"

    For resetting the password, see [How to reset the - Remote Desktop service or its login password in a Windows - VM](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-reset-rdp?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json) -

    For resetting root password, see [Manage users, SSH, and check or - repair disks on Azure Linux VMs using the VMAccess - Extension](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-using-vmaccess-extension?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json#reset-root-password) - :type admin_password: str - :param custom_data: A base-64 encoded string of custom data. - :type custom_data: str - :param windows_configuration: The Windows Configuration of the OS profile. - :type windows_configuration: - ~azure.mgmt.compute.v2015_06_15.models.WindowsConfiguration - :param linux_configuration: The Linux Configuration of the OS profile. - :type linux_configuration: - ~azure.mgmt.compute.v2015_06_15.models.LinuxConfiguration - :param secrets: The List of certificates for addition to the VM. - :type secrets: - list[~azure.mgmt.compute.v2015_06_15.models.VaultSecretGroup] - """ - - _attribute_map = { - 'computer_name_prefix': {'key': 'computerNamePrefix', 'type': 'str'}, - 'admin_username': {'key': 'adminUsername', 'type': 'str'}, - 'admin_password': {'key': 'adminPassword', 'type': 'str'}, - 'custom_data': {'key': 'customData', 'type': 'str'}, - 'windows_configuration': {'key': 'windowsConfiguration', 'type': 'WindowsConfiguration'}, - 'linux_configuration': {'key': 'linuxConfiguration', 'type': 'LinuxConfiguration'}, - 'secrets': {'key': 'secrets', 'type': '[VaultSecretGroup]'}, - } - - def __init__(self, *, computer_name_prefix: str=None, admin_username: str=None, admin_password: str=None, custom_data: str=None, windows_configuration=None, linux_configuration=None, secrets=None, **kwargs) -> None: - super(VirtualMachineScaleSetOSProfile, self).__init__(**kwargs) - self.computer_name_prefix = computer_name_prefix - self.admin_username = admin_username - self.admin_password = admin_password - self.custom_data = custom_data - self.windows_configuration = windows_configuration - self.linux_configuration = linux_configuration - self.secrets = secrets diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/virtual_machine_scale_set_paged.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/virtual_machine_scale_set_paged.py deleted file mode 100644 index 26b8abef6c9f..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/virtual_machine_scale_set_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class VirtualMachineScaleSetPaged(Paged): - """ - A paging container for iterating over a list of :class:`VirtualMachineScaleSet ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[VirtualMachineScaleSet]'} - } - - def __init__(self, *args, **kwargs): - - super(VirtualMachineScaleSetPaged, self).__init__(*args, **kwargs) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/virtual_machine_scale_set_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/virtual_machine_scale_set_py3.py deleted file mode 100644 index 9d7545f85c01..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/virtual_machine_scale_set_py3.py +++ /dev/null @@ -1,74 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource_py3 import Resource - - -class VirtualMachineScaleSet(Resource): - """Describes a Virtual Machine Scale Set. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource Id - :vartype id: str - :ivar name: Resource name - :vartype name: str - :ivar type: Resource type - :vartype type: str - :param location: Required. Resource location - :type location: str - :param tags: Resource tags - :type tags: dict[str, str] - :param sku: The virtual machine scale set sku. - :type sku: ~azure.mgmt.compute.v2015_06_15.models.Sku - :param upgrade_policy: The upgrade policy. - :type upgrade_policy: ~azure.mgmt.compute.v2015_06_15.models.UpgradePolicy - :param virtual_machine_profile: The virtual machine profile. - :type virtual_machine_profile: - ~azure.mgmt.compute.v2015_06_15.models.VirtualMachineScaleSetVMProfile - :param provisioning_state: The provisioning state, which only appears in - the response. - :type provisioning_state: str - :param over_provision: Specifies whether the Virtual Machine Scale Set - should be overprovisioned. - :type over_provision: bool - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'sku': {'key': 'sku', 'type': 'Sku'}, - 'upgrade_policy': {'key': 'properties.upgradePolicy', 'type': 'UpgradePolicy'}, - 'virtual_machine_profile': {'key': 'properties.virtualMachineProfile', 'type': 'VirtualMachineScaleSetVMProfile'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'over_provision': {'key': 'properties.overProvision', 'type': 'bool'}, - } - - def __init__(self, *, location: str, tags=None, sku=None, upgrade_policy=None, virtual_machine_profile=None, provisioning_state: str=None, over_provision: bool=None, **kwargs) -> None: - super(VirtualMachineScaleSet, self).__init__(location=location, tags=tags, **kwargs) - self.sku = sku - self.upgrade_policy = upgrade_policy - self.virtual_machine_profile = virtual_machine_profile - self.provisioning_state = provisioning_state - self.over_provision = over_provision diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/virtual_machine_scale_set_sku.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/virtual_machine_scale_set_sku.py deleted file mode 100644 index f5f8c8b87bcc..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/virtual_machine_scale_set_sku.py +++ /dev/null @@ -1,46 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineScaleSetSku(Model): - """Describes an available virtual machine scale set sku. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar resource_type: The type of resource the sku applies to. - :vartype resource_type: str - :ivar sku: The Sku. - :vartype sku: ~azure.mgmt.compute.v2015_06_15.models.Sku - :ivar capacity: Specifies the number of virtual machines in the scale set. - :vartype capacity: - ~azure.mgmt.compute.v2015_06_15.models.VirtualMachineScaleSetSkuCapacity - """ - - _validation = { - 'resource_type': {'readonly': True}, - 'sku': {'readonly': True}, - 'capacity': {'readonly': True}, - } - - _attribute_map = { - 'resource_type': {'key': 'resourceType', 'type': 'str'}, - 'sku': {'key': 'sku', 'type': 'Sku'}, - 'capacity': {'key': 'capacity', 'type': 'VirtualMachineScaleSetSkuCapacity'}, - } - - def __init__(self, **kwargs): - super(VirtualMachineScaleSetSku, self).__init__(**kwargs) - self.resource_type = None - self.sku = None - self.capacity = None diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/virtual_machine_scale_set_sku_capacity.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/virtual_machine_scale_set_sku_capacity.py deleted file mode 100644 index 0b15c77b345f..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/virtual_machine_scale_set_sku_capacity.py +++ /dev/null @@ -1,52 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineScaleSetSkuCapacity(Model): - """Describes scaling information of a sku. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar minimum: The minimum capacity. - :vartype minimum: long - :ivar maximum: The maximum capacity that can be set. - :vartype maximum: long - :ivar default_capacity: The default capacity. - :vartype default_capacity: long - :ivar scale_type: The scale type applicable to the sku. Possible values - include: 'Automatic', 'None' - :vartype scale_type: str or - ~azure.mgmt.compute.v2015_06_15.models.VirtualMachineScaleSetSkuScaleType - """ - - _validation = { - 'minimum': {'readonly': True}, - 'maximum': {'readonly': True}, - 'default_capacity': {'readonly': True}, - 'scale_type': {'readonly': True}, - } - - _attribute_map = { - 'minimum': {'key': 'minimum', 'type': 'long'}, - 'maximum': {'key': 'maximum', 'type': 'long'}, - 'default_capacity': {'key': 'defaultCapacity', 'type': 'long'}, - 'scale_type': {'key': 'scaleType', 'type': 'VirtualMachineScaleSetSkuScaleType'}, - } - - def __init__(self, **kwargs): - super(VirtualMachineScaleSetSkuCapacity, self).__init__(**kwargs) - self.minimum = None - self.maximum = None - self.default_capacity = None - self.scale_type = None diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/virtual_machine_scale_set_sku_capacity_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/virtual_machine_scale_set_sku_capacity_py3.py deleted file mode 100644 index 10eb53309d29..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/virtual_machine_scale_set_sku_capacity_py3.py +++ /dev/null @@ -1,52 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineScaleSetSkuCapacity(Model): - """Describes scaling information of a sku. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar minimum: The minimum capacity. - :vartype minimum: long - :ivar maximum: The maximum capacity that can be set. - :vartype maximum: long - :ivar default_capacity: The default capacity. - :vartype default_capacity: long - :ivar scale_type: The scale type applicable to the sku. Possible values - include: 'Automatic', 'None' - :vartype scale_type: str or - ~azure.mgmt.compute.v2015_06_15.models.VirtualMachineScaleSetSkuScaleType - """ - - _validation = { - 'minimum': {'readonly': True}, - 'maximum': {'readonly': True}, - 'default_capacity': {'readonly': True}, - 'scale_type': {'readonly': True}, - } - - _attribute_map = { - 'minimum': {'key': 'minimum', 'type': 'long'}, - 'maximum': {'key': 'maximum', 'type': 'long'}, - 'default_capacity': {'key': 'defaultCapacity', 'type': 'long'}, - 'scale_type': {'key': 'scaleType', 'type': 'VirtualMachineScaleSetSkuScaleType'}, - } - - def __init__(self, **kwargs) -> None: - super(VirtualMachineScaleSetSkuCapacity, self).__init__(**kwargs) - self.minimum = None - self.maximum = None - self.default_capacity = None - self.scale_type = None diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/virtual_machine_scale_set_sku_paged.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/virtual_machine_scale_set_sku_paged.py deleted file mode 100644 index 1b84b18747ef..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/virtual_machine_scale_set_sku_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class VirtualMachineScaleSetSkuPaged(Paged): - """ - A paging container for iterating over a list of :class:`VirtualMachineScaleSetSku ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[VirtualMachineScaleSetSku]'} - } - - def __init__(self, *args, **kwargs): - - super(VirtualMachineScaleSetSkuPaged, self).__init__(*args, **kwargs) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/virtual_machine_scale_set_sku_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/virtual_machine_scale_set_sku_py3.py deleted file mode 100644 index f8986ba6206a..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/virtual_machine_scale_set_sku_py3.py +++ /dev/null @@ -1,46 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineScaleSetSku(Model): - """Describes an available virtual machine scale set sku. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar resource_type: The type of resource the sku applies to. - :vartype resource_type: str - :ivar sku: The Sku. - :vartype sku: ~azure.mgmt.compute.v2015_06_15.models.Sku - :ivar capacity: Specifies the number of virtual machines in the scale set. - :vartype capacity: - ~azure.mgmt.compute.v2015_06_15.models.VirtualMachineScaleSetSkuCapacity - """ - - _validation = { - 'resource_type': {'readonly': True}, - 'sku': {'readonly': True}, - 'capacity': {'readonly': True}, - } - - _attribute_map = { - 'resource_type': {'key': 'resourceType', 'type': 'str'}, - 'sku': {'key': 'sku', 'type': 'Sku'}, - 'capacity': {'key': 'capacity', 'type': 'VirtualMachineScaleSetSkuCapacity'}, - } - - def __init__(self, **kwargs) -> None: - super(VirtualMachineScaleSetSku, self).__init__(**kwargs) - self.resource_type = None - self.sku = None - self.capacity = None diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/virtual_machine_scale_set_storage_profile.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/virtual_machine_scale_set_storage_profile.py deleted file mode 100644 index d4f6bb3e25fb..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/virtual_machine_scale_set_storage_profile.py +++ /dev/null @@ -1,34 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineScaleSetStorageProfile(Model): - """Describes a virtual machine scale set storage profile. - - :param image_reference: The image reference. - :type image_reference: - ~azure.mgmt.compute.v2015_06_15.models.ImageReference - :param os_disk: The OS disk. - :type os_disk: - ~azure.mgmt.compute.v2015_06_15.models.VirtualMachineScaleSetOSDisk - """ - - _attribute_map = { - 'image_reference': {'key': 'imageReference', 'type': 'ImageReference'}, - 'os_disk': {'key': 'osDisk', 'type': 'VirtualMachineScaleSetOSDisk'}, - } - - def __init__(self, **kwargs): - super(VirtualMachineScaleSetStorageProfile, self).__init__(**kwargs) - self.image_reference = kwargs.get('image_reference', None) - self.os_disk = kwargs.get('os_disk', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/virtual_machine_scale_set_storage_profile_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/virtual_machine_scale_set_storage_profile_py3.py deleted file mode 100644 index f330b1168857..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/virtual_machine_scale_set_storage_profile_py3.py +++ /dev/null @@ -1,34 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineScaleSetStorageProfile(Model): - """Describes a virtual machine scale set storage profile. - - :param image_reference: The image reference. - :type image_reference: - ~azure.mgmt.compute.v2015_06_15.models.ImageReference - :param os_disk: The OS disk. - :type os_disk: - ~azure.mgmt.compute.v2015_06_15.models.VirtualMachineScaleSetOSDisk - """ - - _attribute_map = { - 'image_reference': {'key': 'imageReference', 'type': 'ImageReference'}, - 'os_disk': {'key': 'osDisk', 'type': 'VirtualMachineScaleSetOSDisk'}, - } - - def __init__(self, *, image_reference=None, os_disk=None, **kwargs) -> None: - super(VirtualMachineScaleSetStorageProfile, self).__init__(**kwargs) - self.image_reference = image_reference - self.os_disk = os_disk diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/virtual_machine_scale_set_vm.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/virtual_machine_scale_set_vm.py deleted file mode 100644 index f55dd57b9e0b..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/virtual_machine_scale_set_vm.py +++ /dev/null @@ -1,149 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource import Resource - - -class VirtualMachineScaleSetVM(Resource): - """Describes a virtual machine scale set virtual machine. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource Id - :vartype id: str - :ivar name: Resource name - :vartype name: str - :ivar type: Resource type - :vartype type: str - :param location: Required. Resource location - :type location: str - :param tags: Resource tags - :type tags: dict[str, str] - :ivar instance_id: The virtual machine instance ID. - :vartype instance_id: str - :ivar sku: The virtual machine SKU. - :vartype sku: ~azure.mgmt.compute.v2015_06_15.models.Sku - :ivar latest_model_applied: Specifies whether the latest model has been - applied to the virtual machine. - :vartype latest_model_applied: bool - :ivar instance_view: The virtual machine instance view. - :vartype instance_view: - ~azure.mgmt.compute.v2015_06_15.models.VirtualMachineScaleSetVMInstanceView - :param hardware_profile: Specifies the hardware settings for the virtual - machine. - :type hardware_profile: - ~azure.mgmt.compute.v2015_06_15.models.HardwareProfile - :param storage_profile: Specifies the storage settings for the virtual - machine disks. - :type storage_profile: - ~azure.mgmt.compute.v2015_06_15.models.StorageProfile - :param os_profile: Specifies the operating system settings for the virtual - machine. - :type os_profile: ~azure.mgmt.compute.v2015_06_15.models.OSProfile - :param network_profile: Specifies the network interfaces of the virtual - machine. - :type network_profile: - ~azure.mgmt.compute.v2015_06_15.models.NetworkProfile - :param diagnostics_profile: Specifies the boot diagnostic settings state. -

    Minimum api-version: 2015-06-15. - :type diagnostics_profile: - ~azure.mgmt.compute.v2015_06_15.models.DiagnosticsProfile - :param availability_set: Specifies information about the availability set - that the virtual machine should be assigned to. Virtual machines specified - in the same availability set are allocated to different nodes to maximize - availability. For more information about availability sets, see [Manage - the availability of virtual - machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-manage-availability?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). -

    For more information on Azure planned maintenance, see [Planned - maintenance for virtual machines in - Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-planned-maintenance?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json) -

    Currently, a VM can only be added to availability set at creation - time. An existing VM cannot be added to an availability set. - :type availability_set: ~azure.mgmt.compute.v2015_06_15.models.SubResource - :param provisioning_state: The provisioning state, which only appears in - the response. - :type provisioning_state: str - :param license_type: Specifies that the image or disk that is being used - was licensed on-premises. This element is only used for images that - contain the Windows Server operating system.

    Possible values are: -

    Windows_Client

    Windows_Server

    If this element - is included in a request for an update, the value must match the initial - value. This value cannot be updated.

    For more information, see - [Azure Hybrid Use Benefit for Windows - Server](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-hybrid-use-benefit-licensing?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json) -

    Minimum api-version: 2015-06-15 - :type license_type: str - :param plan: Specifies information about the marketplace image used to - create the virtual machine. This element is only used for marketplace - images. Before you can use a marketplace image from an API, you must - enable the image for programmatic use. In the Azure portal, find the - marketplace image that you want to use and then click **Want to deploy - programmatically, Get Started ->**. Enter any required information and - then click **Save**. - :type plan: ~azure.mgmt.compute.v2015_06_15.models.Plan - :ivar resources: The virtual machine child extension resources. - :vartype resources: - list[~azure.mgmt.compute.v2015_06_15.models.VirtualMachineExtension] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - 'instance_id': {'readonly': True}, - 'sku': {'readonly': True}, - 'latest_model_applied': {'readonly': True}, - 'instance_view': {'readonly': True}, - 'resources': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'instance_id': {'key': 'instanceId', 'type': 'str'}, - 'sku': {'key': 'sku', 'type': 'Sku'}, - 'latest_model_applied': {'key': 'properties.latestModelApplied', 'type': 'bool'}, - 'instance_view': {'key': 'properties.instanceView', 'type': 'VirtualMachineScaleSetVMInstanceView'}, - 'hardware_profile': {'key': 'properties.hardwareProfile', 'type': 'HardwareProfile'}, - 'storage_profile': {'key': 'properties.storageProfile', 'type': 'StorageProfile'}, - 'os_profile': {'key': 'properties.osProfile', 'type': 'OSProfile'}, - 'network_profile': {'key': 'properties.networkProfile', 'type': 'NetworkProfile'}, - 'diagnostics_profile': {'key': 'properties.diagnosticsProfile', 'type': 'DiagnosticsProfile'}, - 'availability_set': {'key': 'properties.availabilitySet', 'type': 'SubResource'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'license_type': {'key': 'properties.licenseType', 'type': 'str'}, - 'plan': {'key': 'plan', 'type': 'Plan'}, - 'resources': {'key': 'resources', 'type': '[VirtualMachineExtension]'}, - } - - def __init__(self, **kwargs): - super(VirtualMachineScaleSetVM, self).__init__(**kwargs) - self.instance_id = None - self.sku = None - self.latest_model_applied = None - self.instance_view = None - self.hardware_profile = kwargs.get('hardware_profile', None) - self.storage_profile = kwargs.get('storage_profile', None) - self.os_profile = kwargs.get('os_profile', None) - self.network_profile = kwargs.get('network_profile', None) - self.diagnostics_profile = kwargs.get('diagnostics_profile', None) - self.availability_set = kwargs.get('availability_set', None) - self.provisioning_state = kwargs.get('provisioning_state', None) - self.license_type = kwargs.get('license_type', None) - self.plan = kwargs.get('plan', None) - self.resources = None diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/virtual_machine_scale_set_vm_extensions_summary.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/virtual_machine_scale_set_vm_extensions_summary.py deleted file mode 100644 index 9da38fee498a..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/virtual_machine_scale_set_vm_extensions_summary.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineScaleSetVMExtensionsSummary(Model): - """Extensions summary for virtual machines of a virtual machine scale set. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar name: The extension name. - :vartype name: str - :ivar statuses_summary: The extensions information. - :vartype statuses_summary: - list[~azure.mgmt.compute.v2015_06_15.models.VirtualMachineStatusCodeCount] - """ - - _validation = { - 'name': {'readonly': True}, - 'statuses_summary': {'readonly': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'statuses_summary': {'key': 'statusesSummary', 'type': '[VirtualMachineStatusCodeCount]'}, - } - - def __init__(self, **kwargs): - super(VirtualMachineScaleSetVMExtensionsSummary, self).__init__(**kwargs) - self.name = None - self.statuses_summary = None diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/virtual_machine_scale_set_vm_extensions_summary_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/virtual_machine_scale_set_vm_extensions_summary_py3.py deleted file mode 100644 index 594a1fc6940d..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/virtual_machine_scale_set_vm_extensions_summary_py3.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineScaleSetVMExtensionsSummary(Model): - """Extensions summary for virtual machines of a virtual machine scale set. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar name: The extension name. - :vartype name: str - :ivar statuses_summary: The extensions information. - :vartype statuses_summary: - list[~azure.mgmt.compute.v2015_06_15.models.VirtualMachineStatusCodeCount] - """ - - _validation = { - 'name': {'readonly': True}, - 'statuses_summary': {'readonly': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'statuses_summary': {'key': 'statusesSummary', 'type': '[VirtualMachineStatusCodeCount]'}, - } - - def __init__(self, **kwargs) -> None: - super(VirtualMachineScaleSetVMExtensionsSummary, self).__init__(**kwargs) - self.name = None - self.statuses_summary = None diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/virtual_machine_scale_set_vm_instance_ids.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/virtual_machine_scale_set_vm_instance_ids.py deleted file mode 100644 index 772c66dad326..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/virtual_machine_scale_set_vm_instance_ids.py +++ /dev/null @@ -1,30 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineScaleSetVMInstanceIDs(Model): - """Specifies a list of virtual machine instance IDs from the VM scale set. - - :param instance_ids: The virtual machine scale set instance ids. Omitting - the virtual machine scale set instance ids will result in the operation - being performed on all virtual machines in the virtual machine scale set. - :type instance_ids: list[str] - """ - - _attribute_map = { - 'instance_ids': {'key': 'instanceIds', 'type': '[str]'}, - } - - def __init__(self, **kwargs): - super(VirtualMachineScaleSetVMInstanceIDs, self).__init__(**kwargs) - self.instance_ids = kwargs.get('instance_ids', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/virtual_machine_scale_set_vm_instance_ids_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/virtual_machine_scale_set_vm_instance_ids_py3.py deleted file mode 100644 index 658a8ccb87d5..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/virtual_machine_scale_set_vm_instance_ids_py3.py +++ /dev/null @@ -1,30 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineScaleSetVMInstanceIDs(Model): - """Specifies a list of virtual machine instance IDs from the VM scale set. - - :param instance_ids: The virtual machine scale set instance ids. Omitting - the virtual machine scale set instance ids will result in the operation - being performed on all virtual machines in the virtual machine scale set. - :type instance_ids: list[str] - """ - - _attribute_map = { - 'instance_ids': {'key': 'instanceIds', 'type': '[str]'}, - } - - def __init__(self, *, instance_ids=None, **kwargs) -> None: - super(VirtualMachineScaleSetVMInstanceIDs, self).__init__(**kwargs) - self.instance_ids = instance_ids diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/virtual_machine_scale_set_vm_instance_required_ids.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/virtual_machine_scale_set_vm_instance_required_ids.py deleted file mode 100644 index ece250dd4fd4..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/virtual_machine_scale_set_vm_instance_required_ids.py +++ /dev/null @@ -1,34 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineScaleSetVMInstanceRequiredIDs(Model): - """Specifies a list of virtual machine instance IDs from the VM scale set. - - All required parameters must be populated in order to send to Azure. - - :param instance_ids: Required. The virtual machine scale set instance ids. - :type instance_ids: list[str] - """ - - _validation = { - 'instance_ids': {'required': True}, - } - - _attribute_map = { - 'instance_ids': {'key': 'instanceIds', 'type': '[str]'}, - } - - def __init__(self, **kwargs): - super(VirtualMachineScaleSetVMInstanceRequiredIDs, self).__init__(**kwargs) - self.instance_ids = kwargs.get('instance_ids', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/virtual_machine_scale_set_vm_instance_required_ids_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/virtual_machine_scale_set_vm_instance_required_ids_py3.py deleted file mode 100644 index f32c6181467d..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/virtual_machine_scale_set_vm_instance_required_ids_py3.py +++ /dev/null @@ -1,34 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineScaleSetVMInstanceRequiredIDs(Model): - """Specifies a list of virtual machine instance IDs from the VM scale set. - - All required parameters must be populated in order to send to Azure. - - :param instance_ids: Required. The virtual machine scale set instance ids. - :type instance_ids: list[str] - """ - - _validation = { - 'instance_ids': {'required': True}, - } - - _attribute_map = { - 'instance_ids': {'key': 'instanceIds', 'type': '[str]'}, - } - - def __init__(self, *, instance_ids, **kwargs) -> None: - super(VirtualMachineScaleSetVMInstanceRequiredIDs, self).__init__(**kwargs) - self.instance_ids = instance_ids diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/virtual_machine_scale_set_vm_instance_view.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/virtual_machine_scale_set_vm_instance_view.py deleted file mode 100644 index 91782b6a5a84..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/virtual_machine_scale_set_vm_instance_view.py +++ /dev/null @@ -1,63 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineScaleSetVMInstanceView(Model): - """The instance view of a virtual machine scale set VM. - - :param platform_update_domain: The Update Domain count. - :type platform_update_domain: int - :param platform_fault_domain: The Fault Domain count. - :type platform_fault_domain: int - :param rdp_thumb_print: The Remote desktop certificate thumbprint. - :type rdp_thumb_print: str - :param vm_agent: The VM Agent running on the virtual machine. - :type vm_agent: - ~azure.mgmt.compute.v2015_06_15.models.VirtualMachineAgentInstanceView - :param disks: The disks information. - :type disks: list[~azure.mgmt.compute.v2015_06_15.models.DiskInstanceView] - :param extensions: The extensions information. - :type extensions: - list[~azure.mgmt.compute.v2015_06_15.models.VirtualMachineExtensionInstanceView] - :param boot_diagnostics: Boot Diagnostics is a debugging feature which - allows you to view Console Output and Screenshot to diagnose VM status. -

    You can easily view the output of your console log.

    - Azure also enables you to see a screenshot of the VM from the hypervisor. - :type boot_diagnostics: - ~azure.mgmt.compute.v2015_06_15.models.BootDiagnosticsInstanceView - :param statuses: The resource status information. - :type statuses: - list[~azure.mgmt.compute.v2015_06_15.models.InstanceViewStatus] - """ - - _attribute_map = { - 'platform_update_domain': {'key': 'platformUpdateDomain', 'type': 'int'}, - 'platform_fault_domain': {'key': 'platformFaultDomain', 'type': 'int'}, - 'rdp_thumb_print': {'key': 'rdpThumbPrint', 'type': 'str'}, - 'vm_agent': {'key': 'vmAgent', 'type': 'VirtualMachineAgentInstanceView'}, - 'disks': {'key': 'disks', 'type': '[DiskInstanceView]'}, - 'extensions': {'key': 'extensions', 'type': '[VirtualMachineExtensionInstanceView]'}, - 'boot_diagnostics': {'key': 'bootDiagnostics', 'type': 'BootDiagnosticsInstanceView'}, - 'statuses': {'key': 'statuses', 'type': '[InstanceViewStatus]'}, - } - - def __init__(self, **kwargs): - super(VirtualMachineScaleSetVMInstanceView, self).__init__(**kwargs) - self.platform_update_domain = kwargs.get('platform_update_domain', None) - self.platform_fault_domain = kwargs.get('platform_fault_domain', None) - self.rdp_thumb_print = kwargs.get('rdp_thumb_print', None) - self.vm_agent = kwargs.get('vm_agent', None) - self.disks = kwargs.get('disks', None) - self.extensions = kwargs.get('extensions', None) - self.boot_diagnostics = kwargs.get('boot_diagnostics', None) - self.statuses = kwargs.get('statuses', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/virtual_machine_scale_set_vm_instance_view_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/virtual_machine_scale_set_vm_instance_view_py3.py deleted file mode 100644 index 500dda482d10..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/virtual_machine_scale_set_vm_instance_view_py3.py +++ /dev/null @@ -1,63 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineScaleSetVMInstanceView(Model): - """The instance view of a virtual machine scale set VM. - - :param platform_update_domain: The Update Domain count. - :type platform_update_domain: int - :param platform_fault_domain: The Fault Domain count. - :type platform_fault_domain: int - :param rdp_thumb_print: The Remote desktop certificate thumbprint. - :type rdp_thumb_print: str - :param vm_agent: The VM Agent running on the virtual machine. - :type vm_agent: - ~azure.mgmt.compute.v2015_06_15.models.VirtualMachineAgentInstanceView - :param disks: The disks information. - :type disks: list[~azure.mgmt.compute.v2015_06_15.models.DiskInstanceView] - :param extensions: The extensions information. - :type extensions: - list[~azure.mgmt.compute.v2015_06_15.models.VirtualMachineExtensionInstanceView] - :param boot_diagnostics: Boot Diagnostics is a debugging feature which - allows you to view Console Output and Screenshot to diagnose VM status. -

    You can easily view the output of your console log.

    - Azure also enables you to see a screenshot of the VM from the hypervisor. - :type boot_diagnostics: - ~azure.mgmt.compute.v2015_06_15.models.BootDiagnosticsInstanceView - :param statuses: The resource status information. - :type statuses: - list[~azure.mgmt.compute.v2015_06_15.models.InstanceViewStatus] - """ - - _attribute_map = { - 'platform_update_domain': {'key': 'platformUpdateDomain', 'type': 'int'}, - 'platform_fault_domain': {'key': 'platformFaultDomain', 'type': 'int'}, - 'rdp_thumb_print': {'key': 'rdpThumbPrint', 'type': 'str'}, - 'vm_agent': {'key': 'vmAgent', 'type': 'VirtualMachineAgentInstanceView'}, - 'disks': {'key': 'disks', 'type': '[DiskInstanceView]'}, - 'extensions': {'key': 'extensions', 'type': '[VirtualMachineExtensionInstanceView]'}, - 'boot_diagnostics': {'key': 'bootDiagnostics', 'type': 'BootDiagnosticsInstanceView'}, - 'statuses': {'key': 'statuses', 'type': '[InstanceViewStatus]'}, - } - - def __init__(self, *, platform_update_domain: int=None, platform_fault_domain: int=None, rdp_thumb_print: str=None, vm_agent=None, disks=None, extensions=None, boot_diagnostics=None, statuses=None, **kwargs) -> None: - super(VirtualMachineScaleSetVMInstanceView, self).__init__(**kwargs) - self.platform_update_domain = platform_update_domain - self.platform_fault_domain = platform_fault_domain - self.rdp_thumb_print = rdp_thumb_print - self.vm_agent = vm_agent - self.disks = disks - self.extensions = extensions - self.boot_diagnostics = boot_diagnostics - self.statuses = statuses diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/virtual_machine_scale_set_vm_paged.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/virtual_machine_scale_set_vm_paged.py deleted file mode 100644 index 5480e0405538..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/virtual_machine_scale_set_vm_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class VirtualMachineScaleSetVMPaged(Paged): - """ - A paging container for iterating over a list of :class:`VirtualMachineScaleSetVM ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[VirtualMachineScaleSetVM]'} - } - - def __init__(self, *args, **kwargs): - - super(VirtualMachineScaleSetVMPaged, self).__init__(*args, **kwargs) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/virtual_machine_scale_set_vm_profile.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/virtual_machine_scale_set_vm_profile.py deleted file mode 100644 index 2379d8cfcbf1..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/virtual_machine_scale_set_vm_profile.py +++ /dev/null @@ -1,44 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineScaleSetVMProfile(Model): - """Describes a virtual machine scale set virtual machine profile. - - :param os_profile: The virtual machine scale set OS profile. - :type os_profile: - ~azure.mgmt.compute.v2015_06_15.models.VirtualMachineScaleSetOSProfile - :param storage_profile: The virtual machine scale set storage profile. - :type storage_profile: - ~azure.mgmt.compute.v2015_06_15.models.VirtualMachineScaleSetStorageProfile - :param network_profile: The virtual machine scale set network profile. - :type network_profile: - ~azure.mgmt.compute.v2015_06_15.models.VirtualMachineScaleSetNetworkProfile - :param extension_profile: The virtual machine scale set extension profile. - :type extension_profile: - ~azure.mgmt.compute.v2015_06_15.models.VirtualMachineScaleSetExtensionProfile - """ - - _attribute_map = { - 'os_profile': {'key': 'osProfile', 'type': 'VirtualMachineScaleSetOSProfile'}, - 'storage_profile': {'key': 'storageProfile', 'type': 'VirtualMachineScaleSetStorageProfile'}, - 'network_profile': {'key': 'networkProfile', 'type': 'VirtualMachineScaleSetNetworkProfile'}, - 'extension_profile': {'key': 'extensionProfile', 'type': 'VirtualMachineScaleSetExtensionProfile'}, - } - - def __init__(self, **kwargs): - super(VirtualMachineScaleSetVMProfile, self).__init__(**kwargs) - self.os_profile = kwargs.get('os_profile', None) - self.storage_profile = kwargs.get('storage_profile', None) - self.network_profile = kwargs.get('network_profile', None) - self.extension_profile = kwargs.get('extension_profile', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/virtual_machine_scale_set_vm_profile_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/virtual_machine_scale_set_vm_profile_py3.py deleted file mode 100644 index b09b4007e761..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/virtual_machine_scale_set_vm_profile_py3.py +++ /dev/null @@ -1,44 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineScaleSetVMProfile(Model): - """Describes a virtual machine scale set virtual machine profile. - - :param os_profile: The virtual machine scale set OS profile. - :type os_profile: - ~azure.mgmt.compute.v2015_06_15.models.VirtualMachineScaleSetOSProfile - :param storage_profile: The virtual machine scale set storage profile. - :type storage_profile: - ~azure.mgmt.compute.v2015_06_15.models.VirtualMachineScaleSetStorageProfile - :param network_profile: The virtual machine scale set network profile. - :type network_profile: - ~azure.mgmt.compute.v2015_06_15.models.VirtualMachineScaleSetNetworkProfile - :param extension_profile: The virtual machine scale set extension profile. - :type extension_profile: - ~azure.mgmt.compute.v2015_06_15.models.VirtualMachineScaleSetExtensionProfile - """ - - _attribute_map = { - 'os_profile': {'key': 'osProfile', 'type': 'VirtualMachineScaleSetOSProfile'}, - 'storage_profile': {'key': 'storageProfile', 'type': 'VirtualMachineScaleSetStorageProfile'}, - 'network_profile': {'key': 'networkProfile', 'type': 'VirtualMachineScaleSetNetworkProfile'}, - 'extension_profile': {'key': 'extensionProfile', 'type': 'VirtualMachineScaleSetExtensionProfile'}, - } - - def __init__(self, *, os_profile=None, storage_profile=None, network_profile=None, extension_profile=None, **kwargs) -> None: - super(VirtualMachineScaleSetVMProfile, self).__init__(**kwargs) - self.os_profile = os_profile - self.storage_profile = storage_profile - self.network_profile = network_profile - self.extension_profile = extension_profile diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/virtual_machine_scale_set_vm_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/virtual_machine_scale_set_vm_py3.py deleted file mode 100644 index 957fd54f8540..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/virtual_machine_scale_set_vm_py3.py +++ /dev/null @@ -1,149 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource_py3 import Resource - - -class VirtualMachineScaleSetVM(Resource): - """Describes a virtual machine scale set virtual machine. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource Id - :vartype id: str - :ivar name: Resource name - :vartype name: str - :ivar type: Resource type - :vartype type: str - :param location: Required. Resource location - :type location: str - :param tags: Resource tags - :type tags: dict[str, str] - :ivar instance_id: The virtual machine instance ID. - :vartype instance_id: str - :ivar sku: The virtual machine SKU. - :vartype sku: ~azure.mgmt.compute.v2015_06_15.models.Sku - :ivar latest_model_applied: Specifies whether the latest model has been - applied to the virtual machine. - :vartype latest_model_applied: bool - :ivar instance_view: The virtual machine instance view. - :vartype instance_view: - ~azure.mgmt.compute.v2015_06_15.models.VirtualMachineScaleSetVMInstanceView - :param hardware_profile: Specifies the hardware settings for the virtual - machine. - :type hardware_profile: - ~azure.mgmt.compute.v2015_06_15.models.HardwareProfile - :param storage_profile: Specifies the storage settings for the virtual - machine disks. - :type storage_profile: - ~azure.mgmt.compute.v2015_06_15.models.StorageProfile - :param os_profile: Specifies the operating system settings for the virtual - machine. - :type os_profile: ~azure.mgmt.compute.v2015_06_15.models.OSProfile - :param network_profile: Specifies the network interfaces of the virtual - machine. - :type network_profile: - ~azure.mgmt.compute.v2015_06_15.models.NetworkProfile - :param diagnostics_profile: Specifies the boot diagnostic settings state. -

    Minimum api-version: 2015-06-15. - :type diagnostics_profile: - ~azure.mgmt.compute.v2015_06_15.models.DiagnosticsProfile - :param availability_set: Specifies information about the availability set - that the virtual machine should be assigned to. Virtual machines specified - in the same availability set are allocated to different nodes to maximize - availability. For more information about availability sets, see [Manage - the availability of virtual - machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-manage-availability?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). -

    For more information on Azure planned maintenance, see [Planned - maintenance for virtual machines in - Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-planned-maintenance?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json) -

    Currently, a VM can only be added to availability set at creation - time. An existing VM cannot be added to an availability set. - :type availability_set: ~azure.mgmt.compute.v2015_06_15.models.SubResource - :param provisioning_state: The provisioning state, which only appears in - the response. - :type provisioning_state: str - :param license_type: Specifies that the image or disk that is being used - was licensed on-premises. This element is only used for images that - contain the Windows Server operating system.

    Possible values are: -

    Windows_Client

    Windows_Server

    If this element - is included in a request for an update, the value must match the initial - value. This value cannot be updated.

    For more information, see - [Azure Hybrid Use Benefit for Windows - Server](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-hybrid-use-benefit-licensing?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json) -

    Minimum api-version: 2015-06-15 - :type license_type: str - :param plan: Specifies information about the marketplace image used to - create the virtual machine. This element is only used for marketplace - images. Before you can use a marketplace image from an API, you must - enable the image for programmatic use. In the Azure portal, find the - marketplace image that you want to use and then click **Want to deploy - programmatically, Get Started ->**. Enter any required information and - then click **Save**. - :type plan: ~azure.mgmt.compute.v2015_06_15.models.Plan - :ivar resources: The virtual machine child extension resources. - :vartype resources: - list[~azure.mgmt.compute.v2015_06_15.models.VirtualMachineExtension] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - 'instance_id': {'readonly': True}, - 'sku': {'readonly': True}, - 'latest_model_applied': {'readonly': True}, - 'instance_view': {'readonly': True}, - 'resources': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'instance_id': {'key': 'instanceId', 'type': 'str'}, - 'sku': {'key': 'sku', 'type': 'Sku'}, - 'latest_model_applied': {'key': 'properties.latestModelApplied', 'type': 'bool'}, - 'instance_view': {'key': 'properties.instanceView', 'type': 'VirtualMachineScaleSetVMInstanceView'}, - 'hardware_profile': {'key': 'properties.hardwareProfile', 'type': 'HardwareProfile'}, - 'storage_profile': {'key': 'properties.storageProfile', 'type': 'StorageProfile'}, - 'os_profile': {'key': 'properties.osProfile', 'type': 'OSProfile'}, - 'network_profile': {'key': 'properties.networkProfile', 'type': 'NetworkProfile'}, - 'diagnostics_profile': {'key': 'properties.diagnosticsProfile', 'type': 'DiagnosticsProfile'}, - 'availability_set': {'key': 'properties.availabilitySet', 'type': 'SubResource'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'license_type': {'key': 'properties.licenseType', 'type': 'str'}, - 'plan': {'key': 'plan', 'type': 'Plan'}, - 'resources': {'key': 'resources', 'type': '[VirtualMachineExtension]'}, - } - - def __init__(self, *, location: str, tags=None, hardware_profile=None, storage_profile=None, os_profile=None, network_profile=None, diagnostics_profile=None, availability_set=None, provisioning_state: str=None, license_type: str=None, plan=None, **kwargs) -> None: - super(VirtualMachineScaleSetVM, self).__init__(location=location, tags=tags, **kwargs) - self.instance_id = None - self.sku = None - self.latest_model_applied = None - self.instance_view = None - self.hardware_profile = hardware_profile - self.storage_profile = storage_profile - self.os_profile = os_profile - self.network_profile = network_profile - self.diagnostics_profile = diagnostics_profile - self.availability_set = availability_set - self.provisioning_state = provisioning_state - self.license_type = license_type - self.plan = plan - self.resources = None diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/virtual_machine_size.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/virtual_machine_size.py deleted file mode 100644 index 0fef3efd6c8e..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/virtual_machine_size.py +++ /dev/null @@ -1,53 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineSize(Model): - """Describes the properties of a VM size. - - :param name: The name of the virtual machine size. - :type name: str - :param number_of_cores: The number of cores supported by the virtual - machine size. - :type number_of_cores: int - :param os_disk_size_in_mb: The OS disk size, in MB, allowed by the virtual - machine size. - :type os_disk_size_in_mb: int - :param resource_disk_size_in_mb: The resource disk size, in MB, allowed by - the virtual machine size. - :type resource_disk_size_in_mb: int - :param memory_in_mb: The amount of memory, in MB, supported by the virtual - machine size. - :type memory_in_mb: int - :param max_data_disk_count: The maximum number of data disks that can be - attached to the virtual machine size. - :type max_data_disk_count: int - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'number_of_cores': {'key': 'numberOfCores', 'type': 'int'}, - 'os_disk_size_in_mb': {'key': 'osDiskSizeInMB', 'type': 'int'}, - 'resource_disk_size_in_mb': {'key': 'resourceDiskSizeInMB', 'type': 'int'}, - 'memory_in_mb': {'key': 'memoryInMB', 'type': 'int'}, - 'max_data_disk_count': {'key': 'maxDataDiskCount', 'type': 'int'}, - } - - def __init__(self, **kwargs): - super(VirtualMachineSize, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.number_of_cores = kwargs.get('number_of_cores', None) - self.os_disk_size_in_mb = kwargs.get('os_disk_size_in_mb', None) - self.resource_disk_size_in_mb = kwargs.get('resource_disk_size_in_mb', None) - self.memory_in_mb = kwargs.get('memory_in_mb', None) - self.max_data_disk_count = kwargs.get('max_data_disk_count', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/virtual_machine_size_paged.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/virtual_machine_size_paged.py deleted file mode 100644 index c1b8af988604..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/virtual_machine_size_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class VirtualMachineSizePaged(Paged): - """ - A paging container for iterating over a list of :class:`VirtualMachineSize ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[VirtualMachineSize]'} - } - - def __init__(self, *args, **kwargs): - - super(VirtualMachineSizePaged, self).__init__(*args, **kwargs) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/virtual_machine_size_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/virtual_machine_size_py3.py deleted file mode 100644 index 9f99ba20ce42..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/virtual_machine_size_py3.py +++ /dev/null @@ -1,53 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineSize(Model): - """Describes the properties of a VM size. - - :param name: The name of the virtual machine size. - :type name: str - :param number_of_cores: The number of cores supported by the virtual - machine size. - :type number_of_cores: int - :param os_disk_size_in_mb: The OS disk size, in MB, allowed by the virtual - machine size. - :type os_disk_size_in_mb: int - :param resource_disk_size_in_mb: The resource disk size, in MB, allowed by - the virtual machine size. - :type resource_disk_size_in_mb: int - :param memory_in_mb: The amount of memory, in MB, supported by the virtual - machine size. - :type memory_in_mb: int - :param max_data_disk_count: The maximum number of data disks that can be - attached to the virtual machine size. - :type max_data_disk_count: int - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'number_of_cores': {'key': 'numberOfCores', 'type': 'int'}, - 'os_disk_size_in_mb': {'key': 'osDiskSizeInMB', 'type': 'int'}, - 'resource_disk_size_in_mb': {'key': 'resourceDiskSizeInMB', 'type': 'int'}, - 'memory_in_mb': {'key': 'memoryInMB', 'type': 'int'}, - 'max_data_disk_count': {'key': 'maxDataDiskCount', 'type': 'int'}, - } - - def __init__(self, *, name: str=None, number_of_cores: int=None, os_disk_size_in_mb: int=None, resource_disk_size_in_mb: int=None, memory_in_mb: int=None, max_data_disk_count: int=None, **kwargs) -> None: - super(VirtualMachineSize, self).__init__(**kwargs) - self.name = name - self.number_of_cores = number_of_cores - self.os_disk_size_in_mb = os_disk_size_in_mb - self.resource_disk_size_in_mb = resource_disk_size_in_mb - self.memory_in_mb = memory_in_mb - self.max_data_disk_count = max_data_disk_count diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/virtual_machine_status_code_count.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/virtual_machine_status_code_count.py deleted file mode 100644 index 7df7b702acd7..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/virtual_machine_status_code_count.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineStatusCodeCount(Model): - """The status code and count of the virtual machine scale set instance view - status summary. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar code: The instance view status code. - :vartype code: str - :ivar count: The number of instances having a particular status code. - :vartype count: int - """ - - _validation = { - 'code': {'readonly': True}, - 'count': {'readonly': True}, - } - - _attribute_map = { - 'code': {'key': 'code', 'type': 'str'}, - 'count': {'key': 'count', 'type': 'int'}, - } - - def __init__(self, **kwargs): - super(VirtualMachineStatusCodeCount, self).__init__(**kwargs) - self.code = None - self.count = None diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/virtual_machine_status_code_count_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/virtual_machine_status_code_count_py3.py deleted file mode 100644 index c38800073a95..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/virtual_machine_status_code_count_py3.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineStatusCodeCount(Model): - """The status code and count of the virtual machine scale set instance view - status summary. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar code: The instance view status code. - :vartype code: str - :ivar count: The number of instances having a particular status code. - :vartype count: int - """ - - _validation = { - 'code': {'readonly': True}, - 'count': {'readonly': True}, - } - - _attribute_map = { - 'code': {'key': 'code', 'type': 'str'}, - 'count': {'key': 'count', 'type': 'int'}, - } - - def __init__(self, **kwargs) -> None: - super(VirtualMachineStatusCodeCount, self).__init__(**kwargs) - self.code = None - self.count = None diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/win_rm_configuration.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/win_rm_configuration.py deleted file mode 100644 index 12ecbcebb502..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/win_rm_configuration.py +++ /dev/null @@ -1,29 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class WinRMConfiguration(Model): - """Describes Windows Remote Management configuration of the VM. - - :param listeners: The list of Windows Remote Management listeners - :type listeners: - list[~azure.mgmt.compute.v2015_06_15.models.WinRMListener] - """ - - _attribute_map = { - 'listeners': {'key': 'listeners', 'type': '[WinRMListener]'}, - } - - def __init__(self, **kwargs): - super(WinRMConfiguration, self).__init__(**kwargs) - self.listeners = kwargs.get('listeners', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/win_rm_configuration_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/win_rm_configuration_py3.py deleted file mode 100644 index 9936581e303b..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/win_rm_configuration_py3.py +++ /dev/null @@ -1,29 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class WinRMConfiguration(Model): - """Describes Windows Remote Management configuration of the VM. - - :param listeners: The list of Windows Remote Management listeners - :type listeners: - list[~azure.mgmt.compute.v2015_06_15.models.WinRMListener] - """ - - _attribute_map = { - 'listeners': {'key': 'listeners', 'type': '[WinRMListener]'}, - } - - def __init__(self, *, listeners=None, **kwargs) -> None: - super(WinRMConfiguration, self).__init__(**kwargs) - self.listeners = listeners diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/win_rm_listener.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/win_rm_listener.py deleted file mode 100644 index d49afa13557f..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/win_rm_listener.py +++ /dev/null @@ -1,42 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class WinRMListener(Model): - """Describes Protocol and thumbprint of Windows Remote Management listener. - - :param protocol: Specifies the protocol of listener.

    Possible - values are:
    **http**

    **https**. Possible values include: - 'Http', 'Https' - :type protocol: str or - ~azure.mgmt.compute.v2015_06_15.models.ProtocolTypes - :param certificate_url: This is the URL of a certificate that has been - uploaded to Key Vault as a secret. For adding a secret to the Key Vault, - see [Add a key or secret to the key - vault](https://docs.microsoft.com/azure/key-vault/key-vault-get-started/#add). - In this case, your certificate needs to be It is the Base64 encoding of - the following JSON Object which is encoded in UTF-8:

    {
    - "data":"",
    "dataType":"pfx",
    - "password":""
    } - :type certificate_url: str - """ - - _attribute_map = { - 'protocol': {'key': 'protocol', 'type': 'ProtocolTypes'}, - 'certificate_url': {'key': 'certificateUrl', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(WinRMListener, self).__init__(**kwargs) - self.protocol = kwargs.get('protocol', None) - self.certificate_url = kwargs.get('certificate_url', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/win_rm_listener_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/win_rm_listener_py3.py deleted file mode 100644 index f12546111314..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/win_rm_listener_py3.py +++ /dev/null @@ -1,42 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class WinRMListener(Model): - """Describes Protocol and thumbprint of Windows Remote Management listener. - - :param protocol: Specifies the protocol of listener.

    Possible - values are:
    **http**

    **https**. Possible values include: - 'Http', 'Https' - :type protocol: str or - ~azure.mgmt.compute.v2015_06_15.models.ProtocolTypes - :param certificate_url: This is the URL of a certificate that has been - uploaded to Key Vault as a secret. For adding a secret to the Key Vault, - see [Add a key or secret to the key - vault](https://docs.microsoft.com/azure/key-vault/key-vault-get-started/#add). - In this case, your certificate needs to be It is the Base64 encoding of - the following JSON Object which is encoded in UTF-8:

    {
    - "data":"",
    "dataType":"pfx",
    - "password":""
    } - :type certificate_url: str - """ - - _attribute_map = { - 'protocol': {'key': 'protocol', 'type': 'ProtocolTypes'}, - 'certificate_url': {'key': 'certificateUrl', 'type': 'str'}, - } - - def __init__(self, *, protocol=None, certificate_url: str=None, **kwargs) -> None: - super(WinRMListener, self).__init__(**kwargs) - self.protocol = protocol - self.certificate_url = certificate_url diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/windows_configuration.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/windows_configuration.py deleted file mode 100644 index 1bceb3629800..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/windows_configuration.py +++ /dev/null @@ -1,54 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class WindowsConfiguration(Model): - """Specifies Windows operating system settings on the virtual machine. - - :param provision_vm_agent: Indicates whether virtual machine agent should - be provisioned on the virtual machine.

    When this property is not - specified in the request body, default behavior is to set it to true. - This will ensure that VM Agent is installed on the VM so that extensions - can be added to the VM later. - :type provision_vm_agent: bool - :param enable_automatic_updates: Indicates whether virtual machine is - enabled for automatic updates. - :type enable_automatic_updates: bool - :param time_zone: Specifies the time zone of the virtual machine. e.g. - "Pacific Standard Time" - :type time_zone: str - :param additional_unattend_content: Specifies additional base-64 encoded - XML formatted information that can be included in the Unattend.xml file, - which is used by Windows Setup. - :type additional_unattend_content: - list[~azure.mgmt.compute.v2015_06_15.models.AdditionalUnattendContent] - :param win_rm: Specifies the Windows Remote Management listeners. This - enables remote Windows PowerShell. - :type win_rm: ~azure.mgmt.compute.v2015_06_15.models.WinRMConfiguration - """ - - _attribute_map = { - 'provision_vm_agent': {'key': 'provisionVMAgent', 'type': 'bool'}, - 'enable_automatic_updates': {'key': 'enableAutomaticUpdates', 'type': 'bool'}, - 'time_zone': {'key': 'timeZone', 'type': 'str'}, - 'additional_unattend_content': {'key': 'additionalUnattendContent', 'type': '[AdditionalUnattendContent]'}, - 'win_rm': {'key': 'winRM', 'type': 'WinRMConfiguration'}, - } - - def __init__(self, **kwargs): - super(WindowsConfiguration, self).__init__(**kwargs) - self.provision_vm_agent = kwargs.get('provision_vm_agent', None) - self.enable_automatic_updates = kwargs.get('enable_automatic_updates', None) - self.time_zone = kwargs.get('time_zone', None) - self.additional_unattend_content = kwargs.get('additional_unattend_content', None) - self.win_rm = kwargs.get('win_rm', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/windows_configuration_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/windows_configuration_py3.py deleted file mode 100644 index 5b976e421bac..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/windows_configuration_py3.py +++ /dev/null @@ -1,54 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class WindowsConfiguration(Model): - """Specifies Windows operating system settings on the virtual machine. - - :param provision_vm_agent: Indicates whether virtual machine agent should - be provisioned on the virtual machine.

    When this property is not - specified in the request body, default behavior is to set it to true. - This will ensure that VM Agent is installed on the VM so that extensions - can be added to the VM later. - :type provision_vm_agent: bool - :param enable_automatic_updates: Indicates whether virtual machine is - enabled for automatic updates. - :type enable_automatic_updates: bool - :param time_zone: Specifies the time zone of the virtual machine. e.g. - "Pacific Standard Time" - :type time_zone: str - :param additional_unattend_content: Specifies additional base-64 encoded - XML formatted information that can be included in the Unattend.xml file, - which is used by Windows Setup. - :type additional_unattend_content: - list[~azure.mgmt.compute.v2015_06_15.models.AdditionalUnattendContent] - :param win_rm: Specifies the Windows Remote Management listeners. This - enables remote Windows PowerShell. - :type win_rm: ~azure.mgmt.compute.v2015_06_15.models.WinRMConfiguration - """ - - _attribute_map = { - 'provision_vm_agent': {'key': 'provisionVMAgent', 'type': 'bool'}, - 'enable_automatic_updates': {'key': 'enableAutomaticUpdates', 'type': 'bool'}, - 'time_zone': {'key': 'timeZone', 'type': 'str'}, - 'additional_unattend_content': {'key': 'additionalUnattendContent', 'type': '[AdditionalUnattendContent]'}, - 'win_rm': {'key': 'winRM', 'type': 'WinRMConfiguration'}, - } - - def __init__(self, *, provision_vm_agent: bool=None, enable_automatic_updates: bool=None, time_zone: str=None, additional_unattend_content=None, win_rm=None, **kwargs) -> None: - super(WindowsConfiguration, self).__init__(**kwargs) - self.provision_vm_agent = provision_vm_agent - self.enable_automatic_updates = enable_automatic_updates - self.time_zone = time_zone - self.additional_unattend_content = additional_unattend_content - self.win_rm = win_rm diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/operations/__init__.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/operations/__init__.py index dba24407b254..2fc72aecfa0d 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/operations/__init__.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/operations/__init__.py @@ -9,15 +9,15 @@ # regenerated. # -------------------------------------------------------------------------- -from .availability_sets_operations import AvailabilitySetsOperations -from .virtual_machine_extension_images_operations import VirtualMachineExtensionImagesOperations -from .virtual_machine_extensions_operations import VirtualMachineExtensionsOperations -from .virtual_machine_images_operations import VirtualMachineImagesOperations -from .usage_operations import UsageOperations -from .virtual_machine_sizes_operations import VirtualMachineSizesOperations -from .virtual_machines_operations import VirtualMachinesOperations -from .virtual_machine_scale_sets_operations import VirtualMachineScaleSetsOperations -from .virtual_machine_scale_set_vms_operations import VirtualMachineScaleSetVMsOperations +from ._availability_sets_operations import AvailabilitySetsOperations +from ._virtual_machine_extension_images_operations import VirtualMachineExtensionImagesOperations +from ._virtual_machine_extensions_operations import VirtualMachineExtensionsOperations +from ._virtual_machine_images_operations import VirtualMachineImagesOperations +from ._usage_operations import UsageOperations +from ._virtual_machine_sizes_operations import VirtualMachineSizesOperations +from ._virtual_machines_operations import VirtualMachinesOperations +from ._virtual_machine_scale_sets_operations import VirtualMachineScaleSetsOperations +from ._virtual_machine_scale_set_vms_operations import VirtualMachineScaleSetVMsOperations __all__ = [ 'AvailabilitySetsOperations', diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/operations/_availability_sets_operations.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/operations/_availability_sets_operations.py new file mode 100644 index 000000000000..0ca8e944150b --- /dev/null +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/operations/_availability_sets_operations.py @@ -0,0 +1,373 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse +from msrestazure.azure_exceptions import CloudError + +from .. import models + + +class AvailabilitySetsOperations(object): + """AvailabilitySetsOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: Client Api Version. Constant value: "2015-06-15". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2015-06-15" + + self.config = config + + def create_or_update( + self, resource_group_name, name, parameters, custom_headers=None, raw=False, **operation_config): + """Create or update an availability set. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param name: The name of the availability set. + :type name: str + :param parameters: Parameters supplied to the Create Availability Set + operation. + :type parameters: + ~azure.mgmt.compute.v2015_06_15.models.AvailabilitySet + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: AvailabilitySet or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.compute.v2015_06_15.models.AvailabilitySet or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.create_or_update.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'availabilitySetName': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(parameters, 'AvailabilitySet') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('AvailabilitySet', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}'} + + def delete( + self, resource_group_name, availability_set_name, custom_headers=None, raw=False, **operation_config): + """Delete an availability set. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param availability_set_name: The name of the availability set. + :type availability_set_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: OperationStatusResponse or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.compute.v2015_06_15.models.OperationStatusResponse + or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.delete.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'availabilitySetName': self._serialize.url("availability_set_name", availability_set_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 204]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('OperationStatusResponse', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}'} + + def get( + self, resource_group_name, availability_set_name, custom_headers=None, raw=False, **operation_config): + """Retrieves information about an availability set. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param availability_set_name: The name of the availability set. + :type availability_set_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: AvailabilitySet or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.compute.v2015_06_15.models.AvailabilitySet or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'availabilitySetName': self._serialize.url("availability_set_name", availability_set_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('AvailabilitySet', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}'} + + def list( + self, resource_group_name, custom_headers=None, raw=False, **operation_config): + """Lists all availability sets in a resource group. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of AvailabilitySet + :rtype: + ~azure.mgmt.compute.v2015_06_15.models.AvailabilitySetPaged[~azure.mgmt.compute.v2015_06_15.models.AvailabilitySet] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.AvailabilitySetPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets'} + + def list_available_sizes( + self, resource_group_name, availability_set_name, custom_headers=None, raw=False, **operation_config): + """Lists all available virtual machine sizes that can be used to create a + new virtual machine in an existing availability set. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param availability_set_name: The name of the availability set. + :type availability_set_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of VirtualMachineSize + :rtype: + ~azure.mgmt.compute.v2015_06_15.models.VirtualMachineSizePaged[~azure.mgmt.compute.v2015_06_15.models.VirtualMachineSize] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_available_sizes.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'availabilitySetName': self._serialize.url("availability_set_name", availability_set_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.VirtualMachineSizePaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_available_sizes.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}/vmSizes'} diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/operations/_usage_operations.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/operations/_usage_operations.py new file mode 100644 index 000000000000..bb8fe003bac4 --- /dev/null +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/operations/_usage_operations.py @@ -0,0 +1,111 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse +from msrestazure.azure_exceptions import CloudError + +from .. import models + + +class UsageOperations(object): + """UsageOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: Client Api Version. Constant value: "2015-06-15". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2015-06-15" + + self.config = config + + def list( + self, location, custom_headers=None, raw=False, **operation_config): + """Gets, for the specified location, the current compute resource usage + information as well as the limits for compute resources under the + subscription. + + :param location: The location for which resource usage is queried. + :type location: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of Usage + :rtype: + ~azure.mgmt.compute.v2015_06_15.models.UsagePaged[~azure.mgmt.compute.v2015_06_15.models.Usage] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list.metadata['url'] + path_format_arguments = { + 'location': self._serialize.url("location", location, 'str', pattern=r'^[-\w\._]+$'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.UsagePaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/usages'} diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/operations/_virtual_machine_extension_images_operations.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/operations/_virtual_machine_extension_images_operations.py new file mode 100644 index 000000000000..55ddf108ed74 --- /dev/null +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/operations/_virtual_machine_extension_images_operations.py @@ -0,0 +1,247 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse +from msrestazure.azure_exceptions import CloudError + +from .. import models + + +class VirtualMachineExtensionImagesOperations(object): + """VirtualMachineExtensionImagesOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: Client Api Version. Constant value: "2015-06-15". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2015-06-15" + + self.config = config + + def get( + self, location, publisher_name, type, version, custom_headers=None, raw=False, **operation_config): + """Gets a virtual machine extension image. + + :param location: The name of a supported Azure region. + :type location: str + :param publisher_name: + :type publisher_name: str + :param type: + :type type: str + :param version: + :type version: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: VirtualMachineExtensionImage or ClientRawResponse if raw=true + :rtype: + ~azure.mgmt.compute.v2015_06_15.models.VirtualMachineExtensionImage or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'location': self._serialize.url("location", location, 'str'), + 'publisherName': self._serialize.url("publisher_name", publisher_name, 'str'), + 'type': self._serialize.url("type", type, 'str'), + 'version': self._serialize.url("version", version, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('VirtualMachineExtensionImage', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/publishers/{publisherName}/artifacttypes/vmextension/types/{type}/versions/{version}'} + + def list_types( + self, location, publisher_name, custom_headers=None, raw=False, **operation_config): + """Gets a list of virtual machine extension image types. + + :param location: The name of a supported Azure region. + :type location: str + :param publisher_name: + :type publisher_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: list or ClientRawResponse if raw=true + :rtype: + list[~azure.mgmt.compute.v2015_06_15.models.VirtualMachineExtensionImage] + or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.list_types.metadata['url'] + path_format_arguments = { + 'location': self._serialize.url("location", location, 'str'), + 'publisherName': self._serialize.url("publisher_name", publisher_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('[VirtualMachineExtensionImage]', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + list_types.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/publishers/{publisherName}/artifacttypes/vmextension/types'} + + def list_versions( + self, location, publisher_name, type, filter=None, top=None, orderby=None, custom_headers=None, raw=False, **operation_config): + """Gets a list of virtual machine extension image versions. + + :param location: The name of a supported Azure region. + :type location: str + :param publisher_name: + :type publisher_name: str + :param type: + :type type: str + :param filter: The filter to apply on the operation. + :type filter: str + :param top: + :type top: int + :param orderby: + :type orderby: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: list or ClientRawResponse if raw=true + :rtype: + list[~azure.mgmt.compute.v2015_06_15.models.VirtualMachineExtensionImage] + or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.list_versions.metadata['url'] + path_format_arguments = { + 'location': self._serialize.url("location", location, 'str'), + 'publisherName': self._serialize.url("publisher_name", publisher_name, 'str'), + 'type': self._serialize.url("type", type, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + if filter is not None: + query_parameters['$filter'] = self._serialize.query("filter", filter, 'str') + if top is not None: + query_parameters['$top'] = self._serialize.query("top", top, 'int') + if orderby is not None: + query_parameters['$orderby'] = self._serialize.query("orderby", orderby, 'str') + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('[VirtualMachineExtensionImage]', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + list_versions.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/publishers/{publisherName}/artifacttypes/vmextension/types/{type}/versions'} diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/operations/_virtual_machine_extensions_operations.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/operations/_virtual_machine_extensions_operations.py new file mode 100644 index 000000000000..7ca8f9f1559a --- /dev/null +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/operations/_virtual_machine_extensions_operations.py @@ -0,0 +1,425 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse +from msrestazure.azure_exceptions import CloudError +from msrest.polling import LROPoller, NoPolling +from msrestazure.polling.arm_polling import ARMPolling + +from .. import models + + +class VirtualMachineExtensionsOperations(object): + """VirtualMachineExtensionsOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: Client Api Version. Constant value: "2015-06-15". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2015-06-15" + + self.config = config + + + def _create_or_update_initial( + self, resource_group_name, vm_name, vm_extension_name, extension_parameters, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.create_or_update.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vmName': self._serialize.url("vm_name", vm_name, 'str'), + 'vmExtensionName': self._serialize.url("vm_extension_name", vm_extension_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(extension_parameters, 'VirtualMachineExtension') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 201]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('VirtualMachineExtension', response) + if response.status_code == 201: + deserialized = self._deserialize('VirtualMachineExtension', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def create_or_update( + self, resource_group_name, vm_name, vm_extension_name, extension_parameters, custom_headers=None, raw=False, polling=True, **operation_config): + """The operation to create or update the extension. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param vm_name: The name of the virtual machine where the extension + should be created or updated. + :type vm_name: str + :param vm_extension_name: The name of the virtual machine extension. + :type vm_extension_name: str + :param extension_parameters: Parameters supplied to the Create Virtual + Machine Extension operation. + :type extension_parameters: + ~azure.mgmt.compute.v2015_06_15.models.VirtualMachineExtension + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns VirtualMachineExtension + or ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2015_06_15.models.VirtualMachineExtension] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2015_06_15.models.VirtualMachineExtension]] + :raises: :class:`CloudError` + """ + raw_result = self._create_or_update_initial( + resource_group_name=resource_group_name, + vm_name=vm_name, + vm_extension_name=vm_extension_name, + extension_parameters=extension_parameters, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('VirtualMachineExtension', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/extensions/{vmExtensionName}'} + + + def _update_initial( + self, resource_group_name, vm_name, vm_extension_name, extension_parameters, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.update.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vmName': self._serialize.url("vm_name", vm_name, 'str'), + 'vmExtensionName': self._serialize.url("vm_extension_name", vm_extension_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(extension_parameters, 'VirtualMachineExtensionUpdate') + + # Construct and send request + request = self._client.patch(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('VirtualMachineExtension', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def update( + self, resource_group_name, vm_name, vm_extension_name, extension_parameters, custom_headers=None, raw=False, polling=True, **operation_config): + """The operation to update the extension. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param vm_name: The name of the virtual machine where the extension + should be updated. + :type vm_name: str + :param vm_extension_name: The name of the virtual machine extension. + :type vm_extension_name: str + :param extension_parameters: Parameters supplied to the Update Virtual + Machine Extension operation. + :type extension_parameters: + ~azure.mgmt.compute.v2015_06_15.models.VirtualMachineExtensionUpdate + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns VirtualMachineExtension + or ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2015_06_15.models.VirtualMachineExtension] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2015_06_15.models.VirtualMachineExtension]] + :raises: :class:`CloudError` + """ + raw_result = self._update_initial( + resource_group_name=resource_group_name, + vm_name=vm_name, + vm_extension_name=vm_extension_name, + extension_parameters=extension_parameters, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('VirtualMachineExtension', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/extensions/{vmExtensionName}'} + + + def _delete_initial( + self, resource_group_name, vm_name, vm_extension_name, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.delete.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vmName': self._serialize.url("vm_name", vm_name, 'str'), + 'vmExtensionName': self._serialize.url("vm_extension_name", vm_extension_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202, 204]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('OperationStatusResponse', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def delete( + self, resource_group_name, vm_name, vm_extension_name, custom_headers=None, raw=False, polling=True, **operation_config): + """The operation to delete the extension. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param vm_name: The name of the virtual machine where the extension + should be deleted. + :type vm_name: str + :param vm_extension_name: The name of the virtual machine extension. + :type vm_extension_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns OperationStatusResponse + or ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2015_06_15.models.OperationStatusResponse] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2015_06_15.models.OperationStatusResponse]] + :raises: :class:`CloudError` + """ + raw_result = self._delete_initial( + resource_group_name=resource_group_name, + vm_name=vm_name, + vm_extension_name=vm_extension_name, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('OperationStatusResponse', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/extensions/{vmExtensionName}'} + + def get( + self, resource_group_name, vm_name, vm_extension_name, expand=None, custom_headers=None, raw=False, **operation_config): + """The operation to get the extension. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param vm_name: The name of the virtual machine containing the + extension. + :type vm_name: str + :param vm_extension_name: The name of the virtual machine extension. + :type vm_extension_name: str + :param expand: The expand expression to apply on the operation. + :type expand: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: VirtualMachineExtension or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.compute.v2015_06_15.models.VirtualMachineExtension + or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vmName': self._serialize.url("vm_name", vm_name, 'str'), + 'vmExtensionName': self._serialize.url("vm_extension_name", vm_extension_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + if expand is not None: + query_parameters['$expand'] = self._serialize.query("expand", expand, 'str') + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('VirtualMachineExtension', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/extensions/{vmExtensionName}'} diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/operations/_virtual_machine_images_operations.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/operations/_virtual_machine_images_operations.py new file mode 100644 index 000000000000..0da5efc30e1e --- /dev/null +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/operations/_virtual_machine_images_operations.py @@ -0,0 +1,380 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse +from msrestazure.azure_exceptions import CloudError + +from .. import models + + +class VirtualMachineImagesOperations(object): + """VirtualMachineImagesOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: Client Api Version. Constant value: "2015-06-15". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2015-06-15" + + self.config = config + + def get( + self, location, publisher_name, offer, skus, version, custom_headers=None, raw=False, **operation_config): + """Gets a virtual machine image. + + :param location: The name of a supported Azure region. + :type location: str + :param publisher_name: A valid image publisher. + :type publisher_name: str + :param offer: A valid image publisher offer. + :type offer: str + :param skus: A valid image SKU. + :type skus: str + :param version: A valid image SKU version. + :type version: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: VirtualMachineImage or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.compute.v2015_06_15.models.VirtualMachineImage or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'location': self._serialize.url("location", location, 'str'), + 'publisherName': self._serialize.url("publisher_name", publisher_name, 'str'), + 'offer': self._serialize.url("offer", offer, 'str'), + 'skus': self._serialize.url("skus", skus, 'str'), + 'version': self._serialize.url("version", version, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('VirtualMachineImage', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/publishers/{publisherName}/artifacttypes/vmimage/offers/{offer}/skus/{skus}/versions/{version}'} + + def list( + self, location, publisher_name, offer, skus, filter=None, top=None, orderby=None, custom_headers=None, raw=False, **operation_config): + """Gets a list of all virtual machine image versions for the specified + location, publisher, offer, and SKU. + + :param location: The name of a supported Azure region. + :type location: str + :param publisher_name: A valid image publisher. + :type publisher_name: str + :param offer: A valid image publisher offer. + :type offer: str + :param skus: A valid image SKU. + :type skus: str + :param filter: The filter to apply on the operation. + :type filter: str + :param top: + :type top: int + :param orderby: + :type orderby: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: list or ClientRawResponse if raw=true + :rtype: + list[~azure.mgmt.compute.v2015_06_15.models.VirtualMachineImageResource] + or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.list.metadata['url'] + path_format_arguments = { + 'location': self._serialize.url("location", location, 'str'), + 'publisherName': self._serialize.url("publisher_name", publisher_name, 'str'), + 'offer': self._serialize.url("offer", offer, 'str'), + 'skus': self._serialize.url("skus", skus, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + if filter is not None: + query_parameters['$filter'] = self._serialize.query("filter", filter, 'str') + if top is not None: + query_parameters['$top'] = self._serialize.query("top", top, 'int') + if orderby is not None: + query_parameters['$orderby'] = self._serialize.query("orderby", orderby, 'str') + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('[VirtualMachineImageResource]', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/publishers/{publisherName}/artifacttypes/vmimage/offers/{offer}/skus/{skus}/versions'} + + def list_offers( + self, location, publisher_name, custom_headers=None, raw=False, **operation_config): + """Gets a list of virtual machine image offers for the specified location + and publisher. + + :param location: The name of a supported Azure region. + :type location: str + :param publisher_name: A valid image publisher. + :type publisher_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: list or ClientRawResponse if raw=true + :rtype: + list[~azure.mgmt.compute.v2015_06_15.models.VirtualMachineImageResource] + or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.list_offers.metadata['url'] + path_format_arguments = { + 'location': self._serialize.url("location", location, 'str'), + 'publisherName': self._serialize.url("publisher_name", publisher_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('[VirtualMachineImageResource]', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + list_offers.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/publishers/{publisherName}/artifacttypes/vmimage/offers'} + + def list_publishers( + self, location, custom_headers=None, raw=False, **operation_config): + """Gets a list of virtual machine image publishers for the specified Azure + location. + + :param location: The name of a supported Azure region. + :type location: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: list or ClientRawResponse if raw=true + :rtype: + list[~azure.mgmt.compute.v2015_06_15.models.VirtualMachineImageResource] + or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.list_publishers.metadata['url'] + path_format_arguments = { + 'location': self._serialize.url("location", location, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('[VirtualMachineImageResource]', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + list_publishers.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/publishers'} + + def list_skus( + self, location, publisher_name, offer, custom_headers=None, raw=False, **operation_config): + """Gets a list of virtual machine image SKUs for the specified location, + publisher, and offer. + + :param location: The name of a supported Azure region. + :type location: str + :param publisher_name: A valid image publisher. + :type publisher_name: str + :param offer: A valid image publisher offer. + :type offer: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: list or ClientRawResponse if raw=true + :rtype: + list[~azure.mgmt.compute.v2015_06_15.models.VirtualMachineImageResource] + or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.list_skus.metadata['url'] + path_format_arguments = { + 'location': self._serialize.url("location", location, 'str'), + 'publisherName': self._serialize.url("publisher_name", publisher_name, 'str'), + 'offer': self._serialize.url("offer", offer, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('[VirtualMachineImageResource]', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + list_skus.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/publishers/{publisherName}/artifacttypes/vmimage/offers/{offer}/skus'} diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/operations/_virtual_machine_scale_set_vms_operations.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/operations/_virtual_machine_scale_set_vms_operations.py new file mode 100644 index 000000000000..ad3ba72ca283 --- /dev/null +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/operations/_virtual_machine_scale_set_vms_operations.py @@ -0,0 +1,846 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse +from msrestazure.azure_exceptions import CloudError +from msrest.polling import LROPoller, NoPolling +from msrestazure.polling.arm_polling import ARMPolling + +from .. import models + + +class VirtualMachineScaleSetVMsOperations(object): + """VirtualMachineScaleSetVMsOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: Client Api Version. Constant value: "2015-06-15". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2015-06-15" + + self.config = config + + + def _reimage_initial( + self, resource_group_name, vm_scale_set_name, instance_id, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.reimage.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), + 'instanceId': self._serialize.url("instance_id", instance_id, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('OperationStatusResponse', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def reimage( + self, resource_group_name, vm_scale_set_name, instance_id, custom_headers=None, raw=False, polling=True, **operation_config): + """Reimages (upgrade the operating system) a specific virtual machine in a + VM scale set. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param vm_scale_set_name: The name of the VM scale set. + :type vm_scale_set_name: str + :param instance_id: The instance ID of the virtual machine. + :type instance_id: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns OperationStatusResponse + or ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2015_06_15.models.OperationStatusResponse] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2015_06_15.models.OperationStatusResponse]] + :raises: :class:`CloudError` + """ + raw_result = self._reimage_initial( + resource_group_name=resource_group_name, + vm_scale_set_name=vm_scale_set_name, + instance_id=instance_id, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('OperationStatusResponse', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + reimage.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/virtualmachines/{instanceId}/reimage'} + + + def _deallocate_initial( + self, resource_group_name, vm_scale_set_name, instance_id, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.deallocate.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), + 'instanceId': self._serialize.url("instance_id", instance_id, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('OperationStatusResponse', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def deallocate( + self, resource_group_name, vm_scale_set_name, instance_id, custom_headers=None, raw=False, polling=True, **operation_config): + """Deallocates a specific virtual machine in a VM scale set. Shuts down + the virtual machine and releases the compute resources it uses. You are + not billed for the compute resources of this virtual machine once it is + deallocated. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param vm_scale_set_name: The name of the VM scale set. + :type vm_scale_set_name: str + :param instance_id: The instance ID of the virtual machine. + :type instance_id: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns OperationStatusResponse + or ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2015_06_15.models.OperationStatusResponse] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2015_06_15.models.OperationStatusResponse]] + :raises: :class:`CloudError` + """ + raw_result = self._deallocate_initial( + resource_group_name=resource_group_name, + vm_scale_set_name=vm_scale_set_name, + instance_id=instance_id, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('OperationStatusResponse', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + deallocate.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/virtualmachines/{instanceId}/deallocate'} + + + def _delete_initial( + self, resource_group_name, vm_scale_set_name, instance_id, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.delete.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), + 'instanceId': self._serialize.url("instance_id", instance_id, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202, 204]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('OperationStatusResponse', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def delete( + self, resource_group_name, vm_scale_set_name, instance_id, custom_headers=None, raw=False, polling=True, **operation_config): + """Deletes a virtual machine from a VM scale set. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param vm_scale_set_name: The name of the VM scale set. + :type vm_scale_set_name: str + :param instance_id: The instance ID of the virtual machine. + :type instance_id: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns OperationStatusResponse + or ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2015_06_15.models.OperationStatusResponse] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2015_06_15.models.OperationStatusResponse]] + :raises: :class:`CloudError` + """ + raw_result = self._delete_initial( + resource_group_name=resource_group_name, + vm_scale_set_name=vm_scale_set_name, + instance_id=instance_id, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('OperationStatusResponse', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/virtualmachines/{instanceId}'} + + def get( + self, resource_group_name, vm_scale_set_name, instance_id, custom_headers=None, raw=False, **operation_config): + """Gets a virtual machine from a VM scale set. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param vm_scale_set_name: The name of the VM scale set. + :type vm_scale_set_name: str + :param instance_id: The instance ID of the virtual machine. + :type instance_id: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: VirtualMachineScaleSetVM or ClientRawResponse if raw=true + :rtype: + ~azure.mgmt.compute.v2015_06_15.models.VirtualMachineScaleSetVM or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), + 'instanceId': self._serialize.url("instance_id", instance_id, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('VirtualMachineScaleSetVM', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/virtualmachines/{instanceId}'} + + def get_instance_view( + self, resource_group_name, vm_scale_set_name, instance_id, custom_headers=None, raw=False, **operation_config): + """Gets the status of a virtual machine from a VM scale set. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param vm_scale_set_name: The name of the VM scale set. + :type vm_scale_set_name: str + :param instance_id: The instance ID of the virtual machine. + :type instance_id: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: VirtualMachineScaleSetVMInstanceView or ClientRawResponse if + raw=true + :rtype: + ~azure.mgmt.compute.v2015_06_15.models.VirtualMachineScaleSetVMInstanceView + or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get_instance_view.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), + 'instanceId': self._serialize.url("instance_id", instance_id, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('VirtualMachineScaleSetVMInstanceView', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_instance_view.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/virtualmachines/{instanceId}/instanceView'} + + def list( + self, resource_group_name, virtual_machine_scale_set_name, filter=None, select=None, expand=None, custom_headers=None, raw=False, **operation_config): + """Gets a list of all virtual machines in a VM scale sets. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param virtual_machine_scale_set_name: The name of the VM scale set. + :type virtual_machine_scale_set_name: str + :param filter: The filter to apply to the operation. + :type filter: str + :param select: The list parameters. + :type select: str + :param expand: The expand expression to apply to the operation. + :type expand: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of VirtualMachineScaleSetVM + :rtype: + ~azure.mgmt.compute.v2015_06_15.models.VirtualMachineScaleSetVMPaged[~azure.mgmt.compute.v2015_06_15.models.VirtualMachineScaleSetVM] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'virtualMachineScaleSetName': self._serialize.url("virtual_machine_scale_set_name", virtual_machine_scale_set_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + if filter is not None: + query_parameters['$filter'] = self._serialize.query("filter", filter, 'str') + if select is not None: + query_parameters['$select'] = self._serialize.query("select", select, 'str') + if expand is not None: + query_parameters['$expand'] = self._serialize.query("expand", expand, 'str') + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.VirtualMachineScaleSetVMPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{virtualMachineScaleSetName}/virtualMachines'} + + + def _power_off_initial( + self, resource_group_name, vm_scale_set_name, instance_id, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.power_off.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), + 'instanceId': self._serialize.url("instance_id", instance_id, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('OperationStatusResponse', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def power_off( + self, resource_group_name, vm_scale_set_name, instance_id, custom_headers=None, raw=False, polling=True, **operation_config): + """Power off (stop) a virtual machine in a VM scale set. Note that + resources are still attached and you are getting charged for the + resources. Instead, use deallocate to release resources and avoid + charges. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param vm_scale_set_name: The name of the VM scale set. + :type vm_scale_set_name: str + :param instance_id: The instance ID of the virtual machine. + :type instance_id: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns OperationStatusResponse + or ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2015_06_15.models.OperationStatusResponse] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2015_06_15.models.OperationStatusResponse]] + :raises: :class:`CloudError` + """ + raw_result = self._power_off_initial( + resource_group_name=resource_group_name, + vm_scale_set_name=vm_scale_set_name, + instance_id=instance_id, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('OperationStatusResponse', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + power_off.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/virtualmachines/{instanceId}/poweroff'} + + + def _restart_initial( + self, resource_group_name, vm_scale_set_name, instance_id, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.restart.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), + 'instanceId': self._serialize.url("instance_id", instance_id, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('OperationStatusResponse', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def restart( + self, resource_group_name, vm_scale_set_name, instance_id, custom_headers=None, raw=False, polling=True, **operation_config): + """Restarts a virtual machine in a VM scale set. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param vm_scale_set_name: The name of the VM scale set. + :type vm_scale_set_name: str + :param instance_id: The instance ID of the virtual machine. + :type instance_id: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns OperationStatusResponse + or ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2015_06_15.models.OperationStatusResponse] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2015_06_15.models.OperationStatusResponse]] + :raises: :class:`CloudError` + """ + raw_result = self._restart_initial( + resource_group_name=resource_group_name, + vm_scale_set_name=vm_scale_set_name, + instance_id=instance_id, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('OperationStatusResponse', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + restart.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/virtualmachines/{instanceId}/restart'} + + + def _start_initial( + self, resource_group_name, vm_scale_set_name, instance_id, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.start.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), + 'instanceId': self._serialize.url("instance_id", instance_id, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('OperationStatusResponse', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def start( + self, resource_group_name, vm_scale_set_name, instance_id, custom_headers=None, raw=False, polling=True, **operation_config): + """Starts a virtual machine in a VM scale set. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param vm_scale_set_name: The name of the VM scale set. + :type vm_scale_set_name: str + :param instance_id: The instance ID of the virtual machine. + :type instance_id: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns OperationStatusResponse + or ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2015_06_15.models.OperationStatusResponse] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2015_06_15.models.OperationStatusResponse]] + :raises: :class:`CloudError` + """ + raw_result = self._start_initial( + resource_group_name=resource_group_name, + vm_scale_set_name=vm_scale_set_name, + instance_id=instance_id, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('OperationStatusResponse', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + start.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/virtualmachines/{instanceId}/start'} diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/operations/_virtual_machine_scale_sets_operations.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/operations/_virtual_machine_scale_sets_operations.py new file mode 100644 index 000000000000..b7ca786f6ffd --- /dev/null +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/operations/_virtual_machine_scale_sets_operations.py @@ -0,0 +1,1318 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse +from msrestazure.azure_exceptions import CloudError +from msrest.polling import LROPoller, NoPolling +from msrestazure.polling.arm_polling import ARMPolling + +from .. import models + + +class VirtualMachineScaleSetsOperations(object): + """VirtualMachineScaleSetsOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: Client Api Version. Constant value: "2015-06-15". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2015-06-15" + + self.config = config + + + def _create_or_update_initial( + self, resource_group_name, name, parameters, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.create_or_update.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vmScaleSetName': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(parameters, 'VirtualMachineScaleSet') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 201]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('VirtualMachineScaleSet', response) + if response.status_code == 201: + deserialized = self._deserialize('VirtualMachineScaleSet', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def create_or_update( + self, resource_group_name, name, parameters, custom_headers=None, raw=False, polling=True, **operation_config): + """Create or update a VM scale set. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param name: The name of the VM scale set to create or update. + :type name: str + :param parameters: The scale set object. + :type parameters: + ~azure.mgmt.compute.v2015_06_15.models.VirtualMachineScaleSet + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns VirtualMachineScaleSet + or ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2015_06_15.models.VirtualMachineScaleSet] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2015_06_15.models.VirtualMachineScaleSet]] + :raises: :class:`CloudError` + """ + raw_result = self._create_or_update_initial( + resource_group_name=resource_group_name, + name=name, + parameters=parameters, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('VirtualMachineScaleSet', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}'} + + + def _delete_initial( + self, resource_group_name, vm_scale_set_name, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.delete.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202, 204]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('OperationStatusResponse', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def delete( + self, resource_group_name, vm_scale_set_name, custom_headers=None, raw=False, polling=True, **operation_config): + """Deletes a VM scale set. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param vm_scale_set_name: The name of the VM scale set. + :type vm_scale_set_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns OperationStatusResponse + or ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2015_06_15.models.OperationStatusResponse] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2015_06_15.models.OperationStatusResponse]] + :raises: :class:`CloudError` + """ + raw_result = self._delete_initial( + resource_group_name=resource_group_name, + vm_scale_set_name=vm_scale_set_name, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('OperationStatusResponse', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}'} + + def get( + self, resource_group_name, vm_scale_set_name, custom_headers=None, raw=False, **operation_config): + """Display information about a virtual machine scale set. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param vm_scale_set_name: The name of the VM scale set. + :type vm_scale_set_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: VirtualMachineScaleSet or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.compute.v2015_06_15.models.VirtualMachineScaleSet + or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('VirtualMachineScaleSet', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}'} + + + def _deallocate_initial( + self, resource_group_name, vm_scale_set_name, instance_ids=None, custom_headers=None, raw=False, **operation_config): + vm_instance_ids = None + if instance_ids is not None: + vm_instance_ids = models.VirtualMachineScaleSetVMInstanceIDs(instance_ids=instance_ids) + + # Construct URL + url = self.deallocate.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + if vm_instance_ids is not None: + body_content = self._serialize.body(vm_instance_ids, 'VirtualMachineScaleSetVMInstanceIDs') + else: + body_content = None + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('OperationStatusResponse', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def deallocate( + self, resource_group_name, vm_scale_set_name, instance_ids=None, custom_headers=None, raw=False, polling=True, **operation_config): + """Deallocates specific virtual machines in a VM scale set. Shuts down the + virtual machines and releases the compute resources. You are not billed + for the compute resources that this virtual machine scale set + deallocates. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param vm_scale_set_name: The name of the VM scale set. + :type vm_scale_set_name: str + :param instance_ids: The virtual machine scale set instance ids. + Omitting the virtual machine scale set instance ids will result in the + operation being performed on all virtual machines in the virtual + machine scale set. + :type instance_ids: list[str] + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns OperationStatusResponse + or ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2015_06_15.models.OperationStatusResponse] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2015_06_15.models.OperationStatusResponse]] + :raises: :class:`CloudError` + """ + raw_result = self._deallocate_initial( + resource_group_name=resource_group_name, + vm_scale_set_name=vm_scale_set_name, + instance_ids=instance_ids, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('OperationStatusResponse', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + deallocate.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/deallocate'} + + + def _delete_instances_initial( + self, resource_group_name, vm_scale_set_name, instance_ids, custom_headers=None, raw=False, **operation_config): + vm_instance_ids = models.VirtualMachineScaleSetVMInstanceRequiredIDs(instance_ids=instance_ids) + + # Construct URL + url = self.delete_instances.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(vm_instance_ids, 'VirtualMachineScaleSetVMInstanceRequiredIDs') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('OperationStatusResponse', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def delete_instances( + self, resource_group_name, vm_scale_set_name, instance_ids, custom_headers=None, raw=False, polling=True, **operation_config): + """Deletes virtual machines in a VM scale set. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param vm_scale_set_name: The name of the VM scale set. + :type vm_scale_set_name: str + :param instance_ids: The virtual machine scale set instance ids. + :type instance_ids: list[str] + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns OperationStatusResponse + or ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2015_06_15.models.OperationStatusResponse] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2015_06_15.models.OperationStatusResponse]] + :raises: :class:`CloudError` + """ + raw_result = self._delete_instances_initial( + resource_group_name=resource_group_name, + vm_scale_set_name=vm_scale_set_name, + instance_ids=instance_ids, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('OperationStatusResponse', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + delete_instances.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/delete'} + + def get_instance_view( + self, resource_group_name, vm_scale_set_name, custom_headers=None, raw=False, **operation_config): + """Gets the status of a VM scale set instance. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param vm_scale_set_name: The name of the VM scale set. + :type vm_scale_set_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: VirtualMachineScaleSetInstanceView or ClientRawResponse if + raw=true + :rtype: + ~azure.mgmt.compute.v2015_06_15.models.VirtualMachineScaleSetInstanceView + or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get_instance_view.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('VirtualMachineScaleSetInstanceView', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_instance_view.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/instanceView'} + + def list( + self, resource_group_name, custom_headers=None, raw=False, **operation_config): + """Gets a list of all VM scale sets under a resource group. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of VirtualMachineScaleSet + :rtype: + ~azure.mgmt.compute.v2015_06_15.models.VirtualMachineScaleSetPaged[~azure.mgmt.compute.v2015_06_15.models.VirtualMachineScaleSet] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.VirtualMachineScaleSetPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets'} + + def list_all( + self, custom_headers=None, raw=False, **operation_config): + """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. + + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of VirtualMachineScaleSet + :rtype: + ~azure.mgmt.compute.v2015_06_15.models.VirtualMachineScaleSetPaged[~azure.mgmt.compute.v2015_06_15.models.VirtualMachineScaleSet] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_all.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.VirtualMachineScaleSetPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_all.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Compute/virtualMachineScaleSets'} + + def list_skus( + self, resource_group_name, vm_scale_set_name, custom_headers=None, raw=False, **operation_config): + """Gets a list of SKUs available for your VM scale set, including the + minimum and maximum VM instances allowed for each SKU. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param vm_scale_set_name: The name of the VM scale set. + :type vm_scale_set_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of VirtualMachineScaleSetSku + :rtype: + ~azure.mgmt.compute.v2015_06_15.models.VirtualMachineScaleSetSkuPaged[~azure.mgmt.compute.v2015_06_15.models.VirtualMachineScaleSetSku] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_skus.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.VirtualMachineScaleSetSkuPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_skus.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/skus'} + + + def _power_off_initial( + self, resource_group_name, vm_scale_set_name, instance_ids=None, custom_headers=None, raw=False, **operation_config): + vm_instance_ids = None + if instance_ids is not None: + vm_instance_ids = models.VirtualMachineScaleSetVMInstanceIDs(instance_ids=instance_ids) + + # Construct URL + url = self.power_off.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + if vm_instance_ids is not None: + body_content = self._serialize.body(vm_instance_ids, 'VirtualMachineScaleSetVMInstanceIDs') + else: + body_content = None + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('OperationStatusResponse', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def power_off( + self, resource_group_name, vm_scale_set_name, instance_ids=None, custom_headers=None, raw=False, polling=True, **operation_config): + """Power off (stop) one or more virtual machines in a VM scale set. Note + that resources are still attached and you are getting charged for the + resources. Instead, use deallocate to release resources and avoid + charges. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param vm_scale_set_name: The name of the VM scale set. + :type vm_scale_set_name: str + :param instance_ids: The virtual machine scale set instance ids. + Omitting the virtual machine scale set instance ids will result in the + operation being performed on all virtual machines in the virtual + machine scale set. + :type instance_ids: list[str] + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns OperationStatusResponse + or ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2015_06_15.models.OperationStatusResponse] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2015_06_15.models.OperationStatusResponse]] + :raises: :class:`CloudError` + """ + raw_result = self._power_off_initial( + resource_group_name=resource_group_name, + vm_scale_set_name=vm_scale_set_name, + instance_ids=instance_ids, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('OperationStatusResponse', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + power_off.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/poweroff'} + + + def _restart_initial( + self, resource_group_name, vm_scale_set_name, instance_ids=None, custom_headers=None, raw=False, **operation_config): + vm_instance_ids = None + if instance_ids is not None: + vm_instance_ids = models.VirtualMachineScaleSetVMInstanceIDs(instance_ids=instance_ids) + + # Construct URL + url = self.restart.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + if vm_instance_ids is not None: + body_content = self._serialize.body(vm_instance_ids, 'VirtualMachineScaleSetVMInstanceIDs') + else: + body_content = None + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('OperationStatusResponse', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def restart( + self, resource_group_name, vm_scale_set_name, instance_ids=None, custom_headers=None, raw=False, polling=True, **operation_config): + """Restarts one or more virtual machines in a VM scale set. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param vm_scale_set_name: The name of the VM scale set. + :type vm_scale_set_name: str + :param instance_ids: The virtual machine scale set instance ids. + Omitting the virtual machine scale set instance ids will result in the + operation being performed on all virtual machines in the virtual + machine scale set. + :type instance_ids: list[str] + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns OperationStatusResponse + or ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2015_06_15.models.OperationStatusResponse] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2015_06_15.models.OperationStatusResponse]] + :raises: :class:`CloudError` + """ + raw_result = self._restart_initial( + resource_group_name=resource_group_name, + vm_scale_set_name=vm_scale_set_name, + instance_ids=instance_ids, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('OperationStatusResponse', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + restart.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/restart'} + + + def _start_initial( + self, resource_group_name, vm_scale_set_name, instance_ids=None, custom_headers=None, raw=False, **operation_config): + vm_instance_ids = None + if instance_ids is not None: + vm_instance_ids = models.VirtualMachineScaleSetVMInstanceIDs(instance_ids=instance_ids) + + # Construct URL + url = self.start.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + if vm_instance_ids is not None: + body_content = self._serialize.body(vm_instance_ids, 'VirtualMachineScaleSetVMInstanceIDs') + else: + body_content = None + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('OperationStatusResponse', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def start( + self, resource_group_name, vm_scale_set_name, instance_ids=None, custom_headers=None, raw=False, polling=True, **operation_config): + """Starts one or more virtual machines in a VM scale set. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param vm_scale_set_name: The name of the VM scale set. + :type vm_scale_set_name: str + :param instance_ids: The virtual machine scale set instance ids. + Omitting the virtual machine scale set instance ids will result in the + operation being performed on all virtual machines in the virtual + machine scale set. + :type instance_ids: list[str] + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns OperationStatusResponse + or ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2015_06_15.models.OperationStatusResponse] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2015_06_15.models.OperationStatusResponse]] + :raises: :class:`CloudError` + """ + raw_result = self._start_initial( + resource_group_name=resource_group_name, + vm_scale_set_name=vm_scale_set_name, + instance_ids=instance_ids, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('OperationStatusResponse', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + start.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/start'} + + + def _update_instances_initial( + self, resource_group_name, vm_scale_set_name, instance_ids, custom_headers=None, raw=False, **operation_config): + vm_instance_ids = models.VirtualMachineScaleSetVMInstanceRequiredIDs(instance_ids=instance_ids) + + # Construct URL + url = self.update_instances.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(vm_instance_ids, 'VirtualMachineScaleSetVMInstanceRequiredIDs') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('OperationStatusResponse', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def update_instances( + self, resource_group_name, vm_scale_set_name, instance_ids, custom_headers=None, raw=False, polling=True, **operation_config): + """Upgrades one or more virtual machines to the latest SKU set in the VM + scale set model. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param vm_scale_set_name: The name of the VM scale set. + :type vm_scale_set_name: str + :param instance_ids: The virtual machine scale set instance ids. + :type instance_ids: list[str] + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns OperationStatusResponse + or ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2015_06_15.models.OperationStatusResponse] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2015_06_15.models.OperationStatusResponse]] + :raises: :class:`CloudError` + """ + raw_result = self._update_instances_initial( + resource_group_name=resource_group_name, + vm_scale_set_name=vm_scale_set_name, + instance_ids=instance_ids, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('OperationStatusResponse', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + update_instances.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/manualupgrade'} + + + def _reimage_initial( + self, resource_group_name, vm_scale_set_name, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.reimage.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('OperationStatusResponse', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def reimage( + self, resource_group_name, vm_scale_set_name, custom_headers=None, raw=False, polling=True, **operation_config): + """Reimages (upgrade the operating system) one or more virtual machines in + a VM scale set. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param vm_scale_set_name: The name of the VM scale set. + :type vm_scale_set_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns OperationStatusResponse + or ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2015_06_15.models.OperationStatusResponse] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2015_06_15.models.OperationStatusResponse]] + :raises: :class:`CloudError` + """ + raw_result = self._reimage_initial( + resource_group_name=resource_group_name, + vm_scale_set_name=vm_scale_set_name, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('OperationStatusResponse', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + reimage.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/reimage'} diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/operations/_virtual_machine_sizes_operations.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/operations/_virtual_machine_sizes_operations.py new file mode 100644 index 000000000000..72377162ec20 --- /dev/null +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/operations/_virtual_machine_sizes_operations.py @@ -0,0 +1,111 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse +from msrestazure.azure_exceptions import CloudError + +from .. import models + + +class VirtualMachineSizesOperations(object): + """VirtualMachineSizesOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: Client Api Version. Constant value: "2015-06-15". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2015-06-15" + + self.config = config + + def list( + self, location, custom_headers=None, raw=False, **operation_config): + """Lists all available virtual machine sizes for a subscription in a + location. + + :param location: The location upon which virtual-machine-sizes is + queried. + :type location: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of VirtualMachineSize + :rtype: + ~azure.mgmt.compute.v2015_06_15.models.VirtualMachineSizePaged[~azure.mgmt.compute.v2015_06_15.models.VirtualMachineSize] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list.metadata['url'] + path_format_arguments = { + 'location': self._serialize.url("location", location, 'str', pattern=r'^[-\w\._]+$'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.VirtualMachineSizePaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/vmSizes'} diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/operations/_virtual_machines_operations.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/operations/_virtual_machines_operations.py new file mode 100644 index 000000000000..4b67f447394a --- /dev/null +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/operations/_virtual_machines_operations.py @@ -0,0 +1,1153 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse +from msrestazure.azure_exceptions import CloudError +from msrest.polling import LROPoller, NoPolling +from msrestazure.polling.arm_polling import ARMPolling + +from .. import models + + +class VirtualMachinesOperations(object): + """VirtualMachinesOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: Client Api Version. Constant value: "2015-06-15". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2015-06-15" + + self.config = config + + + def _capture_initial( + self, resource_group_name, vm_name, parameters, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.capture.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vmName': self._serialize.url("vm_name", vm_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(parameters, 'VirtualMachineCaptureParameters') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('VirtualMachineCaptureResult', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def capture( + self, resource_group_name, vm_name, parameters, custom_headers=None, raw=False, polling=True, **operation_config): + """Captures the VM by copying virtual hard disks of the VM and outputs a + template that can be used to create similar VMs. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param vm_name: The name of the virtual machine. + :type vm_name: str + :param parameters: Parameters supplied to the Capture Virtual Machine + operation. + :type parameters: + ~azure.mgmt.compute.v2015_06_15.models.VirtualMachineCaptureParameters + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns + VirtualMachineCaptureResult or + ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2015_06_15.models.VirtualMachineCaptureResult] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2015_06_15.models.VirtualMachineCaptureResult]] + :raises: :class:`CloudError` + """ + raw_result = self._capture_initial( + resource_group_name=resource_group_name, + vm_name=vm_name, + parameters=parameters, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('VirtualMachineCaptureResult', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + capture.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/capture'} + + + def _create_or_update_initial( + self, resource_group_name, vm_name, parameters, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.create_or_update.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vmName': self._serialize.url("vm_name", vm_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(parameters, 'VirtualMachine') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 201]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('VirtualMachine', response) + if response.status_code == 201: + deserialized = self._deserialize('VirtualMachine', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def create_or_update( + self, resource_group_name, vm_name, parameters, custom_headers=None, raw=False, polling=True, **operation_config): + """The operation to create or update a virtual machine. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param vm_name: The name of the virtual machine. + :type vm_name: str + :param parameters: Parameters supplied to the Create Virtual Machine + operation. + :type parameters: + ~azure.mgmt.compute.v2015_06_15.models.VirtualMachine + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns VirtualMachine or + ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2015_06_15.models.VirtualMachine] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2015_06_15.models.VirtualMachine]] + :raises: :class:`CloudError` + """ + raw_result = self._create_or_update_initial( + resource_group_name=resource_group_name, + vm_name=vm_name, + parameters=parameters, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('VirtualMachine', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}'} + + + def _delete_initial( + self, resource_group_name, vm_name, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.delete.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vmName': self._serialize.url("vm_name", vm_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202, 204]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('OperationStatusResponse', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def delete( + self, resource_group_name, vm_name, custom_headers=None, raw=False, polling=True, **operation_config): + """The operation to delete a virtual machine. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param vm_name: The name of the virtual machine. + :type vm_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns OperationStatusResponse + or ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2015_06_15.models.OperationStatusResponse] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2015_06_15.models.OperationStatusResponse]] + :raises: :class:`CloudError` + """ + raw_result = self._delete_initial( + resource_group_name=resource_group_name, + vm_name=vm_name, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('OperationStatusResponse', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}'} + + def get( + self, resource_group_name, vm_name, expand=None, custom_headers=None, raw=False, **operation_config): + """Retrieves information about the model view or the instance view of a + virtual machine. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param vm_name: The name of the virtual machine. + :type vm_name: str + :param expand: The expand expression to apply on the operation. + Possible values include: 'instanceView' + :type expand: str or + ~azure.mgmt.compute.v2015_06_15.models.InstanceViewTypes + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: VirtualMachine or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.compute.v2015_06_15.models.VirtualMachine or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vmName': self._serialize.url("vm_name", vm_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + if expand is not None: + query_parameters['$expand'] = self._serialize.query("expand", expand, 'InstanceViewTypes') + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('VirtualMachine', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}'} + + + def _deallocate_initial( + self, resource_group_name, vm_name, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.deallocate.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vmName': self._serialize.url("vm_name", vm_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('OperationStatusResponse', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def deallocate( + self, resource_group_name, vm_name, custom_headers=None, raw=False, polling=True, **operation_config): + """Shuts down the virtual machine and releases the compute resources. You + are not billed for the compute resources that this virtual machine + uses. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param vm_name: The name of the virtual machine. + :type vm_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns OperationStatusResponse + or ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2015_06_15.models.OperationStatusResponse] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2015_06_15.models.OperationStatusResponse]] + :raises: :class:`CloudError` + """ + raw_result = self._deallocate_initial( + resource_group_name=resource_group_name, + vm_name=vm_name, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('OperationStatusResponse', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + deallocate.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/deallocate'} + + def generalize( + self, resource_group_name, vm_name, custom_headers=None, raw=False, **operation_config): + """Sets the state of the virtual machine to generalized. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param vm_name: The name of the virtual machine. + :type vm_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: OperationStatusResponse or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.compute.v2015_06_15.models.OperationStatusResponse + or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.generalize.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vmName': self._serialize.url("vm_name", vm_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('OperationStatusResponse', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + generalize.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/generalize'} + + def list( + self, resource_group_name, custom_headers=None, raw=False, **operation_config): + """Lists all of the virtual machines in the specified resource group. Use + the nextLink property in the response to get the next page of virtual + machines. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of VirtualMachine + :rtype: + ~azure.mgmt.compute.v2015_06_15.models.VirtualMachinePaged[~azure.mgmt.compute.v2015_06_15.models.VirtualMachine] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.VirtualMachinePaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines'} + + def list_all( + self, custom_headers=None, raw=False, **operation_config): + """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. + + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of VirtualMachine + :rtype: + ~azure.mgmt.compute.v2015_06_15.models.VirtualMachinePaged[~azure.mgmt.compute.v2015_06_15.models.VirtualMachine] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_all.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.VirtualMachinePaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_all.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Compute/virtualMachines'} + + def list_available_sizes( + self, resource_group_name, vm_name, custom_headers=None, raw=False, **operation_config): + """Lists all available virtual machine sizes to which the specified + virtual machine can be resized. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param vm_name: The name of the virtual machine. + :type vm_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of VirtualMachineSize + :rtype: + ~azure.mgmt.compute.v2015_06_15.models.VirtualMachineSizePaged[~azure.mgmt.compute.v2015_06_15.models.VirtualMachineSize] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_available_sizes.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vmName': self._serialize.url("vm_name", vm_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.VirtualMachineSizePaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_available_sizes.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/vmSizes'} + + + def _power_off_initial( + self, resource_group_name, vm_name, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.power_off.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vmName': self._serialize.url("vm_name", vm_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('OperationStatusResponse', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def power_off( + self, resource_group_name, vm_name, custom_headers=None, raw=False, polling=True, **operation_config): + """The operation to power off (stop) a virtual machine. The virtual + machine can be restarted with the same provisioned resources. You are + still charged for this virtual machine. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param vm_name: The name of the virtual machine. + :type vm_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns OperationStatusResponse + or ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2015_06_15.models.OperationStatusResponse] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2015_06_15.models.OperationStatusResponse]] + :raises: :class:`CloudError` + """ + raw_result = self._power_off_initial( + resource_group_name=resource_group_name, + vm_name=vm_name, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('OperationStatusResponse', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + power_off.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/powerOff'} + + + def _restart_initial( + self, resource_group_name, vm_name, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.restart.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vmName': self._serialize.url("vm_name", vm_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('OperationStatusResponse', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def restart( + self, resource_group_name, vm_name, custom_headers=None, raw=False, polling=True, **operation_config): + """The operation to restart a virtual machine. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param vm_name: The name of the virtual machine. + :type vm_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns OperationStatusResponse + or ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2015_06_15.models.OperationStatusResponse] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2015_06_15.models.OperationStatusResponse]] + :raises: :class:`CloudError` + """ + raw_result = self._restart_initial( + resource_group_name=resource_group_name, + vm_name=vm_name, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('OperationStatusResponse', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + restart.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/restart'} + + + def _start_initial( + self, resource_group_name, vm_name, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.start.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vmName': self._serialize.url("vm_name", vm_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('OperationStatusResponse', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def start( + self, resource_group_name, vm_name, custom_headers=None, raw=False, polling=True, **operation_config): + """The operation to start a virtual machine. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param vm_name: The name of the virtual machine. + :type vm_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns OperationStatusResponse + or ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2015_06_15.models.OperationStatusResponse] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2015_06_15.models.OperationStatusResponse]] + :raises: :class:`CloudError` + """ + raw_result = self._start_initial( + resource_group_name=resource_group_name, + vm_name=vm_name, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('OperationStatusResponse', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + start.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/start'} + + + def _redeploy_initial( + self, resource_group_name, vm_name, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.redeploy.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vmName': self._serialize.url("vm_name", vm_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('OperationStatusResponse', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def redeploy( + self, resource_group_name, vm_name, custom_headers=None, raw=False, polling=True, **operation_config): + """The operation to redeploy a virtual machine. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param vm_name: The name of the virtual machine. + :type vm_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns OperationStatusResponse + or ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2015_06_15.models.OperationStatusResponse] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2015_06_15.models.OperationStatusResponse]] + :raises: :class:`CloudError` + """ + raw_result = self._redeploy_initial( + resource_group_name=resource_group_name, + vm_name=vm_name, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('OperationStatusResponse', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + redeploy.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/redeploy'} diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/operations/availability_sets_operations.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/operations/availability_sets_operations.py deleted file mode 100644 index 2483918080ce..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/operations/availability_sets_operations.py +++ /dev/null @@ -1,370 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError - -from .. import models - - -class AvailabilitySetsOperations(object): - """AvailabilitySetsOperations operations. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: Client Api Version. Constant value: "2015-06-15". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2015-06-15" - - self.config = config - - def create_or_update( - self, resource_group_name, name, parameters, custom_headers=None, raw=False, **operation_config): - """Create or update an availability set. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param name: The name of the availability set. - :type name: str - :param parameters: Parameters supplied to the Create Availability Set - operation. - :type parameters: - ~azure.mgmt.compute.v2015_06_15.models.AvailabilitySet - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: AvailabilitySet or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.compute.v2015_06_15.models.AvailabilitySet or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.create_or_update.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'availabilitySetName': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(parameters, 'AvailabilitySet') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('AvailabilitySet', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}'} - - def delete( - self, resource_group_name, availability_set_name, custom_headers=None, raw=False, **operation_config): - """Delete an availability set. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param availability_set_name: The name of the availability set. - :type availability_set_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: OperationStatusResponse or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.compute.v2015_06_15.models.OperationStatusResponse - or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.delete.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'availabilitySetName': self._serialize.url("availability_set_name", availability_set_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 204]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('OperationStatusResponse', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}'} - - def get( - self, resource_group_name, availability_set_name, custom_headers=None, raw=False, **operation_config): - """Retrieves information about an availability set. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param availability_set_name: The name of the availability set. - :type availability_set_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: AvailabilitySet or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.compute.v2015_06_15.models.AvailabilitySet or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'availabilitySetName': self._serialize.url("availability_set_name", availability_set_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('AvailabilitySet', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}'} - - def list( - self, resource_group_name, custom_headers=None, raw=False, **operation_config): - """Lists all availability sets in a resource group. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of AvailabilitySet - :rtype: - ~azure.mgmt.compute.v2015_06_15.models.AvailabilitySetPaged[~azure.mgmt.compute.v2015_06_15.models.AvailabilitySet] - :raises: :class:`CloudError` - """ - def internal_paging(next_link=None, raw=False): - - if not next_link: - # Construct URL - url = self.list.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - deserialized = models.AvailabilitySetPaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.AvailabilitySetPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets'} - - def list_available_sizes( - self, resource_group_name, availability_set_name, custom_headers=None, raw=False, **operation_config): - """Lists all available virtual machine sizes that can be used to create a - new virtual machine in an existing availability set. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param availability_set_name: The name of the availability set. - :type availability_set_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of VirtualMachineSize - :rtype: - ~azure.mgmt.compute.v2015_06_15.models.VirtualMachineSizePaged[~azure.mgmt.compute.v2015_06_15.models.VirtualMachineSize] - :raises: :class:`CloudError` - """ - def internal_paging(next_link=None, raw=False): - - if not next_link: - # Construct URL - url = self.list_available_sizes.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'availabilitySetName': self._serialize.url("availability_set_name", availability_set_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - deserialized = models.VirtualMachineSizePaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.VirtualMachineSizePaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - list_available_sizes.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}/vmSizes'} diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/operations/usage_operations.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/operations/usage_operations.py deleted file mode 100644 index 43e96cce9c08..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/operations/usage_operations.py +++ /dev/null @@ -1,107 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError - -from .. import models - - -class UsageOperations(object): - """UsageOperations operations. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: Client Api Version. Constant value: "2015-06-15". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2015-06-15" - - self.config = config - - def list( - self, location, custom_headers=None, raw=False, **operation_config): - """Gets, for the specified location, the current compute resource usage - information as well as the limits for compute resources under the - subscription. - - :param location: The location for which resource usage is queried. - :type location: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of Usage - :rtype: - ~azure.mgmt.compute.v2015_06_15.models.UsagePaged[~azure.mgmt.compute.v2015_06_15.models.Usage] - :raises: :class:`CloudError` - """ - def internal_paging(next_link=None, raw=False): - - if not next_link: - # Construct URL - url = self.list.metadata['url'] - path_format_arguments = { - 'location': self._serialize.url("location", location, 'str', pattern=r'^[-\w\._]+$'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - deserialized = models.UsagePaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.UsagePaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/usages'} diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/operations/virtual_machine_extension_images_operations.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/operations/virtual_machine_extension_images_operations.py deleted file mode 100644 index efabace1bf1b..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/operations/virtual_machine_extension_images_operations.py +++ /dev/null @@ -1,248 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError - -from .. import models - - -class VirtualMachineExtensionImagesOperations(object): - """VirtualMachineExtensionImagesOperations operations. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: Client Api Version. Constant value: "2015-06-15". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2015-06-15" - - self.config = config - - def get( - self, location, publisher_name, type, version, custom_headers=None, raw=False, **operation_config): - """Gets a virtual machine extension image. - - :param location: The name of a supported Azure region. - :type location: str - :param publisher_name: - :type publisher_name: str - :param type: - :type type: str - :param version: - :type version: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: VirtualMachineExtensionImage or ClientRawResponse if raw=true - :rtype: - ~azure.mgmt.compute.v2015_06_15.models.VirtualMachineExtensionImage or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get.metadata['url'] - path_format_arguments = { - 'location': self._serialize.url("location", location, 'str'), - 'publisherName': self._serialize.url("publisher_name", publisher_name, 'str'), - 'type': self._serialize.url("type", type, 'str'), - 'version': self._serialize.url("version", version, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('VirtualMachineExtensionImage', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/publishers/{publisherName}/artifacttypes/vmextension/types/{type}/versions/{version}'} - - def list_types( - self, location, publisher_name, custom_headers=None, raw=False, **operation_config): - """Gets a list of virtual machine extension image types. - - :param location: The name of a supported Azure region. - :type location: str - :param publisher_name: - :type publisher_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: list or ClientRawResponse if raw=true - :rtype: - list[~azure.mgmt.compute.v2015_06_15.models.VirtualMachineExtensionImage] - or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.list_types.metadata['url'] - path_format_arguments = { - 'location': self._serialize.url("location", location, 'str'), - 'publisherName': self._serialize.url("publisher_name", publisher_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('[VirtualMachineExtensionImage]', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - list_types.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/publishers/{publisherName}/artifacttypes/vmextension/types'} - - def list_versions( - self, location, publisher_name, type, filter=None, top=None, orderby=None, custom_headers=None, raw=False, **operation_config): - """Gets a list of virtual machine extension image versions. - - :param location: The name of a supported Azure region. - :type location: str - :param publisher_name: - :type publisher_name: str - :param type: - :type type: str - :param filter: The filter to apply on the operation. - :type filter: str - :param top: - :type top: int - :param orderby: - :type orderby: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: list or ClientRawResponse if raw=true - :rtype: - list[~azure.mgmt.compute.v2015_06_15.models.VirtualMachineExtensionImage] - or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.list_versions.metadata['url'] - path_format_arguments = { - 'location': self._serialize.url("location", location, 'str'), - 'publisherName': self._serialize.url("publisher_name", publisher_name, 'str'), - 'type': self._serialize.url("type", type, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - if filter is not None: - query_parameters['$filter'] = self._serialize.query("filter", filter, 'str') - if top is not None: - query_parameters['$top'] = self._serialize.query("top", top, 'int') - if orderby is not None: - query_parameters['$orderby'] = self._serialize.query("orderby", orderby, 'str') - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('[VirtualMachineExtensionImage]', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - list_versions.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/publishers/{publisherName}/artifacttypes/vmextension/types/{type}/versions'} diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/operations/virtual_machine_extensions_operations.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/operations/virtual_machine_extensions_operations.py deleted file mode 100644 index 629ed38a0b41..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/operations/virtual_machine_extensions_operations.py +++ /dev/null @@ -1,424 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError -from msrest.polling import LROPoller, NoPolling -from msrestazure.polling.arm_polling import ARMPolling - -from .. import models - - -class VirtualMachineExtensionsOperations(object): - """VirtualMachineExtensionsOperations operations. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: Client Api Version. Constant value: "2015-06-15". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2015-06-15" - - self.config = config - - - def _create_or_update_initial( - self, resource_group_name, vm_name, vm_extension_name, extension_parameters, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.create_or_update.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'vmName': self._serialize.url("vm_name", vm_name, 'str'), - 'vmExtensionName': self._serialize.url("vm_extension_name", vm_extension_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(extension_parameters, 'VirtualMachineExtension') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 201]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('VirtualMachineExtension', response) - if response.status_code == 201: - deserialized = self._deserialize('VirtualMachineExtension', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def create_or_update( - self, resource_group_name, vm_name, vm_extension_name, extension_parameters, custom_headers=None, raw=False, polling=True, **operation_config): - """The operation to create or update the extension. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param vm_name: The name of the virtual machine where the extension - should be created or updated. - :type vm_name: str - :param vm_extension_name: The name of the virtual machine extension. - :type vm_extension_name: str - :param extension_parameters: Parameters supplied to the Create Virtual - Machine Extension operation. - :type extension_parameters: - ~azure.mgmt.compute.v2015_06_15.models.VirtualMachineExtension - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns VirtualMachineExtension - or ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2015_06_15.models.VirtualMachineExtension] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2015_06_15.models.VirtualMachineExtension]] - :raises: :class:`CloudError` - """ - raw_result = self._create_or_update_initial( - resource_group_name=resource_group_name, - vm_name=vm_name, - vm_extension_name=vm_extension_name, - extension_parameters=extension_parameters, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('VirtualMachineExtension', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/extensions/{vmExtensionName}'} - - - def _update_initial( - self, resource_group_name, vm_name, vm_extension_name, extension_parameters, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.update.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'vmName': self._serialize.url("vm_name", vm_name, 'str'), - 'vmExtensionName': self._serialize.url("vm_extension_name", vm_extension_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(extension_parameters, 'VirtualMachineExtensionUpdate') - - # Construct and send request - request = self._client.patch(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('VirtualMachineExtension', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def update( - self, resource_group_name, vm_name, vm_extension_name, extension_parameters, custom_headers=None, raw=False, polling=True, **operation_config): - """The operation to update the extension. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param vm_name: The name of the virtual machine where the extension - should be updated. - :type vm_name: str - :param vm_extension_name: The name of the virtual machine extension. - :type vm_extension_name: str - :param extension_parameters: Parameters supplied to the Update Virtual - Machine Extension operation. - :type extension_parameters: - ~azure.mgmt.compute.v2015_06_15.models.VirtualMachineExtensionUpdate - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns VirtualMachineExtension - or ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2015_06_15.models.VirtualMachineExtension] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2015_06_15.models.VirtualMachineExtension]] - :raises: :class:`CloudError` - """ - raw_result = self._update_initial( - resource_group_name=resource_group_name, - vm_name=vm_name, - vm_extension_name=vm_extension_name, - extension_parameters=extension_parameters, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('VirtualMachineExtension', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/extensions/{vmExtensionName}'} - - - def _delete_initial( - self, resource_group_name, vm_name, vm_extension_name, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.delete.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'vmName': self._serialize.url("vm_name", vm_name, 'str'), - 'vmExtensionName': self._serialize.url("vm_extension_name", vm_extension_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202, 204]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('OperationStatusResponse', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def delete( - self, resource_group_name, vm_name, vm_extension_name, custom_headers=None, raw=False, polling=True, **operation_config): - """The operation to delete the extension. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param vm_name: The name of the virtual machine where the extension - should be deleted. - :type vm_name: str - :param vm_extension_name: The name of the virtual machine extension. - :type vm_extension_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns OperationStatusResponse - or ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2015_06_15.models.OperationStatusResponse] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2015_06_15.models.OperationStatusResponse]] - :raises: :class:`CloudError` - """ - raw_result = self._delete_initial( - resource_group_name=resource_group_name, - vm_name=vm_name, - vm_extension_name=vm_extension_name, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('OperationStatusResponse', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/extensions/{vmExtensionName}'} - - def get( - self, resource_group_name, vm_name, vm_extension_name, expand=None, custom_headers=None, raw=False, **operation_config): - """The operation to get the extension. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param vm_name: The name of the virtual machine containing the - extension. - :type vm_name: str - :param vm_extension_name: The name of the virtual machine extension. - :type vm_extension_name: str - :param expand: The expand expression to apply on the operation. - :type expand: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: VirtualMachineExtension or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.compute.v2015_06_15.models.VirtualMachineExtension - or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'vmName': self._serialize.url("vm_name", vm_name, 'str'), - 'vmExtensionName': self._serialize.url("vm_extension_name", vm_extension_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - if expand is not None: - query_parameters['$expand'] = self._serialize.query("expand", expand, 'str') - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('VirtualMachineExtension', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/extensions/{vmExtensionName}'} diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/operations/virtual_machine_images_operations.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/operations/virtual_machine_images_operations.py deleted file mode 100644 index f8dcedcfc530..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/operations/virtual_machine_images_operations.py +++ /dev/null @@ -1,383 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError - -from .. import models - - -class VirtualMachineImagesOperations(object): - """VirtualMachineImagesOperations operations. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: Client Api Version. Constant value: "2015-06-15". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2015-06-15" - - self.config = config - - def get( - self, location, publisher_name, offer, skus, version, custom_headers=None, raw=False, **operation_config): - """Gets a virtual machine image. - - :param location: The name of a supported Azure region. - :type location: str - :param publisher_name: A valid image publisher. - :type publisher_name: str - :param offer: A valid image publisher offer. - :type offer: str - :param skus: A valid image SKU. - :type skus: str - :param version: A valid image SKU version. - :type version: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: VirtualMachineImage or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.compute.v2015_06_15.models.VirtualMachineImage or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get.metadata['url'] - path_format_arguments = { - 'location': self._serialize.url("location", location, 'str'), - 'publisherName': self._serialize.url("publisher_name", publisher_name, 'str'), - 'offer': self._serialize.url("offer", offer, 'str'), - 'skus': self._serialize.url("skus", skus, 'str'), - 'version': self._serialize.url("version", version, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('VirtualMachineImage', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/publishers/{publisherName}/artifacttypes/vmimage/offers/{offer}/skus/{skus}/versions/{version}'} - - def list( - self, location, publisher_name, offer, skus, filter=None, top=None, orderby=None, custom_headers=None, raw=False, **operation_config): - """Gets a list of all virtual machine image versions for the specified - location, publisher, offer, and SKU. - - :param location: The name of a supported Azure region. - :type location: str - :param publisher_name: A valid image publisher. - :type publisher_name: str - :param offer: A valid image publisher offer. - :type offer: str - :param skus: A valid image SKU. - :type skus: str - :param filter: The filter to apply on the operation. - :type filter: str - :param top: - :type top: int - :param orderby: - :type orderby: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: list or ClientRawResponse if raw=true - :rtype: - list[~azure.mgmt.compute.v2015_06_15.models.VirtualMachineImageResource] - or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.list.metadata['url'] - path_format_arguments = { - 'location': self._serialize.url("location", location, 'str'), - 'publisherName': self._serialize.url("publisher_name", publisher_name, 'str'), - 'offer': self._serialize.url("offer", offer, 'str'), - 'skus': self._serialize.url("skus", skus, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - if filter is not None: - query_parameters['$filter'] = self._serialize.query("filter", filter, 'str') - if top is not None: - query_parameters['$top'] = self._serialize.query("top", top, 'int') - if orderby is not None: - query_parameters['$orderby'] = self._serialize.query("orderby", orderby, 'str') - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('[VirtualMachineImageResource]', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/publishers/{publisherName}/artifacttypes/vmimage/offers/{offer}/skus/{skus}/versions'} - - def list_offers( - self, location, publisher_name, custom_headers=None, raw=False, **operation_config): - """Gets a list of virtual machine image offers for the specified location - and publisher. - - :param location: The name of a supported Azure region. - :type location: str - :param publisher_name: A valid image publisher. - :type publisher_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: list or ClientRawResponse if raw=true - :rtype: - list[~azure.mgmt.compute.v2015_06_15.models.VirtualMachineImageResource] - or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.list_offers.metadata['url'] - path_format_arguments = { - 'location': self._serialize.url("location", location, 'str'), - 'publisherName': self._serialize.url("publisher_name", publisher_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('[VirtualMachineImageResource]', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - list_offers.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/publishers/{publisherName}/artifacttypes/vmimage/offers'} - - def list_publishers( - self, location, custom_headers=None, raw=False, **operation_config): - """Gets a list of virtual machine image publishers for the specified Azure - location. - - :param location: The name of a supported Azure region. - :type location: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: list or ClientRawResponse if raw=true - :rtype: - list[~azure.mgmt.compute.v2015_06_15.models.VirtualMachineImageResource] - or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.list_publishers.metadata['url'] - path_format_arguments = { - 'location': self._serialize.url("location", location, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('[VirtualMachineImageResource]', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - list_publishers.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/publishers'} - - def list_skus( - self, location, publisher_name, offer, custom_headers=None, raw=False, **operation_config): - """Gets a list of virtual machine image SKUs for the specified location, - publisher, and offer. - - :param location: The name of a supported Azure region. - :type location: str - :param publisher_name: A valid image publisher. - :type publisher_name: str - :param offer: A valid image publisher offer. - :type offer: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: list or ClientRawResponse if raw=true - :rtype: - list[~azure.mgmt.compute.v2015_06_15.models.VirtualMachineImageResource] - or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.list_skus.metadata['url'] - path_format_arguments = { - 'location': self._serialize.url("location", location, 'str'), - 'publisherName': self._serialize.url("publisher_name", publisher_name, 'str'), - 'offer': self._serialize.url("offer", offer, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('[VirtualMachineImageResource]', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - list_skus.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/publishers/{publisherName}/artifacttypes/vmimage/offers/{offer}/skus'} diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/operations/virtual_machine_scale_set_vms_operations.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/operations/virtual_machine_scale_set_vms_operations.py deleted file mode 100644 index 20cc9568827e..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/operations/virtual_machine_scale_set_vms_operations.py +++ /dev/null @@ -1,844 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError -from msrest.polling import LROPoller, NoPolling -from msrestazure.polling.arm_polling import ARMPolling - -from .. import models - - -class VirtualMachineScaleSetVMsOperations(object): - """VirtualMachineScaleSetVMsOperations operations. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: Client Api Version. Constant value: "2015-06-15". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2015-06-15" - - self.config = config - - - def _reimage_initial( - self, resource_group_name, vm_scale_set_name, instance_id, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.reimage.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), - 'instanceId': self._serialize.url("instance_id", instance_id, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('OperationStatusResponse', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def reimage( - self, resource_group_name, vm_scale_set_name, instance_id, custom_headers=None, raw=False, polling=True, **operation_config): - """Reimages (upgrade the operating system) a specific virtual machine in a - VM scale set. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param vm_scale_set_name: The name of the VM scale set. - :type vm_scale_set_name: str - :param instance_id: The instance ID of the virtual machine. - :type instance_id: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns OperationStatusResponse - or ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2015_06_15.models.OperationStatusResponse] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2015_06_15.models.OperationStatusResponse]] - :raises: :class:`CloudError` - """ - raw_result = self._reimage_initial( - resource_group_name=resource_group_name, - vm_scale_set_name=vm_scale_set_name, - instance_id=instance_id, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('OperationStatusResponse', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - reimage.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/virtualmachines/{instanceId}/reimage'} - - - def _deallocate_initial( - self, resource_group_name, vm_scale_set_name, instance_id, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.deallocate.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), - 'instanceId': self._serialize.url("instance_id", instance_id, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('OperationStatusResponse', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def deallocate( - self, resource_group_name, vm_scale_set_name, instance_id, custom_headers=None, raw=False, polling=True, **operation_config): - """Deallocates a specific virtual machine in a VM scale set. Shuts down - the virtual machine and releases the compute resources it uses. You are - not billed for the compute resources of this virtual machine once it is - deallocated. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param vm_scale_set_name: The name of the VM scale set. - :type vm_scale_set_name: str - :param instance_id: The instance ID of the virtual machine. - :type instance_id: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns OperationStatusResponse - or ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2015_06_15.models.OperationStatusResponse] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2015_06_15.models.OperationStatusResponse]] - :raises: :class:`CloudError` - """ - raw_result = self._deallocate_initial( - resource_group_name=resource_group_name, - vm_scale_set_name=vm_scale_set_name, - instance_id=instance_id, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('OperationStatusResponse', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - deallocate.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/virtualmachines/{instanceId}/deallocate'} - - - def _delete_initial( - self, resource_group_name, vm_scale_set_name, instance_id, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.delete.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), - 'instanceId': self._serialize.url("instance_id", instance_id, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202, 204]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('OperationStatusResponse', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def delete( - self, resource_group_name, vm_scale_set_name, instance_id, custom_headers=None, raw=False, polling=True, **operation_config): - """Deletes a virtual machine from a VM scale set. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param vm_scale_set_name: The name of the VM scale set. - :type vm_scale_set_name: str - :param instance_id: The instance ID of the virtual machine. - :type instance_id: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns OperationStatusResponse - or ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2015_06_15.models.OperationStatusResponse] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2015_06_15.models.OperationStatusResponse]] - :raises: :class:`CloudError` - """ - raw_result = self._delete_initial( - resource_group_name=resource_group_name, - vm_scale_set_name=vm_scale_set_name, - instance_id=instance_id, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('OperationStatusResponse', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/virtualmachines/{instanceId}'} - - def get( - self, resource_group_name, vm_scale_set_name, instance_id, custom_headers=None, raw=False, **operation_config): - """Gets a virtual machine from a VM scale set. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param vm_scale_set_name: The name of the VM scale set. - :type vm_scale_set_name: str - :param instance_id: The instance ID of the virtual machine. - :type instance_id: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: VirtualMachineScaleSetVM or ClientRawResponse if raw=true - :rtype: - ~azure.mgmt.compute.v2015_06_15.models.VirtualMachineScaleSetVM or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), - 'instanceId': self._serialize.url("instance_id", instance_id, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('VirtualMachineScaleSetVM', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/virtualmachines/{instanceId}'} - - def get_instance_view( - self, resource_group_name, vm_scale_set_name, instance_id, custom_headers=None, raw=False, **operation_config): - """Gets the status of a virtual machine from a VM scale set. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param vm_scale_set_name: The name of the VM scale set. - :type vm_scale_set_name: str - :param instance_id: The instance ID of the virtual machine. - :type instance_id: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: VirtualMachineScaleSetVMInstanceView or ClientRawResponse if - raw=true - :rtype: - ~azure.mgmt.compute.v2015_06_15.models.VirtualMachineScaleSetVMInstanceView - or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get_instance_view.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), - 'instanceId': self._serialize.url("instance_id", instance_id, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('VirtualMachineScaleSetVMInstanceView', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_instance_view.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/virtualmachines/{instanceId}/instanceView'} - - def list( - self, resource_group_name, virtual_machine_scale_set_name, filter=None, select=None, expand=None, custom_headers=None, raw=False, **operation_config): - """Gets a list of all virtual machines in a VM scale sets. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param virtual_machine_scale_set_name: The name of the VM scale set. - :type virtual_machine_scale_set_name: str - :param filter: The filter to apply to the operation. - :type filter: str - :param select: The list parameters. - :type select: str - :param expand: The expand expression to apply to the operation. - :type expand: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of VirtualMachineScaleSetVM - :rtype: - ~azure.mgmt.compute.v2015_06_15.models.VirtualMachineScaleSetVMPaged[~azure.mgmt.compute.v2015_06_15.models.VirtualMachineScaleSetVM] - :raises: :class:`CloudError` - """ - def internal_paging(next_link=None, raw=False): - - if not next_link: - # Construct URL - url = self.list.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'virtualMachineScaleSetName': self._serialize.url("virtual_machine_scale_set_name", virtual_machine_scale_set_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - if filter is not None: - query_parameters['$filter'] = self._serialize.query("filter", filter, 'str') - if select is not None: - query_parameters['$select'] = self._serialize.query("select", select, 'str') - if expand is not None: - query_parameters['$expand'] = self._serialize.query("expand", expand, 'str') - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - deserialized = models.VirtualMachineScaleSetVMPaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.VirtualMachineScaleSetVMPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{virtualMachineScaleSetName}/virtualMachines'} - - - def _power_off_initial( - self, resource_group_name, vm_scale_set_name, instance_id, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.power_off.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), - 'instanceId': self._serialize.url("instance_id", instance_id, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('OperationStatusResponse', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def power_off( - self, resource_group_name, vm_scale_set_name, instance_id, custom_headers=None, raw=False, polling=True, **operation_config): - """Power off (stop) a virtual machine in a VM scale set. Note that - resources are still attached and you are getting charged for the - resources. Instead, use deallocate to release resources and avoid - charges. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param vm_scale_set_name: The name of the VM scale set. - :type vm_scale_set_name: str - :param instance_id: The instance ID of the virtual machine. - :type instance_id: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns OperationStatusResponse - or ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2015_06_15.models.OperationStatusResponse] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2015_06_15.models.OperationStatusResponse]] - :raises: :class:`CloudError` - """ - raw_result = self._power_off_initial( - resource_group_name=resource_group_name, - vm_scale_set_name=vm_scale_set_name, - instance_id=instance_id, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('OperationStatusResponse', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - power_off.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/virtualmachines/{instanceId}/poweroff'} - - - def _restart_initial( - self, resource_group_name, vm_scale_set_name, instance_id, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.restart.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), - 'instanceId': self._serialize.url("instance_id", instance_id, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('OperationStatusResponse', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def restart( - self, resource_group_name, vm_scale_set_name, instance_id, custom_headers=None, raw=False, polling=True, **operation_config): - """Restarts a virtual machine in a VM scale set. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param vm_scale_set_name: The name of the VM scale set. - :type vm_scale_set_name: str - :param instance_id: The instance ID of the virtual machine. - :type instance_id: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns OperationStatusResponse - or ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2015_06_15.models.OperationStatusResponse] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2015_06_15.models.OperationStatusResponse]] - :raises: :class:`CloudError` - """ - raw_result = self._restart_initial( - resource_group_name=resource_group_name, - vm_scale_set_name=vm_scale_set_name, - instance_id=instance_id, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('OperationStatusResponse', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - restart.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/virtualmachines/{instanceId}/restart'} - - - def _start_initial( - self, resource_group_name, vm_scale_set_name, instance_id, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.start.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), - 'instanceId': self._serialize.url("instance_id", instance_id, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('OperationStatusResponse', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def start( - self, resource_group_name, vm_scale_set_name, instance_id, custom_headers=None, raw=False, polling=True, **operation_config): - """Starts a virtual machine in a VM scale set. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param vm_scale_set_name: The name of the VM scale set. - :type vm_scale_set_name: str - :param instance_id: The instance ID of the virtual machine. - :type instance_id: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns OperationStatusResponse - or ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2015_06_15.models.OperationStatusResponse] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2015_06_15.models.OperationStatusResponse]] - :raises: :class:`CloudError` - """ - raw_result = self._start_initial( - resource_group_name=resource_group_name, - vm_scale_set_name=vm_scale_set_name, - instance_id=instance_id, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('OperationStatusResponse', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - start.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/virtualmachines/{instanceId}/start'} diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/operations/virtual_machine_scale_sets_operations.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/operations/virtual_machine_scale_sets_operations.py deleted file mode 100644 index 3a80260673b6..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/operations/virtual_machine_scale_sets_operations.py +++ /dev/null @@ -1,1312 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError -from msrest.polling import LROPoller, NoPolling -from msrestazure.polling.arm_polling import ARMPolling - -from .. import models - - -class VirtualMachineScaleSetsOperations(object): - """VirtualMachineScaleSetsOperations operations. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: Client Api Version. Constant value: "2015-06-15". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2015-06-15" - - self.config = config - - - def _create_or_update_initial( - self, resource_group_name, name, parameters, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.create_or_update.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'vmScaleSetName': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(parameters, 'VirtualMachineScaleSet') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 201]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('VirtualMachineScaleSet', response) - if response.status_code == 201: - deserialized = self._deserialize('VirtualMachineScaleSet', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def create_or_update( - self, resource_group_name, name, parameters, custom_headers=None, raw=False, polling=True, **operation_config): - """Create or update a VM scale set. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param name: The name of the VM scale set to create or update. - :type name: str - :param parameters: The scale set object. - :type parameters: - ~azure.mgmt.compute.v2015_06_15.models.VirtualMachineScaleSet - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns VirtualMachineScaleSet - or ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2015_06_15.models.VirtualMachineScaleSet] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2015_06_15.models.VirtualMachineScaleSet]] - :raises: :class:`CloudError` - """ - raw_result = self._create_or_update_initial( - resource_group_name=resource_group_name, - name=name, - parameters=parameters, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('VirtualMachineScaleSet', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}'} - - - def _delete_initial( - self, resource_group_name, vm_scale_set_name, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.delete.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202, 204]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('OperationStatusResponse', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def delete( - self, resource_group_name, vm_scale_set_name, custom_headers=None, raw=False, polling=True, **operation_config): - """Deletes a VM scale set. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param vm_scale_set_name: The name of the VM scale set. - :type vm_scale_set_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns OperationStatusResponse - or ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2015_06_15.models.OperationStatusResponse] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2015_06_15.models.OperationStatusResponse]] - :raises: :class:`CloudError` - """ - raw_result = self._delete_initial( - resource_group_name=resource_group_name, - vm_scale_set_name=vm_scale_set_name, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('OperationStatusResponse', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}'} - - def get( - self, resource_group_name, vm_scale_set_name, custom_headers=None, raw=False, **operation_config): - """Display information about a virtual machine scale set. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param vm_scale_set_name: The name of the VM scale set. - :type vm_scale_set_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: VirtualMachineScaleSet or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.compute.v2015_06_15.models.VirtualMachineScaleSet - or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('VirtualMachineScaleSet', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}'} - - - def _deallocate_initial( - self, resource_group_name, vm_scale_set_name, instance_ids=None, custom_headers=None, raw=False, **operation_config): - vm_instance_ids = None - if instance_ids is not None: - vm_instance_ids = models.VirtualMachineScaleSetVMInstanceIDs(instance_ids=instance_ids) - - # Construct URL - url = self.deallocate.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - if vm_instance_ids is not None: - body_content = self._serialize.body(vm_instance_ids, 'VirtualMachineScaleSetVMInstanceIDs') - else: - body_content = None - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('OperationStatusResponse', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def deallocate( - self, resource_group_name, vm_scale_set_name, instance_ids=None, custom_headers=None, raw=False, polling=True, **operation_config): - """Deallocates specific virtual machines in a VM scale set. Shuts down the - virtual machines and releases the compute resources. You are not billed - for the compute resources that this virtual machine scale set - deallocates. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param vm_scale_set_name: The name of the VM scale set. - :type vm_scale_set_name: str - :param instance_ids: The virtual machine scale set instance ids. - Omitting the virtual machine scale set instance ids will result in the - operation being performed on all virtual machines in the virtual - machine scale set. - :type instance_ids: list[str] - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns OperationStatusResponse - or ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2015_06_15.models.OperationStatusResponse] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2015_06_15.models.OperationStatusResponse]] - :raises: :class:`CloudError` - """ - raw_result = self._deallocate_initial( - resource_group_name=resource_group_name, - vm_scale_set_name=vm_scale_set_name, - instance_ids=instance_ids, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('OperationStatusResponse', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - deallocate.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/deallocate'} - - - def _delete_instances_initial( - self, resource_group_name, vm_scale_set_name, instance_ids, custom_headers=None, raw=False, **operation_config): - vm_instance_ids = models.VirtualMachineScaleSetVMInstanceRequiredIDs(instance_ids=instance_ids) - - # Construct URL - url = self.delete_instances.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(vm_instance_ids, 'VirtualMachineScaleSetVMInstanceRequiredIDs') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('OperationStatusResponse', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def delete_instances( - self, resource_group_name, vm_scale_set_name, instance_ids, custom_headers=None, raw=False, polling=True, **operation_config): - """Deletes virtual machines in a VM scale set. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param vm_scale_set_name: The name of the VM scale set. - :type vm_scale_set_name: str - :param instance_ids: The virtual machine scale set instance ids. - :type instance_ids: list[str] - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns OperationStatusResponse - or ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2015_06_15.models.OperationStatusResponse] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2015_06_15.models.OperationStatusResponse]] - :raises: :class:`CloudError` - """ - raw_result = self._delete_instances_initial( - resource_group_name=resource_group_name, - vm_scale_set_name=vm_scale_set_name, - instance_ids=instance_ids, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('OperationStatusResponse', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - delete_instances.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/delete'} - - def get_instance_view( - self, resource_group_name, vm_scale_set_name, custom_headers=None, raw=False, **operation_config): - """Gets the status of a VM scale set instance. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param vm_scale_set_name: The name of the VM scale set. - :type vm_scale_set_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: VirtualMachineScaleSetInstanceView or ClientRawResponse if - raw=true - :rtype: - ~azure.mgmt.compute.v2015_06_15.models.VirtualMachineScaleSetInstanceView - or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get_instance_view.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('VirtualMachineScaleSetInstanceView', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_instance_view.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/instanceView'} - - def list( - self, resource_group_name, custom_headers=None, raw=False, **operation_config): - """Gets a list of all VM scale sets under a resource group. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of VirtualMachineScaleSet - :rtype: - ~azure.mgmt.compute.v2015_06_15.models.VirtualMachineScaleSetPaged[~azure.mgmt.compute.v2015_06_15.models.VirtualMachineScaleSet] - :raises: :class:`CloudError` - """ - def internal_paging(next_link=None, raw=False): - - if not next_link: - # Construct URL - url = self.list.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - deserialized = models.VirtualMachineScaleSetPaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.VirtualMachineScaleSetPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets'} - - def list_all( - self, custom_headers=None, raw=False, **operation_config): - """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. - - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of VirtualMachineScaleSet - :rtype: - ~azure.mgmt.compute.v2015_06_15.models.VirtualMachineScaleSetPaged[~azure.mgmt.compute.v2015_06_15.models.VirtualMachineScaleSet] - :raises: :class:`CloudError` - """ - def internal_paging(next_link=None, raw=False): - - if not next_link: - # Construct URL - url = self.list_all.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - deserialized = models.VirtualMachineScaleSetPaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.VirtualMachineScaleSetPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - list_all.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Compute/virtualMachineScaleSets'} - - def list_skus( - self, resource_group_name, vm_scale_set_name, custom_headers=None, raw=False, **operation_config): - """Gets a list of SKUs available for your VM scale set, including the - minimum and maximum VM instances allowed for each SKU. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param vm_scale_set_name: The name of the VM scale set. - :type vm_scale_set_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of VirtualMachineScaleSetSku - :rtype: - ~azure.mgmt.compute.v2015_06_15.models.VirtualMachineScaleSetSkuPaged[~azure.mgmt.compute.v2015_06_15.models.VirtualMachineScaleSetSku] - :raises: :class:`CloudError` - """ - def internal_paging(next_link=None, raw=False): - - if not next_link: - # Construct URL - url = self.list_skus.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - deserialized = models.VirtualMachineScaleSetSkuPaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.VirtualMachineScaleSetSkuPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - list_skus.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/skus'} - - - def _power_off_initial( - self, resource_group_name, vm_scale_set_name, instance_ids=None, custom_headers=None, raw=False, **operation_config): - vm_instance_ids = None - if instance_ids is not None: - vm_instance_ids = models.VirtualMachineScaleSetVMInstanceIDs(instance_ids=instance_ids) - - # Construct URL - url = self.power_off.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - if vm_instance_ids is not None: - body_content = self._serialize.body(vm_instance_ids, 'VirtualMachineScaleSetVMInstanceIDs') - else: - body_content = None - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('OperationStatusResponse', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def power_off( - self, resource_group_name, vm_scale_set_name, instance_ids=None, custom_headers=None, raw=False, polling=True, **operation_config): - """Power off (stop) one or more virtual machines in a VM scale set. Note - that resources are still attached and you are getting charged for the - resources. Instead, use deallocate to release resources and avoid - charges. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param vm_scale_set_name: The name of the VM scale set. - :type vm_scale_set_name: str - :param instance_ids: The virtual machine scale set instance ids. - Omitting the virtual machine scale set instance ids will result in the - operation being performed on all virtual machines in the virtual - machine scale set. - :type instance_ids: list[str] - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns OperationStatusResponse - or ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2015_06_15.models.OperationStatusResponse] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2015_06_15.models.OperationStatusResponse]] - :raises: :class:`CloudError` - """ - raw_result = self._power_off_initial( - resource_group_name=resource_group_name, - vm_scale_set_name=vm_scale_set_name, - instance_ids=instance_ids, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('OperationStatusResponse', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - power_off.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/poweroff'} - - - def _restart_initial( - self, resource_group_name, vm_scale_set_name, instance_ids=None, custom_headers=None, raw=False, **operation_config): - vm_instance_ids = None - if instance_ids is not None: - vm_instance_ids = models.VirtualMachineScaleSetVMInstanceIDs(instance_ids=instance_ids) - - # Construct URL - url = self.restart.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - if vm_instance_ids is not None: - body_content = self._serialize.body(vm_instance_ids, 'VirtualMachineScaleSetVMInstanceIDs') - else: - body_content = None - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('OperationStatusResponse', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def restart( - self, resource_group_name, vm_scale_set_name, instance_ids=None, custom_headers=None, raw=False, polling=True, **operation_config): - """Restarts one or more virtual machines in a VM scale set. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param vm_scale_set_name: The name of the VM scale set. - :type vm_scale_set_name: str - :param instance_ids: The virtual machine scale set instance ids. - Omitting the virtual machine scale set instance ids will result in the - operation being performed on all virtual machines in the virtual - machine scale set. - :type instance_ids: list[str] - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns OperationStatusResponse - or ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2015_06_15.models.OperationStatusResponse] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2015_06_15.models.OperationStatusResponse]] - :raises: :class:`CloudError` - """ - raw_result = self._restart_initial( - resource_group_name=resource_group_name, - vm_scale_set_name=vm_scale_set_name, - instance_ids=instance_ids, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('OperationStatusResponse', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - restart.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/restart'} - - - def _start_initial( - self, resource_group_name, vm_scale_set_name, instance_ids=None, custom_headers=None, raw=False, **operation_config): - vm_instance_ids = None - if instance_ids is not None: - vm_instance_ids = models.VirtualMachineScaleSetVMInstanceIDs(instance_ids=instance_ids) - - # Construct URL - url = self.start.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - if vm_instance_ids is not None: - body_content = self._serialize.body(vm_instance_ids, 'VirtualMachineScaleSetVMInstanceIDs') - else: - body_content = None - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('OperationStatusResponse', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def start( - self, resource_group_name, vm_scale_set_name, instance_ids=None, custom_headers=None, raw=False, polling=True, **operation_config): - """Starts one or more virtual machines in a VM scale set. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param vm_scale_set_name: The name of the VM scale set. - :type vm_scale_set_name: str - :param instance_ids: The virtual machine scale set instance ids. - Omitting the virtual machine scale set instance ids will result in the - operation being performed on all virtual machines in the virtual - machine scale set. - :type instance_ids: list[str] - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns OperationStatusResponse - or ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2015_06_15.models.OperationStatusResponse] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2015_06_15.models.OperationStatusResponse]] - :raises: :class:`CloudError` - """ - raw_result = self._start_initial( - resource_group_name=resource_group_name, - vm_scale_set_name=vm_scale_set_name, - instance_ids=instance_ids, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('OperationStatusResponse', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - start.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/start'} - - - def _update_instances_initial( - self, resource_group_name, vm_scale_set_name, instance_ids, custom_headers=None, raw=False, **operation_config): - vm_instance_ids = models.VirtualMachineScaleSetVMInstanceRequiredIDs(instance_ids=instance_ids) - - # Construct URL - url = self.update_instances.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(vm_instance_ids, 'VirtualMachineScaleSetVMInstanceRequiredIDs') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('OperationStatusResponse', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def update_instances( - self, resource_group_name, vm_scale_set_name, instance_ids, custom_headers=None, raw=False, polling=True, **operation_config): - """Upgrades one or more virtual machines to the latest SKU set in the VM - scale set model. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param vm_scale_set_name: The name of the VM scale set. - :type vm_scale_set_name: str - :param instance_ids: The virtual machine scale set instance ids. - :type instance_ids: list[str] - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns OperationStatusResponse - or ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2015_06_15.models.OperationStatusResponse] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2015_06_15.models.OperationStatusResponse]] - :raises: :class:`CloudError` - """ - raw_result = self._update_instances_initial( - resource_group_name=resource_group_name, - vm_scale_set_name=vm_scale_set_name, - instance_ids=instance_ids, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('OperationStatusResponse', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - update_instances.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/manualupgrade'} - - - def _reimage_initial( - self, resource_group_name, vm_scale_set_name, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.reimage.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('OperationStatusResponse', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def reimage( - self, resource_group_name, vm_scale_set_name, custom_headers=None, raw=False, polling=True, **operation_config): - """Reimages (upgrade the operating system) one or more virtual machines in - a VM scale set. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param vm_scale_set_name: The name of the VM scale set. - :type vm_scale_set_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns OperationStatusResponse - or ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2015_06_15.models.OperationStatusResponse] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2015_06_15.models.OperationStatusResponse]] - :raises: :class:`CloudError` - """ - raw_result = self._reimage_initial( - resource_group_name=resource_group_name, - vm_scale_set_name=vm_scale_set_name, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('OperationStatusResponse', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - reimage.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/reimage'} diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/operations/virtual_machine_sizes_operations.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/operations/virtual_machine_sizes_operations.py deleted file mode 100644 index db3f18f0dad9..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/operations/virtual_machine_sizes_operations.py +++ /dev/null @@ -1,107 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError - -from .. import models - - -class VirtualMachineSizesOperations(object): - """VirtualMachineSizesOperations operations. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: Client Api Version. Constant value: "2015-06-15". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2015-06-15" - - self.config = config - - def list( - self, location, custom_headers=None, raw=False, **operation_config): - """Lists all available virtual machine sizes for a subscription in a - location. - - :param location: The location upon which virtual-machine-sizes is - queried. - :type location: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of VirtualMachineSize - :rtype: - ~azure.mgmt.compute.v2015_06_15.models.VirtualMachineSizePaged[~azure.mgmt.compute.v2015_06_15.models.VirtualMachineSize] - :raises: :class:`CloudError` - """ - def internal_paging(next_link=None, raw=False): - - if not next_link: - # Construct URL - url = self.list.metadata['url'] - path_format_arguments = { - 'location': self._serialize.url("location", location, 'str', pattern=r'^[-\w\._]+$'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - deserialized = models.VirtualMachineSizePaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.VirtualMachineSizePaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/vmSizes'} diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/operations/virtual_machines_operations.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/operations/virtual_machines_operations.py deleted file mode 100644 index 45142531df96..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/operations/virtual_machines_operations.py +++ /dev/null @@ -1,1147 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError -from msrest.polling import LROPoller, NoPolling -from msrestazure.polling.arm_polling import ARMPolling - -from .. import models - - -class VirtualMachinesOperations(object): - """VirtualMachinesOperations operations. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: Client Api Version. Constant value: "2015-06-15". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2015-06-15" - - self.config = config - - - def _capture_initial( - self, resource_group_name, vm_name, parameters, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.capture.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'vmName': self._serialize.url("vm_name", vm_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(parameters, 'VirtualMachineCaptureParameters') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('VirtualMachineCaptureResult', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def capture( - self, resource_group_name, vm_name, parameters, custom_headers=None, raw=False, polling=True, **operation_config): - """Captures the VM by copying virtual hard disks of the VM and outputs a - template that can be used to create similar VMs. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param vm_name: The name of the virtual machine. - :type vm_name: str - :param parameters: Parameters supplied to the Capture Virtual Machine - operation. - :type parameters: - ~azure.mgmt.compute.v2015_06_15.models.VirtualMachineCaptureParameters - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns - VirtualMachineCaptureResult or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2015_06_15.models.VirtualMachineCaptureResult] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2015_06_15.models.VirtualMachineCaptureResult]] - :raises: :class:`CloudError` - """ - raw_result = self._capture_initial( - resource_group_name=resource_group_name, - vm_name=vm_name, - parameters=parameters, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('VirtualMachineCaptureResult', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - capture.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/capture'} - - - def _create_or_update_initial( - self, resource_group_name, vm_name, parameters, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.create_or_update.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'vmName': self._serialize.url("vm_name", vm_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(parameters, 'VirtualMachine') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 201]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('VirtualMachine', response) - if response.status_code == 201: - deserialized = self._deserialize('VirtualMachine', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def create_or_update( - self, resource_group_name, vm_name, parameters, custom_headers=None, raw=False, polling=True, **operation_config): - """The operation to create or update a virtual machine. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param vm_name: The name of the virtual machine. - :type vm_name: str - :param parameters: Parameters supplied to the Create Virtual Machine - operation. - :type parameters: - ~azure.mgmt.compute.v2015_06_15.models.VirtualMachine - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns VirtualMachine or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2015_06_15.models.VirtualMachine] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2015_06_15.models.VirtualMachine]] - :raises: :class:`CloudError` - """ - raw_result = self._create_or_update_initial( - resource_group_name=resource_group_name, - vm_name=vm_name, - parameters=parameters, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('VirtualMachine', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}'} - - - def _delete_initial( - self, resource_group_name, vm_name, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.delete.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'vmName': self._serialize.url("vm_name", vm_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202, 204]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('OperationStatusResponse', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def delete( - self, resource_group_name, vm_name, custom_headers=None, raw=False, polling=True, **operation_config): - """The operation to delete a virtual machine. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param vm_name: The name of the virtual machine. - :type vm_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns OperationStatusResponse - or ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2015_06_15.models.OperationStatusResponse] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2015_06_15.models.OperationStatusResponse]] - :raises: :class:`CloudError` - """ - raw_result = self._delete_initial( - resource_group_name=resource_group_name, - vm_name=vm_name, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('OperationStatusResponse', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}'} - - def get( - self, resource_group_name, vm_name, expand=None, custom_headers=None, raw=False, **operation_config): - """Retrieves information about the model view or the instance view of a - virtual machine. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param vm_name: The name of the virtual machine. - :type vm_name: str - :param expand: The expand expression to apply on the operation. - Possible values include: 'instanceView' - :type expand: str or - ~azure.mgmt.compute.v2015_06_15.models.InstanceViewTypes - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: VirtualMachine or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.compute.v2015_06_15.models.VirtualMachine or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'vmName': self._serialize.url("vm_name", vm_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - if expand is not None: - query_parameters['$expand'] = self._serialize.query("expand", expand, 'InstanceViewTypes') - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('VirtualMachine', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}'} - - - def _deallocate_initial( - self, resource_group_name, vm_name, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.deallocate.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'vmName': self._serialize.url("vm_name", vm_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('OperationStatusResponse', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def deallocate( - self, resource_group_name, vm_name, custom_headers=None, raw=False, polling=True, **operation_config): - """Shuts down the virtual machine and releases the compute resources. You - are not billed for the compute resources that this virtual machine - uses. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param vm_name: The name of the virtual machine. - :type vm_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns OperationStatusResponse - or ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2015_06_15.models.OperationStatusResponse] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2015_06_15.models.OperationStatusResponse]] - :raises: :class:`CloudError` - """ - raw_result = self._deallocate_initial( - resource_group_name=resource_group_name, - vm_name=vm_name, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('OperationStatusResponse', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - deallocate.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/deallocate'} - - def generalize( - self, resource_group_name, vm_name, custom_headers=None, raw=False, **operation_config): - """Sets the state of the virtual machine to generalized. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param vm_name: The name of the virtual machine. - :type vm_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: OperationStatusResponse or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.compute.v2015_06_15.models.OperationStatusResponse - or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.generalize.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'vmName': self._serialize.url("vm_name", vm_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('OperationStatusResponse', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - generalize.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/generalize'} - - def list( - self, resource_group_name, custom_headers=None, raw=False, **operation_config): - """Lists all of the virtual machines in the specified resource group. Use - the nextLink property in the response to get the next page of virtual - machines. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of VirtualMachine - :rtype: - ~azure.mgmt.compute.v2015_06_15.models.VirtualMachinePaged[~azure.mgmt.compute.v2015_06_15.models.VirtualMachine] - :raises: :class:`CloudError` - """ - def internal_paging(next_link=None, raw=False): - - if not next_link: - # Construct URL - url = self.list.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - deserialized = models.VirtualMachinePaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.VirtualMachinePaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines'} - - def list_all( - self, custom_headers=None, raw=False, **operation_config): - """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. - - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of VirtualMachine - :rtype: - ~azure.mgmt.compute.v2015_06_15.models.VirtualMachinePaged[~azure.mgmt.compute.v2015_06_15.models.VirtualMachine] - :raises: :class:`CloudError` - """ - def internal_paging(next_link=None, raw=False): - - if not next_link: - # Construct URL - url = self.list_all.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - deserialized = models.VirtualMachinePaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.VirtualMachinePaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - list_all.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Compute/virtualMachines'} - - def list_available_sizes( - self, resource_group_name, vm_name, custom_headers=None, raw=False, **operation_config): - """Lists all available virtual machine sizes to which the specified - virtual machine can be resized. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param vm_name: The name of the virtual machine. - :type vm_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of VirtualMachineSize - :rtype: - ~azure.mgmt.compute.v2015_06_15.models.VirtualMachineSizePaged[~azure.mgmt.compute.v2015_06_15.models.VirtualMachineSize] - :raises: :class:`CloudError` - """ - def internal_paging(next_link=None, raw=False): - - if not next_link: - # Construct URL - url = self.list_available_sizes.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'vmName': self._serialize.url("vm_name", vm_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - deserialized = models.VirtualMachineSizePaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.VirtualMachineSizePaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - list_available_sizes.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/vmSizes'} - - - def _power_off_initial( - self, resource_group_name, vm_name, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.power_off.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'vmName': self._serialize.url("vm_name", vm_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('OperationStatusResponse', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def power_off( - self, resource_group_name, vm_name, custom_headers=None, raw=False, polling=True, **operation_config): - """The operation to power off (stop) a virtual machine. The virtual - machine can be restarted with the same provisioned resources. You are - still charged for this virtual machine. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param vm_name: The name of the virtual machine. - :type vm_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns OperationStatusResponse - or ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2015_06_15.models.OperationStatusResponse] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2015_06_15.models.OperationStatusResponse]] - :raises: :class:`CloudError` - """ - raw_result = self._power_off_initial( - resource_group_name=resource_group_name, - vm_name=vm_name, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('OperationStatusResponse', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - power_off.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/powerOff'} - - - def _restart_initial( - self, resource_group_name, vm_name, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.restart.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'vmName': self._serialize.url("vm_name", vm_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('OperationStatusResponse', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def restart( - self, resource_group_name, vm_name, custom_headers=None, raw=False, polling=True, **operation_config): - """The operation to restart a virtual machine. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param vm_name: The name of the virtual machine. - :type vm_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns OperationStatusResponse - or ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2015_06_15.models.OperationStatusResponse] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2015_06_15.models.OperationStatusResponse]] - :raises: :class:`CloudError` - """ - raw_result = self._restart_initial( - resource_group_name=resource_group_name, - vm_name=vm_name, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('OperationStatusResponse', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - restart.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/restart'} - - - def _start_initial( - self, resource_group_name, vm_name, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.start.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'vmName': self._serialize.url("vm_name", vm_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('OperationStatusResponse', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def start( - self, resource_group_name, vm_name, custom_headers=None, raw=False, polling=True, **operation_config): - """The operation to start a virtual machine. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param vm_name: The name of the virtual machine. - :type vm_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns OperationStatusResponse - or ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2015_06_15.models.OperationStatusResponse] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2015_06_15.models.OperationStatusResponse]] - :raises: :class:`CloudError` - """ - raw_result = self._start_initial( - resource_group_name=resource_group_name, - vm_name=vm_name, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('OperationStatusResponse', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - start.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/start'} - - - def _redeploy_initial( - self, resource_group_name, vm_name, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.redeploy.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'vmName': self._serialize.url("vm_name", vm_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('OperationStatusResponse', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def redeploy( - self, resource_group_name, vm_name, custom_headers=None, raw=False, polling=True, **operation_config): - """The operation to redeploy a virtual machine. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param vm_name: The name of the virtual machine. - :type vm_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns OperationStatusResponse - or ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2015_06_15.models.OperationStatusResponse] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2015_06_15.models.OperationStatusResponse]] - :raises: :class:`CloudError` - """ - raw_result = self._redeploy_initial( - resource_group_name=resource_group_name, - vm_name=vm_name, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('OperationStatusResponse', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - redeploy.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/redeploy'} diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/__init__.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/__init__.py index 88ded2f640de..a7bc1ce68e37 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/__init__.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/__init__.py @@ -9,10 +9,11 @@ # regenerated. # -------------------------------------------------------------------------- -from .compute_management_client import ComputeManagementClient -from .version import VERSION +from ._configuration import ComputeManagementClientConfiguration +from ._compute_management_client import ComputeManagementClient +__all__ = ['ComputeManagementClient', 'ComputeManagementClientConfiguration'] -__all__ = ['ComputeManagementClient'] +from .version import VERSION __version__ = VERSION diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/_compute_management_client.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/_compute_management_client.py new file mode 100644 index 000000000000..a1b28a7ee415 --- /dev/null +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/_compute_management_client.py @@ -0,0 +1,91 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.service_client import SDKClient +from msrest import Serializer, Deserializer + +from ._configuration import ComputeManagementClientConfiguration +from .operations import AvailabilitySetsOperations +from .operations import VirtualMachineExtensionImagesOperations +from .operations import VirtualMachineExtensionsOperations +from .operations import VirtualMachinesOperations +from .operations import VirtualMachineImagesOperations +from .operations import UsageOperations +from .operations import VirtualMachineSizesOperations +from .operations import VirtualMachineScaleSetsOperations +from .operations import VirtualMachineScaleSetVMsOperations +from . import models + + +class ComputeManagementClient(SDKClient): + """Compute Client + + :ivar config: Configuration for client. + :vartype config: ComputeManagementClientConfiguration + + :ivar availability_sets: AvailabilitySets operations + :vartype availability_sets: azure.mgmt.compute.v2016_03_30.operations.AvailabilitySetsOperations + :ivar virtual_machine_extension_images: VirtualMachineExtensionImages operations + :vartype virtual_machine_extension_images: azure.mgmt.compute.v2016_03_30.operations.VirtualMachineExtensionImagesOperations + :ivar virtual_machine_extensions: VirtualMachineExtensions operations + :vartype virtual_machine_extensions: azure.mgmt.compute.v2016_03_30.operations.VirtualMachineExtensionsOperations + :ivar virtual_machines: VirtualMachines operations + :vartype virtual_machines: azure.mgmt.compute.v2016_03_30.operations.VirtualMachinesOperations + :ivar virtual_machine_images: VirtualMachineImages operations + :vartype virtual_machine_images: azure.mgmt.compute.v2016_03_30.operations.VirtualMachineImagesOperations + :ivar usage: Usage operations + :vartype usage: azure.mgmt.compute.v2016_03_30.operations.UsageOperations + :ivar virtual_machine_sizes: VirtualMachineSizes operations + :vartype virtual_machine_sizes: azure.mgmt.compute.v2016_03_30.operations.VirtualMachineSizesOperations + :ivar virtual_machine_scale_sets: VirtualMachineScaleSets operations + :vartype virtual_machine_scale_sets: azure.mgmt.compute.v2016_03_30.operations.VirtualMachineScaleSetsOperations + :ivar virtual_machine_scale_set_vms: VirtualMachineScaleSetVMs operations + :vartype virtual_machine_scale_set_vms: azure.mgmt.compute.v2016_03_30.operations.VirtualMachineScaleSetVMsOperations + + :param credentials: Credentials needed for the client to connect to Azure. + :type credentials: :mod:`A msrestazure Credentials + object` + :param subscription_id: Subscription credentials which uniquely identify + Microsoft Azure subscription. The subscription ID forms part of the URI + for every service call. + :type subscription_id: str + :param str base_url: Service URL + """ + + def __init__( + self, credentials, subscription_id, base_url=None): + + self.config = ComputeManagementClientConfiguration(credentials, subscription_id, base_url) + super(ComputeManagementClient, self).__init__(self.config.credentials, self.config) + + client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} + self.api_version = '2016-03-30' + self._serialize = Serializer(client_models) + self._deserialize = Deserializer(client_models) + + self.availability_sets = AvailabilitySetsOperations( + self._client, self.config, self._serialize, self._deserialize) + self.virtual_machine_extension_images = VirtualMachineExtensionImagesOperations( + self._client, self.config, self._serialize, self._deserialize) + self.virtual_machine_extensions = VirtualMachineExtensionsOperations( + self._client, self.config, self._serialize, self._deserialize) + self.virtual_machines = VirtualMachinesOperations( + self._client, self.config, self._serialize, self._deserialize) + self.virtual_machine_images = VirtualMachineImagesOperations( + self._client, self.config, self._serialize, self._deserialize) + self.usage = UsageOperations( + self._client, self.config, self._serialize, self._deserialize) + self.virtual_machine_sizes = VirtualMachineSizesOperations( + self._client, self.config, self._serialize, self._deserialize) + self.virtual_machine_scale_sets = VirtualMachineScaleSetsOperations( + self._client, self.config, self._serialize, self._deserialize) + self.virtual_machine_scale_set_vms = VirtualMachineScaleSetVMsOperations( + self._client, self.config, self._serialize, self._deserialize) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/_configuration.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/_configuration.py new file mode 100644 index 000000000000..0fcf5984e2ca --- /dev/null +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/_configuration.py @@ -0,0 +1,50 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- +from msrestazure import AzureConfiguration + +from .version import VERSION + + +class ComputeManagementClientConfiguration(AzureConfiguration): + """Configuration for ComputeManagementClient + Note that all parameters used to create this instance are saved as instance + attributes. + + :param credentials: Credentials needed for the client to connect to Azure. + :type credentials: :mod:`A msrestazure Credentials + object` + :param subscription_id: Subscription credentials which uniquely identify + Microsoft Azure subscription. The subscription ID forms part of the URI + for every service call. + :type subscription_id: str + :param str base_url: Service URL + """ + + def __init__( + self, credentials, subscription_id, base_url=None): + + if credentials is None: + raise ValueError("Parameter 'credentials' must not be None.") + if subscription_id is None: + raise ValueError("Parameter 'subscription_id' must not be None.") + if not base_url: + base_url = 'https://management.azure.com' + + super(ComputeManagementClientConfiguration, self).__init__(base_url) + + # Starting Autorest.Python 4.0.64, make connection pool activated by default + self.keep_alive = True + + self.add_user_agent('azure-mgmt-compute/{}'.format(VERSION)) + self.add_user_agent('Azure-SDK-For-Python') + + self.credentials = credentials + self.subscription_id = subscription_id diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/compute_management_client.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/compute_management_client.py deleted file mode 100644 index 403c3f4449d9..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/compute_management_client.py +++ /dev/null @@ -1,125 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.service_client import SDKClient -from msrest import Serializer, Deserializer -from msrestazure import AzureConfiguration -from .version import VERSION -from .operations.availability_sets_operations import AvailabilitySetsOperations -from .operations.virtual_machine_extension_images_operations import VirtualMachineExtensionImagesOperations -from .operations.virtual_machine_extensions_operations import VirtualMachineExtensionsOperations -from .operations.virtual_machines_operations import VirtualMachinesOperations -from .operations.virtual_machine_images_operations import VirtualMachineImagesOperations -from .operations.usage_operations import UsageOperations -from .operations.virtual_machine_sizes_operations import VirtualMachineSizesOperations -from .operations.virtual_machine_scale_sets_operations import VirtualMachineScaleSetsOperations -from .operations.virtual_machine_scale_set_vms_operations import VirtualMachineScaleSetVMsOperations -from . import models - - -class ComputeManagementClientConfiguration(AzureConfiguration): - """Configuration for ComputeManagementClient - Note that all parameters used to create this instance are saved as instance - attributes. - - :param credentials: Credentials needed for the client to connect to Azure. - :type credentials: :mod:`A msrestazure Credentials - object` - :param subscription_id: Subscription credentials which uniquely identify - Microsoft Azure subscription. The subscription ID forms part of the URI - for every service call. - :type subscription_id: str - :param str base_url: Service URL - """ - - def __init__( - self, credentials, subscription_id, base_url=None): - - if credentials is None: - raise ValueError("Parameter 'credentials' must not be None.") - if subscription_id is None: - raise ValueError("Parameter 'subscription_id' must not be None.") - if not base_url: - base_url = 'https://management.azure.com' - - super(ComputeManagementClientConfiguration, self).__init__(base_url) - - self.add_user_agent('azure-mgmt-compute/{}'.format(VERSION)) - self.add_user_agent('Azure-SDK-For-Python') - - self.credentials = credentials - self.subscription_id = subscription_id - - -class ComputeManagementClient(SDKClient): - """Compute Client - - :ivar config: Configuration for client. - :vartype config: ComputeManagementClientConfiguration - - :ivar availability_sets: AvailabilitySets operations - :vartype availability_sets: azure.mgmt.compute.v2016_03_30.operations.AvailabilitySetsOperations - :ivar virtual_machine_extension_images: VirtualMachineExtensionImages operations - :vartype virtual_machine_extension_images: azure.mgmt.compute.v2016_03_30.operations.VirtualMachineExtensionImagesOperations - :ivar virtual_machine_extensions: VirtualMachineExtensions operations - :vartype virtual_machine_extensions: azure.mgmt.compute.v2016_03_30.operations.VirtualMachineExtensionsOperations - :ivar virtual_machines: VirtualMachines operations - :vartype virtual_machines: azure.mgmt.compute.v2016_03_30.operations.VirtualMachinesOperations - :ivar virtual_machine_images: VirtualMachineImages operations - :vartype virtual_machine_images: azure.mgmt.compute.v2016_03_30.operations.VirtualMachineImagesOperations - :ivar usage: Usage operations - :vartype usage: azure.mgmt.compute.v2016_03_30.operations.UsageOperations - :ivar virtual_machine_sizes: VirtualMachineSizes operations - :vartype virtual_machine_sizes: azure.mgmt.compute.v2016_03_30.operations.VirtualMachineSizesOperations - :ivar virtual_machine_scale_sets: VirtualMachineScaleSets operations - :vartype virtual_machine_scale_sets: azure.mgmt.compute.v2016_03_30.operations.VirtualMachineScaleSetsOperations - :ivar virtual_machine_scale_set_vms: VirtualMachineScaleSetVMs operations - :vartype virtual_machine_scale_set_vms: azure.mgmt.compute.v2016_03_30.operations.VirtualMachineScaleSetVMsOperations - - :param credentials: Credentials needed for the client to connect to Azure. - :type credentials: :mod:`A msrestazure Credentials - object` - :param subscription_id: Subscription credentials which uniquely identify - Microsoft Azure subscription. The subscription ID forms part of the URI - for every service call. - :type subscription_id: str - :param str base_url: Service URL - """ - - def __init__( - self, credentials, subscription_id, base_url=None): - - self.config = ComputeManagementClientConfiguration(credentials, subscription_id, base_url) - super(ComputeManagementClient, self).__init__(self.config.credentials, self.config) - - client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} - self.api_version = '2016-03-30' - self._serialize = Serializer(client_models) - self._deserialize = Deserializer(client_models) - - self.availability_sets = AvailabilitySetsOperations( - self._client, self.config, self._serialize, self._deserialize) - self.virtual_machine_extension_images = VirtualMachineExtensionImagesOperations( - self._client, self.config, self._serialize, self._deserialize) - self.virtual_machine_extensions = VirtualMachineExtensionsOperations( - self._client, self.config, self._serialize, self._deserialize) - self.virtual_machines = VirtualMachinesOperations( - self._client, self.config, self._serialize, self._deserialize) - self.virtual_machine_images = VirtualMachineImagesOperations( - self._client, self.config, self._serialize, self._deserialize) - self.usage = UsageOperations( - self._client, self.config, self._serialize, self._deserialize) - self.virtual_machine_sizes = VirtualMachineSizesOperations( - self._client, self.config, self._serialize, self._deserialize) - self.virtual_machine_scale_sets = VirtualMachineScaleSetsOperations( - self._client, self.config, self._serialize, self._deserialize) - self.virtual_machine_scale_set_vms = VirtualMachineScaleSetVMsOperations( - self._client, self.config, self._serialize, self._deserialize) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/__init__.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/__init__.py index 9b3919d10096..6908eec62a9e 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/__init__.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/__init__.py @@ -10,175 +10,175 @@ # -------------------------------------------------------------------------- try: - from .instance_view_status_py3 import InstanceViewStatus - from .sub_resource_py3 import SubResource - from .availability_set_py3 import AvailabilitySet - from .virtual_machine_size_py3 import VirtualMachineSize - from .virtual_machine_extension_image_py3 import VirtualMachineExtensionImage - from .virtual_machine_image_resource_py3 import VirtualMachineImageResource - from .virtual_machine_extension_instance_view_py3 import VirtualMachineExtensionInstanceView - from .virtual_machine_extension_py3 import VirtualMachineExtension - from .virtual_machine_extension_update_py3 import VirtualMachineExtensionUpdate - from .virtual_machine_extensions_list_result_py3 import VirtualMachineExtensionsListResult - from .purchase_plan_py3 import PurchasePlan - from .os_disk_image_py3 import OSDiskImage - from .data_disk_image_py3 import DataDiskImage - from .virtual_machine_image_py3 import VirtualMachineImage - from .usage_name_py3 import UsageName - from .usage_py3 import Usage - from .virtual_machine_capture_parameters_py3 import VirtualMachineCaptureParameters - from .virtual_machine_capture_result_py3 import VirtualMachineCaptureResult - from .plan_py3 import Plan - from .hardware_profile_py3 import HardwareProfile - from .image_reference_py3 import ImageReference - from .key_vault_secret_reference_py3 import KeyVaultSecretReference - from .key_vault_key_reference_py3 import KeyVaultKeyReference - from .disk_encryption_settings_py3 import DiskEncryptionSettings - from .virtual_hard_disk_py3 import VirtualHardDisk - from .os_disk_py3 import OSDisk - from .data_disk_py3 import DataDisk - from .storage_profile_py3 import StorageProfile - from .additional_unattend_content_py3 import AdditionalUnattendContent - from .win_rm_listener_py3 import WinRMListener - from .win_rm_configuration_py3 import WinRMConfiguration - from .windows_configuration_py3 import WindowsConfiguration - from .ssh_public_key_py3 import SshPublicKey - from .ssh_configuration_py3 import SshConfiguration - from .linux_configuration_py3 import LinuxConfiguration - from .vault_certificate_py3 import VaultCertificate - from .vault_secret_group_py3 import VaultSecretGroup - from .os_profile_py3 import OSProfile - from .network_interface_reference_py3 import NetworkInterfaceReference - from .network_profile_py3 import NetworkProfile - from .boot_diagnostics_py3 import BootDiagnostics - from .diagnostics_profile_py3 import DiagnosticsProfile - from .virtual_machine_extension_handler_instance_view_py3 import VirtualMachineExtensionHandlerInstanceView - from .virtual_machine_agent_instance_view_py3 import VirtualMachineAgentInstanceView - from .disk_instance_view_py3 import DiskInstanceView - from .boot_diagnostics_instance_view_py3 import BootDiagnosticsInstanceView - from .virtual_machine_identity_py3 import VirtualMachineIdentity - from .virtual_machine_instance_view_py3 import VirtualMachineInstanceView - from .virtual_machine_py3 import VirtualMachine - from .sku_py3 import Sku - from .upgrade_policy_py3 import UpgradePolicy - from .virtual_machine_scale_set_identity_py3 import VirtualMachineScaleSetIdentity - from .virtual_machine_scale_set_os_profile_py3 import VirtualMachineScaleSetOSProfile - from .virtual_machine_scale_set_os_disk_py3 import VirtualMachineScaleSetOSDisk - from .virtual_machine_scale_set_storage_profile_py3 import VirtualMachineScaleSetStorageProfile - from .api_entity_reference_py3 import ApiEntityReference - from .virtual_machine_scale_set_ip_configuration_py3 import VirtualMachineScaleSetIPConfiguration - from .virtual_machine_scale_set_network_configuration_py3 import VirtualMachineScaleSetNetworkConfiguration - from .virtual_machine_scale_set_network_profile_py3 import VirtualMachineScaleSetNetworkProfile - from .virtual_machine_scale_set_extension_py3 import VirtualMachineScaleSetExtension - from .virtual_machine_scale_set_extension_profile_py3 import VirtualMachineScaleSetExtensionProfile - from .virtual_machine_scale_set_vm_profile_py3 import VirtualMachineScaleSetVMProfile - from .virtual_machine_scale_set_py3 import VirtualMachineScaleSet - from .virtual_machine_scale_set_vm_instance_ids_py3 import VirtualMachineScaleSetVMInstanceIDs - from .virtual_machine_scale_set_vm_instance_required_ids_py3 import VirtualMachineScaleSetVMInstanceRequiredIDs - from .virtual_machine_status_code_count_py3 import VirtualMachineStatusCodeCount - from .virtual_machine_scale_set_instance_view_statuses_summary_py3 import VirtualMachineScaleSetInstanceViewStatusesSummary - from .virtual_machine_scale_set_vm_extensions_summary_py3 import VirtualMachineScaleSetVMExtensionsSummary - from .virtual_machine_scale_set_instance_view_py3 import VirtualMachineScaleSetInstanceView - from .virtual_machine_scale_set_sku_capacity_py3 import VirtualMachineScaleSetSkuCapacity - from .virtual_machine_scale_set_sku_py3 import VirtualMachineScaleSetSku - from .virtual_machine_scale_set_vm_instance_view_py3 import VirtualMachineScaleSetVMInstanceView - from .virtual_machine_scale_set_vm_py3 import VirtualMachineScaleSetVM - from .api_error_base_py3 import ApiErrorBase - from .inner_error_py3 import InnerError - from .api_error_py3 import ApiError - from .compute_long_running_operation_properties_py3 import ComputeLongRunningOperationProperties - from .resource_py3 import Resource - from .update_resource_py3 import UpdateResource - from .operation_status_response_py3 import OperationStatusResponse + from ._models_py3 import AdditionalUnattendContent + from ._models_py3 import ApiEntityReference + from ._models_py3 import ApiError + from ._models_py3 import ApiErrorBase + from ._models_py3 import AvailabilitySet + from ._models_py3 import BootDiagnostics + from ._models_py3 import BootDiagnosticsInstanceView + from ._models_py3 import ComputeLongRunningOperationProperties + from ._models_py3 import DataDisk + from ._models_py3 import DataDiskImage + from ._models_py3 import DiagnosticsProfile + from ._models_py3 import DiskEncryptionSettings + from ._models_py3 import DiskInstanceView + from ._models_py3 import HardwareProfile + from ._models_py3 import ImageReference + from ._models_py3 import InnerError + from ._models_py3 import InstanceViewStatus + from ._models_py3 import KeyVaultKeyReference + from ._models_py3 import KeyVaultSecretReference + from ._models_py3 import LinuxConfiguration + from ._models_py3 import NetworkInterfaceReference + from ._models_py3 import NetworkProfile + from ._models_py3 import OperationStatusResponse + from ._models_py3 import OSDisk + from ._models_py3 import OSDiskImage + from ._models_py3 import OSProfile + from ._models_py3 import Plan + from ._models_py3 import PurchasePlan + from ._models_py3 import Resource + from ._models_py3 import Sku + from ._models_py3 import SshConfiguration + from ._models_py3 import SshPublicKey + from ._models_py3 import StorageProfile + from ._models_py3 import SubResource + from ._models_py3 import UpdateResource + from ._models_py3 import UpgradePolicy + from ._models_py3 import Usage + from ._models_py3 import UsageName + from ._models_py3 import VaultCertificate + from ._models_py3 import VaultSecretGroup + from ._models_py3 import VirtualHardDisk + from ._models_py3 import VirtualMachine + from ._models_py3 import VirtualMachineAgentInstanceView + from ._models_py3 import VirtualMachineCaptureParameters + from ._models_py3 import VirtualMachineCaptureResult + from ._models_py3 import VirtualMachineExtension + from ._models_py3 import VirtualMachineExtensionHandlerInstanceView + from ._models_py3 import VirtualMachineExtensionImage + from ._models_py3 import VirtualMachineExtensionInstanceView + from ._models_py3 import VirtualMachineExtensionsListResult + from ._models_py3 import VirtualMachineExtensionUpdate + from ._models_py3 import VirtualMachineIdentity + from ._models_py3 import VirtualMachineImage + from ._models_py3 import VirtualMachineImageResource + from ._models_py3 import VirtualMachineInstanceView + from ._models_py3 import VirtualMachineScaleSet + from ._models_py3 import VirtualMachineScaleSetExtension + from ._models_py3 import VirtualMachineScaleSetExtensionProfile + from ._models_py3 import VirtualMachineScaleSetIdentity + from ._models_py3 import VirtualMachineScaleSetInstanceView + from ._models_py3 import VirtualMachineScaleSetInstanceViewStatusesSummary + from ._models_py3 import VirtualMachineScaleSetIPConfiguration + from ._models_py3 import VirtualMachineScaleSetNetworkConfiguration + from ._models_py3 import VirtualMachineScaleSetNetworkProfile + from ._models_py3 import VirtualMachineScaleSetOSDisk + from ._models_py3 import VirtualMachineScaleSetOSProfile + from ._models_py3 import VirtualMachineScaleSetSku + from ._models_py3 import VirtualMachineScaleSetSkuCapacity + from ._models_py3 import VirtualMachineScaleSetStorageProfile + from ._models_py3 import VirtualMachineScaleSetVM + from ._models_py3 import VirtualMachineScaleSetVMExtensionsSummary + from ._models_py3 import VirtualMachineScaleSetVMInstanceIDs + from ._models_py3 import VirtualMachineScaleSetVMInstanceRequiredIDs + from ._models_py3 import VirtualMachineScaleSetVMInstanceView + from ._models_py3 import VirtualMachineScaleSetVMProfile + from ._models_py3 import VirtualMachineSize + from ._models_py3 import VirtualMachineStatusCodeCount + from ._models_py3 import WindowsConfiguration + from ._models_py3 import WinRMConfiguration + from ._models_py3 import WinRMListener except (SyntaxError, ImportError): - from .instance_view_status import InstanceViewStatus - from .sub_resource import SubResource - from .availability_set import AvailabilitySet - from .virtual_machine_size import VirtualMachineSize - from .virtual_machine_extension_image import VirtualMachineExtensionImage - from .virtual_machine_image_resource import VirtualMachineImageResource - from .virtual_machine_extension_instance_view import VirtualMachineExtensionInstanceView - from .virtual_machine_extension import VirtualMachineExtension - from .virtual_machine_extension_update import VirtualMachineExtensionUpdate - from .virtual_machine_extensions_list_result import VirtualMachineExtensionsListResult - from .purchase_plan import PurchasePlan - from .os_disk_image import OSDiskImage - from .data_disk_image import DataDiskImage - from .virtual_machine_image import VirtualMachineImage - from .usage_name import UsageName - from .usage import Usage - from .virtual_machine_capture_parameters import VirtualMachineCaptureParameters - from .virtual_machine_capture_result import VirtualMachineCaptureResult - from .plan import Plan - from .hardware_profile import HardwareProfile - from .image_reference import ImageReference - from .key_vault_secret_reference import KeyVaultSecretReference - from .key_vault_key_reference import KeyVaultKeyReference - from .disk_encryption_settings import DiskEncryptionSettings - from .virtual_hard_disk import VirtualHardDisk - from .os_disk import OSDisk - from .data_disk import DataDisk - from .storage_profile import StorageProfile - from .additional_unattend_content import AdditionalUnattendContent - from .win_rm_listener import WinRMListener - from .win_rm_configuration import WinRMConfiguration - from .windows_configuration import WindowsConfiguration - from .ssh_public_key import SshPublicKey - from .ssh_configuration import SshConfiguration - from .linux_configuration import LinuxConfiguration - from .vault_certificate import VaultCertificate - from .vault_secret_group import VaultSecretGroup - from .os_profile import OSProfile - from .network_interface_reference import NetworkInterfaceReference - from .network_profile import NetworkProfile - from .boot_diagnostics import BootDiagnostics - from .diagnostics_profile import DiagnosticsProfile - from .virtual_machine_extension_handler_instance_view import VirtualMachineExtensionHandlerInstanceView - from .virtual_machine_agent_instance_view import VirtualMachineAgentInstanceView - from .disk_instance_view import DiskInstanceView - from .boot_diagnostics_instance_view import BootDiagnosticsInstanceView - from .virtual_machine_identity import VirtualMachineIdentity - from .virtual_machine_instance_view import VirtualMachineInstanceView - from .virtual_machine import VirtualMachine - from .sku import Sku - from .upgrade_policy import UpgradePolicy - from .virtual_machine_scale_set_identity import VirtualMachineScaleSetIdentity - from .virtual_machine_scale_set_os_profile import VirtualMachineScaleSetOSProfile - from .virtual_machine_scale_set_os_disk import VirtualMachineScaleSetOSDisk - from .virtual_machine_scale_set_storage_profile import VirtualMachineScaleSetStorageProfile - from .api_entity_reference import ApiEntityReference - from .virtual_machine_scale_set_ip_configuration import VirtualMachineScaleSetIPConfiguration - from .virtual_machine_scale_set_network_configuration import VirtualMachineScaleSetNetworkConfiguration - from .virtual_machine_scale_set_network_profile import VirtualMachineScaleSetNetworkProfile - from .virtual_machine_scale_set_extension import VirtualMachineScaleSetExtension - from .virtual_machine_scale_set_extension_profile import VirtualMachineScaleSetExtensionProfile - from .virtual_machine_scale_set_vm_profile import VirtualMachineScaleSetVMProfile - from .virtual_machine_scale_set import VirtualMachineScaleSet - from .virtual_machine_scale_set_vm_instance_ids import VirtualMachineScaleSetVMInstanceIDs - from .virtual_machine_scale_set_vm_instance_required_ids import VirtualMachineScaleSetVMInstanceRequiredIDs - from .virtual_machine_status_code_count import VirtualMachineStatusCodeCount - from .virtual_machine_scale_set_instance_view_statuses_summary import VirtualMachineScaleSetInstanceViewStatusesSummary - from .virtual_machine_scale_set_vm_extensions_summary import VirtualMachineScaleSetVMExtensionsSummary - from .virtual_machine_scale_set_instance_view import VirtualMachineScaleSetInstanceView - from .virtual_machine_scale_set_sku_capacity import VirtualMachineScaleSetSkuCapacity - from .virtual_machine_scale_set_sku import VirtualMachineScaleSetSku - from .virtual_machine_scale_set_vm_instance_view import VirtualMachineScaleSetVMInstanceView - from .virtual_machine_scale_set_vm import VirtualMachineScaleSetVM - from .api_error_base import ApiErrorBase - from .inner_error import InnerError - from .api_error import ApiError - from .compute_long_running_operation_properties import ComputeLongRunningOperationProperties - from .resource import Resource - from .update_resource import UpdateResource - from .operation_status_response import OperationStatusResponse -from .availability_set_paged import AvailabilitySetPaged -from .virtual_machine_size_paged import VirtualMachineSizePaged -from .virtual_machine_paged import VirtualMachinePaged -from .usage_paged import UsagePaged -from .virtual_machine_scale_set_paged import VirtualMachineScaleSetPaged -from .virtual_machine_scale_set_sku_paged import VirtualMachineScaleSetSkuPaged -from .virtual_machine_scale_set_vm_paged import VirtualMachineScaleSetVMPaged -from .compute_management_client_enums import ( + from ._models import AdditionalUnattendContent + from ._models import ApiEntityReference + from ._models import ApiError + from ._models import ApiErrorBase + from ._models import AvailabilitySet + from ._models import BootDiagnostics + from ._models import BootDiagnosticsInstanceView + from ._models import ComputeLongRunningOperationProperties + from ._models import DataDisk + from ._models import DataDiskImage + from ._models import DiagnosticsProfile + from ._models import DiskEncryptionSettings + from ._models import DiskInstanceView + from ._models import HardwareProfile + from ._models import ImageReference + from ._models import InnerError + from ._models import InstanceViewStatus + from ._models import KeyVaultKeyReference + from ._models import KeyVaultSecretReference + from ._models import LinuxConfiguration + from ._models import NetworkInterfaceReference + from ._models import NetworkProfile + from ._models import OperationStatusResponse + from ._models import OSDisk + from ._models import OSDiskImage + from ._models import OSProfile + from ._models import Plan + from ._models import PurchasePlan + from ._models import Resource + from ._models import Sku + from ._models import SshConfiguration + from ._models import SshPublicKey + from ._models import StorageProfile + from ._models import SubResource + from ._models import UpdateResource + from ._models import UpgradePolicy + from ._models import Usage + from ._models import UsageName + from ._models import VaultCertificate + from ._models import VaultSecretGroup + from ._models import VirtualHardDisk + from ._models import VirtualMachine + from ._models import VirtualMachineAgentInstanceView + from ._models import VirtualMachineCaptureParameters + from ._models import VirtualMachineCaptureResult + from ._models import VirtualMachineExtension + from ._models import VirtualMachineExtensionHandlerInstanceView + from ._models import VirtualMachineExtensionImage + from ._models import VirtualMachineExtensionInstanceView + from ._models import VirtualMachineExtensionsListResult + from ._models import VirtualMachineExtensionUpdate + from ._models import VirtualMachineIdentity + from ._models import VirtualMachineImage + from ._models import VirtualMachineImageResource + from ._models import VirtualMachineInstanceView + from ._models import VirtualMachineScaleSet + from ._models import VirtualMachineScaleSetExtension + from ._models import VirtualMachineScaleSetExtensionProfile + from ._models import VirtualMachineScaleSetIdentity + from ._models import VirtualMachineScaleSetInstanceView + from ._models import VirtualMachineScaleSetInstanceViewStatusesSummary + from ._models import VirtualMachineScaleSetIPConfiguration + from ._models import VirtualMachineScaleSetNetworkConfiguration + from ._models import VirtualMachineScaleSetNetworkProfile + from ._models import VirtualMachineScaleSetOSDisk + from ._models import VirtualMachineScaleSetOSProfile + from ._models import VirtualMachineScaleSetSku + from ._models import VirtualMachineScaleSetSkuCapacity + from ._models import VirtualMachineScaleSetStorageProfile + from ._models import VirtualMachineScaleSetVM + from ._models import VirtualMachineScaleSetVMExtensionsSummary + from ._models import VirtualMachineScaleSetVMInstanceIDs + from ._models import VirtualMachineScaleSetVMInstanceRequiredIDs + from ._models import VirtualMachineScaleSetVMInstanceView + from ._models import VirtualMachineScaleSetVMProfile + from ._models import VirtualMachineSize + from ._models import VirtualMachineStatusCodeCount + from ._models import WindowsConfiguration + from ._models import WinRMConfiguration + from ._models import WinRMListener +from ._paged_models import AvailabilitySetPaged +from ._paged_models import UsagePaged +from ._paged_models import VirtualMachinePaged +from ._paged_models import VirtualMachineScaleSetPaged +from ._paged_models import VirtualMachineScaleSetSkuPaged +from ._paged_models import VirtualMachineScaleSetVMPaged +from ._paged_models import VirtualMachineSizePaged +from ._compute_management_client_enums import ( StatusLevelTypes, OperatingSystemTypes, VirtualMachineSizeTypes, @@ -195,86 +195,86 @@ ) __all__ = [ - 'InstanceViewStatus', - 'SubResource', + 'AdditionalUnattendContent', + 'ApiEntityReference', + 'ApiError', + 'ApiErrorBase', 'AvailabilitySet', - 'VirtualMachineSize', - 'VirtualMachineExtensionImage', - 'VirtualMachineImageResource', - 'VirtualMachineExtensionInstanceView', - 'VirtualMachineExtension', - 'VirtualMachineExtensionUpdate', - 'VirtualMachineExtensionsListResult', - 'PurchasePlan', - 'OSDiskImage', + 'BootDiagnostics', + 'BootDiagnosticsInstanceView', + 'ComputeLongRunningOperationProperties', + 'DataDisk', 'DataDiskImage', - 'VirtualMachineImage', - 'UsageName', - 'Usage', - 'VirtualMachineCaptureParameters', - 'VirtualMachineCaptureResult', - 'Plan', + 'DiagnosticsProfile', + 'DiskEncryptionSettings', + 'DiskInstanceView', 'HardwareProfile', 'ImageReference', - 'KeyVaultSecretReference', + 'InnerError', + 'InstanceViewStatus', 'KeyVaultKeyReference', - 'DiskEncryptionSettings', - 'VirtualHardDisk', + 'KeyVaultSecretReference', + 'LinuxConfiguration', + 'NetworkInterfaceReference', + 'NetworkProfile', + 'OperationStatusResponse', 'OSDisk', - 'DataDisk', - 'StorageProfile', - 'AdditionalUnattendContent', - 'WinRMListener', - 'WinRMConfiguration', - 'WindowsConfiguration', - 'SshPublicKey', + 'OSDiskImage', + 'OSProfile', + 'Plan', + 'PurchasePlan', + 'Resource', + 'Sku', 'SshConfiguration', - 'LinuxConfiguration', + 'SshPublicKey', + 'StorageProfile', + 'SubResource', + 'UpdateResource', + 'UpgradePolicy', + 'Usage', + 'UsageName', 'VaultCertificate', 'VaultSecretGroup', - 'OSProfile', - 'NetworkInterfaceReference', - 'NetworkProfile', - 'BootDiagnostics', - 'DiagnosticsProfile', - 'VirtualMachineExtensionHandlerInstanceView', + 'VirtualHardDisk', + 'VirtualMachine', 'VirtualMachineAgentInstanceView', - 'DiskInstanceView', - 'BootDiagnosticsInstanceView', + 'VirtualMachineCaptureParameters', + 'VirtualMachineCaptureResult', + 'VirtualMachineExtension', + 'VirtualMachineExtensionHandlerInstanceView', + 'VirtualMachineExtensionImage', + 'VirtualMachineExtensionInstanceView', + 'VirtualMachineExtensionsListResult', + 'VirtualMachineExtensionUpdate', 'VirtualMachineIdentity', + 'VirtualMachineImage', + 'VirtualMachineImageResource', 'VirtualMachineInstanceView', - 'VirtualMachine', - 'Sku', - 'UpgradePolicy', + 'VirtualMachineScaleSet', + 'VirtualMachineScaleSetExtension', + 'VirtualMachineScaleSetExtensionProfile', 'VirtualMachineScaleSetIdentity', - 'VirtualMachineScaleSetOSProfile', - 'VirtualMachineScaleSetOSDisk', - 'VirtualMachineScaleSetStorageProfile', - 'ApiEntityReference', + 'VirtualMachineScaleSetInstanceView', + 'VirtualMachineScaleSetInstanceViewStatusesSummary', 'VirtualMachineScaleSetIPConfiguration', 'VirtualMachineScaleSetNetworkConfiguration', 'VirtualMachineScaleSetNetworkProfile', - 'VirtualMachineScaleSetExtension', - 'VirtualMachineScaleSetExtensionProfile', - 'VirtualMachineScaleSetVMProfile', - 'VirtualMachineScaleSet', + 'VirtualMachineScaleSetOSDisk', + 'VirtualMachineScaleSetOSProfile', + 'VirtualMachineScaleSetSku', + 'VirtualMachineScaleSetSkuCapacity', + 'VirtualMachineScaleSetStorageProfile', + 'VirtualMachineScaleSetVM', + 'VirtualMachineScaleSetVMExtensionsSummary', 'VirtualMachineScaleSetVMInstanceIDs', 'VirtualMachineScaleSetVMInstanceRequiredIDs', - 'VirtualMachineStatusCodeCount', - 'VirtualMachineScaleSetInstanceViewStatusesSummary', - 'VirtualMachineScaleSetVMExtensionsSummary', - 'VirtualMachineScaleSetInstanceView', - 'VirtualMachineScaleSetSkuCapacity', - 'VirtualMachineScaleSetSku', 'VirtualMachineScaleSetVMInstanceView', - 'VirtualMachineScaleSetVM', - 'ApiErrorBase', - 'InnerError', - 'ApiError', - 'ComputeLongRunningOperationProperties', - 'Resource', - 'UpdateResource', - 'OperationStatusResponse', + 'VirtualMachineScaleSetVMProfile', + 'VirtualMachineSize', + 'VirtualMachineStatusCodeCount', + 'WindowsConfiguration', + 'WinRMConfiguration', + 'WinRMListener', 'AvailabilitySetPaged', 'VirtualMachineSizePaged', 'VirtualMachinePaged', diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/compute_management_client_enums.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/_compute_management_client_enums.py similarity index 100% rename from sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/compute_management_client_enums.py rename to sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/_compute_management_client_enums.py diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/_models.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/_models.py new file mode 100644 index 000000000000..ac04c2ac931f --- /dev/null +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/_models.py @@ -0,0 +1,3026 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class AdditionalUnattendContent(Model): + """Specifies additional XML formatted information that can be included in the + Unattend.xml file, which is used by Windows Setup. Contents are defined by + setting name, component name, and the pass in which the content is applied. + + :param pass_name: The pass name. Currently, the only allowable value is + OobeSystem. Possible values include: 'OobeSystem' + :type pass_name: str or ~azure.mgmt.compute.v2016_03_30.models.PassNames + :param component_name: The component name. Currently, the only allowable + value is Microsoft-Windows-Shell-Setup. Possible values include: + 'Microsoft-Windows-Shell-Setup' + :type component_name: str or + ~azure.mgmt.compute.v2016_03_30.models.ComponentNames + :param setting_name: Specifies the name of the setting to which the + content applies. Possible values are: FirstLogonCommands and AutoLogon. + Possible values include: 'AutoLogon', 'FirstLogonCommands' + :type setting_name: str or + ~azure.mgmt.compute.v2016_03_30.models.SettingNames + :param content: Specifies the XML formatted content that is added to the + unattend.xml file for the specified path and component. The XML must be + less than 4KB and must include the root element for the setting or feature + that is being inserted. + :type content: str + """ + + _attribute_map = { + 'pass_name': {'key': 'passName', 'type': 'PassNames'}, + 'component_name': {'key': 'componentName', 'type': 'ComponentNames'}, + 'setting_name': {'key': 'settingName', 'type': 'SettingNames'}, + 'content': {'key': 'content', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(AdditionalUnattendContent, self).__init__(**kwargs) + self.pass_name = kwargs.get('pass_name', None) + self.component_name = kwargs.get('component_name', None) + self.setting_name = kwargs.get('setting_name', None) + self.content = kwargs.get('content', None) + + +class ApiEntityReference(Model): + """The API entity reference. + + :param id: The ARM resource id in the form of + /subscriptions/{SubscriptionId}/resourceGroups/{ResourceGroupName}/... + :type id: str + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ApiEntityReference, self).__init__(**kwargs) + self.id = kwargs.get('id', None) + + +class ApiError(Model): + """Api error. + + :param details: The Api error details + :type details: list[~azure.mgmt.compute.v2016_03_30.models.ApiErrorBase] + :param innererror: The Api inner error + :type innererror: ~azure.mgmt.compute.v2016_03_30.models.InnerError + :param code: The error code. + :type code: str + :param target: The target of the particular error. + :type target: str + :param message: The error message. + :type message: str + """ + + _attribute_map = { + 'details': {'key': 'details', 'type': '[ApiErrorBase]'}, + 'innererror': {'key': 'innererror', 'type': 'InnerError'}, + 'code': {'key': 'code', 'type': 'str'}, + 'target': {'key': 'target', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ApiError, self).__init__(**kwargs) + self.details = kwargs.get('details', None) + self.innererror = kwargs.get('innererror', None) + self.code = kwargs.get('code', None) + self.target = kwargs.get('target', None) + self.message = kwargs.get('message', None) + + +class ApiErrorBase(Model): + """Api error base. + + :param code: The error code. + :type code: str + :param target: The target of the particular error. + :type target: str + :param message: The error message. + :type message: str + """ + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + 'target': {'key': 'target', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ApiErrorBase, self).__init__(**kwargs) + self.code = kwargs.get('code', None) + self.target = kwargs.get('target', None) + self.message = kwargs.get('message', None) + + +class Resource(Model): + """The Resource model definition. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource Id + :vartype id: str + :ivar name: Resource name + :vartype name: str + :ivar type: Resource type + :vartype type: str + :param location: Required. Resource location + :type location: str + :param tags: Resource tags + :type tags: dict[str, str] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__(self, **kwargs): + super(Resource, self).__init__(**kwargs) + self.id = None + self.name = None + self.type = None + self.location = kwargs.get('location', None) + self.tags = kwargs.get('tags', None) + + +class AvailabilitySet(Resource): + """Specifies information about the availability set that the virtual machine + should be assigned to. Virtual machines specified in the same availability + set are allocated to different nodes to maximize availability. For more + information about availability sets, see [Manage the availability of + virtual + machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-manage-availability?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). +

    For more information on Azure planned maintenance, see [Planned + maintenance for virtual machines in + Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-planned-maintenance?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json) +

    Currently, a VM can only be added to availability set at creation + time. An existing VM cannot be added to an availability set. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource Id + :vartype id: str + :ivar name: Resource name + :vartype name: str + :ivar type: Resource type + :vartype type: str + :param location: Required. Resource location + :type location: str + :param tags: Resource tags + :type tags: dict[str, str] + :param platform_update_domain_count: Update Domain count. + :type platform_update_domain_count: int + :param platform_fault_domain_count: Fault Domain count. + :type platform_fault_domain_count: int + :param virtual_machines: A list of references to all virtual machines in + the availability set. + :type virtual_machines: + list[~azure.mgmt.compute.v2016_03_30.models.SubResource] + :ivar statuses: The resource status information. + :vartype statuses: + list[~azure.mgmt.compute.v2016_03_30.models.InstanceViewStatus] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + 'statuses': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'platform_update_domain_count': {'key': 'properties.platformUpdateDomainCount', 'type': 'int'}, + 'platform_fault_domain_count': {'key': 'properties.platformFaultDomainCount', 'type': 'int'}, + 'virtual_machines': {'key': 'properties.virtualMachines', 'type': '[SubResource]'}, + 'statuses': {'key': 'properties.statuses', 'type': '[InstanceViewStatus]'}, + } + + def __init__(self, **kwargs): + super(AvailabilitySet, self).__init__(**kwargs) + self.platform_update_domain_count = kwargs.get('platform_update_domain_count', None) + self.platform_fault_domain_count = kwargs.get('platform_fault_domain_count', None) + self.virtual_machines = kwargs.get('virtual_machines', None) + self.statuses = None + + +class BootDiagnostics(Model): + """Boot Diagnostics is a debugging feature which allows you to view Console + Output and Screenshot to diagnose VM status.

    You can easily view + the output of your console log.

    Azure also enables you to see a + screenshot of the VM from the hypervisor. + + :param enabled: Whether boot diagnostics should be enabled on the Virtual + Machine. + :type enabled: bool + :param storage_uri: Uri of the storage account to use for placing the + console output and screenshot. + :type storage_uri: str + """ + + _attribute_map = { + 'enabled': {'key': 'enabled', 'type': 'bool'}, + 'storage_uri': {'key': 'storageUri', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(BootDiagnostics, self).__init__(**kwargs) + self.enabled = kwargs.get('enabled', None) + self.storage_uri = kwargs.get('storage_uri', None) + + +class BootDiagnosticsInstanceView(Model): + """The instance view of a virtual machine boot diagnostics. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar console_screenshot_blob_uri: The console screenshot blob URI. + :vartype console_screenshot_blob_uri: str + :ivar serial_console_log_blob_uri: The Linux serial console log blob Uri. + :vartype serial_console_log_blob_uri: str + """ + + _validation = { + 'console_screenshot_blob_uri': {'readonly': True}, + 'serial_console_log_blob_uri': {'readonly': True}, + } + + _attribute_map = { + 'console_screenshot_blob_uri': {'key': 'consoleScreenshotBlobUri', 'type': 'str'}, + 'serial_console_log_blob_uri': {'key': 'serialConsoleLogBlobUri', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(BootDiagnosticsInstanceView, self).__init__(**kwargs) + self.console_screenshot_blob_uri = None + self.serial_console_log_blob_uri = None + + +class CloudError(Model): + """CloudError. + """ + + _attribute_map = { + } + + +class ComputeLongRunningOperationProperties(Model): + """Compute-specific operation properties, including output. + + :param output: Operation output data (raw JSON) + :type output: object + """ + + _attribute_map = { + 'output': {'key': 'output', 'type': 'object'}, + } + + def __init__(self, **kwargs): + super(ComputeLongRunningOperationProperties, self).__init__(**kwargs) + self.output = kwargs.get('output', None) + + +class DataDisk(Model): + """Describes a data disk. + + All required parameters must be populated in order to send to Azure. + + :param lun: Required. Specifies the logical unit number of the data disk. + This value is used to identify data disks within the VM and therefore must + be unique for each data disk attached to a VM. + :type lun: int + :param name: Required. The disk name. + :type name: str + :param vhd: Required. The virtual hard disk. + :type vhd: ~azure.mgmt.compute.v2016_03_30.models.VirtualHardDisk + :param image: The source user image virtual hard disk. The virtual hard + disk will be copied before being attached to the virtual machine. If + SourceImage is provided, the destination virtual hard drive must not + exist. + :type image: ~azure.mgmt.compute.v2016_03_30.models.VirtualHardDisk + :param caching: Specifies the caching requirements.

    Possible + values are:

    **None**

    **ReadOnly**

    **ReadWrite** +

    Default: **None for Standard storage. ReadOnly for Premium + storage**. Possible values include: 'None', 'ReadOnly', 'ReadWrite' + :type caching: str or ~azure.mgmt.compute.v2016_03_30.models.CachingTypes + :param create_option: Required. Specifies how the virtual machine should + be created.

    Possible values are:

    **Attach** \\u2013 This + value is used when you are using a specialized disk to create the virtual + machine.

    **FromImage** \\u2013 This value is used when you are + using an image to create the virtual machine. If you are using a platform + image, you also use the imageReference element described above. If you are + using a marketplace image, you also use the plan element previously + described. Possible values include: 'FromImage', 'Empty', 'Attach' + :type create_option: str or + ~azure.mgmt.compute.v2016_03_30.models.DiskCreateOptionTypes + :param disk_size_gb: Specifies the size of an empty data disk in + gigabytes. This element can be used to overwrite the size of the disk in a + virtual machine image.

    This value cannot be larger than 1023 GB + :type disk_size_gb: int + """ + + _validation = { + 'lun': {'required': True}, + 'name': {'required': True}, + 'vhd': {'required': True}, + 'create_option': {'required': True}, + } + + _attribute_map = { + 'lun': {'key': 'lun', 'type': 'int'}, + 'name': {'key': 'name', 'type': 'str'}, + 'vhd': {'key': 'vhd', 'type': 'VirtualHardDisk'}, + 'image': {'key': 'image', 'type': 'VirtualHardDisk'}, + 'caching': {'key': 'caching', 'type': 'CachingTypes'}, + 'create_option': {'key': 'createOption', 'type': 'DiskCreateOptionTypes'}, + 'disk_size_gb': {'key': 'diskSizeGB', 'type': 'int'}, + } + + def __init__(self, **kwargs): + super(DataDisk, self).__init__(**kwargs) + self.lun = kwargs.get('lun', None) + self.name = kwargs.get('name', None) + self.vhd = kwargs.get('vhd', None) + self.image = kwargs.get('image', None) + self.caching = kwargs.get('caching', None) + self.create_option = kwargs.get('create_option', None) + self.disk_size_gb = kwargs.get('disk_size_gb', None) + + +class DataDiskImage(Model): + """Contains the data disk images information. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar lun: Specifies the logical unit number of the data disk. This value + is used to identify data disks within the VM and therefore must be unique + for each data disk attached to a VM. + :vartype lun: int + """ + + _validation = { + 'lun': {'readonly': True}, + } + + _attribute_map = { + 'lun': {'key': 'lun', 'type': 'int'}, + } + + def __init__(self, **kwargs): + super(DataDiskImage, self).__init__(**kwargs) + self.lun = None + + +class DiagnosticsProfile(Model): + """Specifies the boot diagnostic settings state.

    Minimum api-version: + 2015-06-15. + + :param boot_diagnostics: Boot Diagnostics is a debugging feature which + allows you to view Console Output and Screenshot to diagnose VM status. +

    You can easily view the output of your console log.

    + Azure also enables you to see a screenshot of the VM from the hypervisor. + :type boot_diagnostics: + ~azure.mgmt.compute.v2016_03_30.models.BootDiagnostics + """ + + _attribute_map = { + 'boot_diagnostics': {'key': 'bootDiagnostics', 'type': 'BootDiagnostics'}, + } + + def __init__(self, **kwargs): + super(DiagnosticsProfile, self).__init__(**kwargs) + self.boot_diagnostics = kwargs.get('boot_diagnostics', None) + + +class DiskEncryptionSettings(Model): + """Describes a Encryption Settings for a Disk. + + :param disk_encryption_key: Specifies the location of the disk encryption + key, which is a Key Vault Secret. + :type disk_encryption_key: + ~azure.mgmt.compute.v2016_03_30.models.KeyVaultSecretReference + :param key_encryption_key: Specifies the location of the key encryption + key in Key Vault. + :type key_encryption_key: + ~azure.mgmt.compute.v2016_03_30.models.KeyVaultKeyReference + :param enabled: Specifies whether disk encryption should be enabled on the + virtual machine. + :type enabled: bool + """ + + _attribute_map = { + 'disk_encryption_key': {'key': 'diskEncryptionKey', 'type': 'KeyVaultSecretReference'}, + 'key_encryption_key': {'key': 'keyEncryptionKey', 'type': 'KeyVaultKeyReference'}, + 'enabled': {'key': 'enabled', 'type': 'bool'}, + } + + def __init__(self, **kwargs): + super(DiskEncryptionSettings, self).__init__(**kwargs) + self.disk_encryption_key = kwargs.get('disk_encryption_key', None) + self.key_encryption_key = kwargs.get('key_encryption_key', None) + self.enabled = kwargs.get('enabled', None) + + +class DiskInstanceView(Model): + """The instance view of the disk. + + :param name: The disk name. + :type name: str + :param statuses: The resource status information. + :type statuses: + list[~azure.mgmt.compute.v2016_03_30.models.InstanceViewStatus] + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'statuses': {'key': 'statuses', 'type': '[InstanceViewStatus]'}, + } + + def __init__(self, **kwargs): + super(DiskInstanceView, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.statuses = kwargs.get('statuses', None) + + +class HardwareProfile(Model): + """Specifies the hardware settings for the virtual machine. + + :param vm_size: Specifies the size of the virtual machine. For more + information about virtual machine sizes, see [Sizes for virtual + machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-sizes?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). +

    The available VM sizes depend on region and availability set. For + a list of available sizes use these APIs:

    [List all available + virtual machine sizes in an availability + set](https://docs.microsoft.com/rest/api/compute/availabilitysets/listavailablesizes) +

    [List all available virtual machine sizes in a + region](https://docs.microsoft.com/rest/api/compute/virtualmachinesizes/list) +

    [List all available virtual machine sizes for + resizing](https://docs.microsoft.com/rest/api/compute/virtualmachines/listavailablesizes). + Possible values include: 'Basic_A0', 'Basic_A1', 'Basic_A2', 'Basic_A3', + 'Basic_A4', 'Standard_A0', 'Standard_A1', 'Standard_A2', 'Standard_A3', + 'Standard_A4', 'Standard_A5', 'Standard_A6', 'Standard_A7', 'Standard_A8', + 'Standard_A9', 'Standard_A10', 'Standard_A11', 'Standard_D1', + 'Standard_D2', 'Standard_D3', 'Standard_D4', 'Standard_D11', + 'Standard_D12', 'Standard_D13', 'Standard_D14', 'Standard_D1_v2', + 'Standard_D2_v2', 'Standard_D3_v2', 'Standard_D4_v2', 'Standard_D5_v2', + 'Standard_D11_v2', 'Standard_D12_v2', 'Standard_D13_v2', + 'Standard_D14_v2', 'Standard_D15_v2', 'Standard_DS1', 'Standard_DS2', + 'Standard_DS3', 'Standard_DS4', 'Standard_DS11', 'Standard_DS12', + 'Standard_DS13', 'Standard_DS14', 'Standard_DS1_v2', 'Standard_DS2_v2', + 'Standard_DS3_v2', 'Standard_DS4_v2', 'Standard_DS5_v2', + 'Standard_DS11_v2', 'Standard_DS12_v2', 'Standard_DS13_v2', + 'Standard_DS14_v2', 'Standard_DS15_v2', 'Standard_G1', 'Standard_G2', + 'Standard_G3', 'Standard_G4', 'Standard_G5', 'Standard_GS1', + 'Standard_GS2', 'Standard_GS3', 'Standard_GS4', 'Standard_GS5' + :type vm_size: str or + ~azure.mgmt.compute.v2016_03_30.models.VirtualMachineSizeTypes + """ + + _attribute_map = { + 'vm_size': {'key': 'vmSize', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(HardwareProfile, self).__init__(**kwargs) + self.vm_size = kwargs.get('vm_size', None) + + +class ImageReference(Model): + """Specifies information about the image to use. You can specify information + about platform images, marketplace images, or virtual machine images. This + element is required when you want to use a platform image, marketplace + image, or virtual machine image, but is not used in other creation + operations. + + :param publisher: The image publisher. + :type publisher: str + :param offer: Specifies the offer of the platform image or marketplace + image used to create the virtual machine. + :type offer: str + :param sku: The image SKU. + :type sku: str + :param version: Specifies the version of the platform image or marketplace + image used to create the virtual machine. The allowed formats are + Major.Minor.Build or 'latest'. Major, Minor, and Build are decimal + numbers. Specify 'latest' to use the latest version of an image available + at deploy time. Even if you use 'latest', the VM image will not + automatically update after deploy time even if a new version becomes + available. + :type version: str + """ + + _attribute_map = { + 'publisher': {'key': 'publisher', 'type': 'str'}, + 'offer': {'key': 'offer', 'type': 'str'}, + 'sku': {'key': 'sku', 'type': 'str'}, + 'version': {'key': 'version', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ImageReference, self).__init__(**kwargs) + self.publisher = kwargs.get('publisher', None) + self.offer = kwargs.get('offer', None) + self.sku = kwargs.get('sku', None) + self.version = kwargs.get('version', None) + + +class InnerError(Model): + """Inner error details. + + :param exceptiontype: The exception type. + :type exceptiontype: str + :param errordetail: The internal error message or exception dump. + :type errordetail: str + """ + + _attribute_map = { + 'exceptiontype': {'key': 'exceptiontype', 'type': 'str'}, + 'errordetail': {'key': 'errordetail', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(InnerError, self).__init__(**kwargs) + self.exceptiontype = kwargs.get('exceptiontype', None) + self.errordetail = kwargs.get('errordetail', None) + + +class InstanceViewStatus(Model): + """Instance view status. + + :param code: The status code. + :type code: str + :param level: The level code. Possible values include: 'Info', 'Warning', + 'Error' + :type level: str or + ~azure.mgmt.compute.v2016_03_30.models.StatusLevelTypes + :param display_status: The short localizable label for the status. + :type display_status: str + :param message: The detailed status message, including for alerts and + error messages. + :type message: str + :param time: The time of the status. + :type time: datetime + """ + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + 'level': {'key': 'level', 'type': 'StatusLevelTypes'}, + 'display_status': {'key': 'displayStatus', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + 'time': {'key': 'time', 'type': 'iso-8601'}, + } + + def __init__(self, **kwargs): + super(InstanceViewStatus, self).__init__(**kwargs) + self.code = kwargs.get('code', None) + self.level = kwargs.get('level', None) + self.display_status = kwargs.get('display_status', None) + self.message = kwargs.get('message', None) + self.time = kwargs.get('time', None) + + +class KeyVaultKeyReference(Model): + """Describes a reference to Key Vault Key. + + All required parameters must be populated in order to send to Azure. + + :param key_url: Required. The URL referencing a key encryption key in Key + Vault. + :type key_url: str + :param source_vault: Required. The relative URL of the Key Vault + containing the key. + :type source_vault: ~azure.mgmt.compute.v2016_03_30.models.SubResource + """ + + _validation = { + 'key_url': {'required': True}, + 'source_vault': {'required': True}, + } + + _attribute_map = { + 'key_url': {'key': 'keyUrl', 'type': 'str'}, + 'source_vault': {'key': 'sourceVault', 'type': 'SubResource'}, + } + + def __init__(self, **kwargs): + super(KeyVaultKeyReference, self).__init__(**kwargs) + self.key_url = kwargs.get('key_url', None) + self.source_vault = kwargs.get('source_vault', None) + + +class KeyVaultSecretReference(Model): + """Describes a reference to Key Vault Secret. + + All required parameters must be populated in order to send to Azure. + + :param secret_url: Required. The URL referencing a secret in a Key Vault. + :type secret_url: str + :param source_vault: Required. The relative URL of the Key Vault + containing the secret. + :type source_vault: ~azure.mgmt.compute.v2016_03_30.models.SubResource + """ + + _validation = { + 'secret_url': {'required': True}, + 'source_vault': {'required': True}, + } + + _attribute_map = { + 'secret_url': {'key': 'secretUrl', 'type': 'str'}, + 'source_vault': {'key': 'sourceVault', 'type': 'SubResource'}, + } + + def __init__(self, **kwargs): + super(KeyVaultSecretReference, self).__init__(**kwargs) + self.secret_url = kwargs.get('secret_url', None) + self.source_vault = kwargs.get('source_vault', None) + + +class LinuxConfiguration(Model): + """Specifies the Linux operating system settings on the virtual machine. +

    For a list of supported Linux distributions, see [Linux on + Azure-Endorsed + Distributions](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-endorsed-distros?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json) +

    For running non-endorsed distributions, see [Information for + Non-Endorsed + Distributions](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-create-upload-generic?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json). + + :param disable_password_authentication: Specifies whether password + authentication should be disabled. + :type disable_password_authentication: bool + :param ssh: Specifies the ssh key configuration for a Linux OS. + :type ssh: ~azure.mgmt.compute.v2016_03_30.models.SshConfiguration + """ + + _attribute_map = { + 'disable_password_authentication': {'key': 'disablePasswordAuthentication', 'type': 'bool'}, + 'ssh': {'key': 'ssh', 'type': 'SshConfiguration'}, + } + + def __init__(self, **kwargs): + super(LinuxConfiguration, self).__init__(**kwargs) + self.disable_password_authentication = kwargs.get('disable_password_authentication', None) + self.ssh = kwargs.get('ssh', None) + + +class SubResource(Model): + """SubResource. + + :param id: Resource Id + :type id: str + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(SubResource, self).__init__(**kwargs) + self.id = kwargs.get('id', None) + + +class NetworkInterfaceReference(SubResource): + """Describes a network interface reference. + + :param id: Resource Id + :type id: str + :param primary: Specifies the primary network interface in case the + virtual machine has more than 1 network interface. + :type primary: bool + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'primary': {'key': 'properties.primary', 'type': 'bool'}, + } + + def __init__(self, **kwargs): + super(NetworkInterfaceReference, self).__init__(**kwargs) + self.primary = kwargs.get('primary', None) + + +class NetworkProfile(Model): + """Specifies the network interfaces of the virtual machine. + + :param network_interfaces: Specifies the list of resource Ids for the + network interfaces associated with the virtual machine. + :type network_interfaces: + list[~azure.mgmt.compute.v2016_03_30.models.NetworkInterfaceReference] + """ + + _attribute_map = { + 'network_interfaces': {'key': 'networkInterfaces', 'type': '[NetworkInterfaceReference]'}, + } + + def __init__(self, **kwargs): + super(NetworkProfile, self).__init__(**kwargs) + self.network_interfaces = kwargs.get('network_interfaces', None) + + +class OperationStatusResponse(Model): + """Operation status response. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar name: Operation ID + :vartype name: str + :ivar status: Operation status + :vartype status: str + :ivar start_time: Start time of the operation + :vartype start_time: datetime + :ivar end_time: End time of the operation + :vartype end_time: datetime + :ivar error: Api error + :vartype error: ~azure.mgmt.compute.v2016_03_30.models.ApiError + """ + + _validation = { + 'name': {'readonly': True}, + 'status': {'readonly': True}, + 'start_time': {'readonly': True}, + 'end_time': {'readonly': True}, + 'error': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'status': {'key': 'status', 'type': 'str'}, + 'start_time': {'key': 'startTime', 'type': 'iso-8601'}, + 'end_time': {'key': 'endTime', 'type': 'iso-8601'}, + 'error': {'key': 'error', 'type': 'ApiError'}, + } + + def __init__(self, **kwargs): + super(OperationStatusResponse, self).__init__(**kwargs) + self.name = None + self.status = None + self.start_time = None + self.end_time = None + self.error = None + + +class OSDisk(Model): + """Specifies information about the operating system disk used by the virtual + machine.

    For more information about disks, see [About disks and + VHDs for Azure virtual + machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-about-disks-vhds?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). + + All required parameters must be populated in order to send to Azure. + + :param os_type: This property allows you to specify the type of the OS + that is included in the disk if creating a VM from user-image or a + specialized VHD.

    Possible values are:

    **Windows** +

    **Linux**. Possible values include: 'Windows', 'Linux' + :type os_type: str or + ~azure.mgmt.compute.v2016_03_30.models.OperatingSystemTypes + :param encryption_settings: Specifies the encryption settings for the OS + Disk.

    Minimum api-version: 2015-06-15 + :type encryption_settings: + ~azure.mgmt.compute.v2016_03_30.models.DiskEncryptionSettings + :param name: Required. The disk name. + :type name: str + :param vhd: Required. The virtual hard disk. + :type vhd: ~azure.mgmt.compute.v2016_03_30.models.VirtualHardDisk + :param image: The source user image virtual hard disk. The virtual hard + disk will be copied before being attached to the virtual machine. If + SourceImage is provided, the destination virtual hard drive must not + exist. + :type image: ~azure.mgmt.compute.v2016_03_30.models.VirtualHardDisk + :param caching: Specifies the caching requirements.

    Possible + values are:

    **None**

    **ReadOnly**

    **ReadWrite** +

    Default: **None for Standard storage. ReadOnly for Premium + storage**. Possible values include: 'None', 'ReadOnly', 'ReadWrite' + :type caching: str or ~azure.mgmt.compute.v2016_03_30.models.CachingTypes + :param create_option: Required. Specifies how the virtual machine should + be created.

    Possible values are:

    **Attach** \\u2013 This + value is used when you are using a specialized disk to create the virtual + machine.

    **FromImage** \\u2013 This value is used when you are + using an image to create the virtual machine. If you are using a platform + image, you also use the imageReference element described above. If you are + using a marketplace image, you also use the plan element previously + described. Possible values include: 'FromImage', 'Empty', 'Attach' + :type create_option: str or + ~azure.mgmt.compute.v2016_03_30.models.DiskCreateOptionTypes + :param disk_size_gb: Specifies the size of an empty data disk in + gigabytes. This element can be used to overwrite the size of the disk in a + virtual machine image.

    This value cannot be larger than 1023 GB + :type disk_size_gb: int + """ + + _validation = { + 'name': {'required': True}, + 'vhd': {'required': True}, + 'create_option': {'required': True}, + } + + _attribute_map = { + 'os_type': {'key': 'osType', 'type': 'OperatingSystemTypes'}, + 'encryption_settings': {'key': 'encryptionSettings', 'type': 'DiskEncryptionSettings'}, + 'name': {'key': 'name', 'type': 'str'}, + 'vhd': {'key': 'vhd', 'type': 'VirtualHardDisk'}, + 'image': {'key': 'image', 'type': 'VirtualHardDisk'}, + 'caching': {'key': 'caching', 'type': 'CachingTypes'}, + 'create_option': {'key': 'createOption', 'type': 'DiskCreateOptionTypes'}, + 'disk_size_gb': {'key': 'diskSizeGB', 'type': 'int'}, + } + + def __init__(self, **kwargs): + super(OSDisk, self).__init__(**kwargs) + self.os_type = kwargs.get('os_type', None) + self.encryption_settings = kwargs.get('encryption_settings', None) + self.name = kwargs.get('name', None) + self.vhd = kwargs.get('vhd', None) + self.image = kwargs.get('image', None) + self.caching = kwargs.get('caching', None) + self.create_option = kwargs.get('create_option', None) + self.disk_size_gb = kwargs.get('disk_size_gb', None) + + +class OSDiskImage(Model): + """Contains the os disk image information. + + All required parameters must be populated in order to send to Azure. + + :param operating_system: Required. The operating system of the + osDiskImage. Possible values include: 'Windows', 'Linux' + :type operating_system: str or + ~azure.mgmt.compute.v2016_03_30.models.OperatingSystemTypes + """ + + _validation = { + 'operating_system': {'required': True}, + } + + _attribute_map = { + 'operating_system': {'key': 'operatingSystem', 'type': 'OperatingSystemTypes'}, + } + + def __init__(self, **kwargs): + super(OSDiskImage, self).__init__(**kwargs) + self.operating_system = kwargs.get('operating_system', None) + + +class OSProfile(Model): + """Specifies the operating system settings for the virtual machine. + + :param computer_name: Specifies the host OS name of the virtual machine. +

    This name cannot be updated after the VM is created.

    + **Max-length (Windows):** 15 characters

    **Max-length (Linux):** + 64 characters.

    For naming conventions and restrictions see [Azure + infrastructure services implementation + guidelines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-infrastructure-subscription-accounts-guidelines?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json#1-naming-conventions). + :type computer_name: str + :param admin_username: Specifies the name of the administrator account. +

    **Windows-only restriction:** Cannot end in "."

    + **Disallowed values:** "administrator", "admin", "user", "user1", "test", + "user2", "test1", "user3", "admin1", "1", "123", "a", "actuser", "adm", + "admin2", "aspnet", "backup", "console", "david", "guest", "john", + "owner", "root", "server", "sql", "support", "support_388945a0", "sys", + "test2", "test3", "user4", "user5".

    **Minimum-length (Linux):** 1 + character

    **Max-length (Linux):** 64 characters

    + **Max-length (Windows):** 20 characters

  • For root access to + the Linux VM, see [Using root privileges on Linux virtual machines in + Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-use-root-privileges?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json)
  • + For a list of built-in system users on Linux that should not be used in + this field, see [Selecting User Names for Linux on + Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-usernames?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json) + :type admin_username: str + :param admin_password: Specifies the password of the administrator + account.

    **Minimum-length (Windows):** 8 characters

    + **Minimum-length (Linux):** 6 characters

    **Max-length + (Windows):** 123 characters

    **Max-length (Linux):** 72 characters +

    **Complexity requirements:** 3 out of 4 conditions below need to + be fulfilled
    Has lower characters
    Has upper characters
    Has a + digit
    Has a special character (Regex match [\\W_])

    + **Disallowed values:** "abc@123", "P@$$w0rd", "P@ssw0rd", "P@ssword123", + "Pa$$word", "pass@word1", "Password!", "Password1", "Password22", + "iloveyou!"

    For resetting the password, see [How to reset the + Remote Desktop service or its login password in a Windows + VM](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-reset-rdp?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json) +

    For resetting root password, see [Manage users, SSH, and check or + repair disks on Azure Linux VMs using the VMAccess + Extension](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-using-vmaccess-extension?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json#reset-root-password) + :type admin_password: str + :param custom_data: Specifies a base-64 encoded string of custom data. The + base-64 encoded string is decoded to a binary array that is saved as a + file on the Virtual Machine. The maximum length of the binary array is + 65535 bytes.

    For using cloud-init for your VM, see [Using + cloud-init to customize a Linux VM during + creation](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-using-cloud-init?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json) + :type custom_data: str + :param windows_configuration: Specifies Windows operating system settings + on the virtual machine. + :type windows_configuration: + ~azure.mgmt.compute.v2016_03_30.models.WindowsConfiguration + :param linux_configuration: Specifies the Linux operating system settings + on the virtual machine.

    For a list of supported Linux + distributions, see [Linux on Azure-Endorsed + Distributions](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-endorsed-distros?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json) +

    For running non-endorsed distributions, see [Information for + Non-Endorsed + Distributions](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-create-upload-generic?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json). + :type linux_configuration: + ~azure.mgmt.compute.v2016_03_30.models.LinuxConfiguration + :param secrets: Specifies set of certificates that should be installed + onto the virtual machine. + :type secrets: + list[~azure.mgmt.compute.v2016_03_30.models.VaultSecretGroup] + """ + + _attribute_map = { + 'computer_name': {'key': 'computerName', 'type': 'str'}, + 'admin_username': {'key': 'adminUsername', 'type': 'str'}, + 'admin_password': {'key': 'adminPassword', 'type': 'str'}, + 'custom_data': {'key': 'customData', 'type': 'str'}, + 'windows_configuration': {'key': 'windowsConfiguration', 'type': 'WindowsConfiguration'}, + 'linux_configuration': {'key': 'linuxConfiguration', 'type': 'LinuxConfiguration'}, + 'secrets': {'key': 'secrets', 'type': '[VaultSecretGroup]'}, + } + + def __init__(self, **kwargs): + super(OSProfile, self).__init__(**kwargs) + self.computer_name = kwargs.get('computer_name', None) + self.admin_username = kwargs.get('admin_username', None) + self.admin_password = kwargs.get('admin_password', None) + self.custom_data = kwargs.get('custom_data', None) + self.windows_configuration = kwargs.get('windows_configuration', None) + self.linux_configuration = kwargs.get('linux_configuration', None) + self.secrets = kwargs.get('secrets', None) + + +class Plan(Model): + """Specifies information about the marketplace image used to create the + virtual machine. This element is only used for marketplace images. Before + you can use a marketplace image from an API, you must enable the image for + programmatic use. In the Azure portal, find the marketplace image that you + want to use and then click **Want to deploy programmatically, Get Started + ->**. Enter any required information and then click **Save**. + + :param name: The plan ID. + :type name: str + :param publisher: The publisher ID. + :type publisher: str + :param product: Specifies the product of the image from the marketplace. + This is the same value as Offer under the imageReference element. + :type product: str + :param promotion_code: The promotion code. + :type promotion_code: str + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'publisher': {'key': 'publisher', 'type': 'str'}, + 'product': {'key': 'product', 'type': 'str'}, + 'promotion_code': {'key': 'promotionCode', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(Plan, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.publisher = kwargs.get('publisher', None) + self.product = kwargs.get('product', None) + self.promotion_code = kwargs.get('promotion_code', None) + + +class PurchasePlan(Model): + """Used for establishing the purchase context of any 3rd Party artifact + through MarketPlace. + + All required parameters must be populated in order to send to Azure. + + :param publisher: Required. The publisher ID. + :type publisher: str + :param name: Required. The plan ID. + :type name: str + :param product: Required. Specifies the product of the image from the + marketplace. This is the same value as Offer under the imageReference + element. + :type product: str + """ + + _validation = { + 'publisher': {'required': True}, + 'name': {'required': True}, + 'product': {'required': True}, + } + + _attribute_map = { + 'publisher': {'key': 'publisher', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'product': {'key': 'product', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(PurchasePlan, self).__init__(**kwargs) + self.publisher = kwargs.get('publisher', None) + self.name = kwargs.get('name', None) + self.product = kwargs.get('product', None) + + +class Sku(Model): + """Describes a virtual machine scale set sku. + + :param name: The sku name. + :type name: str + :param tier: Specifies the tier of virtual machines in a scale set.

    Possible Values:

    **Standard**

    **Basic** + :type tier: str + :param capacity: Specifies the number of virtual machines in the scale + set. + :type capacity: long + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'tier': {'key': 'tier', 'type': 'str'}, + 'capacity': {'key': 'capacity', 'type': 'long'}, + } + + def __init__(self, **kwargs): + super(Sku, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.tier = kwargs.get('tier', None) + self.capacity = kwargs.get('capacity', None) + + +class SshConfiguration(Model): + """SSH configuration for Linux based VMs running on Azure. + + :param public_keys: The list of SSH public keys used to authenticate with + linux based VMs. + :type public_keys: + list[~azure.mgmt.compute.v2016_03_30.models.SshPublicKey] + """ + + _attribute_map = { + 'public_keys': {'key': 'publicKeys', 'type': '[SshPublicKey]'}, + } + + def __init__(self, **kwargs): + super(SshConfiguration, self).__init__(**kwargs) + self.public_keys = kwargs.get('public_keys', None) + + +class SshPublicKey(Model): + """Contains information about SSH certificate public key and the path on the + Linux VM where the public key is placed. + + :param path: Specifies the full path on the created VM where ssh public + key is stored. If the file already exists, the specified key is appended + to the file. Example: /home/user/.ssh/authorized_keys + :type path: str + :param key_data: SSH public key certificate used to authenticate with the + VM through ssh. The key needs to be at least 2048-bit and in ssh-rsa + format.

    For creating ssh keys, see [Create SSH keys on Linux and + Mac for Linux VMs in + Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-mac-create-ssh-keys?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json). + :type key_data: str + """ + + _attribute_map = { + 'path': {'key': 'path', 'type': 'str'}, + 'key_data': {'key': 'keyData', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(SshPublicKey, self).__init__(**kwargs) + self.path = kwargs.get('path', None) + self.key_data = kwargs.get('key_data', None) + + +class StorageProfile(Model): + """Specifies the storage settings for the virtual machine disks. + + :param image_reference: Specifies information about the image to use. You + can specify information about platform images, marketplace images, or + virtual machine images. This element is required when you want to use a + platform image, marketplace image, or virtual machine image, but is not + used in other creation operations. + :type image_reference: + ~azure.mgmt.compute.v2016_03_30.models.ImageReference + :param os_disk: Specifies information about the operating system disk used + by the virtual machine.

    For more information about disks, see + [About disks and VHDs for Azure virtual + machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-about-disks-vhds?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). + :type os_disk: ~azure.mgmt.compute.v2016_03_30.models.OSDisk + :param data_disks: Specifies the parameters that are used to add a data + disk to a virtual machine.

    For more information about disks, see + [About disks and VHDs for Azure virtual + machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-about-disks-vhds?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). + :type data_disks: list[~azure.mgmt.compute.v2016_03_30.models.DataDisk] + """ + + _attribute_map = { + 'image_reference': {'key': 'imageReference', 'type': 'ImageReference'}, + 'os_disk': {'key': 'osDisk', 'type': 'OSDisk'}, + 'data_disks': {'key': 'dataDisks', 'type': '[DataDisk]'}, + } + + def __init__(self, **kwargs): + super(StorageProfile, self).__init__(**kwargs) + self.image_reference = kwargs.get('image_reference', None) + self.os_disk = kwargs.get('os_disk', None) + self.data_disks = kwargs.get('data_disks', None) + + +class UpdateResource(Model): + """The Update Resource model definition. + + :param tags: Resource tags + :type tags: dict[str, str] + """ + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__(self, **kwargs): + super(UpdateResource, self).__init__(**kwargs) + self.tags = kwargs.get('tags', None) + + +class UpgradePolicy(Model): + """Describes an upgrade policy - automatic or manual. + + :param mode: Specifies the mode of an upgrade to virtual machines in the + scale set.

    Possible values are:

    **Manual** - You + control the application of updates to virtual machines in the scale set. + You do this by using the manualUpgrade action.

    **Automatic** - + All virtual machines in the scale set are automatically updated at the + same time. Possible values include: 'Automatic', 'Manual' + :type mode: str or ~azure.mgmt.compute.v2016_03_30.models.UpgradeMode + """ + + _attribute_map = { + 'mode': {'key': 'mode', 'type': 'UpgradeMode'}, + } + + def __init__(self, **kwargs): + super(UpgradePolicy, self).__init__(**kwargs) + self.mode = kwargs.get('mode', None) + + +class Usage(Model): + """Describes Compute Resource Usage. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar unit: Required. An enum describing the unit of usage measurement. + Default value: "Count" . + :vartype unit: str + :param current_value: Required. The current usage of the resource. + :type current_value: int + :param limit: Required. The maximum permitted usage of the resource. + :type limit: long + :param name: Required. The name of the type of usage. + :type name: ~azure.mgmt.compute.v2016_03_30.models.UsageName + """ + + _validation = { + 'unit': {'required': True, 'constant': True}, + 'current_value': {'required': True}, + 'limit': {'required': True}, + 'name': {'required': True}, + } + + _attribute_map = { + 'unit': {'key': 'unit', 'type': 'str'}, + 'current_value': {'key': 'currentValue', 'type': 'int'}, + 'limit': {'key': 'limit', 'type': 'long'}, + 'name': {'key': 'name', 'type': 'UsageName'}, + } + + unit = "Count" + + def __init__(self, **kwargs): + super(Usage, self).__init__(**kwargs) + self.current_value = kwargs.get('current_value', None) + self.limit = kwargs.get('limit', None) + self.name = kwargs.get('name', None) + + +class UsageName(Model): + """The Usage Names. + + :param value: The name of the resource. + :type value: str + :param localized_value: The localized name of the resource. + :type localized_value: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': 'str'}, + 'localized_value': {'key': 'localizedValue', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(UsageName, self).__init__(**kwargs) + self.value = kwargs.get('value', None) + self.localized_value = kwargs.get('localized_value', None) + + +class VaultCertificate(Model): + """Describes a single certificate reference in a Key Vault, and where the + certificate should reside on the VM. + + :param certificate_url: This is the URL of a certificate that has been + uploaded to Key Vault as a secret. For adding a secret to the Key Vault, + see [Add a key or secret to the key + vault](https://docs.microsoft.com/azure/key-vault/key-vault-get-started/#add). + In this case, your certificate needs to be It is the Base64 encoding of + the following JSON Object which is encoded in UTF-8:

    {
    + "data":"",
    "dataType":"pfx",
    + "password":""
    } + :type certificate_url: str + :param certificate_store: For Windows VMs, specifies the certificate store + on the Virtual Machine to which the certificate should be added. The + specified certificate store is implicitly in the LocalMachine account. +

    For Linux VMs, the certificate file is placed under the + /var/lib/waagent directory, with the file name + <UppercaseThumbprint>.crt for the X509 certificate file and + <UppercaseThumbprint>.prv for private key. Both of these files are + .pem formatted. + :type certificate_store: str + """ + + _attribute_map = { + 'certificate_url': {'key': 'certificateUrl', 'type': 'str'}, + 'certificate_store': {'key': 'certificateStore', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(VaultCertificate, self).__init__(**kwargs) + self.certificate_url = kwargs.get('certificate_url', None) + self.certificate_store = kwargs.get('certificate_store', None) + + +class VaultSecretGroup(Model): + """Describes a set of certificates which are all in the same Key Vault. + + :param source_vault: The relative URL of the Key Vault containing all of + the certificates in VaultCertificates. + :type source_vault: ~azure.mgmt.compute.v2016_03_30.models.SubResource + :param vault_certificates: The list of key vault references in SourceVault + which contain certificates. + :type vault_certificates: + list[~azure.mgmt.compute.v2016_03_30.models.VaultCertificate] + """ + + _attribute_map = { + 'source_vault': {'key': 'sourceVault', 'type': 'SubResource'}, + 'vault_certificates': {'key': 'vaultCertificates', 'type': '[VaultCertificate]'}, + } + + def __init__(self, **kwargs): + super(VaultSecretGroup, self).__init__(**kwargs) + self.source_vault = kwargs.get('source_vault', None) + self.vault_certificates = kwargs.get('vault_certificates', None) + + +class VirtualHardDisk(Model): + """Describes the uri of a disk. + + :param uri: Specifies the virtual hard disk's uri. + :type uri: str + """ + + _attribute_map = { + 'uri': {'key': 'uri', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(VirtualHardDisk, self).__init__(**kwargs) + self.uri = kwargs.get('uri', None) + + +class VirtualMachine(Resource): + """Describes a Virtual Machine. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource Id + :vartype id: str + :ivar name: Resource name + :vartype name: str + :ivar type: Resource type + :vartype type: str + :param location: Required. Resource location + :type location: str + :param tags: Resource tags + :type tags: dict[str, str] + :param plan: Specifies information about the marketplace image used to + create the virtual machine. This element is only used for marketplace + images. Before you can use a marketplace image from an API, you must + enable the image for programmatic use. In the Azure portal, find the + marketplace image that you want to use and then click **Want to deploy + programmatically, Get Started ->**. Enter any required information and + then click **Save**. + :type plan: ~azure.mgmt.compute.v2016_03_30.models.Plan + :param hardware_profile: Specifies the hardware settings for the virtual + machine. + :type hardware_profile: + ~azure.mgmt.compute.v2016_03_30.models.HardwareProfile + :param storage_profile: Specifies the storage settings for the virtual + machine disks. + :type storage_profile: + ~azure.mgmt.compute.v2016_03_30.models.StorageProfile + :param os_profile: Specifies the operating system settings for the virtual + machine. + :type os_profile: ~azure.mgmt.compute.v2016_03_30.models.OSProfile + :param network_profile: Specifies the network interfaces of the virtual + machine. + :type network_profile: + ~azure.mgmt.compute.v2016_03_30.models.NetworkProfile + :param diagnostics_profile: Specifies the boot diagnostic settings state. +

    Minimum api-version: 2015-06-15. + :type diagnostics_profile: + ~azure.mgmt.compute.v2016_03_30.models.DiagnosticsProfile + :param availability_set: Specifies information about the availability set + that the virtual machine should be assigned to. Virtual machines specified + in the same availability set are allocated to different nodes to maximize + availability. For more information about availability sets, see [Manage + the availability of virtual + machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-manage-availability?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). +

    For more information on Azure planned maintenance, see [Planned + maintenance for virtual machines in + Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-planned-maintenance?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json) +

    Currently, a VM can only be added to availability set at creation + time. An existing VM cannot be added to an availability set. + :type availability_set: ~azure.mgmt.compute.v2016_03_30.models.SubResource + :ivar provisioning_state: The provisioning state, which only appears in + the response. + :vartype provisioning_state: str + :ivar instance_view: The virtual machine instance view. + :vartype instance_view: + ~azure.mgmt.compute.v2016_03_30.models.VirtualMachineInstanceView + :param license_type: Specifies that the image or disk that is being used + was licensed on-premises. This element is only used for images that + contain the Windows Server operating system.

    Possible values are: +

    Windows_Client

    Windows_Server

    If this element + is included in a request for an update, the value must match the initial + value. This value cannot be updated.

    For more information, see + [Azure Hybrid Use Benefit for Windows + Server](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-hybrid-use-benefit-licensing?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json) +

    Minimum api-version: 2015-06-15 + :type license_type: str + :ivar vm_id: Specifies the VM unique ID which is a 128-bits identifier + that is encoded and stored in all Azure IaaS VMs SMBIOS and can be read + using platform BIOS commands. + :vartype vm_id: str + :ivar resources: The virtual machine child extension resources. + :vartype resources: + list[~azure.mgmt.compute.v2016_03_30.models.VirtualMachineExtension] + :param identity: The identity of the virtual machine, if configured. + :type identity: + ~azure.mgmt.compute.v2016_03_30.models.VirtualMachineIdentity + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + 'provisioning_state': {'readonly': True}, + 'instance_view': {'readonly': True}, + 'vm_id': {'readonly': True}, + 'resources': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'plan': {'key': 'plan', 'type': 'Plan'}, + 'hardware_profile': {'key': 'properties.hardwareProfile', 'type': 'HardwareProfile'}, + 'storage_profile': {'key': 'properties.storageProfile', 'type': 'StorageProfile'}, + 'os_profile': {'key': 'properties.osProfile', 'type': 'OSProfile'}, + 'network_profile': {'key': 'properties.networkProfile', 'type': 'NetworkProfile'}, + 'diagnostics_profile': {'key': 'properties.diagnosticsProfile', 'type': 'DiagnosticsProfile'}, + 'availability_set': {'key': 'properties.availabilitySet', 'type': 'SubResource'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'instance_view': {'key': 'properties.instanceView', 'type': 'VirtualMachineInstanceView'}, + 'license_type': {'key': 'properties.licenseType', 'type': 'str'}, + 'vm_id': {'key': 'properties.vmId', 'type': 'str'}, + 'resources': {'key': 'resources', 'type': '[VirtualMachineExtension]'}, + 'identity': {'key': 'identity', 'type': 'VirtualMachineIdentity'}, + } + + def __init__(self, **kwargs): + super(VirtualMachine, self).__init__(**kwargs) + self.plan = kwargs.get('plan', None) + self.hardware_profile = kwargs.get('hardware_profile', None) + self.storage_profile = kwargs.get('storage_profile', None) + self.os_profile = kwargs.get('os_profile', None) + self.network_profile = kwargs.get('network_profile', None) + self.diagnostics_profile = kwargs.get('diagnostics_profile', None) + self.availability_set = kwargs.get('availability_set', None) + self.provisioning_state = None + self.instance_view = None + self.license_type = kwargs.get('license_type', None) + self.vm_id = None + self.resources = None + self.identity = kwargs.get('identity', None) + + +class VirtualMachineAgentInstanceView(Model): + """The instance view of the VM Agent running on the virtual machine. + + :param vm_agent_version: The VM Agent full version. + :type vm_agent_version: str + :param extension_handlers: The virtual machine extension handler instance + view. + :type extension_handlers: + list[~azure.mgmt.compute.v2016_03_30.models.VirtualMachineExtensionHandlerInstanceView] + :param statuses: The resource status information. + :type statuses: + list[~azure.mgmt.compute.v2016_03_30.models.InstanceViewStatus] + """ + + _attribute_map = { + 'vm_agent_version': {'key': 'vmAgentVersion', 'type': 'str'}, + 'extension_handlers': {'key': 'extensionHandlers', 'type': '[VirtualMachineExtensionHandlerInstanceView]'}, + 'statuses': {'key': 'statuses', 'type': '[InstanceViewStatus]'}, + } + + def __init__(self, **kwargs): + super(VirtualMachineAgentInstanceView, self).__init__(**kwargs) + self.vm_agent_version = kwargs.get('vm_agent_version', None) + self.extension_handlers = kwargs.get('extension_handlers', None) + self.statuses = kwargs.get('statuses', None) + + +class VirtualMachineCaptureParameters(Model): + """Capture Virtual Machine parameters. + + All required parameters must be populated in order to send to Azure. + + :param vhd_prefix: Required. The captured virtual hard disk's name prefix. + :type vhd_prefix: str + :param destination_container_name: Required. The destination container + name. + :type destination_container_name: str + :param overwrite_vhds: Required. Specifies whether to overwrite the + destination virtual hard disk, in case of conflict. + :type overwrite_vhds: bool + """ + + _validation = { + 'vhd_prefix': {'required': True}, + 'destination_container_name': {'required': True}, + 'overwrite_vhds': {'required': True}, + } + + _attribute_map = { + 'vhd_prefix': {'key': 'vhdPrefix', 'type': 'str'}, + 'destination_container_name': {'key': 'destinationContainerName', 'type': 'str'}, + 'overwrite_vhds': {'key': 'overwriteVhds', 'type': 'bool'}, + } + + def __init__(self, **kwargs): + super(VirtualMachineCaptureParameters, self).__init__(**kwargs) + self.vhd_prefix = kwargs.get('vhd_prefix', None) + self.destination_container_name = kwargs.get('destination_container_name', None) + self.overwrite_vhds = kwargs.get('overwrite_vhds', None) + + +class VirtualMachineCaptureResult(SubResource): + """Resource Id. + + :param id: Resource Id + :type id: str + :param output: Operation output data (raw JSON) + :type output: object + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'output': {'key': 'properties.output', 'type': 'object'}, + } + + def __init__(self, **kwargs): + super(VirtualMachineCaptureResult, self).__init__(**kwargs) + self.output = kwargs.get('output', None) + + +class VirtualMachineExtension(Resource): + """Describes a Virtual Machine Extension. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource Id + :vartype id: str + :ivar name: Resource name + :vartype name: str + :ivar type: Resource type + :vartype type: str + :param location: Required. Resource location + :type location: str + :param tags: Resource tags + :type tags: dict[str, str] + :param force_update_tag: How the extension handler should be forced to + update even if the extension configuration has not changed. + :type force_update_tag: str + :param publisher: The name of the extension handler publisher. + :type publisher: str + :param virtual_machine_extension_type: Specifies the type of the + extension; an example is "CustomScriptExtension". + :type virtual_machine_extension_type: str + :param type_handler_version: Specifies the version of the script handler. + :type type_handler_version: str + :param auto_upgrade_minor_version: Indicates whether the extension should + use a newer minor version if one is available at deployment time. Once + deployed, however, the extension will not upgrade minor versions unless + redeployed, even with this property set to true. + :type auto_upgrade_minor_version: bool + :param settings: Json formatted public settings for the extension. + :type settings: object + :param protected_settings: The extension can contain either + protectedSettings or protectedSettingsFromKeyVault or no protected + settings at all. + :type protected_settings: object + :ivar provisioning_state: The provisioning state, which only appears in + the response. + :vartype provisioning_state: str + :param instance_view: The virtual machine extension instance view. + :type instance_view: + ~azure.mgmt.compute.v2016_03_30.models.VirtualMachineExtensionInstanceView + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'force_update_tag': {'key': 'properties.forceUpdateTag', 'type': 'str'}, + 'publisher': {'key': 'properties.publisher', 'type': 'str'}, + 'virtual_machine_extension_type': {'key': 'properties.type', 'type': 'str'}, + 'type_handler_version': {'key': 'properties.typeHandlerVersion', 'type': 'str'}, + 'auto_upgrade_minor_version': {'key': 'properties.autoUpgradeMinorVersion', 'type': 'bool'}, + 'settings': {'key': 'properties.settings', 'type': 'object'}, + 'protected_settings': {'key': 'properties.protectedSettings', 'type': 'object'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'instance_view': {'key': 'properties.instanceView', 'type': 'VirtualMachineExtensionInstanceView'}, + } + + def __init__(self, **kwargs): + super(VirtualMachineExtension, self).__init__(**kwargs) + self.force_update_tag = kwargs.get('force_update_tag', None) + self.publisher = kwargs.get('publisher', None) + self.virtual_machine_extension_type = kwargs.get('virtual_machine_extension_type', None) + self.type_handler_version = kwargs.get('type_handler_version', None) + self.auto_upgrade_minor_version = kwargs.get('auto_upgrade_minor_version', None) + self.settings = kwargs.get('settings', None) + self.protected_settings = kwargs.get('protected_settings', None) + self.provisioning_state = None + self.instance_view = kwargs.get('instance_view', None) + + +class VirtualMachineExtensionHandlerInstanceView(Model): + """The instance view of a virtual machine extension handler. + + :param type: Specifies the type of the extension; an example is + "CustomScriptExtension". + :type type: str + :param type_handler_version: Specifies the version of the script handler. + :type type_handler_version: str + :param status: The extension handler status. + :type status: ~azure.mgmt.compute.v2016_03_30.models.InstanceViewStatus + """ + + _attribute_map = { + 'type': {'key': 'type', 'type': 'str'}, + 'type_handler_version': {'key': 'typeHandlerVersion', 'type': 'str'}, + 'status': {'key': 'status', 'type': 'InstanceViewStatus'}, + } + + def __init__(self, **kwargs): + super(VirtualMachineExtensionHandlerInstanceView, self).__init__(**kwargs) + self.type = kwargs.get('type', None) + self.type_handler_version = kwargs.get('type_handler_version', None) + self.status = kwargs.get('status', None) + + +class VirtualMachineExtensionImage(Resource): + """Describes a Virtual Machine Extension Image. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource Id + :vartype id: str + :ivar name: Resource name + :vartype name: str + :ivar type: Resource type + :vartype type: str + :param location: Required. Resource location + :type location: str + :param tags: Resource tags + :type tags: dict[str, str] + :param operating_system: Required. The operating system this extension + supports. + :type operating_system: str + :param compute_role: Required. The type of role (IaaS or PaaS) this + extension supports. + :type compute_role: str + :param handler_schema: Required. The schema defined by publisher, where + extension consumers should provide settings in a matching schema. + :type handler_schema: str + :param vm_scale_set_enabled: Whether the extension can be used on xRP + VMScaleSets. By default existing extensions are usable on scalesets, but + there might be cases where a publisher wants to explicitly indicate the + extension is only enabled for CRP VMs but not VMSS. + :type vm_scale_set_enabled: bool + :param supports_multiple_extensions: Whether the handler can support + multiple extensions. + :type supports_multiple_extensions: bool + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + 'operating_system': {'required': True}, + 'compute_role': {'required': True}, + 'handler_schema': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'operating_system': {'key': 'properties.operatingSystem', 'type': 'str'}, + 'compute_role': {'key': 'properties.computeRole', 'type': 'str'}, + 'handler_schema': {'key': 'properties.handlerSchema', 'type': 'str'}, + 'vm_scale_set_enabled': {'key': 'properties.vmScaleSetEnabled', 'type': 'bool'}, + 'supports_multiple_extensions': {'key': 'properties.supportsMultipleExtensions', 'type': 'bool'}, + } + + def __init__(self, **kwargs): + super(VirtualMachineExtensionImage, self).__init__(**kwargs) + self.operating_system = kwargs.get('operating_system', None) + self.compute_role = kwargs.get('compute_role', None) + self.handler_schema = kwargs.get('handler_schema', None) + self.vm_scale_set_enabled = kwargs.get('vm_scale_set_enabled', None) + self.supports_multiple_extensions = kwargs.get('supports_multiple_extensions', None) + + +class VirtualMachineExtensionInstanceView(Model): + """The instance view of a virtual machine extension. + + :param name: The virtual machine extension name. + :type name: str + :param type: Specifies the type of the extension; an example is + "CustomScriptExtension". + :type type: str + :param type_handler_version: Specifies the version of the script handler. + :type type_handler_version: str + :param substatuses: The resource status information. + :type substatuses: + list[~azure.mgmt.compute.v2016_03_30.models.InstanceViewStatus] + :param statuses: The resource status information. + :type statuses: + list[~azure.mgmt.compute.v2016_03_30.models.InstanceViewStatus] + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'type_handler_version': {'key': 'typeHandlerVersion', 'type': 'str'}, + 'substatuses': {'key': 'substatuses', 'type': '[InstanceViewStatus]'}, + 'statuses': {'key': 'statuses', 'type': '[InstanceViewStatus]'}, + } + + def __init__(self, **kwargs): + super(VirtualMachineExtensionInstanceView, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.type = kwargs.get('type', None) + self.type_handler_version = kwargs.get('type_handler_version', None) + self.substatuses = kwargs.get('substatuses', None) + self.statuses = kwargs.get('statuses', None) + + +class VirtualMachineExtensionsListResult(Model): + """The List Extension operation response. + + :param value: The list of extensions + :type value: + list[~azure.mgmt.compute.v2016_03_30.models.VirtualMachineExtension] + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[VirtualMachineExtension]'}, + } + + def __init__(self, **kwargs): + super(VirtualMachineExtensionsListResult, self).__init__(**kwargs) + self.value = kwargs.get('value', None) + + +class VirtualMachineExtensionUpdate(UpdateResource): + """Describes a Virtual Machine Extension. + + :param tags: Resource tags + :type tags: dict[str, str] + :param force_update_tag: How the extension handler should be forced to + update even if the extension configuration has not changed. + :type force_update_tag: str + :param publisher: The name of the extension handler publisher. + :type publisher: str + :param type: Specifies the type of the extension; an example is + "CustomScriptExtension". + :type type: str + :param type_handler_version: Specifies the version of the script handler. + :type type_handler_version: str + :param auto_upgrade_minor_version: Indicates whether the extension should + use a newer minor version if one is available at deployment time. Once + deployed, however, the extension will not upgrade minor versions unless + redeployed, even with this property set to true. + :type auto_upgrade_minor_version: bool + :param settings: Json formatted public settings for the extension. + :type settings: object + :param protected_settings: The extension can contain either + protectedSettings or protectedSettingsFromKeyVault or no protected + settings at all. + :type protected_settings: object + """ + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + 'force_update_tag': {'key': 'properties.forceUpdateTag', 'type': 'str'}, + 'publisher': {'key': 'properties.publisher', 'type': 'str'}, + 'type': {'key': 'properties.type', 'type': 'str'}, + 'type_handler_version': {'key': 'properties.typeHandlerVersion', 'type': 'str'}, + 'auto_upgrade_minor_version': {'key': 'properties.autoUpgradeMinorVersion', 'type': 'bool'}, + 'settings': {'key': 'properties.settings', 'type': 'object'}, + 'protected_settings': {'key': 'properties.protectedSettings', 'type': 'object'}, + } + + def __init__(self, **kwargs): + super(VirtualMachineExtensionUpdate, self).__init__(**kwargs) + self.force_update_tag = kwargs.get('force_update_tag', None) + self.publisher = kwargs.get('publisher', None) + self.type = kwargs.get('type', None) + self.type_handler_version = kwargs.get('type_handler_version', None) + self.auto_upgrade_minor_version = kwargs.get('auto_upgrade_minor_version', None) + self.settings = kwargs.get('settings', None) + self.protected_settings = kwargs.get('protected_settings', None) + + +class VirtualMachineIdentity(Model): + """Identity for the virtual machine. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar principal_id: The principal id of virtual machine identity. + :vartype principal_id: str + :ivar tenant_id: The tenant id associated with the virtual machine. + :vartype tenant_id: str + :param type: The type of identity used for the virtual machine. Currently, + the only supported type is 'SystemAssigned', which implicitly creates an + identity. Possible values include: 'SystemAssigned' + :type type: str or + ~azure.mgmt.compute.v2016_03_30.models.ResourceIdentityType + """ + + _validation = { + 'principal_id': {'readonly': True}, + 'tenant_id': {'readonly': True}, + } + + _attribute_map = { + 'principal_id': {'key': 'principalId', 'type': 'str'}, + 'tenant_id': {'key': 'tenantId', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'ResourceIdentityType'}, + } + + def __init__(self, **kwargs): + super(VirtualMachineIdentity, self).__init__(**kwargs) + self.principal_id = None + self.tenant_id = None + self.type = kwargs.get('type', None) + + +class VirtualMachineImageResource(SubResource): + """Virtual machine image resource information. + + All required parameters must be populated in order to send to Azure. + + :param id: Resource Id + :type id: str + :param name: Required. The name of the resource. + :type name: str + :param location: Required. The supported Azure location of the resource. + :type location: str + :param tags: Specifies the tags that are assigned to the virtual machine. + For more information about using tags, see [Using tags to organize your + Azure + resources](https://docs.microsoft.com/azure/azure-resource-manager/resource-group-using-tags.md). + :type tags: dict[str, str] + """ + + _validation = { + 'name': {'required': True}, + 'location': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__(self, **kwargs): + super(VirtualMachineImageResource, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.location = kwargs.get('location', None) + self.tags = kwargs.get('tags', None) + + +class VirtualMachineImage(VirtualMachineImageResource): + """Describes a Virtual Machine Image. + + All required parameters must be populated in order to send to Azure. + + :param id: Resource Id + :type id: str + :param name: Required. The name of the resource. + :type name: str + :param location: Required. The supported Azure location of the resource. + :type location: str + :param tags: Specifies the tags that are assigned to the virtual machine. + For more information about using tags, see [Using tags to organize your + Azure + resources](https://docs.microsoft.com/azure/azure-resource-manager/resource-group-using-tags.md). + :type tags: dict[str, str] + :param plan: + :type plan: ~azure.mgmt.compute.v2016_03_30.models.PurchasePlan + :param os_disk_image: + :type os_disk_image: ~azure.mgmt.compute.v2016_03_30.models.OSDiskImage + :param data_disk_images: + :type data_disk_images: + list[~azure.mgmt.compute.v2016_03_30.models.DataDiskImage] + """ + + _validation = { + 'name': {'required': True}, + 'location': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'plan': {'key': 'properties.plan', 'type': 'PurchasePlan'}, + 'os_disk_image': {'key': 'properties.osDiskImage', 'type': 'OSDiskImage'}, + 'data_disk_images': {'key': 'properties.dataDiskImages', 'type': '[DataDiskImage]'}, + } + + def __init__(self, **kwargs): + super(VirtualMachineImage, self).__init__(**kwargs) + self.plan = kwargs.get('plan', None) + self.os_disk_image = kwargs.get('os_disk_image', None) + self.data_disk_images = kwargs.get('data_disk_images', None) + + +class VirtualMachineInstanceView(Model): + """The instance view of a virtual machine. + + :param platform_update_domain: Specifies the update domain of the virtual + machine. + :type platform_update_domain: int + :param platform_fault_domain: Specifies the fault domain of the virtual + machine. + :type platform_fault_domain: int + :param rdp_thumb_print: The Remote desktop certificate thumbprint. + :type rdp_thumb_print: str + :param vm_agent: The VM Agent running on the virtual machine. + :type vm_agent: + ~azure.mgmt.compute.v2016_03_30.models.VirtualMachineAgentInstanceView + :param disks: The virtual machine disk information. + :type disks: list[~azure.mgmt.compute.v2016_03_30.models.DiskInstanceView] + :param extensions: The extensions information. + :type extensions: + list[~azure.mgmt.compute.v2016_03_30.models.VirtualMachineExtensionInstanceView] + :param boot_diagnostics: Boot Diagnostics is a debugging feature which + allows you to view Console Output and Screenshot to diagnose VM status. +

    You can easily view the output of your console log.

    + Azure also enables you to see a screenshot of the VM from the hypervisor. + :type boot_diagnostics: + ~azure.mgmt.compute.v2016_03_30.models.BootDiagnosticsInstanceView + :param statuses: The resource status information. + :type statuses: + list[~azure.mgmt.compute.v2016_03_30.models.InstanceViewStatus] + """ + + _attribute_map = { + 'platform_update_domain': {'key': 'platformUpdateDomain', 'type': 'int'}, + 'platform_fault_domain': {'key': 'platformFaultDomain', 'type': 'int'}, + 'rdp_thumb_print': {'key': 'rdpThumbPrint', 'type': 'str'}, + 'vm_agent': {'key': 'vmAgent', 'type': 'VirtualMachineAgentInstanceView'}, + 'disks': {'key': 'disks', 'type': '[DiskInstanceView]'}, + 'extensions': {'key': 'extensions', 'type': '[VirtualMachineExtensionInstanceView]'}, + 'boot_diagnostics': {'key': 'bootDiagnostics', 'type': 'BootDiagnosticsInstanceView'}, + 'statuses': {'key': 'statuses', 'type': '[InstanceViewStatus]'}, + } + + def __init__(self, **kwargs): + super(VirtualMachineInstanceView, self).__init__(**kwargs) + self.platform_update_domain = kwargs.get('platform_update_domain', None) + self.platform_fault_domain = kwargs.get('platform_fault_domain', None) + self.rdp_thumb_print = kwargs.get('rdp_thumb_print', None) + self.vm_agent = kwargs.get('vm_agent', None) + self.disks = kwargs.get('disks', None) + self.extensions = kwargs.get('extensions', None) + self.boot_diagnostics = kwargs.get('boot_diagnostics', None) + self.statuses = kwargs.get('statuses', None) + + +class VirtualMachineScaleSet(Resource): + """Describes a Virtual Machine Scale Set. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource Id + :vartype id: str + :ivar name: Resource name + :vartype name: str + :ivar type: Resource type + :vartype type: str + :param location: Required. Resource location + :type location: str + :param tags: Resource tags + :type tags: dict[str, str] + :param sku: The virtual machine scale set sku. + :type sku: ~azure.mgmt.compute.v2016_03_30.models.Sku + :param upgrade_policy: The upgrade policy. + :type upgrade_policy: ~azure.mgmt.compute.v2016_03_30.models.UpgradePolicy + :param virtual_machine_profile: The virtual machine profile. + :type virtual_machine_profile: + ~azure.mgmt.compute.v2016_03_30.models.VirtualMachineScaleSetVMProfile + :ivar provisioning_state: The provisioning state, which only appears in + the response. + :vartype provisioning_state: str + :param over_provision: Specifies whether the Virtual Machine Scale Set + should be overprovisioned. + :type over_provision: bool + :param identity: The identity of the virtual machine scale set, if + configured. + :type identity: + ~azure.mgmt.compute.v2016_03_30.models.VirtualMachineScaleSetIdentity + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'sku': {'key': 'sku', 'type': 'Sku'}, + 'upgrade_policy': {'key': 'properties.upgradePolicy', 'type': 'UpgradePolicy'}, + 'virtual_machine_profile': {'key': 'properties.virtualMachineProfile', 'type': 'VirtualMachineScaleSetVMProfile'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'over_provision': {'key': 'properties.overProvision', 'type': 'bool'}, + 'identity': {'key': 'identity', 'type': 'VirtualMachineScaleSetIdentity'}, + } + + def __init__(self, **kwargs): + super(VirtualMachineScaleSet, self).__init__(**kwargs) + self.sku = kwargs.get('sku', None) + self.upgrade_policy = kwargs.get('upgrade_policy', None) + self.virtual_machine_profile = kwargs.get('virtual_machine_profile', None) + self.provisioning_state = None + self.over_provision = kwargs.get('over_provision', None) + self.identity = kwargs.get('identity', None) + + +class VirtualMachineScaleSetExtension(SubResource): + """Describes a Virtual Machine Scale Set Extension. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :param id: Resource Id + :type id: str + :param name: The name of the extension. + :type name: str + :param publisher: The name of the extension handler publisher. + :type publisher: str + :param type: The type of the extension handler. + :type type: str + :param type_handler_version: The type version of the extension handler. + :type type_handler_version: str + :param auto_upgrade_minor_version: Whether the extension handler should be + automatically upgraded across minor versions. + :type auto_upgrade_minor_version: bool + :param settings: Json formatted public settings for the extension. + :type settings: object + :param protected_settings: Json formatted protected settings for the + extension. + :type protected_settings: object + :ivar provisioning_state: The provisioning state, which only appears in + the response. + :vartype provisioning_state: str + """ + + _validation = { + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'publisher': {'key': 'properties.publisher', 'type': 'str'}, + 'type': {'key': 'properties.type', 'type': 'str'}, + 'type_handler_version': {'key': 'properties.typeHandlerVersion', 'type': 'str'}, + 'auto_upgrade_minor_version': {'key': 'properties.autoUpgradeMinorVersion', 'type': 'bool'}, + 'settings': {'key': 'properties.settings', 'type': 'object'}, + 'protected_settings': {'key': 'properties.protectedSettings', 'type': 'object'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(VirtualMachineScaleSetExtension, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.publisher = kwargs.get('publisher', None) + self.type = kwargs.get('type', None) + self.type_handler_version = kwargs.get('type_handler_version', None) + self.auto_upgrade_minor_version = kwargs.get('auto_upgrade_minor_version', None) + self.settings = kwargs.get('settings', None) + self.protected_settings = kwargs.get('protected_settings', None) + self.provisioning_state = None + + +class VirtualMachineScaleSetExtensionProfile(Model): + """Describes a virtual machine scale set extension profile. + + :param extensions: The virtual machine scale set child extension + resources. + :type extensions: + list[~azure.mgmt.compute.v2016_03_30.models.VirtualMachineScaleSetExtension] + """ + + _attribute_map = { + 'extensions': {'key': 'extensions', 'type': '[VirtualMachineScaleSetExtension]'}, + } + + def __init__(self, **kwargs): + super(VirtualMachineScaleSetExtensionProfile, self).__init__(**kwargs) + self.extensions = kwargs.get('extensions', None) + + +class VirtualMachineScaleSetIdentity(Model): + """Identity for the virtual machine scale set. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar principal_id: The principal id of virtual machine scale set + identity. + :vartype principal_id: str + :ivar tenant_id: The tenant id associated with the virtual machine scale + set. + :vartype tenant_id: str + :param type: The type of identity used for the virtual machine scale set. + Currently, the only supported type is 'SystemAssigned', which implicitly + creates an identity. Possible values include: 'SystemAssigned' + :type type: str or + ~azure.mgmt.compute.v2016_03_30.models.ResourceIdentityType + """ + + _validation = { + 'principal_id': {'readonly': True}, + 'tenant_id': {'readonly': True}, + } + + _attribute_map = { + 'principal_id': {'key': 'principalId', 'type': 'str'}, + 'tenant_id': {'key': 'tenantId', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'ResourceIdentityType'}, + } + + def __init__(self, **kwargs): + super(VirtualMachineScaleSetIdentity, self).__init__(**kwargs) + self.principal_id = None + self.tenant_id = None + self.type = kwargs.get('type', None) + + +class VirtualMachineScaleSetInstanceView(Model): + """The instance view of a virtual machine scale set. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar virtual_machine: The instance view status summary for the virtual + machine scale set. + :vartype virtual_machine: + ~azure.mgmt.compute.v2016_03_30.models.VirtualMachineScaleSetInstanceViewStatusesSummary + :ivar extensions: The extensions information. + :vartype extensions: + list[~azure.mgmt.compute.v2016_03_30.models.VirtualMachineScaleSetVMExtensionsSummary] + :param statuses: The resource status information. + :type statuses: + list[~azure.mgmt.compute.v2016_03_30.models.InstanceViewStatus] + """ + + _validation = { + 'virtual_machine': {'readonly': True}, + 'extensions': {'readonly': True}, + } + + _attribute_map = { + 'virtual_machine': {'key': 'virtualMachine', 'type': 'VirtualMachineScaleSetInstanceViewStatusesSummary'}, + 'extensions': {'key': 'extensions', 'type': '[VirtualMachineScaleSetVMExtensionsSummary]'}, + 'statuses': {'key': 'statuses', 'type': '[InstanceViewStatus]'}, + } + + def __init__(self, **kwargs): + super(VirtualMachineScaleSetInstanceView, self).__init__(**kwargs) + self.virtual_machine = None + self.extensions = None + self.statuses = kwargs.get('statuses', None) + + +class VirtualMachineScaleSetInstanceViewStatusesSummary(Model): + """Instance view statuses summary for virtual machines of a virtual machine + scale set. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar statuses_summary: The extensions information. + :vartype statuses_summary: + list[~azure.mgmt.compute.v2016_03_30.models.VirtualMachineStatusCodeCount] + """ + + _validation = { + 'statuses_summary': {'readonly': True}, + } + + _attribute_map = { + 'statuses_summary': {'key': 'statusesSummary', 'type': '[VirtualMachineStatusCodeCount]'}, + } + + def __init__(self, **kwargs): + super(VirtualMachineScaleSetInstanceViewStatusesSummary, self).__init__(**kwargs) + self.statuses_summary = None + + +class VirtualMachineScaleSetIPConfiguration(SubResource): + """Describes a virtual machine scale set network profile's IP configuration. + + All required parameters must be populated in order to send to Azure. + + :param id: Resource Id + :type id: str + :param name: Required. The IP configuration name. + :type name: str + :param subnet: Required. The subnet. + :type subnet: ~azure.mgmt.compute.v2016_03_30.models.ApiEntityReference + :param application_gateway_backend_address_pools: The application gateway + backend address pools. + :type application_gateway_backend_address_pools: + list[~azure.mgmt.compute.v2016_03_30.models.SubResource] + :param load_balancer_backend_address_pools: The load balancer backend + address pools. + :type load_balancer_backend_address_pools: + list[~azure.mgmt.compute.v2016_03_30.models.SubResource] + :param load_balancer_inbound_nat_pools: The load balancer inbound nat + pools. + :type load_balancer_inbound_nat_pools: + list[~azure.mgmt.compute.v2016_03_30.models.SubResource] + """ + + _validation = { + 'name': {'required': True}, + 'subnet': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'subnet': {'key': 'properties.subnet', 'type': 'ApiEntityReference'}, + 'application_gateway_backend_address_pools': {'key': 'properties.applicationGatewayBackendAddressPools', 'type': '[SubResource]'}, + 'load_balancer_backend_address_pools': {'key': 'properties.loadBalancerBackendAddressPools', 'type': '[SubResource]'}, + 'load_balancer_inbound_nat_pools': {'key': 'properties.loadBalancerInboundNatPools', 'type': '[SubResource]'}, + } + + def __init__(self, **kwargs): + super(VirtualMachineScaleSetIPConfiguration, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.subnet = kwargs.get('subnet', None) + self.application_gateway_backend_address_pools = kwargs.get('application_gateway_backend_address_pools', None) + self.load_balancer_backend_address_pools = kwargs.get('load_balancer_backend_address_pools', None) + self.load_balancer_inbound_nat_pools = kwargs.get('load_balancer_inbound_nat_pools', None) + + +class VirtualMachineScaleSetNetworkConfiguration(SubResource): + """Describes a virtual machine scale set network profile's network + configurations. + + All required parameters must be populated in order to send to Azure. + + :param id: Resource Id + :type id: str + :param name: Required. The network configuration name. + :type name: str + :param primary: Whether this is a primary NIC on a virtual machine. + :type primary: bool + :param ip_configurations: Required. The virtual machine scale set IP + Configuration. + :type ip_configurations: + list[~azure.mgmt.compute.v2016_03_30.models.VirtualMachineScaleSetIPConfiguration] + """ + + _validation = { + 'name': {'required': True}, + 'ip_configurations': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'primary': {'key': 'properties.primary', 'type': 'bool'}, + 'ip_configurations': {'key': 'properties.ipConfigurations', 'type': '[VirtualMachineScaleSetIPConfiguration]'}, + } + + def __init__(self, **kwargs): + super(VirtualMachineScaleSetNetworkConfiguration, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.primary = kwargs.get('primary', None) + self.ip_configurations = kwargs.get('ip_configurations', None) + + +class VirtualMachineScaleSetNetworkProfile(Model): + """Describes a virtual machine scale set network profile. + + :param network_interface_configurations: The list of network + configurations. + :type network_interface_configurations: + list[~azure.mgmt.compute.v2016_03_30.models.VirtualMachineScaleSetNetworkConfiguration] + """ + + _attribute_map = { + 'network_interface_configurations': {'key': 'networkInterfaceConfigurations', 'type': '[VirtualMachineScaleSetNetworkConfiguration]'}, + } + + def __init__(self, **kwargs): + super(VirtualMachineScaleSetNetworkProfile, self).__init__(**kwargs) + self.network_interface_configurations = kwargs.get('network_interface_configurations', None) + + +class VirtualMachineScaleSetOSDisk(Model): + """Describes a virtual machine scale set operating system disk. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. The disk name. + :type name: str + :param caching: Specifies the caching requirements.

    Possible + values are:

    **None**

    **ReadOnly**

    **ReadWrite** +

    Default: **None for Standard storage. ReadOnly for Premium + storage**. Possible values include: 'None', 'ReadOnly', 'ReadWrite' + :type caching: str or ~azure.mgmt.compute.v2016_03_30.models.CachingTypes + :param create_option: Required. Specifies how the virtual machines in the + scale set should be created.

    The only allowed value is: + **FromImage** \\u2013 This value is used when you are using an image to + create the virtual machine. If you are using a platform image, you also + use the imageReference element described above. If you are using a + marketplace image, you also use the plan element previously described. + Possible values include: 'FromImage', 'Empty', 'Attach' + :type create_option: str or + ~azure.mgmt.compute.v2016_03_30.models.DiskCreateOptionTypes + :param os_type: This property allows you to specify the type of the OS + that is included in the disk if creating a VM from user-image or a + specialized VHD.

    Possible values are:

    **Windows** +

    **Linux**. Possible values include: 'Windows', 'Linux' + :type os_type: str or + ~azure.mgmt.compute.v2016_03_30.models.OperatingSystemTypes + :param image: The Source User Image VirtualHardDisk. This VirtualHardDisk + will be copied before using it to attach to the Virtual Machine. If + SourceImage is provided, the destination VirtualHardDisk should not exist. + :type image: ~azure.mgmt.compute.v2016_03_30.models.VirtualHardDisk + :param vhd_containers: The list of virtual hard disk container uris. + :type vhd_containers: list[str] + """ + + _validation = { + 'name': {'required': True}, + 'create_option': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'caching': {'key': 'caching', 'type': 'CachingTypes'}, + 'create_option': {'key': 'createOption', 'type': 'DiskCreateOptionTypes'}, + 'os_type': {'key': 'osType', 'type': 'OperatingSystemTypes'}, + 'image': {'key': 'image', 'type': 'VirtualHardDisk'}, + 'vhd_containers': {'key': 'vhdContainers', 'type': '[str]'}, + } + + def __init__(self, **kwargs): + super(VirtualMachineScaleSetOSDisk, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.caching = kwargs.get('caching', None) + self.create_option = kwargs.get('create_option', None) + self.os_type = kwargs.get('os_type', None) + self.image = kwargs.get('image', None) + self.vhd_containers = kwargs.get('vhd_containers', None) + + +class VirtualMachineScaleSetOSProfile(Model): + """Describes a virtual machine scale set OS profile. + + :param computer_name_prefix: Specifies the computer name prefix for all of + the virtual machines in the scale set. Computer name prefixes must be 1 to + 15 characters long. + :type computer_name_prefix: str + :param admin_username: Specifies the name of the administrator account. +

    **Windows-only restriction:** Cannot end in "."

    + **Disallowed values:** "administrator", "admin", "user", "user1", "test", + "user2", "test1", "user3", "admin1", "1", "123", "a", "actuser", "adm", + "admin2", "aspnet", "backup", "console", "david", "guest", "john", + "owner", "root", "server", "sql", "support", "support_388945a0", "sys", + "test2", "test3", "user4", "user5".

    **Minimum-length (Linux):** 1 + character

    **Max-length (Linux):** 64 characters

    + **Max-length (Windows):** 20 characters

  • For root access to + the Linux VM, see [Using root privileges on Linux virtual machines in + Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-use-root-privileges?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json)
  • + For a list of built-in system users on Linux that should not be used in + this field, see [Selecting User Names for Linux on + Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-usernames?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json) + :type admin_username: str + :param admin_password: Specifies the password of the administrator + account.

    **Minimum-length (Windows):** 8 characters

    + **Minimum-length (Linux):** 6 characters

    **Max-length + (Windows):** 123 characters

    **Max-length (Linux):** 72 characters +

    **Complexity requirements:** 3 out of 4 conditions below need to + be fulfilled
    Has lower characters
    Has upper characters
    Has a + digit
    Has a special character (Regex match [\\W_])

    + **Disallowed values:** "abc@123", "P@$$w0rd", "P@ssw0rd", "P@ssword123", + "Pa$$word", "pass@word1", "Password!", "Password1", "Password22", + "iloveyou!"

    For resetting the password, see [How to reset the + Remote Desktop service or its login password in a Windows + VM](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-reset-rdp?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json) +

    For resetting root password, see [Manage users, SSH, and check or + repair disks on Azure Linux VMs using the VMAccess + Extension](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-using-vmaccess-extension?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json#reset-root-password) + :type admin_password: str + :param custom_data: A base-64 encoded string of custom data. + :type custom_data: str + :param windows_configuration: The Windows Configuration of the OS profile. + :type windows_configuration: + ~azure.mgmt.compute.v2016_03_30.models.WindowsConfiguration + :param linux_configuration: The Linux Configuration of the OS profile. + :type linux_configuration: + ~azure.mgmt.compute.v2016_03_30.models.LinuxConfiguration + :param secrets: The List of certificates for addition to the VM. + :type secrets: + list[~azure.mgmt.compute.v2016_03_30.models.VaultSecretGroup] + """ + + _attribute_map = { + 'computer_name_prefix': {'key': 'computerNamePrefix', 'type': 'str'}, + 'admin_username': {'key': 'adminUsername', 'type': 'str'}, + 'admin_password': {'key': 'adminPassword', 'type': 'str'}, + 'custom_data': {'key': 'customData', 'type': 'str'}, + 'windows_configuration': {'key': 'windowsConfiguration', 'type': 'WindowsConfiguration'}, + 'linux_configuration': {'key': 'linuxConfiguration', 'type': 'LinuxConfiguration'}, + 'secrets': {'key': 'secrets', 'type': '[VaultSecretGroup]'}, + } + + def __init__(self, **kwargs): + super(VirtualMachineScaleSetOSProfile, self).__init__(**kwargs) + self.computer_name_prefix = kwargs.get('computer_name_prefix', None) + self.admin_username = kwargs.get('admin_username', None) + self.admin_password = kwargs.get('admin_password', None) + self.custom_data = kwargs.get('custom_data', None) + self.windows_configuration = kwargs.get('windows_configuration', None) + self.linux_configuration = kwargs.get('linux_configuration', None) + self.secrets = kwargs.get('secrets', None) + + +class VirtualMachineScaleSetSku(Model): + """Describes an available virtual machine scale set sku. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar resource_type: The type of resource the sku applies to. + :vartype resource_type: str + :ivar sku: The Sku. + :vartype sku: ~azure.mgmt.compute.v2016_03_30.models.Sku + :ivar capacity: Specifies the number of virtual machines in the scale set. + :vartype capacity: + ~azure.mgmt.compute.v2016_03_30.models.VirtualMachineScaleSetSkuCapacity + """ + + _validation = { + 'resource_type': {'readonly': True}, + 'sku': {'readonly': True}, + 'capacity': {'readonly': True}, + } + + _attribute_map = { + 'resource_type': {'key': 'resourceType', 'type': 'str'}, + 'sku': {'key': 'sku', 'type': 'Sku'}, + 'capacity': {'key': 'capacity', 'type': 'VirtualMachineScaleSetSkuCapacity'}, + } + + def __init__(self, **kwargs): + super(VirtualMachineScaleSetSku, self).__init__(**kwargs) + self.resource_type = None + self.sku = None + self.capacity = None + + +class VirtualMachineScaleSetSkuCapacity(Model): + """Describes scaling information of a sku. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar minimum: The minimum capacity. + :vartype minimum: long + :ivar maximum: The maximum capacity that can be set. + :vartype maximum: long + :ivar default_capacity: The default capacity. + :vartype default_capacity: long + :ivar scale_type: The scale type applicable to the sku. Possible values + include: 'Automatic', 'None' + :vartype scale_type: str or + ~azure.mgmt.compute.v2016_03_30.models.VirtualMachineScaleSetSkuScaleType + """ + + _validation = { + 'minimum': {'readonly': True}, + 'maximum': {'readonly': True}, + 'default_capacity': {'readonly': True}, + 'scale_type': {'readonly': True}, + } + + _attribute_map = { + 'minimum': {'key': 'minimum', 'type': 'long'}, + 'maximum': {'key': 'maximum', 'type': 'long'}, + 'default_capacity': {'key': 'defaultCapacity', 'type': 'long'}, + 'scale_type': {'key': 'scaleType', 'type': 'VirtualMachineScaleSetSkuScaleType'}, + } + + def __init__(self, **kwargs): + super(VirtualMachineScaleSetSkuCapacity, self).__init__(**kwargs) + self.minimum = None + self.maximum = None + self.default_capacity = None + self.scale_type = None + + +class VirtualMachineScaleSetStorageProfile(Model): + """Describes a virtual machine scale set storage profile. + + :param image_reference: The image reference. + :type image_reference: + ~azure.mgmt.compute.v2016_03_30.models.ImageReference + :param os_disk: The OS disk. + :type os_disk: + ~azure.mgmt.compute.v2016_03_30.models.VirtualMachineScaleSetOSDisk + """ + + _attribute_map = { + 'image_reference': {'key': 'imageReference', 'type': 'ImageReference'}, + 'os_disk': {'key': 'osDisk', 'type': 'VirtualMachineScaleSetOSDisk'}, + } + + def __init__(self, **kwargs): + super(VirtualMachineScaleSetStorageProfile, self).__init__(**kwargs) + self.image_reference = kwargs.get('image_reference', None) + self.os_disk = kwargs.get('os_disk', None) + + +class VirtualMachineScaleSetVM(Resource): + """Describes a virtual machine scale set virtual machine. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource Id + :vartype id: str + :ivar name: Resource name + :vartype name: str + :ivar type: Resource type + :vartype type: str + :param location: Required. Resource location + :type location: str + :param tags: Resource tags + :type tags: dict[str, str] + :ivar instance_id: The virtual machine instance ID. + :vartype instance_id: str + :ivar sku: The virtual machine SKU. + :vartype sku: ~azure.mgmt.compute.v2016_03_30.models.Sku + :ivar latest_model_applied: Specifies whether the latest model has been + applied to the virtual machine. + :vartype latest_model_applied: bool + :ivar vm_id: Azure VM unique ID. + :vartype vm_id: str + :ivar instance_view: The virtual machine instance view. + :vartype instance_view: + ~azure.mgmt.compute.v2016_03_30.models.VirtualMachineScaleSetVMInstanceView + :param hardware_profile: Specifies the hardware settings for the virtual + machine. + :type hardware_profile: + ~azure.mgmt.compute.v2016_03_30.models.HardwareProfile + :param storage_profile: Specifies the storage settings for the virtual + machine disks. + :type storage_profile: + ~azure.mgmt.compute.v2016_03_30.models.StorageProfile + :param os_profile: Specifies the operating system settings for the virtual + machine. + :type os_profile: ~azure.mgmt.compute.v2016_03_30.models.OSProfile + :param network_profile: Specifies the network interfaces of the virtual + machine. + :type network_profile: + ~azure.mgmt.compute.v2016_03_30.models.NetworkProfile + :param diagnostics_profile: Specifies the boot diagnostic settings state. +

    Minimum api-version: 2015-06-15. + :type diagnostics_profile: + ~azure.mgmt.compute.v2016_03_30.models.DiagnosticsProfile + :param availability_set: Specifies information about the availability set + that the virtual machine should be assigned to. Virtual machines specified + in the same availability set are allocated to different nodes to maximize + availability. For more information about availability sets, see [Manage + the availability of virtual + machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-manage-availability?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). +

    For more information on Azure planned maintenance, see [Planned + maintenance for virtual machines in + Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-planned-maintenance?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json) +

    Currently, a VM can only be added to availability set at creation + time. An existing VM cannot be added to an availability set. + :type availability_set: ~azure.mgmt.compute.v2016_03_30.models.SubResource + :ivar provisioning_state: The provisioning state, which only appears in + the response. + :vartype provisioning_state: str + :param license_type: Specifies that the image or disk that is being used + was licensed on-premises. This element is only used for images that + contain the Windows Server operating system.

    Possible values are: +

    Windows_Client

    Windows_Server

    If this element + is included in a request for an update, the value must match the initial + value. This value cannot be updated.

    For more information, see + [Azure Hybrid Use Benefit for Windows + Server](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-hybrid-use-benefit-licensing?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json) +

    Minimum api-version: 2015-06-15 + :type license_type: str + :param plan: Specifies information about the marketplace image used to + create the virtual machine. This element is only used for marketplace + images. Before you can use a marketplace image from an API, you must + enable the image for programmatic use. In the Azure portal, find the + marketplace image that you want to use and then click **Want to deploy + programmatically, Get Started ->**. Enter any required information and + then click **Save**. + :type plan: ~azure.mgmt.compute.v2016_03_30.models.Plan + :ivar resources: The virtual machine child extension resources. + :vartype resources: + list[~azure.mgmt.compute.v2016_03_30.models.VirtualMachineExtension] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + 'instance_id': {'readonly': True}, + 'sku': {'readonly': True}, + 'latest_model_applied': {'readonly': True}, + 'vm_id': {'readonly': True}, + 'instance_view': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + 'resources': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'instance_id': {'key': 'instanceId', 'type': 'str'}, + 'sku': {'key': 'sku', 'type': 'Sku'}, + 'latest_model_applied': {'key': 'properties.latestModelApplied', 'type': 'bool'}, + 'vm_id': {'key': 'properties.vmId', 'type': 'str'}, + 'instance_view': {'key': 'properties.instanceView', 'type': 'VirtualMachineScaleSetVMInstanceView'}, + 'hardware_profile': {'key': 'properties.hardwareProfile', 'type': 'HardwareProfile'}, + 'storage_profile': {'key': 'properties.storageProfile', 'type': 'StorageProfile'}, + 'os_profile': {'key': 'properties.osProfile', 'type': 'OSProfile'}, + 'network_profile': {'key': 'properties.networkProfile', 'type': 'NetworkProfile'}, + 'diagnostics_profile': {'key': 'properties.diagnosticsProfile', 'type': 'DiagnosticsProfile'}, + 'availability_set': {'key': 'properties.availabilitySet', 'type': 'SubResource'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'license_type': {'key': 'properties.licenseType', 'type': 'str'}, + 'plan': {'key': 'plan', 'type': 'Plan'}, + 'resources': {'key': 'resources', 'type': '[VirtualMachineExtension]'}, + } + + def __init__(self, **kwargs): + super(VirtualMachineScaleSetVM, self).__init__(**kwargs) + self.instance_id = None + self.sku = None + self.latest_model_applied = None + self.vm_id = None + self.instance_view = None + self.hardware_profile = kwargs.get('hardware_profile', None) + self.storage_profile = kwargs.get('storage_profile', None) + self.os_profile = kwargs.get('os_profile', None) + self.network_profile = kwargs.get('network_profile', None) + self.diagnostics_profile = kwargs.get('diagnostics_profile', None) + self.availability_set = kwargs.get('availability_set', None) + self.provisioning_state = None + self.license_type = kwargs.get('license_type', None) + self.plan = kwargs.get('plan', None) + self.resources = None + + +class VirtualMachineScaleSetVMExtensionsSummary(Model): + """Extensions summary for virtual machines of a virtual machine scale set. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar name: The extension name. + :vartype name: str + :ivar statuses_summary: The extensions information. + :vartype statuses_summary: + list[~azure.mgmt.compute.v2016_03_30.models.VirtualMachineStatusCodeCount] + """ + + _validation = { + 'name': {'readonly': True}, + 'statuses_summary': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'statuses_summary': {'key': 'statusesSummary', 'type': '[VirtualMachineStatusCodeCount]'}, + } + + def __init__(self, **kwargs): + super(VirtualMachineScaleSetVMExtensionsSummary, self).__init__(**kwargs) + self.name = None + self.statuses_summary = None + + +class VirtualMachineScaleSetVMInstanceIDs(Model): + """Specifies a list of virtual machine instance IDs from the VM scale set. + + :param instance_ids: The virtual machine scale set instance ids. Omitting + the virtual machine scale set instance ids will result in the operation + being performed on all virtual machines in the virtual machine scale set. + :type instance_ids: list[str] + """ + + _attribute_map = { + 'instance_ids': {'key': 'instanceIds', 'type': '[str]'}, + } + + def __init__(self, **kwargs): + super(VirtualMachineScaleSetVMInstanceIDs, self).__init__(**kwargs) + self.instance_ids = kwargs.get('instance_ids', None) + + +class VirtualMachineScaleSetVMInstanceRequiredIDs(Model): + """Specifies a list of virtual machine instance IDs from the VM scale set. + + All required parameters must be populated in order to send to Azure. + + :param instance_ids: Required. The virtual machine scale set instance ids. + :type instance_ids: list[str] + """ + + _validation = { + 'instance_ids': {'required': True}, + } + + _attribute_map = { + 'instance_ids': {'key': 'instanceIds', 'type': '[str]'}, + } + + def __init__(self, **kwargs): + super(VirtualMachineScaleSetVMInstanceRequiredIDs, self).__init__(**kwargs) + self.instance_ids = kwargs.get('instance_ids', None) + + +class VirtualMachineScaleSetVMInstanceView(Model): + """The instance view of a virtual machine scale set VM. + + :param platform_update_domain: The Update Domain count. + :type platform_update_domain: int + :param platform_fault_domain: The Fault Domain count. + :type platform_fault_domain: int + :param rdp_thumb_print: The Remote desktop certificate thumbprint. + :type rdp_thumb_print: str + :param vm_agent: The VM Agent running on the virtual machine. + :type vm_agent: + ~azure.mgmt.compute.v2016_03_30.models.VirtualMachineAgentInstanceView + :param disks: The disks information. + :type disks: list[~azure.mgmt.compute.v2016_03_30.models.DiskInstanceView] + :param extensions: The extensions information. + :type extensions: + list[~azure.mgmt.compute.v2016_03_30.models.VirtualMachineExtensionInstanceView] + :param boot_diagnostics: Boot Diagnostics is a debugging feature which + allows you to view Console Output and Screenshot to diagnose VM status. +

    You can easily view the output of your console log.

    + Azure also enables you to see a screenshot of the VM from the hypervisor. + :type boot_diagnostics: + ~azure.mgmt.compute.v2016_03_30.models.BootDiagnosticsInstanceView + :param statuses: The resource status information. + :type statuses: + list[~azure.mgmt.compute.v2016_03_30.models.InstanceViewStatus] + """ + + _attribute_map = { + 'platform_update_domain': {'key': 'platformUpdateDomain', 'type': 'int'}, + 'platform_fault_domain': {'key': 'platformFaultDomain', 'type': 'int'}, + 'rdp_thumb_print': {'key': 'rdpThumbPrint', 'type': 'str'}, + 'vm_agent': {'key': 'vmAgent', 'type': 'VirtualMachineAgentInstanceView'}, + 'disks': {'key': 'disks', 'type': '[DiskInstanceView]'}, + 'extensions': {'key': 'extensions', 'type': '[VirtualMachineExtensionInstanceView]'}, + 'boot_diagnostics': {'key': 'bootDiagnostics', 'type': 'BootDiagnosticsInstanceView'}, + 'statuses': {'key': 'statuses', 'type': '[InstanceViewStatus]'}, + } + + def __init__(self, **kwargs): + super(VirtualMachineScaleSetVMInstanceView, self).__init__(**kwargs) + self.platform_update_domain = kwargs.get('platform_update_domain', None) + self.platform_fault_domain = kwargs.get('platform_fault_domain', None) + self.rdp_thumb_print = kwargs.get('rdp_thumb_print', None) + self.vm_agent = kwargs.get('vm_agent', None) + self.disks = kwargs.get('disks', None) + self.extensions = kwargs.get('extensions', None) + self.boot_diagnostics = kwargs.get('boot_diagnostics', None) + self.statuses = kwargs.get('statuses', None) + + +class VirtualMachineScaleSetVMProfile(Model): + """Describes a virtual machine scale set virtual machine profile. + + :param os_profile: The virtual machine scale set OS profile. + :type os_profile: + ~azure.mgmt.compute.v2016_03_30.models.VirtualMachineScaleSetOSProfile + :param storage_profile: The virtual machine scale set storage profile. + :type storage_profile: + ~azure.mgmt.compute.v2016_03_30.models.VirtualMachineScaleSetStorageProfile + :param network_profile: The virtual machine scale set network profile. + :type network_profile: + ~azure.mgmt.compute.v2016_03_30.models.VirtualMachineScaleSetNetworkProfile + :param extension_profile: The virtual machine scale set extension profile. + :type extension_profile: + ~azure.mgmt.compute.v2016_03_30.models.VirtualMachineScaleSetExtensionProfile + """ + + _attribute_map = { + 'os_profile': {'key': 'osProfile', 'type': 'VirtualMachineScaleSetOSProfile'}, + 'storage_profile': {'key': 'storageProfile', 'type': 'VirtualMachineScaleSetStorageProfile'}, + 'network_profile': {'key': 'networkProfile', 'type': 'VirtualMachineScaleSetNetworkProfile'}, + 'extension_profile': {'key': 'extensionProfile', 'type': 'VirtualMachineScaleSetExtensionProfile'}, + } + + def __init__(self, **kwargs): + super(VirtualMachineScaleSetVMProfile, self).__init__(**kwargs) + self.os_profile = kwargs.get('os_profile', None) + self.storage_profile = kwargs.get('storage_profile', None) + self.network_profile = kwargs.get('network_profile', None) + self.extension_profile = kwargs.get('extension_profile', None) + + +class VirtualMachineSize(Model): + """Describes the properties of a VM size. + + :param name: The name of the virtual machine size. + :type name: str + :param number_of_cores: The number of cores supported by the virtual + machine size. + :type number_of_cores: int + :param os_disk_size_in_mb: The OS disk size, in MB, allowed by the virtual + machine size. + :type os_disk_size_in_mb: int + :param resource_disk_size_in_mb: The resource disk size, in MB, allowed by + the virtual machine size. + :type resource_disk_size_in_mb: int + :param memory_in_mb: The amount of memory, in MB, supported by the virtual + machine size. + :type memory_in_mb: int + :param max_data_disk_count: The maximum number of data disks that can be + attached to the virtual machine size. + :type max_data_disk_count: int + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'number_of_cores': {'key': 'numberOfCores', 'type': 'int'}, + 'os_disk_size_in_mb': {'key': 'osDiskSizeInMB', 'type': 'int'}, + 'resource_disk_size_in_mb': {'key': 'resourceDiskSizeInMB', 'type': 'int'}, + 'memory_in_mb': {'key': 'memoryInMB', 'type': 'int'}, + 'max_data_disk_count': {'key': 'maxDataDiskCount', 'type': 'int'}, + } + + def __init__(self, **kwargs): + super(VirtualMachineSize, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.number_of_cores = kwargs.get('number_of_cores', None) + self.os_disk_size_in_mb = kwargs.get('os_disk_size_in_mb', None) + self.resource_disk_size_in_mb = kwargs.get('resource_disk_size_in_mb', None) + self.memory_in_mb = kwargs.get('memory_in_mb', None) + self.max_data_disk_count = kwargs.get('max_data_disk_count', None) + + +class VirtualMachineStatusCodeCount(Model): + """The status code and count of the virtual machine scale set instance view + status summary. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar code: The instance view status code. + :vartype code: str + :ivar count: The number of instances having a particular status code. + :vartype count: int + """ + + _validation = { + 'code': {'readonly': True}, + 'count': {'readonly': True}, + } + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + 'count': {'key': 'count', 'type': 'int'}, + } + + def __init__(self, **kwargs): + super(VirtualMachineStatusCodeCount, self).__init__(**kwargs) + self.code = None + self.count = None + + +class WindowsConfiguration(Model): + """Specifies Windows operating system settings on the virtual machine. + + :param provision_vm_agent: Indicates whether virtual machine agent should + be provisioned on the virtual machine.

    When this property is not + specified in the request body, default behavior is to set it to true. + This will ensure that VM Agent is installed on the VM so that extensions + can be added to the VM later. + :type provision_vm_agent: bool + :param enable_automatic_updates: Indicates whether virtual machine is + enabled for automatic updates. + :type enable_automatic_updates: bool + :param time_zone: Specifies the time zone of the virtual machine. e.g. + "Pacific Standard Time" + :type time_zone: str + :param additional_unattend_content: Specifies additional base-64 encoded + XML formatted information that can be included in the Unattend.xml file, + which is used by Windows Setup. + :type additional_unattend_content: + list[~azure.mgmt.compute.v2016_03_30.models.AdditionalUnattendContent] + :param win_rm: Specifies the Windows Remote Management listeners. This + enables remote Windows PowerShell. + :type win_rm: ~azure.mgmt.compute.v2016_03_30.models.WinRMConfiguration + """ + + _attribute_map = { + 'provision_vm_agent': {'key': 'provisionVMAgent', 'type': 'bool'}, + 'enable_automatic_updates': {'key': 'enableAutomaticUpdates', 'type': 'bool'}, + 'time_zone': {'key': 'timeZone', 'type': 'str'}, + 'additional_unattend_content': {'key': 'additionalUnattendContent', 'type': '[AdditionalUnattendContent]'}, + 'win_rm': {'key': 'winRM', 'type': 'WinRMConfiguration'}, + } + + def __init__(self, **kwargs): + super(WindowsConfiguration, self).__init__(**kwargs) + self.provision_vm_agent = kwargs.get('provision_vm_agent', None) + self.enable_automatic_updates = kwargs.get('enable_automatic_updates', None) + self.time_zone = kwargs.get('time_zone', None) + self.additional_unattend_content = kwargs.get('additional_unattend_content', None) + self.win_rm = kwargs.get('win_rm', None) + + +class WinRMConfiguration(Model): + """Describes Windows Remote Management configuration of the VM. + + :param listeners: The list of Windows Remote Management listeners + :type listeners: + list[~azure.mgmt.compute.v2016_03_30.models.WinRMListener] + """ + + _attribute_map = { + 'listeners': {'key': 'listeners', 'type': '[WinRMListener]'}, + } + + def __init__(self, **kwargs): + super(WinRMConfiguration, self).__init__(**kwargs) + self.listeners = kwargs.get('listeners', None) + + +class WinRMListener(Model): + """Describes Protocol and thumbprint of Windows Remote Management listener. + + :param protocol: Specifies the protocol of listener.

    Possible + values are:
    **http**

    **https**. Possible values include: + 'Http', 'Https' + :type protocol: str or + ~azure.mgmt.compute.v2016_03_30.models.ProtocolTypes + :param certificate_url: This is the URL of a certificate that has been + uploaded to Key Vault as a secret. For adding a secret to the Key Vault, + see [Add a key or secret to the key + vault](https://docs.microsoft.com/azure/key-vault/key-vault-get-started/#add). + In this case, your certificate needs to be It is the Base64 encoding of + the following JSON Object which is encoded in UTF-8:

    {
    + "data":"",
    "dataType":"pfx",
    + "password":""
    } + :type certificate_url: str + """ + + _attribute_map = { + 'protocol': {'key': 'protocol', 'type': 'ProtocolTypes'}, + 'certificate_url': {'key': 'certificateUrl', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(WinRMListener, self).__init__(**kwargs) + self.protocol = kwargs.get('protocol', None) + self.certificate_url = kwargs.get('certificate_url', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/_models_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/_models_py3.py new file mode 100644 index 000000000000..7e5ebcc548b3 --- /dev/null +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/_models_py3.py @@ -0,0 +1,3026 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class AdditionalUnattendContent(Model): + """Specifies additional XML formatted information that can be included in the + Unattend.xml file, which is used by Windows Setup. Contents are defined by + setting name, component name, and the pass in which the content is applied. + + :param pass_name: The pass name. Currently, the only allowable value is + OobeSystem. Possible values include: 'OobeSystem' + :type pass_name: str or ~azure.mgmt.compute.v2016_03_30.models.PassNames + :param component_name: The component name. Currently, the only allowable + value is Microsoft-Windows-Shell-Setup. Possible values include: + 'Microsoft-Windows-Shell-Setup' + :type component_name: str or + ~azure.mgmt.compute.v2016_03_30.models.ComponentNames + :param setting_name: Specifies the name of the setting to which the + content applies. Possible values are: FirstLogonCommands and AutoLogon. + Possible values include: 'AutoLogon', 'FirstLogonCommands' + :type setting_name: str or + ~azure.mgmt.compute.v2016_03_30.models.SettingNames + :param content: Specifies the XML formatted content that is added to the + unattend.xml file for the specified path and component. The XML must be + less than 4KB and must include the root element for the setting or feature + that is being inserted. + :type content: str + """ + + _attribute_map = { + 'pass_name': {'key': 'passName', 'type': 'PassNames'}, + 'component_name': {'key': 'componentName', 'type': 'ComponentNames'}, + 'setting_name': {'key': 'settingName', 'type': 'SettingNames'}, + 'content': {'key': 'content', 'type': 'str'}, + } + + def __init__(self, *, pass_name=None, component_name=None, setting_name=None, content: str=None, **kwargs) -> None: + super(AdditionalUnattendContent, self).__init__(**kwargs) + self.pass_name = pass_name + self.component_name = component_name + self.setting_name = setting_name + self.content = content + + +class ApiEntityReference(Model): + """The API entity reference. + + :param id: The ARM resource id in the form of + /subscriptions/{SubscriptionId}/resourceGroups/{ResourceGroupName}/... + :type id: str + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + } + + def __init__(self, *, id: str=None, **kwargs) -> None: + super(ApiEntityReference, self).__init__(**kwargs) + self.id = id + + +class ApiError(Model): + """Api error. + + :param details: The Api error details + :type details: list[~azure.mgmt.compute.v2016_03_30.models.ApiErrorBase] + :param innererror: The Api inner error + :type innererror: ~azure.mgmt.compute.v2016_03_30.models.InnerError + :param code: The error code. + :type code: str + :param target: The target of the particular error. + :type target: str + :param message: The error message. + :type message: str + """ + + _attribute_map = { + 'details': {'key': 'details', 'type': '[ApiErrorBase]'}, + 'innererror': {'key': 'innererror', 'type': 'InnerError'}, + 'code': {'key': 'code', 'type': 'str'}, + 'target': {'key': 'target', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + } + + def __init__(self, *, details=None, innererror=None, code: str=None, target: str=None, message: str=None, **kwargs) -> None: + super(ApiError, self).__init__(**kwargs) + self.details = details + self.innererror = innererror + self.code = code + self.target = target + self.message = message + + +class ApiErrorBase(Model): + """Api error base. + + :param code: The error code. + :type code: str + :param target: The target of the particular error. + :type target: str + :param message: The error message. + :type message: str + """ + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + 'target': {'key': 'target', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + } + + def __init__(self, *, code: str=None, target: str=None, message: str=None, **kwargs) -> None: + super(ApiErrorBase, self).__init__(**kwargs) + self.code = code + self.target = target + self.message = message + + +class Resource(Model): + """The Resource model definition. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource Id + :vartype id: str + :ivar name: Resource name + :vartype name: str + :ivar type: Resource type + :vartype type: str + :param location: Required. Resource location + :type location: str + :param tags: Resource tags + :type tags: dict[str, str] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__(self, *, location: str, tags=None, **kwargs) -> None: + super(Resource, self).__init__(**kwargs) + self.id = None + self.name = None + self.type = None + self.location = location + self.tags = tags + + +class AvailabilitySet(Resource): + """Specifies information about the availability set that the virtual machine + should be assigned to. Virtual machines specified in the same availability + set are allocated to different nodes to maximize availability. For more + information about availability sets, see [Manage the availability of + virtual + machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-manage-availability?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). +

    For more information on Azure planned maintenance, see [Planned + maintenance for virtual machines in + Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-planned-maintenance?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json) +

    Currently, a VM can only be added to availability set at creation + time. An existing VM cannot be added to an availability set. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource Id + :vartype id: str + :ivar name: Resource name + :vartype name: str + :ivar type: Resource type + :vartype type: str + :param location: Required. Resource location + :type location: str + :param tags: Resource tags + :type tags: dict[str, str] + :param platform_update_domain_count: Update Domain count. + :type platform_update_domain_count: int + :param platform_fault_domain_count: Fault Domain count. + :type platform_fault_domain_count: int + :param virtual_machines: A list of references to all virtual machines in + the availability set. + :type virtual_machines: + list[~azure.mgmt.compute.v2016_03_30.models.SubResource] + :ivar statuses: The resource status information. + :vartype statuses: + list[~azure.mgmt.compute.v2016_03_30.models.InstanceViewStatus] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + 'statuses': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'platform_update_domain_count': {'key': 'properties.platformUpdateDomainCount', 'type': 'int'}, + 'platform_fault_domain_count': {'key': 'properties.platformFaultDomainCount', 'type': 'int'}, + 'virtual_machines': {'key': 'properties.virtualMachines', 'type': '[SubResource]'}, + 'statuses': {'key': 'properties.statuses', 'type': '[InstanceViewStatus]'}, + } + + def __init__(self, *, location: str, tags=None, platform_update_domain_count: int=None, platform_fault_domain_count: int=None, virtual_machines=None, **kwargs) -> None: + super(AvailabilitySet, self).__init__(location=location, tags=tags, **kwargs) + self.platform_update_domain_count = platform_update_domain_count + self.platform_fault_domain_count = platform_fault_domain_count + self.virtual_machines = virtual_machines + self.statuses = None + + +class BootDiagnostics(Model): + """Boot Diagnostics is a debugging feature which allows you to view Console + Output and Screenshot to diagnose VM status.

    You can easily view + the output of your console log.

    Azure also enables you to see a + screenshot of the VM from the hypervisor. + + :param enabled: Whether boot diagnostics should be enabled on the Virtual + Machine. + :type enabled: bool + :param storage_uri: Uri of the storage account to use for placing the + console output and screenshot. + :type storage_uri: str + """ + + _attribute_map = { + 'enabled': {'key': 'enabled', 'type': 'bool'}, + 'storage_uri': {'key': 'storageUri', 'type': 'str'}, + } + + def __init__(self, *, enabled: bool=None, storage_uri: str=None, **kwargs) -> None: + super(BootDiagnostics, self).__init__(**kwargs) + self.enabled = enabled + self.storage_uri = storage_uri + + +class BootDiagnosticsInstanceView(Model): + """The instance view of a virtual machine boot diagnostics. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar console_screenshot_blob_uri: The console screenshot blob URI. + :vartype console_screenshot_blob_uri: str + :ivar serial_console_log_blob_uri: The Linux serial console log blob Uri. + :vartype serial_console_log_blob_uri: str + """ + + _validation = { + 'console_screenshot_blob_uri': {'readonly': True}, + 'serial_console_log_blob_uri': {'readonly': True}, + } + + _attribute_map = { + 'console_screenshot_blob_uri': {'key': 'consoleScreenshotBlobUri', 'type': 'str'}, + 'serial_console_log_blob_uri': {'key': 'serialConsoleLogBlobUri', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(BootDiagnosticsInstanceView, self).__init__(**kwargs) + self.console_screenshot_blob_uri = None + self.serial_console_log_blob_uri = None + + +class CloudError(Model): + """CloudError. + """ + + _attribute_map = { + } + + +class ComputeLongRunningOperationProperties(Model): + """Compute-specific operation properties, including output. + + :param output: Operation output data (raw JSON) + :type output: object + """ + + _attribute_map = { + 'output': {'key': 'output', 'type': 'object'}, + } + + def __init__(self, *, output=None, **kwargs) -> None: + super(ComputeLongRunningOperationProperties, self).__init__(**kwargs) + self.output = output + + +class DataDisk(Model): + """Describes a data disk. + + All required parameters must be populated in order to send to Azure. + + :param lun: Required. Specifies the logical unit number of the data disk. + This value is used to identify data disks within the VM and therefore must + be unique for each data disk attached to a VM. + :type lun: int + :param name: Required. The disk name. + :type name: str + :param vhd: Required. The virtual hard disk. + :type vhd: ~azure.mgmt.compute.v2016_03_30.models.VirtualHardDisk + :param image: The source user image virtual hard disk. The virtual hard + disk will be copied before being attached to the virtual machine. If + SourceImage is provided, the destination virtual hard drive must not + exist. + :type image: ~azure.mgmt.compute.v2016_03_30.models.VirtualHardDisk + :param caching: Specifies the caching requirements.

    Possible + values are:

    **None**

    **ReadOnly**

    **ReadWrite** +

    Default: **None for Standard storage. ReadOnly for Premium + storage**. Possible values include: 'None', 'ReadOnly', 'ReadWrite' + :type caching: str or ~azure.mgmt.compute.v2016_03_30.models.CachingTypes + :param create_option: Required. Specifies how the virtual machine should + be created.

    Possible values are:

    **Attach** \\u2013 This + value is used when you are using a specialized disk to create the virtual + machine.

    **FromImage** \\u2013 This value is used when you are + using an image to create the virtual machine. If you are using a platform + image, you also use the imageReference element described above. If you are + using a marketplace image, you also use the plan element previously + described. Possible values include: 'FromImage', 'Empty', 'Attach' + :type create_option: str or + ~azure.mgmt.compute.v2016_03_30.models.DiskCreateOptionTypes + :param disk_size_gb: Specifies the size of an empty data disk in + gigabytes. This element can be used to overwrite the size of the disk in a + virtual machine image.

    This value cannot be larger than 1023 GB + :type disk_size_gb: int + """ + + _validation = { + 'lun': {'required': True}, + 'name': {'required': True}, + 'vhd': {'required': True}, + 'create_option': {'required': True}, + } + + _attribute_map = { + 'lun': {'key': 'lun', 'type': 'int'}, + 'name': {'key': 'name', 'type': 'str'}, + 'vhd': {'key': 'vhd', 'type': 'VirtualHardDisk'}, + 'image': {'key': 'image', 'type': 'VirtualHardDisk'}, + 'caching': {'key': 'caching', 'type': 'CachingTypes'}, + 'create_option': {'key': 'createOption', 'type': 'DiskCreateOptionTypes'}, + 'disk_size_gb': {'key': 'diskSizeGB', 'type': 'int'}, + } + + def __init__(self, *, lun: int, name: str, vhd, create_option, image=None, caching=None, disk_size_gb: int=None, **kwargs) -> None: + super(DataDisk, self).__init__(**kwargs) + self.lun = lun + self.name = name + self.vhd = vhd + self.image = image + self.caching = caching + self.create_option = create_option + self.disk_size_gb = disk_size_gb + + +class DataDiskImage(Model): + """Contains the data disk images information. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar lun: Specifies the logical unit number of the data disk. This value + is used to identify data disks within the VM and therefore must be unique + for each data disk attached to a VM. + :vartype lun: int + """ + + _validation = { + 'lun': {'readonly': True}, + } + + _attribute_map = { + 'lun': {'key': 'lun', 'type': 'int'}, + } + + def __init__(self, **kwargs) -> None: + super(DataDiskImage, self).__init__(**kwargs) + self.lun = None + + +class DiagnosticsProfile(Model): + """Specifies the boot diagnostic settings state.

    Minimum api-version: + 2015-06-15. + + :param boot_diagnostics: Boot Diagnostics is a debugging feature which + allows you to view Console Output and Screenshot to diagnose VM status. +

    You can easily view the output of your console log.

    + Azure also enables you to see a screenshot of the VM from the hypervisor. + :type boot_diagnostics: + ~azure.mgmt.compute.v2016_03_30.models.BootDiagnostics + """ + + _attribute_map = { + 'boot_diagnostics': {'key': 'bootDiagnostics', 'type': 'BootDiagnostics'}, + } + + def __init__(self, *, boot_diagnostics=None, **kwargs) -> None: + super(DiagnosticsProfile, self).__init__(**kwargs) + self.boot_diagnostics = boot_diagnostics + + +class DiskEncryptionSettings(Model): + """Describes a Encryption Settings for a Disk. + + :param disk_encryption_key: Specifies the location of the disk encryption + key, which is a Key Vault Secret. + :type disk_encryption_key: + ~azure.mgmt.compute.v2016_03_30.models.KeyVaultSecretReference + :param key_encryption_key: Specifies the location of the key encryption + key in Key Vault. + :type key_encryption_key: + ~azure.mgmt.compute.v2016_03_30.models.KeyVaultKeyReference + :param enabled: Specifies whether disk encryption should be enabled on the + virtual machine. + :type enabled: bool + """ + + _attribute_map = { + 'disk_encryption_key': {'key': 'diskEncryptionKey', 'type': 'KeyVaultSecretReference'}, + 'key_encryption_key': {'key': 'keyEncryptionKey', 'type': 'KeyVaultKeyReference'}, + 'enabled': {'key': 'enabled', 'type': 'bool'}, + } + + def __init__(self, *, disk_encryption_key=None, key_encryption_key=None, enabled: bool=None, **kwargs) -> None: + super(DiskEncryptionSettings, self).__init__(**kwargs) + self.disk_encryption_key = disk_encryption_key + self.key_encryption_key = key_encryption_key + self.enabled = enabled + + +class DiskInstanceView(Model): + """The instance view of the disk. + + :param name: The disk name. + :type name: str + :param statuses: The resource status information. + :type statuses: + list[~azure.mgmt.compute.v2016_03_30.models.InstanceViewStatus] + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'statuses': {'key': 'statuses', 'type': '[InstanceViewStatus]'}, + } + + def __init__(self, *, name: str=None, statuses=None, **kwargs) -> None: + super(DiskInstanceView, self).__init__(**kwargs) + self.name = name + self.statuses = statuses + + +class HardwareProfile(Model): + """Specifies the hardware settings for the virtual machine. + + :param vm_size: Specifies the size of the virtual machine. For more + information about virtual machine sizes, see [Sizes for virtual + machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-sizes?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). +

    The available VM sizes depend on region and availability set. For + a list of available sizes use these APIs:

    [List all available + virtual machine sizes in an availability + set](https://docs.microsoft.com/rest/api/compute/availabilitysets/listavailablesizes) +

    [List all available virtual machine sizes in a + region](https://docs.microsoft.com/rest/api/compute/virtualmachinesizes/list) +

    [List all available virtual machine sizes for + resizing](https://docs.microsoft.com/rest/api/compute/virtualmachines/listavailablesizes). + Possible values include: 'Basic_A0', 'Basic_A1', 'Basic_A2', 'Basic_A3', + 'Basic_A4', 'Standard_A0', 'Standard_A1', 'Standard_A2', 'Standard_A3', + 'Standard_A4', 'Standard_A5', 'Standard_A6', 'Standard_A7', 'Standard_A8', + 'Standard_A9', 'Standard_A10', 'Standard_A11', 'Standard_D1', + 'Standard_D2', 'Standard_D3', 'Standard_D4', 'Standard_D11', + 'Standard_D12', 'Standard_D13', 'Standard_D14', 'Standard_D1_v2', + 'Standard_D2_v2', 'Standard_D3_v2', 'Standard_D4_v2', 'Standard_D5_v2', + 'Standard_D11_v2', 'Standard_D12_v2', 'Standard_D13_v2', + 'Standard_D14_v2', 'Standard_D15_v2', 'Standard_DS1', 'Standard_DS2', + 'Standard_DS3', 'Standard_DS4', 'Standard_DS11', 'Standard_DS12', + 'Standard_DS13', 'Standard_DS14', 'Standard_DS1_v2', 'Standard_DS2_v2', + 'Standard_DS3_v2', 'Standard_DS4_v2', 'Standard_DS5_v2', + 'Standard_DS11_v2', 'Standard_DS12_v2', 'Standard_DS13_v2', + 'Standard_DS14_v2', 'Standard_DS15_v2', 'Standard_G1', 'Standard_G2', + 'Standard_G3', 'Standard_G4', 'Standard_G5', 'Standard_GS1', + 'Standard_GS2', 'Standard_GS3', 'Standard_GS4', 'Standard_GS5' + :type vm_size: str or + ~azure.mgmt.compute.v2016_03_30.models.VirtualMachineSizeTypes + """ + + _attribute_map = { + 'vm_size': {'key': 'vmSize', 'type': 'str'}, + } + + def __init__(self, *, vm_size=None, **kwargs) -> None: + super(HardwareProfile, self).__init__(**kwargs) + self.vm_size = vm_size + + +class ImageReference(Model): + """Specifies information about the image to use. You can specify information + about platform images, marketplace images, or virtual machine images. This + element is required when you want to use a platform image, marketplace + image, or virtual machine image, but is not used in other creation + operations. + + :param publisher: The image publisher. + :type publisher: str + :param offer: Specifies the offer of the platform image or marketplace + image used to create the virtual machine. + :type offer: str + :param sku: The image SKU. + :type sku: str + :param version: Specifies the version of the platform image or marketplace + image used to create the virtual machine. The allowed formats are + Major.Minor.Build or 'latest'. Major, Minor, and Build are decimal + numbers. Specify 'latest' to use the latest version of an image available + at deploy time. Even if you use 'latest', the VM image will not + automatically update after deploy time even if a new version becomes + available. + :type version: str + """ + + _attribute_map = { + 'publisher': {'key': 'publisher', 'type': 'str'}, + 'offer': {'key': 'offer', 'type': 'str'}, + 'sku': {'key': 'sku', 'type': 'str'}, + 'version': {'key': 'version', 'type': 'str'}, + } + + def __init__(self, *, publisher: str=None, offer: str=None, sku: str=None, version: str=None, **kwargs) -> None: + super(ImageReference, self).__init__(**kwargs) + self.publisher = publisher + self.offer = offer + self.sku = sku + self.version = version + + +class InnerError(Model): + """Inner error details. + + :param exceptiontype: The exception type. + :type exceptiontype: str + :param errordetail: The internal error message or exception dump. + :type errordetail: str + """ + + _attribute_map = { + 'exceptiontype': {'key': 'exceptiontype', 'type': 'str'}, + 'errordetail': {'key': 'errordetail', 'type': 'str'}, + } + + def __init__(self, *, exceptiontype: str=None, errordetail: str=None, **kwargs) -> None: + super(InnerError, self).__init__(**kwargs) + self.exceptiontype = exceptiontype + self.errordetail = errordetail + + +class InstanceViewStatus(Model): + """Instance view status. + + :param code: The status code. + :type code: str + :param level: The level code. Possible values include: 'Info', 'Warning', + 'Error' + :type level: str or + ~azure.mgmt.compute.v2016_03_30.models.StatusLevelTypes + :param display_status: The short localizable label for the status. + :type display_status: str + :param message: The detailed status message, including for alerts and + error messages. + :type message: str + :param time: The time of the status. + :type time: datetime + """ + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + 'level': {'key': 'level', 'type': 'StatusLevelTypes'}, + 'display_status': {'key': 'displayStatus', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + 'time': {'key': 'time', 'type': 'iso-8601'}, + } + + def __init__(self, *, code: str=None, level=None, display_status: str=None, message: str=None, time=None, **kwargs) -> None: + super(InstanceViewStatus, self).__init__(**kwargs) + self.code = code + self.level = level + self.display_status = display_status + self.message = message + self.time = time + + +class KeyVaultKeyReference(Model): + """Describes a reference to Key Vault Key. + + All required parameters must be populated in order to send to Azure. + + :param key_url: Required. The URL referencing a key encryption key in Key + Vault. + :type key_url: str + :param source_vault: Required. The relative URL of the Key Vault + containing the key. + :type source_vault: ~azure.mgmt.compute.v2016_03_30.models.SubResource + """ + + _validation = { + 'key_url': {'required': True}, + 'source_vault': {'required': True}, + } + + _attribute_map = { + 'key_url': {'key': 'keyUrl', 'type': 'str'}, + 'source_vault': {'key': 'sourceVault', 'type': 'SubResource'}, + } + + def __init__(self, *, key_url: str, source_vault, **kwargs) -> None: + super(KeyVaultKeyReference, self).__init__(**kwargs) + self.key_url = key_url + self.source_vault = source_vault + + +class KeyVaultSecretReference(Model): + """Describes a reference to Key Vault Secret. + + All required parameters must be populated in order to send to Azure. + + :param secret_url: Required. The URL referencing a secret in a Key Vault. + :type secret_url: str + :param source_vault: Required. The relative URL of the Key Vault + containing the secret. + :type source_vault: ~azure.mgmt.compute.v2016_03_30.models.SubResource + """ + + _validation = { + 'secret_url': {'required': True}, + 'source_vault': {'required': True}, + } + + _attribute_map = { + 'secret_url': {'key': 'secretUrl', 'type': 'str'}, + 'source_vault': {'key': 'sourceVault', 'type': 'SubResource'}, + } + + def __init__(self, *, secret_url: str, source_vault, **kwargs) -> None: + super(KeyVaultSecretReference, self).__init__(**kwargs) + self.secret_url = secret_url + self.source_vault = source_vault + + +class LinuxConfiguration(Model): + """Specifies the Linux operating system settings on the virtual machine. +

    For a list of supported Linux distributions, see [Linux on + Azure-Endorsed + Distributions](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-endorsed-distros?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json) +

    For running non-endorsed distributions, see [Information for + Non-Endorsed + Distributions](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-create-upload-generic?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json). + + :param disable_password_authentication: Specifies whether password + authentication should be disabled. + :type disable_password_authentication: bool + :param ssh: Specifies the ssh key configuration for a Linux OS. + :type ssh: ~azure.mgmt.compute.v2016_03_30.models.SshConfiguration + """ + + _attribute_map = { + 'disable_password_authentication': {'key': 'disablePasswordAuthentication', 'type': 'bool'}, + 'ssh': {'key': 'ssh', 'type': 'SshConfiguration'}, + } + + def __init__(self, *, disable_password_authentication: bool=None, ssh=None, **kwargs) -> None: + super(LinuxConfiguration, self).__init__(**kwargs) + self.disable_password_authentication = disable_password_authentication + self.ssh = ssh + + +class SubResource(Model): + """SubResource. + + :param id: Resource Id + :type id: str + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + } + + def __init__(self, *, id: str=None, **kwargs) -> None: + super(SubResource, self).__init__(**kwargs) + self.id = id + + +class NetworkInterfaceReference(SubResource): + """Describes a network interface reference. + + :param id: Resource Id + :type id: str + :param primary: Specifies the primary network interface in case the + virtual machine has more than 1 network interface. + :type primary: bool + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'primary': {'key': 'properties.primary', 'type': 'bool'}, + } + + def __init__(self, *, id: str=None, primary: bool=None, **kwargs) -> None: + super(NetworkInterfaceReference, self).__init__(id=id, **kwargs) + self.primary = primary + + +class NetworkProfile(Model): + """Specifies the network interfaces of the virtual machine. + + :param network_interfaces: Specifies the list of resource Ids for the + network interfaces associated with the virtual machine. + :type network_interfaces: + list[~azure.mgmt.compute.v2016_03_30.models.NetworkInterfaceReference] + """ + + _attribute_map = { + 'network_interfaces': {'key': 'networkInterfaces', 'type': '[NetworkInterfaceReference]'}, + } + + def __init__(self, *, network_interfaces=None, **kwargs) -> None: + super(NetworkProfile, self).__init__(**kwargs) + self.network_interfaces = network_interfaces + + +class OperationStatusResponse(Model): + """Operation status response. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar name: Operation ID + :vartype name: str + :ivar status: Operation status + :vartype status: str + :ivar start_time: Start time of the operation + :vartype start_time: datetime + :ivar end_time: End time of the operation + :vartype end_time: datetime + :ivar error: Api error + :vartype error: ~azure.mgmt.compute.v2016_03_30.models.ApiError + """ + + _validation = { + 'name': {'readonly': True}, + 'status': {'readonly': True}, + 'start_time': {'readonly': True}, + 'end_time': {'readonly': True}, + 'error': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'status': {'key': 'status', 'type': 'str'}, + 'start_time': {'key': 'startTime', 'type': 'iso-8601'}, + 'end_time': {'key': 'endTime', 'type': 'iso-8601'}, + 'error': {'key': 'error', 'type': 'ApiError'}, + } + + def __init__(self, **kwargs) -> None: + super(OperationStatusResponse, self).__init__(**kwargs) + self.name = None + self.status = None + self.start_time = None + self.end_time = None + self.error = None + + +class OSDisk(Model): + """Specifies information about the operating system disk used by the virtual + machine.

    For more information about disks, see [About disks and + VHDs for Azure virtual + machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-about-disks-vhds?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). + + All required parameters must be populated in order to send to Azure. + + :param os_type: This property allows you to specify the type of the OS + that is included in the disk if creating a VM from user-image or a + specialized VHD.

    Possible values are:

    **Windows** +

    **Linux**. Possible values include: 'Windows', 'Linux' + :type os_type: str or + ~azure.mgmt.compute.v2016_03_30.models.OperatingSystemTypes + :param encryption_settings: Specifies the encryption settings for the OS + Disk.

    Minimum api-version: 2015-06-15 + :type encryption_settings: + ~azure.mgmt.compute.v2016_03_30.models.DiskEncryptionSettings + :param name: Required. The disk name. + :type name: str + :param vhd: Required. The virtual hard disk. + :type vhd: ~azure.mgmt.compute.v2016_03_30.models.VirtualHardDisk + :param image: The source user image virtual hard disk. The virtual hard + disk will be copied before being attached to the virtual machine. If + SourceImage is provided, the destination virtual hard drive must not + exist. + :type image: ~azure.mgmt.compute.v2016_03_30.models.VirtualHardDisk + :param caching: Specifies the caching requirements.

    Possible + values are:

    **None**

    **ReadOnly**

    **ReadWrite** +

    Default: **None for Standard storage. ReadOnly for Premium + storage**. Possible values include: 'None', 'ReadOnly', 'ReadWrite' + :type caching: str or ~azure.mgmt.compute.v2016_03_30.models.CachingTypes + :param create_option: Required. Specifies how the virtual machine should + be created.

    Possible values are:

    **Attach** \\u2013 This + value is used when you are using a specialized disk to create the virtual + machine.

    **FromImage** \\u2013 This value is used when you are + using an image to create the virtual machine. If you are using a platform + image, you also use the imageReference element described above. If you are + using a marketplace image, you also use the plan element previously + described. Possible values include: 'FromImage', 'Empty', 'Attach' + :type create_option: str or + ~azure.mgmt.compute.v2016_03_30.models.DiskCreateOptionTypes + :param disk_size_gb: Specifies the size of an empty data disk in + gigabytes. This element can be used to overwrite the size of the disk in a + virtual machine image.

    This value cannot be larger than 1023 GB + :type disk_size_gb: int + """ + + _validation = { + 'name': {'required': True}, + 'vhd': {'required': True}, + 'create_option': {'required': True}, + } + + _attribute_map = { + 'os_type': {'key': 'osType', 'type': 'OperatingSystemTypes'}, + 'encryption_settings': {'key': 'encryptionSettings', 'type': 'DiskEncryptionSettings'}, + 'name': {'key': 'name', 'type': 'str'}, + 'vhd': {'key': 'vhd', 'type': 'VirtualHardDisk'}, + 'image': {'key': 'image', 'type': 'VirtualHardDisk'}, + 'caching': {'key': 'caching', 'type': 'CachingTypes'}, + 'create_option': {'key': 'createOption', 'type': 'DiskCreateOptionTypes'}, + 'disk_size_gb': {'key': 'diskSizeGB', 'type': 'int'}, + } + + def __init__(self, *, name: str, vhd, create_option, os_type=None, encryption_settings=None, image=None, caching=None, disk_size_gb: int=None, **kwargs) -> None: + super(OSDisk, self).__init__(**kwargs) + self.os_type = os_type + self.encryption_settings = encryption_settings + self.name = name + self.vhd = vhd + self.image = image + self.caching = caching + self.create_option = create_option + self.disk_size_gb = disk_size_gb + + +class OSDiskImage(Model): + """Contains the os disk image information. + + All required parameters must be populated in order to send to Azure. + + :param operating_system: Required. The operating system of the + osDiskImage. Possible values include: 'Windows', 'Linux' + :type operating_system: str or + ~azure.mgmt.compute.v2016_03_30.models.OperatingSystemTypes + """ + + _validation = { + 'operating_system': {'required': True}, + } + + _attribute_map = { + 'operating_system': {'key': 'operatingSystem', 'type': 'OperatingSystemTypes'}, + } + + def __init__(self, *, operating_system, **kwargs) -> None: + super(OSDiskImage, self).__init__(**kwargs) + self.operating_system = operating_system + + +class OSProfile(Model): + """Specifies the operating system settings for the virtual machine. + + :param computer_name: Specifies the host OS name of the virtual machine. +

    This name cannot be updated after the VM is created.

    + **Max-length (Windows):** 15 characters

    **Max-length (Linux):** + 64 characters.

    For naming conventions and restrictions see [Azure + infrastructure services implementation + guidelines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-infrastructure-subscription-accounts-guidelines?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json#1-naming-conventions). + :type computer_name: str + :param admin_username: Specifies the name of the administrator account. +

    **Windows-only restriction:** Cannot end in "."

    + **Disallowed values:** "administrator", "admin", "user", "user1", "test", + "user2", "test1", "user3", "admin1", "1", "123", "a", "actuser", "adm", + "admin2", "aspnet", "backup", "console", "david", "guest", "john", + "owner", "root", "server", "sql", "support", "support_388945a0", "sys", + "test2", "test3", "user4", "user5".

    **Minimum-length (Linux):** 1 + character

    **Max-length (Linux):** 64 characters

    + **Max-length (Windows):** 20 characters

  • For root access to + the Linux VM, see [Using root privileges on Linux virtual machines in + Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-use-root-privileges?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json)
  • + For a list of built-in system users on Linux that should not be used in + this field, see [Selecting User Names for Linux on + Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-usernames?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json) + :type admin_username: str + :param admin_password: Specifies the password of the administrator + account.

    **Minimum-length (Windows):** 8 characters

    + **Minimum-length (Linux):** 6 characters

    **Max-length + (Windows):** 123 characters

    **Max-length (Linux):** 72 characters +

    **Complexity requirements:** 3 out of 4 conditions below need to + be fulfilled
    Has lower characters
    Has upper characters
    Has a + digit
    Has a special character (Regex match [\\W_])

    + **Disallowed values:** "abc@123", "P@$$w0rd", "P@ssw0rd", "P@ssword123", + "Pa$$word", "pass@word1", "Password!", "Password1", "Password22", + "iloveyou!"

    For resetting the password, see [How to reset the + Remote Desktop service or its login password in a Windows + VM](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-reset-rdp?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json) +

    For resetting root password, see [Manage users, SSH, and check or + repair disks on Azure Linux VMs using the VMAccess + Extension](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-using-vmaccess-extension?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json#reset-root-password) + :type admin_password: str + :param custom_data: Specifies a base-64 encoded string of custom data. The + base-64 encoded string is decoded to a binary array that is saved as a + file on the Virtual Machine. The maximum length of the binary array is + 65535 bytes.

    For using cloud-init for your VM, see [Using + cloud-init to customize a Linux VM during + creation](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-using-cloud-init?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json) + :type custom_data: str + :param windows_configuration: Specifies Windows operating system settings + on the virtual machine. + :type windows_configuration: + ~azure.mgmt.compute.v2016_03_30.models.WindowsConfiguration + :param linux_configuration: Specifies the Linux operating system settings + on the virtual machine.

    For a list of supported Linux + distributions, see [Linux on Azure-Endorsed + Distributions](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-endorsed-distros?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json) +

    For running non-endorsed distributions, see [Information for + Non-Endorsed + Distributions](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-create-upload-generic?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json). + :type linux_configuration: + ~azure.mgmt.compute.v2016_03_30.models.LinuxConfiguration + :param secrets: Specifies set of certificates that should be installed + onto the virtual machine. + :type secrets: + list[~azure.mgmt.compute.v2016_03_30.models.VaultSecretGroup] + """ + + _attribute_map = { + 'computer_name': {'key': 'computerName', 'type': 'str'}, + 'admin_username': {'key': 'adminUsername', 'type': 'str'}, + 'admin_password': {'key': 'adminPassword', 'type': 'str'}, + 'custom_data': {'key': 'customData', 'type': 'str'}, + 'windows_configuration': {'key': 'windowsConfiguration', 'type': 'WindowsConfiguration'}, + 'linux_configuration': {'key': 'linuxConfiguration', 'type': 'LinuxConfiguration'}, + 'secrets': {'key': 'secrets', 'type': '[VaultSecretGroup]'}, + } + + def __init__(self, *, computer_name: str=None, admin_username: str=None, admin_password: str=None, custom_data: str=None, windows_configuration=None, linux_configuration=None, secrets=None, **kwargs) -> None: + super(OSProfile, self).__init__(**kwargs) + self.computer_name = computer_name + self.admin_username = admin_username + self.admin_password = admin_password + self.custom_data = custom_data + self.windows_configuration = windows_configuration + self.linux_configuration = linux_configuration + self.secrets = secrets + + +class Plan(Model): + """Specifies information about the marketplace image used to create the + virtual machine. This element is only used for marketplace images. Before + you can use a marketplace image from an API, you must enable the image for + programmatic use. In the Azure portal, find the marketplace image that you + want to use and then click **Want to deploy programmatically, Get Started + ->**. Enter any required information and then click **Save**. + + :param name: The plan ID. + :type name: str + :param publisher: The publisher ID. + :type publisher: str + :param product: Specifies the product of the image from the marketplace. + This is the same value as Offer under the imageReference element. + :type product: str + :param promotion_code: The promotion code. + :type promotion_code: str + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'publisher': {'key': 'publisher', 'type': 'str'}, + 'product': {'key': 'product', 'type': 'str'}, + 'promotion_code': {'key': 'promotionCode', 'type': 'str'}, + } + + def __init__(self, *, name: str=None, publisher: str=None, product: str=None, promotion_code: str=None, **kwargs) -> None: + super(Plan, self).__init__(**kwargs) + self.name = name + self.publisher = publisher + self.product = product + self.promotion_code = promotion_code + + +class PurchasePlan(Model): + """Used for establishing the purchase context of any 3rd Party artifact + through MarketPlace. + + All required parameters must be populated in order to send to Azure. + + :param publisher: Required. The publisher ID. + :type publisher: str + :param name: Required. The plan ID. + :type name: str + :param product: Required. Specifies the product of the image from the + marketplace. This is the same value as Offer under the imageReference + element. + :type product: str + """ + + _validation = { + 'publisher': {'required': True}, + 'name': {'required': True}, + 'product': {'required': True}, + } + + _attribute_map = { + 'publisher': {'key': 'publisher', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'product': {'key': 'product', 'type': 'str'}, + } + + def __init__(self, *, publisher: str, name: str, product: str, **kwargs) -> None: + super(PurchasePlan, self).__init__(**kwargs) + self.publisher = publisher + self.name = name + self.product = product + + +class Sku(Model): + """Describes a virtual machine scale set sku. + + :param name: The sku name. + :type name: str + :param tier: Specifies the tier of virtual machines in a scale set.

    Possible Values:

    **Standard**

    **Basic** + :type tier: str + :param capacity: Specifies the number of virtual machines in the scale + set. + :type capacity: long + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'tier': {'key': 'tier', 'type': 'str'}, + 'capacity': {'key': 'capacity', 'type': 'long'}, + } + + def __init__(self, *, name: str=None, tier: str=None, capacity: int=None, **kwargs) -> None: + super(Sku, self).__init__(**kwargs) + self.name = name + self.tier = tier + self.capacity = capacity + + +class SshConfiguration(Model): + """SSH configuration for Linux based VMs running on Azure. + + :param public_keys: The list of SSH public keys used to authenticate with + linux based VMs. + :type public_keys: + list[~azure.mgmt.compute.v2016_03_30.models.SshPublicKey] + """ + + _attribute_map = { + 'public_keys': {'key': 'publicKeys', 'type': '[SshPublicKey]'}, + } + + def __init__(self, *, public_keys=None, **kwargs) -> None: + super(SshConfiguration, self).__init__(**kwargs) + self.public_keys = public_keys + + +class SshPublicKey(Model): + """Contains information about SSH certificate public key and the path on the + Linux VM where the public key is placed. + + :param path: Specifies the full path on the created VM where ssh public + key is stored. If the file already exists, the specified key is appended + to the file. Example: /home/user/.ssh/authorized_keys + :type path: str + :param key_data: SSH public key certificate used to authenticate with the + VM through ssh. The key needs to be at least 2048-bit and in ssh-rsa + format.

    For creating ssh keys, see [Create SSH keys on Linux and + Mac for Linux VMs in + Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-mac-create-ssh-keys?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json). + :type key_data: str + """ + + _attribute_map = { + 'path': {'key': 'path', 'type': 'str'}, + 'key_data': {'key': 'keyData', 'type': 'str'}, + } + + def __init__(self, *, path: str=None, key_data: str=None, **kwargs) -> None: + super(SshPublicKey, self).__init__(**kwargs) + self.path = path + self.key_data = key_data + + +class StorageProfile(Model): + """Specifies the storage settings for the virtual machine disks. + + :param image_reference: Specifies information about the image to use. You + can specify information about platform images, marketplace images, or + virtual machine images. This element is required when you want to use a + platform image, marketplace image, or virtual machine image, but is not + used in other creation operations. + :type image_reference: + ~azure.mgmt.compute.v2016_03_30.models.ImageReference + :param os_disk: Specifies information about the operating system disk used + by the virtual machine.

    For more information about disks, see + [About disks and VHDs for Azure virtual + machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-about-disks-vhds?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). + :type os_disk: ~azure.mgmt.compute.v2016_03_30.models.OSDisk + :param data_disks: Specifies the parameters that are used to add a data + disk to a virtual machine.

    For more information about disks, see + [About disks and VHDs for Azure virtual + machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-about-disks-vhds?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). + :type data_disks: list[~azure.mgmt.compute.v2016_03_30.models.DataDisk] + """ + + _attribute_map = { + 'image_reference': {'key': 'imageReference', 'type': 'ImageReference'}, + 'os_disk': {'key': 'osDisk', 'type': 'OSDisk'}, + 'data_disks': {'key': 'dataDisks', 'type': '[DataDisk]'}, + } + + def __init__(self, *, image_reference=None, os_disk=None, data_disks=None, **kwargs) -> None: + super(StorageProfile, self).__init__(**kwargs) + self.image_reference = image_reference + self.os_disk = os_disk + self.data_disks = data_disks + + +class UpdateResource(Model): + """The Update Resource model definition. + + :param tags: Resource tags + :type tags: dict[str, str] + """ + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__(self, *, tags=None, **kwargs) -> None: + super(UpdateResource, self).__init__(**kwargs) + self.tags = tags + + +class UpgradePolicy(Model): + """Describes an upgrade policy - automatic or manual. + + :param mode: Specifies the mode of an upgrade to virtual machines in the + scale set.

    Possible values are:

    **Manual** - You + control the application of updates to virtual machines in the scale set. + You do this by using the manualUpgrade action.

    **Automatic** - + All virtual machines in the scale set are automatically updated at the + same time. Possible values include: 'Automatic', 'Manual' + :type mode: str or ~azure.mgmt.compute.v2016_03_30.models.UpgradeMode + """ + + _attribute_map = { + 'mode': {'key': 'mode', 'type': 'UpgradeMode'}, + } + + def __init__(self, *, mode=None, **kwargs) -> None: + super(UpgradePolicy, self).__init__(**kwargs) + self.mode = mode + + +class Usage(Model): + """Describes Compute Resource Usage. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar unit: Required. An enum describing the unit of usage measurement. + Default value: "Count" . + :vartype unit: str + :param current_value: Required. The current usage of the resource. + :type current_value: int + :param limit: Required. The maximum permitted usage of the resource. + :type limit: long + :param name: Required. The name of the type of usage. + :type name: ~azure.mgmt.compute.v2016_03_30.models.UsageName + """ + + _validation = { + 'unit': {'required': True, 'constant': True}, + 'current_value': {'required': True}, + 'limit': {'required': True}, + 'name': {'required': True}, + } + + _attribute_map = { + 'unit': {'key': 'unit', 'type': 'str'}, + 'current_value': {'key': 'currentValue', 'type': 'int'}, + 'limit': {'key': 'limit', 'type': 'long'}, + 'name': {'key': 'name', 'type': 'UsageName'}, + } + + unit = "Count" + + def __init__(self, *, current_value: int, limit: int, name, **kwargs) -> None: + super(Usage, self).__init__(**kwargs) + self.current_value = current_value + self.limit = limit + self.name = name + + +class UsageName(Model): + """The Usage Names. + + :param value: The name of the resource. + :type value: str + :param localized_value: The localized name of the resource. + :type localized_value: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': 'str'}, + 'localized_value': {'key': 'localizedValue', 'type': 'str'}, + } + + def __init__(self, *, value: str=None, localized_value: str=None, **kwargs) -> None: + super(UsageName, self).__init__(**kwargs) + self.value = value + self.localized_value = localized_value + + +class VaultCertificate(Model): + """Describes a single certificate reference in a Key Vault, and where the + certificate should reside on the VM. + + :param certificate_url: This is the URL of a certificate that has been + uploaded to Key Vault as a secret. For adding a secret to the Key Vault, + see [Add a key or secret to the key + vault](https://docs.microsoft.com/azure/key-vault/key-vault-get-started/#add). + In this case, your certificate needs to be It is the Base64 encoding of + the following JSON Object which is encoded in UTF-8:

    {
    + "data":"",
    "dataType":"pfx",
    + "password":""
    } + :type certificate_url: str + :param certificate_store: For Windows VMs, specifies the certificate store + on the Virtual Machine to which the certificate should be added. The + specified certificate store is implicitly in the LocalMachine account. +

    For Linux VMs, the certificate file is placed under the + /var/lib/waagent directory, with the file name + <UppercaseThumbprint>.crt for the X509 certificate file and + <UppercaseThumbprint>.prv for private key. Both of these files are + .pem formatted. + :type certificate_store: str + """ + + _attribute_map = { + 'certificate_url': {'key': 'certificateUrl', 'type': 'str'}, + 'certificate_store': {'key': 'certificateStore', 'type': 'str'}, + } + + def __init__(self, *, certificate_url: str=None, certificate_store: str=None, **kwargs) -> None: + super(VaultCertificate, self).__init__(**kwargs) + self.certificate_url = certificate_url + self.certificate_store = certificate_store + + +class VaultSecretGroup(Model): + """Describes a set of certificates which are all in the same Key Vault. + + :param source_vault: The relative URL of the Key Vault containing all of + the certificates in VaultCertificates. + :type source_vault: ~azure.mgmt.compute.v2016_03_30.models.SubResource + :param vault_certificates: The list of key vault references in SourceVault + which contain certificates. + :type vault_certificates: + list[~azure.mgmt.compute.v2016_03_30.models.VaultCertificate] + """ + + _attribute_map = { + 'source_vault': {'key': 'sourceVault', 'type': 'SubResource'}, + 'vault_certificates': {'key': 'vaultCertificates', 'type': '[VaultCertificate]'}, + } + + def __init__(self, *, source_vault=None, vault_certificates=None, **kwargs) -> None: + super(VaultSecretGroup, self).__init__(**kwargs) + self.source_vault = source_vault + self.vault_certificates = vault_certificates + + +class VirtualHardDisk(Model): + """Describes the uri of a disk. + + :param uri: Specifies the virtual hard disk's uri. + :type uri: str + """ + + _attribute_map = { + 'uri': {'key': 'uri', 'type': 'str'}, + } + + def __init__(self, *, uri: str=None, **kwargs) -> None: + super(VirtualHardDisk, self).__init__(**kwargs) + self.uri = uri + + +class VirtualMachine(Resource): + """Describes a Virtual Machine. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource Id + :vartype id: str + :ivar name: Resource name + :vartype name: str + :ivar type: Resource type + :vartype type: str + :param location: Required. Resource location + :type location: str + :param tags: Resource tags + :type tags: dict[str, str] + :param plan: Specifies information about the marketplace image used to + create the virtual machine. This element is only used for marketplace + images. Before you can use a marketplace image from an API, you must + enable the image for programmatic use. In the Azure portal, find the + marketplace image that you want to use and then click **Want to deploy + programmatically, Get Started ->**. Enter any required information and + then click **Save**. + :type plan: ~azure.mgmt.compute.v2016_03_30.models.Plan + :param hardware_profile: Specifies the hardware settings for the virtual + machine. + :type hardware_profile: + ~azure.mgmt.compute.v2016_03_30.models.HardwareProfile + :param storage_profile: Specifies the storage settings for the virtual + machine disks. + :type storage_profile: + ~azure.mgmt.compute.v2016_03_30.models.StorageProfile + :param os_profile: Specifies the operating system settings for the virtual + machine. + :type os_profile: ~azure.mgmt.compute.v2016_03_30.models.OSProfile + :param network_profile: Specifies the network interfaces of the virtual + machine. + :type network_profile: + ~azure.mgmt.compute.v2016_03_30.models.NetworkProfile + :param diagnostics_profile: Specifies the boot diagnostic settings state. +

    Minimum api-version: 2015-06-15. + :type diagnostics_profile: + ~azure.mgmt.compute.v2016_03_30.models.DiagnosticsProfile + :param availability_set: Specifies information about the availability set + that the virtual machine should be assigned to. Virtual machines specified + in the same availability set are allocated to different nodes to maximize + availability. For more information about availability sets, see [Manage + the availability of virtual + machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-manage-availability?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). +

    For more information on Azure planned maintenance, see [Planned + maintenance for virtual machines in + Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-planned-maintenance?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json) +

    Currently, a VM can only be added to availability set at creation + time. An existing VM cannot be added to an availability set. + :type availability_set: ~azure.mgmt.compute.v2016_03_30.models.SubResource + :ivar provisioning_state: The provisioning state, which only appears in + the response. + :vartype provisioning_state: str + :ivar instance_view: The virtual machine instance view. + :vartype instance_view: + ~azure.mgmt.compute.v2016_03_30.models.VirtualMachineInstanceView + :param license_type: Specifies that the image or disk that is being used + was licensed on-premises. This element is only used for images that + contain the Windows Server operating system.

    Possible values are: +

    Windows_Client

    Windows_Server

    If this element + is included in a request for an update, the value must match the initial + value. This value cannot be updated.

    For more information, see + [Azure Hybrid Use Benefit for Windows + Server](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-hybrid-use-benefit-licensing?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json) +

    Minimum api-version: 2015-06-15 + :type license_type: str + :ivar vm_id: Specifies the VM unique ID which is a 128-bits identifier + that is encoded and stored in all Azure IaaS VMs SMBIOS and can be read + using platform BIOS commands. + :vartype vm_id: str + :ivar resources: The virtual machine child extension resources. + :vartype resources: + list[~azure.mgmt.compute.v2016_03_30.models.VirtualMachineExtension] + :param identity: The identity of the virtual machine, if configured. + :type identity: + ~azure.mgmt.compute.v2016_03_30.models.VirtualMachineIdentity + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + 'provisioning_state': {'readonly': True}, + 'instance_view': {'readonly': True}, + 'vm_id': {'readonly': True}, + 'resources': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'plan': {'key': 'plan', 'type': 'Plan'}, + 'hardware_profile': {'key': 'properties.hardwareProfile', 'type': 'HardwareProfile'}, + 'storage_profile': {'key': 'properties.storageProfile', 'type': 'StorageProfile'}, + 'os_profile': {'key': 'properties.osProfile', 'type': 'OSProfile'}, + 'network_profile': {'key': 'properties.networkProfile', 'type': 'NetworkProfile'}, + 'diagnostics_profile': {'key': 'properties.diagnosticsProfile', 'type': 'DiagnosticsProfile'}, + 'availability_set': {'key': 'properties.availabilitySet', 'type': 'SubResource'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'instance_view': {'key': 'properties.instanceView', 'type': 'VirtualMachineInstanceView'}, + 'license_type': {'key': 'properties.licenseType', 'type': 'str'}, + 'vm_id': {'key': 'properties.vmId', 'type': 'str'}, + 'resources': {'key': 'resources', 'type': '[VirtualMachineExtension]'}, + 'identity': {'key': 'identity', 'type': 'VirtualMachineIdentity'}, + } + + def __init__(self, *, location: str, tags=None, plan=None, hardware_profile=None, storage_profile=None, os_profile=None, network_profile=None, diagnostics_profile=None, availability_set=None, license_type: str=None, identity=None, **kwargs) -> None: + super(VirtualMachine, self).__init__(location=location, tags=tags, **kwargs) + self.plan = plan + self.hardware_profile = hardware_profile + self.storage_profile = storage_profile + self.os_profile = os_profile + self.network_profile = network_profile + self.diagnostics_profile = diagnostics_profile + self.availability_set = availability_set + self.provisioning_state = None + self.instance_view = None + self.license_type = license_type + self.vm_id = None + self.resources = None + self.identity = identity + + +class VirtualMachineAgentInstanceView(Model): + """The instance view of the VM Agent running on the virtual machine. + + :param vm_agent_version: The VM Agent full version. + :type vm_agent_version: str + :param extension_handlers: The virtual machine extension handler instance + view. + :type extension_handlers: + list[~azure.mgmt.compute.v2016_03_30.models.VirtualMachineExtensionHandlerInstanceView] + :param statuses: The resource status information. + :type statuses: + list[~azure.mgmt.compute.v2016_03_30.models.InstanceViewStatus] + """ + + _attribute_map = { + 'vm_agent_version': {'key': 'vmAgentVersion', 'type': 'str'}, + 'extension_handlers': {'key': 'extensionHandlers', 'type': '[VirtualMachineExtensionHandlerInstanceView]'}, + 'statuses': {'key': 'statuses', 'type': '[InstanceViewStatus]'}, + } + + def __init__(self, *, vm_agent_version: str=None, extension_handlers=None, statuses=None, **kwargs) -> None: + super(VirtualMachineAgentInstanceView, self).__init__(**kwargs) + self.vm_agent_version = vm_agent_version + self.extension_handlers = extension_handlers + self.statuses = statuses + + +class VirtualMachineCaptureParameters(Model): + """Capture Virtual Machine parameters. + + All required parameters must be populated in order to send to Azure. + + :param vhd_prefix: Required. The captured virtual hard disk's name prefix. + :type vhd_prefix: str + :param destination_container_name: Required. The destination container + name. + :type destination_container_name: str + :param overwrite_vhds: Required. Specifies whether to overwrite the + destination virtual hard disk, in case of conflict. + :type overwrite_vhds: bool + """ + + _validation = { + 'vhd_prefix': {'required': True}, + 'destination_container_name': {'required': True}, + 'overwrite_vhds': {'required': True}, + } + + _attribute_map = { + 'vhd_prefix': {'key': 'vhdPrefix', 'type': 'str'}, + 'destination_container_name': {'key': 'destinationContainerName', 'type': 'str'}, + 'overwrite_vhds': {'key': 'overwriteVhds', 'type': 'bool'}, + } + + def __init__(self, *, vhd_prefix: str, destination_container_name: str, overwrite_vhds: bool, **kwargs) -> None: + super(VirtualMachineCaptureParameters, self).__init__(**kwargs) + self.vhd_prefix = vhd_prefix + self.destination_container_name = destination_container_name + self.overwrite_vhds = overwrite_vhds + + +class VirtualMachineCaptureResult(SubResource): + """Resource Id. + + :param id: Resource Id + :type id: str + :param output: Operation output data (raw JSON) + :type output: object + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'output': {'key': 'properties.output', 'type': 'object'}, + } + + def __init__(self, *, id: str=None, output=None, **kwargs) -> None: + super(VirtualMachineCaptureResult, self).__init__(id=id, **kwargs) + self.output = output + + +class VirtualMachineExtension(Resource): + """Describes a Virtual Machine Extension. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource Id + :vartype id: str + :ivar name: Resource name + :vartype name: str + :ivar type: Resource type + :vartype type: str + :param location: Required. Resource location + :type location: str + :param tags: Resource tags + :type tags: dict[str, str] + :param force_update_tag: How the extension handler should be forced to + update even if the extension configuration has not changed. + :type force_update_tag: str + :param publisher: The name of the extension handler publisher. + :type publisher: str + :param virtual_machine_extension_type: Specifies the type of the + extension; an example is "CustomScriptExtension". + :type virtual_machine_extension_type: str + :param type_handler_version: Specifies the version of the script handler. + :type type_handler_version: str + :param auto_upgrade_minor_version: Indicates whether the extension should + use a newer minor version if one is available at deployment time. Once + deployed, however, the extension will not upgrade minor versions unless + redeployed, even with this property set to true. + :type auto_upgrade_minor_version: bool + :param settings: Json formatted public settings for the extension. + :type settings: object + :param protected_settings: The extension can contain either + protectedSettings or protectedSettingsFromKeyVault or no protected + settings at all. + :type protected_settings: object + :ivar provisioning_state: The provisioning state, which only appears in + the response. + :vartype provisioning_state: str + :param instance_view: The virtual machine extension instance view. + :type instance_view: + ~azure.mgmt.compute.v2016_03_30.models.VirtualMachineExtensionInstanceView + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'force_update_tag': {'key': 'properties.forceUpdateTag', 'type': 'str'}, + 'publisher': {'key': 'properties.publisher', 'type': 'str'}, + 'virtual_machine_extension_type': {'key': 'properties.type', 'type': 'str'}, + 'type_handler_version': {'key': 'properties.typeHandlerVersion', 'type': 'str'}, + 'auto_upgrade_minor_version': {'key': 'properties.autoUpgradeMinorVersion', 'type': 'bool'}, + 'settings': {'key': 'properties.settings', 'type': 'object'}, + 'protected_settings': {'key': 'properties.protectedSettings', 'type': 'object'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'instance_view': {'key': 'properties.instanceView', 'type': 'VirtualMachineExtensionInstanceView'}, + } + + def __init__(self, *, location: str, tags=None, force_update_tag: str=None, publisher: str=None, virtual_machine_extension_type: str=None, type_handler_version: str=None, auto_upgrade_minor_version: bool=None, settings=None, protected_settings=None, instance_view=None, **kwargs) -> None: + super(VirtualMachineExtension, self).__init__(location=location, tags=tags, **kwargs) + self.force_update_tag = force_update_tag + self.publisher = publisher + self.virtual_machine_extension_type = virtual_machine_extension_type + self.type_handler_version = type_handler_version + self.auto_upgrade_minor_version = auto_upgrade_minor_version + self.settings = settings + self.protected_settings = protected_settings + self.provisioning_state = None + self.instance_view = instance_view + + +class VirtualMachineExtensionHandlerInstanceView(Model): + """The instance view of a virtual machine extension handler. + + :param type: Specifies the type of the extension; an example is + "CustomScriptExtension". + :type type: str + :param type_handler_version: Specifies the version of the script handler. + :type type_handler_version: str + :param status: The extension handler status. + :type status: ~azure.mgmt.compute.v2016_03_30.models.InstanceViewStatus + """ + + _attribute_map = { + 'type': {'key': 'type', 'type': 'str'}, + 'type_handler_version': {'key': 'typeHandlerVersion', 'type': 'str'}, + 'status': {'key': 'status', 'type': 'InstanceViewStatus'}, + } + + def __init__(self, *, type: str=None, type_handler_version: str=None, status=None, **kwargs) -> None: + super(VirtualMachineExtensionHandlerInstanceView, self).__init__(**kwargs) + self.type = type + self.type_handler_version = type_handler_version + self.status = status + + +class VirtualMachineExtensionImage(Resource): + """Describes a Virtual Machine Extension Image. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource Id + :vartype id: str + :ivar name: Resource name + :vartype name: str + :ivar type: Resource type + :vartype type: str + :param location: Required. Resource location + :type location: str + :param tags: Resource tags + :type tags: dict[str, str] + :param operating_system: Required. The operating system this extension + supports. + :type operating_system: str + :param compute_role: Required. The type of role (IaaS or PaaS) this + extension supports. + :type compute_role: str + :param handler_schema: Required. The schema defined by publisher, where + extension consumers should provide settings in a matching schema. + :type handler_schema: str + :param vm_scale_set_enabled: Whether the extension can be used on xRP + VMScaleSets. By default existing extensions are usable on scalesets, but + there might be cases where a publisher wants to explicitly indicate the + extension is only enabled for CRP VMs but not VMSS. + :type vm_scale_set_enabled: bool + :param supports_multiple_extensions: Whether the handler can support + multiple extensions. + :type supports_multiple_extensions: bool + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + 'operating_system': {'required': True}, + 'compute_role': {'required': True}, + 'handler_schema': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'operating_system': {'key': 'properties.operatingSystem', 'type': 'str'}, + 'compute_role': {'key': 'properties.computeRole', 'type': 'str'}, + 'handler_schema': {'key': 'properties.handlerSchema', 'type': 'str'}, + 'vm_scale_set_enabled': {'key': 'properties.vmScaleSetEnabled', 'type': 'bool'}, + 'supports_multiple_extensions': {'key': 'properties.supportsMultipleExtensions', 'type': 'bool'}, + } + + def __init__(self, *, location: str, operating_system: str, compute_role: str, handler_schema: str, tags=None, vm_scale_set_enabled: bool=None, supports_multiple_extensions: bool=None, **kwargs) -> None: + super(VirtualMachineExtensionImage, self).__init__(location=location, tags=tags, **kwargs) + self.operating_system = operating_system + self.compute_role = compute_role + self.handler_schema = handler_schema + self.vm_scale_set_enabled = vm_scale_set_enabled + self.supports_multiple_extensions = supports_multiple_extensions + + +class VirtualMachineExtensionInstanceView(Model): + """The instance view of a virtual machine extension. + + :param name: The virtual machine extension name. + :type name: str + :param type: Specifies the type of the extension; an example is + "CustomScriptExtension". + :type type: str + :param type_handler_version: Specifies the version of the script handler. + :type type_handler_version: str + :param substatuses: The resource status information. + :type substatuses: + list[~azure.mgmt.compute.v2016_03_30.models.InstanceViewStatus] + :param statuses: The resource status information. + :type statuses: + list[~azure.mgmt.compute.v2016_03_30.models.InstanceViewStatus] + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'type_handler_version': {'key': 'typeHandlerVersion', 'type': 'str'}, + 'substatuses': {'key': 'substatuses', 'type': '[InstanceViewStatus]'}, + 'statuses': {'key': 'statuses', 'type': '[InstanceViewStatus]'}, + } + + def __init__(self, *, name: str=None, type: str=None, type_handler_version: str=None, substatuses=None, statuses=None, **kwargs) -> None: + super(VirtualMachineExtensionInstanceView, self).__init__(**kwargs) + self.name = name + self.type = type + self.type_handler_version = type_handler_version + self.substatuses = substatuses + self.statuses = statuses + + +class VirtualMachineExtensionsListResult(Model): + """The List Extension operation response. + + :param value: The list of extensions + :type value: + list[~azure.mgmt.compute.v2016_03_30.models.VirtualMachineExtension] + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[VirtualMachineExtension]'}, + } + + def __init__(self, *, value=None, **kwargs) -> None: + super(VirtualMachineExtensionsListResult, self).__init__(**kwargs) + self.value = value + + +class VirtualMachineExtensionUpdate(UpdateResource): + """Describes a Virtual Machine Extension. + + :param tags: Resource tags + :type tags: dict[str, str] + :param force_update_tag: How the extension handler should be forced to + update even if the extension configuration has not changed. + :type force_update_tag: str + :param publisher: The name of the extension handler publisher. + :type publisher: str + :param type: Specifies the type of the extension; an example is + "CustomScriptExtension". + :type type: str + :param type_handler_version: Specifies the version of the script handler. + :type type_handler_version: str + :param auto_upgrade_minor_version: Indicates whether the extension should + use a newer minor version if one is available at deployment time. Once + deployed, however, the extension will not upgrade minor versions unless + redeployed, even with this property set to true. + :type auto_upgrade_minor_version: bool + :param settings: Json formatted public settings for the extension. + :type settings: object + :param protected_settings: The extension can contain either + protectedSettings or protectedSettingsFromKeyVault or no protected + settings at all. + :type protected_settings: object + """ + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + 'force_update_tag': {'key': 'properties.forceUpdateTag', 'type': 'str'}, + 'publisher': {'key': 'properties.publisher', 'type': 'str'}, + 'type': {'key': 'properties.type', 'type': 'str'}, + 'type_handler_version': {'key': 'properties.typeHandlerVersion', 'type': 'str'}, + 'auto_upgrade_minor_version': {'key': 'properties.autoUpgradeMinorVersion', 'type': 'bool'}, + 'settings': {'key': 'properties.settings', 'type': 'object'}, + 'protected_settings': {'key': 'properties.protectedSettings', 'type': 'object'}, + } + + def __init__(self, *, tags=None, force_update_tag: str=None, publisher: str=None, type: str=None, type_handler_version: str=None, auto_upgrade_minor_version: bool=None, settings=None, protected_settings=None, **kwargs) -> None: + super(VirtualMachineExtensionUpdate, self).__init__(tags=tags, **kwargs) + self.force_update_tag = force_update_tag + self.publisher = publisher + self.type = type + self.type_handler_version = type_handler_version + self.auto_upgrade_minor_version = auto_upgrade_minor_version + self.settings = settings + self.protected_settings = protected_settings + + +class VirtualMachineIdentity(Model): + """Identity for the virtual machine. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar principal_id: The principal id of virtual machine identity. + :vartype principal_id: str + :ivar tenant_id: The tenant id associated with the virtual machine. + :vartype tenant_id: str + :param type: The type of identity used for the virtual machine. Currently, + the only supported type is 'SystemAssigned', which implicitly creates an + identity. Possible values include: 'SystemAssigned' + :type type: str or + ~azure.mgmt.compute.v2016_03_30.models.ResourceIdentityType + """ + + _validation = { + 'principal_id': {'readonly': True}, + 'tenant_id': {'readonly': True}, + } + + _attribute_map = { + 'principal_id': {'key': 'principalId', 'type': 'str'}, + 'tenant_id': {'key': 'tenantId', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'ResourceIdentityType'}, + } + + def __init__(self, *, type=None, **kwargs) -> None: + super(VirtualMachineIdentity, self).__init__(**kwargs) + self.principal_id = None + self.tenant_id = None + self.type = type + + +class VirtualMachineImageResource(SubResource): + """Virtual machine image resource information. + + All required parameters must be populated in order to send to Azure. + + :param id: Resource Id + :type id: str + :param name: Required. The name of the resource. + :type name: str + :param location: Required. The supported Azure location of the resource. + :type location: str + :param tags: Specifies the tags that are assigned to the virtual machine. + For more information about using tags, see [Using tags to organize your + Azure + resources](https://docs.microsoft.com/azure/azure-resource-manager/resource-group-using-tags.md). + :type tags: dict[str, str] + """ + + _validation = { + 'name': {'required': True}, + 'location': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__(self, *, name: str, location: str, id: str=None, tags=None, **kwargs) -> None: + super(VirtualMachineImageResource, self).__init__(id=id, **kwargs) + self.name = name + self.location = location + self.tags = tags + + +class VirtualMachineImage(VirtualMachineImageResource): + """Describes a Virtual Machine Image. + + All required parameters must be populated in order to send to Azure. + + :param id: Resource Id + :type id: str + :param name: Required. The name of the resource. + :type name: str + :param location: Required. The supported Azure location of the resource. + :type location: str + :param tags: Specifies the tags that are assigned to the virtual machine. + For more information about using tags, see [Using tags to organize your + Azure + resources](https://docs.microsoft.com/azure/azure-resource-manager/resource-group-using-tags.md). + :type tags: dict[str, str] + :param plan: + :type plan: ~azure.mgmt.compute.v2016_03_30.models.PurchasePlan + :param os_disk_image: + :type os_disk_image: ~azure.mgmt.compute.v2016_03_30.models.OSDiskImage + :param data_disk_images: + :type data_disk_images: + list[~azure.mgmt.compute.v2016_03_30.models.DataDiskImage] + """ + + _validation = { + 'name': {'required': True}, + 'location': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'plan': {'key': 'properties.plan', 'type': 'PurchasePlan'}, + 'os_disk_image': {'key': 'properties.osDiskImage', 'type': 'OSDiskImage'}, + 'data_disk_images': {'key': 'properties.dataDiskImages', 'type': '[DataDiskImage]'}, + } + + def __init__(self, *, name: str, location: str, id: str=None, tags=None, plan=None, os_disk_image=None, data_disk_images=None, **kwargs) -> None: + super(VirtualMachineImage, self).__init__(id=id, name=name, location=location, tags=tags, **kwargs) + self.plan = plan + self.os_disk_image = os_disk_image + self.data_disk_images = data_disk_images + + +class VirtualMachineInstanceView(Model): + """The instance view of a virtual machine. + + :param platform_update_domain: Specifies the update domain of the virtual + machine. + :type platform_update_domain: int + :param platform_fault_domain: Specifies the fault domain of the virtual + machine. + :type platform_fault_domain: int + :param rdp_thumb_print: The Remote desktop certificate thumbprint. + :type rdp_thumb_print: str + :param vm_agent: The VM Agent running on the virtual machine. + :type vm_agent: + ~azure.mgmt.compute.v2016_03_30.models.VirtualMachineAgentInstanceView + :param disks: The virtual machine disk information. + :type disks: list[~azure.mgmt.compute.v2016_03_30.models.DiskInstanceView] + :param extensions: The extensions information. + :type extensions: + list[~azure.mgmt.compute.v2016_03_30.models.VirtualMachineExtensionInstanceView] + :param boot_diagnostics: Boot Diagnostics is a debugging feature which + allows you to view Console Output and Screenshot to diagnose VM status. +

    You can easily view the output of your console log.

    + Azure also enables you to see a screenshot of the VM from the hypervisor. + :type boot_diagnostics: + ~azure.mgmt.compute.v2016_03_30.models.BootDiagnosticsInstanceView + :param statuses: The resource status information. + :type statuses: + list[~azure.mgmt.compute.v2016_03_30.models.InstanceViewStatus] + """ + + _attribute_map = { + 'platform_update_domain': {'key': 'platformUpdateDomain', 'type': 'int'}, + 'platform_fault_domain': {'key': 'platformFaultDomain', 'type': 'int'}, + 'rdp_thumb_print': {'key': 'rdpThumbPrint', 'type': 'str'}, + 'vm_agent': {'key': 'vmAgent', 'type': 'VirtualMachineAgentInstanceView'}, + 'disks': {'key': 'disks', 'type': '[DiskInstanceView]'}, + 'extensions': {'key': 'extensions', 'type': '[VirtualMachineExtensionInstanceView]'}, + 'boot_diagnostics': {'key': 'bootDiagnostics', 'type': 'BootDiagnosticsInstanceView'}, + 'statuses': {'key': 'statuses', 'type': '[InstanceViewStatus]'}, + } + + def __init__(self, *, platform_update_domain: int=None, platform_fault_domain: int=None, rdp_thumb_print: str=None, vm_agent=None, disks=None, extensions=None, boot_diagnostics=None, statuses=None, **kwargs) -> None: + super(VirtualMachineInstanceView, self).__init__(**kwargs) + self.platform_update_domain = platform_update_domain + self.platform_fault_domain = platform_fault_domain + self.rdp_thumb_print = rdp_thumb_print + self.vm_agent = vm_agent + self.disks = disks + self.extensions = extensions + self.boot_diagnostics = boot_diagnostics + self.statuses = statuses + + +class VirtualMachineScaleSet(Resource): + """Describes a Virtual Machine Scale Set. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource Id + :vartype id: str + :ivar name: Resource name + :vartype name: str + :ivar type: Resource type + :vartype type: str + :param location: Required. Resource location + :type location: str + :param tags: Resource tags + :type tags: dict[str, str] + :param sku: The virtual machine scale set sku. + :type sku: ~azure.mgmt.compute.v2016_03_30.models.Sku + :param upgrade_policy: The upgrade policy. + :type upgrade_policy: ~azure.mgmt.compute.v2016_03_30.models.UpgradePolicy + :param virtual_machine_profile: The virtual machine profile. + :type virtual_machine_profile: + ~azure.mgmt.compute.v2016_03_30.models.VirtualMachineScaleSetVMProfile + :ivar provisioning_state: The provisioning state, which only appears in + the response. + :vartype provisioning_state: str + :param over_provision: Specifies whether the Virtual Machine Scale Set + should be overprovisioned. + :type over_provision: bool + :param identity: The identity of the virtual machine scale set, if + configured. + :type identity: + ~azure.mgmt.compute.v2016_03_30.models.VirtualMachineScaleSetIdentity + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'sku': {'key': 'sku', 'type': 'Sku'}, + 'upgrade_policy': {'key': 'properties.upgradePolicy', 'type': 'UpgradePolicy'}, + 'virtual_machine_profile': {'key': 'properties.virtualMachineProfile', 'type': 'VirtualMachineScaleSetVMProfile'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'over_provision': {'key': 'properties.overProvision', 'type': 'bool'}, + 'identity': {'key': 'identity', 'type': 'VirtualMachineScaleSetIdentity'}, + } + + def __init__(self, *, location: str, tags=None, sku=None, upgrade_policy=None, virtual_machine_profile=None, over_provision: bool=None, identity=None, **kwargs) -> None: + super(VirtualMachineScaleSet, self).__init__(location=location, tags=tags, **kwargs) + self.sku = sku + self.upgrade_policy = upgrade_policy + self.virtual_machine_profile = virtual_machine_profile + self.provisioning_state = None + self.over_provision = over_provision + self.identity = identity + + +class VirtualMachineScaleSetExtension(SubResource): + """Describes a Virtual Machine Scale Set Extension. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :param id: Resource Id + :type id: str + :param name: The name of the extension. + :type name: str + :param publisher: The name of the extension handler publisher. + :type publisher: str + :param type: The type of the extension handler. + :type type: str + :param type_handler_version: The type version of the extension handler. + :type type_handler_version: str + :param auto_upgrade_minor_version: Whether the extension handler should be + automatically upgraded across minor versions. + :type auto_upgrade_minor_version: bool + :param settings: Json formatted public settings for the extension. + :type settings: object + :param protected_settings: Json formatted protected settings for the + extension. + :type protected_settings: object + :ivar provisioning_state: The provisioning state, which only appears in + the response. + :vartype provisioning_state: str + """ + + _validation = { + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'publisher': {'key': 'properties.publisher', 'type': 'str'}, + 'type': {'key': 'properties.type', 'type': 'str'}, + 'type_handler_version': {'key': 'properties.typeHandlerVersion', 'type': 'str'}, + 'auto_upgrade_minor_version': {'key': 'properties.autoUpgradeMinorVersion', 'type': 'bool'}, + 'settings': {'key': 'properties.settings', 'type': 'object'}, + 'protected_settings': {'key': 'properties.protectedSettings', 'type': 'object'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + } + + def __init__(self, *, id: str=None, name: str=None, publisher: str=None, type: str=None, type_handler_version: str=None, auto_upgrade_minor_version: bool=None, settings=None, protected_settings=None, **kwargs) -> None: + super(VirtualMachineScaleSetExtension, self).__init__(id=id, **kwargs) + self.name = name + self.publisher = publisher + self.type = type + self.type_handler_version = type_handler_version + self.auto_upgrade_minor_version = auto_upgrade_minor_version + self.settings = settings + self.protected_settings = protected_settings + self.provisioning_state = None + + +class VirtualMachineScaleSetExtensionProfile(Model): + """Describes a virtual machine scale set extension profile. + + :param extensions: The virtual machine scale set child extension + resources. + :type extensions: + list[~azure.mgmt.compute.v2016_03_30.models.VirtualMachineScaleSetExtension] + """ + + _attribute_map = { + 'extensions': {'key': 'extensions', 'type': '[VirtualMachineScaleSetExtension]'}, + } + + def __init__(self, *, extensions=None, **kwargs) -> None: + super(VirtualMachineScaleSetExtensionProfile, self).__init__(**kwargs) + self.extensions = extensions + + +class VirtualMachineScaleSetIdentity(Model): + """Identity for the virtual machine scale set. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar principal_id: The principal id of virtual machine scale set + identity. + :vartype principal_id: str + :ivar tenant_id: The tenant id associated with the virtual machine scale + set. + :vartype tenant_id: str + :param type: The type of identity used for the virtual machine scale set. + Currently, the only supported type is 'SystemAssigned', which implicitly + creates an identity. Possible values include: 'SystemAssigned' + :type type: str or + ~azure.mgmt.compute.v2016_03_30.models.ResourceIdentityType + """ + + _validation = { + 'principal_id': {'readonly': True}, + 'tenant_id': {'readonly': True}, + } + + _attribute_map = { + 'principal_id': {'key': 'principalId', 'type': 'str'}, + 'tenant_id': {'key': 'tenantId', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'ResourceIdentityType'}, + } + + def __init__(self, *, type=None, **kwargs) -> None: + super(VirtualMachineScaleSetIdentity, self).__init__(**kwargs) + self.principal_id = None + self.tenant_id = None + self.type = type + + +class VirtualMachineScaleSetInstanceView(Model): + """The instance view of a virtual machine scale set. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar virtual_machine: The instance view status summary for the virtual + machine scale set. + :vartype virtual_machine: + ~azure.mgmt.compute.v2016_03_30.models.VirtualMachineScaleSetInstanceViewStatusesSummary + :ivar extensions: The extensions information. + :vartype extensions: + list[~azure.mgmt.compute.v2016_03_30.models.VirtualMachineScaleSetVMExtensionsSummary] + :param statuses: The resource status information. + :type statuses: + list[~azure.mgmt.compute.v2016_03_30.models.InstanceViewStatus] + """ + + _validation = { + 'virtual_machine': {'readonly': True}, + 'extensions': {'readonly': True}, + } + + _attribute_map = { + 'virtual_machine': {'key': 'virtualMachine', 'type': 'VirtualMachineScaleSetInstanceViewStatusesSummary'}, + 'extensions': {'key': 'extensions', 'type': '[VirtualMachineScaleSetVMExtensionsSummary]'}, + 'statuses': {'key': 'statuses', 'type': '[InstanceViewStatus]'}, + } + + def __init__(self, *, statuses=None, **kwargs) -> None: + super(VirtualMachineScaleSetInstanceView, self).__init__(**kwargs) + self.virtual_machine = None + self.extensions = None + self.statuses = statuses + + +class VirtualMachineScaleSetInstanceViewStatusesSummary(Model): + """Instance view statuses summary for virtual machines of a virtual machine + scale set. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar statuses_summary: The extensions information. + :vartype statuses_summary: + list[~azure.mgmt.compute.v2016_03_30.models.VirtualMachineStatusCodeCount] + """ + + _validation = { + 'statuses_summary': {'readonly': True}, + } + + _attribute_map = { + 'statuses_summary': {'key': 'statusesSummary', 'type': '[VirtualMachineStatusCodeCount]'}, + } + + def __init__(self, **kwargs) -> None: + super(VirtualMachineScaleSetInstanceViewStatusesSummary, self).__init__(**kwargs) + self.statuses_summary = None + + +class VirtualMachineScaleSetIPConfiguration(SubResource): + """Describes a virtual machine scale set network profile's IP configuration. + + All required parameters must be populated in order to send to Azure. + + :param id: Resource Id + :type id: str + :param name: Required. The IP configuration name. + :type name: str + :param subnet: Required. The subnet. + :type subnet: ~azure.mgmt.compute.v2016_03_30.models.ApiEntityReference + :param application_gateway_backend_address_pools: The application gateway + backend address pools. + :type application_gateway_backend_address_pools: + list[~azure.mgmt.compute.v2016_03_30.models.SubResource] + :param load_balancer_backend_address_pools: The load balancer backend + address pools. + :type load_balancer_backend_address_pools: + list[~azure.mgmt.compute.v2016_03_30.models.SubResource] + :param load_balancer_inbound_nat_pools: The load balancer inbound nat + pools. + :type load_balancer_inbound_nat_pools: + list[~azure.mgmt.compute.v2016_03_30.models.SubResource] + """ + + _validation = { + 'name': {'required': True}, + 'subnet': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'subnet': {'key': 'properties.subnet', 'type': 'ApiEntityReference'}, + 'application_gateway_backend_address_pools': {'key': 'properties.applicationGatewayBackendAddressPools', 'type': '[SubResource]'}, + 'load_balancer_backend_address_pools': {'key': 'properties.loadBalancerBackendAddressPools', 'type': '[SubResource]'}, + 'load_balancer_inbound_nat_pools': {'key': 'properties.loadBalancerInboundNatPools', 'type': '[SubResource]'}, + } + + def __init__(self, *, name: str, subnet, id: str=None, application_gateway_backend_address_pools=None, load_balancer_backend_address_pools=None, load_balancer_inbound_nat_pools=None, **kwargs) -> None: + super(VirtualMachineScaleSetIPConfiguration, self).__init__(id=id, **kwargs) + self.name = name + self.subnet = subnet + self.application_gateway_backend_address_pools = application_gateway_backend_address_pools + self.load_balancer_backend_address_pools = load_balancer_backend_address_pools + self.load_balancer_inbound_nat_pools = load_balancer_inbound_nat_pools + + +class VirtualMachineScaleSetNetworkConfiguration(SubResource): + """Describes a virtual machine scale set network profile's network + configurations. + + All required parameters must be populated in order to send to Azure. + + :param id: Resource Id + :type id: str + :param name: Required. The network configuration name. + :type name: str + :param primary: Whether this is a primary NIC on a virtual machine. + :type primary: bool + :param ip_configurations: Required. The virtual machine scale set IP + Configuration. + :type ip_configurations: + list[~azure.mgmt.compute.v2016_03_30.models.VirtualMachineScaleSetIPConfiguration] + """ + + _validation = { + 'name': {'required': True}, + 'ip_configurations': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'primary': {'key': 'properties.primary', 'type': 'bool'}, + 'ip_configurations': {'key': 'properties.ipConfigurations', 'type': '[VirtualMachineScaleSetIPConfiguration]'}, + } + + def __init__(self, *, name: str, ip_configurations, id: str=None, primary: bool=None, **kwargs) -> None: + super(VirtualMachineScaleSetNetworkConfiguration, self).__init__(id=id, **kwargs) + self.name = name + self.primary = primary + self.ip_configurations = ip_configurations + + +class VirtualMachineScaleSetNetworkProfile(Model): + """Describes a virtual machine scale set network profile. + + :param network_interface_configurations: The list of network + configurations. + :type network_interface_configurations: + list[~azure.mgmt.compute.v2016_03_30.models.VirtualMachineScaleSetNetworkConfiguration] + """ + + _attribute_map = { + 'network_interface_configurations': {'key': 'networkInterfaceConfigurations', 'type': '[VirtualMachineScaleSetNetworkConfiguration]'}, + } + + def __init__(self, *, network_interface_configurations=None, **kwargs) -> None: + super(VirtualMachineScaleSetNetworkProfile, self).__init__(**kwargs) + self.network_interface_configurations = network_interface_configurations + + +class VirtualMachineScaleSetOSDisk(Model): + """Describes a virtual machine scale set operating system disk. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. The disk name. + :type name: str + :param caching: Specifies the caching requirements.

    Possible + values are:

    **None**

    **ReadOnly**

    **ReadWrite** +

    Default: **None for Standard storage. ReadOnly for Premium + storage**. Possible values include: 'None', 'ReadOnly', 'ReadWrite' + :type caching: str or ~azure.mgmt.compute.v2016_03_30.models.CachingTypes + :param create_option: Required. Specifies how the virtual machines in the + scale set should be created.

    The only allowed value is: + **FromImage** \\u2013 This value is used when you are using an image to + create the virtual machine. If you are using a platform image, you also + use the imageReference element described above. If you are using a + marketplace image, you also use the plan element previously described. + Possible values include: 'FromImage', 'Empty', 'Attach' + :type create_option: str or + ~azure.mgmt.compute.v2016_03_30.models.DiskCreateOptionTypes + :param os_type: This property allows you to specify the type of the OS + that is included in the disk if creating a VM from user-image or a + specialized VHD.

    Possible values are:

    **Windows** +

    **Linux**. Possible values include: 'Windows', 'Linux' + :type os_type: str or + ~azure.mgmt.compute.v2016_03_30.models.OperatingSystemTypes + :param image: The Source User Image VirtualHardDisk. This VirtualHardDisk + will be copied before using it to attach to the Virtual Machine. If + SourceImage is provided, the destination VirtualHardDisk should not exist. + :type image: ~azure.mgmt.compute.v2016_03_30.models.VirtualHardDisk + :param vhd_containers: The list of virtual hard disk container uris. + :type vhd_containers: list[str] + """ + + _validation = { + 'name': {'required': True}, + 'create_option': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'caching': {'key': 'caching', 'type': 'CachingTypes'}, + 'create_option': {'key': 'createOption', 'type': 'DiskCreateOptionTypes'}, + 'os_type': {'key': 'osType', 'type': 'OperatingSystemTypes'}, + 'image': {'key': 'image', 'type': 'VirtualHardDisk'}, + 'vhd_containers': {'key': 'vhdContainers', 'type': '[str]'}, + } + + def __init__(self, *, name: str, create_option, caching=None, os_type=None, image=None, vhd_containers=None, **kwargs) -> None: + super(VirtualMachineScaleSetOSDisk, self).__init__(**kwargs) + self.name = name + self.caching = caching + self.create_option = create_option + self.os_type = os_type + self.image = image + self.vhd_containers = vhd_containers + + +class VirtualMachineScaleSetOSProfile(Model): + """Describes a virtual machine scale set OS profile. + + :param computer_name_prefix: Specifies the computer name prefix for all of + the virtual machines in the scale set. Computer name prefixes must be 1 to + 15 characters long. + :type computer_name_prefix: str + :param admin_username: Specifies the name of the administrator account. +

    **Windows-only restriction:** Cannot end in "."

    + **Disallowed values:** "administrator", "admin", "user", "user1", "test", + "user2", "test1", "user3", "admin1", "1", "123", "a", "actuser", "adm", + "admin2", "aspnet", "backup", "console", "david", "guest", "john", + "owner", "root", "server", "sql", "support", "support_388945a0", "sys", + "test2", "test3", "user4", "user5".

    **Minimum-length (Linux):** 1 + character

    **Max-length (Linux):** 64 characters

    + **Max-length (Windows):** 20 characters

  • For root access to + the Linux VM, see [Using root privileges on Linux virtual machines in + Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-use-root-privileges?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json)
  • + For a list of built-in system users on Linux that should not be used in + this field, see [Selecting User Names for Linux on + Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-usernames?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json) + :type admin_username: str + :param admin_password: Specifies the password of the administrator + account.

    **Minimum-length (Windows):** 8 characters

    + **Minimum-length (Linux):** 6 characters

    **Max-length + (Windows):** 123 characters

    **Max-length (Linux):** 72 characters +

    **Complexity requirements:** 3 out of 4 conditions below need to + be fulfilled
    Has lower characters
    Has upper characters
    Has a + digit
    Has a special character (Regex match [\\W_])

    + **Disallowed values:** "abc@123", "P@$$w0rd", "P@ssw0rd", "P@ssword123", + "Pa$$word", "pass@word1", "Password!", "Password1", "Password22", + "iloveyou!"

    For resetting the password, see [How to reset the + Remote Desktop service or its login password in a Windows + VM](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-reset-rdp?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json) +

    For resetting root password, see [Manage users, SSH, and check or + repair disks on Azure Linux VMs using the VMAccess + Extension](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-using-vmaccess-extension?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json#reset-root-password) + :type admin_password: str + :param custom_data: A base-64 encoded string of custom data. + :type custom_data: str + :param windows_configuration: The Windows Configuration of the OS profile. + :type windows_configuration: + ~azure.mgmt.compute.v2016_03_30.models.WindowsConfiguration + :param linux_configuration: The Linux Configuration of the OS profile. + :type linux_configuration: + ~azure.mgmt.compute.v2016_03_30.models.LinuxConfiguration + :param secrets: The List of certificates for addition to the VM. + :type secrets: + list[~azure.mgmt.compute.v2016_03_30.models.VaultSecretGroup] + """ + + _attribute_map = { + 'computer_name_prefix': {'key': 'computerNamePrefix', 'type': 'str'}, + 'admin_username': {'key': 'adminUsername', 'type': 'str'}, + 'admin_password': {'key': 'adminPassword', 'type': 'str'}, + 'custom_data': {'key': 'customData', 'type': 'str'}, + 'windows_configuration': {'key': 'windowsConfiguration', 'type': 'WindowsConfiguration'}, + 'linux_configuration': {'key': 'linuxConfiguration', 'type': 'LinuxConfiguration'}, + 'secrets': {'key': 'secrets', 'type': '[VaultSecretGroup]'}, + } + + def __init__(self, *, computer_name_prefix: str=None, admin_username: str=None, admin_password: str=None, custom_data: str=None, windows_configuration=None, linux_configuration=None, secrets=None, **kwargs) -> None: + super(VirtualMachineScaleSetOSProfile, self).__init__(**kwargs) + self.computer_name_prefix = computer_name_prefix + self.admin_username = admin_username + self.admin_password = admin_password + self.custom_data = custom_data + self.windows_configuration = windows_configuration + self.linux_configuration = linux_configuration + self.secrets = secrets + + +class VirtualMachineScaleSetSku(Model): + """Describes an available virtual machine scale set sku. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar resource_type: The type of resource the sku applies to. + :vartype resource_type: str + :ivar sku: The Sku. + :vartype sku: ~azure.mgmt.compute.v2016_03_30.models.Sku + :ivar capacity: Specifies the number of virtual machines in the scale set. + :vartype capacity: + ~azure.mgmt.compute.v2016_03_30.models.VirtualMachineScaleSetSkuCapacity + """ + + _validation = { + 'resource_type': {'readonly': True}, + 'sku': {'readonly': True}, + 'capacity': {'readonly': True}, + } + + _attribute_map = { + 'resource_type': {'key': 'resourceType', 'type': 'str'}, + 'sku': {'key': 'sku', 'type': 'Sku'}, + 'capacity': {'key': 'capacity', 'type': 'VirtualMachineScaleSetSkuCapacity'}, + } + + def __init__(self, **kwargs) -> None: + super(VirtualMachineScaleSetSku, self).__init__(**kwargs) + self.resource_type = None + self.sku = None + self.capacity = None + + +class VirtualMachineScaleSetSkuCapacity(Model): + """Describes scaling information of a sku. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar minimum: The minimum capacity. + :vartype minimum: long + :ivar maximum: The maximum capacity that can be set. + :vartype maximum: long + :ivar default_capacity: The default capacity. + :vartype default_capacity: long + :ivar scale_type: The scale type applicable to the sku. Possible values + include: 'Automatic', 'None' + :vartype scale_type: str or + ~azure.mgmt.compute.v2016_03_30.models.VirtualMachineScaleSetSkuScaleType + """ + + _validation = { + 'minimum': {'readonly': True}, + 'maximum': {'readonly': True}, + 'default_capacity': {'readonly': True}, + 'scale_type': {'readonly': True}, + } + + _attribute_map = { + 'minimum': {'key': 'minimum', 'type': 'long'}, + 'maximum': {'key': 'maximum', 'type': 'long'}, + 'default_capacity': {'key': 'defaultCapacity', 'type': 'long'}, + 'scale_type': {'key': 'scaleType', 'type': 'VirtualMachineScaleSetSkuScaleType'}, + } + + def __init__(self, **kwargs) -> None: + super(VirtualMachineScaleSetSkuCapacity, self).__init__(**kwargs) + self.minimum = None + self.maximum = None + self.default_capacity = None + self.scale_type = None + + +class VirtualMachineScaleSetStorageProfile(Model): + """Describes a virtual machine scale set storage profile. + + :param image_reference: The image reference. + :type image_reference: + ~azure.mgmt.compute.v2016_03_30.models.ImageReference + :param os_disk: The OS disk. + :type os_disk: + ~azure.mgmt.compute.v2016_03_30.models.VirtualMachineScaleSetOSDisk + """ + + _attribute_map = { + 'image_reference': {'key': 'imageReference', 'type': 'ImageReference'}, + 'os_disk': {'key': 'osDisk', 'type': 'VirtualMachineScaleSetOSDisk'}, + } + + def __init__(self, *, image_reference=None, os_disk=None, **kwargs) -> None: + super(VirtualMachineScaleSetStorageProfile, self).__init__(**kwargs) + self.image_reference = image_reference + self.os_disk = os_disk + + +class VirtualMachineScaleSetVM(Resource): + """Describes a virtual machine scale set virtual machine. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource Id + :vartype id: str + :ivar name: Resource name + :vartype name: str + :ivar type: Resource type + :vartype type: str + :param location: Required. Resource location + :type location: str + :param tags: Resource tags + :type tags: dict[str, str] + :ivar instance_id: The virtual machine instance ID. + :vartype instance_id: str + :ivar sku: The virtual machine SKU. + :vartype sku: ~azure.mgmt.compute.v2016_03_30.models.Sku + :ivar latest_model_applied: Specifies whether the latest model has been + applied to the virtual machine. + :vartype latest_model_applied: bool + :ivar vm_id: Azure VM unique ID. + :vartype vm_id: str + :ivar instance_view: The virtual machine instance view. + :vartype instance_view: + ~azure.mgmt.compute.v2016_03_30.models.VirtualMachineScaleSetVMInstanceView + :param hardware_profile: Specifies the hardware settings for the virtual + machine. + :type hardware_profile: + ~azure.mgmt.compute.v2016_03_30.models.HardwareProfile + :param storage_profile: Specifies the storage settings for the virtual + machine disks. + :type storage_profile: + ~azure.mgmt.compute.v2016_03_30.models.StorageProfile + :param os_profile: Specifies the operating system settings for the virtual + machine. + :type os_profile: ~azure.mgmt.compute.v2016_03_30.models.OSProfile + :param network_profile: Specifies the network interfaces of the virtual + machine. + :type network_profile: + ~azure.mgmt.compute.v2016_03_30.models.NetworkProfile + :param diagnostics_profile: Specifies the boot diagnostic settings state. +

    Minimum api-version: 2015-06-15. + :type diagnostics_profile: + ~azure.mgmt.compute.v2016_03_30.models.DiagnosticsProfile + :param availability_set: Specifies information about the availability set + that the virtual machine should be assigned to. Virtual machines specified + in the same availability set are allocated to different nodes to maximize + availability. For more information about availability sets, see [Manage + the availability of virtual + machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-manage-availability?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). +

    For more information on Azure planned maintenance, see [Planned + maintenance for virtual machines in + Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-planned-maintenance?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json) +

    Currently, a VM can only be added to availability set at creation + time. An existing VM cannot be added to an availability set. + :type availability_set: ~azure.mgmt.compute.v2016_03_30.models.SubResource + :ivar provisioning_state: The provisioning state, which only appears in + the response. + :vartype provisioning_state: str + :param license_type: Specifies that the image or disk that is being used + was licensed on-premises. This element is only used for images that + contain the Windows Server operating system.

    Possible values are: +

    Windows_Client

    Windows_Server

    If this element + is included in a request for an update, the value must match the initial + value. This value cannot be updated.

    For more information, see + [Azure Hybrid Use Benefit for Windows + Server](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-hybrid-use-benefit-licensing?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json) +

    Minimum api-version: 2015-06-15 + :type license_type: str + :param plan: Specifies information about the marketplace image used to + create the virtual machine. This element is only used for marketplace + images. Before you can use a marketplace image from an API, you must + enable the image for programmatic use. In the Azure portal, find the + marketplace image that you want to use and then click **Want to deploy + programmatically, Get Started ->**. Enter any required information and + then click **Save**. + :type plan: ~azure.mgmt.compute.v2016_03_30.models.Plan + :ivar resources: The virtual machine child extension resources. + :vartype resources: + list[~azure.mgmt.compute.v2016_03_30.models.VirtualMachineExtension] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + 'instance_id': {'readonly': True}, + 'sku': {'readonly': True}, + 'latest_model_applied': {'readonly': True}, + 'vm_id': {'readonly': True}, + 'instance_view': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + 'resources': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'instance_id': {'key': 'instanceId', 'type': 'str'}, + 'sku': {'key': 'sku', 'type': 'Sku'}, + 'latest_model_applied': {'key': 'properties.latestModelApplied', 'type': 'bool'}, + 'vm_id': {'key': 'properties.vmId', 'type': 'str'}, + 'instance_view': {'key': 'properties.instanceView', 'type': 'VirtualMachineScaleSetVMInstanceView'}, + 'hardware_profile': {'key': 'properties.hardwareProfile', 'type': 'HardwareProfile'}, + 'storage_profile': {'key': 'properties.storageProfile', 'type': 'StorageProfile'}, + 'os_profile': {'key': 'properties.osProfile', 'type': 'OSProfile'}, + 'network_profile': {'key': 'properties.networkProfile', 'type': 'NetworkProfile'}, + 'diagnostics_profile': {'key': 'properties.diagnosticsProfile', 'type': 'DiagnosticsProfile'}, + 'availability_set': {'key': 'properties.availabilitySet', 'type': 'SubResource'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'license_type': {'key': 'properties.licenseType', 'type': 'str'}, + 'plan': {'key': 'plan', 'type': 'Plan'}, + 'resources': {'key': 'resources', 'type': '[VirtualMachineExtension]'}, + } + + def __init__(self, *, location: str, tags=None, hardware_profile=None, storage_profile=None, os_profile=None, network_profile=None, diagnostics_profile=None, availability_set=None, license_type: str=None, plan=None, **kwargs) -> None: + super(VirtualMachineScaleSetVM, self).__init__(location=location, tags=tags, **kwargs) + self.instance_id = None + self.sku = None + self.latest_model_applied = None + self.vm_id = None + self.instance_view = None + self.hardware_profile = hardware_profile + self.storage_profile = storage_profile + self.os_profile = os_profile + self.network_profile = network_profile + self.diagnostics_profile = diagnostics_profile + self.availability_set = availability_set + self.provisioning_state = None + self.license_type = license_type + self.plan = plan + self.resources = None + + +class VirtualMachineScaleSetVMExtensionsSummary(Model): + """Extensions summary for virtual machines of a virtual machine scale set. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar name: The extension name. + :vartype name: str + :ivar statuses_summary: The extensions information. + :vartype statuses_summary: + list[~azure.mgmt.compute.v2016_03_30.models.VirtualMachineStatusCodeCount] + """ + + _validation = { + 'name': {'readonly': True}, + 'statuses_summary': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'statuses_summary': {'key': 'statusesSummary', 'type': '[VirtualMachineStatusCodeCount]'}, + } + + def __init__(self, **kwargs) -> None: + super(VirtualMachineScaleSetVMExtensionsSummary, self).__init__(**kwargs) + self.name = None + self.statuses_summary = None + + +class VirtualMachineScaleSetVMInstanceIDs(Model): + """Specifies a list of virtual machine instance IDs from the VM scale set. + + :param instance_ids: The virtual machine scale set instance ids. Omitting + the virtual machine scale set instance ids will result in the operation + being performed on all virtual machines in the virtual machine scale set. + :type instance_ids: list[str] + """ + + _attribute_map = { + 'instance_ids': {'key': 'instanceIds', 'type': '[str]'}, + } + + def __init__(self, *, instance_ids=None, **kwargs) -> None: + super(VirtualMachineScaleSetVMInstanceIDs, self).__init__(**kwargs) + self.instance_ids = instance_ids + + +class VirtualMachineScaleSetVMInstanceRequiredIDs(Model): + """Specifies a list of virtual machine instance IDs from the VM scale set. + + All required parameters must be populated in order to send to Azure. + + :param instance_ids: Required. The virtual machine scale set instance ids. + :type instance_ids: list[str] + """ + + _validation = { + 'instance_ids': {'required': True}, + } + + _attribute_map = { + 'instance_ids': {'key': 'instanceIds', 'type': '[str]'}, + } + + def __init__(self, *, instance_ids, **kwargs) -> None: + super(VirtualMachineScaleSetVMInstanceRequiredIDs, self).__init__(**kwargs) + self.instance_ids = instance_ids + + +class VirtualMachineScaleSetVMInstanceView(Model): + """The instance view of a virtual machine scale set VM. + + :param platform_update_domain: The Update Domain count. + :type platform_update_domain: int + :param platform_fault_domain: The Fault Domain count. + :type platform_fault_domain: int + :param rdp_thumb_print: The Remote desktop certificate thumbprint. + :type rdp_thumb_print: str + :param vm_agent: The VM Agent running on the virtual machine. + :type vm_agent: + ~azure.mgmt.compute.v2016_03_30.models.VirtualMachineAgentInstanceView + :param disks: The disks information. + :type disks: list[~azure.mgmt.compute.v2016_03_30.models.DiskInstanceView] + :param extensions: The extensions information. + :type extensions: + list[~azure.mgmt.compute.v2016_03_30.models.VirtualMachineExtensionInstanceView] + :param boot_diagnostics: Boot Diagnostics is a debugging feature which + allows you to view Console Output and Screenshot to diagnose VM status. +

    You can easily view the output of your console log.

    + Azure also enables you to see a screenshot of the VM from the hypervisor. + :type boot_diagnostics: + ~azure.mgmt.compute.v2016_03_30.models.BootDiagnosticsInstanceView + :param statuses: The resource status information. + :type statuses: + list[~azure.mgmt.compute.v2016_03_30.models.InstanceViewStatus] + """ + + _attribute_map = { + 'platform_update_domain': {'key': 'platformUpdateDomain', 'type': 'int'}, + 'platform_fault_domain': {'key': 'platformFaultDomain', 'type': 'int'}, + 'rdp_thumb_print': {'key': 'rdpThumbPrint', 'type': 'str'}, + 'vm_agent': {'key': 'vmAgent', 'type': 'VirtualMachineAgentInstanceView'}, + 'disks': {'key': 'disks', 'type': '[DiskInstanceView]'}, + 'extensions': {'key': 'extensions', 'type': '[VirtualMachineExtensionInstanceView]'}, + 'boot_diagnostics': {'key': 'bootDiagnostics', 'type': 'BootDiagnosticsInstanceView'}, + 'statuses': {'key': 'statuses', 'type': '[InstanceViewStatus]'}, + } + + def __init__(self, *, platform_update_domain: int=None, platform_fault_domain: int=None, rdp_thumb_print: str=None, vm_agent=None, disks=None, extensions=None, boot_diagnostics=None, statuses=None, **kwargs) -> None: + super(VirtualMachineScaleSetVMInstanceView, self).__init__(**kwargs) + self.platform_update_domain = platform_update_domain + self.platform_fault_domain = platform_fault_domain + self.rdp_thumb_print = rdp_thumb_print + self.vm_agent = vm_agent + self.disks = disks + self.extensions = extensions + self.boot_diagnostics = boot_diagnostics + self.statuses = statuses + + +class VirtualMachineScaleSetVMProfile(Model): + """Describes a virtual machine scale set virtual machine profile. + + :param os_profile: The virtual machine scale set OS profile. + :type os_profile: + ~azure.mgmt.compute.v2016_03_30.models.VirtualMachineScaleSetOSProfile + :param storage_profile: The virtual machine scale set storage profile. + :type storage_profile: + ~azure.mgmt.compute.v2016_03_30.models.VirtualMachineScaleSetStorageProfile + :param network_profile: The virtual machine scale set network profile. + :type network_profile: + ~azure.mgmt.compute.v2016_03_30.models.VirtualMachineScaleSetNetworkProfile + :param extension_profile: The virtual machine scale set extension profile. + :type extension_profile: + ~azure.mgmt.compute.v2016_03_30.models.VirtualMachineScaleSetExtensionProfile + """ + + _attribute_map = { + 'os_profile': {'key': 'osProfile', 'type': 'VirtualMachineScaleSetOSProfile'}, + 'storage_profile': {'key': 'storageProfile', 'type': 'VirtualMachineScaleSetStorageProfile'}, + 'network_profile': {'key': 'networkProfile', 'type': 'VirtualMachineScaleSetNetworkProfile'}, + 'extension_profile': {'key': 'extensionProfile', 'type': 'VirtualMachineScaleSetExtensionProfile'}, + } + + def __init__(self, *, os_profile=None, storage_profile=None, network_profile=None, extension_profile=None, **kwargs) -> None: + super(VirtualMachineScaleSetVMProfile, self).__init__(**kwargs) + self.os_profile = os_profile + self.storage_profile = storage_profile + self.network_profile = network_profile + self.extension_profile = extension_profile + + +class VirtualMachineSize(Model): + """Describes the properties of a VM size. + + :param name: The name of the virtual machine size. + :type name: str + :param number_of_cores: The number of cores supported by the virtual + machine size. + :type number_of_cores: int + :param os_disk_size_in_mb: The OS disk size, in MB, allowed by the virtual + machine size. + :type os_disk_size_in_mb: int + :param resource_disk_size_in_mb: The resource disk size, in MB, allowed by + the virtual machine size. + :type resource_disk_size_in_mb: int + :param memory_in_mb: The amount of memory, in MB, supported by the virtual + machine size. + :type memory_in_mb: int + :param max_data_disk_count: The maximum number of data disks that can be + attached to the virtual machine size. + :type max_data_disk_count: int + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'number_of_cores': {'key': 'numberOfCores', 'type': 'int'}, + 'os_disk_size_in_mb': {'key': 'osDiskSizeInMB', 'type': 'int'}, + 'resource_disk_size_in_mb': {'key': 'resourceDiskSizeInMB', 'type': 'int'}, + 'memory_in_mb': {'key': 'memoryInMB', 'type': 'int'}, + 'max_data_disk_count': {'key': 'maxDataDiskCount', 'type': 'int'}, + } + + def __init__(self, *, name: str=None, number_of_cores: int=None, os_disk_size_in_mb: int=None, resource_disk_size_in_mb: int=None, memory_in_mb: int=None, max_data_disk_count: int=None, **kwargs) -> None: + super(VirtualMachineSize, self).__init__(**kwargs) + self.name = name + self.number_of_cores = number_of_cores + self.os_disk_size_in_mb = os_disk_size_in_mb + self.resource_disk_size_in_mb = resource_disk_size_in_mb + self.memory_in_mb = memory_in_mb + self.max_data_disk_count = max_data_disk_count + + +class VirtualMachineStatusCodeCount(Model): + """The status code and count of the virtual machine scale set instance view + status summary. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar code: The instance view status code. + :vartype code: str + :ivar count: The number of instances having a particular status code. + :vartype count: int + """ + + _validation = { + 'code': {'readonly': True}, + 'count': {'readonly': True}, + } + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + 'count': {'key': 'count', 'type': 'int'}, + } + + def __init__(self, **kwargs) -> None: + super(VirtualMachineStatusCodeCount, self).__init__(**kwargs) + self.code = None + self.count = None + + +class WindowsConfiguration(Model): + """Specifies Windows operating system settings on the virtual machine. + + :param provision_vm_agent: Indicates whether virtual machine agent should + be provisioned on the virtual machine.

    When this property is not + specified in the request body, default behavior is to set it to true. + This will ensure that VM Agent is installed on the VM so that extensions + can be added to the VM later. + :type provision_vm_agent: bool + :param enable_automatic_updates: Indicates whether virtual machine is + enabled for automatic updates. + :type enable_automatic_updates: bool + :param time_zone: Specifies the time zone of the virtual machine. e.g. + "Pacific Standard Time" + :type time_zone: str + :param additional_unattend_content: Specifies additional base-64 encoded + XML formatted information that can be included in the Unattend.xml file, + which is used by Windows Setup. + :type additional_unattend_content: + list[~azure.mgmt.compute.v2016_03_30.models.AdditionalUnattendContent] + :param win_rm: Specifies the Windows Remote Management listeners. This + enables remote Windows PowerShell. + :type win_rm: ~azure.mgmt.compute.v2016_03_30.models.WinRMConfiguration + """ + + _attribute_map = { + 'provision_vm_agent': {'key': 'provisionVMAgent', 'type': 'bool'}, + 'enable_automatic_updates': {'key': 'enableAutomaticUpdates', 'type': 'bool'}, + 'time_zone': {'key': 'timeZone', 'type': 'str'}, + 'additional_unattend_content': {'key': 'additionalUnattendContent', 'type': '[AdditionalUnattendContent]'}, + 'win_rm': {'key': 'winRM', 'type': 'WinRMConfiguration'}, + } + + def __init__(self, *, provision_vm_agent: bool=None, enable_automatic_updates: bool=None, time_zone: str=None, additional_unattend_content=None, win_rm=None, **kwargs) -> None: + super(WindowsConfiguration, self).__init__(**kwargs) + self.provision_vm_agent = provision_vm_agent + self.enable_automatic_updates = enable_automatic_updates + self.time_zone = time_zone + self.additional_unattend_content = additional_unattend_content + self.win_rm = win_rm + + +class WinRMConfiguration(Model): + """Describes Windows Remote Management configuration of the VM. + + :param listeners: The list of Windows Remote Management listeners + :type listeners: + list[~azure.mgmt.compute.v2016_03_30.models.WinRMListener] + """ + + _attribute_map = { + 'listeners': {'key': 'listeners', 'type': '[WinRMListener]'}, + } + + def __init__(self, *, listeners=None, **kwargs) -> None: + super(WinRMConfiguration, self).__init__(**kwargs) + self.listeners = listeners + + +class WinRMListener(Model): + """Describes Protocol and thumbprint of Windows Remote Management listener. + + :param protocol: Specifies the protocol of listener.

    Possible + values are:
    **http**

    **https**. Possible values include: + 'Http', 'Https' + :type protocol: str or + ~azure.mgmt.compute.v2016_03_30.models.ProtocolTypes + :param certificate_url: This is the URL of a certificate that has been + uploaded to Key Vault as a secret. For adding a secret to the Key Vault, + see [Add a key or secret to the key + vault](https://docs.microsoft.com/azure/key-vault/key-vault-get-started/#add). + In this case, your certificate needs to be It is the Base64 encoding of + the following JSON Object which is encoded in UTF-8:

    {
    + "data":"",
    "dataType":"pfx",
    + "password":""
    } + :type certificate_url: str + """ + + _attribute_map = { + 'protocol': {'key': 'protocol', 'type': 'ProtocolTypes'}, + 'certificate_url': {'key': 'certificateUrl', 'type': 'str'}, + } + + def __init__(self, *, protocol=None, certificate_url: str=None, **kwargs) -> None: + super(WinRMListener, self).__init__(**kwargs) + self.protocol = protocol + self.certificate_url = certificate_url diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/_paged_models.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/_paged_models.py new file mode 100644 index 000000000000..a1a0c174755b --- /dev/null +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/_paged_models.py @@ -0,0 +1,105 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.paging import Paged + + +class AvailabilitySetPaged(Paged): + """ + A paging container for iterating over a list of :class:`AvailabilitySet ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[AvailabilitySet]'} + } + + def __init__(self, *args, **kwargs): + + super(AvailabilitySetPaged, self).__init__(*args, **kwargs) +class VirtualMachineSizePaged(Paged): + """ + A paging container for iterating over a list of :class:`VirtualMachineSize ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[VirtualMachineSize]'} + } + + def __init__(self, *args, **kwargs): + + super(VirtualMachineSizePaged, self).__init__(*args, **kwargs) +class VirtualMachinePaged(Paged): + """ + A paging container for iterating over a list of :class:`VirtualMachine ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[VirtualMachine]'} + } + + def __init__(self, *args, **kwargs): + + super(VirtualMachinePaged, self).__init__(*args, **kwargs) +class UsagePaged(Paged): + """ + A paging container for iterating over a list of :class:`Usage ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[Usage]'} + } + + def __init__(self, *args, **kwargs): + + super(UsagePaged, self).__init__(*args, **kwargs) +class VirtualMachineScaleSetPaged(Paged): + """ + A paging container for iterating over a list of :class:`VirtualMachineScaleSet ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[VirtualMachineScaleSet]'} + } + + def __init__(self, *args, **kwargs): + + super(VirtualMachineScaleSetPaged, self).__init__(*args, **kwargs) +class VirtualMachineScaleSetSkuPaged(Paged): + """ + A paging container for iterating over a list of :class:`VirtualMachineScaleSetSku ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[VirtualMachineScaleSetSku]'} + } + + def __init__(self, *args, **kwargs): + + super(VirtualMachineScaleSetSkuPaged, self).__init__(*args, **kwargs) +class VirtualMachineScaleSetVMPaged(Paged): + """ + A paging container for iterating over a list of :class:`VirtualMachineScaleSetVM ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[VirtualMachineScaleSetVM]'} + } + + def __init__(self, *args, **kwargs): + + super(VirtualMachineScaleSetVMPaged, self).__init__(*args, **kwargs) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/additional_unattend_content.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/additional_unattend_content.py deleted file mode 100644 index d08808bb1c86..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/additional_unattend_content.py +++ /dev/null @@ -1,52 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class AdditionalUnattendContent(Model): - """Specifies additional XML formatted information that can be included in the - Unattend.xml file, which is used by Windows Setup. Contents are defined by - setting name, component name, and the pass in which the content is applied. - - :param pass_name: The pass name. Currently, the only allowable value is - OobeSystem. Possible values include: 'OobeSystem' - :type pass_name: str or ~azure.mgmt.compute.v2016_03_30.models.PassNames - :param component_name: The component name. Currently, the only allowable - value is Microsoft-Windows-Shell-Setup. Possible values include: - 'Microsoft-Windows-Shell-Setup' - :type component_name: str or - ~azure.mgmt.compute.v2016_03_30.models.ComponentNames - :param setting_name: Specifies the name of the setting to which the - content applies. Possible values are: FirstLogonCommands and AutoLogon. - Possible values include: 'AutoLogon', 'FirstLogonCommands' - :type setting_name: str or - ~azure.mgmt.compute.v2016_03_30.models.SettingNames - :param content: Specifies the XML formatted content that is added to the - unattend.xml file for the specified path and component. The XML must be - less than 4KB and must include the root element for the setting or feature - that is being inserted. - :type content: str - """ - - _attribute_map = { - 'pass_name': {'key': 'passName', 'type': 'PassNames'}, - 'component_name': {'key': 'componentName', 'type': 'ComponentNames'}, - 'setting_name': {'key': 'settingName', 'type': 'SettingNames'}, - 'content': {'key': 'content', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(AdditionalUnattendContent, self).__init__(**kwargs) - self.pass_name = kwargs.get('pass_name', None) - self.component_name = kwargs.get('component_name', None) - self.setting_name = kwargs.get('setting_name', None) - self.content = kwargs.get('content', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/additional_unattend_content_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/additional_unattend_content_py3.py deleted file mode 100644 index ae5bfe4f555f..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/additional_unattend_content_py3.py +++ /dev/null @@ -1,52 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class AdditionalUnattendContent(Model): - """Specifies additional XML formatted information that can be included in the - Unattend.xml file, which is used by Windows Setup. Contents are defined by - setting name, component name, and the pass in which the content is applied. - - :param pass_name: The pass name. Currently, the only allowable value is - OobeSystem. Possible values include: 'OobeSystem' - :type pass_name: str or ~azure.mgmt.compute.v2016_03_30.models.PassNames - :param component_name: The component name. Currently, the only allowable - value is Microsoft-Windows-Shell-Setup. Possible values include: - 'Microsoft-Windows-Shell-Setup' - :type component_name: str or - ~azure.mgmt.compute.v2016_03_30.models.ComponentNames - :param setting_name: Specifies the name of the setting to which the - content applies. Possible values are: FirstLogonCommands and AutoLogon. - Possible values include: 'AutoLogon', 'FirstLogonCommands' - :type setting_name: str or - ~azure.mgmt.compute.v2016_03_30.models.SettingNames - :param content: Specifies the XML formatted content that is added to the - unattend.xml file for the specified path and component. The XML must be - less than 4KB and must include the root element for the setting or feature - that is being inserted. - :type content: str - """ - - _attribute_map = { - 'pass_name': {'key': 'passName', 'type': 'PassNames'}, - 'component_name': {'key': 'componentName', 'type': 'ComponentNames'}, - 'setting_name': {'key': 'settingName', 'type': 'SettingNames'}, - 'content': {'key': 'content', 'type': 'str'}, - } - - def __init__(self, *, pass_name=None, component_name=None, setting_name=None, content: str=None, **kwargs) -> None: - super(AdditionalUnattendContent, self).__init__(**kwargs) - self.pass_name = pass_name - self.component_name = component_name - self.setting_name = setting_name - self.content = content diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/api_entity_reference.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/api_entity_reference.py deleted file mode 100644 index d43730af3659..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/api_entity_reference.py +++ /dev/null @@ -1,29 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ApiEntityReference(Model): - """The API entity reference. - - :param id: The ARM resource id in the form of - /subscriptions/{SubscriptionId}/resourceGroups/{ResourceGroupName}/... - :type id: str - """ - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ApiEntityReference, self).__init__(**kwargs) - self.id = kwargs.get('id', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/api_entity_reference_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/api_entity_reference_py3.py deleted file mode 100644 index d42dfb1a5fd0..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/api_entity_reference_py3.py +++ /dev/null @@ -1,29 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ApiEntityReference(Model): - """The API entity reference. - - :param id: The ARM resource id in the form of - /subscriptions/{SubscriptionId}/resourceGroups/{ResourceGroupName}/... - :type id: str - """ - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - } - - def __init__(self, *, id: str=None, **kwargs) -> None: - super(ApiEntityReference, self).__init__(**kwargs) - self.id = id diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/api_error.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/api_error.py deleted file mode 100644 index 979a44dc777d..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/api_error.py +++ /dev/null @@ -1,44 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ApiError(Model): - """Api error. - - :param details: The Api error details - :type details: list[~azure.mgmt.compute.v2016_03_30.models.ApiErrorBase] - :param innererror: The Api inner error - :type innererror: ~azure.mgmt.compute.v2016_03_30.models.InnerError - :param code: The error code. - :type code: str - :param target: The target of the particular error. - :type target: str - :param message: The error message. - :type message: str - """ - - _attribute_map = { - 'details': {'key': 'details', 'type': '[ApiErrorBase]'}, - 'innererror': {'key': 'innererror', 'type': 'InnerError'}, - 'code': {'key': 'code', 'type': 'str'}, - 'target': {'key': 'target', 'type': 'str'}, - 'message': {'key': 'message', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ApiError, self).__init__(**kwargs) - self.details = kwargs.get('details', None) - self.innererror = kwargs.get('innererror', None) - self.code = kwargs.get('code', None) - self.target = kwargs.get('target', None) - self.message = kwargs.get('message', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/api_error_base.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/api_error_base.py deleted file mode 100644 index 655c08638905..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/api_error_base.py +++ /dev/null @@ -1,36 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ApiErrorBase(Model): - """Api error base. - - :param code: The error code. - :type code: str - :param target: The target of the particular error. - :type target: str - :param message: The error message. - :type message: str - """ - - _attribute_map = { - 'code': {'key': 'code', 'type': 'str'}, - 'target': {'key': 'target', 'type': 'str'}, - 'message': {'key': 'message', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ApiErrorBase, self).__init__(**kwargs) - self.code = kwargs.get('code', None) - self.target = kwargs.get('target', None) - self.message = kwargs.get('message', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/api_error_base_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/api_error_base_py3.py deleted file mode 100644 index 5ba95aa0283e..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/api_error_base_py3.py +++ /dev/null @@ -1,36 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ApiErrorBase(Model): - """Api error base. - - :param code: The error code. - :type code: str - :param target: The target of the particular error. - :type target: str - :param message: The error message. - :type message: str - """ - - _attribute_map = { - 'code': {'key': 'code', 'type': 'str'}, - 'target': {'key': 'target', 'type': 'str'}, - 'message': {'key': 'message', 'type': 'str'}, - } - - def __init__(self, *, code: str=None, target: str=None, message: str=None, **kwargs) -> None: - super(ApiErrorBase, self).__init__(**kwargs) - self.code = code - self.target = target - self.message = message diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/api_error_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/api_error_py3.py deleted file mode 100644 index 5a68b96923d1..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/api_error_py3.py +++ /dev/null @@ -1,44 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ApiError(Model): - """Api error. - - :param details: The Api error details - :type details: list[~azure.mgmt.compute.v2016_03_30.models.ApiErrorBase] - :param innererror: The Api inner error - :type innererror: ~azure.mgmt.compute.v2016_03_30.models.InnerError - :param code: The error code. - :type code: str - :param target: The target of the particular error. - :type target: str - :param message: The error message. - :type message: str - """ - - _attribute_map = { - 'details': {'key': 'details', 'type': '[ApiErrorBase]'}, - 'innererror': {'key': 'innererror', 'type': 'InnerError'}, - 'code': {'key': 'code', 'type': 'str'}, - 'target': {'key': 'target', 'type': 'str'}, - 'message': {'key': 'message', 'type': 'str'}, - } - - def __init__(self, *, details=None, innererror=None, code: str=None, target: str=None, message: str=None, **kwargs) -> None: - super(ApiError, self).__init__(**kwargs) - self.details = details - self.innererror = innererror - self.code = code - self.target = target - self.message = message diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/availability_set.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/availability_set.py deleted file mode 100644 index f83f6af68ad1..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/availability_set.py +++ /dev/null @@ -1,81 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource import Resource - - -class AvailabilitySet(Resource): - """Specifies information about the availability set that the virtual machine - should be assigned to. Virtual machines specified in the same availability - set are allocated to different nodes to maximize availability. For more - information about availability sets, see [Manage the availability of - virtual - machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-manage-availability?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). -

    For more information on Azure planned maintenance, see [Planned - maintenance for virtual machines in - Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-planned-maintenance?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json) -

    Currently, a VM can only be added to availability set at creation - time. An existing VM cannot be added to an availability set. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource Id - :vartype id: str - :ivar name: Resource name - :vartype name: str - :ivar type: Resource type - :vartype type: str - :param location: Required. Resource location - :type location: str - :param tags: Resource tags - :type tags: dict[str, str] - :param platform_update_domain_count: Update Domain count. - :type platform_update_domain_count: int - :param platform_fault_domain_count: Fault Domain count. - :type platform_fault_domain_count: int - :param virtual_machines: A list of references to all virtual machines in - the availability set. - :type virtual_machines: - list[~azure.mgmt.compute.v2016_03_30.models.SubResource] - :ivar statuses: The resource status information. - :vartype statuses: - list[~azure.mgmt.compute.v2016_03_30.models.InstanceViewStatus] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - 'statuses': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'platform_update_domain_count': {'key': 'properties.platformUpdateDomainCount', 'type': 'int'}, - 'platform_fault_domain_count': {'key': 'properties.platformFaultDomainCount', 'type': 'int'}, - 'virtual_machines': {'key': 'properties.virtualMachines', 'type': '[SubResource]'}, - 'statuses': {'key': 'properties.statuses', 'type': '[InstanceViewStatus]'}, - } - - def __init__(self, **kwargs): - super(AvailabilitySet, self).__init__(**kwargs) - self.platform_update_domain_count = kwargs.get('platform_update_domain_count', None) - self.platform_fault_domain_count = kwargs.get('platform_fault_domain_count', None) - self.virtual_machines = kwargs.get('virtual_machines', None) - self.statuses = None diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/availability_set_paged.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/availability_set_paged.py deleted file mode 100644 index fb9d45ccc25a..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/availability_set_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class AvailabilitySetPaged(Paged): - """ - A paging container for iterating over a list of :class:`AvailabilitySet ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[AvailabilitySet]'} - } - - def __init__(self, *args, **kwargs): - - super(AvailabilitySetPaged, self).__init__(*args, **kwargs) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/availability_set_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/availability_set_py3.py deleted file mode 100644 index 3804dce9c0b1..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/availability_set_py3.py +++ /dev/null @@ -1,81 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource_py3 import Resource - - -class AvailabilitySet(Resource): - """Specifies information about the availability set that the virtual machine - should be assigned to. Virtual machines specified in the same availability - set are allocated to different nodes to maximize availability. For more - information about availability sets, see [Manage the availability of - virtual - machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-manage-availability?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). -

    For more information on Azure planned maintenance, see [Planned - maintenance for virtual machines in - Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-planned-maintenance?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json) -

    Currently, a VM can only be added to availability set at creation - time. An existing VM cannot be added to an availability set. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource Id - :vartype id: str - :ivar name: Resource name - :vartype name: str - :ivar type: Resource type - :vartype type: str - :param location: Required. Resource location - :type location: str - :param tags: Resource tags - :type tags: dict[str, str] - :param platform_update_domain_count: Update Domain count. - :type platform_update_domain_count: int - :param platform_fault_domain_count: Fault Domain count. - :type platform_fault_domain_count: int - :param virtual_machines: A list of references to all virtual machines in - the availability set. - :type virtual_machines: - list[~azure.mgmt.compute.v2016_03_30.models.SubResource] - :ivar statuses: The resource status information. - :vartype statuses: - list[~azure.mgmt.compute.v2016_03_30.models.InstanceViewStatus] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - 'statuses': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'platform_update_domain_count': {'key': 'properties.platformUpdateDomainCount', 'type': 'int'}, - 'platform_fault_domain_count': {'key': 'properties.platformFaultDomainCount', 'type': 'int'}, - 'virtual_machines': {'key': 'properties.virtualMachines', 'type': '[SubResource]'}, - 'statuses': {'key': 'properties.statuses', 'type': '[InstanceViewStatus]'}, - } - - def __init__(self, *, location: str, tags=None, platform_update_domain_count: int=None, platform_fault_domain_count: int=None, virtual_machines=None, **kwargs) -> None: - super(AvailabilitySet, self).__init__(location=location, tags=tags, **kwargs) - self.platform_update_domain_count = platform_update_domain_count - self.platform_fault_domain_count = platform_fault_domain_count - self.virtual_machines = virtual_machines - self.statuses = None diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/boot_diagnostics.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/boot_diagnostics.py deleted file mode 100644 index 4a1f77c4d7d0..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/boot_diagnostics.py +++ /dev/null @@ -1,37 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class BootDiagnostics(Model): - """Boot Diagnostics is a debugging feature which allows you to view Console - Output and Screenshot to diagnose VM status.

    You can easily view - the output of your console log.

    Azure also enables you to see a - screenshot of the VM from the hypervisor. - - :param enabled: Whether boot diagnostics should be enabled on the Virtual - Machine. - :type enabled: bool - :param storage_uri: Uri of the storage account to use for placing the - console output and screenshot. - :type storage_uri: str - """ - - _attribute_map = { - 'enabled': {'key': 'enabled', 'type': 'bool'}, - 'storage_uri': {'key': 'storageUri', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(BootDiagnostics, self).__init__(**kwargs) - self.enabled = kwargs.get('enabled', None) - self.storage_uri = kwargs.get('storage_uri', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/boot_diagnostics_instance_view.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/boot_diagnostics_instance_view.py deleted file mode 100644 index 05ca725929f6..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/boot_diagnostics_instance_view.py +++ /dev/null @@ -1,40 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class BootDiagnosticsInstanceView(Model): - """The instance view of a virtual machine boot diagnostics. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar console_screenshot_blob_uri: The console screenshot blob URI. - :vartype console_screenshot_blob_uri: str - :ivar serial_console_log_blob_uri: The Linux serial console log blob Uri. - :vartype serial_console_log_blob_uri: str - """ - - _validation = { - 'console_screenshot_blob_uri': {'readonly': True}, - 'serial_console_log_blob_uri': {'readonly': True}, - } - - _attribute_map = { - 'console_screenshot_blob_uri': {'key': 'consoleScreenshotBlobUri', 'type': 'str'}, - 'serial_console_log_blob_uri': {'key': 'serialConsoleLogBlobUri', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(BootDiagnosticsInstanceView, self).__init__(**kwargs) - self.console_screenshot_blob_uri = None - self.serial_console_log_blob_uri = None diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/boot_diagnostics_instance_view_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/boot_diagnostics_instance_view_py3.py deleted file mode 100644 index 97e4cdba67c4..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/boot_diagnostics_instance_view_py3.py +++ /dev/null @@ -1,40 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class BootDiagnosticsInstanceView(Model): - """The instance view of a virtual machine boot diagnostics. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar console_screenshot_blob_uri: The console screenshot blob URI. - :vartype console_screenshot_blob_uri: str - :ivar serial_console_log_blob_uri: The Linux serial console log blob Uri. - :vartype serial_console_log_blob_uri: str - """ - - _validation = { - 'console_screenshot_blob_uri': {'readonly': True}, - 'serial_console_log_blob_uri': {'readonly': True}, - } - - _attribute_map = { - 'console_screenshot_blob_uri': {'key': 'consoleScreenshotBlobUri', 'type': 'str'}, - 'serial_console_log_blob_uri': {'key': 'serialConsoleLogBlobUri', 'type': 'str'}, - } - - def __init__(self, **kwargs) -> None: - super(BootDiagnosticsInstanceView, self).__init__(**kwargs) - self.console_screenshot_blob_uri = None - self.serial_console_log_blob_uri = None diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/boot_diagnostics_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/boot_diagnostics_py3.py deleted file mode 100644 index b64ae5b4adde..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/boot_diagnostics_py3.py +++ /dev/null @@ -1,37 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class BootDiagnostics(Model): - """Boot Diagnostics is a debugging feature which allows you to view Console - Output and Screenshot to diagnose VM status.

    You can easily view - the output of your console log.

    Azure also enables you to see a - screenshot of the VM from the hypervisor. - - :param enabled: Whether boot diagnostics should be enabled on the Virtual - Machine. - :type enabled: bool - :param storage_uri: Uri of the storage account to use for placing the - console output and screenshot. - :type storage_uri: str - """ - - _attribute_map = { - 'enabled': {'key': 'enabled', 'type': 'bool'}, - 'storage_uri': {'key': 'storageUri', 'type': 'str'}, - } - - def __init__(self, *, enabled: bool=None, storage_uri: str=None, **kwargs) -> None: - super(BootDiagnostics, self).__init__(**kwargs) - self.enabled = enabled - self.storage_uri = storage_uri diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/compute_long_running_operation_properties.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/compute_long_running_operation_properties.py deleted file mode 100644 index 66ff353eb206..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/compute_long_running_operation_properties.py +++ /dev/null @@ -1,28 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ComputeLongRunningOperationProperties(Model): - """Compute-specific operation properties, including output. - - :param output: Operation output data (raw JSON) - :type output: object - """ - - _attribute_map = { - 'output': {'key': 'output', 'type': 'object'}, - } - - def __init__(self, **kwargs): - super(ComputeLongRunningOperationProperties, self).__init__(**kwargs) - self.output = kwargs.get('output', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/compute_long_running_operation_properties_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/compute_long_running_operation_properties_py3.py deleted file mode 100644 index a4ffd6c8c32f..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/compute_long_running_operation_properties_py3.py +++ /dev/null @@ -1,28 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ComputeLongRunningOperationProperties(Model): - """Compute-specific operation properties, including output. - - :param output: Operation output data (raw JSON) - :type output: object - """ - - _attribute_map = { - 'output': {'key': 'output', 'type': 'object'}, - } - - def __init__(self, *, output=None, **kwargs) -> None: - super(ComputeLongRunningOperationProperties, self).__init__(**kwargs) - self.output = output diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/data_disk.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/data_disk.py deleted file mode 100644 index 43bafc130205..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/data_disk.py +++ /dev/null @@ -1,79 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class DataDisk(Model): - """Describes a data disk. - - All required parameters must be populated in order to send to Azure. - - :param lun: Required. Specifies the logical unit number of the data disk. - This value is used to identify data disks within the VM and therefore must - be unique for each data disk attached to a VM. - :type lun: int - :param name: Required. The disk name. - :type name: str - :param vhd: Required. The virtual hard disk. - :type vhd: ~azure.mgmt.compute.v2016_03_30.models.VirtualHardDisk - :param image: The source user image virtual hard disk. The virtual hard - disk will be copied before being attached to the virtual machine. If - SourceImage is provided, the destination virtual hard drive must not - exist. - :type image: ~azure.mgmt.compute.v2016_03_30.models.VirtualHardDisk - :param caching: Specifies the caching requirements.

    Possible - values are:

    **None**

    **ReadOnly**

    **ReadWrite** -

    Default: **None for Standard storage. ReadOnly for Premium - storage**. Possible values include: 'None', 'ReadOnly', 'ReadWrite' - :type caching: str or ~azure.mgmt.compute.v2016_03_30.models.CachingTypes - :param create_option: Required. Specifies how the virtual machine should - be created.

    Possible values are:

    **Attach** \\u2013 This - value is used when you are using a specialized disk to create the virtual - machine.

    **FromImage** \\u2013 This value is used when you are - using an image to create the virtual machine. If you are using a platform - image, you also use the imageReference element described above. If you are - using a marketplace image, you also use the plan element previously - described. Possible values include: 'FromImage', 'Empty', 'Attach' - :type create_option: str or - ~azure.mgmt.compute.v2016_03_30.models.DiskCreateOptionTypes - :param disk_size_gb: Specifies the size of an empty data disk in - gigabytes. This element can be used to overwrite the size of the disk in a - virtual machine image.

    This value cannot be larger than 1023 GB - :type disk_size_gb: int - """ - - _validation = { - 'lun': {'required': True}, - 'name': {'required': True}, - 'vhd': {'required': True}, - 'create_option': {'required': True}, - } - - _attribute_map = { - 'lun': {'key': 'lun', 'type': 'int'}, - 'name': {'key': 'name', 'type': 'str'}, - 'vhd': {'key': 'vhd', 'type': 'VirtualHardDisk'}, - 'image': {'key': 'image', 'type': 'VirtualHardDisk'}, - 'caching': {'key': 'caching', 'type': 'CachingTypes'}, - 'create_option': {'key': 'createOption', 'type': 'DiskCreateOptionTypes'}, - 'disk_size_gb': {'key': 'diskSizeGB', 'type': 'int'}, - } - - def __init__(self, **kwargs): - super(DataDisk, self).__init__(**kwargs) - self.lun = kwargs.get('lun', None) - self.name = kwargs.get('name', None) - self.vhd = kwargs.get('vhd', None) - self.image = kwargs.get('image', None) - self.caching = kwargs.get('caching', None) - self.create_option = kwargs.get('create_option', None) - self.disk_size_gb = kwargs.get('disk_size_gb', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/data_disk_image.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/data_disk_image.py deleted file mode 100644 index b5dbfcefb472..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/data_disk_image.py +++ /dev/null @@ -1,37 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class DataDiskImage(Model): - """Contains the data disk images information. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar lun: Specifies the logical unit number of the data disk. This value - is used to identify data disks within the VM and therefore must be unique - for each data disk attached to a VM. - :vartype lun: int - """ - - _validation = { - 'lun': {'readonly': True}, - } - - _attribute_map = { - 'lun': {'key': 'lun', 'type': 'int'}, - } - - def __init__(self, **kwargs): - super(DataDiskImage, self).__init__(**kwargs) - self.lun = None diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/data_disk_image_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/data_disk_image_py3.py deleted file mode 100644 index 8431a3988502..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/data_disk_image_py3.py +++ /dev/null @@ -1,37 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class DataDiskImage(Model): - """Contains the data disk images information. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar lun: Specifies the logical unit number of the data disk. This value - is used to identify data disks within the VM and therefore must be unique - for each data disk attached to a VM. - :vartype lun: int - """ - - _validation = { - 'lun': {'readonly': True}, - } - - _attribute_map = { - 'lun': {'key': 'lun', 'type': 'int'}, - } - - def __init__(self, **kwargs) -> None: - super(DataDiskImage, self).__init__(**kwargs) - self.lun = None diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/data_disk_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/data_disk_py3.py deleted file mode 100644 index 4c613b75231b..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/data_disk_py3.py +++ /dev/null @@ -1,79 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class DataDisk(Model): - """Describes a data disk. - - All required parameters must be populated in order to send to Azure. - - :param lun: Required. Specifies the logical unit number of the data disk. - This value is used to identify data disks within the VM and therefore must - be unique for each data disk attached to a VM. - :type lun: int - :param name: Required. The disk name. - :type name: str - :param vhd: Required. The virtual hard disk. - :type vhd: ~azure.mgmt.compute.v2016_03_30.models.VirtualHardDisk - :param image: The source user image virtual hard disk. The virtual hard - disk will be copied before being attached to the virtual machine. If - SourceImage is provided, the destination virtual hard drive must not - exist. - :type image: ~azure.mgmt.compute.v2016_03_30.models.VirtualHardDisk - :param caching: Specifies the caching requirements.

    Possible - values are:

    **None**

    **ReadOnly**

    **ReadWrite** -

    Default: **None for Standard storage. ReadOnly for Premium - storage**. Possible values include: 'None', 'ReadOnly', 'ReadWrite' - :type caching: str or ~azure.mgmt.compute.v2016_03_30.models.CachingTypes - :param create_option: Required. Specifies how the virtual machine should - be created.

    Possible values are:

    **Attach** \\u2013 This - value is used when you are using a specialized disk to create the virtual - machine.

    **FromImage** \\u2013 This value is used when you are - using an image to create the virtual machine. If you are using a platform - image, you also use the imageReference element described above. If you are - using a marketplace image, you also use the plan element previously - described. Possible values include: 'FromImage', 'Empty', 'Attach' - :type create_option: str or - ~azure.mgmt.compute.v2016_03_30.models.DiskCreateOptionTypes - :param disk_size_gb: Specifies the size of an empty data disk in - gigabytes. This element can be used to overwrite the size of the disk in a - virtual machine image.

    This value cannot be larger than 1023 GB - :type disk_size_gb: int - """ - - _validation = { - 'lun': {'required': True}, - 'name': {'required': True}, - 'vhd': {'required': True}, - 'create_option': {'required': True}, - } - - _attribute_map = { - 'lun': {'key': 'lun', 'type': 'int'}, - 'name': {'key': 'name', 'type': 'str'}, - 'vhd': {'key': 'vhd', 'type': 'VirtualHardDisk'}, - 'image': {'key': 'image', 'type': 'VirtualHardDisk'}, - 'caching': {'key': 'caching', 'type': 'CachingTypes'}, - 'create_option': {'key': 'createOption', 'type': 'DiskCreateOptionTypes'}, - 'disk_size_gb': {'key': 'diskSizeGB', 'type': 'int'}, - } - - def __init__(self, *, lun: int, name: str, vhd, create_option, image=None, caching=None, disk_size_gb: int=None, **kwargs) -> None: - super(DataDisk, self).__init__(**kwargs) - self.lun = lun - self.name = name - self.vhd = vhd - self.image = image - self.caching = caching - self.create_option = create_option - self.disk_size_gb = disk_size_gb diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/diagnostics_profile.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/diagnostics_profile.py deleted file mode 100644 index a235ce0b5984..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/diagnostics_profile.py +++ /dev/null @@ -1,33 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class DiagnosticsProfile(Model): - """Specifies the boot diagnostic settings state.

    Minimum api-version: - 2015-06-15. - - :param boot_diagnostics: Boot Diagnostics is a debugging feature which - allows you to view Console Output and Screenshot to diagnose VM status. -

    You can easily view the output of your console log.

    - Azure also enables you to see a screenshot of the VM from the hypervisor. - :type boot_diagnostics: - ~azure.mgmt.compute.v2016_03_30.models.BootDiagnostics - """ - - _attribute_map = { - 'boot_diagnostics': {'key': 'bootDiagnostics', 'type': 'BootDiagnostics'}, - } - - def __init__(self, **kwargs): - super(DiagnosticsProfile, self).__init__(**kwargs) - self.boot_diagnostics = kwargs.get('boot_diagnostics', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/diagnostics_profile_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/diagnostics_profile_py3.py deleted file mode 100644 index ccc65927c7b8..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/diagnostics_profile_py3.py +++ /dev/null @@ -1,33 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class DiagnosticsProfile(Model): - """Specifies the boot diagnostic settings state.

    Minimum api-version: - 2015-06-15. - - :param boot_diagnostics: Boot Diagnostics is a debugging feature which - allows you to view Console Output and Screenshot to diagnose VM status. -

    You can easily view the output of your console log.

    - Azure also enables you to see a screenshot of the VM from the hypervisor. - :type boot_diagnostics: - ~azure.mgmt.compute.v2016_03_30.models.BootDiagnostics - """ - - _attribute_map = { - 'boot_diagnostics': {'key': 'bootDiagnostics', 'type': 'BootDiagnostics'}, - } - - def __init__(self, *, boot_diagnostics=None, **kwargs) -> None: - super(DiagnosticsProfile, self).__init__(**kwargs) - self.boot_diagnostics = boot_diagnostics diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/disk_encryption_settings.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/disk_encryption_settings.py deleted file mode 100644 index 4ccf7b295cd9..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/disk_encryption_settings.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class DiskEncryptionSettings(Model): - """Describes a Encryption Settings for a Disk. - - :param disk_encryption_key: Specifies the location of the disk encryption - key, which is a Key Vault Secret. - :type disk_encryption_key: - ~azure.mgmt.compute.v2016_03_30.models.KeyVaultSecretReference - :param key_encryption_key: Specifies the location of the key encryption - key in Key Vault. - :type key_encryption_key: - ~azure.mgmt.compute.v2016_03_30.models.KeyVaultKeyReference - :param enabled: Specifies whether disk encryption should be enabled on the - virtual machine. - :type enabled: bool - """ - - _attribute_map = { - 'disk_encryption_key': {'key': 'diskEncryptionKey', 'type': 'KeyVaultSecretReference'}, - 'key_encryption_key': {'key': 'keyEncryptionKey', 'type': 'KeyVaultKeyReference'}, - 'enabled': {'key': 'enabled', 'type': 'bool'}, - } - - def __init__(self, **kwargs): - super(DiskEncryptionSettings, self).__init__(**kwargs) - self.disk_encryption_key = kwargs.get('disk_encryption_key', None) - self.key_encryption_key = kwargs.get('key_encryption_key', None) - self.enabled = kwargs.get('enabled', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/disk_encryption_settings_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/disk_encryption_settings_py3.py deleted file mode 100644 index b88964dd19c7..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/disk_encryption_settings_py3.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class DiskEncryptionSettings(Model): - """Describes a Encryption Settings for a Disk. - - :param disk_encryption_key: Specifies the location of the disk encryption - key, which is a Key Vault Secret. - :type disk_encryption_key: - ~azure.mgmt.compute.v2016_03_30.models.KeyVaultSecretReference - :param key_encryption_key: Specifies the location of the key encryption - key in Key Vault. - :type key_encryption_key: - ~azure.mgmt.compute.v2016_03_30.models.KeyVaultKeyReference - :param enabled: Specifies whether disk encryption should be enabled on the - virtual machine. - :type enabled: bool - """ - - _attribute_map = { - 'disk_encryption_key': {'key': 'diskEncryptionKey', 'type': 'KeyVaultSecretReference'}, - 'key_encryption_key': {'key': 'keyEncryptionKey', 'type': 'KeyVaultKeyReference'}, - 'enabled': {'key': 'enabled', 'type': 'bool'}, - } - - def __init__(self, *, disk_encryption_key=None, key_encryption_key=None, enabled: bool=None, **kwargs) -> None: - super(DiskEncryptionSettings, self).__init__(**kwargs) - self.disk_encryption_key = disk_encryption_key - self.key_encryption_key = key_encryption_key - self.enabled = enabled diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/disk_instance_view.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/disk_instance_view.py deleted file mode 100644 index 50ab86fe9eca..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/disk_instance_view.py +++ /dev/null @@ -1,33 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class DiskInstanceView(Model): - """The instance view of the disk. - - :param name: The disk name. - :type name: str - :param statuses: The resource status information. - :type statuses: - list[~azure.mgmt.compute.v2016_03_30.models.InstanceViewStatus] - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'statuses': {'key': 'statuses', 'type': '[InstanceViewStatus]'}, - } - - def __init__(self, **kwargs): - super(DiskInstanceView, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.statuses = kwargs.get('statuses', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/disk_instance_view_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/disk_instance_view_py3.py deleted file mode 100644 index 8da1a08ac029..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/disk_instance_view_py3.py +++ /dev/null @@ -1,33 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class DiskInstanceView(Model): - """The instance view of the disk. - - :param name: The disk name. - :type name: str - :param statuses: The resource status information. - :type statuses: - list[~azure.mgmt.compute.v2016_03_30.models.InstanceViewStatus] - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'statuses': {'key': 'statuses', 'type': '[InstanceViewStatus]'}, - } - - def __init__(self, *, name: str=None, statuses=None, **kwargs) -> None: - super(DiskInstanceView, self).__init__(**kwargs) - self.name = name - self.statuses = statuses diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/hardware_profile.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/hardware_profile.py deleted file mode 100644 index b68f4ea12d59..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/hardware_profile.py +++ /dev/null @@ -1,55 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class HardwareProfile(Model): - """Specifies the hardware settings for the virtual machine. - - :param vm_size: Specifies the size of the virtual machine. For more - information about virtual machine sizes, see [Sizes for virtual - machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-sizes?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). -

    The available VM sizes depend on region and availability set. For - a list of available sizes use these APIs:

    [List all available - virtual machine sizes in an availability - set](https://docs.microsoft.com/rest/api/compute/availabilitysets/listavailablesizes) -

    [List all available virtual machine sizes in a - region](https://docs.microsoft.com/rest/api/compute/virtualmachinesizes/list) -

    [List all available virtual machine sizes for - resizing](https://docs.microsoft.com/rest/api/compute/virtualmachines/listavailablesizes). - Possible values include: 'Basic_A0', 'Basic_A1', 'Basic_A2', 'Basic_A3', - 'Basic_A4', 'Standard_A0', 'Standard_A1', 'Standard_A2', 'Standard_A3', - 'Standard_A4', 'Standard_A5', 'Standard_A6', 'Standard_A7', 'Standard_A8', - 'Standard_A9', 'Standard_A10', 'Standard_A11', 'Standard_D1', - 'Standard_D2', 'Standard_D3', 'Standard_D4', 'Standard_D11', - 'Standard_D12', 'Standard_D13', 'Standard_D14', 'Standard_D1_v2', - 'Standard_D2_v2', 'Standard_D3_v2', 'Standard_D4_v2', 'Standard_D5_v2', - 'Standard_D11_v2', 'Standard_D12_v2', 'Standard_D13_v2', - 'Standard_D14_v2', 'Standard_D15_v2', 'Standard_DS1', 'Standard_DS2', - 'Standard_DS3', 'Standard_DS4', 'Standard_DS11', 'Standard_DS12', - 'Standard_DS13', 'Standard_DS14', 'Standard_DS1_v2', 'Standard_DS2_v2', - 'Standard_DS3_v2', 'Standard_DS4_v2', 'Standard_DS5_v2', - 'Standard_DS11_v2', 'Standard_DS12_v2', 'Standard_DS13_v2', - 'Standard_DS14_v2', 'Standard_DS15_v2', 'Standard_G1', 'Standard_G2', - 'Standard_G3', 'Standard_G4', 'Standard_G5', 'Standard_GS1', - 'Standard_GS2', 'Standard_GS3', 'Standard_GS4', 'Standard_GS5' - :type vm_size: str or - ~azure.mgmt.compute.v2016_03_30.models.VirtualMachineSizeTypes - """ - - _attribute_map = { - 'vm_size': {'key': 'vmSize', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(HardwareProfile, self).__init__(**kwargs) - self.vm_size = kwargs.get('vm_size', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/hardware_profile_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/hardware_profile_py3.py deleted file mode 100644 index 9718067dd1b4..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/hardware_profile_py3.py +++ /dev/null @@ -1,55 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class HardwareProfile(Model): - """Specifies the hardware settings for the virtual machine. - - :param vm_size: Specifies the size of the virtual machine. For more - information about virtual machine sizes, see [Sizes for virtual - machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-sizes?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). -

    The available VM sizes depend on region and availability set. For - a list of available sizes use these APIs:

    [List all available - virtual machine sizes in an availability - set](https://docs.microsoft.com/rest/api/compute/availabilitysets/listavailablesizes) -

    [List all available virtual machine sizes in a - region](https://docs.microsoft.com/rest/api/compute/virtualmachinesizes/list) -

    [List all available virtual machine sizes for - resizing](https://docs.microsoft.com/rest/api/compute/virtualmachines/listavailablesizes). - Possible values include: 'Basic_A0', 'Basic_A1', 'Basic_A2', 'Basic_A3', - 'Basic_A4', 'Standard_A0', 'Standard_A1', 'Standard_A2', 'Standard_A3', - 'Standard_A4', 'Standard_A5', 'Standard_A6', 'Standard_A7', 'Standard_A8', - 'Standard_A9', 'Standard_A10', 'Standard_A11', 'Standard_D1', - 'Standard_D2', 'Standard_D3', 'Standard_D4', 'Standard_D11', - 'Standard_D12', 'Standard_D13', 'Standard_D14', 'Standard_D1_v2', - 'Standard_D2_v2', 'Standard_D3_v2', 'Standard_D4_v2', 'Standard_D5_v2', - 'Standard_D11_v2', 'Standard_D12_v2', 'Standard_D13_v2', - 'Standard_D14_v2', 'Standard_D15_v2', 'Standard_DS1', 'Standard_DS2', - 'Standard_DS3', 'Standard_DS4', 'Standard_DS11', 'Standard_DS12', - 'Standard_DS13', 'Standard_DS14', 'Standard_DS1_v2', 'Standard_DS2_v2', - 'Standard_DS3_v2', 'Standard_DS4_v2', 'Standard_DS5_v2', - 'Standard_DS11_v2', 'Standard_DS12_v2', 'Standard_DS13_v2', - 'Standard_DS14_v2', 'Standard_DS15_v2', 'Standard_G1', 'Standard_G2', - 'Standard_G3', 'Standard_G4', 'Standard_G5', 'Standard_GS1', - 'Standard_GS2', 'Standard_GS3', 'Standard_GS4', 'Standard_GS5' - :type vm_size: str or - ~azure.mgmt.compute.v2016_03_30.models.VirtualMachineSizeTypes - """ - - _attribute_map = { - 'vm_size': {'key': 'vmSize', 'type': 'str'}, - } - - def __init__(self, *, vm_size=None, **kwargs) -> None: - super(HardwareProfile, self).__init__(**kwargs) - self.vm_size = vm_size diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/image_reference.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/image_reference.py deleted file mode 100644 index d83cc00f394f..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/image_reference.py +++ /dev/null @@ -1,51 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ImageReference(Model): - """Specifies information about the image to use. You can specify information - about platform images, marketplace images, or virtual machine images. This - element is required when you want to use a platform image, marketplace - image, or virtual machine image, but is not used in other creation - operations. - - :param publisher: The image publisher. - :type publisher: str - :param offer: Specifies the offer of the platform image or marketplace - image used to create the virtual machine. - :type offer: str - :param sku: The image SKU. - :type sku: str - :param version: Specifies the version of the platform image or marketplace - image used to create the virtual machine. The allowed formats are - Major.Minor.Build or 'latest'. Major, Minor, and Build are decimal - numbers. Specify 'latest' to use the latest version of an image available - at deploy time. Even if you use 'latest', the VM image will not - automatically update after deploy time even if a new version becomes - available. - :type version: str - """ - - _attribute_map = { - 'publisher': {'key': 'publisher', 'type': 'str'}, - 'offer': {'key': 'offer', 'type': 'str'}, - 'sku': {'key': 'sku', 'type': 'str'}, - 'version': {'key': 'version', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ImageReference, self).__init__(**kwargs) - self.publisher = kwargs.get('publisher', None) - self.offer = kwargs.get('offer', None) - self.sku = kwargs.get('sku', None) - self.version = kwargs.get('version', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/image_reference_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/image_reference_py3.py deleted file mode 100644 index ec4e3f91dee4..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/image_reference_py3.py +++ /dev/null @@ -1,51 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ImageReference(Model): - """Specifies information about the image to use. You can specify information - about platform images, marketplace images, or virtual machine images. This - element is required when you want to use a platform image, marketplace - image, or virtual machine image, but is not used in other creation - operations. - - :param publisher: The image publisher. - :type publisher: str - :param offer: Specifies the offer of the platform image or marketplace - image used to create the virtual machine. - :type offer: str - :param sku: The image SKU. - :type sku: str - :param version: Specifies the version of the platform image or marketplace - image used to create the virtual machine. The allowed formats are - Major.Minor.Build or 'latest'. Major, Minor, and Build are decimal - numbers. Specify 'latest' to use the latest version of an image available - at deploy time. Even if you use 'latest', the VM image will not - automatically update after deploy time even if a new version becomes - available. - :type version: str - """ - - _attribute_map = { - 'publisher': {'key': 'publisher', 'type': 'str'}, - 'offer': {'key': 'offer', 'type': 'str'}, - 'sku': {'key': 'sku', 'type': 'str'}, - 'version': {'key': 'version', 'type': 'str'}, - } - - def __init__(self, *, publisher: str=None, offer: str=None, sku: str=None, version: str=None, **kwargs) -> None: - super(ImageReference, self).__init__(**kwargs) - self.publisher = publisher - self.offer = offer - self.sku = sku - self.version = version diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/inner_error.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/inner_error.py deleted file mode 100644 index 6324249d7c19..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/inner_error.py +++ /dev/null @@ -1,32 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class InnerError(Model): - """Inner error details. - - :param exceptiontype: The exception type. - :type exceptiontype: str - :param errordetail: The internal error message or exception dump. - :type errordetail: str - """ - - _attribute_map = { - 'exceptiontype': {'key': 'exceptiontype', 'type': 'str'}, - 'errordetail': {'key': 'errordetail', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(InnerError, self).__init__(**kwargs) - self.exceptiontype = kwargs.get('exceptiontype', None) - self.errordetail = kwargs.get('errordetail', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/inner_error_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/inner_error_py3.py deleted file mode 100644 index ccec30d7b53f..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/inner_error_py3.py +++ /dev/null @@ -1,32 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class InnerError(Model): - """Inner error details. - - :param exceptiontype: The exception type. - :type exceptiontype: str - :param errordetail: The internal error message or exception dump. - :type errordetail: str - """ - - _attribute_map = { - 'exceptiontype': {'key': 'exceptiontype', 'type': 'str'}, - 'errordetail': {'key': 'errordetail', 'type': 'str'}, - } - - def __init__(self, *, exceptiontype: str=None, errordetail: str=None, **kwargs) -> None: - super(InnerError, self).__init__(**kwargs) - self.exceptiontype = exceptiontype - self.errordetail = errordetail diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/instance_view_status.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/instance_view_status.py deleted file mode 100644 index 55af5b89ce75..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/instance_view_status.py +++ /dev/null @@ -1,47 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class InstanceViewStatus(Model): - """Instance view status. - - :param code: The status code. - :type code: str - :param level: The level code. Possible values include: 'Info', 'Warning', - 'Error' - :type level: str or - ~azure.mgmt.compute.v2016_03_30.models.StatusLevelTypes - :param display_status: The short localizable label for the status. - :type display_status: str - :param message: The detailed status message, including for alerts and - error messages. - :type message: str - :param time: The time of the status. - :type time: datetime - """ - - _attribute_map = { - 'code': {'key': 'code', 'type': 'str'}, - 'level': {'key': 'level', 'type': 'StatusLevelTypes'}, - 'display_status': {'key': 'displayStatus', 'type': 'str'}, - 'message': {'key': 'message', 'type': 'str'}, - 'time': {'key': 'time', 'type': 'iso-8601'}, - } - - def __init__(self, **kwargs): - super(InstanceViewStatus, self).__init__(**kwargs) - self.code = kwargs.get('code', None) - self.level = kwargs.get('level', None) - self.display_status = kwargs.get('display_status', None) - self.message = kwargs.get('message', None) - self.time = kwargs.get('time', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/instance_view_status_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/instance_view_status_py3.py deleted file mode 100644 index 87a7679454a0..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/instance_view_status_py3.py +++ /dev/null @@ -1,47 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class InstanceViewStatus(Model): - """Instance view status. - - :param code: The status code. - :type code: str - :param level: The level code. Possible values include: 'Info', 'Warning', - 'Error' - :type level: str or - ~azure.mgmt.compute.v2016_03_30.models.StatusLevelTypes - :param display_status: The short localizable label for the status. - :type display_status: str - :param message: The detailed status message, including for alerts and - error messages. - :type message: str - :param time: The time of the status. - :type time: datetime - """ - - _attribute_map = { - 'code': {'key': 'code', 'type': 'str'}, - 'level': {'key': 'level', 'type': 'StatusLevelTypes'}, - 'display_status': {'key': 'displayStatus', 'type': 'str'}, - 'message': {'key': 'message', 'type': 'str'}, - 'time': {'key': 'time', 'type': 'iso-8601'}, - } - - def __init__(self, *, code: str=None, level=None, display_status: str=None, message: str=None, time=None, **kwargs) -> None: - super(InstanceViewStatus, self).__init__(**kwargs) - self.code = code - self.level = level - self.display_status = display_status - self.message = message - self.time = time diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/key_vault_key_reference.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/key_vault_key_reference.py deleted file mode 100644 index 49da8ab13dab..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/key_vault_key_reference.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class KeyVaultKeyReference(Model): - """Describes a reference to Key Vault Key. - - All required parameters must be populated in order to send to Azure. - - :param key_url: Required. The URL referencing a key encryption key in Key - Vault. - :type key_url: str - :param source_vault: Required. The relative URL of the Key Vault - containing the key. - :type source_vault: ~azure.mgmt.compute.v2016_03_30.models.SubResource - """ - - _validation = { - 'key_url': {'required': True}, - 'source_vault': {'required': True}, - } - - _attribute_map = { - 'key_url': {'key': 'keyUrl', 'type': 'str'}, - 'source_vault': {'key': 'sourceVault', 'type': 'SubResource'}, - } - - def __init__(self, **kwargs): - super(KeyVaultKeyReference, self).__init__(**kwargs) - self.key_url = kwargs.get('key_url', None) - self.source_vault = kwargs.get('source_vault', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/key_vault_key_reference_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/key_vault_key_reference_py3.py deleted file mode 100644 index 7b4901a56e4c..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/key_vault_key_reference_py3.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class KeyVaultKeyReference(Model): - """Describes a reference to Key Vault Key. - - All required parameters must be populated in order to send to Azure. - - :param key_url: Required. The URL referencing a key encryption key in Key - Vault. - :type key_url: str - :param source_vault: Required. The relative URL of the Key Vault - containing the key. - :type source_vault: ~azure.mgmt.compute.v2016_03_30.models.SubResource - """ - - _validation = { - 'key_url': {'required': True}, - 'source_vault': {'required': True}, - } - - _attribute_map = { - 'key_url': {'key': 'keyUrl', 'type': 'str'}, - 'source_vault': {'key': 'sourceVault', 'type': 'SubResource'}, - } - - def __init__(self, *, key_url: str, source_vault, **kwargs) -> None: - super(KeyVaultKeyReference, self).__init__(**kwargs) - self.key_url = key_url - self.source_vault = source_vault diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/key_vault_secret_reference.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/key_vault_secret_reference.py deleted file mode 100644 index 41102a59518b..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/key_vault_secret_reference.py +++ /dev/null @@ -1,40 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class KeyVaultSecretReference(Model): - """Describes a reference to Key Vault Secret. - - All required parameters must be populated in order to send to Azure. - - :param secret_url: Required. The URL referencing a secret in a Key Vault. - :type secret_url: str - :param source_vault: Required. The relative URL of the Key Vault - containing the secret. - :type source_vault: ~azure.mgmt.compute.v2016_03_30.models.SubResource - """ - - _validation = { - 'secret_url': {'required': True}, - 'source_vault': {'required': True}, - } - - _attribute_map = { - 'secret_url': {'key': 'secretUrl', 'type': 'str'}, - 'source_vault': {'key': 'sourceVault', 'type': 'SubResource'}, - } - - def __init__(self, **kwargs): - super(KeyVaultSecretReference, self).__init__(**kwargs) - self.secret_url = kwargs.get('secret_url', None) - self.source_vault = kwargs.get('source_vault', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/key_vault_secret_reference_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/key_vault_secret_reference_py3.py deleted file mode 100644 index 18d593c7d070..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/key_vault_secret_reference_py3.py +++ /dev/null @@ -1,40 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class KeyVaultSecretReference(Model): - """Describes a reference to Key Vault Secret. - - All required parameters must be populated in order to send to Azure. - - :param secret_url: Required. The URL referencing a secret in a Key Vault. - :type secret_url: str - :param source_vault: Required. The relative URL of the Key Vault - containing the secret. - :type source_vault: ~azure.mgmt.compute.v2016_03_30.models.SubResource - """ - - _validation = { - 'secret_url': {'required': True}, - 'source_vault': {'required': True}, - } - - _attribute_map = { - 'secret_url': {'key': 'secretUrl', 'type': 'str'}, - 'source_vault': {'key': 'sourceVault', 'type': 'SubResource'}, - } - - def __init__(self, *, secret_url: str, source_vault, **kwargs) -> None: - super(KeyVaultSecretReference, self).__init__(**kwargs) - self.secret_url = secret_url - self.source_vault = source_vault diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/linux_configuration.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/linux_configuration.py deleted file mode 100644 index b4d5fc4466cb..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/linux_configuration.py +++ /dev/null @@ -1,39 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class LinuxConfiguration(Model): - """Specifies the Linux operating system settings on the virtual machine. -

    For a list of supported Linux distributions, see [Linux on - Azure-Endorsed - Distributions](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-endorsed-distros?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json) -

    For running non-endorsed distributions, see [Information for - Non-Endorsed - Distributions](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-create-upload-generic?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json). - - :param disable_password_authentication: Specifies whether password - authentication should be disabled. - :type disable_password_authentication: bool - :param ssh: Specifies the ssh key configuration for a Linux OS. - :type ssh: ~azure.mgmt.compute.v2016_03_30.models.SshConfiguration - """ - - _attribute_map = { - 'disable_password_authentication': {'key': 'disablePasswordAuthentication', 'type': 'bool'}, - 'ssh': {'key': 'ssh', 'type': 'SshConfiguration'}, - } - - def __init__(self, **kwargs): - super(LinuxConfiguration, self).__init__(**kwargs) - self.disable_password_authentication = kwargs.get('disable_password_authentication', None) - self.ssh = kwargs.get('ssh', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/linux_configuration_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/linux_configuration_py3.py deleted file mode 100644 index 06eca3be10eb..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/linux_configuration_py3.py +++ /dev/null @@ -1,39 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class LinuxConfiguration(Model): - """Specifies the Linux operating system settings on the virtual machine. -

    For a list of supported Linux distributions, see [Linux on - Azure-Endorsed - Distributions](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-endorsed-distros?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json) -

    For running non-endorsed distributions, see [Information for - Non-Endorsed - Distributions](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-create-upload-generic?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json). - - :param disable_password_authentication: Specifies whether password - authentication should be disabled. - :type disable_password_authentication: bool - :param ssh: Specifies the ssh key configuration for a Linux OS. - :type ssh: ~azure.mgmt.compute.v2016_03_30.models.SshConfiguration - """ - - _attribute_map = { - 'disable_password_authentication': {'key': 'disablePasswordAuthentication', 'type': 'bool'}, - 'ssh': {'key': 'ssh', 'type': 'SshConfiguration'}, - } - - def __init__(self, *, disable_password_authentication: bool=None, ssh=None, **kwargs) -> None: - super(LinuxConfiguration, self).__init__(**kwargs) - self.disable_password_authentication = disable_password_authentication - self.ssh = ssh diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/network_interface_reference.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/network_interface_reference.py deleted file mode 100644 index b86e305e3f74..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/network_interface_reference.py +++ /dev/null @@ -1,32 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .sub_resource import SubResource - - -class NetworkInterfaceReference(SubResource): - """Describes a network interface reference. - - :param id: Resource Id - :type id: str - :param primary: Specifies the primary network interface in case the - virtual machine has more than 1 network interface. - :type primary: bool - """ - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'primary': {'key': 'properties.primary', 'type': 'bool'}, - } - - def __init__(self, **kwargs): - super(NetworkInterfaceReference, self).__init__(**kwargs) - self.primary = kwargs.get('primary', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/network_interface_reference_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/network_interface_reference_py3.py deleted file mode 100644 index 47da29278832..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/network_interface_reference_py3.py +++ /dev/null @@ -1,32 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .sub_resource_py3 import SubResource - - -class NetworkInterfaceReference(SubResource): - """Describes a network interface reference. - - :param id: Resource Id - :type id: str - :param primary: Specifies the primary network interface in case the - virtual machine has more than 1 network interface. - :type primary: bool - """ - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'primary': {'key': 'properties.primary', 'type': 'bool'}, - } - - def __init__(self, *, id: str=None, primary: bool=None, **kwargs) -> None: - super(NetworkInterfaceReference, self).__init__(id=id, **kwargs) - self.primary = primary diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/network_profile.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/network_profile.py deleted file mode 100644 index e4379407b005..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/network_profile.py +++ /dev/null @@ -1,30 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class NetworkProfile(Model): - """Specifies the network interfaces of the virtual machine. - - :param network_interfaces: Specifies the list of resource Ids for the - network interfaces associated with the virtual machine. - :type network_interfaces: - list[~azure.mgmt.compute.v2016_03_30.models.NetworkInterfaceReference] - """ - - _attribute_map = { - 'network_interfaces': {'key': 'networkInterfaces', 'type': '[NetworkInterfaceReference]'}, - } - - def __init__(self, **kwargs): - super(NetworkProfile, self).__init__(**kwargs) - self.network_interfaces = kwargs.get('network_interfaces', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/network_profile_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/network_profile_py3.py deleted file mode 100644 index 9ff2f4071b94..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/network_profile_py3.py +++ /dev/null @@ -1,30 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class NetworkProfile(Model): - """Specifies the network interfaces of the virtual machine. - - :param network_interfaces: Specifies the list of resource Ids for the - network interfaces associated with the virtual machine. - :type network_interfaces: - list[~azure.mgmt.compute.v2016_03_30.models.NetworkInterfaceReference] - """ - - _attribute_map = { - 'network_interfaces': {'key': 'networkInterfaces', 'type': '[NetworkInterfaceReference]'}, - } - - def __init__(self, *, network_interfaces=None, **kwargs) -> None: - super(NetworkProfile, self).__init__(**kwargs) - self.network_interfaces = network_interfaces diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/operation_status_response.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/operation_status_response.py deleted file mode 100644 index df6f59201253..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/operation_status_response.py +++ /dev/null @@ -1,55 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class OperationStatusResponse(Model): - """Operation status response. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar name: Operation ID - :vartype name: str - :ivar status: Operation status - :vartype status: str - :ivar start_time: Start time of the operation - :vartype start_time: datetime - :ivar end_time: End time of the operation - :vartype end_time: datetime - :ivar error: Api error - :vartype error: ~azure.mgmt.compute.v2016_03_30.models.ApiError - """ - - _validation = { - 'name': {'readonly': True}, - 'status': {'readonly': True}, - 'start_time': {'readonly': True}, - 'end_time': {'readonly': True}, - 'error': {'readonly': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'status': {'key': 'status', 'type': 'str'}, - 'start_time': {'key': 'startTime', 'type': 'iso-8601'}, - 'end_time': {'key': 'endTime', 'type': 'iso-8601'}, - 'error': {'key': 'error', 'type': 'ApiError'}, - } - - def __init__(self, **kwargs): - super(OperationStatusResponse, self).__init__(**kwargs) - self.name = None - self.status = None - self.start_time = None - self.end_time = None - self.error = None diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/operation_status_response_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/operation_status_response_py3.py deleted file mode 100644 index 3322243b174b..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/operation_status_response_py3.py +++ /dev/null @@ -1,55 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class OperationStatusResponse(Model): - """Operation status response. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar name: Operation ID - :vartype name: str - :ivar status: Operation status - :vartype status: str - :ivar start_time: Start time of the operation - :vartype start_time: datetime - :ivar end_time: End time of the operation - :vartype end_time: datetime - :ivar error: Api error - :vartype error: ~azure.mgmt.compute.v2016_03_30.models.ApiError - """ - - _validation = { - 'name': {'readonly': True}, - 'status': {'readonly': True}, - 'start_time': {'readonly': True}, - 'end_time': {'readonly': True}, - 'error': {'readonly': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'status': {'key': 'status', 'type': 'str'}, - 'start_time': {'key': 'startTime', 'type': 'iso-8601'}, - 'end_time': {'key': 'endTime', 'type': 'iso-8601'}, - 'error': {'key': 'error', 'type': 'ApiError'}, - } - - def __init__(self, **kwargs) -> None: - super(OperationStatusResponse, self).__init__(**kwargs) - self.name = None - self.status = None - self.start_time = None - self.end_time = None - self.error = None diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/os_disk.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/os_disk.py deleted file mode 100644 index 9c5e9be8a82e..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/os_disk.py +++ /dev/null @@ -1,89 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class OSDisk(Model): - """Specifies information about the operating system disk used by the virtual - machine.

    For more information about disks, see [About disks and - VHDs for Azure virtual - machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-about-disks-vhds?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). - - All required parameters must be populated in order to send to Azure. - - :param os_type: This property allows you to specify the type of the OS - that is included in the disk if creating a VM from user-image or a - specialized VHD.

    Possible values are:

    **Windows** -

    **Linux**. Possible values include: 'Windows', 'Linux' - :type os_type: str or - ~azure.mgmt.compute.v2016_03_30.models.OperatingSystemTypes - :param encryption_settings: Specifies the encryption settings for the OS - Disk.

    Minimum api-version: 2015-06-15 - :type encryption_settings: - ~azure.mgmt.compute.v2016_03_30.models.DiskEncryptionSettings - :param name: Required. The disk name. - :type name: str - :param vhd: Required. The virtual hard disk. - :type vhd: ~azure.mgmt.compute.v2016_03_30.models.VirtualHardDisk - :param image: The source user image virtual hard disk. The virtual hard - disk will be copied before being attached to the virtual machine. If - SourceImage is provided, the destination virtual hard drive must not - exist. - :type image: ~azure.mgmt.compute.v2016_03_30.models.VirtualHardDisk - :param caching: Specifies the caching requirements.

    Possible - values are:

    **None**

    **ReadOnly**

    **ReadWrite** -

    Default: **None for Standard storage. ReadOnly for Premium - storage**. Possible values include: 'None', 'ReadOnly', 'ReadWrite' - :type caching: str or ~azure.mgmt.compute.v2016_03_30.models.CachingTypes - :param create_option: Required. Specifies how the virtual machine should - be created.

    Possible values are:

    **Attach** \\u2013 This - value is used when you are using a specialized disk to create the virtual - machine.

    **FromImage** \\u2013 This value is used when you are - using an image to create the virtual machine. If you are using a platform - image, you also use the imageReference element described above. If you are - using a marketplace image, you also use the plan element previously - described. Possible values include: 'FromImage', 'Empty', 'Attach' - :type create_option: str or - ~azure.mgmt.compute.v2016_03_30.models.DiskCreateOptionTypes - :param disk_size_gb: Specifies the size of an empty data disk in - gigabytes. This element can be used to overwrite the size of the disk in a - virtual machine image.

    This value cannot be larger than 1023 GB - :type disk_size_gb: int - """ - - _validation = { - 'name': {'required': True}, - 'vhd': {'required': True}, - 'create_option': {'required': True}, - } - - _attribute_map = { - 'os_type': {'key': 'osType', 'type': 'OperatingSystemTypes'}, - 'encryption_settings': {'key': 'encryptionSettings', 'type': 'DiskEncryptionSettings'}, - 'name': {'key': 'name', 'type': 'str'}, - 'vhd': {'key': 'vhd', 'type': 'VirtualHardDisk'}, - 'image': {'key': 'image', 'type': 'VirtualHardDisk'}, - 'caching': {'key': 'caching', 'type': 'CachingTypes'}, - 'create_option': {'key': 'createOption', 'type': 'DiskCreateOptionTypes'}, - 'disk_size_gb': {'key': 'diskSizeGB', 'type': 'int'}, - } - - def __init__(self, **kwargs): - super(OSDisk, self).__init__(**kwargs) - self.os_type = kwargs.get('os_type', None) - self.encryption_settings = kwargs.get('encryption_settings', None) - self.name = kwargs.get('name', None) - self.vhd = kwargs.get('vhd', None) - self.image = kwargs.get('image', None) - self.caching = kwargs.get('caching', None) - self.create_option = kwargs.get('create_option', None) - self.disk_size_gb = kwargs.get('disk_size_gb', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/os_disk_image.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/os_disk_image.py deleted file mode 100644 index 339628798b5f..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/os_disk_image.py +++ /dev/null @@ -1,36 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class OSDiskImage(Model): - """Contains the os disk image information. - - All required parameters must be populated in order to send to Azure. - - :param operating_system: Required. The operating system of the - osDiskImage. Possible values include: 'Windows', 'Linux' - :type operating_system: str or - ~azure.mgmt.compute.v2016_03_30.models.OperatingSystemTypes - """ - - _validation = { - 'operating_system': {'required': True}, - } - - _attribute_map = { - 'operating_system': {'key': 'operatingSystem', 'type': 'OperatingSystemTypes'}, - } - - def __init__(self, **kwargs): - super(OSDiskImage, self).__init__(**kwargs) - self.operating_system = kwargs.get('operating_system', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/os_disk_image_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/os_disk_image_py3.py deleted file mode 100644 index cab289838bad..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/os_disk_image_py3.py +++ /dev/null @@ -1,36 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class OSDiskImage(Model): - """Contains the os disk image information. - - All required parameters must be populated in order to send to Azure. - - :param operating_system: Required. The operating system of the - osDiskImage. Possible values include: 'Windows', 'Linux' - :type operating_system: str or - ~azure.mgmt.compute.v2016_03_30.models.OperatingSystemTypes - """ - - _validation = { - 'operating_system': {'required': True}, - } - - _attribute_map = { - 'operating_system': {'key': 'operatingSystem', 'type': 'OperatingSystemTypes'}, - } - - def __init__(self, *, operating_system, **kwargs) -> None: - super(OSDiskImage, self).__init__(**kwargs) - self.operating_system = operating_system diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/os_disk_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/os_disk_py3.py deleted file mode 100644 index 2722bbce24aa..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/os_disk_py3.py +++ /dev/null @@ -1,89 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class OSDisk(Model): - """Specifies information about the operating system disk used by the virtual - machine.

    For more information about disks, see [About disks and - VHDs for Azure virtual - machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-about-disks-vhds?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). - - All required parameters must be populated in order to send to Azure. - - :param os_type: This property allows you to specify the type of the OS - that is included in the disk if creating a VM from user-image or a - specialized VHD.

    Possible values are:

    **Windows** -

    **Linux**. Possible values include: 'Windows', 'Linux' - :type os_type: str or - ~azure.mgmt.compute.v2016_03_30.models.OperatingSystemTypes - :param encryption_settings: Specifies the encryption settings for the OS - Disk.

    Minimum api-version: 2015-06-15 - :type encryption_settings: - ~azure.mgmt.compute.v2016_03_30.models.DiskEncryptionSettings - :param name: Required. The disk name. - :type name: str - :param vhd: Required. The virtual hard disk. - :type vhd: ~azure.mgmt.compute.v2016_03_30.models.VirtualHardDisk - :param image: The source user image virtual hard disk. The virtual hard - disk will be copied before being attached to the virtual machine. If - SourceImage is provided, the destination virtual hard drive must not - exist. - :type image: ~azure.mgmt.compute.v2016_03_30.models.VirtualHardDisk - :param caching: Specifies the caching requirements.

    Possible - values are:

    **None**

    **ReadOnly**

    **ReadWrite** -

    Default: **None for Standard storage. ReadOnly for Premium - storage**. Possible values include: 'None', 'ReadOnly', 'ReadWrite' - :type caching: str or ~azure.mgmt.compute.v2016_03_30.models.CachingTypes - :param create_option: Required. Specifies how the virtual machine should - be created.

    Possible values are:

    **Attach** \\u2013 This - value is used when you are using a specialized disk to create the virtual - machine.

    **FromImage** \\u2013 This value is used when you are - using an image to create the virtual machine. If you are using a platform - image, you also use the imageReference element described above. If you are - using a marketplace image, you also use the plan element previously - described. Possible values include: 'FromImage', 'Empty', 'Attach' - :type create_option: str or - ~azure.mgmt.compute.v2016_03_30.models.DiskCreateOptionTypes - :param disk_size_gb: Specifies the size of an empty data disk in - gigabytes. This element can be used to overwrite the size of the disk in a - virtual machine image.

    This value cannot be larger than 1023 GB - :type disk_size_gb: int - """ - - _validation = { - 'name': {'required': True}, - 'vhd': {'required': True}, - 'create_option': {'required': True}, - } - - _attribute_map = { - 'os_type': {'key': 'osType', 'type': 'OperatingSystemTypes'}, - 'encryption_settings': {'key': 'encryptionSettings', 'type': 'DiskEncryptionSettings'}, - 'name': {'key': 'name', 'type': 'str'}, - 'vhd': {'key': 'vhd', 'type': 'VirtualHardDisk'}, - 'image': {'key': 'image', 'type': 'VirtualHardDisk'}, - 'caching': {'key': 'caching', 'type': 'CachingTypes'}, - 'create_option': {'key': 'createOption', 'type': 'DiskCreateOptionTypes'}, - 'disk_size_gb': {'key': 'diskSizeGB', 'type': 'int'}, - } - - def __init__(self, *, name: str, vhd, create_option, os_type=None, encryption_settings=None, image=None, caching=None, disk_size_gb: int=None, **kwargs) -> None: - super(OSDisk, self).__init__(**kwargs) - self.os_type = os_type - self.encryption_settings = encryption_settings - self.name = name - self.vhd = vhd - self.image = image - self.caching = caching - self.create_option = create_option - self.disk_size_gb = disk_size_gb diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/os_profile.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/os_profile.py deleted file mode 100644 index b05e78a6455e..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/os_profile.py +++ /dev/null @@ -1,100 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class OSProfile(Model): - """Specifies the operating system settings for the virtual machine. - - :param computer_name: Specifies the host OS name of the virtual machine. -

    This name cannot be updated after the VM is created.

    - **Max-length (Windows):** 15 characters

    **Max-length (Linux):** - 64 characters.

    For naming conventions and restrictions see [Azure - infrastructure services implementation - guidelines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-infrastructure-subscription-accounts-guidelines?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json#1-naming-conventions). - :type computer_name: str - :param admin_username: Specifies the name of the administrator account. -

    **Windows-only restriction:** Cannot end in "."

    - **Disallowed values:** "administrator", "admin", "user", "user1", "test", - "user2", "test1", "user3", "admin1", "1", "123", "a", "actuser", "adm", - "admin2", "aspnet", "backup", "console", "david", "guest", "john", - "owner", "root", "server", "sql", "support", "support_388945a0", "sys", - "test2", "test3", "user4", "user5".

    **Minimum-length (Linux):** 1 - character

    **Max-length (Linux):** 64 characters

    - **Max-length (Windows):** 20 characters

  • For root access to - the Linux VM, see [Using root privileges on Linux virtual machines in - Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-use-root-privileges?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json)
  • - For a list of built-in system users on Linux that should not be used in - this field, see [Selecting User Names for Linux on - Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-usernames?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json) - :type admin_username: str - :param admin_password: Specifies the password of the administrator - account.

    **Minimum-length (Windows):** 8 characters

    - **Minimum-length (Linux):** 6 characters

    **Max-length - (Windows):** 123 characters

    **Max-length (Linux):** 72 characters -

    **Complexity requirements:** 3 out of 4 conditions below need to - be fulfilled
    Has lower characters
    Has upper characters
    Has a - digit
    Has a special character (Regex match [\\W_])

    - **Disallowed values:** "abc@123", "P@$$w0rd", "P@ssw0rd", "P@ssword123", - "Pa$$word", "pass@word1", "Password!", "Password1", "Password22", - "iloveyou!"

    For resetting the password, see [How to reset the - Remote Desktop service or its login password in a Windows - VM](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-reset-rdp?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json) -

    For resetting root password, see [Manage users, SSH, and check or - repair disks on Azure Linux VMs using the VMAccess - Extension](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-using-vmaccess-extension?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json#reset-root-password) - :type admin_password: str - :param custom_data: Specifies a base-64 encoded string of custom data. The - base-64 encoded string is decoded to a binary array that is saved as a - file on the Virtual Machine. The maximum length of the binary array is - 65535 bytes.

    For using cloud-init for your VM, see [Using - cloud-init to customize a Linux VM during - creation](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-using-cloud-init?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json) - :type custom_data: str - :param windows_configuration: Specifies Windows operating system settings - on the virtual machine. - :type windows_configuration: - ~azure.mgmt.compute.v2016_03_30.models.WindowsConfiguration - :param linux_configuration: Specifies the Linux operating system settings - on the virtual machine.

    For a list of supported Linux - distributions, see [Linux on Azure-Endorsed - Distributions](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-endorsed-distros?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json) -

    For running non-endorsed distributions, see [Information for - Non-Endorsed - Distributions](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-create-upload-generic?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json). - :type linux_configuration: - ~azure.mgmt.compute.v2016_03_30.models.LinuxConfiguration - :param secrets: Specifies set of certificates that should be installed - onto the virtual machine. - :type secrets: - list[~azure.mgmt.compute.v2016_03_30.models.VaultSecretGroup] - """ - - _attribute_map = { - 'computer_name': {'key': 'computerName', 'type': 'str'}, - 'admin_username': {'key': 'adminUsername', 'type': 'str'}, - 'admin_password': {'key': 'adminPassword', 'type': 'str'}, - 'custom_data': {'key': 'customData', 'type': 'str'}, - 'windows_configuration': {'key': 'windowsConfiguration', 'type': 'WindowsConfiguration'}, - 'linux_configuration': {'key': 'linuxConfiguration', 'type': 'LinuxConfiguration'}, - 'secrets': {'key': 'secrets', 'type': '[VaultSecretGroup]'}, - } - - def __init__(self, **kwargs): - super(OSProfile, self).__init__(**kwargs) - self.computer_name = kwargs.get('computer_name', None) - self.admin_username = kwargs.get('admin_username', None) - self.admin_password = kwargs.get('admin_password', None) - self.custom_data = kwargs.get('custom_data', None) - self.windows_configuration = kwargs.get('windows_configuration', None) - self.linux_configuration = kwargs.get('linux_configuration', None) - self.secrets = kwargs.get('secrets', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/os_profile_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/os_profile_py3.py deleted file mode 100644 index 2aa247818ebe..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/os_profile_py3.py +++ /dev/null @@ -1,100 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class OSProfile(Model): - """Specifies the operating system settings for the virtual machine. - - :param computer_name: Specifies the host OS name of the virtual machine. -

    This name cannot be updated after the VM is created.

    - **Max-length (Windows):** 15 characters

    **Max-length (Linux):** - 64 characters.

    For naming conventions and restrictions see [Azure - infrastructure services implementation - guidelines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-infrastructure-subscription-accounts-guidelines?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json#1-naming-conventions). - :type computer_name: str - :param admin_username: Specifies the name of the administrator account. -

    **Windows-only restriction:** Cannot end in "."

    - **Disallowed values:** "administrator", "admin", "user", "user1", "test", - "user2", "test1", "user3", "admin1", "1", "123", "a", "actuser", "adm", - "admin2", "aspnet", "backup", "console", "david", "guest", "john", - "owner", "root", "server", "sql", "support", "support_388945a0", "sys", - "test2", "test3", "user4", "user5".

    **Minimum-length (Linux):** 1 - character

    **Max-length (Linux):** 64 characters

    - **Max-length (Windows):** 20 characters

  • For root access to - the Linux VM, see [Using root privileges on Linux virtual machines in - Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-use-root-privileges?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json)
  • - For a list of built-in system users on Linux that should not be used in - this field, see [Selecting User Names for Linux on - Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-usernames?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json) - :type admin_username: str - :param admin_password: Specifies the password of the administrator - account.

    **Minimum-length (Windows):** 8 characters

    - **Minimum-length (Linux):** 6 characters

    **Max-length - (Windows):** 123 characters

    **Max-length (Linux):** 72 characters -

    **Complexity requirements:** 3 out of 4 conditions below need to - be fulfilled
    Has lower characters
    Has upper characters
    Has a - digit
    Has a special character (Regex match [\\W_])

    - **Disallowed values:** "abc@123", "P@$$w0rd", "P@ssw0rd", "P@ssword123", - "Pa$$word", "pass@word1", "Password!", "Password1", "Password22", - "iloveyou!"

    For resetting the password, see [How to reset the - Remote Desktop service or its login password in a Windows - VM](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-reset-rdp?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json) -

    For resetting root password, see [Manage users, SSH, and check or - repair disks on Azure Linux VMs using the VMAccess - Extension](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-using-vmaccess-extension?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json#reset-root-password) - :type admin_password: str - :param custom_data: Specifies a base-64 encoded string of custom data. The - base-64 encoded string is decoded to a binary array that is saved as a - file on the Virtual Machine. The maximum length of the binary array is - 65535 bytes.

    For using cloud-init for your VM, see [Using - cloud-init to customize a Linux VM during - creation](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-using-cloud-init?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json) - :type custom_data: str - :param windows_configuration: Specifies Windows operating system settings - on the virtual machine. - :type windows_configuration: - ~azure.mgmt.compute.v2016_03_30.models.WindowsConfiguration - :param linux_configuration: Specifies the Linux operating system settings - on the virtual machine.

    For a list of supported Linux - distributions, see [Linux on Azure-Endorsed - Distributions](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-endorsed-distros?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json) -

    For running non-endorsed distributions, see [Information for - Non-Endorsed - Distributions](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-create-upload-generic?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json). - :type linux_configuration: - ~azure.mgmt.compute.v2016_03_30.models.LinuxConfiguration - :param secrets: Specifies set of certificates that should be installed - onto the virtual machine. - :type secrets: - list[~azure.mgmt.compute.v2016_03_30.models.VaultSecretGroup] - """ - - _attribute_map = { - 'computer_name': {'key': 'computerName', 'type': 'str'}, - 'admin_username': {'key': 'adminUsername', 'type': 'str'}, - 'admin_password': {'key': 'adminPassword', 'type': 'str'}, - 'custom_data': {'key': 'customData', 'type': 'str'}, - 'windows_configuration': {'key': 'windowsConfiguration', 'type': 'WindowsConfiguration'}, - 'linux_configuration': {'key': 'linuxConfiguration', 'type': 'LinuxConfiguration'}, - 'secrets': {'key': 'secrets', 'type': '[VaultSecretGroup]'}, - } - - def __init__(self, *, computer_name: str=None, admin_username: str=None, admin_password: str=None, custom_data: str=None, windows_configuration=None, linux_configuration=None, secrets=None, **kwargs) -> None: - super(OSProfile, self).__init__(**kwargs) - self.computer_name = computer_name - self.admin_username = admin_username - self.admin_password = admin_password - self.custom_data = custom_data - self.windows_configuration = windows_configuration - self.linux_configuration = linux_configuration - self.secrets = secrets diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/plan.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/plan.py deleted file mode 100644 index d42b6b32cfac..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/plan.py +++ /dev/null @@ -1,46 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class Plan(Model): - """Specifies information about the marketplace image used to create the - virtual machine. This element is only used for marketplace images. Before - you can use a marketplace image from an API, you must enable the image for - programmatic use. In the Azure portal, find the marketplace image that you - want to use and then click **Want to deploy programmatically, Get Started - ->**. Enter any required information and then click **Save**. - - :param name: The plan ID. - :type name: str - :param publisher: The publisher ID. - :type publisher: str - :param product: Specifies the product of the image from the marketplace. - This is the same value as Offer under the imageReference element. - :type product: str - :param promotion_code: The promotion code. - :type promotion_code: str - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'publisher': {'key': 'publisher', 'type': 'str'}, - 'product': {'key': 'product', 'type': 'str'}, - 'promotion_code': {'key': 'promotionCode', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(Plan, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.publisher = kwargs.get('publisher', None) - self.product = kwargs.get('product', None) - self.promotion_code = kwargs.get('promotion_code', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/plan_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/plan_py3.py deleted file mode 100644 index 9cca2c78a123..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/plan_py3.py +++ /dev/null @@ -1,46 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class Plan(Model): - """Specifies information about the marketplace image used to create the - virtual machine. This element is only used for marketplace images. Before - you can use a marketplace image from an API, you must enable the image for - programmatic use. In the Azure portal, find the marketplace image that you - want to use and then click **Want to deploy programmatically, Get Started - ->**. Enter any required information and then click **Save**. - - :param name: The plan ID. - :type name: str - :param publisher: The publisher ID. - :type publisher: str - :param product: Specifies the product of the image from the marketplace. - This is the same value as Offer under the imageReference element. - :type product: str - :param promotion_code: The promotion code. - :type promotion_code: str - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'publisher': {'key': 'publisher', 'type': 'str'}, - 'product': {'key': 'product', 'type': 'str'}, - 'promotion_code': {'key': 'promotionCode', 'type': 'str'}, - } - - def __init__(self, *, name: str=None, publisher: str=None, product: str=None, promotion_code: str=None, **kwargs) -> None: - super(Plan, self).__init__(**kwargs) - self.name = name - self.publisher = publisher - self.product = product - self.promotion_code = promotion_code diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/purchase_plan.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/purchase_plan.py deleted file mode 100644 index 2e1509addca6..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/purchase_plan.py +++ /dev/null @@ -1,47 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class PurchasePlan(Model): - """Used for establishing the purchase context of any 3rd Party artifact - through MarketPlace. - - All required parameters must be populated in order to send to Azure. - - :param publisher: Required. The publisher ID. - :type publisher: str - :param name: Required. The plan ID. - :type name: str - :param product: Required. Specifies the product of the image from the - marketplace. This is the same value as Offer under the imageReference - element. - :type product: str - """ - - _validation = { - 'publisher': {'required': True}, - 'name': {'required': True}, - 'product': {'required': True}, - } - - _attribute_map = { - 'publisher': {'key': 'publisher', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'product': {'key': 'product', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(PurchasePlan, self).__init__(**kwargs) - self.publisher = kwargs.get('publisher', None) - self.name = kwargs.get('name', None) - self.product = kwargs.get('product', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/purchase_plan_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/purchase_plan_py3.py deleted file mode 100644 index 26f7996f1633..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/purchase_plan_py3.py +++ /dev/null @@ -1,47 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class PurchasePlan(Model): - """Used for establishing the purchase context of any 3rd Party artifact - through MarketPlace. - - All required parameters must be populated in order to send to Azure. - - :param publisher: Required. The publisher ID. - :type publisher: str - :param name: Required. The plan ID. - :type name: str - :param product: Required. Specifies the product of the image from the - marketplace. This is the same value as Offer under the imageReference - element. - :type product: str - """ - - _validation = { - 'publisher': {'required': True}, - 'name': {'required': True}, - 'product': {'required': True}, - } - - _attribute_map = { - 'publisher': {'key': 'publisher', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'product': {'key': 'product', 'type': 'str'}, - } - - def __init__(self, *, publisher: str, name: str, product: str, **kwargs) -> None: - super(PurchasePlan, self).__init__(**kwargs) - self.publisher = publisher - self.name = name - self.product = product diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/resource.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/resource.py deleted file mode 100644 index 5dd7d481c685..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/resource.py +++ /dev/null @@ -1,56 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class Resource(Model): - """The Resource model definition. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource Id - :vartype id: str - :ivar name: Resource name - :vartype name: str - :ivar type: Resource type - :vartype type: str - :param location: Required. Resource location - :type location: str - :param tags: Resource tags - :type tags: dict[str, str] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - } - - def __init__(self, **kwargs): - super(Resource, self).__init__(**kwargs) - self.id = None - self.name = None - self.type = None - self.location = kwargs.get('location', None) - self.tags = kwargs.get('tags', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/resource_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/resource_py3.py deleted file mode 100644 index 2f3702caf609..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/resource_py3.py +++ /dev/null @@ -1,56 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class Resource(Model): - """The Resource model definition. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource Id - :vartype id: str - :ivar name: Resource name - :vartype name: str - :ivar type: Resource type - :vartype type: str - :param location: Required. Resource location - :type location: str - :param tags: Resource tags - :type tags: dict[str, str] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - } - - def __init__(self, *, location: str, tags=None, **kwargs) -> None: - super(Resource, self).__init__(**kwargs) - self.id = None - self.name = None - self.type = None - self.location = location - self.tags = tags diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/sku.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/sku.py deleted file mode 100644 index 5c07709435e0..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/sku.py +++ /dev/null @@ -1,38 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class Sku(Model): - """Describes a virtual machine scale set sku. - - :param name: The sku name. - :type name: str - :param tier: Specifies the tier of virtual machines in a scale set.

    Possible Values:

    **Standard**

    **Basic** - :type tier: str - :param capacity: Specifies the number of virtual machines in the scale - set. - :type capacity: long - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'tier': {'key': 'tier', 'type': 'str'}, - 'capacity': {'key': 'capacity', 'type': 'long'}, - } - - def __init__(self, **kwargs): - super(Sku, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.tier = kwargs.get('tier', None) - self.capacity = kwargs.get('capacity', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/sku_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/sku_py3.py deleted file mode 100644 index f6bc74afaadc..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/sku_py3.py +++ /dev/null @@ -1,38 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class Sku(Model): - """Describes a virtual machine scale set sku. - - :param name: The sku name. - :type name: str - :param tier: Specifies the tier of virtual machines in a scale set.

    Possible Values:

    **Standard**

    **Basic** - :type tier: str - :param capacity: Specifies the number of virtual machines in the scale - set. - :type capacity: long - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'tier': {'key': 'tier', 'type': 'str'}, - 'capacity': {'key': 'capacity', 'type': 'long'}, - } - - def __init__(self, *, name: str=None, tier: str=None, capacity: int=None, **kwargs) -> None: - super(Sku, self).__init__(**kwargs) - self.name = name - self.tier = tier - self.capacity = capacity diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/ssh_configuration.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/ssh_configuration.py deleted file mode 100644 index 395706d1acab..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/ssh_configuration.py +++ /dev/null @@ -1,30 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class SshConfiguration(Model): - """SSH configuration for Linux based VMs running on Azure. - - :param public_keys: The list of SSH public keys used to authenticate with - linux based VMs. - :type public_keys: - list[~azure.mgmt.compute.v2016_03_30.models.SshPublicKey] - """ - - _attribute_map = { - 'public_keys': {'key': 'publicKeys', 'type': '[SshPublicKey]'}, - } - - def __init__(self, **kwargs): - super(SshConfiguration, self).__init__(**kwargs) - self.public_keys = kwargs.get('public_keys', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/ssh_configuration_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/ssh_configuration_py3.py deleted file mode 100644 index 3baef3ba47d6..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/ssh_configuration_py3.py +++ /dev/null @@ -1,30 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class SshConfiguration(Model): - """SSH configuration for Linux based VMs running on Azure. - - :param public_keys: The list of SSH public keys used to authenticate with - linux based VMs. - :type public_keys: - list[~azure.mgmt.compute.v2016_03_30.models.SshPublicKey] - """ - - _attribute_map = { - 'public_keys': {'key': 'publicKeys', 'type': '[SshPublicKey]'}, - } - - def __init__(self, *, public_keys=None, **kwargs) -> None: - super(SshConfiguration, self).__init__(**kwargs) - self.public_keys = public_keys diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/ssh_public_key.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/ssh_public_key.py deleted file mode 100644 index 122e0d3b9fdd..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/ssh_public_key.py +++ /dev/null @@ -1,39 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class SshPublicKey(Model): - """Contains information about SSH certificate public key and the path on the - Linux VM where the public key is placed. - - :param path: Specifies the full path on the created VM where ssh public - key is stored. If the file already exists, the specified key is appended - to the file. Example: /home/user/.ssh/authorized_keys - :type path: str - :param key_data: SSH public key certificate used to authenticate with the - VM through ssh. The key needs to be at least 2048-bit and in ssh-rsa - format.

    For creating ssh keys, see [Create SSH keys on Linux and - Mac for Linux VMs in - Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-mac-create-ssh-keys?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json). - :type key_data: str - """ - - _attribute_map = { - 'path': {'key': 'path', 'type': 'str'}, - 'key_data': {'key': 'keyData', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(SshPublicKey, self).__init__(**kwargs) - self.path = kwargs.get('path', None) - self.key_data = kwargs.get('key_data', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/ssh_public_key_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/ssh_public_key_py3.py deleted file mode 100644 index b16ee085b36b..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/ssh_public_key_py3.py +++ /dev/null @@ -1,39 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class SshPublicKey(Model): - """Contains information about SSH certificate public key and the path on the - Linux VM where the public key is placed. - - :param path: Specifies the full path on the created VM where ssh public - key is stored. If the file already exists, the specified key is appended - to the file. Example: /home/user/.ssh/authorized_keys - :type path: str - :param key_data: SSH public key certificate used to authenticate with the - VM through ssh. The key needs to be at least 2048-bit and in ssh-rsa - format.

    For creating ssh keys, see [Create SSH keys on Linux and - Mac for Linux VMs in - Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-mac-create-ssh-keys?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json). - :type key_data: str - """ - - _attribute_map = { - 'path': {'key': 'path', 'type': 'str'}, - 'key_data': {'key': 'keyData', 'type': 'str'}, - } - - def __init__(self, *, path: str=None, key_data: str=None, **kwargs) -> None: - super(SshPublicKey, self).__init__(**kwargs) - self.path = path - self.key_data = key_data diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/storage_profile.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/storage_profile.py deleted file mode 100644 index 615d641cfba0..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/storage_profile.py +++ /dev/null @@ -1,47 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class StorageProfile(Model): - """Specifies the storage settings for the virtual machine disks. - - :param image_reference: Specifies information about the image to use. You - can specify information about platform images, marketplace images, or - virtual machine images. This element is required when you want to use a - platform image, marketplace image, or virtual machine image, but is not - used in other creation operations. - :type image_reference: - ~azure.mgmt.compute.v2016_03_30.models.ImageReference - :param os_disk: Specifies information about the operating system disk used - by the virtual machine.

    For more information about disks, see - [About disks and VHDs for Azure virtual - machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-about-disks-vhds?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). - :type os_disk: ~azure.mgmt.compute.v2016_03_30.models.OSDisk - :param data_disks: Specifies the parameters that are used to add a data - disk to a virtual machine.

    For more information about disks, see - [About disks and VHDs for Azure virtual - machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-about-disks-vhds?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). - :type data_disks: list[~azure.mgmt.compute.v2016_03_30.models.DataDisk] - """ - - _attribute_map = { - 'image_reference': {'key': 'imageReference', 'type': 'ImageReference'}, - 'os_disk': {'key': 'osDisk', 'type': 'OSDisk'}, - 'data_disks': {'key': 'dataDisks', 'type': '[DataDisk]'}, - } - - def __init__(self, **kwargs): - super(StorageProfile, self).__init__(**kwargs) - self.image_reference = kwargs.get('image_reference', None) - self.os_disk = kwargs.get('os_disk', None) - self.data_disks = kwargs.get('data_disks', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/storage_profile_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/storage_profile_py3.py deleted file mode 100644 index 8269e4309aa0..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/storage_profile_py3.py +++ /dev/null @@ -1,47 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class StorageProfile(Model): - """Specifies the storage settings for the virtual machine disks. - - :param image_reference: Specifies information about the image to use. You - can specify information about platform images, marketplace images, or - virtual machine images. This element is required when you want to use a - platform image, marketplace image, or virtual machine image, but is not - used in other creation operations. - :type image_reference: - ~azure.mgmt.compute.v2016_03_30.models.ImageReference - :param os_disk: Specifies information about the operating system disk used - by the virtual machine.

    For more information about disks, see - [About disks and VHDs for Azure virtual - machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-about-disks-vhds?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). - :type os_disk: ~azure.mgmt.compute.v2016_03_30.models.OSDisk - :param data_disks: Specifies the parameters that are used to add a data - disk to a virtual machine.

    For more information about disks, see - [About disks and VHDs for Azure virtual - machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-about-disks-vhds?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). - :type data_disks: list[~azure.mgmt.compute.v2016_03_30.models.DataDisk] - """ - - _attribute_map = { - 'image_reference': {'key': 'imageReference', 'type': 'ImageReference'}, - 'os_disk': {'key': 'osDisk', 'type': 'OSDisk'}, - 'data_disks': {'key': 'dataDisks', 'type': '[DataDisk]'}, - } - - def __init__(self, *, image_reference=None, os_disk=None, data_disks=None, **kwargs) -> None: - super(StorageProfile, self).__init__(**kwargs) - self.image_reference = image_reference - self.os_disk = os_disk - self.data_disks = data_disks diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/sub_resource.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/sub_resource.py deleted file mode 100644 index 11e092cc6ff5..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/sub_resource.py +++ /dev/null @@ -1,28 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class SubResource(Model): - """SubResource. - - :param id: Resource Id - :type id: str - """ - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(SubResource, self).__init__(**kwargs) - self.id = kwargs.get('id', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/sub_resource_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/sub_resource_py3.py deleted file mode 100644 index 29e5afee38f9..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/sub_resource_py3.py +++ /dev/null @@ -1,28 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class SubResource(Model): - """SubResource. - - :param id: Resource Id - :type id: str - """ - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - } - - def __init__(self, *, id: str=None, **kwargs) -> None: - super(SubResource, self).__init__(**kwargs) - self.id = id diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/update_resource.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/update_resource.py deleted file mode 100644 index b1d2898ff082..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/update_resource.py +++ /dev/null @@ -1,28 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class UpdateResource(Model): - """The Update Resource model definition. - - :param tags: Resource tags - :type tags: dict[str, str] - """ - - _attribute_map = { - 'tags': {'key': 'tags', 'type': '{str}'}, - } - - def __init__(self, **kwargs): - super(UpdateResource, self).__init__(**kwargs) - self.tags = kwargs.get('tags', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/update_resource_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/update_resource_py3.py deleted file mode 100644 index c06c17c124d9..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/update_resource_py3.py +++ /dev/null @@ -1,28 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class UpdateResource(Model): - """The Update Resource model definition. - - :param tags: Resource tags - :type tags: dict[str, str] - """ - - _attribute_map = { - 'tags': {'key': 'tags', 'type': '{str}'}, - } - - def __init__(self, *, tags=None, **kwargs) -> None: - super(UpdateResource, self).__init__(**kwargs) - self.tags = tags diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/upgrade_policy.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/upgrade_policy.py deleted file mode 100644 index 63a0f512d34c..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/upgrade_policy.py +++ /dev/null @@ -1,33 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class UpgradePolicy(Model): - """Describes an upgrade policy - automatic or manual. - - :param mode: Specifies the mode of an upgrade to virtual machines in the - scale set.

    Possible values are:

    **Manual** - You - control the application of updates to virtual machines in the scale set. - You do this by using the manualUpgrade action.

    **Automatic** - - All virtual machines in the scale set are automatically updated at the - same time. Possible values include: 'Automatic', 'Manual' - :type mode: str or ~azure.mgmt.compute.v2016_03_30.models.UpgradeMode - """ - - _attribute_map = { - 'mode': {'key': 'mode', 'type': 'UpgradeMode'}, - } - - def __init__(self, **kwargs): - super(UpgradePolicy, self).__init__(**kwargs) - self.mode = kwargs.get('mode', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/upgrade_policy_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/upgrade_policy_py3.py deleted file mode 100644 index a373104ad975..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/upgrade_policy_py3.py +++ /dev/null @@ -1,33 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class UpgradePolicy(Model): - """Describes an upgrade policy - automatic or manual. - - :param mode: Specifies the mode of an upgrade to virtual machines in the - scale set.

    Possible values are:

    **Manual** - You - control the application of updates to virtual machines in the scale set. - You do this by using the manualUpgrade action.

    **Automatic** - - All virtual machines in the scale set are automatically updated at the - same time. Possible values include: 'Automatic', 'Manual' - :type mode: str or ~azure.mgmt.compute.v2016_03_30.models.UpgradeMode - """ - - _attribute_map = { - 'mode': {'key': 'mode', 'type': 'UpgradeMode'}, - } - - def __init__(self, *, mode=None, **kwargs) -> None: - super(UpgradePolicy, self).__init__(**kwargs) - self.mode = mode diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/usage.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/usage.py deleted file mode 100644 index 23badd7cd3dc..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/usage.py +++ /dev/null @@ -1,54 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class Usage(Model): - """Describes Compute Resource Usage. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar unit: Required. An enum describing the unit of usage measurement. - Default value: "Count" . - :vartype unit: str - :param current_value: Required. The current usage of the resource. - :type current_value: int - :param limit: Required. The maximum permitted usage of the resource. - :type limit: long - :param name: Required. The name of the type of usage. - :type name: ~azure.mgmt.compute.v2016_03_30.models.UsageName - """ - - _validation = { - 'unit': {'required': True, 'constant': True}, - 'current_value': {'required': True}, - 'limit': {'required': True}, - 'name': {'required': True}, - } - - _attribute_map = { - 'unit': {'key': 'unit', 'type': 'str'}, - 'current_value': {'key': 'currentValue', 'type': 'int'}, - 'limit': {'key': 'limit', 'type': 'long'}, - 'name': {'key': 'name', 'type': 'UsageName'}, - } - - unit = "Count" - - def __init__(self, **kwargs): - super(Usage, self).__init__(**kwargs) - self.current_value = kwargs.get('current_value', None) - self.limit = kwargs.get('limit', None) - self.name = kwargs.get('name', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/usage_name.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/usage_name.py deleted file mode 100644 index e2560936493e..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/usage_name.py +++ /dev/null @@ -1,32 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class UsageName(Model): - """The Usage Names. - - :param value: The name of the resource. - :type value: str - :param localized_value: The localized name of the resource. - :type localized_value: str - """ - - _attribute_map = { - 'value': {'key': 'value', 'type': 'str'}, - 'localized_value': {'key': 'localizedValue', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(UsageName, self).__init__(**kwargs) - self.value = kwargs.get('value', None) - self.localized_value = kwargs.get('localized_value', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/usage_name_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/usage_name_py3.py deleted file mode 100644 index ad0b77459f75..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/usage_name_py3.py +++ /dev/null @@ -1,32 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class UsageName(Model): - """The Usage Names. - - :param value: The name of the resource. - :type value: str - :param localized_value: The localized name of the resource. - :type localized_value: str - """ - - _attribute_map = { - 'value': {'key': 'value', 'type': 'str'}, - 'localized_value': {'key': 'localizedValue', 'type': 'str'}, - } - - def __init__(self, *, value: str=None, localized_value: str=None, **kwargs) -> None: - super(UsageName, self).__init__(**kwargs) - self.value = value - self.localized_value = localized_value diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/usage_paged.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/usage_paged.py deleted file mode 100644 index c65e7977b07c..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/usage_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class UsagePaged(Paged): - """ - A paging container for iterating over a list of :class:`Usage ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[Usage]'} - } - - def __init__(self, *args, **kwargs): - - super(UsagePaged, self).__init__(*args, **kwargs) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/usage_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/usage_py3.py deleted file mode 100644 index f72ece5f6adc..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/usage_py3.py +++ /dev/null @@ -1,54 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class Usage(Model): - """Describes Compute Resource Usage. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar unit: Required. An enum describing the unit of usage measurement. - Default value: "Count" . - :vartype unit: str - :param current_value: Required. The current usage of the resource. - :type current_value: int - :param limit: Required. The maximum permitted usage of the resource. - :type limit: long - :param name: Required. The name of the type of usage. - :type name: ~azure.mgmt.compute.v2016_03_30.models.UsageName - """ - - _validation = { - 'unit': {'required': True, 'constant': True}, - 'current_value': {'required': True}, - 'limit': {'required': True}, - 'name': {'required': True}, - } - - _attribute_map = { - 'unit': {'key': 'unit', 'type': 'str'}, - 'current_value': {'key': 'currentValue', 'type': 'int'}, - 'limit': {'key': 'limit', 'type': 'long'}, - 'name': {'key': 'name', 'type': 'UsageName'}, - } - - unit = "Count" - - def __init__(self, *, current_value: int, limit: int, name, **kwargs) -> None: - super(Usage, self).__init__(**kwargs) - self.current_value = current_value - self.limit = limit - self.name = name diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/vault_certificate.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/vault_certificate.py deleted file mode 100644 index 2dd179480e76..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/vault_certificate.py +++ /dev/null @@ -1,47 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VaultCertificate(Model): - """Describes a single certificate reference in a Key Vault, and where the - certificate should reside on the VM. - - :param certificate_url: This is the URL of a certificate that has been - uploaded to Key Vault as a secret. For adding a secret to the Key Vault, - see [Add a key or secret to the key - vault](https://docs.microsoft.com/azure/key-vault/key-vault-get-started/#add). - In this case, your certificate needs to be It is the Base64 encoding of - the following JSON Object which is encoded in UTF-8:

    {
    - "data":"",
    "dataType":"pfx",
    - "password":""
    } - :type certificate_url: str - :param certificate_store: For Windows VMs, specifies the certificate store - on the Virtual Machine to which the certificate should be added. The - specified certificate store is implicitly in the LocalMachine account. -

    For Linux VMs, the certificate file is placed under the - /var/lib/waagent directory, with the file name - <UppercaseThumbprint>.crt for the X509 certificate file and - <UppercaseThumbprint>.prv for private key. Both of these files are - .pem formatted. - :type certificate_store: str - """ - - _attribute_map = { - 'certificate_url': {'key': 'certificateUrl', 'type': 'str'}, - 'certificate_store': {'key': 'certificateStore', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(VaultCertificate, self).__init__(**kwargs) - self.certificate_url = kwargs.get('certificate_url', None) - self.certificate_store = kwargs.get('certificate_store', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/vault_certificate_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/vault_certificate_py3.py deleted file mode 100644 index 23ecc8101793..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/vault_certificate_py3.py +++ /dev/null @@ -1,47 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VaultCertificate(Model): - """Describes a single certificate reference in a Key Vault, and where the - certificate should reside on the VM. - - :param certificate_url: This is the URL of a certificate that has been - uploaded to Key Vault as a secret. For adding a secret to the Key Vault, - see [Add a key or secret to the key - vault](https://docs.microsoft.com/azure/key-vault/key-vault-get-started/#add). - In this case, your certificate needs to be It is the Base64 encoding of - the following JSON Object which is encoded in UTF-8:

    {
    - "data":"",
    "dataType":"pfx",
    - "password":""
    } - :type certificate_url: str - :param certificate_store: For Windows VMs, specifies the certificate store - on the Virtual Machine to which the certificate should be added. The - specified certificate store is implicitly in the LocalMachine account. -

    For Linux VMs, the certificate file is placed under the - /var/lib/waagent directory, with the file name - <UppercaseThumbprint>.crt for the X509 certificate file and - <UppercaseThumbprint>.prv for private key. Both of these files are - .pem formatted. - :type certificate_store: str - """ - - _attribute_map = { - 'certificate_url': {'key': 'certificateUrl', 'type': 'str'}, - 'certificate_store': {'key': 'certificateStore', 'type': 'str'}, - } - - def __init__(self, *, certificate_url: str=None, certificate_store: str=None, **kwargs) -> None: - super(VaultCertificate, self).__init__(**kwargs) - self.certificate_url = certificate_url - self.certificate_store = certificate_store diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/vault_secret_group.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/vault_secret_group.py deleted file mode 100644 index 4ac926d6bfce..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/vault_secret_group.py +++ /dev/null @@ -1,35 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VaultSecretGroup(Model): - """Describes a set of certificates which are all in the same Key Vault. - - :param source_vault: The relative URL of the Key Vault containing all of - the certificates in VaultCertificates. - :type source_vault: ~azure.mgmt.compute.v2016_03_30.models.SubResource - :param vault_certificates: The list of key vault references in SourceVault - which contain certificates. - :type vault_certificates: - list[~azure.mgmt.compute.v2016_03_30.models.VaultCertificate] - """ - - _attribute_map = { - 'source_vault': {'key': 'sourceVault', 'type': 'SubResource'}, - 'vault_certificates': {'key': 'vaultCertificates', 'type': '[VaultCertificate]'}, - } - - def __init__(self, **kwargs): - super(VaultSecretGroup, self).__init__(**kwargs) - self.source_vault = kwargs.get('source_vault', None) - self.vault_certificates = kwargs.get('vault_certificates', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/vault_secret_group_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/vault_secret_group_py3.py deleted file mode 100644 index 2c5ed2bc445f..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/vault_secret_group_py3.py +++ /dev/null @@ -1,35 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VaultSecretGroup(Model): - """Describes a set of certificates which are all in the same Key Vault. - - :param source_vault: The relative URL of the Key Vault containing all of - the certificates in VaultCertificates. - :type source_vault: ~azure.mgmt.compute.v2016_03_30.models.SubResource - :param vault_certificates: The list of key vault references in SourceVault - which contain certificates. - :type vault_certificates: - list[~azure.mgmt.compute.v2016_03_30.models.VaultCertificate] - """ - - _attribute_map = { - 'source_vault': {'key': 'sourceVault', 'type': 'SubResource'}, - 'vault_certificates': {'key': 'vaultCertificates', 'type': '[VaultCertificate]'}, - } - - def __init__(self, *, source_vault=None, vault_certificates=None, **kwargs) -> None: - super(VaultSecretGroup, self).__init__(**kwargs) - self.source_vault = source_vault - self.vault_certificates = vault_certificates diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/virtual_hard_disk.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/virtual_hard_disk.py deleted file mode 100644 index 5e3ad9dea7d4..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/virtual_hard_disk.py +++ /dev/null @@ -1,28 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualHardDisk(Model): - """Describes the uri of a disk. - - :param uri: Specifies the virtual hard disk's uri. - :type uri: str - """ - - _attribute_map = { - 'uri': {'key': 'uri', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(VirtualHardDisk, self).__init__(**kwargs) - self.uri = kwargs.get('uri', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/virtual_hard_disk_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/virtual_hard_disk_py3.py deleted file mode 100644 index 9c069b95f084..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/virtual_hard_disk_py3.py +++ /dev/null @@ -1,28 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualHardDisk(Model): - """Describes the uri of a disk. - - :param uri: Specifies the virtual hard disk's uri. - :type uri: str - """ - - _attribute_map = { - 'uri': {'key': 'uri', 'type': 'str'}, - } - - def __init__(self, *, uri: str=None, **kwargs) -> None: - super(VirtualHardDisk, self).__init__(**kwargs) - self.uri = uri diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/virtual_machine.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/virtual_machine.py deleted file mode 100644 index 8bfac8010229..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/virtual_machine.py +++ /dev/null @@ -1,146 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource import Resource - - -class VirtualMachine(Resource): - """Describes a Virtual Machine. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource Id - :vartype id: str - :ivar name: Resource name - :vartype name: str - :ivar type: Resource type - :vartype type: str - :param location: Required. Resource location - :type location: str - :param tags: Resource tags - :type tags: dict[str, str] - :param plan: Specifies information about the marketplace image used to - create the virtual machine. This element is only used for marketplace - images. Before you can use a marketplace image from an API, you must - enable the image for programmatic use. In the Azure portal, find the - marketplace image that you want to use and then click **Want to deploy - programmatically, Get Started ->**. Enter any required information and - then click **Save**. - :type plan: ~azure.mgmt.compute.v2016_03_30.models.Plan - :param hardware_profile: Specifies the hardware settings for the virtual - machine. - :type hardware_profile: - ~azure.mgmt.compute.v2016_03_30.models.HardwareProfile - :param storage_profile: Specifies the storage settings for the virtual - machine disks. - :type storage_profile: - ~azure.mgmt.compute.v2016_03_30.models.StorageProfile - :param os_profile: Specifies the operating system settings for the virtual - machine. - :type os_profile: ~azure.mgmt.compute.v2016_03_30.models.OSProfile - :param network_profile: Specifies the network interfaces of the virtual - machine. - :type network_profile: - ~azure.mgmt.compute.v2016_03_30.models.NetworkProfile - :param diagnostics_profile: Specifies the boot diagnostic settings state. -

    Minimum api-version: 2015-06-15. - :type diagnostics_profile: - ~azure.mgmt.compute.v2016_03_30.models.DiagnosticsProfile - :param availability_set: Specifies information about the availability set - that the virtual machine should be assigned to. Virtual machines specified - in the same availability set are allocated to different nodes to maximize - availability. For more information about availability sets, see [Manage - the availability of virtual - machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-manage-availability?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). -

    For more information on Azure planned maintenance, see [Planned - maintenance for virtual machines in - Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-planned-maintenance?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json) -

    Currently, a VM can only be added to availability set at creation - time. An existing VM cannot be added to an availability set. - :type availability_set: ~azure.mgmt.compute.v2016_03_30.models.SubResource - :ivar provisioning_state: The provisioning state, which only appears in - the response. - :vartype provisioning_state: str - :ivar instance_view: The virtual machine instance view. - :vartype instance_view: - ~azure.mgmt.compute.v2016_03_30.models.VirtualMachineInstanceView - :param license_type: Specifies that the image or disk that is being used - was licensed on-premises. This element is only used for images that - contain the Windows Server operating system.

    Possible values are: -

    Windows_Client

    Windows_Server

    If this element - is included in a request for an update, the value must match the initial - value. This value cannot be updated.

    For more information, see - [Azure Hybrid Use Benefit for Windows - Server](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-hybrid-use-benefit-licensing?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json) -

    Minimum api-version: 2015-06-15 - :type license_type: str - :ivar vm_id: Specifies the VM unique ID which is a 128-bits identifier - that is encoded and stored in all Azure IaaS VMs SMBIOS and can be read - using platform BIOS commands. - :vartype vm_id: str - :ivar resources: The virtual machine child extension resources. - :vartype resources: - list[~azure.mgmt.compute.v2016_03_30.models.VirtualMachineExtension] - :param identity: The identity of the virtual machine, if configured. - :type identity: - ~azure.mgmt.compute.v2016_03_30.models.VirtualMachineIdentity - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - 'provisioning_state': {'readonly': True}, - 'instance_view': {'readonly': True}, - 'vm_id': {'readonly': True}, - 'resources': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'plan': {'key': 'plan', 'type': 'Plan'}, - 'hardware_profile': {'key': 'properties.hardwareProfile', 'type': 'HardwareProfile'}, - 'storage_profile': {'key': 'properties.storageProfile', 'type': 'StorageProfile'}, - 'os_profile': {'key': 'properties.osProfile', 'type': 'OSProfile'}, - 'network_profile': {'key': 'properties.networkProfile', 'type': 'NetworkProfile'}, - 'diagnostics_profile': {'key': 'properties.diagnosticsProfile', 'type': 'DiagnosticsProfile'}, - 'availability_set': {'key': 'properties.availabilitySet', 'type': 'SubResource'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'instance_view': {'key': 'properties.instanceView', 'type': 'VirtualMachineInstanceView'}, - 'license_type': {'key': 'properties.licenseType', 'type': 'str'}, - 'vm_id': {'key': 'properties.vmId', 'type': 'str'}, - 'resources': {'key': 'resources', 'type': '[VirtualMachineExtension]'}, - 'identity': {'key': 'identity', 'type': 'VirtualMachineIdentity'}, - } - - def __init__(self, **kwargs): - super(VirtualMachine, self).__init__(**kwargs) - self.plan = kwargs.get('plan', None) - self.hardware_profile = kwargs.get('hardware_profile', None) - self.storage_profile = kwargs.get('storage_profile', None) - self.os_profile = kwargs.get('os_profile', None) - self.network_profile = kwargs.get('network_profile', None) - self.diagnostics_profile = kwargs.get('diagnostics_profile', None) - self.availability_set = kwargs.get('availability_set', None) - self.provisioning_state = None - self.instance_view = None - self.license_type = kwargs.get('license_type', None) - self.vm_id = None - self.resources = None - self.identity = kwargs.get('identity', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/virtual_machine_agent_instance_view.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/virtual_machine_agent_instance_view.py deleted file mode 100644 index f494261e2b6d..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/virtual_machine_agent_instance_view.py +++ /dev/null @@ -1,39 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineAgentInstanceView(Model): - """The instance view of the VM Agent running on the virtual machine. - - :param vm_agent_version: The VM Agent full version. - :type vm_agent_version: str - :param extension_handlers: The virtual machine extension handler instance - view. - :type extension_handlers: - list[~azure.mgmt.compute.v2016_03_30.models.VirtualMachineExtensionHandlerInstanceView] - :param statuses: The resource status information. - :type statuses: - list[~azure.mgmt.compute.v2016_03_30.models.InstanceViewStatus] - """ - - _attribute_map = { - 'vm_agent_version': {'key': 'vmAgentVersion', 'type': 'str'}, - 'extension_handlers': {'key': 'extensionHandlers', 'type': '[VirtualMachineExtensionHandlerInstanceView]'}, - 'statuses': {'key': 'statuses', 'type': '[InstanceViewStatus]'}, - } - - def __init__(self, **kwargs): - super(VirtualMachineAgentInstanceView, self).__init__(**kwargs) - self.vm_agent_version = kwargs.get('vm_agent_version', None) - self.extension_handlers = kwargs.get('extension_handlers', None) - self.statuses = kwargs.get('statuses', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/virtual_machine_agent_instance_view_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/virtual_machine_agent_instance_view_py3.py deleted file mode 100644 index fae6ce1c0a9f..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/virtual_machine_agent_instance_view_py3.py +++ /dev/null @@ -1,39 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineAgentInstanceView(Model): - """The instance view of the VM Agent running on the virtual machine. - - :param vm_agent_version: The VM Agent full version. - :type vm_agent_version: str - :param extension_handlers: The virtual machine extension handler instance - view. - :type extension_handlers: - list[~azure.mgmt.compute.v2016_03_30.models.VirtualMachineExtensionHandlerInstanceView] - :param statuses: The resource status information. - :type statuses: - list[~azure.mgmt.compute.v2016_03_30.models.InstanceViewStatus] - """ - - _attribute_map = { - 'vm_agent_version': {'key': 'vmAgentVersion', 'type': 'str'}, - 'extension_handlers': {'key': 'extensionHandlers', 'type': '[VirtualMachineExtensionHandlerInstanceView]'}, - 'statuses': {'key': 'statuses', 'type': '[InstanceViewStatus]'}, - } - - def __init__(self, *, vm_agent_version: str=None, extension_handlers=None, statuses=None, **kwargs) -> None: - super(VirtualMachineAgentInstanceView, self).__init__(**kwargs) - self.vm_agent_version = vm_agent_version - self.extension_handlers = extension_handlers - self.statuses = statuses diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/virtual_machine_capture_parameters.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/virtual_machine_capture_parameters.py deleted file mode 100644 index 4e6ffbea7a4f..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/virtual_machine_capture_parameters.py +++ /dev/null @@ -1,46 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineCaptureParameters(Model): - """Capture Virtual Machine parameters. - - All required parameters must be populated in order to send to Azure. - - :param vhd_prefix: Required. The captured virtual hard disk's name prefix. - :type vhd_prefix: str - :param destination_container_name: Required. The destination container - name. - :type destination_container_name: str - :param overwrite_vhds: Required. Specifies whether to overwrite the - destination virtual hard disk, in case of conflict. - :type overwrite_vhds: bool - """ - - _validation = { - 'vhd_prefix': {'required': True}, - 'destination_container_name': {'required': True}, - 'overwrite_vhds': {'required': True}, - } - - _attribute_map = { - 'vhd_prefix': {'key': 'vhdPrefix', 'type': 'str'}, - 'destination_container_name': {'key': 'destinationContainerName', 'type': 'str'}, - 'overwrite_vhds': {'key': 'overwriteVhds', 'type': 'bool'}, - } - - def __init__(self, **kwargs): - super(VirtualMachineCaptureParameters, self).__init__(**kwargs) - self.vhd_prefix = kwargs.get('vhd_prefix', None) - self.destination_container_name = kwargs.get('destination_container_name', None) - self.overwrite_vhds = kwargs.get('overwrite_vhds', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/virtual_machine_capture_parameters_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/virtual_machine_capture_parameters_py3.py deleted file mode 100644 index 1866cdc23300..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/virtual_machine_capture_parameters_py3.py +++ /dev/null @@ -1,46 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineCaptureParameters(Model): - """Capture Virtual Machine parameters. - - All required parameters must be populated in order to send to Azure. - - :param vhd_prefix: Required. The captured virtual hard disk's name prefix. - :type vhd_prefix: str - :param destination_container_name: Required. The destination container - name. - :type destination_container_name: str - :param overwrite_vhds: Required. Specifies whether to overwrite the - destination virtual hard disk, in case of conflict. - :type overwrite_vhds: bool - """ - - _validation = { - 'vhd_prefix': {'required': True}, - 'destination_container_name': {'required': True}, - 'overwrite_vhds': {'required': True}, - } - - _attribute_map = { - 'vhd_prefix': {'key': 'vhdPrefix', 'type': 'str'}, - 'destination_container_name': {'key': 'destinationContainerName', 'type': 'str'}, - 'overwrite_vhds': {'key': 'overwriteVhds', 'type': 'bool'}, - } - - def __init__(self, *, vhd_prefix: str, destination_container_name: str, overwrite_vhds: bool, **kwargs) -> None: - super(VirtualMachineCaptureParameters, self).__init__(**kwargs) - self.vhd_prefix = vhd_prefix - self.destination_container_name = destination_container_name - self.overwrite_vhds = overwrite_vhds diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/virtual_machine_capture_result.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/virtual_machine_capture_result.py deleted file mode 100644 index 2b0df7406a34..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/virtual_machine_capture_result.py +++ /dev/null @@ -1,31 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .sub_resource import SubResource - - -class VirtualMachineCaptureResult(SubResource): - """Resource Id. - - :param id: Resource Id - :type id: str - :param output: Operation output data (raw JSON) - :type output: object - """ - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'output': {'key': 'properties.output', 'type': 'object'}, - } - - def __init__(self, **kwargs): - super(VirtualMachineCaptureResult, self).__init__(**kwargs) - self.output = kwargs.get('output', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/virtual_machine_capture_result_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/virtual_machine_capture_result_py3.py deleted file mode 100644 index f2aba4286bb0..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/virtual_machine_capture_result_py3.py +++ /dev/null @@ -1,31 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .sub_resource_py3 import SubResource - - -class VirtualMachineCaptureResult(SubResource): - """Resource Id. - - :param id: Resource Id - :type id: str - :param output: Operation output data (raw JSON) - :type output: object - """ - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'output': {'key': 'properties.output', 'type': 'object'}, - } - - def __init__(self, *, id: str=None, output=None, **kwargs) -> None: - super(VirtualMachineCaptureResult, self).__init__(id=id, **kwargs) - self.output = output diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/virtual_machine_extension.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/virtual_machine_extension.py deleted file mode 100644 index 5bd629a0f880..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/virtual_machine_extension.py +++ /dev/null @@ -1,97 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource import Resource - - -class VirtualMachineExtension(Resource): - """Describes a Virtual Machine Extension. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource Id - :vartype id: str - :ivar name: Resource name - :vartype name: str - :ivar type: Resource type - :vartype type: str - :param location: Required. Resource location - :type location: str - :param tags: Resource tags - :type tags: dict[str, str] - :param force_update_tag: How the extension handler should be forced to - update even if the extension configuration has not changed. - :type force_update_tag: str - :param publisher: The name of the extension handler publisher. - :type publisher: str - :param virtual_machine_extension_type: Specifies the type of the - extension; an example is "CustomScriptExtension". - :type virtual_machine_extension_type: str - :param type_handler_version: Specifies the version of the script handler. - :type type_handler_version: str - :param auto_upgrade_minor_version: Indicates whether the extension should - use a newer minor version if one is available at deployment time. Once - deployed, however, the extension will not upgrade minor versions unless - redeployed, even with this property set to true. - :type auto_upgrade_minor_version: bool - :param settings: Json formatted public settings for the extension. - :type settings: object - :param protected_settings: The extension can contain either - protectedSettings or protectedSettingsFromKeyVault or no protected - settings at all. - :type protected_settings: object - :ivar provisioning_state: The provisioning state, which only appears in - the response. - :vartype provisioning_state: str - :param instance_view: The virtual machine extension instance view. - :type instance_view: - ~azure.mgmt.compute.v2016_03_30.models.VirtualMachineExtensionInstanceView - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - 'provisioning_state': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'force_update_tag': {'key': 'properties.forceUpdateTag', 'type': 'str'}, - 'publisher': {'key': 'properties.publisher', 'type': 'str'}, - 'virtual_machine_extension_type': {'key': 'properties.type', 'type': 'str'}, - 'type_handler_version': {'key': 'properties.typeHandlerVersion', 'type': 'str'}, - 'auto_upgrade_minor_version': {'key': 'properties.autoUpgradeMinorVersion', 'type': 'bool'}, - 'settings': {'key': 'properties.settings', 'type': 'object'}, - 'protected_settings': {'key': 'properties.protectedSettings', 'type': 'object'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'instance_view': {'key': 'properties.instanceView', 'type': 'VirtualMachineExtensionInstanceView'}, - } - - def __init__(self, **kwargs): - super(VirtualMachineExtension, self).__init__(**kwargs) - self.force_update_tag = kwargs.get('force_update_tag', None) - self.publisher = kwargs.get('publisher', None) - self.virtual_machine_extension_type = kwargs.get('virtual_machine_extension_type', None) - self.type_handler_version = kwargs.get('type_handler_version', None) - self.auto_upgrade_minor_version = kwargs.get('auto_upgrade_minor_version', None) - self.settings = kwargs.get('settings', None) - self.protected_settings = kwargs.get('protected_settings', None) - self.provisioning_state = None - self.instance_view = kwargs.get('instance_view', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/virtual_machine_extension_handler_instance_view.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/virtual_machine_extension_handler_instance_view.py deleted file mode 100644 index 796327c6e98c..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/virtual_machine_extension_handler_instance_view.py +++ /dev/null @@ -1,37 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineExtensionHandlerInstanceView(Model): - """The instance view of a virtual machine extension handler. - - :param type: Specifies the type of the extension; an example is - "CustomScriptExtension". - :type type: str - :param type_handler_version: Specifies the version of the script handler. - :type type_handler_version: str - :param status: The extension handler status. - :type status: ~azure.mgmt.compute.v2016_03_30.models.InstanceViewStatus - """ - - _attribute_map = { - 'type': {'key': 'type', 'type': 'str'}, - 'type_handler_version': {'key': 'typeHandlerVersion', 'type': 'str'}, - 'status': {'key': 'status', 'type': 'InstanceViewStatus'}, - } - - def __init__(self, **kwargs): - super(VirtualMachineExtensionHandlerInstanceView, self).__init__(**kwargs) - self.type = kwargs.get('type', None) - self.type_handler_version = kwargs.get('type_handler_version', None) - self.status = kwargs.get('status', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/virtual_machine_extension_handler_instance_view_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/virtual_machine_extension_handler_instance_view_py3.py deleted file mode 100644 index 0c9a6da30f09..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/virtual_machine_extension_handler_instance_view_py3.py +++ /dev/null @@ -1,37 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineExtensionHandlerInstanceView(Model): - """The instance view of a virtual machine extension handler. - - :param type: Specifies the type of the extension; an example is - "CustomScriptExtension". - :type type: str - :param type_handler_version: Specifies the version of the script handler. - :type type_handler_version: str - :param status: The extension handler status. - :type status: ~azure.mgmt.compute.v2016_03_30.models.InstanceViewStatus - """ - - _attribute_map = { - 'type': {'key': 'type', 'type': 'str'}, - 'type_handler_version': {'key': 'typeHandlerVersion', 'type': 'str'}, - 'status': {'key': 'status', 'type': 'InstanceViewStatus'}, - } - - def __init__(self, *, type: str=None, type_handler_version: str=None, status=None, **kwargs) -> None: - super(VirtualMachineExtensionHandlerInstanceView, self).__init__(**kwargs) - self.type = type - self.type_handler_version = type_handler_version - self.status = status diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/virtual_machine_extension_image.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/virtual_machine_extension_image.py deleted file mode 100644 index 7273e2b84754..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/virtual_machine_extension_image.py +++ /dev/null @@ -1,81 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource import Resource - - -class VirtualMachineExtensionImage(Resource): - """Describes a Virtual Machine Extension Image. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource Id - :vartype id: str - :ivar name: Resource name - :vartype name: str - :ivar type: Resource type - :vartype type: str - :param location: Required. Resource location - :type location: str - :param tags: Resource tags - :type tags: dict[str, str] - :param operating_system: Required. The operating system this extension - supports. - :type operating_system: str - :param compute_role: Required. The type of role (IaaS or PaaS) this - extension supports. - :type compute_role: str - :param handler_schema: Required. The schema defined by publisher, where - extension consumers should provide settings in a matching schema. - :type handler_schema: str - :param vm_scale_set_enabled: Whether the extension can be used on xRP - VMScaleSets. By default existing extensions are usable on scalesets, but - there might be cases where a publisher wants to explicitly indicate the - extension is only enabled for CRP VMs but not VMSS. - :type vm_scale_set_enabled: bool - :param supports_multiple_extensions: Whether the handler can support - multiple extensions. - :type supports_multiple_extensions: bool - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - 'operating_system': {'required': True}, - 'compute_role': {'required': True}, - 'handler_schema': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'operating_system': {'key': 'properties.operatingSystem', 'type': 'str'}, - 'compute_role': {'key': 'properties.computeRole', 'type': 'str'}, - 'handler_schema': {'key': 'properties.handlerSchema', 'type': 'str'}, - 'vm_scale_set_enabled': {'key': 'properties.vmScaleSetEnabled', 'type': 'bool'}, - 'supports_multiple_extensions': {'key': 'properties.supportsMultipleExtensions', 'type': 'bool'}, - } - - def __init__(self, **kwargs): - super(VirtualMachineExtensionImage, self).__init__(**kwargs) - self.operating_system = kwargs.get('operating_system', None) - self.compute_role = kwargs.get('compute_role', None) - self.handler_schema = kwargs.get('handler_schema', None) - self.vm_scale_set_enabled = kwargs.get('vm_scale_set_enabled', None) - self.supports_multiple_extensions = kwargs.get('supports_multiple_extensions', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/virtual_machine_extension_image_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/virtual_machine_extension_image_py3.py deleted file mode 100644 index 3d48c3a87fb0..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/virtual_machine_extension_image_py3.py +++ /dev/null @@ -1,81 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource_py3 import Resource - - -class VirtualMachineExtensionImage(Resource): - """Describes a Virtual Machine Extension Image. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource Id - :vartype id: str - :ivar name: Resource name - :vartype name: str - :ivar type: Resource type - :vartype type: str - :param location: Required. Resource location - :type location: str - :param tags: Resource tags - :type tags: dict[str, str] - :param operating_system: Required. The operating system this extension - supports. - :type operating_system: str - :param compute_role: Required. The type of role (IaaS or PaaS) this - extension supports. - :type compute_role: str - :param handler_schema: Required. The schema defined by publisher, where - extension consumers should provide settings in a matching schema. - :type handler_schema: str - :param vm_scale_set_enabled: Whether the extension can be used on xRP - VMScaleSets. By default existing extensions are usable on scalesets, but - there might be cases where a publisher wants to explicitly indicate the - extension is only enabled for CRP VMs but not VMSS. - :type vm_scale_set_enabled: bool - :param supports_multiple_extensions: Whether the handler can support - multiple extensions. - :type supports_multiple_extensions: bool - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - 'operating_system': {'required': True}, - 'compute_role': {'required': True}, - 'handler_schema': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'operating_system': {'key': 'properties.operatingSystem', 'type': 'str'}, - 'compute_role': {'key': 'properties.computeRole', 'type': 'str'}, - 'handler_schema': {'key': 'properties.handlerSchema', 'type': 'str'}, - 'vm_scale_set_enabled': {'key': 'properties.vmScaleSetEnabled', 'type': 'bool'}, - 'supports_multiple_extensions': {'key': 'properties.supportsMultipleExtensions', 'type': 'bool'}, - } - - def __init__(self, *, location: str, operating_system: str, compute_role: str, handler_schema: str, tags=None, vm_scale_set_enabled: bool=None, supports_multiple_extensions: bool=None, **kwargs) -> None: - super(VirtualMachineExtensionImage, self).__init__(location=location, tags=tags, **kwargs) - self.operating_system = operating_system - self.compute_role = compute_role - self.handler_schema = handler_schema - self.vm_scale_set_enabled = vm_scale_set_enabled - self.supports_multiple_extensions = supports_multiple_extensions diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/virtual_machine_extension_instance_view.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/virtual_machine_extension_instance_view.py deleted file mode 100644 index 20404ccc1f2e..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/virtual_machine_extension_instance_view.py +++ /dev/null @@ -1,47 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineExtensionInstanceView(Model): - """The instance view of a virtual machine extension. - - :param name: The virtual machine extension name. - :type name: str - :param type: Specifies the type of the extension; an example is - "CustomScriptExtension". - :type type: str - :param type_handler_version: Specifies the version of the script handler. - :type type_handler_version: str - :param substatuses: The resource status information. - :type substatuses: - list[~azure.mgmt.compute.v2016_03_30.models.InstanceViewStatus] - :param statuses: The resource status information. - :type statuses: - list[~azure.mgmt.compute.v2016_03_30.models.InstanceViewStatus] - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'type_handler_version': {'key': 'typeHandlerVersion', 'type': 'str'}, - 'substatuses': {'key': 'substatuses', 'type': '[InstanceViewStatus]'}, - 'statuses': {'key': 'statuses', 'type': '[InstanceViewStatus]'}, - } - - def __init__(self, **kwargs): - super(VirtualMachineExtensionInstanceView, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.type = kwargs.get('type', None) - self.type_handler_version = kwargs.get('type_handler_version', None) - self.substatuses = kwargs.get('substatuses', None) - self.statuses = kwargs.get('statuses', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/virtual_machine_extension_instance_view_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/virtual_machine_extension_instance_view_py3.py deleted file mode 100644 index 6075f76cb1ca..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/virtual_machine_extension_instance_view_py3.py +++ /dev/null @@ -1,47 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineExtensionInstanceView(Model): - """The instance view of a virtual machine extension. - - :param name: The virtual machine extension name. - :type name: str - :param type: Specifies the type of the extension; an example is - "CustomScriptExtension". - :type type: str - :param type_handler_version: Specifies the version of the script handler. - :type type_handler_version: str - :param substatuses: The resource status information. - :type substatuses: - list[~azure.mgmt.compute.v2016_03_30.models.InstanceViewStatus] - :param statuses: The resource status information. - :type statuses: - list[~azure.mgmt.compute.v2016_03_30.models.InstanceViewStatus] - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'type_handler_version': {'key': 'typeHandlerVersion', 'type': 'str'}, - 'substatuses': {'key': 'substatuses', 'type': '[InstanceViewStatus]'}, - 'statuses': {'key': 'statuses', 'type': '[InstanceViewStatus]'}, - } - - def __init__(self, *, name: str=None, type: str=None, type_handler_version: str=None, substatuses=None, statuses=None, **kwargs) -> None: - super(VirtualMachineExtensionInstanceView, self).__init__(**kwargs) - self.name = name - self.type = type - self.type_handler_version = type_handler_version - self.substatuses = substatuses - self.statuses = statuses diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/virtual_machine_extension_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/virtual_machine_extension_py3.py deleted file mode 100644 index ef8a5ef965ec..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/virtual_machine_extension_py3.py +++ /dev/null @@ -1,97 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource_py3 import Resource - - -class VirtualMachineExtension(Resource): - """Describes a Virtual Machine Extension. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource Id - :vartype id: str - :ivar name: Resource name - :vartype name: str - :ivar type: Resource type - :vartype type: str - :param location: Required. Resource location - :type location: str - :param tags: Resource tags - :type tags: dict[str, str] - :param force_update_tag: How the extension handler should be forced to - update even if the extension configuration has not changed. - :type force_update_tag: str - :param publisher: The name of the extension handler publisher. - :type publisher: str - :param virtual_machine_extension_type: Specifies the type of the - extension; an example is "CustomScriptExtension". - :type virtual_machine_extension_type: str - :param type_handler_version: Specifies the version of the script handler. - :type type_handler_version: str - :param auto_upgrade_minor_version: Indicates whether the extension should - use a newer minor version if one is available at deployment time. Once - deployed, however, the extension will not upgrade minor versions unless - redeployed, even with this property set to true. - :type auto_upgrade_minor_version: bool - :param settings: Json formatted public settings for the extension. - :type settings: object - :param protected_settings: The extension can contain either - protectedSettings or protectedSettingsFromKeyVault or no protected - settings at all. - :type protected_settings: object - :ivar provisioning_state: The provisioning state, which only appears in - the response. - :vartype provisioning_state: str - :param instance_view: The virtual machine extension instance view. - :type instance_view: - ~azure.mgmt.compute.v2016_03_30.models.VirtualMachineExtensionInstanceView - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - 'provisioning_state': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'force_update_tag': {'key': 'properties.forceUpdateTag', 'type': 'str'}, - 'publisher': {'key': 'properties.publisher', 'type': 'str'}, - 'virtual_machine_extension_type': {'key': 'properties.type', 'type': 'str'}, - 'type_handler_version': {'key': 'properties.typeHandlerVersion', 'type': 'str'}, - 'auto_upgrade_minor_version': {'key': 'properties.autoUpgradeMinorVersion', 'type': 'bool'}, - 'settings': {'key': 'properties.settings', 'type': 'object'}, - 'protected_settings': {'key': 'properties.protectedSettings', 'type': 'object'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'instance_view': {'key': 'properties.instanceView', 'type': 'VirtualMachineExtensionInstanceView'}, - } - - def __init__(self, *, location: str, tags=None, force_update_tag: str=None, publisher: str=None, virtual_machine_extension_type: str=None, type_handler_version: str=None, auto_upgrade_minor_version: bool=None, settings=None, protected_settings=None, instance_view=None, **kwargs) -> None: - super(VirtualMachineExtension, self).__init__(location=location, tags=tags, **kwargs) - self.force_update_tag = force_update_tag - self.publisher = publisher - self.virtual_machine_extension_type = virtual_machine_extension_type - self.type_handler_version = type_handler_version - self.auto_upgrade_minor_version = auto_upgrade_minor_version - self.settings = settings - self.protected_settings = protected_settings - self.provisioning_state = None - self.instance_view = instance_view diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/virtual_machine_extension_update.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/virtual_machine_extension_update.py deleted file mode 100644 index b920ff57ff96..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/virtual_machine_extension_update.py +++ /dev/null @@ -1,62 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .update_resource import UpdateResource - - -class VirtualMachineExtensionUpdate(UpdateResource): - """Describes a Virtual Machine Extension. - - :param tags: Resource tags - :type tags: dict[str, str] - :param force_update_tag: How the extension handler should be forced to - update even if the extension configuration has not changed. - :type force_update_tag: str - :param publisher: The name of the extension handler publisher. - :type publisher: str - :param type: Specifies the type of the extension; an example is - "CustomScriptExtension". - :type type: str - :param type_handler_version: Specifies the version of the script handler. - :type type_handler_version: str - :param auto_upgrade_minor_version: Indicates whether the extension should - use a newer minor version if one is available at deployment time. Once - deployed, however, the extension will not upgrade minor versions unless - redeployed, even with this property set to true. - :type auto_upgrade_minor_version: bool - :param settings: Json formatted public settings for the extension. - :type settings: object - :param protected_settings: The extension can contain either - protectedSettings or protectedSettingsFromKeyVault or no protected - settings at all. - :type protected_settings: object - """ - - _attribute_map = { - 'tags': {'key': 'tags', 'type': '{str}'}, - 'force_update_tag': {'key': 'properties.forceUpdateTag', 'type': 'str'}, - 'publisher': {'key': 'properties.publisher', 'type': 'str'}, - 'type': {'key': 'properties.type', 'type': 'str'}, - 'type_handler_version': {'key': 'properties.typeHandlerVersion', 'type': 'str'}, - 'auto_upgrade_minor_version': {'key': 'properties.autoUpgradeMinorVersion', 'type': 'bool'}, - 'settings': {'key': 'properties.settings', 'type': 'object'}, - 'protected_settings': {'key': 'properties.protectedSettings', 'type': 'object'}, - } - - def __init__(self, **kwargs): - super(VirtualMachineExtensionUpdate, self).__init__(**kwargs) - self.force_update_tag = kwargs.get('force_update_tag', None) - self.publisher = kwargs.get('publisher', None) - self.type = kwargs.get('type', None) - self.type_handler_version = kwargs.get('type_handler_version', None) - self.auto_upgrade_minor_version = kwargs.get('auto_upgrade_minor_version', None) - self.settings = kwargs.get('settings', None) - self.protected_settings = kwargs.get('protected_settings', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/virtual_machine_extension_update_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/virtual_machine_extension_update_py3.py deleted file mode 100644 index c32c18d32759..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/virtual_machine_extension_update_py3.py +++ /dev/null @@ -1,62 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .update_resource_py3 import UpdateResource - - -class VirtualMachineExtensionUpdate(UpdateResource): - """Describes a Virtual Machine Extension. - - :param tags: Resource tags - :type tags: dict[str, str] - :param force_update_tag: How the extension handler should be forced to - update even if the extension configuration has not changed. - :type force_update_tag: str - :param publisher: The name of the extension handler publisher. - :type publisher: str - :param type: Specifies the type of the extension; an example is - "CustomScriptExtension". - :type type: str - :param type_handler_version: Specifies the version of the script handler. - :type type_handler_version: str - :param auto_upgrade_minor_version: Indicates whether the extension should - use a newer minor version if one is available at deployment time. Once - deployed, however, the extension will not upgrade minor versions unless - redeployed, even with this property set to true. - :type auto_upgrade_minor_version: bool - :param settings: Json formatted public settings for the extension. - :type settings: object - :param protected_settings: The extension can contain either - protectedSettings or protectedSettingsFromKeyVault or no protected - settings at all. - :type protected_settings: object - """ - - _attribute_map = { - 'tags': {'key': 'tags', 'type': '{str}'}, - 'force_update_tag': {'key': 'properties.forceUpdateTag', 'type': 'str'}, - 'publisher': {'key': 'properties.publisher', 'type': 'str'}, - 'type': {'key': 'properties.type', 'type': 'str'}, - 'type_handler_version': {'key': 'properties.typeHandlerVersion', 'type': 'str'}, - 'auto_upgrade_minor_version': {'key': 'properties.autoUpgradeMinorVersion', 'type': 'bool'}, - 'settings': {'key': 'properties.settings', 'type': 'object'}, - 'protected_settings': {'key': 'properties.protectedSettings', 'type': 'object'}, - } - - def __init__(self, *, tags=None, force_update_tag: str=None, publisher: str=None, type: str=None, type_handler_version: str=None, auto_upgrade_minor_version: bool=None, settings=None, protected_settings=None, **kwargs) -> None: - super(VirtualMachineExtensionUpdate, self).__init__(tags=tags, **kwargs) - self.force_update_tag = force_update_tag - self.publisher = publisher - self.type = type - self.type_handler_version = type_handler_version - self.auto_upgrade_minor_version = auto_upgrade_minor_version - self.settings = settings - self.protected_settings = protected_settings diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/virtual_machine_extensions_list_result.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/virtual_machine_extensions_list_result.py deleted file mode 100644 index 22ec67375b47..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/virtual_machine_extensions_list_result.py +++ /dev/null @@ -1,29 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineExtensionsListResult(Model): - """The List Extension operation response. - - :param value: The list of extensions - :type value: - list[~azure.mgmt.compute.v2016_03_30.models.VirtualMachineExtension] - """ - - _attribute_map = { - 'value': {'key': 'value', 'type': '[VirtualMachineExtension]'}, - } - - def __init__(self, **kwargs): - super(VirtualMachineExtensionsListResult, self).__init__(**kwargs) - self.value = kwargs.get('value', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/virtual_machine_extensions_list_result_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/virtual_machine_extensions_list_result_py3.py deleted file mode 100644 index 60d057ab868a..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/virtual_machine_extensions_list_result_py3.py +++ /dev/null @@ -1,29 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineExtensionsListResult(Model): - """The List Extension operation response. - - :param value: The list of extensions - :type value: - list[~azure.mgmt.compute.v2016_03_30.models.VirtualMachineExtension] - """ - - _attribute_map = { - 'value': {'key': 'value', 'type': '[VirtualMachineExtension]'}, - } - - def __init__(self, *, value=None, **kwargs) -> None: - super(VirtualMachineExtensionsListResult, self).__init__(**kwargs) - self.value = value diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/virtual_machine_identity.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/virtual_machine_identity.py deleted file mode 100644 index ec2f505a0ee6..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/virtual_machine_identity.py +++ /dev/null @@ -1,47 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineIdentity(Model): - """Identity for the virtual machine. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar principal_id: The principal id of virtual machine identity. - :vartype principal_id: str - :ivar tenant_id: The tenant id associated with the virtual machine. - :vartype tenant_id: str - :param type: The type of identity used for the virtual machine. Currently, - the only supported type is 'SystemAssigned', which implicitly creates an - identity. Possible values include: 'SystemAssigned' - :type type: str or - ~azure.mgmt.compute.v2016_03_30.models.ResourceIdentityType - """ - - _validation = { - 'principal_id': {'readonly': True}, - 'tenant_id': {'readonly': True}, - } - - _attribute_map = { - 'principal_id': {'key': 'principalId', 'type': 'str'}, - 'tenant_id': {'key': 'tenantId', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'ResourceIdentityType'}, - } - - def __init__(self, **kwargs): - super(VirtualMachineIdentity, self).__init__(**kwargs) - self.principal_id = None - self.tenant_id = None - self.type = kwargs.get('type', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/virtual_machine_identity_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/virtual_machine_identity_py3.py deleted file mode 100644 index 9db47247e9e5..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/virtual_machine_identity_py3.py +++ /dev/null @@ -1,47 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineIdentity(Model): - """Identity for the virtual machine. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar principal_id: The principal id of virtual machine identity. - :vartype principal_id: str - :ivar tenant_id: The tenant id associated with the virtual machine. - :vartype tenant_id: str - :param type: The type of identity used for the virtual machine. Currently, - the only supported type is 'SystemAssigned', which implicitly creates an - identity. Possible values include: 'SystemAssigned' - :type type: str or - ~azure.mgmt.compute.v2016_03_30.models.ResourceIdentityType - """ - - _validation = { - 'principal_id': {'readonly': True}, - 'tenant_id': {'readonly': True}, - } - - _attribute_map = { - 'principal_id': {'key': 'principalId', 'type': 'str'}, - 'tenant_id': {'key': 'tenantId', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'ResourceIdentityType'}, - } - - def __init__(self, *, type=None, **kwargs) -> None: - super(VirtualMachineIdentity, self).__init__(**kwargs) - self.principal_id = None - self.tenant_id = None - self.type = type diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/virtual_machine_image.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/virtual_machine_image.py deleted file mode 100644 index 4ddf3a23c29c..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/virtual_machine_image.py +++ /dev/null @@ -1,59 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .virtual_machine_image_resource import VirtualMachineImageResource - - -class VirtualMachineImage(VirtualMachineImageResource): - """Describes a Virtual Machine Image. - - All required parameters must be populated in order to send to Azure. - - :param id: Resource Id - :type id: str - :param name: Required. The name of the resource. - :type name: str - :param location: Required. The supported Azure location of the resource. - :type location: str - :param tags: Specifies the tags that are assigned to the virtual machine. - For more information about using tags, see [Using tags to organize your - Azure - resources](https://docs.microsoft.com/azure/azure-resource-manager/resource-group-using-tags.md). - :type tags: dict[str, str] - :param plan: - :type plan: ~azure.mgmt.compute.v2016_03_30.models.PurchasePlan - :param os_disk_image: - :type os_disk_image: ~azure.mgmt.compute.v2016_03_30.models.OSDiskImage - :param data_disk_images: - :type data_disk_images: - list[~azure.mgmt.compute.v2016_03_30.models.DataDiskImage] - """ - - _validation = { - 'name': {'required': True}, - 'location': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'plan': {'key': 'properties.plan', 'type': 'PurchasePlan'}, - 'os_disk_image': {'key': 'properties.osDiskImage', 'type': 'OSDiskImage'}, - 'data_disk_images': {'key': 'properties.dataDiskImages', 'type': '[DataDiskImage]'}, - } - - def __init__(self, **kwargs): - super(VirtualMachineImage, self).__init__(**kwargs) - self.plan = kwargs.get('plan', None) - self.os_disk_image = kwargs.get('os_disk_image', None) - self.data_disk_images = kwargs.get('data_disk_images', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/virtual_machine_image_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/virtual_machine_image_py3.py deleted file mode 100644 index 4c8bd1482541..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/virtual_machine_image_py3.py +++ /dev/null @@ -1,59 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .virtual_machine_image_resource_py3 import VirtualMachineImageResource - - -class VirtualMachineImage(VirtualMachineImageResource): - """Describes a Virtual Machine Image. - - All required parameters must be populated in order to send to Azure. - - :param id: Resource Id - :type id: str - :param name: Required. The name of the resource. - :type name: str - :param location: Required. The supported Azure location of the resource. - :type location: str - :param tags: Specifies the tags that are assigned to the virtual machine. - For more information about using tags, see [Using tags to organize your - Azure - resources](https://docs.microsoft.com/azure/azure-resource-manager/resource-group-using-tags.md). - :type tags: dict[str, str] - :param plan: - :type plan: ~azure.mgmt.compute.v2016_03_30.models.PurchasePlan - :param os_disk_image: - :type os_disk_image: ~azure.mgmt.compute.v2016_03_30.models.OSDiskImage - :param data_disk_images: - :type data_disk_images: - list[~azure.mgmt.compute.v2016_03_30.models.DataDiskImage] - """ - - _validation = { - 'name': {'required': True}, - 'location': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'plan': {'key': 'properties.plan', 'type': 'PurchasePlan'}, - 'os_disk_image': {'key': 'properties.osDiskImage', 'type': 'OSDiskImage'}, - 'data_disk_images': {'key': 'properties.dataDiskImages', 'type': '[DataDiskImage]'}, - } - - def __init__(self, *, name: str, location: str, id: str=None, tags=None, plan=None, os_disk_image=None, data_disk_images=None, **kwargs) -> None: - super(VirtualMachineImage, self).__init__(id=id, name=name, location=location, tags=tags, **kwargs) - self.plan = plan - self.os_disk_image = os_disk_image - self.data_disk_images = data_disk_images diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/virtual_machine_image_resource.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/virtual_machine_image_resource.py deleted file mode 100644 index 8807cc8f391b..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/virtual_machine_image_resource.py +++ /dev/null @@ -1,49 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .sub_resource import SubResource - - -class VirtualMachineImageResource(SubResource): - """Virtual machine image resource information. - - All required parameters must be populated in order to send to Azure. - - :param id: Resource Id - :type id: str - :param name: Required. The name of the resource. - :type name: str - :param location: Required. The supported Azure location of the resource. - :type location: str - :param tags: Specifies the tags that are assigned to the virtual machine. - For more information about using tags, see [Using tags to organize your - Azure - resources](https://docs.microsoft.com/azure/azure-resource-manager/resource-group-using-tags.md). - :type tags: dict[str, str] - """ - - _validation = { - 'name': {'required': True}, - 'location': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - } - - def __init__(self, **kwargs): - super(VirtualMachineImageResource, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.location = kwargs.get('location', None) - self.tags = kwargs.get('tags', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/virtual_machine_image_resource_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/virtual_machine_image_resource_py3.py deleted file mode 100644 index b9d63a8bc9e0..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/virtual_machine_image_resource_py3.py +++ /dev/null @@ -1,49 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .sub_resource_py3 import SubResource - - -class VirtualMachineImageResource(SubResource): - """Virtual machine image resource information. - - All required parameters must be populated in order to send to Azure. - - :param id: Resource Id - :type id: str - :param name: Required. The name of the resource. - :type name: str - :param location: Required. The supported Azure location of the resource. - :type location: str - :param tags: Specifies the tags that are assigned to the virtual machine. - For more information about using tags, see [Using tags to organize your - Azure - resources](https://docs.microsoft.com/azure/azure-resource-manager/resource-group-using-tags.md). - :type tags: dict[str, str] - """ - - _validation = { - 'name': {'required': True}, - 'location': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - } - - def __init__(self, *, name: str, location: str, id: str=None, tags=None, **kwargs) -> None: - super(VirtualMachineImageResource, self).__init__(id=id, **kwargs) - self.name = name - self.location = location - self.tags = tags diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/virtual_machine_instance_view.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/virtual_machine_instance_view.py deleted file mode 100644 index 0816555b120e..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/virtual_machine_instance_view.py +++ /dev/null @@ -1,65 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineInstanceView(Model): - """The instance view of a virtual machine. - - :param platform_update_domain: Specifies the update domain of the virtual - machine. - :type platform_update_domain: int - :param platform_fault_domain: Specifies the fault domain of the virtual - machine. - :type platform_fault_domain: int - :param rdp_thumb_print: The Remote desktop certificate thumbprint. - :type rdp_thumb_print: str - :param vm_agent: The VM Agent running on the virtual machine. - :type vm_agent: - ~azure.mgmt.compute.v2016_03_30.models.VirtualMachineAgentInstanceView - :param disks: The virtual machine disk information. - :type disks: list[~azure.mgmt.compute.v2016_03_30.models.DiskInstanceView] - :param extensions: The extensions information. - :type extensions: - list[~azure.mgmt.compute.v2016_03_30.models.VirtualMachineExtensionInstanceView] - :param boot_diagnostics: Boot Diagnostics is a debugging feature which - allows you to view Console Output and Screenshot to diagnose VM status. -

    You can easily view the output of your console log.

    - Azure also enables you to see a screenshot of the VM from the hypervisor. - :type boot_diagnostics: - ~azure.mgmt.compute.v2016_03_30.models.BootDiagnosticsInstanceView - :param statuses: The resource status information. - :type statuses: - list[~azure.mgmt.compute.v2016_03_30.models.InstanceViewStatus] - """ - - _attribute_map = { - 'platform_update_domain': {'key': 'platformUpdateDomain', 'type': 'int'}, - 'platform_fault_domain': {'key': 'platformFaultDomain', 'type': 'int'}, - 'rdp_thumb_print': {'key': 'rdpThumbPrint', 'type': 'str'}, - 'vm_agent': {'key': 'vmAgent', 'type': 'VirtualMachineAgentInstanceView'}, - 'disks': {'key': 'disks', 'type': '[DiskInstanceView]'}, - 'extensions': {'key': 'extensions', 'type': '[VirtualMachineExtensionInstanceView]'}, - 'boot_diagnostics': {'key': 'bootDiagnostics', 'type': 'BootDiagnosticsInstanceView'}, - 'statuses': {'key': 'statuses', 'type': '[InstanceViewStatus]'}, - } - - def __init__(self, **kwargs): - super(VirtualMachineInstanceView, self).__init__(**kwargs) - self.platform_update_domain = kwargs.get('platform_update_domain', None) - self.platform_fault_domain = kwargs.get('platform_fault_domain', None) - self.rdp_thumb_print = kwargs.get('rdp_thumb_print', None) - self.vm_agent = kwargs.get('vm_agent', None) - self.disks = kwargs.get('disks', None) - self.extensions = kwargs.get('extensions', None) - self.boot_diagnostics = kwargs.get('boot_diagnostics', None) - self.statuses = kwargs.get('statuses', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/virtual_machine_instance_view_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/virtual_machine_instance_view_py3.py deleted file mode 100644 index 57a65fcad4d4..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/virtual_machine_instance_view_py3.py +++ /dev/null @@ -1,65 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineInstanceView(Model): - """The instance view of a virtual machine. - - :param platform_update_domain: Specifies the update domain of the virtual - machine. - :type platform_update_domain: int - :param platform_fault_domain: Specifies the fault domain of the virtual - machine. - :type platform_fault_domain: int - :param rdp_thumb_print: The Remote desktop certificate thumbprint. - :type rdp_thumb_print: str - :param vm_agent: The VM Agent running on the virtual machine. - :type vm_agent: - ~azure.mgmt.compute.v2016_03_30.models.VirtualMachineAgentInstanceView - :param disks: The virtual machine disk information. - :type disks: list[~azure.mgmt.compute.v2016_03_30.models.DiskInstanceView] - :param extensions: The extensions information. - :type extensions: - list[~azure.mgmt.compute.v2016_03_30.models.VirtualMachineExtensionInstanceView] - :param boot_diagnostics: Boot Diagnostics is a debugging feature which - allows you to view Console Output and Screenshot to diagnose VM status. -

    You can easily view the output of your console log.

    - Azure also enables you to see a screenshot of the VM from the hypervisor. - :type boot_diagnostics: - ~azure.mgmt.compute.v2016_03_30.models.BootDiagnosticsInstanceView - :param statuses: The resource status information. - :type statuses: - list[~azure.mgmt.compute.v2016_03_30.models.InstanceViewStatus] - """ - - _attribute_map = { - 'platform_update_domain': {'key': 'platformUpdateDomain', 'type': 'int'}, - 'platform_fault_domain': {'key': 'platformFaultDomain', 'type': 'int'}, - 'rdp_thumb_print': {'key': 'rdpThumbPrint', 'type': 'str'}, - 'vm_agent': {'key': 'vmAgent', 'type': 'VirtualMachineAgentInstanceView'}, - 'disks': {'key': 'disks', 'type': '[DiskInstanceView]'}, - 'extensions': {'key': 'extensions', 'type': '[VirtualMachineExtensionInstanceView]'}, - 'boot_diagnostics': {'key': 'bootDiagnostics', 'type': 'BootDiagnosticsInstanceView'}, - 'statuses': {'key': 'statuses', 'type': '[InstanceViewStatus]'}, - } - - def __init__(self, *, platform_update_domain: int=None, platform_fault_domain: int=None, rdp_thumb_print: str=None, vm_agent=None, disks=None, extensions=None, boot_diagnostics=None, statuses=None, **kwargs) -> None: - super(VirtualMachineInstanceView, self).__init__(**kwargs) - self.platform_update_domain = platform_update_domain - self.platform_fault_domain = platform_fault_domain - self.rdp_thumb_print = rdp_thumb_print - self.vm_agent = vm_agent - self.disks = disks - self.extensions = extensions - self.boot_diagnostics = boot_diagnostics - self.statuses = statuses diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/virtual_machine_paged.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/virtual_machine_paged.py deleted file mode 100644 index 0489575f28ba..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/virtual_machine_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class VirtualMachinePaged(Paged): - """ - A paging container for iterating over a list of :class:`VirtualMachine ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[VirtualMachine]'} - } - - def __init__(self, *args, **kwargs): - - super(VirtualMachinePaged, self).__init__(*args, **kwargs) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/virtual_machine_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/virtual_machine_py3.py deleted file mode 100644 index 91469e5a14b8..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/virtual_machine_py3.py +++ /dev/null @@ -1,146 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource_py3 import Resource - - -class VirtualMachine(Resource): - """Describes a Virtual Machine. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource Id - :vartype id: str - :ivar name: Resource name - :vartype name: str - :ivar type: Resource type - :vartype type: str - :param location: Required. Resource location - :type location: str - :param tags: Resource tags - :type tags: dict[str, str] - :param plan: Specifies information about the marketplace image used to - create the virtual machine. This element is only used for marketplace - images. Before you can use a marketplace image from an API, you must - enable the image for programmatic use. In the Azure portal, find the - marketplace image that you want to use and then click **Want to deploy - programmatically, Get Started ->**. Enter any required information and - then click **Save**. - :type plan: ~azure.mgmt.compute.v2016_03_30.models.Plan - :param hardware_profile: Specifies the hardware settings for the virtual - machine. - :type hardware_profile: - ~azure.mgmt.compute.v2016_03_30.models.HardwareProfile - :param storage_profile: Specifies the storage settings for the virtual - machine disks. - :type storage_profile: - ~azure.mgmt.compute.v2016_03_30.models.StorageProfile - :param os_profile: Specifies the operating system settings for the virtual - machine. - :type os_profile: ~azure.mgmt.compute.v2016_03_30.models.OSProfile - :param network_profile: Specifies the network interfaces of the virtual - machine. - :type network_profile: - ~azure.mgmt.compute.v2016_03_30.models.NetworkProfile - :param diagnostics_profile: Specifies the boot diagnostic settings state. -

    Minimum api-version: 2015-06-15. - :type diagnostics_profile: - ~azure.mgmt.compute.v2016_03_30.models.DiagnosticsProfile - :param availability_set: Specifies information about the availability set - that the virtual machine should be assigned to. Virtual machines specified - in the same availability set are allocated to different nodes to maximize - availability. For more information about availability sets, see [Manage - the availability of virtual - machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-manage-availability?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). -

    For more information on Azure planned maintenance, see [Planned - maintenance for virtual machines in - Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-planned-maintenance?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json) -

    Currently, a VM can only be added to availability set at creation - time. An existing VM cannot be added to an availability set. - :type availability_set: ~azure.mgmt.compute.v2016_03_30.models.SubResource - :ivar provisioning_state: The provisioning state, which only appears in - the response. - :vartype provisioning_state: str - :ivar instance_view: The virtual machine instance view. - :vartype instance_view: - ~azure.mgmt.compute.v2016_03_30.models.VirtualMachineInstanceView - :param license_type: Specifies that the image or disk that is being used - was licensed on-premises. This element is only used for images that - contain the Windows Server operating system.

    Possible values are: -

    Windows_Client

    Windows_Server

    If this element - is included in a request for an update, the value must match the initial - value. This value cannot be updated.

    For more information, see - [Azure Hybrid Use Benefit for Windows - Server](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-hybrid-use-benefit-licensing?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json) -

    Minimum api-version: 2015-06-15 - :type license_type: str - :ivar vm_id: Specifies the VM unique ID which is a 128-bits identifier - that is encoded and stored in all Azure IaaS VMs SMBIOS and can be read - using platform BIOS commands. - :vartype vm_id: str - :ivar resources: The virtual machine child extension resources. - :vartype resources: - list[~azure.mgmt.compute.v2016_03_30.models.VirtualMachineExtension] - :param identity: The identity of the virtual machine, if configured. - :type identity: - ~azure.mgmt.compute.v2016_03_30.models.VirtualMachineIdentity - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - 'provisioning_state': {'readonly': True}, - 'instance_view': {'readonly': True}, - 'vm_id': {'readonly': True}, - 'resources': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'plan': {'key': 'plan', 'type': 'Plan'}, - 'hardware_profile': {'key': 'properties.hardwareProfile', 'type': 'HardwareProfile'}, - 'storage_profile': {'key': 'properties.storageProfile', 'type': 'StorageProfile'}, - 'os_profile': {'key': 'properties.osProfile', 'type': 'OSProfile'}, - 'network_profile': {'key': 'properties.networkProfile', 'type': 'NetworkProfile'}, - 'diagnostics_profile': {'key': 'properties.diagnosticsProfile', 'type': 'DiagnosticsProfile'}, - 'availability_set': {'key': 'properties.availabilitySet', 'type': 'SubResource'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'instance_view': {'key': 'properties.instanceView', 'type': 'VirtualMachineInstanceView'}, - 'license_type': {'key': 'properties.licenseType', 'type': 'str'}, - 'vm_id': {'key': 'properties.vmId', 'type': 'str'}, - 'resources': {'key': 'resources', 'type': '[VirtualMachineExtension]'}, - 'identity': {'key': 'identity', 'type': 'VirtualMachineIdentity'}, - } - - def __init__(self, *, location: str, tags=None, plan=None, hardware_profile=None, storage_profile=None, os_profile=None, network_profile=None, diagnostics_profile=None, availability_set=None, license_type: str=None, identity=None, **kwargs) -> None: - super(VirtualMachine, self).__init__(location=location, tags=tags, **kwargs) - self.plan = plan - self.hardware_profile = hardware_profile - self.storage_profile = storage_profile - self.os_profile = os_profile - self.network_profile = network_profile - self.diagnostics_profile = diagnostics_profile - self.availability_set = availability_set - self.provisioning_state = None - self.instance_view = None - self.license_type = license_type - self.vm_id = None - self.resources = None - self.identity = identity diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/virtual_machine_scale_set.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/virtual_machine_scale_set.py deleted file mode 100644 index 3cffa82b94ac..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/virtual_machine_scale_set.py +++ /dev/null @@ -1,81 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource import Resource - - -class VirtualMachineScaleSet(Resource): - """Describes a Virtual Machine Scale Set. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource Id - :vartype id: str - :ivar name: Resource name - :vartype name: str - :ivar type: Resource type - :vartype type: str - :param location: Required. Resource location - :type location: str - :param tags: Resource tags - :type tags: dict[str, str] - :param sku: The virtual machine scale set sku. - :type sku: ~azure.mgmt.compute.v2016_03_30.models.Sku - :param upgrade_policy: The upgrade policy. - :type upgrade_policy: ~azure.mgmt.compute.v2016_03_30.models.UpgradePolicy - :param virtual_machine_profile: The virtual machine profile. - :type virtual_machine_profile: - ~azure.mgmt.compute.v2016_03_30.models.VirtualMachineScaleSetVMProfile - :ivar provisioning_state: The provisioning state, which only appears in - the response. - :vartype provisioning_state: str - :param over_provision: Specifies whether the Virtual Machine Scale Set - should be overprovisioned. - :type over_provision: bool - :param identity: The identity of the virtual machine scale set, if - configured. - :type identity: - ~azure.mgmt.compute.v2016_03_30.models.VirtualMachineScaleSetIdentity - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - 'provisioning_state': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'sku': {'key': 'sku', 'type': 'Sku'}, - 'upgrade_policy': {'key': 'properties.upgradePolicy', 'type': 'UpgradePolicy'}, - 'virtual_machine_profile': {'key': 'properties.virtualMachineProfile', 'type': 'VirtualMachineScaleSetVMProfile'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'over_provision': {'key': 'properties.overProvision', 'type': 'bool'}, - 'identity': {'key': 'identity', 'type': 'VirtualMachineScaleSetIdentity'}, - } - - def __init__(self, **kwargs): - super(VirtualMachineScaleSet, self).__init__(**kwargs) - self.sku = kwargs.get('sku', None) - self.upgrade_policy = kwargs.get('upgrade_policy', None) - self.virtual_machine_profile = kwargs.get('virtual_machine_profile', None) - self.provisioning_state = None - self.over_provision = kwargs.get('over_provision', None) - self.identity = kwargs.get('identity', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/virtual_machine_scale_set_extension.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/virtual_machine_scale_set_extension.py deleted file mode 100644 index d6d8b5fbc51e..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/virtual_machine_scale_set_extension.py +++ /dev/null @@ -1,69 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .sub_resource import SubResource - - -class VirtualMachineScaleSetExtension(SubResource): - """Describes a Virtual Machine Scale Set Extension. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :param id: Resource Id - :type id: str - :param name: The name of the extension. - :type name: str - :param publisher: The name of the extension handler publisher. - :type publisher: str - :param type: The type of the extension handler. - :type type: str - :param type_handler_version: The type version of the extension handler. - :type type_handler_version: str - :param auto_upgrade_minor_version: Whether the extension handler should be - automatically upgraded across minor versions. - :type auto_upgrade_minor_version: bool - :param settings: Json formatted public settings for the extension. - :type settings: object - :param protected_settings: Json formatted protected settings for the - extension. - :type protected_settings: object - :ivar provisioning_state: The provisioning state, which only appears in - the response. - :vartype provisioning_state: str - """ - - _validation = { - 'provisioning_state': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'publisher': {'key': 'properties.publisher', 'type': 'str'}, - 'type': {'key': 'properties.type', 'type': 'str'}, - 'type_handler_version': {'key': 'properties.typeHandlerVersion', 'type': 'str'}, - 'auto_upgrade_minor_version': {'key': 'properties.autoUpgradeMinorVersion', 'type': 'bool'}, - 'settings': {'key': 'properties.settings', 'type': 'object'}, - 'protected_settings': {'key': 'properties.protectedSettings', 'type': 'object'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(VirtualMachineScaleSetExtension, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.publisher = kwargs.get('publisher', None) - self.type = kwargs.get('type', None) - self.type_handler_version = kwargs.get('type_handler_version', None) - self.auto_upgrade_minor_version = kwargs.get('auto_upgrade_minor_version', None) - self.settings = kwargs.get('settings', None) - self.protected_settings = kwargs.get('protected_settings', None) - self.provisioning_state = None diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/virtual_machine_scale_set_extension_profile.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/virtual_machine_scale_set_extension_profile.py deleted file mode 100644 index ca232d3aa7d0..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/virtual_machine_scale_set_extension_profile.py +++ /dev/null @@ -1,30 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineScaleSetExtensionProfile(Model): - """Describes a virtual machine scale set extension profile. - - :param extensions: The virtual machine scale set child extension - resources. - :type extensions: - list[~azure.mgmt.compute.v2016_03_30.models.VirtualMachineScaleSetExtension] - """ - - _attribute_map = { - 'extensions': {'key': 'extensions', 'type': '[VirtualMachineScaleSetExtension]'}, - } - - def __init__(self, **kwargs): - super(VirtualMachineScaleSetExtensionProfile, self).__init__(**kwargs) - self.extensions = kwargs.get('extensions', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/virtual_machine_scale_set_extension_profile_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/virtual_machine_scale_set_extension_profile_py3.py deleted file mode 100644 index a2e63570c6a2..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/virtual_machine_scale_set_extension_profile_py3.py +++ /dev/null @@ -1,30 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineScaleSetExtensionProfile(Model): - """Describes a virtual machine scale set extension profile. - - :param extensions: The virtual machine scale set child extension - resources. - :type extensions: - list[~azure.mgmt.compute.v2016_03_30.models.VirtualMachineScaleSetExtension] - """ - - _attribute_map = { - 'extensions': {'key': 'extensions', 'type': '[VirtualMachineScaleSetExtension]'}, - } - - def __init__(self, *, extensions=None, **kwargs) -> None: - super(VirtualMachineScaleSetExtensionProfile, self).__init__(**kwargs) - self.extensions = extensions diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/virtual_machine_scale_set_extension_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/virtual_machine_scale_set_extension_py3.py deleted file mode 100644 index 5c0ffe9af348..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/virtual_machine_scale_set_extension_py3.py +++ /dev/null @@ -1,69 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .sub_resource_py3 import SubResource - - -class VirtualMachineScaleSetExtension(SubResource): - """Describes a Virtual Machine Scale Set Extension. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :param id: Resource Id - :type id: str - :param name: The name of the extension. - :type name: str - :param publisher: The name of the extension handler publisher. - :type publisher: str - :param type: The type of the extension handler. - :type type: str - :param type_handler_version: The type version of the extension handler. - :type type_handler_version: str - :param auto_upgrade_minor_version: Whether the extension handler should be - automatically upgraded across minor versions. - :type auto_upgrade_minor_version: bool - :param settings: Json formatted public settings for the extension. - :type settings: object - :param protected_settings: Json formatted protected settings for the - extension. - :type protected_settings: object - :ivar provisioning_state: The provisioning state, which only appears in - the response. - :vartype provisioning_state: str - """ - - _validation = { - 'provisioning_state': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'publisher': {'key': 'properties.publisher', 'type': 'str'}, - 'type': {'key': 'properties.type', 'type': 'str'}, - 'type_handler_version': {'key': 'properties.typeHandlerVersion', 'type': 'str'}, - 'auto_upgrade_minor_version': {'key': 'properties.autoUpgradeMinorVersion', 'type': 'bool'}, - 'settings': {'key': 'properties.settings', 'type': 'object'}, - 'protected_settings': {'key': 'properties.protectedSettings', 'type': 'object'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - } - - def __init__(self, *, id: str=None, name: str=None, publisher: str=None, type: str=None, type_handler_version: str=None, auto_upgrade_minor_version: bool=None, settings=None, protected_settings=None, **kwargs) -> None: - super(VirtualMachineScaleSetExtension, self).__init__(id=id, **kwargs) - self.name = name - self.publisher = publisher - self.type = type - self.type_handler_version = type_handler_version - self.auto_upgrade_minor_version = auto_upgrade_minor_version - self.settings = settings - self.protected_settings = protected_settings - self.provisioning_state = None diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/virtual_machine_scale_set_identity.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/virtual_machine_scale_set_identity.py deleted file mode 100644 index 18c86a5f890d..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/virtual_machine_scale_set_identity.py +++ /dev/null @@ -1,49 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineScaleSetIdentity(Model): - """Identity for the virtual machine scale set. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar principal_id: The principal id of virtual machine scale set - identity. - :vartype principal_id: str - :ivar tenant_id: The tenant id associated with the virtual machine scale - set. - :vartype tenant_id: str - :param type: The type of identity used for the virtual machine scale set. - Currently, the only supported type is 'SystemAssigned', which implicitly - creates an identity. Possible values include: 'SystemAssigned' - :type type: str or - ~azure.mgmt.compute.v2016_03_30.models.ResourceIdentityType - """ - - _validation = { - 'principal_id': {'readonly': True}, - 'tenant_id': {'readonly': True}, - } - - _attribute_map = { - 'principal_id': {'key': 'principalId', 'type': 'str'}, - 'tenant_id': {'key': 'tenantId', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'ResourceIdentityType'}, - } - - def __init__(self, **kwargs): - super(VirtualMachineScaleSetIdentity, self).__init__(**kwargs) - self.principal_id = None - self.tenant_id = None - self.type = kwargs.get('type', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/virtual_machine_scale_set_identity_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/virtual_machine_scale_set_identity_py3.py deleted file mode 100644 index fe82aa5fe3e1..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/virtual_machine_scale_set_identity_py3.py +++ /dev/null @@ -1,49 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineScaleSetIdentity(Model): - """Identity for the virtual machine scale set. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar principal_id: The principal id of virtual machine scale set - identity. - :vartype principal_id: str - :ivar tenant_id: The tenant id associated with the virtual machine scale - set. - :vartype tenant_id: str - :param type: The type of identity used for the virtual machine scale set. - Currently, the only supported type is 'SystemAssigned', which implicitly - creates an identity. Possible values include: 'SystemAssigned' - :type type: str or - ~azure.mgmt.compute.v2016_03_30.models.ResourceIdentityType - """ - - _validation = { - 'principal_id': {'readonly': True}, - 'tenant_id': {'readonly': True}, - } - - _attribute_map = { - 'principal_id': {'key': 'principalId', 'type': 'str'}, - 'tenant_id': {'key': 'tenantId', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'ResourceIdentityType'}, - } - - def __init__(self, *, type=None, **kwargs) -> None: - super(VirtualMachineScaleSetIdentity, self).__init__(**kwargs) - self.principal_id = None - self.tenant_id = None - self.type = type diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/virtual_machine_scale_set_instance_view.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/virtual_machine_scale_set_instance_view.py deleted file mode 100644 index b53997afdf79..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/virtual_machine_scale_set_instance_view.py +++ /dev/null @@ -1,48 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineScaleSetInstanceView(Model): - """The instance view of a virtual machine scale set. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar virtual_machine: The instance view status summary for the virtual - machine scale set. - :vartype virtual_machine: - ~azure.mgmt.compute.v2016_03_30.models.VirtualMachineScaleSetInstanceViewStatusesSummary - :ivar extensions: The extensions information. - :vartype extensions: - list[~azure.mgmt.compute.v2016_03_30.models.VirtualMachineScaleSetVMExtensionsSummary] - :param statuses: The resource status information. - :type statuses: - list[~azure.mgmt.compute.v2016_03_30.models.InstanceViewStatus] - """ - - _validation = { - 'virtual_machine': {'readonly': True}, - 'extensions': {'readonly': True}, - } - - _attribute_map = { - 'virtual_machine': {'key': 'virtualMachine', 'type': 'VirtualMachineScaleSetInstanceViewStatusesSummary'}, - 'extensions': {'key': 'extensions', 'type': '[VirtualMachineScaleSetVMExtensionsSummary]'}, - 'statuses': {'key': 'statuses', 'type': '[InstanceViewStatus]'}, - } - - def __init__(self, **kwargs): - super(VirtualMachineScaleSetInstanceView, self).__init__(**kwargs) - self.virtual_machine = None - self.extensions = None - self.statuses = kwargs.get('statuses', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/virtual_machine_scale_set_instance_view_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/virtual_machine_scale_set_instance_view_py3.py deleted file mode 100644 index 26ad90384c8d..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/virtual_machine_scale_set_instance_view_py3.py +++ /dev/null @@ -1,48 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineScaleSetInstanceView(Model): - """The instance view of a virtual machine scale set. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar virtual_machine: The instance view status summary for the virtual - machine scale set. - :vartype virtual_machine: - ~azure.mgmt.compute.v2016_03_30.models.VirtualMachineScaleSetInstanceViewStatusesSummary - :ivar extensions: The extensions information. - :vartype extensions: - list[~azure.mgmt.compute.v2016_03_30.models.VirtualMachineScaleSetVMExtensionsSummary] - :param statuses: The resource status information. - :type statuses: - list[~azure.mgmt.compute.v2016_03_30.models.InstanceViewStatus] - """ - - _validation = { - 'virtual_machine': {'readonly': True}, - 'extensions': {'readonly': True}, - } - - _attribute_map = { - 'virtual_machine': {'key': 'virtualMachine', 'type': 'VirtualMachineScaleSetInstanceViewStatusesSummary'}, - 'extensions': {'key': 'extensions', 'type': '[VirtualMachineScaleSetVMExtensionsSummary]'}, - 'statuses': {'key': 'statuses', 'type': '[InstanceViewStatus]'}, - } - - def __init__(self, *, statuses=None, **kwargs) -> None: - super(VirtualMachineScaleSetInstanceView, self).__init__(**kwargs) - self.virtual_machine = None - self.extensions = None - self.statuses = statuses diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/virtual_machine_scale_set_instance_view_statuses_summary.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/virtual_machine_scale_set_instance_view_statuses_summary.py deleted file mode 100644 index a02855aae1ce..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/virtual_machine_scale_set_instance_view_statuses_summary.py +++ /dev/null @@ -1,37 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineScaleSetInstanceViewStatusesSummary(Model): - """Instance view statuses summary for virtual machines of a virtual machine - scale set. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar statuses_summary: The extensions information. - :vartype statuses_summary: - list[~azure.mgmt.compute.v2016_03_30.models.VirtualMachineStatusCodeCount] - """ - - _validation = { - 'statuses_summary': {'readonly': True}, - } - - _attribute_map = { - 'statuses_summary': {'key': 'statusesSummary', 'type': '[VirtualMachineStatusCodeCount]'}, - } - - def __init__(self, **kwargs): - super(VirtualMachineScaleSetInstanceViewStatusesSummary, self).__init__(**kwargs) - self.statuses_summary = None diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/virtual_machine_scale_set_instance_view_statuses_summary_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/virtual_machine_scale_set_instance_view_statuses_summary_py3.py deleted file mode 100644 index 0f6ca9b8d18b..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/virtual_machine_scale_set_instance_view_statuses_summary_py3.py +++ /dev/null @@ -1,37 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineScaleSetInstanceViewStatusesSummary(Model): - """Instance view statuses summary for virtual machines of a virtual machine - scale set. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar statuses_summary: The extensions information. - :vartype statuses_summary: - list[~azure.mgmt.compute.v2016_03_30.models.VirtualMachineStatusCodeCount] - """ - - _validation = { - 'statuses_summary': {'readonly': True}, - } - - _attribute_map = { - 'statuses_summary': {'key': 'statusesSummary', 'type': '[VirtualMachineStatusCodeCount]'}, - } - - def __init__(self, **kwargs) -> None: - super(VirtualMachineScaleSetInstanceViewStatusesSummary, self).__init__(**kwargs) - self.statuses_summary = None diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/virtual_machine_scale_set_ip_configuration.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/virtual_machine_scale_set_ip_configuration.py deleted file mode 100644 index ec56a9fc5174..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/virtual_machine_scale_set_ip_configuration.py +++ /dev/null @@ -1,60 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .sub_resource import SubResource - - -class VirtualMachineScaleSetIPConfiguration(SubResource): - """Describes a virtual machine scale set network profile's IP configuration. - - All required parameters must be populated in order to send to Azure. - - :param id: Resource Id - :type id: str - :param name: Required. The IP configuration name. - :type name: str - :param subnet: Required. The subnet. - :type subnet: ~azure.mgmt.compute.v2016_03_30.models.ApiEntityReference - :param application_gateway_backend_address_pools: The application gateway - backend address pools. - :type application_gateway_backend_address_pools: - list[~azure.mgmt.compute.v2016_03_30.models.SubResource] - :param load_balancer_backend_address_pools: The load balancer backend - address pools. - :type load_balancer_backend_address_pools: - list[~azure.mgmt.compute.v2016_03_30.models.SubResource] - :param load_balancer_inbound_nat_pools: The load balancer inbound nat - pools. - :type load_balancer_inbound_nat_pools: - list[~azure.mgmt.compute.v2016_03_30.models.SubResource] - """ - - _validation = { - 'name': {'required': True}, - 'subnet': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'subnet': {'key': 'properties.subnet', 'type': 'ApiEntityReference'}, - 'application_gateway_backend_address_pools': {'key': 'properties.applicationGatewayBackendAddressPools', 'type': '[SubResource]'}, - 'load_balancer_backend_address_pools': {'key': 'properties.loadBalancerBackendAddressPools', 'type': '[SubResource]'}, - 'load_balancer_inbound_nat_pools': {'key': 'properties.loadBalancerInboundNatPools', 'type': '[SubResource]'}, - } - - def __init__(self, **kwargs): - super(VirtualMachineScaleSetIPConfiguration, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.subnet = kwargs.get('subnet', None) - self.application_gateway_backend_address_pools = kwargs.get('application_gateway_backend_address_pools', None) - self.load_balancer_backend_address_pools = kwargs.get('load_balancer_backend_address_pools', None) - self.load_balancer_inbound_nat_pools = kwargs.get('load_balancer_inbound_nat_pools', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/virtual_machine_scale_set_ip_configuration_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/virtual_machine_scale_set_ip_configuration_py3.py deleted file mode 100644 index f9b9d9b3a188..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/virtual_machine_scale_set_ip_configuration_py3.py +++ /dev/null @@ -1,60 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .sub_resource_py3 import SubResource - - -class VirtualMachineScaleSetIPConfiguration(SubResource): - """Describes a virtual machine scale set network profile's IP configuration. - - All required parameters must be populated in order to send to Azure. - - :param id: Resource Id - :type id: str - :param name: Required. The IP configuration name. - :type name: str - :param subnet: Required. The subnet. - :type subnet: ~azure.mgmt.compute.v2016_03_30.models.ApiEntityReference - :param application_gateway_backend_address_pools: The application gateway - backend address pools. - :type application_gateway_backend_address_pools: - list[~azure.mgmt.compute.v2016_03_30.models.SubResource] - :param load_balancer_backend_address_pools: The load balancer backend - address pools. - :type load_balancer_backend_address_pools: - list[~azure.mgmt.compute.v2016_03_30.models.SubResource] - :param load_balancer_inbound_nat_pools: The load balancer inbound nat - pools. - :type load_balancer_inbound_nat_pools: - list[~azure.mgmt.compute.v2016_03_30.models.SubResource] - """ - - _validation = { - 'name': {'required': True}, - 'subnet': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'subnet': {'key': 'properties.subnet', 'type': 'ApiEntityReference'}, - 'application_gateway_backend_address_pools': {'key': 'properties.applicationGatewayBackendAddressPools', 'type': '[SubResource]'}, - 'load_balancer_backend_address_pools': {'key': 'properties.loadBalancerBackendAddressPools', 'type': '[SubResource]'}, - 'load_balancer_inbound_nat_pools': {'key': 'properties.loadBalancerInboundNatPools', 'type': '[SubResource]'}, - } - - def __init__(self, *, name: str, subnet, id: str=None, application_gateway_backend_address_pools=None, load_balancer_backend_address_pools=None, load_balancer_inbound_nat_pools=None, **kwargs) -> None: - super(VirtualMachineScaleSetIPConfiguration, self).__init__(id=id, **kwargs) - self.name = name - self.subnet = subnet - self.application_gateway_backend_address_pools = application_gateway_backend_address_pools - self.load_balancer_backend_address_pools = load_balancer_backend_address_pools - self.load_balancer_inbound_nat_pools = load_balancer_inbound_nat_pools diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/virtual_machine_scale_set_network_configuration.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/virtual_machine_scale_set_network_configuration.py deleted file mode 100644 index b59219ffebb9..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/virtual_machine_scale_set_network_configuration.py +++ /dev/null @@ -1,49 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .sub_resource import SubResource - - -class VirtualMachineScaleSetNetworkConfiguration(SubResource): - """Describes a virtual machine scale set network profile's network - configurations. - - All required parameters must be populated in order to send to Azure. - - :param id: Resource Id - :type id: str - :param name: Required. The network configuration name. - :type name: str - :param primary: Whether this is a primary NIC on a virtual machine. - :type primary: bool - :param ip_configurations: Required. The virtual machine scale set IP - Configuration. - :type ip_configurations: - list[~azure.mgmt.compute.v2016_03_30.models.VirtualMachineScaleSetIPConfiguration] - """ - - _validation = { - 'name': {'required': True}, - 'ip_configurations': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'primary': {'key': 'properties.primary', 'type': 'bool'}, - 'ip_configurations': {'key': 'properties.ipConfigurations', 'type': '[VirtualMachineScaleSetIPConfiguration]'}, - } - - def __init__(self, **kwargs): - super(VirtualMachineScaleSetNetworkConfiguration, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.primary = kwargs.get('primary', None) - self.ip_configurations = kwargs.get('ip_configurations', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/virtual_machine_scale_set_network_configuration_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/virtual_machine_scale_set_network_configuration_py3.py deleted file mode 100644 index 58f07fde6097..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/virtual_machine_scale_set_network_configuration_py3.py +++ /dev/null @@ -1,49 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .sub_resource_py3 import SubResource - - -class VirtualMachineScaleSetNetworkConfiguration(SubResource): - """Describes a virtual machine scale set network profile's network - configurations. - - All required parameters must be populated in order to send to Azure. - - :param id: Resource Id - :type id: str - :param name: Required. The network configuration name. - :type name: str - :param primary: Whether this is a primary NIC on a virtual machine. - :type primary: bool - :param ip_configurations: Required. The virtual machine scale set IP - Configuration. - :type ip_configurations: - list[~azure.mgmt.compute.v2016_03_30.models.VirtualMachineScaleSetIPConfiguration] - """ - - _validation = { - 'name': {'required': True}, - 'ip_configurations': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'primary': {'key': 'properties.primary', 'type': 'bool'}, - 'ip_configurations': {'key': 'properties.ipConfigurations', 'type': '[VirtualMachineScaleSetIPConfiguration]'}, - } - - def __init__(self, *, name: str, ip_configurations, id: str=None, primary: bool=None, **kwargs) -> None: - super(VirtualMachineScaleSetNetworkConfiguration, self).__init__(id=id, **kwargs) - self.name = name - self.primary = primary - self.ip_configurations = ip_configurations diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/virtual_machine_scale_set_network_profile.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/virtual_machine_scale_set_network_profile.py deleted file mode 100644 index 66972cf23634..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/virtual_machine_scale_set_network_profile.py +++ /dev/null @@ -1,30 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineScaleSetNetworkProfile(Model): - """Describes a virtual machine scale set network profile. - - :param network_interface_configurations: The list of network - configurations. - :type network_interface_configurations: - list[~azure.mgmt.compute.v2016_03_30.models.VirtualMachineScaleSetNetworkConfiguration] - """ - - _attribute_map = { - 'network_interface_configurations': {'key': 'networkInterfaceConfigurations', 'type': '[VirtualMachineScaleSetNetworkConfiguration]'}, - } - - def __init__(self, **kwargs): - super(VirtualMachineScaleSetNetworkProfile, self).__init__(**kwargs) - self.network_interface_configurations = kwargs.get('network_interface_configurations', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/virtual_machine_scale_set_network_profile_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/virtual_machine_scale_set_network_profile_py3.py deleted file mode 100644 index f4803bf1c4b1..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/virtual_machine_scale_set_network_profile_py3.py +++ /dev/null @@ -1,30 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineScaleSetNetworkProfile(Model): - """Describes a virtual machine scale set network profile. - - :param network_interface_configurations: The list of network - configurations. - :type network_interface_configurations: - list[~azure.mgmt.compute.v2016_03_30.models.VirtualMachineScaleSetNetworkConfiguration] - """ - - _attribute_map = { - 'network_interface_configurations': {'key': 'networkInterfaceConfigurations', 'type': '[VirtualMachineScaleSetNetworkConfiguration]'}, - } - - def __init__(self, *, network_interface_configurations=None, **kwargs) -> None: - super(VirtualMachineScaleSetNetworkProfile, self).__init__(**kwargs) - self.network_interface_configurations = network_interface_configurations diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/virtual_machine_scale_set_os_disk.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/virtual_machine_scale_set_os_disk.py deleted file mode 100644 index d46a87626736..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/virtual_machine_scale_set_os_disk.py +++ /dev/null @@ -1,71 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineScaleSetOSDisk(Model): - """Describes a virtual machine scale set operating system disk. - - All required parameters must be populated in order to send to Azure. - - :param name: Required. The disk name. - :type name: str - :param caching: Specifies the caching requirements.

    Possible - values are:

    **None**

    **ReadOnly**

    **ReadWrite** -

    Default: **None for Standard storage. ReadOnly for Premium - storage**. Possible values include: 'None', 'ReadOnly', 'ReadWrite' - :type caching: str or ~azure.mgmt.compute.v2016_03_30.models.CachingTypes - :param create_option: Required. Specifies how the virtual machines in the - scale set should be created.

    The only allowed value is: - **FromImage** \\u2013 This value is used when you are using an image to - create the virtual machine. If you are using a platform image, you also - use the imageReference element described above. If you are using a - marketplace image, you also use the plan element previously described. - Possible values include: 'FromImage', 'Empty', 'Attach' - :type create_option: str or - ~azure.mgmt.compute.v2016_03_30.models.DiskCreateOptionTypes - :param os_type: This property allows you to specify the type of the OS - that is included in the disk if creating a VM from user-image or a - specialized VHD.

    Possible values are:

    **Windows** -

    **Linux**. Possible values include: 'Windows', 'Linux' - :type os_type: str or - ~azure.mgmt.compute.v2016_03_30.models.OperatingSystemTypes - :param image: The Source User Image VirtualHardDisk. This VirtualHardDisk - will be copied before using it to attach to the Virtual Machine. If - SourceImage is provided, the destination VirtualHardDisk should not exist. - :type image: ~azure.mgmt.compute.v2016_03_30.models.VirtualHardDisk - :param vhd_containers: The list of virtual hard disk container uris. - :type vhd_containers: list[str] - """ - - _validation = { - 'name': {'required': True}, - 'create_option': {'required': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'caching': {'key': 'caching', 'type': 'CachingTypes'}, - 'create_option': {'key': 'createOption', 'type': 'DiskCreateOptionTypes'}, - 'os_type': {'key': 'osType', 'type': 'OperatingSystemTypes'}, - 'image': {'key': 'image', 'type': 'VirtualHardDisk'}, - 'vhd_containers': {'key': 'vhdContainers', 'type': '[str]'}, - } - - def __init__(self, **kwargs): - super(VirtualMachineScaleSetOSDisk, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.caching = kwargs.get('caching', None) - self.create_option = kwargs.get('create_option', None) - self.os_type = kwargs.get('os_type', None) - self.image = kwargs.get('image', None) - self.vhd_containers = kwargs.get('vhd_containers', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/virtual_machine_scale_set_os_disk_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/virtual_machine_scale_set_os_disk_py3.py deleted file mode 100644 index b15221f79080..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/virtual_machine_scale_set_os_disk_py3.py +++ /dev/null @@ -1,71 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineScaleSetOSDisk(Model): - """Describes a virtual machine scale set operating system disk. - - All required parameters must be populated in order to send to Azure. - - :param name: Required. The disk name. - :type name: str - :param caching: Specifies the caching requirements.

    Possible - values are:

    **None**

    **ReadOnly**

    **ReadWrite** -

    Default: **None for Standard storage. ReadOnly for Premium - storage**. Possible values include: 'None', 'ReadOnly', 'ReadWrite' - :type caching: str or ~azure.mgmt.compute.v2016_03_30.models.CachingTypes - :param create_option: Required. Specifies how the virtual machines in the - scale set should be created.

    The only allowed value is: - **FromImage** \\u2013 This value is used when you are using an image to - create the virtual machine. If you are using a platform image, you also - use the imageReference element described above. If you are using a - marketplace image, you also use the plan element previously described. - Possible values include: 'FromImage', 'Empty', 'Attach' - :type create_option: str or - ~azure.mgmt.compute.v2016_03_30.models.DiskCreateOptionTypes - :param os_type: This property allows you to specify the type of the OS - that is included in the disk if creating a VM from user-image or a - specialized VHD.

    Possible values are:

    **Windows** -

    **Linux**. Possible values include: 'Windows', 'Linux' - :type os_type: str or - ~azure.mgmt.compute.v2016_03_30.models.OperatingSystemTypes - :param image: The Source User Image VirtualHardDisk. This VirtualHardDisk - will be copied before using it to attach to the Virtual Machine. If - SourceImage is provided, the destination VirtualHardDisk should not exist. - :type image: ~azure.mgmt.compute.v2016_03_30.models.VirtualHardDisk - :param vhd_containers: The list of virtual hard disk container uris. - :type vhd_containers: list[str] - """ - - _validation = { - 'name': {'required': True}, - 'create_option': {'required': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'caching': {'key': 'caching', 'type': 'CachingTypes'}, - 'create_option': {'key': 'createOption', 'type': 'DiskCreateOptionTypes'}, - 'os_type': {'key': 'osType', 'type': 'OperatingSystemTypes'}, - 'image': {'key': 'image', 'type': 'VirtualHardDisk'}, - 'vhd_containers': {'key': 'vhdContainers', 'type': '[str]'}, - } - - def __init__(self, *, name: str, create_option, caching=None, os_type=None, image=None, vhd_containers=None, **kwargs) -> None: - super(VirtualMachineScaleSetOSDisk, self).__init__(**kwargs) - self.name = name - self.caching = caching - self.create_option = create_option - self.os_type = os_type - self.image = image - self.vhd_containers = vhd_containers diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/virtual_machine_scale_set_os_profile.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/virtual_machine_scale_set_os_profile.py deleted file mode 100644 index efdda7ad7bb3..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/virtual_machine_scale_set_os_profile.py +++ /dev/null @@ -1,84 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineScaleSetOSProfile(Model): - """Describes a virtual machine scale set OS profile. - - :param computer_name_prefix: Specifies the computer name prefix for all of - the virtual machines in the scale set. Computer name prefixes must be 1 to - 15 characters long. - :type computer_name_prefix: str - :param admin_username: Specifies the name of the administrator account. -

    **Windows-only restriction:** Cannot end in "."

    - **Disallowed values:** "administrator", "admin", "user", "user1", "test", - "user2", "test1", "user3", "admin1", "1", "123", "a", "actuser", "adm", - "admin2", "aspnet", "backup", "console", "david", "guest", "john", - "owner", "root", "server", "sql", "support", "support_388945a0", "sys", - "test2", "test3", "user4", "user5".

    **Minimum-length (Linux):** 1 - character

    **Max-length (Linux):** 64 characters

    - **Max-length (Windows):** 20 characters

  • For root access to - the Linux VM, see [Using root privileges on Linux virtual machines in - Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-use-root-privileges?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json)
  • - For a list of built-in system users on Linux that should not be used in - this field, see [Selecting User Names for Linux on - Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-usernames?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json) - :type admin_username: str - :param admin_password: Specifies the password of the administrator - account.

    **Minimum-length (Windows):** 8 characters

    - **Minimum-length (Linux):** 6 characters

    **Max-length - (Windows):** 123 characters

    **Max-length (Linux):** 72 characters -

    **Complexity requirements:** 3 out of 4 conditions below need to - be fulfilled
    Has lower characters
    Has upper characters
    Has a - digit
    Has a special character (Regex match [\\W_])

    - **Disallowed values:** "abc@123", "P@$$w0rd", "P@ssw0rd", "P@ssword123", - "Pa$$word", "pass@word1", "Password!", "Password1", "Password22", - "iloveyou!"

    For resetting the password, see [How to reset the - Remote Desktop service or its login password in a Windows - VM](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-reset-rdp?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json) -

    For resetting root password, see [Manage users, SSH, and check or - repair disks on Azure Linux VMs using the VMAccess - Extension](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-using-vmaccess-extension?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json#reset-root-password) - :type admin_password: str - :param custom_data: A base-64 encoded string of custom data. - :type custom_data: str - :param windows_configuration: The Windows Configuration of the OS profile. - :type windows_configuration: - ~azure.mgmt.compute.v2016_03_30.models.WindowsConfiguration - :param linux_configuration: The Linux Configuration of the OS profile. - :type linux_configuration: - ~azure.mgmt.compute.v2016_03_30.models.LinuxConfiguration - :param secrets: The List of certificates for addition to the VM. - :type secrets: - list[~azure.mgmt.compute.v2016_03_30.models.VaultSecretGroup] - """ - - _attribute_map = { - 'computer_name_prefix': {'key': 'computerNamePrefix', 'type': 'str'}, - 'admin_username': {'key': 'adminUsername', 'type': 'str'}, - 'admin_password': {'key': 'adminPassword', 'type': 'str'}, - 'custom_data': {'key': 'customData', 'type': 'str'}, - 'windows_configuration': {'key': 'windowsConfiguration', 'type': 'WindowsConfiguration'}, - 'linux_configuration': {'key': 'linuxConfiguration', 'type': 'LinuxConfiguration'}, - 'secrets': {'key': 'secrets', 'type': '[VaultSecretGroup]'}, - } - - def __init__(self, **kwargs): - super(VirtualMachineScaleSetOSProfile, self).__init__(**kwargs) - self.computer_name_prefix = kwargs.get('computer_name_prefix', None) - self.admin_username = kwargs.get('admin_username', None) - self.admin_password = kwargs.get('admin_password', None) - self.custom_data = kwargs.get('custom_data', None) - self.windows_configuration = kwargs.get('windows_configuration', None) - self.linux_configuration = kwargs.get('linux_configuration', None) - self.secrets = kwargs.get('secrets', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/virtual_machine_scale_set_os_profile_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/virtual_machine_scale_set_os_profile_py3.py deleted file mode 100644 index 6ee3b78e7df4..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/virtual_machine_scale_set_os_profile_py3.py +++ /dev/null @@ -1,84 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineScaleSetOSProfile(Model): - """Describes a virtual machine scale set OS profile. - - :param computer_name_prefix: Specifies the computer name prefix for all of - the virtual machines in the scale set. Computer name prefixes must be 1 to - 15 characters long. - :type computer_name_prefix: str - :param admin_username: Specifies the name of the administrator account. -

    **Windows-only restriction:** Cannot end in "."

    - **Disallowed values:** "administrator", "admin", "user", "user1", "test", - "user2", "test1", "user3", "admin1", "1", "123", "a", "actuser", "adm", - "admin2", "aspnet", "backup", "console", "david", "guest", "john", - "owner", "root", "server", "sql", "support", "support_388945a0", "sys", - "test2", "test3", "user4", "user5".

    **Minimum-length (Linux):** 1 - character

    **Max-length (Linux):** 64 characters

    - **Max-length (Windows):** 20 characters

  • For root access to - the Linux VM, see [Using root privileges on Linux virtual machines in - Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-use-root-privileges?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json)
  • - For a list of built-in system users on Linux that should not be used in - this field, see [Selecting User Names for Linux on - Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-usernames?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json) - :type admin_username: str - :param admin_password: Specifies the password of the administrator - account.

    **Minimum-length (Windows):** 8 characters

    - **Minimum-length (Linux):** 6 characters

    **Max-length - (Windows):** 123 characters

    **Max-length (Linux):** 72 characters -

    **Complexity requirements:** 3 out of 4 conditions below need to - be fulfilled
    Has lower characters
    Has upper characters
    Has a - digit
    Has a special character (Regex match [\\W_])

    - **Disallowed values:** "abc@123", "P@$$w0rd", "P@ssw0rd", "P@ssword123", - "Pa$$word", "pass@word1", "Password!", "Password1", "Password22", - "iloveyou!"

    For resetting the password, see [How to reset the - Remote Desktop service or its login password in a Windows - VM](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-reset-rdp?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json) -

    For resetting root password, see [Manage users, SSH, and check or - repair disks on Azure Linux VMs using the VMAccess - Extension](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-using-vmaccess-extension?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json#reset-root-password) - :type admin_password: str - :param custom_data: A base-64 encoded string of custom data. - :type custom_data: str - :param windows_configuration: The Windows Configuration of the OS profile. - :type windows_configuration: - ~azure.mgmt.compute.v2016_03_30.models.WindowsConfiguration - :param linux_configuration: The Linux Configuration of the OS profile. - :type linux_configuration: - ~azure.mgmt.compute.v2016_03_30.models.LinuxConfiguration - :param secrets: The List of certificates for addition to the VM. - :type secrets: - list[~azure.mgmt.compute.v2016_03_30.models.VaultSecretGroup] - """ - - _attribute_map = { - 'computer_name_prefix': {'key': 'computerNamePrefix', 'type': 'str'}, - 'admin_username': {'key': 'adminUsername', 'type': 'str'}, - 'admin_password': {'key': 'adminPassword', 'type': 'str'}, - 'custom_data': {'key': 'customData', 'type': 'str'}, - 'windows_configuration': {'key': 'windowsConfiguration', 'type': 'WindowsConfiguration'}, - 'linux_configuration': {'key': 'linuxConfiguration', 'type': 'LinuxConfiguration'}, - 'secrets': {'key': 'secrets', 'type': '[VaultSecretGroup]'}, - } - - def __init__(self, *, computer_name_prefix: str=None, admin_username: str=None, admin_password: str=None, custom_data: str=None, windows_configuration=None, linux_configuration=None, secrets=None, **kwargs) -> None: - super(VirtualMachineScaleSetOSProfile, self).__init__(**kwargs) - self.computer_name_prefix = computer_name_prefix - self.admin_username = admin_username - self.admin_password = admin_password - self.custom_data = custom_data - self.windows_configuration = windows_configuration - self.linux_configuration = linux_configuration - self.secrets = secrets diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/virtual_machine_scale_set_paged.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/virtual_machine_scale_set_paged.py deleted file mode 100644 index 0dc81ed7a8c2..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/virtual_machine_scale_set_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class VirtualMachineScaleSetPaged(Paged): - """ - A paging container for iterating over a list of :class:`VirtualMachineScaleSet ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[VirtualMachineScaleSet]'} - } - - def __init__(self, *args, **kwargs): - - super(VirtualMachineScaleSetPaged, self).__init__(*args, **kwargs) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/virtual_machine_scale_set_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/virtual_machine_scale_set_py3.py deleted file mode 100644 index fcca789186fa..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/virtual_machine_scale_set_py3.py +++ /dev/null @@ -1,81 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource_py3 import Resource - - -class VirtualMachineScaleSet(Resource): - """Describes a Virtual Machine Scale Set. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource Id - :vartype id: str - :ivar name: Resource name - :vartype name: str - :ivar type: Resource type - :vartype type: str - :param location: Required. Resource location - :type location: str - :param tags: Resource tags - :type tags: dict[str, str] - :param sku: The virtual machine scale set sku. - :type sku: ~azure.mgmt.compute.v2016_03_30.models.Sku - :param upgrade_policy: The upgrade policy. - :type upgrade_policy: ~azure.mgmt.compute.v2016_03_30.models.UpgradePolicy - :param virtual_machine_profile: The virtual machine profile. - :type virtual_machine_profile: - ~azure.mgmt.compute.v2016_03_30.models.VirtualMachineScaleSetVMProfile - :ivar provisioning_state: The provisioning state, which only appears in - the response. - :vartype provisioning_state: str - :param over_provision: Specifies whether the Virtual Machine Scale Set - should be overprovisioned. - :type over_provision: bool - :param identity: The identity of the virtual machine scale set, if - configured. - :type identity: - ~azure.mgmt.compute.v2016_03_30.models.VirtualMachineScaleSetIdentity - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - 'provisioning_state': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'sku': {'key': 'sku', 'type': 'Sku'}, - 'upgrade_policy': {'key': 'properties.upgradePolicy', 'type': 'UpgradePolicy'}, - 'virtual_machine_profile': {'key': 'properties.virtualMachineProfile', 'type': 'VirtualMachineScaleSetVMProfile'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'over_provision': {'key': 'properties.overProvision', 'type': 'bool'}, - 'identity': {'key': 'identity', 'type': 'VirtualMachineScaleSetIdentity'}, - } - - def __init__(self, *, location: str, tags=None, sku=None, upgrade_policy=None, virtual_machine_profile=None, over_provision: bool=None, identity=None, **kwargs) -> None: - super(VirtualMachineScaleSet, self).__init__(location=location, tags=tags, **kwargs) - self.sku = sku - self.upgrade_policy = upgrade_policy - self.virtual_machine_profile = virtual_machine_profile - self.provisioning_state = None - self.over_provision = over_provision - self.identity = identity diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/virtual_machine_scale_set_sku.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/virtual_machine_scale_set_sku.py deleted file mode 100644 index 7870d03c9144..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/virtual_machine_scale_set_sku.py +++ /dev/null @@ -1,46 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineScaleSetSku(Model): - """Describes an available virtual machine scale set sku. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar resource_type: The type of resource the sku applies to. - :vartype resource_type: str - :ivar sku: The Sku. - :vartype sku: ~azure.mgmt.compute.v2016_03_30.models.Sku - :ivar capacity: Specifies the number of virtual machines in the scale set. - :vartype capacity: - ~azure.mgmt.compute.v2016_03_30.models.VirtualMachineScaleSetSkuCapacity - """ - - _validation = { - 'resource_type': {'readonly': True}, - 'sku': {'readonly': True}, - 'capacity': {'readonly': True}, - } - - _attribute_map = { - 'resource_type': {'key': 'resourceType', 'type': 'str'}, - 'sku': {'key': 'sku', 'type': 'Sku'}, - 'capacity': {'key': 'capacity', 'type': 'VirtualMachineScaleSetSkuCapacity'}, - } - - def __init__(self, **kwargs): - super(VirtualMachineScaleSetSku, self).__init__(**kwargs) - self.resource_type = None - self.sku = None - self.capacity = None diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/virtual_machine_scale_set_sku_capacity.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/virtual_machine_scale_set_sku_capacity.py deleted file mode 100644 index fd3c4449f76b..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/virtual_machine_scale_set_sku_capacity.py +++ /dev/null @@ -1,52 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineScaleSetSkuCapacity(Model): - """Describes scaling information of a sku. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar minimum: The minimum capacity. - :vartype minimum: long - :ivar maximum: The maximum capacity that can be set. - :vartype maximum: long - :ivar default_capacity: The default capacity. - :vartype default_capacity: long - :ivar scale_type: The scale type applicable to the sku. Possible values - include: 'Automatic', 'None' - :vartype scale_type: str or - ~azure.mgmt.compute.v2016_03_30.models.VirtualMachineScaleSetSkuScaleType - """ - - _validation = { - 'minimum': {'readonly': True}, - 'maximum': {'readonly': True}, - 'default_capacity': {'readonly': True}, - 'scale_type': {'readonly': True}, - } - - _attribute_map = { - 'minimum': {'key': 'minimum', 'type': 'long'}, - 'maximum': {'key': 'maximum', 'type': 'long'}, - 'default_capacity': {'key': 'defaultCapacity', 'type': 'long'}, - 'scale_type': {'key': 'scaleType', 'type': 'VirtualMachineScaleSetSkuScaleType'}, - } - - def __init__(self, **kwargs): - super(VirtualMachineScaleSetSkuCapacity, self).__init__(**kwargs) - self.minimum = None - self.maximum = None - self.default_capacity = None - self.scale_type = None diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/virtual_machine_scale_set_sku_capacity_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/virtual_machine_scale_set_sku_capacity_py3.py deleted file mode 100644 index f69668581e71..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/virtual_machine_scale_set_sku_capacity_py3.py +++ /dev/null @@ -1,52 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineScaleSetSkuCapacity(Model): - """Describes scaling information of a sku. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar minimum: The minimum capacity. - :vartype minimum: long - :ivar maximum: The maximum capacity that can be set. - :vartype maximum: long - :ivar default_capacity: The default capacity. - :vartype default_capacity: long - :ivar scale_type: The scale type applicable to the sku. Possible values - include: 'Automatic', 'None' - :vartype scale_type: str or - ~azure.mgmt.compute.v2016_03_30.models.VirtualMachineScaleSetSkuScaleType - """ - - _validation = { - 'minimum': {'readonly': True}, - 'maximum': {'readonly': True}, - 'default_capacity': {'readonly': True}, - 'scale_type': {'readonly': True}, - } - - _attribute_map = { - 'minimum': {'key': 'minimum', 'type': 'long'}, - 'maximum': {'key': 'maximum', 'type': 'long'}, - 'default_capacity': {'key': 'defaultCapacity', 'type': 'long'}, - 'scale_type': {'key': 'scaleType', 'type': 'VirtualMachineScaleSetSkuScaleType'}, - } - - def __init__(self, **kwargs) -> None: - super(VirtualMachineScaleSetSkuCapacity, self).__init__(**kwargs) - self.minimum = None - self.maximum = None - self.default_capacity = None - self.scale_type = None diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/virtual_machine_scale_set_sku_paged.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/virtual_machine_scale_set_sku_paged.py deleted file mode 100644 index 8fd30d064b88..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/virtual_machine_scale_set_sku_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class VirtualMachineScaleSetSkuPaged(Paged): - """ - A paging container for iterating over a list of :class:`VirtualMachineScaleSetSku ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[VirtualMachineScaleSetSku]'} - } - - def __init__(self, *args, **kwargs): - - super(VirtualMachineScaleSetSkuPaged, self).__init__(*args, **kwargs) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/virtual_machine_scale_set_sku_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/virtual_machine_scale_set_sku_py3.py deleted file mode 100644 index 8bab11cf5910..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/virtual_machine_scale_set_sku_py3.py +++ /dev/null @@ -1,46 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineScaleSetSku(Model): - """Describes an available virtual machine scale set sku. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar resource_type: The type of resource the sku applies to. - :vartype resource_type: str - :ivar sku: The Sku. - :vartype sku: ~azure.mgmt.compute.v2016_03_30.models.Sku - :ivar capacity: Specifies the number of virtual machines in the scale set. - :vartype capacity: - ~azure.mgmt.compute.v2016_03_30.models.VirtualMachineScaleSetSkuCapacity - """ - - _validation = { - 'resource_type': {'readonly': True}, - 'sku': {'readonly': True}, - 'capacity': {'readonly': True}, - } - - _attribute_map = { - 'resource_type': {'key': 'resourceType', 'type': 'str'}, - 'sku': {'key': 'sku', 'type': 'Sku'}, - 'capacity': {'key': 'capacity', 'type': 'VirtualMachineScaleSetSkuCapacity'}, - } - - def __init__(self, **kwargs) -> None: - super(VirtualMachineScaleSetSku, self).__init__(**kwargs) - self.resource_type = None - self.sku = None - self.capacity = None diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/virtual_machine_scale_set_storage_profile.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/virtual_machine_scale_set_storage_profile.py deleted file mode 100644 index ec2bc832d477..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/virtual_machine_scale_set_storage_profile.py +++ /dev/null @@ -1,34 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineScaleSetStorageProfile(Model): - """Describes a virtual machine scale set storage profile. - - :param image_reference: The image reference. - :type image_reference: - ~azure.mgmt.compute.v2016_03_30.models.ImageReference - :param os_disk: The OS disk. - :type os_disk: - ~azure.mgmt.compute.v2016_03_30.models.VirtualMachineScaleSetOSDisk - """ - - _attribute_map = { - 'image_reference': {'key': 'imageReference', 'type': 'ImageReference'}, - 'os_disk': {'key': 'osDisk', 'type': 'VirtualMachineScaleSetOSDisk'}, - } - - def __init__(self, **kwargs): - super(VirtualMachineScaleSetStorageProfile, self).__init__(**kwargs) - self.image_reference = kwargs.get('image_reference', None) - self.os_disk = kwargs.get('os_disk', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/virtual_machine_scale_set_storage_profile_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/virtual_machine_scale_set_storage_profile_py3.py deleted file mode 100644 index 01272beb4a42..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/virtual_machine_scale_set_storage_profile_py3.py +++ /dev/null @@ -1,34 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineScaleSetStorageProfile(Model): - """Describes a virtual machine scale set storage profile. - - :param image_reference: The image reference. - :type image_reference: - ~azure.mgmt.compute.v2016_03_30.models.ImageReference - :param os_disk: The OS disk. - :type os_disk: - ~azure.mgmt.compute.v2016_03_30.models.VirtualMachineScaleSetOSDisk - """ - - _attribute_map = { - 'image_reference': {'key': 'imageReference', 'type': 'ImageReference'}, - 'os_disk': {'key': 'osDisk', 'type': 'VirtualMachineScaleSetOSDisk'}, - } - - def __init__(self, *, image_reference=None, os_disk=None, **kwargs) -> None: - super(VirtualMachineScaleSetStorageProfile, self).__init__(**kwargs) - self.image_reference = image_reference - self.os_disk = os_disk diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/virtual_machine_scale_set_vm.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/virtual_machine_scale_set_vm.py deleted file mode 100644 index 42e46fc88ea2..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/virtual_machine_scale_set_vm.py +++ /dev/null @@ -1,155 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource import Resource - - -class VirtualMachineScaleSetVM(Resource): - """Describes a virtual machine scale set virtual machine. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource Id - :vartype id: str - :ivar name: Resource name - :vartype name: str - :ivar type: Resource type - :vartype type: str - :param location: Required. Resource location - :type location: str - :param tags: Resource tags - :type tags: dict[str, str] - :ivar instance_id: The virtual machine instance ID. - :vartype instance_id: str - :ivar sku: The virtual machine SKU. - :vartype sku: ~azure.mgmt.compute.v2016_03_30.models.Sku - :ivar latest_model_applied: Specifies whether the latest model has been - applied to the virtual machine. - :vartype latest_model_applied: bool - :ivar vm_id: Azure VM unique ID. - :vartype vm_id: str - :ivar instance_view: The virtual machine instance view. - :vartype instance_view: - ~azure.mgmt.compute.v2016_03_30.models.VirtualMachineScaleSetVMInstanceView - :param hardware_profile: Specifies the hardware settings for the virtual - machine. - :type hardware_profile: - ~azure.mgmt.compute.v2016_03_30.models.HardwareProfile - :param storage_profile: Specifies the storage settings for the virtual - machine disks. - :type storage_profile: - ~azure.mgmt.compute.v2016_03_30.models.StorageProfile - :param os_profile: Specifies the operating system settings for the virtual - machine. - :type os_profile: ~azure.mgmt.compute.v2016_03_30.models.OSProfile - :param network_profile: Specifies the network interfaces of the virtual - machine. - :type network_profile: - ~azure.mgmt.compute.v2016_03_30.models.NetworkProfile - :param diagnostics_profile: Specifies the boot diagnostic settings state. -

    Minimum api-version: 2015-06-15. - :type diagnostics_profile: - ~azure.mgmt.compute.v2016_03_30.models.DiagnosticsProfile - :param availability_set: Specifies information about the availability set - that the virtual machine should be assigned to. Virtual machines specified - in the same availability set are allocated to different nodes to maximize - availability. For more information about availability sets, see [Manage - the availability of virtual - machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-manage-availability?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). -

    For more information on Azure planned maintenance, see [Planned - maintenance for virtual machines in - Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-planned-maintenance?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json) -

    Currently, a VM can only be added to availability set at creation - time. An existing VM cannot be added to an availability set. - :type availability_set: ~azure.mgmt.compute.v2016_03_30.models.SubResource - :ivar provisioning_state: The provisioning state, which only appears in - the response. - :vartype provisioning_state: str - :param license_type: Specifies that the image or disk that is being used - was licensed on-premises. This element is only used for images that - contain the Windows Server operating system.

    Possible values are: -

    Windows_Client

    Windows_Server

    If this element - is included in a request for an update, the value must match the initial - value. This value cannot be updated.

    For more information, see - [Azure Hybrid Use Benefit for Windows - Server](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-hybrid-use-benefit-licensing?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json) -

    Minimum api-version: 2015-06-15 - :type license_type: str - :param plan: Specifies information about the marketplace image used to - create the virtual machine. This element is only used for marketplace - images. Before you can use a marketplace image from an API, you must - enable the image for programmatic use. In the Azure portal, find the - marketplace image that you want to use and then click **Want to deploy - programmatically, Get Started ->**. Enter any required information and - then click **Save**. - :type plan: ~azure.mgmt.compute.v2016_03_30.models.Plan - :ivar resources: The virtual machine child extension resources. - :vartype resources: - list[~azure.mgmt.compute.v2016_03_30.models.VirtualMachineExtension] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - 'instance_id': {'readonly': True}, - 'sku': {'readonly': True}, - 'latest_model_applied': {'readonly': True}, - 'vm_id': {'readonly': True}, - 'instance_view': {'readonly': True}, - 'provisioning_state': {'readonly': True}, - 'resources': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'instance_id': {'key': 'instanceId', 'type': 'str'}, - 'sku': {'key': 'sku', 'type': 'Sku'}, - 'latest_model_applied': {'key': 'properties.latestModelApplied', 'type': 'bool'}, - 'vm_id': {'key': 'properties.vmId', 'type': 'str'}, - 'instance_view': {'key': 'properties.instanceView', 'type': 'VirtualMachineScaleSetVMInstanceView'}, - 'hardware_profile': {'key': 'properties.hardwareProfile', 'type': 'HardwareProfile'}, - 'storage_profile': {'key': 'properties.storageProfile', 'type': 'StorageProfile'}, - 'os_profile': {'key': 'properties.osProfile', 'type': 'OSProfile'}, - 'network_profile': {'key': 'properties.networkProfile', 'type': 'NetworkProfile'}, - 'diagnostics_profile': {'key': 'properties.diagnosticsProfile', 'type': 'DiagnosticsProfile'}, - 'availability_set': {'key': 'properties.availabilitySet', 'type': 'SubResource'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'license_type': {'key': 'properties.licenseType', 'type': 'str'}, - 'plan': {'key': 'plan', 'type': 'Plan'}, - 'resources': {'key': 'resources', 'type': '[VirtualMachineExtension]'}, - } - - def __init__(self, **kwargs): - super(VirtualMachineScaleSetVM, self).__init__(**kwargs) - self.instance_id = None - self.sku = None - self.latest_model_applied = None - self.vm_id = None - self.instance_view = None - self.hardware_profile = kwargs.get('hardware_profile', None) - self.storage_profile = kwargs.get('storage_profile', None) - self.os_profile = kwargs.get('os_profile', None) - self.network_profile = kwargs.get('network_profile', None) - self.diagnostics_profile = kwargs.get('diagnostics_profile', None) - self.availability_set = kwargs.get('availability_set', None) - self.provisioning_state = None - self.license_type = kwargs.get('license_type', None) - self.plan = kwargs.get('plan', None) - self.resources = None diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/virtual_machine_scale_set_vm_extensions_summary.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/virtual_machine_scale_set_vm_extensions_summary.py deleted file mode 100644 index a67869d9af84..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/virtual_machine_scale_set_vm_extensions_summary.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineScaleSetVMExtensionsSummary(Model): - """Extensions summary for virtual machines of a virtual machine scale set. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar name: The extension name. - :vartype name: str - :ivar statuses_summary: The extensions information. - :vartype statuses_summary: - list[~azure.mgmt.compute.v2016_03_30.models.VirtualMachineStatusCodeCount] - """ - - _validation = { - 'name': {'readonly': True}, - 'statuses_summary': {'readonly': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'statuses_summary': {'key': 'statusesSummary', 'type': '[VirtualMachineStatusCodeCount]'}, - } - - def __init__(self, **kwargs): - super(VirtualMachineScaleSetVMExtensionsSummary, self).__init__(**kwargs) - self.name = None - self.statuses_summary = None diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/virtual_machine_scale_set_vm_extensions_summary_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/virtual_machine_scale_set_vm_extensions_summary_py3.py deleted file mode 100644 index fe4804644f68..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/virtual_machine_scale_set_vm_extensions_summary_py3.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineScaleSetVMExtensionsSummary(Model): - """Extensions summary for virtual machines of a virtual machine scale set. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar name: The extension name. - :vartype name: str - :ivar statuses_summary: The extensions information. - :vartype statuses_summary: - list[~azure.mgmt.compute.v2016_03_30.models.VirtualMachineStatusCodeCount] - """ - - _validation = { - 'name': {'readonly': True}, - 'statuses_summary': {'readonly': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'statuses_summary': {'key': 'statusesSummary', 'type': '[VirtualMachineStatusCodeCount]'}, - } - - def __init__(self, **kwargs) -> None: - super(VirtualMachineScaleSetVMExtensionsSummary, self).__init__(**kwargs) - self.name = None - self.statuses_summary = None diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/virtual_machine_scale_set_vm_instance_ids.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/virtual_machine_scale_set_vm_instance_ids.py deleted file mode 100644 index 772c66dad326..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/virtual_machine_scale_set_vm_instance_ids.py +++ /dev/null @@ -1,30 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineScaleSetVMInstanceIDs(Model): - """Specifies a list of virtual machine instance IDs from the VM scale set. - - :param instance_ids: The virtual machine scale set instance ids. Omitting - the virtual machine scale set instance ids will result in the operation - being performed on all virtual machines in the virtual machine scale set. - :type instance_ids: list[str] - """ - - _attribute_map = { - 'instance_ids': {'key': 'instanceIds', 'type': '[str]'}, - } - - def __init__(self, **kwargs): - super(VirtualMachineScaleSetVMInstanceIDs, self).__init__(**kwargs) - self.instance_ids = kwargs.get('instance_ids', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/virtual_machine_scale_set_vm_instance_ids_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/virtual_machine_scale_set_vm_instance_ids_py3.py deleted file mode 100644 index 658a8ccb87d5..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/virtual_machine_scale_set_vm_instance_ids_py3.py +++ /dev/null @@ -1,30 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineScaleSetVMInstanceIDs(Model): - """Specifies a list of virtual machine instance IDs from the VM scale set. - - :param instance_ids: The virtual machine scale set instance ids. Omitting - the virtual machine scale set instance ids will result in the operation - being performed on all virtual machines in the virtual machine scale set. - :type instance_ids: list[str] - """ - - _attribute_map = { - 'instance_ids': {'key': 'instanceIds', 'type': '[str]'}, - } - - def __init__(self, *, instance_ids=None, **kwargs) -> None: - super(VirtualMachineScaleSetVMInstanceIDs, self).__init__(**kwargs) - self.instance_ids = instance_ids diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/virtual_machine_scale_set_vm_instance_required_ids.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/virtual_machine_scale_set_vm_instance_required_ids.py deleted file mode 100644 index ece250dd4fd4..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/virtual_machine_scale_set_vm_instance_required_ids.py +++ /dev/null @@ -1,34 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineScaleSetVMInstanceRequiredIDs(Model): - """Specifies a list of virtual machine instance IDs from the VM scale set. - - All required parameters must be populated in order to send to Azure. - - :param instance_ids: Required. The virtual machine scale set instance ids. - :type instance_ids: list[str] - """ - - _validation = { - 'instance_ids': {'required': True}, - } - - _attribute_map = { - 'instance_ids': {'key': 'instanceIds', 'type': '[str]'}, - } - - def __init__(self, **kwargs): - super(VirtualMachineScaleSetVMInstanceRequiredIDs, self).__init__(**kwargs) - self.instance_ids = kwargs.get('instance_ids', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/virtual_machine_scale_set_vm_instance_required_ids_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/virtual_machine_scale_set_vm_instance_required_ids_py3.py deleted file mode 100644 index f32c6181467d..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/virtual_machine_scale_set_vm_instance_required_ids_py3.py +++ /dev/null @@ -1,34 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineScaleSetVMInstanceRequiredIDs(Model): - """Specifies a list of virtual machine instance IDs from the VM scale set. - - All required parameters must be populated in order to send to Azure. - - :param instance_ids: Required. The virtual machine scale set instance ids. - :type instance_ids: list[str] - """ - - _validation = { - 'instance_ids': {'required': True}, - } - - _attribute_map = { - 'instance_ids': {'key': 'instanceIds', 'type': '[str]'}, - } - - def __init__(self, *, instance_ids, **kwargs) -> None: - super(VirtualMachineScaleSetVMInstanceRequiredIDs, self).__init__(**kwargs) - self.instance_ids = instance_ids diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/virtual_machine_scale_set_vm_instance_view.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/virtual_machine_scale_set_vm_instance_view.py deleted file mode 100644 index 7fef2f141ea3..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/virtual_machine_scale_set_vm_instance_view.py +++ /dev/null @@ -1,63 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineScaleSetVMInstanceView(Model): - """The instance view of a virtual machine scale set VM. - - :param platform_update_domain: The Update Domain count. - :type platform_update_domain: int - :param platform_fault_domain: The Fault Domain count. - :type platform_fault_domain: int - :param rdp_thumb_print: The Remote desktop certificate thumbprint. - :type rdp_thumb_print: str - :param vm_agent: The VM Agent running on the virtual machine. - :type vm_agent: - ~azure.mgmt.compute.v2016_03_30.models.VirtualMachineAgentInstanceView - :param disks: The disks information. - :type disks: list[~azure.mgmt.compute.v2016_03_30.models.DiskInstanceView] - :param extensions: The extensions information. - :type extensions: - list[~azure.mgmt.compute.v2016_03_30.models.VirtualMachineExtensionInstanceView] - :param boot_diagnostics: Boot Diagnostics is a debugging feature which - allows you to view Console Output and Screenshot to diagnose VM status. -

    You can easily view the output of your console log.

    - Azure also enables you to see a screenshot of the VM from the hypervisor. - :type boot_diagnostics: - ~azure.mgmt.compute.v2016_03_30.models.BootDiagnosticsInstanceView - :param statuses: The resource status information. - :type statuses: - list[~azure.mgmt.compute.v2016_03_30.models.InstanceViewStatus] - """ - - _attribute_map = { - 'platform_update_domain': {'key': 'platformUpdateDomain', 'type': 'int'}, - 'platform_fault_domain': {'key': 'platformFaultDomain', 'type': 'int'}, - 'rdp_thumb_print': {'key': 'rdpThumbPrint', 'type': 'str'}, - 'vm_agent': {'key': 'vmAgent', 'type': 'VirtualMachineAgentInstanceView'}, - 'disks': {'key': 'disks', 'type': '[DiskInstanceView]'}, - 'extensions': {'key': 'extensions', 'type': '[VirtualMachineExtensionInstanceView]'}, - 'boot_diagnostics': {'key': 'bootDiagnostics', 'type': 'BootDiagnosticsInstanceView'}, - 'statuses': {'key': 'statuses', 'type': '[InstanceViewStatus]'}, - } - - def __init__(self, **kwargs): - super(VirtualMachineScaleSetVMInstanceView, self).__init__(**kwargs) - self.platform_update_domain = kwargs.get('platform_update_domain', None) - self.platform_fault_domain = kwargs.get('platform_fault_domain', None) - self.rdp_thumb_print = kwargs.get('rdp_thumb_print', None) - self.vm_agent = kwargs.get('vm_agent', None) - self.disks = kwargs.get('disks', None) - self.extensions = kwargs.get('extensions', None) - self.boot_diagnostics = kwargs.get('boot_diagnostics', None) - self.statuses = kwargs.get('statuses', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/virtual_machine_scale_set_vm_instance_view_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/virtual_machine_scale_set_vm_instance_view_py3.py deleted file mode 100644 index 0b80ed4fef79..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/virtual_machine_scale_set_vm_instance_view_py3.py +++ /dev/null @@ -1,63 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineScaleSetVMInstanceView(Model): - """The instance view of a virtual machine scale set VM. - - :param platform_update_domain: The Update Domain count. - :type platform_update_domain: int - :param platform_fault_domain: The Fault Domain count. - :type platform_fault_domain: int - :param rdp_thumb_print: The Remote desktop certificate thumbprint. - :type rdp_thumb_print: str - :param vm_agent: The VM Agent running on the virtual machine. - :type vm_agent: - ~azure.mgmt.compute.v2016_03_30.models.VirtualMachineAgentInstanceView - :param disks: The disks information. - :type disks: list[~azure.mgmt.compute.v2016_03_30.models.DiskInstanceView] - :param extensions: The extensions information. - :type extensions: - list[~azure.mgmt.compute.v2016_03_30.models.VirtualMachineExtensionInstanceView] - :param boot_diagnostics: Boot Diagnostics is a debugging feature which - allows you to view Console Output and Screenshot to diagnose VM status. -

    You can easily view the output of your console log.

    - Azure also enables you to see a screenshot of the VM from the hypervisor. - :type boot_diagnostics: - ~azure.mgmt.compute.v2016_03_30.models.BootDiagnosticsInstanceView - :param statuses: The resource status information. - :type statuses: - list[~azure.mgmt.compute.v2016_03_30.models.InstanceViewStatus] - """ - - _attribute_map = { - 'platform_update_domain': {'key': 'platformUpdateDomain', 'type': 'int'}, - 'platform_fault_domain': {'key': 'platformFaultDomain', 'type': 'int'}, - 'rdp_thumb_print': {'key': 'rdpThumbPrint', 'type': 'str'}, - 'vm_agent': {'key': 'vmAgent', 'type': 'VirtualMachineAgentInstanceView'}, - 'disks': {'key': 'disks', 'type': '[DiskInstanceView]'}, - 'extensions': {'key': 'extensions', 'type': '[VirtualMachineExtensionInstanceView]'}, - 'boot_diagnostics': {'key': 'bootDiagnostics', 'type': 'BootDiagnosticsInstanceView'}, - 'statuses': {'key': 'statuses', 'type': '[InstanceViewStatus]'}, - } - - def __init__(self, *, platform_update_domain: int=None, platform_fault_domain: int=None, rdp_thumb_print: str=None, vm_agent=None, disks=None, extensions=None, boot_diagnostics=None, statuses=None, **kwargs) -> None: - super(VirtualMachineScaleSetVMInstanceView, self).__init__(**kwargs) - self.platform_update_domain = platform_update_domain - self.platform_fault_domain = platform_fault_domain - self.rdp_thumb_print = rdp_thumb_print - self.vm_agent = vm_agent - self.disks = disks - self.extensions = extensions - self.boot_diagnostics = boot_diagnostics - self.statuses = statuses diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/virtual_machine_scale_set_vm_paged.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/virtual_machine_scale_set_vm_paged.py deleted file mode 100644 index b0f346ffb62c..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/virtual_machine_scale_set_vm_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class VirtualMachineScaleSetVMPaged(Paged): - """ - A paging container for iterating over a list of :class:`VirtualMachineScaleSetVM ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[VirtualMachineScaleSetVM]'} - } - - def __init__(self, *args, **kwargs): - - super(VirtualMachineScaleSetVMPaged, self).__init__(*args, **kwargs) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/virtual_machine_scale_set_vm_profile.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/virtual_machine_scale_set_vm_profile.py deleted file mode 100644 index a598ca7a29ac..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/virtual_machine_scale_set_vm_profile.py +++ /dev/null @@ -1,44 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineScaleSetVMProfile(Model): - """Describes a virtual machine scale set virtual machine profile. - - :param os_profile: The virtual machine scale set OS profile. - :type os_profile: - ~azure.mgmt.compute.v2016_03_30.models.VirtualMachineScaleSetOSProfile - :param storage_profile: The virtual machine scale set storage profile. - :type storage_profile: - ~azure.mgmt.compute.v2016_03_30.models.VirtualMachineScaleSetStorageProfile - :param network_profile: The virtual machine scale set network profile. - :type network_profile: - ~azure.mgmt.compute.v2016_03_30.models.VirtualMachineScaleSetNetworkProfile - :param extension_profile: The virtual machine scale set extension profile. - :type extension_profile: - ~azure.mgmt.compute.v2016_03_30.models.VirtualMachineScaleSetExtensionProfile - """ - - _attribute_map = { - 'os_profile': {'key': 'osProfile', 'type': 'VirtualMachineScaleSetOSProfile'}, - 'storage_profile': {'key': 'storageProfile', 'type': 'VirtualMachineScaleSetStorageProfile'}, - 'network_profile': {'key': 'networkProfile', 'type': 'VirtualMachineScaleSetNetworkProfile'}, - 'extension_profile': {'key': 'extensionProfile', 'type': 'VirtualMachineScaleSetExtensionProfile'}, - } - - def __init__(self, **kwargs): - super(VirtualMachineScaleSetVMProfile, self).__init__(**kwargs) - self.os_profile = kwargs.get('os_profile', None) - self.storage_profile = kwargs.get('storage_profile', None) - self.network_profile = kwargs.get('network_profile', None) - self.extension_profile = kwargs.get('extension_profile', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/virtual_machine_scale_set_vm_profile_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/virtual_machine_scale_set_vm_profile_py3.py deleted file mode 100644 index 485d1a7c83cb..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/virtual_machine_scale_set_vm_profile_py3.py +++ /dev/null @@ -1,44 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineScaleSetVMProfile(Model): - """Describes a virtual machine scale set virtual machine profile. - - :param os_profile: The virtual machine scale set OS profile. - :type os_profile: - ~azure.mgmt.compute.v2016_03_30.models.VirtualMachineScaleSetOSProfile - :param storage_profile: The virtual machine scale set storage profile. - :type storage_profile: - ~azure.mgmt.compute.v2016_03_30.models.VirtualMachineScaleSetStorageProfile - :param network_profile: The virtual machine scale set network profile. - :type network_profile: - ~azure.mgmt.compute.v2016_03_30.models.VirtualMachineScaleSetNetworkProfile - :param extension_profile: The virtual machine scale set extension profile. - :type extension_profile: - ~azure.mgmt.compute.v2016_03_30.models.VirtualMachineScaleSetExtensionProfile - """ - - _attribute_map = { - 'os_profile': {'key': 'osProfile', 'type': 'VirtualMachineScaleSetOSProfile'}, - 'storage_profile': {'key': 'storageProfile', 'type': 'VirtualMachineScaleSetStorageProfile'}, - 'network_profile': {'key': 'networkProfile', 'type': 'VirtualMachineScaleSetNetworkProfile'}, - 'extension_profile': {'key': 'extensionProfile', 'type': 'VirtualMachineScaleSetExtensionProfile'}, - } - - def __init__(self, *, os_profile=None, storage_profile=None, network_profile=None, extension_profile=None, **kwargs) -> None: - super(VirtualMachineScaleSetVMProfile, self).__init__(**kwargs) - self.os_profile = os_profile - self.storage_profile = storage_profile - self.network_profile = network_profile - self.extension_profile = extension_profile diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/virtual_machine_scale_set_vm_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/virtual_machine_scale_set_vm_py3.py deleted file mode 100644 index af109046847f..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/virtual_machine_scale_set_vm_py3.py +++ /dev/null @@ -1,155 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource_py3 import Resource - - -class VirtualMachineScaleSetVM(Resource): - """Describes a virtual machine scale set virtual machine. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource Id - :vartype id: str - :ivar name: Resource name - :vartype name: str - :ivar type: Resource type - :vartype type: str - :param location: Required. Resource location - :type location: str - :param tags: Resource tags - :type tags: dict[str, str] - :ivar instance_id: The virtual machine instance ID. - :vartype instance_id: str - :ivar sku: The virtual machine SKU. - :vartype sku: ~azure.mgmt.compute.v2016_03_30.models.Sku - :ivar latest_model_applied: Specifies whether the latest model has been - applied to the virtual machine. - :vartype latest_model_applied: bool - :ivar vm_id: Azure VM unique ID. - :vartype vm_id: str - :ivar instance_view: The virtual machine instance view. - :vartype instance_view: - ~azure.mgmt.compute.v2016_03_30.models.VirtualMachineScaleSetVMInstanceView - :param hardware_profile: Specifies the hardware settings for the virtual - machine. - :type hardware_profile: - ~azure.mgmt.compute.v2016_03_30.models.HardwareProfile - :param storage_profile: Specifies the storage settings for the virtual - machine disks. - :type storage_profile: - ~azure.mgmt.compute.v2016_03_30.models.StorageProfile - :param os_profile: Specifies the operating system settings for the virtual - machine. - :type os_profile: ~azure.mgmt.compute.v2016_03_30.models.OSProfile - :param network_profile: Specifies the network interfaces of the virtual - machine. - :type network_profile: - ~azure.mgmt.compute.v2016_03_30.models.NetworkProfile - :param diagnostics_profile: Specifies the boot diagnostic settings state. -

    Minimum api-version: 2015-06-15. - :type diagnostics_profile: - ~azure.mgmt.compute.v2016_03_30.models.DiagnosticsProfile - :param availability_set: Specifies information about the availability set - that the virtual machine should be assigned to. Virtual machines specified - in the same availability set are allocated to different nodes to maximize - availability. For more information about availability sets, see [Manage - the availability of virtual - machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-manage-availability?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). -

    For more information on Azure planned maintenance, see [Planned - maintenance for virtual machines in - Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-planned-maintenance?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json) -

    Currently, a VM can only be added to availability set at creation - time. An existing VM cannot be added to an availability set. - :type availability_set: ~azure.mgmt.compute.v2016_03_30.models.SubResource - :ivar provisioning_state: The provisioning state, which only appears in - the response. - :vartype provisioning_state: str - :param license_type: Specifies that the image or disk that is being used - was licensed on-premises. This element is only used for images that - contain the Windows Server operating system.

    Possible values are: -

    Windows_Client

    Windows_Server

    If this element - is included in a request for an update, the value must match the initial - value. This value cannot be updated.

    For more information, see - [Azure Hybrid Use Benefit for Windows - Server](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-hybrid-use-benefit-licensing?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json) -

    Minimum api-version: 2015-06-15 - :type license_type: str - :param plan: Specifies information about the marketplace image used to - create the virtual machine. This element is only used for marketplace - images. Before you can use a marketplace image from an API, you must - enable the image for programmatic use. In the Azure portal, find the - marketplace image that you want to use and then click **Want to deploy - programmatically, Get Started ->**. Enter any required information and - then click **Save**. - :type plan: ~azure.mgmt.compute.v2016_03_30.models.Plan - :ivar resources: The virtual machine child extension resources. - :vartype resources: - list[~azure.mgmt.compute.v2016_03_30.models.VirtualMachineExtension] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - 'instance_id': {'readonly': True}, - 'sku': {'readonly': True}, - 'latest_model_applied': {'readonly': True}, - 'vm_id': {'readonly': True}, - 'instance_view': {'readonly': True}, - 'provisioning_state': {'readonly': True}, - 'resources': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'instance_id': {'key': 'instanceId', 'type': 'str'}, - 'sku': {'key': 'sku', 'type': 'Sku'}, - 'latest_model_applied': {'key': 'properties.latestModelApplied', 'type': 'bool'}, - 'vm_id': {'key': 'properties.vmId', 'type': 'str'}, - 'instance_view': {'key': 'properties.instanceView', 'type': 'VirtualMachineScaleSetVMInstanceView'}, - 'hardware_profile': {'key': 'properties.hardwareProfile', 'type': 'HardwareProfile'}, - 'storage_profile': {'key': 'properties.storageProfile', 'type': 'StorageProfile'}, - 'os_profile': {'key': 'properties.osProfile', 'type': 'OSProfile'}, - 'network_profile': {'key': 'properties.networkProfile', 'type': 'NetworkProfile'}, - 'diagnostics_profile': {'key': 'properties.diagnosticsProfile', 'type': 'DiagnosticsProfile'}, - 'availability_set': {'key': 'properties.availabilitySet', 'type': 'SubResource'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'license_type': {'key': 'properties.licenseType', 'type': 'str'}, - 'plan': {'key': 'plan', 'type': 'Plan'}, - 'resources': {'key': 'resources', 'type': '[VirtualMachineExtension]'}, - } - - def __init__(self, *, location: str, tags=None, hardware_profile=None, storage_profile=None, os_profile=None, network_profile=None, diagnostics_profile=None, availability_set=None, license_type: str=None, plan=None, **kwargs) -> None: - super(VirtualMachineScaleSetVM, self).__init__(location=location, tags=tags, **kwargs) - self.instance_id = None - self.sku = None - self.latest_model_applied = None - self.vm_id = None - self.instance_view = None - self.hardware_profile = hardware_profile - self.storage_profile = storage_profile - self.os_profile = os_profile - self.network_profile = network_profile - self.diagnostics_profile = diagnostics_profile - self.availability_set = availability_set - self.provisioning_state = None - self.license_type = license_type - self.plan = plan - self.resources = None diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/virtual_machine_size.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/virtual_machine_size.py deleted file mode 100644 index 0fef3efd6c8e..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/virtual_machine_size.py +++ /dev/null @@ -1,53 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineSize(Model): - """Describes the properties of a VM size. - - :param name: The name of the virtual machine size. - :type name: str - :param number_of_cores: The number of cores supported by the virtual - machine size. - :type number_of_cores: int - :param os_disk_size_in_mb: The OS disk size, in MB, allowed by the virtual - machine size. - :type os_disk_size_in_mb: int - :param resource_disk_size_in_mb: The resource disk size, in MB, allowed by - the virtual machine size. - :type resource_disk_size_in_mb: int - :param memory_in_mb: The amount of memory, in MB, supported by the virtual - machine size. - :type memory_in_mb: int - :param max_data_disk_count: The maximum number of data disks that can be - attached to the virtual machine size. - :type max_data_disk_count: int - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'number_of_cores': {'key': 'numberOfCores', 'type': 'int'}, - 'os_disk_size_in_mb': {'key': 'osDiskSizeInMB', 'type': 'int'}, - 'resource_disk_size_in_mb': {'key': 'resourceDiskSizeInMB', 'type': 'int'}, - 'memory_in_mb': {'key': 'memoryInMB', 'type': 'int'}, - 'max_data_disk_count': {'key': 'maxDataDiskCount', 'type': 'int'}, - } - - def __init__(self, **kwargs): - super(VirtualMachineSize, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.number_of_cores = kwargs.get('number_of_cores', None) - self.os_disk_size_in_mb = kwargs.get('os_disk_size_in_mb', None) - self.resource_disk_size_in_mb = kwargs.get('resource_disk_size_in_mb', None) - self.memory_in_mb = kwargs.get('memory_in_mb', None) - self.max_data_disk_count = kwargs.get('max_data_disk_count', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/virtual_machine_size_paged.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/virtual_machine_size_paged.py deleted file mode 100644 index 86ec881a1f7e..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/virtual_machine_size_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class VirtualMachineSizePaged(Paged): - """ - A paging container for iterating over a list of :class:`VirtualMachineSize ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[VirtualMachineSize]'} - } - - def __init__(self, *args, **kwargs): - - super(VirtualMachineSizePaged, self).__init__(*args, **kwargs) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/virtual_machine_size_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/virtual_machine_size_py3.py deleted file mode 100644 index 9f99ba20ce42..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/virtual_machine_size_py3.py +++ /dev/null @@ -1,53 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineSize(Model): - """Describes the properties of a VM size. - - :param name: The name of the virtual machine size. - :type name: str - :param number_of_cores: The number of cores supported by the virtual - machine size. - :type number_of_cores: int - :param os_disk_size_in_mb: The OS disk size, in MB, allowed by the virtual - machine size. - :type os_disk_size_in_mb: int - :param resource_disk_size_in_mb: The resource disk size, in MB, allowed by - the virtual machine size. - :type resource_disk_size_in_mb: int - :param memory_in_mb: The amount of memory, in MB, supported by the virtual - machine size. - :type memory_in_mb: int - :param max_data_disk_count: The maximum number of data disks that can be - attached to the virtual machine size. - :type max_data_disk_count: int - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'number_of_cores': {'key': 'numberOfCores', 'type': 'int'}, - 'os_disk_size_in_mb': {'key': 'osDiskSizeInMB', 'type': 'int'}, - 'resource_disk_size_in_mb': {'key': 'resourceDiskSizeInMB', 'type': 'int'}, - 'memory_in_mb': {'key': 'memoryInMB', 'type': 'int'}, - 'max_data_disk_count': {'key': 'maxDataDiskCount', 'type': 'int'}, - } - - def __init__(self, *, name: str=None, number_of_cores: int=None, os_disk_size_in_mb: int=None, resource_disk_size_in_mb: int=None, memory_in_mb: int=None, max_data_disk_count: int=None, **kwargs) -> None: - super(VirtualMachineSize, self).__init__(**kwargs) - self.name = name - self.number_of_cores = number_of_cores - self.os_disk_size_in_mb = os_disk_size_in_mb - self.resource_disk_size_in_mb = resource_disk_size_in_mb - self.memory_in_mb = memory_in_mb - self.max_data_disk_count = max_data_disk_count diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/virtual_machine_status_code_count.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/virtual_machine_status_code_count.py deleted file mode 100644 index 7df7b702acd7..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/virtual_machine_status_code_count.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineStatusCodeCount(Model): - """The status code and count of the virtual machine scale set instance view - status summary. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar code: The instance view status code. - :vartype code: str - :ivar count: The number of instances having a particular status code. - :vartype count: int - """ - - _validation = { - 'code': {'readonly': True}, - 'count': {'readonly': True}, - } - - _attribute_map = { - 'code': {'key': 'code', 'type': 'str'}, - 'count': {'key': 'count', 'type': 'int'}, - } - - def __init__(self, **kwargs): - super(VirtualMachineStatusCodeCount, self).__init__(**kwargs) - self.code = None - self.count = None diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/virtual_machine_status_code_count_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/virtual_machine_status_code_count_py3.py deleted file mode 100644 index c38800073a95..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/virtual_machine_status_code_count_py3.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineStatusCodeCount(Model): - """The status code and count of the virtual machine scale set instance view - status summary. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar code: The instance view status code. - :vartype code: str - :ivar count: The number of instances having a particular status code. - :vartype count: int - """ - - _validation = { - 'code': {'readonly': True}, - 'count': {'readonly': True}, - } - - _attribute_map = { - 'code': {'key': 'code', 'type': 'str'}, - 'count': {'key': 'count', 'type': 'int'}, - } - - def __init__(self, **kwargs) -> None: - super(VirtualMachineStatusCodeCount, self).__init__(**kwargs) - self.code = None - self.count = None diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/win_rm_configuration.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/win_rm_configuration.py deleted file mode 100644 index f781fc02fafc..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/win_rm_configuration.py +++ /dev/null @@ -1,29 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class WinRMConfiguration(Model): - """Describes Windows Remote Management configuration of the VM. - - :param listeners: The list of Windows Remote Management listeners - :type listeners: - list[~azure.mgmt.compute.v2016_03_30.models.WinRMListener] - """ - - _attribute_map = { - 'listeners': {'key': 'listeners', 'type': '[WinRMListener]'}, - } - - def __init__(self, **kwargs): - super(WinRMConfiguration, self).__init__(**kwargs) - self.listeners = kwargs.get('listeners', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/win_rm_configuration_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/win_rm_configuration_py3.py deleted file mode 100644 index e49e4abff89a..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/win_rm_configuration_py3.py +++ /dev/null @@ -1,29 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class WinRMConfiguration(Model): - """Describes Windows Remote Management configuration of the VM. - - :param listeners: The list of Windows Remote Management listeners - :type listeners: - list[~azure.mgmt.compute.v2016_03_30.models.WinRMListener] - """ - - _attribute_map = { - 'listeners': {'key': 'listeners', 'type': '[WinRMListener]'}, - } - - def __init__(self, *, listeners=None, **kwargs) -> None: - super(WinRMConfiguration, self).__init__(**kwargs) - self.listeners = listeners diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/win_rm_listener.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/win_rm_listener.py deleted file mode 100644 index 3d984a9f0677..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/win_rm_listener.py +++ /dev/null @@ -1,42 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class WinRMListener(Model): - """Describes Protocol and thumbprint of Windows Remote Management listener. - - :param protocol: Specifies the protocol of listener.

    Possible - values are:
    **http**

    **https**. Possible values include: - 'Http', 'Https' - :type protocol: str or - ~azure.mgmt.compute.v2016_03_30.models.ProtocolTypes - :param certificate_url: This is the URL of a certificate that has been - uploaded to Key Vault as a secret. For adding a secret to the Key Vault, - see [Add a key or secret to the key - vault](https://docs.microsoft.com/azure/key-vault/key-vault-get-started/#add). - In this case, your certificate needs to be It is the Base64 encoding of - the following JSON Object which is encoded in UTF-8:

    {
    - "data":"",
    "dataType":"pfx",
    - "password":""
    } - :type certificate_url: str - """ - - _attribute_map = { - 'protocol': {'key': 'protocol', 'type': 'ProtocolTypes'}, - 'certificate_url': {'key': 'certificateUrl', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(WinRMListener, self).__init__(**kwargs) - self.protocol = kwargs.get('protocol', None) - self.certificate_url = kwargs.get('certificate_url', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/win_rm_listener_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/win_rm_listener_py3.py deleted file mode 100644 index 01fde18332b1..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/win_rm_listener_py3.py +++ /dev/null @@ -1,42 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class WinRMListener(Model): - """Describes Protocol and thumbprint of Windows Remote Management listener. - - :param protocol: Specifies the protocol of listener.

    Possible - values are:
    **http**

    **https**. Possible values include: - 'Http', 'Https' - :type protocol: str or - ~azure.mgmt.compute.v2016_03_30.models.ProtocolTypes - :param certificate_url: This is the URL of a certificate that has been - uploaded to Key Vault as a secret. For adding a secret to the Key Vault, - see [Add a key or secret to the key - vault](https://docs.microsoft.com/azure/key-vault/key-vault-get-started/#add). - In this case, your certificate needs to be It is the Base64 encoding of - the following JSON Object which is encoded in UTF-8:

    {
    - "data":"",
    "dataType":"pfx",
    - "password":""
    } - :type certificate_url: str - """ - - _attribute_map = { - 'protocol': {'key': 'protocol', 'type': 'ProtocolTypes'}, - 'certificate_url': {'key': 'certificateUrl', 'type': 'str'}, - } - - def __init__(self, *, protocol=None, certificate_url: str=None, **kwargs) -> None: - super(WinRMListener, self).__init__(**kwargs) - self.protocol = protocol - self.certificate_url = certificate_url diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/windows_configuration.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/windows_configuration.py deleted file mode 100644 index c703e1650ee1..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/windows_configuration.py +++ /dev/null @@ -1,54 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class WindowsConfiguration(Model): - """Specifies Windows operating system settings on the virtual machine. - - :param provision_vm_agent: Indicates whether virtual machine agent should - be provisioned on the virtual machine.

    When this property is not - specified in the request body, default behavior is to set it to true. - This will ensure that VM Agent is installed on the VM so that extensions - can be added to the VM later. - :type provision_vm_agent: bool - :param enable_automatic_updates: Indicates whether virtual machine is - enabled for automatic updates. - :type enable_automatic_updates: bool - :param time_zone: Specifies the time zone of the virtual machine. e.g. - "Pacific Standard Time" - :type time_zone: str - :param additional_unattend_content: Specifies additional base-64 encoded - XML formatted information that can be included in the Unattend.xml file, - which is used by Windows Setup. - :type additional_unattend_content: - list[~azure.mgmt.compute.v2016_03_30.models.AdditionalUnattendContent] - :param win_rm: Specifies the Windows Remote Management listeners. This - enables remote Windows PowerShell. - :type win_rm: ~azure.mgmt.compute.v2016_03_30.models.WinRMConfiguration - """ - - _attribute_map = { - 'provision_vm_agent': {'key': 'provisionVMAgent', 'type': 'bool'}, - 'enable_automatic_updates': {'key': 'enableAutomaticUpdates', 'type': 'bool'}, - 'time_zone': {'key': 'timeZone', 'type': 'str'}, - 'additional_unattend_content': {'key': 'additionalUnattendContent', 'type': '[AdditionalUnattendContent]'}, - 'win_rm': {'key': 'winRM', 'type': 'WinRMConfiguration'}, - } - - def __init__(self, **kwargs): - super(WindowsConfiguration, self).__init__(**kwargs) - self.provision_vm_agent = kwargs.get('provision_vm_agent', None) - self.enable_automatic_updates = kwargs.get('enable_automatic_updates', None) - self.time_zone = kwargs.get('time_zone', None) - self.additional_unattend_content = kwargs.get('additional_unattend_content', None) - self.win_rm = kwargs.get('win_rm', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/windows_configuration_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/windows_configuration_py3.py deleted file mode 100644 index 045a6b233099..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/windows_configuration_py3.py +++ /dev/null @@ -1,54 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class WindowsConfiguration(Model): - """Specifies Windows operating system settings on the virtual machine. - - :param provision_vm_agent: Indicates whether virtual machine agent should - be provisioned on the virtual machine.

    When this property is not - specified in the request body, default behavior is to set it to true. - This will ensure that VM Agent is installed on the VM so that extensions - can be added to the VM later. - :type provision_vm_agent: bool - :param enable_automatic_updates: Indicates whether virtual machine is - enabled for automatic updates. - :type enable_automatic_updates: bool - :param time_zone: Specifies the time zone of the virtual machine. e.g. - "Pacific Standard Time" - :type time_zone: str - :param additional_unattend_content: Specifies additional base-64 encoded - XML formatted information that can be included in the Unattend.xml file, - which is used by Windows Setup. - :type additional_unattend_content: - list[~azure.mgmt.compute.v2016_03_30.models.AdditionalUnattendContent] - :param win_rm: Specifies the Windows Remote Management listeners. This - enables remote Windows PowerShell. - :type win_rm: ~azure.mgmt.compute.v2016_03_30.models.WinRMConfiguration - """ - - _attribute_map = { - 'provision_vm_agent': {'key': 'provisionVMAgent', 'type': 'bool'}, - 'enable_automatic_updates': {'key': 'enableAutomaticUpdates', 'type': 'bool'}, - 'time_zone': {'key': 'timeZone', 'type': 'str'}, - 'additional_unattend_content': {'key': 'additionalUnattendContent', 'type': '[AdditionalUnattendContent]'}, - 'win_rm': {'key': 'winRM', 'type': 'WinRMConfiguration'}, - } - - def __init__(self, *, provision_vm_agent: bool=None, enable_automatic_updates: bool=None, time_zone: str=None, additional_unattend_content=None, win_rm=None, **kwargs) -> None: - super(WindowsConfiguration, self).__init__(**kwargs) - self.provision_vm_agent = provision_vm_agent - self.enable_automatic_updates = enable_automatic_updates - self.time_zone = time_zone - self.additional_unattend_content = additional_unattend_content - self.win_rm = win_rm diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/operations/__init__.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/operations/__init__.py index bd6f5149c870..2350640358c4 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/operations/__init__.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/operations/__init__.py @@ -9,15 +9,15 @@ # regenerated. # -------------------------------------------------------------------------- -from .availability_sets_operations import AvailabilitySetsOperations -from .virtual_machine_extension_images_operations import VirtualMachineExtensionImagesOperations -from .virtual_machine_extensions_operations import VirtualMachineExtensionsOperations -from .virtual_machines_operations import VirtualMachinesOperations -from .virtual_machine_images_operations import VirtualMachineImagesOperations -from .usage_operations import UsageOperations -from .virtual_machine_sizes_operations import VirtualMachineSizesOperations -from .virtual_machine_scale_sets_operations import VirtualMachineScaleSetsOperations -from .virtual_machine_scale_set_vms_operations import VirtualMachineScaleSetVMsOperations +from ._availability_sets_operations import AvailabilitySetsOperations +from ._virtual_machine_extension_images_operations import VirtualMachineExtensionImagesOperations +from ._virtual_machine_extensions_operations import VirtualMachineExtensionsOperations +from ._virtual_machines_operations import VirtualMachinesOperations +from ._virtual_machine_images_operations import VirtualMachineImagesOperations +from ._usage_operations import UsageOperations +from ._virtual_machine_sizes_operations import VirtualMachineSizesOperations +from ._virtual_machine_scale_sets_operations import VirtualMachineScaleSetsOperations +from ._virtual_machine_scale_set_vms_operations import VirtualMachineScaleSetVMsOperations __all__ = [ 'AvailabilitySetsOperations', diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/operations/_availability_sets_operations.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/operations/_availability_sets_operations.py new file mode 100644 index 000000000000..f2830059244a --- /dev/null +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/operations/_availability_sets_operations.py @@ -0,0 +1,439 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse +from msrestazure.azure_exceptions import CloudError + +from .. import models + + +class AvailabilitySetsOperations(object): + """AvailabilitySetsOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: Client Api Version. Constant value: "2016-03-30". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2016-03-30" + + self.config = config + + def create_or_update( + self, resource_group_name, name, parameters, custom_headers=None, raw=False, **operation_config): + """Create or update an availability set. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param name: The name of the availability set. + :type name: str + :param parameters: Parameters supplied to the Create Availability Set + operation. + :type parameters: + ~azure.mgmt.compute.v2016_03_30.models.AvailabilitySet + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: AvailabilitySet or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.compute.v2016_03_30.models.AvailabilitySet or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.create_or_update.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'availabilitySetName': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(parameters, 'AvailabilitySet') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('AvailabilitySet', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}'} + + def delete( + self, resource_group_name, availability_set_name, custom_headers=None, raw=False, **operation_config): + """Delete an availability set. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param availability_set_name: The name of the availability set. + :type availability_set_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: OperationStatusResponse or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.compute.v2016_03_30.models.OperationStatusResponse + or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.delete.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'availabilitySetName': self._serialize.url("availability_set_name", availability_set_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 204]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('OperationStatusResponse', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}'} + + def get( + self, resource_group_name, availability_set_name, custom_headers=None, raw=False, **operation_config): + """Retrieves information about an availability set. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param availability_set_name: The name of the availability set. + :type availability_set_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: AvailabilitySet or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.compute.v2016_03_30.models.AvailabilitySet or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'availabilitySetName': self._serialize.url("availability_set_name", availability_set_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('AvailabilitySet', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}'} + + def list_by_subscription( + self, custom_headers=None, raw=False, **operation_config): + """Lists all availability sets in a subscription. + + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of AvailabilitySet + :rtype: + ~azure.mgmt.compute.v2016_03_30.models.AvailabilitySetPaged[~azure.mgmt.compute.v2016_03_30.models.AvailabilitySet] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_by_subscription.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.AvailabilitySetPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_by_subscription.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Compute/availabilitySets'} + + def list( + self, resource_group_name, custom_headers=None, raw=False, **operation_config): + """Lists all availability sets in a resource group. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of AvailabilitySet + :rtype: + ~azure.mgmt.compute.v2016_03_30.models.AvailabilitySetPaged[~azure.mgmt.compute.v2016_03_30.models.AvailabilitySet] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.AvailabilitySetPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets'} + + def list_available_sizes( + self, resource_group_name, availability_set_name, custom_headers=None, raw=False, **operation_config): + """Lists all available virtual machine sizes that can be used to create a + new virtual machine in an existing availability set. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param availability_set_name: The name of the availability set. + :type availability_set_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of VirtualMachineSize + :rtype: + ~azure.mgmt.compute.v2016_03_30.models.VirtualMachineSizePaged[~azure.mgmt.compute.v2016_03_30.models.VirtualMachineSize] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_available_sizes.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'availabilitySetName': self._serialize.url("availability_set_name", availability_set_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.VirtualMachineSizePaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_available_sizes.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}/vmSizes'} diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/operations/_usage_operations.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/operations/_usage_operations.py new file mode 100644 index 000000000000..298d3ea1885f --- /dev/null +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/operations/_usage_operations.py @@ -0,0 +1,111 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse +from msrestazure.azure_exceptions import CloudError + +from .. import models + + +class UsageOperations(object): + """UsageOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: Client Api Version. Constant value: "2016-03-30". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2016-03-30" + + self.config = config + + def list( + self, location, custom_headers=None, raw=False, **operation_config): + """Gets, for the specified location, the current compute resource usage + information as well as the limits for compute resources under the + subscription. + + :param location: The location for which resource usage is queried. + :type location: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of Usage + :rtype: + ~azure.mgmt.compute.v2016_03_30.models.UsagePaged[~azure.mgmt.compute.v2016_03_30.models.Usage] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list.metadata['url'] + path_format_arguments = { + 'location': self._serialize.url("location", location, 'str', pattern=r'^[-\w\._]+$'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.UsagePaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/usages'} diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/operations/_virtual_machine_extension_images_operations.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/operations/_virtual_machine_extension_images_operations.py new file mode 100644 index 000000000000..cf4c19de6a60 --- /dev/null +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/operations/_virtual_machine_extension_images_operations.py @@ -0,0 +1,247 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse +from msrestazure.azure_exceptions import CloudError + +from .. import models + + +class VirtualMachineExtensionImagesOperations(object): + """VirtualMachineExtensionImagesOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: Client Api Version. Constant value: "2016-03-30". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2016-03-30" + + self.config = config + + def get( + self, location, publisher_name, type, version, custom_headers=None, raw=False, **operation_config): + """Gets a virtual machine extension image. + + :param location: The name of a supported Azure region. + :type location: str + :param publisher_name: + :type publisher_name: str + :param type: + :type type: str + :param version: + :type version: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: VirtualMachineExtensionImage or ClientRawResponse if raw=true + :rtype: + ~azure.mgmt.compute.v2016_03_30.models.VirtualMachineExtensionImage or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'location': self._serialize.url("location", location, 'str'), + 'publisherName': self._serialize.url("publisher_name", publisher_name, 'str'), + 'type': self._serialize.url("type", type, 'str'), + 'version': self._serialize.url("version", version, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('VirtualMachineExtensionImage', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/publishers/{publisherName}/artifacttypes/vmextension/types/{type}/versions/{version}'} + + def list_types( + self, location, publisher_name, custom_headers=None, raw=False, **operation_config): + """Gets a list of virtual machine extension image types. + + :param location: The name of a supported Azure region. + :type location: str + :param publisher_name: + :type publisher_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: list or ClientRawResponse if raw=true + :rtype: + list[~azure.mgmt.compute.v2016_03_30.models.VirtualMachineExtensionImage] + or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.list_types.metadata['url'] + path_format_arguments = { + 'location': self._serialize.url("location", location, 'str'), + 'publisherName': self._serialize.url("publisher_name", publisher_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('[VirtualMachineExtensionImage]', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + list_types.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/publishers/{publisherName}/artifacttypes/vmextension/types'} + + def list_versions( + self, location, publisher_name, type, filter=None, top=None, orderby=None, custom_headers=None, raw=False, **operation_config): + """Gets a list of virtual machine extension image versions. + + :param location: The name of a supported Azure region. + :type location: str + :param publisher_name: + :type publisher_name: str + :param type: + :type type: str + :param filter: The filter to apply on the operation. + :type filter: str + :param top: + :type top: int + :param orderby: + :type orderby: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: list or ClientRawResponse if raw=true + :rtype: + list[~azure.mgmt.compute.v2016_03_30.models.VirtualMachineExtensionImage] + or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.list_versions.metadata['url'] + path_format_arguments = { + 'location': self._serialize.url("location", location, 'str'), + 'publisherName': self._serialize.url("publisher_name", publisher_name, 'str'), + 'type': self._serialize.url("type", type, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + if filter is not None: + query_parameters['$filter'] = self._serialize.query("filter", filter, 'str') + if top is not None: + query_parameters['$top'] = self._serialize.query("top", top, 'int') + if orderby is not None: + query_parameters['$orderby'] = self._serialize.query("orderby", orderby, 'str') + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('[VirtualMachineExtensionImage]', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + list_versions.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/publishers/{publisherName}/artifacttypes/vmextension/types/{type}/versions'} diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/operations/_virtual_machine_extensions_operations.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/operations/_virtual_machine_extensions_operations.py new file mode 100644 index 000000000000..24882d3180bf --- /dev/null +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/operations/_virtual_machine_extensions_operations.py @@ -0,0 +1,425 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse +from msrestazure.azure_exceptions import CloudError +from msrest.polling import LROPoller, NoPolling +from msrestazure.polling.arm_polling import ARMPolling + +from .. import models + + +class VirtualMachineExtensionsOperations(object): + """VirtualMachineExtensionsOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: Client Api Version. Constant value: "2016-03-30". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2016-03-30" + + self.config = config + + + def _create_or_update_initial( + self, resource_group_name, vm_name, vm_extension_name, extension_parameters, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.create_or_update.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vmName': self._serialize.url("vm_name", vm_name, 'str'), + 'vmExtensionName': self._serialize.url("vm_extension_name", vm_extension_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(extension_parameters, 'VirtualMachineExtension') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 201]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('VirtualMachineExtension', response) + if response.status_code == 201: + deserialized = self._deserialize('VirtualMachineExtension', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def create_or_update( + self, resource_group_name, vm_name, vm_extension_name, extension_parameters, custom_headers=None, raw=False, polling=True, **operation_config): + """The operation to create or update the extension. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param vm_name: The name of the virtual machine where the extension + should be created or updated. + :type vm_name: str + :param vm_extension_name: The name of the virtual machine extension. + :type vm_extension_name: str + :param extension_parameters: Parameters supplied to the Create Virtual + Machine Extension operation. + :type extension_parameters: + ~azure.mgmt.compute.v2016_03_30.models.VirtualMachineExtension + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns VirtualMachineExtension + or ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2016_03_30.models.VirtualMachineExtension] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2016_03_30.models.VirtualMachineExtension]] + :raises: :class:`CloudError` + """ + raw_result = self._create_or_update_initial( + resource_group_name=resource_group_name, + vm_name=vm_name, + vm_extension_name=vm_extension_name, + extension_parameters=extension_parameters, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('VirtualMachineExtension', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/extensions/{vmExtensionName}'} + + + def _update_initial( + self, resource_group_name, vm_name, vm_extension_name, extension_parameters, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.update.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vmName': self._serialize.url("vm_name", vm_name, 'str'), + 'vmExtensionName': self._serialize.url("vm_extension_name", vm_extension_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(extension_parameters, 'VirtualMachineExtensionUpdate') + + # Construct and send request + request = self._client.patch(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('VirtualMachineExtension', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def update( + self, resource_group_name, vm_name, vm_extension_name, extension_parameters, custom_headers=None, raw=False, polling=True, **operation_config): + """The operation to update the extension. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param vm_name: The name of the virtual machine where the extension + should be updated. + :type vm_name: str + :param vm_extension_name: The name of the virtual machine extension. + :type vm_extension_name: str + :param extension_parameters: Parameters supplied to the Update Virtual + Machine Extension operation. + :type extension_parameters: + ~azure.mgmt.compute.v2016_03_30.models.VirtualMachineExtensionUpdate + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns VirtualMachineExtension + or ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2016_03_30.models.VirtualMachineExtension] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2016_03_30.models.VirtualMachineExtension]] + :raises: :class:`CloudError` + """ + raw_result = self._update_initial( + resource_group_name=resource_group_name, + vm_name=vm_name, + vm_extension_name=vm_extension_name, + extension_parameters=extension_parameters, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('VirtualMachineExtension', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/extensions/{vmExtensionName}'} + + + def _delete_initial( + self, resource_group_name, vm_name, vm_extension_name, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.delete.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vmName': self._serialize.url("vm_name", vm_name, 'str'), + 'vmExtensionName': self._serialize.url("vm_extension_name", vm_extension_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202, 204]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('OperationStatusResponse', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def delete( + self, resource_group_name, vm_name, vm_extension_name, custom_headers=None, raw=False, polling=True, **operation_config): + """The operation to delete the extension. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param vm_name: The name of the virtual machine where the extension + should be deleted. + :type vm_name: str + :param vm_extension_name: The name of the virtual machine extension. + :type vm_extension_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns OperationStatusResponse + or ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2016_03_30.models.OperationStatusResponse] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2016_03_30.models.OperationStatusResponse]] + :raises: :class:`CloudError` + """ + raw_result = self._delete_initial( + resource_group_name=resource_group_name, + vm_name=vm_name, + vm_extension_name=vm_extension_name, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('OperationStatusResponse', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/extensions/{vmExtensionName}'} + + def get( + self, resource_group_name, vm_name, vm_extension_name, expand=None, custom_headers=None, raw=False, **operation_config): + """The operation to get the extension. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param vm_name: The name of the virtual machine containing the + extension. + :type vm_name: str + :param vm_extension_name: The name of the virtual machine extension. + :type vm_extension_name: str + :param expand: The expand expression to apply on the operation. + :type expand: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: VirtualMachineExtension or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.compute.v2016_03_30.models.VirtualMachineExtension + or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vmName': self._serialize.url("vm_name", vm_name, 'str'), + 'vmExtensionName': self._serialize.url("vm_extension_name", vm_extension_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + if expand is not None: + query_parameters['$expand'] = self._serialize.query("expand", expand, 'str') + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('VirtualMachineExtension', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/extensions/{vmExtensionName}'} diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/operations/_virtual_machine_images_operations.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/operations/_virtual_machine_images_operations.py new file mode 100644 index 000000000000..de506c154650 --- /dev/null +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/operations/_virtual_machine_images_operations.py @@ -0,0 +1,380 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse +from msrestazure.azure_exceptions import CloudError + +from .. import models + + +class VirtualMachineImagesOperations(object): + """VirtualMachineImagesOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: Client Api Version. Constant value: "2016-03-30". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2016-03-30" + + self.config = config + + def get( + self, location, publisher_name, offer, skus, version, custom_headers=None, raw=False, **operation_config): + """Gets a virtual machine image. + + :param location: The name of a supported Azure region. + :type location: str + :param publisher_name: A valid image publisher. + :type publisher_name: str + :param offer: A valid image publisher offer. + :type offer: str + :param skus: A valid image SKU. + :type skus: str + :param version: A valid image SKU version. + :type version: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: VirtualMachineImage or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.compute.v2016_03_30.models.VirtualMachineImage or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'location': self._serialize.url("location", location, 'str'), + 'publisherName': self._serialize.url("publisher_name", publisher_name, 'str'), + 'offer': self._serialize.url("offer", offer, 'str'), + 'skus': self._serialize.url("skus", skus, 'str'), + 'version': self._serialize.url("version", version, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('VirtualMachineImage', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/publishers/{publisherName}/artifacttypes/vmimage/offers/{offer}/skus/{skus}/versions/{version}'} + + def list( + self, location, publisher_name, offer, skus, filter=None, top=None, orderby=None, custom_headers=None, raw=False, **operation_config): + """Gets a list of all virtual machine image versions for the specified + location, publisher, offer, and SKU. + + :param location: The name of a supported Azure region. + :type location: str + :param publisher_name: A valid image publisher. + :type publisher_name: str + :param offer: A valid image publisher offer. + :type offer: str + :param skus: A valid image SKU. + :type skus: str + :param filter: The filter to apply on the operation. + :type filter: str + :param top: + :type top: int + :param orderby: + :type orderby: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: list or ClientRawResponse if raw=true + :rtype: + list[~azure.mgmt.compute.v2016_03_30.models.VirtualMachineImageResource] + or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.list.metadata['url'] + path_format_arguments = { + 'location': self._serialize.url("location", location, 'str'), + 'publisherName': self._serialize.url("publisher_name", publisher_name, 'str'), + 'offer': self._serialize.url("offer", offer, 'str'), + 'skus': self._serialize.url("skus", skus, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + if filter is not None: + query_parameters['$filter'] = self._serialize.query("filter", filter, 'str') + if top is not None: + query_parameters['$top'] = self._serialize.query("top", top, 'int') + if orderby is not None: + query_parameters['$orderby'] = self._serialize.query("orderby", orderby, 'str') + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('[VirtualMachineImageResource]', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/publishers/{publisherName}/artifacttypes/vmimage/offers/{offer}/skus/{skus}/versions'} + + def list_offers( + self, location, publisher_name, custom_headers=None, raw=False, **operation_config): + """Gets a list of virtual machine image offers for the specified location + and publisher. + + :param location: The name of a supported Azure region. + :type location: str + :param publisher_name: A valid image publisher. + :type publisher_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: list or ClientRawResponse if raw=true + :rtype: + list[~azure.mgmt.compute.v2016_03_30.models.VirtualMachineImageResource] + or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.list_offers.metadata['url'] + path_format_arguments = { + 'location': self._serialize.url("location", location, 'str'), + 'publisherName': self._serialize.url("publisher_name", publisher_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('[VirtualMachineImageResource]', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + list_offers.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/publishers/{publisherName}/artifacttypes/vmimage/offers'} + + def list_publishers( + self, location, custom_headers=None, raw=False, **operation_config): + """Gets a list of virtual machine image publishers for the specified Azure + location. + + :param location: The name of a supported Azure region. + :type location: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: list or ClientRawResponse if raw=true + :rtype: + list[~azure.mgmt.compute.v2016_03_30.models.VirtualMachineImageResource] + or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.list_publishers.metadata['url'] + path_format_arguments = { + 'location': self._serialize.url("location", location, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('[VirtualMachineImageResource]', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + list_publishers.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/publishers'} + + def list_skus( + self, location, publisher_name, offer, custom_headers=None, raw=False, **operation_config): + """Gets a list of virtual machine image SKUs for the specified location, + publisher, and offer. + + :param location: The name of a supported Azure region. + :type location: str + :param publisher_name: A valid image publisher. + :type publisher_name: str + :param offer: A valid image publisher offer. + :type offer: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: list or ClientRawResponse if raw=true + :rtype: + list[~azure.mgmt.compute.v2016_03_30.models.VirtualMachineImageResource] + or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.list_skus.metadata['url'] + path_format_arguments = { + 'location': self._serialize.url("location", location, 'str'), + 'publisherName': self._serialize.url("publisher_name", publisher_name, 'str'), + 'offer': self._serialize.url("offer", offer, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('[VirtualMachineImageResource]', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + list_skus.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/publishers/{publisherName}/artifacttypes/vmimage/offers/{offer}/skus'} diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/operations/_virtual_machine_scale_set_vms_operations.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/operations/_virtual_machine_scale_set_vms_operations.py new file mode 100644 index 000000000000..0568038c8aac --- /dev/null +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/operations/_virtual_machine_scale_set_vms_operations.py @@ -0,0 +1,846 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse +from msrestazure.azure_exceptions import CloudError +from msrest.polling import LROPoller, NoPolling +from msrestazure.polling.arm_polling import ARMPolling + +from .. import models + + +class VirtualMachineScaleSetVMsOperations(object): + """VirtualMachineScaleSetVMsOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: Client Api Version. Constant value: "2016-03-30". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2016-03-30" + + self.config = config + + + def _reimage_initial( + self, resource_group_name, vm_scale_set_name, instance_id, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.reimage.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), + 'instanceId': self._serialize.url("instance_id", instance_id, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('OperationStatusResponse', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def reimage( + self, resource_group_name, vm_scale_set_name, instance_id, custom_headers=None, raw=False, polling=True, **operation_config): + """Reimages (upgrade the operating system) a specific virtual machine in a + VM scale set. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param vm_scale_set_name: The name of the VM scale set. + :type vm_scale_set_name: str + :param instance_id: The instance ID of the virtual machine. + :type instance_id: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns OperationStatusResponse + or ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2016_03_30.models.OperationStatusResponse] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2016_03_30.models.OperationStatusResponse]] + :raises: :class:`CloudError` + """ + raw_result = self._reimage_initial( + resource_group_name=resource_group_name, + vm_scale_set_name=vm_scale_set_name, + instance_id=instance_id, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('OperationStatusResponse', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + reimage.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/virtualmachines/{instanceId}/reimage'} + + + def _deallocate_initial( + self, resource_group_name, vm_scale_set_name, instance_id, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.deallocate.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), + 'instanceId': self._serialize.url("instance_id", instance_id, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('OperationStatusResponse', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def deallocate( + self, resource_group_name, vm_scale_set_name, instance_id, custom_headers=None, raw=False, polling=True, **operation_config): + """Deallocates a specific virtual machine in a VM scale set. Shuts down + the virtual machine and releases the compute resources it uses. You are + not billed for the compute resources of this virtual machine once it is + deallocated. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param vm_scale_set_name: The name of the VM scale set. + :type vm_scale_set_name: str + :param instance_id: The instance ID of the virtual machine. + :type instance_id: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns OperationStatusResponse + or ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2016_03_30.models.OperationStatusResponse] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2016_03_30.models.OperationStatusResponse]] + :raises: :class:`CloudError` + """ + raw_result = self._deallocate_initial( + resource_group_name=resource_group_name, + vm_scale_set_name=vm_scale_set_name, + instance_id=instance_id, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('OperationStatusResponse', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + deallocate.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/virtualmachines/{instanceId}/deallocate'} + + + def _delete_initial( + self, resource_group_name, vm_scale_set_name, instance_id, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.delete.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), + 'instanceId': self._serialize.url("instance_id", instance_id, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202, 204]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('OperationStatusResponse', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def delete( + self, resource_group_name, vm_scale_set_name, instance_id, custom_headers=None, raw=False, polling=True, **operation_config): + """Deletes a virtual machine from a VM scale set. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param vm_scale_set_name: The name of the VM scale set. + :type vm_scale_set_name: str + :param instance_id: The instance ID of the virtual machine. + :type instance_id: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns OperationStatusResponse + or ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2016_03_30.models.OperationStatusResponse] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2016_03_30.models.OperationStatusResponse]] + :raises: :class:`CloudError` + """ + raw_result = self._delete_initial( + resource_group_name=resource_group_name, + vm_scale_set_name=vm_scale_set_name, + instance_id=instance_id, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('OperationStatusResponse', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/virtualmachines/{instanceId}'} + + def get( + self, resource_group_name, vm_scale_set_name, instance_id, custom_headers=None, raw=False, **operation_config): + """Gets a virtual machine from a VM scale set. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param vm_scale_set_name: The name of the VM scale set. + :type vm_scale_set_name: str + :param instance_id: The instance ID of the virtual machine. + :type instance_id: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: VirtualMachineScaleSetVM or ClientRawResponse if raw=true + :rtype: + ~azure.mgmt.compute.v2016_03_30.models.VirtualMachineScaleSetVM or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), + 'instanceId': self._serialize.url("instance_id", instance_id, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('VirtualMachineScaleSetVM', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/virtualmachines/{instanceId}'} + + def get_instance_view( + self, resource_group_name, vm_scale_set_name, instance_id, custom_headers=None, raw=False, **operation_config): + """Gets the status of a virtual machine from a VM scale set. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param vm_scale_set_name: The name of the VM scale set. + :type vm_scale_set_name: str + :param instance_id: The instance ID of the virtual machine. + :type instance_id: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: VirtualMachineScaleSetVMInstanceView or ClientRawResponse if + raw=true + :rtype: + ~azure.mgmt.compute.v2016_03_30.models.VirtualMachineScaleSetVMInstanceView + or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get_instance_view.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), + 'instanceId': self._serialize.url("instance_id", instance_id, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('VirtualMachineScaleSetVMInstanceView', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_instance_view.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/virtualmachines/{instanceId}/instanceView'} + + def list( + self, resource_group_name, virtual_machine_scale_set_name, filter=None, select=None, expand=None, custom_headers=None, raw=False, **operation_config): + """Gets a list of all virtual machines in a VM scale sets. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param virtual_machine_scale_set_name: The name of the VM scale set. + :type virtual_machine_scale_set_name: str + :param filter: The filter to apply to the operation. + :type filter: str + :param select: The list parameters. + :type select: str + :param expand: The expand expression to apply to the operation. + :type expand: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of VirtualMachineScaleSetVM + :rtype: + ~azure.mgmt.compute.v2016_03_30.models.VirtualMachineScaleSetVMPaged[~azure.mgmt.compute.v2016_03_30.models.VirtualMachineScaleSetVM] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'virtualMachineScaleSetName': self._serialize.url("virtual_machine_scale_set_name", virtual_machine_scale_set_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + if filter is not None: + query_parameters['$filter'] = self._serialize.query("filter", filter, 'str') + if select is not None: + query_parameters['$select'] = self._serialize.query("select", select, 'str') + if expand is not None: + query_parameters['$expand'] = self._serialize.query("expand", expand, 'str') + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.VirtualMachineScaleSetVMPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{virtualMachineScaleSetName}/virtualMachines'} + + + def _power_off_initial( + self, resource_group_name, vm_scale_set_name, instance_id, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.power_off.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), + 'instanceId': self._serialize.url("instance_id", instance_id, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('OperationStatusResponse', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def power_off( + self, resource_group_name, vm_scale_set_name, instance_id, custom_headers=None, raw=False, polling=True, **operation_config): + """Power off (stop) a virtual machine in a VM scale set. Note that + resources are still attached and you are getting charged for the + resources. Instead, use deallocate to release resources and avoid + charges. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param vm_scale_set_name: The name of the VM scale set. + :type vm_scale_set_name: str + :param instance_id: The instance ID of the virtual machine. + :type instance_id: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns OperationStatusResponse + or ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2016_03_30.models.OperationStatusResponse] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2016_03_30.models.OperationStatusResponse]] + :raises: :class:`CloudError` + """ + raw_result = self._power_off_initial( + resource_group_name=resource_group_name, + vm_scale_set_name=vm_scale_set_name, + instance_id=instance_id, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('OperationStatusResponse', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + power_off.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/virtualmachines/{instanceId}/poweroff'} + + + def _restart_initial( + self, resource_group_name, vm_scale_set_name, instance_id, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.restart.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), + 'instanceId': self._serialize.url("instance_id", instance_id, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('OperationStatusResponse', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def restart( + self, resource_group_name, vm_scale_set_name, instance_id, custom_headers=None, raw=False, polling=True, **operation_config): + """Restarts a virtual machine in a VM scale set. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param vm_scale_set_name: The name of the VM scale set. + :type vm_scale_set_name: str + :param instance_id: The instance ID of the virtual machine. + :type instance_id: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns OperationStatusResponse + or ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2016_03_30.models.OperationStatusResponse] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2016_03_30.models.OperationStatusResponse]] + :raises: :class:`CloudError` + """ + raw_result = self._restart_initial( + resource_group_name=resource_group_name, + vm_scale_set_name=vm_scale_set_name, + instance_id=instance_id, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('OperationStatusResponse', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + restart.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/virtualmachines/{instanceId}/restart'} + + + def _start_initial( + self, resource_group_name, vm_scale_set_name, instance_id, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.start.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), + 'instanceId': self._serialize.url("instance_id", instance_id, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('OperationStatusResponse', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def start( + self, resource_group_name, vm_scale_set_name, instance_id, custom_headers=None, raw=False, polling=True, **operation_config): + """Starts a virtual machine in a VM scale set. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param vm_scale_set_name: The name of the VM scale set. + :type vm_scale_set_name: str + :param instance_id: The instance ID of the virtual machine. + :type instance_id: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns OperationStatusResponse + or ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2016_03_30.models.OperationStatusResponse] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2016_03_30.models.OperationStatusResponse]] + :raises: :class:`CloudError` + """ + raw_result = self._start_initial( + resource_group_name=resource_group_name, + vm_scale_set_name=vm_scale_set_name, + instance_id=instance_id, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('OperationStatusResponse', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + start.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/virtualmachines/{instanceId}/start'} diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/operations/_virtual_machine_scale_sets_operations.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/operations/_virtual_machine_scale_sets_operations.py new file mode 100644 index 000000000000..baee8e663b52 --- /dev/null +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/operations/_virtual_machine_scale_sets_operations.py @@ -0,0 +1,1318 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse +from msrestazure.azure_exceptions import CloudError +from msrest.polling import LROPoller, NoPolling +from msrestazure.polling.arm_polling import ARMPolling + +from .. import models + + +class VirtualMachineScaleSetsOperations(object): + """VirtualMachineScaleSetsOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: Client Api Version. Constant value: "2016-03-30". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2016-03-30" + + self.config = config + + + def _create_or_update_initial( + self, resource_group_name, name, parameters, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.create_or_update.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vmScaleSetName': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(parameters, 'VirtualMachineScaleSet') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 201]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('VirtualMachineScaleSet', response) + if response.status_code == 201: + deserialized = self._deserialize('VirtualMachineScaleSet', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def create_or_update( + self, resource_group_name, name, parameters, custom_headers=None, raw=False, polling=True, **operation_config): + """Create or update a VM scale set. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param name: The name of the VM scale set to create or update. + :type name: str + :param parameters: The scale set object. + :type parameters: + ~azure.mgmt.compute.v2016_03_30.models.VirtualMachineScaleSet + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns VirtualMachineScaleSet + or ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2016_03_30.models.VirtualMachineScaleSet] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2016_03_30.models.VirtualMachineScaleSet]] + :raises: :class:`CloudError` + """ + raw_result = self._create_or_update_initial( + resource_group_name=resource_group_name, + name=name, + parameters=parameters, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('VirtualMachineScaleSet', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}'} + + + def _delete_initial( + self, resource_group_name, vm_scale_set_name, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.delete.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202, 204]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('OperationStatusResponse', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def delete( + self, resource_group_name, vm_scale_set_name, custom_headers=None, raw=False, polling=True, **operation_config): + """Deletes a VM scale set. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param vm_scale_set_name: The name of the VM scale set. + :type vm_scale_set_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns OperationStatusResponse + or ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2016_03_30.models.OperationStatusResponse] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2016_03_30.models.OperationStatusResponse]] + :raises: :class:`CloudError` + """ + raw_result = self._delete_initial( + resource_group_name=resource_group_name, + vm_scale_set_name=vm_scale_set_name, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('OperationStatusResponse', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}'} + + def get( + self, resource_group_name, vm_scale_set_name, custom_headers=None, raw=False, **operation_config): + """Display information about a virtual machine scale set. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param vm_scale_set_name: The name of the VM scale set. + :type vm_scale_set_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: VirtualMachineScaleSet or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.compute.v2016_03_30.models.VirtualMachineScaleSet + or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('VirtualMachineScaleSet', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}'} + + + def _deallocate_initial( + self, resource_group_name, vm_scale_set_name, instance_ids=None, custom_headers=None, raw=False, **operation_config): + vm_instance_ids = None + if instance_ids is not None: + vm_instance_ids = models.VirtualMachineScaleSetVMInstanceIDs(instance_ids=instance_ids) + + # Construct URL + url = self.deallocate.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + if vm_instance_ids is not None: + body_content = self._serialize.body(vm_instance_ids, 'VirtualMachineScaleSetVMInstanceIDs') + else: + body_content = None + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('OperationStatusResponse', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def deallocate( + self, resource_group_name, vm_scale_set_name, instance_ids=None, custom_headers=None, raw=False, polling=True, **operation_config): + """Deallocates specific virtual machines in a VM scale set. Shuts down the + virtual machines and releases the compute resources. You are not billed + for the compute resources that this virtual machine scale set + deallocates. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param vm_scale_set_name: The name of the VM scale set. + :type vm_scale_set_name: str + :param instance_ids: The virtual machine scale set instance ids. + Omitting the virtual machine scale set instance ids will result in the + operation being performed on all virtual machines in the virtual + machine scale set. + :type instance_ids: list[str] + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns OperationStatusResponse + or ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2016_03_30.models.OperationStatusResponse] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2016_03_30.models.OperationStatusResponse]] + :raises: :class:`CloudError` + """ + raw_result = self._deallocate_initial( + resource_group_name=resource_group_name, + vm_scale_set_name=vm_scale_set_name, + instance_ids=instance_ids, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('OperationStatusResponse', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + deallocate.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/deallocate'} + + + def _delete_instances_initial( + self, resource_group_name, vm_scale_set_name, instance_ids, custom_headers=None, raw=False, **operation_config): + vm_instance_ids = models.VirtualMachineScaleSetVMInstanceRequiredIDs(instance_ids=instance_ids) + + # Construct URL + url = self.delete_instances.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(vm_instance_ids, 'VirtualMachineScaleSetVMInstanceRequiredIDs') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('OperationStatusResponse', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def delete_instances( + self, resource_group_name, vm_scale_set_name, instance_ids, custom_headers=None, raw=False, polling=True, **operation_config): + """Deletes virtual machines in a VM scale set. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param vm_scale_set_name: The name of the VM scale set. + :type vm_scale_set_name: str + :param instance_ids: The virtual machine scale set instance ids. + :type instance_ids: list[str] + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns OperationStatusResponse + or ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2016_03_30.models.OperationStatusResponse] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2016_03_30.models.OperationStatusResponse]] + :raises: :class:`CloudError` + """ + raw_result = self._delete_instances_initial( + resource_group_name=resource_group_name, + vm_scale_set_name=vm_scale_set_name, + instance_ids=instance_ids, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('OperationStatusResponse', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + delete_instances.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/delete'} + + def get_instance_view( + self, resource_group_name, vm_scale_set_name, custom_headers=None, raw=False, **operation_config): + """Gets the status of a VM scale set instance. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param vm_scale_set_name: The name of the VM scale set. + :type vm_scale_set_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: VirtualMachineScaleSetInstanceView or ClientRawResponse if + raw=true + :rtype: + ~azure.mgmt.compute.v2016_03_30.models.VirtualMachineScaleSetInstanceView + or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get_instance_view.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('VirtualMachineScaleSetInstanceView', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_instance_view.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/instanceView'} + + def list( + self, resource_group_name, custom_headers=None, raw=False, **operation_config): + """Gets a list of all VM scale sets under a resource group. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of VirtualMachineScaleSet + :rtype: + ~azure.mgmt.compute.v2016_03_30.models.VirtualMachineScaleSetPaged[~azure.mgmt.compute.v2016_03_30.models.VirtualMachineScaleSet] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.VirtualMachineScaleSetPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets'} + + def list_all( + self, custom_headers=None, raw=False, **operation_config): + """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. + + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of VirtualMachineScaleSet + :rtype: + ~azure.mgmt.compute.v2016_03_30.models.VirtualMachineScaleSetPaged[~azure.mgmt.compute.v2016_03_30.models.VirtualMachineScaleSet] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_all.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.VirtualMachineScaleSetPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_all.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Compute/virtualMachineScaleSets'} + + def list_skus( + self, resource_group_name, vm_scale_set_name, custom_headers=None, raw=False, **operation_config): + """Gets a list of SKUs available for your VM scale set, including the + minimum and maximum VM instances allowed for each SKU. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param vm_scale_set_name: The name of the VM scale set. + :type vm_scale_set_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of VirtualMachineScaleSetSku + :rtype: + ~azure.mgmt.compute.v2016_03_30.models.VirtualMachineScaleSetSkuPaged[~azure.mgmt.compute.v2016_03_30.models.VirtualMachineScaleSetSku] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_skus.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.VirtualMachineScaleSetSkuPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_skus.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/skus'} + + + def _power_off_initial( + self, resource_group_name, vm_scale_set_name, instance_ids=None, custom_headers=None, raw=False, **operation_config): + vm_instance_ids = None + if instance_ids is not None: + vm_instance_ids = models.VirtualMachineScaleSetVMInstanceIDs(instance_ids=instance_ids) + + # Construct URL + url = self.power_off.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + if vm_instance_ids is not None: + body_content = self._serialize.body(vm_instance_ids, 'VirtualMachineScaleSetVMInstanceIDs') + else: + body_content = None + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('OperationStatusResponse', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def power_off( + self, resource_group_name, vm_scale_set_name, instance_ids=None, custom_headers=None, raw=False, polling=True, **operation_config): + """Power off (stop) one or more virtual machines in a VM scale set. Note + that resources are still attached and you are getting charged for the + resources. Instead, use deallocate to release resources and avoid + charges. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param vm_scale_set_name: The name of the VM scale set. + :type vm_scale_set_name: str + :param instance_ids: The virtual machine scale set instance ids. + Omitting the virtual machine scale set instance ids will result in the + operation being performed on all virtual machines in the virtual + machine scale set. + :type instance_ids: list[str] + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns OperationStatusResponse + or ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2016_03_30.models.OperationStatusResponse] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2016_03_30.models.OperationStatusResponse]] + :raises: :class:`CloudError` + """ + raw_result = self._power_off_initial( + resource_group_name=resource_group_name, + vm_scale_set_name=vm_scale_set_name, + instance_ids=instance_ids, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('OperationStatusResponse', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + power_off.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/poweroff'} + + + def _restart_initial( + self, resource_group_name, vm_scale_set_name, instance_ids=None, custom_headers=None, raw=False, **operation_config): + vm_instance_ids = None + if instance_ids is not None: + vm_instance_ids = models.VirtualMachineScaleSetVMInstanceIDs(instance_ids=instance_ids) + + # Construct URL + url = self.restart.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + if vm_instance_ids is not None: + body_content = self._serialize.body(vm_instance_ids, 'VirtualMachineScaleSetVMInstanceIDs') + else: + body_content = None + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('OperationStatusResponse', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def restart( + self, resource_group_name, vm_scale_set_name, instance_ids=None, custom_headers=None, raw=False, polling=True, **operation_config): + """Restarts one or more virtual machines in a VM scale set. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param vm_scale_set_name: The name of the VM scale set. + :type vm_scale_set_name: str + :param instance_ids: The virtual machine scale set instance ids. + Omitting the virtual machine scale set instance ids will result in the + operation being performed on all virtual machines in the virtual + machine scale set. + :type instance_ids: list[str] + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns OperationStatusResponse + or ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2016_03_30.models.OperationStatusResponse] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2016_03_30.models.OperationStatusResponse]] + :raises: :class:`CloudError` + """ + raw_result = self._restart_initial( + resource_group_name=resource_group_name, + vm_scale_set_name=vm_scale_set_name, + instance_ids=instance_ids, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('OperationStatusResponse', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + restart.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/restart'} + + + def _start_initial( + self, resource_group_name, vm_scale_set_name, instance_ids=None, custom_headers=None, raw=False, **operation_config): + vm_instance_ids = None + if instance_ids is not None: + vm_instance_ids = models.VirtualMachineScaleSetVMInstanceIDs(instance_ids=instance_ids) + + # Construct URL + url = self.start.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + if vm_instance_ids is not None: + body_content = self._serialize.body(vm_instance_ids, 'VirtualMachineScaleSetVMInstanceIDs') + else: + body_content = None + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('OperationStatusResponse', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def start( + self, resource_group_name, vm_scale_set_name, instance_ids=None, custom_headers=None, raw=False, polling=True, **operation_config): + """Starts one or more virtual machines in a VM scale set. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param vm_scale_set_name: The name of the VM scale set. + :type vm_scale_set_name: str + :param instance_ids: The virtual machine scale set instance ids. + Omitting the virtual machine scale set instance ids will result in the + operation being performed on all virtual machines in the virtual + machine scale set. + :type instance_ids: list[str] + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns OperationStatusResponse + or ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2016_03_30.models.OperationStatusResponse] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2016_03_30.models.OperationStatusResponse]] + :raises: :class:`CloudError` + """ + raw_result = self._start_initial( + resource_group_name=resource_group_name, + vm_scale_set_name=vm_scale_set_name, + instance_ids=instance_ids, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('OperationStatusResponse', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + start.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/start'} + + + def _update_instances_initial( + self, resource_group_name, vm_scale_set_name, instance_ids, custom_headers=None, raw=False, **operation_config): + vm_instance_ids = models.VirtualMachineScaleSetVMInstanceRequiredIDs(instance_ids=instance_ids) + + # Construct URL + url = self.update_instances.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(vm_instance_ids, 'VirtualMachineScaleSetVMInstanceRequiredIDs') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('OperationStatusResponse', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def update_instances( + self, resource_group_name, vm_scale_set_name, instance_ids, custom_headers=None, raw=False, polling=True, **operation_config): + """Upgrades one or more virtual machines to the latest SKU set in the VM + scale set model. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param vm_scale_set_name: The name of the VM scale set. + :type vm_scale_set_name: str + :param instance_ids: The virtual machine scale set instance ids. + :type instance_ids: list[str] + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns OperationStatusResponse + or ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2016_03_30.models.OperationStatusResponse] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2016_03_30.models.OperationStatusResponse]] + :raises: :class:`CloudError` + """ + raw_result = self._update_instances_initial( + resource_group_name=resource_group_name, + vm_scale_set_name=vm_scale_set_name, + instance_ids=instance_ids, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('OperationStatusResponse', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + update_instances.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/manualupgrade'} + + + def _reimage_initial( + self, resource_group_name, vm_scale_set_name, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.reimage.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('OperationStatusResponse', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def reimage( + self, resource_group_name, vm_scale_set_name, custom_headers=None, raw=False, polling=True, **operation_config): + """Reimages (upgrade the operating system) one or more virtual machines in + a VM scale set. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param vm_scale_set_name: The name of the VM scale set. + :type vm_scale_set_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns OperationStatusResponse + or ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2016_03_30.models.OperationStatusResponse] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2016_03_30.models.OperationStatusResponse]] + :raises: :class:`CloudError` + """ + raw_result = self._reimage_initial( + resource_group_name=resource_group_name, + vm_scale_set_name=vm_scale_set_name, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('OperationStatusResponse', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + reimage.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/reimage'} diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/operations/_virtual_machine_sizes_operations.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/operations/_virtual_machine_sizes_operations.py new file mode 100644 index 000000000000..9639eb700639 --- /dev/null +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/operations/_virtual_machine_sizes_operations.py @@ -0,0 +1,111 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse +from msrestazure.azure_exceptions import CloudError + +from .. import models + + +class VirtualMachineSizesOperations(object): + """VirtualMachineSizesOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: Client Api Version. Constant value: "2016-03-30". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2016-03-30" + + self.config = config + + def list( + self, location, custom_headers=None, raw=False, **operation_config): + """Lists all available virtual machine sizes for a subscription in a + location. + + :param location: The location upon which virtual-machine-sizes is + queried. + :type location: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of VirtualMachineSize + :rtype: + ~azure.mgmt.compute.v2016_03_30.models.VirtualMachineSizePaged[~azure.mgmt.compute.v2016_03_30.models.VirtualMachineSize] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list.metadata['url'] + path_format_arguments = { + 'location': self._serialize.url("location", location, 'str', pattern=r'^[-\w\._]+$'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.VirtualMachineSizePaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/vmSizes'} diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/operations/_virtual_machines_operations.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/operations/_virtual_machines_operations.py new file mode 100644 index 000000000000..5b44e409d885 --- /dev/null +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/operations/_virtual_machines_operations.py @@ -0,0 +1,1221 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse +from msrestazure.azure_exceptions import CloudError +from msrest.polling import LROPoller, NoPolling +from msrestazure.polling.arm_polling import ARMPolling + +from .. import models + + +class VirtualMachinesOperations(object): + """VirtualMachinesOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: Client Api Version. Constant value: "2016-03-30". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2016-03-30" + + self.config = config + + def get_extensions( + self, resource_group_name, vm_name, expand=None, custom_headers=None, raw=False, **operation_config): + """The operation to get all extensions of a Virtual Machine. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param vm_name: The name of the virtual machine containing the + extension. + :type vm_name: str + :param expand: The expand expression to apply on the operation. + :type expand: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: VirtualMachineExtensionsListResult or ClientRawResponse if + raw=true + :rtype: + ~azure.mgmt.compute.v2016_03_30.models.VirtualMachineExtensionsListResult + or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get_extensions.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vmName': self._serialize.url("vm_name", vm_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + if expand is not None: + query_parameters['$expand'] = self._serialize.query("expand", expand, 'str') + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('VirtualMachineExtensionsListResult', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_extensions.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/extensions'} + + + def _capture_initial( + self, resource_group_name, vm_name, parameters, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.capture.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vmName': self._serialize.url("vm_name", vm_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(parameters, 'VirtualMachineCaptureParameters') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('VirtualMachineCaptureResult', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def capture( + self, resource_group_name, vm_name, parameters, custom_headers=None, raw=False, polling=True, **operation_config): + """Captures the VM by copying virtual hard disks of the VM and outputs a + template that can be used to create similar VMs. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param vm_name: The name of the virtual machine. + :type vm_name: str + :param parameters: Parameters supplied to the Capture Virtual Machine + operation. + :type parameters: + ~azure.mgmt.compute.v2016_03_30.models.VirtualMachineCaptureParameters + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns + VirtualMachineCaptureResult or + ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2016_03_30.models.VirtualMachineCaptureResult] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2016_03_30.models.VirtualMachineCaptureResult]] + :raises: :class:`CloudError` + """ + raw_result = self._capture_initial( + resource_group_name=resource_group_name, + vm_name=vm_name, + parameters=parameters, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('VirtualMachineCaptureResult', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + capture.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/capture'} + + + def _create_or_update_initial( + self, resource_group_name, vm_name, parameters, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.create_or_update.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vmName': self._serialize.url("vm_name", vm_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(parameters, 'VirtualMachine') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 201]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('VirtualMachine', response) + if response.status_code == 201: + deserialized = self._deserialize('VirtualMachine', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def create_or_update( + self, resource_group_name, vm_name, parameters, custom_headers=None, raw=False, polling=True, **operation_config): + """The operation to create or update a virtual machine. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param vm_name: The name of the virtual machine. + :type vm_name: str + :param parameters: Parameters supplied to the Create Virtual Machine + operation. + :type parameters: + ~azure.mgmt.compute.v2016_03_30.models.VirtualMachine + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns VirtualMachine or + ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2016_03_30.models.VirtualMachine] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2016_03_30.models.VirtualMachine]] + :raises: :class:`CloudError` + """ + raw_result = self._create_or_update_initial( + resource_group_name=resource_group_name, + vm_name=vm_name, + parameters=parameters, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('VirtualMachine', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}'} + + + def _delete_initial( + self, resource_group_name, vm_name, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.delete.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vmName': self._serialize.url("vm_name", vm_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202, 204]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('OperationStatusResponse', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def delete( + self, resource_group_name, vm_name, custom_headers=None, raw=False, polling=True, **operation_config): + """The operation to delete a virtual machine. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param vm_name: The name of the virtual machine. + :type vm_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns OperationStatusResponse + or ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2016_03_30.models.OperationStatusResponse] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2016_03_30.models.OperationStatusResponse]] + :raises: :class:`CloudError` + """ + raw_result = self._delete_initial( + resource_group_name=resource_group_name, + vm_name=vm_name, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('OperationStatusResponse', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}'} + + def get( + self, resource_group_name, vm_name, expand=None, custom_headers=None, raw=False, **operation_config): + """Retrieves information about the model view or the instance view of a + virtual machine. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param vm_name: The name of the virtual machine. + :type vm_name: str + :param expand: The expand expression to apply on the operation. + Possible values include: 'instanceView' + :type expand: str or + ~azure.mgmt.compute.v2016_03_30.models.InstanceViewTypes + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: VirtualMachine or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.compute.v2016_03_30.models.VirtualMachine or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vmName': self._serialize.url("vm_name", vm_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + if expand is not None: + query_parameters['$expand'] = self._serialize.query("expand", expand, 'InstanceViewTypes') + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('VirtualMachine', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}'} + + + def _deallocate_initial( + self, resource_group_name, vm_name, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.deallocate.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vmName': self._serialize.url("vm_name", vm_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('OperationStatusResponse', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def deallocate( + self, resource_group_name, vm_name, custom_headers=None, raw=False, polling=True, **operation_config): + """Shuts down the virtual machine and releases the compute resources. You + are not billed for the compute resources that this virtual machine + uses. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param vm_name: The name of the virtual machine. + :type vm_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns OperationStatusResponse + or ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2016_03_30.models.OperationStatusResponse] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2016_03_30.models.OperationStatusResponse]] + :raises: :class:`CloudError` + """ + raw_result = self._deallocate_initial( + resource_group_name=resource_group_name, + vm_name=vm_name, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('OperationStatusResponse', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + deallocate.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/deallocate'} + + def generalize( + self, resource_group_name, vm_name, custom_headers=None, raw=False, **operation_config): + """Sets the state of the virtual machine to generalized. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param vm_name: The name of the virtual machine. + :type vm_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: OperationStatusResponse or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.compute.v2016_03_30.models.OperationStatusResponse + or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.generalize.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vmName': self._serialize.url("vm_name", vm_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('OperationStatusResponse', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + generalize.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/generalize'} + + def list( + self, resource_group_name, custom_headers=None, raw=False, **operation_config): + """Lists all of the virtual machines in the specified resource group. Use + the nextLink property in the response to get the next page of virtual + machines. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of VirtualMachine + :rtype: + ~azure.mgmt.compute.v2016_03_30.models.VirtualMachinePaged[~azure.mgmt.compute.v2016_03_30.models.VirtualMachine] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.VirtualMachinePaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines'} + + def list_all( + self, custom_headers=None, raw=False, **operation_config): + """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. + + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of VirtualMachine + :rtype: + ~azure.mgmt.compute.v2016_03_30.models.VirtualMachinePaged[~azure.mgmt.compute.v2016_03_30.models.VirtualMachine] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_all.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.VirtualMachinePaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_all.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Compute/virtualMachines'} + + def list_available_sizes( + self, resource_group_name, vm_name, custom_headers=None, raw=False, **operation_config): + """Lists all available virtual machine sizes to which the specified + virtual machine can be resized. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param vm_name: The name of the virtual machine. + :type vm_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of VirtualMachineSize + :rtype: + ~azure.mgmt.compute.v2016_03_30.models.VirtualMachineSizePaged[~azure.mgmt.compute.v2016_03_30.models.VirtualMachineSize] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_available_sizes.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vmName': self._serialize.url("vm_name", vm_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.VirtualMachineSizePaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_available_sizes.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/vmSizes'} + + + def _power_off_initial( + self, resource_group_name, vm_name, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.power_off.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vmName': self._serialize.url("vm_name", vm_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('OperationStatusResponse', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def power_off( + self, resource_group_name, vm_name, custom_headers=None, raw=False, polling=True, **operation_config): + """The operation to power off (stop) a virtual machine. The virtual + machine can be restarted with the same provisioned resources. You are + still charged for this virtual machine. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param vm_name: The name of the virtual machine. + :type vm_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns OperationStatusResponse + or ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2016_03_30.models.OperationStatusResponse] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2016_03_30.models.OperationStatusResponse]] + :raises: :class:`CloudError` + """ + raw_result = self._power_off_initial( + resource_group_name=resource_group_name, + vm_name=vm_name, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('OperationStatusResponse', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + power_off.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/powerOff'} + + + def _restart_initial( + self, resource_group_name, vm_name, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.restart.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vmName': self._serialize.url("vm_name", vm_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('OperationStatusResponse', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def restart( + self, resource_group_name, vm_name, custom_headers=None, raw=False, polling=True, **operation_config): + """The operation to restart a virtual machine. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param vm_name: The name of the virtual machine. + :type vm_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns OperationStatusResponse + or ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2016_03_30.models.OperationStatusResponse] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2016_03_30.models.OperationStatusResponse]] + :raises: :class:`CloudError` + """ + raw_result = self._restart_initial( + resource_group_name=resource_group_name, + vm_name=vm_name, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('OperationStatusResponse', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + restart.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/restart'} + + + def _start_initial( + self, resource_group_name, vm_name, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.start.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vmName': self._serialize.url("vm_name", vm_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('OperationStatusResponse', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def start( + self, resource_group_name, vm_name, custom_headers=None, raw=False, polling=True, **operation_config): + """The operation to start a virtual machine. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param vm_name: The name of the virtual machine. + :type vm_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns OperationStatusResponse + or ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2016_03_30.models.OperationStatusResponse] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2016_03_30.models.OperationStatusResponse]] + :raises: :class:`CloudError` + """ + raw_result = self._start_initial( + resource_group_name=resource_group_name, + vm_name=vm_name, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('OperationStatusResponse', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + start.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/start'} + + + def _redeploy_initial( + self, resource_group_name, vm_name, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.redeploy.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vmName': self._serialize.url("vm_name", vm_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('OperationStatusResponse', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def redeploy( + self, resource_group_name, vm_name, custom_headers=None, raw=False, polling=True, **operation_config): + """The operation to redeploy a virtual machine. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param vm_name: The name of the virtual machine. + :type vm_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns OperationStatusResponse + or ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2016_03_30.models.OperationStatusResponse] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2016_03_30.models.OperationStatusResponse]] + :raises: :class:`CloudError` + """ + raw_result = self._redeploy_initial( + resource_group_name=resource_group_name, + vm_name=vm_name, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('OperationStatusResponse', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + redeploy.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/redeploy'} diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/operations/availability_sets_operations.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/operations/availability_sets_operations.py deleted file mode 100644 index a7890fbf4de1..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/operations/availability_sets_operations.py +++ /dev/null @@ -1,434 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError - -from .. import models - - -class AvailabilitySetsOperations(object): - """AvailabilitySetsOperations operations. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: Client Api Version. Constant value: "2016-03-30". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2016-03-30" - - self.config = config - - def create_or_update( - self, resource_group_name, name, parameters, custom_headers=None, raw=False, **operation_config): - """Create or update an availability set. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param name: The name of the availability set. - :type name: str - :param parameters: Parameters supplied to the Create Availability Set - operation. - :type parameters: - ~azure.mgmt.compute.v2016_03_30.models.AvailabilitySet - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: AvailabilitySet or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.compute.v2016_03_30.models.AvailabilitySet or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.create_or_update.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'availabilitySetName': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(parameters, 'AvailabilitySet') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('AvailabilitySet', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}'} - - def delete( - self, resource_group_name, availability_set_name, custom_headers=None, raw=False, **operation_config): - """Delete an availability set. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param availability_set_name: The name of the availability set. - :type availability_set_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: OperationStatusResponse or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.compute.v2016_03_30.models.OperationStatusResponse - or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.delete.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'availabilitySetName': self._serialize.url("availability_set_name", availability_set_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 204]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('OperationStatusResponse', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}'} - - def get( - self, resource_group_name, availability_set_name, custom_headers=None, raw=False, **operation_config): - """Retrieves information about an availability set. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param availability_set_name: The name of the availability set. - :type availability_set_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: AvailabilitySet or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.compute.v2016_03_30.models.AvailabilitySet or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'availabilitySetName': self._serialize.url("availability_set_name", availability_set_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('AvailabilitySet', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}'} - - def list_by_subscription( - self, custom_headers=None, raw=False, **operation_config): - """Lists all availability sets in a subscription. - - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of AvailabilitySet - :rtype: - ~azure.mgmt.compute.v2016_03_30.models.AvailabilitySetPaged[~azure.mgmt.compute.v2016_03_30.models.AvailabilitySet] - :raises: :class:`CloudError` - """ - def internal_paging(next_link=None, raw=False): - - if not next_link: - # Construct URL - url = self.list_by_subscription.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - deserialized = models.AvailabilitySetPaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.AvailabilitySetPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - list_by_subscription.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Compute/availabilitySets'} - - def list( - self, resource_group_name, custom_headers=None, raw=False, **operation_config): - """Lists all availability sets in a resource group. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of AvailabilitySet - :rtype: - ~azure.mgmt.compute.v2016_03_30.models.AvailabilitySetPaged[~azure.mgmt.compute.v2016_03_30.models.AvailabilitySet] - :raises: :class:`CloudError` - """ - def internal_paging(next_link=None, raw=False): - - if not next_link: - # Construct URL - url = self.list.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - deserialized = models.AvailabilitySetPaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.AvailabilitySetPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets'} - - def list_available_sizes( - self, resource_group_name, availability_set_name, custom_headers=None, raw=False, **operation_config): - """Lists all available virtual machine sizes that can be used to create a - new virtual machine in an existing availability set. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param availability_set_name: The name of the availability set. - :type availability_set_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of VirtualMachineSize - :rtype: - ~azure.mgmt.compute.v2016_03_30.models.VirtualMachineSizePaged[~azure.mgmt.compute.v2016_03_30.models.VirtualMachineSize] - :raises: :class:`CloudError` - """ - def internal_paging(next_link=None, raw=False): - - if not next_link: - # Construct URL - url = self.list_available_sizes.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'availabilitySetName': self._serialize.url("availability_set_name", availability_set_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - deserialized = models.VirtualMachineSizePaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.VirtualMachineSizePaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - list_available_sizes.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}/vmSizes'} diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/operations/usage_operations.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/operations/usage_operations.py deleted file mode 100644 index 2ca87e98cfaf..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/operations/usage_operations.py +++ /dev/null @@ -1,107 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError - -from .. import models - - -class UsageOperations(object): - """UsageOperations operations. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: Client Api Version. Constant value: "2016-03-30". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2016-03-30" - - self.config = config - - def list( - self, location, custom_headers=None, raw=False, **operation_config): - """Gets, for the specified location, the current compute resource usage - information as well as the limits for compute resources under the - subscription. - - :param location: The location for which resource usage is queried. - :type location: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of Usage - :rtype: - ~azure.mgmt.compute.v2016_03_30.models.UsagePaged[~azure.mgmt.compute.v2016_03_30.models.Usage] - :raises: :class:`CloudError` - """ - def internal_paging(next_link=None, raw=False): - - if not next_link: - # Construct URL - url = self.list.metadata['url'] - path_format_arguments = { - 'location': self._serialize.url("location", location, 'str', pattern=r'^[-\w\._]+$'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - deserialized = models.UsagePaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.UsagePaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/usages'} diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/operations/virtual_machine_extension_images_operations.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/operations/virtual_machine_extension_images_operations.py deleted file mode 100644 index eee74faaf3b8..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/operations/virtual_machine_extension_images_operations.py +++ /dev/null @@ -1,248 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError - -from .. import models - - -class VirtualMachineExtensionImagesOperations(object): - """VirtualMachineExtensionImagesOperations operations. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: Client Api Version. Constant value: "2016-03-30". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2016-03-30" - - self.config = config - - def get( - self, location, publisher_name, type, version, custom_headers=None, raw=False, **operation_config): - """Gets a virtual machine extension image. - - :param location: The name of a supported Azure region. - :type location: str - :param publisher_name: - :type publisher_name: str - :param type: - :type type: str - :param version: - :type version: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: VirtualMachineExtensionImage or ClientRawResponse if raw=true - :rtype: - ~azure.mgmt.compute.v2016_03_30.models.VirtualMachineExtensionImage or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get.metadata['url'] - path_format_arguments = { - 'location': self._serialize.url("location", location, 'str'), - 'publisherName': self._serialize.url("publisher_name", publisher_name, 'str'), - 'type': self._serialize.url("type", type, 'str'), - 'version': self._serialize.url("version", version, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('VirtualMachineExtensionImage', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/publishers/{publisherName}/artifacttypes/vmextension/types/{type}/versions/{version}'} - - def list_types( - self, location, publisher_name, custom_headers=None, raw=False, **operation_config): - """Gets a list of virtual machine extension image types. - - :param location: The name of a supported Azure region. - :type location: str - :param publisher_name: - :type publisher_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: list or ClientRawResponse if raw=true - :rtype: - list[~azure.mgmt.compute.v2016_03_30.models.VirtualMachineExtensionImage] - or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.list_types.metadata['url'] - path_format_arguments = { - 'location': self._serialize.url("location", location, 'str'), - 'publisherName': self._serialize.url("publisher_name", publisher_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('[VirtualMachineExtensionImage]', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - list_types.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/publishers/{publisherName}/artifacttypes/vmextension/types'} - - def list_versions( - self, location, publisher_name, type, filter=None, top=None, orderby=None, custom_headers=None, raw=False, **operation_config): - """Gets a list of virtual machine extension image versions. - - :param location: The name of a supported Azure region. - :type location: str - :param publisher_name: - :type publisher_name: str - :param type: - :type type: str - :param filter: The filter to apply on the operation. - :type filter: str - :param top: - :type top: int - :param orderby: - :type orderby: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: list or ClientRawResponse if raw=true - :rtype: - list[~azure.mgmt.compute.v2016_03_30.models.VirtualMachineExtensionImage] - or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.list_versions.metadata['url'] - path_format_arguments = { - 'location': self._serialize.url("location", location, 'str'), - 'publisherName': self._serialize.url("publisher_name", publisher_name, 'str'), - 'type': self._serialize.url("type", type, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - if filter is not None: - query_parameters['$filter'] = self._serialize.query("filter", filter, 'str') - if top is not None: - query_parameters['$top'] = self._serialize.query("top", top, 'int') - if orderby is not None: - query_parameters['$orderby'] = self._serialize.query("orderby", orderby, 'str') - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('[VirtualMachineExtensionImage]', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - list_versions.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/publishers/{publisherName}/artifacttypes/vmextension/types/{type}/versions'} diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/operations/virtual_machine_extensions_operations.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/operations/virtual_machine_extensions_operations.py deleted file mode 100644 index 756ded71da17..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/operations/virtual_machine_extensions_operations.py +++ /dev/null @@ -1,424 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError -from msrest.polling import LROPoller, NoPolling -from msrestazure.polling.arm_polling import ARMPolling - -from .. import models - - -class VirtualMachineExtensionsOperations(object): - """VirtualMachineExtensionsOperations operations. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: Client Api Version. Constant value: "2016-03-30". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2016-03-30" - - self.config = config - - - def _create_or_update_initial( - self, resource_group_name, vm_name, vm_extension_name, extension_parameters, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.create_or_update.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'vmName': self._serialize.url("vm_name", vm_name, 'str'), - 'vmExtensionName': self._serialize.url("vm_extension_name", vm_extension_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(extension_parameters, 'VirtualMachineExtension') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 201]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('VirtualMachineExtension', response) - if response.status_code == 201: - deserialized = self._deserialize('VirtualMachineExtension', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def create_or_update( - self, resource_group_name, vm_name, vm_extension_name, extension_parameters, custom_headers=None, raw=False, polling=True, **operation_config): - """The operation to create or update the extension. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param vm_name: The name of the virtual machine where the extension - should be created or updated. - :type vm_name: str - :param vm_extension_name: The name of the virtual machine extension. - :type vm_extension_name: str - :param extension_parameters: Parameters supplied to the Create Virtual - Machine Extension operation. - :type extension_parameters: - ~azure.mgmt.compute.v2016_03_30.models.VirtualMachineExtension - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns VirtualMachineExtension - or ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2016_03_30.models.VirtualMachineExtension] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2016_03_30.models.VirtualMachineExtension]] - :raises: :class:`CloudError` - """ - raw_result = self._create_or_update_initial( - resource_group_name=resource_group_name, - vm_name=vm_name, - vm_extension_name=vm_extension_name, - extension_parameters=extension_parameters, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('VirtualMachineExtension', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/extensions/{vmExtensionName}'} - - - def _update_initial( - self, resource_group_name, vm_name, vm_extension_name, extension_parameters, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.update.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'vmName': self._serialize.url("vm_name", vm_name, 'str'), - 'vmExtensionName': self._serialize.url("vm_extension_name", vm_extension_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(extension_parameters, 'VirtualMachineExtensionUpdate') - - # Construct and send request - request = self._client.patch(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('VirtualMachineExtension', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def update( - self, resource_group_name, vm_name, vm_extension_name, extension_parameters, custom_headers=None, raw=False, polling=True, **operation_config): - """The operation to update the extension. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param vm_name: The name of the virtual machine where the extension - should be updated. - :type vm_name: str - :param vm_extension_name: The name of the virtual machine extension. - :type vm_extension_name: str - :param extension_parameters: Parameters supplied to the Update Virtual - Machine Extension operation. - :type extension_parameters: - ~azure.mgmt.compute.v2016_03_30.models.VirtualMachineExtensionUpdate - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns VirtualMachineExtension - or ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2016_03_30.models.VirtualMachineExtension] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2016_03_30.models.VirtualMachineExtension]] - :raises: :class:`CloudError` - """ - raw_result = self._update_initial( - resource_group_name=resource_group_name, - vm_name=vm_name, - vm_extension_name=vm_extension_name, - extension_parameters=extension_parameters, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('VirtualMachineExtension', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/extensions/{vmExtensionName}'} - - - def _delete_initial( - self, resource_group_name, vm_name, vm_extension_name, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.delete.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'vmName': self._serialize.url("vm_name", vm_name, 'str'), - 'vmExtensionName': self._serialize.url("vm_extension_name", vm_extension_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202, 204]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('OperationStatusResponse', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def delete( - self, resource_group_name, vm_name, vm_extension_name, custom_headers=None, raw=False, polling=True, **operation_config): - """The operation to delete the extension. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param vm_name: The name of the virtual machine where the extension - should be deleted. - :type vm_name: str - :param vm_extension_name: The name of the virtual machine extension. - :type vm_extension_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns OperationStatusResponse - or ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2016_03_30.models.OperationStatusResponse] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2016_03_30.models.OperationStatusResponse]] - :raises: :class:`CloudError` - """ - raw_result = self._delete_initial( - resource_group_name=resource_group_name, - vm_name=vm_name, - vm_extension_name=vm_extension_name, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('OperationStatusResponse', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/extensions/{vmExtensionName}'} - - def get( - self, resource_group_name, vm_name, vm_extension_name, expand=None, custom_headers=None, raw=False, **operation_config): - """The operation to get the extension. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param vm_name: The name of the virtual machine containing the - extension. - :type vm_name: str - :param vm_extension_name: The name of the virtual machine extension. - :type vm_extension_name: str - :param expand: The expand expression to apply on the operation. - :type expand: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: VirtualMachineExtension or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.compute.v2016_03_30.models.VirtualMachineExtension - or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'vmName': self._serialize.url("vm_name", vm_name, 'str'), - 'vmExtensionName': self._serialize.url("vm_extension_name", vm_extension_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - if expand is not None: - query_parameters['$expand'] = self._serialize.query("expand", expand, 'str') - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('VirtualMachineExtension', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/extensions/{vmExtensionName}'} diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/operations/virtual_machine_images_operations.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/operations/virtual_machine_images_operations.py deleted file mode 100644 index b38bebea0e38..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/operations/virtual_machine_images_operations.py +++ /dev/null @@ -1,383 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError - -from .. import models - - -class VirtualMachineImagesOperations(object): - """VirtualMachineImagesOperations operations. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: Client Api Version. Constant value: "2016-03-30". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2016-03-30" - - self.config = config - - def get( - self, location, publisher_name, offer, skus, version, custom_headers=None, raw=False, **operation_config): - """Gets a virtual machine image. - - :param location: The name of a supported Azure region. - :type location: str - :param publisher_name: A valid image publisher. - :type publisher_name: str - :param offer: A valid image publisher offer. - :type offer: str - :param skus: A valid image SKU. - :type skus: str - :param version: A valid image SKU version. - :type version: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: VirtualMachineImage or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.compute.v2016_03_30.models.VirtualMachineImage or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get.metadata['url'] - path_format_arguments = { - 'location': self._serialize.url("location", location, 'str'), - 'publisherName': self._serialize.url("publisher_name", publisher_name, 'str'), - 'offer': self._serialize.url("offer", offer, 'str'), - 'skus': self._serialize.url("skus", skus, 'str'), - 'version': self._serialize.url("version", version, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('VirtualMachineImage', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/publishers/{publisherName}/artifacttypes/vmimage/offers/{offer}/skus/{skus}/versions/{version}'} - - def list( - self, location, publisher_name, offer, skus, filter=None, top=None, orderby=None, custom_headers=None, raw=False, **operation_config): - """Gets a list of all virtual machine image versions for the specified - location, publisher, offer, and SKU. - - :param location: The name of a supported Azure region. - :type location: str - :param publisher_name: A valid image publisher. - :type publisher_name: str - :param offer: A valid image publisher offer. - :type offer: str - :param skus: A valid image SKU. - :type skus: str - :param filter: The filter to apply on the operation. - :type filter: str - :param top: - :type top: int - :param orderby: - :type orderby: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: list or ClientRawResponse if raw=true - :rtype: - list[~azure.mgmt.compute.v2016_03_30.models.VirtualMachineImageResource] - or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.list.metadata['url'] - path_format_arguments = { - 'location': self._serialize.url("location", location, 'str'), - 'publisherName': self._serialize.url("publisher_name", publisher_name, 'str'), - 'offer': self._serialize.url("offer", offer, 'str'), - 'skus': self._serialize.url("skus", skus, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - if filter is not None: - query_parameters['$filter'] = self._serialize.query("filter", filter, 'str') - if top is not None: - query_parameters['$top'] = self._serialize.query("top", top, 'int') - if orderby is not None: - query_parameters['$orderby'] = self._serialize.query("orderby", orderby, 'str') - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('[VirtualMachineImageResource]', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/publishers/{publisherName}/artifacttypes/vmimage/offers/{offer}/skus/{skus}/versions'} - - def list_offers( - self, location, publisher_name, custom_headers=None, raw=False, **operation_config): - """Gets a list of virtual machine image offers for the specified location - and publisher. - - :param location: The name of a supported Azure region. - :type location: str - :param publisher_name: A valid image publisher. - :type publisher_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: list or ClientRawResponse if raw=true - :rtype: - list[~azure.mgmt.compute.v2016_03_30.models.VirtualMachineImageResource] - or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.list_offers.metadata['url'] - path_format_arguments = { - 'location': self._serialize.url("location", location, 'str'), - 'publisherName': self._serialize.url("publisher_name", publisher_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('[VirtualMachineImageResource]', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - list_offers.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/publishers/{publisherName}/artifacttypes/vmimage/offers'} - - def list_publishers( - self, location, custom_headers=None, raw=False, **operation_config): - """Gets a list of virtual machine image publishers for the specified Azure - location. - - :param location: The name of a supported Azure region. - :type location: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: list or ClientRawResponse if raw=true - :rtype: - list[~azure.mgmt.compute.v2016_03_30.models.VirtualMachineImageResource] - or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.list_publishers.metadata['url'] - path_format_arguments = { - 'location': self._serialize.url("location", location, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('[VirtualMachineImageResource]', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - list_publishers.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/publishers'} - - def list_skus( - self, location, publisher_name, offer, custom_headers=None, raw=False, **operation_config): - """Gets a list of virtual machine image SKUs for the specified location, - publisher, and offer. - - :param location: The name of a supported Azure region. - :type location: str - :param publisher_name: A valid image publisher. - :type publisher_name: str - :param offer: A valid image publisher offer. - :type offer: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: list or ClientRawResponse if raw=true - :rtype: - list[~azure.mgmt.compute.v2016_03_30.models.VirtualMachineImageResource] - or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.list_skus.metadata['url'] - path_format_arguments = { - 'location': self._serialize.url("location", location, 'str'), - 'publisherName': self._serialize.url("publisher_name", publisher_name, 'str'), - 'offer': self._serialize.url("offer", offer, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('[VirtualMachineImageResource]', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - list_skus.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/publishers/{publisherName}/artifacttypes/vmimage/offers/{offer}/skus'} diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/operations/virtual_machine_scale_set_vms_operations.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/operations/virtual_machine_scale_set_vms_operations.py deleted file mode 100644 index 090d0eed4e03..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/operations/virtual_machine_scale_set_vms_operations.py +++ /dev/null @@ -1,844 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError -from msrest.polling import LROPoller, NoPolling -from msrestazure.polling.arm_polling import ARMPolling - -from .. import models - - -class VirtualMachineScaleSetVMsOperations(object): - """VirtualMachineScaleSetVMsOperations operations. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: Client Api Version. Constant value: "2016-03-30". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2016-03-30" - - self.config = config - - - def _reimage_initial( - self, resource_group_name, vm_scale_set_name, instance_id, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.reimage.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), - 'instanceId': self._serialize.url("instance_id", instance_id, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('OperationStatusResponse', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def reimage( - self, resource_group_name, vm_scale_set_name, instance_id, custom_headers=None, raw=False, polling=True, **operation_config): - """Reimages (upgrade the operating system) a specific virtual machine in a - VM scale set. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param vm_scale_set_name: The name of the VM scale set. - :type vm_scale_set_name: str - :param instance_id: The instance ID of the virtual machine. - :type instance_id: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns OperationStatusResponse - or ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2016_03_30.models.OperationStatusResponse] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2016_03_30.models.OperationStatusResponse]] - :raises: :class:`CloudError` - """ - raw_result = self._reimage_initial( - resource_group_name=resource_group_name, - vm_scale_set_name=vm_scale_set_name, - instance_id=instance_id, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('OperationStatusResponse', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - reimage.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/virtualmachines/{instanceId}/reimage'} - - - def _deallocate_initial( - self, resource_group_name, vm_scale_set_name, instance_id, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.deallocate.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), - 'instanceId': self._serialize.url("instance_id", instance_id, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('OperationStatusResponse', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def deallocate( - self, resource_group_name, vm_scale_set_name, instance_id, custom_headers=None, raw=False, polling=True, **operation_config): - """Deallocates a specific virtual machine in a VM scale set. Shuts down - the virtual machine and releases the compute resources it uses. You are - not billed for the compute resources of this virtual machine once it is - deallocated. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param vm_scale_set_name: The name of the VM scale set. - :type vm_scale_set_name: str - :param instance_id: The instance ID of the virtual machine. - :type instance_id: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns OperationStatusResponse - or ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2016_03_30.models.OperationStatusResponse] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2016_03_30.models.OperationStatusResponse]] - :raises: :class:`CloudError` - """ - raw_result = self._deallocate_initial( - resource_group_name=resource_group_name, - vm_scale_set_name=vm_scale_set_name, - instance_id=instance_id, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('OperationStatusResponse', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - deallocate.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/virtualmachines/{instanceId}/deallocate'} - - - def _delete_initial( - self, resource_group_name, vm_scale_set_name, instance_id, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.delete.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), - 'instanceId': self._serialize.url("instance_id", instance_id, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202, 204]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('OperationStatusResponse', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def delete( - self, resource_group_name, vm_scale_set_name, instance_id, custom_headers=None, raw=False, polling=True, **operation_config): - """Deletes a virtual machine from a VM scale set. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param vm_scale_set_name: The name of the VM scale set. - :type vm_scale_set_name: str - :param instance_id: The instance ID of the virtual machine. - :type instance_id: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns OperationStatusResponse - or ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2016_03_30.models.OperationStatusResponse] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2016_03_30.models.OperationStatusResponse]] - :raises: :class:`CloudError` - """ - raw_result = self._delete_initial( - resource_group_name=resource_group_name, - vm_scale_set_name=vm_scale_set_name, - instance_id=instance_id, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('OperationStatusResponse', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/virtualmachines/{instanceId}'} - - def get( - self, resource_group_name, vm_scale_set_name, instance_id, custom_headers=None, raw=False, **operation_config): - """Gets a virtual machine from a VM scale set. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param vm_scale_set_name: The name of the VM scale set. - :type vm_scale_set_name: str - :param instance_id: The instance ID of the virtual machine. - :type instance_id: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: VirtualMachineScaleSetVM or ClientRawResponse if raw=true - :rtype: - ~azure.mgmt.compute.v2016_03_30.models.VirtualMachineScaleSetVM or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), - 'instanceId': self._serialize.url("instance_id", instance_id, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('VirtualMachineScaleSetVM', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/virtualmachines/{instanceId}'} - - def get_instance_view( - self, resource_group_name, vm_scale_set_name, instance_id, custom_headers=None, raw=False, **operation_config): - """Gets the status of a virtual machine from a VM scale set. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param vm_scale_set_name: The name of the VM scale set. - :type vm_scale_set_name: str - :param instance_id: The instance ID of the virtual machine. - :type instance_id: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: VirtualMachineScaleSetVMInstanceView or ClientRawResponse if - raw=true - :rtype: - ~azure.mgmt.compute.v2016_03_30.models.VirtualMachineScaleSetVMInstanceView - or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get_instance_view.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), - 'instanceId': self._serialize.url("instance_id", instance_id, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('VirtualMachineScaleSetVMInstanceView', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_instance_view.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/virtualmachines/{instanceId}/instanceView'} - - def list( - self, resource_group_name, virtual_machine_scale_set_name, filter=None, select=None, expand=None, custom_headers=None, raw=False, **operation_config): - """Gets a list of all virtual machines in a VM scale sets. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param virtual_machine_scale_set_name: The name of the VM scale set. - :type virtual_machine_scale_set_name: str - :param filter: The filter to apply to the operation. - :type filter: str - :param select: The list parameters. - :type select: str - :param expand: The expand expression to apply to the operation. - :type expand: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of VirtualMachineScaleSetVM - :rtype: - ~azure.mgmt.compute.v2016_03_30.models.VirtualMachineScaleSetVMPaged[~azure.mgmt.compute.v2016_03_30.models.VirtualMachineScaleSetVM] - :raises: :class:`CloudError` - """ - def internal_paging(next_link=None, raw=False): - - if not next_link: - # Construct URL - url = self.list.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'virtualMachineScaleSetName': self._serialize.url("virtual_machine_scale_set_name", virtual_machine_scale_set_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - if filter is not None: - query_parameters['$filter'] = self._serialize.query("filter", filter, 'str') - if select is not None: - query_parameters['$select'] = self._serialize.query("select", select, 'str') - if expand is not None: - query_parameters['$expand'] = self._serialize.query("expand", expand, 'str') - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - deserialized = models.VirtualMachineScaleSetVMPaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.VirtualMachineScaleSetVMPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{virtualMachineScaleSetName}/virtualMachines'} - - - def _power_off_initial( - self, resource_group_name, vm_scale_set_name, instance_id, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.power_off.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), - 'instanceId': self._serialize.url("instance_id", instance_id, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('OperationStatusResponse', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def power_off( - self, resource_group_name, vm_scale_set_name, instance_id, custom_headers=None, raw=False, polling=True, **operation_config): - """Power off (stop) a virtual machine in a VM scale set. Note that - resources are still attached and you are getting charged for the - resources. Instead, use deallocate to release resources and avoid - charges. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param vm_scale_set_name: The name of the VM scale set. - :type vm_scale_set_name: str - :param instance_id: The instance ID of the virtual machine. - :type instance_id: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns OperationStatusResponse - or ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2016_03_30.models.OperationStatusResponse] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2016_03_30.models.OperationStatusResponse]] - :raises: :class:`CloudError` - """ - raw_result = self._power_off_initial( - resource_group_name=resource_group_name, - vm_scale_set_name=vm_scale_set_name, - instance_id=instance_id, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('OperationStatusResponse', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - power_off.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/virtualmachines/{instanceId}/poweroff'} - - - def _restart_initial( - self, resource_group_name, vm_scale_set_name, instance_id, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.restart.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), - 'instanceId': self._serialize.url("instance_id", instance_id, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('OperationStatusResponse', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def restart( - self, resource_group_name, vm_scale_set_name, instance_id, custom_headers=None, raw=False, polling=True, **operation_config): - """Restarts a virtual machine in a VM scale set. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param vm_scale_set_name: The name of the VM scale set. - :type vm_scale_set_name: str - :param instance_id: The instance ID of the virtual machine. - :type instance_id: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns OperationStatusResponse - or ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2016_03_30.models.OperationStatusResponse] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2016_03_30.models.OperationStatusResponse]] - :raises: :class:`CloudError` - """ - raw_result = self._restart_initial( - resource_group_name=resource_group_name, - vm_scale_set_name=vm_scale_set_name, - instance_id=instance_id, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('OperationStatusResponse', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - restart.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/virtualmachines/{instanceId}/restart'} - - - def _start_initial( - self, resource_group_name, vm_scale_set_name, instance_id, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.start.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), - 'instanceId': self._serialize.url("instance_id", instance_id, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('OperationStatusResponse', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def start( - self, resource_group_name, vm_scale_set_name, instance_id, custom_headers=None, raw=False, polling=True, **operation_config): - """Starts a virtual machine in a VM scale set. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param vm_scale_set_name: The name of the VM scale set. - :type vm_scale_set_name: str - :param instance_id: The instance ID of the virtual machine. - :type instance_id: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns OperationStatusResponse - or ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2016_03_30.models.OperationStatusResponse] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2016_03_30.models.OperationStatusResponse]] - :raises: :class:`CloudError` - """ - raw_result = self._start_initial( - resource_group_name=resource_group_name, - vm_scale_set_name=vm_scale_set_name, - instance_id=instance_id, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('OperationStatusResponse', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - start.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/virtualmachines/{instanceId}/start'} diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/operations/virtual_machine_scale_sets_operations.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/operations/virtual_machine_scale_sets_operations.py deleted file mode 100644 index 35cfe00744d6..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/operations/virtual_machine_scale_sets_operations.py +++ /dev/null @@ -1,1312 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError -from msrest.polling import LROPoller, NoPolling -from msrestazure.polling.arm_polling import ARMPolling - -from .. import models - - -class VirtualMachineScaleSetsOperations(object): - """VirtualMachineScaleSetsOperations operations. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: Client Api Version. Constant value: "2016-03-30". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2016-03-30" - - self.config = config - - - def _create_or_update_initial( - self, resource_group_name, name, parameters, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.create_or_update.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'vmScaleSetName': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(parameters, 'VirtualMachineScaleSet') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 201]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('VirtualMachineScaleSet', response) - if response.status_code == 201: - deserialized = self._deserialize('VirtualMachineScaleSet', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def create_or_update( - self, resource_group_name, name, parameters, custom_headers=None, raw=False, polling=True, **operation_config): - """Create or update a VM scale set. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param name: The name of the VM scale set to create or update. - :type name: str - :param parameters: The scale set object. - :type parameters: - ~azure.mgmt.compute.v2016_03_30.models.VirtualMachineScaleSet - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns VirtualMachineScaleSet - or ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2016_03_30.models.VirtualMachineScaleSet] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2016_03_30.models.VirtualMachineScaleSet]] - :raises: :class:`CloudError` - """ - raw_result = self._create_or_update_initial( - resource_group_name=resource_group_name, - name=name, - parameters=parameters, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('VirtualMachineScaleSet', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}'} - - - def _delete_initial( - self, resource_group_name, vm_scale_set_name, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.delete.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202, 204]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('OperationStatusResponse', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def delete( - self, resource_group_name, vm_scale_set_name, custom_headers=None, raw=False, polling=True, **operation_config): - """Deletes a VM scale set. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param vm_scale_set_name: The name of the VM scale set. - :type vm_scale_set_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns OperationStatusResponse - or ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2016_03_30.models.OperationStatusResponse] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2016_03_30.models.OperationStatusResponse]] - :raises: :class:`CloudError` - """ - raw_result = self._delete_initial( - resource_group_name=resource_group_name, - vm_scale_set_name=vm_scale_set_name, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('OperationStatusResponse', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}'} - - def get( - self, resource_group_name, vm_scale_set_name, custom_headers=None, raw=False, **operation_config): - """Display information about a virtual machine scale set. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param vm_scale_set_name: The name of the VM scale set. - :type vm_scale_set_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: VirtualMachineScaleSet or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.compute.v2016_03_30.models.VirtualMachineScaleSet - or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('VirtualMachineScaleSet', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}'} - - - def _deallocate_initial( - self, resource_group_name, vm_scale_set_name, instance_ids=None, custom_headers=None, raw=False, **operation_config): - vm_instance_ids = None - if instance_ids is not None: - vm_instance_ids = models.VirtualMachineScaleSetVMInstanceIDs(instance_ids=instance_ids) - - # Construct URL - url = self.deallocate.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - if vm_instance_ids is not None: - body_content = self._serialize.body(vm_instance_ids, 'VirtualMachineScaleSetVMInstanceIDs') - else: - body_content = None - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('OperationStatusResponse', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def deallocate( - self, resource_group_name, vm_scale_set_name, instance_ids=None, custom_headers=None, raw=False, polling=True, **operation_config): - """Deallocates specific virtual machines in a VM scale set. Shuts down the - virtual machines and releases the compute resources. You are not billed - for the compute resources that this virtual machine scale set - deallocates. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param vm_scale_set_name: The name of the VM scale set. - :type vm_scale_set_name: str - :param instance_ids: The virtual machine scale set instance ids. - Omitting the virtual machine scale set instance ids will result in the - operation being performed on all virtual machines in the virtual - machine scale set. - :type instance_ids: list[str] - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns OperationStatusResponse - or ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2016_03_30.models.OperationStatusResponse] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2016_03_30.models.OperationStatusResponse]] - :raises: :class:`CloudError` - """ - raw_result = self._deallocate_initial( - resource_group_name=resource_group_name, - vm_scale_set_name=vm_scale_set_name, - instance_ids=instance_ids, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('OperationStatusResponse', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - deallocate.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/deallocate'} - - - def _delete_instances_initial( - self, resource_group_name, vm_scale_set_name, instance_ids, custom_headers=None, raw=False, **operation_config): - vm_instance_ids = models.VirtualMachineScaleSetVMInstanceRequiredIDs(instance_ids=instance_ids) - - # Construct URL - url = self.delete_instances.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(vm_instance_ids, 'VirtualMachineScaleSetVMInstanceRequiredIDs') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('OperationStatusResponse', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def delete_instances( - self, resource_group_name, vm_scale_set_name, instance_ids, custom_headers=None, raw=False, polling=True, **operation_config): - """Deletes virtual machines in a VM scale set. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param vm_scale_set_name: The name of the VM scale set. - :type vm_scale_set_name: str - :param instance_ids: The virtual machine scale set instance ids. - :type instance_ids: list[str] - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns OperationStatusResponse - or ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2016_03_30.models.OperationStatusResponse] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2016_03_30.models.OperationStatusResponse]] - :raises: :class:`CloudError` - """ - raw_result = self._delete_instances_initial( - resource_group_name=resource_group_name, - vm_scale_set_name=vm_scale_set_name, - instance_ids=instance_ids, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('OperationStatusResponse', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - delete_instances.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/delete'} - - def get_instance_view( - self, resource_group_name, vm_scale_set_name, custom_headers=None, raw=False, **operation_config): - """Gets the status of a VM scale set instance. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param vm_scale_set_name: The name of the VM scale set. - :type vm_scale_set_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: VirtualMachineScaleSetInstanceView or ClientRawResponse if - raw=true - :rtype: - ~azure.mgmt.compute.v2016_03_30.models.VirtualMachineScaleSetInstanceView - or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get_instance_view.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('VirtualMachineScaleSetInstanceView', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_instance_view.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/instanceView'} - - def list( - self, resource_group_name, custom_headers=None, raw=False, **operation_config): - """Gets a list of all VM scale sets under a resource group. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of VirtualMachineScaleSet - :rtype: - ~azure.mgmt.compute.v2016_03_30.models.VirtualMachineScaleSetPaged[~azure.mgmt.compute.v2016_03_30.models.VirtualMachineScaleSet] - :raises: :class:`CloudError` - """ - def internal_paging(next_link=None, raw=False): - - if not next_link: - # Construct URL - url = self.list.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - deserialized = models.VirtualMachineScaleSetPaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.VirtualMachineScaleSetPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets'} - - def list_all( - self, custom_headers=None, raw=False, **operation_config): - """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. - - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of VirtualMachineScaleSet - :rtype: - ~azure.mgmt.compute.v2016_03_30.models.VirtualMachineScaleSetPaged[~azure.mgmt.compute.v2016_03_30.models.VirtualMachineScaleSet] - :raises: :class:`CloudError` - """ - def internal_paging(next_link=None, raw=False): - - if not next_link: - # Construct URL - url = self.list_all.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - deserialized = models.VirtualMachineScaleSetPaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.VirtualMachineScaleSetPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - list_all.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Compute/virtualMachineScaleSets'} - - def list_skus( - self, resource_group_name, vm_scale_set_name, custom_headers=None, raw=False, **operation_config): - """Gets a list of SKUs available for your VM scale set, including the - minimum and maximum VM instances allowed for each SKU. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param vm_scale_set_name: The name of the VM scale set. - :type vm_scale_set_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of VirtualMachineScaleSetSku - :rtype: - ~azure.mgmt.compute.v2016_03_30.models.VirtualMachineScaleSetSkuPaged[~azure.mgmt.compute.v2016_03_30.models.VirtualMachineScaleSetSku] - :raises: :class:`CloudError` - """ - def internal_paging(next_link=None, raw=False): - - if not next_link: - # Construct URL - url = self.list_skus.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - deserialized = models.VirtualMachineScaleSetSkuPaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.VirtualMachineScaleSetSkuPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - list_skus.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/skus'} - - - def _power_off_initial( - self, resource_group_name, vm_scale_set_name, instance_ids=None, custom_headers=None, raw=False, **operation_config): - vm_instance_ids = None - if instance_ids is not None: - vm_instance_ids = models.VirtualMachineScaleSetVMInstanceIDs(instance_ids=instance_ids) - - # Construct URL - url = self.power_off.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - if vm_instance_ids is not None: - body_content = self._serialize.body(vm_instance_ids, 'VirtualMachineScaleSetVMInstanceIDs') - else: - body_content = None - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('OperationStatusResponse', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def power_off( - self, resource_group_name, vm_scale_set_name, instance_ids=None, custom_headers=None, raw=False, polling=True, **operation_config): - """Power off (stop) one or more virtual machines in a VM scale set. Note - that resources are still attached and you are getting charged for the - resources. Instead, use deallocate to release resources and avoid - charges. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param vm_scale_set_name: The name of the VM scale set. - :type vm_scale_set_name: str - :param instance_ids: The virtual machine scale set instance ids. - Omitting the virtual machine scale set instance ids will result in the - operation being performed on all virtual machines in the virtual - machine scale set. - :type instance_ids: list[str] - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns OperationStatusResponse - or ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2016_03_30.models.OperationStatusResponse] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2016_03_30.models.OperationStatusResponse]] - :raises: :class:`CloudError` - """ - raw_result = self._power_off_initial( - resource_group_name=resource_group_name, - vm_scale_set_name=vm_scale_set_name, - instance_ids=instance_ids, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('OperationStatusResponse', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - power_off.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/poweroff'} - - - def _restart_initial( - self, resource_group_name, vm_scale_set_name, instance_ids=None, custom_headers=None, raw=False, **operation_config): - vm_instance_ids = None - if instance_ids is not None: - vm_instance_ids = models.VirtualMachineScaleSetVMInstanceIDs(instance_ids=instance_ids) - - # Construct URL - url = self.restart.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - if vm_instance_ids is not None: - body_content = self._serialize.body(vm_instance_ids, 'VirtualMachineScaleSetVMInstanceIDs') - else: - body_content = None - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('OperationStatusResponse', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def restart( - self, resource_group_name, vm_scale_set_name, instance_ids=None, custom_headers=None, raw=False, polling=True, **operation_config): - """Restarts one or more virtual machines in a VM scale set. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param vm_scale_set_name: The name of the VM scale set. - :type vm_scale_set_name: str - :param instance_ids: The virtual machine scale set instance ids. - Omitting the virtual machine scale set instance ids will result in the - operation being performed on all virtual machines in the virtual - machine scale set. - :type instance_ids: list[str] - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns OperationStatusResponse - or ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2016_03_30.models.OperationStatusResponse] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2016_03_30.models.OperationStatusResponse]] - :raises: :class:`CloudError` - """ - raw_result = self._restart_initial( - resource_group_name=resource_group_name, - vm_scale_set_name=vm_scale_set_name, - instance_ids=instance_ids, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('OperationStatusResponse', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - restart.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/restart'} - - - def _start_initial( - self, resource_group_name, vm_scale_set_name, instance_ids=None, custom_headers=None, raw=False, **operation_config): - vm_instance_ids = None - if instance_ids is not None: - vm_instance_ids = models.VirtualMachineScaleSetVMInstanceIDs(instance_ids=instance_ids) - - # Construct URL - url = self.start.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - if vm_instance_ids is not None: - body_content = self._serialize.body(vm_instance_ids, 'VirtualMachineScaleSetVMInstanceIDs') - else: - body_content = None - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('OperationStatusResponse', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def start( - self, resource_group_name, vm_scale_set_name, instance_ids=None, custom_headers=None, raw=False, polling=True, **operation_config): - """Starts one or more virtual machines in a VM scale set. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param vm_scale_set_name: The name of the VM scale set. - :type vm_scale_set_name: str - :param instance_ids: The virtual machine scale set instance ids. - Omitting the virtual machine scale set instance ids will result in the - operation being performed on all virtual machines in the virtual - machine scale set. - :type instance_ids: list[str] - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns OperationStatusResponse - or ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2016_03_30.models.OperationStatusResponse] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2016_03_30.models.OperationStatusResponse]] - :raises: :class:`CloudError` - """ - raw_result = self._start_initial( - resource_group_name=resource_group_name, - vm_scale_set_name=vm_scale_set_name, - instance_ids=instance_ids, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('OperationStatusResponse', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - start.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/start'} - - - def _update_instances_initial( - self, resource_group_name, vm_scale_set_name, instance_ids, custom_headers=None, raw=False, **operation_config): - vm_instance_ids = models.VirtualMachineScaleSetVMInstanceRequiredIDs(instance_ids=instance_ids) - - # Construct URL - url = self.update_instances.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(vm_instance_ids, 'VirtualMachineScaleSetVMInstanceRequiredIDs') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('OperationStatusResponse', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def update_instances( - self, resource_group_name, vm_scale_set_name, instance_ids, custom_headers=None, raw=False, polling=True, **operation_config): - """Upgrades one or more virtual machines to the latest SKU set in the VM - scale set model. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param vm_scale_set_name: The name of the VM scale set. - :type vm_scale_set_name: str - :param instance_ids: The virtual machine scale set instance ids. - :type instance_ids: list[str] - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns OperationStatusResponse - or ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2016_03_30.models.OperationStatusResponse] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2016_03_30.models.OperationStatusResponse]] - :raises: :class:`CloudError` - """ - raw_result = self._update_instances_initial( - resource_group_name=resource_group_name, - vm_scale_set_name=vm_scale_set_name, - instance_ids=instance_ids, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('OperationStatusResponse', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - update_instances.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/manualupgrade'} - - - def _reimage_initial( - self, resource_group_name, vm_scale_set_name, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.reimage.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('OperationStatusResponse', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def reimage( - self, resource_group_name, vm_scale_set_name, custom_headers=None, raw=False, polling=True, **operation_config): - """Reimages (upgrade the operating system) one or more virtual machines in - a VM scale set. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param vm_scale_set_name: The name of the VM scale set. - :type vm_scale_set_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns OperationStatusResponse - or ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2016_03_30.models.OperationStatusResponse] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2016_03_30.models.OperationStatusResponse]] - :raises: :class:`CloudError` - """ - raw_result = self._reimage_initial( - resource_group_name=resource_group_name, - vm_scale_set_name=vm_scale_set_name, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('OperationStatusResponse', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - reimage.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/reimage'} diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/operations/virtual_machine_sizes_operations.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/operations/virtual_machine_sizes_operations.py deleted file mode 100644 index 139e560421a7..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/operations/virtual_machine_sizes_operations.py +++ /dev/null @@ -1,107 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError - -from .. import models - - -class VirtualMachineSizesOperations(object): - """VirtualMachineSizesOperations operations. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: Client Api Version. Constant value: "2016-03-30". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2016-03-30" - - self.config = config - - def list( - self, location, custom_headers=None, raw=False, **operation_config): - """Lists all available virtual machine sizes for a subscription in a - location. - - :param location: The location upon which virtual-machine-sizes is - queried. - :type location: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of VirtualMachineSize - :rtype: - ~azure.mgmt.compute.v2016_03_30.models.VirtualMachineSizePaged[~azure.mgmt.compute.v2016_03_30.models.VirtualMachineSize] - :raises: :class:`CloudError` - """ - def internal_paging(next_link=None, raw=False): - - if not next_link: - # Construct URL - url = self.list.metadata['url'] - path_format_arguments = { - 'location': self._serialize.url("location", location, 'str', pattern=r'^[-\w\._]+$'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - deserialized = models.VirtualMachineSizePaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.VirtualMachineSizePaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/vmSizes'} diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/operations/virtual_machines_operations.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/operations/virtual_machines_operations.py deleted file mode 100644 index a2a420ba78a9..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/operations/virtual_machines_operations.py +++ /dev/null @@ -1,1216 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError -from msrest.polling import LROPoller, NoPolling -from msrestazure.polling.arm_polling import ARMPolling - -from .. import models - - -class VirtualMachinesOperations(object): - """VirtualMachinesOperations operations. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: Client Api Version. Constant value: "2016-03-30". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2016-03-30" - - self.config = config - - def get_extensions( - self, resource_group_name, vm_name, expand=None, custom_headers=None, raw=False, **operation_config): - """The operation to get all extensions of a Virtual Machine. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param vm_name: The name of the virtual machine containing the - extension. - :type vm_name: str - :param expand: The expand expression to apply on the operation. - :type expand: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: VirtualMachineExtensionsListResult or ClientRawResponse if - raw=true - :rtype: - ~azure.mgmt.compute.v2016_03_30.models.VirtualMachineExtensionsListResult - or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get_extensions.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'vmName': self._serialize.url("vm_name", vm_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - if expand is not None: - query_parameters['$expand'] = self._serialize.query("expand", expand, 'str') - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('VirtualMachineExtensionsListResult', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_extensions.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/extensions'} - - - def _capture_initial( - self, resource_group_name, vm_name, parameters, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.capture.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'vmName': self._serialize.url("vm_name", vm_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(parameters, 'VirtualMachineCaptureParameters') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('VirtualMachineCaptureResult', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def capture( - self, resource_group_name, vm_name, parameters, custom_headers=None, raw=False, polling=True, **operation_config): - """Captures the VM by copying virtual hard disks of the VM and outputs a - template that can be used to create similar VMs. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param vm_name: The name of the virtual machine. - :type vm_name: str - :param parameters: Parameters supplied to the Capture Virtual Machine - operation. - :type parameters: - ~azure.mgmt.compute.v2016_03_30.models.VirtualMachineCaptureParameters - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns - VirtualMachineCaptureResult or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2016_03_30.models.VirtualMachineCaptureResult] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2016_03_30.models.VirtualMachineCaptureResult]] - :raises: :class:`CloudError` - """ - raw_result = self._capture_initial( - resource_group_name=resource_group_name, - vm_name=vm_name, - parameters=parameters, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('VirtualMachineCaptureResult', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - capture.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/capture'} - - - def _create_or_update_initial( - self, resource_group_name, vm_name, parameters, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.create_or_update.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'vmName': self._serialize.url("vm_name", vm_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(parameters, 'VirtualMachine') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 201]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('VirtualMachine', response) - if response.status_code == 201: - deserialized = self._deserialize('VirtualMachine', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def create_or_update( - self, resource_group_name, vm_name, parameters, custom_headers=None, raw=False, polling=True, **operation_config): - """The operation to create or update a virtual machine. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param vm_name: The name of the virtual machine. - :type vm_name: str - :param parameters: Parameters supplied to the Create Virtual Machine - operation. - :type parameters: - ~azure.mgmt.compute.v2016_03_30.models.VirtualMachine - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns VirtualMachine or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2016_03_30.models.VirtualMachine] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2016_03_30.models.VirtualMachine]] - :raises: :class:`CloudError` - """ - raw_result = self._create_or_update_initial( - resource_group_name=resource_group_name, - vm_name=vm_name, - parameters=parameters, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('VirtualMachine', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}'} - - - def _delete_initial( - self, resource_group_name, vm_name, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.delete.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'vmName': self._serialize.url("vm_name", vm_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202, 204]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('OperationStatusResponse', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def delete( - self, resource_group_name, vm_name, custom_headers=None, raw=False, polling=True, **operation_config): - """The operation to delete a virtual machine. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param vm_name: The name of the virtual machine. - :type vm_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns OperationStatusResponse - or ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2016_03_30.models.OperationStatusResponse] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2016_03_30.models.OperationStatusResponse]] - :raises: :class:`CloudError` - """ - raw_result = self._delete_initial( - resource_group_name=resource_group_name, - vm_name=vm_name, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('OperationStatusResponse', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}'} - - def get( - self, resource_group_name, vm_name, expand=None, custom_headers=None, raw=False, **operation_config): - """Retrieves information about the model view or the instance view of a - virtual machine. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param vm_name: The name of the virtual machine. - :type vm_name: str - :param expand: The expand expression to apply on the operation. - Possible values include: 'instanceView' - :type expand: str or - ~azure.mgmt.compute.v2016_03_30.models.InstanceViewTypes - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: VirtualMachine or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.compute.v2016_03_30.models.VirtualMachine or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'vmName': self._serialize.url("vm_name", vm_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - if expand is not None: - query_parameters['$expand'] = self._serialize.query("expand", expand, 'InstanceViewTypes') - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('VirtualMachine', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}'} - - - def _deallocate_initial( - self, resource_group_name, vm_name, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.deallocate.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'vmName': self._serialize.url("vm_name", vm_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('OperationStatusResponse', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def deallocate( - self, resource_group_name, vm_name, custom_headers=None, raw=False, polling=True, **operation_config): - """Shuts down the virtual machine and releases the compute resources. You - are not billed for the compute resources that this virtual machine - uses. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param vm_name: The name of the virtual machine. - :type vm_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns OperationStatusResponse - or ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2016_03_30.models.OperationStatusResponse] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2016_03_30.models.OperationStatusResponse]] - :raises: :class:`CloudError` - """ - raw_result = self._deallocate_initial( - resource_group_name=resource_group_name, - vm_name=vm_name, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('OperationStatusResponse', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - deallocate.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/deallocate'} - - def generalize( - self, resource_group_name, vm_name, custom_headers=None, raw=False, **operation_config): - """Sets the state of the virtual machine to generalized. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param vm_name: The name of the virtual machine. - :type vm_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: OperationStatusResponse or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.compute.v2016_03_30.models.OperationStatusResponse - or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.generalize.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'vmName': self._serialize.url("vm_name", vm_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('OperationStatusResponse', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - generalize.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/generalize'} - - def list( - self, resource_group_name, custom_headers=None, raw=False, **operation_config): - """Lists all of the virtual machines in the specified resource group. Use - the nextLink property in the response to get the next page of virtual - machines. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of VirtualMachine - :rtype: - ~azure.mgmt.compute.v2016_03_30.models.VirtualMachinePaged[~azure.mgmt.compute.v2016_03_30.models.VirtualMachine] - :raises: :class:`CloudError` - """ - def internal_paging(next_link=None, raw=False): - - if not next_link: - # Construct URL - url = self.list.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - deserialized = models.VirtualMachinePaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.VirtualMachinePaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines'} - - def list_all( - self, custom_headers=None, raw=False, **operation_config): - """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. - - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of VirtualMachine - :rtype: - ~azure.mgmt.compute.v2016_03_30.models.VirtualMachinePaged[~azure.mgmt.compute.v2016_03_30.models.VirtualMachine] - :raises: :class:`CloudError` - """ - def internal_paging(next_link=None, raw=False): - - if not next_link: - # Construct URL - url = self.list_all.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - deserialized = models.VirtualMachinePaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.VirtualMachinePaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - list_all.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Compute/virtualMachines'} - - def list_available_sizes( - self, resource_group_name, vm_name, custom_headers=None, raw=False, **operation_config): - """Lists all available virtual machine sizes to which the specified - virtual machine can be resized. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param vm_name: The name of the virtual machine. - :type vm_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of VirtualMachineSize - :rtype: - ~azure.mgmt.compute.v2016_03_30.models.VirtualMachineSizePaged[~azure.mgmt.compute.v2016_03_30.models.VirtualMachineSize] - :raises: :class:`CloudError` - """ - def internal_paging(next_link=None, raw=False): - - if not next_link: - # Construct URL - url = self.list_available_sizes.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'vmName': self._serialize.url("vm_name", vm_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - deserialized = models.VirtualMachineSizePaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.VirtualMachineSizePaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - list_available_sizes.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/vmSizes'} - - - def _power_off_initial( - self, resource_group_name, vm_name, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.power_off.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'vmName': self._serialize.url("vm_name", vm_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('OperationStatusResponse', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def power_off( - self, resource_group_name, vm_name, custom_headers=None, raw=False, polling=True, **operation_config): - """The operation to power off (stop) a virtual machine. The virtual - machine can be restarted with the same provisioned resources. You are - still charged for this virtual machine. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param vm_name: The name of the virtual machine. - :type vm_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns OperationStatusResponse - or ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2016_03_30.models.OperationStatusResponse] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2016_03_30.models.OperationStatusResponse]] - :raises: :class:`CloudError` - """ - raw_result = self._power_off_initial( - resource_group_name=resource_group_name, - vm_name=vm_name, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('OperationStatusResponse', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - power_off.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/powerOff'} - - - def _restart_initial( - self, resource_group_name, vm_name, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.restart.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'vmName': self._serialize.url("vm_name", vm_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('OperationStatusResponse', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def restart( - self, resource_group_name, vm_name, custom_headers=None, raw=False, polling=True, **operation_config): - """The operation to restart a virtual machine. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param vm_name: The name of the virtual machine. - :type vm_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns OperationStatusResponse - or ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2016_03_30.models.OperationStatusResponse] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2016_03_30.models.OperationStatusResponse]] - :raises: :class:`CloudError` - """ - raw_result = self._restart_initial( - resource_group_name=resource_group_name, - vm_name=vm_name, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('OperationStatusResponse', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - restart.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/restart'} - - - def _start_initial( - self, resource_group_name, vm_name, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.start.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'vmName': self._serialize.url("vm_name", vm_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('OperationStatusResponse', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def start( - self, resource_group_name, vm_name, custom_headers=None, raw=False, polling=True, **operation_config): - """The operation to start a virtual machine. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param vm_name: The name of the virtual machine. - :type vm_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns OperationStatusResponse - or ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2016_03_30.models.OperationStatusResponse] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2016_03_30.models.OperationStatusResponse]] - :raises: :class:`CloudError` - """ - raw_result = self._start_initial( - resource_group_name=resource_group_name, - vm_name=vm_name, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('OperationStatusResponse', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - start.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/start'} - - - def _redeploy_initial( - self, resource_group_name, vm_name, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.redeploy.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'vmName': self._serialize.url("vm_name", vm_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('OperationStatusResponse', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def redeploy( - self, resource_group_name, vm_name, custom_headers=None, raw=False, polling=True, **operation_config): - """The operation to redeploy a virtual machine. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param vm_name: The name of the virtual machine. - :type vm_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns OperationStatusResponse - or ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2016_03_30.models.OperationStatusResponse] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2016_03_30.models.OperationStatusResponse]] - :raises: :class:`CloudError` - """ - raw_result = self._redeploy_initial( - resource_group_name=resource_group_name, - vm_name=vm_name, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('OperationStatusResponse', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - redeploy.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/redeploy'} diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/__init__.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/__init__.py index 88ded2f640de..a7bc1ce68e37 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/__init__.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/__init__.py @@ -9,10 +9,11 @@ # regenerated. # -------------------------------------------------------------------------- -from .compute_management_client import ComputeManagementClient -from .version import VERSION +from ._configuration import ComputeManagementClientConfiguration +from ._compute_management_client import ComputeManagementClient +__all__ = ['ComputeManagementClient', 'ComputeManagementClientConfiguration'] -__all__ = ['ComputeManagementClient'] +from .version import VERSION __version__ = VERSION diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/_compute_management_client.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/_compute_management_client.py new file mode 100644 index 000000000000..89ddebea8bd7 --- /dev/null +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/_compute_management_client.py @@ -0,0 +1,106 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.service_client import SDKClient +from msrest import Serializer, Deserializer + +from ._configuration import ComputeManagementClientConfiguration +from .operations import AvailabilitySetsOperations +from .operations import VirtualMachineExtensionImagesOperations +from .operations import VirtualMachineExtensionsOperations +from .operations import VirtualMachinesOperations +from .operations import VirtualMachineImagesOperations +from .operations import UsageOperations +from .operations import VirtualMachineSizesOperations +from .operations import ImagesOperations +from .operations import VirtualMachineScaleSetsOperations +from .operations import VirtualMachineScaleSetVMsOperations +from .operations import DisksOperations +from .operations import SnapshotsOperations +from . import models + + +class ComputeManagementClient(SDKClient): + """Compute Client + + :ivar config: Configuration for client. + :vartype config: ComputeManagementClientConfiguration + + :ivar availability_sets: AvailabilitySets operations + :vartype availability_sets: azure.mgmt.compute.v2016_04_30_preview.operations.AvailabilitySetsOperations + :ivar virtual_machine_extension_images: VirtualMachineExtensionImages operations + :vartype virtual_machine_extension_images: azure.mgmt.compute.v2016_04_30_preview.operations.VirtualMachineExtensionImagesOperations + :ivar virtual_machine_extensions: VirtualMachineExtensions operations + :vartype virtual_machine_extensions: azure.mgmt.compute.v2016_04_30_preview.operations.VirtualMachineExtensionsOperations + :ivar virtual_machines: VirtualMachines operations + :vartype virtual_machines: azure.mgmt.compute.v2016_04_30_preview.operations.VirtualMachinesOperations + :ivar virtual_machine_images: VirtualMachineImages operations + :vartype virtual_machine_images: azure.mgmt.compute.v2016_04_30_preview.operations.VirtualMachineImagesOperations + :ivar usage: Usage operations + :vartype usage: azure.mgmt.compute.v2016_04_30_preview.operations.UsageOperations + :ivar virtual_machine_sizes: VirtualMachineSizes operations + :vartype virtual_machine_sizes: azure.mgmt.compute.v2016_04_30_preview.operations.VirtualMachineSizesOperations + :ivar images: Images operations + :vartype images: azure.mgmt.compute.v2016_04_30_preview.operations.ImagesOperations + :ivar virtual_machine_scale_sets: VirtualMachineScaleSets operations + :vartype virtual_machine_scale_sets: azure.mgmt.compute.v2016_04_30_preview.operations.VirtualMachineScaleSetsOperations + :ivar virtual_machine_scale_set_vms: VirtualMachineScaleSetVMs operations + :vartype virtual_machine_scale_set_vms: azure.mgmt.compute.v2016_04_30_preview.operations.VirtualMachineScaleSetVMsOperations + :ivar disks: Disks operations + :vartype disks: azure.mgmt.compute.v2016_04_30_preview.operations.DisksOperations + :ivar snapshots: Snapshots operations + :vartype snapshots: azure.mgmt.compute.v2016_04_30_preview.operations.SnapshotsOperations + + :param credentials: Credentials needed for the client to connect to Azure. + :type credentials: :mod:`A msrestazure Credentials + object` + :param subscription_id: Subscription credentials which uniquely identify + Microsoft Azure subscription. The subscription ID forms part of the URI + for every service call. + :type subscription_id: str + :param str base_url: Service URL + """ + + def __init__( + self, credentials, subscription_id, base_url=None): + + self.config = ComputeManagementClientConfiguration(credentials, subscription_id, base_url) + super(ComputeManagementClient, self).__init__(self.config.credentials, self.config) + + client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} + self.api_version = '2016-04-30-preview' + self._serialize = Serializer(client_models) + self._deserialize = Deserializer(client_models) + + self.availability_sets = AvailabilitySetsOperations( + self._client, self.config, self._serialize, self._deserialize) + self.virtual_machine_extension_images = VirtualMachineExtensionImagesOperations( + self._client, self.config, self._serialize, self._deserialize) + self.virtual_machine_extensions = VirtualMachineExtensionsOperations( + self._client, self.config, self._serialize, self._deserialize) + self.virtual_machines = VirtualMachinesOperations( + self._client, self.config, self._serialize, self._deserialize) + self.virtual_machine_images = VirtualMachineImagesOperations( + self._client, self.config, self._serialize, self._deserialize) + self.usage = UsageOperations( + self._client, self.config, self._serialize, self._deserialize) + self.virtual_machine_sizes = VirtualMachineSizesOperations( + self._client, self.config, self._serialize, self._deserialize) + self.images = ImagesOperations( + self._client, self.config, self._serialize, self._deserialize) + self.virtual_machine_scale_sets = VirtualMachineScaleSetsOperations( + self._client, self.config, self._serialize, self._deserialize) + self.virtual_machine_scale_set_vms = VirtualMachineScaleSetVMsOperations( + self._client, self.config, self._serialize, self._deserialize) + self.disks = DisksOperations( + self._client, self.config, self._serialize, self._deserialize) + self.snapshots = SnapshotsOperations( + self._client, self.config, self._serialize, self._deserialize) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/_configuration.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/_configuration.py new file mode 100644 index 000000000000..0fcf5984e2ca --- /dev/null +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/_configuration.py @@ -0,0 +1,50 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- +from msrestazure import AzureConfiguration + +from .version import VERSION + + +class ComputeManagementClientConfiguration(AzureConfiguration): + """Configuration for ComputeManagementClient + Note that all parameters used to create this instance are saved as instance + attributes. + + :param credentials: Credentials needed for the client to connect to Azure. + :type credentials: :mod:`A msrestazure Credentials + object` + :param subscription_id: Subscription credentials which uniquely identify + Microsoft Azure subscription. The subscription ID forms part of the URI + for every service call. + :type subscription_id: str + :param str base_url: Service URL + """ + + def __init__( + self, credentials, subscription_id, base_url=None): + + if credentials is None: + raise ValueError("Parameter 'credentials' must not be None.") + if subscription_id is None: + raise ValueError("Parameter 'subscription_id' must not be None.") + if not base_url: + base_url = 'https://management.azure.com' + + super(ComputeManagementClientConfiguration, self).__init__(base_url) + + # Starting Autorest.Python 4.0.64, make connection pool activated by default + self.keep_alive = True + + self.add_user_agent('azure-mgmt-compute/{}'.format(VERSION)) + self.add_user_agent('Azure-SDK-For-Python') + + self.credentials = credentials + self.subscription_id = subscription_id diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/compute_management_client.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/compute_management_client.py deleted file mode 100644 index 2c43eb9b0c1a..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/compute_management_client.py +++ /dev/null @@ -1,140 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.service_client import SDKClient -from msrest import Serializer, Deserializer -from msrestazure import AzureConfiguration -from .version import VERSION -from .operations.availability_sets_operations import AvailabilitySetsOperations -from .operations.virtual_machine_extension_images_operations import VirtualMachineExtensionImagesOperations -from .operations.virtual_machine_extensions_operations import VirtualMachineExtensionsOperations -from .operations.virtual_machines_operations import VirtualMachinesOperations -from .operations.virtual_machine_images_operations import VirtualMachineImagesOperations -from .operations.usage_operations import UsageOperations -from .operations.virtual_machine_sizes_operations import VirtualMachineSizesOperations -from .operations.images_operations import ImagesOperations -from .operations.virtual_machine_scale_sets_operations import VirtualMachineScaleSetsOperations -from .operations.virtual_machine_scale_set_vms_operations import VirtualMachineScaleSetVMsOperations -from .operations.disks_operations import DisksOperations -from .operations.snapshots_operations import SnapshotsOperations -from . import models - - -class ComputeManagementClientConfiguration(AzureConfiguration): - """Configuration for ComputeManagementClient - Note that all parameters used to create this instance are saved as instance - attributes. - - :param credentials: Credentials needed for the client to connect to Azure. - :type credentials: :mod:`A msrestazure Credentials - object` - :param subscription_id: Subscription credentials which uniquely identify - Microsoft Azure subscription. The subscription ID forms part of the URI - for every service call. - :type subscription_id: str - :param str base_url: Service URL - """ - - def __init__( - self, credentials, subscription_id, base_url=None): - - if credentials is None: - raise ValueError("Parameter 'credentials' must not be None.") - if subscription_id is None: - raise ValueError("Parameter 'subscription_id' must not be None.") - if not base_url: - base_url = 'https://management.azure.com' - - super(ComputeManagementClientConfiguration, self).__init__(base_url) - - self.add_user_agent('azure-mgmt-compute/{}'.format(VERSION)) - self.add_user_agent('Azure-SDK-For-Python') - - self.credentials = credentials - self.subscription_id = subscription_id - - -class ComputeManagementClient(SDKClient): - """Compute Client - - :ivar config: Configuration for client. - :vartype config: ComputeManagementClientConfiguration - - :ivar availability_sets: AvailabilitySets operations - :vartype availability_sets: azure.mgmt.compute.v2016_04_30_preview.operations.AvailabilitySetsOperations - :ivar virtual_machine_extension_images: VirtualMachineExtensionImages operations - :vartype virtual_machine_extension_images: azure.mgmt.compute.v2016_04_30_preview.operations.VirtualMachineExtensionImagesOperations - :ivar virtual_machine_extensions: VirtualMachineExtensions operations - :vartype virtual_machine_extensions: azure.mgmt.compute.v2016_04_30_preview.operations.VirtualMachineExtensionsOperations - :ivar virtual_machines: VirtualMachines operations - :vartype virtual_machines: azure.mgmt.compute.v2016_04_30_preview.operations.VirtualMachinesOperations - :ivar virtual_machine_images: VirtualMachineImages operations - :vartype virtual_machine_images: azure.mgmt.compute.v2016_04_30_preview.operations.VirtualMachineImagesOperations - :ivar usage: Usage operations - :vartype usage: azure.mgmt.compute.v2016_04_30_preview.operations.UsageOperations - :ivar virtual_machine_sizes: VirtualMachineSizes operations - :vartype virtual_machine_sizes: azure.mgmt.compute.v2016_04_30_preview.operations.VirtualMachineSizesOperations - :ivar images: Images operations - :vartype images: azure.mgmt.compute.v2016_04_30_preview.operations.ImagesOperations - :ivar virtual_machine_scale_sets: VirtualMachineScaleSets operations - :vartype virtual_machine_scale_sets: azure.mgmt.compute.v2016_04_30_preview.operations.VirtualMachineScaleSetsOperations - :ivar virtual_machine_scale_set_vms: VirtualMachineScaleSetVMs operations - :vartype virtual_machine_scale_set_vms: azure.mgmt.compute.v2016_04_30_preview.operations.VirtualMachineScaleSetVMsOperations - :ivar disks: Disks operations - :vartype disks: azure.mgmt.compute.v2016_04_30_preview.operations.DisksOperations - :ivar snapshots: Snapshots operations - :vartype snapshots: azure.mgmt.compute.v2016_04_30_preview.operations.SnapshotsOperations - - :param credentials: Credentials needed for the client to connect to Azure. - :type credentials: :mod:`A msrestazure Credentials - object` - :param subscription_id: Subscription credentials which uniquely identify - Microsoft Azure subscription. The subscription ID forms part of the URI - for every service call. - :type subscription_id: str - :param str base_url: Service URL - """ - - def __init__( - self, credentials, subscription_id, base_url=None): - - self.config = ComputeManagementClientConfiguration(credentials, subscription_id, base_url) - super(ComputeManagementClient, self).__init__(self.config.credentials, self.config) - - client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} - self.api_version = '2016-04-30-preview' - self._serialize = Serializer(client_models) - self._deserialize = Deserializer(client_models) - - self.availability_sets = AvailabilitySetsOperations( - self._client, self.config, self._serialize, self._deserialize) - self.virtual_machine_extension_images = VirtualMachineExtensionImagesOperations( - self._client, self.config, self._serialize, self._deserialize) - self.virtual_machine_extensions = VirtualMachineExtensionsOperations( - self._client, self.config, self._serialize, self._deserialize) - self.virtual_machines = VirtualMachinesOperations( - self._client, self.config, self._serialize, self._deserialize) - self.virtual_machine_images = VirtualMachineImagesOperations( - self._client, self.config, self._serialize, self._deserialize) - self.usage = UsageOperations( - self._client, self.config, self._serialize, self._deserialize) - self.virtual_machine_sizes = VirtualMachineSizesOperations( - self._client, self.config, self._serialize, self._deserialize) - self.images = ImagesOperations( - self._client, self.config, self._serialize, self._deserialize) - self.virtual_machine_scale_sets = VirtualMachineScaleSetsOperations( - self._client, self.config, self._serialize, self._deserialize) - self.virtual_machine_scale_set_vms = VirtualMachineScaleSetVMsOperations( - self._client, self.config, self._serialize, self._deserialize) - self.disks = DisksOperations( - self._client, self.config, self._serialize, self._deserialize) - self.snapshots = SnapshotsOperations( - self._client, self.config, self._serialize, self._deserialize) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/__init__.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/__init__.py index 925ba8a919ba..88156b7b305b 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/__init__.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/__init__.py @@ -10,220 +10,220 @@ # -------------------------------------------------------------------------- try: - from .instance_view_status_py3 import InstanceViewStatus - from .sub_resource_py3 import SubResource - from .sku_py3 import Sku - from .availability_set_py3 import AvailabilitySet - from .virtual_machine_size_py3 import VirtualMachineSize - from .virtual_machine_extension_image_py3 import VirtualMachineExtensionImage - from .virtual_machine_image_resource_py3 import VirtualMachineImageResource - from .virtual_machine_extension_instance_view_py3 import VirtualMachineExtensionInstanceView - from .virtual_machine_extension_py3 import VirtualMachineExtension - from .virtual_machine_extension_update_py3 import VirtualMachineExtensionUpdate - from .virtual_machine_extensions_list_result_py3 import VirtualMachineExtensionsListResult - from .purchase_plan_py3 import PurchasePlan - from .os_disk_image_py3 import OSDiskImage - from .data_disk_image_py3 import DataDiskImage - from .virtual_machine_image_py3 import VirtualMachineImage - from .usage_name_py3 import UsageName - from .usage_py3 import Usage - from .virtual_machine_capture_parameters_py3 import VirtualMachineCaptureParameters - from .virtual_machine_capture_result_py3 import VirtualMachineCaptureResult - from .plan_py3 import Plan - from .hardware_profile_py3 import HardwareProfile - from .image_reference_py3 import ImageReference - from .key_vault_secret_reference_py3 import KeyVaultSecretReference - from .key_vault_key_reference_py3 import KeyVaultKeyReference - from .disk_encryption_settings_py3 import DiskEncryptionSettings - from .virtual_hard_disk_py3 import VirtualHardDisk - from .managed_disk_parameters_py3 import ManagedDiskParameters - from .os_disk_py3 import OSDisk - from .data_disk_py3 import DataDisk - from .storage_profile_py3 import StorageProfile - from .additional_unattend_content_py3 import AdditionalUnattendContent - from .win_rm_listener_py3 import WinRMListener - from .win_rm_configuration_py3 import WinRMConfiguration - from .windows_configuration_py3 import WindowsConfiguration - from .ssh_public_key_py3 import SshPublicKey - from .ssh_configuration_py3 import SshConfiguration - from .linux_configuration_py3 import LinuxConfiguration - from .vault_certificate_py3 import VaultCertificate - from .vault_secret_group_py3 import VaultSecretGroup - from .os_profile_py3 import OSProfile - from .network_interface_reference_py3 import NetworkInterfaceReference - from .network_profile_py3 import NetworkProfile - from .boot_diagnostics_py3 import BootDiagnostics - from .diagnostics_profile_py3 import DiagnosticsProfile - from .virtual_machine_extension_handler_instance_view_py3 import VirtualMachineExtensionHandlerInstanceView - from .virtual_machine_agent_instance_view_py3 import VirtualMachineAgentInstanceView - from .disk_instance_view_py3 import DiskInstanceView - from .boot_diagnostics_instance_view_py3 import BootDiagnosticsInstanceView - from .virtual_machine_identity_py3 import VirtualMachineIdentity - from .virtual_machine_instance_view_py3 import VirtualMachineInstanceView - from .virtual_machine_py3 import VirtualMachine - from .upgrade_policy_py3 import UpgradePolicy - from .image_os_disk_py3 import ImageOSDisk - from .image_data_disk_py3 import ImageDataDisk - from .image_storage_profile_py3 import ImageStorageProfile - from .image_py3 import Image - from .virtual_machine_scale_set_identity_py3 import VirtualMachineScaleSetIdentity - from .virtual_machine_scale_set_os_profile_py3 import VirtualMachineScaleSetOSProfile - from .virtual_machine_scale_set_managed_disk_parameters_py3 import VirtualMachineScaleSetManagedDiskParameters - from .virtual_machine_scale_set_os_disk_py3 import VirtualMachineScaleSetOSDisk - from .virtual_machine_scale_set_data_disk_py3 import VirtualMachineScaleSetDataDisk - from .virtual_machine_scale_set_storage_profile_py3 import VirtualMachineScaleSetStorageProfile - from .api_entity_reference_py3 import ApiEntityReference - from .virtual_machine_scale_set_ip_configuration_py3 import VirtualMachineScaleSetIPConfiguration - from .virtual_machine_scale_set_network_configuration_py3 import VirtualMachineScaleSetNetworkConfiguration - from .virtual_machine_scale_set_network_profile_py3 import VirtualMachineScaleSetNetworkProfile - from .virtual_machine_scale_set_extension_py3 import VirtualMachineScaleSetExtension - from .virtual_machine_scale_set_extension_profile_py3 import VirtualMachineScaleSetExtensionProfile - from .virtual_machine_scale_set_vm_profile_py3 import VirtualMachineScaleSetVMProfile - from .virtual_machine_scale_set_py3 import VirtualMachineScaleSet - from .virtual_machine_scale_set_vm_instance_ids_py3 import VirtualMachineScaleSetVMInstanceIDs - from .virtual_machine_scale_set_vm_instance_required_ids_py3 import VirtualMachineScaleSetVMInstanceRequiredIDs - from .virtual_machine_status_code_count_py3 import VirtualMachineStatusCodeCount - from .virtual_machine_scale_set_instance_view_statuses_summary_py3 import VirtualMachineScaleSetInstanceViewStatusesSummary - from .virtual_machine_scale_set_vm_extensions_summary_py3 import VirtualMachineScaleSetVMExtensionsSummary - from .virtual_machine_scale_set_instance_view_py3 import VirtualMachineScaleSetInstanceView - from .virtual_machine_scale_set_sku_capacity_py3 import VirtualMachineScaleSetSkuCapacity - from .virtual_machine_scale_set_sku_py3 import VirtualMachineScaleSetSku - from .virtual_machine_scale_set_vm_instance_view_py3 import VirtualMachineScaleSetVMInstanceView - from .virtual_machine_scale_set_vm_py3 import VirtualMachineScaleSetVM - from .api_error_base_py3 import ApiErrorBase - from .inner_error_py3 import InnerError - from .api_error_py3 import ApiError - from .compute_long_running_operation_properties_py3 import ComputeLongRunningOperationProperties - from .resource_py3 import Resource - from .update_resource_py3 import UpdateResource - from .sub_resource_read_only_py3 import SubResourceReadOnly - from .operation_status_response_py3 import OperationStatusResponse - from .resource_update_py3 import ResourceUpdate - from .image_disk_reference_py3 import ImageDiskReference - from .creation_data_py3 import CreationData - from .source_vault_py3 import SourceVault - from .key_vault_and_secret_reference_py3 import KeyVaultAndSecretReference - from .key_vault_and_key_reference_py3 import KeyVaultAndKeyReference - from .encryption_settings_py3 import EncryptionSettings - from .disk_py3 import Disk - from .disk_update_py3 import DiskUpdate - from .grant_access_data_py3 import GrantAccessData - from .access_uri_py3 import AccessUri - from .snapshot_py3 import Snapshot - from .snapshot_update_py3 import SnapshotUpdate + from ._models_py3 import AccessUri + from ._models_py3 import AdditionalUnattendContent + from ._models_py3 import ApiEntityReference + from ._models_py3 import ApiError + from ._models_py3 import ApiErrorBase + from ._models_py3 import AvailabilitySet + from ._models_py3 import BootDiagnostics + from ._models_py3 import BootDiagnosticsInstanceView + from ._models_py3 import ComputeLongRunningOperationProperties + from ._models_py3 import CreationData + from ._models_py3 import DataDisk + from ._models_py3 import DataDiskImage + from ._models_py3 import DiagnosticsProfile + from ._models_py3 import Disk + from ._models_py3 import DiskEncryptionSettings + from ._models_py3 import DiskInstanceView + from ._models_py3 import DiskUpdate + from ._models_py3 import EncryptionSettings + from ._models_py3 import GrantAccessData + from ._models_py3 import HardwareProfile + from ._models_py3 import Image + from ._models_py3 import ImageDataDisk + from ._models_py3 import ImageDiskReference + from ._models_py3 import ImageOSDisk + from ._models_py3 import ImageReference + from ._models_py3 import ImageStorageProfile + from ._models_py3 import InnerError + from ._models_py3 import InstanceViewStatus + from ._models_py3 import KeyVaultAndKeyReference + from ._models_py3 import KeyVaultAndSecretReference + from ._models_py3 import KeyVaultKeyReference + from ._models_py3 import KeyVaultSecretReference + from ._models_py3 import LinuxConfiguration + from ._models_py3 import ManagedDiskParameters + from ._models_py3 import NetworkInterfaceReference + from ._models_py3 import NetworkProfile + from ._models_py3 import OperationStatusResponse + from ._models_py3 import OSDisk + from ._models_py3 import OSDiskImage + from ._models_py3 import OSProfile + from ._models_py3 import Plan + from ._models_py3 import PurchasePlan + from ._models_py3 import Resource + from ._models_py3 import ResourceUpdate + from ._models_py3 import Sku + from ._models_py3 import Snapshot + from ._models_py3 import SnapshotUpdate + from ._models_py3 import SourceVault + from ._models_py3 import SshConfiguration + from ._models_py3 import SshPublicKey + from ._models_py3 import StorageProfile + from ._models_py3 import SubResource + from ._models_py3 import SubResourceReadOnly + from ._models_py3 import UpdateResource + from ._models_py3 import UpgradePolicy + from ._models_py3 import Usage + from ._models_py3 import UsageName + from ._models_py3 import VaultCertificate + from ._models_py3 import VaultSecretGroup + from ._models_py3 import VirtualHardDisk + from ._models_py3 import VirtualMachine + from ._models_py3 import VirtualMachineAgentInstanceView + from ._models_py3 import VirtualMachineCaptureParameters + from ._models_py3 import VirtualMachineCaptureResult + from ._models_py3 import VirtualMachineExtension + from ._models_py3 import VirtualMachineExtensionHandlerInstanceView + from ._models_py3 import VirtualMachineExtensionImage + from ._models_py3 import VirtualMachineExtensionInstanceView + from ._models_py3 import VirtualMachineExtensionsListResult + from ._models_py3 import VirtualMachineExtensionUpdate + from ._models_py3 import VirtualMachineIdentity + from ._models_py3 import VirtualMachineImage + from ._models_py3 import VirtualMachineImageResource + from ._models_py3 import VirtualMachineInstanceView + from ._models_py3 import VirtualMachineScaleSet + from ._models_py3 import VirtualMachineScaleSetDataDisk + from ._models_py3 import VirtualMachineScaleSetExtension + from ._models_py3 import VirtualMachineScaleSetExtensionProfile + from ._models_py3 import VirtualMachineScaleSetIdentity + from ._models_py3 import VirtualMachineScaleSetInstanceView + from ._models_py3 import VirtualMachineScaleSetInstanceViewStatusesSummary + from ._models_py3 import VirtualMachineScaleSetIPConfiguration + from ._models_py3 import VirtualMachineScaleSetManagedDiskParameters + from ._models_py3 import VirtualMachineScaleSetNetworkConfiguration + from ._models_py3 import VirtualMachineScaleSetNetworkProfile + from ._models_py3 import VirtualMachineScaleSetOSDisk + from ._models_py3 import VirtualMachineScaleSetOSProfile + from ._models_py3 import VirtualMachineScaleSetSku + from ._models_py3 import VirtualMachineScaleSetSkuCapacity + from ._models_py3 import VirtualMachineScaleSetStorageProfile + from ._models_py3 import VirtualMachineScaleSetVM + from ._models_py3 import VirtualMachineScaleSetVMExtensionsSummary + from ._models_py3 import VirtualMachineScaleSetVMInstanceIDs + from ._models_py3 import VirtualMachineScaleSetVMInstanceRequiredIDs + from ._models_py3 import VirtualMachineScaleSetVMInstanceView + from ._models_py3 import VirtualMachineScaleSetVMProfile + from ._models_py3 import VirtualMachineSize + from ._models_py3 import VirtualMachineStatusCodeCount + from ._models_py3 import WindowsConfiguration + from ._models_py3 import WinRMConfiguration + from ._models_py3 import WinRMListener except (SyntaxError, ImportError): - from .instance_view_status import InstanceViewStatus - from .sub_resource import SubResource - from .sku import Sku - from .availability_set import AvailabilitySet - from .virtual_machine_size import VirtualMachineSize - from .virtual_machine_extension_image import VirtualMachineExtensionImage - from .virtual_machine_image_resource import VirtualMachineImageResource - from .virtual_machine_extension_instance_view import VirtualMachineExtensionInstanceView - from .virtual_machine_extension import VirtualMachineExtension - from .virtual_machine_extension_update import VirtualMachineExtensionUpdate - from .virtual_machine_extensions_list_result import VirtualMachineExtensionsListResult - from .purchase_plan import PurchasePlan - from .os_disk_image import OSDiskImage - from .data_disk_image import DataDiskImage - from .virtual_machine_image import VirtualMachineImage - from .usage_name import UsageName - from .usage import Usage - from .virtual_machine_capture_parameters import VirtualMachineCaptureParameters - from .virtual_machine_capture_result import VirtualMachineCaptureResult - from .plan import Plan - from .hardware_profile import HardwareProfile - from .image_reference import ImageReference - from .key_vault_secret_reference import KeyVaultSecretReference - from .key_vault_key_reference import KeyVaultKeyReference - from .disk_encryption_settings import DiskEncryptionSettings - from .virtual_hard_disk import VirtualHardDisk - from .managed_disk_parameters import ManagedDiskParameters - from .os_disk import OSDisk - from .data_disk import DataDisk - from .storage_profile import StorageProfile - from .additional_unattend_content import AdditionalUnattendContent - from .win_rm_listener import WinRMListener - from .win_rm_configuration import WinRMConfiguration - from .windows_configuration import WindowsConfiguration - from .ssh_public_key import SshPublicKey - from .ssh_configuration import SshConfiguration - from .linux_configuration import LinuxConfiguration - from .vault_certificate import VaultCertificate - from .vault_secret_group import VaultSecretGroup - from .os_profile import OSProfile - from .network_interface_reference import NetworkInterfaceReference - from .network_profile import NetworkProfile - from .boot_diagnostics import BootDiagnostics - from .diagnostics_profile import DiagnosticsProfile - from .virtual_machine_extension_handler_instance_view import VirtualMachineExtensionHandlerInstanceView - from .virtual_machine_agent_instance_view import VirtualMachineAgentInstanceView - from .disk_instance_view import DiskInstanceView - from .boot_diagnostics_instance_view import BootDiagnosticsInstanceView - from .virtual_machine_identity import VirtualMachineIdentity - from .virtual_machine_instance_view import VirtualMachineInstanceView - from .virtual_machine import VirtualMachine - from .upgrade_policy import UpgradePolicy - from .image_os_disk import ImageOSDisk - from .image_data_disk import ImageDataDisk - from .image_storage_profile import ImageStorageProfile - from .image import Image - from .virtual_machine_scale_set_identity import VirtualMachineScaleSetIdentity - from .virtual_machine_scale_set_os_profile import VirtualMachineScaleSetOSProfile - from .virtual_machine_scale_set_managed_disk_parameters import VirtualMachineScaleSetManagedDiskParameters - from .virtual_machine_scale_set_os_disk import VirtualMachineScaleSetOSDisk - from .virtual_machine_scale_set_data_disk import VirtualMachineScaleSetDataDisk - from .virtual_machine_scale_set_storage_profile import VirtualMachineScaleSetStorageProfile - from .api_entity_reference import ApiEntityReference - from .virtual_machine_scale_set_ip_configuration import VirtualMachineScaleSetIPConfiguration - from .virtual_machine_scale_set_network_configuration import VirtualMachineScaleSetNetworkConfiguration - from .virtual_machine_scale_set_network_profile import VirtualMachineScaleSetNetworkProfile - from .virtual_machine_scale_set_extension import VirtualMachineScaleSetExtension - from .virtual_machine_scale_set_extension_profile import VirtualMachineScaleSetExtensionProfile - from .virtual_machine_scale_set_vm_profile import VirtualMachineScaleSetVMProfile - from .virtual_machine_scale_set import VirtualMachineScaleSet - from .virtual_machine_scale_set_vm_instance_ids import VirtualMachineScaleSetVMInstanceIDs - from .virtual_machine_scale_set_vm_instance_required_ids import VirtualMachineScaleSetVMInstanceRequiredIDs - from .virtual_machine_status_code_count import VirtualMachineStatusCodeCount - from .virtual_machine_scale_set_instance_view_statuses_summary import VirtualMachineScaleSetInstanceViewStatusesSummary - from .virtual_machine_scale_set_vm_extensions_summary import VirtualMachineScaleSetVMExtensionsSummary - from .virtual_machine_scale_set_instance_view import VirtualMachineScaleSetInstanceView - from .virtual_machine_scale_set_sku_capacity import VirtualMachineScaleSetSkuCapacity - from .virtual_machine_scale_set_sku import VirtualMachineScaleSetSku - from .virtual_machine_scale_set_vm_instance_view import VirtualMachineScaleSetVMInstanceView - from .virtual_machine_scale_set_vm import VirtualMachineScaleSetVM - from .api_error_base import ApiErrorBase - from .inner_error import InnerError - from .api_error import ApiError - from .compute_long_running_operation_properties import ComputeLongRunningOperationProperties - from .resource import Resource - from .update_resource import UpdateResource - from .sub_resource_read_only import SubResourceReadOnly - from .operation_status_response import OperationStatusResponse - from .resource_update import ResourceUpdate - from .image_disk_reference import ImageDiskReference - from .creation_data import CreationData - from .source_vault import SourceVault - from .key_vault_and_secret_reference import KeyVaultAndSecretReference - from .key_vault_and_key_reference import KeyVaultAndKeyReference - from .encryption_settings import EncryptionSettings - from .disk import Disk - from .disk_update import DiskUpdate - from .grant_access_data import GrantAccessData - from .access_uri import AccessUri - from .snapshot import Snapshot - from .snapshot_update import SnapshotUpdate -from .availability_set_paged import AvailabilitySetPaged -from .virtual_machine_size_paged import VirtualMachineSizePaged -from .virtual_machine_paged import VirtualMachinePaged -from .usage_paged import UsagePaged -from .image_paged import ImagePaged -from .virtual_machine_scale_set_paged import VirtualMachineScaleSetPaged -from .virtual_machine_scale_set_sku_paged import VirtualMachineScaleSetSkuPaged -from .virtual_machine_scale_set_vm_paged import VirtualMachineScaleSetVMPaged -from .disk_paged import DiskPaged -from .snapshot_paged import SnapshotPaged -from .compute_management_client_enums import ( + from ._models import AccessUri + from ._models import AdditionalUnattendContent + from ._models import ApiEntityReference + from ._models import ApiError + from ._models import ApiErrorBase + from ._models import AvailabilitySet + from ._models import BootDiagnostics + from ._models import BootDiagnosticsInstanceView + from ._models import ComputeLongRunningOperationProperties + from ._models import CreationData + from ._models import DataDisk + from ._models import DataDiskImage + from ._models import DiagnosticsProfile + from ._models import Disk + from ._models import DiskEncryptionSettings + from ._models import DiskInstanceView + from ._models import DiskUpdate + from ._models import EncryptionSettings + from ._models import GrantAccessData + from ._models import HardwareProfile + from ._models import Image + from ._models import ImageDataDisk + from ._models import ImageDiskReference + from ._models import ImageOSDisk + from ._models import ImageReference + from ._models import ImageStorageProfile + from ._models import InnerError + from ._models import InstanceViewStatus + from ._models import KeyVaultAndKeyReference + from ._models import KeyVaultAndSecretReference + from ._models import KeyVaultKeyReference + from ._models import KeyVaultSecretReference + from ._models import LinuxConfiguration + from ._models import ManagedDiskParameters + from ._models import NetworkInterfaceReference + from ._models import NetworkProfile + from ._models import OperationStatusResponse + from ._models import OSDisk + from ._models import OSDiskImage + from ._models import OSProfile + from ._models import Plan + from ._models import PurchasePlan + from ._models import Resource + from ._models import ResourceUpdate + from ._models import Sku + from ._models import Snapshot + from ._models import SnapshotUpdate + from ._models import SourceVault + from ._models import SshConfiguration + from ._models import SshPublicKey + from ._models import StorageProfile + from ._models import SubResource + from ._models import SubResourceReadOnly + from ._models import UpdateResource + from ._models import UpgradePolicy + from ._models import Usage + from ._models import UsageName + from ._models import VaultCertificate + from ._models import VaultSecretGroup + from ._models import VirtualHardDisk + from ._models import VirtualMachine + from ._models import VirtualMachineAgentInstanceView + from ._models import VirtualMachineCaptureParameters + from ._models import VirtualMachineCaptureResult + from ._models import VirtualMachineExtension + from ._models import VirtualMachineExtensionHandlerInstanceView + from ._models import VirtualMachineExtensionImage + from ._models import VirtualMachineExtensionInstanceView + from ._models import VirtualMachineExtensionsListResult + from ._models import VirtualMachineExtensionUpdate + from ._models import VirtualMachineIdentity + from ._models import VirtualMachineImage + from ._models import VirtualMachineImageResource + from ._models import VirtualMachineInstanceView + from ._models import VirtualMachineScaleSet + from ._models import VirtualMachineScaleSetDataDisk + from ._models import VirtualMachineScaleSetExtension + from ._models import VirtualMachineScaleSetExtensionProfile + from ._models import VirtualMachineScaleSetIdentity + from ._models import VirtualMachineScaleSetInstanceView + from ._models import VirtualMachineScaleSetInstanceViewStatusesSummary + from ._models import VirtualMachineScaleSetIPConfiguration + from ._models import VirtualMachineScaleSetManagedDiskParameters + from ._models import VirtualMachineScaleSetNetworkConfiguration + from ._models import VirtualMachineScaleSetNetworkProfile + from ._models import VirtualMachineScaleSetOSDisk + from ._models import VirtualMachineScaleSetOSProfile + from ._models import VirtualMachineScaleSetSku + from ._models import VirtualMachineScaleSetSkuCapacity + from ._models import VirtualMachineScaleSetStorageProfile + from ._models import VirtualMachineScaleSetVM + from ._models import VirtualMachineScaleSetVMExtensionsSummary + from ._models import VirtualMachineScaleSetVMInstanceIDs + from ._models import VirtualMachineScaleSetVMInstanceRequiredIDs + from ._models import VirtualMachineScaleSetVMInstanceView + from ._models import VirtualMachineScaleSetVMProfile + from ._models import VirtualMachineSize + from ._models import VirtualMachineStatusCodeCount + from ._models import WindowsConfiguration + from ._models import WinRMConfiguration + from ._models import WinRMListener +from ._paged_models import AvailabilitySetPaged +from ._paged_models import DiskPaged +from ._paged_models import ImagePaged +from ._paged_models import SnapshotPaged +from ._paged_models import UsagePaged +from ._paged_models import VirtualMachinePaged +from ._paged_models import VirtualMachineScaleSetPaged +from ._paged_models import VirtualMachineScaleSetSkuPaged +from ._paged_models import VirtualMachineScaleSetVMPaged +from ._paged_models import VirtualMachineSizePaged +from ._compute_management_client_enums import ( StatusLevelTypes, OperatingSystemTypes, VirtualMachineSizeTypes, @@ -244,107 +244,107 @@ ) __all__ = [ - 'InstanceViewStatus', - 'SubResource', - 'Sku', + 'AccessUri', + 'AdditionalUnattendContent', + 'ApiEntityReference', + 'ApiError', + 'ApiErrorBase', 'AvailabilitySet', - 'VirtualMachineSize', - 'VirtualMachineExtensionImage', - 'VirtualMachineImageResource', - 'VirtualMachineExtensionInstanceView', - 'VirtualMachineExtension', - 'VirtualMachineExtensionUpdate', - 'VirtualMachineExtensionsListResult', - 'PurchasePlan', - 'OSDiskImage', + 'BootDiagnostics', + 'BootDiagnosticsInstanceView', + 'ComputeLongRunningOperationProperties', + 'CreationData', + 'DataDisk', 'DataDiskImage', - 'VirtualMachineImage', - 'UsageName', - 'Usage', - 'VirtualMachineCaptureParameters', - 'VirtualMachineCaptureResult', - 'Plan', + 'DiagnosticsProfile', + 'Disk', + 'DiskEncryptionSettings', + 'DiskInstanceView', + 'DiskUpdate', + 'EncryptionSettings', + 'GrantAccessData', 'HardwareProfile', + 'Image', + 'ImageDataDisk', + 'ImageDiskReference', + 'ImageOSDisk', 'ImageReference', - 'KeyVaultSecretReference', + 'ImageStorageProfile', + 'InnerError', + 'InstanceViewStatus', + 'KeyVaultAndKeyReference', + 'KeyVaultAndSecretReference', 'KeyVaultKeyReference', - 'DiskEncryptionSettings', - 'VirtualHardDisk', + 'KeyVaultSecretReference', + 'LinuxConfiguration', 'ManagedDiskParameters', + 'NetworkInterfaceReference', + 'NetworkProfile', + 'OperationStatusResponse', 'OSDisk', - 'DataDisk', - 'StorageProfile', - 'AdditionalUnattendContent', - 'WinRMListener', - 'WinRMConfiguration', - 'WindowsConfiguration', - 'SshPublicKey', + 'OSDiskImage', + 'OSProfile', + 'Plan', + 'PurchasePlan', + 'Resource', + 'ResourceUpdate', + 'Sku', + 'Snapshot', + 'SnapshotUpdate', + 'SourceVault', 'SshConfiguration', - 'LinuxConfiguration', + 'SshPublicKey', + 'StorageProfile', + 'SubResource', + 'SubResourceReadOnly', + 'UpdateResource', + 'UpgradePolicy', + 'Usage', + 'UsageName', 'VaultCertificate', 'VaultSecretGroup', - 'OSProfile', - 'NetworkInterfaceReference', - 'NetworkProfile', - 'BootDiagnostics', - 'DiagnosticsProfile', - 'VirtualMachineExtensionHandlerInstanceView', + 'VirtualHardDisk', + 'VirtualMachine', 'VirtualMachineAgentInstanceView', - 'DiskInstanceView', - 'BootDiagnosticsInstanceView', + 'VirtualMachineCaptureParameters', + 'VirtualMachineCaptureResult', + 'VirtualMachineExtension', + 'VirtualMachineExtensionHandlerInstanceView', + 'VirtualMachineExtensionImage', + 'VirtualMachineExtensionInstanceView', + 'VirtualMachineExtensionsListResult', + 'VirtualMachineExtensionUpdate', 'VirtualMachineIdentity', + 'VirtualMachineImage', + 'VirtualMachineImageResource', 'VirtualMachineInstanceView', - 'VirtualMachine', - 'UpgradePolicy', - 'ImageOSDisk', - 'ImageDataDisk', - 'ImageStorageProfile', - 'Image', - 'VirtualMachineScaleSetIdentity', - 'VirtualMachineScaleSetOSProfile', - 'VirtualMachineScaleSetManagedDiskParameters', - 'VirtualMachineScaleSetOSDisk', + 'VirtualMachineScaleSet', 'VirtualMachineScaleSetDataDisk', - 'VirtualMachineScaleSetStorageProfile', - 'ApiEntityReference', + 'VirtualMachineScaleSetExtension', + 'VirtualMachineScaleSetExtensionProfile', + 'VirtualMachineScaleSetIdentity', + 'VirtualMachineScaleSetInstanceView', + 'VirtualMachineScaleSetInstanceViewStatusesSummary', 'VirtualMachineScaleSetIPConfiguration', + 'VirtualMachineScaleSetManagedDiskParameters', 'VirtualMachineScaleSetNetworkConfiguration', 'VirtualMachineScaleSetNetworkProfile', - 'VirtualMachineScaleSetExtension', - 'VirtualMachineScaleSetExtensionProfile', - 'VirtualMachineScaleSetVMProfile', - 'VirtualMachineScaleSet', + 'VirtualMachineScaleSetOSDisk', + 'VirtualMachineScaleSetOSProfile', + 'VirtualMachineScaleSetSku', + 'VirtualMachineScaleSetSkuCapacity', + 'VirtualMachineScaleSetStorageProfile', + 'VirtualMachineScaleSetVM', + 'VirtualMachineScaleSetVMExtensionsSummary', 'VirtualMachineScaleSetVMInstanceIDs', 'VirtualMachineScaleSetVMInstanceRequiredIDs', - 'VirtualMachineStatusCodeCount', - 'VirtualMachineScaleSetInstanceViewStatusesSummary', - 'VirtualMachineScaleSetVMExtensionsSummary', - 'VirtualMachineScaleSetInstanceView', - 'VirtualMachineScaleSetSkuCapacity', - 'VirtualMachineScaleSetSku', 'VirtualMachineScaleSetVMInstanceView', - 'VirtualMachineScaleSetVM', - 'ApiErrorBase', - 'InnerError', - 'ApiError', - 'ComputeLongRunningOperationProperties', - 'Resource', - 'UpdateResource', - 'SubResourceReadOnly', - 'OperationStatusResponse', - 'ResourceUpdate', - 'ImageDiskReference', - 'CreationData', - 'SourceVault', - 'KeyVaultAndSecretReference', - 'KeyVaultAndKeyReference', - 'EncryptionSettings', - 'Disk', - 'DiskUpdate', - 'GrantAccessData', - 'AccessUri', - 'Snapshot', - 'SnapshotUpdate', + 'VirtualMachineScaleSetVMProfile', + 'VirtualMachineSize', + 'VirtualMachineStatusCodeCount', + 'WindowsConfiguration', + 'WinRMConfiguration', + 'WinRMListener', 'AvailabilitySetPaged', 'VirtualMachineSizePaged', 'VirtualMachinePaged', diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/compute_management_client_enums.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/_compute_management_client_enums.py similarity index 100% rename from sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/compute_management_client_enums.py rename to sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/_compute_management_client_enums.py diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/_models.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/_models.py new file mode 100644 index 000000000000..492d64dc057e --- /dev/null +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/_models.py @@ -0,0 +1,3939 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class AccessUri(Model): + """A disk access SAS uri. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar access_sas: A SAS uri for accessing a disk. + :vartype access_sas: str + """ + + _validation = { + 'access_sas': {'readonly': True}, + } + + _attribute_map = { + 'access_sas': {'key': 'properties.output.accessSAS', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(AccessUri, self).__init__(**kwargs) + self.access_sas = None + + +class AdditionalUnattendContent(Model): + """Specifies additional XML formatted information that can be included in the + Unattend.xml file, which is used by Windows Setup. Contents are defined by + setting name, component name, and the pass in which the content is applied. + + :param pass_name: The pass name. Currently, the only allowable value is + OobeSystem. Possible values include: 'OobeSystem' + :type pass_name: str or + ~azure.mgmt.compute.v2016_04_30_preview.models.PassNames + :param component_name: The component name. Currently, the only allowable + value is Microsoft-Windows-Shell-Setup. Possible values include: + 'Microsoft-Windows-Shell-Setup' + :type component_name: str or + ~azure.mgmt.compute.v2016_04_30_preview.models.ComponentNames + :param setting_name: Specifies the name of the setting to which the + content applies. Possible values are: FirstLogonCommands and AutoLogon. + Possible values include: 'AutoLogon', 'FirstLogonCommands' + :type setting_name: str or + ~azure.mgmt.compute.v2016_04_30_preview.models.SettingNames + :param content: Specifies the XML formatted content that is added to the + unattend.xml file for the specified path and component. The XML must be + less than 4KB and must include the root element for the setting or feature + that is being inserted. + :type content: str + """ + + _attribute_map = { + 'pass_name': {'key': 'passName', 'type': 'PassNames'}, + 'component_name': {'key': 'componentName', 'type': 'ComponentNames'}, + 'setting_name': {'key': 'settingName', 'type': 'SettingNames'}, + 'content': {'key': 'content', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(AdditionalUnattendContent, self).__init__(**kwargs) + self.pass_name = kwargs.get('pass_name', None) + self.component_name = kwargs.get('component_name', None) + self.setting_name = kwargs.get('setting_name', None) + self.content = kwargs.get('content', None) + + +class ApiEntityReference(Model): + """The API entity reference. + + :param id: The ARM resource id in the form of + /subscriptions/{SubscriptionId}/resourceGroups/{ResourceGroupName}/... + :type id: str + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ApiEntityReference, self).__init__(**kwargs) + self.id = kwargs.get('id', None) + + +class ApiError(Model): + """Api error. + + :param details: The Api error details + :type details: + list[~azure.mgmt.compute.v2016_04_30_preview.models.ApiErrorBase] + :param innererror: The Api inner error + :type innererror: + ~azure.mgmt.compute.v2016_04_30_preview.models.InnerError + :param code: The error code. + :type code: str + :param target: The target of the particular error. + :type target: str + :param message: The error message. + :type message: str + """ + + _attribute_map = { + 'details': {'key': 'details', 'type': '[ApiErrorBase]'}, + 'innererror': {'key': 'innererror', 'type': 'InnerError'}, + 'code': {'key': 'code', 'type': 'str'}, + 'target': {'key': 'target', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ApiError, self).__init__(**kwargs) + self.details = kwargs.get('details', None) + self.innererror = kwargs.get('innererror', None) + self.code = kwargs.get('code', None) + self.target = kwargs.get('target', None) + self.message = kwargs.get('message', None) + + +class ApiErrorBase(Model): + """Api error base. + + :param code: The error code. + :type code: str + :param target: The target of the particular error. + :type target: str + :param message: The error message. + :type message: str + """ + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + 'target': {'key': 'target', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ApiErrorBase, self).__init__(**kwargs) + self.code = kwargs.get('code', None) + self.target = kwargs.get('target', None) + self.message = kwargs.get('message', None) + + +class Resource(Model): + """The Resource model definition. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource Id + :vartype id: str + :ivar name: Resource name + :vartype name: str + :ivar type: Resource type + :vartype type: str + :param location: Required. Resource location + :type location: str + :param tags: Resource tags + :type tags: dict[str, str] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__(self, **kwargs): + super(Resource, self).__init__(**kwargs) + self.id = None + self.name = None + self.type = None + self.location = kwargs.get('location', None) + self.tags = kwargs.get('tags', None) + + +class AvailabilitySet(Resource): + """Specifies information about the availability set that the virtual machine + should be assigned to. Virtual machines specified in the same availability + set are allocated to different nodes to maximize availability. For more + information about availability sets, see [Manage the availability of + virtual + machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-manage-availability?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). +

    For more information on Azure planned maintenance, see [Planned + maintenance for virtual machines in + Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-planned-maintenance?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json) +

    Currently, a VM can only be added to availability set at creation + time. An existing VM cannot be added to an availability set. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource Id + :vartype id: str + :ivar name: Resource name + :vartype name: str + :ivar type: Resource type + :vartype type: str + :param location: Required. Resource location + :type location: str + :param tags: Resource tags + :type tags: dict[str, str] + :param platform_update_domain_count: Update Domain count. + :type platform_update_domain_count: int + :param platform_fault_domain_count: Fault Domain count. + :type platform_fault_domain_count: int + :param virtual_machines: A list of references to all virtual machines in + the availability set. + :type virtual_machines: + list[~azure.mgmt.compute.v2016_04_30_preview.models.SubResource] + :ivar statuses: The resource status information. + :vartype statuses: + list[~azure.mgmt.compute.v2016_04_30_preview.models.InstanceViewStatus] + :param managed: If the availability set supports managed disks. + :type managed: bool + :param sku: Sku of the availability set + :type sku: ~azure.mgmt.compute.v2016_04_30_preview.models.Sku + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + 'statuses': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'platform_update_domain_count': {'key': 'properties.platformUpdateDomainCount', 'type': 'int'}, + 'platform_fault_domain_count': {'key': 'properties.platformFaultDomainCount', 'type': 'int'}, + 'virtual_machines': {'key': 'properties.virtualMachines', 'type': '[SubResource]'}, + 'statuses': {'key': 'properties.statuses', 'type': '[InstanceViewStatus]'}, + 'managed': {'key': 'properties.managed', 'type': 'bool'}, + 'sku': {'key': 'sku', 'type': 'Sku'}, + } + + def __init__(self, **kwargs): + super(AvailabilitySet, self).__init__(**kwargs) + self.platform_update_domain_count = kwargs.get('platform_update_domain_count', None) + self.platform_fault_domain_count = kwargs.get('platform_fault_domain_count', None) + self.virtual_machines = kwargs.get('virtual_machines', None) + self.statuses = None + self.managed = kwargs.get('managed', None) + self.sku = kwargs.get('sku', None) + + +class BootDiagnostics(Model): + """Boot Diagnostics is a debugging feature which allows you to view Console + Output and Screenshot to diagnose VM status.

    You can easily view + the output of your console log.

    Azure also enables you to see a + screenshot of the VM from the hypervisor. + + :param enabled: Whether boot diagnostics should be enabled on the Virtual + Machine. + :type enabled: bool + :param storage_uri: Uri of the storage account to use for placing the + console output and screenshot. + :type storage_uri: str + """ + + _attribute_map = { + 'enabled': {'key': 'enabled', 'type': 'bool'}, + 'storage_uri': {'key': 'storageUri', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(BootDiagnostics, self).__init__(**kwargs) + self.enabled = kwargs.get('enabled', None) + self.storage_uri = kwargs.get('storage_uri', None) + + +class BootDiagnosticsInstanceView(Model): + """The instance view of a virtual machine boot diagnostics. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar console_screenshot_blob_uri: The console screenshot blob URI. + :vartype console_screenshot_blob_uri: str + :ivar serial_console_log_blob_uri: The Linux serial console log blob Uri. + :vartype serial_console_log_blob_uri: str + """ + + _validation = { + 'console_screenshot_blob_uri': {'readonly': True}, + 'serial_console_log_blob_uri': {'readonly': True}, + } + + _attribute_map = { + 'console_screenshot_blob_uri': {'key': 'consoleScreenshotBlobUri', 'type': 'str'}, + 'serial_console_log_blob_uri': {'key': 'serialConsoleLogBlobUri', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(BootDiagnosticsInstanceView, self).__init__(**kwargs) + self.console_screenshot_blob_uri = None + self.serial_console_log_blob_uri = None + + +class CloudError(Model): + """CloudError. + """ + + _attribute_map = { + } + + +class ComputeLongRunningOperationProperties(Model): + """Compute-specific operation properties, including output. + + :param output: Operation output data (raw JSON) + :type output: object + """ + + _attribute_map = { + 'output': {'key': 'output', 'type': 'object'}, + } + + def __init__(self, **kwargs): + super(ComputeLongRunningOperationProperties, self).__init__(**kwargs) + self.output = kwargs.get('output', None) + + +class CreationData(Model): + """Data used when creating a disk. + + All required parameters must be populated in order to send to Azure. + + :param create_option: Required. This enumerates the possible sources of a + disk's creation. Possible values include: 'Empty', 'Attach', 'FromImage', + 'Import', 'Copy', 'Restore' + :type create_option: str or + ~azure.mgmt.compute.v2016_04_30_preview.models.DiskCreateOption + :param storage_account_id: If createOption is Import, the Azure Resource + Manager identifier of the storage account containing the blob to import as + a disk. Required only if the blob is in a different subscription + :type storage_account_id: str + :param image_reference: Disk source information. + :type image_reference: + ~azure.mgmt.compute.v2016_04_30_preview.models.ImageDiskReference + :param source_uri: If createOption is Import, this is a SAS URI to a blob + to be imported into a managed disk. If createOption is Copy, this is a + relative Uri containing the id of the source snapshot to be copied into a + managed disk. + :type source_uri: str + :param source_resource_id: If createOption is Copy, this is the ARM id of + the source snapshot or disk. If createOption is Restore, this is the + ARM-like id of the source disk restore point. + :type source_resource_id: str + """ + + _validation = { + 'create_option': {'required': True}, + } + + _attribute_map = { + 'create_option': {'key': 'createOption', 'type': 'DiskCreateOption'}, + 'storage_account_id': {'key': 'storageAccountId', 'type': 'str'}, + 'image_reference': {'key': 'imageReference', 'type': 'ImageDiskReference'}, + 'source_uri': {'key': 'sourceUri', 'type': 'str'}, + 'source_resource_id': {'key': 'sourceResourceId', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(CreationData, self).__init__(**kwargs) + self.create_option = kwargs.get('create_option', None) + self.storage_account_id = kwargs.get('storage_account_id', None) + self.image_reference = kwargs.get('image_reference', None) + self.source_uri = kwargs.get('source_uri', None) + self.source_resource_id = kwargs.get('source_resource_id', None) + + +class DataDisk(Model): + """Describes a data disk. + + All required parameters must be populated in order to send to Azure. + + :param lun: Required. Specifies the logical unit number of the data disk. + This value is used to identify data disks within the VM and therefore must + be unique for each data disk attached to a VM. + :type lun: int + :param name: The disk name. + :type name: str + :param vhd: The virtual hard disk. + :type vhd: ~azure.mgmt.compute.v2016_04_30_preview.models.VirtualHardDisk + :param image: The source user image virtual hard disk. The virtual hard + disk will be copied before being attached to the virtual machine. If + SourceImage is provided, the destination virtual hard drive must not + exist. + :type image: + ~azure.mgmt.compute.v2016_04_30_preview.models.VirtualHardDisk + :param caching: Specifies the caching requirements.

    Possible + values are:

    **None**

    **ReadOnly**

    **ReadWrite** +

    Default: **None for Standard storage. ReadOnly for Premium + storage**. Possible values include: 'None', 'ReadOnly', 'ReadWrite' + :type caching: str or + ~azure.mgmt.compute.v2016_04_30_preview.models.CachingTypes + :param create_option: Required. Specifies how the virtual machine should + be created.

    Possible values are:

    **Attach** \\u2013 This + value is used when you are using a specialized disk to create the virtual + machine.

    **FromImage** \\u2013 This value is used when you are + using an image to create the virtual machine. If you are using a platform + image, you also use the imageReference element described above. If you are + using a marketplace image, you also use the plan element previously + described. Possible values include: 'FromImage', 'Empty', 'Attach' + :type create_option: str or + ~azure.mgmt.compute.v2016_04_30_preview.models.DiskCreateOptionTypes + :param disk_size_gb: Specifies the size of an empty data disk in + gigabytes. This element can be used to overwrite the size of the disk in a + virtual machine image.

    This value cannot be larger than 1023 GB + :type disk_size_gb: int + :param managed_disk: The managed disk parameters. + :type managed_disk: + ~azure.mgmt.compute.v2016_04_30_preview.models.ManagedDiskParameters + """ + + _validation = { + 'lun': {'required': True}, + 'create_option': {'required': True}, + } + + _attribute_map = { + 'lun': {'key': 'lun', 'type': 'int'}, + 'name': {'key': 'name', 'type': 'str'}, + 'vhd': {'key': 'vhd', 'type': 'VirtualHardDisk'}, + 'image': {'key': 'image', 'type': 'VirtualHardDisk'}, + 'caching': {'key': 'caching', 'type': 'CachingTypes'}, + 'create_option': {'key': 'createOption', 'type': 'DiskCreateOptionTypes'}, + 'disk_size_gb': {'key': 'diskSizeGB', 'type': 'int'}, + 'managed_disk': {'key': 'managedDisk', 'type': 'ManagedDiskParameters'}, + } + + def __init__(self, **kwargs): + super(DataDisk, self).__init__(**kwargs) + self.lun = kwargs.get('lun', None) + self.name = kwargs.get('name', None) + self.vhd = kwargs.get('vhd', None) + self.image = kwargs.get('image', None) + self.caching = kwargs.get('caching', None) + self.create_option = kwargs.get('create_option', None) + self.disk_size_gb = kwargs.get('disk_size_gb', None) + self.managed_disk = kwargs.get('managed_disk', None) + + +class DataDiskImage(Model): + """Contains the data disk images information. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar lun: Specifies the logical unit number of the data disk. This value + is used to identify data disks within the VM and therefore must be unique + for each data disk attached to a VM. + :vartype lun: int + """ + + _validation = { + 'lun': {'readonly': True}, + } + + _attribute_map = { + 'lun': {'key': 'lun', 'type': 'int'}, + } + + def __init__(self, **kwargs): + super(DataDiskImage, self).__init__(**kwargs) + self.lun = None + + +class DiagnosticsProfile(Model): + """Specifies the boot diagnostic settings state.

    Minimum api-version: + 2015-06-15. + + :param boot_diagnostics: Boot Diagnostics is a debugging feature which + allows you to view Console Output and Screenshot to diagnose VM status. +

    You can easily view the output of your console log.

    + Azure also enables you to see a screenshot of the VM from the hypervisor. + :type boot_diagnostics: + ~azure.mgmt.compute.v2016_04_30_preview.models.BootDiagnostics + """ + + _attribute_map = { + 'boot_diagnostics': {'key': 'bootDiagnostics', 'type': 'BootDiagnostics'}, + } + + def __init__(self, **kwargs): + super(DiagnosticsProfile, self).__init__(**kwargs) + self.boot_diagnostics = kwargs.get('boot_diagnostics', None) + + +class Disk(Resource): + """Disk resource. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource Id + :vartype id: str + :ivar name: Resource name + :vartype name: str + :ivar type: Resource type + :vartype type: str + :param location: Required. Resource location + :type location: str + :param tags: Resource tags + :type tags: dict[str, str] + :param account_type: the storage account type of the disk. Possible values + include: 'Standard_LRS', 'Premium_LRS' + :type account_type: str or + ~azure.mgmt.compute.v2016_04_30_preview.models.StorageAccountTypes + :ivar time_created: The time when the disk was created. + :vartype time_created: datetime + :param os_type: The Operating System type. Possible values include: + 'Windows', 'Linux' + :type os_type: str or + ~azure.mgmt.compute.v2016_04_30_preview.models.OperatingSystemTypes + :param creation_data: Required. Disk source information. CreationData + information cannot be changed after the disk has been created. + :type creation_data: + ~azure.mgmt.compute.v2016_04_30_preview.models.CreationData + :param disk_size_gb: If creationData.createOption is Empty, this field is + mandatory and it indicates the size of the VHD to create. If this field is + present for updates or creation with other options, it indicates a resize. + Resizes are only allowed if the disk is not attached to a running VM, and + can only increase the disk's size. + :type disk_size_gb: int + :param encryption_settings: Encryption settings for disk or snapshot + :type encryption_settings: + ~azure.mgmt.compute.v2016_04_30_preview.models.EncryptionSettings + :ivar owner_id: A relative URI containing the VM id that has the disk + attached. + :vartype owner_id: str + :ivar provisioning_state: The disk provisioning state. + :vartype provisioning_state: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + 'time_created': {'readonly': True}, + 'creation_data': {'required': True}, + 'owner_id': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'account_type': {'key': 'properties.accountType', 'type': 'StorageAccountTypes'}, + 'time_created': {'key': 'properties.timeCreated', 'type': 'iso-8601'}, + 'os_type': {'key': 'properties.osType', 'type': 'OperatingSystemTypes'}, + 'creation_data': {'key': 'properties.creationData', 'type': 'CreationData'}, + 'disk_size_gb': {'key': 'properties.diskSizeGB', 'type': 'int'}, + 'encryption_settings': {'key': 'properties.encryptionSettings', 'type': 'EncryptionSettings'}, + 'owner_id': {'key': 'properties.ownerId', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(Disk, self).__init__(**kwargs) + self.account_type = kwargs.get('account_type', None) + self.time_created = None + self.os_type = kwargs.get('os_type', None) + self.creation_data = kwargs.get('creation_data', None) + self.disk_size_gb = kwargs.get('disk_size_gb', None) + self.encryption_settings = kwargs.get('encryption_settings', None) + self.owner_id = None + self.provisioning_state = None + + +class DiskEncryptionSettings(Model): + """Describes a Encryption Settings for a Disk. + + :param disk_encryption_key: Specifies the location of the disk encryption + key, which is a Key Vault Secret. + :type disk_encryption_key: + ~azure.mgmt.compute.v2016_04_30_preview.models.KeyVaultSecretReference + :param key_encryption_key: Specifies the location of the key encryption + key in Key Vault. + :type key_encryption_key: + ~azure.mgmt.compute.v2016_04_30_preview.models.KeyVaultKeyReference + :param enabled: Specifies whether disk encryption should be enabled on the + virtual machine. + :type enabled: bool + """ + + _attribute_map = { + 'disk_encryption_key': {'key': 'diskEncryptionKey', 'type': 'KeyVaultSecretReference'}, + 'key_encryption_key': {'key': 'keyEncryptionKey', 'type': 'KeyVaultKeyReference'}, + 'enabled': {'key': 'enabled', 'type': 'bool'}, + } + + def __init__(self, **kwargs): + super(DiskEncryptionSettings, self).__init__(**kwargs) + self.disk_encryption_key = kwargs.get('disk_encryption_key', None) + self.key_encryption_key = kwargs.get('key_encryption_key', None) + self.enabled = kwargs.get('enabled', None) + + +class DiskInstanceView(Model): + """The instance view of the disk. + + :param name: The disk name. + :type name: str + :param statuses: The resource status information. + :type statuses: + list[~azure.mgmt.compute.v2016_04_30_preview.models.InstanceViewStatus] + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'statuses': {'key': 'statuses', 'type': '[InstanceViewStatus]'}, + } + + def __init__(self, **kwargs): + super(DiskInstanceView, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.statuses = kwargs.get('statuses', None) + + +class ResourceUpdate(Model): + """The Resource model definition. + + :param tags: Resource tags + :type tags: dict[str, str] + """ + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__(self, **kwargs): + super(ResourceUpdate, self).__init__(**kwargs) + self.tags = kwargs.get('tags', None) + + +class DiskUpdate(ResourceUpdate): + """Disk update resource. + + :param tags: Resource tags + :type tags: dict[str, str] + :param account_type: the storage account type of the disk. Possible values + include: 'Standard_LRS', 'Premium_LRS' + :type account_type: str or + ~azure.mgmt.compute.v2016_04_30_preview.models.StorageAccountTypes + :param os_type: the Operating System type. Possible values include: + 'Windows', 'Linux' + :type os_type: str or + ~azure.mgmt.compute.v2016_04_30_preview.models.OperatingSystemTypes + :param creation_data: disk source information. CreationData information + cannot be changed after the disk has been created. + :type creation_data: + ~azure.mgmt.compute.v2016_04_30_preview.models.CreationData + :param disk_size_gb: If creationData.createOption is Empty, this field is + mandatory and it indicates the size of the VHD to create. If this field is + present for updates or creation with other options, it indicates a resize. + Resizes are only allowed if the disk is not attached to a running VM, and + can only increase the disk's size. + :type disk_size_gb: int + :param encryption_settings: Encryption settings for disk or snapshot + :type encryption_settings: + ~azure.mgmt.compute.v2016_04_30_preview.models.EncryptionSettings + """ + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + 'account_type': {'key': 'properties.accountType', 'type': 'StorageAccountTypes'}, + 'os_type': {'key': 'properties.osType', 'type': 'OperatingSystemTypes'}, + 'creation_data': {'key': 'properties.creationData', 'type': 'CreationData'}, + 'disk_size_gb': {'key': 'properties.diskSizeGB', 'type': 'int'}, + 'encryption_settings': {'key': 'properties.encryptionSettings', 'type': 'EncryptionSettings'}, + } + + def __init__(self, **kwargs): + super(DiskUpdate, self).__init__(**kwargs) + self.account_type = kwargs.get('account_type', None) + self.os_type = kwargs.get('os_type', None) + self.creation_data = kwargs.get('creation_data', None) + self.disk_size_gb = kwargs.get('disk_size_gb', None) + self.encryption_settings = kwargs.get('encryption_settings', None) + + +class EncryptionSettings(Model): + """Encryption settings for disk or snapshot. + + :param enabled: Set this flag to true and provide DiskEncryptionKey and + optional KeyEncryptionKey to enable encryption. Set this flag to false and + remove DiskEncryptionKey and KeyEncryptionKey to disable encryption. If + EncryptionSettings is null in the request object, the existing settings + remain unchanged. + :type enabled: bool + :param disk_encryption_key: Key Vault Secret Url and vault id of the disk + encryption key + :type disk_encryption_key: + ~azure.mgmt.compute.v2016_04_30_preview.models.KeyVaultAndSecretReference + :param key_encryption_key: Key Vault Key Url and vault id of the key + encryption key + :type key_encryption_key: + ~azure.mgmt.compute.v2016_04_30_preview.models.KeyVaultAndKeyReference + """ + + _attribute_map = { + 'enabled': {'key': 'enabled', 'type': 'bool'}, + 'disk_encryption_key': {'key': 'diskEncryptionKey', 'type': 'KeyVaultAndSecretReference'}, + 'key_encryption_key': {'key': 'keyEncryptionKey', 'type': 'KeyVaultAndKeyReference'}, + } + + def __init__(self, **kwargs): + super(EncryptionSettings, self).__init__(**kwargs) + self.enabled = kwargs.get('enabled', None) + self.disk_encryption_key = kwargs.get('disk_encryption_key', None) + self.key_encryption_key = kwargs.get('key_encryption_key', None) + + +class GrantAccessData(Model): + """Data used for requesting a SAS. + + All required parameters must be populated in order to send to Azure. + + :param access: Required. Possible values include: 'None', 'Read' + :type access: str or + ~azure.mgmt.compute.v2016_04_30_preview.models.AccessLevel + :param duration_in_seconds: Required. Time duration in seconds until the + SAS access expires. + :type duration_in_seconds: int + """ + + _validation = { + 'access': {'required': True}, + 'duration_in_seconds': {'required': True}, + } + + _attribute_map = { + 'access': {'key': 'access', 'type': 'AccessLevel'}, + 'duration_in_seconds': {'key': 'durationInSeconds', 'type': 'int'}, + } + + def __init__(self, **kwargs): + super(GrantAccessData, self).__init__(**kwargs) + self.access = kwargs.get('access', None) + self.duration_in_seconds = kwargs.get('duration_in_seconds', None) + + +class HardwareProfile(Model): + """Specifies the hardware settings for the virtual machine. + + :param vm_size: Specifies the size of the virtual machine. For more + information about virtual machine sizes, see [Sizes for virtual + machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-sizes?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). +

    The available VM sizes depend on region and availability set. For + a list of available sizes use these APIs:

    [List all available + virtual machine sizes in an availability + set](virtualmachines-list-sizes-availability-set.md)

    [List all + available virtual machine sizes in a + region](virtualmachines-list-sizes-region.md)

    [List all available + virtual machine sizes for + resizing](virtualmachines-list-sizes-for-resizing.md). Possible values + include: 'Basic_A0', 'Basic_A1', 'Basic_A2', 'Basic_A3', 'Basic_A4', + 'Standard_A0', 'Standard_A1', 'Standard_A2', 'Standard_A3', 'Standard_A4', + 'Standard_A5', 'Standard_A6', 'Standard_A7', 'Standard_A8', 'Standard_A9', + 'Standard_A10', 'Standard_A11', 'Standard_D1', 'Standard_D2', + 'Standard_D3', 'Standard_D4', 'Standard_D11', 'Standard_D12', + 'Standard_D13', 'Standard_D14', 'Standard_D1_v2', 'Standard_D2_v2', + 'Standard_D3_v2', 'Standard_D4_v2', 'Standard_D5_v2', 'Standard_D11_v2', + 'Standard_D12_v2', 'Standard_D13_v2', 'Standard_D14_v2', + 'Standard_D15_v2', 'Standard_DS1', 'Standard_DS2', 'Standard_DS3', + 'Standard_DS4', 'Standard_DS11', 'Standard_DS12', 'Standard_DS13', + 'Standard_DS14', 'Standard_DS1_v2', 'Standard_DS2_v2', 'Standard_DS3_v2', + 'Standard_DS4_v2', 'Standard_DS5_v2', 'Standard_DS11_v2', + 'Standard_DS12_v2', 'Standard_DS13_v2', 'Standard_DS14_v2', + 'Standard_DS15_v2', 'Standard_G1', 'Standard_G2', 'Standard_G3', + 'Standard_G4', 'Standard_G5', 'Standard_GS1', 'Standard_GS2', + 'Standard_GS3', 'Standard_GS4', 'Standard_GS5' + :type vm_size: str or + ~azure.mgmt.compute.v2016_04_30_preview.models.VirtualMachineSizeTypes + """ + + _attribute_map = { + 'vm_size': {'key': 'vmSize', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(HardwareProfile, self).__init__(**kwargs) + self.vm_size = kwargs.get('vm_size', None) + + +class Image(Resource): + """The source user image virtual hard disk. The virtual hard disk will be + copied before being attached to the virtual machine. If SourceImage is + provided, the destination virtual hard drive must not exist. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource Id + :vartype id: str + :ivar name: Resource name + :vartype name: str + :ivar type: Resource type + :vartype type: str + :param location: Required. Resource location + :type location: str + :param tags: Resource tags + :type tags: dict[str, str] + :param source_virtual_machine: The source virtual machine from which Image + is created. + :type source_virtual_machine: + ~azure.mgmt.compute.v2016_04_30_preview.models.SubResource + :param storage_profile: Specifies the storage settings for the virtual + machine disks. + :type storage_profile: + ~azure.mgmt.compute.v2016_04_30_preview.models.ImageStorageProfile + :ivar provisioning_state: The provisioning state. + :vartype provisioning_state: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'source_virtual_machine': {'key': 'properties.sourceVirtualMachine', 'type': 'SubResource'}, + 'storage_profile': {'key': 'properties.storageProfile', 'type': 'ImageStorageProfile'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(Image, self).__init__(**kwargs) + self.source_virtual_machine = kwargs.get('source_virtual_machine', None) + self.storage_profile = kwargs.get('storage_profile', None) + self.provisioning_state = None + + +class ImageDataDisk(Model): + """Describes a data disk. + + All required parameters must be populated in order to send to Azure. + + :param lun: Required. Specifies the logical unit number of the data disk. + This value is used to identify data disks within the VM and therefore must + be unique for each data disk attached to a VM. + :type lun: int + :param snapshot: The snapshot. + :type snapshot: ~azure.mgmt.compute.v2016_04_30_preview.models.SubResource + :param managed_disk: The managedDisk. + :type managed_disk: + ~azure.mgmt.compute.v2016_04_30_preview.models.SubResource + :param blob_uri: The Virtual Hard Disk. + :type blob_uri: str + :param caching: Specifies the caching requirements.

    Possible + values are:

    **None**

    **ReadOnly**

    **ReadWrite** +

    Default: **None for Standard storage. ReadOnly for Premium + storage**. Possible values include: 'None', 'ReadOnly', 'ReadWrite' + :type caching: str or + ~azure.mgmt.compute.v2016_04_30_preview.models.CachingTypes + :param disk_size_gb: Specifies the size of empty data disks in gigabytes. + This element can be used to overwrite the name of the disk in a virtual + machine image.

    This value cannot be larger than 1023 GB + :type disk_size_gb: int + """ + + _validation = { + 'lun': {'required': True}, + } + + _attribute_map = { + 'lun': {'key': 'lun', 'type': 'int'}, + 'snapshot': {'key': 'snapshot', 'type': 'SubResource'}, + 'managed_disk': {'key': 'managedDisk', 'type': 'SubResource'}, + 'blob_uri': {'key': 'blobUri', 'type': 'str'}, + 'caching': {'key': 'caching', 'type': 'CachingTypes'}, + 'disk_size_gb': {'key': 'diskSizeGB', 'type': 'int'}, + } + + def __init__(self, **kwargs): + super(ImageDataDisk, self).__init__(**kwargs) + self.lun = kwargs.get('lun', None) + self.snapshot = kwargs.get('snapshot', None) + self.managed_disk = kwargs.get('managed_disk', None) + self.blob_uri = kwargs.get('blob_uri', None) + self.caching = kwargs.get('caching', None) + self.disk_size_gb = kwargs.get('disk_size_gb', None) + + +class ImageDiskReference(Model): + """The source image used for creating the disk. + + All required parameters must be populated in order to send to Azure. + + :param id: Required. A relative uri containing either a Platform Image + Repository or user image reference. + :type id: str + :param lun: If the disk is created from an image's data disk, this is an + index that indicates which of the data disks in the image to use. For OS + disks, this field is null. + :type lun: int + """ + + _validation = { + 'id': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'lun': {'key': 'lun', 'type': 'int'}, + } + + def __init__(self, **kwargs): + super(ImageDiskReference, self).__init__(**kwargs) + self.id = kwargs.get('id', None) + self.lun = kwargs.get('lun', None) + + +class ImageOSDisk(Model): + """Describes an Operating System disk. + + All required parameters must be populated in order to send to Azure. + + :param os_type: Required. This property allows you to specify the type of + the OS that is included in the disk if creating a VM from a custom image. +

    Possible values are:

    **Windows**

    **Linux**. + Possible values include: 'Windows', 'Linux' + :type os_type: str or + ~azure.mgmt.compute.v2016_04_30_preview.models.OperatingSystemTypes + :param os_state: Required. The OS State. Possible values include: + 'Generalized', 'Specialized' + :type os_state: str or + ~azure.mgmt.compute.v2016_04_30_preview.models.OperatingSystemStateTypes + :param snapshot: The snapshot. + :type snapshot: ~azure.mgmt.compute.v2016_04_30_preview.models.SubResource + :param managed_disk: The managedDisk. + :type managed_disk: + ~azure.mgmt.compute.v2016_04_30_preview.models.SubResource + :param blob_uri: The Virtual Hard Disk. + :type blob_uri: str + :param caching: Specifies the caching requirements.

    Possible + values are:

    **None**

    **ReadOnly**

    **ReadWrite** +

    Default: **None for Standard storage. ReadOnly for Premium + storage**. Possible values include: 'None', 'ReadOnly', 'ReadWrite' + :type caching: str or + ~azure.mgmt.compute.v2016_04_30_preview.models.CachingTypes + :param disk_size_gb: Specifies the size of empty data disks in gigabytes. + This element can be used to overwrite the name of the disk in a virtual + machine image.

    This value cannot be larger than 1023 GB + :type disk_size_gb: int + """ + + _validation = { + 'os_type': {'required': True}, + 'os_state': {'required': True}, + } + + _attribute_map = { + 'os_type': {'key': 'osType', 'type': 'OperatingSystemTypes'}, + 'os_state': {'key': 'osState', 'type': 'OperatingSystemStateTypes'}, + 'snapshot': {'key': 'snapshot', 'type': 'SubResource'}, + 'managed_disk': {'key': 'managedDisk', 'type': 'SubResource'}, + 'blob_uri': {'key': 'blobUri', 'type': 'str'}, + 'caching': {'key': 'caching', 'type': 'CachingTypes'}, + 'disk_size_gb': {'key': 'diskSizeGB', 'type': 'int'}, + } + + def __init__(self, **kwargs): + super(ImageOSDisk, self).__init__(**kwargs) + self.os_type = kwargs.get('os_type', None) + self.os_state = kwargs.get('os_state', None) + self.snapshot = kwargs.get('snapshot', None) + self.managed_disk = kwargs.get('managed_disk', None) + self.blob_uri = kwargs.get('blob_uri', None) + self.caching = kwargs.get('caching', None) + self.disk_size_gb = kwargs.get('disk_size_gb', None) + + +class SubResource(Model): + """SubResource. + + :param id: Resource Id + :type id: str + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(SubResource, self).__init__(**kwargs) + self.id = kwargs.get('id', None) + + +class ImageReference(SubResource): + """Specifies information about the image to use. You can specify information + about platform images, marketplace images, or virtual machine images. This + element is required when you want to use a platform image, marketplace + image, or virtual machine image, but is not used in other creation + operations. + + :param id: Resource Id + :type id: str + :param publisher: The image publisher. + :type publisher: str + :param offer: Specifies the offer of the platform image or marketplace + image used to create the virtual machine. + :type offer: str + :param sku: The image SKU. + :type sku: str + :param version: Specifies the version of the platform image or marketplace + image used to create the virtual machine. The allowed formats are + Major.Minor.Build or 'latest'. Major, Minor, and Build are decimal + numbers. Specify 'latest' to use the latest version of an image available + at deploy time. Even if you use 'latest', the VM image will not + automatically update after deploy time even if a new version becomes + available. + :type version: str + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'publisher': {'key': 'publisher', 'type': 'str'}, + 'offer': {'key': 'offer', 'type': 'str'}, + 'sku': {'key': 'sku', 'type': 'str'}, + 'version': {'key': 'version', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ImageReference, self).__init__(**kwargs) + self.publisher = kwargs.get('publisher', None) + self.offer = kwargs.get('offer', None) + self.sku = kwargs.get('sku', None) + self.version = kwargs.get('version', None) + + +class ImageStorageProfile(Model): + """Describes a storage profile. + + All required parameters must be populated in order to send to Azure. + + :param os_disk: Required. Specifies information about the operating system + disk used by the virtual machine.

    For more information about + disks, see [About disks and VHDs for Azure virtual + machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-about-disks-vhds?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). + :type os_disk: ~azure.mgmt.compute.v2016_04_30_preview.models.ImageOSDisk + :param data_disks: Specifies the parameters that are used to add a data + disk to a virtual machine.

    For more information about disks, see + [About disks and VHDs for Azure virtual + machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-about-disks-vhds?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). + :type data_disks: + list[~azure.mgmt.compute.v2016_04_30_preview.models.ImageDataDisk] + """ + + _validation = { + 'os_disk': {'required': True}, + } + + _attribute_map = { + 'os_disk': {'key': 'osDisk', 'type': 'ImageOSDisk'}, + 'data_disks': {'key': 'dataDisks', 'type': '[ImageDataDisk]'}, + } + + def __init__(self, **kwargs): + super(ImageStorageProfile, self).__init__(**kwargs) + self.os_disk = kwargs.get('os_disk', None) + self.data_disks = kwargs.get('data_disks', None) + + +class InnerError(Model): + """Inner error details. + + :param exceptiontype: The exception type. + :type exceptiontype: str + :param errordetail: The internal error message or exception dump. + :type errordetail: str + """ + + _attribute_map = { + 'exceptiontype': {'key': 'exceptiontype', 'type': 'str'}, + 'errordetail': {'key': 'errordetail', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(InnerError, self).__init__(**kwargs) + self.exceptiontype = kwargs.get('exceptiontype', None) + self.errordetail = kwargs.get('errordetail', None) + + +class InstanceViewStatus(Model): + """Instance view status. + + :param code: The status code. + :type code: str + :param level: The level code. Possible values include: 'Info', 'Warning', + 'Error' + :type level: str or + ~azure.mgmt.compute.v2016_04_30_preview.models.StatusLevelTypes + :param display_status: The short localizable label for the status. + :type display_status: str + :param message: The detailed status message, including for alerts and + error messages. + :type message: str + :param time: The time of the status. + :type time: datetime + """ + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + 'level': {'key': 'level', 'type': 'StatusLevelTypes'}, + 'display_status': {'key': 'displayStatus', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + 'time': {'key': 'time', 'type': 'iso-8601'}, + } + + def __init__(self, **kwargs): + super(InstanceViewStatus, self).__init__(**kwargs) + self.code = kwargs.get('code', None) + self.level = kwargs.get('level', None) + self.display_status = kwargs.get('display_status', None) + self.message = kwargs.get('message', None) + self.time = kwargs.get('time', None) + + +class KeyVaultAndKeyReference(Model): + """Key Vault Key Url and vault id of KeK, KeK is optional and when provided is + used to unwrap the encryptionKey. + + All required parameters must be populated in order to send to Azure. + + :param source_vault: Required. Resource id of the KeyVault containing the + key or secret + :type source_vault: + ~azure.mgmt.compute.v2016_04_30_preview.models.SourceVault + :param key_url: Required. Url pointing to a key or secret in KeyVault + :type key_url: str + """ + + _validation = { + 'source_vault': {'required': True}, + 'key_url': {'required': True}, + } + + _attribute_map = { + 'source_vault': {'key': 'sourceVault', 'type': 'SourceVault'}, + 'key_url': {'key': 'keyUrl', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(KeyVaultAndKeyReference, self).__init__(**kwargs) + self.source_vault = kwargs.get('source_vault', None) + self.key_url = kwargs.get('key_url', None) + + +class KeyVaultAndSecretReference(Model): + """Key Vault Secret Url and vault id of the encryption key . + + All required parameters must be populated in order to send to Azure. + + :param source_vault: Required. Resource id of the KeyVault containing the + key or secret + :type source_vault: + ~azure.mgmt.compute.v2016_04_30_preview.models.SourceVault + :param secret_url: Required. Url pointing to a key or secret in KeyVault + :type secret_url: str + """ + + _validation = { + 'source_vault': {'required': True}, + 'secret_url': {'required': True}, + } + + _attribute_map = { + 'source_vault': {'key': 'sourceVault', 'type': 'SourceVault'}, + 'secret_url': {'key': 'secretUrl', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(KeyVaultAndSecretReference, self).__init__(**kwargs) + self.source_vault = kwargs.get('source_vault', None) + self.secret_url = kwargs.get('secret_url', None) + + +class KeyVaultKeyReference(Model): + """Describes a reference to Key Vault Key. + + All required parameters must be populated in order to send to Azure. + + :param key_url: Required. The URL referencing a key encryption key in Key + Vault. + :type key_url: str + :param source_vault: Required. The relative URL of the Key Vault + containing the key. + :type source_vault: + ~azure.mgmt.compute.v2016_04_30_preview.models.SubResource + """ + + _validation = { + 'key_url': {'required': True}, + 'source_vault': {'required': True}, + } + + _attribute_map = { + 'key_url': {'key': 'keyUrl', 'type': 'str'}, + 'source_vault': {'key': 'sourceVault', 'type': 'SubResource'}, + } + + def __init__(self, **kwargs): + super(KeyVaultKeyReference, self).__init__(**kwargs) + self.key_url = kwargs.get('key_url', None) + self.source_vault = kwargs.get('source_vault', None) + + +class KeyVaultSecretReference(Model): + """Describes a reference to Key Vault Secret. + + All required parameters must be populated in order to send to Azure. + + :param secret_url: Required. The URL referencing a secret in a Key Vault. + :type secret_url: str + :param source_vault: Required. The relative URL of the Key Vault + containing the secret. + :type source_vault: + ~azure.mgmt.compute.v2016_04_30_preview.models.SubResource + """ + + _validation = { + 'secret_url': {'required': True}, + 'source_vault': {'required': True}, + } + + _attribute_map = { + 'secret_url': {'key': 'secretUrl', 'type': 'str'}, + 'source_vault': {'key': 'sourceVault', 'type': 'SubResource'}, + } + + def __init__(self, **kwargs): + super(KeyVaultSecretReference, self).__init__(**kwargs) + self.secret_url = kwargs.get('secret_url', None) + self.source_vault = kwargs.get('source_vault', None) + + +class LinuxConfiguration(Model): + """Specifies the Linux operating system settings on the virtual machine. +

    For a list of supported Linux distributions, see [Linux on + Azure-Endorsed + Distributions](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-endorsed-distros?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json) +

    For running non-endorsed distributions, see [Information for + Non-Endorsed + Distributions](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-create-upload-generic?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json). + + :param disable_password_authentication: Specifies whether password + authentication should be disabled. + :type disable_password_authentication: bool + :param ssh: Specifies the ssh key configuration for a Linux OS. + :type ssh: ~azure.mgmt.compute.v2016_04_30_preview.models.SshConfiguration + """ + + _attribute_map = { + 'disable_password_authentication': {'key': 'disablePasswordAuthentication', 'type': 'bool'}, + 'ssh': {'key': 'ssh', 'type': 'SshConfiguration'}, + } + + def __init__(self, **kwargs): + super(LinuxConfiguration, self).__init__(**kwargs) + self.disable_password_authentication = kwargs.get('disable_password_authentication', None) + self.ssh = kwargs.get('ssh', None) + + +class ManagedDiskParameters(SubResource): + """The parameters of a managed disk. + + :param id: Resource Id + :type id: str + :param storage_account_type: Specifies the storage account type for the + managed disk. Possible values are: Standard_LRS or Premium_LRS. Possible + values include: 'Standard_LRS', 'Premium_LRS' + :type storage_account_type: str or + ~azure.mgmt.compute.v2016_04_30_preview.models.StorageAccountTypes + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'storage_account_type': {'key': 'storageAccountType', 'type': 'StorageAccountTypes'}, + } + + def __init__(self, **kwargs): + super(ManagedDiskParameters, self).__init__(**kwargs) + self.storage_account_type = kwargs.get('storage_account_type', None) + + +class NetworkInterfaceReference(SubResource): + """Describes a network interface reference. + + :param id: Resource Id + :type id: str + :param primary: Specifies the primary network interface in case the + virtual machine has more than 1 network interface. + :type primary: bool + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'primary': {'key': 'properties.primary', 'type': 'bool'}, + } + + def __init__(self, **kwargs): + super(NetworkInterfaceReference, self).__init__(**kwargs) + self.primary = kwargs.get('primary', None) + + +class NetworkProfile(Model): + """Specifies the network interfaces of the virtual machine. + + :param network_interfaces: Specifies the list of resource Ids for the + network interfaces associated with the virtual machine. + :type network_interfaces: + list[~azure.mgmt.compute.v2016_04_30_preview.models.NetworkInterfaceReference] + """ + + _attribute_map = { + 'network_interfaces': {'key': 'networkInterfaces', 'type': '[NetworkInterfaceReference]'}, + } + + def __init__(self, **kwargs): + super(NetworkProfile, self).__init__(**kwargs) + self.network_interfaces = kwargs.get('network_interfaces', None) + + +class OperationStatusResponse(Model): + """Operation status response. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar name: Operation ID + :vartype name: str + :ivar status: Operation status + :vartype status: str + :ivar start_time: Start time of the operation + :vartype start_time: datetime + :ivar end_time: End time of the operation + :vartype end_time: datetime + :ivar error: Api error + :vartype error: ~azure.mgmt.compute.v2016_04_30_preview.models.ApiError + """ + + _validation = { + 'name': {'readonly': True}, + 'status': {'readonly': True}, + 'start_time': {'readonly': True}, + 'end_time': {'readonly': True}, + 'error': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'status': {'key': 'status', 'type': 'str'}, + 'start_time': {'key': 'startTime', 'type': 'iso-8601'}, + 'end_time': {'key': 'endTime', 'type': 'iso-8601'}, + 'error': {'key': 'error', 'type': 'ApiError'}, + } + + def __init__(self, **kwargs): + super(OperationStatusResponse, self).__init__(**kwargs) + self.name = None + self.status = None + self.start_time = None + self.end_time = None + self.error = None + + +class OSDisk(Model): + """Specifies information about the operating system disk used by the virtual + machine.

    For more information about disks, see [About disks and + VHDs for Azure virtual + machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-about-disks-vhds?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). + + All required parameters must be populated in order to send to Azure. + + :param os_type: This property allows you to specify the type of the OS + that is included in the disk if creating a VM from user-image or a + specialized VHD.

    Possible values are:

    **Windows** +

    **Linux**. Possible values include: 'Windows', 'Linux' + :type os_type: str or + ~azure.mgmt.compute.v2016_04_30_preview.models.OperatingSystemTypes + :param encryption_settings: Specifies the encryption settings for the OS + Disk.

    Minimum api-version: 2015-06-15 + :type encryption_settings: + ~azure.mgmt.compute.v2016_04_30_preview.models.DiskEncryptionSettings + :param name: The disk name. + :type name: str + :param vhd: The virtual hard disk. + :type vhd: ~azure.mgmt.compute.v2016_04_30_preview.models.VirtualHardDisk + :param image: The source user image virtual hard disk. The virtual hard + disk will be copied before being attached to the virtual machine. If + SourceImage is provided, the destination virtual hard drive must not + exist. + :type image: + ~azure.mgmt.compute.v2016_04_30_preview.models.VirtualHardDisk + :param caching: Specifies the caching requirements.

    Possible + values are:

    **None**

    **ReadOnly**

    **ReadWrite** +

    Default: **None for Standard storage. ReadOnly for Premium + storage**. Possible values include: 'None', 'ReadOnly', 'ReadWrite' + :type caching: str or + ~azure.mgmt.compute.v2016_04_30_preview.models.CachingTypes + :param create_option: Required. Specifies how the virtual machine should + be created.

    Possible values are:

    **Attach** \\u2013 This + value is used when you are using a specialized disk to create the virtual + machine.

    **FromImage** \\u2013 This value is used when you are + using an image to create the virtual machine. If you are using a platform + image, you also use the imageReference element described above. If you are + using a marketplace image, you also use the plan element previously + described. Possible values include: 'FromImage', 'Empty', 'Attach' + :type create_option: str or + ~azure.mgmt.compute.v2016_04_30_preview.models.DiskCreateOptionTypes + :param disk_size_gb: Specifies the size of an empty data disk in + gigabytes. This element can be used to overwrite the size of the disk in a + virtual machine image.

    This value cannot be larger than 1023 GB + :type disk_size_gb: int + :param managed_disk: The managed disk parameters. + :type managed_disk: + ~azure.mgmt.compute.v2016_04_30_preview.models.ManagedDiskParameters + """ + + _validation = { + 'create_option': {'required': True}, + } + + _attribute_map = { + 'os_type': {'key': 'osType', 'type': 'OperatingSystemTypes'}, + 'encryption_settings': {'key': 'encryptionSettings', 'type': 'DiskEncryptionSettings'}, + 'name': {'key': 'name', 'type': 'str'}, + 'vhd': {'key': 'vhd', 'type': 'VirtualHardDisk'}, + 'image': {'key': 'image', 'type': 'VirtualHardDisk'}, + 'caching': {'key': 'caching', 'type': 'CachingTypes'}, + 'create_option': {'key': 'createOption', 'type': 'DiskCreateOptionTypes'}, + 'disk_size_gb': {'key': 'diskSizeGB', 'type': 'int'}, + 'managed_disk': {'key': 'managedDisk', 'type': 'ManagedDiskParameters'}, + } + + def __init__(self, **kwargs): + super(OSDisk, self).__init__(**kwargs) + self.os_type = kwargs.get('os_type', None) + self.encryption_settings = kwargs.get('encryption_settings', None) + self.name = kwargs.get('name', None) + self.vhd = kwargs.get('vhd', None) + self.image = kwargs.get('image', None) + self.caching = kwargs.get('caching', None) + self.create_option = kwargs.get('create_option', None) + self.disk_size_gb = kwargs.get('disk_size_gb', None) + self.managed_disk = kwargs.get('managed_disk', None) + + +class OSDiskImage(Model): + """Contains the os disk image information. + + All required parameters must be populated in order to send to Azure. + + :param operating_system: Required. The operating system of the + osDiskImage. Possible values include: 'Windows', 'Linux' + :type operating_system: str or + ~azure.mgmt.compute.v2016_04_30_preview.models.OperatingSystemTypes + """ + + _validation = { + 'operating_system': {'required': True}, + } + + _attribute_map = { + 'operating_system': {'key': 'operatingSystem', 'type': 'OperatingSystemTypes'}, + } + + def __init__(self, **kwargs): + super(OSDiskImage, self).__init__(**kwargs) + self.operating_system = kwargs.get('operating_system', None) + + +class OSProfile(Model): + """Specifies the operating system settings for the virtual machine. + + :param computer_name: Specifies the host OS name of the virtual machine. +

    This name cannot be updated after the VM is created.

    + **Max-length (Windows):** 15 characters

    **Max-length (Linux):** + 64 characters.

    For naming conventions and restrictions see [Azure + infrastructure services implementation + guidelines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-infrastructure-subscription-accounts-guidelines?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json#1-naming-conventions). + :type computer_name: str + :param admin_username: Specifies the name of the administrator account. +

    **Windows-only restriction:** Cannot end in "."

    + **Disallowed values:** "administrator", "admin", "user", "user1", "test", + "user2", "test1", "user3", "admin1", "1", "123", "a", "actuser", "adm", + "admin2", "aspnet", "backup", "console", "david", "guest", "john", + "owner", "root", "server", "sql", "support", "support_388945a0", "sys", + "test2", "test3", "user4", "user5".

    **Minimum-length (Linux):** 1 + character

    **Max-length (Linux):** 64 characters

    + **Max-length (Windows):** 20 characters

  • For root access to + the Linux VM, see [Using root privileges on Linux virtual machines in + Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-use-root-privileges?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json)
  • + For a list of built-in system users on Linux that should not be used in + this field, see [Selecting User Names for Linux on + Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-usernames?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json) + :type admin_username: str + :param admin_password: Specifies the password of the administrator + account.

    **Minimum-length (Windows):** 8 characters

    + **Minimum-length (Linux):** 6 characters

    **Max-length + (Windows):** 123 characters

    **Max-length (Linux):** 72 characters +

    **Complexity requirements:** 3 out of 4 conditions below need to + be fulfilled
    Has lower characters
    Has upper characters
    Has a + digit
    Has a special character (Regex match [\\W_])

    + **Disallowed values:** "abc@123", "P@$$w0rd", "P@ssw0rd", "P@ssword123", + "Pa$$word", "pass@word1", "Password!", "Password1", "Password22", + "iloveyou!"

    For resetting the password, see [How to reset the + Remote Desktop service or its login password in a Windows + VM](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-reset-rdp?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json) +

    For resetting root password, see [Manage users, SSH, and check or + repair disks on Azure Linux VMs using the VMAccess + Extension](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-using-vmaccess-extension?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json#reset-root-password) + :type admin_password: str + :param custom_data: Specifies a base-64 encoded string of custom data. The + base-64 encoded string is decoded to a binary array that is saved as a + file on the Virtual Machine. The maximum length of the binary array is + 65535 bytes.

    For using cloud-init for your VM, see [Using + cloud-init to customize a Linux VM during + creation](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-using-cloud-init?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json) + :type custom_data: str + :param windows_configuration: Specifies Windows operating system settings + on the virtual machine. + :type windows_configuration: + ~azure.mgmt.compute.v2016_04_30_preview.models.WindowsConfiguration + :param linux_configuration: Specifies the Linux operating system settings + on the virtual machine.

    For a list of supported Linux + distributions, see [Linux on Azure-Endorsed + Distributions](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-endorsed-distros?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json) +

    For running non-endorsed distributions, see [Information for + Non-Endorsed + Distributions](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-create-upload-generic?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json). + :type linux_configuration: + ~azure.mgmt.compute.v2016_04_30_preview.models.LinuxConfiguration + :param secrets: Specifies set of certificates that should be installed + onto the virtual machine. + :type secrets: + list[~azure.mgmt.compute.v2016_04_30_preview.models.VaultSecretGroup] + """ + + _attribute_map = { + 'computer_name': {'key': 'computerName', 'type': 'str'}, + 'admin_username': {'key': 'adminUsername', 'type': 'str'}, + 'admin_password': {'key': 'adminPassword', 'type': 'str'}, + 'custom_data': {'key': 'customData', 'type': 'str'}, + 'windows_configuration': {'key': 'windowsConfiguration', 'type': 'WindowsConfiguration'}, + 'linux_configuration': {'key': 'linuxConfiguration', 'type': 'LinuxConfiguration'}, + 'secrets': {'key': 'secrets', 'type': '[VaultSecretGroup]'}, + } + + def __init__(self, **kwargs): + super(OSProfile, self).__init__(**kwargs) + self.computer_name = kwargs.get('computer_name', None) + self.admin_username = kwargs.get('admin_username', None) + self.admin_password = kwargs.get('admin_password', None) + self.custom_data = kwargs.get('custom_data', None) + self.windows_configuration = kwargs.get('windows_configuration', None) + self.linux_configuration = kwargs.get('linux_configuration', None) + self.secrets = kwargs.get('secrets', None) + + +class Plan(Model): + """Specifies information about the marketplace image used to create the + virtual machine. This element is only used for marketplace images. Before + you can use a marketplace image from an API, you must enable the image for + programmatic use. In the Azure portal, find the marketplace image that you + want to use and then click **Want to deploy programmatically, Get Started + ->**. Enter any required information and then click **Save**. + + :param name: The plan ID. + :type name: str + :param publisher: The publisher ID. + :type publisher: str + :param product: Specifies the product of the image from the marketplace. + This is the same value as Offer under the imageReference element. + :type product: str + :param promotion_code: The promotion code. + :type promotion_code: str + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'publisher': {'key': 'publisher', 'type': 'str'}, + 'product': {'key': 'product', 'type': 'str'}, + 'promotion_code': {'key': 'promotionCode', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(Plan, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.publisher = kwargs.get('publisher', None) + self.product = kwargs.get('product', None) + self.promotion_code = kwargs.get('promotion_code', None) + + +class PurchasePlan(Model): + """Used for establishing the purchase context of any 3rd Party artifact + through MarketPlace. + + All required parameters must be populated in order to send to Azure. + + :param publisher: Required. The publisher ID. + :type publisher: str + :param name: Required. The plan ID. + :type name: str + :param product: Required. Specifies the product of the image from the + marketplace. This is the same value as Offer under the imageReference + element. + :type product: str + """ + + _validation = { + 'publisher': {'required': True}, + 'name': {'required': True}, + 'product': {'required': True}, + } + + _attribute_map = { + 'publisher': {'key': 'publisher', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'product': {'key': 'product', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(PurchasePlan, self).__init__(**kwargs) + self.publisher = kwargs.get('publisher', None) + self.name = kwargs.get('name', None) + self.product = kwargs.get('product', None) + + +class Sku(Model): + """Describes a virtual machine scale set sku. + + :param name: The sku name. + :type name: str + :param tier: Specifies the tier of virtual machines in a scale set.

    Possible Values:

    **Standard**

    **Basic** + :type tier: str + :param capacity: Specifies the number of virtual machines in the scale + set. + :type capacity: long + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'tier': {'key': 'tier', 'type': 'str'}, + 'capacity': {'key': 'capacity', 'type': 'long'}, + } + + def __init__(self, **kwargs): + super(Sku, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.tier = kwargs.get('tier', None) + self.capacity = kwargs.get('capacity', None) + + +class Snapshot(Resource): + """Snapshot resource. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource Id + :vartype id: str + :ivar name: Resource name + :vartype name: str + :ivar type: Resource type + :vartype type: str + :param location: Required. Resource location + :type location: str + :param tags: Resource tags + :type tags: dict[str, str] + :param account_type: the storage account type of the disk. Possible values + include: 'Standard_LRS', 'Premium_LRS' + :type account_type: str or + ~azure.mgmt.compute.v2016_04_30_preview.models.StorageAccountTypes + :ivar time_created: The time when the disk was created. + :vartype time_created: datetime + :param os_type: The Operating System type. Possible values include: + 'Windows', 'Linux' + :type os_type: str or + ~azure.mgmt.compute.v2016_04_30_preview.models.OperatingSystemTypes + :param creation_data: Required. Disk source information. CreationData + information cannot be changed after the disk has been created. + :type creation_data: + ~azure.mgmt.compute.v2016_04_30_preview.models.CreationData + :param disk_size_gb: If creationData.createOption is Empty, this field is + mandatory and it indicates the size of the VHD to create. If this field is + present for updates or creation with other options, it indicates a resize. + Resizes are only allowed if the disk is not attached to a running VM, and + can only increase the disk's size. + :type disk_size_gb: int + :param encryption_settings: Encryption settings for disk or snapshot + :type encryption_settings: + ~azure.mgmt.compute.v2016_04_30_preview.models.EncryptionSettings + :ivar owner_id: A relative URI containing the VM id that has the disk + attached. + :vartype owner_id: str + :ivar provisioning_state: The disk provisioning state. + :vartype provisioning_state: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + 'time_created': {'readonly': True}, + 'creation_data': {'required': True}, + 'owner_id': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'account_type': {'key': 'properties.accountType', 'type': 'StorageAccountTypes'}, + 'time_created': {'key': 'properties.timeCreated', 'type': 'iso-8601'}, + 'os_type': {'key': 'properties.osType', 'type': 'OperatingSystemTypes'}, + 'creation_data': {'key': 'properties.creationData', 'type': 'CreationData'}, + 'disk_size_gb': {'key': 'properties.diskSizeGB', 'type': 'int'}, + 'encryption_settings': {'key': 'properties.encryptionSettings', 'type': 'EncryptionSettings'}, + 'owner_id': {'key': 'properties.ownerId', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(Snapshot, self).__init__(**kwargs) + self.account_type = kwargs.get('account_type', None) + self.time_created = None + self.os_type = kwargs.get('os_type', None) + self.creation_data = kwargs.get('creation_data', None) + self.disk_size_gb = kwargs.get('disk_size_gb', None) + self.encryption_settings = kwargs.get('encryption_settings', None) + self.owner_id = None + self.provisioning_state = None + + +class SnapshotUpdate(ResourceUpdate): + """Snapshot update resource. + + :param tags: Resource tags + :type tags: dict[str, str] + :param account_type: the storage account type of the disk. Possible values + include: 'Standard_LRS', 'Premium_LRS' + :type account_type: str or + ~azure.mgmt.compute.v2016_04_30_preview.models.StorageAccountTypes + :param os_type: the Operating System type. Possible values include: + 'Windows', 'Linux' + :type os_type: str or + ~azure.mgmt.compute.v2016_04_30_preview.models.OperatingSystemTypes + :param creation_data: disk source information. CreationData information + cannot be changed after the disk has been created. + :type creation_data: + ~azure.mgmt.compute.v2016_04_30_preview.models.CreationData + :param disk_size_gb: If creationData.createOption is Empty, this field is + mandatory and it indicates the size of the VHD to create. If this field is + present for updates or creation with other options, it indicates a resize. + Resizes are only allowed if the disk is not attached to a running VM, and + can only increase the disk's size. + :type disk_size_gb: int + :param encryption_settings: Encryption settings for disk or snapshot + :type encryption_settings: + ~azure.mgmt.compute.v2016_04_30_preview.models.EncryptionSettings + """ + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + 'account_type': {'key': 'properties.accountType', 'type': 'StorageAccountTypes'}, + 'os_type': {'key': 'properties.osType', 'type': 'OperatingSystemTypes'}, + 'creation_data': {'key': 'properties.creationData', 'type': 'CreationData'}, + 'disk_size_gb': {'key': 'properties.diskSizeGB', 'type': 'int'}, + 'encryption_settings': {'key': 'properties.encryptionSettings', 'type': 'EncryptionSettings'}, + } + + def __init__(self, **kwargs): + super(SnapshotUpdate, self).__init__(**kwargs) + self.account_type = kwargs.get('account_type', None) + self.os_type = kwargs.get('os_type', None) + self.creation_data = kwargs.get('creation_data', None) + self.disk_size_gb = kwargs.get('disk_size_gb', None) + self.encryption_settings = kwargs.get('encryption_settings', None) + + +class SourceVault(Model): + """The vault id is an Azure Resource Manager Resource id in the form + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.KeyVault/vaults/{vaultName}. + + :param id: Resource Id + :type id: str + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(SourceVault, self).__init__(**kwargs) + self.id = kwargs.get('id', None) + + +class SshConfiguration(Model): + """SSH configuration for Linux based VMs running on Azure. + + :param public_keys: The list of SSH public keys used to authenticate with + linux based VMs. + :type public_keys: + list[~azure.mgmt.compute.v2016_04_30_preview.models.SshPublicKey] + """ + + _attribute_map = { + 'public_keys': {'key': 'publicKeys', 'type': '[SshPublicKey]'}, + } + + def __init__(self, **kwargs): + super(SshConfiguration, self).__init__(**kwargs) + self.public_keys = kwargs.get('public_keys', None) + + +class SshPublicKey(Model): + """Contains information about SSH certificate public key and the path on the + Linux VM where the public key is placed. + + :param path: Specifies the full path on the created VM where ssh public + key is stored. If the file already exists, the specified key is appended + to the file. Example: /home/user/.ssh/authorized_keys + :type path: str + :param key_data: SSH public key certificate used to authenticate with the + VM through ssh. The key needs to be at least 2048-bit and in ssh-rsa + format.

    For creating ssh keys, see [Create SSH keys on Linux and + Mac for Linux VMs in + Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-mac-create-ssh-keys?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json). + :type key_data: str + """ + + _attribute_map = { + 'path': {'key': 'path', 'type': 'str'}, + 'key_data': {'key': 'keyData', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(SshPublicKey, self).__init__(**kwargs) + self.path = kwargs.get('path', None) + self.key_data = kwargs.get('key_data', None) + + +class StorageProfile(Model): + """Specifies the storage settings for the virtual machine disks. + + :param image_reference: Specifies information about the image to use. You + can specify information about platform images, marketplace images, or + virtual machine images. This element is required when you want to use a + platform image, marketplace image, or virtual machine image, but is not + used in other creation operations. + :type image_reference: + ~azure.mgmt.compute.v2016_04_30_preview.models.ImageReference + :param os_disk: Specifies information about the operating system disk used + by the virtual machine.

    For more information about disks, see + [About disks and VHDs for Azure virtual + machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-about-disks-vhds?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). + :type os_disk: ~azure.mgmt.compute.v2016_04_30_preview.models.OSDisk + :param data_disks: Specifies the parameters that are used to add a data + disk to a virtual machine.

    For more information about disks, see + [About disks and VHDs for Azure virtual + machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-about-disks-vhds?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). + :type data_disks: + list[~azure.mgmt.compute.v2016_04_30_preview.models.DataDisk] + """ + + _attribute_map = { + 'image_reference': {'key': 'imageReference', 'type': 'ImageReference'}, + 'os_disk': {'key': 'osDisk', 'type': 'OSDisk'}, + 'data_disks': {'key': 'dataDisks', 'type': '[DataDisk]'}, + } + + def __init__(self, **kwargs): + super(StorageProfile, self).__init__(**kwargs) + self.image_reference = kwargs.get('image_reference', None) + self.os_disk = kwargs.get('os_disk', None) + self.data_disks = kwargs.get('data_disks', None) + + +class SubResourceReadOnly(Model): + """SubResourceReadOnly. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource Id + :vartype id: str + """ + + _validation = { + 'id': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(SubResourceReadOnly, self).__init__(**kwargs) + self.id = None + + +class UpdateResource(Model): + """The Update Resource model definition. + + :param tags: Resource tags + :type tags: dict[str, str] + """ + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__(self, **kwargs): + super(UpdateResource, self).__init__(**kwargs) + self.tags = kwargs.get('tags', None) + + +class UpgradePolicy(Model): + """Describes an upgrade policy - automatic or manual. + + :param mode: Specifies the mode of an upgrade to virtual machines in the + scale set.

    Possible values are:

    **Manual** - You + control the application of updates to virtual machines in the scale set. + You do this by using the manualUpgrade action.

    **Automatic** - + All virtual machines in the scale set are automatically updated at the + same time. Possible values include: 'Automatic', 'Manual' + :type mode: str or + ~azure.mgmt.compute.v2016_04_30_preview.models.UpgradeMode + """ + + _attribute_map = { + 'mode': {'key': 'mode', 'type': 'UpgradeMode'}, + } + + def __init__(self, **kwargs): + super(UpgradePolicy, self).__init__(**kwargs) + self.mode = kwargs.get('mode', None) + + +class Usage(Model): + """Describes Compute Resource Usage. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar unit: Required. An enum describing the unit of usage measurement. + Default value: "Count" . + :vartype unit: str + :param current_value: Required. The current usage of the resource. + :type current_value: int + :param limit: Required. The maximum permitted usage of the resource. + :type limit: long + :param name: Required. The name of the type of usage. + :type name: ~azure.mgmt.compute.v2016_04_30_preview.models.UsageName + """ + + _validation = { + 'unit': {'required': True, 'constant': True}, + 'current_value': {'required': True}, + 'limit': {'required': True}, + 'name': {'required': True}, + } + + _attribute_map = { + 'unit': {'key': 'unit', 'type': 'str'}, + 'current_value': {'key': 'currentValue', 'type': 'int'}, + 'limit': {'key': 'limit', 'type': 'long'}, + 'name': {'key': 'name', 'type': 'UsageName'}, + } + + unit = "Count" + + def __init__(self, **kwargs): + super(Usage, self).__init__(**kwargs) + self.current_value = kwargs.get('current_value', None) + self.limit = kwargs.get('limit', None) + self.name = kwargs.get('name', None) + + +class UsageName(Model): + """The Usage Names. + + :param value: The name of the resource. + :type value: str + :param localized_value: The localized name of the resource. + :type localized_value: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': 'str'}, + 'localized_value': {'key': 'localizedValue', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(UsageName, self).__init__(**kwargs) + self.value = kwargs.get('value', None) + self.localized_value = kwargs.get('localized_value', None) + + +class VaultCertificate(Model): + """Describes a single certificate reference in a Key Vault, and where the + certificate should reside on the VM. + + :param certificate_url: This is the URL of a certificate that has been + uploaded to Key Vault as a secret. For adding a secret to the Key Vault, + see [Add a key or secret to the key + vault](https://docs.microsoft.com/azure/key-vault/key-vault-get-started/#add). + In this case, your certificate needs to be It is the Base64 encoding of + the following JSON Object which is encoded in UTF-8:

    {
    + "data":"",
    "dataType":"pfx",
    + "password":""
    } + :type certificate_url: str + :param certificate_store: For Windows VMs, specifies the certificate store + on the Virtual Machine to which the certificate should be added. The + specified certificate store is implicitly in the LocalMachine account. +

    For Linux VMs, the certificate file is placed under the + /var/lib/waagent directory, with the file name .crt + for the X509 certificate file and .prv for private + key. Both of these files are .pem formatted. + :type certificate_store: str + """ + + _attribute_map = { + 'certificate_url': {'key': 'certificateUrl', 'type': 'str'}, + 'certificate_store': {'key': 'certificateStore', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(VaultCertificate, self).__init__(**kwargs) + self.certificate_url = kwargs.get('certificate_url', None) + self.certificate_store = kwargs.get('certificate_store', None) + + +class VaultSecretGroup(Model): + """Describes a set of certificates which are all in the same Key Vault. + + :param source_vault: The relative URL of the Key Vault containing all of + the certificates in VaultCertificates. + :type source_vault: + ~azure.mgmt.compute.v2016_04_30_preview.models.SubResource + :param vault_certificates: The list of key vault references in SourceVault + which contain certificates. + :type vault_certificates: + list[~azure.mgmt.compute.v2016_04_30_preview.models.VaultCertificate] + """ + + _attribute_map = { + 'source_vault': {'key': 'sourceVault', 'type': 'SubResource'}, + 'vault_certificates': {'key': 'vaultCertificates', 'type': '[VaultCertificate]'}, + } + + def __init__(self, **kwargs): + super(VaultSecretGroup, self).__init__(**kwargs) + self.source_vault = kwargs.get('source_vault', None) + self.vault_certificates = kwargs.get('vault_certificates', None) + + +class VirtualHardDisk(Model): + """Describes the uri of a disk. + + :param uri: Specifies the virtual hard disk's uri. + :type uri: str + """ + + _attribute_map = { + 'uri': {'key': 'uri', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(VirtualHardDisk, self).__init__(**kwargs) + self.uri = kwargs.get('uri', None) + + +class VirtualMachine(Resource): + """Describes a Virtual Machine. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource Id + :vartype id: str + :ivar name: Resource name + :vartype name: str + :ivar type: Resource type + :vartype type: str + :param location: Required. Resource location + :type location: str + :param tags: Resource tags + :type tags: dict[str, str] + :param plan: Specifies information about the marketplace image used to + create the virtual machine. This element is only used for marketplace + images. Before you can use a marketplace image from an API, you must + enable the image for programmatic use. In the Azure portal, find the + marketplace image that you want to use and then click **Want to deploy + programmatically, Get Started ->**. Enter any required information and + then click **Save**. + :type plan: ~azure.mgmt.compute.v2016_04_30_preview.models.Plan + :param hardware_profile: Specifies the hardware settings for the virtual + machine. + :type hardware_profile: + ~azure.mgmt.compute.v2016_04_30_preview.models.HardwareProfile + :param storage_profile: Specifies the storage settings for the virtual + machine disks. + :type storage_profile: + ~azure.mgmt.compute.v2016_04_30_preview.models.StorageProfile + :param os_profile: Specifies the operating system settings for the virtual + machine. + :type os_profile: ~azure.mgmt.compute.v2016_04_30_preview.models.OSProfile + :param network_profile: Specifies the network interfaces of the virtual + machine. + :type network_profile: + ~azure.mgmt.compute.v2016_04_30_preview.models.NetworkProfile + :param diagnostics_profile: Specifies the boot diagnostic settings state. +

    Minimum api-version: 2015-06-15. + :type diagnostics_profile: + ~azure.mgmt.compute.v2016_04_30_preview.models.DiagnosticsProfile + :param availability_set: Specifies information about the availability set + that the virtual machine should be assigned to. Virtual machines specified + in the same availability set are allocated to different nodes to maximize + availability. For more information about availability sets, see [Manage + the availability of virtual + machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-manage-availability?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). +

    For more information on Azure planned maintenance, see [Planned + maintenance for virtual machines in + Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-planned-maintenance?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json) +

    Currently, a VM can only be added to availability set at creation + time. An existing VM cannot be added to an availability set. + :type availability_set: + ~azure.mgmt.compute.v2016_04_30_preview.models.SubResource + :ivar provisioning_state: The provisioning state, which only appears in + the response. + :vartype provisioning_state: str + :ivar instance_view: The virtual machine instance view. + :vartype instance_view: + ~azure.mgmt.compute.v2016_04_30_preview.models.VirtualMachineInstanceView + :param license_type: Specifies that the image or disk that is being used + was licensed on-premises. This element is only used for images that + contain the Windows Server operating system.

    Possible values are: +

    Windows_Client

    Windows_Server

    If this element + is included in a request for an update, the value must match the initial + value. This value cannot be updated.

    For more information, see + [Azure Hybrid Use Benefit for Windows + Server](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-hybrid-use-benefit-licensing?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json) +

    Minimum api-version: 2015-06-15 + :type license_type: str + :ivar vm_id: Specifies the VM unique ID which is a 128-bits identifier + that is encoded and stored in all Azure IaaS VMs SMBIOS and can be read + using platform BIOS commands. + :vartype vm_id: str + :ivar resources: The virtual machine child extension resources. + :vartype resources: + list[~azure.mgmt.compute.v2016_04_30_preview.models.VirtualMachineExtension] + :param identity: The identity of the virtual machine, if configured. + :type identity: + ~azure.mgmt.compute.v2016_04_30_preview.models.VirtualMachineIdentity + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + 'provisioning_state': {'readonly': True}, + 'instance_view': {'readonly': True}, + 'vm_id': {'readonly': True}, + 'resources': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'plan': {'key': 'plan', 'type': 'Plan'}, + 'hardware_profile': {'key': 'properties.hardwareProfile', 'type': 'HardwareProfile'}, + 'storage_profile': {'key': 'properties.storageProfile', 'type': 'StorageProfile'}, + 'os_profile': {'key': 'properties.osProfile', 'type': 'OSProfile'}, + 'network_profile': {'key': 'properties.networkProfile', 'type': 'NetworkProfile'}, + 'diagnostics_profile': {'key': 'properties.diagnosticsProfile', 'type': 'DiagnosticsProfile'}, + 'availability_set': {'key': 'properties.availabilitySet', 'type': 'SubResource'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'instance_view': {'key': 'properties.instanceView', 'type': 'VirtualMachineInstanceView'}, + 'license_type': {'key': 'properties.licenseType', 'type': 'str'}, + 'vm_id': {'key': 'properties.vmId', 'type': 'str'}, + 'resources': {'key': 'resources', 'type': '[VirtualMachineExtension]'}, + 'identity': {'key': 'identity', 'type': 'VirtualMachineIdentity'}, + } + + def __init__(self, **kwargs): + super(VirtualMachine, self).__init__(**kwargs) + self.plan = kwargs.get('plan', None) + self.hardware_profile = kwargs.get('hardware_profile', None) + self.storage_profile = kwargs.get('storage_profile', None) + self.os_profile = kwargs.get('os_profile', None) + self.network_profile = kwargs.get('network_profile', None) + self.diagnostics_profile = kwargs.get('diagnostics_profile', None) + self.availability_set = kwargs.get('availability_set', None) + self.provisioning_state = None + self.instance_view = None + self.license_type = kwargs.get('license_type', None) + self.vm_id = None + self.resources = None + self.identity = kwargs.get('identity', None) + + +class VirtualMachineAgentInstanceView(Model): + """The instance view of the VM Agent running on the virtual machine. + + :param vm_agent_version: The VM Agent full version. + :type vm_agent_version: str + :param extension_handlers: The virtual machine extension handler instance + view. + :type extension_handlers: + list[~azure.mgmt.compute.v2016_04_30_preview.models.VirtualMachineExtensionHandlerInstanceView] + :param statuses: The resource status information. + :type statuses: + list[~azure.mgmt.compute.v2016_04_30_preview.models.InstanceViewStatus] + """ + + _attribute_map = { + 'vm_agent_version': {'key': 'vmAgentVersion', 'type': 'str'}, + 'extension_handlers': {'key': 'extensionHandlers', 'type': '[VirtualMachineExtensionHandlerInstanceView]'}, + 'statuses': {'key': 'statuses', 'type': '[InstanceViewStatus]'}, + } + + def __init__(self, **kwargs): + super(VirtualMachineAgentInstanceView, self).__init__(**kwargs) + self.vm_agent_version = kwargs.get('vm_agent_version', None) + self.extension_handlers = kwargs.get('extension_handlers', None) + self.statuses = kwargs.get('statuses', None) + + +class VirtualMachineCaptureParameters(Model): + """Capture Virtual Machine parameters. + + All required parameters must be populated in order to send to Azure. + + :param vhd_prefix: Required. The captured virtual hard disk's name prefix. + :type vhd_prefix: str + :param destination_container_name: Required. The destination container + name. + :type destination_container_name: str + :param overwrite_vhds: Required. Specifies whether to overwrite the + destination virtual hard disk, in case of conflict. + :type overwrite_vhds: bool + """ + + _validation = { + 'vhd_prefix': {'required': True}, + 'destination_container_name': {'required': True}, + 'overwrite_vhds': {'required': True}, + } + + _attribute_map = { + 'vhd_prefix': {'key': 'vhdPrefix', 'type': 'str'}, + 'destination_container_name': {'key': 'destinationContainerName', 'type': 'str'}, + 'overwrite_vhds': {'key': 'overwriteVhds', 'type': 'bool'}, + } + + def __init__(self, **kwargs): + super(VirtualMachineCaptureParameters, self).__init__(**kwargs) + self.vhd_prefix = kwargs.get('vhd_prefix', None) + self.destination_container_name = kwargs.get('destination_container_name', None) + self.overwrite_vhds = kwargs.get('overwrite_vhds', None) + + +class VirtualMachineCaptureResult(SubResource): + """Resource Id. + + :param id: Resource Id + :type id: str + :param output: Operation output data (raw JSON) + :type output: object + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'output': {'key': 'properties.output', 'type': 'object'}, + } + + def __init__(self, **kwargs): + super(VirtualMachineCaptureResult, self).__init__(**kwargs) + self.output = kwargs.get('output', None) + + +class VirtualMachineExtension(Resource): + """Describes a Virtual Machine Extension. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource Id + :vartype id: str + :ivar name: Resource name + :vartype name: str + :ivar type: Resource type + :vartype type: str + :param location: Required. Resource location + :type location: str + :param tags: Resource tags + :type tags: dict[str, str] + :param force_update_tag: How the extension handler should be forced to + update even if the extension configuration has not changed. + :type force_update_tag: str + :param publisher: The name of the extension handler publisher. + :type publisher: str + :param virtual_machine_extension_type: Specifies the type of the + extension; an example is "CustomScriptExtension". + :type virtual_machine_extension_type: str + :param type_handler_version: Specifies the version of the script handler. + :type type_handler_version: str + :param auto_upgrade_minor_version: Indicates whether the extension should + use a newer minor version if one is available at deployment time. Once + deployed, however, the extension will not upgrade minor versions unless + redeployed, even with this property set to true. + :type auto_upgrade_minor_version: bool + :param settings: Json formatted public settings for the extension. + :type settings: object + :param protected_settings: The extension can contain either + protectedSettings or protectedSettingsFromKeyVault or no protected + settings at all. + :type protected_settings: object + :ivar provisioning_state: The provisioning state, which only appears in + the response. + :vartype provisioning_state: str + :param instance_view: The virtual machine extension instance view. + :type instance_view: + ~azure.mgmt.compute.v2016_04_30_preview.models.VirtualMachineExtensionInstanceView + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'force_update_tag': {'key': 'properties.forceUpdateTag', 'type': 'str'}, + 'publisher': {'key': 'properties.publisher', 'type': 'str'}, + 'virtual_machine_extension_type': {'key': 'properties.type', 'type': 'str'}, + 'type_handler_version': {'key': 'properties.typeHandlerVersion', 'type': 'str'}, + 'auto_upgrade_minor_version': {'key': 'properties.autoUpgradeMinorVersion', 'type': 'bool'}, + 'settings': {'key': 'properties.settings', 'type': 'object'}, + 'protected_settings': {'key': 'properties.protectedSettings', 'type': 'object'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'instance_view': {'key': 'properties.instanceView', 'type': 'VirtualMachineExtensionInstanceView'}, + } + + def __init__(self, **kwargs): + super(VirtualMachineExtension, self).__init__(**kwargs) + self.force_update_tag = kwargs.get('force_update_tag', None) + self.publisher = kwargs.get('publisher', None) + self.virtual_machine_extension_type = kwargs.get('virtual_machine_extension_type', None) + self.type_handler_version = kwargs.get('type_handler_version', None) + self.auto_upgrade_minor_version = kwargs.get('auto_upgrade_minor_version', None) + self.settings = kwargs.get('settings', None) + self.protected_settings = kwargs.get('protected_settings', None) + self.provisioning_state = None + self.instance_view = kwargs.get('instance_view', None) + + +class VirtualMachineExtensionHandlerInstanceView(Model): + """The instance view of a virtual machine extension handler. + + :param type: Specifies the type of the extension; an example is + "CustomScriptExtension". + :type type: str + :param type_handler_version: Specifies the version of the script handler. + :type type_handler_version: str + :param status: The extension handler status. + :type status: + ~azure.mgmt.compute.v2016_04_30_preview.models.InstanceViewStatus + """ + + _attribute_map = { + 'type': {'key': 'type', 'type': 'str'}, + 'type_handler_version': {'key': 'typeHandlerVersion', 'type': 'str'}, + 'status': {'key': 'status', 'type': 'InstanceViewStatus'}, + } + + def __init__(self, **kwargs): + super(VirtualMachineExtensionHandlerInstanceView, self).__init__(**kwargs) + self.type = kwargs.get('type', None) + self.type_handler_version = kwargs.get('type_handler_version', None) + self.status = kwargs.get('status', None) + + +class VirtualMachineExtensionImage(Resource): + """Describes a Virtual Machine Extension Image. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource Id + :vartype id: str + :ivar name: Resource name + :vartype name: str + :ivar type: Resource type + :vartype type: str + :param location: Required. Resource location + :type location: str + :param tags: Resource tags + :type tags: dict[str, str] + :param operating_system: Required. The operating system this extension + supports. + :type operating_system: str + :param compute_role: Required. The type of role (IaaS or PaaS) this + extension supports. + :type compute_role: str + :param handler_schema: Required. The schema defined by publisher, where + extension consumers should provide settings in a matching schema. + :type handler_schema: str + :param vm_scale_set_enabled: Whether the extension can be used on xRP + VMScaleSets. By default existing extensions are usable on scalesets, but + there might be cases where a publisher wants to explicitly indicate the + extension is only enabled for CRP VMs but not VMSS. + :type vm_scale_set_enabled: bool + :param supports_multiple_extensions: Whether the handler can support + multiple extensions. + :type supports_multiple_extensions: bool + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + 'operating_system': {'required': True}, + 'compute_role': {'required': True}, + 'handler_schema': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'operating_system': {'key': 'properties.operatingSystem', 'type': 'str'}, + 'compute_role': {'key': 'properties.computeRole', 'type': 'str'}, + 'handler_schema': {'key': 'properties.handlerSchema', 'type': 'str'}, + 'vm_scale_set_enabled': {'key': 'properties.vmScaleSetEnabled', 'type': 'bool'}, + 'supports_multiple_extensions': {'key': 'properties.supportsMultipleExtensions', 'type': 'bool'}, + } + + def __init__(self, **kwargs): + super(VirtualMachineExtensionImage, self).__init__(**kwargs) + self.operating_system = kwargs.get('operating_system', None) + self.compute_role = kwargs.get('compute_role', None) + self.handler_schema = kwargs.get('handler_schema', None) + self.vm_scale_set_enabled = kwargs.get('vm_scale_set_enabled', None) + self.supports_multiple_extensions = kwargs.get('supports_multiple_extensions', None) + + +class VirtualMachineExtensionInstanceView(Model): + """The instance view of a virtual machine extension. + + :param name: The virtual machine extension name. + :type name: str + :param type: Specifies the type of the extension; an example is + "CustomScriptExtension". + :type type: str + :param type_handler_version: Specifies the version of the script handler. + :type type_handler_version: str + :param substatuses: The resource status information. + :type substatuses: + list[~azure.mgmt.compute.v2016_04_30_preview.models.InstanceViewStatus] + :param statuses: The resource status information. + :type statuses: + list[~azure.mgmt.compute.v2016_04_30_preview.models.InstanceViewStatus] + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'type_handler_version': {'key': 'typeHandlerVersion', 'type': 'str'}, + 'substatuses': {'key': 'substatuses', 'type': '[InstanceViewStatus]'}, + 'statuses': {'key': 'statuses', 'type': '[InstanceViewStatus]'}, + } + + def __init__(self, **kwargs): + super(VirtualMachineExtensionInstanceView, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.type = kwargs.get('type', None) + self.type_handler_version = kwargs.get('type_handler_version', None) + self.substatuses = kwargs.get('substatuses', None) + self.statuses = kwargs.get('statuses', None) + + +class VirtualMachineExtensionsListResult(Model): + """The List Extension operation response. + + :param value: The list of extensions + :type value: + list[~azure.mgmt.compute.v2016_04_30_preview.models.VirtualMachineExtension] + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[VirtualMachineExtension]'}, + } + + def __init__(self, **kwargs): + super(VirtualMachineExtensionsListResult, self).__init__(**kwargs) + self.value = kwargs.get('value', None) + + +class VirtualMachineExtensionUpdate(UpdateResource): + """Describes a Virtual Machine Extension. + + :param tags: Resource tags + :type tags: dict[str, str] + :param force_update_tag: How the extension handler should be forced to + update even if the extension configuration has not changed. + :type force_update_tag: str + :param publisher: The name of the extension handler publisher. + :type publisher: str + :param type: Specifies the type of the extension; an example is + "CustomScriptExtension". + :type type: str + :param type_handler_version: Specifies the version of the script handler. + :type type_handler_version: str + :param auto_upgrade_minor_version: Indicates whether the extension should + use a newer minor version if one is available at deployment time. Once + deployed, however, the extension will not upgrade minor versions unless + redeployed, even with this property set to true. + :type auto_upgrade_minor_version: bool + :param settings: Json formatted public settings for the extension. + :type settings: object + :param protected_settings: The extension can contain either + protectedSettings or protectedSettingsFromKeyVault or no protected + settings at all. + :type protected_settings: object + """ + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + 'force_update_tag': {'key': 'properties.forceUpdateTag', 'type': 'str'}, + 'publisher': {'key': 'properties.publisher', 'type': 'str'}, + 'type': {'key': 'properties.type', 'type': 'str'}, + 'type_handler_version': {'key': 'properties.typeHandlerVersion', 'type': 'str'}, + 'auto_upgrade_minor_version': {'key': 'properties.autoUpgradeMinorVersion', 'type': 'bool'}, + 'settings': {'key': 'properties.settings', 'type': 'object'}, + 'protected_settings': {'key': 'properties.protectedSettings', 'type': 'object'}, + } + + def __init__(self, **kwargs): + super(VirtualMachineExtensionUpdate, self).__init__(**kwargs) + self.force_update_tag = kwargs.get('force_update_tag', None) + self.publisher = kwargs.get('publisher', None) + self.type = kwargs.get('type', None) + self.type_handler_version = kwargs.get('type_handler_version', None) + self.auto_upgrade_minor_version = kwargs.get('auto_upgrade_minor_version', None) + self.settings = kwargs.get('settings', None) + self.protected_settings = kwargs.get('protected_settings', None) + + +class VirtualMachineIdentity(Model): + """Identity for the virtual machine. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar principal_id: The principal id of virtual machine identity. + :vartype principal_id: str + :ivar tenant_id: The tenant id associated with the virtual machine. + :vartype tenant_id: str + :param type: The type of identity used for the virtual machine. Currently, + the only supported type is 'SystemAssigned', which implicitly creates an + identity. Possible values include: 'SystemAssigned' + :type type: str or + ~azure.mgmt.compute.v2016_04_30_preview.models.ResourceIdentityType + """ + + _validation = { + 'principal_id': {'readonly': True}, + 'tenant_id': {'readonly': True}, + } + + _attribute_map = { + 'principal_id': {'key': 'principalId', 'type': 'str'}, + 'tenant_id': {'key': 'tenantId', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'ResourceIdentityType'}, + } + + def __init__(self, **kwargs): + super(VirtualMachineIdentity, self).__init__(**kwargs) + self.principal_id = None + self.tenant_id = None + self.type = kwargs.get('type', None) + + +class VirtualMachineImageResource(SubResource): + """Virtual machine image resource information. + + All required parameters must be populated in order to send to Azure. + + :param id: Resource Id + :type id: str + :param name: Required. The name of the resource. + :type name: str + :param location: Required. The supported Azure location of the resource. + :type location: str + :param tags: Specifies the tags that are assigned to the virtual machine. + For more information about using tags, see [Using tags to organize your + Azure + resources](https://docs.microsoft.com/azure/azure-resource-manager/resource-group-using-tags.md). + :type tags: dict[str, str] + """ + + _validation = { + 'name': {'required': True}, + 'location': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__(self, **kwargs): + super(VirtualMachineImageResource, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.location = kwargs.get('location', None) + self.tags = kwargs.get('tags', None) + + +class VirtualMachineImage(VirtualMachineImageResource): + """Describes a Virtual Machine Image. + + All required parameters must be populated in order to send to Azure. + + :param id: Resource Id + :type id: str + :param name: Required. The name of the resource. + :type name: str + :param location: Required. The supported Azure location of the resource. + :type location: str + :param tags: Specifies the tags that are assigned to the virtual machine. + For more information about using tags, see [Using tags to organize your + Azure + resources](https://docs.microsoft.com/azure/azure-resource-manager/resource-group-using-tags.md). + :type tags: dict[str, str] + :param plan: + :type plan: ~azure.mgmt.compute.v2016_04_30_preview.models.PurchasePlan + :param os_disk_image: + :type os_disk_image: + ~azure.mgmt.compute.v2016_04_30_preview.models.OSDiskImage + :param data_disk_images: + :type data_disk_images: + list[~azure.mgmt.compute.v2016_04_30_preview.models.DataDiskImage] + """ + + _validation = { + 'name': {'required': True}, + 'location': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'plan': {'key': 'properties.plan', 'type': 'PurchasePlan'}, + 'os_disk_image': {'key': 'properties.osDiskImage', 'type': 'OSDiskImage'}, + 'data_disk_images': {'key': 'properties.dataDiskImages', 'type': '[DataDiskImage]'}, + } + + def __init__(self, **kwargs): + super(VirtualMachineImage, self).__init__(**kwargs) + self.plan = kwargs.get('plan', None) + self.os_disk_image = kwargs.get('os_disk_image', None) + self.data_disk_images = kwargs.get('data_disk_images', None) + + +class VirtualMachineInstanceView(Model): + """The instance view of a virtual machine. + + :param platform_update_domain: Specifies the update domain of the virtual + machine. + :type platform_update_domain: int + :param platform_fault_domain: Specifies the fault domain of the virtual + machine. + :type platform_fault_domain: int + :param rdp_thumb_print: The Remote desktop certificate thumbprint. + :type rdp_thumb_print: str + :param vm_agent: The VM Agent running on the virtual machine. + :type vm_agent: + ~azure.mgmt.compute.v2016_04_30_preview.models.VirtualMachineAgentInstanceView + :param disks: The virtual machine disk information. + :type disks: + list[~azure.mgmt.compute.v2016_04_30_preview.models.DiskInstanceView] + :param extensions: The extensions information. + :type extensions: + list[~azure.mgmt.compute.v2016_04_30_preview.models.VirtualMachineExtensionInstanceView] + :param boot_diagnostics: Boot Diagnostics is a debugging feature which + allows you to view Console Output and Screenshot to diagnose VM status. +

    You can easily view the output of your console log.

    + Azure also enables you to see a screenshot of the VM from the hypervisor. + :type boot_diagnostics: + ~azure.mgmt.compute.v2016_04_30_preview.models.BootDiagnosticsInstanceView + :param statuses: The resource status information. + :type statuses: + list[~azure.mgmt.compute.v2016_04_30_preview.models.InstanceViewStatus] + """ + + _attribute_map = { + 'platform_update_domain': {'key': 'platformUpdateDomain', 'type': 'int'}, + 'platform_fault_domain': {'key': 'platformFaultDomain', 'type': 'int'}, + 'rdp_thumb_print': {'key': 'rdpThumbPrint', 'type': 'str'}, + 'vm_agent': {'key': 'vmAgent', 'type': 'VirtualMachineAgentInstanceView'}, + 'disks': {'key': 'disks', 'type': '[DiskInstanceView]'}, + 'extensions': {'key': 'extensions', 'type': '[VirtualMachineExtensionInstanceView]'}, + 'boot_diagnostics': {'key': 'bootDiagnostics', 'type': 'BootDiagnosticsInstanceView'}, + 'statuses': {'key': 'statuses', 'type': '[InstanceViewStatus]'}, + } + + def __init__(self, **kwargs): + super(VirtualMachineInstanceView, self).__init__(**kwargs) + self.platform_update_domain = kwargs.get('platform_update_domain', None) + self.platform_fault_domain = kwargs.get('platform_fault_domain', None) + self.rdp_thumb_print = kwargs.get('rdp_thumb_print', None) + self.vm_agent = kwargs.get('vm_agent', None) + self.disks = kwargs.get('disks', None) + self.extensions = kwargs.get('extensions', None) + self.boot_diagnostics = kwargs.get('boot_diagnostics', None) + self.statuses = kwargs.get('statuses', None) + + +class VirtualMachineScaleSet(Resource): + """Describes a Virtual Machine Scale Set. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource Id + :vartype id: str + :ivar name: Resource name + :vartype name: str + :ivar type: Resource type + :vartype type: str + :param location: Required. Resource location + :type location: str + :param tags: Resource tags + :type tags: dict[str, str] + :param sku: The virtual machine scale set sku. + :type sku: ~azure.mgmt.compute.v2016_04_30_preview.models.Sku + :param plan: Specifies information about the marketplace image used to + create the virtual machine. This element is only used for marketplace + images. Before you can use a marketplace image from an API, you must + enable the image for programmatic use. In the Azure portal, find the + marketplace image that you want to use and then click **Want to deploy + programmatically, Get Started ->**. Enter any required information and + then click **Save**. + :type plan: ~azure.mgmt.compute.v2016_04_30_preview.models.Plan + :param upgrade_policy: The upgrade policy. + :type upgrade_policy: + ~azure.mgmt.compute.v2016_04_30_preview.models.UpgradePolicy + :param virtual_machine_profile: The virtual machine profile. + :type virtual_machine_profile: + ~azure.mgmt.compute.v2016_04_30_preview.models.VirtualMachineScaleSetVMProfile + :ivar provisioning_state: The provisioning state, which only appears in + the response. + :vartype provisioning_state: str + :param over_provision: Specifies whether the Virtual Machine Scale Set + should be overprovisioned. + :type over_provision: bool + :param single_placement_group: When true this limits the scale set to a + single placement group, of max size 100 virtual machines. + :type single_placement_group: bool + :param identity: The identity of the virtual machine scale set, if + configured. + :type identity: + ~azure.mgmt.compute.v2016_04_30_preview.models.VirtualMachineScaleSetIdentity + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'sku': {'key': 'sku', 'type': 'Sku'}, + 'plan': {'key': 'plan', 'type': 'Plan'}, + 'upgrade_policy': {'key': 'properties.upgradePolicy', 'type': 'UpgradePolicy'}, + 'virtual_machine_profile': {'key': 'properties.virtualMachineProfile', 'type': 'VirtualMachineScaleSetVMProfile'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'over_provision': {'key': 'properties.overProvision', 'type': 'bool'}, + 'single_placement_group': {'key': 'properties.singlePlacementGroup', 'type': 'bool'}, + 'identity': {'key': 'identity', 'type': 'VirtualMachineScaleSetIdentity'}, + } + + def __init__(self, **kwargs): + super(VirtualMachineScaleSet, self).__init__(**kwargs) + self.sku = kwargs.get('sku', None) + self.plan = kwargs.get('plan', None) + self.upgrade_policy = kwargs.get('upgrade_policy', None) + self.virtual_machine_profile = kwargs.get('virtual_machine_profile', None) + self.provisioning_state = None + self.over_provision = kwargs.get('over_provision', None) + self.single_placement_group = kwargs.get('single_placement_group', None) + self.identity = kwargs.get('identity', None) + + +class VirtualMachineScaleSetDataDisk(Model): + """Describes a virtual machine scale set data disk. + + All required parameters must be populated in order to send to Azure. + + :param name: The disk name. + :type name: str + :param lun: Required. Specifies the logical unit number of the data disk. + This value is used to identify data disks within the VM and therefore must + be unique for each data disk attached to a VM. + :type lun: int + :param caching: Specifies the caching requirements.

    Possible + values are:

    **None**

    **ReadOnly**

    **ReadWrite** +

    Default: **None for Standard storage. ReadOnly for Premium + storage**. Possible values include: 'None', 'ReadOnly', 'ReadWrite' + :type caching: str or + ~azure.mgmt.compute.v2016_04_30_preview.models.CachingTypes + :param create_option: Required. The create option. Possible values + include: 'FromImage', 'Empty', 'Attach' + :type create_option: str or + ~azure.mgmt.compute.v2016_04_30_preview.models.DiskCreateOptionTypes + :param disk_size_gb: Specifies the size of an empty data disk in + gigabytes. This element can be used to overwrite the size of the disk in a + virtual machine image.

    This value cannot be larger than 1023 GB + :type disk_size_gb: int + :param managed_disk: The managed disk parameters. + :type managed_disk: + ~azure.mgmt.compute.v2016_04_30_preview.models.VirtualMachineScaleSetManagedDiskParameters + """ + + _validation = { + 'lun': {'required': True}, + 'create_option': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'lun': {'key': 'lun', 'type': 'int'}, + 'caching': {'key': 'caching', 'type': 'CachingTypes'}, + 'create_option': {'key': 'createOption', 'type': 'DiskCreateOptionTypes'}, + 'disk_size_gb': {'key': 'diskSizeGB', 'type': 'int'}, + 'managed_disk': {'key': 'managedDisk', 'type': 'VirtualMachineScaleSetManagedDiskParameters'}, + } + + def __init__(self, **kwargs): + super(VirtualMachineScaleSetDataDisk, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.lun = kwargs.get('lun', None) + self.caching = kwargs.get('caching', None) + self.create_option = kwargs.get('create_option', None) + self.disk_size_gb = kwargs.get('disk_size_gb', None) + self.managed_disk = kwargs.get('managed_disk', None) + + +class VirtualMachineScaleSetExtension(SubResourceReadOnly): + """Describes a Virtual Machine Scale Set Extension. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource Id + :vartype id: str + :param name: The name of the extension. + :type name: str + :param publisher: The name of the extension handler publisher. + :type publisher: str + :param type: Specifies the type of the extension; an example is + "CustomScriptExtension". + :type type: str + :param type_handler_version: Specifies the version of the script handler. + :type type_handler_version: str + :param auto_upgrade_minor_version: Indicates whether the extension should + use a newer minor version if one is available at deployment time. Once + deployed, however, the extension will not upgrade minor versions unless + redeployed, even with this property set to true. + :type auto_upgrade_minor_version: bool + :param settings: Json formatted public settings for the extension. + :type settings: object + :param protected_settings: The extension can contain either + protectedSettings or protectedSettingsFromKeyVault or no protected + settings at all. + :type protected_settings: object + :ivar provisioning_state: The provisioning state, which only appears in + the response. + :vartype provisioning_state: str + """ + + _validation = { + 'id': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'publisher': {'key': 'properties.publisher', 'type': 'str'}, + 'type': {'key': 'properties.type', 'type': 'str'}, + 'type_handler_version': {'key': 'properties.typeHandlerVersion', 'type': 'str'}, + 'auto_upgrade_minor_version': {'key': 'properties.autoUpgradeMinorVersion', 'type': 'bool'}, + 'settings': {'key': 'properties.settings', 'type': 'object'}, + 'protected_settings': {'key': 'properties.protectedSettings', 'type': 'object'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(VirtualMachineScaleSetExtension, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.publisher = kwargs.get('publisher', None) + self.type = kwargs.get('type', None) + self.type_handler_version = kwargs.get('type_handler_version', None) + self.auto_upgrade_minor_version = kwargs.get('auto_upgrade_minor_version', None) + self.settings = kwargs.get('settings', None) + self.protected_settings = kwargs.get('protected_settings', None) + self.provisioning_state = None + + +class VirtualMachineScaleSetExtensionProfile(Model): + """Describes a virtual machine scale set extension profile. + + :param extensions: The virtual machine scale set child extension + resources. + :type extensions: + list[~azure.mgmt.compute.v2016_04_30_preview.models.VirtualMachineScaleSetExtension] + """ + + _attribute_map = { + 'extensions': {'key': 'extensions', 'type': '[VirtualMachineScaleSetExtension]'}, + } + + def __init__(self, **kwargs): + super(VirtualMachineScaleSetExtensionProfile, self).__init__(**kwargs) + self.extensions = kwargs.get('extensions', None) + + +class VirtualMachineScaleSetIdentity(Model): + """Identity for the virtual machine scale set. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar principal_id: The principal id of virtual machine scale set + identity. + :vartype principal_id: str + :ivar tenant_id: The tenant id associated with the virtual machine scale + set. + :vartype tenant_id: str + :param type: The type of identity used for the virtual machine scale set. + Currently, the only supported type is 'SystemAssigned', which implicitly + creates an identity. Possible values include: 'SystemAssigned' + :type type: str or + ~azure.mgmt.compute.v2016_04_30_preview.models.ResourceIdentityType + """ + + _validation = { + 'principal_id': {'readonly': True}, + 'tenant_id': {'readonly': True}, + } + + _attribute_map = { + 'principal_id': {'key': 'principalId', 'type': 'str'}, + 'tenant_id': {'key': 'tenantId', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'ResourceIdentityType'}, + } + + def __init__(self, **kwargs): + super(VirtualMachineScaleSetIdentity, self).__init__(**kwargs) + self.principal_id = None + self.tenant_id = None + self.type = kwargs.get('type', None) + + +class VirtualMachineScaleSetInstanceView(Model): + """The instance view of a virtual machine scale set. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar virtual_machine: The instance view status summary for the virtual + machine scale set. + :vartype virtual_machine: + ~azure.mgmt.compute.v2016_04_30_preview.models.VirtualMachineScaleSetInstanceViewStatusesSummary + :ivar extensions: The extensions information. + :vartype extensions: + list[~azure.mgmt.compute.v2016_04_30_preview.models.VirtualMachineScaleSetVMExtensionsSummary] + :param statuses: The resource status information. + :type statuses: + list[~azure.mgmt.compute.v2016_04_30_preview.models.InstanceViewStatus] + """ + + _validation = { + 'virtual_machine': {'readonly': True}, + 'extensions': {'readonly': True}, + } + + _attribute_map = { + 'virtual_machine': {'key': 'virtualMachine', 'type': 'VirtualMachineScaleSetInstanceViewStatusesSummary'}, + 'extensions': {'key': 'extensions', 'type': '[VirtualMachineScaleSetVMExtensionsSummary]'}, + 'statuses': {'key': 'statuses', 'type': '[InstanceViewStatus]'}, + } + + def __init__(self, **kwargs): + super(VirtualMachineScaleSetInstanceView, self).__init__(**kwargs) + self.virtual_machine = None + self.extensions = None + self.statuses = kwargs.get('statuses', None) + + +class VirtualMachineScaleSetInstanceViewStatusesSummary(Model): + """Instance view statuses summary for virtual machines of a virtual machine + scale set. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar statuses_summary: The extensions information. + :vartype statuses_summary: + list[~azure.mgmt.compute.v2016_04_30_preview.models.VirtualMachineStatusCodeCount] + """ + + _validation = { + 'statuses_summary': {'readonly': True}, + } + + _attribute_map = { + 'statuses_summary': {'key': 'statusesSummary', 'type': '[VirtualMachineStatusCodeCount]'}, + } + + def __init__(self, **kwargs): + super(VirtualMachineScaleSetInstanceViewStatusesSummary, self).__init__(**kwargs) + self.statuses_summary = None + + +class VirtualMachineScaleSetIPConfiguration(SubResource): + """Describes a virtual machine scale set network profile's IP configuration. + + All required parameters must be populated in order to send to Azure. + + :param id: Resource Id + :type id: str + :param name: Required. The IP configuration name. + :type name: str + :param subnet: Required. The subnet. + :type subnet: + ~azure.mgmt.compute.v2016_04_30_preview.models.ApiEntityReference + :param application_gateway_backend_address_pools: The application gateway + backend address pools. + :type application_gateway_backend_address_pools: + list[~azure.mgmt.compute.v2016_04_30_preview.models.SubResource] + :param load_balancer_backend_address_pools: The load balancer backend + address pools. + :type load_balancer_backend_address_pools: + list[~azure.mgmt.compute.v2016_04_30_preview.models.SubResource] + :param load_balancer_inbound_nat_pools: The load balancer inbound nat + pools. + :type load_balancer_inbound_nat_pools: + list[~azure.mgmt.compute.v2016_04_30_preview.models.SubResource] + """ + + _validation = { + 'name': {'required': True}, + 'subnet': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'subnet': {'key': 'properties.subnet', 'type': 'ApiEntityReference'}, + 'application_gateway_backend_address_pools': {'key': 'properties.applicationGatewayBackendAddressPools', 'type': '[SubResource]'}, + 'load_balancer_backend_address_pools': {'key': 'properties.loadBalancerBackendAddressPools', 'type': '[SubResource]'}, + 'load_balancer_inbound_nat_pools': {'key': 'properties.loadBalancerInboundNatPools', 'type': '[SubResource]'}, + } + + def __init__(self, **kwargs): + super(VirtualMachineScaleSetIPConfiguration, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.subnet = kwargs.get('subnet', None) + self.application_gateway_backend_address_pools = kwargs.get('application_gateway_backend_address_pools', None) + self.load_balancer_backend_address_pools = kwargs.get('load_balancer_backend_address_pools', None) + self.load_balancer_inbound_nat_pools = kwargs.get('load_balancer_inbound_nat_pools', None) + + +class VirtualMachineScaleSetManagedDiskParameters(Model): + """Describes the parameters of a ScaleSet managed disk. + + :param storage_account_type: Specifies the storage account type for the + managed disk. Possible values are: Standard_LRS or Premium_LRS. Possible + values include: 'Standard_LRS', 'Premium_LRS' + :type storage_account_type: str or + ~azure.mgmt.compute.v2016_04_30_preview.models.StorageAccountTypes + """ + + _attribute_map = { + 'storage_account_type': {'key': 'storageAccountType', 'type': 'StorageAccountTypes'}, + } + + def __init__(self, **kwargs): + super(VirtualMachineScaleSetManagedDiskParameters, self).__init__(**kwargs) + self.storage_account_type = kwargs.get('storage_account_type', None) + + +class VirtualMachineScaleSetNetworkConfiguration(SubResource): + """Describes a virtual machine scale set network profile's network + configurations. + + All required parameters must be populated in order to send to Azure. + + :param id: Resource Id + :type id: str + :param name: Required. The network configuration name. + :type name: str + :param primary: Whether this is a primary NIC on a virtual machine. + :type primary: bool + :param ip_configurations: Required. The virtual machine scale set IP + Configuration. + :type ip_configurations: + list[~azure.mgmt.compute.v2016_04_30_preview.models.VirtualMachineScaleSetIPConfiguration] + """ + + _validation = { + 'name': {'required': True}, + 'ip_configurations': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'primary': {'key': 'properties.primary', 'type': 'bool'}, + 'ip_configurations': {'key': 'properties.ipConfigurations', 'type': '[VirtualMachineScaleSetIPConfiguration]'}, + } + + def __init__(self, **kwargs): + super(VirtualMachineScaleSetNetworkConfiguration, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.primary = kwargs.get('primary', None) + self.ip_configurations = kwargs.get('ip_configurations', None) + + +class VirtualMachineScaleSetNetworkProfile(Model): + """Describes a virtual machine scale set network profile. + + :param network_interface_configurations: The list of network + configurations. + :type network_interface_configurations: + list[~azure.mgmt.compute.v2016_04_30_preview.models.VirtualMachineScaleSetNetworkConfiguration] + """ + + _attribute_map = { + 'network_interface_configurations': {'key': 'networkInterfaceConfigurations', 'type': '[VirtualMachineScaleSetNetworkConfiguration]'}, + } + + def __init__(self, **kwargs): + super(VirtualMachineScaleSetNetworkProfile, self).__init__(**kwargs) + self.network_interface_configurations = kwargs.get('network_interface_configurations', None) + + +class VirtualMachineScaleSetOSDisk(Model): + """Describes a virtual machine scale set operating system disk. + + All required parameters must be populated in order to send to Azure. + + :param name: The disk name. + :type name: str + :param caching: Specifies the caching requirements.

    Possible + values are:

    **None**

    **ReadOnly**

    **ReadWrite** +

    Default: **None for Standard storage. ReadOnly for Premium + storage**. Possible values include: 'None', 'ReadOnly', 'ReadWrite' + :type caching: str or + ~azure.mgmt.compute.v2016_04_30_preview.models.CachingTypes + :param create_option: Required. Specifies how the virtual machines in the + scale set should be created.

    The only allowed value is: + **FromImage** \\u2013 This value is used when you are using an image to + create the virtual machine. If you are using a platform image, you also + use the imageReference element described above. If you are using a + marketplace image, you also use the plan element previously described. + Possible values include: 'FromImage', 'Empty', 'Attach' + :type create_option: str or + ~azure.mgmt.compute.v2016_04_30_preview.models.DiskCreateOptionTypes + :param os_type: This property allows you to specify the type of the OS + that is included in the disk if creating a VM from user-image or a + specialized VHD.

    Possible values are:

    **Windows** +

    **Linux**. Possible values include: 'Windows', 'Linux' + :type os_type: str or + ~azure.mgmt.compute.v2016_04_30_preview.models.OperatingSystemTypes + :param image: The Source User Image VirtualHardDisk. This VirtualHardDisk + will be copied before using it to attach to the Virtual Machine. If + SourceImage is provided, the destination VirtualHardDisk should not exist. + :type image: + ~azure.mgmt.compute.v2016_04_30_preview.models.VirtualHardDisk + :param vhd_containers: The list of virtual hard disk container uris. + :type vhd_containers: list[str] + :param managed_disk: The managed disk parameters. + :type managed_disk: + ~azure.mgmt.compute.v2016_04_30_preview.models.VirtualMachineScaleSetManagedDiskParameters + """ + + _validation = { + 'create_option': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'caching': {'key': 'caching', 'type': 'CachingTypes'}, + 'create_option': {'key': 'createOption', 'type': 'DiskCreateOptionTypes'}, + 'os_type': {'key': 'osType', 'type': 'OperatingSystemTypes'}, + 'image': {'key': 'image', 'type': 'VirtualHardDisk'}, + 'vhd_containers': {'key': 'vhdContainers', 'type': '[str]'}, + 'managed_disk': {'key': 'managedDisk', 'type': 'VirtualMachineScaleSetManagedDiskParameters'}, + } + + def __init__(self, **kwargs): + super(VirtualMachineScaleSetOSDisk, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.caching = kwargs.get('caching', None) + self.create_option = kwargs.get('create_option', None) + self.os_type = kwargs.get('os_type', None) + self.image = kwargs.get('image', None) + self.vhd_containers = kwargs.get('vhd_containers', None) + self.managed_disk = kwargs.get('managed_disk', None) + + +class VirtualMachineScaleSetOSProfile(Model): + """Describes a virtual machine scale set OS profile. + + :param computer_name_prefix: Specifies the computer name prefix for all of + the virtual machines in the scale set. Computer name prefixes must be 1 to + 15 characters long. + :type computer_name_prefix: str + :param admin_username: Specifies the name of the administrator account. +

    **Windows-only restriction:** Cannot end in "."

    + **Disallowed values:** "administrator", "admin", "user", "user1", "test", + "user2", "test1", "user3", "admin1", "1", "123", "a", "actuser", "adm", + "admin2", "aspnet", "backup", "console", "david", "guest", "john", + "owner", "root", "server", "sql", "support", "support_388945a0", "sys", + "test2", "test3", "user4", "user5".

    **Minimum-length (Linux):** 1 + character

    **Max-length (Linux):** 64 characters

    + **Max-length (Windows):** 20 characters

  • For root access to + the Linux VM, see [Using root privileges on Linux virtual machines in + Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-use-root-privileges?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json)
  • + For a list of built-in system users on Linux that should not be used in + this field, see [Selecting User Names for Linux on + Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-usernames?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json) + :type admin_username: str + :param admin_password: Specifies the password of the administrator + account.

    **Minimum-length (Windows):** 8 characters

    + **Minimum-length (Linux):** 6 characters

    **Max-length + (Windows):** 123 characters

    **Max-length (Linux):** 72 characters +

    **Complexity requirements:** 3 out of 4 conditions below need to + be fulfilled
    Has lower characters
    Has upper characters
    Has a + digit
    Has a special character (Regex match [\\W_])

    + **Disallowed values:** "abc@123", "P@$$w0rd", "P@ssw0rd", "P@ssword123", + "Pa$$word", "pass@word1", "Password!", "Password1", "Password22", + "iloveyou!"

    For resetting the password, see [How to reset the + Remote Desktop service or its login password in a Windows + VM](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-reset-rdp?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json) +

    For resetting root password, see [Manage users, SSH, and check or + repair disks on Azure Linux VMs using the VMAccess + Extension](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-using-vmaccess-extension?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json#reset-root-password) + :type admin_password: str + :param custom_data: A base-64 encoded string of custom data. + :type custom_data: str + :param windows_configuration: The Windows Configuration of the OS profile. + :type windows_configuration: + ~azure.mgmt.compute.v2016_04_30_preview.models.WindowsConfiguration + :param linux_configuration: The Linux Configuration of the OS profile. + :type linux_configuration: + ~azure.mgmt.compute.v2016_04_30_preview.models.LinuxConfiguration + :param secrets: The List of certificates for addition to the VM. + :type secrets: + list[~azure.mgmt.compute.v2016_04_30_preview.models.VaultSecretGroup] + """ + + _attribute_map = { + 'computer_name_prefix': {'key': 'computerNamePrefix', 'type': 'str'}, + 'admin_username': {'key': 'adminUsername', 'type': 'str'}, + 'admin_password': {'key': 'adminPassword', 'type': 'str'}, + 'custom_data': {'key': 'customData', 'type': 'str'}, + 'windows_configuration': {'key': 'windowsConfiguration', 'type': 'WindowsConfiguration'}, + 'linux_configuration': {'key': 'linuxConfiguration', 'type': 'LinuxConfiguration'}, + 'secrets': {'key': 'secrets', 'type': '[VaultSecretGroup]'}, + } + + def __init__(self, **kwargs): + super(VirtualMachineScaleSetOSProfile, self).__init__(**kwargs) + self.computer_name_prefix = kwargs.get('computer_name_prefix', None) + self.admin_username = kwargs.get('admin_username', None) + self.admin_password = kwargs.get('admin_password', None) + self.custom_data = kwargs.get('custom_data', None) + self.windows_configuration = kwargs.get('windows_configuration', None) + self.linux_configuration = kwargs.get('linux_configuration', None) + self.secrets = kwargs.get('secrets', None) + + +class VirtualMachineScaleSetSku(Model): + """Describes an available virtual machine scale set sku. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar resource_type: The type of resource the sku applies to. + :vartype resource_type: str + :ivar sku: The Sku. + :vartype sku: ~azure.mgmt.compute.v2016_04_30_preview.models.Sku + :ivar capacity: Specifies the number of virtual machines in the scale set. + :vartype capacity: + ~azure.mgmt.compute.v2016_04_30_preview.models.VirtualMachineScaleSetSkuCapacity + """ + + _validation = { + 'resource_type': {'readonly': True}, + 'sku': {'readonly': True}, + 'capacity': {'readonly': True}, + } + + _attribute_map = { + 'resource_type': {'key': 'resourceType', 'type': 'str'}, + 'sku': {'key': 'sku', 'type': 'Sku'}, + 'capacity': {'key': 'capacity', 'type': 'VirtualMachineScaleSetSkuCapacity'}, + } + + def __init__(self, **kwargs): + super(VirtualMachineScaleSetSku, self).__init__(**kwargs) + self.resource_type = None + self.sku = None + self.capacity = None + + +class VirtualMachineScaleSetSkuCapacity(Model): + """Describes scaling information of a sku. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar minimum: The minimum capacity. + :vartype minimum: long + :ivar maximum: The maximum capacity that can be set. + :vartype maximum: long + :ivar default_capacity: The default capacity. + :vartype default_capacity: long + :ivar scale_type: The scale type applicable to the sku. Possible values + include: 'Automatic', 'None' + :vartype scale_type: str or + ~azure.mgmt.compute.v2016_04_30_preview.models.VirtualMachineScaleSetSkuScaleType + """ + + _validation = { + 'minimum': {'readonly': True}, + 'maximum': {'readonly': True}, + 'default_capacity': {'readonly': True}, + 'scale_type': {'readonly': True}, + } + + _attribute_map = { + 'minimum': {'key': 'minimum', 'type': 'long'}, + 'maximum': {'key': 'maximum', 'type': 'long'}, + 'default_capacity': {'key': 'defaultCapacity', 'type': 'long'}, + 'scale_type': {'key': 'scaleType', 'type': 'VirtualMachineScaleSetSkuScaleType'}, + } + + def __init__(self, **kwargs): + super(VirtualMachineScaleSetSkuCapacity, self).__init__(**kwargs) + self.minimum = None + self.maximum = None + self.default_capacity = None + self.scale_type = None + + +class VirtualMachineScaleSetStorageProfile(Model): + """Describes a virtual machine scale set storage profile. + + :param image_reference: The image reference. + :type image_reference: + ~azure.mgmt.compute.v2016_04_30_preview.models.ImageReference + :param os_disk: The OS disk. + :type os_disk: + ~azure.mgmt.compute.v2016_04_30_preview.models.VirtualMachineScaleSetOSDisk + :param data_disks: The data disks. + :type data_disks: + list[~azure.mgmt.compute.v2016_04_30_preview.models.VirtualMachineScaleSetDataDisk] + """ + + _attribute_map = { + 'image_reference': {'key': 'imageReference', 'type': 'ImageReference'}, + 'os_disk': {'key': 'osDisk', 'type': 'VirtualMachineScaleSetOSDisk'}, + 'data_disks': {'key': 'dataDisks', 'type': '[VirtualMachineScaleSetDataDisk]'}, + } + + def __init__(self, **kwargs): + super(VirtualMachineScaleSetStorageProfile, self).__init__(**kwargs) + self.image_reference = kwargs.get('image_reference', None) + self.os_disk = kwargs.get('os_disk', None) + self.data_disks = kwargs.get('data_disks', None) + + +class VirtualMachineScaleSetVM(Resource): + """Describes a virtual machine scale set virtual machine. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource Id + :vartype id: str + :ivar name: Resource name + :vartype name: str + :ivar type: Resource type + :vartype type: str + :param location: Required. Resource location + :type location: str + :param tags: Resource tags + :type tags: dict[str, str] + :ivar instance_id: The virtual machine instance ID. + :vartype instance_id: str + :ivar sku: The virtual machine SKU. + :vartype sku: ~azure.mgmt.compute.v2016_04_30_preview.models.Sku + :ivar latest_model_applied: Specifies whether the latest model has been + applied to the virtual machine. + :vartype latest_model_applied: bool + :ivar vm_id: Azure VM unique ID. + :vartype vm_id: str + :ivar instance_view: The virtual machine instance view. + :vartype instance_view: + ~azure.mgmt.compute.v2016_04_30_preview.models.VirtualMachineScaleSetVMInstanceView + :param hardware_profile: Specifies the hardware settings for the virtual + machine. + :type hardware_profile: + ~azure.mgmt.compute.v2016_04_30_preview.models.HardwareProfile + :param storage_profile: Specifies the storage settings for the virtual + machine disks. + :type storage_profile: + ~azure.mgmt.compute.v2016_04_30_preview.models.StorageProfile + :param os_profile: Specifies the operating system settings for the virtual + machine. + :type os_profile: ~azure.mgmt.compute.v2016_04_30_preview.models.OSProfile + :param network_profile: Specifies the network interfaces of the virtual + machine. + :type network_profile: + ~azure.mgmt.compute.v2016_04_30_preview.models.NetworkProfile + :param diagnostics_profile: Specifies the boot diagnostic settings state. +

    Minimum api-version: 2015-06-15. + :type diagnostics_profile: + ~azure.mgmt.compute.v2016_04_30_preview.models.DiagnosticsProfile + :param availability_set: Specifies information about the availability set + that the virtual machine should be assigned to. Virtual machines specified + in the same availability set are allocated to different nodes to maximize + availability. For more information about availability sets, see [Manage + the availability of virtual + machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-manage-availability?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). +

    For more information on Azure planned maintenance, see [Planned + maintenance for virtual machines in + Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-planned-maintenance?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json) +

    Currently, a VM can only be added to availability set at creation + time. An existing VM cannot be added to an availability set. + :type availability_set: + ~azure.mgmt.compute.v2016_04_30_preview.models.SubResource + :ivar provisioning_state: The provisioning state, which only appears in + the response. + :vartype provisioning_state: str + :param license_type: Specifies that the image or disk that is being used + was licensed on-premises. This element is only used for images that + contain the Windows Server operating system.

    Possible values are: +

    Windows_Client

    Windows_Server

    If this element + is included in a request for an update, the value must match the initial + value. This value cannot be updated.

    For more information, see + [Azure Hybrid Use Benefit for Windows + Server](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-hybrid-use-benefit-licensing?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json) +

    Minimum api-version: 2015-06-15 + :type license_type: str + :param plan: Specifies information about the marketplace image used to + create the virtual machine. This element is only used for marketplace + images. Before you can use a marketplace image from an API, you must + enable the image for programmatic use. In the Azure portal, find the + marketplace image that you want to use and then click **Want to deploy + programmatically, Get Started ->**. Enter any required information and + then click **Save**. + :type plan: ~azure.mgmt.compute.v2016_04_30_preview.models.Plan + :ivar resources: The virtual machine child extension resources. + :vartype resources: + list[~azure.mgmt.compute.v2016_04_30_preview.models.VirtualMachineExtension] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + 'instance_id': {'readonly': True}, + 'sku': {'readonly': True}, + 'latest_model_applied': {'readonly': True}, + 'vm_id': {'readonly': True}, + 'instance_view': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + 'resources': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'instance_id': {'key': 'instanceId', 'type': 'str'}, + 'sku': {'key': 'sku', 'type': 'Sku'}, + 'latest_model_applied': {'key': 'properties.latestModelApplied', 'type': 'bool'}, + 'vm_id': {'key': 'properties.vmId', 'type': 'str'}, + 'instance_view': {'key': 'properties.instanceView', 'type': 'VirtualMachineScaleSetVMInstanceView'}, + 'hardware_profile': {'key': 'properties.hardwareProfile', 'type': 'HardwareProfile'}, + 'storage_profile': {'key': 'properties.storageProfile', 'type': 'StorageProfile'}, + 'os_profile': {'key': 'properties.osProfile', 'type': 'OSProfile'}, + 'network_profile': {'key': 'properties.networkProfile', 'type': 'NetworkProfile'}, + 'diagnostics_profile': {'key': 'properties.diagnosticsProfile', 'type': 'DiagnosticsProfile'}, + 'availability_set': {'key': 'properties.availabilitySet', 'type': 'SubResource'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'license_type': {'key': 'properties.licenseType', 'type': 'str'}, + 'plan': {'key': 'plan', 'type': 'Plan'}, + 'resources': {'key': 'resources', 'type': '[VirtualMachineExtension]'}, + } + + def __init__(self, **kwargs): + super(VirtualMachineScaleSetVM, self).__init__(**kwargs) + self.instance_id = None + self.sku = None + self.latest_model_applied = None + self.vm_id = None + self.instance_view = None + self.hardware_profile = kwargs.get('hardware_profile', None) + self.storage_profile = kwargs.get('storage_profile', None) + self.os_profile = kwargs.get('os_profile', None) + self.network_profile = kwargs.get('network_profile', None) + self.diagnostics_profile = kwargs.get('diagnostics_profile', None) + self.availability_set = kwargs.get('availability_set', None) + self.provisioning_state = None + self.license_type = kwargs.get('license_type', None) + self.plan = kwargs.get('plan', None) + self.resources = None + + +class VirtualMachineScaleSetVMExtensionsSummary(Model): + """Extensions summary for virtual machines of a virtual machine scale set. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar name: The extension name. + :vartype name: str + :ivar statuses_summary: The extensions information. + :vartype statuses_summary: + list[~azure.mgmt.compute.v2016_04_30_preview.models.VirtualMachineStatusCodeCount] + """ + + _validation = { + 'name': {'readonly': True}, + 'statuses_summary': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'statuses_summary': {'key': 'statusesSummary', 'type': '[VirtualMachineStatusCodeCount]'}, + } + + def __init__(self, **kwargs): + super(VirtualMachineScaleSetVMExtensionsSummary, self).__init__(**kwargs) + self.name = None + self.statuses_summary = None + + +class VirtualMachineScaleSetVMInstanceIDs(Model): + """Specifies a list of virtual machine instance IDs from the VM scale set. + + :param instance_ids: The virtual machine scale set instance ids. Omitting + the virtual machine scale set instance ids will result in the operation + being performed on all virtual machines in the virtual machine scale set. + :type instance_ids: list[str] + """ + + _attribute_map = { + 'instance_ids': {'key': 'instanceIds', 'type': '[str]'}, + } + + def __init__(self, **kwargs): + super(VirtualMachineScaleSetVMInstanceIDs, self).__init__(**kwargs) + self.instance_ids = kwargs.get('instance_ids', None) + + +class VirtualMachineScaleSetVMInstanceRequiredIDs(Model): + """Specifies a list of virtual machine instance IDs from the VM scale set. + + All required parameters must be populated in order to send to Azure. + + :param instance_ids: Required. The virtual machine scale set instance ids. + :type instance_ids: list[str] + """ + + _validation = { + 'instance_ids': {'required': True}, + } + + _attribute_map = { + 'instance_ids': {'key': 'instanceIds', 'type': '[str]'}, + } + + def __init__(self, **kwargs): + super(VirtualMachineScaleSetVMInstanceRequiredIDs, self).__init__(**kwargs) + self.instance_ids = kwargs.get('instance_ids', None) + + +class VirtualMachineScaleSetVMInstanceView(Model): + """The instance view of a virtual machine scale set VM. + + :param platform_update_domain: The Update Domain count. + :type platform_update_domain: int + :param platform_fault_domain: The Fault Domain count. + :type platform_fault_domain: int + :param rdp_thumb_print: The Remote desktop certificate thumbprint. + :type rdp_thumb_print: str + :param vm_agent: The VM Agent running on the virtual machine. + :type vm_agent: + ~azure.mgmt.compute.v2016_04_30_preview.models.VirtualMachineAgentInstanceView + :param disks: The disks information. + :type disks: + list[~azure.mgmt.compute.v2016_04_30_preview.models.DiskInstanceView] + :param extensions: The extensions information. + :type extensions: + list[~azure.mgmt.compute.v2016_04_30_preview.models.VirtualMachineExtensionInstanceView] + :param boot_diagnostics: Boot Diagnostics is a debugging feature which + allows you to view Console Output and Screenshot to diagnose VM status. +

    You can easily view the output of your console log.

    + Azure also enables you to see a screenshot of the VM from the hypervisor. + :type boot_diagnostics: + ~azure.mgmt.compute.v2016_04_30_preview.models.BootDiagnosticsInstanceView + :param statuses: The resource status information. + :type statuses: + list[~azure.mgmt.compute.v2016_04_30_preview.models.InstanceViewStatus] + :param placement_group_id: The placement group in which the VM is running. + If the VM is deallocated it will not have a placementGroupId. + :type placement_group_id: str + """ + + _attribute_map = { + 'platform_update_domain': {'key': 'platformUpdateDomain', 'type': 'int'}, + 'platform_fault_domain': {'key': 'platformFaultDomain', 'type': 'int'}, + 'rdp_thumb_print': {'key': 'rdpThumbPrint', 'type': 'str'}, + 'vm_agent': {'key': 'vmAgent', 'type': 'VirtualMachineAgentInstanceView'}, + 'disks': {'key': 'disks', 'type': '[DiskInstanceView]'}, + 'extensions': {'key': 'extensions', 'type': '[VirtualMachineExtensionInstanceView]'}, + 'boot_diagnostics': {'key': 'bootDiagnostics', 'type': 'BootDiagnosticsInstanceView'}, + 'statuses': {'key': 'statuses', 'type': '[InstanceViewStatus]'}, + 'placement_group_id': {'key': 'placementGroupId', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(VirtualMachineScaleSetVMInstanceView, self).__init__(**kwargs) + self.platform_update_domain = kwargs.get('platform_update_domain', None) + self.platform_fault_domain = kwargs.get('platform_fault_domain', None) + self.rdp_thumb_print = kwargs.get('rdp_thumb_print', None) + self.vm_agent = kwargs.get('vm_agent', None) + self.disks = kwargs.get('disks', None) + self.extensions = kwargs.get('extensions', None) + self.boot_diagnostics = kwargs.get('boot_diagnostics', None) + self.statuses = kwargs.get('statuses', None) + self.placement_group_id = kwargs.get('placement_group_id', None) + + +class VirtualMachineScaleSetVMProfile(Model): + """Describes a virtual machine scale set virtual machine profile. + + :param os_profile: The virtual machine scale set OS profile. + :type os_profile: + ~azure.mgmt.compute.v2016_04_30_preview.models.VirtualMachineScaleSetOSProfile + :param storage_profile: The virtual machine scale set storage profile. + :type storage_profile: + ~azure.mgmt.compute.v2016_04_30_preview.models.VirtualMachineScaleSetStorageProfile + :param network_profile: The virtual machine scale set network profile. + :type network_profile: + ~azure.mgmt.compute.v2016_04_30_preview.models.VirtualMachineScaleSetNetworkProfile + :param extension_profile: The virtual machine scale set extension profile. + :type extension_profile: + ~azure.mgmt.compute.v2016_04_30_preview.models.VirtualMachineScaleSetExtensionProfile + """ + + _attribute_map = { + 'os_profile': {'key': 'osProfile', 'type': 'VirtualMachineScaleSetOSProfile'}, + 'storage_profile': {'key': 'storageProfile', 'type': 'VirtualMachineScaleSetStorageProfile'}, + 'network_profile': {'key': 'networkProfile', 'type': 'VirtualMachineScaleSetNetworkProfile'}, + 'extension_profile': {'key': 'extensionProfile', 'type': 'VirtualMachineScaleSetExtensionProfile'}, + } + + def __init__(self, **kwargs): + super(VirtualMachineScaleSetVMProfile, self).__init__(**kwargs) + self.os_profile = kwargs.get('os_profile', None) + self.storage_profile = kwargs.get('storage_profile', None) + self.network_profile = kwargs.get('network_profile', None) + self.extension_profile = kwargs.get('extension_profile', None) + + +class VirtualMachineSize(Model): + """Describes the properties of a VM size. + + :param name: The name of the virtual machine size. + :type name: str + :param number_of_cores: The number of cores supported by the virtual + machine size. + :type number_of_cores: int + :param os_disk_size_in_mb: The OS disk size, in MB, allowed by the virtual + machine size. + :type os_disk_size_in_mb: int + :param resource_disk_size_in_mb: The resource disk size, in MB, allowed by + the virtual machine size. + :type resource_disk_size_in_mb: int + :param memory_in_mb: The amount of memory, in MB, supported by the virtual + machine size. + :type memory_in_mb: int + :param max_data_disk_count: The maximum number of data disks that can be + attached to the virtual machine size. + :type max_data_disk_count: int + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'number_of_cores': {'key': 'numberOfCores', 'type': 'int'}, + 'os_disk_size_in_mb': {'key': 'osDiskSizeInMB', 'type': 'int'}, + 'resource_disk_size_in_mb': {'key': 'resourceDiskSizeInMB', 'type': 'int'}, + 'memory_in_mb': {'key': 'memoryInMB', 'type': 'int'}, + 'max_data_disk_count': {'key': 'maxDataDiskCount', 'type': 'int'}, + } + + def __init__(self, **kwargs): + super(VirtualMachineSize, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.number_of_cores = kwargs.get('number_of_cores', None) + self.os_disk_size_in_mb = kwargs.get('os_disk_size_in_mb', None) + self.resource_disk_size_in_mb = kwargs.get('resource_disk_size_in_mb', None) + self.memory_in_mb = kwargs.get('memory_in_mb', None) + self.max_data_disk_count = kwargs.get('max_data_disk_count', None) + + +class VirtualMachineStatusCodeCount(Model): + """The status code and count of the virtual machine scale set instance view + status summary. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar code: The instance view status code. + :vartype code: str + :ivar count: The number of instances having a particular status code. + :vartype count: int + """ + + _validation = { + 'code': {'readonly': True}, + 'count': {'readonly': True}, + } + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + 'count': {'key': 'count', 'type': 'int'}, + } + + def __init__(self, **kwargs): + super(VirtualMachineStatusCodeCount, self).__init__(**kwargs) + self.code = None + self.count = None + + +class WindowsConfiguration(Model): + """Specifies Windows operating system settings on the virtual machine. + + :param provision_vm_agent: Indicates whether virtual machine agent should + be provisioned on the virtual machine.

    When this property is not + specified in the request body, default behavior is to set it to true. + This will ensure that VM Agent is installed on the VM so that extensions + can be added to the VM later. + :type provision_vm_agent: bool + :param enable_automatic_updates: Indicates whether virtual machine is + enabled for automatic updates. + :type enable_automatic_updates: bool + :param time_zone: Specifies the time zone of the virtual machine. e.g. + "Pacific Standard Time" + :type time_zone: str + :param additional_unattend_content: Specifies additional base-64 encoded + XML formatted information that can be included in the Unattend.xml file, + which is used by Windows Setup. + :type additional_unattend_content: + list[~azure.mgmt.compute.v2016_04_30_preview.models.AdditionalUnattendContent] + :param win_rm: Specifies the Windows Remote Management listeners. This + enables remote Windows PowerShell. + :type win_rm: + ~azure.mgmt.compute.v2016_04_30_preview.models.WinRMConfiguration + """ + + _attribute_map = { + 'provision_vm_agent': {'key': 'provisionVMAgent', 'type': 'bool'}, + 'enable_automatic_updates': {'key': 'enableAutomaticUpdates', 'type': 'bool'}, + 'time_zone': {'key': 'timeZone', 'type': 'str'}, + 'additional_unattend_content': {'key': 'additionalUnattendContent', 'type': '[AdditionalUnattendContent]'}, + 'win_rm': {'key': 'winRM', 'type': 'WinRMConfiguration'}, + } + + def __init__(self, **kwargs): + super(WindowsConfiguration, self).__init__(**kwargs) + self.provision_vm_agent = kwargs.get('provision_vm_agent', None) + self.enable_automatic_updates = kwargs.get('enable_automatic_updates', None) + self.time_zone = kwargs.get('time_zone', None) + self.additional_unattend_content = kwargs.get('additional_unattend_content', None) + self.win_rm = kwargs.get('win_rm', None) + + +class WinRMConfiguration(Model): + """Describes Windows Remote Management configuration of the VM. + + :param listeners: The list of Windows Remote Management listeners + :type listeners: + list[~azure.mgmt.compute.v2016_04_30_preview.models.WinRMListener] + """ + + _attribute_map = { + 'listeners': {'key': 'listeners', 'type': '[WinRMListener]'}, + } + + def __init__(self, **kwargs): + super(WinRMConfiguration, self).__init__(**kwargs) + self.listeners = kwargs.get('listeners', None) + + +class WinRMListener(Model): + """Describes Protocol and thumbprint of Windows Remote Management listener. + + :param protocol: Specifies the protocol of listener.

    Possible + values are:
    **http**

    **https**. Possible values include: + 'Http', 'Https' + :type protocol: str or + ~azure.mgmt.compute.v2016_04_30_preview.models.ProtocolTypes + :param certificate_url: This is the URL of a certificate that has been + uploaded to Key Vault as a secret. For adding a secret to the Key Vault, + see [Add a key or secret to the key + vault](https://docs.microsoft.com/azure/key-vault/key-vault-get-started/#add). + In this case, your certificate needs to be It is the Base64 encoding of + the following JSON Object which is encoded in UTF-8:

    {
    + "data":"",
    "dataType":"pfx",
    + "password":""
    } + :type certificate_url: str + """ + + _attribute_map = { + 'protocol': {'key': 'protocol', 'type': 'ProtocolTypes'}, + 'certificate_url': {'key': 'certificateUrl', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(WinRMListener, self).__init__(**kwargs) + self.protocol = kwargs.get('protocol', None) + self.certificate_url = kwargs.get('certificate_url', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/_models_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/_models_py3.py new file mode 100644 index 000000000000..3d643d341d01 --- /dev/null +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/_models_py3.py @@ -0,0 +1,3939 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class AccessUri(Model): + """A disk access SAS uri. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar access_sas: A SAS uri for accessing a disk. + :vartype access_sas: str + """ + + _validation = { + 'access_sas': {'readonly': True}, + } + + _attribute_map = { + 'access_sas': {'key': 'properties.output.accessSAS', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(AccessUri, self).__init__(**kwargs) + self.access_sas = None + + +class AdditionalUnattendContent(Model): + """Specifies additional XML formatted information that can be included in the + Unattend.xml file, which is used by Windows Setup. Contents are defined by + setting name, component name, and the pass in which the content is applied. + + :param pass_name: The pass name. Currently, the only allowable value is + OobeSystem. Possible values include: 'OobeSystem' + :type pass_name: str or + ~azure.mgmt.compute.v2016_04_30_preview.models.PassNames + :param component_name: The component name. Currently, the only allowable + value is Microsoft-Windows-Shell-Setup. Possible values include: + 'Microsoft-Windows-Shell-Setup' + :type component_name: str or + ~azure.mgmt.compute.v2016_04_30_preview.models.ComponentNames + :param setting_name: Specifies the name of the setting to which the + content applies. Possible values are: FirstLogonCommands and AutoLogon. + Possible values include: 'AutoLogon', 'FirstLogonCommands' + :type setting_name: str or + ~azure.mgmt.compute.v2016_04_30_preview.models.SettingNames + :param content: Specifies the XML formatted content that is added to the + unattend.xml file for the specified path and component. The XML must be + less than 4KB and must include the root element for the setting or feature + that is being inserted. + :type content: str + """ + + _attribute_map = { + 'pass_name': {'key': 'passName', 'type': 'PassNames'}, + 'component_name': {'key': 'componentName', 'type': 'ComponentNames'}, + 'setting_name': {'key': 'settingName', 'type': 'SettingNames'}, + 'content': {'key': 'content', 'type': 'str'}, + } + + def __init__(self, *, pass_name=None, component_name=None, setting_name=None, content: str=None, **kwargs) -> None: + super(AdditionalUnattendContent, self).__init__(**kwargs) + self.pass_name = pass_name + self.component_name = component_name + self.setting_name = setting_name + self.content = content + + +class ApiEntityReference(Model): + """The API entity reference. + + :param id: The ARM resource id in the form of + /subscriptions/{SubscriptionId}/resourceGroups/{ResourceGroupName}/... + :type id: str + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + } + + def __init__(self, *, id: str=None, **kwargs) -> None: + super(ApiEntityReference, self).__init__(**kwargs) + self.id = id + + +class ApiError(Model): + """Api error. + + :param details: The Api error details + :type details: + list[~azure.mgmt.compute.v2016_04_30_preview.models.ApiErrorBase] + :param innererror: The Api inner error + :type innererror: + ~azure.mgmt.compute.v2016_04_30_preview.models.InnerError + :param code: The error code. + :type code: str + :param target: The target of the particular error. + :type target: str + :param message: The error message. + :type message: str + """ + + _attribute_map = { + 'details': {'key': 'details', 'type': '[ApiErrorBase]'}, + 'innererror': {'key': 'innererror', 'type': 'InnerError'}, + 'code': {'key': 'code', 'type': 'str'}, + 'target': {'key': 'target', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + } + + def __init__(self, *, details=None, innererror=None, code: str=None, target: str=None, message: str=None, **kwargs) -> None: + super(ApiError, self).__init__(**kwargs) + self.details = details + self.innererror = innererror + self.code = code + self.target = target + self.message = message + + +class ApiErrorBase(Model): + """Api error base. + + :param code: The error code. + :type code: str + :param target: The target of the particular error. + :type target: str + :param message: The error message. + :type message: str + """ + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + 'target': {'key': 'target', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + } + + def __init__(self, *, code: str=None, target: str=None, message: str=None, **kwargs) -> None: + super(ApiErrorBase, self).__init__(**kwargs) + self.code = code + self.target = target + self.message = message + + +class Resource(Model): + """The Resource model definition. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource Id + :vartype id: str + :ivar name: Resource name + :vartype name: str + :ivar type: Resource type + :vartype type: str + :param location: Required. Resource location + :type location: str + :param tags: Resource tags + :type tags: dict[str, str] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__(self, *, location: str, tags=None, **kwargs) -> None: + super(Resource, self).__init__(**kwargs) + self.id = None + self.name = None + self.type = None + self.location = location + self.tags = tags + + +class AvailabilitySet(Resource): + """Specifies information about the availability set that the virtual machine + should be assigned to. Virtual machines specified in the same availability + set are allocated to different nodes to maximize availability. For more + information about availability sets, see [Manage the availability of + virtual + machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-manage-availability?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). +

    For more information on Azure planned maintenance, see [Planned + maintenance for virtual machines in + Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-planned-maintenance?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json) +

    Currently, a VM can only be added to availability set at creation + time. An existing VM cannot be added to an availability set. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource Id + :vartype id: str + :ivar name: Resource name + :vartype name: str + :ivar type: Resource type + :vartype type: str + :param location: Required. Resource location + :type location: str + :param tags: Resource tags + :type tags: dict[str, str] + :param platform_update_domain_count: Update Domain count. + :type platform_update_domain_count: int + :param platform_fault_domain_count: Fault Domain count. + :type platform_fault_domain_count: int + :param virtual_machines: A list of references to all virtual machines in + the availability set. + :type virtual_machines: + list[~azure.mgmt.compute.v2016_04_30_preview.models.SubResource] + :ivar statuses: The resource status information. + :vartype statuses: + list[~azure.mgmt.compute.v2016_04_30_preview.models.InstanceViewStatus] + :param managed: If the availability set supports managed disks. + :type managed: bool + :param sku: Sku of the availability set + :type sku: ~azure.mgmt.compute.v2016_04_30_preview.models.Sku + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + 'statuses': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'platform_update_domain_count': {'key': 'properties.platformUpdateDomainCount', 'type': 'int'}, + 'platform_fault_domain_count': {'key': 'properties.platformFaultDomainCount', 'type': 'int'}, + 'virtual_machines': {'key': 'properties.virtualMachines', 'type': '[SubResource]'}, + 'statuses': {'key': 'properties.statuses', 'type': '[InstanceViewStatus]'}, + 'managed': {'key': 'properties.managed', 'type': 'bool'}, + 'sku': {'key': 'sku', 'type': 'Sku'}, + } + + def __init__(self, *, location: str, tags=None, platform_update_domain_count: int=None, platform_fault_domain_count: int=None, virtual_machines=None, managed: bool=None, sku=None, **kwargs) -> None: + super(AvailabilitySet, self).__init__(location=location, tags=tags, **kwargs) + self.platform_update_domain_count = platform_update_domain_count + self.platform_fault_domain_count = platform_fault_domain_count + self.virtual_machines = virtual_machines + self.statuses = None + self.managed = managed + self.sku = sku + + +class BootDiagnostics(Model): + """Boot Diagnostics is a debugging feature which allows you to view Console + Output and Screenshot to diagnose VM status.

    You can easily view + the output of your console log.

    Azure also enables you to see a + screenshot of the VM from the hypervisor. + + :param enabled: Whether boot diagnostics should be enabled on the Virtual + Machine. + :type enabled: bool + :param storage_uri: Uri of the storage account to use for placing the + console output and screenshot. + :type storage_uri: str + """ + + _attribute_map = { + 'enabled': {'key': 'enabled', 'type': 'bool'}, + 'storage_uri': {'key': 'storageUri', 'type': 'str'}, + } + + def __init__(self, *, enabled: bool=None, storage_uri: str=None, **kwargs) -> None: + super(BootDiagnostics, self).__init__(**kwargs) + self.enabled = enabled + self.storage_uri = storage_uri + + +class BootDiagnosticsInstanceView(Model): + """The instance view of a virtual machine boot diagnostics. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar console_screenshot_blob_uri: The console screenshot blob URI. + :vartype console_screenshot_blob_uri: str + :ivar serial_console_log_blob_uri: The Linux serial console log blob Uri. + :vartype serial_console_log_blob_uri: str + """ + + _validation = { + 'console_screenshot_blob_uri': {'readonly': True}, + 'serial_console_log_blob_uri': {'readonly': True}, + } + + _attribute_map = { + 'console_screenshot_blob_uri': {'key': 'consoleScreenshotBlobUri', 'type': 'str'}, + 'serial_console_log_blob_uri': {'key': 'serialConsoleLogBlobUri', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(BootDiagnosticsInstanceView, self).__init__(**kwargs) + self.console_screenshot_blob_uri = None + self.serial_console_log_blob_uri = None + + +class CloudError(Model): + """CloudError. + """ + + _attribute_map = { + } + + +class ComputeLongRunningOperationProperties(Model): + """Compute-specific operation properties, including output. + + :param output: Operation output data (raw JSON) + :type output: object + """ + + _attribute_map = { + 'output': {'key': 'output', 'type': 'object'}, + } + + def __init__(self, *, output=None, **kwargs) -> None: + super(ComputeLongRunningOperationProperties, self).__init__(**kwargs) + self.output = output + + +class CreationData(Model): + """Data used when creating a disk. + + All required parameters must be populated in order to send to Azure. + + :param create_option: Required. This enumerates the possible sources of a + disk's creation. Possible values include: 'Empty', 'Attach', 'FromImage', + 'Import', 'Copy', 'Restore' + :type create_option: str or + ~azure.mgmt.compute.v2016_04_30_preview.models.DiskCreateOption + :param storage_account_id: If createOption is Import, the Azure Resource + Manager identifier of the storage account containing the blob to import as + a disk. Required only if the blob is in a different subscription + :type storage_account_id: str + :param image_reference: Disk source information. + :type image_reference: + ~azure.mgmt.compute.v2016_04_30_preview.models.ImageDiskReference + :param source_uri: If createOption is Import, this is a SAS URI to a blob + to be imported into a managed disk. If createOption is Copy, this is a + relative Uri containing the id of the source snapshot to be copied into a + managed disk. + :type source_uri: str + :param source_resource_id: If createOption is Copy, this is the ARM id of + the source snapshot or disk. If createOption is Restore, this is the + ARM-like id of the source disk restore point. + :type source_resource_id: str + """ + + _validation = { + 'create_option': {'required': True}, + } + + _attribute_map = { + 'create_option': {'key': 'createOption', 'type': 'DiskCreateOption'}, + 'storage_account_id': {'key': 'storageAccountId', 'type': 'str'}, + 'image_reference': {'key': 'imageReference', 'type': 'ImageDiskReference'}, + 'source_uri': {'key': 'sourceUri', 'type': 'str'}, + 'source_resource_id': {'key': 'sourceResourceId', 'type': 'str'}, + } + + def __init__(self, *, create_option, storage_account_id: str=None, image_reference=None, source_uri: str=None, source_resource_id: str=None, **kwargs) -> None: + super(CreationData, self).__init__(**kwargs) + self.create_option = create_option + self.storage_account_id = storage_account_id + self.image_reference = image_reference + self.source_uri = source_uri + self.source_resource_id = source_resource_id + + +class DataDisk(Model): + """Describes a data disk. + + All required parameters must be populated in order to send to Azure. + + :param lun: Required. Specifies the logical unit number of the data disk. + This value is used to identify data disks within the VM and therefore must + be unique for each data disk attached to a VM. + :type lun: int + :param name: The disk name. + :type name: str + :param vhd: The virtual hard disk. + :type vhd: ~azure.mgmt.compute.v2016_04_30_preview.models.VirtualHardDisk + :param image: The source user image virtual hard disk. The virtual hard + disk will be copied before being attached to the virtual machine. If + SourceImage is provided, the destination virtual hard drive must not + exist. + :type image: + ~azure.mgmt.compute.v2016_04_30_preview.models.VirtualHardDisk + :param caching: Specifies the caching requirements.

    Possible + values are:

    **None**

    **ReadOnly**

    **ReadWrite** +

    Default: **None for Standard storage. ReadOnly for Premium + storage**. Possible values include: 'None', 'ReadOnly', 'ReadWrite' + :type caching: str or + ~azure.mgmt.compute.v2016_04_30_preview.models.CachingTypes + :param create_option: Required. Specifies how the virtual machine should + be created.

    Possible values are:

    **Attach** \\u2013 This + value is used when you are using a specialized disk to create the virtual + machine.

    **FromImage** \\u2013 This value is used when you are + using an image to create the virtual machine. If you are using a platform + image, you also use the imageReference element described above. If you are + using a marketplace image, you also use the plan element previously + described. Possible values include: 'FromImage', 'Empty', 'Attach' + :type create_option: str or + ~azure.mgmt.compute.v2016_04_30_preview.models.DiskCreateOptionTypes + :param disk_size_gb: Specifies the size of an empty data disk in + gigabytes. This element can be used to overwrite the size of the disk in a + virtual machine image.

    This value cannot be larger than 1023 GB + :type disk_size_gb: int + :param managed_disk: The managed disk parameters. + :type managed_disk: + ~azure.mgmt.compute.v2016_04_30_preview.models.ManagedDiskParameters + """ + + _validation = { + 'lun': {'required': True}, + 'create_option': {'required': True}, + } + + _attribute_map = { + 'lun': {'key': 'lun', 'type': 'int'}, + 'name': {'key': 'name', 'type': 'str'}, + 'vhd': {'key': 'vhd', 'type': 'VirtualHardDisk'}, + 'image': {'key': 'image', 'type': 'VirtualHardDisk'}, + 'caching': {'key': 'caching', 'type': 'CachingTypes'}, + 'create_option': {'key': 'createOption', 'type': 'DiskCreateOptionTypes'}, + 'disk_size_gb': {'key': 'diskSizeGB', 'type': 'int'}, + 'managed_disk': {'key': 'managedDisk', 'type': 'ManagedDiskParameters'}, + } + + def __init__(self, *, lun: int, create_option, name: str=None, vhd=None, image=None, caching=None, disk_size_gb: int=None, managed_disk=None, **kwargs) -> None: + super(DataDisk, self).__init__(**kwargs) + self.lun = lun + self.name = name + self.vhd = vhd + self.image = image + self.caching = caching + self.create_option = create_option + self.disk_size_gb = disk_size_gb + self.managed_disk = managed_disk + + +class DataDiskImage(Model): + """Contains the data disk images information. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar lun: Specifies the logical unit number of the data disk. This value + is used to identify data disks within the VM and therefore must be unique + for each data disk attached to a VM. + :vartype lun: int + """ + + _validation = { + 'lun': {'readonly': True}, + } + + _attribute_map = { + 'lun': {'key': 'lun', 'type': 'int'}, + } + + def __init__(self, **kwargs) -> None: + super(DataDiskImage, self).__init__(**kwargs) + self.lun = None + + +class DiagnosticsProfile(Model): + """Specifies the boot diagnostic settings state.

    Minimum api-version: + 2015-06-15. + + :param boot_diagnostics: Boot Diagnostics is a debugging feature which + allows you to view Console Output and Screenshot to diagnose VM status. +

    You can easily view the output of your console log.

    + Azure also enables you to see a screenshot of the VM from the hypervisor. + :type boot_diagnostics: + ~azure.mgmt.compute.v2016_04_30_preview.models.BootDiagnostics + """ + + _attribute_map = { + 'boot_diagnostics': {'key': 'bootDiagnostics', 'type': 'BootDiagnostics'}, + } + + def __init__(self, *, boot_diagnostics=None, **kwargs) -> None: + super(DiagnosticsProfile, self).__init__(**kwargs) + self.boot_diagnostics = boot_diagnostics + + +class Disk(Resource): + """Disk resource. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource Id + :vartype id: str + :ivar name: Resource name + :vartype name: str + :ivar type: Resource type + :vartype type: str + :param location: Required. Resource location + :type location: str + :param tags: Resource tags + :type tags: dict[str, str] + :param account_type: the storage account type of the disk. Possible values + include: 'Standard_LRS', 'Premium_LRS' + :type account_type: str or + ~azure.mgmt.compute.v2016_04_30_preview.models.StorageAccountTypes + :ivar time_created: The time when the disk was created. + :vartype time_created: datetime + :param os_type: The Operating System type. Possible values include: + 'Windows', 'Linux' + :type os_type: str or + ~azure.mgmt.compute.v2016_04_30_preview.models.OperatingSystemTypes + :param creation_data: Required. Disk source information. CreationData + information cannot be changed after the disk has been created. + :type creation_data: + ~azure.mgmt.compute.v2016_04_30_preview.models.CreationData + :param disk_size_gb: If creationData.createOption is Empty, this field is + mandatory and it indicates the size of the VHD to create. If this field is + present for updates or creation with other options, it indicates a resize. + Resizes are only allowed if the disk is not attached to a running VM, and + can only increase the disk's size. + :type disk_size_gb: int + :param encryption_settings: Encryption settings for disk or snapshot + :type encryption_settings: + ~azure.mgmt.compute.v2016_04_30_preview.models.EncryptionSettings + :ivar owner_id: A relative URI containing the VM id that has the disk + attached. + :vartype owner_id: str + :ivar provisioning_state: The disk provisioning state. + :vartype provisioning_state: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + 'time_created': {'readonly': True}, + 'creation_data': {'required': True}, + 'owner_id': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'account_type': {'key': 'properties.accountType', 'type': 'StorageAccountTypes'}, + 'time_created': {'key': 'properties.timeCreated', 'type': 'iso-8601'}, + 'os_type': {'key': 'properties.osType', 'type': 'OperatingSystemTypes'}, + 'creation_data': {'key': 'properties.creationData', 'type': 'CreationData'}, + 'disk_size_gb': {'key': 'properties.diskSizeGB', 'type': 'int'}, + 'encryption_settings': {'key': 'properties.encryptionSettings', 'type': 'EncryptionSettings'}, + 'owner_id': {'key': 'properties.ownerId', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + } + + def __init__(self, *, location: str, creation_data, tags=None, account_type=None, os_type=None, disk_size_gb: int=None, encryption_settings=None, **kwargs) -> None: + super(Disk, self).__init__(location=location, tags=tags, **kwargs) + self.account_type = account_type + self.time_created = None + self.os_type = os_type + self.creation_data = creation_data + self.disk_size_gb = disk_size_gb + self.encryption_settings = encryption_settings + self.owner_id = None + self.provisioning_state = None + + +class DiskEncryptionSettings(Model): + """Describes a Encryption Settings for a Disk. + + :param disk_encryption_key: Specifies the location of the disk encryption + key, which is a Key Vault Secret. + :type disk_encryption_key: + ~azure.mgmt.compute.v2016_04_30_preview.models.KeyVaultSecretReference + :param key_encryption_key: Specifies the location of the key encryption + key in Key Vault. + :type key_encryption_key: + ~azure.mgmt.compute.v2016_04_30_preview.models.KeyVaultKeyReference + :param enabled: Specifies whether disk encryption should be enabled on the + virtual machine. + :type enabled: bool + """ + + _attribute_map = { + 'disk_encryption_key': {'key': 'diskEncryptionKey', 'type': 'KeyVaultSecretReference'}, + 'key_encryption_key': {'key': 'keyEncryptionKey', 'type': 'KeyVaultKeyReference'}, + 'enabled': {'key': 'enabled', 'type': 'bool'}, + } + + def __init__(self, *, disk_encryption_key=None, key_encryption_key=None, enabled: bool=None, **kwargs) -> None: + super(DiskEncryptionSettings, self).__init__(**kwargs) + self.disk_encryption_key = disk_encryption_key + self.key_encryption_key = key_encryption_key + self.enabled = enabled + + +class DiskInstanceView(Model): + """The instance view of the disk. + + :param name: The disk name. + :type name: str + :param statuses: The resource status information. + :type statuses: + list[~azure.mgmt.compute.v2016_04_30_preview.models.InstanceViewStatus] + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'statuses': {'key': 'statuses', 'type': '[InstanceViewStatus]'}, + } + + def __init__(self, *, name: str=None, statuses=None, **kwargs) -> None: + super(DiskInstanceView, self).__init__(**kwargs) + self.name = name + self.statuses = statuses + + +class ResourceUpdate(Model): + """The Resource model definition. + + :param tags: Resource tags + :type tags: dict[str, str] + """ + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__(self, *, tags=None, **kwargs) -> None: + super(ResourceUpdate, self).__init__(**kwargs) + self.tags = tags + + +class DiskUpdate(ResourceUpdate): + """Disk update resource. + + :param tags: Resource tags + :type tags: dict[str, str] + :param account_type: the storage account type of the disk. Possible values + include: 'Standard_LRS', 'Premium_LRS' + :type account_type: str or + ~azure.mgmt.compute.v2016_04_30_preview.models.StorageAccountTypes + :param os_type: the Operating System type. Possible values include: + 'Windows', 'Linux' + :type os_type: str or + ~azure.mgmt.compute.v2016_04_30_preview.models.OperatingSystemTypes + :param creation_data: disk source information. CreationData information + cannot be changed after the disk has been created. + :type creation_data: + ~azure.mgmt.compute.v2016_04_30_preview.models.CreationData + :param disk_size_gb: If creationData.createOption is Empty, this field is + mandatory and it indicates the size of the VHD to create. If this field is + present for updates or creation with other options, it indicates a resize. + Resizes are only allowed if the disk is not attached to a running VM, and + can only increase the disk's size. + :type disk_size_gb: int + :param encryption_settings: Encryption settings for disk or snapshot + :type encryption_settings: + ~azure.mgmt.compute.v2016_04_30_preview.models.EncryptionSettings + """ + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + 'account_type': {'key': 'properties.accountType', 'type': 'StorageAccountTypes'}, + 'os_type': {'key': 'properties.osType', 'type': 'OperatingSystemTypes'}, + 'creation_data': {'key': 'properties.creationData', 'type': 'CreationData'}, + 'disk_size_gb': {'key': 'properties.diskSizeGB', 'type': 'int'}, + 'encryption_settings': {'key': 'properties.encryptionSettings', 'type': 'EncryptionSettings'}, + } + + def __init__(self, *, tags=None, account_type=None, os_type=None, creation_data=None, disk_size_gb: int=None, encryption_settings=None, **kwargs) -> None: + super(DiskUpdate, self).__init__(tags=tags, **kwargs) + self.account_type = account_type + self.os_type = os_type + self.creation_data = creation_data + self.disk_size_gb = disk_size_gb + self.encryption_settings = encryption_settings + + +class EncryptionSettings(Model): + """Encryption settings for disk or snapshot. + + :param enabled: Set this flag to true and provide DiskEncryptionKey and + optional KeyEncryptionKey to enable encryption. Set this flag to false and + remove DiskEncryptionKey and KeyEncryptionKey to disable encryption. If + EncryptionSettings is null in the request object, the existing settings + remain unchanged. + :type enabled: bool + :param disk_encryption_key: Key Vault Secret Url and vault id of the disk + encryption key + :type disk_encryption_key: + ~azure.mgmt.compute.v2016_04_30_preview.models.KeyVaultAndSecretReference + :param key_encryption_key: Key Vault Key Url and vault id of the key + encryption key + :type key_encryption_key: + ~azure.mgmt.compute.v2016_04_30_preview.models.KeyVaultAndKeyReference + """ + + _attribute_map = { + 'enabled': {'key': 'enabled', 'type': 'bool'}, + 'disk_encryption_key': {'key': 'diskEncryptionKey', 'type': 'KeyVaultAndSecretReference'}, + 'key_encryption_key': {'key': 'keyEncryptionKey', 'type': 'KeyVaultAndKeyReference'}, + } + + def __init__(self, *, enabled: bool=None, disk_encryption_key=None, key_encryption_key=None, **kwargs) -> None: + super(EncryptionSettings, self).__init__(**kwargs) + self.enabled = enabled + self.disk_encryption_key = disk_encryption_key + self.key_encryption_key = key_encryption_key + + +class GrantAccessData(Model): + """Data used for requesting a SAS. + + All required parameters must be populated in order to send to Azure. + + :param access: Required. Possible values include: 'None', 'Read' + :type access: str or + ~azure.mgmt.compute.v2016_04_30_preview.models.AccessLevel + :param duration_in_seconds: Required. Time duration in seconds until the + SAS access expires. + :type duration_in_seconds: int + """ + + _validation = { + 'access': {'required': True}, + 'duration_in_seconds': {'required': True}, + } + + _attribute_map = { + 'access': {'key': 'access', 'type': 'AccessLevel'}, + 'duration_in_seconds': {'key': 'durationInSeconds', 'type': 'int'}, + } + + def __init__(self, *, access, duration_in_seconds: int, **kwargs) -> None: + super(GrantAccessData, self).__init__(**kwargs) + self.access = access + self.duration_in_seconds = duration_in_seconds + + +class HardwareProfile(Model): + """Specifies the hardware settings for the virtual machine. + + :param vm_size: Specifies the size of the virtual machine. For more + information about virtual machine sizes, see [Sizes for virtual + machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-sizes?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). +

    The available VM sizes depend on region and availability set. For + a list of available sizes use these APIs:

    [List all available + virtual machine sizes in an availability + set](virtualmachines-list-sizes-availability-set.md)

    [List all + available virtual machine sizes in a + region](virtualmachines-list-sizes-region.md)

    [List all available + virtual machine sizes for + resizing](virtualmachines-list-sizes-for-resizing.md). Possible values + include: 'Basic_A0', 'Basic_A1', 'Basic_A2', 'Basic_A3', 'Basic_A4', + 'Standard_A0', 'Standard_A1', 'Standard_A2', 'Standard_A3', 'Standard_A4', + 'Standard_A5', 'Standard_A6', 'Standard_A7', 'Standard_A8', 'Standard_A9', + 'Standard_A10', 'Standard_A11', 'Standard_D1', 'Standard_D2', + 'Standard_D3', 'Standard_D4', 'Standard_D11', 'Standard_D12', + 'Standard_D13', 'Standard_D14', 'Standard_D1_v2', 'Standard_D2_v2', + 'Standard_D3_v2', 'Standard_D4_v2', 'Standard_D5_v2', 'Standard_D11_v2', + 'Standard_D12_v2', 'Standard_D13_v2', 'Standard_D14_v2', + 'Standard_D15_v2', 'Standard_DS1', 'Standard_DS2', 'Standard_DS3', + 'Standard_DS4', 'Standard_DS11', 'Standard_DS12', 'Standard_DS13', + 'Standard_DS14', 'Standard_DS1_v2', 'Standard_DS2_v2', 'Standard_DS3_v2', + 'Standard_DS4_v2', 'Standard_DS5_v2', 'Standard_DS11_v2', + 'Standard_DS12_v2', 'Standard_DS13_v2', 'Standard_DS14_v2', + 'Standard_DS15_v2', 'Standard_G1', 'Standard_G2', 'Standard_G3', + 'Standard_G4', 'Standard_G5', 'Standard_GS1', 'Standard_GS2', + 'Standard_GS3', 'Standard_GS4', 'Standard_GS5' + :type vm_size: str or + ~azure.mgmt.compute.v2016_04_30_preview.models.VirtualMachineSizeTypes + """ + + _attribute_map = { + 'vm_size': {'key': 'vmSize', 'type': 'str'}, + } + + def __init__(self, *, vm_size=None, **kwargs) -> None: + super(HardwareProfile, self).__init__(**kwargs) + self.vm_size = vm_size + + +class Image(Resource): + """The source user image virtual hard disk. The virtual hard disk will be + copied before being attached to the virtual machine. If SourceImage is + provided, the destination virtual hard drive must not exist. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource Id + :vartype id: str + :ivar name: Resource name + :vartype name: str + :ivar type: Resource type + :vartype type: str + :param location: Required. Resource location + :type location: str + :param tags: Resource tags + :type tags: dict[str, str] + :param source_virtual_machine: The source virtual machine from which Image + is created. + :type source_virtual_machine: + ~azure.mgmt.compute.v2016_04_30_preview.models.SubResource + :param storage_profile: Specifies the storage settings for the virtual + machine disks. + :type storage_profile: + ~azure.mgmt.compute.v2016_04_30_preview.models.ImageStorageProfile + :ivar provisioning_state: The provisioning state. + :vartype provisioning_state: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'source_virtual_machine': {'key': 'properties.sourceVirtualMachine', 'type': 'SubResource'}, + 'storage_profile': {'key': 'properties.storageProfile', 'type': 'ImageStorageProfile'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + } + + def __init__(self, *, location: str, tags=None, source_virtual_machine=None, storage_profile=None, **kwargs) -> None: + super(Image, self).__init__(location=location, tags=tags, **kwargs) + self.source_virtual_machine = source_virtual_machine + self.storage_profile = storage_profile + self.provisioning_state = None + + +class ImageDataDisk(Model): + """Describes a data disk. + + All required parameters must be populated in order to send to Azure. + + :param lun: Required. Specifies the logical unit number of the data disk. + This value is used to identify data disks within the VM and therefore must + be unique for each data disk attached to a VM. + :type lun: int + :param snapshot: The snapshot. + :type snapshot: ~azure.mgmt.compute.v2016_04_30_preview.models.SubResource + :param managed_disk: The managedDisk. + :type managed_disk: + ~azure.mgmt.compute.v2016_04_30_preview.models.SubResource + :param blob_uri: The Virtual Hard Disk. + :type blob_uri: str + :param caching: Specifies the caching requirements.

    Possible + values are:

    **None**

    **ReadOnly**

    **ReadWrite** +

    Default: **None for Standard storage. ReadOnly for Premium + storage**. Possible values include: 'None', 'ReadOnly', 'ReadWrite' + :type caching: str or + ~azure.mgmt.compute.v2016_04_30_preview.models.CachingTypes + :param disk_size_gb: Specifies the size of empty data disks in gigabytes. + This element can be used to overwrite the name of the disk in a virtual + machine image.

    This value cannot be larger than 1023 GB + :type disk_size_gb: int + """ + + _validation = { + 'lun': {'required': True}, + } + + _attribute_map = { + 'lun': {'key': 'lun', 'type': 'int'}, + 'snapshot': {'key': 'snapshot', 'type': 'SubResource'}, + 'managed_disk': {'key': 'managedDisk', 'type': 'SubResource'}, + 'blob_uri': {'key': 'blobUri', 'type': 'str'}, + 'caching': {'key': 'caching', 'type': 'CachingTypes'}, + 'disk_size_gb': {'key': 'diskSizeGB', 'type': 'int'}, + } + + def __init__(self, *, lun: int, snapshot=None, managed_disk=None, blob_uri: str=None, caching=None, disk_size_gb: int=None, **kwargs) -> None: + super(ImageDataDisk, self).__init__(**kwargs) + self.lun = lun + self.snapshot = snapshot + self.managed_disk = managed_disk + self.blob_uri = blob_uri + self.caching = caching + self.disk_size_gb = disk_size_gb + + +class ImageDiskReference(Model): + """The source image used for creating the disk. + + All required parameters must be populated in order to send to Azure. + + :param id: Required. A relative uri containing either a Platform Image + Repository or user image reference. + :type id: str + :param lun: If the disk is created from an image's data disk, this is an + index that indicates which of the data disks in the image to use. For OS + disks, this field is null. + :type lun: int + """ + + _validation = { + 'id': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'lun': {'key': 'lun', 'type': 'int'}, + } + + def __init__(self, *, id: str, lun: int=None, **kwargs) -> None: + super(ImageDiskReference, self).__init__(**kwargs) + self.id = id + self.lun = lun + + +class ImageOSDisk(Model): + """Describes an Operating System disk. + + All required parameters must be populated in order to send to Azure. + + :param os_type: Required. This property allows you to specify the type of + the OS that is included in the disk if creating a VM from a custom image. +

    Possible values are:

    **Windows**

    **Linux**. + Possible values include: 'Windows', 'Linux' + :type os_type: str or + ~azure.mgmt.compute.v2016_04_30_preview.models.OperatingSystemTypes + :param os_state: Required. The OS State. Possible values include: + 'Generalized', 'Specialized' + :type os_state: str or + ~azure.mgmt.compute.v2016_04_30_preview.models.OperatingSystemStateTypes + :param snapshot: The snapshot. + :type snapshot: ~azure.mgmt.compute.v2016_04_30_preview.models.SubResource + :param managed_disk: The managedDisk. + :type managed_disk: + ~azure.mgmt.compute.v2016_04_30_preview.models.SubResource + :param blob_uri: The Virtual Hard Disk. + :type blob_uri: str + :param caching: Specifies the caching requirements.

    Possible + values are:

    **None**

    **ReadOnly**

    **ReadWrite** +

    Default: **None for Standard storage. ReadOnly for Premium + storage**. Possible values include: 'None', 'ReadOnly', 'ReadWrite' + :type caching: str or + ~azure.mgmt.compute.v2016_04_30_preview.models.CachingTypes + :param disk_size_gb: Specifies the size of empty data disks in gigabytes. + This element can be used to overwrite the name of the disk in a virtual + machine image.

    This value cannot be larger than 1023 GB + :type disk_size_gb: int + """ + + _validation = { + 'os_type': {'required': True}, + 'os_state': {'required': True}, + } + + _attribute_map = { + 'os_type': {'key': 'osType', 'type': 'OperatingSystemTypes'}, + 'os_state': {'key': 'osState', 'type': 'OperatingSystemStateTypes'}, + 'snapshot': {'key': 'snapshot', 'type': 'SubResource'}, + 'managed_disk': {'key': 'managedDisk', 'type': 'SubResource'}, + 'blob_uri': {'key': 'blobUri', 'type': 'str'}, + 'caching': {'key': 'caching', 'type': 'CachingTypes'}, + 'disk_size_gb': {'key': 'diskSizeGB', 'type': 'int'}, + } + + def __init__(self, *, os_type, os_state, snapshot=None, managed_disk=None, blob_uri: str=None, caching=None, disk_size_gb: int=None, **kwargs) -> None: + super(ImageOSDisk, self).__init__(**kwargs) + self.os_type = os_type + self.os_state = os_state + self.snapshot = snapshot + self.managed_disk = managed_disk + self.blob_uri = blob_uri + self.caching = caching + self.disk_size_gb = disk_size_gb + + +class SubResource(Model): + """SubResource. + + :param id: Resource Id + :type id: str + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + } + + def __init__(self, *, id: str=None, **kwargs) -> None: + super(SubResource, self).__init__(**kwargs) + self.id = id + + +class ImageReference(SubResource): + """Specifies information about the image to use. You can specify information + about platform images, marketplace images, or virtual machine images. This + element is required when you want to use a platform image, marketplace + image, or virtual machine image, but is not used in other creation + operations. + + :param id: Resource Id + :type id: str + :param publisher: The image publisher. + :type publisher: str + :param offer: Specifies the offer of the platform image or marketplace + image used to create the virtual machine. + :type offer: str + :param sku: The image SKU. + :type sku: str + :param version: Specifies the version of the platform image or marketplace + image used to create the virtual machine. The allowed formats are + Major.Minor.Build or 'latest'. Major, Minor, and Build are decimal + numbers. Specify 'latest' to use the latest version of an image available + at deploy time. Even if you use 'latest', the VM image will not + automatically update after deploy time even if a new version becomes + available. + :type version: str + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'publisher': {'key': 'publisher', 'type': 'str'}, + 'offer': {'key': 'offer', 'type': 'str'}, + 'sku': {'key': 'sku', 'type': 'str'}, + 'version': {'key': 'version', 'type': 'str'}, + } + + def __init__(self, *, id: str=None, publisher: str=None, offer: str=None, sku: str=None, version: str=None, **kwargs) -> None: + super(ImageReference, self).__init__(id=id, **kwargs) + self.publisher = publisher + self.offer = offer + self.sku = sku + self.version = version + + +class ImageStorageProfile(Model): + """Describes a storage profile. + + All required parameters must be populated in order to send to Azure. + + :param os_disk: Required. Specifies information about the operating system + disk used by the virtual machine.

    For more information about + disks, see [About disks and VHDs for Azure virtual + machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-about-disks-vhds?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). + :type os_disk: ~azure.mgmt.compute.v2016_04_30_preview.models.ImageOSDisk + :param data_disks: Specifies the parameters that are used to add a data + disk to a virtual machine.

    For more information about disks, see + [About disks and VHDs for Azure virtual + machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-about-disks-vhds?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). + :type data_disks: + list[~azure.mgmt.compute.v2016_04_30_preview.models.ImageDataDisk] + """ + + _validation = { + 'os_disk': {'required': True}, + } + + _attribute_map = { + 'os_disk': {'key': 'osDisk', 'type': 'ImageOSDisk'}, + 'data_disks': {'key': 'dataDisks', 'type': '[ImageDataDisk]'}, + } + + def __init__(self, *, os_disk, data_disks=None, **kwargs) -> None: + super(ImageStorageProfile, self).__init__(**kwargs) + self.os_disk = os_disk + self.data_disks = data_disks + + +class InnerError(Model): + """Inner error details. + + :param exceptiontype: The exception type. + :type exceptiontype: str + :param errordetail: The internal error message or exception dump. + :type errordetail: str + """ + + _attribute_map = { + 'exceptiontype': {'key': 'exceptiontype', 'type': 'str'}, + 'errordetail': {'key': 'errordetail', 'type': 'str'}, + } + + def __init__(self, *, exceptiontype: str=None, errordetail: str=None, **kwargs) -> None: + super(InnerError, self).__init__(**kwargs) + self.exceptiontype = exceptiontype + self.errordetail = errordetail + + +class InstanceViewStatus(Model): + """Instance view status. + + :param code: The status code. + :type code: str + :param level: The level code. Possible values include: 'Info', 'Warning', + 'Error' + :type level: str or + ~azure.mgmt.compute.v2016_04_30_preview.models.StatusLevelTypes + :param display_status: The short localizable label for the status. + :type display_status: str + :param message: The detailed status message, including for alerts and + error messages. + :type message: str + :param time: The time of the status. + :type time: datetime + """ + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + 'level': {'key': 'level', 'type': 'StatusLevelTypes'}, + 'display_status': {'key': 'displayStatus', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + 'time': {'key': 'time', 'type': 'iso-8601'}, + } + + def __init__(self, *, code: str=None, level=None, display_status: str=None, message: str=None, time=None, **kwargs) -> None: + super(InstanceViewStatus, self).__init__(**kwargs) + self.code = code + self.level = level + self.display_status = display_status + self.message = message + self.time = time + + +class KeyVaultAndKeyReference(Model): + """Key Vault Key Url and vault id of KeK, KeK is optional and when provided is + used to unwrap the encryptionKey. + + All required parameters must be populated in order to send to Azure. + + :param source_vault: Required. Resource id of the KeyVault containing the + key or secret + :type source_vault: + ~azure.mgmt.compute.v2016_04_30_preview.models.SourceVault + :param key_url: Required. Url pointing to a key or secret in KeyVault + :type key_url: str + """ + + _validation = { + 'source_vault': {'required': True}, + 'key_url': {'required': True}, + } + + _attribute_map = { + 'source_vault': {'key': 'sourceVault', 'type': 'SourceVault'}, + 'key_url': {'key': 'keyUrl', 'type': 'str'}, + } + + def __init__(self, *, source_vault, key_url: str, **kwargs) -> None: + super(KeyVaultAndKeyReference, self).__init__(**kwargs) + self.source_vault = source_vault + self.key_url = key_url + + +class KeyVaultAndSecretReference(Model): + """Key Vault Secret Url and vault id of the encryption key . + + All required parameters must be populated in order to send to Azure. + + :param source_vault: Required. Resource id of the KeyVault containing the + key or secret + :type source_vault: + ~azure.mgmt.compute.v2016_04_30_preview.models.SourceVault + :param secret_url: Required. Url pointing to a key or secret in KeyVault + :type secret_url: str + """ + + _validation = { + 'source_vault': {'required': True}, + 'secret_url': {'required': True}, + } + + _attribute_map = { + 'source_vault': {'key': 'sourceVault', 'type': 'SourceVault'}, + 'secret_url': {'key': 'secretUrl', 'type': 'str'}, + } + + def __init__(self, *, source_vault, secret_url: str, **kwargs) -> None: + super(KeyVaultAndSecretReference, self).__init__(**kwargs) + self.source_vault = source_vault + self.secret_url = secret_url + + +class KeyVaultKeyReference(Model): + """Describes a reference to Key Vault Key. + + All required parameters must be populated in order to send to Azure. + + :param key_url: Required. The URL referencing a key encryption key in Key + Vault. + :type key_url: str + :param source_vault: Required. The relative URL of the Key Vault + containing the key. + :type source_vault: + ~azure.mgmt.compute.v2016_04_30_preview.models.SubResource + """ + + _validation = { + 'key_url': {'required': True}, + 'source_vault': {'required': True}, + } + + _attribute_map = { + 'key_url': {'key': 'keyUrl', 'type': 'str'}, + 'source_vault': {'key': 'sourceVault', 'type': 'SubResource'}, + } + + def __init__(self, *, key_url: str, source_vault, **kwargs) -> None: + super(KeyVaultKeyReference, self).__init__(**kwargs) + self.key_url = key_url + self.source_vault = source_vault + + +class KeyVaultSecretReference(Model): + """Describes a reference to Key Vault Secret. + + All required parameters must be populated in order to send to Azure. + + :param secret_url: Required. The URL referencing a secret in a Key Vault. + :type secret_url: str + :param source_vault: Required. The relative URL of the Key Vault + containing the secret. + :type source_vault: + ~azure.mgmt.compute.v2016_04_30_preview.models.SubResource + """ + + _validation = { + 'secret_url': {'required': True}, + 'source_vault': {'required': True}, + } + + _attribute_map = { + 'secret_url': {'key': 'secretUrl', 'type': 'str'}, + 'source_vault': {'key': 'sourceVault', 'type': 'SubResource'}, + } + + def __init__(self, *, secret_url: str, source_vault, **kwargs) -> None: + super(KeyVaultSecretReference, self).__init__(**kwargs) + self.secret_url = secret_url + self.source_vault = source_vault + + +class LinuxConfiguration(Model): + """Specifies the Linux operating system settings on the virtual machine. +

    For a list of supported Linux distributions, see [Linux on + Azure-Endorsed + Distributions](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-endorsed-distros?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json) +

    For running non-endorsed distributions, see [Information for + Non-Endorsed + Distributions](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-create-upload-generic?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json). + + :param disable_password_authentication: Specifies whether password + authentication should be disabled. + :type disable_password_authentication: bool + :param ssh: Specifies the ssh key configuration for a Linux OS. + :type ssh: ~azure.mgmt.compute.v2016_04_30_preview.models.SshConfiguration + """ + + _attribute_map = { + 'disable_password_authentication': {'key': 'disablePasswordAuthentication', 'type': 'bool'}, + 'ssh': {'key': 'ssh', 'type': 'SshConfiguration'}, + } + + def __init__(self, *, disable_password_authentication: bool=None, ssh=None, **kwargs) -> None: + super(LinuxConfiguration, self).__init__(**kwargs) + self.disable_password_authentication = disable_password_authentication + self.ssh = ssh + + +class ManagedDiskParameters(SubResource): + """The parameters of a managed disk. + + :param id: Resource Id + :type id: str + :param storage_account_type: Specifies the storage account type for the + managed disk. Possible values are: Standard_LRS or Premium_LRS. Possible + values include: 'Standard_LRS', 'Premium_LRS' + :type storage_account_type: str or + ~azure.mgmt.compute.v2016_04_30_preview.models.StorageAccountTypes + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'storage_account_type': {'key': 'storageAccountType', 'type': 'StorageAccountTypes'}, + } + + def __init__(self, *, id: str=None, storage_account_type=None, **kwargs) -> None: + super(ManagedDiskParameters, self).__init__(id=id, **kwargs) + self.storage_account_type = storage_account_type + + +class NetworkInterfaceReference(SubResource): + """Describes a network interface reference. + + :param id: Resource Id + :type id: str + :param primary: Specifies the primary network interface in case the + virtual machine has more than 1 network interface. + :type primary: bool + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'primary': {'key': 'properties.primary', 'type': 'bool'}, + } + + def __init__(self, *, id: str=None, primary: bool=None, **kwargs) -> None: + super(NetworkInterfaceReference, self).__init__(id=id, **kwargs) + self.primary = primary + + +class NetworkProfile(Model): + """Specifies the network interfaces of the virtual machine. + + :param network_interfaces: Specifies the list of resource Ids for the + network interfaces associated with the virtual machine. + :type network_interfaces: + list[~azure.mgmt.compute.v2016_04_30_preview.models.NetworkInterfaceReference] + """ + + _attribute_map = { + 'network_interfaces': {'key': 'networkInterfaces', 'type': '[NetworkInterfaceReference]'}, + } + + def __init__(self, *, network_interfaces=None, **kwargs) -> None: + super(NetworkProfile, self).__init__(**kwargs) + self.network_interfaces = network_interfaces + + +class OperationStatusResponse(Model): + """Operation status response. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar name: Operation ID + :vartype name: str + :ivar status: Operation status + :vartype status: str + :ivar start_time: Start time of the operation + :vartype start_time: datetime + :ivar end_time: End time of the operation + :vartype end_time: datetime + :ivar error: Api error + :vartype error: ~azure.mgmt.compute.v2016_04_30_preview.models.ApiError + """ + + _validation = { + 'name': {'readonly': True}, + 'status': {'readonly': True}, + 'start_time': {'readonly': True}, + 'end_time': {'readonly': True}, + 'error': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'status': {'key': 'status', 'type': 'str'}, + 'start_time': {'key': 'startTime', 'type': 'iso-8601'}, + 'end_time': {'key': 'endTime', 'type': 'iso-8601'}, + 'error': {'key': 'error', 'type': 'ApiError'}, + } + + def __init__(self, **kwargs) -> None: + super(OperationStatusResponse, self).__init__(**kwargs) + self.name = None + self.status = None + self.start_time = None + self.end_time = None + self.error = None + + +class OSDisk(Model): + """Specifies information about the operating system disk used by the virtual + machine.

    For more information about disks, see [About disks and + VHDs for Azure virtual + machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-about-disks-vhds?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). + + All required parameters must be populated in order to send to Azure. + + :param os_type: This property allows you to specify the type of the OS + that is included in the disk if creating a VM from user-image or a + specialized VHD.

    Possible values are:

    **Windows** +

    **Linux**. Possible values include: 'Windows', 'Linux' + :type os_type: str or + ~azure.mgmt.compute.v2016_04_30_preview.models.OperatingSystemTypes + :param encryption_settings: Specifies the encryption settings for the OS + Disk.

    Minimum api-version: 2015-06-15 + :type encryption_settings: + ~azure.mgmt.compute.v2016_04_30_preview.models.DiskEncryptionSettings + :param name: The disk name. + :type name: str + :param vhd: The virtual hard disk. + :type vhd: ~azure.mgmt.compute.v2016_04_30_preview.models.VirtualHardDisk + :param image: The source user image virtual hard disk. The virtual hard + disk will be copied before being attached to the virtual machine. If + SourceImage is provided, the destination virtual hard drive must not + exist. + :type image: + ~azure.mgmt.compute.v2016_04_30_preview.models.VirtualHardDisk + :param caching: Specifies the caching requirements.

    Possible + values are:

    **None**

    **ReadOnly**

    **ReadWrite** +

    Default: **None for Standard storage. ReadOnly for Premium + storage**. Possible values include: 'None', 'ReadOnly', 'ReadWrite' + :type caching: str or + ~azure.mgmt.compute.v2016_04_30_preview.models.CachingTypes + :param create_option: Required. Specifies how the virtual machine should + be created.

    Possible values are:

    **Attach** \\u2013 This + value is used when you are using a specialized disk to create the virtual + machine.

    **FromImage** \\u2013 This value is used when you are + using an image to create the virtual machine. If you are using a platform + image, you also use the imageReference element described above. If you are + using a marketplace image, you also use the plan element previously + described. Possible values include: 'FromImage', 'Empty', 'Attach' + :type create_option: str or + ~azure.mgmt.compute.v2016_04_30_preview.models.DiskCreateOptionTypes + :param disk_size_gb: Specifies the size of an empty data disk in + gigabytes. This element can be used to overwrite the size of the disk in a + virtual machine image.

    This value cannot be larger than 1023 GB + :type disk_size_gb: int + :param managed_disk: The managed disk parameters. + :type managed_disk: + ~azure.mgmt.compute.v2016_04_30_preview.models.ManagedDiskParameters + """ + + _validation = { + 'create_option': {'required': True}, + } + + _attribute_map = { + 'os_type': {'key': 'osType', 'type': 'OperatingSystemTypes'}, + 'encryption_settings': {'key': 'encryptionSettings', 'type': 'DiskEncryptionSettings'}, + 'name': {'key': 'name', 'type': 'str'}, + 'vhd': {'key': 'vhd', 'type': 'VirtualHardDisk'}, + 'image': {'key': 'image', 'type': 'VirtualHardDisk'}, + 'caching': {'key': 'caching', 'type': 'CachingTypes'}, + 'create_option': {'key': 'createOption', 'type': 'DiskCreateOptionTypes'}, + 'disk_size_gb': {'key': 'diskSizeGB', 'type': 'int'}, + 'managed_disk': {'key': 'managedDisk', 'type': 'ManagedDiskParameters'}, + } + + def __init__(self, *, create_option, os_type=None, encryption_settings=None, name: str=None, vhd=None, image=None, caching=None, disk_size_gb: int=None, managed_disk=None, **kwargs) -> None: + super(OSDisk, self).__init__(**kwargs) + self.os_type = os_type + self.encryption_settings = encryption_settings + self.name = name + self.vhd = vhd + self.image = image + self.caching = caching + self.create_option = create_option + self.disk_size_gb = disk_size_gb + self.managed_disk = managed_disk + + +class OSDiskImage(Model): + """Contains the os disk image information. + + All required parameters must be populated in order to send to Azure. + + :param operating_system: Required. The operating system of the + osDiskImage. Possible values include: 'Windows', 'Linux' + :type operating_system: str or + ~azure.mgmt.compute.v2016_04_30_preview.models.OperatingSystemTypes + """ + + _validation = { + 'operating_system': {'required': True}, + } + + _attribute_map = { + 'operating_system': {'key': 'operatingSystem', 'type': 'OperatingSystemTypes'}, + } + + def __init__(self, *, operating_system, **kwargs) -> None: + super(OSDiskImage, self).__init__(**kwargs) + self.operating_system = operating_system + + +class OSProfile(Model): + """Specifies the operating system settings for the virtual machine. + + :param computer_name: Specifies the host OS name of the virtual machine. +

    This name cannot be updated after the VM is created.

    + **Max-length (Windows):** 15 characters

    **Max-length (Linux):** + 64 characters.

    For naming conventions and restrictions see [Azure + infrastructure services implementation + guidelines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-infrastructure-subscription-accounts-guidelines?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json#1-naming-conventions). + :type computer_name: str + :param admin_username: Specifies the name of the administrator account. +

    **Windows-only restriction:** Cannot end in "."

    + **Disallowed values:** "administrator", "admin", "user", "user1", "test", + "user2", "test1", "user3", "admin1", "1", "123", "a", "actuser", "adm", + "admin2", "aspnet", "backup", "console", "david", "guest", "john", + "owner", "root", "server", "sql", "support", "support_388945a0", "sys", + "test2", "test3", "user4", "user5".

    **Minimum-length (Linux):** 1 + character

    **Max-length (Linux):** 64 characters

    + **Max-length (Windows):** 20 characters

  • For root access to + the Linux VM, see [Using root privileges on Linux virtual machines in + Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-use-root-privileges?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json)
  • + For a list of built-in system users on Linux that should not be used in + this field, see [Selecting User Names for Linux on + Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-usernames?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json) + :type admin_username: str + :param admin_password: Specifies the password of the administrator + account.

    **Minimum-length (Windows):** 8 characters

    + **Minimum-length (Linux):** 6 characters

    **Max-length + (Windows):** 123 characters

    **Max-length (Linux):** 72 characters +

    **Complexity requirements:** 3 out of 4 conditions below need to + be fulfilled
    Has lower characters
    Has upper characters
    Has a + digit
    Has a special character (Regex match [\\W_])

    + **Disallowed values:** "abc@123", "P@$$w0rd", "P@ssw0rd", "P@ssword123", + "Pa$$word", "pass@word1", "Password!", "Password1", "Password22", + "iloveyou!"

    For resetting the password, see [How to reset the + Remote Desktop service or its login password in a Windows + VM](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-reset-rdp?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json) +

    For resetting root password, see [Manage users, SSH, and check or + repair disks on Azure Linux VMs using the VMAccess + Extension](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-using-vmaccess-extension?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json#reset-root-password) + :type admin_password: str + :param custom_data: Specifies a base-64 encoded string of custom data. The + base-64 encoded string is decoded to a binary array that is saved as a + file on the Virtual Machine. The maximum length of the binary array is + 65535 bytes.

    For using cloud-init for your VM, see [Using + cloud-init to customize a Linux VM during + creation](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-using-cloud-init?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json) + :type custom_data: str + :param windows_configuration: Specifies Windows operating system settings + on the virtual machine. + :type windows_configuration: + ~azure.mgmt.compute.v2016_04_30_preview.models.WindowsConfiguration + :param linux_configuration: Specifies the Linux operating system settings + on the virtual machine.

    For a list of supported Linux + distributions, see [Linux on Azure-Endorsed + Distributions](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-endorsed-distros?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json) +

    For running non-endorsed distributions, see [Information for + Non-Endorsed + Distributions](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-create-upload-generic?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json). + :type linux_configuration: + ~azure.mgmt.compute.v2016_04_30_preview.models.LinuxConfiguration + :param secrets: Specifies set of certificates that should be installed + onto the virtual machine. + :type secrets: + list[~azure.mgmt.compute.v2016_04_30_preview.models.VaultSecretGroup] + """ + + _attribute_map = { + 'computer_name': {'key': 'computerName', 'type': 'str'}, + 'admin_username': {'key': 'adminUsername', 'type': 'str'}, + 'admin_password': {'key': 'adminPassword', 'type': 'str'}, + 'custom_data': {'key': 'customData', 'type': 'str'}, + 'windows_configuration': {'key': 'windowsConfiguration', 'type': 'WindowsConfiguration'}, + 'linux_configuration': {'key': 'linuxConfiguration', 'type': 'LinuxConfiguration'}, + 'secrets': {'key': 'secrets', 'type': '[VaultSecretGroup]'}, + } + + def __init__(self, *, computer_name: str=None, admin_username: str=None, admin_password: str=None, custom_data: str=None, windows_configuration=None, linux_configuration=None, secrets=None, **kwargs) -> None: + super(OSProfile, self).__init__(**kwargs) + self.computer_name = computer_name + self.admin_username = admin_username + self.admin_password = admin_password + self.custom_data = custom_data + self.windows_configuration = windows_configuration + self.linux_configuration = linux_configuration + self.secrets = secrets + + +class Plan(Model): + """Specifies information about the marketplace image used to create the + virtual machine. This element is only used for marketplace images. Before + you can use a marketplace image from an API, you must enable the image for + programmatic use. In the Azure portal, find the marketplace image that you + want to use and then click **Want to deploy programmatically, Get Started + ->**. Enter any required information and then click **Save**. + + :param name: The plan ID. + :type name: str + :param publisher: The publisher ID. + :type publisher: str + :param product: Specifies the product of the image from the marketplace. + This is the same value as Offer under the imageReference element. + :type product: str + :param promotion_code: The promotion code. + :type promotion_code: str + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'publisher': {'key': 'publisher', 'type': 'str'}, + 'product': {'key': 'product', 'type': 'str'}, + 'promotion_code': {'key': 'promotionCode', 'type': 'str'}, + } + + def __init__(self, *, name: str=None, publisher: str=None, product: str=None, promotion_code: str=None, **kwargs) -> None: + super(Plan, self).__init__(**kwargs) + self.name = name + self.publisher = publisher + self.product = product + self.promotion_code = promotion_code + + +class PurchasePlan(Model): + """Used for establishing the purchase context of any 3rd Party artifact + through MarketPlace. + + All required parameters must be populated in order to send to Azure. + + :param publisher: Required. The publisher ID. + :type publisher: str + :param name: Required. The plan ID. + :type name: str + :param product: Required. Specifies the product of the image from the + marketplace. This is the same value as Offer under the imageReference + element. + :type product: str + """ + + _validation = { + 'publisher': {'required': True}, + 'name': {'required': True}, + 'product': {'required': True}, + } + + _attribute_map = { + 'publisher': {'key': 'publisher', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'product': {'key': 'product', 'type': 'str'}, + } + + def __init__(self, *, publisher: str, name: str, product: str, **kwargs) -> None: + super(PurchasePlan, self).__init__(**kwargs) + self.publisher = publisher + self.name = name + self.product = product + + +class Sku(Model): + """Describes a virtual machine scale set sku. + + :param name: The sku name. + :type name: str + :param tier: Specifies the tier of virtual machines in a scale set.

    Possible Values:

    **Standard**

    **Basic** + :type tier: str + :param capacity: Specifies the number of virtual machines in the scale + set. + :type capacity: long + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'tier': {'key': 'tier', 'type': 'str'}, + 'capacity': {'key': 'capacity', 'type': 'long'}, + } + + def __init__(self, *, name: str=None, tier: str=None, capacity: int=None, **kwargs) -> None: + super(Sku, self).__init__(**kwargs) + self.name = name + self.tier = tier + self.capacity = capacity + + +class Snapshot(Resource): + """Snapshot resource. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource Id + :vartype id: str + :ivar name: Resource name + :vartype name: str + :ivar type: Resource type + :vartype type: str + :param location: Required. Resource location + :type location: str + :param tags: Resource tags + :type tags: dict[str, str] + :param account_type: the storage account type of the disk. Possible values + include: 'Standard_LRS', 'Premium_LRS' + :type account_type: str or + ~azure.mgmt.compute.v2016_04_30_preview.models.StorageAccountTypes + :ivar time_created: The time when the disk was created. + :vartype time_created: datetime + :param os_type: The Operating System type. Possible values include: + 'Windows', 'Linux' + :type os_type: str or + ~azure.mgmt.compute.v2016_04_30_preview.models.OperatingSystemTypes + :param creation_data: Required. Disk source information. CreationData + information cannot be changed after the disk has been created. + :type creation_data: + ~azure.mgmt.compute.v2016_04_30_preview.models.CreationData + :param disk_size_gb: If creationData.createOption is Empty, this field is + mandatory and it indicates the size of the VHD to create. If this field is + present for updates or creation with other options, it indicates a resize. + Resizes are only allowed if the disk is not attached to a running VM, and + can only increase the disk's size. + :type disk_size_gb: int + :param encryption_settings: Encryption settings for disk or snapshot + :type encryption_settings: + ~azure.mgmt.compute.v2016_04_30_preview.models.EncryptionSettings + :ivar owner_id: A relative URI containing the VM id that has the disk + attached. + :vartype owner_id: str + :ivar provisioning_state: The disk provisioning state. + :vartype provisioning_state: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + 'time_created': {'readonly': True}, + 'creation_data': {'required': True}, + 'owner_id': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'account_type': {'key': 'properties.accountType', 'type': 'StorageAccountTypes'}, + 'time_created': {'key': 'properties.timeCreated', 'type': 'iso-8601'}, + 'os_type': {'key': 'properties.osType', 'type': 'OperatingSystemTypes'}, + 'creation_data': {'key': 'properties.creationData', 'type': 'CreationData'}, + 'disk_size_gb': {'key': 'properties.diskSizeGB', 'type': 'int'}, + 'encryption_settings': {'key': 'properties.encryptionSettings', 'type': 'EncryptionSettings'}, + 'owner_id': {'key': 'properties.ownerId', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + } + + def __init__(self, *, location: str, creation_data, tags=None, account_type=None, os_type=None, disk_size_gb: int=None, encryption_settings=None, **kwargs) -> None: + super(Snapshot, self).__init__(location=location, tags=tags, **kwargs) + self.account_type = account_type + self.time_created = None + self.os_type = os_type + self.creation_data = creation_data + self.disk_size_gb = disk_size_gb + self.encryption_settings = encryption_settings + self.owner_id = None + self.provisioning_state = None + + +class SnapshotUpdate(ResourceUpdate): + """Snapshot update resource. + + :param tags: Resource tags + :type tags: dict[str, str] + :param account_type: the storage account type of the disk. Possible values + include: 'Standard_LRS', 'Premium_LRS' + :type account_type: str or + ~azure.mgmt.compute.v2016_04_30_preview.models.StorageAccountTypes + :param os_type: the Operating System type. Possible values include: + 'Windows', 'Linux' + :type os_type: str or + ~azure.mgmt.compute.v2016_04_30_preview.models.OperatingSystemTypes + :param creation_data: disk source information. CreationData information + cannot be changed after the disk has been created. + :type creation_data: + ~azure.mgmt.compute.v2016_04_30_preview.models.CreationData + :param disk_size_gb: If creationData.createOption is Empty, this field is + mandatory and it indicates the size of the VHD to create. If this field is + present for updates or creation with other options, it indicates a resize. + Resizes are only allowed if the disk is not attached to a running VM, and + can only increase the disk's size. + :type disk_size_gb: int + :param encryption_settings: Encryption settings for disk or snapshot + :type encryption_settings: + ~azure.mgmt.compute.v2016_04_30_preview.models.EncryptionSettings + """ + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + 'account_type': {'key': 'properties.accountType', 'type': 'StorageAccountTypes'}, + 'os_type': {'key': 'properties.osType', 'type': 'OperatingSystemTypes'}, + 'creation_data': {'key': 'properties.creationData', 'type': 'CreationData'}, + 'disk_size_gb': {'key': 'properties.diskSizeGB', 'type': 'int'}, + 'encryption_settings': {'key': 'properties.encryptionSettings', 'type': 'EncryptionSettings'}, + } + + def __init__(self, *, tags=None, account_type=None, os_type=None, creation_data=None, disk_size_gb: int=None, encryption_settings=None, **kwargs) -> None: + super(SnapshotUpdate, self).__init__(tags=tags, **kwargs) + self.account_type = account_type + self.os_type = os_type + self.creation_data = creation_data + self.disk_size_gb = disk_size_gb + self.encryption_settings = encryption_settings + + +class SourceVault(Model): + """The vault id is an Azure Resource Manager Resource id in the form + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.KeyVault/vaults/{vaultName}. + + :param id: Resource Id + :type id: str + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + } + + def __init__(self, *, id: str=None, **kwargs) -> None: + super(SourceVault, self).__init__(**kwargs) + self.id = id + + +class SshConfiguration(Model): + """SSH configuration for Linux based VMs running on Azure. + + :param public_keys: The list of SSH public keys used to authenticate with + linux based VMs. + :type public_keys: + list[~azure.mgmt.compute.v2016_04_30_preview.models.SshPublicKey] + """ + + _attribute_map = { + 'public_keys': {'key': 'publicKeys', 'type': '[SshPublicKey]'}, + } + + def __init__(self, *, public_keys=None, **kwargs) -> None: + super(SshConfiguration, self).__init__(**kwargs) + self.public_keys = public_keys + + +class SshPublicKey(Model): + """Contains information about SSH certificate public key and the path on the + Linux VM where the public key is placed. + + :param path: Specifies the full path on the created VM where ssh public + key is stored. If the file already exists, the specified key is appended + to the file. Example: /home/user/.ssh/authorized_keys + :type path: str + :param key_data: SSH public key certificate used to authenticate with the + VM through ssh. The key needs to be at least 2048-bit and in ssh-rsa + format.

    For creating ssh keys, see [Create SSH keys on Linux and + Mac for Linux VMs in + Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-mac-create-ssh-keys?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json). + :type key_data: str + """ + + _attribute_map = { + 'path': {'key': 'path', 'type': 'str'}, + 'key_data': {'key': 'keyData', 'type': 'str'}, + } + + def __init__(self, *, path: str=None, key_data: str=None, **kwargs) -> None: + super(SshPublicKey, self).__init__(**kwargs) + self.path = path + self.key_data = key_data + + +class StorageProfile(Model): + """Specifies the storage settings for the virtual machine disks. + + :param image_reference: Specifies information about the image to use. You + can specify information about platform images, marketplace images, or + virtual machine images. This element is required when you want to use a + platform image, marketplace image, or virtual machine image, but is not + used in other creation operations. + :type image_reference: + ~azure.mgmt.compute.v2016_04_30_preview.models.ImageReference + :param os_disk: Specifies information about the operating system disk used + by the virtual machine.

    For more information about disks, see + [About disks and VHDs for Azure virtual + machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-about-disks-vhds?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). + :type os_disk: ~azure.mgmt.compute.v2016_04_30_preview.models.OSDisk + :param data_disks: Specifies the parameters that are used to add a data + disk to a virtual machine.

    For more information about disks, see + [About disks and VHDs for Azure virtual + machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-about-disks-vhds?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). + :type data_disks: + list[~azure.mgmt.compute.v2016_04_30_preview.models.DataDisk] + """ + + _attribute_map = { + 'image_reference': {'key': 'imageReference', 'type': 'ImageReference'}, + 'os_disk': {'key': 'osDisk', 'type': 'OSDisk'}, + 'data_disks': {'key': 'dataDisks', 'type': '[DataDisk]'}, + } + + def __init__(self, *, image_reference=None, os_disk=None, data_disks=None, **kwargs) -> None: + super(StorageProfile, self).__init__(**kwargs) + self.image_reference = image_reference + self.os_disk = os_disk + self.data_disks = data_disks + + +class SubResourceReadOnly(Model): + """SubResourceReadOnly. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource Id + :vartype id: str + """ + + _validation = { + 'id': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(SubResourceReadOnly, self).__init__(**kwargs) + self.id = None + + +class UpdateResource(Model): + """The Update Resource model definition. + + :param tags: Resource tags + :type tags: dict[str, str] + """ + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__(self, *, tags=None, **kwargs) -> None: + super(UpdateResource, self).__init__(**kwargs) + self.tags = tags + + +class UpgradePolicy(Model): + """Describes an upgrade policy - automatic or manual. + + :param mode: Specifies the mode of an upgrade to virtual machines in the + scale set.

    Possible values are:

    **Manual** - You + control the application of updates to virtual machines in the scale set. + You do this by using the manualUpgrade action.

    **Automatic** - + All virtual machines in the scale set are automatically updated at the + same time. Possible values include: 'Automatic', 'Manual' + :type mode: str or + ~azure.mgmt.compute.v2016_04_30_preview.models.UpgradeMode + """ + + _attribute_map = { + 'mode': {'key': 'mode', 'type': 'UpgradeMode'}, + } + + def __init__(self, *, mode=None, **kwargs) -> None: + super(UpgradePolicy, self).__init__(**kwargs) + self.mode = mode + + +class Usage(Model): + """Describes Compute Resource Usage. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar unit: Required. An enum describing the unit of usage measurement. + Default value: "Count" . + :vartype unit: str + :param current_value: Required. The current usage of the resource. + :type current_value: int + :param limit: Required. The maximum permitted usage of the resource. + :type limit: long + :param name: Required. The name of the type of usage. + :type name: ~azure.mgmt.compute.v2016_04_30_preview.models.UsageName + """ + + _validation = { + 'unit': {'required': True, 'constant': True}, + 'current_value': {'required': True}, + 'limit': {'required': True}, + 'name': {'required': True}, + } + + _attribute_map = { + 'unit': {'key': 'unit', 'type': 'str'}, + 'current_value': {'key': 'currentValue', 'type': 'int'}, + 'limit': {'key': 'limit', 'type': 'long'}, + 'name': {'key': 'name', 'type': 'UsageName'}, + } + + unit = "Count" + + def __init__(self, *, current_value: int, limit: int, name, **kwargs) -> None: + super(Usage, self).__init__(**kwargs) + self.current_value = current_value + self.limit = limit + self.name = name + + +class UsageName(Model): + """The Usage Names. + + :param value: The name of the resource. + :type value: str + :param localized_value: The localized name of the resource. + :type localized_value: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': 'str'}, + 'localized_value': {'key': 'localizedValue', 'type': 'str'}, + } + + def __init__(self, *, value: str=None, localized_value: str=None, **kwargs) -> None: + super(UsageName, self).__init__(**kwargs) + self.value = value + self.localized_value = localized_value + + +class VaultCertificate(Model): + """Describes a single certificate reference in a Key Vault, and where the + certificate should reside on the VM. + + :param certificate_url: This is the URL of a certificate that has been + uploaded to Key Vault as a secret. For adding a secret to the Key Vault, + see [Add a key or secret to the key + vault](https://docs.microsoft.com/azure/key-vault/key-vault-get-started/#add). + In this case, your certificate needs to be It is the Base64 encoding of + the following JSON Object which is encoded in UTF-8:

    {
    + "data":"",
    "dataType":"pfx",
    + "password":""
    } + :type certificate_url: str + :param certificate_store: For Windows VMs, specifies the certificate store + on the Virtual Machine to which the certificate should be added. The + specified certificate store is implicitly in the LocalMachine account. +

    For Linux VMs, the certificate file is placed under the + /var/lib/waagent directory, with the file name .crt + for the X509 certificate file and .prv for private + key. Both of these files are .pem formatted. + :type certificate_store: str + """ + + _attribute_map = { + 'certificate_url': {'key': 'certificateUrl', 'type': 'str'}, + 'certificate_store': {'key': 'certificateStore', 'type': 'str'}, + } + + def __init__(self, *, certificate_url: str=None, certificate_store: str=None, **kwargs) -> None: + super(VaultCertificate, self).__init__(**kwargs) + self.certificate_url = certificate_url + self.certificate_store = certificate_store + + +class VaultSecretGroup(Model): + """Describes a set of certificates which are all in the same Key Vault. + + :param source_vault: The relative URL of the Key Vault containing all of + the certificates in VaultCertificates. + :type source_vault: + ~azure.mgmt.compute.v2016_04_30_preview.models.SubResource + :param vault_certificates: The list of key vault references in SourceVault + which contain certificates. + :type vault_certificates: + list[~azure.mgmt.compute.v2016_04_30_preview.models.VaultCertificate] + """ + + _attribute_map = { + 'source_vault': {'key': 'sourceVault', 'type': 'SubResource'}, + 'vault_certificates': {'key': 'vaultCertificates', 'type': '[VaultCertificate]'}, + } + + def __init__(self, *, source_vault=None, vault_certificates=None, **kwargs) -> None: + super(VaultSecretGroup, self).__init__(**kwargs) + self.source_vault = source_vault + self.vault_certificates = vault_certificates + + +class VirtualHardDisk(Model): + """Describes the uri of a disk. + + :param uri: Specifies the virtual hard disk's uri. + :type uri: str + """ + + _attribute_map = { + 'uri': {'key': 'uri', 'type': 'str'}, + } + + def __init__(self, *, uri: str=None, **kwargs) -> None: + super(VirtualHardDisk, self).__init__(**kwargs) + self.uri = uri + + +class VirtualMachine(Resource): + """Describes a Virtual Machine. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource Id + :vartype id: str + :ivar name: Resource name + :vartype name: str + :ivar type: Resource type + :vartype type: str + :param location: Required. Resource location + :type location: str + :param tags: Resource tags + :type tags: dict[str, str] + :param plan: Specifies information about the marketplace image used to + create the virtual machine. This element is only used for marketplace + images. Before you can use a marketplace image from an API, you must + enable the image for programmatic use. In the Azure portal, find the + marketplace image that you want to use and then click **Want to deploy + programmatically, Get Started ->**. Enter any required information and + then click **Save**. + :type plan: ~azure.mgmt.compute.v2016_04_30_preview.models.Plan + :param hardware_profile: Specifies the hardware settings for the virtual + machine. + :type hardware_profile: + ~azure.mgmt.compute.v2016_04_30_preview.models.HardwareProfile + :param storage_profile: Specifies the storage settings for the virtual + machine disks. + :type storage_profile: + ~azure.mgmt.compute.v2016_04_30_preview.models.StorageProfile + :param os_profile: Specifies the operating system settings for the virtual + machine. + :type os_profile: ~azure.mgmt.compute.v2016_04_30_preview.models.OSProfile + :param network_profile: Specifies the network interfaces of the virtual + machine. + :type network_profile: + ~azure.mgmt.compute.v2016_04_30_preview.models.NetworkProfile + :param diagnostics_profile: Specifies the boot diagnostic settings state. +

    Minimum api-version: 2015-06-15. + :type diagnostics_profile: + ~azure.mgmt.compute.v2016_04_30_preview.models.DiagnosticsProfile + :param availability_set: Specifies information about the availability set + that the virtual machine should be assigned to. Virtual machines specified + in the same availability set are allocated to different nodes to maximize + availability. For more information about availability sets, see [Manage + the availability of virtual + machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-manage-availability?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). +

    For more information on Azure planned maintenance, see [Planned + maintenance for virtual machines in + Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-planned-maintenance?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json) +

    Currently, a VM can only be added to availability set at creation + time. An existing VM cannot be added to an availability set. + :type availability_set: + ~azure.mgmt.compute.v2016_04_30_preview.models.SubResource + :ivar provisioning_state: The provisioning state, which only appears in + the response. + :vartype provisioning_state: str + :ivar instance_view: The virtual machine instance view. + :vartype instance_view: + ~azure.mgmt.compute.v2016_04_30_preview.models.VirtualMachineInstanceView + :param license_type: Specifies that the image or disk that is being used + was licensed on-premises. This element is only used for images that + contain the Windows Server operating system.

    Possible values are: +

    Windows_Client

    Windows_Server

    If this element + is included in a request for an update, the value must match the initial + value. This value cannot be updated.

    For more information, see + [Azure Hybrid Use Benefit for Windows + Server](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-hybrid-use-benefit-licensing?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json) +

    Minimum api-version: 2015-06-15 + :type license_type: str + :ivar vm_id: Specifies the VM unique ID which is a 128-bits identifier + that is encoded and stored in all Azure IaaS VMs SMBIOS and can be read + using platform BIOS commands. + :vartype vm_id: str + :ivar resources: The virtual machine child extension resources. + :vartype resources: + list[~azure.mgmt.compute.v2016_04_30_preview.models.VirtualMachineExtension] + :param identity: The identity of the virtual machine, if configured. + :type identity: + ~azure.mgmt.compute.v2016_04_30_preview.models.VirtualMachineIdentity + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + 'provisioning_state': {'readonly': True}, + 'instance_view': {'readonly': True}, + 'vm_id': {'readonly': True}, + 'resources': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'plan': {'key': 'plan', 'type': 'Plan'}, + 'hardware_profile': {'key': 'properties.hardwareProfile', 'type': 'HardwareProfile'}, + 'storage_profile': {'key': 'properties.storageProfile', 'type': 'StorageProfile'}, + 'os_profile': {'key': 'properties.osProfile', 'type': 'OSProfile'}, + 'network_profile': {'key': 'properties.networkProfile', 'type': 'NetworkProfile'}, + 'diagnostics_profile': {'key': 'properties.diagnosticsProfile', 'type': 'DiagnosticsProfile'}, + 'availability_set': {'key': 'properties.availabilitySet', 'type': 'SubResource'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'instance_view': {'key': 'properties.instanceView', 'type': 'VirtualMachineInstanceView'}, + 'license_type': {'key': 'properties.licenseType', 'type': 'str'}, + 'vm_id': {'key': 'properties.vmId', 'type': 'str'}, + 'resources': {'key': 'resources', 'type': '[VirtualMachineExtension]'}, + 'identity': {'key': 'identity', 'type': 'VirtualMachineIdentity'}, + } + + def __init__(self, *, location: str, tags=None, plan=None, hardware_profile=None, storage_profile=None, os_profile=None, network_profile=None, diagnostics_profile=None, availability_set=None, license_type: str=None, identity=None, **kwargs) -> None: + super(VirtualMachine, self).__init__(location=location, tags=tags, **kwargs) + self.plan = plan + self.hardware_profile = hardware_profile + self.storage_profile = storage_profile + self.os_profile = os_profile + self.network_profile = network_profile + self.diagnostics_profile = diagnostics_profile + self.availability_set = availability_set + self.provisioning_state = None + self.instance_view = None + self.license_type = license_type + self.vm_id = None + self.resources = None + self.identity = identity + + +class VirtualMachineAgentInstanceView(Model): + """The instance view of the VM Agent running on the virtual machine. + + :param vm_agent_version: The VM Agent full version. + :type vm_agent_version: str + :param extension_handlers: The virtual machine extension handler instance + view. + :type extension_handlers: + list[~azure.mgmt.compute.v2016_04_30_preview.models.VirtualMachineExtensionHandlerInstanceView] + :param statuses: The resource status information. + :type statuses: + list[~azure.mgmt.compute.v2016_04_30_preview.models.InstanceViewStatus] + """ + + _attribute_map = { + 'vm_agent_version': {'key': 'vmAgentVersion', 'type': 'str'}, + 'extension_handlers': {'key': 'extensionHandlers', 'type': '[VirtualMachineExtensionHandlerInstanceView]'}, + 'statuses': {'key': 'statuses', 'type': '[InstanceViewStatus]'}, + } + + def __init__(self, *, vm_agent_version: str=None, extension_handlers=None, statuses=None, **kwargs) -> None: + super(VirtualMachineAgentInstanceView, self).__init__(**kwargs) + self.vm_agent_version = vm_agent_version + self.extension_handlers = extension_handlers + self.statuses = statuses + + +class VirtualMachineCaptureParameters(Model): + """Capture Virtual Machine parameters. + + All required parameters must be populated in order to send to Azure. + + :param vhd_prefix: Required. The captured virtual hard disk's name prefix. + :type vhd_prefix: str + :param destination_container_name: Required. The destination container + name. + :type destination_container_name: str + :param overwrite_vhds: Required. Specifies whether to overwrite the + destination virtual hard disk, in case of conflict. + :type overwrite_vhds: bool + """ + + _validation = { + 'vhd_prefix': {'required': True}, + 'destination_container_name': {'required': True}, + 'overwrite_vhds': {'required': True}, + } + + _attribute_map = { + 'vhd_prefix': {'key': 'vhdPrefix', 'type': 'str'}, + 'destination_container_name': {'key': 'destinationContainerName', 'type': 'str'}, + 'overwrite_vhds': {'key': 'overwriteVhds', 'type': 'bool'}, + } + + def __init__(self, *, vhd_prefix: str, destination_container_name: str, overwrite_vhds: bool, **kwargs) -> None: + super(VirtualMachineCaptureParameters, self).__init__(**kwargs) + self.vhd_prefix = vhd_prefix + self.destination_container_name = destination_container_name + self.overwrite_vhds = overwrite_vhds + + +class VirtualMachineCaptureResult(SubResource): + """Resource Id. + + :param id: Resource Id + :type id: str + :param output: Operation output data (raw JSON) + :type output: object + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'output': {'key': 'properties.output', 'type': 'object'}, + } + + def __init__(self, *, id: str=None, output=None, **kwargs) -> None: + super(VirtualMachineCaptureResult, self).__init__(id=id, **kwargs) + self.output = output + + +class VirtualMachineExtension(Resource): + """Describes a Virtual Machine Extension. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource Id + :vartype id: str + :ivar name: Resource name + :vartype name: str + :ivar type: Resource type + :vartype type: str + :param location: Required. Resource location + :type location: str + :param tags: Resource tags + :type tags: dict[str, str] + :param force_update_tag: How the extension handler should be forced to + update even if the extension configuration has not changed. + :type force_update_tag: str + :param publisher: The name of the extension handler publisher. + :type publisher: str + :param virtual_machine_extension_type: Specifies the type of the + extension; an example is "CustomScriptExtension". + :type virtual_machine_extension_type: str + :param type_handler_version: Specifies the version of the script handler. + :type type_handler_version: str + :param auto_upgrade_minor_version: Indicates whether the extension should + use a newer minor version if one is available at deployment time. Once + deployed, however, the extension will not upgrade minor versions unless + redeployed, even with this property set to true. + :type auto_upgrade_minor_version: bool + :param settings: Json formatted public settings for the extension. + :type settings: object + :param protected_settings: The extension can contain either + protectedSettings or protectedSettingsFromKeyVault or no protected + settings at all. + :type protected_settings: object + :ivar provisioning_state: The provisioning state, which only appears in + the response. + :vartype provisioning_state: str + :param instance_view: The virtual machine extension instance view. + :type instance_view: + ~azure.mgmt.compute.v2016_04_30_preview.models.VirtualMachineExtensionInstanceView + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'force_update_tag': {'key': 'properties.forceUpdateTag', 'type': 'str'}, + 'publisher': {'key': 'properties.publisher', 'type': 'str'}, + 'virtual_machine_extension_type': {'key': 'properties.type', 'type': 'str'}, + 'type_handler_version': {'key': 'properties.typeHandlerVersion', 'type': 'str'}, + 'auto_upgrade_minor_version': {'key': 'properties.autoUpgradeMinorVersion', 'type': 'bool'}, + 'settings': {'key': 'properties.settings', 'type': 'object'}, + 'protected_settings': {'key': 'properties.protectedSettings', 'type': 'object'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'instance_view': {'key': 'properties.instanceView', 'type': 'VirtualMachineExtensionInstanceView'}, + } + + def __init__(self, *, location: str, tags=None, force_update_tag: str=None, publisher: str=None, virtual_machine_extension_type: str=None, type_handler_version: str=None, auto_upgrade_minor_version: bool=None, settings=None, protected_settings=None, instance_view=None, **kwargs) -> None: + super(VirtualMachineExtension, self).__init__(location=location, tags=tags, **kwargs) + self.force_update_tag = force_update_tag + self.publisher = publisher + self.virtual_machine_extension_type = virtual_machine_extension_type + self.type_handler_version = type_handler_version + self.auto_upgrade_minor_version = auto_upgrade_minor_version + self.settings = settings + self.protected_settings = protected_settings + self.provisioning_state = None + self.instance_view = instance_view + + +class VirtualMachineExtensionHandlerInstanceView(Model): + """The instance view of a virtual machine extension handler. + + :param type: Specifies the type of the extension; an example is + "CustomScriptExtension". + :type type: str + :param type_handler_version: Specifies the version of the script handler. + :type type_handler_version: str + :param status: The extension handler status. + :type status: + ~azure.mgmt.compute.v2016_04_30_preview.models.InstanceViewStatus + """ + + _attribute_map = { + 'type': {'key': 'type', 'type': 'str'}, + 'type_handler_version': {'key': 'typeHandlerVersion', 'type': 'str'}, + 'status': {'key': 'status', 'type': 'InstanceViewStatus'}, + } + + def __init__(self, *, type: str=None, type_handler_version: str=None, status=None, **kwargs) -> None: + super(VirtualMachineExtensionHandlerInstanceView, self).__init__(**kwargs) + self.type = type + self.type_handler_version = type_handler_version + self.status = status + + +class VirtualMachineExtensionImage(Resource): + """Describes a Virtual Machine Extension Image. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource Id + :vartype id: str + :ivar name: Resource name + :vartype name: str + :ivar type: Resource type + :vartype type: str + :param location: Required. Resource location + :type location: str + :param tags: Resource tags + :type tags: dict[str, str] + :param operating_system: Required. The operating system this extension + supports. + :type operating_system: str + :param compute_role: Required. The type of role (IaaS or PaaS) this + extension supports. + :type compute_role: str + :param handler_schema: Required. The schema defined by publisher, where + extension consumers should provide settings in a matching schema. + :type handler_schema: str + :param vm_scale_set_enabled: Whether the extension can be used on xRP + VMScaleSets. By default existing extensions are usable on scalesets, but + there might be cases where a publisher wants to explicitly indicate the + extension is only enabled for CRP VMs but not VMSS. + :type vm_scale_set_enabled: bool + :param supports_multiple_extensions: Whether the handler can support + multiple extensions. + :type supports_multiple_extensions: bool + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + 'operating_system': {'required': True}, + 'compute_role': {'required': True}, + 'handler_schema': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'operating_system': {'key': 'properties.operatingSystem', 'type': 'str'}, + 'compute_role': {'key': 'properties.computeRole', 'type': 'str'}, + 'handler_schema': {'key': 'properties.handlerSchema', 'type': 'str'}, + 'vm_scale_set_enabled': {'key': 'properties.vmScaleSetEnabled', 'type': 'bool'}, + 'supports_multiple_extensions': {'key': 'properties.supportsMultipleExtensions', 'type': 'bool'}, + } + + def __init__(self, *, location: str, operating_system: str, compute_role: str, handler_schema: str, tags=None, vm_scale_set_enabled: bool=None, supports_multiple_extensions: bool=None, **kwargs) -> None: + super(VirtualMachineExtensionImage, self).__init__(location=location, tags=tags, **kwargs) + self.operating_system = operating_system + self.compute_role = compute_role + self.handler_schema = handler_schema + self.vm_scale_set_enabled = vm_scale_set_enabled + self.supports_multiple_extensions = supports_multiple_extensions + + +class VirtualMachineExtensionInstanceView(Model): + """The instance view of a virtual machine extension. + + :param name: The virtual machine extension name. + :type name: str + :param type: Specifies the type of the extension; an example is + "CustomScriptExtension". + :type type: str + :param type_handler_version: Specifies the version of the script handler. + :type type_handler_version: str + :param substatuses: The resource status information. + :type substatuses: + list[~azure.mgmt.compute.v2016_04_30_preview.models.InstanceViewStatus] + :param statuses: The resource status information. + :type statuses: + list[~azure.mgmt.compute.v2016_04_30_preview.models.InstanceViewStatus] + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'type_handler_version': {'key': 'typeHandlerVersion', 'type': 'str'}, + 'substatuses': {'key': 'substatuses', 'type': '[InstanceViewStatus]'}, + 'statuses': {'key': 'statuses', 'type': '[InstanceViewStatus]'}, + } + + def __init__(self, *, name: str=None, type: str=None, type_handler_version: str=None, substatuses=None, statuses=None, **kwargs) -> None: + super(VirtualMachineExtensionInstanceView, self).__init__(**kwargs) + self.name = name + self.type = type + self.type_handler_version = type_handler_version + self.substatuses = substatuses + self.statuses = statuses + + +class VirtualMachineExtensionsListResult(Model): + """The List Extension operation response. + + :param value: The list of extensions + :type value: + list[~azure.mgmt.compute.v2016_04_30_preview.models.VirtualMachineExtension] + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[VirtualMachineExtension]'}, + } + + def __init__(self, *, value=None, **kwargs) -> None: + super(VirtualMachineExtensionsListResult, self).__init__(**kwargs) + self.value = value + + +class VirtualMachineExtensionUpdate(UpdateResource): + """Describes a Virtual Machine Extension. + + :param tags: Resource tags + :type tags: dict[str, str] + :param force_update_tag: How the extension handler should be forced to + update even if the extension configuration has not changed. + :type force_update_tag: str + :param publisher: The name of the extension handler publisher. + :type publisher: str + :param type: Specifies the type of the extension; an example is + "CustomScriptExtension". + :type type: str + :param type_handler_version: Specifies the version of the script handler. + :type type_handler_version: str + :param auto_upgrade_minor_version: Indicates whether the extension should + use a newer minor version if one is available at deployment time. Once + deployed, however, the extension will not upgrade minor versions unless + redeployed, even with this property set to true. + :type auto_upgrade_minor_version: bool + :param settings: Json formatted public settings for the extension. + :type settings: object + :param protected_settings: The extension can contain either + protectedSettings or protectedSettingsFromKeyVault or no protected + settings at all. + :type protected_settings: object + """ + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + 'force_update_tag': {'key': 'properties.forceUpdateTag', 'type': 'str'}, + 'publisher': {'key': 'properties.publisher', 'type': 'str'}, + 'type': {'key': 'properties.type', 'type': 'str'}, + 'type_handler_version': {'key': 'properties.typeHandlerVersion', 'type': 'str'}, + 'auto_upgrade_minor_version': {'key': 'properties.autoUpgradeMinorVersion', 'type': 'bool'}, + 'settings': {'key': 'properties.settings', 'type': 'object'}, + 'protected_settings': {'key': 'properties.protectedSettings', 'type': 'object'}, + } + + def __init__(self, *, tags=None, force_update_tag: str=None, publisher: str=None, type: str=None, type_handler_version: str=None, auto_upgrade_minor_version: bool=None, settings=None, protected_settings=None, **kwargs) -> None: + super(VirtualMachineExtensionUpdate, self).__init__(tags=tags, **kwargs) + self.force_update_tag = force_update_tag + self.publisher = publisher + self.type = type + self.type_handler_version = type_handler_version + self.auto_upgrade_minor_version = auto_upgrade_minor_version + self.settings = settings + self.protected_settings = protected_settings + + +class VirtualMachineIdentity(Model): + """Identity for the virtual machine. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar principal_id: The principal id of virtual machine identity. + :vartype principal_id: str + :ivar tenant_id: The tenant id associated with the virtual machine. + :vartype tenant_id: str + :param type: The type of identity used for the virtual machine. Currently, + the only supported type is 'SystemAssigned', which implicitly creates an + identity. Possible values include: 'SystemAssigned' + :type type: str or + ~azure.mgmt.compute.v2016_04_30_preview.models.ResourceIdentityType + """ + + _validation = { + 'principal_id': {'readonly': True}, + 'tenant_id': {'readonly': True}, + } + + _attribute_map = { + 'principal_id': {'key': 'principalId', 'type': 'str'}, + 'tenant_id': {'key': 'tenantId', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'ResourceIdentityType'}, + } + + def __init__(self, *, type=None, **kwargs) -> None: + super(VirtualMachineIdentity, self).__init__(**kwargs) + self.principal_id = None + self.tenant_id = None + self.type = type + + +class VirtualMachineImageResource(SubResource): + """Virtual machine image resource information. + + All required parameters must be populated in order to send to Azure. + + :param id: Resource Id + :type id: str + :param name: Required. The name of the resource. + :type name: str + :param location: Required. The supported Azure location of the resource. + :type location: str + :param tags: Specifies the tags that are assigned to the virtual machine. + For more information about using tags, see [Using tags to organize your + Azure + resources](https://docs.microsoft.com/azure/azure-resource-manager/resource-group-using-tags.md). + :type tags: dict[str, str] + """ + + _validation = { + 'name': {'required': True}, + 'location': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__(self, *, name: str, location: str, id: str=None, tags=None, **kwargs) -> None: + super(VirtualMachineImageResource, self).__init__(id=id, **kwargs) + self.name = name + self.location = location + self.tags = tags + + +class VirtualMachineImage(VirtualMachineImageResource): + """Describes a Virtual Machine Image. + + All required parameters must be populated in order to send to Azure. + + :param id: Resource Id + :type id: str + :param name: Required. The name of the resource. + :type name: str + :param location: Required. The supported Azure location of the resource. + :type location: str + :param tags: Specifies the tags that are assigned to the virtual machine. + For more information about using tags, see [Using tags to organize your + Azure + resources](https://docs.microsoft.com/azure/azure-resource-manager/resource-group-using-tags.md). + :type tags: dict[str, str] + :param plan: + :type plan: ~azure.mgmt.compute.v2016_04_30_preview.models.PurchasePlan + :param os_disk_image: + :type os_disk_image: + ~azure.mgmt.compute.v2016_04_30_preview.models.OSDiskImage + :param data_disk_images: + :type data_disk_images: + list[~azure.mgmt.compute.v2016_04_30_preview.models.DataDiskImage] + """ + + _validation = { + 'name': {'required': True}, + 'location': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'plan': {'key': 'properties.plan', 'type': 'PurchasePlan'}, + 'os_disk_image': {'key': 'properties.osDiskImage', 'type': 'OSDiskImage'}, + 'data_disk_images': {'key': 'properties.dataDiskImages', 'type': '[DataDiskImage]'}, + } + + def __init__(self, *, name: str, location: str, id: str=None, tags=None, plan=None, os_disk_image=None, data_disk_images=None, **kwargs) -> None: + super(VirtualMachineImage, self).__init__(id=id, name=name, location=location, tags=tags, **kwargs) + self.plan = plan + self.os_disk_image = os_disk_image + self.data_disk_images = data_disk_images + + +class VirtualMachineInstanceView(Model): + """The instance view of a virtual machine. + + :param platform_update_domain: Specifies the update domain of the virtual + machine. + :type platform_update_domain: int + :param platform_fault_domain: Specifies the fault domain of the virtual + machine. + :type platform_fault_domain: int + :param rdp_thumb_print: The Remote desktop certificate thumbprint. + :type rdp_thumb_print: str + :param vm_agent: The VM Agent running on the virtual machine. + :type vm_agent: + ~azure.mgmt.compute.v2016_04_30_preview.models.VirtualMachineAgentInstanceView + :param disks: The virtual machine disk information. + :type disks: + list[~azure.mgmt.compute.v2016_04_30_preview.models.DiskInstanceView] + :param extensions: The extensions information. + :type extensions: + list[~azure.mgmt.compute.v2016_04_30_preview.models.VirtualMachineExtensionInstanceView] + :param boot_diagnostics: Boot Diagnostics is a debugging feature which + allows you to view Console Output and Screenshot to diagnose VM status. +

    You can easily view the output of your console log.

    + Azure also enables you to see a screenshot of the VM from the hypervisor. + :type boot_diagnostics: + ~azure.mgmt.compute.v2016_04_30_preview.models.BootDiagnosticsInstanceView + :param statuses: The resource status information. + :type statuses: + list[~azure.mgmt.compute.v2016_04_30_preview.models.InstanceViewStatus] + """ + + _attribute_map = { + 'platform_update_domain': {'key': 'platformUpdateDomain', 'type': 'int'}, + 'platform_fault_domain': {'key': 'platformFaultDomain', 'type': 'int'}, + 'rdp_thumb_print': {'key': 'rdpThumbPrint', 'type': 'str'}, + 'vm_agent': {'key': 'vmAgent', 'type': 'VirtualMachineAgentInstanceView'}, + 'disks': {'key': 'disks', 'type': '[DiskInstanceView]'}, + 'extensions': {'key': 'extensions', 'type': '[VirtualMachineExtensionInstanceView]'}, + 'boot_diagnostics': {'key': 'bootDiagnostics', 'type': 'BootDiagnosticsInstanceView'}, + 'statuses': {'key': 'statuses', 'type': '[InstanceViewStatus]'}, + } + + def __init__(self, *, platform_update_domain: int=None, platform_fault_domain: int=None, rdp_thumb_print: str=None, vm_agent=None, disks=None, extensions=None, boot_diagnostics=None, statuses=None, **kwargs) -> None: + super(VirtualMachineInstanceView, self).__init__(**kwargs) + self.platform_update_domain = platform_update_domain + self.platform_fault_domain = platform_fault_domain + self.rdp_thumb_print = rdp_thumb_print + self.vm_agent = vm_agent + self.disks = disks + self.extensions = extensions + self.boot_diagnostics = boot_diagnostics + self.statuses = statuses + + +class VirtualMachineScaleSet(Resource): + """Describes a Virtual Machine Scale Set. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource Id + :vartype id: str + :ivar name: Resource name + :vartype name: str + :ivar type: Resource type + :vartype type: str + :param location: Required. Resource location + :type location: str + :param tags: Resource tags + :type tags: dict[str, str] + :param sku: The virtual machine scale set sku. + :type sku: ~azure.mgmt.compute.v2016_04_30_preview.models.Sku + :param plan: Specifies information about the marketplace image used to + create the virtual machine. This element is only used for marketplace + images. Before you can use a marketplace image from an API, you must + enable the image for programmatic use. In the Azure portal, find the + marketplace image that you want to use and then click **Want to deploy + programmatically, Get Started ->**. Enter any required information and + then click **Save**. + :type plan: ~azure.mgmt.compute.v2016_04_30_preview.models.Plan + :param upgrade_policy: The upgrade policy. + :type upgrade_policy: + ~azure.mgmt.compute.v2016_04_30_preview.models.UpgradePolicy + :param virtual_machine_profile: The virtual machine profile. + :type virtual_machine_profile: + ~azure.mgmt.compute.v2016_04_30_preview.models.VirtualMachineScaleSetVMProfile + :ivar provisioning_state: The provisioning state, which only appears in + the response. + :vartype provisioning_state: str + :param over_provision: Specifies whether the Virtual Machine Scale Set + should be overprovisioned. + :type over_provision: bool + :param single_placement_group: When true this limits the scale set to a + single placement group, of max size 100 virtual machines. + :type single_placement_group: bool + :param identity: The identity of the virtual machine scale set, if + configured. + :type identity: + ~azure.mgmt.compute.v2016_04_30_preview.models.VirtualMachineScaleSetIdentity + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'sku': {'key': 'sku', 'type': 'Sku'}, + 'plan': {'key': 'plan', 'type': 'Plan'}, + 'upgrade_policy': {'key': 'properties.upgradePolicy', 'type': 'UpgradePolicy'}, + 'virtual_machine_profile': {'key': 'properties.virtualMachineProfile', 'type': 'VirtualMachineScaleSetVMProfile'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'over_provision': {'key': 'properties.overProvision', 'type': 'bool'}, + 'single_placement_group': {'key': 'properties.singlePlacementGroup', 'type': 'bool'}, + 'identity': {'key': 'identity', 'type': 'VirtualMachineScaleSetIdentity'}, + } + + def __init__(self, *, location: str, tags=None, sku=None, plan=None, upgrade_policy=None, virtual_machine_profile=None, over_provision: bool=None, single_placement_group: bool=None, identity=None, **kwargs) -> None: + super(VirtualMachineScaleSet, self).__init__(location=location, tags=tags, **kwargs) + self.sku = sku + self.plan = plan + self.upgrade_policy = upgrade_policy + self.virtual_machine_profile = virtual_machine_profile + self.provisioning_state = None + self.over_provision = over_provision + self.single_placement_group = single_placement_group + self.identity = identity + + +class VirtualMachineScaleSetDataDisk(Model): + """Describes a virtual machine scale set data disk. + + All required parameters must be populated in order to send to Azure. + + :param name: The disk name. + :type name: str + :param lun: Required. Specifies the logical unit number of the data disk. + This value is used to identify data disks within the VM and therefore must + be unique for each data disk attached to a VM. + :type lun: int + :param caching: Specifies the caching requirements.

    Possible + values are:

    **None**

    **ReadOnly**

    **ReadWrite** +

    Default: **None for Standard storage. ReadOnly for Premium + storage**. Possible values include: 'None', 'ReadOnly', 'ReadWrite' + :type caching: str or + ~azure.mgmt.compute.v2016_04_30_preview.models.CachingTypes + :param create_option: Required. The create option. Possible values + include: 'FromImage', 'Empty', 'Attach' + :type create_option: str or + ~azure.mgmt.compute.v2016_04_30_preview.models.DiskCreateOptionTypes + :param disk_size_gb: Specifies the size of an empty data disk in + gigabytes. This element can be used to overwrite the size of the disk in a + virtual machine image.

    This value cannot be larger than 1023 GB + :type disk_size_gb: int + :param managed_disk: The managed disk parameters. + :type managed_disk: + ~azure.mgmt.compute.v2016_04_30_preview.models.VirtualMachineScaleSetManagedDiskParameters + """ + + _validation = { + 'lun': {'required': True}, + 'create_option': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'lun': {'key': 'lun', 'type': 'int'}, + 'caching': {'key': 'caching', 'type': 'CachingTypes'}, + 'create_option': {'key': 'createOption', 'type': 'DiskCreateOptionTypes'}, + 'disk_size_gb': {'key': 'diskSizeGB', 'type': 'int'}, + 'managed_disk': {'key': 'managedDisk', 'type': 'VirtualMachineScaleSetManagedDiskParameters'}, + } + + def __init__(self, *, lun: int, create_option, name: str=None, caching=None, disk_size_gb: int=None, managed_disk=None, **kwargs) -> None: + super(VirtualMachineScaleSetDataDisk, self).__init__(**kwargs) + self.name = name + self.lun = lun + self.caching = caching + self.create_option = create_option + self.disk_size_gb = disk_size_gb + self.managed_disk = managed_disk + + +class VirtualMachineScaleSetExtension(SubResourceReadOnly): + """Describes a Virtual Machine Scale Set Extension. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource Id + :vartype id: str + :param name: The name of the extension. + :type name: str + :param publisher: The name of the extension handler publisher. + :type publisher: str + :param type: Specifies the type of the extension; an example is + "CustomScriptExtension". + :type type: str + :param type_handler_version: Specifies the version of the script handler. + :type type_handler_version: str + :param auto_upgrade_minor_version: Indicates whether the extension should + use a newer minor version if one is available at deployment time. Once + deployed, however, the extension will not upgrade minor versions unless + redeployed, even with this property set to true. + :type auto_upgrade_minor_version: bool + :param settings: Json formatted public settings for the extension. + :type settings: object + :param protected_settings: The extension can contain either + protectedSettings or protectedSettingsFromKeyVault or no protected + settings at all. + :type protected_settings: object + :ivar provisioning_state: The provisioning state, which only appears in + the response. + :vartype provisioning_state: str + """ + + _validation = { + 'id': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'publisher': {'key': 'properties.publisher', 'type': 'str'}, + 'type': {'key': 'properties.type', 'type': 'str'}, + 'type_handler_version': {'key': 'properties.typeHandlerVersion', 'type': 'str'}, + 'auto_upgrade_minor_version': {'key': 'properties.autoUpgradeMinorVersion', 'type': 'bool'}, + 'settings': {'key': 'properties.settings', 'type': 'object'}, + 'protected_settings': {'key': 'properties.protectedSettings', 'type': 'object'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + } + + def __init__(self, *, name: str=None, publisher: str=None, type: str=None, type_handler_version: str=None, auto_upgrade_minor_version: bool=None, settings=None, protected_settings=None, **kwargs) -> None: + super(VirtualMachineScaleSetExtension, self).__init__(**kwargs) + self.name = name + self.publisher = publisher + self.type = type + self.type_handler_version = type_handler_version + self.auto_upgrade_minor_version = auto_upgrade_minor_version + self.settings = settings + self.protected_settings = protected_settings + self.provisioning_state = None + + +class VirtualMachineScaleSetExtensionProfile(Model): + """Describes a virtual machine scale set extension profile. + + :param extensions: The virtual machine scale set child extension + resources. + :type extensions: + list[~azure.mgmt.compute.v2016_04_30_preview.models.VirtualMachineScaleSetExtension] + """ + + _attribute_map = { + 'extensions': {'key': 'extensions', 'type': '[VirtualMachineScaleSetExtension]'}, + } + + def __init__(self, *, extensions=None, **kwargs) -> None: + super(VirtualMachineScaleSetExtensionProfile, self).__init__(**kwargs) + self.extensions = extensions + + +class VirtualMachineScaleSetIdentity(Model): + """Identity for the virtual machine scale set. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar principal_id: The principal id of virtual machine scale set + identity. + :vartype principal_id: str + :ivar tenant_id: The tenant id associated with the virtual machine scale + set. + :vartype tenant_id: str + :param type: The type of identity used for the virtual machine scale set. + Currently, the only supported type is 'SystemAssigned', which implicitly + creates an identity. Possible values include: 'SystemAssigned' + :type type: str or + ~azure.mgmt.compute.v2016_04_30_preview.models.ResourceIdentityType + """ + + _validation = { + 'principal_id': {'readonly': True}, + 'tenant_id': {'readonly': True}, + } + + _attribute_map = { + 'principal_id': {'key': 'principalId', 'type': 'str'}, + 'tenant_id': {'key': 'tenantId', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'ResourceIdentityType'}, + } + + def __init__(self, *, type=None, **kwargs) -> None: + super(VirtualMachineScaleSetIdentity, self).__init__(**kwargs) + self.principal_id = None + self.tenant_id = None + self.type = type + + +class VirtualMachineScaleSetInstanceView(Model): + """The instance view of a virtual machine scale set. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar virtual_machine: The instance view status summary for the virtual + machine scale set. + :vartype virtual_machine: + ~azure.mgmt.compute.v2016_04_30_preview.models.VirtualMachineScaleSetInstanceViewStatusesSummary + :ivar extensions: The extensions information. + :vartype extensions: + list[~azure.mgmt.compute.v2016_04_30_preview.models.VirtualMachineScaleSetVMExtensionsSummary] + :param statuses: The resource status information. + :type statuses: + list[~azure.mgmt.compute.v2016_04_30_preview.models.InstanceViewStatus] + """ + + _validation = { + 'virtual_machine': {'readonly': True}, + 'extensions': {'readonly': True}, + } + + _attribute_map = { + 'virtual_machine': {'key': 'virtualMachine', 'type': 'VirtualMachineScaleSetInstanceViewStatusesSummary'}, + 'extensions': {'key': 'extensions', 'type': '[VirtualMachineScaleSetVMExtensionsSummary]'}, + 'statuses': {'key': 'statuses', 'type': '[InstanceViewStatus]'}, + } + + def __init__(self, *, statuses=None, **kwargs) -> None: + super(VirtualMachineScaleSetInstanceView, self).__init__(**kwargs) + self.virtual_machine = None + self.extensions = None + self.statuses = statuses + + +class VirtualMachineScaleSetInstanceViewStatusesSummary(Model): + """Instance view statuses summary for virtual machines of a virtual machine + scale set. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar statuses_summary: The extensions information. + :vartype statuses_summary: + list[~azure.mgmt.compute.v2016_04_30_preview.models.VirtualMachineStatusCodeCount] + """ + + _validation = { + 'statuses_summary': {'readonly': True}, + } + + _attribute_map = { + 'statuses_summary': {'key': 'statusesSummary', 'type': '[VirtualMachineStatusCodeCount]'}, + } + + def __init__(self, **kwargs) -> None: + super(VirtualMachineScaleSetInstanceViewStatusesSummary, self).__init__(**kwargs) + self.statuses_summary = None + + +class VirtualMachineScaleSetIPConfiguration(SubResource): + """Describes a virtual machine scale set network profile's IP configuration. + + All required parameters must be populated in order to send to Azure. + + :param id: Resource Id + :type id: str + :param name: Required. The IP configuration name. + :type name: str + :param subnet: Required. The subnet. + :type subnet: + ~azure.mgmt.compute.v2016_04_30_preview.models.ApiEntityReference + :param application_gateway_backend_address_pools: The application gateway + backend address pools. + :type application_gateway_backend_address_pools: + list[~azure.mgmt.compute.v2016_04_30_preview.models.SubResource] + :param load_balancer_backend_address_pools: The load balancer backend + address pools. + :type load_balancer_backend_address_pools: + list[~azure.mgmt.compute.v2016_04_30_preview.models.SubResource] + :param load_balancer_inbound_nat_pools: The load balancer inbound nat + pools. + :type load_balancer_inbound_nat_pools: + list[~azure.mgmt.compute.v2016_04_30_preview.models.SubResource] + """ + + _validation = { + 'name': {'required': True}, + 'subnet': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'subnet': {'key': 'properties.subnet', 'type': 'ApiEntityReference'}, + 'application_gateway_backend_address_pools': {'key': 'properties.applicationGatewayBackendAddressPools', 'type': '[SubResource]'}, + 'load_balancer_backend_address_pools': {'key': 'properties.loadBalancerBackendAddressPools', 'type': '[SubResource]'}, + 'load_balancer_inbound_nat_pools': {'key': 'properties.loadBalancerInboundNatPools', 'type': '[SubResource]'}, + } + + def __init__(self, *, name: str, subnet, id: str=None, application_gateway_backend_address_pools=None, load_balancer_backend_address_pools=None, load_balancer_inbound_nat_pools=None, **kwargs) -> None: + super(VirtualMachineScaleSetIPConfiguration, self).__init__(id=id, **kwargs) + self.name = name + self.subnet = subnet + self.application_gateway_backend_address_pools = application_gateway_backend_address_pools + self.load_balancer_backend_address_pools = load_balancer_backend_address_pools + self.load_balancer_inbound_nat_pools = load_balancer_inbound_nat_pools + + +class VirtualMachineScaleSetManagedDiskParameters(Model): + """Describes the parameters of a ScaleSet managed disk. + + :param storage_account_type: Specifies the storage account type for the + managed disk. Possible values are: Standard_LRS or Premium_LRS. Possible + values include: 'Standard_LRS', 'Premium_LRS' + :type storage_account_type: str or + ~azure.mgmt.compute.v2016_04_30_preview.models.StorageAccountTypes + """ + + _attribute_map = { + 'storage_account_type': {'key': 'storageAccountType', 'type': 'StorageAccountTypes'}, + } + + def __init__(self, *, storage_account_type=None, **kwargs) -> None: + super(VirtualMachineScaleSetManagedDiskParameters, self).__init__(**kwargs) + self.storage_account_type = storage_account_type + + +class VirtualMachineScaleSetNetworkConfiguration(SubResource): + """Describes a virtual machine scale set network profile's network + configurations. + + All required parameters must be populated in order to send to Azure. + + :param id: Resource Id + :type id: str + :param name: Required. The network configuration name. + :type name: str + :param primary: Whether this is a primary NIC on a virtual machine. + :type primary: bool + :param ip_configurations: Required. The virtual machine scale set IP + Configuration. + :type ip_configurations: + list[~azure.mgmt.compute.v2016_04_30_preview.models.VirtualMachineScaleSetIPConfiguration] + """ + + _validation = { + 'name': {'required': True}, + 'ip_configurations': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'primary': {'key': 'properties.primary', 'type': 'bool'}, + 'ip_configurations': {'key': 'properties.ipConfigurations', 'type': '[VirtualMachineScaleSetIPConfiguration]'}, + } + + def __init__(self, *, name: str, ip_configurations, id: str=None, primary: bool=None, **kwargs) -> None: + super(VirtualMachineScaleSetNetworkConfiguration, self).__init__(id=id, **kwargs) + self.name = name + self.primary = primary + self.ip_configurations = ip_configurations + + +class VirtualMachineScaleSetNetworkProfile(Model): + """Describes a virtual machine scale set network profile. + + :param network_interface_configurations: The list of network + configurations. + :type network_interface_configurations: + list[~azure.mgmt.compute.v2016_04_30_preview.models.VirtualMachineScaleSetNetworkConfiguration] + """ + + _attribute_map = { + 'network_interface_configurations': {'key': 'networkInterfaceConfigurations', 'type': '[VirtualMachineScaleSetNetworkConfiguration]'}, + } + + def __init__(self, *, network_interface_configurations=None, **kwargs) -> None: + super(VirtualMachineScaleSetNetworkProfile, self).__init__(**kwargs) + self.network_interface_configurations = network_interface_configurations + + +class VirtualMachineScaleSetOSDisk(Model): + """Describes a virtual machine scale set operating system disk. + + All required parameters must be populated in order to send to Azure. + + :param name: The disk name. + :type name: str + :param caching: Specifies the caching requirements.

    Possible + values are:

    **None**

    **ReadOnly**

    **ReadWrite** +

    Default: **None for Standard storage. ReadOnly for Premium + storage**. Possible values include: 'None', 'ReadOnly', 'ReadWrite' + :type caching: str or + ~azure.mgmt.compute.v2016_04_30_preview.models.CachingTypes + :param create_option: Required. Specifies how the virtual machines in the + scale set should be created.

    The only allowed value is: + **FromImage** \\u2013 This value is used when you are using an image to + create the virtual machine. If you are using a platform image, you also + use the imageReference element described above. If you are using a + marketplace image, you also use the plan element previously described. + Possible values include: 'FromImage', 'Empty', 'Attach' + :type create_option: str or + ~azure.mgmt.compute.v2016_04_30_preview.models.DiskCreateOptionTypes + :param os_type: This property allows you to specify the type of the OS + that is included in the disk if creating a VM from user-image or a + specialized VHD.

    Possible values are:

    **Windows** +

    **Linux**. Possible values include: 'Windows', 'Linux' + :type os_type: str or + ~azure.mgmt.compute.v2016_04_30_preview.models.OperatingSystemTypes + :param image: The Source User Image VirtualHardDisk. This VirtualHardDisk + will be copied before using it to attach to the Virtual Machine. If + SourceImage is provided, the destination VirtualHardDisk should not exist. + :type image: + ~azure.mgmt.compute.v2016_04_30_preview.models.VirtualHardDisk + :param vhd_containers: The list of virtual hard disk container uris. + :type vhd_containers: list[str] + :param managed_disk: The managed disk parameters. + :type managed_disk: + ~azure.mgmt.compute.v2016_04_30_preview.models.VirtualMachineScaleSetManagedDiskParameters + """ + + _validation = { + 'create_option': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'caching': {'key': 'caching', 'type': 'CachingTypes'}, + 'create_option': {'key': 'createOption', 'type': 'DiskCreateOptionTypes'}, + 'os_type': {'key': 'osType', 'type': 'OperatingSystemTypes'}, + 'image': {'key': 'image', 'type': 'VirtualHardDisk'}, + 'vhd_containers': {'key': 'vhdContainers', 'type': '[str]'}, + 'managed_disk': {'key': 'managedDisk', 'type': 'VirtualMachineScaleSetManagedDiskParameters'}, + } + + def __init__(self, *, create_option, name: str=None, caching=None, os_type=None, image=None, vhd_containers=None, managed_disk=None, **kwargs) -> None: + super(VirtualMachineScaleSetOSDisk, self).__init__(**kwargs) + self.name = name + self.caching = caching + self.create_option = create_option + self.os_type = os_type + self.image = image + self.vhd_containers = vhd_containers + self.managed_disk = managed_disk + + +class VirtualMachineScaleSetOSProfile(Model): + """Describes a virtual machine scale set OS profile. + + :param computer_name_prefix: Specifies the computer name prefix for all of + the virtual machines in the scale set. Computer name prefixes must be 1 to + 15 characters long. + :type computer_name_prefix: str + :param admin_username: Specifies the name of the administrator account. +

    **Windows-only restriction:** Cannot end in "."

    + **Disallowed values:** "administrator", "admin", "user", "user1", "test", + "user2", "test1", "user3", "admin1", "1", "123", "a", "actuser", "adm", + "admin2", "aspnet", "backup", "console", "david", "guest", "john", + "owner", "root", "server", "sql", "support", "support_388945a0", "sys", + "test2", "test3", "user4", "user5".

    **Minimum-length (Linux):** 1 + character

    **Max-length (Linux):** 64 characters

    + **Max-length (Windows):** 20 characters

  • For root access to + the Linux VM, see [Using root privileges on Linux virtual machines in + Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-use-root-privileges?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json)
  • + For a list of built-in system users on Linux that should not be used in + this field, see [Selecting User Names for Linux on + Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-usernames?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json) + :type admin_username: str + :param admin_password: Specifies the password of the administrator + account.

    **Minimum-length (Windows):** 8 characters

    + **Minimum-length (Linux):** 6 characters

    **Max-length + (Windows):** 123 characters

    **Max-length (Linux):** 72 characters +

    **Complexity requirements:** 3 out of 4 conditions below need to + be fulfilled
    Has lower characters
    Has upper characters
    Has a + digit
    Has a special character (Regex match [\\W_])

    + **Disallowed values:** "abc@123", "P@$$w0rd", "P@ssw0rd", "P@ssword123", + "Pa$$word", "pass@word1", "Password!", "Password1", "Password22", + "iloveyou!"

    For resetting the password, see [How to reset the + Remote Desktop service or its login password in a Windows + VM](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-reset-rdp?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json) +

    For resetting root password, see [Manage users, SSH, and check or + repair disks on Azure Linux VMs using the VMAccess + Extension](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-using-vmaccess-extension?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json#reset-root-password) + :type admin_password: str + :param custom_data: A base-64 encoded string of custom data. + :type custom_data: str + :param windows_configuration: The Windows Configuration of the OS profile. + :type windows_configuration: + ~azure.mgmt.compute.v2016_04_30_preview.models.WindowsConfiguration + :param linux_configuration: The Linux Configuration of the OS profile. + :type linux_configuration: + ~azure.mgmt.compute.v2016_04_30_preview.models.LinuxConfiguration + :param secrets: The List of certificates for addition to the VM. + :type secrets: + list[~azure.mgmt.compute.v2016_04_30_preview.models.VaultSecretGroup] + """ + + _attribute_map = { + 'computer_name_prefix': {'key': 'computerNamePrefix', 'type': 'str'}, + 'admin_username': {'key': 'adminUsername', 'type': 'str'}, + 'admin_password': {'key': 'adminPassword', 'type': 'str'}, + 'custom_data': {'key': 'customData', 'type': 'str'}, + 'windows_configuration': {'key': 'windowsConfiguration', 'type': 'WindowsConfiguration'}, + 'linux_configuration': {'key': 'linuxConfiguration', 'type': 'LinuxConfiguration'}, + 'secrets': {'key': 'secrets', 'type': '[VaultSecretGroup]'}, + } + + def __init__(self, *, computer_name_prefix: str=None, admin_username: str=None, admin_password: str=None, custom_data: str=None, windows_configuration=None, linux_configuration=None, secrets=None, **kwargs) -> None: + super(VirtualMachineScaleSetOSProfile, self).__init__(**kwargs) + self.computer_name_prefix = computer_name_prefix + self.admin_username = admin_username + self.admin_password = admin_password + self.custom_data = custom_data + self.windows_configuration = windows_configuration + self.linux_configuration = linux_configuration + self.secrets = secrets + + +class VirtualMachineScaleSetSku(Model): + """Describes an available virtual machine scale set sku. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar resource_type: The type of resource the sku applies to. + :vartype resource_type: str + :ivar sku: The Sku. + :vartype sku: ~azure.mgmt.compute.v2016_04_30_preview.models.Sku + :ivar capacity: Specifies the number of virtual machines in the scale set. + :vartype capacity: + ~azure.mgmt.compute.v2016_04_30_preview.models.VirtualMachineScaleSetSkuCapacity + """ + + _validation = { + 'resource_type': {'readonly': True}, + 'sku': {'readonly': True}, + 'capacity': {'readonly': True}, + } + + _attribute_map = { + 'resource_type': {'key': 'resourceType', 'type': 'str'}, + 'sku': {'key': 'sku', 'type': 'Sku'}, + 'capacity': {'key': 'capacity', 'type': 'VirtualMachineScaleSetSkuCapacity'}, + } + + def __init__(self, **kwargs) -> None: + super(VirtualMachineScaleSetSku, self).__init__(**kwargs) + self.resource_type = None + self.sku = None + self.capacity = None + + +class VirtualMachineScaleSetSkuCapacity(Model): + """Describes scaling information of a sku. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar minimum: The minimum capacity. + :vartype minimum: long + :ivar maximum: The maximum capacity that can be set. + :vartype maximum: long + :ivar default_capacity: The default capacity. + :vartype default_capacity: long + :ivar scale_type: The scale type applicable to the sku. Possible values + include: 'Automatic', 'None' + :vartype scale_type: str or + ~azure.mgmt.compute.v2016_04_30_preview.models.VirtualMachineScaleSetSkuScaleType + """ + + _validation = { + 'minimum': {'readonly': True}, + 'maximum': {'readonly': True}, + 'default_capacity': {'readonly': True}, + 'scale_type': {'readonly': True}, + } + + _attribute_map = { + 'minimum': {'key': 'minimum', 'type': 'long'}, + 'maximum': {'key': 'maximum', 'type': 'long'}, + 'default_capacity': {'key': 'defaultCapacity', 'type': 'long'}, + 'scale_type': {'key': 'scaleType', 'type': 'VirtualMachineScaleSetSkuScaleType'}, + } + + def __init__(self, **kwargs) -> None: + super(VirtualMachineScaleSetSkuCapacity, self).__init__(**kwargs) + self.minimum = None + self.maximum = None + self.default_capacity = None + self.scale_type = None + + +class VirtualMachineScaleSetStorageProfile(Model): + """Describes a virtual machine scale set storage profile. + + :param image_reference: The image reference. + :type image_reference: + ~azure.mgmt.compute.v2016_04_30_preview.models.ImageReference + :param os_disk: The OS disk. + :type os_disk: + ~azure.mgmt.compute.v2016_04_30_preview.models.VirtualMachineScaleSetOSDisk + :param data_disks: The data disks. + :type data_disks: + list[~azure.mgmt.compute.v2016_04_30_preview.models.VirtualMachineScaleSetDataDisk] + """ + + _attribute_map = { + 'image_reference': {'key': 'imageReference', 'type': 'ImageReference'}, + 'os_disk': {'key': 'osDisk', 'type': 'VirtualMachineScaleSetOSDisk'}, + 'data_disks': {'key': 'dataDisks', 'type': '[VirtualMachineScaleSetDataDisk]'}, + } + + def __init__(self, *, image_reference=None, os_disk=None, data_disks=None, **kwargs) -> None: + super(VirtualMachineScaleSetStorageProfile, self).__init__(**kwargs) + self.image_reference = image_reference + self.os_disk = os_disk + self.data_disks = data_disks + + +class VirtualMachineScaleSetVM(Resource): + """Describes a virtual machine scale set virtual machine. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource Id + :vartype id: str + :ivar name: Resource name + :vartype name: str + :ivar type: Resource type + :vartype type: str + :param location: Required. Resource location + :type location: str + :param tags: Resource tags + :type tags: dict[str, str] + :ivar instance_id: The virtual machine instance ID. + :vartype instance_id: str + :ivar sku: The virtual machine SKU. + :vartype sku: ~azure.mgmt.compute.v2016_04_30_preview.models.Sku + :ivar latest_model_applied: Specifies whether the latest model has been + applied to the virtual machine. + :vartype latest_model_applied: bool + :ivar vm_id: Azure VM unique ID. + :vartype vm_id: str + :ivar instance_view: The virtual machine instance view. + :vartype instance_view: + ~azure.mgmt.compute.v2016_04_30_preview.models.VirtualMachineScaleSetVMInstanceView + :param hardware_profile: Specifies the hardware settings for the virtual + machine. + :type hardware_profile: + ~azure.mgmt.compute.v2016_04_30_preview.models.HardwareProfile + :param storage_profile: Specifies the storage settings for the virtual + machine disks. + :type storage_profile: + ~azure.mgmt.compute.v2016_04_30_preview.models.StorageProfile + :param os_profile: Specifies the operating system settings for the virtual + machine. + :type os_profile: ~azure.mgmt.compute.v2016_04_30_preview.models.OSProfile + :param network_profile: Specifies the network interfaces of the virtual + machine. + :type network_profile: + ~azure.mgmt.compute.v2016_04_30_preview.models.NetworkProfile + :param diagnostics_profile: Specifies the boot diagnostic settings state. +

    Minimum api-version: 2015-06-15. + :type diagnostics_profile: + ~azure.mgmt.compute.v2016_04_30_preview.models.DiagnosticsProfile + :param availability_set: Specifies information about the availability set + that the virtual machine should be assigned to. Virtual machines specified + in the same availability set are allocated to different nodes to maximize + availability. For more information about availability sets, see [Manage + the availability of virtual + machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-manage-availability?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). +

    For more information on Azure planned maintenance, see [Planned + maintenance for virtual machines in + Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-planned-maintenance?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json) +

    Currently, a VM can only be added to availability set at creation + time. An existing VM cannot be added to an availability set. + :type availability_set: + ~azure.mgmt.compute.v2016_04_30_preview.models.SubResource + :ivar provisioning_state: The provisioning state, which only appears in + the response. + :vartype provisioning_state: str + :param license_type: Specifies that the image or disk that is being used + was licensed on-premises. This element is only used for images that + contain the Windows Server operating system.

    Possible values are: +

    Windows_Client

    Windows_Server

    If this element + is included in a request for an update, the value must match the initial + value. This value cannot be updated.

    For more information, see + [Azure Hybrid Use Benefit for Windows + Server](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-hybrid-use-benefit-licensing?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json) +

    Minimum api-version: 2015-06-15 + :type license_type: str + :param plan: Specifies information about the marketplace image used to + create the virtual machine. This element is only used for marketplace + images. Before you can use a marketplace image from an API, you must + enable the image for programmatic use. In the Azure portal, find the + marketplace image that you want to use and then click **Want to deploy + programmatically, Get Started ->**. Enter any required information and + then click **Save**. + :type plan: ~azure.mgmt.compute.v2016_04_30_preview.models.Plan + :ivar resources: The virtual machine child extension resources. + :vartype resources: + list[~azure.mgmt.compute.v2016_04_30_preview.models.VirtualMachineExtension] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + 'instance_id': {'readonly': True}, + 'sku': {'readonly': True}, + 'latest_model_applied': {'readonly': True}, + 'vm_id': {'readonly': True}, + 'instance_view': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + 'resources': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'instance_id': {'key': 'instanceId', 'type': 'str'}, + 'sku': {'key': 'sku', 'type': 'Sku'}, + 'latest_model_applied': {'key': 'properties.latestModelApplied', 'type': 'bool'}, + 'vm_id': {'key': 'properties.vmId', 'type': 'str'}, + 'instance_view': {'key': 'properties.instanceView', 'type': 'VirtualMachineScaleSetVMInstanceView'}, + 'hardware_profile': {'key': 'properties.hardwareProfile', 'type': 'HardwareProfile'}, + 'storage_profile': {'key': 'properties.storageProfile', 'type': 'StorageProfile'}, + 'os_profile': {'key': 'properties.osProfile', 'type': 'OSProfile'}, + 'network_profile': {'key': 'properties.networkProfile', 'type': 'NetworkProfile'}, + 'diagnostics_profile': {'key': 'properties.diagnosticsProfile', 'type': 'DiagnosticsProfile'}, + 'availability_set': {'key': 'properties.availabilitySet', 'type': 'SubResource'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'license_type': {'key': 'properties.licenseType', 'type': 'str'}, + 'plan': {'key': 'plan', 'type': 'Plan'}, + 'resources': {'key': 'resources', 'type': '[VirtualMachineExtension]'}, + } + + def __init__(self, *, location: str, tags=None, hardware_profile=None, storage_profile=None, os_profile=None, network_profile=None, diagnostics_profile=None, availability_set=None, license_type: str=None, plan=None, **kwargs) -> None: + super(VirtualMachineScaleSetVM, self).__init__(location=location, tags=tags, **kwargs) + self.instance_id = None + self.sku = None + self.latest_model_applied = None + self.vm_id = None + self.instance_view = None + self.hardware_profile = hardware_profile + self.storage_profile = storage_profile + self.os_profile = os_profile + self.network_profile = network_profile + self.diagnostics_profile = diagnostics_profile + self.availability_set = availability_set + self.provisioning_state = None + self.license_type = license_type + self.plan = plan + self.resources = None + + +class VirtualMachineScaleSetVMExtensionsSummary(Model): + """Extensions summary for virtual machines of a virtual machine scale set. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar name: The extension name. + :vartype name: str + :ivar statuses_summary: The extensions information. + :vartype statuses_summary: + list[~azure.mgmt.compute.v2016_04_30_preview.models.VirtualMachineStatusCodeCount] + """ + + _validation = { + 'name': {'readonly': True}, + 'statuses_summary': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'statuses_summary': {'key': 'statusesSummary', 'type': '[VirtualMachineStatusCodeCount]'}, + } + + def __init__(self, **kwargs) -> None: + super(VirtualMachineScaleSetVMExtensionsSummary, self).__init__(**kwargs) + self.name = None + self.statuses_summary = None + + +class VirtualMachineScaleSetVMInstanceIDs(Model): + """Specifies a list of virtual machine instance IDs from the VM scale set. + + :param instance_ids: The virtual machine scale set instance ids. Omitting + the virtual machine scale set instance ids will result in the operation + being performed on all virtual machines in the virtual machine scale set. + :type instance_ids: list[str] + """ + + _attribute_map = { + 'instance_ids': {'key': 'instanceIds', 'type': '[str]'}, + } + + def __init__(self, *, instance_ids=None, **kwargs) -> None: + super(VirtualMachineScaleSetVMInstanceIDs, self).__init__(**kwargs) + self.instance_ids = instance_ids + + +class VirtualMachineScaleSetVMInstanceRequiredIDs(Model): + """Specifies a list of virtual machine instance IDs from the VM scale set. + + All required parameters must be populated in order to send to Azure. + + :param instance_ids: Required. The virtual machine scale set instance ids. + :type instance_ids: list[str] + """ + + _validation = { + 'instance_ids': {'required': True}, + } + + _attribute_map = { + 'instance_ids': {'key': 'instanceIds', 'type': '[str]'}, + } + + def __init__(self, *, instance_ids, **kwargs) -> None: + super(VirtualMachineScaleSetVMInstanceRequiredIDs, self).__init__(**kwargs) + self.instance_ids = instance_ids + + +class VirtualMachineScaleSetVMInstanceView(Model): + """The instance view of a virtual machine scale set VM. + + :param platform_update_domain: The Update Domain count. + :type platform_update_domain: int + :param platform_fault_domain: The Fault Domain count. + :type platform_fault_domain: int + :param rdp_thumb_print: The Remote desktop certificate thumbprint. + :type rdp_thumb_print: str + :param vm_agent: The VM Agent running on the virtual machine. + :type vm_agent: + ~azure.mgmt.compute.v2016_04_30_preview.models.VirtualMachineAgentInstanceView + :param disks: The disks information. + :type disks: + list[~azure.mgmt.compute.v2016_04_30_preview.models.DiskInstanceView] + :param extensions: The extensions information. + :type extensions: + list[~azure.mgmt.compute.v2016_04_30_preview.models.VirtualMachineExtensionInstanceView] + :param boot_diagnostics: Boot Diagnostics is a debugging feature which + allows you to view Console Output and Screenshot to diagnose VM status. +

    You can easily view the output of your console log.

    + Azure also enables you to see a screenshot of the VM from the hypervisor. + :type boot_diagnostics: + ~azure.mgmt.compute.v2016_04_30_preview.models.BootDiagnosticsInstanceView + :param statuses: The resource status information. + :type statuses: + list[~azure.mgmt.compute.v2016_04_30_preview.models.InstanceViewStatus] + :param placement_group_id: The placement group in which the VM is running. + If the VM is deallocated it will not have a placementGroupId. + :type placement_group_id: str + """ + + _attribute_map = { + 'platform_update_domain': {'key': 'platformUpdateDomain', 'type': 'int'}, + 'platform_fault_domain': {'key': 'platformFaultDomain', 'type': 'int'}, + 'rdp_thumb_print': {'key': 'rdpThumbPrint', 'type': 'str'}, + 'vm_agent': {'key': 'vmAgent', 'type': 'VirtualMachineAgentInstanceView'}, + 'disks': {'key': 'disks', 'type': '[DiskInstanceView]'}, + 'extensions': {'key': 'extensions', 'type': '[VirtualMachineExtensionInstanceView]'}, + 'boot_diagnostics': {'key': 'bootDiagnostics', 'type': 'BootDiagnosticsInstanceView'}, + 'statuses': {'key': 'statuses', 'type': '[InstanceViewStatus]'}, + 'placement_group_id': {'key': 'placementGroupId', 'type': 'str'}, + } + + def __init__(self, *, platform_update_domain: int=None, platform_fault_domain: int=None, rdp_thumb_print: str=None, vm_agent=None, disks=None, extensions=None, boot_diagnostics=None, statuses=None, placement_group_id: str=None, **kwargs) -> None: + super(VirtualMachineScaleSetVMInstanceView, self).__init__(**kwargs) + self.platform_update_domain = platform_update_domain + self.platform_fault_domain = platform_fault_domain + self.rdp_thumb_print = rdp_thumb_print + self.vm_agent = vm_agent + self.disks = disks + self.extensions = extensions + self.boot_diagnostics = boot_diagnostics + self.statuses = statuses + self.placement_group_id = placement_group_id + + +class VirtualMachineScaleSetVMProfile(Model): + """Describes a virtual machine scale set virtual machine profile. + + :param os_profile: The virtual machine scale set OS profile. + :type os_profile: + ~azure.mgmt.compute.v2016_04_30_preview.models.VirtualMachineScaleSetOSProfile + :param storage_profile: The virtual machine scale set storage profile. + :type storage_profile: + ~azure.mgmt.compute.v2016_04_30_preview.models.VirtualMachineScaleSetStorageProfile + :param network_profile: The virtual machine scale set network profile. + :type network_profile: + ~azure.mgmt.compute.v2016_04_30_preview.models.VirtualMachineScaleSetNetworkProfile + :param extension_profile: The virtual machine scale set extension profile. + :type extension_profile: + ~azure.mgmt.compute.v2016_04_30_preview.models.VirtualMachineScaleSetExtensionProfile + """ + + _attribute_map = { + 'os_profile': {'key': 'osProfile', 'type': 'VirtualMachineScaleSetOSProfile'}, + 'storage_profile': {'key': 'storageProfile', 'type': 'VirtualMachineScaleSetStorageProfile'}, + 'network_profile': {'key': 'networkProfile', 'type': 'VirtualMachineScaleSetNetworkProfile'}, + 'extension_profile': {'key': 'extensionProfile', 'type': 'VirtualMachineScaleSetExtensionProfile'}, + } + + def __init__(self, *, os_profile=None, storage_profile=None, network_profile=None, extension_profile=None, **kwargs) -> None: + super(VirtualMachineScaleSetVMProfile, self).__init__(**kwargs) + self.os_profile = os_profile + self.storage_profile = storage_profile + self.network_profile = network_profile + self.extension_profile = extension_profile + + +class VirtualMachineSize(Model): + """Describes the properties of a VM size. + + :param name: The name of the virtual machine size. + :type name: str + :param number_of_cores: The number of cores supported by the virtual + machine size. + :type number_of_cores: int + :param os_disk_size_in_mb: The OS disk size, in MB, allowed by the virtual + machine size. + :type os_disk_size_in_mb: int + :param resource_disk_size_in_mb: The resource disk size, in MB, allowed by + the virtual machine size. + :type resource_disk_size_in_mb: int + :param memory_in_mb: The amount of memory, in MB, supported by the virtual + machine size. + :type memory_in_mb: int + :param max_data_disk_count: The maximum number of data disks that can be + attached to the virtual machine size. + :type max_data_disk_count: int + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'number_of_cores': {'key': 'numberOfCores', 'type': 'int'}, + 'os_disk_size_in_mb': {'key': 'osDiskSizeInMB', 'type': 'int'}, + 'resource_disk_size_in_mb': {'key': 'resourceDiskSizeInMB', 'type': 'int'}, + 'memory_in_mb': {'key': 'memoryInMB', 'type': 'int'}, + 'max_data_disk_count': {'key': 'maxDataDiskCount', 'type': 'int'}, + } + + def __init__(self, *, name: str=None, number_of_cores: int=None, os_disk_size_in_mb: int=None, resource_disk_size_in_mb: int=None, memory_in_mb: int=None, max_data_disk_count: int=None, **kwargs) -> None: + super(VirtualMachineSize, self).__init__(**kwargs) + self.name = name + self.number_of_cores = number_of_cores + self.os_disk_size_in_mb = os_disk_size_in_mb + self.resource_disk_size_in_mb = resource_disk_size_in_mb + self.memory_in_mb = memory_in_mb + self.max_data_disk_count = max_data_disk_count + + +class VirtualMachineStatusCodeCount(Model): + """The status code and count of the virtual machine scale set instance view + status summary. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar code: The instance view status code. + :vartype code: str + :ivar count: The number of instances having a particular status code. + :vartype count: int + """ + + _validation = { + 'code': {'readonly': True}, + 'count': {'readonly': True}, + } + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + 'count': {'key': 'count', 'type': 'int'}, + } + + def __init__(self, **kwargs) -> None: + super(VirtualMachineStatusCodeCount, self).__init__(**kwargs) + self.code = None + self.count = None + + +class WindowsConfiguration(Model): + """Specifies Windows operating system settings on the virtual machine. + + :param provision_vm_agent: Indicates whether virtual machine agent should + be provisioned on the virtual machine.

    When this property is not + specified in the request body, default behavior is to set it to true. + This will ensure that VM Agent is installed on the VM so that extensions + can be added to the VM later. + :type provision_vm_agent: bool + :param enable_automatic_updates: Indicates whether virtual machine is + enabled for automatic updates. + :type enable_automatic_updates: bool + :param time_zone: Specifies the time zone of the virtual machine. e.g. + "Pacific Standard Time" + :type time_zone: str + :param additional_unattend_content: Specifies additional base-64 encoded + XML formatted information that can be included in the Unattend.xml file, + which is used by Windows Setup. + :type additional_unattend_content: + list[~azure.mgmt.compute.v2016_04_30_preview.models.AdditionalUnattendContent] + :param win_rm: Specifies the Windows Remote Management listeners. This + enables remote Windows PowerShell. + :type win_rm: + ~azure.mgmt.compute.v2016_04_30_preview.models.WinRMConfiguration + """ + + _attribute_map = { + 'provision_vm_agent': {'key': 'provisionVMAgent', 'type': 'bool'}, + 'enable_automatic_updates': {'key': 'enableAutomaticUpdates', 'type': 'bool'}, + 'time_zone': {'key': 'timeZone', 'type': 'str'}, + 'additional_unattend_content': {'key': 'additionalUnattendContent', 'type': '[AdditionalUnattendContent]'}, + 'win_rm': {'key': 'winRM', 'type': 'WinRMConfiguration'}, + } + + def __init__(self, *, provision_vm_agent: bool=None, enable_automatic_updates: bool=None, time_zone: str=None, additional_unattend_content=None, win_rm=None, **kwargs) -> None: + super(WindowsConfiguration, self).__init__(**kwargs) + self.provision_vm_agent = provision_vm_agent + self.enable_automatic_updates = enable_automatic_updates + self.time_zone = time_zone + self.additional_unattend_content = additional_unattend_content + self.win_rm = win_rm + + +class WinRMConfiguration(Model): + """Describes Windows Remote Management configuration of the VM. + + :param listeners: The list of Windows Remote Management listeners + :type listeners: + list[~azure.mgmt.compute.v2016_04_30_preview.models.WinRMListener] + """ + + _attribute_map = { + 'listeners': {'key': 'listeners', 'type': '[WinRMListener]'}, + } + + def __init__(self, *, listeners=None, **kwargs) -> None: + super(WinRMConfiguration, self).__init__(**kwargs) + self.listeners = listeners + + +class WinRMListener(Model): + """Describes Protocol and thumbprint of Windows Remote Management listener. + + :param protocol: Specifies the protocol of listener.

    Possible + values are:
    **http**

    **https**. Possible values include: + 'Http', 'Https' + :type protocol: str or + ~azure.mgmt.compute.v2016_04_30_preview.models.ProtocolTypes + :param certificate_url: This is the URL of a certificate that has been + uploaded to Key Vault as a secret. For adding a secret to the Key Vault, + see [Add a key or secret to the key + vault](https://docs.microsoft.com/azure/key-vault/key-vault-get-started/#add). + In this case, your certificate needs to be It is the Base64 encoding of + the following JSON Object which is encoded in UTF-8:

    {
    + "data":"",
    "dataType":"pfx",
    + "password":""
    } + :type certificate_url: str + """ + + _attribute_map = { + 'protocol': {'key': 'protocol', 'type': 'ProtocolTypes'}, + 'certificate_url': {'key': 'certificateUrl', 'type': 'str'}, + } + + def __init__(self, *, protocol=None, certificate_url: str=None, **kwargs) -> None: + super(WinRMListener, self).__init__(**kwargs) + self.protocol = protocol + self.certificate_url = certificate_url diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/_paged_models.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/_paged_models.py new file mode 100644 index 000000000000..a3e7cadf4c2a --- /dev/null +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/_paged_models.py @@ -0,0 +1,144 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.paging import Paged + + +class AvailabilitySetPaged(Paged): + """ + A paging container for iterating over a list of :class:`AvailabilitySet ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[AvailabilitySet]'} + } + + def __init__(self, *args, **kwargs): + + super(AvailabilitySetPaged, self).__init__(*args, **kwargs) +class VirtualMachineSizePaged(Paged): + """ + A paging container for iterating over a list of :class:`VirtualMachineSize ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[VirtualMachineSize]'} + } + + def __init__(self, *args, **kwargs): + + super(VirtualMachineSizePaged, self).__init__(*args, **kwargs) +class VirtualMachinePaged(Paged): + """ + A paging container for iterating over a list of :class:`VirtualMachine ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[VirtualMachine]'} + } + + def __init__(self, *args, **kwargs): + + super(VirtualMachinePaged, self).__init__(*args, **kwargs) +class UsagePaged(Paged): + """ + A paging container for iterating over a list of :class:`Usage ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[Usage]'} + } + + def __init__(self, *args, **kwargs): + + super(UsagePaged, self).__init__(*args, **kwargs) +class ImagePaged(Paged): + """ + A paging container for iterating over a list of :class:`Image ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[Image]'} + } + + def __init__(self, *args, **kwargs): + + super(ImagePaged, self).__init__(*args, **kwargs) +class VirtualMachineScaleSetPaged(Paged): + """ + A paging container for iterating over a list of :class:`VirtualMachineScaleSet ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[VirtualMachineScaleSet]'} + } + + def __init__(self, *args, **kwargs): + + super(VirtualMachineScaleSetPaged, self).__init__(*args, **kwargs) +class VirtualMachineScaleSetSkuPaged(Paged): + """ + A paging container for iterating over a list of :class:`VirtualMachineScaleSetSku ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[VirtualMachineScaleSetSku]'} + } + + def __init__(self, *args, **kwargs): + + super(VirtualMachineScaleSetSkuPaged, self).__init__(*args, **kwargs) +class VirtualMachineScaleSetVMPaged(Paged): + """ + A paging container for iterating over a list of :class:`VirtualMachineScaleSetVM ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[VirtualMachineScaleSetVM]'} + } + + def __init__(self, *args, **kwargs): + + super(VirtualMachineScaleSetVMPaged, self).__init__(*args, **kwargs) +class DiskPaged(Paged): + """ + A paging container for iterating over a list of :class:`Disk ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[Disk]'} + } + + def __init__(self, *args, **kwargs): + + super(DiskPaged, self).__init__(*args, **kwargs) +class SnapshotPaged(Paged): + """ + A paging container for iterating over a list of :class:`Snapshot ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[Snapshot]'} + } + + def __init__(self, *args, **kwargs): + + super(SnapshotPaged, self).__init__(*args, **kwargs) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/access_uri.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/access_uri.py deleted file mode 100644 index 9ee6b01de1e1..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/access_uri.py +++ /dev/null @@ -1,35 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class AccessUri(Model): - """A disk access SAS uri. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar access_sas: A SAS uri for accessing a disk. - :vartype access_sas: str - """ - - _validation = { - 'access_sas': {'readonly': True}, - } - - _attribute_map = { - 'access_sas': {'key': 'properties.output.accessSAS', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(AccessUri, self).__init__(**kwargs) - self.access_sas = None diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/access_uri_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/access_uri_py3.py deleted file mode 100644 index bb9e56aa4221..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/access_uri_py3.py +++ /dev/null @@ -1,35 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class AccessUri(Model): - """A disk access SAS uri. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar access_sas: A SAS uri for accessing a disk. - :vartype access_sas: str - """ - - _validation = { - 'access_sas': {'readonly': True}, - } - - _attribute_map = { - 'access_sas': {'key': 'properties.output.accessSAS', 'type': 'str'}, - } - - def __init__(self, **kwargs) -> None: - super(AccessUri, self).__init__(**kwargs) - self.access_sas = None diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/additional_unattend_content.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/additional_unattend_content.py deleted file mode 100644 index 01ffa6dc685d..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/additional_unattend_content.py +++ /dev/null @@ -1,53 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class AdditionalUnattendContent(Model): - """Specifies additional XML formatted information that can be included in the - Unattend.xml file, which is used by Windows Setup. Contents are defined by - setting name, component name, and the pass in which the content is applied. - - :param pass_name: The pass name. Currently, the only allowable value is - OobeSystem. Possible values include: 'OobeSystem' - :type pass_name: str or - ~azure.mgmt.compute.v2016_04_30_preview.models.PassNames - :param component_name: The component name. Currently, the only allowable - value is Microsoft-Windows-Shell-Setup. Possible values include: - 'Microsoft-Windows-Shell-Setup' - :type component_name: str or - ~azure.mgmt.compute.v2016_04_30_preview.models.ComponentNames - :param setting_name: Specifies the name of the setting to which the - content applies. Possible values are: FirstLogonCommands and AutoLogon. - Possible values include: 'AutoLogon', 'FirstLogonCommands' - :type setting_name: str or - ~azure.mgmt.compute.v2016_04_30_preview.models.SettingNames - :param content: Specifies the XML formatted content that is added to the - unattend.xml file for the specified path and component. The XML must be - less than 4KB and must include the root element for the setting or feature - that is being inserted. - :type content: str - """ - - _attribute_map = { - 'pass_name': {'key': 'passName', 'type': 'PassNames'}, - 'component_name': {'key': 'componentName', 'type': 'ComponentNames'}, - 'setting_name': {'key': 'settingName', 'type': 'SettingNames'}, - 'content': {'key': 'content', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(AdditionalUnattendContent, self).__init__(**kwargs) - self.pass_name = kwargs.get('pass_name', None) - self.component_name = kwargs.get('component_name', None) - self.setting_name = kwargs.get('setting_name', None) - self.content = kwargs.get('content', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/additional_unattend_content_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/additional_unattend_content_py3.py deleted file mode 100644 index 8928cbeba053..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/additional_unattend_content_py3.py +++ /dev/null @@ -1,53 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class AdditionalUnattendContent(Model): - """Specifies additional XML formatted information that can be included in the - Unattend.xml file, which is used by Windows Setup. Contents are defined by - setting name, component name, and the pass in which the content is applied. - - :param pass_name: The pass name. Currently, the only allowable value is - OobeSystem. Possible values include: 'OobeSystem' - :type pass_name: str or - ~azure.mgmt.compute.v2016_04_30_preview.models.PassNames - :param component_name: The component name. Currently, the only allowable - value is Microsoft-Windows-Shell-Setup. Possible values include: - 'Microsoft-Windows-Shell-Setup' - :type component_name: str or - ~azure.mgmt.compute.v2016_04_30_preview.models.ComponentNames - :param setting_name: Specifies the name of the setting to which the - content applies. Possible values are: FirstLogonCommands and AutoLogon. - Possible values include: 'AutoLogon', 'FirstLogonCommands' - :type setting_name: str or - ~azure.mgmt.compute.v2016_04_30_preview.models.SettingNames - :param content: Specifies the XML formatted content that is added to the - unattend.xml file for the specified path and component. The XML must be - less than 4KB and must include the root element for the setting or feature - that is being inserted. - :type content: str - """ - - _attribute_map = { - 'pass_name': {'key': 'passName', 'type': 'PassNames'}, - 'component_name': {'key': 'componentName', 'type': 'ComponentNames'}, - 'setting_name': {'key': 'settingName', 'type': 'SettingNames'}, - 'content': {'key': 'content', 'type': 'str'}, - } - - def __init__(self, *, pass_name=None, component_name=None, setting_name=None, content: str=None, **kwargs) -> None: - super(AdditionalUnattendContent, self).__init__(**kwargs) - self.pass_name = pass_name - self.component_name = component_name - self.setting_name = setting_name - self.content = content diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/api_entity_reference.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/api_entity_reference.py deleted file mode 100644 index d43730af3659..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/api_entity_reference.py +++ /dev/null @@ -1,29 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ApiEntityReference(Model): - """The API entity reference. - - :param id: The ARM resource id in the form of - /subscriptions/{SubscriptionId}/resourceGroups/{ResourceGroupName}/... - :type id: str - """ - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ApiEntityReference, self).__init__(**kwargs) - self.id = kwargs.get('id', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/api_entity_reference_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/api_entity_reference_py3.py deleted file mode 100644 index d42dfb1a5fd0..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/api_entity_reference_py3.py +++ /dev/null @@ -1,29 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ApiEntityReference(Model): - """The API entity reference. - - :param id: The ARM resource id in the form of - /subscriptions/{SubscriptionId}/resourceGroups/{ResourceGroupName}/... - :type id: str - """ - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - } - - def __init__(self, *, id: str=None, **kwargs) -> None: - super(ApiEntityReference, self).__init__(**kwargs) - self.id = id diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/api_error.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/api_error.py deleted file mode 100644 index 8af390cf58fe..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/api_error.py +++ /dev/null @@ -1,46 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ApiError(Model): - """Api error. - - :param details: The Api error details - :type details: - list[~azure.mgmt.compute.v2016_04_30_preview.models.ApiErrorBase] - :param innererror: The Api inner error - :type innererror: - ~azure.mgmt.compute.v2016_04_30_preview.models.InnerError - :param code: The error code. - :type code: str - :param target: The target of the particular error. - :type target: str - :param message: The error message. - :type message: str - """ - - _attribute_map = { - 'details': {'key': 'details', 'type': '[ApiErrorBase]'}, - 'innererror': {'key': 'innererror', 'type': 'InnerError'}, - 'code': {'key': 'code', 'type': 'str'}, - 'target': {'key': 'target', 'type': 'str'}, - 'message': {'key': 'message', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ApiError, self).__init__(**kwargs) - self.details = kwargs.get('details', None) - self.innererror = kwargs.get('innererror', None) - self.code = kwargs.get('code', None) - self.target = kwargs.get('target', None) - self.message = kwargs.get('message', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/api_error_base.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/api_error_base.py deleted file mode 100644 index 655c08638905..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/api_error_base.py +++ /dev/null @@ -1,36 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ApiErrorBase(Model): - """Api error base. - - :param code: The error code. - :type code: str - :param target: The target of the particular error. - :type target: str - :param message: The error message. - :type message: str - """ - - _attribute_map = { - 'code': {'key': 'code', 'type': 'str'}, - 'target': {'key': 'target', 'type': 'str'}, - 'message': {'key': 'message', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ApiErrorBase, self).__init__(**kwargs) - self.code = kwargs.get('code', None) - self.target = kwargs.get('target', None) - self.message = kwargs.get('message', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/api_error_base_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/api_error_base_py3.py deleted file mode 100644 index 5ba95aa0283e..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/api_error_base_py3.py +++ /dev/null @@ -1,36 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ApiErrorBase(Model): - """Api error base. - - :param code: The error code. - :type code: str - :param target: The target of the particular error. - :type target: str - :param message: The error message. - :type message: str - """ - - _attribute_map = { - 'code': {'key': 'code', 'type': 'str'}, - 'target': {'key': 'target', 'type': 'str'}, - 'message': {'key': 'message', 'type': 'str'}, - } - - def __init__(self, *, code: str=None, target: str=None, message: str=None, **kwargs) -> None: - super(ApiErrorBase, self).__init__(**kwargs) - self.code = code - self.target = target - self.message = message diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/api_error_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/api_error_py3.py deleted file mode 100644 index 2397cacf656a..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/api_error_py3.py +++ /dev/null @@ -1,46 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ApiError(Model): - """Api error. - - :param details: The Api error details - :type details: - list[~azure.mgmt.compute.v2016_04_30_preview.models.ApiErrorBase] - :param innererror: The Api inner error - :type innererror: - ~azure.mgmt.compute.v2016_04_30_preview.models.InnerError - :param code: The error code. - :type code: str - :param target: The target of the particular error. - :type target: str - :param message: The error message. - :type message: str - """ - - _attribute_map = { - 'details': {'key': 'details', 'type': '[ApiErrorBase]'}, - 'innererror': {'key': 'innererror', 'type': 'InnerError'}, - 'code': {'key': 'code', 'type': 'str'}, - 'target': {'key': 'target', 'type': 'str'}, - 'message': {'key': 'message', 'type': 'str'}, - } - - def __init__(self, *, details=None, innererror=None, code: str=None, target: str=None, message: str=None, **kwargs) -> None: - super(ApiError, self).__init__(**kwargs) - self.details = details - self.innererror = innererror - self.code = code - self.target = target - self.message = message diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/availability_set.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/availability_set.py deleted file mode 100644 index 24ea33aaddd5..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/availability_set.py +++ /dev/null @@ -1,89 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource import Resource - - -class AvailabilitySet(Resource): - """Specifies information about the availability set that the virtual machine - should be assigned to. Virtual machines specified in the same availability - set are allocated to different nodes to maximize availability. For more - information about availability sets, see [Manage the availability of - virtual - machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-manage-availability?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). -

    For more information on Azure planned maintenance, see [Planned - maintenance for virtual machines in - Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-planned-maintenance?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json) -

    Currently, a VM can only be added to availability set at creation - time. An existing VM cannot be added to an availability set. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource Id - :vartype id: str - :ivar name: Resource name - :vartype name: str - :ivar type: Resource type - :vartype type: str - :param location: Required. Resource location - :type location: str - :param tags: Resource tags - :type tags: dict[str, str] - :param platform_update_domain_count: Update Domain count. - :type platform_update_domain_count: int - :param platform_fault_domain_count: Fault Domain count. - :type platform_fault_domain_count: int - :param virtual_machines: A list of references to all virtual machines in - the availability set. - :type virtual_machines: - list[~azure.mgmt.compute.v2016_04_30_preview.models.SubResource] - :ivar statuses: The resource status information. - :vartype statuses: - list[~azure.mgmt.compute.v2016_04_30_preview.models.InstanceViewStatus] - :param managed: If the availability set supports managed disks. - :type managed: bool - :param sku: Sku of the availability set - :type sku: ~azure.mgmt.compute.v2016_04_30_preview.models.Sku - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - 'statuses': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'platform_update_domain_count': {'key': 'properties.platformUpdateDomainCount', 'type': 'int'}, - 'platform_fault_domain_count': {'key': 'properties.platformFaultDomainCount', 'type': 'int'}, - 'virtual_machines': {'key': 'properties.virtualMachines', 'type': '[SubResource]'}, - 'statuses': {'key': 'properties.statuses', 'type': '[InstanceViewStatus]'}, - 'managed': {'key': 'properties.managed', 'type': 'bool'}, - 'sku': {'key': 'sku', 'type': 'Sku'}, - } - - def __init__(self, **kwargs): - super(AvailabilitySet, self).__init__(**kwargs) - self.platform_update_domain_count = kwargs.get('platform_update_domain_count', None) - self.platform_fault_domain_count = kwargs.get('platform_fault_domain_count', None) - self.virtual_machines = kwargs.get('virtual_machines', None) - self.statuses = None - self.managed = kwargs.get('managed', None) - self.sku = kwargs.get('sku', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/availability_set_paged.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/availability_set_paged.py deleted file mode 100644 index d193d09d7cd4..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/availability_set_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class AvailabilitySetPaged(Paged): - """ - A paging container for iterating over a list of :class:`AvailabilitySet ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[AvailabilitySet]'} - } - - def __init__(self, *args, **kwargs): - - super(AvailabilitySetPaged, self).__init__(*args, **kwargs) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/availability_set_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/availability_set_py3.py deleted file mode 100644 index 9e951879c0d3..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/availability_set_py3.py +++ /dev/null @@ -1,89 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource_py3 import Resource - - -class AvailabilitySet(Resource): - """Specifies information about the availability set that the virtual machine - should be assigned to. Virtual machines specified in the same availability - set are allocated to different nodes to maximize availability. For more - information about availability sets, see [Manage the availability of - virtual - machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-manage-availability?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). -

    For more information on Azure planned maintenance, see [Planned - maintenance for virtual machines in - Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-planned-maintenance?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json) -

    Currently, a VM can only be added to availability set at creation - time. An existing VM cannot be added to an availability set. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource Id - :vartype id: str - :ivar name: Resource name - :vartype name: str - :ivar type: Resource type - :vartype type: str - :param location: Required. Resource location - :type location: str - :param tags: Resource tags - :type tags: dict[str, str] - :param platform_update_domain_count: Update Domain count. - :type platform_update_domain_count: int - :param platform_fault_domain_count: Fault Domain count. - :type platform_fault_domain_count: int - :param virtual_machines: A list of references to all virtual machines in - the availability set. - :type virtual_machines: - list[~azure.mgmt.compute.v2016_04_30_preview.models.SubResource] - :ivar statuses: The resource status information. - :vartype statuses: - list[~azure.mgmt.compute.v2016_04_30_preview.models.InstanceViewStatus] - :param managed: If the availability set supports managed disks. - :type managed: bool - :param sku: Sku of the availability set - :type sku: ~azure.mgmt.compute.v2016_04_30_preview.models.Sku - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - 'statuses': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'platform_update_domain_count': {'key': 'properties.platformUpdateDomainCount', 'type': 'int'}, - 'platform_fault_domain_count': {'key': 'properties.platformFaultDomainCount', 'type': 'int'}, - 'virtual_machines': {'key': 'properties.virtualMachines', 'type': '[SubResource]'}, - 'statuses': {'key': 'properties.statuses', 'type': '[InstanceViewStatus]'}, - 'managed': {'key': 'properties.managed', 'type': 'bool'}, - 'sku': {'key': 'sku', 'type': 'Sku'}, - } - - def __init__(self, *, location: str, tags=None, platform_update_domain_count: int=None, platform_fault_domain_count: int=None, virtual_machines=None, managed: bool=None, sku=None, **kwargs) -> None: - super(AvailabilitySet, self).__init__(location=location, tags=tags, **kwargs) - self.platform_update_domain_count = platform_update_domain_count - self.platform_fault_domain_count = platform_fault_domain_count - self.virtual_machines = virtual_machines - self.statuses = None - self.managed = managed - self.sku = sku diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/boot_diagnostics.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/boot_diagnostics.py deleted file mode 100644 index 4a1f77c4d7d0..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/boot_diagnostics.py +++ /dev/null @@ -1,37 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class BootDiagnostics(Model): - """Boot Diagnostics is a debugging feature which allows you to view Console - Output and Screenshot to diagnose VM status.

    You can easily view - the output of your console log.

    Azure also enables you to see a - screenshot of the VM from the hypervisor. - - :param enabled: Whether boot diagnostics should be enabled on the Virtual - Machine. - :type enabled: bool - :param storage_uri: Uri of the storage account to use for placing the - console output and screenshot. - :type storage_uri: str - """ - - _attribute_map = { - 'enabled': {'key': 'enabled', 'type': 'bool'}, - 'storage_uri': {'key': 'storageUri', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(BootDiagnostics, self).__init__(**kwargs) - self.enabled = kwargs.get('enabled', None) - self.storage_uri = kwargs.get('storage_uri', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/boot_diagnostics_instance_view.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/boot_diagnostics_instance_view.py deleted file mode 100644 index 05ca725929f6..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/boot_diagnostics_instance_view.py +++ /dev/null @@ -1,40 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class BootDiagnosticsInstanceView(Model): - """The instance view of a virtual machine boot diagnostics. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar console_screenshot_blob_uri: The console screenshot blob URI. - :vartype console_screenshot_blob_uri: str - :ivar serial_console_log_blob_uri: The Linux serial console log blob Uri. - :vartype serial_console_log_blob_uri: str - """ - - _validation = { - 'console_screenshot_blob_uri': {'readonly': True}, - 'serial_console_log_blob_uri': {'readonly': True}, - } - - _attribute_map = { - 'console_screenshot_blob_uri': {'key': 'consoleScreenshotBlobUri', 'type': 'str'}, - 'serial_console_log_blob_uri': {'key': 'serialConsoleLogBlobUri', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(BootDiagnosticsInstanceView, self).__init__(**kwargs) - self.console_screenshot_blob_uri = None - self.serial_console_log_blob_uri = None diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/boot_diagnostics_instance_view_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/boot_diagnostics_instance_view_py3.py deleted file mode 100644 index 97e4cdba67c4..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/boot_diagnostics_instance_view_py3.py +++ /dev/null @@ -1,40 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class BootDiagnosticsInstanceView(Model): - """The instance view of a virtual machine boot diagnostics. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar console_screenshot_blob_uri: The console screenshot blob URI. - :vartype console_screenshot_blob_uri: str - :ivar serial_console_log_blob_uri: The Linux serial console log blob Uri. - :vartype serial_console_log_blob_uri: str - """ - - _validation = { - 'console_screenshot_blob_uri': {'readonly': True}, - 'serial_console_log_blob_uri': {'readonly': True}, - } - - _attribute_map = { - 'console_screenshot_blob_uri': {'key': 'consoleScreenshotBlobUri', 'type': 'str'}, - 'serial_console_log_blob_uri': {'key': 'serialConsoleLogBlobUri', 'type': 'str'}, - } - - def __init__(self, **kwargs) -> None: - super(BootDiagnosticsInstanceView, self).__init__(**kwargs) - self.console_screenshot_blob_uri = None - self.serial_console_log_blob_uri = None diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/boot_diagnostics_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/boot_diagnostics_py3.py deleted file mode 100644 index b64ae5b4adde..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/boot_diagnostics_py3.py +++ /dev/null @@ -1,37 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class BootDiagnostics(Model): - """Boot Diagnostics is a debugging feature which allows you to view Console - Output and Screenshot to diagnose VM status.

    You can easily view - the output of your console log.

    Azure also enables you to see a - screenshot of the VM from the hypervisor. - - :param enabled: Whether boot diagnostics should be enabled on the Virtual - Machine. - :type enabled: bool - :param storage_uri: Uri of the storage account to use for placing the - console output and screenshot. - :type storage_uri: str - """ - - _attribute_map = { - 'enabled': {'key': 'enabled', 'type': 'bool'}, - 'storage_uri': {'key': 'storageUri', 'type': 'str'}, - } - - def __init__(self, *, enabled: bool=None, storage_uri: str=None, **kwargs) -> None: - super(BootDiagnostics, self).__init__(**kwargs) - self.enabled = enabled - self.storage_uri = storage_uri diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/compute_long_running_operation_properties.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/compute_long_running_operation_properties.py deleted file mode 100644 index 66ff353eb206..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/compute_long_running_operation_properties.py +++ /dev/null @@ -1,28 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ComputeLongRunningOperationProperties(Model): - """Compute-specific operation properties, including output. - - :param output: Operation output data (raw JSON) - :type output: object - """ - - _attribute_map = { - 'output': {'key': 'output', 'type': 'object'}, - } - - def __init__(self, **kwargs): - super(ComputeLongRunningOperationProperties, self).__init__(**kwargs) - self.output = kwargs.get('output', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/compute_long_running_operation_properties_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/compute_long_running_operation_properties_py3.py deleted file mode 100644 index a4ffd6c8c32f..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/compute_long_running_operation_properties_py3.py +++ /dev/null @@ -1,28 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ComputeLongRunningOperationProperties(Model): - """Compute-specific operation properties, including output. - - :param output: Operation output data (raw JSON) - :type output: object - """ - - _attribute_map = { - 'output': {'key': 'output', 'type': 'object'}, - } - - def __init__(self, *, output=None, **kwargs) -> None: - super(ComputeLongRunningOperationProperties, self).__init__(**kwargs) - self.output = output diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/creation_data.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/creation_data.py deleted file mode 100644 index 1cd8716a89d5..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/creation_data.py +++ /dev/null @@ -1,61 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class CreationData(Model): - """Data used when creating a disk. - - All required parameters must be populated in order to send to Azure. - - :param create_option: Required. This enumerates the possible sources of a - disk's creation. Possible values include: 'Empty', 'Attach', 'FromImage', - 'Import', 'Copy', 'Restore' - :type create_option: str or - ~azure.mgmt.compute.v2016_04_30_preview.models.DiskCreateOption - :param storage_account_id: If createOption is Import, the Azure Resource - Manager identifier of the storage account containing the blob to import as - a disk. Required only if the blob is in a different subscription - :type storage_account_id: str - :param image_reference: Disk source information. - :type image_reference: - ~azure.mgmt.compute.v2016_04_30_preview.models.ImageDiskReference - :param source_uri: If createOption is Import, this is a SAS URI to a blob - to be imported into a managed disk. If createOption is Copy, this is a - relative Uri containing the id of the source snapshot to be copied into a - managed disk. - :type source_uri: str - :param source_resource_id: If createOption is Copy, this is the ARM id of - the source snapshot or disk. If createOption is Restore, this is the - ARM-like id of the source disk restore point. - :type source_resource_id: str - """ - - _validation = { - 'create_option': {'required': True}, - } - - _attribute_map = { - 'create_option': {'key': 'createOption', 'type': 'DiskCreateOption'}, - 'storage_account_id': {'key': 'storageAccountId', 'type': 'str'}, - 'image_reference': {'key': 'imageReference', 'type': 'ImageDiskReference'}, - 'source_uri': {'key': 'sourceUri', 'type': 'str'}, - 'source_resource_id': {'key': 'sourceResourceId', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(CreationData, self).__init__(**kwargs) - self.create_option = kwargs.get('create_option', None) - self.storage_account_id = kwargs.get('storage_account_id', None) - self.image_reference = kwargs.get('image_reference', None) - self.source_uri = kwargs.get('source_uri', None) - self.source_resource_id = kwargs.get('source_resource_id', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/creation_data_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/creation_data_py3.py deleted file mode 100644 index f0206b35dc92..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/creation_data_py3.py +++ /dev/null @@ -1,61 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class CreationData(Model): - """Data used when creating a disk. - - All required parameters must be populated in order to send to Azure. - - :param create_option: Required. This enumerates the possible sources of a - disk's creation. Possible values include: 'Empty', 'Attach', 'FromImage', - 'Import', 'Copy', 'Restore' - :type create_option: str or - ~azure.mgmt.compute.v2016_04_30_preview.models.DiskCreateOption - :param storage_account_id: If createOption is Import, the Azure Resource - Manager identifier of the storage account containing the blob to import as - a disk. Required only if the blob is in a different subscription - :type storage_account_id: str - :param image_reference: Disk source information. - :type image_reference: - ~azure.mgmt.compute.v2016_04_30_preview.models.ImageDiskReference - :param source_uri: If createOption is Import, this is a SAS URI to a blob - to be imported into a managed disk. If createOption is Copy, this is a - relative Uri containing the id of the source snapshot to be copied into a - managed disk. - :type source_uri: str - :param source_resource_id: If createOption is Copy, this is the ARM id of - the source snapshot or disk. If createOption is Restore, this is the - ARM-like id of the source disk restore point. - :type source_resource_id: str - """ - - _validation = { - 'create_option': {'required': True}, - } - - _attribute_map = { - 'create_option': {'key': 'createOption', 'type': 'DiskCreateOption'}, - 'storage_account_id': {'key': 'storageAccountId', 'type': 'str'}, - 'image_reference': {'key': 'imageReference', 'type': 'ImageDiskReference'}, - 'source_uri': {'key': 'sourceUri', 'type': 'str'}, - 'source_resource_id': {'key': 'sourceResourceId', 'type': 'str'}, - } - - def __init__(self, *, create_option, storage_account_id: str=None, image_reference=None, source_uri: str=None, source_resource_id: str=None, **kwargs) -> None: - super(CreationData, self).__init__(**kwargs) - self.create_option = create_option - self.storage_account_id = storage_account_id - self.image_reference = image_reference - self.source_uri = source_uri - self.source_resource_id = source_resource_id diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/data_disk.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/data_disk.py deleted file mode 100644 index c866dba239b3..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/data_disk.py +++ /dev/null @@ -1,84 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class DataDisk(Model): - """Describes a data disk. - - All required parameters must be populated in order to send to Azure. - - :param lun: Required. Specifies the logical unit number of the data disk. - This value is used to identify data disks within the VM and therefore must - be unique for each data disk attached to a VM. - :type lun: int - :param name: The disk name. - :type name: str - :param vhd: The virtual hard disk. - :type vhd: ~azure.mgmt.compute.v2016_04_30_preview.models.VirtualHardDisk - :param image: The source user image virtual hard disk. The virtual hard - disk will be copied before being attached to the virtual machine. If - SourceImage is provided, the destination virtual hard drive must not - exist. - :type image: - ~azure.mgmt.compute.v2016_04_30_preview.models.VirtualHardDisk - :param caching: Specifies the caching requirements.

    Possible - values are:

    **None**

    **ReadOnly**

    **ReadWrite** -

    Default: **None for Standard storage. ReadOnly for Premium - storage**. Possible values include: 'None', 'ReadOnly', 'ReadWrite' - :type caching: str or - ~azure.mgmt.compute.v2016_04_30_preview.models.CachingTypes - :param create_option: Required. Specifies how the virtual machine should - be created.

    Possible values are:

    **Attach** \\u2013 This - value is used when you are using a specialized disk to create the virtual - machine.

    **FromImage** \\u2013 This value is used when you are - using an image to create the virtual machine. If you are using a platform - image, you also use the imageReference element described above. If you are - using a marketplace image, you also use the plan element previously - described. Possible values include: 'FromImage', 'Empty', 'Attach' - :type create_option: str or - ~azure.mgmt.compute.v2016_04_30_preview.models.DiskCreateOptionTypes - :param disk_size_gb: Specifies the size of an empty data disk in - gigabytes. This element can be used to overwrite the size of the disk in a - virtual machine image.

    This value cannot be larger than 1023 GB - :type disk_size_gb: int - :param managed_disk: The managed disk parameters. - :type managed_disk: - ~azure.mgmt.compute.v2016_04_30_preview.models.ManagedDiskParameters - """ - - _validation = { - 'lun': {'required': True}, - 'create_option': {'required': True}, - } - - _attribute_map = { - 'lun': {'key': 'lun', 'type': 'int'}, - 'name': {'key': 'name', 'type': 'str'}, - 'vhd': {'key': 'vhd', 'type': 'VirtualHardDisk'}, - 'image': {'key': 'image', 'type': 'VirtualHardDisk'}, - 'caching': {'key': 'caching', 'type': 'CachingTypes'}, - 'create_option': {'key': 'createOption', 'type': 'DiskCreateOptionTypes'}, - 'disk_size_gb': {'key': 'diskSizeGB', 'type': 'int'}, - 'managed_disk': {'key': 'managedDisk', 'type': 'ManagedDiskParameters'}, - } - - def __init__(self, **kwargs): - super(DataDisk, self).__init__(**kwargs) - self.lun = kwargs.get('lun', None) - self.name = kwargs.get('name', None) - self.vhd = kwargs.get('vhd', None) - self.image = kwargs.get('image', None) - self.caching = kwargs.get('caching', None) - self.create_option = kwargs.get('create_option', None) - self.disk_size_gb = kwargs.get('disk_size_gb', None) - self.managed_disk = kwargs.get('managed_disk', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/data_disk_image.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/data_disk_image.py deleted file mode 100644 index b5dbfcefb472..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/data_disk_image.py +++ /dev/null @@ -1,37 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class DataDiskImage(Model): - """Contains the data disk images information. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar lun: Specifies the logical unit number of the data disk. This value - is used to identify data disks within the VM and therefore must be unique - for each data disk attached to a VM. - :vartype lun: int - """ - - _validation = { - 'lun': {'readonly': True}, - } - - _attribute_map = { - 'lun': {'key': 'lun', 'type': 'int'}, - } - - def __init__(self, **kwargs): - super(DataDiskImage, self).__init__(**kwargs) - self.lun = None diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/data_disk_image_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/data_disk_image_py3.py deleted file mode 100644 index 8431a3988502..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/data_disk_image_py3.py +++ /dev/null @@ -1,37 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class DataDiskImage(Model): - """Contains the data disk images information. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar lun: Specifies the logical unit number of the data disk. This value - is used to identify data disks within the VM and therefore must be unique - for each data disk attached to a VM. - :vartype lun: int - """ - - _validation = { - 'lun': {'readonly': True}, - } - - _attribute_map = { - 'lun': {'key': 'lun', 'type': 'int'}, - } - - def __init__(self, **kwargs) -> None: - super(DataDiskImage, self).__init__(**kwargs) - self.lun = None diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/data_disk_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/data_disk_py3.py deleted file mode 100644 index 697cc8449812..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/data_disk_py3.py +++ /dev/null @@ -1,84 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class DataDisk(Model): - """Describes a data disk. - - All required parameters must be populated in order to send to Azure. - - :param lun: Required. Specifies the logical unit number of the data disk. - This value is used to identify data disks within the VM and therefore must - be unique for each data disk attached to a VM. - :type lun: int - :param name: The disk name. - :type name: str - :param vhd: The virtual hard disk. - :type vhd: ~azure.mgmt.compute.v2016_04_30_preview.models.VirtualHardDisk - :param image: The source user image virtual hard disk. The virtual hard - disk will be copied before being attached to the virtual machine. If - SourceImage is provided, the destination virtual hard drive must not - exist. - :type image: - ~azure.mgmt.compute.v2016_04_30_preview.models.VirtualHardDisk - :param caching: Specifies the caching requirements.

    Possible - values are:

    **None**

    **ReadOnly**

    **ReadWrite** -

    Default: **None for Standard storage. ReadOnly for Premium - storage**. Possible values include: 'None', 'ReadOnly', 'ReadWrite' - :type caching: str or - ~azure.mgmt.compute.v2016_04_30_preview.models.CachingTypes - :param create_option: Required. Specifies how the virtual machine should - be created.

    Possible values are:

    **Attach** \\u2013 This - value is used when you are using a specialized disk to create the virtual - machine.

    **FromImage** \\u2013 This value is used when you are - using an image to create the virtual machine. If you are using a platform - image, you also use the imageReference element described above. If you are - using a marketplace image, you also use the plan element previously - described. Possible values include: 'FromImage', 'Empty', 'Attach' - :type create_option: str or - ~azure.mgmt.compute.v2016_04_30_preview.models.DiskCreateOptionTypes - :param disk_size_gb: Specifies the size of an empty data disk in - gigabytes. This element can be used to overwrite the size of the disk in a - virtual machine image.

    This value cannot be larger than 1023 GB - :type disk_size_gb: int - :param managed_disk: The managed disk parameters. - :type managed_disk: - ~azure.mgmt.compute.v2016_04_30_preview.models.ManagedDiskParameters - """ - - _validation = { - 'lun': {'required': True}, - 'create_option': {'required': True}, - } - - _attribute_map = { - 'lun': {'key': 'lun', 'type': 'int'}, - 'name': {'key': 'name', 'type': 'str'}, - 'vhd': {'key': 'vhd', 'type': 'VirtualHardDisk'}, - 'image': {'key': 'image', 'type': 'VirtualHardDisk'}, - 'caching': {'key': 'caching', 'type': 'CachingTypes'}, - 'create_option': {'key': 'createOption', 'type': 'DiskCreateOptionTypes'}, - 'disk_size_gb': {'key': 'diskSizeGB', 'type': 'int'}, - 'managed_disk': {'key': 'managedDisk', 'type': 'ManagedDiskParameters'}, - } - - def __init__(self, *, lun: int, create_option, name: str=None, vhd=None, image=None, caching=None, disk_size_gb: int=None, managed_disk=None, **kwargs) -> None: - super(DataDisk, self).__init__(**kwargs) - self.lun = lun - self.name = name - self.vhd = vhd - self.image = image - self.caching = caching - self.create_option = create_option - self.disk_size_gb = disk_size_gb - self.managed_disk = managed_disk diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/diagnostics_profile.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/diagnostics_profile.py deleted file mode 100644 index 1f314d2ac244..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/diagnostics_profile.py +++ /dev/null @@ -1,33 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class DiagnosticsProfile(Model): - """Specifies the boot diagnostic settings state.

    Minimum api-version: - 2015-06-15. - - :param boot_diagnostics: Boot Diagnostics is a debugging feature which - allows you to view Console Output and Screenshot to diagnose VM status. -

    You can easily view the output of your console log.

    - Azure also enables you to see a screenshot of the VM from the hypervisor. - :type boot_diagnostics: - ~azure.mgmt.compute.v2016_04_30_preview.models.BootDiagnostics - """ - - _attribute_map = { - 'boot_diagnostics': {'key': 'bootDiagnostics', 'type': 'BootDiagnostics'}, - } - - def __init__(self, **kwargs): - super(DiagnosticsProfile, self).__init__(**kwargs) - self.boot_diagnostics = kwargs.get('boot_diagnostics', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/diagnostics_profile_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/diagnostics_profile_py3.py deleted file mode 100644 index f7e18305b608..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/diagnostics_profile_py3.py +++ /dev/null @@ -1,33 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class DiagnosticsProfile(Model): - """Specifies the boot diagnostic settings state.

    Minimum api-version: - 2015-06-15. - - :param boot_diagnostics: Boot Diagnostics is a debugging feature which - allows you to view Console Output and Screenshot to diagnose VM status. -

    You can easily view the output of your console log.

    - Azure also enables you to see a screenshot of the VM from the hypervisor. - :type boot_diagnostics: - ~azure.mgmt.compute.v2016_04_30_preview.models.BootDiagnostics - """ - - _attribute_map = { - 'boot_diagnostics': {'key': 'bootDiagnostics', 'type': 'BootDiagnostics'}, - } - - def __init__(self, *, boot_diagnostics=None, **kwargs) -> None: - super(DiagnosticsProfile, self).__init__(**kwargs) - self.boot_diagnostics = boot_diagnostics diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/disk.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/disk.py deleted file mode 100644 index 03748ff9aef8..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/disk.py +++ /dev/null @@ -1,99 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource import Resource - - -class Disk(Resource): - """Disk resource. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource Id - :vartype id: str - :ivar name: Resource name - :vartype name: str - :ivar type: Resource type - :vartype type: str - :param location: Required. Resource location - :type location: str - :param tags: Resource tags - :type tags: dict[str, str] - :param account_type: the storage account type of the disk. Possible values - include: 'Standard_LRS', 'Premium_LRS' - :type account_type: str or - ~azure.mgmt.compute.v2016_04_30_preview.models.StorageAccountTypes - :ivar time_created: The time when the disk was created. - :vartype time_created: datetime - :param os_type: The Operating System type. Possible values include: - 'Windows', 'Linux' - :type os_type: str or - ~azure.mgmt.compute.v2016_04_30_preview.models.OperatingSystemTypes - :param creation_data: Required. Disk source information. CreationData - information cannot be changed after the disk has been created. - :type creation_data: - ~azure.mgmt.compute.v2016_04_30_preview.models.CreationData - :param disk_size_gb: If creationData.createOption is Empty, this field is - mandatory and it indicates the size of the VHD to create. If this field is - present for updates or creation with other options, it indicates a resize. - Resizes are only allowed if the disk is not attached to a running VM, and - can only increase the disk's size. - :type disk_size_gb: int - :param encryption_settings: Encryption settings for disk or snapshot - :type encryption_settings: - ~azure.mgmt.compute.v2016_04_30_preview.models.EncryptionSettings - :ivar owner_id: A relative URI containing the VM id that has the disk - attached. - :vartype owner_id: str - :ivar provisioning_state: The disk provisioning state. - :vartype provisioning_state: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - 'time_created': {'readonly': True}, - 'creation_data': {'required': True}, - 'owner_id': {'readonly': True}, - 'provisioning_state': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'account_type': {'key': 'properties.accountType', 'type': 'StorageAccountTypes'}, - 'time_created': {'key': 'properties.timeCreated', 'type': 'iso-8601'}, - 'os_type': {'key': 'properties.osType', 'type': 'OperatingSystemTypes'}, - 'creation_data': {'key': 'properties.creationData', 'type': 'CreationData'}, - 'disk_size_gb': {'key': 'properties.diskSizeGB', 'type': 'int'}, - 'encryption_settings': {'key': 'properties.encryptionSettings', 'type': 'EncryptionSettings'}, - 'owner_id': {'key': 'properties.ownerId', 'type': 'str'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(Disk, self).__init__(**kwargs) - self.account_type = kwargs.get('account_type', None) - self.time_created = None - self.os_type = kwargs.get('os_type', None) - self.creation_data = kwargs.get('creation_data', None) - self.disk_size_gb = kwargs.get('disk_size_gb', None) - self.encryption_settings = kwargs.get('encryption_settings', None) - self.owner_id = None - self.provisioning_state = None diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/disk_encryption_settings.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/disk_encryption_settings.py deleted file mode 100644 index 65fd8f27b79d..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/disk_encryption_settings.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class DiskEncryptionSettings(Model): - """Describes a Encryption Settings for a Disk. - - :param disk_encryption_key: Specifies the location of the disk encryption - key, which is a Key Vault Secret. - :type disk_encryption_key: - ~azure.mgmt.compute.v2016_04_30_preview.models.KeyVaultSecretReference - :param key_encryption_key: Specifies the location of the key encryption - key in Key Vault. - :type key_encryption_key: - ~azure.mgmt.compute.v2016_04_30_preview.models.KeyVaultKeyReference - :param enabled: Specifies whether disk encryption should be enabled on the - virtual machine. - :type enabled: bool - """ - - _attribute_map = { - 'disk_encryption_key': {'key': 'diskEncryptionKey', 'type': 'KeyVaultSecretReference'}, - 'key_encryption_key': {'key': 'keyEncryptionKey', 'type': 'KeyVaultKeyReference'}, - 'enabled': {'key': 'enabled', 'type': 'bool'}, - } - - def __init__(self, **kwargs): - super(DiskEncryptionSettings, self).__init__(**kwargs) - self.disk_encryption_key = kwargs.get('disk_encryption_key', None) - self.key_encryption_key = kwargs.get('key_encryption_key', None) - self.enabled = kwargs.get('enabled', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/disk_encryption_settings_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/disk_encryption_settings_py3.py deleted file mode 100644 index 5660286740dc..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/disk_encryption_settings_py3.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class DiskEncryptionSettings(Model): - """Describes a Encryption Settings for a Disk. - - :param disk_encryption_key: Specifies the location of the disk encryption - key, which is a Key Vault Secret. - :type disk_encryption_key: - ~azure.mgmt.compute.v2016_04_30_preview.models.KeyVaultSecretReference - :param key_encryption_key: Specifies the location of the key encryption - key in Key Vault. - :type key_encryption_key: - ~azure.mgmt.compute.v2016_04_30_preview.models.KeyVaultKeyReference - :param enabled: Specifies whether disk encryption should be enabled on the - virtual machine. - :type enabled: bool - """ - - _attribute_map = { - 'disk_encryption_key': {'key': 'diskEncryptionKey', 'type': 'KeyVaultSecretReference'}, - 'key_encryption_key': {'key': 'keyEncryptionKey', 'type': 'KeyVaultKeyReference'}, - 'enabled': {'key': 'enabled', 'type': 'bool'}, - } - - def __init__(self, *, disk_encryption_key=None, key_encryption_key=None, enabled: bool=None, **kwargs) -> None: - super(DiskEncryptionSettings, self).__init__(**kwargs) - self.disk_encryption_key = disk_encryption_key - self.key_encryption_key = key_encryption_key - self.enabled = enabled diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/disk_instance_view.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/disk_instance_view.py deleted file mode 100644 index d74755f0ec76..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/disk_instance_view.py +++ /dev/null @@ -1,33 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class DiskInstanceView(Model): - """The instance view of the disk. - - :param name: The disk name. - :type name: str - :param statuses: The resource status information. - :type statuses: - list[~azure.mgmt.compute.v2016_04_30_preview.models.InstanceViewStatus] - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'statuses': {'key': 'statuses', 'type': '[InstanceViewStatus]'}, - } - - def __init__(self, **kwargs): - super(DiskInstanceView, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.statuses = kwargs.get('statuses', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/disk_instance_view_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/disk_instance_view_py3.py deleted file mode 100644 index 1ce314459fad..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/disk_instance_view_py3.py +++ /dev/null @@ -1,33 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class DiskInstanceView(Model): - """The instance view of the disk. - - :param name: The disk name. - :type name: str - :param statuses: The resource status information. - :type statuses: - list[~azure.mgmt.compute.v2016_04_30_preview.models.InstanceViewStatus] - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'statuses': {'key': 'statuses', 'type': '[InstanceViewStatus]'}, - } - - def __init__(self, *, name: str=None, statuses=None, **kwargs) -> None: - super(DiskInstanceView, self).__init__(**kwargs) - self.name = name - self.statuses = statuses diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/disk_paged.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/disk_paged.py deleted file mode 100644 index 2a545c444753..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/disk_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class DiskPaged(Paged): - """ - A paging container for iterating over a list of :class:`Disk ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[Disk]'} - } - - def __init__(self, *args, **kwargs): - - super(DiskPaged, self).__init__(*args, **kwargs) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/disk_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/disk_py3.py deleted file mode 100644 index eba7a71b12db..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/disk_py3.py +++ /dev/null @@ -1,99 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource_py3 import Resource - - -class Disk(Resource): - """Disk resource. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource Id - :vartype id: str - :ivar name: Resource name - :vartype name: str - :ivar type: Resource type - :vartype type: str - :param location: Required. Resource location - :type location: str - :param tags: Resource tags - :type tags: dict[str, str] - :param account_type: the storage account type of the disk. Possible values - include: 'Standard_LRS', 'Premium_LRS' - :type account_type: str or - ~azure.mgmt.compute.v2016_04_30_preview.models.StorageAccountTypes - :ivar time_created: The time when the disk was created. - :vartype time_created: datetime - :param os_type: The Operating System type. Possible values include: - 'Windows', 'Linux' - :type os_type: str or - ~azure.mgmt.compute.v2016_04_30_preview.models.OperatingSystemTypes - :param creation_data: Required. Disk source information. CreationData - information cannot be changed after the disk has been created. - :type creation_data: - ~azure.mgmt.compute.v2016_04_30_preview.models.CreationData - :param disk_size_gb: If creationData.createOption is Empty, this field is - mandatory and it indicates the size of the VHD to create. If this field is - present for updates or creation with other options, it indicates a resize. - Resizes are only allowed if the disk is not attached to a running VM, and - can only increase the disk's size. - :type disk_size_gb: int - :param encryption_settings: Encryption settings for disk or snapshot - :type encryption_settings: - ~azure.mgmt.compute.v2016_04_30_preview.models.EncryptionSettings - :ivar owner_id: A relative URI containing the VM id that has the disk - attached. - :vartype owner_id: str - :ivar provisioning_state: The disk provisioning state. - :vartype provisioning_state: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - 'time_created': {'readonly': True}, - 'creation_data': {'required': True}, - 'owner_id': {'readonly': True}, - 'provisioning_state': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'account_type': {'key': 'properties.accountType', 'type': 'StorageAccountTypes'}, - 'time_created': {'key': 'properties.timeCreated', 'type': 'iso-8601'}, - 'os_type': {'key': 'properties.osType', 'type': 'OperatingSystemTypes'}, - 'creation_data': {'key': 'properties.creationData', 'type': 'CreationData'}, - 'disk_size_gb': {'key': 'properties.diskSizeGB', 'type': 'int'}, - 'encryption_settings': {'key': 'properties.encryptionSettings', 'type': 'EncryptionSettings'}, - 'owner_id': {'key': 'properties.ownerId', 'type': 'str'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - } - - def __init__(self, *, location: str, creation_data, tags=None, account_type=None, os_type=None, disk_size_gb: int=None, encryption_settings=None, **kwargs) -> None: - super(Disk, self).__init__(location=location, tags=tags, **kwargs) - self.account_type = account_type - self.time_created = None - self.os_type = os_type - self.creation_data = creation_data - self.disk_size_gb = disk_size_gb - self.encryption_settings = encryption_settings - self.owner_id = None - self.provisioning_state = None diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/disk_update.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/disk_update.py deleted file mode 100644 index 412257542cfc..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/disk_update.py +++ /dev/null @@ -1,58 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource_update import ResourceUpdate - - -class DiskUpdate(ResourceUpdate): - """Disk update resource. - - :param tags: Resource tags - :type tags: dict[str, str] - :param account_type: the storage account type of the disk. Possible values - include: 'Standard_LRS', 'Premium_LRS' - :type account_type: str or - ~azure.mgmt.compute.v2016_04_30_preview.models.StorageAccountTypes - :param os_type: the Operating System type. Possible values include: - 'Windows', 'Linux' - :type os_type: str or - ~azure.mgmt.compute.v2016_04_30_preview.models.OperatingSystemTypes - :param creation_data: disk source information. CreationData information - cannot be changed after the disk has been created. - :type creation_data: - ~azure.mgmt.compute.v2016_04_30_preview.models.CreationData - :param disk_size_gb: If creationData.createOption is Empty, this field is - mandatory and it indicates the size of the VHD to create. If this field is - present for updates or creation with other options, it indicates a resize. - Resizes are only allowed if the disk is not attached to a running VM, and - can only increase the disk's size. - :type disk_size_gb: int - :param encryption_settings: Encryption settings for disk or snapshot - :type encryption_settings: - ~azure.mgmt.compute.v2016_04_30_preview.models.EncryptionSettings - """ - - _attribute_map = { - 'tags': {'key': 'tags', 'type': '{str}'}, - 'account_type': {'key': 'properties.accountType', 'type': 'StorageAccountTypes'}, - 'os_type': {'key': 'properties.osType', 'type': 'OperatingSystemTypes'}, - 'creation_data': {'key': 'properties.creationData', 'type': 'CreationData'}, - 'disk_size_gb': {'key': 'properties.diskSizeGB', 'type': 'int'}, - 'encryption_settings': {'key': 'properties.encryptionSettings', 'type': 'EncryptionSettings'}, - } - - def __init__(self, **kwargs): - super(DiskUpdate, self).__init__(**kwargs) - self.account_type = kwargs.get('account_type', None) - self.os_type = kwargs.get('os_type', None) - self.creation_data = kwargs.get('creation_data', None) - self.disk_size_gb = kwargs.get('disk_size_gb', None) - self.encryption_settings = kwargs.get('encryption_settings', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/disk_update_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/disk_update_py3.py deleted file mode 100644 index 628867dc9093..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/disk_update_py3.py +++ /dev/null @@ -1,58 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource_update_py3 import ResourceUpdate - - -class DiskUpdate(ResourceUpdate): - """Disk update resource. - - :param tags: Resource tags - :type tags: dict[str, str] - :param account_type: the storage account type of the disk. Possible values - include: 'Standard_LRS', 'Premium_LRS' - :type account_type: str or - ~azure.mgmt.compute.v2016_04_30_preview.models.StorageAccountTypes - :param os_type: the Operating System type. Possible values include: - 'Windows', 'Linux' - :type os_type: str or - ~azure.mgmt.compute.v2016_04_30_preview.models.OperatingSystemTypes - :param creation_data: disk source information. CreationData information - cannot be changed after the disk has been created. - :type creation_data: - ~azure.mgmt.compute.v2016_04_30_preview.models.CreationData - :param disk_size_gb: If creationData.createOption is Empty, this field is - mandatory and it indicates the size of the VHD to create. If this field is - present for updates or creation with other options, it indicates a resize. - Resizes are only allowed if the disk is not attached to a running VM, and - can only increase the disk's size. - :type disk_size_gb: int - :param encryption_settings: Encryption settings for disk or snapshot - :type encryption_settings: - ~azure.mgmt.compute.v2016_04_30_preview.models.EncryptionSettings - """ - - _attribute_map = { - 'tags': {'key': 'tags', 'type': '{str}'}, - 'account_type': {'key': 'properties.accountType', 'type': 'StorageAccountTypes'}, - 'os_type': {'key': 'properties.osType', 'type': 'OperatingSystemTypes'}, - 'creation_data': {'key': 'properties.creationData', 'type': 'CreationData'}, - 'disk_size_gb': {'key': 'properties.diskSizeGB', 'type': 'int'}, - 'encryption_settings': {'key': 'properties.encryptionSettings', 'type': 'EncryptionSettings'}, - } - - def __init__(self, *, tags=None, account_type=None, os_type=None, creation_data=None, disk_size_gb: int=None, encryption_settings=None, **kwargs) -> None: - super(DiskUpdate, self).__init__(tags=tags, **kwargs) - self.account_type = account_type - self.os_type = os_type - self.creation_data = creation_data - self.disk_size_gb = disk_size_gb - self.encryption_settings = encryption_settings diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/encryption_settings.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/encryption_settings.py deleted file mode 100644 index 3d7c6049d35e..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/encryption_settings.py +++ /dev/null @@ -1,44 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class EncryptionSettings(Model): - """Encryption settings for disk or snapshot. - - :param enabled: Set this flag to true and provide DiskEncryptionKey and - optional KeyEncryptionKey to enable encryption. Set this flag to false and - remove DiskEncryptionKey and KeyEncryptionKey to disable encryption. If - EncryptionSettings is null in the request object, the existing settings - remain unchanged. - :type enabled: bool - :param disk_encryption_key: Key Vault Secret Url and vault id of the disk - encryption key - :type disk_encryption_key: - ~azure.mgmt.compute.v2016_04_30_preview.models.KeyVaultAndSecretReference - :param key_encryption_key: Key Vault Key Url and vault id of the key - encryption key - :type key_encryption_key: - ~azure.mgmt.compute.v2016_04_30_preview.models.KeyVaultAndKeyReference - """ - - _attribute_map = { - 'enabled': {'key': 'enabled', 'type': 'bool'}, - 'disk_encryption_key': {'key': 'diskEncryptionKey', 'type': 'KeyVaultAndSecretReference'}, - 'key_encryption_key': {'key': 'keyEncryptionKey', 'type': 'KeyVaultAndKeyReference'}, - } - - def __init__(self, **kwargs): - super(EncryptionSettings, self).__init__(**kwargs) - self.enabled = kwargs.get('enabled', None) - self.disk_encryption_key = kwargs.get('disk_encryption_key', None) - self.key_encryption_key = kwargs.get('key_encryption_key', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/encryption_settings_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/encryption_settings_py3.py deleted file mode 100644 index 2cd6b654abdb..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/encryption_settings_py3.py +++ /dev/null @@ -1,44 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class EncryptionSettings(Model): - """Encryption settings for disk or snapshot. - - :param enabled: Set this flag to true and provide DiskEncryptionKey and - optional KeyEncryptionKey to enable encryption. Set this flag to false and - remove DiskEncryptionKey and KeyEncryptionKey to disable encryption. If - EncryptionSettings is null in the request object, the existing settings - remain unchanged. - :type enabled: bool - :param disk_encryption_key: Key Vault Secret Url and vault id of the disk - encryption key - :type disk_encryption_key: - ~azure.mgmt.compute.v2016_04_30_preview.models.KeyVaultAndSecretReference - :param key_encryption_key: Key Vault Key Url and vault id of the key - encryption key - :type key_encryption_key: - ~azure.mgmt.compute.v2016_04_30_preview.models.KeyVaultAndKeyReference - """ - - _attribute_map = { - 'enabled': {'key': 'enabled', 'type': 'bool'}, - 'disk_encryption_key': {'key': 'diskEncryptionKey', 'type': 'KeyVaultAndSecretReference'}, - 'key_encryption_key': {'key': 'keyEncryptionKey', 'type': 'KeyVaultAndKeyReference'}, - } - - def __init__(self, *, enabled: bool=None, disk_encryption_key=None, key_encryption_key=None, **kwargs) -> None: - super(EncryptionSettings, self).__init__(**kwargs) - self.enabled = enabled - self.disk_encryption_key = disk_encryption_key - self.key_encryption_key = key_encryption_key diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/grant_access_data.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/grant_access_data.py deleted file mode 100644 index a0de15034343..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/grant_access_data.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class GrantAccessData(Model): - """Data used for requesting a SAS. - - All required parameters must be populated in order to send to Azure. - - :param access: Required. Possible values include: 'None', 'Read' - :type access: str or - ~azure.mgmt.compute.v2016_04_30_preview.models.AccessLevel - :param duration_in_seconds: Required. Time duration in seconds until the - SAS access expires. - :type duration_in_seconds: int - """ - - _validation = { - 'access': {'required': True}, - 'duration_in_seconds': {'required': True}, - } - - _attribute_map = { - 'access': {'key': 'access', 'type': 'AccessLevel'}, - 'duration_in_seconds': {'key': 'durationInSeconds', 'type': 'int'}, - } - - def __init__(self, **kwargs): - super(GrantAccessData, self).__init__(**kwargs) - self.access = kwargs.get('access', None) - self.duration_in_seconds = kwargs.get('duration_in_seconds', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/grant_access_data_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/grant_access_data_py3.py deleted file mode 100644 index 65416406cdcd..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/grant_access_data_py3.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class GrantAccessData(Model): - """Data used for requesting a SAS. - - All required parameters must be populated in order to send to Azure. - - :param access: Required. Possible values include: 'None', 'Read' - :type access: str or - ~azure.mgmt.compute.v2016_04_30_preview.models.AccessLevel - :param duration_in_seconds: Required. Time duration in seconds until the - SAS access expires. - :type duration_in_seconds: int - """ - - _validation = { - 'access': {'required': True}, - 'duration_in_seconds': {'required': True}, - } - - _attribute_map = { - 'access': {'key': 'access', 'type': 'AccessLevel'}, - 'duration_in_seconds': {'key': 'durationInSeconds', 'type': 'int'}, - } - - def __init__(self, *, access, duration_in_seconds: int, **kwargs) -> None: - super(GrantAccessData, self).__init__(**kwargs) - self.access = access - self.duration_in_seconds = duration_in_seconds diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/hardware_profile.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/hardware_profile.py deleted file mode 100644 index e9c70839ab5b..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/hardware_profile.py +++ /dev/null @@ -1,55 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class HardwareProfile(Model): - """Specifies the hardware settings for the virtual machine. - - :param vm_size: Specifies the size of the virtual machine. For more - information about virtual machine sizes, see [Sizes for virtual - machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-sizes?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). -

    The available VM sizes depend on region and availability set. For - a list of available sizes use these APIs:

    [List all available - virtual machine sizes in an availability - set](virtualmachines-list-sizes-availability-set.md)

    [List all - available virtual machine sizes in a - region](virtualmachines-list-sizes-region.md)

    [List all available - virtual machine sizes for - resizing](virtualmachines-list-sizes-for-resizing.md). Possible values - include: 'Basic_A0', 'Basic_A1', 'Basic_A2', 'Basic_A3', 'Basic_A4', - 'Standard_A0', 'Standard_A1', 'Standard_A2', 'Standard_A3', 'Standard_A4', - 'Standard_A5', 'Standard_A6', 'Standard_A7', 'Standard_A8', 'Standard_A9', - 'Standard_A10', 'Standard_A11', 'Standard_D1', 'Standard_D2', - 'Standard_D3', 'Standard_D4', 'Standard_D11', 'Standard_D12', - 'Standard_D13', 'Standard_D14', 'Standard_D1_v2', 'Standard_D2_v2', - 'Standard_D3_v2', 'Standard_D4_v2', 'Standard_D5_v2', 'Standard_D11_v2', - 'Standard_D12_v2', 'Standard_D13_v2', 'Standard_D14_v2', - 'Standard_D15_v2', 'Standard_DS1', 'Standard_DS2', 'Standard_DS3', - 'Standard_DS4', 'Standard_DS11', 'Standard_DS12', 'Standard_DS13', - 'Standard_DS14', 'Standard_DS1_v2', 'Standard_DS2_v2', 'Standard_DS3_v2', - 'Standard_DS4_v2', 'Standard_DS5_v2', 'Standard_DS11_v2', - 'Standard_DS12_v2', 'Standard_DS13_v2', 'Standard_DS14_v2', - 'Standard_DS15_v2', 'Standard_G1', 'Standard_G2', 'Standard_G3', - 'Standard_G4', 'Standard_G5', 'Standard_GS1', 'Standard_GS2', - 'Standard_GS3', 'Standard_GS4', 'Standard_GS5' - :type vm_size: str or - ~azure.mgmt.compute.v2016_04_30_preview.models.VirtualMachineSizeTypes - """ - - _attribute_map = { - 'vm_size': {'key': 'vmSize', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(HardwareProfile, self).__init__(**kwargs) - self.vm_size = kwargs.get('vm_size', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/hardware_profile_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/hardware_profile_py3.py deleted file mode 100644 index 97df538e0894..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/hardware_profile_py3.py +++ /dev/null @@ -1,55 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class HardwareProfile(Model): - """Specifies the hardware settings for the virtual machine. - - :param vm_size: Specifies the size of the virtual machine. For more - information about virtual machine sizes, see [Sizes for virtual - machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-sizes?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). -

    The available VM sizes depend on region and availability set. For - a list of available sizes use these APIs:

    [List all available - virtual machine sizes in an availability - set](virtualmachines-list-sizes-availability-set.md)

    [List all - available virtual machine sizes in a - region](virtualmachines-list-sizes-region.md)

    [List all available - virtual machine sizes for - resizing](virtualmachines-list-sizes-for-resizing.md). Possible values - include: 'Basic_A0', 'Basic_A1', 'Basic_A2', 'Basic_A3', 'Basic_A4', - 'Standard_A0', 'Standard_A1', 'Standard_A2', 'Standard_A3', 'Standard_A4', - 'Standard_A5', 'Standard_A6', 'Standard_A7', 'Standard_A8', 'Standard_A9', - 'Standard_A10', 'Standard_A11', 'Standard_D1', 'Standard_D2', - 'Standard_D3', 'Standard_D4', 'Standard_D11', 'Standard_D12', - 'Standard_D13', 'Standard_D14', 'Standard_D1_v2', 'Standard_D2_v2', - 'Standard_D3_v2', 'Standard_D4_v2', 'Standard_D5_v2', 'Standard_D11_v2', - 'Standard_D12_v2', 'Standard_D13_v2', 'Standard_D14_v2', - 'Standard_D15_v2', 'Standard_DS1', 'Standard_DS2', 'Standard_DS3', - 'Standard_DS4', 'Standard_DS11', 'Standard_DS12', 'Standard_DS13', - 'Standard_DS14', 'Standard_DS1_v2', 'Standard_DS2_v2', 'Standard_DS3_v2', - 'Standard_DS4_v2', 'Standard_DS5_v2', 'Standard_DS11_v2', - 'Standard_DS12_v2', 'Standard_DS13_v2', 'Standard_DS14_v2', - 'Standard_DS15_v2', 'Standard_G1', 'Standard_G2', 'Standard_G3', - 'Standard_G4', 'Standard_G5', 'Standard_GS1', 'Standard_GS2', - 'Standard_GS3', 'Standard_GS4', 'Standard_GS5' - :type vm_size: str or - ~azure.mgmt.compute.v2016_04_30_preview.models.VirtualMachineSizeTypes - """ - - _attribute_map = { - 'vm_size': {'key': 'vmSize', 'type': 'str'}, - } - - def __init__(self, *, vm_size=None, **kwargs) -> None: - super(HardwareProfile, self).__init__(**kwargs) - self.vm_size = vm_size diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/image.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/image.py deleted file mode 100644 index 260c7c468d86..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/image.py +++ /dev/null @@ -1,70 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource import Resource - - -class Image(Resource): - """The source user image virtual hard disk. The virtual hard disk will be - copied before being attached to the virtual machine. If SourceImage is - provided, the destination virtual hard drive must not exist. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource Id - :vartype id: str - :ivar name: Resource name - :vartype name: str - :ivar type: Resource type - :vartype type: str - :param location: Required. Resource location - :type location: str - :param tags: Resource tags - :type tags: dict[str, str] - :param source_virtual_machine: The source virtual machine from which Image - is created. - :type source_virtual_machine: - ~azure.mgmt.compute.v2016_04_30_preview.models.SubResource - :param storage_profile: Specifies the storage settings for the virtual - machine disks. - :type storage_profile: - ~azure.mgmt.compute.v2016_04_30_preview.models.ImageStorageProfile - :ivar provisioning_state: The provisioning state. - :vartype provisioning_state: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - 'provisioning_state': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'source_virtual_machine': {'key': 'properties.sourceVirtualMachine', 'type': 'SubResource'}, - 'storage_profile': {'key': 'properties.storageProfile', 'type': 'ImageStorageProfile'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(Image, self).__init__(**kwargs) - self.source_virtual_machine = kwargs.get('source_virtual_machine', None) - self.storage_profile = kwargs.get('storage_profile', None) - self.provisioning_state = None diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/image_data_disk.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/image_data_disk.py deleted file mode 100644 index d696f2804c4b..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/image_data_disk.py +++ /dev/null @@ -1,63 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ImageDataDisk(Model): - """Describes a data disk. - - All required parameters must be populated in order to send to Azure. - - :param lun: Required. Specifies the logical unit number of the data disk. - This value is used to identify data disks within the VM and therefore must - be unique for each data disk attached to a VM. - :type lun: int - :param snapshot: The snapshot. - :type snapshot: ~azure.mgmt.compute.v2016_04_30_preview.models.SubResource - :param managed_disk: The managedDisk. - :type managed_disk: - ~azure.mgmt.compute.v2016_04_30_preview.models.SubResource - :param blob_uri: The Virtual Hard Disk. - :type blob_uri: str - :param caching: Specifies the caching requirements.

    Possible - values are:

    **None**

    **ReadOnly**

    **ReadWrite** -

    Default: **None for Standard storage. ReadOnly for Premium - storage**. Possible values include: 'None', 'ReadOnly', 'ReadWrite' - :type caching: str or - ~azure.mgmt.compute.v2016_04_30_preview.models.CachingTypes - :param disk_size_gb: Specifies the size of empty data disks in gigabytes. - This element can be used to overwrite the name of the disk in a virtual - machine image.

    This value cannot be larger than 1023 GB - :type disk_size_gb: int - """ - - _validation = { - 'lun': {'required': True}, - } - - _attribute_map = { - 'lun': {'key': 'lun', 'type': 'int'}, - 'snapshot': {'key': 'snapshot', 'type': 'SubResource'}, - 'managed_disk': {'key': 'managedDisk', 'type': 'SubResource'}, - 'blob_uri': {'key': 'blobUri', 'type': 'str'}, - 'caching': {'key': 'caching', 'type': 'CachingTypes'}, - 'disk_size_gb': {'key': 'diskSizeGB', 'type': 'int'}, - } - - def __init__(self, **kwargs): - super(ImageDataDisk, self).__init__(**kwargs) - self.lun = kwargs.get('lun', None) - self.snapshot = kwargs.get('snapshot', None) - self.managed_disk = kwargs.get('managed_disk', None) - self.blob_uri = kwargs.get('blob_uri', None) - self.caching = kwargs.get('caching', None) - self.disk_size_gb = kwargs.get('disk_size_gb', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/image_data_disk_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/image_data_disk_py3.py deleted file mode 100644 index 02a40d76f288..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/image_data_disk_py3.py +++ /dev/null @@ -1,63 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ImageDataDisk(Model): - """Describes a data disk. - - All required parameters must be populated in order to send to Azure. - - :param lun: Required. Specifies the logical unit number of the data disk. - This value is used to identify data disks within the VM and therefore must - be unique for each data disk attached to a VM. - :type lun: int - :param snapshot: The snapshot. - :type snapshot: ~azure.mgmt.compute.v2016_04_30_preview.models.SubResource - :param managed_disk: The managedDisk. - :type managed_disk: - ~azure.mgmt.compute.v2016_04_30_preview.models.SubResource - :param blob_uri: The Virtual Hard Disk. - :type blob_uri: str - :param caching: Specifies the caching requirements.

    Possible - values are:

    **None**

    **ReadOnly**

    **ReadWrite** -

    Default: **None for Standard storage. ReadOnly for Premium - storage**. Possible values include: 'None', 'ReadOnly', 'ReadWrite' - :type caching: str or - ~azure.mgmt.compute.v2016_04_30_preview.models.CachingTypes - :param disk_size_gb: Specifies the size of empty data disks in gigabytes. - This element can be used to overwrite the name of the disk in a virtual - machine image.

    This value cannot be larger than 1023 GB - :type disk_size_gb: int - """ - - _validation = { - 'lun': {'required': True}, - } - - _attribute_map = { - 'lun': {'key': 'lun', 'type': 'int'}, - 'snapshot': {'key': 'snapshot', 'type': 'SubResource'}, - 'managed_disk': {'key': 'managedDisk', 'type': 'SubResource'}, - 'blob_uri': {'key': 'blobUri', 'type': 'str'}, - 'caching': {'key': 'caching', 'type': 'CachingTypes'}, - 'disk_size_gb': {'key': 'diskSizeGB', 'type': 'int'}, - } - - def __init__(self, *, lun: int, snapshot=None, managed_disk=None, blob_uri: str=None, caching=None, disk_size_gb: int=None, **kwargs) -> None: - super(ImageDataDisk, self).__init__(**kwargs) - self.lun = lun - self.snapshot = snapshot - self.managed_disk = managed_disk - self.blob_uri = blob_uri - self.caching = caching - self.disk_size_gb = disk_size_gb diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/image_disk_reference.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/image_disk_reference.py deleted file mode 100644 index b47ddd445024..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/image_disk_reference.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ImageDiskReference(Model): - """The source image used for creating the disk. - - All required parameters must be populated in order to send to Azure. - - :param id: Required. A relative uri containing either a Platform Image - Repository or user image reference. - :type id: str - :param lun: If the disk is created from an image's data disk, this is an - index that indicates which of the data disks in the image to use. For OS - disks, this field is null. - :type lun: int - """ - - _validation = { - 'id': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'lun': {'key': 'lun', 'type': 'int'}, - } - - def __init__(self, **kwargs): - super(ImageDiskReference, self).__init__(**kwargs) - self.id = kwargs.get('id', None) - self.lun = kwargs.get('lun', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/image_disk_reference_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/image_disk_reference_py3.py deleted file mode 100644 index 85bf966bc6e0..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/image_disk_reference_py3.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ImageDiskReference(Model): - """The source image used for creating the disk. - - All required parameters must be populated in order to send to Azure. - - :param id: Required. A relative uri containing either a Platform Image - Repository or user image reference. - :type id: str - :param lun: If the disk is created from an image's data disk, this is an - index that indicates which of the data disks in the image to use. For OS - disks, this field is null. - :type lun: int - """ - - _validation = { - 'id': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'lun': {'key': 'lun', 'type': 'int'}, - } - - def __init__(self, *, id: str, lun: int=None, **kwargs) -> None: - super(ImageDiskReference, self).__init__(**kwargs) - self.id = id - self.lun = lun diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/image_os_disk.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/image_os_disk.py deleted file mode 100644 index 98eea6ff040f..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/image_os_disk.py +++ /dev/null @@ -1,72 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ImageOSDisk(Model): - """Describes an Operating System disk. - - All required parameters must be populated in order to send to Azure. - - :param os_type: Required. This property allows you to specify the type of - the OS that is included in the disk if creating a VM from a custom image. -

    Possible values are:

    **Windows**

    **Linux**. - Possible values include: 'Windows', 'Linux' - :type os_type: str or - ~azure.mgmt.compute.v2016_04_30_preview.models.OperatingSystemTypes - :param os_state: Required. The OS State. Possible values include: - 'Generalized', 'Specialized' - :type os_state: str or - ~azure.mgmt.compute.v2016_04_30_preview.models.OperatingSystemStateTypes - :param snapshot: The snapshot. - :type snapshot: ~azure.mgmt.compute.v2016_04_30_preview.models.SubResource - :param managed_disk: The managedDisk. - :type managed_disk: - ~azure.mgmt.compute.v2016_04_30_preview.models.SubResource - :param blob_uri: The Virtual Hard Disk. - :type blob_uri: str - :param caching: Specifies the caching requirements.

    Possible - values are:

    **None**

    **ReadOnly**

    **ReadWrite** -

    Default: **None for Standard storage. ReadOnly for Premium - storage**. Possible values include: 'None', 'ReadOnly', 'ReadWrite' - :type caching: str or - ~azure.mgmt.compute.v2016_04_30_preview.models.CachingTypes - :param disk_size_gb: Specifies the size of empty data disks in gigabytes. - This element can be used to overwrite the name of the disk in a virtual - machine image.

    This value cannot be larger than 1023 GB - :type disk_size_gb: int - """ - - _validation = { - 'os_type': {'required': True}, - 'os_state': {'required': True}, - } - - _attribute_map = { - 'os_type': {'key': 'osType', 'type': 'OperatingSystemTypes'}, - 'os_state': {'key': 'osState', 'type': 'OperatingSystemStateTypes'}, - 'snapshot': {'key': 'snapshot', 'type': 'SubResource'}, - 'managed_disk': {'key': 'managedDisk', 'type': 'SubResource'}, - 'blob_uri': {'key': 'blobUri', 'type': 'str'}, - 'caching': {'key': 'caching', 'type': 'CachingTypes'}, - 'disk_size_gb': {'key': 'diskSizeGB', 'type': 'int'}, - } - - def __init__(self, **kwargs): - super(ImageOSDisk, self).__init__(**kwargs) - self.os_type = kwargs.get('os_type', None) - self.os_state = kwargs.get('os_state', None) - self.snapshot = kwargs.get('snapshot', None) - self.managed_disk = kwargs.get('managed_disk', None) - self.blob_uri = kwargs.get('blob_uri', None) - self.caching = kwargs.get('caching', None) - self.disk_size_gb = kwargs.get('disk_size_gb', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/image_os_disk_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/image_os_disk_py3.py deleted file mode 100644 index 1080364a701b..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/image_os_disk_py3.py +++ /dev/null @@ -1,72 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ImageOSDisk(Model): - """Describes an Operating System disk. - - All required parameters must be populated in order to send to Azure. - - :param os_type: Required. This property allows you to specify the type of - the OS that is included in the disk if creating a VM from a custom image. -

    Possible values are:

    **Windows**

    **Linux**. - Possible values include: 'Windows', 'Linux' - :type os_type: str or - ~azure.mgmt.compute.v2016_04_30_preview.models.OperatingSystemTypes - :param os_state: Required. The OS State. Possible values include: - 'Generalized', 'Specialized' - :type os_state: str or - ~azure.mgmt.compute.v2016_04_30_preview.models.OperatingSystemStateTypes - :param snapshot: The snapshot. - :type snapshot: ~azure.mgmt.compute.v2016_04_30_preview.models.SubResource - :param managed_disk: The managedDisk. - :type managed_disk: - ~azure.mgmt.compute.v2016_04_30_preview.models.SubResource - :param blob_uri: The Virtual Hard Disk. - :type blob_uri: str - :param caching: Specifies the caching requirements.

    Possible - values are:

    **None**

    **ReadOnly**

    **ReadWrite** -

    Default: **None for Standard storage. ReadOnly for Premium - storage**. Possible values include: 'None', 'ReadOnly', 'ReadWrite' - :type caching: str or - ~azure.mgmt.compute.v2016_04_30_preview.models.CachingTypes - :param disk_size_gb: Specifies the size of empty data disks in gigabytes. - This element can be used to overwrite the name of the disk in a virtual - machine image.

    This value cannot be larger than 1023 GB - :type disk_size_gb: int - """ - - _validation = { - 'os_type': {'required': True}, - 'os_state': {'required': True}, - } - - _attribute_map = { - 'os_type': {'key': 'osType', 'type': 'OperatingSystemTypes'}, - 'os_state': {'key': 'osState', 'type': 'OperatingSystemStateTypes'}, - 'snapshot': {'key': 'snapshot', 'type': 'SubResource'}, - 'managed_disk': {'key': 'managedDisk', 'type': 'SubResource'}, - 'blob_uri': {'key': 'blobUri', 'type': 'str'}, - 'caching': {'key': 'caching', 'type': 'CachingTypes'}, - 'disk_size_gb': {'key': 'diskSizeGB', 'type': 'int'}, - } - - def __init__(self, *, os_type, os_state, snapshot=None, managed_disk=None, blob_uri: str=None, caching=None, disk_size_gb: int=None, **kwargs) -> None: - super(ImageOSDisk, self).__init__(**kwargs) - self.os_type = os_type - self.os_state = os_state - self.snapshot = snapshot - self.managed_disk = managed_disk - self.blob_uri = blob_uri - self.caching = caching - self.disk_size_gb = disk_size_gb diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/image_paged.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/image_paged.py deleted file mode 100644 index 82125f0d1853..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/image_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class ImagePaged(Paged): - """ - A paging container for iterating over a list of :class:`Image ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[Image]'} - } - - def __init__(self, *args, **kwargs): - - super(ImagePaged, self).__init__(*args, **kwargs) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/image_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/image_py3.py deleted file mode 100644 index 87f57c1b86c3..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/image_py3.py +++ /dev/null @@ -1,70 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource_py3 import Resource - - -class Image(Resource): - """The source user image virtual hard disk. The virtual hard disk will be - copied before being attached to the virtual machine. If SourceImage is - provided, the destination virtual hard drive must not exist. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource Id - :vartype id: str - :ivar name: Resource name - :vartype name: str - :ivar type: Resource type - :vartype type: str - :param location: Required. Resource location - :type location: str - :param tags: Resource tags - :type tags: dict[str, str] - :param source_virtual_machine: The source virtual machine from which Image - is created. - :type source_virtual_machine: - ~azure.mgmt.compute.v2016_04_30_preview.models.SubResource - :param storage_profile: Specifies the storage settings for the virtual - machine disks. - :type storage_profile: - ~azure.mgmt.compute.v2016_04_30_preview.models.ImageStorageProfile - :ivar provisioning_state: The provisioning state. - :vartype provisioning_state: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - 'provisioning_state': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'source_virtual_machine': {'key': 'properties.sourceVirtualMachine', 'type': 'SubResource'}, - 'storage_profile': {'key': 'properties.storageProfile', 'type': 'ImageStorageProfile'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - } - - def __init__(self, *, location: str, tags=None, source_virtual_machine=None, storage_profile=None, **kwargs) -> None: - super(Image, self).__init__(location=location, tags=tags, **kwargs) - self.source_virtual_machine = source_virtual_machine - self.storage_profile = storage_profile - self.provisioning_state = None diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/image_reference.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/image_reference.py deleted file mode 100644 index b8f929f4ad70..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/image_reference.py +++ /dev/null @@ -1,54 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .sub_resource import SubResource - - -class ImageReference(SubResource): - """Specifies information about the image to use. You can specify information - about platform images, marketplace images, or virtual machine images. This - element is required when you want to use a platform image, marketplace - image, or virtual machine image, but is not used in other creation - operations. - - :param id: Resource Id - :type id: str - :param publisher: The image publisher. - :type publisher: str - :param offer: Specifies the offer of the platform image or marketplace - image used to create the virtual machine. - :type offer: str - :param sku: The image SKU. - :type sku: str - :param version: Specifies the version of the platform image or marketplace - image used to create the virtual machine. The allowed formats are - Major.Minor.Build or 'latest'. Major, Minor, and Build are decimal - numbers. Specify 'latest' to use the latest version of an image available - at deploy time. Even if you use 'latest', the VM image will not - automatically update after deploy time even if a new version becomes - available. - :type version: str - """ - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'publisher': {'key': 'publisher', 'type': 'str'}, - 'offer': {'key': 'offer', 'type': 'str'}, - 'sku': {'key': 'sku', 'type': 'str'}, - 'version': {'key': 'version', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ImageReference, self).__init__(**kwargs) - self.publisher = kwargs.get('publisher', None) - self.offer = kwargs.get('offer', None) - self.sku = kwargs.get('sku', None) - self.version = kwargs.get('version', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/image_reference_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/image_reference_py3.py deleted file mode 100644 index 1d7eefe5ac65..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/image_reference_py3.py +++ /dev/null @@ -1,54 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .sub_resource_py3 import SubResource - - -class ImageReference(SubResource): - """Specifies information about the image to use. You can specify information - about platform images, marketplace images, or virtual machine images. This - element is required when you want to use a platform image, marketplace - image, or virtual machine image, but is not used in other creation - operations. - - :param id: Resource Id - :type id: str - :param publisher: The image publisher. - :type publisher: str - :param offer: Specifies the offer of the platform image or marketplace - image used to create the virtual machine. - :type offer: str - :param sku: The image SKU. - :type sku: str - :param version: Specifies the version of the platform image or marketplace - image used to create the virtual machine. The allowed formats are - Major.Minor.Build or 'latest'. Major, Minor, and Build are decimal - numbers. Specify 'latest' to use the latest version of an image available - at deploy time. Even if you use 'latest', the VM image will not - automatically update after deploy time even if a new version becomes - available. - :type version: str - """ - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'publisher': {'key': 'publisher', 'type': 'str'}, - 'offer': {'key': 'offer', 'type': 'str'}, - 'sku': {'key': 'sku', 'type': 'str'}, - 'version': {'key': 'version', 'type': 'str'}, - } - - def __init__(self, *, id: str=None, publisher: str=None, offer: str=None, sku: str=None, version: str=None, **kwargs) -> None: - super(ImageReference, self).__init__(id=id, **kwargs) - self.publisher = publisher - self.offer = offer - self.sku = sku - self.version = version diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/image_storage_profile.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/image_storage_profile.py deleted file mode 100644 index 46d13c36255e..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/image_storage_profile.py +++ /dev/null @@ -1,45 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ImageStorageProfile(Model): - """Describes a storage profile. - - All required parameters must be populated in order to send to Azure. - - :param os_disk: Required. Specifies information about the operating system - disk used by the virtual machine.

    For more information about - disks, see [About disks and VHDs for Azure virtual - machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-about-disks-vhds?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). - :type os_disk: ~azure.mgmt.compute.v2016_04_30_preview.models.ImageOSDisk - :param data_disks: Specifies the parameters that are used to add a data - disk to a virtual machine.

    For more information about disks, see - [About disks and VHDs for Azure virtual - machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-about-disks-vhds?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). - :type data_disks: - list[~azure.mgmt.compute.v2016_04_30_preview.models.ImageDataDisk] - """ - - _validation = { - 'os_disk': {'required': True}, - } - - _attribute_map = { - 'os_disk': {'key': 'osDisk', 'type': 'ImageOSDisk'}, - 'data_disks': {'key': 'dataDisks', 'type': '[ImageDataDisk]'}, - } - - def __init__(self, **kwargs): - super(ImageStorageProfile, self).__init__(**kwargs) - self.os_disk = kwargs.get('os_disk', None) - self.data_disks = kwargs.get('data_disks', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/image_storage_profile_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/image_storage_profile_py3.py deleted file mode 100644 index 7280e0fe8431..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/image_storage_profile_py3.py +++ /dev/null @@ -1,45 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ImageStorageProfile(Model): - """Describes a storage profile. - - All required parameters must be populated in order to send to Azure. - - :param os_disk: Required. Specifies information about the operating system - disk used by the virtual machine.

    For more information about - disks, see [About disks and VHDs for Azure virtual - machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-about-disks-vhds?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). - :type os_disk: ~azure.mgmt.compute.v2016_04_30_preview.models.ImageOSDisk - :param data_disks: Specifies the parameters that are used to add a data - disk to a virtual machine.

    For more information about disks, see - [About disks and VHDs for Azure virtual - machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-about-disks-vhds?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). - :type data_disks: - list[~azure.mgmt.compute.v2016_04_30_preview.models.ImageDataDisk] - """ - - _validation = { - 'os_disk': {'required': True}, - } - - _attribute_map = { - 'os_disk': {'key': 'osDisk', 'type': 'ImageOSDisk'}, - 'data_disks': {'key': 'dataDisks', 'type': '[ImageDataDisk]'}, - } - - def __init__(self, *, os_disk, data_disks=None, **kwargs) -> None: - super(ImageStorageProfile, self).__init__(**kwargs) - self.os_disk = os_disk - self.data_disks = data_disks diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/inner_error.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/inner_error.py deleted file mode 100644 index 6324249d7c19..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/inner_error.py +++ /dev/null @@ -1,32 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class InnerError(Model): - """Inner error details. - - :param exceptiontype: The exception type. - :type exceptiontype: str - :param errordetail: The internal error message or exception dump. - :type errordetail: str - """ - - _attribute_map = { - 'exceptiontype': {'key': 'exceptiontype', 'type': 'str'}, - 'errordetail': {'key': 'errordetail', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(InnerError, self).__init__(**kwargs) - self.exceptiontype = kwargs.get('exceptiontype', None) - self.errordetail = kwargs.get('errordetail', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/inner_error_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/inner_error_py3.py deleted file mode 100644 index ccec30d7b53f..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/inner_error_py3.py +++ /dev/null @@ -1,32 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class InnerError(Model): - """Inner error details. - - :param exceptiontype: The exception type. - :type exceptiontype: str - :param errordetail: The internal error message or exception dump. - :type errordetail: str - """ - - _attribute_map = { - 'exceptiontype': {'key': 'exceptiontype', 'type': 'str'}, - 'errordetail': {'key': 'errordetail', 'type': 'str'}, - } - - def __init__(self, *, exceptiontype: str=None, errordetail: str=None, **kwargs) -> None: - super(InnerError, self).__init__(**kwargs) - self.exceptiontype = exceptiontype - self.errordetail = errordetail diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/instance_view_status.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/instance_view_status.py deleted file mode 100644 index 6741b46ec8c2..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/instance_view_status.py +++ /dev/null @@ -1,47 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class InstanceViewStatus(Model): - """Instance view status. - - :param code: The status code. - :type code: str - :param level: The level code. Possible values include: 'Info', 'Warning', - 'Error' - :type level: str or - ~azure.mgmt.compute.v2016_04_30_preview.models.StatusLevelTypes - :param display_status: The short localizable label for the status. - :type display_status: str - :param message: The detailed status message, including for alerts and - error messages. - :type message: str - :param time: The time of the status. - :type time: datetime - """ - - _attribute_map = { - 'code': {'key': 'code', 'type': 'str'}, - 'level': {'key': 'level', 'type': 'StatusLevelTypes'}, - 'display_status': {'key': 'displayStatus', 'type': 'str'}, - 'message': {'key': 'message', 'type': 'str'}, - 'time': {'key': 'time', 'type': 'iso-8601'}, - } - - def __init__(self, **kwargs): - super(InstanceViewStatus, self).__init__(**kwargs) - self.code = kwargs.get('code', None) - self.level = kwargs.get('level', None) - self.display_status = kwargs.get('display_status', None) - self.message = kwargs.get('message', None) - self.time = kwargs.get('time', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/instance_view_status_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/instance_view_status_py3.py deleted file mode 100644 index 44b6ee6e6ad4..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/instance_view_status_py3.py +++ /dev/null @@ -1,47 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class InstanceViewStatus(Model): - """Instance view status. - - :param code: The status code. - :type code: str - :param level: The level code. Possible values include: 'Info', 'Warning', - 'Error' - :type level: str or - ~azure.mgmt.compute.v2016_04_30_preview.models.StatusLevelTypes - :param display_status: The short localizable label for the status. - :type display_status: str - :param message: The detailed status message, including for alerts and - error messages. - :type message: str - :param time: The time of the status. - :type time: datetime - """ - - _attribute_map = { - 'code': {'key': 'code', 'type': 'str'}, - 'level': {'key': 'level', 'type': 'StatusLevelTypes'}, - 'display_status': {'key': 'displayStatus', 'type': 'str'}, - 'message': {'key': 'message', 'type': 'str'}, - 'time': {'key': 'time', 'type': 'iso-8601'}, - } - - def __init__(self, *, code: str=None, level=None, display_status: str=None, message: str=None, time=None, **kwargs) -> None: - super(InstanceViewStatus, self).__init__(**kwargs) - self.code = code - self.level = level - self.display_status = display_status - self.message = message - self.time = time diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/key_vault_and_key_reference.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/key_vault_and_key_reference.py deleted file mode 100644 index 29021b7bf88d..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/key_vault_and_key_reference.py +++ /dev/null @@ -1,42 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class KeyVaultAndKeyReference(Model): - """Key Vault Key Url and vault id of KeK, KeK is optional and when provided is - used to unwrap the encryptionKey. - - All required parameters must be populated in order to send to Azure. - - :param source_vault: Required. Resource id of the KeyVault containing the - key or secret - :type source_vault: - ~azure.mgmt.compute.v2016_04_30_preview.models.SourceVault - :param key_url: Required. Url pointing to a key or secret in KeyVault - :type key_url: str - """ - - _validation = { - 'source_vault': {'required': True}, - 'key_url': {'required': True}, - } - - _attribute_map = { - 'source_vault': {'key': 'sourceVault', 'type': 'SourceVault'}, - 'key_url': {'key': 'keyUrl', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(KeyVaultAndKeyReference, self).__init__(**kwargs) - self.source_vault = kwargs.get('source_vault', None) - self.key_url = kwargs.get('key_url', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/key_vault_and_key_reference_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/key_vault_and_key_reference_py3.py deleted file mode 100644 index 480a05b257a8..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/key_vault_and_key_reference_py3.py +++ /dev/null @@ -1,42 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class KeyVaultAndKeyReference(Model): - """Key Vault Key Url and vault id of KeK, KeK is optional and when provided is - used to unwrap the encryptionKey. - - All required parameters must be populated in order to send to Azure. - - :param source_vault: Required. Resource id of the KeyVault containing the - key or secret - :type source_vault: - ~azure.mgmt.compute.v2016_04_30_preview.models.SourceVault - :param key_url: Required. Url pointing to a key or secret in KeyVault - :type key_url: str - """ - - _validation = { - 'source_vault': {'required': True}, - 'key_url': {'required': True}, - } - - _attribute_map = { - 'source_vault': {'key': 'sourceVault', 'type': 'SourceVault'}, - 'key_url': {'key': 'keyUrl', 'type': 'str'}, - } - - def __init__(self, *, source_vault, key_url: str, **kwargs) -> None: - super(KeyVaultAndKeyReference, self).__init__(**kwargs) - self.source_vault = source_vault - self.key_url = key_url diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/key_vault_and_secret_reference.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/key_vault_and_secret_reference.py deleted file mode 100644 index d1da7fb2acc6..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/key_vault_and_secret_reference.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class KeyVaultAndSecretReference(Model): - """Key Vault Secret Url and vault id of the encryption key . - - All required parameters must be populated in order to send to Azure. - - :param source_vault: Required. Resource id of the KeyVault containing the - key or secret - :type source_vault: - ~azure.mgmt.compute.v2016_04_30_preview.models.SourceVault - :param secret_url: Required. Url pointing to a key or secret in KeyVault - :type secret_url: str - """ - - _validation = { - 'source_vault': {'required': True}, - 'secret_url': {'required': True}, - } - - _attribute_map = { - 'source_vault': {'key': 'sourceVault', 'type': 'SourceVault'}, - 'secret_url': {'key': 'secretUrl', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(KeyVaultAndSecretReference, self).__init__(**kwargs) - self.source_vault = kwargs.get('source_vault', None) - self.secret_url = kwargs.get('secret_url', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/key_vault_and_secret_reference_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/key_vault_and_secret_reference_py3.py deleted file mode 100644 index 82c41657a74a..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/key_vault_and_secret_reference_py3.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class KeyVaultAndSecretReference(Model): - """Key Vault Secret Url and vault id of the encryption key . - - All required parameters must be populated in order to send to Azure. - - :param source_vault: Required. Resource id of the KeyVault containing the - key or secret - :type source_vault: - ~azure.mgmt.compute.v2016_04_30_preview.models.SourceVault - :param secret_url: Required. Url pointing to a key or secret in KeyVault - :type secret_url: str - """ - - _validation = { - 'source_vault': {'required': True}, - 'secret_url': {'required': True}, - } - - _attribute_map = { - 'source_vault': {'key': 'sourceVault', 'type': 'SourceVault'}, - 'secret_url': {'key': 'secretUrl', 'type': 'str'}, - } - - def __init__(self, *, source_vault, secret_url: str, **kwargs) -> None: - super(KeyVaultAndSecretReference, self).__init__(**kwargs) - self.source_vault = source_vault - self.secret_url = secret_url diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/key_vault_key_reference.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/key_vault_key_reference.py deleted file mode 100644 index 02437d2c77de..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/key_vault_key_reference.py +++ /dev/null @@ -1,42 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class KeyVaultKeyReference(Model): - """Describes a reference to Key Vault Key. - - All required parameters must be populated in order to send to Azure. - - :param key_url: Required. The URL referencing a key encryption key in Key - Vault. - :type key_url: str - :param source_vault: Required. The relative URL of the Key Vault - containing the key. - :type source_vault: - ~azure.mgmt.compute.v2016_04_30_preview.models.SubResource - """ - - _validation = { - 'key_url': {'required': True}, - 'source_vault': {'required': True}, - } - - _attribute_map = { - 'key_url': {'key': 'keyUrl', 'type': 'str'}, - 'source_vault': {'key': 'sourceVault', 'type': 'SubResource'}, - } - - def __init__(self, **kwargs): - super(KeyVaultKeyReference, self).__init__(**kwargs) - self.key_url = kwargs.get('key_url', None) - self.source_vault = kwargs.get('source_vault', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/key_vault_key_reference_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/key_vault_key_reference_py3.py deleted file mode 100644 index fc711b0c6cad..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/key_vault_key_reference_py3.py +++ /dev/null @@ -1,42 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class KeyVaultKeyReference(Model): - """Describes a reference to Key Vault Key. - - All required parameters must be populated in order to send to Azure. - - :param key_url: Required. The URL referencing a key encryption key in Key - Vault. - :type key_url: str - :param source_vault: Required. The relative URL of the Key Vault - containing the key. - :type source_vault: - ~azure.mgmt.compute.v2016_04_30_preview.models.SubResource - """ - - _validation = { - 'key_url': {'required': True}, - 'source_vault': {'required': True}, - } - - _attribute_map = { - 'key_url': {'key': 'keyUrl', 'type': 'str'}, - 'source_vault': {'key': 'sourceVault', 'type': 'SubResource'}, - } - - def __init__(self, *, key_url: str, source_vault, **kwargs) -> None: - super(KeyVaultKeyReference, self).__init__(**kwargs) - self.key_url = key_url - self.source_vault = source_vault diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/key_vault_secret_reference.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/key_vault_secret_reference.py deleted file mode 100644 index e478be625fe6..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/key_vault_secret_reference.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class KeyVaultSecretReference(Model): - """Describes a reference to Key Vault Secret. - - All required parameters must be populated in order to send to Azure. - - :param secret_url: Required. The URL referencing a secret in a Key Vault. - :type secret_url: str - :param source_vault: Required. The relative URL of the Key Vault - containing the secret. - :type source_vault: - ~azure.mgmt.compute.v2016_04_30_preview.models.SubResource - """ - - _validation = { - 'secret_url': {'required': True}, - 'source_vault': {'required': True}, - } - - _attribute_map = { - 'secret_url': {'key': 'secretUrl', 'type': 'str'}, - 'source_vault': {'key': 'sourceVault', 'type': 'SubResource'}, - } - - def __init__(self, **kwargs): - super(KeyVaultSecretReference, self).__init__(**kwargs) - self.secret_url = kwargs.get('secret_url', None) - self.source_vault = kwargs.get('source_vault', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/key_vault_secret_reference_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/key_vault_secret_reference_py3.py deleted file mode 100644 index cc17d1b9032c..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/key_vault_secret_reference_py3.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class KeyVaultSecretReference(Model): - """Describes a reference to Key Vault Secret. - - All required parameters must be populated in order to send to Azure. - - :param secret_url: Required. The URL referencing a secret in a Key Vault. - :type secret_url: str - :param source_vault: Required. The relative URL of the Key Vault - containing the secret. - :type source_vault: - ~azure.mgmt.compute.v2016_04_30_preview.models.SubResource - """ - - _validation = { - 'secret_url': {'required': True}, - 'source_vault': {'required': True}, - } - - _attribute_map = { - 'secret_url': {'key': 'secretUrl', 'type': 'str'}, - 'source_vault': {'key': 'sourceVault', 'type': 'SubResource'}, - } - - def __init__(self, *, secret_url: str, source_vault, **kwargs) -> None: - super(KeyVaultSecretReference, self).__init__(**kwargs) - self.secret_url = secret_url - self.source_vault = source_vault diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/linux_configuration.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/linux_configuration.py deleted file mode 100644 index e8689ca503e9..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/linux_configuration.py +++ /dev/null @@ -1,39 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class LinuxConfiguration(Model): - """Specifies the Linux operating system settings on the virtual machine. -

    For a list of supported Linux distributions, see [Linux on - Azure-Endorsed - Distributions](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-endorsed-distros?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json) -

    For running non-endorsed distributions, see [Information for - Non-Endorsed - Distributions](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-create-upload-generic?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json). - - :param disable_password_authentication: Specifies whether password - authentication should be disabled. - :type disable_password_authentication: bool - :param ssh: Specifies the ssh key configuration for a Linux OS. - :type ssh: ~azure.mgmt.compute.v2016_04_30_preview.models.SshConfiguration - """ - - _attribute_map = { - 'disable_password_authentication': {'key': 'disablePasswordAuthentication', 'type': 'bool'}, - 'ssh': {'key': 'ssh', 'type': 'SshConfiguration'}, - } - - def __init__(self, **kwargs): - super(LinuxConfiguration, self).__init__(**kwargs) - self.disable_password_authentication = kwargs.get('disable_password_authentication', None) - self.ssh = kwargs.get('ssh', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/linux_configuration_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/linux_configuration_py3.py deleted file mode 100644 index b0a3f0ee7a9a..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/linux_configuration_py3.py +++ /dev/null @@ -1,39 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class LinuxConfiguration(Model): - """Specifies the Linux operating system settings on the virtual machine. -

    For a list of supported Linux distributions, see [Linux on - Azure-Endorsed - Distributions](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-endorsed-distros?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json) -

    For running non-endorsed distributions, see [Information for - Non-Endorsed - Distributions](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-create-upload-generic?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json). - - :param disable_password_authentication: Specifies whether password - authentication should be disabled. - :type disable_password_authentication: bool - :param ssh: Specifies the ssh key configuration for a Linux OS. - :type ssh: ~azure.mgmt.compute.v2016_04_30_preview.models.SshConfiguration - """ - - _attribute_map = { - 'disable_password_authentication': {'key': 'disablePasswordAuthentication', 'type': 'bool'}, - 'ssh': {'key': 'ssh', 'type': 'SshConfiguration'}, - } - - def __init__(self, *, disable_password_authentication: bool=None, ssh=None, **kwargs) -> None: - super(LinuxConfiguration, self).__init__(**kwargs) - self.disable_password_authentication = disable_password_authentication - self.ssh = ssh diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/managed_disk_parameters.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/managed_disk_parameters.py deleted file mode 100644 index aac844a7ebb5..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/managed_disk_parameters.py +++ /dev/null @@ -1,34 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .sub_resource import SubResource - - -class ManagedDiskParameters(SubResource): - """The parameters of a managed disk. - - :param id: Resource Id - :type id: str - :param storage_account_type: Specifies the storage account type for the - managed disk. Possible values are: Standard_LRS or Premium_LRS. Possible - values include: 'Standard_LRS', 'Premium_LRS' - :type storage_account_type: str or - ~azure.mgmt.compute.v2016_04_30_preview.models.StorageAccountTypes - """ - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'storage_account_type': {'key': 'storageAccountType', 'type': 'StorageAccountTypes'}, - } - - def __init__(self, **kwargs): - super(ManagedDiskParameters, self).__init__(**kwargs) - self.storage_account_type = kwargs.get('storage_account_type', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/managed_disk_parameters_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/managed_disk_parameters_py3.py deleted file mode 100644 index 2be83953da18..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/managed_disk_parameters_py3.py +++ /dev/null @@ -1,34 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .sub_resource_py3 import SubResource - - -class ManagedDiskParameters(SubResource): - """The parameters of a managed disk. - - :param id: Resource Id - :type id: str - :param storage_account_type: Specifies the storage account type for the - managed disk. Possible values are: Standard_LRS or Premium_LRS. Possible - values include: 'Standard_LRS', 'Premium_LRS' - :type storage_account_type: str or - ~azure.mgmt.compute.v2016_04_30_preview.models.StorageAccountTypes - """ - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'storage_account_type': {'key': 'storageAccountType', 'type': 'StorageAccountTypes'}, - } - - def __init__(self, *, id: str=None, storage_account_type=None, **kwargs) -> None: - super(ManagedDiskParameters, self).__init__(id=id, **kwargs) - self.storage_account_type = storage_account_type diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/network_interface_reference.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/network_interface_reference.py deleted file mode 100644 index b86e305e3f74..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/network_interface_reference.py +++ /dev/null @@ -1,32 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .sub_resource import SubResource - - -class NetworkInterfaceReference(SubResource): - """Describes a network interface reference. - - :param id: Resource Id - :type id: str - :param primary: Specifies the primary network interface in case the - virtual machine has more than 1 network interface. - :type primary: bool - """ - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'primary': {'key': 'properties.primary', 'type': 'bool'}, - } - - def __init__(self, **kwargs): - super(NetworkInterfaceReference, self).__init__(**kwargs) - self.primary = kwargs.get('primary', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/network_interface_reference_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/network_interface_reference_py3.py deleted file mode 100644 index 47da29278832..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/network_interface_reference_py3.py +++ /dev/null @@ -1,32 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .sub_resource_py3 import SubResource - - -class NetworkInterfaceReference(SubResource): - """Describes a network interface reference. - - :param id: Resource Id - :type id: str - :param primary: Specifies the primary network interface in case the - virtual machine has more than 1 network interface. - :type primary: bool - """ - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'primary': {'key': 'properties.primary', 'type': 'bool'}, - } - - def __init__(self, *, id: str=None, primary: bool=None, **kwargs) -> None: - super(NetworkInterfaceReference, self).__init__(id=id, **kwargs) - self.primary = primary diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/network_profile.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/network_profile.py deleted file mode 100644 index 467d6e5884cd..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/network_profile.py +++ /dev/null @@ -1,30 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class NetworkProfile(Model): - """Specifies the network interfaces of the virtual machine. - - :param network_interfaces: Specifies the list of resource Ids for the - network interfaces associated with the virtual machine. - :type network_interfaces: - list[~azure.mgmt.compute.v2016_04_30_preview.models.NetworkInterfaceReference] - """ - - _attribute_map = { - 'network_interfaces': {'key': 'networkInterfaces', 'type': '[NetworkInterfaceReference]'}, - } - - def __init__(self, **kwargs): - super(NetworkProfile, self).__init__(**kwargs) - self.network_interfaces = kwargs.get('network_interfaces', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/network_profile_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/network_profile_py3.py deleted file mode 100644 index cd9b6daa285b..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/network_profile_py3.py +++ /dev/null @@ -1,30 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class NetworkProfile(Model): - """Specifies the network interfaces of the virtual machine. - - :param network_interfaces: Specifies the list of resource Ids for the - network interfaces associated with the virtual machine. - :type network_interfaces: - list[~azure.mgmt.compute.v2016_04_30_preview.models.NetworkInterfaceReference] - """ - - _attribute_map = { - 'network_interfaces': {'key': 'networkInterfaces', 'type': '[NetworkInterfaceReference]'}, - } - - def __init__(self, *, network_interfaces=None, **kwargs) -> None: - super(NetworkProfile, self).__init__(**kwargs) - self.network_interfaces = network_interfaces diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/operation_status_response.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/operation_status_response.py deleted file mode 100644 index 2cc7cf8104aa..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/operation_status_response.py +++ /dev/null @@ -1,55 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class OperationStatusResponse(Model): - """Operation status response. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar name: Operation ID - :vartype name: str - :ivar status: Operation status - :vartype status: str - :ivar start_time: Start time of the operation - :vartype start_time: datetime - :ivar end_time: End time of the operation - :vartype end_time: datetime - :ivar error: Api error - :vartype error: ~azure.mgmt.compute.v2016_04_30_preview.models.ApiError - """ - - _validation = { - 'name': {'readonly': True}, - 'status': {'readonly': True}, - 'start_time': {'readonly': True}, - 'end_time': {'readonly': True}, - 'error': {'readonly': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'status': {'key': 'status', 'type': 'str'}, - 'start_time': {'key': 'startTime', 'type': 'iso-8601'}, - 'end_time': {'key': 'endTime', 'type': 'iso-8601'}, - 'error': {'key': 'error', 'type': 'ApiError'}, - } - - def __init__(self, **kwargs): - super(OperationStatusResponse, self).__init__(**kwargs) - self.name = None - self.status = None - self.start_time = None - self.end_time = None - self.error = None diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/operation_status_response_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/operation_status_response_py3.py deleted file mode 100644 index f7713f697f70..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/operation_status_response_py3.py +++ /dev/null @@ -1,55 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class OperationStatusResponse(Model): - """Operation status response. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar name: Operation ID - :vartype name: str - :ivar status: Operation status - :vartype status: str - :ivar start_time: Start time of the operation - :vartype start_time: datetime - :ivar end_time: End time of the operation - :vartype end_time: datetime - :ivar error: Api error - :vartype error: ~azure.mgmt.compute.v2016_04_30_preview.models.ApiError - """ - - _validation = { - 'name': {'readonly': True}, - 'status': {'readonly': True}, - 'start_time': {'readonly': True}, - 'end_time': {'readonly': True}, - 'error': {'readonly': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'status': {'key': 'status', 'type': 'str'}, - 'start_time': {'key': 'startTime', 'type': 'iso-8601'}, - 'end_time': {'key': 'endTime', 'type': 'iso-8601'}, - 'error': {'key': 'error', 'type': 'ApiError'}, - } - - def __init__(self, **kwargs) -> None: - super(OperationStatusResponse, self).__init__(**kwargs) - self.name = None - self.status = None - self.start_time = None - self.end_time = None - self.error = None diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/os_disk.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/os_disk.py deleted file mode 100644 index 8cfa5ba076a5..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/os_disk.py +++ /dev/null @@ -1,94 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class OSDisk(Model): - """Specifies information about the operating system disk used by the virtual - machine.

    For more information about disks, see [About disks and - VHDs for Azure virtual - machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-about-disks-vhds?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). - - All required parameters must be populated in order to send to Azure. - - :param os_type: This property allows you to specify the type of the OS - that is included in the disk if creating a VM from user-image or a - specialized VHD.

    Possible values are:

    **Windows** -

    **Linux**. Possible values include: 'Windows', 'Linux' - :type os_type: str or - ~azure.mgmt.compute.v2016_04_30_preview.models.OperatingSystemTypes - :param encryption_settings: Specifies the encryption settings for the OS - Disk.

    Minimum api-version: 2015-06-15 - :type encryption_settings: - ~azure.mgmt.compute.v2016_04_30_preview.models.DiskEncryptionSettings - :param name: The disk name. - :type name: str - :param vhd: The virtual hard disk. - :type vhd: ~azure.mgmt.compute.v2016_04_30_preview.models.VirtualHardDisk - :param image: The source user image virtual hard disk. The virtual hard - disk will be copied before being attached to the virtual machine. If - SourceImage is provided, the destination virtual hard drive must not - exist. - :type image: - ~azure.mgmt.compute.v2016_04_30_preview.models.VirtualHardDisk - :param caching: Specifies the caching requirements.

    Possible - values are:

    **None**

    **ReadOnly**

    **ReadWrite** -

    Default: **None for Standard storage. ReadOnly for Premium - storage**. Possible values include: 'None', 'ReadOnly', 'ReadWrite' - :type caching: str or - ~azure.mgmt.compute.v2016_04_30_preview.models.CachingTypes - :param create_option: Required. Specifies how the virtual machine should - be created.

    Possible values are:

    **Attach** \\u2013 This - value is used when you are using a specialized disk to create the virtual - machine.

    **FromImage** \\u2013 This value is used when you are - using an image to create the virtual machine. If you are using a platform - image, you also use the imageReference element described above. If you are - using a marketplace image, you also use the plan element previously - described. Possible values include: 'FromImage', 'Empty', 'Attach' - :type create_option: str or - ~azure.mgmt.compute.v2016_04_30_preview.models.DiskCreateOptionTypes - :param disk_size_gb: Specifies the size of an empty data disk in - gigabytes. This element can be used to overwrite the size of the disk in a - virtual machine image.

    This value cannot be larger than 1023 GB - :type disk_size_gb: int - :param managed_disk: The managed disk parameters. - :type managed_disk: - ~azure.mgmt.compute.v2016_04_30_preview.models.ManagedDiskParameters - """ - - _validation = { - 'create_option': {'required': True}, - } - - _attribute_map = { - 'os_type': {'key': 'osType', 'type': 'OperatingSystemTypes'}, - 'encryption_settings': {'key': 'encryptionSettings', 'type': 'DiskEncryptionSettings'}, - 'name': {'key': 'name', 'type': 'str'}, - 'vhd': {'key': 'vhd', 'type': 'VirtualHardDisk'}, - 'image': {'key': 'image', 'type': 'VirtualHardDisk'}, - 'caching': {'key': 'caching', 'type': 'CachingTypes'}, - 'create_option': {'key': 'createOption', 'type': 'DiskCreateOptionTypes'}, - 'disk_size_gb': {'key': 'diskSizeGB', 'type': 'int'}, - 'managed_disk': {'key': 'managedDisk', 'type': 'ManagedDiskParameters'}, - } - - def __init__(self, **kwargs): - super(OSDisk, self).__init__(**kwargs) - self.os_type = kwargs.get('os_type', None) - self.encryption_settings = kwargs.get('encryption_settings', None) - self.name = kwargs.get('name', None) - self.vhd = kwargs.get('vhd', None) - self.image = kwargs.get('image', None) - self.caching = kwargs.get('caching', None) - self.create_option = kwargs.get('create_option', None) - self.disk_size_gb = kwargs.get('disk_size_gb', None) - self.managed_disk = kwargs.get('managed_disk', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/os_disk_image.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/os_disk_image.py deleted file mode 100644 index 71608314bd25..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/os_disk_image.py +++ /dev/null @@ -1,36 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class OSDiskImage(Model): - """Contains the os disk image information. - - All required parameters must be populated in order to send to Azure. - - :param operating_system: Required. The operating system of the - osDiskImage. Possible values include: 'Windows', 'Linux' - :type operating_system: str or - ~azure.mgmt.compute.v2016_04_30_preview.models.OperatingSystemTypes - """ - - _validation = { - 'operating_system': {'required': True}, - } - - _attribute_map = { - 'operating_system': {'key': 'operatingSystem', 'type': 'OperatingSystemTypes'}, - } - - def __init__(self, **kwargs): - super(OSDiskImage, self).__init__(**kwargs) - self.operating_system = kwargs.get('operating_system', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/os_disk_image_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/os_disk_image_py3.py deleted file mode 100644 index 2fffe8d56908..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/os_disk_image_py3.py +++ /dev/null @@ -1,36 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class OSDiskImage(Model): - """Contains the os disk image information. - - All required parameters must be populated in order to send to Azure. - - :param operating_system: Required. The operating system of the - osDiskImage. Possible values include: 'Windows', 'Linux' - :type operating_system: str or - ~azure.mgmt.compute.v2016_04_30_preview.models.OperatingSystemTypes - """ - - _validation = { - 'operating_system': {'required': True}, - } - - _attribute_map = { - 'operating_system': {'key': 'operatingSystem', 'type': 'OperatingSystemTypes'}, - } - - def __init__(self, *, operating_system, **kwargs) -> None: - super(OSDiskImage, self).__init__(**kwargs) - self.operating_system = operating_system diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/os_disk_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/os_disk_py3.py deleted file mode 100644 index bb5b151ec7aa..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/os_disk_py3.py +++ /dev/null @@ -1,94 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class OSDisk(Model): - """Specifies information about the operating system disk used by the virtual - machine.

    For more information about disks, see [About disks and - VHDs for Azure virtual - machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-about-disks-vhds?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). - - All required parameters must be populated in order to send to Azure. - - :param os_type: This property allows you to specify the type of the OS - that is included in the disk if creating a VM from user-image or a - specialized VHD.

    Possible values are:

    **Windows** -

    **Linux**. Possible values include: 'Windows', 'Linux' - :type os_type: str or - ~azure.mgmt.compute.v2016_04_30_preview.models.OperatingSystemTypes - :param encryption_settings: Specifies the encryption settings for the OS - Disk.

    Minimum api-version: 2015-06-15 - :type encryption_settings: - ~azure.mgmt.compute.v2016_04_30_preview.models.DiskEncryptionSettings - :param name: The disk name. - :type name: str - :param vhd: The virtual hard disk. - :type vhd: ~azure.mgmt.compute.v2016_04_30_preview.models.VirtualHardDisk - :param image: The source user image virtual hard disk. The virtual hard - disk will be copied before being attached to the virtual machine. If - SourceImage is provided, the destination virtual hard drive must not - exist. - :type image: - ~azure.mgmt.compute.v2016_04_30_preview.models.VirtualHardDisk - :param caching: Specifies the caching requirements.

    Possible - values are:

    **None**

    **ReadOnly**

    **ReadWrite** -

    Default: **None for Standard storage. ReadOnly for Premium - storage**. Possible values include: 'None', 'ReadOnly', 'ReadWrite' - :type caching: str or - ~azure.mgmt.compute.v2016_04_30_preview.models.CachingTypes - :param create_option: Required. Specifies how the virtual machine should - be created.

    Possible values are:

    **Attach** \\u2013 This - value is used when you are using a specialized disk to create the virtual - machine.

    **FromImage** \\u2013 This value is used when you are - using an image to create the virtual machine. If you are using a platform - image, you also use the imageReference element described above. If you are - using a marketplace image, you also use the plan element previously - described. Possible values include: 'FromImage', 'Empty', 'Attach' - :type create_option: str or - ~azure.mgmt.compute.v2016_04_30_preview.models.DiskCreateOptionTypes - :param disk_size_gb: Specifies the size of an empty data disk in - gigabytes. This element can be used to overwrite the size of the disk in a - virtual machine image.

    This value cannot be larger than 1023 GB - :type disk_size_gb: int - :param managed_disk: The managed disk parameters. - :type managed_disk: - ~azure.mgmt.compute.v2016_04_30_preview.models.ManagedDiskParameters - """ - - _validation = { - 'create_option': {'required': True}, - } - - _attribute_map = { - 'os_type': {'key': 'osType', 'type': 'OperatingSystemTypes'}, - 'encryption_settings': {'key': 'encryptionSettings', 'type': 'DiskEncryptionSettings'}, - 'name': {'key': 'name', 'type': 'str'}, - 'vhd': {'key': 'vhd', 'type': 'VirtualHardDisk'}, - 'image': {'key': 'image', 'type': 'VirtualHardDisk'}, - 'caching': {'key': 'caching', 'type': 'CachingTypes'}, - 'create_option': {'key': 'createOption', 'type': 'DiskCreateOptionTypes'}, - 'disk_size_gb': {'key': 'diskSizeGB', 'type': 'int'}, - 'managed_disk': {'key': 'managedDisk', 'type': 'ManagedDiskParameters'}, - } - - def __init__(self, *, create_option, os_type=None, encryption_settings=None, name: str=None, vhd=None, image=None, caching=None, disk_size_gb: int=None, managed_disk=None, **kwargs) -> None: - super(OSDisk, self).__init__(**kwargs) - self.os_type = os_type - self.encryption_settings = encryption_settings - self.name = name - self.vhd = vhd - self.image = image - self.caching = caching - self.create_option = create_option - self.disk_size_gb = disk_size_gb - self.managed_disk = managed_disk diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/os_profile.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/os_profile.py deleted file mode 100644 index 96f661fac0ea..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/os_profile.py +++ /dev/null @@ -1,100 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class OSProfile(Model): - """Specifies the operating system settings for the virtual machine. - - :param computer_name: Specifies the host OS name of the virtual machine. -

    This name cannot be updated after the VM is created.

    - **Max-length (Windows):** 15 characters

    **Max-length (Linux):** - 64 characters.

    For naming conventions and restrictions see [Azure - infrastructure services implementation - guidelines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-infrastructure-subscription-accounts-guidelines?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json#1-naming-conventions). - :type computer_name: str - :param admin_username: Specifies the name of the administrator account. -

    **Windows-only restriction:** Cannot end in "."

    - **Disallowed values:** "administrator", "admin", "user", "user1", "test", - "user2", "test1", "user3", "admin1", "1", "123", "a", "actuser", "adm", - "admin2", "aspnet", "backup", "console", "david", "guest", "john", - "owner", "root", "server", "sql", "support", "support_388945a0", "sys", - "test2", "test3", "user4", "user5".

    **Minimum-length (Linux):** 1 - character

    **Max-length (Linux):** 64 characters

    - **Max-length (Windows):** 20 characters

  • For root access to - the Linux VM, see [Using root privileges on Linux virtual machines in - Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-use-root-privileges?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json)
  • - For a list of built-in system users on Linux that should not be used in - this field, see [Selecting User Names for Linux on - Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-usernames?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json) - :type admin_username: str - :param admin_password: Specifies the password of the administrator - account.

    **Minimum-length (Windows):** 8 characters

    - **Minimum-length (Linux):** 6 characters

    **Max-length - (Windows):** 123 characters

    **Max-length (Linux):** 72 characters -

    **Complexity requirements:** 3 out of 4 conditions below need to - be fulfilled
    Has lower characters
    Has upper characters
    Has a - digit
    Has a special character (Regex match [\\W_])

    - **Disallowed values:** "abc@123", "P@$$w0rd", "P@ssw0rd", "P@ssword123", - "Pa$$word", "pass@word1", "Password!", "Password1", "Password22", - "iloveyou!"

    For resetting the password, see [How to reset the - Remote Desktop service or its login password in a Windows - VM](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-reset-rdp?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json) -

    For resetting root password, see [Manage users, SSH, and check or - repair disks on Azure Linux VMs using the VMAccess - Extension](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-using-vmaccess-extension?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json#reset-root-password) - :type admin_password: str - :param custom_data: Specifies a base-64 encoded string of custom data. The - base-64 encoded string is decoded to a binary array that is saved as a - file on the Virtual Machine. The maximum length of the binary array is - 65535 bytes.

    For using cloud-init for your VM, see [Using - cloud-init to customize a Linux VM during - creation](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-using-cloud-init?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json) - :type custom_data: str - :param windows_configuration: Specifies Windows operating system settings - on the virtual machine. - :type windows_configuration: - ~azure.mgmt.compute.v2016_04_30_preview.models.WindowsConfiguration - :param linux_configuration: Specifies the Linux operating system settings - on the virtual machine.

    For a list of supported Linux - distributions, see [Linux on Azure-Endorsed - Distributions](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-endorsed-distros?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json) -

    For running non-endorsed distributions, see [Information for - Non-Endorsed - Distributions](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-create-upload-generic?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json). - :type linux_configuration: - ~azure.mgmt.compute.v2016_04_30_preview.models.LinuxConfiguration - :param secrets: Specifies set of certificates that should be installed - onto the virtual machine. - :type secrets: - list[~azure.mgmt.compute.v2016_04_30_preview.models.VaultSecretGroup] - """ - - _attribute_map = { - 'computer_name': {'key': 'computerName', 'type': 'str'}, - 'admin_username': {'key': 'adminUsername', 'type': 'str'}, - 'admin_password': {'key': 'adminPassword', 'type': 'str'}, - 'custom_data': {'key': 'customData', 'type': 'str'}, - 'windows_configuration': {'key': 'windowsConfiguration', 'type': 'WindowsConfiguration'}, - 'linux_configuration': {'key': 'linuxConfiguration', 'type': 'LinuxConfiguration'}, - 'secrets': {'key': 'secrets', 'type': '[VaultSecretGroup]'}, - } - - def __init__(self, **kwargs): - super(OSProfile, self).__init__(**kwargs) - self.computer_name = kwargs.get('computer_name', None) - self.admin_username = kwargs.get('admin_username', None) - self.admin_password = kwargs.get('admin_password', None) - self.custom_data = kwargs.get('custom_data', None) - self.windows_configuration = kwargs.get('windows_configuration', None) - self.linux_configuration = kwargs.get('linux_configuration', None) - self.secrets = kwargs.get('secrets', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/os_profile_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/os_profile_py3.py deleted file mode 100644 index 1e7c22f903b8..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/os_profile_py3.py +++ /dev/null @@ -1,100 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class OSProfile(Model): - """Specifies the operating system settings for the virtual machine. - - :param computer_name: Specifies the host OS name of the virtual machine. -

    This name cannot be updated after the VM is created.

    - **Max-length (Windows):** 15 characters

    **Max-length (Linux):** - 64 characters.

    For naming conventions and restrictions see [Azure - infrastructure services implementation - guidelines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-infrastructure-subscription-accounts-guidelines?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json#1-naming-conventions). - :type computer_name: str - :param admin_username: Specifies the name of the administrator account. -

    **Windows-only restriction:** Cannot end in "."

    - **Disallowed values:** "administrator", "admin", "user", "user1", "test", - "user2", "test1", "user3", "admin1", "1", "123", "a", "actuser", "adm", - "admin2", "aspnet", "backup", "console", "david", "guest", "john", - "owner", "root", "server", "sql", "support", "support_388945a0", "sys", - "test2", "test3", "user4", "user5".

    **Minimum-length (Linux):** 1 - character

    **Max-length (Linux):** 64 characters

    - **Max-length (Windows):** 20 characters

  • For root access to - the Linux VM, see [Using root privileges on Linux virtual machines in - Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-use-root-privileges?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json)
  • - For a list of built-in system users on Linux that should not be used in - this field, see [Selecting User Names for Linux on - Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-usernames?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json) - :type admin_username: str - :param admin_password: Specifies the password of the administrator - account.

    **Minimum-length (Windows):** 8 characters

    - **Minimum-length (Linux):** 6 characters

    **Max-length - (Windows):** 123 characters

    **Max-length (Linux):** 72 characters -

    **Complexity requirements:** 3 out of 4 conditions below need to - be fulfilled
    Has lower characters
    Has upper characters
    Has a - digit
    Has a special character (Regex match [\\W_])

    - **Disallowed values:** "abc@123", "P@$$w0rd", "P@ssw0rd", "P@ssword123", - "Pa$$word", "pass@word1", "Password!", "Password1", "Password22", - "iloveyou!"

    For resetting the password, see [How to reset the - Remote Desktop service or its login password in a Windows - VM](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-reset-rdp?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json) -

    For resetting root password, see [Manage users, SSH, and check or - repair disks on Azure Linux VMs using the VMAccess - Extension](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-using-vmaccess-extension?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json#reset-root-password) - :type admin_password: str - :param custom_data: Specifies a base-64 encoded string of custom data. The - base-64 encoded string is decoded to a binary array that is saved as a - file on the Virtual Machine. The maximum length of the binary array is - 65535 bytes.

    For using cloud-init for your VM, see [Using - cloud-init to customize a Linux VM during - creation](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-using-cloud-init?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json) - :type custom_data: str - :param windows_configuration: Specifies Windows operating system settings - on the virtual machine. - :type windows_configuration: - ~azure.mgmt.compute.v2016_04_30_preview.models.WindowsConfiguration - :param linux_configuration: Specifies the Linux operating system settings - on the virtual machine.

    For a list of supported Linux - distributions, see [Linux on Azure-Endorsed - Distributions](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-endorsed-distros?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json) -

    For running non-endorsed distributions, see [Information for - Non-Endorsed - Distributions](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-create-upload-generic?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json). - :type linux_configuration: - ~azure.mgmt.compute.v2016_04_30_preview.models.LinuxConfiguration - :param secrets: Specifies set of certificates that should be installed - onto the virtual machine. - :type secrets: - list[~azure.mgmt.compute.v2016_04_30_preview.models.VaultSecretGroup] - """ - - _attribute_map = { - 'computer_name': {'key': 'computerName', 'type': 'str'}, - 'admin_username': {'key': 'adminUsername', 'type': 'str'}, - 'admin_password': {'key': 'adminPassword', 'type': 'str'}, - 'custom_data': {'key': 'customData', 'type': 'str'}, - 'windows_configuration': {'key': 'windowsConfiguration', 'type': 'WindowsConfiguration'}, - 'linux_configuration': {'key': 'linuxConfiguration', 'type': 'LinuxConfiguration'}, - 'secrets': {'key': 'secrets', 'type': '[VaultSecretGroup]'}, - } - - def __init__(self, *, computer_name: str=None, admin_username: str=None, admin_password: str=None, custom_data: str=None, windows_configuration=None, linux_configuration=None, secrets=None, **kwargs) -> None: - super(OSProfile, self).__init__(**kwargs) - self.computer_name = computer_name - self.admin_username = admin_username - self.admin_password = admin_password - self.custom_data = custom_data - self.windows_configuration = windows_configuration - self.linux_configuration = linux_configuration - self.secrets = secrets diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/plan.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/plan.py deleted file mode 100644 index d42b6b32cfac..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/plan.py +++ /dev/null @@ -1,46 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class Plan(Model): - """Specifies information about the marketplace image used to create the - virtual machine. This element is only used for marketplace images. Before - you can use a marketplace image from an API, you must enable the image for - programmatic use. In the Azure portal, find the marketplace image that you - want to use and then click **Want to deploy programmatically, Get Started - ->**. Enter any required information and then click **Save**. - - :param name: The plan ID. - :type name: str - :param publisher: The publisher ID. - :type publisher: str - :param product: Specifies the product of the image from the marketplace. - This is the same value as Offer under the imageReference element. - :type product: str - :param promotion_code: The promotion code. - :type promotion_code: str - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'publisher': {'key': 'publisher', 'type': 'str'}, - 'product': {'key': 'product', 'type': 'str'}, - 'promotion_code': {'key': 'promotionCode', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(Plan, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.publisher = kwargs.get('publisher', None) - self.product = kwargs.get('product', None) - self.promotion_code = kwargs.get('promotion_code', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/plan_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/plan_py3.py deleted file mode 100644 index 9cca2c78a123..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/plan_py3.py +++ /dev/null @@ -1,46 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class Plan(Model): - """Specifies information about the marketplace image used to create the - virtual machine. This element is only used for marketplace images. Before - you can use a marketplace image from an API, you must enable the image for - programmatic use. In the Azure portal, find the marketplace image that you - want to use and then click **Want to deploy programmatically, Get Started - ->**. Enter any required information and then click **Save**. - - :param name: The plan ID. - :type name: str - :param publisher: The publisher ID. - :type publisher: str - :param product: Specifies the product of the image from the marketplace. - This is the same value as Offer under the imageReference element. - :type product: str - :param promotion_code: The promotion code. - :type promotion_code: str - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'publisher': {'key': 'publisher', 'type': 'str'}, - 'product': {'key': 'product', 'type': 'str'}, - 'promotion_code': {'key': 'promotionCode', 'type': 'str'}, - } - - def __init__(self, *, name: str=None, publisher: str=None, product: str=None, promotion_code: str=None, **kwargs) -> None: - super(Plan, self).__init__(**kwargs) - self.name = name - self.publisher = publisher - self.product = product - self.promotion_code = promotion_code diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/purchase_plan.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/purchase_plan.py deleted file mode 100644 index 2e1509addca6..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/purchase_plan.py +++ /dev/null @@ -1,47 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class PurchasePlan(Model): - """Used for establishing the purchase context of any 3rd Party artifact - through MarketPlace. - - All required parameters must be populated in order to send to Azure. - - :param publisher: Required. The publisher ID. - :type publisher: str - :param name: Required. The plan ID. - :type name: str - :param product: Required. Specifies the product of the image from the - marketplace. This is the same value as Offer under the imageReference - element. - :type product: str - """ - - _validation = { - 'publisher': {'required': True}, - 'name': {'required': True}, - 'product': {'required': True}, - } - - _attribute_map = { - 'publisher': {'key': 'publisher', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'product': {'key': 'product', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(PurchasePlan, self).__init__(**kwargs) - self.publisher = kwargs.get('publisher', None) - self.name = kwargs.get('name', None) - self.product = kwargs.get('product', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/purchase_plan_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/purchase_plan_py3.py deleted file mode 100644 index 26f7996f1633..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/purchase_plan_py3.py +++ /dev/null @@ -1,47 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class PurchasePlan(Model): - """Used for establishing the purchase context of any 3rd Party artifact - through MarketPlace. - - All required parameters must be populated in order to send to Azure. - - :param publisher: Required. The publisher ID. - :type publisher: str - :param name: Required. The plan ID. - :type name: str - :param product: Required. Specifies the product of the image from the - marketplace. This is the same value as Offer under the imageReference - element. - :type product: str - """ - - _validation = { - 'publisher': {'required': True}, - 'name': {'required': True}, - 'product': {'required': True}, - } - - _attribute_map = { - 'publisher': {'key': 'publisher', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'product': {'key': 'product', 'type': 'str'}, - } - - def __init__(self, *, publisher: str, name: str, product: str, **kwargs) -> None: - super(PurchasePlan, self).__init__(**kwargs) - self.publisher = publisher - self.name = name - self.product = product diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/resource.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/resource.py deleted file mode 100644 index 5dd7d481c685..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/resource.py +++ /dev/null @@ -1,56 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class Resource(Model): - """The Resource model definition. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource Id - :vartype id: str - :ivar name: Resource name - :vartype name: str - :ivar type: Resource type - :vartype type: str - :param location: Required. Resource location - :type location: str - :param tags: Resource tags - :type tags: dict[str, str] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - } - - def __init__(self, **kwargs): - super(Resource, self).__init__(**kwargs) - self.id = None - self.name = None - self.type = None - self.location = kwargs.get('location', None) - self.tags = kwargs.get('tags', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/resource_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/resource_py3.py deleted file mode 100644 index 2f3702caf609..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/resource_py3.py +++ /dev/null @@ -1,56 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class Resource(Model): - """The Resource model definition. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource Id - :vartype id: str - :ivar name: Resource name - :vartype name: str - :ivar type: Resource type - :vartype type: str - :param location: Required. Resource location - :type location: str - :param tags: Resource tags - :type tags: dict[str, str] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - } - - def __init__(self, *, location: str, tags=None, **kwargs) -> None: - super(Resource, self).__init__(**kwargs) - self.id = None - self.name = None - self.type = None - self.location = location - self.tags = tags diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/resource_update.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/resource_update.py deleted file mode 100644 index 182590bbdd32..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/resource_update.py +++ /dev/null @@ -1,28 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ResourceUpdate(Model): - """The Resource model definition. - - :param tags: Resource tags - :type tags: dict[str, str] - """ - - _attribute_map = { - 'tags': {'key': 'tags', 'type': '{str}'}, - } - - def __init__(self, **kwargs): - super(ResourceUpdate, self).__init__(**kwargs) - self.tags = kwargs.get('tags', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/resource_update_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/resource_update_py3.py deleted file mode 100644 index 12e233958bf3..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/resource_update_py3.py +++ /dev/null @@ -1,28 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ResourceUpdate(Model): - """The Resource model definition. - - :param tags: Resource tags - :type tags: dict[str, str] - """ - - _attribute_map = { - 'tags': {'key': 'tags', 'type': '{str}'}, - } - - def __init__(self, *, tags=None, **kwargs) -> None: - super(ResourceUpdate, self).__init__(**kwargs) - self.tags = tags diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/sku.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/sku.py deleted file mode 100644 index 5c07709435e0..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/sku.py +++ /dev/null @@ -1,38 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class Sku(Model): - """Describes a virtual machine scale set sku. - - :param name: The sku name. - :type name: str - :param tier: Specifies the tier of virtual machines in a scale set.

    Possible Values:

    **Standard**

    **Basic** - :type tier: str - :param capacity: Specifies the number of virtual machines in the scale - set. - :type capacity: long - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'tier': {'key': 'tier', 'type': 'str'}, - 'capacity': {'key': 'capacity', 'type': 'long'}, - } - - def __init__(self, **kwargs): - super(Sku, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.tier = kwargs.get('tier', None) - self.capacity = kwargs.get('capacity', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/sku_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/sku_py3.py deleted file mode 100644 index f6bc74afaadc..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/sku_py3.py +++ /dev/null @@ -1,38 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class Sku(Model): - """Describes a virtual machine scale set sku. - - :param name: The sku name. - :type name: str - :param tier: Specifies the tier of virtual machines in a scale set.

    Possible Values:

    **Standard**

    **Basic** - :type tier: str - :param capacity: Specifies the number of virtual machines in the scale - set. - :type capacity: long - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'tier': {'key': 'tier', 'type': 'str'}, - 'capacity': {'key': 'capacity', 'type': 'long'}, - } - - def __init__(self, *, name: str=None, tier: str=None, capacity: int=None, **kwargs) -> None: - super(Sku, self).__init__(**kwargs) - self.name = name - self.tier = tier - self.capacity = capacity diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/snapshot.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/snapshot.py deleted file mode 100644 index df7821821099..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/snapshot.py +++ /dev/null @@ -1,99 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource import Resource - - -class Snapshot(Resource): - """Snapshot resource. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource Id - :vartype id: str - :ivar name: Resource name - :vartype name: str - :ivar type: Resource type - :vartype type: str - :param location: Required. Resource location - :type location: str - :param tags: Resource tags - :type tags: dict[str, str] - :param account_type: the storage account type of the disk. Possible values - include: 'Standard_LRS', 'Premium_LRS' - :type account_type: str or - ~azure.mgmt.compute.v2016_04_30_preview.models.StorageAccountTypes - :ivar time_created: The time when the disk was created. - :vartype time_created: datetime - :param os_type: The Operating System type. Possible values include: - 'Windows', 'Linux' - :type os_type: str or - ~azure.mgmt.compute.v2016_04_30_preview.models.OperatingSystemTypes - :param creation_data: Required. Disk source information. CreationData - information cannot be changed after the disk has been created. - :type creation_data: - ~azure.mgmt.compute.v2016_04_30_preview.models.CreationData - :param disk_size_gb: If creationData.createOption is Empty, this field is - mandatory and it indicates the size of the VHD to create. If this field is - present for updates or creation with other options, it indicates a resize. - Resizes are only allowed if the disk is not attached to a running VM, and - can only increase the disk's size. - :type disk_size_gb: int - :param encryption_settings: Encryption settings for disk or snapshot - :type encryption_settings: - ~azure.mgmt.compute.v2016_04_30_preview.models.EncryptionSettings - :ivar owner_id: A relative URI containing the VM id that has the disk - attached. - :vartype owner_id: str - :ivar provisioning_state: The disk provisioning state. - :vartype provisioning_state: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - 'time_created': {'readonly': True}, - 'creation_data': {'required': True}, - 'owner_id': {'readonly': True}, - 'provisioning_state': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'account_type': {'key': 'properties.accountType', 'type': 'StorageAccountTypes'}, - 'time_created': {'key': 'properties.timeCreated', 'type': 'iso-8601'}, - 'os_type': {'key': 'properties.osType', 'type': 'OperatingSystemTypes'}, - 'creation_data': {'key': 'properties.creationData', 'type': 'CreationData'}, - 'disk_size_gb': {'key': 'properties.diskSizeGB', 'type': 'int'}, - 'encryption_settings': {'key': 'properties.encryptionSettings', 'type': 'EncryptionSettings'}, - 'owner_id': {'key': 'properties.ownerId', 'type': 'str'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(Snapshot, self).__init__(**kwargs) - self.account_type = kwargs.get('account_type', None) - self.time_created = None - self.os_type = kwargs.get('os_type', None) - self.creation_data = kwargs.get('creation_data', None) - self.disk_size_gb = kwargs.get('disk_size_gb', None) - self.encryption_settings = kwargs.get('encryption_settings', None) - self.owner_id = None - self.provisioning_state = None diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/snapshot_paged.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/snapshot_paged.py deleted file mode 100644 index 0d2d8bc3af20..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/snapshot_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class SnapshotPaged(Paged): - """ - A paging container for iterating over a list of :class:`Snapshot ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[Snapshot]'} - } - - def __init__(self, *args, **kwargs): - - super(SnapshotPaged, self).__init__(*args, **kwargs) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/snapshot_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/snapshot_py3.py deleted file mode 100644 index 0cbf1f525fdf..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/snapshot_py3.py +++ /dev/null @@ -1,99 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource_py3 import Resource - - -class Snapshot(Resource): - """Snapshot resource. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource Id - :vartype id: str - :ivar name: Resource name - :vartype name: str - :ivar type: Resource type - :vartype type: str - :param location: Required. Resource location - :type location: str - :param tags: Resource tags - :type tags: dict[str, str] - :param account_type: the storage account type of the disk. Possible values - include: 'Standard_LRS', 'Premium_LRS' - :type account_type: str or - ~azure.mgmt.compute.v2016_04_30_preview.models.StorageAccountTypes - :ivar time_created: The time when the disk was created. - :vartype time_created: datetime - :param os_type: The Operating System type. Possible values include: - 'Windows', 'Linux' - :type os_type: str or - ~azure.mgmt.compute.v2016_04_30_preview.models.OperatingSystemTypes - :param creation_data: Required. Disk source information. CreationData - information cannot be changed after the disk has been created. - :type creation_data: - ~azure.mgmt.compute.v2016_04_30_preview.models.CreationData - :param disk_size_gb: If creationData.createOption is Empty, this field is - mandatory and it indicates the size of the VHD to create. If this field is - present for updates or creation with other options, it indicates a resize. - Resizes are only allowed if the disk is not attached to a running VM, and - can only increase the disk's size. - :type disk_size_gb: int - :param encryption_settings: Encryption settings for disk or snapshot - :type encryption_settings: - ~azure.mgmt.compute.v2016_04_30_preview.models.EncryptionSettings - :ivar owner_id: A relative URI containing the VM id that has the disk - attached. - :vartype owner_id: str - :ivar provisioning_state: The disk provisioning state. - :vartype provisioning_state: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - 'time_created': {'readonly': True}, - 'creation_data': {'required': True}, - 'owner_id': {'readonly': True}, - 'provisioning_state': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'account_type': {'key': 'properties.accountType', 'type': 'StorageAccountTypes'}, - 'time_created': {'key': 'properties.timeCreated', 'type': 'iso-8601'}, - 'os_type': {'key': 'properties.osType', 'type': 'OperatingSystemTypes'}, - 'creation_data': {'key': 'properties.creationData', 'type': 'CreationData'}, - 'disk_size_gb': {'key': 'properties.diskSizeGB', 'type': 'int'}, - 'encryption_settings': {'key': 'properties.encryptionSettings', 'type': 'EncryptionSettings'}, - 'owner_id': {'key': 'properties.ownerId', 'type': 'str'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - } - - def __init__(self, *, location: str, creation_data, tags=None, account_type=None, os_type=None, disk_size_gb: int=None, encryption_settings=None, **kwargs) -> None: - super(Snapshot, self).__init__(location=location, tags=tags, **kwargs) - self.account_type = account_type - self.time_created = None - self.os_type = os_type - self.creation_data = creation_data - self.disk_size_gb = disk_size_gb - self.encryption_settings = encryption_settings - self.owner_id = None - self.provisioning_state = None diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/snapshot_update.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/snapshot_update.py deleted file mode 100644 index 2cfe88c7a138..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/snapshot_update.py +++ /dev/null @@ -1,58 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource_update import ResourceUpdate - - -class SnapshotUpdate(ResourceUpdate): - """Snapshot update resource. - - :param tags: Resource tags - :type tags: dict[str, str] - :param account_type: the storage account type of the disk. Possible values - include: 'Standard_LRS', 'Premium_LRS' - :type account_type: str or - ~azure.mgmt.compute.v2016_04_30_preview.models.StorageAccountTypes - :param os_type: the Operating System type. Possible values include: - 'Windows', 'Linux' - :type os_type: str or - ~azure.mgmt.compute.v2016_04_30_preview.models.OperatingSystemTypes - :param creation_data: disk source information. CreationData information - cannot be changed after the disk has been created. - :type creation_data: - ~azure.mgmt.compute.v2016_04_30_preview.models.CreationData - :param disk_size_gb: If creationData.createOption is Empty, this field is - mandatory and it indicates the size of the VHD to create. If this field is - present for updates or creation with other options, it indicates a resize. - Resizes are only allowed if the disk is not attached to a running VM, and - can only increase the disk's size. - :type disk_size_gb: int - :param encryption_settings: Encryption settings for disk or snapshot - :type encryption_settings: - ~azure.mgmt.compute.v2016_04_30_preview.models.EncryptionSettings - """ - - _attribute_map = { - 'tags': {'key': 'tags', 'type': '{str}'}, - 'account_type': {'key': 'properties.accountType', 'type': 'StorageAccountTypes'}, - 'os_type': {'key': 'properties.osType', 'type': 'OperatingSystemTypes'}, - 'creation_data': {'key': 'properties.creationData', 'type': 'CreationData'}, - 'disk_size_gb': {'key': 'properties.diskSizeGB', 'type': 'int'}, - 'encryption_settings': {'key': 'properties.encryptionSettings', 'type': 'EncryptionSettings'}, - } - - def __init__(self, **kwargs): - super(SnapshotUpdate, self).__init__(**kwargs) - self.account_type = kwargs.get('account_type', None) - self.os_type = kwargs.get('os_type', None) - self.creation_data = kwargs.get('creation_data', None) - self.disk_size_gb = kwargs.get('disk_size_gb', None) - self.encryption_settings = kwargs.get('encryption_settings', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/snapshot_update_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/snapshot_update_py3.py deleted file mode 100644 index 9832ce687fae..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/snapshot_update_py3.py +++ /dev/null @@ -1,58 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource_update_py3 import ResourceUpdate - - -class SnapshotUpdate(ResourceUpdate): - """Snapshot update resource. - - :param tags: Resource tags - :type tags: dict[str, str] - :param account_type: the storage account type of the disk. Possible values - include: 'Standard_LRS', 'Premium_LRS' - :type account_type: str or - ~azure.mgmt.compute.v2016_04_30_preview.models.StorageAccountTypes - :param os_type: the Operating System type. Possible values include: - 'Windows', 'Linux' - :type os_type: str or - ~azure.mgmt.compute.v2016_04_30_preview.models.OperatingSystemTypes - :param creation_data: disk source information. CreationData information - cannot be changed after the disk has been created. - :type creation_data: - ~azure.mgmt.compute.v2016_04_30_preview.models.CreationData - :param disk_size_gb: If creationData.createOption is Empty, this field is - mandatory and it indicates the size of the VHD to create. If this field is - present for updates or creation with other options, it indicates a resize. - Resizes are only allowed if the disk is not attached to a running VM, and - can only increase the disk's size. - :type disk_size_gb: int - :param encryption_settings: Encryption settings for disk or snapshot - :type encryption_settings: - ~azure.mgmt.compute.v2016_04_30_preview.models.EncryptionSettings - """ - - _attribute_map = { - 'tags': {'key': 'tags', 'type': '{str}'}, - 'account_type': {'key': 'properties.accountType', 'type': 'StorageAccountTypes'}, - 'os_type': {'key': 'properties.osType', 'type': 'OperatingSystemTypes'}, - 'creation_data': {'key': 'properties.creationData', 'type': 'CreationData'}, - 'disk_size_gb': {'key': 'properties.diskSizeGB', 'type': 'int'}, - 'encryption_settings': {'key': 'properties.encryptionSettings', 'type': 'EncryptionSettings'}, - } - - def __init__(self, *, tags=None, account_type=None, os_type=None, creation_data=None, disk_size_gb: int=None, encryption_settings=None, **kwargs) -> None: - super(SnapshotUpdate, self).__init__(tags=tags, **kwargs) - self.account_type = account_type - self.os_type = os_type - self.creation_data = creation_data - self.disk_size_gb = disk_size_gb - self.encryption_settings = encryption_settings diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/source_vault.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/source_vault.py deleted file mode 100644 index 88537f33905f..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/source_vault.py +++ /dev/null @@ -1,29 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class SourceVault(Model): - """The vault id is an Azure Resource Manager Resource id in the form - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.KeyVault/vaults/{vaultName}. - - :param id: Resource Id - :type id: str - """ - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(SourceVault, self).__init__(**kwargs) - self.id = kwargs.get('id', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/source_vault_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/source_vault_py3.py deleted file mode 100644 index 1cb922017c06..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/source_vault_py3.py +++ /dev/null @@ -1,29 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class SourceVault(Model): - """The vault id is an Azure Resource Manager Resource id in the form - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.KeyVault/vaults/{vaultName}. - - :param id: Resource Id - :type id: str - """ - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - } - - def __init__(self, *, id: str=None, **kwargs) -> None: - super(SourceVault, self).__init__(**kwargs) - self.id = id diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/ssh_configuration.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/ssh_configuration.py deleted file mode 100644 index 4a11025a5587..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/ssh_configuration.py +++ /dev/null @@ -1,30 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class SshConfiguration(Model): - """SSH configuration for Linux based VMs running on Azure. - - :param public_keys: The list of SSH public keys used to authenticate with - linux based VMs. - :type public_keys: - list[~azure.mgmt.compute.v2016_04_30_preview.models.SshPublicKey] - """ - - _attribute_map = { - 'public_keys': {'key': 'publicKeys', 'type': '[SshPublicKey]'}, - } - - def __init__(self, **kwargs): - super(SshConfiguration, self).__init__(**kwargs) - self.public_keys = kwargs.get('public_keys', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/ssh_configuration_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/ssh_configuration_py3.py deleted file mode 100644 index a1a49cff031b..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/ssh_configuration_py3.py +++ /dev/null @@ -1,30 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class SshConfiguration(Model): - """SSH configuration for Linux based VMs running on Azure. - - :param public_keys: The list of SSH public keys used to authenticate with - linux based VMs. - :type public_keys: - list[~azure.mgmt.compute.v2016_04_30_preview.models.SshPublicKey] - """ - - _attribute_map = { - 'public_keys': {'key': 'publicKeys', 'type': '[SshPublicKey]'}, - } - - def __init__(self, *, public_keys=None, **kwargs) -> None: - super(SshConfiguration, self).__init__(**kwargs) - self.public_keys = public_keys diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/ssh_public_key.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/ssh_public_key.py deleted file mode 100644 index 122e0d3b9fdd..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/ssh_public_key.py +++ /dev/null @@ -1,39 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class SshPublicKey(Model): - """Contains information about SSH certificate public key and the path on the - Linux VM where the public key is placed. - - :param path: Specifies the full path on the created VM where ssh public - key is stored. If the file already exists, the specified key is appended - to the file. Example: /home/user/.ssh/authorized_keys - :type path: str - :param key_data: SSH public key certificate used to authenticate with the - VM through ssh. The key needs to be at least 2048-bit and in ssh-rsa - format.

    For creating ssh keys, see [Create SSH keys on Linux and - Mac for Linux VMs in - Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-mac-create-ssh-keys?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json). - :type key_data: str - """ - - _attribute_map = { - 'path': {'key': 'path', 'type': 'str'}, - 'key_data': {'key': 'keyData', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(SshPublicKey, self).__init__(**kwargs) - self.path = kwargs.get('path', None) - self.key_data = kwargs.get('key_data', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/ssh_public_key_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/ssh_public_key_py3.py deleted file mode 100644 index b16ee085b36b..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/ssh_public_key_py3.py +++ /dev/null @@ -1,39 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class SshPublicKey(Model): - """Contains information about SSH certificate public key and the path on the - Linux VM where the public key is placed. - - :param path: Specifies the full path on the created VM where ssh public - key is stored. If the file already exists, the specified key is appended - to the file. Example: /home/user/.ssh/authorized_keys - :type path: str - :param key_data: SSH public key certificate used to authenticate with the - VM through ssh. The key needs to be at least 2048-bit and in ssh-rsa - format.

    For creating ssh keys, see [Create SSH keys on Linux and - Mac for Linux VMs in - Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-mac-create-ssh-keys?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json). - :type key_data: str - """ - - _attribute_map = { - 'path': {'key': 'path', 'type': 'str'}, - 'key_data': {'key': 'keyData', 'type': 'str'}, - } - - def __init__(self, *, path: str=None, key_data: str=None, **kwargs) -> None: - super(SshPublicKey, self).__init__(**kwargs) - self.path = path - self.key_data = key_data diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/storage_profile.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/storage_profile.py deleted file mode 100644 index 0664920689d6..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/storage_profile.py +++ /dev/null @@ -1,48 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class StorageProfile(Model): - """Specifies the storage settings for the virtual machine disks. - - :param image_reference: Specifies information about the image to use. You - can specify information about platform images, marketplace images, or - virtual machine images. This element is required when you want to use a - platform image, marketplace image, or virtual machine image, but is not - used in other creation operations. - :type image_reference: - ~azure.mgmt.compute.v2016_04_30_preview.models.ImageReference - :param os_disk: Specifies information about the operating system disk used - by the virtual machine.

    For more information about disks, see - [About disks and VHDs for Azure virtual - machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-about-disks-vhds?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). - :type os_disk: ~azure.mgmt.compute.v2016_04_30_preview.models.OSDisk - :param data_disks: Specifies the parameters that are used to add a data - disk to a virtual machine.

    For more information about disks, see - [About disks and VHDs for Azure virtual - machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-about-disks-vhds?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). - :type data_disks: - list[~azure.mgmt.compute.v2016_04_30_preview.models.DataDisk] - """ - - _attribute_map = { - 'image_reference': {'key': 'imageReference', 'type': 'ImageReference'}, - 'os_disk': {'key': 'osDisk', 'type': 'OSDisk'}, - 'data_disks': {'key': 'dataDisks', 'type': '[DataDisk]'}, - } - - def __init__(self, **kwargs): - super(StorageProfile, self).__init__(**kwargs) - self.image_reference = kwargs.get('image_reference', None) - self.os_disk = kwargs.get('os_disk', None) - self.data_disks = kwargs.get('data_disks', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/storage_profile_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/storage_profile_py3.py deleted file mode 100644 index ba1f2d046eb0..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/storage_profile_py3.py +++ /dev/null @@ -1,48 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class StorageProfile(Model): - """Specifies the storage settings for the virtual machine disks. - - :param image_reference: Specifies information about the image to use. You - can specify information about platform images, marketplace images, or - virtual machine images. This element is required when you want to use a - platform image, marketplace image, or virtual machine image, but is not - used in other creation operations. - :type image_reference: - ~azure.mgmt.compute.v2016_04_30_preview.models.ImageReference - :param os_disk: Specifies information about the operating system disk used - by the virtual machine.

    For more information about disks, see - [About disks and VHDs for Azure virtual - machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-about-disks-vhds?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). - :type os_disk: ~azure.mgmt.compute.v2016_04_30_preview.models.OSDisk - :param data_disks: Specifies the parameters that are used to add a data - disk to a virtual machine.

    For more information about disks, see - [About disks and VHDs for Azure virtual - machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-about-disks-vhds?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). - :type data_disks: - list[~azure.mgmt.compute.v2016_04_30_preview.models.DataDisk] - """ - - _attribute_map = { - 'image_reference': {'key': 'imageReference', 'type': 'ImageReference'}, - 'os_disk': {'key': 'osDisk', 'type': 'OSDisk'}, - 'data_disks': {'key': 'dataDisks', 'type': '[DataDisk]'}, - } - - def __init__(self, *, image_reference=None, os_disk=None, data_disks=None, **kwargs) -> None: - super(StorageProfile, self).__init__(**kwargs) - self.image_reference = image_reference - self.os_disk = os_disk - self.data_disks = data_disks diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/sub_resource.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/sub_resource.py deleted file mode 100644 index 11e092cc6ff5..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/sub_resource.py +++ /dev/null @@ -1,28 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class SubResource(Model): - """SubResource. - - :param id: Resource Id - :type id: str - """ - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(SubResource, self).__init__(**kwargs) - self.id = kwargs.get('id', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/sub_resource_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/sub_resource_py3.py deleted file mode 100644 index 29e5afee38f9..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/sub_resource_py3.py +++ /dev/null @@ -1,28 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class SubResource(Model): - """SubResource. - - :param id: Resource Id - :type id: str - """ - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - } - - def __init__(self, *, id: str=None, **kwargs) -> None: - super(SubResource, self).__init__(**kwargs) - self.id = id diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/sub_resource_read_only.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/sub_resource_read_only.py deleted file mode 100644 index 4a0ec466c0d4..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/sub_resource_read_only.py +++ /dev/null @@ -1,35 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class SubResourceReadOnly(Model): - """SubResourceReadOnly. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource Id - :vartype id: str - """ - - _validation = { - 'id': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(SubResourceReadOnly, self).__init__(**kwargs) - self.id = None diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/sub_resource_read_only_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/sub_resource_read_only_py3.py deleted file mode 100644 index cb918e9a2ac6..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/sub_resource_read_only_py3.py +++ /dev/null @@ -1,35 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class SubResourceReadOnly(Model): - """SubResourceReadOnly. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource Id - :vartype id: str - """ - - _validation = { - 'id': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - } - - def __init__(self, **kwargs) -> None: - super(SubResourceReadOnly, self).__init__(**kwargs) - self.id = None diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/update_resource.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/update_resource.py deleted file mode 100644 index b1d2898ff082..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/update_resource.py +++ /dev/null @@ -1,28 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class UpdateResource(Model): - """The Update Resource model definition. - - :param tags: Resource tags - :type tags: dict[str, str] - """ - - _attribute_map = { - 'tags': {'key': 'tags', 'type': '{str}'}, - } - - def __init__(self, **kwargs): - super(UpdateResource, self).__init__(**kwargs) - self.tags = kwargs.get('tags', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/update_resource_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/update_resource_py3.py deleted file mode 100644 index c06c17c124d9..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/update_resource_py3.py +++ /dev/null @@ -1,28 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class UpdateResource(Model): - """The Update Resource model definition. - - :param tags: Resource tags - :type tags: dict[str, str] - """ - - _attribute_map = { - 'tags': {'key': 'tags', 'type': '{str}'}, - } - - def __init__(self, *, tags=None, **kwargs) -> None: - super(UpdateResource, self).__init__(**kwargs) - self.tags = tags diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/upgrade_policy.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/upgrade_policy.py deleted file mode 100644 index 13b677d84ff4..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/upgrade_policy.py +++ /dev/null @@ -1,34 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class UpgradePolicy(Model): - """Describes an upgrade policy - automatic or manual. - - :param mode: Specifies the mode of an upgrade to virtual machines in the - scale set.

    Possible values are:

    **Manual** - You - control the application of updates to virtual machines in the scale set. - You do this by using the manualUpgrade action.

    **Automatic** - - All virtual machines in the scale set are automatically updated at the - same time. Possible values include: 'Automatic', 'Manual' - :type mode: str or - ~azure.mgmt.compute.v2016_04_30_preview.models.UpgradeMode - """ - - _attribute_map = { - 'mode': {'key': 'mode', 'type': 'UpgradeMode'}, - } - - def __init__(self, **kwargs): - super(UpgradePolicy, self).__init__(**kwargs) - self.mode = kwargs.get('mode', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/upgrade_policy_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/upgrade_policy_py3.py deleted file mode 100644 index 2c344e88f74d..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/upgrade_policy_py3.py +++ /dev/null @@ -1,34 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class UpgradePolicy(Model): - """Describes an upgrade policy - automatic or manual. - - :param mode: Specifies the mode of an upgrade to virtual machines in the - scale set.

    Possible values are:

    **Manual** - You - control the application of updates to virtual machines in the scale set. - You do this by using the manualUpgrade action.

    **Automatic** - - All virtual machines in the scale set are automatically updated at the - same time. Possible values include: 'Automatic', 'Manual' - :type mode: str or - ~azure.mgmt.compute.v2016_04_30_preview.models.UpgradeMode - """ - - _attribute_map = { - 'mode': {'key': 'mode', 'type': 'UpgradeMode'}, - } - - def __init__(self, *, mode=None, **kwargs) -> None: - super(UpgradePolicy, self).__init__(**kwargs) - self.mode = mode diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/usage.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/usage.py deleted file mode 100644 index 019b6efc0669..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/usage.py +++ /dev/null @@ -1,54 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class Usage(Model): - """Describes Compute Resource Usage. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar unit: Required. An enum describing the unit of usage measurement. - Default value: "Count" . - :vartype unit: str - :param current_value: Required. The current usage of the resource. - :type current_value: int - :param limit: Required. The maximum permitted usage of the resource. - :type limit: long - :param name: Required. The name of the type of usage. - :type name: ~azure.mgmt.compute.v2016_04_30_preview.models.UsageName - """ - - _validation = { - 'unit': {'required': True, 'constant': True}, - 'current_value': {'required': True}, - 'limit': {'required': True}, - 'name': {'required': True}, - } - - _attribute_map = { - 'unit': {'key': 'unit', 'type': 'str'}, - 'current_value': {'key': 'currentValue', 'type': 'int'}, - 'limit': {'key': 'limit', 'type': 'long'}, - 'name': {'key': 'name', 'type': 'UsageName'}, - } - - unit = "Count" - - def __init__(self, **kwargs): - super(Usage, self).__init__(**kwargs) - self.current_value = kwargs.get('current_value', None) - self.limit = kwargs.get('limit', None) - self.name = kwargs.get('name', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/usage_name.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/usage_name.py deleted file mode 100644 index e2560936493e..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/usage_name.py +++ /dev/null @@ -1,32 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class UsageName(Model): - """The Usage Names. - - :param value: The name of the resource. - :type value: str - :param localized_value: The localized name of the resource. - :type localized_value: str - """ - - _attribute_map = { - 'value': {'key': 'value', 'type': 'str'}, - 'localized_value': {'key': 'localizedValue', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(UsageName, self).__init__(**kwargs) - self.value = kwargs.get('value', None) - self.localized_value = kwargs.get('localized_value', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/usage_name_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/usage_name_py3.py deleted file mode 100644 index ad0b77459f75..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/usage_name_py3.py +++ /dev/null @@ -1,32 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class UsageName(Model): - """The Usage Names. - - :param value: The name of the resource. - :type value: str - :param localized_value: The localized name of the resource. - :type localized_value: str - """ - - _attribute_map = { - 'value': {'key': 'value', 'type': 'str'}, - 'localized_value': {'key': 'localizedValue', 'type': 'str'}, - } - - def __init__(self, *, value: str=None, localized_value: str=None, **kwargs) -> None: - super(UsageName, self).__init__(**kwargs) - self.value = value - self.localized_value = localized_value diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/usage_paged.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/usage_paged.py deleted file mode 100644 index 72022c8fabae..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/usage_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class UsagePaged(Paged): - """ - A paging container for iterating over a list of :class:`Usage ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[Usage]'} - } - - def __init__(self, *args, **kwargs): - - super(UsagePaged, self).__init__(*args, **kwargs) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/usage_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/usage_py3.py deleted file mode 100644 index b33df6c9101d..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/usage_py3.py +++ /dev/null @@ -1,54 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class Usage(Model): - """Describes Compute Resource Usage. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar unit: Required. An enum describing the unit of usage measurement. - Default value: "Count" . - :vartype unit: str - :param current_value: Required. The current usage of the resource. - :type current_value: int - :param limit: Required. The maximum permitted usage of the resource. - :type limit: long - :param name: Required. The name of the type of usage. - :type name: ~azure.mgmt.compute.v2016_04_30_preview.models.UsageName - """ - - _validation = { - 'unit': {'required': True, 'constant': True}, - 'current_value': {'required': True}, - 'limit': {'required': True}, - 'name': {'required': True}, - } - - _attribute_map = { - 'unit': {'key': 'unit', 'type': 'str'}, - 'current_value': {'key': 'currentValue', 'type': 'int'}, - 'limit': {'key': 'limit', 'type': 'long'}, - 'name': {'key': 'name', 'type': 'UsageName'}, - } - - unit = "Count" - - def __init__(self, *, current_value: int, limit: int, name, **kwargs) -> None: - super(Usage, self).__init__(**kwargs) - self.current_value = current_value - self.limit = limit - self.name = name diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/vault_certificate.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/vault_certificate.py deleted file mode 100644 index a4b20af2b850..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/vault_certificate.py +++ /dev/null @@ -1,46 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VaultCertificate(Model): - """Describes a single certificate reference in a Key Vault, and where the - certificate should reside on the VM. - - :param certificate_url: This is the URL of a certificate that has been - uploaded to Key Vault as a secret. For adding a secret to the Key Vault, - see [Add a key or secret to the key - vault](https://docs.microsoft.com/azure/key-vault/key-vault-get-started/#add). - In this case, your certificate needs to be It is the Base64 encoding of - the following JSON Object which is encoded in UTF-8:

    {
    - "data":"",
    "dataType":"pfx",
    - "password":""
    } - :type certificate_url: str - :param certificate_store: For Windows VMs, specifies the certificate store - on the Virtual Machine to which the certificate should be added. The - specified certificate store is implicitly in the LocalMachine account. -

    For Linux VMs, the certificate file is placed under the - /var/lib/waagent directory, with the file name .crt - for the X509 certificate file and .prv for private - key. Both of these files are .pem formatted. - :type certificate_store: str - """ - - _attribute_map = { - 'certificate_url': {'key': 'certificateUrl', 'type': 'str'}, - 'certificate_store': {'key': 'certificateStore', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(VaultCertificate, self).__init__(**kwargs) - self.certificate_url = kwargs.get('certificate_url', None) - self.certificate_store = kwargs.get('certificate_store', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/vault_certificate_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/vault_certificate_py3.py deleted file mode 100644 index 2b4e316bf903..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/vault_certificate_py3.py +++ /dev/null @@ -1,46 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VaultCertificate(Model): - """Describes a single certificate reference in a Key Vault, and where the - certificate should reside on the VM. - - :param certificate_url: This is the URL of a certificate that has been - uploaded to Key Vault as a secret. For adding a secret to the Key Vault, - see [Add a key or secret to the key - vault](https://docs.microsoft.com/azure/key-vault/key-vault-get-started/#add). - In this case, your certificate needs to be It is the Base64 encoding of - the following JSON Object which is encoded in UTF-8:

    {
    - "data":"",
    "dataType":"pfx",
    - "password":""
    } - :type certificate_url: str - :param certificate_store: For Windows VMs, specifies the certificate store - on the Virtual Machine to which the certificate should be added. The - specified certificate store is implicitly in the LocalMachine account. -

    For Linux VMs, the certificate file is placed under the - /var/lib/waagent directory, with the file name .crt - for the X509 certificate file and .prv for private - key. Both of these files are .pem formatted. - :type certificate_store: str - """ - - _attribute_map = { - 'certificate_url': {'key': 'certificateUrl', 'type': 'str'}, - 'certificate_store': {'key': 'certificateStore', 'type': 'str'}, - } - - def __init__(self, *, certificate_url: str=None, certificate_store: str=None, **kwargs) -> None: - super(VaultCertificate, self).__init__(**kwargs) - self.certificate_url = certificate_url - self.certificate_store = certificate_store diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/vault_secret_group.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/vault_secret_group.py deleted file mode 100644 index 9d73e6eb8016..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/vault_secret_group.py +++ /dev/null @@ -1,36 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VaultSecretGroup(Model): - """Describes a set of certificates which are all in the same Key Vault. - - :param source_vault: The relative URL of the Key Vault containing all of - the certificates in VaultCertificates. - :type source_vault: - ~azure.mgmt.compute.v2016_04_30_preview.models.SubResource - :param vault_certificates: The list of key vault references in SourceVault - which contain certificates. - :type vault_certificates: - list[~azure.mgmt.compute.v2016_04_30_preview.models.VaultCertificate] - """ - - _attribute_map = { - 'source_vault': {'key': 'sourceVault', 'type': 'SubResource'}, - 'vault_certificates': {'key': 'vaultCertificates', 'type': '[VaultCertificate]'}, - } - - def __init__(self, **kwargs): - super(VaultSecretGroup, self).__init__(**kwargs) - self.source_vault = kwargs.get('source_vault', None) - self.vault_certificates = kwargs.get('vault_certificates', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/vault_secret_group_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/vault_secret_group_py3.py deleted file mode 100644 index 955f9a828118..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/vault_secret_group_py3.py +++ /dev/null @@ -1,36 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VaultSecretGroup(Model): - """Describes a set of certificates which are all in the same Key Vault. - - :param source_vault: The relative URL of the Key Vault containing all of - the certificates in VaultCertificates. - :type source_vault: - ~azure.mgmt.compute.v2016_04_30_preview.models.SubResource - :param vault_certificates: The list of key vault references in SourceVault - which contain certificates. - :type vault_certificates: - list[~azure.mgmt.compute.v2016_04_30_preview.models.VaultCertificate] - """ - - _attribute_map = { - 'source_vault': {'key': 'sourceVault', 'type': 'SubResource'}, - 'vault_certificates': {'key': 'vaultCertificates', 'type': '[VaultCertificate]'}, - } - - def __init__(self, *, source_vault=None, vault_certificates=None, **kwargs) -> None: - super(VaultSecretGroup, self).__init__(**kwargs) - self.source_vault = source_vault - self.vault_certificates = vault_certificates diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/virtual_hard_disk.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/virtual_hard_disk.py deleted file mode 100644 index 5e3ad9dea7d4..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/virtual_hard_disk.py +++ /dev/null @@ -1,28 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualHardDisk(Model): - """Describes the uri of a disk. - - :param uri: Specifies the virtual hard disk's uri. - :type uri: str - """ - - _attribute_map = { - 'uri': {'key': 'uri', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(VirtualHardDisk, self).__init__(**kwargs) - self.uri = kwargs.get('uri', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/virtual_hard_disk_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/virtual_hard_disk_py3.py deleted file mode 100644 index 9c069b95f084..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/virtual_hard_disk_py3.py +++ /dev/null @@ -1,28 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualHardDisk(Model): - """Describes the uri of a disk. - - :param uri: Specifies the virtual hard disk's uri. - :type uri: str - """ - - _attribute_map = { - 'uri': {'key': 'uri', 'type': 'str'}, - } - - def __init__(self, *, uri: str=None, **kwargs) -> None: - super(VirtualHardDisk, self).__init__(**kwargs) - self.uri = uri diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/virtual_machine.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/virtual_machine.py deleted file mode 100644 index bb2443046003..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/virtual_machine.py +++ /dev/null @@ -1,147 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource import Resource - - -class VirtualMachine(Resource): - """Describes a Virtual Machine. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource Id - :vartype id: str - :ivar name: Resource name - :vartype name: str - :ivar type: Resource type - :vartype type: str - :param location: Required. Resource location - :type location: str - :param tags: Resource tags - :type tags: dict[str, str] - :param plan: Specifies information about the marketplace image used to - create the virtual machine. This element is only used for marketplace - images. Before you can use a marketplace image from an API, you must - enable the image for programmatic use. In the Azure portal, find the - marketplace image that you want to use and then click **Want to deploy - programmatically, Get Started ->**. Enter any required information and - then click **Save**. - :type plan: ~azure.mgmt.compute.v2016_04_30_preview.models.Plan - :param hardware_profile: Specifies the hardware settings for the virtual - machine. - :type hardware_profile: - ~azure.mgmt.compute.v2016_04_30_preview.models.HardwareProfile - :param storage_profile: Specifies the storage settings for the virtual - machine disks. - :type storage_profile: - ~azure.mgmt.compute.v2016_04_30_preview.models.StorageProfile - :param os_profile: Specifies the operating system settings for the virtual - machine. - :type os_profile: ~azure.mgmt.compute.v2016_04_30_preview.models.OSProfile - :param network_profile: Specifies the network interfaces of the virtual - machine. - :type network_profile: - ~azure.mgmt.compute.v2016_04_30_preview.models.NetworkProfile - :param diagnostics_profile: Specifies the boot diagnostic settings state. -

    Minimum api-version: 2015-06-15. - :type diagnostics_profile: - ~azure.mgmt.compute.v2016_04_30_preview.models.DiagnosticsProfile - :param availability_set: Specifies information about the availability set - that the virtual machine should be assigned to. Virtual machines specified - in the same availability set are allocated to different nodes to maximize - availability. For more information about availability sets, see [Manage - the availability of virtual - machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-manage-availability?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). -

    For more information on Azure planned maintenance, see [Planned - maintenance for virtual machines in - Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-planned-maintenance?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json) -

    Currently, a VM can only be added to availability set at creation - time. An existing VM cannot be added to an availability set. - :type availability_set: - ~azure.mgmt.compute.v2016_04_30_preview.models.SubResource - :ivar provisioning_state: The provisioning state, which only appears in - the response. - :vartype provisioning_state: str - :ivar instance_view: The virtual machine instance view. - :vartype instance_view: - ~azure.mgmt.compute.v2016_04_30_preview.models.VirtualMachineInstanceView - :param license_type: Specifies that the image or disk that is being used - was licensed on-premises. This element is only used for images that - contain the Windows Server operating system.

    Possible values are: -

    Windows_Client

    Windows_Server

    If this element - is included in a request for an update, the value must match the initial - value. This value cannot be updated.

    For more information, see - [Azure Hybrid Use Benefit for Windows - Server](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-hybrid-use-benefit-licensing?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json) -

    Minimum api-version: 2015-06-15 - :type license_type: str - :ivar vm_id: Specifies the VM unique ID which is a 128-bits identifier - that is encoded and stored in all Azure IaaS VMs SMBIOS and can be read - using platform BIOS commands. - :vartype vm_id: str - :ivar resources: The virtual machine child extension resources. - :vartype resources: - list[~azure.mgmt.compute.v2016_04_30_preview.models.VirtualMachineExtension] - :param identity: The identity of the virtual machine, if configured. - :type identity: - ~azure.mgmt.compute.v2016_04_30_preview.models.VirtualMachineIdentity - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - 'provisioning_state': {'readonly': True}, - 'instance_view': {'readonly': True}, - 'vm_id': {'readonly': True}, - 'resources': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'plan': {'key': 'plan', 'type': 'Plan'}, - 'hardware_profile': {'key': 'properties.hardwareProfile', 'type': 'HardwareProfile'}, - 'storage_profile': {'key': 'properties.storageProfile', 'type': 'StorageProfile'}, - 'os_profile': {'key': 'properties.osProfile', 'type': 'OSProfile'}, - 'network_profile': {'key': 'properties.networkProfile', 'type': 'NetworkProfile'}, - 'diagnostics_profile': {'key': 'properties.diagnosticsProfile', 'type': 'DiagnosticsProfile'}, - 'availability_set': {'key': 'properties.availabilitySet', 'type': 'SubResource'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'instance_view': {'key': 'properties.instanceView', 'type': 'VirtualMachineInstanceView'}, - 'license_type': {'key': 'properties.licenseType', 'type': 'str'}, - 'vm_id': {'key': 'properties.vmId', 'type': 'str'}, - 'resources': {'key': 'resources', 'type': '[VirtualMachineExtension]'}, - 'identity': {'key': 'identity', 'type': 'VirtualMachineIdentity'}, - } - - def __init__(self, **kwargs): - super(VirtualMachine, self).__init__(**kwargs) - self.plan = kwargs.get('plan', None) - self.hardware_profile = kwargs.get('hardware_profile', None) - self.storage_profile = kwargs.get('storage_profile', None) - self.os_profile = kwargs.get('os_profile', None) - self.network_profile = kwargs.get('network_profile', None) - self.diagnostics_profile = kwargs.get('diagnostics_profile', None) - self.availability_set = kwargs.get('availability_set', None) - self.provisioning_state = None - self.instance_view = None - self.license_type = kwargs.get('license_type', None) - self.vm_id = None - self.resources = None - self.identity = kwargs.get('identity', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/virtual_machine_agent_instance_view.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/virtual_machine_agent_instance_view.py deleted file mode 100644 index f6d0fc9a94ea..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/virtual_machine_agent_instance_view.py +++ /dev/null @@ -1,39 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineAgentInstanceView(Model): - """The instance view of the VM Agent running on the virtual machine. - - :param vm_agent_version: The VM Agent full version. - :type vm_agent_version: str - :param extension_handlers: The virtual machine extension handler instance - view. - :type extension_handlers: - list[~azure.mgmt.compute.v2016_04_30_preview.models.VirtualMachineExtensionHandlerInstanceView] - :param statuses: The resource status information. - :type statuses: - list[~azure.mgmt.compute.v2016_04_30_preview.models.InstanceViewStatus] - """ - - _attribute_map = { - 'vm_agent_version': {'key': 'vmAgentVersion', 'type': 'str'}, - 'extension_handlers': {'key': 'extensionHandlers', 'type': '[VirtualMachineExtensionHandlerInstanceView]'}, - 'statuses': {'key': 'statuses', 'type': '[InstanceViewStatus]'}, - } - - def __init__(self, **kwargs): - super(VirtualMachineAgentInstanceView, self).__init__(**kwargs) - self.vm_agent_version = kwargs.get('vm_agent_version', None) - self.extension_handlers = kwargs.get('extension_handlers', None) - self.statuses = kwargs.get('statuses', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/virtual_machine_agent_instance_view_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/virtual_machine_agent_instance_view_py3.py deleted file mode 100644 index 9b301b73086b..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/virtual_machine_agent_instance_view_py3.py +++ /dev/null @@ -1,39 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineAgentInstanceView(Model): - """The instance view of the VM Agent running on the virtual machine. - - :param vm_agent_version: The VM Agent full version. - :type vm_agent_version: str - :param extension_handlers: The virtual machine extension handler instance - view. - :type extension_handlers: - list[~azure.mgmt.compute.v2016_04_30_preview.models.VirtualMachineExtensionHandlerInstanceView] - :param statuses: The resource status information. - :type statuses: - list[~azure.mgmt.compute.v2016_04_30_preview.models.InstanceViewStatus] - """ - - _attribute_map = { - 'vm_agent_version': {'key': 'vmAgentVersion', 'type': 'str'}, - 'extension_handlers': {'key': 'extensionHandlers', 'type': '[VirtualMachineExtensionHandlerInstanceView]'}, - 'statuses': {'key': 'statuses', 'type': '[InstanceViewStatus]'}, - } - - def __init__(self, *, vm_agent_version: str=None, extension_handlers=None, statuses=None, **kwargs) -> None: - super(VirtualMachineAgentInstanceView, self).__init__(**kwargs) - self.vm_agent_version = vm_agent_version - self.extension_handlers = extension_handlers - self.statuses = statuses diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/virtual_machine_capture_parameters.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/virtual_machine_capture_parameters.py deleted file mode 100644 index 4e6ffbea7a4f..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/virtual_machine_capture_parameters.py +++ /dev/null @@ -1,46 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineCaptureParameters(Model): - """Capture Virtual Machine parameters. - - All required parameters must be populated in order to send to Azure. - - :param vhd_prefix: Required. The captured virtual hard disk's name prefix. - :type vhd_prefix: str - :param destination_container_name: Required. The destination container - name. - :type destination_container_name: str - :param overwrite_vhds: Required. Specifies whether to overwrite the - destination virtual hard disk, in case of conflict. - :type overwrite_vhds: bool - """ - - _validation = { - 'vhd_prefix': {'required': True}, - 'destination_container_name': {'required': True}, - 'overwrite_vhds': {'required': True}, - } - - _attribute_map = { - 'vhd_prefix': {'key': 'vhdPrefix', 'type': 'str'}, - 'destination_container_name': {'key': 'destinationContainerName', 'type': 'str'}, - 'overwrite_vhds': {'key': 'overwriteVhds', 'type': 'bool'}, - } - - def __init__(self, **kwargs): - super(VirtualMachineCaptureParameters, self).__init__(**kwargs) - self.vhd_prefix = kwargs.get('vhd_prefix', None) - self.destination_container_name = kwargs.get('destination_container_name', None) - self.overwrite_vhds = kwargs.get('overwrite_vhds', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/virtual_machine_capture_parameters_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/virtual_machine_capture_parameters_py3.py deleted file mode 100644 index 1866cdc23300..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/virtual_machine_capture_parameters_py3.py +++ /dev/null @@ -1,46 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineCaptureParameters(Model): - """Capture Virtual Machine parameters. - - All required parameters must be populated in order to send to Azure. - - :param vhd_prefix: Required. The captured virtual hard disk's name prefix. - :type vhd_prefix: str - :param destination_container_name: Required. The destination container - name. - :type destination_container_name: str - :param overwrite_vhds: Required. Specifies whether to overwrite the - destination virtual hard disk, in case of conflict. - :type overwrite_vhds: bool - """ - - _validation = { - 'vhd_prefix': {'required': True}, - 'destination_container_name': {'required': True}, - 'overwrite_vhds': {'required': True}, - } - - _attribute_map = { - 'vhd_prefix': {'key': 'vhdPrefix', 'type': 'str'}, - 'destination_container_name': {'key': 'destinationContainerName', 'type': 'str'}, - 'overwrite_vhds': {'key': 'overwriteVhds', 'type': 'bool'}, - } - - def __init__(self, *, vhd_prefix: str, destination_container_name: str, overwrite_vhds: bool, **kwargs) -> None: - super(VirtualMachineCaptureParameters, self).__init__(**kwargs) - self.vhd_prefix = vhd_prefix - self.destination_container_name = destination_container_name - self.overwrite_vhds = overwrite_vhds diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/virtual_machine_capture_result.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/virtual_machine_capture_result.py deleted file mode 100644 index 2b0df7406a34..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/virtual_machine_capture_result.py +++ /dev/null @@ -1,31 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .sub_resource import SubResource - - -class VirtualMachineCaptureResult(SubResource): - """Resource Id. - - :param id: Resource Id - :type id: str - :param output: Operation output data (raw JSON) - :type output: object - """ - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'output': {'key': 'properties.output', 'type': 'object'}, - } - - def __init__(self, **kwargs): - super(VirtualMachineCaptureResult, self).__init__(**kwargs) - self.output = kwargs.get('output', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/virtual_machine_capture_result_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/virtual_machine_capture_result_py3.py deleted file mode 100644 index f2aba4286bb0..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/virtual_machine_capture_result_py3.py +++ /dev/null @@ -1,31 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .sub_resource_py3 import SubResource - - -class VirtualMachineCaptureResult(SubResource): - """Resource Id. - - :param id: Resource Id - :type id: str - :param output: Operation output data (raw JSON) - :type output: object - """ - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'output': {'key': 'properties.output', 'type': 'object'}, - } - - def __init__(self, *, id: str=None, output=None, **kwargs) -> None: - super(VirtualMachineCaptureResult, self).__init__(id=id, **kwargs) - self.output = output diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/virtual_machine_extension.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/virtual_machine_extension.py deleted file mode 100644 index fb00bd780b7a..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/virtual_machine_extension.py +++ /dev/null @@ -1,97 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource import Resource - - -class VirtualMachineExtension(Resource): - """Describes a Virtual Machine Extension. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource Id - :vartype id: str - :ivar name: Resource name - :vartype name: str - :ivar type: Resource type - :vartype type: str - :param location: Required. Resource location - :type location: str - :param tags: Resource tags - :type tags: dict[str, str] - :param force_update_tag: How the extension handler should be forced to - update even if the extension configuration has not changed. - :type force_update_tag: str - :param publisher: The name of the extension handler publisher. - :type publisher: str - :param virtual_machine_extension_type: Specifies the type of the - extension; an example is "CustomScriptExtension". - :type virtual_machine_extension_type: str - :param type_handler_version: Specifies the version of the script handler. - :type type_handler_version: str - :param auto_upgrade_minor_version: Indicates whether the extension should - use a newer minor version if one is available at deployment time. Once - deployed, however, the extension will not upgrade minor versions unless - redeployed, even with this property set to true. - :type auto_upgrade_minor_version: bool - :param settings: Json formatted public settings for the extension. - :type settings: object - :param protected_settings: The extension can contain either - protectedSettings or protectedSettingsFromKeyVault or no protected - settings at all. - :type protected_settings: object - :ivar provisioning_state: The provisioning state, which only appears in - the response. - :vartype provisioning_state: str - :param instance_view: The virtual machine extension instance view. - :type instance_view: - ~azure.mgmt.compute.v2016_04_30_preview.models.VirtualMachineExtensionInstanceView - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - 'provisioning_state': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'force_update_tag': {'key': 'properties.forceUpdateTag', 'type': 'str'}, - 'publisher': {'key': 'properties.publisher', 'type': 'str'}, - 'virtual_machine_extension_type': {'key': 'properties.type', 'type': 'str'}, - 'type_handler_version': {'key': 'properties.typeHandlerVersion', 'type': 'str'}, - 'auto_upgrade_minor_version': {'key': 'properties.autoUpgradeMinorVersion', 'type': 'bool'}, - 'settings': {'key': 'properties.settings', 'type': 'object'}, - 'protected_settings': {'key': 'properties.protectedSettings', 'type': 'object'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'instance_view': {'key': 'properties.instanceView', 'type': 'VirtualMachineExtensionInstanceView'}, - } - - def __init__(self, **kwargs): - super(VirtualMachineExtension, self).__init__(**kwargs) - self.force_update_tag = kwargs.get('force_update_tag', None) - self.publisher = kwargs.get('publisher', None) - self.virtual_machine_extension_type = kwargs.get('virtual_machine_extension_type', None) - self.type_handler_version = kwargs.get('type_handler_version', None) - self.auto_upgrade_minor_version = kwargs.get('auto_upgrade_minor_version', None) - self.settings = kwargs.get('settings', None) - self.protected_settings = kwargs.get('protected_settings', None) - self.provisioning_state = None - self.instance_view = kwargs.get('instance_view', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/virtual_machine_extension_handler_instance_view.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/virtual_machine_extension_handler_instance_view.py deleted file mode 100644 index 411bcf8c9fe4..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/virtual_machine_extension_handler_instance_view.py +++ /dev/null @@ -1,38 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineExtensionHandlerInstanceView(Model): - """The instance view of a virtual machine extension handler. - - :param type: Specifies the type of the extension; an example is - "CustomScriptExtension". - :type type: str - :param type_handler_version: Specifies the version of the script handler. - :type type_handler_version: str - :param status: The extension handler status. - :type status: - ~azure.mgmt.compute.v2016_04_30_preview.models.InstanceViewStatus - """ - - _attribute_map = { - 'type': {'key': 'type', 'type': 'str'}, - 'type_handler_version': {'key': 'typeHandlerVersion', 'type': 'str'}, - 'status': {'key': 'status', 'type': 'InstanceViewStatus'}, - } - - def __init__(self, **kwargs): - super(VirtualMachineExtensionHandlerInstanceView, self).__init__(**kwargs) - self.type = kwargs.get('type', None) - self.type_handler_version = kwargs.get('type_handler_version', None) - self.status = kwargs.get('status', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/virtual_machine_extension_handler_instance_view_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/virtual_machine_extension_handler_instance_view_py3.py deleted file mode 100644 index 6b66bc5fa5c1..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/virtual_machine_extension_handler_instance_view_py3.py +++ /dev/null @@ -1,38 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineExtensionHandlerInstanceView(Model): - """The instance view of a virtual machine extension handler. - - :param type: Specifies the type of the extension; an example is - "CustomScriptExtension". - :type type: str - :param type_handler_version: Specifies the version of the script handler. - :type type_handler_version: str - :param status: The extension handler status. - :type status: - ~azure.mgmt.compute.v2016_04_30_preview.models.InstanceViewStatus - """ - - _attribute_map = { - 'type': {'key': 'type', 'type': 'str'}, - 'type_handler_version': {'key': 'typeHandlerVersion', 'type': 'str'}, - 'status': {'key': 'status', 'type': 'InstanceViewStatus'}, - } - - def __init__(self, *, type: str=None, type_handler_version: str=None, status=None, **kwargs) -> None: - super(VirtualMachineExtensionHandlerInstanceView, self).__init__(**kwargs) - self.type = type - self.type_handler_version = type_handler_version - self.status = status diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/virtual_machine_extension_image.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/virtual_machine_extension_image.py deleted file mode 100644 index 7273e2b84754..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/virtual_machine_extension_image.py +++ /dev/null @@ -1,81 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource import Resource - - -class VirtualMachineExtensionImage(Resource): - """Describes a Virtual Machine Extension Image. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource Id - :vartype id: str - :ivar name: Resource name - :vartype name: str - :ivar type: Resource type - :vartype type: str - :param location: Required. Resource location - :type location: str - :param tags: Resource tags - :type tags: dict[str, str] - :param operating_system: Required. The operating system this extension - supports. - :type operating_system: str - :param compute_role: Required. The type of role (IaaS or PaaS) this - extension supports. - :type compute_role: str - :param handler_schema: Required. The schema defined by publisher, where - extension consumers should provide settings in a matching schema. - :type handler_schema: str - :param vm_scale_set_enabled: Whether the extension can be used on xRP - VMScaleSets. By default existing extensions are usable on scalesets, but - there might be cases where a publisher wants to explicitly indicate the - extension is only enabled for CRP VMs but not VMSS. - :type vm_scale_set_enabled: bool - :param supports_multiple_extensions: Whether the handler can support - multiple extensions. - :type supports_multiple_extensions: bool - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - 'operating_system': {'required': True}, - 'compute_role': {'required': True}, - 'handler_schema': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'operating_system': {'key': 'properties.operatingSystem', 'type': 'str'}, - 'compute_role': {'key': 'properties.computeRole', 'type': 'str'}, - 'handler_schema': {'key': 'properties.handlerSchema', 'type': 'str'}, - 'vm_scale_set_enabled': {'key': 'properties.vmScaleSetEnabled', 'type': 'bool'}, - 'supports_multiple_extensions': {'key': 'properties.supportsMultipleExtensions', 'type': 'bool'}, - } - - def __init__(self, **kwargs): - super(VirtualMachineExtensionImage, self).__init__(**kwargs) - self.operating_system = kwargs.get('operating_system', None) - self.compute_role = kwargs.get('compute_role', None) - self.handler_schema = kwargs.get('handler_schema', None) - self.vm_scale_set_enabled = kwargs.get('vm_scale_set_enabled', None) - self.supports_multiple_extensions = kwargs.get('supports_multiple_extensions', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/virtual_machine_extension_image_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/virtual_machine_extension_image_py3.py deleted file mode 100644 index 3d48c3a87fb0..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/virtual_machine_extension_image_py3.py +++ /dev/null @@ -1,81 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource_py3 import Resource - - -class VirtualMachineExtensionImage(Resource): - """Describes a Virtual Machine Extension Image. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource Id - :vartype id: str - :ivar name: Resource name - :vartype name: str - :ivar type: Resource type - :vartype type: str - :param location: Required. Resource location - :type location: str - :param tags: Resource tags - :type tags: dict[str, str] - :param operating_system: Required. The operating system this extension - supports. - :type operating_system: str - :param compute_role: Required. The type of role (IaaS or PaaS) this - extension supports. - :type compute_role: str - :param handler_schema: Required. The schema defined by publisher, where - extension consumers should provide settings in a matching schema. - :type handler_schema: str - :param vm_scale_set_enabled: Whether the extension can be used on xRP - VMScaleSets. By default existing extensions are usable on scalesets, but - there might be cases where a publisher wants to explicitly indicate the - extension is only enabled for CRP VMs but not VMSS. - :type vm_scale_set_enabled: bool - :param supports_multiple_extensions: Whether the handler can support - multiple extensions. - :type supports_multiple_extensions: bool - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - 'operating_system': {'required': True}, - 'compute_role': {'required': True}, - 'handler_schema': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'operating_system': {'key': 'properties.operatingSystem', 'type': 'str'}, - 'compute_role': {'key': 'properties.computeRole', 'type': 'str'}, - 'handler_schema': {'key': 'properties.handlerSchema', 'type': 'str'}, - 'vm_scale_set_enabled': {'key': 'properties.vmScaleSetEnabled', 'type': 'bool'}, - 'supports_multiple_extensions': {'key': 'properties.supportsMultipleExtensions', 'type': 'bool'}, - } - - def __init__(self, *, location: str, operating_system: str, compute_role: str, handler_schema: str, tags=None, vm_scale_set_enabled: bool=None, supports_multiple_extensions: bool=None, **kwargs) -> None: - super(VirtualMachineExtensionImage, self).__init__(location=location, tags=tags, **kwargs) - self.operating_system = operating_system - self.compute_role = compute_role - self.handler_schema = handler_schema - self.vm_scale_set_enabled = vm_scale_set_enabled - self.supports_multiple_extensions = supports_multiple_extensions diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/virtual_machine_extension_instance_view.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/virtual_machine_extension_instance_view.py deleted file mode 100644 index 7dd1fb0572e8..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/virtual_machine_extension_instance_view.py +++ /dev/null @@ -1,47 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineExtensionInstanceView(Model): - """The instance view of a virtual machine extension. - - :param name: The virtual machine extension name. - :type name: str - :param type: Specifies the type of the extension; an example is - "CustomScriptExtension". - :type type: str - :param type_handler_version: Specifies the version of the script handler. - :type type_handler_version: str - :param substatuses: The resource status information. - :type substatuses: - list[~azure.mgmt.compute.v2016_04_30_preview.models.InstanceViewStatus] - :param statuses: The resource status information. - :type statuses: - list[~azure.mgmt.compute.v2016_04_30_preview.models.InstanceViewStatus] - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'type_handler_version': {'key': 'typeHandlerVersion', 'type': 'str'}, - 'substatuses': {'key': 'substatuses', 'type': '[InstanceViewStatus]'}, - 'statuses': {'key': 'statuses', 'type': '[InstanceViewStatus]'}, - } - - def __init__(self, **kwargs): - super(VirtualMachineExtensionInstanceView, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.type = kwargs.get('type', None) - self.type_handler_version = kwargs.get('type_handler_version', None) - self.substatuses = kwargs.get('substatuses', None) - self.statuses = kwargs.get('statuses', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/virtual_machine_extension_instance_view_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/virtual_machine_extension_instance_view_py3.py deleted file mode 100644 index 4ac3c8b0af49..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/virtual_machine_extension_instance_view_py3.py +++ /dev/null @@ -1,47 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineExtensionInstanceView(Model): - """The instance view of a virtual machine extension. - - :param name: The virtual machine extension name. - :type name: str - :param type: Specifies the type of the extension; an example is - "CustomScriptExtension". - :type type: str - :param type_handler_version: Specifies the version of the script handler. - :type type_handler_version: str - :param substatuses: The resource status information. - :type substatuses: - list[~azure.mgmt.compute.v2016_04_30_preview.models.InstanceViewStatus] - :param statuses: The resource status information. - :type statuses: - list[~azure.mgmt.compute.v2016_04_30_preview.models.InstanceViewStatus] - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'type_handler_version': {'key': 'typeHandlerVersion', 'type': 'str'}, - 'substatuses': {'key': 'substatuses', 'type': '[InstanceViewStatus]'}, - 'statuses': {'key': 'statuses', 'type': '[InstanceViewStatus]'}, - } - - def __init__(self, *, name: str=None, type: str=None, type_handler_version: str=None, substatuses=None, statuses=None, **kwargs) -> None: - super(VirtualMachineExtensionInstanceView, self).__init__(**kwargs) - self.name = name - self.type = type - self.type_handler_version = type_handler_version - self.substatuses = substatuses - self.statuses = statuses diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/virtual_machine_extension_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/virtual_machine_extension_py3.py deleted file mode 100644 index b2ccf18662b8..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/virtual_machine_extension_py3.py +++ /dev/null @@ -1,97 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource_py3 import Resource - - -class VirtualMachineExtension(Resource): - """Describes a Virtual Machine Extension. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource Id - :vartype id: str - :ivar name: Resource name - :vartype name: str - :ivar type: Resource type - :vartype type: str - :param location: Required. Resource location - :type location: str - :param tags: Resource tags - :type tags: dict[str, str] - :param force_update_tag: How the extension handler should be forced to - update even if the extension configuration has not changed. - :type force_update_tag: str - :param publisher: The name of the extension handler publisher. - :type publisher: str - :param virtual_machine_extension_type: Specifies the type of the - extension; an example is "CustomScriptExtension". - :type virtual_machine_extension_type: str - :param type_handler_version: Specifies the version of the script handler. - :type type_handler_version: str - :param auto_upgrade_minor_version: Indicates whether the extension should - use a newer minor version if one is available at deployment time. Once - deployed, however, the extension will not upgrade minor versions unless - redeployed, even with this property set to true. - :type auto_upgrade_minor_version: bool - :param settings: Json formatted public settings for the extension. - :type settings: object - :param protected_settings: The extension can contain either - protectedSettings or protectedSettingsFromKeyVault or no protected - settings at all. - :type protected_settings: object - :ivar provisioning_state: The provisioning state, which only appears in - the response. - :vartype provisioning_state: str - :param instance_view: The virtual machine extension instance view. - :type instance_view: - ~azure.mgmt.compute.v2016_04_30_preview.models.VirtualMachineExtensionInstanceView - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - 'provisioning_state': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'force_update_tag': {'key': 'properties.forceUpdateTag', 'type': 'str'}, - 'publisher': {'key': 'properties.publisher', 'type': 'str'}, - 'virtual_machine_extension_type': {'key': 'properties.type', 'type': 'str'}, - 'type_handler_version': {'key': 'properties.typeHandlerVersion', 'type': 'str'}, - 'auto_upgrade_minor_version': {'key': 'properties.autoUpgradeMinorVersion', 'type': 'bool'}, - 'settings': {'key': 'properties.settings', 'type': 'object'}, - 'protected_settings': {'key': 'properties.protectedSettings', 'type': 'object'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'instance_view': {'key': 'properties.instanceView', 'type': 'VirtualMachineExtensionInstanceView'}, - } - - def __init__(self, *, location: str, tags=None, force_update_tag: str=None, publisher: str=None, virtual_machine_extension_type: str=None, type_handler_version: str=None, auto_upgrade_minor_version: bool=None, settings=None, protected_settings=None, instance_view=None, **kwargs) -> None: - super(VirtualMachineExtension, self).__init__(location=location, tags=tags, **kwargs) - self.force_update_tag = force_update_tag - self.publisher = publisher - self.virtual_machine_extension_type = virtual_machine_extension_type - self.type_handler_version = type_handler_version - self.auto_upgrade_minor_version = auto_upgrade_minor_version - self.settings = settings - self.protected_settings = protected_settings - self.provisioning_state = None - self.instance_view = instance_view diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/virtual_machine_extension_update.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/virtual_machine_extension_update.py deleted file mode 100644 index b920ff57ff96..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/virtual_machine_extension_update.py +++ /dev/null @@ -1,62 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .update_resource import UpdateResource - - -class VirtualMachineExtensionUpdate(UpdateResource): - """Describes a Virtual Machine Extension. - - :param tags: Resource tags - :type tags: dict[str, str] - :param force_update_tag: How the extension handler should be forced to - update even if the extension configuration has not changed. - :type force_update_tag: str - :param publisher: The name of the extension handler publisher. - :type publisher: str - :param type: Specifies the type of the extension; an example is - "CustomScriptExtension". - :type type: str - :param type_handler_version: Specifies the version of the script handler. - :type type_handler_version: str - :param auto_upgrade_minor_version: Indicates whether the extension should - use a newer minor version if one is available at deployment time. Once - deployed, however, the extension will not upgrade minor versions unless - redeployed, even with this property set to true. - :type auto_upgrade_minor_version: bool - :param settings: Json formatted public settings for the extension. - :type settings: object - :param protected_settings: The extension can contain either - protectedSettings or protectedSettingsFromKeyVault or no protected - settings at all. - :type protected_settings: object - """ - - _attribute_map = { - 'tags': {'key': 'tags', 'type': '{str}'}, - 'force_update_tag': {'key': 'properties.forceUpdateTag', 'type': 'str'}, - 'publisher': {'key': 'properties.publisher', 'type': 'str'}, - 'type': {'key': 'properties.type', 'type': 'str'}, - 'type_handler_version': {'key': 'properties.typeHandlerVersion', 'type': 'str'}, - 'auto_upgrade_minor_version': {'key': 'properties.autoUpgradeMinorVersion', 'type': 'bool'}, - 'settings': {'key': 'properties.settings', 'type': 'object'}, - 'protected_settings': {'key': 'properties.protectedSettings', 'type': 'object'}, - } - - def __init__(self, **kwargs): - super(VirtualMachineExtensionUpdate, self).__init__(**kwargs) - self.force_update_tag = kwargs.get('force_update_tag', None) - self.publisher = kwargs.get('publisher', None) - self.type = kwargs.get('type', None) - self.type_handler_version = kwargs.get('type_handler_version', None) - self.auto_upgrade_minor_version = kwargs.get('auto_upgrade_minor_version', None) - self.settings = kwargs.get('settings', None) - self.protected_settings = kwargs.get('protected_settings', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/virtual_machine_extension_update_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/virtual_machine_extension_update_py3.py deleted file mode 100644 index c32c18d32759..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/virtual_machine_extension_update_py3.py +++ /dev/null @@ -1,62 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .update_resource_py3 import UpdateResource - - -class VirtualMachineExtensionUpdate(UpdateResource): - """Describes a Virtual Machine Extension. - - :param tags: Resource tags - :type tags: dict[str, str] - :param force_update_tag: How the extension handler should be forced to - update even if the extension configuration has not changed. - :type force_update_tag: str - :param publisher: The name of the extension handler publisher. - :type publisher: str - :param type: Specifies the type of the extension; an example is - "CustomScriptExtension". - :type type: str - :param type_handler_version: Specifies the version of the script handler. - :type type_handler_version: str - :param auto_upgrade_minor_version: Indicates whether the extension should - use a newer minor version if one is available at deployment time. Once - deployed, however, the extension will not upgrade minor versions unless - redeployed, even with this property set to true. - :type auto_upgrade_minor_version: bool - :param settings: Json formatted public settings for the extension. - :type settings: object - :param protected_settings: The extension can contain either - protectedSettings or protectedSettingsFromKeyVault or no protected - settings at all. - :type protected_settings: object - """ - - _attribute_map = { - 'tags': {'key': 'tags', 'type': '{str}'}, - 'force_update_tag': {'key': 'properties.forceUpdateTag', 'type': 'str'}, - 'publisher': {'key': 'properties.publisher', 'type': 'str'}, - 'type': {'key': 'properties.type', 'type': 'str'}, - 'type_handler_version': {'key': 'properties.typeHandlerVersion', 'type': 'str'}, - 'auto_upgrade_minor_version': {'key': 'properties.autoUpgradeMinorVersion', 'type': 'bool'}, - 'settings': {'key': 'properties.settings', 'type': 'object'}, - 'protected_settings': {'key': 'properties.protectedSettings', 'type': 'object'}, - } - - def __init__(self, *, tags=None, force_update_tag: str=None, publisher: str=None, type: str=None, type_handler_version: str=None, auto_upgrade_minor_version: bool=None, settings=None, protected_settings=None, **kwargs) -> None: - super(VirtualMachineExtensionUpdate, self).__init__(tags=tags, **kwargs) - self.force_update_tag = force_update_tag - self.publisher = publisher - self.type = type - self.type_handler_version = type_handler_version - self.auto_upgrade_minor_version = auto_upgrade_minor_version - self.settings = settings - self.protected_settings = protected_settings diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/virtual_machine_extensions_list_result.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/virtual_machine_extensions_list_result.py deleted file mode 100644 index 97b7cf6a1608..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/virtual_machine_extensions_list_result.py +++ /dev/null @@ -1,29 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineExtensionsListResult(Model): - """The List Extension operation response. - - :param value: The list of extensions - :type value: - list[~azure.mgmt.compute.v2016_04_30_preview.models.VirtualMachineExtension] - """ - - _attribute_map = { - 'value': {'key': 'value', 'type': '[VirtualMachineExtension]'}, - } - - def __init__(self, **kwargs): - super(VirtualMachineExtensionsListResult, self).__init__(**kwargs) - self.value = kwargs.get('value', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/virtual_machine_extensions_list_result_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/virtual_machine_extensions_list_result_py3.py deleted file mode 100644 index 7a9843f2a6d9..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/virtual_machine_extensions_list_result_py3.py +++ /dev/null @@ -1,29 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineExtensionsListResult(Model): - """The List Extension operation response. - - :param value: The list of extensions - :type value: - list[~azure.mgmt.compute.v2016_04_30_preview.models.VirtualMachineExtension] - """ - - _attribute_map = { - 'value': {'key': 'value', 'type': '[VirtualMachineExtension]'}, - } - - def __init__(self, *, value=None, **kwargs) -> None: - super(VirtualMachineExtensionsListResult, self).__init__(**kwargs) - self.value = value diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/virtual_machine_identity.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/virtual_machine_identity.py deleted file mode 100644 index 84be2bbe01e2..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/virtual_machine_identity.py +++ /dev/null @@ -1,47 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineIdentity(Model): - """Identity for the virtual machine. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar principal_id: The principal id of virtual machine identity. - :vartype principal_id: str - :ivar tenant_id: The tenant id associated with the virtual machine. - :vartype tenant_id: str - :param type: The type of identity used for the virtual machine. Currently, - the only supported type is 'SystemAssigned', which implicitly creates an - identity. Possible values include: 'SystemAssigned' - :type type: str or - ~azure.mgmt.compute.v2016_04_30_preview.models.ResourceIdentityType - """ - - _validation = { - 'principal_id': {'readonly': True}, - 'tenant_id': {'readonly': True}, - } - - _attribute_map = { - 'principal_id': {'key': 'principalId', 'type': 'str'}, - 'tenant_id': {'key': 'tenantId', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'ResourceIdentityType'}, - } - - def __init__(self, **kwargs): - super(VirtualMachineIdentity, self).__init__(**kwargs) - self.principal_id = None - self.tenant_id = None - self.type = kwargs.get('type', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/virtual_machine_identity_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/virtual_machine_identity_py3.py deleted file mode 100644 index bfd1ec6626bc..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/virtual_machine_identity_py3.py +++ /dev/null @@ -1,47 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineIdentity(Model): - """Identity for the virtual machine. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar principal_id: The principal id of virtual machine identity. - :vartype principal_id: str - :ivar tenant_id: The tenant id associated with the virtual machine. - :vartype tenant_id: str - :param type: The type of identity used for the virtual machine. Currently, - the only supported type is 'SystemAssigned', which implicitly creates an - identity. Possible values include: 'SystemAssigned' - :type type: str or - ~azure.mgmt.compute.v2016_04_30_preview.models.ResourceIdentityType - """ - - _validation = { - 'principal_id': {'readonly': True}, - 'tenant_id': {'readonly': True}, - } - - _attribute_map = { - 'principal_id': {'key': 'principalId', 'type': 'str'}, - 'tenant_id': {'key': 'tenantId', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'ResourceIdentityType'}, - } - - def __init__(self, *, type=None, **kwargs) -> None: - super(VirtualMachineIdentity, self).__init__(**kwargs) - self.principal_id = None - self.tenant_id = None - self.type = type diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/virtual_machine_image.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/virtual_machine_image.py deleted file mode 100644 index 32853c04e51c..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/virtual_machine_image.py +++ /dev/null @@ -1,60 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .virtual_machine_image_resource import VirtualMachineImageResource - - -class VirtualMachineImage(VirtualMachineImageResource): - """Describes a Virtual Machine Image. - - All required parameters must be populated in order to send to Azure. - - :param id: Resource Id - :type id: str - :param name: Required. The name of the resource. - :type name: str - :param location: Required. The supported Azure location of the resource. - :type location: str - :param tags: Specifies the tags that are assigned to the virtual machine. - For more information about using tags, see [Using tags to organize your - Azure - resources](https://docs.microsoft.com/azure/azure-resource-manager/resource-group-using-tags.md). - :type tags: dict[str, str] - :param plan: - :type plan: ~azure.mgmt.compute.v2016_04_30_preview.models.PurchasePlan - :param os_disk_image: - :type os_disk_image: - ~azure.mgmt.compute.v2016_04_30_preview.models.OSDiskImage - :param data_disk_images: - :type data_disk_images: - list[~azure.mgmt.compute.v2016_04_30_preview.models.DataDiskImage] - """ - - _validation = { - 'name': {'required': True}, - 'location': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'plan': {'key': 'properties.plan', 'type': 'PurchasePlan'}, - 'os_disk_image': {'key': 'properties.osDiskImage', 'type': 'OSDiskImage'}, - 'data_disk_images': {'key': 'properties.dataDiskImages', 'type': '[DataDiskImage]'}, - } - - def __init__(self, **kwargs): - super(VirtualMachineImage, self).__init__(**kwargs) - self.plan = kwargs.get('plan', None) - self.os_disk_image = kwargs.get('os_disk_image', None) - self.data_disk_images = kwargs.get('data_disk_images', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/virtual_machine_image_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/virtual_machine_image_py3.py deleted file mode 100644 index 98fc935fa42d..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/virtual_machine_image_py3.py +++ /dev/null @@ -1,60 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .virtual_machine_image_resource_py3 import VirtualMachineImageResource - - -class VirtualMachineImage(VirtualMachineImageResource): - """Describes a Virtual Machine Image. - - All required parameters must be populated in order to send to Azure. - - :param id: Resource Id - :type id: str - :param name: Required. The name of the resource. - :type name: str - :param location: Required. The supported Azure location of the resource. - :type location: str - :param tags: Specifies the tags that are assigned to the virtual machine. - For more information about using tags, see [Using tags to organize your - Azure - resources](https://docs.microsoft.com/azure/azure-resource-manager/resource-group-using-tags.md). - :type tags: dict[str, str] - :param plan: - :type plan: ~azure.mgmt.compute.v2016_04_30_preview.models.PurchasePlan - :param os_disk_image: - :type os_disk_image: - ~azure.mgmt.compute.v2016_04_30_preview.models.OSDiskImage - :param data_disk_images: - :type data_disk_images: - list[~azure.mgmt.compute.v2016_04_30_preview.models.DataDiskImage] - """ - - _validation = { - 'name': {'required': True}, - 'location': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'plan': {'key': 'properties.plan', 'type': 'PurchasePlan'}, - 'os_disk_image': {'key': 'properties.osDiskImage', 'type': 'OSDiskImage'}, - 'data_disk_images': {'key': 'properties.dataDiskImages', 'type': '[DataDiskImage]'}, - } - - def __init__(self, *, name: str, location: str, id: str=None, tags=None, plan=None, os_disk_image=None, data_disk_images=None, **kwargs) -> None: - super(VirtualMachineImage, self).__init__(id=id, name=name, location=location, tags=tags, **kwargs) - self.plan = plan - self.os_disk_image = os_disk_image - self.data_disk_images = data_disk_images diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/virtual_machine_image_resource.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/virtual_machine_image_resource.py deleted file mode 100644 index 8807cc8f391b..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/virtual_machine_image_resource.py +++ /dev/null @@ -1,49 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .sub_resource import SubResource - - -class VirtualMachineImageResource(SubResource): - """Virtual machine image resource information. - - All required parameters must be populated in order to send to Azure. - - :param id: Resource Id - :type id: str - :param name: Required. The name of the resource. - :type name: str - :param location: Required. The supported Azure location of the resource. - :type location: str - :param tags: Specifies the tags that are assigned to the virtual machine. - For more information about using tags, see [Using tags to organize your - Azure - resources](https://docs.microsoft.com/azure/azure-resource-manager/resource-group-using-tags.md). - :type tags: dict[str, str] - """ - - _validation = { - 'name': {'required': True}, - 'location': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - } - - def __init__(self, **kwargs): - super(VirtualMachineImageResource, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.location = kwargs.get('location', None) - self.tags = kwargs.get('tags', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/virtual_machine_image_resource_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/virtual_machine_image_resource_py3.py deleted file mode 100644 index b9d63a8bc9e0..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/virtual_machine_image_resource_py3.py +++ /dev/null @@ -1,49 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .sub_resource_py3 import SubResource - - -class VirtualMachineImageResource(SubResource): - """Virtual machine image resource information. - - All required parameters must be populated in order to send to Azure. - - :param id: Resource Id - :type id: str - :param name: Required. The name of the resource. - :type name: str - :param location: Required. The supported Azure location of the resource. - :type location: str - :param tags: Specifies the tags that are assigned to the virtual machine. - For more information about using tags, see [Using tags to organize your - Azure - resources](https://docs.microsoft.com/azure/azure-resource-manager/resource-group-using-tags.md). - :type tags: dict[str, str] - """ - - _validation = { - 'name': {'required': True}, - 'location': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - } - - def __init__(self, *, name: str, location: str, id: str=None, tags=None, **kwargs) -> None: - super(VirtualMachineImageResource, self).__init__(id=id, **kwargs) - self.name = name - self.location = location - self.tags = tags diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/virtual_machine_instance_view.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/virtual_machine_instance_view.py deleted file mode 100644 index 4666a4066364..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/virtual_machine_instance_view.py +++ /dev/null @@ -1,66 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineInstanceView(Model): - """The instance view of a virtual machine. - - :param platform_update_domain: Specifies the update domain of the virtual - machine. - :type platform_update_domain: int - :param platform_fault_domain: Specifies the fault domain of the virtual - machine. - :type platform_fault_domain: int - :param rdp_thumb_print: The Remote desktop certificate thumbprint. - :type rdp_thumb_print: str - :param vm_agent: The VM Agent running on the virtual machine. - :type vm_agent: - ~azure.mgmt.compute.v2016_04_30_preview.models.VirtualMachineAgentInstanceView - :param disks: The virtual machine disk information. - :type disks: - list[~azure.mgmt.compute.v2016_04_30_preview.models.DiskInstanceView] - :param extensions: The extensions information. - :type extensions: - list[~azure.mgmt.compute.v2016_04_30_preview.models.VirtualMachineExtensionInstanceView] - :param boot_diagnostics: Boot Diagnostics is a debugging feature which - allows you to view Console Output and Screenshot to diagnose VM status. -

    You can easily view the output of your console log.

    - Azure also enables you to see a screenshot of the VM from the hypervisor. - :type boot_diagnostics: - ~azure.mgmt.compute.v2016_04_30_preview.models.BootDiagnosticsInstanceView - :param statuses: The resource status information. - :type statuses: - list[~azure.mgmt.compute.v2016_04_30_preview.models.InstanceViewStatus] - """ - - _attribute_map = { - 'platform_update_domain': {'key': 'platformUpdateDomain', 'type': 'int'}, - 'platform_fault_domain': {'key': 'platformFaultDomain', 'type': 'int'}, - 'rdp_thumb_print': {'key': 'rdpThumbPrint', 'type': 'str'}, - 'vm_agent': {'key': 'vmAgent', 'type': 'VirtualMachineAgentInstanceView'}, - 'disks': {'key': 'disks', 'type': '[DiskInstanceView]'}, - 'extensions': {'key': 'extensions', 'type': '[VirtualMachineExtensionInstanceView]'}, - 'boot_diagnostics': {'key': 'bootDiagnostics', 'type': 'BootDiagnosticsInstanceView'}, - 'statuses': {'key': 'statuses', 'type': '[InstanceViewStatus]'}, - } - - def __init__(self, **kwargs): - super(VirtualMachineInstanceView, self).__init__(**kwargs) - self.platform_update_domain = kwargs.get('platform_update_domain', None) - self.platform_fault_domain = kwargs.get('platform_fault_domain', None) - self.rdp_thumb_print = kwargs.get('rdp_thumb_print', None) - self.vm_agent = kwargs.get('vm_agent', None) - self.disks = kwargs.get('disks', None) - self.extensions = kwargs.get('extensions', None) - self.boot_diagnostics = kwargs.get('boot_diagnostics', None) - self.statuses = kwargs.get('statuses', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/virtual_machine_instance_view_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/virtual_machine_instance_view_py3.py deleted file mode 100644 index 6bf2e10a13a1..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/virtual_machine_instance_view_py3.py +++ /dev/null @@ -1,66 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineInstanceView(Model): - """The instance view of a virtual machine. - - :param platform_update_domain: Specifies the update domain of the virtual - machine. - :type platform_update_domain: int - :param platform_fault_domain: Specifies the fault domain of the virtual - machine. - :type platform_fault_domain: int - :param rdp_thumb_print: The Remote desktop certificate thumbprint. - :type rdp_thumb_print: str - :param vm_agent: The VM Agent running on the virtual machine. - :type vm_agent: - ~azure.mgmt.compute.v2016_04_30_preview.models.VirtualMachineAgentInstanceView - :param disks: The virtual machine disk information. - :type disks: - list[~azure.mgmt.compute.v2016_04_30_preview.models.DiskInstanceView] - :param extensions: The extensions information. - :type extensions: - list[~azure.mgmt.compute.v2016_04_30_preview.models.VirtualMachineExtensionInstanceView] - :param boot_diagnostics: Boot Diagnostics is a debugging feature which - allows you to view Console Output and Screenshot to diagnose VM status. -

    You can easily view the output of your console log.

    - Azure also enables you to see a screenshot of the VM from the hypervisor. - :type boot_diagnostics: - ~azure.mgmt.compute.v2016_04_30_preview.models.BootDiagnosticsInstanceView - :param statuses: The resource status information. - :type statuses: - list[~azure.mgmt.compute.v2016_04_30_preview.models.InstanceViewStatus] - """ - - _attribute_map = { - 'platform_update_domain': {'key': 'platformUpdateDomain', 'type': 'int'}, - 'platform_fault_domain': {'key': 'platformFaultDomain', 'type': 'int'}, - 'rdp_thumb_print': {'key': 'rdpThumbPrint', 'type': 'str'}, - 'vm_agent': {'key': 'vmAgent', 'type': 'VirtualMachineAgentInstanceView'}, - 'disks': {'key': 'disks', 'type': '[DiskInstanceView]'}, - 'extensions': {'key': 'extensions', 'type': '[VirtualMachineExtensionInstanceView]'}, - 'boot_diagnostics': {'key': 'bootDiagnostics', 'type': 'BootDiagnosticsInstanceView'}, - 'statuses': {'key': 'statuses', 'type': '[InstanceViewStatus]'}, - } - - def __init__(self, *, platform_update_domain: int=None, platform_fault_domain: int=None, rdp_thumb_print: str=None, vm_agent=None, disks=None, extensions=None, boot_diagnostics=None, statuses=None, **kwargs) -> None: - super(VirtualMachineInstanceView, self).__init__(**kwargs) - self.platform_update_domain = platform_update_domain - self.platform_fault_domain = platform_fault_domain - self.rdp_thumb_print = rdp_thumb_print - self.vm_agent = vm_agent - self.disks = disks - self.extensions = extensions - self.boot_diagnostics = boot_diagnostics - self.statuses = statuses diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/virtual_machine_paged.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/virtual_machine_paged.py deleted file mode 100644 index ab77c4d3e7fd..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/virtual_machine_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class VirtualMachinePaged(Paged): - """ - A paging container for iterating over a list of :class:`VirtualMachine ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[VirtualMachine]'} - } - - def __init__(self, *args, **kwargs): - - super(VirtualMachinePaged, self).__init__(*args, **kwargs) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/virtual_machine_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/virtual_machine_py3.py deleted file mode 100644 index 17817f03786a..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/virtual_machine_py3.py +++ /dev/null @@ -1,147 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource_py3 import Resource - - -class VirtualMachine(Resource): - """Describes a Virtual Machine. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource Id - :vartype id: str - :ivar name: Resource name - :vartype name: str - :ivar type: Resource type - :vartype type: str - :param location: Required. Resource location - :type location: str - :param tags: Resource tags - :type tags: dict[str, str] - :param plan: Specifies information about the marketplace image used to - create the virtual machine. This element is only used for marketplace - images. Before you can use a marketplace image from an API, you must - enable the image for programmatic use. In the Azure portal, find the - marketplace image that you want to use and then click **Want to deploy - programmatically, Get Started ->**. Enter any required information and - then click **Save**. - :type plan: ~azure.mgmt.compute.v2016_04_30_preview.models.Plan - :param hardware_profile: Specifies the hardware settings for the virtual - machine. - :type hardware_profile: - ~azure.mgmt.compute.v2016_04_30_preview.models.HardwareProfile - :param storage_profile: Specifies the storage settings for the virtual - machine disks. - :type storage_profile: - ~azure.mgmt.compute.v2016_04_30_preview.models.StorageProfile - :param os_profile: Specifies the operating system settings for the virtual - machine. - :type os_profile: ~azure.mgmt.compute.v2016_04_30_preview.models.OSProfile - :param network_profile: Specifies the network interfaces of the virtual - machine. - :type network_profile: - ~azure.mgmt.compute.v2016_04_30_preview.models.NetworkProfile - :param diagnostics_profile: Specifies the boot diagnostic settings state. -

    Minimum api-version: 2015-06-15. - :type diagnostics_profile: - ~azure.mgmt.compute.v2016_04_30_preview.models.DiagnosticsProfile - :param availability_set: Specifies information about the availability set - that the virtual machine should be assigned to. Virtual machines specified - in the same availability set are allocated to different nodes to maximize - availability. For more information about availability sets, see [Manage - the availability of virtual - machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-manage-availability?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). -

    For more information on Azure planned maintenance, see [Planned - maintenance for virtual machines in - Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-planned-maintenance?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json) -

    Currently, a VM can only be added to availability set at creation - time. An existing VM cannot be added to an availability set. - :type availability_set: - ~azure.mgmt.compute.v2016_04_30_preview.models.SubResource - :ivar provisioning_state: The provisioning state, which only appears in - the response. - :vartype provisioning_state: str - :ivar instance_view: The virtual machine instance view. - :vartype instance_view: - ~azure.mgmt.compute.v2016_04_30_preview.models.VirtualMachineInstanceView - :param license_type: Specifies that the image or disk that is being used - was licensed on-premises. This element is only used for images that - contain the Windows Server operating system.

    Possible values are: -

    Windows_Client

    Windows_Server

    If this element - is included in a request for an update, the value must match the initial - value. This value cannot be updated.

    For more information, see - [Azure Hybrid Use Benefit for Windows - Server](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-hybrid-use-benefit-licensing?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json) -

    Minimum api-version: 2015-06-15 - :type license_type: str - :ivar vm_id: Specifies the VM unique ID which is a 128-bits identifier - that is encoded and stored in all Azure IaaS VMs SMBIOS and can be read - using platform BIOS commands. - :vartype vm_id: str - :ivar resources: The virtual machine child extension resources. - :vartype resources: - list[~azure.mgmt.compute.v2016_04_30_preview.models.VirtualMachineExtension] - :param identity: The identity of the virtual machine, if configured. - :type identity: - ~azure.mgmt.compute.v2016_04_30_preview.models.VirtualMachineIdentity - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - 'provisioning_state': {'readonly': True}, - 'instance_view': {'readonly': True}, - 'vm_id': {'readonly': True}, - 'resources': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'plan': {'key': 'plan', 'type': 'Plan'}, - 'hardware_profile': {'key': 'properties.hardwareProfile', 'type': 'HardwareProfile'}, - 'storage_profile': {'key': 'properties.storageProfile', 'type': 'StorageProfile'}, - 'os_profile': {'key': 'properties.osProfile', 'type': 'OSProfile'}, - 'network_profile': {'key': 'properties.networkProfile', 'type': 'NetworkProfile'}, - 'diagnostics_profile': {'key': 'properties.diagnosticsProfile', 'type': 'DiagnosticsProfile'}, - 'availability_set': {'key': 'properties.availabilitySet', 'type': 'SubResource'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'instance_view': {'key': 'properties.instanceView', 'type': 'VirtualMachineInstanceView'}, - 'license_type': {'key': 'properties.licenseType', 'type': 'str'}, - 'vm_id': {'key': 'properties.vmId', 'type': 'str'}, - 'resources': {'key': 'resources', 'type': '[VirtualMachineExtension]'}, - 'identity': {'key': 'identity', 'type': 'VirtualMachineIdentity'}, - } - - def __init__(self, *, location: str, tags=None, plan=None, hardware_profile=None, storage_profile=None, os_profile=None, network_profile=None, diagnostics_profile=None, availability_set=None, license_type: str=None, identity=None, **kwargs) -> None: - super(VirtualMachine, self).__init__(location=location, tags=tags, **kwargs) - self.plan = plan - self.hardware_profile = hardware_profile - self.storage_profile = storage_profile - self.os_profile = os_profile - self.network_profile = network_profile - self.diagnostics_profile = diagnostics_profile - self.availability_set = availability_set - self.provisioning_state = None - self.instance_view = None - self.license_type = license_type - self.vm_id = None - self.resources = None - self.identity = identity diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/virtual_machine_scale_set.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/virtual_machine_scale_set.py deleted file mode 100644 index 30ccec128f7a..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/virtual_machine_scale_set.py +++ /dev/null @@ -1,97 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource import Resource - - -class VirtualMachineScaleSet(Resource): - """Describes a Virtual Machine Scale Set. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource Id - :vartype id: str - :ivar name: Resource name - :vartype name: str - :ivar type: Resource type - :vartype type: str - :param location: Required. Resource location - :type location: str - :param tags: Resource tags - :type tags: dict[str, str] - :param sku: The virtual machine scale set sku. - :type sku: ~azure.mgmt.compute.v2016_04_30_preview.models.Sku - :param plan: Specifies information about the marketplace image used to - create the virtual machine. This element is only used for marketplace - images. Before you can use a marketplace image from an API, you must - enable the image for programmatic use. In the Azure portal, find the - marketplace image that you want to use and then click **Want to deploy - programmatically, Get Started ->**. Enter any required information and - then click **Save**. - :type plan: ~azure.mgmt.compute.v2016_04_30_preview.models.Plan - :param upgrade_policy: The upgrade policy. - :type upgrade_policy: - ~azure.mgmt.compute.v2016_04_30_preview.models.UpgradePolicy - :param virtual_machine_profile: The virtual machine profile. - :type virtual_machine_profile: - ~azure.mgmt.compute.v2016_04_30_preview.models.VirtualMachineScaleSetVMProfile - :ivar provisioning_state: The provisioning state, which only appears in - the response. - :vartype provisioning_state: str - :param over_provision: Specifies whether the Virtual Machine Scale Set - should be overprovisioned. - :type over_provision: bool - :param single_placement_group: When true this limits the scale set to a - single placement group, of max size 100 virtual machines. - :type single_placement_group: bool - :param identity: The identity of the virtual machine scale set, if - configured. - :type identity: - ~azure.mgmt.compute.v2016_04_30_preview.models.VirtualMachineScaleSetIdentity - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - 'provisioning_state': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'sku': {'key': 'sku', 'type': 'Sku'}, - 'plan': {'key': 'plan', 'type': 'Plan'}, - 'upgrade_policy': {'key': 'properties.upgradePolicy', 'type': 'UpgradePolicy'}, - 'virtual_machine_profile': {'key': 'properties.virtualMachineProfile', 'type': 'VirtualMachineScaleSetVMProfile'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'over_provision': {'key': 'properties.overProvision', 'type': 'bool'}, - 'single_placement_group': {'key': 'properties.singlePlacementGroup', 'type': 'bool'}, - 'identity': {'key': 'identity', 'type': 'VirtualMachineScaleSetIdentity'}, - } - - def __init__(self, **kwargs): - super(VirtualMachineScaleSet, self).__init__(**kwargs) - self.sku = kwargs.get('sku', None) - self.plan = kwargs.get('plan', None) - self.upgrade_policy = kwargs.get('upgrade_policy', None) - self.virtual_machine_profile = kwargs.get('virtual_machine_profile', None) - self.provisioning_state = None - self.over_provision = kwargs.get('over_provision', None) - self.single_placement_group = kwargs.get('single_placement_group', None) - self.identity = kwargs.get('identity', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/virtual_machine_scale_set_data_disk.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/virtual_machine_scale_set_data_disk.py deleted file mode 100644 index 61138bcb9e6f..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/virtual_machine_scale_set_data_disk.py +++ /dev/null @@ -1,66 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineScaleSetDataDisk(Model): - """Describes a virtual machine scale set data disk. - - All required parameters must be populated in order to send to Azure. - - :param name: The disk name. - :type name: str - :param lun: Required. Specifies the logical unit number of the data disk. - This value is used to identify data disks within the VM and therefore must - be unique for each data disk attached to a VM. - :type lun: int - :param caching: Specifies the caching requirements.

    Possible - values are:

    **None**

    **ReadOnly**

    **ReadWrite** -

    Default: **None for Standard storage. ReadOnly for Premium - storage**. Possible values include: 'None', 'ReadOnly', 'ReadWrite' - :type caching: str or - ~azure.mgmt.compute.v2016_04_30_preview.models.CachingTypes - :param create_option: Required. The create option. Possible values - include: 'FromImage', 'Empty', 'Attach' - :type create_option: str or - ~azure.mgmt.compute.v2016_04_30_preview.models.DiskCreateOptionTypes - :param disk_size_gb: Specifies the size of an empty data disk in - gigabytes. This element can be used to overwrite the size of the disk in a - virtual machine image.

    This value cannot be larger than 1023 GB - :type disk_size_gb: int - :param managed_disk: The managed disk parameters. - :type managed_disk: - ~azure.mgmt.compute.v2016_04_30_preview.models.VirtualMachineScaleSetManagedDiskParameters - """ - - _validation = { - 'lun': {'required': True}, - 'create_option': {'required': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'lun': {'key': 'lun', 'type': 'int'}, - 'caching': {'key': 'caching', 'type': 'CachingTypes'}, - 'create_option': {'key': 'createOption', 'type': 'DiskCreateOptionTypes'}, - 'disk_size_gb': {'key': 'diskSizeGB', 'type': 'int'}, - 'managed_disk': {'key': 'managedDisk', 'type': 'VirtualMachineScaleSetManagedDiskParameters'}, - } - - def __init__(self, **kwargs): - super(VirtualMachineScaleSetDataDisk, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.lun = kwargs.get('lun', None) - self.caching = kwargs.get('caching', None) - self.create_option = kwargs.get('create_option', None) - self.disk_size_gb = kwargs.get('disk_size_gb', None) - self.managed_disk = kwargs.get('managed_disk', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/virtual_machine_scale_set_data_disk_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/virtual_machine_scale_set_data_disk_py3.py deleted file mode 100644 index ff9363b506ac..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/virtual_machine_scale_set_data_disk_py3.py +++ /dev/null @@ -1,66 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineScaleSetDataDisk(Model): - """Describes a virtual machine scale set data disk. - - All required parameters must be populated in order to send to Azure. - - :param name: The disk name. - :type name: str - :param lun: Required. Specifies the logical unit number of the data disk. - This value is used to identify data disks within the VM and therefore must - be unique for each data disk attached to a VM. - :type lun: int - :param caching: Specifies the caching requirements.

    Possible - values are:

    **None**

    **ReadOnly**

    **ReadWrite** -

    Default: **None for Standard storage. ReadOnly for Premium - storage**. Possible values include: 'None', 'ReadOnly', 'ReadWrite' - :type caching: str or - ~azure.mgmt.compute.v2016_04_30_preview.models.CachingTypes - :param create_option: Required. The create option. Possible values - include: 'FromImage', 'Empty', 'Attach' - :type create_option: str or - ~azure.mgmt.compute.v2016_04_30_preview.models.DiskCreateOptionTypes - :param disk_size_gb: Specifies the size of an empty data disk in - gigabytes. This element can be used to overwrite the size of the disk in a - virtual machine image.

    This value cannot be larger than 1023 GB - :type disk_size_gb: int - :param managed_disk: The managed disk parameters. - :type managed_disk: - ~azure.mgmt.compute.v2016_04_30_preview.models.VirtualMachineScaleSetManagedDiskParameters - """ - - _validation = { - 'lun': {'required': True}, - 'create_option': {'required': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'lun': {'key': 'lun', 'type': 'int'}, - 'caching': {'key': 'caching', 'type': 'CachingTypes'}, - 'create_option': {'key': 'createOption', 'type': 'DiskCreateOptionTypes'}, - 'disk_size_gb': {'key': 'diskSizeGB', 'type': 'int'}, - 'managed_disk': {'key': 'managedDisk', 'type': 'VirtualMachineScaleSetManagedDiskParameters'}, - } - - def __init__(self, *, lun: int, create_option, name: str=None, caching=None, disk_size_gb: int=None, managed_disk=None, **kwargs) -> None: - super(VirtualMachineScaleSetDataDisk, self).__init__(**kwargs) - self.name = name - self.lun = lun - self.caching = caching - self.create_option = create_option - self.disk_size_gb = disk_size_gb - self.managed_disk = managed_disk diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/virtual_machine_scale_set_extension.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/virtual_machine_scale_set_extension.py deleted file mode 100644 index 29bc30c1f021..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/virtual_machine_scale_set_extension.py +++ /dev/null @@ -1,74 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .sub_resource_read_only import SubResourceReadOnly - - -class VirtualMachineScaleSetExtension(SubResourceReadOnly): - """Describes a Virtual Machine Scale Set Extension. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource Id - :vartype id: str - :param name: The name of the extension. - :type name: str - :param publisher: The name of the extension handler publisher. - :type publisher: str - :param type: Specifies the type of the extension; an example is - "CustomScriptExtension". - :type type: str - :param type_handler_version: Specifies the version of the script handler. - :type type_handler_version: str - :param auto_upgrade_minor_version: Indicates whether the extension should - use a newer minor version if one is available at deployment time. Once - deployed, however, the extension will not upgrade minor versions unless - redeployed, even with this property set to true. - :type auto_upgrade_minor_version: bool - :param settings: Json formatted public settings for the extension. - :type settings: object - :param protected_settings: The extension can contain either - protectedSettings or protectedSettingsFromKeyVault or no protected - settings at all. - :type protected_settings: object - :ivar provisioning_state: The provisioning state, which only appears in - the response. - :vartype provisioning_state: str - """ - - _validation = { - 'id': {'readonly': True}, - 'provisioning_state': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'publisher': {'key': 'properties.publisher', 'type': 'str'}, - 'type': {'key': 'properties.type', 'type': 'str'}, - 'type_handler_version': {'key': 'properties.typeHandlerVersion', 'type': 'str'}, - 'auto_upgrade_minor_version': {'key': 'properties.autoUpgradeMinorVersion', 'type': 'bool'}, - 'settings': {'key': 'properties.settings', 'type': 'object'}, - 'protected_settings': {'key': 'properties.protectedSettings', 'type': 'object'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(VirtualMachineScaleSetExtension, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.publisher = kwargs.get('publisher', None) - self.type = kwargs.get('type', None) - self.type_handler_version = kwargs.get('type_handler_version', None) - self.auto_upgrade_minor_version = kwargs.get('auto_upgrade_minor_version', None) - self.settings = kwargs.get('settings', None) - self.protected_settings = kwargs.get('protected_settings', None) - self.provisioning_state = None diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/virtual_machine_scale_set_extension_profile.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/virtual_machine_scale_set_extension_profile.py deleted file mode 100644 index 6dcf2ea9bc9c..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/virtual_machine_scale_set_extension_profile.py +++ /dev/null @@ -1,30 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineScaleSetExtensionProfile(Model): - """Describes a virtual machine scale set extension profile. - - :param extensions: The virtual machine scale set child extension - resources. - :type extensions: - list[~azure.mgmt.compute.v2016_04_30_preview.models.VirtualMachineScaleSetExtension] - """ - - _attribute_map = { - 'extensions': {'key': 'extensions', 'type': '[VirtualMachineScaleSetExtension]'}, - } - - def __init__(self, **kwargs): - super(VirtualMachineScaleSetExtensionProfile, self).__init__(**kwargs) - self.extensions = kwargs.get('extensions', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/virtual_machine_scale_set_extension_profile_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/virtual_machine_scale_set_extension_profile_py3.py deleted file mode 100644 index 7136c80608a0..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/virtual_machine_scale_set_extension_profile_py3.py +++ /dev/null @@ -1,30 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineScaleSetExtensionProfile(Model): - """Describes a virtual machine scale set extension profile. - - :param extensions: The virtual machine scale set child extension - resources. - :type extensions: - list[~azure.mgmt.compute.v2016_04_30_preview.models.VirtualMachineScaleSetExtension] - """ - - _attribute_map = { - 'extensions': {'key': 'extensions', 'type': '[VirtualMachineScaleSetExtension]'}, - } - - def __init__(self, *, extensions=None, **kwargs) -> None: - super(VirtualMachineScaleSetExtensionProfile, self).__init__(**kwargs) - self.extensions = extensions diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/virtual_machine_scale_set_extension_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/virtual_machine_scale_set_extension_py3.py deleted file mode 100644 index 885120fef0d8..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/virtual_machine_scale_set_extension_py3.py +++ /dev/null @@ -1,74 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .sub_resource_read_only_py3 import SubResourceReadOnly - - -class VirtualMachineScaleSetExtension(SubResourceReadOnly): - """Describes a Virtual Machine Scale Set Extension. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource Id - :vartype id: str - :param name: The name of the extension. - :type name: str - :param publisher: The name of the extension handler publisher. - :type publisher: str - :param type: Specifies the type of the extension; an example is - "CustomScriptExtension". - :type type: str - :param type_handler_version: Specifies the version of the script handler. - :type type_handler_version: str - :param auto_upgrade_minor_version: Indicates whether the extension should - use a newer minor version if one is available at deployment time. Once - deployed, however, the extension will not upgrade minor versions unless - redeployed, even with this property set to true. - :type auto_upgrade_minor_version: bool - :param settings: Json formatted public settings for the extension. - :type settings: object - :param protected_settings: The extension can contain either - protectedSettings or protectedSettingsFromKeyVault or no protected - settings at all. - :type protected_settings: object - :ivar provisioning_state: The provisioning state, which only appears in - the response. - :vartype provisioning_state: str - """ - - _validation = { - 'id': {'readonly': True}, - 'provisioning_state': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'publisher': {'key': 'properties.publisher', 'type': 'str'}, - 'type': {'key': 'properties.type', 'type': 'str'}, - 'type_handler_version': {'key': 'properties.typeHandlerVersion', 'type': 'str'}, - 'auto_upgrade_minor_version': {'key': 'properties.autoUpgradeMinorVersion', 'type': 'bool'}, - 'settings': {'key': 'properties.settings', 'type': 'object'}, - 'protected_settings': {'key': 'properties.protectedSettings', 'type': 'object'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - } - - def __init__(self, *, name: str=None, publisher: str=None, type: str=None, type_handler_version: str=None, auto_upgrade_minor_version: bool=None, settings=None, protected_settings=None, **kwargs) -> None: - super(VirtualMachineScaleSetExtension, self).__init__(**kwargs) - self.name = name - self.publisher = publisher - self.type = type - self.type_handler_version = type_handler_version - self.auto_upgrade_minor_version = auto_upgrade_minor_version - self.settings = settings - self.protected_settings = protected_settings - self.provisioning_state = None diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/virtual_machine_scale_set_identity.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/virtual_machine_scale_set_identity.py deleted file mode 100644 index a7b9883fa459..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/virtual_machine_scale_set_identity.py +++ /dev/null @@ -1,49 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineScaleSetIdentity(Model): - """Identity for the virtual machine scale set. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar principal_id: The principal id of virtual machine scale set - identity. - :vartype principal_id: str - :ivar tenant_id: The tenant id associated with the virtual machine scale - set. - :vartype tenant_id: str - :param type: The type of identity used for the virtual machine scale set. - Currently, the only supported type is 'SystemAssigned', which implicitly - creates an identity. Possible values include: 'SystemAssigned' - :type type: str or - ~azure.mgmt.compute.v2016_04_30_preview.models.ResourceIdentityType - """ - - _validation = { - 'principal_id': {'readonly': True}, - 'tenant_id': {'readonly': True}, - } - - _attribute_map = { - 'principal_id': {'key': 'principalId', 'type': 'str'}, - 'tenant_id': {'key': 'tenantId', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'ResourceIdentityType'}, - } - - def __init__(self, **kwargs): - super(VirtualMachineScaleSetIdentity, self).__init__(**kwargs) - self.principal_id = None - self.tenant_id = None - self.type = kwargs.get('type', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/virtual_machine_scale_set_identity_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/virtual_machine_scale_set_identity_py3.py deleted file mode 100644 index 55fb61687b44..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/virtual_machine_scale_set_identity_py3.py +++ /dev/null @@ -1,49 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineScaleSetIdentity(Model): - """Identity for the virtual machine scale set. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar principal_id: The principal id of virtual machine scale set - identity. - :vartype principal_id: str - :ivar tenant_id: The tenant id associated with the virtual machine scale - set. - :vartype tenant_id: str - :param type: The type of identity used for the virtual machine scale set. - Currently, the only supported type is 'SystemAssigned', which implicitly - creates an identity. Possible values include: 'SystemAssigned' - :type type: str or - ~azure.mgmt.compute.v2016_04_30_preview.models.ResourceIdentityType - """ - - _validation = { - 'principal_id': {'readonly': True}, - 'tenant_id': {'readonly': True}, - } - - _attribute_map = { - 'principal_id': {'key': 'principalId', 'type': 'str'}, - 'tenant_id': {'key': 'tenantId', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'ResourceIdentityType'}, - } - - def __init__(self, *, type=None, **kwargs) -> None: - super(VirtualMachineScaleSetIdentity, self).__init__(**kwargs) - self.principal_id = None - self.tenant_id = None - self.type = type diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/virtual_machine_scale_set_instance_view.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/virtual_machine_scale_set_instance_view.py deleted file mode 100644 index fc73a188243f..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/virtual_machine_scale_set_instance_view.py +++ /dev/null @@ -1,48 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineScaleSetInstanceView(Model): - """The instance view of a virtual machine scale set. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar virtual_machine: The instance view status summary for the virtual - machine scale set. - :vartype virtual_machine: - ~azure.mgmt.compute.v2016_04_30_preview.models.VirtualMachineScaleSetInstanceViewStatusesSummary - :ivar extensions: The extensions information. - :vartype extensions: - list[~azure.mgmt.compute.v2016_04_30_preview.models.VirtualMachineScaleSetVMExtensionsSummary] - :param statuses: The resource status information. - :type statuses: - list[~azure.mgmt.compute.v2016_04_30_preview.models.InstanceViewStatus] - """ - - _validation = { - 'virtual_machine': {'readonly': True}, - 'extensions': {'readonly': True}, - } - - _attribute_map = { - 'virtual_machine': {'key': 'virtualMachine', 'type': 'VirtualMachineScaleSetInstanceViewStatusesSummary'}, - 'extensions': {'key': 'extensions', 'type': '[VirtualMachineScaleSetVMExtensionsSummary]'}, - 'statuses': {'key': 'statuses', 'type': '[InstanceViewStatus]'}, - } - - def __init__(self, **kwargs): - super(VirtualMachineScaleSetInstanceView, self).__init__(**kwargs) - self.virtual_machine = None - self.extensions = None - self.statuses = kwargs.get('statuses', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/virtual_machine_scale_set_instance_view_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/virtual_machine_scale_set_instance_view_py3.py deleted file mode 100644 index 6f7a4431de39..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/virtual_machine_scale_set_instance_view_py3.py +++ /dev/null @@ -1,48 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineScaleSetInstanceView(Model): - """The instance view of a virtual machine scale set. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar virtual_machine: The instance view status summary for the virtual - machine scale set. - :vartype virtual_machine: - ~azure.mgmt.compute.v2016_04_30_preview.models.VirtualMachineScaleSetInstanceViewStatusesSummary - :ivar extensions: The extensions information. - :vartype extensions: - list[~azure.mgmt.compute.v2016_04_30_preview.models.VirtualMachineScaleSetVMExtensionsSummary] - :param statuses: The resource status information. - :type statuses: - list[~azure.mgmt.compute.v2016_04_30_preview.models.InstanceViewStatus] - """ - - _validation = { - 'virtual_machine': {'readonly': True}, - 'extensions': {'readonly': True}, - } - - _attribute_map = { - 'virtual_machine': {'key': 'virtualMachine', 'type': 'VirtualMachineScaleSetInstanceViewStatusesSummary'}, - 'extensions': {'key': 'extensions', 'type': '[VirtualMachineScaleSetVMExtensionsSummary]'}, - 'statuses': {'key': 'statuses', 'type': '[InstanceViewStatus]'}, - } - - def __init__(self, *, statuses=None, **kwargs) -> None: - super(VirtualMachineScaleSetInstanceView, self).__init__(**kwargs) - self.virtual_machine = None - self.extensions = None - self.statuses = statuses diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/virtual_machine_scale_set_instance_view_statuses_summary.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/virtual_machine_scale_set_instance_view_statuses_summary.py deleted file mode 100644 index aaf29fceeb65..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/virtual_machine_scale_set_instance_view_statuses_summary.py +++ /dev/null @@ -1,37 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineScaleSetInstanceViewStatusesSummary(Model): - """Instance view statuses summary for virtual machines of a virtual machine - scale set. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar statuses_summary: The extensions information. - :vartype statuses_summary: - list[~azure.mgmt.compute.v2016_04_30_preview.models.VirtualMachineStatusCodeCount] - """ - - _validation = { - 'statuses_summary': {'readonly': True}, - } - - _attribute_map = { - 'statuses_summary': {'key': 'statusesSummary', 'type': '[VirtualMachineStatusCodeCount]'}, - } - - def __init__(self, **kwargs): - super(VirtualMachineScaleSetInstanceViewStatusesSummary, self).__init__(**kwargs) - self.statuses_summary = None diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/virtual_machine_scale_set_instance_view_statuses_summary_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/virtual_machine_scale_set_instance_view_statuses_summary_py3.py deleted file mode 100644 index bd92330e549b..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/virtual_machine_scale_set_instance_view_statuses_summary_py3.py +++ /dev/null @@ -1,37 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineScaleSetInstanceViewStatusesSummary(Model): - """Instance view statuses summary for virtual machines of a virtual machine - scale set. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar statuses_summary: The extensions information. - :vartype statuses_summary: - list[~azure.mgmt.compute.v2016_04_30_preview.models.VirtualMachineStatusCodeCount] - """ - - _validation = { - 'statuses_summary': {'readonly': True}, - } - - _attribute_map = { - 'statuses_summary': {'key': 'statusesSummary', 'type': '[VirtualMachineStatusCodeCount]'}, - } - - def __init__(self, **kwargs) -> None: - super(VirtualMachineScaleSetInstanceViewStatusesSummary, self).__init__(**kwargs) - self.statuses_summary = None diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/virtual_machine_scale_set_ip_configuration.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/virtual_machine_scale_set_ip_configuration.py deleted file mode 100644 index 98b86fbcfc7c..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/virtual_machine_scale_set_ip_configuration.py +++ /dev/null @@ -1,61 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .sub_resource import SubResource - - -class VirtualMachineScaleSetIPConfiguration(SubResource): - """Describes a virtual machine scale set network profile's IP configuration. - - All required parameters must be populated in order to send to Azure. - - :param id: Resource Id - :type id: str - :param name: Required. The IP configuration name. - :type name: str - :param subnet: Required. The subnet. - :type subnet: - ~azure.mgmt.compute.v2016_04_30_preview.models.ApiEntityReference - :param application_gateway_backend_address_pools: The application gateway - backend address pools. - :type application_gateway_backend_address_pools: - list[~azure.mgmt.compute.v2016_04_30_preview.models.SubResource] - :param load_balancer_backend_address_pools: The load balancer backend - address pools. - :type load_balancer_backend_address_pools: - list[~azure.mgmt.compute.v2016_04_30_preview.models.SubResource] - :param load_balancer_inbound_nat_pools: The load balancer inbound nat - pools. - :type load_balancer_inbound_nat_pools: - list[~azure.mgmt.compute.v2016_04_30_preview.models.SubResource] - """ - - _validation = { - 'name': {'required': True}, - 'subnet': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'subnet': {'key': 'properties.subnet', 'type': 'ApiEntityReference'}, - 'application_gateway_backend_address_pools': {'key': 'properties.applicationGatewayBackendAddressPools', 'type': '[SubResource]'}, - 'load_balancer_backend_address_pools': {'key': 'properties.loadBalancerBackendAddressPools', 'type': '[SubResource]'}, - 'load_balancer_inbound_nat_pools': {'key': 'properties.loadBalancerInboundNatPools', 'type': '[SubResource]'}, - } - - def __init__(self, **kwargs): - super(VirtualMachineScaleSetIPConfiguration, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.subnet = kwargs.get('subnet', None) - self.application_gateway_backend_address_pools = kwargs.get('application_gateway_backend_address_pools', None) - self.load_balancer_backend_address_pools = kwargs.get('load_balancer_backend_address_pools', None) - self.load_balancer_inbound_nat_pools = kwargs.get('load_balancer_inbound_nat_pools', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/virtual_machine_scale_set_ip_configuration_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/virtual_machine_scale_set_ip_configuration_py3.py deleted file mode 100644 index 6b1f921db4d7..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/virtual_machine_scale_set_ip_configuration_py3.py +++ /dev/null @@ -1,61 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .sub_resource_py3 import SubResource - - -class VirtualMachineScaleSetIPConfiguration(SubResource): - """Describes a virtual machine scale set network profile's IP configuration. - - All required parameters must be populated in order to send to Azure. - - :param id: Resource Id - :type id: str - :param name: Required. The IP configuration name. - :type name: str - :param subnet: Required. The subnet. - :type subnet: - ~azure.mgmt.compute.v2016_04_30_preview.models.ApiEntityReference - :param application_gateway_backend_address_pools: The application gateway - backend address pools. - :type application_gateway_backend_address_pools: - list[~azure.mgmt.compute.v2016_04_30_preview.models.SubResource] - :param load_balancer_backend_address_pools: The load balancer backend - address pools. - :type load_balancer_backend_address_pools: - list[~azure.mgmt.compute.v2016_04_30_preview.models.SubResource] - :param load_balancer_inbound_nat_pools: The load balancer inbound nat - pools. - :type load_balancer_inbound_nat_pools: - list[~azure.mgmt.compute.v2016_04_30_preview.models.SubResource] - """ - - _validation = { - 'name': {'required': True}, - 'subnet': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'subnet': {'key': 'properties.subnet', 'type': 'ApiEntityReference'}, - 'application_gateway_backend_address_pools': {'key': 'properties.applicationGatewayBackendAddressPools', 'type': '[SubResource]'}, - 'load_balancer_backend_address_pools': {'key': 'properties.loadBalancerBackendAddressPools', 'type': '[SubResource]'}, - 'load_balancer_inbound_nat_pools': {'key': 'properties.loadBalancerInboundNatPools', 'type': '[SubResource]'}, - } - - def __init__(self, *, name: str, subnet, id: str=None, application_gateway_backend_address_pools=None, load_balancer_backend_address_pools=None, load_balancer_inbound_nat_pools=None, **kwargs) -> None: - super(VirtualMachineScaleSetIPConfiguration, self).__init__(id=id, **kwargs) - self.name = name - self.subnet = subnet - self.application_gateway_backend_address_pools = application_gateway_backend_address_pools - self.load_balancer_backend_address_pools = load_balancer_backend_address_pools - self.load_balancer_inbound_nat_pools = load_balancer_inbound_nat_pools diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/virtual_machine_scale_set_managed_disk_parameters.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/virtual_machine_scale_set_managed_disk_parameters.py deleted file mode 100644 index d620b4bada5e..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/virtual_machine_scale_set_managed_disk_parameters.py +++ /dev/null @@ -1,31 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineScaleSetManagedDiskParameters(Model): - """Describes the parameters of a ScaleSet managed disk. - - :param storage_account_type: Specifies the storage account type for the - managed disk. Possible values are: Standard_LRS or Premium_LRS. Possible - values include: 'Standard_LRS', 'Premium_LRS' - :type storage_account_type: str or - ~azure.mgmt.compute.v2016_04_30_preview.models.StorageAccountTypes - """ - - _attribute_map = { - 'storage_account_type': {'key': 'storageAccountType', 'type': 'StorageAccountTypes'}, - } - - def __init__(self, **kwargs): - super(VirtualMachineScaleSetManagedDiskParameters, self).__init__(**kwargs) - self.storage_account_type = kwargs.get('storage_account_type', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/virtual_machine_scale_set_managed_disk_parameters_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/virtual_machine_scale_set_managed_disk_parameters_py3.py deleted file mode 100644 index 0d248895d204..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/virtual_machine_scale_set_managed_disk_parameters_py3.py +++ /dev/null @@ -1,31 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineScaleSetManagedDiskParameters(Model): - """Describes the parameters of a ScaleSet managed disk. - - :param storage_account_type: Specifies the storage account type for the - managed disk. Possible values are: Standard_LRS or Premium_LRS. Possible - values include: 'Standard_LRS', 'Premium_LRS' - :type storage_account_type: str or - ~azure.mgmt.compute.v2016_04_30_preview.models.StorageAccountTypes - """ - - _attribute_map = { - 'storage_account_type': {'key': 'storageAccountType', 'type': 'StorageAccountTypes'}, - } - - def __init__(self, *, storage_account_type=None, **kwargs) -> None: - super(VirtualMachineScaleSetManagedDiskParameters, self).__init__(**kwargs) - self.storage_account_type = storage_account_type diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/virtual_machine_scale_set_network_configuration.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/virtual_machine_scale_set_network_configuration.py deleted file mode 100644 index 7ada583e7a1f..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/virtual_machine_scale_set_network_configuration.py +++ /dev/null @@ -1,49 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .sub_resource import SubResource - - -class VirtualMachineScaleSetNetworkConfiguration(SubResource): - """Describes a virtual machine scale set network profile's network - configurations. - - All required parameters must be populated in order to send to Azure. - - :param id: Resource Id - :type id: str - :param name: Required. The network configuration name. - :type name: str - :param primary: Whether this is a primary NIC on a virtual machine. - :type primary: bool - :param ip_configurations: Required. The virtual machine scale set IP - Configuration. - :type ip_configurations: - list[~azure.mgmt.compute.v2016_04_30_preview.models.VirtualMachineScaleSetIPConfiguration] - """ - - _validation = { - 'name': {'required': True}, - 'ip_configurations': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'primary': {'key': 'properties.primary', 'type': 'bool'}, - 'ip_configurations': {'key': 'properties.ipConfigurations', 'type': '[VirtualMachineScaleSetIPConfiguration]'}, - } - - def __init__(self, **kwargs): - super(VirtualMachineScaleSetNetworkConfiguration, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.primary = kwargs.get('primary', None) - self.ip_configurations = kwargs.get('ip_configurations', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/virtual_machine_scale_set_network_configuration_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/virtual_machine_scale_set_network_configuration_py3.py deleted file mode 100644 index 960adde3f070..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/virtual_machine_scale_set_network_configuration_py3.py +++ /dev/null @@ -1,49 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .sub_resource_py3 import SubResource - - -class VirtualMachineScaleSetNetworkConfiguration(SubResource): - """Describes a virtual machine scale set network profile's network - configurations. - - All required parameters must be populated in order to send to Azure. - - :param id: Resource Id - :type id: str - :param name: Required. The network configuration name. - :type name: str - :param primary: Whether this is a primary NIC on a virtual machine. - :type primary: bool - :param ip_configurations: Required. The virtual machine scale set IP - Configuration. - :type ip_configurations: - list[~azure.mgmt.compute.v2016_04_30_preview.models.VirtualMachineScaleSetIPConfiguration] - """ - - _validation = { - 'name': {'required': True}, - 'ip_configurations': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'primary': {'key': 'properties.primary', 'type': 'bool'}, - 'ip_configurations': {'key': 'properties.ipConfigurations', 'type': '[VirtualMachineScaleSetIPConfiguration]'}, - } - - def __init__(self, *, name: str, ip_configurations, id: str=None, primary: bool=None, **kwargs) -> None: - super(VirtualMachineScaleSetNetworkConfiguration, self).__init__(id=id, **kwargs) - self.name = name - self.primary = primary - self.ip_configurations = ip_configurations diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/virtual_machine_scale_set_network_profile.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/virtual_machine_scale_set_network_profile.py deleted file mode 100644 index db88739b701e..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/virtual_machine_scale_set_network_profile.py +++ /dev/null @@ -1,30 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineScaleSetNetworkProfile(Model): - """Describes a virtual machine scale set network profile. - - :param network_interface_configurations: The list of network - configurations. - :type network_interface_configurations: - list[~azure.mgmt.compute.v2016_04_30_preview.models.VirtualMachineScaleSetNetworkConfiguration] - """ - - _attribute_map = { - 'network_interface_configurations': {'key': 'networkInterfaceConfigurations', 'type': '[VirtualMachineScaleSetNetworkConfiguration]'}, - } - - def __init__(self, **kwargs): - super(VirtualMachineScaleSetNetworkProfile, self).__init__(**kwargs) - self.network_interface_configurations = kwargs.get('network_interface_configurations', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/virtual_machine_scale_set_network_profile_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/virtual_machine_scale_set_network_profile_py3.py deleted file mode 100644 index ddf18bc1ce31..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/virtual_machine_scale_set_network_profile_py3.py +++ /dev/null @@ -1,30 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineScaleSetNetworkProfile(Model): - """Describes a virtual machine scale set network profile. - - :param network_interface_configurations: The list of network - configurations. - :type network_interface_configurations: - list[~azure.mgmt.compute.v2016_04_30_preview.models.VirtualMachineScaleSetNetworkConfiguration] - """ - - _attribute_map = { - 'network_interface_configurations': {'key': 'networkInterfaceConfigurations', 'type': '[VirtualMachineScaleSetNetworkConfiguration]'}, - } - - def __init__(self, *, network_interface_configurations=None, **kwargs) -> None: - super(VirtualMachineScaleSetNetworkProfile, self).__init__(**kwargs) - self.network_interface_configurations = network_interface_configurations diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/virtual_machine_scale_set_os_disk.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/virtual_machine_scale_set_os_disk.py deleted file mode 100644 index f7f1d53b2524..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/virtual_machine_scale_set_os_disk.py +++ /dev/null @@ -1,77 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineScaleSetOSDisk(Model): - """Describes a virtual machine scale set operating system disk. - - All required parameters must be populated in order to send to Azure. - - :param name: The disk name. - :type name: str - :param caching: Specifies the caching requirements.

    Possible - values are:

    **None**

    **ReadOnly**

    **ReadWrite** -

    Default: **None for Standard storage. ReadOnly for Premium - storage**. Possible values include: 'None', 'ReadOnly', 'ReadWrite' - :type caching: str or - ~azure.mgmt.compute.v2016_04_30_preview.models.CachingTypes - :param create_option: Required. Specifies how the virtual machines in the - scale set should be created.

    The only allowed value is: - **FromImage** \\u2013 This value is used when you are using an image to - create the virtual machine. If you are using a platform image, you also - use the imageReference element described above. If you are using a - marketplace image, you also use the plan element previously described. - Possible values include: 'FromImage', 'Empty', 'Attach' - :type create_option: str or - ~azure.mgmt.compute.v2016_04_30_preview.models.DiskCreateOptionTypes - :param os_type: This property allows you to specify the type of the OS - that is included in the disk if creating a VM from user-image or a - specialized VHD.

    Possible values are:

    **Windows** -

    **Linux**. Possible values include: 'Windows', 'Linux' - :type os_type: str or - ~azure.mgmt.compute.v2016_04_30_preview.models.OperatingSystemTypes - :param image: The Source User Image VirtualHardDisk. This VirtualHardDisk - will be copied before using it to attach to the Virtual Machine. If - SourceImage is provided, the destination VirtualHardDisk should not exist. - :type image: - ~azure.mgmt.compute.v2016_04_30_preview.models.VirtualHardDisk - :param vhd_containers: The list of virtual hard disk container uris. - :type vhd_containers: list[str] - :param managed_disk: The managed disk parameters. - :type managed_disk: - ~azure.mgmt.compute.v2016_04_30_preview.models.VirtualMachineScaleSetManagedDiskParameters - """ - - _validation = { - 'create_option': {'required': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'caching': {'key': 'caching', 'type': 'CachingTypes'}, - 'create_option': {'key': 'createOption', 'type': 'DiskCreateOptionTypes'}, - 'os_type': {'key': 'osType', 'type': 'OperatingSystemTypes'}, - 'image': {'key': 'image', 'type': 'VirtualHardDisk'}, - 'vhd_containers': {'key': 'vhdContainers', 'type': '[str]'}, - 'managed_disk': {'key': 'managedDisk', 'type': 'VirtualMachineScaleSetManagedDiskParameters'}, - } - - def __init__(self, **kwargs): - super(VirtualMachineScaleSetOSDisk, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.caching = kwargs.get('caching', None) - self.create_option = kwargs.get('create_option', None) - self.os_type = kwargs.get('os_type', None) - self.image = kwargs.get('image', None) - self.vhd_containers = kwargs.get('vhd_containers', None) - self.managed_disk = kwargs.get('managed_disk', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/virtual_machine_scale_set_os_disk_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/virtual_machine_scale_set_os_disk_py3.py deleted file mode 100644 index 48478d7fc9c9..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/virtual_machine_scale_set_os_disk_py3.py +++ /dev/null @@ -1,77 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineScaleSetOSDisk(Model): - """Describes a virtual machine scale set operating system disk. - - All required parameters must be populated in order to send to Azure. - - :param name: The disk name. - :type name: str - :param caching: Specifies the caching requirements.

    Possible - values are:

    **None**

    **ReadOnly**

    **ReadWrite** -

    Default: **None for Standard storage. ReadOnly for Premium - storage**. Possible values include: 'None', 'ReadOnly', 'ReadWrite' - :type caching: str or - ~azure.mgmt.compute.v2016_04_30_preview.models.CachingTypes - :param create_option: Required. Specifies how the virtual machines in the - scale set should be created.

    The only allowed value is: - **FromImage** \\u2013 This value is used when you are using an image to - create the virtual machine. If you are using a platform image, you also - use the imageReference element described above. If you are using a - marketplace image, you also use the plan element previously described. - Possible values include: 'FromImage', 'Empty', 'Attach' - :type create_option: str or - ~azure.mgmt.compute.v2016_04_30_preview.models.DiskCreateOptionTypes - :param os_type: This property allows you to specify the type of the OS - that is included in the disk if creating a VM from user-image or a - specialized VHD.

    Possible values are:

    **Windows** -

    **Linux**. Possible values include: 'Windows', 'Linux' - :type os_type: str or - ~azure.mgmt.compute.v2016_04_30_preview.models.OperatingSystemTypes - :param image: The Source User Image VirtualHardDisk. This VirtualHardDisk - will be copied before using it to attach to the Virtual Machine. If - SourceImage is provided, the destination VirtualHardDisk should not exist. - :type image: - ~azure.mgmt.compute.v2016_04_30_preview.models.VirtualHardDisk - :param vhd_containers: The list of virtual hard disk container uris. - :type vhd_containers: list[str] - :param managed_disk: The managed disk parameters. - :type managed_disk: - ~azure.mgmt.compute.v2016_04_30_preview.models.VirtualMachineScaleSetManagedDiskParameters - """ - - _validation = { - 'create_option': {'required': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'caching': {'key': 'caching', 'type': 'CachingTypes'}, - 'create_option': {'key': 'createOption', 'type': 'DiskCreateOptionTypes'}, - 'os_type': {'key': 'osType', 'type': 'OperatingSystemTypes'}, - 'image': {'key': 'image', 'type': 'VirtualHardDisk'}, - 'vhd_containers': {'key': 'vhdContainers', 'type': '[str]'}, - 'managed_disk': {'key': 'managedDisk', 'type': 'VirtualMachineScaleSetManagedDiskParameters'}, - } - - def __init__(self, *, create_option, name: str=None, caching=None, os_type=None, image=None, vhd_containers=None, managed_disk=None, **kwargs) -> None: - super(VirtualMachineScaleSetOSDisk, self).__init__(**kwargs) - self.name = name - self.caching = caching - self.create_option = create_option - self.os_type = os_type - self.image = image - self.vhd_containers = vhd_containers - self.managed_disk = managed_disk diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/virtual_machine_scale_set_os_profile.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/virtual_machine_scale_set_os_profile.py deleted file mode 100644 index 2008a2f9bd71..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/virtual_machine_scale_set_os_profile.py +++ /dev/null @@ -1,84 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineScaleSetOSProfile(Model): - """Describes a virtual machine scale set OS profile. - - :param computer_name_prefix: Specifies the computer name prefix for all of - the virtual machines in the scale set. Computer name prefixes must be 1 to - 15 characters long. - :type computer_name_prefix: str - :param admin_username: Specifies the name of the administrator account. -

    **Windows-only restriction:** Cannot end in "."

    - **Disallowed values:** "administrator", "admin", "user", "user1", "test", - "user2", "test1", "user3", "admin1", "1", "123", "a", "actuser", "adm", - "admin2", "aspnet", "backup", "console", "david", "guest", "john", - "owner", "root", "server", "sql", "support", "support_388945a0", "sys", - "test2", "test3", "user4", "user5".

    **Minimum-length (Linux):** 1 - character

    **Max-length (Linux):** 64 characters

    - **Max-length (Windows):** 20 characters

  • For root access to - the Linux VM, see [Using root privileges on Linux virtual machines in - Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-use-root-privileges?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json)
  • - For a list of built-in system users on Linux that should not be used in - this field, see [Selecting User Names for Linux on - Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-usernames?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json) - :type admin_username: str - :param admin_password: Specifies the password of the administrator - account.

    **Minimum-length (Windows):** 8 characters

    - **Minimum-length (Linux):** 6 characters

    **Max-length - (Windows):** 123 characters

    **Max-length (Linux):** 72 characters -

    **Complexity requirements:** 3 out of 4 conditions below need to - be fulfilled
    Has lower characters
    Has upper characters
    Has a - digit
    Has a special character (Regex match [\\W_])

    - **Disallowed values:** "abc@123", "P@$$w0rd", "P@ssw0rd", "P@ssword123", - "Pa$$word", "pass@word1", "Password!", "Password1", "Password22", - "iloveyou!"

    For resetting the password, see [How to reset the - Remote Desktop service or its login password in a Windows - VM](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-reset-rdp?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json) -

    For resetting root password, see [Manage users, SSH, and check or - repair disks on Azure Linux VMs using the VMAccess - Extension](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-using-vmaccess-extension?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json#reset-root-password) - :type admin_password: str - :param custom_data: A base-64 encoded string of custom data. - :type custom_data: str - :param windows_configuration: The Windows Configuration of the OS profile. - :type windows_configuration: - ~azure.mgmt.compute.v2016_04_30_preview.models.WindowsConfiguration - :param linux_configuration: The Linux Configuration of the OS profile. - :type linux_configuration: - ~azure.mgmt.compute.v2016_04_30_preview.models.LinuxConfiguration - :param secrets: The List of certificates for addition to the VM. - :type secrets: - list[~azure.mgmt.compute.v2016_04_30_preview.models.VaultSecretGroup] - """ - - _attribute_map = { - 'computer_name_prefix': {'key': 'computerNamePrefix', 'type': 'str'}, - 'admin_username': {'key': 'adminUsername', 'type': 'str'}, - 'admin_password': {'key': 'adminPassword', 'type': 'str'}, - 'custom_data': {'key': 'customData', 'type': 'str'}, - 'windows_configuration': {'key': 'windowsConfiguration', 'type': 'WindowsConfiguration'}, - 'linux_configuration': {'key': 'linuxConfiguration', 'type': 'LinuxConfiguration'}, - 'secrets': {'key': 'secrets', 'type': '[VaultSecretGroup]'}, - } - - def __init__(self, **kwargs): - super(VirtualMachineScaleSetOSProfile, self).__init__(**kwargs) - self.computer_name_prefix = kwargs.get('computer_name_prefix', None) - self.admin_username = kwargs.get('admin_username', None) - self.admin_password = kwargs.get('admin_password', None) - self.custom_data = kwargs.get('custom_data', None) - self.windows_configuration = kwargs.get('windows_configuration', None) - self.linux_configuration = kwargs.get('linux_configuration', None) - self.secrets = kwargs.get('secrets', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/virtual_machine_scale_set_os_profile_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/virtual_machine_scale_set_os_profile_py3.py deleted file mode 100644 index 43dbcf5050f4..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/virtual_machine_scale_set_os_profile_py3.py +++ /dev/null @@ -1,84 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineScaleSetOSProfile(Model): - """Describes a virtual machine scale set OS profile. - - :param computer_name_prefix: Specifies the computer name prefix for all of - the virtual machines in the scale set. Computer name prefixes must be 1 to - 15 characters long. - :type computer_name_prefix: str - :param admin_username: Specifies the name of the administrator account. -

    **Windows-only restriction:** Cannot end in "."

    - **Disallowed values:** "administrator", "admin", "user", "user1", "test", - "user2", "test1", "user3", "admin1", "1", "123", "a", "actuser", "adm", - "admin2", "aspnet", "backup", "console", "david", "guest", "john", - "owner", "root", "server", "sql", "support", "support_388945a0", "sys", - "test2", "test3", "user4", "user5".

    **Minimum-length (Linux):** 1 - character

    **Max-length (Linux):** 64 characters

    - **Max-length (Windows):** 20 characters

  • For root access to - the Linux VM, see [Using root privileges on Linux virtual machines in - Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-use-root-privileges?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json)
  • - For a list of built-in system users on Linux that should not be used in - this field, see [Selecting User Names for Linux on - Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-usernames?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json) - :type admin_username: str - :param admin_password: Specifies the password of the administrator - account.

    **Minimum-length (Windows):** 8 characters

    - **Minimum-length (Linux):** 6 characters

    **Max-length - (Windows):** 123 characters

    **Max-length (Linux):** 72 characters -

    **Complexity requirements:** 3 out of 4 conditions below need to - be fulfilled
    Has lower characters
    Has upper characters
    Has a - digit
    Has a special character (Regex match [\\W_])

    - **Disallowed values:** "abc@123", "P@$$w0rd", "P@ssw0rd", "P@ssword123", - "Pa$$word", "pass@word1", "Password!", "Password1", "Password22", - "iloveyou!"

    For resetting the password, see [How to reset the - Remote Desktop service or its login password in a Windows - VM](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-reset-rdp?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json) -

    For resetting root password, see [Manage users, SSH, and check or - repair disks on Azure Linux VMs using the VMAccess - Extension](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-using-vmaccess-extension?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json#reset-root-password) - :type admin_password: str - :param custom_data: A base-64 encoded string of custom data. - :type custom_data: str - :param windows_configuration: The Windows Configuration of the OS profile. - :type windows_configuration: - ~azure.mgmt.compute.v2016_04_30_preview.models.WindowsConfiguration - :param linux_configuration: The Linux Configuration of the OS profile. - :type linux_configuration: - ~azure.mgmt.compute.v2016_04_30_preview.models.LinuxConfiguration - :param secrets: The List of certificates for addition to the VM. - :type secrets: - list[~azure.mgmt.compute.v2016_04_30_preview.models.VaultSecretGroup] - """ - - _attribute_map = { - 'computer_name_prefix': {'key': 'computerNamePrefix', 'type': 'str'}, - 'admin_username': {'key': 'adminUsername', 'type': 'str'}, - 'admin_password': {'key': 'adminPassword', 'type': 'str'}, - 'custom_data': {'key': 'customData', 'type': 'str'}, - 'windows_configuration': {'key': 'windowsConfiguration', 'type': 'WindowsConfiguration'}, - 'linux_configuration': {'key': 'linuxConfiguration', 'type': 'LinuxConfiguration'}, - 'secrets': {'key': 'secrets', 'type': '[VaultSecretGroup]'}, - } - - def __init__(self, *, computer_name_prefix: str=None, admin_username: str=None, admin_password: str=None, custom_data: str=None, windows_configuration=None, linux_configuration=None, secrets=None, **kwargs) -> None: - super(VirtualMachineScaleSetOSProfile, self).__init__(**kwargs) - self.computer_name_prefix = computer_name_prefix - self.admin_username = admin_username - self.admin_password = admin_password - self.custom_data = custom_data - self.windows_configuration = windows_configuration - self.linux_configuration = linux_configuration - self.secrets = secrets diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/virtual_machine_scale_set_paged.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/virtual_machine_scale_set_paged.py deleted file mode 100644 index 89ba43ba418b..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/virtual_machine_scale_set_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class VirtualMachineScaleSetPaged(Paged): - """ - A paging container for iterating over a list of :class:`VirtualMachineScaleSet ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[VirtualMachineScaleSet]'} - } - - def __init__(self, *args, **kwargs): - - super(VirtualMachineScaleSetPaged, self).__init__(*args, **kwargs) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/virtual_machine_scale_set_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/virtual_machine_scale_set_py3.py deleted file mode 100644 index a20bbbcba30a..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/virtual_machine_scale_set_py3.py +++ /dev/null @@ -1,97 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource_py3 import Resource - - -class VirtualMachineScaleSet(Resource): - """Describes a Virtual Machine Scale Set. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource Id - :vartype id: str - :ivar name: Resource name - :vartype name: str - :ivar type: Resource type - :vartype type: str - :param location: Required. Resource location - :type location: str - :param tags: Resource tags - :type tags: dict[str, str] - :param sku: The virtual machine scale set sku. - :type sku: ~azure.mgmt.compute.v2016_04_30_preview.models.Sku - :param plan: Specifies information about the marketplace image used to - create the virtual machine. This element is only used for marketplace - images. Before you can use a marketplace image from an API, you must - enable the image for programmatic use. In the Azure portal, find the - marketplace image that you want to use and then click **Want to deploy - programmatically, Get Started ->**. Enter any required information and - then click **Save**. - :type plan: ~azure.mgmt.compute.v2016_04_30_preview.models.Plan - :param upgrade_policy: The upgrade policy. - :type upgrade_policy: - ~azure.mgmt.compute.v2016_04_30_preview.models.UpgradePolicy - :param virtual_machine_profile: The virtual machine profile. - :type virtual_machine_profile: - ~azure.mgmt.compute.v2016_04_30_preview.models.VirtualMachineScaleSetVMProfile - :ivar provisioning_state: The provisioning state, which only appears in - the response. - :vartype provisioning_state: str - :param over_provision: Specifies whether the Virtual Machine Scale Set - should be overprovisioned. - :type over_provision: bool - :param single_placement_group: When true this limits the scale set to a - single placement group, of max size 100 virtual machines. - :type single_placement_group: bool - :param identity: The identity of the virtual machine scale set, if - configured. - :type identity: - ~azure.mgmt.compute.v2016_04_30_preview.models.VirtualMachineScaleSetIdentity - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - 'provisioning_state': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'sku': {'key': 'sku', 'type': 'Sku'}, - 'plan': {'key': 'plan', 'type': 'Plan'}, - 'upgrade_policy': {'key': 'properties.upgradePolicy', 'type': 'UpgradePolicy'}, - 'virtual_machine_profile': {'key': 'properties.virtualMachineProfile', 'type': 'VirtualMachineScaleSetVMProfile'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'over_provision': {'key': 'properties.overProvision', 'type': 'bool'}, - 'single_placement_group': {'key': 'properties.singlePlacementGroup', 'type': 'bool'}, - 'identity': {'key': 'identity', 'type': 'VirtualMachineScaleSetIdentity'}, - } - - def __init__(self, *, location: str, tags=None, sku=None, plan=None, upgrade_policy=None, virtual_machine_profile=None, over_provision: bool=None, single_placement_group: bool=None, identity=None, **kwargs) -> None: - super(VirtualMachineScaleSet, self).__init__(location=location, tags=tags, **kwargs) - self.sku = sku - self.plan = plan - self.upgrade_policy = upgrade_policy - self.virtual_machine_profile = virtual_machine_profile - self.provisioning_state = None - self.over_provision = over_provision - self.single_placement_group = single_placement_group - self.identity = identity diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/virtual_machine_scale_set_sku.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/virtual_machine_scale_set_sku.py deleted file mode 100644 index 55dc4909fc9f..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/virtual_machine_scale_set_sku.py +++ /dev/null @@ -1,46 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineScaleSetSku(Model): - """Describes an available virtual machine scale set sku. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar resource_type: The type of resource the sku applies to. - :vartype resource_type: str - :ivar sku: The Sku. - :vartype sku: ~azure.mgmt.compute.v2016_04_30_preview.models.Sku - :ivar capacity: Specifies the number of virtual machines in the scale set. - :vartype capacity: - ~azure.mgmt.compute.v2016_04_30_preview.models.VirtualMachineScaleSetSkuCapacity - """ - - _validation = { - 'resource_type': {'readonly': True}, - 'sku': {'readonly': True}, - 'capacity': {'readonly': True}, - } - - _attribute_map = { - 'resource_type': {'key': 'resourceType', 'type': 'str'}, - 'sku': {'key': 'sku', 'type': 'Sku'}, - 'capacity': {'key': 'capacity', 'type': 'VirtualMachineScaleSetSkuCapacity'}, - } - - def __init__(self, **kwargs): - super(VirtualMachineScaleSetSku, self).__init__(**kwargs) - self.resource_type = None - self.sku = None - self.capacity = None diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/virtual_machine_scale_set_sku_capacity.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/virtual_machine_scale_set_sku_capacity.py deleted file mode 100644 index 32f1d5fcd5a9..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/virtual_machine_scale_set_sku_capacity.py +++ /dev/null @@ -1,52 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineScaleSetSkuCapacity(Model): - """Describes scaling information of a sku. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar minimum: The minimum capacity. - :vartype minimum: long - :ivar maximum: The maximum capacity that can be set. - :vartype maximum: long - :ivar default_capacity: The default capacity. - :vartype default_capacity: long - :ivar scale_type: The scale type applicable to the sku. Possible values - include: 'Automatic', 'None' - :vartype scale_type: str or - ~azure.mgmt.compute.v2016_04_30_preview.models.VirtualMachineScaleSetSkuScaleType - """ - - _validation = { - 'minimum': {'readonly': True}, - 'maximum': {'readonly': True}, - 'default_capacity': {'readonly': True}, - 'scale_type': {'readonly': True}, - } - - _attribute_map = { - 'minimum': {'key': 'minimum', 'type': 'long'}, - 'maximum': {'key': 'maximum', 'type': 'long'}, - 'default_capacity': {'key': 'defaultCapacity', 'type': 'long'}, - 'scale_type': {'key': 'scaleType', 'type': 'VirtualMachineScaleSetSkuScaleType'}, - } - - def __init__(self, **kwargs): - super(VirtualMachineScaleSetSkuCapacity, self).__init__(**kwargs) - self.minimum = None - self.maximum = None - self.default_capacity = None - self.scale_type = None diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/virtual_machine_scale_set_sku_capacity_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/virtual_machine_scale_set_sku_capacity_py3.py deleted file mode 100644 index 30476ad800b0..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/virtual_machine_scale_set_sku_capacity_py3.py +++ /dev/null @@ -1,52 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineScaleSetSkuCapacity(Model): - """Describes scaling information of a sku. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar minimum: The minimum capacity. - :vartype minimum: long - :ivar maximum: The maximum capacity that can be set. - :vartype maximum: long - :ivar default_capacity: The default capacity. - :vartype default_capacity: long - :ivar scale_type: The scale type applicable to the sku. Possible values - include: 'Automatic', 'None' - :vartype scale_type: str or - ~azure.mgmt.compute.v2016_04_30_preview.models.VirtualMachineScaleSetSkuScaleType - """ - - _validation = { - 'minimum': {'readonly': True}, - 'maximum': {'readonly': True}, - 'default_capacity': {'readonly': True}, - 'scale_type': {'readonly': True}, - } - - _attribute_map = { - 'minimum': {'key': 'minimum', 'type': 'long'}, - 'maximum': {'key': 'maximum', 'type': 'long'}, - 'default_capacity': {'key': 'defaultCapacity', 'type': 'long'}, - 'scale_type': {'key': 'scaleType', 'type': 'VirtualMachineScaleSetSkuScaleType'}, - } - - def __init__(self, **kwargs) -> None: - super(VirtualMachineScaleSetSkuCapacity, self).__init__(**kwargs) - self.minimum = None - self.maximum = None - self.default_capacity = None - self.scale_type = None diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/virtual_machine_scale_set_sku_paged.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/virtual_machine_scale_set_sku_paged.py deleted file mode 100644 index 5901f279d9d4..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/virtual_machine_scale_set_sku_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class VirtualMachineScaleSetSkuPaged(Paged): - """ - A paging container for iterating over a list of :class:`VirtualMachineScaleSetSku ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[VirtualMachineScaleSetSku]'} - } - - def __init__(self, *args, **kwargs): - - super(VirtualMachineScaleSetSkuPaged, self).__init__(*args, **kwargs) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/virtual_machine_scale_set_sku_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/virtual_machine_scale_set_sku_py3.py deleted file mode 100644 index 8811dfc92e85..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/virtual_machine_scale_set_sku_py3.py +++ /dev/null @@ -1,46 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineScaleSetSku(Model): - """Describes an available virtual machine scale set sku. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar resource_type: The type of resource the sku applies to. - :vartype resource_type: str - :ivar sku: The Sku. - :vartype sku: ~azure.mgmt.compute.v2016_04_30_preview.models.Sku - :ivar capacity: Specifies the number of virtual machines in the scale set. - :vartype capacity: - ~azure.mgmt.compute.v2016_04_30_preview.models.VirtualMachineScaleSetSkuCapacity - """ - - _validation = { - 'resource_type': {'readonly': True}, - 'sku': {'readonly': True}, - 'capacity': {'readonly': True}, - } - - _attribute_map = { - 'resource_type': {'key': 'resourceType', 'type': 'str'}, - 'sku': {'key': 'sku', 'type': 'Sku'}, - 'capacity': {'key': 'capacity', 'type': 'VirtualMachineScaleSetSkuCapacity'}, - } - - def __init__(self, **kwargs) -> None: - super(VirtualMachineScaleSetSku, self).__init__(**kwargs) - self.resource_type = None - self.sku = None - self.capacity = None diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/virtual_machine_scale_set_storage_profile.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/virtual_machine_scale_set_storage_profile.py deleted file mode 100644 index 4cd0466e4685..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/virtual_machine_scale_set_storage_profile.py +++ /dev/null @@ -1,39 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineScaleSetStorageProfile(Model): - """Describes a virtual machine scale set storage profile. - - :param image_reference: The image reference. - :type image_reference: - ~azure.mgmt.compute.v2016_04_30_preview.models.ImageReference - :param os_disk: The OS disk. - :type os_disk: - ~azure.mgmt.compute.v2016_04_30_preview.models.VirtualMachineScaleSetOSDisk - :param data_disks: The data disks. - :type data_disks: - list[~azure.mgmt.compute.v2016_04_30_preview.models.VirtualMachineScaleSetDataDisk] - """ - - _attribute_map = { - 'image_reference': {'key': 'imageReference', 'type': 'ImageReference'}, - 'os_disk': {'key': 'osDisk', 'type': 'VirtualMachineScaleSetOSDisk'}, - 'data_disks': {'key': 'dataDisks', 'type': '[VirtualMachineScaleSetDataDisk]'}, - } - - def __init__(self, **kwargs): - super(VirtualMachineScaleSetStorageProfile, self).__init__(**kwargs) - self.image_reference = kwargs.get('image_reference', None) - self.os_disk = kwargs.get('os_disk', None) - self.data_disks = kwargs.get('data_disks', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/virtual_machine_scale_set_storage_profile_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/virtual_machine_scale_set_storage_profile_py3.py deleted file mode 100644 index c57a42c0aca6..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/virtual_machine_scale_set_storage_profile_py3.py +++ /dev/null @@ -1,39 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineScaleSetStorageProfile(Model): - """Describes a virtual machine scale set storage profile. - - :param image_reference: The image reference. - :type image_reference: - ~azure.mgmt.compute.v2016_04_30_preview.models.ImageReference - :param os_disk: The OS disk. - :type os_disk: - ~azure.mgmt.compute.v2016_04_30_preview.models.VirtualMachineScaleSetOSDisk - :param data_disks: The data disks. - :type data_disks: - list[~azure.mgmt.compute.v2016_04_30_preview.models.VirtualMachineScaleSetDataDisk] - """ - - _attribute_map = { - 'image_reference': {'key': 'imageReference', 'type': 'ImageReference'}, - 'os_disk': {'key': 'osDisk', 'type': 'VirtualMachineScaleSetOSDisk'}, - 'data_disks': {'key': 'dataDisks', 'type': '[VirtualMachineScaleSetDataDisk]'}, - } - - def __init__(self, *, image_reference=None, os_disk=None, data_disks=None, **kwargs) -> None: - super(VirtualMachineScaleSetStorageProfile, self).__init__(**kwargs) - self.image_reference = image_reference - self.os_disk = os_disk - self.data_disks = data_disks diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/virtual_machine_scale_set_vm.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/virtual_machine_scale_set_vm.py deleted file mode 100644 index 35e64891a934..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/virtual_machine_scale_set_vm.py +++ /dev/null @@ -1,156 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource import Resource - - -class VirtualMachineScaleSetVM(Resource): - """Describes a virtual machine scale set virtual machine. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource Id - :vartype id: str - :ivar name: Resource name - :vartype name: str - :ivar type: Resource type - :vartype type: str - :param location: Required. Resource location - :type location: str - :param tags: Resource tags - :type tags: dict[str, str] - :ivar instance_id: The virtual machine instance ID. - :vartype instance_id: str - :ivar sku: The virtual machine SKU. - :vartype sku: ~azure.mgmt.compute.v2016_04_30_preview.models.Sku - :ivar latest_model_applied: Specifies whether the latest model has been - applied to the virtual machine. - :vartype latest_model_applied: bool - :ivar vm_id: Azure VM unique ID. - :vartype vm_id: str - :ivar instance_view: The virtual machine instance view. - :vartype instance_view: - ~azure.mgmt.compute.v2016_04_30_preview.models.VirtualMachineScaleSetVMInstanceView - :param hardware_profile: Specifies the hardware settings for the virtual - machine. - :type hardware_profile: - ~azure.mgmt.compute.v2016_04_30_preview.models.HardwareProfile - :param storage_profile: Specifies the storage settings for the virtual - machine disks. - :type storage_profile: - ~azure.mgmt.compute.v2016_04_30_preview.models.StorageProfile - :param os_profile: Specifies the operating system settings for the virtual - machine. - :type os_profile: ~azure.mgmt.compute.v2016_04_30_preview.models.OSProfile - :param network_profile: Specifies the network interfaces of the virtual - machine. - :type network_profile: - ~azure.mgmt.compute.v2016_04_30_preview.models.NetworkProfile - :param diagnostics_profile: Specifies the boot diagnostic settings state. -

    Minimum api-version: 2015-06-15. - :type diagnostics_profile: - ~azure.mgmt.compute.v2016_04_30_preview.models.DiagnosticsProfile - :param availability_set: Specifies information about the availability set - that the virtual machine should be assigned to. Virtual machines specified - in the same availability set are allocated to different nodes to maximize - availability. For more information about availability sets, see [Manage - the availability of virtual - machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-manage-availability?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). -

    For more information on Azure planned maintenance, see [Planned - maintenance for virtual machines in - Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-planned-maintenance?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json) -

    Currently, a VM can only be added to availability set at creation - time. An existing VM cannot be added to an availability set. - :type availability_set: - ~azure.mgmt.compute.v2016_04_30_preview.models.SubResource - :ivar provisioning_state: The provisioning state, which only appears in - the response. - :vartype provisioning_state: str - :param license_type: Specifies that the image or disk that is being used - was licensed on-premises. This element is only used for images that - contain the Windows Server operating system.

    Possible values are: -

    Windows_Client

    Windows_Server

    If this element - is included in a request for an update, the value must match the initial - value. This value cannot be updated.

    For more information, see - [Azure Hybrid Use Benefit for Windows - Server](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-hybrid-use-benefit-licensing?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json) -

    Minimum api-version: 2015-06-15 - :type license_type: str - :param plan: Specifies information about the marketplace image used to - create the virtual machine. This element is only used for marketplace - images. Before you can use a marketplace image from an API, you must - enable the image for programmatic use. In the Azure portal, find the - marketplace image that you want to use and then click **Want to deploy - programmatically, Get Started ->**. Enter any required information and - then click **Save**. - :type plan: ~azure.mgmt.compute.v2016_04_30_preview.models.Plan - :ivar resources: The virtual machine child extension resources. - :vartype resources: - list[~azure.mgmt.compute.v2016_04_30_preview.models.VirtualMachineExtension] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - 'instance_id': {'readonly': True}, - 'sku': {'readonly': True}, - 'latest_model_applied': {'readonly': True}, - 'vm_id': {'readonly': True}, - 'instance_view': {'readonly': True}, - 'provisioning_state': {'readonly': True}, - 'resources': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'instance_id': {'key': 'instanceId', 'type': 'str'}, - 'sku': {'key': 'sku', 'type': 'Sku'}, - 'latest_model_applied': {'key': 'properties.latestModelApplied', 'type': 'bool'}, - 'vm_id': {'key': 'properties.vmId', 'type': 'str'}, - 'instance_view': {'key': 'properties.instanceView', 'type': 'VirtualMachineScaleSetVMInstanceView'}, - 'hardware_profile': {'key': 'properties.hardwareProfile', 'type': 'HardwareProfile'}, - 'storage_profile': {'key': 'properties.storageProfile', 'type': 'StorageProfile'}, - 'os_profile': {'key': 'properties.osProfile', 'type': 'OSProfile'}, - 'network_profile': {'key': 'properties.networkProfile', 'type': 'NetworkProfile'}, - 'diagnostics_profile': {'key': 'properties.diagnosticsProfile', 'type': 'DiagnosticsProfile'}, - 'availability_set': {'key': 'properties.availabilitySet', 'type': 'SubResource'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'license_type': {'key': 'properties.licenseType', 'type': 'str'}, - 'plan': {'key': 'plan', 'type': 'Plan'}, - 'resources': {'key': 'resources', 'type': '[VirtualMachineExtension]'}, - } - - def __init__(self, **kwargs): - super(VirtualMachineScaleSetVM, self).__init__(**kwargs) - self.instance_id = None - self.sku = None - self.latest_model_applied = None - self.vm_id = None - self.instance_view = None - self.hardware_profile = kwargs.get('hardware_profile', None) - self.storage_profile = kwargs.get('storage_profile', None) - self.os_profile = kwargs.get('os_profile', None) - self.network_profile = kwargs.get('network_profile', None) - self.diagnostics_profile = kwargs.get('diagnostics_profile', None) - self.availability_set = kwargs.get('availability_set', None) - self.provisioning_state = None - self.license_type = kwargs.get('license_type', None) - self.plan = kwargs.get('plan', None) - self.resources = None diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/virtual_machine_scale_set_vm_extensions_summary.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/virtual_machine_scale_set_vm_extensions_summary.py deleted file mode 100644 index 9f487b98ca78..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/virtual_machine_scale_set_vm_extensions_summary.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineScaleSetVMExtensionsSummary(Model): - """Extensions summary for virtual machines of a virtual machine scale set. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar name: The extension name. - :vartype name: str - :ivar statuses_summary: The extensions information. - :vartype statuses_summary: - list[~azure.mgmt.compute.v2016_04_30_preview.models.VirtualMachineStatusCodeCount] - """ - - _validation = { - 'name': {'readonly': True}, - 'statuses_summary': {'readonly': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'statuses_summary': {'key': 'statusesSummary', 'type': '[VirtualMachineStatusCodeCount]'}, - } - - def __init__(self, **kwargs): - super(VirtualMachineScaleSetVMExtensionsSummary, self).__init__(**kwargs) - self.name = None - self.statuses_summary = None diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/virtual_machine_scale_set_vm_extensions_summary_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/virtual_machine_scale_set_vm_extensions_summary_py3.py deleted file mode 100644 index ad719a30e3c7..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/virtual_machine_scale_set_vm_extensions_summary_py3.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineScaleSetVMExtensionsSummary(Model): - """Extensions summary for virtual machines of a virtual machine scale set. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar name: The extension name. - :vartype name: str - :ivar statuses_summary: The extensions information. - :vartype statuses_summary: - list[~azure.mgmt.compute.v2016_04_30_preview.models.VirtualMachineStatusCodeCount] - """ - - _validation = { - 'name': {'readonly': True}, - 'statuses_summary': {'readonly': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'statuses_summary': {'key': 'statusesSummary', 'type': '[VirtualMachineStatusCodeCount]'}, - } - - def __init__(self, **kwargs) -> None: - super(VirtualMachineScaleSetVMExtensionsSummary, self).__init__(**kwargs) - self.name = None - self.statuses_summary = None diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/virtual_machine_scale_set_vm_instance_ids.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/virtual_machine_scale_set_vm_instance_ids.py deleted file mode 100644 index 772c66dad326..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/virtual_machine_scale_set_vm_instance_ids.py +++ /dev/null @@ -1,30 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineScaleSetVMInstanceIDs(Model): - """Specifies a list of virtual machine instance IDs from the VM scale set. - - :param instance_ids: The virtual machine scale set instance ids. Omitting - the virtual machine scale set instance ids will result in the operation - being performed on all virtual machines in the virtual machine scale set. - :type instance_ids: list[str] - """ - - _attribute_map = { - 'instance_ids': {'key': 'instanceIds', 'type': '[str]'}, - } - - def __init__(self, **kwargs): - super(VirtualMachineScaleSetVMInstanceIDs, self).__init__(**kwargs) - self.instance_ids = kwargs.get('instance_ids', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/virtual_machine_scale_set_vm_instance_ids_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/virtual_machine_scale_set_vm_instance_ids_py3.py deleted file mode 100644 index 658a8ccb87d5..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/virtual_machine_scale_set_vm_instance_ids_py3.py +++ /dev/null @@ -1,30 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineScaleSetVMInstanceIDs(Model): - """Specifies a list of virtual machine instance IDs from the VM scale set. - - :param instance_ids: The virtual machine scale set instance ids. Omitting - the virtual machine scale set instance ids will result in the operation - being performed on all virtual machines in the virtual machine scale set. - :type instance_ids: list[str] - """ - - _attribute_map = { - 'instance_ids': {'key': 'instanceIds', 'type': '[str]'}, - } - - def __init__(self, *, instance_ids=None, **kwargs) -> None: - super(VirtualMachineScaleSetVMInstanceIDs, self).__init__(**kwargs) - self.instance_ids = instance_ids diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/virtual_machine_scale_set_vm_instance_required_ids.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/virtual_machine_scale_set_vm_instance_required_ids.py deleted file mode 100644 index ece250dd4fd4..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/virtual_machine_scale_set_vm_instance_required_ids.py +++ /dev/null @@ -1,34 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineScaleSetVMInstanceRequiredIDs(Model): - """Specifies a list of virtual machine instance IDs from the VM scale set. - - All required parameters must be populated in order to send to Azure. - - :param instance_ids: Required. The virtual machine scale set instance ids. - :type instance_ids: list[str] - """ - - _validation = { - 'instance_ids': {'required': True}, - } - - _attribute_map = { - 'instance_ids': {'key': 'instanceIds', 'type': '[str]'}, - } - - def __init__(self, **kwargs): - super(VirtualMachineScaleSetVMInstanceRequiredIDs, self).__init__(**kwargs) - self.instance_ids = kwargs.get('instance_ids', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/virtual_machine_scale_set_vm_instance_required_ids_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/virtual_machine_scale_set_vm_instance_required_ids_py3.py deleted file mode 100644 index f32c6181467d..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/virtual_machine_scale_set_vm_instance_required_ids_py3.py +++ /dev/null @@ -1,34 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineScaleSetVMInstanceRequiredIDs(Model): - """Specifies a list of virtual machine instance IDs from the VM scale set. - - All required parameters must be populated in order to send to Azure. - - :param instance_ids: Required. The virtual machine scale set instance ids. - :type instance_ids: list[str] - """ - - _validation = { - 'instance_ids': {'required': True}, - } - - _attribute_map = { - 'instance_ids': {'key': 'instanceIds', 'type': '[str]'}, - } - - def __init__(self, *, instance_ids, **kwargs) -> None: - super(VirtualMachineScaleSetVMInstanceRequiredIDs, self).__init__(**kwargs) - self.instance_ids = instance_ids diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/virtual_machine_scale_set_vm_instance_view.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/virtual_machine_scale_set_vm_instance_view.py deleted file mode 100644 index 29157262456f..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/virtual_machine_scale_set_vm_instance_view.py +++ /dev/null @@ -1,69 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineScaleSetVMInstanceView(Model): - """The instance view of a virtual machine scale set VM. - - :param platform_update_domain: The Update Domain count. - :type platform_update_domain: int - :param platform_fault_domain: The Fault Domain count. - :type platform_fault_domain: int - :param rdp_thumb_print: The Remote desktop certificate thumbprint. - :type rdp_thumb_print: str - :param vm_agent: The VM Agent running on the virtual machine. - :type vm_agent: - ~azure.mgmt.compute.v2016_04_30_preview.models.VirtualMachineAgentInstanceView - :param disks: The disks information. - :type disks: - list[~azure.mgmt.compute.v2016_04_30_preview.models.DiskInstanceView] - :param extensions: The extensions information. - :type extensions: - list[~azure.mgmt.compute.v2016_04_30_preview.models.VirtualMachineExtensionInstanceView] - :param boot_diagnostics: Boot Diagnostics is a debugging feature which - allows you to view Console Output and Screenshot to diagnose VM status. -

    You can easily view the output of your console log.

    - Azure also enables you to see a screenshot of the VM from the hypervisor. - :type boot_diagnostics: - ~azure.mgmt.compute.v2016_04_30_preview.models.BootDiagnosticsInstanceView - :param statuses: The resource status information. - :type statuses: - list[~azure.mgmt.compute.v2016_04_30_preview.models.InstanceViewStatus] - :param placement_group_id: The placement group in which the VM is running. - If the VM is deallocated it will not have a placementGroupId. - :type placement_group_id: str - """ - - _attribute_map = { - 'platform_update_domain': {'key': 'platformUpdateDomain', 'type': 'int'}, - 'platform_fault_domain': {'key': 'platformFaultDomain', 'type': 'int'}, - 'rdp_thumb_print': {'key': 'rdpThumbPrint', 'type': 'str'}, - 'vm_agent': {'key': 'vmAgent', 'type': 'VirtualMachineAgentInstanceView'}, - 'disks': {'key': 'disks', 'type': '[DiskInstanceView]'}, - 'extensions': {'key': 'extensions', 'type': '[VirtualMachineExtensionInstanceView]'}, - 'boot_diagnostics': {'key': 'bootDiagnostics', 'type': 'BootDiagnosticsInstanceView'}, - 'statuses': {'key': 'statuses', 'type': '[InstanceViewStatus]'}, - 'placement_group_id': {'key': 'placementGroupId', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(VirtualMachineScaleSetVMInstanceView, self).__init__(**kwargs) - self.platform_update_domain = kwargs.get('platform_update_domain', None) - self.platform_fault_domain = kwargs.get('platform_fault_domain', None) - self.rdp_thumb_print = kwargs.get('rdp_thumb_print', None) - self.vm_agent = kwargs.get('vm_agent', None) - self.disks = kwargs.get('disks', None) - self.extensions = kwargs.get('extensions', None) - self.boot_diagnostics = kwargs.get('boot_diagnostics', None) - self.statuses = kwargs.get('statuses', None) - self.placement_group_id = kwargs.get('placement_group_id', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/virtual_machine_scale_set_vm_instance_view_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/virtual_machine_scale_set_vm_instance_view_py3.py deleted file mode 100644 index e7cd124f4320..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/virtual_machine_scale_set_vm_instance_view_py3.py +++ /dev/null @@ -1,69 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineScaleSetVMInstanceView(Model): - """The instance view of a virtual machine scale set VM. - - :param platform_update_domain: The Update Domain count. - :type platform_update_domain: int - :param platform_fault_domain: The Fault Domain count. - :type platform_fault_domain: int - :param rdp_thumb_print: The Remote desktop certificate thumbprint. - :type rdp_thumb_print: str - :param vm_agent: The VM Agent running on the virtual machine. - :type vm_agent: - ~azure.mgmt.compute.v2016_04_30_preview.models.VirtualMachineAgentInstanceView - :param disks: The disks information. - :type disks: - list[~azure.mgmt.compute.v2016_04_30_preview.models.DiskInstanceView] - :param extensions: The extensions information. - :type extensions: - list[~azure.mgmt.compute.v2016_04_30_preview.models.VirtualMachineExtensionInstanceView] - :param boot_diagnostics: Boot Diagnostics is a debugging feature which - allows you to view Console Output and Screenshot to diagnose VM status. -

    You can easily view the output of your console log.

    - Azure also enables you to see a screenshot of the VM from the hypervisor. - :type boot_diagnostics: - ~azure.mgmt.compute.v2016_04_30_preview.models.BootDiagnosticsInstanceView - :param statuses: The resource status information. - :type statuses: - list[~azure.mgmt.compute.v2016_04_30_preview.models.InstanceViewStatus] - :param placement_group_id: The placement group in which the VM is running. - If the VM is deallocated it will not have a placementGroupId. - :type placement_group_id: str - """ - - _attribute_map = { - 'platform_update_domain': {'key': 'platformUpdateDomain', 'type': 'int'}, - 'platform_fault_domain': {'key': 'platformFaultDomain', 'type': 'int'}, - 'rdp_thumb_print': {'key': 'rdpThumbPrint', 'type': 'str'}, - 'vm_agent': {'key': 'vmAgent', 'type': 'VirtualMachineAgentInstanceView'}, - 'disks': {'key': 'disks', 'type': '[DiskInstanceView]'}, - 'extensions': {'key': 'extensions', 'type': '[VirtualMachineExtensionInstanceView]'}, - 'boot_diagnostics': {'key': 'bootDiagnostics', 'type': 'BootDiagnosticsInstanceView'}, - 'statuses': {'key': 'statuses', 'type': '[InstanceViewStatus]'}, - 'placement_group_id': {'key': 'placementGroupId', 'type': 'str'}, - } - - def __init__(self, *, platform_update_domain: int=None, platform_fault_domain: int=None, rdp_thumb_print: str=None, vm_agent=None, disks=None, extensions=None, boot_diagnostics=None, statuses=None, placement_group_id: str=None, **kwargs) -> None: - super(VirtualMachineScaleSetVMInstanceView, self).__init__(**kwargs) - self.platform_update_domain = platform_update_domain - self.platform_fault_domain = platform_fault_domain - self.rdp_thumb_print = rdp_thumb_print - self.vm_agent = vm_agent - self.disks = disks - self.extensions = extensions - self.boot_diagnostics = boot_diagnostics - self.statuses = statuses - self.placement_group_id = placement_group_id diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/virtual_machine_scale_set_vm_paged.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/virtual_machine_scale_set_vm_paged.py deleted file mode 100644 index ec8d2ccd6316..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/virtual_machine_scale_set_vm_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class VirtualMachineScaleSetVMPaged(Paged): - """ - A paging container for iterating over a list of :class:`VirtualMachineScaleSetVM ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[VirtualMachineScaleSetVM]'} - } - - def __init__(self, *args, **kwargs): - - super(VirtualMachineScaleSetVMPaged, self).__init__(*args, **kwargs) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/virtual_machine_scale_set_vm_profile.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/virtual_machine_scale_set_vm_profile.py deleted file mode 100644 index 433e67fd340a..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/virtual_machine_scale_set_vm_profile.py +++ /dev/null @@ -1,44 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineScaleSetVMProfile(Model): - """Describes a virtual machine scale set virtual machine profile. - - :param os_profile: The virtual machine scale set OS profile. - :type os_profile: - ~azure.mgmt.compute.v2016_04_30_preview.models.VirtualMachineScaleSetOSProfile - :param storage_profile: The virtual machine scale set storage profile. - :type storage_profile: - ~azure.mgmt.compute.v2016_04_30_preview.models.VirtualMachineScaleSetStorageProfile - :param network_profile: The virtual machine scale set network profile. - :type network_profile: - ~azure.mgmt.compute.v2016_04_30_preview.models.VirtualMachineScaleSetNetworkProfile - :param extension_profile: The virtual machine scale set extension profile. - :type extension_profile: - ~azure.mgmt.compute.v2016_04_30_preview.models.VirtualMachineScaleSetExtensionProfile - """ - - _attribute_map = { - 'os_profile': {'key': 'osProfile', 'type': 'VirtualMachineScaleSetOSProfile'}, - 'storage_profile': {'key': 'storageProfile', 'type': 'VirtualMachineScaleSetStorageProfile'}, - 'network_profile': {'key': 'networkProfile', 'type': 'VirtualMachineScaleSetNetworkProfile'}, - 'extension_profile': {'key': 'extensionProfile', 'type': 'VirtualMachineScaleSetExtensionProfile'}, - } - - def __init__(self, **kwargs): - super(VirtualMachineScaleSetVMProfile, self).__init__(**kwargs) - self.os_profile = kwargs.get('os_profile', None) - self.storage_profile = kwargs.get('storage_profile', None) - self.network_profile = kwargs.get('network_profile', None) - self.extension_profile = kwargs.get('extension_profile', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/virtual_machine_scale_set_vm_profile_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/virtual_machine_scale_set_vm_profile_py3.py deleted file mode 100644 index 4ad7899f9632..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/virtual_machine_scale_set_vm_profile_py3.py +++ /dev/null @@ -1,44 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineScaleSetVMProfile(Model): - """Describes a virtual machine scale set virtual machine profile. - - :param os_profile: The virtual machine scale set OS profile. - :type os_profile: - ~azure.mgmt.compute.v2016_04_30_preview.models.VirtualMachineScaleSetOSProfile - :param storage_profile: The virtual machine scale set storage profile. - :type storage_profile: - ~azure.mgmt.compute.v2016_04_30_preview.models.VirtualMachineScaleSetStorageProfile - :param network_profile: The virtual machine scale set network profile. - :type network_profile: - ~azure.mgmt.compute.v2016_04_30_preview.models.VirtualMachineScaleSetNetworkProfile - :param extension_profile: The virtual machine scale set extension profile. - :type extension_profile: - ~azure.mgmt.compute.v2016_04_30_preview.models.VirtualMachineScaleSetExtensionProfile - """ - - _attribute_map = { - 'os_profile': {'key': 'osProfile', 'type': 'VirtualMachineScaleSetOSProfile'}, - 'storage_profile': {'key': 'storageProfile', 'type': 'VirtualMachineScaleSetStorageProfile'}, - 'network_profile': {'key': 'networkProfile', 'type': 'VirtualMachineScaleSetNetworkProfile'}, - 'extension_profile': {'key': 'extensionProfile', 'type': 'VirtualMachineScaleSetExtensionProfile'}, - } - - def __init__(self, *, os_profile=None, storage_profile=None, network_profile=None, extension_profile=None, **kwargs) -> None: - super(VirtualMachineScaleSetVMProfile, self).__init__(**kwargs) - self.os_profile = os_profile - self.storage_profile = storage_profile - self.network_profile = network_profile - self.extension_profile = extension_profile diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/virtual_machine_scale_set_vm_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/virtual_machine_scale_set_vm_py3.py deleted file mode 100644 index b7738afed02b..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/virtual_machine_scale_set_vm_py3.py +++ /dev/null @@ -1,156 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource_py3 import Resource - - -class VirtualMachineScaleSetVM(Resource): - """Describes a virtual machine scale set virtual machine. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource Id - :vartype id: str - :ivar name: Resource name - :vartype name: str - :ivar type: Resource type - :vartype type: str - :param location: Required. Resource location - :type location: str - :param tags: Resource tags - :type tags: dict[str, str] - :ivar instance_id: The virtual machine instance ID. - :vartype instance_id: str - :ivar sku: The virtual machine SKU. - :vartype sku: ~azure.mgmt.compute.v2016_04_30_preview.models.Sku - :ivar latest_model_applied: Specifies whether the latest model has been - applied to the virtual machine. - :vartype latest_model_applied: bool - :ivar vm_id: Azure VM unique ID. - :vartype vm_id: str - :ivar instance_view: The virtual machine instance view. - :vartype instance_view: - ~azure.mgmt.compute.v2016_04_30_preview.models.VirtualMachineScaleSetVMInstanceView - :param hardware_profile: Specifies the hardware settings for the virtual - machine. - :type hardware_profile: - ~azure.mgmt.compute.v2016_04_30_preview.models.HardwareProfile - :param storage_profile: Specifies the storage settings for the virtual - machine disks. - :type storage_profile: - ~azure.mgmt.compute.v2016_04_30_preview.models.StorageProfile - :param os_profile: Specifies the operating system settings for the virtual - machine. - :type os_profile: ~azure.mgmt.compute.v2016_04_30_preview.models.OSProfile - :param network_profile: Specifies the network interfaces of the virtual - machine. - :type network_profile: - ~azure.mgmt.compute.v2016_04_30_preview.models.NetworkProfile - :param diagnostics_profile: Specifies the boot diagnostic settings state. -

    Minimum api-version: 2015-06-15. - :type diagnostics_profile: - ~azure.mgmt.compute.v2016_04_30_preview.models.DiagnosticsProfile - :param availability_set: Specifies information about the availability set - that the virtual machine should be assigned to. Virtual machines specified - in the same availability set are allocated to different nodes to maximize - availability. For more information about availability sets, see [Manage - the availability of virtual - machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-manage-availability?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). -

    For more information on Azure planned maintenance, see [Planned - maintenance for virtual machines in - Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-planned-maintenance?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json) -

    Currently, a VM can only be added to availability set at creation - time. An existing VM cannot be added to an availability set. - :type availability_set: - ~azure.mgmt.compute.v2016_04_30_preview.models.SubResource - :ivar provisioning_state: The provisioning state, which only appears in - the response. - :vartype provisioning_state: str - :param license_type: Specifies that the image or disk that is being used - was licensed on-premises. This element is only used for images that - contain the Windows Server operating system.

    Possible values are: -

    Windows_Client

    Windows_Server

    If this element - is included in a request for an update, the value must match the initial - value. This value cannot be updated.

    For more information, see - [Azure Hybrid Use Benefit for Windows - Server](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-hybrid-use-benefit-licensing?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json) -

    Minimum api-version: 2015-06-15 - :type license_type: str - :param plan: Specifies information about the marketplace image used to - create the virtual machine. This element is only used for marketplace - images. Before you can use a marketplace image from an API, you must - enable the image for programmatic use. In the Azure portal, find the - marketplace image that you want to use and then click **Want to deploy - programmatically, Get Started ->**. Enter any required information and - then click **Save**. - :type plan: ~azure.mgmt.compute.v2016_04_30_preview.models.Plan - :ivar resources: The virtual machine child extension resources. - :vartype resources: - list[~azure.mgmt.compute.v2016_04_30_preview.models.VirtualMachineExtension] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - 'instance_id': {'readonly': True}, - 'sku': {'readonly': True}, - 'latest_model_applied': {'readonly': True}, - 'vm_id': {'readonly': True}, - 'instance_view': {'readonly': True}, - 'provisioning_state': {'readonly': True}, - 'resources': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'instance_id': {'key': 'instanceId', 'type': 'str'}, - 'sku': {'key': 'sku', 'type': 'Sku'}, - 'latest_model_applied': {'key': 'properties.latestModelApplied', 'type': 'bool'}, - 'vm_id': {'key': 'properties.vmId', 'type': 'str'}, - 'instance_view': {'key': 'properties.instanceView', 'type': 'VirtualMachineScaleSetVMInstanceView'}, - 'hardware_profile': {'key': 'properties.hardwareProfile', 'type': 'HardwareProfile'}, - 'storage_profile': {'key': 'properties.storageProfile', 'type': 'StorageProfile'}, - 'os_profile': {'key': 'properties.osProfile', 'type': 'OSProfile'}, - 'network_profile': {'key': 'properties.networkProfile', 'type': 'NetworkProfile'}, - 'diagnostics_profile': {'key': 'properties.diagnosticsProfile', 'type': 'DiagnosticsProfile'}, - 'availability_set': {'key': 'properties.availabilitySet', 'type': 'SubResource'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'license_type': {'key': 'properties.licenseType', 'type': 'str'}, - 'plan': {'key': 'plan', 'type': 'Plan'}, - 'resources': {'key': 'resources', 'type': '[VirtualMachineExtension]'}, - } - - def __init__(self, *, location: str, tags=None, hardware_profile=None, storage_profile=None, os_profile=None, network_profile=None, diagnostics_profile=None, availability_set=None, license_type: str=None, plan=None, **kwargs) -> None: - super(VirtualMachineScaleSetVM, self).__init__(location=location, tags=tags, **kwargs) - self.instance_id = None - self.sku = None - self.latest_model_applied = None - self.vm_id = None - self.instance_view = None - self.hardware_profile = hardware_profile - self.storage_profile = storage_profile - self.os_profile = os_profile - self.network_profile = network_profile - self.diagnostics_profile = diagnostics_profile - self.availability_set = availability_set - self.provisioning_state = None - self.license_type = license_type - self.plan = plan - self.resources = None diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/virtual_machine_size.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/virtual_machine_size.py deleted file mode 100644 index 0fef3efd6c8e..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/virtual_machine_size.py +++ /dev/null @@ -1,53 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineSize(Model): - """Describes the properties of a VM size. - - :param name: The name of the virtual machine size. - :type name: str - :param number_of_cores: The number of cores supported by the virtual - machine size. - :type number_of_cores: int - :param os_disk_size_in_mb: The OS disk size, in MB, allowed by the virtual - machine size. - :type os_disk_size_in_mb: int - :param resource_disk_size_in_mb: The resource disk size, in MB, allowed by - the virtual machine size. - :type resource_disk_size_in_mb: int - :param memory_in_mb: The amount of memory, in MB, supported by the virtual - machine size. - :type memory_in_mb: int - :param max_data_disk_count: The maximum number of data disks that can be - attached to the virtual machine size. - :type max_data_disk_count: int - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'number_of_cores': {'key': 'numberOfCores', 'type': 'int'}, - 'os_disk_size_in_mb': {'key': 'osDiskSizeInMB', 'type': 'int'}, - 'resource_disk_size_in_mb': {'key': 'resourceDiskSizeInMB', 'type': 'int'}, - 'memory_in_mb': {'key': 'memoryInMB', 'type': 'int'}, - 'max_data_disk_count': {'key': 'maxDataDiskCount', 'type': 'int'}, - } - - def __init__(self, **kwargs): - super(VirtualMachineSize, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.number_of_cores = kwargs.get('number_of_cores', None) - self.os_disk_size_in_mb = kwargs.get('os_disk_size_in_mb', None) - self.resource_disk_size_in_mb = kwargs.get('resource_disk_size_in_mb', None) - self.memory_in_mb = kwargs.get('memory_in_mb', None) - self.max_data_disk_count = kwargs.get('max_data_disk_count', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/virtual_machine_size_paged.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/virtual_machine_size_paged.py deleted file mode 100644 index 1fb1ac74ee0a..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/virtual_machine_size_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class VirtualMachineSizePaged(Paged): - """ - A paging container for iterating over a list of :class:`VirtualMachineSize ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[VirtualMachineSize]'} - } - - def __init__(self, *args, **kwargs): - - super(VirtualMachineSizePaged, self).__init__(*args, **kwargs) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/virtual_machine_size_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/virtual_machine_size_py3.py deleted file mode 100644 index 9f99ba20ce42..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/virtual_machine_size_py3.py +++ /dev/null @@ -1,53 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineSize(Model): - """Describes the properties of a VM size. - - :param name: The name of the virtual machine size. - :type name: str - :param number_of_cores: The number of cores supported by the virtual - machine size. - :type number_of_cores: int - :param os_disk_size_in_mb: The OS disk size, in MB, allowed by the virtual - machine size. - :type os_disk_size_in_mb: int - :param resource_disk_size_in_mb: The resource disk size, in MB, allowed by - the virtual machine size. - :type resource_disk_size_in_mb: int - :param memory_in_mb: The amount of memory, in MB, supported by the virtual - machine size. - :type memory_in_mb: int - :param max_data_disk_count: The maximum number of data disks that can be - attached to the virtual machine size. - :type max_data_disk_count: int - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'number_of_cores': {'key': 'numberOfCores', 'type': 'int'}, - 'os_disk_size_in_mb': {'key': 'osDiskSizeInMB', 'type': 'int'}, - 'resource_disk_size_in_mb': {'key': 'resourceDiskSizeInMB', 'type': 'int'}, - 'memory_in_mb': {'key': 'memoryInMB', 'type': 'int'}, - 'max_data_disk_count': {'key': 'maxDataDiskCount', 'type': 'int'}, - } - - def __init__(self, *, name: str=None, number_of_cores: int=None, os_disk_size_in_mb: int=None, resource_disk_size_in_mb: int=None, memory_in_mb: int=None, max_data_disk_count: int=None, **kwargs) -> None: - super(VirtualMachineSize, self).__init__(**kwargs) - self.name = name - self.number_of_cores = number_of_cores - self.os_disk_size_in_mb = os_disk_size_in_mb - self.resource_disk_size_in_mb = resource_disk_size_in_mb - self.memory_in_mb = memory_in_mb - self.max_data_disk_count = max_data_disk_count diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/virtual_machine_status_code_count.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/virtual_machine_status_code_count.py deleted file mode 100644 index 7df7b702acd7..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/virtual_machine_status_code_count.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineStatusCodeCount(Model): - """The status code and count of the virtual machine scale set instance view - status summary. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar code: The instance view status code. - :vartype code: str - :ivar count: The number of instances having a particular status code. - :vartype count: int - """ - - _validation = { - 'code': {'readonly': True}, - 'count': {'readonly': True}, - } - - _attribute_map = { - 'code': {'key': 'code', 'type': 'str'}, - 'count': {'key': 'count', 'type': 'int'}, - } - - def __init__(self, **kwargs): - super(VirtualMachineStatusCodeCount, self).__init__(**kwargs) - self.code = None - self.count = None diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/virtual_machine_status_code_count_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/virtual_machine_status_code_count_py3.py deleted file mode 100644 index c38800073a95..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/virtual_machine_status_code_count_py3.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineStatusCodeCount(Model): - """The status code and count of the virtual machine scale set instance view - status summary. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar code: The instance view status code. - :vartype code: str - :ivar count: The number of instances having a particular status code. - :vartype count: int - """ - - _validation = { - 'code': {'readonly': True}, - 'count': {'readonly': True}, - } - - _attribute_map = { - 'code': {'key': 'code', 'type': 'str'}, - 'count': {'key': 'count', 'type': 'int'}, - } - - def __init__(self, **kwargs) -> None: - super(VirtualMachineStatusCodeCount, self).__init__(**kwargs) - self.code = None - self.count = None diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/win_rm_configuration.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/win_rm_configuration.py deleted file mode 100644 index 41635875026d..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/win_rm_configuration.py +++ /dev/null @@ -1,29 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class WinRMConfiguration(Model): - """Describes Windows Remote Management configuration of the VM. - - :param listeners: The list of Windows Remote Management listeners - :type listeners: - list[~azure.mgmt.compute.v2016_04_30_preview.models.WinRMListener] - """ - - _attribute_map = { - 'listeners': {'key': 'listeners', 'type': '[WinRMListener]'}, - } - - def __init__(self, **kwargs): - super(WinRMConfiguration, self).__init__(**kwargs) - self.listeners = kwargs.get('listeners', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/win_rm_configuration_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/win_rm_configuration_py3.py deleted file mode 100644 index ac5143326bd3..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/win_rm_configuration_py3.py +++ /dev/null @@ -1,29 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class WinRMConfiguration(Model): - """Describes Windows Remote Management configuration of the VM. - - :param listeners: The list of Windows Remote Management listeners - :type listeners: - list[~azure.mgmt.compute.v2016_04_30_preview.models.WinRMListener] - """ - - _attribute_map = { - 'listeners': {'key': 'listeners', 'type': '[WinRMListener]'}, - } - - def __init__(self, *, listeners=None, **kwargs) -> None: - super(WinRMConfiguration, self).__init__(**kwargs) - self.listeners = listeners diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/win_rm_listener.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/win_rm_listener.py deleted file mode 100644 index 705c7526004b..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/win_rm_listener.py +++ /dev/null @@ -1,42 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class WinRMListener(Model): - """Describes Protocol and thumbprint of Windows Remote Management listener. - - :param protocol: Specifies the protocol of listener.

    Possible - values are:
    **http**

    **https**. Possible values include: - 'Http', 'Https' - :type protocol: str or - ~azure.mgmt.compute.v2016_04_30_preview.models.ProtocolTypes - :param certificate_url: This is the URL of a certificate that has been - uploaded to Key Vault as a secret. For adding a secret to the Key Vault, - see [Add a key or secret to the key - vault](https://docs.microsoft.com/azure/key-vault/key-vault-get-started/#add). - In this case, your certificate needs to be It is the Base64 encoding of - the following JSON Object which is encoded in UTF-8:

    {
    - "data":"",
    "dataType":"pfx",
    - "password":""
    } - :type certificate_url: str - """ - - _attribute_map = { - 'protocol': {'key': 'protocol', 'type': 'ProtocolTypes'}, - 'certificate_url': {'key': 'certificateUrl', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(WinRMListener, self).__init__(**kwargs) - self.protocol = kwargs.get('protocol', None) - self.certificate_url = kwargs.get('certificate_url', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/win_rm_listener_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/win_rm_listener_py3.py deleted file mode 100644 index ab6093907ea0..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/win_rm_listener_py3.py +++ /dev/null @@ -1,42 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class WinRMListener(Model): - """Describes Protocol and thumbprint of Windows Remote Management listener. - - :param protocol: Specifies the protocol of listener.

    Possible - values are:
    **http**

    **https**. Possible values include: - 'Http', 'Https' - :type protocol: str or - ~azure.mgmt.compute.v2016_04_30_preview.models.ProtocolTypes - :param certificate_url: This is the URL of a certificate that has been - uploaded to Key Vault as a secret. For adding a secret to the Key Vault, - see [Add a key or secret to the key - vault](https://docs.microsoft.com/azure/key-vault/key-vault-get-started/#add). - In this case, your certificate needs to be It is the Base64 encoding of - the following JSON Object which is encoded in UTF-8:

    {
    - "data":"",
    "dataType":"pfx",
    - "password":""
    } - :type certificate_url: str - """ - - _attribute_map = { - 'protocol': {'key': 'protocol', 'type': 'ProtocolTypes'}, - 'certificate_url': {'key': 'certificateUrl', 'type': 'str'}, - } - - def __init__(self, *, protocol=None, certificate_url: str=None, **kwargs) -> None: - super(WinRMListener, self).__init__(**kwargs) - self.protocol = protocol - self.certificate_url = certificate_url diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/windows_configuration.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/windows_configuration.py deleted file mode 100644 index cd649be575cb..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/windows_configuration.py +++ /dev/null @@ -1,55 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class WindowsConfiguration(Model): - """Specifies Windows operating system settings on the virtual machine. - - :param provision_vm_agent: Indicates whether virtual machine agent should - be provisioned on the virtual machine.

    When this property is not - specified in the request body, default behavior is to set it to true. - This will ensure that VM Agent is installed on the VM so that extensions - can be added to the VM later. - :type provision_vm_agent: bool - :param enable_automatic_updates: Indicates whether virtual machine is - enabled for automatic updates. - :type enable_automatic_updates: bool - :param time_zone: Specifies the time zone of the virtual machine. e.g. - "Pacific Standard Time" - :type time_zone: str - :param additional_unattend_content: Specifies additional base-64 encoded - XML formatted information that can be included in the Unattend.xml file, - which is used by Windows Setup. - :type additional_unattend_content: - list[~azure.mgmt.compute.v2016_04_30_preview.models.AdditionalUnattendContent] - :param win_rm: Specifies the Windows Remote Management listeners. This - enables remote Windows PowerShell. - :type win_rm: - ~azure.mgmt.compute.v2016_04_30_preview.models.WinRMConfiguration - """ - - _attribute_map = { - 'provision_vm_agent': {'key': 'provisionVMAgent', 'type': 'bool'}, - 'enable_automatic_updates': {'key': 'enableAutomaticUpdates', 'type': 'bool'}, - 'time_zone': {'key': 'timeZone', 'type': 'str'}, - 'additional_unattend_content': {'key': 'additionalUnattendContent', 'type': '[AdditionalUnattendContent]'}, - 'win_rm': {'key': 'winRM', 'type': 'WinRMConfiguration'}, - } - - def __init__(self, **kwargs): - super(WindowsConfiguration, self).__init__(**kwargs) - self.provision_vm_agent = kwargs.get('provision_vm_agent', None) - self.enable_automatic_updates = kwargs.get('enable_automatic_updates', None) - self.time_zone = kwargs.get('time_zone', None) - self.additional_unattend_content = kwargs.get('additional_unattend_content', None) - self.win_rm = kwargs.get('win_rm', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/windows_configuration_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/windows_configuration_py3.py deleted file mode 100644 index 768c300efc00..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/windows_configuration_py3.py +++ /dev/null @@ -1,55 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class WindowsConfiguration(Model): - """Specifies Windows operating system settings on the virtual machine. - - :param provision_vm_agent: Indicates whether virtual machine agent should - be provisioned on the virtual machine.

    When this property is not - specified in the request body, default behavior is to set it to true. - This will ensure that VM Agent is installed on the VM so that extensions - can be added to the VM later. - :type provision_vm_agent: bool - :param enable_automatic_updates: Indicates whether virtual machine is - enabled for automatic updates. - :type enable_automatic_updates: bool - :param time_zone: Specifies the time zone of the virtual machine. e.g. - "Pacific Standard Time" - :type time_zone: str - :param additional_unattend_content: Specifies additional base-64 encoded - XML formatted information that can be included in the Unattend.xml file, - which is used by Windows Setup. - :type additional_unattend_content: - list[~azure.mgmt.compute.v2016_04_30_preview.models.AdditionalUnattendContent] - :param win_rm: Specifies the Windows Remote Management listeners. This - enables remote Windows PowerShell. - :type win_rm: - ~azure.mgmt.compute.v2016_04_30_preview.models.WinRMConfiguration - """ - - _attribute_map = { - 'provision_vm_agent': {'key': 'provisionVMAgent', 'type': 'bool'}, - 'enable_automatic_updates': {'key': 'enableAutomaticUpdates', 'type': 'bool'}, - 'time_zone': {'key': 'timeZone', 'type': 'str'}, - 'additional_unattend_content': {'key': 'additionalUnattendContent', 'type': '[AdditionalUnattendContent]'}, - 'win_rm': {'key': 'winRM', 'type': 'WinRMConfiguration'}, - } - - def __init__(self, *, provision_vm_agent: bool=None, enable_automatic_updates: bool=None, time_zone: str=None, additional_unattend_content=None, win_rm=None, **kwargs) -> None: - super(WindowsConfiguration, self).__init__(**kwargs) - self.provision_vm_agent = provision_vm_agent - self.enable_automatic_updates = enable_automatic_updates - self.time_zone = time_zone - self.additional_unattend_content = additional_unattend_content - self.win_rm = win_rm diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/operations/__init__.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/operations/__init__.py index 05d03de6591c..7b161a1ec521 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/operations/__init__.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/operations/__init__.py @@ -9,18 +9,18 @@ # regenerated. # -------------------------------------------------------------------------- -from .availability_sets_operations import AvailabilitySetsOperations -from .virtual_machine_extension_images_operations import VirtualMachineExtensionImagesOperations -from .virtual_machine_extensions_operations import VirtualMachineExtensionsOperations -from .virtual_machines_operations import VirtualMachinesOperations -from .virtual_machine_images_operations import VirtualMachineImagesOperations -from .usage_operations import UsageOperations -from .virtual_machine_sizes_operations import VirtualMachineSizesOperations -from .images_operations import ImagesOperations -from .virtual_machine_scale_sets_operations import VirtualMachineScaleSetsOperations -from .virtual_machine_scale_set_vms_operations import VirtualMachineScaleSetVMsOperations -from .disks_operations import DisksOperations -from .snapshots_operations import SnapshotsOperations +from ._availability_sets_operations import AvailabilitySetsOperations +from ._virtual_machine_extension_images_operations import VirtualMachineExtensionImagesOperations +from ._virtual_machine_extensions_operations import VirtualMachineExtensionsOperations +from ._virtual_machines_operations import VirtualMachinesOperations +from ._virtual_machine_images_operations import VirtualMachineImagesOperations +from ._usage_operations import UsageOperations +from ._virtual_machine_sizes_operations import VirtualMachineSizesOperations +from ._images_operations import ImagesOperations +from ._virtual_machine_scale_sets_operations import VirtualMachineScaleSetsOperations +from ._virtual_machine_scale_set_vms_operations import VirtualMachineScaleSetVMsOperations +from ._disks_operations import DisksOperations +from ._snapshots_operations import SnapshotsOperations __all__ = [ 'AvailabilitySetsOperations', diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/operations/_availability_sets_operations.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/operations/_availability_sets_operations.py new file mode 100644 index 000000000000..16a2a50ba750 --- /dev/null +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/operations/_availability_sets_operations.py @@ -0,0 +1,440 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse +from msrestazure.azure_exceptions import CloudError + +from .. import models + + +class AvailabilitySetsOperations(object): + """AvailabilitySetsOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: Client Api Version. Constant value: "2016-04-30-preview". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2016-04-30-preview" + + self.config = config + + def create_or_update( + self, resource_group_name, name, parameters, custom_headers=None, raw=False, **operation_config): + """Create or update an availability set. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param name: The name of the availability set. + :type name: str + :param parameters: Parameters supplied to the Create Availability Set + operation. + :type parameters: + ~azure.mgmt.compute.v2016_04_30_preview.models.AvailabilitySet + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: AvailabilitySet or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.compute.v2016_04_30_preview.models.AvailabilitySet + or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.create_or_update.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'availabilitySetName': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(parameters, 'AvailabilitySet') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('AvailabilitySet', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}'} + + def delete( + self, resource_group_name, availability_set_name, custom_headers=None, raw=False, **operation_config): + """Delete an availability set. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param availability_set_name: The name of the availability set. + :type availability_set_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: OperationStatusResponse or ClientRawResponse if raw=true + :rtype: + ~azure.mgmt.compute.v2016_04_30_preview.models.OperationStatusResponse + or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.delete.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'availabilitySetName': self._serialize.url("availability_set_name", availability_set_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 204]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('OperationStatusResponse', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}'} + + def get( + self, resource_group_name, availability_set_name, custom_headers=None, raw=False, **operation_config): + """Retrieves information about an availability set. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param availability_set_name: The name of the availability set. + :type availability_set_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: AvailabilitySet or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.compute.v2016_04_30_preview.models.AvailabilitySet + or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'availabilitySetName': self._serialize.url("availability_set_name", availability_set_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('AvailabilitySet', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}'} + + def list_by_subscription( + self, custom_headers=None, raw=False, **operation_config): + """Lists all availability sets in a subscription. + + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of AvailabilitySet + :rtype: + ~azure.mgmt.compute.v2016_04_30_preview.models.AvailabilitySetPaged[~azure.mgmt.compute.v2016_04_30_preview.models.AvailabilitySet] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_by_subscription.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.AvailabilitySetPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_by_subscription.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Compute/availabilitySets'} + + def list( + self, resource_group_name, custom_headers=None, raw=False, **operation_config): + """Lists all availability sets in a resource group. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of AvailabilitySet + :rtype: + ~azure.mgmt.compute.v2016_04_30_preview.models.AvailabilitySetPaged[~azure.mgmt.compute.v2016_04_30_preview.models.AvailabilitySet] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.AvailabilitySetPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets'} + + def list_available_sizes( + self, resource_group_name, availability_set_name, custom_headers=None, raw=False, **operation_config): + """Lists all available virtual machine sizes that can be used to create a + new virtual machine in an existing availability set. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param availability_set_name: The name of the availability set. + :type availability_set_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of VirtualMachineSize + :rtype: + ~azure.mgmt.compute.v2016_04_30_preview.models.VirtualMachineSizePaged[~azure.mgmt.compute.v2016_04_30_preview.models.VirtualMachineSize] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_available_sizes.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'availabilitySetName': self._serialize.url("availability_set_name", availability_set_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.VirtualMachineSizePaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_available_sizes.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}/vmSizes'} diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/operations/_disks_operations.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/operations/_disks_operations.py new file mode 100644 index 000000000000..eb6376433139 --- /dev/null +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/operations/_disks_operations.py @@ -0,0 +1,755 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse +from msrestazure.azure_exceptions import CloudError +from msrest.polling import LROPoller, NoPolling +from msrestazure.polling.arm_polling import ARMPolling + +from .. import models + + +class DisksOperations(object): + """DisksOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: Client Api Version. Constant value: "2016-04-30-preview". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2016-04-30-preview" + + self.config = config + + + def _create_or_update_initial( + self, resource_group_name, disk_name, disk, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.create_or_update.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'diskName': self._serialize.url("disk_name", disk_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(disk, 'Disk') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('Disk', response) + if response.status_code == 202: + deserialized = self._deserialize('Disk', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def create_or_update( + self, resource_group_name, disk_name, disk, custom_headers=None, raw=False, polling=True, **operation_config): + """Creates or updates a disk. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param disk_name: The name of the managed disk that is being created. + The name can't be changed after the disk is created. Supported + characters for the name are a-z, A-Z, 0-9 and _. The maximum name + length is 80 characters. + :type disk_name: str + :param disk: Disk object supplied in the body of the Put disk + operation. + :type disk: ~azure.mgmt.compute.v2016_04_30_preview.models.Disk + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns Disk or + ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2016_04_30_preview.models.Disk] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2016_04_30_preview.models.Disk]] + :raises: :class:`CloudError` + """ + raw_result = self._create_or_update_initial( + resource_group_name=resource_group_name, + disk_name=disk_name, + disk=disk, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('Disk', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/disks/{diskName}'} + + + def _update_initial( + self, resource_group_name, disk_name, disk, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.update.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'diskName': self._serialize.url("disk_name", disk_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(disk, 'DiskUpdate') + + # Construct and send request + request = self._client.patch(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('Disk', response) + if response.status_code == 202: + deserialized = self._deserialize('Disk', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def update( + self, resource_group_name, disk_name, disk, custom_headers=None, raw=False, polling=True, **operation_config): + """Updates (patches) a disk. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param disk_name: The name of the managed disk that is being created. + The name can't be changed after the disk is created. Supported + characters for the name are a-z, A-Z, 0-9 and _. The maximum name + length is 80 characters. + :type disk_name: str + :param disk: Disk object supplied in the body of the Patch disk + operation. + :type disk: ~azure.mgmt.compute.v2016_04_30_preview.models.DiskUpdate + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns Disk or + ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2016_04_30_preview.models.Disk] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2016_04_30_preview.models.Disk]] + :raises: :class:`CloudError` + """ + raw_result = self._update_initial( + resource_group_name=resource_group_name, + disk_name=disk_name, + disk=disk, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('Disk', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/disks/{diskName}'} + + def get( + self, resource_group_name, disk_name, custom_headers=None, raw=False, **operation_config): + """Gets information about a disk. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param disk_name: The name of the managed disk that is being created. + The name can't be changed after the disk is created. Supported + characters for the name are a-z, A-Z, 0-9 and _. The maximum name + length is 80 characters. + :type disk_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: Disk or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.compute.v2016_04_30_preview.models.Disk or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'diskName': self._serialize.url("disk_name", disk_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('Disk', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/disks/{diskName}'} + + + def _delete_initial( + self, resource_group_name, disk_name, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.delete.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'diskName': self._serialize.url("disk_name", disk_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202, 204]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('OperationStatusResponse', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def delete( + self, resource_group_name, disk_name, custom_headers=None, raw=False, polling=True, **operation_config): + """Deletes a disk. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param disk_name: The name of the managed disk that is being created. + The name can't be changed after the disk is created. Supported + characters for the name are a-z, A-Z, 0-9 and _. The maximum name + length is 80 characters. + :type disk_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns OperationStatusResponse + or ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2016_04_30_preview.models.OperationStatusResponse] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2016_04_30_preview.models.OperationStatusResponse]] + :raises: :class:`CloudError` + """ + raw_result = self._delete_initial( + resource_group_name=resource_group_name, + disk_name=disk_name, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('OperationStatusResponse', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/disks/{diskName}'} + + def list_by_resource_group( + self, resource_group_name, custom_headers=None, raw=False, **operation_config): + """Lists all the disks under a resource group. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of Disk + :rtype: + ~azure.mgmt.compute.v2016_04_30_preview.models.DiskPaged[~azure.mgmt.compute.v2016_04_30_preview.models.Disk] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_by_resource_group.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.DiskPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/disks'} + + def list( + self, custom_headers=None, raw=False, **operation_config): + """Lists all the disks under a subscription. + + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of Disk + :rtype: + ~azure.mgmt.compute.v2016_04_30_preview.models.DiskPaged[~azure.mgmt.compute.v2016_04_30_preview.models.Disk] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.DiskPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Compute/disks'} + + + def _grant_access_initial( + self, resource_group_name, disk_name, access, duration_in_seconds, custom_headers=None, raw=False, **operation_config): + grant_access_data = models.GrantAccessData(access=access, duration_in_seconds=duration_in_seconds) + + # Construct URL + url = self.grant_access.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'diskName': self._serialize.url("disk_name", disk_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(grant_access_data, 'GrantAccessData') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('AccessUri', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def grant_access( + self, resource_group_name, disk_name, access, duration_in_seconds, custom_headers=None, raw=False, polling=True, **operation_config): + """Grants access to a disk. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param disk_name: The name of the managed disk that is being created. + The name can't be changed after the disk is created. Supported + characters for the name are a-z, A-Z, 0-9 and _. The maximum name + length is 80 characters. + :type disk_name: str + :param access: Possible values include: 'None', 'Read' + :type access: str or + ~azure.mgmt.compute.v2016_04_30_preview.models.AccessLevel + :param duration_in_seconds: Time duration in seconds until the SAS + access expires. + :type duration_in_seconds: int + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns AccessUri or + ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2016_04_30_preview.models.AccessUri] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2016_04_30_preview.models.AccessUri]] + :raises: :class:`CloudError` + """ + raw_result = self._grant_access_initial( + resource_group_name=resource_group_name, + disk_name=disk_name, + access=access, + duration_in_seconds=duration_in_seconds, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('AccessUri', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + grant_access.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/disks/{diskName}/beginGetAccess'} + + + def _revoke_access_initial( + self, resource_group_name, disk_name, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.revoke_access.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'diskName': self._serialize.url("disk_name", disk_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('OperationStatusResponse', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def revoke_access( + self, resource_group_name, disk_name, custom_headers=None, raw=False, polling=True, **operation_config): + """Revokes access to a disk. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param disk_name: The name of the managed disk that is being created. + The name can't be changed after the disk is created. Supported + characters for the name are a-z, A-Z, 0-9 and _. The maximum name + length is 80 characters. + :type disk_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns OperationStatusResponse + or ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2016_04_30_preview.models.OperationStatusResponse] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2016_04_30_preview.models.OperationStatusResponse]] + :raises: :class:`CloudError` + """ + raw_result = self._revoke_access_initial( + resource_group_name=resource_group_name, + disk_name=disk_name, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('OperationStatusResponse', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + revoke_access.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/disks/{diskName}/endGetAccess'} diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/operations/_images_operations.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/operations/_images_operations.py new file mode 100644 index 000000000000..e4035f934044 --- /dev/null +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/operations/_images_operations.py @@ -0,0 +1,439 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse +from msrestazure.azure_exceptions import CloudError +from msrest.polling import LROPoller, NoPolling +from msrestazure.polling.arm_polling import ARMPolling + +from .. import models + + +class ImagesOperations(object): + """ImagesOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: Client Api Version. Constant value: "2016-04-30-preview". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2016-04-30-preview" + + self.config = config + + + def _create_or_update_initial( + self, resource_group_name, image_name, parameters, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.create_or_update.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'imageName': self._serialize.url("image_name", image_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(parameters, 'Image') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 201]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('Image', response) + if response.status_code == 201: + deserialized = self._deserialize('Image', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def create_or_update( + self, resource_group_name, image_name, parameters, custom_headers=None, raw=False, polling=True, **operation_config): + """Create or update an image. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param image_name: The name of the image. + :type image_name: str + :param parameters: Parameters supplied to the Create Image operation. + :type parameters: ~azure.mgmt.compute.v2016_04_30_preview.models.Image + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns Image or + ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2016_04_30_preview.models.Image] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2016_04_30_preview.models.Image]] + :raises: :class:`CloudError` + """ + raw_result = self._create_or_update_initial( + resource_group_name=resource_group_name, + image_name=image_name, + parameters=parameters, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('Image', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/images/{imageName}'} + + + def _delete_initial( + self, resource_group_name, image_name, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.delete.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'imageName': self._serialize.url("image_name", image_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202, 204]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('OperationStatusResponse', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def delete( + self, resource_group_name, image_name, custom_headers=None, raw=False, polling=True, **operation_config): + """Deletes an Image. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param image_name: The name of the image. + :type image_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns OperationStatusResponse + or ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2016_04_30_preview.models.OperationStatusResponse] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2016_04_30_preview.models.OperationStatusResponse]] + :raises: :class:`CloudError` + """ + raw_result = self._delete_initial( + resource_group_name=resource_group_name, + image_name=image_name, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('OperationStatusResponse', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/images/{imageName}'} + + def get( + self, resource_group_name, image_name, expand=None, custom_headers=None, raw=False, **operation_config): + """Gets an image. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param image_name: The name of the image. + :type image_name: str + :param expand: The expand expression to apply on the operation. + :type expand: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: Image or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.compute.v2016_04_30_preview.models.Image or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'imageName': self._serialize.url("image_name", image_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + if expand is not None: + query_parameters['$expand'] = self._serialize.query("expand", expand, 'str') + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('Image', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/images/{imageName}'} + + def list_by_resource_group( + self, resource_group_name, custom_headers=None, raw=False, **operation_config): + """Gets the list of images under a resource group. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of Image + :rtype: + ~azure.mgmt.compute.v2016_04_30_preview.models.ImagePaged[~azure.mgmt.compute.v2016_04_30_preview.models.Image] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_by_resource_group.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.ImagePaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/images'} + + def list( + self, custom_headers=None, raw=False, **operation_config): + """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. + + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of Image + :rtype: + ~azure.mgmt.compute.v2016_04_30_preview.models.ImagePaged[~azure.mgmt.compute.v2016_04_30_preview.models.Image] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.ImagePaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Compute/images'} diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/operations/_snapshots_operations.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/operations/_snapshots_operations.py new file mode 100644 index 000000000000..e2149eabb139 --- /dev/null +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/operations/_snapshots_operations.py @@ -0,0 +1,745 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse +from msrestazure.azure_exceptions import CloudError +from msrest.polling import LROPoller, NoPolling +from msrestazure.polling.arm_polling import ARMPolling + +from .. import models + + +class SnapshotsOperations(object): + """SnapshotsOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: Client Api Version. Constant value: "2016-04-30-preview". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2016-04-30-preview" + + self.config = config + + + def _create_or_update_initial( + self, resource_group_name, snapshot_name, snapshot, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.create_or_update.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'snapshotName': self._serialize.url("snapshot_name", snapshot_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(snapshot, 'Snapshot') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('Snapshot', response) + if response.status_code == 202: + deserialized = self._deserialize('Snapshot', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def create_or_update( + self, resource_group_name, snapshot_name, snapshot, custom_headers=None, raw=False, polling=True, **operation_config): + """Creates or updates a snapshot. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param snapshot_name: The name of the snapshot within the given + subscription and resource group. + :type snapshot_name: str + :param snapshot: Snapshot object supplied in the body of the Put disk + operation. + :type snapshot: + ~azure.mgmt.compute.v2016_04_30_preview.models.Snapshot + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns Snapshot or + ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2016_04_30_preview.models.Snapshot] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2016_04_30_preview.models.Snapshot]] + :raises: :class:`CloudError` + """ + raw_result = self._create_or_update_initial( + resource_group_name=resource_group_name, + snapshot_name=snapshot_name, + snapshot=snapshot, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('Snapshot', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/snapshots/{snapshotName}'} + + + def _update_initial( + self, resource_group_name, snapshot_name, snapshot, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.update.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'snapshotName': self._serialize.url("snapshot_name", snapshot_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(snapshot, 'SnapshotUpdate') + + # Construct and send request + request = self._client.patch(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('Snapshot', response) + if response.status_code == 202: + deserialized = self._deserialize('Snapshot', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def update( + self, resource_group_name, snapshot_name, snapshot, custom_headers=None, raw=False, polling=True, **operation_config): + """Updates (patches) a snapshot. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param snapshot_name: The name of the snapshot within the given + subscription and resource group. + :type snapshot_name: str + :param snapshot: Snapshot object supplied in the body of the Patch + snapshot operation. + :type snapshot: + ~azure.mgmt.compute.v2016_04_30_preview.models.SnapshotUpdate + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns Snapshot or + ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2016_04_30_preview.models.Snapshot] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2016_04_30_preview.models.Snapshot]] + :raises: :class:`CloudError` + """ + raw_result = self._update_initial( + resource_group_name=resource_group_name, + snapshot_name=snapshot_name, + snapshot=snapshot, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('Snapshot', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/snapshots/{snapshotName}'} + + def get( + self, resource_group_name, snapshot_name, custom_headers=None, raw=False, **operation_config): + """Gets information about a snapshot. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param snapshot_name: The name of the snapshot within the given + subscription and resource group. + :type snapshot_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: Snapshot or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.compute.v2016_04_30_preview.models.Snapshot or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'snapshotName': self._serialize.url("snapshot_name", snapshot_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('Snapshot', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/snapshots/{snapshotName}'} + + + def _delete_initial( + self, resource_group_name, snapshot_name, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.delete.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'snapshotName': self._serialize.url("snapshot_name", snapshot_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202, 204]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('OperationStatusResponse', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def delete( + self, resource_group_name, snapshot_name, custom_headers=None, raw=False, polling=True, **operation_config): + """Deletes a snapshot. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param snapshot_name: The name of the snapshot within the given + subscription and resource group. + :type snapshot_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns OperationStatusResponse + or ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2016_04_30_preview.models.OperationStatusResponse] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2016_04_30_preview.models.OperationStatusResponse]] + :raises: :class:`CloudError` + """ + raw_result = self._delete_initial( + resource_group_name=resource_group_name, + snapshot_name=snapshot_name, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('OperationStatusResponse', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/snapshots/{snapshotName}'} + + def list_by_resource_group( + self, resource_group_name, custom_headers=None, raw=False, **operation_config): + """Lists snapshots under a resource group. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of Snapshot + :rtype: + ~azure.mgmt.compute.v2016_04_30_preview.models.SnapshotPaged[~azure.mgmt.compute.v2016_04_30_preview.models.Snapshot] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_by_resource_group.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.SnapshotPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/snapshots'} + + def list( + self, custom_headers=None, raw=False, **operation_config): + """Lists snapshots under a subscription. + + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of Snapshot + :rtype: + ~azure.mgmt.compute.v2016_04_30_preview.models.SnapshotPaged[~azure.mgmt.compute.v2016_04_30_preview.models.Snapshot] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.SnapshotPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Compute/snapshots'} + + + def _grant_access_initial( + self, resource_group_name, snapshot_name, access, duration_in_seconds, custom_headers=None, raw=False, **operation_config): + grant_access_data = models.GrantAccessData(access=access, duration_in_seconds=duration_in_seconds) + + # Construct URL + url = self.grant_access.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'snapshotName': self._serialize.url("snapshot_name", snapshot_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(grant_access_data, 'GrantAccessData') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('AccessUri', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def grant_access( + self, resource_group_name, snapshot_name, access, duration_in_seconds, custom_headers=None, raw=False, polling=True, **operation_config): + """Grants access to a snapshot. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param snapshot_name: The name of the snapshot within the given + subscription and resource group. + :type snapshot_name: str + :param access: Possible values include: 'None', 'Read' + :type access: str or + ~azure.mgmt.compute.v2016_04_30_preview.models.AccessLevel + :param duration_in_seconds: Time duration in seconds until the SAS + access expires. + :type duration_in_seconds: int + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns AccessUri or + ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2016_04_30_preview.models.AccessUri] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2016_04_30_preview.models.AccessUri]] + :raises: :class:`CloudError` + """ + raw_result = self._grant_access_initial( + resource_group_name=resource_group_name, + snapshot_name=snapshot_name, + access=access, + duration_in_seconds=duration_in_seconds, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('AccessUri', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + grant_access.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/snapshots/{snapshotName}/beginGetAccess'} + + + def _revoke_access_initial( + self, resource_group_name, snapshot_name, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.revoke_access.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'snapshotName': self._serialize.url("snapshot_name", snapshot_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('OperationStatusResponse', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def revoke_access( + self, resource_group_name, snapshot_name, custom_headers=None, raw=False, polling=True, **operation_config): + """Revokes access to a snapshot. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param snapshot_name: The name of the snapshot within the given + subscription and resource group. + :type snapshot_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns OperationStatusResponse + or ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2016_04_30_preview.models.OperationStatusResponse] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2016_04_30_preview.models.OperationStatusResponse]] + :raises: :class:`CloudError` + """ + raw_result = self._revoke_access_initial( + resource_group_name=resource_group_name, + snapshot_name=snapshot_name, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('OperationStatusResponse', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + revoke_access.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/snapshots/{snapshotName}/endGetAccess'} diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/operations/_usage_operations.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/operations/_usage_operations.py new file mode 100644 index 000000000000..24b5f5f41338 --- /dev/null +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/operations/_usage_operations.py @@ -0,0 +1,111 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse +from msrestazure.azure_exceptions import CloudError + +from .. import models + + +class UsageOperations(object): + """UsageOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: Client Api Version. Constant value: "2016-04-30-preview". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2016-04-30-preview" + + self.config = config + + def list( + self, location, custom_headers=None, raw=False, **operation_config): + """Gets, for the specified location, the current compute resource usage + information as well as the limits for compute resources under the + subscription. + + :param location: The location for which resource usage is queried. + :type location: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of Usage + :rtype: + ~azure.mgmt.compute.v2016_04_30_preview.models.UsagePaged[~azure.mgmt.compute.v2016_04_30_preview.models.Usage] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list.metadata['url'] + path_format_arguments = { + 'location': self._serialize.url("location", location, 'str', pattern=r'^[-\w\._]+$'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.UsagePaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/usages'} diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/operations/_virtual_machine_extension_images_operations.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/operations/_virtual_machine_extension_images_operations.py new file mode 100644 index 000000000000..66e7d585cd8d --- /dev/null +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/operations/_virtual_machine_extension_images_operations.py @@ -0,0 +1,247 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse +from msrestazure.azure_exceptions import CloudError + +from .. import models + + +class VirtualMachineExtensionImagesOperations(object): + """VirtualMachineExtensionImagesOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: Client Api Version. Constant value: "2016-04-30-preview". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2016-04-30-preview" + + self.config = config + + def get( + self, location, publisher_name, type, version, custom_headers=None, raw=False, **operation_config): + """Gets a virtual machine extension image. + + :param location: The name of a supported Azure region. + :type location: str + :param publisher_name: + :type publisher_name: str + :param type: + :type type: str + :param version: + :type version: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: VirtualMachineExtensionImage or ClientRawResponse if raw=true + :rtype: + ~azure.mgmt.compute.v2016_04_30_preview.models.VirtualMachineExtensionImage + or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'location': self._serialize.url("location", location, 'str'), + 'publisherName': self._serialize.url("publisher_name", publisher_name, 'str'), + 'type': self._serialize.url("type", type, 'str'), + 'version': self._serialize.url("version", version, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('VirtualMachineExtensionImage', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/publishers/{publisherName}/artifacttypes/vmextension/types/{type}/versions/{version}'} + + def list_types( + self, location, publisher_name, custom_headers=None, raw=False, **operation_config): + """Gets a list of virtual machine extension image types. + + :param location: The name of a supported Azure region. + :type location: str + :param publisher_name: + :type publisher_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: list or ClientRawResponse if raw=true + :rtype: + list[~azure.mgmt.compute.v2016_04_30_preview.models.VirtualMachineExtensionImage] + or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.list_types.metadata['url'] + path_format_arguments = { + 'location': self._serialize.url("location", location, 'str'), + 'publisherName': self._serialize.url("publisher_name", publisher_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('[VirtualMachineExtensionImage]', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + list_types.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/publishers/{publisherName}/artifacttypes/vmextension/types'} + + def list_versions( + self, location, publisher_name, type, filter=None, top=None, orderby=None, custom_headers=None, raw=False, **operation_config): + """Gets a list of virtual machine extension image versions. + + :param location: The name of a supported Azure region. + :type location: str + :param publisher_name: + :type publisher_name: str + :param type: + :type type: str + :param filter: The filter to apply on the operation. + :type filter: str + :param top: + :type top: int + :param orderby: + :type orderby: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: list or ClientRawResponse if raw=true + :rtype: + list[~azure.mgmt.compute.v2016_04_30_preview.models.VirtualMachineExtensionImage] + or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.list_versions.metadata['url'] + path_format_arguments = { + 'location': self._serialize.url("location", location, 'str'), + 'publisherName': self._serialize.url("publisher_name", publisher_name, 'str'), + 'type': self._serialize.url("type", type, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + if filter is not None: + query_parameters['$filter'] = self._serialize.query("filter", filter, 'str') + if top is not None: + query_parameters['$top'] = self._serialize.query("top", top, 'int') + if orderby is not None: + query_parameters['$orderby'] = self._serialize.query("orderby", orderby, 'str') + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('[VirtualMachineExtensionImage]', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + list_versions.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/publishers/{publisherName}/artifacttypes/vmextension/types/{type}/versions'} diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/operations/_virtual_machine_extensions_operations.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/operations/_virtual_machine_extensions_operations.py new file mode 100644 index 000000000000..d08321756c44 --- /dev/null +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/operations/_virtual_machine_extensions_operations.py @@ -0,0 +1,426 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse +from msrestazure.azure_exceptions import CloudError +from msrest.polling import LROPoller, NoPolling +from msrestazure.polling.arm_polling import ARMPolling + +from .. import models + + +class VirtualMachineExtensionsOperations(object): + """VirtualMachineExtensionsOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: Client Api Version. Constant value: "2016-04-30-preview". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2016-04-30-preview" + + self.config = config + + + def _create_or_update_initial( + self, resource_group_name, vm_name, vm_extension_name, extension_parameters, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.create_or_update.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vmName': self._serialize.url("vm_name", vm_name, 'str'), + 'vmExtensionName': self._serialize.url("vm_extension_name", vm_extension_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(extension_parameters, 'VirtualMachineExtension') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 201]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('VirtualMachineExtension', response) + if response.status_code == 201: + deserialized = self._deserialize('VirtualMachineExtension', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def create_or_update( + self, resource_group_name, vm_name, vm_extension_name, extension_parameters, custom_headers=None, raw=False, polling=True, **operation_config): + """The operation to create or update the extension. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param vm_name: The name of the virtual machine where the extension + should be created or updated. + :type vm_name: str + :param vm_extension_name: The name of the virtual machine extension. + :type vm_extension_name: str + :param extension_parameters: Parameters supplied to the Create Virtual + Machine Extension operation. + :type extension_parameters: + ~azure.mgmt.compute.v2016_04_30_preview.models.VirtualMachineExtension + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns VirtualMachineExtension + or ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2016_04_30_preview.models.VirtualMachineExtension] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2016_04_30_preview.models.VirtualMachineExtension]] + :raises: :class:`CloudError` + """ + raw_result = self._create_or_update_initial( + resource_group_name=resource_group_name, + vm_name=vm_name, + vm_extension_name=vm_extension_name, + extension_parameters=extension_parameters, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('VirtualMachineExtension', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/extensions/{vmExtensionName}'} + + + def _update_initial( + self, resource_group_name, vm_name, vm_extension_name, extension_parameters, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.update.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vmName': self._serialize.url("vm_name", vm_name, 'str'), + 'vmExtensionName': self._serialize.url("vm_extension_name", vm_extension_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(extension_parameters, 'VirtualMachineExtensionUpdate') + + # Construct and send request + request = self._client.patch(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('VirtualMachineExtension', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def update( + self, resource_group_name, vm_name, vm_extension_name, extension_parameters, custom_headers=None, raw=False, polling=True, **operation_config): + """The operation to update the extension. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param vm_name: The name of the virtual machine where the extension + should be updated. + :type vm_name: str + :param vm_extension_name: The name of the virtual machine extension. + :type vm_extension_name: str + :param extension_parameters: Parameters supplied to the Update Virtual + Machine Extension operation. + :type extension_parameters: + ~azure.mgmt.compute.v2016_04_30_preview.models.VirtualMachineExtensionUpdate + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns VirtualMachineExtension + or ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2016_04_30_preview.models.VirtualMachineExtension] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2016_04_30_preview.models.VirtualMachineExtension]] + :raises: :class:`CloudError` + """ + raw_result = self._update_initial( + resource_group_name=resource_group_name, + vm_name=vm_name, + vm_extension_name=vm_extension_name, + extension_parameters=extension_parameters, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('VirtualMachineExtension', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/extensions/{vmExtensionName}'} + + + def _delete_initial( + self, resource_group_name, vm_name, vm_extension_name, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.delete.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vmName': self._serialize.url("vm_name", vm_name, 'str'), + 'vmExtensionName': self._serialize.url("vm_extension_name", vm_extension_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202, 204]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('OperationStatusResponse', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def delete( + self, resource_group_name, vm_name, vm_extension_name, custom_headers=None, raw=False, polling=True, **operation_config): + """The operation to delete the extension. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param vm_name: The name of the virtual machine where the extension + should be deleted. + :type vm_name: str + :param vm_extension_name: The name of the virtual machine extension. + :type vm_extension_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns OperationStatusResponse + or ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2016_04_30_preview.models.OperationStatusResponse] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2016_04_30_preview.models.OperationStatusResponse]] + :raises: :class:`CloudError` + """ + raw_result = self._delete_initial( + resource_group_name=resource_group_name, + vm_name=vm_name, + vm_extension_name=vm_extension_name, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('OperationStatusResponse', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/extensions/{vmExtensionName}'} + + def get( + self, resource_group_name, vm_name, vm_extension_name, expand=None, custom_headers=None, raw=False, **operation_config): + """The operation to get the extension. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param vm_name: The name of the virtual machine containing the + extension. + :type vm_name: str + :param vm_extension_name: The name of the virtual machine extension. + :type vm_extension_name: str + :param expand: The expand expression to apply on the operation. + :type expand: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: VirtualMachineExtension or ClientRawResponse if raw=true + :rtype: + ~azure.mgmt.compute.v2016_04_30_preview.models.VirtualMachineExtension + or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vmName': self._serialize.url("vm_name", vm_name, 'str'), + 'vmExtensionName': self._serialize.url("vm_extension_name", vm_extension_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + if expand is not None: + query_parameters['$expand'] = self._serialize.query("expand", expand, 'str') + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('VirtualMachineExtension', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/extensions/{vmExtensionName}'} diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/operations/_virtual_machine_images_operations.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/operations/_virtual_machine_images_operations.py new file mode 100644 index 000000000000..c0652a323c5d --- /dev/null +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/operations/_virtual_machine_images_operations.py @@ -0,0 +1,381 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse +from msrestazure.azure_exceptions import CloudError + +from .. import models + + +class VirtualMachineImagesOperations(object): + """VirtualMachineImagesOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: Client Api Version. Constant value: "2016-04-30-preview". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2016-04-30-preview" + + self.config = config + + def get( + self, location, publisher_name, offer, skus, version, custom_headers=None, raw=False, **operation_config): + """Gets a virtual machine image. + + :param location: The name of a supported Azure region. + :type location: str + :param publisher_name: A valid image publisher. + :type publisher_name: str + :param offer: A valid image publisher offer. + :type offer: str + :param skus: A valid image SKU. + :type skus: str + :param version: A valid image SKU version. + :type version: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: VirtualMachineImage or ClientRawResponse if raw=true + :rtype: + ~azure.mgmt.compute.v2016_04_30_preview.models.VirtualMachineImage or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'location': self._serialize.url("location", location, 'str'), + 'publisherName': self._serialize.url("publisher_name", publisher_name, 'str'), + 'offer': self._serialize.url("offer", offer, 'str'), + 'skus': self._serialize.url("skus", skus, 'str'), + 'version': self._serialize.url("version", version, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('VirtualMachineImage', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/publishers/{publisherName}/artifacttypes/vmimage/offers/{offer}/skus/{skus}/versions/{version}'} + + def list( + self, location, publisher_name, offer, skus, filter=None, top=None, orderby=None, custom_headers=None, raw=False, **operation_config): + """Gets a list of all virtual machine image versions for the specified + location, publisher, offer, and SKU. + + :param location: The name of a supported Azure region. + :type location: str + :param publisher_name: A valid image publisher. + :type publisher_name: str + :param offer: A valid image publisher offer. + :type offer: str + :param skus: A valid image SKU. + :type skus: str + :param filter: The filter to apply on the operation. + :type filter: str + :param top: + :type top: int + :param orderby: + :type orderby: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: list or ClientRawResponse if raw=true + :rtype: + list[~azure.mgmt.compute.v2016_04_30_preview.models.VirtualMachineImageResource] + or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.list.metadata['url'] + path_format_arguments = { + 'location': self._serialize.url("location", location, 'str'), + 'publisherName': self._serialize.url("publisher_name", publisher_name, 'str'), + 'offer': self._serialize.url("offer", offer, 'str'), + 'skus': self._serialize.url("skus", skus, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + if filter is not None: + query_parameters['$filter'] = self._serialize.query("filter", filter, 'str') + if top is not None: + query_parameters['$top'] = self._serialize.query("top", top, 'int') + if orderby is not None: + query_parameters['$orderby'] = self._serialize.query("orderby", orderby, 'str') + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('[VirtualMachineImageResource]', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/publishers/{publisherName}/artifacttypes/vmimage/offers/{offer}/skus/{skus}/versions'} + + def list_offers( + self, location, publisher_name, custom_headers=None, raw=False, **operation_config): + """Gets a list of virtual machine image offers for the specified location + and publisher. + + :param location: The name of a supported Azure region. + :type location: str + :param publisher_name: A valid image publisher. + :type publisher_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: list or ClientRawResponse if raw=true + :rtype: + list[~azure.mgmt.compute.v2016_04_30_preview.models.VirtualMachineImageResource] + or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.list_offers.metadata['url'] + path_format_arguments = { + 'location': self._serialize.url("location", location, 'str'), + 'publisherName': self._serialize.url("publisher_name", publisher_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('[VirtualMachineImageResource]', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + list_offers.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/publishers/{publisherName}/artifacttypes/vmimage/offers'} + + def list_publishers( + self, location, custom_headers=None, raw=False, **operation_config): + """Gets a list of virtual machine image publishers for the specified Azure + location. + + :param location: The name of a supported Azure region. + :type location: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: list or ClientRawResponse if raw=true + :rtype: + list[~azure.mgmt.compute.v2016_04_30_preview.models.VirtualMachineImageResource] + or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.list_publishers.metadata['url'] + path_format_arguments = { + 'location': self._serialize.url("location", location, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('[VirtualMachineImageResource]', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + list_publishers.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/publishers'} + + def list_skus( + self, location, publisher_name, offer, custom_headers=None, raw=False, **operation_config): + """Gets a list of virtual machine image SKUs for the specified location, + publisher, and offer. + + :param location: The name of a supported Azure region. + :type location: str + :param publisher_name: A valid image publisher. + :type publisher_name: str + :param offer: A valid image publisher offer. + :type offer: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: list or ClientRawResponse if raw=true + :rtype: + list[~azure.mgmt.compute.v2016_04_30_preview.models.VirtualMachineImageResource] + or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.list_skus.metadata['url'] + path_format_arguments = { + 'location': self._serialize.url("location", location, 'str'), + 'publisherName': self._serialize.url("publisher_name", publisher_name, 'str'), + 'offer': self._serialize.url("offer", offer, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('[VirtualMachineImageResource]', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + list_skus.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/publishers/{publisherName}/artifacttypes/vmimage/offers/{offer}/skus'} diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/operations/_virtual_machine_scale_set_vms_operations.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/operations/_virtual_machine_scale_set_vms_operations.py new file mode 100644 index 000000000000..4f7fb8583b93 --- /dev/null +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/operations/_virtual_machine_scale_set_vms_operations.py @@ -0,0 +1,945 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse +from msrestazure.azure_exceptions import CloudError +from msrest.polling import LROPoller, NoPolling +from msrestazure.polling.arm_polling import ARMPolling + +from .. import models + + +class VirtualMachineScaleSetVMsOperations(object): + """VirtualMachineScaleSetVMsOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: Client Api Version. Constant value: "2016-04-30-preview". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2016-04-30-preview" + + self.config = config + + + def _reimage_initial( + self, resource_group_name, vm_scale_set_name, instance_id, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.reimage.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), + 'instanceId': self._serialize.url("instance_id", instance_id, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('OperationStatusResponse', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def reimage( + self, resource_group_name, vm_scale_set_name, instance_id, custom_headers=None, raw=False, polling=True, **operation_config): + """Reimages (upgrade the operating system) a specific virtual machine in a + VM scale set. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param vm_scale_set_name: The name of the VM scale set. + :type vm_scale_set_name: str + :param instance_id: The instance ID of the virtual machine. + :type instance_id: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns OperationStatusResponse + or ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2016_04_30_preview.models.OperationStatusResponse] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2016_04_30_preview.models.OperationStatusResponse]] + :raises: :class:`CloudError` + """ + raw_result = self._reimage_initial( + resource_group_name=resource_group_name, + vm_scale_set_name=vm_scale_set_name, + instance_id=instance_id, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('OperationStatusResponse', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + reimage.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/virtualmachines/{instanceId}/reimage'} + + + def _reimage_all_initial( + self, resource_group_name, vm_scale_set_name, instance_id, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.reimage_all.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), + 'instanceId': self._serialize.url("instance_id", instance_id, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('OperationStatusResponse', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def reimage_all( + self, resource_group_name, vm_scale_set_name, instance_id, custom_headers=None, raw=False, polling=True, **operation_config): + """Allows you to re-image all the disks ( including data disks ) in the a + VM scale set instance. This operation is only supported for managed + disks. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param vm_scale_set_name: The name of the VM scale set. + :type vm_scale_set_name: str + :param instance_id: The instance ID of the virtual machine. + :type instance_id: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns OperationStatusResponse + or ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2016_04_30_preview.models.OperationStatusResponse] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2016_04_30_preview.models.OperationStatusResponse]] + :raises: :class:`CloudError` + """ + raw_result = self._reimage_all_initial( + resource_group_name=resource_group_name, + vm_scale_set_name=vm_scale_set_name, + instance_id=instance_id, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('OperationStatusResponse', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + reimage_all.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/virtualmachines/{instanceId}/reimageall'} + + + def _deallocate_initial( + self, resource_group_name, vm_scale_set_name, instance_id, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.deallocate.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), + 'instanceId': self._serialize.url("instance_id", instance_id, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('OperationStatusResponse', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def deallocate( + self, resource_group_name, vm_scale_set_name, instance_id, custom_headers=None, raw=False, polling=True, **operation_config): + """Deallocates a specific virtual machine in a VM scale set. Shuts down + the virtual machine and releases the compute resources it uses. You are + not billed for the compute resources of this virtual machine once it is + deallocated. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param vm_scale_set_name: The name of the VM scale set. + :type vm_scale_set_name: str + :param instance_id: The instance ID of the virtual machine. + :type instance_id: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns OperationStatusResponse + or ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2016_04_30_preview.models.OperationStatusResponse] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2016_04_30_preview.models.OperationStatusResponse]] + :raises: :class:`CloudError` + """ + raw_result = self._deallocate_initial( + resource_group_name=resource_group_name, + vm_scale_set_name=vm_scale_set_name, + instance_id=instance_id, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('OperationStatusResponse', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + deallocate.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/virtualmachines/{instanceId}/deallocate'} + + + def _delete_initial( + self, resource_group_name, vm_scale_set_name, instance_id, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.delete.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), + 'instanceId': self._serialize.url("instance_id", instance_id, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202, 204]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('OperationStatusResponse', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def delete( + self, resource_group_name, vm_scale_set_name, instance_id, custom_headers=None, raw=False, polling=True, **operation_config): + """Deletes a virtual machine from a VM scale set. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param vm_scale_set_name: The name of the VM scale set. + :type vm_scale_set_name: str + :param instance_id: The instance ID of the virtual machine. + :type instance_id: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns OperationStatusResponse + or ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2016_04_30_preview.models.OperationStatusResponse] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2016_04_30_preview.models.OperationStatusResponse]] + :raises: :class:`CloudError` + """ + raw_result = self._delete_initial( + resource_group_name=resource_group_name, + vm_scale_set_name=vm_scale_set_name, + instance_id=instance_id, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('OperationStatusResponse', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/virtualmachines/{instanceId}'} + + def get( + self, resource_group_name, vm_scale_set_name, instance_id, custom_headers=None, raw=False, **operation_config): + """Gets a virtual machine from a VM scale set. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param vm_scale_set_name: The name of the VM scale set. + :type vm_scale_set_name: str + :param instance_id: The instance ID of the virtual machine. + :type instance_id: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: VirtualMachineScaleSetVM or ClientRawResponse if raw=true + :rtype: + ~azure.mgmt.compute.v2016_04_30_preview.models.VirtualMachineScaleSetVM + or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), + 'instanceId': self._serialize.url("instance_id", instance_id, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('VirtualMachineScaleSetVM', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/virtualmachines/{instanceId}'} + + def get_instance_view( + self, resource_group_name, vm_scale_set_name, instance_id, custom_headers=None, raw=False, **operation_config): + """Gets the status of a virtual machine from a VM scale set. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param vm_scale_set_name: The name of the VM scale set. + :type vm_scale_set_name: str + :param instance_id: The instance ID of the virtual machine. + :type instance_id: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: VirtualMachineScaleSetVMInstanceView or ClientRawResponse if + raw=true + :rtype: + ~azure.mgmt.compute.v2016_04_30_preview.models.VirtualMachineScaleSetVMInstanceView + or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get_instance_view.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), + 'instanceId': self._serialize.url("instance_id", instance_id, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('VirtualMachineScaleSetVMInstanceView', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_instance_view.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/virtualmachines/{instanceId}/instanceView'} + + def list( + self, resource_group_name, virtual_machine_scale_set_name, filter=None, select=None, expand=None, custom_headers=None, raw=False, **operation_config): + """Gets a list of all virtual machines in a VM scale sets. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param virtual_machine_scale_set_name: The name of the VM scale set. + :type virtual_machine_scale_set_name: str + :param filter: The filter to apply to the operation. + :type filter: str + :param select: The list parameters. + :type select: str + :param expand: The expand expression to apply to the operation. + :type expand: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of VirtualMachineScaleSetVM + :rtype: + ~azure.mgmt.compute.v2016_04_30_preview.models.VirtualMachineScaleSetVMPaged[~azure.mgmt.compute.v2016_04_30_preview.models.VirtualMachineScaleSetVM] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'virtualMachineScaleSetName': self._serialize.url("virtual_machine_scale_set_name", virtual_machine_scale_set_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + if filter is not None: + query_parameters['$filter'] = self._serialize.query("filter", filter, 'str') + if select is not None: + query_parameters['$select'] = self._serialize.query("select", select, 'str') + if expand is not None: + query_parameters['$expand'] = self._serialize.query("expand", expand, 'str') + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.VirtualMachineScaleSetVMPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{virtualMachineScaleSetName}/virtualMachines'} + + + def _power_off_initial( + self, resource_group_name, vm_scale_set_name, instance_id, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.power_off.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), + 'instanceId': self._serialize.url("instance_id", instance_id, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('OperationStatusResponse', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def power_off( + self, resource_group_name, vm_scale_set_name, instance_id, custom_headers=None, raw=False, polling=True, **operation_config): + """Power off (stop) a virtual machine in a VM scale set. Note that + resources are still attached and you are getting charged for the + resources. Instead, use deallocate to release resources and avoid + charges. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param vm_scale_set_name: The name of the VM scale set. + :type vm_scale_set_name: str + :param instance_id: The instance ID of the virtual machine. + :type instance_id: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns OperationStatusResponse + or ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2016_04_30_preview.models.OperationStatusResponse] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2016_04_30_preview.models.OperationStatusResponse]] + :raises: :class:`CloudError` + """ + raw_result = self._power_off_initial( + resource_group_name=resource_group_name, + vm_scale_set_name=vm_scale_set_name, + instance_id=instance_id, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('OperationStatusResponse', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + power_off.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/virtualmachines/{instanceId}/poweroff'} + + + def _restart_initial( + self, resource_group_name, vm_scale_set_name, instance_id, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.restart.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), + 'instanceId': self._serialize.url("instance_id", instance_id, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('OperationStatusResponse', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def restart( + self, resource_group_name, vm_scale_set_name, instance_id, custom_headers=None, raw=False, polling=True, **operation_config): + """Restarts a virtual machine in a VM scale set. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param vm_scale_set_name: The name of the VM scale set. + :type vm_scale_set_name: str + :param instance_id: The instance ID of the virtual machine. + :type instance_id: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns OperationStatusResponse + or ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2016_04_30_preview.models.OperationStatusResponse] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2016_04_30_preview.models.OperationStatusResponse]] + :raises: :class:`CloudError` + """ + raw_result = self._restart_initial( + resource_group_name=resource_group_name, + vm_scale_set_name=vm_scale_set_name, + instance_id=instance_id, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('OperationStatusResponse', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + restart.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/virtualmachines/{instanceId}/restart'} + + + def _start_initial( + self, resource_group_name, vm_scale_set_name, instance_id, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.start.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), + 'instanceId': self._serialize.url("instance_id", instance_id, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('OperationStatusResponse', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def start( + self, resource_group_name, vm_scale_set_name, instance_id, custom_headers=None, raw=False, polling=True, **operation_config): + """Starts a virtual machine in a VM scale set. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param vm_scale_set_name: The name of the VM scale set. + :type vm_scale_set_name: str + :param instance_id: The instance ID of the virtual machine. + :type instance_id: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns OperationStatusResponse + or ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2016_04_30_preview.models.OperationStatusResponse] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2016_04_30_preview.models.OperationStatusResponse]] + :raises: :class:`CloudError` + """ + raw_result = self._start_initial( + resource_group_name=resource_group_name, + vm_scale_set_name=vm_scale_set_name, + instance_id=instance_id, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('OperationStatusResponse', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + start.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/virtualmachines/{instanceId}/start'} diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/operations/_virtual_machine_scale_sets_operations.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/operations/_virtual_machine_scale_sets_operations.py new file mode 100644 index 000000000000..91ffa9c4c886 --- /dev/null +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/operations/_virtual_machine_scale_sets_operations.py @@ -0,0 +1,1413 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse +from msrestazure.azure_exceptions import CloudError +from msrest.polling import LROPoller, NoPolling +from msrestazure.polling.arm_polling import ARMPolling + +from .. import models + + +class VirtualMachineScaleSetsOperations(object): + """VirtualMachineScaleSetsOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: Client Api Version. Constant value: "2016-04-30-preview". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2016-04-30-preview" + + self.config = config + + + def _create_or_update_initial( + self, resource_group_name, name, parameters, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.create_or_update.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vmScaleSetName': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(parameters, 'VirtualMachineScaleSet') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 201]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('VirtualMachineScaleSet', response) + if response.status_code == 201: + deserialized = self._deserialize('VirtualMachineScaleSet', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def create_or_update( + self, resource_group_name, name, parameters, custom_headers=None, raw=False, polling=True, **operation_config): + """Create or update a VM scale set. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param name: The name of the VM scale set to create or update. + :type name: str + :param parameters: The scale set object. + :type parameters: + ~azure.mgmt.compute.v2016_04_30_preview.models.VirtualMachineScaleSet + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns VirtualMachineScaleSet + or ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2016_04_30_preview.models.VirtualMachineScaleSet] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2016_04_30_preview.models.VirtualMachineScaleSet]] + :raises: :class:`CloudError` + """ + raw_result = self._create_or_update_initial( + resource_group_name=resource_group_name, + name=name, + parameters=parameters, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('VirtualMachineScaleSet', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}'} + + + def _delete_initial( + self, resource_group_name, vm_scale_set_name, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.delete.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202, 204]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('OperationStatusResponse', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def delete( + self, resource_group_name, vm_scale_set_name, custom_headers=None, raw=False, polling=True, **operation_config): + """Deletes a VM scale set. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param vm_scale_set_name: The name of the VM scale set. + :type vm_scale_set_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns OperationStatusResponse + or ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2016_04_30_preview.models.OperationStatusResponse] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2016_04_30_preview.models.OperationStatusResponse]] + :raises: :class:`CloudError` + """ + raw_result = self._delete_initial( + resource_group_name=resource_group_name, + vm_scale_set_name=vm_scale_set_name, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('OperationStatusResponse', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}'} + + def get( + self, resource_group_name, vm_scale_set_name, custom_headers=None, raw=False, **operation_config): + """Display information about a virtual machine scale set. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param vm_scale_set_name: The name of the VM scale set. + :type vm_scale_set_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: VirtualMachineScaleSet or ClientRawResponse if raw=true + :rtype: + ~azure.mgmt.compute.v2016_04_30_preview.models.VirtualMachineScaleSet + or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('VirtualMachineScaleSet', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}'} + + + def _deallocate_initial( + self, resource_group_name, vm_scale_set_name, instance_ids=None, custom_headers=None, raw=False, **operation_config): + vm_instance_ids = None + if instance_ids is not None: + vm_instance_ids = models.VirtualMachineScaleSetVMInstanceIDs(instance_ids=instance_ids) + + # Construct URL + url = self.deallocate.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + if vm_instance_ids is not None: + body_content = self._serialize.body(vm_instance_ids, 'VirtualMachineScaleSetVMInstanceIDs') + else: + body_content = None + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('OperationStatusResponse', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def deallocate( + self, resource_group_name, vm_scale_set_name, instance_ids=None, custom_headers=None, raw=False, polling=True, **operation_config): + """Deallocates specific virtual machines in a VM scale set. Shuts down the + virtual machines and releases the compute resources. You are not billed + for the compute resources that this virtual machine scale set + deallocates. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param vm_scale_set_name: The name of the VM scale set. + :type vm_scale_set_name: str + :param instance_ids: The virtual machine scale set instance ids. + Omitting the virtual machine scale set instance ids will result in the + operation being performed on all virtual machines in the virtual + machine scale set. + :type instance_ids: list[str] + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns OperationStatusResponse + or ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2016_04_30_preview.models.OperationStatusResponse] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2016_04_30_preview.models.OperationStatusResponse]] + :raises: :class:`CloudError` + """ + raw_result = self._deallocate_initial( + resource_group_name=resource_group_name, + vm_scale_set_name=vm_scale_set_name, + instance_ids=instance_ids, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('OperationStatusResponse', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + deallocate.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/deallocate'} + + + def _delete_instances_initial( + self, resource_group_name, vm_scale_set_name, instance_ids, custom_headers=None, raw=False, **operation_config): + vm_instance_ids = models.VirtualMachineScaleSetVMInstanceRequiredIDs(instance_ids=instance_ids) + + # Construct URL + url = self.delete_instances.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(vm_instance_ids, 'VirtualMachineScaleSetVMInstanceRequiredIDs') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('OperationStatusResponse', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def delete_instances( + self, resource_group_name, vm_scale_set_name, instance_ids, custom_headers=None, raw=False, polling=True, **operation_config): + """Deletes virtual machines in a VM scale set. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param vm_scale_set_name: The name of the VM scale set. + :type vm_scale_set_name: str + :param instance_ids: The virtual machine scale set instance ids. + :type instance_ids: list[str] + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns OperationStatusResponse + or ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2016_04_30_preview.models.OperationStatusResponse] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2016_04_30_preview.models.OperationStatusResponse]] + :raises: :class:`CloudError` + """ + raw_result = self._delete_instances_initial( + resource_group_name=resource_group_name, + vm_scale_set_name=vm_scale_set_name, + instance_ids=instance_ids, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('OperationStatusResponse', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + delete_instances.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/delete'} + + def get_instance_view( + self, resource_group_name, vm_scale_set_name, custom_headers=None, raw=False, **operation_config): + """Gets the status of a VM scale set instance. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param vm_scale_set_name: The name of the VM scale set. + :type vm_scale_set_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: VirtualMachineScaleSetInstanceView or ClientRawResponse if + raw=true + :rtype: + ~azure.mgmt.compute.v2016_04_30_preview.models.VirtualMachineScaleSetInstanceView + or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get_instance_view.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('VirtualMachineScaleSetInstanceView', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_instance_view.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/instanceView'} + + def list( + self, resource_group_name, custom_headers=None, raw=False, **operation_config): + """Gets a list of all VM scale sets under a resource group. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of VirtualMachineScaleSet + :rtype: + ~azure.mgmt.compute.v2016_04_30_preview.models.VirtualMachineScaleSetPaged[~azure.mgmt.compute.v2016_04_30_preview.models.VirtualMachineScaleSet] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.VirtualMachineScaleSetPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets'} + + def list_all( + self, custom_headers=None, raw=False, **operation_config): + """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. + + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of VirtualMachineScaleSet + :rtype: + ~azure.mgmt.compute.v2016_04_30_preview.models.VirtualMachineScaleSetPaged[~azure.mgmt.compute.v2016_04_30_preview.models.VirtualMachineScaleSet] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_all.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.VirtualMachineScaleSetPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_all.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Compute/virtualMachineScaleSets'} + + def list_skus( + self, resource_group_name, vm_scale_set_name, custom_headers=None, raw=False, **operation_config): + """Gets a list of SKUs available for your VM scale set, including the + minimum and maximum VM instances allowed for each SKU. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param vm_scale_set_name: The name of the VM scale set. + :type vm_scale_set_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of VirtualMachineScaleSetSku + :rtype: + ~azure.mgmt.compute.v2016_04_30_preview.models.VirtualMachineScaleSetSkuPaged[~azure.mgmt.compute.v2016_04_30_preview.models.VirtualMachineScaleSetSku] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_skus.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.VirtualMachineScaleSetSkuPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_skus.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/skus'} + + + def _power_off_initial( + self, resource_group_name, vm_scale_set_name, instance_ids=None, custom_headers=None, raw=False, **operation_config): + vm_instance_ids = None + if instance_ids is not None: + vm_instance_ids = models.VirtualMachineScaleSetVMInstanceIDs(instance_ids=instance_ids) + + # Construct URL + url = self.power_off.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + if vm_instance_ids is not None: + body_content = self._serialize.body(vm_instance_ids, 'VirtualMachineScaleSetVMInstanceIDs') + else: + body_content = None + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('OperationStatusResponse', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def power_off( + self, resource_group_name, vm_scale_set_name, instance_ids=None, custom_headers=None, raw=False, polling=True, **operation_config): + """Power off (stop) one or more virtual machines in a VM scale set. Note + that resources are still attached and you are getting charged for the + resources. Instead, use deallocate to release resources and avoid + charges. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param vm_scale_set_name: The name of the VM scale set. + :type vm_scale_set_name: str + :param instance_ids: The virtual machine scale set instance ids. + Omitting the virtual machine scale set instance ids will result in the + operation being performed on all virtual machines in the virtual + machine scale set. + :type instance_ids: list[str] + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns OperationStatusResponse + or ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2016_04_30_preview.models.OperationStatusResponse] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2016_04_30_preview.models.OperationStatusResponse]] + :raises: :class:`CloudError` + """ + raw_result = self._power_off_initial( + resource_group_name=resource_group_name, + vm_scale_set_name=vm_scale_set_name, + instance_ids=instance_ids, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('OperationStatusResponse', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + power_off.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/poweroff'} + + + def _restart_initial( + self, resource_group_name, vm_scale_set_name, instance_ids=None, custom_headers=None, raw=False, **operation_config): + vm_instance_ids = None + if instance_ids is not None: + vm_instance_ids = models.VirtualMachineScaleSetVMInstanceIDs(instance_ids=instance_ids) + + # Construct URL + url = self.restart.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + if vm_instance_ids is not None: + body_content = self._serialize.body(vm_instance_ids, 'VirtualMachineScaleSetVMInstanceIDs') + else: + body_content = None + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('OperationStatusResponse', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def restart( + self, resource_group_name, vm_scale_set_name, instance_ids=None, custom_headers=None, raw=False, polling=True, **operation_config): + """Restarts one or more virtual machines in a VM scale set. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param vm_scale_set_name: The name of the VM scale set. + :type vm_scale_set_name: str + :param instance_ids: The virtual machine scale set instance ids. + Omitting the virtual machine scale set instance ids will result in the + operation being performed on all virtual machines in the virtual + machine scale set. + :type instance_ids: list[str] + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns OperationStatusResponse + or ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2016_04_30_preview.models.OperationStatusResponse] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2016_04_30_preview.models.OperationStatusResponse]] + :raises: :class:`CloudError` + """ + raw_result = self._restart_initial( + resource_group_name=resource_group_name, + vm_scale_set_name=vm_scale_set_name, + instance_ids=instance_ids, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('OperationStatusResponse', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + restart.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/restart'} + + + def _start_initial( + self, resource_group_name, vm_scale_set_name, instance_ids=None, custom_headers=None, raw=False, **operation_config): + vm_instance_ids = None + if instance_ids is not None: + vm_instance_ids = models.VirtualMachineScaleSetVMInstanceIDs(instance_ids=instance_ids) + + # Construct URL + url = self.start.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + if vm_instance_ids is not None: + body_content = self._serialize.body(vm_instance_ids, 'VirtualMachineScaleSetVMInstanceIDs') + else: + body_content = None + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('OperationStatusResponse', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def start( + self, resource_group_name, vm_scale_set_name, instance_ids=None, custom_headers=None, raw=False, polling=True, **operation_config): + """Starts one or more virtual machines in a VM scale set. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param vm_scale_set_name: The name of the VM scale set. + :type vm_scale_set_name: str + :param instance_ids: The virtual machine scale set instance ids. + Omitting the virtual machine scale set instance ids will result in the + operation being performed on all virtual machines in the virtual + machine scale set. + :type instance_ids: list[str] + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns OperationStatusResponse + or ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2016_04_30_preview.models.OperationStatusResponse] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2016_04_30_preview.models.OperationStatusResponse]] + :raises: :class:`CloudError` + """ + raw_result = self._start_initial( + resource_group_name=resource_group_name, + vm_scale_set_name=vm_scale_set_name, + instance_ids=instance_ids, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('OperationStatusResponse', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + start.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/start'} + + + def _update_instances_initial( + self, resource_group_name, vm_scale_set_name, instance_ids, custom_headers=None, raw=False, **operation_config): + vm_instance_ids = models.VirtualMachineScaleSetVMInstanceRequiredIDs(instance_ids=instance_ids) + + # Construct URL + url = self.update_instances.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(vm_instance_ids, 'VirtualMachineScaleSetVMInstanceRequiredIDs') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('OperationStatusResponse', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def update_instances( + self, resource_group_name, vm_scale_set_name, instance_ids, custom_headers=None, raw=False, polling=True, **operation_config): + """Upgrades one or more virtual machines to the latest SKU set in the VM + scale set model. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param vm_scale_set_name: The name of the VM scale set. + :type vm_scale_set_name: str + :param instance_ids: The virtual machine scale set instance ids. + :type instance_ids: list[str] + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns OperationStatusResponse + or ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2016_04_30_preview.models.OperationStatusResponse] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2016_04_30_preview.models.OperationStatusResponse]] + :raises: :class:`CloudError` + """ + raw_result = self._update_instances_initial( + resource_group_name=resource_group_name, + vm_scale_set_name=vm_scale_set_name, + instance_ids=instance_ids, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('OperationStatusResponse', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + update_instances.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/manualupgrade'} + + + def _reimage_initial( + self, resource_group_name, vm_scale_set_name, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.reimage.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('OperationStatusResponse', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def reimage( + self, resource_group_name, vm_scale_set_name, custom_headers=None, raw=False, polling=True, **operation_config): + """Reimages (upgrade the operating system) one or more virtual machines in + a VM scale set. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param vm_scale_set_name: The name of the VM scale set. + :type vm_scale_set_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns OperationStatusResponse + or ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2016_04_30_preview.models.OperationStatusResponse] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2016_04_30_preview.models.OperationStatusResponse]] + :raises: :class:`CloudError` + """ + raw_result = self._reimage_initial( + resource_group_name=resource_group_name, + vm_scale_set_name=vm_scale_set_name, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('OperationStatusResponse', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + reimage.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/reimage'} + + + def _reimage_all_initial( + self, resource_group_name, vm_scale_set_name, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.reimage_all.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('OperationStatusResponse', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def reimage_all( + self, resource_group_name, vm_scale_set_name, custom_headers=None, raw=False, polling=True, **operation_config): + """Reimages all the disks ( including data disks ) in the virtual machines + in a VM scale set. This operation is only supported for managed disks. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param vm_scale_set_name: The name of the VM scale set. + :type vm_scale_set_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns OperationStatusResponse + or ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2016_04_30_preview.models.OperationStatusResponse] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2016_04_30_preview.models.OperationStatusResponse]] + :raises: :class:`CloudError` + """ + raw_result = self._reimage_all_initial( + resource_group_name=resource_group_name, + vm_scale_set_name=vm_scale_set_name, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('OperationStatusResponse', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + reimage_all.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/reimageall'} diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/operations/_virtual_machine_sizes_operations.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/operations/_virtual_machine_sizes_operations.py new file mode 100644 index 000000000000..f3ffb2d8443d --- /dev/null +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/operations/_virtual_machine_sizes_operations.py @@ -0,0 +1,111 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse +from msrestazure.azure_exceptions import CloudError + +from .. import models + + +class VirtualMachineSizesOperations(object): + """VirtualMachineSizesOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: Client Api Version. Constant value: "2016-04-30-preview". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2016-04-30-preview" + + self.config = config + + def list( + self, location, custom_headers=None, raw=False, **operation_config): + """Lists all available virtual machine sizes for a subscription in a + location. + + :param location: The location upon which virtual-machine-sizes is + queried. + :type location: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of VirtualMachineSize + :rtype: + ~azure.mgmt.compute.v2016_04_30_preview.models.VirtualMachineSizePaged[~azure.mgmt.compute.v2016_04_30_preview.models.VirtualMachineSize] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list.metadata['url'] + path_format_arguments = { + 'location': self._serialize.url("location", location, 'str', pattern=r'^[-\w\._]+$'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.VirtualMachineSizePaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/vmSizes'} diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/operations/_virtual_machines_operations.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/operations/_virtual_machines_operations.py new file mode 100644 index 000000000000..d5eb9fff2eef --- /dev/null +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/operations/_virtual_machines_operations.py @@ -0,0 +1,1317 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse +from msrestazure.azure_exceptions import CloudError +from msrest.polling import LROPoller, NoPolling +from msrestazure.polling.arm_polling import ARMPolling + +from .. import models + + +class VirtualMachinesOperations(object): + """VirtualMachinesOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: Client Api Version. Constant value: "2016-04-30-preview". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2016-04-30-preview" + + self.config = config + + def get_extensions( + self, resource_group_name, vm_name, expand=None, custom_headers=None, raw=False, **operation_config): + """The operation to get all extensions of a Virtual Machine. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param vm_name: The name of the virtual machine containing the + extension. + :type vm_name: str + :param expand: The expand expression to apply on the operation. + :type expand: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: VirtualMachineExtensionsListResult or ClientRawResponse if + raw=true + :rtype: + ~azure.mgmt.compute.v2016_04_30_preview.models.VirtualMachineExtensionsListResult + or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get_extensions.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vmName': self._serialize.url("vm_name", vm_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + if expand is not None: + query_parameters['$expand'] = self._serialize.query("expand", expand, 'str') + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('VirtualMachineExtensionsListResult', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_extensions.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/extensions'} + + + def _capture_initial( + self, resource_group_name, vm_name, parameters, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.capture.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vmName': self._serialize.url("vm_name", vm_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(parameters, 'VirtualMachineCaptureParameters') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('VirtualMachineCaptureResult', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def capture( + self, resource_group_name, vm_name, parameters, custom_headers=None, raw=False, polling=True, **operation_config): + """Captures the VM by copying virtual hard disks of the VM and outputs a + template that can be used to create similar VMs. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param vm_name: The name of the virtual machine. + :type vm_name: str + :param parameters: Parameters supplied to the Capture Virtual Machine + operation. + :type parameters: + ~azure.mgmt.compute.v2016_04_30_preview.models.VirtualMachineCaptureParameters + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns + VirtualMachineCaptureResult or + ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2016_04_30_preview.models.VirtualMachineCaptureResult] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2016_04_30_preview.models.VirtualMachineCaptureResult]] + :raises: :class:`CloudError` + """ + raw_result = self._capture_initial( + resource_group_name=resource_group_name, + vm_name=vm_name, + parameters=parameters, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('VirtualMachineCaptureResult', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + capture.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/capture'} + + + def _create_or_update_initial( + self, resource_group_name, vm_name, parameters, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.create_or_update.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vmName': self._serialize.url("vm_name", vm_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(parameters, 'VirtualMachine') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 201]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('VirtualMachine', response) + if response.status_code == 201: + deserialized = self._deserialize('VirtualMachine', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def create_or_update( + self, resource_group_name, vm_name, parameters, custom_headers=None, raw=False, polling=True, **operation_config): + """The operation to create or update a virtual machine. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param vm_name: The name of the virtual machine. + :type vm_name: str + :param parameters: Parameters supplied to the Create Virtual Machine + operation. + :type parameters: + ~azure.mgmt.compute.v2016_04_30_preview.models.VirtualMachine + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns VirtualMachine or + ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2016_04_30_preview.models.VirtualMachine] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2016_04_30_preview.models.VirtualMachine]] + :raises: :class:`CloudError` + """ + raw_result = self._create_or_update_initial( + resource_group_name=resource_group_name, + vm_name=vm_name, + parameters=parameters, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('VirtualMachine', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}'} + + + def _delete_initial( + self, resource_group_name, vm_name, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.delete.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vmName': self._serialize.url("vm_name", vm_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202, 204]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('OperationStatusResponse', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def delete( + self, resource_group_name, vm_name, custom_headers=None, raw=False, polling=True, **operation_config): + """The operation to delete a virtual machine. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param vm_name: The name of the virtual machine. + :type vm_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns OperationStatusResponse + or ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2016_04_30_preview.models.OperationStatusResponse] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2016_04_30_preview.models.OperationStatusResponse]] + :raises: :class:`CloudError` + """ + raw_result = self._delete_initial( + resource_group_name=resource_group_name, + vm_name=vm_name, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('OperationStatusResponse', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}'} + + def get( + self, resource_group_name, vm_name, expand=None, custom_headers=None, raw=False, **operation_config): + """Retrieves information about the model view or the instance view of a + virtual machine. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param vm_name: The name of the virtual machine. + :type vm_name: str + :param expand: The expand expression to apply on the operation. + Possible values include: 'instanceView' + :type expand: str or + ~azure.mgmt.compute.v2016_04_30_preview.models.InstanceViewTypes + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: VirtualMachine or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.compute.v2016_04_30_preview.models.VirtualMachine + or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vmName': self._serialize.url("vm_name", vm_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + if expand is not None: + query_parameters['$expand'] = self._serialize.query("expand", expand, 'InstanceViewTypes') + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('VirtualMachine', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}'} + + + def _convert_to_managed_disks_initial( + self, resource_group_name, vm_name, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.convert_to_managed_disks.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vmName': self._serialize.url("vm_name", vm_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('OperationStatusResponse', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def convert_to_managed_disks( + self, resource_group_name, vm_name, custom_headers=None, raw=False, polling=True, **operation_config): + """Converts virtual machine disks from blob-based to managed disks. + Virtual machine must be stop-deallocated before invoking this + operation. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param vm_name: The name of the virtual machine. + :type vm_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns OperationStatusResponse + or ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2016_04_30_preview.models.OperationStatusResponse] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2016_04_30_preview.models.OperationStatusResponse]] + :raises: :class:`CloudError` + """ + raw_result = self._convert_to_managed_disks_initial( + resource_group_name=resource_group_name, + vm_name=vm_name, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('OperationStatusResponse', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + convert_to_managed_disks.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/convertToManagedDisks'} + + + def _deallocate_initial( + self, resource_group_name, vm_name, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.deallocate.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vmName': self._serialize.url("vm_name", vm_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('OperationStatusResponse', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def deallocate( + self, resource_group_name, vm_name, custom_headers=None, raw=False, polling=True, **operation_config): + """Shuts down the virtual machine and releases the compute resources. You + are not billed for the compute resources that this virtual machine + uses. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param vm_name: The name of the virtual machine. + :type vm_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns OperationStatusResponse + or ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2016_04_30_preview.models.OperationStatusResponse] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2016_04_30_preview.models.OperationStatusResponse]] + :raises: :class:`CloudError` + """ + raw_result = self._deallocate_initial( + resource_group_name=resource_group_name, + vm_name=vm_name, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('OperationStatusResponse', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + deallocate.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/deallocate'} + + def generalize( + self, resource_group_name, vm_name, custom_headers=None, raw=False, **operation_config): + """Sets the state of the virtual machine to generalized. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param vm_name: The name of the virtual machine. + :type vm_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: OperationStatusResponse or ClientRawResponse if raw=true + :rtype: + ~azure.mgmt.compute.v2016_04_30_preview.models.OperationStatusResponse + or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.generalize.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vmName': self._serialize.url("vm_name", vm_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('OperationStatusResponse', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + generalize.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/generalize'} + + def list( + self, resource_group_name, custom_headers=None, raw=False, **operation_config): + """Lists all of the virtual machines in the specified resource group. Use + the nextLink property in the response to get the next page of virtual + machines. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of VirtualMachine + :rtype: + ~azure.mgmt.compute.v2016_04_30_preview.models.VirtualMachinePaged[~azure.mgmt.compute.v2016_04_30_preview.models.VirtualMachine] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.VirtualMachinePaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines'} + + def list_all( + self, custom_headers=None, raw=False, **operation_config): + """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. + + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of VirtualMachine + :rtype: + ~azure.mgmt.compute.v2016_04_30_preview.models.VirtualMachinePaged[~azure.mgmt.compute.v2016_04_30_preview.models.VirtualMachine] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_all.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.VirtualMachinePaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_all.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Compute/virtualMachines'} + + def list_available_sizes( + self, resource_group_name, vm_name, custom_headers=None, raw=False, **operation_config): + """Lists all available virtual machine sizes to which the specified + virtual machine can be resized. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param vm_name: The name of the virtual machine. + :type vm_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of VirtualMachineSize + :rtype: + ~azure.mgmt.compute.v2016_04_30_preview.models.VirtualMachineSizePaged[~azure.mgmt.compute.v2016_04_30_preview.models.VirtualMachineSize] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_available_sizes.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vmName': self._serialize.url("vm_name", vm_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.VirtualMachineSizePaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_available_sizes.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/vmSizes'} + + + def _power_off_initial( + self, resource_group_name, vm_name, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.power_off.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vmName': self._serialize.url("vm_name", vm_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('OperationStatusResponse', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def power_off( + self, resource_group_name, vm_name, custom_headers=None, raw=False, polling=True, **operation_config): + """The operation to power off (stop) a virtual machine. The virtual + machine can be restarted with the same provisioned resources. You are + still charged for this virtual machine. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param vm_name: The name of the virtual machine. + :type vm_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns OperationStatusResponse + or ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2016_04_30_preview.models.OperationStatusResponse] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2016_04_30_preview.models.OperationStatusResponse]] + :raises: :class:`CloudError` + """ + raw_result = self._power_off_initial( + resource_group_name=resource_group_name, + vm_name=vm_name, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('OperationStatusResponse', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + power_off.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/powerOff'} + + + def _restart_initial( + self, resource_group_name, vm_name, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.restart.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vmName': self._serialize.url("vm_name", vm_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('OperationStatusResponse', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def restart( + self, resource_group_name, vm_name, custom_headers=None, raw=False, polling=True, **operation_config): + """The operation to restart a virtual machine. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param vm_name: The name of the virtual machine. + :type vm_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns OperationStatusResponse + or ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2016_04_30_preview.models.OperationStatusResponse] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2016_04_30_preview.models.OperationStatusResponse]] + :raises: :class:`CloudError` + """ + raw_result = self._restart_initial( + resource_group_name=resource_group_name, + vm_name=vm_name, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('OperationStatusResponse', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + restart.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/restart'} + + + def _start_initial( + self, resource_group_name, vm_name, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.start.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vmName': self._serialize.url("vm_name", vm_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('OperationStatusResponse', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def start( + self, resource_group_name, vm_name, custom_headers=None, raw=False, polling=True, **operation_config): + """The operation to start a virtual machine. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param vm_name: The name of the virtual machine. + :type vm_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns OperationStatusResponse + or ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2016_04_30_preview.models.OperationStatusResponse] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2016_04_30_preview.models.OperationStatusResponse]] + :raises: :class:`CloudError` + """ + raw_result = self._start_initial( + resource_group_name=resource_group_name, + vm_name=vm_name, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('OperationStatusResponse', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + start.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/start'} + + + def _redeploy_initial( + self, resource_group_name, vm_name, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.redeploy.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vmName': self._serialize.url("vm_name", vm_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('OperationStatusResponse', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def redeploy( + self, resource_group_name, vm_name, custom_headers=None, raw=False, polling=True, **operation_config): + """The operation to redeploy a virtual machine. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param vm_name: The name of the virtual machine. + :type vm_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns OperationStatusResponse + or ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2016_04_30_preview.models.OperationStatusResponse] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2016_04_30_preview.models.OperationStatusResponse]] + :raises: :class:`CloudError` + """ + raw_result = self._redeploy_initial( + resource_group_name=resource_group_name, + vm_name=vm_name, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('OperationStatusResponse', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + redeploy.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/redeploy'} diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/operations/availability_sets_operations.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/operations/availability_sets_operations.py deleted file mode 100644 index 914dcf1d0d51..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/operations/availability_sets_operations.py +++ /dev/null @@ -1,435 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError - -from .. import models - - -class AvailabilitySetsOperations(object): - """AvailabilitySetsOperations operations. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: Client Api Version. Constant value: "2016-04-30-preview". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2016-04-30-preview" - - self.config = config - - def create_or_update( - self, resource_group_name, name, parameters, custom_headers=None, raw=False, **operation_config): - """Create or update an availability set. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param name: The name of the availability set. - :type name: str - :param parameters: Parameters supplied to the Create Availability Set - operation. - :type parameters: - ~azure.mgmt.compute.v2016_04_30_preview.models.AvailabilitySet - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: AvailabilitySet or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.compute.v2016_04_30_preview.models.AvailabilitySet - or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.create_or_update.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'availabilitySetName': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(parameters, 'AvailabilitySet') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('AvailabilitySet', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}'} - - def delete( - self, resource_group_name, availability_set_name, custom_headers=None, raw=False, **operation_config): - """Delete an availability set. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param availability_set_name: The name of the availability set. - :type availability_set_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: OperationStatusResponse or ClientRawResponse if raw=true - :rtype: - ~azure.mgmt.compute.v2016_04_30_preview.models.OperationStatusResponse - or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.delete.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'availabilitySetName': self._serialize.url("availability_set_name", availability_set_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 204]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('OperationStatusResponse', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}'} - - def get( - self, resource_group_name, availability_set_name, custom_headers=None, raw=False, **operation_config): - """Retrieves information about an availability set. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param availability_set_name: The name of the availability set. - :type availability_set_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: AvailabilitySet or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.compute.v2016_04_30_preview.models.AvailabilitySet - or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'availabilitySetName': self._serialize.url("availability_set_name", availability_set_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('AvailabilitySet', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}'} - - def list_by_subscription( - self, custom_headers=None, raw=False, **operation_config): - """Lists all availability sets in a subscription. - - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of AvailabilitySet - :rtype: - ~azure.mgmt.compute.v2016_04_30_preview.models.AvailabilitySetPaged[~azure.mgmt.compute.v2016_04_30_preview.models.AvailabilitySet] - :raises: :class:`CloudError` - """ - def internal_paging(next_link=None, raw=False): - - if not next_link: - # Construct URL - url = self.list_by_subscription.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - deserialized = models.AvailabilitySetPaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.AvailabilitySetPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - list_by_subscription.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Compute/availabilitySets'} - - def list( - self, resource_group_name, custom_headers=None, raw=False, **operation_config): - """Lists all availability sets in a resource group. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of AvailabilitySet - :rtype: - ~azure.mgmt.compute.v2016_04_30_preview.models.AvailabilitySetPaged[~azure.mgmt.compute.v2016_04_30_preview.models.AvailabilitySet] - :raises: :class:`CloudError` - """ - def internal_paging(next_link=None, raw=False): - - if not next_link: - # Construct URL - url = self.list.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - deserialized = models.AvailabilitySetPaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.AvailabilitySetPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets'} - - def list_available_sizes( - self, resource_group_name, availability_set_name, custom_headers=None, raw=False, **operation_config): - """Lists all available virtual machine sizes that can be used to create a - new virtual machine in an existing availability set. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param availability_set_name: The name of the availability set. - :type availability_set_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of VirtualMachineSize - :rtype: - ~azure.mgmt.compute.v2016_04_30_preview.models.VirtualMachineSizePaged[~azure.mgmt.compute.v2016_04_30_preview.models.VirtualMachineSize] - :raises: :class:`CloudError` - """ - def internal_paging(next_link=None, raw=False): - - if not next_link: - # Construct URL - url = self.list_available_sizes.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'availabilitySetName': self._serialize.url("availability_set_name", availability_set_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - deserialized = models.VirtualMachineSizePaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.VirtualMachineSizePaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - list_available_sizes.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}/vmSizes'} diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/operations/disks_operations.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/operations/disks_operations.py deleted file mode 100644 index 2b75b3433e92..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/operations/disks_operations.py +++ /dev/null @@ -1,750 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError -from msrest.polling import LROPoller, NoPolling -from msrestazure.polling.arm_polling import ARMPolling - -from .. import models - - -class DisksOperations(object): - """DisksOperations operations. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: Client Api Version. Constant value: "2016-04-30-preview". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2016-04-30-preview" - - self.config = config - - - def _create_or_update_initial( - self, resource_group_name, disk_name, disk, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.create_or_update.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'diskName': self._serialize.url("disk_name", disk_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(disk, 'Disk') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('Disk', response) - if response.status_code == 202: - deserialized = self._deserialize('Disk', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def create_or_update( - self, resource_group_name, disk_name, disk, custom_headers=None, raw=False, polling=True, **operation_config): - """Creates or updates a disk. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param disk_name: The name of the managed disk that is being created. - The name can't be changed after the disk is created. Supported - characters for the name are a-z, A-Z, 0-9 and _. The maximum name - length is 80 characters. - :type disk_name: str - :param disk: Disk object supplied in the body of the Put disk - operation. - :type disk: ~azure.mgmt.compute.v2016_04_30_preview.models.Disk - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns Disk or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2016_04_30_preview.models.Disk] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2016_04_30_preview.models.Disk]] - :raises: :class:`CloudError` - """ - raw_result = self._create_or_update_initial( - resource_group_name=resource_group_name, - disk_name=disk_name, - disk=disk, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('Disk', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/disks/{diskName}'} - - - def _update_initial( - self, resource_group_name, disk_name, disk, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.update.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'diskName': self._serialize.url("disk_name", disk_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(disk, 'DiskUpdate') - - # Construct and send request - request = self._client.patch(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('Disk', response) - if response.status_code == 202: - deserialized = self._deserialize('Disk', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def update( - self, resource_group_name, disk_name, disk, custom_headers=None, raw=False, polling=True, **operation_config): - """Updates (patches) a disk. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param disk_name: The name of the managed disk that is being created. - The name can't be changed after the disk is created. Supported - characters for the name are a-z, A-Z, 0-9 and _. The maximum name - length is 80 characters. - :type disk_name: str - :param disk: Disk object supplied in the body of the Patch disk - operation. - :type disk: ~azure.mgmt.compute.v2016_04_30_preview.models.DiskUpdate - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns Disk or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2016_04_30_preview.models.Disk] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2016_04_30_preview.models.Disk]] - :raises: :class:`CloudError` - """ - raw_result = self._update_initial( - resource_group_name=resource_group_name, - disk_name=disk_name, - disk=disk, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('Disk', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/disks/{diskName}'} - - def get( - self, resource_group_name, disk_name, custom_headers=None, raw=False, **operation_config): - """Gets information about a disk. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param disk_name: The name of the managed disk that is being created. - The name can't be changed after the disk is created. Supported - characters for the name are a-z, A-Z, 0-9 and _. The maximum name - length is 80 characters. - :type disk_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: Disk or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.compute.v2016_04_30_preview.models.Disk or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'diskName': self._serialize.url("disk_name", disk_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('Disk', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/disks/{diskName}'} - - - def _delete_initial( - self, resource_group_name, disk_name, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.delete.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'diskName': self._serialize.url("disk_name", disk_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202, 204]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('OperationStatusResponse', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def delete( - self, resource_group_name, disk_name, custom_headers=None, raw=False, polling=True, **operation_config): - """Deletes a disk. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param disk_name: The name of the managed disk that is being created. - The name can't be changed after the disk is created. Supported - characters for the name are a-z, A-Z, 0-9 and _. The maximum name - length is 80 characters. - :type disk_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns OperationStatusResponse - or ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2016_04_30_preview.models.OperationStatusResponse] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2016_04_30_preview.models.OperationStatusResponse]] - :raises: :class:`CloudError` - """ - raw_result = self._delete_initial( - resource_group_name=resource_group_name, - disk_name=disk_name, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('OperationStatusResponse', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/disks/{diskName}'} - - def list_by_resource_group( - self, resource_group_name, custom_headers=None, raw=False, **operation_config): - """Lists all the disks under a resource group. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of Disk - :rtype: - ~azure.mgmt.compute.v2016_04_30_preview.models.DiskPaged[~azure.mgmt.compute.v2016_04_30_preview.models.Disk] - :raises: :class:`CloudError` - """ - def internal_paging(next_link=None, raw=False): - - if not next_link: - # Construct URL - url = self.list_by_resource_group.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - deserialized = models.DiskPaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.DiskPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/disks'} - - def list( - self, custom_headers=None, raw=False, **operation_config): - """Lists all the disks under a subscription. - - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of Disk - :rtype: - ~azure.mgmt.compute.v2016_04_30_preview.models.DiskPaged[~azure.mgmt.compute.v2016_04_30_preview.models.Disk] - :raises: :class:`CloudError` - """ - def internal_paging(next_link=None, raw=False): - - if not next_link: - # Construct URL - url = self.list.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - deserialized = models.DiskPaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.DiskPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Compute/disks'} - - - def _grant_access_initial( - self, resource_group_name, disk_name, access, duration_in_seconds, custom_headers=None, raw=False, **operation_config): - grant_access_data = models.GrantAccessData(access=access, duration_in_seconds=duration_in_seconds) - - # Construct URL - url = self.grant_access.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'diskName': self._serialize.url("disk_name", disk_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(grant_access_data, 'GrantAccessData') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('AccessUri', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def grant_access( - self, resource_group_name, disk_name, access, duration_in_seconds, custom_headers=None, raw=False, polling=True, **operation_config): - """Grants access to a disk. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param disk_name: The name of the managed disk that is being created. - The name can't be changed after the disk is created. Supported - characters for the name are a-z, A-Z, 0-9 and _. The maximum name - length is 80 characters. - :type disk_name: str - :param access: Possible values include: 'None', 'Read' - :type access: str or - ~azure.mgmt.compute.v2016_04_30_preview.models.AccessLevel - :param duration_in_seconds: Time duration in seconds until the SAS - access expires. - :type duration_in_seconds: int - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns AccessUri or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2016_04_30_preview.models.AccessUri] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2016_04_30_preview.models.AccessUri]] - :raises: :class:`CloudError` - """ - raw_result = self._grant_access_initial( - resource_group_name=resource_group_name, - disk_name=disk_name, - access=access, - duration_in_seconds=duration_in_seconds, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('AccessUri', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - grant_access.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/disks/{diskName}/beginGetAccess'} - - - def _revoke_access_initial( - self, resource_group_name, disk_name, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.revoke_access.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'diskName': self._serialize.url("disk_name", disk_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('OperationStatusResponse', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def revoke_access( - self, resource_group_name, disk_name, custom_headers=None, raw=False, polling=True, **operation_config): - """Revokes access to a disk. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param disk_name: The name of the managed disk that is being created. - The name can't be changed after the disk is created. Supported - characters for the name are a-z, A-Z, 0-9 and _. The maximum name - length is 80 characters. - :type disk_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns OperationStatusResponse - or ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2016_04_30_preview.models.OperationStatusResponse] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2016_04_30_preview.models.OperationStatusResponse]] - :raises: :class:`CloudError` - """ - raw_result = self._revoke_access_initial( - resource_group_name=resource_group_name, - disk_name=disk_name, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('OperationStatusResponse', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - revoke_access.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/disks/{diskName}/endGetAccess'} diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/operations/images_operations.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/operations/images_operations.py deleted file mode 100644 index cdbdd51ff055..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/operations/images_operations.py +++ /dev/null @@ -1,434 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError -from msrest.polling import LROPoller, NoPolling -from msrestazure.polling.arm_polling import ARMPolling - -from .. import models - - -class ImagesOperations(object): - """ImagesOperations operations. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: Client Api Version. Constant value: "2016-04-30-preview". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2016-04-30-preview" - - self.config = config - - - def _create_or_update_initial( - self, resource_group_name, image_name, parameters, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.create_or_update.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'imageName': self._serialize.url("image_name", image_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(parameters, 'Image') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 201]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('Image', response) - if response.status_code == 201: - deserialized = self._deserialize('Image', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def create_or_update( - self, resource_group_name, image_name, parameters, custom_headers=None, raw=False, polling=True, **operation_config): - """Create or update an image. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param image_name: The name of the image. - :type image_name: str - :param parameters: Parameters supplied to the Create Image operation. - :type parameters: ~azure.mgmt.compute.v2016_04_30_preview.models.Image - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns Image or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2016_04_30_preview.models.Image] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2016_04_30_preview.models.Image]] - :raises: :class:`CloudError` - """ - raw_result = self._create_or_update_initial( - resource_group_name=resource_group_name, - image_name=image_name, - parameters=parameters, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('Image', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/images/{imageName}'} - - - def _delete_initial( - self, resource_group_name, image_name, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.delete.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'imageName': self._serialize.url("image_name", image_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202, 204]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('OperationStatusResponse', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def delete( - self, resource_group_name, image_name, custom_headers=None, raw=False, polling=True, **operation_config): - """Deletes an Image. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param image_name: The name of the image. - :type image_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns OperationStatusResponse - or ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2016_04_30_preview.models.OperationStatusResponse] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2016_04_30_preview.models.OperationStatusResponse]] - :raises: :class:`CloudError` - """ - raw_result = self._delete_initial( - resource_group_name=resource_group_name, - image_name=image_name, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('OperationStatusResponse', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/images/{imageName}'} - - def get( - self, resource_group_name, image_name, expand=None, custom_headers=None, raw=False, **operation_config): - """Gets an image. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param image_name: The name of the image. - :type image_name: str - :param expand: The expand expression to apply on the operation. - :type expand: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: Image or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.compute.v2016_04_30_preview.models.Image or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'imageName': self._serialize.url("image_name", image_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - if expand is not None: - query_parameters['$expand'] = self._serialize.query("expand", expand, 'str') - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('Image', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/images/{imageName}'} - - def list_by_resource_group( - self, resource_group_name, custom_headers=None, raw=False, **operation_config): - """Gets the list of images under a resource group. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of Image - :rtype: - ~azure.mgmt.compute.v2016_04_30_preview.models.ImagePaged[~azure.mgmt.compute.v2016_04_30_preview.models.Image] - :raises: :class:`CloudError` - """ - def internal_paging(next_link=None, raw=False): - - if not next_link: - # Construct URL - url = self.list_by_resource_group.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - deserialized = models.ImagePaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.ImagePaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/images'} - - def list( - self, custom_headers=None, raw=False, **operation_config): - """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. - - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of Image - :rtype: - ~azure.mgmt.compute.v2016_04_30_preview.models.ImagePaged[~azure.mgmt.compute.v2016_04_30_preview.models.Image] - :raises: :class:`CloudError` - """ - def internal_paging(next_link=None, raw=False): - - if not next_link: - # Construct URL - url = self.list.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - deserialized = models.ImagePaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.ImagePaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Compute/images'} diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/operations/snapshots_operations.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/operations/snapshots_operations.py deleted file mode 100644 index 0492d1420a49..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/operations/snapshots_operations.py +++ /dev/null @@ -1,740 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError -from msrest.polling import LROPoller, NoPolling -from msrestazure.polling.arm_polling import ARMPolling - -from .. import models - - -class SnapshotsOperations(object): - """SnapshotsOperations operations. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: Client Api Version. Constant value: "2016-04-30-preview". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2016-04-30-preview" - - self.config = config - - - def _create_or_update_initial( - self, resource_group_name, snapshot_name, snapshot, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.create_or_update.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'snapshotName': self._serialize.url("snapshot_name", snapshot_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(snapshot, 'Snapshot') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('Snapshot', response) - if response.status_code == 202: - deserialized = self._deserialize('Snapshot', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def create_or_update( - self, resource_group_name, snapshot_name, snapshot, custom_headers=None, raw=False, polling=True, **operation_config): - """Creates or updates a snapshot. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param snapshot_name: The name of the snapshot within the given - subscription and resource group. - :type snapshot_name: str - :param snapshot: Snapshot object supplied in the body of the Put disk - operation. - :type snapshot: - ~azure.mgmt.compute.v2016_04_30_preview.models.Snapshot - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns Snapshot or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2016_04_30_preview.models.Snapshot] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2016_04_30_preview.models.Snapshot]] - :raises: :class:`CloudError` - """ - raw_result = self._create_or_update_initial( - resource_group_name=resource_group_name, - snapshot_name=snapshot_name, - snapshot=snapshot, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('Snapshot', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/snapshots/{snapshotName}'} - - - def _update_initial( - self, resource_group_name, snapshot_name, snapshot, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.update.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'snapshotName': self._serialize.url("snapshot_name", snapshot_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(snapshot, 'SnapshotUpdate') - - # Construct and send request - request = self._client.patch(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('Snapshot', response) - if response.status_code == 202: - deserialized = self._deserialize('Snapshot', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def update( - self, resource_group_name, snapshot_name, snapshot, custom_headers=None, raw=False, polling=True, **operation_config): - """Updates (patches) a snapshot. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param snapshot_name: The name of the snapshot within the given - subscription and resource group. - :type snapshot_name: str - :param snapshot: Snapshot object supplied in the body of the Patch - snapshot operation. - :type snapshot: - ~azure.mgmt.compute.v2016_04_30_preview.models.SnapshotUpdate - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns Snapshot or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2016_04_30_preview.models.Snapshot] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2016_04_30_preview.models.Snapshot]] - :raises: :class:`CloudError` - """ - raw_result = self._update_initial( - resource_group_name=resource_group_name, - snapshot_name=snapshot_name, - snapshot=snapshot, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('Snapshot', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/snapshots/{snapshotName}'} - - def get( - self, resource_group_name, snapshot_name, custom_headers=None, raw=False, **operation_config): - """Gets information about a snapshot. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param snapshot_name: The name of the snapshot within the given - subscription and resource group. - :type snapshot_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: Snapshot or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.compute.v2016_04_30_preview.models.Snapshot or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'snapshotName': self._serialize.url("snapshot_name", snapshot_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('Snapshot', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/snapshots/{snapshotName}'} - - - def _delete_initial( - self, resource_group_name, snapshot_name, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.delete.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'snapshotName': self._serialize.url("snapshot_name", snapshot_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202, 204]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('OperationStatusResponse', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def delete( - self, resource_group_name, snapshot_name, custom_headers=None, raw=False, polling=True, **operation_config): - """Deletes a snapshot. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param snapshot_name: The name of the snapshot within the given - subscription and resource group. - :type snapshot_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns OperationStatusResponse - or ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2016_04_30_preview.models.OperationStatusResponse] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2016_04_30_preview.models.OperationStatusResponse]] - :raises: :class:`CloudError` - """ - raw_result = self._delete_initial( - resource_group_name=resource_group_name, - snapshot_name=snapshot_name, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('OperationStatusResponse', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/snapshots/{snapshotName}'} - - def list_by_resource_group( - self, resource_group_name, custom_headers=None, raw=False, **operation_config): - """Lists snapshots under a resource group. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of Snapshot - :rtype: - ~azure.mgmt.compute.v2016_04_30_preview.models.SnapshotPaged[~azure.mgmt.compute.v2016_04_30_preview.models.Snapshot] - :raises: :class:`CloudError` - """ - def internal_paging(next_link=None, raw=False): - - if not next_link: - # Construct URL - url = self.list_by_resource_group.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - deserialized = models.SnapshotPaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.SnapshotPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/snapshots'} - - def list( - self, custom_headers=None, raw=False, **operation_config): - """Lists snapshots under a subscription. - - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of Snapshot - :rtype: - ~azure.mgmt.compute.v2016_04_30_preview.models.SnapshotPaged[~azure.mgmt.compute.v2016_04_30_preview.models.Snapshot] - :raises: :class:`CloudError` - """ - def internal_paging(next_link=None, raw=False): - - if not next_link: - # Construct URL - url = self.list.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - deserialized = models.SnapshotPaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.SnapshotPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Compute/snapshots'} - - - def _grant_access_initial( - self, resource_group_name, snapshot_name, access, duration_in_seconds, custom_headers=None, raw=False, **operation_config): - grant_access_data = models.GrantAccessData(access=access, duration_in_seconds=duration_in_seconds) - - # Construct URL - url = self.grant_access.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'snapshotName': self._serialize.url("snapshot_name", snapshot_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(grant_access_data, 'GrantAccessData') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('AccessUri', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def grant_access( - self, resource_group_name, snapshot_name, access, duration_in_seconds, custom_headers=None, raw=False, polling=True, **operation_config): - """Grants access to a snapshot. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param snapshot_name: The name of the snapshot within the given - subscription and resource group. - :type snapshot_name: str - :param access: Possible values include: 'None', 'Read' - :type access: str or - ~azure.mgmt.compute.v2016_04_30_preview.models.AccessLevel - :param duration_in_seconds: Time duration in seconds until the SAS - access expires. - :type duration_in_seconds: int - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns AccessUri or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2016_04_30_preview.models.AccessUri] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2016_04_30_preview.models.AccessUri]] - :raises: :class:`CloudError` - """ - raw_result = self._grant_access_initial( - resource_group_name=resource_group_name, - snapshot_name=snapshot_name, - access=access, - duration_in_seconds=duration_in_seconds, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('AccessUri', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - grant_access.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/snapshots/{snapshotName}/beginGetAccess'} - - - def _revoke_access_initial( - self, resource_group_name, snapshot_name, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.revoke_access.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'snapshotName': self._serialize.url("snapshot_name", snapshot_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('OperationStatusResponse', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def revoke_access( - self, resource_group_name, snapshot_name, custom_headers=None, raw=False, polling=True, **operation_config): - """Revokes access to a snapshot. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param snapshot_name: The name of the snapshot within the given - subscription and resource group. - :type snapshot_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns OperationStatusResponse - or ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2016_04_30_preview.models.OperationStatusResponse] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2016_04_30_preview.models.OperationStatusResponse]] - :raises: :class:`CloudError` - """ - raw_result = self._revoke_access_initial( - resource_group_name=resource_group_name, - snapshot_name=snapshot_name, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('OperationStatusResponse', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - revoke_access.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/snapshots/{snapshotName}/endGetAccess'} diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/operations/usage_operations.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/operations/usage_operations.py deleted file mode 100644 index 3b1be4c564ce..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/operations/usage_operations.py +++ /dev/null @@ -1,107 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError - -from .. import models - - -class UsageOperations(object): - """UsageOperations operations. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: Client Api Version. Constant value: "2016-04-30-preview". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2016-04-30-preview" - - self.config = config - - def list( - self, location, custom_headers=None, raw=False, **operation_config): - """Gets, for the specified location, the current compute resource usage - information as well as the limits for compute resources under the - subscription. - - :param location: The location for which resource usage is queried. - :type location: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of Usage - :rtype: - ~azure.mgmt.compute.v2016_04_30_preview.models.UsagePaged[~azure.mgmt.compute.v2016_04_30_preview.models.Usage] - :raises: :class:`CloudError` - """ - def internal_paging(next_link=None, raw=False): - - if not next_link: - # Construct URL - url = self.list.metadata['url'] - path_format_arguments = { - 'location': self._serialize.url("location", location, 'str', pattern=r'^[-\w\._]+$'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - deserialized = models.UsagePaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.UsagePaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/usages'} diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/operations/virtual_machine_extension_images_operations.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/operations/virtual_machine_extension_images_operations.py deleted file mode 100644 index 3db3c657a95c..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/operations/virtual_machine_extension_images_operations.py +++ /dev/null @@ -1,248 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError - -from .. import models - - -class VirtualMachineExtensionImagesOperations(object): - """VirtualMachineExtensionImagesOperations operations. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: Client Api Version. Constant value: "2016-04-30-preview". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2016-04-30-preview" - - self.config = config - - def get( - self, location, publisher_name, type, version, custom_headers=None, raw=False, **operation_config): - """Gets a virtual machine extension image. - - :param location: The name of a supported Azure region. - :type location: str - :param publisher_name: - :type publisher_name: str - :param type: - :type type: str - :param version: - :type version: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: VirtualMachineExtensionImage or ClientRawResponse if raw=true - :rtype: - ~azure.mgmt.compute.v2016_04_30_preview.models.VirtualMachineExtensionImage - or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get.metadata['url'] - path_format_arguments = { - 'location': self._serialize.url("location", location, 'str'), - 'publisherName': self._serialize.url("publisher_name", publisher_name, 'str'), - 'type': self._serialize.url("type", type, 'str'), - 'version': self._serialize.url("version", version, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('VirtualMachineExtensionImage', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/publishers/{publisherName}/artifacttypes/vmextension/types/{type}/versions/{version}'} - - def list_types( - self, location, publisher_name, custom_headers=None, raw=False, **operation_config): - """Gets a list of virtual machine extension image types. - - :param location: The name of a supported Azure region. - :type location: str - :param publisher_name: - :type publisher_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: list or ClientRawResponse if raw=true - :rtype: - list[~azure.mgmt.compute.v2016_04_30_preview.models.VirtualMachineExtensionImage] - or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.list_types.metadata['url'] - path_format_arguments = { - 'location': self._serialize.url("location", location, 'str'), - 'publisherName': self._serialize.url("publisher_name", publisher_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('[VirtualMachineExtensionImage]', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - list_types.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/publishers/{publisherName}/artifacttypes/vmextension/types'} - - def list_versions( - self, location, publisher_name, type, filter=None, top=None, orderby=None, custom_headers=None, raw=False, **operation_config): - """Gets a list of virtual machine extension image versions. - - :param location: The name of a supported Azure region. - :type location: str - :param publisher_name: - :type publisher_name: str - :param type: - :type type: str - :param filter: The filter to apply on the operation. - :type filter: str - :param top: - :type top: int - :param orderby: - :type orderby: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: list or ClientRawResponse if raw=true - :rtype: - list[~azure.mgmt.compute.v2016_04_30_preview.models.VirtualMachineExtensionImage] - or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.list_versions.metadata['url'] - path_format_arguments = { - 'location': self._serialize.url("location", location, 'str'), - 'publisherName': self._serialize.url("publisher_name", publisher_name, 'str'), - 'type': self._serialize.url("type", type, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - if filter is not None: - query_parameters['$filter'] = self._serialize.query("filter", filter, 'str') - if top is not None: - query_parameters['$top'] = self._serialize.query("top", top, 'int') - if orderby is not None: - query_parameters['$orderby'] = self._serialize.query("orderby", orderby, 'str') - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('[VirtualMachineExtensionImage]', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - list_versions.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/publishers/{publisherName}/artifacttypes/vmextension/types/{type}/versions'} diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/operations/virtual_machine_extensions_operations.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/operations/virtual_machine_extensions_operations.py deleted file mode 100644 index 02f2d5e9aafb..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/operations/virtual_machine_extensions_operations.py +++ /dev/null @@ -1,425 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError -from msrest.polling import LROPoller, NoPolling -from msrestazure.polling.arm_polling import ARMPolling - -from .. import models - - -class VirtualMachineExtensionsOperations(object): - """VirtualMachineExtensionsOperations operations. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: Client Api Version. Constant value: "2016-04-30-preview". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2016-04-30-preview" - - self.config = config - - - def _create_or_update_initial( - self, resource_group_name, vm_name, vm_extension_name, extension_parameters, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.create_or_update.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'vmName': self._serialize.url("vm_name", vm_name, 'str'), - 'vmExtensionName': self._serialize.url("vm_extension_name", vm_extension_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(extension_parameters, 'VirtualMachineExtension') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 201]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('VirtualMachineExtension', response) - if response.status_code == 201: - deserialized = self._deserialize('VirtualMachineExtension', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def create_or_update( - self, resource_group_name, vm_name, vm_extension_name, extension_parameters, custom_headers=None, raw=False, polling=True, **operation_config): - """The operation to create or update the extension. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param vm_name: The name of the virtual machine where the extension - should be created or updated. - :type vm_name: str - :param vm_extension_name: The name of the virtual machine extension. - :type vm_extension_name: str - :param extension_parameters: Parameters supplied to the Create Virtual - Machine Extension operation. - :type extension_parameters: - ~azure.mgmt.compute.v2016_04_30_preview.models.VirtualMachineExtension - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns VirtualMachineExtension - or ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2016_04_30_preview.models.VirtualMachineExtension] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2016_04_30_preview.models.VirtualMachineExtension]] - :raises: :class:`CloudError` - """ - raw_result = self._create_or_update_initial( - resource_group_name=resource_group_name, - vm_name=vm_name, - vm_extension_name=vm_extension_name, - extension_parameters=extension_parameters, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('VirtualMachineExtension', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/extensions/{vmExtensionName}'} - - - def _update_initial( - self, resource_group_name, vm_name, vm_extension_name, extension_parameters, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.update.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'vmName': self._serialize.url("vm_name", vm_name, 'str'), - 'vmExtensionName': self._serialize.url("vm_extension_name", vm_extension_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(extension_parameters, 'VirtualMachineExtensionUpdate') - - # Construct and send request - request = self._client.patch(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('VirtualMachineExtension', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def update( - self, resource_group_name, vm_name, vm_extension_name, extension_parameters, custom_headers=None, raw=False, polling=True, **operation_config): - """The operation to update the extension. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param vm_name: The name of the virtual machine where the extension - should be updated. - :type vm_name: str - :param vm_extension_name: The name of the virtual machine extension. - :type vm_extension_name: str - :param extension_parameters: Parameters supplied to the Update Virtual - Machine Extension operation. - :type extension_parameters: - ~azure.mgmt.compute.v2016_04_30_preview.models.VirtualMachineExtensionUpdate - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns VirtualMachineExtension - or ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2016_04_30_preview.models.VirtualMachineExtension] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2016_04_30_preview.models.VirtualMachineExtension]] - :raises: :class:`CloudError` - """ - raw_result = self._update_initial( - resource_group_name=resource_group_name, - vm_name=vm_name, - vm_extension_name=vm_extension_name, - extension_parameters=extension_parameters, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('VirtualMachineExtension', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/extensions/{vmExtensionName}'} - - - def _delete_initial( - self, resource_group_name, vm_name, vm_extension_name, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.delete.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'vmName': self._serialize.url("vm_name", vm_name, 'str'), - 'vmExtensionName': self._serialize.url("vm_extension_name", vm_extension_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202, 204]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('OperationStatusResponse', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def delete( - self, resource_group_name, vm_name, vm_extension_name, custom_headers=None, raw=False, polling=True, **operation_config): - """The operation to delete the extension. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param vm_name: The name of the virtual machine where the extension - should be deleted. - :type vm_name: str - :param vm_extension_name: The name of the virtual machine extension. - :type vm_extension_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns OperationStatusResponse - or ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2016_04_30_preview.models.OperationStatusResponse] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2016_04_30_preview.models.OperationStatusResponse]] - :raises: :class:`CloudError` - """ - raw_result = self._delete_initial( - resource_group_name=resource_group_name, - vm_name=vm_name, - vm_extension_name=vm_extension_name, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('OperationStatusResponse', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/extensions/{vmExtensionName}'} - - def get( - self, resource_group_name, vm_name, vm_extension_name, expand=None, custom_headers=None, raw=False, **operation_config): - """The operation to get the extension. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param vm_name: The name of the virtual machine containing the - extension. - :type vm_name: str - :param vm_extension_name: The name of the virtual machine extension. - :type vm_extension_name: str - :param expand: The expand expression to apply on the operation. - :type expand: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: VirtualMachineExtension or ClientRawResponse if raw=true - :rtype: - ~azure.mgmt.compute.v2016_04_30_preview.models.VirtualMachineExtension - or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'vmName': self._serialize.url("vm_name", vm_name, 'str'), - 'vmExtensionName': self._serialize.url("vm_extension_name", vm_extension_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - if expand is not None: - query_parameters['$expand'] = self._serialize.query("expand", expand, 'str') - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('VirtualMachineExtension', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/extensions/{vmExtensionName}'} diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/operations/virtual_machine_images_operations.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/operations/virtual_machine_images_operations.py deleted file mode 100644 index 094fbf753649..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/operations/virtual_machine_images_operations.py +++ /dev/null @@ -1,384 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError - -from .. import models - - -class VirtualMachineImagesOperations(object): - """VirtualMachineImagesOperations operations. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: Client Api Version. Constant value: "2016-04-30-preview". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2016-04-30-preview" - - self.config = config - - def get( - self, location, publisher_name, offer, skus, version, custom_headers=None, raw=False, **operation_config): - """Gets a virtual machine image. - - :param location: The name of a supported Azure region. - :type location: str - :param publisher_name: A valid image publisher. - :type publisher_name: str - :param offer: A valid image publisher offer. - :type offer: str - :param skus: A valid image SKU. - :type skus: str - :param version: A valid image SKU version. - :type version: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: VirtualMachineImage or ClientRawResponse if raw=true - :rtype: - ~azure.mgmt.compute.v2016_04_30_preview.models.VirtualMachineImage or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get.metadata['url'] - path_format_arguments = { - 'location': self._serialize.url("location", location, 'str'), - 'publisherName': self._serialize.url("publisher_name", publisher_name, 'str'), - 'offer': self._serialize.url("offer", offer, 'str'), - 'skus': self._serialize.url("skus", skus, 'str'), - 'version': self._serialize.url("version", version, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('VirtualMachineImage', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/publishers/{publisherName}/artifacttypes/vmimage/offers/{offer}/skus/{skus}/versions/{version}'} - - def list( - self, location, publisher_name, offer, skus, filter=None, top=None, orderby=None, custom_headers=None, raw=False, **operation_config): - """Gets a list of all virtual machine image versions for the specified - location, publisher, offer, and SKU. - - :param location: The name of a supported Azure region. - :type location: str - :param publisher_name: A valid image publisher. - :type publisher_name: str - :param offer: A valid image publisher offer. - :type offer: str - :param skus: A valid image SKU. - :type skus: str - :param filter: The filter to apply on the operation. - :type filter: str - :param top: - :type top: int - :param orderby: - :type orderby: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: list or ClientRawResponse if raw=true - :rtype: - list[~azure.mgmt.compute.v2016_04_30_preview.models.VirtualMachineImageResource] - or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.list.metadata['url'] - path_format_arguments = { - 'location': self._serialize.url("location", location, 'str'), - 'publisherName': self._serialize.url("publisher_name", publisher_name, 'str'), - 'offer': self._serialize.url("offer", offer, 'str'), - 'skus': self._serialize.url("skus", skus, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - if filter is not None: - query_parameters['$filter'] = self._serialize.query("filter", filter, 'str') - if top is not None: - query_parameters['$top'] = self._serialize.query("top", top, 'int') - if orderby is not None: - query_parameters['$orderby'] = self._serialize.query("orderby", orderby, 'str') - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('[VirtualMachineImageResource]', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/publishers/{publisherName}/artifacttypes/vmimage/offers/{offer}/skus/{skus}/versions'} - - def list_offers( - self, location, publisher_name, custom_headers=None, raw=False, **operation_config): - """Gets a list of virtual machine image offers for the specified location - and publisher. - - :param location: The name of a supported Azure region. - :type location: str - :param publisher_name: A valid image publisher. - :type publisher_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: list or ClientRawResponse if raw=true - :rtype: - list[~azure.mgmt.compute.v2016_04_30_preview.models.VirtualMachineImageResource] - or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.list_offers.metadata['url'] - path_format_arguments = { - 'location': self._serialize.url("location", location, 'str'), - 'publisherName': self._serialize.url("publisher_name", publisher_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('[VirtualMachineImageResource]', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - list_offers.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/publishers/{publisherName}/artifacttypes/vmimage/offers'} - - def list_publishers( - self, location, custom_headers=None, raw=False, **operation_config): - """Gets a list of virtual machine image publishers for the specified Azure - location. - - :param location: The name of a supported Azure region. - :type location: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: list or ClientRawResponse if raw=true - :rtype: - list[~azure.mgmt.compute.v2016_04_30_preview.models.VirtualMachineImageResource] - or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.list_publishers.metadata['url'] - path_format_arguments = { - 'location': self._serialize.url("location", location, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('[VirtualMachineImageResource]', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - list_publishers.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/publishers'} - - def list_skus( - self, location, publisher_name, offer, custom_headers=None, raw=False, **operation_config): - """Gets a list of virtual machine image SKUs for the specified location, - publisher, and offer. - - :param location: The name of a supported Azure region. - :type location: str - :param publisher_name: A valid image publisher. - :type publisher_name: str - :param offer: A valid image publisher offer. - :type offer: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: list or ClientRawResponse if raw=true - :rtype: - list[~azure.mgmt.compute.v2016_04_30_preview.models.VirtualMachineImageResource] - or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.list_skus.metadata['url'] - path_format_arguments = { - 'location': self._serialize.url("location", location, 'str'), - 'publisherName': self._serialize.url("publisher_name", publisher_name, 'str'), - 'offer': self._serialize.url("offer", offer, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('[VirtualMachineImageResource]', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - list_skus.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/publishers/{publisherName}/artifacttypes/vmimage/offers/{offer}/skus'} diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/operations/virtual_machine_scale_set_vms_operations.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/operations/virtual_machine_scale_set_vms_operations.py deleted file mode 100644 index 5fe85ddc68a0..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/operations/virtual_machine_scale_set_vms_operations.py +++ /dev/null @@ -1,943 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError -from msrest.polling import LROPoller, NoPolling -from msrestazure.polling.arm_polling import ARMPolling - -from .. import models - - -class VirtualMachineScaleSetVMsOperations(object): - """VirtualMachineScaleSetVMsOperations operations. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: Client Api Version. Constant value: "2016-04-30-preview". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2016-04-30-preview" - - self.config = config - - - def _reimage_initial( - self, resource_group_name, vm_scale_set_name, instance_id, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.reimage.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), - 'instanceId': self._serialize.url("instance_id", instance_id, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('OperationStatusResponse', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def reimage( - self, resource_group_name, vm_scale_set_name, instance_id, custom_headers=None, raw=False, polling=True, **operation_config): - """Reimages (upgrade the operating system) a specific virtual machine in a - VM scale set. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param vm_scale_set_name: The name of the VM scale set. - :type vm_scale_set_name: str - :param instance_id: The instance ID of the virtual machine. - :type instance_id: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns OperationStatusResponse - or ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2016_04_30_preview.models.OperationStatusResponse] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2016_04_30_preview.models.OperationStatusResponse]] - :raises: :class:`CloudError` - """ - raw_result = self._reimage_initial( - resource_group_name=resource_group_name, - vm_scale_set_name=vm_scale_set_name, - instance_id=instance_id, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('OperationStatusResponse', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - reimage.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/virtualmachines/{instanceId}/reimage'} - - - def _reimage_all_initial( - self, resource_group_name, vm_scale_set_name, instance_id, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.reimage_all.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), - 'instanceId': self._serialize.url("instance_id", instance_id, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('OperationStatusResponse', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def reimage_all( - self, resource_group_name, vm_scale_set_name, instance_id, custom_headers=None, raw=False, polling=True, **operation_config): - """Allows you to re-image all the disks ( including data disks ) in the a - VM scale set instance. This operation is only supported for managed - disks. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param vm_scale_set_name: The name of the VM scale set. - :type vm_scale_set_name: str - :param instance_id: The instance ID of the virtual machine. - :type instance_id: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns OperationStatusResponse - or ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2016_04_30_preview.models.OperationStatusResponse] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2016_04_30_preview.models.OperationStatusResponse]] - :raises: :class:`CloudError` - """ - raw_result = self._reimage_all_initial( - resource_group_name=resource_group_name, - vm_scale_set_name=vm_scale_set_name, - instance_id=instance_id, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('OperationStatusResponse', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - reimage_all.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/virtualmachines/{instanceId}/reimageall'} - - - def _deallocate_initial( - self, resource_group_name, vm_scale_set_name, instance_id, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.deallocate.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), - 'instanceId': self._serialize.url("instance_id", instance_id, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('OperationStatusResponse', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def deallocate( - self, resource_group_name, vm_scale_set_name, instance_id, custom_headers=None, raw=False, polling=True, **operation_config): - """Deallocates a specific virtual machine in a VM scale set. Shuts down - the virtual machine and releases the compute resources it uses. You are - not billed for the compute resources of this virtual machine once it is - deallocated. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param vm_scale_set_name: The name of the VM scale set. - :type vm_scale_set_name: str - :param instance_id: The instance ID of the virtual machine. - :type instance_id: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns OperationStatusResponse - or ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2016_04_30_preview.models.OperationStatusResponse] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2016_04_30_preview.models.OperationStatusResponse]] - :raises: :class:`CloudError` - """ - raw_result = self._deallocate_initial( - resource_group_name=resource_group_name, - vm_scale_set_name=vm_scale_set_name, - instance_id=instance_id, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('OperationStatusResponse', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - deallocate.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/virtualmachines/{instanceId}/deallocate'} - - - def _delete_initial( - self, resource_group_name, vm_scale_set_name, instance_id, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.delete.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), - 'instanceId': self._serialize.url("instance_id", instance_id, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202, 204]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('OperationStatusResponse', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def delete( - self, resource_group_name, vm_scale_set_name, instance_id, custom_headers=None, raw=False, polling=True, **operation_config): - """Deletes a virtual machine from a VM scale set. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param vm_scale_set_name: The name of the VM scale set. - :type vm_scale_set_name: str - :param instance_id: The instance ID of the virtual machine. - :type instance_id: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns OperationStatusResponse - or ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2016_04_30_preview.models.OperationStatusResponse] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2016_04_30_preview.models.OperationStatusResponse]] - :raises: :class:`CloudError` - """ - raw_result = self._delete_initial( - resource_group_name=resource_group_name, - vm_scale_set_name=vm_scale_set_name, - instance_id=instance_id, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('OperationStatusResponse', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/virtualmachines/{instanceId}'} - - def get( - self, resource_group_name, vm_scale_set_name, instance_id, custom_headers=None, raw=False, **operation_config): - """Gets a virtual machine from a VM scale set. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param vm_scale_set_name: The name of the VM scale set. - :type vm_scale_set_name: str - :param instance_id: The instance ID of the virtual machine. - :type instance_id: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: VirtualMachineScaleSetVM or ClientRawResponse if raw=true - :rtype: - ~azure.mgmt.compute.v2016_04_30_preview.models.VirtualMachineScaleSetVM - or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), - 'instanceId': self._serialize.url("instance_id", instance_id, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('VirtualMachineScaleSetVM', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/virtualmachines/{instanceId}'} - - def get_instance_view( - self, resource_group_name, vm_scale_set_name, instance_id, custom_headers=None, raw=False, **operation_config): - """Gets the status of a virtual machine from a VM scale set. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param vm_scale_set_name: The name of the VM scale set. - :type vm_scale_set_name: str - :param instance_id: The instance ID of the virtual machine. - :type instance_id: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: VirtualMachineScaleSetVMInstanceView or ClientRawResponse if - raw=true - :rtype: - ~azure.mgmt.compute.v2016_04_30_preview.models.VirtualMachineScaleSetVMInstanceView - or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get_instance_view.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), - 'instanceId': self._serialize.url("instance_id", instance_id, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('VirtualMachineScaleSetVMInstanceView', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_instance_view.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/virtualmachines/{instanceId}/instanceView'} - - def list( - self, resource_group_name, virtual_machine_scale_set_name, filter=None, select=None, expand=None, custom_headers=None, raw=False, **operation_config): - """Gets a list of all virtual machines in a VM scale sets. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param virtual_machine_scale_set_name: The name of the VM scale set. - :type virtual_machine_scale_set_name: str - :param filter: The filter to apply to the operation. - :type filter: str - :param select: The list parameters. - :type select: str - :param expand: The expand expression to apply to the operation. - :type expand: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of VirtualMachineScaleSetVM - :rtype: - ~azure.mgmt.compute.v2016_04_30_preview.models.VirtualMachineScaleSetVMPaged[~azure.mgmt.compute.v2016_04_30_preview.models.VirtualMachineScaleSetVM] - :raises: :class:`CloudError` - """ - def internal_paging(next_link=None, raw=False): - - if not next_link: - # Construct URL - url = self.list.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'virtualMachineScaleSetName': self._serialize.url("virtual_machine_scale_set_name", virtual_machine_scale_set_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - if filter is not None: - query_parameters['$filter'] = self._serialize.query("filter", filter, 'str') - if select is not None: - query_parameters['$select'] = self._serialize.query("select", select, 'str') - if expand is not None: - query_parameters['$expand'] = self._serialize.query("expand", expand, 'str') - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - deserialized = models.VirtualMachineScaleSetVMPaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.VirtualMachineScaleSetVMPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{virtualMachineScaleSetName}/virtualMachines'} - - - def _power_off_initial( - self, resource_group_name, vm_scale_set_name, instance_id, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.power_off.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), - 'instanceId': self._serialize.url("instance_id", instance_id, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('OperationStatusResponse', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def power_off( - self, resource_group_name, vm_scale_set_name, instance_id, custom_headers=None, raw=False, polling=True, **operation_config): - """Power off (stop) a virtual machine in a VM scale set. Note that - resources are still attached and you are getting charged for the - resources. Instead, use deallocate to release resources and avoid - charges. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param vm_scale_set_name: The name of the VM scale set. - :type vm_scale_set_name: str - :param instance_id: The instance ID of the virtual machine. - :type instance_id: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns OperationStatusResponse - or ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2016_04_30_preview.models.OperationStatusResponse] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2016_04_30_preview.models.OperationStatusResponse]] - :raises: :class:`CloudError` - """ - raw_result = self._power_off_initial( - resource_group_name=resource_group_name, - vm_scale_set_name=vm_scale_set_name, - instance_id=instance_id, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('OperationStatusResponse', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - power_off.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/virtualmachines/{instanceId}/poweroff'} - - - def _restart_initial( - self, resource_group_name, vm_scale_set_name, instance_id, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.restart.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), - 'instanceId': self._serialize.url("instance_id", instance_id, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('OperationStatusResponse', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def restart( - self, resource_group_name, vm_scale_set_name, instance_id, custom_headers=None, raw=False, polling=True, **operation_config): - """Restarts a virtual machine in a VM scale set. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param vm_scale_set_name: The name of the VM scale set. - :type vm_scale_set_name: str - :param instance_id: The instance ID of the virtual machine. - :type instance_id: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns OperationStatusResponse - or ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2016_04_30_preview.models.OperationStatusResponse] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2016_04_30_preview.models.OperationStatusResponse]] - :raises: :class:`CloudError` - """ - raw_result = self._restart_initial( - resource_group_name=resource_group_name, - vm_scale_set_name=vm_scale_set_name, - instance_id=instance_id, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('OperationStatusResponse', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - restart.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/virtualmachines/{instanceId}/restart'} - - - def _start_initial( - self, resource_group_name, vm_scale_set_name, instance_id, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.start.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), - 'instanceId': self._serialize.url("instance_id", instance_id, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('OperationStatusResponse', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def start( - self, resource_group_name, vm_scale_set_name, instance_id, custom_headers=None, raw=False, polling=True, **operation_config): - """Starts a virtual machine in a VM scale set. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param vm_scale_set_name: The name of the VM scale set. - :type vm_scale_set_name: str - :param instance_id: The instance ID of the virtual machine. - :type instance_id: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns OperationStatusResponse - or ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2016_04_30_preview.models.OperationStatusResponse] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2016_04_30_preview.models.OperationStatusResponse]] - :raises: :class:`CloudError` - """ - raw_result = self._start_initial( - resource_group_name=resource_group_name, - vm_scale_set_name=vm_scale_set_name, - instance_id=instance_id, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('OperationStatusResponse', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - start.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/virtualmachines/{instanceId}/start'} diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/operations/virtual_machine_scale_sets_operations.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/operations/virtual_machine_scale_sets_operations.py deleted file mode 100644 index bb778963c631..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/operations/virtual_machine_scale_sets_operations.py +++ /dev/null @@ -1,1407 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError -from msrest.polling import LROPoller, NoPolling -from msrestazure.polling.arm_polling import ARMPolling - -from .. import models - - -class VirtualMachineScaleSetsOperations(object): - """VirtualMachineScaleSetsOperations operations. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: Client Api Version. Constant value: "2016-04-30-preview". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2016-04-30-preview" - - self.config = config - - - def _create_or_update_initial( - self, resource_group_name, name, parameters, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.create_or_update.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'vmScaleSetName': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(parameters, 'VirtualMachineScaleSet') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 201]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('VirtualMachineScaleSet', response) - if response.status_code == 201: - deserialized = self._deserialize('VirtualMachineScaleSet', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def create_or_update( - self, resource_group_name, name, parameters, custom_headers=None, raw=False, polling=True, **operation_config): - """Create or update a VM scale set. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param name: The name of the VM scale set to create or update. - :type name: str - :param parameters: The scale set object. - :type parameters: - ~azure.mgmt.compute.v2016_04_30_preview.models.VirtualMachineScaleSet - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns VirtualMachineScaleSet - or ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2016_04_30_preview.models.VirtualMachineScaleSet] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2016_04_30_preview.models.VirtualMachineScaleSet]] - :raises: :class:`CloudError` - """ - raw_result = self._create_or_update_initial( - resource_group_name=resource_group_name, - name=name, - parameters=parameters, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('VirtualMachineScaleSet', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}'} - - - def _delete_initial( - self, resource_group_name, vm_scale_set_name, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.delete.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202, 204]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('OperationStatusResponse', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def delete( - self, resource_group_name, vm_scale_set_name, custom_headers=None, raw=False, polling=True, **operation_config): - """Deletes a VM scale set. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param vm_scale_set_name: The name of the VM scale set. - :type vm_scale_set_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns OperationStatusResponse - or ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2016_04_30_preview.models.OperationStatusResponse] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2016_04_30_preview.models.OperationStatusResponse]] - :raises: :class:`CloudError` - """ - raw_result = self._delete_initial( - resource_group_name=resource_group_name, - vm_scale_set_name=vm_scale_set_name, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('OperationStatusResponse', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}'} - - def get( - self, resource_group_name, vm_scale_set_name, custom_headers=None, raw=False, **operation_config): - """Display information about a virtual machine scale set. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param vm_scale_set_name: The name of the VM scale set. - :type vm_scale_set_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: VirtualMachineScaleSet or ClientRawResponse if raw=true - :rtype: - ~azure.mgmt.compute.v2016_04_30_preview.models.VirtualMachineScaleSet - or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('VirtualMachineScaleSet', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}'} - - - def _deallocate_initial( - self, resource_group_name, vm_scale_set_name, instance_ids=None, custom_headers=None, raw=False, **operation_config): - vm_instance_ids = None - if instance_ids is not None: - vm_instance_ids = models.VirtualMachineScaleSetVMInstanceIDs(instance_ids=instance_ids) - - # Construct URL - url = self.deallocate.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - if vm_instance_ids is not None: - body_content = self._serialize.body(vm_instance_ids, 'VirtualMachineScaleSetVMInstanceIDs') - else: - body_content = None - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('OperationStatusResponse', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def deallocate( - self, resource_group_name, vm_scale_set_name, instance_ids=None, custom_headers=None, raw=False, polling=True, **operation_config): - """Deallocates specific virtual machines in a VM scale set. Shuts down the - virtual machines and releases the compute resources. You are not billed - for the compute resources that this virtual machine scale set - deallocates. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param vm_scale_set_name: The name of the VM scale set. - :type vm_scale_set_name: str - :param instance_ids: The virtual machine scale set instance ids. - Omitting the virtual machine scale set instance ids will result in the - operation being performed on all virtual machines in the virtual - machine scale set. - :type instance_ids: list[str] - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns OperationStatusResponse - or ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2016_04_30_preview.models.OperationStatusResponse] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2016_04_30_preview.models.OperationStatusResponse]] - :raises: :class:`CloudError` - """ - raw_result = self._deallocate_initial( - resource_group_name=resource_group_name, - vm_scale_set_name=vm_scale_set_name, - instance_ids=instance_ids, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('OperationStatusResponse', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - deallocate.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/deallocate'} - - - def _delete_instances_initial( - self, resource_group_name, vm_scale_set_name, instance_ids, custom_headers=None, raw=False, **operation_config): - vm_instance_ids = models.VirtualMachineScaleSetVMInstanceRequiredIDs(instance_ids=instance_ids) - - # Construct URL - url = self.delete_instances.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(vm_instance_ids, 'VirtualMachineScaleSetVMInstanceRequiredIDs') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('OperationStatusResponse', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def delete_instances( - self, resource_group_name, vm_scale_set_name, instance_ids, custom_headers=None, raw=False, polling=True, **operation_config): - """Deletes virtual machines in a VM scale set. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param vm_scale_set_name: The name of the VM scale set. - :type vm_scale_set_name: str - :param instance_ids: The virtual machine scale set instance ids. - :type instance_ids: list[str] - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns OperationStatusResponse - or ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2016_04_30_preview.models.OperationStatusResponse] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2016_04_30_preview.models.OperationStatusResponse]] - :raises: :class:`CloudError` - """ - raw_result = self._delete_instances_initial( - resource_group_name=resource_group_name, - vm_scale_set_name=vm_scale_set_name, - instance_ids=instance_ids, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('OperationStatusResponse', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - delete_instances.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/delete'} - - def get_instance_view( - self, resource_group_name, vm_scale_set_name, custom_headers=None, raw=False, **operation_config): - """Gets the status of a VM scale set instance. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param vm_scale_set_name: The name of the VM scale set. - :type vm_scale_set_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: VirtualMachineScaleSetInstanceView or ClientRawResponse if - raw=true - :rtype: - ~azure.mgmt.compute.v2016_04_30_preview.models.VirtualMachineScaleSetInstanceView - or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get_instance_view.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('VirtualMachineScaleSetInstanceView', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_instance_view.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/instanceView'} - - def list( - self, resource_group_name, custom_headers=None, raw=False, **operation_config): - """Gets a list of all VM scale sets under a resource group. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of VirtualMachineScaleSet - :rtype: - ~azure.mgmt.compute.v2016_04_30_preview.models.VirtualMachineScaleSetPaged[~azure.mgmt.compute.v2016_04_30_preview.models.VirtualMachineScaleSet] - :raises: :class:`CloudError` - """ - def internal_paging(next_link=None, raw=False): - - if not next_link: - # Construct URL - url = self.list.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - deserialized = models.VirtualMachineScaleSetPaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.VirtualMachineScaleSetPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets'} - - def list_all( - self, custom_headers=None, raw=False, **operation_config): - """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. - - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of VirtualMachineScaleSet - :rtype: - ~azure.mgmt.compute.v2016_04_30_preview.models.VirtualMachineScaleSetPaged[~azure.mgmt.compute.v2016_04_30_preview.models.VirtualMachineScaleSet] - :raises: :class:`CloudError` - """ - def internal_paging(next_link=None, raw=False): - - if not next_link: - # Construct URL - url = self.list_all.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - deserialized = models.VirtualMachineScaleSetPaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.VirtualMachineScaleSetPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - list_all.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Compute/virtualMachineScaleSets'} - - def list_skus( - self, resource_group_name, vm_scale_set_name, custom_headers=None, raw=False, **operation_config): - """Gets a list of SKUs available for your VM scale set, including the - minimum and maximum VM instances allowed for each SKU. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param vm_scale_set_name: The name of the VM scale set. - :type vm_scale_set_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of VirtualMachineScaleSetSku - :rtype: - ~azure.mgmt.compute.v2016_04_30_preview.models.VirtualMachineScaleSetSkuPaged[~azure.mgmt.compute.v2016_04_30_preview.models.VirtualMachineScaleSetSku] - :raises: :class:`CloudError` - """ - def internal_paging(next_link=None, raw=False): - - if not next_link: - # Construct URL - url = self.list_skus.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - deserialized = models.VirtualMachineScaleSetSkuPaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.VirtualMachineScaleSetSkuPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - list_skus.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/skus'} - - - def _power_off_initial( - self, resource_group_name, vm_scale_set_name, instance_ids=None, custom_headers=None, raw=False, **operation_config): - vm_instance_ids = None - if instance_ids is not None: - vm_instance_ids = models.VirtualMachineScaleSetVMInstanceIDs(instance_ids=instance_ids) - - # Construct URL - url = self.power_off.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - if vm_instance_ids is not None: - body_content = self._serialize.body(vm_instance_ids, 'VirtualMachineScaleSetVMInstanceIDs') - else: - body_content = None - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('OperationStatusResponse', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def power_off( - self, resource_group_name, vm_scale_set_name, instance_ids=None, custom_headers=None, raw=False, polling=True, **operation_config): - """Power off (stop) one or more virtual machines in a VM scale set. Note - that resources are still attached and you are getting charged for the - resources. Instead, use deallocate to release resources and avoid - charges. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param vm_scale_set_name: The name of the VM scale set. - :type vm_scale_set_name: str - :param instance_ids: The virtual machine scale set instance ids. - Omitting the virtual machine scale set instance ids will result in the - operation being performed on all virtual machines in the virtual - machine scale set. - :type instance_ids: list[str] - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns OperationStatusResponse - or ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2016_04_30_preview.models.OperationStatusResponse] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2016_04_30_preview.models.OperationStatusResponse]] - :raises: :class:`CloudError` - """ - raw_result = self._power_off_initial( - resource_group_name=resource_group_name, - vm_scale_set_name=vm_scale_set_name, - instance_ids=instance_ids, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('OperationStatusResponse', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - power_off.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/poweroff'} - - - def _restart_initial( - self, resource_group_name, vm_scale_set_name, instance_ids=None, custom_headers=None, raw=False, **operation_config): - vm_instance_ids = None - if instance_ids is not None: - vm_instance_ids = models.VirtualMachineScaleSetVMInstanceIDs(instance_ids=instance_ids) - - # Construct URL - url = self.restart.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - if vm_instance_ids is not None: - body_content = self._serialize.body(vm_instance_ids, 'VirtualMachineScaleSetVMInstanceIDs') - else: - body_content = None - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('OperationStatusResponse', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def restart( - self, resource_group_name, vm_scale_set_name, instance_ids=None, custom_headers=None, raw=False, polling=True, **operation_config): - """Restarts one or more virtual machines in a VM scale set. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param vm_scale_set_name: The name of the VM scale set. - :type vm_scale_set_name: str - :param instance_ids: The virtual machine scale set instance ids. - Omitting the virtual machine scale set instance ids will result in the - operation being performed on all virtual machines in the virtual - machine scale set. - :type instance_ids: list[str] - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns OperationStatusResponse - or ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2016_04_30_preview.models.OperationStatusResponse] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2016_04_30_preview.models.OperationStatusResponse]] - :raises: :class:`CloudError` - """ - raw_result = self._restart_initial( - resource_group_name=resource_group_name, - vm_scale_set_name=vm_scale_set_name, - instance_ids=instance_ids, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('OperationStatusResponse', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - restart.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/restart'} - - - def _start_initial( - self, resource_group_name, vm_scale_set_name, instance_ids=None, custom_headers=None, raw=False, **operation_config): - vm_instance_ids = None - if instance_ids is not None: - vm_instance_ids = models.VirtualMachineScaleSetVMInstanceIDs(instance_ids=instance_ids) - - # Construct URL - url = self.start.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - if vm_instance_ids is not None: - body_content = self._serialize.body(vm_instance_ids, 'VirtualMachineScaleSetVMInstanceIDs') - else: - body_content = None - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('OperationStatusResponse', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def start( - self, resource_group_name, vm_scale_set_name, instance_ids=None, custom_headers=None, raw=False, polling=True, **operation_config): - """Starts one or more virtual machines in a VM scale set. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param vm_scale_set_name: The name of the VM scale set. - :type vm_scale_set_name: str - :param instance_ids: The virtual machine scale set instance ids. - Omitting the virtual machine scale set instance ids will result in the - operation being performed on all virtual machines in the virtual - machine scale set. - :type instance_ids: list[str] - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns OperationStatusResponse - or ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2016_04_30_preview.models.OperationStatusResponse] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2016_04_30_preview.models.OperationStatusResponse]] - :raises: :class:`CloudError` - """ - raw_result = self._start_initial( - resource_group_name=resource_group_name, - vm_scale_set_name=vm_scale_set_name, - instance_ids=instance_ids, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('OperationStatusResponse', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - start.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/start'} - - - def _update_instances_initial( - self, resource_group_name, vm_scale_set_name, instance_ids, custom_headers=None, raw=False, **operation_config): - vm_instance_ids = models.VirtualMachineScaleSetVMInstanceRequiredIDs(instance_ids=instance_ids) - - # Construct URL - url = self.update_instances.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(vm_instance_ids, 'VirtualMachineScaleSetVMInstanceRequiredIDs') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('OperationStatusResponse', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def update_instances( - self, resource_group_name, vm_scale_set_name, instance_ids, custom_headers=None, raw=False, polling=True, **operation_config): - """Upgrades one or more virtual machines to the latest SKU set in the VM - scale set model. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param vm_scale_set_name: The name of the VM scale set. - :type vm_scale_set_name: str - :param instance_ids: The virtual machine scale set instance ids. - :type instance_ids: list[str] - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns OperationStatusResponse - or ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2016_04_30_preview.models.OperationStatusResponse] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2016_04_30_preview.models.OperationStatusResponse]] - :raises: :class:`CloudError` - """ - raw_result = self._update_instances_initial( - resource_group_name=resource_group_name, - vm_scale_set_name=vm_scale_set_name, - instance_ids=instance_ids, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('OperationStatusResponse', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - update_instances.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/manualupgrade'} - - - def _reimage_initial( - self, resource_group_name, vm_scale_set_name, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.reimage.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('OperationStatusResponse', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def reimage( - self, resource_group_name, vm_scale_set_name, custom_headers=None, raw=False, polling=True, **operation_config): - """Reimages (upgrade the operating system) one or more virtual machines in - a VM scale set. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param vm_scale_set_name: The name of the VM scale set. - :type vm_scale_set_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns OperationStatusResponse - or ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2016_04_30_preview.models.OperationStatusResponse] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2016_04_30_preview.models.OperationStatusResponse]] - :raises: :class:`CloudError` - """ - raw_result = self._reimage_initial( - resource_group_name=resource_group_name, - vm_scale_set_name=vm_scale_set_name, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('OperationStatusResponse', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - reimage.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/reimage'} - - - def _reimage_all_initial( - self, resource_group_name, vm_scale_set_name, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.reimage_all.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('OperationStatusResponse', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def reimage_all( - self, resource_group_name, vm_scale_set_name, custom_headers=None, raw=False, polling=True, **operation_config): - """Reimages all the disks ( including data disks ) in the virtual machines - in a VM scale set. This operation is only supported for managed disks. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param vm_scale_set_name: The name of the VM scale set. - :type vm_scale_set_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns OperationStatusResponse - or ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2016_04_30_preview.models.OperationStatusResponse] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2016_04_30_preview.models.OperationStatusResponse]] - :raises: :class:`CloudError` - """ - raw_result = self._reimage_all_initial( - resource_group_name=resource_group_name, - vm_scale_set_name=vm_scale_set_name, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('OperationStatusResponse', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - reimage_all.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/reimageall'} diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/operations/virtual_machine_sizes_operations.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/operations/virtual_machine_sizes_operations.py deleted file mode 100644 index 6a2b5647fbb5..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/operations/virtual_machine_sizes_operations.py +++ /dev/null @@ -1,107 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError - -from .. import models - - -class VirtualMachineSizesOperations(object): - """VirtualMachineSizesOperations operations. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: Client Api Version. Constant value: "2016-04-30-preview". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2016-04-30-preview" - - self.config = config - - def list( - self, location, custom_headers=None, raw=False, **operation_config): - """Lists all available virtual machine sizes for a subscription in a - location. - - :param location: The location upon which virtual-machine-sizes is - queried. - :type location: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of VirtualMachineSize - :rtype: - ~azure.mgmt.compute.v2016_04_30_preview.models.VirtualMachineSizePaged[~azure.mgmt.compute.v2016_04_30_preview.models.VirtualMachineSize] - :raises: :class:`CloudError` - """ - def internal_paging(next_link=None, raw=False): - - if not next_link: - # Construct URL - url = self.list.metadata['url'] - path_format_arguments = { - 'location': self._serialize.url("location", location, 'str', pattern=r'^[-\w\._]+$'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - deserialized = models.VirtualMachineSizePaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.VirtualMachineSizePaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/vmSizes'} diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/operations/virtual_machines_operations.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/operations/virtual_machines_operations.py deleted file mode 100644 index 4bd60de1201d..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/operations/virtual_machines_operations.py +++ /dev/null @@ -1,1312 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError -from msrest.polling import LROPoller, NoPolling -from msrestazure.polling.arm_polling import ARMPolling - -from .. import models - - -class VirtualMachinesOperations(object): - """VirtualMachinesOperations operations. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: Client Api Version. Constant value: "2016-04-30-preview". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2016-04-30-preview" - - self.config = config - - def get_extensions( - self, resource_group_name, vm_name, expand=None, custom_headers=None, raw=False, **operation_config): - """The operation to get all extensions of a Virtual Machine. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param vm_name: The name of the virtual machine containing the - extension. - :type vm_name: str - :param expand: The expand expression to apply on the operation. - :type expand: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: VirtualMachineExtensionsListResult or ClientRawResponse if - raw=true - :rtype: - ~azure.mgmt.compute.v2016_04_30_preview.models.VirtualMachineExtensionsListResult - or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get_extensions.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'vmName': self._serialize.url("vm_name", vm_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - if expand is not None: - query_parameters['$expand'] = self._serialize.query("expand", expand, 'str') - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('VirtualMachineExtensionsListResult', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_extensions.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/extensions'} - - - def _capture_initial( - self, resource_group_name, vm_name, parameters, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.capture.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'vmName': self._serialize.url("vm_name", vm_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(parameters, 'VirtualMachineCaptureParameters') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('VirtualMachineCaptureResult', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def capture( - self, resource_group_name, vm_name, parameters, custom_headers=None, raw=False, polling=True, **operation_config): - """Captures the VM by copying virtual hard disks of the VM and outputs a - template that can be used to create similar VMs. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param vm_name: The name of the virtual machine. - :type vm_name: str - :param parameters: Parameters supplied to the Capture Virtual Machine - operation. - :type parameters: - ~azure.mgmt.compute.v2016_04_30_preview.models.VirtualMachineCaptureParameters - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns - VirtualMachineCaptureResult or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2016_04_30_preview.models.VirtualMachineCaptureResult] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2016_04_30_preview.models.VirtualMachineCaptureResult]] - :raises: :class:`CloudError` - """ - raw_result = self._capture_initial( - resource_group_name=resource_group_name, - vm_name=vm_name, - parameters=parameters, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('VirtualMachineCaptureResult', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - capture.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/capture'} - - - def _create_or_update_initial( - self, resource_group_name, vm_name, parameters, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.create_or_update.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'vmName': self._serialize.url("vm_name", vm_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(parameters, 'VirtualMachine') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 201]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('VirtualMachine', response) - if response.status_code == 201: - deserialized = self._deserialize('VirtualMachine', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def create_or_update( - self, resource_group_name, vm_name, parameters, custom_headers=None, raw=False, polling=True, **operation_config): - """The operation to create or update a virtual machine. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param vm_name: The name of the virtual machine. - :type vm_name: str - :param parameters: Parameters supplied to the Create Virtual Machine - operation. - :type parameters: - ~azure.mgmt.compute.v2016_04_30_preview.models.VirtualMachine - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns VirtualMachine or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2016_04_30_preview.models.VirtualMachine] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2016_04_30_preview.models.VirtualMachine]] - :raises: :class:`CloudError` - """ - raw_result = self._create_or_update_initial( - resource_group_name=resource_group_name, - vm_name=vm_name, - parameters=parameters, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('VirtualMachine', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}'} - - - def _delete_initial( - self, resource_group_name, vm_name, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.delete.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'vmName': self._serialize.url("vm_name", vm_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202, 204]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('OperationStatusResponse', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def delete( - self, resource_group_name, vm_name, custom_headers=None, raw=False, polling=True, **operation_config): - """The operation to delete a virtual machine. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param vm_name: The name of the virtual machine. - :type vm_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns OperationStatusResponse - or ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2016_04_30_preview.models.OperationStatusResponse] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2016_04_30_preview.models.OperationStatusResponse]] - :raises: :class:`CloudError` - """ - raw_result = self._delete_initial( - resource_group_name=resource_group_name, - vm_name=vm_name, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('OperationStatusResponse', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}'} - - def get( - self, resource_group_name, vm_name, expand=None, custom_headers=None, raw=False, **operation_config): - """Retrieves information about the model view or the instance view of a - virtual machine. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param vm_name: The name of the virtual machine. - :type vm_name: str - :param expand: The expand expression to apply on the operation. - Possible values include: 'instanceView' - :type expand: str or - ~azure.mgmt.compute.v2016_04_30_preview.models.InstanceViewTypes - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: VirtualMachine or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.compute.v2016_04_30_preview.models.VirtualMachine - or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'vmName': self._serialize.url("vm_name", vm_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - if expand is not None: - query_parameters['$expand'] = self._serialize.query("expand", expand, 'InstanceViewTypes') - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('VirtualMachine', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}'} - - - def _convert_to_managed_disks_initial( - self, resource_group_name, vm_name, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.convert_to_managed_disks.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'vmName': self._serialize.url("vm_name", vm_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('OperationStatusResponse', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def convert_to_managed_disks( - self, resource_group_name, vm_name, custom_headers=None, raw=False, polling=True, **operation_config): - """Converts virtual machine disks from blob-based to managed disks. - Virtual machine must be stop-deallocated before invoking this - operation. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param vm_name: The name of the virtual machine. - :type vm_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns OperationStatusResponse - or ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2016_04_30_preview.models.OperationStatusResponse] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2016_04_30_preview.models.OperationStatusResponse]] - :raises: :class:`CloudError` - """ - raw_result = self._convert_to_managed_disks_initial( - resource_group_name=resource_group_name, - vm_name=vm_name, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('OperationStatusResponse', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - convert_to_managed_disks.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/convertToManagedDisks'} - - - def _deallocate_initial( - self, resource_group_name, vm_name, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.deallocate.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'vmName': self._serialize.url("vm_name", vm_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('OperationStatusResponse', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def deallocate( - self, resource_group_name, vm_name, custom_headers=None, raw=False, polling=True, **operation_config): - """Shuts down the virtual machine and releases the compute resources. You - are not billed for the compute resources that this virtual machine - uses. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param vm_name: The name of the virtual machine. - :type vm_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns OperationStatusResponse - or ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2016_04_30_preview.models.OperationStatusResponse] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2016_04_30_preview.models.OperationStatusResponse]] - :raises: :class:`CloudError` - """ - raw_result = self._deallocate_initial( - resource_group_name=resource_group_name, - vm_name=vm_name, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('OperationStatusResponse', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - deallocate.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/deallocate'} - - def generalize( - self, resource_group_name, vm_name, custom_headers=None, raw=False, **operation_config): - """Sets the state of the virtual machine to generalized. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param vm_name: The name of the virtual machine. - :type vm_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: OperationStatusResponse or ClientRawResponse if raw=true - :rtype: - ~azure.mgmt.compute.v2016_04_30_preview.models.OperationStatusResponse - or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.generalize.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'vmName': self._serialize.url("vm_name", vm_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('OperationStatusResponse', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - generalize.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/generalize'} - - def list( - self, resource_group_name, custom_headers=None, raw=False, **operation_config): - """Lists all of the virtual machines in the specified resource group. Use - the nextLink property in the response to get the next page of virtual - machines. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of VirtualMachine - :rtype: - ~azure.mgmt.compute.v2016_04_30_preview.models.VirtualMachinePaged[~azure.mgmt.compute.v2016_04_30_preview.models.VirtualMachine] - :raises: :class:`CloudError` - """ - def internal_paging(next_link=None, raw=False): - - if not next_link: - # Construct URL - url = self.list.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - deserialized = models.VirtualMachinePaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.VirtualMachinePaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines'} - - def list_all( - self, custom_headers=None, raw=False, **operation_config): - """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. - - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of VirtualMachine - :rtype: - ~azure.mgmt.compute.v2016_04_30_preview.models.VirtualMachinePaged[~azure.mgmt.compute.v2016_04_30_preview.models.VirtualMachine] - :raises: :class:`CloudError` - """ - def internal_paging(next_link=None, raw=False): - - if not next_link: - # Construct URL - url = self.list_all.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - deserialized = models.VirtualMachinePaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.VirtualMachinePaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - list_all.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Compute/virtualMachines'} - - def list_available_sizes( - self, resource_group_name, vm_name, custom_headers=None, raw=False, **operation_config): - """Lists all available virtual machine sizes to which the specified - virtual machine can be resized. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param vm_name: The name of the virtual machine. - :type vm_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of VirtualMachineSize - :rtype: - ~azure.mgmt.compute.v2016_04_30_preview.models.VirtualMachineSizePaged[~azure.mgmt.compute.v2016_04_30_preview.models.VirtualMachineSize] - :raises: :class:`CloudError` - """ - def internal_paging(next_link=None, raw=False): - - if not next_link: - # Construct URL - url = self.list_available_sizes.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'vmName': self._serialize.url("vm_name", vm_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - deserialized = models.VirtualMachineSizePaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.VirtualMachineSizePaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - list_available_sizes.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/vmSizes'} - - - def _power_off_initial( - self, resource_group_name, vm_name, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.power_off.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'vmName': self._serialize.url("vm_name", vm_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('OperationStatusResponse', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def power_off( - self, resource_group_name, vm_name, custom_headers=None, raw=False, polling=True, **operation_config): - """The operation to power off (stop) a virtual machine. The virtual - machine can be restarted with the same provisioned resources. You are - still charged for this virtual machine. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param vm_name: The name of the virtual machine. - :type vm_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns OperationStatusResponse - or ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2016_04_30_preview.models.OperationStatusResponse] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2016_04_30_preview.models.OperationStatusResponse]] - :raises: :class:`CloudError` - """ - raw_result = self._power_off_initial( - resource_group_name=resource_group_name, - vm_name=vm_name, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('OperationStatusResponse', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - power_off.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/powerOff'} - - - def _restart_initial( - self, resource_group_name, vm_name, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.restart.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'vmName': self._serialize.url("vm_name", vm_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('OperationStatusResponse', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def restart( - self, resource_group_name, vm_name, custom_headers=None, raw=False, polling=True, **operation_config): - """The operation to restart a virtual machine. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param vm_name: The name of the virtual machine. - :type vm_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns OperationStatusResponse - or ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2016_04_30_preview.models.OperationStatusResponse] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2016_04_30_preview.models.OperationStatusResponse]] - :raises: :class:`CloudError` - """ - raw_result = self._restart_initial( - resource_group_name=resource_group_name, - vm_name=vm_name, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('OperationStatusResponse', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - restart.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/restart'} - - - def _start_initial( - self, resource_group_name, vm_name, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.start.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'vmName': self._serialize.url("vm_name", vm_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('OperationStatusResponse', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def start( - self, resource_group_name, vm_name, custom_headers=None, raw=False, polling=True, **operation_config): - """The operation to start a virtual machine. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param vm_name: The name of the virtual machine. - :type vm_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns OperationStatusResponse - or ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2016_04_30_preview.models.OperationStatusResponse] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2016_04_30_preview.models.OperationStatusResponse]] - :raises: :class:`CloudError` - """ - raw_result = self._start_initial( - resource_group_name=resource_group_name, - vm_name=vm_name, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('OperationStatusResponse', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - start.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/start'} - - - def _redeploy_initial( - self, resource_group_name, vm_name, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.redeploy.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'vmName': self._serialize.url("vm_name", vm_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('OperationStatusResponse', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def redeploy( - self, resource_group_name, vm_name, custom_headers=None, raw=False, polling=True, **operation_config): - """The operation to redeploy a virtual machine. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param vm_name: The name of the virtual machine. - :type vm_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns OperationStatusResponse - or ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2016_04_30_preview.models.OperationStatusResponse] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2016_04_30_preview.models.OperationStatusResponse]] - :raises: :class:`CloudError` - """ - raw_result = self._redeploy_initial( - resource_group_name=resource_group_name, - vm_name=vm_name, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('OperationStatusResponse', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - redeploy.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/redeploy'} diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/__init__.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/__init__.py index 88ded2f640de..a7bc1ce68e37 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/__init__.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/__init__.py @@ -9,10 +9,11 @@ # regenerated. # -------------------------------------------------------------------------- -from .compute_management_client import ComputeManagementClient -from .version import VERSION +from ._configuration import ComputeManagementClientConfiguration +from ._compute_management_client import ComputeManagementClient +__all__ = ['ComputeManagementClient', 'ComputeManagementClientConfiguration'] -__all__ = ['ComputeManagementClient'] +from .version import VERSION __version__ = VERSION diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/_compute_management_client.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/_compute_management_client.py new file mode 100644 index 000000000000..d21df65762ed --- /dev/null +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/_compute_management_client.py @@ -0,0 +1,126 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.service_client import SDKClient +from msrest import Serializer, Deserializer + +from ._configuration import ComputeManagementClientConfiguration +from .operations import AvailabilitySetsOperations +from .operations import VirtualMachineExtensionImagesOperations +from .operations import VirtualMachineExtensionsOperations +from .operations import VirtualMachinesOperations +from .operations import VirtualMachineImagesOperations +from .operations import UsageOperations +from .operations import VirtualMachineSizesOperations +from .operations import ImagesOperations +from .operations import ResourceSkusOperations +from .operations import VirtualMachineScaleSetsOperations +from .operations import VirtualMachineScaleSetExtensionsOperations +from .operations import VirtualMachineScaleSetRollingUpgradesOperations +from .operations import VirtualMachineScaleSetVMsOperations +from .operations import DisksOperations +from .operations import SnapshotsOperations +from .operations import VirtualMachineRunCommandsOperations +from . import models + + +class ComputeManagementClient(SDKClient): + """Compute Client + + :ivar config: Configuration for client. + :vartype config: ComputeManagementClientConfiguration + + :ivar availability_sets: AvailabilitySets operations + :vartype availability_sets: azure.mgmt.compute.v2017_03_30.operations.AvailabilitySetsOperations + :ivar virtual_machine_extension_images: VirtualMachineExtensionImages operations + :vartype virtual_machine_extension_images: azure.mgmt.compute.v2017_03_30.operations.VirtualMachineExtensionImagesOperations + :ivar virtual_machine_extensions: VirtualMachineExtensions operations + :vartype virtual_machine_extensions: azure.mgmt.compute.v2017_03_30.operations.VirtualMachineExtensionsOperations + :ivar virtual_machines: VirtualMachines operations + :vartype virtual_machines: azure.mgmt.compute.v2017_03_30.operations.VirtualMachinesOperations + :ivar virtual_machine_images: VirtualMachineImages operations + :vartype virtual_machine_images: azure.mgmt.compute.v2017_03_30.operations.VirtualMachineImagesOperations + :ivar usage: Usage operations + :vartype usage: azure.mgmt.compute.v2017_03_30.operations.UsageOperations + :ivar virtual_machine_sizes: VirtualMachineSizes operations + :vartype virtual_machine_sizes: azure.mgmt.compute.v2017_03_30.operations.VirtualMachineSizesOperations + :ivar images: Images operations + :vartype images: azure.mgmt.compute.v2017_03_30.operations.ImagesOperations + :ivar resource_skus: ResourceSkus operations + :vartype resource_skus: azure.mgmt.compute.v2017_03_30.operations.ResourceSkusOperations + :ivar virtual_machine_scale_sets: VirtualMachineScaleSets operations + :vartype virtual_machine_scale_sets: azure.mgmt.compute.v2017_03_30.operations.VirtualMachineScaleSetsOperations + :ivar virtual_machine_scale_set_extensions: VirtualMachineScaleSetExtensions operations + :vartype virtual_machine_scale_set_extensions: azure.mgmt.compute.v2017_03_30.operations.VirtualMachineScaleSetExtensionsOperations + :ivar virtual_machine_scale_set_rolling_upgrades: VirtualMachineScaleSetRollingUpgrades operations + :vartype virtual_machine_scale_set_rolling_upgrades: azure.mgmt.compute.v2017_03_30.operations.VirtualMachineScaleSetRollingUpgradesOperations + :ivar virtual_machine_scale_set_vms: VirtualMachineScaleSetVMs operations + :vartype virtual_machine_scale_set_vms: azure.mgmt.compute.v2017_03_30.operations.VirtualMachineScaleSetVMsOperations + :ivar disks: Disks operations + :vartype disks: azure.mgmt.compute.v2017_03_30.operations.DisksOperations + :ivar snapshots: Snapshots operations + :vartype snapshots: azure.mgmt.compute.v2017_03_30.operations.SnapshotsOperations + :ivar virtual_machine_run_commands: VirtualMachineRunCommands operations + :vartype virtual_machine_run_commands: azure.mgmt.compute.v2017_03_30.operations.VirtualMachineRunCommandsOperations + + :param credentials: Credentials needed for the client to connect to Azure. + :type credentials: :mod:`A msrestazure Credentials + object` + :param subscription_id: Subscription credentials which uniquely identify + Microsoft Azure subscription. The subscription ID forms part of the URI + for every service call. + :type subscription_id: str + :param str base_url: Service URL + """ + + def __init__( + self, credentials, subscription_id, base_url=None): + + self.config = ComputeManagementClientConfiguration(credentials, subscription_id, base_url) + super(ComputeManagementClient, self).__init__(self.config.credentials, self.config) + + client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} + self.api_version = '2017-03-30' + self._serialize = Serializer(client_models) + self._deserialize = Deserializer(client_models) + + self.availability_sets = AvailabilitySetsOperations( + self._client, self.config, self._serialize, self._deserialize) + self.virtual_machine_extension_images = VirtualMachineExtensionImagesOperations( + self._client, self.config, self._serialize, self._deserialize) + self.virtual_machine_extensions = VirtualMachineExtensionsOperations( + self._client, self.config, self._serialize, self._deserialize) + self.virtual_machines = VirtualMachinesOperations( + self._client, self.config, self._serialize, self._deserialize) + self.virtual_machine_images = VirtualMachineImagesOperations( + self._client, self.config, self._serialize, self._deserialize) + self.usage = UsageOperations( + self._client, self.config, self._serialize, self._deserialize) + self.virtual_machine_sizes = VirtualMachineSizesOperations( + self._client, self.config, self._serialize, self._deserialize) + self.images = ImagesOperations( + self._client, self.config, self._serialize, self._deserialize) + self.resource_skus = ResourceSkusOperations( + self._client, self.config, self._serialize, self._deserialize) + self.virtual_machine_scale_sets = VirtualMachineScaleSetsOperations( + self._client, self.config, self._serialize, self._deserialize) + self.virtual_machine_scale_set_extensions = VirtualMachineScaleSetExtensionsOperations( + self._client, self.config, self._serialize, self._deserialize) + self.virtual_machine_scale_set_rolling_upgrades = VirtualMachineScaleSetRollingUpgradesOperations( + self._client, self.config, self._serialize, self._deserialize) + self.virtual_machine_scale_set_vms = VirtualMachineScaleSetVMsOperations( + self._client, self.config, self._serialize, self._deserialize) + self.disks = DisksOperations( + self._client, self.config, self._serialize, self._deserialize) + self.snapshots = SnapshotsOperations( + self._client, self.config, self._serialize, self._deserialize) + self.virtual_machine_run_commands = VirtualMachineRunCommandsOperations( + self._client, self.config, self._serialize, self._deserialize) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/_configuration.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/_configuration.py new file mode 100644 index 000000000000..0fcf5984e2ca --- /dev/null +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/_configuration.py @@ -0,0 +1,50 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- +from msrestazure import AzureConfiguration + +from .version import VERSION + + +class ComputeManagementClientConfiguration(AzureConfiguration): + """Configuration for ComputeManagementClient + Note that all parameters used to create this instance are saved as instance + attributes. + + :param credentials: Credentials needed for the client to connect to Azure. + :type credentials: :mod:`A msrestazure Credentials + object` + :param subscription_id: Subscription credentials which uniquely identify + Microsoft Azure subscription. The subscription ID forms part of the URI + for every service call. + :type subscription_id: str + :param str base_url: Service URL + """ + + def __init__( + self, credentials, subscription_id, base_url=None): + + if credentials is None: + raise ValueError("Parameter 'credentials' must not be None.") + if subscription_id is None: + raise ValueError("Parameter 'subscription_id' must not be None.") + if not base_url: + base_url = 'https://management.azure.com' + + super(ComputeManagementClientConfiguration, self).__init__(base_url) + + # Starting Autorest.Python 4.0.64, make connection pool activated by default + self.keep_alive = True + + self.add_user_agent('azure-mgmt-compute/{}'.format(VERSION)) + self.add_user_agent('Azure-SDK-For-Python') + + self.credentials = credentials + self.subscription_id = subscription_id diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/compute_management_client.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/compute_management_client.py deleted file mode 100644 index d671c7a363df..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/compute_management_client.py +++ /dev/null @@ -1,160 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.service_client import SDKClient -from msrest import Serializer, Deserializer -from msrestazure import AzureConfiguration -from .version import VERSION -from .operations.availability_sets_operations import AvailabilitySetsOperations -from .operations.virtual_machine_extension_images_operations import VirtualMachineExtensionImagesOperations -from .operations.virtual_machine_extensions_operations import VirtualMachineExtensionsOperations -from .operations.virtual_machines_operations import VirtualMachinesOperations -from .operations.virtual_machine_images_operations import VirtualMachineImagesOperations -from .operations.usage_operations import UsageOperations -from .operations.virtual_machine_sizes_operations import VirtualMachineSizesOperations -from .operations.images_operations import ImagesOperations -from .operations.resource_skus_operations import ResourceSkusOperations -from .operations.virtual_machine_scale_sets_operations import VirtualMachineScaleSetsOperations -from .operations.virtual_machine_scale_set_extensions_operations import VirtualMachineScaleSetExtensionsOperations -from .operations.virtual_machine_scale_set_rolling_upgrades_operations import VirtualMachineScaleSetRollingUpgradesOperations -from .operations.virtual_machine_scale_set_vms_operations import VirtualMachineScaleSetVMsOperations -from .operations.disks_operations import DisksOperations -from .operations.snapshots_operations import SnapshotsOperations -from .operations.virtual_machine_run_commands_operations import VirtualMachineRunCommandsOperations -from . import models - - -class ComputeManagementClientConfiguration(AzureConfiguration): - """Configuration for ComputeManagementClient - Note that all parameters used to create this instance are saved as instance - attributes. - - :param credentials: Credentials needed for the client to connect to Azure. - :type credentials: :mod:`A msrestazure Credentials - object` - :param subscription_id: Subscription credentials which uniquely identify - Microsoft Azure subscription. The subscription ID forms part of the URI - for every service call. - :type subscription_id: str - :param str base_url: Service URL - """ - - def __init__( - self, credentials, subscription_id, base_url=None): - - if credentials is None: - raise ValueError("Parameter 'credentials' must not be None.") - if subscription_id is None: - raise ValueError("Parameter 'subscription_id' must not be None.") - if not base_url: - base_url = 'https://management.azure.com' - - super(ComputeManagementClientConfiguration, self).__init__(base_url) - - self.add_user_agent('azure-mgmt-compute/{}'.format(VERSION)) - self.add_user_agent('Azure-SDK-For-Python') - - self.credentials = credentials - self.subscription_id = subscription_id - - -class ComputeManagementClient(SDKClient): - """Compute Client - - :ivar config: Configuration for client. - :vartype config: ComputeManagementClientConfiguration - - :ivar availability_sets: AvailabilitySets operations - :vartype availability_sets: azure.mgmt.compute.v2017_03_30.operations.AvailabilitySetsOperations - :ivar virtual_machine_extension_images: VirtualMachineExtensionImages operations - :vartype virtual_machine_extension_images: azure.mgmt.compute.v2017_03_30.operations.VirtualMachineExtensionImagesOperations - :ivar virtual_machine_extensions: VirtualMachineExtensions operations - :vartype virtual_machine_extensions: azure.mgmt.compute.v2017_03_30.operations.VirtualMachineExtensionsOperations - :ivar virtual_machines: VirtualMachines operations - :vartype virtual_machines: azure.mgmt.compute.v2017_03_30.operations.VirtualMachinesOperations - :ivar virtual_machine_images: VirtualMachineImages operations - :vartype virtual_machine_images: azure.mgmt.compute.v2017_03_30.operations.VirtualMachineImagesOperations - :ivar usage: Usage operations - :vartype usage: azure.mgmt.compute.v2017_03_30.operations.UsageOperations - :ivar virtual_machine_sizes: VirtualMachineSizes operations - :vartype virtual_machine_sizes: azure.mgmt.compute.v2017_03_30.operations.VirtualMachineSizesOperations - :ivar images: Images operations - :vartype images: azure.mgmt.compute.v2017_03_30.operations.ImagesOperations - :ivar resource_skus: ResourceSkus operations - :vartype resource_skus: azure.mgmt.compute.v2017_03_30.operations.ResourceSkusOperations - :ivar virtual_machine_scale_sets: VirtualMachineScaleSets operations - :vartype virtual_machine_scale_sets: azure.mgmt.compute.v2017_03_30.operations.VirtualMachineScaleSetsOperations - :ivar virtual_machine_scale_set_extensions: VirtualMachineScaleSetExtensions operations - :vartype virtual_machine_scale_set_extensions: azure.mgmt.compute.v2017_03_30.operations.VirtualMachineScaleSetExtensionsOperations - :ivar virtual_machine_scale_set_rolling_upgrades: VirtualMachineScaleSetRollingUpgrades operations - :vartype virtual_machine_scale_set_rolling_upgrades: azure.mgmt.compute.v2017_03_30.operations.VirtualMachineScaleSetRollingUpgradesOperations - :ivar virtual_machine_scale_set_vms: VirtualMachineScaleSetVMs operations - :vartype virtual_machine_scale_set_vms: azure.mgmt.compute.v2017_03_30.operations.VirtualMachineScaleSetVMsOperations - :ivar disks: Disks operations - :vartype disks: azure.mgmt.compute.v2017_03_30.operations.DisksOperations - :ivar snapshots: Snapshots operations - :vartype snapshots: azure.mgmt.compute.v2017_03_30.operations.SnapshotsOperations - :ivar virtual_machine_run_commands: VirtualMachineRunCommands operations - :vartype virtual_machine_run_commands: azure.mgmt.compute.v2017_03_30.operations.VirtualMachineRunCommandsOperations - - :param credentials: Credentials needed for the client to connect to Azure. - :type credentials: :mod:`A msrestazure Credentials - object` - :param subscription_id: Subscription credentials which uniquely identify - Microsoft Azure subscription. The subscription ID forms part of the URI - for every service call. - :type subscription_id: str - :param str base_url: Service URL - """ - - def __init__( - self, credentials, subscription_id, base_url=None): - - self.config = ComputeManagementClientConfiguration(credentials, subscription_id, base_url) - super(ComputeManagementClient, self).__init__(self.config.credentials, self.config) - - client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} - self.api_version = '2017-03-30' - self._serialize = Serializer(client_models) - self._deserialize = Deserializer(client_models) - - self.availability_sets = AvailabilitySetsOperations( - self._client, self.config, self._serialize, self._deserialize) - self.virtual_machine_extension_images = VirtualMachineExtensionImagesOperations( - self._client, self.config, self._serialize, self._deserialize) - self.virtual_machine_extensions = VirtualMachineExtensionsOperations( - self._client, self.config, self._serialize, self._deserialize) - self.virtual_machines = VirtualMachinesOperations( - self._client, self.config, self._serialize, self._deserialize) - self.virtual_machine_images = VirtualMachineImagesOperations( - self._client, self.config, self._serialize, self._deserialize) - self.usage = UsageOperations( - self._client, self.config, self._serialize, self._deserialize) - self.virtual_machine_sizes = VirtualMachineSizesOperations( - self._client, self.config, self._serialize, self._deserialize) - self.images = ImagesOperations( - self._client, self.config, self._serialize, self._deserialize) - self.resource_skus = ResourceSkusOperations( - self._client, self.config, self._serialize, self._deserialize) - self.virtual_machine_scale_sets = VirtualMachineScaleSetsOperations( - self._client, self.config, self._serialize, self._deserialize) - self.virtual_machine_scale_set_extensions = VirtualMachineScaleSetExtensionsOperations( - self._client, self.config, self._serialize, self._deserialize) - self.virtual_machine_scale_set_rolling_upgrades = VirtualMachineScaleSetRollingUpgradesOperations( - self._client, self.config, self._serialize, self._deserialize) - self.virtual_machine_scale_set_vms = VirtualMachineScaleSetVMsOperations( - self._client, self.config, self._serialize, self._deserialize) - self.disks = DisksOperations( - self._client, self.config, self._serialize, self._deserialize) - self.snapshots = SnapshotsOperations( - self._client, self.config, self._serialize, self._deserialize) - self.virtual_machine_run_commands = VirtualMachineRunCommandsOperations( - self._client, self.config, self._serialize, self._deserialize) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/__init__.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/__init__.py index 828f7a8f7b29..5a896789b04d 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/__init__.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/__init__.py @@ -10,283 +10,283 @@ # -------------------------------------------------------------------------- try: - from .instance_view_status_py3 import InstanceViewStatus - from .sub_resource_py3 import SubResource - from .sku_py3 import Sku - from .availability_set_py3 import AvailabilitySet - from .virtual_machine_size_py3 import VirtualMachineSize - from .virtual_machine_extension_image_py3 import VirtualMachineExtensionImage - from .virtual_machine_image_resource_py3 import VirtualMachineImageResource - from .virtual_machine_extension_instance_view_py3 import VirtualMachineExtensionInstanceView - from .virtual_machine_extension_py3 import VirtualMachineExtension - from .virtual_machine_extension_update_py3 import VirtualMachineExtensionUpdate - from .virtual_machine_extensions_list_result_py3 import VirtualMachineExtensionsListResult - from .purchase_plan_py3 import PurchasePlan - from .os_disk_image_py3 import OSDiskImage - from .data_disk_image_py3 import DataDiskImage - from .virtual_machine_image_py3 import VirtualMachineImage - from .usage_name_py3 import UsageName - from .usage_py3 import Usage - from .virtual_machine_capture_parameters_py3 import VirtualMachineCaptureParameters - from .virtual_machine_capture_result_py3 import VirtualMachineCaptureResult - from .plan_py3 import Plan - from .hardware_profile_py3 import HardwareProfile - from .image_reference_py3 import ImageReference - from .key_vault_secret_reference_py3 import KeyVaultSecretReference - from .key_vault_key_reference_py3 import KeyVaultKeyReference - from .disk_encryption_settings_py3 import DiskEncryptionSettings - from .virtual_hard_disk_py3 import VirtualHardDisk - from .managed_disk_parameters_py3 import ManagedDiskParameters - from .os_disk_py3 import OSDisk - from .data_disk_py3 import DataDisk - from .storage_profile_py3 import StorageProfile - from .additional_unattend_content_py3 import AdditionalUnattendContent - from .win_rm_listener_py3 import WinRMListener - from .win_rm_configuration_py3 import WinRMConfiguration - from .windows_configuration_py3 import WindowsConfiguration - from .ssh_public_key_py3 import SshPublicKey - from .ssh_configuration_py3 import SshConfiguration - from .linux_configuration_py3 import LinuxConfiguration - from .vault_certificate_py3 import VaultCertificate - from .vault_secret_group_py3 import VaultSecretGroup - from .os_profile_py3 import OSProfile - from .network_interface_reference_py3 import NetworkInterfaceReference - from .network_profile_py3 import NetworkProfile - from .boot_diagnostics_py3 import BootDiagnostics - from .diagnostics_profile_py3 import DiagnosticsProfile - from .virtual_machine_extension_handler_instance_view_py3 import VirtualMachineExtensionHandlerInstanceView - from .virtual_machine_agent_instance_view_py3 import VirtualMachineAgentInstanceView - from .disk_instance_view_py3 import DiskInstanceView - from .boot_diagnostics_instance_view_py3 import BootDiagnosticsInstanceView - from .virtual_machine_identity_py3 import VirtualMachineIdentity - from .maintenance_redeploy_status_py3 import MaintenanceRedeployStatus - from .virtual_machine_instance_view_py3 import VirtualMachineInstanceView - from .virtual_machine_py3 import VirtualMachine - from .rolling_upgrade_policy_py3 import RollingUpgradePolicy - from .upgrade_policy_py3 import UpgradePolicy - from .image_os_disk_py3 import ImageOSDisk - from .image_data_disk_py3 import ImageDataDisk - from .image_storage_profile_py3 import ImageStorageProfile - from .image_py3 import Image - from .virtual_machine_scale_set_identity_py3 import VirtualMachineScaleSetIdentity - from .resource_sku_capacity_py3 import ResourceSkuCapacity - from .resource_sku_costs_py3 import ResourceSkuCosts - from .resource_sku_capabilities_py3 import ResourceSkuCapabilities - from .resource_sku_restrictions_py3 import ResourceSkuRestrictions - from .resource_sku_py3 import ResourceSku - from .virtual_machine_scale_set_os_profile_py3 import VirtualMachineScaleSetOSProfile - from .virtual_machine_scale_set_update_os_profile_py3 import VirtualMachineScaleSetUpdateOSProfile - from .virtual_machine_scale_set_managed_disk_parameters_py3 import VirtualMachineScaleSetManagedDiskParameters - from .virtual_machine_scale_set_os_disk_py3 import VirtualMachineScaleSetOSDisk - from .virtual_machine_scale_set_update_os_disk_py3 import VirtualMachineScaleSetUpdateOSDisk - from .virtual_machine_scale_set_data_disk_py3 import VirtualMachineScaleSetDataDisk - from .virtual_machine_scale_set_storage_profile_py3 import VirtualMachineScaleSetStorageProfile - from .virtual_machine_scale_set_update_storage_profile_py3 import VirtualMachineScaleSetUpdateStorageProfile - from .api_entity_reference_py3 import ApiEntityReference - from .virtual_machine_scale_set_public_ip_address_configuration_dns_settings_py3 import VirtualMachineScaleSetPublicIPAddressConfigurationDnsSettings - from .virtual_machine_scale_set_public_ip_address_configuration_py3 import VirtualMachineScaleSetPublicIPAddressConfiguration - from .virtual_machine_scale_set_update_public_ip_address_configuration_py3 import VirtualMachineScaleSetUpdatePublicIPAddressConfiguration - from .virtual_machine_scale_set_ip_configuration_py3 import VirtualMachineScaleSetIPConfiguration - from .virtual_machine_scale_set_update_ip_configuration_py3 import VirtualMachineScaleSetUpdateIPConfiguration - from .virtual_machine_scale_set_network_configuration_dns_settings_py3 import VirtualMachineScaleSetNetworkConfigurationDnsSettings - from .virtual_machine_scale_set_network_configuration_py3 import VirtualMachineScaleSetNetworkConfiguration - from .virtual_machine_scale_set_update_network_configuration_py3 import VirtualMachineScaleSetUpdateNetworkConfiguration - from .virtual_machine_scale_set_network_profile_py3 import VirtualMachineScaleSetNetworkProfile - from .virtual_machine_scale_set_update_network_profile_py3 import VirtualMachineScaleSetUpdateNetworkProfile - from .virtual_machine_scale_set_extension_py3 import VirtualMachineScaleSetExtension - from .virtual_machine_scale_set_extension_profile_py3 import VirtualMachineScaleSetExtensionProfile - from .virtual_machine_scale_set_vm_profile_py3 import VirtualMachineScaleSetVMProfile - from .virtual_machine_scale_set_update_vm_profile_py3 import VirtualMachineScaleSetUpdateVMProfile - from .virtual_machine_scale_set_py3 import VirtualMachineScaleSet - from .virtual_machine_scale_set_update_py3 import VirtualMachineScaleSetUpdate - from .virtual_machine_scale_set_vm_instance_ids_py3 import VirtualMachineScaleSetVMInstanceIDs - from .virtual_machine_scale_set_vm_instance_required_ids_py3 import VirtualMachineScaleSetVMInstanceRequiredIDs - from .virtual_machine_status_code_count_py3 import VirtualMachineStatusCodeCount - from .virtual_machine_scale_set_instance_view_statuses_summary_py3 import VirtualMachineScaleSetInstanceViewStatusesSummary - from .virtual_machine_scale_set_vm_extensions_summary_py3 import VirtualMachineScaleSetVMExtensionsSummary - from .virtual_machine_scale_set_instance_view_py3 import VirtualMachineScaleSetInstanceView - from .virtual_machine_scale_set_sku_capacity_py3 import VirtualMachineScaleSetSkuCapacity - from .virtual_machine_scale_set_sku_py3 import VirtualMachineScaleSetSku - from .virtual_machine_health_status_py3 import VirtualMachineHealthStatus - from .virtual_machine_scale_set_vm_instance_view_py3 import VirtualMachineScaleSetVMInstanceView - from .virtual_machine_scale_set_vm_py3 import VirtualMachineScaleSetVM - from .rolling_upgrade_running_status_py3 import RollingUpgradeRunningStatus - from .rolling_upgrade_progress_info_py3 import RollingUpgradeProgressInfo - from .api_error_base_py3 import ApiErrorBase - from .inner_error_py3 import InnerError - from .api_error_py3 import ApiError - from .rolling_upgrade_status_info_py3 import RollingUpgradeStatusInfo - from .compute_long_running_operation_properties_py3 import ComputeLongRunningOperationProperties - from .resource_py3 import Resource - from .update_resource_py3 import UpdateResource - from .sub_resource_read_only_py3 import SubResourceReadOnly - from .operation_status_response_py3 import OperationStatusResponse - from .disk_sku_py3 import DiskSku - from .resource_update_py3 import ResourceUpdate - from .image_disk_reference_py3 import ImageDiskReference - from .creation_data_py3 import CreationData - from .source_vault_py3 import SourceVault - from .key_vault_and_secret_reference_py3 import KeyVaultAndSecretReference - from .key_vault_and_key_reference_py3 import KeyVaultAndKeyReference - from .encryption_settings_py3 import EncryptionSettings - from .disk_py3 import Disk - from .disk_update_py3 import DiskUpdate - from .grant_access_data_py3 import GrantAccessData - from .access_uri_py3 import AccessUri - from .snapshot_py3 import Snapshot - from .snapshot_update_py3 import SnapshotUpdate - from .run_command_input_parameter_py3 import RunCommandInputParameter - from .run_command_input_py3 import RunCommandInput - from .run_command_parameter_definition_py3 import RunCommandParameterDefinition - from .run_command_document_base_py3 import RunCommandDocumentBase - from .run_command_document_py3 import RunCommandDocument - from .run_command_result_py3 import RunCommandResult + from ._models_py3 import AccessUri + from ._models_py3 import AdditionalUnattendContent + from ._models_py3 import ApiEntityReference + from ._models_py3 import ApiError + from ._models_py3 import ApiErrorBase + from ._models_py3 import AvailabilitySet + from ._models_py3 import BootDiagnostics + from ._models_py3 import BootDiagnosticsInstanceView + from ._models_py3 import ComputeLongRunningOperationProperties + from ._models_py3 import CreationData + from ._models_py3 import DataDisk + from ._models_py3 import DataDiskImage + from ._models_py3 import DiagnosticsProfile + from ._models_py3 import Disk + from ._models_py3 import DiskEncryptionSettings + from ._models_py3 import DiskInstanceView + from ._models_py3 import DiskSku + from ._models_py3 import DiskUpdate + from ._models_py3 import EncryptionSettings + from ._models_py3 import GrantAccessData + from ._models_py3 import HardwareProfile + from ._models_py3 import Image + from ._models_py3 import ImageDataDisk + from ._models_py3 import ImageDiskReference + from ._models_py3 import ImageOSDisk + from ._models_py3 import ImageReference + from ._models_py3 import ImageStorageProfile + from ._models_py3 import InnerError + from ._models_py3 import InstanceViewStatus + from ._models_py3 import KeyVaultAndKeyReference + from ._models_py3 import KeyVaultAndSecretReference + from ._models_py3 import KeyVaultKeyReference + from ._models_py3 import KeyVaultSecretReference + from ._models_py3 import LinuxConfiguration + from ._models_py3 import MaintenanceRedeployStatus + from ._models_py3 import ManagedDiskParameters + from ._models_py3 import NetworkInterfaceReference + from ._models_py3 import NetworkProfile + from ._models_py3 import OperationStatusResponse + from ._models_py3 import OSDisk + from ._models_py3 import OSDiskImage + from ._models_py3 import OSProfile + from ._models_py3 import Plan + from ._models_py3 import PurchasePlan + from ._models_py3 import Resource + from ._models_py3 import ResourceSku + from ._models_py3 import ResourceSkuCapabilities + from ._models_py3 import ResourceSkuCapacity + from ._models_py3 import ResourceSkuCosts + from ._models_py3 import ResourceSkuRestrictions + from ._models_py3 import ResourceUpdate + from ._models_py3 import RollingUpgradePolicy + from ._models_py3 import RollingUpgradeProgressInfo + from ._models_py3 import RollingUpgradeRunningStatus + from ._models_py3 import RollingUpgradeStatusInfo + from ._models_py3 import RunCommandDocument + from ._models_py3 import RunCommandDocumentBase + from ._models_py3 import RunCommandInput + from ._models_py3 import RunCommandInputParameter + from ._models_py3 import RunCommandParameterDefinition + from ._models_py3 import RunCommandResult + from ._models_py3 import Sku + from ._models_py3 import Snapshot + from ._models_py3 import SnapshotUpdate + from ._models_py3 import SourceVault + from ._models_py3 import SshConfiguration + from ._models_py3 import SshPublicKey + from ._models_py3 import StorageProfile + from ._models_py3 import SubResource + from ._models_py3 import SubResourceReadOnly + from ._models_py3 import UpdateResource + from ._models_py3 import UpgradePolicy + from ._models_py3 import Usage + from ._models_py3 import UsageName + from ._models_py3 import VaultCertificate + from ._models_py3 import VaultSecretGroup + from ._models_py3 import VirtualHardDisk + from ._models_py3 import VirtualMachine + from ._models_py3 import VirtualMachineAgentInstanceView + from ._models_py3 import VirtualMachineCaptureParameters + from ._models_py3 import VirtualMachineCaptureResult + from ._models_py3 import VirtualMachineExtension + from ._models_py3 import VirtualMachineExtensionHandlerInstanceView + from ._models_py3 import VirtualMachineExtensionImage + from ._models_py3 import VirtualMachineExtensionInstanceView + from ._models_py3 import VirtualMachineExtensionsListResult + from ._models_py3 import VirtualMachineExtensionUpdate + from ._models_py3 import VirtualMachineHealthStatus + from ._models_py3 import VirtualMachineIdentity + from ._models_py3 import VirtualMachineImage + from ._models_py3 import VirtualMachineImageResource + from ._models_py3 import VirtualMachineInstanceView + from ._models_py3 import VirtualMachineScaleSet + from ._models_py3 import VirtualMachineScaleSetDataDisk + from ._models_py3 import VirtualMachineScaleSetExtension + from ._models_py3 import VirtualMachineScaleSetExtensionProfile + from ._models_py3 import VirtualMachineScaleSetIdentity + from ._models_py3 import VirtualMachineScaleSetInstanceView + from ._models_py3 import VirtualMachineScaleSetInstanceViewStatusesSummary + from ._models_py3 import VirtualMachineScaleSetIPConfiguration + from ._models_py3 import VirtualMachineScaleSetManagedDiskParameters + from ._models_py3 import VirtualMachineScaleSetNetworkConfiguration + from ._models_py3 import VirtualMachineScaleSetNetworkConfigurationDnsSettings + from ._models_py3 import VirtualMachineScaleSetNetworkProfile + from ._models_py3 import VirtualMachineScaleSetOSDisk + from ._models_py3 import VirtualMachineScaleSetOSProfile + from ._models_py3 import VirtualMachineScaleSetPublicIPAddressConfiguration + from ._models_py3 import VirtualMachineScaleSetPublicIPAddressConfigurationDnsSettings + from ._models_py3 import VirtualMachineScaleSetSku + from ._models_py3 import VirtualMachineScaleSetSkuCapacity + from ._models_py3 import VirtualMachineScaleSetStorageProfile + from ._models_py3 import VirtualMachineScaleSetUpdate + from ._models_py3 import VirtualMachineScaleSetUpdateIPConfiguration + from ._models_py3 import VirtualMachineScaleSetUpdateNetworkConfiguration + from ._models_py3 import VirtualMachineScaleSetUpdateNetworkProfile + from ._models_py3 import VirtualMachineScaleSetUpdateOSDisk + from ._models_py3 import VirtualMachineScaleSetUpdateOSProfile + from ._models_py3 import VirtualMachineScaleSetUpdatePublicIPAddressConfiguration + from ._models_py3 import VirtualMachineScaleSetUpdateStorageProfile + from ._models_py3 import VirtualMachineScaleSetUpdateVMProfile + from ._models_py3 import VirtualMachineScaleSetVM + from ._models_py3 import VirtualMachineScaleSetVMExtensionsSummary + from ._models_py3 import VirtualMachineScaleSetVMInstanceIDs + from ._models_py3 import VirtualMachineScaleSetVMInstanceRequiredIDs + from ._models_py3 import VirtualMachineScaleSetVMInstanceView + from ._models_py3 import VirtualMachineScaleSetVMProfile + from ._models_py3 import VirtualMachineSize + from ._models_py3 import VirtualMachineStatusCodeCount + from ._models_py3 import WindowsConfiguration + from ._models_py3 import WinRMConfiguration + from ._models_py3 import WinRMListener except (SyntaxError, ImportError): - from .instance_view_status import InstanceViewStatus - from .sub_resource import SubResource - from .sku import Sku - from .availability_set import AvailabilitySet - from .virtual_machine_size import VirtualMachineSize - from .virtual_machine_extension_image import VirtualMachineExtensionImage - from .virtual_machine_image_resource import VirtualMachineImageResource - from .virtual_machine_extension_instance_view import VirtualMachineExtensionInstanceView - from .virtual_machine_extension import VirtualMachineExtension - from .virtual_machine_extension_update import VirtualMachineExtensionUpdate - from .virtual_machine_extensions_list_result import VirtualMachineExtensionsListResult - from .purchase_plan import PurchasePlan - from .os_disk_image import OSDiskImage - from .data_disk_image import DataDiskImage - from .virtual_machine_image import VirtualMachineImage - from .usage_name import UsageName - from .usage import Usage - from .virtual_machine_capture_parameters import VirtualMachineCaptureParameters - from .virtual_machine_capture_result import VirtualMachineCaptureResult - from .plan import Plan - from .hardware_profile import HardwareProfile - from .image_reference import ImageReference - from .key_vault_secret_reference import KeyVaultSecretReference - from .key_vault_key_reference import KeyVaultKeyReference - from .disk_encryption_settings import DiskEncryptionSettings - from .virtual_hard_disk import VirtualHardDisk - from .managed_disk_parameters import ManagedDiskParameters - from .os_disk import OSDisk - from .data_disk import DataDisk - from .storage_profile import StorageProfile - from .additional_unattend_content import AdditionalUnattendContent - from .win_rm_listener import WinRMListener - from .win_rm_configuration import WinRMConfiguration - from .windows_configuration import WindowsConfiguration - from .ssh_public_key import SshPublicKey - from .ssh_configuration import SshConfiguration - from .linux_configuration import LinuxConfiguration - from .vault_certificate import VaultCertificate - from .vault_secret_group import VaultSecretGroup - from .os_profile import OSProfile - from .network_interface_reference import NetworkInterfaceReference - from .network_profile import NetworkProfile - from .boot_diagnostics import BootDiagnostics - from .diagnostics_profile import DiagnosticsProfile - from .virtual_machine_extension_handler_instance_view import VirtualMachineExtensionHandlerInstanceView - from .virtual_machine_agent_instance_view import VirtualMachineAgentInstanceView - from .disk_instance_view import DiskInstanceView - from .boot_diagnostics_instance_view import BootDiagnosticsInstanceView - from .virtual_machine_identity import VirtualMachineIdentity - from .maintenance_redeploy_status import MaintenanceRedeployStatus - from .virtual_machine_instance_view import VirtualMachineInstanceView - from .virtual_machine import VirtualMachine - from .rolling_upgrade_policy import RollingUpgradePolicy - from .upgrade_policy import UpgradePolicy - from .image_os_disk import ImageOSDisk - from .image_data_disk import ImageDataDisk - from .image_storage_profile import ImageStorageProfile - from .image import Image - from .virtual_machine_scale_set_identity import VirtualMachineScaleSetIdentity - from .resource_sku_capacity import ResourceSkuCapacity - from .resource_sku_costs import ResourceSkuCosts - from .resource_sku_capabilities import ResourceSkuCapabilities - from .resource_sku_restrictions import ResourceSkuRestrictions - from .resource_sku import ResourceSku - from .virtual_machine_scale_set_os_profile import VirtualMachineScaleSetOSProfile - from .virtual_machine_scale_set_update_os_profile import VirtualMachineScaleSetUpdateOSProfile - from .virtual_machine_scale_set_managed_disk_parameters import VirtualMachineScaleSetManagedDiskParameters - from .virtual_machine_scale_set_os_disk import VirtualMachineScaleSetOSDisk - from .virtual_machine_scale_set_update_os_disk import VirtualMachineScaleSetUpdateOSDisk - from .virtual_machine_scale_set_data_disk import VirtualMachineScaleSetDataDisk - from .virtual_machine_scale_set_storage_profile import VirtualMachineScaleSetStorageProfile - from .virtual_machine_scale_set_update_storage_profile import VirtualMachineScaleSetUpdateStorageProfile - from .api_entity_reference import ApiEntityReference - from .virtual_machine_scale_set_public_ip_address_configuration_dns_settings import VirtualMachineScaleSetPublicIPAddressConfigurationDnsSettings - from .virtual_machine_scale_set_public_ip_address_configuration import VirtualMachineScaleSetPublicIPAddressConfiguration - from .virtual_machine_scale_set_update_public_ip_address_configuration import VirtualMachineScaleSetUpdatePublicIPAddressConfiguration - from .virtual_machine_scale_set_ip_configuration import VirtualMachineScaleSetIPConfiguration - from .virtual_machine_scale_set_update_ip_configuration import VirtualMachineScaleSetUpdateIPConfiguration - from .virtual_machine_scale_set_network_configuration_dns_settings import VirtualMachineScaleSetNetworkConfigurationDnsSettings - from .virtual_machine_scale_set_network_configuration import VirtualMachineScaleSetNetworkConfiguration - from .virtual_machine_scale_set_update_network_configuration import VirtualMachineScaleSetUpdateNetworkConfiguration - from .virtual_machine_scale_set_network_profile import VirtualMachineScaleSetNetworkProfile - from .virtual_machine_scale_set_update_network_profile import VirtualMachineScaleSetUpdateNetworkProfile - from .virtual_machine_scale_set_extension import VirtualMachineScaleSetExtension - from .virtual_machine_scale_set_extension_profile import VirtualMachineScaleSetExtensionProfile - from .virtual_machine_scale_set_vm_profile import VirtualMachineScaleSetVMProfile - from .virtual_machine_scale_set_update_vm_profile import VirtualMachineScaleSetUpdateVMProfile - from .virtual_machine_scale_set import VirtualMachineScaleSet - from .virtual_machine_scale_set_update import VirtualMachineScaleSetUpdate - from .virtual_machine_scale_set_vm_instance_ids import VirtualMachineScaleSetVMInstanceIDs - from .virtual_machine_scale_set_vm_instance_required_ids import VirtualMachineScaleSetVMInstanceRequiredIDs - from .virtual_machine_status_code_count import VirtualMachineStatusCodeCount - from .virtual_machine_scale_set_instance_view_statuses_summary import VirtualMachineScaleSetInstanceViewStatusesSummary - from .virtual_machine_scale_set_vm_extensions_summary import VirtualMachineScaleSetVMExtensionsSummary - from .virtual_machine_scale_set_instance_view import VirtualMachineScaleSetInstanceView - from .virtual_machine_scale_set_sku_capacity import VirtualMachineScaleSetSkuCapacity - from .virtual_machine_scale_set_sku import VirtualMachineScaleSetSku - from .virtual_machine_health_status import VirtualMachineHealthStatus - from .virtual_machine_scale_set_vm_instance_view import VirtualMachineScaleSetVMInstanceView - from .virtual_machine_scale_set_vm import VirtualMachineScaleSetVM - from .rolling_upgrade_running_status import RollingUpgradeRunningStatus - from .rolling_upgrade_progress_info import RollingUpgradeProgressInfo - from .api_error_base import ApiErrorBase - from .inner_error import InnerError - from .api_error import ApiError - from .rolling_upgrade_status_info import RollingUpgradeStatusInfo - from .compute_long_running_operation_properties import ComputeLongRunningOperationProperties - from .resource import Resource - from .update_resource import UpdateResource - from .sub_resource_read_only import SubResourceReadOnly - from .operation_status_response import OperationStatusResponse - from .disk_sku import DiskSku - from .resource_update import ResourceUpdate - from .image_disk_reference import ImageDiskReference - from .creation_data import CreationData - from .source_vault import SourceVault - from .key_vault_and_secret_reference import KeyVaultAndSecretReference - from .key_vault_and_key_reference import KeyVaultAndKeyReference - from .encryption_settings import EncryptionSettings - from .disk import Disk - from .disk_update import DiskUpdate - from .grant_access_data import GrantAccessData - from .access_uri import AccessUri - from .snapshot import Snapshot - from .snapshot_update import SnapshotUpdate - from .run_command_input_parameter import RunCommandInputParameter - from .run_command_input import RunCommandInput - from .run_command_parameter_definition import RunCommandParameterDefinition - from .run_command_document_base import RunCommandDocumentBase - from .run_command_document import RunCommandDocument - from .run_command_result import RunCommandResult -from .availability_set_paged import AvailabilitySetPaged -from .virtual_machine_size_paged import VirtualMachineSizePaged -from .virtual_machine_paged import VirtualMachinePaged -from .usage_paged import UsagePaged -from .image_paged import ImagePaged -from .resource_sku_paged import ResourceSkuPaged -from .virtual_machine_scale_set_paged import VirtualMachineScaleSetPaged -from .virtual_machine_scale_set_sku_paged import VirtualMachineScaleSetSkuPaged -from .virtual_machine_scale_set_extension_paged import VirtualMachineScaleSetExtensionPaged -from .virtual_machine_scale_set_vm_paged import VirtualMachineScaleSetVMPaged -from .disk_paged import DiskPaged -from .snapshot_paged import SnapshotPaged -from .run_command_document_base_paged import RunCommandDocumentBasePaged -from .compute_management_client_enums import ( + from ._models import AccessUri + from ._models import AdditionalUnattendContent + from ._models import ApiEntityReference + from ._models import ApiError + from ._models import ApiErrorBase + from ._models import AvailabilitySet + from ._models import BootDiagnostics + from ._models import BootDiagnosticsInstanceView + from ._models import ComputeLongRunningOperationProperties + from ._models import CreationData + from ._models import DataDisk + from ._models import DataDiskImage + from ._models import DiagnosticsProfile + from ._models import Disk + from ._models import DiskEncryptionSettings + from ._models import DiskInstanceView + from ._models import DiskSku + from ._models import DiskUpdate + from ._models import EncryptionSettings + from ._models import GrantAccessData + from ._models import HardwareProfile + from ._models import Image + from ._models import ImageDataDisk + from ._models import ImageDiskReference + from ._models import ImageOSDisk + from ._models import ImageReference + from ._models import ImageStorageProfile + from ._models import InnerError + from ._models import InstanceViewStatus + from ._models import KeyVaultAndKeyReference + from ._models import KeyVaultAndSecretReference + from ._models import KeyVaultKeyReference + from ._models import KeyVaultSecretReference + from ._models import LinuxConfiguration + from ._models import MaintenanceRedeployStatus + from ._models import ManagedDiskParameters + from ._models import NetworkInterfaceReference + from ._models import NetworkProfile + from ._models import OperationStatusResponse + from ._models import OSDisk + from ._models import OSDiskImage + from ._models import OSProfile + from ._models import Plan + from ._models import PurchasePlan + from ._models import Resource + from ._models import ResourceSku + from ._models import ResourceSkuCapabilities + from ._models import ResourceSkuCapacity + from ._models import ResourceSkuCosts + from ._models import ResourceSkuRestrictions + from ._models import ResourceUpdate + from ._models import RollingUpgradePolicy + from ._models import RollingUpgradeProgressInfo + from ._models import RollingUpgradeRunningStatus + from ._models import RollingUpgradeStatusInfo + from ._models import RunCommandDocument + from ._models import RunCommandDocumentBase + from ._models import RunCommandInput + from ._models import RunCommandInputParameter + from ._models import RunCommandParameterDefinition + from ._models import RunCommandResult + from ._models import Sku + from ._models import Snapshot + from ._models import SnapshotUpdate + from ._models import SourceVault + from ._models import SshConfiguration + from ._models import SshPublicKey + from ._models import StorageProfile + from ._models import SubResource + from ._models import SubResourceReadOnly + from ._models import UpdateResource + from ._models import UpgradePolicy + from ._models import Usage + from ._models import UsageName + from ._models import VaultCertificate + from ._models import VaultSecretGroup + from ._models import VirtualHardDisk + from ._models import VirtualMachine + from ._models import VirtualMachineAgentInstanceView + from ._models import VirtualMachineCaptureParameters + from ._models import VirtualMachineCaptureResult + from ._models import VirtualMachineExtension + from ._models import VirtualMachineExtensionHandlerInstanceView + from ._models import VirtualMachineExtensionImage + from ._models import VirtualMachineExtensionInstanceView + from ._models import VirtualMachineExtensionsListResult + from ._models import VirtualMachineExtensionUpdate + from ._models import VirtualMachineHealthStatus + from ._models import VirtualMachineIdentity + from ._models import VirtualMachineImage + from ._models import VirtualMachineImageResource + from ._models import VirtualMachineInstanceView + from ._models import VirtualMachineScaleSet + from ._models import VirtualMachineScaleSetDataDisk + from ._models import VirtualMachineScaleSetExtension + from ._models import VirtualMachineScaleSetExtensionProfile + from ._models import VirtualMachineScaleSetIdentity + from ._models import VirtualMachineScaleSetInstanceView + from ._models import VirtualMachineScaleSetInstanceViewStatusesSummary + from ._models import VirtualMachineScaleSetIPConfiguration + from ._models import VirtualMachineScaleSetManagedDiskParameters + from ._models import VirtualMachineScaleSetNetworkConfiguration + from ._models import VirtualMachineScaleSetNetworkConfigurationDnsSettings + from ._models import VirtualMachineScaleSetNetworkProfile + from ._models import VirtualMachineScaleSetOSDisk + from ._models import VirtualMachineScaleSetOSProfile + from ._models import VirtualMachineScaleSetPublicIPAddressConfiguration + from ._models import VirtualMachineScaleSetPublicIPAddressConfigurationDnsSettings + from ._models import VirtualMachineScaleSetSku + from ._models import VirtualMachineScaleSetSkuCapacity + from ._models import VirtualMachineScaleSetStorageProfile + from ._models import VirtualMachineScaleSetUpdate + from ._models import VirtualMachineScaleSetUpdateIPConfiguration + from ._models import VirtualMachineScaleSetUpdateNetworkConfiguration + from ._models import VirtualMachineScaleSetUpdateNetworkProfile + from ._models import VirtualMachineScaleSetUpdateOSDisk + from ._models import VirtualMachineScaleSetUpdateOSProfile + from ._models import VirtualMachineScaleSetUpdatePublicIPAddressConfiguration + from ._models import VirtualMachineScaleSetUpdateStorageProfile + from ._models import VirtualMachineScaleSetUpdateVMProfile + from ._models import VirtualMachineScaleSetVM + from ._models import VirtualMachineScaleSetVMExtensionsSummary + from ._models import VirtualMachineScaleSetVMInstanceIDs + from ._models import VirtualMachineScaleSetVMInstanceRequiredIDs + from ._models import VirtualMachineScaleSetVMInstanceView + from ._models import VirtualMachineScaleSetVMProfile + from ._models import VirtualMachineSize + from ._models import VirtualMachineStatusCodeCount + from ._models import WindowsConfiguration + from ._models import WinRMConfiguration + from ._models import WinRMListener +from ._paged_models import AvailabilitySetPaged +from ._paged_models import DiskPaged +from ._paged_models import ImagePaged +from ._paged_models import ResourceSkuPaged +from ._paged_models import RunCommandDocumentBasePaged +from ._paged_models import SnapshotPaged +from ._paged_models import UsagePaged +from ._paged_models import VirtualMachinePaged +from ._paged_models import VirtualMachineScaleSetExtensionPaged +from ._paged_models import VirtualMachineScaleSetPaged +from ._paged_models import VirtualMachineScaleSetSkuPaged +from ._paged_models import VirtualMachineScaleSetVMPaged +from ._paged_models import VirtualMachineSizePaged +from ._compute_management_client_enums import ( StatusLevelTypes, OperatingSystemTypes, VirtualMachineSizeTypes, @@ -314,137 +314,137 @@ ) __all__ = [ - 'InstanceViewStatus', - 'SubResource', - 'Sku', + 'AccessUri', + 'AdditionalUnattendContent', + 'ApiEntityReference', + 'ApiError', + 'ApiErrorBase', 'AvailabilitySet', - 'VirtualMachineSize', - 'VirtualMachineExtensionImage', - 'VirtualMachineImageResource', - 'VirtualMachineExtensionInstanceView', - 'VirtualMachineExtension', - 'VirtualMachineExtensionUpdate', - 'VirtualMachineExtensionsListResult', - 'PurchasePlan', - 'OSDiskImage', + 'BootDiagnostics', + 'BootDiagnosticsInstanceView', + 'ComputeLongRunningOperationProperties', + 'CreationData', + 'DataDisk', 'DataDiskImage', - 'VirtualMachineImage', - 'UsageName', - 'Usage', - 'VirtualMachineCaptureParameters', - 'VirtualMachineCaptureResult', - 'Plan', + 'DiagnosticsProfile', + 'Disk', + 'DiskEncryptionSettings', + 'DiskInstanceView', + 'DiskSku', + 'DiskUpdate', + 'EncryptionSettings', + 'GrantAccessData', 'HardwareProfile', + 'Image', + 'ImageDataDisk', + 'ImageDiskReference', + 'ImageOSDisk', 'ImageReference', - 'KeyVaultSecretReference', + 'ImageStorageProfile', + 'InnerError', + 'InstanceViewStatus', + 'KeyVaultAndKeyReference', + 'KeyVaultAndSecretReference', 'KeyVaultKeyReference', - 'DiskEncryptionSettings', - 'VirtualHardDisk', + 'KeyVaultSecretReference', + 'LinuxConfiguration', + 'MaintenanceRedeployStatus', 'ManagedDiskParameters', + 'NetworkInterfaceReference', + 'NetworkProfile', + 'OperationStatusResponse', 'OSDisk', - 'DataDisk', - 'StorageProfile', - 'AdditionalUnattendContent', - 'WinRMListener', - 'WinRMConfiguration', - 'WindowsConfiguration', - 'SshPublicKey', + 'OSDiskImage', + 'OSProfile', + 'Plan', + 'PurchasePlan', + 'Resource', + 'ResourceSku', + 'ResourceSkuCapabilities', + 'ResourceSkuCapacity', + 'ResourceSkuCosts', + 'ResourceSkuRestrictions', + 'ResourceUpdate', + 'RollingUpgradePolicy', + 'RollingUpgradeProgressInfo', + 'RollingUpgradeRunningStatus', + 'RollingUpgradeStatusInfo', + 'RunCommandDocument', + 'RunCommandDocumentBase', + 'RunCommandInput', + 'RunCommandInputParameter', + 'RunCommandParameterDefinition', + 'RunCommandResult', + 'Sku', + 'Snapshot', + 'SnapshotUpdate', + 'SourceVault', 'SshConfiguration', - 'LinuxConfiguration', + 'SshPublicKey', + 'StorageProfile', + 'SubResource', + 'SubResourceReadOnly', + 'UpdateResource', + 'UpgradePolicy', + 'Usage', + 'UsageName', 'VaultCertificate', 'VaultSecretGroup', - 'OSProfile', - 'NetworkInterfaceReference', - 'NetworkProfile', - 'BootDiagnostics', - 'DiagnosticsProfile', - 'VirtualMachineExtensionHandlerInstanceView', + 'VirtualHardDisk', + 'VirtualMachine', 'VirtualMachineAgentInstanceView', - 'DiskInstanceView', - 'BootDiagnosticsInstanceView', + 'VirtualMachineCaptureParameters', + 'VirtualMachineCaptureResult', + 'VirtualMachineExtension', + 'VirtualMachineExtensionHandlerInstanceView', + 'VirtualMachineExtensionImage', + 'VirtualMachineExtensionInstanceView', + 'VirtualMachineExtensionsListResult', + 'VirtualMachineExtensionUpdate', + 'VirtualMachineHealthStatus', 'VirtualMachineIdentity', - 'MaintenanceRedeployStatus', + 'VirtualMachineImage', + 'VirtualMachineImageResource', 'VirtualMachineInstanceView', - 'VirtualMachine', - 'RollingUpgradePolicy', - 'UpgradePolicy', - 'ImageOSDisk', - 'ImageDataDisk', - 'ImageStorageProfile', - 'Image', + 'VirtualMachineScaleSet', + 'VirtualMachineScaleSetDataDisk', + 'VirtualMachineScaleSetExtension', + 'VirtualMachineScaleSetExtensionProfile', 'VirtualMachineScaleSetIdentity', - 'ResourceSkuCapacity', - 'ResourceSkuCosts', - 'ResourceSkuCapabilities', - 'ResourceSkuRestrictions', - 'ResourceSku', - 'VirtualMachineScaleSetOSProfile', - 'VirtualMachineScaleSetUpdateOSProfile', + 'VirtualMachineScaleSetInstanceView', + 'VirtualMachineScaleSetInstanceViewStatusesSummary', + 'VirtualMachineScaleSetIPConfiguration', 'VirtualMachineScaleSetManagedDiskParameters', + 'VirtualMachineScaleSetNetworkConfiguration', + 'VirtualMachineScaleSetNetworkConfigurationDnsSettings', + 'VirtualMachineScaleSetNetworkProfile', 'VirtualMachineScaleSetOSDisk', - 'VirtualMachineScaleSetUpdateOSDisk', - 'VirtualMachineScaleSetDataDisk', - 'VirtualMachineScaleSetStorageProfile', - 'VirtualMachineScaleSetUpdateStorageProfile', - 'ApiEntityReference', - 'VirtualMachineScaleSetPublicIPAddressConfigurationDnsSettings', + 'VirtualMachineScaleSetOSProfile', 'VirtualMachineScaleSetPublicIPAddressConfiguration', - 'VirtualMachineScaleSetUpdatePublicIPAddressConfiguration', - 'VirtualMachineScaleSetIPConfiguration', + 'VirtualMachineScaleSetPublicIPAddressConfigurationDnsSettings', + 'VirtualMachineScaleSetSku', + 'VirtualMachineScaleSetSkuCapacity', + 'VirtualMachineScaleSetStorageProfile', + 'VirtualMachineScaleSetUpdate', 'VirtualMachineScaleSetUpdateIPConfiguration', - 'VirtualMachineScaleSetNetworkConfigurationDnsSettings', - 'VirtualMachineScaleSetNetworkConfiguration', 'VirtualMachineScaleSetUpdateNetworkConfiguration', - 'VirtualMachineScaleSetNetworkProfile', 'VirtualMachineScaleSetUpdateNetworkProfile', - 'VirtualMachineScaleSetExtension', - 'VirtualMachineScaleSetExtensionProfile', - 'VirtualMachineScaleSetVMProfile', + 'VirtualMachineScaleSetUpdateOSDisk', + 'VirtualMachineScaleSetUpdateOSProfile', + 'VirtualMachineScaleSetUpdatePublicIPAddressConfiguration', + 'VirtualMachineScaleSetUpdateStorageProfile', 'VirtualMachineScaleSetUpdateVMProfile', - 'VirtualMachineScaleSet', - 'VirtualMachineScaleSetUpdate', + 'VirtualMachineScaleSetVM', + 'VirtualMachineScaleSetVMExtensionsSummary', 'VirtualMachineScaleSetVMInstanceIDs', 'VirtualMachineScaleSetVMInstanceRequiredIDs', - 'VirtualMachineStatusCodeCount', - 'VirtualMachineScaleSetInstanceViewStatusesSummary', - 'VirtualMachineScaleSetVMExtensionsSummary', - 'VirtualMachineScaleSetInstanceView', - 'VirtualMachineScaleSetSkuCapacity', - 'VirtualMachineScaleSetSku', - 'VirtualMachineHealthStatus', 'VirtualMachineScaleSetVMInstanceView', - 'VirtualMachineScaleSetVM', - 'RollingUpgradeRunningStatus', - 'RollingUpgradeProgressInfo', - 'ApiErrorBase', - 'InnerError', - 'ApiError', - 'RollingUpgradeStatusInfo', - 'ComputeLongRunningOperationProperties', - 'Resource', - 'UpdateResource', - 'SubResourceReadOnly', - 'OperationStatusResponse', - 'DiskSku', - 'ResourceUpdate', - 'ImageDiskReference', - 'CreationData', - 'SourceVault', - 'KeyVaultAndSecretReference', - 'KeyVaultAndKeyReference', - 'EncryptionSettings', - 'Disk', - 'DiskUpdate', - 'GrantAccessData', - 'AccessUri', - 'Snapshot', - 'SnapshotUpdate', - 'RunCommandInputParameter', - 'RunCommandInput', - 'RunCommandParameterDefinition', - 'RunCommandDocumentBase', - 'RunCommandDocument', - 'RunCommandResult', + 'VirtualMachineScaleSetVMProfile', + 'VirtualMachineSize', + 'VirtualMachineStatusCodeCount', + 'WindowsConfiguration', + 'WinRMConfiguration', + 'WinRMListener', 'AvailabilitySetPaged', 'VirtualMachineSizePaged', 'VirtualMachinePaged', diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/compute_management_client_enums.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/_compute_management_client_enums.py similarity index 100% rename from sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/compute_management_client_enums.py rename to sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/_compute_management_client_enums.py diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/_models.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/_models.py new file mode 100644 index 000000000000..128fc870bf02 --- /dev/null +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/_models.py @@ -0,0 +1,5216 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class AccessUri(Model): + """A disk access SAS uri. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar access_sas: A SAS uri for accessing a disk. + :vartype access_sas: str + """ + + _validation = { + 'access_sas': {'readonly': True}, + } + + _attribute_map = { + 'access_sas': {'key': 'properties.output.accessSAS', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(AccessUri, self).__init__(**kwargs) + self.access_sas = None + + +class AdditionalUnattendContent(Model): + """Specifies additional XML formatted information that can be included in the + Unattend.xml file, which is used by Windows Setup. Contents are defined by + setting name, component name, and the pass in which the content is applied. + + :param pass_name: The pass name. Currently, the only allowable value is + OobeSystem. Possible values include: 'OobeSystem' + :type pass_name: str or ~azure.mgmt.compute.v2017_03_30.models.PassNames + :param component_name: The component name. Currently, the only allowable + value is Microsoft-Windows-Shell-Setup. Possible values include: + 'Microsoft-Windows-Shell-Setup' + :type component_name: str or + ~azure.mgmt.compute.v2017_03_30.models.ComponentNames + :param setting_name: Specifies the name of the setting to which the + content applies. Possible values are: FirstLogonCommands and AutoLogon. + Possible values include: 'AutoLogon', 'FirstLogonCommands' + :type setting_name: str or + ~azure.mgmt.compute.v2017_03_30.models.SettingNames + :param content: Specifies the XML formatted content that is added to the + unattend.xml file for the specified path and component. The XML must be + less than 4KB and must include the root element for the setting or feature + that is being inserted. + :type content: str + """ + + _attribute_map = { + 'pass_name': {'key': 'passName', 'type': 'PassNames'}, + 'component_name': {'key': 'componentName', 'type': 'ComponentNames'}, + 'setting_name': {'key': 'settingName', 'type': 'SettingNames'}, + 'content': {'key': 'content', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(AdditionalUnattendContent, self).__init__(**kwargs) + self.pass_name = kwargs.get('pass_name', None) + self.component_name = kwargs.get('component_name', None) + self.setting_name = kwargs.get('setting_name', None) + self.content = kwargs.get('content', None) + + +class ApiEntityReference(Model): + """The API entity reference. + + :param id: The ARM resource id in the form of + /subscriptions/{SubscriptionId}/resourceGroups/{ResourceGroupName}/... + :type id: str + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ApiEntityReference, self).__init__(**kwargs) + self.id = kwargs.get('id', None) + + +class ApiError(Model): + """Api error. + + :param details: The Api error details + :type details: list[~azure.mgmt.compute.v2017_03_30.models.ApiErrorBase] + :param innererror: The Api inner error + :type innererror: ~azure.mgmt.compute.v2017_03_30.models.InnerError + :param code: The error code. + :type code: str + :param target: The target of the particular error. + :type target: str + :param message: The error message. + :type message: str + """ + + _attribute_map = { + 'details': {'key': 'details', 'type': '[ApiErrorBase]'}, + 'innererror': {'key': 'innererror', 'type': 'InnerError'}, + 'code': {'key': 'code', 'type': 'str'}, + 'target': {'key': 'target', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ApiError, self).__init__(**kwargs) + self.details = kwargs.get('details', None) + self.innererror = kwargs.get('innererror', None) + self.code = kwargs.get('code', None) + self.target = kwargs.get('target', None) + self.message = kwargs.get('message', None) + + +class ApiErrorBase(Model): + """Api error base. + + :param code: The error code. + :type code: str + :param target: The target of the particular error. + :type target: str + :param message: The error message. + :type message: str + """ + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + 'target': {'key': 'target', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ApiErrorBase, self).__init__(**kwargs) + self.code = kwargs.get('code', None) + self.target = kwargs.get('target', None) + self.message = kwargs.get('message', None) + + +class Resource(Model): + """The Resource model definition. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource Id + :vartype id: str + :ivar name: Resource name + :vartype name: str + :ivar type: Resource type + :vartype type: str + :param location: Required. Resource location + :type location: str + :param tags: Resource tags + :type tags: dict[str, str] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__(self, **kwargs): + super(Resource, self).__init__(**kwargs) + self.id = None + self.name = None + self.type = None + self.location = kwargs.get('location', None) + self.tags = kwargs.get('tags', None) + + +class AvailabilitySet(Resource): + """Specifies information about the availability set that the virtual machine + should be assigned to. Virtual machines specified in the same availability + set are allocated to different nodes to maximize availability. For more + information about availability sets, see [Manage the availability of + virtual + machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-manage-availability?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). +

    For more information on Azure planned maintenance, see [Planned + maintenance for virtual machines in + Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-planned-maintenance?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json) +

    Currently, a VM can only be added to availability set at creation + time. An existing VM cannot be added to an availability set. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource Id + :vartype id: str + :ivar name: Resource name + :vartype name: str + :ivar type: Resource type + :vartype type: str + :param location: Required. Resource location + :type location: str + :param tags: Resource tags + :type tags: dict[str, str] + :param platform_update_domain_count: Update Domain count. + :type platform_update_domain_count: int + :param platform_fault_domain_count: Fault Domain count. + :type platform_fault_domain_count: int + :param virtual_machines: A list of references to all virtual machines in + the availability set. + :type virtual_machines: + list[~azure.mgmt.compute.v2017_03_30.models.SubResource] + :ivar statuses: The resource status information. + :vartype statuses: + list[~azure.mgmt.compute.v2017_03_30.models.InstanceViewStatus] + :param sku: Sku of the availability set + :type sku: ~azure.mgmt.compute.v2017_03_30.models.Sku + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + 'statuses': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'platform_update_domain_count': {'key': 'properties.platformUpdateDomainCount', 'type': 'int'}, + 'platform_fault_domain_count': {'key': 'properties.platformFaultDomainCount', 'type': 'int'}, + 'virtual_machines': {'key': 'properties.virtualMachines', 'type': '[SubResource]'}, + 'statuses': {'key': 'properties.statuses', 'type': '[InstanceViewStatus]'}, + 'sku': {'key': 'sku', 'type': 'Sku'}, + } + + def __init__(self, **kwargs): + super(AvailabilitySet, self).__init__(**kwargs) + self.platform_update_domain_count = kwargs.get('platform_update_domain_count', None) + self.platform_fault_domain_count = kwargs.get('platform_fault_domain_count', None) + self.virtual_machines = kwargs.get('virtual_machines', None) + self.statuses = None + self.sku = kwargs.get('sku', None) + + +class BootDiagnostics(Model): + """Boot Diagnostics is a debugging feature which allows you to view Console + Output and Screenshot to diagnose VM status.

    You can easily view + the output of your console log.

    Azure also enables you to see a + screenshot of the VM from the hypervisor. + + :param enabled: Whether boot diagnostics should be enabled on the Virtual + Machine. + :type enabled: bool + :param storage_uri: Uri of the storage account to use for placing the + console output and screenshot. + :type storage_uri: str + """ + + _attribute_map = { + 'enabled': {'key': 'enabled', 'type': 'bool'}, + 'storage_uri': {'key': 'storageUri', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(BootDiagnostics, self).__init__(**kwargs) + self.enabled = kwargs.get('enabled', None) + self.storage_uri = kwargs.get('storage_uri', None) + + +class BootDiagnosticsInstanceView(Model): + """The instance view of a virtual machine boot diagnostics. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar console_screenshot_blob_uri: The console screenshot blob URI. + :vartype console_screenshot_blob_uri: str + :ivar serial_console_log_blob_uri: The Linux serial console log blob Uri. + :vartype serial_console_log_blob_uri: str + """ + + _validation = { + 'console_screenshot_blob_uri': {'readonly': True}, + 'serial_console_log_blob_uri': {'readonly': True}, + } + + _attribute_map = { + 'console_screenshot_blob_uri': {'key': 'consoleScreenshotBlobUri', 'type': 'str'}, + 'serial_console_log_blob_uri': {'key': 'serialConsoleLogBlobUri', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(BootDiagnosticsInstanceView, self).__init__(**kwargs) + self.console_screenshot_blob_uri = None + self.serial_console_log_blob_uri = None + + +class CloudError(Model): + """CloudError. + """ + + _attribute_map = { + } + + +class ComputeLongRunningOperationProperties(Model): + """Compute-specific operation properties, including output. + + :param output: Operation output data (raw JSON) + :type output: object + """ + + _attribute_map = { + 'output': {'key': 'output', 'type': 'object'}, + } + + def __init__(self, **kwargs): + super(ComputeLongRunningOperationProperties, self).__init__(**kwargs) + self.output = kwargs.get('output', None) + + +class CreationData(Model): + """Data used when creating a disk. + + All required parameters must be populated in order to send to Azure. + + :param create_option: Required. This enumerates the possible sources of a + disk's creation. Possible values include: 'Empty', 'Attach', 'FromImage', + 'Import', 'Copy' + :type create_option: str or + ~azure.mgmt.compute.v2017_03_30.models.DiskCreateOption + :param storage_account_id: If createOption is Import, the Azure Resource + Manager identifier of the storage account containing the blob to import as + a disk. Required only if the blob is in a different subscription + :type storage_account_id: str + :param image_reference: Disk source information. + :type image_reference: + ~azure.mgmt.compute.v2017_03_30.models.ImageDiskReference + :param source_uri: If createOption is Import, this is the URI of a blob to + be imported into a managed disk. + :type source_uri: str + :param source_resource_id: If createOption is Copy, this is the ARM id of + the source snapshot or disk. + :type source_resource_id: str + """ + + _validation = { + 'create_option': {'required': True}, + } + + _attribute_map = { + 'create_option': {'key': 'createOption', 'type': 'DiskCreateOption'}, + 'storage_account_id': {'key': 'storageAccountId', 'type': 'str'}, + 'image_reference': {'key': 'imageReference', 'type': 'ImageDiskReference'}, + 'source_uri': {'key': 'sourceUri', 'type': 'str'}, + 'source_resource_id': {'key': 'sourceResourceId', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(CreationData, self).__init__(**kwargs) + self.create_option = kwargs.get('create_option', None) + self.storage_account_id = kwargs.get('storage_account_id', None) + self.image_reference = kwargs.get('image_reference', None) + self.source_uri = kwargs.get('source_uri', None) + self.source_resource_id = kwargs.get('source_resource_id', None) + + +class DataDisk(Model): + """Describes a data disk. + + All required parameters must be populated in order to send to Azure. + + :param lun: Required. Specifies the logical unit number of the data disk. + This value is used to identify data disks within the VM and therefore must + be unique for each data disk attached to a VM. + :type lun: int + :param name: The disk name. + :type name: str + :param vhd: The virtual hard disk. + :type vhd: ~azure.mgmt.compute.v2017_03_30.models.VirtualHardDisk + :param image: The source user image virtual hard disk. The virtual hard + disk will be copied before being attached to the virtual machine. If + SourceImage is provided, the destination virtual hard drive must not + exist. + :type image: ~azure.mgmt.compute.v2017_03_30.models.VirtualHardDisk + :param caching: Specifies the caching requirements.

    Possible + values are:

    **None**

    **ReadOnly**

    **ReadWrite** +

    Default: **None for Standard storage. ReadOnly for Premium + storage**. Possible values include: 'None', 'ReadOnly', 'ReadWrite' + :type caching: str or ~azure.mgmt.compute.v2017_03_30.models.CachingTypes + :param create_option: Required. Specifies how the virtual machine should + be created.

    Possible values are:

    **Attach** \\u2013 This + value is used when you are using a specialized disk to create the virtual + machine.

    **FromImage** \\u2013 This value is used when you are + using an image to create the virtual machine. If you are using a platform + image, you also use the imageReference element described above. If you are + using a marketplace image, you also use the plan element previously + described. Possible values include: 'FromImage', 'Empty', 'Attach' + :type create_option: str or + ~azure.mgmt.compute.v2017_03_30.models.DiskCreateOptionTypes + :param disk_size_gb: Specifies the size of an empty data disk in + gigabytes. This element can be used to overwrite the size of the disk in a + virtual machine image.

    This value cannot be larger than 1023 GB + :type disk_size_gb: int + :param managed_disk: The managed disk parameters. + :type managed_disk: + ~azure.mgmt.compute.v2017_03_30.models.ManagedDiskParameters + """ + + _validation = { + 'lun': {'required': True}, + 'create_option': {'required': True}, + } + + _attribute_map = { + 'lun': {'key': 'lun', 'type': 'int'}, + 'name': {'key': 'name', 'type': 'str'}, + 'vhd': {'key': 'vhd', 'type': 'VirtualHardDisk'}, + 'image': {'key': 'image', 'type': 'VirtualHardDisk'}, + 'caching': {'key': 'caching', 'type': 'CachingTypes'}, + 'create_option': {'key': 'createOption', 'type': 'DiskCreateOptionTypes'}, + 'disk_size_gb': {'key': 'diskSizeGB', 'type': 'int'}, + 'managed_disk': {'key': 'managedDisk', 'type': 'ManagedDiskParameters'}, + } + + def __init__(self, **kwargs): + super(DataDisk, self).__init__(**kwargs) + self.lun = kwargs.get('lun', None) + self.name = kwargs.get('name', None) + self.vhd = kwargs.get('vhd', None) + self.image = kwargs.get('image', None) + self.caching = kwargs.get('caching', None) + self.create_option = kwargs.get('create_option', None) + self.disk_size_gb = kwargs.get('disk_size_gb', None) + self.managed_disk = kwargs.get('managed_disk', None) + + +class DataDiskImage(Model): + """Contains the data disk images information. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar lun: Specifies the logical unit number of the data disk. This value + is used to identify data disks within the VM and therefore must be unique + for each data disk attached to a VM. + :vartype lun: int + """ + + _validation = { + 'lun': {'readonly': True}, + } + + _attribute_map = { + 'lun': {'key': 'lun', 'type': 'int'}, + } + + def __init__(self, **kwargs): + super(DataDiskImage, self).__init__(**kwargs) + self.lun = None + + +class DiagnosticsProfile(Model): + """Specifies the boot diagnostic settings state.

    Minimum api-version: + 2015-06-15. + + :param boot_diagnostics: Boot Diagnostics is a debugging feature which + allows you to view Console Output and Screenshot to diagnose VM status. +

    You can easily view the output of your console log.

    + Azure also enables you to see a screenshot of the VM from the hypervisor. + :type boot_diagnostics: + ~azure.mgmt.compute.v2017_03_30.models.BootDiagnostics + """ + + _attribute_map = { + 'boot_diagnostics': {'key': 'bootDiagnostics', 'type': 'BootDiagnostics'}, + } + + def __init__(self, **kwargs): + super(DiagnosticsProfile, self).__init__(**kwargs) + self.boot_diagnostics = kwargs.get('boot_diagnostics', None) + + +class Disk(Resource): + """Disk resource. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource Id + :vartype id: str + :ivar name: Resource name + :vartype name: str + :ivar type: Resource type + :vartype type: str + :param location: Required. Resource location + :type location: str + :param tags: Resource tags + :type tags: dict[str, str] + :ivar managed_by: A relative URI containing the ID of the VM that has the + disk attached. + :vartype managed_by: str + :param sku: + :type sku: ~azure.mgmt.compute.v2017_03_30.models.DiskSku + :param zones: The Logical zone list for Disk. + :type zones: list[str] + :ivar time_created: The time when the disk was created. + :vartype time_created: datetime + :param os_type: The Operating System type. Possible values include: + 'Windows', 'Linux' + :type os_type: str or + ~azure.mgmt.compute.v2017_03_30.models.OperatingSystemTypes + :param creation_data: Required. Disk source information. CreationData + information cannot be changed after the disk has been created. + :type creation_data: ~azure.mgmt.compute.v2017_03_30.models.CreationData + :param disk_size_gb: If creationData.createOption is Empty, this field is + mandatory and it indicates the size of the VHD to create. If this field is + present for updates or creation with other options, it indicates a resize. + Resizes are only allowed if the disk is not attached to a running VM, and + can only increase the disk's size. + :type disk_size_gb: int + :param encryption_settings: Encryption settings for disk or snapshot + :type encryption_settings: + ~azure.mgmt.compute.v2017_03_30.models.EncryptionSettings + :ivar provisioning_state: The disk provisioning state. + :vartype provisioning_state: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + 'managed_by': {'readonly': True}, + 'time_created': {'readonly': True}, + 'creation_data': {'required': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'managed_by': {'key': 'managedBy', 'type': 'str'}, + 'sku': {'key': 'sku', 'type': 'DiskSku'}, + 'zones': {'key': 'zones', 'type': '[str]'}, + 'time_created': {'key': 'properties.timeCreated', 'type': 'iso-8601'}, + 'os_type': {'key': 'properties.osType', 'type': 'OperatingSystemTypes'}, + 'creation_data': {'key': 'properties.creationData', 'type': 'CreationData'}, + 'disk_size_gb': {'key': 'properties.diskSizeGB', 'type': 'int'}, + 'encryption_settings': {'key': 'properties.encryptionSettings', 'type': 'EncryptionSettings'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(Disk, self).__init__(**kwargs) + self.managed_by = None + self.sku = kwargs.get('sku', None) + self.zones = kwargs.get('zones', None) + self.time_created = None + self.os_type = kwargs.get('os_type', None) + self.creation_data = kwargs.get('creation_data', None) + self.disk_size_gb = kwargs.get('disk_size_gb', None) + self.encryption_settings = kwargs.get('encryption_settings', None) + self.provisioning_state = None + + +class DiskEncryptionSettings(Model): + """Describes a Encryption Settings for a Disk. + + :param disk_encryption_key: Specifies the location of the disk encryption + key, which is a Key Vault Secret. + :type disk_encryption_key: + ~azure.mgmt.compute.v2017_03_30.models.KeyVaultSecretReference + :param key_encryption_key: Specifies the location of the key encryption + key in Key Vault. + :type key_encryption_key: + ~azure.mgmt.compute.v2017_03_30.models.KeyVaultKeyReference + :param enabled: Specifies whether disk encryption should be enabled on the + virtual machine. + :type enabled: bool + """ + + _attribute_map = { + 'disk_encryption_key': {'key': 'diskEncryptionKey', 'type': 'KeyVaultSecretReference'}, + 'key_encryption_key': {'key': 'keyEncryptionKey', 'type': 'KeyVaultKeyReference'}, + 'enabled': {'key': 'enabled', 'type': 'bool'}, + } + + def __init__(self, **kwargs): + super(DiskEncryptionSettings, self).__init__(**kwargs) + self.disk_encryption_key = kwargs.get('disk_encryption_key', None) + self.key_encryption_key = kwargs.get('key_encryption_key', None) + self.enabled = kwargs.get('enabled', None) + + +class DiskInstanceView(Model): + """The instance view of the disk. + + :param name: The disk name. + :type name: str + :param encryption_settings: Specifies the encryption settings for the OS + Disk.

    Minimum api-version: 2015-06-15 + :type encryption_settings: + list[~azure.mgmt.compute.v2017_03_30.models.DiskEncryptionSettings] + :param statuses: The resource status information. + :type statuses: + list[~azure.mgmt.compute.v2017_03_30.models.InstanceViewStatus] + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'encryption_settings': {'key': 'encryptionSettings', 'type': '[DiskEncryptionSettings]'}, + 'statuses': {'key': 'statuses', 'type': '[InstanceViewStatus]'}, + } + + def __init__(self, **kwargs): + super(DiskInstanceView, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.encryption_settings = kwargs.get('encryption_settings', None) + self.statuses = kwargs.get('statuses', None) + + +class DiskSku(Model): + """The disks and snapshots sku name. Can be Standard_LRS or Premium_LRS. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :param name: The sku name. Possible values include: 'Standard_LRS', + 'Premium_LRS' + :type name: str or + ~azure.mgmt.compute.v2017_03_30.models.StorageAccountTypes + :ivar tier: The sku tier. Default value: "Standard" . + :vartype tier: str + """ + + _validation = { + 'tier': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'tier': {'key': 'tier', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(DiskSku, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.tier = None + + +class ResourceUpdate(Model): + """The Resource model definition. + + :param tags: Resource tags + :type tags: dict[str, str] + :param sku: + :type sku: ~azure.mgmt.compute.v2017_03_30.models.DiskSku + """ + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + 'sku': {'key': 'sku', 'type': 'DiskSku'}, + } + + def __init__(self, **kwargs): + super(ResourceUpdate, self).__init__(**kwargs) + self.tags = kwargs.get('tags', None) + self.sku = kwargs.get('sku', None) + + +class DiskUpdate(ResourceUpdate): + """Disk update resource. + + :param tags: Resource tags + :type tags: dict[str, str] + :param sku: + :type sku: ~azure.mgmt.compute.v2017_03_30.models.DiskSku + :param os_type: the Operating System type. Possible values include: + 'Windows', 'Linux' + :type os_type: str or + ~azure.mgmt.compute.v2017_03_30.models.OperatingSystemTypes + :param disk_size_gb: If creationData.createOption is Empty, this field is + mandatory and it indicates the size of the VHD to create. If this field is + present for updates or creation with other options, it indicates a resize. + Resizes are only allowed if the disk is not attached to a running VM, and + can only increase the disk's size. + :type disk_size_gb: int + :param encryption_settings: Encryption settings for disk or snapshot + :type encryption_settings: + ~azure.mgmt.compute.v2017_03_30.models.EncryptionSettings + """ + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + 'sku': {'key': 'sku', 'type': 'DiskSku'}, + 'os_type': {'key': 'properties.osType', 'type': 'OperatingSystemTypes'}, + 'disk_size_gb': {'key': 'properties.diskSizeGB', 'type': 'int'}, + 'encryption_settings': {'key': 'properties.encryptionSettings', 'type': 'EncryptionSettings'}, + } + + def __init__(self, **kwargs): + super(DiskUpdate, self).__init__(**kwargs) + self.os_type = kwargs.get('os_type', None) + self.disk_size_gb = kwargs.get('disk_size_gb', None) + self.encryption_settings = kwargs.get('encryption_settings', None) + + +class EncryptionSettings(Model): + """Encryption settings for disk or snapshot. + + :param enabled: Set this flag to true and provide DiskEncryptionKey and + optional KeyEncryptionKey to enable encryption. Set this flag to false and + remove DiskEncryptionKey and KeyEncryptionKey to disable encryption. If + EncryptionSettings is null in the request object, the existing settings + remain unchanged. + :type enabled: bool + :param disk_encryption_key: Key Vault Secret Url and vault id of the disk + encryption key + :type disk_encryption_key: + ~azure.mgmt.compute.v2017_03_30.models.KeyVaultAndSecretReference + :param key_encryption_key: Key Vault Key Url and vault id of the key + encryption key + :type key_encryption_key: + ~azure.mgmt.compute.v2017_03_30.models.KeyVaultAndKeyReference + """ + + _attribute_map = { + 'enabled': {'key': 'enabled', 'type': 'bool'}, + 'disk_encryption_key': {'key': 'diskEncryptionKey', 'type': 'KeyVaultAndSecretReference'}, + 'key_encryption_key': {'key': 'keyEncryptionKey', 'type': 'KeyVaultAndKeyReference'}, + } + + def __init__(self, **kwargs): + super(EncryptionSettings, self).__init__(**kwargs) + self.enabled = kwargs.get('enabled', None) + self.disk_encryption_key = kwargs.get('disk_encryption_key', None) + self.key_encryption_key = kwargs.get('key_encryption_key', None) + + +class GrantAccessData(Model): + """Data used for requesting a SAS. + + All required parameters must be populated in order to send to Azure. + + :param access: Required. Possible values include: 'None', 'Read' + :type access: str or ~azure.mgmt.compute.v2017_03_30.models.AccessLevel + :param duration_in_seconds: Required. Time duration in seconds until the + SAS access expires. + :type duration_in_seconds: int + """ + + _validation = { + 'access': {'required': True}, + 'duration_in_seconds': {'required': True}, + } + + _attribute_map = { + 'access': {'key': 'access', 'type': 'AccessLevel'}, + 'duration_in_seconds': {'key': 'durationInSeconds', 'type': 'int'}, + } + + def __init__(self, **kwargs): + super(GrantAccessData, self).__init__(**kwargs) + self.access = kwargs.get('access', None) + self.duration_in_seconds = kwargs.get('duration_in_seconds', None) + + +class HardwareProfile(Model): + """Specifies the hardware settings for the virtual machine. + + :param vm_size: Specifies the size of the virtual machine. For more + information about virtual machine sizes, see [Sizes for virtual + machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-sizes?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). +

    The available VM sizes depend on region and availability set. For + a list of available sizes use these APIs:

    [List all available + virtual machine sizes in an availability + set](https://docs.microsoft.com/rest/api/compute/availabilitysets/listavailablesizes) +

    [List all available virtual machine sizes in a + region](https://docs.microsoft.com/rest/api/compute/virtualmachinesizes/list) +

    [List all available virtual machine sizes for + resizing](https://docs.microsoft.com/rest/api/compute/virtualmachines/listavailablesizes). + Possible values include: 'Basic_A0', 'Basic_A1', 'Basic_A2', 'Basic_A3', + 'Basic_A4', 'Standard_A0', 'Standard_A1', 'Standard_A2', 'Standard_A3', + 'Standard_A4', 'Standard_A5', 'Standard_A6', 'Standard_A7', 'Standard_A8', + 'Standard_A9', 'Standard_A10', 'Standard_A11', 'Standard_A1_v2', + 'Standard_A2_v2', 'Standard_A4_v2', 'Standard_A8_v2', 'Standard_A2m_v2', + 'Standard_A4m_v2', 'Standard_A8m_v2', 'Standard_D1', 'Standard_D2', + 'Standard_D3', 'Standard_D4', 'Standard_D11', 'Standard_D12', + 'Standard_D13', 'Standard_D14', 'Standard_D1_v2', 'Standard_D2_v2', + 'Standard_D3_v2', 'Standard_D4_v2', 'Standard_D5_v2', 'Standard_D11_v2', + 'Standard_D12_v2', 'Standard_D13_v2', 'Standard_D14_v2', + 'Standard_D15_v2', 'Standard_DS1', 'Standard_DS2', 'Standard_DS3', + 'Standard_DS4', 'Standard_DS11', 'Standard_DS12', 'Standard_DS13', + 'Standard_DS14', 'Standard_DS1_v2', 'Standard_DS2_v2', 'Standard_DS3_v2', + 'Standard_DS4_v2', 'Standard_DS5_v2', 'Standard_DS11_v2', + 'Standard_DS12_v2', 'Standard_DS13_v2', 'Standard_DS14_v2', + 'Standard_DS15_v2', 'Standard_F1', 'Standard_F2', 'Standard_F4', + 'Standard_F8', 'Standard_F16', 'Standard_F1s', 'Standard_F2s', + 'Standard_F4s', 'Standard_F8s', 'Standard_F16s', 'Standard_G1', + 'Standard_G2', 'Standard_G3', 'Standard_G4', 'Standard_G5', + 'Standard_GS1', 'Standard_GS2', 'Standard_GS3', 'Standard_GS4', + 'Standard_GS5', 'Standard_H8', 'Standard_H16', 'Standard_H8m', + 'Standard_H16m', 'Standard_H16r', 'Standard_H16mr', 'Standard_L4s', + 'Standard_L8s', 'Standard_L16s', 'Standard_L32s', 'Standard_NC6', + 'Standard_NC12', 'Standard_NC24', 'Standard_NC24r', 'Standard_NV6', + 'Standard_NV12', 'Standard_NV24' + :type vm_size: str or + ~azure.mgmt.compute.v2017_03_30.models.VirtualMachineSizeTypes + """ + + _attribute_map = { + 'vm_size': {'key': 'vmSize', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(HardwareProfile, self).__init__(**kwargs) + self.vm_size = kwargs.get('vm_size', None) + + +class Image(Resource): + """The source user image virtual hard disk. The virtual hard disk will be + copied before being attached to the virtual machine. If SourceImage is + provided, the destination virtual hard drive must not exist. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource Id + :vartype id: str + :ivar name: Resource name + :vartype name: str + :ivar type: Resource type + :vartype type: str + :param location: Required. Resource location + :type location: str + :param tags: Resource tags + :type tags: dict[str, str] + :param source_virtual_machine: The source virtual machine from which Image + is created. + :type source_virtual_machine: + ~azure.mgmt.compute.v2017_03_30.models.SubResource + :param storage_profile: Specifies the storage settings for the virtual + machine disks. + :type storage_profile: + ~azure.mgmt.compute.v2017_03_30.models.ImageStorageProfile + :ivar provisioning_state: The provisioning state. + :vartype provisioning_state: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'source_virtual_machine': {'key': 'properties.sourceVirtualMachine', 'type': 'SubResource'}, + 'storage_profile': {'key': 'properties.storageProfile', 'type': 'ImageStorageProfile'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(Image, self).__init__(**kwargs) + self.source_virtual_machine = kwargs.get('source_virtual_machine', None) + self.storage_profile = kwargs.get('storage_profile', None) + self.provisioning_state = None + + +class ImageDataDisk(Model): + """Describes a data disk. + + All required parameters must be populated in order to send to Azure. + + :param lun: Required. Specifies the logical unit number of the data disk. + This value is used to identify data disks within the VM and therefore must + be unique for each data disk attached to a VM. + :type lun: int + :param snapshot: The snapshot. + :type snapshot: ~azure.mgmt.compute.v2017_03_30.models.SubResource + :param managed_disk: The managedDisk. + :type managed_disk: ~azure.mgmt.compute.v2017_03_30.models.SubResource + :param blob_uri: The Virtual Hard Disk. + :type blob_uri: str + :param caching: Specifies the caching requirements.

    Possible + values are:

    **None**

    **ReadOnly**

    **ReadWrite** +

    Default: **None for Standard storage. ReadOnly for Premium + storage**. Possible values include: 'None', 'ReadOnly', 'ReadWrite' + :type caching: str or ~azure.mgmt.compute.v2017_03_30.models.CachingTypes + :param disk_size_gb: Specifies the size of empty data disks in gigabytes. + This element can be used to overwrite the name of the disk in a virtual + machine image.

    This value cannot be larger than 1023 GB + :type disk_size_gb: int + :param storage_account_type: Specifies the storage account type for the + managed disk. Possible values are: Standard_LRS or Premium_LRS. Possible + values include: 'Standard_LRS', 'Premium_LRS' + :type storage_account_type: str or + ~azure.mgmt.compute.v2017_03_30.models.StorageAccountTypes + """ + + _validation = { + 'lun': {'required': True}, + } + + _attribute_map = { + 'lun': {'key': 'lun', 'type': 'int'}, + 'snapshot': {'key': 'snapshot', 'type': 'SubResource'}, + 'managed_disk': {'key': 'managedDisk', 'type': 'SubResource'}, + 'blob_uri': {'key': 'blobUri', 'type': 'str'}, + 'caching': {'key': 'caching', 'type': 'CachingTypes'}, + 'disk_size_gb': {'key': 'diskSizeGB', 'type': 'int'}, + 'storage_account_type': {'key': 'storageAccountType', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ImageDataDisk, self).__init__(**kwargs) + self.lun = kwargs.get('lun', None) + self.snapshot = kwargs.get('snapshot', None) + self.managed_disk = kwargs.get('managed_disk', None) + self.blob_uri = kwargs.get('blob_uri', None) + self.caching = kwargs.get('caching', None) + self.disk_size_gb = kwargs.get('disk_size_gb', None) + self.storage_account_type = kwargs.get('storage_account_type', None) + + +class ImageDiskReference(Model): + """The source image used for creating the disk. + + All required parameters must be populated in order to send to Azure. + + :param id: Required. A relative uri containing either a Platform Image + Repository or user image reference. + :type id: str + :param lun: If the disk is created from an image's data disk, this is an + index that indicates which of the data disks in the image to use. For OS + disks, this field is null. + :type lun: int + """ + + _validation = { + 'id': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'lun': {'key': 'lun', 'type': 'int'}, + } + + def __init__(self, **kwargs): + super(ImageDiskReference, self).__init__(**kwargs) + self.id = kwargs.get('id', None) + self.lun = kwargs.get('lun', None) + + +class ImageOSDisk(Model): + """Describes an Operating System disk. + + All required parameters must be populated in order to send to Azure. + + :param os_type: Required. This property allows you to specify the type of + the OS that is included in the disk if creating a VM from a custom image. +

    Possible values are:

    **Windows**

    **Linux**. + Possible values include: 'Windows', 'Linux' + :type os_type: str or + ~azure.mgmt.compute.v2017_03_30.models.OperatingSystemTypes + :param os_state: Required. The OS State. Possible values include: + 'Generalized', 'Specialized' + :type os_state: str or + ~azure.mgmt.compute.v2017_03_30.models.OperatingSystemStateTypes + :param snapshot: The snapshot. + :type snapshot: ~azure.mgmt.compute.v2017_03_30.models.SubResource + :param managed_disk: The managedDisk. + :type managed_disk: ~azure.mgmt.compute.v2017_03_30.models.SubResource + :param blob_uri: The Virtual Hard Disk. + :type blob_uri: str + :param caching: Specifies the caching requirements.

    Possible + values are:

    **None**

    **ReadOnly**

    **ReadWrite** +

    Default: **None for Standard storage. ReadOnly for Premium + storage**. Possible values include: 'None', 'ReadOnly', 'ReadWrite' + :type caching: str or ~azure.mgmt.compute.v2017_03_30.models.CachingTypes + :param disk_size_gb: Specifies the size of empty data disks in gigabytes. + This element can be used to overwrite the name of the disk in a virtual + machine image.

    This value cannot be larger than 1023 GB + :type disk_size_gb: int + :param storage_account_type: Specifies the storage account type for the + managed disk. Possible values are: Standard_LRS or Premium_LRS. Possible + values include: 'Standard_LRS', 'Premium_LRS' + :type storage_account_type: str or + ~azure.mgmt.compute.v2017_03_30.models.StorageAccountTypes + """ + + _validation = { + 'os_type': {'required': True}, + 'os_state': {'required': True}, + } + + _attribute_map = { + 'os_type': {'key': 'osType', 'type': 'OperatingSystemTypes'}, + 'os_state': {'key': 'osState', 'type': 'OperatingSystemStateTypes'}, + 'snapshot': {'key': 'snapshot', 'type': 'SubResource'}, + 'managed_disk': {'key': 'managedDisk', 'type': 'SubResource'}, + 'blob_uri': {'key': 'blobUri', 'type': 'str'}, + 'caching': {'key': 'caching', 'type': 'CachingTypes'}, + 'disk_size_gb': {'key': 'diskSizeGB', 'type': 'int'}, + 'storage_account_type': {'key': 'storageAccountType', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ImageOSDisk, self).__init__(**kwargs) + self.os_type = kwargs.get('os_type', None) + self.os_state = kwargs.get('os_state', None) + self.snapshot = kwargs.get('snapshot', None) + self.managed_disk = kwargs.get('managed_disk', None) + self.blob_uri = kwargs.get('blob_uri', None) + self.caching = kwargs.get('caching', None) + self.disk_size_gb = kwargs.get('disk_size_gb', None) + self.storage_account_type = kwargs.get('storage_account_type', None) + + +class SubResource(Model): + """SubResource. + + :param id: Resource Id + :type id: str + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(SubResource, self).__init__(**kwargs) + self.id = kwargs.get('id', None) + + +class ImageReference(SubResource): + """Specifies information about the image to use. You can specify information + about platform images, marketplace images, or virtual machine images. This + element is required when you want to use a platform image, marketplace + image, or virtual machine image, but is not used in other creation + operations. + + :param id: Resource Id + :type id: str + :param publisher: The image publisher. + :type publisher: str + :param offer: Specifies the offer of the platform image or marketplace + image used to create the virtual machine. + :type offer: str + :param sku: The image SKU. + :type sku: str + :param version: Specifies the version of the platform image or marketplace + image used to create the virtual machine. The allowed formats are + Major.Minor.Build or 'latest'. Major, Minor, and Build are decimal + numbers. Specify 'latest' to use the latest version of an image available + at deploy time. Even if you use 'latest', the VM image will not + automatically update after deploy time even if a new version becomes + available. + :type version: str + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'publisher': {'key': 'publisher', 'type': 'str'}, + 'offer': {'key': 'offer', 'type': 'str'}, + 'sku': {'key': 'sku', 'type': 'str'}, + 'version': {'key': 'version', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ImageReference, self).__init__(**kwargs) + self.publisher = kwargs.get('publisher', None) + self.offer = kwargs.get('offer', None) + self.sku = kwargs.get('sku', None) + self.version = kwargs.get('version', None) + + +class ImageStorageProfile(Model): + """Describes a storage profile. + + All required parameters must be populated in order to send to Azure. + + :param os_disk: Required. Specifies information about the operating system + disk used by the virtual machine.

    For more information about + disks, see [About disks and VHDs for Azure virtual + machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-about-disks-vhds?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). + :type os_disk: ~azure.mgmt.compute.v2017_03_30.models.ImageOSDisk + :param data_disks: Specifies the parameters that are used to add a data + disk to a virtual machine.

    For more information about disks, see + [About disks and VHDs for Azure virtual + machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-about-disks-vhds?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). + :type data_disks: + list[~azure.mgmt.compute.v2017_03_30.models.ImageDataDisk] + """ + + _validation = { + 'os_disk': {'required': True}, + } + + _attribute_map = { + 'os_disk': {'key': 'osDisk', 'type': 'ImageOSDisk'}, + 'data_disks': {'key': 'dataDisks', 'type': '[ImageDataDisk]'}, + } + + def __init__(self, **kwargs): + super(ImageStorageProfile, self).__init__(**kwargs) + self.os_disk = kwargs.get('os_disk', None) + self.data_disks = kwargs.get('data_disks', None) + + +class InnerError(Model): + """Inner error details. + + :param exceptiontype: The exception type. + :type exceptiontype: str + :param errordetail: The internal error message or exception dump. + :type errordetail: str + """ + + _attribute_map = { + 'exceptiontype': {'key': 'exceptiontype', 'type': 'str'}, + 'errordetail': {'key': 'errordetail', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(InnerError, self).__init__(**kwargs) + self.exceptiontype = kwargs.get('exceptiontype', None) + self.errordetail = kwargs.get('errordetail', None) + + +class InstanceViewStatus(Model): + """Instance view status. + + :param code: The status code. + :type code: str + :param level: The level code. Possible values include: 'Info', 'Warning', + 'Error' + :type level: str or + ~azure.mgmt.compute.v2017_03_30.models.StatusLevelTypes + :param display_status: The short localizable label for the status. + :type display_status: str + :param message: The detailed status message, including for alerts and + error messages. + :type message: str + :param time: The time of the status. + :type time: datetime + """ + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + 'level': {'key': 'level', 'type': 'StatusLevelTypes'}, + 'display_status': {'key': 'displayStatus', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + 'time': {'key': 'time', 'type': 'iso-8601'}, + } + + def __init__(self, **kwargs): + super(InstanceViewStatus, self).__init__(**kwargs) + self.code = kwargs.get('code', None) + self.level = kwargs.get('level', None) + self.display_status = kwargs.get('display_status', None) + self.message = kwargs.get('message', None) + self.time = kwargs.get('time', None) + + +class KeyVaultAndKeyReference(Model): + """Key Vault Key Url and vault id of KeK, KeK is optional and when provided is + used to unwrap the encryptionKey. + + All required parameters must be populated in order to send to Azure. + + :param source_vault: Required. Resource id of the KeyVault containing the + key or secret + :type source_vault: ~azure.mgmt.compute.v2017_03_30.models.SourceVault + :param key_url: Required. Url pointing to a key or secret in KeyVault + :type key_url: str + """ + + _validation = { + 'source_vault': {'required': True}, + 'key_url': {'required': True}, + } + + _attribute_map = { + 'source_vault': {'key': 'sourceVault', 'type': 'SourceVault'}, + 'key_url': {'key': 'keyUrl', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(KeyVaultAndKeyReference, self).__init__(**kwargs) + self.source_vault = kwargs.get('source_vault', None) + self.key_url = kwargs.get('key_url', None) + + +class KeyVaultAndSecretReference(Model): + """Key Vault Secret Url and vault id of the encryption key . + + All required parameters must be populated in order to send to Azure. + + :param source_vault: Required. Resource id of the KeyVault containing the + key or secret + :type source_vault: ~azure.mgmt.compute.v2017_03_30.models.SourceVault + :param secret_url: Required. Url pointing to a key or secret in KeyVault + :type secret_url: str + """ + + _validation = { + 'source_vault': {'required': True}, + 'secret_url': {'required': True}, + } + + _attribute_map = { + 'source_vault': {'key': 'sourceVault', 'type': 'SourceVault'}, + 'secret_url': {'key': 'secretUrl', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(KeyVaultAndSecretReference, self).__init__(**kwargs) + self.source_vault = kwargs.get('source_vault', None) + self.secret_url = kwargs.get('secret_url', None) + + +class KeyVaultKeyReference(Model): + """Describes a reference to Key Vault Key. + + All required parameters must be populated in order to send to Azure. + + :param key_url: Required. The URL referencing a key encryption key in Key + Vault. + :type key_url: str + :param source_vault: Required. The relative URL of the Key Vault + containing the key. + :type source_vault: ~azure.mgmt.compute.v2017_03_30.models.SubResource + """ + + _validation = { + 'key_url': {'required': True}, + 'source_vault': {'required': True}, + } + + _attribute_map = { + 'key_url': {'key': 'keyUrl', 'type': 'str'}, + 'source_vault': {'key': 'sourceVault', 'type': 'SubResource'}, + } + + def __init__(self, **kwargs): + super(KeyVaultKeyReference, self).__init__(**kwargs) + self.key_url = kwargs.get('key_url', None) + self.source_vault = kwargs.get('source_vault', None) + + +class KeyVaultSecretReference(Model): + """Describes a reference to Key Vault Secret. + + All required parameters must be populated in order to send to Azure. + + :param secret_url: Required. The URL referencing a secret in a Key Vault. + :type secret_url: str + :param source_vault: Required. The relative URL of the Key Vault + containing the secret. + :type source_vault: ~azure.mgmt.compute.v2017_03_30.models.SubResource + """ + + _validation = { + 'secret_url': {'required': True}, + 'source_vault': {'required': True}, + } + + _attribute_map = { + 'secret_url': {'key': 'secretUrl', 'type': 'str'}, + 'source_vault': {'key': 'sourceVault', 'type': 'SubResource'}, + } + + def __init__(self, **kwargs): + super(KeyVaultSecretReference, self).__init__(**kwargs) + self.secret_url = kwargs.get('secret_url', None) + self.source_vault = kwargs.get('source_vault', None) + + +class LinuxConfiguration(Model): + """Specifies the Linux operating system settings on the virtual machine. +

    For a list of supported Linux distributions, see [Linux on + Azure-Endorsed + Distributions](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-endorsed-distros?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json) +

    For running non-endorsed distributions, see [Information for + Non-Endorsed + Distributions](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-create-upload-generic?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json). + + :param disable_password_authentication: Specifies whether password + authentication should be disabled. + :type disable_password_authentication: bool + :param ssh: Specifies the ssh key configuration for a Linux OS. + :type ssh: ~azure.mgmt.compute.v2017_03_30.models.SshConfiguration + """ + + _attribute_map = { + 'disable_password_authentication': {'key': 'disablePasswordAuthentication', 'type': 'bool'}, + 'ssh': {'key': 'ssh', 'type': 'SshConfiguration'}, + } + + def __init__(self, **kwargs): + super(LinuxConfiguration, self).__init__(**kwargs) + self.disable_password_authentication = kwargs.get('disable_password_authentication', None) + self.ssh = kwargs.get('ssh', None) + + +class MaintenanceRedeployStatus(Model): + """Maintenance Operation Status. + + :param is_customer_initiated_maintenance_allowed: True, if customer is + allowed to perform Maintenance. + :type is_customer_initiated_maintenance_allowed: bool + :param pre_maintenance_window_start_time: Start Time for the Pre + Maintenance Window. + :type pre_maintenance_window_start_time: datetime + :param pre_maintenance_window_end_time: End Time for the Pre Maintenance + Window. + :type pre_maintenance_window_end_time: datetime + :param maintenance_window_start_time: Start Time for the Maintenance + Window. + :type maintenance_window_start_time: datetime + :param maintenance_window_end_time: End Time for the Maintenance Window. + :type maintenance_window_end_time: datetime + :param last_operation_result_code: The Last Maintenance Operation Result + Code. Possible values include: 'None', 'RetryLater', 'MaintenanceAborted', + 'MaintenanceCompleted' + :type last_operation_result_code: str or + ~azure.mgmt.compute.v2017_03_30.models.MaintenanceOperationResultCodeTypes + :param last_operation_message: Message returned for the last Maintenance + Operation. + :type last_operation_message: str + """ + + _attribute_map = { + 'is_customer_initiated_maintenance_allowed': {'key': 'isCustomerInitiatedMaintenanceAllowed', 'type': 'bool'}, + 'pre_maintenance_window_start_time': {'key': 'preMaintenanceWindowStartTime', 'type': 'iso-8601'}, + 'pre_maintenance_window_end_time': {'key': 'preMaintenanceWindowEndTime', 'type': 'iso-8601'}, + 'maintenance_window_start_time': {'key': 'maintenanceWindowStartTime', 'type': 'iso-8601'}, + 'maintenance_window_end_time': {'key': 'maintenanceWindowEndTime', 'type': 'iso-8601'}, + 'last_operation_result_code': {'key': 'lastOperationResultCode', 'type': 'MaintenanceOperationResultCodeTypes'}, + 'last_operation_message': {'key': 'lastOperationMessage', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(MaintenanceRedeployStatus, self).__init__(**kwargs) + self.is_customer_initiated_maintenance_allowed = kwargs.get('is_customer_initiated_maintenance_allowed', None) + self.pre_maintenance_window_start_time = kwargs.get('pre_maintenance_window_start_time', None) + self.pre_maintenance_window_end_time = kwargs.get('pre_maintenance_window_end_time', None) + self.maintenance_window_start_time = kwargs.get('maintenance_window_start_time', None) + self.maintenance_window_end_time = kwargs.get('maintenance_window_end_time', None) + self.last_operation_result_code = kwargs.get('last_operation_result_code', None) + self.last_operation_message = kwargs.get('last_operation_message', None) + + +class ManagedDiskParameters(SubResource): + """The parameters of a managed disk. + + :param id: Resource Id + :type id: str + :param storage_account_type: Specifies the storage account type for the + managed disk. Possible values are: Standard_LRS or Premium_LRS. Possible + values include: 'Standard_LRS', 'Premium_LRS' + :type storage_account_type: str or + ~azure.mgmt.compute.v2017_03_30.models.StorageAccountTypes + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'storage_account_type': {'key': 'storageAccountType', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ManagedDiskParameters, self).__init__(**kwargs) + self.storage_account_type = kwargs.get('storage_account_type', None) + + +class NetworkInterfaceReference(SubResource): + """Describes a network interface reference. + + :param id: Resource Id + :type id: str + :param primary: Specifies the primary network interface in case the + virtual machine has more than 1 network interface. + :type primary: bool + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'primary': {'key': 'properties.primary', 'type': 'bool'}, + } + + def __init__(self, **kwargs): + super(NetworkInterfaceReference, self).__init__(**kwargs) + self.primary = kwargs.get('primary', None) + + +class NetworkProfile(Model): + """Specifies the network interfaces of the virtual machine. + + :param network_interfaces: Specifies the list of resource Ids for the + network interfaces associated with the virtual machine. + :type network_interfaces: + list[~azure.mgmt.compute.v2017_03_30.models.NetworkInterfaceReference] + """ + + _attribute_map = { + 'network_interfaces': {'key': 'networkInterfaces', 'type': '[NetworkInterfaceReference]'}, + } + + def __init__(self, **kwargs): + super(NetworkProfile, self).__init__(**kwargs) + self.network_interfaces = kwargs.get('network_interfaces', None) + + +class OperationStatusResponse(Model): + """Operation status response. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar name: Operation ID + :vartype name: str + :ivar status: Operation status + :vartype status: str + :ivar start_time: Start time of the operation + :vartype start_time: datetime + :ivar end_time: End time of the operation + :vartype end_time: datetime + :ivar error: Api error + :vartype error: ~azure.mgmt.compute.v2017_03_30.models.ApiError + """ + + _validation = { + 'name': {'readonly': True}, + 'status': {'readonly': True}, + 'start_time': {'readonly': True}, + 'end_time': {'readonly': True}, + 'error': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'status': {'key': 'status', 'type': 'str'}, + 'start_time': {'key': 'startTime', 'type': 'iso-8601'}, + 'end_time': {'key': 'endTime', 'type': 'iso-8601'}, + 'error': {'key': 'error', 'type': 'ApiError'}, + } + + def __init__(self, **kwargs): + super(OperationStatusResponse, self).__init__(**kwargs) + self.name = None + self.status = None + self.start_time = None + self.end_time = None + self.error = None + + +class OSDisk(Model): + """Specifies information about the operating system disk used by the virtual + machine.

    For more information about disks, see [About disks and + VHDs for Azure virtual + machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-about-disks-vhds?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). + + All required parameters must be populated in order to send to Azure. + + :param os_type: This property allows you to specify the type of the OS + that is included in the disk if creating a VM from user-image or a + specialized VHD.

    Possible values are:

    **Windows** +

    **Linux**. Possible values include: 'Windows', 'Linux' + :type os_type: str or + ~azure.mgmt.compute.v2017_03_30.models.OperatingSystemTypes + :param encryption_settings: Specifies the encryption settings for the OS + Disk.

    Minimum api-version: 2015-06-15 + :type encryption_settings: + ~azure.mgmt.compute.v2017_03_30.models.DiskEncryptionSettings + :param name: The disk name. + :type name: str + :param vhd: The virtual hard disk. + :type vhd: ~azure.mgmt.compute.v2017_03_30.models.VirtualHardDisk + :param image: The source user image virtual hard disk. The virtual hard + disk will be copied before being attached to the virtual machine. If + SourceImage is provided, the destination virtual hard drive must not + exist. + :type image: ~azure.mgmt.compute.v2017_03_30.models.VirtualHardDisk + :param caching: Specifies the caching requirements.

    Possible + values are:

    **None**

    **ReadOnly**

    **ReadWrite** +

    Default: **None for Standard storage. ReadOnly for Premium + storage**. Possible values include: 'None', 'ReadOnly', 'ReadWrite' + :type caching: str or ~azure.mgmt.compute.v2017_03_30.models.CachingTypes + :param create_option: Required. Specifies how the virtual machine should + be created.

    Possible values are:

    **Attach** \\u2013 This + value is used when you are using a specialized disk to create the virtual + machine.

    **FromImage** \\u2013 This value is used when you are + using an image to create the virtual machine. If you are using a platform + image, you also use the imageReference element described above. If you are + using a marketplace image, you also use the plan element previously + described. Possible values include: 'FromImage', 'Empty', 'Attach' + :type create_option: str or + ~azure.mgmt.compute.v2017_03_30.models.DiskCreateOptionTypes + :param disk_size_gb: Specifies the size of an empty data disk in + gigabytes. This element can be used to overwrite the size of the disk in a + virtual machine image.

    This value cannot be larger than 1023 GB + :type disk_size_gb: int + :param managed_disk: The managed disk parameters. + :type managed_disk: + ~azure.mgmt.compute.v2017_03_30.models.ManagedDiskParameters + """ + + _validation = { + 'create_option': {'required': True}, + } + + _attribute_map = { + 'os_type': {'key': 'osType', 'type': 'OperatingSystemTypes'}, + 'encryption_settings': {'key': 'encryptionSettings', 'type': 'DiskEncryptionSettings'}, + 'name': {'key': 'name', 'type': 'str'}, + 'vhd': {'key': 'vhd', 'type': 'VirtualHardDisk'}, + 'image': {'key': 'image', 'type': 'VirtualHardDisk'}, + 'caching': {'key': 'caching', 'type': 'CachingTypes'}, + 'create_option': {'key': 'createOption', 'type': 'DiskCreateOptionTypes'}, + 'disk_size_gb': {'key': 'diskSizeGB', 'type': 'int'}, + 'managed_disk': {'key': 'managedDisk', 'type': 'ManagedDiskParameters'}, + } + + def __init__(self, **kwargs): + super(OSDisk, self).__init__(**kwargs) + self.os_type = kwargs.get('os_type', None) + self.encryption_settings = kwargs.get('encryption_settings', None) + self.name = kwargs.get('name', None) + self.vhd = kwargs.get('vhd', None) + self.image = kwargs.get('image', None) + self.caching = kwargs.get('caching', None) + self.create_option = kwargs.get('create_option', None) + self.disk_size_gb = kwargs.get('disk_size_gb', None) + self.managed_disk = kwargs.get('managed_disk', None) + + +class OSDiskImage(Model): + """Contains the os disk image information. + + All required parameters must be populated in order to send to Azure. + + :param operating_system: Required. The operating system of the + osDiskImage. Possible values include: 'Windows', 'Linux' + :type operating_system: str or + ~azure.mgmt.compute.v2017_03_30.models.OperatingSystemTypes + """ + + _validation = { + 'operating_system': {'required': True}, + } + + _attribute_map = { + 'operating_system': {'key': 'operatingSystem', 'type': 'OperatingSystemTypes'}, + } + + def __init__(self, **kwargs): + super(OSDiskImage, self).__init__(**kwargs) + self.operating_system = kwargs.get('operating_system', None) + + +class OSProfile(Model): + """Specifies the operating system settings for the virtual machine. + + :param computer_name: Specifies the host OS name of the virtual machine. +

    This name cannot be updated after the VM is created.

    + **Max-length (Windows):** 15 characters

    **Max-length (Linux):** + 64 characters.

    For naming conventions and restrictions see [Azure + infrastructure services implementation + guidelines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-infrastructure-subscription-accounts-guidelines?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json#1-naming-conventions). + :type computer_name: str + :param admin_username: Specifies the name of the administrator account. +

    **Windows-only restriction:** Cannot end in "."

    + **Disallowed values:** "administrator", "admin", "user", "user1", "test", + "user2", "test1", "user3", "admin1", "1", "123", "a", "actuser", "adm", + "admin2", "aspnet", "backup", "console", "david", "guest", "john", + "owner", "root", "server", "sql", "support", "support_388945a0", "sys", + "test2", "test3", "user4", "user5".

    **Minimum-length (Linux):** 1 + character

    **Max-length (Linux):** 64 characters

    + **Max-length (Windows):** 20 characters

  • For root access to + the Linux VM, see [Using root privileges on Linux virtual machines in + Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-use-root-privileges?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json)
  • + For a list of built-in system users on Linux that should not be used in + this field, see [Selecting User Names for Linux on + Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-usernames?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json) + :type admin_username: str + :param admin_password: Specifies the password of the administrator + account.

    **Minimum-length (Windows):** 8 characters

    + **Minimum-length (Linux):** 6 characters

    **Max-length + (Windows):** 123 characters

    **Max-length (Linux):** 72 characters +

    **Complexity requirements:** 3 out of 4 conditions below need to + be fulfilled
    Has lower characters
    Has upper characters
    Has a + digit
    Has a special character (Regex match [\\W_])

    + **Disallowed values:** "abc@123", "P@$$w0rd", "P@ssw0rd", "P@ssword123", + "Pa$$word", "pass@word1", "Password!", "Password1", "Password22", + "iloveyou!"

    For resetting the password, see [How to reset the + Remote Desktop service or its login password in a Windows + VM](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-reset-rdp?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json) +

    For resetting root password, see [Manage users, SSH, and check or + repair disks on Azure Linux VMs using the VMAccess + Extension](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-using-vmaccess-extension?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json#reset-root-password) + :type admin_password: str + :param custom_data: Specifies a base-64 encoded string of custom data. The + base-64 encoded string is decoded to a binary array that is saved as a + file on the Virtual Machine. The maximum length of the binary array is + 65535 bytes.

    For using cloud-init for your VM, see [Using + cloud-init to customize a Linux VM during + creation](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-using-cloud-init?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json) + :type custom_data: str + :param windows_configuration: Specifies Windows operating system settings + on the virtual machine. + :type windows_configuration: + ~azure.mgmt.compute.v2017_03_30.models.WindowsConfiguration + :param linux_configuration: Specifies the Linux operating system settings + on the virtual machine.

    For a list of supported Linux + distributions, see [Linux on Azure-Endorsed + Distributions](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-endorsed-distros?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json) +

    For running non-endorsed distributions, see [Information for + Non-Endorsed + Distributions](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-create-upload-generic?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json). + :type linux_configuration: + ~azure.mgmt.compute.v2017_03_30.models.LinuxConfiguration + :param secrets: Specifies set of certificates that should be installed + onto the virtual machine. + :type secrets: + list[~azure.mgmt.compute.v2017_03_30.models.VaultSecretGroup] + """ + + _attribute_map = { + 'computer_name': {'key': 'computerName', 'type': 'str'}, + 'admin_username': {'key': 'adminUsername', 'type': 'str'}, + 'admin_password': {'key': 'adminPassword', 'type': 'str'}, + 'custom_data': {'key': 'customData', 'type': 'str'}, + 'windows_configuration': {'key': 'windowsConfiguration', 'type': 'WindowsConfiguration'}, + 'linux_configuration': {'key': 'linuxConfiguration', 'type': 'LinuxConfiguration'}, + 'secrets': {'key': 'secrets', 'type': '[VaultSecretGroup]'}, + } + + def __init__(self, **kwargs): + super(OSProfile, self).__init__(**kwargs) + self.computer_name = kwargs.get('computer_name', None) + self.admin_username = kwargs.get('admin_username', None) + self.admin_password = kwargs.get('admin_password', None) + self.custom_data = kwargs.get('custom_data', None) + self.windows_configuration = kwargs.get('windows_configuration', None) + self.linux_configuration = kwargs.get('linux_configuration', None) + self.secrets = kwargs.get('secrets', None) + + +class Plan(Model): + """Specifies information about the marketplace image used to create the + virtual machine. This element is only used for marketplace images. Before + you can use a marketplace image from an API, you must enable the image for + programmatic use. In the Azure portal, find the marketplace image that you + want to use and then click **Want to deploy programmatically, Get Started + ->**. Enter any required information and then click **Save**. + + :param name: The plan ID. + :type name: str + :param publisher: The publisher ID. + :type publisher: str + :param product: Specifies the product of the image from the marketplace. + This is the same value as Offer under the imageReference element. + :type product: str + :param promotion_code: The promotion code. + :type promotion_code: str + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'publisher': {'key': 'publisher', 'type': 'str'}, + 'product': {'key': 'product', 'type': 'str'}, + 'promotion_code': {'key': 'promotionCode', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(Plan, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.publisher = kwargs.get('publisher', None) + self.product = kwargs.get('product', None) + self.promotion_code = kwargs.get('promotion_code', None) + + +class PurchasePlan(Model): + """Used for establishing the purchase context of any 3rd Party artifact + through MarketPlace. + + All required parameters must be populated in order to send to Azure. + + :param publisher: Required. The publisher ID. + :type publisher: str + :param name: Required. The plan ID. + :type name: str + :param product: Required. Specifies the product of the image from the + marketplace. This is the same value as Offer under the imageReference + element. + :type product: str + """ + + _validation = { + 'publisher': {'required': True}, + 'name': {'required': True}, + 'product': {'required': True}, + } + + _attribute_map = { + 'publisher': {'key': 'publisher', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'product': {'key': 'product', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(PurchasePlan, self).__init__(**kwargs) + self.publisher = kwargs.get('publisher', None) + self.name = kwargs.get('name', None) + self.product = kwargs.get('product', None) + + +class ResourceSku(Model): + """Describes an available Compute SKU. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar resource_type: The type of resource the SKU applies to. + :vartype resource_type: str + :ivar name: The name of SKU. + :vartype name: str + :ivar tier: Specifies the tier of virtual machines in a scale set.

    Possible Values:

    **Standard**

    **Basic** + :vartype tier: str + :ivar size: The Size of the SKU. + :vartype size: str + :ivar family: The Family of this particular SKU. + :vartype family: str + :ivar kind: The Kind of resources that are supported in this SKU. + :vartype kind: str + :ivar capacity: Specifies the number of virtual machines in the scale set. + :vartype capacity: + ~azure.mgmt.compute.v2017_03_30.models.ResourceSkuCapacity + :ivar locations: The set of locations that the SKU is available. + :vartype locations: list[str] + :ivar api_versions: The api versions that support this SKU. + :vartype api_versions: list[str] + :ivar costs: Metadata for retrieving price info. + :vartype costs: + list[~azure.mgmt.compute.v2017_03_30.models.ResourceSkuCosts] + :ivar capabilities: A name value pair to describe the capability. + :vartype capabilities: + list[~azure.mgmt.compute.v2017_03_30.models.ResourceSkuCapabilities] + :ivar restrictions: The restrictions because of which SKU cannot be used. + This is empty if there are no restrictions. + :vartype restrictions: + list[~azure.mgmt.compute.v2017_03_30.models.ResourceSkuRestrictions] + """ + + _validation = { + 'resource_type': {'readonly': True}, + 'name': {'readonly': True}, + 'tier': {'readonly': True}, + 'size': {'readonly': True}, + 'family': {'readonly': True}, + 'kind': {'readonly': True}, + 'capacity': {'readonly': True}, + 'locations': {'readonly': True}, + 'api_versions': {'readonly': True}, + 'costs': {'readonly': True}, + 'capabilities': {'readonly': True}, + 'restrictions': {'readonly': True}, + } + + _attribute_map = { + 'resource_type': {'key': 'resourceType', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'tier': {'key': 'tier', 'type': 'str'}, + 'size': {'key': 'size', 'type': 'str'}, + 'family': {'key': 'family', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'capacity': {'key': 'capacity', 'type': 'ResourceSkuCapacity'}, + 'locations': {'key': 'locations', 'type': '[str]'}, + 'api_versions': {'key': 'apiVersions', 'type': '[str]'}, + 'costs': {'key': 'costs', 'type': '[ResourceSkuCosts]'}, + 'capabilities': {'key': 'capabilities', 'type': '[ResourceSkuCapabilities]'}, + 'restrictions': {'key': 'restrictions', 'type': '[ResourceSkuRestrictions]'}, + } + + def __init__(self, **kwargs): + super(ResourceSku, self).__init__(**kwargs) + self.resource_type = None + self.name = None + self.tier = None + self.size = None + self.family = None + self.kind = None + self.capacity = None + self.locations = None + self.api_versions = None + self.costs = None + self.capabilities = None + self.restrictions = None + + +class ResourceSkuCapabilities(Model): + """Describes The SKU capabilities object. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar name: An invariant to describe the feature. + :vartype name: str + :ivar value: An invariant if the feature is measured by quantity. + :vartype value: str + """ + + _validation = { + 'name': {'readonly': True}, + 'value': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'value': {'key': 'value', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ResourceSkuCapabilities, self).__init__(**kwargs) + self.name = None + self.value = None + + +class ResourceSkuCapacity(Model): + """Describes scaling information of a SKU. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar minimum: The minimum capacity. + :vartype minimum: long + :ivar maximum: The maximum capacity that can be set. + :vartype maximum: long + :ivar default: The default capacity. + :vartype default: long + :ivar scale_type: The scale type applicable to the sku. Possible values + include: 'Automatic', 'Manual', 'None' + :vartype scale_type: str or + ~azure.mgmt.compute.v2017_03_30.models.ResourceSkuCapacityScaleType + """ + + _validation = { + 'minimum': {'readonly': True}, + 'maximum': {'readonly': True}, + 'default': {'readonly': True}, + 'scale_type': {'readonly': True}, + } + + _attribute_map = { + 'minimum': {'key': 'minimum', 'type': 'long'}, + 'maximum': {'key': 'maximum', 'type': 'long'}, + 'default': {'key': 'default', 'type': 'long'}, + 'scale_type': {'key': 'scaleType', 'type': 'ResourceSkuCapacityScaleType'}, + } + + def __init__(self, **kwargs): + super(ResourceSkuCapacity, self).__init__(**kwargs) + self.minimum = None + self.maximum = None + self.default = None + self.scale_type = None + + +class ResourceSkuCosts(Model): + """Describes metadata for retrieving price info. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar meter_id: Used for querying price from commerce. + :vartype meter_id: str + :ivar quantity: The multiplier is needed to extend the base metered cost. + :vartype quantity: long + :ivar extended_unit: An invariant to show the extended unit. + :vartype extended_unit: str + """ + + _validation = { + 'meter_id': {'readonly': True}, + 'quantity': {'readonly': True}, + 'extended_unit': {'readonly': True}, + } + + _attribute_map = { + 'meter_id': {'key': 'meterID', 'type': 'str'}, + 'quantity': {'key': 'quantity', 'type': 'long'}, + 'extended_unit': {'key': 'extendedUnit', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ResourceSkuCosts, self).__init__(**kwargs) + self.meter_id = None + self.quantity = None + self.extended_unit = None + + +class ResourceSkuRestrictions(Model): + """Describes scaling information of a SKU. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar type: The type of restrictions. Possible values include: 'Location' + :vartype type: str or + ~azure.mgmt.compute.v2017_03_30.models.ResourceSkuRestrictionsType + :ivar values: The value of restrictions. If the restriction type is set to + location. This would be different locations where the SKU is restricted. + :vartype values: list[str] + :ivar reason_code: The reason for restriction. Possible values include: + 'QuotaId', 'NotAvailableForSubscription' + :vartype reason_code: str or + ~azure.mgmt.compute.v2017_03_30.models.ResourceSkuRestrictionsReasonCode + """ + + _validation = { + 'type': {'readonly': True}, + 'values': {'readonly': True}, + 'reason_code': {'readonly': True}, + } + + _attribute_map = { + 'type': {'key': 'type', 'type': 'ResourceSkuRestrictionsType'}, + 'values': {'key': 'values', 'type': '[str]'}, + 'reason_code': {'key': 'reasonCode', 'type': 'ResourceSkuRestrictionsReasonCode'}, + } + + def __init__(self, **kwargs): + super(ResourceSkuRestrictions, self).__init__(**kwargs) + self.type = None + self.values = None + self.reason_code = None + + +class RollingUpgradePolicy(Model): + """The configuration parameters used while performing a rolling upgrade. + + :param max_batch_instance_percent: The maximum percent of total virtual + machine instances that will be upgraded simultaneously by the rolling + upgrade in one batch. As this is a maximum, unhealthy instances in + previous or future batches can cause the percentage of instances in a + batch to decrease to ensure higher reliability. The default value for this + parameter is 20%. + :type max_batch_instance_percent: int + :param max_unhealthy_instance_percent: The maximum percentage of the total + virtual machine instances in the scale set that can be simultaneously + unhealthy, either as a result of being upgraded, or by being found in an + unhealthy state by the virtual machine health checks before the rolling + upgrade aborts. This constraint will be checked prior to starting any + batch. The default value for this parameter is 20%. + :type max_unhealthy_instance_percent: int + :param max_unhealthy_upgraded_instance_percent: The maximum percentage of + upgraded virtual machine instances that can be found to be in an unhealthy + state. This check will happen after each batch is upgraded. If this + percentage is ever exceeded, the rolling update aborts. The default value + for this parameter is 20%. + :type max_unhealthy_upgraded_instance_percent: int + :param pause_time_between_batches: The wait time between completing the + update for all virtual machines in one batch and starting the next batch. + The time duration should be specified in ISO 8601 format. The default + value is 0 seconds (PT0S). + :type pause_time_between_batches: str + """ + + _validation = { + 'max_batch_instance_percent': {'maximum': 100, 'minimum': 5}, + 'max_unhealthy_instance_percent': {'maximum': 100, 'minimum': 5}, + 'max_unhealthy_upgraded_instance_percent': {'maximum': 100, 'minimum': 0}, + } + + _attribute_map = { + 'max_batch_instance_percent': {'key': 'maxBatchInstancePercent', 'type': 'int'}, + 'max_unhealthy_instance_percent': {'key': 'maxUnhealthyInstancePercent', 'type': 'int'}, + 'max_unhealthy_upgraded_instance_percent': {'key': 'maxUnhealthyUpgradedInstancePercent', 'type': 'int'}, + 'pause_time_between_batches': {'key': 'pauseTimeBetweenBatches', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(RollingUpgradePolicy, self).__init__(**kwargs) + self.max_batch_instance_percent = kwargs.get('max_batch_instance_percent', None) + self.max_unhealthy_instance_percent = kwargs.get('max_unhealthy_instance_percent', None) + self.max_unhealthy_upgraded_instance_percent = kwargs.get('max_unhealthy_upgraded_instance_percent', None) + self.pause_time_between_batches = kwargs.get('pause_time_between_batches', None) + + +class RollingUpgradeProgressInfo(Model): + """Information about the number of virtual machine instances in each upgrade + state. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar successful_instance_count: The number of instances that have been + successfully upgraded. + :vartype successful_instance_count: int + :ivar failed_instance_count: The number of instances that have failed to + be upgraded successfully. + :vartype failed_instance_count: int + :ivar in_progress_instance_count: The number of instances that are + currently being upgraded. + :vartype in_progress_instance_count: int + :ivar pending_instance_count: The number of instances that have not yet + begun to be upgraded. + :vartype pending_instance_count: int + """ + + _validation = { + 'successful_instance_count': {'readonly': True}, + 'failed_instance_count': {'readonly': True}, + 'in_progress_instance_count': {'readonly': True}, + 'pending_instance_count': {'readonly': True}, + } + + _attribute_map = { + 'successful_instance_count': {'key': 'successfulInstanceCount', 'type': 'int'}, + 'failed_instance_count': {'key': 'failedInstanceCount', 'type': 'int'}, + 'in_progress_instance_count': {'key': 'inProgressInstanceCount', 'type': 'int'}, + 'pending_instance_count': {'key': 'pendingInstanceCount', 'type': 'int'}, + } + + def __init__(self, **kwargs): + super(RollingUpgradeProgressInfo, self).__init__(**kwargs) + self.successful_instance_count = None + self.failed_instance_count = None + self.in_progress_instance_count = None + self.pending_instance_count = None + + +class RollingUpgradeRunningStatus(Model): + """Information about the current running state of the overall upgrade. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar code: Code indicating the current status of the upgrade. Possible + values include: 'RollingForward', 'Cancelled', 'Completed', 'Faulted' + :vartype code: str or + ~azure.mgmt.compute.v2017_03_30.models.RollingUpgradeStatusCode + :ivar start_time: Start time of the upgrade. + :vartype start_time: datetime + :ivar last_action: The last action performed on the rolling upgrade. + Possible values include: 'Start', 'Cancel' + :vartype last_action: str or + ~azure.mgmt.compute.v2017_03_30.models.RollingUpgradeActionType + :ivar last_action_time: Last action time of the upgrade. + :vartype last_action_time: datetime + """ + + _validation = { + 'code': {'readonly': True}, + 'start_time': {'readonly': True}, + 'last_action': {'readonly': True}, + 'last_action_time': {'readonly': True}, + } + + _attribute_map = { + 'code': {'key': 'code', 'type': 'RollingUpgradeStatusCode'}, + 'start_time': {'key': 'startTime', 'type': 'iso-8601'}, + 'last_action': {'key': 'lastAction', 'type': 'RollingUpgradeActionType'}, + 'last_action_time': {'key': 'lastActionTime', 'type': 'iso-8601'}, + } + + def __init__(self, **kwargs): + super(RollingUpgradeRunningStatus, self).__init__(**kwargs) + self.code = None + self.start_time = None + self.last_action = None + self.last_action_time = None + + +class RollingUpgradeStatusInfo(Resource): + """The status of the latest virtual machine scale set rolling upgrade. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource Id + :vartype id: str + :ivar name: Resource name + :vartype name: str + :ivar type: Resource type + :vartype type: str + :param location: Required. Resource location + :type location: str + :param tags: Resource tags + :type tags: dict[str, str] + :ivar policy: The rolling upgrade policies applied for this upgrade. + :vartype policy: + ~azure.mgmt.compute.v2017_03_30.models.RollingUpgradePolicy + :ivar running_status: Information about the current running state of the + overall upgrade. + :vartype running_status: + ~azure.mgmt.compute.v2017_03_30.models.RollingUpgradeRunningStatus + :ivar progress: Information about the number of virtual machine instances + in each upgrade state. + :vartype progress: + ~azure.mgmt.compute.v2017_03_30.models.RollingUpgradeProgressInfo + :ivar error: Error details for this upgrade, if there are any. + :vartype error: ~azure.mgmt.compute.v2017_03_30.models.ApiError + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + 'policy': {'readonly': True}, + 'running_status': {'readonly': True}, + 'progress': {'readonly': True}, + 'error': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'policy': {'key': 'properties.policy', 'type': 'RollingUpgradePolicy'}, + 'running_status': {'key': 'properties.runningStatus', 'type': 'RollingUpgradeRunningStatus'}, + 'progress': {'key': 'properties.progress', 'type': 'RollingUpgradeProgressInfo'}, + 'error': {'key': 'properties.error', 'type': 'ApiError'}, + } + + def __init__(self, **kwargs): + super(RollingUpgradeStatusInfo, self).__init__(**kwargs) + self.policy = None + self.running_status = None + self.progress = None + self.error = None + + +class RunCommandDocumentBase(Model): + """Describes the properties of a Run Command metadata. + + All required parameters must be populated in order to send to Azure. + + :param schema: Required. The VM run command schema. + :type schema: str + :param id: Required. The VM run command id. + :type id: str + :param os_type: Required. The Operating System type. Possible values + include: 'Windows', 'Linux' + :type os_type: str or + ~azure.mgmt.compute.v2017_03_30.models.OperatingSystemTypes + :param label: Required. The VM run command label. + :type label: str + :param description: Required. The VM run command description. + :type description: str + """ + + _validation = { + 'schema': {'required': True}, + 'id': {'required': True}, + 'os_type': {'required': True}, + 'label': {'required': True}, + 'description': {'required': True}, + } + + _attribute_map = { + 'schema': {'key': '$schema', 'type': 'str'}, + 'id': {'key': 'id', 'type': 'str'}, + 'os_type': {'key': 'osType', 'type': 'OperatingSystemTypes'}, + 'label': {'key': 'label', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(RunCommandDocumentBase, self).__init__(**kwargs) + self.schema = kwargs.get('schema', None) + self.id = kwargs.get('id', None) + self.os_type = kwargs.get('os_type', None) + self.label = kwargs.get('label', None) + self.description = kwargs.get('description', None) + + +class RunCommandDocument(RunCommandDocumentBase): + """Describes the properties of a Run Command. + + All required parameters must be populated in order to send to Azure. + + :param schema: Required. The VM run command schema. + :type schema: str + :param id: Required. The VM run command id. + :type id: str + :param os_type: Required. The Operating System type. Possible values + include: 'Windows', 'Linux' + :type os_type: str or + ~azure.mgmt.compute.v2017_03_30.models.OperatingSystemTypes + :param label: Required. The VM run command label. + :type label: str + :param description: Required. The VM run command description. + :type description: str + :param script: Required. The script to be executed. + :type script: list[str] + :param parameters: The parameters used by the script. + :type parameters: + list[~azure.mgmt.compute.v2017_03_30.models.RunCommandParameterDefinition] + """ + + _validation = { + 'schema': {'required': True}, + 'id': {'required': True}, + 'os_type': {'required': True}, + 'label': {'required': True}, + 'description': {'required': True}, + 'script': {'required': True}, + } + + _attribute_map = { + 'schema': {'key': '$schema', 'type': 'str'}, + 'id': {'key': 'id', 'type': 'str'}, + 'os_type': {'key': 'osType', 'type': 'OperatingSystemTypes'}, + 'label': {'key': 'label', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + 'script': {'key': 'script', 'type': '[str]'}, + 'parameters': {'key': 'parameters', 'type': '[RunCommandParameterDefinition]'}, + } + + def __init__(self, **kwargs): + super(RunCommandDocument, self).__init__(**kwargs) + self.script = kwargs.get('script', None) + self.parameters = kwargs.get('parameters', None) + + +class RunCommandInput(Model): + """Capture Virtual Machine parameters. + + All required parameters must be populated in order to send to Azure. + + :param command_id: Required. The run command id. + :type command_id: str + :param script: Optional. The script to be executed. When this value is + given, the given script will override the default script of the command. + :type script: list[str] + :param parameters: The run command parameters. + :type parameters: + list[~azure.mgmt.compute.v2017_03_30.models.RunCommandInputParameter] + """ + + _validation = { + 'command_id': {'required': True}, + } + + _attribute_map = { + 'command_id': {'key': 'commandId', 'type': 'str'}, + 'script': {'key': 'script', 'type': '[str]'}, + 'parameters': {'key': 'parameters', 'type': '[RunCommandInputParameter]'}, + } + + def __init__(self, **kwargs): + super(RunCommandInput, self).__init__(**kwargs) + self.command_id = kwargs.get('command_id', None) + self.script = kwargs.get('script', None) + self.parameters = kwargs.get('parameters', None) + + +class RunCommandInputParameter(Model): + """Describes the properties of a run command parameter. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. The run command parameter name. + :type name: str + :param value: Required. The run command parameter value. + :type value: str + """ + + _validation = { + 'name': {'required': True}, + 'value': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'value': {'key': 'value', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(RunCommandInputParameter, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.value = kwargs.get('value', None) + + +class RunCommandParameterDefinition(Model): + """Describes the properties of a run command parameter. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. The run command parameter name. + :type name: str + :param type: Required. The run command parameter type. + :type type: str + :param default_value: The run command parameter default value. + :type default_value: str + :param required: The run command parameter required. Default value: False + . + :type required: bool + """ + + _validation = { + 'name': {'required': True}, + 'type': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'default_value': {'key': 'defaultValue', 'type': 'str'}, + 'required': {'key': 'required', 'type': 'bool'}, + } + + def __init__(self, **kwargs): + super(RunCommandParameterDefinition, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.type = kwargs.get('type', None) + self.default_value = kwargs.get('default_value', None) + self.required = kwargs.get('required', False) + + +class RunCommandResult(OperationStatusResponse): + """Run command operation response. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar name: Operation ID + :vartype name: str + :ivar status: Operation status + :vartype status: str + :ivar start_time: Start time of the operation + :vartype start_time: datetime + :ivar end_time: End time of the operation + :vartype end_time: datetime + :ivar error: Api error + :vartype error: ~azure.mgmt.compute.v2017_03_30.models.ApiError + :param output: Operation output data (raw JSON) + :type output: object + """ + + _validation = { + 'name': {'readonly': True}, + 'status': {'readonly': True}, + 'start_time': {'readonly': True}, + 'end_time': {'readonly': True}, + 'error': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'status': {'key': 'status', 'type': 'str'}, + 'start_time': {'key': 'startTime', 'type': 'iso-8601'}, + 'end_time': {'key': 'endTime', 'type': 'iso-8601'}, + 'error': {'key': 'error', 'type': 'ApiError'}, + 'output': {'key': 'properties.output', 'type': 'object'}, + } + + def __init__(self, **kwargs): + super(RunCommandResult, self).__init__(**kwargs) + self.output = kwargs.get('output', None) + + +class Sku(Model): + """Describes a virtual machine scale set sku. + + :param name: The sku name. + :type name: str + :param tier: Specifies the tier of virtual machines in a scale set.

    Possible Values:

    **Standard**

    **Basic** + :type tier: str + :param capacity: Specifies the number of virtual machines in the scale + set. + :type capacity: long + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'tier': {'key': 'tier', 'type': 'str'}, + 'capacity': {'key': 'capacity', 'type': 'long'}, + } + + def __init__(self, **kwargs): + super(Sku, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.tier = kwargs.get('tier', None) + self.capacity = kwargs.get('capacity', None) + + +class Snapshot(Resource): + """Snapshot resource. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource Id + :vartype id: str + :ivar name: Resource name + :vartype name: str + :ivar type: Resource type + :vartype type: str + :param location: Required. Resource location + :type location: str + :param tags: Resource tags + :type tags: dict[str, str] + :ivar managed_by: Unused. Always Null. + :vartype managed_by: str + :param sku: + :type sku: ~azure.mgmt.compute.v2017_03_30.models.DiskSku + :ivar time_created: The time when the disk was created. + :vartype time_created: datetime + :param os_type: The Operating System type. Possible values include: + 'Windows', 'Linux' + :type os_type: str or + ~azure.mgmt.compute.v2017_03_30.models.OperatingSystemTypes + :param creation_data: Required. Disk source information. CreationData + information cannot be changed after the disk has been created. + :type creation_data: ~azure.mgmt.compute.v2017_03_30.models.CreationData + :param disk_size_gb: If creationData.createOption is Empty, this field is + mandatory and it indicates the size of the VHD to create. If this field is + present for updates or creation with other options, it indicates a resize. + Resizes are only allowed if the disk is not attached to a running VM, and + can only increase the disk's size. + :type disk_size_gb: int + :param encryption_settings: Encryption settings for disk or snapshot + :type encryption_settings: + ~azure.mgmt.compute.v2017_03_30.models.EncryptionSettings + :ivar provisioning_state: The disk provisioning state. + :vartype provisioning_state: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + 'managed_by': {'readonly': True}, + 'time_created': {'readonly': True}, + 'creation_data': {'required': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'managed_by': {'key': 'managedBy', 'type': 'str'}, + 'sku': {'key': 'sku', 'type': 'DiskSku'}, + 'time_created': {'key': 'properties.timeCreated', 'type': 'iso-8601'}, + 'os_type': {'key': 'properties.osType', 'type': 'OperatingSystemTypes'}, + 'creation_data': {'key': 'properties.creationData', 'type': 'CreationData'}, + 'disk_size_gb': {'key': 'properties.diskSizeGB', 'type': 'int'}, + 'encryption_settings': {'key': 'properties.encryptionSettings', 'type': 'EncryptionSettings'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(Snapshot, self).__init__(**kwargs) + self.managed_by = None + self.sku = kwargs.get('sku', None) + self.time_created = None + self.os_type = kwargs.get('os_type', None) + self.creation_data = kwargs.get('creation_data', None) + self.disk_size_gb = kwargs.get('disk_size_gb', None) + self.encryption_settings = kwargs.get('encryption_settings', None) + self.provisioning_state = None + + +class SnapshotUpdate(ResourceUpdate): + """Snapshot update resource. + + :param tags: Resource tags + :type tags: dict[str, str] + :param sku: + :type sku: ~azure.mgmt.compute.v2017_03_30.models.DiskSku + :param os_type: the Operating System type. Possible values include: + 'Windows', 'Linux' + :type os_type: str or + ~azure.mgmt.compute.v2017_03_30.models.OperatingSystemTypes + :param disk_size_gb: If creationData.createOption is Empty, this field is + mandatory and it indicates the size of the VHD to create. If this field is + present for updates or creation with other options, it indicates a resize. + Resizes are only allowed if the disk is not attached to a running VM, and + can only increase the disk's size. + :type disk_size_gb: int + :param encryption_settings: Encryption settings for disk or snapshot + :type encryption_settings: + ~azure.mgmt.compute.v2017_03_30.models.EncryptionSettings + """ + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + 'sku': {'key': 'sku', 'type': 'DiskSku'}, + 'os_type': {'key': 'properties.osType', 'type': 'OperatingSystemTypes'}, + 'disk_size_gb': {'key': 'properties.diskSizeGB', 'type': 'int'}, + 'encryption_settings': {'key': 'properties.encryptionSettings', 'type': 'EncryptionSettings'}, + } + + def __init__(self, **kwargs): + super(SnapshotUpdate, self).__init__(**kwargs) + self.os_type = kwargs.get('os_type', None) + self.disk_size_gb = kwargs.get('disk_size_gb', None) + self.encryption_settings = kwargs.get('encryption_settings', None) + + +class SourceVault(Model): + """The vault id is an Azure Resource Manager Resource id in the form + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.KeyVault/vaults/{vaultName}. + + :param id: Resource Id + :type id: str + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(SourceVault, self).__init__(**kwargs) + self.id = kwargs.get('id', None) + + +class SshConfiguration(Model): + """SSH configuration for Linux based VMs running on Azure. + + :param public_keys: The list of SSH public keys used to authenticate with + linux based VMs. + :type public_keys: + list[~azure.mgmt.compute.v2017_03_30.models.SshPublicKey] + """ + + _attribute_map = { + 'public_keys': {'key': 'publicKeys', 'type': '[SshPublicKey]'}, + } + + def __init__(self, **kwargs): + super(SshConfiguration, self).__init__(**kwargs) + self.public_keys = kwargs.get('public_keys', None) + + +class SshPublicKey(Model): + """Contains information about SSH certificate public key and the path on the + Linux VM where the public key is placed. + + :param path: Specifies the full path on the created VM where ssh public + key is stored. If the file already exists, the specified key is appended + to the file. Example: /home/user/.ssh/authorized_keys + :type path: str + :param key_data: SSH public key certificate used to authenticate with the + VM through ssh. The key needs to be at least 2048-bit and in ssh-rsa + format.

    For creating ssh keys, see [Create SSH keys on Linux and + Mac for Linux VMs in + Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-mac-create-ssh-keys?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json). + :type key_data: str + """ + + _attribute_map = { + 'path': {'key': 'path', 'type': 'str'}, + 'key_data': {'key': 'keyData', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(SshPublicKey, self).__init__(**kwargs) + self.path = kwargs.get('path', None) + self.key_data = kwargs.get('key_data', None) + + +class StorageProfile(Model): + """Specifies the storage settings for the virtual machine disks. + + :param image_reference: Specifies information about the image to use. You + can specify information about platform images, marketplace images, or + virtual machine images. This element is required when you want to use a + platform image, marketplace image, or virtual machine image, but is not + used in other creation operations. + :type image_reference: + ~azure.mgmt.compute.v2017_03_30.models.ImageReference + :param os_disk: Specifies information about the operating system disk used + by the virtual machine.

    For more information about disks, see + [About disks and VHDs for Azure virtual + machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-about-disks-vhds?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). + :type os_disk: ~azure.mgmt.compute.v2017_03_30.models.OSDisk + :param data_disks: Specifies the parameters that are used to add a data + disk to a virtual machine.

    For more information about disks, see + [About disks and VHDs for Azure virtual + machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-about-disks-vhds?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). + :type data_disks: list[~azure.mgmt.compute.v2017_03_30.models.DataDisk] + """ + + _attribute_map = { + 'image_reference': {'key': 'imageReference', 'type': 'ImageReference'}, + 'os_disk': {'key': 'osDisk', 'type': 'OSDisk'}, + 'data_disks': {'key': 'dataDisks', 'type': '[DataDisk]'}, + } + + def __init__(self, **kwargs): + super(StorageProfile, self).__init__(**kwargs) + self.image_reference = kwargs.get('image_reference', None) + self.os_disk = kwargs.get('os_disk', None) + self.data_disks = kwargs.get('data_disks', None) + + +class SubResourceReadOnly(Model): + """SubResourceReadOnly. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource Id + :vartype id: str + """ + + _validation = { + 'id': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(SubResourceReadOnly, self).__init__(**kwargs) + self.id = None + + +class UpdateResource(Model): + """The Update Resource model definition. + + :param tags: Resource tags + :type tags: dict[str, str] + """ + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__(self, **kwargs): + super(UpdateResource, self).__init__(**kwargs) + self.tags = kwargs.get('tags', None) + + +class UpgradePolicy(Model): + """Describes an upgrade policy - automatic, manual, or rolling. + + :param mode: Specifies the mode of an upgrade to virtual machines in the + scale set.

    Possible values are:

    **Manual** - You + control the application of updates to virtual machines in the scale set. + You do this by using the manualUpgrade action.

    **Automatic** - + All virtual machines in the scale set are automatically updated at the + same time. Possible values include: 'Automatic', 'Manual', 'Rolling' + :type mode: str or ~azure.mgmt.compute.v2017_03_30.models.UpgradeMode + :param rolling_upgrade_policy: The configuration parameters used while + performing a rolling upgrade. + :type rolling_upgrade_policy: + ~azure.mgmt.compute.v2017_03_30.models.RollingUpgradePolicy + :param automatic_os_upgrade: Whether OS upgrades should automatically be + applied to scale set instances in a rolling fashion when a newer version + of the image becomes available. + :type automatic_os_upgrade: bool + """ + + _attribute_map = { + 'mode': {'key': 'mode', 'type': 'UpgradeMode'}, + 'rolling_upgrade_policy': {'key': 'rollingUpgradePolicy', 'type': 'RollingUpgradePolicy'}, + 'automatic_os_upgrade': {'key': 'automaticOSUpgrade', 'type': 'bool'}, + } + + def __init__(self, **kwargs): + super(UpgradePolicy, self).__init__(**kwargs) + self.mode = kwargs.get('mode', None) + self.rolling_upgrade_policy = kwargs.get('rolling_upgrade_policy', None) + self.automatic_os_upgrade = kwargs.get('automatic_os_upgrade', None) + + +class Usage(Model): + """Describes Compute Resource Usage. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar unit: Required. An enum describing the unit of usage measurement. + Default value: "Count" . + :vartype unit: str + :param current_value: Required. The current usage of the resource. + :type current_value: int + :param limit: Required. The maximum permitted usage of the resource. + :type limit: long + :param name: Required. The name of the type of usage. + :type name: ~azure.mgmt.compute.v2017_03_30.models.UsageName + """ + + _validation = { + 'unit': {'required': True, 'constant': True}, + 'current_value': {'required': True}, + 'limit': {'required': True}, + 'name': {'required': True}, + } + + _attribute_map = { + 'unit': {'key': 'unit', 'type': 'str'}, + 'current_value': {'key': 'currentValue', 'type': 'int'}, + 'limit': {'key': 'limit', 'type': 'long'}, + 'name': {'key': 'name', 'type': 'UsageName'}, + } + + unit = "Count" + + def __init__(self, **kwargs): + super(Usage, self).__init__(**kwargs) + self.current_value = kwargs.get('current_value', None) + self.limit = kwargs.get('limit', None) + self.name = kwargs.get('name', None) + + +class UsageName(Model): + """The Usage Names. + + :param value: The name of the resource. + :type value: str + :param localized_value: The localized name of the resource. + :type localized_value: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': 'str'}, + 'localized_value': {'key': 'localizedValue', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(UsageName, self).__init__(**kwargs) + self.value = kwargs.get('value', None) + self.localized_value = kwargs.get('localized_value', None) + + +class VaultCertificate(Model): + """Describes a single certificate reference in a Key Vault, and where the + certificate should reside on the VM. + + :param certificate_url: This is the URL of a certificate that has been + uploaded to Key Vault as a secret. For adding a secret to the Key Vault, + see [Add a key or secret to the key + vault](https://docs.microsoft.com/azure/key-vault/key-vault-get-started/#add). + In this case, your certificate needs to be It is the Base64 encoding of + the following JSON Object which is encoded in UTF-8:

    {
    + "data":"",
    "dataType":"pfx",
    + "password":""
    } + :type certificate_url: str + :param certificate_store: For Windows VMs, specifies the certificate store + on the Virtual Machine to which the certificate should be added. The + specified certificate store is implicitly in the LocalMachine account. +

    For Linux VMs, the certificate file is placed under the + /var/lib/waagent directory, with the file name + <UppercaseThumbprint>.crt for the X509 certificate file and + <UppercaseThumbprint>.prv for private key. Both of these files are + .pem formatted. + :type certificate_store: str + """ + + _attribute_map = { + 'certificate_url': {'key': 'certificateUrl', 'type': 'str'}, + 'certificate_store': {'key': 'certificateStore', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(VaultCertificate, self).__init__(**kwargs) + self.certificate_url = kwargs.get('certificate_url', None) + self.certificate_store = kwargs.get('certificate_store', None) + + +class VaultSecretGroup(Model): + """Describes a set of certificates which are all in the same Key Vault. + + :param source_vault: The relative URL of the Key Vault containing all of + the certificates in VaultCertificates. + :type source_vault: ~azure.mgmt.compute.v2017_03_30.models.SubResource + :param vault_certificates: The list of key vault references in SourceVault + which contain certificates. + :type vault_certificates: + list[~azure.mgmt.compute.v2017_03_30.models.VaultCertificate] + """ + + _attribute_map = { + 'source_vault': {'key': 'sourceVault', 'type': 'SubResource'}, + 'vault_certificates': {'key': 'vaultCertificates', 'type': '[VaultCertificate]'}, + } + + def __init__(self, **kwargs): + super(VaultSecretGroup, self).__init__(**kwargs) + self.source_vault = kwargs.get('source_vault', None) + self.vault_certificates = kwargs.get('vault_certificates', None) + + +class VirtualHardDisk(Model): + """Describes the uri of a disk. + + :param uri: Specifies the virtual hard disk's uri. + :type uri: str + """ + + _attribute_map = { + 'uri': {'key': 'uri', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(VirtualHardDisk, self).__init__(**kwargs) + self.uri = kwargs.get('uri', None) + + +class VirtualMachine(Resource): + """Describes a Virtual Machine. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource Id + :vartype id: str + :ivar name: Resource name + :vartype name: str + :ivar type: Resource type + :vartype type: str + :param location: Required. Resource location + :type location: str + :param tags: Resource tags + :type tags: dict[str, str] + :param plan: Specifies information about the marketplace image used to + create the virtual machine. This element is only used for marketplace + images. Before you can use a marketplace image from an API, you must + enable the image for programmatic use. In the Azure portal, find the + marketplace image that you want to use and then click **Want to deploy + programmatically, Get Started ->**. Enter any required information and + then click **Save**. + :type plan: ~azure.mgmt.compute.v2017_03_30.models.Plan + :param hardware_profile: Specifies the hardware settings for the virtual + machine. + :type hardware_profile: + ~azure.mgmt.compute.v2017_03_30.models.HardwareProfile + :param storage_profile: Specifies the storage settings for the virtual + machine disks. + :type storage_profile: + ~azure.mgmt.compute.v2017_03_30.models.StorageProfile + :param os_profile: Specifies the operating system settings for the virtual + machine. + :type os_profile: ~azure.mgmt.compute.v2017_03_30.models.OSProfile + :param network_profile: Specifies the network interfaces of the virtual + machine. + :type network_profile: + ~azure.mgmt.compute.v2017_03_30.models.NetworkProfile + :param diagnostics_profile: Specifies the boot diagnostic settings state. +

    Minimum api-version: 2015-06-15. + :type diagnostics_profile: + ~azure.mgmt.compute.v2017_03_30.models.DiagnosticsProfile + :param availability_set: Specifies information about the availability set + that the virtual machine should be assigned to. Virtual machines specified + in the same availability set are allocated to different nodes to maximize + availability. For more information about availability sets, see [Manage + the availability of virtual + machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-manage-availability?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). +

    For more information on Azure planned maintenance, see [Planned + maintenance for virtual machines in + Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-planned-maintenance?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json) +

    Currently, a VM can only be added to availability set at creation + time. An existing VM cannot be added to an availability set. + :type availability_set: ~azure.mgmt.compute.v2017_03_30.models.SubResource + :ivar provisioning_state: The provisioning state, which only appears in + the response. + :vartype provisioning_state: str + :ivar instance_view: The virtual machine instance view. + :vartype instance_view: + ~azure.mgmt.compute.v2017_03_30.models.VirtualMachineInstanceView + :param license_type: Specifies that the image or disk that is being used + was licensed on-premises. This element is only used for images that + contain the Windows Server operating system.

    Possible values are: +

    Windows_Client

    Windows_Server

    If this element + is included in a request for an update, the value must match the initial + value. This value cannot be updated.

    For more information, see + [Azure Hybrid Use Benefit for Windows + Server](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-hybrid-use-benefit-licensing?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json) +

    Minimum api-version: 2015-06-15 + :type license_type: str + :ivar vm_id: Specifies the VM unique ID which is a 128-bits identifier + that is encoded and stored in all Azure IaaS VMs SMBIOS and can be read + using platform BIOS commands. + :vartype vm_id: str + :ivar resources: The virtual machine child extension resources. + :vartype resources: + list[~azure.mgmt.compute.v2017_03_30.models.VirtualMachineExtension] + :param identity: The identity of the virtual machine, if configured. + :type identity: + ~azure.mgmt.compute.v2017_03_30.models.VirtualMachineIdentity + :param zones: The virtual machine zones. + :type zones: list[str] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + 'provisioning_state': {'readonly': True}, + 'instance_view': {'readonly': True}, + 'vm_id': {'readonly': True}, + 'resources': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'plan': {'key': 'plan', 'type': 'Plan'}, + 'hardware_profile': {'key': 'properties.hardwareProfile', 'type': 'HardwareProfile'}, + 'storage_profile': {'key': 'properties.storageProfile', 'type': 'StorageProfile'}, + 'os_profile': {'key': 'properties.osProfile', 'type': 'OSProfile'}, + 'network_profile': {'key': 'properties.networkProfile', 'type': 'NetworkProfile'}, + 'diagnostics_profile': {'key': 'properties.diagnosticsProfile', 'type': 'DiagnosticsProfile'}, + 'availability_set': {'key': 'properties.availabilitySet', 'type': 'SubResource'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'instance_view': {'key': 'properties.instanceView', 'type': 'VirtualMachineInstanceView'}, + 'license_type': {'key': 'properties.licenseType', 'type': 'str'}, + 'vm_id': {'key': 'properties.vmId', 'type': 'str'}, + 'resources': {'key': 'resources', 'type': '[VirtualMachineExtension]'}, + 'identity': {'key': 'identity', 'type': 'VirtualMachineIdentity'}, + 'zones': {'key': 'zones', 'type': '[str]'}, + } + + def __init__(self, **kwargs): + super(VirtualMachine, self).__init__(**kwargs) + self.plan = kwargs.get('plan', None) + self.hardware_profile = kwargs.get('hardware_profile', None) + self.storage_profile = kwargs.get('storage_profile', None) + self.os_profile = kwargs.get('os_profile', None) + self.network_profile = kwargs.get('network_profile', None) + self.diagnostics_profile = kwargs.get('diagnostics_profile', None) + self.availability_set = kwargs.get('availability_set', None) + self.provisioning_state = None + self.instance_view = None + self.license_type = kwargs.get('license_type', None) + self.vm_id = None + self.resources = None + self.identity = kwargs.get('identity', None) + self.zones = kwargs.get('zones', None) + + +class VirtualMachineAgentInstanceView(Model): + """The instance view of the VM Agent running on the virtual machine. + + :param vm_agent_version: The VM Agent full version. + :type vm_agent_version: str + :param extension_handlers: The virtual machine extension handler instance + view. + :type extension_handlers: + list[~azure.mgmt.compute.v2017_03_30.models.VirtualMachineExtensionHandlerInstanceView] + :param statuses: The resource status information. + :type statuses: + list[~azure.mgmt.compute.v2017_03_30.models.InstanceViewStatus] + """ + + _attribute_map = { + 'vm_agent_version': {'key': 'vmAgentVersion', 'type': 'str'}, + 'extension_handlers': {'key': 'extensionHandlers', 'type': '[VirtualMachineExtensionHandlerInstanceView]'}, + 'statuses': {'key': 'statuses', 'type': '[InstanceViewStatus]'}, + } + + def __init__(self, **kwargs): + super(VirtualMachineAgentInstanceView, self).__init__(**kwargs) + self.vm_agent_version = kwargs.get('vm_agent_version', None) + self.extension_handlers = kwargs.get('extension_handlers', None) + self.statuses = kwargs.get('statuses', None) + + +class VirtualMachineCaptureParameters(Model): + """Capture Virtual Machine parameters. + + All required parameters must be populated in order to send to Azure. + + :param vhd_prefix: Required. The captured virtual hard disk's name prefix. + :type vhd_prefix: str + :param destination_container_name: Required. The destination container + name. + :type destination_container_name: str + :param overwrite_vhds: Required. Specifies whether to overwrite the + destination virtual hard disk, in case of conflict. + :type overwrite_vhds: bool + """ + + _validation = { + 'vhd_prefix': {'required': True}, + 'destination_container_name': {'required': True}, + 'overwrite_vhds': {'required': True}, + } + + _attribute_map = { + 'vhd_prefix': {'key': 'vhdPrefix', 'type': 'str'}, + 'destination_container_name': {'key': 'destinationContainerName', 'type': 'str'}, + 'overwrite_vhds': {'key': 'overwriteVhds', 'type': 'bool'}, + } + + def __init__(self, **kwargs): + super(VirtualMachineCaptureParameters, self).__init__(**kwargs) + self.vhd_prefix = kwargs.get('vhd_prefix', None) + self.destination_container_name = kwargs.get('destination_container_name', None) + self.overwrite_vhds = kwargs.get('overwrite_vhds', None) + + +class VirtualMachineCaptureResult(SubResource): + """Resource Id. + + :param id: Resource Id + :type id: str + :param output: Operation output data (raw JSON) + :type output: object + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'output': {'key': 'properties.output', 'type': 'object'}, + } + + def __init__(self, **kwargs): + super(VirtualMachineCaptureResult, self).__init__(**kwargs) + self.output = kwargs.get('output', None) + + +class VirtualMachineExtension(Resource): + """Describes a Virtual Machine Extension. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource Id + :vartype id: str + :ivar name: Resource name + :vartype name: str + :ivar type: Resource type + :vartype type: str + :param location: Required. Resource location + :type location: str + :param tags: Resource tags + :type tags: dict[str, str] + :param force_update_tag: How the extension handler should be forced to + update even if the extension configuration has not changed. + :type force_update_tag: str + :param publisher: The name of the extension handler publisher. + :type publisher: str + :param virtual_machine_extension_type: Specifies the type of the + extension; an example is "CustomScriptExtension". + :type virtual_machine_extension_type: str + :param type_handler_version: Specifies the version of the script handler. + :type type_handler_version: str + :param auto_upgrade_minor_version: Indicates whether the extension should + use a newer minor version if one is available at deployment time. Once + deployed, however, the extension will not upgrade minor versions unless + redeployed, even with this property set to true. + :type auto_upgrade_minor_version: bool + :param settings: Json formatted public settings for the extension. + :type settings: object + :param protected_settings: The extension can contain either + protectedSettings or protectedSettingsFromKeyVault or no protected + settings at all. + :type protected_settings: object + :ivar provisioning_state: The provisioning state, which only appears in + the response. + :vartype provisioning_state: str + :param instance_view: The virtual machine extension instance view. + :type instance_view: + ~azure.mgmt.compute.v2017_03_30.models.VirtualMachineExtensionInstanceView + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'force_update_tag': {'key': 'properties.forceUpdateTag', 'type': 'str'}, + 'publisher': {'key': 'properties.publisher', 'type': 'str'}, + 'virtual_machine_extension_type': {'key': 'properties.type', 'type': 'str'}, + 'type_handler_version': {'key': 'properties.typeHandlerVersion', 'type': 'str'}, + 'auto_upgrade_minor_version': {'key': 'properties.autoUpgradeMinorVersion', 'type': 'bool'}, + 'settings': {'key': 'properties.settings', 'type': 'object'}, + 'protected_settings': {'key': 'properties.protectedSettings', 'type': 'object'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'instance_view': {'key': 'properties.instanceView', 'type': 'VirtualMachineExtensionInstanceView'}, + } + + def __init__(self, **kwargs): + super(VirtualMachineExtension, self).__init__(**kwargs) + self.force_update_tag = kwargs.get('force_update_tag', None) + self.publisher = kwargs.get('publisher', None) + self.virtual_machine_extension_type = kwargs.get('virtual_machine_extension_type', None) + self.type_handler_version = kwargs.get('type_handler_version', None) + self.auto_upgrade_minor_version = kwargs.get('auto_upgrade_minor_version', None) + self.settings = kwargs.get('settings', None) + self.protected_settings = kwargs.get('protected_settings', None) + self.provisioning_state = None + self.instance_view = kwargs.get('instance_view', None) + + +class VirtualMachineExtensionHandlerInstanceView(Model): + """The instance view of a virtual machine extension handler. + + :param type: Specifies the type of the extension; an example is + "CustomScriptExtension". + :type type: str + :param type_handler_version: Specifies the version of the script handler. + :type type_handler_version: str + :param status: The extension handler status. + :type status: ~azure.mgmt.compute.v2017_03_30.models.InstanceViewStatus + """ + + _attribute_map = { + 'type': {'key': 'type', 'type': 'str'}, + 'type_handler_version': {'key': 'typeHandlerVersion', 'type': 'str'}, + 'status': {'key': 'status', 'type': 'InstanceViewStatus'}, + } + + def __init__(self, **kwargs): + super(VirtualMachineExtensionHandlerInstanceView, self).__init__(**kwargs) + self.type = kwargs.get('type', None) + self.type_handler_version = kwargs.get('type_handler_version', None) + self.status = kwargs.get('status', None) + + +class VirtualMachineExtensionImage(Resource): + """Describes a Virtual Machine Extension Image. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource Id + :vartype id: str + :ivar name: Resource name + :vartype name: str + :ivar type: Resource type + :vartype type: str + :param location: Required. Resource location + :type location: str + :param tags: Resource tags + :type tags: dict[str, str] + :param operating_system: Required. The operating system this extension + supports. + :type operating_system: str + :param compute_role: Required. The type of role (IaaS or PaaS) this + extension supports. + :type compute_role: str + :param handler_schema: Required. The schema defined by publisher, where + extension consumers should provide settings in a matching schema. + :type handler_schema: str + :param vm_scale_set_enabled: Whether the extension can be used on xRP + VMScaleSets. By default existing extensions are usable on scalesets, but + there might be cases where a publisher wants to explicitly indicate the + extension is only enabled for CRP VMs but not VMSS. + :type vm_scale_set_enabled: bool + :param supports_multiple_extensions: Whether the handler can support + multiple extensions. + :type supports_multiple_extensions: bool + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + 'operating_system': {'required': True}, + 'compute_role': {'required': True}, + 'handler_schema': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'operating_system': {'key': 'properties.operatingSystem', 'type': 'str'}, + 'compute_role': {'key': 'properties.computeRole', 'type': 'str'}, + 'handler_schema': {'key': 'properties.handlerSchema', 'type': 'str'}, + 'vm_scale_set_enabled': {'key': 'properties.vmScaleSetEnabled', 'type': 'bool'}, + 'supports_multiple_extensions': {'key': 'properties.supportsMultipleExtensions', 'type': 'bool'}, + } + + def __init__(self, **kwargs): + super(VirtualMachineExtensionImage, self).__init__(**kwargs) + self.operating_system = kwargs.get('operating_system', None) + self.compute_role = kwargs.get('compute_role', None) + self.handler_schema = kwargs.get('handler_schema', None) + self.vm_scale_set_enabled = kwargs.get('vm_scale_set_enabled', None) + self.supports_multiple_extensions = kwargs.get('supports_multiple_extensions', None) + + +class VirtualMachineExtensionInstanceView(Model): + """The instance view of a virtual machine extension. + + :param name: The virtual machine extension name. + :type name: str + :param type: Specifies the type of the extension; an example is + "CustomScriptExtension". + :type type: str + :param type_handler_version: Specifies the version of the script handler. + :type type_handler_version: str + :param substatuses: The resource status information. + :type substatuses: + list[~azure.mgmt.compute.v2017_03_30.models.InstanceViewStatus] + :param statuses: The resource status information. + :type statuses: + list[~azure.mgmt.compute.v2017_03_30.models.InstanceViewStatus] + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'type_handler_version': {'key': 'typeHandlerVersion', 'type': 'str'}, + 'substatuses': {'key': 'substatuses', 'type': '[InstanceViewStatus]'}, + 'statuses': {'key': 'statuses', 'type': '[InstanceViewStatus]'}, + } + + def __init__(self, **kwargs): + super(VirtualMachineExtensionInstanceView, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.type = kwargs.get('type', None) + self.type_handler_version = kwargs.get('type_handler_version', None) + self.substatuses = kwargs.get('substatuses', None) + self.statuses = kwargs.get('statuses', None) + + +class VirtualMachineExtensionsListResult(Model): + """The List Extension operation response. + + :param value: The list of extensions + :type value: + list[~azure.mgmt.compute.v2017_03_30.models.VirtualMachineExtension] + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[VirtualMachineExtension]'}, + } + + def __init__(self, **kwargs): + super(VirtualMachineExtensionsListResult, self).__init__(**kwargs) + self.value = kwargs.get('value', None) + + +class VirtualMachineExtensionUpdate(UpdateResource): + """Describes a Virtual Machine Extension. + + :param tags: Resource tags + :type tags: dict[str, str] + :param force_update_tag: How the extension handler should be forced to + update even if the extension configuration has not changed. + :type force_update_tag: str + :param publisher: The name of the extension handler publisher. + :type publisher: str + :param type: Specifies the type of the extension; an example is + "CustomScriptExtension". + :type type: str + :param type_handler_version: Specifies the version of the script handler. + :type type_handler_version: str + :param auto_upgrade_minor_version: Indicates whether the extension should + use a newer minor version if one is available at deployment time. Once + deployed, however, the extension will not upgrade minor versions unless + redeployed, even with this property set to true. + :type auto_upgrade_minor_version: bool + :param settings: Json formatted public settings for the extension. + :type settings: object + :param protected_settings: The extension can contain either + protectedSettings or protectedSettingsFromKeyVault or no protected + settings at all. + :type protected_settings: object + """ + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + 'force_update_tag': {'key': 'properties.forceUpdateTag', 'type': 'str'}, + 'publisher': {'key': 'properties.publisher', 'type': 'str'}, + 'type': {'key': 'properties.type', 'type': 'str'}, + 'type_handler_version': {'key': 'properties.typeHandlerVersion', 'type': 'str'}, + 'auto_upgrade_minor_version': {'key': 'properties.autoUpgradeMinorVersion', 'type': 'bool'}, + 'settings': {'key': 'properties.settings', 'type': 'object'}, + 'protected_settings': {'key': 'properties.protectedSettings', 'type': 'object'}, + } + + def __init__(self, **kwargs): + super(VirtualMachineExtensionUpdate, self).__init__(**kwargs) + self.force_update_tag = kwargs.get('force_update_tag', None) + self.publisher = kwargs.get('publisher', None) + self.type = kwargs.get('type', None) + self.type_handler_version = kwargs.get('type_handler_version', None) + self.auto_upgrade_minor_version = kwargs.get('auto_upgrade_minor_version', None) + self.settings = kwargs.get('settings', None) + self.protected_settings = kwargs.get('protected_settings', None) + + +class VirtualMachineHealthStatus(Model): + """The health status of the VM. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar status: The health status information for the VM. + :vartype status: ~azure.mgmt.compute.v2017_03_30.models.InstanceViewStatus + """ + + _validation = { + 'status': {'readonly': True}, + } + + _attribute_map = { + 'status': {'key': 'status', 'type': 'InstanceViewStatus'}, + } + + def __init__(self, **kwargs): + super(VirtualMachineHealthStatus, self).__init__(**kwargs) + self.status = None + + +class VirtualMachineIdentity(Model): + """Identity for the virtual machine. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar principal_id: The principal id of virtual machine identity. + :vartype principal_id: str + :ivar tenant_id: The tenant id associated with the virtual machine. + :vartype tenant_id: str + :param type: The type of identity used for the virtual machine. Currently, + the only supported type is 'SystemAssigned', which implicitly creates an + identity. Possible values include: 'SystemAssigned' + :type type: str or + ~azure.mgmt.compute.v2017_03_30.models.ResourceIdentityType + """ + + _validation = { + 'principal_id': {'readonly': True}, + 'tenant_id': {'readonly': True}, + } + + _attribute_map = { + 'principal_id': {'key': 'principalId', 'type': 'str'}, + 'tenant_id': {'key': 'tenantId', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'ResourceIdentityType'}, + } + + def __init__(self, **kwargs): + super(VirtualMachineIdentity, self).__init__(**kwargs) + self.principal_id = None + self.tenant_id = None + self.type = kwargs.get('type', None) + + +class VirtualMachineImageResource(SubResource): + """Virtual machine image resource information. + + All required parameters must be populated in order to send to Azure. + + :param id: Resource Id + :type id: str + :param name: Required. The name of the resource. + :type name: str + :param location: Required. The supported Azure location of the resource. + :type location: str + :param tags: Specifies the tags that are assigned to the virtual machine. + For more information about using tags, see [Using tags to organize your + Azure + resources](https://docs.microsoft.com/azure/azure-resource-manager/resource-group-using-tags.md). + :type tags: dict[str, str] + """ + + _validation = { + 'name': {'required': True}, + 'location': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__(self, **kwargs): + super(VirtualMachineImageResource, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.location = kwargs.get('location', None) + self.tags = kwargs.get('tags', None) + + +class VirtualMachineImage(VirtualMachineImageResource): + """Describes a Virtual Machine Image. + + All required parameters must be populated in order to send to Azure. + + :param id: Resource Id + :type id: str + :param name: Required. The name of the resource. + :type name: str + :param location: Required. The supported Azure location of the resource. + :type location: str + :param tags: Specifies the tags that are assigned to the virtual machine. + For more information about using tags, see [Using tags to organize your + Azure + resources](https://docs.microsoft.com/azure/azure-resource-manager/resource-group-using-tags.md). + :type tags: dict[str, str] + :param plan: + :type plan: ~azure.mgmt.compute.v2017_03_30.models.PurchasePlan + :param os_disk_image: + :type os_disk_image: ~azure.mgmt.compute.v2017_03_30.models.OSDiskImage + :param data_disk_images: + :type data_disk_images: + list[~azure.mgmt.compute.v2017_03_30.models.DataDiskImage] + """ + + _validation = { + 'name': {'required': True}, + 'location': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'plan': {'key': 'properties.plan', 'type': 'PurchasePlan'}, + 'os_disk_image': {'key': 'properties.osDiskImage', 'type': 'OSDiskImage'}, + 'data_disk_images': {'key': 'properties.dataDiskImages', 'type': '[DataDiskImage]'}, + } + + def __init__(self, **kwargs): + super(VirtualMachineImage, self).__init__(**kwargs) + self.plan = kwargs.get('plan', None) + self.os_disk_image = kwargs.get('os_disk_image', None) + self.data_disk_images = kwargs.get('data_disk_images', None) + + +class VirtualMachineInstanceView(Model): + """The instance view of a virtual machine. + + :param platform_update_domain: Specifies the update domain of the virtual + machine. + :type platform_update_domain: int + :param platform_fault_domain: Specifies the fault domain of the virtual + machine. + :type platform_fault_domain: int + :param rdp_thumb_print: The Remote desktop certificate thumbprint. + :type rdp_thumb_print: str + :param vm_agent: The VM Agent running on the virtual machine. + :type vm_agent: + ~azure.mgmt.compute.v2017_03_30.models.VirtualMachineAgentInstanceView + :param maintenance_redeploy_status: The Maintenance Operation status on + the virtual machine. + :type maintenance_redeploy_status: + ~azure.mgmt.compute.v2017_03_30.models.MaintenanceRedeployStatus + :param disks: The virtual machine disk information. + :type disks: list[~azure.mgmt.compute.v2017_03_30.models.DiskInstanceView] + :param extensions: The extensions information. + :type extensions: + list[~azure.mgmt.compute.v2017_03_30.models.VirtualMachineExtensionInstanceView] + :param boot_diagnostics: Boot Diagnostics is a debugging feature which + allows you to view Console Output and Screenshot to diagnose VM status. +

    You can easily view the output of your console log.

    + Azure also enables you to see a screenshot of the VM from the hypervisor. + :type boot_diagnostics: + ~azure.mgmt.compute.v2017_03_30.models.BootDiagnosticsInstanceView + :param statuses: The resource status information. + :type statuses: + list[~azure.mgmt.compute.v2017_03_30.models.InstanceViewStatus] + """ + + _attribute_map = { + 'platform_update_domain': {'key': 'platformUpdateDomain', 'type': 'int'}, + 'platform_fault_domain': {'key': 'platformFaultDomain', 'type': 'int'}, + 'rdp_thumb_print': {'key': 'rdpThumbPrint', 'type': 'str'}, + 'vm_agent': {'key': 'vmAgent', 'type': 'VirtualMachineAgentInstanceView'}, + 'maintenance_redeploy_status': {'key': 'maintenanceRedeployStatus', 'type': 'MaintenanceRedeployStatus'}, + 'disks': {'key': 'disks', 'type': '[DiskInstanceView]'}, + 'extensions': {'key': 'extensions', 'type': '[VirtualMachineExtensionInstanceView]'}, + 'boot_diagnostics': {'key': 'bootDiagnostics', 'type': 'BootDiagnosticsInstanceView'}, + 'statuses': {'key': 'statuses', 'type': '[InstanceViewStatus]'}, + } + + def __init__(self, **kwargs): + super(VirtualMachineInstanceView, self).__init__(**kwargs) + self.platform_update_domain = kwargs.get('platform_update_domain', None) + self.platform_fault_domain = kwargs.get('platform_fault_domain', None) + self.rdp_thumb_print = kwargs.get('rdp_thumb_print', None) + self.vm_agent = kwargs.get('vm_agent', None) + self.maintenance_redeploy_status = kwargs.get('maintenance_redeploy_status', None) + self.disks = kwargs.get('disks', None) + self.extensions = kwargs.get('extensions', None) + self.boot_diagnostics = kwargs.get('boot_diagnostics', None) + self.statuses = kwargs.get('statuses', None) + + +class VirtualMachineScaleSet(Resource): + """Describes a Virtual Machine Scale Set. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource Id + :vartype id: str + :ivar name: Resource name + :vartype name: str + :ivar type: Resource type + :vartype type: str + :param location: Required. Resource location + :type location: str + :param tags: Resource tags + :type tags: dict[str, str] + :param sku: The virtual machine scale set sku. + :type sku: ~azure.mgmt.compute.v2017_03_30.models.Sku + :param plan: Specifies information about the marketplace image used to + create the virtual machine. This element is only used for marketplace + images. Before you can use a marketplace image from an API, you must + enable the image for programmatic use. In the Azure portal, find the + marketplace image that you want to use and then click **Want to deploy + programmatically, Get Started ->**. Enter any required information and + then click **Save**. + :type plan: ~azure.mgmt.compute.v2017_03_30.models.Plan + :param upgrade_policy: The upgrade policy. + :type upgrade_policy: ~azure.mgmt.compute.v2017_03_30.models.UpgradePolicy + :param virtual_machine_profile: The virtual machine profile. + :type virtual_machine_profile: + ~azure.mgmt.compute.v2017_03_30.models.VirtualMachineScaleSetVMProfile + :ivar provisioning_state: The provisioning state, which only appears in + the response. + :vartype provisioning_state: str + :param overprovision: Specifies whether the Virtual Machine Scale Set + should be overprovisioned. + :type overprovision: bool + :ivar unique_id: Specifies the ID which uniquely identifies a Virtual + Machine Scale Set. + :vartype unique_id: str + :param single_placement_group: When true this limits the scale set to a + single placement group, of max size 100 virtual machines. + :type single_placement_group: bool + :param identity: The identity of the virtual machine scale set, if + configured. + :type identity: + ~azure.mgmt.compute.v2017_03_30.models.VirtualMachineScaleSetIdentity + :param zones: The virtual machine scale set zones. + :type zones: list[str] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + 'provisioning_state': {'readonly': True}, + 'unique_id': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'sku': {'key': 'sku', 'type': 'Sku'}, + 'plan': {'key': 'plan', 'type': 'Plan'}, + 'upgrade_policy': {'key': 'properties.upgradePolicy', 'type': 'UpgradePolicy'}, + 'virtual_machine_profile': {'key': 'properties.virtualMachineProfile', 'type': 'VirtualMachineScaleSetVMProfile'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'overprovision': {'key': 'properties.overprovision', 'type': 'bool'}, + 'unique_id': {'key': 'properties.uniqueId', 'type': 'str'}, + 'single_placement_group': {'key': 'properties.singlePlacementGroup', 'type': 'bool'}, + 'identity': {'key': 'identity', 'type': 'VirtualMachineScaleSetIdentity'}, + 'zones': {'key': 'zones', 'type': '[str]'}, + } + + def __init__(self, **kwargs): + super(VirtualMachineScaleSet, self).__init__(**kwargs) + self.sku = kwargs.get('sku', None) + self.plan = kwargs.get('plan', None) + self.upgrade_policy = kwargs.get('upgrade_policy', None) + self.virtual_machine_profile = kwargs.get('virtual_machine_profile', None) + self.provisioning_state = None + self.overprovision = kwargs.get('overprovision', None) + self.unique_id = None + self.single_placement_group = kwargs.get('single_placement_group', None) + self.identity = kwargs.get('identity', None) + self.zones = kwargs.get('zones', None) + + +class VirtualMachineScaleSetDataDisk(Model): + """Describes a virtual machine scale set data disk. + + All required parameters must be populated in order to send to Azure. + + :param name: The disk name. + :type name: str + :param lun: Required. Specifies the logical unit number of the data disk. + This value is used to identify data disks within the VM and therefore must + be unique for each data disk attached to a VM. + :type lun: int + :param caching: Specifies the caching requirements.

    Possible + values are:

    **None**

    **ReadOnly**

    **ReadWrite** +

    Default: **None for Standard storage. ReadOnly for Premium + storage**. Possible values include: 'None', 'ReadOnly', 'ReadWrite' + :type caching: str or ~azure.mgmt.compute.v2017_03_30.models.CachingTypes + :param create_option: Required. The create option. Possible values + include: 'FromImage', 'Empty', 'Attach' + :type create_option: str or + ~azure.mgmt.compute.v2017_03_30.models.DiskCreateOptionTypes + :param disk_size_gb: Specifies the size of an empty data disk in + gigabytes. This element can be used to overwrite the size of the disk in a + virtual machine image.

    This value cannot be larger than 1023 GB + :type disk_size_gb: int + :param managed_disk: The managed disk parameters. + :type managed_disk: + ~azure.mgmt.compute.v2017_03_30.models.VirtualMachineScaleSetManagedDiskParameters + """ + + _validation = { + 'lun': {'required': True}, + 'create_option': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'lun': {'key': 'lun', 'type': 'int'}, + 'caching': {'key': 'caching', 'type': 'CachingTypes'}, + 'create_option': {'key': 'createOption', 'type': 'DiskCreateOptionTypes'}, + 'disk_size_gb': {'key': 'diskSizeGB', 'type': 'int'}, + 'managed_disk': {'key': 'managedDisk', 'type': 'VirtualMachineScaleSetManagedDiskParameters'}, + } + + def __init__(self, **kwargs): + super(VirtualMachineScaleSetDataDisk, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.lun = kwargs.get('lun', None) + self.caching = kwargs.get('caching', None) + self.create_option = kwargs.get('create_option', None) + self.disk_size_gb = kwargs.get('disk_size_gb', None) + self.managed_disk = kwargs.get('managed_disk', None) + + +class VirtualMachineScaleSetExtension(SubResourceReadOnly): + """Describes a Virtual Machine Scale Set Extension. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource Id + :vartype id: str + :param name: The name of the extension. + :type name: str + :param force_update_tag: If a value is provided and is different from the + previous value, the extension handler will be forced to update even if the + extension configuration has not changed. + :type force_update_tag: str + :param publisher: The name of the extension handler publisher. + :type publisher: str + :param type: Specifies the type of the extension; an example is + "CustomScriptExtension". + :type type: str + :param type_handler_version: Specifies the version of the script handler. + :type type_handler_version: str + :param auto_upgrade_minor_version: Indicates whether the extension should + use a newer minor version if one is available at deployment time. Once + deployed, however, the extension will not upgrade minor versions unless + redeployed, even with this property set to true. + :type auto_upgrade_minor_version: bool + :param settings: Json formatted public settings for the extension. + :type settings: object + :param protected_settings: The extension can contain either + protectedSettings or protectedSettingsFromKeyVault or no protected + settings at all. + :type protected_settings: object + :ivar provisioning_state: The provisioning state, which only appears in + the response. + :vartype provisioning_state: str + """ + + _validation = { + 'id': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'force_update_tag': {'key': 'properties.forceUpdateTag', 'type': 'str'}, + 'publisher': {'key': 'properties.publisher', 'type': 'str'}, + 'type': {'key': 'properties.type', 'type': 'str'}, + 'type_handler_version': {'key': 'properties.typeHandlerVersion', 'type': 'str'}, + 'auto_upgrade_minor_version': {'key': 'properties.autoUpgradeMinorVersion', 'type': 'bool'}, + 'settings': {'key': 'properties.settings', 'type': 'object'}, + 'protected_settings': {'key': 'properties.protectedSettings', 'type': 'object'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(VirtualMachineScaleSetExtension, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.force_update_tag = kwargs.get('force_update_tag', None) + self.publisher = kwargs.get('publisher', None) + self.type = kwargs.get('type', None) + self.type_handler_version = kwargs.get('type_handler_version', None) + self.auto_upgrade_minor_version = kwargs.get('auto_upgrade_minor_version', None) + self.settings = kwargs.get('settings', None) + self.protected_settings = kwargs.get('protected_settings', None) + self.provisioning_state = None + + +class VirtualMachineScaleSetExtensionProfile(Model): + """Describes a virtual machine scale set extension profile. + + :param extensions: The virtual machine scale set child extension + resources. + :type extensions: + list[~azure.mgmt.compute.v2017_03_30.models.VirtualMachineScaleSetExtension] + """ + + _attribute_map = { + 'extensions': {'key': 'extensions', 'type': '[VirtualMachineScaleSetExtension]'}, + } + + def __init__(self, **kwargs): + super(VirtualMachineScaleSetExtensionProfile, self).__init__(**kwargs) + self.extensions = kwargs.get('extensions', None) + + +class VirtualMachineScaleSetIdentity(Model): + """Identity for the virtual machine scale set. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar principal_id: The principal id of virtual machine scale set + identity. + :vartype principal_id: str + :ivar tenant_id: The tenant id associated with the virtual machine scale + set. + :vartype tenant_id: str + :param type: The type of identity used for the virtual machine scale set. + Currently, the only supported type is 'SystemAssigned', which implicitly + creates an identity. Possible values include: 'SystemAssigned' + :type type: str or + ~azure.mgmt.compute.v2017_03_30.models.ResourceIdentityType + """ + + _validation = { + 'principal_id': {'readonly': True}, + 'tenant_id': {'readonly': True}, + } + + _attribute_map = { + 'principal_id': {'key': 'principalId', 'type': 'str'}, + 'tenant_id': {'key': 'tenantId', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'ResourceIdentityType'}, + } + + def __init__(self, **kwargs): + super(VirtualMachineScaleSetIdentity, self).__init__(**kwargs) + self.principal_id = None + self.tenant_id = None + self.type = kwargs.get('type', None) + + +class VirtualMachineScaleSetInstanceView(Model): + """The instance view of a virtual machine scale set. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar virtual_machine: The instance view status summary for the virtual + machine scale set. + :vartype virtual_machine: + ~azure.mgmt.compute.v2017_03_30.models.VirtualMachineScaleSetInstanceViewStatusesSummary + :ivar extensions: The extensions information. + :vartype extensions: + list[~azure.mgmt.compute.v2017_03_30.models.VirtualMachineScaleSetVMExtensionsSummary] + :param statuses: The resource status information. + :type statuses: + list[~azure.mgmt.compute.v2017_03_30.models.InstanceViewStatus] + """ + + _validation = { + 'virtual_machine': {'readonly': True}, + 'extensions': {'readonly': True}, + } + + _attribute_map = { + 'virtual_machine': {'key': 'virtualMachine', 'type': 'VirtualMachineScaleSetInstanceViewStatusesSummary'}, + 'extensions': {'key': 'extensions', 'type': '[VirtualMachineScaleSetVMExtensionsSummary]'}, + 'statuses': {'key': 'statuses', 'type': '[InstanceViewStatus]'}, + } + + def __init__(self, **kwargs): + super(VirtualMachineScaleSetInstanceView, self).__init__(**kwargs) + self.virtual_machine = None + self.extensions = None + self.statuses = kwargs.get('statuses', None) + + +class VirtualMachineScaleSetInstanceViewStatusesSummary(Model): + """Instance view statuses summary for virtual machines of a virtual machine + scale set. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar statuses_summary: The extensions information. + :vartype statuses_summary: + list[~azure.mgmt.compute.v2017_03_30.models.VirtualMachineStatusCodeCount] + """ + + _validation = { + 'statuses_summary': {'readonly': True}, + } + + _attribute_map = { + 'statuses_summary': {'key': 'statusesSummary', 'type': '[VirtualMachineStatusCodeCount]'}, + } + + def __init__(self, **kwargs): + super(VirtualMachineScaleSetInstanceViewStatusesSummary, self).__init__(**kwargs) + self.statuses_summary = None + + +class VirtualMachineScaleSetIPConfiguration(SubResource): + """Describes a virtual machine scale set network profile's IP configuration. + + All required parameters must be populated in order to send to Azure. + + :param id: Resource Id + :type id: str + :param name: Required. The IP configuration name. + :type name: str + :param subnet: Specifies the identifier of the subnet. + :type subnet: ~azure.mgmt.compute.v2017_03_30.models.ApiEntityReference + :param primary: Specifies the primary network interface in case the + virtual machine has more than 1 network interface. + :type primary: bool + :param public_ip_address_configuration: The publicIPAddressConfiguration. + :type public_ip_address_configuration: + ~azure.mgmt.compute.v2017_03_30.models.VirtualMachineScaleSetPublicIPAddressConfiguration + :param private_ip_address_version: Available from Api-Version 2017-03-30 + onwards, it represents whether the specific ipconfiguration is IPv4 or + IPv6. Default is taken as IPv4. Possible values are: 'IPv4' and 'IPv6'. + Possible values include: 'IPv4', 'IPv6' + :type private_ip_address_version: str or + ~azure.mgmt.compute.v2017_03_30.models.IPVersion + :param application_gateway_backend_address_pools: Specifies an array of + references to backend address pools of application gateways. A scale set + can reference backend address pools of multiple application gateways. + Multiple scale sets cannot use the same application gateway. + :type application_gateway_backend_address_pools: + list[~azure.mgmt.compute.v2017_03_30.models.SubResource] + :param load_balancer_backend_address_pools: Specifies an array of + references to backend address pools of load balancers. A scale set can + reference backend address pools of one public and one internal load + balancer. Multiple scale sets cannot use the same load balancer. + :type load_balancer_backend_address_pools: + list[~azure.mgmt.compute.v2017_03_30.models.SubResource] + :param load_balancer_inbound_nat_pools: Specifies an array of references + to inbound Nat pools of the load balancers. A scale set can reference + inbound nat pools of one public and one internal load balancer. Multiple + scale sets cannot use the same load balancer + :type load_balancer_inbound_nat_pools: + list[~azure.mgmt.compute.v2017_03_30.models.SubResource] + """ + + _validation = { + 'name': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'subnet': {'key': 'properties.subnet', 'type': 'ApiEntityReference'}, + 'primary': {'key': 'properties.primary', 'type': 'bool'}, + 'public_ip_address_configuration': {'key': 'properties.publicIPAddressConfiguration', 'type': 'VirtualMachineScaleSetPublicIPAddressConfiguration'}, + 'private_ip_address_version': {'key': 'properties.privateIPAddressVersion', 'type': 'str'}, + 'application_gateway_backend_address_pools': {'key': 'properties.applicationGatewayBackendAddressPools', 'type': '[SubResource]'}, + 'load_balancer_backend_address_pools': {'key': 'properties.loadBalancerBackendAddressPools', 'type': '[SubResource]'}, + 'load_balancer_inbound_nat_pools': {'key': 'properties.loadBalancerInboundNatPools', 'type': '[SubResource]'}, + } + + def __init__(self, **kwargs): + super(VirtualMachineScaleSetIPConfiguration, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.subnet = kwargs.get('subnet', None) + self.primary = kwargs.get('primary', None) + self.public_ip_address_configuration = kwargs.get('public_ip_address_configuration', None) + self.private_ip_address_version = kwargs.get('private_ip_address_version', None) + self.application_gateway_backend_address_pools = kwargs.get('application_gateway_backend_address_pools', None) + self.load_balancer_backend_address_pools = kwargs.get('load_balancer_backend_address_pools', None) + self.load_balancer_inbound_nat_pools = kwargs.get('load_balancer_inbound_nat_pools', None) + + +class VirtualMachineScaleSetManagedDiskParameters(Model): + """Describes the parameters of a ScaleSet managed disk. + + :param storage_account_type: Specifies the storage account type for the + managed disk. Possible values are: Standard_LRS or Premium_LRS. Possible + values include: 'Standard_LRS', 'Premium_LRS' + :type storage_account_type: str or + ~azure.mgmt.compute.v2017_03_30.models.StorageAccountTypes + """ + + _attribute_map = { + 'storage_account_type': {'key': 'storageAccountType', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(VirtualMachineScaleSetManagedDiskParameters, self).__init__(**kwargs) + self.storage_account_type = kwargs.get('storage_account_type', None) + + +class VirtualMachineScaleSetNetworkConfiguration(SubResource): + """Describes a virtual machine scale set network profile's network + configurations. + + All required parameters must be populated in order to send to Azure. + + :param id: Resource Id + :type id: str + :param name: Required. The network configuration name. + :type name: str + :param primary: Specifies the primary network interface in case the + virtual machine has more than 1 network interface. + :type primary: bool + :param enable_accelerated_networking: Specifies whether the network + interface is accelerated networking-enabled. + :type enable_accelerated_networking: bool + :param network_security_group: The network security group. + :type network_security_group: + ~azure.mgmt.compute.v2017_03_30.models.SubResource + :param dns_settings: The dns settings to be applied on the network + interfaces. + :type dns_settings: + ~azure.mgmt.compute.v2017_03_30.models.VirtualMachineScaleSetNetworkConfigurationDnsSettings + :param ip_configurations: Required. Specifies the IP configurations of the + network interface. + :type ip_configurations: + list[~azure.mgmt.compute.v2017_03_30.models.VirtualMachineScaleSetIPConfiguration] + """ + + _validation = { + 'name': {'required': True}, + 'ip_configurations': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'primary': {'key': 'properties.primary', 'type': 'bool'}, + 'enable_accelerated_networking': {'key': 'properties.enableAcceleratedNetworking', 'type': 'bool'}, + 'network_security_group': {'key': 'properties.networkSecurityGroup', 'type': 'SubResource'}, + 'dns_settings': {'key': 'properties.dnsSettings', 'type': 'VirtualMachineScaleSetNetworkConfigurationDnsSettings'}, + 'ip_configurations': {'key': 'properties.ipConfigurations', 'type': '[VirtualMachineScaleSetIPConfiguration]'}, + } + + def __init__(self, **kwargs): + super(VirtualMachineScaleSetNetworkConfiguration, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.primary = kwargs.get('primary', None) + self.enable_accelerated_networking = kwargs.get('enable_accelerated_networking', None) + self.network_security_group = kwargs.get('network_security_group', None) + self.dns_settings = kwargs.get('dns_settings', None) + self.ip_configurations = kwargs.get('ip_configurations', None) + + +class VirtualMachineScaleSetNetworkConfigurationDnsSettings(Model): + """Describes a virtual machines scale sets network configuration's DNS + settings. + + :param dns_servers: List of DNS servers IP addresses + :type dns_servers: list[str] + """ + + _attribute_map = { + 'dns_servers': {'key': 'dnsServers', 'type': '[str]'}, + } + + def __init__(self, **kwargs): + super(VirtualMachineScaleSetNetworkConfigurationDnsSettings, self).__init__(**kwargs) + self.dns_servers = kwargs.get('dns_servers', None) + + +class VirtualMachineScaleSetNetworkProfile(Model): + """Describes a virtual machine scale set network profile. + + :param health_probe: A reference to a load balancer probe used to + determine the health of an instance in the virtual machine scale set. The + reference will be in the form: + '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/probes/{probeName}'. + :type health_probe: + ~azure.mgmt.compute.v2017_03_30.models.ApiEntityReference + :param network_interface_configurations: The list of network + configurations. + :type network_interface_configurations: + list[~azure.mgmt.compute.v2017_03_30.models.VirtualMachineScaleSetNetworkConfiguration] + """ + + _attribute_map = { + 'health_probe': {'key': 'healthProbe', 'type': 'ApiEntityReference'}, + 'network_interface_configurations': {'key': 'networkInterfaceConfigurations', 'type': '[VirtualMachineScaleSetNetworkConfiguration]'}, + } + + def __init__(self, **kwargs): + super(VirtualMachineScaleSetNetworkProfile, self).__init__(**kwargs) + self.health_probe = kwargs.get('health_probe', None) + self.network_interface_configurations = kwargs.get('network_interface_configurations', None) + + +class VirtualMachineScaleSetOSDisk(Model): + """Describes a virtual machine scale set operating system disk. + + All required parameters must be populated in order to send to Azure. + + :param name: The disk name. + :type name: str + :param caching: Specifies the caching requirements.

    Possible + values are:

    **None**

    **ReadOnly**

    **ReadWrite** +

    Default: **None for Standard storage. ReadOnly for Premium + storage**. Possible values include: 'None', 'ReadOnly', 'ReadWrite' + :type caching: str or ~azure.mgmt.compute.v2017_03_30.models.CachingTypes + :param create_option: Required. Specifies how the virtual machines in the + scale set should be created.

    The only allowed value is: + **FromImage** \\u2013 This value is used when you are using an image to + create the virtual machine. If you are using a platform image, you also + use the imageReference element described above. If you are using a + marketplace image, you also use the plan element previously described. + Possible values include: 'FromImage', 'Empty', 'Attach' + :type create_option: str or + ~azure.mgmt.compute.v2017_03_30.models.DiskCreateOptionTypes + :param os_type: This property allows you to specify the type of the OS + that is included in the disk if creating a VM from user-image or a + specialized VHD.

    Possible values are:

    **Windows** +

    **Linux**. Possible values include: 'Windows', 'Linux' + :type os_type: str or + ~azure.mgmt.compute.v2017_03_30.models.OperatingSystemTypes + :param image: Specifies information about the unmanaged user image to base + the scale set on. + :type image: ~azure.mgmt.compute.v2017_03_30.models.VirtualHardDisk + :param vhd_containers: Specifies the container urls that are used to store + operating system disks for the scale set. + :type vhd_containers: list[str] + :param managed_disk: The managed disk parameters. + :type managed_disk: + ~azure.mgmt.compute.v2017_03_30.models.VirtualMachineScaleSetManagedDiskParameters + """ + + _validation = { + 'create_option': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'caching': {'key': 'caching', 'type': 'CachingTypes'}, + 'create_option': {'key': 'createOption', 'type': 'DiskCreateOptionTypes'}, + 'os_type': {'key': 'osType', 'type': 'OperatingSystemTypes'}, + 'image': {'key': 'image', 'type': 'VirtualHardDisk'}, + 'vhd_containers': {'key': 'vhdContainers', 'type': '[str]'}, + 'managed_disk': {'key': 'managedDisk', 'type': 'VirtualMachineScaleSetManagedDiskParameters'}, + } + + def __init__(self, **kwargs): + super(VirtualMachineScaleSetOSDisk, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.caching = kwargs.get('caching', None) + self.create_option = kwargs.get('create_option', None) + self.os_type = kwargs.get('os_type', None) + self.image = kwargs.get('image', None) + self.vhd_containers = kwargs.get('vhd_containers', None) + self.managed_disk = kwargs.get('managed_disk', None) + + +class VirtualMachineScaleSetOSProfile(Model): + """Describes a virtual machine scale set OS profile. + + :param computer_name_prefix: Specifies the computer name prefix for all of + the virtual machines in the scale set. Computer name prefixes must be 1 to + 15 characters long. + :type computer_name_prefix: str + :param admin_username: Specifies the name of the administrator account. +

    **Windows-only restriction:** Cannot end in "."

    + **Disallowed values:** "administrator", "admin", "user", "user1", "test", + "user2", "test1", "user3", "admin1", "1", "123", "a", "actuser", "adm", + "admin2", "aspnet", "backup", "console", "david", "guest", "john", + "owner", "root", "server", "sql", "support", "support_388945a0", "sys", + "test2", "test3", "user4", "user5".

    **Minimum-length (Linux):** 1 + character

    **Max-length (Linux):** 64 characters

    + **Max-length (Windows):** 20 characters

  • For root access to + the Linux VM, see [Using root privileges on Linux virtual machines in + Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-use-root-privileges?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json)
  • + For a list of built-in system users on Linux that should not be used in + this field, see [Selecting User Names for Linux on + Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-usernames?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json) + :type admin_username: str + :param admin_password: Specifies the password of the administrator + account.

    **Minimum-length (Windows):** 8 characters

    + **Minimum-length (Linux):** 6 characters

    **Max-length + (Windows):** 123 characters

    **Max-length (Linux):** 72 characters +

    **Complexity requirements:** 3 out of 4 conditions below need to + be fulfilled
    Has lower characters
    Has upper characters
    Has a + digit
    Has a special character (Regex match [\\W_])

    + **Disallowed values:** "abc@123", "P@$$w0rd", "P@ssw0rd", "P@ssword123", + "Pa$$word", "pass@word1", "Password!", "Password1", "Password22", + "iloveyou!"

    For resetting the password, see [How to reset the + Remote Desktop service or its login password in a Windows + VM](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-reset-rdp?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json) +

    For resetting root password, see [Manage users, SSH, and check or + repair disks on Azure Linux VMs using the VMAccess + Extension](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-using-vmaccess-extension?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json#reset-root-password) + :type admin_password: str + :param custom_data: Specifies a base-64 encoded string of custom data. The + base-64 encoded string is decoded to a binary array that is saved as a + file on the Virtual Machine. The maximum length of the binary array is + 65535 bytes.

    For using cloud-init for your VM, see [Using + cloud-init to customize a Linux VM during + creation](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-using-cloud-init?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json) + :type custom_data: str + :param windows_configuration: Specifies Windows operating system settings + on the virtual machine. + :type windows_configuration: + ~azure.mgmt.compute.v2017_03_30.models.WindowsConfiguration + :param linux_configuration: Specifies the Linux operating system settings + on the virtual machine.

    For a list of supported Linux + distributions, see [Linux on Azure-Endorsed + Distributions](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-endorsed-distros?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json) +

    For running non-endorsed distributions, see [Information for + Non-Endorsed + Distributions](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-create-upload-generic?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json). + :type linux_configuration: + ~azure.mgmt.compute.v2017_03_30.models.LinuxConfiguration + :param secrets: Specifies set of certificates that should be installed + onto the virtual machines in the scale set. + :type secrets: + list[~azure.mgmt.compute.v2017_03_30.models.VaultSecretGroup] + """ + + _attribute_map = { + 'computer_name_prefix': {'key': 'computerNamePrefix', 'type': 'str'}, + 'admin_username': {'key': 'adminUsername', 'type': 'str'}, + 'admin_password': {'key': 'adminPassword', 'type': 'str'}, + 'custom_data': {'key': 'customData', 'type': 'str'}, + 'windows_configuration': {'key': 'windowsConfiguration', 'type': 'WindowsConfiguration'}, + 'linux_configuration': {'key': 'linuxConfiguration', 'type': 'LinuxConfiguration'}, + 'secrets': {'key': 'secrets', 'type': '[VaultSecretGroup]'}, + } + + def __init__(self, **kwargs): + super(VirtualMachineScaleSetOSProfile, self).__init__(**kwargs) + self.computer_name_prefix = kwargs.get('computer_name_prefix', None) + self.admin_username = kwargs.get('admin_username', None) + self.admin_password = kwargs.get('admin_password', None) + self.custom_data = kwargs.get('custom_data', None) + self.windows_configuration = kwargs.get('windows_configuration', None) + self.linux_configuration = kwargs.get('linux_configuration', None) + self.secrets = kwargs.get('secrets', None) + + +class VirtualMachineScaleSetPublicIPAddressConfiguration(Model): + """Describes a virtual machines scale set IP Configuration's PublicIPAddress + configuration. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. The publicIP address configuration name. + :type name: str + :param idle_timeout_in_minutes: The idle timeout of the public IP address. + :type idle_timeout_in_minutes: int + :param dns_settings: The dns settings to be applied on the publicIP + addresses . + :type dns_settings: + ~azure.mgmt.compute.v2017_03_30.models.VirtualMachineScaleSetPublicIPAddressConfigurationDnsSettings + """ + + _validation = { + 'name': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'idle_timeout_in_minutes': {'key': 'properties.idleTimeoutInMinutes', 'type': 'int'}, + 'dns_settings': {'key': 'properties.dnsSettings', 'type': 'VirtualMachineScaleSetPublicIPAddressConfigurationDnsSettings'}, + } + + def __init__(self, **kwargs): + super(VirtualMachineScaleSetPublicIPAddressConfiguration, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.idle_timeout_in_minutes = kwargs.get('idle_timeout_in_minutes', None) + self.dns_settings = kwargs.get('dns_settings', None) + + +class VirtualMachineScaleSetPublicIPAddressConfigurationDnsSettings(Model): + """Describes a virtual machines scale sets network configuration's DNS + settings. + + All required parameters must be populated in order to send to Azure. + + :param domain_name_label: Required. The Domain name label.The + concatenation of the domain name label and vm index will be the domain + name labels of the PublicIPAddress resources that will be created + :type domain_name_label: str + """ + + _validation = { + 'domain_name_label': {'required': True}, + } + + _attribute_map = { + 'domain_name_label': {'key': 'domainNameLabel', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(VirtualMachineScaleSetPublicIPAddressConfigurationDnsSettings, self).__init__(**kwargs) + self.domain_name_label = kwargs.get('domain_name_label', None) + + +class VirtualMachineScaleSetSku(Model): + """Describes an available virtual machine scale set sku. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar resource_type: The type of resource the sku applies to. + :vartype resource_type: str + :ivar sku: The Sku. + :vartype sku: ~azure.mgmt.compute.v2017_03_30.models.Sku + :ivar capacity: Specifies the number of virtual machines in the scale set. + :vartype capacity: + ~azure.mgmt.compute.v2017_03_30.models.VirtualMachineScaleSetSkuCapacity + """ + + _validation = { + 'resource_type': {'readonly': True}, + 'sku': {'readonly': True}, + 'capacity': {'readonly': True}, + } + + _attribute_map = { + 'resource_type': {'key': 'resourceType', 'type': 'str'}, + 'sku': {'key': 'sku', 'type': 'Sku'}, + 'capacity': {'key': 'capacity', 'type': 'VirtualMachineScaleSetSkuCapacity'}, + } + + def __init__(self, **kwargs): + super(VirtualMachineScaleSetSku, self).__init__(**kwargs) + self.resource_type = None + self.sku = None + self.capacity = None + + +class VirtualMachineScaleSetSkuCapacity(Model): + """Describes scaling information of a sku. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar minimum: The minimum capacity. + :vartype minimum: long + :ivar maximum: The maximum capacity that can be set. + :vartype maximum: long + :ivar default_capacity: The default capacity. + :vartype default_capacity: long + :ivar scale_type: The scale type applicable to the sku. Possible values + include: 'Automatic', 'None' + :vartype scale_type: str or + ~azure.mgmt.compute.v2017_03_30.models.VirtualMachineScaleSetSkuScaleType + """ + + _validation = { + 'minimum': {'readonly': True}, + 'maximum': {'readonly': True}, + 'default_capacity': {'readonly': True}, + 'scale_type': {'readonly': True}, + } + + _attribute_map = { + 'minimum': {'key': 'minimum', 'type': 'long'}, + 'maximum': {'key': 'maximum', 'type': 'long'}, + 'default_capacity': {'key': 'defaultCapacity', 'type': 'long'}, + 'scale_type': {'key': 'scaleType', 'type': 'VirtualMachineScaleSetSkuScaleType'}, + } + + def __init__(self, **kwargs): + super(VirtualMachineScaleSetSkuCapacity, self).__init__(**kwargs) + self.minimum = None + self.maximum = None + self.default_capacity = None + self.scale_type = None + + +class VirtualMachineScaleSetStorageProfile(Model): + """Describes a virtual machine scale set storage profile. + + :param image_reference: Specifies information about the image to use. You + can specify information about platform images, marketplace images, or + virtual machine images. This element is required when you want to use a + platform image, marketplace image, or virtual machine image, but is not + used in other creation operations. + :type image_reference: + ~azure.mgmt.compute.v2017_03_30.models.ImageReference + :param os_disk: Specifies information about the operating system disk used + by the virtual machines in the scale set.

    For more information + about disks, see [About disks and VHDs for Azure virtual + machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-about-disks-vhds?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). + :type os_disk: + ~azure.mgmt.compute.v2017_03_30.models.VirtualMachineScaleSetOSDisk + :param data_disks: Specifies the parameters that are used to add data + disks to the virtual machines in the scale set.

    For more + information about disks, see [About disks and VHDs for Azure virtual + machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-about-disks-vhds?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). + :type data_disks: + list[~azure.mgmt.compute.v2017_03_30.models.VirtualMachineScaleSetDataDisk] + """ + + _attribute_map = { + 'image_reference': {'key': 'imageReference', 'type': 'ImageReference'}, + 'os_disk': {'key': 'osDisk', 'type': 'VirtualMachineScaleSetOSDisk'}, + 'data_disks': {'key': 'dataDisks', 'type': '[VirtualMachineScaleSetDataDisk]'}, + } + + def __init__(self, **kwargs): + super(VirtualMachineScaleSetStorageProfile, self).__init__(**kwargs) + self.image_reference = kwargs.get('image_reference', None) + self.os_disk = kwargs.get('os_disk', None) + self.data_disks = kwargs.get('data_disks', None) + + +class VirtualMachineScaleSetUpdate(UpdateResource): + """Describes a Virtual Machine Scale Set. + + :param tags: Resource tags + :type tags: dict[str, str] + :param sku: The virtual machine scale set sku. + :type sku: ~azure.mgmt.compute.v2017_03_30.models.Sku + :param plan: The purchase plan when deploying a virtual machine scale set + from VM Marketplace images. + :type plan: ~azure.mgmt.compute.v2017_03_30.models.Plan + :param upgrade_policy: The upgrade policy. + :type upgrade_policy: ~azure.mgmt.compute.v2017_03_30.models.UpgradePolicy + :param virtual_machine_profile: The virtual machine profile. + :type virtual_machine_profile: + ~azure.mgmt.compute.v2017_03_30.models.VirtualMachineScaleSetUpdateVMProfile + :param overprovision: Specifies whether the Virtual Machine Scale Set + should be overprovisioned. + :type overprovision: bool + :param single_placement_group: When true this limits the scale set to a + single placement group, of max size 100 virtual machines. + :type single_placement_group: bool + :param identity: The identity of the virtual machine scale set, if + configured. + :type identity: + ~azure.mgmt.compute.v2017_03_30.models.VirtualMachineScaleSetIdentity + """ + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + 'sku': {'key': 'sku', 'type': 'Sku'}, + 'plan': {'key': 'plan', 'type': 'Plan'}, + 'upgrade_policy': {'key': 'properties.upgradePolicy', 'type': 'UpgradePolicy'}, + 'virtual_machine_profile': {'key': 'properties.virtualMachineProfile', 'type': 'VirtualMachineScaleSetUpdateVMProfile'}, + 'overprovision': {'key': 'properties.overprovision', 'type': 'bool'}, + 'single_placement_group': {'key': 'properties.singlePlacementGroup', 'type': 'bool'}, + 'identity': {'key': 'identity', 'type': 'VirtualMachineScaleSetIdentity'}, + } + + def __init__(self, **kwargs): + super(VirtualMachineScaleSetUpdate, self).__init__(**kwargs) + self.sku = kwargs.get('sku', None) + self.plan = kwargs.get('plan', None) + self.upgrade_policy = kwargs.get('upgrade_policy', None) + self.virtual_machine_profile = kwargs.get('virtual_machine_profile', None) + self.overprovision = kwargs.get('overprovision', None) + self.single_placement_group = kwargs.get('single_placement_group', None) + self.identity = kwargs.get('identity', None) + + +class VirtualMachineScaleSetUpdateIPConfiguration(SubResource): + """Describes a virtual machine scale set network profile's IP configuration. + + :param id: Resource Id + :type id: str + :param name: The IP configuration name. + :type name: str + :param subnet: The subnet. + :type subnet: ~azure.mgmt.compute.v2017_03_30.models.ApiEntityReference + :param primary: Specifies the primary IP Configuration in case the network + interface has more than one IP Configuration. + :type primary: bool + :param public_ip_address_configuration: The publicIPAddressConfiguration. + :type public_ip_address_configuration: + ~azure.mgmt.compute.v2017_03_30.models.VirtualMachineScaleSetUpdatePublicIPAddressConfiguration + :param private_ip_address_version: Available from Api-Version 2017-03-30 + onwards, it represents whether the specific ipconfiguration is IPv4 or + IPv6. Default is taken as IPv4. Possible values are: 'IPv4' and 'IPv6'. + Possible values include: 'IPv4', 'IPv6' + :type private_ip_address_version: str or + ~azure.mgmt.compute.v2017_03_30.models.IPVersion + :param application_gateway_backend_address_pools: The application gateway + backend address pools. + :type application_gateway_backend_address_pools: + list[~azure.mgmt.compute.v2017_03_30.models.SubResource] + :param load_balancer_backend_address_pools: The load balancer backend + address pools. + :type load_balancer_backend_address_pools: + list[~azure.mgmt.compute.v2017_03_30.models.SubResource] + :param load_balancer_inbound_nat_pools: The load balancer inbound nat + pools. + :type load_balancer_inbound_nat_pools: + list[~azure.mgmt.compute.v2017_03_30.models.SubResource] + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'subnet': {'key': 'properties.subnet', 'type': 'ApiEntityReference'}, + 'primary': {'key': 'properties.primary', 'type': 'bool'}, + 'public_ip_address_configuration': {'key': 'properties.publicIPAddressConfiguration', 'type': 'VirtualMachineScaleSetUpdatePublicIPAddressConfiguration'}, + 'private_ip_address_version': {'key': 'properties.privateIPAddressVersion', 'type': 'str'}, + 'application_gateway_backend_address_pools': {'key': 'properties.applicationGatewayBackendAddressPools', 'type': '[SubResource]'}, + 'load_balancer_backend_address_pools': {'key': 'properties.loadBalancerBackendAddressPools', 'type': '[SubResource]'}, + 'load_balancer_inbound_nat_pools': {'key': 'properties.loadBalancerInboundNatPools', 'type': '[SubResource]'}, + } + + def __init__(self, **kwargs): + super(VirtualMachineScaleSetUpdateIPConfiguration, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.subnet = kwargs.get('subnet', None) + self.primary = kwargs.get('primary', None) + self.public_ip_address_configuration = kwargs.get('public_ip_address_configuration', None) + self.private_ip_address_version = kwargs.get('private_ip_address_version', None) + self.application_gateway_backend_address_pools = kwargs.get('application_gateway_backend_address_pools', None) + self.load_balancer_backend_address_pools = kwargs.get('load_balancer_backend_address_pools', None) + self.load_balancer_inbound_nat_pools = kwargs.get('load_balancer_inbound_nat_pools', None) + + +class VirtualMachineScaleSetUpdateNetworkConfiguration(SubResource): + """Describes a virtual machine scale set network profile's network + configurations. + + :param id: Resource Id + :type id: str + :param name: The network configuration name. + :type name: str + :param primary: Whether this is a primary NIC on a virtual machine. + :type primary: bool + :param enable_accelerated_networking: Specifies whether the network + interface is accelerated networking-enabled. + :type enable_accelerated_networking: bool + :param network_security_group: The network security group. + :type network_security_group: + ~azure.mgmt.compute.v2017_03_30.models.SubResource + :param dns_settings: The dns settings to be applied on the network + interfaces. + :type dns_settings: + ~azure.mgmt.compute.v2017_03_30.models.VirtualMachineScaleSetNetworkConfigurationDnsSettings + :param ip_configurations: The virtual machine scale set IP Configuration. + :type ip_configurations: + list[~azure.mgmt.compute.v2017_03_30.models.VirtualMachineScaleSetUpdateIPConfiguration] + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'primary': {'key': 'properties.primary', 'type': 'bool'}, + 'enable_accelerated_networking': {'key': 'properties.enableAcceleratedNetworking', 'type': 'bool'}, + 'network_security_group': {'key': 'properties.networkSecurityGroup', 'type': 'SubResource'}, + 'dns_settings': {'key': 'properties.dnsSettings', 'type': 'VirtualMachineScaleSetNetworkConfigurationDnsSettings'}, + 'ip_configurations': {'key': 'properties.ipConfigurations', 'type': '[VirtualMachineScaleSetUpdateIPConfiguration]'}, + } + + def __init__(self, **kwargs): + super(VirtualMachineScaleSetUpdateNetworkConfiguration, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.primary = kwargs.get('primary', None) + self.enable_accelerated_networking = kwargs.get('enable_accelerated_networking', None) + self.network_security_group = kwargs.get('network_security_group', None) + self.dns_settings = kwargs.get('dns_settings', None) + self.ip_configurations = kwargs.get('ip_configurations', None) + + +class VirtualMachineScaleSetUpdateNetworkProfile(Model): + """Describes a virtual machine scale set network profile. + + :param network_interface_configurations: The list of network + configurations. + :type network_interface_configurations: + list[~azure.mgmt.compute.v2017_03_30.models.VirtualMachineScaleSetUpdateNetworkConfiguration] + """ + + _attribute_map = { + 'network_interface_configurations': {'key': 'networkInterfaceConfigurations', 'type': '[VirtualMachineScaleSetUpdateNetworkConfiguration]'}, + } + + def __init__(self, **kwargs): + super(VirtualMachineScaleSetUpdateNetworkProfile, self).__init__(**kwargs) + self.network_interface_configurations = kwargs.get('network_interface_configurations', None) + + +class VirtualMachineScaleSetUpdateOSDisk(Model): + """Describes virtual machine scale set operating system disk Update Object. + This should be used for Updating VMSS OS Disk. + + :param caching: The caching type. Possible values include: 'None', + 'ReadOnly', 'ReadWrite' + :type caching: str or ~azure.mgmt.compute.v2017_03_30.models.CachingTypes + :param image: The Source User Image VirtualHardDisk. This VirtualHardDisk + will be copied before using it to attach to the Virtual Machine. If + SourceImage is provided, the destination VirtualHardDisk should not exist. + :type image: ~azure.mgmt.compute.v2017_03_30.models.VirtualHardDisk + :param vhd_containers: The list of virtual hard disk container uris. + :type vhd_containers: list[str] + :param managed_disk: The managed disk parameters. + :type managed_disk: + ~azure.mgmt.compute.v2017_03_30.models.VirtualMachineScaleSetManagedDiskParameters + """ + + _attribute_map = { + 'caching': {'key': 'caching', 'type': 'CachingTypes'}, + 'image': {'key': 'image', 'type': 'VirtualHardDisk'}, + 'vhd_containers': {'key': 'vhdContainers', 'type': '[str]'}, + 'managed_disk': {'key': 'managedDisk', 'type': 'VirtualMachineScaleSetManagedDiskParameters'}, + } + + def __init__(self, **kwargs): + super(VirtualMachineScaleSetUpdateOSDisk, self).__init__(**kwargs) + self.caching = kwargs.get('caching', None) + self.image = kwargs.get('image', None) + self.vhd_containers = kwargs.get('vhd_containers', None) + self.managed_disk = kwargs.get('managed_disk', None) + + +class VirtualMachineScaleSetUpdateOSProfile(Model): + """Describes a virtual machine scale set OS profile. + + :param custom_data: A base-64 encoded string of custom data. + :type custom_data: str + :param windows_configuration: The Windows Configuration of the OS profile. + :type windows_configuration: + ~azure.mgmt.compute.v2017_03_30.models.WindowsConfiguration + :param linux_configuration: The Linux Configuration of the OS profile. + :type linux_configuration: + ~azure.mgmt.compute.v2017_03_30.models.LinuxConfiguration + :param secrets: The List of certificates for addition to the VM. + :type secrets: + list[~azure.mgmt.compute.v2017_03_30.models.VaultSecretGroup] + """ + + _attribute_map = { + 'custom_data': {'key': 'customData', 'type': 'str'}, + 'windows_configuration': {'key': 'windowsConfiguration', 'type': 'WindowsConfiguration'}, + 'linux_configuration': {'key': 'linuxConfiguration', 'type': 'LinuxConfiguration'}, + 'secrets': {'key': 'secrets', 'type': '[VaultSecretGroup]'}, + } + + def __init__(self, **kwargs): + super(VirtualMachineScaleSetUpdateOSProfile, self).__init__(**kwargs) + self.custom_data = kwargs.get('custom_data', None) + self.windows_configuration = kwargs.get('windows_configuration', None) + self.linux_configuration = kwargs.get('linux_configuration', None) + self.secrets = kwargs.get('secrets', None) + + +class VirtualMachineScaleSetUpdatePublicIPAddressConfiguration(Model): + """Describes a virtual machines scale set IP Configuration's PublicIPAddress + configuration. + + :param name: The publicIP address configuration name. + :type name: str + :param idle_timeout_in_minutes: The idle timeout of the public IP address. + :type idle_timeout_in_minutes: int + :param dns_settings: The dns settings to be applied on the publicIP + addresses . + :type dns_settings: + ~azure.mgmt.compute.v2017_03_30.models.VirtualMachineScaleSetPublicIPAddressConfigurationDnsSettings + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'idle_timeout_in_minutes': {'key': 'properties.idleTimeoutInMinutes', 'type': 'int'}, + 'dns_settings': {'key': 'properties.dnsSettings', 'type': 'VirtualMachineScaleSetPublicIPAddressConfigurationDnsSettings'}, + } + + def __init__(self, **kwargs): + super(VirtualMachineScaleSetUpdatePublicIPAddressConfiguration, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.idle_timeout_in_minutes = kwargs.get('idle_timeout_in_minutes', None) + self.dns_settings = kwargs.get('dns_settings', None) + + +class VirtualMachineScaleSetUpdateStorageProfile(Model): + """Describes a virtual machine scale set storage profile. + + :param image_reference: The image reference. + :type image_reference: + ~azure.mgmt.compute.v2017_03_30.models.ImageReference + :param os_disk: The OS disk. + :type os_disk: + ~azure.mgmt.compute.v2017_03_30.models.VirtualMachineScaleSetUpdateOSDisk + :param data_disks: The data disks. + :type data_disks: + list[~azure.mgmt.compute.v2017_03_30.models.VirtualMachineScaleSetDataDisk] + """ + + _attribute_map = { + 'image_reference': {'key': 'imageReference', 'type': 'ImageReference'}, + 'os_disk': {'key': 'osDisk', 'type': 'VirtualMachineScaleSetUpdateOSDisk'}, + 'data_disks': {'key': 'dataDisks', 'type': '[VirtualMachineScaleSetDataDisk]'}, + } + + def __init__(self, **kwargs): + super(VirtualMachineScaleSetUpdateStorageProfile, self).__init__(**kwargs) + self.image_reference = kwargs.get('image_reference', None) + self.os_disk = kwargs.get('os_disk', None) + self.data_disks = kwargs.get('data_disks', None) + + +class VirtualMachineScaleSetUpdateVMProfile(Model): + """Describes a virtual machine scale set virtual machine profile. + + :param os_profile: The virtual machine scale set OS profile. + :type os_profile: + ~azure.mgmt.compute.v2017_03_30.models.VirtualMachineScaleSetUpdateOSProfile + :param storage_profile: The virtual machine scale set storage profile. + :type storage_profile: + ~azure.mgmt.compute.v2017_03_30.models.VirtualMachineScaleSetUpdateStorageProfile + :param network_profile: The virtual machine scale set network profile. + :type network_profile: + ~azure.mgmt.compute.v2017_03_30.models.VirtualMachineScaleSetUpdateNetworkProfile + :param diagnostics_profile: The virtual machine scale set diagnostics + profile. + :type diagnostics_profile: + ~azure.mgmt.compute.v2017_03_30.models.DiagnosticsProfile + :param extension_profile: The virtual machine scale set extension profile. + :type extension_profile: + ~azure.mgmt.compute.v2017_03_30.models.VirtualMachineScaleSetExtensionProfile + :param license_type: The license type, which is for bring your own license + scenario. + :type license_type: str + """ + + _attribute_map = { + 'os_profile': {'key': 'osProfile', 'type': 'VirtualMachineScaleSetUpdateOSProfile'}, + 'storage_profile': {'key': 'storageProfile', 'type': 'VirtualMachineScaleSetUpdateStorageProfile'}, + 'network_profile': {'key': 'networkProfile', 'type': 'VirtualMachineScaleSetUpdateNetworkProfile'}, + 'diagnostics_profile': {'key': 'diagnosticsProfile', 'type': 'DiagnosticsProfile'}, + 'extension_profile': {'key': 'extensionProfile', 'type': 'VirtualMachineScaleSetExtensionProfile'}, + 'license_type': {'key': 'licenseType', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(VirtualMachineScaleSetUpdateVMProfile, self).__init__(**kwargs) + self.os_profile = kwargs.get('os_profile', None) + self.storage_profile = kwargs.get('storage_profile', None) + self.network_profile = kwargs.get('network_profile', None) + self.diagnostics_profile = kwargs.get('diagnostics_profile', None) + self.extension_profile = kwargs.get('extension_profile', None) + self.license_type = kwargs.get('license_type', None) + + +class VirtualMachineScaleSetVM(Resource): + """Describes a virtual machine scale set virtual machine. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource Id + :vartype id: str + :ivar name: Resource name + :vartype name: str + :ivar type: Resource type + :vartype type: str + :param location: Required. Resource location + :type location: str + :param tags: Resource tags + :type tags: dict[str, str] + :ivar instance_id: The virtual machine instance ID. + :vartype instance_id: str + :ivar sku: The virtual machine SKU. + :vartype sku: ~azure.mgmt.compute.v2017_03_30.models.Sku + :ivar latest_model_applied: Specifies whether the latest model has been + applied to the virtual machine. + :vartype latest_model_applied: bool + :ivar vm_id: Azure VM unique ID. + :vartype vm_id: str + :ivar instance_view: The virtual machine instance view. + :vartype instance_view: + ~azure.mgmt.compute.v2017_03_30.models.VirtualMachineScaleSetVMInstanceView + :param hardware_profile: Specifies the hardware settings for the virtual + machine. + :type hardware_profile: + ~azure.mgmt.compute.v2017_03_30.models.HardwareProfile + :param storage_profile: Specifies the storage settings for the virtual + machine disks. + :type storage_profile: + ~azure.mgmt.compute.v2017_03_30.models.StorageProfile + :param os_profile: Specifies the operating system settings for the virtual + machine. + :type os_profile: ~azure.mgmt.compute.v2017_03_30.models.OSProfile + :param network_profile: Specifies the network interfaces of the virtual + machine. + :type network_profile: + ~azure.mgmt.compute.v2017_03_30.models.NetworkProfile + :param diagnostics_profile: Specifies the boot diagnostic settings state. +

    Minimum api-version: 2015-06-15. + :type diagnostics_profile: + ~azure.mgmt.compute.v2017_03_30.models.DiagnosticsProfile + :param availability_set: Specifies information about the availability set + that the virtual machine should be assigned to. Virtual machines specified + in the same availability set are allocated to different nodes to maximize + availability. For more information about availability sets, see [Manage + the availability of virtual + machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-manage-availability?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). +

    For more information on Azure planned maintenance, see [Planned + maintenance for virtual machines in + Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-planned-maintenance?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json) +

    Currently, a VM can only be added to availability set at creation + time. An existing VM cannot be added to an availability set. + :type availability_set: ~azure.mgmt.compute.v2017_03_30.models.SubResource + :ivar provisioning_state: The provisioning state, which only appears in + the response. + :vartype provisioning_state: str + :param license_type: Specifies that the image or disk that is being used + was licensed on-premises. This element is only used for images that + contain the Windows Server operating system.

    Possible values are: +

    Windows_Client

    Windows_Server

    If this element + is included in a request for an update, the value must match the initial + value. This value cannot be updated.

    For more information, see + [Azure Hybrid Use Benefit for Windows + Server](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-hybrid-use-benefit-licensing?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json) +

    Minimum api-version: 2015-06-15 + :type license_type: str + :param plan: Specifies information about the marketplace image used to + create the virtual machine. This element is only used for marketplace + images. Before you can use a marketplace image from an API, you must + enable the image for programmatic use. In the Azure portal, find the + marketplace image that you want to use and then click **Want to deploy + programmatically, Get Started ->**. Enter any required information and + then click **Save**. + :type plan: ~azure.mgmt.compute.v2017_03_30.models.Plan + :ivar resources: The virtual machine child extension resources. + :vartype resources: + list[~azure.mgmt.compute.v2017_03_30.models.VirtualMachineExtension] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + 'instance_id': {'readonly': True}, + 'sku': {'readonly': True}, + 'latest_model_applied': {'readonly': True}, + 'vm_id': {'readonly': True}, + 'instance_view': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + 'resources': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'instance_id': {'key': 'instanceId', 'type': 'str'}, + 'sku': {'key': 'sku', 'type': 'Sku'}, + 'latest_model_applied': {'key': 'properties.latestModelApplied', 'type': 'bool'}, + 'vm_id': {'key': 'properties.vmId', 'type': 'str'}, + 'instance_view': {'key': 'properties.instanceView', 'type': 'VirtualMachineScaleSetVMInstanceView'}, + 'hardware_profile': {'key': 'properties.hardwareProfile', 'type': 'HardwareProfile'}, + 'storage_profile': {'key': 'properties.storageProfile', 'type': 'StorageProfile'}, + 'os_profile': {'key': 'properties.osProfile', 'type': 'OSProfile'}, + 'network_profile': {'key': 'properties.networkProfile', 'type': 'NetworkProfile'}, + 'diagnostics_profile': {'key': 'properties.diagnosticsProfile', 'type': 'DiagnosticsProfile'}, + 'availability_set': {'key': 'properties.availabilitySet', 'type': 'SubResource'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'license_type': {'key': 'properties.licenseType', 'type': 'str'}, + 'plan': {'key': 'plan', 'type': 'Plan'}, + 'resources': {'key': 'resources', 'type': '[VirtualMachineExtension]'}, + } + + def __init__(self, **kwargs): + super(VirtualMachineScaleSetVM, self).__init__(**kwargs) + self.instance_id = None + self.sku = None + self.latest_model_applied = None + self.vm_id = None + self.instance_view = None + self.hardware_profile = kwargs.get('hardware_profile', None) + self.storage_profile = kwargs.get('storage_profile', None) + self.os_profile = kwargs.get('os_profile', None) + self.network_profile = kwargs.get('network_profile', None) + self.diagnostics_profile = kwargs.get('diagnostics_profile', None) + self.availability_set = kwargs.get('availability_set', None) + self.provisioning_state = None + self.license_type = kwargs.get('license_type', None) + self.plan = kwargs.get('plan', None) + self.resources = None + + +class VirtualMachineScaleSetVMExtensionsSummary(Model): + """Extensions summary for virtual machines of a virtual machine scale set. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar name: The extension name. + :vartype name: str + :ivar statuses_summary: The extensions information. + :vartype statuses_summary: + list[~azure.mgmt.compute.v2017_03_30.models.VirtualMachineStatusCodeCount] + """ + + _validation = { + 'name': {'readonly': True}, + 'statuses_summary': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'statuses_summary': {'key': 'statusesSummary', 'type': '[VirtualMachineStatusCodeCount]'}, + } + + def __init__(self, **kwargs): + super(VirtualMachineScaleSetVMExtensionsSummary, self).__init__(**kwargs) + self.name = None + self.statuses_summary = None + + +class VirtualMachineScaleSetVMInstanceIDs(Model): + """Specifies a list of virtual machine instance IDs from the VM scale set. + + :param instance_ids: The virtual machine scale set instance ids. Omitting + the virtual machine scale set instance ids will result in the operation + being performed on all virtual machines in the virtual machine scale set. + :type instance_ids: list[str] + """ + + _attribute_map = { + 'instance_ids': {'key': 'instanceIds', 'type': '[str]'}, + } + + def __init__(self, **kwargs): + super(VirtualMachineScaleSetVMInstanceIDs, self).__init__(**kwargs) + self.instance_ids = kwargs.get('instance_ids', None) + + +class VirtualMachineScaleSetVMInstanceRequiredIDs(Model): + """Specifies a list of virtual machine instance IDs from the VM scale set. + + All required parameters must be populated in order to send to Azure. + + :param instance_ids: Required. The virtual machine scale set instance ids. + :type instance_ids: list[str] + """ + + _validation = { + 'instance_ids': {'required': True}, + } + + _attribute_map = { + 'instance_ids': {'key': 'instanceIds', 'type': '[str]'}, + } + + def __init__(self, **kwargs): + super(VirtualMachineScaleSetVMInstanceRequiredIDs, self).__init__(**kwargs) + self.instance_ids = kwargs.get('instance_ids', None) + + +class VirtualMachineScaleSetVMInstanceView(Model): + """The instance view of a virtual machine scale set VM. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :param platform_update_domain: The Update Domain count. + :type platform_update_domain: int + :param platform_fault_domain: The Fault Domain count. + :type platform_fault_domain: int + :param rdp_thumb_print: The Remote desktop certificate thumbprint. + :type rdp_thumb_print: str + :param vm_agent: The VM Agent running on the virtual machine. + :type vm_agent: + ~azure.mgmt.compute.v2017_03_30.models.VirtualMachineAgentInstanceView + :param disks: The disks information. + :type disks: list[~azure.mgmt.compute.v2017_03_30.models.DiskInstanceView] + :param extensions: The extensions information. + :type extensions: + list[~azure.mgmt.compute.v2017_03_30.models.VirtualMachineExtensionInstanceView] + :ivar vm_health: The health status for the VM. + :vartype vm_health: + ~azure.mgmt.compute.v2017_03_30.models.VirtualMachineHealthStatus + :param boot_diagnostics: Boot Diagnostics is a debugging feature which + allows you to view Console Output and Screenshot to diagnose VM status. +

    You can easily view the output of your console log.

    + Azure also enables you to see a screenshot of the VM from the hypervisor. + :type boot_diagnostics: + ~azure.mgmt.compute.v2017_03_30.models.BootDiagnosticsInstanceView + :param statuses: The resource status information. + :type statuses: + list[~azure.mgmt.compute.v2017_03_30.models.InstanceViewStatus] + :param placement_group_id: The placement group in which the VM is running. + If the VM is deallocated it will not have a placementGroupId. + :type placement_group_id: str + """ + + _validation = { + 'vm_health': {'readonly': True}, + } + + _attribute_map = { + 'platform_update_domain': {'key': 'platformUpdateDomain', 'type': 'int'}, + 'platform_fault_domain': {'key': 'platformFaultDomain', 'type': 'int'}, + 'rdp_thumb_print': {'key': 'rdpThumbPrint', 'type': 'str'}, + 'vm_agent': {'key': 'vmAgent', 'type': 'VirtualMachineAgentInstanceView'}, + 'disks': {'key': 'disks', 'type': '[DiskInstanceView]'}, + 'extensions': {'key': 'extensions', 'type': '[VirtualMachineExtensionInstanceView]'}, + 'vm_health': {'key': 'vmHealth', 'type': 'VirtualMachineHealthStatus'}, + 'boot_diagnostics': {'key': 'bootDiagnostics', 'type': 'BootDiagnosticsInstanceView'}, + 'statuses': {'key': 'statuses', 'type': '[InstanceViewStatus]'}, + 'placement_group_id': {'key': 'placementGroupId', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(VirtualMachineScaleSetVMInstanceView, self).__init__(**kwargs) + self.platform_update_domain = kwargs.get('platform_update_domain', None) + self.platform_fault_domain = kwargs.get('platform_fault_domain', None) + self.rdp_thumb_print = kwargs.get('rdp_thumb_print', None) + self.vm_agent = kwargs.get('vm_agent', None) + self.disks = kwargs.get('disks', None) + self.extensions = kwargs.get('extensions', None) + self.vm_health = None + self.boot_diagnostics = kwargs.get('boot_diagnostics', None) + self.statuses = kwargs.get('statuses', None) + self.placement_group_id = kwargs.get('placement_group_id', None) + + +class VirtualMachineScaleSetVMProfile(Model): + """Describes a virtual machine scale set virtual machine profile. + + :param os_profile: Specifies the operating system settings for the virtual + machines in the scale set. + :type os_profile: + ~azure.mgmt.compute.v2017_03_30.models.VirtualMachineScaleSetOSProfile + :param storage_profile: Specifies the storage settings for the virtual + machine disks. + :type storage_profile: + ~azure.mgmt.compute.v2017_03_30.models.VirtualMachineScaleSetStorageProfile + :param network_profile: Specifies properties of the network interfaces of + the virtual machines in the scale set. + :type network_profile: + ~azure.mgmt.compute.v2017_03_30.models.VirtualMachineScaleSetNetworkProfile + :param diagnostics_profile: Specifies the boot diagnostic settings state. +

    Minimum api-version: 2015-06-15. + :type diagnostics_profile: + ~azure.mgmt.compute.v2017_03_30.models.DiagnosticsProfile + :param extension_profile: Specifies a collection of settings for + extensions installed on virtual machines in the scale set. + :type extension_profile: + ~azure.mgmt.compute.v2017_03_30.models.VirtualMachineScaleSetExtensionProfile + :param license_type: Specifies that the image or disk that is being used + was licensed on-premises. This element is only used for images that + contain the Windows Server operating system.

    Possible values are: +

    Windows_Client

    Windows_Server

    If this element + is included in a request for an update, the value must match the initial + value. This value cannot be updated.

    For more information, see + [Azure Hybrid Use Benefit for Windows + Server](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-hybrid-use-benefit-licensing?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json) +

    Minimum api-version: 2015-06-15 + :type license_type: str + """ + + _attribute_map = { + 'os_profile': {'key': 'osProfile', 'type': 'VirtualMachineScaleSetOSProfile'}, + 'storage_profile': {'key': 'storageProfile', 'type': 'VirtualMachineScaleSetStorageProfile'}, + 'network_profile': {'key': 'networkProfile', 'type': 'VirtualMachineScaleSetNetworkProfile'}, + 'diagnostics_profile': {'key': 'diagnosticsProfile', 'type': 'DiagnosticsProfile'}, + 'extension_profile': {'key': 'extensionProfile', 'type': 'VirtualMachineScaleSetExtensionProfile'}, + 'license_type': {'key': 'licenseType', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(VirtualMachineScaleSetVMProfile, self).__init__(**kwargs) + self.os_profile = kwargs.get('os_profile', None) + self.storage_profile = kwargs.get('storage_profile', None) + self.network_profile = kwargs.get('network_profile', None) + self.diagnostics_profile = kwargs.get('diagnostics_profile', None) + self.extension_profile = kwargs.get('extension_profile', None) + self.license_type = kwargs.get('license_type', None) + + +class VirtualMachineSize(Model): + """Describes the properties of a VM size. + + :param name: The name of the virtual machine size. + :type name: str + :param number_of_cores: The number of cores supported by the virtual + machine size. + :type number_of_cores: int + :param os_disk_size_in_mb: The OS disk size, in MB, allowed by the virtual + machine size. + :type os_disk_size_in_mb: int + :param resource_disk_size_in_mb: The resource disk size, in MB, allowed by + the virtual machine size. + :type resource_disk_size_in_mb: int + :param memory_in_mb: The amount of memory, in MB, supported by the virtual + machine size. + :type memory_in_mb: int + :param max_data_disk_count: The maximum number of data disks that can be + attached to the virtual machine size. + :type max_data_disk_count: int + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'number_of_cores': {'key': 'numberOfCores', 'type': 'int'}, + 'os_disk_size_in_mb': {'key': 'osDiskSizeInMB', 'type': 'int'}, + 'resource_disk_size_in_mb': {'key': 'resourceDiskSizeInMB', 'type': 'int'}, + 'memory_in_mb': {'key': 'memoryInMB', 'type': 'int'}, + 'max_data_disk_count': {'key': 'maxDataDiskCount', 'type': 'int'}, + } + + def __init__(self, **kwargs): + super(VirtualMachineSize, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.number_of_cores = kwargs.get('number_of_cores', None) + self.os_disk_size_in_mb = kwargs.get('os_disk_size_in_mb', None) + self.resource_disk_size_in_mb = kwargs.get('resource_disk_size_in_mb', None) + self.memory_in_mb = kwargs.get('memory_in_mb', None) + self.max_data_disk_count = kwargs.get('max_data_disk_count', None) + + +class VirtualMachineStatusCodeCount(Model): + """The status code and count of the virtual machine scale set instance view + status summary. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar code: The instance view status code. + :vartype code: str + :ivar count: The number of instances having a particular status code. + :vartype count: int + """ + + _validation = { + 'code': {'readonly': True}, + 'count': {'readonly': True}, + } + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + 'count': {'key': 'count', 'type': 'int'}, + } + + def __init__(self, **kwargs): + super(VirtualMachineStatusCodeCount, self).__init__(**kwargs) + self.code = None + self.count = None + + +class WindowsConfiguration(Model): + """Specifies Windows operating system settings on the virtual machine. + + :param provision_vm_agent: Indicates whether virtual machine agent should + be provisioned on the virtual machine.

    When this property is not + specified in the request body, default behavior is to set it to true. + This will ensure that VM Agent is installed on the VM so that extensions + can be added to the VM later. + :type provision_vm_agent: bool + :param enable_automatic_updates: Indicates whether virtual machine is + enabled for automatic updates. + :type enable_automatic_updates: bool + :param time_zone: Specifies the time zone of the virtual machine. e.g. + "Pacific Standard Time" + :type time_zone: str + :param additional_unattend_content: Specifies additional base-64 encoded + XML formatted information that can be included in the Unattend.xml file, + which is used by Windows Setup. + :type additional_unattend_content: + list[~azure.mgmt.compute.v2017_03_30.models.AdditionalUnattendContent] + :param win_rm: Specifies the Windows Remote Management listeners. This + enables remote Windows PowerShell. + :type win_rm: ~azure.mgmt.compute.v2017_03_30.models.WinRMConfiguration + """ + + _attribute_map = { + 'provision_vm_agent': {'key': 'provisionVMAgent', 'type': 'bool'}, + 'enable_automatic_updates': {'key': 'enableAutomaticUpdates', 'type': 'bool'}, + 'time_zone': {'key': 'timeZone', 'type': 'str'}, + 'additional_unattend_content': {'key': 'additionalUnattendContent', 'type': '[AdditionalUnattendContent]'}, + 'win_rm': {'key': 'winRM', 'type': 'WinRMConfiguration'}, + } + + def __init__(self, **kwargs): + super(WindowsConfiguration, self).__init__(**kwargs) + self.provision_vm_agent = kwargs.get('provision_vm_agent', None) + self.enable_automatic_updates = kwargs.get('enable_automatic_updates', None) + self.time_zone = kwargs.get('time_zone', None) + self.additional_unattend_content = kwargs.get('additional_unattend_content', None) + self.win_rm = kwargs.get('win_rm', None) + + +class WinRMConfiguration(Model): + """Describes Windows Remote Management configuration of the VM. + + :param listeners: The list of Windows Remote Management listeners + :type listeners: + list[~azure.mgmt.compute.v2017_03_30.models.WinRMListener] + """ + + _attribute_map = { + 'listeners': {'key': 'listeners', 'type': '[WinRMListener]'}, + } + + def __init__(self, **kwargs): + super(WinRMConfiguration, self).__init__(**kwargs) + self.listeners = kwargs.get('listeners', None) + + +class WinRMListener(Model): + """Describes Protocol and thumbprint of Windows Remote Management listener. + + :param protocol: Specifies the protocol of listener.

    Possible + values are:
    **http**

    **https**. Possible values include: + 'Http', 'Https' + :type protocol: str or + ~azure.mgmt.compute.v2017_03_30.models.ProtocolTypes + :param certificate_url: This is the URL of a certificate that has been + uploaded to Key Vault as a secret. For adding a secret to the Key Vault, + see [Add a key or secret to the key + vault](https://docs.microsoft.com/azure/key-vault/key-vault-get-started/#add). + In this case, your certificate needs to be It is the Base64 encoding of + the following JSON Object which is encoded in UTF-8:

    {
    + "data":"",
    "dataType":"pfx",
    + "password":""
    } + :type certificate_url: str + """ + + _attribute_map = { + 'protocol': {'key': 'protocol', 'type': 'ProtocolTypes'}, + 'certificate_url': {'key': 'certificateUrl', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(WinRMListener, self).__init__(**kwargs) + self.protocol = kwargs.get('protocol', None) + self.certificate_url = kwargs.get('certificate_url', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/_models_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/_models_py3.py new file mode 100644 index 000000000000..03a4d6a57e3e --- /dev/null +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/_models_py3.py @@ -0,0 +1,5216 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class AccessUri(Model): + """A disk access SAS uri. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar access_sas: A SAS uri for accessing a disk. + :vartype access_sas: str + """ + + _validation = { + 'access_sas': {'readonly': True}, + } + + _attribute_map = { + 'access_sas': {'key': 'properties.output.accessSAS', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(AccessUri, self).__init__(**kwargs) + self.access_sas = None + + +class AdditionalUnattendContent(Model): + """Specifies additional XML formatted information that can be included in the + Unattend.xml file, which is used by Windows Setup. Contents are defined by + setting name, component name, and the pass in which the content is applied. + + :param pass_name: The pass name. Currently, the only allowable value is + OobeSystem. Possible values include: 'OobeSystem' + :type pass_name: str or ~azure.mgmt.compute.v2017_03_30.models.PassNames + :param component_name: The component name. Currently, the only allowable + value is Microsoft-Windows-Shell-Setup. Possible values include: + 'Microsoft-Windows-Shell-Setup' + :type component_name: str or + ~azure.mgmt.compute.v2017_03_30.models.ComponentNames + :param setting_name: Specifies the name of the setting to which the + content applies. Possible values are: FirstLogonCommands and AutoLogon. + Possible values include: 'AutoLogon', 'FirstLogonCommands' + :type setting_name: str or + ~azure.mgmt.compute.v2017_03_30.models.SettingNames + :param content: Specifies the XML formatted content that is added to the + unattend.xml file for the specified path and component. The XML must be + less than 4KB and must include the root element for the setting or feature + that is being inserted. + :type content: str + """ + + _attribute_map = { + 'pass_name': {'key': 'passName', 'type': 'PassNames'}, + 'component_name': {'key': 'componentName', 'type': 'ComponentNames'}, + 'setting_name': {'key': 'settingName', 'type': 'SettingNames'}, + 'content': {'key': 'content', 'type': 'str'}, + } + + def __init__(self, *, pass_name=None, component_name=None, setting_name=None, content: str=None, **kwargs) -> None: + super(AdditionalUnattendContent, self).__init__(**kwargs) + self.pass_name = pass_name + self.component_name = component_name + self.setting_name = setting_name + self.content = content + + +class ApiEntityReference(Model): + """The API entity reference. + + :param id: The ARM resource id in the form of + /subscriptions/{SubscriptionId}/resourceGroups/{ResourceGroupName}/... + :type id: str + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + } + + def __init__(self, *, id: str=None, **kwargs) -> None: + super(ApiEntityReference, self).__init__(**kwargs) + self.id = id + + +class ApiError(Model): + """Api error. + + :param details: The Api error details + :type details: list[~azure.mgmt.compute.v2017_03_30.models.ApiErrorBase] + :param innererror: The Api inner error + :type innererror: ~azure.mgmt.compute.v2017_03_30.models.InnerError + :param code: The error code. + :type code: str + :param target: The target of the particular error. + :type target: str + :param message: The error message. + :type message: str + """ + + _attribute_map = { + 'details': {'key': 'details', 'type': '[ApiErrorBase]'}, + 'innererror': {'key': 'innererror', 'type': 'InnerError'}, + 'code': {'key': 'code', 'type': 'str'}, + 'target': {'key': 'target', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + } + + def __init__(self, *, details=None, innererror=None, code: str=None, target: str=None, message: str=None, **kwargs) -> None: + super(ApiError, self).__init__(**kwargs) + self.details = details + self.innererror = innererror + self.code = code + self.target = target + self.message = message + + +class ApiErrorBase(Model): + """Api error base. + + :param code: The error code. + :type code: str + :param target: The target of the particular error. + :type target: str + :param message: The error message. + :type message: str + """ + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + 'target': {'key': 'target', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + } + + def __init__(self, *, code: str=None, target: str=None, message: str=None, **kwargs) -> None: + super(ApiErrorBase, self).__init__(**kwargs) + self.code = code + self.target = target + self.message = message + + +class Resource(Model): + """The Resource model definition. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource Id + :vartype id: str + :ivar name: Resource name + :vartype name: str + :ivar type: Resource type + :vartype type: str + :param location: Required. Resource location + :type location: str + :param tags: Resource tags + :type tags: dict[str, str] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__(self, *, location: str, tags=None, **kwargs) -> None: + super(Resource, self).__init__(**kwargs) + self.id = None + self.name = None + self.type = None + self.location = location + self.tags = tags + + +class AvailabilitySet(Resource): + """Specifies information about the availability set that the virtual machine + should be assigned to. Virtual machines specified in the same availability + set are allocated to different nodes to maximize availability. For more + information about availability sets, see [Manage the availability of + virtual + machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-manage-availability?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). +

    For more information on Azure planned maintenance, see [Planned + maintenance for virtual machines in + Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-planned-maintenance?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json) +

    Currently, a VM can only be added to availability set at creation + time. An existing VM cannot be added to an availability set. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource Id + :vartype id: str + :ivar name: Resource name + :vartype name: str + :ivar type: Resource type + :vartype type: str + :param location: Required. Resource location + :type location: str + :param tags: Resource tags + :type tags: dict[str, str] + :param platform_update_domain_count: Update Domain count. + :type platform_update_domain_count: int + :param platform_fault_domain_count: Fault Domain count. + :type platform_fault_domain_count: int + :param virtual_machines: A list of references to all virtual machines in + the availability set. + :type virtual_machines: + list[~azure.mgmt.compute.v2017_03_30.models.SubResource] + :ivar statuses: The resource status information. + :vartype statuses: + list[~azure.mgmt.compute.v2017_03_30.models.InstanceViewStatus] + :param sku: Sku of the availability set + :type sku: ~azure.mgmt.compute.v2017_03_30.models.Sku + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + 'statuses': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'platform_update_domain_count': {'key': 'properties.platformUpdateDomainCount', 'type': 'int'}, + 'platform_fault_domain_count': {'key': 'properties.platformFaultDomainCount', 'type': 'int'}, + 'virtual_machines': {'key': 'properties.virtualMachines', 'type': '[SubResource]'}, + 'statuses': {'key': 'properties.statuses', 'type': '[InstanceViewStatus]'}, + 'sku': {'key': 'sku', 'type': 'Sku'}, + } + + def __init__(self, *, location: str, tags=None, platform_update_domain_count: int=None, platform_fault_domain_count: int=None, virtual_machines=None, sku=None, **kwargs) -> None: + super(AvailabilitySet, self).__init__(location=location, tags=tags, **kwargs) + self.platform_update_domain_count = platform_update_domain_count + self.platform_fault_domain_count = platform_fault_domain_count + self.virtual_machines = virtual_machines + self.statuses = None + self.sku = sku + + +class BootDiagnostics(Model): + """Boot Diagnostics is a debugging feature which allows you to view Console + Output and Screenshot to diagnose VM status.

    You can easily view + the output of your console log.

    Azure also enables you to see a + screenshot of the VM from the hypervisor. + + :param enabled: Whether boot diagnostics should be enabled on the Virtual + Machine. + :type enabled: bool + :param storage_uri: Uri of the storage account to use for placing the + console output and screenshot. + :type storage_uri: str + """ + + _attribute_map = { + 'enabled': {'key': 'enabled', 'type': 'bool'}, + 'storage_uri': {'key': 'storageUri', 'type': 'str'}, + } + + def __init__(self, *, enabled: bool=None, storage_uri: str=None, **kwargs) -> None: + super(BootDiagnostics, self).__init__(**kwargs) + self.enabled = enabled + self.storage_uri = storage_uri + + +class BootDiagnosticsInstanceView(Model): + """The instance view of a virtual machine boot diagnostics. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar console_screenshot_blob_uri: The console screenshot blob URI. + :vartype console_screenshot_blob_uri: str + :ivar serial_console_log_blob_uri: The Linux serial console log blob Uri. + :vartype serial_console_log_blob_uri: str + """ + + _validation = { + 'console_screenshot_blob_uri': {'readonly': True}, + 'serial_console_log_blob_uri': {'readonly': True}, + } + + _attribute_map = { + 'console_screenshot_blob_uri': {'key': 'consoleScreenshotBlobUri', 'type': 'str'}, + 'serial_console_log_blob_uri': {'key': 'serialConsoleLogBlobUri', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(BootDiagnosticsInstanceView, self).__init__(**kwargs) + self.console_screenshot_blob_uri = None + self.serial_console_log_blob_uri = None + + +class CloudError(Model): + """CloudError. + """ + + _attribute_map = { + } + + +class ComputeLongRunningOperationProperties(Model): + """Compute-specific operation properties, including output. + + :param output: Operation output data (raw JSON) + :type output: object + """ + + _attribute_map = { + 'output': {'key': 'output', 'type': 'object'}, + } + + def __init__(self, *, output=None, **kwargs) -> None: + super(ComputeLongRunningOperationProperties, self).__init__(**kwargs) + self.output = output + + +class CreationData(Model): + """Data used when creating a disk. + + All required parameters must be populated in order to send to Azure. + + :param create_option: Required. This enumerates the possible sources of a + disk's creation. Possible values include: 'Empty', 'Attach', 'FromImage', + 'Import', 'Copy' + :type create_option: str or + ~azure.mgmt.compute.v2017_03_30.models.DiskCreateOption + :param storage_account_id: If createOption is Import, the Azure Resource + Manager identifier of the storage account containing the blob to import as + a disk. Required only if the blob is in a different subscription + :type storage_account_id: str + :param image_reference: Disk source information. + :type image_reference: + ~azure.mgmt.compute.v2017_03_30.models.ImageDiskReference + :param source_uri: If createOption is Import, this is the URI of a blob to + be imported into a managed disk. + :type source_uri: str + :param source_resource_id: If createOption is Copy, this is the ARM id of + the source snapshot or disk. + :type source_resource_id: str + """ + + _validation = { + 'create_option': {'required': True}, + } + + _attribute_map = { + 'create_option': {'key': 'createOption', 'type': 'DiskCreateOption'}, + 'storage_account_id': {'key': 'storageAccountId', 'type': 'str'}, + 'image_reference': {'key': 'imageReference', 'type': 'ImageDiskReference'}, + 'source_uri': {'key': 'sourceUri', 'type': 'str'}, + 'source_resource_id': {'key': 'sourceResourceId', 'type': 'str'}, + } + + def __init__(self, *, create_option, storage_account_id: str=None, image_reference=None, source_uri: str=None, source_resource_id: str=None, **kwargs) -> None: + super(CreationData, self).__init__(**kwargs) + self.create_option = create_option + self.storage_account_id = storage_account_id + self.image_reference = image_reference + self.source_uri = source_uri + self.source_resource_id = source_resource_id + + +class DataDisk(Model): + """Describes a data disk. + + All required parameters must be populated in order to send to Azure. + + :param lun: Required. Specifies the logical unit number of the data disk. + This value is used to identify data disks within the VM and therefore must + be unique for each data disk attached to a VM. + :type lun: int + :param name: The disk name. + :type name: str + :param vhd: The virtual hard disk. + :type vhd: ~azure.mgmt.compute.v2017_03_30.models.VirtualHardDisk + :param image: The source user image virtual hard disk. The virtual hard + disk will be copied before being attached to the virtual machine. If + SourceImage is provided, the destination virtual hard drive must not + exist. + :type image: ~azure.mgmt.compute.v2017_03_30.models.VirtualHardDisk + :param caching: Specifies the caching requirements.

    Possible + values are:

    **None**

    **ReadOnly**

    **ReadWrite** +

    Default: **None for Standard storage. ReadOnly for Premium + storage**. Possible values include: 'None', 'ReadOnly', 'ReadWrite' + :type caching: str or ~azure.mgmt.compute.v2017_03_30.models.CachingTypes + :param create_option: Required. Specifies how the virtual machine should + be created.

    Possible values are:

    **Attach** \\u2013 This + value is used when you are using a specialized disk to create the virtual + machine.

    **FromImage** \\u2013 This value is used when you are + using an image to create the virtual machine. If you are using a platform + image, you also use the imageReference element described above. If you are + using a marketplace image, you also use the plan element previously + described. Possible values include: 'FromImage', 'Empty', 'Attach' + :type create_option: str or + ~azure.mgmt.compute.v2017_03_30.models.DiskCreateOptionTypes + :param disk_size_gb: Specifies the size of an empty data disk in + gigabytes. This element can be used to overwrite the size of the disk in a + virtual machine image.

    This value cannot be larger than 1023 GB + :type disk_size_gb: int + :param managed_disk: The managed disk parameters. + :type managed_disk: + ~azure.mgmt.compute.v2017_03_30.models.ManagedDiskParameters + """ + + _validation = { + 'lun': {'required': True}, + 'create_option': {'required': True}, + } + + _attribute_map = { + 'lun': {'key': 'lun', 'type': 'int'}, + 'name': {'key': 'name', 'type': 'str'}, + 'vhd': {'key': 'vhd', 'type': 'VirtualHardDisk'}, + 'image': {'key': 'image', 'type': 'VirtualHardDisk'}, + 'caching': {'key': 'caching', 'type': 'CachingTypes'}, + 'create_option': {'key': 'createOption', 'type': 'DiskCreateOptionTypes'}, + 'disk_size_gb': {'key': 'diskSizeGB', 'type': 'int'}, + 'managed_disk': {'key': 'managedDisk', 'type': 'ManagedDiskParameters'}, + } + + def __init__(self, *, lun: int, create_option, name: str=None, vhd=None, image=None, caching=None, disk_size_gb: int=None, managed_disk=None, **kwargs) -> None: + super(DataDisk, self).__init__(**kwargs) + self.lun = lun + self.name = name + self.vhd = vhd + self.image = image + self.caching = caching + self.create_option = create_option + self.disk_size_gb = disk_size_gb + self.managed_disk = managed_disk + + +class DataDiskImage(Model): + """Contains the data disk images information. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar lun: Specifies the logical unit number of the data disk. This value + is used to identify data disks within the VM and therefore must be unique + for each data disk attached to a VM. + :vartype lun: int + """ + + _validation = { + 'lun': {'readonly': True}, + } + + _attribute_map = { + 'lun': {'key': 'lun', 'type': 'int'}, + } + + def __init__(self, **kwargs) -> None: + super(DataDiskImage, self).__init__(**kwargs) + self.lun = None + + +class DiagnosticsProfile(Model): + """Specifies the boot diagnostic settings state.

    Minimum api-version: + 2015-06-15. + + :param boot_diagnostics: Boot Diagnostics is a debugging feature which + allows you to view Console Output and Screenshot to diagnose VM status. +

    You can easily view the output of your console log.

    + Azure also enables you to see a screenshot of the VM from the hypervisor. + :type boot_diagnostics: + ~azure.mgmt.compute.v2017_03_30.models.BootDiagnostics + """ + + _attribute_map = { + 'boot_diagnostics': {'key': 'bootDiagnostics', 'type': 'BootDiagnostics'}, + } + + def __init__(self, *, boot_diagnostics=None, **kwargs) -> None: + super(DiagnosticsProfile, self).__init__(**kwargs) + self.boot_diagnostics = boot_diagnostics + + +class Disk(Resource): + """Disk resource. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource Id + :vartype id: str + :ivar name: Resource name + :vartype name: str + :ivar type: Resource type + :vartype type: str + :param location: Required. Resource location + :type location: str + :param tags: Resource tags + :type tags: dict[str, str] + :ivar managed_by: A relative URI containing the ID of the VM that has the + disk attached. + :vartype managed_by: str + :param sku: + :type sku: ~azure.mgmt.compute.v2017_03_30.models.DiskSku + :param zones: The Logical zone list for Disk. + :type zones: list[str] + :ivar time_created: The time when the disk was created. + :vartype time_created: datetime + :param os_type: The Operating System type. Possible values include: + 'Windows', 'Linux' + :type os_type: str or + ~azure.mgmt.compute.v2017_03_30.models.OperatingSystemTypes + :param creation_data: Required. Disk source information. CreationData + information cannot be changed after the disk has been created. + :type creation_data: ~azure.mgmt.compute.v2017_03_30.models.CreationData + :param disk_size_gb: If creationData.createOption is Empty, this field is + mandatory and it indicates the size of the VHD to create. If this field is + present for updates or creation with other options, it indicates a resize. + Resizes are only allowed if the disk is not attached to a running VM, and + can only increase the disk's size. + :type disk_size_gb: int + :param encryption_settings: Encryption settings for disk or snapshot + :type encryption_settings: + ~azure.mgmt.compute.v2017_03_30.models.EncryptionSettings + :ivar provisioning_state: The disk provisioning state. + :vartype provisioning_state: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + 'managed_by': {'readonly': True}, + 'time_created': {'readonly': True}, + 'creation_data': {'required': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'managed_by': {'key': 'managedBy', 'type': 'str'}, + 'sku': {'key': 'sku', 'type': 'DiskSku'}, + 'zones': {'key': 'zones', 'type': '[str]'}, + 'time_created': {'key': 'properties.timeCreated', 'type': 'iso-8601'}, + 'os_type': {'key': 'properties.osType', 'type': 'OperatingSystemTypes'}, + 'creation_data': {'key': 'properties.creationData', 'type': 'CreationData'}, + 'disk_size_gb': {'key': 'properties.diskSizeGB', 'type': 'int'}, + 'encryption_settings': {'key': 'properties.encryptionSettings', 'type': 'EncryptionSettings'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + } + + def __init__(self, *, location: str, creation_data, tags=None, sku=None, zones=None, os_type=None, disk_size_gb: int=None, encryption_settings=None, **kwargs) -> None: + super(Disk, self).__init__(location=location, tags=tags, **kwargs) + self.managed_by = None + self.sku = sku + self.zones = zones + self.time_created = None + self.os_type = os_type + self.creation_data = creation_data + self.disk_size_gb = disk_size_gb + self.encryption_settings = encryption_settings + self.provisioning_state = None + + +class DiskEncryptionSettings(Model): + """Describes a Encryption Settings for a Disk. + + :param disk_encryption_key: Specifies the location of the disk encryption + key, which is a Key Vault Secret. + :type disk_encryption_key: + ~azure.mgmt.compute.v2017_03_30.models.KeyVaultSecretReference + :param key_encryption_key: Specifies the location of the key encryption + key in Key Vault. + :type key_encryption_key: + ~azure.mgmt.compute.v2017_03_30.models.KeyVaultKeyReference + :param enabled: Specifies whether disk encryption should be enabled on the + virtual machine. + :type enabled: bool + """ + + _attribute_map = { + 'disk_encryption_key': {'key': 'diskEncryptionKey', 'type': 'KeyVaultSecretReference'}, + 'key_encryption_key': {'key': 'keyEncryptionKey', 'type': 'KeyVaultKeyReference'}, + 'enabled': {'key': 'enabled', 'type': 'bool'}, + } + + def __init__(self, *, disk_encryption_key=None, key_encryption_key=None, enabled: bool=None, **kwargs) -> None: + super(DiskEncryptionSettings, self).__init__(**kwargs) + self.disk_encryption_key = disk_encryption_key + self.key_encryption_key = key_encryption_key + self.enabled = enabled + + +class DiskInstanceView(Model): + """The instance view of the disk. + + :param name: The disk name. + :type name: str + :param encryption_settings: Specifies the encryption settings for the OS + Disk.

    Minimum api-version: 2015-06-15 + :type encryption_settings: + list[~azure.mgmt.compute.v2017_03_30.models.DiskEncryptionSettings] + :param statuses: The resource status information. + :type statuses: + list[~azure.mgmt.compute.v2017_03_30.models.InstanceViewStatus] + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'encryption_settings': {'key': 'encryptionSettings', 'type': '[DiskEncryptionSettings]'}, + 'statuses': {'key': 'statuses', 'type': '[InstanceViewStatus]'}, + } + + def __init__(self, *, name: str=None, encryption_settings=None, statuses=None, **kwargs) -> None: + super(DiskInstanceView, self).__init__(**kwargs) + self.name = name + self.encryption_settings = encryption_settings + self.statuses = statuses + + +class DiskSku(Model): + """The disks and snapshots sku name. Can be Standard_LRS or Premium_LRS. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :param name: The sku name. Possible values include: 'Standard_LRS', + 'Premium_LRS' + :type name: str or + ~azure.mgmt.compute.v2017_03_30.models.StorageAccountTypes + :ivar tier: The sku tier. Default value: "Standard" . + :vartype tier: str + """ + + _validation = { + 'tier': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'tier': {'key': 'tier', 'type': 'str'}, + } + + def __init__(self, *, name=None, **kwargs) -> None: + super(DiskSku, self).__init__(**kwargs) + self.name = name + self.tier = None + + +class ResourceUpdate(Model): + """The Resource model definition. + + :param tags: Resource tags + :type tags: dict[str, str] + :param sku: + :type sku: ~azure.mgmt.compute.v2017_03_30.models.DiskSku + """ + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + 'sku': {'key': 'sku', 'type': 'DiskSku'}, + } + + def __init__(self, *, tags=None, sku=None, **kwargs) -> None: + super(ResourceUpdate, self).__init__(**kwargs) + self.tags = tags + self.sku = sku + + +class DiskUpdate(ResourceUpdate): + """Disk update resource. + + :param tags: Resource tags + :type tags: dict[str, str] + :param sku: + :type sku: ~azure.mgmt.compute.v2017_03_30.models.DiskSku + :param os_type: the Operating System type. Possible values include: + 'Windows', 'Linux' + :type os_type: str or + ~azure.mgmt.compute.v2017_03_30.models.OperatingSystemTypes + :param disk_size_gb: If creationData.createOption is Empty, this field is + mandatory and it indicates the size of the VHD to create. If this field is + present for updates or creation with other options, it indicates a resize. + Resizes are only allowed if the disk is not attached to a running VM, and + can only increase the disk's size. + :type disk_size_gb: int + :param encryption_settings: Encryption settings for disk or snapshot + :type encryption_settings: + ~azure.mgmt.compute.v2017_03_30.models.EncryptionSettings + """ + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + 'sku': {'key': 'sku', 'type': 'DiskSku'}, + 'os_type': {'key': 'properties.osType', 'type': 'OperatingSystemTypes'}, + 'disk_size_gb': {'key': 'properties.diskSizeGB', 'type': 'int'}, + 'encryption_settings': {'key': 'properties.encryptionSettings', 'type': 'EncryptionSettings'}, + } + + def __init__(self, *, tags=None, sku=None, os_type=None, disk_size_gb: int=None, encryption_settings=None, **kwargs) -> None: + super(DiskUpdate, self).__init__(tags=tags, sku=sku, **kwargs) + self.os_type = os_type + self.disk_size_gb = disk_size_gb + self.encryption_settings = encryption_settings + + +class EncryptionSettings(Model): + """Encryption settings for disk or snapshot. + + :param enabled: Set this flag to true and provide DiskEncryptionKey and + optional KeyEncryptionKey to enable encryption. Set this flag to false and + remove DiskEncryptionKey and KeyEncryptionKey to disable encryption. If + EncryptionSettings is null in the request object, the existing settings + remain unchanged. + :type enabled: bool + :param disk_encryption_key: Key Vault Secret Url and vault id of the disk + encryption key + :type disk_encryption_key: + ~azure.mgmt.compute.v2017_03_30.models.KeyVaultAndSecretReference + :param key_encryption_key: Key Vault Key Url and vault id of the key + encryption key + :type key_encryption_key: + ~azure.mgmt.compute.v2017_03_30.models.KeyVaultAndKeyReference + """ + + _attribute_map = { + 'enabled': {'key': 'enabled', 'type': 'bool'}, + 'disk_encryption_key': {'key': 'diskEncryptionKey', 'type': 'KeyVaultAndSecretReference'}, + 'key_encryption_key': {'key': 'keyEncryptionKey', 'type': 'KeyVaultAndKeyReference'}, + } + + def __init__(self, *, enabled: bool=None, disk_encryption_key=None, key_encryption_key=None, **kwargs) -> None: + super(EncryptionSettings, self).__init__(**kwargs) + self.enabled = enabled + self.disk_encryption_key = disk_encryption_key + self.key_encryption_key = key_encryption_key + + +class GrantAccessData(Model): + """Data used for requesting a SAS. + + All required parameters must be populated in order to send to Azure. + + :param access: Required. Possible values include: 'None', 'Read' + :type access: str or ~azure.mgmt.compute.v2017_03_30.models.AccessLevel + :param duration_in_seconds: Required. Time duration in seconds until the + SAS access expires. + :type duration_in_seconds: int + """ + + _validation = { + 'access': {'required': True}, + 'duration_in_seconds': {'required': True}, + } + + _attribute_map = { + 'access': {'key': 'access', 'type': 'AccessLevel'}, + 'duration_in_seconds': {'key': 'durationInSeconds', 'type': 'int'}, + } + + def __init__(self, *, access, duration_in_seconds: int, **kwargs) -> None: + super(GrantAccessData, self).__init__(**kwargs) + self.access = access + self.duration_in_seconds = duration_in_seconds + + +class HardwareProfile(Model): + """Specifies the hardware settings for the virtual machine. + + :param vm_size: Specifies the size of the virtual machine. For more + information about virtual machine sizes, see [Sizes for virtual + machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-sizes?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). +

    The available VM sizes depend on region and availability set. For + a list of available sizes use these APIs:

    [List all available + virtual machine sizes in an availability + set](https://docs.microsoft.com/rest/api/compute/availabilitysets/listavailablesizes) +

    [List all available virtual machine sizes in a + region](https://docs.microsoft.com/rest/api/compute/virtualmachinesizes/list) +

    [List all available virtual machine sizes for + resizing](https://docs.microsoft.com/rest/api/compute/virtualmachines/listavailablesizes). + Possible values include: 'Basic_A0', 'Basic_A1', 'Basic_A2', 'Basic_A3', + 'Basic_A4', 'Standard_A0', 'Standard_A1', 'Standard_A2', 'Standard_A3', + 'Standard_A4', 'Standard_A5', 'Standard_A6', 'Standard_A7', 'Standard_A8', + 'Standard_A9', 'Standard_A10', 'Standard_A11', 'Standard_A1_v2', + 'Standard_A2_v2', 'Standard_A4_v2', 'Standard_A8_v2', 'Standard_A2m_v2', + 'Standard_A4m_v2', 'Standard_A8m_v2', 'Standard_D1', 'Standard_D2', + 'Standard_D3', 'Standard_D4', 'Standard_D11', 'Standard_D12', + 'Standard_D13', 'Standard_D14', 'Standard_D1_v2', 'Standard_D2_v2', + 'Standard_D3_v2', 'Standard_D4_v2', 'Standard_D5_v2', 'Standard_D11_v2', + 'Standard_D12_v2', 'Standard_D13_v2', 'Standard_D14_v2', + 'Standard_D15_v2', 'Standard_DS1', 'Standard_DS2', 'Standard_DS3', + 'Standard_DS4', 'Standard_DS11', 'Standard_DS12', 'Standard_DS13', + 'Standard_DS14', 'Standard_DS1_v2', 'Standard_DS2_v2', 'Standard_DS3_v2', + 'Standard_DS4_v2', 'Standard_DS5_v2', 'Standard_DS11_v2', + 'Standard_DS12_v2', 'Standard_DS13_v2', 'Standard_DS14_v2', + 'Standard_DS15_v2', 'Standard_F1', 'Standard_F2', 'Standard_F4', + 'Standard_F8', 'Standard_F16', 'Standard_F1s', 'Standard_F2s', + 'Standard_F4s', 'Standard_F8s', 'Standard_F16s', 'Standard_G1', + 'Standard_G2', 'Standard_G3', 'Standard_G4', 'Standard_G5', + 'Standard_GS1', 'Standard_GS2', 'Standard_GS3', 'Standard_GS4', + 'Standard_GS5', 'Standard_H8', 'Standard_H16', 'Standard_H8m', + 'Standard_H16m', 'Standard_H16r', 'Standard_H16mr', 'Standard_L4s', + 'Standard_L8s', 'Standard_L16s', 'Standard_L32s', 'Standard_NC6', + 'Standard_NC12', 'Standard_NC24', 'Standard_NC24r', 'Standard_NV6', + 'Standard_NV12', 'Standard_NV24' + :type vm_size: str or + ~azure.mgmt.compute.v2017_03_30.models.VirtualMachineSizeTypes + """ + + _attribute_map = { + 'vm_size': {'key': 'vmSize', 'type': 'str'}, + } + + def __init__(self, *, vm_size=None, **kwargs) -> None: + super(HardwareProfile, self).__init__(**kwargs) + self.vm_size = vm_size + + +class Image(Resource): + """The source user image virtual hard disk. The virtual hard disk will be + copied before being attached to the virtual machine. If SourceImage is + provided, the destination virtual hard drive must not exist. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource Id + :vartype id: str + :ivar name: Resource name + :vartype name: str + :ivar type: Resource type + :vartype type: str + :param location: Required. Resource location + :type location: str + :param tags: Resource tags + :type tags: dict[str, str] + :param source_virtual_machine: The source virtual machine from which Image + is created. + :type source_virtual_machine: + ~azure.mgmt.compute.v2017_03_30.models.SubResource + :param storage_profile: Specifies the storage settings for the virtual + machine disks. + :type storage_profile: + ~azure.mgmt.compute.v2017_03_30.models.ImageStorageProfile + :ivar provisioning_state: The provisioning state. + :vartype provisioning_state: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'source_virtual_machine': {'key': 'properties.sourceVirtualMachine', 'type': 'SubResource'}, + 'storage_profile': {'key': 'properties.storageProfile', 'type': 'ImageStorageProfile'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + } + + def __init__(self, *, location: str, tags=None, source_virtual_machine=None, storage_profile=None, **kwargs) -> None: + super(Image, self).__init__(location=location, tags=tags, **kwargs) + self.source_virtual_machine = source_virtual_machine + self.storage_profile = storage_profile + self.provisioning_state = None + + +class ImageDataDisk(Model): + """Describes a data disk. + + All required parameters must be populated in order to send to Azure. + + :param lun: Required. Specifies the logical unit number of the data disk. + This value is used to identify data disks within the VM and therefore must + be unique for each data disk attached to a VM. + :type lun: int + :param snapshot: The snapshot. + :type snapshot: ~azure.mgmt.compute.v2017_03_30.models.SubResource + :param managed_disk: The managedDisk. + :type managed_disk: ~azure.mgmt.compute.v2017_03_30.models.SubResource + :param blob_uri: The Virtual Hard Disk. + :type blob_uri: str + :param caching: Specifies the caching requirements.

    Possible + values are:

    **None**

    **ReadOnly**

    **ReadWrite** +

    Default: **None for Standard storage. ReadOnly for Premium + storage**. Possible values include: 'None', 'ReadOnly', 'ReadWrite' + :type caching: str or ~azure.mgmt.compute.v2017_03_30.models.CachingTypes + :param disk_size_gb: Specifies the size of empty data disks in gigabytes. + This element can be used to overwrite the name of the disk in a virtual + machine image.

    This value cannot be larger than 1023 GB + :type disk_size_gb: int + :param storage_account_type: Specifies the storage account type for the + managed disk. Possible values are: Standard_LRS or Premium_LRS. Possible + values include: 'Standard_LRS', 'Premium_LRS' + :type storage_account_type: str or + ~azure.mgmt.compute.v2017_03_30.models.StorageAccountTypes + """ + + _validation = { + 'lun': {'required': True}, + } + + _attribute_map = { + 'lun': {'key': 'lun', 'type': 'int'}, + 'snapshot': {'key': 'snapshot', 'type': 'SubResource'}, + 'managed_disk': {'key': 'managedDisk', 'type': 'SubResource'}, + 'blob_uri': {'key': 'blobUri', 'type': 'str'}, + 'caching': {'key': 'caching', 'type': 'CachingTypes'}, + 'disk_size_gb': {'key': 'diskSizeGB', 'type': 'int'}, + 'storage_account_type': {'key': 'storageAccountType', 'type': 'str'}, + } + + def __init__(self, *, lun: int, snapshot=None, managed_disk=None, blob_uri: str=None, caching=None, disk_size_gb: int=None, storage_account_type=None, **kwargs) -> None: + super(ImageDataDisk, self).__init__(**kwargs) + self.lun = lun + self.snapshot = snapshot + self.managed_disk = managed_disk + self.blob_uri = blob_uri + self.caching = caching + self.disk_size_gb = disk_size_gb + self.storage_account_type = storage_account_type + + +class ImageDiskReference(Model): + """The source image used for creating the disk. + + All required parameters must be populated in order to send to Azure. + + :param id: Required. A relative uri containing either a Platform Image + Repository or user image reference. + :type id: str + :param lun: If the disk is created from an image's data disk, this is an + index that indicates which of the data disks in the image to use. For OS + disks, this field is null. + :type lun: int + """ + + _validation = { + 'id': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'lun': {'key': 'lun', 'type': 'int'}, + } + + def __init__(self, *, id: str, lun: int=None, **kwargs) -> None: + super(ImageDiskReference, self).__init__(**kwargs) + self.id = id + self.lun = lun + + +class ImageOSDisk(Model): + """Describes an Operating System disk. + + All required parameters must be populated in order to send to Azure. + + :param os_type: Required. This property allows you to specify the type of + the OS that is included in the disk if creating a VM from a custom image. +

    Possible values are:

    **Windows**

    **Linux**. + Possible values include: 'Windows', 'Linux' + :type os_type: str or + ~azure.mgmt.compute.v2017_03_30.models.OperatingSystemTypes + :param os_state: Required. The OS State. Possible values include: + 'Generalized', 'Specialized' + :type os_state: str or + ~azure.mgmt.compute.v2017_03_30.models.OperatingSystemStateTypes + :param snapshot: The snapshot. + :type snapshot: ~azure.mgmt.compute.v2017_03_30.models.SubResource + :param managed_disk: The managedDisk. + :type managed_disk: ~azure.mgmt.compute.v2017_03_30.models.SubResource + :param blob_uri: The Virtual Hard Disk. + :type blob_uri: str + :param caching: Specifies the caching requirements.

    Possible + values are:

    **None**

    **ReadOnly**

    **ReadWrite** +

    Default: **None for Standard storage. ReadOnly for Premium + storage**. Possible values include: 'None', 'ReadOnly', 'ReadWrite' + :type caching: str or ~azure.mgmt.compute.v2017_03_30.models.CachingTypes + :param disk_size_gb: Specifies the size of empty data disks in gigabytes. + This element can be used to overwrite the name of the disk in a virtual + machine image.

    This value cannot be larger than 1023 GB + :type disk_size_gb: int + :param storage_account_type: Specifies the storage account type for the + managed disk. Possible values are: Standard_LRS or Premium_LRS. Possible + values include: 'Standard_LRS', 'Premium_LRS' + :type storage_account_type: str or + ~azure.mgmt.compute.v2017_03_30.models.StorageAccountTypes + """ + + _validation = { + 'os_type': {'required': True}, + 'os_state': {'required': True}, + } + + _attribute_map = { + 'os_type': {'key': 'osType', 'type': 'OperatingSystemTypes'}, + 'os_state': {'key': 'osState', 'type': 'OperatingSystemStateTypes'}, + 'snapshot': {'key': 'snapshot', 'type': 'SubResource'}, + 'managed_disk': {'key': 'managedDisk', 'type': 'SubResource'}, + 'blob_uri': {'key': 'blobUri', 'type': 'str'}, + 'caching': {'key': 'caching', 'type': 'CachingTypes'}, + 'disk_size_gb': {'key': 'diskSizeGB', 'type': 'int'}, + 'storage_account_type': {'key': 'storageAccountType', 'type': 'str'}, + } + + def __init__(self, *, os_type, os_state, snapshot=None, managed_disk=None, blob_uri: str=None, caching=None, disk_size_gb: int=None, storage_account_type=None, **kwargs) -> None: + super(ImageOSDisk, self).__init__(**kwargs) + self.os_type = os_type + self.os_state = os_state + self.snapshot = snapshot + self.managed_disk = managed_disk + self.blob_uri = blob_uri + self.caching = caching + self.disk_size_gb = disk_size_gb + self.storage_account_type = storage_account_type + + +class SubResource(Model): + """SubResource. + + :param id: Resource Id + :type id: str + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + } + + def __init__(self, *, id: str=None, **kwargs) -> None: + super(SubResource, self).__init__(**kwargs) + self.id = id + + +class ImageReference(SubResource): + """Specifies information about the image to use. You can specify information + about platform images, marketplace images, or virtual machine images. This + element is required when you want to use a platform image, marketplace + image, or virtual machine image, but is not used in other creation + operations. + + :param id: Resource Id + :type id: str + :param publisher: The image publisher. + :type publisher: str + :param offer: Specifies the offer of the platform image or marketplace + image used to create the virtual machine. + :type offer: str + :param sku: The image SKU. + :type sku: str + :param version: Specifies the version of the platform image or marketplace + image used to create the virtual machine. The allowed formats are + Major.Minor.Build or 'latest'. Major, Minor, and Build are decimal + numbers. Specify 'latest' to use the latest version of an image available + at deploy time. Even if you use 'latest', the VM image will not + automatically update after deploy time even if a new version becomes + available. + :type version: str + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'publisher': {'key': 'publisher', 'type': 'str'}, + 'offer': {'key': 'offer', 'type': 'str'}, + 'sku': {'key': 'sku', 'type': 'str'}, + 'version': {'key': 'version', 'type': 'str'}, + } + + def __init__(self, *, id: str=None, publisher: str=None, offer: str=None, sku: str=None, version: str=None, **kwargs) -> None: + super(ImageReference, self).__init__(id=id, **kwargs) + self.publisher = publisher + self.offer = offer + self.sku = sku + self.version = version + + +class ImageStorageProfile(Model): + """Describes a storage profile. + + All required parameters must be populated in order to send to Azure. + + :param os_disk: Required. Specifies information about the operating system + disk used by the virtual machine.

    For more information about + disks, see [About disks and VHDs for Azure virtual + machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-about-disks-vhds?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). + :type os_disk: ~azure.mgmt.compute.v2017_03_30.models.ImageOSDisk + :param data_disks: Specifies the parameters that are used to add a data + disk to a virtual machine.

    For more information about disks, see + [About disks and VHDs for Azure virtual + machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-about-disks-vhds?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). + :type data_disks: + list[~azure.mgmt.compute.v2017_03_30.models.ImageDataDisk] + """ + + _validation = { + 'os_disk': {'required': True}, + } + + _attribute_map = { + 'os_disk': {'key': 'osDisk', 'type': 'ImageOSDisk'}, + 'data_disks': {'key': 'dataDisks', 'type': '[ImageDataDisk]'}, + } + + def __init__(self, *, os_disk, data_disks=None, **kwargs) -> None: + super(ImageStorageProfile, self).__init__(**kwargs) + self.os_disk = os_disk + self.data_disks = data_disks + + +class InnerError(Model): + """Inner error details. + + :param exceptiontype: The exception type. + :type exceptiontype: str + :param errordetail: The internal error message or exception dump. + :type errordetail: str + """ + + _attribute_map = { + 'exceptiontype': {'key': 'exceptiontype', 'type': 'str'}, + 'errordetail': {'key': 'errordetail', 'type': 'str'}, + } + + def __init__(self, *, exceptiontype: str=None, errordetail: str=None, **kwargs) -> None: + super(InnerError, self).__init__(**kwargs) + self.exceptiontype = exceptiontype + self.errordetail = errordetail + + +class InstanceViewStatus(Model): + """Instance view status. + + :param code: The status code. + :type code: str + :param level: The level code. Possible values include: 'Info', 'Warning', + 'Error' + :type level: str or + ~azure.mgmt.compute.v2017_03_30.models.StatusLevelTypes + :param display_status: The short localizable label for the status. + :type display_status: str + :param message: The detailed status message, including for alerts and + error messages. + :type message: str + :param time: The time of the status. + :type time: datetime + """ + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + 'level': {'key': 'level', 'type': 'StatusLevelTypes'}, + 'display_status': {'key': 'displayStatus', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + 'time': {'key': 'time', 'type': 'iso-8601'}, + } + + def __init__(self, *, code: str=None, level=None, display_status: str=None, message: str=None, time=None, **kwargs) -> None: + super(InstanceViewStatus, self).__init__(**kwargs) + self.code = code + self.level = level + self.display_status = display_status + self.message = message + self.time = time + + +class KeyVaultAndKeyReference(Model): + """Key Vault Key Url and vault id of KeK, KeK is optional and when provided is + used to unwrap the encryptionKey. + + All required parameters must be populated in order to send to Azure. + + :param source_vault: Required. Resource id of the KeyVault containing the + key or secret + :type source_vault: ~azure.mgmt.compute.v2017_03_30.models.SourceVault + :param key_url: Required. Url pointing to a key or secret in KeyVault + :type key_url: str + """ + + _validation = { + 'source_vault': {'required': True}, + 'key_url': {'required': True}, + } + + _attribute_map = { + 'source_vault': {'key': 'sourceVault', 'type': 'SourceVault'}, + 'key_url': {'key': 'keyUrl', 'type': 'str'}, + } + + def __init__(self, *, source_vault, key_url: str, **kwargs) -> None: + super(KeyVaultAndKeyReference, self).__init__(**kwargs) + self.source_vault = source_vault + self.key_url = key_url + + +class KeyVaultAndSecretReference(Model): + """Key Vault Secret Url and vault id of the encryption key . + + All required parameters must be populated in order to send to Azure. + + :param source_vault: Required. Resource id of the KeyVault containing the + key or secret + :type source_vault: ~azure.mgmt.compute.v2017_03_30.models.SourceVault + :param secret_url: Required. Url pointing to a key or secret in KeyVault + :type secret_url: str + """ + + _validation = { + 'source_vault': {'required': True}, + 'secret_url': {'required': True}, + } + + _attribute_map = { + 'source_vault': {'key': 'sourceVault', 'type': 'SourceVault'}, + 'secret_url': {'key': 'secretUrl', 'type': 'str'}, + } + + def __init__(self, *, source_vault, secret_url: str, **kwargs) -> None: + super(KeyVaultAndSecretReference, self).__init__(**kwargs) + self.source_vault = source_vault + self.secret_url = secret_url + + +class KeyVaultKeyReference(Model): + """Describes a reference to Key Vault Key. + + All required parameters must be populated in order to send to Azure. + + :param key_url: Required. The URL referencing a key encryption key in Key + Vault. + :type key_url: str + :param source_vault: Required. The relative URL of the Key Vault + containing the key. + :type source_vault: ~azure.mgmt.compute.v2017_03_30.models.SubResource + """ + + _validation = { + 'key_url': {'required': True}, + 'source_vault': {'required': True}, + } + + _attribute_map = { + 'key_url': {'key': 'keyUrl', 'type': 'str'}, + 'source_vault': {'key': 'sourceVault', 'type': 'SubResource'}, + } + + def __init__(self, *, key_url: str, source_vault, **kwargs) -> None: + super(KeyVaultKeyReference, self).__init__(**kwargs) + self.key_url = key_url + self.source_vault = source_vault + + +class KeyVaultSecretReference(Model): + """Describes a reference to Key Vault Secret. + + All required parameters must be populated in order to send to Azure. + + :param secret_url: Required. The URL referencing a secret in a Key Vault. + :type secret_url: str + :param source_vault: Required. The relative URL of the Key Vault + containing the secret. + :type source_vault: ~azure.mgmt.compute.v2017_03_30.models.SubResource + """ + + _validation = { + 'secret_url': {'required': True}, + 'source_vault': {'required': True}, + } + + _attribute_map = { + 'secret_url': {'key': 'secretUrl', 'type': 'str'}, + 'source_vault': {'key': 'sourceVault', 'type': 'SubResource'}, + } + + def __init__(self, *, secret_url: str, source_vault, **kwargs) -> None: + super(KeyVaultSecretReference, self).__init__(**kwargs) + self.secret_url = secret_url + self.source_vault = source_vault + + +class LinuxConfiguration(Model): + """Specifies the Linux operating system settings on the virtual machine. +

    For a list of supported Linux distributions, see [Linux on + Azure-Endorsed + Distributions](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-endorsed-distros?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json) +

    For running non-endorsed distributions, see [Information for + Non-Endorsed + Distributions](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-create-upload-generic?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json). + + :param disable_password_authentication: Specifies whether password + authentication should be disabled. + :type disable_password_authentication: bool + :param ssh: Specifies the ssh key configuration for a Linux OS. + :type ssh: ~azure.mgmt.compute.v2017_03_30.models.SshConfiguration + """ + + _attribute_map = { + 'disable_password_authentication': {'key': 'disablePasswordAuthentication', 'type': 'bool'}, + 'ssh': {'key': 'ssh', 'type': 'SshConfiguration'}, + } + + def __init__(self, *, disable_password_authentication: bool=None, ssh=None, **kwargs) -> None: + super(LinuxConfiguration, self).__init__(**kwargs) + self.disable_password_authentication = disable_password_authentication + self.ssh = ssh + + +class MaintenanceRedeployStatus(Model): + """Maintenance Operation Status. + + :param is_customer_initiated_maintenance_allowed: True, if customer is + allowed to perform Maintenance. + :type is_customer_initiated_maintenance_allowed: bool + :param pre_maintenance_window_start_time: Start Time for the Pre + Maintenance Window. + :type pre_maintenance_window_start_time: datetime + :param pre_maintenance_window_end_time: End Time for the Pre Maintenance + Window. + :type pre_maintenance_window_end_time: datetime + :param maintenance_window_start_time: Start Time for the Maintenance + Window. + :type maintenance_window_start_time: datetime + :param maintenance_window_end_time: End Time for the Maintenance Window. + :type maintenance_window_end_time: datetime + :param last_operation_result_code: The Last Maintenance Operation Result + Code. Possible values include: 'None', 'RetryLater', 'MaintenanceAborted', + 'MaintenanceCompleted' + :type last_operation_result_code: str or + ~azure.mgmt.compute.v2017_03_30.models.MaintenanceOperationResultCodeTypes + :param last_operation_message: Message returned for the last Maintenance + Operation. + :type last_operation_message: str + """ + + _attribute_map = { + 'is_customer_initiated_maintenance_allowed': {'key': 'isCustomerInitiatedMaintenanceAllowed', 'type': 'bool'}, + 'pre_maintenance_window_start_time': {'key': 'preMaintenanceWindowStartTime', 'type': 'iso-8601'}, + 'pre_maintenance_window_end_time': {'key': 'preMaintenanceWindowEndTime', 'type': 'iso-8601'}, + 'maintenance_window_start_time': {'key': 'maintenanceWindowStartTime', 'type': 'iso-8601'}, + 'maintenance_window_end_time': {'key': 'maintenanceWindowEndTime', 'type': 'iso-8601'}, + 'last_operation_result_code': {'key': 'lastOperationResultCode', 'type': 'MaintenanceOperationResultCodeTypes'}, + 'last_operation_message': {'key': 'lastOperationMessage', 'type': 'str'}, + } + + def __init__(self, *, is_customer_initiated_maintenance_allowed: bool=None, pre_maintenance_window_start_time=None, pre_maintenance_window_end_time=None, maintenance_window_start_time=None, maintenance_window_end_time=None, last_operation_result_code=None, last_operation_message: str=None, **kwargs) -> None: + super(MaintenanceRedeployStatus, self).__init__(**kwargs) + self.is_customer_initiated_maintenance_allowed = is_customer_initiated_maintenance_allowed + self.pre_maintenance_window_start_time = pre_maintenance_window_start_time + self.pre_maintenance_window_end_time = pre_maintenance_window_end_time + self.maintenance_window_start_time = maintenance_window_start_time + self.maintenance_window_end_time = maintenance_window_end_time + self.last_operation_result_code = last_operation_result_code + self.last_operation_message = last_operation_message + + +class ManagedDiskParameters(SubResource): + """The parameters of a managed disk. + + :param id: Resource Id + :type id: str + :param storage_account_type: Specifies the storage account type for the + managed disk. Possible values are: Standard_LRS or Premium_LRS. Possible + values include: 'Standard_LRS', 'Premium_LRS' + :type storage_account_type: str or + ~azure.mgmt.compute.v2017_03_30.models.StorageAccountTypes + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'storage_account_type': {'key': 'storageAccountType', 'type': 'str'}, + } + + def __init__(self, *, id: str=None, storage_account_type=None, **kwargs) -> None: + super(ManagedDiskParameters, self).__init__(id=id, **kwargs) + self.storage_account_type = storage_account_type + + +class NetworkInterfaceReference(SubResource): + """Describes a network interface reference. + + :param id: Resource Id + :type id: str + :param primary: Specifies the primary network interface in case the + virtual machine has more than 1 network interface. + :type primary: bool + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'primary': {'key': 'properties.primary', 'type': 'bool'}, + } + + def __init__(self, *, id: str=None, primary: bool=None, **kwargs) -> None: + super(NetworkInterfaceReference, self).__init__(id=id, **kwargs) + self.primary = primary + + +class NetworkProfile(Model): + """Specifies the network interfaces of the virtual machine. + + :param network_interfaces: Specifies the list of resource Ids for the + network interfaces associated with the virtual machine. + :type network_interfaces: + list[~azure.mgmt.compute.v2017_03_30.models.NetworkInterfaceReference] + """ + + _attribute_map = { + 'network_interfaces': {'key': 'networkInterfaces', 'type': '[NetworkInterfaceReference]'}, + } + + def __init__(self, *, network_interfaces=None, **kwargs) -> None: + super(NetworkProfile, self).__init__(**kwargs) + self.network_interfaces = network_interfaces + + +class OperationStatusResponse(Model): + """Operation status response. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar name: Operation ID + :vartype name: str + :ivar status: Operation status + :vartype status: str + :ivar start_time: Start time of the operation + :vartype start_time: datetime + :ivar end_time: End time of the operation + :vartype end_time: datetime + :ivar error: Api error + :vartype error: ~azure.mgmt.compute.v2017_03_30.models.ApiError + """ + + _validation = { + 'name': {'readonly': True}, + 'status': {'readonly': True}, + 'start_time': {'readonly': True}, + 'end_time': {'readonly': True}, + 'error': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'status': {'key': 'status', 'type': 'str'}, + 'start_time': {'key': 'startTime', 'type': 'iso-8601'}, + 'end_time': {'key': 'endTime', 'type': 'iso-8601'}, + 'error': {'key': 'error', 'type': 'ApiError'}, + } + + def __init__(self, **kwargs) -> None: + super(OperationStatusResponse, self).__init__(**kwargs) + self.name = None + self.status = None + self.start_time = None + self.end_time = None + self.error = None + + +class OSDisk(Model): + """Specifies information about the operating system disk used by the virtual + machine.

    For more information about disks, see [About disks and + VHDs for Azure virtual + machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-about-disks-vhds?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). + + All required parameters must be populated in order to send to Azure. + + :param os_type: This property allows you to specify the type of the OS + that is included in the disk if creating a VM from user-image or a + specialized VHD.

    Possible values are:

    **Windows** +

    **Linux**. Possible values include: 'Windows', 'Linux' + :type os_type: str or + ~azure.mgmt.compute.v2017_03_30.models.OperatingSystemTypes + :param encryption_settings: Specifies the encryption settings for the OS + Disk.

    Minimum api-version: 2015-06-15 + :type encryption_settings: + ~azure.mgmt.compute.v2017_03_30.models.DiskEncryptionSettings + :param name: The disk name. + :type name: str + :param vhd: The virtual hard disk. + :type vhd: ~azure.mgmt.compute.v2017_03_30.models.VirtualHardDisk + :param image: The source user image virtual hard disk. The virtual hard + disk will be copied before being attached to the virtual machine. If + SourceImage is provided, the destination virtual hard drive must not + exist. + :type image: ~azure.mgmt.compute.v2017_03_30.models.VirtualHardDisk + :param caching: Specifies the caching requirements.

    Possible + values are:

    **None**

    **ReadOnly**

    **ReadWrite** +

    Default: **None for Standard storage. ReadOnly for Premium + storage**. Possible values include: 'None', 'ReadOnly', 'ReadWrite' + :type caching: str or ~azure.mgmt.compute.v2017_03_30.models.CachingTypes + :param create_option: Required. Specifies how the virtual machine should + be created.

    Possible values are:

    **Attach** \\u2013 This + value is used when you are using a specialized disk to create the virtual + machine.

    **FromImage** \\u2013 This value is used when you are + using an image to create the virtual machine. If you are using a platform + image, you also use the imageReference element described above. If you are + using a marketplace image, you also use the plan element previously + described. Possible values include: 'FromImage', 'Empty', 'Attach' + :type create_option: str or + ~azure.mgmt.compute.v2017_03_30.models.DiskCreateOptionTypes + :param disk_size_gb: Specifies the size of an empty data disk in + gigabytes. This element can be used to overwrite the size of the disk in a + virtual machine image.

    This value cannot be larger than 1023 GB + :type disk_size_gb: int + :param managed_disk: The managed disk parameters. + :type managed_disk: + ~azure.mgmt.compute.v2017_03_30.models.ManagedDiskParameters + """ + + _validation = { + 'create_option': {'required': True}, + } + + _attribute_map = { + 'os_type': {'key': 'osType', 'type': 'OperatingSystemTypes'}, + 'encryption_settings': {'key': 'encryptionSettings', 'type': 'DiskEncryptionSettings'}, + 'name': {'key': 'name', 'type': 'str'}, + 'vhd': {'key': 'vhd', 'type': 'VirtualHardDisk'}, + 'image': {'key': 'image', 'type': 'VirtualHardDisk'}, + 'caching': {'key': 'caching', 'type': 'CachingTypes'}, + 'create_option': {'key': 'createOption', 'type': 'DiskCreateOptionTypes'}, + 'disk_size_gb': {'key': 'diskSizeGB', 'type': 'int'}, + 'managed_disk': {'key': 'managedDisk', 'type': 'ManagedDiskParameters'}, + } + + def __init__(self, *, create_option, os_type=None, encryption_settings=None, name: str=None, vhd=None, image=None, caching=None, disk_size_gb: int=None, managed_disk=None, **kwargs) -> None: + super(OSDisk, self).__init__(**kwargs) + self.os_type = os_type + self.encryption_settings = encryption_settings + self.name = name + self.vhd = vhd + self.image = image + self.caching = caching + self.create_option = create_option + self.disk_size_gb = disk_size_gb + self.managed_disk = managed_disk + + +class OSDiskImage(Model): + """Contains the os disk image information. + + All required parameters must be populated in order to send to Azure. + + :param operating_system: Required. The operating system of the + osDiskImage. Possible values include: 'Windows', 'Linux' + :type operating_system: str or + ~azure.mgmt.compute.v2017_03_30.models.OperatingSystemTypes + """ + + _validation = { + 'operating_system': {'required': True}, + } + + _attribute_map = { + 'operating_system': {'key': 'operatingSystem', 'type': 'OperatingSystemTypes'}, + } + + def __init__(self, *, operating_system, **kwargs) -> None: + super(OSDiskImage, self).__init__(**kwargs) + self.operating_system = operating_system + + +class OSProfile(Model): + """Specifies the operating system settings for the virtual machine. + + :param computer_name: Specifies the host OS name of the virtual machine. +

    This name cannot be updated after the VM is created.

    + **Max-length (Windows):** 15 characters

    **Max-length (Linux):** + 64 characters.

    For naming conventions and restrictions see [Azure + infrastructure services implementation + guidelines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-infrastructure-subscription-accounts-guidelines?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json#1-naming-conventions). + :type computer_name: str + :param admin_username: Specifies the name of the administrator account. +

    **Windows-only restriction:** Cannot end in "."

    + **Disallowed values:** "administrator", "admin", "user", "user1", "test", + "user2", "test1", "user3", "admin1", "1", "123", "a", "actuser", "adm", + "admin2", "aspnet", "backup", "console", "david", "guest", "john", + "owner", "root", "server", "sql", "support", "support_388945a0", "sys", + "test2", "test3", "user4", "user5".

    **Minimum-length (Linux):** 1 + character

    **Max-length (Linux):** 64 characters

    + **Max-length (Windows):** 20 characters

  • For root access to + the Linux VM, see [Using root privileges on Linux virtual machines in + Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-use-root-privileges?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json)
  • + For a list of built-in system users on Linux that should not be used in + this field, see [Selecting User Names for Linux on + Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-usernames?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json) + :type admin_username: str + :param admin_password: Specifies the password of the administrator + account.

    **Minimum-length (Windows):** 8 characters

    + **Minimum-length (Linux):** 6 characters

    **Max-length + (Windows):** 123 characters

    **Max-length (Linux):** 72 characters +

    **Complexity requirements:** 3 out of 4 conditions below need to + be fulfilled
    Has lower characters
    Has upper characters
    Has a + digit
    Has a special character (Regex match [\\W_])

    + **Disallowed values:** "abc@123", "P@$$w0rd", "P@ssw0rd", "P@ssword123", + "Pa$$word", "pass@word1", "Password!", "Password1", "Password22", + "iloveyou!"

    For resetting the password, see [How to reset the + Remote Desktop service or its login password in a Windows + VM](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-reset-rdp?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json) +

    For resetting root password, see [Manage users, SSH, and check or + repair disks on Azure Linux VMs using the VMAccess + Extension](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-using-vmaccess-extension?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json#reset-root-password) + :type admin_password: str + :param custom_data: Specifies a base-64 encoded string of custom data. The + base-64 encoded string is decoded to a binary array that is saved as a + file on the Virtual Machine. The maximum length of the binary array is + 65535 bytes.

    For using cloud-init for your VM, see [Using + cloud-init to customize a Linux VM during + creation](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-using-cloud-init?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json) + :type custom_data: str + :param windows_configuration: Specifies Windows operating system settings + on the virtual machine. + :type windows_configuration: + ~azure.mgmt.compute.v2017_03_30.models.WindowsConfiguration + :param linux_configuration: Specifies the Linux operating system settings + on the virtual machine.

    For a list of supported Linux + distributions, see [Linux on Azure-Endorsed + Distributions](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-endorsed-distros?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json) +

    For running non-endorsed distributions, see [Information for + Non-Endorsed + Distributions](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-create-upload-generic?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json). + :type linux_configuration: + ~azure.mgmt.compute.v2017_03_30.models.LinuxConfiguration + :param secrets: Specifies set of certificates that should be installed + onto the virtual machine. + :type secrets: + list[~azure.mgmt.compute.v2017_03_30.models.VaultSecretGroup] + """ + + _attribute_map = { + 'computer_name': {'key': 'computerName', 'type': 'str'}, + 'admin_username': {'key': 'adminUsername', 'type': 'str'}, + 'admin_password': {'key': 'adminPassword', 'type': 'str'}, + 'custom_data': {'key': 'customData', 'type': 'str'}, + 'windows_configuration': {'key': 'windowsConfiguration', 'type': 'WindowsConfiguration'}, + 'linux_configuration': {'key': 'linuxConfiguration', 'type': 'LinuxConfiguration'}, + 'secrets': {'key': 'secrets', 'type': '[VaultSecretGroup]'}, + } + + def __init__(self, *, computer_name: str=None, admin_username: str=None, admin_password: str=None, custom_data: str=None, windows_configuration=None, linux_configuration=None, secrets=None, **kwargs) -> None: + super(OSProfile, self).__init__(**kwargs) + self.computer_name = computer_name + self.admin_username = admin_username + self.admin_password = admin_password + self.custom_data = custom_data + self.windows_configuration = windows_configuration + self.linux_configuration = linux_configuration + self.secrets = secrets + + +class Plan(Model): + """Specifies information about the marketplace image used to create the + virtual machine. This element is only used for marketplace images. Before + you can use a marketplace image from an API, you must enable the image for + programmatic use. In the Azure portal, find the marketplace image that you + want to use and then click **Want to deploy programmatically, Get Started + ->**. Enter any required information and then click **Save**. + + :param name: The plan ID. + :type name: str + :param publisher: The publisher ID. + :type publisher: str + :param product: Specifies the product of the image from the marketplace. + This is the same value as Offer under the imageReference element. + :type product: str + :param promotion_code: The promotion code. + :type promotion_code: str + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'publisher': {'key': 'publisher', 'type': 'str'}, + 'product': {'key': 'product', 'type': 'str'}, + 'promotion_code': {'key': 'promotionCode', 'type': 'str'}, + } + + def __init__(self, *, name: str=None, publisher: str=None, product: str=None, promotion_code: str=None, **kwargs) -> None: + super(Plan, self).__init__(**kwargs) + self.name = name + self.publisher = publisher + self.product = product + self.promotion_code = promotion_code + + +class PurchasePlan(Model): + """Used for establishing the purchase context of any 3rd Party artifact + through MarketPlace. + + All required parameters must be populated in order to send to Azure. + + :param publisher: Required. The publisher ID. + :type publisher: str + :param name: Required. The plan ID. + :type name: str + :param product: Required. Specifies the product of the image from the + marketplace. This is the same value as Offer under the imageReference + element. + :type product: str + """ + + _validation = { + 'publisher': {'required': True}, + 'name': {'required': True}, + 'product': {'required': True}, + } + + _attribute_map = { + 'publisher': {'key': 'publisher', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'product': {'key': 'product', 'type': 'str'}, + } + + def __init__(self, *, publisher: str, name: str, product: str, **kwargs) -> None: + super(PurchasePlan, self).__init__(**kwargs) + self.publisher = publisher + self.name = name + self.product = product + + +class ResourceSku(Model): + """Describes an available Compute SKU. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar resource_type: The type of resource the SKU applies to. + :vartype resource_type: str + :ivar name: The name of SKU. + :vartype name: str + :ivar tier: Specifies the tier of virtual machines in a scale set.

    Possible Values:

    **Standard**

    **Basic** + :vartype tier: str + :ivar size: The Size of the SKU. + :vartype size: str + :ivar family: The Family of this particular SKU. + :vartype family: str + :ivar kind: The Kind of resources that are supported in this SKU. + :vartype kind: str + :ivar capacity: Specifies the number of virtual machines in the scale set. + :vartype capacity: + ~azure.mgmt.compute.v2017_03_30.models.ResourceSkuCapacity + :ivar locations: The set of locations that the SKU is available. + :vartype locations: list[str] + :ivar api_versions: The api versions that support this SKU. + :vartype api_versions: list[str] + :ivar costs: Metadata for retrieving price info. + :vartype costs: + list[~azure.mgmt.compute.v2017_03_30.models.ResourceSkuCosts] + :ivar capabilities: A name value pair to describe the capability. + :vartype capabilities: + list[~azure.mgmt.compute.v2017_03_30.models.ResourceSkuCapabilities] + :ivar restrictions: The restrictions because of which SKU cannot be used. + This is empty if there are no restrictions. + :vartype restrictions: + list[~azure.mgmt.compute.v2017_03_30.models.ResourceSkuRestrictions] + """ + + _validation = { + 'resource_type': {'readonly': True}, + 'name': {'readonly': True}, + 'tier': {'readonly': True}, + 'size': {'readonly': True}, + 'family': {'readonly': True}, + 'kind': {'readonly': True}, + 'capacity': {'readonly': True}, + 'locations': {'readonly': True}, + 'api_versions': {'readonly': True}, + 'costs': {'readonly': True}, + 'capabilities': {'readonly': True}, + 'restrictions': {'readonly': True}, + } + + _attribute_map = { + 'resource_type': {'key': 'resourceType', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'tier': {'key': 'tier', 'type': 'str'}, + 'size': {'key': 'size', 'type': 'str'}, + 'family': {'key': 'family', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'capacity': {'key': 'capacity', 'type': 'ResourceSkuCapacity'}, + 'locations': {'key': 'locations', 'type': '[str]'}, + 'api_versions': {'key': 'apiVersions', 'type': '[str]'}, + 'costs': {'key': 'costs', 'type': '[ResourceSkuCosts]'}, + 'capabilities': {'key': 'capabilities', 'type': '[ResourceSkuCapabilities]'}, + 'restrictions': {'key': 'restrictions', 'type': '[ResourceSkuRestrictions]'}, + } + + def __init__(self, **kwargs) -> None: + super(ResourceSku, self).__init__(**kwargs) + self.resource_type = None + self.name = None + self.tier = None + self.size = None + self.family = None + self.kind = None + self.capacity = None + self.locations = None + self.api_versions = None + self.costs = None + self.capabilities = None + self.restrictions = None + + +class ResourceSkuCapabilities(Model): + """Describes The SKU capabilities object. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar name: An invariant to describe the feature. + :vartype name: str + :ivar value: An invariant if the feature is measured by quantity. + :vartype value: str + """ + + _validation = { + 'name': {'readonly': True}, + 'value': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'value': {'key': 'value', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(ResourceSkuCapabilities, self).__init__(**kwargs) + self.name = None + self.value = None + + +class ResourceSkuCapacity(Model): + """Describes scaling information of a SKU. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar minimum: The minimum capacity. + :vartype minimum: long + :ivar maximum: The maximum capacity that can be set. + :vartype maximum: long + :ivar default: The default capacity. + :vartype default: long + :ivar scale_type: The scale type applicable to the sku. Possible values + include: 'Automatic', 'Manual', 'None' + :vartype scale_type: str or + ~azure.mgmt.compute.v2017_03_30.models.ResourceSkuCapacityScaleType + """ + + _validation = { + 'minimum': {'readonly': True}, + 'maximum': {'readonly': True}, + 'default': {'readonly': True}, + 'scale_type': {'readonly': True}, + } + + _attribute_map = { + 'minimum': {'key': 'minimum', 'type': 'long'}, + 'maximum': {'key': 'maximum', 'type': 'long'}, + 'default': {'key': 'default', 'type': 'long'}, + 'scale_type': {'key': 'scaleType', 'type': 'ResourceSkuCapacityScaleType'}, + } + + def __init__(self, **kwargs) -> None: + super(ResourceSkuCapacity, self).__init__(**kwargs) + self.minimum = None + self.maximum = None + self.default = None + self.scale_type = None + + +class ResourceSkuCosts(Model): + """Describes metadata for retrieving price info. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar meter_id: Used for querying price from commerce. + :vartype meter_id: str + :ivar quantity: The multiplier is needed to extend the base metered cost. + :vartype quantity: long + :ivar extended_unit: An invariant to show the extended unit. + :vartype extended_unit: str + """ + + _validation = { + 'meter_id': {'readonly': True}, + 'quantity': {'readonly': True}, + 'extended_unit': {'readonly': True}, + } + + _attribute_map = { + 'meter_id': {'key': 'meterID', 'type': 'str'}, + 'quantity': {'key': 'quantity', 'type': 'long'}, + 'extended_unit': {'key': 'extendedUnit', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(ResourceSkuCosts, self).__init__(**kwargs) + self.meter_id = None + self.quantity = None + self.extended_unit = None + + +class ResourceSkuRestrictions(Model): + """Describes scaling information of a SKU. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar type: The type of restrictions. Possible values include: 'Location' + :vartype type: str or + ~azure.mgmt.compute.v2017_03_30.models.ResourceSkuRestrictionsType + :ivar values: The value of restrictions. If the restriction type is set to + location. This would be different locations where the SKU is restricted. + :vartype values: list[str] + :ivar reason_code: The reason for restriction. Possible values include: + 'QuotaId', 'NotAvailableForSubscription' + :vartype reason_code: str or + ~azure.mgmt.compute.v2017_03_30.models.ResourceSkuRestrictionsReasonCode + """ + + _validation = { + 'type': {'readonly': True}, + 'values': {'readonly': True}, + 'reason_code': {'readonly': True}, + } + + _attribute_map = { + 'type': {'key': 'type', 'type': 'ResourceSkuRestrictionsType'}, + 'values': {'key': 'values', 'type': '[str]'}, + 'reason_code': {'key': 'reasonCode', 'type': 'ResourceSkuRestrictionsReasonCode'}, + } + + def __init__(self, **kwargs) -> None: + super(ResourceSkuRestrictions, self).__init__(**kwargs) + self.type = None + self.values = None + self.reason_code = None + + +class RollingUpgradePolicy(Model): + """The configuration parameters used while performing a rolling upgrade. + + :param max_batch_instance_percent: The maximum percent of total virtual + machine instances that will be upgraded simultaneously by the rolling + upgrade in one batch. As this is a maximum, unhealthy instances in + previous or future batches can cause the percentage of instances in a + batch to decrease to ensure higher reliability. The default value for this + parameter is 20%. + :type max_batch_instance_percent: int + :param max_unhealthy_instance_percent: The maximum percentage of the total + virtual machine instances in the scale set that can be simultaneously + unhealthy, either as a result of being upgraded, or by being found in an + unhealthy state by the virtual machine health checks before the rolling + upgrade aborts. This constraint will be checked prior to starting any + batch. The default value for this parameter is 20%. + :type max_unhealthy_instance_percent: int + :param max_unhealthy_upgraded_instance_percent: The maximum percentage of + upgraded virtual machine instances that can be found to be in an unhealthy + state. This check will happen after each batch is upgraded. If this + percentage is ever exceeded, the rolling update aborts. The default value + for this parameter is 20%. + :type max_unhealthy_upgraded_instance_percent: int + :param pause_time_between_batches: The wait time between completing the + update for all virtual machines in one batch and starting the next batch. + The time duration should be specified in ISO 8601 format. The default + value is 0 seconds (PT0S). + :type pause_time_between_batches: str + """ + + _validation = { + 'max_batch_instance_percent': {'maximum': 100, 'minimum': 5}, + 'max_unhealthy_instance_percent': {'maximum': 100, 'minimum': 5}, + 'max_unhealthy_upgraded_instance_percent': {'maximum': 100, 'minimum': 0}, + } + + _attribute_map = { + 'max_batch_instance_percent': {'key': 'maxBatchInstancePercent', 'type': 'int'}, + 'max_unhealthy_instance_percent': {'key': 'maxUnhealthyInstancePercent', 'type': 'int'}, + 'max_unhealthy_upgraded_instance_percent': {'key': 'maxUnhealthyUpgradedInstancePercent', 'type': 'int'}, + 'pause_time_between_batches': {'key': 'pauseTimeBetweenBatches', 'type': 'str'}, + } + + def __init__(self, *, max_batch_instance_percent: int=None, max_unhealthy_instance_percent: int=None, max_unhealthy_upgraded_instance_percent: int=None, pause_time_between_batches: str=None, **kwargs) -> None: + super(RollingUpgradePolicy, self).__init__(**kwargs) + self.max_batch_instance_percent = max_batch_instance_percent + self.max_unhealthy_instance_percent = max_unhealthy_instance_percent + self.max_unhealthy_upgraded_instance_percent = max_unhealthy_upgraded_instance_percent + self.pause_time_between_batches = pause_time_between_batches + + +class RollingUpgradeProgressInfo(Model): + """Information about the number of virtual machine instances in each upgrade + state. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar successful_instance_count: The number of instances that have been + successfully upgraded. + :vartype successful_instance_count: int + :ivar failed_instance_count: The number of instances that have failed to + be upgraded successfully. + :vartype failed_instance_count: int + :ivar in_progress_instance_count: The number of instances that are + currently being upgraded. + :vartype in_progress_instance_count: int + :ivar pending_instance_count: The number of instances that have not yet + begun to be upgraded. + :vartype pending_instance_count: int + """ + + _validation = { + 'successful_instance_count': {'readonly': True}, + 'failed_instance_count': {'readonly': True}, + 'in_progress_instance_count': {'readonly': True}, + 'pending_instance_count': {'readonly': True}, + } + + _attribute_map = { + 'successful_instance_count': {'key': 'successfulInstanceCount', 'type': 'int'}, + 'failed_instance_count': {'key': 'failedInstanceCount', 'type': 'int'}, + 'in_progress_instance_count': {'key': 'inProgressInstanceCount', 'type': 'int'}, + 'pending_instance_count': {'key': 'pendingInstanceCount', 'type': 'int'}, + } + + def __init__(self, **kwargs) -> None: + super(RollingUpgradeProgressInfo, self).__init__(**kwargs) + self.successful_instance_count = None + self.failed_instance_count = None + self.in_progress_instance_count = None + self.pending_instance_count = None + + +class RollingUpgradeRunningStatus(Model): + """Information about the current running state of the overall upgrade. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar code: Code indicating the current status of the upgrade. Possible + values include: 'RollingForward', 'Cancelled', 'Completed', 'Faulted' + :vartype code: str or + ~azure.mgmt.compute.v2017_03_30.models.RollingUpgradeStatusCode + :ivar start_time: Start time of the upgrade. + :vartype start_time: datetime + :ivar last_action: The last action performed on the rolling upgrade. + Possible values include: 'Start', 'Cancel' + :vartype last_action: str or + ~azure.mgmt.compute.v2017_03_30.models.RollingUpgradeActionType + :ivar last_action_time: Last action time of the upgrade. + :vartype last_action_time: datetime + """ + + _validation = { + 'code': {'readonly': True}, + 'start_time': {'readonly': True}, + 'last_action': {'readonly': True}, + 'last_action_time': {'readonly': True}, + } + + _attribute_map = { + 'code': {'key': 'code', 'type': 'RollingUpgradeStatusCode'}, + 'start_time': {'key': 'startTime', 'type': 'iso-8601'}, + 'last_action': {'key': 'lastAction', 'type': 'RollingUpgradeActionType'}, + 'last_action_time': {'key': 'lastActionTime', 'type': 'iso-8601'}, + } + + def __init__(self, **kwargs) -> None: + super(RollingUpgradeRunningStatus, self).__init__(**kwargs) + self.code = None + self.start_time = None + self.last_action = None + self.last_action_time = None + + +class RollingUpgradeStatusInfo(Resource): + """The status of the latest virtual machine scale set rolling upgrade. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource Id + :vartype id: str + :ivar name: Resource name + :vartype name: str + :ivar type: Resource type + :vartype type: str + :param location: Required. Resource location + :type location: str + :param tags: Resource tags + :type tags: dict[str, str] + :ivar policy: The rolling upgrade policies applied for this upgrade. + :vartype policy: + ~azure.mgmt.compute.v2017_03_30.models.RollingUpgradePolicy + :ivar running_status: Information about the current running state of the + overall upgrade. + :vartype running_status: + ~azure.mgmt.compute.v2017_03_30.models.RollingUpgradeRunningStatus + :ivar progress: Information about the number of virtual machine instances + in each upgrade state. + :vartype progress: + ~azure.mgmt.compute.v2017_03_30.models.RollingUpgradeProgressInfo + :ivar error: Error details for this upgrade, if there are any. + :vartype error: ~azure.mgmt.compute.v2017_03_30.models.ApiError + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + 'policy': {'readonly': True}, + 'running_status': {'readonly': True}, + 'progress': {'readonly': True}, + 'error': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'policy': {'key': 'properties.policy', 'type': 'RollingUpgradePolicy'}, + 'running_status': {'key': 'properties.runningStatus', 'type': 'RollingUpgradeRunningStatus'}, + 'progress': {'key': 'properties.progress', 'type': 'RollingUpgradeProgressInfo'}, + 'error': {'key': 'properties.error', 'type': 'ApiError'}, + } + + def __init__(self, *, location: str, tags=None, **kwargs) -> None: + super(RollingUpgradeStatusInfo, self).__init__(location=location, tags=tags, **kwargs) + self.policy = None + self.running_status = None + self.progress = None + self.error = None + + +class RunCommandDocumentBase(Model): + """Describes the properties of a Run Command metadata. + + All required parameters must be populated in order to send to Azure. + + :param schema: Required. The VM run command schema. + :type schema: str + :param id: Required. The VM run command id. + :type id: str + :param os_type: Required. The Operating System type. Possible values + include: 'Windows', 'Linux' + :type os_type: str or + ~azure.mgmt.compute.v2017_03_30.models.OperatingSystemTypes + :param label: Required. The VM run command label. + :type label: str + :param description: Required. The VM run command description. + :type description: str + """ + + _validation = { + 'schema': {'required': True}, + 'id': {'required': True}, + 'os_type': {'required': True}, + 'label': {'required': True}, + 'description': {'required': True}, + } + + _attribute_map = { + 'schema': {'key': '$schema', 'type': 'str'}, + 'id': {'key': 'id', 'type': 'str'}, + 'os_type': {'key': 'osType', 'type': 'OperatingSystemTypes'}, + 'label': {'key': 'label', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + } + + def __init__(self, *, schema: str, id: str, os_type, label: str, description: str, **kwargs) -> None: + super(RunCommandDocumentBase, self).__init__(**kwargs) + self.schema = schema + self.id = id + self.os_type = os_type + self.label = label + self.description = description + + +class RunCommandDocument(RunCommandDocumentBase): + """Describes the properties of a Run Command. + + All required parameters must be populated in order to send to Azure. + + :param schema: Required. The VM run command schema. + :type schema: str + :param id: Required. The VM run command id. + :type id: str + :param os_type: Required. The Operating System type. Possible values + include: 'Windows', 'Linux' + :type os_type: str or + ~azure.mgmt.compute.v2017_03_30.models.OperatingSystemTypes + :param label: Required. The VM run command label. + :type label: str + :param description: Required. The VM run command description. + :type description: str + :param script: Required. The script to be executed. + :type script: list[str] + :param parameters: The parameters used by the script. + :type parameters: + list[~azure.mgmt.compute.v2017_03_30.models.RunCommandParameterDefinition] + """ + + _validation = { + 'schema': {'required': True}, + 'id': {'required': True}, + 'os_type': {'required': True}, + 'label': {'required': True}, + 'description': {'required': True}, + 'script': {'required': True}, + } + + _attribute_map = { + 'schema': {'key': '$schema', 'type': 'str'}, + 'id': {'key': 'id', 'type': 'str'}, + 'os_type': {'key': 'osType', 'type': 'OperatingSystemTypes'}, + 'label': {'key': 'label', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + 'script': {'key': 'script', 'type': '[str]'}, + 'parameters': {'key': 'parameters', 'type': '[RunCommandParameterDefinition]'}, + } + + def __init__(self, *, schema: str, id: str, os_type, label: str, description: str, script, parameters=None, **kwargs) -> None: + super(RunCommandDocument, self).__init__(schema=schema, id=id, os_type=os_type, label=label, description=description, **kwargs) + self.script = script + self.parameters = parameters + + +class RunCommandInput(Model): + """Capture Virtual Machine parameters. + + All required parameters must be populated in order to send to Azure. + + :param command_id: Required. The run command id. + :type command_id: str + :param script: Optional. The script to be executed. When this value is + given, the given script will override the default script of the command. + :type script: list[str] + :param parameters: The run command parameters. + :type parameters: + list[~azure.mgmt.compute.v2017_03_30.models.RunCommandInputParameter] + """ + + _validation = { + 'command_id': {'required': True}, + } + + _attribute_map = { + 'command_id': {'key': 'commandId', 'type': 'str'}, + 'script': {'key': 'script', 'type': '[str]'}, + 'parameters': {'key': 'parameters', 'type': '[RunCommandInputParameter]'}, + } + + def __init__(self, *, command_id: str, script=None, parameters=None, **kwargs) -> None: + super(RunCommandInput, self).__init__(**kwargs) + self.command_id = command_id + self.script = script + self.parameters = parameters + + +class RunCommandInputParameter(Model): + """Describes the properties of a run command parameter. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. The run command parameter name. + :type name: str + :param value: Required. The run command parameter value. + :type value: str + """ + + _validation = { + 'name': {'required': True}, + 'value': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'value': {'key': 'value', 'type': 'str'}, + } + + def __init__(self, *, name: str, value: str, **kwargs) -> None: + super(RunCommandInputParameter, self).__init__(**kwargs) + self.name = name + self.value = value + + +class RunCommandParameterDefinition(Model): + """Describes the properties of a run command parameter. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. The run command parameter name. + :type name: str + :param type: Required. The run command parameter type. + :type type: str + :param default_value: The run command parameter default value. + :type default_value: str + :param required: The run command parameter required. Default value: False + . + :type required: bool + """ + + _validation = { + 'name': {'required': True}, + 'type': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'default_value': {'key': 'defaultValue', 'type': 'str'}, + 'required': {'key': 'required', 'type': 'bool'}, + } + + def __init__(self, *, name: str, type: str, default_value: str=None, required: bool=False, **kwargs) -> None: + super(RunCommandParameterDefinition, self).__init__(**kwargs) + self.name = name + self.type = type + self.default_value = default_value + self.required = required + + +class RunCommandResult(OperationStatusResponse): + """Run command operation response. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar name: Operation ID + :vartype name: str + :ivar status: Operation status + :vartype status: str + :ivar start_time: Start time of the operation + :vartype start_time: datetime + :ivar end_time: End time of the operation + :vartype end_time: datetime + :ivar error: Api error + :vartype error: ~azure.mgmt.compute.v2017_03_30.models.ApiError + :param output: Operation output data (raw JSON) + :type output: object + """ + + _validation = { + 'name': {'readonly': True}, + 'status': {'readonly': True}, + 'start_time': {'readonly': True}, + 'end_time': {'readonly': True}, + 'error': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'status': {'key': 'status', 'type': 'str'}, + 'start_time': {'key': 'startTime', 'type': 'iso-8601'}, + 'end_time': {'key': 'endTime', 'type': 'iso-8601'}, + 'error': {'key': 'error', 'type': 'ApiError'}, + 'output': {'key': 'properties.output', 'type': 'object'}, + } + + def __init__(self, *, output=None, **kwargs) -> None: + super(RunCommandResult, self).__init__(**kwargs) + self.output = output + + +class Sku(Model): + """Describes a virtual machine scale set sku. + + :param name: The sku name. + :type name: str + :param tier: Specifies the tier of virtual machines in a scale set.

    Possible Values:

    **Standard**

    **Basic** + :type tier: str + :param capacity: Specifies the number of virtual machines in the scale + set. + :type capacity: long + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'tier': {'key': 'tier', 'type': 'str'}, + 'capacity': {'key': 'capacity', 'type': 'long'}, + } + + def __init__(self, *, name: str=None, tier: str=None, capacity: int=None, **kwargs) -> None: + super(Sku, self).__init__(**kwargs) + self.name = name + self.tier = tier + self.capacity = capacity + + +class Snapshot(Resource): + """Snapshot resource. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource Id + :vartype id: str + :ivar name: Resource name + :vartype name: str + :ivar type: Resource type + :vartype type: str + :param location: Required. Resource location + :type location: str + :param tags: Resource tags + :type tags: dict[str, str] + :ivar managed_by: Unused. Always Null. + :vartype managed_by: str + :param sku: + :type sku: ~azure.mgmt.compute.v2017_03_30.models.DiskSku + :ivar time_created: The time when the disk was created. + :vartype time_created: datetime + :param os_type: The Operating System type. Possible values include: + 'Windows', 'Linux' + :type os_type: str or + ~azure.mgmt.compute.v2017_03_30.models.OperatingSystemTypes + :param creation_data: Required. Disk source information. CreationData + information cannot be changed after the disk has been created. + :type creation_data: ~azure.mgmt.compute.v2017_03_30.models.CreationData + :param disk_size_gb: If creationData.createOption is Empty, this field is + mandatory and it indicates the size of the VHD to create. If this field is + present for updates or creation with other options, it indicates a resize. + Resizes are only allowed if the disk is not attached to a running VM, and + can only increase the disk's size. + :type disk_size_gb: int + :param encryption_settings: Encryption settings for disk or snapshot + :type encryption_settings: + ~azure.mgmt.compute.v2017_03_30.models.EncryptionSettings + :ivar provisioning_state: The disk provisioning state. + :vartype provisioning_state: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + 'managed_by': {'readonly': True}, + 'time_created': {'readonly': True}, + 'creation_data': {'required': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'managed_by': {'key': 'managedBy', 'type': 'str'}, + 'sku': {'key': 'sku', 'type': 'DiskSku'}, + 'time_created': {'key': 'properties.timeCreated', 'type': 'iso-8601'}, + 'os_type': {'key': 'properties.osType', 'type': 'OperatingSystemTypes'}, + 'creation_data': {'key': 'properties.creationData', 'type': 'CreationData'}, + 'disk_size_gb': {'key': 'properties.diskSizeGB', 'type': 'int'}, + 'encryption_settings': {'key': 'properties.encryptionSettings', 'type': 'EncryptionSettings'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + } + + def __init__(self, *, location: str, creation_data, tags=None, sku=None, os_type=None, disk_size_gb: int=None, encryption_settings=None, **kwargs) -> None: + super(Snapshot, self).__init__(location=location, tags=tags, **kwargs) + self.managed_by = None + self.sku = sku + self.time_created = None + self.os_type = os_type + self.creation_data = creation_data + self.disk_size_gb = disk_size_gb + self.encryption_settings = encryption_settings + self.provisioning_state = None + + +class SnapshotUpdate(ResourceUpdate): + """Snapshot update resource. + + :param tags: Resource tags + :type tags: dict[str, str] + :param sku: + :type sku: ~azure.mgmt.compute.v2017_03_30.models.DiskSku + :param os_type: the Operating System type. Possible values include: + 'Windows', 'Linux' + :type os_type: str or + ~azure.mgmt.compute.v2017_03_30.models.OperatingSystemTypes + :param disk_size_gb: If creationData.createOption is Empty, this field is + mandatory and it indicates the size of the VHD to create. If this field is + present for updates or creation with other options, it indicates a resize. + Resizes are only allowed if the disk is not attached to a running VM, and + can only increase the disk's size. + :type disk_size_gb: int + :param encryption_settings: Encryption settings for disk or snapshot + :type encryption_settings: + ~azure.mgmt.compute.v2017_03_30.models.EncryptionSettings + """ + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + 'sku': {'key': 'sku', 'type': 'DiskSku'}, + 'os_type': {'key': 'properties.osType', 'type': 'OperatingSystemTypes'}, + 'disk_size_gb': {'key': 'properties.diskSizeGB', 'type': 'int'}, + 'encryption_settings': {'key': 'properties.encryptionSettings', 'type': 'EncryptionSettings'}, + } + + def __init__(self, *, tags=None, sku=None, os_type=None, disk_size_gb: int=None, encryption_settings=None, **kwargs) -> None: + super(SnapshotUpdate, self).__init__(tags=tags, sku=sku, **kwargs) + self.os_type = os_type + self.disk_size_gb = disk_size_gb + self.encryption_settings = encryption_settings + + +class SourceVault(Model): + """The vault id is an Azure Resource Manager Resource id in the form + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.KeyVault/vaults/{vaultName}. + + :param id: Resource Id + :type id: str + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + } + + def __init__(self, *, id: str=None, **kwargs) -> None: + super(SourceVault, self).__init__(**kwargs) + self.id = id + + +class SshConfiguration(Model): + """SSH configuration for Linux based VMs running on Azure. + + :param public_keys: The list of SSH public keys used to authenticate with + linux based VMs. + :type public_keys: + list[~azure.mgmt.compute.v2017_03_30.models.SshPublicKey] + """ + + _attribute_map = { + 'public_keys': {'key': 'publicKeys', 'type': '[SshPublicKey]'}, + } + + def __init__(self, *, public_keys=None, **kwargs) -> None: + super(SshConfiguration, self).__init__(**kwargs) + self.public_keys = public_keys + + +class SshPublicKey(Model): + """Contains information about SSH certificate public key and the path on the + Linux VM where the public key is placed. + + :param path: Specifies the full path on the created VM where ssh public + key is stored. If the file already exists, the specified key is appended + to the file. Example: /home/user/.ssh/authorized_keys + :type path: str + :param key_data: SSH public key certificate used to authenticate with the + VM through ssh. The key needs to be at least 2048-bit and in ssh-rsa + format.

    For creating ssh keys, see [Create SSH keys on Linux and + Mac for Linux VMs in + Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-mac-create-ssh-keys?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json). + :type key_data: str + """ + + _attribute_map = { + 'path': {'key': 'path', 'type': 'str'}, + 'key_data': {'key': 'keyData', 'type': 'str'}, + } + + def __init__(self, *, path: str=None, key_data: str=None, **kwargs) -> None: + super(SshPublicKey, self).__init__(**kwargs) + self.path = path + self.key_data = key_data + + +class StorageProfile(Model): + """Specifies the storage settings for the virtual machine disks. + + :param image_reference: Specifies information about the image to use. You + can specify information about platform images, marketplace images, or + virtual machine images. This element is required when you want to use a + platform image, marketplace image, or virtual machine image, but is not + used in other creation operations. + :type image_reference: + ~azure.mgmt.compute.v2017_03_30.models.ImageReference + :param os_disk: Specifies information about the operating system disk used + by the virtual machine.

    For more information about disks, see + [About disks and VHDs for Azure virtual + machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-about-disks-vhds?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). + :type os_disk: ~azure.mgmt.compute.v2017_03_30.models.OSDisk + :param data_disks: Specifies the parameters that are used to add a data + disk to a virtual machine.

    For more information about disks, see + [About disks and VHDs for Azure virtual + machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-about-disks-vhds?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). + :type data_disks: list[~azure.mgmt.compute.v2017_03_30.models.DataDisk] + """ + + _attribute_map = { + 'image_reference': {'key': 'imageReference', 'type': 'ImageReference'}, + 'os_disk': {'key': 'osDisk', 'type': 'OSDisk'}, + 'data_disks': {'key': 'dataDisks', 'type': '[DataDisk]'}, + } + + def __init__(self, *, image_reference=None, os_disk=None, data_disks=None, **kwargs) -> None: + super(StorageProfile, self).__init__(**kwargs) + self.image_reference = image_reference + self.os_disk = os_disk + self.data_disks = data_disks + + +class SubResourceReadOnly(Model): + """SubResourceReadOnly. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource Id + :vartype id: str + """ + + _validation = { + 'id': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(SubResourceReadOnly, self).__init__(**kwargs) + self.id = None + + +class UpdateResource(Model): + """The Update Resource model definition. + + :param tags: Resource tags + :type tags: dict[str, str] + """ + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__(self, *, tags=None, **kwargs) -> None: + super(UpdateResource, self).__init__(**kwargs) + self.tags = tags + + +class UpgradePolicy(Model): + """Describes an upgrade policy - automatic, manual, or rolling. + + :param mode: Specifies the mode of an upgrade to virtual machines in the + scale set.

    Possible values are:

    **Manual** - You + control the application of updates to virtual machines in the scale set. + You do this by using the manualUpgrade action.

    **Automatic** - + All virtual machines in the scale set are automatically updated at the + same time. Possible values include: 'Automatic', 'Manual', 'Rolling' + :type mode: str or ~azure.mgmt.compute.v2017_03_30.models.UpgradeMode + :param rolling_upgrade_policy: The configuration parameters used while + performing a rolling upgrade. + :type rolling_upgrade_policy: + ~azure.mgmt.compute.v2017_03_30.models.RollingUpgradePolicy + :param automatic_os_upgrade: Whether OS upgrades should automatically be + applied to scale set instances in a rolling fashion when a newer version + of the image becomes available. + :type automatic_os_upgrade: bool + """ + + _attribute_map = { + 'mode': {'key': 'mode', 'type': 'UpgradeMode'}, + 'rolling_upgrade_policy': {'key': 'rollingUpgradePolicy', 'type': 'RollingUpgradePolicy'}, + 'automatic_os_upgrade': {'key': 'automaticOSUpgrade', 'type': 'bool'}, + } + + def __init__(self, *, mode=None, rolling_upgrade_policy=None, automatic_os_upgrade: bool=None, **kwargs) -> None: + super(UpgradePolicy, self).__init__(**kwargs) + self.mode = mode + self.rolling_upgrade_policy = rolling_upgrade_policy + self.automatic_os_upgrade = automatic_os_upgrade + + +class Usage(Model): + """Describes Compute Resource Usage. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar unit: Required. An enum describing the unit of usage measurement. + Default value: "Count" . + :vartype unit: str + :param current_value: Required. The current usage of the resource. + :type current_value: int + :param limit: Required. The maximum permitted usage of the resource. + :type limit: long + :param name: Required. The name of the type of usage. + :type name: ~azure.mgmt.compute.v2017_03_30.models.UsageName + """ + + _validation = { + 'unit': {'required': True, 'constant': True}, + 'current_value': {'required': True}, + 'limit': {'required': True}, + 'name': {'required': True}, + } + + _attribute_map = { + 'unit': {'key': 'unit', 'type': 'str'}, + 'current_value': {'key': 'currentValue', 'type': 'int'}, + 'limit': {'key': 'limit', 'type': 'long'}, + 'name': {'key': 'name', 'type': 'UsageName'}, + } + + unit = "Count" + + def __init__(self, *, current_value: int, limit: int, name, **kwargs) -> None: + super(Usage, self).__init__(**kwargs) + self.current_value = current_value + self.limit = limit + self.name = name + + +class UsageName(Model): + """The Usage Names. + + :param value: The name of the resource. + :type value: str + :param localized_value: The localized name of the resource. + :type localized_value: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': 'str'}, + 'localized_value': {'key': 'localizedValue', 'type': 'str'}, + } + + def __init__(self, *, value: str=None, localized_value: str=None, **kwargs) -> None: + super(UsageName, self).__init__(**kwargs) + self.value = value + self.localized_value = localized_value + + +class VaultCertificate(Model): + """Describes a single certificate reference in a Key Vault, and where the + certificate should reside on the VM. + + :param certificate_url: This is the URL of a certificate that has been + uploaded to Key Vault as a secret. For adding a secret to the Key Vault, + see [Add a key or secret to the key + vault](https://docs.microsoft.com/azure/key-vault/key-vault-get-started/#add). + In this case, your certificate needs to be It is the Base64 encoding of + the following JSON Object which is encoded in UTF-8:

    {
    + "data":"",
    "dataType":"pfx",
    + "password":""
    } + :type certificate_url: str + :param certificate_store: For Windows VMs, specifies the certificate store + on the Virtual Machine to which the certificate should be added. The + specified certificate store is implicitly in the LocalMachine account. +

    For Linux VMs, the certificate file is placed under the + /var/lib/waagent directory, with the file name + <UppercaseThumbprint>.crt for the X509 certificate file and + <UppercaseThumbprint>.prv for private key. Both of these files are + .pem formatted. + :type certificate_store: str + """ + + _attribute_map = { + 'certificate_url': {'key': 'certificateUrl', 'type': 'str'}, + 'certificate_store': {'key': 'certificateStore', 'type': 'str'}, + } + + def __init__(self, *, certificate_url: str=None, certificate_store: str=None, **kwargs) -> None: + super(VaultCertificate, self).__init__(**kwargs) + self.certificate_url = certificate_url + self.certificate_store = certificate_store + + +class VaultSecretGroup(Model): + """Describes a set of certificates which are all in the same Key Vault. + + :param source_vault: The relative URL of the Key Vault containing all of + the certificates in VaultCertificates. + :type source_vault: ~azure.mgmt.compute.v2017_03_30.models.SubResource + :param vault_certificates: The list of key vault references in SourceVault + which contain certificates. + :type vault_certificates: + list[~azure.mgmt.compute.v2017_03_30.models.VaultCertificate] + """ + + _attribute_map = { + 'source_vault': {'key': 'sourceVault', 'type': 'SubResource'}, + 'vault_certificates': {'key': 'vaultCertificates', 'type': '[VaultCertificate]'}, + } + + def __init__(self, *, source_vault=None, vault_certificates=None, **kwargs) -> None: + super(VaultSecretGroup, self).__init__(**kwargs) + self.source_vault = source_vault + self.vault_certificates = vault_certificates + + +class VirtualHardDisk(Model): + """Describes the uri of a disk. + + :param uri: Specifies the virtual hard disk's uri. + :type uri: str + """ + + _attribute_map = { + 'uri': {'key': 'uri', 'type': 'str'}, + } + + def __init__(self, *, uri: str=None, **kwargs) -> None: + super(VirtualHardDisk, self).__init__(**kwargs) + self.uri = uri + + +class VirtualMachine(Resource): + """Describes a Virtual Machine. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource Id + :vartype id: str + :ivar name: Resource name + :vartype name: str + :ivar type: Resource type + :vartype type: str + :param location: Required. Resource location + :type location: str + :param tags: Resource tags + :type tags: dict[str, str] + :param plan: Specifies information about the marketplace image used to + create the virtual machine. This element is only used for marketplace + images. Before you can use a marketplace image from an API, you must + enable the image for programmatic use. In the Azure portal, find the + marketplace image that you want to use and then click **Want to deploy + programmatically, Get Started ->**. Enter any required information and + then click **Save**. + :type plan: ~azure.mgmt.compute.v2017_03_30.models.Plan + :param hardware_profile: Specifies the hardware settings for the virtual + machine. + :type hardware_profile: + ~azure.mgmt.compute.v2017_03_30.models.HardwareProfile + :param storage_profile: Specifies the storage settings for the virtual + machine disks. + :type storage_profile: + ~azure.mgmt.compute.v2017_03_30.models.StorageProfile + :param os_profile: Specifies the operating system settings for the virtual + machine. + :type os_profile: ~azure.mgmt.compute.v2017_03_30.models.OSProfile + :param network_profile: Specifies the network interfaces of the virtual + machine. + :type network_profile: + ~azure.mgmt.compute.v2017_03_30.models.NetworkProfile + :param diagnostics_profile: Specifies the boot diagnostic settings state. +

    Minimum api-version: 2015-06-15. + :type diagnostics_profile: + ~azure.mgmt.compute.v2017_03_30.models.DiagnosticsProfile + :param availability_set: Specifies information about the availability set + that the virtual machine should be assigned to. Virtual machines specified + in the same availability set are allocated to different nodes to maximize + availability. For more information about availability sets, see [Manage + the availability of virtual + machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-manage-availability?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). +

    For more information on Azure planned maintenance, see [Planned + maintenance for virtual machines in + Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-planned-maintenance?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json) +

    Currently, a VM can only be added to availability set at creation + time. An existing VM cannot be added to an availability set. + :type availability_set: ~azure.mgmt.compute.v2017_03_30.models.SubResource + :ivar provisioning_state: The provisioning state, which only appears in + the response. + :vartype provisioning_state: str + :ivar instance_view: The virtual machine instance view. + :vartype instance_view: + ~azure.mgmt.compute.v2017_03_30.models.VirtualMachineInstanceView + :param license_type: Specifies that the image or disk that is being used + was licensed on-premises. This element is only used for images that + contain the Windows Server operating system.

    Possible values are: +

    Windows_Client

    Windows_Server

    If this element + is included in a request for an update, the value must match the initial + value. This value cannot be updated.

    For more information, see + [Azure Hybrid Use Benefit for Windows + Server](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-hybrid-use-benefit-licensing?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json) +

    Minimum api-version: 2015-06-15 + :type license_type: str + :ivar vm_id: Specifies the VM unique ID which is a 128-bits identifier + that is encoded and stored in all Azure IaaS VMs SMBIOS and can be read + using platform BIOS commands. + :vartype vm_id: str + :ivar resources: The virtual machine child extension resources. + :vartype resources: + list[~azure.mgmt.compute.v2017_03_30.models.VirtualMachineExtension] + :param identity: The identity of the virtual machine, if configured. + :type identity: + ~azure.mgmt.compute.v2017_03_30.models.VirtualMachineIdentity + :param zones: The virtual machine zones. + :type zones: list[str] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + 'provisioning_state': {'readonly': True}, + 'instance_view': {'readonly': True}, + 'vm_id': {'readonly': True}, + 'resources': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'plan': {'key': 'plan', 'type': 'Plan'}, + 'hardware_profile': {'key': 'properties.hardwareProfile', 'type': 'HardwareProfile'}, + 'storage_profile': {'key': 'properties.storageProfile', 'type': 'StorageProfile'}, + 'os_profile': {'key': 'properties.osProfile', 'type': 'OSProfile'}, + 'network_profile': {'key': 'properties.networkProfile', 'type': 'NetworkProfile'}, + 'diagnostics_profile': {'key': 'properties.diagnosticsProfile', 'type': 'DiagnosticsProfile'}, + 'availability_set': {'key': 'properties.availabilitySet', 'type': 'SubResource'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'instance_view': {'key': 'properties.instanceView', 'type': 'VirtualMachineInstanceView'}, + 'license_type': {'key': 'properties.licenseType', 'type': 'str'}, + 'vm_id': {'key': 'properties.vmId', 'type': 'str'}, + 'resources': {'key': 'resources', 'type': '[VirtualMachineExtension]'}, + 'identity': {'key': 'identity', 'type': 'VirtualMachineIdentity'}, + 'zones': {'key': 'zones', 'type': '[str]'}, + } + + def __init__(self, *, location: str, tags=None, plan=None, hardware_profile=None, storage_profile=None, os_profile=None, network_profile=None, diagnostics_profile=None, availability_set=None, license_type: str=None, identity=None, zones=None, **kwargs) -> None: + super(VirtualMachine, self).__init__(location=location, tags=tags, **kwargs) + self.plan = plan + self.hardware_profile = hardware_profile + self.storage_profile = storage_profile + self.os_profile = os_profile + self.network_profile = network_profile + self.diagnostics_profile = diagnostics_profile + self.availability_set = availability_set + self.provisioning_state = None + self.instance_view = None + self.license_type = license_type + self.vm_id = None + self.resources = None + self.identity = identity + self.zones = zones + + +class VirtualMachineAgentInstanceView(Model): + """The instance view of the VM Agent running on the virtual machine. + + :param vm_agent_version: The VM Agent full version. + :type vm_agent_version: str + :param extension_handlers: The virtual machine extension handler instance + view. + :type extension_handlers: + list[~azure.mgmt.compute.v2017_03_30.models.VirtualMachineExtensionHandlerInstanceView] + :param statuses: The resource status information. + :type statuses: + list[~azure.mgmt.compute.v2017_03_30.models.InstanceViewStatus] + """ + + _attribute_map = { + 'vm_agent_version': {'key': 'vmAgentVersion', 'type': 'str'}, + 'extension_handlers': {'key': 'extensionHandlers', 'type': '[VirtualMachineExtensionHandlerInstanceView]'}, + 'statuses': {'key': 'statuses', 'type': '[InstanceViewStatus]'}, + } + + def __init__(self, *, vm_agent_version: str=None, extension_handlers=None, statuses=None, **kwargs) -> None: + super(VirtualMachineAgentInstanceView, self).__init__(**kwargs) + self.vm_agent_version = vm_agent_version + self.extension_handlers = extension_handlers + self.statuses = statuses + + +class VirtualMachineCaptureParameters(Model): + """Capture Virtual Machine parameters. + + All required parameters must be populated in order to send to Azure. + + :param vhd_prefix: Required. The captured virtual hard disk's name prefix. + :type vhd_prefix: str + :param destination_container_name: Required. The destination container + name. + :type destination_container_name: str + :param overwrite_vhds: Required. Specifies whether to overwrite the + destination virtual hard disk, in case of conflict. + :type overwrite_vhds: bool + """ + + _validation = { + 'vhd_prefix': {'required': True}, + 'destination_container_name': {'required': True}, + 'overwrite_vhds': {'required': True}, + } + + _attribute_map = { + 'vhd_prefix': {'key': 'vhdPrefix', 'type': 'str'}, + 'destination_container_name': {'key': 'destinationContainerName', 'type': 'str'}, + 'overwrite_vhds': {'key': 'overwriteVhds', 'type': 'bool'}, + } + + def __init__(self, *, vhd_prefix: str, destination_container_name: str, overwrite_vhds: bool, **kwargs) -> None: + super(VirtualMachineCaptureParameters, self).__init__(**kwargs) + self.vhd_prefix = vhd_prefix + self.destination_container_name = destination_container_name + self.overwrite_vhds = overwrite_vhds + + +class VirtualMachineCaptureResult(SubResource): + """Resource Id. + + :param id: Resource Id + :type id: str + :param output: Operation output data (raw JSON) + :type output: object + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'output': {'key': 'properties.output', 'type': 'object'}, + } + + def __init__(self, *, id: str=None, output=None, **kwargs) -> None: + super(VirtualMachineCaptureResult, self).__init__(id=id, **kwargs) + self.output = output + + +class VirtualMachineExtension(Resource): + """Describes a Virtual Machine Extension. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource Id + :vartype id: str + :ivar name: Resource name + :vartype name: str + :ivar type: Resource type + :vartype type: str + :param location: Required. Resource location + :type location: str + :param tags: Resource tags + :type tags: dict[str, str] + :param force_update_tag: How the extension handler should be forced to + update even if the extension configuration has not changed. + :type force_update_tag: str + :param publisher: The name of the extension handler publisher. + :type publisher: str + :param virtual_machine_extension_type: Specifies the type of the + extension; an example is "CustomScriptExtension". + :type virtual_machine_extension_type: str + :param type_handler_version: Specifies the version of the script handler. + :type type_handler_version: str + :param auto_upgrade_minor_version: Indicates whether the extension should + use a newer minor version if one is available at deployment time. Once + deployed, however, the extension will not upgrade minor versions unless + redeployed, even with this property set to true. + :type auto_upgrade_minor_version: bool + :param settings: Json formatted public settings for the extension. + :type settings: object + :param protected_settings: The extension can contain either + protectedSettings or protectedSettingsFromKeyVault or no protected + settings at all. + :type protected_settings: object + :ivar provisioning_state: The provisioning state, which only appears in + the response. + :vartype provisioning_state: str + :param instance_view: The virtual machine extension instance view. + :type instance_view: + ~azure.mgmt.compute.v2017_03_30.models.VirtualMachineExtensionInstanceView + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'force_update_tag': {'key': 'properties.forceUpdateTag', 'type': 'str'}, + 'publisher': {'key': 'properties.publisher', 'type': 'str'}, + 'virtual_machine_extension_type': {'key': 'properties.type', 'type': 'str'}, + 'type_handler_version': {'key': 'properties.typeHandlerVersion', 'type': 'str'}, + 'auto_upgrade_minor_version': {'key': 'properties.autoUpgradeMinorVersion', 'type': 'bool'}, + 'settings': {'key': 'properties.settings', 'type': 'object'}, + 'protected_settings': {'key': 'properties.protectedSettings', 'type': 'object'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'instance_view': {'key': 'properties.instanceView', 'type': 'VirtualMachineExtensionInstanceView'}, + } + + def __init__(self, *, location: str, tags=None, force_update_tag: str=None, publisher: str=None, virtual_machine_extension_type: str=None, type_handler_version: str=None, auto_upgrade_minor_version: bool=None, settings=None, protected_settings=None, instance_view=None, **kwargs) -> None: + super(VirtualMachineExtension, self).__init__(location=location, tags=tags, **kwargs) + self.force_update_tag = force_update_tag + self.publisher = publisher + self.virtual_machine_extension_type = virtual_machine_extension_type + self.type_handler_version = type_handler_version + self.auto_upgrade_minor_version = auto_upgrade_minor_version + self.settings = settings + self.protected_settings = protected_settings + self.provisioning_state = None + self.instance_view = instance_view + + +class VirtualMachineExtensionHandlerInstanceView(Model): + """The instance view of a virtual machine extension handler. + + :param type: Specifies the type of the extension; an example is + "CustomScriptExtension". + :type type: str + :param type_handler_version: Specifies the version of the script handler. + :type type_handler_version: str + :param status: The extension handler status. + :type status: ~azure.mgmt.compute.v2017_03_30.models.InstanceViewStatus + """ + + _attribute_map = { + 'type': {'key': 'type', 'type': 'str'}, + 'type_handler_version': {'key': 'typeHandlerVersion', 'type': 'str'}, + 'status': {'key': 'status', 'type': 'InstanceViewStatus'}, + } + + def __init__(self, *, type: str=None, type_handler_version: str=None, status=None, **kwargs) -> None: + super(VirtualMachineExtensionHandlerInstanceView, self).__init__(**kwargs) + self.type = type + self.type_handler_version = type_handler_version + self.status = status + + +class VirtualMachineExtensionImage(Resource): + """Describes a Virtual Machine Extension Image. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource Id + :vartype id: str + :ivar name: Resource name + :vartype name: str + :ivar type: Resource type + :vartype type: str + :param location: Required. Resource location + :type location: str + :param tags: Resource tags + :type tags: dict[str, str] + :param operating_system: Required. The operating system this extension + supports. + :type operating_system: str + :param compute_role: Required. The type of role (IaaS or PaaS) this + extension supports. + :type compute_role: str + :param handler_schema: Required. The schema defined by publisher, where + extension consumers should provide settings in a matching schema. + :type handler_schema: str + :param vm_scale_set_enabled: Whether the extension can be used on xRP + VMScaleSets. By default existing extensions are usable on scalesets, but + there might be cases where a publisher wants to explicitly indicate the + extension is only enabled for CRP VMs but not VMSS. + :type vm_scale_set_enabled: bool + :param supports_multiple_extensions: Whether the handler can support + multiple extensions. + :type supports_multiple_extensions: bool + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + 'operating_system': {'required': True}, + 'compute_role': {'required': True}, + 'handler_schema': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'operating_system': {'key': 'properties.operatingSystem', 'type': 'str'}, + 'compute_role': {'key': 'properties.computeRole', 'type': 'str'}, + 'handler_schema': {'key': 'properties.handlerSchema', 'type': 'str'}, + 'vm_scale_set_enabled': {'key': 'properties.vmScaleSetEnabled', 'type': 'bool'}, + 'supports_multiple_extensions': {'key': 'properties.supportsMultipleExtensions', 'type': 'bool'}, + } + + def __init__(self, *, location: str, operating_system: str, compute_role: str, handler_schema: str, tags=None, vm_scale_set_enabled: bool=None, supports_multiple_extensions: bool=None, **kwargs) -> None: + super(VirtualMachineExtensionImage, self).__init__(location=location, tags=tags, **kwargs) + self.operating_system = operating_system + self.compute_role = compute_role + self.handler_schema = handler_schema + self.vm_scale_set_enabled = vm_scale_set_enabled + self.supports_multiple_extensions = supports_multiple_extensions + + +class VirtualMachineExtensionInstanceView(Model): + """The instance view of a virtual machine extension. + + :param name: The virtual machine extension name. + :type name: str + :param type: Specifies the type of the extension; an example is + "CustomScriptExtension". + :type type: str + :param type_handler_version: Specifies the version of the script handler. + :type type_handler_version: str + :param substatuses: The resource status information. + :type substatuses: + list[~azure.mgmt.compute.v2017_03_30.models.InstanceViewStatus] + :param statuses: The resource status information. + :type statuses: + list[~azure.mgmt.compute.v2017_03_30.models.InstanceViewStatus] + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'type_handler_version': {'key': 'typeHandlerVersion', 'type': 'str'}, + 'substatuses': {'key': 'substatuses', 'type': '[InstanceViewStatus]'}, + 'statuses': {'key': 'statuses', 'type': '[InstanceViewStatus]'}, + } + + def __init__(self, *, name: str=None, type: str=None, type_handler_version: str=None, substatuses=None, statuses=None, **kwargs) -> None: + super(VirtualMachineExtensionInstanceView, self).__init__(**kwargs) + self.name = name + self.type = type + self.type_handler_version = type_handler_version + self.substatuses = substatuses + self.statuses = statuses + + +class VirtualMachineExtensionsListResult(Model): + """The List Extension operation response. + + :param value: The list of extensions + :type value: + list[~azure.mgmt.compute.v2017_03_30.models.VirtualMachineExtension] + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[VirtualMachineExtension]'}, + } + + def __init__(self, *, value=None, **kwargs) -> None: + super(VirtualMachineExtensionsListResult, self).__init__(**kwargs) + self.value = value + + +class VirtualMachineExtensionUpdate(UpdateResource): + """Describes a Virtual Machine Extension. + + :param tags: Resource tags + :type tags: dict[str, str] + :param force_update_tag: How the extension handler should be forced to + update even if the extension configuration has not changed. + :type force_update_tag: str + :param publisher: The name of the extension handler publisher. + :type publisher: str + :param type: Specifies the type of the extension; an example is + "CustomScriptExtension". + :type type: str + :param type_handler_version: Specifies the version of the script handler. + :type type_handler_version: str + :param auto_upgrade_minor_version: Indicates whether the extension should + use a newer minor version if one is available at deployment time. Once + deployed, however, the extension will not upgrade minor versions unless + redeployed, even with this property set to true. + :type auto_upgrade_minor_version: bool + :param settings: Json formatted public settings for the extension. + :type settings: object + :param protected_settings: The extension can contain either + protectedSettings or protectedSettingsFromKeyVault or no protected + settings at all. + :type protected_settings: object + """ + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + 'force_update_tag': {'key': 'properties.forceUpdateTag', 'type': 'str'}, + 'publisher': {'key': 'properties.publisher', 'type': 'str'}, + 'type': {'key': 'properties.type', 'type': 'str'}, + 'type_handler_version': {'key': 'properties.typeHandlerVersion', 'type': 'str'}, + 'auto_upgrade_minor_version': {'key': 'properties.autoUpgradeMinorVersion', 'type': 'bool'}, + 'settings': {'key': 'properties.settings', 'type': 'object'}, + 'protected_settings': {'key': 'properties.protectedSettings', 'type': 'object'}, + } + + def __init__(self, *, tags=None, force_update_tag: str=None, publisher: str=None, type: str=None, type_handler_version: str=None, auto_upgrade_minor_version: bool=None, settings=None, protected_settings=None, **kwargs) -> None: + super(VirtualMachineExtensionUpdate, self).__init__(tags=tags, **kwargs) + self.force_update_tag = force_update_tag + self.publisher = publisher + self.type = type + self.type_handler_version = type_handler_version + self.auto_upgrade_minor_version = auto_upgrade_minor_version + self.settings = settings + self.protected_settings = protected_settings + + +class VirtualMachineHealthStatus(Model): + """The health status of the VM. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar status: The health status information for the VM. + :vartype status: ~azure.mgmt.compute.v2017_03_30.models.InstanceViewStatus + """ + + _validation = { + 'status': {'readonly': True}, + } + + _attribute_map = { + 'status': {'key': 'status', 'type': 'InstanceViewStatus'}, + } + + def __init__(self, **kwargs) -> None: + super(VirtualMachineHealthStatus, self).__init__(**kwargs) + self.status = None + + +class VirtualMachineIdentity(Model): + """Identity for the virtual machine. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar principal_id: The principal id of virtual machine identity. + :vartype principal_id: str + :ivar tenant_id: The tenant id associated with the virtual machine. + :vartype tenant_id: str + :param type: The type of identity used for the virtual machine. Currently, + the only supported type is 'SystemAssigned', which implicitly creates an + identity. Possible values include: 'SystemAssigned' + :type type: str or + ~azure.mgmt.compute.v2017_03_30.models.ResourceIdentityType + """ + + _validation = { + 'principal_id': {'readonly': True}, + 'tenant_id': {'readonly': True}, + } + + _attribute_map = { + 'principal_id': {'key': 'principalId', 'type': 'str'}, + 'tenant_id': {'key': 'tenantId', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'ResourceIdentityType'}, + } + + def __init__(self, *, type=None, **kwargs) -> None: + super(VirtualMachineIdentity, self).__init__(**kwargs) + self.principal_id = None + self.tenant_id = None + self.type = type + + +class VirtualMachineImageResource(SubResource): + """Virtual machine image resource information. + + All required parameters must be populated in order to send to Azure. + + :param id: Resource Id + :type id: str + :param name: Required. The name of the resource. + :type name: str + :param location: Required. The supported Azure location of the resource. + :type location: str + :param tags: Specifies the tags that are assigned to the virtual machine. + For more information about using tags, see [Using tags to organize your + Azure + resources](https://docs.microsoft.com/azure/azure-resource-manager/resource-group-using-tags.md). + :type tags: dict[str, str] + """ + + _validation = { + 'name': {'required': True}, + 'location': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__(self, *, name: str, location: str, id: str=None, tags=None, **kwargs) -> None: + super(VirtualMachineImageResource, self).__init__(id=id, **kwargs) + self.name = name + self.location = location + self.tags = tags + + +class VirtualMachineImage(VirtualMachineImageResource): + """Describes a Virtual Machine Image. + + All required parameters must be populated in order to send to Azure. + + :param id: Resource Id + :type id: str + :param name: Required. The name of the resource. + :type name: str + :param location: Required. The supported Azure location of the resource. + :type location: str + :param tags: Specifies the tags that are assigned to the virtual machine. + For more information about using tags, see [Using tags to organize your + Azure + resources](https://docs.microsoft.com/azure/azure-resource-manager/resource-group-using-tags.md). + :type tags: dict[str, str] + :param plan: + :type plan: ~azure.mgmt.compute.v2017_03_30.models.PurchasePlan + :param os_disk_image: + :type os_disk_image: ~azure.mgmt.compute.v2017_03_30.models.OSDiskImage + :param data_disk_images: + :type data_disk_images: + list[~azure.mgmt.compute.v2017_03_30.models.DataDiskImage] + """ + + _validation = { + 'name': {'required': True}, + 'location': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'plan': {'key': 'properties.plan', 'type': 'PurchasePlan'}, + 'os_disk_image': {'key': 'properties.osDiskImage', 'type': 'OSDiskImage'}, + 'data_disk_images': {'key': 'properties.dataDiskImages', 'type': '[DataDiskImage]'}, + } + + def __init__(self, *, name: str, location: str, id: str=None, tags=None, plan=None, os_disk_image=None, data_disk_images=None, **kwargs) -> None: + super(VirtualMachineImage, self).__init__(id=id, name=name, location=location, tags=tags, **kwargs) + self.plan = plan + self.os_disk_image = os_disk_image + self.data_disk_images = data_disk_images + + +class VirtualMachineInstanceView(Model): + """The instance view of a virtual machine. + + :param platform_update_domain: Specifies the update domain of the virtual + machine. + :type platform_update_domain: int + :param platform_fault_domain: Specifies the fault domain of the virtual + machine. + :type platform_fault_domain: int + :param rdp_thumb_print: The Remote desktop certificate thumbprint. + :type rdp_thumb_print: str + :param vm_agent: The VM Agent running on the virtual machine. + :type vm_agent: + ~azure.mgmt.compute.v2017_03_30.models.VirtualMachineAgentInstanceView + :param maintenance_redeploy_status: The Maintenance Operation status on + the virtual machine. + :type maintenance_redeploy_status: + ~azure.mgmt.compute.v2017_03_30.models.MaintenanceRedeployStatus + :param disks: The virtual machine disk information. + :type disks: list[~azure.mgmt.compute.v2017_03_30.models.DiskInstanceView] + :param extensions: The extensions information. + :type extensions: + list[~azure.mgmt.compute.v2017_03_30.models.VirtualMachineExtensionInstanceView] + :param boot_diagnostics: Boot Diagnostics is a debugging feature which + allows you to view Console Output and Screenshot to diagnose VM status. +

    You can easily view the output of your console log.

    + Azure also enables you to see a screenshot of the VM from the hypervisor. + :type boot_diagnostics: + ~azure.mgmt.compute.v2017_03_30.models.BootDiagnosticsInstanceView + :param statuses: The resource status information. + :type statuses: + list[~azure.mgmt.compute.v2017_03_30.models.InstanceViewStatus] + """ + + _attribute_map = { + 'platform_update_domain': {'key': 'platformUpdateDomain', 'type': 'int'}, + 'platform_fault_domain': {'key': 'platformFaultDomain', 'type': 'int'}, + 'rdp_thumb_print': {'key': 'rdpThumbPrint', 'type': 'str'}, + 'vm_agent': {'key': 'vmAgent', 'type': 'VirtualMachineAgentInstanceView'}, + 'maintenance_redeploy_status': {'key': 'maintenanceRedeployStatus', 'type': 'MaintenanceRedeployStatus'}, + 'disks': {'key': 'disks', 'type': '[DiskInstanceView]'}, + 'extensions': {'key': 'extensions', 'type': '[VirtualMachineExtensionInstanceView]'}, + 'boot_diagnostics': {'key': 'bootDiagnostics', 'type': 'BootDiagnosticsInstanceView'}, + 'statuses': {'key': 'statuses', 'type': '[InstanceViewStatus]'}, + } + + def __init__(self, *, platform_update_domain: int=None, platform_fault_domain: int=None, rdp_thumb_print: str=None, vm_agent=None, maintenance_redeploy_status=None, disks=None, extensions=None, boot_diagnostics=None, statuses=None, **kwargs) -> None: + super(VirtualMachineInstanceView, self).__init__(**kwargs) + self.platform_update_domain = platform_update_domain + self.platform_fault_domain = platform_fault_domain + self.rdp_thumb_print = rdp_thumb_print + self.vm_agent = vm_agent + self.maintenance_redeploy_status = maintenance_redeploy_status + self.disks = disks + self.extensions = extensions + self.boot_diagnostics = boot_diagnostics + self.statuses = statuses + + +class VirtualMachineScaleSet(Resource): + """Describes a Virtual Machine Scale Set. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource Id + :vartype id: str + :ivar name: Resource name + :vartype name: str + :ivar type: Resource type + :vartype type: str + :param location: Required. Resource location + :type location: str + :param tags: Resource tags + :type tags: dict[str, str] + :param sku: The virtual machine scale set sku. + :type sku: ~azure.mgmt.compute.v2017_03_30.models.Sku + :param plan: Specifies information about the marketplace image used to + create the virtual machine. This element is only used for marketplace + images. Before you can use a marketplace image from an API, you must + enable the image for programmatic use. In the Azure portal, find the + marketplace image that you want to use and then click **Want to deploy + programmatically, Get Started ->**. Enter any required information and + then click **Save**. + :type plan: ~azure.mgmt.compute.v2017_03_30.models.Plan + :param upgrade_policy: The upgrade policy. + :type upgrade_policy: ~azure.mgmt.compute.v2017_03_30.models.UpgradePolicy + :param virtual_machine_profile: The virtual machine profile. + :type virtual_machine_profile: + ~azure.mgmt.compute.v2017_03_30.models.VirtualMachineScaleSetVMProfile + :ivar provisioning_state: The provisioning state, which only appears in + the response. + :vartype provisioning_state: str + :param overprovision: Specifies whether the Virtual Machine Scale Set + should be overprovisioned. + :type overprovision: bool + :ivar unique_id: Specifies the ID which uniquely identifies a Virtual + Machine Scale Set. + :vartype unique_id: str + :param single_placement_group: When true this limits the scale set to a + single placement group, of max size 100 virtual machines. + :type single_placement_group: bool + :param identity: The identity of the virtual machine scale set, if + configured. + :type identity: + ~azure.mgmt.compute.v2017_03_30.models.VirtualMachineScaleSetIdentity + :param zones: The virtual machine scale set zones. + :type zones: list[str] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + 'provisioning_state': {'readonly': True}, + 'unique_id': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'sku': {'key': 'sku', 'type': 'Sku'}, + 'plan': {'key': 'plan', 'type': 'Plan'}, + 'upgrade_policy': {'key': 'properties.upgradePolicy', 'type': 'UpgradePolicy'}, + 'virtual_machine_profile': {'key': 'properties.virtualMachineProfile', 'type': 'VirtualMachineScaleSetVMProfile'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'overprovision': {'key': 'properties.overprovision', 'type': 'bool'}, + 'unique_id': {'key': 'properties.uniqueId', 'type': 'str'}, + 'single_placement_group': {'key': 'properties.singlePlacementGroup', 'type': 'bool'}, + 'identity': {'key': 'identity', 'type': 'VirtualMachineScaleSetIdentity'}, + 'zones': {'key': 'zones', 'type': '[str]'}, + } + + def __init__(self, *, location: str, tags=None, sku=None, plan=None, upgrade_policy=None, virtual_machine_profile=None, overprovision: bool=None, single_placement_group: bool=None, identity=None, zones=None, **kwargs) -> None: + super(VirtualMachineScaleSet, self).__init__(location=location, tags=tags, **kwargs) + self.sku = sku + self.plan = plan + self.upgrade_policy = upgrade_policy + self.virtual_machine_profile = virtual_machine_profile + self.provisioning_state = None + self.overprovision = overprovision + self.unique_id = None + self.single_placement_group = single_placement_group + self.identity = identity + self.zones = zones + + +class VirtualMachineScaleSetDataDisk(Model): + """Describes a virtual machine scale set data disk. + + All required parameters must be populated in order to send to Azure. + + :param name: The disk name. + :type name: str + :param lun: Required. Specifies the logical unit number of the data disk. + This value is used to identify data disks within the VM and therefore must + be unique for each data disk attached to a VM. + :type lun: int + :param caching: Specifies the caching requirements.

    Possible + values are:

    **None**

    **ReadOnly**

    **ReadWrite** +

    Default: **None for Standard storage. ReadOnly for Premium + storage**. Possible values include: 'None', 'ReadOnly', 'ReadWrite' + :type caching: str or ~azure.mgmt.compute.v2017_03_30.models.CachingTypes + :param create_option: Required. The create option. Possible values + include: 'FromImage', 'Empty', 'Attach' + :type create_option: str or + ~azure.mgmt.compute.v2017_03_30.models.DiskCreateOptionTypes + :param disk_size_gb: Specifies the size of an empty data disk in + gigabytes. This element can be used to overwrite the size of the disk in a + virtual machine image.

    This value cannot be larger than 1023 GB + :type disk_size_gb: int + :param managed_disk: The managed disk parameters. + :type managed_disk: + ~azure.mgmt.compute.v2017_03_30.models.VirtualMachineScaleSetManagedDiskParameters + """ + + _validation = { + 'lun': {'required': True}, + 'create_option': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'lun': {'key': 'lun', 'type': 'int'}, + 'caching': {'key': 'caching', 'type': 'CachingTypes'}, + 'create_option': {'key': 'createOption', 'type': 'DiskCreateOptionTypes'}, + 'disk_size_gb': {'key': 'diskSizeGB', 'type': 'int'}, + 'managed_disk': {'key': 'managedDisk', 'type': 'VirtualMachineScaleSetManagedDiskParameters'}, + } + + def __init__(self, *, lun: int, create_option, name: str=None, caching=None, disk_size_gb: int=None, managed_disk=None, **kwargs) -> None: + super(VirtualMachineScaleSetDataDisk, self).__init__(**kwargs) + self.name = name + self.lun = lun + self.caching = caching + self.create_option = create_option + self.disk_size_gb = disk_size_gb + self.managed_disk = managed_disk + + +class VirtualMachineScaleSetExtension(SubResourceReadOnly): + """Describes a Virtual Machine Scale Set Extension. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource Id + :vartype id: str + :param name: The name of the extension. + :type name: str + :param force_update_tag: If a value is provided and is different from the + previous value, the extension handler will be forced to update even if the + extension configuration has not changed. + :type force_update_tag: str + :param publisher: The name of the extension handler publisher. + :type publisher: str + :param type: Specifies the type of the extension; an example is + "CustomScriptExtension". + :type type: str + :param type_handler_version: Specifies the version of the script handler. + :type type_handler_version: str + :param auto_upgrade_minor_version: Indicates whether the extension should + use a newer minor version if one is available at deployment time. Once + deployed, however, the extension will not upgrade minor versions unless + redeployed, even with this property set to true. + :type auto_upgrade_minor_version: bool + :param settings: Json formatted public settings for the extension. + :type settings: object + :param protected_settings: The extension can contain either + protectedSettings or protectedSettingsFromKeyVault or no protected + settings at all. + :type protected_settings: object + :ivar provisioning_state: The provisioning state, which only appears in + the response. + :vartype provisioning_state: str + """ + + _validation = { + 'id': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'force_update_tag': {'key': 'properties.forceUpdateTag', 'type': 'str'}, + 'publisher': {'key': 'properties.publisher', 'type': 'str'}, + 'type': {'key': 'properties.type', 'type': 'str'}, + 'type_handler_version': {'key': 'properties.typeHandlerVersion', 'type': 'str'}, + 'auto_upgrade_minor_version': {'key': 'properties.autoUpgradeMinorVersion', 'type': 'bool'}, + 'settings': {'key': 'properties.settings', 'type': 'object'}, + 'protected_settings': {'key': 'properties.protectedSettings', 'type': 'object'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + } + + def __init__(self, *, name: str=None, force_update_tag: str=None, publisher: str=None, type: str=None, type_handler_version: str=None, auto_upgrade_minor_version: bool=None, settings=None, protected_settings=None, **kwargs) -> None: + super(VirtualMachineScaleSetExtension, self).__init__(**kwargs) + self.name = name + self.force_update_tag = force_update_tag + self.publisher = publisher + self.type = type + self.type_handler_version = type_handler_version + self.auto_upgrade_minor_version = auto_upgrade_minor_version + self.settings = settings + self.protected_settings = protected_settings + self.provisioning_state = None + + +class VirtualMachineScaleSetExtensionProfile(Model): + """Describes a virtual machine scale set extension profile. + + :param extensions: The virtual machine scale set child extension + resources. + :type extensions: + list[~azure.mgmt.compute.v2017_03_30.models.VirtualMachineScaleSetExtension] + """ + + _attribute_map = { + 'extensions': {'key': 'extensions', 'type': '[VirtualMachineScaleSetExtension]'}, + } + + def __init__(self, *, extensions=None, **kwargs) -> None: + super(VirtualMachineScaleSetExtensionProfile, self).__init__(**kwargs) + self.extensions = extensions + + +class VirtualMachineScaleSetIdentity(Model): + """Identity for the virtual machine scale set. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar principal_id: The principal id of virtual machine scale set + identity. + :vartype principal_id: str + :ivar tenant_id: The tenant id associated with the virtual machine scale + set. + :vartype tenant_id: str + :param type: The type of identity used for the virtual machine scale set. + Currently, the only supported type is 'SystemAssigned', which implicitly + creates an identity. Possible values include: 'SystemAssigned' + :type type: str or + ~azure.mgmt.compute.v2017_03_30.models.ResourceIdentityType + """ + + _validation = { + 'principal_id': {'readonly': True}, + 'tenant_id': {'readonly': True}, + } + + _attribute_map = { + 'principal_id': {'key': 'principalId', 'type': 'str'}, + 'tenant_id': {'key': 'tenantId', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'ResourceIdentityType'}, + } + + def __init__(self, *, type=None, **kwargs) -> None: + super(VirtualMachineScaleSetIdentity, self).__init__(**kwargs) + self.principal_id = None + self.tenant_id = None + self.type = type + + +class VirtualMachineScaleSetInstanceView(Model): + """The instance view of a virtual machine scale set. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar virtual_machine: The instance view status summary for the virtual + machine scale set. + :vartype virtual_machine: + ~azure.mgmt.compute.v2017_03_30.models.VirtualMachineScaleSetInstanceViewStatusesSummary + :ivar extensions: The extensions information. + :vartype extensions: + list[~azure.mgmt.compute.v2017_03_30.models.VirtualMachineScaleSetVMExtensionsSummary] + :param statuses: The resource status information. + :type statuses: + list[~azure.mgmt.compute.v2017_03_30.models.InstanceViewStatus] + """ + + _validation = { + 'virtual_machine': {'readonly': True}, + 'extensions': {'readonly': True}, + } + + _attribute_map = { + 'virtual_machine': {'key': 'virtualMachine', 'type': 'VirtualMachineScaleSetInstanceViewStatusesSummary'}, + 'extensions': {'key': 'extensions', 'type': '[VirtualMachineScaleSetVMExtensionsSummary]'}, + 'statuses': {'key': 'statuses', 'type': '[InstanceViewStatus]'}, + } + + def __init__(self, *, statuses=None, **kwargs) -> None: + super(VirtualMachineScaleSetInstanceView, self).__init__(**kwargs) + self.virtual_machine = None + self.extensions = None + self.statuses = statuses + + +class VirtualMachineScaleSetInstanceViewStatusesSummary(Model): + """Instance view statuses summary for virtual machines of a virtual machine + scale set. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar statuses_summary: The extensions information. + :vartype statuses_summary: + list[~azure.mgmt.compute.v2017_03_30.models.VirtualMachineStatusCodeCount] + """ + + _validation = { + 'statuses_summary': {'readonly': True}, + } + + _attribute_map = { + 'statuses_summary': {'key': 'statusesSummary', 'type': '[VirtualMachineStatusCodeCount]'}, + } + + def __init__(self, **kwargs) -> None: + super(VirtualMachineScaleSetInstanceViewStatusesSummary, self).__init__(**kwargs) + self.statuses_summary = None + + +class VirtualMachineScaleSetIPConfiguration(SubResource): + """Describes a virtual machine scale set network profile's IP configuration. + + All required parameters must be populated in order to send to Azure. + + :param id: Resource Id + :type id: str + :param name: Required. The IP configuration name. + :type name: str + :param subnet: Specifies the identifier of the subnet. + :type subnet: ~azure.mgmt.compute.v2017_03_30.models.ApiEntityReference + :param primary: Specifies the primary network interface in case the + virtual machine has more than 1 network interface. + :type primary: bool + :param public_ip_address_configuration: The publicIPAddressConfiguration. + :type public_ip_address_configuration: + ~azure.mgmt.compute.v2017_03_30.models.VirtualMachineScaleSetPublicIPAddressConfiguration + :param private_ip_address_version: Available from Api-Version 2017-03-30 + onwards, it represents whether the specific ipconfiguration is IPv4 or + IPv6. Default is taken as IPv4. Possible values are: 'IPv4' and 'IPv6'. + Possible values include: 'IPv4', 'IPv6' + :type private_ip_address_version: str or + ~azure.mgmt.compute.v2017_03_30.models.IPVersion + :param application_gateway_backend_address_pools: Specifies an array of + references to backend address pools of application gateways. A scale set + can reference backend address pools of multiple application gateways. + Multiple scale sets cannot use the same application gateway. + :type application_gateway_backend_address_pools: + list[~azure.mgmt.compute.v2017_03_30.models.SubResource] + :param load_balancer_backend_address_pools: Specifies an array of + references to backend address pools of load balancers. A scale set can + reference backend address pools of one public and one internal load + balancer. Multiple scale sets cannot use the same load balancer. + :type load_balancer_backend_address_pools: + list[~azure.mgmt.compute.v2017_03_30.models.SubResource] + :param load_balancer_inbound_nat_pools: Specifies an array of references + to inbound Nat pools of the load balancers. A scale set can reference + inbound nat pools of one public and one internal load balancer. Multiple + scale sets cannot use the same load balancer + :type load_balancer_inbound_nat_pools: + list[~azure.mgmt.compute.v2017_03_30.models.SubResource] + """ + + _validation = { + 'name': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'subnet': {'key': 'properties.subnet', 'type': 'ApiEntityReference'}, + 'primary': {'key': 'properties.primary', 'type': 'bool'}, + 'public_ip_address_configuration': {'key': 'properties.publicIPAddressConfiguration', 'type': 'VirtualMachineScaleSetPublicIPAddressConfiguration'}, + 'private_ip_address_version': {'key': 'properties.privateIPAddressVersion', 'type': 'str'}, + 'application_gateway_backend_address_pools': {'key': 'properties.applicationGatewayBackendAddressPools', 'type': '[SubResource]'}, + 'load_balancer_backend_address_pools': {'key': 'properties.loadBalancerBackendAddressPools', 'type': '[SubResource]'}, + 'load_balancer_inbound_nat_pools': {'key': 'properties.loadBalancerInboundNatPools', 'type': '[SubResource]'}, + } + + def __init__(self, *, name: str, id: str=None, subnet=None, primary: bool=None, public_ip_address_configuration=None, private_ip_address_version=None, application_gateway_backend_address_pools=None, load_balancer_backend_address_pools=None, load_balancer_inbound_nat_pools=None, **kwargs) -> None: + super(VirtualMachineScaleSetIPConfiguration, self).__init__(id=id, **kwargs) + self.name = name + self.subnet = subnet + self.primary = primary + self.public_ip_address_configuration = public_ip_address_configuration + self.private_ip_address_version = private_ip_address_version + self.application_gateway_backend_address_pools = application_gateway_backend_address_pools + self.load_balancer_backend_address_pools = load_balancer_backend_address_pools + self.load_balancer_inbound_nat_pools = load_balancer_inbound_nat_pools + + +class VirtualMachineScaleSetManagedDiskParameters(Model): + """Describes the parameters of a ScaleSet managed disk. + + :param storage_account_type: Specifies the storage account type for the + managed disk. Possible values are: Standard_LRS or Premium_LRS. Possible + values include: 'Standard_LRS', 'Premium_LRS' + :type storage_account_type: str or + ~azure.mgmt.compute.v2017_03_30.models.StorageAccountTypes + """ + + _attribute_map = { + 'storage_account_type': {'key': 'storageAccountType', 'type': 'str'}, + } + + def __init__(self, *, storage_account_type=None, **kwargs) -> None: + super(VirtualMachineScaleSetManagedDiskParameters, self).__init__(**kwargs) + self.storage_account_type = storage_account_type + + +class VirtualMachineScaleSetNetworkConfiguration(SubResource): + """Describes a virtual machine scale set network profile's network + configurations. + + All required parameters must be populated in order to send to Azure. + + :param id: Resource Id + :type id: str + :param name: Required. The network configuration name. + :type name: str + :param primary: Specifies the primary network interface in case the + virtual machine has more than 1 network interface. + :type primary: bool + :param enable_accelerated_networking: Specifies whether the network + interface is accelerated networking-enabled. + :type enable_accelerated_networking: bool + :param network_security_group: The network security group. + :type network_security_group: + ~azure.mgmt.compute.v2017_03_30.models.SubResource + :param dns_settings: The dns settings to be applied on the network + interfaces. + :type dns_settings: + ~azure.mgmt.compute.v2017_03_30.models.VirtualMachineScaleSetNetworkConfigurationDnsSettings + :param ip_configurations: Required. Specifies the IP configurations of the + network interface. + :type ip_configurations: + list[~azure.mgmt.compute.v2017_03_30.models.VirtualMachineScaleSetIPConfiguration] + """ + + _validation = { + 'name': {'required': True}, + 'ip_configurations': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'primary': {'key': 'properties.primary', 'type': 'bool'}, + 'enable_accelerated_networking': {'key': 'properties.enableAcceleratedNetworking', 'type': 'bool'}, + 'network_security_group': {'key': 'properties.networkSecurityGroup', 'type': 'SubResource'}, + 'dns_settings': {'key': 'properties.dnsSettings', 'type': 'VirtualMachineScaleSetNetworkConfigurationDnsSettings'}, + 'ip_configurations': {'key': 'properties.ipConfigurations', 'type': '[VirtualMachineScaleSetIPConfiguration]'}, + } + + def __init__(self, *, name: str, ip_configurations, id: str=None, primary: bool=None, enable_accelerated_networking: bool=None, network_security_group=None, dns_settings=None, **kwargs) -> None: + super(VirtualMachineScaleSetNetworkConfiguration, self).__init__(id=id, **kwargs) + self.name = name + self.primary = primary + self.enable_accelerated_networking = enable_accelerated_networking + self.network_security_group = network_security_group + self.dns_settings = dns_settings + self.ip_configurations = ip_configurations + + +class VirtualMachineScaleSetNetworkConfigurationDnsSettings(Model): + """Describes a virtual machines scale sets network configuration's DNS + settings. + + :param dns_servers: List of DNS servers IP addresses + :type dns_servers: list[str] + """ + + _attribute_map = { + 'dns_servers': {'key': 'dnsServers', 'type': '[str]'}, + } + + def __init__(self, *, dns_servers=None, **kwargs) -> None: + super(VirtualMachineScaleSetNetworkConfigurationDnsSettings, self).__init__(**kwargs) + self.dns_servers = dns_servers + + +class VirtualMachineScaleSetNetworkProfile(Model): + """Describes a virtual machine scale set network profile. + + :param health_probe: A reference to a load balancer probe used to + determine the health of an instance in the virtual machine scale set. The + reference will be in the form: + '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/probes/{probeName}'. + :type health_probe: + ~azure.mgmt.compute.v2017_03_30.models.ApiEntityReference + :param network_interface_configurations: The list of network + configurations. + :type network_interface_configurations: + list[~azure.mgmt.compute.v2017_03_30.models.VirtualMachineScaleSetNetworkConfiguration] + """ + + _attribute_map = { + 'health_probe': {'key': 'healthProbe', 'type': 'ApiEntityReference'}, + 'network_interface_configurations': {'key': 'networkInterfaceConfigurations', 'type': '[VirtualMachineScaleSetNetworkConfiguration]'}, + } + + def __init__(self, *, health_probe=None, network_interface_configurations=None, **kwargs) -> None: + super(VirtualMachineScaleSetNetworkProfile, self).__init__(**kwargs) + self.health_probe = health_probe + self.network_interface_configurations = network_interface_configurations + + +class VirtualMachineScaleSetOSDisk(Model): + """Describes a virtual machine scale set operating system disk. + + All required parameters must be populated in order to send to Azure. + + :param name: The disk name. + :type name: str + :param caching: Specifies the caching requirements.

    Possible + values are:

    **None**

    **ReadOnly**

    **ReadWrite** +

    Default: **None for Standard storage. ReadOnly for Premium + storage**. Possible values include: 'None', 'ReadOnly', 'ReadWrite' + :type caching: str or ~azure.mgmt.compute.v2017_03_30.models.CachingTypes + :param create_option: Required. Specifies how the virtual machines in the + scale set should be created.

    The only allowed value is: + **FromImage** \\u2013 This value is used when you are using an image to + create the virtual machine. If you are using a platform image, you also + use the imageReference element described above. If you are using a + marketplace image, you also use the plan element previously described. + Possible values include: 'FromImage', 'Empty', 'Attach' + :type create_option: str or + ~azure.mgmt.compute.v2017_03_30.models.DiskCreateOptionTypes + :param os_type: This property allows you to specify the type of the OS + that is included in the disk if creating a VM from user-image or a + specialized VHD.

    Possible values are:

    **Windows** +

    **Linux**. Possible values include: 'Windows', 'Linux' + :type os_type: str or + ~azure.mgmt.compute.v2017_03_30.models.OperatingSystemTypes + :param image: Specifies information about the unmanaged user image to base + the scale set on. + :type image: ~azure.mgmt.compute.v2017_03_30.models.VirtualHardDisk + :param vhd_containers: Specifies the container urls that are used to store + operating system disks for the scale set. + :type vhd_containers: list[str] + :param managed_disk: The managed disk parameters. + :type managed_disk: + ~azure.mgmt.compute.v2017_03_30.models.VirtualMachineScaleSetManagedDiskParameters + """ + + _validation = { + 'create_option': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'caching': {'key': 'caching', 'type': 'CachingTypes'}, + 'create_option': {'key': 'createOption', 'type': 'DiskCreateOptionTypes'}, + 'os_type': {'key': 'osType', 'type': 'OperatingSystemTypes'}, + 'image': {'key': 'image', 'type': 'VirtualHardDisk'}, + 'vhd_containers': {'key': 'vhdContainers', 'type': '[str]'}, + 'managed_disk': {'key': 'managedDisk', 'type': 'VirtualMachineScaleSetManagedDiskParameters'}, + } + + def __init__(self, *, create_option, name: str=None, caching=None, os_type=None, image=None, vhd_containers=None, managed_disk=None, **kwargs) -> None: + super(VirtualMachineScaleSetOSDisk, self).__init__(**kwargs) + self.name = name + self.caching = caching + self.create_option = create_option + self.os_type = os_type + self.image = image + self.vhd_containers = vhd_containers + self.managed_disk = managed_disk + + +class VirtualMachineScaleSetOSProfile(Model): + """Describes a virtual machine scale set OS profile. + + :param computer_name_prefix: Specifies the computer name prefix for all of + the virtual machines in the scale set. Computer name prefixes must be 1 to + 15 characters long. + :type computer_name_prefix: str + :param admin_username: Specifies the name of the administrator account. +

    **Windows-only restriction:** Cannot end in "."

    + **Disallowed values:** "administrator", "admin", "user", "user1", "test", + "user2", "test1", "user3", "admin1", "1", "123", "a", "actuser", "adm", + "admin2", "aspnet", "backup", "console", "david", "guest", "john", + "owner", "root", "server", "sql", "support", "support_388945a0", "sys", + "test2", "test3", "user4", "user5".

    **Minimum-length (Linux):** 1 + character

    **Max-length (Linux):** 64 characters

    + **Max-length (Windows):** 20 characters

  • For root access to + the Linux VM, see [Using root privileges on Linux virtual machines in + Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-use-root-privileges?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json)
  • + For a list of built-in system users on Linux that should not be used in + this field, see [Selecting User Names for Linux on + Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-usernames?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json) + :type admin_username: str + :param admin_password: Specifies the password of the administrator + account.

    **Minimum-length (Windows):** 8 characters

    + **Minimum-length (Linux):** 6 characters

    **Max-length + (Windows):** 123 characters

    **Max-length (Linux):** 72 characters +

    **Complexity requirements:** 3 out of 4 conditions below need to + be fulfilled
    Has lower characters
    Has upper characters
    Has a + digit
    Has a special character (Regex match [\\W_])

    + **Disallowed values:** "abc@123", "P@$$w0rd", "P@ssw0rd", "P@ssword123", + "Pa$$word", "pass@word1", "Password!", "Password1", "Password22", + "iloveyou!"

    For resetting the password, see [How to reset the + Remote Desktop service or its login password in a Windows + VM](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-reset-rdp?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json) +

    For resetting root password, see [Manage users, SSH, and check or + repair disks on Azure Linux VMs using the VMAccess + Extension](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-using-vmaccess-extension?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json#reset-root-password) + :type admin_password: str + :param custom_data: Specifies a base-64 encoded string of custom data. The + base-64 encoded string is decoded to a binary array that is saved as a + file on the Virtual Machine. The maximum length of the binary array is + 65535 bytes.

    For using cloud-init for your VM, see [Using + cloud-init to customize a Linux VM during + creation](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-using-cloud-init?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json) + :type custom_data: str + :param windows_configuration: Specifies Windows operating system settings + on the virtual machine. + :type windows_configuration: + ~azure.mgmt.compute.v2017_03_30.models.WindowsConfiguration + :param linux_configuration: Specifies the Linux operating system settings + on the virtual machine.

    For a list of supported Linux + distributions, see [Linux on Azure-Endorsed + Distributions](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-endorsed-distros?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json) +

    For running non-endorsed distributions, see [Information for + Non-Endorsed + Distributions](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-create-upload-generic?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json). + :type linux_configuration: + ~azure.mgmt.compute.v2017_03_30.models.LinuxConfiguration + :param secrets: Specifies set of certificates that should be installed + onto the virtual machines in the scale set. + :type secrets: + list[~azure.mgmt.compute.v2017_03_30.models.VaultSecretGroup] + """ + + _attribute_map = { + 'computer_name_prefix': {'key': 'computerNamePrefix', 'type': 'str'}, + 'admin_username': {'key': 'adminUsername', 'type': 'str'}, + 'admin_password': {'key': 'adminPassword', 'type': 'str'}, + 'custom_data': {'key': 'customData', 'type': 'str'}, + 'windows_configuration': {'key': 'windowsConfiguration', 'type': 'WindowsConfiguration'}, + 'linux_configuration': {'key': 'linuxConfiguration', 'type': 'LinuxConfiguration'}, + 'secrets': {'key': 'secrets', 'type': '[VaultSecretGroup]'}, + } + + def __init__(self, *, computer_name_prefix: str=None, admin_username: str=None, admin_password: str=None, custom_data: str=None, windows_configuration=None, linux_configuration=None, secrets=None, **kwargs) -> None: + super(VirtualMachineScaleSetOSProfile, self).__init__(**kwargs) + self.computer_name_prefix = computer_name_prefix + self.admin_username = admin_username + self.admin_password = admin_password + self.custom_data = custom_data + self.windows_configuration = windows_configuration + self.linux_configuration = linux_configuration + self.secrets = secrets + + +class VirtualMachineScaleSetPublicIPAddressConfiguration(Model): + """Describes a virtual machines scale set IP Configuration's PublicIPAddress + configuration. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. The publicIP address configuration name. + :type name: str + :param idle_timeout_in_minutes: The idle timeout of the public IP address. + :type idle_timeout_in_minutes: int + :param dns_settings: The dns settings to be applied on the publicIP + addresses . + :type dns_settings: + ~azure.mgmt.compute.v2017_03_30.models.VirtualMachineScaleSetPublicIPAddressConfigurationDnsSettings + """ + + _validation = { + 'name': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'idle_timeout_in_minutes': {'key': 'properties.idleTimeoutInMinutes', 'type': 'int'}, + 'dns_settings': {'key': 'properties.dnsSettings', 'type': 'VirtualMachineScaleSetPublicIPAddressConfigurationDnsSettings'}, + } + + def __init__(self, *, name: str, idle_timeout_in_minutes: int=None, dns_settings=None, **kwargs) -> None: + super(VirtualMachineScaleSetPublicIPAddressConfiguration, self).__init__(**kwargs) + self.name = name + self.idle_timeout_in_minutes = idle_timeout_in_minutes + self.dns_settings = dns_settings + + +class VirtualMachineScaleSetPublicIPAddressConfigurationDnsSettings(Model): + """Describes a virtual machines scale sets network configuration's DNS + settings. + + All required parameters must be populated in order to send to Azure. + + :param domain_name_label: Required. The Domain name label.The + concatenation of the domain name label and vm index will be the domain + name labels of the PublicIPAddress resources that will be created + :type domain_name_label: str + """ + + _validation = { + 'domain_name_label': {'required': True}, + } + + _attribute_map = { + 'domain_name_label': {'key': 'domainNameLabel', 'type': 'str'}, + } + + def __init__(self, *, domain_name_label: str, **kwargs) -> None: + super(VirtualMachineScaleSetPublicIPAddressConfigurationDnsSettings, self).__init__(**kwargs) + self.domain_name_label = domain_name_label + + +class VirtualMachineScaleSetSku(Model): + """Describes an available virtual machine scale set sku. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar resource_type: The type of resource the sku applies to. + :vartype resource_type: str + :ivar sku: The Sku. + :vartype sku: ~azure.mgmt.compute.v2017_03_30.models.Sku + :ivar capacity: Specifies the number of virtual machines in the scale set. + :vartype capacity: + ~azure.mgmt.compute.v2017_03_30.models.VirtualMachineScaleSetSkuCapacity + """ + + _validation = { + 'resource_type': {'readonly': True}, + 'sku': {'readonly': True}, + 'capacity': {'readonly': True}, + } + + _attribute_map = { + 'resource_type': {'key': 'resourceType', 'type': 'str'}, + 'sku': {'key': 'sku', 'type': 'Sku'}, + 'capacity': {'key': 'capacity', 'type': 'VirtualMachineScaleSetSkuCapacity'}, + } + + def __init__(self, **kwargs) -> None: + super(VirtualMachineScaleSetSku, self).__init__(**kwargs) + self.resource_type = None + self.sku = None + self.capacity = None + + +class VirtualMachineScaleSetSkuCapacity(Model): + """Describes scaling information of a sku. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar minimum: The minimum capacity. + :vartype minimum: long + :ivar maximum: The maximum capacity that can be set. + :vartype maximum: long + :ivar default_capacity: The default capacity. + :vartype default_capacity: long + :ivar scale_type: The scale type applicable to the sku. Possible values + include: 'Automatic', 'None' + :vartype scale_type: str or + ~azure.mgmt.compute.v2017_03_30.models.VirtualMachineScaleSetSkuScaleType + """ + + _validation = { + 'minimum': {'readonly': True}, + 'maximum': {'readonly': True}, + 'default_capacity': {'readonly': True}, + 'scale_type': {'readonly': True}, + } + + _attribute_map = { + 'minimum': {'key': 'minimum', 'type': 'long'}, + 'maximum': {'key': 'maximum', 'type': 'long'}, + 'default_capacity': {'key': 'defaultCapacity', 'type': 'long'}, + 'scale_type': {'key': 'scaleType', 'type': 'VirtualMachineScaleSetSkuScaleType'}, + } + + def __init__(self, **kwargs) -> None: + super(VirtualMachineScaleSetSkuCapacity, self).__init__(**kwargs) + self.minimum = None + self.maximum = None + self.default_capacity = None + self.scale_type = None + + +class VirtualMachineScaleSetStorageProfile(Model): + """Describes a virtual machine scale set storage profile. + + :param image_reference: Specifies information about the image to use. You + can specify information about platform images, marketplace images, or + virtual machine images. This element is required when you want to use a + platform image, marketplace image, or virtual machine image, but is not + used in other creation operations. + :type image_reference: + ~azure.mgmt.compute.v2017_03_30.models.ImageReference + :param os_disk: Specifies information about the operating system disk used + by the virtual machines in the scale set.

    For more information + about disks, see [About disks and VHDs for Azure virtual + machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-about-disks-vhds?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). + :type os_disk: + ~azure.mgmt.compute.v2017_03_30.models.VirtualMachineScaleSetOSDisk + :param data_disks: Specifies the parameters that are used to add data + disks to the virtual machines in the scale set.

    For more + information about disks, see [About disks and VHDs for Azure virtual + machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-about-disks-vhds?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). + :type data_disks: + list[~azure.mgmt.compute.v2017_03_30.models.VirtualMachineScaleSetDataDisk] + """ + + _attribute_map = { + 'image_reference': {'key': 'imageReference', 'type': 'ImageReference'}, + 'os_disk': {'key': 'osDisk', 'type': 'VirtualMachineScaleSetOSDisk'}, + 'data_disks': {'key': 'dataDisks', 'type': '[VirtualMachineScaleSetDataDisk]'}, + } + + def __init__(self, *, image_reference=None, os_disk=None, data_disks=None, **kwargs) -> None: + super(VirtualMachineScaleSetStorageProfile, self).__init__(**kwargs) + self.image_reference = image_reference + self.os_disk = os_disk + self.data_disks = data_disks + + +class VirtualMachineScaleSetUpdate(UpdateResource): + """Describes a Virtual Machine Scale Set. + + :param tags: Resource tags + :type tags: dict[str, str] + :param sku: The virtual machine scale set sku. + :type sku: ~azure.mgmt.compute.v2017_03_30.models.Sku + :param plan: The purchase plan when deploying a virtual machine scale set + from VM Marketplace images. + :type plan: ~azure.mgmt.compute.v2017_03_30.models.Plan + :param upgrade_policy: The upgrade policy. + :type upgrade_policy: ~azure.mgmt.compute.v2017_03_30.models.UpgradePolicy + :param virtual_machine_profile: The virtual machine profile. + :type virtual_machine_profile: + ~azure.mgmt.compute.v2017_03_30.models.VirtualMachineScaleSetUpdateVMProfile + :param overprovision: Specifies whether the Virtual Machine Scale Set + should be overprovisioned. + :type overprovision: bool + :param single_placement_group: When true this limits the scale set to a + single placement group, of max size 100 virtual machines. + :type single_placement_group: bool + :param identity: The identity of the virtual machine scale set, if + configured. + :type identity: + ~azure.mgmt.compute.v2017_03_30.models.VirtualMachineScaleSetIdentity + """ + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + 'sku': {'key': 'sku', 'type': 'Sku'}, + 'plan': {'key': 'plan', 'type': 'Plan'}, + 'upgrade_policy': {'key': 'properties.upgradePolicy', 'type': 'UpgradePolicy'}, + 'virtual_machine_profile': {'key': 'properties.virtualMachineProfile', 'type': 'VirtualMachineScaleSetUpdateVMProfile'}, + 'overprovision': {'key': 'properties.overprovision', 'type': 'bool'}, + 'single_placement_group': {'key': 'properties.singlePlacementGroup', 'type': 'bool'}, + 'identity': {'key': 'identity', 'type': 'VirtualMachineScaleSetIdentity'}, + } + + def __init__(self, *, tags=None, sku=None, plan=None, upgrade_policy=None, virtual_machine_profile=None, overprovision: bool=None, single_placement_group: bool=None, identity=None, **kwargs) -> None: + super(VirtualMachineScaleSetUpdate, self).__init__(tags=tags, **kwargs) + self.sku = sku + self.plan = plan + self.upgrade_policy = upgrade_policy + self.virtual_machine_profile = virtual_machine_profile + self.overprovision = overprovision + self.single_placement_group = single_placement_group + self.identity = identity + + +class VirtualMachineScaleSetUpdateIPConfiguration(SubResource): + """Describes a virtual machine scale set network profile's IP configuration. + + :param id: Resource Id + :type id: str + :param name: The IP configuration name. + :type name: str + :param subnet: The subnet. + :type subnet: ~azure.mgmt.compute.v2017_03_30.models.ApiEntityReference + :param primary: Specifies the primary IP Configuration in case the network + interface has more than one IP Configuration. + :type primary: bool + :param public_ip_address_configuration: The publicIPAddressConfiguration. + :type public_ip_address_configuration: + ~azure.mgmt.compute.v2017_03_30.models.VirtualMachineScaleSetUpdatePublicIPAddressConfiguration + :param private_ip_address_version: Available from Api-Version 2017-03-30 + onwards, it represents whether the specific ipconfiguration is IPv4 or + IPv6. Default is taken as IPv4. Possible values are: 'IPv4' and 'IPv6'. + Possible values include: 'IPv4', 'IPv6' + :type private_ip_address_version: str or + ~azure.mgmt.compute.v2017_03_30.models.IPVersion + :param application_gateway_backend_address_pools: The application gateway + backend address pools. + :type application_gateway_backend_address_pools: + list[~azure.mgmt.compute.v2017_03_30.models.SubResource] + :param load_balancer_backend_address_pools: The load balancer backend + address pools. + :type load_balancer_backend_address_pools: + list[~azure.mgmt.compute.v2017_03_30.models.SubResource] + :param load_balancer_inbound_nat_pools: The load balancer inbound nat + pools. + :type load_balancer_inbound_nat_pools: + list[~azure.mgmt.compute.v2017_03_30.models.SubResource] + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'subnet': {'key': 'properties.subnet', 'type': 'ApiEntityReference'}, + 'primary': {'key': 'properties.primary', 'type': 'bool'}, + 'public_ip_address_configuration': {'key': 'properties.publicIPAddressConfiguration', 'type': 'VirtualMachineScaleSetUpdatePublicIPAddressConfiguration'}, + 'private_ip_address_version': {'key': 'properties.privateIPAddressVersion', 'type': 'str'}, + 'application_gateway_backend_address_pools': {'key': 'properties.applicationGatewayBackendAddressPools', 'type': '[SubResource]'}, + 'load_balancer_backend_address_pools': {'key': 'properties.loadBalancerBackendAddressPools', 'type': '[SubResource]'}, + 'load_balancer_inbound_nat_pools': {'key': 'properties.loadBalancerInboundNatPools', 'type': '[SubResource]'}, + } + + def __init__(self, *, id: str=None, name: str=None, subnet=None, primary: bool=None, public_ip_address_configuration=None, private_ip_address_version=None, application_gateway_backend_address_pools=None, load_balancer_backend_address_pools=None, load_balancer_inbound_nat_pools=None, **kwargs) -> None: + super(VirtualMachineScaleSetUpdateIPConfiguration, self).__init__(id=id, **kwargs) + self.name = name + self.subnet = subnet + self.primary = primary + self.public_ip_address_configuration = public_ip_address_configuration + self.private_ip_address_version = private_ip_address_version + self.application_gateway_backend_address_pools = application_gateway_backend_address_pools + self.load_balancer_backend_address_pools = load_balancer_backend_address_pools + self.load_balancer_inbound_nat_pools = load_balancer_inbound_nat_pools + + +class VirtualMachineScaleSetUpdateNetworkConfiguration(SubResource): + """Describes a virtual machine scale set network profile's network + configurations. + + :param id: Resource Id + :type id: str + :param name: The network configuration name. + :type name: str + :param primary: Whether this is a primary NIC on a virtual machine. + :type primary: bool + :param enable_accelerated_networking: Specifies whether the network + interface is accelerated networking-enabled. + :type enable_accelerated_networking: bool + :param network_security_group: The network security group. + :type network_security_group: + ~azure.mgmt.compute.v2017_03_30.models.SubResource + :param dns_settings: The dns settings to be applied on the network + interfaces. + :type dns_settings: + ~azure.mgmt.compute.v2017_03_30.models.VirtualMachineScaleSetNetworkConfigurationDnsSettings + :param ip_configurations: The virtual machine scale set IP Configuration. + :type ip_configurations: + list[~azure.mgmt.compute.v2017_03_30.models.VirtualMachineScaleSetUpdateIPConfiguration] + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'primary': {'key': 'properties.primary', 'type': 'bool'}, + 'enable_accelerated_networking': {'key': 'properties.enableAcceleratedNetworking', 'type': 'bool'}, + 'network_security_group': {'key': 'properties.networkSecurityGroup', 'type': 'SubResource'}, + 'dns_settings': {'key': 'properties.dnsSettings', 'type': 'VirtualMachineScaleSetNetworkConfigurationDnsSettings'}, + 'ip_configurations': {'key': 'properties.ipConfigurations', 'type': '[VirtualMachineScaleSetUpdateIPConfiguration]'}, + } + + def __init__(self, *, id: str=None, name: str=None, primary: bool=None, enable_accelerated_networking: bool=None, network_security_group=None, dns_settings=None, ip_configurations=None, **kwargs) -> None: + super(VirtualMachineScaleSetUpdateNetworkConfiguration, self).__init__(id=id, **kwargs) + self.name = name + self.primary = primary + self.enable_accelerated_networking = enable_accelerated_networking + self.network_security_group = network_security_group + self.dns_settings = dns_settings + self.ip_configurations = ip_configurations + + +class VirtualMachineScaleSetUpdateNetworkProfile(Model): + """Describes a virtual machine scale set network profile. + + :param network_interface_configurations: The list of network + configurations. + :type network_interface_configurations: + list[~azure.mgmt.compute.v2017_03_30.models.VirtualMachineScaleSetUpdateNetworkConfiguration] + """ + + _attribute_map = { + 'network_interface_configurations': {'key': 'networkInterfaceConfigurations', 'type': '[VirtualMachineScaleSetUpdateNetworkConfiguration]'}, + } + + def __init__(self, *, network_interface_configurations=None, **kwargs) -> None: + super(VirtualMachineScaleSetUpdateNetworkProfile, self).__init__(**kwargs) + self.network_interface_configurations = network_interface_configurations + + +class VirtualMachineScaleSetUpdateOSDisk(Model): + """Describes virtual machine scale set operating system disk Update Object. + This should be used for Updating VMSS OS Disk. + + :param caching: The caching type. Possible values include: 'None', + 'ReadOnly', 'ReadWrite' + :type caching: str or ~azure.mgmt.compute.v2017_03_30.models.CachingTypes + :param image: The Source User Image VirtualHardDisk. This VirtualHardDisk + will be copied before using it to attach to the Virtual Machine. If + SourceImage is provided, the destination VirtualHardDisk should not exist. + :type image: ~azure.mgmt.compute.v2017_03_30.models.VirtualHardDisk + :param vhd_containers: The list of virtual hard disk container uris. + :type vhd_containers: list[str] + :param managed_disk: The managed disk parameters. + :type managed_disk: + ~azure.mgmt.compute.v2017_03_30.models.VirtualMachineScaleSetManagedDiskParameters + """ + + _attribute_map = { + 'caching': {'key': 'caching', 'type': 'CachingTypes'}, + 'image': {'key': 'image', 'type': 'VirtualHardDisk'}, + 'vhd_containers': {'key': 'vhdContainers', 'type': '[str]'}, + 'managed_disk': {'key': 'managedDisk', 'type': 'VirtualMachineScaleSetManagedDiskParameters'}, + } + + def __init__(self, *, caching=None, image=None, vhd_containers=None, managed_disk=None, **kwargs) -> None: + super(VirtualMachineScaleSetUpdateOSDisk, self).__init__(**kwargs) + self.caching = caching + self.image = image + self.vhd_containers = vhd_containers + self.managed_disk = managed_disk + + +class VirtualMachineScaleSetUpdateOSProfile(Model): + """Describes a virtual machine scale set OS profile. + + :param custom_data: A base-64 encoded string of custom data. + :type custom_data: str + :param windows_configuration: The Windows Configuration of the OS profile. + :type windows_configuration: + ~azure.mgmt.compute.v2017_03_30.models.WindowsConfiguration + :param linux_configuration: The Linux Configuration of the OS profile. + :type linux_configuration: + ~azure.mgmt.compute.v2017_03_30.models.LinuxConfiguration + :param secrets: The List of certificates for addition to the VM. + :type secrets: + list[~azure.mgmt.compute.v2017_03_30.models.VaultSecretGroup] + """ + + _attribute_map = { + 'custom_data': {'key': 'customData', 'type': 'str'}, + 'windows_configuration': {'key': 'windowsConfiguration', 'type': 'WindowsConfiguration'}, + 'linux_configuration': {'key': 'linuxConfiguration', 'type': 'LinuxConfiguration'}, + 'secrets': {'key': 'secrets', 'type': '[VaultSecretGroup]'}, + } + + def __init__(self, *, custom_data: str=None, windows_configuration=None, linux_configuration=None, secrets=None, **kwargs) -> None: + super(VirtualMachineScaleSetUpdateOSProfile, self).__init__(**kwargs) + self.custom_data = custom_data + self.windows_configuration = windows_configuration + self.linux_configuration = linux_configuration + self.secrets = secrets + + +class VirtualMachineScaleSetUpdatePublicIPAddressConfiguration(Model): + """Describes a virtual machines scale set IP Configuration's PublicIPAddress + configuration. + + :param name: The publicIP address configuration name. + :type name: str + :param idle_timeout_in_minutes: The idle timeout of the public IP address. + :type idle_timeout_in_minutes: int + :param dns_settings: The dns settings to be applied on the publicIP + addresses . + :type dns_settings: + ~azure.mgmt.compute.v2017_03_30.models.VirtualMachineScaleSetPublicIPAddressConfigurationDnsSettings + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'idle_timeout_in_minutes': {'key': 'properties.idleTimeoutInMinutes', 'type': 'int'}, + 'dns_settings': {'key': 'properties.dnsSettings', 'type': 'VirtualMachineScaleSetPublicIPAddressConfigurationDnsSettings'}, + } + + def __init__(self, *, name: str=None, idle_timeout_in_minutes: int=None, dns_settings=None, **kwargs) -> None: + super(VirtualMachineScaleSetUpdatePublicIPAddressConfiguration, self).__init__(**kwargs) + self.name = name + self.idle_timeout_in_minutes = idle_timeout_in_minutes + self.dns_settings = dns_settings + + +class VirtualMachineScaleSetUpdateStorageProfile(Model): + """Describes a virtual machine scale set storage profile. + + :param image_reference: The image reference. + :type image_reference: + ~azure.mgmt.compute.v2017_03_30.models.ImageReference + :param os_disk: The OS disk. + :type os_disk: + ~azure.mgmt.compute.v2017_03_30.models.VirtualMachineScaleSetUpdateOSDisk + :param data_disks: The data disks. + :type data_disks: + list[~azure.mgmt.compute.v2017_03_30.models.VirtualMachineScaleSetDataDisk] + """ + + _attribute_map = { + 'image_reference': {'key': 'imageReference', 'type': 'ImageReference'}, + 'os_disk': {'key': 'osDisk', 'type': 'VirtualMachineScaleSetUpdateOSDisk'}, + 'data_disks': {'key': 'dataDisks', 'type': '[VirtualMachineScaleSetDataDisk]'}, + } + + def __init__(self, *, image_reference=None, os_disk=None, data_disks=None, **kwargs) -> None: + super(VirtualMachineScaleSetUpdateStorageProfile, self).__init__(**kwargs) + self.image_reference = image_reference + self.os_disk = os_disk + self.data_disks = data_disks + + +class VirtualMachineScaleSetUpdateVMProfile(Model): + """Describes a virtual machine scale set virtual machine profile. + + :param os_profile: The virtual machine scale set OS profile. + :type os_profile: + ~azure.mgmt.compute.v2017_03_30.models.VirtualMachineScaleSetUpdateOSProfile + :param storage_profile: The virtual machine scale set storage profile. + :type storage_profile: + ~azure.mgmt.compute.v2017_03_30.models.VirtualMachineScaleSetUpdateStorageProfile + :param network_profile: The virtual machine scale set network profile. + :type network_profile: + ~azure.mgmt.compute.v2017_03_30.models.VirtualMachineScaleSetUpdateNetworkProfile + :param diagnostics_profile: The virtual machine scale set diagnostics + profile. + :type diagnostics_profile: + ~azure.mgmt.compute.v2017_03_30.models.DiagnosticsProfile + :param extension_profile: The virtual machine scale set extension profile. + :type extension_profile: + ~azure.mgmt.compute.v2017_03_30.models.VirtualMachineScaleSetExtensionProfile + :param license_type: The license type, which is for bring your own license + scenario. + :type license_type: str + """ + + _attribute_map = { + 'os_profile': {'key': 'osProfile', 'type': 'VirtualMachineScaleSetUpdateOSProfile'}, + 'storage_profile': {'key': 'storageProfile', 'type': 'VirtualMachineScaleSetUpdateStorageProfile'}, + 'network_profile': {'key': 'networkProfile', 'type': 'VirtualMachineScaleSetUpdateNetworkProfile'}, + 'diagnostics_profile': {'key': 'diagnosticsProfile', 'type': 'DiagnosticsProfile'}, + 'extension_profile': {'key': 'extensionProfile', 'type': 'VirtualMachineScaleSetExtensionProfile'}, + 'license_type': {'key': 'licenseType', 'type': 'str'}, + } + + def __init__(self, *, os_profile=None, storage_profile=None, network_profile=None, diagnostics_profile=None, extension_profile=None, license_type: str=None, **kwargs) -> None: + super(VirtualMachineScaleSetUpdateVMProfile, self).__init__(**kwargs) + self.os_profile = os_profile + self.storage_profile = storage_profile + self.network_profile = network_profile + self.diagnostics_profile = diagnostics_profile + self.extension_profile = extension_profile + self.license_type = license_type + + +class VirtualMachineScaleSetVM(Resource): + """Describes a virtual machine scale set virtual machine. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource Id + :vartype id: str + :ivar name: Resource name + :vartype name: str + :ivar type: Resource type + :vartype type: str + :param location: Required. Resource location + :type location: str + :param tags: Resource tags + :type tags: dict[str, str] + :ivar instance_id: The virtual machine instance ID. + :vartype instance_id: str + :ivar sku: The virtual machine SKU. + :vartype sku: ~azure.mgmt.compute.v2017_03_30.models.Sku + :ivar latest_model_applied: Specifies whether the latest model has been + applied to the virtual machine. + :vartype latest_model_applied: bool + :ivar vm_id: Azure VM unique ID. + :vartype vm_id: str + :ivar instance_view: The virtual machine instance view. + :vartype instance_view: + ~azure.mgmt.compute.v2017_03_30.models.VirtualMachineScaleSetVMInstanceView + :param hardware_profile: Specifies the hardware settings for the virtual + machine. + :type hardware_profile: + ~azure.mgmt.compute.v2017_03_30.models.HardwareProfile + :param storage_profile: Specifies the storage settings for the virtual + machine disks. + :type storage_profile: + ~azure.mgmt.compute.v2017_03_30.models.StorageProfile + :param os_profile: Specifies the operating system settings for the virtual + machine. + :type os_profile: ~azure.mgmt.compute.v2017_03_30.models.OSProfile + :param network_profile: Specifies the network interfaces of the virtual + machine. + :type network_profile: + ~azure.mgmt.compute.v2017_03_30.models.NetworkProfile + :param diagnostics_profile: Specifies the boot diagnostic settings state. +

    Minimum api-version: 2015-06-15. + :type diagnostics_profile: + ~azure.mgmt.compute.v2017_03_30.models.DiagnosticsProfile + :param availability_set: Specifies information about the availability set + that the virtual machine should be assigned to. Virtual machines specified + in the same availability set are allocated to different nodes to maximize + availability. For more information about availability sets, see [Manage + the availability of virtual + machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-manage-availability?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). +

    For more information on Azure planned maintenance, see [Planned + maintenance for virtual machines in + Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-planned-maintenance?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json) +

    Currently, a VM can only be added to availability set at creation + time. An existing VM cannot be added to an availability set. + :type availability_set: ~azure.mgmt.compute.v2017_03_30.models.SubResource + :ivar provisioning_state: The provisioning state, which only appears in + the response. + :vartype provisioning_state: str + :param license_type: Specifies that the image or disk that is being used + was licensed on-premises. This element is only used for images that + contain the Windows Server operating system.

    Possible values are: +

    Windows_Client

    Windows_Server

    If this element + is included in a request for an update, the value must match the initial + value. This value cannot be updated.

    For more information, see + [Azure Hybrid Use Benefit for Windows + Server](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-hybrid-use-benefit-licensing?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json) +

    Minimum api-version: 2015-06-15 + :type license_type: str + :param plan: Specifies information about the marketplace image used to + create the virtual machine. This element is only used for marketplace + images. Before you can use a marketplace image from an API, you must + enable the image for programmatic use. In the Azure portal, find the + marketplace image that you want to use and then click **Want to deploy + programmatically, Get Started ->**. Enter any required information and + then click **Save**. + :type plan: ~azure.mgmt.compute.v2017_03_30.models.Plan + :ivar resources: The virtual machine child extension resources. + :vartype resources: + list[~azure.mgmt.compute.v2017_03_30.models.VirtualMachineExtension] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + 'instance_id': {'readonly': True}, + 'sku': {'readonly': True}, + 'latest_model_applied': {'readonly': True}, + 'vm_id': {'readonly': True}, + 'instance_view': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + 'resources': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'instance_id': {'key': 'instanceId', 'type': 'str'}, + 'sku': {'key': 'sku', 'type': 'Sku'}, + 'latest_model_applied': {'key': 'properties.latestModelApplied', 'type': 'bool'}, + 'vm_id': {'key': 'properties.vmId', 'type': 'str'}, + 'instance_view': {'key': 'properties.instanceView', 'type': 'VirtualMachineScaleSetVMInstanceView'}, + 'hardware_profile': {'key': 'properties.hardwareProfile', 'type': 'HardwareProfile'}, + 'storage_profile': {'key': 'properties.storageProfile', 'type': 'StorageProfile'}, + 'os_profile': {'key': 'properties.osProfile', 'type': 'OSProfile'}, + 'network_profile': {'key': 'properties.networkProfile', 'type': 'NetworkProfile'}, + 'diagnostics_profile': {'key': 'properties.diagnosticsProfile', 'type': 'DiagnosticsProfile'}, + 'availability_set': {'key': 'properties.availabilitySet', 'type': 'SubResource'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'license_type': {'key': 'properties.licenseType', 'type': 'str'}, + 'plan': {'key': 'plan', 'type': 'Plan'}, + 'resources': {'key': 'resources', 'type': '[VirtualMachineExtension]'}, + } + + def __init__(self, *, location: str, tags=None, hardware_profile=None, storage_profile=None, os_profile=None, network_profile=None, diagnostics_profile=None, availability_set=None, license_type: str=None, plan=None, **kwargs) -> None: + super(VirtualMachineScaleSetVM, self).__init__(location=location, tags=tags, **kwargs) + self.instance_id = None + self.sku = None + self.latest_model_applied = None + self.vm_id = None + self.instance_view = None + self.hardware_profile = hardware_profile + self.storage_profile = storage_profile + self.os_profile = os_profile + self.network_profile = network_profile + self.diagnostics_profile = diagnostics_profile + self.availability_set = availability_set + self.provisioning_state = None + self.license_type = license_type + self.plan = plan + self.resources = None + + +class VirtualMachineScaleSetVMExtensionsSummary(Model): + """Extensions summary for virtual machines of a virtual machine scale set. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar name: The extension name. + :vartype name: str + :ivar statuses_summary: The extensions information. + :vartype statuses_summary: + list[~azure.mgmt.compute.v2017_03_30.models.VirtualMachineStatusCodeCount] + """ + + _validation = { + 'name': {'readonly': True}, + 'statuses_summary': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'statuses_summary': {'key': 'statusesSummary', 'type': '[VirtualMachineStatusCodeCount]'}, + } + + def __init__(self, **kwargs) -> None: + super(VirtualMachineScaleSetVMExtensionsSummary, self).__init__(**kwargs) + self.name = None + self.statuses_summary = None + + +class VirtualMachineScaleSetVMInstanceIDs(Model): + """Specifies a list of virtual machine instance IDs from the VM scale set. + + :param instance_ids: The virtual machine scale set instance ids. Omitting + the virtual machine scale set instance ids will result in the operation + being performed on all virtual machines in the virtual machine scale set. + :type instance_ids: list[str] + """ + + _attribute_map = { + 'instance_ids': {'key': 'instanceIds', 'type': '[str]'}, + } + + def __init__(self, *, instance_ids=None, **kwargs) -> None: + super(VirtualMachineScaleSetVMInstanceIDs, self).__init__(**kwargs) + self.instance_ids = instance_ids + + +class VirtualMachineScaleSetVMInstanceRequiredIDs(Model): + """Specifies a list of virtual machine instance IDs from the VM scale set. + + All required parameters must be populated in order to send to Azure. + + :param instance_ids: Required. The virtual machine scale set instance ids. + :type instance_ids: list[str] + """ + + _validation = { + 'instance_ids': {'required': True}, + } + + _attribute_map = { + 'instance_ids': {'key': 'instanceIds', 'type': '[str]'}, + } + + def __init__(self, *, instance_ids, **kwargs) -> None: + super(VirtualMachineScaleSetVMInstanceRequiredIDs, self).__init__(**kwargs) + self.instance_ids = instance_ids + + +class VirtualMachineScaleSetVMInstanceView(Model): + """The instance view of a virtual machine scale set VM. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :param platform_update_domain: The Update Domain count. + :type platform_update_domain: int + :param platform_fault_domain: The Fault Domain count. + :type platform_fault_domain: int + :param rdp_thumb_print: The Remote desktop certificate thumbprint. + :type rdp_thumb_print: str + :param vm_agent: The VM Agent running on the virtual machine. + :type vm_agent: + ~azure.mgmt.compute.v2017_03_30.models.VirtualMachineAgentInstanceView + :param disks: The disks information. + :type disks: list[~azure.mgmt.compute.v2017_03_30.models.DiskInstanceView] + :param extensions: The extensions information. + :type extensions: + list[~azure.mgmt.compute.v2017_03_30.models.VirtualMachineExtensionInstanceView] + :ivar vm_health: The health status for the VM. + :vartype vm_health: + ~azure.mgmt.compute.v2017_03_30.models.VirtualMachineHealthStatus + :param boot_diagnostics: Boot Diagnostics is a debugging feature which + allows you to view Console Output and Screenshot to diagnose VM status. +

    You can easily view the output of your console log.

    + Azure also enables you to see a screenshot of the VM from the hypervisor. + :type boot_diagnostics: + ~azure.mgmt.compute.v2017_03_30.models.BootDiagnosticsInstanceView + :param statuses: The resource status information. + :type statuses: + list[~azure.mgmt.compute.v2017_03_30.models.InstanceViewStatus] + :param placement_group_id: The placement group in which the VM is running. + If the VM is deallocated it will not have a placementGroupId. + :type placement_group_id: str + """ + + _validation = { + 'vm_health': {'readonly': True}, + } + + _attribute_map = { + 'platform_update_domain': {'key': 'platformUpdateDomain', 'type': 'int'}, + 'platform_fault_domain': {'key': 'platformFaultDomain', 'type': 'int'}, + 'rdp_thumb_print': {'key': 'rdpThumbPrint', 'type': 'str'}, + 'vm_agent': {'key': 'vmAgent', 'type': 'VirtualMachineAgentInstanceView'}, + 'disks': {'key': 'disks', 'type': '[DiskInstanceView]'}, + 'extensions': {'key': 'extensions', 'type': '[VirtualMachineExtensionInstanceView]'}, + 'vm_health': {'key': 'vmHealth', 'type': 'VirtualMachineHealthStatus'}, + 'boot_diagnostics': {'key': 'bootDiagnostics', 'type': 'BootDiagnosticsInstanceView'}, + 'statuses': {'key': 'statuses', 'type': '[InstanceViewStatus]'}, + 'placement_group_id': {'key': 'placementGroupId', 'type': 'str'}, + } + + def __init__(self, *, platform_update_domain: int=None, platform_fault_domain: int=None, rdp_thumb_print: str=None, vm_agent=None, disks=None, extensions=None, boot_diagnostics=None, statuses=None, placement_group_id: str=None, **kwargs) -> None: + super(VirtualMachineScaleSetVMInstanceView, self).__init__(**kwargs) + self.platform_update_domain = platform_update_domain + self.platform_fault_domain = platform_fault_domain + self.rdp_thumb_print = rdp_thumb_print + self.vm_agent = vm_agent + self.disks = disks + self.extensions = extensions + self.vm_health = None + self.boot_diagnostics = boot_diagnostics + self.statuses = statuses + self.placement_group_id = placement_group_id + + +class VirtualMachineScaleSetVMProfile(Model): + """Describes a virtual machine scale set virtual machine profile. + + :param os_profile: Specifies the operating system settings for the virtual + machines in the scale set. + :type os_profile: + ~azure.mgmt.compute.v2017_03_30.models.VirtualMachineScaleSetOSProfile + :param storage_profile: Specifies the storage settings for the virtual + machine disks. + :type storage_profile: + ~azure.mgmt.compute.v2017_03_30.models.VirtualMachineScaleSetStorageProfile + :param network_profile: Specifies properties of the network interfaces of + the virtual machines in the scale set. + :type network_profile: + ~azure.mgmt.compute.v2017_03_30.models.VirtualMachineScaleSetNetworkProfile + :param diagnostics_profile: Specifies the boot diagnostic settings state. +

    Minimum api-version: 2015-06-15. + :type diagnostics_profile: + ~azure.mgmt.compute.v2017_03_30.models.DiagnosticsProfile + :param extension_profile: Specifies a collection of settings for + extensions installed on virtual machines in the scale set. + :type extension_profile: + ~azure.mgmt.compute.v2017_03_30.models.VirtualMachineScaleSetExtensionProfile + :param license_type: Specifies that the image or disk that is being used + was licensed on-premises. This element is only used for images that + contain the Windows Server operating system.

    Possible values are: +

    Windows_Client

    Windows_Server

    If this element + is included in a request for an update, the value must match the initial + value. This value cannot be updated.

    For more information, see + [Azure Hybrid Use Benefit for Windows + Server](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-hybrid-use-benefit-licensing?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json) +

    Minimum api-version: 2015-06-15 + :type license_type: str + """ + + _attribute_map = { + 'os_profile': {'key': 'osProfile', 'type': 'VirtualMachineScaleSetOSProfile'}, + 'storage_profile': {'key': 'storageProfile', 'type': 'VirtualMachineScaleSetStorageProfile'}, + 'network_profile': {'key': 'networkProfile', 'type': 'VirtualMachineScaleSetNetworkProfile'}, + 'diagnostics_profile': {'key': 'diagnosticsProfile', 'type': 'DiagnosticsProfile'}, + 'extension_profile': {'key': 'extensionProfile', 'type': 'VirtualMachineScaleSetExtensionProfile'}, + 'license_type': {'key': 'licenseType', 'type': 'str'}, + } + + def __init__(self, *, os_profile=None, storage_profile=None, network_profile=None, diagnostics_profile=None, extension_profile=None, license_type: str=None, **kwargs) -> None: + super(VirtualMachineScaleSetVMProfile, self).__init__(**kwargs) + self.os_profile = os_profile + self.storage_profile = storage_profile + self.network_profile = network_profile + self.diagnostics_profile = diagnostics_profile + self.extension_profile = extension_profile + self.license_type = license_type + + +class VirtualMachineSize(Model): + """Describes the properties of a VM size. + + :param name: The name of the virtual machine size. + :type name: str + :param number_of_cores: The number of cores supported by the virtual + machine size. + :type number_of_cores: int + :param os_disk_size_in_mb: The OS disk size, in MB, allowed by the virtual + machine size. + :type os_disk_size_in_mb: int + :param resource_disk_size_in_mb: The resource disk size, in MB, allowed by + the virtual machine size. + :type resource_disk_size_in_mb: int + :param memory_in_mb: The amount of memory, in MB, supported by the virtual + machine size. + :type memory_in_mb: int + :param max_data_disk_count: The maximum number of data disks that can be + attached to the virtual machine size. + :type max_data_disk_count: int + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'number_of_cores': {'key': 'numberOfCores', 'type': 'int'}, + 'os_disk_size_in_mb': {'key': 'osDiskSizeInMB', 'type': 'int'}, + 'resource_disk_size_in_mb': {'key': 'resourceDiskSizeInMB', 'type': 'int'}, + 'memory_in_mb': {'key': 'memoryInMB', 'type': 'int'}, + 'max_data_disk_count': {'key': 'maxDataDiskCount', 'type': 'int'}, + } + + def __init__(self, *, name: str=None, number_of_cores: int=None, os_disk_size_in_mb: int=None, resource_disk_size_in_mb: int=None, memory_in_mb: int=None, max_data_disk_count: int=None, **kwargs) -> None: + super(VirtualMachineSize, self).__init__(**kwargs) + self.name = name + self.number_of_cores = number_of_cores + self.os_disk_size_in_mb = os_disk_size_in_mb + self.resource_disk_size_in_mb = resource_disk_size_in_mb + self.memory_in_mb = memory_in_mb + self.max_data_disk_count = max_data_disk_count + + +class VirtualMachineStatusCodeCount(Model): + """The status code and count of the virtual machine scale set instance view + status summary. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar code: The instance view status code. + :vartype code: str + :ivar count: The number of instances having a particular status code. + :vartype count: int + """ + + _validation = { + 'code': {'readonly': True}, + 'count': {'readonly': True}, + } + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + 'count': {'key': 'count', 'type': 'int'}, + } + + def __init__(self, **kwargs) -> None: + super(VirtualMachineStatusCodeCount, self).__init__(**kwargs) + self.code = None + self.count = None + + +class WindowsConfiguration(Model): + """Specifies Windows operating system settings on the virtual machine. + + :param provision_vm_agent: Indicates whether virtual machine agent should + be provisioned on the virtual machine.

    When this property is not + specified in the request body, default behavior is to set it to true. + This will ensure that VM Agent is installed on the VM so that extensions + can be added to the VM later. + :type provision_vm_agent: bool + :param enable_automatic_updates: Indicates whether virtual machine is + enabled for automatic updates. + :type enable_automatic_updates: bool + :param time_zone: Specifies the time zone of the virtual machine. e.g. + "Pacific Standard Time" + :type time_zone: str + :param additional_unattend_content: Specifies additional base-64 encoded + XML formatted information that can be included in the Unattend.xml file, + which is used by Windows Setup. + :type additional_unattend_content: + list[~azure.mgmt.compute.v2017_03_30.models.AdditionalUnattendContent] + :param win_rm: Specifies the Windows Remote Management listeners. This + enables remote Windows PowerShell. + :type win_rm: ~azure.mgmt.compute.v2017_03_30.models.WinRMConfiguration + """ + + _attribute_map = { + 'provision_vm_agent': {'key': 'provisionVMAgent', 'type': 'bool'}, + 'enable_automatic_updates': {'key': 'enableAutomaticUpdates', 'type': 'bool'}, + 'time_zone': {'key': 'timeZone', 'type': 'str'}, + 'additional_unattend_content': {'key': 'additionalUnattendContent', 'type': '[AdditionalUnattendContent]'}, + 'win_rm': {'key': 'winRM', 'type': 'WinRMConfiguration'}, + } + + def __init__(self, *, provision_vm_agent: bool=None, enable_automatic_updates: bool=None, time_zone: str=None, additional_unattend_content=None, win_rm=None, **kwargs) -> None: + super(WindowsConfiguration, self).__init__(**kwargs) + self.provision_vm_agent = provision_vm_agent + self.enable_automatic_updates = enable_automatic_updates + self.time_zone = time_zone + self.additional_unattend_content = additional_unattend_content + self.win_rm = win_rm + + +class WinRMConfiguration(Model): + """Describes Windows Remote Management configuration of the VM. + + :param listeners: The list of Windows Remote Management listeners + :type listeners: + list[~azure.mgmt.compute.v2017_03_30.models.WinRMListener] + """ + + _attribute_map = { + 'listeners': {'key': 'listeners', 'type': '[WinRMListener]'}, + } + + def __init__(self, *, listeners=None, **kwargs) -> None: + super(WinRMConfiguration, self).__init__(**kwargs) + self.listeners = listeners + + +class WinRMListener(Model): + """Describes Protocol and thumbprint of Windows Remote Management listener. + + :param protocol: Specifies the protocol of listener.

    Possible + values are:
    **http**

    **https**. Possible values include: + 'Http', 'Https' + :type protocol: str or + ~azure.mgmt.compute.v2017_03_30.models.ProtocolTypes + :param certificate_url: This is the URL of a certificate that has been + uploaded to Key Vault as a secret. For adding a secret to the Key Vault, + see [Add a key or secret to the key + vault](https://docs.microsoft.com/azure/key-vault/key-vault-get-started/#add). + In this case, your certificate needs to be It is the Base64 encoding of + the following JSON Object which is encoded in UTF-8:

    {
    + "data":"",
    "dataType":"pfx",
    + "password":""
    } + :type certificate_url: str + """ + + _attribute_map = { + 'protocol': {'key': 'protocol', 'type': 'ProtocolTypes'}, + 'certificate_url': {'key': 'certificateUrl', 'type': 'str'}, + } + + def __init__(self, *, protocol=None, certificate_url: str=None, **kwargs) -> None: + super(WinRMListener, self).__init__(**kwargs) + self.protocol = protocol + self.certificate_url = certificate_url diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/_paged_models.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/_paged_models.py new file mode 100644 index 000000000000..f55c62b1938e --- /dev/null +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/_paged_models.py @@ -0,0 +1,183 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.paging import Paged + + +class AvailabilitySetPaged(Paged): + """ + A paging container for iterating over a list of :class:`AvailabilitySet ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[AvailabilitySet]'} + } + + def __init__(self, *args, **kwargs): + + super(AvailabilitySetPaged, self).__init__(*args, **kwargs) +class VirtualMachineSizePaged(Paged): + """ + A paging container for iterating over a list of :class:`VirtualMachineSize ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[VirtualMachineSize]'} + } + + def __init__(self, *args, **kwargs): + + super(VirtualMachineSizePaged, self).__init__(*args, **kwargs) +class VirtualMachinePaged(Paged): + """ + A paging container for iterating over a list of :class:`VirtualMachine ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[VirtualMachine]'} + } + + def __init__(self, *args, **kwargs): + + super(VirtualMachinePaged, self).__init__(*args, **kwargs) +class UsagePaged(Paged): + """ + A paging container for iterating over a list of :class:`Usage ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[Usage]'} + } + + def __init__(self, *args, **kwargs): + + super(UsagePaged, self).__init__(*args, **kwargs) +class ImagePaged(Paged): + """ + A paging container for iterating over a list of :class:`Image ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[Image]'} + } + + def __init__(self, *args, **kwargs): + + super(ImagePaged, self).__init__(*args, **kwargs) +class ResourceSkuPaged(Paged): + """ + A paging container for iterating over a list of :class:`ResourceSku ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[ResourceSku]'} + } + + def __init__(self, *args, **kwargs): + + super(ResourceSkuPaged, self).__init__(*args, **kwargs) +class VirtualMachineScaleSetPaged(Paged): + """ + A paging container for iterating over a list of :class:`VirtualMachineScaleSet ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[VirtualMachineScaleSet]'} + } + + def __init__(self, *args, **kwargs): + + super(VirtualMachineScaleSetPaged, self).__init__(*args, **kwargs) +class VirtualMachineScaleSetSkuPaged(Paged): + """ + A paging container for iterating over a list of :class:`VirtualMachineScaleSetSku ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[VirtualMachineScaleSetSku]'} + } + + def __init__(self, *args, **kwargs): + + super(VirtualMachineScaleSetSkuPaged, self).__init__(*args, **kwargs) +class VirtualMachineScaleSetExtensionPaged(Paged): + """ + A paging container for iterating over a list of :class:`VirtualMachineScaleSetExtension ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[VirtualMachineScaleSetExtension]'} + } + + def __init__(self, *args, **kwargs): + + super(VirtualMachineScaleSetExtensionPaged, self).__init__(*args, **kwargs) +class VirtualMachineScaleSetVMPaged(Paged): + """ + A paging container for iterating over a list of :class:`VirtualMachineScaleSetVM ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[VirtualMachineScaleSetVM]'} + } + + def __init__(self, *args, **kwargs): + + super(VirtualMachineScaleSetVMPaged, self).__init__(*args, **kwargs) +class DiskPaged(Paged): + """ + A paging container for iterating over a list of :class:`Disk ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[Disk]'} + } + + def __init__(self, *args, **kwargs): + + super(DiskPaged, self).__init__(*args, **kwargs) +class SnapshotPaged(Paged): + """ + A paging container for iterating over a list of :class:`Snapshot ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[Snapshot]'} + } + + def __init__(self, *args, **kwargs): + + super(SnapshotPaged, self).__init__(*args, **kwargs) +class RunCommandDocumentBasePaged(Paged): + """ + A paging container for iterating over a list of :class:`RunCommandDocumentBase ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[RunCommandDocumentBase]'} + } + + def __init__(self, *args, **kwargs): + + super(RunCommandDocumentBasePaged, self).__init__(*args, **kwargs) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/access_uri.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/access_uri.py deleted file mode 100644 index 9ee6b01de1e1..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/access_uri.py +++ /dev/null @@ -1,35 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class AccessUri(Model): - """A disk access SAS uri. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar access_sas: A SAS uri for accessing a disk. - :vartype access_sas: str - """ - - _validation = { - 'access_sas': {'readonly': True}, - } - - _attribute_map = { - 'access_sas': {'key': 'properties.output.accessSAS', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(AccessUri, self).__init__(**kwargs) - self.access_sas = None diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/access_uri_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/access_uri_py3.py deleted file mode 100644 index bb9e56aa4221..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/access_uri_py3.py +++ /dev/null @@ -1,35 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class AccessUri(Model): - """A disk access SAS uri. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar access_sas: A SAS uri for accessing a disk. - :vartype access_sas: str - """ - - _validation = { - 'access_sas': {'readonly': True}, - } - - _attribute_map = { - 'access_sas': {'key': 'properties.output.accessSAS', 'type': 'str'}, - } - - def __init__(self, **kwargs) -> None: - super(AccessUri, self).__init__(**kwargs) - self.access_sas = None diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/additional_unattend_content.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/additional_unattend_content.py deleted file mode 100644 index 2b3534860c21..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/additional_unattend_content.py +++ /dev/null @@ -1,52 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class AdditionalUnattendContent(Model): - """Specifies additional XML formatted information that can be included in the - Unattend.xml file, which is used by Windows Setup. Contents are defined by - setting name, component name, and the pass in which the content is applied. - - :param pass_name: The pass name. Currently, the only allowable value is - OobeSystem. Possible values include: 'OobeSystem' - :type pass_name: str or ~azure.mgmt.compute.v2017_03_30.models.PassNames - :param component_name: The component name. Currently, the only allowable - value is Microsoft-Windows-Shell-Setup. Possible values include: - 'Microsoft-Windows-Shell-Setup' - :type component_name: str or - ~azure.mgmt.compute.v2017_03_30.models.ComponentNames - :param setting_name: Specifies the name of the setting to which the - content applies. Possible values are: FirstLogonCommands and AutoLogon. - Possible values include: 'AutoLogon', 'FirstLogonCommands' - :type setting_name: str or - ~azure.mgmt.compute.v2017_03_30.models.SettingNames - :param content: Specifies the XML formatted content that is added to the - unattend.xml file for the specified path and component. The XML must be - less than 4KB and must include the root element for the setting or feature - that is being inserted. - :type content: str - """ - - _attribute_map = { - 'pass_name': {'key': 'passName', 'type': 'PassNames'}, - 'component_name': {'key': 'componentName', 'type': 'ComponentNames'}, - 'setting_name': {'key': 'settingName', 'type': 'SettingNames'}, - 'content': {'key': 'content', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(AdditionalUnattendContent, self).__init__(**kwargs) - self.pass_name = kwargs.get('pass_name', None) - self.component_name = kwargs.get('component_name', None) - self.setting_name = kwargs.get('setting_name', None) - self.content = kwargs.get('content', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/additional_unattend_content_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/additional_unattend_content_py3.py deleted file mode 100644 index 535b90b099a8..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/additional_unattend_content_py3.py +++ /dev/null @@ -1,52 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class AdditionalUnattendContent(Model): - """Specifies additional XML formatted information that can be included in the - Unattend.xml file, which is used by Windows Setup. Contents are defined by - setting name, component name, and the pass in which the content is applied. - - :param pass_name: The pass name. Currently, the only allowable value is - OobeSystem. Possible values include: 'OobeSystem' - :type pass_name: str or ~azure.mgmt.compute.v2017_03_30.models.PassNames - :param component_name: The component name. Currently, the only allowable - value is Microsoft-Windows-Shell-Setup. Possible values include: - 'Microsoft-Windows-Shell-Setup' - :type component_name: str or - ~azure.mgmt.compute.v2017_03_30.models.ComponentNames - :param setting_name: Specifies the name of the setting to which the - content applies. Possible values are: FirstLogonCommands and AutoLogon. - Possible values include: 'AutoLogon', 'FirstLogonCommands' - :type setting_name: str or - ~azure.mgmt.compute.v2017_03_30.models.SettingNames - :param content: Specifies the XML formatted content that is added to the - unattend.xml file for the specified path and component. The XML must be - less than 4KB and must include the root element for the setting or feature - that is being inserted. - :type content: str - """ - - _attribute_map = { - 'pass_name': {'key': 'passName', 'type': 'PassNames'}, - 'component_name': {'key': 'componentName', 'type': 'ComponentNames'}, - 'setting_name': {'key': 'settingName', 'type': 'SettingNames'}, - 'content': {'key': 'content', 'type': 'str'}, - } - - def __init__(self, *, pass_name=None, component_name=None, setting_name=None, content: str=None, **kwargs) -> None: - super(AdditionalUnattendContent, self).__init__(**kwargs) - self.pass_name = pass_name - self.component_name = component_name - self.setting_name = setting_name - self.content = content diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/api_entity_reference.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/api_entity_reference.py deleted file mode 100644 index d43730af3659..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/api_entity_reference.py +++ /dev/null @@ -1,29 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ApiEntityReference(Model): - """The API entity reference. - - :param id: The ARM resource id in the form of - /subscriptions/{SubscriptionId}/resourceGroups/{ResourceGroupName}/... - :type id: str - """ - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ApiEntityReference, self).__init__(**kwargs) - self.id = kwargs.get('id', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/api_entity_reference_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/api_entity_reference_py3.py deleted file mode 100644 index d42dfb1a5fd0..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/api_entity_reference_py3.py +++ /dev/null @@ -1,29 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ApiEntityReference(Model): - """The API entity reference. - - :param id: The ARM resource id in the form of - /subscriptions/{SubscriptionId}/resourceGroups/{ResourceGroupName}/... - :type id: str - """ - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - } - - def __init__(self, *, id: str=None, **kwargs) -> None: - super(ApiEntityReference, self).__init__(**kwargs) - self.id = id diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/api_error.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/api_error.py deleted file mode 100644 index c20d52eb593f..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/api_error.py +++ /dev/null @@ -1,44 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ApiError(Model): - """Api error. - - :param details: The Api error details - :type details: list[~azure.mgmt.compute.v2017_03_30.models.ApiErrorBase] - :param innererror: The Api inner error - :type innererror: ~azure.mgmt.compute.v2017_03_30.models.InnerError - :param code: The error code. - :type code: str - :param target: The target of the particular error. - :type target: str - :param message: The error message. - :type message: str - """ - - _attribute_map = { - 'details': {'key': 'details', 'type': '[ApiErrorBase]'}, - 'innererror': {'key': 'innererror', 'type': 'InnerError'}, - 'code': {'key': 'code', 'type': 'str'}, - 'target': {'key': 'target', 'type': 'str'}, - 'message': {'key': 'message', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ApiError, self).__init__(**kwargs) - self.details = kwargs.get('details', None) - self.innererror = kwargs.get('innererror', None) - self.code = kwargs.get('code', None) - self.target = kwargs.get('target', None) - self.message = kwargs.get('message', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/api_error_base.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/api_error_base.py deleted file mode 100644 index 655c08638905..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/api_error_base.py +++ /dev/null @@ -1,36 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ApiErrorBase(Model): - """Api error base. - - :param code: The error code. - :type code: str - :param target: The target of the particular error. - :type target: str - :param message: The error message. - :type message: str - """ - - _attribute_map = { - 'code': {'key': 'code', 'type': 'str'}, - 'target': {'key': 'target', 'type': 'str'}, - 'message': {'key': 'message', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ApiErrorBase, self).__init__(**kwargs) - self.code = kwargs.get('code', None) - self.target = kwargs.get('target', None) - self.message = kwargs.get('message', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/api_error_base_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/api_error_base_py3.py deleted file mode 100644 index 5ba95aa0283e..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/api_error_base_py3.py +++ /dev/null @@ -1,36 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ApiErrorBase(Model): - """Api error base. - - :param code: The error code. - :type code: str - :param target: The target of the particular error. - :type target: str - :param message: The error message. - :type message: str - """ - - _attribute_map = { - 'code': {'key': 'code', 'type': 'str'}, - 'target': {'key': 'target', 'type': 'str'}, - 'message': {'key': 'message', 'type': 'str'}, - } - - def __init__(self, *, code: str=None, target: str=None, message: str=None, **kwargs) -> None: - super(ApiErrorBase, self).__init__(**kwargs) - self.code = code - self.target = target - self.message = message diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/api_error_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/api_error_py3.py deleted file mode 100644 index 22fb43607568..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/api_error_py3.py +++ /dev/null @@ -1,44 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ApiError(Model): - """Api error. - - :param details: The Api error details - :type details: list[~azure.mgmt.compute.v2017_03_30.models.ApiErrorBase] - :param innererror: The Api inner error - :type innererror: ~azure.mgmt.compute.v2017_03_30.models.InnerError - :param code: The error code. - :type code: str - :param target: The target of the particular error. - :type target: str - :param message: The error message. - :type message: str - """ - - _attribute_map = { - 'details': {'key': 'details', 'type': '[ApiErrorBase]'}, - 'innererror': {'key': 'innererror', 'type': 'InnerError'}, - 'code': {'key': 'code', 'type': 'str'}, - 'target': {'key': 'target', 'type': 'str'}, - 'message': {'key': 'message', 'type': 'str'}, - } - - def __init__(self, *, details=None, innererror=None, code: str=None, target: str=None, message: str=None, **kwargs) -> None: - super(ApiError, self).__init__(**kwargs) - self.details = details - self.innererror = innererror - self.code = code - self.target = target - self.message = message diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/availability_set.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/availability_set.py deleted file mode 100644 index 0e41bf032ae4..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/availability_set.py +++ /dev/null @@ -1,85 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource import Resource - - -class AvailabilitySet(Resource): - """Specifies information about the availability set that the virtual machine - should be assigned to. Virtual machines specified in the same availability - set are allocated to different nodes to maximize availability. For more - information about availability sets, see [Manage the availability of - virtual - machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-manage-availability?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). -

    For more information on Azure planned maintenance, see [Planned - maintenance for virtual machines in - Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-planned-maintenance?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json) -

    Currently, a VM can only be added to availability set at creation - time. An existing VM cannot be added to an availability set. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource Id - :vartype id: str - :ivar name: Resource name - :vartype name: str - :ivar type: Resource type - :vartype type: str - :param location: Required. Resource location - :type location: str - :param tags: Resource tags - :type tags: dict[str, str] - :param platform_update_domain_count: Update Domain count. - :type platform_update_domain_count: int - :param platform_fault_domain_count: Fault Domain count. - :type platform_fault_domain_count: int - :param virtual_machines: A list of references to all virtual machines in - the availability set. - :type virtual_machines: - list[~azure.mgmt.compute.v2017_03_30.models.SubResource] - :ivar statuses: The resource status information. - :vartype statuses: - list[~azure.mgmt.compute.v2017_03_30.models.InstanceViewStatus] - :param sku: Sku of the availability set - :type sku: ~azure.mgmt.compute.v2017_03_30.models.Sku - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - 'statuses': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'platform_update_domain_count': {'key': 'properties.platformUpdateDomainCount', 'type': 'int'}, - 'platform_fault_domain_count': {'key': 'properties.platformFaultDomainCount', 'type': 'int'}, - 'virtual_machines': {'key': 'properties.virtualMachines', 'type': '[SubResource]'}, - 'statuses': {'key': 'properties.statuses', 'type': '[InstanceViewStatus]'}, - 'sku': {'key': 'sku', 'type': 'Sku'}, - } - - def __init__(self, **kwargs): - super(AvailabilitySet, self).__init__(**kwargs) - self.platform_update_domain_count = kwargs.get('platform_update_domain_count', None) - self.platform_fault_domain_count = kwargs.get('platform_fault_domain_count', None) - self.virtual_machines = kwargs.get('virtual_machines', None) - self.statuses = None - self.sku = kwargs.get('sku', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/availability_set_paged.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/availability_set_paged.py deleted file mode 100644 index 17ade4c0581a..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/availability_set_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class AvailabilitySetPaged(Paged): - """ - A paging container for iterating over a list of :class:`AvailabilitySet ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[AvailabilitySet]'} - } - - def __init__(self, *args, **kwargs): - - super(AvailabilitySetPaged, self).__init__(*args, **kwargs) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/availability_set_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/availability_set_py3.py deleted file mode 100644 index 346d6cec2095..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/availability_set_py3.py +++ /dev/null @@ -1,85 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource_py3 import Resource - - -class AvailabilitySet(Resource): - """Specifies information about the availability set that the virtual machine - should be assigned to. Virtual machines specified in the same availability - set are allocated to different nodes to maximize availability. For more - information about availability sets, see [Manage the availability of - virtual - machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-manage-availability?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). -

    For more information on Azure planned maintenance, see [Planned - maintenance for virtual machines in - Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-planned-maintenance?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json) -

    Currently, a VM can only be added to availability set at creation - time. An existing VM cannot be added to an availability set. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource Id - :vartype id: str - :ivar name: Resource name - :vartype name: str - :ivar type: Resource type - :vartype type: str - :param location: Required. Resource location - :type location: str - :param tags: Resource tags - :type tags: dict[str, str] - :param platform_update_domain_count: Update Domain count. - :type platform_update_domain_count: int - :param platform_fault_domain_count: Fault Domain count. - :type platform_fault_domain_count: int - :param virtual_machines: A list of references to all virtual machines in - the availability set. - :type virtual_machines: - list[~azure.mgmt.compute.v2017_03_30.models.SubResource] - :ivar statuses: The resource status information. - :vartype statuses: - list[~azure.mgmt.compute.v2017_03_30.models.InstanceViewStatus] - :param sku: Sku of the availability set - :type sku: ~azure.mgmt.compute.v2017_03_30.models.Sku - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - 'statuses': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'platform_update_domain_count': {'key': 'properties.platformUpdateDomainCount', 'type': 'int'}, - 'platform_fault_domain_count': {'key': 'properties.platformFaultDomainCount', 'type': 'int'}, - 'virtual_machines': {'key': 'properties.virtualMachines', 'type': '[SubResource]'}, - 'statuses': {'key': 'properties.statuses', 'type': '[InstanceViewStatus]'}, - 'sku': {'key': 'sku', 'type': 'Sku'}, - } - - def __init__(self, *, location: str, tags=None, platform_update_domain_count: int=None, platform_fault_domain_count: int=None, virtual_machines=None, sku=None, **kwargs) -> None: - super(AvailabilitySet, self).__init__(location=location, tags=tags, **kwargs) - self.platform_update_domain_count = platform_update_domain_count - self.platform_fault_domain_count = platform_fault_domain_count - self.virtual_machines = virtual_machines - self.statuses = None - self.sku = sku diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/boot_diagnostics.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/boot_diagnostics.py deleted file mode 100644 index 4a1f77c4d7d0..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/boot_diagnostics.py +++ /dev/null @@ -1,37 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class BootDiagnostics(Model): - """Boot Diagnostics is a debugging feature which allows you to view Console - Output and Screenshot to diagnose VM status.

    You can easily view - the output of your console log.

    Azure also enables you to see a - screenshot of the VM from the hypervisor. - - :param enabled: Whether boot diagnostics should be enabled on the Virtual - Machine. - :type enabled: bool - :param storage_uri: Uri of the storage account to use for placing the - console output and screenshot. - :type storage_uri: str - """ - - _attribute_map = { - 'enabled': {'key': 'enabled', 'type': 'bool'}, - 'storage_uri': {'key': 'storageUri', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(BootDiagnostics, self).__init__(**kwargs) - self.enabled = kwargs.get('enabled', None) - self.storage_uri = kwargs.get('storage_uri', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/boot_diagnostics_instance_view.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/boot_diagnostics_instance_view.py deleted file mode 100644 index 05ca725929f6..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/boot_diagnostics_instance_view.py +++ /dev/null @@ -1,40 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class BootDiagnosticsInstanceView(Model): - """The instance view of a virtual machine boot diagnostics. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar console_screenshot_blob_uri: The console screenshot blob URI. - :vartype console_screenshot_blob_uri: str - :ivar serial_console_log_blob_uri: The Linux serial console log blob Uri. - :vartype serial_console_log_blob_uri: str - """ - - _validation = { - 'console_screenshot_blob_uri': {'readonly': True}, - 'serial_console_log_blob_uri': {'readonly': True}, - } - - _attribute_map = { - 'console_screenshot_blob_uri': {'key': 'consoleScreenshotBlobUri', 'type': 'str'}, - 'serial_console_log_blob_uri': {'key': 'serialConsoleLogBlobUri', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(BootDiagnosticsInstanceView, self).__init__(**kwargs) - self.console_screenshot_blob_uri = None - self.serial_console_log_blob_uri = None diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/boot_diagnostics_instance_view_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/boot_diagnostics_instance_view_py3.py deleted file mode 100644 index 97e4cdba67c4..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/boot_diagnostics_instance_view_py3.py +++ /dev/null @@ -1,40 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class BootDiagnosticsInstanceView(Model): - """The instance view of a virtual machine boot diagnostics. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar console_screenshot_blob_uri: The console screenshot blob URI. - :vartype console_screenshot_blob_uri: str - :ivar serial_console_log_blob_uri: The Linux serial console log blob Uri. - :vartype serial_console_log_blob_uri: str - """ - - _validation = { - 'console_screenshot_blob_uri': {'readonly': True}, - 'serial_console_log_blob_uri': {'readonly': True}, - } - - _attribute_map = { - 'console_screenshot_blob_uri': {'key': 'consoleScreenshotBlobUri', 'type': 'str'}, - 'serial_console_log_blob_uri': {'key': 'serialConsoleLogBlobUri', 'type': 'str'}, - } - - def __init__(self, **kwargs) -> None: - super(BootDiagnosticsInstanceView, self).__init__(**kwargs) - self.console_screenshot_blob_uri = None - self.serial_console_log_blob_uri = None diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/boot_diagnostics_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/boot_diagnostics_py3.py deleted file mode 100644 index b64ae5b4adde..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/boot_diagnostics_py3.py +++ /dev/null @@ -1,37 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class BootDiagnostics(Model): - """Boot Diagnostics is a debugging feature which allows you to view Console - Output and Screenshot to diagnose VM status.

    You can easily view - the output of your console log.

    Azure also enables you to see a - screenshot of the VM from the hypervisor. - - :param enabled: Whether boot diagnostics should be enabled on the Virtual - Machine. - :type enabled: bool - :param storage_uri: Uri of the storage account to use for placing the - console output and screenshot. - :type storage_uri: str - """ - - _attribute_map = { - 'enabled': {'key': 'enabled', 'type': 'bool'}, - 'storage_uri': {'key': 'storageUri', 'type': 'str'}, - } - - def __init__(self, *, enabled: bool=None, storage_uri: str=None, **kwargs) -> None: - super(BootDiagnostics, self).__init__(**kwargs) - self.enabled = enabled - self.storage_uri = storage_uri diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/compute_long_running_operation_properties.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/compute_long_running_operation_properties.py deleted file mode 100644 index 66ff353eb206..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/compute_long_running_operation_properties.py +++ /dev/null @@ -1,28 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ComputeLongRunningOperationProperties(Model): - """Compute-specific operation properties, including output. - - :param output: Operation output data (raw JSON) - :type output: object - """ - - _attribute_map = { - 'output': {'key': 'output', 'type': 'object'}, - } - - def __init__(self, **kwargs): - super(ComputeLongRunningOperationProperties, self).__init__(**kwargs) - self.output = kwargs.get('output', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/compute_long_running_operation_properties_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/compute_long_running_operation_properties_py3.py deleted file mode 100644 index a4ffd6c8c32f..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/compute_long_running_operation_properties_py3.py +++ /dev/null @@ -1,28 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ComputeLongRunningOperationProperties(Model): - """Compute-specific operation properties, including output. - - :param output: Operation output data (raw JSON) - :type output: object - """ - - _attribute_map = { - 'output': {'key': 'output', 'type': 'object'}, - } - - def __init__(self, *, output=None, **kwargs) -> None: - super(ComputeLongRunningOperationProperties, self).__init__(**kwargs) - self.output = output diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/creation_data.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/creation_data.py deleted file mode 100644 index 6a9ecbbaa1fe..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/creation_data.py +++ /dev/null @@ -1,58 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class CreationData(Model): - """Data used when creating a disk. - - All required parameters must be populated in order to send to Azure. - - :param create_option: Required. This enumerates the possible sources of a - disk's creation. Possible values include: 'Empty', 'Attach', 'FromImage', - 'Import', 'Copy' - :type create_option: str or - ~azure.mgmt.compute.v2017_03_30.models.DiskCreateOption - :param storage_account_id: If createOption is Import, the Azure Resource - Manager identifier of the storage account containing the blob to import as - a disk. Required only if the blob is in a different subscription - :type storage_account_id: str - :param image_reference: Disk source information. - :type image_reference: - ~azure.mgmt.compute.v2017_03_30.models.ImageDiskReference - :param source_uri: If createOption is Import, this is the URI of a blob to - be imported into a managed disk. - :type source_uri: str - :param source_resource_id: If createOption is Copy, this is the ARM id of - the source snapshot or disk. - :type source_resource_id: str - """ - - _validation = { - 'create_option': {'required': True}, - } - - _attribute_map = { - 'create_option': {'key': 'createOption', 'type': 'DiskCreateOption'}, - 'storage_account_id': {'key': 'storageAccountId', 'type': 'str'}, - 'image_reference': {'key': 'imageReference', 'type': 'ImageDiskReference'}, - 'source_uri': {'key': 'sourceUri', 'type': 'str'}, - 'source_resource_id': {'key': 'sourceResourceId', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(CreationData, self).__init__(**kwargs) - self.create_option = kwargs.get('create_option', None) - self.storage_account_id = kwargs.get('storage_account_id', None) - self.image_reference = kwargs.get('image_reference', None) - self.source_uri = kwargs.get('source_uri', None) - self.source_resource_id = kwargs.get('source_resource_id', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/creation_data_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/creation_data_py3.py deleted file mode 100644 index f548e7d19e89..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/creation_data_py3.py +++ /dev/null @@ -1,58 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class CreationData(Model): - """Data used when creating a disk. - - All required parameters must be populated in order to send to Azure. - - :param create_option: Required. This enumerates the possible sources of a - disk's creation. Possible values include: 'Empty', 'Attach', 'FromImage', - 'Import', 'Copy' - :type create_option: str or - ~azure.mgmt.compute.v2017_03_30.models.DiskCreateOption - :param storage_account_id: If createOption is Import, the Azure Resource - Manager identifier of the storage account containing the blob to import as - a disk. Required only if the blob is in a different subscription - :type storage_account_id: str - :param image_reference: Disk source information. - :type image_reference: - ~azure.mgmt.compute.v2017_03_30.models.ImageDiskReference - :param source_uri: If createOption is Import, this is the URI of a blob to - be imported into a managed disk. - :type source_uri: str - :param source_resource_id: If createOption is Copy, this is the ARM id of - the source snapshot or disk. - :type source_resource_id: str - """ - - _validation = { - 'create_option': {'required': True}, - } - - _attribute_map = { - 'create_option': {'key': 'createOption', 'type': 'DiskCreateOption'}, - 'storage_account_id': {'key': 'storageAccountId', 'type': 'str'}, - 'image_reference': {'key': 'imageReference', 'type': 'ImageDiskReference'}, - 'source_uri': {'key': 'sourceUri', 'type': 'str'}, - 'source_resource_id': {'key': 'sourceResourceId', 'type': 'str'}, - } - - def __init__(self, *, create_option, storage_account_id: str=None, image_reference=None, source_uri: str=None, source_resource_id: str=None, **kwargs) -> None: - super(CreationData, self).__init__(**kwargs) - self.create_option = create_option - self.storage_account_id = storage_account_id - self.image_reference = image_reference - self.source_uri = source_uri - self.source_resource_id = source_resource_id diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/data_disk.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/data_disk.py deleted file mode 100644 index 32a36df43517..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/data_disk.py +++ /dev/null @@ -1,82 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class DataDisk(Model): - """Describes a data disk. - - All required parameters must be populated in order to send to Azure. - - :param lun: Required. Specifies the logical unit number of the data disk. - This value is used to identify data disks within the VM and therefore must - be unique for each data disk attached to a VM. - :type lun: int - :param name: The disk name. - :type name: str - :param vhd: The virtual hard disk. - :type vhd: ~azure.mgmt.compute.v2017_03_30.models.VirtualHardDisk - :param image: The source user image virtual hard disk. The virtual hard - disk will be copied before being attached to the virtual machine. If - SourceImage is provided, the destination virtual hard drive must not - exist. - :type image: ~azure.mgmt.compute.v2017_03_30.models.VirtualHardDisk - :param caching: Specifies the caching requirements.

    Possible - values are:

    **None**

    **ReadOnly**

    **ReadWrite** -

    Default: **None for Standard storage. ReadOnly for Premium - storage**. Possible values include: 'None', 'ReadOnly', 'ReadWrite' - :type caching: str or ~azure.mgmt.compute.v2017_03_30.models.CachingTypes - :param create_option: Required. Specifies how the virtual machine should - be created.

    Possible values are:

    **Attach** \\u2013 This - value is used when you are using a specialized disk to create the virtual - machine.

    **FromImage** \\u2013 This value is used when you are - using an image to create the virtual machine. If you are using a platform - image, you also use the imageReference element described above. If you are - using a marketplace image, you also use the plan element previously - described. Possible values include: 'FromImage', 'Empty', 'Attach' - :type create_option: str or - ~azure.mgmt.compute.v2017_03_30.models.DiskCreateOptionTypes - :param disk_size_gb: Specifies the size of an empty data disk in - gigabytes. This element can be used to overwrite the size of the disk in a - virtual machine image.

    This value cannot be larger than 1023 GB - :type disk_size_gb: int - :param managed_disk: The managed disk parameters. - :type managed_disk: - ~azure.mgmt.compute.v2017_03_30.models.ManagedDiskParameters - """ - - _validation = { - 'lun': {'required': True}, - 'create_option': {'required': True}, - } - - _attribute_map = { - 'lun': {'key': 'lun', 'type': 'int'}, - 'name': {'key': 'name', 'type': 'str'}, - 'vhd': {'key': 'vhd', 'type': 'VirtualHardDisk'}, - 'image': {'key': 'image', 'type': 'VirtualHardDisk'}, - 'caching': {'key': 'caching', 'type': 'CachingTypes'}, - 'create_option': {'key': 'createOption', 'type': 'DiskCreateOptionTypes'}, - 'disk_size_gb': {'key': 'diskSizeGB', 'type': 'int'}, - 'managed_disk': {'key': 'managedDisk', 'type': 'ManagedDiskParameters'}, - } - - def __init__(self, **kwargs): - super(DataDisk, self).__init__(**kwargs) - self.lun = kwargs.get('lun', None) - self.name = kwargs.get('name', None) - self.vhd = kwargs.get('vhd', None) - self.image = kwargs.get('image', None) - self.caching = kwargs.get('caching', None) - self.create_option = kwargs.get('create_option', None) - self.disk_size_gb = kwargs.get('disk_size_gb', None) - self.managed_disk = kwargs.get('managed_disk', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/data_disk_image.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/data_disk_image.py deleted file mode 100644 index b5dbfcefb472..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/data_disk_image.py +++ /dev/null @@ -1,37 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class DataDiskImage(Model): - """Contains the data disk images information. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar lun: Specifies the logical unit number of the data disk. This value - is used to identify data disks within the VM and therefore must be unique - for each data disk attached to a VM. - :vartype lun: int - """ - - _validation = { - 'lun': {'readonly': True}, - } - - _attribute_map = { - 'lun': {'key': 'lun', 'type': 'int'}, - } - - def __init__(self, **kwargs): - super(DataDiskImage, self).__init__(**kwargs) - self.lun = None diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/data_disk_image_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/data_disk_image_py3.py deleted file mode 100644 index 8431a3988502..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/data_disk_image_py3.py +++ /dev/null @@ -1,37 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class DataDiskImage(Model): - """Contains the data disk images information. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar lun: Specifies the logical unit number of the data disk. This value - is used to identify data disks within the VM and therefore must be unique - for each data disk attached to a VM. - :vartype lun: int - """ - - _validation = { - 'lun': {'readonly': True}, - } - - _attribute_map = { - 'lun': {'key': 'lun', 'type': 'int'}, - } - - def __init__(self, **kwargs) -> None: - super(DataDiskImage, self).__init__(**kwargs) - self.lun = None diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/data_disk_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/data_disk_py3.py deleted file mode 100644 index 64f014af5da9..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/data_disk_py3.py +++ /dev/null @@ -1,82 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class DataDisk(Model): - """Describes a data disk. - - All required parameters must be populated in order to send to Azure. - - :param lun: Required. Specifies the logical unit number of the data disk. - This value is used to identify data disks within the VM and therefore must - be unique for each data disk attached to a VM. - :type lun: int - :param name: The disk name. - :type name: str - :param vhd: The virtual hard disk. - :type vhd: ~azure.mgmt.compute.v2017_03_30.models.VirtualHardDisk - :param image: The source user image virtual hard disk. The virtual hard - disk will be copied before being attached to the virtual machine. If - SourceImage is provided, the destination virtual hard drive must not - exist. - :type image: ~azure.mgmt.compute.v2017_03_30.models.VirtualHardDisk - :param caching: Specifies the caching requirements.

    Possible - values are:

    **None**

    **ReadOnly**

    **ReadWrite** -

    Default: **None for Standard storage. ReadOnly for Premium - storage**. Possible values include: 'None', 'ReadOnly', 'ReadWrite' - :type caching: str or ~azure.mgmt.compute.v2017_03_30.models.CachingTypes - :param create_option: Required. Specifies how the virtual machine should - be created.

    Possible values are:

    **Attach** \\u2013 This - value is used when you are using a specialized disk to create the virtual - machine.

    **FromImage** \\u2013 This value is used when you are - using an image to create the virtual machine. If you are using a platform - image, you also use the imageReference element described above. If you are - using a marketplace image, you also use the plan element previously - described. Possible values include: 'FromImage', 'Empty', 'Attach' - :type create_option: str or - ~azure.mgmt.compute.v2017_03_30.models.DiskCreateOptionTypes - :param disk_size_gb: Specifies the size of an empty data disk in - gigabytes. This element can be used to overwrite the size of the disk in a - virtual machine image.

    This value cannot be larger than 1023 GB - :type disk_size_gb: int - :param managed_disk: The managed disk parameters. - :type managed_disk: - ~azure.mgmt.compute.v2017_03_30.models.ManagedDiskParameters - """ - - _validation = { - 'lun': {'required': True}, - 'create_option': {'required': True}, - } - - _attribute_map = { - 'lun': {'key': 'lun', 'type': 'int'}, - 'name': {'key': 'name', 'type': 'str'}, - 'vhd': {'key': 'vhd', 'type': 'VirtualHardDisk'}, - 'image': {'key': 'image', 'type': 'VirtualHardDisk'}, - 'caching': {'key': 'caching', 'type': 'CachingTypes'}, - 'create_option': {'key': 'createOption', 'type': 'DiskCreateOptionTypes'}, - 'disk_size_gb': {'key': 'diskSizeGB', 'type': 'int'}, - 'managed_disk': {'key': 'managedDisk', 'type': 'ManagedDiskParameters'}, - } - - def __init__(self, *, lun: int, create_option, name: str=None, vhd=None, image=None, caching=None, disk_size_gb: int=None, managed_disk=None, **kwargs) -> None: - super(DataDisk, self).__init__(**kwargs) - self.lun = lun - self.name = name - self.vhd = vhd - self.image = image - self.caching = caching - self.create_option = create_option - self.disk_size_gb = disk_size_gb - self.managed_disk = managed_disk diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/diagnostics_profile.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/diagnostics_profile.py deleted file mode 100644 index c4b515bfd411..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/diagnostics_profile.py +++ /dev/null @@ -1,33 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class DiagnosticsProfile(Model): - """Specifies the boot diagnostic settings state.

    Minimum api-version: - 2015-06-15. - - :param boot_diagnostics: Boot Diagnostics is a debugging feature which - allows you to view Console Output and Screenshot to diagnose VM status. -

    You can easily view the output of your console log.

    - Azure also enables you to see a screenshot of the VM from the hypervisor. - :type boot_diagnostics: - ~azure.mgmt.compute.v2017_03_30.models.BootDiagnostics - """ - - _attribute_map = { - 'boot_diagnostics': {'key': 'bootDiagnostics', 'type': 'BootDiagnostics'}, - } - - def __init__(self, **kwargs): - super(DiagnosticsProfile, self).__init__(**kwargs) - self.boot_diagnostics = kwargs.get('boot_diagnostics', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/diagnostics_profile_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/diagnostics_profile_py3.py deleted file mode 100644 index a3c64f8fd196..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/diagnostics_profile_py3.py +++ /dev/null @@ -1,33 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class DiagnosticsProfile(Model): - """Specifies the boot diagnostic settings state.

    Minimum api-version: - 2015-06-15. - - :param boot_diagnostics: Boot Diagnostics is a debugging feature which - allows you to view Console Output and Screenshot to diagnose VM status. -

    You can easily view the output of your console log.

    - Azure also enables you to see a screenshot of the VM from the hypervisor. - :type boot_diagnostics: - ~azure.mgmt.compute.v2017_03_30.models.BootDiagnostics - """ - - _attribute_map = { - 'boot_diagnostics': {'key': 'bootDiagnostics', 'type': 'BootDiagnostics'}, - } - - def __init__(self, *, boot_diagnostics=None, **kwargs) -> None: - super(DiagnosticsProfile, self).__init__(**kwargs) - self.boot_diagnostics = boot_diagnostics diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/disk.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/disk.py deleted file mode 100644 index 555d543482ea..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/disk.py +++ /dev/null @@ -1,100 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource import Resource - - -class Disk(Resource): - """Disk resource. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource Id - :vartype id: str - :ivar name: Resource name - :vartype name: str - :ivar type: Resource type - :vartype type: str - :param location: Required. Resource location - :type location: str - :param tags: Resource tags - :type tags: dict[str, str] - :ivar managed_by: A relative URI containing the ID of the VM that has the - disk attached. - :vartype managed_by: str - :param sku: - :type sku: ~azure.mgmt.compute.v2017_03_30.models.DiskSku - :param zones: The Logical zone list for Disk. - :type zones: list[str] - :ivar time_created: The time when the disk was created. - :vartype time_created: datetime - :param os_type: The Operating System type. Possible values include: - 'Windows', 'Linux' - :type os_type: str or - ~azure.mgmt.compute.v2017_03_30.models.OperatingSystemTypes - :param creation_data: Required. Disk source information. CreationData - information cannot be changed after the disk has been created. - :type creation_data: ~azure.mgmt.compute.v2017_03_30.models.CreationData - :param disk_size_gb: If creationData.createOption is Empty, this field is - mandatory and it indicates the size of the VHD to create. If this field is - present for updates or creation with other options, it indicates a resize. - Resizes are only allowed if the disk is not attached to a running VM, and - can only increase the disk's size. - :type disk_size_gb: int - :param encryption_settings: Encryption settings for disk or snapshot - :type encryption_settings: - ~azure.mgmt.compute.v2017_03_30.models.EncryptionSettings - :ivar provisioning_state: The disk provisioning state. - :vartype provisioning_state: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - 'managed_by': {'readonly': True}, - 'time_created': {'readonly': True}, - 'creation_data': {'required': True}, - 'provisioning_state': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'managed_by': {'key': 'managedBy', 'type': 'str'}, - 'sku': {'key': 'sku', 'type': 'DiskSku'}, - 'zones': {'key': 'zones', 'type': '[str]'}, - 'time_created': {'key': 'properties.timeCreated', 'type': 'iso-8601'}, - 'os_type': {'key': 'properties.osType', 'type': 'OperatingSystemTypes'}, - 'creation_data': {'key': 'properties.creationData', 'type': 'CreationData'}, - 'disk_size_gb': {'key': 'properties.diskSizeGB', 'type': 'int'}, - 'encryption_settings': {'key': 'properties.encryptionSettings', 'type': 'EncryptionSettings'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(Disk, self).__init__(**kwargs) - self.managed_by = None - self.sku = kwargs.get('sku', None) - self.zones = kwargs.get('zones', None) - self.time_created = None - self.os_type = kwargs.get('os_type', None) - self.creation_data = kwargs.get('creation_data', None) - self.disk_size_gb = kwargs.get('disk_size_gb', None) - self.encryption_settings = kwargs.get('encryption_settings', None) - self.provisioning_state = None diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/disk_encryption_settings.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/disk_encryption_settings.py deleted file mode 100644 index 7f98ef395200..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/disk_encryption_settings.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class DiskEncryptionSettings(Model): - """Describes a Encryption Settings for a Disk. - - :param disk_encryption_key: Specifies the location of the disk encryption - key, which is a Key Vault Secret. - :type disk_encryption_key: - ~azure.mgmt.compute.v2017_03_30.models.KeyVaultSecretReference - :param key_encryption_key: Specifies the location of the key encryption - key in Key Vault. - :type key_encryption_key: - ~azure.mgmt.compute.v2017_03_30.models.KeyVaultKeyReference - :param enabled: Specifies whether disk encryption should be enabled on the - virtual machine. - :type enabled: bool - """ - - _attribute_map = { - 'disk_encryption_key': {'key': 'diskEncryptionKey', 'type': 'KeyVaultSecretReference'}, - 'key_encryption_key': {'key': 'keyEncryptionKey', 'type': 'KeyVaultKeyReference'}, - 'enabled': {'key': 'enabled', 'type': 'bool'}, - } - - def __init__(self, **kwargs): - super(DiskEncryptionSettings, self).__init__(**kwargs) - self.disk_encryption_key = kwargs.get('disk_encryption_key', None) - self.key_encryption_key = kwargs.get('key_encryption_key', None) - self.enabled = kwargs.get('enabled', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/disk_encryption_settings_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/disk_encryption_settings_py3.py deleted file mode 100644 index 8108da077a2a..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/disk_encryption_settings_py3.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class DiskEncryptionSettings(Model): - """Describes a Encryption Settings for a Disk. - - :param disk_encryption_key: Specifies the location of the disk encryption - key, which is a Key Vault Secret. - :type disk_encryption_key: - ~azure.mgmt.compute.v2017_03_30.models.KeyVaultSecretReference - :param key_encryption_key: Specifies the location of the key encryption - key in Key Vault. - :type key_encryption_key: - ~azure.mgmt.compute.v2017_03_30.models.KeyVaultKeyReference - :param enabled: Specifies whether disk encryption should be enabled on the - virtual machine. - :type enabled: bool - """ - - _attribute_map = { - 'disk_encryption_key': {'key': 'diskEncryptionKey', 'type': 'KeyVaultSecretReference'}, - 'key_encryption_key': {'key': 'keyEncryptionKey', 'type': 'KeyVaultKeyReference'}, - 'enabled': {'key': 'enabled', 'type': 'bool'}, - } - - def __init__(self, *, disk_encryption_key=None, key_encryption_key=None, enabled: bool=None, **kwargs) -> None: - super(DiskEncryptionSettings, self).__init__(**kwargs) - self.disk_encryption_key = disk_encryption_key - self.key_encryption_key = key_encryption_key - self.enabled = enabled diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/disk_instance_view.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/disk_instance_view.py deleted file mode 100644 index e250408baa20..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/disk_instance_view.py +++ /dev/null @@ -1,39 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class DiskInstanceView(Model): - """The instance view of the disk. - - :param name: The disk name. - :type name: str - :param encryption_settings: Specifies the encryption settings for the OS - Disk.

    Minimum api-version: 2015-06-15 - :type encryption_settings: - list[~azure.mgmt.compute.v2017_03_30.models.DiskEncryptionSettings] - :param statuses: The resource status information. - :type statuses: - list[~azure.mgmt.compute.v2017_03_30.models.InstanceViewStatus] - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'encryption_settings': {'key': 'encryptionSettings', 'type': '[DiskEncryptionSettings]'}, - 'statuses': {'key': 'statuses', 'type': '[InstanceViewStatus]'}, - } - - def __init__(self, **kwargs): - super(DiskInstanceView, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.encryption_settings = kwargs.get('encryption_settings', None) - self.statuses = kwargs.get('statuses', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/disk_instance_view_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/disk_instance_view_py3.py deleted file mode 100644 index f8d374a055f3..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/disk_instance_view_py3.py +++ /dev/null @@ -1,39 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class DiskInstanceView(Model): - """The instance view of the disk. - - :param name: The disk name. - :type name: str - :param encryption_settings: Specifies the encryption settings for the OS - Disk.

    Minimum api-version: 2015-06-15 - :type encryption_settings: - list[~azure.mgmt.compute.v2017_03_30.models.DiskEncryptionSettings] - :param statuses: The resource status information. - :type statuses: - list[~azure.mgmt.compute.v2017_03_30.models.InstanceViewStatus] - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'encryption_settings': {'key': 'encryptionSettings', 'type': '[DiskEncryptionSettings]'}, - 'statuses': {'key': 'statuses', 'type': '[InstanceViewStatus]'}, - } - - def __init__(self, *, name: str=None, encryption_settings=None, statuses=None, **kwargs) -> None: - super(DiskInstanceView, self).__init__(**kwargs) - self.name = name - self.encryption_settings = encryption_settings - self.statuses = statuses diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/disk_paged.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/disk_paged.py deleted file mode 100644 index a6b59098d9bb..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/disk_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class DiskPaged(Paged): - """ - A paging container for iterating over a list of :class:`Disk ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[Disk]'} - } - - def __init__(self, *args, **kwargs): - - super(DiskPaged, self).__init__(*args, **kwargs) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/disk_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/disk_py3.py deleted file mode 100644 index 8f76ec8c2165..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/disk_py3.py +++ /dev/null @@ -1,100 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource_py3 import Resource - - -class Disk(Resource): - """Disk resource. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource Id - :vartype id: str - :ivar name: Resource name - :vartype name: str - :ivar type: Resource type - :vartype type: str - :param location: Required. Resource location - :type location: str - :param tags: Resource tags - :type tags: dict[str, str] - :ivar managed_by: A relative URI containing the ID of the VM that has the - disk attached. - :vartype managed_by: str - :param sku: - :type sku: ~azure.mgmt.compute.v2017_03_30.models.DiskSku - :param zones: The Logical zone list for Disk. - :type zones: list[str] - :ivar time_created: The time when the disk was created. - :vartype time_created: datetime - :param os_type: The Operating System type. Possible values include: - 'Windows', 'Linux' - :type os_type: str or - ~azure.mgmt.compute.v2017_03_30.models.OperatingSystemTypes - :param creation_data: Required. Disk source information. CreationData - information cannot be changed after the disk has been created. - :type creation_data: ~azure.mgmt.compute.v2017_03_30.models.CreationData - :param disk_size_gb: If creationData.createOption is Empty, this field is - mandatory and it indicates the size of the VHD to create. If this field is - present for updates or creation with other options, it indicates a resize. - Resizes are only allowed if the disk is not attached to a running VM, and - can only increase the disk's size. - :type disk_size_gb: int - :param encryption_settings: Encryption settings for disk or snapshot - :type encryption_settings: - ~azure.mgmt.compute.v2017_03_30.models.EncryptionSettings - :ivar provisioning_state: The disk provisioning state. - :vartype provisioning_state: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - 'managed_by': {'readonly': True}, - 'time_created': {'readonly': True}, - 'creation_data': {'required': True}, - 'provisioning_state': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'managed_by': {'key': 'managedBy', 'type': 'str'}, - 'sku': {'key': 'sku', 'type': 'DiskSku'}, - 'zones': {'key': 'zones', 'type': '[str]'}, - 'time_created': {'key': 'properties.timeCreated', 'type': 'iso-8601'}, - 'os_type': {'key': 'properties.osType', 'type': 'OperatingSystemTypes'}, - 'creation_data': {'key': 'properties.creationData', 'type': 'CreationData'}, - 'disk_size_gb': {'key': 'properties.diskSizeGB', 'type': 'int'}, - 'encryption_settings': {'key': 'properties.encryptionSettings', 'type': 'EncryptionSettings'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - } - - def __init__(self, *, location: str, creation_data, tags=None, sku=None, zones=None, os_type=None, disk_size_gb: int=None, encryption_settings=None, **kwargs) -> None: - super(Disk, self).__init__(location=location, tags=tags, **kwargs) - self.managed_by = None - self.sku = sku - self.zones = zones - self.time_created = None - self.os_type = os_type - self.creation_data = creation_data - self.disk_size_gb = disk_size_gb - self.encryption_settings = encryption_settings - self.provisioning_state = None diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/disk_sku.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/disk_sku.py deleted file mode 100644 index 64f47a7b75e3..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/disk_sku.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class DiskSku(Model): - """The disks and snapshots sku name. Can be Standard_LRS or Premium_LRS. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :param name: The sku name. Possible values include: 'Standard_LRS', - 'Premium_LRS' - :type name: str or - ~azure.mgmt.compute.v2017_03_30.models.StorageAccountTypes - :ivar tier: The sku tier. Default value: "Standard" . - :vartype tier: str - """ - - _validation = { - 'tier': {'readonly': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'StorageAccountTypes'}, - 'tier': {'key': 'tier', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(DiskSku, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.tier = None diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/disk_sku_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/disk_sku_py3.py deleted file mode 100644 index dae5211ac38c..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/disk_sku_py3.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class DiskSku(Model): - """The disks and snapshots sku name. Can be Standard_LRS or Premium_LRS. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :param name: The sku name. Possible values include: 'Standard_LRS', - 'Premium_LRS' - :type name: str or - ~azure.mgmt.compute.v2017_03_30.models.StorageAccountTypes - :ivar tier: The sku tier. Default value: "Standard" . - :vartype tier: str - """ - - _validation = { - 'tier': {'readonly': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'StorageAccountTypes'}, - 'tier': {'key': 'tier', 'type': 'str'}, - } - - def __init__(self, *, name=None, **kwargs) -> None: - super(DiskSku, self).__init__(**kwargs) - self.name = name - self.tier = None diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/disk_update.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/disk_update.py deleted file mode 100644 index 1c62861a71cf..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/disk_update.py +++ /dev/null @@ -1,49 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource_update import ResourceUpdate - - -class DiskUpdate(ResourceUpdate): - """Disk update resource. - - :param tags: Resource tags - :type tags: dict[str, str] - :param sku: - :type sku: ~azure.mgmt.compute.v2017_03_30.models.DiskSku - :param os_type: the Operating System type. Possible values include: - 'Windows', 'Linux' - :type os_type: str or - ~azure.mgmt.compute.v2017_03_30.models.OperatingSystemTypes - :param disk_size_gb: If creationData.createOption is Empty, this field is - mandatory and it indicates the size of the VHD to create. If this field is - present for updates or creation with other options, it indicates a resize. - Resizes are only allowed if the disk is not attached to a running VM, and - can only increase the disk's size. - :type disk_size_gb: int - :param encryption_settings: Encryption settings for disk or snapshot - :type encryption_settings: - ~azure.mgmt.compute.v2017_03_30.models.EncryptionSettings - """ - - _attribute_map = { - 'tags': {'key': 'tags', 'type': '{str}'}, - 'sku': {'key': 'sku', 'type': 'DiskSku'}, - 'os_type': {'key': 'properties.osType', 'type': 'OperatingSystemTypes'}, - 'disk_size_gb': {'key': 'properties.diskSizeGB', 'type': 'int'}, - 'encryption_settings': {'key': 'properties.encryptionSettings', 'type': 'EncryptionSettings'}, - } - - def __init__(self, **kwargs): - super(DiskUpdate, self).__init__(**kwargs) - self.os_type = kwargs.get('os_type', None) - self.disk_size_gb = kwargs.get('disk_size_gb', None) - self.encryption_settings = kwargs.get('encryption_settings', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/disk_update_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/disk_update_py3.py deleted file mode 100644 index fc4d7781ba58..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/disk_update_py3.py +++ /dev/null @@ -1,49 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource_update_py3 import ResourceUpdate - - -class DiskUpdate(ResourceUpdate): - """Disk update resource. - - :param tags: Resource tags - :type tags: dict[str, str] - :param sku: - :type sku: ~azure.mgmt.compute.v2017_03_30.models.DiskSku - :param os_type: the Operating System type. Possible values include: - 'Windows', 'Linux' - :type os_type: str or - ~azure.mgmt.compute.v2017_03_30.models.OperatingSystemTypes - :param disk_size_gb: If creationData.createOption is Empty, this field is - mandatory and it indicates the size of the VHD to create. If this field is - present for updates or creation with other options, it indicates a resize. - Resizes are only allowed if the disk is not attached to a running VM, and - can only increase the disk's size. - :type disk_size_gb: int - :param encryption_settings: Encryption settings for disk or snapshot - :type encryption_settings: - ~azure.mgmt.compute.v2017_03_30.models.EncryptionSettings - """ - - _attribute_map = { - 'tags': {'key': 'tags', 'type': '{str}'}, - 'sku': {'key': 'sku', 'type': 'DiskSku'}, - 'os_type': {'key': 'properties.osType', 'type': 'OperatingSystemTypes'}, - 'disk_size_gb': {'key': 'properties.diskSizeGB', 'type': 'int'}, - 'encryption_settings': {'key': 'properties.encryptionSettings', 'type': 'EncryptionSettings'}, - } - - def __init__(self, *, tags=None, sku=None, os_type=None, disk_size_gb: int=None, encryption_settings=None, **kwargs) -> None: - super(DiskUpdate, self).__init__(tags=tags, sku=sku, **kwargs) - self.os_type = os_type - self.disk_size_gb = disk_size_gb - self.encryption_settings = encryption_settings diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/encryption_settings.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/encryption_settings.py deleted file mode 100644 index a0ac101e9c77..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/encryption_settings.py +++ /dev/null @@ -1,44 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class EncryptionSettings(Model): - """Encryption settings for disk or snapshot. - - :param enabled: Set this flag to true and provide DiskEncryptionKey and - optional KeyEncryptionKey to enable encryption. Set this flag to false and - remove DiskEncryptionKey and KeyEncryptionKey to disable encryption. If - EncryptionSettings is null in the request object, the existing settings - remain unchanged. - :type enabled: bool - :param disk_encryption_key: Key Vault Secret Url and vault id of the disk - encryption key - :type disk_encryption_key: - ~azure.mgmt.compute.v2017_03_30.models.KeyVaultAndSecretReference - :param key_encryption_key: Key Vault Key Url and vault id of the key - encryption key - :type key_encryption_key: - ~azure.mgmt.compute.v2017_03_30.models.KeyVaultAndKeyReference - """ - - _attribute_map = { - 'enabled': {'key': 'enabled', 'type': 'bool'}, - 'disk_encryption_key': {'key': 'diskEncryptionKey', 'type': 'KeyVaultAndSecretReference'}, - 'key_encryption_key': {'key': 'keyEncryptionKey', 'type': 'KeyVaultAndKeyReference'}, - } - - def __init__(self, **kwargs): - super(EncryptionSettings, self).__init__(**kwargs) - self.enabled = kwargs.get('enabled', None) - self.disk_encryption_key = kwargs.get('disk_encryption_key', None) - self.key_encryption_key = kwargs.get('key_encryption_key', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/encryption_settings_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/encryption_settings_py3.py deleted file mode 100644 index 6e0af2329bb4..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/encryption_settings_py3.py +++ /dev/null @@ -1,44 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class EncryptionSettings(Model): - """Encryption settings for disk or snapshot. - - :param enabled: Set this flag to true and provide DiskEncryptionKey and - optional KeyEncryptionKey to enable encryption. Set this flag to false and - remove DiskEncryptionKey and KeyEncryptionKey to disable encryption. If - EncryptionSettings is null in the request object, the existing settings - remain unchanged. - :type enabled: bool - :param disk_encryption_key: Key Vault Secret Url and vault id of the disk - encryption key - :type disk_encryption_key: - ~azure.mgmt.compute.v2017_03_30.models.KeyVaultAndSecretReference - :param key_encryption_key: Key Vault Key Url and vault id of the key - encryption key - :type key_encryption_key: - ~azure.mgmt.compute.v2017_03_30.models.KeyVaultAndKeyReference - """ - - _attribute_map = { - 'enabled': {'key': 'enabled', 'type': 'bool'}, - 'disk_encryption_key': {'key': 'diskEncryptionKey', 'type': 'KeyVaultAndSecretReference'}, - 'key_encryption_key': {'key': 'keyEncryptionKey', 'type': 'KeyVaultAndKeyReference'}, - } - - def __init__(self, *, enabled: bool=None, disk_encryption_key=None, key_encryption_key=None, **kwargs) -> None: - super(EncryptionSettings, self).__init__(**kwargs) - self.enabled = enabled - self.disk_encryption_key = disk_encryption_key - self.key_encryption_key = key_encryption_key diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/grant_access_data.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/grant_access_data.py deleted file mode 100644 index df3466f4f99d..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/grant_access_data.py +++ /dev/null @@ -1,40 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class GrantAccessData(Model): - """Data used for requesting a SAS. - - All required parameters must be populated in order to send to Azure. - - :param access: Required. Possible values include: 'None', 'Read' - :type access: str or ~azure.mgmt.compute.v2017_03_30.models.AccessLevel - :param duration_in_seconds: Required. Time duration in seconds until the - SAS access expires. - :type duration_in_seconds: int - """ - - _validation = { - 'access': {'required': True}, - 'duration_in_seconds': {'required': True}, - } - - _attribute_map = { - 'access': {'key': 'access', 'type': 'AccessLevel'}, - 'duration_in_seconds': {'key': 'durationInSeconds', 'type': 'int'}, - } - - def __init__(self, **kwargs): - super(GrantAccessData, self).__init__(**kwargs) - self.access = kwargs.get('access', None) - self.duration_in_seconds = kwargs.get('duration_in_seconds', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/grant_access_data_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/grant_access_data_py3.py deleted file mode 100644 index 828e923ac006..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/grant_access_data_py3.py +++ /dev/null @@ -1,40 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class GrantAccessData(Model): - """Data used for requesting a SAS. - - All required parameters must be populated in order to send to Azure. - - :param access: Required. Possible values include: 'None', 'Read' - :type access: str or ~azure.mgmt.compute.v2017_03_30.models.AccessLevel - :param duration_in_seconds: Required. Time duration in seconds until the - SAS access expires. - :type duration_in_seconds: int - """ - - _validation = { - 'access': {'required': True}, - 'duration_in_seconds': {'required': True}, - } - - _attribute_map = { - 'access': {'key': 'access', 'type': 'AccessLevel'}, - 'duration_in_seconds': {'key': 'durationInSeconds', 'type': 'int'}, - } - - def __init__(self, *, access, duration_in_seconds: int, **kwargs) -> None: - super(GrantAccessData, self).__init__(**kwargs) - self.access = access - self.duration_in_seconds = duration_in_seconds diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/hardware_profile.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/hardware_profile.py deleted file mode 100644 index 814c084f6ff1..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/hardware_profile.py +++ /dev/null @@ -1,64 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class HardwareProfile(Model): - """Specifies the hardware settings for the virtual machine. - - :param vm_size: Specifies the size of the virtual machine. For more - information about virtual machine sizes, see [Sizes for virtual - machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-sizes?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). -

    The available VM sizes depend on region and availability set. For - a list of available sizes use these APIs:

    [List all available - virtual machine sizes in an availability - set](https://docs.microsoft.com/rest/api/compute/availabilitysets/listavailablesizes) -

    [List all available virtual machine sizes in a - region](https://docs.microsoft.com/rest/api/compute/virtualmachinesizes/list) -

    [List all available virtual machine sizes for - resizing](https://docs.microsoft.com/rest/api/compute/virtualmachines/listavailablesizes). - Possible values include: 'Basic_A0', 'Basic_A1', 'Basic_A2', 'Basic_A3', - 'Basic_A4', 'Standard_A0', 'Standard_A1', 'Standard_A2', 'Standard_A3', - 'Standard_A4', 'Standard_A5', 'Standard_A6', 'Standard_A7', 'Standard_A8', - 'Standard_A9', 'Standard_A10', 'Standard_A11', 'Standard_A1_v2', - 'Standard_A2_v2', 'Standard_A4_v2', 'Standard_A8_v2', 'Standard_A2m_v2', - 'Standard_A4m_v2', 'Standard_A8m_v2', 'Standard_D1', 'Standard_D2', - 'Standard_D3', 'Standard_D4', 'Standard_D11', 'Standard_D12', - 'Standard_D13', 'Standard_D14', 'Standard_D1_v2', 'Standard_D2_v2', - 'Standard_D3_v2', 'Standard_D4_v2', 'Standard_D5_v2', 'Standard_D11_v2', - 'Standard_D12_v2', 'Standard_D13_v2', 'Standard_D14_v2', - 'Standard_D15_v2', 'Standard_DS1', 'Standard_DS2', 'Standard_DS3', - 'Standard_DS4', 'Standard_DS11', 'Standard_DS12', 'Standard_DS13', - 'Standard_DS14', 'Standard_DS1_v2', 'Standard_DS2_v2', 'Standard_DS3_v2', - 'Standard_DS4_v2', 'Standard_DS5_v2', 'Standard_DS11_v2', - 'Standard_DS12_v2', 'Standard_DS13_v2', 'Standard_DS14_v2', - 'Standard_DS15_v2', 'Standard_F1', 'Standard_F2', 'Standard_F4', - 'Standard_F8', 'Standard_F16', 'Standard_F1s', 'Standard_F2s', - 'Standard_F4s', 'Standard_F8s', 'Standard_F16s', 'Standard_G1', - 'Standard_G2', 'Standard_G3', 'Standard_G4', 'Standard_G5', - 'Standard_GS1', 'Standard_GS2', 'Standard_GS3', 'Standard_GS4', - 'Standard_GS5', 'Standard_H8', 'Standard_H16', 'Standard_H8m', - 'Standard_H16m', 'Standard_H16r', 'Standard_H16mr', 'Standard_L4s', - 'Standard_L8s', 'Standard_L16s', 'Standard_L32s', 'Standard_NC6', - 'Standard_NC12', 'Standard_NC24', 'Standard_NC24r', 'Standard_NV6', - 'Standard_NV12', 'Standard_NV24' - :type vm_size: str or - ~azure.mgmt.compute.v2017_03_30.models.VirtualMachineSizeTypes - """ - - _attribute_map = { - 'vm_size': {'key': 'vmSize', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(HardwareProfile, self).__init__(**kwargs) - self.vm_size = kwargs.get('vm_size', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/hardware_profile_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/hardware_profile_py3.py deleted file mode 100644 index 56b702db9ed7..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/hardware_profile_py3.py +++ /dev/null @@ -1,64 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class HardwareProfile(Model): - """Specifies the hardware settings for the virtual machine. - - :param vm_size: Specifies the size of the virtual machine. For more - information about virtual machine sizes, see [Sizes for virtual - machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-sizes?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). -

    The available VM sizes depend on region and availability set. For - a list of available sizes use these APIs:

    [List all available - virtual machine sizes in an availability - set](https://docs.microsoft.com/rest/api/compute/availabilitysets/listavailablesizes) -

    [List all available virtual machine sizes in a - region](https://docs.microsoft.com/rest/api/compute/virtualmachinesizes/list) -

    [List all available virtual machine sizes for - resizing](https://docs.microsoft.com/rest/api/compute/virtualmachines/listavailablesizes). - Possible values include: 'Basic_A0', 'Basic_A1', 'Basic_A2', 'Basic_A3', - 'Basic_A4', 'Standard_A0', 'Standard_A1', 'Standard_A2', 'Standard_A3', - 'Standard_A4', 'Standard_A5', 'Standard_A6', 'Standard_A7', 'Standard_A8', - 'Standard_A9', 'Standard_A10', 'Standard_A11', 'Standard_A1_v2', - 'Standard_A2_v2', 'Standard_A4_v2', 'Standard_A8_v2', 'Standard_A2m_v2', - 'Standard_A4m_v2', 'Standard_A8m_v2', 'Standard_D1', 'Standard_D2', - 'Standard_D3', 'Standard_D4', 'Standard_D11', 'Standard_D12', - 'Standard_D13', 'Standard_D14', 'Standard_D1_v2', 'Standard_D2_v2', - 'Standard_D3_v2', 'Standard_D4_v2', 'Standard_D5_v2', 'Standard_D11_v2', - 'Standard_D12_v2', 'Standard_D13_v2', 'Standard_D14_v2', - 'Standard_D15_v2', 'Standard_DS1', 'Standard_DS2', 'Standard_DS3', - 'Standard_DS4', 'Standard_DS11', 'Standard_DS12', 'Standard_DS13', - 'Standard_DS14', 'Standard_DS1_v2', 'Standard_DS2_v2', 'Standard_DS3_v2', - 'Standard_DS4_v2', 'Standard_DS5_v2', 'Standard_DS11_v2', - 'Standard_DS12_v2', 'Standard_DS13_v2', 'Standard_DS14_v2', - 'Standard_DS15_v2', 'Standard_F1', 'Standard_F2', 'Standard_F4', - 'Standard_F8', 'Standard_F16', 'Standard_F1s', 'Standard_F2s', - 'Standard_F4s', 'Standard_F8s', 'Standard_F16s', 'Standard_G1', - 'Standard_G2', 'Standard_G3', 'Standard_G4', 'Standard_G5', - 'Standard_GS1', 'Standard_GS2', 'Standard_GS3', 'Standard_GS4', - 'Standard_GS5', 'Standard_H8', 'Standard_H16', 'Standard_H8m', - 'Standard_H16m', 'Standard_H16r', 'Standard_H16mr', 'Standard_L4s', - 'Standard_L8s', 'Standard_L16s', 'Standard_L32s', 'Standard_NC6', - 'Standard_NC12', 'Standard_NC24', 'Standard_NC24r', 'Standard_NV6', - 'Standard_NV12', 'Standard_NV24' - :type vm_size: str or - ~azure.mgmt.compute.v2017_03_30.models.VirtualMachineSizeTypes - """ - - _attribute_map = { - 'vm_size': {'key': 'vmSize', 'type': 'str'}, - } - - def __init__(self, *, vm_size=None, **kwargs) -> None: - super(HardwareProfile, self).__init__(**kwargs) - self.vm_size = vm_size diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/image.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/image.py deleted file mode 100644 index e045bc3eaade..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/image.py +++ /dev/null @@ -1,70 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource import Resource - - -class Image(Resource): - """The source user image virtual hard disk. The virtual hard disk will be - copied before being attached to the virtual machine. If SourceImage is - provided, the destination virtual hard drive must not exist. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource Id - :vartype id: str - :ivar name: Resource name - :vartype name: str - :ivar type: Resource type - :vartype type: str - :param location: Required. Resource location - :type location: str - :param tags: Resource tags - :type tags: dict[str, str] - :param source_virtual_machine: The source virtual machine from which Image - is created. - :type source_virtual_machine: - ~azure.mgmt.compute.v2017_03_30.models.SubResource - :param storage_profile: Specifies the storage settings for the virtual - machine disks. - :type storage_profile: - ~azure.mgmt.compute.v2017_03_30.models.ImageStorageProfile - :ivar provisioning_state: The provisioning state. - :vartype provisioning_state: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - 'provisioning_state': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'source_virtual_machine': {'key': 'properties.sourceVirtualMachine', 'type': 'SubResource'}, - 'storage_profile': {'key': 'properties.storageProfile', 'type': 'ImageStorageProfile'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(Image, self).__init__(**kwargs) - self.source_virtual_machine = kwargs.get('source_virtual_machine', None) - self.storage_profile = kwargs.get('storage_profile', None) - self.provisioning_state = None diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/image_data_disk.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/image_data_disk.py deleted file mode 100644 index c30b35473476..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/image_data_disk.py +++ /dev/null @@ -1,68 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ImageDataDisk(Model): - """Describes a data disk. - - All required parameters must be populated in order to send to Azure. - - :param lun: Required. Specifies the logical unit number of the data disk. - This value is used to identify data disks within the VM and therefore must - be unique for each data disk attached to a VM. - :type lun: int - :param snapshot: The snapshot. - :type snapshot: ~azure.mgmt.compute.v2017_03_30.models.SubResource - :param managed_disk: The managedDisk. - :type managed_disk: ~azure.mgmt.compute.v2017_03_30.models.SubResource - :param blob_uri: The Virtual Hard Disk. - :type blob_uri: str - :param caching: Specifies the caching requirements.

    Possible - values are:

    **None**

    **ReadOnly**

    **ReadWrite** -

    Default: **None for Standard storage. ReadOnly for Premium - storage**. Possible values include: 'None', 'ReadOnly', 'ReadWrite' - :type caching: str or ~azure.mgmt.compute.v2017_03_30.models.CachingTypes - :param disk_size_gb: Specifies the size of empty data disks in gigabytes. - This element can be used to overwrite the name of the disk in a virtual - machine image.

    This value cannot be larger than 1023 GB - :type disk_size_gb: int - :param storage_account_type: Specifies the storage account type for the - managed disk. Possible values are: Standard_LRS or Premium_LRS. Possible - values include: 'Standard_LRS', 'Premium_LRS' - :type storage_account_type: str or - ~azure.mgmt.compute.v2017_03_30.models.StorageAccountTypes - """ - - _validation = { - 'lun': {'required': True}, - } - - _attribute_map = { - 'lun': {'key': 'lun', 'type': 'int'}, - 'snapshot': {'key': 'snapshot', 'type': 'SubResource'}, - 'managed_disk': {'key': 'managedDisk', 'type': 'SubResource'}, - 'blob_uri': {'key': 'blobUri', 'type': 'str'}, - 'caching': {'key': 'caching', 'type': 'CachingTypes'}, - 'disk_size_gb': {'key': 'diskSizeGB', 'type': 'int'}, - 'storage_account_type': {'key': 'storageAccountType', 'type': 'StorageAccountTypes'}, - } - - def __init__(self, **kwargs): - super(ImageDataDisk, self).__init__(**kwargs) - self.lun = kwargs.get('lun', None) - self.snapshot = kwargs.get('snapshot', None) - self.managed_disk = kwargs.get('managed_disk', None) - self.blob_uri = kwargs.get('blob_uri', None) - self.caching = kwargs.get('caching', None) - self.disk_size_gb = kwargs.get('disk_size_gb', None) - self.storage_account_type = kwargs.get('storage_account_type', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/image_data_disk_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/image_data_disk_py3.py deleted file mode 100644 index a553931a9d2a..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/image_data_disk_py3.py +++ /dev/null @@ -1,68 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ImageDataDisk(Model): - """Describes a data disk. - - All required parameters must be populated in order to send to Azure. - - :param lun: Required. Specifies the logical unit number of the data disk. - This value is used to identify data disks within the VM and therefore must - be unique for each data disk attached to a VM. - :type lun: int - :param snapshot: The snapshot. - :type snapshot: ~azure.mgmt.compute.v2017_03_30.models.SubResource - :param managed_disk: The managedDisk. - :type managed_disk: ~azure.mgmt.compute.v2017_03_30.models.SubResource - :param blob_uri: The Virtual Hard Disk. - :type blob_uri: str - :param caching: Specifies the caching requirements.

    Possible - values are:

    **None**

    **ReadOnly**

    **ReadWrite** -

    Default: **None for Standard storage. ReadOnly for Premium - storage**. Possible values include: 'None', 'ReadOnly', 'ReadWrite' - :type caching: str or ~azure.mgmt.compute.v2017_03_30.models.CachingTypes - :param disk_size_gb: Specifies the size of empty data disks in gigabytes. - This element can be used to overwrite the name of the disk in a virtual - machine image.

    This value cannot be larger than 1023 GB - :type disk_size_gb: int - :param storage_account_type: Specifies the storage account type for the - managed disk. Possible values are: Standard_LRS or Premium_LRS. Possible - values include: 'Standard_LRS', 'Premium_LRS' - :type storage_account_type: str or - ~azure.mgmt.compute.v2017_03_30.models.StorageAccountTypes - """ - - _validation = { - 'lun': {'required': True}, - } - - _attribute_map = { - 'lun': {'key': 'lun', 'type': 'int'}, - 'snapshot': {'key': 'snapshot', 'type': 'SubResource'}, - 'managed_disk': {'key': 'managedDisk', 'type': 'SubResource'}, - 'blob_uri': {'key': 'blobUri', 'type': 'str'}, - 'caching': {'key': 'caching', 'type': 'CachingTypes'}, - 'disk_size_gb': {'key': 'diskSizeGB', 'type': 'int'}, - 'storage_account_type': {'key': 'storageAccountType', 'type': 'StorageAccountTypes'}, - } - - def __init__(self, *, lun: int, snapshot=None, managed_disk=None, blob_uri: str=None, caching=None, disk_size_gb: int=None, storage_account_type=None, **kwargs) -> None: - super(ImageDataDisk, self).__init__(**kwargs) - self.lun = lun - self.snapshot = snapshot - self.managed_disk = managed_disk - self.blob_uri = blob_uri - self.caching = caching - self.disk_size_gb = disk_size_gb - self.storage_account_type = storage_account_type diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/image_disk_reference.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/image_disk_reference.py deleted file mode 100644 index b47ddd445024..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/image_disk_reference.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ImageDiskReference(Model): - """The source image used for creating the disk. - - All required parameters must be populated in order to send to Azure. - - :param id: Required. A relative uri containing either a Platform Image - Repository or user image reference. - :type id: str - :param lun: If the disk is created from an image's data disk, this is an - index that indicates which of the data disks in the image to use. For OS - disks, this field is null. - :type lun: int - """ - - _validation = { - 'id': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'lun': {'key': 'lun', 'type': 'int'}, - } - - def __init__(self, **kwargs): - super(ImageDiskReference, self).__init__(**kwargs) - self.id = kwargs.get('id', None) - self.lun = kwargs.get('lun', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/image_disk_reference_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/image_disk_reference_py3.py deleted file mode 100644 index 85bf966bc6e0..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/image_disk_reference_py3.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ImageDiskReference(Model): - """The source image used for creating the disk. - - All required parameters must be populated in order to send to Azure. - - :param id: Required. A relative uri containing either a Platform Image - Repository or user image reference. - :type id: str - :param lun: If the disk is created from an image's data disk, this is an - index that indicates which of the data disks in the image to use. For OS - disks, this field is null. - :type lun: int - """ - - _validation = { - 'id': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'lun': {'key': 'lun', 'type': 'int'}, - } - - def __init__(self, *, id: str, lun: int=None, **kwargs) -> None: - super(ImageDiskReference, self).__init__(**kwargs) - self.id = id - self.lun = lun diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/image_os_disk.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/image_os_disk.py deleted file mode 100644 index f1d05ae32c94..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/image_os_disk.py +++ /dev/null @@ -1,77 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ImageOSDisk(Model): - """Describes an Operating System disk. - - All required parameters must be populated in order to send to Azure. - - :param os_type: Required. This property allows you to specify the type of - the OS that is included in the disk if creating a VM from a custom image. -

    Possible values are:

    **Windows**

    **Linux**. - Possible values include: 'Windows', 'Linux' - :type os_type: str or - ~azure.mgmt.compute.v2017_03_30.models.OperatingSystemTypes - :param os_state: Required. The OS State. Possible values include: - 'Generalized', 'Specialized' - :type os_state: str or - ~azure.mgmt.compute.v2017_03_30.models.OperatingSystemStateTypes - :param snapshot: The snapshot. - :type snapshot: ~azure.mgmt.compute.v2017_03_30.models.SubResource - :param managed_disk: The managedDisk. - :type managed_disk: ~azure.mgmt.compute.v2017_03_30.models.SubResource - :param blob_uri: The Virtual Hard Disk. - :type blob_uri: str - :param caching: Specifies the caching requirements.

    Possible - values are:

    **None**

    **ReadOnly**

    **ReadWrite** -

    Default: **None for Standard storage. ReadOnly for Premium - storage**. Possible values include: 'None', 'ReadOnly', 'ReadWrite' - :type caching: str or ~azure.mgmt.compute.v2017_03_30.models.CachingTypes - :param disk_size_gb: Specifies the size of empty data disks in gigabytes. - This element can be used to overwrite the name of the disk in a virtual - machine image.

    This value cannot be larger than 1023 GB - :type disk_size_gb: int - :param storage_account_type: Specifies the storage account type for the - managed disk. Possible values are: Standard_LRS or Premium_LRS. Possible - values include: 'Standard_LRS', 'Premium_LRS' - :type storage_account_type: str or - ~azure.mgmt.compute.v2017_03_30.models.StorageAccountTypes - """ - - _validation = { - 'os_type': {'required': True}, - 'os_state': {'required': True}, - } - - _attribute_map = { - 'os_type': {'key': 'osType', 'type': 'OperatingSystemTypes'}, - 'os_state': {'key': 'osState', 'type': 'OperatingSystemStateTypes'}, - 'snapshot': {'key': 'snapshot', 'type': 'SubResource'}, - 'managed_disk': {'key': 'managedDisk', 'type': 'SubResource'}, - 'blob_uri': {'key': 'blobUri', 'type': 'str'}, - 'caching': {'key': 'caching', 'type': 'CachingTypes'}, - 'disk_size_gb': {'key': 'diskSizeGB', 'type': 'int'}, - 'storage_account_type': {'key': 'storageAccountType', 'type': 'StorageAccountTypes'}, - } - - def __init__(self, **kwargs): - super(ImageOSDisk, self).__init__(**kwargs) - self.os_type = kwargs.get('os_type', None) - self.os_state = kwargs.get('os_state', None) - self.snapshot = kwargs.get('snapshot', None) - self.managed_disk = kwargs.get('managed_disk', None) - self.blob_uri = kwargs.get('blob_uri', None) - self.caching = kwargs.get('caching', None) - self.disk_size_gb = kwargs.get('disk_size_gb', None) - self.storage_account_type = kwargs.get('storage_account_type', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/image_os_disk_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/image_os_disk_py3.py deleted file mode 100644 index 1e7ac3e5bd13..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/image_os_disk_py3.py +++ /dev/null @@ -1,77 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ImageOSDisk(Model): - """Describes an Operating System disk. - - All required parameters must be populated in order to send to Azure. - - :param os_type: Required. This property allows you to specify the type of - the OS that is included in the disk if creating a VM from a custom image. -

    Possible values are:

    **Windows**

    **Linux**. - Possible values include: 'Windows', 'Linux' - :type os_type: str or - ~azure.mgmt.compute.v2017_03_30.models.OperatingSystemTypes - :param os_state: Required. The OS State. Possible values include: - 'Generalized', 'Specialized' - :type os_state: str or - ~azure.mgmt.compute.v2017_03_30.models.OperatingSystemStateTypes - :param snapshot: The snapshot. - :type snapshot: ~azure.mgmt.compute.v2017_03_30.models.SubResource - :param managed_disk: The managedDisk. - :type managed_disk: ~azure.mgmt.compute.v2017_03_30.models.SubResource - :param blob_uri: The Virtual Hard Disk. - :type blob_uri: str - :param caching: Specifies the caching requirements.

    Possible - values are:

    **None**

    **ReadOnly**

    **ReadWrite** -

    Default: **None for Standard storage. ReadOnly for Premium - storage**. Possible values include: 'None', 'ReadOnly', 'ReadWrite' - :type caching: str or ~azure.mgmt.compute.v2017_03_30.models.CachingTypes - :param disk_size_gb: Specifies the size of empty data disks in gigabytes. - This element can be used to overwrite the name of the disk in a virtual - machine image.

    This value cannot be larger than 1023 GB - :type disk_size_gb: int - :param storage_account_type: Specifies the storage account type for the - managed disk. Possible values are: Standard_LRS or Premium_LRS. Possible - values include: 'Standard_LRS', 'Premium_LRS' - :type storage_account_type: str or - ~azure.mgmt.compute.v2017_03_30.models.StorageAccountTypes - """ - - _validation = { - 'os_type': {'required': True}, - 'os_state': {'required': True}, - } - - _attribute_map = { - 'os_type': {'key': 'osType', 'type': 'OperatingSystemTypes'}, - 'os_state': {'key': 'osState', 'type': 'OperatingSystemStateTypes'}, - 'snapshot': {'key': 'snapshot', 'type': 'SubResource'}, - 'managed_disk': {'key': 'managedDisk', 'type': 'SubResource'}, - 'blob_uri': {'key': 'blobUri', 'type': 'str'}, - 'caching': {'key': 'caching', 'type': 'CachingTypes'}, - 'disk_size_gb': {'key': 'diskSizeGB', 'type': 'int'}, - 'storage_account_type': {'key': 'storageAccountType', 'type': 'StorageAccountTypes'}, - } - - def __init__(self, *, os_type, os_state, snapshot=None, managed_disk=None, blob_uri: str=None, caching=None, disk_size_gb: int=None, storage_account_type=None, **kwargs) -> None: - super(ImageOSDisk, self).__init__(**kwargs) - self.os_type = os_type - self.os_state = os_state - self.snapshot = snapshot - self.managed_disk = managed_disk - self.blob_uri = blob_uri - self.caching = caching - self.disk_size_gb = disk_size_gb - self.storage_account_type = storage_account_type diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/image_paged.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/image_paged.py deleted file mode 100644 index d08345dff11c..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/image_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class ImagePaged(Paged): - """ - A paging container for iterating over a list of :class:`Image ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[Image]'} - } - - def __init__(self, *args, **kwargs): - - super(ImagePaged, self).__init__(*args, **kwargs) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/image_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/image_py3.py deleted file mode 100644 index 92e3680ef6dd..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/image_py3.py +++ /dev/null @@ -1,70 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource_py3 import Resource - - -class Image(Resource): - """The source user image virtual hard disk. The virtual hard disk will be - copied before being attached to the virtual machine. If SourceImage is - provided, the destination virtual hard drive must not exist. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource Id - :vartype id: str - :ivar name: Resource name - :vartype name: str - :ivar type: Resource type - :vartype type: str - :param location: Required. Resource location - :type location: str - :param tags: Resource tags - :type tags: dict[str, str] - :param source_virtual_machine: The source virtual machine from which Image - is created. - :type source_virtual_machine: - ~azure.mgmt.compute.v2017_03_30.models.SubResource - :param storage_profile: Specifies the storage settings for the virtual - machine disks. - :type storage_profile: - ~azure.mgmt.compute.v2017_03_30.models.ImageStorageProfile - :ivar provisioning_state: The provisioning state. - :vartype provisioning_state: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - 'provisioning_state': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'source_virtual_machine': {'key': 'properties.sourceVirtualMachine', 'type': 'SubResource'}, - 'storage_profile': {'key': 'properties.storageProfile', 'type': 'ImageStorageProfile'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - } - - def __init__(self, *, location: str, tags=None, source_virtual_machine=None, storage_profile=None, **kwargs) -> None: - super(Image, self).__init__(location=location, tags=tags, **kwargs) - self.source_virtual_machine = source_virtual_machine - self.storage_profile = storage_profile - self.provisioning_state = None diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/image_reference.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/image_reference.py deleted file mode 100644 index b8f929f4ad70..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/image_reference.py +++ /dev/null @@ -1,54 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .sub_resource import SubResource - - -class ImageReference(SubResource): - """Specifies information about the image to use. You can specify information - about platform images, marketplace images, or virtual machine images. This - element is required when you want to use a platform image, marketplace - image, or virtual machine image, but is not used in other creation - operations. - - :param id: Resource Id - :type id: str - :param publisher: The image publisher. - :type publisher: str - :param offer: Specifies the offer of the platform image or marketplace - image used to create the virtual machine. - :type offer: str - :param sku: The image SKU. - :type sku: str - :param version: Specifies the version of the platform image or marketplace - image used to create the virtual machine. The allowed formats are - Major.Minor.Build or 'latest'. Major, Minor, and Build are decimal - numbers. Specify 'latest' to use the latest version of an image available - at deploy time. Even if you use 'latest', the VM image will not - automatically update after deploy time even if a new version becomes - available. - :type version: str - """ - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'publisher': {'key': 'publisher', 'type': 'str'}, - 'offer': {'key': 'offer', 'type': 'str'}, - 'sku': {'key': 'sku', 'type': 'str'}, - 'version': {'key': 'version', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ImageReference, self).__init__(**kwargs) - self.publisher = kwargs.get('publisher', None) - self.offer = kwargs.get('offer', None) - self.sku = kwargs.get('sku', None) - self.version = kwargs.get('version', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/image_reference_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/image_reference_py3.py deleted file mode 100644 index 1d7eefe5ac65..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/image_reference_py3.py +++ /dev/null @@ -1,54 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .sub_resource_py3 import SubResource - - -class ImageReference(SubResource): - """Specifies information about the image to use. You can specify information - about platform images, marketplace images, or virtual machine images. This - element is required when you want to use a platform image, marketplace - image, or virtual machine image, but is not used in other creation - operations. - - :param id: Resource Id - :type id: str - :param publisher: The image publisher. - :type publisher: str - :param offer: Specifies the offer of the platform image or marketplace - image used to create the virtual machine. - :type offer: str - :param sku: The image SKU. - :type sku: str - :param version: Specifies the version of the platform image or marketplace - image used to create the virtual machine. The allowed formats are - Major.Minor.Build or 'latest'. Major, Minor, and Build are decimal - numbers. Specify 'latest' to use the latest version of an image available - at deploy time. Even if you use 'latest', the VM image will not - automatically update after deploy time even if a new version becomes - available. - :type version: str - """ - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'publisher': {'key': 'publisher', 'type': 'str'}, - 'offer': {'key': 'offer', 'type': 'str'}, - 'sku': {'key': 'sku', 'type': 'str'}, - 'version': {'key': 'version', 'type': 'str'}, - } - - def __init__(self, *, id: str=None, publisher: str=None, offer: str=None, sku: str=None, version: str=None, **kwargs) -> None: - super(ImageReference, self).__init__(id=id, **kwargs) - self.publisher = publisher - self.offer = offer - self.sku = sku - self.version = version diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/image_storage_profile.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/image_storage_profile.py deleted file mode 100644 index 6a62f7be35c9..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/image_storage_profile.py +++ /dev/null @@ -1,45 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ImageStorageProfile(Model): - """Describes a storage profile. - - All required parameters must be populated in order to send to Azure. - - :param os_disk: Required. Specifies information about the operating system - disk used by the virtual machine.

    For more information about - disks, see [About disks and VHDs for Azure virtual - machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-about-disks-vhds?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). - :type os_disk: ~azure.mgmt.compute.v2017_03_30.models.ImageOSDisk - :param data_disks: Specifies the parameters that are used to add a data - disk to a virtual machine.

    For more information about disks, see - [About disks and VHDs for Azure virtual - machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-about-disks-vhds?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). - :type data_disks: - list[~azure.mgmt.compute.v2017_03_30.models.ImageDataDisk] - """ - - _validation = { - 'os_disk': {'required': True}, - } - - _attribute_map = { - 'os_disk': {'key': 'osDisk', 'type': 'ImageOSDisk'}, - 'data_disks': {'key': 'dataDisks', 'type': '[ImageDataDisk]'}, - } - - def __init__(self, **kwargs): - super(ImageStorageProfile, self).__init__(**kwargs) - self.os_disk = kwargs.get('os_disk', None) - self.data_disks = kwargs.get('data_disks', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/image_storage_profile_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/image_storage_profile_py3.py deleted file mode 100644 index af250086f9ab..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/image_storage_profile_py3.py +++ /dev/null @@ -1,45 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ImageStorageProfile(Model): - """Describes a storage profile. - - All required parameters must be populated in order to send to Azure. - - :param os_disk: Required. Specifies information about the operating system - disk used by the virtual machine.

    For more information about - disks, see [About disks and VHDs for Azure virtual - machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-about-disks-vhds?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). - :type os_disk: ~azure.mgmt.compute.v2017_03_30.models.ImageOSDisk - :param data_disks: Specifies the parameters that are used to add a data - disk to a virtual machine.

    For more information about disks, see - [About disks and VHDs for Azure virtual - machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-about-disks-vhds?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). - :type data_disks: - list[~azure.mgmt.compute.v2017_03_30.models.ImageDataDisk] - """ - - _validation = { - 'os_disk': {'required': True}, - } - - _attribute_map = { - 'os_disk': {'key': 'osDisk', 'type': 'ImageOSDisk'}, - 'data_disks': {'key': 'dataDisks', 'type': '[ImageDataDisk]'}, - } - - def __init__(self, *, os_disk, data_disks=None, **kwargs) -> None: - super(ImageStorageProfile, self).__init__(**kwargs) - self.os_disk = os_disk - self.data_disks = data_disks diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/inner_error.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/inner_error.py deleted file mode 100644 index 6324249d7c19..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/inner_error.py +++ /dev/null @@ -1,32 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class InnerError(Model): - """Inner error details. - - :param exceptiontype: The exception type. - :type exceptiontype: str - :param errordetail: The internal error message or exception dump. - :type errordetail: str - """ - - _attribute_map = { - 'exceptiontype': {'key': 'exceptiontype', 'type': 'str'}, - 'errordetail': {'key': 'errordetail', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(InnerError, self).__init__(**kwargs) - self.exceptiontype = kwargs.get('exceptiontype', None) - self.errordetail = kwargs.get('errordetail', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/inner_error_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/inner_error_py3.py deleted file mode 100644 index ccec30d7b53f..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/inner_error_py3.py +++ /dev/null @@ -1,32 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class InnerError(Model): - """Inner error details. - - :param exceptiontype: The exception type. - :type exceptiontype: str - :param errordetail: The internal error message or exception dump. - :type errordetail: str - """ - - _attribute_map = { - 'exceptiontype': {'key': 'exceptiontype', 'type': 'str'}, - 'errordetail': {'key': 'errordetail', 'type': 'str'}, - } - - def __init__(self, *, exceptiontype: str=None, errordetail: str=None, **kwargs) -> None: - super(InnerError, self).__init__(**kwargs) - self.exceptiontype = exceptiontype - self.errordetail = errordetail diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/instance_view_status.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/instance_view_status.py deleted file mode 100644 index bad5209dc286..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/instance_view_status.py +++ /dev/null @@ -1,47 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class InstanceViewStatus(Model): - """Instance view status. - - :param code: The status code. - :type code: str - :param level: The level code. Possible values include: 'Info', 'Warning', - 'Error' - :type level: str or - ~azure.mgmt.compute.v2017_03_30.models.StatusLevelTypes - :param display_status: The short localizable label for the status. - :type display_status: str - :param message: The detailed status message, including for alerts and - error messages. - :type message: str - :param time: The time of the status. - :type time: datetime - """ - - _attribute_map = { - 'code': {'key': 'code', 'type': 'str'}, - 'level': {'key': 'level', 'type': 'StatusLevelTypes'}, - 'display_status': {'key': 'displayStatus', 'type': 'str'}, - 'message': {'key': 'message', 'type': 'str'}, - 'time': {'key': 'time', 'type': 'iso-8601'}, - } - - def __init__(self, **kwargs): - super(InstanceViewStatus, self).__init__(**kwargs) - self.code = kwargs.get('code', None) - self.level = kwargs.get('level', None) - self.display_status = kwargs.get('display_status', None) - self.message = kwargs.get('message', None) - self.time = kwargs.get('time', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/instance_view_status_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/instance_view_status_py3.py deleted file mode 100644 index a9cc415679e4..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/instance_view_status_py3.py +++ /dev/null @@ -1,47 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class InstanceViewStatus(Model): - """Instance view status. - - :param code: The status code. - :type code: str - :param level: The level code. Possible values include: 'Info', 'Warning', - 'Error' - :type level: str or - ~azure.mgmt.compute.v2017_03_30.models.StatusLevelTypes - :param display_status: The short localizable label for the status. - :type display_status: str - :param message: The detailed status message, including for alerts and - error messages. - :type message: str - :param time: The time of the status. - :type time: datetime - """ - - _attribute_map = { - 'code': {'key': 'code', 'type': 'str'}, - 'level': {'key': 'level', 'type': 'StatusLevelTypes'}, - 'display_status': {'key': 'displayStatus', 'type': 'str'}, - 'message': {'key': 'message', 'type': 'str'}, - 'time': {'key': 'time', 'type': 'iso-8601'}, - } - - def __init__(self, *, code: str=None, level=None, display_status: str=None, message: str=None, time=None, **kwargs) -> None: - super(InstanceViewStatus, self).__init__(**kwargs) - self.code = code - self.level = level - self.display_status = display_status - self.message = message - self.time = time diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/key_vault_and_key_reference.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/key_vault_and_key_reference.py deleted file mode 100644 index 9b05d8d9a81f..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/key_vault_and_key_reference.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class KeyVaultAndKeyReference(Model): - """Key Vault Key Url and vault id of KeK, KeK is optional and when provided is - used to unwrap the encryptionKey. - - All required parameters must be populated in order to send to Azure. - - :param source_vault: Required. Resource id of the KeyVault containing the - key or secret - :type source_vault: ~azure.mgmt.compute.v2017_03_30.models.SourceVault - :param key_url: Required. Url pointing to a key or secret in KeyVault - :type key_url: str - """ - - _validation = { - 'source_vault': {'required': True}, - 'key_url': {'required': True}, - } - - _attribute_map = { - 'source_vault': {'key': 'sourceVault', 'type': 'SourceVault'}, - 'key_url': {'key': 'keyUrl', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(KeyVaultAndKeyReference, self).__init__(**kwargs) - self.source_vault = kwargs.get('source_vault', None) - self.key_url = kwargs.get('key_url', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/key_vault_and_key_reference_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/key_vault_and_key_reference_py3.py deleted file mode 100644 index 524521adb8b3..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/key_vault_and_key_reference_py3.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class KeyVaultAndKeyReference(Model): - """Key Vault Key Url and vault id of KeK, KeK is optional and when provided is - used to unwrap the encryptionKey. - - All required parameters must be populated in order to send to Azure. - - :param source_vault: Required. Resource id of the KeyVault containing the - key or secret - :type source_vault: ~azure.mgmt.compute.v2017_03_30.models.SourceVault - :param key_url: Required. Url pointing to a key or secret in KeyVault - :type key_url: str - """ - - _validation = { - 'source_vault': {'required': True}, - 'key_url': {'required': True}, - } - - _attribute_map = { - 'source_vault': {'key': 'sourceVault', 'type': 'SourceVault'}, - 'key_url': {'key': 'keyUrl', 'type': 'str'}, - } - - def __init__(self, *, source_vault, key_url: str, **kwargs) -> None: - super(KeyVaultAndKeyReference, self).__init__(**kwargs) - self.source_vault = source_vault - self.key_url = key_url diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/key_vault_and_secret_reference.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/key_vault_and_secret_reference.py deleted file mode 100644 index 8ca1e94d1ef4..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/key_vault_and_secret_reference.py +++ /dev/null @@ -1,40 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class KeyVaultAndSecretReference(Model): - """Key Vault Secret Url and vault id of the encryption key . - - All required parameters must be populated in order to send to Azure. - - :param source_vault: Required. Resource id of the KeyVault containing the - key or secret - :type source_vault: ~azure.mgmt.compute.v2017_03_30.models.SourceVault - :param secret_url: Required. Url pointing to a key or secret in KeyVault - :type secret_url: str - """ - - _validation = { - 'source_vault': {'required': True}, - 'secret_url': {'required': True}, - } - - _attribute_map = { - 'source_vault': {'key': 'sourceVault', 'type': 'SourceVault'}, - 'secret_url': {'key': 'secretUrl', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(KeyVaultAndSecretReference, self).__init__(**kwargs) - self.source_vault = kwargs.get('source_vault', None) - self.secret_url = kwargs.get('secret_url', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/key_vault_and_secret_reference_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/key_vault_and_secret_reference_py3.py deleted file mode 100644 index 441f3b3e7474..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/key_vault_and_secret_reference_py3.py +++ /dev/null @@ -1,40 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class KeyVaultAndSecretReference(Model): - """Key Vault Secret Url and vault id of the encryption key . - - All required parameters must be populated in order to send to Azure. - - :param source_vault: Required. Resource id of the KeyVault containing the - key or secret - :type source_vault: ~azure.mgmt.compute.v2017_03_30.models.SourceVault - :param secret_url: Required. Url pointing to a key or secret in KeyVault - :type secret_url: str - """ - - _validation = { - 'source_vault': {'required': True}, - 'secret_url': {'required': True}, - } - - _attribute_map = { - 'source_vault': {'key': 'sourceVault', 'type': 'SourceVault'}, - 'secret_url': {'key': 'secretUrl', 'type': 'str'}, - } - - def __init__(self, *, source_vault, secret_url: str, **kwargs) -> None: - super(KeyVaultAndSecretReference, self).__init__(**kwargs) - self.source_vault = source_vault - self.secret_url = secret_url diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/key_vault_key_reference.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/key_vault_key_reference.py deleted file mode 100644 index 92145037b737..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/key_vault_key_reference.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class KeyVaultKeyReference(Model): - """Describes a reference to Key Vault Key. - - All required parameters must be populated in order to send to Azure. - - :param key_url: Required. The URL referencing a key encryption key in Key - Vault. - :type key_url: str - :param source_vault: Required. The relative URL of the Key Vault - containing the key. - :type source_vault: ~azure.mgmt.compute.v2017_03_30.models.SubResource - """ - - _validation = { - 'key_url': {'required': True}, - 'source_vault': {'required': True}, - } - - _attribute_map = { - 'key_url': {'key': 'keyUrl', 'type': 'str'}, - 'source_vault': {'key': 'sourceVault', 'type': 'SubResource'}, - } - - def __init__(self, **kwargs): - super(KeyVaultKeyReference, self).__init__(**kwargs) - self.key_url = kwargs.get('key_url', None) - self.source_vault = kwargs.get('source_vault', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/key_vault_key_reference_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/key_vault_key_reference_py3.py deleted file mode 100644 index 33c5c26753a7..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/key_vault_key_reference_py3.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class KeyVaultKeyReference(Model): - """Describes a reference to Key Vault Key. - - All required parameters must be populated in order to send to Azure. - - :param key_url: Required. The URL referencing a key encryption key in Key - Vault. - :type key_url: str - :param source_vault: Required. The relative URL of the Key Vault - containing the key. - :type source_vault: ~azure.mgmt.compute.v2017_03_30.models.SubResource - """ - - _validation = { - 'key_url': {'required': True}, - 'source_vault': {'required': True}, - } - - _attribute_map = { - 'key_url': {'key': 'keyUrl', 'type': 'str'}, - 'source_vault': {'key': 'sourceVault', 'type': 'SubResource'}, - } - - def __init__(self, *, key_url: str, source_vault, **kwargs) -> None: - super(KeyVaultKeyReference, self).__init__(**kwargs) - self.key_url = key_url - self.source_vault = source_vault diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/key_vault_secret_reference.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/key_vault_secret_reference.py deleted file mode 100644 index 08b6714cbc93..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/key_vault_secret_reference.py +++ /dev/null @@ -1,40 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class KeyVaultSecretReference(Model): - """Describes a reference to Key Vault Secret. - - All required parameters must be populated in order to send to Azure. - - :param secret_url: Required. The URL referencing a secret in a Key Vault. - :type secret_url: str - :param source_vault: Required. The relative URL of the Key Vault - containing the secret. - :type source_vault: ~azure.mgmt.compute.v2017_03_30.models.SubResource - """ - - _validation = { - 'secret_url': {'required': True}, - 'source_vault': {'required': True}, - } - - _attribute_map = { - 'secret_url': {'key': 'secretUrl', 'type': 'str'}, - 'source_vault': {'key': 'sourceVault', 'type': 'SubResource'}, - } - - def __init__(self, **kwargs): - super(KeyVaultSecretReference, self).__init__(**kwargs) - self.secret_url = kwargs.get('secret_url', None) - self.source_vault = kwargs.get('source_vault', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/key_vault_secret_reference_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/key_vault_secret_reference_py3.py deleted file mode 100644 index 08aee3ef629c..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/key_vault_secret_reference_py3.py +++ /dev/null @@ -1,40 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class KeyVaultSecretReference(Model): - """Describes a reference to Key Vault Secret. - - All required parameters must be populated in order to send to Azure. - - :param secret_url: Required. The URL referencing a secret in a Key Vault. - :type secret_url: str - :param source_vault: Required. The relative URL of the Key Vault - containing the secret. - :type source_vault: ~azure.mgmt.compute.v2017_03_30.models.SubResource - """ - - _validation = { - 'secret_url': {'required': True}, - 'source_vault': {'required': True}, - } - - _attribute_map = { - 'secret_url': {'key': 'secretUrl', 'type': 'str'}, - 'source_vault': {'key': 'sourceVault', 'type': 'SubResource'}, - } - - def __init__(self, *, secret_url: str, source_vault, **kwargs) -> None: - super(KeyVaultSecretReference, self).__init__(**kwargs) - self.secret_url = secret_url - self.source_vault = source_vault diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/linux_configuration.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/linux_configuration.py deleted file mode 100644 index 07e5c9a55895..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/linux_configuration.py +++ /dev/null @@ -1,39 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class LinuxConfiguration(Model): - """Specifies the Linux operating system settings on the virtual machine. -

    For a list of supported Linux distributions, see [Linux on - Azure-Endorsed - Distributions](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-endorsed-distros?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json) -

    For running non-endorsed distributions, see [Information for - Non-Endorsed - Distributions](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-create-upload-generic?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json). - - :param disable_password_authentication: Specifies whether password - authentication should be disabled. - :type disable_password_authentication: bool - :param ssh: Specifies the ssh key configuration for a Linux OS. - :type ssh: ~azure.mgmt.compute.v2017_03_30.models.SshConfiguration - """ - - _attribute_map = { - 'disable_password_authentication': {'key': 'disablePasswordAuthentication', 'type': 'bool'}, - 'ssh': {'key': 'ssh', 'type': 'SshConfiguration'}, - } - - def __init__(self, **kwargs): - super(LinuxConfiguration, self).__init__(**kwargs) - self.disable_password_authentication = kwargs.get('disable_password_authentication', None) - self.ssh = kwargs.get('ssh', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/linux_configuration_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/linux_configuration_py3.py deleted file mode 100644 index 63d138590b0e..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/linux_configuration_py3.py +++ /dev/null @@ -1,39 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class LinuxConfiguration(Model): - """Specifies the Linux operating system settings on the virtual machine. -

    For a list of supported Linux distributions, see [Linux on - Azure-Endorsed - Distributions](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-endorsed-distros?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json) -

    For running non-endorsed distributions, see [Information for - Non-Endorsed - Distributions](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-create-upload-generic?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json). - - :param disable_password_authentication: Specifies whether password - authentication should be disabled. - :type disable_password_authentication: bool - :param ssh: Specifies the ssh key configuration for a Linux OS. - :type ssh: ~azure.mgmt.compute.v2017_03_30.models.SshConfiguration - """ - - _attribute_map = { - 'disable_password_authentication': {'key': 'disablePasswordAuthentication', 'type': 'bool'}, - 'ssh': {'key': 'ssh', 'type': 'SshConfiguration'}, - } - - def __init__(self, *, disable_password_authentication: bool=None, ssh=None, **kwargs) -> None: - super(LinuxConfiguration, self).__init__(**kwargs) - self.disable_password_authentication = disable_password_authentication - self.ssh = ssh diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/maintenance_redeploy_status.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/maintenance_redeploy_status.py deleted file mode 100644 index 183ed22922d3..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/maintenance_redeploy_status.py +++ /dev/null @@ -1,60 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class MaintenanceRedeployStatus(Model): - """Maintenance Operation Status. - - :param is_customer_initiated_maintenance_allowed: True, if customer is - allowed to perform Maintenance. - :type is_customer_initiated_maintenance_allowed: bool - :param pre_maintenance_window_start_time: Start Time for the Pre - Maintenance Window. - :type pre_maintenance_window_start_time: datetime - :param pre_maintenance_window_end_time: End Time for the Pre Maintenance - Window. - :type pre_maintenance_window_end_time: datetime - :param maintenance_window_start_time: Start Time for the Maintenance - Window. - :type maintenance_window_start_time: datetime - :param maintenance_window_end_time: End Time for the Maintenance Window. - :type maintenance_window_end_time: datetime - :param last_operation_result_code: The Last Maintenance Operation Result - Code. Possible values include: 'None', 'RetryLater', 'MaintenanceAborted', - 'MaintenanceCompleted' - :type last_operation_result_code: str or - ~azure.mgmt.compute.v2017_03_30.models.MaintenanceOperationResultCodeTypes - :param last_operation_message: Message returned for the last Maintenance - Operation. - :type last_operation_message: str - """ - - _attribute_map = { - 'is_customer_initiated_maintenance_allowed': {'key': 'isCustomerInitiatedMaintenanceAllowed', 'type': 'bool'}, - 'pre_maintenance_window_start_time': {'key': 'preMaintenanceWindowStartTime', 'type': 'iso-8601'}, - 'pre_maintenance_window_end_time': {'key': 'preMaintenanceWindowEndTime', 'type': 'iso-8601'}, - 'maintenance_window_start_time': {'key': 'maintenanceWindowStartTime', 'type': 'iso-8601'}, - 'maintenance_window_end_time': {'key': 'maintenanceWindowEndTime', 'type': 'iso-8601'}, - 'last_operation_result_code': {'key': 'lastOperationResultCode', 'type': 'MaintenanceOperationResultCodeTypes'}, - 'last_operation_message': {'key': 'lastOperationMessage', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(MaintenanceRedeployStatus, self).__init__(**kwargs) - self.is_customer_initiated_maintenance_allowed = kwargs.get('is_customer_initiated_maintenance_allowed', None) - self.pre_maintenance_window_start_time = kwargs.get('pre_maintenance_window_start_time', None) - self.pre_maintenance_window_end_time = kwargs.get('pre_maintenance_window_end_time', None) - self.maintenance_window_start_time = kwargs.get('maintenance_window_start_time', None) - self.maintenance_window_end_time = kwargs.get('maintenance_window_end_time', None) - self.last_operation_result_code = kwargs.get('last_operation_result_code', None) - self.last_operation_message = kwargs.get('last_operation_message', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/maintenance_redeploy_status_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/maintenance_redeploy_status_py3.py deleted file mode 100644 index 1d3532edebde..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/maintenance_redeploy_status_py3.py +++ /dev/null @@ -1,60 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class MaintenanceRedeployStatus(Model): - """Maintenance Operation Status. - - :param is_customer_initiated_maintenance_allowed: True, if customer is - allowed to perform Maintenance. - :type is_customer_initiated_maintenance_allowed: bool - :param pre_maintenance_window_start_time: Start Time for the Pre - Maintenance Window. - :type pre_maintenance_window_start_time: datetime - :param pre_maintenance_window_end_time: End Time for the Pre Maintenance - Window. - :type pre_maintenance_window_end_time: datetime - :param maintenance_window_start_time: Start Time for the Maintenance - Window. - :type maintenance_window_start_time: datetime - :param maintenance_window_end_time: End Time for the Maintenance Window. - :type maintenance_window_end_time: datetime - :param last_operation_result_code: The Last Maintenance Operation Result - Code. Possible values include: 'None', 'RetryLater', 'MaintenanceAborted', - 'MaintenanceCompleted' - :type last_operation_result_code: str or - ~azure.mgmt.compute.v2017_03_30.models.MaintenanceOperationResultCodeTypes - :param last_operation_message: Message returned for the last Maintenance - Operation. - :type last_operation_message: str - """ - - _attribute_map = { - 'is_customer_initiated_maintenance_allowed': {'key': 'isCustomerInitiatedMaintenanceAllowed', 'type': 'bool'}, - 'pre_maintenance_window_start_time': {'key': 'preMaintenanceWindowStartTime', 'type': 'iso-8601'}, - 'pre_maintenance_window_end_time': {'key': 'preMaintenanceWindowEndTime', 'type': 'iso-8601'}, - 'maintenance_window_start_time': {'key': 'maintenanceWindowStartTime', 'type': 'iso-8601'}, - 'maintenance_window_end_time': {'key': 'maintenanceWindowEndTime', 'type': 'iso-8601'}, - 'last_operation_result_code': {'key': 'lastOperationResultCode', 'type': 'MaintenanceOperationResultCodeTypes'}, - 'last_operation_message': {'key': 'lastOperationMessage', 'type': 'str'}, - } - - def __init__(self, *, is_customer_initiated_maintenance_allowed: bool=None, pre_maintenance_window_start_time=None, pre_maintenance_window_end_time=None, maintenance_window_start_time=None, maintenance_window_end_time=None, last_operation_result_code=None, last_operation_message: str=None, **kwargs) -> None: - super(MaintenanceRedeployStatus, self).__init__(**kwargs) - self.is_customer_initiated_maintenance_allowed = is_customer_initiated_maintenance_allowed - self.pre_maintenance_window_start_time = pre_maintenance_window_start_time - self.pre_maintenance_window_end_time = pre_maintenance_window_end_time - self.maintenance_window_start_time = maintenance_window_start_time - self.maintenance_window_end_time = maintenance_window_end_time - self.last_operation_result_code = last_operation_result_code - self.last_operation_message = last_operation_message diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/managed_disk_parameters.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/managed_disk_parameters.py deleted file mode 100644 index 5bf0757e76a9..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/managed_disk_parameters.py +++ /dev/null @@ -1,34 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .sub_resource import SubResource - - -class ManagedDiskParameters(SubResource): - """The parameters of a managed disk. - - :param id: Resource Id - :type id: str - :param storage_account_type: Specifies the storage account type for the - managed disk. Possible values are: Standard_LRS or Premium_LRS. Possible - values include: 'Standard_LRS', 'Premium_LRS' - :type storage_account_type: str or - ~azure.mgmt.compute.v2017_03_30.models.StorageAccountTypes - """ - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'storage_account_type': {'key': 'storageAccountType', 'type': 'StorageAccountTypes'}, - } - - def __init__(self, **kwargs): - super(ManagedDiskParameters, self).__init__(**kwargs) - self.storage_account_type = kwargs.get('storage_account_type', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/managed_disk_parameters_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/managed_disk_parameters_py3.py deleted file mode 100644 index 16d4a9339b5c..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/managed_disk_parameters_py3.py +++ /dev/null @@ -1,34 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .sub_resource_py3 import SubResource - - -class ManagedDiskParameters(SubResource): - """The parameters of a managed disk. - - :param id: Resource Id - :type id: str - :param storage_account_type: Specifies the storage account type for the - managed disk. Possible values are: Standard_LRS or Premium_LRS. Possible - values include: 'Standard_LRS', 'Premium_LRS' - :type storage_account_type: str or - ~azure.mgmt.compute.v2017_03_30.models.StorageAccountTypes - """ - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'storage_account_type': {'key': 'storageAccountType', 'type': 'StorageAccountTypes'}, - } - - def __init__(self, *, id: str=None, storage_account_type=None, **kwargs) -> None: - super(ManagedDiskParameters, self).__init__(id=id, **kwargs) - self.storage_account_type = storage_account_type diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/network_interface_reference.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/network_interface_reference.py deleted file mode 100644 index b86e305e3f74..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/network_interface_reference.py +++ /dev/null @@ -1,32 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .sub_resource import SubResource - - -class NetworkInterfaceReference(SubResource): - """Describes a network interface reference. - - :param id: Resource Id - :type id: str - :param primary: Specifies the primary network interface in case the - virtual machine has more than 1 network interface. - :type primary: bool - """ - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'primary': {'key': 'properties.primary', 'type': 'bool'}, - } - - def __init__(self, **kwargs): - super(NetworkInterfaceReference, self).__init__(**kwargs) - self.primary = kwargs.get('primary', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/network_interface_reference_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/network_interface_reference_py3.py deleted file mode 100644 index 47da29278832..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/network_interface_reference_py3.py +++ /dev/null @@ -1,32 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .sub_resource_py3 import SubResource - - -class NetworkInterfaceReference(SubResource): - """Describes a network interface reference. - - :param id: Resource Id - :type id: str - :param primary: Specifies the primary network interface in case the - virtual machine has more than 1 network interface. - :type primary: bool - """ - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'primary': {'key': 'properties.primary', 'type': 'bool'}, - } - - def __init__(self, *, id: str=None, primary: bool=None, **kwargs) -> None: - super(NetworkInterfaceReference, self).__init__(id=id, **kwargs) - self.primary = primary diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/network_profile.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/network_profile.py deleted file mode 100644 index fc0a548ab07b..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/network_profile.py +++ /dev/null @@ -1,30 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class NetworkProfile(Model): - """Specifies the network interfaces of the virtual machine. - - :param network_interfaces: Specifies the list of resource Ids for the - network interfaces associated with the virtual machine. - :type network_interfaces: - list[~azure.mgmt.compute.v2017_03_30.models.NetworkInterfaceReference] - """ - - _attribute_map = { - 'network_interfaces': {'key': 'networkInterfaces', 'type': '[NetworkInterfaceReference]'}, - } - - def __init__(self, **kwargs): - super(NetworkProfile, self).__init__(**kwargs) - self.network_interfaces = kwargs.get('network_interfaces', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/network_profile_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/network_profile_py3.py deleted file mode 100644 index f974d8eef777..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/network_profile_py3.py +++ /dev/null @@ -1,30 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class NetworkProfile(Model): - """Specifies the network interfaces of the virtual machine. - - :param network_interfaces: Specifies the list of resource Ids for the - network interfaces associated with the virtual machine. - :type network_interfaces: - list[~azure.mgmt.compute.v2017_03_30.models.NetworkInterfaceReference] - """ - - _attribute_map = { - 'network_interfaces': {'key': 'networkInterfaces', 'type': '[NetworkInterfaceReference]'}, - } - - def __init__(self, *, network_interfaces=None, **kwargs) -> None: - super(NetworkProfile, self).__init__(**kwargs) - self.network_interfaces = network_interfaces diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/operation_status_response.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/operation_status_response.py deleted file mode 100644 index 2a767a845e06..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/operation_status_response.py +++ /dev/null @@ -1,55 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class OperationStatusResponse(Model): - """Operation status response. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar name: Operation ID - :vartype name: str - :ivar status: Operation status - :vartype status: str - :ivar start_time: Start time of the operation - :vartype start_time: datetime - :ivar end_time: End time of the operation - :vartype end_time: datetime - :ivar error: Api error - :vartype error: ~azure.mgmt.compute.v2017_03_30.models.ApiError - """ - - _validation = { - 'name': {'readonly': True}, - 'status': {'readonly': True}, - 'start_time': {'readonly': True}, - 'end_time': {'readonly': True}, - 'error': {'readonly': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'status': {'key': 'status', 'type': 'str'}, - 'start_time': {'key': 'startTime', 'type': 'iso-8601'}, - 'end_time': {'key': 'endTime', 'type': 'iso-8601'}, - 'error': {'key': 'error', 'type': 'ApiError'}, - } - - def __init__(self, **kwargs): - super(OperationStatusResponse, self).__init__(**kwargs) - self.name = None - self.status = None - self.start_time = None - self.end_time = None - self.error = None diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/operation_status_response_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/operation_status_response_py3.py deleted file mode 100644 index 94409eeb6db7..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/operation_status_response_py3.py +++ /dev/null @@ -1,55 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class OperationStatusResponse(Model): - """Operation status response. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar name: Operation ID - :vartype name: str - :ivar status: Operation status - :vartype status: str - :ivar start_time: Start time of the operation - :vartype start_time: datetime - :ivar end_time: End time of the operation - :vartype end_time: datetime - :ivar error: Api error - :vartype error: ~azure.mgmt.compute.v2017_03_30.models.ApiError - """ - - _validation = { - 'name': {'readonly': True}, - 'status': {'readonly': True}, - 'start_time': {'readonly': True}, - 'end_time': {'readonly': True}, - 'error': {'readonly': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'status': {'key': 'status', 'type': 'str'}, - 'start_time': {'key': 'startTime', 'type': 'iso-8601'}, - 'end_time': {'key': 'endTime', 'type': 'iso-8601'}, - 'error': {'key': 'error', 'type': 'ApiError'}, - } - - def __init__(self, **kwargs) -> None: - super(OperationStatusResponse, self).__init__(**kwargs) - self.name = None - self.status = None - self.start_time = None - self.end_time = None - self.error = None diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/os_disk.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/os_disk.py deleted file mode 100644 index fd18571e4bb8..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/os_disk.py +++ /dev/null @@ -1,92 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class OSDisk(Model): - """Specifies information about the operating system disk used by the virtual - machine.

    For more information about disks, see [About disks and - VHDs for Azure virtual - machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-about-disks-vhds?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). - - All required parameters must be populated in order to send to Azure. - - :param os_type: This property allows you to specify the type of the OS - that is included in the disk if creating a VM from user-image or a - specialized VHD.

    Possible values are:

    **Windows** -

    **Linux**. Possible values include: 'Windows', 'Linux' - :type os_type: str or - ~azure.mgmt.compute.v2017_03_30.models.OperatingSystemTypes - :param encryption_settings: Specifies the encryption settings for the OS - Disk.

    Minimum api-version: 2015-06-15 - :type encryption_settings: - ~azure.mgmt.compute.v2017_03_30.models.DiskEncryptionSettings - :param name: The disk name. - :type name: str - :param vhd: The virtual hard disk. - :type vhd: ~azure.mgmt.compute.v2017_03_30.models.VirtualHardDisk - :param image: The source user image virtual hard disk. The virtual hard - disk will be copied before being attached to the virtual machine. If - SourceImage is provided, the destination virtual hard drive must not - exist. - :type image: ~azure.mgmt.compute.v2017_03_30.models.VirtualHardDisk - :param caching: Specifies the caching requirements.

    Possible - values are:

    **None**

    **ReadOnly**

    **ReadWrite** -

    Default: **None for Standard storage. ReadOnly for Premium - storage**. Possible values include: 'None', 'ReadOnly', 'ReadWrite' - :type caching: str or ~azure.mgmt.compute.v2017_03_30.models.CachingTypes - :param create_option: Required. Specifies how the virtual machine should - be created.

    Possible values are:

    **Attach** \\u2013 This - value is used when you are using a specialized disk to create the virtual - machine.

    **FromImage** \\u2013 This value is used when you are - using an image to create the virtual machine. If you are using a platform - image, you also use the imageReference element described above. If you are - using a marketplace image, you also use the plan element previously - described. Possible values include: 'FromImage', 'Empty', 'Attach' - :type create_option: str or - ~azure.mgmt.compute.v2017_03_30.models.DiskCreateOptionTypes - :param disk_size_gb: Specifies the size of an empty data disk in - gigabytes. This element can be used to overwrite the size of the disk in a - virtual machine image.

    This value cannot be larger than 1023 GB - :type disk_size_gb: int - :param managed_disk: The managed disk parameters. - :type managed_disk: - ~azure.mgmt.compute.v2017_03_30.models.ManagedDiskParameters - """ - - _validation = { - 'create_option': {'required': True}, - } - - _attribute_map = { - 'os_type': {'key': 'osType', 'type': 'OperatingSystemTypes'}, - 'encryption_settings': {'key': 'encryptionSettings', 'type': 'DiskEncryptionSettings'}, - 'name': {'key': 'name', 'type': 'str'}, - 'vhd': {'key': 'vhd', 'type': 'VirtualHardDisk'}, - 'image': {'key': 'image', 'type': 'VirtualHardDisk'}, - 'caching': {'key': 'caching', 'type': 'CachingTypes'}, - 'create_option': {'key': 'createOption', 'type': 'DiskCreateOptionTypes'}, - 'disk_size_gb': {'key': 'diskSizeGB', 'type': 'int'}, - 'managed_disk': {'key': 'managedDisk', 'type': 'ManagedDiskParameters'}, - } - - def __init__(self, **kwargs): - super(OSDisk, self).__init__(**kwargs) - self.os_type = kwargs.get('os_type', None) - self.encryption_settings = kwargs.get('encryption_settings', None) - self.name = kwargs.get('name', None) - self.vhd = kwargs.get('vhd', None) - self.image = kwargs.get('image', None) - self.caching = kwargs.get('caching', None) - self.create_option = kwargs.get('create_option', None) - self.disk_size_gb = kwargs.get('disk_size_gb', None) - self.managed_disk = kwargs.get('managed_disk', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/os_disk_image.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/os_disk_image.py deleted file mode 100644 index 41945d80b1eb..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/os_disk_image.py +++ /dev/null @@ -1,36 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class OSDiskImage(Model): - """Contains the os disk image information. - - All required parameters must be populated in order to send to Azure. - - :param operating_system: Required. The operating system of the - osDiskImage. Possible values include: 'Windows', 'Linux' - :type operating_system: str or - ~azure.mgmt.compute.v2017_03_30.models.OperatingSystemTypes - """ - - _validation = { - 'operating_system': {'required': True}, - } - - _attribute_map = { - 'operating_system': {'key': 'operatingSystem', 'type': 'OperatingSystemTypes'}, - } - - def __init__(self, **kwargs): - super(OSDiskImage, self).__init__(**kwargs) - self.operating_system = kwargs.get('operating_system', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/os_disk_image_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/os_disk_image_py3.py deleted file mode 100644 index 0d1a5431f0cf..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/os_disk_image_py3.py +++ /dev/null @@ -1,36 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class OSDiskImage(Model): - """Contains the os disk image information. - - All required parameters must be populated in order to send to Azure. - - :param operating_system: Required. The operating system of the - osDiskImage. Possible values include: 'Windows', 'Linux' - :type operating_system: str or - ~azure.mgmt.compute.v2017_03_30.models.OperatingSystemTypes - """ - - _validation = { - 'operating_system': {'required': True}, - } - - _attribute_map = { - 'operating_system': {'key': 'operatingSystem', 'type': 'OperatingSystemTypes'}, - } - - def __init__(self, *, operating_system, **kwargs) -> None: - super(OSDiskImage, self).__init__(**kwargs) - self.operating_system = operating_system diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/os_disk_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/os_disk_py3.py deleted file mode 100644 index d86663c087e1..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/os_disk_py3.py +++ /dev/null @@ -1,92 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class OSDisk(Model): - """Specifies information about the operating system disk used by the virtual - machine.

    For more information about disks, see [About disks and - VHDs for Azure virtual - machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-about-disks-vhds?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). - - All required parameters must be populated in order to send to Azure. - - :param os_type: This property allows you to specify the type of the OS - that is included in the disk if creating a VM from user-image or a - specialized VHD.

    Possible values are:

    **Windows** -

    **Linux**. Possible values include: 'Windows', 'Linux' - :type os_type: str or - ~azure.mgmt.compute.v2017_03_30.models.OperatingSystemTypes - :param encryption_settings: Specifies the encryption settings for the OS - Disk.

    Minimum api-version: 2015-06-15 - :type encryption_settings: - ~azure.mgmt.compute.v2017_03_30.models.DiskEncryptionSettings - :param name: The disk name. - :type name: str - :param vhd: The virtual hard disk. - :type vhd: ~azure.mgmt.compute.v2017_03_30.models.VirtualHardDisk - :param image: The source user image virtual hard disk. The virtual hard - disk will be copied before being attached to the virtual machine. If - SourceImage is provided, the destination virtual hard drive must not - exist. - :type image: ~azure.mgmt.compute.v2017_03_30.models.VirtualHardDisk - :param caching: Specifies the caching requirements.

    Possible - values are:

    **None**

    **ReadOnly**

    **ReadWrite** -

    Default: **None for Standard storage. ReadOnly for Premium - storage**. Possible values include: 'None', 'ReadOnly', 'ReadWrite' - :type caching: str or ~azure.mgmt.compute.v2017_03_30.models.CachingTypes - :param create_option: Required. Specifies how the virtual machine should - be created.

    Possible values are:

    **Attach** \\u2013 This - value is used when you are using a specialized disk to create the virtual - machine.

    **FromImage** \\u2013 This value is used when you are - using an image to create the virtual machine. If you are using a platform - image, you also use the imageReference element described above. If you are - using a marketplace image, you also use the plan element previously - described. Possible values include: 'FromImage', 'Empty', 'Attach' - :type create_option: str or - ~azure.mgmt.compute.v2017_03_30.models.DiskCreateOptionTypes - :param disk_size_gb: Specifies the size of an empty data disk in - gigabytes. This element can be used to overwrite the size of the disk in a - virtual machine image.

    This value cannot be larger than 1023 GB - :type disk_size_gb: int - :param managed_disk: The managed disk parameters. - :type managed_disk: - ~azure.mgmt.compute.v2017_03_30.models.ManagedDiskParameters - """ - - _validation = { - 'create_option': {'required': True}, - } - - _attribute_map = { - 'os_type': {'key': 'osType', 'type': 'OperatingSystemTypes'}, - 'encryption_settings': {'key': 'encryptionSettings', 'type': 'DiskEncryptionSettings'}, - 'name': {'key': 'name', 'type': 'str'}, - 'vhd': {'key': 'vhd', 'type': 'VirtualHardDisk'}, - 'image': {'key': 'image', 'type': 'VirtualHardDisk'}, - 'caching': {'key': 'caching', 'type': 'CachingTypes'}, - 'create_option': {'key': 'createOption', 'type': 'DiskCreateOptionTypes'}, - 'disk_size_gb': {'key': 'diskSizeGB', 'type': 'int'}, - 'managed_disk': {'key': 'managedDisk', 'type': 'ManagedDiskParameters'}, - } - - def __init__(self, *, create_option, os_type=None, encryption_settings=None, name: str=None, vhd=None, image=None, caching=None, disk_size_gb: int=None, managed_disk=None, **kwargs) -> None: - super(OSDisk, self).__init__(**kwargs) - self.os_type = os_type - self.encryption_settings = encryption_settings - self.name = name - self.vhd = vhd - self.image = image - self.caching = caching - self.create_option = create_option - self.disk_size_gb = disk_size_gb - self.managed_disk = managed_disk diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/os_profile.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/os_profile.py deleted file mode 100644 index af80d9865033..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/os_profile.py +++ /dev/null @@ -1,100 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class OSProfile(Model): - """Specifies the operating system settings for the virtual machine. - - :param computer_name: Specifies the host OS name of the virtual machine. -

    This name cannot be updated after the VM is created.

    - **Max-length (Windows):** 15 characters

    **Max-length (Linux):** - 64 characters.

    For naming conventions and restrictions see [Azure - infrastructure services implementation - guidelines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-infrastructure-subscription-accounts-guidelines?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json#1-naming-conventions). - :type computer_name: str - :param admin_username: Specifies the name of the administrator account. -

    **Windows-only restriction:** Cannot end in "."

    - **Disallowed values:** "administrator", "admin", "user", "user1", "test", - "user2", "test1", "user3", "admin1", "1", "123", "a", "actuser", "adm", - "admin2", "aspnet", "backup", "console", "david", "guest", "john", - "owner", "root", "server", "sql", "support", "support_388945a0", "sys", - "test2", "test3", "user4", "user5".

    **Minimum-length (Linux):** 1 - character

    **Max-length (Linux):** 64 characters

    - **Max-length (Windows):** 20 characters

  • For root access to - the Linux VM, see [Using root privileges on Linux virtual machines in - Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-use-root-privileges?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json)
  • - For a list of built-in system users on Linux that should not be used in - this field, see [Selecting User Names for Linux on - Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-usernames?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json) - :type admin_username: str - :param admin_password: Specifies the password of the administrator - account.

    **Minimum-length (Windows):** 8 characters

    - **Minimum-length (Linux):** 6 characters

    **Max-length - (Windows):** 123 characters

    **Max-length (Linux):** 72 characters -

    **Complexity requirements:** 3 out of 4 conditions below need to - be fulfilled
    Has lower characters
    Has upper characters
    Has a - digit
    Has a special character (Regex match [\\W_])

    - **Disallowed values:** "abc@123", "P@$$w0rd", "P@ssw0rd", "P@ssword123", - "Pa$$word", "pass@word1", "Password!", "Password1", "Password22", - "iloveyou!"

    For resetting the password, see [How to reset the - Remote Desktop service or its login password in a Windows - VM](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-reset-rdp?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json) -

    For resetting root password, see [Manage users, SSH, and check or - repair disks on Azure Linux VMs using the VMAccess - Extension](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-using-vmaccess-extension?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json#reset-root-password) - :type admin_password: str - :param custom_data: Specifies a base-64 encoded string of custom data. The - base-64 encoded string is decoded to a binary array that is saved as a - file on the Virtual Machine. The maximum length of the binary array is - 65535 bytes.

    For using cloud-init for your VM, see [Using - cloud-init to customize a Linux VM during - creation](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-using-cloud-init?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json) - :type custom_data: str - :param windows_configuration: Specifies Windows operating system settings - on the virtual machine. - :type windows_configuration: - ~azure.mgmt.compute.v2017_03_30.models.WindowsConfiguration - :param linux_configuration: Specifies the Linux operating system settings - on the virtual machine.

    For a list of supported Linux - distributions, see [Linux on Azure-Endorsed - Distributions](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-endorsed-distros?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json) -

    For running non-endorsed distributions, see [Information for - Non-Endorsed - Distributions](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-create-upload-generic?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json). - :type linux_configuration: - ~azure.mgmt.compute.v2017_03_30.models.LinuxConfiguration - :param secrets: Specifies set of certificates that should be installed - onto the virtual machine. - :type secrets: - list[~azure.mgmt.compute.v2017_03_30.models.VaultSecretGroup] - """ - - _attribute_map = { - 'computer_name': {'key': 'computerName', 'type': 'str'}, - 'admin_username': {'key': 'adminUsername', 'type': 'str'}, - 'admin_password': {'key': 'adminPassword', 'type': 'str'}, - 'custom_data': {'key': 'customData', 'type': 'str'}, - 'windows_configuration': {'key': 'windowsConfiguration', 'type': 'WindowsConfiguration'}, - 'linux_configuration': {'key': 'linuxConfiguration', 'type': 'LinuxConfiguration'}, - 'secrets': {'key': 'secrets', 'type': '[VaultSecretGroup]'}, - } - - def __init__(self, **kwargs): - super(OSProfile, self).__init__(**kwargs) - self.computer_name = kwargs.get('computer_name', None) - self.admin_username = kwargs.get('admin_username', None) - self.admin_password = kwargs.get('admin_password', None) - self.custom_data = kwargs.get('custom_data', None) - self.windows_configuration = kwargs.get('windows_configuration', None) - self.linux_configuration = kwargs.get('linux_configuration', None) - self.secrets = kwargs.get('secrets', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/os_profile_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/os_profile_py3.py deleted file mode 100644 index a23215809fc1..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/os_profile_py3.py +++ /dev/null @@ -1,100 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class OSProfile(Model): - """Specifies the operating system settings for the virtual machine. - - :param computer_name: Specifies the host OS name of the virtual machine. -

    This name cannot be updated after the VM is created.

    - **Max-length (Windows):** 15 characters

    **Max-length (Linux):** - 64 characters.

    For naming conventions and restrictions see [Azure - infrastructure services implementation - guidelines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-infrastructure-subscription-accounts-guidelines?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json#1-naming-conventions). - :type computer_name: str - :param admin_username: Specifies the name of the administrator account. -

    **Windows-only restriction:** Cannot end in "."

    - **Disallowed values:** "administrator", "admin", "user", "user1", "test", - "user2", "test1", "user3", "admin1", "1", "123", "a", "actuser", "adm", - "admin2", "aspnet", "backup", "console", "david", "guest", "john", - "owner", "root", "server", "sql", "support", "support_388945a0", "sys", - "test2", "test3", "user4", "user5".

    **Minimum-length (Linux):** 1 - character

    **Max-length (Linux):** 64 characters

    - **Max-length (Windows):** 20 characters

  • For root access to - the Linux VM, see [Using root privileges on Linux virtual machines in - Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-use-root-privileges?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json)
  • - For a list of built-in system users on Linux that should not be used in - this field, see [Selecting User Names for Linux on - Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-usernames?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json) - :type admin_username: str - :param admin_password: Specifies the password of the administrator - account.

    **Minimum-length (Windows):** 8 characters

    - **Minimum-length (Linux):** 6 characters

    **Max-length - (Windows):** 123 characters

    **Max-length (Linux):** 72 characters -

    **Complexity requirements:** 3 out of 4 conditions below need to - be fulfilled
    Has lower characters
    Has upper characters
    Has a - digit
    Has a special character (Regex match [\\W_])

    - **Disallowed values:** "abc@123", "P@$$w0rd", "P@ssw0rd", "P@ssword123", - "Pa$$word", "pass@word1", "Password!", "Password1", "Password22", - "iloveyou!"

    For resetting the password, see [How to reset the - Remote Desktop service or its login password in a Windows - VM](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-reset-rdp?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json) -

    For resetting root password, see [Manage users, SSH, and check or - repair disks on Azure Linux VMs using the VMAccess - Extension](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-using-vmaccess-extension?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json#reset-root-password) - :type admin_password: str - :param custom_data: Specifies a base-64 encoded string of custom data. The - base-64 encoded string is decoded to a binary array that is saved as a - file on the Virtual Machine. The maximum length of the binary array is - 65535 bytes.

    For using cloud-init for your VM, see [Using - cloud-init to customize a Linux VM during - creation](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-using-cloud-init?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json) - :type custom_data: str - :param windows_configuration: Specifies Windows operating system settings - on the virtual machine. - :type windows_configuration: - ~azure.mgmt.compute.v2017_03_30.models.WindowsConfiguration - :param linux_configuration: Specifies the Linux operating system settings - on the virtual machine.

    For a list of supported Linux - distributions, see [Linux on Azure-Endorsed - Distributions](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-endorsed-distros?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json) -

    For running non-endorsed distributions, see [Information for - Non-Endorsed - Distributions](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-create-upload-generic?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json). - :type linux_configuration: - ~azure.mgmt.compute.v2017_03_30.models.LinuxConfiguration - :param secrets: Specifies set of certificates that should be installed - onto the virtual machine. - :type secrets: - list[~azure.mgmt.compute.v2017_03_30.models.VaultSecretGroup] - """ - - _attribute_map = { - 'computer_name': {'key': 'computerName', 'type': 'str'}, - 'admin_username': {'key': 'adminUsername', 'type': 'str'}, - 'admin_password': {'key': 'adminPassword', 'type': 'str'}, - 'custom_data': {'key': 'customData', 'type': 'str'}, - 'windows_configuration': {'key': 'windowsConfiguration', 'type': 'WindowsConfiguration'}, - 'linux_configuration': {'key': 'linuxConfiguration', 'type': 'LinuxConfiguration'}, - 'secrets': {'key': 'secrets', 'type': '[VaultSecretGroup]'}, - } - - def __init__(self, *, computer_name: str=None, admin_username: str=None, admin_password: str=None, custom_data: str=None, windows_configuration=None, linux_configuration=None, secrets=None, **kwargs) -> None: - super(OSProfile, self).__init__(**kwargs) - self.computer_name = computer_name - self.admin_username = admin_username - self.admin_password = admin_password - self.custom_data = custom_data - self.windows_configuration = windows_configuration - self.linux_configuration = linux_configuration - self.secrets = secrets diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/plan.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/plan.py deleted file mode 100644 index d42b6b32cfac..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/plan.py +++ /dev/null @@ -1,46 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class Plan(Model): - """Specifies information about the marketplace image used to create the - virtual machine. This element is only used for marketplace images. Before - you can use a marketplace image from an API, you must enable the image for - programmatic use. In the Azure portal, find the marketplace image that you - want to use and then click **Want to deploy programmatically, Get Started - ->**. Enter any required information and then click **Save**. - - :param name: The plan ID. - :type name: str - :param publisher: The publisher ID. - :type publisher: str - :param product: Specifies the product of the image from the marketplace. - This is the same value as Offer under the imageReference element. - :type product: str - :param promotion_code: The promotion code. - :type promotion_code: str - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'publisher': {'key': 'publisher', 'type': 'str'}, - 'product': {'key': 'product', 'type': 'str'}, - 'promotion_code': {'key': 'promotionCode', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(Plan, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.publisher = kwargs.get('publisher', None) - self.product = kwargs.get('product', None) - self.promotion_code = kwargs.get('promotion_code', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/plan_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/plan_py3.py deleted file mode 100644 index 9cca2c78a123..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/plan_py3.py +++ /dev/null @@ -1,46 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class Plan(Model): - """Specifies information about the marketplace image used to create the - virtual machine. This element is only used for marketplace images. Before - you can use a marketplace image from an API, you must enable the image for - programmatic use. In the Azure portal, find the marketplace image that you - want to use and then click **Want to deploy programmatically, Get Started - ->**. Enter any required information and then click **Save**. - - :param name: The plan ID. - :type name: str - :param publisher: The publisher ID. - :type publisher: str - :param product: Specifies the product of the image from the marketplace. - This is the same value as Offer under the imageReference element. - :type product: str - :param promotion_code: The promotion code. - :type promotion_code: str - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'publisher': {'key': 'publisher', 'type': 'str'}, - 'product': {'key': 'product', 'type': 'str'}, - 'promotion_code': {'key': 'promotionCode', 'type': 'str'}, - } - - def __init__(self, *, name: str=None, publisher: str=None, product: str=None, promotion_code: str=None, **kwargs) -> None: - super(Plan, self).__init__(**kwargs) - self.name = name - self.publisher = publisher - self.product = product - self.promotion_code = promotion_code diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/purchase_plan.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/purchase_plan.py deleted file mode 100644 index 2e1509addca6..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/purchase_plan.py +++ /dev/null @@ -1,47 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class PurchasePlan(Model): - """Used for establishing the purchase context of any 3rd Party artifact - through MarketPlace. - - All required parameters must be populated in order to send to Azure. - - :param publisher: Required. The publisher ID. - :type publisher: str - :param name: Required. The plan ID. - :type name: str - :param product: Required. Specifies the product of the image from the - marketplace. This is the same value as Offer under the imageReference - element. - :type product: str - """ - - _validation = { - 'publisher': {'required': True}, - 'name': {'required': True}, - 'product': {'required': True}, - } - - _attribute_map = { - 'publisher': {'key': 'publisher', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'product': {'key': 'product', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(PurchasePlan, self).__init__(**kwargs) - self.publisher = kwargs.get('publisher', None) - self.name = kwargs.get('name', None) - self.product = kwargs.get('product', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/purchase_plan_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/purchase_plan_py3.py deleted file mode 100644 index 26f7996f1633..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/purchase_plan_py3.py +++ /dev/null @@ -1,47 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class PurchasePlan(Model): - """Used for establishing the purchase context of any 3rd Party artifact - through MarketPlace. - - All required parameters must be populated in order to send to Azure. - - :param publisher: Required. The publisher ID. - :type publisher: str - :param name: Required. The plan ID. - :type name: str - :param product: Required. Specifies the product of the image from the - marketplace. This is the same value as Offer under the imageReference - element. - :type product: str - """ - - _validation = { - 'publisher': {'required': True}, - 'name': {'required': True}, - 'product': {'required': True}, - } - - _attribute_map = { - 'publisher': {'key': 'publisher', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'product': {'key': 'product', 'type': 'str'}, - } - - def __init__(self, *, publisher: str, name: str, product: str, **kwargs) -> None: - super(PurchasePlan, self).__init__(**kwargs) - self.publisher = publisher - self.name = name - self.product = product diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/resource.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/resource.py deleted file mode 100644 index 5dd7d481c685..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/resource.py +++ /dev/null @@ -1,56 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class Resource(Model): - """The Resource model definition. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource Id - :vartype id: str - :ivar name: Resource name - :vartype name: str - :ivar type: Resource type - :vartype type: str - :param location: Required. Resource location - :type location: str - :param tags: Resource tags - :type tags: dict[str, str] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - } - - def __init__(self, **kwargs): - super(Resource, self).__init__(**kwargs) - self.id = None - self.name = None - self.type = None - self.location = kwargs.get('location', None) - self.tags = kwargs.get('tags', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/resource_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/resource_py3.py deleted file mode 100644 index 2f3702caf609..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/resource_py3.py +++ /dev/null @@ -1,56 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class Resource(Model): - """The Resource model definition. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource Id - :vartype id: str - :ivar name: Resource name - :vartype name: str - :ivar type: Resource type - :vartype type: str - :param location: Required. Resource location - :type location: str - :param tags: Resource tags - :type tags: dict[str, str] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - } - - def __init__(self, *, location: str, tags=None, **kwargs) -> None: - super(Resource, self).__init__(**kwargs) - self.id = None - self.name = None - self.type = None - self.location = location - self.tags = tags diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/resource_sku.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/resource_sku.py deleted file mode 100644 index 894acd3c6c97..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/resource_sku.py +++ /dev/null @@ -1,96 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ResourceSku(Model): - """Describes an available Compute SKU. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar resource_type: The type of resource the SKU applies to. - :vartype resource_type: str - :ivar name: The name of SKU. - :vartype name: str - :ivar tier: Specifies the tier of virtual machines in a scale set.

    Possible Values:

    **Standard**

    **Basic** - :vartype tier: str - :ivar size: The Size of the SKU. - :vartype size: str - :ivar family: The Family of this particular SKU. - :vartype family: str - :ivar kind: The Kind of resources that are supported in this SKU. - :vartype kind: str - :ivar capacity: Specifies the number of virtual machines in the scale set. - :vartype capacity: - ~azure.mgmt.compute.v2017_03_30.models.ResourceSkuCapacity - :ivar locations: The set of locations that the SKU is available. - :vartype locations: list[str] - :ivar api_versions: The api versions that support this SKU. - :vartype api_versions: list[str] - :ivar costs: Metadata for retrieving price info. - :vartype costs: - list[~azure.mgmt.compute.v2017_03_30.models.ResourceSkuCosts] - :ivar capabilities: A name value pair to describe the capability. - :vartype capabilities: - list[~azure.mgmt.compute.v2017_03_30.models.ResourceSkuCapabilities] - :ivar restrictions: The restrictions because of which SKU cannot be used. - This is empty if there are no restrictions. - :vartype restrictions: - list[~azure.mgmt.compute.v2017_03_30.models.ResourceSkuRestrictions] - """ - - _validation = { - 'resource_type': {'readonly': True}, - 'name': {'readonly': True}, - 'tier': {'readonly': True}, - 'size': {'readonly': True}, - 'family': {'readonly': True}, - 'kind': {'readonly': True}, - 'capacity': {'readonly': True}, - 'locations': {'readonly': True}, - 'api_versions': {'readonly': True}, - 'costs': {'readonly': True}, - 'capabilities': {'readonly': True}, - 'restrictions': {'readonly': True}, - } - - _attribute_map = { - 'resource_type': {'key': 'resourceType', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'tier': {'key': 'tier', 'type': 'str'}, - 'size': {'key': 'size', 'type': 'str'}, - 'family': {'key': 'family', 'type': 'str'}, - 'kind': {'key': 'kind', 'type': 'str'}, - 'capacity': {'key': 'capacity', 'type': 'ResourceSkuCapacity'}, - 'locations': {'key': 'locations', 'type': '[str]'}, - 'api_versions': {'key': 'apiVersions', 'type': '[str]'}, - 'costs': {'key': 'costs', 'type': '[ResourceSkuCosts]'}, - 'capabilities': {'key': 'capabilities', 'type': '[ResourceSkuCapabilities]'}, - 'restrictions': {'key': 'restrictions', 'type': '[ResourceSkuRestrictions]'}, - } - - def __init__(self, **kwargs): - super(ResourceSku, self).__init__(**kwargs) - self.resource_type = None - self.name = None - self.tier = None - self.size = None - self.family = None - self.kind = None - self.capacity = None - self.locations = None - self.api_versions = None - self.costs = None - self.capabilities = None - self.restrictions = None diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/resource_sku_capabilities.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/resource_sku_capabilities.py deleted file mode 100644 index 658167afc6d4..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/resource_sku_capabilities.py +++ /dev/null @@ -1,40 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ResourceSkuCapabilities(Model): - """Describes The SKU capabilities object. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar name: An invariant to describe the feature. - :vartype name: str - :ivar value: An invariant if the feature is measured by quantity. - :vartype value: str - """ - - _validation = { - 'name': {'readonly': True}, - 'value': {'readonly': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'value': {'key': 'value', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ResourceSkuCapabilities, self).__init__(**kwargs) - self.name = None - self.value = None diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/resource_sku_capabilities_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/resource_sku_capabilities_py3.py deleted file mode 100644 index 73a2631fc0aa..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/resource_sku_capabilities_py3.py +++ /dev/null @@ -1,40 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ResourceSkuCapabilities(Model): - """Describes The SKU capabilities object. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar name: An invariant to describe the feature. - :vartype name: str - :ivar value: An invariant if the feature is measured by quantity. - :vartype value: str - """ - - _validation = { - 'name': {'readonly': True}, - 'value': {'readonly': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'value': {'key': 'value', 'type': 'str'}, - } - - def __init__(self, **kwargs) -> None: - super(ResourceSkuCapabilities, self).__init__(**kwargs) - self.name = None - self.value = None diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/resource_sku_capacity.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/resource_sku_capacity.py deleted file mode 100644 index 38eb0d5c8764..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/resource_sku_capacity.py +++ /dev/null @@ -1,52 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ResourceSkuCapacity(Model): - """Describes scaling information of a SKU. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar minimum: The minimum capacity. - :vartype minimum: long - :ivar maximum: The maximum capacity that can be set. - :vartype maximum: long - :ivar default: The default capacity. - :vartype default: long - :ivar scale_type: The scale type applicable to the sku. Possible values - include: 'Automatic', 'Manual', 'None' - :vartype scale_type: str or - ~azure.mgmt.compute.v2017_03_30.models.ResourceSkuCapacityScaleType - """ - - _validation = { - 'minimum': {'readonly': True}, - 'maximum': {'readonly': True}, - 'default': {'readonly': True}, - 'scale_type': {'readonly': True}, - } - - _attribute_map = { - 'minimum': {'key': 'minimum', 'type': 'long'}, - 'maximum': {'key': 'maximum', 'type': 'long'}, - 'default': {'key': 'default', 'type': 'long'}, - 'scale_type': {'key': 'scaleType', 'type': 'ResourceSkuCapacityScaleType'}, - } - - def __init__(self, **kwargs): - super(ResourceSkuCapacity, self).__init__(**kwargs) - self.minimum = None - self.maximum = None - self.default = None - self.scale_type = None diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/resource_sku_capacity_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/resource_sku_capacity_py3.py deleted file mode 100644 index 7117ed227846..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/resource_sku_capacity_py3.py +++ /dev/null @@ -1,52 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ResourceSkuCapacity(Model): - """Describes scaling information of a SKU. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar minimum: The minimum capacity. - :vartype minimum: long - :ivar maximum: The maximum capacity that can be set. - :vartype maximum: long - :ivar default: The default capacity. - :vartype default: long - :ivar scale_type: The scale type applicable to the sku. Possible values - include: 'Automatic', 'Manual', 'None' - :vartype scale_type: str or - ~azure.mgmt.compute.v2017_03_30.models.ResourceSkuCapacityScaleType - """ - - _validation = { - 'minimum': {'readonly': True}, - 'maximum': {'readonly': True}, - 'default': {'readonly': True}, - 'scale_type': {'readonly': True}, - } - - _attribute_map = { - 'minimum': {'key': 'minimum', 'type': 'long'}, - 'maximum': {'key': 'maximum', 'type': 'long'}, - 'default': {'key': 'default', 'type': 'long'}, - 'scale_type': {'key': 'scaleType', 'type': 'ResourceSkuCapacityScaleType'}, - } - - def __init__(self, **kwargs) -> None: - super(ResourceSkuCapacity, self).__init__(**kwargs) - self.minimum = None - self.maximum = None - self.default = None - self.scale_type = None diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/resource_sku_costs.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/resource_sku_costs.py deleted file mode 100644 index 293adaf0962c..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/resource_sku_costs.py +++ /dev/null @@ -1,45 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ResourceSkuCosts(Model): - """Describes metadata for retrieving price info. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar meter_id: Used for querying price from commerce. - :vartype meter_id: str - :ivar quantity: The multiplier is needed to extend the base metered cost. - :vartype quantity: long - :ivar extended_unit: An invariant to show the extended unit. - :vartype extended_unit: str - """ - - _validation = { - 'meter_id': {'readonly': True}, - 'quantity': {'readonly': True}, - 'extended_unit': {'readonly': True}, - } - - _attribute_map = { - 'meter_id': {'key': 'meterID', 'type': 'str'}, - 'quantity': {'key': 'quantity', 'type': 'long'}, - 'extended_unit': {'key': 'extendedUnit', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ResourceSkuCosts, self).__init__(**kwargs) - self.meter_id = None - self.quantity = None - self.extended_unit = None diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/resource_sku_costs_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/resource_sku_costs_py3.py deleted file mode 100644 index 59e7036807d6..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/resource_sku_costs_py3.py +++ /dev/null @@ -1,45 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ResourceSkuCosts(Model): - """Describes metadata for retrieving price info. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar meter_id: Used for querying price from commerce. - :vartype meter_id: str - :ivar quantity: The multiplier is needed to extend the base metered cost. - :vartype quantity: long - :ivar extended_unit: An invariant to show the extended unit. - :vartype extended_unit: str - """ - - _validation = { - 'meter_id': {'readonly': True}, - 'quantity': {'readonly': True}, - 'extended_unit': {'readonly': True}, - } - - _attribute_map = { - 'meter_id': {'key': 'meterID', 'type': 'str'}, - 'quantity': {'key': 'quantity', 'type': 'long'}, - 'extended_unit': {'key': 'extendedUnit', 'type': 'str'}, - } - - def __init__(self, **kwargs) -> None: - super(ResourceSkuCosts, self).__init__(**kwargs) - self.meter_id = None - self.quantity = None - self.extended_unit = None diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/resource_sku_paged.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/resource_sku_paged.py deleted file mode 100644 index 7ec1fe3ac3f2..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/resource_sku_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class ResourceSkuPaged(Paged): - """ - A paging container for iterating over a list of :class:`ResourceSku ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[ResourceSku]'} - } - - def __init__(self, *args, **kwargs): - - super(ResourceSkuPaged, self).__init__(*args, **kwargs) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/resource_sku_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/resource_sku_py3.py deleted file mode 100644 index 85fc2af934d3..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/resource_sku_py3.py +++ /dev/null @@ -1,96 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ResourceSku(Model): - """Describes an available Compute SKU. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar resource_type: The type of resource the SKU applies to. - :vartype resource_type: str - :ivar name: The name of SKU. - :vartype name: str - :ivar tier: Specifies the tier of virtual machines in a scale set.

    Possible Values:

    **Standard**

    **Basic** - :vartype tier: str - :ivar size: The Size of the SKU. - :vartype size: str - :ivar family: The Family of this particular SKU. - :vartype family: str - :ivar kind: The Kind of resources that are supported in this SKU. - :vartype kind: str - :ivar capacity: Specifies the number of virtual machines in the scale set. - :vartype capacity: - ~azure.mgmt.compute.v2017_03_30.models.ResourceSkuCapacity - :ivar locations: The set of locations that the SKU is available. - :vartype locations: list[str] - :ivar api_versions: The api versions that support this SKU. - :vartype api_versions: list[str] - :ivar costs: Metadata for retrieving price info. - :vartype costs: - list[~azure.mgmt.compute.v2017_03_30.models.ResourceSkuCosts] - :ivar capabilities: A name value pair to describe the capability. - :vartype capabilities: - list[~azure.mgmt.compute.v2017_03_30.models.ResourceSkuCapabilities] - :ivar restrictions: The restrictions because of which SKU cannot be used. - This is empty if there are no restrictions. - :vartype restrictions: - list[~azure.mgmt.compute.v2017_03_30.models.ResourceSkuRestrictions] - """ - - _validation = { - 'resource_type': {'readonly': True}, - 'name': {'readonly': True}, - 'tier': {'readonly': True}, - 'size': {'readonly': True}, - 'family': {'readonly': True}, - 'kind': {'readonly': True}, - 'capacity': {'readonly': True}, - 'locations': {'readonly': True}, - 'api_versions': {'readonly': True}, - 'costs': {'readonly': True}, - 'capabilities': {'readonly': True}, - 'restrictions': {'readonly': True}, - } - - _attribute_map = { - 'resource_type': {'key': 'resourceType', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'tier': {'key': 'tier', 'type': 'str'}, - 'size': {'key': 'size', 'type': 'str'}, - 'family': {'key': 'family', 'type': 'str'}, - 'kind': {'key': 'kind', 'type': 'str'}, - 'capacity': {'key': 'capacity', 'type': 'ResourceSkuCapacity'}, - 'locations': {'key': 'locations', 'type': '[str]'}, - 'api_versions': {'key': 'apiVersions', 'type': '[str]'}, - 'costs': {'key': 'costs', 'type': '[ResourceSkuCosts]'}, - 'capabilities': {'key': 'capabilities', 'type': '[ResourceSkuCapabilities]'}, - 'restrictions': {'key': 'restrictions', 'type': '[ResourceSkuRestrictions]'}, - } - - def __init__(self, **kwargs) -> None: - super(ResourceSku, self).__init__(**kwargs) - self.resource_type = None - self.name = None - self.tier = None - self.size = None - self.family = None - self.kind = None - self.capacity = None - self.locations = None - self.api_versions = None - self.costs = None - self.capabilities = None - self.restrictions = None diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/resource_sku_restrictions.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/resource_sku_restrictions.py deleted file mode 100644 index fb13a519b831..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/resource_sku_restrictions.py +++ /dev/null @@ -1,49 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ResourceSkuRestrictions(Model): - """Describes scaling information of a SKU. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar type: The type of restrictions. Possible values include: 'Location' - :vartype type: str or - ~azure.mgmt.compute.v2017_03_30.models.ResourceSkuRestrictionsType - :ivar values: The value of restrictions. If the restriction type is set to - location. This would be different locations where the SKU is restricted. - :vartype values: list[str] - :ivar reason_code: The reason for restriction. Possible values include: - 'QuotaId', 'NotAvailableForSubscription' - :vartype reason_code: str or - ~azure.mgmt.compute.v2017_03_30.models.ResourceSkuRestrictionsReasonCode - """ - - _validation = { - 'type': {'readonly': True}, - 'values': {'readonly': True}, - 'reason_code': {'readonly': True}, - } - - _attribute_map = { - 'type': {'key': 'type', 'type': 'ResourceSkuRestrictionsType'}, - 'values': {'key': 'values', 'type': '[str]'}, - 'reason_code': {'key': 'reasonCode', 'type': 'ResourceSkuRestrictionsReasonCode'}, - } - - def __init__(self, **kwargs): - super(ResourceSkuRestrictions, self).__init__(**kwargs) - self.type = None - self.values = None - self.reason_code = None diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/resource_sku_restrictions_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/resource_sku_restrictions_py3.py deleted file mode 100644 index 9a4296e74dd0..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/resource_sku_restrictions_py3.py +++ /dev/null @@ -1,49 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ResourceSkuRestrictions(Model): - """Describes scaling information of a SKU. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar type: The type of restrictions. Possible values include: 'Location' - :vartype type: str or - ~azure.mgmt.compute.v2017_03_30.models.ResourceSkuRestrictionsType - :ivar values: The value of restrictions. If the restriction type is set to - location. This would be different locations where the SKU is restricted. - :vartype values: list[str] - :ivar reason_code: The reason for restriction. Possible values include: - 'QuotaId', 'NotAvailableForSubscription' - :vartype reason_code: str or - ~azure.mgmt.compute.v2017_03_30.models.ResourceSkuRestrictionsReasonCode - """ - - _validation = { - 'type': {'readonly': True}, - 'values': {'readonly': True}, - 'reason_code': {'readonly': True}, - } - - _attribute_map = { - 'type': {'key': 'type', 'type': 'ResourceSkuRestrictionsType'}, - 'values': {'key': 'values', 'type': '[str]'}, - 'reason_code': {'key': 'reasonCode', 'type': 'ResourceSkuRestrictionsReasonCode'}, - } - - def __init__(self, **kwargs) -> None: - super(ResourceSkuRestrictions, self).__init__(**kwargs) - self.type = None - self.values = None - self.reason_code = None diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/resource_update.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/resource_update.py deleted file mode 100644 index 949f11d6d91a..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/resource_update.py +++ /dev/null @@ -1,32 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ResourceUpdate(Model): - """The Resource model definition. - - :param tags: Resource tags - :type tags: dict[str, str] - :param sku: - :type sku: ~azure.mgmt.compute.v2017_03_30.models.DiskSku - """ - - _attribute_map = { - 'tags': {'key': 'tags', 'type': '{str}'}, - 'sku': {'key': 'sku', 'type': 'DiskSku'}, - } - - def __init__(self, **kwargs): - super(ResourceUpdate, self).__init__(**kwargs) - self.tags = kwargs.get('tags', None) - self.sku = kwargs.get('sku', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/resource_update_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/resource_update_py3.py deleted file mode 100644 index 97d1f52f4e74..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/resource_update_py3.py +++ /dev/null @@ -1,32 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ResourceUpdate(Model): - """The Resource model definition. - - :param tags: Resource tags - :type tags: dict[str, str] - :param sku: - :type sku: ~azure.mgmt.compute.v2017_03_30.models.DiskSku - """ - - _attribute_map = { - 'tags': {'key': 'tags', 'type': '{str}'}, - 'sku': {'key': 'sku', 'type': 'DiskSku'}, - } - - def __init__(self, *, tags=None, sku=None, **kwargs) -> None: - super(ResourceUpdate, self).__init__(**kwargs) - self.tags = tags - self.sku = sku diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/rolling_upgrade_policy.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/rolling_upgrade_policy.py deleted file mode 100644 index 1eecaa5e2e65..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/rolling_upgrade_policy.py +++ /dev/null @@ -1,63 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class RollingUpgradePolicy(Model): - """The configuration parameters used while performing a rolling upgrade. - - :param max_batch_instance_percent: The maximum percent of total virtual - machine instances that will be upgraded simultaneously by the rolling - upgrade in one batch. As this is a maximum, unhealthy instances in - previous or future batches can cause the percentage of instances in a - batch to decrease to ensure higher reliability. The default value for this - parameter is 20%. - :type max_batch_instance_percent: int - :param max_unhealthy_instance_percent: The maximum percentage of the total - virtual machine instances in the scale set that can be simultaneously - unhealthy, either as a result of being upgraded, or by being found in an - unhealthy state by the virtual machine health checks before the rolling - upgrade aborts. This constraint will be checked prior to starting any - batch. The default value for this parameter is 20%. - :type max_unhealthy_instance_percent: int - :param max_unhealthy_upgraded_instance_percent: The maximum percentage of - upgraded virtual machine instances that can be found to be in an unhealthy - state. This check will happen after each batch is upgraded. If this - percentage is ever exceeded, the rolling update aborts. The default value - for this parameter is 20%. - :type max_unhealthy_upgraded_instance_percent: int - :param pause_time_between_batches: The wait time between completing the - update for all virtual machines in one batch and starting the next batch. - The time duration should be specified in ISO 8601 format. The default - value is 0 seconds (PT0S). - :type pause_time_between_batches: str - """ - - _validation = { - 'max_batch_instance_percent': {'maximum': 100, 'minimum': 5}, - 'max_unhealthy_instance_percent': {'maximum': 100, 'minimum': 5}, - 'max_unhealthy_upgraded_instance_percent': {'maximum': 100, 'minimum': 0}, - } - - _attribute_map = { - 'max_batch_instance_percent': {'key': 'maxBatchInstancePercent', 'type': 'int'}, - 'max_unhealthy_instance_percent': {'key': 'maxUnhealthyInstancePercent', 'type': 'int'}, - 'max_unhealthy_upgraded_instance_percent': {'key': 'maxUnhealthyUpgradedInstancePercent', 'type': 'int'}, - 'pause_time_between_batches': {'key': 'pauseTimeBetweenBatches', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(RollingUpgradePolicy, self).__init__(**kwargs) - self.max_batch_instance_percent = kwargs.get('max_batch_instance_percent', None) - self.max_unhealthy_instance_percent = kwargs.get('max_unhealthy_instance_percent', None) - self.max_unhealthy_upgraded_instance_percent = kwargs.get('max_unhealthy_upgraded_instance_percent', None) - self.pause_time_between_batches = kwargs.get('pause_time_between_batches', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/rolling_upgrade_policy_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/rolling_upgrade_policy_py3.py deleted file mode 100644 index e698a382f112..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/rolling_upgrade_policy_py3.py +++ /dev/null @@ -1,63 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class RollingUpgradePolicy(Model): - """The configuration parameters used while performing a rolling upgrade. - - :param max_batch_instance_percent: The maximum percent of total virtual - machine instances that will be upgraded simultaneously by the rolling - upgrade in one batch. As this is a maximum, unhealthy instances in - previous or future batches can cause the percentage of instances in a - batch to decrease to ensure higher reliability. The default value for this - parameter is 20%. - :type max_batch_instance_percent: int - :param max_unhealthy_instance_percent: The maximum percentage of the total - virtual machine instances in the scale set that can be simultaneously - unhealthy, either as a result of being upgraded, or by being found in an - unhealthy state by the virtual machine health checks before the rolling - upgrade aborts. This constraint will be checked prior to starting any - batch. The default value for this parameter is 20%. - :type max_unhealthy_instance_percent: int - :param max_unhealthy_upgraded_instance_percent: The maximum percentage of - upgraded virtual machine instances that can be found to be in an unhealthy - state. This check will happen after each batch is upgraded. If this - percentage is ever exceeded, the rolling update aborts. The default value - for this parameter is 20%. - :type max_unhealthy_upgraded_instance_percent: int - :param pause_time_between_batches: The wait time between completing the - update for all virtual machines in one batch and starting the next batch. - The time duration should be specified in ISO 8601 format. The default - value is 0 seconds (PT0S). - :type pause_time_between_batches: str - """ - - _validation = { - 'max_batch_instance_percent': {'maximum': 100, 'minimum': 5}, - 'max_unhealthy_instance_percent': {'maximum': 100, 'minimum': 5}, - 'max_unhealthy_upgraded_instance_percent': {'maximum': 100, 'minimum': 0}, - } - - _attribute_map = { - 'max_batch_instance_percent': {'key': 'maxBatchInstancePercent', 'type': 'int'}, - 'max_unhealthy_instance_percent': {'key': 'maxUnhealthyInstancePercent', 'type': 'int'}, - 'max_unhealthy_upgraded_instance_percent': {'key': 'maxUnhealthyUpgradedInstancePercent', 'type': 'int'}, - 'pause_time_between_batches': {'key': 'pauseTimeBetweenBatches', 'type': 'str'}, - } - - def __init__(self, *, max_batch_instance_percent: int=None, max_unhealthy_instance_percent: int=None, max_unhealthy_upgraded_instance_percent: int=None, pause_time_between_batches: str=None, **kwargs) -> None: - super(RollingUpgradePolicy, self).__init__(**kwargs) - self.max_batch_instance_percent = max_batch_instance_percent - self.max_unhealthy_instance_percent = max_unhealthy_instance_percent - self.max_unhealthy_upgraded_instance_percent = max_unhealthy_upgraded_instance_percent - self.pause_time_between_batches = pause_time_between_batches diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/rolling_upgrade_progress_info.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/rolling_upgrade_progress_info.py deleted file mode 100644 index 87e40590e275..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/rolling_upgrade_progress_info.py +++ /dev/null @@ -1,55 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class RollingUpgradeProgressInfo(Model): - """Information about the number of virtual machine instances in each upgrade - state. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar successful_instance_count: The number of instances that have been - successfully upgraded. - :vartype successful_instance_count: int - :ivar failed_instance_count: The number of instances that have failed to - be upgraded successfully. - :vartype failed_instance_count: int - :ivar in_progress_instance_count: The number of instances that are - currently being upgraded. - :vartype in_progress_instance_count: int - :ivar pending_instance_count: The number of instances that have not yet - begun to be upgraded. - :vartype pending_instance_count: int - """ - - _validation = { - 'successful_instance_count': {'readonly': True}, - 'failed_instance_count': {'readonly': True}, - 'in_progress_instance_count': {'readonly': True}, - 'pending_instance_count': {'readonly': True}, - } - - _attribute_map = { - 'successful_instance_count': {'key': 'successfulInstanceCount', 'type': 'int'}, - 'failed_instance_count': {'key': 'failedInstanceCount', 'type': 'int'}, - 'in_progress_instance_count': {'key': 'inProgressInstanceCount', 'type': 'int'}, - 'pending_instance_count': {'key': 'pendingInstanceCount', 'type': 'int'}, - } - - def __init__(self, **kwargs): - super(RollingUpgradeProgressInfo, self).__init__(**kwargs) - self.successful_instance_count = None - self.failed_instance_count = None - self.in_progress_instance_count = None - self.pending_instance_count = None diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/rolling_upgrade_progress_info_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/rolling_upgrade_progress_info_py3.py deleted file mode 100644 index 060abc3063b4..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/rolling_upgrade_progress_info_py3.py +++ /dev/null @@ -1,55 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class RollingUpgradeProgressInfo(Model): - """Information about the number of virtual machine instances in each upgrade - state. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar successful_instance_count: The number of instances that have been - successfully upgraded. - :vartype successful_instance_count: int - :ivar failed_instance_count: The number of instances that have failed to - be upgraded successfully. - :vartype failed_instance_count: int - :ivar in_progress_instance_count: The number of instances that are - currently being upgraded. - :vartype in_progress_instance_count: int - :ivar pending_instance_count: The number of instances that have not yet - begun to be upgraded. - :vartype pending_instance_count: int - """ - - _validation = { - 'successful_instance_count': {'readonly': True}, - 'failed_instance_count': {'readonly': True}, - 'in_progress_instance_count': {'readonly': True}, - 'pending_instance_count': {'readonly': True}, - } - - _attribute_map = { - 'successful_instance_count': {'key': 'successfulInstanceCount', 'type': 'int'}, - 'failed_instance_count': {'key': 'failedInstanceCount', 'type': 'int'}, - 'in_progress_instance_count': {'key': 'inProgressInstanceCount', 'type': 'int'}, - 'pending_instance_count': {'key': 'pendingInstanceCount', 'type': 'int'}, - } - - def __init__(self, **kwargs) -> None: - super(RollingUpgradeProgressInfo, self).__init__(**kwargs) - self.successful_instance_count = None - self.failed_instance_count = None - self.in_progress_instance_count = None - self.pending_instance_count = None diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/rolling_upgrade_running_status.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/rolling_upgrade_running_status.py deleted file mode 100644 index e0ad273c569d..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/rolling_upgrade_running_status.py +++ /dev/null @@ -1,54 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class RollingUpgradeRunningStatus(Model): - """Information about the current running state of the overall upgrade. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar code: Code indicating the current status of the upgrade. Possible - values include: 'RollingForward', 'Cancelled', 'Completed', 'Faulted' - :vartype code: str or - ~azure.mgmt.compute.v2017_03_30.models.RollingUpgradeStatusCode - :ivar start_time: Start time of the upgrade. - :vartype start_time: datetime - :ivar last_action: The last action performed on the rolling upgrade. - Possible values include: 'Start', 'Cancel' - :vartype last_action: str or - ~azure.mgmt.compute.v2017_03_30.models.RollingUpgradeActionType - :ivar last_action_time: Last action time of the upgrade. - :vartype last_action_time: datetime - """ - - _validation = { - 'code': {'readonly': True}, - 'start_time': {'readonly': True}, - 'last_action': {'readonly': True}, - 'last_action_time': {'readonly': True}, - } - - _attribute_map = { - 'code': {'key': 'code', 'type': 'RollingUpgradeStatusCode'}, - 'start_time': {'key': 'startTime', 'type': 'iso-8601'}, - 'last_action': {'key': 'lastAction', 'type': 'RollingUpgradeActionType'}, - 'last_action_time': {'key': 'lastActionTime', 'type': 'iso-8601'}, - } - - def __init__(self, **kwargs): - super(RollingUpgradeRunningStatus, self).__init__(**kwargs) - self.code = None - self.start_time = None - self.last_action = None - self.last_action_time = None diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/rolling_upgrade_running_status_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/rolling_upgrade_running_status_py3.py deleted file mode 100644 index dfc9888b3922..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/rolling_upgrade_running_status_py3.py +++ /dev/null @@ -1,54 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class RollingUpgradeRunningStatus(Model): - """Information about the current running state of the overall upgrade. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar code: Code indicating the current status of the upgrade. Possible - values include: 'RollingForward', 'Cancelled', 'Completed', 'Faulted' - :vartype code: str or - ~azure.mgmt.compute.v2017_03_30.models.RollingUpgradeStatusCode - :ivar start_time: Start time of the upgrade. - :vartype start_time: datetime - :ivar last_action: The last action performed on the rolling upgrade. - Possible values include: 'Start', 'Cancel' - :vartype last_action: str or - ~azure.mgmt.compute.v2017_03_30.models.RollingUpgradeActionType - :ivar last_action_time: Last action time of the upgrade. - :vartype last_action_time: datetime - """ - - _validation = { - 'code': {'readonly': True}, - 'start_time': {'readonly': True}, - 'last_action': {'readonly': True}, - 'last_action_time': {'readonly': True}, - } - - _attribute_map = { - 'code': {'key': 'code', 'type': 'RollingUpgradeStatusCode'}, - 'start_time': {'key': 'startTime', 'type': 'iso-8601'}, - 'last_action': {'key': 'lastAction', 'type': 'RollingUpgradeActionType'}, - 'last_action_time': {'key': 'lastActionTime', 'type': 'iso-8601'}, - } - - def __init__(self, **kwargs) -> None: - super(RollingUpgradeRunningStatus, self).__init__(**kwargs) - self.code = None - self.start_time = None - self.last_action = None - self.last_action_time = None diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/rolling_upgrade_status_info.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/rolling_upgrade_status_info.py deleted file mode 100644 index 6edf813e207b..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/rolling_upgrade_status_info.py +++ /dev/null @@ -1,76 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource import Resource - - -class RollingUpgradeStatusInfo(Resource): - """The status of the latest virtual machine scale set rolling upgrade. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource Id - :vartype id: str - :ivar name: Resource name - :vartype name: str - :ivar type: Resource type - :vartype type: str - :param location: Required. Resource location - :type location: str - :param tags: Resource tags - :type tags: dict[str, str] - :ivar policy: The rolling upgrade policies applied for this upgrade. - :vartype policy: - ~azure.mgmt.compute.v2017_03_30.models.RollingUpgradePolicy - :ivar running_status: Information about the current running state of the - overall upgrade. - :vartype running_status: - ~azure.mgmt.compute.v2017_03_30.models.RollingUpgradeRunningStatus - :ivar progress: Information about the number of virtual machine instances - in each upgrade state. - :vartype progress: - ~azure.mgmt.compute.v2017_03_30.models.RollingUpgradeProgressInfo - :ivar error: Error details for this upgrade, if there are any. - :vartype error: ~azure.mgmt.compute.v2017_03_30.models.ApiError - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - 'policy': {'readonly': True}, - 'running_status': {'readonly': True}, - 'progress': {'readonly': True}, - 'error': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'policy': {'key': 'properties.policy', 'type': 'RollingUpgradePolicy'}, - 'running_status': {'key': 'properties.runningStatus', 'type': 'RollingUpgradeRunningStatus'}, - 'progress': {'key': 'properties.progress', 'type': 'RollingUpgradeProgressInfo'}, - 'error': {'key': 'properties.error', 'type': 'ApiError'}, - } - - def __init__(self, **kwargs): - super(RollingUpgradeStatusInfo, self).__init__(**kwargs) - self.policy = None - self.running_status = None - self.progress = None - self.error = None diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/rolling_upgrade_status_info_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/rolling_upgrade_status_info_py3.py deleted file mode 100644 index f287b4db2e5b..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/rolling_upgrade_status_info_py3.py +++ /dev/null @@ -1,76 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource_py3 import Resource - - -class RollingUpgradeStatusInfo(Resource): - """The status of the latest virtual machine scale set rolling upgrade. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource Id - :vartype id: str - :ivar name: Resource name - :vartype name: str - :ivar type: Resource type - :vartype type: str - :param location: Required. Resource location - :type location: str - :param tags: Resource tags - :type tags: dict[str, str] - :ivar policy: The rolling upgrade policies applied for this upgrade. - :vartype policy: - ~azure.mgmt.compute.v2017_03_30.models.RollingUpgradePolicy - :ivar running_status: Information about the current running state of the - overall upgrade. - :vartype running_status: - ~azure.mgmt.compute.v2017_03_30.models.RollingUpgradeRunningStatus - :ivar progress: Information about the number of virtual machine instances - in each upgrade state. - :vartype progress: - ~azure.mgmt.compute.v2017_03_30.models.RollingUpgradeProgressInfo - :ivar error: Error details for this upgrade, if there are any. - :vartype error: ~azure.mgmt.compute.v2017_03_30.models.ApiError - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - 'policy': {'readonly': True}, - 'running_status': {'readonly': True}, - 'progress': {'readonly': True}, - 'error': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'policy': {'key': 'properties.policy', 'type': 'RollingUpgradePolicy'}, - 'running_status': {'key': 'properties.runningStatus', 'type': 'RollingUpgradeRunningStatus'}, - 'progress': {'key': 'properties.progress', 'type': 'RollingUpgradeProgressInfo'}, - 'error': {'key': 'properties.error', 'type': 'ApiError'}, - } - - def __init__(self, *, location: str, tags=None, **kwargs) -> None: - super(RollingUpgradeStatusInfo, self).__init__(location=location, tags=tags, **kwargs) - self.policy = None - self.running_status = None - self.progress = None - self.error = None diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/run_command_document.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/run_command_document.py deleted file mode 100644 index 7d01415a6686..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/run_command_document.py +++ /dev/null @@ -1,61 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .run_command_document_base import RunCommandDocumentBase - - -class RunCommandDocument(RunCommandDocumentBase): - """Describes the properties of a Run Command. - - All required parameters must be populated in order to send to Azure. - - :param schema: Required. The VM run command schema. - :type schema: str - :param id: Required. The VM run command id. - :type id: str - :param os_type: Required. The Operating System type. Possible values - include: 'Windows', 'Linux' - :type os_type: str or - ~azure.mgmt.compute.v2017_03_30.models.OperatingSystemTypes - :param label: Required. The VM run command label. - :type label: str - :param description: Required. The VM run command description. - :type description: str - :param script: Required. The script to be executed. - :type script: list[str] - :param parameters: The parameters used by the script. - :type parameters: - list[~azure.mgmt.compute.v2017_03_30.models.RunCommandParameterDefinition] - """ - - _validation = { - 'schema': {'required': True}, - 'id': {'required': True}, - 'os_type': {'required': True}, - 'label': {'required': True}, - 'description': {'required': True}, - 'script': {'required': True}, - } - - _attribute_map = { - 'schema': {'key': '$schema', 'type': 'str'}, - 'id': {'key': 'id', 'type': 'str'}, - 'os_type': {'key': 'osType', 'type': 'OperatingSystemTypes'}, - 'label': {'key': 'label', 'type': 'str'}, - 'description': {'key': 'description', 'type': 'str'}, - 'script': {'key': 'script', 'type': '[str]'}, - 'parameters': {'key': 'parameters', 'type': '[RunCommandParameterDefinition]'}, - } - - def __init__(self, **kwargs): - super(RunCommandDocument, self).__init__(**kwargs) - self.script = kwargs.get('script', None) - self.parameters = kwargs.get('parameters', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/run_command_document_base.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/run_command_document_base.py deleted file mode 100644 index b9df22a4daa7..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/run_command_document_base.py +++ /dev/null @@ -1,56 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class RunCommandDocumentBase(Model): - """Describes the properties of a Run Command metadata. - - All required parameters must be populated in order to send to Azure. - - :param schema: Required. The VM run command schema. - :type schema: str - :param id: Required. The VM run command id. - :type id: str - :param os_type: Required. The Operating System type. Possible values - include: 'Windows', 'Linux' - :type os_type: str or - ~azure.mgmt.compute.v2017_03_30.models.OperatingSystemTypes - :param label: Required. The VM run command label. - :type label: str - :param description: Required. The VM run command description. - :type description: str - """ - - _validation = { - 'schema': {'required': True}, - 'id': {'required': True}, - 'os_type': {'required': True}, - 'label': {'required': True}, - 'description': {'required': True}, - } - - _attribute_map = { - 'schema': {'key': '$schema', 'type': 'str'}, - 'id': {'key': 'id', 'type': 'str'}, - 'os_type': {'key': 'osType', 'type': 'OperatingSystemTypes'}, - 'label': {'key': 'label', 'type': 'str'}, - 'description': {'key': 'description', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(RunCommandDocumentBase, self).__init__(**kwargs) - self.schema = kwargs.get('schema', None) - self.id = kwargs.get('id', None) - self.os_type = kwargs.get('os_type', None) - self.label = kwargs.get('label', None) - self.description = kwargs.get('description', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/run_command_document_base_paged.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/run_command_document_base_paged.py deleted file mode 100644 index d94b348d652e..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/run_command_document_base_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class RunCommandDocumentBasePaged(Paged): - """ - A paging container for iterating over a list of :class:`RunCommandDocumentBase ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[RunCommandDocumentBase]'} - } - - def __init__(self, *args, **kwargs): - - super(RunCommandDocumentBasePaged, self).__init__(*args, **kwargs) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/run_command_document_base_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/run_command_document_base_py3.py deleted file mode 100644 index 91c55b1ad7f5..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/run_command_document_base_py3.py +++ /dev/null @@ -1,56 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class RunCommandDocumentBase(Model): - """Describes the properties of a Run Command metadata. - - All required parameters must be populated in order to send to Azure. - - :param schema: Required. The VM run command schema. - :type schema: str - :param id: Required. The VM run command id. - :type id: str - :param os_type: Required. The Operating System type. Possible values - include: 'Windows', 'Linux' - :type os_type: str or - ~azure.mgmt.compute.v2017_03_30.models.OperatingSystemTypes - :param label: Required. The VM run command label. - :type label: str - :param description: Required. The VM run command description. - :type description: str - """ - - _validation = { - 'schema': {'required': True}, - 'id': {'required': True}, - 'os_type': {'required': True}, - 'label': {'required': True}, - 'description': {'required': True}, - } - - _attribute_map = { - 'schema': {'key': '$schema', 'type': 'str'}, - 'id': {'key': 'id', 'type': 'str'}, - 'os_type': {'key': 'osType', 'type': 'OperatingSystemTypes'}, - 'label': {'key': 'label', 'type': 'str'}, - 'description': {'key': 'description', 'type': 'str'}, - } - - def __init__(self, *, schema: str, id: str, os_type, label: str, description: str, **kwargs) -> None: - super(RunCommandDocumentBase, self).__init__(**kwargs) - self.schema = schema - self.id = id - self.os_type = os_type - self.label = label - self.description = description diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/run_command_document_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/run_command_document_py3.py deleted file mode 100644 index 61ac7898e294..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/run_command_document_py3.py +++ /dev/null @@ -1,61 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .run_command_document_base_py3 import RunCommandDocumentBase - - -class RunCommandDocument(RunCommandDocumentBase): - """Describes the properties of a Run Command. - - All required parameters must be populated in order to send to Azure. - - :param schema: Required. The VM run command schema. - :type schema: str - :param id: Required. The VM run command id. - :type id: str - :param os_type: Required. The Operating System type. Possible values - include: 'Windows', 'Linux' - :type os_type: str or - ~azure.mgmt.compute.v2017_03_30.models.OperatingSystemTypes - :param label: Required. The VM run command label. - :type label: str - :param description: Required. The VM run command description. - :type description: str - :param script: Required. The script to be executed. - :type script: list[str] - :param parameters: The parameters used by the script. - :type parameters: - list[~azure.mgmt.compute.v2017_03_30.models.RunCommandParameterDefinition] - """ - - _validation = { - 'schema': {'required': True}, - 'id': {'required': True}, - 'os_type': {'required': True}, - 'label': {'required': True}, - 'description': {'required': True}, - 'script': {'required': True}, - } - - _attribute_map = { - 'schema': {'key': '$schema', 'type': 'str'}, - 'id': {'key': 'id', 'type': 'str'}, - 'os_type': {'key': 'osType', 'type': 'OperatingSystemTypes'}, - 'label': {'key': 'label', 'type': 'str'}, - 'description': {'key': 'description', 'type': 'str'}, - 'script': {'key': 'script', 'type': '[str]'}, - 'parameters': {'key': 'parameters', 'type': '[RunCommandParameterDefinition]'}, - } - - def __init__(self, *, schema: str, id: str, os_type, label: str, description: str, script, parameters=None, **kwargs) -> None: - super(RunCommandDocument, self).__init__(schema=schema, id=id, os_type=os_type, label=label, description=description, **kwargs) - self.script = script - self.parameters = parameters diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/run_command_input.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/run_command_input.py deleted file mode 100644 index b21071138d78..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/run_command_input.py +++ /dev/null @@ -1,44 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class RunCommandInput(Model): - """Capture Virtual Machine parameters. - - All required parameters must be populated in order to send to Azure. - - :param command_id: Required. The run command id. - :type command_id: str - :param script: Optional. The script to be executed. When this value is - given, the given script will override the default script of the command. - :type script: list[str] - :param parameters: The run command parameters. - :type parameters: - list[~azure.mgmt.compute.v2017_03_30.models.RunCommandInputParameter] - """ - - _validation = { - 'command_id': {'required': True}, - } - - _attribute_map = { - 'command_id': {'key': 'commandId', 'type': 'str'}, - 'script': {'key': 'script', 'type': '[str]'}, - 'parameters': {'key': 'parameters', 'type': '[RunCommandInputParameter]'}, - } - - def __init__(self, **kwargs): - super(RunCommandInput, self).__init__(**kwargs) - self.command_id = kwargs.get('command_id', None) - self.script = kwargs.get('script', None) - self.parameters = kwargs.get('parameters', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/run_command_input_parameter.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/run_command_input_parameter.py deleted file mode 100644 index cd76ad81bfa2..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/run_command_input_parameter.py +++ /dev/null @@ -1,39 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class RunCommandInputParameter(Model): - """Describes the properties of a run command parameter. - - All required parameters must be populated in order to send to Azure. - - :param name: Required. The run command parameter name. - :type name: str - :param value: Required. The run command parameter value. - :type value: str - """ - - _validation = { - 'name': {'required': True}, - 'value': {'required': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'value': {'key': 'value', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(RunCommandInputParameter, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.value = kwargs.get('value', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/run_command_input_parameter_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/run_command_input_parameter_py3.py deleted file mode 100644 index 6013f038a1c3..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/run_command_input_parameter_py3.py +++ /dev/null @@ -1,39 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class RunCommandInputParameter(Model): - """Describes the properties of a run command parameter. - - All required parameters must be populated in order to send to Azure. - - :param name: Required. The run command parameter name. - :type name: str - :param value: Required. The run command parameter value. - :type value: str - """ - - _validation = { - 'name': {'required': True}, - 'value': {'required': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'value': {'key': 'value', 'type': 'str'}, - } - - def __init__(self, *, name: str, value: str, **kwargs) -> None: - super(RunCommandInputParameter, self).__init__(**kwargs) - self.name = name - self.value = value diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/run_command_input_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/run_command_input_py3.py deleted file mode 100644 index ea92282275ce..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/run_command_input_py3.py +++ /dev/null @@ -1,44 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class RunCommandInput(Model): - """Capture Virtual Machine parameters. - - All required parameters must be populated in order to send to Azure. - - :param command_id: Required. The run command id. - :type command_id: str - :param script: Optional. The script to be executed. When this value is - given, the given script will override the default script of the command. - :type script: list[str] - :param parameters: The run command parameters. - :type parameters: - list[~azure.mgmt.compute.v2017_03_30.models.RunCommandInputParameter] - """ - - _validation = { - 'command_id': {'required': True}, - } - - _attribute_map = { - 'command_id': {'key': 'commandId', 'type': 'str'}, - 'script': {'key': 'script', 'type': '[str]'}, - 'parameters': {'key': 'parameters', 'type': '[RunCommandInputParameter]'}, - } - - def __init__(self, *, command_id: str, script=None, parameters=None, **kwargs) -> None: - super(RunCommandInput, self).__init__(**kwargs) - self.command_id = command_id - self.script = script - self.parameters = parameters diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/run_command_parameter_definition.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/run_command_parameter_definition.py deleted file mode 100644 index e09f774d8241..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/run_command_parameter_definition.py +++ /dev/null @@ -1,48 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class RunCommandParameterDefinition(Model): - """Describes the properties of a run command parameter. - - All required parameters must be populated in order to send to Azure. - - :param name: Required. The run command parameter name. - :type name: str - :param type: Required. The run command parameter type. - :type type: str - :param default_value: The run command parameter default value. - :type default_value: str - :param required: The run command parameter required. Default value: False - . - :type required: bool - """ - - _validation = { - 'name': {'required': True}, - 'type': {'required': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'default_value': {'key': 'defaultValue', 'type': 'str'}, - 'required': {'key': 'required', 'type': 'bool'}, - } - - def __init__(self, **kwargs): - super(RunCommandParameterDefinition, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.type = kwargs.get('type', None) - self.default_value = kwargs.get('default_value', None) - self.required = kwargs.get('required', False) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/run_command_parameter_definition_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/run_command_parameter_definition_py3.py deleted file mode 100644 index e5fbc708f965..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/run_command_parameter_definition_py3.py +++ /dev/null @@ -1,48 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class RunCommandParameterDefinition(Model): - """Describes the properties of a run command parameter. - - All required parameters must be populated in order to send to Azure. - - :param name: Required. The run command parameter name. - :type name: str - :param type: Required. The run command parameter type. - :type type: str - :param default_value: The run command parameter default value. - :type default_value: str - :param required: The run command parameter required. Default value: False - . - :type required: bool - """ - - _validation = { - 'name': {'required': True}, - 'type': {'required': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'default_value': {'key': 'defaultValue', 'type': 'str'}, - 'required': {'key': 'required', 'type': 'bool'}, - } - - def __init__(self, *, name: str, type: str, default_value: str=None, required: bool=False, **kwargs) -> None: - super(RunCommandParameterDefinition, self).__init__(**kwargs) - self.name = name - self.type = type - self.default_value = default_value - self.required = required diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/run_command_result.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/run_command_result.py deleted file mode 100644 index a72c4f194c8d..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/run_command_result.py +++ /dev/null @@ -1,54 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .operation_status_response import OperationStatusResponse - - -class RunCommandResult(OperationStatusResponse): - """Run command operation response. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar name: Operation ID - :vartype name: str - :ivar status: Operation status - :vartype status: str - :ivar start_time: Start time of the operation - :vartype start_time: datetime - :ivar end_time: End time of the operation - :vartype end_time: datetime - :ivar error: Api error - :vartype error: ~azure.mgmt.compute.v2017_03_30.models.ApiError - :param output: Operation output data (raw JSON) - :type output: object - """ - - _validation = { - 'name': {'readonly': True}, - 'status': {'readonly': True}, - 'start_time': {'readonly': True}, - 'end_time': {'readonly': True}, - 'error': {'readonly': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'status': {'key': 'status', 'type': 'str'}, - 'start_time': {'key': 'startTime', 'type': 'iso-8601'}, - 'end_time': {'key': 'endTime', 'type': 'iso-8601'}, - 'error': {'key': 'error', 'type': 'ApiError'}, - 'output': {'key': 'properties.output', 'type': 'object'}, - } - - def __init__(self, **kwargs): - super(RunCommandResult, self).__init__(**kwargs) - self.output = kwargs.get('output', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/run_command_result_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/run_command_result_py3.py deleted file mode 100644 index d73bc6086e0c..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/run_command_result_py3.py +++ /dev/null @@ -1,54 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .operation_status_response_py3 import OperationStatusResponse - - -class RunCommandResult(OperationStatusResponse): - """Run command operation response. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar name: Operation ID - :vartype name: str - :ivar status: Operation status - :vartype status: str - :ivar start_time: Start time of the operation - :vartype start_time: datetime - :ivar end_time: End time of the operation - :vartype end_time: datetime - :ivar error: Api error - :vartype error: ~azure.mgmt.compute.v2017_03_30.models.ApiError - :param output: Operation output data (raw JSON) - :type output: object - """ - - _validation = { - 'name': {'readonly': True}, - 'status': {'readonly': True}, - 'start_time': {'readonly': True}, - 'end_time': {'readonly': True}, - 'error': {'readonly': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'status': {'key': 'status', 'type': 'str'}, - 'start_time': {'key': 'startTime', 'type': 'iso-8601'}, - 'end_time': {'key': 'endTime', 'type': 'iso-8601'}, - 'error': {'key': 'error', 'type': 'ApiError'}, - 'output': {'key': 'properties.output', 'type': 'object'}, - } - - def __init__(self, *, output=None, **kwargs) -> None: - super(RunCommandResult, self).__init__(**kwargs) - self.output = output diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/sku.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/sku.py deleted file mode 100644 index 5c07709435e0..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/sku.py +++ /dev/null @@ -1,38 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class Sku(Model): - """Describes a virtual machine scale set sku. - - :param name: The sku name. - :type name: str - :param tier: Specifies the tier of virtual machines in a scale set.

    Possible Values:

    **Standard**

    **Basic** - :type tier: str - :param capacity: Specifies the number of virtual machines in the scale - set. - :type capacity: long - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'tier': {'key': 'tier', 'type': 'str'}, - 'capacity': {'key': 'capacity', 'type': 'long'}, - } - - def __init__(self, **kwargs): - super(Sku, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.tier = kwargs.get('tier', None) - self.capacity = kwargs.get('capacity', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/sku_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/sku_py3.py deleted file mode 100644 index f6bc74afaadc..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/sku_py3.py +++ /dev/null @@ -1,38 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class Sku(Model): - """Describes a virtual machine scale set sku. - - :param name: The sku name. - :type name: str - :param tier: Specifies the tier of virtual machines in a scale set.

    Possible Values:

    **Standard**

    **Basic** - :type tier: str - :param capacity: Specifies the number of virtual machines in the scale - set. - :type capacity: long - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'tier': {'key': 'tier', 'type': 'str'}, - 'capacity': {'key': 'capacity', 'type': 'long'}, - } - - def __init__(self, *, name: str=None, tier: str=None, capacity: int=None, **kwargs) -> None: - super(Sku, self).__init__(**kwargs) - self.name = name - self.tier = tier - self.capacity = capacity diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/snapshot.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/snapshot.py deleted file mode 100644 index be778fd923b7..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/snapshot.py +++ /dev/null @@ -1,95 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource import Resource - - -class Snapshot(Resource): - """Snapshot resource. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource Id - :vartype id: str - :ivar name: Resource name - :vartype name: str - :ivar type: Resource type - :vartype type: str - :param location: Required. Resource location - :type location: str - :param tags: Resource tags - :type tags: dict[str, str] - :ivar managed_by: Unused. Always Null. - :vartype managed_by: str - :param sku: - :type sku: ~azure.mgmt.compute.v2017_03_30.models.DiskSku - :ivar time_created: The time when the disk was created. - :vartype time_created: datetime - :param os_type: The Operating System type. Possible values include: - 'Windows', 'Linux' - :type os_type: str or - ~azure.mgmt.compute.v2017_03_30.models.OperatingSystemTypes - :param creation_data: Required. Disk source information. CreationData - information cannot be changed after the disk has been created. - :type creation_data: ~azure.mgmt.compute.v2017_03_30.models.CreationData - :param disk_size_gb: If creationData.createOption is Empty, this field is - mandatory and it indicates the size of the VHD to create. If this field is - present for updates or creation with other options, it indicates a resize. - Resizes are only allowed if the disk is not attached to a running VM, and - can only increase the disk's size. - :type disk_size_gb: int - :param encryption_settings: Encryption settings for disk or snapshot - :type encryption_settings: - ~azure.mgmt.compute.v2017_03_30.models.EncryptionSettings - :ivar provisioning_state: The disk provisioning state. - :vartype provisioning_state: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - 'managed_by': {'readonly': True}, - 'time_created': {'readonly': True}, - 'creation_data': {'required': True}, - 'provisioning_state': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'managed_by': {'key': 'managedBy', 'type': 'str'}, - 'sku': {'key': 'sku', 'type': 'DiskSku'}, - 'time_created': {'key': 'properties.timeCreated', 'type': 'iso-8601'}, - 'os_type': {'key': 'properties.osType', 'type': 'OperatingSystemTypes'}, - 'creation_data': {'key': 'properties.creationData', 'type': 'CreationData'}, - 'disk_size_gb': {'key': 'properties.diskSizeGB', 'type': 'int'}, - 'encryption_settings': {'key': 'properties.encryptionSettings', 'type': 'EncryptionSettings'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(Snapshot, self).__init__(**kwargs) - self.managed_by = None - self.sku = kwargs.get('sku', None) - self.time_created = None - self.os_type = kwargs.get('os_type', None) - self.creation_data = kwargs.get('creation_data', None) - self.disk_size_gb = kwargs.get('disk_size_gb', None) - self.encryption_settings = kwargs.get('encryption_settings', None) - self.provisioning_state = None diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/snapshot_paged.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/snapshot_paged.py deleted file mode 100644 index 2311da2d0919..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/snapshot_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class SnapshotPaged(Paged): - """ - A paging container for iterating over a list of :class:`Snapshot ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[Snapshot]'} - } - - def __init__(self, *args, **kwargs): - - super(SnapshotPaged, self).__init__(*args, **kwargs) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/snapshot_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/snapshot_py3.py deleted file mode 100644 index 4538d2b84d83..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/snapshot_py3.py +++ /dev/null @@ -1,95 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource_py3 import Resource - - -class Snapshot(Resource): - """Snapshot resource. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource Id - :vartype id: str - :ivar name: Resource name - :vartype name: str - :ivar type: Resource type - :vartype type: str - :param location: Required. Resource location - :type location: str - :param tags: Resource tags - :type tags: dict[str, str] - :ivar managed_by: Unused. Always Null. - :vartype managed_by: str - :param sku: - :type sku: ~azure.mgmt.compute.v2017_03_30.models.DiskSku - :ivar time_created: The time when the disk was created. - :vartype time_created: datetime - :param os_type: The Operating System type. Possible values include: - 'Windows', 'Linux' - :type os_type: str or - ~azure.mgmt.compute.v2017_03_30.models.OperatingSystemTypes - :param creation_data: Required. Disk source information. CreationData - information cannot be changed after the disk has been created. - :type creation_data: ~azure.mgmt.compute.v2017_03_30.models.CreationData - :param disk_size_gb: If creationData.createOption is Empty, this field is - mandatory and it indicates the size of the VHD to create. If this field is - present for updates or creation with other options, it indicates a resize. - Resizes are only allowed if the disk is not attached to a running VM, and - can only increase the disk's size. - :type disk_size_gb: int - :param encryption_settings: Encryption settings for disk or snapshot - :type encryption_settings: - ~azure.mgmt.compute.v2017_03_30.models.EncryptionSettings - :ivar provisioning_state: The disk provisioning state. - :vartype provisioning_state: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - 'managed_by': {'readonly': True}, - 'time_created': {'readonly': True}, - 'creation_data': {'required': True}, - 'provisioning_state': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'managed_by': {'key': 'managedBy', 'type': 'str'}, - 'sku': {'key': 'sku', 'type': 'DiskSku'}, - 'time_created': {'key': 'properties.timeCreated', 'type': 'iso-8601'}, - 'os_type': {'key': 'properties.osType', 'type': 'OperatingSystemTypes'}, - 'creation_data': {'key': 'properties.creationData', 'type': 'CreationData'}, - 'disk_size_gb': {'key': 'properties.diskSizeGB', 'type': 'int'}, - 'encryption_settings': {'key': 'properties.encryptionSettings', 'type': 'EncryptionSettings'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - } - - def __init__(self, *, location: str, creation_data, tags=None, sku=None, os_type=None, disk_size_gb: int=None, encryption_settings=None, **kwargs) -> None: - super(Snapshot, self).__init__(location=location, tags=tags, **kwargs) - self.managed_by = None - self.sku = sku - self.time_created = None - self.os_type = os_type - self.creation_data = creation_data - self.disk_size_gb = disk_size_gb - self.encryption_settings = encryption_settings - self.provisioning_state = None diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/snapshot_update.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/snapshot_update.py deleted file mode 100644 index de7f5642a846..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/snapshot_update.py +++ /dev/null @@ -1,49 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource_update import ResourceUpdate - - -class SnapshotUpdate(ResourceUpdate): - """Snapshot update resource. - - :param tags: Resource tags - :type tags: dict[str, str] - :param sku: - :type sku: ~azure.mgmt.compute.v2017_03_30.models.DiskSku - :param os_type: the Operating System type. Possible values include: - 'Windows', 'Linux' - :type os_type: str or - ~azure.mgmt.compute.v2017_03_30.models.OperatingSystemTypes - :param disk_size_gb: If creationData.createOption is Empty, this field is - mandatory and it indicates the size of the VHD to create. If this field is - present for updates or creation with other options, it indicates a resize. - Resizes are only allowed if the disk is not attached to a running VM, and - can only increase the disk's size. - :type disk_size_gb: int - :param encryption_settings: Encryption settings for disk or snapshot - :type encryption_settings: - ~azure.mgmt.compute.v2017_03_30.models.EncryptionSettings - """ - - _attribute_map = { - 'tags': {'key': 'tags', 'type': '{str}'}, - 'sku': {'key': 'sku', 'type': 'DiskSku'}, - 'os_type': {'key': 'properties.osType', 'type': 'OperatingSystemTypes'}, - 'disk_size_gb': {'key': 'properties.diskSizeGB', 'type': 'int'}, - 'encryption_settings': {'key': 'properties.encryptionSettings', 'type': 'EncryptionSettings'}, - } - - def __init__(self, **kwargs): - super(SnapshotUpdate, self).__init__(**kwargs) - self.os_type = kwargs.get('os_type', None) - self.disk_size_gb = kwargs.get('disk_size_gb', None) - self.encryption_settings = kwargs.get('encryption_settings', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/snapshot_update_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/snapshot_update_py3.py deleted file mode 100644 index 380ddaf2ef73..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/snapshot_update_py3.py +++ /dev/null @@ -1,49 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource_update_py3 import ResourceUpdate - - -class SnapshotUpdate(ResourceUpdate): - """Snapshot update resource. - - :param tags: Resource tags - :type tags: dict[str, str] - :param sku: - :type sku: ~azure.mgmt.compute.v2017_03_30.models.DiskSku - :param os_type: the Operating System type. Possible values include: - 'Windows', 'Linux' - :type os_type: str or - ~azure.mgmt.compute.v2017_03_30.models.OperatingSystemTypes - :param disk_size_gb: If creationData.createOption is Empty, this field is - mandatory and it indicates the size of the VHD to create. If this field is - present for updates or creation with other options, it indicates a resize. - Resizes are only allowed if the disk is not attached to a running VM, and - can only increase the disk's size. - :type disk_size_gb: int - :param encryption_settings: Encryption settings for disk or snapshot - :type encryption_settings: - ~azure.mgmt.compute.v2017_03_30.models.EncryptionSettings - """ - - _attribute_map = { - 'tags': {'key': 'tags', 'type': '{str}'}, - 'sku': {'key': 'sku', 'type': 'DiskSku'}, - 'os_type': {'key': 'properties.osType', 'type': 'OperatingSystemTypes'}, - 'disk_size_gb': {'key': 'properties.diskSizeGB', 'type': 'int'}, - 'encryption_settings': {'key': 'properties.encryptionSettings', 'type': 'EncryptionSettings'}, - } - - def __init__(self, *, tags=None, sku=None, os_type=None, disk_size_gb: int=None, encryption_settings=None, **kwargs) -> None: - super(SnapshotUpdate, self).__init__(tags=tags, sku=sku, **kwargs) - self.os_type = os_type - self.disk_size_gb = disk_size_gb - self.encryption_settings = encryption_settings diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/source_vault.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/source_vault.py deleted file mode 100644 index 88537f33905f..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/source_vault.py +++ /dev/null @@ -1,29 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class SourceVault(Model): - """The vault id is an Azure Resource Manager Resource id in the form - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.KeyVault/vaults/{vaultName}. - - :param id: Resource Id - :type id: str - """ - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(SourceVault, self).__init__(**kwargs) - self.id = kwargs.get('id', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/source_vault_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/source_vault_py3.py deleted file mode 100644 index 1cb922017c06..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/source_vault_py3.py +++ /dev/null @@ -1,29 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class SourceVault(Model): - """The vault id is an Azure Resource Manager Resource id in the form - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.KeyVault/vaults/{vaultName}. - - :param id: Resource Id - :type id: str - """ - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - } - - def __init__(self, *, id: str=None, **kwargs) -> None: - super(SourceVault, self).__init__(**kwargs) - self.id = id diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/ssh_configuration.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/ssh_configuration.py deleted file mode 100644 index e5c7e9b2cabd..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/ssh_configuration.py +++ /dev/null @@ -1,30 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class SshConfiguration(Model): - """SSH configuration for Linux based VMs running on Azure. - - :param public_keys: The list of SSH public keys used to authenticate with - linux based VMs. - :type public_keys: - list[~azure.mgmt.compute.v2017_03_30.models.SshPublicKey] - """ - - _attribute_map = { - 'public_keys': {'key': 'publicKeys', 'type': '[SshPublicKey]'}, - } - - def __init__(self, **kwargs): - super(SshConfiguration, self).__init__(**kwargs) - self.public_keys = kwargs.get('public_keys', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/ssh_configuration_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/ssh_configuration_py3.py deleted file mode 100644 index 09fe7514dd72..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/ssh_configuration_py3.py +++ /dev/null @@ -1,30 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class SshConfiguration(Model): - """SSH configuration for Linux based VMs running on Azure. - - :param public_keys: The list of SSH public keys used to authenticate with - linux based VMs. - :type public_keys: - list[~azure.mgmt.compute.v2017_03_30.models.SshPublicKey] - """ - - _attribute_map = { - 'public_keys': {'key': 'publicKeys', 'type': '[SshPublicKey]'}, - } - - def __init__(self, *, public_keys=None, **kwargs) -> None: - super(SshConfiguration, self).__init__(**kwargs) - self.public_keys = public_keys diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/ssh_public_key.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/ssh_public_key.py deleted file mode 100644 index 122e0d3b9fdd..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/ssh_public_key.py +++ /dev/null @@ -1,39 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class SshPublicKey(Model): - """Contains information about SSH certificate public key and the path on the - Linux VM where the public key is placed. - - :param path: Specifies the full path on the created VM where ssh public - key is stored. If the file already exists, the specified key is appended - to the file. Example: /home/user/.ssh/authorized_keys - :type path: str - :param key_data: SSH public key certificate used to authenticate with the - VM through ssh. The key needs to be at least 2048-bit and in ssh-rsa - format.

    For creating ssh keys, see [Create SSH keys on Linux and - Mac for Linux VMs in - Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-mac-create-ssh-keys?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json). - :type key_data: str - """ - - _attribute_map = { - 'path': {'key': 'path', 'type': 'str'}, - 'key_data': {'key': 'keyData', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(SshPublicKey, self).__init__(**kwargs) - self.path = kwargs.get('path', None) - self.key_data = kwargs.get('key_data', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/ssh_public_key_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/ssh_public_key_py3.py deleted file mode 100644 index b16ee085b36b..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/ssh_public_key_py3.py +++ /dev/null @@ -1,39 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class SshPublicKey(Model): - """Contains information about SSH certificate public key and the path on the - Linux VM where the public key is placed. - - :param path: Specifies the full path on the created VM where ssh public - key is stored. If the file already exists, the specified key is appended - to the file. Example: /home/user/.ssh/authorized_keys - :type path: str - :param key_data: SSH public key certificate used to authenticate with the - VM through ssh. The key needs to be at least 2048-bit and in ssh-rsa - format.

    For creating ssh keys, see [Create SSH keys on Linux and - Mac for Linux VMs in - Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-mac-create-ssh-keys?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json). - :type key_data: str - """ - - _attribute_map = { - 'path': {'key': 'path', 'type': 'str'}, - 'key_data': {'key': 'keyData', 'type': 'str'}, - } - - def __init__(self, *, path: str=None, key_data: str=None, **kwargs) -> None: - super(SshPublicKey, self).__init__(**kwargs) - self.path = path - self.key_data = key_data diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/storage_profile.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/storage_profile.py deleted file mode 100644 index 300d5bc464f7..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/storage_profile.py +++ /dev/null @@ -1,47 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class StorageProfile(Model): - """Specifies the storage settings for the virtual machine disks. - - :param image_reference: Specifies information about the image to use. You - can specify information about platform images, marketplace images, or - virtual machine images. This element is required when you want to use a - platform image, marketplace image, or virtual machine image, but is not - used in other creation operations. - :type image_reference: - ~azure.mgmt.compute.v2017_03_30.models.ImageReference - :param os_disk: Specifies information about the operating system disk used - by the virtual machine.

    For more information about disks, see - [About disks and VHDs for Azure virtual - machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-about-disks-vhds?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). - :type os_disk: ~azure.mgmt.compute.v2017_03_30.models.OSDisk - :param data_disks: Specifies the parameters that are used to add a data - disk to a virtual machine.

    For more information about disks, see - [About disks and VHDs for Azure virtual - machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-about-disks-vhds?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). - :type data_disks: list[~azure.mgmt.compute.v2017_03_30.models.DataDisk] - """ - - _attribute_map = { - 'image_reference': {'key': 'imageReference', 'type': 'ImageReference'}, - 'os_disk': {'key': 'osDisk', 'type': 'OSDisk'}, - 'data_disks': {'key': 'dataDisks', 'type': '[DataDisk]'}, - } - - def __init__(self, **kwargs): - super(StorageProfile, self).__init__(**kwargs) - self.image_reference = kwargs.get('image_reference', None) - self.os_disk = kwargs.get('os_disk', None) - self.data_disks = kwargs.get('data_disks', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/storage_profile_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/storage_profile_py3.py deleted file mode 100644 index 1a256407486c..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/storage_profile_py3.py +++ /dev/null @@ -1,47 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class StorageProfile(Model): - """Specifies the storage settings for the virtual machine disks. - - :param image_reference: Specifies information about the image to use. You - can specify information about platform images, marketplace images, or - virtual machine images. This element is required when you want to use a - platform image, marketplace image, or virtual machine image, but is not - used in other creation operations. - :type image_reference: - ~azure.mgmt.compute.v2017_03_30.models.ImageReference - :param os_disk: Specifies information about the operating system disk used - by the virtual machine.

    For more information about disks, see - [About disks and VHDs for Azure virtual - machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-about-disks-vhds?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). - :type os_disk: ~azure.mgmt.compute.v2017_03_30.models.OSDisk - :param data_disks: Specifies the parameters that are used to add a data - disk to a virtual machine.

    For more information about disks, see - [About disks and VHDs for Azure virtual - machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-about-disks-vhds?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). - :type data_disks: list[~azure.mgmt.compute.v2017_03_30.models.DataDisk] - """ - - _attribute_map = { - 'image_reference': {'key': 'imageReference', 'type': 'ImageReference'}, - 'os_disk': {'key': 'osDisk', 'type': 'OSDisk'}, - 'data_disks': {'key': 'dataDisks', 'type': '[DataDisk]'}, - } - - def __init__(self, *, image_reference=None, os_disk=None, data_disks=None, **kwargs) -> None: - super(StorageProfile, self).__init__(**kwargs) - self.image_reference = image_reference - self.os_disk = os_disk - self.data_disks = data_disks diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/sub_resource.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/sub_resource.py deleted file mode 100644 index 11e092cc6ff5..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/sub_resource.py +++ /dev/null @@ -1,28 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class SubResource(Model): - """SubResource. - - :param id: Resource Id - :type id: str - """ - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(SubResource, self).__init__(**kwargs) - self.id = kwargs.get('id', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/sub_resource_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/sub_resource_py3.py deleted file mode 100644 index 29e5afee38f9..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/sub_resource_py3.py +++ /dev/null @@ -1,28 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class SubResource(Model): - """SubResource. - - :param id: Resource Id - :type id: str - """ - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - } - - def __init__(self, *, id: str=None, **kwargs) -> None: - super(SubResource, self).__init__(**kwargs) - self.id = id diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/sub_resource_read_only.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/sub_resource_read_only.py deleted file mode 100644 index 4a0ec466c0d4..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/sub_resource_read_only.py +++ /dev/null @@ -1,35 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class SubResourceReadOnly(Model): - """SubResourceReadOnly. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource Id - :vartype id: str - """ - - _validation = { - 'id': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(SubResourceReadOnly, self).__init__(**kwargs) - self.id = None diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/sub_resource_read_only_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/sub_resource_read_only_py3.py deleted file mode 100644 index cb918e9a2ac6..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/sub_resource_read_only_py3.py +++ /dev/null @@ -1,35 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class SubResourceReadOnly(Model): - """SubResourceReadOnly. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource Id - :vartype id: str - """ - - _validation = { - 'id': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - } - - def __init__(self, **kwargs) -> None: - super(SubResourceReadOnly, self).__init__(**kwargs) - self.id = None diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/update_resource.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/update_resource.py deleted file mode 100644 index b1d2898ff082..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/update_resource.py +++ /dev/null @@ -1,28 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class UpdateResource(Model): - """The Update Resource model definition. - - :param tags: Resource tags - :type tags: dict[str, str] - """ - - _attribute_map = { - 'tags': {'key': 'tags', 'type': '{str}'}, - } - - def __init__(self, **kwargs): - super(UpdateResource, self).__init__(**kwargs) - self.tags = kwargs.get('tags', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/update_resource_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/update_resource_py3.py deleted file mode 100644 index c06c17c124d9..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/update_resource_py3.py +++ /dev/null @@ -1,28 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class UpdateResource(Model): - """The Update Resource model definition. - - :param tags: Resource tags - :type tags: dict[str, str] - """ - - _attribute_map = { - 'tags': {'key': 'tags', 'type': '{str}'}, - } - - def __init__(self, *, tags=None, **kwargs) -> None: - super(UpdateResource, self).__init__(**kwargs) - self.tags = tags diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/upgrade_policy.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/upgrade_policy.py deleted file mode 100644 index f80408916ab5..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/upgrade_policy.py +++ /dev/null @@ -1,45 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class UpgradePolicy(Model): - """Describes an upgrade policy - automatic, manual, or rolling. - - :param mode: Specifies the mode of an upgrade to virtual machines in the - scale set.

    Possible values are:

    **Manual** - You - control the application of updates to virtual machines in the scale set. - You do this by using the manualUpgrade action.

    **Automatic** - - All virtual machines in the scale set are automatically updated at the - same time. Possible values include: 'Automatic', 'Manual', 'Rolling' - :type mode: str or ~azure.mgmt.compute.v2017_03_30.models.UpgradeMode - :param rolling_upgrade_policy: The configuration parameters used while - performing a rolling upgrade. - :type rolling_upgrade_policy: - ~azure.mgmt.compute.v2017_03_30.models.RollingUpgradePolicy - :param automatic_os_upgrade: Whether OS upgrades should automatically be - applied to scale set instances in a rolling fashion when a newer version - of the image becomes available. - :type automatic_os_upgrade: bool - """ - - _attribute_map = { - 'mode': {'key': 'mode', 'type': 'UpgradeMode'}, - 'rolling_upgrade_policy': {'key': 'rollingUpgradePolicy', 'type': 'RollingUpgradePolicy'}, - 'automatic_os_upgrade': {'key': 'automaticOSUpgrade', 'type': 'bool'}, - } - - def __init__(self, **kwargs): - super(UpgradePolicy, self).__init__(**kwargs) - self.mode = kwargs.get('mode', None) - self.rolling_upgrade_policy = kwargs.get('rolling_upgrade_policy', None) - self.automatic_os_upgrade = kwargs.get('automatic_os_upgrade', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/upgrade_policy_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/upgrade_policy_py3.py deleted file mode 100644 index 5ebb99df5bff..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/upgrade_policy_py3.py +++ /dev/null @@ -1,45 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class UpgradePolicy(Model): - """Describes an upgrade policy - automatic, manual, or rolling. - - :param mode: Specifies the mode of an upgrade to virtual machines in the - scale set.

    Possible values are:

    **Manual** - You - control the application of updates to virtual machines in the scale set. - You do this by using the manualUpgrade action.

    **Automatic** - - All virtual machines in the scale set are automatically updated at the - same time. Possible values include: 'Automatic', 'Manual', 'Rolling' - :type mode: str or ~azure.mgmt.compute.v2017_03_30.models.UpgradeMode - :param rolling_upgrade_policy: The configuration parameters used while - performing a rolling upgrade. - :type rolling_upgrade_policy: - ~azure.mgmt.compute.v2017_03_30.models.RollingUpgradePolicy - :param automatic_os_upgrade: Whether OS upgrades should automatically be - applied to scale set instances in a rolling fashion when a newer version - of the image becomes available. - :type automatic_os_upgrade: bool - """ - - _attribute_map = { - 'mode': {'key': 'mode', 'type': 'UpgradeMode'}, - 'rolling_upgrade_policy': {'key': 'rollingUpgradePolicy', 'type': 'RollingUpgradePolicy'}, - 'automatic_os_upgrade': {'key': 'automaticOSUpgrade', 'type': 'bool'}, - } - - def __init__(self, *, mode=None, rolling_upgrade_policy=None, automatic_os_upgrade: bool=None, **kwargs) -> None: - super(UpgradePolicy, self).__init__(**kwargs) - self.mode = mode - self.rolling_upgrade_policy = rolling_upgrade_policy - self.automatic_os_upgrade = automatic_os_upgrade diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/usage.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/usage.py deleted file mode 100644 index 810c694c9b8c..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/usage.py +++ /dev/null @@ -1,54 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class Usage(Model): - """Describes Compute Resource Usage. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar unit: Required. An enum describing the unit of usage measurement. - Default value: "Count" . - :vartype unit: str - :param current_value: Required. The current usage of the resource. - :type current_value: int - :param limit: Required. The maximum permitted usage of the resource. - :type limit: long - :param name: Required. The name of the type of usage. - :type name: ~azure.mgmt.compute.v2017_03_30.models.UsageName - """ - - _validation = { - 'unit': {'required': True, 'constant': True}, - 'current_value': {'required': True}, - 'limit': {'required': True}, - 'name': {'required': True}, - } - - _attribute_map = { - 'unit': {'key': 'unit', 'type': 'str'}, - 'current_value': {'key': 'currentValue', 'type': 'int'}, - 'limit': {'key': 'limit', 'type': 'long'}, - 'name': {'key': 'name', 'type': 'UsageName'}, - } - - unit = "Count" - - def __init__(self, **kwargs): - super(Usage, self).__init__(**kwargs) - self.current_value = kwargs.get('current_value', None) - self.limit = kwargs.get('limit', None) - self.name = kwargs.get('name', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/usage_name.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/usage_name.py deleted file mode 100644 index e2560936493e..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/usage_name.py +++ /dev/null @@ -1,32 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class UsageName(Model): - """The Usage Names. - - :param value: The name of the resource. - :type value: str - :param localized_value: The localized name of the resource. - :type localized_value: str - """ - - _attribute_map = { - 'value': {'key': 'value', 'type': 'str'}, - 'localized_value': {'key': 'localizedValue', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(UsageName, self).__init__(**kwargs) - self.value = kwargs.get('value', None) - self.localized_value = kwargs.get('localized_value', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/usage_name_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/usage_name_py3.py deleted file mode 100644 index ad0b77459f75..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/usage_name_py3.py +++ /dev/null @@ -1,32 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class UsageName(Model): - """The Usage Names. - - :param value: The name of the resource. - :type value: str - :param localized_value: The localized name of the resource. - :type localized_value: str - """ - - _attribute_map = { - 'value': {'key': 'value', 'type': 'str'}, - 'localized_value': {'key': 'localizedValue', 'type': 'str'}, - } - - def __init__(self, *, value: str=None, localized_value: str=None, **kwargs) -> None: - super(UsageName, self).__init__(**kwargs) - self.value = value - self.localized_value = localized_value diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/usage_paged.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/usage_paged.py deleted file mode 100644 index 010cbe872b78..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/usage_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class UsagePaged(Paged): - """ - A paging container for iterating over a list of :class:`Usage ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[Usage]'} - } - - def __init__(self, *args, **kwargs): - - super(UsagePaged, self).__init__(*args, **kwargs) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/usage_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/usage_py3.py deleted file mode 100644 index 64100ce07d54..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/usage_py3.py +++ /dev/null @@ -1,54 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class Usage(Model): - """Describes Compute Resource Usage. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar unit: Required. An enum describing the unit of usage measurement. - Default value: "Count" . - :vartype unit: str - :param current_value: Required. The current usage of the resource. - :type current_value: int - :param limit: Required. The maximum permitted usage of the resource. - :type limit: long - :param name: Required. The name of the type of usage. - :type name: ~azure.mgmt.compute.v2017_03_30.models.UsageName - """ - - _validation = { - 'unit': {'required': True, 'constant': True}, - 'current_value': {'required': True}, - 'limit': {'required': True}, - 'name': {'required': True}, - } - - _attribute_map = { - 'unit': {'key': 'unit', 'type': 'str'}, - 'current_value': {'key': 'currentValue', 'type': 'int'}, - 'limit': {'key': 'limit', 'type': 'long'}, - 'name': {'key': 'name', 'type': 'UsageName'}, - } - - unit = "Count" - - def __init__(self, *, current_value: int, limit: int, name, **kwargs) -> None: - super(Usage, self).__init__(**kwargs) - self.current_value = current_value - self.limit = limit - self.name = name diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/vault_certificate.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/vault_certificate.py deleted file mode 100644 index 2dd179480e76..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/vault_certificate.py +++ /dev/null @@ -1,47 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VaultCertificate(Model): - """Describes a single certificate reference in a Key Vault, and where the - certificate should reside on the VM. - - :param certificate_url: This is the URL of a certificate that has been - uploaded to Key Vault as a secret. For adding a secret to the Key Vault, - see [Add a key or secret to the key - vault](https://docs.microsoft.com/azure/key-vault/key-vault-get-started/#add). - In this case, your certificate needs to be It is the Base64 encoding of - the following JSON Object which is encoded in UTF-8:

    {
    - "data":"",
    "dataType":"pfx",
    - "password":""
    } - :type certificate_url: str - :param certificate_store: For Windows VMs, specifies the certificate store - on the Virtual Machine to which the certificate should be added. The - specified certificate store is implicitly in the LocalMachine account. -

    For Linux VMs, the certificate file is placed under the - /var/lib/waagent directory, with the file name - <UppercaseThumbprint>.crt for the X509 certificate file and - <UppercaseThumbprint>.prv for private key. Both of these files are - .pem formatted. - :type certificate_store: str - """ - - _attribute_map = { - 'certificate_url': {'key': 'certificateUrl', 'type': 'str'}, - 'certificate_store': {'key': 'certificateStore', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(VaultCertificate, self).__init__(**kwargs) - self.certificate_url = kwargs.get('certificate_url', None) - self.certificate_store = kwargs.get('certificate_store', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/vault_certificate_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/vault_certificate_py3.py deleted file mode 100644 index 23ecc8101793..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/vault_certificate_py3.py +++ /dev/null @@ -1,47 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VaultCertificate(Model): - """Describes a single certificate reference in a Key Vault, and where the - certificate should reside on the VM. - - :param certificate_url: This is the URL of a certificate that has been - uploaded to Key Vault as a secret. For adding a secret to the Key Vault, - see [Add a key or secret to the key - vault](https://docs.microsoft.com/azure/key-vault/key-vault-get-started/#add). - In this case, your certificate needs to be It is the Base64 encoding of - the following JSON Object which is encoded in UTF-8:

    {
    - "data":"",
    "dataType":"pfx",
    - "password":""
    } - :type certificate_url: str - :param certificate_store: For Windows VMs, specifies the certificate store - on the Virtual Machine to which the certificate should be added. The - specified certificate store is implicitly in the LocalMachine account. -

    For Linux VMs, the certificate file is placed under the - /var/lib/waagent directory, with the file name - <UppercaseThumbprint>.crt for the X509 certificate file and - <UppercaseThumbprint>.prv for private key. Both of these files are - .pem formatted. - :type certificate_store: str - """ - - _attribute_map = { - 'certificate_url': {'key': 'certificateUrl', 'type': 'str'}, - 'certificate_store': {'key': 'certificateStore', 'type': 'str'}, - } - - def __init__(self, *, certificate_url: str=None, certificate_store: str=None, **kwargs) -> None: - super(VaultCertificate, self).__init__(**kwargs) - self.certificate_url = certificate_url - self.certificate_store = certificate_store diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/vault_secret_group.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/vault_secret_group.py deleted file mode 100644 index 2001e0f4d9a6..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/vault_secret_group.py +++ /dev/null @@ -1,35 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VaultSecretGroup(Model): - """Describes a set of certificates which are all in the same Key Vault. - - :param source_vault: The relative URL of the Key Vault containing all of - the certificates in VaultCertificates. - :type source_vault: ~azure.mgmt.compute.v2017_03_30.models.SubResource - :param vault_certificates: The list of key vault references in SourceVault - which contain certificates. - :type vault_certificates: - list[~azure.mgmt.compute.v2017_03_30.models.VaultCertificate] - """ - - _attribute_map = { - 'source_vault': {'key': 'sourceVault', 'type': 'SubResource'}, - 'vault_certificates': {'key': 'vaultCertificates', 'type': '[VaultCertificate]'}, - } - - def __init__(self, **kwargs): - super(VaultSecretGroup, self).__init__(**kwargs) - self.source_vault = kwargs.get('source_vault', None) - self.vault_certificates = kwargs.get('vault_certificates', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/vault_secret_group_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/vault_secret_group_py3.py deleted file mode 100644 index 21f0c1c281d8..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/vault_secret_group_py3.py +++ /dev/null @@ -1,35 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VaultSecretGroup(Model): - """Describes a set of certificates which are all in the same Key Vault. - - :param source_vault: The relative URL of the Key Vault containing all of - the certificates in VaultCertificates. - :type source_vault: ~azure.mgmt.compute.v2017_03_30.models.SubResource - :param vault_certificates: The list of key vault references in SourceVault - which contain certificates. - :type vault_certificates: - list[~azure.mgmt.compute.v2017_03_30.models.VaultCertificate] - """ - - _attribute_map = { - 'source_vault': {'key': 'sourceVault', 'type': 'SubResource'}, - 'vault_certificates': {'key': 'vaultCertificates', 'type': '[VaultCertificate]'}, - } - - def __init__(self, *, source_vault=None, vault_certificates=None, **kwargs) -> None: - super(VaultSecretGroup, self).__init__(**kwargs) - self.source_vault = source_vault - self.vault_certificates = vault_certificates diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_hard_disk.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_hard_disk.py deleted file mode 100644 index 5e3ad9dea7d4..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_hard_disk.py +++ /dev/null @@ -1,28 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualHardDisk(Model): - """Describes the uri of a disk. - - :param uri: Specifies the virtual hard disk's uri. - :type uri: str - """ - - _attribute_map = { - 'uri': {'key': 'uri', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(VirtualHardDisk, self).__init__(**kwargs) - self.uri = kwargs.get('uri', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_hard_disk_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_hard_disk_py3.py deleted file mode 100644 index 9c069b95f084..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_hard_disk_py3.py +++ /dev/null @@ -1,28 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualHardDisk(Model): - """Describes the uri of a disk. - - :param uri: Specifies the virtual hard disk's uri. - :type uri: str - """ - - _attribute_map = { - 'uri': {'key': 'uri', 'type': 'str'}, - } - - def __init__(self, *, uri: str=None, **kwargs) -> None: - super(VirtualHardDisk, self).__init__(**kwargs) - self.uri = uri diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine.py deleted file mode 100644 index f1f83e88a314..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine.py +++ /dev/null @@ -1,150 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource import Resource - - -class VirtualMachine(Resource): - """Describes a Virtual Machine. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource Id - :vartype id: str - :ivar name: Resource name - :vartype name: str - :ivar type: Resource type - :vartype type: str - :param location: Required. Resource location - :type location: str - :param tags: Resource tags - :type tags: dict[str, str] - :param plan: Specifies information about the marketplace image used to - create the virtual machine. This element is only used for marketplace - images. Before you can use a marketplace image from an API, you must - enable the image for programmatic use. In the Azure portal, find the - marketplace image that you want to use and then click **Want to deploy - programmatically, Get Started ->**. Enter any required information and - then click **Save**. - :type plan: ~azure.mgmt.compute.v2017_03_30.models.Plan - :param hardware_profile: Specifies the hardware settings for the virtual - machine. - :type hardware_profile: - ~azure.mgmt.compute.v2017_03_30.models.HardwareProfile - :param storage_profile: Specifies the storage settings for the virtual - machine disks. - :type storage_profile: - ~azure.mgmt.compute.v2017_03_30.models.StorageProfile - :param os_profile: Specifies the operating system settings for the virtual - machine. - :type os_profile: ~azure.mgmt.compute.v2017_03_30.models.OSProfile - :param network_profile: Specifies the network interfaces of the virtual - machine. - :type network_profile: - ~azure.mgmt.compute.v2017_03_30.models.NetworkProfile - :param diagnostics_profile: Specifies the boot diagnostic settings state. -

    Minimum api-version: 2015-06-15. - :type diagnostics_profile: - ~azure.mgmt.compute.v2017_03_30.models.DiagnosticsProfile - :param availability_set: Specifies information about the availability set - that the virtual machine should be assigned to. Virtual machines specified - in the same availability set are allocated to different nodes to maximize - availability. For more information about availability sets, see [Manage - the availability of virtual - machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-manage-availability?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). -

    For more information on Azure planned maintenance, see [Planned - maintenance for virtual machines in - Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-planned-maintenance?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json) -

    Currently, a VM can only be added to availability set at creation - time. An existing VM cannot be added to an availability set. - :type availability_set: ~azure.mgmt.compute.v2017_03_30.models.SubResource - :ivar provisioning_state: The provisioning state, which only appears in - the response. - :vartype provisioning_state: str - :ivar instance_view: The virtual machine instance view. - :vartype instance_view: - ~azure.mgmt.compute.v2017_03_30.models.VirtualMachineInstanceView - :param license_type: Specifies that the image or disk that is being used - was licensed on-premises. This element is only used for images that - contain the Windows Server operating system.

    Possible values are: -

    Windows_Client

    Windows_Server

    If this element - is included in a request for an update, the value must match the initial - value. This value cannot be updated.

    For more information, see - [Azure Hybrid Use Benefit for Windows - Server](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-hybrid-use-benefit-licensing?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json) -

    Minimum api-version: 2015-06-15 - :type license_type: str - :ivar vm_id: Specifies the VM unique ID which is a 128-bits identifier - that is encoded and stored in all Azure IaaS VMs SMBIOS and can be read - using platform BIOS commands. - :vartype vm_id: str - :ivar resources: The virtual machine child extension resources. - :vartype resources: - list[~azure.mgmt.compute.v2017_03_30.models.VirtualMachineExtension] - :param identity: The identity of the virtual machine, if configured. - :type identity: - ~azure.mgmt.compute.v2017_03_30.models.VirtualMachineIdentity - :param zones: The virtual machine zones. - :type zones: list[str] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - 'provisioning_state': {'readonly': True}, - 'instance_view': {'readonly': True}, - 'vm_id': {'readonly': True}, - 'resources': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'plan': {'key': 'plan', 'type': 'Plan'}, - 'hardware_profile': {'key': 'properties.hardwareProfile', 'type': 'HardwareProfile'}, - 'storage_profile': {'key': 'properties.storageProfile', 'type': 'StorageProfile'}, - 'os_profile': {'key': 'properties.osProfile', 'type': 'OSProfile'}, - 'network_profile': {'key': 'properties.networkProfile', 'type': 'NetworkProfile'}, - 'diagnostics_profile': {'key': 'properties.diagnosticsProfile', 'type': 'DiagnosticsProfile'}, - 'availability_set': {'key': 'properties.availabilitySet', 'type': 'SubResource'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'instance_view': {'key': 'properties.instanceView', 'type': 'VirtualMachineInstanceView'}, - 'license_type': {'key': 'properties.licenseType', 'type': 'str'}, - 'vm_id': {'key': 'properties.vmId', 'type': 'str'}, - 'resources': {'key': 'resources', 'type': '[VirtualMachineExtension]'}, - 'identity': {'key': 'identity', 'type': 'VirtualMachineIdentity'}, - 'zones': {'key': 'zones', 'type': '[str]'}, - } - - def __init__(self, **kwargs): - super(VirtualMachine, self).__init__(**kwargs) - self.plan = kwargs.get('plan', None) - self.hardware_profile = kwargs.get('hardware_profile', None) - self.storage_profile = kwargs.get('storage_profile', None) - self.os_profile = kwargs.get('os_profile', None) - self.network_profile = kwargs.get('network_profile', None) - self.diagnostics_profile = kwargs.get('diagnostics_profile', None) - self.availability_set = kwargs.get('availability_set', None) - self.provisioning_state = None - self.instance_view = None - self.license_type = kwargs.get('license_type', None) - self.vm_id = None - self.resources = None - self.identity = kwargs.get('identity', None) - self.zones = kwargs.get('zones', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_agent_instance_view.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_agent_instance_view.py deleted file mode 100644 index a711ec14f83d..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_agent_instance_view.py +++ /dev/null @@ -1,39 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineAgentInstanceView(Model): - """The instance view of the VM Agent running on the virtual machine. - - :param vm_agent_version: The VM Agent full version. - :type vm_agent_version: str - :param extension_handlers: The virtual machine extension handler instance - view. - :type extension_handlers: - list[~azure.mgmt.compute.v2017_03_30.models.VirtualMachineExtensionHandlerInstanceView] - :param statuses: The resource status information. - :type statuses: - list[~azure.mgmt.compute.v2017_03_30.models.InstanceViewStatus] - """ - - _attribute_map = { - 'vm_agent_version': {'key': 'vmAgentVersion', 'type': 'str'}, - 'extension_handlers': {'key': 'extensionHandlers', 'type': '[VirtualMachineExtensionHandlerInstanceView]'}, - 'statuses': {'key': 'statuses', 'type': '[InstanceViewStatus]'}, - } - - def __init__(self, **kwargs): - super(VirtualMachineAgentInstanceView, self).__init__(**kwargs) - self.vm_agent_version = kwargs.get('vm_agent_version', None) - self.extension_handlers = kwargs.get('extension_handlers', None) - self.statuses = kwargs.get('statuses', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_agent_instance_view_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_agent_instance_view_py3.py deleted file mode 100644 index 9925dfec860b..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_agent_instance_view_py3.py +++ /dev/null @@ -1,39 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineAgentInstanceView(Model): - """The instance view of the VM Agent running on the virtual machine. - - :param vm_agent_version: The VM Agent full version. - :type vm_agent_version: str - :param extension_handlers: The virtual machine extension handler instance - view. - :type extension_handlers: - list[~azure.mgmt.compute.v2017_03_30.models.VirtualMachineExtensionHandlerInstanceView] - :param statuses: The resource status information. - :type statuses: - list[~azure.mgmt.compute.v2017_03_30.models.InstanceViewStatus] - """ - - _attribute_map = { - 'vm_agent_version': {'key': 'vmAgentVersion', 'type': 'str'}, - 'extension_handlers': {'key': 'extensionHandlers', 'type': '[VirtualMachineExtensionHandlerInstanceView]'}, - 'statuses': {'key': 'statuses', 'type': '[InstanceViewStatus]'}, - } - - def __init__(self, *, vm_agent_version: str=None, extension_handlers=None, statuses=None, **kwargs) -> None: - super(VirtualMachineAgentInstanceView, self).__init__(**kwargs) - self.vm_agent_version = vm_agent_version - self.extension_handlers = extension_handlers - self.statuses = statuses diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_capture_parameters.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_capture_parameters.py deleted file mode 100644 index 4e6ffbea7a4f..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_capture_parameters.py +++ /dev/null @@ -1,46 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineCaptureParameters(Model): - """Capture Virtual Machine parameters. - - All required parameters must be populated in order to send to Azure. - - :param vhd_prefix: Required. The captured virtual hard disk's name prefix. - :type vhd_prefix: str - :param destination_container_name: Required. The destination container - name. - :type destination_container_name: str - :param overwrite_vhds: Required. Specifies whether to overwrite the - destination virtual hard disk, in case of conflict. - :type overwrite_vhds: bool - """ - - _validation = { - 'vhd_prefix': {'required': True}, - 'destination_container_name': {'required': True}, - 'overwrite_vhds': {'required': True}, - } - - _attribute_map = { - 'vhd_prefix': {'key': 'vhdPrefix', 'type': 'str'}, - 'destination_container_name': {'key': 'destinationContainerName', 'type': 'str'}, - 'overwrite_vhds': {'key': 'overwriteVhds', 'type': 'bool'}, - } - - def __init__(self, **kwargs): - super(VirtualMachineCaptureParameters, self).__init__(**kwargs) - self.vhd_prefix = kwargs.get('vhd_prefix', None) - self.destination_container_name = kwargs.get('destination_container_name', None) - self.overwrite_vhds = kwargs.get('overwrite_vhds', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_capture_parameters_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_capture_parameters_py3.py deleted file mode 100644 index 1866cdc23300..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_capture_parameters_py3.py +++ /dev/null @@ -1,46 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineCaptureParameters(Model): - """Capture Virtual Machine parameters. - - All required parameters must be populated in order to send to Azure. - - :param vhd_prefix: Required. The captured virtual hard disk's name prefix. - :type vhd_prefix: str - :param destination_container_name: Required. The destination container - name. - :type destination_container_name: str - :param overwrite_vhds: Required. Specifies whether to overwrite the - destination virtual hard disk, in case of conflict. - :type overwrite_vhds: bool - """ - - _validation = { - 'vhd_prefix': {'required': True}, - 'destination_container_name': {'required': True}, - 'overwrite_vhds': {'required': True}, - } - - _attribute_map = { - 'vhd_prefix': {'key': 'vhdPrefix', 'type': 'str'}, - 'destination_container_name': {'key': 'destinationContainerName', 'type': 'str'}, - 'overwrite_vhds': {'key': 'overwriteVhds', 'type': 'bool'}, - } - - def __init__(self, *, vhd_prefix: str, destination_container_name: str, overwrite_vhds: bool, **kwargs) -> None: - super(VirtualMachineCaptureParameters, self).__init__(**kwargs) - self.vhd_prefix = vhd_prefix - self.destination_container_name = destination_container_name - self.overwrite_vhds = overwrite_vhds diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_capture_result.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_capture_result.py deleted file mode 100644 index 2b0df7406a34..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_capture_result.py +++ /dev/null @@ -1,31 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .sub_resource import SubResource - - -class VirtualMachineCaptureResult(SubResource): - """Resource Id. - - :param id: Resource Id - :type id: str - :param output: Operation output data (raw JSON) - :type output: object - """ - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'output': {'key': 'properties.output', 'type': 'object'}, - } - - def __init__(self, **kwargs): - super(VirtualMachineCaptureResult, self).__init__(**kwargs) - self.output = kwargs.get('output', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_capture_result_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_capture_result_py3.py deleted file mode 100644 index f2aba4286bb0..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_capture_result_py3.py +++ /dev/null @@ -1,31 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .sub_resource_py3 import SubResource - - -class VirtualMachineCaptureResult(SubResource): - """Resource Id. - - :param id: Resource Id - :type id: str - :param output: Operation output data (raw JSON) - :type output: object - """ - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'output': {'key': 'properties.output', 'type': 'object'}, - } - - def __init__(self, *, id: str=None, output=None, **kwargs) -> None: - super(VirtualMachineCaptureResult, self).__init__(id=id, **kwargs) - self.output = output diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_extension.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_extension.py deleted file mode 100644 index acca6db783aa..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_extension.py +++ /dev/null @@ -1,97 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource import Resource - - -class VirtualMachineExtension(Resource): - """Describes a Virtual Machine Extension. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource Id - :vartype id: str - :ivar name: Resource name - :vartype name: str - :ivar type: Resource type - :vartype type: str - :param location: Required. Resource location - :type location: str - :param tags: Resource tags - :type tags: dict[str, str] - :param force_update_tag: How the extension handler should be forced to - update even if the extension configuration has not changed. - :type force_update_tag: str - :param publisher: The name of the extension handler publisher. - :type publisher: str - :param virtual_machine_extension_type: Specifies the type of the - extension; an example is "CustomScriptExtension". - :type virtual_machine_extension_type: str - :param type_handler_version: Specifies the version of the script handler. - :type type_handler_version: str - :param auto_upgrade_minor_version: Indicates whether the extension should - use a newer minor version if one is available at deployment time. Once - deployed, however, the extension will not upgrade minor versions unless - redeployed, even with this property set to true. - :type auto_upgrade_minor_version: bool - :param settings: Json formatted public settings for the extension. - :type settings: object - :param protected_settings: The extension can contain either - protectedSettings or protectedSettingsFromKeyVault or no protected - settings at all. - :type protected_settings: object - :ivar provisioning_state: The provisioning state, which only appears in - the response. - :vartype provisioning_state: str - :param instance_view: The virtual machine extension instance view. - :type instance_view: - ~azure.mgmt.compute.v2017_03_30.models.VirtualMachineExtensionInstanceView - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - 'provisioning_state': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'force_update_tag': {'key': 'properties.forceUpdateTag', 'type': 'str'}, - 'publisher': {'key': 'properties.publisher', 'type': 'str'}, - 'virtual_machine_extension_type': {'key': 'properties.type', 'type': 'str'}, - 'type_handler_version': {'key': 'properties.typeHandlerVersion', 'type': 'str'}, - 'auto_upgrade_minor_version': {'key': 'properties.autoUpgradeMinorVersion', 'type': 'bool'}, - 'settings': {'key': 'properties.settings', 'type': 'object'}, - 'protected_settings': {'key': 'properties.protectedSettings', 'type': 'object'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'instance_view': {'key': 'properties.instanceView', 'type': 'VirtualMachineExtensionInstanceView'}, - } - - def __init__(self, **kwargs): - super(VirtualMachineExtension, self).__init__(**kwargs) - self.force_update_tag = kwargs.get('force_update_tag', None) - self.publisher = kwargs.get('publisher', None) - self.virtual_machine_extension_type = kwargs.get('virtual_machine_extension_type', None) - self.type_handler_version = kwargs.get('type_handler_version', None) - self.auto_upgrade_minor_version = kwargs.get('auto_upgrade_minor_version', None) - self.settings = kwargs.get('settings', None) - self.protected_settings = kwargs.get('protected_settings', None) - self.provisioning_state = None - self.instance_view = kwargs.get('instance_view', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_extension_handler_instance_view.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_extension_handler_instance_view.py deleted file mode 100644 index ce1652f57296..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_extension_handler_instance_view.py +++ /dev/null @@ -1,37 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineExtensionHandlerInstanceView(Model): - """The instance view of a virtual machine extension handler. - - :param type: Specifies the type of the extension; an example is - "CustomScriptExtension". - :type type: str - :param type_handler_version: Specifies the version of the script handler. - :type type_handler_version: str - :param status: The extension handler status. - :type status: ~azure.mgmt.compute.v2017_03_30.models.InstanceViewStatus - """ - - _attribute_map = { - 'type': {'key': 'type', 'type': 'str'}, - 'type_handler_version': {'key': 'typeHandlerVersion', 'type': 'str'}, - 'status': {'key': 'status', 'type': 'InstanceViewStatus'}, - } - - def __init__(self, **kwargs): - super(VirtualMachineExtensionHandlerInstanceView, self).__init__(**kwargs) - self.type = kwargs.get('type', None) - self.type_handler_version = kwargs.get('type_handler_version', None) - self.status = kwargs.get('status', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_extension_handler_instance_view_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_extension_handler_instance_view_py3.py deleted file mode 100644 index 8cc721eca97b..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_extension_handler_instance_view_py3.py +++ /dev/null @@ -1,37 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineExtensionHandlerInstanceView(Model): - """The instance view of a virtual machine extension handler. - - :param type: Specifies the type of the extension; an example is - "CustomScriptExtension". - :type type: str - :param type_handler_version: Specifies the version of the script handler. - :type type_handler_version: str - :param status: The extension handler status. - :type status: ~azure.mgmt.compute.v2017_03_30.models.InstanceViewStatus - """ - - _attribute_map = { - 'type': {'key': 'type', 'type': 'str'}, - 'type_handler_version': {'key': 'typeHandlerVersion', 'type': 'str'}, - 'status': {'key': 'status', 'type': 'InstanceViewStatus'}, - } - - def __init__(self, *, type: str=None, type_handler_version: str=None, status=None, **kwargs) -> None: - super(VirtualMachineExtensionHandlerInstanceView, self).__init__(**kwargs) - self.type = type - self.type_handler_version = type_handler_version - self.status = status diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_extension_image.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_extension_image.py deleted file mode 100644 index 7273e2b84754..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_extension_image.py +++ /dev/null @@ -1,81 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource import Resource - - -class VirtualMachineExtensionImage(Resource): - """Describes a Virtual Machine Extension Image. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource Id - :vartype id: str - :ivar name: Resource name - :vartype name: str - :ivar type: Resource type - :vartype type: str - :param location: Required. Resource location - :type location: str - :param tags: Resource tags - :type tags: dict[str, str] - :param operating_system: Required. The operating system this extension - supports. - :type operating_system: str - :param compute_role: Required. The type of role (IaaS or PaaS) this - extension supports. - :type compute_role: str - :param handler_schema: Required. The schema defined by publisher, where - extension consumers should provide settings in a matching schema. - :type handler_schema: str - :param vm_scale_set_enabled: Whether the extension can be used on xRP - VMScaleSets. By default existing extensions are usable on scalesets, but - there might be cases where a publisher wants to explicitly indicate the - extension is only enabled for CRP VMs but not VMSS. - :type vm_scale_set_enabled: bool - :param supports_multiple_extensions: Whether the handler can support - multiple extensions. - :type supports_multiple_extensions: bool - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - 'operating_system': {'required': True}, - 'compute_role': {'required': True}, - 'handler_schema': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'operating_system': {'key': 'properties.operatingSystem', 'type': 'str'}, - 'compute_role': {'key': 'properties.computeRole', 'type': 'str'}, - 'handler_schema': {'key': 'properties.handlerSchema', 'type': 'str'}, - 'vm_scale_set_enabled': {'key': 'properties.vmScaleSetEnabled', 'type': 'bool'}, - 'supports_multiple_extensions': {'key': 'properties.supportsMultipleExtensions', 'type': 'bool'}, - } - - def __init__(self, **kwargs): - super(VirtualMachineExtensionImage, self).__init__(**kwargs) - self.operating_system = kwargs.get('operating_system', None) - self.compute_role = kwargs.get('compute_role', None) - self.handler_schema = kwargs.get('handler_schema', None) - self.vm_scale_set_enabled = kwargs.get('vm_scale_set_enabled', None) - self.supports_multiple_extensions = kwargs.get('supports_multiple_extensions', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_extension_image_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_extension_image_py3.py deleted file mode 100644 index 3d48c3a87fb0..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_extension_image_py3.py +++ /dev/null @@ -1,81 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource_py3 import Resource - - -class VirtualMachineExtensionImage(Resource): - """Describes a Virtual Machine Extension Image. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource Id - :vartype id: str - :ivar name: Resource name - :vartype name: str - :ivar type: Resource type - :vartype type: str - :param location: Required. Resource location - :type location: str - :param tags: Resource tags - :type tags: dict[str, str] - :param operating_system: Required. The operating system this extension - supports. - :type operating_system: str - :param compute_role: Required. The type of role (IaaS or PaaS) this - extension supports. - :type compute_role: str - :param handler_schema: Required. The schema defined by publisher, where - extension consumers should provide settings in a matching schema. - :type handler_schema: str - :param vm_scale_set_enabled: Whether the extension can be used on xRP - VMScaleSets. By default existing extensions are usable on scalesets, but - there might be cases where a publisher wants to explicitly indicate the - extension is only enabled for CRP VMs but not VMSS. - :type vm_scale_set_enabled: bool - :param supports_multiple_extensions: Whether the handler can support - multiple extensions. - :type supports_multiple_extensions: bool - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - 'operating_system': {'required': True}, - 'compute_role': {'required': True}, - 'handler_schema': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'operating_system': {'key': 'properties.operatingSystem', 'type': 'str'}, - 'compute_role': {'key': 'properties.computeRole', 'type': 'str'}, - 'handler_schema': {'key': 'properties.handlerSchema', 'type': 'str'}, - 'vm_scale_set_enabled': {'key': 'properties.vmScaleSetEnabled', 'type': 'bool'}, - 'supports_multiple_extensions': {'key': 'properties.supportsMultipleExtensions', 'type': 'bool'}, - } - - def __init__(self, *, location: str, operating_system: str, compute_role: str, handler_schema: str, tags=None, vm_scale_set_enabled: bool=None, supports_multiple_extensions: bool=None, **kwargs) -> None: - super(VirtualMachineExtensionImage, self).__init__(location=location, tags=tags, **kwargs) - self.operating_system = operating_system - self.compute_role = compute_role - self.handler_schema = handler_schema - self.vm_scale_set_enabled = vm_scale_set_enabled - self.supports_multiple_extensions = supports_multiple_extensions diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_extension_instance_view.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_extension_instance_view.py deleted file mode 100644 index 911d11800a27..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_extension_instance_view.py +++ /dev/null @@ -1,47 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineExtensionInstanceView(Model): - """The instance view of a virtual machine extension. - - :param name: The virtual machine extension name. - :type name: str - :param type: Specifies the type of the extension; an example is - "CustomScriptExtension". - :type type: str - :param type_handler_version: Specifies the version of the script handler. - :type type_handler_version: str - :param substatuses: The resource status information. - :type substatuses: - list[~azure.mgmt.compute.v2017_03_30.models.InstanceViewStatus] - :param statuses: The resource status information. - :type statuses: - list[~azure.mgmt.compute.v2017_03_30.models.InstanceViewStatus] - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'type_handler_version': {'key': 'typeHandlerVersion', 'type': 'str'}, - 'substatuses': {'key': 'substatuses', 'type': '[InstanceViewStatus]'}, - 'statuses': {'key': 'statuses', 'type': '[InstanceViewStatus]'}, - } - - def __init__(self, **kwargs): - super(VirtualMachineExtensionInstanceView, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.type = kwargs.get('type', None) - self.type_handler_version = kwargs.get('type_handler_version', None) - self.substatuses = kwargs.get('substatuses', None) - self.statuses = kwargs.get('statuses', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_extension_instance_view_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_extension_instance_view_py3.py deleted file mode 100644 index 8a463c3bfe1c..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_extension_instance_view_py3.py +++ /dev/null @@ -1,47 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineExtensionInstanceView(Model): - """The instance view of a virtual machine extension. - - :param name: The virtual machine extension name. - :type name: str - :param type: Specifies the type of the extension; an example is - "CustomScriptExtension". - :type type: str - :param type_handler_version: Specifies the version of the script handler. - :type type_handler_version: str - :param substatuses: The resource status information. - :type substatuses: - list[~azure.mgmt.compute.v2017_03_30.models.InstanceViewStatus] - :param statuses: The resource status information. - :type statuses: - list[~azure.mgmt.compute.v2017_03_30.models.InstanceViewStatus] - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'type_handler_version': {'key': 'typeHandlerVersion', 'type': 'str'}, - 'substatuses': {'key': 'substatuses', 'type': '[InstanceViewStatus]'}, - 'statuses': {'key': 'statuses', 'type': '[InstanceViewStatus]'}, - } - - def __init__(self, *, name: str=None, type: str=None, type_handler_version: str=None, substatuses=None, statuses=None, **kwargs) -> None: - super(VirtualMachineExtensionInstanceView, self).__init__(**kwargs) - self.name = name - self.type = type - self.type_handler_version = type_handler_version - self.substatuses = substatuses - self.statuses = statuses diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_extension_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_extension_py3.py deleted file mode 100644 index 4c3ca49d093b..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_extension_py3.py +++ /dev/null @@ -1,97 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource_py3 import Resource - - -class VirtualMachineExtension(Resource): - """Describes a Virtual Machine Extension. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource Id - :vartype id: str - :ivar name: Resource name - :vartype name: str - :ivar type: Resource type - :vartype type: str - :param location: Required. Resource location - :type location: str - :param tags: Resource tags - :type tags: dict[str, str] - :param force_update_tag: How the extension handler should be forced to - update even if the extension configuration has not changed. - :type force_update_tag: str - :param publisher: The name of the extension handler publisher. - :type publisher: str - :param virtual_machine_extension_type: Specifies the type of the - extension; an example is "CustomScriptExtension". - :type virtual_machine_extension_type: str - :param type_handler_version: Specifies the version of the script handler. - :type type_handler_version: str - :param auto_upgrade_minor_version: Indicates whether the extension should - use a newer minor version if one is available at deployment time. Once - deployed, however, the extension will not upgrade minor versions unless - redeployed, even with this property set to true. - :type auto_upgrade_minor_version: bool - :param settings: Json formatted public settings for the extension. - :type settings: object - :param protected_settings: The extension can contain either - protectedSettings or protectedSettingsFromKeyVault or no protected - settings at all. - :type protected_settings: object - :ivar provisioning_state: The provisioning state, which only appears in - the response. - :vartype provisioning_state: str - :param instance_view: The virtual machine extension instance view. - :type instance_view: - ~azure.mgmt.compute.v2017_03_30.models.VirtualMachineExtensionInstanceView - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - 'provisioning_state': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'force_update_tag': {'key': 'properties.forceUpdateTag', 'type': 'str'}, - 'publisher': {'key': 'properties.publisher', 'type': 'str'}, - 'virtual_machine_extension_type': {'key': 'properties.type', 'type': 'str'}, - 'type_handler_version': {'key': 'properties.typeHandlerVersion', 'type': 'str'}, - 'auto_upgrade_minor_version': {'key': 'properties.autoUpgradeMinorVersion', 'type': 'bool'}, - 'settings': {'key': 'properties.settings', 'type': 'object'}, - 'protected_settings': {'key': 'properties.protectedSettings', 'type': 'object'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'instance_view': {'key': 'properties.instanceView', 'type': 'VirtualMachineExtensionInstanceView'}, - } - - def __init__(self, *, location: str, tags=None, force_update_tag: str=None, publisher: str=None, virtual_machine_extension_type: str=None, type_handler_version: str=None, auto_upgrade_minor_version: bool=None, settings=None, protected_settings=None, instance_view=None, **kwargs) -> None: - super(VirtualMachineExtension, self).__init__(location=location, tags=tags, **kwargs) - self.force_update_tag = force_update_tag - self.publisher = publisher - self.virtual_machine_extension_type = virtual_machine_extension_type - self.type_handler_version = type_handler_version - self.auto_upgrade_minor_version = auto_upgrade_minor_version - self.settings = settings - self.protected_settings = protected_settings - self.provisioning_state = None - self.instance_view = instance_view diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_extension_update.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_extension_update.py deleted file mode 100644 index b920ff57ff96..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_extension_update.py +++ /dev/null @@ -1,62 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .update_resource import UpdateResource - - -class VirtualMachineExtensionUpdate(UpdateResource): - """Describes a Virtual Machine Extension. - - :param tags: Resource tags - :type tags: dict[str, str] - :param force_update_tag: How the extension handler should be forced to - update even if the extension configuration has not changed. - :type force_update_tag: str - :param publisher: The name of the extension handler publisher. - :type publisher: str - :param type: Specifies the type of the extension; an example is - "CustomScriptExtension". - :type type: str - :param type_handler_version: Specifies the version of the script handler. - :type type_handler_version: str - :param auto_upgrade_minor_version: Indicates whether the extension should - use a newer minor version if one is available at deployment time. Once - deployed, however, the extension will not upgrade minor versions unless - redeployed, even with this property set to true. - :type auto_upgrade_minor_version: bool - :param settings: Json formatted public settings for the extension. - :type settings: object - :param protected_settings: The extension can contain either - protectedSettings or protectedSettingsFromKeyVault or no protected - settings at all. - :type protected_settings: object - """ - - _attribute_map = { - 'tags': {'key': 'tags', 'type': '{str}'}, - 'force_update_tag': {'key': 'properties.forceUpdateTag', 'type': 'str'}, - 'publisher': {'key': 'properties.publisher', 'type': 'str'}, - 'type': {'key': 'properties.type', 'type': 'str'}, - 'type_handler_version': {'key': 'properties.typeHandlerVersion', 'type': 'str'}, - 'auto_upgrade_minor_version': {'key': 'properties.autoUpgradeMinorVersion', 'type': 'bool'}, - 'settings': {'key': 'properties.settings', 'type': 'object'}, - 'protected_settings': {'key': 'properties.protectedSettings', 'type': 'object'}, - } - - def __init__(self, **kwargs): - super(VirtualMachineExtensionUpdate, self).__init__(**kwargs) - self.force_update_tag = kwargs.get('force_update_tag', None) - self.publisher = kwargs.get('publisher', None) - self.type = kwargs.get('type', None) - self.type_handler_version = kwargs.get('type_handler_version', None) - self.auto_upgrade_minor_version = kwargs.get('auto_upgrade_minor_version', None) - self.settings = kwargs.get('settings', None) - self.protected_settings = kwargs.get('protected_settings', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_extension_update_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_extension_update_py3.py deleted file mode 100644 index c32c18d32759..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_extension_update_py3.py +++ /dev/null @@ -1,62 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .update_resource_py3 import UpdateResource - - -class VirtualMachineExtensionUpdate(UpdateResource): - """Describes a Virtual Machine Extension. - - :param tags: Resource tags - :type tags: dict[str, str] - :param force_update_tag: How the extension handler should be forced to - update even if the extension configuration has not changed. - :type force_update_tag: str - :param publisher: The name of the extension handler publisher. - :type publisher: str - :param type: Specifies the type of the extension; an example is - "CustomScriptExtension". - :type type: str - :param type_handler_version: Specifies the version of the script handler. - :type type_handler_version: str - :param auto_upgrade_minor_version: Indicates whether the extension should - use a newer minor version if one is available at deployment time. Once - deployed, however, the extension will not upgrade minor versions unless - redeployed, even with this property set to true. - :type auto_upgrade_minor_version: bool - :param settings: Json formatted public settings for the extension. - :type settings: object - :param protected_settings: The extension can contain either - protectedSettings or protectedSettingsFromKeyVault or no protected - settings at all. - :type protected_settings: object - """ - - _attribute_map = { - 'tags': {'key': 'tags', 'type': '{str}'}, - 'force_update_tag': {'key': 'properties.forceUpdateTag', 'type': 'str'}, - 'publisher': {'key': 'properties.publisher', 'type': 'str'}, - 'type': {'key': 'properties.type', 'type': 'str'}, - 'type_handler_version': {'key': 'properties.typeHandlerVersion', 'type': 'str'}, - 'auto_upgrade_minor_version': {'key': 'properties.autoUpgradeMinorVersion', 'type': 'bool'}, - 'settings': {'key': 'properties.settings', 'type': 'object'}, - 'protected_settings': {'key': 'properties.protectedSettings', 'type': 'object'}, - } - - def __init__(self, *, tags=None, force_update_tag: str=None, publisher: str=None, type: str=None, type_handler_version: str=None, auto_upgrade_minor_version: bool=None, settings=None, protected_settings=None, **kwargs) -> None: - super(VirtualMachineExtensionUpdate, self).__init__(tags=tags, **kwargs) - self.force_update_tag = force_update_tag - self.publisher = publisher - self.type = type - self.type_handler_version = type_handler_version - self.auto_upgrade_minor_version = auto_upgrade_minor_version - self.settings = settings - self.protected_settings = protected_settings diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_extensions_list_result.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_extensions_list_result.py deleted file mode 100644 index b9ec6933233e..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_extensions_list_result.py +++ /dev/null @@ -1,29 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineExtensionsListResult(Model): - """The List Extension operation response. - - :param value: The list of extensions - :type value: - list[~azure.mgmt.compute.v2017_03_30.models.VirtualMachineExtension] - """ - - _attribute_map = { - 'value': {'key': 'value', 'type': '[VirtualMachineExtension]'}, - } - - def __init__(self, **kwargs): - super(VirtualMachineExtensionsListResult, self).__init__(**kwargs) - self.value = kwargs.get('value', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_extensions_list_result_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_extensions_list_result_py3.py deleted file mode 100644 index 86e0ae2c7f2b..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_extensions_list_result_py3.py +++ /dev/null @@ -1,29 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineExtensionsListResult(Model): - """The List Extension operation response. - - :param value: The list of extensions - :type value: - list[~azure.mgmt.compute.v2017_03_30.models.VirtualMachineExtension] - """ - - _attribute_map = { - 'value': {'key': 'value', 'type': '[VirtualMachineExtension]'}, - } - - def __init__(self, *, value=None, **kwargs) -> None: - super(VirtualMachineExtensionsListResult, self).__init__(**kwargs) - self.value = value diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_health_status.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_health_status.py deleted file mode 100644 index 3e090308f6e4..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_health_status.py +++ /dev/null @@ -1,35 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineHealthStatus(Model): - """The health status of the VM. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar status: The health status information for the VM. - :vartype status: ~azure.mgmt.compute.v2017_03_30.models.InstanceViewStatus - """ - - _validation = { - 'status': {'readonly': True}, - } - - _attribute_map = { - 'status': {'key': 'status', 'type': 'InstanceViewStatus'}, - } - - def __init__(self, **kwargs): - super(VirtualMachineHealthStatus, self).__init__(**kwargs) - self.status = None diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_health_status_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_health_status_py3.py deleted file mode 100644 index b8259077b098..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_health_status_py3.py +++ /dev/null @@ -1,35 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineHealthStatus(Model): - """The health status of the VM. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar status: The health status information for the VM. - :vartype status: ~azure.mgmt.compute.v2017_03_30.models.InstanceViewStatus - """ - - _validation = { - 'status': {'readonly': True}, - } - - _attribute_map = { - 'status': {'key': 'status', 'type': 'InstanceViewStatus'}, - } - - def __init__(self, **kwargs) -> None: - super(VirtualMachineHealthStatus, self).__init__(**kwargs) - self.status = None diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_identity.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_identity.py deleted file mode 100644 index c80cf2eb3930..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_identity.py +++ /dev/null @@ -1,47 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineIdentity(Model): - """Identity for the virtual machine. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar principal_id: The principal id of virtual machine identity. - :vartype principal_id: str - :ivar tenant_id: The tenant id associated with the virtual machine. - :vartype tenant_id: str - :param type: The type of identity used for the virtual machine. Currently, - the only supported type is 'SystemAssigned', which implicitly creates an - identity. Possible values include: 'SystemAssigned' - :type type: str or - ~azure.mgmt.compute.v2017_03_30.models.ResourceIdentityType - """ - - _validation = { - 'principal_id': {'readonly': True}, - 'tenant_id': {'readonly': True}, - } - - _attribute_map = { - 'principal_id': {'key': 'principalId', 'type': 'str'}, - 'tenant_id': {'key': 'tenantId', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'ResourceIdentityType'}, - } - - def __init__(self, **kwargs): - super(VirtualMachineIdentity, self).__init__(**kwargs) - self.principal_id = None - self.tenant_id = None - self.type = kwargs.get('type', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_identity_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_identity_py3.py deleted file mode 100644 index b12f77bea153..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_identity_py3.py +++ /dev/null @@ -1,47 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineIdentity(Model): - """Identity for the virtual machine. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar principal_id: The principal id of virtual machine identity. - :vartype principal_id: str - :ivar tenant_id: The tenant id associated with the virtual machine. - :vartype tenant_id: str - :param type: The type of identity used for the virtual machine. Currently, - the only supported type is 'SystemAssigned', which implicitly creates an - identity. Possible values include: 'SystemAssigned' - :type type: str or - ~azure.mgmt.compute.v2017_03_30.models.ResourceIdentityType - """ - - _validation = { - 'principal_id': {'readonly': True}, - 'tenant_id': {'readonly': True}, - } - - _attribute_map = { - 'principal_id': {'key': 'principalId', 'type': 'str'}, - 'tenant_id': {'key': 'tenantId', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'ResourceIdentityType'}, - } - - def __init__(self, *, type=None, **kwargs) -> None: - super(VirtualMachineIdentity, self).__init__(**kwargs) - self.principal_id = None - self.tenant_id = None - self.type = type diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_image.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_image.py deleted file mode 100644 index 2d2fd671b549..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_image.py +++ /dev/null @@ -1,59 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .virtual_machine_image_resource import VirtualMachineImageResource - - -class VirtualMachineImage(VirtualMachineImageResource): - """Describes a Virtual Machine Image. - - All required parameters must be populated in order to send to Azure. - - :param id: Resource Id - :type id: str - :param name: Required. The name of the resource. - :type name: str - :param location: Required. The supported Azure location of the resource. - :type location: str - :param tags: Specifies the tags that are assigned to the virtual machine. - For more information about using tags, see [Using tags to organize your - Azure - resources](https://docs.microsoft.com/azure/azure-resource-manager/resource-group-using-tags.md). - :type tags: dict[str, str] - :param plan: - :type plan: ~azure.mgmt.compute.v2017_03_30.models.PurchasePlan - :param os_disk_image: - :type os_disk_image: ~azure.mgmt.compute.v2017_03_30.models.OSDiskImage - :param data_disk_images: - :type data_disk_images: - list[~azure.mgmt.compute.v2017_03_30.models.DataDiskImage] - """ - - _validation = { - 'name': {'required': True}, - 'location': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'plan': {'key': 'properties.plan', 'type': 'PurchasePlan'}, - 'os_disk_image': {'key': 'properties.osDiskImage', 'type': 'OSDiskImage'}, - 'data_disk_images': {'key': 'properties.dataDiskImages', 'type': '[DataDiskImage]'}, - } - - def __init__(self, **kwargs): - super(VirtualMachineImage, self).__init__(**kwargs) - self.plan = kwargs.get('plan', None) - self.os_disk_image = kwargs.get('os_disk_image', None) - self.data_disk_images = kwargs.get('data_disk_images', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_image_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_image_py3.py deleted file mode 100644 index 0140c64c7c4f..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_image_py3.py +++ /dev/null @@ -1,59 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .virtual_machine_image_resource_py3 import VirtualMachineImageResource - - -class VirtualMachineImage(VirtualMachineImageResource): - """Describes a Virtual Machine Image. - - All required parameters must be populated in order to send to Azure. - - :param id: Resource Id - :type id: str - :param name: Required. The name of the resource. - :type name: str - :param location: Required. The supported Azure location of the resource. - :type location: str - :param tags: Specifies the tags that are assigned to the virtual machine. - For more information about using tags, see [Using tags to organize your - Azure - resources](https://docs.microsoft.com/azure/azure-resource-manager/resource-group-using-tags.md). - :type tags: dict[str, str] - :param plan: - :type plan: ~azure.mgmt.compute.v2017_03_30.models.PurchasePlan - :param os_disk_image: - :type os_disk_image: ~azure.mgmt.compute.v2017_03_30.models.OSDiskImage - :param data_disk_images: - :type data_disk_images: - list[~azure.mgmt.compute.v2017_03_30.models.DataDiskImage] - """ - - _validation = { - 'name': {'required': True}, - 'location': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'plan': {'key': 'properties.plan', 'type': 'PurchasePlan'}, - 'os_disk_image': {'key': 'properties.osDiskImage', 'type': 'OSDiskImage'}, - 'data_disk_images': {'key': 'properties.dataDiskImages', 'type': '[DataDiskImage]'}, - } - - def __init__(self, *, name: str, location: str, id: str=None, tags=None, plan=None, os_disk_image=None, data_disk_images=None, **kwargs) -> None: - super(VirtualMachineImage, self).__init__(id=id, name=name, location=location, tags=tags, **kwargs) - self.plan = plan - self.os_disk_image = os_disk_image - self.data_disk_images = data_disk_images diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_image_resource.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_image_resource.py deleted file mode 100644 index 8807cc8f391b..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_image_resource.py +++ /dev/null @@ -1,49 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .sub_resource import SubResource - - -class VirtualMachineImageResource(SubResource): - """Virtual machine image resource information. - - All required parameters must be populated in order to send to Azure. - - :param id: Resource Id - :type id: str - :param name: Required. The name of the resource. - :type name: str - :param location: Required. The supported Azure location of the resource. - :type location: str - :param tags: Specifies the tags that are assigned to the virtual machine. - For more information about using tags, see [Using tags to organize your - Azure - resources](https://docs.microsoft.com/azure/azure-resource-manager/resource-group-using-tags.md). - :type tags: dict[str, str] - """ - - _validation = { - 'name': {'required': True}, - 'location': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - } - - def __init__(self, **kwargs): - super(VirtualMachineImageResource, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.location = kwargs.get('location', None) - self.tags = kwargs.get('tags', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_image_resource_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_image_resource_py3.py deleted file mode 100644 index b9d63a8bc9e0..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_image_resource_py3.py +++ /dev/null @@ -1,49 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .sub_resource_py3 import SubResource - - -class VirtualMachineImageResource(SubResource): - """Virtual machine image resource information. - - All required parameters must be populated in order to send to Azure. - - :param id: Resource Id - :type id: str - :param name: Required. The name of the resource. - :type name: str - :param location: Required. The supported Azure location of the resource. - :type location: str - :param tags: Specifies the tags that are assigned to the virtual machine. - For more information about using tags, see [Using tags to organize your - Azure - resources](https://docs.microsoft.com/azure/azure-resource-manager/resource-group-using-tags.md). - :type tags: dict[str, str] - """ - - _validation = { - 'name': {'required': True}, - 'location': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - } - - def __init__(self, *, name: str, location: str, id: str=None, tags=None, **kwargs) -> None: - super(VirtualMachineImageResource, self).__init__(id=id, **kwargs) - self.name = name - self.location = location - self.tags = tags diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_instance_view.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_instance_view.py deleted file mode 100644 index ceb11db65060..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_instance_view.py +++ /dev/null @@ -1,71 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineInstanceView(Model): - """The instance view of a virtual machine. - - :param platform_update_domain: Specifies the update domain of the virtual - machine. - :type platform_update_domain: int - :param platform_fault_domain: Specifies the fault domain of the virtual - machine. - :type platform_fault_domain: int - :param rdp_thumb_print: The Remote desktop certificate thumbprint. - :type rdp_thumb_print: str - :param vm_agent: The VM Agent running on the virtual machine. - :type vm_agent: - ~azure.mgmt.compute.v2017_03_30.models.VirtualMachineAgentInstanceView - :param maintenance_redeploy_status: The Maintenance Operation status on - the virtual machine. - :type maintenance_redeploy_status: - ~azure.mgmt.compute.v2017_03_30.models.MaintenanceRedeployStatus - :param disks: The virtual machine disk information. - :type disks: list[~azure.mgmt.compute.v2017_03_30.models.DiskInstanceView] - :param extensions: The extensions information. - :type extensions: - list[~azure.mgmt.compute.v2017_03_30.models.VirtualMachineExtensionInstanceView] - :param boot_diagnostics: Boot Diagnostics is a debugging feature which - allows you to view Console Output and Screenshot to diagnose VM status. -

    You can easily view the output of your console log.

    - Azure also enables you to see a screenshot of the VM from the hypervisor. - :type boot_diagnostics: - ~azure.mgmt.compute.v2017_03_30.models.BootDiagnosticsInstanceView - :param statuses: The resource status information. - :type statuses: - list[~azure.mgmt.compute.v2017_03_30.models.InstanceViewStatus] - """ - - _attribute_map = { - 'platform_update_domain': {'key': 'platformUpdateDomain', 'type': 'int'}, - 'platform_fault_domain': {'key': 'platformFaultDomain', 'type': 'int'}, - 'rdp_thumb_print': {'key': 'rdpThumbPrint', 'type': 'str'}, - 'vm_agent': {'key': 'vmAgent', 'type': 'VirtualMachineAgentInstanceView'}, - 'maintenance_redeploy_status': {'key': 'maintenanceRedeployStatus', 'type': 'MaintenanceRedeployStatus'}, - 'disks': {'key': 'disks', 'type': '[DiskInstanceView]'}, - 'extensions': {'key': 'extensions', 'type': '[VirtualMachineExtensionInstanceView]'}, - 'boot_diagnostics': {'key': 'bootDiagnostics', 'type': 'BootDiagnosticsInstanceView'}, - 'statuses': {'key': 'statuses', 'type': '[InstanceViewStatus]'}, - } - - def __init__(self, **kwargs): - super(VirtualMachineInstanceView, self).__init__(**kwargs) - self.platform_update_domain = kwargs.get('platform_update_domain', None) - self.platform_fault_domain = kwargs.get('platform_fault_domain', None) - self.rdp_thumb_print = kwargs.get('rdp_thumb_print', None) - self.vm_agent = kwargs.get('vm_agent', None) - self.maintenance_redeploy_status = kwargs.get('maintenance_redeploy_status', None) - self.disks = kwargs.get('disks', None) - self.extensions = kwargs.get('extensions', None) - self.boot_diagnostics = kwargs.get('boot_diagnostics', None) - self.statuses = kwargs.get('statuses', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_instance_view_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_instance_view_py3.py deleted file mode 100644 index 20e30243b307..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_instance_view_py3.py +++ /dev/null @@ -1,71 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineInstanceView(Model): - """The instance view of a virtual machine. - - :param platform_update_domain: Specifies the update domain of the virtual - machine. - :type platform_update_domain: int - :param platform_fault_domain: Specifies the fault domain of the virtual - machine. - :type platform_fault_domain: int - :param rdp_thumb_print: The Remote desktop certificate thumbprint. - :type rdp_thumb_print: str - :param vm_agent: The VM Agent running on the virtual machine. - :type vm_agent: - ~azure.mgmt.compute.v2017_03_30.models.VirtualMachineAgentInstanceView - :param maintenance_redeploy_status: The Maintenance Operation status on - the virtual machine. - :type maintenance_redeploy_status: - ~azure.mgmt.compute.v2017_03_30.models.MaintenanceRedeployStatus - :param disks: The virtual machine disk information. - :type disks: list[~azure.mgmt.compute.v2017_03_30.models.DiskInstanceView] - :param extensions: The extensions information. - :type extensions: - list[~azure.mgmt.compute.v2017_03_30.models.VirtualMachineExtensionInstanceView] - :param boot_diagnostics: Boot Diagnostics is a debugging feature which - allows you to view Console Output and Screenshot to diagnose VM status. -

    You can easily view the output of your console log.

    - Azure also enables you to see a screenshot of the VM from the hypervisor. - :type boot_diagnostics: - ~azure.mgmt.compute.v2017_03_30.models.BootDiagnosticsInstanceView - :param statuses: The resource status information. - :type statuses: - list[~azure.mgmt.compute.v2017_03_30.models.InstanceViewStatus] - """ - - _attribute_map = { - 'platform_update_domain': {'key': 'platformUpdateDomain', 'type': 'int'}, - 'platform_fault_domain': {'key': 'platformFaultDomain', 'type': 'int'}, - 'rdp_thumb_print': {'key': 'rdpThumbPrint', 'type': 'str'}, - 'vm_agent': {'key': 'vmAgent', 'type': 'VirtualMachineAgentInstanceView'}, - 'maintenance_redeploy_status': {'key': 'maintenanceRedeployStatus', 'type': 'MaintenanceRedeployStatus'}, - 'disks': {'key': 'disks', 'type': '[DiskInstanceView]'}, - 'extensions': {'key': 'extensions', 'type': '[VirtualMachineExtensionInstanceView]'}, - 'boot_diagnostics': {'key': 'bootDiagnostics', 'type': 'BootDiagnosticsInstanceView'}, - 'statuses': {'key': 'statuses', 'type': '[InstanceViewStatus]'}, - } - - def __init__(self, *, platform_update_domain: int=None, platform_fault_domain: int=None, rdp_thumb_print: str=None, vm_agent=None, maintenance_redeploy_status=None, disks=None, extensions=None, boot_diagnostics=None, statuses=None, **kwargs) -> None: - super(VirtualMachineInstanceView, self).__init__(**kwargs) - self.platform_update_domain = platform_update_domain - self.platform_fault_domain = platform_fault_domain - self.rdp_thumb_print = rdp_thumb_print - self.vm_agent = vm_agent - self.maintenance_redeploy_status = maintenance_redeploy_status - self.disks = disks - self.extensions = extensions - self.boot_diagnostics = boot_diagnostics - self.statuses = statuses diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_paged.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_paged.py deleted file mode 100644 index e2938c44e860..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class VirtualMachinePaged(Paged): - """ - A paging container for iterating over a list of :class:`VirtualMachine ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[VirtualMachine]'} - } - - def __init__(self, *args, **kwargs): - - super(VirtualMachinePaged, self).__init__(*args, **kwargs) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_py3.py deleted file mode 100644 index b5490bf83f01..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_py3.py +++ /dev/null @@ -1,150 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource_py3 import Resource - - -class VirtualMachine(Resource): - """Describes a Virtual Machine. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource Id - :vartype id: str - :ivar name: Resource name - :vartype name: str - :ivar type: Resource type - :vartype type: str - :param location: Required. Resource location - :type location: str - :param tags: Resource tags - :type tags: dict[str, str] - :param plan: Specifies information about the marketplace image used to - create the virtual machine. This element is only used for marketplace - images. Before you can use a marketplace image from an API, you must - enable the image for programmatic use. In the Azure portal, find the - marketplace image that you want to use and then click **Want to deploy - programmatically, Get Started ->**. Enter any required information and - then click **Save**. - :type plan: ~azure.mgmt.compute.v2017_03_30.models.Plan - :param hardware_profile: Specifies the hardware settings for the virtual - machine. - :type hardware_profile: - ~azure.mgmt.compute.v2017_03_30.models.HardwareProfile - :param storage_profile: Specifies the storage settings for the virtual - machine disks. - :type storage_profile: - ~azure.mgmt.compute.v2017_03_30.models.StorageProfile - :param os_profile: Specifies the operating system settings for the virtual - machine. - :type os_profile: ~azure.mgmt.compute.v2017_03_30.models.OSProfile - :param network_profile: Specifies the network interfaces of the virtual - machine. - :type network_profile: - ~azure.mgmt.compute.v2017_03_30.models.NetworkProfile - :param diagnostics_profile: Specifies the boot diagnostic settings state. -

    Minimum api-version: 2015-06-15. - :type diagnostics_profile: - ~azure.mgmt.compute.v2017_03_30.models.DiagnosticsProfile - :param availability_set: Specifies information about the availability set - that the virtual machine should be assigned to. Virtual machines specified - in the same availability set are allocated to different nodes to maximize - availability. For more information about availability sets, see [Manage - the availability of virtual - machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-manage-availability?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). -

    For more information on Azure planned maintenance, see [Planned - maintenance for virtual machines in - Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-planned-maintenance?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json) -

    Currently, a VM can only be added to availability set at creation - time. An existing VM cannot be added to an availability set. - :type availability_set: ~azure.mgmt.compute.v2017_03_30.models.SubResource - :ivar provisioning_state: The provisioning state, which only appears in - the response. - :vartype provisioning_state: str - :ivar instance_view: The virtual machine instance view. - :vartype instance_view: - ~azure.mgmt.compute.v2017_03_30.models.VirtualMachineInstanceView - :param license_type: Specifies that the image or disk that is being used - was licensed on-premises. This element is only used for images that - contain the Windows Server operating system.

    Possible values are: -

    Windows_Client

    Windows_Server

    If this element - is included in a request for an update, the value must match the initial - value. This value cannot be updated.

    For more information, see - [Azure Hybrid Use Benefit for Windows - Server](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-hybrid-use-benefit-licensing?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json) -

    Minimum api-version: 2015-06-15 - :type license_type: str - :ivar vm_id: Specifies the VM unique ID which is a 128-bits identifier - that is encoded and stored in all Azure IaaS VMs SMBIOS and can be read - using platform BIOS commands. - :vartype vm_id: str - :ivar resources: The virtual machine child extension resources. - :vartype resources: - list[~azure.mgmt.compute.v2017_03_30.models.VirtualMachineExtension] - :param identity: The identity of the virtual machine, if configured. - :type identity: - ~azure.mgmt.compute.v2017_03_30.models.VirtualMachineIdentity - :param zones: The virtual machine zones. - :type zones: list[str] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - 'provisioning_state': {'readonly': True}, - 'instance_view': {'readonly': True}, - 'vm_id': {'readonly': True}, - 'resources': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'plan': {'key': 'plan', 'type': 'Plan'}, - 'hardware_profile': {'key': 'properties.hardwareProfile', 'type': 'HardwareProfile'}, - 'storage_profile': {'key': 'properties.storageProfile', 'type': 'StorageProfile'}, - 'os_profile': {'key': 'properties.osProfile', 'type': 'OSProfile'}, - 'network_profile': {'key': 'properties.networkProfile', 'type': 'NetworkProfile'}, - 'diagnostics_profile': {'key': 'properties.diagnosticsProfile', 'type': 'DiagnosticsProfile'}, - 'availability_set': {'key': 'properties.availabilitySet', 'type': 'SubResource'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'instance_view': {'key': 'properties.instanceView', 'type': 'VirtualMachineInstanceView'}, - 'license_type': {'key': 'properties.licenseType', 'type': 'str'}, - 'vm_id': {'key': 'properties.vmId', 'type': 'str'}, - 'resources': {'key': 'resources', 'type': '[VirtualMachineExtension]'}, - 'identity': {'key': 'identity', 'type': 'VirtualMachineIdentity'}, - 'zones': {'key': 'zones', 'type': '[str]'}, - } - - def __init__(self, *, location: str, tags=None, plan=None, hardware_profile=None, storage_profile=None, os_profile=None, network_profile=None, diagnostics_profile=None, availability_set=None, license_type: str=None, identity=None, zones=None, **kwargs) -> None: - super(VirtualMachine, self).__init__(location=location, tags=tags, **kwargs) - self.plan = plan - self.hardware_profile = hardware_profile - self.storage_profile = storage_profile - self.os_profile = os_profile - self.network_profile = network_profile - self.diagnostics_profile = diagnostics_profile - self.availability_set = availability_set - self.provisioning_state = None - self.instance_view = None - self.license_type = license_type - self.vm_id = None - self.resources = None - self.identity = identity - self.zones = zones diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_scale_set.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_scale_set.py deleted file mode 100644 index 70385ea757b0..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_scale_set.py +++ /dev/null @@ -1,106 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource import Resource - - -class VirtualMachineScaleSet(Resource): - """Describes a Virtual Machine Scale Set. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource Id - :vartype id: str - :ivar name: Resource name - :vartype name: str - :ivar type: Resource type - :vartype type: str - :param location: Required. Resource location - :type location: str - :param tags: Resource tags - :type tags: dict[str, str] - :param sku: The virtual machine scale set sku. - :type sku: ~azure.mgmt.compute.v2017_03_30.models.Sku - :param plan: Specifies information about the marketplace image used to - create the virtual machine. This element is only used for marketplace - images. Before you can use a marketplace image from an API, you must - enable the image for programmatic use. In the Azure portal, find the - marketplace image that you want to use and then click **Want to deploy - programmatically, Get Started ->**. Enter any required information and - then click **Save**. - :type plan: ~azure.mgmt.compute.v2017_03_30.models.Plan - :param upgrade_policy: The upgrade policy. - :type upgrade_policy: ~azure.mgmt.compute.v2017_03_30.models.UpgradePolicy - :param virtual_machine_profile: The virtual machine profile. - :type virtual_machine_profile: - ~azure.mgmt.compute.v2017_03_30.models.VirtualMachineScaleSetVMProfile - :ivar provisioning_state: The provisioning state, which only appears in - the response. - :vartype provisioning_state: str - :param overprovision: Specifies whether the Virtual Machine Scale Set - should be overprovisioned. - :type overprovision: bool - :ivar unique_id: Specifies the ID which uniquely identifies a Virtual - Machine Scale Set. - :vartype unique_id: str - :param single_placement_group: When true this limits the scale set to a - single placement group, of max size 100 virtual machines. - :type single_placement_group: bool - :param identity: The identity of the virtual machine scale set, if - configured. - :type identity: - ~azure.mgmt.compute.v2017_03_30.models.VirtualMachineScaleSetIdentity - :param zones: The virtual machine scale set zones. - :type zones: list[str] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - 'provisioning_state': {'readonly': True}, - 'unique_id': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'sku': {'key': 'sku', 'type': 'Sku'}, - 'plan': {'key': 'plan', 'type': 'Plan'}, - 'upgrade_policy': {'key': 'properties.upgradePolicy', 'type': 'UpgradePolicy'}, - 'virtual_machine_profile': {'key': 'properties.virtualMachineProfile', 'type': 'VirtualMachineScaleSetVMProfile'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'overprovision': {'key': 'properties.overprovision', 'type': 'bool'}, - 'unique_id': {'key': 'properties.uniqueId', 'type': 'str'}, - 'single_placement_group': {'key': 'properties.singlePlacementGroup', 'type': 'bool'}, - 'identity': {'key': 'identity', 'type': 'VirtualMachineScaleSetIdentity'}, - 'zones': {'key': 'zones', 'type': '[str]'}, - } - - def __init__(self, **kwargs): - super(VirtualMachineScaleSet, self).__init__(**kwargs) - self.sku = kwargs.get('sku', None) - self.plan = kwargs.get('plan', None) - self.upgrade_policy = kwargs.get('upgrade_policy', None) - self.virtual_machine_profile = kwargs.get('virtual_machine_profile', None) - self.provisioning_state = None - self.overprovision = kwargs.get('overprovision', None) - self.unique_id = None - self.single_placement_group = kwargs.get('single_placement_group', None) - self.identity = kwargs.get('identity', None) - self.zones = kwargs.get('zones', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_scale_set_data_disk.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_scale_set_data_disk.py deleted file mode 100644 index 421a5027f612..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_scale_set_data_disk.py +++ /dev/null @@ -1,65 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineScaleSetDataDisk(Model): - """Describes a virtual machine scale set data disk. - - All required parameters must be populated in order to send to Azure. - - :param name: The disk name. - :type name: str - :param lun: Required. Specifies the logical unit number of the data disk. - This value is used to identify data disks within the VM and therefore must - be unique for each data disk attached to a VM. - :type lun: int - :param caching: Specifies the caching requirements.

    Possible - values are:

    **None**

    **ReadOnly**

    **ReadWrite** -

    Default: **None for Standard storage. ReadOnly for Premium - storage**. Possible values include: 'None', 'ReadOnly', 'ReadWrite' - :type caching: str or ~azure.mgmt.compute.v2017_03_30.models.CachingTypes - :param create_option: Required. The create option. Possible values - include: 'FromImage', 'Empty', 'Attach' - :type create_option: str or - ~azure.mgmt.compute.v2017_03_30.models.DiskCreateOptionTypes - :param disk_size_gb: Specifies the size of an empty data disk in - gigabytes. This element can be used to overwrite the size of the disk in a - virtual machine image.

    This value cannot be larger than 1023 GB - :type disk_size_gb: int - :param managed_disk: The managed disk parameters. - :type managed_disk: - ~azure.mgmt.compute.v2017_03_30.models.VirtualMachineScaleSetManagedDiskParameters - """ - - _validation = { - 'lun': {'required': True}, - 'create_option': {'required': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'lun': {'key': 'lun', 'type': 'int'}, - 'caching': {'key': 'caching', 'type': 'CachingTypes'}, - 'create_option': {'key': 'createOption', 'type': 'DiskCreateOptionTypes'}, - 'disk_size_gb': {'key': 'diskSizeGB', 'type': 'int'}, - 'managed_disk': {'key': 'managedDisk', 'type': 'VirtualMachineScaleSetManagedDiskParameters'}, - } - - def __init__(self, **kwargs): - super(VirtualMachineScaleSetDataDisk, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.lun = kwargs.get('lun', None) - self.caching = kwargs.get('caching', None) - self.create_option = kwargs.get('create_option', None) - self.disk_size_gb = kwargs.get('disk_size_gb', None) - self.managed_disk = kwargs.get('managed_disk', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_scale_set_data_disk_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_scale_set_data_disk_py3.py deleted file mode 100644 index 29d44187ea43..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_scale_set_data_disk_py3.py +++ /dev/null @@ -1,65 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineScaleSetDataDisk(Model): - """Describes a virtual machine scale set data disk. - - All required parameters must be populated in order to send to Azure. - - :param name: The disk name. - :type name: str - :param lun: Required. Specifies the logical unit number of the data disk. - This value is used to identify data disks within the VM and therefore must - be unique for each data disk attached to a VM. - :type lun: int - :param caching: Specifies the caching requirements.

    Possible - values are:

    **None**

    **ReadOnly**

    **ReadWrite** -

    Default: **None for Standard storage. ReadOnly for Premium - storage**. Possible values include: 'None', 'ReadOnly', 'ReadWrite' - :type caching: str or ~azure.mgmt.compute.v2017_03_30.models.CachingTypes - :param create_option: Required. The create option. Possible values - include: 'FromImage', 'Empty', 'Attach' - :type create_option: str or - ~azure.mgmt.compute.v2017_03_30.models.DiskCreateOptionTypes - :param disk_size_gb: Specifies the size of an empty data disk in - gigabytes. This element can be used to overwrite the size of the disk in a - virtual machine image.

    This value cannot be larger than 1023 GB - :type disk_size_gb: int - :param managed_disk: The managed disk parameters. - :type managed_disk: - ~azure.mgmt.compute.v2017_03_30.models.VirtualMachineScaleSetManagedDiskParameters - """ - - _validation = { - 'lun': {'required': True}, - 'create_option': {'required': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'lun': {'key': 'lun', 'type': 'int'}, - 'caching': {'key': 'caching', 'type': 'CachingTypes'}, - 'create_option': {'key': 'createOption', 'type': 'DiskCreateOptionTypes'}, - 'disk_size_gb': {'key': 'diskSizeGB', 'type': 'int'}, - 'managed_disk': {'key': 'managedDisk', 'type': 'VirtualMachineScaleSetManagedDiskParameters'}, - } - - def __init__(self, *, lun: int, create_option, name: str=None, caching=None, disk_size_gb: int=None, managed_disk=None, **kwargs) -> None: - super(VirtualMachineScaleSetDataDisk, self).__init__(**kwargs) - self.name = name - self.lun = lun - self.caching = caching - self.create_option = create_option - self.disk_size_gb = disk_size_gb - self.managed_disk = managed_disk diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_scale_set_extension.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_scale_set_extension.py deleted file mode 100644 index 24a487547a2a..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_scale_set_extension.py +++ /dev/null @@ -1,80 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .sub_resource_read_only import SubResourceReadOnly - - -class VirtualMachineScaleSetExtension(SubResourceReadOnly): - """Describes a Virtual Machine Scale Set Extension. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource Id - :vartype id: str - :param name: The name of the extension. - :type name: str - :param force_update_tag: If a value is provided and is different from the - previous value, the extension handler will be forced to update even if the - extension configuration has not changed. - :type force_update_tag: str - :param publisher: The name of the extension handler publisher. - :type publisher: str - :param type: Specifies the type of the extension; an example is - "CustomScriptExtension". - :type type: str - :param type_handler_version: Specifies the version of the script handler. - :type type_handler_version: str - :param auto_upgrade_minor_version: Indicates whether the extension should - use a newer minor version if one is available at deployment time. Once - deployed, however, the extension will not upgrade minor versions unless - redeployed, even with this property set to true. - :type auto_upgrade_minor_version: bool - :param settings: Json formatted public settings for the extension. - :type settings: object - :param protected_settings: The extension can contain either - protectedSettings or protectedSettingsFromKeyVault or no protected - settings at all. - :type protected_settings: object - :ivar provisioning_state: The provisioning state, which only appears in - the response. - :vartype provisioning_state: str - """ - - _validation = { - 'id': {'readonly': True}, - 'provisioning_state': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'force_update_tag': {'key': 'properties.forceUpdateTag', 'type': 'str'}, - 'publisher': {'key': 'properties.publisher', 'type': 'str'}, - 'type': {'key': 'properties.type', 'type': 'str'}, - 'type_handler_version': {'key': 'properties.typeHandlerVersion', 'type': 'str'}, - 'auto_upgrade_minor_version': {'key': 'properties.autoUpgradeMinorVersion', 'type': 'bool'}, - 'settings': {'key': 'properties.settings', 'type': 'object'}, - 'protected_settings': {'key': 'properties.protectedSettings', 'type': 'object'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(VirtualMachineScaleSetExtension, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.force_update_tag = kwargs.get('force_update_tag', None) - self.publisher = kwargs.get('publisher', None) - self.type = kwargs.get('type', None) - self.type_handler_version = kwargs.get('type_handler_version', None) - self.auto_upgrade_minor_version = kwargs.get('auto_upgrade_minor_version', None) - self.settings = kwargs.get('settings', None) - self.protected_settings = kwargs.get('protected_settings', None) - self.provisioning_state = None diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_scale_set_extension_paged.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_scale_set_extension_paged.py deleted file mode 100644 index 3bc13dac369c..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_scale_set_extension_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class VirtualMachineScaleSetExtensionPaged(Paged): - """ - A paging container for iterating over a list of :class:`VirtualMachineScaleSetExtension ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[VirtualMachineScaleSetExtension]'} - } - - def __init__(self, *args, **kwargs): - - super(VirtualMachineScaleSetExtensionPaged, self).__init__(*args, **kwargs) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_scale_set_extension_profile.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_scale_set_extension_profile.py deleted file mode 100644 index 5ac81fd695bb..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_scale_set_extension_profile.py +++ /dev/null @@ -1,30 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineScaleSetExtensionProfile(Model): - """Describes a virtual machine scale set extension profile. - - :param extensions: The virtual machine scale set child extension - resources. - :type extensions: - list[~azure.mgmt.compute.v2017_03_30.models.VirtualMachineScaleSetExtension] - """ - - _attribute_map = { - 'extensions': {'key': 'extensions', 'type': '[VirtualMachineScaleSetExtension]'}, - } - - def __init__(self, **kwargs): - super(VirtualMachineScaleSetExtensionProfile, self).__init__(**kwargs) - self.extensions = kwargs.get('extensions', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_scale_set_extension_profile_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_scale_set_extension_profile_py3.py deleted file mode 100644 index 5970cc73e624..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_scale_set_extension_profile_py3.py +++ /dev/null @@ -1,30 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineScaleSetExtensionProfile(Model): - """Describes a virtual machine scale set extension profile. - - :param extensions: The virtual machine scale set child extension - resources. - :type extensions: - list[~azure.mgmt.compute.v2017_03_30.models.VirtualMachineScaleSetExtension] - """ - - _attribute_map = { - 'extensions': {'key': 'extensions', 'type': '[VirtualMachineScaleSetExtension]'}, - } - - def __init__(self, *, extensions=None, **kwargs) -> None: - super(VirtualMachineScaleSetExtensionProfile, self).__init__(**kwargs) - self.extensions = extensions diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_scale_set_extension_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_scale_set_extension_py3.py deleted file mode 100644 index 27392a2de9fd..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_scale_set_extension_py3.py +++ /dev/null @@ -1,80 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .sub_resource_read_only_py3 import SubResourceReadOnly - - -class VirtualMachineScaleSetExtension(SubResourceReadOnly): - """Describes a Virtual Machine Scale Set Extension. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource Id - :vartype id: str - :param name: The name of the extension. - :type name: str - :param force_update_tag: If a value is provided and is different from the - previous value, the extension handler will be forced to update even if the - extension configuration has not changed. - :type force_update_tag: str - :param publisher: The name of the extension handler publisher. - :type publisher: str - :param type: Specifies the type of the extension; an example is - "CustomScriptExtension". - :type type: str - :param type_handler_version: Specifies the version of the script handler. - :type type_handler_version: str - :param auto_upgrade_minor_version: Indicates whether the extension should - use a newer minor version if one is available at deployment time. Once - deployed, however, the extension will not upgrade minor versions unless - redeployed, even with this property set to true. - :type auto_upgrade_minor_version: bool - :param settings: Json formatted public settings for the extension. - :type settings: object - :param protected_settings: The extension can contain either - protectedSettings or protectedSettingsFromKeyVault or no protected - settings at all. - :type protected_settings: object - :ivar provisioning_state: The provisioning state, which only appears in - the response. - :vartype provisioning_state: str - """ - - _validation = { - 'id': {'readonly': True}, - 'provisioning_state': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'force_update_tag': {'key': 'properties.forceUpdateTag', 'type': 'str'}, - 'publisher': {'key': 'properties.publisher', 'type': 'str'}, - 'type': {'key': 'properties.type', 'type': 'str'}, - 'type_handler_version': {'key': 'properties.typeHandlerVersion', 'type': 'str'}, - 'auto_upgrade_minor_version': {'key': 'properties.autoUpgradeMinorVersion', 'type': 'bool'}, - 'settings': {'key': 'properties.settings', 'type': 'object'}, - 'protected_settings': {'key': 'properties.protectedSettings', 'type': 'object'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - } - - def __init__(self, *, name: str=None, force_update_tag: str=None, publisher: str=None, type: str=None, type_handler_version: str=None, auto_upgrade_minor_version: bool=None, settings=None, protected_settings=None, **kwargs) -> None: - super(VirtualMachineScaleSetExtension, self).__init__(**kwargs) - self.name = name - self.force_update_tag = force_update_tag - self.publisher = publisher - self.type = type - self.type_handler_version = type_handler_version - self.auto_upgrade_minor_version = auto_upgrade_minor_version - self.settings = settings - self.protected_settings = protected_settings - self.provisioning_state = None diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_scale_set_identity.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_scale_set_identity.py deleted file mode 100644 index d7c55680208c..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_scale_set_identity.py +++ /dev/null @@ -1,49 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineScaleSetIdentity(Model): - """Identity for the virtual machine scale set. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar principal_id: The principal id of virtual machine scale set - identity. - :vartype principal_id: str - :ivar tenant_id: The tenant id associated with the virtual machine scale - set. - :vartype tenant_id: str - :param type: The type of identity used for the virtual machine scale set. - Currently, the only supported type is 'SystemAssigned', which implicitly - creates an identity. Possible values include: 'SystemAssigned' - :type type: str or - ~azure.mgmt.compute.v2017_03_30.models.ResourceIdentityType - """ - - _validation = { - 'principal_id': {'readonly': True}, - 'tenant_id': {'readonly': True}, - } - - _attribute_map = { - 'principal_id': {'key': 'principalId', 'type': 'str'}, - 'tenant_id': {'key': 'tenantId', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'ResourceIdentityType'}, - } - - def __init__(self, **kwargs): - super(VirtualMachineScaleSetIdentity, self).__init__(**kwargs) - self.principal_id = None - self.tenant_id = None - self.type = kwargs.get('type', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_scale_set_identity_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_scale_set_identity_py3.py deleted file mode 100644 index 109730c06e1b..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_scale_set_identity_py3.py +++ /dev/null @@ -1,49 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineScaleSetIdentity(Model): - """Identity for the virtual machine scale set. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar principal_id: The principal id of virtual machine scale set - identity. - :vartype principal_id: str - :ivar tenant_id: The tenant id associated with the virtual machine scale - set. - :vartype tenant_id: str - :param type: The type of identity used for the virtual machine scale set. - Currently, the only supported type is 'SystemAssigned', which implicitly - creates an identity. Possible values include: 'SystemAssigned' - :type type: str or - ~azure.mgmt.compute.v2017_03_30.models.ResourceIdentityType - """ - - _validation = { - 'principal_id': {'readonly': True}, - 'tenant_id': {'readonly': True}, - } - - _attribute_map = { - 'principal_id': {'key': 'principalId', 'type': 'str'}, - 'tenant_id': {'key': 'tenantId', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'ResourceIdentityType'}, - } - - def __init__(self, *, type=None, **kwargs) -> None: - super(VirtualMachineScaleSetIdentity, self).__init__(**kwargs) - self.principal_id = None - self.tenant_id = None - self.type = type diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_scale_set_instance_view.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_scale_set_instance_view.py deleted file mode 100644 index 4c3ef65a1dd2..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_scale_set_instance_view.py +++ /dev/null @@ -1,48 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineScaleSetInstanceView(Model): - """The instance view of a virtual machine scale set. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar virtual_machine: The instance view status summary for the virtual - machine scale set. - :vartype virtual_machine: - ~azure.mgmt.compute.v2017_03_30.models.VirtualMachineScaleSetInstanceViewStatusesSummary - :ivar extensions: The extensions information. - :vartype extensions: - list[~azure.mgmt.compute.v2017_03_30.models.VirtualMachineScaleSetVMExtensionsSummary] - :param statuses: The resource status information. - :type statuses: - list[~azure.mgmt.compute.v2017_03_30.models.InstanceViewStatus] - """ - - _validation = { - 'virtual_machine': {'readonly': True}, - 'extensions': {'readonly': True}, - } - - _attribute_map = { - 'virtual_machine': {'key': 'virtualMachine', 'type': 'VirtualMachineScaleSetInstanceViewStatusesSummary'}, - 'extensions': {'key': 'extensions', 'type': '[VirtualMachineScaleSetVMExtensionsSummary]'}, - 'statuses': {'key': 'statuses', 'type': '[InstanceViewStatus]'}, - } - - def __init__(self, **kwargs): - super(VirtualMachineScaleSetInstanceView, self).__init__(**kwargs) - self.virtual_machine = None - self.extensions = None - self.statuses = kwargs.get('statuses', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_scale_set_instance_view_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_scale_set_instance_view_py3.py deleted file mode 100644 index 4c8d32ed063f..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_scale_set_instance_view_py3.py +++ /dev/null @@ -1,48 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineScaleSetInstanceView(Model): - """The instance view of a virtual machine scale set. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar virtual_machine: The instance view status summary for the virtual - machine scale set. - :vartype virtual_machine: - ~azure.mgmt.compute.v2017_03_30.models.VirtualMachineScaleSetInstanceViewStatusesSummary - :ivar extensions: The extensions information. - :vartype extensions: - list[~azure.mgmt.compute.v2017_03_30.models.VirtualMachineScaleSetVMExtensionsSummary] - :param statuses: The resource status information. - :type statuses: - list[~azure.mgmt.compute.v2017_03_30.models.InstanceViewStatus] - """ - - _validation = { - 'virtual_machine': {'readonly': True}, - 'extensions': {'readonly': True}, - } - - _attribute_map = { - 'virtual_machine': {'key': 'virtualMachine', 'type': 'VirtualMachineScaleSetInstanceViewStatusesSummary'}, - 'extensions': {'key': 'extensions', 'type': '[VirtualMachineScaleSetVMExtensionsSummary]'}, - 'statuses': {'key': 'statuses', 'type': '[InstanceViewStatus]'}, - } - - def __init__(self, *, statuses=None, **kwargs) -> None: - super(VirtualMachineScaleSetInstanceView, self).__init__(**kwargs) - self.virtual_machine = None - self.extensions = None - self.statuses = statuses diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_scale_set_instance_view_statuses_summary.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_scale_set_instance_view_statuses_summary.py deleted file mode 100644 index 9c8bc6132317..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_scale_set_instance_view_statuses_summary.py +++ /dev/null @@ -1,37 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineScaleSetInstanceViewStatusesSummary(Model): - """Instance view statuses summary for virtual machines of a virtual machine - scale set. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar statuses_summary: The extensions information. - :vartype statuses_summary: - list[~azure.mgmt.compute.v2017_03_30.models.VirtualMachineStatusCodeCount] - """ - - _validation = { - 'statuses_summary': {'readonly': True}, - } - - _attribute_map = { - 'statuses_summary': {'key': 'statusesSummary', 'type': '[VirtualMachineStatusCodeCount]'}, - } - - def __init__(self, **kwargs): - super(VirtualMachineScaleSetInstanceViewStatusesSummary, self).__init__(**kwargs) - self.statuses_summary = None diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_scale_set_instance_view_statuses_summary_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_scale_set_instance_view_statuses_summary_py3.py deleted file mode 100644 index 28bf19b450f6..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_scale_set_instance_view_statuses_summary_py3.py +++ /dev/null @@ -1,37 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineScaleSetInstanceViewStatusesSummary(Model): - """Instance view statuses summary for virtual machines of a virtual machine - scale set. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar statuses_summary: The extensions information. - :vartype statuses_summary: - list[~azure.mgmt.compute.v2017_03_30.models.VirtualMachineStatusCodeCount] - """ - - _validation = { - 'statuses_summary': {'readonly': True}, - } - - _attribute_map = { - 'statuses_summary': {'key': 'statusesSummary', 'type': '[VirtualMachineStatusCodeCount]'}, - } - - def __init__(self, **kwargs) -> None: - super(VirtualMachineScaleSetInstanceViewStatusesSummary, self).__init__(**kwargs) - self.statuses_summary = None diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_scale_set_ip_configuration.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_scale_set_ip_configuration.py deleted file mode 100644 index 435f14097f05..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_scale_set_ip_configuration.py +++ /dev/null @@ -1,83 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .sub_resource import SubResource - - -class VirtualMachineScaleSetIPConfiguration(SubResource): - """Describes a virtual machine scale set network profile's IP configuration. - - All required parameters must be populated in order to send to Azure. - - :param id: Resource Id - :type id: str - :param name: Required. The IP configuration name. - :type name: str - :param subnet: Specifies the identifier of the subnet. - :type subnet: ~azure.mgmt.compute.v2017_03_30.models.ApiEntityReference - :param primary: Specifies the primary network interface in case the - virtual machine has more than 1 network interface. - :type primary: bool - :param public_ip_address_configuration: The publicIPAddressConfiguration. - :type public_ip_address_configuration: - ~azure.mgmt.compute.v2017_03_30.models.VirtualMachineScaleSetPublicIPAddressConfiguration - :param private_ip_address_version: Available from Api-Version 2017-03-30 - onwards, it represents whether the specific ipconfiguration is IPv4 or - IPv6. Default is taken as IPv4. Possible values are: 'IPv4' and 'IPv6'. - Possible values include: 'IPv4', 'IPv6' - :type private_ip_address_version: str or - ~azure.mgmt.compute.v2017_03_30.models.IPVersion - :param application_gateway_backend_address_pools: Specifies an array of - references to backend address pools of application gateways. A scale set - can reference backend address pools of multiple application gateways. - Multiple scale sets cannot use the same application gateway. - :type application_gateway_backend_address_pools: - list[~azure.mgmt.compute.v2017_03_30.models.SubResource] - :param load_balancer_backend_address_pools: Specifies an array of - references to backend address pools of load balancers. A scale set can - reference backend address pools of one public and one internal load - balancer. Multiple scale sets cannot use the same load balancer. - :type load_balancer_backend_address_pools: - list[~azure.mgmt.compute.v2017_03_30.models.SubResource] - :param load_balancer_inbound_nat_pools: Specifies an array of references - to inbound Nat pools of the load balancers. A scale set can reference - inbound nat pools of one public and one internal load balancer. Multiple - scale sets cannot use the same load balancer - :type load_balancer_inbound_nat_pools: - list[~azure.mgmt.compute.v2017_03_30.models.SubResource] - """ - - _validation = { - 'name': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'subnet': {'key': 'properties.subnet', 'type': 'ApiEntityReference'}, - 'primary': {'key': 'properties.primary', 'type': 'bool'}, - 'public_ip_address_configuration': {'key': 'properties.publicIPAddressConfiguration', 'type': 'VirtualMachineScaleSetPublicIPAddressConfiguration'}, - 'private_ip_address_version': {'key': 'properties.privateIPAddressVersion', 'type': 'str'}, - 'application_gateway_backend_address_pools': {'key': 'properties.applicationGatewayBackendAddressPools', 'type': '[SubResource]'}, - 'load_balancer_backend_address_pools': {'key': 'properties.loadBalancerBackendAddressPools', 'type': '[SubResource]'}, - 'load_balancer_inbound_nat_pools': {'key': 'properties.loadBalancerInboundNatPools', 'type': '[SubResource]'}, - } - - def __init__(self, **kwargs): - super(VirtualMachineScaleSetIPConfiguration, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.subnet = kwargs.get('subnet', None) - self.primary = kwargs.get('primary', None) - self.public_ip_address_configuration = kwargs.get('public_ip_address_configuration', None) - self.private_ip_address_version = kwargs.get('private_ip_address_version', None) - self.application_gateway_backend_address_pools = kwargs.get('application_gateway_backend_address_pools', None) - self.load_balancer_backend_address_pools = kwargs.get('load_balancer_backend_address_pools', None) - self.load_balancer_inbound_nat_pools = kwargs.get('load_balancer_inbound_nat_pools', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_scale_set_ip_configuration_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_scale_set_ip_configuration_py3.py deleted file mode 100644 index 70bf6a5ee613..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_scale_set_ip_configuration_py3.py +++ /dev/null @@ -1,83 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .sub_resource_py3 import SubResource - - -class VirtualMachineScaleSetIPConfiguration(SubResource): - """Describes a virtual machine scale set network profile's IP configuration. - - All required parameters must be populated in order to send to Azure. - - :param id: Resource Id - :type id: str - :param name: Required. The IP configuration name. - :type name: str - :param subnet: Specifies the identifier of the subnet. - :type subnet: ~azure.mgmt.compute.v2017_03_30.models.ApiEntityReference - :param primary: Specifies the primary network interface in case the - virtual machine has more than 1 network interface. - :type primary: bool - :param public_ip_address_configuration: The publicIPAddressConfiguration. - :type public_ip_address_configuration: - ~azure.mgmt.compute.v2017_03_30.models.VirtualMachineScaleSetPublicIPAddressConfiguration - :param private_ip_address_version: Available from Api-Version 2017-03-30 - onwards, it represents whether the specific ipconfiguration is IPv4 or - IPv6. Default is taken as IPv4. Possible values are: 'IPv4' and 'IPv6'. - Possible values include: 'IPv4', 'IPv6' - :type private_ip_address_version: str or - ~azure.mgmt.compute.v2017_03_30.models.IPVersion - :param application_gateway_backend_address_pools: Specifies an array of - references to backend address pools of application gateways. A scale set - can reference backend address pools of multiple application gateways. - Multiple scale sets cannot use the same application gateway. - :type application_gateway_backend_address_pools: - list[~azure.mgmt.compute.v2017_03_30.models.SubResource] - :param load_balancer_backend_address_pools: Specifies an array of - references to backend address pools of load balancers. A scale set can - reference backend address pools of one public and one internal load - balancer. Multiple scale sets cannot use the same load balancer. - :type load_balancer_backend_address_pools: - list[~azure.mgmt.compute.v2017_03_30.models.SubResource] - :param load_balancer_inbound_nat_pools: Specifies an array of references - to inbound Nat pools of the load balancers. A scale set can reference - inbound nat pools of one public and one internal load balancer. Multiple - scale sets cannot use the same load balancer - :type load_balancer_inbound_nat_pools: - list[~azure.mgmt.compute.v2017_03_30.models.SubResource] - """ - - _validation = { - 'name': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'subnet': {'key': 'properties.subnet', 'type': 'ApiEntityReference'}, - 'primary': {'key': 'properties.primary', 'type': 'bool'}, - 'public_ip_address_configuration': {'key': 'properties.publicIPAddressConfiguration', 'type': 'VirtualMachineScaleSetPublicIPAddressConfiguration'}, - 'private_ip_address_version': {'key': 'properties.privateIPAddressVersion', 'type': 'str'}, - 'application_gateway_backend_address_pools': {'key': 'properties.applicationGatewayBackendAddressPools', 'type': '[SubResource]'}, - 'load_balancer_backend_address_pools': {'key': 'properties.loadBalancerBackendAddressPools', 'type': '[SubResource]'}, - 'load_balancer_inbound_nat_pools': {'key': 'properties.loadBalancerInboundNatPools', 'type': '[SubResource]'}, - } - - def __init__(self, *, name: str, id: str=None, subnet=None, primary: bool=None, public_ip_address_configuration=None, private_ip_address_version=None, application_gateway_backend_address_pools=None, load_balancer_backend_address_pools=None, load_balancer_inbound_nat_pools=None, **kwargs) -> None: - super(VirtualMachineScaleSetIPConfiguration, self).__init__(id=id, **kwargs) - self.name = name - self.subnet = subnet - self.primary = primary - self.public_ip_address_configuration = public_ip_address_configuration - self.private_ip_address_version = private_ip_address_version - self.application_gateway_backend_address_pools = application_gateway_backend_address_pools - self.load_balancer_backend_address_pools = load_balancer_backend_address_pools - self.load_balancer_inbound_nat_pools = load_balancer_inbound_nat_pools diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_scale_set_managed_disk_parameters.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_scale_set_managed_disk_parameters.py deleted file mode 100644 index d7dd53592e5e..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_scale_set_managed_disk_parameters.py +++ /dev/null @@ -1,31 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineScaleSetManagedDiskParameters(Model): - """Describes the parameters of a ScaleSet managed disk. - - :param storage_account_type: Specifies the storage account type for the - managed disk. Possible values are: Standard_LRS or Premium_LRS. Possible - values include: 'Standard_LRS', 'Premium_LRS' - :type storage_account_type: str or - ~azure.mgmt.compute.v2017_03_30.models.StorageAccountTypes - """ - - _attribute_map = { - 'storage_account_type': {'key': 'storageAccountType', 'type': 'StorageAccountTypes'}, - } - - def __init__(self, **kwargs): - super(VirtualMachineScaleSetManagedDiskParameters, self).__init__(**kwargs) - self.storage_account_type = kwargs.get('storage_account_type', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_scale_set_managed_disk_parameters_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_scale_set_managed_disk_parameters_py3.py deleted file mode 100644 index 58cd587c6b54..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_scale_set_managed_disk_parameters_py3.py +++ /dev/null @@ -1,31 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineScaleSetManagedDiskParameters(Model): - """Describes the parameters of a ScaleSet managed disk. - - :param storage_account_type: Specifies the storage account type for the - managed disk. Possible values are: Standard_LRS or Premium_LRS. Possible - values include: 'Standard_LRS', 'Premium_LRS' - :type storage_account_type: str or - ~azure.mgmt.compute.v2017_03_30.models.StorageAccountTypes - """ - - _attribute_map = { - 'storage_account_type': {'key': 'storageAccountType', 'type': 'StorageAccountTypes'}, - } - - def __init__(self, *, storage_account_type=None, **kwargs) -> None: - super(VirtualMachineScaleSetManagedDiskParameters, self).__init__(**kwargs) - self.storage_account_type = storage_account_type diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_scale_set_network_configuration.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_scale_set_network_configuration.py deleted file mode 100644 index 69d2808f1ff2..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_scale_set_network_configuration.py +++ /dev/null @@ -1,66 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .sub_resource import SubResource - - -class VirtualMachineScaleSetNetworkConfiguration(SubResource): - """Describes a virtual machine scale set network profile's network - configurations. - - All required parameters must be populated in order to send to Azure. - - :param id: Resource Id - :type id: str - :param name: Required. The network configuration name. - :type name: str - :param primary: Specifies the primary network interface in case the - virtual machine has more than 1 network interface. - :type primary: bool - :param enable_accelerated_networking: Specifies whether the network - interface is accelerated networking-enabled. - :type enable_accelerated_networking: bool - :param network_security_group: The network security group. - :type network_security_group: - ~azure.mgmt.compute.v2017_03_30.models.SubResource - :param dns_settings: The dns settings to be applied on the network - interfaces. - :type dns_settings: - ~azure.mgmt.compute.v2017_03_30.models.VirtualMachineScaleSetNetworkConfigurationDnsSettings - :param ip_configurations: Required. Specifies the IP configurations of the - network interface. - :type ip_configurations: - list[~azure.mgmt.compute.v2017_03_30.models.VirtualMachineScaleSetIPConfiguration] - """ - - _validation = { - 'name': {'required': True}, - 'ip_configurations': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'primary': {'key': 'properties.primary', 'type': 'bool'}, - 'enable_accelerated_networking': {'key': 'properties.enableAcceleratedNetworking', 'type': 'bool'}, - 'network_security_group': {'key': 'properties.networkSecurityGroup', 'type': 'SubResource'}, - 'dns_settings': {'key': 'properties.dnsSettings', 'type': 'VirtualMachineScaleSetNetworkConfigurationDnsSettings'}, - 'ip_configurations': {'key': 'properties.ipConfigurations', 'type': '[VirtualMachineScaleSetIPConfiguration]'}, - } - - def __init__(self, **kwargs): - super(VirtualMachineScaleSetNetworkConfiguration, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.primary = kwargs.get('primary', None) - self.enable_accelerated_networking = kwargs.get('enable_accelerated_networking', None) - self.network_security_group = kwargs.get('network_security_group', None) - self.dns_settings = kwargs.get('dns_settings', None) - self.ip_configurations = kwargs.get('ip_configurations', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_scale_set_network_configuration_dns_settings.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_scale_set_network_configuration_dns_settings.py deleted file mode 100644 index 04e1c619383f..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_scale_set_network_configuration_dns_settings.py +++ /dev/null @@ -1,29 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineScaleSetNetworkConfigurationDnsSettings(Model): - """Describes a virtual machines scale sets network configuration's DNS - settings. - - :param dns_servers: List of DNS servers IP addresses - :type dns_servers: list[str] - """ - - _attribute_map = { - 'dns_servers': {'key': 'dnsServers', 'type': '[str]'}, - } - - def __init__(self, **kwargs): - super(VirtualMachineScaleSetNetworkConfigurationDnsSettings, self).__init__(**kwargs) - self.dns_servers = kwargs.get('dns_servers', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_scale_set_network_configuration_dns_settings_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_scale_set_network_configuration_dns_settings_py3.py deleted file mode 100644 index 5607f74d3c6a..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_scale_set_network_configuration_dns_settings_py3.py +++ /dev/null @@ -1,29 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineScaleSetNetworkConfigurationDnsSettings(Model): - """Describes a virtual machines scale sets network configuration's DNS - settings. - - :param dns_servers: List of DNS servers IP addresses - :type dns_servers: list[str] - """ - - _attribute_map = { - 'dns_servers': {'key': 'dnsServers', 'type': '[str]'}, - } - - def __init__(self, *, dns_servers=None, **kwargs) -> None: - super(VirtualMachineScaleSetNetworkConfigurationDnsSettings, self).__init__(**kwargs) - self.dns_servers = dns_servers diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_scale_set_network_configuration_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_scale_set_network_configuration_py3.py deleted file mode 100644 index e44253a9a9b9..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_scale_set_network_configuration_py3.py +++ /dev/null @@ -1,66 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .sub_resource_py3 import SubResource - - -class VirtualMachineScaleSetNetworkConfiguration(SubResource): - """Describes a virtual machine scale set network profile's network - configurations. - - All required parameters must be populated in order to send to Azure. - - :param id: Resource Id - :type id: str - :param name: Required. The network configuration name. - :type name: str - :param primary: Specifies the primary network interface in case the - virtual machine has more than 1 network interface. - :type primary: bool - :param enable_accelerated_networking: Specifies whether the network - interface is accelerated networking-enabled. - :type enable_accelerated_networking: bool - :param network_security_group: The network security group. - :type network_security_group: - ~azure.mgmt.compute.v2017_03_30.models.SubResource - :param dns_settings: The dns settings to be applied on the network - interfaces. - :type dns_settings: - ~azure.mgmt.compute.v2017_03_30.models.VirtualMachineScaleSetNetworkConfigurationDnsSettings - :param ip_configurations: Required. Specifies the IP configurations of the - network interface. - :type ip_configurations: - list[~azure.mgmt.compute.v2017_03_30.models.VirtualMachineScaleSetIPConfiguration] - """ - - _validation = { - 'name': {'required': True}, - 'ip_configurations': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'primary': {'key': 'properties.primary', 'type': 'bool'}, - 'enable_accelerated_networking': {'key': 'properties.enableAcceleratedNetworking', 'type': 'bool'}, - 'network_security_group': {'key': 'properties.networkSecurityGroup', 'type': 'SubResource'}, - 'dns_settings': {'key': 'properties.dnsSettings', 'type': 'VirtualMachineScaleSetNetworkConfigurationDnsSettings'}, - 'ip_configurations': {'key': 'properties.ipConfigurations', 'type': '[VirtualMachineScaleSetIPConfiguration]'}, - } - - def __init__(self, *, name: str, ip_configurations, id: str=None, primary: bool=None, enable_accelerated_networking: bool=None, network_security_group=None, dns_settings=None, **kwargs) -> None: - super(VirtualMachineScaleSetNetworkConfiguration, self).__init__(id=id, **kwargs) - self.name = name - self.primary = primary - self.enable_accelerated_networking = enable_accelerated_networking - self.network_security_group = network_security_group - self.dns_settings = dns_settings - self.ip_configurations = ip_configurations diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_scale_set_network_profile.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_scale_set_network_profile.py deleted file mode 100644 index 34fb37e837eb..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_scale_set_network_profile.py +++ /dev/null @@ -1,38 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineScaleSetNetworkProfile(Model): - """Describes a virtual machine scale set network profile. - - :param health_probe: A reference to a load balancer probe used to - determine the health of an instance in the virtual machine scale set. The - reference will be in the form: - '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/probes/{probeName}'. - :type health_probe: - ~azure.mgmt.compute.v2017_03_30.models.ApiEntityReference - :param network_interface_configurations: The list of network - configurations. - :type network_interface_configurations: - list[~azure.mgmt.compute.v2017_03_30.models.VirtualMachineScaleSetNetworkConfiguration] - """ - - _attribute_map = { - 'health_probe': {'key': 'healthProbe', 'type': 'ApiEntityReference'}, - 'network_interface_configurations': {'key': 'networkInterfaceConfigurations', 'type': '[VirtualMachineScaleSetNetworkConfiguration]'}, - } - - def __init__(self, **kwargs): - super(VirtualMachineScaleSetNetworkProfile, self).__init__(**kwargs) - self.health_probe = kwargs.get('health_probe', None) - self.network_interface_configurations = kwargs.get('network_interface_configurations', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_scale_set_network_profile_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_scale_set_network_profile_py3.py deleted file mode 100644 index 9189367b9b1f..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_scale_set_network_profile_py3.py +++ /dev/null @@ -1,38 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineScaleSetNetworkProfile(Model): - """Describes a virtual machine scale set network profile. - - :param health_probe: A reference to a load balancer probe used to - determine the health of an instance in the virtual machine scale set. The - reference will be in the form: - '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/probes/{probeName}'. - :type health_probe: - ~azure.mgmt.compute.v2017_03_30.models.ApiEntityReference - :param network_interface_configurations: The list of network - configurations. - :type network_interface_configurations: - list[~azure.mgmt.compute.v2017_03_30.models.VirtualMachineScaleSetNetworkConfiguration] - """ - - _attribute_map = { - 'health_probe': {'key': 'healthProbe', 'type': 'ApiEntityReference'}, - 'network_interface_configurations': {'key': 'networkInterfaceConfigurations', 'type': '[VirtualMachineScaleSetNetworkConfiguration]'}, - } - - def __init__(self, *, health_probe=None, network_interface_configurations=None, **kwargs) -> None: - super(VirtualMachineScaleSetNetworkProfile, self).__init__(**kwargs) - self.health_probe = health_probe - self.network_interface_configurations = network_interface_configurations diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_scale_set_os_disk.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_scale_set_os_disk.py deleted file mode 100644 index c4d359b7fd46..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_scale_set_os_disk.py +++ /dev/null @@ -1,75 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineScaleSetOSDisk(Model): - """Describes a virtual machine scale set operating system disk. - - All required parameters must be populated in order to send to Azure. - - :param name: The disk name. - :type name: str - :param caching: Specifies the caching requirements.

    Possible - values are:

    **None**

    **ReadOnly**

    **ReadWrite** -

    Default: **None for Standard storage. ReadOnly for Premium - storage**. Possible values include: 'None', 'ReadOnly', 'ReadWrite' - :type caching: str or ~azure.mgmt.compute.v2017_03_30.models.CachingTypes - :param create_option: Required. Specifies how the virtual machines in the - scale set should be created.

    The only allowed value is: - **FromImage** \\u2013 This value is used when you are using an image to - create the virtual machine. If you are using a platform image, you also - use the imageReference element described above. If you are using a - marketplace image, you also use the plan element previously described. - Possible values include: 'FromImage', 'Empty', 'Attach' - :type create_option: str or - ~azure.mgmt.compute.v2017_03_30.models.DiskCreateOptionTypes - :param os_type: This property allows you to specify the type of the OS - that is included in the disk if creating a VM from user-image or a - specialized VHD.

    Possible values are:

    **Windows** -

    **Linux**. Possible values include: 'Windows', 'Linux' - :type os_type: str or - ~azure.mgmt.compute.v2017_03_30.models.OperatingSystemTypes - :param image: Specifies information about the unmanaged user image to base - the scale set on. - :type image: ~azure.mgmt.compute.v2017_03_30.models.VirtualHardDisk - :param vhd_containers: Specifies the container urls that are used to store - operating system disks for the scale set. - :type vhd_containers: list[str] - :param managed_disk: The managed disk parameters. - :type managed_disk: - ~azure.mgmt.compute.v2017_03_30.models.VirtualMachineScaleSetManagedDiskParameters - """ - - _validation = { - 'create_option': {'required': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'caching': {'key': 'caching', 'type': 'CachingTypes'}, - 'create_option': {'key': 'createOption', 'type': 'DiskCreateOptionTypes'}, - 'os_type': {'key': 'osType', 'type': 'OperatingSystemTypes'}, - 'image': {'key': 'image', 'type': 'VirtualHardDisk'}, - 'vhd_containers': {'key': 'vhdContainers', 'type': '[str]'}, - 'managed_disk': {'key': 'managedDisk', 'type': 'VirtualMachineScaleSetManagedDiskParameters'}, - } - - def __init__(self, **kwargs): - super(VirtualMachineScaleSetOSDisk, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.caching = kwargs.get('caching', None) - self.create_option = kwargs.get('create_option', None) - self.os_type = kwargs.get('os_type', None) - self.image = kwargs.get('image', None) - self.vhd_containers = kwargs.get('vhd_containers', None) - self.managed_disk = kwargs.get('managed_disk', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_scale_set_os_disk_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_scale_set_os_disk_py3.py deleted file mode 100644 index a0a05b14340b..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_scale_set_os_disk_py3.py +++ /dev/null @@ -1,75 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineScaleSetOSDisk(Model): - """Describes a virtual machine scale set operating system disk. - - All required parameters must be populated in order to send to Azure. - - :param name: The disk name. - :type name: str - :param caching: Specifies the caching requirements.

    Possible - values are:

    **None**

    **ReadOnly**

    **ReadWrite** -

    Default: **None for Standard storage. ReadOnly for Premium - storage**. Possible values include: 'None', 'ReadOnly', 'ReadWrite' - :type caching: str or ~azure.mgmt.compute.v2017_03_30.models.CachingTypes - :param create_option: Required. Specifies how the virtual machines in the - scale set should be created.

    The only allowed value is: - **FromImage** \\u2013 This value is used when you are using an image to - create the virtual machine. If you are using a platform image, you also - use the imageReference element described above. If you are using a - marketplace image, you also use the plan element previously described. - Possible values include: 'FromImage', 'Empty', 'Attach' - :type create_option: str or - ~azure.mgmt.compute.v2017_03_30.models.DiskCreateOptionTypes - :param os_type: This property allows you to specify the type of the OS - that is included in the disk if creating a VM from user-image or a - specialized VHD.

    Possible values are:

    **Windows** -

    **Linux**. Possible values include: 'Windows', 'Linux' - :type os_type: str or - ~azure.mgmt.compute.v2017_03_30.models.OperatingSystemTypes - :param image: Specifies information about the unmanaged user image to base - the scale set on. - :type image: ~azure.mgmt.compute.v2017_03_30.models.VirtualHardDisk - :param vhd_containers: Specifies the container urls that are used to store - operating system disks for the scale set. - :type vhd_containers: list[str] - :param managed_disk: The managed disk parameters. - :type managed_disk: - ~azure.mgmt.compute.v2017_03_30.models.VirtualMachineScaleSetManagedDiskParameters - """ - - _validation = { - 'create_option': {'required': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'caching': {'key': 'caching', 'type': 'CachingTypes'}, - 'create_option': {'key': 'createOption', 'type': 'DiskCreateOptionTypes'}, - 'os_type': {'key': 'osType', 'type': 'OperatingSystemTypes'}, - 'image': {'key': 'image', 'type': 'VirtualHardDisk'}, - 'vhd_containers': {'key': 'vhdContainers', 'type': '[str]'}, - 'managed_disk': {'key': 'managedDisk', 'type': 'VirtualMachineScaleSetManagedDiskParameters'}, - } - - def __init__(self, *, create_option, name: str=None, caching=None, os_type=None, image=None, vhd_containers=None, managed_disk=None, **kwargs) -> None: - super(VirtualMachineScaleSetOSDisk, self).__init__(**kwargs) - self.name = name - self.caching = caching - self.create_option = create_option - self.os_type = os_type - self.image = image - self.vhd_containers = vhd_containers - self.managed_disk = managed_disk diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_scale_set_os_profile.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_scale_set_os_profile.py deleted file mode 100644 index 317633a0edf7..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_scale_set_os_profile.py +++ /dev/null @@ -1,97 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineScaleSetOSProfile(Model): - """Describes a virtual machine scale set OS profile. - - :param computer_name_prefix: Specifies the computer name prefix for all of - the virtual machines in the scale set. Computer name prefixes must be 1 to - 15 characters long. - :type computer_name_prefix: str - :param admin_username: Specifies the name of the administrator account. -

    **Windows-only restriction:** Cannot end in "."

    - **Disallowed values:** "administrator", "admin", "user", "user1", "test", - "user2", "test1", "user3", "admin1", "1", "123", "a", "actuser", "adm", - "admin2", "aspnet", "backup", "console", "david", "guest", "john", - "owner", "root", "server", "sql", "support", "support_388945a0", "sys", - "test2", "test3", "user4", "user5".

    **Minimum-length (Linux):** 1 - character

    **Max-length (Linux):** 64 characters

    - **Max-length (Windows):** 20 characters

  • For root access to - the Linux VM, see [Using root privileges on Linux virtual machines in - Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-use-root-privileges?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json)
  • - For a list of built-in system users on Linux that should not be used in - this field, see [Selecting User Names for Linux on - Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-usernames?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json) - :type admin_username: str - :param admin_password: Specifies the password of the administrator - account.

    **Minimum-length (Windows):** 8 characters

    - **Minimum-length (Linux):** 6 characters

    **Max-length - (Windows):** 123 characters

    **Max-length (Linux):** 72 characters -

    **Complexity requirements:** 3 out of 4 conditions below need to - be fulfilled
    Has lower characters
    Has upper characters
    Has a - digit
    Has a special character (Regex match [\\W_])

    - **Disallowed values:** "abc@123", "P@$$w0rd", "P@ssw0rd", "P@ssword123", - "Pa$$word", "pass@word1", "Password!", "Password1", "Password22", - "iloveyou!"

    For resetting the password, see [How to reset the - Remote Desktop service or its login password in a Windows - VM](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-reset-rdp?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json) -

    For resetting root password, see [Manage users, SSH, and check or - repair disks on Azure Linux VMs using the VMAccess - Extension](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-using-vmaccess-extension?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json#reset-root-password) - :type admin_password: str - :param custom_data: Specifies a base-64 encoded string of custom data. The - base-64 encoded string is decoded to a binary array that is saved as a - file on the Virtual Machine. The maximum length of the binary array is - 65535 bytes.

    For using cloud-init for your VM, see [Using - cloud-init to customize a Linux VM during - creation](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-using-cloud-init?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json) - :type custom_data: str - :param windows_configuration: Specifies Windows operating system settings - on the virtual machine. - :type windows_configuration: - ~azure.mgmt.compute.v2017_03_30.models.WindowsConfiguration - :param linux_configuration: Specifies the Linux operating system settings - on the virtual machine.

    For a list of supported Linux - distributions, see [Linux on Azure-Endorsed - Distributions](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-endorsed-distros?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json) -

    For running non-endorsed distributions, see [Information for - Non-Endorsed - Distributions](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-create-upload-generic?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json). - :type linux_configuration: - ~azure.mgmt.compute.v2017_03_30.models.LinuxConfiguration - :param secrets: Specifies set of certificates that should be installed - onto the virtual machines in the scale set. - :type secrets: - list[~azure.mgmt.compute.v2017_03_30.models.VaultSecretGroup] - """ - - _attribute_map = { - 'computer_name_prefix': {'key': 'computerNamePrefix', 'type': 'str'}, - 'admin_username': {'key': 'adminUsername', 'type': 'str'}, - 'admin_password': {'key': 'adminPassword', 'type': 'str'}, - 'custom_data': {'key': 'customData', 'type': 'str'}, - 'windows_configuration': {'key': 'windowsConfiguration', 'type': 'WindowsConfiguration'}, - 'linux_configuration': {'key': 'linuxConfiguration', 'type': 'LinuxConfiguration'}, - 'secrets': {'key': 'secrets', 'type': '[VaultSecretGroup]'}, - } - - def __init__(self, **kwargs): - super(VirtualMachineScaleSetOSProfile, self).__init__(**kwargs) - self.computer_name_prefix = kwargs.get('computer_name_prefix', None) - self.admin_username = kwargs.get('admin_username', None) - self.admin_password = kwargs.get('admin_password', None) - self.custom_data = kwargs.get('custom_data', None) - self.windows_configuration = kwargs.get('windows_configuration', None) - self.linux_configuration = kwargs.get('linux_configuration', None) - self.secrets = kwargs.get('secrets', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_scale_set_os_profile_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_scale_set_os_profile_py3.py deleted file mode 100644 index 1d7c698b243f..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_scale_set_os_profile_py3.py +++ /dev/null @@ -1,97 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineScaleSetOSProfile(Model): - """Describes a virtual machine scale set OS profile. - - :param computer_name_prefix: Specifies the computer name prefix for all of - the virtual machines in the scale set. Computer name prefixes must be 1 to - 15 characters long. - :type computer_name_prefix: str - :param admin_username: Specifies the name of the administrator account. -

    **Windows-only restriction:** Cannot end in "."

    - **Disallowed values:** "administrator", "admin", "user", "user1", "test", - "user2", "test1", "user3", "admin1", "1", "123", "a", "actuser", "adm", - "admin2", "aspnet", "backup", "console", "david", "guest", "john", - "owner", "root", "server", "sql", "support", "support_388945a0", "sys", - "test2", "test3", "user4", "user5".

    **Minimum-length (Linux):** 1 - character

    **Max-length (Linux):** 64 characters

    - **Max-length (Windows):** 20 characters

  • For root access to - the Linux VM, see [Using root privileges on Linux virtual machines in - Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-use-root-privileges?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json)
  • - For a list of built-in system users on Linux that should not be used in - this field, see [Selecting User Names for Linux on - Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-usernames?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json) - :type admin_username: str - :param admin_password: Specifies the password of the administrator - account.

    **Minimum-length (Windows):** 8 characters

    - **Minimum-length (Linux):** 6 characters

    **Max-length - (Windows):** 123 characters

    **Max-length (Linux):** 72 characters -

    **Complexity requirements:** 3 out of 4 conditions below need to - be fulfilled
    Has lower characters
    Has upper characters
    Has a - digit
    Has a special character (Regex match [\\W_])

    - **Disallowed values:** "abc@123", "P@$$w0rd", "P@ssw0rd", "P@ssword123", - "Pa$$word", "pass@word1", "Password!", "Password1", "Password22", - "iloveyou!"

    For resetting the password, see [How to reset the - Remote Desktop service or its login password in a Windows - VM](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-reset-rdp?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json) -

    For resetting root password, see [Manage users, SSH, and check or - repair disks on Azure Linux VMs using the VMAccess - Extension](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-using-vmaccess-extension?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json#reset-root-password) - :type admin_password: str - :param custom_data: Specifies a base-64 encoded string of custom data. The - base-64 encoded string is decoded to a binary array that is saved as a - file on the Virtual Machine. The maximum length of the binary array is - 65535 bytes.

    For using cloud-init for your VM, see [Using - cloud-init to customize a Linux VM during - creation](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-using-cloud-init?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json) - :type custom_data: str - :param windows_configuration: Specifies Windows operating system settings - on the virtual machine. - :type windows_configuration: - ~azure.mgmt.compute.v2017_03_30.models.WindowsConfiguration - :param linux_configuration: Specifies the Linux operating system settings - on the virtual machine.

    For a list of supported Linux - distributions, see [Linux on Azure-Endorsed - Distributions](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-endorsed-distros?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json) -

    For running non-endorsed distributions, see [Information for - Non-Endorsed - Distributions](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-create-upload-generic?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json). - :type linux_configuration: - ~azure.mgmt.compute.v2017_03_30.models.LinuxConfiguration - :param secrets: Specifies set of certificates that should be installed - onto the virtual machines in the scale set. - :type secrets: - list[~azure.mgmt.compute.v2017_03_30.models.VaultSecretGroup] - """ - - _attribute_map = { - 'computer_name_prefix': {'key': 'computerNamePrefix', 'type': 'str'}, - 'admin_username': {'key': 'adminUsername', 'type': 'str'}, - 'admin_password': {'key': 'adminPassword', 'type': 'str'}, - 'custom_data': {'key': 'customData', 'type': 'str'}, - 'windows_configuration': {'key': 'windowsConfiguration', 'type': 'WindowsConfiguration'}, - 'linux_configuration': {'key': 'linuxConfiguration', 'type': 'LinuxConfiguration'}, - 'secrets': {'key': 'secrets', 'type': '[VaultSecretGroup]'}, - } - - def __init__(self, *, computer_name_prefix: str=None, admin_username: str=None, admin_password: str=None, custom_data: str=None, windows_configuration=None, linux_configuration=None, secrets=None, **kwargs) -> None: - super(VirtualMachineScaleSetOSProfile, self).__init__(**kwargs) - self.computer_name_prefix = computer_name_prefix - self.admin_username = admin_username - self.admin_password = admin_password - self.custom_data = custom_data - self.windows_configuration = windows_configuration - self.linux_configuration = linux_configuration - self.secrets = secrets diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_scale_set_paged.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_scale_set_paged.py deleted file mode 100644 index a791594b1d05..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_scale_set_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class VirtualMachineScaleSetPaged(Paged): - """ - A paging container for iterating over a list of :class:`VirtualMachineScaleSet ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[VirtualMachineScaleSet]'} - } - - def __init__(self, *args, **kwargs): - - super(VirtualMachineScaleSetPaged, self).__init__(*args, **kwargs) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_scale_set_public_ip_address_configuration.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_scale_set_public_ip_address_configuration.py deleted file mode 100644 index 72a44aa185c0..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_scale_set_public_ip_address_configuration.py +++ /dev/null @@ -1,45 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineScaleSetPublicIPAddressConfiguration(Model): - """Describes a virtual machines scale set IP Configuration's PublicIPAddress - configuration. - - All required parameters must be populated in order to send to Azure. - - :param name: Required. The publicIP address configuration name. - :type name: str - :param idle_timeout_in_minutes: The idle timeout of the public IP address. - :type idle_timeout_in_minutes: int - :param dns_settings: The dns settings to be applied on the publicIP - addresses . - :type dns_settings: - ~azure.mgmt.compute.v2017_03_30.models.VirtualMachineScaleSetPublicIPAddressConfigurationDnsSettings - """ - - _validation = { - 'name': {'required': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'idle_timeout_in_minutes': {'key': 'properties.idleTimeoutInMinutes', 'type': 'int'}, - 'dns_settings': {'key': 'properties.dnsSettings', 'type': 'VirtualMachineScaleSetPublicIPAddressConfigurationDnsSettings'}, - } - - def __init__(self, **kwargs): - super(VirtualMachineScaleSetPublicIPAddressConfiguration, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.idle_timeout_in_minutes = kwargs.get('idle_timeout_in_minutes', None) - self.dns_settings = kwargs.get('dns_settings', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_scale_set_public_ip_address_configuration_dns_settings.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_scale_set_public_ip_address_configuration_dns_settings.py deleted file mode 100644 index 2fe562244372..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_scale_set_public_ip_address_configuration_dns_settings.py +++ /dev/null @@ -1,37 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineScaleSetPublicIPAddressConfigurationDnsSettings(Model): - """Describes a virtual machines scale sets network configuration's DNS - settings. - - All required parameters must be populated in order to send to Azure. - - :param domain_name_label: Required. The Domain name label.The - concatenation of the domain name label and vm index will be the domain - name labels of the PublicIPAddress resources that will be created - :type domain_name_label: str - """ - - _validation = { - 'domain_name_label': {'required': True}, - } - - _attribute_map = { - 'domain_name_label': {'key': 'domainNameLabel', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(VirtualMachineScaleSetPublicIPAddressConfigurationDnsSettings, self).__init__(**kwargs) - self.domain_name_label = kwargs.get('domain_name_label', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_scale_set_public_ip_address_configuration_dns_settings_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_scale_set_public_ip_address_configuration_dns_settings_py3.py deleted file mode 100644 index 326a36708ff4..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_scale_set_public_ip_address_configuration_dns_settings_py3.py +++ /dev/null @@ -1,37 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineScaleSetPublicIPAddressConfigurationDnsSettings(Model): - """Describes a virtual machines scale sets network configuration's DNS - settings. - - All required parameters must be populated in order to send to Azure. - - :param domain_name_label: Required. The Domain name label.The - concatenation of the domain name label and vm index will be the domain - name labels of the PublicIPAddress resources that will be created - :type domain_name_label: str - """ - - _validation = { - 'domain_name_label': {'required': True}, - } - - _attribute_map = { - 'domain_name_label': {'key': 'domainNameLabel', 'type': 'str'}, - } - - def __init__(self, *, domain_name_label: str, **kwargs) -> None: - super(VirtualMachineScaleSetPublicIPAddressConfigurationDnsSettings, self).__init__(**kwargs) - self.domain_name_label = domain_name_label diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_scale_set_public_ip_address_configuration_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_scale_set_public_ip_address_configuration_py3.py deleted file mode 100644 index d4db0b75b9ba..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_scale_set_public_ip_address_configuration_py3.py +++ /dev/null @@ -1,45 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineScaleSetPublicIPAddressConfiguration(Model): - """Describes a virtual machines scale set IP Configuration's PublicIPAddress - configuration. - - All required parameters must be populated in order to send to Azure. - - :param name: Required. The publicIP address configuration name. - :type name: str - :param idle_timeout_in_minutes: The idle timeout of the public IP address. - :type idle_timeout_in_minutes: int - :param dns_settings: The dns settings to be applied on the publicIP - addresses . - :type dns_settings: - ~azure.mgmt.compute.v2017_03_30.models.VirtualMachineScaleSetPublicIPAddressConfigurationDnsSettings - """ - - _validation = { - 'name': {'required': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'idle_timeout_in_minutes': {'key': 'properties.idleTimeoutInMinutes', 'type': 'int'}, - 'dns_settings': {'key': 'properties.dnsSettings', 'type': 'VirtualMachineScaleSetPublicIPAddressConfigurationDnsSettings'}, - } - - def __init__(self, *, name: str, idle_timeout_in_minutes: int=None, dns_settings=None, **kwargs) -> None: - super(VirtualMachineScaleSetPublicIPAddressConfiguration, self).__init__(**kwargs) - self.name = name - self.idle_timeout_in_minutes = idle_timeout_in_minutes - self.dns_settings = dns_settings diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_scale_set_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_scale_set_py3.py deleted file mode 100644 index a1ea651839eb..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_scale_set_py3.py +++ /dev/null @@ -1,106 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource_py3 import Resource - - -class VirtualMachineScaleSet(Resource): - """Describes a Virtual Machine Scale Set. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource Id - :vartype id: str - :ivar name: Resource name - :vartype name: str - :ivar type: Resource type - :vartype type: str - :param location: Required. Resource location - :type location: str - :param tags: Resource tags - :type tags: dict[str, str] - :param sku: The virtual machine scale set sku. - :type sku: ~azure.mgmt.compute.v2017_03_30.models.Sku - :param plan: Specifies information about the marketplace image used to - create the virtual machine. This element is only used for marketplace - images. Before you can use a marketplace image from an API, you must - enable the image for programmatic use. In the Azure portal, find the - marketplace image that you want to use and then click **Want to deploy - programmatically, Get Started ->**. Enter any required information and - then click **Save**. - :type plan: ~azure.mgmt.compute.v2017_03_30.models.Plan - :param upgrade_policy: The upgrade policy. - :type upgrade_policy: ~azure.mgmt.compute.v2017_03_30.models.UpgradePolicy - :param virtual_machine_profile: The virtual machine profile. - :type virtual_machine_profile: - ~azure.mgmt.compute.v2017_03_30.models.VirtualMachineScaleSetVMProfile - :ivar provisioning_state: The provisioning state, which only appears in - the response. - :vartype provisioning_state: str - :param overprovision: Specifies whether the Virtual Machine Scale Set - should be overprovisioned. - :type overprovision: bool - :ivar unique_id: Specifies the ID which uniquely identifies a Virtual - Machine Scale Set. - :vartype unique_id: str - :param single_placement_group: When true this limits the scale set to a - single placement group, of max size 100 virtual machines. - :type single_placement_group: bool - :param identity: The identity of the virtual machine scale set, if - configured. - :type identity: - ~azure.mgmt.compute.v2017_03_30.models.VirtualMachineScaleSetIdentity - :param zones: The virtual machine scale set zones. - :type zones: list[str] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - 'provisioning_state': {'readonly': True}, - 'unique_id': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'sku': {'key': 'sku', 'type': 'Sku'}, - 'plan': {'key': 'plan', 'type': 'Plan'}, - 'upgrade_policy': {'key': 'properties.upgradePolicy', 'type': 'UpgradePolicy'}, - 'virtual_machine_profile': {'key': 'properties.virtualMachineProfile', 'type': 'VirtualMachineScaleSetVMProfile'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'overprovision': {'key': 'properties.overprovision', 'type': 'bool'}, - 'unique_id': {'key': 'properties.uniqueId', 'type': 'str'}, - 'single_placement_group': {'key': 'properties.singlePlacementGroup', 'type': 'bool'}, - 'identity': {'key': 'identity', 'type': 'VirtualMachineScaleSetIdentity'}, - 'zones': {'key': 'zones', 'type': '[str]'}, - } - - def __init__(self, *, location: str, tags=None, sku=None, plan=None, upgrade_policy=None, virtual_machine_profile=None, overprovision: bool=None, single_placement_group: bool=None, identity=None, zones=None, **kwargs) -> None: - super(VirtualMachineScaleSet, self).__init__(location=location, tags=tags, **kwargs) - self.sku = sku - self.plan = plan - self.upgrade_policy = upgrade_policy - self.virtual_machine_profile = virtual_machine_profile - self.provisioning_state = None - self.overprovision = overprovision - self.unique_id = None - self.single_placement_group = single_placement_group - self.identity = identity - self.zones = zones diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_scale_set_sku.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_scale_set_sku.py deleted file mode 100644 index 7df68f8507c3..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_scale_set_sku.py +++ /dev/null @@ -1,46 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineScaleSetSku(Model): - """Describes an available virtual machine scale set sku. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar resource_type: The type of resource the sku applies to. - :vartype resource_type: str - :ivar sku: The Sku. - :vartype sku: ~azure.mgmt.compute.v2017_03_30.models.Sku - :ivar capacity: Specifies the number of virtual machines in the scale set. - :vartype capacity: - ~azure.mgmt.compute.v2017_03_30.models.VirtualMachineScaleSetSkuCapacity - """ - - _validation = { - 'resource_type': {'readonly': True}, - 'sku': {'readonly': True}, - 'capacity': {'readonly': True}, - } - - _attribute_map = { - 'resource_type': {'key': 'resourceType', 'type': 'str'}, - 'sku': {'key': 'sku', 'type': 'Sku'}, - 'capacity': {'key': 'capacity', 'type': 'VirtualMachineScaleSetSkuCapacity'}, - } - - def __init__(self, **kwargs): - super(VirtualMachineScaleSetSku, self).__init__(**kwargs) - self.resource_type = None - self.sku = None - self.capacity = None diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_scale_set_sku_capacity.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_scale_set_sku_capacity.py deleted file mode 100644 index 9b483b29e72b..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_scale_set_sku_capacity.py +++ /dev/null @@ -1,52 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineScaleSetSkuCapacity(Model): - """Describes scaling information of a sku. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar minimum: The minimum capacity. - :vartype minimum: long - :ivar maximum: The maximum capacity that can be set. - :vartype maximum: long - :ivar default_capacity: The default capacity. - :vartype default_capacity: long - :ivar scale_type: The scale type applicable to the sku. Possible values - include: 'Automatic', 'None' - :vartype scale_type: str or - ~azure.mgmt.compute.v2017_03_30.models.VirtualMachineScaleSetSkuScaleType - """ - - _validation = { - 'minimum': {'readonly': True}, - 'maximum': {'readonly': True}, - 'default_capacity': {'readonly': True}, - 'scale_type': {'readonly': True}, - } - - _attribute_map = { - 'minimum': {'key': 'minimum', 'type': 'long'}, - 'maximum': {'key': 'maximum', 'type': 'long'}, - 'default_capacity': {'key': 'defaultCapacity', 'type': 'long'}, - 'scale_type': {'key': 'scaleType', 'type': 'VirtualMachineScaleSetSkuScaleType'}, - } - - def __init__(self, **kwargs): - super(VirtualMachineScaleSetSkuCapacity, self).__init__(**kwargs) - self.minimum = None - self.maximum = None - self.default_capacity = None - self.scale_type = None diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_scale_set_sku_capacity_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_scale_set_sku_capacity_py3.py deleted file mode 100644 index 167f1b55495e..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_scale_set_sku_capacity_py3.py +++ /dev/null @@ -1,52 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineScaleSetSkuCapacity(Model): - """Describes scaling information of a sku. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar minimum: The minimum capacity. - :vartype minimum: long - :ivar maximum: The maximum capacity that can be set. - :vartype maximum: long - :ivar default_capacity: The default capacity. - :vartype default_capacity: long - :ivar scale_type: The scale type applicable to the sku. Possible values - include: 'Automatic', 'None' - :vartype scale_type: str or - ~azure.mgmt.compute.v2017_03_30.models.VirtualMachineScaleSetSkuScaleType - """ - - _validation = { - 'minimum': {'readonly': True}, - 'maximum': {'readonly': True}, - 'default_capacity': {'readonly': True}, - 'scale_type': {'readonly': True}, - } - - _attribute_map = { - 'minimum': {'key': 'minimum', 'type': 'long'}, - 'maximum': {'key': 'maximum', 'type': 'long'}, - 'default_capacity': {'key': 'defaultCapacity', 'type': 'long'}, - 'scale_type': {'key': 'scaleType', 'type': 'VirtualMachineScaleSetSkuScaleType'}, - } - - def __init__(self, **kwargs) -> None: - super(VirtualMachineScaleSetSkuCapacity, self).__init__(**kwargs) - self.minimum = None - self.maximum = None - self.default_capacity = None - self.scale_type = None diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_scale_set_sku_paged.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_scale_set_sku_paged.py deleted file mode 100644 index ebf6755b8f6a..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_scale_set_sku_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class VirtualMachineScaleSetSkuPaged(Paged): - """ - A paging container for iterating over a list of :class:`VirtualMachineScaleSetSku ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[VirtualMachineScaleSetSku]'} - } - - def __init__(self, *args, **kwargs): - - super(VirtualMachineScaleSetSkuPaged, self).__init__(*args, **kwargs) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_scale_set_sku_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_scale_set_sku_py3.py deleted file mode 100644 index 3855816f1f80..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_scale_set_sku_py3.py +++ /dev/null @@ -1,46 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineScaleSetSku(Model): - """Describes an available virtual machine scale set sku. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar resource_type: The type of resource the sku applies to. - :vartype resource_type: str - :ivar sku: The Sku. - :vartype sku: ~azure.mgmt.compute.v2017_03_30.models.Sku - :ivar capacity: Specifies the number of virtual machines in the scale set. - :vartype capacity: - ~azure.mgmt.compute.v2017_03_30.models.VirtualMachineScaleSetSkuCapacity - """ - - _validation = { - 'resource_type': {'readonly': True}, - 'sku': {'readonly': True}, - 'capacity': {'readonly': True}, - } - - _attribute_map = { - 'resource_type': {'key': 'resourceType', 'type': 'str'}, - 'sku': {'key': 'sku', 'type': 'Sku'}, - 'capacity': {'key': 'capacity', 'type': 'VirtualMachineScaleSetSkuCapacity'}, - } - - def __init__(self, **kwargs) -> None: - super(VirtualMachineScaleSetSku, self).__init__(**kwargs) - self.resource_type = None - self.sku = None - self.capacity = None diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_scale_set_storage_profile.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_scale_set_storage_profile.py deleted file mode 100644 index eea90cc9e86e..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_scale_set_storage_profile.py +++ /dev/null @@ -1,49 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineScaleSetStorageProfile(Model): - """Describes a virtual machine scale set storage profile. - - :param image_reference: Specifies information about the image to use. You - can specify information about platform images, marketplace images, or - virtual machine images. This element is required when you want to use a - platform image, marketplace image, or virtual machine image, but is not - used in other creation operations. - :type image_reference: - ~azure.mgmt.compute.v2017_03_30.models.ImageReference - :param os_disk: Specifies information about the operating system disk used - by the virtual machines in the scale set.

    For more information - about disks, see [About disks and VHDs for Azure virtual - machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-about-disks-vhds?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). - :type os_disk: - ~azure.mgmt.compute.v2017_03_30.models.VirtualMachineScaleSetOSDisk - :param data_disks: Specifies the parameters that are used to add data - disks to the virtual machines in the scale set.

    For more - information about disks, see [About disks and VHDs for Azure virtual - machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-about-disks-vhds?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). - :type data_disks: - list[~azure.mgmt.compute.v2017_03_30.models.VirtualMachineScaleSetDataDisk] - """ - - _attribute_map = { - 'image_reference': {'key': 'imageReference', 'type': 'ImageReference'}, - 'os_disk': {'key': 'osDisk', 'type': 'VirtualMachineScaleSetOSDisk'}, - 'data_disks': {'key': 'dataDisks', 'type': '[VirtualMachineScaleSetDataDisk]'}, - } - - def __init__(self, **kwargs): - super(VirtualMachineScaleSetStorageProfile, self).__init__(**kwargs) - self.image_reference = kwargs.get('image_reference', None) - self.os_disk = kwargs.get('os_disk', None) - self.data_disks = kwargs.get('data_disks', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_scale_set_storage_profile_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_scale_set_storage_profile_py3.py deleted file mode 100644 index e36c69eb5668..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_scale_set_storage_profile_py3.py +++ /dev/null @@ -1,49 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineScaleSetStorageProfile(Model): - """Describes a virtual machine scale set storage profile. - - :param image_reference: Specifies information about the image to use. You - can specify information about platform images, marketplace images, or - virtual machine images. This element is required when you want to use a - platform image, marketplace image, or virtual machine image, but is not - used in other creation operations. - :type image_reference: - ~azure.mgmt.compute.v2017_03_30.models.ImageReference - :param os_disk: Specifies information about the operating system disk used - by the virtual machines in the scale set.

    For more information - about disks, see [About disks and VHDs for Azure virtual - machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-about-disks-vhds?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). - :type os_disk: - ~azure.mgmt.compute.v2017_03_30.models.VirtualMachineScaleSetOSDisk - :param data_disks: Specifies the parameters that are used to add data - disks to the virtual machines in the scale set.

    For more - information about disks, see [About disks and VHDs for Azure virtual - machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-about-disks-vhds?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). - :type data_disks: - list[~azure.mgmt.compute.v2017_03_30.models.VirtualMachineScaleSetDataDisk] - """ - - _attribute_map = { - 'image_reference': {'key': 'imageReference', 'type': 'ImageReference'}, - 'os_disk': {'key': 'osDisk', 'type': 'VirtualMachineScaleSetOSDisk'}, - 'data_disks': {'key': 'dataDisks', 'type': '[VirtualMachineScaleSetDataDisk]'}, - } - - def __init__(self, *, image_reference=None, os_disk=None, data_disks=None, **kwargs) -> None: - super(VirtualMachineScaleSetStorageProfile, self).__init__(**kwargs) - self.image_reference = image_reference - self.os_disk = os_disk - self.data_disks = data_disks diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_scale_set_update.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_scale_set_update.py deleted file mode 100644 index f0e05bd78e2e..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_scale_set_update.py +++ /dev/null @@ -1,61 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .update_resource import UpdateResource - - -class VirtualMachineScaleSetUpdate(UpdateResource): - """Describes a Virtual Machine Scale Set. - - :param tags: Resource tags - :type tags: dict[str, str] - :param sku: The virtual machine scale set sku. - :type sku: ~azure.mgmt.compute.v2017_03_30.models.Sku - :param plan: The purchase plan when deploying a virtual machine scale set - from VM Marketplace images. - :type plan: ~azure.mgmt.compute.v2017_03_30.models.Plan - :param upgrade_policy: The upgrade policy. - :type upgrade_policy: ~azure.mgmt.compute.v2017_03_30.models.UpgradePolicy - :param virtual_machine_profile: The virtual machine profile. - :type virtual_machine_profile: - ~azure.mgmt.compute.v2017_03_30.models.VirtualMachineScaleSetUpdateVMProfile - :param overprovision: Specifies whether the Virtual Machine Scale Set - should be overprovisioned. - :type overprovision: bool - :param single_placement_group: When true this limits the scale set to a - single placement group, of max size 100 virtual machines. - :type single_placement_group: bool - :param identity: The identity of the virtual machine scale set, if - configured. - :type identity: - ~azure.mgmt.compute.v2017_03_30.models.VirtualMachineScaleSetIdentity - """ - - _attribute_map = { - 'tags': {'key': 'tags', 'type': '{str}'}, - 'sku': {'key': 'sku', 'type': 'Sku'}, - 'plan': {'key': 'plan', 'type': 'Plan'}, - 'upgrade_policy': {'key': 'properties.upgradePolicy', 'type': 'UpgradePolicy'}, - 'virtual_machine_profile': {'key': 'properties.virtualMachineProfile', 'type': 'VirtualMachineScaleSetUpdateVMProfile'}, - 'overprovision': {'key': 'properties.overprovision', 'type': 'bool'}, - 'single_placement_group': {'key': 'properties.singlePlacementGroup', 'type': 'bool'}, - 'identity': {'key': 'identity', 'type': 'VirtualMachineScaleSetIdentity'}, - } - - def __init__(self, **kwargs): - super(VirtualMachineScaleSetUpdate, self).__init__(**kwargs) - self.sku = kwargs.get('sku', None) - self.plan = kwargs.get('plan', None) - self.upgrade_policy = kwargs.get('upgrade_policy', None) - self.virtual_machine_profile = kwargs.get('virtual_machine_profile', None) - self.overprovision = kwargs.get('overprovision', None) - self.single_placement_group = kwargs.get('single_placement_group', None) - self.identity = kwargs.get('identity', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_scale_set_update_ip_configuration.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_scale_set_update_ip_configuration.py deleted file mode 100644 index 4e40f478cf3a..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_scale_set_update_ip_configuration.py +++ /dev/null @@ -1,71 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .sub_resource import SubResource - - -class VirtualMachineScaleSetUpdateIPConfiguration(SubResource): - """Describes a virtual machine scale set network profile's IP configuration. - - :param id: Resource Id - :type id: str - :param name: The IP configuration name. - :type name: str - :param subnet: The subnet. - :type subnet: ~azure.mgmt.compute.v2017_03_30.models.ApiEntityReference - :param primary: Specifies the primary IP Configuration in case the network - interface has more than one IP Configuration. - :type primary: bool - :param public_ip_address_configuration: The publicIPAddressConfiguration. - :type public_ip_address_configuration: - ~azure.mgmt.compute.v2017_03_30.models.VirtualMachineScaleSetUpdatePublicIPAddressConfiguration - :param private_ip_address_version: Available from Api-Version 2017-03-30 - onwards, it represents whether the specific ipconfiguration is IPv4 or - IPv6. Default is taken as IPv4. Possible values are: 'IPv4' and 'IPv6'. - Possible values include: 'IPv4', 'IPv6' - :type private_ip_address_version: str or - ~azure.mgmt.compute.v2017_03_30.models.IPVersion - :param application_gateway_backend_address_pools: The application gateway - backend address pools. - :type application_gateway_backend_address_pools: - list[~azure.mgmt.compute.v2017_03_30.models.SubResource] - :param load_balancer_backend_address_pools: The load balancer backend - address pools. - :type load_balancer_backend_address_pools: - list[~azure.mgmt.compute.v2017_03_30.models.SubResource] - :param load_balancer_inbound_nat_pools: The load balancer inbound nat - pools. - :type load_balancer_inbound_nat_pools: - list[~azure.mgmt.compute.v2017_03_30.models.SubResource] - """ - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'subnet': {'key': 'properties.subnet', 'type': 'ApiEntityReference'}, - 'primary': {'key': 'properties.primary', 'type': 'bool'}, - 'public_ip_address_configuration': {'key': 'properties.publicIPAddressConfiguration', 'type': 'VirtualMachineScaleSetUpdatePublicIPAddressConfiguration'}, - 'private_ip_address_version': {'key': 'properties.privateIPAddressVersion', 'type': 'str'}, - 'application_gateway_backend_address_pools': {'key': 'properties.applicationGatewayBackendAddressPools', 'type': '[SubResource]'}, - 'load_balancer_backend_address_pools': {'key': 'properties.loadBalancerBackendAddressPools', 'type': '[SubResource]'}, - 'load_balancer_inbound_nat_pools': {'key': 'properties.loadBalancerInboundNatPools', 'type': '[SubResource]'}, - } - - def __init__(self, **kwargs): - super(VirtualMachineScaleSetUpdateIPConfiguration, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.subnet = kwargs.get('subnet', None) - self.primary = kwargs.get('primary', None) - self.public_ip_address_configuration = kwargs.get('public_ip_address_configuration', None) - self.private_ip_address_version = kwargs.get('private_ip_address_version', None) - self.application_gateway_backend_address_pools = kwargs.get('application_gateway_backend_address_pools', None) - self.load_balancer_backend_address_pools = kwargs.get('load_balancer_backend_address_pools', None) - self.load_balancer_inbound_nat_pools = kwargs.get('load_balancer_inbound_nat_pools', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_scale_set_update_ip_configuration_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_scale_set_update_ip_configuration_py3.py deleted file mode 100644 index c1f9f663572d..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_scale_set_update_ip_configuration_py3.py +++ /dev/null @@ -1,71 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .sub_resource_py3 import SubResource - - -class VirtualMachineScaleSetUpdateIPConfiguration(SubResource): - """Describes a virtual machine scale set network profile's IP configuration. - - :param id: Resource Id - :type id: str - :param name: The IP configuration name. - :type name: str - :param subnet: The subnet. - :type subnet: ~azure.mgmt.compute.v2017_03_30.models.ApiEntityReference - :param primary: Specifies the primary IP Configuration in case the network - interface has more than one IP Configuration. - :type primary: bool - :param public_ip_address_configuration: The publicIPAddressConfiguration. - :type public_ip_address_configuration: - ~azure.mgmt.compute.v2017_03_30.models.VirtualMachineScaleSetUpdatePublicIPAddressConfiguration - :param private_ip_address_version: Available from Api-Version 2017-03-30 - onwards, it represents whether the specific ipconfiguration is IPv4 or - IPv6. Default is taken as IPv4. Possible values are: 'IPv4' and 'IPv6'. - Possible values include: 'IPv4', 'IPv6' - :type private_ip_address_version: str or - ~azure.mgmt.compute.v2017_03_30.models.IPVersion - :param application_gateway_backend_address_pools: The application gateway - backend address pools. - :type application_gateway_backend_address_pools: - list[~azure.mgmt.compute.v2017_03_30.models.SubResource] - :param load_balancer_backend_address_pools: The load balancer backend - address pools. - :type load_balancer_backend_address_pools: - list[~azure.mgmt.compute.v2017_03_30.models.SubResource] - :param load_balancer_inbound_nat_pools: The load balancer inbound nat - pools. - :type load_balancer_inbound_nat_pools: - list[~azure.mgmt.compute.v2017_03_30.models.SubResource] - """ - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'subnet': {'key': 'properties.subnet', 'type': 'ApiEntityReference'}, - 'primary': {'key': 'properties.primary', 'type': 'bool'}, - 'public_ip_address_configuration': {'key': 'properties.publicIPAddressConfiguration', 'type': 'VirtualMachineScaleSetUpdatePublicIPAddressConfiguration'}, - 'private_ip_address_version': {'key': 'properties.privateIPAddressVersion', 'type': 'str'}, - 'application_gateway_backend_address_pools': {'key': 'properties.applicationGatewayBackendAddressPools', 'type': '[SubResource]'}, - 'load_balancer_backend_address_pools': {'key': 'properties.loadBalancerBackendAddressPools', 'type': '[SubResource]'}, - 'load_balancer_inbound_nat_pools': {'key': 'properties.loadBalancerInboundNatPools', 'type': '[SubResource]'}, - } - - def __init__(self, *, id: str=None, name: str=None, subnet=None, primary: bool=None, public_ip_address_configuration=None, private_ip_address_version=None, application_gateway_backend_address_pools=None, load_balancer_backend_address_pools=None, load_balancer_inbound_nat_pools=None, **kwargs) -> None: - super(VirtualMachineScaleSetUpdateIPConfiguration, self).__init__(id=id, **kwargs) - self.name = name - self.subnet = subnet - self.primary = primary - self.public_ip_address_configuration = public_ip_address_configuration - self.private_ip_address_version = private_ip_address_version - self.application_gateway_backend_address_pools = application_gateway_backend_address_pools - self.load_balancer_backend_address_pools = load_balancer_backend_address_pools - self.load_balancer_inbound_nat_pools = load_balancer_inbound_nat_pools diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_scale_set_update_network_configuration.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_scale_set_update_network_configuration.py deleted file mode 100644 index d4b239a579d3..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_scale_set_update_network_configuration.py +++ /dev/null @@ -1,57 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .sub_resource import SubResource - - -class VirtualMachineScaleSetUpdateNetworkConfiguration(SubResource): - """Describes a virtual machine scale set network profile's network - configurations. - - :param id: Resource Id - :type id: str - :param name: The network configuration name. - :type name: str - :param primary: Whether this is a primary NIC on a virtual machine. - :type primary: bool - :param enable_accelerated_networking: Specifies whether the network - interface is accelerated networking-enabled. - :type enable_accelerated_networking: bool - :param network_security_group: The network security group. - :type network_security_group: - ~azure.mgmt.compute.v2017_03_30.models.SubResource - :param dns_settings: The dns settings to be applied on the network - interfaces. - :type dns_settings: - ~azure.mgmt.compute.v2017_03_30.models.VirtualMachineScaleSetNetworkConfigurationDnsSettings - :param ip_configurations: The virtual machine scale set IP Configuration. - :type ip_configurations: - list[~azure.mgmt.compute.v2017_03_30.models.VirtualMachineScaleSetUpdateIPConfiguration] - """ - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'primary': {'key': 'properties.primary', 'type': 'bool'}, - 'enable_accelerated_networking': {'key': 'properties.enableAcceleratedNetworking', 'type': 'bool'}, - 'network_security_group': {'key': 'properties.networkSecurityGroup', 'type': 'SubResource'}, - 'dns_settings': {'key': 'properties.dnsSettings', 'type': 'VirtualMachineScaleSetNetworkConfigurationDnsSettings'}, - 'ip_configurations': {'key': 'properties.ipConfigurations', 'type': '[VirtualMachineScaleSetUpdateIPConfiguration]'}, - } - - def __init__(self, **kwargs): - super(VirtualMachineScaleSetUpdateNetworkConfiguration, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.primary = kwargs.get('primary', None) - self.enable_accelerated_networking = kwargs.get('enable_accelerated_networking', None) - self.network_security_group = kwargs.get('network_security_group', None) - self.dns_settings = kwargs.get('dns_settings', None) - self.ip_configurations = kwargs.get('ip_configurations', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_scale_set_update_network_configuration_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_scale_set_update_network_configuration_py3.py deleted file mode 100644 index b688e9e2ca59..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_scale_set_update_network_configuration_py3.py +++ /dev/null @@ -1,57 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .sub_resource_py3 import SubResource - - -class VirtualMachineScaleSetUpdateNetworkConfiguration(SubResource): - """Describes a virtual machine scale set network profile's network - configurations. - - :param id: Resource Id - :type id: str - :param name: The network configuration name. - :type name: str - :param primary: Whether this is a primary NIC on a virtual machine. - :type primary: bool - :param enable_accelerated_networking: Specifies whether the network - interface is accelerated networking-enabled. - :type enable_accelerated_networking: bool - :param network_security_group: The network security group. - :type network_security_group: - ~azure.mgmt.compute.v2017_03_30.models.SubResource - :param dns_settings: The dns settings to be applied on the network - interfaces. - :type dns_settings: - ~azure.mgmt.compute.v2017_03_30.models.VirtualMachineScaleSetNetworkConfigurationDnsSettings - :param ip_configurations: The virtual machine scale set IP Configuration. - :type ip_configurations: - list[~azure.mgmt.compute.v2017_03_30.models.VirtualMachineScaleSetUpdateIPConfiguration] - """ - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'primary': {'key': 'properties.primary', 'type': 'bool'}, - 'enable_accelerated_networking': {'key': 'properties.enableAcceleratedNetworking', 'type': 'bool'}, - 'network_security_group': {'key': 'properties.networkSecurityGroup', 'type': 'SubResource'}, - 'dns_settings': {'key': 'properties.dnsSettings', 'type': 'VirtualMachineScaleSetNetworkConfigurationDnsSettings'}, - 'ip_configurations': {'key': 'properties.ipConfigurations', 'type': '[VirtualMachineScaleSetUpdateIPConfiguration]'}, - } - - def __init__(self, *, id: str=None, name: str=None, primary: bool=None, enable_accelerated_networking: bool=None, network_security_group=None, dns_settings=None, ip_configurations=None, **kwargs) -> None: - super(VirtualMachineScaleSetUpdateNetworkConfiguration, self).__init__(id=id, **kwargs) - self.name = name - self.primary = primary - self.enable_accelerated_networking = enable_accelerated_networking - self.network_security_group = network_security_group - self.dns_settings = dns_settings - self.ip_configurations = ip_configurations diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_scale_set_update_network_profile.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_scale_set_update_network_profile.py deleted file mode 100644 index f454544145ca..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_scale_set_update_network_profile.py +++ /dev/null @@ -1,30 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineScaleSetUpdateNetworkProfile(Model): - """Describes a virtual machine scale set network profile. - - :param network_interface_configurations: The list of network - configurations. - :type network_interface_configurations: - list[~azure.mgmt.compute.v2017_03_30.models.VirtualMachineScaleSetUpdateNetworkConfiguration] - """ - - _attribute_map = { - 'network_interface_configurations': {'key': 'networkInterfaceConfigurations', 'type': '[VirtualMachineScaleSetUpdateNetworkConfiguration]'}, - } - - def __init__(self, **kwargs): - super(VirtualMachineScaleSetUpdateNetworkProfile, self).__init__(**kwargs) - self.network_interface_configurations = kwargs.get('network_interface_configurations', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_scale_set_update_network_profile_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_scale_set_update_network_profile_py3.py deleted file mode 100644 index ac421c4a18d7..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_scale_set_update_network_profile_py3.py +++ /dev/null @@ -1,30 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineScaleSetUpdateNetworkProfile(Model): - """Describes a virtual machine scale set network profile. - - :param network_interface_configurations: The list of network - configurations. - :type network_interface_configurations: - list[~azure.mgmt.compute.v2017_03_30.models.VirtualMachineScaleSetUpdateNetworkConfiguration] - """ - - _attribute_map = { - 'network_interface_configurations': {'key': 'networkInterfaceConfigurations', 'type': '[VirtualMachineScaleSetUpdateNetworkConfiguration]'}, - } - - def __init__(self, *, network_interface_configurations=None, **kwargs) -> None: - super(VirtualMachineScaleSetUpdateNetworkProfile, self).__init__(**kwargs) - self.network_interface_configurations = network_interface_configurations diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_scale_set_update_os_disk.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_scale_set_update_os_disk.py deleted file mode 100644 index cdc8991bda95..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_scale_set_update_os_disk.py +++ /dev/null @@ -1,45 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineScaleSetUpdateOSDisk(Model): - """Describes virtual machine scale set operating system disk Update Object. - This should be used for Updating VMSS OS Disk. - - :param caching: The caching type. Possible values include: 'None', - 'ReadOnly', 'ReadWrite' - :type caching: str or ~azure.mgmt.compute.v2017_03_30.models.CachingTypes - :param image: The Source User Image VirtualHardDisk. This VirtualHardDisk - will be copied before using it to attach to the Virtual Machine. If - SourceImage is provided, the destination VirtualHardDisk should not exist. - :type image: ~azure.mgmt.compute.v2017_03_30.models.VirtualHardDisk - :param vhd_containers: The list of virtual hard disk container uris. - :type vhd_containers: list[str] - :param managed_disk: The managed disk parameters. - :type managed_disk: - ~azure.mgmt.compute.v2017_03_30.models.VirtualMachineScaleSetManagedDiskParameters - """ - - _attribute_map = { - 'caching': {'key': 'caching', 'type': 'CachingTypes'}, - 'image': {'key': 'image', 'type': 'VirtualHardDisk'}, - 'vhd_containers': {'key': 'vhdContainers', 'type': '[str]'}, - 'managed_disk': {'key': 'managedDisk', 'type': 'VirtualMachineScaleSetManagedDiskParameters'}, - } - - def __init__(self, **kwargs): - super(VirtualMachineScaleSetUpdateOSDisk, self).__init__(**kwargs) - self.caching = kwargs.get('caching', None) - self.image = kwargs.get('image', None) - self.vhd_containers = kwargs.get('vhd_containers', None) - self.managed_disk = kwargs.get('managed_disk', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_scale_set_update_os_disk_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_scale_set_update_os_disk_py3.py deleted file mode 100644 index 3357b7c3aedb..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_scale_set_update_os_disk_py3.py +++ /dev/null @@ -1,45 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineScaleSetUpdateOSDisk(Model): - """Describes virtual machine scale set operating system disk Update Object. - This should be used for Updating VMSS OS Disk. - - :param caching: The caching type. Possible values include: 'None', - 'ReadOnly', 'ReadWrite' - :type caching: str or ~azure.mgmt.compute.v2017_03_30.models.CachingTypes - :param image: The Source User Image VirtualHardDisk. This VirtualHardDisk - will be copied before using it to attach to the Virtual Machine. If - SourceImage is provided, the destination VirtualHardDisk should not exist. - :type image: ~azure.mgmt.compute.v2017_03_30.models.VirtualHardDisk - :param vhd_containers: The list of virtual hard disk container uris. - :type vhd_containers: list[str] - :param managed_disk: The managed disk parameters. - :type managed_disk: - ~azure.mgmt.compute.v2017_03_30.models.VirtualMachineScaleSetManagedDiskParameters - """ - - _attribute_map = { - 'caching': {'key': 'caching', 'type': 'CachingTypes'}, - 'image': {'key': 'image', 'type': 'VirtualHardDisk'}, - 'vhd_containers': {'key': 'vhdContainers', 'type': '[str]'}, - 'managed_disk': {'key': 'managedDisk', 'type': 'VirtualMachineScaleSetManagedDiskParameters'}, - } - - def __init__(self, *, caching=None, image=None, vhd_containers=None, managed_disk=None, **kwargs) -> None: - super(VirtualMachineScaleSetUpdateOSDisk, self).__init__(**kwargs) - self.caching = caching - self.image = image - self.vhd_containers = vhd_containers - self.managed_disk = managed_disk diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_scale_set_update_os_profile.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_scale_set_update_os_profile.py deleted file mode 100644 index 2a450b7a5743..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_scale_set_update_os_profile.py +++ /dev/null @@ -1,43 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineScaleSetUpdateOSProfile(Model): - """Describes a virtual machine scale set OS profile. - - :param custom_data: A base-64 encoded string of custom data. - :type custom_data: str - :param windows_configuration: The Windows Configuration of the OS profile. - :type windows_configuration: - ~azure.mgmt.compute.v2017_03_30.models.WindowsConfiguration - :param linux_configuration: The Linux Configuration of the OS profile. - :type linux_configuration: - ~azure.mgmt.compute.v2017_03_30.models.LinuxConfiguration - :param secrets: The List of certificates for addition to the VM. - :type secrets: - list[~azure.mgmt.compute.v2017_03_30.models.VaultSecretGroup] - """ - - _attribute_map = { - 'custom_data': {'key': 'customData', 'type': 'str'}, - 'windows_configuration': {'key': 'windowsConfiguration', 'type': 'WindowsConfiguration'}, - 'linux_configuration': {'key': 'linuxConfiguration', 'type': 'LinuxConfiguration'}, - 'secrets': {'key': 'secrets', 'type': '[VaultSecretGroup]'}, - } - - def __init__(self, **kwargs): - super(VirtualMachineScaleSetUpdateOSProfile, self).__init__(**kwargs) - self.custom_data = kwargs.get('custom_data', None) - self.windows_configuration = kwargs.get('windows_configuration', None) - self.linux_configuration = kwargs.get('linux_configuration', None) - self.secrets = kwargs.get('secrets', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_scale_set_update_os_profile_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_scale_set_update_os_profile_py3.py deleted file mode 100644 index 18b1e26f7176..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_scale_set_update_os_profile_py3.py +++ /dev/null @@ -1,43 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineScaleSetUpdateOSProfile(Model): - """Describes a virtual machine scale set OS profile. - - :param custom_data: A base-64 encoded string of custom data. - :type custom_data: str - :param windows_configuration: The Windows Configuration of the OS profile. - :type windows_configuration: - ~azure.mgmt.compute.v2017_03_30.models.WindowsConfiguration - :param linux_configuration: The Linux Configuration of the OS profile. - :type linux_configuration: - ~azure.mgmt.compute.v2017_03_30.models.LinuxConfiguration - :param secrets: The List of certificates for addition to the VM. - :type secrets: - list[~azure.mgmt.compute.v2017_03_30.models.VaultSecretGroup] - """ - - _attribute_map = { - 'custom_data': {'key': 'customData', 'type': 'str'}, - 'windows_configuration': {'key': 'windowsConfiguration', 'type': 'WindowsConfiguration'}, - 'linux_configuration': {'key': 'linuxConfiguration', 'type': 'LinuxConfiguration'}, - 'secrets': {'key': 'secrets', 'type': '[VaultSecretGroup]'}, - } - - def __init__(self, *, custom_data: str=None, windows_configuration=None, linux_configuration=None, secrets=None, **kwargs) -> None: - super(VirtualMachineScaleSetUpdateOSProfile, self).__init__(**kwargs) - self.custom_data = custom_data - self.windows_configuration = windows_configuration - self.linux_configuration = linux_configuration - self.secrets = secrets diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_scale_set_update_public_ip_address_configuration.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_scale_set_update_public_ip_address_configuration.py deleted file mode 100644 index 225b662d4296..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_scale_set_update_public_ip_address_configuration.py +++ /dev/null @@ -1,39 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineScaleSetUpdatePublicIPAddressConfiguration(Model): - """Describes a virtual machines scale set IP Configuration's PublicIPAddress - configuration. - - :param name: The publicIP address configuration name. - :type name: str - :param idle_timeout_in_minutes: The idle timeout of the public IP address. - :type idle_timeout_in_minutes: int - :param dns_settings: The dns settings to be applied on the publicIP - addresses . - :type dns_settings: - ~azure.mgmt.compute.v2017_03_30.models.VirtualMachineScaleSetPublicIPAddressConfigurationDnsSettings - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'idle_timeout_in_minutes': {'key': 'properties.idleTimeoutInMinutes', 'type': 'int'}, - 'dns_settings': {'key': 'properties.dnsSettings', 'type': 'VirtualMachineScaleSetPublicIPAddressConfigurationDnsSettings'}, - } - - def __init__(self, **kwargs): - super(VirtualMachineScaleSetUpdatePublicIPAddressConfiguration, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.idle_timeout_in_minutes = kwargs.get('idle_timeout_in_minutes', None) - self.dns_settings = kwargs.get('dns_settings', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_scale_set_update_public_ip_address_configuration_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_scale_set_update_public_ip_address_configuration_py3.py deleted file mode 100644 index 0c6bc55ac163..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_scale_set_update_public_ip_address_configuration_py3.py +++ /dev/null @@ -1,39 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineScaleSetUpdatePublicIPAddressConfiguration(Model): - """Describes a virtual machines scale set IP Configuration's PublicIPAddress - configuration. - - :param name: The publicIP address configuration name. - :type name: str - :param idle_timeout_in_minutes: The idle timeout of the public IP address. - :type idle_timeout_in_minutes: int - :param dns_settings: The dns settings to be applied on the publicIP - addresses . - :type dns_settings: - ~azure.mgmt.compute.v2017_03_30.models.VirtualMachineScaleSetPublicIPAddressConfigurationDnsSettings - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'idle_timeout_in_minutes': {'key': 'properties.idleTimeoutInMinutes', 'type': 'int'}, - 'dns_settings': {'key': 'properties.dnsSettings', 'type': 'VirtualMachineScaleSetPublicIPAddressConfigurationDnsSettings'}, - } - - def __init__(self, *, name: str=None, idle_timeout_in_minutes: int=None, dns_settings=None, **kwargs) -> None: - super(VirtualMachineScaleSetUpdatePublicIPAddressConfiguration, self).__init__(**kwargs) - self.name = name - self.idle_timeout_in_minutes = idle_timeout_in_minutes - self.dns_settings = dns_settings diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_scale_set_update_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_scale_set_update_py3.py deleted file mode 100644 index e9471fed120a..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_scale_set_update_py3.py +++ /dev/null @@ -1,61 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .update_resource_py3 import UpdateResource - - -class VirtualMachineScaleSetUpdate(UpdateResource): - """Describes a Virtual Machine Scale Set. - - :param tags: Resource tags - :type tags: dict[str, str] - :param sku: The virtual machine scale set sku. - :type sku: ~azure.mgmt.compute.v2017_03_30.models.Sku - :param plan: The purchase plan when deploying a virtual machine scale set - from VM Marketplace images. - :type plan: ~azure.mgmt.compute.v2017_03_30.models.Plan - :param upgrade_policy: The upgrade policy. - :type upgrade_policy: ~azure.mgmt.compute.v2017_03_30.models.UpgradePolicy - :param virtual_machine_profile: The virtual machine profile. - :type virtual_machine_profile: - ~azure.mgmt.compute.v2017_03_30.models.VirtualMachineScaleSetUpdateVMProfile - :param overprovision: Specifies whether the Virtual Machine Scale Set - should be overprovisioned. - :type overprovision: bool - :param single_placement_group: When true this limits the scale set to a - single placement group, of max size 100 virtual machines. - :type single_placement_group: bool - :param identity: The identity of the virtual machine scale set, if - configured. - :type identity: - ~azure.mgmt.compute.v2017_03_30.models.VirtualMachineScaleSetIdentity - """ - - _attribute_map = { - 'tags': {'key': 'tags', 'type': '{str}'}, - 'sku': {'key': 'sku', 'type': 'Sku'}, - 'plan': {'key': 'plan', 'type': 'Plan'}, - 'upgrade_policy': {'key': 'properties.upgradePolicy', 'type': 'UpgradePolicy'}, - 'virtual_machine_profile': {'key': 'properties.virtualMachineProfile', 'type': 'VirtualMachineScaleSetUpdateVMProfile'}, - 'overprovision': {'key': 'properties.overprovision', 'type': 'bool'}, - 'single_placement_group': {'key': 'properties.singlePlacementGroup', 'type': 'bool'}, - 'identity': {'key': 'identity', 'type': 'VirtualMachineScaleSetIdentity'}, - } - - def __init__(self, *, tags=None, sku=None, plan=None, upgrade_policy=None, virtual_machine_profile=None, overprovision: bool=None, single_placement_group: bool=None, identity=None, **kwargs) -> None: - super(VirtualMachineScaleSetUpdate, self).__init__(tags=tags, **kwargs) - self.sku = sku - self.plan = plan - self.upgrade_policy = upgrade_policy - self.virtual_machine_profile = virtual_machine_profile - self.overprovision = overprovision - self.single_placement_group = single_placement_group - self.identity = identity diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_scale_set_update_storage_profile.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_scale_set_update_storage_profile.py deleted file mode 100644 index 68723e6f8c26..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_scale_set_update_storage_profile.py +++ /dev/null @@ -1,39 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineScaleSetUpdateStorageProfile(Model): - """Describes a virtual machine scale set storage profile. - - :param image_reference: The image reference. - :type image_reference: - ~azure.mgmt.compute.v2017_03_30.models.ImageReference - :param os_disk: The OS disk. - :type os_disk: - ~azure.mgmt.compute.v2017_03_30.models.VirtualMachineScaleSetUpdateOSDisk - :param data_disks: The data disks. - :type data_disks: - list[~azure.mgmt.compute.v2017_03_30.models.VirtualMachineScaleSetDataDisk] - """ - - _attribute_map = { - 'image_reference': {'key': 'imageReference', 'type': 'ImageReference'}, - 'os_disk': {'key': 'osDisk', 'type': 'VirtualMachineScaleSetUpdateOSDisk'}, - 'data_disks': {'key': 'dataDisks', 'type': '[VirtualMachineScaleSetDataDisk]'}, - } - - def __init__(self, **kwargs): - super(VirtualMachineScaleSetUpdateStorageProfile, self).__init__(**kwargs) - self.image_reference = kwargs.get('image_reference', None) - self.os_disk = kwargs.get('os_disk', None) - self.data_disks = kwargs.get('data_disks', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_scale_set_update_storage_profile_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_scale_set_update_storage_profile_py3.py deleted file mode 100644 index 10e544fa8ff5..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_scale_set_update_storage_profile_py3.py +++ /dev/null @@ -1,39 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineScaleSetUpdateStorageProfile(Model): - """Describes a virtual machine scale set storage profile. - - :param image_reference: The image reference. - :type image_reference: - ~azure.mgmt.compute.v2017_03_30.models.ImageReference - :param os_disk: The OS disk. - :type os_disk: - ~azure.mgmt.compute.v2017_03_30.models.VirtualMachineScaleSetUpdateOSDisk - :param data_disks: The data disks. - :type data_disks: - list[~azure.mgmt.compute.v2017_03_30.models.VirtualMachineScaleSetDataDisk] - """ - - _attribute_map = { - 'image_reference': {'key': 'imageReference', 'type': 'ImageReference'}, - 'os_disk': {'key': 'osDisk', 'type': 'VirtualMachineScaleSetUpdateOSDisk'}, - 'data_disks': {'key': 'dataDisks', 'type': '[VirtualMachineScaleSetDataDisk]'}, - } - - def __init__(self, *, image_reference=None, os_disk=None, data_disks=None, **kwargs) -> None: - super(VirtualMachineScaleSetUpdateStorageProfile, self).__init__(**kwargs) - self.image_reference = image_reference - self.os_disk = os_disk - self.data_disks = data_disks diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_scale_set_update_vm_profile.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_scale_set_update_vm_profile.py deleted file mode 100644 index 769e70ebc7b4..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_scale_set_update_vm_profile.py +++ /dev/null @@ -1,55 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineScaleSetUpdateVMProfile(Model): - """Describes a virtual machine scale set virtual machine profile. - - :param os_profile: The virtual machine scale set OS profile. - :type os_profile: - ~azure.mgmt.compute.v2017_03_30.models.VirtualMachineScaleSetUpdateOSProfile - :param storage_profile: The virtual machine scale set storage profile. - :type storage_profile: - ~azure.mgmt.compute.v2017_03_30.models.VirtualMachineScaleSetUpdateStorageProfile - :param network_profile: The virtual machine scale set network profile. - :type network_profile: - ~azure.mgmt.compute.v2017_03_30.models.VirtualMachineScaleSetUpdateNetworkProfile - :param diagnostics_profile: The virtual machine scale set diagnostics - profile. - :type diagnostics_profile: - ~azure.mgmt.compute.v2017_03_30.models.DiagnosticsProfile - :param extension_profile: The virtual machine scale set extension profile. - :type extension_profile: - ~azure.mgmt.compute.v2017_03_30.models.VirtualMachineScaleSetExtensionProfile - :param license_type: The license type, which is for bring your own license - scenario. - :type license_type: str - """ - - _attribute_map = { - 'os_profile': {'key': 'osProfile', 'type': 'VirtualMachineScaleSetUpdateOSProfile'}, - 'storage_profile': {'key': 'storageProfile', 'type': 'VirtualMachineScaleSetUpdateStorageProfile'}, - 'network_profile': {'key': 'networkProfile', 'type': 'VirtualMachineScaleSetUpdateNetworkProfile'}, - 'diagnostics_profile': {'key': 'diagnosticsProfile', 'type': 'DiagnosticsProfile'}, - 'extension_profile': {'key': 'extensionProfile', 'type': 'VirtualMachineScaleSetExtensionProfile'}, - 'license_type': {'key': 'licenseType', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(VirtualMachineScaleSetUpdateVMProfile, self).__init__(**kwargs) - self.os_profile = kwargs.get('os_profile', None) - self.storage_profile = kwargs.get('storage_profile', None) - self.network_profile = kwargs.get('network_profile', None) - self.diagnostics_profile = kwargs.get('diagnostics_profile', None) - self.extension_profile = kwargs.get('extension_profile', None) - self.license_type = kwargs.get('license_type', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_scale_set_update_vm_profile_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_scale_set_update_vm_profile_py3.py deleted file mode 100644 index 7af111bbdb5e..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_scale_set_update_vm_profile_py3.py +++ /dev/null @@ -1,55 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineScaleSetUpdateVMProfile(Model): - """Describes a virtual machine scale set virtual machine profile. - - :param os_profile: The virtual machine scale set OS profile. - :type os_profile: - ~azure.mgmt.compute.v2017_03_30.models.VirtualMachineScaleSetUpdateOSProfile - :param storage_profile: The virtual machine scale set storage profile. - :type storage_profile: - ~azure.mgmt.compute.v2017_03_30.models.VirtualMachineScaleSetUpdateStorageProfile - :param network_profile: The virtual machine scale set network profile. - :type network_profile: - ~azure.mgmt.compute.v2017_03_30.models.VirtualMachineScaleSetUpdateNetworkProfile - :param diagnostics_profile: The virtual machine scale set diagnostics - profile. - :type diagnostics_profile: - ~azure.mgmt.compute.v2017_03_30.models.DiagnosticsProfile - :param extension_profile: The virtual machine scale set extension profile. - :type extension_profile: - ~azure.mgmt.compute.v2017_03_30.models.VirtualMachineScaleSetExtensionProfile - :param license_type: The license type, which is for bring your own license - scenario. - :type license_type: str - """ - - _attribute_map = { - 'os_profile': {'key': 'osProfile', 'type': 'VirtualMachineScaleSetUpdateOSProfile'}, - 'storage_profile': {'key': 'storageProfile', 'type': 'VirtualMachineScaleSetUpdateStorageProfile'}, - 'network_profile': {'key': 'networkProfile', 'type': 'VirtualMachineScaleSetUpdateNetworkProfile'}, - 'diagnostics_profile': {'key': 'diagnosticsProfile', 'type': 'DiagnosticsProfile'}, - 'extension_profile': {'key': 'extensionProfile', 'type': 'VirtualMachineScaleSetExtensionProfile'}, - 'license_type': {'key': 'licenseType', 'type': 'str'}, - } - - def __init__(self, *, os_profile=None, storage_profile=None, network_profile=None, diagnostics_profile=None, extension_profile=None, license_type: str=None, **kwargs) -> None: - super(VirtualMachineScaleSetUpdateVMProfile, self).__init__(**kwargs) - self.os_profile = os_profile - self.storage_profile = storage_profile - self.network_profile = network_profile - self.diagnostics_profile = diagnostics_profile - self.extension_profile = extension_profile - self.license_type = license_type diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_scale_set_vm.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_scale_set_vm.py deleted file mode 100644 index cc4cee4dd6f5..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_scale_set_vm.py +++ /dev/null @@ -1,155 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource import Resource - - -class VirtualMachineScaleSetVM(Resource): - """Describes a virtual machine scale set virtual machine. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource Id - :vartype id: str - :ivar name: Resource name - :vartype name: str - :ivar type: Resource type - :vartype type: str - :param location: Required. Resource location - :type location: str - :param tags: Resource tags - :type tags: dict[str, str] - :ivar instance_id: The virtual machine instance ID. - :vartype instance_id: str - :ivar sku: The virtual machine SKU. - :vartype sku: ~azure.mgmt.compute.v2017_03_30.models.Sku - :ivar latest_model_applied: Specifies whether the latest model has been - applied to the virtual machine. - :vartype latest_model_applied: bool - :ivar vm_id: Azure VM unique ID. - :vartype vm_id: str - :ivar instance_view: The virtual machine instance view. - :vartype instance_view: - ~azure.mgmt.compute.v2017_03_30.models.VirtualMachineScaleSetVMInstanceView - :param hardware_profile: Specifies the hardware settings for the virtual - machine. - :type hardware_profile: - ~azure.mgmt.compute.v2017_03_30.models.HardwareProfile - :param storage_profile: Specifies the storage settings for the virtual - machine disks. - :type storage_profile: - ~azure.mgmt.compute.v2017_03_30.models.StorageProfile - :param os_profile: Specifies the operating system settings for the virtual - machine. - :type os_profile: ~azure.mgmt.compute.v2017_03_30.models.OSProfile - :param network_profile: Specifies the network interfaces of the virtual - machine. - :type network_profile: - ~azure.mgmt.compute.v2017_03_30.models.NetworkProfile - :param diagnostics_profile: Specifies the boot diagnostic settings state. -

    Minimum api-version: 2015-06-15. - :type diagnostics_profile: - ~azure.mgmt.compute.v2017_03_30.models.DiagnosticsProfile - :param availability_set: Specifies information about the availability set - that the virtual machine should be assigned to. Virtual machines specified - in the same availability set are allocated to different nodes to maximize - availability. For more information about availability sets, see [Manage - the availability of virtual - machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-manage-availability?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). -

    For more information on Azure planned maintenance, see [Planned - maintenance for virtual machines in - Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-planned-maintenance?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json) -

    Currently, a VM can only be added to availability set at creation - time. An existing VM cannot be added to an availability set. - :type availability_set: ~azure.mgmt.compute.v2017_03_30.models.SubResource - :ivar provisioning_state: The provisioning state, which only appears in - the response. - :vartype provisioning_state: str - :param license_type: Specifies that the image or disk that is being used - was licensed on-premises. This element is only used for images that - contain the Windows Server operating system.

    Possible values are: -

    Windows_Client

    Windows_Server

    If this element - is included in a request for an update, the value must match the initial - value. This value cannot be updated.

    For more information, see - [Azure Hybrid Use Benefit for Windows - Server](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-hybrid-use-benefit-licensing?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json) -

    Minimum api-version: 2015-06-15 - :type license_type: str - :param plan: Specifies information about the marketplace image used to - create the virtual machine. This element is only used for marketplace - images. Before you can use a marketplace image from an API, you must - enable the image for programmatic use. In the Azure portal, find the - marketplace image that you want to use and then click **Want to deploy - programmatically, Get Started ->**. Enter any required information and - then click **Save**. - :type plan: ~azure.mgmt.compute.v2017_03_30.models.Plan - :ivar resources: The virtual machine child extension resources. - :vartype resources: - list[~azure.mgmt.compute.v2017_03_30.models.VirtualMachineExtension] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - 'instance_id': {'readonly': True}, - 'sku': {'readonly': True}, - 'latest_model_applied': {'readonly': True}, - 'vm_id': {'readonly': True}, - 'instance_view': {'readonly': True}, - 'provisioning_state': {'readonly': True}, - 'resources': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'instance_id': {'key': 'instanceId', 'type': 'str'}, - 'sku': {'key': 'sku', 'type': 'Sku'}, - 'latest_model_applied': {'key': 'properties.latestModelApplied', 'type': 'bool'}, - 'vm_id': {'key': 'properties.vmId', 'type': 'str'}, - 'instance_view': {'key': 'properties.instanceView', 'type': 'VirtualMachineScaleSetVMInstanceView'}, - 'hardware_profile': {'key': 'properties.hardwareProfile', 'type': 'HardwareProfile'}, - 'storage_profile': {'key': 'properties.storageProfile', 'type': 'StorageProfile'}, - 'os_profile': {'key': 'properties.osProfile', 'type': 'OSProfile'}, - 'network_profile': {'key': 'properties.networkProfile', 'type': 'NetworkProfile'}, - 'diagnostics_profile': {'key': 'properties.diagnosticsProfile', 'type': 'DiagnosticsProfile'}, - 'availability_set': {'key': 'properties.availabilitySet', 'type': 'SubResource'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'license_type': {'key': 'properties.licenseType', 'type': 'str'}, - 'plan': {'key': 'plan', 'type': 'Plan'}, - 'resources': {'key': 'resources', 'type': '[VirtualMachineExtension]'}, - } - - def __init__(self, **kwargs): - super(VirtualMachineScaleSetVM, self).__init__(**kwargs) - self.instance_id = None - self.sku = None - self.latest_model_applied = None - self.vm_id = None - self.instance_view = None - self.hardware_profile = kwargs.get('hardware_profile', None) - self.storage_profile = kwargs.get('storage_profile', None) - self.os_profile = kwargs.get('os_profile', None) - self.network_profile = kwargs.get('network_profile', None) - self.diagnostics_profile = kwargs.get('diagnostics_profile', None) - self.availability_set = kwargs.get('availability_set', None) - self.provisioning_state = None - self.license_type = kwargs.get('license_type', None) - self.plan = kwargs.get('plan', None) - self.resources = None diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_scale_set_vm_extensions_summary.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_scale_set_vm_extensions_summary.py deleted file mode 100644 index e0010d843bff..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_scale_set_vm_extensions_summary.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineScaleSetVMExtensionsSummary(Model): - """Extensions summary for virtual machines of a virtual machine scale set. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar name: The extension name. - :vartype name: str - :ivar statuses_summary: The extensions information. - :vartype statuses_summary: - list[~azure.mgmt.compute.v2017_03_30.models.VirtualMachineStatusCodeCount] - """ - - _validation = { - 'name': {'readonly': True}, - 'statuses_summary': {'readonly': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'statuses_summary': {'key': 'statusesSummary', 'type': '[VirtualMachineStatusCodeCount]'}, - } - - def __init__(self, **kwargs): - super(VirtualMachineScaleSetVMExtensionsSummary, self).__init__(**kwargs) - self.name = None - self.statuses_summary = None diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_scale_set_vm_extensions_summary_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_scale_set_vm_extensions_summary_py3.py deleted file mode 100644 index df6fe0e1d5f6..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_scale_set_vm_extensions_summary_py3.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineScaleSetVMExtensionsSummary(Model): - """Extensions summary for virtual machines of a virtual machine scale set. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar name: The extension name. - :vartype name: str - :ivar statuses_summary: The extensions information. - :vartype statuses_summary: - list[~azure.mgmt.compute.v2017_03_30.models.VirtualMachineStatusCodeCount] - """ - - _validation = { - 'name': {'readonly': True}, - 'statuses_summary': {'readonly': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'statuses_summary': {'key': 'statusesSummary', 'type': '[VirtualMachineStatusCodeCount]'}, - } - - def __init__(self, **kwargs) -> None: - super(VirtualMachineScaleSetVMExtensionsSummary, self).__init__(**kwargs) - self.name = None - self.statuses_summary = None diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_scale_set_vm_instance_ids.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_scale_set_vm_instance_ids.py deleted file mode 100644 index 772c66dad326..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_scale_set_vm_instance_ids.py +++ /dev/null @@ -1,30 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineScaleSetVMInstanceIDs(Model): - """Specifies a list of virtual machine instance IDs from the VM scale set. - - :param instance_ids: The virtual machine scale set instance ids. Omitting - the virtual machine scale set instance ids will result in the operation - being performed on all virtual machines in the virtual machine scale set. - :type instance_ids: list[str] - """ - - _attribute_map = { - 'instance_ids': {'key': 'instanceIds', 'type': '[str]'}, - } - - def __init__(self, **kwargs): - super(VirtualMachineScaleSetVMInstanceIDs, self).__init__(**kwargs) - self.instance_ids = kwargs.get('instance_ids', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_scale_set_vm_instance_ids_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_scale_set_vm_instance_ids_py3.py deleted file mode 100644 index 658a8ccb87d5..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_scale_set_vm_instance_ids_py3.py +++ /dev/null @@ -1,30 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineScaleSetVMInstanceIDs(Model): - """Specifies a list of virtual machine instance IDs from the VM scale set. - - :param instance_ids: The virtual machine scale set instance ids. Omitting - the virtual machine scale set instance ids will result in the operation - being performed on all virtual machines in the virtual machine scale set. - :type instance_ids: list[str] - """ - - _attribute_map = { - 'instance_ids': {'key': 'instanceIds', 'type': '[str]'}, - } - - def __init__(self, *, instance_ids=None, **kwargs) -> None: - super(VirtualMachineScaleSetVMInstanceIDs, self).__init__(**kwargs) - self.instance_ids = instance_ids diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_scale_set_vm_instance_required_ids.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_scale_set_vm_instance_required_ids.py deleted file mode 100644 index ece250dd4fd4..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_scale_set_vm_instance_required_ids.py +++ /dev/null @@ -1,34 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineScaleSetVMInstanceRequiredIDs(Model): - """Specifies a list of virtual machine instance IDs from the VM scale set. - - All required parameters must be populated in order to send to Azure. - - :param instance_ids: Required. The virtual machine scale set instance ids. - :type instance_ids: list[str] - """ - - _validation = { - 'instance_ids': {'required': True}, - } - - _attribute_map = { - 'instance_ids': {'key': 'instanceIds', 'type': '[str]'}, - } - - def __init__(self, **kwargs): - super(VirtualMachineScaleSetVMInstanceRequiredIDs, self).__init__(**kwargs) - self.instance_ids = kwargs.get('instance_ids', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_scale_set_vm_instance_required_ids_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_scale_set_vm_instance_required_ids_py3.py deleted file mode 100644 index f32c6181467d..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_scale_set_vm_instance_required_ids_py3.py +++ /dev/null @@ -1,34 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineScaleSetVMInstanceRequiredIDs(Model): - """Specifies a list of virtual machine instance IDs from the VM scale set. - - All required parameters must be populated in order to send to Azure. - - :param instance_ids: Required. The virtual machine scale set instance ids. - :type instance_ids: list[str] - """ - - _validation = { - 'instance_ids': {'required': True}, - } - - _attribute_map = { - 'instance_ids': {'key': 'instanceIds', 'type': '[str]'}, - } - - def __init__(self, *, instance_ids, **kwargs) -> None: - super(VirtualMachineScaleSetVMInstanceRequiredIDs, self).__init__(**kwargs) - self.instance_ids = instance_ids diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_scale_set_vm_instance_view.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_scale_set_vm_instance_view.py deleted file mode 100644 index 39df77241056..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_scale_set_vm_instance_view.py +++ /dev/null @@ -1,80 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineScaleSetVMInstanceView(Model): - """The instance view of a virtual machine scale set VM. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :param platform_update_domain: The Update Domain count. - :type platform_update_domain: int - :param platform_fault_domain: The Fault Domain count. - :type platform_fault_domain: int - :param rdp_thumb_print: The Remote desktop certificate thumbprint. - :type rdp_thumb_print: str - :param vm_agent: The VM Agent running on the virtual machine. - :type vm_agent: - ~azure.mgmt.compute.v2017_03_30.models.VirtualMachineAgentInstanceView - :param disks: The disks information. - :type disks: list[~azure.mgmt.compute.v2017_03_30.models.DiskInstanceView] - :param extensions: The extensions information. - :type extensions: - list[~azure.mgmt.compute.v2017_03_30.models.VirtualMachineExtensionInstanceView] - :ivar vm_health: The health status for the VM. - :vartype vm_health: - ~azure.mgmt.compute.v2017_03_30.models.VirtualMachineHealthStatus - :param boot_diagnostics: Boot Diagnostics is a debugging feature which - allows you to view Console Output and Screenshot to diagnose VM status. -

    You can easily view the output of your console log.

    - Azure also enables you to see a screenshot of the VM from the hypervisor. - :type boot_diagnostics: - ~azure.mgmt.compute.v2017_03_30.models.BootDiagnosticsInstanceView - :param statuses: The resource status information. - :type statuses: - list[~azure.mgmt.compute.v2017_03_30.models.InstanceViewStatus] - :param placement_group_id: The placement group in which the VM is running. - If the VM is deallocated it will not have a placementGroupId. - :type placement_group_id: str - """ - - _validation = { - 'vm_health': {'readonly': True}, - } - - _attribute_map = { - 'platform_update_domain': {'key': 'platformUpdateDomain', 'type': 'int'}, - 'platform_fault_domain': {'key': 'platformFaultDomain', 'type': 'int'}, - 'rdp_thumb_print': {'key': 'rdpThumbPrint', 'type': 'str'}, - 'vm_agent': {'key': 'vmAgent', 'type': 'VirtualMachineAgentInstanceView'}, - 'disks': {'key': 'disks', 'type': '[DiskInstanceView]'}, - 'extensions': {'key': 'extensions', 'type': '[VirtualMachineExtensionInstanceView]'}, - 'vm_health': {'key': 'vmHealth', 'type': 'VirtualMachineHealthStatus'}, - 'boot_diagnostics': {'key': 'bootDiagnostics', 'type': 'BootDiagnosticsInstanceView'}, - 'statuses': {'key': 'statuses', 'type': '[InstanceViewStatus]'}, - 'placement_group_id': {'key': 'placementGroupId', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(VirtualMachineScaleSetVMInstanceView, self).__init__(**kwargs) - self.platform_update_domain = kwargs.get('platform_update_domain', None) - self.platform_fault_domain = kwargs.get('platform_fault_domain', None) - self.rdp_thumb_print = kwargs.get('rdp_thumb_print', None) - self.vm_agent = kwargs.get('vm_agent', None) - self.disks = kwargs.get('disks', None) - self.extensions = kwargs.get('extensions', None) - self.vm_health = None - self.boot_diagnostics = kwargs.get('boot_diagnostics', None) - self.statuses = kwargs.get('statuses', None) - self.placement_group_id = kwargs.get('placement_group_id', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_scale_set_vm_instance_view_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_scale_set_vm_instance_view_py3.py deleted file mode 100644 index 047be43143a2..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_scale_set_vm_instance_view_py3.py +++ /dev/null @@ -1,80 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineScaleSetVMInstanceView(Model): - """The instance view of a virtual machine scale set VM. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :param platform_update_domain: The Update Domain count. - :type platform_update_domain: int - :param platform_fault_domain: The Fault Domain count. - :type platform_fault_domain: int - :param rdp_thumb_print: The Remote desktop certificate thumbprint. - :type rdp_thumb_print: str - :param vm_agent: The VM Agent running on the virtual machine. - :type vm_agent: - ~azure.mgmt.compute.v2017_03_30.models.VirtualMachineAgentInstanceView - :param disks: The disks information. - :type disks: list[~azure.mgmt.compute.v2017_03_30.models.DiskInstanceView] - :param extensions: The extensions information. - :type extensions: - list[~azure.mgmt.compute.v2017_03_30.models.VirtualMachineExtensionInstanceView] - :ivar vm_health: The health status for the VM. - :vartype vm_health: - ~azure.mgmt.compute.v2017_03_30.models.VirtualMachineHealthStatus - :param boot_diagnostics: Boot Diagnostics is a debugging feature which - allows you to view Console Output and Screenshot to diagnose VM status. -

    You can easily view the output of your console log.

    - Azure also enables you to see a screenshot of the VM from the hypervisor. - :type boot_diagnostics: - ~azure.mgmt.compute.v2017_03_30.models.BootDiagnosticsInstanceView - :param statuses: The resource status information. - :type statuses: - list[~azure.mgmt.compute.v2017_03_30.models.InstanceViewStatus] - :param placement_group_id: The placement group in which the VM is running. - If the VM is deallocated it will not have a placementGroupId. - :type placement_group_id: str - """ - - _validation = { - 'vm_health': {'readonly': True}, - } - - _attribute_map = { - 'platform_update_domain': {'key': 'platformUpdateDomain', 'type': 'int'}, - 'platform_fault_domain': {'key': 'platformFaultDomain', 'type': 'int'}, - 'rdp_thumb_print': {'key': 'rdpThumbPrint', 'type': 'str'}, - 'vm_agent': {'key': 'vmAgent', 'type': 'VirtualMachineAgentInstanceView'}, - 'disks': {'key': 'disks', 'type': '[DiskInstanceView]'}, - 'extensions': {'key': 'extensions', 'type': '[VirtualMachineExtensionInstanceView]'}, - 'vm_health': {'key': 'vmHealth', 'type': 'VirtualMachineHealthStatus'}, - 'boot_diagnostics': {'key': 'bootDiagnostics', 'type': 'BootDiagnosticsInstanceView'}, - 'statuses': {'key': 'statuses', 'type': '[InstanceViewStatus]'}, - 'placement_group_id': {'key': 'placementGroupId', 'type': 'str'}, - } - - def __init__(self, *, platform_update_domain: int=None, platform_fault_domain: int=None, rdp_thumb_print: str=None, vm_agent=None, disks=None, extensions=None, boot_diagnostics=None, statuses=None, placement_group_id: str=None, **kwargs) -> None: - super(VirtualMachineScaleSetVMInstanceView, self).__init__(**kwargs) - self.platform_update_domain = platform_update_domain - self.platform_fault_domain = platform_fault_domain - self.rdp_thumb_print = rdp_thumb_print - self.vm_agent = vm_agent - self.disks = disks - self.extensions = extensions - self.vm_health = None - self.boot_diagnostics = boot_diagnostics - self.statuses = statuses - self.placement_group_id = placement_group_id diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_scale_set_vm_paged.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_scale_set_vm_paged.py deleted file mode 100644 index b3b042cf4e08..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_scale_set_vm_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class VirtualMachineScaleSetVMPaged(Paged): - """ - A paging container for iterating over a list of :class:`VirtualMachineScaleSetVM ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[VirtualMachineScaleSetVM]'} - } - - def __init__(self, *args, **kwargs): - - super(VirtualMachineScaleSetVMPaged, self).__init__(*args, **kwargs) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_scale_set_vm_profile.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_scale_set_vm_profile.py deleted file mode 100644 index f874d2898304..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_scale_set_vm_profile.py +++ /dev/null @@ -1,66 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineScaleSetVMProfile(Model): - """Describes a virtual machine scale set virtual machine profile. - - :param os_profile: Specifies the operating system settings for the virtual - machines in the scale set. - :type os_profile: - ~azure.mgmt.compute.v2017_03_30.models.VirtualMachineScaleSetOSProfile - :param storage_profile: Specifies the storage settings for the virtual - machine disks. - :type storage_profile: - ~azure.mgmt.compute.v2017_03_30.models.VirtualMachineScaleSetStorageProfile - :param network_profile: Specifies properties of the network interfaces of - the virtual machines in the scale set. - :type network_profile: - ~azure.mgmt.compute.v2017_03_30.models.VirtualMachineScaleSetNetworkProfile - :param diagnostics_profile: Specifies the boot diagnostic settings state. -

    Minimum api-version: 2015-06-15. - :type diagnostics_profile: - ~azure.mgmt.compute.v2017_03_30.models.DiagnosticsProfile - :param extension_profile: Specifies a collection of settings for - extensions installed on virtual machines in the scale set. - :type extension_profile: - ~azure.mgmt.compute.v2017_03_30.models.VirtualMachineScaleSetExtensionProfile - :param license_type: Specifies that the image or disk that is being used - was licensed on-premises. This element is only used for images that - contain the Windows Server operating system.

    Possible values are: -

    Windows_Client

    Windows_Server

    If this element - is included in a request for an update, the value must match the initial - value. This value cannot be updated.

    For more information, see - [Azure Hybrid Use Benefit for Windows - Server](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-hybrid-use-benefit-licensing?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json) -

    Minimum api-version: 2015-06-15 - :type license_type: str - """ - - _attribute_map = { - 'os_profile': {'key': 'osProfile', 'type': 'VirtualMachineScaleSetOSProfile'}, - 'storage_profile': {'key': 'storageProfile', 'type': 'VirtualMachineScaleSetStorageProfile'}, - 'network_profile': {'key': 'networkProfile', 'type': 'VirtualMachineScaleSetNetworkProfile'}, - 'diagnostics_profile': {'key': 'diagnosticsProfile', 'type': 'DiagnosticsProfile'}, - 'extension_profile': {'key': 'extensionProfile', 'type': 'VirtualMachineScaleSetExtensionProfile'}, - 'license_type': {'key': 'licenseType', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(VirtualMachineScaleSetVMProfile, self).__init__(**kwargs) - self.os_profile = kwargs.get('os_profile', None) - self.storage_profile = kwargs.get('storage_profile', None) - self.network_profile = kwargs.get('network_profile', None) - self.diagnostics_profile = kwargs.get('diagnostics_profile', None) - self.extension_profile = kwargs.get('extension_profile', None) - self.license_type = kwargs.get('license_type', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_scale_set_vm_profile_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_scale_set_vm_profile_py3.py deleted file mode 100644 index 8c58976e2670..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_scale_set_vm_profile_py3.py +++ /dev/null @@ -1,66 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineScaleSetVMProfile(Model): - """Describes a virtual machine scale set virtual machine profile. - - :param os_profile: Specifies the operating system settings for the virtual - machines in the scale set. - :type os_profile: - ~azure.mgmt.compute.v2017_03_30.models.VirtualMachineScaleSetOSProfile - :param storage_profile: Specifies the storage settings for the virtual - machine disks. - :type storage_profile: - ~azure.mgmt.compute.v2017_03_30.models.VirtualMachineScaleSetStorageProfile - :param network_profile: Specifies properties of the network interfaces of - the virtual machines in the scale set. - :type network_profile: - ~azure.mgmt.compute.v2017_03_30.models.VirtualMachineScaleSetNetworkProfile - :param diagnostics_profile: Specifies the boot diagnostic settings state. -

    Minimum api-version: 2015-06-15. - :type diagnostics_profile: - ~azure.mgmt.compute.v2017_03_30.models.DiagnosticsProfile - :param extension_profile: Specifies a collection of settings for - extensions installed on virtual machines in the scale set. - :type extension_profile: - ~azure.mgmt.compute.v2017_03_30.models.VirtualMachineScaleSetExtensionProfile - :param license_type: Specifies that the image or disk that is being used - was licensed on-premises. This element is only used for images that - contain the Windows Server operating system.

    Possible values are: -

    Windows_Client

    Windows_Server

    If this element - is included in a request for an update, the value must match the initial - value. This value cannot be updated.

    For more information, see - [Azure Hybrid Use Benefit for Windows - Server](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-hybrid-use-benefit-licensing?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json) -

    Minimum api-version: 2015-06-15 - :type license_type: str - """ - - _attribute_map = { - 'os_profile': {'key': 'osProfile', 'type': 'VirtualMachineScaleSetOSProfile'}, - 'storage_profile': {'key': 'storageProfile', 'type': 'VirtualMachineScaleSetStorageProfile'}, - 'network_profile': {'key': 'networkProfile', 'type': 'VirtualMachineScaleSetNetworkProfile'}, - 'diagnostics_profile': {'key': 'diagnosticsProfile', 'type': 'DiagnosticsProfile'}, - 'extension_profile': {'key': 'extensionProfile', 'type': 'VirtualMachineScaleSetExtensionProfile'}, - 'license_type': {'key': 'licenseType', 'type': 'str'}, - } - - def __init__(self, *, os_profile=None, storage_profile=None, network_profile=None, diagnostics_profile=None, extension_profile=None, license_type: str=None, **kwargs) -> None: - super(VirtualMachineScaleSetVMProfile, self).__init__(**kwargs) - self.os_profile = os_profile - self.storage_profile = storage_profile - self.network_profile = network_profile - self.diagnostics_profile = diagnostics_profile - self.extension_profile = extension_profile - self.license_type = license_type diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_scale_set_vm_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_scale_set_vm_py3.py deleted file mode 100644 index 4eb48ce3b82c..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_scale_set_vm_py3.py +++ /dev/null @@ -1,155 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource_py3 import Resource - - -class VirtualMachineScaleSetVM(Resource): - """Describes a virtual machine scale set virtual machine. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource Id - :vartype id: str - :ivar name: Resource name - :vartype name: str - :ivar type: Resource type - :vartype type: str - :param location: Required. Resource location - :type location: str - :param tags: Resource tags - :type tags: dict[str, str] - :ivar instance_id: The virtual machine instance ID. - :vartype instance_id: str - :ivar sku: The virtual machine SKU. - :vartype sku: ~azure.mgmt.compute.v2017_03_30.models.Sku - :ivar latest_model_applied: Specifies whether the latest model has been - applied to the virtual machine. - :vartype latest_model_applied: bool - :ivar vm_id: Azure VM unique ID. - :vartype vm_id: str - :ivar instance_view: The virtual machine instance view. - :vartype instance_view: - ~azure.mgmt.compute.v2017_03_30.models.VirtualMachineScaleSetVMInstanceView - :param hardware_profile: Specifies the hardware settings for the virtual - machine. - :type hardware_profile: - ~azure.mgmt.compute.v2017_03_30.models.HardwareProfile - :param storage_profile: Specifies the storage settings for the virtual - machine disks. - :type storage_profile: - ~azure.mgmt.compute.v2017_03_30.models.StorageProfile - :param os_profile: Specifies the operating system settings for the virtual - machine. - :type os_profile: ~azure.mgmt.compute.v2017_03_30.models.OSProfile - :param network_profile: Specifies the network interfaces of the virtual - machine. - :type network_profile: - ~azure.mgmt.compute.v2017_03_30.models.NetworkProfile - :param diagnostics_profile: Specifies the boot diagnostic settings state. -

    Minimum api-version: 2015-06-15. - :type diagnostics_profile: - ~azure.mgmt.compute.v2017_03_30.models.DiagnosticsProfile - :param availability_set: Specifies information about the availability set - that the virtual machine should be assigned to. Virtual machines specified - in the same availability set are allocated to different nodes to maximize - availability. For more information about availability sets, see [Manage - the availability of virtual - machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-manage-availability?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). -

    For more information on Azure planned maintenance, see [Planned - maintenance for virtual machines in - Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-planned-maintenance?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json) -

    Currently, a VM can only be added to availability set at creation - time. An existing VM cannot be added to an availability set. - :type availability_set: ~azure.mgmt.compute.v2017_03_30.models.SubResource - :ivar provisioning_state: The provisioning state, which only appears in - the response. - :vartype provisioning_state: str - :param license_type: Specifies that the image or disk that is being used - was licensed on-premises. This element is only used for images that - contain the Windows Server operating system.

    Possible values are: -

    Windows_Client

    Windows_Server

    If this element - is included in a request for an update, the value must match the initial - value. This value cannot be updated.

    For more information, see - [Azure Hybrid Use Benefit for Windows - Server](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-hybrid-use-benefit-licensing?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json) -

    Minimum api-version: 2015-06-15 - :type license_type: str - :param plan: Specifies information about the marketplace image used to - create the virtual machine. This element is only used for marketplace - images. Before you can use a marketplace image from an API, you must - enable the image for programmatic use. In the Azure portal, find the - marketplace image that you want to use and then click **Want to deploy - programmatically, Get Started ->**. Enter any required information and - then click **Save**. - :type plan: ~azure.mgmt.compute.v2017_03_30.models.Plan - :ivar resources: The virtual machine child extension resources. - :vartype resources: - list[~azure.mgmt.compute.v2017_03_30.models.VirtualMachineExtension] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - 'instance_id': {'readonly': True}, - 'sku': {'readonly': True}, - 'latest_model_applied': {'readonly': True}, - 'vm_id': {'readonly': True}, - 'instance_view': {'readonly': True}, - 'provisioning_state': {'readonly': True}, - 'resources': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'instance_id': {'key': 'instanceId', 'type': 'str'}, - 'sku': {'key': 'sku', 'type': 'Sku'}, - 'latest_model_applied': {'key': 'properties.latestModelApplied', 'type': 'bool'}, - 'vm_id': {'key': 'properties.vmId', 'type': 'str'}, - 'instance_view': {'key': 'properties.instanceView', 'type': 'VirtualMachineScaleSetVMInstanceView'}, - 'hardware_profile': {'key': 'properties.hardwareProfile', 'type': 'HardwareProfile'}, - 'storage_profile': {'key': 'properties.storageProfile', 'type': 'StorageProfile'}, - 'os_profile': {'key': 'properties.osProfile', 'type': 'OSProfile'}, - 'network_profile': {'key': 'properties.networkProfile', 'type': 'NetworkProfile'}, - 'diagnostics_profile': {'key': 'properties.diagnosticsProfile', 'type': 'DiagnosticsProfile'}, - 'availability_set': {'key': 'properties.availabilitySet', 'type': 'SubResource'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'license_type': {'key': 'properties.licenseType', 'type': 'str'}, - 'plan': {'key': 'plan', 'type': 'Plan'}, - 'resources': {'key': 'resources', 'type': '[VirtualMachineExtension]'}, - } - - def __init__(self, *, location: str, tags=None, hardware_profile=None, storage_profile=None, os_profile=None, network_profile=None, diagnostics_profile=None, availability_set=None, license_type: str=None, plan=None, **kwargs) -> None: - super(VirtualMachineScaleSetVM, self).__init__(location=location, tags=tags, **kwargs) - self.instance_id = None - self.sku = None - self.latest_model_applied = None - self.vm_id = None - self.instance_view = None - self.hardware_profile = hardware_profile - self.storage_profile = storage_profile - self.os_profile = os_profile - self.network_profile = network_profile - self.diagnostics_profile = diagnostics_profile - self.availability_set = availability_set - self.provisioning_state = None - self.license_type = license_type - self.plan = plan - self.resources = None diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_size.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_size.py deleted file mode 100644 index 0fef3efd6c8e..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_size.py +++ /dev/null @@ -1,53 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineSize(Model): - """Describes the properties of a VM size. - - :param name: The name of the virtual machine size. - :type name: str - :param number_of_cores: The number of cores supported by the virtual - machine size. - :type number_of_cores: int - :param os_disk_size_in_mb: The OS disk size, in MB, allowed by the virtual - machine size. - :type os_disk_size_in_mb: int - :param resource_disk_size_in_mb: The resource disk size, in MB, allowed by - the virtual machine size. - :type resource_disk_size_in_mb: int - :param memory_in_mb: The amount of memory, in MB, supported by the virtual - machine size. - :type memory_in_mb: int - :param max_data_disk_count: The maximum number of data disks that can be - attached to the virtual machine size. - :type max_data_disk_count: int - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'number_of_cores': {'key': 'numberOfCores', 'type': 'int'}, - 'os_disk_size_in_mb': {'key': 'osDiskSizeInMB', 'type': 'int'}, - 'resource_disk_size_in_mb': {'key': 'resourceDiskSizeInMB', 'type': 'int'}, - 'memory_in_mb': {'key': 'memoryInMB', 'type': 'int'}, - 'max_data_disk_count': {'key': 'maxDataDiskCount', 'type': 'int'}, - } - - def __init__(self, **kwargs): - super(VirtualMachineSize, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.number_of_cores = kwargs.get('number_of_cores', None) - self.os_disk_size_in_mb = kwargs.get('os_disk_size_in_mb', None) - self.resource_disk_size_in_mb = kwargs.get('resource_disk_size_in_mb', None) - self.memory_in_mb = kwargs.get('memory_in_mb', None) - self.max_data_disk_count = kwargs.get('max_data_disk_count', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_size_paged.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_size_paged.py deleted file mode 100644 index 02e1c0157397..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_size_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class VirtualMachineSizePaged(Paged): - """ - A paging container for iterating over a list of :class:`VirtualMachineSize ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[VirtualMachineSize]'} - } - - def __init__(self, *args, **kwargs): - - super(VirtualMachineSizePaged, self).__init__(*args, **kwargs) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_size_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_size_py3.py deleted file mode 100644 index 9f99ba20ce42..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_size_py3.py +++ /dev/null @@ -1,53 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineSize(Model): - """Describes the properties of a VM size. - - :param name: The name of the virtual machine size. - :type name: str - :param number_of_cores: The number of cores supported by the virtual - machine size. - :type number_of_cores: int - :param os_disk_size_in_mb: The OS disk size, in MB, allowed by the virtual - machine size. - :type os_disk_size_in_mb: int - :param resource_disk_size_in_mb: The resource disk size, in MB, allowed by - the virtual machine size. - :type resource_disk_size_in_mb: int - :param memory_in_mb: The amount of memory, in MB, supported by the virtual - machine size. - :type memory_in_mb: int - :param max_data_disk_count: The maximum number of data disks that can be - attached to the virtual machine size. - :type max_data_disk_count: int - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'number_of_cores': {'key': 'numberOfCores', 'type': 'int'}, - 'os_disk_size_in_mb': {'key': 'osDiskSizeInMB', 'type': 'int'}, - 'resource_disk_size_in_mb': {'key': 'resourceDiskSizeInMB', 'type': 'int'}, - 'memory_in_mb': {'key': 'memoryInMB', 'type': 'int'}, - 'max_data_disk_count': {'key': 'maxDataDiskCount', 'type': 'int'}, - } - - def __init__(self, *, name: str=None, number_of_cores: int=None, os_disk_size_in_mb: int=None, resource_disk_size_in_mb: int=None, memory_in_mb: int=None, max_data_disk_count: int=None, **kwargs) -> None: - super(VirtualMachineSize, self).__init__(**kwargs) - self.name = name - self.number_of_cores = number_of_cores - self.os_disk_size_in_mb = os_disk_size_in_mb - self.resource_disk_size_in_mb = resource_disk_size_in_mb - self.memory_in_mb = memory_in_mb - self.max_data_disk_count = max_data_disk_count diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_status_code_count.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_status_code_count.py deleted file mode 100644 index 7df7b702acd7..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_status_code_count.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineStatusCodeCount(Model): - """The status code and count of the virtual machine scale set instance view - status summary. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar code: The instance view status code. - :vartype code: str - :ivar count: The number of instances having a particular status code. - :vartype count: int - """ - - _validation = { - 'code': {'readonly': True}, - 'count': {'readonly': True}, - } - - _attribute_map = { - 'code': {'key': 'code', 'type': 'str'}, - 'count': {'key': 'count', 'type': 'int'}, - } - - def __init__(self, **kwargs): - super(VirtualMachineStatusCodeCount, self).__init__(**kwargs) - self.code = None - self.count = None diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_status_code_count_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_status_code_count_py3.py deleted file mode 100644 index c38800073a95..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_status_code_count_py3.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineStatusCodeCount(Model): - """The status code and count of the virtual machine scale set instance view - status summary. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar code: The instance view status code. - :vartype code: str - :ivar count: The number of instances having a particular status code. - :vartype count: int - """ - - _validation = { - 'code': {'readonly': True}, - 'count': {'readonly': True}, - } - - _attribute_map = { - 'code': {'key': 'code', 'type': 'str'}, - 'count': {'key': 'count', 'type': 'int'}, - } - - def __init__(self, **kwargs) -> None: - super(VirtualMachineStatusCodeCount, self).__init__(**kwargs) - self.code = None - self.count = None diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/win_rm_configuration.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/win_rm_configuration.py deleted file mode 100644 index d50cf4086203..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/win_rm_configuration.py +++ /dev/null @@ -1,29 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class WinRMConfiguration(Model): - """Describes Windows Remote Management configuration of the VM. - - :param listeners: The list of Windows Remote Management listeners - :type listeners: - list[~azure.mgmt.compute.v2017_03_30.models.WinRMListener] - """ - - _attribute_map = { - 'listeners': {'key': 'listeners', 'type': '[WinRMListener]'}, - } - - def __init__(self, **kwargs): - super(WinRMConfiguration, self).__init__(**kwargs) - self.listeners = kwargs.get('listeners', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/win_rm_configuration_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/win_rm_configuration_py3.py deleted file mode 100644 index 01f177397f32..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/win_rm_configuration_py3.py +++ /dev/null @@ -1,29 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class WinRMConfiguration(Model): - """Describes Windows Remote Management configuration of the VM. - - :param listeners: The list of Windows Remote Management listeners - :type listeners: - list[~azure.mgmt.compute.v2017_03_30.models.WinRMListener] - """ - - _attribute_map = { - 'listeners': {'key': 'listeners', 'type': '[WinRMListener]'}, - } - - def __init__(self, *, listeners=None, **kwargs) -> None: - super(WinRMConfiguration, self).__init__(**kwargs) - self.listeners = listeners diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/win_rm_listener.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/win_rm_listener.py deleted file mode 100644 index 6810cc597f00..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/win_rm_listener.py +++ /dev/null @@ -1,42 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class WinRMListener(Model): - """Describes Protocol and thumbprint of Windows Remote Management listener. - - :param protocol: Specifies the protocol of listener.

    Possible - values are:
    **http**

    **https**. Possible values include: - 'Http', 'Https' - :type protocol: str or - ~azure.mgmt.compute.v2017_03_30.models.ProtocolTypes - :param certificate_url: This is the URL of a certificate that has been - uploaded to Key Vault as a secret. For adding a secret to the Key Vault, - see [Add a key or secret to the key - vault](https://docs.microsoft.com/azure/key-vault/key-vault-get-started/#add). - In this case, your certificate needs to be It is the Base64 encoding of - the following JSON Object which is encoded in UTF-8:

    {
    - "data":"",
    "dataType":"pfx",
    - "password":""
    } - :type certificate_url: str - """ - - _attribute_map = { - 'protocol': {'key': 'protocol', 'type': 'ProtocolTypes'}, - 'certificate_url': {'key': 'certificateUrl', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(WinRMListener, self).__init__(**kwargs) - self.protocol = kwargs.get('protocol', None) - self.certificate_url = kwargs.get('certificate_url', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/win_rm_listener_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/win_rm_listener_py3.py deleted file mode 100644 index dcd585dcf57f..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/win_rm_listener_py3.py +++ /dev/null @@ -1,42 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class WinRMListener(Model): - """Describes Protocol and thumbprint of Windows Remote Management listener. - - :param protocol: Specifies the protocol of listener.

    Possible - values are:
    **http**

    **https**. Possible values include: - 'Http', 'Https' - :type protocol: str or - ~azure.mgmt.compute.v2017_03_30.models.ProtocolTypes - :param certificate_url: This is the URL of a certificate that has been - uploaded to Key Vault as a secret. For adding a secret to the Key Vault, - see [Add a key or secret to the key - vault](https://docs.microsoft.com/azure/key-vault/key-vault-get-started/#add). - In this case, your certificate needs to be It is the Base64 encoding of - the following JSON Object which is encoded in UTF-8:

    {
    - "data":"",
    "dataType":"pfx",
    - "password":""
    } - :type certificate_url: str - """ - - _attribute_map = { - 'protocol': {'key': 'protocol', 'type': 'ProtocolTypes'}, - 'certificate_url': {'key': 'certificateUrl', 'type': 'str'}, - } - - def __init__(self, *, protocol=None, certificate_url: str=None, **kwargs) -> None: - super(WinRMListener, self).__init__(**kwargs) - self.protocol = protocol - self.certificate_url = certificate_url diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/windows_configuration.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/windows_configuration.py deleted file mode 100644 index 7c0655f326cb..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/windows_configuration.py +++ /dev/null @@ -1,54 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class WindowsConfiguration(Model): - """Specifies Windows operating system settings on the virtual machine. - - :param provision_vm_agent: Indicates whether virtual machine agent should - be provisioned on the virtual machine.

    When this property is not - specified in the request body, default behavior is to set it to true. - This will ensure that VM Agent is installed on the VM so that extensions - can be added to the VM later. - :type provision_vm_agent: bool - :param enable_automatic_updates: Indicates whether virtual machine is - enabled for automatic updates. - :type enable_automatic_updates: bool - :param time_zone: Specifies the time zone of the virtual machine. e.g. - "Pacific Standard Time" - :type time_zone: str - :param additional_unattend_content: Specifies additional base-64 encoded - XML formatted information that can be included in the Unattend.xml file, - which is used by Windows Setup. - :type additional_unattend_content: - list[~azure.mgmt.compute.v2017_03_30.models.AdditionalUnattendContent] - :param win_rm: Specifies the Windows Remote Management listeners. This - enables remote Windows PowerShell. - :type win_rm: ~azure.mgmt.compute.v2017_03_30.models.WinRMConfiguration - """ - - _attribute_map = { - 'provision_vm_agent': {'key': 'provisionVMAgent', 'type': 'bool'}, - 'enable_automatic_updates': {'key': 'enableAutomaticUpdates', 'type': 'bool'}, - 'time_zone': {'key': 'timeZone', 'type': 'str'}, - 'additional_unattend_content': {'key': 'additionalUnattendContent', 'type': '[AdditionalUnattendContent]'}, - 'win_rm': {'key': 'winRM', 'type': 'WinRMConfiguration'}, - } - - def __init__(self, **kwargs): - super(WindowsConfiguration, self).__init__(**kwargs) - self.provision_vm_agent = kwargs.get('provision_vm_agent', None) - self.enable_automatic_updates = kwargs.get('enable_automatic_updates', None) - self.time_zone = kwargs.get('time_zone', None) - self.additional_unattend_content = kwargs.get('additional_unattend_content', None) - self.win_rm = kwargs.get('win_rm', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/windows_configuration_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/windows_configuration_py3.py deleted file mode 100644 index b2dd2acef034..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/windows_configuration_py3.py +++ /dev/null @@ -1,54 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class WindowsConfiguration(Model): - """Specifies Windows operating system settings on the virtual machine. - - :param provision_vm_agent: Indicates whether virtual machine agent should - be provisioned on the virtual machine.

    When this property is not - specified in the request body, default behavior is to set it to true. - This will ensure that VM Agent is installed on the VM so that extensions - can be added to the VM later. - :type provision_vm_agent: bool - :param enable_automatic_updates: Indicates whether virtual machine is - enabled for automatic updates. - :type enable_automatic_updates: bool - :param time_zone: Specifies the time zone of the virtual machine. e.g. - "Pacific Standard Time" - :type time_zone: str - :param additional_unattend_content: Specifies additional base-64 encoded - XML formatted information that can be included in the Unattend.xml file, - which is used by Windows Setup. - :type additional_unattend_content: - list[~azure.mgmt.compute.v2017_03_30.models.AdditionalUnattendContent] - :param win_rm: Specifies the Windows Remote Management listeners. This - enables remote Windows PowerShell. - :type win_rm: ~azure.mgmt.compute.v2017_03_30.models.WinRMConfiguration - """ - - _attribute_map = { - 'provision_vm_agent': {'key': 'provisionVMAgent', 'type': 'bool'}, - 'enable_automatic_updates': {'key': 'enableAutomaticUpdates', 'type': 'bool'}, - 'time_zone': {'key': 'timeZone', 'type': 'str'}, - 'additional_unattend_content': {'key': 'additionalUnattendContent', 'type': '[AdditionalUnattendContent]'}, - 'win_rm': {'key': 'winRM', 'type': 'WinRMConfiguration'}, - } - - def __init__(self, *, provision_vm_agent: bool=None, enable_automatic_updates: bool=None, time_zone: str=None, additional_unattend_content=None, win_rm=None, **kwargs) -> None: - super(WindowsConfiguration, self).__init__(**kwargs) - self.provision_vm_agent = provision_vm_agent - self.enable_automatic_updates = enable_automatic_updates - self.time_zone = time_zone - self.additional_unattend_content = additional_unattend_content - self.win_rm = win_rm diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/operations/__init__.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/operations/__init__.py index 87785cc27927..25419dac67d7 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/operations/__init__.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/operations/__init__.py @@ -9,22 +9,22 @@ # regenerated. # -------------------------------------------------------------------------- -from .availability_sets_operations import AvailabilitySetsOperations -from .virtual_machine_extension_images_operations import VirtualMachineExtensionImagesOperations -from .virtual_machine_extensions_operations import VirtualMachineExtensionsOperations -from .virtual_machines_operations import VirtualMachinesOperations -from .virtual_machine_images_operations import VirtualMachineImagesOperations -from .usage_operations import UsageOperations -from .virtual_machine_sizes_operations import VirtualMachineSizesOperations -from .images_operations import ImagesOperations -from .resource_skus_operations import ResourceSkusOperations -from .virtual_machine_scale_sets_operations import VirtualMachineScaleSetsOperations -from .virtual_machine_scale_set_extensions_operations import VirtualMachineScaleSetExtensionsOperations -from .virtual_machine_scale_set_rolling_upgrades_operations import VirtualMachineScaleSetRollingUpgradesOperations -from .virtual_machine_scale_set_vms_operations import VirtualMachineScaleSetVMsOperations -from .disks_operations import DisksOperations -from .snapshots_operations import SnapshotsOperations -from .virtual_machine_run_commands_operations import VirtualMachineRunCommandsOperations +from ._availability_sets_operations import AvailabilitySetsOperations +from ._virtual_machine_extension_images_operations import VirtualMachineExtensionImagesOperations +from ._virtual_machine_extensions_operations import VirtualMachineExtensionsOperations +from ._virtual_machines_operations import VirtualMachinesOperations +from ._virtual_machine_images_operations import VirtualMachineImagesOperations +from ._usage_operations import UsageOperations +from ._virtual_machine_sizes_operations import VirtualMachineSizesOperations +from ._images_operations import ImagesOperations +from ._resource_skus_operations import ResourceSkusOperations +from ._virtual_machine_scale_sets_operations import VirtualMachineScaleSetsOperations +from ._virtual_machine_scale_set_extensions_operations import VirtualMachineScaleSetExtensionsOperations +from ._virtual_machine_scale_set_rolling_upgrades_operations import VirtualMachineScaleSetRollingUpgradesOperations +from ._virtual_machine_scale_set_vms_operations import VirtualMachineScaleSetVMsOperations +from ._disks_operations import DisksOperations +from ._snapshots_operations import SnapshotsOperations +from ._virtual_machine_run_commands_operations import VirtualMachineRunCommandsOperations __all__ = [ 'AvailabilitySetsOperations', diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/operations/_availability_sets_operations.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/operations/_availability_sets_operations.py new file mode 100644 index 000000000000..52780dc3f78d --- /dev/null +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/operations/_availability_sets_operations.py @@ -0,0 +1,439 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse +from msrestazure.azure_exceptions import CloudError + +from .. import models + + +class AvailabilitySetsOperations(object): + """AvailabilitySetsOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: Client Api Version. Constant value: "2017-03-30". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2017-03-30" + + self.config = config + + def create_or_update( + self, resource_group_name, availability_set_name, parameters, custom_headers=None, raw=False, **operation_config): + """Create or update an availability set. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param availability_set_name: The name of the availability set. + :type availability_set_name: str + :param parameters: Parameters supplied to the Create Availability Set + operation. + :type parameters: + ~azure.mgmt.compute.v2017_03_30.models.AvailabilitySet + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: AvailabilitySet or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.compute.v2017_03_30.models.AvailabilitySet or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.create_or_update.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'availabilitySetName': self._serialize.url("availability_set_name", availability_set_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(parameters, 'AvailabilitySet') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('AvailabilitySet', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}'} + + def delete( + self, resource_group_name, availability_set_name, custom_headers=None, raw=False, **operation_config): + """Delete an availability set. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param availability_set_name: The name of the availability set. + :type availability_set_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: OperationStatusResponse or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.compute.v2017_03_30.models.OperationStatusResponse + or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.delete.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'availabilitySetName': self._serialize.url("availability_set_name", availability_set_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 204]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('OperationStatusResponse', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}'} + + def get( + self, resource_group_name, availability_set_name, custom_headers=None, raw=False, **operation_config): + """Retrieves information about an availability set. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param availability_set_name: The name of the availability set. + :type availability_set_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: AvailabilitySet or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.compute.v2017_03_30.models.AvailabilitySet or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'availabilitySetName': self._serialize.url("availability_set_name", availability_set_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('AvailabilitySet', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}'} + + def list_by_subscription( + self, custom_headers=None, raw=False, **operation_config): + """Lists all availability sets in a subscription. + + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of AvailabilitySet + :rtype: + ~azure.mgmt.compute.v2017_03_30.models.AvailabilitySetPaged[~azure.mgmt.compute.v2017_03_30.models.AvailabilitySet] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_by_subscription.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.AvailabilitySetPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_by_subscription.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Compute/availabilitySets'} + + def list( + self, resource_group_name, custom_headers=None, raw=False, **operation_config): + """Lists all availability sets in a resource group. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of AvailabilitySet + :rtype: + ~azure.mgmt.compute.v2017_03_30.models.AvailabilitySetPaged[~azure.mgmt.compute.v2017_03_30.models.AvailabilitySet] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.AvailabilitySetPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets'} + + def list_available_sizes( + self, resource_group_name, availability_set_name, custom_headers=None, raw=False, **operation_config): + """Lists all available virtual machine sizes that can be used to create a + new virtual machine in an existing availability set. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param availability_set_name: The name of the availability set. + :type availability_set_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of VirtualMachineSize + :rtype: + ~azure.mgmt.compute.v2017_03_30.models.VirtualMachineSizePaged[~azure.mgmt.compute.v2017_03_30.models.VirtualMachineSize] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_available_sizes.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'availabilitySetName': self._serialize.url("availability_set_name", availability_set_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.VirtualMachineSizePaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_available_sizes.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}/vmSizes'} diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/operations/_disks_operations.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/operations/_disks_operations.py new file mode 100644 index 000000000000..ead020863744 --- /dev/null +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/operations/_disks_operations.py @@ -0,0 +1,755 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse +from msrestazure.azure_exceptions import CloudError +from msrest.polling import LROPoller, NoPolling +from msrestazure.polling.arm_polling import ARMPolling + +from .. import models + + +class DisksOperations(object): + """DisksOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: Client Api Version. Constant value: "2017-03-30". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2017-03-30" + + self.config = config + + + def _create_or_update_initial( + self, resource_group_name, disk_name, disk, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.create_or_update.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'diskName': self._serialize.url("disk_name", disk_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(disk, 'Disk') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('Disk', response) + if response.status_code == 202: + deserialized = self._deserialize('Disk', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def create_or_update( + self, resource_group_name, disk_name, disk, custom_headers=None, raw=False, polling=True, **operation_config): + """Creates or updates a disk. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param disk_name: The name of the managed disk that is being created. + The name can't be changed after the disk is created. Supported + characters for the name are a-z, A-Z, 0-9 and _. The maximum name + length is 80 characters. + :type disk_name: str + :param disk: Disk object supplied in the body of the Put disk + operation. + :type disk: ~azure.mgmt.compute.v2017_03_30.models.Disk + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns Disk or + ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2017_03_30.models.Disk] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2017_03_30.models.Disk]] + :raises: :class:`CloudError` + """ + raw_result = self._create_or_update_initial( + resource_group_name=resource_group_name, + disk_name=disk_name, + disk=disk, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('Disk', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/disks/{diskName}'} + + + def _update_initial( + self, resource_group_name, disk_name, disk, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.update.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'diskName': self._serialize.url("disk_name", disk_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(disk, 'DiskUpdate') + + # Construct and send request + request = self._client.patch(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('Disk', response) + if response.status_code == 202: + deserialized = self._deserialize('Disk', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def update( + self, resource_group_name, disk_name, disk, custom_headers=None, raw=False, polling=True, **operation_config): + """Updates (patches) a disk. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param disk_name: The name of the managed disk that is being created. + The name can't be changed after the disk is created. Supported + characters for the name are a-z, A-Z, 0-9 and _. The maximum name + length is 80 characters. + :type disk_name: str + :param disk: Disk object supplied in the body of the Patch disk + operation. + :type disk: ~azure.mgmt.compute.v2017_03_30.models.DiskUpdate + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns Disk or + ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2017_03_30.models.Disk] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2017_03_30.models.Disk]] + :raises: :class:`CloudError` + """ + raw_result = self._update_initial( + resource_group_name=resource_group_name, + disk_name=disk_name, + disk=disk, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('Disk', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/disks/{diskName}'} + + def get( + self, resource_group_name, disk_name, custom_headers=None, raw=False, **operation_config): + """Gets information about a disk. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param disk_name: The name of the managed disk that is being created. + The name can't be changed after the disk is created. Supported + characters for the name are a-z, A-Z, 0-9 and _. The maximum name + length is 80 characters. + :type disk_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: Disk or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.compute.v2017_03_30.models.Disk or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'diskName': self._serialize.url("disk_name", disk_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('Disk', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/disks/{diskName}'} + + + def _delete_initial( + self, resource_group_name, disk_name, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.delete.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'diskName': self._serialize.url("disk_name", disk_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202, 204]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('OperationStatusResponse', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def delete( + self, resource_group_name, disk_name, custom_headers=None, raw=False, polling=True, **operation_config): + """Deletes a disk. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param disk_name: The name of the managed disk that is being created. + The name can't be changed after the disk is created. Supported + characters for the name are a-z, A-Z, 0-9 and _. The maximum name + length is 80 characters. + :type disk_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns OperationStatusResponse + or ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2017_03_30.models.OperationStatusResponse] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2017_03_30.models.OperationStatusResponse]] + :raises: :class:`CloudError` + """ + raw_result = self._delete_initial( + resource_group_name=resource_group_name, + disk_name=disk_name, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('OperationStatusResponse', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/disks/{diskName}'} + + def list_by_resource_group( + self, resource_group_name, custom_headers=None, raw=False, **operation_config): + """Lists all the disks under a resource group. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of Disk + :rtype: + ~azure.mgmt.compute.v2017_03_30.models.DiskPaged[~azure.mgmt.compute.v2017_03_30.models.Disk] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_by_resource_group.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.DiskPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/disks'} + + def list( + self, custom_headers=None, raw=False, **operation_config): + """Lists all the disks under a subscription. + + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of Disk + :rtype: + ~azure.mgmt.compute.v2017_03_30.models.DiskPaged[~azure.mgmt.compute.v2017_03_30.models.Disk] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.DiskPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Compute/disks'} + + + def _grant_access_initial( + self, resource_group_name, disk_name, access, duration_in_seconds, custom_headers=None, raw=False, **operation_config): + grant_access_data = models.GrantAccessData(access=access, duration_in_seconds=duration_in_seconds) + + # Construct URL + url = self.grant_access.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'diskName': self._serialize.url("disk_name", disk_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(grant_access_data, 'GrantAccessData') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('AccessUri', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def grant_access( + self, resource_group_name, disk_name, access, duration_in_seconds, custom_headers=None, raw=False, polling=True, **operation_config): + """Grants access to a disk. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param disk_name: The name of the managed disk that is being created. + The name can't be changed after the disk is created. Supported + characters for the name are a-z, A-Z, 0-9 and _. The maximum name + length is 80 characters. + :type disk_name: str + :param access: Possible values include: 'None', 'Read' + :type access: str or + ~azure.mgmt.compute.v2017_03_30.models.AccessLevel + :param duration_in_seconds: Time duration in seconds until the SAS + access expires. + :type duration_in_seconds: int + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns AccessUri or + ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2017_03_30.models.AccessUri] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2017_03_30.models.AccessUri]] + :raises: :class:`CloudError` + """ + raw_result = self._grant_access_initial( + resource_group_name=resource_group_name, + disk_name=disk_name, + access=access, + duration_in_seconds=duration_in_seconds, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('AccessUri', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + grant_access.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/disks/{diskName}/beginGetAccess'} + + + def _revoke_access_initial( + self, resource_group_name, disk_name, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.revoke_access.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'diskName': self._serialize.url("disk_name", disk_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('OperationStatusResponse', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def revoke_access( + self, resource_group_name, disk_name, custom_headers=None, raw=False, polling=True, **operation_config): + """Revokes access to a disk. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param disk_name: The name of the managed disk that is being created. + The name can't be changed after the disk is created. Supported + characters for the name are a-z, A-Z, 0-9 and _. The maximum name + length is 80 characters. + :type disk_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns OperationStatusResponse + or ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2017_03_30.models.OperationStatusResponse] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2017_03_30.models.OperationStatusResponse]] + :raises: :class:`CloudError` + """ + raw_result = self._revoke_access_initial( + resource_group_name=resource_group_name, + disk_name=disk_name, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('OperationStatusResponse', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + revoke_access.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/disks/{diskName}/endGetAccess'} diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/operations/_images_operations.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/operations/_images_operations.py new file mode 100644 index 000000000000..39f376b2da9e --- /dev/null +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/operations/_images_operations.py @@ -0,0 +1,439 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse +from msrestazure.azure_exceptions import CloudError +from msrest.polling import LROPoller, NoPolling +from msrestazure.polling.arm_polling import ARMPolling + +from .. import models + + +class ImagesOperations(object): + """ImagesOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: Client Api Version. Constant value: "2017-03-30". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2017-03-30" + + self.config = config + + + def _create_or_update_initial( + self, resource_group_name, image_name, parameters, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.create_or_update.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'imageName': self._serialize.url("image_name", image_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(parameters, 'Image') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 201]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('Image', response) + if response.status_code == 201: + deserialized = self._deserialize('Image', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def create_or_update( + self, resource_group_name, image_name, parameters, custom_headers=None, raw=False, polling=True, **operation_config): + """Create or update an image. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param image_name: The name of the image. + :type image_name: str + :param parameters: Parameters supplied to the Create Image operation. + :type parameters: ~azure.mgmt.compute.v2017_03_30.models.Image + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns Image or + ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2017_03_30.models.Image] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2017_03_30.models.Image]] + :raises: :class:`CloudError` + """ + raw_result = self._create_or_update_initial( + resource_group_name=resource_group_name, + image_name=image_name, + parameters=parameters, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('Image', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/images/{imageName}'} + + + def _delete_initial( + self, resource_group_name, image_name, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.delete.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'imageName': self._serialize.url("image_name", image_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202, 204]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('OperationStatusResponse', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def delete( + self, resource_group_name, image_name, custom_headers=None, raw=False, polling=True, **operation_config): + """Deletes an Image. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param image_name: The name of the image. + :type image_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns OperationStatusResponse + or ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2017_03_30.models.OperationStatusResponse] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2017_03_30.models.OperationStatusResponse]] + :raises: :class:`CloudError` + """ + raw_result = self._delete_initial( + resource_group_name=resource_group_name, + image_name=image_name, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('OperationStatusResponse', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/images/{imageName}'} + + def get( + self, resource_group_name, image_name, expand=None, custom_headers=None, raw=False, **operation_config): + """Gets an image. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param image_name: The name of the image. + :type image_name: str + :param expand: The expand expression to apply on the operation. + :type expand: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: Image or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.compute.v2017_03_30.models.Image or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'imageName': self._serialize.url("image_name", image_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + if expand is not None: + query_parameters['$expand'] = self._serialize.query("expand", expand, 'str') + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('Image', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/images/{imageName}'} + + def list_by_resource_group( + self, resource_group_name, custom_headers=None, raw=False, **operation_config): + """Gets the list of images under a resource group. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of Image + :rtype: + ~azure.mgmt.compute.v2017_03_30.models.ImagePaged[~azure.mgmt.compute.v2017_03_30.models.Image] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_by_resource_group.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.ImagePaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/images'} + + def list( + self, custom_headers=None, raw=False, **operation_config): + """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. + + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of Image + :rtype: + ~azure.mgmt.compute.v2017_03_30.models.ImagePaged[~azure.mgmt.compute.v2017_03_30.models.Image] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.ImagePaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Compute/images'} diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/operations/_resource_skus_operations.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/operations/_resource_skus_operations.py new file mode 100644 index 000000000000..e76b4fb13c87 --- /dev/null +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/operations/_resource_skus_operations.py @@ -0,0 +1,107 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse +from msrestazure.azure_exceptions import CloudError + +from .. import models + + +class ResourceSkusOperations(object): + """ResourceSkusOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: Client Api Version. Constant value: "2017-03-30". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2017-03-30" + + self.config = config + + def list( + self, custom_headers=None, raw=False, **operation_config): + """Gets the list of Microsoft.Compute SKUs available for your + Subscription. + + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of ResourceSku + :rtype: + ~azure.mgmt.compute.v2017_03_30.models.ResourceSkuPaged[~azure.mgmt.compute.v2017_03_30.models.ResourceSku] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.ResourceSkuPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Compute/skus'} diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/operations/_snapshots_operations.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/operations/_snapshots_operations.py new file mode 100644 index 000000000000..0cf0159f56ca --- /dev/null +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/operations/_snapshots_operations.py @@ -0,0 +1,755 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse +from msrestazure.azure_exceptions import CloudError +from msrest.polling import LROPoller, NoPolling +from msrestazure.polling.arm_polling import ARMPolling + +from .. import models + + +class SnapshotsOperations(object): + """SnapshotsOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: Client Api Version. Constant value: "2017-03-30". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2017-03-30" + + self.config = config + + + def _create_or_update_initial( + self, resource_group_name, snapshot_name, snapshot, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.create_or_update.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'snapshotName': self._serialize.url("snapshot_name", snapshot_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(snapshot, 'Snapshot') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('Snapshot', response) + if response.status_code == 202: + deserialized = self._deserialize('Snapshot', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def create_or_update( + self, resource_group_name, snapshot_name, snapshot, custom_headers=None, raw=False, polling=True, **operation_config): + """Creates or updates a snapshot. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param snapshot_name: The name of the snapshot that is being created. + The name can't be changed after the snapshot is created. Supported + characters for the name are a-z, A-Z, 0-9 and _. The max name length + is 80 characters. + :type snapshot_name: str + :param snapshot: Snapshot object supplied in the body of the Put disk + operation. + :type snapshot: ~azure.mgmt.compute.v2017_03_30.models.Snapshot + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns Snapshot or + ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2017_03_30.models.Snapshot] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2017_03_30.models.Snapshot]] + :raises: :class:`CloudError` + """ + raw_result = self._create_or_update_initial( + resource_group_name=resource_group_name, + snapshot_name=snapshot_name, + snapshot=snapshot, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('Snapshot', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/snapshots/{snapshotName}'} + + + def _update_initial( + self, resource_group_name, snapshot_name, snapshot, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.update.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'snapshotName': self._serialize.url("snapshot_name", snapshot_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(snapshot, 'SnapshotUpdate') + + # Construct and send request + request = self._client.patch(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('Snapshot', response) + if response.status_code == 202: + deserialized = self._deserialize('Snapshot', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def update( + self, resource_group_name, snapshot_name, snapshot, custom_headers=None, raw=False, polling=True, **operation_config): + """Updates (patches) a snapshot. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param snapshot_name: The name of the snapshot that is being created. + The name can't be changed after the snapshot is created. Supported + characters for the name are a-z, A-Z, 0-9 and _. The max name length + is 80 characters. + :type snapshot_name: str + :param snapshot: Snapshot object supplied in the body of the Patch + snapshot operation. + :type snapshot: ~azure.mgmt.compute.v2017_03_30.models.SnapshotUpdate + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns Snapshot or + ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2017_03_30.models.Snapshot] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2017_03_30.models.Snapshot]] + :raises: :class:`CloudError` + """ + raw_result = self._update_initial( + resource_group_name=resource_group_name, + snapshot_name=snapshot_name, + snapshot=snapshot, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('Snapshot', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/snapshots/{snapshotName}'} + + def get( + self, resource_group_name, snapshot_name, custom_headers=None, raw=False, **operation_config): + """Gets information about a snapshot. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param snapshot_name: The name of the snapshot that is being created. + The name can't be changed after the snapshot is created. Supported + characters for the name are a-z, A-Z, 0-9 and _. The max name length + is 80 characters. + :type snapshot_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: Snapshot or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.compute.v2017_03_30.models.Snapshot or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'snapshotName': self._serialize.url("snapshot_name", snapshot_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('Snapshot', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/snapshots/{snapshotName}'} + + + def _delete_initial( + self, resource_group_name, snapshot_name, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.delete.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'snapshotName': self._serialize.url("snapshot_name", snapshot_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202, 204]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('OperationStatusResponse', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def delete( + self, resource_group_name, snapshot_name, custom_headers=None, raw=False, polling=True, **operation_config): + """Deletes a snapshot. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param snapshot_name: The name of the snapshot that is being created. + The name can't be changed after the snapshot is created. Supported + characters for the name are a-z, A-Z, 0-9 and _. The max name length + is 80 characters. + :type snapshot_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns OperationStatusResponse + or ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2017_03_30.models.OperationStatusResponse] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2017_03_30.models.OperationStatusResponse]] + :raises: :class:`CloudError` + """ + raw_result = self._delete_initial( + resource_group_name=resource_group_name, + snapshot_name=snapshot_name, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('OperationStatusResponse', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/snapshots/{snapshotName}'} + + def list_by_resource_group( + self, resource_group_name, custom_headers=None, raw=False, **operation_config): + """Lists snapshots under a resource group. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of Snapshot + :rtype: + ~azure.mgmt.compute.v2017_03_30.models.SnapshotPaged[~azure.mgmt.compute.v2017_03_30.models.Snapshot] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_by_resource_group.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.SnapshotPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/snapshots'} + + def list( + self, custom_headers=None, raw=False, **operation_config): + """Lists snapshots under a subscription. + + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of Snapshot + :rtype: + ~azure.mgmt.compute.v2017_03_30.models.SnapshotPaged[~azure.mgmt.compute.v2017_03_30.models.Snapshot] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.SnapshotPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Compute/snapshots'} + + + def _grant_access_initial( + self, resource_group_name, snapshot_name, access, duration_in_seconds, custom_headers=None, raw=False, **operation_config): + grant_access_data = models.GrantAccessData(access=access, duration_in_seconds=duration_in_seconds) + + # Construct URL + url = self.grant_access.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'snapshotName': self._serialize.url("snapshot_name", snapshot_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(grant_access_data, 'GrantAccessData') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('AccessUri', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def grant_access( + self, resource_group_name, snapshot_name, access, duration_in_seconds, custom_headers=None, raw=False, polling=True, **operation_config): + """Grants access to a snapshot. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param snapshot_name: The name of the snapshot that is being created. + The name can't be changed after the snapshot is created. Supported + characters for the name are a-z, A-Z, 0-9 and _. The max name length + is 80 characters. + :type snapshot_name: str + :param access: Possible values include: 'None', 'Read' + :type access: str or + ~azure.mgmt.compute.v2017_03_30.models.AccessLevel + :param duration_in_seconds: Time duration in seconds until the SAS + access expires. + :type duration_in_seconds: int + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns AccessUri or + ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2017_03_30.models.AccessUri] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2017_03_30.models.AccessUri]] + :raises: :class:`CloudError` + """ + raw_result = self._grant_access_initial( + resource_group_name=resource_group_name, + snapshot_name=snapshot_name, + access=access, + duration_in_seconds=duration_in_seconds, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('AccessUri', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + grant_access.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/snapshots/{snapshotName}/beginGetAccess'} + + + def _revoke_access_initial( + self, resource_group_name, snapshot_name, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.revoke_access.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'snapshotName': self._serialize.url("snapshot_name", snapshot_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('OperationStatusResponse', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def revoke_access( + self, resource_group_name, snapshot_name, custom_headers=None, raw=False, polling=True, **operation_config): + """Revokes access to a snapshot. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param snapshot_name: The name of the snapshot that is being created. + The name can't be changed after the snapshot is created. Supported + characters for the name are a-z, A-Z, 0-9 and _. The max name length + is 80 characters. + :type snapshot_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns OperationStatusResponse + or ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2017_03_30.models.OperationStatusResponse] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2017_03_30.models.OperationStatusResponse]] + :raises: :class:`CloudError` + """ + raw_result = self._revoke_access_initial( + resource_group_name=resource_group_name, + snapshot_name=snapshot_name, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('OperationStatusResponse', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + revoke_access.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/snapshots/{snapshotName}/endGetAccess'} diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/operations/_usage_operations.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/operations/_usage_operations.py new file mode 100644 index 000000000000..01c452b12270 --- /dev/null +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/operations/_usage_operations.py @@ -0,0 +1,111 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse +from msrestazure.azure_exceptions import CloudError + +from .. import models + + +class UsageOperations(object): + """UsageOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: Client Api Version. Constant value: "2017-03-30". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2017-03-30" + + self.config = config + + def list( + self, location, custom_headers=None, raw=False, **operation_config): + """Gets, for the specified location, the current compute resource usage + information as well as the limits for compute resources under the + subscription. + + :param location: The location for which resource usage is queried. + :type location: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of Usage + :rtype: + ~azure.mgmt.compute.v2017_03_30.models.UsagePaged[~azure.mgmt.compute.v2017_03_30.models.Usage] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list.metadata['url'] + path_format_arguments = { + 'location': self._serialize.url("location", location, 'str', pattern=r'^[-\w\._]+$'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.UsagePaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/usages'} diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/operations/_virtual_machine_extension_images_operations.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/operations/_virtual_machine_extension_images_operations.py new file mode 100644 index 000000000000..746aaea944a9 --- /dev/null +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/operations/_virtual_machine_extension_images_operations.py @@ -0,0 +1,247 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse +from msrestazure.azure_exceptions import CloudError + +from .. import models + + +class VirtualMachineExtensionImagesOperations(object): + """VirtualMachineExtensionImagesOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: Client Api Version. Constant value: "2017-03-30". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2017-03-30" + + self.config = config + + def get( + self, location, publisher_name, type, version, custom_headers=None, raw=False, **operation_config): + """Gets a virtual machine extension image. + + :param location: The name of a supported Azure region. + :type location: str + :param publisher_name: + :type publisher_name: str + :param type: + :type type: str + :param version: + :type version: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: VirtualMachineExtensionImage or ClientRawResponse if raw=true + :rtype: + ~azure.mgmt.compute.v2017_03_30.models.VirtualMachineExtensionImage or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'location': self._serialize.url("location", location, 'str'), + 'publisherName': self._serialize.url("publisher_name", publisher_name, 'str'), + 'type': self._serialize.url("type", type, 'str'), + 'version': self._serialize.url("version", version, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('VirtualMachineExtensionImage', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/publishers/{publisherName}/artifacttypes/vmextension/types/{type}/versions/{version}'} + + def list_types( + self, location, publisher_name, custom_headers=None, raw=False, **operation_config): + """Gets a list of virtual machine extension image types. + + :param location: The name of a supported Azure region. + :type location: str + :param publisher_name: + :type publisher_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: list or ClientRawResponse if raw=true + :rtype: + list[~azure.mgmt.compute.v2017_03_30.models.VirtualMachineExtensionImage] + or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.list_types.metadata['url'] + path_format_arguments = { + 'location': self._serialize.url("location", location, 'str'), + 'publisherName': self._serialize.url("publisher_name", publisher_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('[VirtualMachineExtensionImage]', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + list_types.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/publishers/{publisherName}/artifacttypes/vmextension/types'} + + def list_versions( + self, location, publisher_name, type, filter=None, top=None, orderby=None, custom_headers=None, raw=False, **operation_config): + """Gets a list of virtual machine extension image versions. + + :param location: The name of a supported Azure region. + :type location: str + :param publisher_name: + :type publisher_name: str + :param type: + :type type: str + :param filter: The filter to apply on the operation. + :type filter: str + :param top: + :type top: int + :param orderby: + :type orderby: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: list or ClientRawResponse if raw=true + :rtype: + list[~azure.mgmt.compute.v2017_03_30.models.VirtualMachineExtensionImage] + or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.list_versions.metadata['url'] + path_format_arguments = { + 'location': self._serialize.url("location", location, 'str'), + 'publisherName': self._serialize.url("publisher_name", publisher_name, 'str'), + 'type': self._serialize.url("type", type, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + if filter is not None: + query_parameters['$filter'] = self._serialize.query("filter", filter, 'str') + if top is not None: + query_parameters['$top'] = self._serialize.query("top", top, 'int') + if orderby is not None: + query_parameters['$orderby'] = self._serialize.query("orderby", orderby, 'str') + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('[VirtualMachineExtensionImage]', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + list_versions.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/publishers/{publisherName}/artifacttypes/vmextension/types/{type}/versions'} diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/operations/_virtual_machine_extensions_operations.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/operations/_virtual_machine_extensions_operations.py new file mode 100644 index 000000000000..0bca868ec49c --- /dev/null +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/operations/_virtual_machine_extensions_operations.py @@ -0,0 +1,425 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse +from msrestazure.azure_exceptions import CloudError +from msrest.polling import LROPoller, NoPolling +from msrestazure.polling.arm_polling import ARMPolling + +from .. import models + + +class VirtualMachineExtensionsOperations(object): + """VirtualMachineExtensionsOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: Client Api Version. Constant value: "2017-03-30". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2017-03-30" + + self.config = config + + + def _create_or_update_initial( + self, resource_group_name, vm_name, vm_extension_name, extension_parameters, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.create_or_update.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vmName': self._serialize.url("vm_name", vm_name, 'str'), + 'vmExtensionName': self._serialize.url("vm_extension_name", vm_extension_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(extension_parameters, 'VirtualMachineExtension') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 201]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('VirtualMachineExtension', response) + if response.status_code == 201: + deserialized = self._deserialize('VirtualMachineExtension', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def create_or_update( + self, resource_group_name, vm_name, vm_extension_name, extension_parameters, custom_headers=None, raw=False, polling=True, **operation_config): + """The operation to create or update the extension. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param vm_name: The name of the virtual machine where the extension + should be created or updated. + :type vm_name: str + :param vm_extension_name: The name of the virtual machine extension. + :type vm_extension_name: str + :param extension_parameters: Parameters supplied to the Create Virtual + Machine Extension operation. + :type extension_parameters: + ~azure.mgmt.compute.v2017_03_30.models.VirtualMachineExtension + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns VirtualMachineExtension + or ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2017_03_30.models.VirtualMachineExtension] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2017_03_30.models.VirtualMachineExtension]] + :raises: :class:`CloudError` + """ + raw_result = self._create_or_update_initial( + resource_group_name=resource_group_name, + vm_name=vm_name, + vm_extension_name=vm_extension_name, + extension_parameters=extension_parameters, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('VirtualMachineExtension', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/extensions/{vmExtensionName}'} + + + def _update_initial( + self, resource_group_name, vm_name, vm_extension_name, extension_parameters, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.update.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vmName': self._serialize.url("vm_name", vm_name, 'str'), + 'vmExtensionName': self._serialize.url("vm_extension_name", vm_extension_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(extension_parameters, 'VirtualMachineExtensionUpdate') + + # Construct and send request + request = self._client.patch(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('VirtualMachineExtension', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def update( + self, resource_group_name, vm_name, vm_extension_name, extension_parameters, custom_headers=None, raw=False, polling=True, **operation_config): + """The operation to update the extension. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param vm_name: The name of the virtual machine where the extension + should be updated. + :type vm_name: str + :param vm_extension_name: The name of the virtual machine extension. + :type vm_extension_name: str + :param extension_parameters: Parameters supplied to the Update Virtual + Machine Extension operation. + :type extension_parameters: + ~azure.mgmt.compute.v2017_03_30.models.VirtualMachineExtensionUpdate + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns VirtualMachineExtension + or ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2017_03_30.models.VirtualMachineExtension] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2017_03_30.models.VirtualMachineExtension]] + :raises: :class:`CloudError` + """ + raw_result = self._update_initial( + resource_group_name=resource_group_name, + vm_name=vm_name, + vm_extension_name=vm_extension_name, + extension_parameters=extension_parameters, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('VirtualMachineExtension', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/extensions/{vmExtensionName}'} + + + def _delete_initial( + self, resource_group_name, vm_name, vm_extension_name, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.delete.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vmName': self._serialize.url("vm_name", vm_name, 'str'), + 'vmExtensionName': self._serialize.url("vm_extension_name", vm_extension_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202, 204]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('OperationStatusResponse', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def delete( + self, resource_group_name, vm_name, vm_extension_name, custom_headers=None, raw=False, polling=True, **operation_config): + """The operation to delete the extension. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param vm_name: The name of the virtual machine where the extension + should be deleted. + :type vm_name: str + :param vm_extension_name: The name of the virtual machine extension. + :type vm_extension_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns OperationStatusResponse + or ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2017_03_30.models.OperationStatusResponse] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2017_03_30.models.OperationStatusResponse]] + :raises: :class:`CloudError` + """ + raw_result = self._delete_initial( + resource_group_name=resource_group_name, + vm_name=vm_name, + vm_extension_name=vm_extension_name, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('OperationStatusResponse', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/extensions/{vmExtensionName}'} + + def get( + self, resource_group_name, vm_name, vm_extension_name, expand=None, custom_headers=None, raw=False, **operation_config): + """The operation to get the extension. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param vm_name: The name of the virtual machine containing the + extension. + :type vm_name: str + :param vm_extension_name: The name of the virtual machine extension. + :type vm_extension_name: str + :param expand: The expand expression to apply on the operation. + :type expand: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: VirtualMachineExtension or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.compute.v2017_03_30.models.VirtualMachineExtension + or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vmName': self._serialize.url("vm_name", vm_name, 'str'), + 'vmExtensionName': self._serialize.url("vm_extension_name", vm_extension_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + if expand is not None: + query_parameters['$expand'] = self._serialize.query("expand", expand, 'str') + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('VirtualMachineExtension', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/extensions/{vmExtensionName}'} diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/operations/_virtual_machine_images_operations.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/operations/_virtual_machine_images_operations.py new file mode 100644 index 000000000000..e6a3b7fb53ca --- /dev/null +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/operations/_virtual_machine_images_operations.py @@ -0,0 +1,380 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse +from msrestazure.azure_exceptions import CloudError + +from .. import models + + +class VirtualMachineImagesOperations(object): + """VirtualMachineImagesOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: Client Api Version. Constant value: "2017-03-30". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2017-03-30" + + self.config = config + + def get( + self, location, publisher_name, offer, skus, version, custom_headers=None, raw=False, **operation_config): + """Gets a virtual machine image. + + :param location: The name of a supported Azure region. + :type location: str + :param publisher_name: A valid image publisher. + :type publisher_name: str + :param offer: A valid image publisher offer. + :type offer: str + :param skus: A valid image SKU. + :type skus: str + :param version: A valid image SKU version. + :type version: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: VirtualMachineImage or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.compute.v2017_03_30.models.VirtualMachineImage or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'location': self._serialize.url("location", location, 'str'), + 'publisherName': self._serialize.url("publisher_name", publisher_name, 'str'), + 'offer': self._serialize.url("offer", offer, 'str'), + 'skus': self._serialize.url("skus", skus, 'str'), + 'version': self._serialize.url("version", version, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('VirtualMachineImage', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/publishers/{publisherName}/artifacttypes/vmimage/offers/{offer}/skus/{skus}/versions/{version}'} + + def list( + self, location, publisher_name, offer, skus, filter=None, top=None, orderby=None, custom_headers=None, raw=False, **operation_config): + """Gets a list of all virtual machine image versions for the specified + location, publisher, offer, and SKU. + + :param location: The name of a supported Azure region. + :type location: str + :param publisher_name: A valid image publisher. + :type publisher_name: str + :param offer: A valid image publisher offer. + :type offer: str + :param skus: A valid image SKU. + :type skus: str + :param filter: The filter to apply on the operation. + :type filter: str + :param top: + :type top: int + :param orderby: + :type orderby: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: list or ClientRawResponse if raw=true + :rtype: + list[~azure.mgmt.compute.v2017_03_30.models.VirtualMachineImageResource] + or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.list.metadata['url'] + path_format_arguments = { + 'location': self._serialize.url("location", location, 'str'), + 'publisherName': self._serialize.url("publisher_name", publisher_name, 'str'), + 'offer': self._serialize.url("offer", offer, 'str'), + 'skus': self._serialize.url("skus", skus, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + if filter is not None: + query_parameters['$filter'] = self._serialize.query("filter", filter, 'str') + if top is not None: + query_parameters['$top'] = self._serialize.query("top", top, 'int') + if orderby is not None: + query_parameters['$orderby'] = self._serialize.query("orderby", orderby, 'str') + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('[VirtualMachineImageResource]', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/publishers/{publisherName}/artifacttypes/vmimage/offers/{offer}/skus/{skus}/versions'} + + def list_offers( + self, location, publisher_name, custom_headers=None, raw=False, **operation_config): + """Gets a list of virtual machine image offers for the specified location + and publisher. + + :param location: The name of a supported Azure region. + :type location: str + :param publisher_name: A valid image publisher. + :type publisher_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: list or ClientRawResponse if raw=true + :rtype: + list[~azure.mgmt.compute.v2017_03_30.models.VirtualMachineImageResource] + or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.list_offers.metadata['url'] + path_format_arguments = { + 'location': self._serialize.url("location", location, 'str'), + 'publisherName': self._serialize.url("publisher_name", publisher_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('[VirtualMachineImageResource]', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + list_offers.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/publishers/{publisherName}/artifacttypes/vmimage/offers'} + + def list_publishers( + self, location, custom_headers=None, raw=False, **operation_config): + """Gets a list of virtual machine image publishers for the specified Azure + location. + + :param location: The name of a supported Azure region. + :type location: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: list or ClientRawResponse if raw=true + :rtype: + list[~azure.mgmt.compute.v2017_03_30.models.VirtualMachineImageResource] + or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.list_publishers.metadata['url'] + path_format_arguments = { + 'location': self._serialize.url("location", location, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('[VirtualMachineImageResource]', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + list_publishers.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/publishers'} + + def list_skus( + self, location, publisher_name, offer, custom_headers=None, raw=False, **operation_config): + """Gets a list of virtual machine image SKUs for the specified location, + publisher, and offer. + + :param location: The name of a supported Azure region. + :type location: str + :param publisher_name: A valid image publisher. + :type publisher_name: str + :param offer: A valid image publisher offer. + :type offer: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: list or ClientRawResponse if raw=true + :rtype: + list[~azure.mgmt.compute.v2017_03_30.models.VirtualMachineImageResource] + or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.list_skus.metadata['url'] + path_format_arguments = { + 'location': self._serialize.url("location", location, 'str'), + 'publisherName': self._serialize.url("publisher_name", publisher_name, 'str'), + 'offer': self._serialize.url("offer", offer, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('[VirtualMachineImageResource]', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + list_skus.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/publishers/{publisherName}/artifacttypes/vmimage/offers/{offer}/skus'} diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/operations/_virtual_machine_run_commands_operations.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/operations/_virtual_machine_run_commands_operations.py new file mode 100644 index 000000000000..259e7816dc94 --- /dev/null +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/operations/_virtual_machine_run_commands_operations.py @@ -0,0 +1,170 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse +from msrestazure.azure_exceptions import CloudError + +from .. import models + + +class VirtualMachineRunCommandsOperations(object): + """VirtualMachineRunCommandsOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: Client Api Version. Constant value: "2017-03-30". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2017-03-30" + + self.config = config + + def list( + self, location, custom_headers=None, raw=False, **operation_config): + """Lists all available run commands for a subscription in a location. + + :param location: The location upon which run commands is queried. + :type location: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of RunCommandDocumentBase + :rtype: + ~azure.mgmt.compute.v2017_03_30.models.RunCommandDocumentBasePaged[~azure.mgmt.compute.v2017_03_30.models.RunCommandDocumentBase] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list.metadata['url'] + path_format_arguments = { + 'location': self._serialize.url("location", location, 'str', pattern=r'^[-\w\._]+$'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.RunCommandDocumentBasePaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/runCommands'} + + def get( + self, location, command_id, custom_headers=None, raw=False, **operation_config): + """Gets specific run command for a subscription in a location. + + :param location: The location upon which run commands is queried. + :type location: str + :param command_id: The command id. + :type command_id: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: RunCommandDocument or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.compute.v2017_03_30.models.RunCommandDocument or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'location': self._serialize.url("location", location, 'str', pattern=r'^[-\w\._]+$'), + 'commandId': self._serialize.url("command_id", command_id, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('RunCommandDocument', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/runCommands/{commandId}'} diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/operations/_virtual_machine_scale_set_extensions_operations.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/operations/_virtual_machine_scale_set_extensions_operations.py new file mode 100644 index 000000000000..7fa82e23f7eb --- /dev/null +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/operations/_virtual_machine_scale_set_extensions_operations.py @@ -0,0 +1,394 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse +from msrestazure.azure_exceptions import CloudError +from msrest.polling import LROPoller, NoPolling +from msrestazure.polling.arm_polling import ARMPolling + +from .. import models + + +class VirtualMachineScaleSetExtensionsOperations(object): + """VirtualMachineScaleSetExtensionsOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: Client Api Version. Constant value: "2017-03-30". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2017-03-30" + + self.config = config + + + def _create_or_update_initial( + self, resource_group_name, vm_scale_set_name, vmss_extension_name, extension_parameters, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.create_or_update.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), + 'vmssExtensionName': self._serialize.url("vmss_extension_name", vmss_extension_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(extension_parameters, 'VirtualMachineScaleSetExtension') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 201]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('VirtualMachineScaleSetExtension', response) + if response.status_code == 201: + deserialized = self._deserialize('VirtualMachineScaleSetExtension', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def create_or_update( + self, resource_group_name, vm_scale_set_name, vmss_extension_name, extension_parameters, custom_headers=None, raw=False, polling=True, **operation_config): + """The operation to create or update an extension. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param vm_scale_set_name: The name of the VM scale set where the + extension should be create or updated. + :type vm_scale_set_name: str + :param vmss_extension_name: The name of the VM scale set extension. + :type vmss_extension_name: str + :param extension_parameters: Parameters supplied to the Create VM + scale set Extension operation. + :type extension_parameters: + ~azure.mgmt.compute.v2017_03_30.models.VirtualMachineScaleSetExtension + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns + VirtualMachineScaleSetExtension or + ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2017_03_30.models.VirtualMachineScaleSetExtension] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2017_03_30.models.VirtualMachineScaleSetExtension]] + :raises: :class:`CloudError` + """ + raw_result = self._create_or_update_initial( + resource_group_name=resource_group_name, + vm_scale_set_name=vm_scale_set_name, + vmss_extension_name=vmss_extension_name, + extension_parameters=extension_parameters, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('VirtualMachineScaleSetExtension', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/extensions/{vmssExtensionName}'} + + + def _delete_initial( + self, resource_group_name, vm_scale_set_name, vmss_extension_name, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.delete.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), + 'vmssExtensionName': self._serialize.url("vmss_extension_name", vmss_extension_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202, 204]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('OperationStatusResponse', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def delete( + self, resource_group_name, vm_scale_set_name, vmss_extension_name, custom_headers=None, raw=False, polling=True, **operation_config): + """The operation to delete the extension. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param vm_scale_set_name: The name of the VM scale set where the + extension should be deleted. + :type vm_scale_set_name: str + :param vmss_extension_name: The name of the VM scale set extension. + :type vmss_extension_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns OperationStatusResponse + or ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2017_03_30.models.OperationStatusResponse] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2017_03_30.models.OperationStatusResponse]] + :raises: :class:`CloudError` + """ + raw_result = self._delete_initial( + resource_group_name=resource_group_name, + vm_scale_set_name=vm_scale_set_name, + vmss_extension_name=vmss_extension_name, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('OperationStatusResponse', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/extensions/{vmssExtensionName}'} + + def get( + self, resource_group_name, vm_scale_set_name, vmss_extension_name, expand=None, custom_headers=None, raw=False, **operation_config): + """The operation to get the extension. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param vm_scale_set_name: The name of the VM scale set containing the + extension. + :type vm_scale_set_name: str + :param vmss_extension_name: The name of the VM scale set extension. + :type vmss_extension_name: str + :param expand: The expand expression to apply on the operation. + :type expand: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: VirtualMachineScaleSetExtension or ClientRawResponse if + raw=true + :rtype: + ~azure.mgmt.compute.v2017_03_30.models.VirtualMachineScaleSetExtension + or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), + 'vmssExtensionName': self._serialize.url("vmss_extension_name", vmss_extension_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + if expand is not None: + query_parameters['$expand'] = self._serialize.query("expand", expand, 'str') + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('VirtualMachineScaleSetExtension', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/extensions/{vmssExtensionName}'} + + def list( + self, resource_group_name, vm_scale_set_name, custom_headers=None, raw=False, **operation_config): + """Gets a list of all extensions in a VM scale set. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param vm_scale_set_name: The name of the VM scale set containing the + extension. + :type vm_scale_set_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of VirtualMachineScaleSetExtension + :rtype: + ~azure.mgmt.compute.v2017_03_30.models.VirtualMachineScaleSetExtensionPaged[~azure.mgmt.compute.v2017_03_30.models.VirtualMachineScaleSetExtension] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.VirtualMachineScaleSetExtensionPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/extensions'} diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/operations/_virtual_machine_scale_set_rolling_upgrades_operations.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/operations/_virtual_machine_scale_set_rolling_upgrades_operations.py new file mode 100644 index 000000000000..7a005290e76e --- /dev/null +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/operations/_virtual_machine_scale_set_rolling_upgrades_operations.py @@ -0,0 +1,294 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse +from msrestazure.azure_exceptions import CloudError +from msrest.polling import LROPoller, NoPolling +from msrestazure.polling.arm_polling import ARMPolling + +from .. import models + + +class VirtualMachineScaleSetRollingUpgradesOperations(object): + """VirtualMachineScaleSetRollingUpgradesOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: Client Api Version. Constant value: "2017-03-30". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2017-03-30" + + self.config = config + + + def _cancel_initial( + self, resource_group_name, vm_scale_set_name, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.cancel.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('OperationStatusResponse', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def cancel( + self, resource_group_name, vm_scale_set_name, custom_headers=None, raw=False, polling=True, **operation_config): + """Cancels the current virtual machine scale set rolling upgrade. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param vm_scale_set_name: The name of the VM scale set. + :type vm_scale_set_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns OperationStatusResponse + or ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2017_03_30.models.OperationStatusResponse] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2017_03_30.models.OperationStatusResponse]] + :raises: :class:`CloudError` + """ + raw_result = self._cancel_initial( + resource_group_name=resource_group_name, + vm_scale_set_name=vm_scale_set_name, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('OperationStatusResponse', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + cancel.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/rollingUpgrades/cancel'} + + + def _start_os_upgrade_initial( + self, resource_group_name, vm_scale_set_name, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.start_os_upgrade.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('OperationStatusResponse', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def start_os_upgrade( + self, resource_group_name, vm_scale_set_name, custom_headers=None, raw=False, polling=True, **operation_config): + """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. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param vm_scale_set_name: The name of the VM scale set. + :type vm_scale_set_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns OperationStatusResponse + or ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2017_03_30.models.OperationStatusResponse] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2017_03_30.models.OperationStatusResponse]] + :raises: :class:`CloudError` + """ + raw_result = self._start_os_upgrade_initial( + resource_group_name=resource_group_name, + vm_scale_set_name=vm_scale_set_name, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('OperationStatusResponse', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + start_os_upgrade.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/osRollingUpgrade'} + + def get_latest( + self, resource_group_name, vm_scale_set_name, custom_headers=None, raw=False, **operation_config): + """Gets the status of the latest virtual machine scale set rolling + upgrade. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param vm_scale_set_name: The name of the VM scale set. + :type vm_scale_set_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: RollingUpgradeStatusInfo or ClientRawResponse if raw=true + :rtype: + ~azure.mgmt.compute.v2017_03_30.models.RollingUpgradeStatusInfo or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get_latest.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('RollingUpgradeStatusInfo', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_latest.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/rollingUpgrades/latest'} diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/operations/_virtual_machine_scale_set_vms_operations.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/operations/_virtual_machine_scale_set_vms_operations.py new file mode 100644 index 000000000000..45c051428205 --- /dev/null +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/operations/_virtual_machine_scale_set_vms_operations.py @@ -0,0 +1,945 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse +from msrestazure.azure_exceptions import CloudError +from msrest.polling import LROPoller, NoPolling +from msrestazure.polling.arm_polling import ARMPolling + +from .. import models + + +class VirtualMachineScaleSetVMsOperations(object): + """VirtualMachineScaleSetVMsOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: Client Api Version. Constant value: "2017-03-30". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2017-03-30" + + self.config = config + + + def _reimage_initial( + self, resource_group_name, vm_scale_set_name, instance_id, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.reimage.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), + 'instanceId': self._serialize.url("instance_id", instance_id, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('OperationStatusResponse', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def reimage( + self, resource_group_name, vm_scale_set_name, instance_id, custom_headers=None, raw=False, polling=True, **operation_config): + """Reimages (upgrade the operating system) a specific virtual machine in a + VM scale set. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param vm_scale_set_name: The name of the VM scale set. + :type vm_scale_set_name: str + :param instance_id: The instance ID of the virtual machine. + :type instance_id: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns OperationStatusResponse + or ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2017_03_30.models.OperationStatusResponse] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2017_03_30.models.OperationStatusResponse]] + :raises: :class:`CloudError` + """ + raw_result = self._reimage_initial( + resource_group_name=resource_group_name, + vm_scale_set_name=vm_scale_set_name, + instance_id=instance_id, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('OperationStatusResponse', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + reimage.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/virtualmachines/{instanceId}/reimage'} + + + def _reimage_all_initial( + self, resource_group_name, vm_scale_set_name, instance_id, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.reimage_all.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), + 'instanceId': self._serialize.url("instance_id", instance_id, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('OperationStatusResponse', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def reimage_all( + self, resource_group_name, vm_scale_set_name, instance_id, custom_headers=None, raw=False, polling=True, **operation_config): + """Allows you to re-image all the disks ( including data disks ) in the a + VM scale set instance. This operation is only supported for managed + disks. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param vm_scale_set_name: The name of the VM scale set. + :type vm_scale_set_name: str + :param instance_id: The instance ID of the virtual machine. + :type instance_id: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns OperationStatusResponse + or ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2017_03_30.models.OperationStatusResponse] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2017_03_30.models.OperationStatusResponse]] + :raises: :class:`CloudError` + """ + raw_result = self._reimage_all_initial( + resource_group_name=resource_group_name, + vm_scale_set_name=vm_scale_set_name, + instance_id=instance_id, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('OperationStatusResponse', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + reimage_all.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/virtualmachines/{instanceId}/reimageall'} + + + def _deallocate_initial( + self, resource_group_name, vm_scale_set_name, instance_id, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.deallocate.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), + 'instanceId': self._serialize.url("instance_id", instance_id, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('OperationStatusResponse', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def deallocate( + self, resource_group_name, vm_scale_set_name, instance_id, custom_headers=None, raw=False, polling=True, **operation_config): + """Deallocates a specific virtual machine in a VM scale set. Shuts down + the virtual machine and releases the compute resources it uses. You are + not billed for the compute resources of this virtual machine once it is + deallocated. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param vm_scale_set_name: The name of the VM scale set. + :type vm_scale_set_name: str + :param instance_id: The instance ID of the virtual machine. + :type instance_id: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns OperationStatusResponse + or ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2017_03_30.models.OperationStatusResponse] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2017_03_30.models.OperationStatusResponse]] + :raises: :class:`CloudError` + """ + raw_result = self._deallocate_initial( + resource_group_name=resource_group_name, + vm_scale_set_name=vm_scale_set_name, + instance_id=instance_id, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('OperationStatusResponse', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + deallocate.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/virtualmachines/{instanceId}/deallocate'} + + + def _delete_initial( + self, resource_group_name, vm_scale_set_name, instance_id, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.delete.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), + 'instanceId': self._serialize.url("instance_id", instance_id, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202, 204]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('OperationStatusResponse', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def delete( + self, resource_group_name, vm_scale_set_name, instance_id, custom_headers=None, raw=False, polling=True, **operation_config): + """Deletes a virtual machine from a VM scale set. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param vm_scale_set_name: The name of the VM scale set. + :type vm_scale_set_name: str + :param instance_id: The instance ID of the virtual machine. + :type instance_id: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns OperationStatusResponse + or ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2017_03_30.models.OperationStatusResponse] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2017_03_30.models.OperationStatusResponse]] + :raises: :class:`CloudError` + """ + raw_result = self._delete_initial( + resource_group_name=resource_group_name, + vm_scale_set_name=vm_scale_set_name, + instance_id=instance_id, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('OperationStatusResponse', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/virtualmachines/{instanceId}'} + + def get( + self, resource_group_name, vm_scale_set_name, instance_id, custom_headers=None, raw=False, **operation_config): + """Gets a virtual machine from a VM scale set. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param vm_scale_set_name: The name of the VM scale set. + :type vm_scale_set_name: str + :param instance_id: The instance ID of the virtual machine. + :type instance_id: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: VirtualMachineScaleSetVM or ClientRawResponse if raw=true + :rtype: + ~azure.mgmt.compute.v2017_03_30.models.VirtualMachineScaleSetVM or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), + 'instanceId': self._serialize.url("instance_id", instance_id, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('VirtualMachineScaleSetVM', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/virtualmachines/{instanceId}'} + + def get_instance_view( + self, resource_group_name, vm_scale_set_name, instance_id, custom_headers=None, raw=False, **operation_config): + """Gets the status of a virtual machine from a VM scale set. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param vm_scale_set_name: The name of the VM scale set. + :type vm_scale_set_name: str + :param instance_id: The instance ID of the virtual machine. + :type instance_id: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: VirtualMachineScaleSetVMInstanceView or ClientRawResponse if + raw=true + :rtype: + ~azure.mgmt.compute.v2017_03_30.models.VirtualMachineScaleSetVMInstanceView + or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get_instance_view.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), + 'instanceId': self._serialize.url("instance_id", instance_id, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('VirtualMachineScaleSetVMInstanceView', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_instance_view.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/virtualmachines/{instanceId}/instanceView'} + + def list( + self, resource_group_name, virtual_machine_scale_set_name, filter=None, select=None, expand=None, custom_headers=None, raw=False, **operation_config): + """Gets a list of all virtual machines in a VM scale sets. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param virtual_machine_scale_set_name: The name of the VM scale set. + :type virtual_machine_scale_set_name: str + :param filter: The filter to apply to the operation. + :type filter: str + :param select: The list parameters. + :type select: str + :param expand: The expand expression to apply to the operation. + :type expand: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of VirtualMachineScaleSetVM + :rtype: + ~azure.mgmt.compute.v2017_03_30.models.VirtualMachineScaleSetVMPaged[~azure.mgmt.compute.v2017_03_30.models.VirtualMachineScaleSetVM] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'virtualMachineScaleSetName': self._serialize.url("virtual_machine_scale_set_name", virtual_machine_scale_set_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + if filter is not None: + query_parameters['$filter'] = self._serialize.query("filter", filter, 'str') + if select is not None: + query_parameters['$select'] = self._serialize.query("select", select, 'str') + if expand is not None: + query_parameters['$expand'] = self._serialize.query("expand", expand, 'str') + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.VirtualMachineScaleSetVMPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{virtualMachineScaleSetName}/virtualMachines'} + + + def _power_off_initial( + self, resource_group_name, vm_scale_set_name, instance_id, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.power_off.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), + 'instanceId': self._serialize.url("instance_id", instance_id, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('OperationStatusResponse', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def power_off( + self, resource_group_name, vm_scale_set_name, instance_id, custom_headers=None, raw=False, polling=True, **operation_config): + """Power off (stop) a virtual machine in a VM scale set. Note that + resources are still attached and you are getting charged for the + resources. Instead, use deallocate to release resources and avoid + charges. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param vm_scale_set_name: The name of the VM scale set. + :type vm_scale_set_name: str + :param instance_id: The instance ID of the virtual machine. + :type instance_id: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns OperationStatusResponse + or ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2017_03_30.models.OperationStatusResponse] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2017_03_30.models.OperationStatusResponse]] + :raises: :class:`CloudError` + """ + raw_result = self._power_off_initial( + resource_group_name=resource_group_name, + vm_scale_set_name=vm_scale_set_name, + instance_id=instance_id, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('OperationStatusResponse', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + power_off.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/virtualmachines/{instanceId}/poweroff'} + + + def _restart_initial( + self, resource_group_name, vm_scale_set_name, instance_id, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.restart.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), + 'instanceId': self._serialize.url("instance_id", instance_id, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('OperationStatusResponse', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def restart( + self, resource_group_name, vm_scale_set_name, instance_id, custom_headers=None, raw=False, polling=True, **operation_config): + """Restarts a virtual machine in a VM scale set. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param vm_scale_set_name: The name of the VM scale set. + :type vm_scale_set_name: str + :param instance_id: The instance ID of the virtual machine. + :type instance_id: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns OperationStatusResponse + or ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2017_03_30.models.OperationStatusResponse] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2017_03_30.models.OperationStatusResponse]] + :raises: :class:`CloudError` + """ + raw_result = self._restart_initial( + resource_group_name=resource_group_name, + vm_scale_set_name=vm_scale_set_name, + instance_id=instance_id, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('OperationStatusResponse', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + restart.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/virtualmachines/{instanceId}/restart'} + + + def _start_initial( + self, resource_group_name, vm_scale_set_name, instance_id, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.start.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), + 'instanceId': self._serialize.url("instance_id", instance_id, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('OperationStatusResponse', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def start( + self, resource_group_name, vm_scale_set_name, instance_id, custom_headers=None, raw=False, polling=True, **operation_config): + """Starts a virtual machine in a VM scale set. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param vm_scale_set_name: The name of the VM scale set. + :type vm_scale_set_name: str + :param instance_id: The instance ID of the virtual machine. + :type instance_id: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns OperationStatusResponse + or ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2017_03_30.models.OperationStatusResponse] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2017_03_30.models.OperationStatusResponse]] + :raises: :class:`CloudError` + """ + raw_result = self._start_initial( + resource_group_name=resource_group_name, + vm_scale_set_name=vm_scale_set_name, + instance_id=instance_id, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('OperationStatusResponse', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + start.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/virtualmachines/{instanceId}/start'} diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/operations/_virtual_machine_scale_sets_operations.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/operations/_virtual_machine_scale_sets_operations.py new file mode 100644 index 000000000000..d338c04a08e7 --- /dev/null +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/operations/_virtual_machine_scale_sets_operations.py @@ -0,0 +1,1549 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse +from msrestazure.azure_exceptions import CloudError +from msrest.polling import LROPoller, NoPolling +from msrestazure.polling.arm_polling import ARMPolling + +from .. import models + + +class VirtualMachineScaleSetsOperations(object): + """VirtualMachineScaleSetsOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: Client Api Version. Constant value: "2017-03-30". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2017-03-30" + + self.config = config + + + def _create_or_update_initial( + self, resource_group_name, vm_scale_set_name, parameters, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.create_or_update.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(parameters, 'VirtualMachineScaleSet') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 201]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('VirtualMachineScaleSet', response) + if response.status_code == 201: + deserialized = self._deserialize('VirtualMachineScaleSet', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def create_or_update( + self, resource_group_name, vm_scale_set_name, parameters, custom_headers=None, raw=False, polling=True, **operation_config): + """Create or update a VM scale set. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param vm_scale_set_name: The name of the VM scale set to create or + update. + :type vm_scale_set_name: str + :param parameters: The scale set object. + :type parameters: + ~azure.mgmt.compute.v2017_03_30.models.VirtualMachineScaleSet + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns VirtualMachineScaleSet + or ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2017_03_30.models.VirtualMachineScaleSet] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2017_03_30.models.VirtualMachineScaleSet]] + :raises: :class:`CloudError` + """ + raw_result = self._create_or_update_initial( + resource_group_name=resource_group_name, + vm_scale_set_name=vm_scale_set_name, + parameters=parameters, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('VirtualMachineScaleSet', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}'} + + + def _update_initial( + self, resource_group_name, vm_scale_set_name, parameters, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.update.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(parameters, 'VirtualMachineScaleSetUpdate') + + # Construct and send request + request = self._client.patch(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('VirtualMachineScaleSet', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def update( + self, resource_group_name, vm_scale_set_name, parameters, custom_headers=None, raw=False, polling=True, **operation_config): + """Update a VM scale set. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param vm_scale_set_name: The name of the VM scale set to create or + update. + :type vm_scale_set_name: str + :param parameters: The scale set object. + :type parameters: + ~azure.mgmt.compute.v2017_03_30.models.VirtualMachineScaleSetUpdate + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns VirtualMachineScaleSet + or ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2017_03_30.models.VirtualMachineScaleSet] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2017_03_30.models.VirtualMachineScaleSet]] + :raises: :class:`CloudError` + """ + raw_result = self._update_initial( + resource_group_name=resource_group_name, + vm_scale_set_name=vm_scale_set_name, + parameters=parameters, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('VirtualMachineScaleSet', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}'} + + + def _delete_initial( + self, resource_group_name, vm_scale_set_name, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.delete.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202, 204]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('OperationStatusResponse', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def delete( + self, resource_group_name, vm_scale_set_name, custom_headers=None, raw=False, polling=True, **operation_config): + """Deletes a VM scale set. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param vm_scale_set_name: The name of the VM scale set. + :type vm_scale_set_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns OperationStatusResponse + or ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2017_03_30.models.OperationStatusResponse] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2017_03_30.models.OperationStatusResponse]] + :raises: :class:`CloudError` + """ + raw_result = self._delete_initial( + resource_group_name=resource_group_name, + vm_scale_set_name=vm_scale_set_name, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('OperationStatusResponse', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}'} + + def get( + self, resource_group_name, vm_scale_set_name, custom_headers=None, raw=False, **operation_config): + """Display information about a virtual machine scale set. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param vm_scale_set_name: The name of the VM scale set. + :type vm_scale_set_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: VirtualMachineScaleSet or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.compute.v2017_03_30.models.VirtualMachineScaleSet + or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('VirtualMachineScaleSet', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}'} + + + def _deallocate_initial( + self, resource_group_name, vm_scale_set_name, instance_ids=None, custom_headers=None, raw=False, **operation_config): + vm_instance_ids = None + if instance_ids is not None: + vm_instance_ids = models.VirtualMachineScaleSetVMInstanceIDs(instance_ids=instance_ids) + + # Construct URL + url = self.deallocate.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + if vm_instance_ids is not None: + body_content = self._serialize.body(vm_instance_ids, 'VirtualMachineScaleSetVMInstanceIDs') + else: + body_content = None + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('OperationStatusResponse', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def deallocate( + self, resource_group_name, vm_scale_set_name, instance_ids=None, custom_headers=None, raw=False, polling=True, **operation_config): + """Deallocates specific virtual machines in a VM scale set. Shuts down the + virtual machines and releases the compute resources. You are not billed + for the compute resources that this virtual machine scale set + deallocates. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param vm_scale_set_name: The name of the VM scale set. + :type vm_scale_set_name: str + :param instance_ids: The virtual machine scale set instance ids. + Omitting the virtual machine scale set instance ids will result in the + operation being performed on all virtual machines in the virtual + machine scale set. + :type instance_ids: list[str] + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns OperationStatusResponse + or ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2017_03_30.models.OperationStatusResponse] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2017_03_30.models.OperationStatusResponse]] + :raises: :class:`CloudError` + """ + raw_result = self._deallocate_initial( + resource_group_name=resource_group_name, + vm_scale_set_name=vm_scale_set_name, + instance_ids=instance_ids, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('OperationStatusResponse', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + deallocate.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/deallocate'} + + + def _delete_instances_initial( + self, resource_group_name, vm_scale_set_name, instance_ids, custom_headers=None, raw=False, **operation_config): + vm_instance_ids = models.VirtualMachineScaleSetVMInstanceRequiredIDs(instance_ids=instance_ids) + + # Construct URL + url = self.delete_instances.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(vm_instance_ids, 'VirtualMachineScaleSetVMInstanceRequiredIDs') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('OperationStatusResponse', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def delete_instances( + self, resource_group_name, vm_scale_set_name, instance_ids, custom_headers=None, raw=False, polling=True, **operation_config): + """Deletes virtual machines in a VM scale set. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param vm_scale_set_name: The name of the VM scale set. + :type vm_scale_set_name: str + :param instance_ids: The virtual machine scale set instance ids. + :type instance_ids: list[str] + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns OperationStatusResponse + or ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2017_03_30.models.OperationStatusResponse] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2017_03_30.models.OperationStatusResponse]] + :raises: :class:`CloudError` + """ + raw_result = self._delete_instances_initial( + resource_group_name=resource_group_name, + vm_scale_set_name=vm_scale_set_name, + instance_ids=instance_ids, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('OperationStatusResponse', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + delete_instances.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/delete'} + + def get_instance_view( + self, resource_group_name, vm_scale_set_name, custom_headers=None, raw=False, **operation_config): + """Gets the status of a VM scale set instance. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param vm_scale_set_name: The name of the VM scale set. + :type vm_scale_set_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: VirtualMachineScaleSetInstanceView or ClientRawResponse if + raw=true + :rtype: + ~azure.mgmt.compute.v2017_03_30.models.VirtualMachineScaleSetInstanceView + or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get_instance_view.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('VirtualMachineScaleSetInstanceView', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_instance_view.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/instanceView'} + + def list( + self, resource_group_name, custom_headers=None, raw=False, **operation_config): + """Gets a list of all VM scale sets under a resource group. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of VirtualMachineScaleSet + :rtype: + ~azure.mgmt.compute.v2017_03_30.models.VirtualMachineScaleSetPaged[~azure.mgmt.compute.v2017_03_30.models.VirtualMachineScaleSet] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.VirtualMachineScaleSetPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets'} + + def list_all( + self, custom_headers=None, raw=False, **operation_config): + """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. + + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of VirtualMachineScaleSet + :rtype: + ~azure.mgmt.compute.v2017_03_30.models.VirtualMachineScaleSetPaged[~azure.mgmt.compute.v2017_03_30.models.VirtualMachineScaleSet] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_all.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.VirtualMachineScaleSetPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_all.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Compute/virtualMachineScaleSets'} + + def list_skus( + self, resource_group_name, vm_scale_set_name, custom_headers=None, raw=False, **operation_config): + """Gets a list of SKUs available for your VM scale set, including the + minimum and maximum VM instances allowed for each SKU. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param vm_scale_set_name: The name of the VM scale set. + :type vm_scale_set_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of VirtualMachineScaleSetSku + :rtype: + ~azure.mgmt.compute.v2017_03_30.models.VirtualMachineScaleSetSkuPaged[~azure.mgmt.compute.v2017_03_30.models.VirtualMachineScaleSetSku] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_skus.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.VirtualMachineScaleSetSkuPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_skus.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/skus'} + + + def _power_off_initial( + self, resource_group_name, vm_scale_set_name, instance_ids=None, custom_headers=None, raw=False, **operation_config): + vm_instance_ids = None + if instance_ids is not None: + vm_instance_ids = models.VirtualMachineScaleSetVMInstanceIDs(instance_ids=instance_ids) + + # Construct URL + url = self.power_off.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + if vm_instance_ids is not None: + body_content = self._serialize.body(vm_instance_ids, 'VirtualMachineScaleSetVMInstanceIDs') + else: + body_content = None + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('OperationStatusResponse', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def power_off( + self, resource_group_name, vm_scale_set_name, instance_ids=None, custom_headers=None, raw=False, polling=True, **operation_config): + """Power off (stop) one or more virtual machines in a VM scale set. Note + that resources are still attached and you are getting charged for the + resources. Instead, use deallocate to release resources and avoid + charges. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param vm_scale_set_name: The name of the VM scale set. + :type vm_scale_set_name: str + :param instance_ids: The virtual machine scale set instance ids. + Omitting the virtual machine scale set instance ids will result in the + operation being performed on all virtual machines in the virtual + machine scale set. + :type instance_ids: list[str] + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns OperationStatusResponse + or ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2017_03_30.models.OperationStatusResponse] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2017_03_30.models.OperationStatusResponse]] + :raises: :class:`CloudError` + """ + raw_result = self._power_off_initial( + resource_group_name=resource_group_name, + vm_scale_set_name=vm_scale_set_name, + instance_ids=instance_ids, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('OperationStatusResponse', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + power_off.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/poweroff'} + + + def _restart_initial( + self, resource_group_name, vm_scale_set_name, instance_ids=None, custom_headers=None, raw=False, **operation_config): + vm_instance_ids = None + if instance_ids is not None: + vm_instance_ids = models.VirtualMachineScaleSetVMInstanceIDs(instance_ids=instance_ids) + + # Construct URL + url = self.restart.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + if vm_instance_ids is not None: + body_content = self._serialize.body(vm_instance_ids, 'VirtualMachineScaleSetVMInstanceIDs') + else: + body_content = None + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('OperationStatusResponse', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def restart( + self, resource_group_name, vm_scale_set_name, instance_ids=None, custom_headers=None, raw=False, polling=True, **operation_config): + """Restarts one or more virtual machines in a VM scale set. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param vm_scale_set_name: The name of the VM scale set. + :type vm_scale_set_name: str + :param instance_ids: The virtual machine scale set instance ids. + Omitting the virtual machine scale set instance ids will result in the + operation being performed on all virtual machines in the virtual + machine scale set. + :type instance_ids: list[str] + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns OperationStatusResponse + or ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2017_03_30.models.OperationStatusResponse] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2017_03_30.models.OperationStatusResponse]] + :raises: :class:`CloudError` + """ + raw_result = self._restart_initial( + resource_group_name=resource_group_name, + vm_scale_set_name=vm_scale_set_name, + instance_ids=instance_ids, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('OperationStatusResponse', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + restart.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/restart'} + + + def _start_initial( + self, resource_group_name, vm_scale_set_name, instance_ids=None, custom_headers=None, raw=False, **operation_config): + vm_instance_ids = None + if instance_ids is not None: + vm_instance_ids = models.VirtualMachineScaleSetVMInstanceIDs(instance_ids=instance_ids) + + # Construct URL + url = self.start.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + if vm_instance_ids is not None: + body_content = self._serialize.body(vm_instance_ids, 'VirtualMachineScaleSetVMInstanceIDs') + else: + body_content = None + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('OperationStatusResponse', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def start( + self, resource_group_name, vm_scale_set_name, instance_ids=None, custom_headers=None, raw=False, polling=True, **operation_config): + """Starts one or more virtual machines in a VM scale set. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param vm_scale_set_name: The name of the VM scale set. + :type vm_scale_set_name: str + :param instance_ids: The virtual machine scale set instance ids. + Omitting the virtual machine scale set instance ids will result in the + operation being performed on all virtual machines in the virtual + machine scale set. + :type instance_ids: list[str] + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns OperationStatusResponse + or ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2017_03_30.models.OperationStatusResponse] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2017_03_30.models.OperationStatusResponse]] + :raises: :class:`CloudError` + """ + raw_result = self._start_initial( + resource_group_name=resource_group_name, + vm_scale_set_name=vm_scale_set_name, + instance_ids=instance_ids, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('OperationStatusResponse', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + start.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/start'} + + + def _update_instances_initial( + self, resource_group_name, vm_scale_set_name, instance_ids, custom_headers=None, raw=False, **operation_config): + vm_instance_ids = models.VirtualMachineScaleSetVMInstanceRequiredIDs(instance_ids=instance_ids) + + # Construct URL + url = self.update_instances.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(vm_instance_ids, 'VirtualMachineScaleSetVMInstanceRequiredIDs') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('OperationStatusResponse', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def update_instances( + self, resource_group_name, vm_scale_set_name, instance_ids, custom_headers=None, raw=False, polling=True, **operation_config): + """Upgrades one or more virtual machines to the latest SKU set in the VM + scale set model. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param vm_scale_set_name: The name of the VM scale set. + :type vm_scale_set_name: str + :param instance_ids: The virtual machine scale set instance ids. + :type instance_ids: list[str] + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns OperationStatusResponse + or ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2017_03_30.models.OperationStatusResponse] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2017_03_30.models.OperationStatusResponse]] + :raises: :class:`CloudError` + """ + raw_result = self._update_instances_initial( + resource_group_name=resource_group_name, + vm_scale_set_name=vm_scale_set_name, + instance_ids=instance_ids, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('OperationStatusResponse', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + update_instances.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/manualupgrade'} + + + def _reimage_initial( + self, resource_group_name, vm_scale_set_name, instance_ids=None, custom_headers=None, raw=False, **operation_config): + vm_instance_ids = None + if instance_ids is not None: + vm_instance_ids = models.VirtualMachineScaleSetVMInstanceIDs(instance_ids=instance_ids) + + # Construct URL + url = self.reimage.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + if vm_instance_ids is not None: + body_content = self._serialize.body(vm_instance_ids, 'VirtualMachineScaleSetVMInstanceIDs') + else: + body_content = None + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('OperationStatusResponse', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def reimage( + self, resource_group_name, vm_scale_set_name, instance_ids=None, custom_headers=None, raw=False, polling=True, **operation_config): + """Reimages (upgrade the operating system) one or more virtual machines in + a VM scale set. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param vm_scale_set_name: The name of the VM scale set. + :type vm_scale_set_name: str + :param instance_ids: The virtual machine scale set instance ids. + Omitting the virtual machine scale set instance ids will result in the + operation being performed on all virtual machines in the virtual + machine scale set. + :type instance_ids: list[str] + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns OperationStatusResponse + or ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2017_03_30.models.OperationStatusResponse] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2017_03_30.models.OperationStatusResponse]] + :raises: :class:`CloudError` + """ + raw_result = self._reimage_initial( + resource_group_name=resource_group_name, + vm_scale_set_name=vm_scale_set_name, + instance_ids=instance_ids, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('OperationStatusResponse', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + reimage.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/reimage'} + + + def _reimage_all_initial( + self, resource_group_name, vm_scale_set_name, instance_ids=None, custom_headers=None, raw=False, **operation_config): + vm_instance_ids = None + if instance_ids is not None: + vm_instance_ids = models.VirtualMachineScaleSetVMInstanceIDs(instance_ids=instance_ids) + + # Construct URL + url = self.reimage_all.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + if vm_instance_ids is not None: + body_content = self._serialize.body(vm_instance_ids, 'VirtualMachineScaleSetVMInstanceIDs') + else: + body_content = None + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('OperationStatusResponse', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def reimage_all( + self, resource_group_name, vm_scale_set_name, instance_ids=None, custom_headers=None, raw=False, polling=True, **operation_config): + """Reimages all the disks ( including data disks ) in the virtual machines + in a VM scale set. This operation is only supported for managed disks. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param vm_scale_set_name: The name of the VM scale set. + :type vm_scale_set_name: str + :param instance_ids: The virtual machine scale set instance ids. + Omitting the virtual machine scale set instance ids will result in the + operation being performed on all virtual machines in the virtual + machine scale set. + :type instance_ids: list[str] + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns OperationStatusResponse + or ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2017_03_30.models.OperationStatusResponse] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2017_03_30.models.OperationStatusResponse]] + :raises: :class:`CloudError` + """ + raw_result = self._reimage_all_initial( + resource_group_name=resource_group_name, + vm_scale_set_name=vm_scale_set_name, + instance_ids=instance_ids, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('OperationStatusResponse', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + reimage_all.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/reimageall'} diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/operations/_virtual_machine_sizes_operations.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/operations/_virtual_machine_sizes_operations.py new file mode 100644 index 000000000000..1ed9d7f7c060 --- /dev/null +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/operations/_virtual_machine_sizes_operations.py @@ -0,0 +1,111 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse +from msrestazure.azure_exceptions import CloudError + +from .. import models + + +class VirtualMachineSizesOperations(object): + """VirtualMachineSizesOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: Client Api Version. Constant value: "2017-03-30". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2017-03-30" + + self.config = config + + def list( + self, location, custom_headers=None, raw=False, **operation_config): + """Lists all available virtual machine sizes for a subscription in a + location. + + :param location: The location upon which virtual-machine-sizes is + queried. + :type location: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of VirtualMachineSize + :rtype: + ~azure.mgmt.compute.v2017_03_30.models.VirtualMachineSizePaged[~azure.mgmt.compute.v2017_03_30.models.VirtualMachineSize] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list.metadata['url'] + path_format_arguments = { + 'location': self._serialize.url("location", location, 'str', pattern=r'^[-\w\._]+$'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.VirtualMachineSizePaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/vmSizes'} diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/operations/_virtual_machines_operations.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/operations/_virtual_machines_operations.py new file mode 100644 index 000000000000..6d8bf75d4ab9 --- /dev/null +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/operations/_virtual_machines_operations.py @@ -0,0 +1,1643 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse +from msrestazure.azure_exceptions import CloudError +from msrest.polling import LROPoller, NoPolling +from msrestazure.polling.arm_polling import ARMPolling + +from .. import models + + +class VirtualMachinesOperations(object): + """VirtualMachinesOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: Client Api Version. Constant value: "2017-03-30". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2017-03-30" + + self.config = config + + def get_extensions( + self, resource_group_name, vm_name, expand=None, custom_headers=None, raw=False, **operation_config): + """The operation to get all extensions of a Virtual Machine. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param vm_name: The name of the virtual machine containing the + extension. + :type vm_name: str + :param expand: The expand expression to apply on the operation. + :type expand: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: VirtualMachineExtensionsListResult or ClientRawResponse if + raw=true + :rtype: + ~azure.mgmt.compute.v2017_03_30.models.VirtualMachineExtensionsListResult + or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get_extensions.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vmName': self._serialize.url("vm_name", vm_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + if expand is not None: + query_parameters['$expand'] = self._serialize.query("expand", expand, 'str') + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('VirtualMachineExtensionsListResult', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_extensions.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/extensions'} + + def list_by_location( + self, location, custom_headers=None, raw=False, **operation_config): + """Gets all the virtual machines under the specified subscription for the + specified location. + + :param location: The location for which virtual machines under the + subscription are queried. + :type location: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of VirtualMachine + :rtype: + ~azure.mgmt.compute.v2017_03_30.models.VirtualMachinePaged[~azure.mgmt.compute.v2017_03_30.models.VirtualMachine] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_by_location.metadata['url'] + path_format_arguments = { + 'location': self._serialize.url("location", location, 'str', pattern=r'^[-\w\._]+$'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.VirtualMachinePaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_by_location.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/virtualMachines'} + + + def _capture_initial( + self, resource_group_name, vm_name, parameters, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.capture.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vmName': self._serialize.url("vm_name", vm_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(parameters, 'VirtualMachineCaptureParameters') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('VirtualMachineCaptureResult', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def capture( + self, resource_group_name, vm_name, parameters, custom_headers=None, raw=False, polling=True, **operation_config): + """Captures the VM by copying virtual hard disks of the VM and outputs a + template that can be used to create similar VMs. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param vm_name: The name of the virtual machine. + :type vm_name: str + :param parameters: Parameters supplied to the Capture Virtual Machine + operation. + :type parameters: + ~azure.mgmt.compute.v2017_03_30.models.VirtualMachineCaptureParameters + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns + VirtualMachineCaptureResult or + ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2017_03_30.models.VirtualMachineCaptureResult] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2017_03_30.models.VirtualMachineCaptureResult]] + :raises: :class:`CloudError` + """ + raw_result = self._capture_initial( + resource_group_name=resource_group_name, + vm_name=vm_name, + parameters=parameters, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('VirtualMachineCaptureResult', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + capture.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/capture'} + + + def _create_or_update_initial( + self, resource_group_name, vm_name, parameters, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.create_or_update.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vmName': self._serialize.url("vm_name", vm_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(parameters, 'VirtualMachine') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 201]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('VirtualMachine', response) + if response.status_code == 201: + deserialized = self._deserialize('VirtualMachine', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def create_or_update( + self, resource_group_name, vm_name, parameters, custom_headers=None, raw=False, polling=True, **operation_config): + """The operation to create or update a virtual machine. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param vm_name: The name of the virtual machine. + :type vm_name: str + :param parameters: Parameters supplied to the Create Virtual Machine + operation. + :type parameters: + ~azure.mgmt.compute.v2017_03_30.models.VirtualMachine + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns VirtualMachine or + ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2017_03_30.models.VirtualMachine] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2017_03_30.models.VirtualMachine]] + :raises: :class:`CloudError` + """ + raw_result = self._create_or_update_initial( + resource_group_name=resource_group_name, + vm_name=vm_name, + parameters=parameters, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('VirtualMachine', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}'} + + + def _delete_initial( + self, resource_group_name, vm_name, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.delete.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vmName': self._serialize.url("vm_name", vm_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202, 204]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('OperationStatusResponse', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def delete( + self, resource_group_name, vm_name, custom_headers=None, raw=False, polling=True, **operation_config): + """The operation to delete a virtual machine. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param vm_name: The name of the virtual machine. + :type vm_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns OperationStatusResponse + or ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2017_03_30.models.OperationStatusResponse] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2017_03_30.models.OperationStatusResponse]] + :raises: :class:`CloudError` + """ + raw_result = self._delete_initial( + resource_group_name=resource_group_name, + vm_name=vm_name, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('OperationStatusResponse', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}'} + + def get( + self, resource_group_name, vm_name, expand=None, custom_headers=None, raw=False, **operation_config): + """Retrieves information about the model view or the instance view of a + virtual machine. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param vm_name: The name of the virtual machine. + :type vm_name: str + :param expand: The expand expression to apply on the operation. + Possible values include: 'instanceView' + :type expand: str or + ~azure.mgmt.compute.v2017_03_30.models.InstanceViewTypes + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: VirtualMachine or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.compute.v2017_03_30.models.VirtualMachine or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vmName': self._serialize.url("vm_name", vm_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + if expand is not None: + query_parameters['$expand'] = self._serialize.query("expand", expand, 'InstanceViewTypes') + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('VirtualMachine', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}'} + + def instance_view( + self, resource_group_name, vm_name, custom_headers=None, raw=False, **operation_config): + """Retrieves information about the run-time state of a virtual machine. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param vm_name: The name of the virtual machine. + :type vm_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: VirtualMachineInstanceView or ClientRawResponse if raw=true + :rtype: + ~azure.mgmt.compute.v2017_03_30.models.VirtualMachineInstanceView or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.instance_view.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vmName': self._serialize.url("vm_name", vm_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('VirtualMachineInstanceView', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + instance_view.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/instanceView'} + + + def _convert_to_managed_disks_initial( + self, resource_group_name, vm_name, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.convert_to_managed_disks.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vmName': self._serialize.url("vm_name", vm_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('OperationStatusResponse', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def convert_to_managed_disks( + self, resource_group_name, vm_name, custom_headers=None, raw=False, polling=True, **operation_config): + """Converts virtual machine disks from blob-based to managed disks. + Virtual machine must be stop-deallocated before invoking this + operation. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param vm_name: The name of the virtual machine. + :type vm_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns OperationStatusResponse + or ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2017_03_30.models.OperationStatusResponse] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2017_03_30.models.OperationStatusResponse]] + :raises: :class:`CloudError` + """ + raw_result = self._convert_to_managed_disks_initial( + resource_group_name=resource_group_name, + vm_name=vm_name, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('OperationStatusResponse', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + convert_to_managed_disks.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/convertToManagedDisks'} + + + def _deallocate_initial( + self, resource_group_name, vm_name, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.deallocate.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vmName': self._serialize.url("vm_name", vm_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('OperationStatusResponse', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def deallocate( + self, resource_group_name, vm_name, custom_headers=None, raw=False, polling=True, **operation_config): + """Shuts down the virtual machine and releases the compute resources. You + are not billed for the compute resources that this virtual machine + uses. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param vm_name: The name of the virtual machine. + :type vm_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns OperationStatusResponse + or ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2017_03_30.models.OperationStatusResponse] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2017_03_30.models.OperationStatusResponse]] + :raises: :class:`CloudError` + """ + raw_result = self._deallocate_initial( + resource_group_name=resource_group_name, + vm_name=vm_name, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('OperationStatusResponse', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + deallocate.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/deallocate'} + + def generalize( + self, resource_group_name, vm_name, custom_headers=None, raw=False, **operation_config): + """Sets the state of the virtual machine to generalized. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param vm_name: The name of the virtual machine. + :type vm_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: OperationStatusResponse or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.compute.v2017_03_30.models.OperationStatusResponse + or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.generalize.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vmName': self._serialize.url("vm_name", vm_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('OperationStatusResponse', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + generalize.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/generalize'} + + def list( + self, resource_group_name, custom_headers=None, raw=False, **operation_config): + """Lists all of the virtual machines in the specified resource group. Use + the nextLink property in the response to get the next page of virtual + machines. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of VirtualMachine + :rtype: + ~azure.mgmt.compute.v2017_03_30.models.VirtualMachinePaged[~azure.mgmt.compute.v2017_03_30.models.VirtualMachine] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.VirtualMachinePaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines'} + + def list_all( + self, custom_headers=None, raw=False, **operation_config): + """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. + + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of VirtualMachine + :rtype: + ~azure.mgmt.compute.v2017_03_30.models.VirtualMachinePaged[~azure.mgmt.compute.v2017_03_30.models.VirtualMachine] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_all.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.VirtualMachinePaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_all.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Compute/virtualMachines'} + + def list_available_sizes( + self, resource_group_name, vm_name, custom_headers=None, raw=False, **operation_config): + """Lists all available virtual machine sizes to which the specified + virtual machine can be resized. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param vm_name: The name of the virtual machine. + :type vm_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of VirtualMachineSize + :rtype: + ~azure.mgmt.compute.v2017_03_30.models.VirtualMachineSizePaged[~azure.mgmt.compute.v2017_03_30.models.VirtualMachineSize] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_available_sizes.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vmName': self._serialize.url("vm_name", vm_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.VirtualMachineSizePaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_available_sizes.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/vmSizes'} + + + def _power_off_initial( + self, resource_group_name, vm_name, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.power_off.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vmName': self._serialize.url("vm_name", vm_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('OperationStatusResponse', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def power_off( + self, resource_group_name, vm_name, custom_headers=None, raw=False, polling=True, **operation_config): + """The operation to power off (stop) a virtual machine. The virtual + machine can be restarted with the same provisioned resources. You are + still charged for this virtual machine. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param vm_name: The name of the virtual machine. + :type vm_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns OperationStatusResponse + or ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2017_03_30.models.OperationStatusResponse] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2017_03_30.models.OperationStatusResponse]] + :raises: :class:`CloudError` + """ + raw_result = self._power_off_initial( + resource_group_name=resource_group_name, + vm_name=vm_name, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('OperationStatusResponse', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + power_off.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/powerOff'} + + + def _restart_initial( + self, resource_group_name, vm_name, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.restart.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vmName': self._serialize.url("vm_name", vm_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('OperationStatusResponse', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def restart( + self, resource_group_name, vm_name, custom_headers=None, raw=False, polling=True, **operation_config): + """The operation to restart a virtual machine. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param vm_name: The name of the virtual machine. + :type vm_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns OperationStatusResponse + or ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2017_03_30.models.OperationStatusResponse] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2017_03_30.models.OperationStatusResponse]] + :raises: :class:`CloudError` + """ + raw_result = self._restart_initial( + resource_group_name=resource_group_name, + vm_name=vm_name, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('OperationStatusResponse', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + restart.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/restart'} + + + def _start_initial( + self, resource_group_name, vm_name, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.start.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vmName': self._serialize.url("vm_name", vm_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('OperationStatusResponse', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def start( + self, resource_group_name, vm_name, custom_headers=None, raw=False, polling=True, **operation_config): + """The operation to start a virtual machine. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param vm_name: The name of the virtual machine. + :type vm_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns OperationStatusResponse + or ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2017_03_30.models.OperationStatusResponse] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2017_03_30.models.OperationStatusResponse]] + :raises: :class:`CloudError` + """ + raw_result = self._start_initial( + resource_group_name=resource_group_name, + vm_name=vm_name, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('OperationStatusResponse', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + start.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/start'} + + + def _redeploy_initial( + self, resource_group_name, vm_name, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.redeploy.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vmName': self._serialize.url("vm_name", vm_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('OperationStatusResponse', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def redeploy( + self, resource_group_name, vm_name, custom_headers=None, raw=False, polling=True, **operation_config): + """The operation to redeploy a virtual machine. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param vm_name: The name of the virtual machine. + :type vm_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns OperationStatusResponse + or ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2017_03_30.models.OperationStatusResponse] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2017_03_30.models.OperationStatusResponse]] + :raises: :class:`CloudError` + """ + raw_result = self._redeploy_initial( + resource_group_name=resource_group_name, + vm_name=vm_name, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('OperationStatusResponse', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + redeploy.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/redeploy'} + + + def _perform_maintenance_initial( + self, resource_group_name, vm_name, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.perform_maintenance.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vmName': self._serialize.url("vm_name", vm_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('OperationStatusResponse', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def perform_maintenance( + self, resource_group_name, vm_name, custom_headers=None, raw=False, polling=True, **operation_config): + """The operation to perform maintenance on a virtual machine. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param vm_name: The name of the virtual machine. + :type vm_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns OperationStatusResponse + or ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2017_03_30.models.OperationStatusResponse] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2017_03_30.models.OperationStatusResponse]] + :raises: :class:`CloudError` + """ + raw_result = self._perform_maintenance_initial( + resource_group_name=resource_group_name, + vm_name=vm_name, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('OperationStatusResponse', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + perform_maintenance.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/performMaintenance'} + + + def _run_command_initial( + self, resource_group_name, vm_name, parameters, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.run_command.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vmName': self._serialize.url("vm_name", vm_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(parameters, 'RunCommandInput') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('RunCommandResult', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def run_command( + self, resource_group_name, vm_name, parameters, custom_headers=None, raw=False, polling=True, **operation_config): + """Run command on the VM. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param vm_name: The name of the virtual machine. + :type vm_name: str + :param parameters: Parameters supplied to the Run command operation. + :type parameters: + ~azure.mgmt.compute.v2017_03_30.models.RunCommandInput + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns RunCommandResult or + ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2017_03_30.models.RunCommandResult] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2017_03_30.models.RunCommandResult]] + :raises: :class:`CloudError` + """ + raw_result = self._run_command_initial( + resource_group_name=resource_group_name, + vm_name=vm_name, + parameters=parameters, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('RunCommandResult', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + run_command.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/runCommand'} diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/operations/availability_sets_operations.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/operations/availability_sets_operations.py deleted file mode 100644 index 9daf031a7176..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/operations/availability_sets_operations.py +++ /dev/null @@ -1,434 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError - -from .. import models - - -class AvailabilitySetsOperations(object): - """AvailabilitySetsOperations operations. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: Client Api Version. Constant value: "2017-03-30". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2017-03-30" - - self.config = config - - def create_or_update( - self, resource_group_name, availability_set_name, parameters, custom_headers=None, raw=False, **operation_config): - """Create or update an availability set. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param availability_set_name: The name of the availability set. - :type availability_set_name: str - :param parameters: Parameters supplied to the Create Availability Set - operation. - :type parameters: - ~azure.mgmt.compute.v2017_03_30.models.AvailabilitySet - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: AvailabilitySet or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.compute.v2017_03_30.models.AvailabilitySet or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.create_or_update.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'availabilitySetName': self._serialize.url("availability_set_name", availability_set_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(parameters, 'AvailabilitySet') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('AvailabilitySet', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}'} - - def delete( - self, resource_group_name, availability_set_name, custom_headers=None, raw=False, **operation_config): - """Delete an availability set. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param availability_set_name: The name of the availability set. - :type availability_set_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: OperationStatusResponse or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.compute.v2017_03_30.models.OperationStatusResponse - or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.delete.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'availabilitySetName': self._serialize.url("availability_set_name", availability_set_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 204]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('OperationStatusResponse', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}'} - - def get( - self, resource_group_name, availability_set_name, custom_headers=None, raw=False, **operation_config): - """Retrieves information about an availability set. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param availability_set_name: The name of the availability set. - :type availability_set_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: AvailabilitySet or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.compute.v2017_03_30.models.AvailabilitySet or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'availabilitySetName': self._serialize.url("availability_set_name", availability_set_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('AvailabilitySet', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}'} - - def list_by_subscription( - self, custom_headers=None, raw=False, **operation_config): - """Lists all availability sets in a subscription. - - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of AvailabilitySet - :rtype: - ~azure.mgmt.compute.v2017_03_30.models.AvailabilitySetPaged[~azure.mgmt.compute.v2017_03_30.models.AvailabilitySet] - :raises: :class:`CloudError` - """ - def internal_paging(next_link=None, raw=False): - - if not next_link: - # Construct URL - url = self.list_by_subscription.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - deserialized = models.AvailabilitySetPaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.AvailabilitySetPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - list_by_subscription.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Compute/availabilitySets'} - - def list( - self, resource_group_name, custom_headers=None, raw=False, **operation_config): - """Lists all availability sets in a resource group. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of AvailabilitySet - :rtype: - ~azure.mgmt.compute.v2017_03_30.models.AvailabilitySetPaged[~azure.mgmt.compute.v2017_03_30.models.AvailabilitySet] - :raises: :class:`CloudError` - """ - def internal_paging(next_link=None, raw=False): - - if not next_link: - # Construct URL - url = self.list.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - deserialized = models.AvailabilitySetPaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.AvailabilitySetPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets'} - - def list_available_sizes( - self, resource_group_name, availability_set_name, custom_headers=None, raw=False, **operation_config): - """Lists all available virtual machine sizes that can be used to create a - new virtual machine in an existing availability set. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param availability_set_name: The name of the availability set. - :type availability_set_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of VirtualMachineSize - :rtype: - ~azure.mgmt.compute.v2017_03_30.models.VirtualMachineSizePaged[~azure.mgmt.compute.v2017_03_30.models.VirtualMachineSize] - :raises: :class:`CloudError` - """ - def internal_paging(next_link=None, raw=False): - - if not next_link: - # Construct URL - url = self.list_available_sizes.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'availabilitySetName': self._serialize.url("availability_set_name", availability_set_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - deserialized = models.VirtualMachineSizePaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.VirtualMachineSizePaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - list_available_sizes.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}/vmSizes'} diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/operations/disks_operations.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/operations/disks_operations.py deleted file mode 100644 index b08fbfae4857..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/operations/disks_operations.py +++ /dev/null @@ -1,750 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError -from msrest.polling import LROPoller, NoPolling -from msrestazure.polling.arm_polling import ARMPolling - -from .. import models - - -class DisksOperations(object): - """DisksOperations operations. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: Client Api Version. Constant value: "2017-03-30". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2017-03-30" - - self.config = config - - - def _create_or_update_initial( - self, resource_group_name, disk_name, disk, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.create_or_update.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'diskName': self._serialize.url("disk_name", disk_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(disk, 'Disk') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('Disk', response) - if response.status_code == 202: - deserialized = self._deserialize('Disk', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def create_or_update( - self, resource_group_name, disk_name, disk, custom_headers=None, raw=False, polling=True, **operation_config): - """Creates or updates a disk. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param disk_name: The name of the managed disk that is being created. - The name can't be changed after the disk is created. Supported - characters for the name are a-z, A-Z, 0-9 and _. The maximum name - length is 80 characters. - :type disk_name: str - :param disk: Disk object supplied in the body of the Put disk - operation. - :type disk: ~azure.mgmt.compute.v2017_03_30.models.Disk - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns Disk or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2017_03_30.models.Disk] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2017_03_30.models.Disk]] - :raises: :class:`CloudError` - """ - raw_result = self._create_or_update_initial( - resource_group_name=resource_group_name, - disk_name=disk_name, - disk=disk, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('Disk', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/disks/{diskName}'} - - - def _update_initial( - self, resource_group_name, disk_name, disk, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.update.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'diskName': self._serialize.url("disk_name", disk_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(disk, 'DiskUpdate') - - # Construct and send request - request = self._client.patch(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('Disk', response) - if response.status_code == 202: - deserialized = self._deserialize('Disk', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def update( - self, resource_group_name, disk_name, disk, custom_headers=None, raw=False, polling=True, **operation_config): - """Updates (patches) a disk. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param disk_name: The name of the managed disk that is being created. - The name can't be changed after the disk is created. Supported - characters for the name are a-z, A-Z, 0-9 and _. The maximum name - length is 80 characters. - :type disk_name: str - :param disk: Disk object supplied in the body of the Patch disk - operation. - :type disk: ~azure.mgmt.compute.v2017_03_30.models.DiskUpdate - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns Disk or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2017_03_30.models.Disk] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2017_03_30.models.Disk]] - :raises: :class:`CloudError` - """ - raw_result = self._update_initial( - resource_group_name=resource_group_name, - disk_name=disk_name, - disk=disk, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('Disk', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/disks/{diskName}'} - - def get( - self, resource_group_name, disk_name, custom_headers=None, raw=False, **operation_config): - """Gets information about a disk. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param disk_name: The name of the managed disk that is being created. - The name can't be changed after the disk is created. Supported - characters for the name are a-z, A-Z, 0-9 and _. The maximum name - length is 80 characters. - :type disk_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: Disk or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.compute.v2017_03_30.models.Disk or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'diskName': self._serialize.url("disk_name", disk_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('Disk', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/disks/{diskName}'} - - - def _delete_initial( - self, resource_group_name, disk_name, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.delete.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'diskName': self._serialize.url("disk_name", disk_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202, 204]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('OperationStatusResponse', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def delete( - self, resource_group_name, disk_name, custom_headers=None, raw=False, polling=True, **operation_config): - """Deletes a disk. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param disk_name: The name of the managed disk that is being created. - The name can't be changed after the disk is created. Supported - characters for the name are a-z, A-Z, 0-9 and _. The maximum name - length is 80 characters. - :type disk_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns OperationStatusResponse - or ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2017_03_30.models.OperationStatusResponse] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2017_03_30.models.OperationStatusResponse]] - :raises: :class:`CloudError` - """ - raw_result = self._delete_initial( - resource_group_name=resource_group_name, - disk_name=disk_name, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('OperationStatusResponse', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/disks/{diskName}'} - - def list_by_resource_group( - self, resource_group_name, custom_headers=None, raw=False, **operation_config): - """Lists all the disks under a resource group. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of Disk - :rtype: - ~azure.mgmt.compute.v2017_03_30.models.DiskPaged[~azure.mgmt.compute.v2017_03_30.models.Disk] - :raises: :class:`CloudError` - """ - def internal_paging(next_link=None, raw=False): - - if not next_link: - # Construct URL - url = self.list_by_resource_group.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - deserialized = models.DiskPaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.DiskPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/disks'} - - def list( - self, custom_headers=None, raw=False, **operation_config): - """Lists all the disks under a subscription. - - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of Disk - :rtype: - ~azure.mgmt.compute.v2017_03_30.models.DiskPaged[~azure.mgmt.compute.v2017_03_30.models.Disk] - :raises: :class:`CloudError` - """ - def internal_paging(next_link=None, raw=False): - - if not next_link: - # Construct URL - url = self.list.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - deserialized = models.DiskPaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.DiskPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Compute/disks'} - - - def _grant_access_initial( - self, resource_group_name, disk_name, access, duration_in_seconds, custom_headers=None, raw=False, **operation_config): - grant_access_data = models.GrantAccessData(access=access, duration_in_seconds=duration_in_seconds) - - # Construct URL - url = self.grant_access.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'diskName': self._serialize.url("disk_name", disk_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(grant_access_data, 'GrantAccessData') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('AccessUri', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def grant_access( - self, resource_group_name, disk_name, access, duration_in_seconds, custom_headers=None, raw=False, polling=True, **operation_config): - """Grants access to a disk. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param disk_name: The name of the managed disk that is being created. - The name can't be changed after the disk is created. Supported - characters for the name are a-z, A-Z, 0-9 and _. The maximum name - length is 80 characters. - :type disk_name: str - :param access: Possible values include: 'None', 'Read' - :type access: str or - ~azure.mgmt.compute.v2017_03_30.models.AccessLevel - :param duration_in_seconds: Time duration in seconds until the SAS - access expires. - :type duration_in_seconds: int - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns AccessUri or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2017_03_30.models.AccessUri] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2017_03_30.models.AccessUri]] - :raises: :class:`CloudError` - """ - raw_result = self._grant_access_initial( - resource_group_name=resource_group_name, - disk_name=disk_name, - access=access, - duration_in_seconds=duration_in_seconds, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('AccessUri', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - grant_access.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/disks/{diskName}/beginGetAccess'} - - - def _revoke_access_initial( - self, resource_group_name, disk_name, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.revoke_access.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'diskName': self._serialize.url("disk_name", disk_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('OperationStatusResponse', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def revoke_access( - self, resource_group_name, disk_name, custom_headers=None, raw=False, polling=True, **operation_config): - """Revokes access to a disk. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param disk_name: The name of the managed disk that is being created. - The name can't be changed after the disk is created. Supported - characters for the name are a-z, A-Z, 0-9 and _. The maximum name - length is 80 characters. - :type disk_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns OperationStatusResponse - or ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2017_03_30.models.OperationStatusResponse] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2017_03_30.models.OperationStatusResponse]] - :raises: :class:`CloudError` - """ - raw_result = self._revoke_access_initial( - resource_group_name=resource_group_name, - disk_name=disk_name, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('OperationStatusResponse', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - revoke_access.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/disks/{diskName}/endGetAccess'} diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/operations/images_operations.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/operations/images_operations.py deleted file mode 100644 index 2fe70ded6261..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/operations/images_operations.py +++ /dev/null @@ -1,434 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError -from msrest.polling import LROPoller, NoPolling -from msrestazure.polling.arm_polling import ARMPolling - -from .. import models - - -class ImagesOperations(object): - """ImagesOperations operations. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: Client Api Version. Constant value: "2017-03-30". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2017-03-30" - - self.config = config - - - def _create_or_update_initial( - self, resource_group_name, image_name, parameters, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.create_or_update.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'imageName': self._serialize.url("image_name", image_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(parameters, 'Image') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 201]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('Image', response) - if response.status_code == 201: - deserialized = self._deserialize('Image', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def create_or_update( - self, resource_group_name, image_name, parameters, custom_headers=None, raw=False, polling=True, **operation_config): - """Create or update an image. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param image_name: The name of the image. - :type image_name: str - :param parameters: Parameters supplied to the Create Image operation. - :type parameters: ~azure.mgmt.compute.v2017_03_30.models.Image - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns Image or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2017_03_30.models.Image] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2017_03_30.models.Image]] - :raises: :class:`CloudError` - """ - raw_result = self._create_or_update_initial( - resource_group_name=resource_group_name, - image_name=image_name, - parameters=parameters, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('Image', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/images/{imageName}'} - - - def _delete_initial( - self, resource_group_name, image_name, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.delete.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'imageName': self._serialize.url("image_name", image_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202, 204]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('OperationStatusResponse', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def delete( - self, resource_group_name, image_name, custom_headers=None, raw=False, polling=True, **operation_config): - """Deletes an Image. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param image_name: The name of the image. - :type image_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns OperationStatusResponse - or ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2017_03_30.models.OperationStatusResponse] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2017_03_30.models.OperationStatusResponse]] - :raises: :class:`CloudError` - """ - raw_result = self._delete_initial( - resource_group_name=resource_group_name, - image_name=image_name, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('OperationStatusResponse', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/images/{imageName}'} - - def get( - self, resource_group_name, image_name, expand=None, custom_headers=None, raw=False, **operation_config): - """Gets an image. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param image_name: The name of the image. - :type image_name: str - :param expand: The expand expression to apply on the operation. - :type expand: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: Image or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.compute.v2017_03_30.models.Image or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'imageName': self._serialize.url("image_name", image_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - if expand is not None: - query_parameters['$expand'] = self._serialize.query("expand", expand, 'str') - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('Image', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/images/{imageName}'} - - def list_by_resource_group( - self, resource_group_name, custom_headers=None, raw=False, **operation_config): - """Gets the list of images under a resource group. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of Image - :rtype: - ~azure.mgmt.compute.v2017_03_30.models.ImagePaged[~azure.mgmt.compute.v2017_03_30.models.Image] - :raises: :class:`CloudError` - """ - def internal_paging(next_link=None, raw=False): - - if not next_link: - # Construct URL - url = self.list_by_resource_group.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - deserialized = models.ImagePaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.ImagePaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/images'} - - def list( - self, custom_headers=None, raw=False, **operation_config): - """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. - - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of Image - :rtype: - ~azure.mgmt.compute.v2017_03_30.models.ImagePaged[~azure.mgmt.compute.v2017_03_30.models.Image] - :raises: :class:`CloudError` - """ - def internal_paging(next_link=None, raw=False): - - if not next_link: - # Construct URL - url = self.list.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - deserialized = models.ImagePaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.ImagePaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Compute/images'} diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/operations/resource_skus_operations.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/operations/resource_skus_operations.py deleted file mode 100644 index b80d9d58c5fc..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/operations/resource_skus_operations.py +++ /dev/null @@ -1,103 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError - -from .. import models - - -class ResourceSkusOperations(object): - """ResourceSkusOperations operations. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: Client Api Version. Constant value: "2017-03-30". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2017-03-30" - - self.config = config - - def list( - self, custom_headers=None, raw=False, **operation_config): - """Gets the list of Microsoft.Compute SKUs available for your - Subscription. - - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of ResourceSku - :rtype: - ~azure.mgmt.compute.v2017_03_30.models.ResourceSkuPaged[~azure.mgmt.compute.v2017_03_30.models.ResourceSku] - :raises: :class:`CloudError` - """ - def internal_paging(next_link=None, raw=False): - - if not next_link: - # Construct URL - url = self.list.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - deserialized = models.ResourceSkuPaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.ResourceSkuPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Compute/skus'} diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/operations/snapshots_operations.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/operations/snapshots_operations.py deleted file mode 100644 index 8376dd00a438..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/operations/snapshots_operations.py +++ /dev/null @@ -1,750 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError -from msrest.polling import LROPoller, NoPolling -from msrestazure.polling.arm_polling import ARMPolling - -from .. import models - - -class SnapshotsOperations(object): - """SnapshotsOperations operations. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: Client Api Version. Constant value: "2017-03-30". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2017-03-30" - - self.config = config - - - def _create_or_update_initial( - self, resource_group_name, snapshot_name, snapshot, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.create_or_update.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'snapshotName': self._serialize.url("snapshot_name", snapshot_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(snapshot, 'Snapshot') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('Snapshot', response) - if response.status_code == 202: - deserialized = self._deserialize('Snapshot', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def create_or_update( - self, resource_group_name, snapshot_name, snapshot, custom_headers=None, raw=False, polling=True, **operation_config): - """Creates or updates a snapshot. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param snapshot_name: The name of the snapshot that is being created. - The name can't be changed after the snapshot is created. Supported - characters for the name are a-z, A-Z, 0-9 and _. The max name length - is 80 characters. - :type snapshot_name: str - :param snapshot: Snapshot object supplied in the body of the Put disk - operation. - :type snapshot: ~azure.mgmt.compute.v2017_03_30.models.Snapshot - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns Snapshot or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2017_03_30.models.Snapshot] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2017_03_30.models.Snapshot]] - :raises: :class:`CloudError` - """ - raw_result = self._create_or_update_initial( - resource_group_name=resource_group_name, - snapshot_name=snapshot_name, - snapshot=snapshot, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('Snapshot', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/snapshots/{snapshotName}'} - - - def _update_initial( - self, resource_group_name, snapshot_name, snapshot, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.update.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'snapshotName': self._serialize.url("snapshot_name", snapshot_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(snapshot, 'SnapshotUpdate') - - # Construct and send request - request = self._client.patch(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('Snapshot', response) - if response.status_code == 202: - deserialized = self._deserialize('Snapshot', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def update( - self, resource_group_name, snapshot_name, snapshot, custom_headers=None, raw=False, polling=True, **operation_config): - """Updates (patches) a snapshot. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param snapshot_name: The name of the snapshot that is being created. - The name can't be changed after the snapshot is created. Supported - characters for the name are a-z, A-Z, 0-9 and _. The max name length - is 80 characters. - :type snapshot_name: str - :param snapshot: Snapshot object supplied in the body of the Patch - snapshot operation. - :type snapshot: ~azure.mgmt.compute.v2017_03_30.models.SnapshotUpdate - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns Snapshot or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2017_03_30.models.Snapshot] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2017_03_30.models.Snapshot]] - :raises: :class:`CloudError` - """ - raw_result = self._update_initial( - resource_group_name=resource_group_name, - snapshot_name=snapshot_name, - snapshot=snapshot, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('Snapshot', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/snapshots/{snapshotName}'} - - def get( - self, resource_group_name, snapshot_name, custom_headers=None, raw=False, **operation_config): - """Gets information about a snapshot. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param snapshot_name: The name of the snapshot that is being created. - The name can't be changed after the snapshot is created. Supported - characters for the name are a-z, A-Z, 0-9 and _. The max name length - is 80 characters. - :type snapshot_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: Snapshot or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.compute.v2017_03_30.models.Snapshot or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'snapshotName': self._serialize.url("snapshot_name", snapshot_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('Snapshot', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/snapshots/{snapshotName}'} - - - def _delete_initial( - self, resource_group_name, snapshot_name, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.delete.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'snapshotName': self._serialize.url("snapshot_name", snapshot_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202, 204]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('OperationStatusResponse', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def delete( - self, resource_group_name, snapshot_name, custom_headers=None, raw=False, polling=True, **operation_config): - """Deletes a snapshot. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param snapshot_name: The name of the snapshot that is being created. - The name can't be changed after the snapshot is created. Supported - characters for the name are a-z, A-Z, 0-9 and _. The max name length - is 80 characters. - :type snapshot_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns OperationStatusResponse - or ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2017_03_30.models.OperationStatusResponse] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2017_03_30.models.OperationStatusResponse]] - :raises: :class:`CloudError` - """ - raw_result = self._delete_initial( - resource_group_name=resource_group_name, - snapshot_name=snapshot_name, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('OperationStatusResponse', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/snapshots/{snapshotName}'} - - def list_by_resource_group( - self, resource_group_name, custom_headers=None, raw=False, **operation_config): - """Lists snapshots under a resource group. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of Snapshot - :rtype: - ~azure.mgmt.compute.v2017_03_30.models.SnapshotPaged[~azure.mgmt.compute.v2017_03_30.models.Snapshot] - :raises: :class:`CloudError` - """ - def internal_paging(next_link=None, raw=False): - - if not next_link: - # Construct URL - url = self.list_by_resource_group.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - deserialized = models.SnapshotPaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.SnapshotPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/snapshots'} - - def list( - self, custom_headers=None, raw=False, **operation_config): - """Lists snapshots under a subscription. - - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of Snapshot - :rtype: - ~azure.mgmt.compute.v2017_03_30.models.SnapshotPaged[~azure.mgmt.compute.v2017_03_30.models.Snapshot] - :raises: :class:`CloudError` - """ - def internal_paging(next_link=None, raw=False): - - if not next_link: - # Construct URL - url = self.list.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - deserialized = models.SnapshotPaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.SnapshotPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Compute/snapshots'} - - - def _grant_access_initial( - self, resource_group_name, snapshot_name, access, duration_in_seconds, custom_headers=None, raw=False, **operation_config): - grant_access_data = models.GrantAccessData(access=access, duration_in_seconds=duration_in_seconds) - - # Construct URL - url = self.grant_access.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'snapshotName': self._serialize.url("snapshot_name", snapshot_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(grant_access_data, 'GrantAccessData') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('AccessUri', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def grant_access( - self, resource_group_name, snapshot_name, access, duration_in_seconds, custom_headers=None, raw=False, polling=True, **operation_config): - """Grants access to a snapshot. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param snapshot_name: The name of the snapshot that is being created. - The name can't be changed after the snapshot is created. Supported - characters for the name are a-z, A-Z, 0-9 and _. The max name length - is 80 characters. - :type snapshot_name: str - :param access: Possible values include: 'None', 'Read' - :type access: str or - ~azure.mgmt.compute.v2017_03_30.models.AccessLevel - :param duration_in_seconds: Time duration in seconds until the SAS - access expires. - :type duration_in_seconds: int - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns AccessUri or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2017_03_30.models.AccessUri] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2017_03_30.models.AccessUri]] - :raises: :class:`CloudError` - """ - raw_result = self._grant_access_initial( - resource_group_name=resource_group_name, - snapshot_name=snapshot_name, - access=access, - duration_in_seconds=duration_in_seconds, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('AccessUri', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - grant_access.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/snapshots/{snapshotName}/beginGetAccess'} - - - def _revoke_access_initial( - self, resource_group_name, snapshot_name, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.revoke_access.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'snapshotName': self._serialize.url("snapshot_name", snapshot_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('OperationStatusResponse', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def revoke_access( - self, resource_group_name, snapshot_name, custom_headers=None, raw=False, polling=True, **operation_config): - """Revokes access to a snapshot. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param snapshot_name: The name of the snapshot that is being created. - The name can't be changed after the snapshot is created. Supported - characters for the name are a-z, A-Z, 0-9 and _. The max name length - is 80 characters. - :type snapshot_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns OperationStatusResponse - or ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2017_03_30.models.OperationStatusResponse] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2017_03_30.models.OperationStatusResponse]] - :raises: :class:`CloudError` - """ - raw_result = self._revoke_access_initial( - resource_group_name=resource_group_name, - snapshot_name=snapshot_name, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('OperationStatusResponse', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - revoke_access.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/snapshots/{snapshotName}/endGetAccess'} diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/operations/usage_operations.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/operations/usage_operations.py deleted file mode 100644 index 29cc76c0123e..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/operations/usage_operations.py +++ /dev/null @@ -1,107 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError - -from .. import models - - -class UsageOperations(object): - """UsageOperations operations. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: Client Api Version. Constant value: "2017-03-30". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2017-03-30" - - self.config = config - - def list( - self, location, custom_headers=None, raw=False, **operation_config): - """Gets, for the specified location, the current compute resource usage - information as well as the limits for compute resources under the - subscription. - - :param location: The location for which resource usage is queried. - :type location: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of Usage - :rtype: - ~azure.mgmt.compute.v2017_03_30.models.UsagePaged[~azure.mgmt.compute.v2017_03_30.models.Usage] - :raises: :class:`CloudError` - """ - def internal_paging(next_link=None, raw=False): - - if not next_link: - # Construct URL - url = self.list.metadata['url'] - path_format_arguments = { - 'location': self._serialize.url("location", location, 'str', pattern=r'^[-\w\._]+$'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - deserialized = models.UsagePaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.UsagePaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/usages'} diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/operations/virtual_machine_extension_images_operations.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/operations/virtual_machine_extension_images_operations.py deleted file mode 100644 index 4ef7026c08f6..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/operations/virtual_machine_extension_images_operations.py +++ /dev/null @@ -1,248 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError - -from .. import models - - -class VirtualMachineExtensionImagesOperations(object): - """VirtualMachineExtensionImagesOperations operations. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: Client Api Version. Constant value: "2017-03-30". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2017-03-30" - - self.config = config - - def get( - self, location, publisher_name, type, version, custom_headers=None, raw=False, **operation_config): - """Gets a virtual machine extension image. - - :param location: The name of a supported Azure region. - :type location: str - :param publisher_name: - :type publisher_name: str - :param type: - :type type: str - :param version: - :type version: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: VirtualMachineExtensionImage or ClientRawResponse if raw=true - :rtype: - ~azure.mgmt.compute.v2017_03_30.models.VirtualMachineExtensionImage or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get.metadata['url'] - path_format_arguments = { - 'location': self._serialize.url("location", location, 'str'), - 'publisherName': self._serialize.url("publisher_name", publisher_name, 'str'), - 'type': self._serialize.url("type", type, 'str'), - 'version': self._serialize.url("version", version, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('VirtualMachineExtensionImage', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/publishers/{publisherName}/artifacttypes/vmextension/types/{type}/versions/{version}'} - - def list_types( - self, location, publisher_name, custom_headers=None, raw=False, **operation_config): - """Gets a list of virtual machine extension image types. - - :param location: The name of a supported Azure region. - :type location: str - :param publisher_name: - :type publisher_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: list or ClientRawResponse if raw=true - :rtype: - list[~azure.mgmt.compute.v2017_03_30.models.VirtualMachineExtensionImage] - or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.list_types.metadata['url'] - path_format_arguments = { - 'location': self._serialize.url("location", location, 'str'), - 'publisherName': self._serialize.url("publisher_name", publisher_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('[VirtualMachineExtensionImage]', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - list_types.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/publishers/{publisherName}/artifacttypes/vmextension/types'} - - def list_versions( - self, location, publisher_name, type, filter=None, top=None, orderby=None, custom_headers=None, raw=False, **operation_config): - """Gets a list of virtual machine extension image versions. - - :param location: The name of a supported Azure region. - :type location: str - :param publisher_name: - :type publisher_name: str - :param type: - :type type: str - :param filter: The filter to apply on the operation. - :type filter: str - :param top: - :type top: int - :param orderby: - :type orderby: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: list or ClientRawResponse if raw=true - :rtype: - list[~azure.mgmt.compute.v2017_03_30.models.VirtualMachineExtensionImage] - or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.list_versions.metadata['url'] - path_format_arguments = { - 'location': self._serialize.url("location", location, 'str'), - 'publisherName': self._serialize.url("publisher_name", publisher_name, 'str'), - 'type': self._serialize.url("type", type, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - if filter is not None: - query_parameters['$filter'] = self._serialize.query("filter", filter, 'str') - if top is not None: - query_parameters['$top'] = self._serialize.query("top", top, 'int') - if orderby is not None: - query_parameters['$orderby'] = self._serialize.query("orderby", orderby, 'str') - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('[VirtualMachineExtensionImage]', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - list_versions.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/publishers/{publisherName}/artifacttypes/vmextension/types/{type}/versions'} diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/operations/virtual_machine_extensions_operations.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/operations/virtual_machine_extensions_operations.py deleted file mode 100644 index 75c04ea3ab0b..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/operations/virtual_machine_extensions_operations.py +++ /dev/null @@ -1,424 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError -from msrest.polling import LROPoller, NoPolling -from msrestazure.polling.arm_polling import ARMPolling - -from .. import models - - -class VirtualMachineExtensionsOperations(object): - """VirtualMachineExtensionsOperations operations. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: Client Api Version. Constant value: "2017-03-30". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2017-03-30" - - self.config = config - - - def _create_or_update_initial( - self, resource_group_name, vm_name, vm_extension_name, extension_parameters, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.create_or_update.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'vmName': self._serialize.url("vm_name", vm_name, 'str'), - 'vmExtensionName': self._serialize.url("vm_extension_name", vm_extension_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(extension_parameters, 'VirtualMachineExtension') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 201]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('VirtualMachineExtension', response) - if response.status_code == 201: - deserialized = self._deserialize('VirtualMachineExtension', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def create_or_update( - self, resource_group_name, vm_name, vm_extension_name, extension_parameters, custom_headers=None, raw=False, polling=True, **operation_config): - """The operation to create or update the extension. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param vm_name: The name of the virtual machine where the extension - should be created or updated. - :type vm_name: str - :param vm_extension_name: The name of the virtual machine extension. - :type vm_extension_name: str - :param extension_parameters: Parameters supplied to the Create Virtual - Machine Extension operation. - :type extension_parameters: - ~azure.mgmt.compute.v2017_03_30.models.VirtualMachineExtension - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns VirtualMachineExtension - or ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2017_03_30.models.VirtualMachineExtension] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2017_03_30.models.VirtualMachineExtension]] - :raises: :class:`CloudError` - """ - raw_result = self._create_or_update_initial( - resource_group_name=resource_group_name, - vm_name=vm_name, - vm_extension_name=vm_extension_name, - extension_parameters=extension_parameters, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('VirtualMachineExtension', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/extensions/{vmExtensionName}'} - - - def _update_initial( - self, resource_group_name, vm_name, vm_extension_name, extension_parameters, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.update.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'vmName': self._serialize.url("vm_name", vm_name, 'str'), - 'vmExtensionName': self._serialize.url("vm_extension_name", vm_extension_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(extension_parameters, 'VirtualMachineExtensionUpdate') - - # Construct and send request - request = self._client.patch(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('VirtualMachineExtension', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def update( - self, resource_group_name, vm_name, vm_extension_name, extension_parameters, custom_headers=None, raw=False, polling=True, **operation_config): - """The operation to update the extension. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param vm_name: The name of the virtual machine where the extension - should be updated. - :type vm_name: str - :param vm_extension_name: The name of the virtual machine extension. - :type vm_extension_name: str - :param extension_parameters: Parameters supplied to the Update Virtual - Machine Extension operation. - :type extension_parameters: - ~azure.mgmt.compute.v2017_03_30.models.VirtualMachineExtensionUpdate - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns VirtualMachineExtension - or ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2017_03_30.models.VirtualMachineExtension] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2017_03_30.models.VirtualMachineExtension]] - :raises: :class:`CloudError` - """ - raw_result = self._update_initial( - resource_group_name=resource_group_name, - vm_name=vm_name, - vm_extension_name=vm_extension_name, - extension_parameters=extension_parameters, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('VirtualMachineExtension', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/extensions/{vmExtensionName}'} - - - def _delete_initial( - self, resource_group_name, vm_name, vm_extension_name, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.delete.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'vmName': self._serialize.url("vm_name", vm_name, 'str'), - 'vmExtensionName': self._serialize.url("vm_extension_name", vm_extension_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202, 204]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('OperationStatusResponse', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def delete( - self, resource_group_name, vm_name, vm_extension_name, custom_headers=None, raw=False, polling=True, **operation_config): - """The operation to delete the extension. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param vm_name: The name of the virtual machine where the extension - should be deleted. - :type vm_name: str - :param vm_extension_name: The name of the virtual machine extension. - :type vm_extension_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns OperationStatusResponse - or ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2017_03_30.models.OperationStatusResponse] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2017_03_30.models.OperationStatusResponse]] - :raises: :class:`CloudError` - """ - raw_result = self._delete_initial( - resource_group_name=resource_group_name, - vm_name=vm_name, - vm_extension_name=vm_extension_name, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('OperationStatusResponse', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/extensions/{vmExtensionName}'} - - def get( - self, resource_group_name, vm_name, vm_extension_name, expand=None, custom_headers=None, raw=False, **operation_config): - """The operation to get the extension. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param vm_name: The name of the virtual machine containing the - extension. - :type vm_name: str - :param vm_extension_name: The name of the virtual machine extension. - :type vm_extension_name: str - :param expand: The expand expression to apply on the operation. - :type expand: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: VirtualMachineExtension or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.compute.v2017_03_30.models.VirtualMachineExtension - or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'vmName': self._serialize.url("vm_name", vm_name, 'str'), - 'vmExtensionName': self._serialize.url("vm_extension_name", vm_extension_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - if expand is not None: - query_parameters['$expand'] = self._serialize.query("expand", expand, 'str') - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('VirtualMachineExtension', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/extensions/{vmExtensionName}'} diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/operations/virtual_machine_images_operations.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/operations/virtual_machine_images_operations.py deleted file mode 100644 index 81bc28042a35..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/operations/virtual_machine_images_operations.py +++ /dev/null @@ -1,383 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError - -from .. import models - - -class VirtualMachineImagesOperations(object): - """VirtualMachineImagesOperations operations. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: Client Api Version. Constant value: "2017-03-30". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2017-03-30" - - self.config = config - - def get( - self, location, publisher_name, offer, skus, version, custom_headers=None, raw=False, **operation_config): - """Gets a virtual machine image. - - :param location: The name of a supported Azure region. - :type location: str - :param publisher_name: A valid image publisher. - :type publisher_name: str - :param offer: A valid image publisher offer. - :type offer: str - :param skus: A valid image SKU. - :type skus: str - :param version: A valid image SKU version. - :type version: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: VirtualMachineImage or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.compute.v2017_03_30.models.VirtualMachineImage or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get.metadata['url'] - path_format_arguments = { - 'location': self._serialize.url("location", location, 'str'), - 'publisherName': self._serialize.url("publisher_name", publisher_name, 'str'), - 'offer': self._serialize.url("offer", offer, 'str'), - 'skus': self._serialize.url("skus", skus, 'str'), - 'version': self._serialize.url("version", version, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('VirtualMachineImage', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/publishers/{publisherName}/artifacttypes/vmimage/offers/{offer}/skus/{skus}/versions/{version}'} - - def list( - self, location, publisher_name, offer, skus, filter=None, top=None, orderby=None, custom_headers=None, raw=False, **operation_config): - """Gets a list of all virtual machine image versions for the specified - location, publisher, offer, and SKU. - - :param location: The name of a supported Azure region. - :type location: str - :param publisher_name: A valid image publisher. - :type publisher_name: str - :param offer: A valid image publisher offer. - :type offer: str - :param skus: A valid image SKU. - :type skus: str - :param filter: The filter to apply on the operation. - :type filter: str - :param top: - :type top: int - :param orderby: - :type orderby: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: list or ClientRawResponse if raw=true - :rtype: - list[~azure.mgmt.compute.v2017_03_30.models.VirtualMachineImageResource] - or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.list.metadata['url'] - path_format_arguments = { - 'location': self._serialize.url("location", location, 'str'), - 'publisherName': self._serialize.url("publisher_name", publisher_name, 'str'), - 'offer': self._serialize.url("offer", offer, 'str'), - 'skus': self._serialize.url("skus", skus, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - if filter is not None: - query_parameters['$filter'] = self._serialize.query("filter", filter, 'str') - if top is not None: - query_parameters['$top'] = self._serialize.query("top", top, 'int') - if orderby is not None: - query_parameters['$orderby'] = self._serialize.query("orderby", orderby, 'str') - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('[VirtualMachineImageResource]', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/publishers/{publisherName}/artifacttypes/vmimage/offers/{offer}/skus/{skus}/versions'} - - def list_offers( - self, location, publisher_name, custom_headers=None, raw=False, **operation_config): - """Gets a list of virtual machine image offers for the specified location - and publisher. - - :param location: The name of a supported Azure region. - :type location: str - :param publisher_name: A valid image publisher. - :type publisher_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: list or ClientRawResponse if raw=true - :rtype: - list[~azure.mgmt.compute.v2017_03_30.models.VirtualMachineImageResource] - or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.list_offers.metadata['url'] - path_format_arguments = { - 'location': self._serialize.url("location", location, 'str'), - 'publisherName': self._serialize.url("publisher_name", publisher_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('[VirtualMachineImageResource]', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - list_offers.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/publishers/{publisherName}/artifacttypes/vmimage/offers'} - - def list_publishers( - self, location, custom_headers=None, raw=False, **operation_config): - """Gets a list of virtual machine image publishers for the specified Azure - location. - - :param location: The name of a supported Azure region. - :type location: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: list or ClientRawResponse if raw=true - :rtype: - list[~azure.mgmt.compute.v2017_03_30.models.VirtualMachineImageResource] - or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.list_publishers.metadata['url'] - path_format_arguments = { - 'location': self._serialize.url("location", location, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('[VirtualMachineImageResource]', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - list_publishers.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/publishers'} - - def list_skus( - self, location, publisher_name, offer, custom_headers=None, raw=False, **operation_config): - """Gets a list of virtual machine image SKUs for the specified location, - publisher, and offer. - - :param location: The name of a supported Azure region. - :type location: str - :param publisher_name: A valid image publisher. - :type publisher_name: str - :param offer: A valid image publisher offer. - :type offer: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: list or ClientRawResponse if raw=true - :rtype: - list[~azure.mgmt.compute.v2017_03_30.models.VirtualMachineImageResource] - or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.list_skus.metadata['url'] - path_format_arguments = { - 'location': self._serialize.url("location", location, 'str'), - 'publisherName': self._serialize.url("publisher_name", publisher_name, 'str'), - 'offer': self._serialize.url("offer", offer, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('[VirtualMachineImageResource]', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - list_skus.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/publishers/{publisherName}/artifacttypes/vmimage/offers/{offer}/skus'} diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/operations/virtual_machine_run_commands_operations.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/operations/virtual_machine_run_commands_operations.py deleted file mode 100644 index 3a26aa227665..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/operations/virtual_machine_run_commands_operations.py +++ /dev/null @@ -1,167 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError - -from .. import models - - -class VirtualMachineRunCommandsOperations(object): - """VirtualMachineRunCommandsOperations operations. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: Client Api Version. Constant value: "2017-03-30". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2017-03-30" - - self.config = config - - def list( - self, location, custom_headers=None, raw=False, **operation_config): - """Lists all available run commands for a subscription in a location. - - :param location: The location upon which run commands is queried. - :type location: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of RunCommandDocumentBase - :rtype: - ~azure.mgmt.compute.v2017_03_30.models.RunCommandDocumentBasePaged[~azure.mgmt.compute.v2017_03_30.models.RunCommandDocumentBase] - :raises: :class:`CloudError` - """ - def internal_paging(next_link=None, raw=False): - - if not next_link: - # Construct URL - url = self.list.metadata['url'] - path_format_arguments = { - 'location': self._serialize.url("location", location, 'str', pattern=r'^[-\w\._]+$'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - deserialized = models.RunCommandDocumentBasePaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.RunCommandDocumentBasePaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/runCommands'} - - def get( - self, location, command_id, custom_headers=None, raw=False, **operation_config): - """Gets specific run command for a subscription in a location. - - :param location: The location upon which run commands is queried. - :type location: str - :param command_id: The command id. - :type command_id: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: RunCommandDocument or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.compute.v2017_03_30.models.RunCommandDocument or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get.metadata['url'] - path_format_arguments = { - 'location': self._serialize.url("location", location, 'str', pattern=r'^[-\w\._]+$'), - 'commandId': self._serialize.url("command_id", command_id, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('RunCommandDocument', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/runCommands/{commandId}'} diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/operations/virtual_machine_scale_set_extensions_operations.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/operations/virtual_machine_scale_set_extensions_operations.py deleted file mode 100644 index 86bf05e10c56..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/operations/virtual_machine_scale_set_extensions_operations.py +++ /dev/null @@ -1,391 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError -from msrest.polling import LROPoller, NoPolling -from msrestazure.polling.arm_polling import ARMPolling - -from .. import models - - -class VirtualMachineScaleSetExtensionsOperations(object): - """VirtualMachineScaleSetExtensionsOperations operations. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: Client Api Version. Constant value: "2017-03-30". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2017-03-30" - - self.config = config - - - def _create_or_update_initial( - self, resource_group_name, vm_scale_set_name, vmss_extension_name, extension_parameters, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.create_or_update.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), - 'vmssExtensionName': self._serialize.url("vmss_extension_name", vmss_extension_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(extension_parameters, 'VirtualMachineScaleSetExtension') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 201]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('VirtualMachineScaleSetExtension', response) - if response.status_code == 201: - deserialized = self._deserialize('VirtualMachineScaleSetExtension', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def create_or_update( - self, resource_group_name, vm_scale_set_name, vmss_extension_name, extension_parameters, custom_headers=None, raw=False, polling=True, **operation_config): - """The operation to create or update an extension. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param vm_scale_set_name: The name of the VM scale set where the - extension should be create or updated. - :type vm_scale_set_name: str - :param vmss_extension_name: The name of the VM scale set extension. - :type vmss_extension_name: str - :param extension_parameters: Parameters supplied to the Create VM - scale set Extension operation. - :type extension_parameters: - ~azure.mgmt.compute.v2017_03_30.models.VirtualMachineScaleSetExtension - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns - VirtualMachineScaleSetExtension or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2017_03_30.models.VirtualMachineScaleSetExtension] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2017_03_30.models.VirtualMachineScaleSetExtension]] - :raises: :class:`CloudError` - """ - raw_result = self._create_or_update_initial( - resource_group_name=resource_group_name, - vm_scale_set_name=vm_scale_set_name, - vmss_extension_name=vmss_extension_name, - extension_parameters=extension_parameters, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('VirtualMachineScaleSetExtension', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/extensions/{vmssExtensionName}'} - - - def _delete_initial( - self, resource_group_name, vm_scale_set_name, vmss_extension_name, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.delete.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), - 'vmssExtensionName': self._serialize.url("vmss_extension_name", vmss_extension_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202, 204]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('OperationStatusResponse', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def delete( - self, resource_group_name, vm_scale_set_name, vmss_extension_name, custom_headers=None, raw=False, polling=True, **operation_config): - """The operation to delete the extension. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param vm_scale_set_name: The name of the VM scale set where the - extension should be deleted. - :type vm_scale_set_name: str - :param vmss_extension_name: The name of the VM scale set extension. - :type vmss_extension_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns OperationStatusResponse - or ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2017_03_30.models.OperationStatusResponse] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2017_03_30.models.OperationStatusResponse]] - :raises: :class:`CloudError` - """ - raw_result = self._delete_initial( - resource_group_name=resource_group_name, - vm_scale_set_name=vm_scale_set_name, - vmss_extension_name=vmss_extension_name, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('OperationStatusResponse', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/extensions/{vmssExtensionName}'} - - def get( - self, resource_group_name, vm_scale_set_name, vmss_extension_name, expand=None, custom_headers=None, raw=False, **operation_config): - """The operation to get the extension. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param vm_scale_set_name: The name of the VM scale set containing the - extension. - :type vm_scale_set_name: str - :param vmss_extension_name: The name of the VM scale set extension. - :type vmss_extension_name: str - :param expand: The expand expression to apply on the operation. - :type expand: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: VirtualMachineScaleSetExtension or ClientRawResponse if - raw=true - :rtype: - ~azure.mgmt.compute.v2017_03_30.models.VirtualMachineScaleSetExtension - or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), - 'vmssExtensionName': self._serialize.url("vmss_extension_name", vmss_extension_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - if expand is not None: - query_parameters['$expand'] = self._serialize.query("expand", expand, 'str') - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('VirtualMachineScaleSetExtension', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/extensions/{vmssExtensionName}'} - - def list( - self, resource_group_name, vm_scale_set_name, custom_headers=None, raw=False, **operation_config): - """Gets a list of all extensions in a VM scale set. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param vm_scale_set_name: The name of the VM scale set containing the - extension. - :type vm_scale_set_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of VirtualMachineScaleSetExtension - :rtype: - ~azure.mgmt.compute.v2017_03_30.models.VirtualMachineScaleSetExtensionPaged[~azure.mgmt.compute.v2017_03_30.models.VirtualMachineScaleSetExtension] - :raises: :class:`CloudError` - """ - def internal_paging(next_link=None, raw=False): - - if not next_link: - # Construct URL - url = self.list.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - deserialized = models.VirtualMachineScaleSetExtensionPaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.VirtualMachineScaleSetExtensionPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/extensions'} diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/operations/virtual_machine_scale_set_rolling_upgrades_operations.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/operations/virtual_machine_scale_set_rolling_upgrades_operations.py deleted file mode 100644 index 10a79ee43f28..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/operations/virtual_machine_scale_set_rolling_upgrades_operations.py +++ /dev/null @@ -1,293 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError -from msrest.polling import LROPoller, NoPolling -from msrestazure.polling.arm_polling import ARMPolling - -from .. import models - - -class VirtualMachineScaleSetRollingUpgradesOperations(object): - """VirtualMachineScaleSetRollingUpgradesOperations operations. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: Client Api Version. Constant value: "2017-03-30". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2017-03-30" - - self.config = config - - - def _cancel_initial( - self, resource_group_name, vm_scale_set_name, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.cancel.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('OperationStatusResponse', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def cancel( - self, resource_group_name, vm_scale_set_name, custom_headers=None, raw=False, polling=True, **operation_config): - """Cancels the current virtual machine scale set rolling upgrade. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param vm_scale_set_name: The name of the VM scale set. - :type vm_scale_set_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns OperationStatusResponse - or ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2017_03_30.models.OperationStatusResponse] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2017_03_30.models.OperationStatusResponse]] - :raises: :class:`CloudError` - """ - raw_result = self._cancel_initial( - resource_group_name=resource_group_name, - vm_scale_set_name=vm_scale_set_name, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('OperationStatusResponse', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - cancel.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/rollingUpgrades/cancel'} - - - def _start_os_upgrade_initial( - self, resource_group_name, vm_scale_set_name, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.start_os_upgrade.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('OperationStatusResponse', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def start_os_upgrade( - self, resource_group_name, vm_scale_set_name, custom_headers=None, raw=False, polling=True, **operation_config): - """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. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param vm_scale_set_name: The name of the VM scale set. - :type vm_scale_set_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns OperationStatusResponse - or ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2017_03_30.models.OperationStatusResponse] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2017_03_30.models.OperationStatusResponse]] - :raises: :class:`CloudError` - """ - raw_result = self._start_os_upgrade_initial( - resource_group_name=resource_group_name, - vm_scale_set_name=vm_scale_set_name, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('OperationStatusResponse', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - start_os_upgrade.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/osRollingUpgrade'} - - def get_latest( - self, resource_group_name, vm_scale_set_name, custom_headers=None, raw=False, **operation_config): - """Gets the status of the latest virtual machine scale set rolling - upgrade. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param vm_scale_set_name: The name of the VM scale set. - :type vm_scale_set_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: RollingUpgradeStatusInfo or ClientRawResponse if raw=true - :rtype: - ~azure.mgmt.compute.v2017_03_30.models.RollingUpgradeStatusInfo or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get_latest.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('RollingUpgradeStatusInfo', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_latest.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/rollingUpgrades/latest'} diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/operations/virtual_machine_scale_set_vms_operations.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/operations/virtual_machine_scale_set_vms_operations.py deleted file mode 100644 index 91d12700629e..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/operations/virtual_machine_scale_set_vms_operations.py +++ /dev/null @@ -1,943 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError -from msrest.polling import LROPoller, NoPolling -from msrestazure.polling.arm_polling import ARMPolling - -from .. import models - - -class VirtualMachineScaleSetVMsOperations(object): - """VirtualMachineScaleSetVMsOperations operations. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: Client Api Version. Constant value: "2017-03-30". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2017-03-30" - - self.config = config - - - def _reimage_initial( - self, resource_group_name, vm_scale_set_name, instance_id, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.reimage.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), - 'instanceId': self._serialize.url("instance_id", instance_id, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('OperationStatusResponse', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def reimage( - self, resource_group_name, vm_scale_set_name, instance_id, custom_headers=None, raw=False, polling=True, **operation_config): - """Reimages (upgrade the operating system) a specific virtual machine in a - VM scale set. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param vm_scale_set_name: The name of the VM scale set. - :type vm_scale_set_name: str - :param instance_id: The instance ID of the virtual machine. - :type instance_id: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns OperationStatusResponse - or ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2017_03_30.models.OperationStatusResponse] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2017_03_30.models.OperationStatusResponse]] - :raises: :class:`CloudError` - """ - raw_result = self._reimage_initial( - resource_group_name=resource_group_name, - vm_scale_set_name=vm_scale_set_name, - instance_id=instance_id, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('OperationStatusResponse', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - reimage.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/virtualmachines/{instanceId}/reimage'} - - - def _reimage_all_initial( - self, resource_group_name, vm_scale_set_name, instance_id, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.reimage_all.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), - 'instanceId': self._serialize.url("instance_id", instance_id, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('OperationStatusResponse', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def reimage_all( - self, resource_group_name, vm_scale_set_name, instance_id, custom_headers=None, raw=False, polling=True, **operation_config): - """Allows you to re-image all the disks ( including data disks ) in the a - VM scale set instance. This operation is only supported for managed - disks. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param vm_scale_set_name: The name of the VM scale set. - :type vm_scale_set_name: str - :param instance_id: The instance ID of the virtual machine. - :type instance_id: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns OperationStatusResponse - or ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2017_03_30.models.OperationStatusResponse] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2017_03_30.models.OperationStatusResponse]] - :raises: :class:`CloudError` - """ - raw_result = self._reimage_all_initial( - resource_group_name=resource_group_name, - vm_scale_set_name=vm_scale_set_name, - instance_id=instance_id, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('OperationStatusResponse', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - reimage_all.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/virtualmachines/{instanceId}/reimageall'} - - - def _deallocate_initial( - self, resource_group_name, vm_scale_set_name, instance_id, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.deallocate.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), - 'instanceId': self._serialize.url("instance_id", instance_id, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('OperationStatusResponse', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def deallocate( - self, resource_group_name, vm_scale_set_name, instance_id, custom_headers=None, raw=False, polling=True, **operation_config): - """Deallocates a specific virtual machine in a VM scale set. Shuts down - the virtual machine and releases the compute resources it uses. You are - not billed for the compute resources of this virtual machine once it is - deallocated. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param vm_scale_set_name: The name of the VM scale set. - :type vm_scale_set_name: str - :param instance_id: The instance ID of the virtual machine. - :type instance_id: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns OperationStatusResponse - or ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2017_03_30.models.OperationStatusResponse] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2017_03_30.models.OperationStatusResponse]] - :raises: :class:`CloudError` - """ - raw_result = self._deallocate_initial( - resource_group_name=resource_group_name, - vm_scale_set_name=vm_scale_set_name, - instance_id=instance_id, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('OperationStatusResponse', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - deallocate.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/virtualmachines/{instanceId}/deallocate'} - - - def _delete_initial( - self, resource_group_name, vm_scale_set_name, instance_id, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.delete.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), - 'instanceId': self._serialize.url("instance_id", instance_id, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202, 204]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('OperationStatusResponse', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def delete( - self, resource_group_name, vm_scale_set_name, instance_id, custom_headers=None, raw=False, polling=True, **operation_config): - """Deletes a virtual machine from a VM scale set. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param vm_scale_set_name: The name of the VM scale set. - :type vm_scale_set_name: str - :param instance_id: The instance ID of the virtual machine. - :type instance_id: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns OperationStatusResponse - or ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2017_03_30.models.OperationStatusResponse] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2017_03_30.models.OperationStatusResponse]] - :raises: :class:`CloudError` - """ - raw_result = self._delete_initial( - resource_group_name=resource_group_name, - vm_scale_set_name=vm_scale_set_name, - instance_id=instance_id, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('OperationStatusResponse', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/virtualmachines/{instanceId}'} - - def get( - self, resource_group_name, vm_scale_set_name, instance_id, custom_headers=None, raw=False, **operation_config): - """Gets a virtual machine from a VM scale set. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param vm_scale_set_name: The name of the VM scale set. - :type vm_scale_set_name: str - :param instance_id: The instance ID of the virtual machine. - :type instance_id: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: VirtualMachineScaleSetVM or ClientRawResponse if raw=true - :rtype: - ~azure.mgmt.compute.v2017_03_30.models.VirtualMachineScaleSetVM or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), - 'instanceId': self._serialize.url("instance_id", instance_id, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('VirtualMachineScaleSetVM', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/virtualmachines/{instanceId}'} - - def get_instance_view( - self, resource_group_name, vm_scale_set_name, instance_id, custom_headers=None, raw=False, **operation_config): - """Gets the status of a virtual machine from a VM scale set. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param vm_scale_set_name: The name of the VM scale set. - :type vm_scale_set_name: str - :param instance_id: The instance ID of the virtual machine. - :type instance_id: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: VirtualMachineScaleSetVMInstanceView or ClientRawResponse if - raw=true - :rtype: - ~azure.mgmt.compute.v2017_03_30.models.VirtualMachineScaleSetVMInstanceView - or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get_instance_view.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), - 'instanceId': self._serialize.url("instance_id", instance_id, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('VirtualMachineScaleSetVMInstanceView', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_instance_view.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/virtualmachines/{instanceId}/instanceView'} - - def list( - self, resource_group_name, virtual_machine_scale_set_name, filter=None, select=None, expand=None, custom_headers=None, raw=False, **operation_config): - """Gets a list of all virtual machines in a VM scale sets. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param virtual_machine_scale_set_name: The name of the VM scale set. - :type virtual_machine_scale_set_name: str - :param filter: The filter to apply to the operation. - :type filter: str - :param select: The list parameters. - :type select: str - :param expand: The expand expression to apply to the operation. - :type expand: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of VirtualMachineScaleSetVM - :rtype: - ~azure.mgmt.compute.v2017_03_30.models.VirtualMachineScaleSetVMPaged[~azure.mgmt.compute.v2017_03_30.models.VirtualMachineScaleSetVM] - :raises: :class:`CloudError` - """ - def internal_paging(next_link=None, raw=False): - - if not next_link: - # Construct URL - url = self.list.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'virtualMachineScaleSetName': self._serialize.url("virtual_machine_scale_set_name", virtual_machine_scale_set_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - if filter is not None: - query_parameters['$filter'] = self._serialize.query("filter", filter, 'str') - if select is not None: - query_parameters['$select'] = self._serialize.query("select", select, 'str') - if expand is not None: - query_parameters['$expand'] = self._serialize.query("expand", expand, 'str') - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - deserialized = models.VirtualMachineScaleSetVMPaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.VirtualMachineScaleSetVMPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{virtualMachineScaleSetName}/virtualMachines'} - - - def _power_off_initial( - self, resource_group_name, vm_scale_set_name, instance_id, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.power_off.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), - 'instanceId': self._serialize.url("instance_id", instance_id, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('OperationStatusResponse', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def power_off( - self, resource_group_name, vm_scale_set_name, instance_id, custom_headers=None, raw=False, polling=True, **operation_config): - """Power off (stop) a virtual machine in a VM scale set. Note that - resources are still attached and you are getting charged for the - resources. Instead, use deallocate to release resources and avoid - charges. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param vm_scale_set_name: The name of the VM scale set. - :type vm_scale_set_name: str - :param instance_id: The instance ID of the virtual machine. - :type instance_id: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns OperationStatusResponse - or ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2017_03_30.models.OperationStatusResponse] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2017_03_30.models.OperationStatusResponse]] - :raises: :class:`CloudError` - """ - raw_result = self._power_off_initial( - resource_group_name=resource_group_name, - vm_scale_set_name=vm_scale_set_name, - instance_id=instance_id, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('OperationStatusResponse', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - power_off.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/virtualmachines/{instanceId}/poweroff'} - - - def _restart_initial( - self, resource_group_name, vm_scale_set_name, instance_id, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.restart.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), - 'instanceId': self._serialize.url("instance_id", instance_id, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('OperationStatusResponse', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def restart( - self, resource_group_name, vm_scale_set_name, instance_id, custom_headers=None, raw=False, polling=True, **operation_config): - """Restarts a virtual machine in a VM scale set. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param vm_scale_set_name: The name of the VM scale set. - :type vm_scale_set_name: str - :param instance_id: The instance ID of the virtual machine. - :type instance_id: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns OperationStatusResponse - or ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2017_03_30.models.OperationStatusResponse] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2017_03_30.models.OperationStatusResponse]] - :raises: :class:`CloudError` - """ - raw_result = self._restart_initial( - resource_group_name=resource_group_name, - vm_scale_set_name=vm_scale_set_name, - instance_id=instance_id, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('OperationStatusResponse', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - restart.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/virtualmachines/{instanceId}/restart'} - - - def _start_initial( - self, resource_group_name, vm_scale_set_name, instance_id, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.start.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), - 'instanceId': self._serialize.url("instance_id", instance_id, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('OperationStatusResponse', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def start( - self, resource_group_name, vm_scale_set_name, instance_id, custom_headers=None, raw=False, polling=True, **operation_config): - """Starts a virtual machine in a VM scale set. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param vm_scale_set_name: The name of the VM scale set. - :type vm_scale_set_name: str - :param instance_id: The instance ID of the virtual machine. - :type instance_id: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns OperationStatusResponse - or ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2017_03_30.models.OperationStatusResponse] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2017_03_30.models.OperationStatusResponse]] - :raises: :class:`CloudError` - """ - raw_result = self._start_initial( - resource_group_name=resource_group_name, - vm_scale_set_name=vm_scale_set_name, - instance_id=instance_id, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('OperationStatusResponse', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - start.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/virtualmachines/{instanceId}/start'} diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/operations/virtual_machine_scale_sets_operations.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/operations/virtual_machine_scale_sets_operations.py deleted file mode 100644 index 80babcb3948f..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/operations/virtual_machine_scale_sets_operations.py +++ /dev/null @@ -1,1543 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError -from msrest.polling import LROPoller, NoPolling -from msrestazure.polling.arm_polling import ARMPolling - -from .. import models - - -class VirtualMachineScaleSetsOperations(object): - """VirtualMachineScaleSetsOperations operations. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: Client Api Version. Constant value: "2017-03-30". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2017-03-30" - - self.config = config - - - def _create_or_update_initial( - self, resource_group_name, vm_scale_set_name, parameters, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.create_or_update.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(parameters, 'VirtualMachineScaleSet') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 201]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('VirtualMachineScaleSet', response) - if response.status_code == 201: - deserialized = self._deserialize('VirtualMachineScaleSet', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def create_or_update( - self, resource_group_name, vm_scale_set_name, parameters, custom_headers=None, raw=False, polling=True, **operation_config): - """Create or update a VM scale set. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param vm_scale_set_name: The name of the VM scale set to create or - update. - :type vm_scale_set_name: str - :param parameters: The scale set object. - :type parameters: - ~azure.mgmt.compute.v2017_03_30.models.VirtualMachineScaleSet - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns VirtualMachineScaleSet - or ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2017_03_30.models.VirtualMachineScaleSet] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2017_03_30.models.VirtualMachineScaleSet]] - :raises: :class:`CloudError` - """ - raw_result = self._create_or_update_initial( - resource_group_name=resource_group_name, - vm_scale_set_name=vm_scale_set_name, - parameters=parameters, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('VirtualMachineScaleSet', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}'} - - - def _update_initial( - self, resource_group_name, vm_scale_set_name, parameters, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.update.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(parameters, 'VirtualMachineScaleSetUpdate') - - # Construct and send request - request = self._client.patch(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('VirtualMachineScaleSet', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def update( - self, resource_group_name, vm_scale_set_name, parameters, custom_headers=None, raw=False, polling=True, **operation_config): - """Update a VM scale set. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param vm_scale_set_name: The name of the VM scale set to create or - update. - :type vm_scale_set_name: str - :param parameters: The scale set object. - :type parameters: - ~azure.mgmt.compute.v2017_03_30.models.VirtualMachineScaleSetUpdate - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns VirtualMachineScaleSet - or ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2017_03_30.models.VirtualMachineScaleSet] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2017_03_30.models.VirtualMachineScaleSet]] - :raises: :class:`CloudError` - """ - raw_result = self._update_initial( - resource_group_name=resource_group_name, - vm_scale_set_name=vm_scale_set_name, - parameters=parameters, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('VirtualMachineScaleSet', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}'} - - - def _delete_initial( - self, resource_group_name, vm_scale_set_name, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.delete.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202, 204]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('OperationStatusResponse', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def delete( - self, resource_group_name, vm_scale_set_name, custom_headers=None, raw=False, polling=True, **operation_config): - """Deletes a VM scale set. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param vm_scale_set_name: The name of the VM scale set. - :type vm_scale_set_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns OperationStatusResponse - or ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2017_03_30.models.OperationStatusResponse] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2017_03_30.models.OperationStatusResponse]] - :raises: :class:`CloudError` - """ - raw_result = self._delete_initial( - resource_group_name=resource_group_name, - vm_scale_set_name=vm_scale_set_name, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('OperationStatusResponse', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}'} - - def get( - self, resource_group_name, vm_scale_set_name, custom_headers=None, raw=False, **operation_config): - """Display information about a virtual machine scale set. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param vm_scale_set_name: The name of the VM scale set. - :type vm_scale_set_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: VirtualMachineScaleSet or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.compute.v2017_03_30.models.VirtualMachineScaleSet - or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('VirtualMachineScaleSet', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}'} - - - def _deallocate_initial( - self, resource_group_name, vm_scale_set_name, instance_ids=None, custom_headers=None, raw=False, **operation_config): - vm_instance_ids = None - if instance_ids is not None: - vm_instance_ids = models.VirtualMachineScaleSetVMInstanceIDs(instance_ids=instance_ids) - - # Construct URL - url = self.deallocate.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - if vm_instance_ids is not None: - body_content = self._serialize.body(vm_instance_ids, 'VirtualMachineScaleSetVMInstanceIDs') - else: - body_content = None - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('OperationStatusResponse', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def deallocate( - self, resource_group_name, vm_scale_set_name, instance_ids=None, custom_headers=None, raw=False, polling=True, **operation_config): - """Deallocates specific virtual machines in a VM scale set. Shuts down the - virtual machines and releases the compute resources. You are not billed - for the compute resources that this virtual machine scale set - deallocates. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param vm_scale_set_name: The name of the VM scale set. - :type vm_scale_set_name: str - :param instance_ids: The virtual machine scale set instance ids. - Omitting the virtual machine scale set instance ids will result in the - operation being performed on all virtual machines in the virtual - machine scale set. - :type instance_ids: list[str] - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns OperationStatusResponse - or ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2017_03_30.models.OperationStatusResponse] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2017_03_30.models.OperationStatusResponse]] - :raises: :class:`CloudError` - """ - raw_result = self._deallocate_initial( - resource_group_name=resource_group_name, - vm_scale_set_name=vm_scale_set_name, - instance_ids=instance_ids, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('OperationStatusResponse', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - deallocate.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/deallocate'} - - - def _delete_instances_initial( - self, resource_group_name, vm_scale_set_name, instance_ids, custom_headers=None, raw=False, **operation_config): - vm_instance_ids = models.VirtualMachineScaleSetVMInstanceRequiredIDs(instance_ids=instance_ids) - - # Construct URL - url = self.delete_instances.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(vm_instance_ids, 'VirtualMachineScaleSetVMInstanceRequiredIDs') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('OperationStatusResponse', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def delete_instances( - self, resource_group_name, vm_scale_set_name, instance_ids, custom_headers=None, raw=False, polling=True, **operation_config): - """Deletes virtual machines in a VM scale set. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param vm_scale_set_name: The name of the VM scale set. - :type vm_scale_set_name: str - :param instance_ids: The virtual machine scale set instance ids. - :type instance_ids: list[str] - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns OperationStatusResponse - or ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2017_03_30.models.OperationStatusResponse] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2017_03_30.models.OperationStatusResponse]] - :raises: :class:`CloudError` - """ - raw_result = self._delete_instances_initial( - resource_group_name=resource_group_name, - vm_scale_set_name=vm_scale_set_name, - instance_ids=instance_ids, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('OperationStatusResponse', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - delete_instances.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/delete'} - - def get_instance_view( - self, resource_group_name, vm_scale_set_name, custom_headers=None, raw=False, **operation_config): - """Gets the status of a VM scale set instance. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param vm_scale_set_name: The name of the VM scale set. - :type vm_scale_set_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: VirtualMachineScaleSetInstanceView or ClientRawResponse if - raw=true - :rtype: - ~azure.mgmt.compute.v2017_03_30.models.VirtualMachineScaleSetInstanceView - or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get_instance_view.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('VirtualMachineScaleSetInstanceView', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_instance_view.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/instanceView'} - - def list( - self, resource_group_name, custom_headers=None, raw=False, **operation_config): - """Gets a list of all VM scale sets under a resource group. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of VirtualMachineScaleSet - :rtype: - ~azure.mgmt.compute.v2017_03_30.models.VirtualMachineScaleSetPaged[~azure.mgmt.compute.v2017_03_30.models.VirtualMachineScaleSet] - :raises: :class:`CloudError` - """ - def internal_paging(next_link=None, raw=False): - - if not next_link: - # Construct URL - url = self.list.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - deserialized = models.VirtualMachineScaleSetPaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.VirtualMachineScaleSetPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets'} - - def list_all( - self, custom_headers=None, raw=False, **operation_config): - """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. - - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of VirtualMachineScaleSet - :rtype: - ~azure.mgmt.compute.v2017_03_30.models.VirtualMachineScaleSetPaged[~azure.mgmt.compute.v2017_03_30.models.VirtualMachineScaleSet] - :raises: :class:`CloudError` - """ - def internal_paging(next_link=None, raw=False): - - if not next_link: - # Construct URL - url = self.list_all.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - deserialized = models.VirtualMachineScaleSetPaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.VirtualMachineScaleSetPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - list_all.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Compute/virtualMachineScaleSets'} - - def list_skus( - self, resource_group_name, vm_scale_set_name, custom_headers=None, raw=False, **operation_config): - """Gets a list of SKUs available for your VM scale set, including the - minimum and maximum VM instances allowed for each SKU. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param vm_scale_set_name: The name of the VM scale set. - :type vm_scale_set_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of VirtualMachineScaleSetSku - :rtype: - ~azure.mgmt.compute.v2017_03_30.models.VirtualMachineScaleSetSkuPaged[~azure.mgmt.compute.v2017_03_30.models.VirtualMachineScaleSetSku] - :raises: :class:`CloudError` - """ - def internal_paging(next_link=None, raw=False): - - if not next_link: - # Construct URL - url = self.list_skus.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - deserialized = models.VirtualMachineScaleSetSkuPaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.VirtualMachineScaleSetSkuPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - list_skus.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/skus'} - - - def _power_off_initial( - self, resource_group_name, vm_scale_set_name, instance_ids=None, custom_headers=None, raw=False, **operation_config): - vm_instance_ids = None - if instance_ids is not None: - vm_instance_ids = models.VirtualMachineScaleSetVMInstanceIDs(instance_ids=instance_ids) - - # Construct URL - url = self.power_off.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - if vm_instance_ids is not None: - body_content = self._serialize.body(vm_instance_ids, 'VirtualMachineScaleSetVMInstanceIDs') - else: - body_content = None - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('OperationStatusResponse', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def power_off( - self, resource_group_name, vm_scale_set_name, instance_ids=None, custom_headers=None, raw=False, polling=True, **operation_config): - """Power off (stop) one or more virtual machines in a VM scale set. Note - that resources are still attached and you are getting charged for the - resources. Instead, use deallocate to release resources and avoid - charges. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param vm_scale_set_name: The name of the VM scale set. - :type vm_scale_set_name: str - :param instance_ids: The virtual machine scale set instance ids. - Omitting the virtual machine scale set instance ids will result in the - operation being performed on all virtual machines in the virtual - machine scale set. - :type instance_ids: list[str] - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns OperationStatusResponse - or ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2017_03_30.models.OperationStatusResponse] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2017_03_30.models.OperationStatusResponse]] - :raises: :class:`CloudError` - """ - raw_result = self._power_off_initial( - resource_group_name=resource_group_name, - vm_scale_set_name=vm_scale_set_name, - instance_ids=instance_ids, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('OperationStatusResponse', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - power_off.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/poweroff'} - - - def _restart_initial( - self, resource_group_name, vm_scale_set_name, instance_ids=None, custom_headers=None, raw=False, **operation_config): - vm_instance_ids = None - if instance_ids is not None: - vm_instance_ids = models.VirtualMachineScaleSetVMInstanceIDs(instance_ids=instance_ids) - - # Construct URL - url = self.restart.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - if vm_instance_ids is not None: - body_content = self._serialize.body(vm_instance_ids, 'VirtualMachineScaleSetVMInstanceIDs') - else: - body_content = None - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('OperationStatusResponse', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def restart( - self, resource_group_name, vm_scale_set_name, instance_ids=None, custom_headers=None, raw=False, polling=True, **operation_config): - """Restarts one or more virtual machines in a VM scale set. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param vm_scale_set_name: The name of the VM scale set. - :type vm_scale_set_name: str - :param instance_ids: The virtual machine scale set instance ids. - Omitting the virtual machine scale set instance ids will result in the - operation being performed on all virtual machines in the virtual - machine scale set. - :type instance_ids: list[str] - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns OperationStatusResponse - or ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2017_03_30.models.OperationStatusResponse] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2017_03_30.models.OperationStatusResponse]] - :raises: :class:`CloudError` - """ - raw_result = self._restart_initial( - resource_group_name=resource_group_name, - vm_scale_set_name=vm_scale_set_name, - instance_ids=instance_ids, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('OperationStatusResponse', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - restart.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/restart'} - - - def _start_initial( - self, resource_group_name, vm_scale_set_name, instance_ids=None, custom_headers=None, raw=False, **operation_config): - vm_instance_ids = None - if instance_ids is not None: - vm_instance_ids = models.VirtualMachineScaleSetVMInstanceIDs(instance_ids=instance_ids) - - # Construct URL - url = self.start.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - if vm_instance_ids is not None: - body_content = self._serialize.body(vm_instance_ids, 'VirtualMachineScaleSetVMInstanceIDs') - else: - body_content = None - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('OperationStatusResponse', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def start( - self, resource_group_name, vm_scale_set_name, instance_ids=None, custom_headers=None, raw=False, polling=True, **operation_config): - """Starts one or more virtual machines in a VM scale set. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param vm_scale_set_name: The name of the VM scale set. - :type vm_scale_set_name: str - :param instance_ids: The virtual machine scale set instance ids. - Omitting the virtual machine scale set instance ids will result in the - operation being performed on all virtual machines in the virtual - machine scale set. - :type instance_ids: list[str] - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns OperationStatusResponse - or ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2017_03_30.models.OperationStatusResponse] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2017_03_30.models.OperationStatusResponse]] - :raises: :class:`CloudError` - """ - raw_result = self._start_initial( - resource_group_name=resource_group_name, - vm_scale_set_name=vm_scale_set_name, - instance_ids=instance_ids, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('OperationStatusResponse', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - start.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/start'} - - - def _update_instances_initial( - self, resource_group_name, vm_scale_set_name, instance_ids, custom_headers=None, raw=False, **operation_config): - vm_instance_ids = models.VirtualMachineScaleSetVMInstanceRequiredIDs(instance_ids=instance_ids) - - # Construct URL - url = self.update_instances.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(vm_instance_ids, 'VirtualMachineScaleSetVMInstanceRequiredIDs') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('OperationStatusResponse', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def update_instances( - self, resource_group_name, vm_scale_set_name, instance_ids, custom_headers=None, raw=False, polling=True, **operation_config): - """Upgrades one or more virtual machines to the latest SKU set in the VM - scale set model. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param vm_scale_set_name: The name of the VM scale set. - :type vm_scale_set_name: str - :param instance_ids: The virtual machine scale set instance ids. - :type instance_ids: list[str] - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns OperationStatusResponse - or ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2017_03_30.models.OperationStatusResponse] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2017_03_30.models.OperationStatusResponse]] - :raises: :class:`CloudError` - """ - raw_result = self._update_instances_initial( - resource_group_name=resource_group_name, - vm_scale_set_name=vm_scale_set_name, - instance_ids=instance_ids, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('OperationStatusResponse', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - update_instances.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/manualupgrade'} - - - def _reimage_initial( - self, resource_group_name, vm_scale_set_name, instance_ids=None, custom_headers=None, raw=False, **operation_config): - vm_instance_ids = None - if instance_ids is not None: - vm_instance_ids = models.VirtualMachineScaleSetVMInstanceIDs(instance_ids=instance_ids) - - # Construct URL - url = self.reimage.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - if vm_instance_ids is not None: - body_content = self._serialize.body(vm_instance_ids, 'VirtualMachineScaleSetVMInstanceIDs') - else: - body_content = None - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('OperationStatusResponse', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def reimage( - self, resource_group_name, vm_scale_set_name, instance_ids=None, custom_headers=None, raw=False, polling=True, **operation_config): - """Reimages (upgrade the operating system) one or more virtual machines in - a VM scale set. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param vm_scale_set_name: The name of the VM scale set. - :type vm_scale_set_name: str - :param instance_ids: The virtual machine scale set instance ids. - Omitting the virtual machine scale set instance ids will result in the - operation being performed on all virtual machines in the virtual - machine scale set. - :type instance_ids: list[str] - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns OperationStatusResponse - or ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2017_03_30.models.OperationStatusResponse] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2017_03_30.models.OperationStatusResponse]] - :raises: :class:`CloudError` - """ - raw_result = self._reimage_initial( - resource_group_name=resource_group_name, - vm_scale_set_name=vm_scale_set_name, - instance_ids=instance_ids, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('OperationStatusResponse', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - reimage.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/reimage'} - - - def _reimage_all_initial( - self, resource_group_name, vm_scale_set_name, instance_ids=None, custom_headers=None, raw=False, **operation_config): - vm_instance_ids = None - if instance_ids is not None: - vm_instance_ids = models.VirtualMachineScaleSetVMInstanceIDs(instance_ids=instance_ids) - - # Construct URL - url = self.reimage_all.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - if vm_instance_ids is not None: - body_content = self._serialize.body(vm_instance_ids, 'VirtualMachineScaleSetVMInstanceIDs') - else: - body_content = None - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('OperationStatusResponse', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def reimage_all( - self, resource_group_name, vm_scale_set_name, instance_ids=None, custom_headers=None, raw=False, polling=True, **operation_config): - """Reimages all the disks ( including data disks ) in the virtual machines - in a VM scale set. This operation is only supported for managed disks. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param vm_scale_set_name: The name of the VM scale set. - :type vm_scale_set_name: str - :param instance_ids: The virtual machine scale set instance ids. - Omitting the virtual machine scale set instance ids will result in the - operation being performed on all virtual machines in the virtual - machine scale set. - :type instance_ids: list[str] - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns OperationStatusResponse - or ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2017_03_30.models.OperationStatusResponse] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2017_03_30.models.OperationStatusResponse]] - :raises: :class:`CloudError` - """ - raw_result = self._reimage_all_initial( - resource_group_name=resource_group_name, - vm_scale_set_name=vm_scale_set_name, - instance_ids=instance_ids, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('OperationStatusResponse', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - reimage_all.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/reimageall'} diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/operations/virtual_machine_sizes_operations.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/operations/virtual_machine_sizes_operations.py deleted file mode 100644 index e840f5be2e8b..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/operations/virtual_machine_sizes_operations.py +++ /dev/null @@ -1,107 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError - -from .. import models - - -class VirtualMachineSizesOperations(object): - """VirtualMachineSizesOperations operations. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: Client Api Version. Constant value: "2017-03-30". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2017-03-30" - - self.config = config - - def list( - self, location, custom_headers=None, raw=False, **operation_config): - """Lists all available virtual machine sizes for a subscription in a - location. - - :param location: The location upon which virtual-machine-sizes is - queried. - :type location: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of VirtualMachineSize - :rtype: - ~azure.mgmt.compute.v2017_03_30.models.VirtualMachineSizePaged[~azure.mgmt.compute.v2017_03_30.models.VirtualMachineSize] - :raises: :class:`CloudError` - """ - def internal_paging(next_link=None, raw=False): - - if not next_link: - # Construct URL - url = self.list.metadata['url'] - path_format_arguments = { - 'location': self._serialize.url("location", location, 'str', pattern=r'^[-\w\._]+$'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - deserialized = models.VirtualMachineSizePaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.VirtualMachineSizePaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/vmSizes'} diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/operations/virtual_machines_operations.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/operations/virtual_machines_operations.py deleted file mode 100644 index e34fd57b062c..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/operations/virtual_machines_operations.py +++ /dev/null @@ -1,1637 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError -from msrest.polling import LROPoller, NoPolling -from msrestazure.polling.arm_polling import ARMPolling - -from .. import models - - -class VirtualMachinesOperations(object): - """VirtualMachinesOperations operations. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: Client Api Version. Constant value: "2017-03-30". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2017-03-30" - - self.config = config - - def get_extensions( - self, resource_group_name, vm_name, expand=None, custom_headers=None, raw=False, **operation_config): - """The operation to get all extensions of a Virtual Machine. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param vm_name: The name of the virtual machine containing the - extension. - :type vm_name: str - :param expand: The expand expression to apply on the operation. - :type expand: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: VirtualMachineExtensionsListResult or ClientRawResponse if - raw=true - :rtype: - ~azure.mgmt.compute.v2017_03_30.models.VirtualMachineExtensionsListResult - or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get_extensions.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'vmName': self._serialize.url("vm_name", vm_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - if expand is not None: - query_parameters['$expand'] = self._serialize.query("expand", expand, 'str') - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('VirtualMachineExtensionsListResult', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_extensions.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/extensions'} - - def list_by_location( - self, location, custom_headers=None, raw=False, **operation_config): - """Gets all the virtual machines under the specified subscription for the - specified location. - - :param location: The location for which virtual machines under the - subscription are queried. - :type location: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of VirtualMachine - :rtype: - ~azure.mgmt.compute.v2017_03_30.models.VirtualMachinePaged[~azure.mgmt.compute.v2017_03_30.models.VirtualMachine] - :raises: :class:`CloudError` - """ - def internal_paging(next_link=None, raw=False): - - if not next_link: - # Construct URL - url = self.list_by_location.metadata['url'] - path_format_arguments = { - 'location': self._serialize.url("location", location, 'str', pattern=r'^[-\w\._]+$'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - deserialized = models.VirtualMachinePaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.VirtualMachinePaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - list_by_location.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/virtualMachines'} - - - def _capture_initial( - self, resource_group_name, vm_name, parameters, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.capture.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'vmName': self._serialize.url("vm_name", vm_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(parameters, 'VirtualMachineCaptureParameters') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('VirtualMachineCaptureResult', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def capture( - self, resource_group_name, vm_name, parameters, custom_headers=None, raw=False, polling=True, **operation_config): - """Captures the VM by copying virtual hard disks of the VM and outputs a - template that can be used to create similar VMs. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param vm_name: The name of the virtual machine. - :type vm_name: str - :param parameters: Parameters supplied to the Capture Virtual Machine - operation. - :type parameters: - ~azure.mgmt.compute.v2017_03_30.models.VirtualMachineCaptureParameters - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns - VirtualMachineCaptureResult or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2017_03_30.models.VirtualMachineCaptureResult] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2017_03_30.models.VirtualMachineCaptureResult]] - :raises: :class:`CloudError` - """ - raw_result = self._capture_initial( - resource_group_name=resource_group_name, - vm_name=vm_name, - parameters=parameters, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('VirtualMachineCaptureResult', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - capture.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/capture'} - - - def _create_or_update_initial( - self, resource_group_name, vm_name, parameters, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.create_or_update.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'vmName': self._serialize.url("vm_name", vm_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(parameters, 'VirtualMachine') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 201]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('VirtualMachine', response) - if response.status_code == 201: - deserialized = self._deserialize('VirtualMachine', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def create_or_update( - self, resource_group_name, vm_name, parameters, custom_headers=None, raw=False, polling=True, **operation_config): - """The operation to create or update a virtual machine. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param vm_name: The name of the virtual machine. - :type vm_name: str - :param parameters: Parameters supplied to the Create Virtual Machine - operation. - :type parameters: - ~azure.mgmt.compute.v2017_03_30.models.VirtualMachine - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns VirtualMachine or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2017_03_30.models.VirtualMachine] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2017_03_30.models.VirtualMachine]] - :raises: :class:`CloudError` - """ - raw_result = self._create_or_update_initial( - resource_group_name=resource_group_name, - vm_name=vm_name, - parameters=parameters, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('VirtualMachine', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}'} - - - def _delete_initial( - self, resource_group_name, vm_name, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.delete.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'vmName': self._serialize.url("vm_name", vm_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202, 204]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('OperationStatusResponse', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def delete( - self, resource_group_name, vm_name, custom_headers=None, raw=False, polling=True, **operation_config): - """The operation to delete a virtual machine. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param vm_name: The name of the virtual machine. - :type vm_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns OperationStatusResponse - or ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2017_03_30.models.OperationStatusResponse] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2017_03_30.models.OperationStatusResponse]] - :raises: :class:`CloudError` - """ - raw_result = self._delete_initial( - resource_group_name=resource_group_name, - vm_name=vm_name, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('OperationStatusResponse', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}'} - - def get( - self, resource_group_name, vm_name, expand=None, custom_headers=None, raw=False, **operation_config): - """Retrieves information about the model view or the instance view of a - virtual machine. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param vm_name: The name of the virtual machine. - :type vm_name: str - :param expand: The expand expression to apply on the operation. - Possible values include: 'instanceView' - :type expand: str or - ~azure.mgmt.compute.v2017_03_30.models.InstanceViewTypes - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: VirtualMachine or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.compute.v2017_03_30.models.VirtualMachine or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'vmName': self._serialize.url("vm_name", vm_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - if expand is not None: - query_parameters['$expand'] = self._serialize.query("expand", expand, 'InstanceViewTypes') - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('VirtualMachine', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}'} - - def instance_view( - self, resource_group_name, vm_name, custom_headers=None, raw=False, **operation_config): - """Retrieves information about the run-time state of a virtual machine. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param vm_name: The name of the virtual machine. - :type vm_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: VirtualMachineInstanceView or ClientRawResponse if raw=true - :rtype: - ~azure.mgmt.compute.v2017_03_30.models.VirtualMachineInstanceView or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.instance_view.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'vmName': self._serialize.url("vm_name", vm_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('VirtualMachineInstanceView', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - instance_view.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/instanceView'} - - - def _convert_to_managed_disks_initial( - self, resource_group_name, vm_name, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.convert_to_managed_disks.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'vmName': self._serialize.url("vm_name", vm_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('OperationStatusResponse', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def convert_to_managed_disks( - self, resource_group_name, vm_name, custom_headers=None, raw=False, polling=True, **operation_config): - """Converts virtual machine disks from blob-based to managed disks. - Virtual machine must be stop-deallocated before invoking this - operation. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param vm_name: The name of the virtual machine. - :type vm_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns OperationStatusResponse - or ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2017_03_30.models.OperationStatusResponse] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2017_03_30.models.OperationStatusResponse]] - :raises: :class:`CloudError` - """ - raw_result = self._convert_to_managed_disks_initial( - resource_group_name=resource_group_name, - vm_name=vm_name, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('OperationStatusResponse', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - convert_to_managed_disks.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/convertToManagedDisks'} - - - def _deallocate_initial( - self, resource_group_name, vm_name, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.deallocate.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'vmName': self._serialize.url("vm_name", vm_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('OperationStatusResponse', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def deallocate( - self, resource_group_name, vm_name, custom_headers=None, raw=False, polling=True, **operation_config): - """Shuts down the virtual machine and releases the compute resources. You - are not billed for the compute resources that this virtual machine - uses. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param vm_name: The name of the virtual machine. - :type vm_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns OperationStatusResponse - or ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2017_03_30.models.OperationStatusResponse] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2017_03_30.models.OperationStatusResponse]] - :raises: :class:`CloudError` - """ - raw_result = self._deallocate_initial( - resource_group_name=resource_group_name, - vm_name=vm_name, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('OperationStatusResponse', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - deallocate.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/deallocate'} - - def generalize( - self, resource_group_name, vm_name, custom_headers=None, raw=False, **operation_config): - """Sets the state of the virtual machine to generalized. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param vm_name: The name of the virtual machine. - :type vm_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: OperationStatusResponse or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.compute.v2017_03_30.models.OperationStatusResponse - or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.generalize.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'vmName': self._serialize.url("vm_name", vm_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('OperationStatusResponse', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - generalize.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/generalize'} - - def list( - self, resource_group_name, custom_headers=None, raw=False, **operation_config): - """Lists all of the virtual machines in the specified resource group. Use - the nextLink property in the response to get the next page of virtual - machines. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of VirtualMachine - :rtype: - ~azure.mgmt.compute.v2017_03_30.models.VirtualMachinePaged[~azure.mgmt.compute.v2017_03_30.models.VirtualMachine] - :raises: :class:`CloudError` - """ - def internal_paging(next_link=None, raw=False): - - if not next_link: - # Construct URL - url = self.list.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - deserialized = models.VirtualMachinePaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.VirtualMachinePaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines'} - - def list_all( - self, custom_headers=None, raw=False, **operation_config): - """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. - - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of VirtualMachine - :rtype: - ~azure.mgmt.compute.v2017_03_30.models.VirtualMachinePaged[~azure.mgmt.compute.v2017_03_30.models.VirtualMachine] - :raises: :class:`CloudError` - """ - def internal_paging(next_link=None, raw=False): - - if not next_link: - # Construct URL - url = self.list_all.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - deserialized = models.VirtualMachinePaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.VirtualMachinePaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - list_all.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Compute/virtualMachines'} - - def list_available_sizes( - self, resource_group_name, vm_name, custom_headers=None, raw=False, **operation_config): - """Lists all available virtual machine sizes to which the specified - virtual machine can be resized. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param vm_name: The name of the virtual machine. - :type vm_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of VirtualMachineSize - :rtype: - ~azure.mgmt.compute.v2017_03_30.models.VirtualMachineSizePaged[~azure.mgmt.compute.v2017_03_30.models.VirtualMachineSize] - :raises: :class:`CloudError` - """ - def internal_paging(next_link=None, raw=False): - - if not next_link: - # Construct URL - url = self.list_available_sizes.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'vmName': self._serialize.url("vm_name", vm_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - deserialized = models.VirtualMachineSizePaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.VirtualMachineSizePaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - list_available_sizes.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/vmSizes'} - - - def _power_off_initial( - self, resource_group_name, vm_name, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.power_off.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'vmName': self._serialize.url("vm_name", vm_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('OperationStatusResponse', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def power_off( - self, resource_group_name, vm_name, custom_headers=None, raw=False, polling=True, **operation_config): - """The operation to power off (stop) a virtual machine. The virtual - machine can be restarted with the same provisioned resources. You are - still charged for this virtual machine. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param vm_name: The name of the virtual machine. - :type vm_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns OperationStatusResponse - or ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2017_03_30.models.OperationStatusResponse] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2017_03_30.models.OperationStatusResponse]] - :raises: :class:`CloudError` - """ - raw_result = self._power_off_initial( - resource_group_name=resource_group_name, - vm_name=vm_name, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('OperationStatusResponse', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - power_off.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/powerOff'} - - - def _restart_initial( - self, resource_group_name, vm_name, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.restart.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'vmName': self._serialize.url("vm_name", vm_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('OperationStatusResponse', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def restart( - self, resource_group_name, vm_name, custom_headers=None, raw=False, polling=True, **operation_config): - """The operation to restart a virtual machine. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param vm_name: The name of the virtual machine. - :type vm_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns OperationStatusResponse - or ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2017_03_30.models.OperationStatusResponse] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2017_03_30.models.OperationStatusResponse]] - :raises: :class:`CloudError` - """ - raw_result = self._restart_initial( - resource_group_name=resource_group_name, - vm_name=vm_name, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('OperationStatusResponse', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - restart.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/restart'} - - - def _start_initial( - self, resource_group_name, vm_name, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.start.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'vmName': self._serialize.url("vm_name", vm_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('OperationStatusResponse', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def start( - self, resource_group_name, vm_name, custom_headers=None, raw=False, polling=True, **operation_config): - """The operation to start a virtual machine. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param vm_name: The name of the virtual machine. - :type vm_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns OperationStatusResponse - or ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2017_03_30.models.OperationStatusResponse] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2017_03_30.models.OperationStatusResponse]] - :raises: :class:`CloudError` - """ - raw_result = self._start_initial( - resource_group_name=resource_group_name, - vm_name=vm_name, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('OperationStatusResponse', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - start.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/start'} - - - def _redeploy_initial( - self, resource_group_name, vm_name, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.redeploy.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'vmName': self._serialize.url("vm_name", vm_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('OperationStatusResponse', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def redeploy( - self, resource_group_name, vm_name, custom_headers=None, raw=False, polling=True, **operation_config): - """The operation to redeploy a virtual machine. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param vm_name: The name of the virtual machine. - :type vm_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns OperationStatusResponse - or ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2017_03_30.models.OperationStatusResponse] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2017_03_30.models.OperationStatusResponse]] - :raises: :class:`CloudError` - """ - raw_result = self._redeploy_initial( - resource_group_name=resource_group_name, - vm_name=vm_name, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('OperationStatusResponse', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - redeploy.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/redeploy'} - - - def _perform_maintenance_initial( - self, resource_group_name, vm_name, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.perform_maintenance.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'vmName': self._serialize.url("vm_name", vm_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('OperationStatusResponse', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def perform_maintenance( - self, resource_group_name, vm_name, custom_headers=None, raw=False, polling=True, **operation_config): - """The operation to perform maintenance on a virtual machine. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param vm_name: The name of the virtual machine. - :type vm_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns OperationStatusResponse - or ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2017_03_30.models.OperationStatusResponse] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2017_03_30.models.OperationStatusResponse]] - :raises: :class:`CloudError` - """ - raw_result = self._perform_maintenance_initial( - resource_group_name=resource_group_name, - vm_name=vm_name, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('OperationStatusResponse', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - perform_maintenance.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/performMaintenance'} - - - def _run_command_initial( - self, resource_group_name, vm_name, parameters, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.run_command.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'vmName': self._serialize.url("vm_name", vm_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(parameters, 'RunCommandInput') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('RunCommandResult', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def run_command( - self, resource_group_name, vm_name, parameters, custom_headers=None, raw=False, polling=True, **operation_config): - """Run command on the VM. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param vm_name: The name of the virtual machine. - :type vm_name: str - :param parameters: Parameters supplied to the Run command operation. - :type parameters: - ~azure.mgmt.compute.v2017_03_30.models.RunCommandInput - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns RunCommandResult or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2017_03_30.models.RunCommandResult] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2017_03_30.models.RunCommandResult]] - :raises: :class:`CloudError` - """ - raw_result = self._run_command_initial( - resource_group_name=resource_group_name, - vm_name=vm_name, - parameters=parameters, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('RunCommandResult', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - run_command.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/runCommand'} diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_09_01/__init__.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_09_01/__init__.py index 88ded2f640de..a7bc1ce68e37 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_09_01/__init__.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_09_01/__init__.py @@ -9,10 +9,11 @@ # regenerated. # -------------------------------------------------------------------------- -from .compute_management_client import ComputeManagementClient -from .version import VERSION +from ._configuration import ComputeManagementClientConfiguration +from ._compute_management_client import ComputeManagementClient +__all__ = ['ComputeManagementClient', 'ComputeManagementClientConfiguration'] -__all__ = ['ComputeManagementClient'] +from .version import VERSION __version__ = VERSION diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_09_01/_compute_management_client.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_09_01/_compute_management_client.py new file mode 100644 index 000000000000..dd57a0f34cfa --- /dev/null +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_09_01/_compute_management_client.py @@ -0,0 +1,51 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.service_client import SDKClient +from msrest import Serializer, Deserializer + +from ._configuration import ComputeManagementClientConfiguration +from .operations import ResourceSkusOperations +from . import models + + +class ComputeManagementClient(SDKClient): + """Compute Client + + :ivar config: Configuration for client. + :vartype config: ComputeManagementClientConfiguration + + :ivar resource_skus: ResourceSkus operations + :vartype resource_skus: azure.mgmt.compute.v2017_09_01.operations.ResourceSkusOperations + + :param credentials: Credentials needed for the client to connect to Azure. + :type credentials: :mod:`A msrestazure Credentials + object` + :param subscription_id: Subscription credentials which uniquely identify + Microsoft Azure subscription. The subscription ID forms part of the URI + for every service call. + :type subscription_id: str + :param str base_url: Service URL + """ + + def __init__( + self, credentials, subscription_id, base_url=None): + + self.config = ComputeManagementClientConfiguration(credentials, subscription_id, base_url) + super(ComputeManagementClient, self).__init__(self.config.credentials, self.config) + + client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} + self.api_version = '2017-09-01' + self._serialize = Serializer(client_models) + self._deserialize = Deserializer(client_models) + + self.resource_skus = ResourceSkusOperations( + self._client, self.config, self._serialize, self._deserialize) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_09_01/_configuration.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_09_01/_configuration.py new file mode 100644 index 000000000000..0fcf5984e2ca --- /dev/null +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_09_01/_configuration.py @@ -0,0 +1,50 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- +from msrestazure import AzureConfiguration + +from .version import VERSION + + +class ComputeManagementClientConfiguration(AzureConfiguration): + """Configuration for ComputeManagementClient + Note that all parameters used to create this instance are saved as instance + attributes. + + :param credentials: Credentials needed for the client to connect to Azure. + :type credentials: :mod:`A msrestazure Credentials + object` + :param subscription_id: Subscription credentials which uniquely identify + Microsoft Azure subscription. The subscription ID forms part of the URI + for every service call. + :type subscription_id: str + :param str base_url: Service URL + """ + + def __init__( + self, credentials, subscription_id, base_url=None): + + if credentials is None: + raise ValueError("Parameter 'credentials' must not be None.") + if subscription_id is None: + raise ValueError("Parameter 'subscription_id' must not be None.") + if not base_url: + base_url = 'https://management.azure.com' + + super(ComputeManagementClientConfiguration, self).__init__(base_url) + + # Starting Autorest.Python 4.0.64, make connection pool activated by default + self.keep_alive = True + + self.add_user_agent('azure-mgmt-compute/{}'.format(VERSION)) + self.add_user_agent('Azure-SDK-For-Python') + + self.credentials = credentials + self.subscription_id = subscription_id diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_09_01/compute_management_client.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_09_01/compute_management_client.py deleted file mode 100644 index 0dc37e4ed0a2..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_09_01/compute_management_client.py +++ /dev/null @@ -1,85 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.service_client import SDKClient -from msrest import Serializer, Deserializer -from msrestazure import AzureConfiguration -from .version import VERSION -from .operations.resource_skus_operations import ResourceSkusOperations -from . import models - - -class ComputeManagementClientConfiguration(AzureConfiguration): - """Configuration for ComputeManagementClient - Note that all parameters used to create this instance are saved as instance - attributes. - - :param credentials: Credentials needed for the client to connect to Azure. - :type credentials: :mod:`A msrestazure Credentials - object` - :param subscription_id: Subscription credentials which uniquely identify - Microsoft Azure subscription. The subscription ID forms part of the URI - for every service call. - :type subscription_id: str - :param str base_url: Service URL - """ - - def __init__( - self, credentials, subscription_id, base_url=None): - - if credentials is None: - raise ValueError("Parameter 'credentials' must not be None.") - if subscription_id is None: - raise ValueError("Parameter 'subscription_id' must not be None.") - if not base_url: - base_url = 'https://management.azure.com' - - super(ComputeManagementClientConfiguration, self).__init__(base_url) - - self.add_user_agent('azure-mgmt-compute/{}'.format(VERSION)) - self.add_user_agent('Azure-SDK-For-Python') - - self.credentials = credentials - self.subscription_id = subscription_id - - -class ComputeManagementClient(SDKClient): - """Compute Client - - :ivar config: Configuration for client. - :vartype config: ComputeManagementClientConfiguration - - :ivar resource_skus: ResourceSkus operations - :vartype resource_skus: azure.mgmt.compute.v2017_09_01.operations.ResourceSkusOperations - - :param credentials: Credentials needed for the client to connect to Azure. - :type credentials: :mod:`A msrestazure Credentials - object` - :param subscription_id: Subscription credentials which uniquely identify - Microsoft Azure subscription. The subscription ID forms part of the URI - for every service call. - :type subscription_id: str - :param str base_url: Service URL - """ - - def __init__( - self, credentials, subscription_id, base_url=None): - - self.config = ComputeManagementClientConfiguration(credentials, subscription_id, base_url) - super(ComputeManagementClient, self).__init__(self.config.credentials, self.config) - - client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} - self.api_version = '2017-09-01' - self._serialize = Serializer(client_models) - self._deserialize = Deserializer(client_models) - - self.resource_skus = ResourceSkusOperations( - self._client, self.config, self._serialize, self._deserialize) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_09_01/models/__init__.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_09_01/models/__init__.py index 88a8e42394f5..9490769c5b83 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_09_01/models/__init__.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_09_01/models/__init__.py @@ -10,36 +10,36 @@ # -------------------------------------------------------------------------- try: - from .resource_sku_capacity_py3 import ResourceSkuCapacity - from .resource_sku_costs_py3 import ResourceSkuCosts - from .resource_sku_capabilities_py3 import ResourceSkuCapabilities - from .resource_sku_restriction_info_py3 import ResourceSkuRestrictionInfo - from .resource_sku_restrictions_py3 import ResourceSkuRestrictions - from .resource_sku_location_info_py3 import ResourceSkuLocationInfo - from .resource_sku_py3 import ResourceSku + from ._models_py3 import ResourceSku + from ._models_py3 import ResourceSkuCapabilities + from ._models_py3 import ResourceSkuCapacity + from ._models_py3 import ResourceSkuCosts + from ._models_py3 import ResourceSkuLocationInfo + from ._models_py3 import ResourceSkuRestrictionInfo + from ._models_py3 import ResourceSkuRestrictions except (SyntaxError, ImportError): - from .resource_sku_capacity import ResourceSkuCapacity - from .resource_sku_costs import ResourceSkuCosts - from .resource_sku_capabilities import ResourceSkuCapabilities - from .resource_sku_restriction_info import ResourceSkuRestrictionInfo - from .resource_sku_restrictions import ResourceSkuRestrictions - from .resource_sku_location_info import ResourceSkuLocationInfo - from .resource_sku import ResourceSku -from .resource_sku_paged import ResourceSkuPaged -from .compute_management_client_enums import ( + from ._models import ResourceSku + from ._models import ResourceSkuCapabilities + from ._models import ResourceSkuCapacity + from ._models import ResourceSkuCosts + from ._models import ResourceSkuLocationInfo + from ._models import ResourceSkuRestrictionInfo + from ._models import ResourceSkuRestrictions +from ._paged_models import ResourceSkuPaged +from ._compute_management_client_enums import ( ResourceSkuCapacityScaleType, ResourceSkuRestrictionsType, ResourceSkuRestrictionsReasonCode, ) __all__ = [ + 'ResourceSku', + 'ResourceSkuCapabilities', 'ResourceSkuCapacity', 'ResourceSkuCosts', - 'ResourceSkuCapabilities', + 'ResourceSkuLocationInfo', 'ResourceSkuRestrictionInfo', 'ResourceSkuRestrictions', - 'ResourceSkuLocationInfo', - 'ResourceSku', 'ResourceSkuPaged', 'ResourceSkuCapacityScaleType', 'ResourceSkuRestrictionsType', diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_09_01/models/compute_management_client_enums.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_09_01/models/_compute_management_client_enums.py similarity index 100% rename from sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_09_01/models/compute_management_client_enums.py rename to sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_09_01/models/_compute_management_client_enums.py diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_09_01/models/_models.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_09_01/models/_models.py new file mode 100644 index 000000000000..736bdefd09c8 --- /dev/null +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_09_01/models/_models.py @@ -0,0 +1,313 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class CloudError(Model): + """CloudError. + """ + + _attribute_map = { + } + + +class ResourceSku(Model): + """Describes an available Compute SKU. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar resource_type: The type of resource the SKU applies to. + :vartype resource_type: str + :ivar name: The name of SKU. + :vartype name: str + :ivar tier: Specifies the tier of virtual machines in a scale set.

    Possible Values:

    **Standard**

    **Basic** + :vartype tier: str + :ivar size: The Size of the SKU. + :vartype size: str + :ivar family: The Family of this particular SKU. + :vartype family: str + :ivar kind: The Kind of resources that are supported in this SKU. + :vartype kind: str + :ivar capacity: Specifies the number of virtual machines in the scale set. + :vartype capacity: + ~azure.mgmt.compute.v2017_09_01.models.ResourceSkuCapacity + :ivar locations: The set of locations that the SKU is available. + :vartype locations: list[str] + :ivar location_info: A list of locations and availability zones in those + locations where the SKU is available. + :vartype location_info: + list[~azure.mgmt.compute.v2017_09_01.models.ResourceSkuLocationInfo] + :ivar api_versions: The api versions that support this SKU. + :vartype api_versions: list[str] + :ivar costs: Metadata for retrieving price info. + :vartype costs: + list[~azure.mgmt.compute.v2017_09_01.models.ResourceSkuCosts] + :ivar capabilities: A name value pair to describe the capability. + :vartype capabilities: + list[~azure.mgmt.compute.v2017_09_01.models.ResourceSkuCapabilities] + :ivar restrictions: The restrictions because of which SKU cannot be used. + This is empty if there are no restrictions. + :vartype restrictions: + list[~azure.mgmt.compute.v2017_09_01.models.ResourceSkuRestrictions] + """ + + _validation = { + 'resource_type': {'readonly': True}, + 'name': {'readonly': True}, + 'tier': {'readonly': True}, + 'size': {'readonly': True}, + 'family': {'readonly': True}, + 'kind': {'readonly': True}, + 'capacity': {'readonly': True}, + 'locations': {'readonly': True}, + 'location_info': {'readonly': True}, + 'api_versions': {'readonly': True}, + 'costs': {'readonly': True}, + 'capabilities': {'readonly': True}, + 'restrictions': {'readonly': True}, + } + + _attribute_map = { + 'resource_type': {'key': 'resourceType', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'tier': {'key': 'tier', 'type': 'str'}, + 'size': {'key': 'size', 'type': 'str'}, + 'family': {'key': 'family', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'capacity': {'key': 'capacity', 'type': 'ResourceSkuCapacity'}, + 'locations': {'key': 'locations', 'type': '[str]'}, + 'location_info': {'key': 'locationInfo', 'type': '[ResourceSkuLocationInfo]'}, + 'api_versions': {'key': 'apiVersions', 'type': '[str]'}, + 'costs': {'key': 'costs', 'type': '[ResourceSkuCosts]'}, + 'capabilities': {'key': 'capabilities', 'type': '[ResourceSkuCapabilities]'}, + 'restrictions': {'key': 'restrictions', 'type': '[ResourceSkuRestrictions]'}, + } + + def __init__(self, **kwargs): + super(ResourceSku, self).__init__(**kwargs) + self.resource_type = None + self.name = None + self.tier = None + self.size = None + self.family = None + self.kind = None + self.capacity = None + self.locations = None + self.location_info = None + self.api_versions = None + self.costs = None + self.capabilities = None + self.restrictions = None + + +class ResourceSkuCapabilities(Model): + """Describes The SKU capabilities object. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar name: An invariant to describe the feature. + :vartype name: str + :ivar value: An invariant if the feature is measured by quantity. + :vartype value: str + """ + + _validation = { + 'name': {'readonly': True}, + 'value': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'value': {'key': 'value', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ResourceSkuCapabilities, self).__init__(**kwargs) + self.name = None + self.value = None + + +class ResourceSkuCapacity(Model): + """Describes scaling information of a SKU. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar minimum: The minimum capacity. + :vartype minimum: long + :ivar maximum: The maximum capacity that can be set. + :vartype maximum: long + :ivar default: The default capacity. + :vartype default: long + :ivar scale_type: The scale type applicable to the sku. Possible values + include: 'Automatic', 'Manual', 'None' + :vartype scale_type: str or + ~azure.mgmt.compute.v2017_09_01.models.ResourceSkuCapacityScaleType + """ + + _validation = { + 'minimum': {'readonly': True}, + 'maximum': {'readonly': True}, + 'default': {'readonly': True}, + 'scale_type': {'readonly': True}, + } + + _attribute_map = { + 'minimum': {'key': 'minimum', 'type': 'long'}, + 'maximum': {'key': 'maximum', 'type': 'long'}, + 'default': {'key': 'default', 'type': 'long'}, + 'scale_type': {'key': 'scaleType', 'type': 'ResourceSkuCapacityScaleType'}, + } + + def __init__(self, **kwargs): + super(ResourceSkuCapacity, self).__init__(**kwargs) + self.minimum = None + self.maximum = None + self.default = None + self.scale_type = None + + +class ResourceSkuCosts(Model): + """Describes metadata for retrieving price info. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar meter_id: Used for querying price from commerce. + :vartype meter_id: str + :ivar quantity: The multiplier is needed to extend the base metered cost. + :vartype quantity: long + :ivar extended_unit: An invariant to show the extended unit. + :vartype extended_unit: str + """ + + _validation = { + 'meter_id': {'readonly': True}, + 'quantity': {'readonly': True}, + 'extended_unit': {'readonly': True}, + } + + _attribute_map = { + 'meter_id': {'key': 'meterID', 'type': 'str'}, + 'quantity': {'key': 'quantity', 'type': 'long'}, + 'extended_unit': {'key': 'extendedUnit', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ResourceSkuCosts, self).__init__(**kwargs) + self.meter_id = None + self.quantity = None + self.extended_unit = None + + +class ResourceSkuLocationInfo(Model): + """ResourceSkuLocationInfo. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar location: Location of the SKU + :vartype location: str + :ivar zones: List of availability zones where the SKU is supported. + :vartype zones: list[str] + """ + + _validation = { + 'location': {'readonly': True}, + 'zones': {'readonly': True}, + } + + _attribute_map = { + 'location': {'key': 'location', 'type': 'str'}, + 'zones': {'key': 'zones', 'type': '[str]'}, + } + + def __init__(self, **kwargs): + super(ResourceSkuLocationInfo, self).__init__(**kwargs) + self.location = None + self.zones = None + + +class ResourceSkuRestrictionInfo(Model): + """ResourceSkuRestrictionInfo. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar locations: Locations where the SKU is restricted + :vartype locations: list[str] + :ivar zones: List of availability zones where the SKU is restricted. + :vartype zones: list[str] + """ + + _validation = { + 'locations': {'readonly': True}, + 'zones': {'readonly': True}, + } + + _attribute_map = { + 'locations': {'key': 'locations', 'type': '[str]'}, + 'zones': {'key': 'zones', 'type': '[str]'}, + } + + def __init__(self, **kwargs): + super(ResourceSkuRestrictionInfo, self).__init__(**kwargs) + self.locations = None + self.zones = None + + +class ResourceSkuRestrictions(Model): + """Describes scaling information of a SKU. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar type: The type of restrictions. Possible values include: 'Location', + 'Zone' + :vartype type: str or + ~azure.mgmt.compute.v2017_09_01.models.ResourceSkuRestrictionsType + :ivar values: The value of restrictions. If the restriction type is set to + location. This would be different locations where the SKU is restricted. + :vartype values: list[str] + :ivar restriction_info: The information about the restriction where the + SKU cannot be used. + :vartype restriction_info: + ~azure.mgmt.compute.v2017_09_01.models.ResourceSkuRestrictionInfo + :ivar reason_code: The reason for restriction. Possible values include: + 'QuotaId', 'NotAvailableForSubscription' + :vartype reason_code: str or + ~azure.mgmt.compute.v2017_09_01.models.ResourceSkuRestrictionsReasonCode + """ + + _validation = { + 'type': {'readonly': True}, + 'values': {'readonly': True}, + 'restriction_info': {'readonly': True}, + 'reason_code': {'readonly': True}, + } + + _attribute_map = { + 'type': {'key': 'type', 'type': 'ResourceSkuRestrictionsType'}, + 'values': {'key': 'values', 'type': '[str]'}, + 'restriction_info': {'key': 'restrictionInfo', 'type': 'ResourceSkuRestrictionInfo'}, + 'reason_code': {'key': 'reasonCode', 'type': 'ResourceSkuRestrictionsReasonCode'}, + } + + def __init__(self, **kwargs): + super(ResourceSkuRestrictions, self).__init__(**kwargs) + self.type = None + self.values = None + self.restriction_info = None + self.reason_code = None diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_09_01/models/_models_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_09_01/models/_models_py3.py new file mode 100644 index 000000000000..648e5718c9e6 --- /dev/null +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_09_01/models/_models_py3.py @@ -0,0 +1,313 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class CloudError(Model): + """CloudError. + """ + + _attribute_map = { + } + + +class ResourceSku(Model): + """Describes an available Compute SKU. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar resource_type: The type of resource the SKU applies to. + :vartype resource_type: str + :ivar name: The name of SKU. + :vartype name: str + :ivar tier: Specifies the tier of virtual machines in a scale set.

    Possible Values:

    **Standard**

    **Basic** + :vartype tier: str + :ivar size: The Size of the SKU. + :vartype size: str + :ivar family: The Family of this particular SKU. + :vartype family: str + :ivar kind: The Kind of resources that are supported in this SKU. + :vartype kind: str + :ivar capacity: Specifies the number of virtual machines in the scale set. + :vartype capacity: + ~azure.mgmt.compute.v2017_09_01.models.ResourceSkuCapacity + :ivar locations: The set of locations that the SKU is available. + :vartype locations: list[str] + :ivar location_info: A list of locations and availability zones in those + locations where the SKU is available. + :vartype location_info: + list[~azure.mgmt.compute.v2017_09_01.models.ResourceSkuLocationInfo] + :ivar api_versions: The api versions that support this SKU. + :vartype api_versions: list[str] + :ivar costs: Metadata for retrieving price info. + :vartype costs: + list[~azure.mgmt.compute.v2017_09_01.models.ResourceSkuCosts] + :ivar capabilities: A name value pair to describe the capability. + :vartype capabilities: + list[~azure.mgmt.compute.v2017_09_01.models.ResourceSkuCapabilities] + :ivar restrictions: The restrictions because of which SKU cannot be used. + This is empty if there are no restrictions. + :vartype restrictions: + list[~azure.mgmt.compute.v2017_09_01.models.ResourceSkuRestrictions] + """ + + _validation = { + 'resource_type': {'readonly': True}, + 'name': {'readonly': True}, + 'tier': {'readonly': True}, + 'size': {'readonly': True}, + 'family': {'readonly': True}, + 'kind': {'readonly': True}, + 'capacity': {'readonly': True}, + 'locations': {'readonly': True}, + 'location_info': {'readonly': True}, + 'api_versions': {'readonly': True}, + 'costs': {'readonly': True}, + 'capabilities': {'readonly': True}, + 'restrictions': {'readonly': True}, + } + + _attribute_map = { + 'resource_type': {'key': 'resourceType', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'tier': {'key': 'tier', 'type': 'str'}, + 'size': {'key': 'size', 'type': 'str'}, + 'family': {'key': 'family', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'capacity': {'key': 'capacity', 'type': 'ResourceSkuCapacity'}, + 'locations': {'key': 'locations', 'type': '[str]'}, + 'location_info': {'key': 'locationInfo', 'type': '[ResourceSkuLocationInfo]'}, + 'api_versions': {'key': 'apiVersions', 'type': '[str]'}, + 'costs': {'key': 'costs', 'type': '[ResourceSkuCosts]'}, + 'capabilities': {'key': 'capabilities', 'type': '[ResourceSkuCapabilities]'}, + 'restrictions': {'key': 'restrictions', 'type': '[ResourceSkuRestrictions]'}, + } + + def __init__(self, **kwargs) -> None: + super(ResourceSku, self).__init__(**kwargs) + self.resource_type = None + self.name = None + self.tier = None + self.size = None + self.family = None + self.kind = None + self.capacity = None + self.locations = None + self.location_info = None + self.api_versions = None + self.costs = None + self.capabilities = None + self.restrictions = None + + +class ResourceSkuCapabilities(Model): + """Describes The SKU capabilities object. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar name: An invariant to describe the feature. + :vartype name: str + :ivar value: An invariant if the feature is measured by quantity. + :vartype value: str + """ + + _validation = { + 'name': {'readonly': True}, + 'value': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'value': {'key': 'value', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(ResourceSkuCapabilities, self).__init__(**kwargs) + self.name = None + self.value = None + + +class ResourceSkuCapacity(Model): + """Describes scaling information of a SKU. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar minimum: The minimum capacity. + :vartype minimum: long + :ivar maximum: The maximum capacity that can be set. + :vartype maximum: long + :ivar default: The default capacity. + :vartype default: long + :ivar scale_type: The scale type applicable to the sku. Possible values + include: 'Automatic', 'Manual', 'None' + :vartype scale_type: str or + ~azure.mgmt.compute.v2017_09_01.models.ResourceSkuCapacityScaleType + """ + + _validation = { + 'minimum': {'readonly': True}, + 'maximum': {'readonly': True}, + 'default': {'readonly': True}, + 'scale_type': {'readonly': True}, + } + + _attribute_map = { + 'minimum': {'key': 'minimum', 'type': 'long'}, + 'maximum': {'key': 'maximum', 'type': 'long'}, + 'default': {'key': 'default', 'type': 'long'}, + 'scale_type': {'key': 'scaleType', 'type': 'ResourceSkuCapacityScaleType'}, + } + + def __init__(self, **kwargs) -> None: + super(ResourceSkuCapacity, self).__init__(**kwargs) + self.minimum = None + self.maximum = None + self.default = None + self.scale_type = None + + +class ResourceSkuCosts(Model): + """Describes metadata for retrieving price info. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar meter_id: Used for querying price from commerce. + :vartype meter_id: str + :ivar quantity: The multiplier is needed to extend the base metered cost. + :vartype quantity: long + :ivar extended_unit: An invariant to show the extended unit. + :vartype extended_unit: str + """ + + _validation = { + 'meter_id': {'readonly': True}, + 'quantity': {'readonly': True}, + 'extended_unit': {'readonly': True}, + } + + _attribute_map = { + 'meter_id': {'key': 'meterID', 'type': 'str'}, + 'quantity': {'key': 'quantity', 'type': 'long'}, + 'extended_unit': {'key': 'extendedUnit', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(ResourceSkuCosts, self).__init__(**kwargs) + self.meter_id = None + self.quantity = None + self.extended_unit = None + + +class ResourceSkuLocationInfo(Model): + """ResourceSkuLocationInfo. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar location: Location of the SKU + :vartype location: str + :ivar zones: List of availability zones where the SKU is supported. + :vartype zones: list[str] + """ + + _validation = { + 'location': {'readonly': True}, + 'zones': {'readonly': True}, + } + + _attribute_map = { + 'location': {'key': 'location', 'type': 'str'}, + 'zones': {'key': 'zones', 'type': '[str]'}, + } + + def __init__(self, **kwargs) -> None: + super(ResourceSkuLocationInfo, self).__init__(**kwargs) + self.location = None + self.zones = None + + +class ResourceSkuRestrictionInfo(Model): + """ResourceSkuRestrictionInfo. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar locations: Locations where the SKU is restricted + :vartype locations: list[str] + :ivar zones: List of availability zones where the SKU is restricted. + :vartype zones: list[str] + """ + + _validation = { + 'locations': {'readonly': True}, + 'zones': {'readonly': True}, + } + + _attribute_map = { + 'locations': {'key': 'locations', 'type': '[str]'}, + 'zones': {'key': 'zones', 'type': '[str]'}, + } + + def __init__(self, **kwargs) -> None: + super(ResourceSkuRestrictionInfo, self).__init__(**kwargs) + self.locations = None + self.zones = None + + +class ResourceSkuRestrictions(Model): + """Describes scaling information of a SKU. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar type: The type of restrictions. Possible values include: 'Location', + 'Zone' + :vartype type: str or + ~azure.mgmt.compute.v2017_09_01.models.ResourceSkuRestrictionsType + :ivar values: The value of restrictions. If the restriction type is set to + location. This would be different locations where the SKU is restricted. + :vartype values: list[str] + :ivar restriction_info: The information about the restriction where the + SKU cannot be used. + :vartype restriction_info: + ~azure.mgmt.compute.v2017_09_01.models.ResourceSkuRestrictionInfo + :ivar reason_code: The reason for restriction. Possible values include: + 'QuotaId', 'NotAvailableForSubscription' + :vartype reason_code: str or + ~azure.mgmt.compute.v2017_09_01.models.ResourceSkuRestrictionsReasonCode + """ + + _validation = { + 'type': {'readonly': True}, + 'values': {'readonly': True}, + 'restriction_info': {'readonly': True}, + 'reason_code': {'readonly': True}, + } + + _attribute_map = { + 'type': {'key': 'type', 'type': 'ResourceSkuRestrictionsType'}, + 'values': {'key': 'values', 'type': '[str]'}, + 'restriction_info': {'key': 'restrictionInfo', 'type': 'ResourceSkuRestrictionInfo'}, + 'reason_code': {'key': 'reasonCode', 'type': 'ResourceSkuRestrictionsReasonCode'}, + } + + def __init__(self, **kwargs) -> None: + super(ResourceSkuRestrictions, self).__init__(**kwargs) + self.type = None + self.values = None + self.restriction_info = None + self.reason_code = None diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_09_01/models/resource_sku_paged.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_09_01/models/_paged_models.py similarity index 100% rename from sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_09_01/models/resource_sku_paged.py rename to sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_09_01/models/_paged_models.py diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_09_01/models/resource_sku.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_09_01/models/resource_sku.py deleted file mode 100644 index 4efb6a2db23a..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_09_01/models/resource_sku.py +++ /dev/null @@ -1,103 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ResourceSku(Model): - """Describes an available Compute SKU. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar resource_type: The type of resource the SKU applies to. - :vartype resource_type: str - :ivar name: The name of SKU. - :vartype name: str - :ivar tier: Specifies the tier of virtual machines in a scale set.

    Possible Values:

    **Standard**

    **Basic** - :vartype tier: str - :ivar size: The Size of the SKU. - :vartype size: str - :ivar family: The Family of this particular SKU. - :vartype family: str - :ivar kind: The Kind of resources that are supported in this SKU. - :vartype kind: str - :ivar capacity: Specifies the number of virtual machines in the scale set. - :vartype capacity: - ~azure.mgmt.compute.v2017_09_01.models.ResourceSkuCapacity - :ivar locations: The set of locations that the SKU is available. - :vartype locations: list[str] - :ivar location_info: A list of locations and availability zones in those - locations where the SKU is available. - :vartype location_info: - list[~azure.mgmt.compute.v2017_09_01.models.ResourceSkuLocationInfo] - :ivar api_versions: The api versions that support this SKU. - :vartype api_versions: list[str] - :ivar costs: Metadata for retrieving price info. - :vartype costs: - list[~azure.mgmt.compute.v2017_09_01.models.ResourceSkuCosts] - :ivar capabilities: A name value pair to describe the capability. - :vartype capabilities: - list[~azure.mgmt.compute.v2017_09_01.models.ResourceSkuCapabilities] - :ivar restrictions: The restrictions because of which SKU cannot be used. - This is empty if there are no restrictions. - :vartype restrictions: - list[~azure.mgmt.compute.v2017_09_01.models.ResourceSkuRestrictions] - """ - - _validation = { - 'resource_type': {'readonly': True}, - 'name': {'readonly': True}, - 'tier': {'readonly': True}, - 'size': {'readonly': True}, - 'family': {'readonly': True}, - 'kind': {'readonly': True}, - 'capacity': {'readonly': True}, - 'locations': {'readonly': True}, - 'location_info': {'readonly': True}, - 'api_versions': {'readonly': True}, - 'costs': {'readonly': True}, - 'capabilities': {'readonly': True}, - 'restrictions': {'readonly': True}, - } - - _attribute_map = { - 'resource_type': {'key': 'resourceType', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'tier': {'key': 'tier', 'type': 'str'}, - 'size': {'key': 'size', 'type': 'str'}, - 'family': {'key': 'family', 'type': 'str'}, - 'kind': {'key': 'kind', 'type': 'str'}, - 'capacity': {'key': 'capacity', 'type': 'ResourceSkuCapacity'}, - 'locations': {'key': 'locations', 'type': '[str]'}, - 'location_info': {'key': 'locationInfo', 'type': '[ResourceSkuLocationInfo]'}, - 'api_versions': {'key': 'apiVersions', 'type': '[str]'}, - 'costs': {'key': 'costs', 'type': '[ResourceSkuCosts]'}, - 'capabilities': {'key': 'capabilities', 'type': '[ResourceSkuCapabilities]'}, - 'restrictions': {'key': 'restrictions', 'type': '[ResourceSkuRestrictions]'}, - } - - def __init__(self, **kwargs): - super(ResourceSku, self).__init__(**kwargs) - self.resource_type = None - self.name = None - self.tier = None - self.size = None - self.family = None - self.kind = None - self.capacity = None - self.locations = None - self.location_info = None - self.api_versions = None - self.costs = None - self.capabilities = None - self.restrictions = None diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_09_01/models/resource_sku_capabilities.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_09_01/models/resource_sku_capabilities.py deleted file mode 100644 index 658167afc6d4..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_09_01/models/resource_sku_capabilities.py +++ /dev/null @@ -1,40 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ResourceSkuCapabilities(Model): - """Describes The SKU capabilities object. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar name: An invariant to describe the feature. - :vartype name: str - :ivar value: An invariant if the feature is measured by quantity. - :vartype value: str - """ - - _validation = { - 'name': {'readonly': True}, - 'value': {'readonly': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'value': {'key': 'value', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ResourceSkuCapabilities, self).__init__(**kwargs) - self.name = None - self.value = None diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_09_01/models/resource_sku_capabilities_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_09_01/models/resource_sku_capabilities_py3.py deleted file mode 100644 index 73a2631fc0aa..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_09_01/models/resource_sku_capabilities_py3.py +++ /dev/null @@ -1,40 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ResourceSkuCapabilities(Model): - """Describes The SKU capabilities object. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar name: An invariant to describe the feature. - :vartype name: str - :ivar value: An invariant if the feature is measured by quantity. - :vartype value: str - """ - - _validation = { - 'name': {'readonly': True}, - 'value': {'readonly': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'value': {'key': 'value', 'type': 'str'}, - } - - def __init__(self, **kwargs) -> None: - super(ResourceSkuCapabilities, self).__init__(**kwargs) - self.name = None - self.value = None diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_09_01/models/resource_sku_capacity.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_09_01/models/resource_sku_capacity.py deleted file mode 100644 index 54444d0a5191..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_09_01/models/resource_sku_capacity.py +++ /dev/null @@ -1,52 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ResourceSkuCapacity(Model): - """Describes scaling information of a SKU. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar minimum: The minimum capacity. - :vartype minimum: long - :ivar maximum: The maximum capacity that can be set. - :vartype maximum: long - :ivar default: The default capacity. - :vartype default: long - :ivar scale_type: The scale type applicable to the sku. Possible values - include: 'Automatic', 'Manual', 'None' - :vartype scale_type: str or - ~azure.mgmt.compute.v2017_09_01.models.ResourceSkuCapacityScaleType - """ - - _validation = { - 'minimum': {'readonly': True}, - 'maximum': {'readonly': True}, - 'default': {'readonly': True}, - 'scale_type': {'readonly': True}, - } - - _attribute_map = { - 'minimum': {'key': 'minimum', 'type': 'long'}, - 'maximum': {'key': 'maximum', 'type': 'long'}, - 'default': {'key': 'default', 'type': 'long'}, - 'scale_type': {'key': 'scaleType', 'type': 'ResourceSkuCapacityScaleType'}, - } - - def __init__(self, **kwargs): - super(ResourceSkuCapacity, self).__init__(**kwargs) - self.minimum = None - self.maximum = None - self.default = None - self.scale_type = None diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_09_01/models/resource_sku_capacity_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_09_01/models/resource_sku_capacity_py3.py deleted file mode 100644 index 9f87229170f4..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_09_01/models/resource_sku_capacity_py3.py +++ /dev/null @@ -1,52 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ResourceSkuCapacity(Model): - """Describes scaling information of a SKU. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar minimum: The minimum capacity. - :vartype minimum: long - :ivar maximum: The maximum capacity that can be set. - :vartype maximum: long - :ivar default: The default capacity. - :vartype default: long - :ivar scale_type: The scale type applicable to the sku. Possible values - include: 'Automatic', 'Manual', 'None' - :vartype scale_type: str or - ~azure.mgmt.compute.v2017_09_01.models.ResourceSkuCapacityScaleType - """ - - _validation = { - 'minimum': {'readonly': True}, - 'maximum': {'readonly': True}, - 'default': {'readonly': True}, - 'scale_type': {'readonly': True}, - } - - _attribute_map = { - 'minimum': {'key': 'minimum', 'type': 'long'}, - 'maximum': {'key': 'maximum', 'type': 'long'}, - 'default': {'key': 'default', 'type': 'long'}, - 'scale_type': {'key': 'scaleType', 'type': 'ResourceSkuCapacityScaleType'}, - } - - def __init__(self, **kwargs) -> None: - super(ResourceSkuCapacity, self).__init__(**kwargs) - self.minimum = None - self.maximum = None - self.default = None - self.scale_type = None diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_09_01/models/resource_sku_costs.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_09_01/models/resource_sku_costs.py deleted file mode 100644 index 293adaf0962c..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_09_01/models/resource_sku_costs.py +++ /dev/null @@ -1,45 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ResourceSkuCosts(Model): - """Describes metadata for retrieving price info. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar meter_id: Used for querying price from commerce. - :vartype meter_id: str - :ivar quantity: The multiplier is needed to extend the base metered cost. - :vartype quantity: long - :ivar extended_unit: An invariant to show the extended unit. - :vartype extended_unit: str - """ - - _validation = { - 'meter_id': {'readonly': True}, - 'quantity': {'readonly': True}, - 'extended_unit': {'readonly': True}, - } - - _attribute_map = { - 'meter_id': {'key': 'meterID', 'type': 'str'}, - 'quantity': {'key': 'quantity', 'type': 'long'}, - 'extended_unit': {'key': 'extendedUnit', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ResourceSkuCosts, self).__init__(**kwargs) - self.meter_id = None - self.quantity = None - self.extended_unit = None diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_09_01/models/resource_sku_costs_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_09_01/models/resource_sku_costs_py3.py deleted file mode 100644 index 59e7036807d6..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_09_01/models/resource_sku_costs_py3.py +++ /dev/null @@ -1,45 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ResourceSkuCosts(Model): - """Describes metadata for retrieving price info. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar meter_id: Used for querying price from commerce. - :vartype meter_id: str - :ivar quantity: The multiplier is needed to extend the base metered cost. - :vartype quantity: long - :ivar extended_unit: An invariant to show the extended unit. - :vartype extended_unit: str - """ - - _validation = { - 'meter_id': {'readonly': True}, - 'quantity': {'readonly': True}, - 'extended_unit': {'readonly': True}, - } - - _attribute_map = { - 'meter_id': {'key': 'meterID', 'type': 'str'}, - 'quantity': {'key': 'quantity', 'type': 'long'}, - 'extended_unit': {'key': 'extendedUnit', 'type': 'str'}, - } - - def __init__(self, **kwargs) -> None: - super(ResourceSkuCosts, self).__init__(**kwargs) - self.meter_id = None - self.quantity = None - self.extended_unit = None diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_09_01/models/resource_sku_location_info.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_09_01/models/resource_sku_location_info.py deleted file mode 100644 index 93527f5eda34..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_09_01/models/resource_sku_location_info.py +++ /dev/null @@ -1,40 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ResourceSkuLocationInfo(Model): - """ResourceSkuLocationInfo. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar location: Location of the SKU - :vartype location: str - :ivar zones: List of availability zones where the SKU is supported. - :vartype zones: list[str] - """ - - _validation = { - 'location': {'readonly': True}, - 'zones': {'readonly': True}, - } - - _attribute_map = { - 'location': {'key': 'location', 'type': 'str'}, - 'zones': {'key': 'zones', 'type': '[str]'}, - } - - def __init__(self, **kwargs): - super(ResourceSkuLocationInfo, self).__init__(**kwargs) - self.location = None - self.zones = None diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_09_01/models/resource_sku_location_info_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_09_01/models/resource_sku_location_info_py3.py deleted file mode 100644 index a03c6d92fe8e..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_09_01/models/resource_sku_location_info_py3.py +++ /dev/null @@ -1,40 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ResourceSkuLocationInfo(Model): - """ResourceSkuLocationInfo. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar location: Location of the SKU - :vartype location: str - :ivar zones: List of availability zones where the SKU is supported. - :vartype zones: list[str] - """ - - _validation = { - 'location': {'readonly': True}, - 'zones': {'readonly': True}, - } - - _attribute_map = { - 'location': {'key': 'location', 'type': 'str'}, - 'zones': {'key': 'zones', 'type': '[str]'}, - } - - def __init__(self, **kwargs) -> None: - super(ResourceSkuLocationInfo, self).__init__(**kwargs) - self.location = None - self.zones = None diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_09_01/models/resource_sku_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_09_01/models/resource_sku_py3.py deleted file mode 100644 index 7d98b1935d73..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_09_01/models/resource_sku_py3.py +++ /dev/null @@ -1,103 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ResourceSku(Model): - """Describes an available Compute SKU. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar resource_type: The type of resource the SKU applies to. - :vartype resource_type: str - :ivar name: The name of SKU. - :vartype name: str - :ivar tier: Specifies the tier of virtual machines in a scale set.

    Possible Values:

    **Standard**

    **Basic** - :vartype tier: str - :ivar size: The Size of the SKU. - :vartype size: str - :ivar family: The Family of this particular SKU. - :vartype family: str - :ivar kind: The Kind of resources that are supported in this SKU. - :vartype kind: str - :ivar capacity: Specifies the number of virtual machines in the scale set. - :vartype capacity: - ~azure.mgmt.compute.v2017_09_01.models.ResourceSkuCapacity - :ivar locations: The set of locations that the SKU is available. - :vartype locations: list[str] - :ivar location_info: A list of locations and availability zones in those - locations where the SKU is available. - :vartype location_info: - list[~azure.mgmt.compute.v2017_09_01.models.ResourceSkuLocationInfo] - :ivar api_versions: The api versions that support this SKU. - :vartype api_versions: list[str] - :ivar costs: Metadata for retrieving price info. - :vartype costs: - list[~azure.mgmt.compute.v2017_09_01.models.ResourceSkuCosts] - :ivar capabilities: A name value pair to describe the capability. - :vartype capabilities: - list[~azure.mgmt.compute.v2017_09_01.models.ResourceSkuCapabilities] - :ivar restrictions: The restrictions because of which SKU cannot be used. - This is empty if there are no restrictions. - :vartype restrictions: - list[~azure.mgmt.compute.v2017_09_01.models.ResourceSkuRestrictions] - """ - - _validation = { - 'resource_type': {'readonly': True}, - 'name': {'readonly': True}, - 'tier': {'readonly': True}, - 'size': {'readonly': True}, - 'family': {'readonly': True}, - 'kind': {'readonly': True}, - 'capacity': {'readonly': True}, - 'locations': {'readonly': True}, - 'location_info': {'readonly': True}, - 'api_versions': {'readonly': True}, - 'costs': {'readonly': True}, - 'capabilities': {'readonly': True}, - 'restrictions': {'readonly': True}, - } - - _attribute_map = { - 'resource_type': {'key': 'resourceType', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'tier': {'key': 'tier', 'type': 'str'}, - 'size': {'key': 'size', 'type': 'str'}, - 'family': {'key': 'family', 'type': 'str'}, - 'kind': {'key': 'kind', 'type': 'str'}, - 'capacity': {'key': 'capacity', 'type': 'ResourceSkuCapacity'}, - 'locations': {'key': 'locations', 'type': '[str]'}, - 'location_info': {'key': 'locationInfo', 'type': '[ResourceSkuLocationInfo]'}, - 'api_versions': {'key': 'apiVersions', 'type': '[str]'}, - 'costs': {'key': 'costs', 'type': '[ResourceSkuCosts]'}, - 'capabilities': {'key': 'capabilities', 'type': '[ResourceSkuCapabilities]'}, - 'restrictions': {'key': 'restrictions', 'type': '[ResourceSkuRestrictions]'}, - } - - def __init__(self, **kwargs) -> None: - super(ResourceSku, self).__init__(**kwargs) - self.resource_type = None - self.name = None - self.tier = None - self.size = None - self.family = None - self.kind = None - self.capacity = None - self.locations = None - self.location_info = None - self.api_versions = None - self.costs = None - self.capabilities = None - self.restrictions = None diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_09_01/models/resource_sku_restriction_info.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_09_01/models/resource_sku_restriction_info.py deleted file mode 100644 index 677e93463d58..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_09_01/models/resource_sku_restriction_info.py +++ /dev/null @@ -1,40 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ResourceSkuRestrictionInfo(Model): - """ResourceSkuRestrictionInfo. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar locations: Locations where the SKU is restricted - :vartype locations: list[str] - :ivar zones: List of availability zones where the SKU is restricted. - :vartype zones: list[str] - """ - - _validation = { - 'locations': {'readonly': True}, - 'zones': {'readonly': True}, - } - - _attribute_map = { - 'locations': {'key': 'locations', 'type': '[str]'}, - 'zones': {'key': 'zones', 'type': '[str]'}, - } - - def __init__(self, **kwargs): - super(ResourceSkuRestrictionInfo, self).__init__(**kwargs) - self.locations = None - self.zones = None diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_09_01/models/resource_sku_restriction_info_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_09_01/models/resource_sku_restriction_info_py3.py deleted file mode 100644 index 008cf8d4c5fa..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_09_01/models/resource_sku_restriction_info_py3.py +++ /dev/null @@ -1,40 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ResourceSkuRestrictionInfo(Model): - """ResourceSkuRestrictionInfo. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar locations: Locations where the SKU is restricted - :vartype locations: list[str] - :ivar zones: List of availability zones where the SKU is restricted. - :vartype zones: list[str] - """ - - _validation = { - 'locations': {'readonly': True}, - 'zones': {'readonly': True}, - } - - _attribute_map = { - 'locations': {'key': 'locations', 'type': '[str]'}, - 'zones': {'key': 'zones', 'type': '[str]'}, - } - - def __init__(self, **kwargs) -> None: - super(ResourceSkuRestrictionInfo, self).__init__(**kwargs) - self.locations = None - self.zones = None diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_09_01/models/resource_sku_restrictions.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_09_01/models/resource_sku_restrictions.py deleted file mode 100644 index 1aeefcc483bd..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_09_01/models/resource_sku_restrictions.py +++ /dev/null @@ -1,57 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ResourceSkuRestrictions(Model): - """Describes scaling information of a SKU. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar type: The type of restrictions. Possible values include: 'Location', - 'Zone' - :vartype type: str or - ~azure.mgmt.compute.v2017_09_01.models.ResourceSkuRestrictionsType - :ivar values: The value of restrictions. If the restriction type is set to - location. This would be different locations where the SKU is restricted. - :vartype values: list[str] - :ivar restriction_info: The information about the restriction where the - SKU cannot be used. - :vartype restriction_info: - ~azure.mgmt.compute.v2017_09_01.models.ResourceSkuRestrictionInfo - :ivar reason_code: The reason for restriction. Possible values include: - 'QuotaId', 'NotAvailableForSubscription' - :vartype reason_code: str or - ~azure.mgmt.compute.v2017_09_01.models.ResourceSkuRestrictionsReasonCode - """ - - _validation = { - 'type': {'readonly': True}, - 'values': {'readonly': True}, - 'restriction_info': {'readonly': True}, - 'reason_code': {'readonly': True}, - } - - _attribute_map = { - 'type': {'key': 'type', 'type': 'ResourceSkuRestrictionsType'}, - 'values': {'key': 'values', 'type': '[str]'}, - 'restriction_info': {'key': 'restrictionInfo', 'type': 'ResourceSkuRestrictionInfo'}, - 'reason_code': {'key': 'reasonCode', 'type': 'ResourceSkuRestrictionsReasonCode'}, - } - - def __init__(self, **kwargs): - super(ResourceSkuRestrictions, self).__init__(**kwargs) - self.type = None - self.values = None - self.restriction_info = None - self.reason_code = None diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_09_01/models/resource_sku_restrictions_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_09_01/models/resource_sku_restrictions_py3.py deleted file mode 100644 index 24d45f0f78ed..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_09_01/models/resource_sku_restrictions_py3.py +++ /dev/null @@ -1,57 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ResourceSkuRestrictions(Model): - """Describes scaling information of a SKU. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar type: The type of restrictions. Possible values include: 'Location', - 'Zone' - :vartype type: str or - ~azure.mgmt.compute.v2017_09_01.models.ResourceSkuRestrictionsType - :ivar values: The value of restrictions. If the restriction type is set to - location. This would be different locations where the SKU is restricted. - :vartype values: list[str] - :ivar restriction_info: The information about the restriction where the - SKU cannot be used. - :vartype restriction_info: - ~azure.mgmt.compute.v2017_09_01.models.ResourceSkuRestrictionInfo - :ivar reason_code: The reason for restriction. Possible values include: - 'QuotaId', 'NotAvailableForSubscription' - :vartype reason_code: str or - ~azure.mgmt.compute.v2017_09_01.models.ResourceSkuRestrictionsReasonCode - """ - - _validation = { - 'type': {'readonly': True}, - 'values': {'readonly': True}, - 'restriction_info': {'readonly': True}, - 'reason_code': {'readonly': True}, - } - - _attribute_map = { - 'type': {'key': 'type', 'type': 'ResourceSkuRestrictionsType'}, - 'values': {'key': 'values', 'type': '[str]'}, - 'restriction_info': {'key': 'restrictionInfo', 'type': 'ResourceSkuRestrictionInfo'}, - 'reason_code': {'key': 'reasonCode', 'type': 'ResourceSkuRestrictionsReasonCode'}, - } - - def __init__(self, **kwargs) -> None: - super(ResourceSkuRestrictions, self).__init__(**kwargs) - self.type = None - self.values = None - self.restriction_info = None - self.reason_code = None diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_09_01/operations/__init__.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_09_01/operations/__init__.py index 2df0e5028143..00013c3b54ed 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_09_01/operations/__init__.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_09_01/operations/__init__.py @@ -9,7 +9,7 @@ # regenerated. # -------------------------------------------------------------------------- -from .resource_skus_operations import ResourceSkusOperations +from ._resource_skus_operations import ResourceSkusOperations __all__ = [ 'ResourceSkusOperations', diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_09_01/operations/_resource_skus_operations.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_09_01/operations/_resource_skus_operations.py new file mode 100644 index 000000000000..914355023aed --- /dev/null +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_09_01/operations/_resource_skus_operations.py @@ -0,0 +1,107 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse +from msrestazure.azure_exceptions import CloudError + +from .. import models + + +class ResourceSkusOperations(object): + """ResourceSkusOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: Client Api Version. Constant value: "2017-09-01". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2017-09-01" + + self.config = config + + def list( + self, custom_headers=None, raw=False, **operation_config): + """Gets the list of Microsoft.Compute SKUs available for your + Subscription. + + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of ResourceSku + :rtype: + ~azure.mgmt.compute.v2017_09_01.models.ResourceSkuPaged[~azure.mgmt.compute.v2017_09_01.models.ResourceSku] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.ResourceSkuPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Compute/skus'} diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_09_01/operations/resource_skus_operations.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_09_01/operations/resource_skus_operations.py deleted file mode 100644 index a1e7842f3de1..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_09_01/operations/resource_skus_operations.py +++ /dev/null @@ -1,103 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError - -from .. import models - - -class ResourceSkusOperations(object): - """ResourceSkusOperations operations. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: Client Api Version. Constant value: "2017-09-01". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2017-09-01" - - self.config = config - - def list( - self, custom_headers=None, raw=False, **operation_config): - """Gets the list of Microsoft.Compute SKUs available for your - Subscription. - - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of ResourceSku - :rtype: - ~azure.mgmt.compute.v2017_09_01.models.ResourceSkuPaged[~azure.mgmt.compute.v2017_09_01.models.ResourceSku] - :raises: :class:`CloudError` - """ - def internal_paging(next_link=None, raw=False): - - if not next_link: - # Construct URL - url = self.list.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - deserialized = models.ResourceSkuPaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.ResourceSkuPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Compute/skus'} diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/__init__.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/__init__.py index 88ded2f640de..a7bc1ce68e37 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/__init__.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/__init__.py @@ -9,10 +9,11 @@ # regenerated. # -------------------------------------------------------------------------- -from .compute_management_client import ComputeManagementClient -from .version import VERSION +from ._configuration import ComputeManagementClientConfiguration +from ._compute_management_client import ComputeManagementClient +__all__ = ['ComputeManagementClient', 'ComputeManagementClientConfiguration'] -__all__ = ['ComputeManagementClient'] +from .version import VERSION __version__ = VERSION diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/_compute_management_client.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/_compute_management_client.py new file mode 100644 index 000000000000..784073b24b36 --- /dev/null +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/_compute_management_client.py @@ -0,0 +1,121 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.service_client import SDKClient +from msrest import Serializer, Deserializer + +from ._configuration import ComputeManagementClientConfiguration +from .operations import Operations +from .operations import AvailabilitySetsOperations +from .operations import VirtualMachineExtensionImagesOperations +from .operations import VirtualMachineExtensionsOperations +from .operations import VirtualMachinesOperations +from .operations import VirtualMachineImagesOperations +from .operations import UsageOperations +from .operations import VirtualMachineSizesOperations +from .operations import ImagesOperations +from .operations import VirtualMachineScaleSetsOperations +from .operations import VirtualMachineScaleSetExtensionsOperations +from .operations import VirtualMachineScaleSetRollingUpgradesOperations +from .operations import VirtualMachineScaleSetVMsOperations +from .operations import LogAnalyticsOperations +from .operations import VirtualMachineRunCommandsOperations +from . import models + + +class ComputeManagementClient(SDKClient): + """Compute Client + + :ivar config: Configuration for client. + :vartype config: ComputeManagementClientConfiguration + + :ivar operations: Operations operations + :vartype operations: azure.mgmt.compute.v2017_12_01.operations.Operations + :ivar availability_sets: AvailabilitySets operations + :vartype availability_sets: azure.mgmt.compute.v2017_12_01.operations.AvailabilitySetsOperations + :ivar virtual_machine_extension_images: VirtualMachineExtensionImages operations + :vartype virtual_machine_extension_images: azure.mgmt.compute.v2017_12_01.operations.VirtualMachineExtensionImagesOperations + :ivar virtual_machine_extensions: VirtualMachineExtensions operations + :vartype virtual_machine_extensions: azure.mgmt.compute.v2017_12_01.operations.VirtualMachineExtensionsOperations + :ivar virtual_machines: VirtualMachines operations + :vartype virtual_machines: azure.mgmt.compute.v2017_12_01.operations.VirtualMachinesOperations + :ivar virtual_machine_images: VirtualMachineImages operations + :vartype virtual_machine_images: azure.mgmt.compute.v2017_12_01.operations.VirtualMachineImagesOperations + :ivar usage: Usage operations + :vartype usage: azure.mgmt.compute.v2017_12_01.operations.UsageOperations + :ivar virtual_machine_sizes: VirtualMachineSizes operations + :vartype virtual_machine_sizes: azure.mgmt.compute.v2017_12_01.operations.VirtualMachineSizesOperations + :ivar images: Images operations + :vartype images: azure.mgmt.compute.v2017_12_01.operations.ImagesOperations + :ivar virtual_machine_scale_sets: VirtualMachineScaleSets operations + :vartype virtual_machine_scale_sets: azure.mgmt.compute.v2017_12_01.operations.VirtualMachineScaleSetsOperations + :ivar virtual_machine_scale_set_extensions: VirtualMachineScaleSetExtensions operations + :vartype virtual_machine_scale_set_extensions: azure.mgmt.compute.v2017_12_01.operations.VirtualMachineScaleSetExtensionsOperations + :ivar virtual_machine_scale_set_rolling_upgrades: VirtualMachineScaleSetRollingUpgrades operations + :vartype virtual_machine_scale_set_rolling_upgrades: azure.mgmt.compute.v2017_12_01.operations.VirtualMachineScaleSetRollingUpgradesOperations + :ivar virtual_machine_scale_set_vms: VirtualMachineScaleSetVMs operations + :vartype virtual_machine_scale_set_vms: azure.mgmt.compute.v2017_12_01.operations.VirtualMachineScaleSetVMsOperations + :ivar log_analytics: LogAnalytics operations + :vartype log_analytics: azure.mgmt.compute.v2017_12_01.operations.LogAnalyticsOperations + :ivar virtual_machine_run_commands: VirtualMachineRunCommands operations + :vartype virtual_machine_run_commands: azure.mgmt.compute.v2017_12_01.operations.VirtualMachineRunCommandsOperations + + :param credentials: Credentials needed for the client to connect to Azure. + :type credentials: :mod:`A msrestazure Credentials + object` + :param subscription_id: Subscription credentials which uniquely identify + Microsoft Azure subscription. The subscription ID forms part of the URI + for every service call. + :type subscription_id: str + :param str base_url: Service URL + """ + + def __init__( + self, credentials, subscription_id, base_url=None): + + self.config = ComputeManagementClientConfiguration(credentials, subscription_id, base_url) + super(ComputeManagementClient, self).__init__(self.config.credentials, self.config) + + client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} + self.api_version = '2017-12-01' + self._serialize = Serializer(client_models) + self._deserialize = Deserializer(client_models) + + self.operations = Operations( + self._client, self.config, self._serialize, self._deserialize) + self.availability_sets = AvailabilitySetsOperations( + self._client, self.config, self._serialize, self._deserialize) + self.virtual_machine_extension_images = VirtualMachineExtensionImagesOperations( + self._client, self.config, self._serialize, self._deserialize) + self.virtual_machine_extensions = VirtualMachineExtensionsOperations( + self._client, self.config, self._serialize, self._deserialize) + self.virtual_machines = VirtualMachinesOperations( + self._client, self.config, self._serialize, self._deserialize) + self.virtual_machine_images = VirtualMachineImagesOperations( + self._client, self.config, self._serialize, self._deserialize) + self.usage = UsageOperations( + self._client, self.config, self._serialize, self._deserialize) + self.virtual_machine_sizes = VirtualMachineSizesOperations( + self._client, self.config, self._serialize, self._deserialize) + self.images = ImagesOperations( + self._client, self.config, self._serialize, self._deserialize) + self.virtual_machine_scale_sets = VirtualMachineScaleSetsOperations( + self._client, self.config, self._serialize, self._deserialize) + self.virtual_machine_scale_set_extensions = VirtualMachineScaleSetExtensionsOperations( + self._client, self.config, self._serialize, self._deserialize) + self.virtual_machine_scale_set_rolling_upgrades = VirtualMachineScaleSetRollingUpgradesOperations( + self._client, self.config, self._serialize, self._deserialize) + self.virtual_machine_scale_set_vms = VirtualMachineScaleSetVMsOperations( + self._client, self.config, self._serialize, self._deserialize) + self.log_analytics = LogAnalyticsOperations( + self._client, self.config, self._serialize, self._deserialize) + self.virtual_machine_run_commands = VirtualMachineRunCommandsOperations( + self._client, self.config, self._serialize, self._deserialize) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/_configuration.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/_configuration.py new file mode 100644 index 000000000000..0fcf5984e2ca --- /dev/null +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/_configuration.py @@ -0,0 +1,50 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- +from msrestazure import AzureConfiguration + +from .version import VERSION + + +class ComputeManagementClientConfiguration(AzureConfiguration): + """Configuration for ComputeManagementClient + Note that all parameters used to create this instance are saved as instance + attributes. + + :param credentials: Credentials needed for the client to connect to Azure. + :type credentials: :mod:`A msrestazure Credentials + object` + :param subscription_id: Subscription credentials which uniquely identify + Microsoft Azure subscription. The subscription ID forms part of the URI + for every service call. + :type subscription_id: str + :param str base_url: Service URL + """ + + def __init__( + self, credentials, subscription_id, base_url=None): + + if credentials is None: + raise ValueError("Parameter 'credentials' must not be None.") + if subscription_id is None: + raise ValueError("Parameter 'subscription_id' must not be None.") + if not base_url: + base_url = 'https://management.azure.com' + + super(ComputeManagementClientConfiguration, self).__init__(base_url) + + # Starting Autorest.Python 4.0.64, make connection pool activated by default + self.keep_alive = True + + self.add_user_agent('azure-mgmt-compute/{}'.format(VERSION)) + self.add_user_agent('Azure-SDK-For-Python') + + self.credentials = credentials + self.subscription_id = subscription_id diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/compute_management_client.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/compute_management_client.py deleted file mode 100644 index fcd609539a4e..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/compute_management_client.py +++ /dev/null @@ -1,155 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.service_client import SDKClient -from msrest import Serializer, Deserializer -from msrestazure import AzureConfiguration -from .version import VERSION -from .operations.operations import Operations -from .operations.availability_sets_operations import AvailabilitySetsOperations -from .operations.virtual_machine_extension_images_operations import VirtualMachineExtensionImagesOperations -from .operations.virtual_machine_extensions_operations import VirtualMachineExtensionsOperations -from .operations.virtual_machines_operations import VirtualMachinesOperations -from .operations.virtual_machine_images_operations import VirtualMachineImagesOperations -from .operations.usage_operations import UsageOperations -from .operations.virtual_machine_sizes_operations import VirtualMachineSizesOperations -from .operations.images_operations import ImagesOperations -from .operations.virtual_machine_scale_sets_operations import VirtualMachineScaleSetsOperations -from .operations.virtual_machine_scale_set_extensions_operations import VirtualMachineScaleSetExtensionsOperations -from .operations.virtual_machine_scale_set_rolling_upgrades_operations import VirtualMachineScaleSetRollingUpgradesOperations -from .operations.virtual_machine_scale_set_vms_operations import VirtualMachineScaleSetVMsOperations -from .operations.log_analytics_operations import LogAnalyticsOperations -from .operations.virtual_machine_run_commands_operations import VirtualMachineRunCommandsOperations -from . import models - - -class ComputeManagementClientConfiguration(AzureConfiguration): - """Configuration for ComputeManagementClient - Note that all parameters used to create this instance are saved as instance - attributes. - - :param credentials: Credentials needed for the client to connect to Azure. - :type credentials: :mod:`A msrestazure Credentials - object` - :param subscription_id: Subscription credentials which uniquely identify - Microsoft Azure subscription. The subscription ID forms part of the URI - for every service call. - :type subscription_id: str - :param str base_url: Service URL - """ - - def __init__( - self, credentials, subscription_id, base_url=None): - - if credentials is None: - raise ValueError("Parameter 'credentials' must not be None.") - if subscription_id is None: - raise ValueError("Parameter 'subscription_id' must not be None.") - if not base_url: - base_url = 'https://management.azure.com' - - super(ComputeManagementClientConfiguration, self).__init__(base_url) - - self.add_user_agent('azure-mgmt-compute/{}'.format(VERSION)) - self.add_user_agent('Azure-SDK-For-Python') - - self.credentials = credentials - self.subscription_id = subscription_id - - -class ComputeManagementClient(SDKClient): - """Compute Client - - :ivar config: Configuration for client. - :vartype config: ComputeManagementClientConfiguration - - :ivar operations: Operations operations - :vartype operations: azure.mgmt.compute.v2017_12_01.operations.Operations - :ivar availability_sets: AvailabilitySets operations - :vartype availability_sets: azure.mgmt.compute.v2017_12_01.operations.AvailabilitySetsOperations - :ivar virtual_machine_extension_images: VirtualMachineExtensionImages operations - :vartype virtual_machine_extension_images: azure.mgmt.compute.v2017_12_01.operations.VirtualMachineExtensionImagesOperations - :ivar virtual_machine_extensions: VirtualMachineExtensions operations - :vartype virtual_machine_extensions: azure.mgmt.compute.v2017_12_01.operations.VirtualMachineExtensionsOperations - :ivar virtual_machines: VirtualMachines operations - :vartype virtual_machines: azure.mgmt.compute.v2017_12_01.operations.VirtualMachinesOperations - :ivar virtual_machine_images: VirtualMachineImages operations - :vartype virtual_machine_images: azure.mgmt.compute.v2017_12_01.operations.VirtualMachineImagesOperations - :ivar usage: Usage operations - :vartype usage: azure.mgmt.compute.v2017_12_01.operations.UsageOperations - :ivar virtual_machine_sizes: VirtualMachineSizes operations - :vartype virtual_machine_sizes: azure.mgmt.compute.v2017_12_01.operations.VirtualMachineSizesOperations - :ivar images: Images operations - :vartype images: azure.mgmt.compute.v2017_12_01.operations.ImagesOperations - :ivar virtual_machine_scale_sets: VirtualMachineScaleSets operations - :vartype virtual_machine_scale_sets: azure.mgmt.compute.v2017_12_01.operations.VirtualMachineScaleSetsOperations - :ivar virtual_machine_scale_set_extensions: VirtualMachineScaleSetExtensions operations - :vartype virtual_machine_scale_set_extensions: azure.mgmt.compute.v2017_12_01.operations.VirtualMachineScaleSetExtensionsOperations - :ivar virtual_machine_scale_set_rolling_upgrades: VirtualMachineScaleSetRollingUpgrades operations - :vartype virtual_machine_scale_set_rolling_upgrades: azure.mgmt.compute.v2017_12_01.operations.VirtualMachineScaleSetRollingUpgradesOperations - :ivar virtual_machine_scale_set_vms: VirtualMachineScaleSetVMs operations - :vartype virtual_machine_scale_set_vms: azure.mgmt.compute.v2017_12_01.operations.VirtualMachineScaleSetVMsOperations - :ivar log_analytics: LogAnalytics operations - :vartype log_analytics: azure.mgmt.compute.v2017_12_01.operations.LogAnalyticsOperations - :ivar virtual_machine_run_commands: VirtualMachineRunCommands operations - :vartype virtual_machine_run_commands: azure.mgmt.compute.v2017_12_01.operations.VirtualMachineRunCommandsOperations - - :param credentials: Credentials needed for the client to connect to Azure. - :type credentials: :mod:`A msrestazure Credentials - object` - :param subscription_id: Subscription credentials which uniquely identify - Microsoft Azure subscription. The subscription ID forms part of the URI - for every service call. - :type subscription_id: str - :param str base_url: Service URL - """ - - def __init__( - self, credentials, subscription_id, base_url=None): - - self.config = ComputeManagementClientConfiguration(credentials, subscription_id, base_url) - super(ComputeManagementClient, self).__init__(self.config.credentials, self.config) - - client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} - self.api_version = '2017-12-01' - self._serialize = Serializer(client_models) - self._deserialize = Deserializer(client_models) - - self.operations = Operations( - self._client, self.config, self._serialize, self._deserialize) - self.availability_sets = AvailabilitySetsOperations( - self._client, self.config, self._serialize, self._deserialize) - self.virtual_machine_extension_images = VirtualMachineExtensionImagesOperations( - self._client, self.config, self._serialize, self._deserialize) - self.virtual_machine_extensions = VirtualMachineExtensionsOperations( - self._client, self.config, self._serialize, self._deserialize) - self.virtual_machines = VirtualMachinesOperations( - self._client, self.config, self._serialize, self._deserialize) - self.virtual_machine_images = VirtualMachineImagesOperations( - self._client, self.config, self._serialize, self._deserialize) - self.usage = UsageOperations( - self._client, self.config, self._serialize, self._deserialize) - self.virtual_machine_sizes = VirtualMachineSizesOperations( - self._client, self.config, self._serialize, self._deserialize) - self.images = ImagesOperations( - self._client, self.config, self._serialize, self._deserialize) - self.virtual_machine_scale_sets = VirtualMachineScaleSetsOperations( - self._client, self.config, self._serialize, self._deserialize) - self.virtual_machine_scale_set_extensions = VirtualMachineScaleSetExtensionsOperations( - self._client, self.config, self._serialize, self._deserialize) - self.virtual_machine_scale_set_rolling_upgrades = VirtualMachineScaleSetRollingUpgradesOperations( - self._client, self.config, self._serialize, self._deserialize) - self.virtual_machine_scale_set_vms = VirtualMachineScaleSetVMsOperations( - self._client, self.config, self._serialize, self._deserialize) - self.log_analytics = LogAnalyticsOperations( - self._client, self.config, self._serialize, self._deserialize) - self.virtual_machine_run_commands = VirtualMachineRunCommandsOperations( - self._client, self.config, self._serialize, self._deserialize) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/__init__.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/__init__.py index a3e0cce25339..976da5a4e91a 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/__init__.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/__init__.py @@ -10,274 +10,274 @@ # -------------------------------------------------------------------------- try: - from .compute_operation_value_py3 import ComputeOperationValue - from .instance_view_status_py3 import InstanceViewStatus - from .sub_resource_py3 import SubResource - from .sku_py3 import Sku - from .availability_set_py3 import AvailabilitySet - from .availability_set_update_py3 import AvailabilitySetUpdate - from .virtual_machine_size_py3 import VirtualMachineSize - from .virtual_machine_extension_image_py3 import VirtualMachineExtensionImage - from .virtual_machine_image_resource_py3 import VirtualMachineImageResource - from .virtual_machine_extension_instance_view_py3 import VirtualMachineExtensionInstanceView - from .virtual_machine_extension_py3 import VirtualMachineExtension - from .virtual_machine_extension_update_py3 import VirtualMachineExtensionUpdate - from .virtual_machine_extensions_list_result_py3 import VirtualMachineExtensionsListResult - from .purchase_plan_py3 import PurchasePlan - from .os_disk_image_py3 import OSDiskImage - from .data_disk_image_py3 import DataDiskImage - from .virtual_machine_image_py3 import VirtualMachineImage - from .usage_name_py3 import UsageName - from .usage_py3 import Usage - from .virtual_machine_capture_parameters_py3 import VirtualMachineCaptureParameters - from .virtual_machine_capture_result_py3 import VirtualMachineCaptureResult - from .plan_py3 import Plan - from .hardware_profile_py3 import HardwareProfile - from .image_reference_py3 import ImageReference - from .key_vault_secret_reference_py3 import KeyVaultSecretReference - from .key_vault_key_reference_py3 import KeyVaultKeyReference - from .disk_encryption_settings_py3 import DiskEncryptionSettings - from .virtual_hard_disk_py3 import VirtualHardDisk - from .managed_disk_parameters_py3 import ManagedDiskParameters - from .os_disk_py3 import OSDisk - from .data_disk_py3 import DataDisk - from .storage_profile_py3 import StorageProfile - from .additional_unattend_content_py3 import AdditionalUnattendContent - from .win_rm_listener_py3 import WinRMListener - from .win_rm_configuration_py3 import WinRMConfiguration - from .windows_configuration_py3 import WindowsConfiguration - from .ssh_public_key_py3 import SshPublicKey - from .ssh_configuration_py3 import SshConfiguration - from .linux_configuration_py3 import LinuxConfiguration - from .vault_certificate_py3 import VaultCertificate - from .vault_secret_group_py3 import VaultSecretGroup - from .os_profile_py3 import OSProfile - from .network_interface_reference_py3 import NetworkInterfaceReference - from .network_profile_py3 import NetworkProfile - from .boot_diagnostics_py3 import BootDiagnostics - from .diagnostics_profile_py3 import DiagnosticsProfile - from .virtual_machine_extension_handler_instance_view_py3 import VirtualMachineExtensionHandlerInstanceView - from .virtual_machine_agent_instance_view_py3 import VirtualMachineAgentInstanceView - from .disk_instance_view_py3 import DiskInstanceView - from .boot_diagnostics_instance_view_py3 import BootDiagnosticsInstanceView - from .virtual_machine_identity_py3 import VirtualMachineIdentity - from .maintenance_redeploy_status_py3 import MaintenanceRedeployStatus - from .virtual_machine_instance_view_py3 import VirtualMachineInstanceView - from .virtual_machine_py3 import VirtualMachine - from .virtual_machine_update_py3 import VirtualMachineUpdate - from .auto_os_upgrade_policy_py3 import AutoOSUpgradePolicy - from .rolling_upgrade_policy_py3 import RollingUpgradePolicy - from .upgrade_policy_py3 import UpgradePolicy - from .image_os_disk_py3 import ImageOSDisk - from .image_data_disk_py3 import ImageDataDisk - from .image_storage_profile_py3 import ImageStorageProfile - from .image_py3 import Image - from .image_update_py3 import ImageUpdate - from .virtual_machine_scale_set_identity_py3 import VirtualMachineScaleSetIdentity - from .virtual_machine_scale_set_os_profile_py3 import VirtualMachineScaleSetOSProfile - from .virtual_machine_scale_set_update_os_profile_py3 import VirtualMachineScaleSetUpdateOSProfile - from .virtual_machine_scale_set_managed_disk_parameters_py3 import VirtualMachineScaleSetManagedDiskParameters - from .virtual_machine_scale_set_os_disk_py3 import VirtualMachineScaleSetOSDisk - from .virtual_machine_scale_set_update_os_disk_py3 import VirtualMachineScaleSetUpdateOSDisk - from .virtual_machine_scale_set_data_disk_py3 import VirtualMachineScaleSetDataDisk - from .virtual_machine_scale_set_storage_profile_py3 import VirtualMachineScaleSetStorageProfile - from .virtual_machine_scale_set_update_storage_profile_py3 import VirtualMachineScaleSetUpdateStorageProfile - from .api_entity_reference_py3 import ApiEntityReference - from .virtual_machine_scale_set_public_ip_address_configuration_dns_settings_py3 import VirtualMachineScaleSetPublicIPAddressConfigurationDnsSettings - from .virtual_machine_scale_set_public_ip_address_configuration_py3 import VirtualMachineScaleSetPublicIPAddressConfiguration - from .virtual_machine_scale_set_update_public_ip_address_configuration_py3 import VirtualMachineScaleSetUpdatePublicIPAddressConfiguration - from .virtual_machine_scale_set_ip_configuration_py3 import VirtualMachineScaleSetIPConfiguration - from .virtual_machine_scale_set_update_ip_configuration_py3 import VirtualMachineScaleSetUpdateIPConfiguration - from .virtual_machine_scale_set_network_configuration_dns_settings_py3 import VirtualMachineScaleSetNetworkConfigurationDnsSettings - from .virtual_machine_scale_set_network_configuration_py3 import VirtualMachineScaleSetNetworkConfiguration - from .virtual_machine_scale_set_update_network_configuration_py3 import VirtualMachineScaleSetUpdateNetworkConfiguration - from .virtual_machine_scale_set_network_profile_py3 import VirtualMachineScaleSetNetworkProfile - from .virtual_machine_scale_set_update_network_profile_py3 import VirtualMachineScaleSetUpdateNetworkProfile - from .virtual_machine_scale_set_extension_py3 import VirtualMachineScaleSetExtension - from .virtual_machine_scale_set_extension_profile_py3 import VirtualMachineScaleSetExtensionProfile - from .virtual_machine_scale_set_vm_profile_py3 import VirtualMachineScaleSetVMProfile - from .virtual_machine_scale_set_update_vm_profile_py3 import VirtualMachineScaleSetUpdateVMProfile - from .virtual_machine_scale_set_py3 import VirtualMachineScaleSet - from .virtual_machine_scale_set_update_py3 import VirtualMachineScaleSetUpdate - from .virtual_machine_scale_set_vm_instance_ids_py3 import VirtualMachineScaleSetVMInstanceIDs - from .virtual_machine_scale_set_vm_instance_required_ids_py3 import VirtualMachineScaleSetVMInstanceRequiredIDs - from .virtual_machine_status_code_count_py3 import VirtualMachineStatusCodeCount - from .virtual_machine_scale_set_instance_view_statuses_summary_py3 import VirtualMachineScaleSetInstanceViewStatusesSummary - from .virtual_machine_scale_set_vm_extensions_summary_py3 import VirtualMachineScaleSetVMExtensionsSummary - from .virtual_machine_scale_set_instance_view_py3 import VirtualMachineScaleSetInstanceView - from .virtual_machine_scale_set_sku_capacity_py3 import VirtualMachineScaleSetSkuCapacity - from .virtual_machine_scale_set_sku_py3 import VirtualMachineScaleSetSku - from .api_error_base_py3 import ApiErrorBase - from .inner_error_py3 import InnerError - from .api_error_py3 import ApiError - from .rollback_status_info_py3 import RollbackStatusInfo - from .upgrade_operation_history_status_py3 import UpgradeOperationHistoryStatus - from .rolling_upgrade_progress_info_py3 import RollingUpgradeProgressInfo - from .upgrade_operation_historical_status_info_properties_py3 import UpgradeOperationHistoricalStatusInfoProperties - from .upgrade_operation_historical_status_info_py3 import UpgradeOperationHistoricalStatusInfo - from .virtual_machine_health_status_py3 import VirtualMachineHealthStatus - from .virtual_machine_scale_set_vm_instance_view_py3 import VirtualMachineScaleSetVMInstanceView - from .virtual_machine_scale_set_vm_py3 import VirtualMachineScaleSetVM - from .rolling_upgrade_running_status_py3 import RollingUpgradeRunningStatus - from .rolling_upgrade_status_info_py3 import RollingUpgradeStatusInfo - from .compute_long_running_operation_properties_py3 import ComputeLongRunningOperationProperties - from .resource_py3 import Resource - from .update_resource_py3 import UpdateResource - from .sub_resource_read_only_py3 import SubResourceReadOnly - from .recovery_walk_response_py3 import RecoveryWalkResponse - from .operation_status_response_py3 import OperationStatusResponse - from .request_rate_by_interval_input_py3 import RequestRateByIntervalInput - from .throttled_requests_input_py3 import ThrottledRequestsInput - from .log_analytics_input_base_py3 import LogAnalyticsInputBase - from .log_analytics_output_py3 import LogAnalyticsOutput - from .log_analytics_operation_result_py3 import LogAnalyticsOperationResult - from .run_command_input_parameter_py3 import RunCommandInputParameter - from .run_command_input_py3 import RunCommandInput - from .run_command_parameter_definition_py3 import RunCommandParameterDefinition - from .run_command_document_base_py3 import RunCommandDocumentBase - from .run_command_document_py3 import RunCommandDocument - from .run_command_result_py3 import RunCommandResult + from ._models_py3 import AdditionalUnattendContent + from ._models_py3 import ApiEntityReference + from ._models_py3 import ApiError + from ._models_py3 import ApiErrorBase + from ._models_py3 import AutoOSUpgradePolicy + from ._models_py3 import AvailabilitySet + from ._models_py3 import AvailabilitySetUpdate + from ._models_py3 import BootDiagnostics + from ._models_py3 import BootDiagnosticsInstanceView + from ._models_py3 import ComputeLongRunningOperationProperties + from ._models_py3 import ComputeOperationValue + from ._models_py3 import DataDisk + from ._models_py3 import DataDiskImage + from ._models_py3 import DiagnosticsProfile + from ._models_py3 import DiskEncryptionSettings + from ._models_py3 import DiskInstanceView + from ._models_py3 import HardwareProfile + from ._models_py3 import Image + from ._models_py3 import ImageDataDisk + from ._models_py3 import ImageOSDisk + from ._models_py3 import ImageReference + from ._models_py3 import ImageStorageProfile + from ._models_py3 import ImageUpdate + from ._models_py3 import InnerError + from ._models_py3 import InstanceViewStatus + from ._models_py3 import KeyVaultKeyReference + from ._models_py3 import KeyVaultSecretReference + from ._models_py3 import LinuxConfiguration + from ._models_py3 import LogAnalyticsInputBase + from ._models_py3 import LogAnalyticsOperationResult + from ._models_py3 import LogAnalyticsOutput + from ._models_py3 import MaintenanceRedeployStatus + from ._models_py3 import ManagedDiskParameters + from ._models_py3 import NetworkInterfaceReference + from ._models_py3 import NetworkProfile + from ._models_py3 import OperationStatusResponse + from ._models_py3 import OSDisk + from ._models_py3 import OSDiskImage + from ._models_py3 import OSProfile + from ._models_py3 import Plan + from ._models_py3 import PurchasePlan + from ._models_py3 import RecoveryWalkResponse + from ._models_py3 import RequestRateByIntervalInput + from ._models_py3 import Resource + from ._models_py3 import RollbackStatusInfo + from ._models_py3 import RollingUpgradePolicy + from ._models_py3 import RollingUpgradeProgressInfo + from ._models_py3 import RollingUpgradeRunningStatus + from ._models_py3 import RollingUpgradeStatusInfo + from ._models_py3 import RunCommandDocument + from ._models_py3 import RunCommandDocumentBase + from ._models_py3 import RunCommandInput + from ._models_py3 import RunCommandInputParameter + from ._models_py3 import RunCommandParameterDefinition + from ._models_py3 import RunCommandResult + from ._models_py3 import Sku + from ._models_py3 import SshConfiguration + from ._models_py3 import SshPublicKey + from ._models_py3 import StorageProfile + from ._models_py3 import SubResource + from ._models_py3 import SubResourceReadOnly + from ._models_py3 import ThrottledRequestsInput + from ._models_py3 import UpdateResource + from ._models_py3 import UpgradeOperationHistoricalStatusInfo + from ._models_py3 import UpgradeOperationHistoricalStatusInfoProperties + from ._models_py3 import UpgradeOperationHistoryStatus + from ._models_py3 import UpgradePolicy + from ._models_py3 import Usage + from ._models_py3 import UsageName + from ._models_py3 import VaultCertificate + from ._models_py3 import VaultSecretGroup + from ._models_py3 import VirtualHardDisk + from ._models_py3 import VirtualMachine + from ._models_py3 import VirtualMachineAgentInstanceView + from ._models_py3 import VirtualMachineCaptureParameters + from ._models_py3 import VirtualMachineCaptureResult + from ._models_py3 import VirtualMachineExtension + from ._models_py3 import VirtualMachineExtensionHandlerInstanceView + from ._models_py3 import VirtualMachineExtensionImage + from ._models_py3 import VirtualMachineExtensionInstanceView + from ._models_py3 import VirtualMachineExtensionsListResult + from ._models_py3 import VirtualMachineExtensionUpdate + from ._models_py3 import VirtualMachineHealthStatus + from ._models_py3 import VirtualMachineIdentity + from ._models_py3 import VirtualMachineImage + from ._models_py3 import VirtualMachineImageResource + from ._models_py3 import VirtualMachineInstanceView + from ._models_py3 import VirtualMachineScaleSet + from ._models_py3 import VirtualMachineScaleSetDataDisk + from ._models_py3 import VirtualMachineScaleSetExtension + from ._models_py3 import VirtualMachineScaleSetExtensionProfile + from ._models_py3 import VirtualMachineScaleSetIdentity + from ._models_py3 import VirtualMachineScaleSetInstanceView + from ._models_py3 import VirtualMachineScaleSetInstanceViewStatusesSummary + from ._models_py3 import VirtualMachineScaleSetIPConfiguration + from ._models_py3 import VirtualMachineScaleSetManagedDiskParameters + from ._models_py3 import VirtualMachineScaleSetNetworkConfiguration + from ._models_py3 import VirtualMachineScaleSetNetworkConfigurationDnsSettings + from ._models_py3 import VirtualMachineScaleSetNetworkProfile + from ._models_py3 import VirtualMachineScaleSetOSDisk + from ._models_py3 import VirtualMachineScaleSetOSProfile + from ._models_py3 import VirtualMachineScaleSetPublicIPAddressConfiguration + from ._models_py3 import VirtualMachineScaleSetPublicIPAddressConfigurationDnsSettings + from ._models_py3 import VirtualMachineScaleSetSku + from ._models_py3 import VirtualMachineScaleSetSkuCapacity + from ._models_py3 import VirtualMachineScaleSetStorageProfile + from ._models_py3 import VirtualMachineScaleSetUpdate + from ._models_py3 import VirtualMachineScaleSetUpdateIPConfiguration + from ._models_py3 import VirtualMachineScaleSetUpdateNetworkConfiguration + from ._models_py3 import VirtualMachineScaleSetUpdateNetworkProfile + from ._models_py3 import VirtualMachineScaleSetUpdateOSDisk + from ._models_py3 import VirtualMachineScaleSetUpdateOSProfile + from ._models_py3 import VirtualMachineScaleSetUpdatePublicIPAddressConfiguration + from ._models_py3 import VirtualMachineScaleSetUpdateStorageProfile + from ._models_py3 import VirtualMachineScaleSetUpdateVMProfile + from ._models_py3 import VirtualMachineScaleSetVM + from ._models_py3 import VirtualMachineScaleSetVMExtensionsSummary + from ._models_py3 import VirtualMachineScaleSetVMInstanceIDs + from ._models_py3 import VirtualMachineScaleSetVMInstanceRequiredIDs + from ._models_py3 import VirtualMachineScaleSetVMInstanceView + from ._models_py3 import VirtualMachineScaleSetVMProfile + from ._models_py3 import VirtualMachineSize + from ._models_py3 import VirtualMachineStatusCodeCount + from ._models_py3 import VirtualMachineUpdate + from ._models_py3 import WindowsConfiguration + from ._models_py3 import WinRMConfiguration + from ._models_py3 import WinRMListener except (SyntaxError, ImportError): - from .compute_operation_value import ComputeOperationValue - from .instance_view_status import InstanceViewStatus - from .sub_resource import SubResource - from .sku import Sku - from .availability_set import AvailabilitySet - from .availability_set_update import AvailabilitySetUpdate - from .virtual_machine_size import VirtualMachineSize - from .virtual_machine_extension_image import VirtualMachineExtensionImage - from .virtual_machine_image_resource import VirtualMachineImageResource - from .virtual_machine_extension_instance_view import VirtualMachineExtensionInstanceView - from .virtual_machine_extension import VirtualMachineExtension - from .virtual_machine_extension_update import VirtualMachineExtensionUpdate - from .virtual_machine_extensions_list_result import VirtualMachineExtensionsListResult - from .purchase_plan import PurchasePlan - from .os_disk_image import OSDiskImage - from .data_disk_image import DataDiskImage - from .virtual_machine_image import VirtualMachineImage - from .usage_name import UsageName - from .usage import Usage - from .virtual_machine_capture_parameters import VirtualMachineCaptureParameters - from .virtual_machine_capture_result import VirtualMachineCaptureResult - from .plan import Plan - from .hardware_profile import HardwareProfile - from .image_reference import ImageReference - from .key_vault_secret_reference import KeyVaultSecretReference - from .key_vault_key_reference import KeyVaultKeyReference - from .disk_encryption_settings import DiskEncryptionSettings - from .virtual_hard_disk import VirtualHardDisk - from .managed_disk_parameters import ManagedDiskParameters - from .os_disk import OSDisk - from .data_disk import DataDisk - from .storage_profile import StorageProfile - from .additional_unattend_content import AdditionalUnattendContent - from .win_rm_listener import WinRMListener - from .win_rm_configuration import WinRMConfiguration - from .windows_configuration import WindowsConfiguration - from .ssh_public_key import SshPublicKey - from .ssh_configuration import SshConfiguration - from .linux_configuration import LinuxConfiguration - from .vault_certificate import VaultCertificate - from .vault_secret_group import VaultSecretGroup - from .os_profile import OSProfile - from .network_interface_reference import NetworkInterfaceReference - from .network_profile import NetworkProfile - from .boot_diagnostics import BootDiagnostics - from .diagnostics_profile import DiagnosticsProfile - from .virtual_machine_extension_handler_instance_view import VirtualMachineExtensionHandlerInstanceView - from .virtual_machine_agent_instance_view import VirtualMachineAgentInstanceView - from .disk_instance_view import DiskInstanceView - from .boot_diagnostics_instance_view import BootDiagnosticsInstanceView - from .virtual_machine_identity import VirtualMachineIdentity - from .maintenance_redeploy_status import MaintenanceRedeployStatus - from .virtual_machine_instance_view import VirtualMachineInstanceView - from .virtual_machine import VirtualMachine - from .virtual_machine_update import VirtualMachineUpdate - from .auto_os_upgrade_policy import AutoOSUpgradePolicy - from .rolling_upgrade_policy import RollingUpgradePolicy - from .upgrade_policy import UpgradePolicy - from .image_os_disk import ImageOSDisk - from .image_data_disk import ImageDataDisk - from .image_storage_profile import ImageStorageProfile - from .image import Image - from .image_update import ImageUpdate - from .virtual_machine_scale_set_identity import VirtualMachineScaleSetIdentity - from .virtual_machine_scale_set_os_profile import VirtualMachineScaleSetOSProfile - from .virtual_machine_scale_set_update_os_profile import VirtualMachineScaleSetUpdateOSProfile - from .virtual_machine_scale_set_managed_disk_parameters import VirtualMachineScaleSetManagedDiskParameters - from .virtual_machine_scale_set_os_disk import VirtualMachineScaleSetOSDisk - from .virtual_machine_scale_set_update_os_disk import VirtualMachineScaleSetUpdateOSDisk - from .virtual_machine_scale_set_data_disk import VirtualMachineScaleSetDataDisk - from .virtual_machine_scale_set_storage_profile import VirtualMachineScaleSetStorageProfile - from .virtual_machine_scale_set_update_storage_profile import VirtualMachineScaleSetUpdateStorageProfile - from .api_entity_reference import ApiEntityReference - from .virtual_machine_scale_set_public_ip_address_configuration_dns_settings import VirtualMachineScaleSetPublicIPAddressConfigurationDnsSettings - from .virtual_machine_scale_set_public_ip_address_configuration import VirtualMachineScaleSetPublicIPAddressConfiguration - from .virtual_machine_scale_set_update_public_ip_address_configuration import VirtualMachineScaleSetUpdatePublicIPAddressConfiguration - from .virtual_machine_scale_set_ip_configuration import VirtualMachineScaleSetIPConfiguration - from .virtual_machine_scale_set_update_ip_configuration import VirtualMachineScaleSetUpdateIPConfiguration - from .virtual_machine_scale_set_network_configuration_dns_settings import VirtualMachineScaleSetNetworkConfigurationDnsSettings - from .virtual_machine_scale_set_network_configuration import VirtualMachineScaleSetNetworkConfiguration - from .virtual_machine_scale_set_update_network_configuration import VirtualMachineScaleSetUpdateNetworkConfiguration - from .virtual_machine_scale_set_network_profile import VirtualMachineScaleSetNetworkProfile - from .virtual_machine_scale_set_update_network_profile import VirtualMachineScaleSetUpdateNetworkProfile - from .virtual_machine_scale_set_extension import VirtualMachineScaleSetExtension - from .virtual_machine_scale_set_extension_profile import VirtualMachineScaleSetExtensionProfile - from .virtual_machine_scale_set_vm_profile import VirtualMachineScaleSetVMProfile - from .virtual_machine_scale_set_update_vm_profile import VirtualMachineScaleSetUpdateVMProfile - from .virtual_machine_scale_set import VirtualMachineScaleSet - from .virtual_machine_scale_set_update import VirtualMachineScaleSetUpdate - from .virtual_machine_scale_set_vm_instance_ids import VirtualMachineScaleSetVMInstanceIDs - from .virtual_machine_scale_set_vm_instance_required_ids import VirtualMachineScaleSetVMInstanceRequiredIDs - from .virtual_machine_status_code_count import VirtualMachineStatusCodeCount - from .virtual_machine_scale_set_instance_view_statuses_summary import VirtualMachineScaleSetInstanceViewStatusesSummary - from .virtual_machine_scale_set_vm_extensions_summary import VirtualMachineScaleSetVMExtensionsSummary - from .virtual_machine_scale_set_instance_view import VirtualMachineScaleSetInstanceView - from .virtual_machine_scale_set_sku_capacity import VirtualMachineScaleSetSkuCapacity - from .virtual_machine_scale_set_sku import VirtualMachineScaleSetSku - from .api_error_base import ApiErrorBase - from .inner_error import InnerError - from .api_error import ApiError - from .rollback_status_info import RollbackStatusInfo - from .upgrade_operation_history_status import UpgradeOperationHistoryStatus - from .rolling_upgrade_progress_info import RollingUpgradeProgressInfo - from .upgrade_operation_historical_status_info_properties import UpgradeOperationHistoricalStatusInfoProperties - from .upgrade_operation_historical_status_info import UpgradeOperationHistoricalStatusInfo - from .virtual_machine_health_status import VirtualMachineHealthStatus - from .virtual_machine_scale_set_vm_instance_view import VirtualMachineScaleSetVMInstanceView - from .virtual_machine_scale_set_vm import VirtualMachineScaleSetVM - from .rolling_upgrade_running_status import RollingUpgradeRunningStatus - from .rolling_upgrade_status_info import RollingUpgradeStatusInfo - from .compute_long_running_operation_properties import ComputeLongRunningOperationProperties - from .resource import Resource - from .update_resource import UpdateResource - from .sub_resource_read_only import SubResourceReadOnly - from .recovery_walk_response import RecoveryWalkResponse - from .operation_status_response import OperationStatusResponse - from .request_rate_by_interval_input import RequestRateByIntervalInput - from .throttled_requests_input import ThrottledRequestsInput - from .log_analytics_input_base import LogAnalyticsInputBase - from .log_analytics_output import LogAnalyticsOutput - from .log_analytics_operation_result import LogAnalyticsOperationResult - from .run_command_input_parameter import RunCommandInputParameter - from .run_command_input import RunCommandInput - from .run_command_parameter_definition import RunCommandParameterDefinition - from .run_command_document_base import RunCommandDocumentBase - from .run_command_document import RunCommandDocument - from .run_command_result import RunCommandResult -from .compute_operation_value_paged import ComputeOperationValuePaged -from .availability_set_paged import AvailabilitySetPaged -from .virtual_machine_size_paged import VirtualMachineSizePaged -from .virtual_machine_paged import VirtualMachinePaged -from .usage_paged import UsagePaged -from .image_paged import ImagePaged -from .virtual_machine_scale_set_paged import VirtualMachineScaleSetPaged -from .virtual_machine_scale_set_sku_paged import VirtualMachineScaleSetSkuPaged -from .upgrade_operation_historical_status_info_paged import UpgradeOperationHistoricalStatusInfoPaged -from .virtual_machine_scale_set_extension_paged import VirtualMachineScaleSetExtensionPaged -from .virtual_machine_scale_set_vm_paged import VirtualMachineScaleSetVMPaged -from .run_command_document_base_paged import RunCommandDocumentBasePaged -from .compute_management_client_enums import ( + from ._models import AdditionalUnattendContent + from ._models import ApiEntityReference + from ._models import ApiError + from ._models import ApiErrorBase + from ._models import AutoOSUpgradePolicy + from ._models import AvailabilitySet + from ._models import AvailabilitySetUpdate + from ._models import BootDiagnostics + from ._models import BootDiagnosticsInstanceView + from ._models import ComputeLongRunningOperationProperties + from ._models import ComputeOperationValue + from ._models import DataDisk + from ._models import DataDiskImage + from ._models import DiagnosticsProfile + from ._models import DiskEncryptionSettings + from ._models import DiskInstanceView + from ._models import HardwareProfile + from ._models import Image + from ._models import ImageDataDisk + from ._models import ImageOSDisk + from ._models import ImageReference + from ._models import ImageStorageProfile + from ._models import ImageUpdate + from ._models import InnerError + from ._models import InstanceViewStatus + from ._models import KeyVaultKeyReference + from ._models import KeyVaultSecretReference + from ._models import LinuxConfiguration + from ._models import LogAnalyticsInputBase + from ._models import LogAnalyticsOperationResult + from ._models import LogAnalyticsOutput + from ._models import MaintenanceRedeployStatus + from ._models import ManagedDiskParameters + from ._models import NetworkInterfaceReference + from ._models import NetworkProfile + from ._models import OperationStatusResponse + from ._models import OSDisk + from ._models import OSDiskImage + from ._models import OSProfile + from ._models import Plan + from ._models import PurchasePlan + from ._models import RecoveryWalkResponse + from ._models import RequestRateByIntervalInput + from ._models import Resource + from ._models import RollbackStatusInfo + from ._models import RollingUpgradePolicy + from ._models import RollingUpgradeProgressInfo + from ._models import RollingUpgradeRunningStatus + from ._models import RollingUpgradeStatusInfo + from ._models import RunCommandDocument + from ._models import RunCommandDocumentBase + from ._models import RunCommandInput + from ._models import RunCommandInputParameter + from ._models import RunCommandParameterDefinition + from ._models import RunCommandResult + from ._models import Sku + from ._models import SshConfiguration + from ._models import SshPublicKey + from ._models import StorageProfile + from ._models import SubResource + from ._models import SubResourceReadOnly + from ._models import ThrottledRequestsInput + from ._models import UpdateResource + from ._models import UpgradeOperationHistoricalStatusInfo + from ._models import UpgradeOperationHistoricalStatusInfoProperties + from ._models import UpgradeOperationHistoryStatus + from ._models import UpgradePolicy + from ._models import Usage + from ._models import UsageName + from ._models import VaultCertificate + from ._models import VaultSecretGroup + from ._models import VirtualHardDisk + from ._models import VirtualMachine + from ._models import VirtualMachineAgentInstanceView + from ._models import VirtualMachineCaptureParameters + from ._models import VirtualMachineCaptureResult + from ._models import VirtualMachineExtension + from ._models import VirtualMachineExtensionHandlerInstanceView + from ._models import VirtualMachineExtensionImage + from ._models import VirtualMachineExtensionInstanceView + from ._models import VirtualMachineExtensionsListResult + from ._models import VirtualMachineExtensionUpdate + from ._models import VirtualMachineHealthStatus + from ._models import VirtualMachineIdentity + from ._models import VirtualMachineImage + from ._models import VirtualMachineImageResource + from ._models import VirtualMachineInstanceView + from ._models import VirtualMachineScaleSet + from ._models import VirtualMachineScaleSetDataDisk + from ._models import VirtualMachineScaleSetExtension + from ._models import VirtualMachineScaleSetExtensionProfile + from ._models import VirtualMachineScaleSetIdentity + from ._models import VirtualMachineScaleSetInstanceView + from ._models import VirtualMachineScaleSetInstanceViewStatusesSummary + from ._models import VirtualMachineScaleSetIPConfiguration + from ._models import VirtualMachineScaleSetManagedDiskParameters + from ._models import VirtualMachineScaleSetNetworkConfiguration + from ._models import VirtualMachineScaleSetNetworkConfigurationDnsSettings + from ._models import VirtualMachineScaleSetNetworkProfile + from ._models import VirtualMachineScaleSetOSDisk + from ._models import VirtualMachineScaleSetOSProfile + from ._models import VirtualMachineScaleSetPublicIPAddressConfiguration + from ._models import VirtualMachineScaleSetPublicIPAddressConfigurationDnsSettings + from ._models import VirtualMachineScaleSetSku + from ._models import VirtualMachineScaleSetSkuCapacity + from ._models import VirtualMachineScaleSetStorageProfile + from ._models import VirtualMachineScaleSetUpdate + from ._models import VirtualMachineScaleSetUpdateIPConfiguration + from ._models import VirtualMachineScaleSetUpdateNetworkConfiguration + from ._models import VirtualMachineScaleSetUpdateNetworkProfile + from ._models import VirtualMachineScaleSetUpdateOSDisk + from ._models import VirtualMachineScaleSetUpdateOSProfile + from ._models import VirtualMachineScaleSetUpdatePublicIPAddressConfiguration + from ._models import VirtualMachineScaleSetUpdateStorageProfile + from ._models import VirtualMachineScaleSetUpdateVMProfile + from ._models import VirtualMachineScaleSetVM + from ._models import VirtualMachineScaleSetVMExtensionsSummary + from ._models import VirtualMachineScaleSetVMInstanceIDs + from ._models import VirtualMachineScaleSetVMInstanceRequiredIDs + from ._models import VirtualMachineScaleSetVMInstanceView + from ._models import VirtualMachineScaleSetVMProfile + from ._models import VirtualMachineSize + from ._models import VirtualMachineStatusCodeCount + from ._models import VirtualMachineUpdate + from ._models import WindowsConfiguration + from ._models import WinRMConfiguration + from ._models import WinRMListener +from ._paged_models import AvailabilitySetPaged +from ._paged_models import ComputeOperationValuePaged +from ._paged_models import ImagePaged +from ._paged_models import RunCommandDocumentBasePaged +from ._paged_models import UpgradeOperationHistoricalStatusInfoPaged +from ._paged_models import UsagePaged +from ._paged_models import VirtualMachinePaged +from ._paged_models import VirtualMachineScaleSetExtensionPaged +from ._paged_models import VirtualMachineScaleSetPaged +from ._paged_models import VirtualMachineScaleSetSkuPaged +from ._paged_models import VirtualMachineScaleSetVMPaged +from ._paged_models import VirtualMachineSizePaged +from ._compute_management_client_enums import ( StatusLevelTypes, OperatingSystemTypes, VirtualMachineSizeTypes, @@ -305,133 +305,133 @@ ) __all__ = [ - 'ComputeOperationValue', - 'InstanceViewStatus', - 'SubResource', - 'Sku', + 'AdditionalUnattendContent', + 'ApiEntityReference', + 'ApiError', + 'ApiErrorBase', + 'AutoOSUpgradePolicy', 'AvailabilitySet', 'AvailabilitySetUpdate', - 'VirtualMachineSize', - 'VirtualMachineExtensionImage', - 'VirtualMachineImageResource', - 'VirtualMachineExtensionInstanceView', - 'VirtualMachineExtension', - 'VirtualMachineExtensionUpdate', - 'VirtualMachineExtensionsListResult', - 'PurchasePlan', - 'OSDiskImage', + 'BootDiagnostics', + 'BootDiagnosticsInstanceView', + 'ComputeLongRunningOperationProperties', + 'ComputeOperationValue', + 'DataDisk', 'DataDiskImage', - 'VirtualMachineImage', - 'UsageName', - 'Usage', - 'VirtualMachineCaptureParameters', - 'VirtualMachineCaptureResult', - 'Plan', + 'DiagnosticsProfile', + 'DiskEncryptionSettings', + 'DiskInstanceView', 'HardwareProfile', + 'Image', + 'ImageDataDisk', + 'ImageOSDisk', 'ImageReference', - 'KeyVaultSecretReference', + 'ImageStorageProfile', + 'ImageUpdate', + 'InnerError', + 'InstanceViewStatus', 'KeyVaultKeyReference', - 'DiskEncryptionSettings', - 'VirtualHardDisk', + 'KeyVaultSecretReference', + 'LinuxConfiguration', + 'LogAnalyticsInputBase', + 'LogAnalyticsOperationResult', + 'LogAnalyticsOutput', + 'MaintenanceRedeployStatus', 'ManagedDiskParameters', + 'NetworkInterfaceReference', + 'NetworkProfile', + 'OperationStatusResponse', 'OSDisk', - 'DataDisk', - 'StorageProfile', - 'AdditionalUnattendContent', - 'WinRMListener', - 'WinRMConfiguration', - 'WindowsConfiguration', - 'SshPublicKey', + 'OSDiskImage', + 'OSProfile', + 'Plan', + 'PurchasePlan', + 'RecoveryWalkResponse', + 'RequestRateByIntervalInput', + 'Resource', + 'RollbackStatusInfo', + 'RollingUpgradePolicy', + 'RollingUpgradeProgressInfo', + 'RollingUpgradeRunningStatus', + 'RollingUpgradeStatusInfo', + 'RunCommandDocument', + 'RunCommandDocumentBase', + 'RunCommandInput', + 'RunCommandInputParameter', + 'RunCommandParameterDefinition', + 'RunCommandResult', + 'Sku', 'SshConfiguration', - 'LinuxConfiguration', + 'SshPublicKey', + 'StorageProfile', + 'SubResource', + 'SubResourceReadOnly', + 'ThrottledRequestsInput', + 'UpdateResource', + 'UpgradeOperationHistoricalStatusInfo', + 'UpgradeOperationHistoricalStatusInfoProperties', + 'UpgradeOperationHistoryStatus', + 'UpgradePolicy', + 'Usage', + 'UsageName', 'VaultCertificate', 'VaultSecretGroup', - 'OSProfile', - 'NetworkInterfaceReference', - 'NetworkProfile', - 'BootDiagnostics', - 'DiagnosticsProfile', - 'VirtualMachineExtensionHandlerInstanceView', + 'VirtualHardDisk', + 'VirtualMachine', 'VirtualMachineAgentInstanceView', - 'DiskInstanceView', - 'BootDiagnosticsInstanceView', + 'VirtualMachineCaptureParameters', + 'VirtualMachineCaptureResult', + 'VirtualMachineExtension', + 'VirtualMachineExtensionHandlerInstanceView', + 'VirtualMachineExtensionImage', + 'VirtualMachineExtensionInstanceView', + 'VirtualMachineExtensionsListResult', + 'VirtualMachineExtensionUpdate', + 'VirtualMachineHealthStatus', 'VirtualMachineIdentity', - 'MaintenanceRedeployStatus', + 'VirtualMachineImage', + 'VirtualMachineImageResource', 'VirtualMachineInstanceView', - 'VirtualMachine', - 'VirtualMachineUpdate', - 'AutoOSUpgradePolicy', - 'RollingUpgradePolicy', - 'UpgradePolicy', - 'ImageOSDisk', - 'ImageDataDisk', - 'ImageStorageProfile', - 'Image', - 'ImageUpdate', + 'VirtualMachineScaleSet', + 'VirtualMachineScaleSetDataDisk', + 'VirtualMachineScaleSetExtension', + 'VirtualMachineScaleSetExtensionProfile', 'VirtualMachineScaleSetIdentity', - 'VirtualMachineScaleSetOSProfile', - 'VirtualMachineScaleSetUpdateOSProfile', + 'VirtualMachineScaleSetInstanceView', + 'VirtualMachineScaleSetInstanceViewStatusesSummary', + 'VirtualMachineScaleSetIPConfiguration', 'VirtualMachineScaleSetManagedDiskParameters', + 'VirtualMachineScaleSetNetworkConfiguration', + 'VirtualMachineScaleSetNetworkConfigurationDnsSettings', + 'VirtualMachineScaleSetNetworkProfile', 'VirtualMachineScaleSetOSDisk', - 'VirtualMachineScaleSetUpdateOSDisk', - 'VirtualMachineScaleSetDataDisk', - 'VirtualMachineScaleSetStorageProfile', - 'VirtualMachineScaleSetUpdateStorageProfile', - 'ApiEntityReference', - 'VirtualMachineScaleSetPublicIPAddressConfigurationDnsSettings', + 'VirtualMachineScaleSetOSProfile', 'VirtualMachineScaleSetPublicIPAddressConfiguration', - 'VirtualMachineScaleSetUpdatePublicIPAddressConfiguration', - 'VirtualMachineScaleSetIPConfiguration', + 'VirtualMachineScaleSetPublicIPAddressConfigurationDnsSettings', + 'VirtualMachineScaleSetSku', + 'VirtualMachineScaleSetSkuCapacity', + 'VirtualMachineScaleSetStorageProfile', + 'VirtualMachineScaleSetUpdate', 'VirtualMachineScaleSetUpdateIPConfiguration', - 'VirtualMachineScaleSetNetworkConfigurationDnsSettings', - 'VirtualMachineScaleSetNetworkConfiguration', 'VirtualMachineScaleSetUpdateNetworkConfiguration', - 'VirtualMachineScaleSetNetworkProfile', 'VirtualMachineScaleSetUpdateNetworkProfile', - 'VirtualMachineScaleSetExtension', - 'VirtualMachineScaleSetExtensionProfile', - 'VirtualMachineScaleSetVMProfile', + 'VirtualMachineScaleSetUpdateOSDisk', + 'VirtualMachineScaleSetUpdateOSProfile', + 'VirtualMachineScaleSetUpdatePublicIPAddressConfiguration', + 'VirtualMachineScaleSetUpdateStorageProfile', 'VirtualMachineScaleSetUpdateVMProfile', - 'VirtualMachineScaleSet', - 'VirtualMachineScaleSetUpdate', + 'VirtualMachineScaleSetVM', + 'VirtualMachineScaleSetVMExtensionsSummary', 'VirtualMachineScaleSetVMInstanceIDs', 'VirtualMachineScaleSetVMInstanceRequiredIDs', - 'VirtualMachineStatusCodeCount', - 'VirtualMachineScaleSetInstanceViewStatusesSummary', - 'VirtualMachineScaleSetVMExtensionsSummary', - 'VirtualMachineScaleSetInstanceView', - 'VirtualMachineScaleSetSkuCapacity', - 'VirtualMachineScaleSetSku', - 'ApiErrorBase', - 'InnerError', - 'ApiError', - 'RollbackStatusInfo', - 'UpgradeOperationHistoryStatus', - 'RollingUpgradeProgressInfo', - 'UpgradeOperationHistoricalStatusInfoProperties', - 'UpgradeOperationHistoricalStatusInfo', - 'VirtualMachineHealthStatus', 'VirtualMachineScaleSetVMInstanceView', - 'VirtualMachineScaleSetVM', - 'RollingUpgradeRunningStatus', - 'RollingUpgradeStatusInfo', - 'ComputeLongRunningOperationProperties', - 'Resource', - 'UpdateResource', - 'SubResourceReadOnly', - 'RecoveryWalkResponse', - 'OperationStatusResponse', - 'RequestRateByIntervalInput', - 'ThrottledRequestsInput', - 'LogAnalyticsInputBase', - 'LogAnalyticsOutput', - 'LogAnalyticsOperationResult', - 'RunCommandInputParameter', - 'RunCommandInput', - 'RunCommandParameterDefinition', - 'RunCommandDocumentBase', - 'RunCommandDocument', - 'RunCommandResult', + 'VirtualMachineScaleSetVMProfile', + 'VirtualMachineSize', + 'VirtualMachineStatusCodeCount', + 'VirtualMachineUpdate', + 'WindowsConfiguration', + 'WinRMConfiguration', + 'WinRMListener', 'ComputeOperationValuePaged', 'AvailabilitySetPaged', 'VirtualMachineSizePaged', diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/compute_management_client_enums.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/_compute_management_client_enums.py similarity index 100% rename from sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/compute_management_client_enums.py rename to sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/_compute_management_client_enums.py diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/_models.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/_models.py new file mode 100644 index 000000000000..fa444d53a365 --- /dev/null +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/_models.py @@ -0,0 +1,5246 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class AdditionalUnattendContent(Model): + """Specifies additional XML formatted information that can be included in the + Unattend.xml file, which is used by Windows Setup. Contents are defined by + setting name, component name, and the pass in which the content is applied. + + :param pass_name: The pass name. Currently, the only allowable value is + OobeSystem. Possible values include: 'OobeSystem' + :type pass_name: str or ~azure.mgmt.compute.v2017_12_01.models.PassNames + :param component_name: The component name. Currently, the only allowable + value is Microsoft-Windows-Shell-Setup. Possible values include: + 'Microsoft-Windows-Shell-Setup' + :type component_name: str or + ~azure.mgmt.compute.v2017_12_01.models.ComponentNames + :param setting_name: Specifies the name of the setting to which the + content applies. Possible values are: FirstLogonCommands and AutoLogon. + Possible values include: 'AutoLogon', 'FirstLogonCommands' + :type setting_name: str or + ~azure.mgmt.compute.v2017_12_01.models.SettingNames + :param content: Specifies the XML formatted content that is added to the + unattend.xml file for the specified path and component. The XML must be + less than 4KB and must include the root element for the setting or feature + that is being inserted. + :type content: str + """ + + _attribute_map = { + 'pass_name': {'key': 'passName', 'type': 'PassNames'}, + 'component_name': {'key': 'componentName', 'type': 'ComponentNames'}, + 'setting_name': {'key': 'settingName', 'type': 'SettingNames'}, + 'content': {'key': 'content', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(AdditionalUnattendContent, self).__init__(**kwargs) + self.pass_name = kwargs.get('pass_name', None) + self.component_name = kwargs.get('component_name', None) + self.setting_name = kwargs.get('setting_name', None) + self.content = kwargs.get('content', None) + + +class ApiEntityReference(Model): + """The API entity reference. + + :param id: The ARM resource id in the form of + /subscriptions/{SubscriptionId}/resourceGroups/{ResourceGroupName}/... + :type id: str + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ApiEntityReference, self).__init__(**kwargs) + self.id = kwargs.get('id', None) + + +class ApiError(Model): + """Api error. + + :param details: The Api error details + :type details: list[~azure.mgmt.compute.v2017_12_01.models.ApiErrorBase] + :param innererror: The Api inner error + :type innererror: ~azure.mgmt.compute.v2017_12_01.models.InnerError + :param code: The error code. + :type code: str + :param target: The target of the particular error. + :type target: str + :param message: The error message. + :type message: str + """ + + _attribute_map = { + 'details': {'key': 'details', 'type': '[ApiErrorBase]'}, + 'innererror': {'key': 'innererror', 'type': 'InnerError'}, + 'code': {'key': 'code', 'type': 'str'}, + 'target': {'key': 'target', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ApiError, self).__init__(**kwargs) + self.details = kwargs.get('details', None) + self.innererror = kwargs.get('innererror', None) + self.code = kwargs.get('code', None) + self.target = kwargs.get('target', None) + self.message = kwargs.get('message', None) + + +class ApiErrorBase(Model): + """Api error base. + + :param code: The error code. + :type code: str + :param target: The target of the particular error. + :type target: str + :param message: The error message. + :type message: str + """ + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + 'target': {'key': 'target', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ApiErrorBase, self).__init__(**kwargs) + self.code = kwargs.get('code', None) + self.target = kwargs.get('target', None) + self.message = kwargs.get('message', None) + + +class AutoOSUpgradePolicy(Model): + """The configuration parameters used for performing automatic OS upgrade. + + :param disable_auto_rollback: Whether OS image rollback feature should be + disabled. Default value is false. + :type disable_auto_rollback: bool + """ + + _attribute_map = { + 'disable_auto_rollback': {'key': 'disableAutoRollback', 'type': 'bool'}, + } + + def __init__(self, **kwargs): + super(AutoOSUpgradePolicy, self).__init__(**kwargs) + self.disable_auto_rollback = kwargs.get('disable_auto_rollback', None) + + +class Resource(Model): + """The Resource model definition. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource Id + :vartype id: str + :ivar name: Resource name + :vartype name: str + :ivar type: Resource type + :vartype type: str + :param location: Required. Resource location + :type location: str + :param tags: Resource tags + :type tags: dict[str, str] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__(self, **kwargs): + super(Resource, self).__init__(**kwargs) + self.id = None + self.name = None + self.type = None + self.location = kwargs.get('location', None) + self.tags = kwargs.get('tags', None) + + +class AvailabilitySet(Resource): + """Specifies information about the availability set that the virtual machine + should be assigned to. Virtual machines specified in the same availability + set are allocated to different nodes to maximize availability. For more + information about availability sets, see [Manage the availability of + virtual + machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-manage-availability?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). +

    For more information on Azure planned maintenance, see [Planned + maintenance for virtual machines in + Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-planned-maintenance?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json) +

    Currently, a VM can only be added to availability set at creation + time. An existing VM cannot be added to an availability set. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource Id + :vartype id: str + :ivar name: Resource name + :vartype name: str + :ivar type: Resource type + :vartype type: str + :param location: Required. Resource location + :type location: str + :param tags: Resource tags + :type tags: dict[str, str] + :param platform_update_domain_count: Update Domain count. + :type platform_update_domain_count: int + :param platform_fault_domain_count: Fault Domain count. + :type platform_fault_domain_count: int + :param virtual_machines: A list of references to all virtual machines in + the availability set. + :type virtual_machines: + list[~azure.mgmt.compute.v2017_12_01.models.SubResource] + :ivar statuses: The resource status information. + :vartype statuses: + list[~azure.mgmt.compute.v2017_12_01.models.InstanceViewStatus] + :param sku: Sku of the availability set + :type sku: ~azure.mgmt.compute.v2017_12_01.models.Sku + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + 'statuses': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'platform_update_domain_count': {'key': 'properties.platformUpdateDomainCount', 'type': 'int'}, + 'platform_fault_domain_count': {'key': 'properties.platformFaultDomainCount', 'type': 'int'}, + 'virtual_machines': {'key': 'properties.virtualMachines', 'type': '[SubResource]'}, + 'statuses': {'key': 'properties.statuses', 'type': '[InstanceViewStatus]'}, + 'sku': {'key': 'sku', 'type': 'Sku'}, + } + + def __init__(self, **kwargs): + super(AvailabilitySet, self).__init__(**kwargs) + self.platform_update_domain_count = kwargs.get('platform_update_domain_count', None) + self.platform_fault_domain_count = kwargs.get('platform_fault_domain_count', None) + self.virtual_machines = kwargs.get('virtual_machines', None) + self.statuses = None + self.sku = kwargs.get('sku', None) + + +class UpdateResource(Model): + """The Update Resource model definition. + + :param tags: Resource tags + :type tags: dict[str, str] + """ + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__(self, **kwargs): + super(UpdateResource, self).__init__(**kwargs) + self.tags = kwargs.get('tags', None) + + +class AvailabilitySetUpdate(UpdateResource): + """Specifies information about the availability set that the virtual machine + should be assigned to. Only tags may be updated. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :param tags: Resource tags + :type tags: dict[str, str] + :param platform_update_domain_count: Update Domain count. + :type platform_update_domain_count: int + :param platform_fault_domain_count: Fault Domain count. + :type platform_fault_domain_count: int + :param virtual_machines: A list of references to all virtual machines in + the availability set. + :type virtual_machines: + list[~azure.mgmt.compute.v2017_12_01.models.SubResource] + :ivar statuses: The resource status information. + :vartype statuses: + list[~azure.mgmt.compute.v2017_12_01.models.InstanceViewStatus] + :param sku: Sku of the availability set + :type sku: ~azure.mgmt.compute.v2017_12_01.models.Sku + """ + + _validation = { + 'statuses': {'readonly': True}, + } + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + 'platform_update_domain_count': {'key': 'properties.platformUpdateDomainCount', 'type': 'int'}, + 'platform_fault_domain_count': {'key': 'properties.platformFaultDomainCount', 'type': 'int'}, + 'virtual_machines': {'key': 'properties.virtualMachines', 'type': '[SubResource]'}, + 'statuses': {'key': 'properties.statuses', 'type': '[InstanceViewStatus]'}, + 'sku': {'key': 'sku', 'type': 'Sku'}, + } + + def __init__(self, **kwargs): + super(AvailabilitySetUpdate, self).__init__(**kwargs) + self.platform_update_domain_count = kwargs.get('platform_update_domain_count', None) + self.platform_fault_domain_count = kwargs.get('platform_fault_domain_count', None) + self.virtual_machines = kwargs.get('virtual_machines', None) + self.statuses = None + self.sku = kwargs.get('sku', None) + + +class BootDiagnostics(Model): + """Boot Diagnostics is a debugging feature which allows you to view Console + Output and Screenshot to diagnose VM status.

    You can easily view + the output of your console log.

    Azure also enables you to see a + screenshot of the VM from the hypervisor. + + :param enabled: Whether boot diagnostics should be enabled on the Virtual + Machine. + :type enabled: bool + :param storage_uri: Uri of the storage account to use for placing the + console output and screenshot. + :type storage_uri: str + """ + + _attribute_map = { + 'enabled': {'key': 'enabled', 'type': 'bool'}, + 'storage_uri': {'key': 'storageUri', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(BootDiagnostics, self).__init__(**kwargs) + self.enabled = kwargs.get('enabled', None) + self.storage_uri = kwargs.get('storage_uri', None) + + +class BootDiagnosticsInstanceView(Model): + """The instance view of a virtual machine boot diagnostics. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar console_screenshot_blob_uri: The console screenshot blob URI. + :vartype console_screenshot_blob_uri: str + :ivar serial_console_log_blob_uri: The Linux serial console log blob Uri. + :vartype serial_console_log_blob_uri: str + """ + + _validation = { + 'console_screenshot_blob_uri': {'readonly': True}, + 'serial_console_log_blob_uri': {'readonly': True}, + } + + _attribute_map = { + 'console_screenshot_blob_uri': {'key': 'consoleScreenshotBlobUri', 'type': 'str'}, + 'serial_console_log_blob_uri': {'key': 'serialConsoleLogBlobUri', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(BootDiagnosticsInstanceView, self).__init__(**kwargs) + self.console_screenshot_blob_uri = None + self.serial_console_log_blob_uri = None + + +class CloudError(Model): + """CloudError. + """ + + _attribute_map = { + } + + +class ComputeLongRunningOperationProperties(Model): + """Compute-specific operation properties, including output. + + :param output: Operation output data (raw JSON) + :type output: object + """ + + _attribute_map = { + 'output': {'key': 'output', 'type': 'object'}, + } + + def __init__(self, **kwargs): + super(ComputeLongRunningOperationProperties, self).__init__(**kwargs) + self.output = kwargs.get('output', None) + + +class ComputeOperationValue(Model): + """Describes the properties of a Compute Operation value. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar origin: The origin of the compute operation. + :vartype origin: str + :ivar name: The name of the compute operation. + :vartype name: str + :ivar operation: The display name of the compute operation. + :vartype operation: str + :ivar resource: The display name of the resource the operation applies to. + :vartype resource: str + :ivar description: The description of the operation. + :vartype description: str + :ivar provider: The resource provider for the operation. + :vartype provider: str + """ + + _validation = { + 'origin': {'readonly': True}, + 'name': {'readonly': True}, + 'operation': {'readonly': True}, + 'resource': {'readonly': True}, + 'description': {'readonly': True}, + 'provider': {'readonly': True}, + } + + _attribute_map = { + 'origin': {'key': 'origin', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'operation': {'key': 'display.operation', 'type': 'str'}, + 'resource': {'key': 'display.resource', 'type': 'str'}, + 'description': {'key': 'display.description', 'type': 'str'}, + 'provider': {'key': 'display.provider', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ComputeOperationValue, self).__init__(**kwargs) + self.origin = None + self.name = None + self.operation = None + self.resource = None + self.description = None + self.provider = None + + +class DataDisk(Model): + """Describes a data disk. + + All required parameters must be populated in order to send to Azure. + + :param lun: Required. Specifies the logical unit number of the data disk. + This value is used to identify data disks within the VM and therefore must + be unique for each data disk attached to a VM. + :type lun: int + :param name: The disk name. + :type name: str + :param vhd: The virtual hard disk. + :type vhd: ~azure.mgmt.compute.v2017_12_01.models.VirtualHardDisk + :param image: The source user image virtual hard disk. The virtual hard + disk will be copied before being attached to the virtual machine. If + SourceImage is provided, the destination virtual hard drive must not + exist. + :type image: ~azure.mgmt.compute.v2017_12_01.models.VirtualHardDisk + :param caching: Specifies the caching requirements.

    Possible + values are:

    **None**

    **ReadOnly**

    **ReadWrite** +

    Default: **None for Standard storage. ReadOnly for Premium + storage**. Possible values include: 'None', 'ReadOnly', 'ReadWrite' + :type caching: str or ~azure.mgmt.compute.v2017_12_01.models.CachingTypes + :param write_accelerator_enabled: Specifies whether writeAccelerator + should be enabled or disabled on the disk. + :type write_accelerator_enabled: bool + :param create_option: Required. Specifies how the virtual machine should + be created.

    Possible values are:

    **Attach** \\u2013 This + value is used when you are using a specialized disk to create the virtual + machine.

    **FromImage** \\u2013 This value is used when you are + using an image to create the virtual machine. If you are using a platform + image, you also use the imageReference element described above. If you are + using a marketplace image, you also use the plan element previously + described. Possible values include: 'FromImage', 'Empty', 'Attach' + :type create_option: str or + ~azure.mgmt.compute.v2017_12_01.models.DiskCreateOptionTypes + :param disk_size_gb: Specifies the size of an empty data disk in + gigabytes. This element can be used to overwrite the size of the disk in a + virtual machine image.

    This value cannot be larger than 1023 GB + :type disk_size_gb: int + :param managed_disk: The managed disk parameters. + :type managed_disk: + ~azure.mgmt.compute.v2017_12_01.models.ManagedDiskParameters + """ + + _validation = { + 'lun': {'required': True}, + 'create_option': {'required': True}, + } + + _attribute_map = { + 'lun': {'key': 'lun', 'type': 'int'}, + 'name': {'key': 'name', 'type': 'str'}, + 'vhd': {'key': 'vhd', 'type': 'VirtualHardDisk'}, + 'image': {'key': 'image', 'type': 'VirtualHardDisk'}, + 'caching': {'key': 'caching', 'type': 'CachingTypes'}, + 'write_accelerator_enabled': {'key': 'writeAcceleratorEnabled', 'type': 'bool'}, + 'create_option': {'key': 'createOption', 'type': 'str'}, + 'disk_size_gb': {'key': 'diskSizeGB', 'type': 'int'}, + 'managed_disk': {'key': 'managedDisk', 'type': 'ManagedDiskParameters'}, + } + + def __init__(self, **kwargs): + super(DataDisk, self).__init__(**kwargs) + self.lun = kwargs.get('lun', None) + self.name = kwargs.get('name', None) + self.vhd = kwargs.get('vhd', None) + self.image = kwargs.get('image', None) + self.caching = kwargs.get('caching', None) + self.write_accelerator_enabled = kwargs.get('write_accelerator_enabled', None) + self.create_option = kwargs.get('create_option', None) + self.disk_size_gb = kwargs.get('disk_size_gb', None) + self.managed_disk = kwargs.get('managed_disk', None) + + +class DataDiskImage(Model): + """Contains the data disk images information. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar lun: Specifies the logical unit number of the data disk. This value + is used to identify data disks within the VM and therefore must be unique + for each data disk attached to a VM. + :vartype lun: int + """ + + _validation = { + 'lun': {'readonly': True}, + } + + _attribute_map = { + 'lun': {'key': 'lun', 'type': 'int'}, + } + + def __init__(self, **kwargs): + super(DataDiskImage, self).__init__(**kwargs) + self.lun = None + + +class DiagnosticsProfile(Model): + """Specifies the boot diagnostic settings state.

    Minimum api-version: + 2015-06-15. + + :param boot_diagnostics: Boot Diagnostics is a debugging feature which + allows you to view Console Output and Screenshot to diagnose VM status. +

    You can easily view the output of your console log.

    + Azure also enables you to see a screenshot of the VM from the hypervisor. + :type boot_diagnostics: + ~azure.mgmt.compute.v2017_12_01.models.BootDiagnostics + """ + + _attribute_map = { + 'boot_diagnostics': {'key': 'bootDiagnostics', 'type': 'BootDiagnostics'}, + } + + def __init__(self, **kwargs): + super(DiagnosticsProfile, self).__init__(**kwargs) + self.boot_diagnostics = kwargs.get('boot_diagnostics', None) + + +class DiskEncryptionSettings(Model): + """Describes a Encryption Settings for a Disk. + + :param disk_encryption_key: Specifies the location of the disk encryption + key, which is a Key Vault Secret. + :type disk_encryption_key: + ~azure.mgmt.compute.v2017_12_01.models.KeyVaultSecretReference + :param key_encryption_key: Specifies the location of the key encryption + key in Key Vault. + :type key_encryption_key: + ~azure.mgmt.compute.v2017_12_01.models.KeyVaultKeyReference + :param enabled: Specifies whether disk encryption should be enabled on the + virtual machine. + :type enabled: bool + """ + + _attribute_map = { + 'disk_encryption_key': {'key': 'diskEncryptionKey', 'type': 'KeyVaultSecretReference'}, + 'key_encryption_key': {'key': 'keyEncryptionKey', 'type': 'KeyVaultKeyReference'}, + 'enabled': {'key': 'enabled', 'type': 'bool'}, + } + + def __init__(self, **kwargs): + super(DiskEncryptionSettings, self).__init__(**kwargs) + self.disk_encryption_key = kwargs.get('disk_encryption_key', None) + self.key_encryption_key = kwargs.get('key_encryption_key', None) + self.enabled = kwargs.get('enabled', None) + + +class DiskInstanceView(Model): + """The instance view of the disk. + + :param name: The disk name. + :type name: str + :param encryption_settings: Specifies the encryption settings for the OS + Disk.

    Minimum api-version: 2015-06-15 + :type encryption_settings: + list[~azure.mgmt.compute.v2017_12_01.models.DiskEncryptionSettings] + :param statuses: The resource status information. + :type statuses: + list[~azure.mgmt.compute.v2017_12_01.models.InstanceViewStatus] + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'encryption_settings': {'key': 'encryptionSettings', 'type': '[DiskEncryptionSettings]'}, + 'statuses': {'key': 'statuses', 'type': '[InstanceViewStatus]'}, + } + + def __init__(self, **kwargs): + super(DiskInstanceView, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.encryption_settings = kwargs.get('encryption_settings', None) + self.statuses = kwargs.get('statuses', None) + + +class HardwareProfile(Model): + """Specifies the hardware settings for the virtual machine. + + :param vm_size: Specifies the size of the virtual machine. For more + information about virtual machine sizes, see [Sizes for virtual + machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-sizes?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). +

    The available VM sizes depend on region and availability set. For + a list of available sizes use these APIs:

    [List all available + virtual machine sizes in an availability + set](https://docs.microsoft.com/rest/api/compute/availabilitysets/listavailablesizes) +

    [List all available virtual machine sizes in a + region](https://docs.microsoft.com/rest/api/compute/virtualmachinesizes/list) +

    [List all available virtual machine sizes for + resizing](https://docs.microsoft.com/rest/api/compute/virtualmachines/listavailablesizes). + Possible values include: 'Basic_A0', 'Basic_A1', 'Basic_A2', 'Basic_A3', + 'Basic_A4', 'Standard_A0', 'Standard_A1', 'Standard_A2', 'Standard_A3', + 'Standard_A4', 'Standard_A5', 'Standard_A6', 'Standard_A7', 'Standard_A8', + 'Standard_A9', 'Standard_A10', 'Standard_A11', 'Standard_A1_v2', + 'Standard_A2_v2', 'Standard_A4_v2', 'Standard_A8_v2', 'Standard_A2m_v2', + 'Standard_A4m_v2', 'Standard_A8m_v2', 'Standard_B1s', 'Standard_B1ms', + 'Standard_B2s', 'Standard_B2ms', 'Standard_B4ms', 'Standard_B8ms', + 'Standard_D1', 'Standard_D2', 'Standard_D3', 'Standard_D4', + 'Standard_D11', 'Standard_D12', 'Standard_D13', 'Standard_D14', + 'Standard_D1_v2', 'Standard_D2_v2', 'Standard_D3_v2', 'Standard_D4_v2', + 'Standard_D5_v2', 'Standard_D2_v3', 'Standard_D4_v3', 'Standard_D8_v3', + 'Standard_D16_v3', 'Standard_D32_v3', 'Standard_D64_v3', + 'Standard_D2s_v3', 'Standard_D4s_v3', 'Standard_D8s_v3', + 'Standard_D16s_v3', 'Standard_D32s_v3', 'Standard_D64s_v3', + 'Standard_D11_v2', 'Standard_D12_v2', 'Standard_D13_v2', + 'Standard_D14_v2', 'Standard_D15_v2', 'Standard_DS1', 'Standard_DS2', + 'Standard_DS3', 'Standard_DS4', 'Standard_DS11', 'Standard_DS12', + 'Standard_DS13', 'Standard_DS14', 'Standard_DS1_v2', 'Standard_DS2_v2', + 'Standard_DS3_v2', 'Standard_DS4_v2', 'Standard_DS5_v2', + 'Standard_DS11_v2', 'Standard_DS12_v2', 'Standard_DS13_v2', + 'Standard_DS14_v2', 'Standard_DS15_v2', 'Standard_DS13-4_v2', + 'Standard_DS13-2_v2', 'Standard_DS14-8_v2', 'Standard_DS14-4_v2', + 'Standard_E2_v3', 'Standard_E4_v3', 'Standard_E8_v3', 'Standard_E16_v3', + 'Standard_E32_v3', 'Standard_E64_v3', 'Standard_E2s_v3', + 'Standard_E4s_v3', 'Standard_E8s_v3', 'Standard_E16s_v3', + 'Standard_E32s_v3', 'Standard_E64s_v3', 'Standard_E32-16_v3', + 'Standard_E32-8s_v3', 'Standard_E64-32s_v3', 'Standard_E64-16s_v3', + 'Standard_F1', 'Standard_F2', 'Standard_F4', 'Standard_F8', + 'Standard_F16', 'Standard_F1s', 'Standard_F2s', 'Standard_F4s', + 'Standard_F8s', 'Standard_F16s', 'Standard_F2s_v2', 'Standard_F4s_v2', + 'Standard_F8s_v2', 'Standard_F16s_v2', 'Standard_F32s_v2', + 'Standard_F64s_v2', 'Standard_F72s_v2', 'Standard_G1', 'Standard_G2', + 'Standard_G3', 'Standard_G4', 'Standard_G5', 'Standard_GS1', + 'Standard_GS2', 'Standard_GS3', 'Standard_GS4', 'Standard_GS5', + 'Standard_GS4-8', 'Standard_GS4-4', 'Standard_GS5-16', 'Standard_GS5-8', + 'Standard_H8', 'Standard_H16', 'Standard_H8m', 'Standard_H16m', + 'Standard_H16r', 'Standard_H16mr', 'Standard_L4s', 'Standard_L8s', + 'Standard_L16s', 'Standard_L32s', 'Standard_M64s', 'Standard_M64ms', + 'Standard_M128s', 'Standard_M128ms', 'Standard_M64-32ms', + 'Standard_M64-16ms', 'Standard_M128-64ms', 'Standard_M128-32ms', + 'Standard_NC6', 'Standard_NC12', 'Standard_NC24', 'Standard_NC24r', + 'Standard_NC6s_v2', 'Standard_NC12s_v2', 'Standard_NC24s_v2', + 'Standard_NC24rs_v2', 'Standard_NC6s_v3', 'Standard_NC12s_v3', + 'Standard_NC24s_v3', 'Standard_NC24rs_v3', 'Standard_ND6s', + 'Standard_ND12s', 'Standard_ND24s', 'Standard_ND24rs', 'Standard_NV6', + 'Standard_NV12', 'Standard_NV24' + :type vm_size: str or + ~azure.mgmt.compute.v2017_12_01.models.VirtualMachineSizeTypes + """ + + _attribute_map = { + 'vm_size': {'key': 'vmSize', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(HardwareProfile, self).__init__(**kwargs) + self.vm_size = kwargs.get('vm_size', None) + + +class Image(Resource): + """The source user image virtual hard disk. The virtual hard disk will be + copied before being attached to the virtual machine. If SourceImage is + provided, the destination virtual hard drive must not exist. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource Id + :vartype id: str + :ivar name: Resource name + :vartype name: str + :ivar type: Resource type + :vartype type: str + :param location: Required. Resource location + :type location: str + :param tags: Resource tags + :type tags: dict[str, str] + :param source_virtual_machine: The source virtual machine from which Image + is created. + :type source_virtual_machine: + ~azure.mgmt.compute.v2017_12_01.models.SubResource + :param storage_profile: Specifies the storage settings for the virtual + machine disks. + :type storage_profile: + ~azure.mgmt.compute.v2017_12_01.models.ImageStorageProfile + :ivar provisioning_state: The provisioning state. + :vartype provisioning_state: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'source_virtual_machine': {'key': 'properties.sourceVirtualMachine', 'type': 'SubResource'}, + 'storage_profile': {'key': 'properties.storageProfile', 'type': 'ImageStorageProfile'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(Image, self).__init__(**kwargs) + self.source_virtual_machine = kwargs.get('source_virtual_machine', None) + self.storage_profile = kwargs.get('storage_profile', None) + self.provisioning_state = None + + +class ImageDataDisk(Model): + """Describes a data disk. + + All required parameters must be populated in order to send to Azure. + + :param lun: Required. Specifies the logical unit number of the data disk. + This value is used to identify data disks within the VM and therefore must + be unique for each data disk attached to a VM. + :type lun: int + :param snapshot: The snapshot. + :type snapshot: ~azure.mgmt.compute.v2017_12_01.models.SubResource + :param managed_disk: The managedDisk. + :type managed_disk: ~azure.mgmt.compute.v2017_12_01.models.SubResource + :param blob_uri: The Virtual Hard Disk. + :type blob_uri: str + :param caching: Specifies the caching requirements.

    Possible + values are:

    **None**

    **ReadOnly**

    **ReadWrite** +

    Default: **None for Standard storage. ReadOnly for Premium + storage**. Possible values include: 'None', 'ReadOnly', 'ReadWrite' + :type caching: str or ~azure.mgmt.compute.v2017_12_01.models.CachingTypes + :param disk_size_gb: Specifies the size of empty data disks in gigabytes. + This element can be used to overwrite the name of the disk in a virtual + machine image.

    This value cannot be larger than 1023 GB + :type disk_size_gb: int + :param storage_account_type: Specifies the storage account type for the + managed disk. Possible values are: Standard_LRS or Premium_LRS. Possible + values include: 'Standard_LRS', 'Premium_LRS' + :type storage_account_type: str or + ~azure.mgmt.compute.v2017_12_01.models.StorageAccountTypes + """ + + _validation = { + 'lun': {'required': True}, + } + + _attribute_map = { + 'lun': {'key': 'lun', 'type': 'int'}, + 'snapshot': {'key': 'snapshot', 'type': 'SubResource'}, + 'managed_disk': {'key': 'managedDisk', 'type': 'SubResource'}, + 'blob_uri': {'key': 'blobUri', 'type': 'str'}, + 'caching': {'key': 'caching', 'type': 'CachingTypes'}, + 'disk_size_gb': {'key': 'diskSizeGB', 'type': 'int'}, + 'storage_account_type': {'key': 'storageAccountType', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ImageDataDisk, self).__init__(**kwargs) + self.lun = kwargs.get('lun', None) + self.snapshot = kwargs.get('snapshot', None) + self.managed_disk = kwargs.get('managed_disk', None) + self.blob_uri = kwargs.get('blob_uri', None) + self.caching = kwargs.get('caching', None) + self.disk_size_gb = kwargs.get('disk_size_gb', None) + self.storage_account_type = kwargs.get('storage_account_type', None) + + +class ImageOSDisk(Model): + """Describes an Operating System disk. + + All required parameters must be populated in order to send to Azure. + + :param os_type: Required. This property allows you to specify the type of + the OS that is included in the disk if creating a VM from a custom image. +

    Possible values are:

    **Windows**

    **Linux**. + Possible values include: 'Windows', 'Linux' + :type os_type: str or + ~azure.mgmt.compute.v2017_12_01.models.OperatingSystemTypes + :param os_state: Required. The OS State. Possible values include: + 'Generalized', 'Specialized' + :type os_state: str or + ~azure.mgmt.compute.v2017_12_01.models.OperatingSystemStateTypes + :param snapshot: The snapshot. + :type snapshot: ~azure.mgmt.compute.v2017_12_01.models.SubResource + :param managed_disk: The managedDisk. + :type managed_disk: ~azure.mgmt.compute.v2017_12_01.models.SubResource + :param blob_uri: The Virtual Hard Disk. + :type blob_uri: str + :param caching: Specifies the caching requirements.

    Possible + values are:

    **None**

    **ReadOnly**

    **ReadWrite** +

    Default: **None for Standard storage. ReadOnly for Premium + storage**. Possible values include: 'None', 'ReadOnly', 'ReadWrite' + :type caching: str or ~azure.mgmt.compute.v2017_12_01.models.CachingTypes + :param disk_size_gb: Specifies the size of empty data disks in gigabytes. + This element can be used to overwrite the name of the disk in a virtual + machine image.

    This value cannot be larger than 1023 GB + :type disk_size_gb: int + :param storage_account_type: Specifies the storage account type for the + managed disk. Possible values are: Standard_LRS or Premium_LRS. Possible + values include: 'Standard_LRS', 'Premium_LRS' + :type storage_account_type: str or + ~azure.mgmt.compute.v2017_12_01.models.StorageAccountTypes + """ + + _validation = { + 'os_type': {'required': True}, + 'os_state': {'required': True}, + } + + _attribute_map = { + 'os_type': {'key': 'osType', 'type': 'OperatingSystemTypes'}, + 'os_state': {'key': 'osState', 'type': 'OperatingSystemStateTypes'}, + 'snapshot': {'key': 'snapshot', 'type': 'SubResource'}, + 'managed_disk': {'key': 'managedDisk', 'type': 'SubResource'}, + 'blob_uri': {'key': 'blobUri', 'type': 'str'}, + 'caching': {'key': 'caching', 'type': 'CachingTypes'}, + 'disk_size_gb': {'key': 'diskSizeGB', 'type': 'int'}, + 'storage_account_type': {'key': 'storageAccountType', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ImageOSDisk, self).__init__(**kwargs) + self.os_type = kwargs.get('os_type', None) + self.os_state = kwargs.get('os_state', None) + self.snapshot = kwargs.get('snapshot', None) + self.managed_disk = kwargs.get('managed_disk', None) + self.blob_uri = kwargs.get('blob_uri', None) + self.caching = kwargs.get('caching', None) + self.disk_size_gb = kwargs.get('disk_size_gb', None) + self.storage_account_type = kwargs.get('storage_account_type', None) + + +class SubResource(Model): + """SubResource. + + :param id: Resource Id + :type id: str + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(SubResource, self).__init__(**kwargs) + self.id = kwargs.get('id', None) + + +class ImageReference(SubResource): + """Specifies information about the image to use. You can specify information + about platform images, marketplace images, or virtual machine images. This + element is required when you want to use a platform image, marketplace + image, or virtual machine image, but is not used in other creation + operations. + + :param id: Resource Id + :type id: str + :param publisher: The image publisher. + :type publisher: str + :param offer: Specifies the offer of the platform image or marketplace + image used to create the virtual machine. + :type offer: str + :param sku: The image SKU. + :type sku: str + :param version: Specifies the version of the platform image or marketplace + image used to create the virtual machine. The allowed formats are + Major.Minor.Build or 'latest'. Major, Minor, and Build are decimal + numbers. Specify 'latest' to use the latest version of an image available + at deploy time. Even if you use 'latest', the VM image will not + automatically update after deploy time even if a new version becomes + available. + :type version: str + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'publisher': {'key': 'publisher', 'type': 'str'}, + 'offer': {'key': 'offer', 'type': 'str'}, + 'sku': {'key': 'sku', 'type': 'str'}, + 'version': {'key': 'version', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ImageReference, self).__init__(**kwargs) + self.publisher = kwargs.get('publisher', None) + self.offer = kwargs.get('offer', None) + self.sku = kwargs.get('sku', None) + self.version = kwargs.get('version', None) + + +class ImageStorageProfile(Model): + """Describes a storage profile. + + :param os_disk: Specifies information about the operating system disk used + by the virtual machine.

    For more information about disks, see + [About disks and VHDs for Azure virtual + machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-about-disks-vhds?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). + :type os_disk: ~azure.mgmt.compute.v2017_12_01.models.ImageOSDisk + :param data_disks: Specifies the parameters that are used to add a data + disk to a virtual machine.

    For more information about disks, see + [About disks and VHDs for Azure virtual + machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-about-disks-vhds?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). + :type data_disks: + list[~azure.mgmt.compute.v2017_12_01.models.ImageDataDisk] + :param zone_resilient: Specifies whether an image is zone resilient or + not. Default is false. Zone resilient images can be created only in + regions that provide Zone Redundant Storage (ZRS). + :type zone_resilient: bool + """ + + _attribute_map = { + 'os_disk': {'key': 'osDisk', 'type': 'ImageOSDisk'}, + 'data_disks': {'key': 'dataDisks', 'type': '[ImageDataDisk]'}, + 'zone_resilient': {'key': 'zoneResilient', 'type': 'bool'}, + } + + def __init__(self, **kwargs): + super(ImageStorageProfile, self).__init__(**kwargs) + self.os_disk = kwargs.get('os_disk', None) + self.data_disks = kwargs.get('data_disks', None) + self.zone_resilient = kwargs.get('zone_resilient', None) + + +class ImageUpdate(UpdateResource): + """The source user image virtual hard disk. Only tags may be updated. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :param tags: Resource tags + :type tags: dict[str, str] + :param source_virtual_machine: The source virtual machine from which Image + is created. + :type source_virtual_machine: + ~azure.mgmt.compute.v2017_12_01.models.SubResource + :param storage_profile: Specifies the storage settings for the virtual + machine disks. + :type storage_profile: + ~azure.mgmt.compute.v2017_12_01.models.ImageStorageProfile + :ivar provisioning_state: The provisioning state. + :vartype provisioning_state: str + """ + + _validation = { + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + 'source_virtual_machine': {'key': 'properties.sourceVirtualMachine', 'type': 'SubResource'}, + 'storage_profile': {'key': 'properties.storageProfile', 'type': 'ImageStorageProfile'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ImageUpdate, self).__init__(**kwargs) + self.source_virtual_machine = kwargs.get('source_virtual_machine', None) + self.storage_profile = kwargs.get('storage_profile', None) + self.provisioning_state = None + + +class InnerError(Model): + """Inner error details. + + :param exceptiontype: The exception type. + :type exceptiontype: str + :param errordetail: The internal error message or exception dump. + :type errordetail: str + """ + + _attribute_map = { + 'exceptiontype': {'key': 'exceptiontype', 'type': 'str'}, + 'errordetail': {'key': 'errordetail', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(InnerError, self).__init__(**kwargs) + self.exceptiontype = kwargs.get('exceptiontype', None) + self.errordetail = kwargs.get('errordetail', None) + + +class InstanceViewStatus(Model): + """Instance view status. + + :param code: The status code. + :type code: str + :param level: The level code. Possible values include: 'Info', 'Warning', + 'Error' + :type level: str or + ~azure.mgmt.compute.v2017_12_01.models.StatusLevelTypes + :param display_status: The short localizable label for the status. + :type display_status: str + :param message: The detailed status message, including for alerts and + error messages. + :type message: str + :param time: The time of the status. + :type time: datetime + """ + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + 'level': {'key': 'level', 'type': 'StatusLevelTypes'}, + 'display_status': {'key': 'displayStatus', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + 'time': {'key': 'time', 'type': 'iso-8601'}, + } + + def __init__(self, **kwargs): + super(InstanceViewStatus, self).__init__(**kwargs) + self.code = kwargs.get('code', None) + self.level = kwargs.get('level', None) + self.display_status = kwargs.get('display_status', None) + self.message = kwargs.get('message', None) + self.time = kwargs.get('time', None) + + +class KeyVaultKeyReference(Model): + """Describes a reference to Key Vault Key. + + All required parameters must be populated in order to send to Azure. + + :param key_url: Required. The URL referencing a key encryption key in Key + Vault. + :type key_url: str + :param source_vault: Required. The relative URL of the Key Vault + containing the key. + :type source_vault: ~azure.mgmt.compute.v2017_12_01.models.SubResource + """ + + _validation = { + 'key_url': {'required': True}, + 'source_vault': {'required': True}, + } + + _attribute_map = { + 'key_url': {'key': 'keyUrl', 'type': 'str'}, + 'source_vault': {'key': 'sourceVault', 'type': 'SubResource'}, + } + + def __init__(self, **kwargs): + super(KeyVaultKeyReference, self).__init__(**kwargs) + self.key_url = kwargs.get('key_url', None) + self.source_vault = kwargs.get('source_vault', None) + + +class KeyVaultSecretReference(Model): + """Describes a reference to Key Vault Secret. + + All required parameters must be populated in order to send to Azure. + + :param secret_url: Required. The URL referencing a secret in a Key Vault. + :type secret_url: str + :param source_vault: Required. The relative URL of the Key Vault + containing the secret. + :type source_vault: ~azure.mgmt.compute.v2017_12_01.models.SubResource + """ + + _validation = { + 'secret_url': {'required': True}, + 'source_vault': {'required': True}, + } + + _attribute_map = { + 'secret_url': {'key': 'secretUrl', 'type': 'str'}, + 'source_vault': {'key': 'sourceVault', 'type': 'SubResource'}, + } + + def __init__(self, **kwargs): + super(KeyVaultSecretReference, self).__init__(**kwargs) + self.secret_url = kwargs.get('secret_url', None) + self.source_vault = kwargs.get('source_vault', None) + + +class LinuxConfiguration(Model): + """Specifies the Linux operating system settings on the virtual machine. +

    For a list of supported Linux distributions, see [Linux on + Azure-Endorsed + Distributions](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-endorsed-distros?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json) +

    For running non-endorsed distributions, see [Information for + Non-Endorsed + Distributions](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-create-upload-generic?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json). + + :param disable_password_authentication: Specifies whether password + authentication should be disabled. + :type disable_password_authentication: bool + :param ssh: Specifies the ssh key configuration for a Linux OS. + :type ssh: ~azure.mgmt.compute.v2017_12_01.models.SshConfiguration + """ + + _attribute_map = { + 'disable_password_authentication': {'key': 'disablePasswordAuthentication', 'type': 'bool'}, + 'ssh': {'key': 'ssh', 'type': 'SshConfiguration'}, + } + + def __init__(self, **kwargs): + super(LinuxConfiguration, self).__init__(**kwargs) + self.disable_password_authentication = kwargs.get('disable_password_authentication', None) + self.ssh = kwargs.get('ssh', None) + + +class LogAnalyticsInputBase(Model): + """Api input base class for LogAnalytics Api. + + All required parameters must be populated in order to send to Azure. + + :param blob_container_sas_uri: Required. SAS Uri of the logging blob + container to which LogAnalytics Api writes output logs to. + :type blob_container_sas_uri: str + :param from_time: Required. From time of the query + :type from_time: datetime + :param to_time: Required. To time of the query + :type to_time: datetime + :param group_by_throttle_policy: Group query result by Throttle Policy + applied. + :type group_by_throttle_policy: bool + :param group_by_operation_name: Group query result by Operation Name. + :type group_by_operation_name: bool + :param group_by_resource_name: Group query result by Resource Name. + :type group_by_resource_name: bool + """ + + _validation = { + 'blob_container_sas_uri': {'required': True}, + 'from_time': {'required': True}, + 'to_time': {'required': True}, + } + + _attribute_map = { + 'blob_container_sas_uri': {'key': 'blobContainerSasUri', 'type': 'str'}, + 'from_time': {'key': 'fromTime', 'type': 'iso-8601'}, + 'to_time': {'key': 'toTime', 'type': 'iso-8601'}, + 'group_by_throttle_policy': {'key': 'groupByThrottlePolicy', 'type': 'bool'}, + 'group_by_operation_name': {'key': 'groupByOperationName', 'type': 'bool'}, + 'group_by_resource_name': {'key': 'groupByResourceName', 'type': 'bool'}, + } + + def __init__(self, **kwargs): + super(LogAnalyticsInputBase, self).__init__(**kwargs) + self.blob_container_sas_uri = kwargs.get('blob_container_sas_uri', None) + self.from_time = kwargs.get('from_time', None) + self.to_time = kwargs.get('to_time', None) + self.group_by_throttle_policy = kwargs.get('group_by_throttle_policy', None) + self.group_by_operation_name = kwargs.get('group_by_operation_name', None) + self.group_by_resource_name = kwargs.get('group_by_resource_name', None) + + +class OperationStatusResponse(Model): + """Operation status response. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar name: Operation ID + :vartype name: str + :ivar status: Operation status + :vartype status: str + :ivar start_time: Start time of the operation + :vartype start_time: datetime + :ivar end_time: End time of the operation + :vartype end_time: datetime + :ivar error: Api error + :vartype error: ~azure.mgmt.compute.v2017_12_01.models.ApiError + """ + + _validation = { + 'name': {'readonly': True}, + 'status': {'readonly': True}, + 'start_time': {'readonly': True}, + 'end_time': {'readonly': True}, + 'error': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'status': {'key': 'status', 'type': 'str'}, + 'start_time': {'key': 'startTime', 'type': 'iso-8601'}, + 'end_time': {'key': 'endTime', 'type': 'iso-8601'}, + 'error': {'key': 'error', 'type': 'ApiError'}, + } + + def __init__(self, **kwargs): + super(OperationStatusResponse, self).__init__(**kwargs) + self.name = None + self.status = None + self.start_time = None + self.end_time = None + self.error = None + + +class LogAnalyticsOperationResult(OperationStatusResponse): + """LogAnalytics operation status response. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar name: Operation ID + :vartype name: str + :ivar status: Operation status + :vartype status: str + :ivar start_time: Start time of the operation + :vartype start_time: datetime + :ivar end_time: End time of the operation + :vartype end_time: datetime + :ivar error: Api error + :vartype error: ~azure.mgmt.compute.v2017_12_01.models.ApiError + :ivar properties: LogAnalyticsOutput + :vartype properties: + ~azure.mgmt.compute.v2017_12_01.models.LogAnalyticsOutput + """ + + _validation = { + 'name': {'readonly': True}, + 'status': {'readonly': True}, + 'start_time': {'readonly': True}, + 'end_time': {'readonly': True}, + 'error': {'readonly': True}, + 'properties': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'status': {'key': 'status', 'type': 'str'}, + 'start_time': {'key': 'startTime', 'type': 'iso-8601'}, + 'end_time': {'key': 'endTime', 'type': 'iso-8601'}, + 'error': {'key': 'error', 'type': 'ApiError'}, + 'properties': {'key': 'properties', 'type': 'LogAnalyticsOutput'}, + } + + def __init__(self, **kwargs): + super(LogAnalyticsOperationResult, self).__init__(**kwargs) + self.properties = None + + +class LogAnalyticsOutput(Model): + """LogAnalytics output properties. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar output: Output file Uri path to blob container. + :vartype output: str + """ + + _validation = { + 'output': {'readonly': True}, + } + + _attribute_map = { + 'output': {'key': 'output', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(LogAnalyticsOutput, self).__init__(**kwargs) + self.output = None + + +class MaintenanceRedeployStatus(Model): + """Maintenance Operation Status. + + :param is_customer_initiated_maintenance_allowed: True, if customer is + allowed to perform Maintenance. + :type is_customer_initiated_maintenance_allowed: bool + :param pre_maintenance_window_start_time: Start Time for the Pre + Maintenance Window. + :type pre_maintenance_window_start_time: datetime + :param pre_maintenance_window_end_time: End Time for the Pre Maintenance + Window. + :type pre_maintenance_window_end_time: datetime + :param maintenance_window_start_time: Start Time for the Maintenance + Window. + :type maintenance_window_start_time: datetime + :param maintenance_window_end_time: End Time for the Maintenance Window. + :type maintenance_window_end_time: datetime + :param last_operation_result_code: The Last Maintenance Operation Result + Code. Possible values include: 'None', 'RetryLater', 'MaintenanceAborted', + 'MaintenanceCompleted' + :type last_operation_result_code: str or + ~azure.mgmt.compute.v2017_12_01.models.MaintenanceOperationResultCodeTypes + :param last_operation_message: Message returned for the last Maintenance + Operation. + :type last_operation_message: str + """ + + _attribute_map = { + 'is_customer_initiated_maintenance_allowed': {'key': 'isCustomerInitiatedMaintenanceAllowed', 'type': 'bool'}, + 'pre_maintenance_window_start_time': {'key': 'preMaintenanceWindowStartTime', 'type': 'iso-8601'}, + 'pre_maintenance_window_end_time': {'key': 'preMaintenanceWindowEndTime', 'type': 'iso-8601'}, + 'maintenance_window_start_time': {'key': 'maintenanceWindowStartTime', 'type': 'iso-8601'}, + 'maintenance_window_end_time': {'key': 'maintenanceWindowEndTime', 'type': 'iso-8601'}, + 'last_operation_result_code': {'key': 'lastOperationResultCode', 'type': 'MaintenanceOperationResultCodeTypes'}, + 'last_operation_message': {'key': 'lastOperationMessage', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(MaintenanceRedeployStatus, self).__init__(**kwargs) + self.is_customer_initiated_maintenance_allowed = kwargs.get('is_customer_initiated_maintenance_allowed', None) + self.pre_maintenance_window_start_time = kwargs.get('pre_maintenance_window_start_time', None) + self.pre_maintenance_window_end_time = kwargs.get('pre_maintenance_window_end_time', None) + self.maintenance_window_start_time = kwargs.get('maintenance_window_start_time', None) + self.maintenance_window_end_time = kwargs.get('maintenance_window_end_time', None) + self.last_operation_result_code = kwargs.get('last_operation_result_code', None) + self.last_operation_message = kwargs.get('last_operation_message', None) + + +class ManagedDiskParameters(SubResource): + """The parameters of a managed disk. + + :param id: Resource Id + :type id: str + :param storage_account_type: Specifies the storage account type for the + managed disk. Possible values are: Standard_LRS or Premium_LRS. Possible + values include: 'Standard_LRS', 'Premium_LRS' + :type storage_account_type: str or + ~azure.mgmt.compute.v2017_12_01.models.StorageAccountTypes + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'storage_account_type': {'key': 'storageAccountType', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ManagedDiskParameters, self).__init__(**kwargs) + self.storage_account_type = kwargs.get('storage_account_type', None) + + +class NetworkInterfaceReference(SubResource): + """Describes a network interface reference. + + :param id: Resource Id + :type id: str + :param primary: Specifies the primary network interface in case the + virtual machine has more than 1 network interface. + :type primary: bool + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'primary': {'key': 'properties.primary', 'type': 'bool'}, + } + + def __init__(self, **kwargs): + super(NetworkInterfaceReference, self).__init__(**kwargs) + self.primary = kwargs.get('primary', None) + + +class NetworkProfile(Model): + """Specifies the network interfaces of the virtual machine. + + :param network_interfaces: Specifies the list of resource Ids for the + network interfaces associated with the virtual machine. + :type network_interfaces: + list[~azure.mgmt.compute.v2017_12_01.models.NetworkInterfaceReference] + """ + + _attribute_map = { + 'network_interfaces': {'key': 'networkInterfaces', 'type': '[NetworkInterfaceReference]'}, + } + + def __init__(self, **kwargs): + super(NetworkProfile, self).__init__(**kwargs) + self.network_interfaces = kwargs.get('network_interfaces', None) + + +class OSDisk(Model): + """Specifies information about the operating system disk used by the virtual + machine.

    For more information about disks, see [About disks and + VHDs for Azure virtual + machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-about-disks-vhds?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). + + All required parameters must be populated in order to send to Azure. + + :param os_type: This property allows you to specify the type of the OS + that is included in the disk if creating a VM from user-image or a + specialized VHD.

    Possible values are:

    **Windows** +

    **Linux**. Possible values include: 'Windows', 'Linux' + :type os_type: str or + ~azure.mgmt.compute.v2017_12_01.models.OperatingSystemTypes + :param encryption_settings: Specifies the encryption settings for the OS + Disk.

    Minimum api-version: 2015-06-15 + :type encryption_settings: + ~azure.mgmt.compute.v2017_12_01.models.DiskEncryptionSettings + :param name: The disk name. + :type name: str + :param vhd: The virtual hard disk. + :type vhd: ~azure.mgmt.compute.v2017_12_01.models.VirtualHardDisk + :param image: The source user image virtual hard disk. The virtual hard + disk will be copied before being attached to the virtual machine. If + SourceImage is provided, the destination virtual hard drive must not + exist. + :type image: ~azure.mgmt.compute.v2017_12_01.models.VirtualHardDisk + :param caching: Specifies the caching requirements.

    Possible + values are:

    **None**

    **ReadOnly**

    **ReadWrite** +

    Default: **None for Standard storage. ReadOnly for Premium + storage**. Possible values include: 'None', 'ReadOnly', 'ReadWrite' + :type caching: str or ~azure.mgmt.compute.v2017_12_01.models.CachingTypes + :param write_accelerator_enabled: Specifies whether writeAccelerator + should be enabled or disabled on the disk. + :type write_accelerator_enabled: bool + :param create_option: Required. Specifies how the virtual machine should + be created.

    Possible values are:

    **Attach** \\u2013 This + value is used when you are using a specialized disk to create the virtual + machine.

    **FromImage** \\u2013 This value is used when you are + using an image to create the virtual machine. If you are using a platform + image, you also use the imageReference element described above. If you are + using a marketplace image, you also use the plan element previously + described. Possible values include: 'FromImage', 'Empty', 'Attach' + :type create_option: str or + ~azure.mgmt.compute.v2017_12_01.models.DiskCreateOptionTypes + :param disk_size_gb: Specifies the size of an empty data disk in + gigabytes. This element can be used to overwrite the size of the disk in a + virtual machine image.

    This value cannot be larger than 1023 GB + :type disk_size_gb: int + :param managed_disk: The managed disk parameters. + :type managed_disk: + ~azure.mgmt.compute.v2017_12_01.models.ManagedDiskParameters + """ + + _validation = { + 'create_option': {'required': True}, + } + + _attribute_map = { + 'os_type': {'key': 'osType', 'type': 'OperatingSystemTypes'}, + 'encryption_settings': {'key': 'encryptionSettings', 'type': 'DiskEncryptionSettings'}, + 'name': {'key': 'name', 'type': 'str'}, + 'vhd': {'key': 'vhd', 'type': 'VirtualHardDisk'}, + 'image': {'key': 'image', 'type': 'VirtualHardDisk'}, + 'caching': {'key': 'caching', 'type': 'CachingTypes'}, + 'write_accelerator_enabled': {'key': 'writeAcceleratorEnabled', 'type': 'bool'}, + 'create_option': {'key': 'createOption', 'type': 'str'}, + 'disk_size_gb': {'key': 'diskSizeGB', 'type': 'int'}, + 'managed_disk': {'key': 'managedDisk', 'type': 'ManagedDiskParameters'}, + } + + def __init__(self, **kwargs): + super(OSDisk, self).__init__(**kwargs) + self.os_type = kwargs.get('os_type', None) + self.encryption_settings = kwargs.get('encryption_settings', None) + self.name = kwargs.get('name', None) + self.vhd = kwargs.get('vhd', None) + self.image = kwargs.get('image', None) + self.caching = kwargs.get('caching', None) + self.write_accelerator_enabled = kwargs.get('write_accelerator_enabled', None) + self.create_option = kwargs.get('create_option', None) + self.disk_size_gb = kwargs.get('disk_size_gb', None) + self.managed_disk = kwargs.get('managed_disk', None) + + +class OSDiskImage(Model): + """Contains the os disk image information. + + All required parameters must be populated in order to send to Azure. + + :param operating_system: Required. The operating system of the + osDiskImage. Possible values include: 'Windows', 'Linux' + :type operating_system: str or + ~azure.mgmt.compute.v2017_12_01.models.OperatingSystemTypes + """ + + _validation = { + 'operating_system': {'required': True}, + } + + _attribute_map = { + 'operating_system': {'key': 'operatingSystem', 'type': 'OperatingSystemTypes'}, + } + + def __init__(self, **kwargs): + super(OSDiskImage, self).__init__(**kwargs) + self.operating_system = kwargs.get('operating_system', None) + + +class OSProfile(Model): + """Specifies the operating system settings for the virtual machine. + + :param computer_name: Specifies the host OS name of the virtual machine. +

    This name cannot be updated after the VM is created.

    + **Max-length (Windows):** 15 characters

    **Max-length (Linux):** + 64 characters.

    For naming conventions and restrictions see [Azure + infrastructure services implementation + guidelines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-infrastructure-subscription-accounts-guidelines?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json#1-naming-conventions). + :type computer_name: str + :param admin_username: Specifies the name of the administrator account. +

    **Windows-only restriction:** Cannot end in "."

    + **Disallowed values:** "administrator", "admin", "user", "user1", "test", + "user2", "test1", "user3", "admin1", "1", "123", "a", "actuser", "adm", + "admin2", "aspnet", "backup", "console", "david", "guest", "john", + "owner", "root", "server", "sql", "support", "support_388945a0", "sys", + "test2", "test3", "user4", "user5".

    **Minimum-length (Linux):** 1 + character

    **Max-length (Linux):** 64 characters

    + **Max-length (Windows):** 20 characters

  • For root access to + the Linux VM, see [Using root privileges on Linux virtual machines in + Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-use-root-privileges?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json)
  • + For a list of built-in system users on Linux that should not be used in + this field, see [Selecting User Names for Linux on + Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-usernames?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json) + :type admin_username: str + :param admin_password: Specifies the password of the administrator + account.

    **Minimum-length (Windows):** 8 characters

    + **Minimum-length (Linux):** 6 characters

    **Max-length + (Windows):** 123 characters

    **Max-length (Linux):** 72 characters +

    **Complexity requirements:** 3 out of 4 conditions below need to + be fulfilled
    Has lower characters
    Has upper characters
    Has a + digit
    Has a special character (Regex match [\\W_])

    + **Disallowed values:** "abc@123", "P@$$w0rd", "P@ssw0rd", "P@ssword123", + "Pa$$word", "pass@word1", "Password!", "Password1", "Password22", + "iloveyou!"

    For resetting the password, see [How to reset the + Remote Desktop service or its login password in a Windows + VM](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-reset-rdp?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json) +

    For resetting root password, see [Manage users, SSH, and check or + repair disks on Azure Linux VMs using the VMAccess + Extension](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-using-vmaccess-extension?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json#reset-root-password) + :type admin_password: str + :param custom_data: Specifies a base-64 encoded string of custom data. The + base-64 encoded string is decoded to a binary array that is saved as a + file on the Virtual Machine. The maximum length of the binary array is + 65535 bytes.

    For using cloud-init for your VM, see [Using + cloud-init to customize a Linux VM during + creation](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-using-cloud-init?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json) + :type custom_data: str + :param windows_configuration: Specifies Windows operating system settings + on the virtual machine. + :type windows_configuration: + ~azure.mgmt.compute.v2017_12_01.models.WindowsConfiguration + :param linux_configuration: Specifies the Linux operating system settings + on the virtual machine.

    For a list of supported Linux + distributions, see [Linux on Azure-Endorsed + Distributions](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-endorsed-distros?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json) +

    For running non-endorsed distributions, see [Information for + Non-Endorsed + Distributions](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-create-upload-generic?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json). + :type linux_configuration: + ~azure.mgmt.compute.v2017_12_01.models.LinuxConfiguration + :param secrets: Specifies set of certificates that should be installed + onto the virtual machine. + :type secrets: + list[~azure.mgmt.compute.v2017_12_01.models.VaultSecretGroup] + """ + + _attribute_map = { + 'computer_name': {'key': 'computerName', 'type': 'str'}, + 'admin_username': {'key': 'adminUsername', 'type': 'str'}, + 'admin_password': {'key': 'adminPassword', 'type': 'str'}, + 'custom_data': {'key': 'customData', 'type': 'str'}, + 'windows_configuration': {'key': 'windowsConfiguration', 'type': 'WindowsConfiguration'}, + 'linux_configuration': {'key': 'linuxConfiguration', 'type': 'LinuxConfiguration'}, + 'secrets': {'key': 'secrets', 'type': '[VaultSecretGroup]'}, + } + + def __init__(self, **kwargs): + super(OSProfile, self).__init__(**kwargs) + self.computer_name = kwargs.get('computer_name', None) + self.admin_username = kwargs.get('admin_username', None) + self.admin_password = kwargs.get('admin_password', None) + self.custom_data = kwargs.get('custom_data', None) + self.windows_configuration = kwargs.get('windows_configuration', None) + self.linux_configuration = kwargs.get('linux_configuration', None) + self.secrets = kwargs.get('secrets', None) + + +class Plan(Model): + """Specifies information about the marketplace image used to create the + virtual machine. This element is only used for marketplace images. Before + you can use a marketplace image from an API, you must enable the image for + programmatic use. In the Azure portal, find the marketplace image that you + want to use and then click **Want to deploy programmatically, Get Started + ->**. Enter any required information and then click **Save**. + + :param name: The plan ID. + :type name: str + :param publisher: The publisher ID. + :type publisher: str + :param product: Specifies the product of the image from the marketplace. + This is the same value as Offer under the imageReference element. + :type product: str + :param promotion_code: The promotion code. + :type promotion_code: str + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'publisher': {'key': 'publisher', 'type': 'str'}, + 'product': {'key': 'product', 'type': 'str'}, + 'promotion_code': {'key': 'promotionCode', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(Plan, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.publisher = kwargs.get('publisher', None) + self.product = kwargs.get('product', None) + self.promotion_code = kwargs.get('promotion_code', None) + + +class PurchasePlan(Model): + """Used for establishing the purchase context of any 3rd Party artifact + through MarketPlace. + + All required parameters must be populated in order to send to Azure. + + :param publisher: Required. The publisher ID. + :type publisher: str + :param name: Required. The plan ID. + :type name: str + :param product: Required. Specifies the product of the image from the + marketplace. This is the same value as Offer under the imageReference + element. + :type product: str + """ + + _validation = { + 'publisher': {'required': True}, + 'name': {'required': True}, + 'product': {'required': True}, + } + + _attribute_map = { + 'publisher': {'key': 'publisher', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'product': {'key': 'product', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(PurchasePlan, self).__init__(**kwargs) + self.publisher = kwargs.get('publisher', None) + self.name = kwargs.get('name', None) + self.product = kwargs.get('product', None) + + +class RecoveryWalkResponse(Model): + """Response after calling a manual recovery walk. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar walk_performed: Whether the recovery walk was performed + :vartype walk_performed: bool + :ivar next_platform_update_domain: The next update domain that needs to be + walked. Null means walk spanning all update domains has been completed + :vartype next_platform_update_domain: int + """ + + _validation = { + 'walk_performed': {'readonly': True}, + 'next_platform_update_domain': {'readonly': True}, + } + + _attribute_map = { + 'walk_performed': {'key': 'walkPerformed', 'type': 'bool'}, + 'next_platform_update_domain': {'key': 'nextPlatformUpdateDomain', 'type': 'int'}, + } + + def __init__(self, **kwargs): + super(RecoveryWalkResponse, self).__init__(**kwargs) + self.walk_performed = None + self.next_platform_update_domain = None + + +class RequestRateByIntervalInput(LogAnalyticsInputBase): + """Api request input for LogAnalytics getRequestRateByInterval Api. + + All required parameters must be populated in order to send to Azure. + + :param blob_container_sas_uri: Required. SAS Uri of the logging blob + container to which LogAnalytics Api writes output logs to. + :type blob_container_sas_uri: str + :param from_time: Required. From time of the query + :type from_time: datetime + :param to_time: Required. To time of the query + :type to_time: datetime + :param group_by_throttle_policy: Group query result by Throttle Policy + applied. + :type group_by_throttle_policy: bool + :param group_by_operation_name: Group query result by Operation Name. + :type group_by_operation_name: bool + :param group_by_resource_name: Group query result by Resource Name. + :type group_by_resource_name: bool + :param interval_length: Required. Interval value in minutes used to create + LogAnalytics call rate logs. Possible values include: 'ThreeMins', + 'FiveMins', 'ThirtyMins', 'SixtyMins' + :type interval_length: str or + ~azure.mgmt.compute.v2017_12_01.models.IntervalInMins + """ + + _validation = { + 'blob_container_sas_uri': {'required': True}, + 'from_time': {'required': True}, + 'to_time': {'required': True}, + 'interval_length': {'required': True}, + } + + _attribute_map = { + 'blob_container_sas_uri': {'key': 'blobContainerSasUri', 'type': 'str'}, + 'from_time': {'key': 'fromTime', 'type': 'iso-8601'}, + 'to_time': {'key': 'toTime', 'type': 'iso-8601'}, + 'group_by_throttle_policy': {'key': 'groupByThrottlePolicy', 'type': 'bool'}, + 'group_by_operation_name': {'key': 'groupByOperationName', 'type': 'bool'}, + 'group_by_resource_name': {'key': 'groupByResourceName', 'type': 'bool'}, + 'interval_length': {'key': 'intervalLength', 'type': 'IntervalInMins'}, + } + + def __init__(self, **kwargs): + super(RequestRateByIntervalInput, self).__init__(**kwargs) + self.interval_length = kwargs.get('interval_length', None) + + +class RollbackStatusInfo(Model): + """Information about rollback on failed VM instances after a OS Upgrade + operation. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar successfully_rolledback_instance_count: The number of instances + which have been successfully rolled back. + :vartype successfully_rolledback_instance_count: int + :ivar failed_rolledback_instance_count: The number of instances which + failed to rollback. + :vartype failed_rolledback_instance_count: int + :ivar rollback_error: Error details if OS rollback failed. + :vartype rollback_error: ~azure.mgmt.compute.v2017_12_01.models.ApiError + """ + + _validation = { + 'successfully_rolledback_instance_count': {'readonly': True}, + 'failed_rolledback_instance_count': {'readonly': True}, + 'rollback_error': {'readonly': True}, + } + + _attribute_map = { + 'successfully_rolledback_instance_count': {'key': 'successfullyRolledbackInstanceCount', 'type': 'int'}, + 'failed_rolledback_instance_count': {'key': 'failedRolledbackInstanceCount', 'type': 'int'}, + 'rollback_error': {'key': 'rollbackError', 'type': 'ApiError'}, + } + + def __init__(self, **kwargs): + super(RollbackStatusInfo, self).__init__(**kwargs) + self.successfully_rolledback_instance_count = None + self.failed_rolledback_instance_count = None + self.rollback_error = None + + +class RollingUpgradePolicy(Model): + """The configuration parameters used while performing a rolling upgrade. + + :param max_batch_instance_percent: The maximum percent of total virtual + machine instances that will be upgraded simultaneously by the rolling + upgrade in one batch. As this is a maximum, unhealthy instances in + previous or future batches can cause the percentage of instances in a + batch to decrease to ensure higher reliability. The default value for this + parameter is 20%. + :type max_batch_instance_percent: int + :param max_unhealthy_instance_percent: The maximum percentage of the total + virtual machine instances in the scale set that can be simultaneously + unhealthy, either as a result of being upgraded, or by being found in an + unhealthy state by the virtual machine health checks before the rolling + upgrade aborts. This constraint will be checked prior to starting any + batch. The default value for this parameter is 20%. + :type max_unhealthy_instance_percent: int + :param max_unhealthy_upgraded_instance_percent: The maximum percentage of + upgraded virtual machine instances that can be found to be in an unhealthy + state. This check will happen after each batch is upgraded. If this + percentage is ever exceeded, the rolling update aborts. The default value + for this parameter is 20%. + :type max_unhealthy_upgraded_instance_percent: int + :param pause_time_between_batches: The wait time between completing the + update for all virtual machines in one batch and starting the next batch. + The time duration should be specified in ISO 8601 format. The default + value is 0 seconds (PT0S). + :type pause_time_between_batches: str + """ + + _validation = { + 'max_batch_instance_percent': {'maximum': 100, 'minimum': 5}, + 'max_unhealthy_instance_percent': {'maximum': 100, 'minimum': 5}, + 'max_unhealthy_upgraded_instance_percent': {'maximum': 100, 'minimum': 0}, + } + + _attribute_map = { + 'max_batch_instance_percent': {'key': 'maxBatchInstancePercent', 'type': 'int'}, + 'max_unhealthy_instance_percent': {'key': 'maxUnhealthyInstancePercent', 'type': 'int'}, + 'max_unhealthy_upgraded_instance_percent': {'key': 'maxUnhealthyUpgradedInstancePercent', 'type': 'int'}, + 'pause_time_between_batches': {'key': 'pauseTimeBetweenBatches', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(RollingUpgradePolicy, self).__init__(**kwargs) + self.max_batch_instance_percent = kwargs.get('max_batch_instance_percent', None) + self.max_unhealthy_instance_percent = kwargs.get('max_unhealthy_instance_percent', None) + self.max_unhealthy_upgraded_instance_percent = kwargs.get('max_unhealthy_upgraded_instance_percent', None) + self.pause_time_between_batches = kwargs.get('pause_time_between_batches', None) + + +class RollingUpgradeProgressInfo(Model): + """Information about the number of virtual machine instances in each upgrade + state. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar successful_instance_count: The number of instances that have been + successfully upgraded. + :vartype successful_instance_count: int + :ivar failed_instance_count: The number of instances that have failed to + be upgraded successfully. + :vartype failed_instance_count: int + :ivar in_progress_instance_count: The number of instances that are + currently being upgraded. + :vartype in_progress_instance_count: int + :ivar pending_instance_count: The number of instances that have not yet + begun to be upgraded. + :vartype pending_instance_count: int + """ + + _validation = { + 'successful_instance_count': {'readonly': True}, + 'failed_instance_count': {'readonly': True}, + 'in_progress_instance_count': {'readonly': True}, + 'pending_instance_count': {'readonly': True}, + } + + _attribute_map = { + 'successful_instance_count': {'key': 'successfulInstanceCount', 'type': 'int'}, + 'failed_instance_count': {'key': 'failedInstanceCount', 'type': 'int'}, + 'in_progress_instance_count': {'key': 'inProgressInstanceCount', 'type': 'int'}, + 'pending_instance_count': {'key': 'pendingInstanceCount', 'type': 'int'}, + } + + def __init__(self, **kwargs): + super(RollingUpgradeProgressInfo, self).__init__(**kwargs) + self.successful_instance_count = None + self.failed_instance_count = None + self.in_progress_instance_count = None + self.pending_instance_count = None + + +class RollingUpgradeRunningStatus(Model): + """Information about the current running state of the overall upgrade. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar code: Code indicating the current status of the upgrade. Possible + values include: 'RollingForward', 'Cancelled', 'Completed', 'Faulted' + :vartype code: str or + ~azure.mgmt.compute.v2017_12_01.models.RollingUpgradeStatusCode + :ivar start_time: Start time of the upgrade. + :vartype start_time: datetime + :ivar last_action: The last action performed on the rolling upgrade. + Possible values include: 'Start', 'Cancel' + :vartype last_action: str or + ~azure.mgmt.compute.v2017_12_01.models.RollingUpgradeActionType + :ivar last_action_time: Last action time of the upgrade. + :vartype last_action_time: datetime + """ + + _validation = { + 'code': {'readonly': True}, + 'start_time': {'readonly': True}, + 'last_action': {'readonly': True}, + 'last_action_time': {'readonly': True}, + } + + _attribute_map = { + 'code': {'key': 'code', 'type': 'RollingUpgradeStatusCode'}, + 'start_time': {'key': 'startTime', 'type': 'iso-8601'}, + 'last_action': {'key': 'lastAction', 'type': 'RollingUpgradeActionType'}, + 'last_action_time': {'key': 'lastActionTime', 'type': 'iso-8601'}, + } + + def __init__(self, **kwargs): + super(RollingUpgradeRunningStatus, self).__init__(**kwargs) + self.code = None + self.start_time = None + self.last_action = None + self.last_action_time = None + + +class RollingUpgradeStatusInfo(Resource): + """The status of the latest virtual machine scale set rolling upgrade. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource Id + :vartype id: str + :ivar name: Resource name + :vartype name: str + :ivar type: Resource type + :vartype type: str + :param location: Required. Resource location + :type location: str + :param tags: Resource tags + :type tags: dict[str, str] + :ivar policy: The rolling upgrade policies applied for this upgrade. + :vartype policy: + ~azure.mgmt.compute.v2017_12_01.models.RollingUpgradePolicy + :ivar running_status: Information about the current running state of the + overall upgrade. + :vartype running_status: + ~azure.mgmt.compute.v2017_12_01.models.RollingUpgradeRunningStatus + :ivar progress: Information about the number of virtual machine instances + in each upgrade state. + :vartype progress: + ~azure.mgmt.compute.v2017_12_01.models.RollingUpgradeProgressInfo + :ivar error: Error details for this upgrade, if there are any. + :vartype error: ~azure.mgmt.compute.v2017_12_01.models.ApiError + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + 'policy': {'readonly': True}, + 'running_status': {'readonly': True}, + 'progress': {'readonly': True}, + 'error': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'policy': {'key': 'properties.policy', 'type': 'RollingUpgradePolicy'}, + 'running_status': {'key': 'properties.runningStatus', 'type': 'RollingUpgradeRunningStatus'}, + 'progress': {'key': 'properties.progress', 'type': 'RollingUpgradeProgressInfo'}, + 'error': {'key': 'properties.error', 'type': 'ApiError'}, + } + + def __init__(self, **kwargs): + super(RollingUpgradeStatusInfo, self).__init__(**kwargs) + self.policy = None + self.running_status = None + self.progress = None + self.error = None + + +class RunCommandDocumentBase(Model): + """Describes the properties of a Run Command metadata. + + All required parameters must be populated in order to send to Azure. + + :param schema: Required. The VM run command schema. + :type schema: str + :param id: Required. The VM run command id. + :type id: str + :param os_type: Required. The Operating System type. Possible values + include: 'Windows', 'Linux' + :type os_type: str or + ~azure.mgmt.compute.v2017_12_01.models.OperatingSystemTypes + :param label: Required. The VM run command label. + :type label: str + :param description: Required. The VM run command description. + :type description: str + """ + + _validation = { + 'schema': {'required': True}, + 'id': {'required': True}, + 'os_type': {'required': True}, + 'label': {'required': True}, + 'description': {'required': True}, + } + + _attribute_map = { + 'schema': {'key': '$schema', 'type': 'str'}, + 'id': {'key': 'id', 'type': 'str'}, + 'os_type': {'key': 'osType', 'type': 'OperatingSystemTypes'}, + 'label': {'key': 'label', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(RunCommandDocumentBase, self).__init__(**kwargs) + self.schema = kwargs.get('schema', None) + self.id = kwargs.get('id', None) + self.os_type = kwargs.get('os_type', None) + self.label = kwargs.get('label', None) + self.description = kwargs.get('description', None) + + +class RunCommandDocument(RunCommandDocumentBase): + """Describes the properties of a Run Command. + + All required parameters must be populated in order to send to Azure. + + :param schema: Required. The VM run command schema. + :type schema: str + :param id: Required. The VM run command id. + :type id: str + :param os_type: Required. The Operating System type. Possible values + include: 'Windows', 'Linux' + :type os_type: str or + ~azure.mgmt.compute.v2017_12_01.models.OperatingSystemTypes + :param label: Required. The VM run command label. + :type label: str + :param description: Required. The VM run command description. + :type description: str + :param script: Required. The script to be executed. + :type script: list[str] + :param parameters: The parameters used by the script. + :type parameters: + list[~azure.mgmt.compute.v2017_12_01.models.RunCommandParameterDefinition] + """ + + _validation = { + 'schema': {'required': True}, + 'id': {'required': True}, + 'os_type': {'required': True}, + 'label': {'required': True}, + 'description': {'required': True}, + 'script': {'required': True}, + } + + _attribute_map = { + 'schema': {'key': '$schema', 'type': 'str'}, + 'id': {'key': 'id', 'type': 'str'}, + 'os_type': {'key': 'osType', 'type': 'OperatingSystemTypes'}, + 'label': {'key': 'label', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + 'script': {'key': 'script', 'type': '[str]'}, + 'parameters': {'key': 'parameters', 'type': '[RunCommandParameterDefinition]'}, + } + + def __init__(self, **kwargs): + super(RunCommandDocument, self).__init__(**kwargs) + self.script = kwargs.get('script', None) + self.parameters = kwargs.get('parameters', None) + + +class RunCommandInput(Model): + """Capture Virtual Machine parameters. + + All required parameters must be populated in order to send to Azure. + + :param command_id: Required. The run command id. + :type command_id: str + :param script: Optional. The script to be executed. When this value is + given, the given script will override the default script of the command. + :type script: list[str] + :param parameters: The run command parameters. + :type parameters: + list[~azure.mgmt.compute.v2017_12_01.models.RunCommandInputParameter] + """ + + _validation = { + 'command_id': {'required': True}, + } + + _attribute_map = { + 'command_id': {'key': 'commandId', 'type': 'str'}, + 'script': {'key': 'script', 'type': '[str]'}, + 'parameters': {'key': 'parameters', 'type': '[RunCommandInputParameter]'}, + } + + def __init__(self, **kwargs): + super(RunCommandInput, self).__init__(**kwargs) + self.command_id = kwargs.get('command_id', None) + self.script = kwargs.get('script', None) + self.parameters = kwargs.get('parameters', None) + + +class RunCommandInputParameter(Model): + """Describes the properties of a run command parameter. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. The run command parameter name. + :type name: str + :param value: Required. The run command parameter value. + :type value: str + """ + + _validation = { + 'name': {'required': True}, + 'value': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'value': {'key': 'value', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(RunCommandInputParameter, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.value = kwargs.get('value', None) + + +class RunCommandParameterDefinition(Model): + """Describes the properties of a run command parameter. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. The run command parameter name. + :type name: str + :param type: Required. The run command parameter type. + :type type: str + :param default_value: The run command parameter default value. + :type default_value: str + :param required: The run command parameter required. Default value: False + . + :type required: bool + """ + + _validation = { + 'name': {'required': True}, + 'type': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'default_value': {'key': 'defaultValue', 'type': 'str'}, + 'required': {'key': 'required', 'type': 'bool'}, + } + + def __init__(self, **kwargs): + super(RunCommandParameterDefinition, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.type = kwargs.get('type', None) + self.default_value = kwargs.get('default_value', None) + self.required = kwargs.get('required', False) + + +class RunCommandResult(OperationStatusResponse): + """Run command operation response. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar name: Operation ID + :vartype name: str + :ivar status: Operation status + :vartype status: str + :ivar start_time: Start time of the operation + :vartype start_time: datetime + :ivar end_time: End time of the operation + :vartype end_time: datetime + :ivar error: Api error + :vartype error: ~azure.mgmt.compute.v2017_12_01.models.ApiError + :param output: Operation output data (raw JSON) + :type output: object + """ + + _validation = { + 'name': {'readonly': True}, + 'status': {'readonly': True}, + 'start_time': {'readonly': True}, + 'end_time': {'readonly': True}, + 'error': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'status': {'key': 'status', 'type': 'str'}, + 'start_time': {'key': 'startTime', 'type': 'iso-8601'}, + 'end_time': {'key': 'endTime', 'type': 'iso-8601'}, + 'error': {'key': 'error', 'type': 'ApiError'}, + 'output': {'key': 'properties.output', 'type': 'object'}, + } + + def __init__(self, **kwargs): + super(RunCommandResult, self).__init__(**kwargs) + self.output = kwargs.get('output', None) + + +class Sku(Model): + """Describes a virtual machine scale set sku. + + :param name: The sku name. + :type name: str + :param tier: Specifies the tier of virtual machines in a scale set.

    Possible Values:

    **Standard**

    **Basic** + :type tier: str + :param capacity: Specifies the number of virtual machines in the scale + set. + :type capacity: long + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'tier': {'key': 'tier', 'type': 'str'}, + 'capacity': {'key': 'capacity', 'type': 'long'}, + } + + def __init__(self, **kwargs): + super(Sku, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.tier = kwargs.get('tier', None) + self.capacity = kwargs.get('capacity', None) + + +class SshConfiguration(Model): + """SSH configuration for Linux based VMs running on Azure. + + :param public_keys: The list of SSH public keys used to authenticate with + linux based VMs. + :type public_keys: + list[~azure.mgmt.compute.v2017_12_01.models.SshPublicKey] + """ + + _attribute_map = { + 'public_keys': {'key': 'publicKeys', 'type': '[SshPublicKey]'}, + } + + def __init__(self, **kwargs): + super(SshConfiguration, self).__init__(**kwargs) + self.public_keys = kwargs.get('public_keys', None) + + +class SshPublicKey(Model): + """Contains information about SSH certificate public key and the path on the + Linux VM where the public key is placed. + + :param path: Specifies the full path on the created VM where ssh public + key is stored. If the file already exists, the specified key is appended + to the file. Example: /home/user/.ssh/authorized_keys + :type path: str + :param key_data: SSH public key certificate used to authenticate with the + VM through ssh. The key needs to be at least 2048-bit and in ssh-rsa + format.

    For creating ssh keys, see [Create SSH keys on Linux and + Mac for Linux VMs in + Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-mac-create-ssh-keys?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json). + :type key_data: str + """ + + _attribute_map = { + 'path': {'key': 'path', 'type': 'str'}, + 'key_data': {'key': 'keyData', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(SshPublicKey, self).__init__(**kwargs) + self.path = kwargs.get('path', None) + self.key_data = kwargs.get('key_data', None) + + +class StorageProfile(Model): + """Specifies the storage settings for the virtual machine disks. + + :param image_reference: Specifies information about the image to use. You + can specify information about platform images, marketplace images, or + virtual machine images. This element is required when you want to use a + platform image, marketplace image, or virtual machine image, but is not + used in other creation operations. + :type image_reference: + ~azure.mgmt.compute.v2017_12_01.models.ImageReference + :param os_disk: Specifies information about the operating system disk used + by the virtual machine.

    For more information about disks, see + [About disks and VHDs for Azure virtual + machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-about-disks-vhds?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). + :type os_disk: ~azure.mgmt.compute.v2017_12_01.models.OSDisk + :param data_disks: Specifies the parameters that are used to add a data + disk to a virtual machine.

    For more information about disks, see + [About disks and VHDs for Azure virtual + machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-about-disks-vhds?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). + :type data_disks: list[~azure.mgmt.compute.v2017_12_01.models.DataDisk] + """ + + _attribute_map = { + 'image_reference': {'key': 'imageReference', 'type': 'ImageReference'}, + 'os_disk': {'key': 'osDisk', 'type': 'OSDisk'}, + 'data_disks': {'key': 'dataDisks', 'type': '[DataDisk]'}, + } + + def __init__(self, **kwargs): + super(StorageProfile, self).__init__(**kwargs) + self.image_reference = kwargs.get('image_reference', None) + self.os_disk = kwargs.get('os_disk', None) + self.data_disks = kwargs.get('data_disks', None) + + +class SubResourceReadOnly(Model): + """SubResourceReadOnly. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource Id + :vartype id: str + """ + + _validation = { + 'id': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(SubResourceReadOnly, self).__init__(**kwargs) + self.id = None + + +class ThrottledRequestsInput(LogAnalyticsInputBase): + """Api request input for LogAnalytics getThrottledRequests Api. + + All required parameters must be populated in order to send to Azure. + + :param blob_container_sas_uri: Required. SAS Uri of the logging blob + container to which LogAnalytics Api writes output logs to. + :type blob_container_sas_uri: str + :param from_time: Required. From time of the query + :type from_time: datetime + :param to_time: Required. To time of the query + :type to_time: datetime + :param group_by_throttle_policy: Group query result by Throttle Policy + applied. + :type group_by_throttle_policy: bool + :param group_by_operation_name: Group query result by Operation Name. + :type group_by_operation_name: bool + :param group_by_resource_name: Group query result by Resource Name. + :type group_by_resource_name: bool + """ + + _validation = { + 'blob_container_sas_uri': {'required': True}, + 'from_time': {'required': True}, + 'to_time': {'required': True}, + } + + _attribute_map = { + 'blob_container_sas_uri': {'key': 'blobContainerSasUri', 'type': 'str'}, + 'from_time': {'key': 'fromTime', 'type': 'iso-8601'}, + 'to_time': {'key': 'toTime', 'type': 'iso-8601'}, + 'group_by_throttle_policy': {'key': 'groupByThrottlePolicy', 'type': 'bool'}, + 'group_by_operation_name': {'key': 'groupByOperationName', 'type': 'bool'}, + 'group_by_resource_name': {'key': 'groupByResourceName', 'type': 'bool'}, + } + + def __init__(self, **kwargs): + super(ThrottledRequestsInput, self).__init__(**kwargs) + + +class UpgradeOperationHistoricalStatusInfo(Model): + """Virtual Machine Scale Set OS Upgrade History operation response. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar properties: Information about the properties of the upgrade + operation. + :vartype properties: + ~azure.mgmt.compute.v2017_12_01.models.UpgradeOperationHistoricalStatusInfoProperties + :ivar type: Resource type + :vartype type: str + :ivar location: Resource location + :vartype location: str + """ + + _validation = { + 'properties': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'readonly': True}, + } + + _attribute_map = { + 'properties': {'key': 'properties', 'type': 'UpgradeOperationHistoricalStatusInfoProperties'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(UpgradeOperationHistoricalStatusInfo, self).__init__(**kwargs) + self.properties = None + self.type = None + self.location = None + + +class UpgradeOperationHistoricalStatusInfoProperties(Model): + """Describes each OS upgrade on the Virtual Machine Scale Set. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar running_status: Information about the overall status of the upgrade + operation. + :vartype running_status: + ~azure.mgmt.compute.v2017_12_01.models.UpgradeOperationHistoryStatus + :ivar progress: Counts of the VMs in each state. + :vartype progress: + ~azure.mgmt.compute.v2017_12_01.models.RollingUpgradeProgressInfo + :ivar error: Error Details for this upgrade if there are any. + :vartype error: ~azure.mgmt.compute.v2017_12_01.models.ApiError + :ivar started_by: Invoker of the Upgrade Operation. Possible values + include: 'Unknown', 'User', 'Platform' + :vartype started_by: str or + ~azure.mgmt.compute.v2017_12_01.models.UpgradeOperationInvoker + :ivar target_image_reference: Image Reference details + :vartype target_image_reference: + ~azure.mgmt.compute.v2017_12_01.models.ImageReference + :ivar rollback_info: Information about OS rollback if performed + :vartype rollback_info: + ~azure.mgmt.compute.v2017_12_01.models.RollbackStatusInfo + """ + + _validation = { + 'running_status': {'readonly': True}, + 'progress': {'readonly': True}, + 'error': {'readonly': True}, + 'started_by': {'readonly': True}, + 'target_image_reference': {'readonly': True}, + 'rollback_info': {'readonly': True}, + } + + _attribute_map = { + 'running_status': {'key': 'runningStatus', 'type': 'UpgradeOperationHistoryStatus'}, + 'progress': {'key': 'progress', 'type': 'RollingUpgradeProgressInfo'}, + 'error': {'key': 'error', 'type': 'ApiError'}, + 'started_by': {'key': 'startedBy', 'type': 'UpgradeOperationInvoker'}, + 'target_image_reference': {'key': 'targetImageReference', 'type': 'ImageReference'}, + 'rollback_info': {'key': 'rollbackInfo', 'type': 'RollbackStatusInfo'}, + } + + def __init__(self, **kwargs): + super(UpgradeOperationHistoricalStatusInfoProperties, self).__init__(**kwargs) + self.running_status = None + self.progress = None + self.error = None + self.started_by = None + self.target_image_reference = None + self.rollback_info = None + + +class UpgradeOperationHistoryStatus(Model): + """Information about the current running state of the overall upgrade. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar code: Code indicating the current status of the upgrade. Possible + values include: 'RollingForward', 'Cancelled', 'Completed', 'Faulted' + :vartype code: str or ~azure.mgmt.compute.v2017_12_01.models.UpgradeState + :ivar start_time: Start time of the upgrade. + :vartype start_time: datetime + :ivar end_time: End time of the upgrade. + :vartype end_time: datetime + """ + + _validation = { + 'code': {'readonly': True}, + 'start_time': {'readonly': True}, + 'end_time': {'readonly': True}, + } + + _attribute_map = { + 'code': {'key': 'code', 'type': 'UpgradeState'}, + 'start_time': {'key': 'startTime', 'type': 'iso-8601'}, + 'end_time': {'key': 'endTime', 'type': 'iso-8601'}, + } + + def __init__(self, **kwargs): + super(UpgradeOperationHistoryStatus, self).__init__(**kwargs) + self.code = None + self.start_time = None + self.end_time = None + + +class UpgradePolicy(Model): + """Describes an upgrade policy - automatic, manual, or rolling. + + :param mode: Specifies the mode of an upgrade to virtual machines in the + scale set.

    Possible values are:

    **Manual** - You + control the application of updates to virtual machines in the scale set. + You do this by using the manualUpgrade action.

    **Automatic** - + All virtual machines in the scale set are automatically updated at the + same time. Possible values include: 'Automatic', 'Manual', 'Rolling' + :type mode: str or ~azure.mgmt.compute.v2017_12_01.models.UpgradeMode + :param rolling_upgrade_policy: The configuration parameters used while + performing a rolling upgrade. + :type rolling_upgrade_policy: + ~azure.mgmt.compute.v2017_12_01.models.RollingUpgradePolicy + :param automatic_os_upgrade: Whether OS upgrades should automatically be + applied to scale set instances in a rolling fashion when a newer version + of the image becomes available. + :type automatic_os_upgrade: bool + :param auto_os_upgrade_policy: Configuration parameters used for + performing automatic OS Upgrade. + :type auto_os_upgrade_policy: + ~azure.mgmt.compute.v2017_12_01.models.AutoOSUpgradePolicy + """ + + _attribute_map = { + 'mode': {'key': 'mode', 'type': 'UpgradeMode'}, + 'rolling_upgrade_policy': {'key': 'rollingUpgradePolicy', 'type': 'RollingUpgradePolicy'}, + 'automatic_os_upgrade': {'key': 'automaticOSUpgrade', 'type': 'bool'}, + 'auto_os_upgrade_policy': {'key': 'autoOSUpgradePolicy', 'type': 'AutoOSUpgradePolicy'}, + } + + def __init__(self, **kwargs): + super(UpgradePolicy, self).__init__(**kwargs) + self.mode = kwargs.get('mode', None) + self.rolling_upgrade_policy = kwargs.get('rolling_upgrade_policy', None) + self.automatic_os_upgrade = kwargs.get('automatic_os_upgrade', None) + self.auto_os_upgrade_policy = kwargs.get('auto_os_upgrade_policy', None) + + +class Usage(Model): + """Describes Compute Resource Usage. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar unit: Required. An enum describing the unit of usage measurement. + Default value: "Count" . + :vartype unit: str + :param current_value: Required. The current usage of the resource. + :type current_value: int + :param limit: Required. The maximum permitted usage of the resource. + :type limit: long + :param name: Required. The name of the type of usage. + :type name: ~azure.mgmt.compute.v2017_12_01.models.UsageName + """ + + _validation = { + 'unit': {'required': True, 'constant': True}, + 'current_value': {'required': True}, + 'limit': {'required': True}, + 'name': {'required': True}, + } + + _attribute_map = { + 'unit': {'key': 'unit', 'type': 'str'}, + 'current_value': {'key': 'currentValue', 'type': 'int'}, + 'limit': {'key': 'limit', 'type': 'long'}, + 'name': {'key': 'name', 'type': 'UsageName'}, + } + + unit = "Count" + + def __init__(self, **kwargs): + super(Usage, self).__init__(**kwargs) + self.current_value = kwargs.get('current_value', None) + self.limit = kwargs.get('limit', None) + self.name = kwargs.get('name', None) + + +class UsageName(Model): + """The Usage Names. + + :param value: The name of the resource. + :type value: str + :param localized_value: The localized name of the resource. + :type localized_value: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': 'str'}, + 'localized_value': {'key': 'localizedValue', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(UsageName, self).__init__(**kwargs) + self.value = kwargs.get('value', None) + self.localized_value = kwargs.get('localized_value', None) + + +class VaultCertificate(Model): + """Describes a single certificate reference in a Key Vault, and where the + certificate should reside on the VM. + + :param certificate_url: This is the URL of a certificate that has been + uploaded to Key Vault as a secret. For adding a secret to the Key Vault, + see [Add a key or secret to the key + vault](https://docs.microsoft.com/azure/key-vault/key-vault-get-started/#add). + In this case, your certificate needs to be It is the Base64 encoding of + the following JSON Object which is encoded in UTF-8:

    {
    + "data":"",
    "dataType":"pfx",
    + "password":""
    } + :type certificate_url: str + :param certificate_store: For Windows VMs, specifies the certificate store + on the Virtual Machine to which the certificate should be added. The + specified certificate store is implicitly in the LocalMachine account. +

    For Linux VMs, the certificate file is placed under the + /var/lib/waagent directory, with the file name + <UppercaseThumbprint>.crt for the X509 certificate file and + <UppercaseThumbprint>.prv for private key. Both of these files are + .pem formatted. + :type certificate_store: str + """ + + _attribute_map = { + 'certificate_url': {'key': 'certificateUrl', 'type': 'str'}, + 'certificate_store': {'key': 'certificateStore', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(VaultCertificate, self).__init__(**kwargs) + self.certificate_url = kwargs.get('certificate_url', None) + self.certificate_store = kwargs.get('certificate_store', None) + + +class VaultSecretGroup(Model): + """Describes a set of certificates which are all in the same Key Vault. + + :param source_vault: The relative URL of the Key Vault containing all of + the certificates in VaultCertificates. + :type source_vault: ~azure.mgmt.compute.v2017_12_01.models.SubResource + :param vault_certificates: The list of key vault references in SourceVault + which contain certificates. + :type vault_certificates: + list[~azure.mgmt.compute.v2017_12_01.models.VaultCertificate] + """ + + _attribute_map = { + 'source_vault': {'key': 'sourceVault', 'type': 'SubResource'}, + 'vault_certificates': {'key': 'vaultCertificates', 'type': '[VaultCertificate]'}, + } + + def __init__(self, **kwargs): + super(VaultSecretGroup, self).__init__(**kwargs) + self.source_vault = kwargs.get('source_vault', None) + self.vault_certificates = kwargs.get('vault_certificates', None) + + +class VirtualHardDisk(Model): + """Describes the uri of a disk. + + :param uri: Specifies the virtual hard disk's uri. + :type uri: str + """ + + _attribute_map = { + 'uri': {'key': 'uri', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(VirtualHardDisk, self).__init__(**kwargs) + self.uri = kwargs.get('uri', None) + + +class VirtualMachine(Resource): + """Describes a Virtual Machine. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource Id + :vartype id: str + :ivar name: Resource name + :vartype name: str + :ivar type: Resource type + :vartype type: str + :param location: Required. Resource location + :type location: str + :param tags: Resource tags + :type tags: dict[str, str] + :param plan: Specifies information about the marketplace image used to + create the virtual machine. This element is only used for marketplace + images. Before you can use a marketplace image from an API, you must + enable the image for programmatic use. In the Azure portal, find the + marketplace image that you want to use and then click **Want to deploy + programmatically, Get Started ->**. Enter any required information and + then click **Save**. + :type plan: ~azure.mgmt.compute.v2017_12_01.models.Plan + :param hardware_profile: Specifies the hardware settings for the virtual + machine. + :type hardware_profile: + ~azure.mgmt.compute.v2017_12_01.models.HardwareProfile + :param storage_profile: Specifies the storage settings for the virtual + machine disks. + :type storage_profile: + ~azure.mgmt.compute.v2017_12_01.models.StorageProfile + :param os_profile: Specifies the operating system settings for the virtual + machine. + :type os_profile: ~azure.mgmt.compute.v2017_12_01.models.OSProfile + :param network_profile: Specifies the network interfaces of the virtual + machine. + :type network_profile: + ~azure.mgmt.compute.v2017_12_01.models.NetworkProfile + :param diagnostics_profile: Specifies the boot diagnostic settings state. +

    Minimum api-version: 2015-06-15. + :type diagnostics_profile: + ~azure.mgmt.compute.v2017_12_01.models.DiagnosticsProfile + :param availability_set: Specifies information about the availability set + that the virtual machine should be assigned to. Virtual machines specified + in the same availability set are allocated to different nodes to maximize + availability. For more information about availability sets, see [Manage + the availability of virtual + machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-manage-availability?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). +

    For more information on Azure planned maintenance, see [Planned + maintenance for virtual machines in + Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-planned-maintenance?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json) +

    Currently, a VM can only be added to availability set at creation + time. An existing VM cannot be added to an availability set. + :type availability_set: ~azure.mgmt.compute.v2017_12_01.models.SubResource + :ivar provisioning_state: The provisioning state, which only appears in + the response. + :vartype provisioning_state: str + :ivar instance_view: The virtual machine instance view. + :vartype instance_view: + ~azure.mgmt.compute.v2017_12_01.models.VirtualMachineInstanceView + :param license_type: Specifies that the image or disk that is being used + was licensed on-premises. This element is only used for images that + contain the Windows Server operating system.

    Possible values are: +

    Windows_Client

    Windows_Server

    If this element + is included in a request for an update, the value must match the initial + value. This value cannot be updated.

    For more information, see + [Azure Hybrid Use Benefit for Windows + Server](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-hybrid-use-benefit-licensing?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json) +

    Minimum api-version: 2015-06-15 + :type license_type: str + :ivar vm_id: Specifies the VM unique ID which is a 128-bits identifier + that is encoded and stored in all Azure IaaS VMs SMBIOS and can be read + using platform BIOS commands. + :vartype vm_id: str + :ivar resources: The virtual machine child extension resources. + :vartype resources: + list[~azure.mgmt.compute.v2017_12_01.models.VirtualMachineExtension] + :param identity: The identity of the virtual machine, if configured. + :type identity: + ~azure.mgmt.compute.v2017_12_01.models.VirtualMachineIdentity + :param zones: The virtual machine zones. + :type zones: list[str] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + 'provisioning_state': {'readonly': True}, + 'instance_view': {'readonly': True}, + 'vm_id': {'readonly': True}, + 'resources': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'plan': {'key': 'plan', 'type': 'Plan'}, + 'hardware_profile': {'key': 'properties.hardwareProfile', 'type': 'HardwareProfile'}, + 'storage_profile': {'key': 'properties.storageProfile', 'type': 'StorageProfile'}, + 'os_profile': {'key': 'properties.osProfile', 'type': 'OSProfile'}, + 'network_profile': {'key': 'properties.networkProfile', 'type': 'NetworkProfile'}, + 'diagnostics_profile': {'key': 'properties.diagnosticsProfile', 'type': 'DiagnosticsProfile'}, + 'availability_set': {'key': 'properties.availabilitySet', 'type': 'SubResource'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'instance_view': {'key': 'properties.instanceView', 'type': 'VirtualMachineInstanceView'}, + 'license_type': {'key': 'properties.licenseType', 'type': 'str'}, + 'vm_id': {'key': 'properties.vmId', 'type': 'str'}, + 'resources': {'key': 'resources', 'type': '[VirtualMachineExtension]'}, + 'identity': {'key': 'identity', 'type': 'VirtualMachineIdentity'}, + 'zones': {'key': 'zones', 'type': '[str]'}, + } + + def __init__(self, **kwargs): + super(VirtualMachine, self).__init__(**kwargs) + self.plan = kwargs.get('plan', None) + self.hardware_profile = kwargs.get('hardware_profile', None) + self.storage_profile = kwargs.get('storage_profile', None) + self.os_profile = kwargs.get('os_profile', None) + self.network_profile = kwargs.get('network_profile', None) + self.diagnostics_profile = kwargs.get('diagnostics_profile', None) + self.availability_set = kwargs.get('availability_set', None) + self.provisioning_state = None + self.instance_view = None + self.license_type = kwargs.get('license_type', None) + self.vm_id = None + self.resources = None + self.identity = kwargs.get('identity', None) + self.zones = kwargs.get('zones', None) + + +class VirtualMachineAgentInstanceView(Model): + """The instance view of the VM Agent running on the virtual machine. + + :param vm_agent_version: The VM Agent full version. + :type vm_agent_version: str + :param extension_handlers: The virtual machine extension handler instance + view. + :type extension_handlers: + list[~azure.mgmt.compute.v2017_12_01.models.VirtualMachineExtensionHandlerInstanceView] + :param statuses: The resource status information. + :type statuses: + list[~azure.mgmt.compute.v2017_12_01.models.InstanceViewStatus] + """ + + _attribute_map = { + 'vm_agent_version': {'key': 'vmAgentVersion', 'type': 'str'}, + 'extension_handlers': {'key': 'extensionHandlers', 'type': '[VirtualMachineExtensionHandlerInstanceView]'}, + 'statuses': {'key': 'statuses', 'type': '[InstanceViewStatus]'}, + } + + def __init__(self, **kwargs): + super(VirtualMachineAgentInstanceView, self).__init__(**kwargs) + self.vm_agent_version = kwargs.get('vm_agent_version', None) + self.extension_handlers = kwargs.get('extension_handlers', None) + self.statuses = kwargs.get('statuses', None) + + +class VirtualMachineCaptureParameters(Model): + """Capture Virtual Machine parameters. + + All required parameters must be populated in order to send to Azure. + + :param vhd_prefix: Required. The captured virtual hard disk's name prefix. + :type vhd_prefix: str + :param destination_container_name: Required. The destination container + name. + :type destination_container_name: str + :param overwrite_vhds: Required. Specifies whether to overwrite the + destination virtual hard disk, in case of conflict. + :type overwrite_vhds: bool + """ + + _validation = { + 'vhd_prefix': {'required': True}, + 'destination_container_name': {'required': True}, + 'overwrite_vhds': {'required': True}, + } + + _attribute_map = { + 'vhd_prefix': {'key': 'vhdPrefix', 'type': 'str'}, + 'destination_container_name': {'key': 'destinationContainerName', 'type': 'str'}, + 'overwrite_vhds': {'key': 'overwriteVhds', 'type': 'bool'}, + } + + def __init__(self, **kwargs): + super(VirtualMachineCaptureParameters, self).__init__(**kwargs) + self.vhd_prefix = kwargs.get('vhd_prefix', None) + self.destination_container_name = kwargs.get('destination_container_name', None) + self.overwrite_vhds = kwargs.get('overwrite_vhds', None) + + +class VirtualMachineCaptureResult(SubResource): + """Resource Id. + + :param id: Resource Id + :type id: str + :param output: Operation output data (raw JSON) + :type output: object + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'output': {'key': 'properties.output', 'type': 'object'}, + } + + def __init__(self, **kwargs): + super(VirtualMachineCaptureResult, self).__init__(**kwargs) + self.output = kwargs.get('output', None) + + +class VirtualMachineExtension(Resource): + """Describes a Virtual Machine Extension. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource Id + :vartype id: str + :ivar name: Resource name + :vartype name: str + :ivar type: Resource type + :vartype type: str + :param location: Required. Resource location + :type location: str + :param tags: Resource tags + :type tags: dict[str, str] + :param force_update_tag: How the extension handler should be forced to + update even if the extension configuration has not changed. + :type force_update_tag: str + :param publisher: The name of the extension handler publisher. + :type publisher: str + :param virtual_machine_extension_type: Specifies the type of the + extension; an example is "CustomScriptExtension". + :type virtual_machine_extension_type: str + :param type_handler_version: Specifies the version of the script handler. + :type type_handler_version: str + :param auto_upgrade_minor_version: Indicates whether the extension should + use a newer minor version if one is available at deployment time. Once + deployed, however, the extension will not upgrade minor versions unless + redeployed, even with this property set to true. + :type auto_upgrade_minor_version: bool + :param settings: Json formatted public settings for the extension. + :type settings: object + :param protected_settings: The extension can contain either + protectedSettings or protectedSettingsFromKeyVault or no protected + settings at all. + :type protected_settings: object + :ivar provisioning_state: The provisioning state, which only appears in + the response. + :vartype provisioning_state: str + :param instance_view: The virtual machine extension instance view. + :type instance_view: + ~azure.mgmt.compute.v2017_12_01.models.VirtualMachineExtensionInstanceView + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'force_update_tag': {'key': 'properties.forceUpdateTag', 'type': 'str'}, + 'publisher': {'key': 'properties.publisher', 'type': 'str'}, + 'virtual_machine_extension_type': {'key': 'properties.type', 'type': 'str'}, + 'type_handler_version': {'key': 'properties.typeHandlerVersion', 'type': 'str'}, + 'auto_upgrade_minor_version': {'key': 'properties.autoUpgradeMinorVersion', 'type': 'bool'}, + 'settings': {'key': 'properties.settings', 'type': 'object'}, + 'protected_settings': {'key': 'properties.protectedSettings', 'type': 'object'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'instance_view': {'key': 'properties.instanceView', 'type': 'VirtualMachineExtensionInstanceView'}, + } + + def __init__(self, **kwargs): + super(VirtualMachineExtension, self).__init__(**kwargs) + self.force_update_tag = kwargs.get('force_update_tag', None) + self.publisher = kwargs.get('publisher', None) + self.virtual_machine_extension_type = kwargs.get('virtual_machine_extension_type', None) + self.type_handler_version = kwargs.get('type_handler_version', None) + self.auto_upgrade_minor_version = kwargs.get('auto_upgrade_minor_version', None) + self.settings = kwargs.get('settings', None) + self.protected_settings = kwargs.get('protected_settings', None) + self.provisioning_state = None + self.instance_view = kwargs.get('instance_view', None) + + +class VirtualMachineExtensionHandlerInstanceView(Model): + """The instance view of a virtual machine extension handler. + + :param type: Specifies the type of the extension; an example is + "CustomScriptExtension". + :type type: str + :param type_handler_version: Specifies the version of the script handler. + :type type_handler_version: str + :param status: The extension handler status. + :type status: ~azure.mgmt.compute.v2017_12_01.models.InstanceViewStatus + """ + + _attribute_map = { + 'type': {'key': 'type', 'type': 'str'}, + 'type_handler_version': {'key': 'typeHandlerVersion', 'type': 'str'}, + 'status': {'key': 'status', 'type': 'InstanceViewStatus'}, + } + + def __init__(self, **kwargs): + super(VirtualMachineExtensionHandlerInstanceView, self).__init__(**kwargs) + self.type = kwargs.get('type', None) + self.type_handler_version = kwargs.get('type_handler_version', None) + self.status = kwargs.get('status', None) + + +class VirtualMachineExtensionImage(Resource): + """Describes a Virtual Machine Extension Image. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource Id + :vartype id: str + :ivar name: Resource name + :vartype name: str + :ivar type: Resource type + :vartype type: str + :param location: Required. Resource location + :type location: str + :param tags: Resource tags + :type tags: dict[str, str] + :param operating_system: Required. The operating system this extension + supports. + :type operating_system: str + :param compute_role: Required. The type of role (IaaS or PaaS) this + extension supports. + :type compute_role: str + :param handler_schema: Required. The schema defined by publisher, where + extension consumers should provide settings in a matching schema. + :type handler_schema: str + :param vm_scale_set_enabled: Whether the extension can be used on xRP + VMScaleSets. By default existing extensions are usable on scalesets, but + there might be cases where a publisher wants to explicitly indicate the + extension is only enabled for CRP VMs but not VMSS. + :type vm_scale_set_enabled: bool + :param supports_multiple_extensions: Whether the handler can support + multiple extensions. + :type supports_multiple_extensions: bool + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + 'operating_system': {'required': True}, + 'compute_role': {'required': True}, + 'handler_schema': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'operating_system': {'key': 'properties.operatingSystem', 'type': 'str'}, + 'compute_role': {'key': 'properties.computeRole', 'type': 'str'}, + 'handler_schema': {'key': 'properties.handlerSchema', 'type': 'str'}, + 'vm_scale_set_enabled': {'key': 'properties.vmScaleSetEnabled', 'type': 'bool'}, + 'supports_multiple_extensions': {'key': 'properties.supportsMultipleExtensions', 'type': 'bool'}, + } + + def __init__(self, **kwargs): + super(VirtualMachineExtensionImage, self).__init__(**kwargs) + self.operating_system = kwargs.get('operating_system', None) + self.compute_role = kwargs.get('compute_role', None) + self.handler_schema = kwargs.get('handler_schema', None) + self.vm_scale_set_enabled = kwargs.get('vm_scale_set_enabled', None) + self.supports_multiple_extensions = kwargs.get('supports_multiple_extensions', None) + + +class VirtualMachineExtensionInstanceView(Model): + """The instance view of a virtual machine extension. + + :param name: The virtual machine extension name. + :type name: str + :param type: Specifies the type of the extension; an example is + "CustomScriptExtension". + :type type: str + :param type_handler_version: Specifies the version of the script handler. + :type type_handler_version: str + :param substatuses: The resource status information. + :type substatuses: + list[~azure.mgmt.compute.v2017_12_01.models.InstanceViewStatus] + :param statuses: The resource status information. + :type statuses: + list[~azure.mgmt.compute.v2017_12_01.models.InstanceViewStatus] + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'type_handler_version': {'key': 'typeHandlerVersion', 'type': 'str'}, + 'substatuses': {'key': 'substatuses', 'type': '[InstanceViewStatus]'}, + 'statuses': {'key': 'statuses', 'type': '[InstanceViewStatus]'}, + } + + def __init__(self, **kwargs): + super(VirtualMachineExtensionInstanceView, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.type = kwargs.get('type', None) + self.type_handler_version = kwargs.get('type_handler_version', None) + self.substatuses = kwargs.get('substatuses', None) + self.statuses = kwargs.get('statuses', None) + + +class VirtualMachineExtensionsListResult(Model): + """The List Extension operation response. + + :param value: The list of extensions + :type value: + list[~azure.mgmt.compute.v2017_12_01.models.VirtualMachineExtension] + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[VirtualMachineExtension]'}, + } + + def __init__(self, **kwargs): + super(VirtualMachineExtensionsListResult, self).__init__(**kwargs) + self.value = kwargs.get('value', None) + + +class VirtualMachineExtensionUpdate(UpdateResource): + """Describes a Virtual Machine Extension. + + :param tags: Resource tags + :type tags: dict[str, str] + :param force_update_tag: How the extension handler should be forced to + update even if the extension configuration has not changed. + :type force_update_tag: str + :param publisher: The name of the extension handler publisher. + :type publisher: str + :param type: Specifies the type of the extension; an example is + "CustomScriptExtension". + :type type: str + :param type_handler_version: Specifies the version of the script handler. + :type type_handler_version: str + :param auto_upgrade_minor_version: Indicates whether the extension should + use a newer minor version if one is available at deployment time. Once + deployed, however, the extension will not upgrade minor versions unless + redeployed, even with this property set to true. + :type auto_upgrade_minor_version: bool + :param settings: Json formatted public settings for the extension. + :type settings: object + :param protected_settings: The extension can contain either + protectedSettings or protectedSettingsFromKeyVault or no protected + settings at all. + :type protected_settings: object + """ + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + 'force_update_tag': {'key': 'properties.forceUpdateTag', 'type': 'str'}, + 'publisher': {'key': 'properties.publisher', 'type': 'str'}, + 'type': {'key': 'properties.type', 'type': 'str'}, + 'type_handler_version': {'key': 'properties.typeHandlerVersion', 'type': 'str'}, + 'auto_upgrade_minor_version': {'key': 'properties.autoUpgradeMinorVersion', 'type': 'bool'}, + 'settings': {'key': 'properties.settings', 'type': 'object'}, + 'protected_settings': {'key': 'properties.protectedSettings', 'type': 'object'}, + } + + def __init__(self, **kwargs): + super(VirtualMachineExtensionUpdate, self).__init__(**kwargs) + self.force_update_tag = kwargs.get('force_update_tag', None) + self.publisher = kwargs.get('publisher', None) + self.type = kwargs.get('type', None) + self.type_handler_version = kwargs.get('type_handler_version', None) + self.auto_upgrade_minor_version = kwargs.get('auto_upgrade_minor_version', None) + self.settings = kwargs.get('settings', None) + self.protected_settings = kwargs.get('protected_settings', None) + + +class VirtualMachineHealthStatus(Model): + """The health status of the VM. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar status: The health status information for the VM. + :vartype status: ~azure.mgmt.compute.v2017_12_01.models.InstanceViewStatus + """ + + _validation = { + 'status': {'readonly': True}, + } + + _attribute_map = { + 'status': {'key': 'status', 'type': 'InstanceViewStatus'}, + } + + def __init__(self, **kwargs): + super(VirtualMachineHealthStatus, self).__init__(**kwargs) + self.status = None + + +class VirtualMachineIdentity(Model): + """Identity for the virtual machine. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar principal_id: The principal id of virtual machine identity. This + property will only be provided for a system assigned identity. + :vartype principal_id: str + :ivar tenant_id: The tenant id associated with the virtual machine. This + property will only be provided for a system assigned identity. + :vartype tenant_id: str + :param type: The type of identity used for the virtual machine. The type + 'SystemAssigned, UserAssigned' includes both an implicitly created + identity and a set of user assigned identities. The type 'None' will + remove any identities from the virtual machine. Possible values include: + 'SystemAssigned', 'UserAssigned', 'SystemAssigned, UserAssigned', 'None' + :type type: str or + ~azure.mgmt.compute.v2017_12_01.models.ResourceIdentityType + :param identity_ids: The list of user identities associated with the + Virtual Machine. The user identity references will be ARM resource ids in + the form: + '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/identities/{identityName}'. + :type identity_ids: list[str] + """ + + _validation = { + 'principal_id': {'readonly': True}, + 'tenant_id': {'readonly': True}, + } + + _attribute_map = { + 'principal_id': {'key': 'principalId', 'type': 'str'}, + 'tenant_id': {'key': 'tenantId', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'ResourceIdentityType'}, + 'identity_ids': {'key': 'identityIds', 'type': '[str]'}, + } + + def __init__(self, **kwargs): + super(VirtualMachineIdentity, self).__init__(**kwargs) + self.principal_id = None + self.tenant_id = None + self.type = kwargs.get('type', None) + self.identity_ids = kwargs.get('identity_ids', None) + + +class VirtualMachineImageResource(SubResource): + """Virtual machine image resource information. + + All required parameters must be populated in order to send to Azure. + + :param id: Resource Id + :type id: str + :param name: Required. The name of the resource. + :type name: str + :param location: Required. The supported Azure location of the resource. + :type location: str + :param tags: Specifies the tags that are assigned to the virtual machine. + For more information about using tags, see [Using tags to organize your + Azure + resources](https://docs.microsoft.com/azure/azure-resource-manager/resource-group-using-tags.md). + :type tags: dict[str, str] + """ + + _validation = { + 'name': {'required': True}, + 'location': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__(self, **kwargs): + super(VirtualMachineImageResource, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.location = kwargs.get('location', None) + self.tags = kwargs.get('tags', None) + + +class VirtualMachineImage(VirtualMachineImageResource): + """Describes a Virtual Machine Image. + + All required parameters must be populated in order to send to Azure. + + :param id: Resource Id + :type id: str + :param name: Required. The name of the resource. + :type name: str + :param location: Required. The supported Azure location of the resource. + :type location: str + :param tags: Specifies the tags that are assigned to the virtual machine. + For more information about using tags, see [Using tags to organize your + Azure + resources](https://docs.microsoft.com/azure/azure-resource-manager/resource-group-using-tags.md). + :type tags: dict[str, str] + :param plan: + :type plan: ~azure.mgmt.compute.v2017_12_01.models.PurchasePlan + :param os_disk_image: + :type os_disk_image: ~azure.mgmt.compute.v2017_12_01.models.OSDiskImage + :param data_disk_images: + :type data_disk_images: + list[~azure.mgmt.compute.v2017_12_01.models.DataDiskImage] + """ + + _validation = { + 'name': {'required': True}, + 'location': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'plan': {'key': 'properties.plan', 'type': 'PurchasePlan'}, + 'os_disk_image': {'key': 'properties.osDiskImage', 'type': 'OSDiskImage'}, + 'data_disk_images': {'key': 'properties.dataDiskImages', 'type': '[DataDiskImage]'}, + } + + def __init__(self, **kwargs): + super(VirtualMachineImage, self).__init__(**kwargs) + self.plan = kwargs.get('plan', None) + self.os_disk_image = kwargs.get('os_disk_image', None) + self.data_disk_images = kwargs.get('data_disk_images', None) + + +class VirtualMachineInstanceView(Model): + """The instance view of a virtual machine. + + :param platform_update_domain: Specifies the update domain of the virtual + machine. + :type platform_update_domain: int + :param platform_fault_domain: Specifies the fault domain of the virtual + machine. + :type platform_fault_domain: int + :param computer_name: The computer name assigned to the virtual machine. + :type computer_name: str + :param os_name: The Operating System running on the virtual machine. + :type os_name: str + :param os_version: The version of Operating System running on the virtual + machine. + :type os_version: str + :param rdp_thumb_print: The Remote desktop certificate thumbprint. + :type rdp_thumb_print: str + :param vm_agent: The VM Agent running on the virtual machine. + :type vm_agent: + ~azure.mgmt.compute.v2017_12_01.models.VirtualMachineAgentInstanceView + :param maintenance_redeploy_status: The Maintenance Operation status on + the virtual machine. + :type maintenance_redeploy_status: + ~azure.mgmt.compute.v2017_12_01.models.MaintenanceRedeployStatus + :param disks: The virtual machine disk information. + :type disks: list[~azure.mgmt.compute.v2017_12_01.models.DiskInstanceView] + :param extensions: The extensions information. + :type extensions: + list[~azure.mgmt.compute.v2017_12_01.models.VirtualMachineExtensionInstanceView] + :param boot_diagnostics: Boot Diagnostics is a debugging feature which + allows you to view Console Output and Screenshot to diagnose VM status. +

    You can easily view the output of your console log.

    + Azure also enables you to see a screenshot of the VM from the hypervisor. + :type boot_diagnostics: + ~azure.mgmt.compute.v2017_12_01.models.BootDiagnosticsInstanceView + :param statuses: The resource status information. + :type statuses: + list[~azure.mgmt.compute.v2017_12_01.models.InstanceViewStatus] + """ + + _attribute_map = { + 'platform_update_domain': {'key': 'platformUpdateDomain', 'type': 'int'}, + 'platform_fault_domain': {'key': 'platformFaultDomain', 'type': 'int'}, + 'computer_name': {'key': 'computerName', 'type': 'str'}, + 'os_name': {'key': 'osName', 'type': 'str'}, + 'os_version': {'key': 'osVersion', 'type': 'str'}, + 'rdp_thumb_print': {'key': 'rdpThumbPrint', 'type': 'str'}, + 'vm_agent': {'key': 'vmAgent', 'type': 'VirtualMachineAgentInstanceView'}, + 'maintenance_redeploy_status': {'key': 'maintenanceRedeployStatus', 'type': 'MaintenanceRedeployStatus'}, + 'disks': {'key': 'disks', 'type': '[DiskInstanceView]'}, + 'extensions': {'key': 'extensions', 'type': '[VirtualMachineExtensionInstanceView]'}, + 'boot_diagnostics': {'key': 'bootDiagnostics', 'type': 'BootDiagnosticsInstanceView'}, + 'statuses': {'key': 'statuses', 'type': '[InstanceViewStatus]'}, + } + + def __init__(self, **kwargs): + super(VirtualMachineInstanceView, self).__init__(**kwargs) + self.platform_update_domain = kwargs.get('platform_update_domain', None) + self.platform_fault_domain = kwargs.get('platform_fault_domain', None) + self.computer_name = kwargs.get('computer_name', None) + self.os_name = kwargs.get('os_name', None) + self.os_version = kwargs.get('os_version', None) + self.rdp_thumb_print = kwargs.get('rdp_thumb_print', None) + self.vm_agent = kwargs.get('vm_agent', None) + self.maintenance_redeploy_status = kwargs.get('maintenance_redeploy_status', None) + self.disks = kwargs.get('disks', None) + self.extensions = kwargs.get('extensions', None) + self.boot_diagnostics = kwargs.get('boot_diagnostics', None) + self.statuses = kwargs.get('statuses', None) + + +class VirtualMachineScaleSet(Resource): + """Describes a Virtual Machine Scale Set. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource Id + :vartype id: str + :ivar name: Resource name + :vartype name: str + :ivar type: Resource type + :vartype type: str + :param location: Required. Resource location + :type location: str + :param tags: Resource tags + :type tags: dict[str, str] + :param sku: The virtual machine scale set sku. + :type sku: ~azure.mgmt.compute.v2017_12_01.models.Sku + :param plan: Specifies information about the marketplace image used to + create the virtual machine. This element is only used for marketplace + images. Before you can use a marketplace image from an API, you must + enable the image for programmatic use. In the Azure portal, find the + marketplace image that you want to use and then click **Want to deploy + programmatically, Get Started ->**. Enter any required information and + then click **Save**. + :type plan: ~azure.mgmt.compute.v2017_12_01.models.Plan + :param upgrade_policy: The upgrade policy. + :type upgrade_policy: ~azure.mgmt.compute.v2017_12_01.models.UpgradePolicy + :param virtual_machine_profile: The virtual machine profile. + :type virtual_machine_profile: + ~azure.mgmt.compute.v2017_12_01.models.VirtualMachineScaleSetVMProfile + :ivar provisioning_state: The provisioning state, which only appears in + the response. + :vartype provisioning_state: str + :param overprovision: Specifies whether the Virtual Machine Scale Set + should be overprovisioned. + :type overprovision: bool + :ivar unique_id: Specifies the ID which uniquely identifies a Virtual + Machine Scale Set. + :vartype unique_id: str + :param single_placement_group: When true this limits the scale set to a + single placement group, of max size 100 virtual machines. + :type single_placement_group: bool + :param zone_balance: Whether to force strictly even Virtual Machine + distribution cross x-zones in case there is zone outage. + :type zone_balance: bool + :param platform_fault_domain_count: Fault Domain count for each placement + group. + :type platform_fault_domain_count: int + :param identity: The identity of the virtual machine scale set, if + configured. + :type identity: + ~azure.mgmt.compute.v2017_12_01.models.VirtualMachineScaleSetIdentity + :param zones: The virtual machine scale set zones. + :type zones: list[str] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + 'provisioning_state': {'readonly': True}, + 'unique_id': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'sku': {'key': 'sku', 'type': 'Sku'}, + 'plan': {'key': 'plan', 'type': 'Plan'}, + 'upgrade_policy': {'key': 'properties.upgradePolicy', 'type': 'UpgradePolicy'}, + 'virtual_machine_profile': {'key': 'properties.virtualMachineProfile', 'type': 'VirtualMachineScaleSetVMProfile'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'overprovision': {'key': 'properties.overprovision', 'type': 'bool'}, + 'unique_id': {'key': 'properties.uniqueId', 'type': 'str'}, + 'single_placement_group': {'key': 'properties.singlePlacementGroup', 'type': 'bool'}, + 'zone_balance': {'key': 'properties.zoneBalance', 'type': 'bool'}, + 'platform_fault_domain_count': {'key': 'properties.platformFaultDomainCount', 'type': 'int'}, + 'identity': {'key': 'identity', 'type': 'VirtualMachineScaleSetIdentity'}, + 'zones': {'key': 'zones', 'type': '[str]'}, + } + + def __init__(self, **kwargs): + super(VirtualMachineScaleSet, self).__init__(**kwargs) + self.sku = kwargs.get('sku', None) + self.plan = kwargs.get('plan', None) + self.upgrade_policy = kwargs.get('upgrade_policy', None) + self.virtual_machine_profile = kwargs.get('virtual_machine_profile', None) + self.provisioning_state = None + self.overprovision = kwargs.get('overprovision', None) + self.unique_id = None + self.single_placement_group = kwargs.get('single_placement_group', None) + self.zone_balance = kwargs.get('zone_balance', None) + self.platform_fault_domain_count = kwargs.get('platform_fault_domain_count', None) + self.identity = kwargs.get('identity', None) + self.zones = kwargs.get('zones', None) + + +class VirtualMachineScaleSetDataDisk(Model): + """Describes a virtual machine scale set data disk. + + All required parameters must be populated in order to send to Azure. + + :param name: The disk name. + :type name: str + :param lun: Required. Specifies the logical unit number of the data disk. + This value is used to identify data disks within the VM and therefore must + be unique for each data disk attached to a VM. + :type lun: int + :param caching: Specifies the caching requirements.

    Possible + values are:

    **None**

    **ReadOnly**

    **ReadWrite** +

    Default: **None for Standard storage. ReadOnly for Premium + storage**. Possible values include: 'None', 'ReadOnly', 'ReadWrite' + :type caching: str or ~azure.mgmt.compute.v2017_12_01.models.CachingTypes + :param write_accelerator_enabled: Specifies whether writeAccelerator + should be enabled or disabled on the disk. + :type write_accelerator_enabled: bool + :param create_option: Required. The create option. Possible values + include: 'FromImage', 'Empty', 'Attach' + :type create_option: str or + ~azure.mgmt.compute.v2017_12_01.models.DiskCreateOptionTypes + :param disk_size_gb: Specifies the size of an empty data disk in + gigabytes. This element can be used to overwrite the size of the disk in a + virtual machine image.

    This value cannot be larger than 1023 GB + :type disk_size_gb: int + :param managed_disk: The managed disk parameters. + :type managed_disk: + ~azure.mgmt.compute.v2017_12_01.models.VirtualMachineScaleSetManagedDiskParameters + """ + + _validation = { + 'lun': {'required': True}, + 'create_option': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'lun': {'key': 'lun', 'type': 'int'}, + 'caching': {'key': 'caching', 'type': 'CachingTypes'}, + 'write_accelerator_enabled': {'key': 'writeAcceleratorEnabled', 'type': 'bool'}, + 'create_option': {'key': 'createOption', 'type': 'str'}, + 'disk_size_gb': {'key': 'diskSizeGB', 'type': 'int'}, + 'managed_disk': {'key': 'managedDisk', 'type': 'VirtualMachineScaleSetManagedDiskParameters'}, + } + + def __init__(self, **kwargs): + super(VirtualMachineScaleSetDataDisk, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.lun = kwargs.get('lun', None) + self.caching = kwargs.get('caching', None) + self.write_accelerator_enabled = kwargs.get('write_accelerator_enabled', None) + self.create_option = kwargs.get('create_option', None) + self.disk_size_gb = kwargs.get('disk_size_gb', None) + self.managed_disk = kwargs.get('managed_disk', None) + + +class VirtualMachineScaleSetExtension(SubResourceReadOnly): + """Describes a Virtual Machine Scale Set Extension. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource Id + :vartype id: str + :param name: The name of the extension. + :type name: str + :param force_update_tag: If a value is provided and is different from the + previous value, the extension handler will be forced to update even if the + extension configuration has not changed. + :type force_update_tag: str + :param publisher: The name of the extension handler publisher. + :type publisher: str + :param type: Specifies the type of the extension; an example is + "CustomScriptExtension". + :type type: str + :param type_handler_version: Specifies the version of the script handler. + :type type_handler_version: str + :param auto_upgrade_minor_version: Indicates whether the extension should + use a newer minor version if one is available at deployment time. Once + deployed, however, the extension will not upgrade minor versions unless + redeployed, even with this property set to true. + :type auto_upgrade_minor_version: bool + :param settings: Json formatted public settings for the extension. + :type settings: object + :param protected_settings: The extension can contain either + protectedSettings or protectedSettingsFromKeyVault or no protected + settings at all. + :type protected_settings: object + :ivar provisioning_state: The provisioning state, which only appears in + the response. + :vartype provisioning_state: str + """ + + _validation = { + 'id': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'force_update_tag': {'key': 'properties.forceUpdateTag', 'type': 'str'}, + 'publisher': {'key': 'properties.publisher', 'type': 'str'}, + 'type': {'key': 'properties.type', 'type': 'str'}, + 'type_handler_version': {'key': 'properties.typeHandlerVersion', 'type': 'str'}, + 'auto_upgrade_minor_version': {'key': 'properties.autoUpgradeMinorVersion', 'type': 'bool'}, + 'settings': {'key': 'properties.settings', 'type': 'object'}, + 'protected_settings': {'key': 'properties.protectedSettings', 'type': 'object'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(VirtualMachineScaleSetExtension, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.force_update_tag = kwargs.get('force_update_tag', None) + self.publisher = kwargs.get('publisher', None) + self.type = kwargs.get('type', None) + self.type_handler_version = kwargs.get('type_handler_version', None) + self.auto_upgrade_minor_version = kwargs.get('auto_upgrade_minor_version', None) + self.settings = kwargs.get('settings', None) + self.protected_settings = kwargs.get('protected_settings', None) + self.provisioning_state = None + + +class VirtualMachineScaleSetExtensionProfile(Model): + """Describes a virtual machine scale set extension profile. + + :param extensions: The virtual machine scale set child extension + resources. + :type extensions: + list[~azure.mgmt.compute.v2017_12_01.models.VirtualMachineScaleSetExtension] + """ + + _attribute_map = { + 'extensions': {'key': 'extensions', 'type': '[VirtualMachineScaleSetExtension]'}, + } + + def __init__(self, **kwargs): + super(VirtualMachineScaleSetExtensionProfile, self).__init__(**kwargs) + self.extensions = kwargs.get('extensions', None) + + +class VirtualMachineScaleSetIdentity(Model): + """Identity for the virtual machine scale set. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar principal_id: The principal id of virtual machine scale set + identity. This property will only be provided for a system assigned + identity. + :vartype principal_id: str + :ivar tenant_id: The tenant id associated with the virtual machine scale + set. This property will only be provided for a system assigned identity. + :vartype tenant_id: str + :param type: The type of identity used for the virtual machine scale set. + The type 'SystemAssigned, UserAssigned' includes both an implicitly + created identity and a set of user assigned identities. The type 'None' + will remove any identities from the virtual machine scale set. Possible + values include: 'SystemAssigned', 'UserAssigned', 'SystemAssigned, + UserAssigned', 'None' + :type type: str or + ~azure.mgmt.compute.v2017_12_01.models.ResourceIdentityType + :param identity_ids: The list of user identities associated with the + virtual machine scale set. The user identity references will be ARM + resource ids in the form: + '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/identities/{identityName}'. + :type identity_ids: list[str] + """ + + _validation = { + 'principal_id': {'readonly': True}, + 'tenant_id': {'readonly': True}, + } + + _attribute_map = { + 'principal_id': {'key': 'principalId', 'type': 'str'}, + 'tenant_id': {'key': 'tenantId', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'ResourceIdentityType'}, + 'identity_ids': {'key': 'identityIds', 'type': '[str]'}, + } + + def __init__(self, **kwargs): + super(VirtualMachineScaleSetIdentity, self).__init__(**kwargs) + self.principal_id = None + self.tenant_id = None + self.type = kwargs.get('type', None) + self.identity_ids = kwargs.get('identity_ids', None) + + +class VirtualMachineScaleSetInstanceView(Model): + """The instance view of a virtual machine scale set. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar virtual_machine: The instance view status summary for the virtual + machine scale set. + :vartype virtual_machine: + ~azure.mgmt.compute.v2017_12_01.models.VirtualMachineScaleSetInstanceViewStatusesSummary + :ivar extensions: The extensions information. + :vartype extensions: + list[~azure.mgmt.compute.v2017_12_01.models.VirtualMachineScaleSetVMExtensionsSummary] + :param statuses: The resource status information. + :type statuses: + list[~azure.mgmt.compute.v2017_12_01.models.InstanceViewStatus] + """ + + _validation = { + 'virtual_machine': {'readonly': True}, + 'extensions': {'readonly': True}, + } + + _attribute_map = { + 'virtual_machine': {'key': 'virtualMachine', 'type': 'VirtualMachineScaleSetInstanceViewStatusesSummary'}, + 'extensions': {'key': 'extensions', 'type': '[VirtualMachineScaleSetVMExtensionsSummary]'}, + 'statuses': {'key': 'statuses', 'type': '[InstanceViewStatus]'}, + } + + def __init__(self, **kwargs): + super(VirtualMachineScaleSetInstanceView, self).__init__(**kwargs) + self.virtual_machine = None + self.extensions = None + self.statuses = kwargs.get('statuses', None) + + +class VirtualMachineScaleSetInstanceViewStatusesSummary(Model): + """Instance view statuses summary for virtual machines of a virtual machine + scale set. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar statuses_summary: The extensions information. + :vartype statuses_summary: + list[~azure.mgmt.compute.v2017_12_01.models.VirtualMachineStatusCodeCount] + """ + + _validation = { + 'statuses_summary': {'readonly': True}, + } + + _attribute_map = { + 'statuses_summary': {'key': 'statusesSummary', 'type': '[VirtualMachineStatusCodeCount]'}, + } + + def __init__(self, **kwargs): + super(VirtualMachineScaleSetInstanceViewStatusesSummary, self).__init__(**kwargs) + self.statuses_summary = None + + +class VirtualMachineScaleSetIPConfiguration(SubResource): + """Describes a virtual machine scale set network profile's IP configuration. + + All required parameters must be populated in order to send to Azure. + + :param id: Resource Id + :type id: str + :param name: Required. The IP configuration name. + :type name: str + :param subnet: Specifies the identifier of the subnet. + :type subnet: ~azure.mgmt.compute.v2017_12_01.models.ApiEntityReference + :param primary: Specifies the primary network interface in case the + virtual machine has more than 1 network interface. + :type primary: bool + :param public_ip_address_configuration: The publicIPAddressConfiguration. + :type public_ip_address_configuration: + ~azure.mgmt.compute.v2017_12_01.models.VirtualMachineScaleSetPublicIPAddressConfiguration + :param private_ip_address_version: Available from Api-Version 2017-03-30 + onwards, it represents whether the specific ipconfiguration is IPv4 or + IPv6. Default is taken as IPv4. Possible values are: 'IPv4' and 'IPv6'. + Possible values include: 'IPv4', 'IPv6' + :type private_ip_address_version: str or + ~azure.mgmt.compute.v2017_12_01.models.IPVersion + :param application_gateway_backend_address_pools: Specifies an array of + references to backend address pools of application gateways. A scale set + can reference backend address pools of multiple application gateways. + Multiple scale sets cannot use the same application gateway. + :type application_gateway_backend_address_pools: + list[~azure.mgmt.compute.v2017_12_01.models.SubResource] + :param load_balancer_backend_address_pools: Specifies an array of + references to backend address pools of load balancers. A scale set can + reference backend address pools of one public and one internal load + balancer. Multiple scale sets cannot use the same load balancer. + :type load_balancer_backend_address_pools: + list[~azure.mgmt.compute.v2017_12_01.models.SubResource] + :param load_balancer_inbound_nat_pools: Specifies an array of references + to inbound Nat pools of the load balancers. A scale set can reference + inbound nat pools of one public and one internal load balancer. Multiple + scale sets cannot use the same load balancer + :type load_balancer_inbound_nat_pools: + list[~azure.mgmt.compute.v2017_12_01.models.SubResource] + """ + + _validation = { + 'name': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'subnet': {'key': 'properties.subnet', 'type': 'ApiEntityReference'}, + 'primary': {'key': 'properties.primary', 'type': 'bool'}, + 'public_ip_address_configuration': {'key': 'properties.publicIPAddressConfiguration', 'type': 'VirtualMachineScaleSetPublicIPAddressConfiguration'}, + 'private_ip_address_version': {'key': 'properties.privateIPAddressVersion', 'type': 'str'}, + 'application_gateway_backend_address_pools': {'key': 'properties.applicationGatewayBackendAddressPools', 'type': '[SubResource]'}, + 'load_balancer_backend_address_pools': {'key': 'properties.loadBalancerBackendAddressPools', 'type': '[SubResource]'}, + 'load_balancer_inbound_nat_pools': {'key': 'properties.loadBalancerInboundNatPools', 'type': '[SubResource]'}, + } + + def __init__(self, **kwargs): + super(VirtualMachineScaleSetIPConfiguration, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.subnet = kwargs.get('subnet', None) + self.primary = kwargs.get('primary', None) + self.public_ip_address_configuration = kwargs.get('public_ip_address_configuration', None) + self.private_ip_address_version = kwargs.get('private_ip_address_version', None) + self.application_gateway_backend_address_pools = kwargs.get('application_gateway_backend_address_pools', None) + self.load_balancer_backend_address_pools = kwargs.get('load_balancer_backend_address_pools', None) + self.load_balancer_inbound_nat_pools = kwargs.get('load_balancer_inbound_nat_pools', None) + + +class VirtualMachineScaleSetManagedDiskParameters(Model): + """Describes the parameters of a ScaleSet managed disk. + + :param storage_account_type: Specifies the storage account type for the + managed disk. Possible values are: Standard_LRS or Premium_LRS. Possible + values include: 'Standard_LRS', 'Premium_LRS' + :type storage_account_type: str or + ~azure.mgmt.compute.v2017_12_01.models.StorageAccountTypes + """ + + _attribute_map = { + 'storage_account_type': {'key': 'storageAccountType', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(VirtualMachineScaleSetManagedDiskParameters, self).__init__(**kwargs) + self.storage_account_type = kwargs.get('storage_account_type', None) + + +class VirtualMachineScaleSetNetworkConfiguration(SubResource): + """Describes a virtual machine scale set network profile's network + configurations. + + All required parameters must be populated in order to send to Azure. + + :param id: Resource Id + :type id: str + :param name: Required. The network configuration name. + :type name: str + :param primary: Specifies the primary network interface in case the + virtual machine has more than 1 network interface. + :type primary: bool + :param enable_accelerated_networking: Specifies whether the network + interface is accelerated networking-enabled. + :type enable_accelerated_networking: bool + :param network_security_group: The network security group. + :type network_security_group: + ~azure.mgmt.compute.v2017_12_01.models.SubResource + :param dns_settings: The dns settings to be applied on the network + interfaces. + :type dns_settings: + ~azure.mgmt.compute.v2017_12_01.models.VirtualMachineScaleSetNetworkConfigurationDnsSettings + :param ip_configurations: Required. Specifies the IP configurations of the + network interface. + :type ip_configurations: + list[~azure.mgmt.compute.v2017_12_01.models.VirtualMachineScaleSetIPConfiguration] + :param enable_ip_forwarding: Whether IP forwarding enabled on this NIC. + :type enable_ip_forwarding: bool + """ + + _validation = { + 'name': {'required': True}, + 'ip_configurations': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'primary': {'key': 'properties.primary', 'type': 'bool'}, + 'enable_accelerated_networking': {'key': 'properties.enableAcceleratedNetworking', 'type': 'bool'}, + 'network_security_group': {'key': 'properties.networkSecurityGroup', 'type': 'SubResource'}, + 'dns_settings': {'key': 'properties.dnsSettings', 'type': 'VirtualMachineScaleSetNetworkConfigurationDnsSettings'}, + 'ip_configurations': {'key': 'properties.ipConfigurations', 'type': '[VirtualMachineScaleSetIPConfiguration]'}, + 'enable_ip_forwarding': {'key': 'properties.enableIPForwarding', 'type': 'bool'}, + } + + def __init__(self, **kwargs): + super(VirtualMachineScaleSetNetworkConfiguration, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.primary = kwargs.get('primary', None) + self.enable_accelerated_networking = kwargs.get('enable_accelerated_networking', None) + self.network_security_group = kwargs.get('network_security_group', None) + self.dns_settings = kwargs.get('dns_settings', None) + self.ip_configurations = kwargs.get('ip_configurations', None) + self.enable_ip_forwarding = kwargs.get('enable_ip_forwarding', None) + + +class VirtualMachineScaleSetNetworkConfigurationDnsSettings(Model): + """Describes a virtual machines scale sets network configuration's DNS + settings. + + :param dns_servers: List of DNS servers IP addresses + :type dns_servers: list[str] + """ + + _attribute_map = { + 'dns_servers': {'key': 'dnsServers', 'type': '[str]'}, + } + + def __init__(self, **kwargs): + super(VirtualMachineScaleSetNetworkConfigurationDnsSettings, self).__init__(**kwargs) + self.dns_servers = kwargs.get('dns_servers', None) + + +class VirtualMachineScaleSetNetworkProfile(Model): + """Describes a virtual machine scale set network profile. + + :param health_probe: A reference to a load balancer probe used to + determine the health of an instance in the virtual machine scale set. The + reference will be in the form: + '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/probes/{probeName}'. + :type health_probe: + ~azure.mgmt.compute.v2017_12_01.models.ApiEntityReference + :param network_interface_configurations: The list of network + configurations. + :type network_interface_configurations: + list[~azure.mgmt.compute.v2017_12_01.models.VirtualMachineScaleSetNetworkConfiguration] + """ + + _attribute_map = { + 'health_probe': {'key': 'healthProbe', 'type': 'ApiEntityReference'}, + 'network_interface_configurations': {'key': 'networkInterfaceConfigurations', 'type': '[VirtualMachineScaleSetNetworkConfiguration]'}, + } + + def __init__(self, **kwargs): + super(VirtualMachineScaleSetNetworkProfile, self).__init__(**kwargs) + self.health_probe = kwargs.get('health_probe', None) + self.network_interface_configurations = kwargs.get('network_interface_configurations', None) + + +class VirtualMachineScaleSetOSDisk(Model): + """Describes a virtual machine scale set operating system disk. + + All required parameters must be populated in order to send to Azure. + + :param name: The disk name. + :type name: str + :param caching: Specifies the caching requirements.

    Possible + values are:

    **None**

    **ReadOnly**

    **ReadWrite** +

    Default: **None for Standard storage. ReadOnly for Premium + storage**. Possible values include: 'None', 'ReadOnly', 'ReadWrite' + :type caching: str or ~azure.mgmt.compute.v2017_12_01.models.CachingTypes + :param write_accelerator_enabled: Specifies whether writeAccelerator + should be enabled or disabled on the disk. + :type write_accelerator_enabled: bool + :param create_option: Required. Specifies how the virtual machines in the + scale set should be created.

    The only allowed value is: + **FromImage** \\u2013 This value is used when you are using an image to + create the virtual machine. If you are using a platform image, you also + use the imageReference element described above. If you are using a + marketplace image, you also use the plan element previously described. + Possible values include: 'FromImage', 'Empty', 'Attach' + :type create_option: str or + ~azure.mgmt.compute.v2017_12_01.models.DiskCreateOptionTypes + :param os_type: This property allows you to specify the type of the OS + that is included in the disk if creating a VM from user-image or a + specialized VHD.

    Possible values are:

    **Windows** +

    **Linux**. Possible values include: 'Windows', 'Linux' + :type os_type: str or + ~azure.mgmt.compute.v2017_12_01.models.OperatingSystemTypes + :param image: Specifies information about the unmanaged user image to base + the scale set on. + :type image: ~azure.mgmt.compute.v2017_12_01.models.VirtualHardDisk + :param vhd_containers: Specifies the container urls that are used to store + operating system disks for the scale set. + :type vhd_containers: list[str] + :param managed_disk: The managed disk parameters. + :type managed_disk: + ~azure.mgmt.compute.v2017_12_01.models.VirtualMachineScaleSetManagedDiskParameters + """ + + _validation = { + 'create_option': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'caching': {'key': 'caching', 'type': 'CachingTypes'}, + 'write_accelerator_enabled': {'key': 'writeAcceleratorEnabled', 'type': 'bool'}, + 'create_option': {'key': 'createOption', 'type': 'str'}, + 'os_type': {'key': 'osType', 'type': 'OperatingSystemTypes'}, + 'image': {'key': 'image', 'type': 'VirtualHardDisk'}, + 'vhd_containers': {'key': 'vhdContainers', 'type': '[str]'}, + 'managed_disk': {'key': 'managedDisk', 'type': 'VirtualMachineScaleSetManagedDiskParameters'}, + } + + def __init__(self, **kwargs): + super(VirtualMachineScaleSetOSDisk, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.caching = kwargs.get('caching', None) + self.write_accelerator_enabled = kwargs.get('write_accelerator_enabled', None) + self.create_option = kwargs.get('create_option', None) + self.os_type = kwargs.get('os_type', None) + self.image = kwargs.get('image', None) + self.vhd_containers = kwargs.get('vhd_containers', None) + self.managed_disk = kwargs.get('managed_disk', None) + + +class VirtualMachineScaleSetOSProfile(Model): + """Describes a virtual machine scale set OS profile. + + :param computer_name_prefix: Specifies the computer name prefix for all of + the virtual machines in the scale set. Computer name prefixes must be 1 to + 15 characters long. + :type computer_name_prefix: str + :param admin_username: Specifies the name of the administrator account. +

    **Windows-only restriction:** Cannot end in "."

    + **Disallowed values:** "administrator", "admin", "user", "user1", "test", + "user2", "test1", "user3", "admin1", "1", "123", "a", "actuser", "adm", + "admin2", "aspnet", "backup", "console", "david", "guest", "john", + "owner", "root", "server", "sql", "support", "support_388945a0", "sys", + "test2", "test3", "user4", "user5".

    **Minimum-length (Linux):** 1 + character

    **Max-length (Linux):** 64 characters

    + **Max-length (Windows):** 20 characters

  • For root access to + the Linux VM, see [Using root privileges on Linux virtual machines in + Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-use-root-privileges?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json)
  • + For a list of built-in system users on Linux that should not be used in + this field, see [Selecting User Names for Linux on + Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-usernames?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json) + :type admin_username: str + :param admin_password: Specifies the password of the administrator + account.

    **Minimum-length (Windows):** 8 characters

    + **Minimum-length (Linux):** 6 characters

    **Max-length + (Windows):** 123 characters

    **Max-length (Linux):** 72 characters +

    **Complexity requirements:** 3 out of 4 conditions below need to + be fulfilled
    Has lower characters
    Has upper characters
    Has a + digit
    Has a special character (Regex match [\\W_])

    + **Disallowed values:** "abc@123", "P@$$w0rd", "P@ssw0rd", "P@ssword123", + "Pa$$word", "pass@word1", "Password!", "Password1", "Password22", + "iloveyou!"

    For resetting the password, see [How to reset the + Remote Desktop service or its login password in a Windows + VM](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-reset-rdp?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json) +

    For resetting root password, see [Manage users, SSH, and check or + repair disks on Azure Linux VMs using the VMAccess + Extension](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-using-vmaccess-extension?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json#reset-root-password) + :type admin_password: str + :param custom_data: Specifies a base-64 encoded string of custom data. The + base-64 encoded string is decoded to a binary array that is saved as a + file on the Virtual Machine. The maximum length of the binary array is + 65535 bytes.

    For using cloud-init for your VM, see [Using + cloud-init to customize a Linux VM during + creation](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-using-cloud-init?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json) + :type custom_data: str + :param windows_configuration: Specifies Windows operating system settings + on the virtual machine. + :type windows_configuration: + ~azure.mgmt.compute.v2017_12_01.models.WindowsConfiguration + :param linux_configuration: Specifies the Linux operating system settings + on the virtual machine.

    For a list of supported Linux + distributions, see [Linux on Azure-Endorsed + Distributions](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-endorsed-distros?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json) +

    For running non-endorsed distributions, see [Information for + Non-Endorsed + Distributions](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-create-upload-generic?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json). + :type linux_configuration: + ~azure.mgmt.compute.v2017_12_01.models.LinuxConfiguration + :param secrets: Specifies set of certificates that should be installed + onto the virtual machines in the scale set. + :type secrets: + list[~azure.mgmt.compute.v2017_12_01.models.VaultSecretGroup] + """ + + _attribute_map = { + 'computer_name_prefix': {'key': 'computerNamePrefix', 'type': 'str'}, + 'admin_username': {'key': 'adminUsername', 'type': 'str'}, + 'admin_password': {'key': 'adminPassword', 'type': 'str'}, + 'custom_data': {'key': 'customData', 'type': 'str'}, + 'windows_configuration': {'key': 'windowsConfiguration', 'type': 'WindowsConfiguration'}, + 'linux_configuration': {'key': 'linuxConfiguration', 'type': 'LinuxConfiguration'}, + 'secrets': {'key': 'secrets', 'type': '[VaultSecretGroup]'}, + } + + def __init__(self, **kwargs): + super(VirtualMachineScaleSetOSProfile, self).__init__(**kwargs) + self.computer_name_prefix = kwargs.get('computer_name_prefix', None) + self.admin_username = kwargs.get('admin_username', None) + self.admin_password = kwargs.get('admin_password', None) + self.custom_data = kwargs.get('custom_data', None) + self.windows_configuration = kwargs.get('windows_configuration', None) + self.linux_configuration = kwargs.get('linux_configuration', None) + self.secrets = kwargs.get('secrets', None) + + +class VirtualMachineScaleSetPublicIPAddressConfiguration(Model): + """Describes a virtual machines scale set IP Configuration's PublicIPAddress + configuration. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. The publicIP address configuration name. + :type name: str + :param idle_timeout_in_minutes: The idle timeout of the public IP address. + :type idle_timeout_in_minutes: int + :param dns_settings: The dns settings to be applied on the publicIP + addresses . + :type dns_settings: + ~azure.mgmt.compute.v2017_12_01.models.VirtualMachineScaleSetPublicIPAddressConfigurationDnsSettings + """ + + _validation = { + 'name': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'idle_timeout_in_minutes': {'key': 'properties.idleTimeoutInMinutes', 'type': 'int'}, + 'dns_settings': {'key': 'properties.dnsSettings', 'type': 'VirtualMachineScaleSetPublicIPAddressConfigurationDnsSettings'}, + } + + def __init__(self, **kwargs): + super(VirtualMachineScaleSetPublicIPAddressConfiguration, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.idle_timeout_in_minutes = kwargs.get('idle_timeout_in_minutes', None) + self.dns_settings = kwargs.get('dns_settings', None) + + +class VirtualMachineScaleSetPublicIPAddressConfigurationDnsSettings(Model): + """Describes a virtual machines scale sets network configuration's DNS + settings. + + All required parameters must be populated in order to send to Azure. + + :param domain_name_label: Required. The Domain name label.The + concatenation of the domain name label and vm index will be the domain + name labels of the PublicIPAddress resources that will be created + :type domain_name_label: str + """ + + _validation = { + 'domain_name_label': {'required': True}, + } + + _attribute_map = { + 'domain_name_label': {'key': 'domainNameLabel', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(VirtualMachineScaleSetPublicIPAddressConfigurationDnsSettings, self).__init__(**kwargs) + self.domain_name_label = kwargs.get('domain_name_label', None) + + +class VirtualMachineScaleSetSku(Model): + """Describes an available virtual machine scale set sku. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar resource_type: The type of resource the sku applies to. + :vartype resource_type: str + :ivar sku: The Sku. + :vartype sku: ~azure.mgmt.compute.v2017_12_01.models.Sku + :ivar capacity: Specifies the number of virtual machines in the scale set. + :vartype capacity: + ~azure.mgmt.compute.v2017_12_01.models.VirtualMachineScaleSetSkuCapacity + """ + + _validation = { + 'resource_type': {'readonly': True}, + 'sku': {'readonly': True}, + 'capacity': {'readonly': True}, + } + + _attribute_map = { + 'resource_type': {'key': 'resourceType', 'type': 'str'}, + 'sku': {'key': 'sku', 'type': 'Sku'}, + 'capacity': {'key': 'capacity', 'type': 'VirtualMachineScaleSetSkuCapacity'}, + } + + def __init__(self, **kwargs): + super(VirtualMachineScaleSetSku, self).__init__(**kwargs) + self.resource_type = None + self.sku = None + self.capacity = None + + +class VirtualMachineScaleSetSkuCapacity(Model): + """Describes scaling information of a sku. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar minimum: The minimum capacity. + :vartype minimum: long + :ivar maximum: The maximum capacity that can be set. + :vartype maximum: long + :ivar default_capacity: The default capacity. + :vartype default_capacity: long + :ivar scale_type: The scale type applicable to the sku. Possible values + include: 'Automatic', 'None' + :vartype scale_type: str or + ~azure.mgmt.compute.v2017_12_01.models.VirtualMachineScaleSetSkuScaleType + """ + + _validation = { + 'minimum': {'readonly': True}, + 'maximum': {'readonly': True}, + 'default_capacity': {'readonly': True}, + 'scale_type': {'readonly': True}, + } + + _attribute_map = { + 'minimum': {'key': 'minimum', 'type': 'long'}, + 'maximum': {'key': 'maximum', 'type': 'long'}, + 'default_capacity': {'key': 'defaultCapacity', 'type': 'long'}, + 'scale_type': {'key': 'scaleType', 'type': 'VirtualMachineScaleSetSkuScaleType'}, + } + + def __init__(self, **kwargs): + super(VirtualMachineScaleSetSkuCapacity, self).__init__(**kwargs) + self.minimum = None + self.maximum = None + self.default_capacity = None + self.scale_type = None + + +class VirtualMachineScaleSetStorageProfile(Model): + """Describes a virtual machine scale set storage profile. + + :param image_reference: Specifies information about the image to use. You + can specify information about platform images, marketplace images, or + virtual machine images. This element is required when you want to use a + platform image, marketplace image, or virtual machine image, but is not + used in other creation operations. + :type image_reference: + ~azure.mgmt.compute.v2017_12_01.models.ImageReference + :param os_disk: Specifies information about the operating system disk used + by the virtual machines in the scale set.

    For more information + about disks, see [About disks and VHDs for Azure virtual + machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-about-disks-vhds?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). + :type os_disk: + ~azure.mgmt.compute.v2017_12_01.models.VirtualMachineScaleSetOSDisk + :param data_disks: Specifies the parameters that are used to add data + disks to the virtual machines in the scale set.

    For more + information about disks, see [About disks and VHDs for Azure virtual + machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-about-disks-vhds?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). + :type data_disks: + list[~azure.mgmt.compute.v2017_12_01.models.VirtualMachineScaleSetDataDisk] + """ + + _attribute_map = { + 'image_reference': {'key': 'imageReference', 'type': 'ImageReference'}, + 'os_disk': {'key': 'osDisk', 'type': 'VirtualMachineScaleSetOSDisk'}, + 'data_disks': {'key': 'dataDisks', 'type': '[VirtualMachineScaleSetDataDisk]'}, + } + + def __init__(self, **kwargs): + super(VirtualMachineScaleSetStorageProfile, self).__init__(**kwargs) + self.image_reference = kwargs.get('image_reference', None) + self.os_disk = kwargs.get('os_disk', None) + self.data_disks = kwargs.get('data_disks', None) + + +class VirtualMachineScaleSetUpdate(UpdateResource): + """Describes a Virtual Machine Scale Set. + + :param tags: Resource tags + :type tags: dict[str, str] + :param sku: The virtual machine scale set sku. + :type sku: ~azure.mgmt.compute.v2017_12_01.models.Sku + :param plan: The purchase plan when deploying a virtual machine scale set + from VM Marketplace images. + :type plan: ~azure.mgmt.compute.v2017_12_01.models.Plan + :param upgrade_policy: The upgrade policy. + :type upgrade_policy: ~azure.mgmt.compute.v2017_12_01.models.UpgradePolicy + :param virtual_machine_profile: The virtual machine profile. + :type virtual_machine_profile: + ~azure.mgmt.compute.v2017_12_01.models.VirtualMachineScaleSetUpdateVMProfile + :param overprovision: Specifies whether the Virtual Machine Scale Set + should be overprovisioned. + :type overprovision: bool + :param single_placement_group: When true this limits the scale set to a + single placement group, of max size 100 virtual machines. + :type single_placement_group: bool + :param identity: The identity of the virtual machine scale set, if + configured. + :type identity: + ~azure.mgmt.compute.v2017_12_01.models.VirtualMachineScaleSetIdentity + """ + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + 'sku': {'key': 'sku', 'type': 'Sku'}, + 'plan': {'key': 'plan', 'type': 'Plan'}, + 'upgrade_policy': {'key': 'properties.upgradePolicy', 'type': 'UpgradePolicy'}, + 'virtual_machine_profile': {'key': 'properties.virtualMachineProfile', 'type': 'VirtualMachineScaleSetUpdateVMProfile'}, + 'overprovision': {'key': 'properties.overprovision', 'type': 'bool'}, + 'single_placement_group': {'key': 'properties.singlePlacementGroup', 'type': 'bool'}, + 'identity': {'key': 'identity', 'type': 'VirtualMachineScaleSetIdentity'}, + } + + def __init__(self, **kwargs): + super(VirtualMachineScaleSetUpdate, self).__init__(**kwargs) + self.sku = kwargs.get('sku', None) + self.plan = kwargs.get('plan', None) + self.upgrade_policy = kwargs.get('upgrade_policy', None) + self.virtual_machine_profile = kwargs.get('virtual_machine_profile', None) + self.overprovision = kwargs.get('overprovision', None) + self.single_placement_group = kwargs.get('single_placement_group', None) + self.identity = kwargs.get('identity', None) + + +class VirtualMachineScaleSetUpdateIPConfiguration(SubResource): + """Describes a virtual machine scale set network profile's IP configuration. + + :param id: Resource Id + :type id: str + :param name: The IP configuration name. + :type name: str + :param subnet: The subnet. + :type subnet: ~azure.mgmt.compute.v2017_12_01.models.ApiEntityReference + :param primary: Specifies the primary IP Configuration in case the network + interface has more than one IP Configuration. + :type primary: bool + :param public_ip_address_configuration: The publicIPAddressConfiguration. + :type public_ip_address_configuration: + ~azure.mgmt.compute.v2017_12_01.models.VirtualMachineScaleSetUpdatePublicIPAddressConfiguration + :param private_ip_address_version: Available from Api-Version 2017-03-30 + onwards, it represents whether the specific ipconfiguration is IPv4 or + IPv6. Default is taken as IPv4. Possible values are: 'IPv4' and 'IPv6'. + Possible values include: 'IPv4', 'IPv6' + :type private_ip_address_version: str or + ~azure.mgmt.compute.v2017_12_01.models.IPVersion + :param application_gateway_backend_address_pools: The application gateway + backend address pools. + :type application_gateway_backend_address_pools: + list[~azure.mgmt.compute.v2017_12_01.models.SubResource] + :param load_balancer_backend_address_pools: The load balancer backend + address pools. + :type load_balancer_backend_address_pools: + list[~azure.mgmt.compute.v2017_12_01.models.SubResource] + :param load_balancer_inbound_nat_pools: The load balancer inbound nat + pools. + :type load_balancer_inbound_nat_pools: + list[~azure.mgmt.compute.v2017_12_01.models.SubResource] + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'subnet': {'key': 'properties.subnet', 'type': 'ApiEntityReference'}, + 'primary': {'key': 'properties.primary', 'type': 'bool'}, + 'public_ip_address_configuration': {'key': 'properties.publicIPAddressConfiguration', 'type': 'VirtualMachineScaleSetUpdatePublicIPAddressConfiguration'}, + 'private_ip_address_version': {'key': 'properties.privateIPAddressVersion', 'type': 'str'}, + 'application_gateway_backend_address_pools': {'key': 'properties.applicationGatewayBackendAddressPools', 'type': '[SubResource]'}, + 'load_balancer_backend_address_pools': {'key': 'properties.loadBalancerBackendAddressPools', 'type': '[SubResource]'}, + 'load_balancer_inbound_nat_pools': {'key': 'properties.loadBalancerInboundNatPools', 'type': '[SubResource]'}, + } + + def __init__(self, **kwargs): + super(VirtualMachineScaleSetUpdateIPConfiguration, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.subnet = kwargs.get('subnet', None) + self.primary = kwargs.get('primary', None) + self.public_ip_address_configuration = kwargs.get('public_ip_address_configuration', None) + self.private_ip_address_version = kwargs.get('private_ip_address_version', None) + self.application_gateway_backend_address_pools = kwargs.get('application_gateway_backend_address_pools', None) + self.load_balancer_backend_address_pools = kwargs.get('load_balancer_backend_address_pools', None) + self.load_balancer_inbound_nat_pools = kwargs.get('load_balancer_inbound_nat_pools', None) + + +class VirtualMachineScaleSetUpdateNetworkConfiguration(SubResource): + """Describes a virtual machine scale set network profile's network + configurations. + + :param id: Resource Id + :type id: str + :param name: The network configuration name. + :type name: str + :param primary: Whether this is a primary NIC on a virtual machine. + :type primary: bool + :param enable_accelerated_networking: Specifies whether the network + interface is accelerated networking-enabled. + :type enable_accelerated_networking: bool + :param network_security_group: The network security group. + :type network_security_group: + ~azure.mgmt.compute.v2017_12_01.models.SubResource + :param dns_settings: The dns settings to be applied on the network + interfaces. + :type dns_settings: + ~azure.mgmt.compute.v2017_12_01.models.VirtualMachineScaleSetNetworkConfigurationDnsSettings + :param ip_configurations: The virtual machine scale set IP Configuration. + :type ip_configurations: + list[~azure.mgmt.compute.v2017_12_01.models.VirtualMachineScaleSetUpdateIPConfiguration] + :param enable_ip_forwarding: Whether IP forwarding enabled on this NIC. + :type enable_ip_forwarding: bool + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'primary': {'key': 'properties.primary', 'type': 'bool'}, + 'enable_accelerated_networking': {'key': 'properties.enableAcceleratedNetworking', 'type': 'bool'}, + 'network_security_group': {'key': 'properties.networkSecurityGroup', 'type': 'SubResource'}, + 'dns_settings': {'key': 'properties.dnsSettings', 'type': 'VirtualMachineScaleSetNetworkConfigurationDnsSettings'}, + 'ip_configurations': {'key': 'properties.ipConfigurations', 'type': '[VirtualMachineScaleSetUpdateIPConfiguration]'}, + 'enable_ip_forwarding': {'key': 'properties.enableIPForwarding', 'type': 'bool'}, + } + + def __init__(self, **kwargs): + super(VirtualMachineScaleSetUpdateNetworkConfiguration, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.primary = kwargs.get('primary', None) + self.enable_accelerated_networking = kwargs.get('enable_accelerated_networking', None) + self.network_security_group = kwargs.get('network_security_group', None) + self.dns_settings = kwargs.get('dns_settings', None) + self.ip_configurations = kwargs.get('ip_configurations', None) + self.enable_ip_forwarding = kwargs.get('enable_ip_forwarding', None) + + +class VirtualMachineScaleSetUpdateNetworkProfile(Model): + """Describes a virtual machine scale set network profile. + + :param network_interface_configurations: The list of network + configurations. + :type network_interface_configurations: + list[~azure.mgmt.compute.v2017_12_01.models.VirtualMachineScaleSetUpdateNetworkConfiguration] + """ + + _attribute_map = { + 'network_interface_configurations': {'key': 'networkInterfaceConfigurations', 'type': '[VirtualMachineScaleSetUpdateNetworkConfiguration]'}, + } + + def __init__(self, **kwargs): + super(VirtualMachineScaleSetUpdateNetworkProfile, self).__init__(**kwargs) + self.network_interface_configurations = kwargs.get('network_interface_configurations', None) + + +class VirtualMachineScaleSetUpdateOSDisk(Model): + """Describes virtual machine scale set operating system disk Update Object. + This should be used for Updating VMSS OS Disk. + + :param caching: The caching type. Possible values include: 'None', + 'ReadOnly', 'ReadWrite' + :type caching: str or ~azure.mgmt.compute.v2017_12_01.models.CachingTypes + :param write_accelerator_enabled: Specifies whether writeAccelerator + should be enabled or disabled on the disk. + :type write_accelerator_enabled: bool + :param image: The Source User Image VirtualHardDisk. This VirtualHardDisk + will be copied before using it to attach to the Virtual Machine. If + SourceImage is provided, the destination VirtualHardDisk should not exist. + :type image: ~azure.mgmt.compute.v2017_12_01.models.VirtualHardDisk + :param vhd_containers: The list of virtual hard disk container uris. + :type vhd_containers: list[str] + :param managed_disk: The managed disk parameters. + :type managed_disk: + ~azure.mgmt.compute.v2017_12_01.models.VirtualMachineScaleSetManagedDiskParameters + """ + + _attribute_map = { + 'caching': {'key': 'caching', 'type': 'CachingTypes'}, + 'write_accelerator_enabled': {'key': 'writeAcceleratorEnabled', 'type': 'bool'}, + 'image': {'key': 'image', 'type': 'VirtualHardDisk'}, + 'vhd_containers': {'key': 'vhdContainers', 'type': '[str]'}, + 'managed_disk': {'key': 'managedDisk', 'type': 'VirtualMachineScaleSetManagedDiskParameters'}, + } + + def __init__(self, **kwargs): + super(VirtualMachineScaleSetUpdateOSDisk, self).__init__(**kwargs) + self.caching = kwargs.get('caching', None) + self.write_accelerator_enabled = kwargs.get('write_accelerator_enabled', None) + self.image = kwargs.get('image', None) + self.vhd_containers = kwargs.get('vhd_containers', None) + self.managed_disk = kwargs.get('managed_disk', None) + + +class VirtualMachineScaleSetUpdateOSProfile(Model): + """Describes a virtual machine scale set OS profile. + + :param custom_data: A base-64 encoded string of custom data. + :type custom_data: str + :param windows_configuration: The Windows Configuration of the OS profile. + :type windows_configuration: + ~azure.mgmt.compute.v2017_12_01.models.WindowsConfiguration + :param linux_configuration: The Linux Configuration of the OS profile. + :type linux_configuration: + ~azure.mgmt.compute.v2017_12_01.models.LinuxConfiguration + :param secrets: The List of certificates for addition to the VM. + :type secrets: + list[~azure.mgmt.compute.v2017_12_01.models.VaultSecretGroup] + """ + + _attribute_map = { + 'custom_data': {'key': 'customData', 'type': 'str'}, + 'windows_configuration': {'key': 'windowsConfiguration', 'type': 'WindowsConfiguration'}, + 'linux_configuration': {'key': 'linuxConfiguration', 'type': 'LinuxConfiguration'}, + 'secrets': {'key': 'secrets', 'type': '[VaultSecretGroup]'}, + } + + def __init__(self, **kwargs): + super(VirtualMachineScaleSetUpdateOSProfile, self).__init__(**kwargs) + self.custom_data = kwargs.get('custom_data', None) + self.windows_configuration = kwargs.get('windows_configuration', None) + self.linux_configuration = kwargs.get('linux_configuration', None) + self.secrets = kwargs.get('secrets', None) + + +class VirtualMachineScaleSetUpdatePublicIPAddressConfiguration(Model): + """Describes a virtual machines scale set IP Configuration's PublicIPAddress + configuration. + + :param name: The publicIP address configuration name. + :type name: str + :param idle_timeout_in_minutes: The idle timeout of the public IP address. + :type idle_timeout_in_minutes: int + :param dns_settings: The dns settings to be applied on the publicIP + addresses . + :type dns_settings: + ~azure.mgmt.compute.v2017_12_01.models.VirtualMachineScaleSetPublicIPAddressConfigurationDnsSettings + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'idle_timeout_in_minutes': {'key': 'properties.idleTimeoutInMinutes', 'type': 'int'}, + 'dns_settings': {'key': 'properties.dnsSettings', 'type': 'VirtualMachineScaleSetPublicIPAddressConfigurationDnsSettings'}, + } + + def __init__(self, **kwargs): + super(VirtualMachineScaleSetUpdatePublicIPAddressConfiguration, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.idle_timeout_in_minutes = kwargs.get('idle_timeout_in_minutes', None) + self.dns_settings = kwargs.get('dns_settings', None) + + +class VirtualMachineScaleSetUpdateStorageProfile(Model): + """Describes a virtual machine scale set storage profile. + + :param image_reference: The image reference. + :type image_reference: + ~azure.mgmt.compute.v2017_12_01.models.ImageReference + :param os_disk: The OS disk. + :type os_disk: + ~azure.mgmt.compute.v2017_12_01.models.VirtualMachineScaleSetUpdateOSDisk + :param data_disks: The data disks. + :type data_disks: + list[~azure.mgmt.compute.v2017_12_01.models.VirtualMachineScaleSetDataDisk] + """ + + _attribute_map = { + 'image_reference': {'key': 'imageReference', 'type': 'ImageReference'}, + 'os_disk': {'key': 'osDisk', 'type': 'VirtualMachineScaleSetUpdateOSDisk'}, + 'data_disks': {'key': 'dataDisks', 'type': '[VirtualMachineScaleSetDataDisk]'}, + } + + def __init__(self, **kwargs): + super(VirtualMachineScaleSetUpdateStorageProfile, self).__init__(**kwargs) + self.image_reference = kwargs.get('image_reference', None) + self.os_disk = kwargs.get('os_disk', None) + self.data_disks = kwargs.get('data_disks', None) + + +class VirtualMachineScaleSetUpdateVMProfile(Model): + """Describes a virtual machine scale set virtual machine profile. + + :param os_profile: The virtual machine scale set OS profile. + :type os_profile: + ~azure.mgmt.compute.v2017_12_01.models.VirtualMachineScaleSetUpdateOSProfile + :param storage_profile: The virtual machine scale set storage profile. + :type storage_profile: + ~azure.mgmt.compute.v2017_12_01.models.VirtualMachineScaleSetUpdateStorageProfile + :param network_profile: The virtual machine scale set network profile. + :type network_profile: + ~azure.mgmt.compute.v2017_12_01.models.VirtualMachineScaleSetUpdateNetworkProfile + :param diagnostics_profile: The virtual machine scale set diagnostics + profile. + :type diagnostics_profile: + ~azure.mgmt.compute.v2017_12_01.models.DiagnosticsProfile + :param extension_profile: The virtual machine scale set extension profile. + :type extension_profile: + ~azure.mgmt.compute.v2017_12_01.models.VirtualMachineScaleSetExtensionProfile + :param license_type: The license type, which is for bring your own license + scenario. + :type license_type: str + """ + + _attribute_map = { + 'os_profile': {'key': 'osProfile', 'type': 'VirtualMachineScaleSetUpdateOSProfile'}, + 'storage_profile': {'key': 'storageProfile', 'type': 'VirtualMachineScaleSetUpdateStorageProfile'}, + 'network_profile': {'key': 'networkProfile', 'type': 'VirtualMachineScaleSetUpdateNetworkProfile'}, + 'diagnostics_profile': {'key': 'diagnosticsProfile', 'type': 'DiagnosticsProfile'}, + 'extension_profile': {'key': 'extensionProfile', 'type': 'VirtualMachineScaleSetExtensionProfile'}, + 'license_type': {'key': 'licenseType', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(VirtualMachineScaleSetUpdateVMProfile, self).__init__(**kwargs) + self.os_profile = kwargs.get('os_profile', None) + self.storage_profile = kwargs.get('storage_profile', None) + self.network_profile = kwargs.get('network_profile', None) + self.diagnostics_profile = kwargs.get('diagnostics_profile', None) + self.extension_profile = kwargs.get('extension_profile', None) + self.license_type = kwargs.get('license_type', None) + + +class VirtualMachineScaleSetVM(Resource): + """Describes a virtual machine scale set virtual machine. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource Id + :vartype id: str + :ivar name: Resource name + :vartype name: str + :ivar type: Resource type + :vartype type: str + :param location: Required. Resource location + :type location: str + :param tags: Resource tags + :type tags: dict[str, str] + :ivar instance_id: The virtual machine instance ID. + :vartype instance_id: str + :ivar sku: The virtual machine SKU. + :vartype sku: ~azure.mgmt.compute.v2017_12_01.models.Sku + :ivar latest_model_applied: Specifies whether the latest model has been + applied to the virtual machine. + :vartype latest_model_applied: bool + :ivar vm_id: Azure VM unique ID. + :vartype vm_id: str + :ivar instance_view: The virtual machine instance view. + :vartype instance_view: + ~azure.mgmt.compute.v2017_12_01.models.VirtualMachineScaleSetVMInstanceView + :param hardware_profile: Specifies the hardware settings for the virtual + machine. + :type hardware_profile: + ~azure.mgmt.compute.v2017_12_01.models.HardwareProfile + :param storage_profile: Specifies the storage settings for the virtual + machine disks. + :type storage_profile: + ~azure.mgmt.compute.v2017_12_01.models.StorageProfile + :param os_profile: Specifies the operating system settings for the virtual + machine. + :type os_profile: ~azure.mgmt.compute.v2017_12_01.models.OSProfile + :param network_profile: Specifies the network interfaces of the virtual + machine. + :type network_profile: + ~azure.mgmt.compute.v2017_12_01.models.NetworkProfile + :param diagnostics_profile: Specifies the boot diagnostic settings state. +

    Minimum api-version: 2015-06-15. + :type diagnostics_profile: + ~azure.mgmt.compute.v2017_12_01.models.DiagnosticsProfile + :param availability_set: Specifies information about the availability set + that the virtual machine should be assigned to. Virtual machines specified + in the same availability set are allocated to different nodes to maximize + availability. For more information about availability sets, see [Manage + the availability of virtual + machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-manage-availability?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). +

    For more information on Azure planned maintenance, see [Planned + maintenance for virtual machines in + Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-planned-maintenance?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json) +

    Currently, a VM can only be added to availability set at creation + time. An existing VM cannot be added to an availability set. + :type availability_set: ~azure.mgmt.compute.v2017_12_01.models.SubResource + :ivar provisioning_state: The provisioning state, which only appears in + the response. + :vartype provisioning_state: str + :param license_type: Specifies that the image or disk that is being used + was licensed on-premises. This element is only used for images that + contain the Windows Server operating system.

    Possible values are: +

    Windows_Client

    Windows_Server

    If this element + is included in a request for an update, the value must match the initial + value. This value cannot be updated.

    For more information, see + [Azure Hybrid Use Benefit for Windows + Server](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-hybrid-use-benefit-licensing?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json) +

    Minimum api-version: 2015-06-15 + :type license_type: str + :param plan: Specifies information about the marketplace image used to + create the virtual machine. This element is only used for marketplace + images. Before you can use a marketplace image from an API, you must + enable the image for programmatic use. In the Azure portal, find the + marketplace image that you want to use and then click **Want to deploy + programmatically, Get Started ->**. Enter any required information and + then click **Save**. + :type plan: ~azure.mgmt.compute.v2017_12_01.models.Plan + :ivar resources: The virtual machine child extension resources. + :vartype resources: + list[~azure.mgmt.compute.v2017_12_01.models.VirtualMachineExtension] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + 'instance_id': {'readonly': True}, + 'sku': {'readonly': True}, + 'latest_model_applied': {'readonly': True}, + 'vm_id': {'readonly': True}, + 'instance_view': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + 'resources': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'instance_id': {'key': 'instanceId', 'type': 'str'}, + 'sku': {'key': 'sku', 'type': 'Sku'}, + 'latest_model_applied': {'key': 'properties.latestModelApplied', 'type': 'bool'}, + 'vm_id': {'key': 'properties.vmId', 'type': 'str'}, + 'instance_view': {'key': 'properties.instanceView', 'type': 'VirtualMachineScaleSetVMInstanceView'}, + 'hardware_profile': {'key': 'properties.hardwareProfile', 'type': 'HardwareProfile'}, + 'storage_profile': {'key': 'properties.storageProfile', 'type': 'StorageProfile'}, + 'os_profile': {'key': 'properties.osProfile', 'type': 'OSProfile'}, + 'network_profile': {'key': 'properties.networkProfile', 'type': 'NetworkProfile'}, + 'diagnostics_profile': {'key': 'properties.diagnosticsProfile', 'type': 'DiagnosticsProfile'}, + 'availability_set': {'key': 'properties.availabilitySet', 'type': 'SubResource'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'license_type': {'key': 'properties.licenseType', 'type': 'str'}, + 'plan': {'key': 'plan', 'type': 'Plan'}, + 'resources': {'key': 'resources', 'type': '[VirtualMachineExtension]'}, + } + + def __init__(self, **kwargs): + super(VirtualMachineScaleSetVM, self).__init__(**kwargs) + self.instance_id = None + self.sku = None + self.latest_model_applied = None + self.vm_id = None + self.instance_view = None + self.hardware_profile = kwargs.get('hardware_profile', None) + self.storage_profile = kwargs.get('storage_profile', None) + self.os_profile = kwargs.get('os_profile', None) + self.network_profile = kwargs.get('network_profile', None) + self.diagnostics_profile = kwargs.get('diagnostics_profile', None) + self.availability_set = kwargs.get('availability_set', None) + self.provisioning_state = None + self.license_type = kwargs.get('license_type', None) + self.plan = kwargs.get('plan', None) + self.resources = None + + +class VirtualMachineScaleSetVMExtensionsSummary(Model): + """Extensions summary for virtual machines of a virtual machine scale set. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar name: The extension name. + :vartype name: str + :ivar statuses_summary: The extensions information. + :vartype statuses_summary: + list[~azure.mgmt.compute.v2017_12_01.models.VirtualMachineStatusCodeCount] + """ + + _validation = { + 'name': {'readonly': True}, + 'statuses_summary': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'statuses_summary': {'key': 'statusesSummary', 'type': '[VirtualMachineStatusCodeCount]'}, + } + + def __init__(self, **kwargs): + super(VirtualMachineScaleSetVMExtensionsSummary, self).__init__(**kwargs) + self.name = None + self.statuses_summary = None + + +class VirtualMachineScaleSetVMInstanceIDs(Model): + """Specifies a list of virtual machine instance IDs from the VM scale set. + + :param instance_ids: The virtual machine scale set instance ids. Omitting + the virtual machine scale set instance ids will result in the operation + being performed on all virtual machines in the virtual machine scale set. + :type instance_ids: list[str] + """ + + _attribute_map = { + 'instance_ids': {'key': 'instanceIds', 'type': '[str]'}, + } + + def __init__(self, **kwargs): + super(VirtualMachineScaleSetVMInstanceIDs, self).__init__(**kwargs) + self.instance_ids = kwargs.get('instance_ids', None) + + +class VirtualMachineScaleSetVMInstanceRequiredIDs(Model): + """Specifies a list of virtual machine instance IDs from the VM scale set. + + All required parameters must be populated in order to send to Azure. + + :param instance_ids: Required. The virtual machine scale set instance ids. + :type instance_ids: list[str] + """ + + _validation = { + 'instance_ids': {'required': True}, + } + + _attribute_map = { + 'instance_ids': {'key': 'instanceIds', 'type': '[str]'}, + } + + def __init__(self, **kwargs): + super(VirtualMachineScaleSetVMInstanceRequiredIDs, self).__init__(**kwargs) + self.instance_ids = kwargs.get('instance_ids', None) + + +class VirtualMachineScaleSetVMInstanceView(Model): + """The instance view of a virtual machine scale set VM. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :param platform_update_domain: The Update Domain count. + :type platform_update_domain: int + :param platform_fault_domain: The Fault Domain count. + :type platform_fault_domain: int + :param rdp_thumb_print: The Remote desktop certificate thumbprint. + :type rdp_thumb_print: str + :param vm_agent: The VM Agent running on the virtual machine. + :type vm_agent: + ~azure.mgmt.compute.v2017_12_01.models.VirtualMachineAgentInstanceView + :param maintenance_redeploy_status: The Maintenance Operation status on + the virtual machine. + :type maintenance_redeploy_status: + ~azure.mgmt.compute.v2017_12_01.models.MaintenanceRedeployStatus + :param disks: The disks information. + :type disks: list[~azure.mgmt.compute.v2017_12_01.models.DiskInstanceView] + :param extensions: The extensions information. + :type extensions: + list[~azure.mgmt.compute.v2017_12_01.models.VirtualMachineExtensionInstanceView] + :ivar vm_health: The health status for the VM. + :vartype vm_health: + ~azure.mgmt.compute.v2017_12_01.models.VirtualMachineHealthStatus + :param boot_diagnostics: Boot Diagnostics is a debugging feature which + allows you to view Console Output and Screenshot to diagnose VM status. +

    You can easily view the output of your console log.

    + Azure also enables you to see a screenshot of the VM from the hypervisor. + :type boot_diagnostics: + ~azure.mgmt.compute.v2017_12_01.models.BootDiagnosticsInstanceView + :param statuses: The resource status information. + :type statuses: + list[~azure.mgmt.compute.v2017_12_01.models.InstanceViewStatus] + :param placement_group_id: The placement group in which the VM is running. + If the VM is deallocated it will not have a placementGroupId. + :type placement_group_id: str + """ + + _validation = { + 'vm_health': {'readonly': True}, + } + + _attribute_map = { + 'platform_update_domain': {'key': 'platformUpdateDomain', 'type': 'int'}, + 'platform_fault_domain': {'key': 'platformFaultDomain', 'type': 'int'}, + 'rdp_thumb_print': {'key': 'rdpThumbPrint', 'type': 'str'}, + 'vm_agent': {'key': 'vmAgent', 'type': 'VirtualMachineAgentInstanceView'}, + 'maintenance_redeploy_status': {'key': 'maintenanceRedeployStatus', 'type': 'MaintenanceRedeployStatus'}, + 'disks': {'key': 'disks', 'type': '[DiskInstanceView]'}, + 'extensions': {'key': 'extensions', 'type': '[VirtualMachineExtensionInstanceView]'}, + 'vm_health': {'key': 'vmHealth', 'type': 'VirtualMachineHealthStatus'}, + 'boot_diagnostics': {'key': 'bootDiagnostics', 'type': 'BootDiagnosticsInstanceView'}, + 'statuses': {'key': 'statuses', 'type': '[InstanceViewStatus]'}, + 'placement_group_id': {'key': 'placementGroupId', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(VirtualMachineScaleSetVMInstanceView, self).__init__(**kwargs) + self.platform_update_domain = kwargs.get('platform_update_domain', None) + self.platform_fault_domain = kwargs.get('platform_fault_domain', None) + self.rdp_thumb_print = kwargs.get('rdp_thumb_print', None) + self.vm_agent = kwargs.get('vm_agent', None) + self.maintenance_redeploy_status = kwargs.get('maintenance_redeploy_status', None) + self.disks = kwargs.get('disks', None) + self.extensions = kwargs.get('extensions', None) + self.vm_health = None + self.boot_diagnostics = kwargs.get('boot_diagnostics', None) + self.statuses = kwargs.get('statuses', None) + self.placement_group_id = kwargs.get('placement_group_id', None) + + +class VirtualMachineScaleSetVMProfile(Model): + """Describes a virtual machine scale set virtual machine profile. + + :param os_profile: Specifies the operating system settings for the virtual + machines in the scale set. + :type os_profile: + ~azure.mgmt.compute.v2017_12_01.models.VirtualMachineScaleSetOSProfile + :param storage_profile: Specifies the storage settings for the virtual + machine disks. + :type storage_profile: + ~azure.mgmt.compute.v2017_12_01.models.VirtualMachineScaleSetStorageProfile + :param network_profile: Specifies properties of the network interfaces of + the virtual machines in the scale set. + :type network_profile: + ~azure.mgmt.compute.v2017_12_01.models.VirtualMachineScaleSetNetworkProfile + :param diagnostics_profile: Specifies the boot diagnostic settings state. +

    Minimum api-version: 2015-06-15. + :type diagnostics_profile: + ~azure.mgmt.compute.v2017_12_01.models.DiagnosticsProfile + :param extension_profile: Specifies a collection of settings for + extensions installed on virtual machines in the scale set. + :type extension_profile: + ~azure.mgmt.compute.v2017_12_01.models.VirtualMachineScaleSetExtensionProfile + :param license_type: Specifies that the image or disk that is being used + was licensed on-premises. This element is only used for images that + contain the Windows Server operating system.

    Possible values are: +

    Windows_Client

    Windows_Server

    If this element + is included in a request for an update, the value must match the initial + value. This value cannot be updated.

    For more information, see + [Azure Hybrid Use Benefit for Windows + Server](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-hybrid-use-benefit-licensing?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json) +

    Minimum api-version: 2015-06-15 + :type license_type: str + :param priority: Specifies the priority for the virtual machines in the + scale set.

    Minimum api-version: 2017-10-30-preview. Possible + values include: 'Regular', 'Low' + :type priority: str or + ~azure.mgmt.compute.v2017_12_01.models.VirtualMachinePriorityTypes + :param eviction_policy: Specifies the eviction policy for virtual machines + in a low priority scale set.

    Minimum api-version: + 2017-10-30-preview. Possible values include: 'Deallocate', 'Delete' + :type eviction_policy: str or + ~azure.mgmt.compute.v2017_12_01.models.VirtualMachineEvictionPolicyTypes + """ + + _attribute_map = { + 'os_profile': {'key': 'osProfile', 'type': 'VirtualMachineScaleSetOSProfile'}, + 'storage_profile': {'key': 'storageProfile', 'type': 'VirtualMachineScaleSetStorageProfile'}, + 'network_profile': {'key': 'networkProfile', 'type': 'VirtualMachineScaleSetNetworkProfile'}, + 'diagnostics_profile': {'key': 'diagnosticsProfile', 'type': 'DiagnosticsProfile'}, + 'extension_profile': {'key': 'extensionProfile', 'type': 'VirtualMachineScaleSetExtensionProfile'}, + 'license_type': {'key': 'licenseType', 'type': 'str'}, + 'priority': {'key': 'priority', 'type': 'str'}, + 'eviction_policy': {'key': 'evictionPolicy', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(VirtualMachineScaleSetVMProfile, self).__init__(**kwargs) + self.os_profile = kwargs.get('os_profile', None) + self.storage_profile = kwargs.get('storage_profile', None) + self.network_profile = kwargs.get('network_profile', None) + self.diagnostics_profile = kwargs.get('diagnostics_profile', None) + self.extension_profile = kwargs.get('extension_profile', None) + self.license_type = kwargs.get('license_type', None) + self.priority = kwargs.get('priority', None) + self.eviction_policy = kwargs.get('eviction_policy', None) + + +class VirtualMachineSize(Model): + """Describes the properties of a VM size. + + :param name: The name of the virtual machine size. + :type name: str + :param number_of_cores: The number of cores supported by the virtual + machine size. + :type number_of_cores: int + :param os_disk_size_in_mb: The OS disk size, in MB, allowed by the virtual + machine size. + :type os_disk_size_in_mb: int + :param resource_disk_size_in_mb: The resource disk size, in MB, allowed by + the virtual machine size. + :type resource_disk_size_in_mb: int + :param memory_in_mb: The amount of memory, in MB, supported by the virtual + machine size. + :type memory_in_mb: int + :param max_data_disk_count: The maximum number of data disks that can be + attached to the virtual machine size. + :type max_data_disk_count: int + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'number_of_cores': {'key': 'numberOfCores', 'type': 'int'}, + 'os_disk_size_in_mb': {'key': 'osDiskSizeInMB', 'type': 'int'}, + 'resource_disk_size_in_mb': {'key': 'resourceDiskSizeInMB', 'type': 'int'}, + 'memory_in_mb': {'key': 'memoryInMB', 'type': 'int'}, + 'max_data_disk_count': {'key': 'maxDataDiskCount', 'type': 'int'}, + } + + def __init__(self, **kwargs): + super(VirtualMachineSize, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.number_of_cores = kwargs.get('number_of_cores', None) + self.os_disk_size_in_mb = kwargs.get('os_disk_size_in_mb', None) + self.resource_disk_size_in_mb = kwargs.get('resource_disk_size_in_mb', None) + self.memory_in_mb = kwargs.get('memory_in_mb', None) + self.max_data_disk_count = kwargs.get('max_data_disk_count', None) + + +class VirtualMachineStatusCodeCount(Model): + """The status code and count of the virtual machine scale set instance view + status summary. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar code: The instance view status code. + :vartype code: str + :ivar count: The number of instances having a particular status code. + :vartype count: int + """ + + _validation = { + 'code': {'readonly': True}, + 'count': {'readonly': True}, + } + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + 'count': {'key': 'count', 'type': 'int'}, + } + + def __init__(self, **kwargs): + super(VirtualMachineStatusCodeCount, self).__init__(**kwargs) + self.code = None + self.count = None + + +class VirtualMachineUpdate(UpdateResource): + """Describes a Virtual Machine Update. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :param tags: Resource tags + :type tags: dict[str, str] + :param plan: Specifies information about the marketplace image used to + create the virtual machine. This element is only used for marketplace + images. Before you can use a marketplace image from an API, you must + enable the image for programmatic use. In the Azure portal, find the + marketplace image that you want to use and then click **Want to deploy + programmatically, Get Started ->**. Enter any required information and + then click **Save**. + :type plan: ~azure.mgmt.compute.v2017_12_01.models.Plan + :param hardware_profile: Specifies the hardware settings for the virtual + machine. + :type hardware_profile: + ~azure.mgmt.compute.v2017_12_01.models.HardwareProfile + :param storage_profile: Specifies the storage settings for the virtual + machine disks. + :type storage_profile: + ~azure.mgmt.compute.v2017_12_01.models.StorageProfile + :param os_profile: Specifies the operating system settings for the virtual + machine. + :type os_profile: ~azure.mgmt.compute.v2017_12_01.models.OSProfile + :param network_profile: Specifies the network interfaces of the virtual + machine. + :type network_profile: + ~azure.mgmt.compute.v2017_12_01.models.NetworkProfile + :param diagnostics_profile: Specifies the boot diagnostic settings state. +

    Minimum api-version: 2015-06-15. + :type diagnostics_profile: + ~azure.mgmt.compute.v2017_12_01.models.DiagnosticsProfile + :param availability_set: Specifies information about the availability set + that the virtual machine should be assigned to. Virtual machines specified + in the same availability set are allocated to different nodes to maximize + availability. For more information about availability sets, see [Manage + the availability of virtual + machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-manage-availability?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). +

    For more information on Azure planned maintenance, see [Planned + maintenance for virtual machines in + Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-planned-maintenance?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json) +

    Currently, a VM can only be added to availability set at creation + time. An existing VM cannot be added to an availability set. + :type availability_set: ~azure.mgmt.compute.v2017_12_01.models.SubResource + :ivar provisioning_state: The provisioning state, which only appears in + the response. + :vartype provisioning_state: str + :ivar instance_view: The virtual machine instance view. + :vartype instance_view: + ~azure.mgmt.compute.v2017_12_01.models.VirtualMachineInstanceView + :param license_type: Specifies that the image or disk that is being used + was licensed on-premises. This element is only used for images that + contain the Windows Server operating system.

    Possible values are: +

    Windows_Client

    Windows_Server

    If this element + is included in a request for an update, the value must match the initial + value. This value cannot be updated.

    For more information, see + [Azure Hybrid Use Benefit for Windows + Server](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-hybrid-use-benefit-licensing?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json) +

    Minimum api-version: 2015-06-15 + :type license_type: str + :ivar vm_id: Specifies the VM unique ID which is a 128-bits identifier + that is encoded and stored in all Azure IaaS VMs SMBIOS and can be read + using platform BIOS commands. + :vartype vm_id: str + :param identity: The identity of the virtual machine, if configured. + :type identity: + ~azure.mgmt.compute.v2017_12_01.models.VirtualMachineIdentity + :param zones: The virtual machine zones. + :type zones: list[str] + """ + + _validation = { + 'provisioning_state': {'readonly': True}, + 'instance_view': {'readonly': True}, + 'vm_id': {'readonly': True}, + } + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + 'plan': {'key': 'plan', 'type': 'Plan'}, + 'hardware_profile': {'key': 'properties.hardwareProfile', 'type': 'HardwareProfile'}, + 'storage_profile': {'key': 'properties.storageProfile', 'type': 'StorageProfile'}, + 'os_profile': {'key': 'properties.osProfile', 'type': 'OSProfile'}, + 'network_profile': {'key': 'properties.networkProfile', 'type': 'NetworkProfile'}, + 'diagnostics_profile': {'key': 'properties.diagnosticsProfile', 'type': 'DiagnosticsProfile'}, + 'availability_set': {'key': 'properties.availabilitySet', 'type': 'SubResource'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'instance_view': {'key': 'properties.instanceView', 'type': 'VirtualMachineInstanceView'}, + 'license_type': {'key': 'properties.licenseType', 'type': 'str'}, + 'vm_id': {'key': 'properties.vmId', 'type': 'str'}, + 'identity': {'key': 'identity', 'type': 'VirtualMachineIdentity'}, + 'zones': {'key': 'zones', 'type': '[str]'}, + } + + def __init__(self, **kwargs): + super(VirtualMachineUpdate, self).__init__(**kwargs) + self.plan = kwargs.get('plan', None) + self.hardware_profile = kwargs.get('hardware_profile', None) + self.storage_profile = kwargs.get('storage_profile', None) + self.os_profile = kwargs.get('os_profile', None) + self.network_profile = kwargs.get('network_profile', None) + self.diagnostics_profile = kwargs.get('diagnostics_profile', None) + self.availability_set = kwargs.get('availability_set', None) + self.provisioning_state = None + self.instance_view = None + self.license_type = kwargs.get('license_type', None) + self.vm_id = None + self.identity = kwargs.get('identity', None) + self.zones = kwargs.get('zones', None) + + +class WindowsConfiguration(Model): + """Specifies Windows operating system settings on the virtual machine. + + :param provision_vm_agent: Indicates whether virtual machine agent should + be provisioned on the virtual machine.

    When this property is not + specified in the request body, default behavior is to set it to true. + This will ensure that VM Agent is installed on the VM so that extensions + can be added to the VM later. + :type provision_vm_agent: bool + :param enable_automatic_updates: Indicates whether virtual machine is + enabled for automatic updates. + :type enable_automatic_updates: bool + :param time_zone: Specifies the time zone of the virtual machine. e.g. + "Pacific Standard Time" + :type time_zone: str + :param additional_unattend_content: Specifies additional base-64 encoded + XML formatted information that can be included in the Unattend.xml file, + which is used by Windows Setup. + :type additional_unattend_content: + list[~azure.mgmt.compute.v2017_12_01.models.AdditionalUnattendContent] + :param win_rm: Specifies the Windows Remote Management listeners. This + enables remote Windows PowerShell. + :type win_rm: ~azure.mgmt.compute.v2017_12_01.models.WinRMConfiguration + """ + + _attribute_map = { + 'provision_vm_agent': {'key': 'provisionVMAgent', 'type': 'bool'}, + 'enable_automatic_updates': {'key': 'enableAutomaticUpdates', 'type': 'bool'}, + 'time_zone': {'key': 'timeZone', 'type': 'str'}, + 'additional_unattend_content': {'key': 'additionalUnattendContent', 'type': '[AdditionalUnattendContent]'}, + 'win_rm': {'key': 'winRM', 'type': 'WinRMConfiguration'}, + } + + def __init__(self, **kwargs): + super(WindowsConfiguration, self).__init__(**kwargs) + self.provision_vm_agent = kwargs.get('provision_vm_agent', None) + self.enable_automatic_updates = kwargs.get('enable_automatic_updates', None) + self.time_zone = kwargs.get('time_zone', None) + self.additional_unattend_content = kwargs.get('additional_unattend_content', None) + self.win_rm = kwargs.get('win_rm', None) + + +class WinRMConfiguration(Model): + """Describes Windows Remote Management configuration of the VM. + + :param listeners: The list of Windows Remote Management listeners + :type listeners: + list[~azure.mgmt.compute.v2017_12_01.models.WinRMListener] + """ + + _attribute_map = { + 'listeners': {'key': 'listeners', 'type': '[WinRMListener]'}, + } + + def __init__(self, **kwargs): + super(WinRMConfiguration, self).__init__(**kwargs) + self.listeners = kwargs.get('listeners', None) + + +class WinRMListener(Model): + """Describes Protocol and thumbprint of Windows Remote Management listener. + + :param protocol: Specifies the protocol of listener.

    Possible + values are:
    **http**

    **https**. Possible values include: + 'Http', 'Https' + :type protocol: str or + ~azure.mgmt.compute.v2017_12_01.models.ProtocolTypes + :param certificate_url: This is the URL of a certificate that has been + uploaded to Key Vault as a secret. For adding a secret to the Key Vault, + see [Add a key or secret to the key + vault](https://docs.microsoft.com/azure/key-vault/key-vault-get-started/#add). + In this case, your certificate needs to be It is the Base64 encoding of + the following JSON Object which is encoded in UTF-8:

    {
    + "data":"",
    "dataType":"pfx",
    + "password":""
    } + :type certificate_url: str + """ + + _attribute_map = { + 'protocol': {'key': 'protocol', 'type': 'ProtocolTypes'}, + 'certificate_url': {'key': 'certificateUrl', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(WinRMListener, self).__init__(**kwargs) + self.protocol = kwargs.get('protocol', None) + self.certificate_url = kwargs.get('certificate_url', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/_models_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/_models_py3.py new file mode 100644 index 000000000000..19ac1722d0f5 --- /dev/null +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/_models_py3.py @@ -0,0 +1,5246 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class AdditionalUnattendContent(Model): + """Specifies additional XML formatted information that can be included in the + Unattend.xml file, which is used by Windows Setup. Contents are defined by + setting name, component name, and the pass in which the content is applied. + + :param pass_name: The pass name. Currently, the only allowable value is + OobeSystem. Possible values include: 'OobeSystem' + :type pass_name: str or ~azure.mgmt.compute.v2017_12_01.models.PassNames + :param component_name: The component name. Currently, the only allowable + value is Microsoft-Windows-Shell-Setup. Possible values include: + 'Microsoft-Windows-Shell-Setup' + :type component_name: str or + ~azure.mgmt.compute.v2017_12_01.models.ComponentNames + :param setting_name: Specifies the name of the setting to which the + content applies. Possible values are: FirstLogonCommands and AutoLogon. + Possible values include: 'AutoLogon', 'FirstLogonCommands' + :type setting_name: str or + ~azure.mgmt.compute.v2017_12_01.models.SettingNames + :param content: Specifies the XML formatted content that is added to the + unattend.xml file for the specified path and component. The XML must be + less than 4KB and must include the root element for the setting or feature + that is being inserted. + :type content: str + """ + + _attribute_map = { + 'pass_name': {'key': 'passName', 'type': 'PassNames'}, + 'component_name': {'key': 'componentName', 'type': 'ComponentNames'}, + 'setting_name': {'key': 'settingName', 'type': 'SettingNames'}, + 'content': {'key': 'content', 'type': 'str'}, + } + + def __init__(self, *, pass_name=None, component_name=None, setting_name=None, content: str=None, **kwargs) -> None: + super(AdditionalUnattendContent, self).__init__(**kwargs) + self.pass_name = pass_name + self.component_name = component_name + self.setting_name = setting_name + self.content = content + + +class ApiEntityReference(Model): + """The API entity reference. + + :param id: The ARM resource id in the form of + /subscriptions/{SubscriptionId}/resourceGroups/{ResourceGroupName}/... + :type id: str + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + } + + def __init__(self, *, id: str=None, **kwargs) -> None: + super(ApiEntityReference, self).__init__(**kwargs) + self.id = id + + +class ApiError(Model): + """Api error. + + :param details: The Api error details + :type details: list[~azure.mgmt.compute.v2017_12_01.models.ApiErrorBase] + :param innererror: The Api inner error + :type innererror: ~azure.mgmt.compute.v2017_12_01.models.InnerError + :param code: The error code. + :type code: str + :param target: The target of the particular error. + :type target: str + :param message: The error message. + :type message: str + """ + + _attribute_map = { + 'details': {'key': 'details', 'type': '[ApiErrorBase]'}, + 'innererror': {'key': 'innererror', 'type': 'InnerError'}, + 'code': {'key': 'code', 'type': 'str'}, + 'target': {'key': 'target', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + } + + def __init__(self, *, details=None, innererror=None, code: str=None, target: str=None, message: str=None, **kwargs) -> None: + super(ApiError, self).__init__(**kwargs) + self.details = details + self.innererror = innererror + self.code = code + self.target = target + self.message = message + + +class ApiErrorBase(Model): + """Api error base. + + :param code: The error code. + :type code: str + :param target: The target of the particular error. + :type target: str + :param message: The error message. + :type message: str + """ + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + 'target': {'key': 'target', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + } + + def __init__(self, *, code: str=None, target: str=None, message: str=None, **kwargs) -> None: + super(ApiErrorBase, self).__init__(**kwargs) + self.code = code + self.target = target + self.message = message + + +class AutoOSUpgradePolicy(Model): + """The configuration parameters used for performing automatic OS upgrade. + + :param disable_auto_rollback: Whether OS image rollback feature should be + disabled. Default value is false. + :type disable_auto_rollback: bool + """ + + _attribute_map = { + 'disable_auto_rollback': {'key': 'disableAutoRollback', 'type': 'bool'}, + } + + def __init__(self, *, disable_auto_rollback: bool=None, **kwargs) -> None: + super(AutoOSUpgradePolicy, self).__init__(**kwargs) + self.disable_auto_rollback = disable_auto_rollback + + +class Resource(Model): + """The Resource model definition. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource Id + :vartype id: str + :ivar name: Resource name + :vartype name: str + :ivar type: Resource type + :vartype type: str + :param location: Required. Resource location + :type location: str + :param tags: Resource tags + :type tags: dict[str, str] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__(self, *, location: str, tags=None, **kwargs) -> None: + super(Resource, self).__init__(**kwargs) + self.id = None + self.name = None + self.type = None + self.location = location + self.tags = tags + + +class AvailabilitySet(Resource): + """Specifies information about the availability set that the virtual machine + should be assigned to. Virtual machines specified in the same availability + set are allocated to different nodes to maximize availability. For more + information about availability sets, see [Manage the availability of + virtual + machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-manage-availability?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). +

    For more information on Azure planned maintenance, see [Planned + maintenance for virtual machines in + Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-planned-maintenance?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json) +

    Currently, a VM can only be added to availability set at creation + time. An existing VM cannot be added to an availability set. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource Id + :vartype id: str + :ivar name: Resource name + :vartype name: str + :ivar type: Resource type + :vartype type: str + :param location: Required. Resource location + :type location: str + :param tags: Resource tags + :type tags: dict[str, str] + :param platform_update_domain_count: Update Domain count. + :type platform_update_domain_count: int + :param platform_fault_domain_count: Fault Domain count. + :type platform_fault_domain_count: int + :param virtual_machines: A list of references to all virtual machines in + the availability set. + :type virtual_machines: + list[~azure.mgmt.compute.v2017_12_01.models.SubResource] + :ivar statuses: The resource status information. + :vartype statuses: + list[~azure.mgmt.compute.v2017_12_01.models.InstanceViewStatus] + :param sku: Sku of the availability set + :type sku: ~azure.mgmt.compute.v2017_12_01.models.Sku + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + 'statuses': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'platform_update_domain_count': {'key': 'properties.platformUpdateDomainCount', 'type': 'int'}, + 'platform_fault_domain_count': {'key': 'properties.platformFaultDomainCount', 'type': 'int'}, + 'virtual_machines': {'key': 'properties.virtualMachines', 'type': '[SubResource]'}, + 'statuses': {'key': 'properties.statuses', 'type': '[InstanceViewStatus]'}, + 'sku': {'key': 'sku', 'type': 'Sku'}, + } + + def __init__(self, *, location: str, tags=None, platform_update_domain_count: int=None, platform_fault_domain_count: int=None, virtual_machines=None, sku=None, **kwargs) -> None: + super(AvailabilitySet, self).__init__(location=location, tags=tags, **kwargs) + self.platform_update_domain_count = platform_update_domain_count + self.platform_fault_domain_count = platform_fault_domain_count + self.virtual_machines = virtual_machines + self.statuses = None + self.sku = sku + + +class UpdateResource(Model): + """The Update Resource model definition. + + :param tags: Resource tags + :type tags: dict[str, str] + """ + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__(self, *, tags=None, **kwargs) -> None: + super(UpdateResource, self).__init__(**kwargs) + self.tags = tags + + +class AvailabilitySetUpdate(UpdateResource): + """Specifies information about the availability set that the virtual machine + should be assigned to. Only tags may be updated. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :param tags: Resource tags + :type tags: dict[str, str] + :param platform_update_domain_count: Update Domain count. + :type platform_update_domain_count: int + :param platform_fault_domain_count: Fault Domain count. + :type platform_fault_domain_count: int + :param virtual_machines: A list of references to all virtual machines in + the availability set. + :type virtual_machines: + list[~azure.mgmt.compute.v2017_12_01.models.SubResource] + :ivar statuses: The resource status information. + :vartype statuses: + list[~azure.mgmt.compute.v2017_12_01.models.InstanceViewStatus] + :param sku: Sku of the availability set + :type sku: ~azure.mgmt.compute.v2017_12_01.models.Sku + """ + + _validation = { + 'statuses': {'readonly': True}, + } + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + 'platform_update_domain_count': {'key': 'properties.platformUpdateDomainCount', 'type': 'int'}, + 'platform_fault_domain_count': {'key': 'properties.platformFaultDomainCount', 'type': 'int'}, + 'virtual_machines': {'key': 'properties.virtualMachines', 'type': '[SubResource]'}, + 'statuses': {'key': 'properties.statuses', 'type': '[InstanceViewStatus]'}, + 'sku': {'key': 'sku', 'type': 'Sku'}, + } + + def __init__(self, *, tags=None, platform_update_domain_count: int=None, platform_fault_domain_count: int=None, virtual_machines=None, sku=None, **kwargs) -> None: + super(AvailabilitySetUpdate, self).__init__(tags=tags, **kwargs) + self.platform_update_domain_count = platform_update_domain_count + self.platform_fault_domain_count = platform_fault_domain_count + self.virtual_machines = virtual_machines + self.statuses = None + self.sku = sku + + +class BootDiagnostics(Model): + """Boot Diagnostics is a debugging feature which allows you to view Console + Output and Screenshot to diagnose VM status.

    You can easily view + the output of your console log.

    Azure also enables you to see a + screenshot of the VM from the hypervisor. + + :param enabled: Whether boot diagnostics should be enabled on the Virtual + Machine. + :type enabled: bool + :param storage_uri: Uri of the storage account to use for placing the + console output and screenshot. + :type storage_uri: str + """ + + _attribute_map = { + 'enabled': {'key': 'enabled', 'type': 'bool'}, + 'storage_uri': {'key': 'storageUri', 'type': 'str'}, + } + + def __init__(self, *, enabled: bool=None, storage_uri: str=None, **kwargs) -> None: + super(BootDiagnostics, self).__init__(**kwargs) + self.enabled = enabled + self.storage_uri = storage_uri + + +class BootDiagnosticsInstanceView(Model): + """The instance view of a virtual machine boot diagnostics. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar console_screenshot_blob_uri: The console screenshot blob URI. + :vartype console_screenshot_blob_uri: str + :ivar serial_console_log_blob_uri: The Linux serial console log blob Uri. + :vartype serial_console_log_blob_uri: str + """ + + _validation = { + 'console_screenshot_blob_uri': {'readonly': True}, + 'serial_console_log_blob_uri': {'readonly': True}, + } + + _attribute_map = { + 'console_screenshot_blob_uri': {'key': 'consoleScreenshotBlobUri', 'type': 'str'}, + 'serial_console_log_blob_uri': {'key': 'serialConsoleLogBlobUri', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(BootDiagnosticsInstanceView, self).__init__(**kwargs) + self.console_screenshot_blob_uri = None + self.serial_console_log_blob_uri = None + + +class CloudError(Model): + """CloudError. + """ + + _attribute_map = { + } + + +class ComputeLongRunningOperationProperties(Model): + """Compute-specific operation properties, including output. + + :param output: Operation output data (raw JSON) + :type output: object + """ + + _attribute_map = { + 'output': {'key': 'output', 'type': 'object'}, + } + + def __init__(self, *, output=None, **kwargs) -> None: + super(ComputeLongRunningOperationProperties, self).__init__(**kwargs) + self.output = output + + +class ComputeOperationValue(Model): + """Describes the properties of a Compute Operation value. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar origin: The origin of the compute operation. + :vartype origin: str + :ivar name: The name of the compute operation. + :vartype name: str + :ivar operation: The display name of the compute operation. + :vartype operation: str + :ivar resource: The display name of the resource the operation applies to. + :vartype resource: str + :ivar description: The description of the operation. + :vartype description: str + :ivar provider: The resource provider for the operation. + :vartype provider: str + """ + + _validation = { + 'origin': {'readonly': True}, + 'name': {'readonly': True}, + 'operation': {'readonly': True}, + 'resource': {'readonly': True}, + 'description': {'readonly': True}, + 'provider': {'readonly': True}, + } + + _attribute_map = { + 'origin': {'key': 'origin', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'operation': {'key': 'display.operation', 'type': 'str'}, + 'resource': {'key': 'display.resource', 'type': 'str'}, + 'description': {'key': 'display.description', 'type': 'str'}, + 'provider': {'key': 'display.provider', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(ComputeOperationValue, self).__init__(**kwargs) + self.origin = None + self.name = None + self.operation = None + self.resource = None + self.description = None + self.provider = None + + +class DataDisk(Model): + """Describes a data disk. + + All required parameters must be populated in order to send to Azure. + + :param lun: Required. Specifies the logical unit number of the data disk. + This value is used to identify data disks within the VM and therefore must + be unique for each data disk attached to a VM. + :type lun: int + :param name: The disk name. + :type name: str + :param vhd: The virtual hard disk. + :type vhd: ~azure.mgmt.compute.v2017_12_01.models.VirtualHardDisk + :param image: The source user image virtual hard disk. The virtual hard + disk will be copied before being attached to the virtual machine. If + SourceImage is provided, the destination virtual hard drive must not + exist. + :type image: ~azure.mgmt.compute.v2017_12_01.models.VirtualHardDisk + :param caching: Specifies the caching requirements.

    Possible + values are:

    **None**

    **ReadOnly**

    **ReadWrite** +

    Default: **None for Standard storage. ReadOnly for Premium + storage**. Possible values include: 'None', 'ReadOnly', 'ReadWrite' + :type caching: str or ~azure.mgmt.compute.v2017_12_01.models.CachingTypes + :param write_accelerator_enabled: Specifies whether writeAccelerator + should be enabled or disabled on the disk. + :type write_accelerator_enabled: bool + :param create_option: Required. Specifies how the virtual machine should + be created.

    Possible values are:

    **Attach** \\u2013 This + value is used when you are using a specialized disk to create the virtual + machine.

    **FromImage** \\u2013 This value is used when you are + using an image to create the virtual machine. If you are using a platform + image, you also use the imageReference element described above. If you are + using a marketplace image, you also use the plan element previously + described. Possible values include: 'FromImage', 'Empty', 'Attach' + :type create_option: str or + ~azure.mgmt.compute.v2017_12_01.models.DiskCreateOptionTypes + :param disk_size_gb: Specifies the size of an empty data disk in + gigabytes. This element can be used to overwrite the size of the disk in a + virtual machine image.

    This value cannot be larger than 1023 GB + :type disk_size_gb: int + :param managed_disk: The managed disk parameters. + :type managed_disk: + ~azure.mgmt.compute.v2017_12_01.models.ManagedDiskParameters + """ + + _validation = { + 'lun': {'required': True}, + 'create_option': {'required': True}, + } + + _attribute_map = { + 'lun': {'key': 'lun', 'type': 'int'}, + 'name': {'key': 'name', 'type': 'str'}, + 'vhd': {'key': 'vhd', 'type': 'VirtualHardDisk'}, + 'image': {'key': 'image', 'type': 'VirtualHardDisk'}, + 'caching': {'key': 'caching', 'type': 'CachingTypes'}, + 'write_accelerator_enabled': {'key': 'writeAcceleratorEnabled', 'type': 'bool'}, + 'create_option': {'key': 'createOption', 'type': 'str'}, + 'disk_size_gb': {'key': 'diskSizeGB', 'type': 'int'}, + 'managed_disk': {'key': 'managedDisk', 'type': 'ManagedDiskParameters'}, + } + + def __init__(self, *, lun: int, create_option, name: str=None, vhd=None, image=None, caching=None, write_accelerator_enabled: bool=None, disk_size_gb: int=None, managed_disk=None, **kwargs) -> None: + super(DataDisk, self).__init__(**kwargs) + self.lun = lun + self.name = name + self.vhd = vhd + self.image = image + self.caching = caching + self.write_accelerator_enabled = write_accelerator_enabled + self.create_option = create_option + self.disk_size_gb = disk_size_gb + self.managed_disk = managed_disk + + +class DataDiskImage(Model): + """Contains the data disk images information. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar lun: Specifies the logical unit number of the data disk. This value + is used to identify data disks within the VM and therefore must be unique + for each data disk attached to a VM. + :vartype lun: int + """ + + _validation = { + 'lun': {'readonly': True}, + } + + _attribute_map = { + 'lun': {'key': 'lun', 'type': 'int'}, + } + + def __init__(self, **kwargs) -> None: + super(DataDiskImage, self).__init__(**kwargs) + self.lun = None + + +class DiagnosticsProfile(Model): + """Specifies the boot diagnostic settings state.

    Minimum api-version: + 2015-06-15. + + :param boot_diagnostics: Boot Diagnostics is a debugging feature which + allows you to view Console Output and Screenshot to diagnose VM status. +

    You can easily view the output of your console log.

    + Azure also enables you to see a screenshot of the VM from the hypervisor. + :type boot_diagnostics: + ~azure.mgmt.compute.v2017_12_01.models.BootDiagnostics + """ + + _attribute_map = { + 'boot_diagnostics': {'key': 'bootDiagnostics', 'type': 'BootDiagnostics'}, + } + + def __init__(self, *, boot_diagnostics=None, **kwargs) -> None: + super(DiagnosticsProfile, self).__init__(**kwargs) + self.boot_diagnostics = boot_diagnostics + + +class DiskEncryptionSettings(Model): + """Describes a Encryption Settings for a Disk. + + :param disk_encryption_key: Specifies the location of the disk encryption + key, which is a Key Vault Secret. + :type disk_encryption_key: + ~azure.mgmt.compute.v2017_12_01.models.KeyVaultSecretReference + :param key_encryption_key: Specifies the location of the key encryption + key in Key Vault. + :type key_encryption_key: + ~azure.mgmt.compute.v2017_12_01.models.KeyVaultKeyReference + :param enabled: Specifies whether disk encryption should be enabled on the + virtual machine. + :type enabled: bool + """ + + _attribute_map = { + 'disk_encryption_key': {'key': 'diskEncryptionKey', 'type': 'KeyVaultSecretReference'}, + 'key_encryption_key': {'key': 'keyEncryptionKey', 'type': 'KeyVaultKeyReference'}, + 'enabled': {'key': 'enabled', 'type': 'bool'}, + } + + def __init__(self, *, disk_encryption_key=None, key_encryption_key=None, enabled: bool=None, **kwargs) -> None: + super(DiskEncryptionSettings, self).__init__(**kwargs) + self.disk_encryption_key = disk_encryption_key + self.key_encryption_key = key_encryption_key + self.enabled = enabled + + +class DiskInstanceView(Model): + """The instance view of the disk. + + :param name: The disk name. + :type name: str + :param encryption_settings: Specifies the encryption settings for the OS + Disk.

    Minimum api-version: 2015-06-15 + :type encryption_settings: + list[~azure.mgmt.compute.v2017_12_01.models.DiskEncryptionSettings] + :param statuses: The resource status information. + :type statuses: + list[~azure.mgmt.compute.v2017_12_01.models.InstanceViewStatus] + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'encryption_settings': {'key': 'encryptionSettings', 'type': '[DiskEncryptionSettings]'}, + 'statuses': {'key': 'statuses', 'type': '[InstanceViewStatus]'}, + } + + def __init__(self, *, name: str=None, encryption_settings=None, statuses=None, **kwargs) -> None: + super(DiskInstanceView, self).__init__(**kwargs) + self.name = name + self.encryption_settings = encryption_settings + self.statuses = statuses + + +class HardwareProfile(Model): + """Specifies the hardware settings for the virtual machine. + + :param vm_size: Specifies the size of the virtual machine. For more + information about virtual machine sizes, see [Sizes for virtual + machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-sizes?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). +

    The available VM sizes depend on region and availability set. For + a list of available sizes use these APIs:

    [List all available + virtual machine sizes in an availability + set](https://docs.microsoft.com/rest/api/compute/availabilitysets/listavailablesizes) +

    [List all available virtual machine sizes in a + region](https://docs.microsoft.com/rest/api/compute/virtualmachinesizes/list) +

    [List all available virtual machine sizes for + resizing](https://docs.microsoft.com/rest/api/compute/virtualmachines/listavailablesizes). + Possible values include: 'Basic_A0', 'Basic_A1', 'Basic_A2', 'Basic_A3', + 'Basic_A4', 'Standard_A0', 'Standard_A1', 'Standard_A2', 'Standard_A3', + 'Standard_A4', 'Standard_A5', 'Standard_A6', 'Standard_A7', 'Standard_A8', + 'Standard_A9', 'Standard_A10', 'Standard_A11', 'Standard_A1_v2', + 'Standard_A2_v2', 'Standard_A4_v2', 'Standard_A8_v2', 'Standard_A2m_v2', + 'Standard_A4m_v2', 'Standard_A8m_v2', 'Standard_B1s', 'Standard_B1ms', + 'Standard_B2s', 'Standard_B2ms', 'Standard_B4ms', 'Standard_B8ms', + 'Standard_D1', 'Standard_D2', 'Standard_D3', 'Standard_D4', + 'Standard_D11', 'Standard_D12', 'Standard_D13', 'Standard_D14', + 'Standard_D1_v2', 'Standard_D2_v2', 'Standard_D3_v2', 'Standard_D4_v2', + 'Standard_D5_v2', 'Standard_D2_v3', 'Standard_D4_v3', 'Standard_D8_v3', + 'Standard_D16_v3', 'Standard_D32_v3', 'Standard_D64_v3', + 'Standard_D2s_v3', 'Standard_D4s_v3', 'Standard_D8s_v3', + 'Standard_D16s_v3', 'Standard_D32s_v3', 'Standard_D64s_v3', + 'Standard_D11_v2', 'Standard_D12_v2', 'Standard_D13_v2', + 'Standard_D14_v2', 'Standard_D15_v2', 'Standard_DS1', 'Standard_DS2', + 'Standard_DS3', 'Standard_DS4', 'Standard_DS11', 'Standard_DS12', + 'Standard_DS13', 'Standard_DS14', 'Standard_DS1_v2', 'Standard_DS2_v2', + 'Standard_DS3_v2', 'Standard_DS4_v2', 'Standard_DS5_v2', + 'Standard_DS11_v2', 'Standard_DS12_v2', 'Standard_DS13_v2', + 'Standard_DS14_v2', 'Standard_DS15_v2', 'Standard_DS13-4_v2', + 'Standard_DS13-2_v2', 'Standard_DS14-8_v2', 'Standard_DS14-4_v2', + 'Standard_E2_v3', 'Standard_E4_v3', 'Standard_E8_v3', 'Standard_E16_v3', + 'Standard_E32_v3', 'Standard_E64_v3', 'Standard_E2s_v3', + 'Standard_E4s_v3', 'Standard_E8s_v3', 'Standard_E16s_v3', + 'Standard_E32s_v3', 'Standard_E64s_v3', 'Standard_E32-16_v3', + 'Standard_E32-8s_v3', 'Standard_E64-32s_v3', 'Standard_E64-16s_v3', + 'Standard_F1', 'Standard_F2', 'Standard_F4', 'Standard_F8', + 'Standard_F16', 'Standard_F1s', 'Standard_F2s', 'Standard_F4s', + 'Standard_F8s', 'Standard_F16s', 'Standard_F2s_v2', 'Standard_F4s_v2', + 'Standard_F8s_v2', 'Standard_F16s_v2', 'Standard_F32s_v2', + 'Standard_F64s_v2', 'Standard_F72s_v2', 'Standard_G1', 'Standard_G2', + 'Standard_G3', 'Standard_G4', 'Standard_G5', 'Standard_GS1', + 'Standard_GS2', 'Standard_GS3', 'Standard_GS4', 'Standard_GS5', + 'Standard_GS4-8', 'Standard_GS4-4', 'Standard_GS5-16', 'Standard_GS5-8', + 'Standard_H8', 'Standard_H16', 'Standard_H8m', 'Standard_H16m', + 'Standard_H16r', 'Standard_H16mr', 'Standard_L4s', 'Standard_L8s', + 'Standard_L16s', 'Standard_L32s', 'Standard_M64s', 'Standard_M64ms', + 'Standard_M128s', 'Standard_M128ms', 'Standard_M64-32ms', + 'Standard_M64-16ms', 'Standard_M128-64ms', 'Standard_M128-32ms', + 'Standard_NC6', 'Standard_NC12', 'Standard_NC24', 'Standard_NC24r', + 'Standard_NC6s_v2', 'Standard_NC12s_v2', 'Standard_NC24s_v2', + 'Standard_NC24rs_v2', 'Standard_NC6s_v3', 'Standard_NC12s_v3', + 'Standard_NC24s_v3', 'Standard_NC24rs_v3', 'Standard_ND6s', + 'Standard_ND12s', 'Standard_ND24s', 'Standard_ND24rs', 'Standard_NV6', + 'Standard_NV12', 'Standard_NV24' + :type vm_size: str or + ~azure.mgmt.compute.v2017_12_01.models.VirtualMachineSizeTypes + """ + + _attribute_map = { + 'vm_size': {'key': 'vmSize', 'type': 'str'}, + } + + def __init__(self, *, vm_size=None, **kwargs) -> None: + super(HardwareProfile, self).__init__(**kwargs) + self.vm_size = vm_size + + +class Image(Resource): + """The source user image virtual hard disk. The virtual hard disk will be + copied before being attached to the virtual machine. If SourceImage is + provided, the destination virtual hard drive must not exist. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource Id + :vartype id: str + :ivar name: Resource name + :vartype name: str + :ivar type: Resource type + :vartype type: str + :param location: Required. Resource location + :type location: str + :param tags: Resource tags + :type tags: dict[str, str] + :param source_virtual_machine: The source virtual machine from which Image + is created. + :type source_virtual_machine: + ~azure.mgmt.compute.v2017_12_01.models.SubResource + :param storage_profile: Specifies the storage settings for the virtual + machine disks. + :type storage_profile: + ~azure.mgmt.compute.v2017_12_01.models.ImageStorageProfile + :ivar provisioning_state: The provisioning state. + :vartype provisioning_state: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'source_virtual_machine': {'key': 'properties.sourceVirtualMachine', 'type': 'SubResource'}, + 'storage_profile': {'key': 'properties.storageProfile', 'type': 'ImageStorageProfile'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + } + + def __init__(self, *, location: str, tags=None, source_virtual_machine=None, storage_profile=None, **kwargs) -> None: + super(Image, self).__init__(location=location, tags=tags, **kwargs) + self.source_virtual_machine = source_virtual_machine + self.storage_profile = storage_profile + self.provisioning_state = None + + +class ImageDataDisk(Model): + """Describes a data disk. + + All required parameters must be populated in order to send to Azure. + + :param lun: Required. Specifies the logical unit number of the data disk. + This value is used to identify data disks within the VM and therefore must + be unique for each data disk attached to a VM. + :type lun: int + :param snapshot: The snapshot. + :type snapshot: ~azure.mgmt.compute.v2017_12_01.models.SubResource + :param managed_disk: The managedDisk. + :type managed_disk: ~azure.mgmt.compute.v2017_12_01.models.SubResource + :param blob_uri: The Virtual Hard Disk. + :type blob_uri: str + :param caching: Specifies the caching requirements.

    Possible + values are:

    **None**

    **ReadOnly**

    **ReadWrite** +

    Default: **None for Standard storage. ReadOnly for Premium + storage**. Possible values include: 'None', 'ReadOnly', 'ReadWrite' + :type caching: str or ~azure.mgmt.compute.v2017_12_01.models.CachingTypes + :param disk_size_gb: Specifies the size of empty data disks in gigabytes. + This element can be used to overwrite the name of the disk in a virtual + machine image.

    This value cannot be larger than 1023 GB + :type disk_size_gb: int + :param storage_account_type: Specifies the storage account type for the + managed disk. Possible values are: Standard_LRS or Premium_LRS. Possible + values include: 'Standard_LRS', 'Premium_LRS' + :type storage_account_type: str or + ~azure.mgmt.compute.v2017_12_01.models.StorageAccountTypes + """ + + _validation = { + 'lun': {'required': True}, + } + + _attribute_map = { + 'lun': {'key': 'lun', 'type': 'int'}, + 'snapshot': {'key': 'snapshot', 'type': 'SubResource'}, + 'managed_disk': {'key': 'managedDisk', 'type': 'SubResource'}, + 'blob_uri': {'key': 'blobUri', 'type': 'str'}, + 'caching': {'key': 'caching', 'type': 'CachingTypes'}, + 'disk_size_gb': {'key': 'diskSizeGB', 'type': 'int'}, + 'storage_account_type': {'key': 'storageAccountType', 'type': 'str'}, + } + + def __init__(self, *, lun: int, snapshot=None, managed_disk=None, blob_uri: str=None, caching=None, disk_size_gb: int=None, storage_account_type=None, **kwargs) -> None: + super(ImageDataDisk, self).__init__(**kwargs) + self.lun = lun + self.snapshot = snapshot + self.managed_disk = managed_disk + self.blob_uri = blob_uri + self.caching = caching + self.disk_size_gb = disk_size_gb + self.storage_account_type = storage_account_type + + +class ImageOSDisk(Model): + """Describes an Operating System disk. + + All required parameters must be populated in order to send to Azure. + + :param os_type: Required. This property allows you to specify the type of + the OS that is included in the disk if creating a VM from a custom image. +

    Possible values are:

    **Windows**

    **Linux**. + Possible values include: 'Windows', 'Linux' + :type os_type: str or + ~azure.mgmt.compute.v2017_12_01.models.OperatingSystemTypes + :param os_state: Required. The OS State. Possible values include: + 'Generalized', 'Specialized' + :type os_state: str or + ~azure.mgmt.compute.v2017_12_01.models.OperatingSystemStateTypes + :param snapshot: The snapshot. + :type snapshot: ~azure.mgmt.compute.v2017_12_01.models.SubResource + :param managed_disk: The managedDisk. + :type managed_disk: ~azure.mgmt.compute.v2017_12_01.models.SubResource + :param blob_uri: The Virtual Hard Disk. + :type blob_uri: str + :param caching: Specifies the caching requirements.

    Possible + values are:

    **None**

    **ReadOnly**

    **ReadWrite** +

    Default: **None for Standard storage. ReadOnly for Premium + storage**. Possible values include: 'None', 'ReadOnly', 'ReadWrite' + :type caching: str or ~azure.mgmt.compute.v2017_12_01.models.CachingTypes + :param disk_size_gb: Specifies the size of empty data disks in gigabytes. + This element can be used to overwrite the name of the disk in a virtual + machine image.

    This value cannot be larger than 1023 GB + :type disk_size_gb: int + :param storage_account_type: Specifies the storage account type for the + managed disk. Possible values are: Standard_LRS or Premium_LRS. Possible + values include: 'Standard_LRS', 'Premium_LRS' + :type storage_account_type: str or + ~azure.mgmt.compute.v2017_12_01.models.StorageAccountTypes + """ + + _validation = { + 'os_type': {'required': True}, + 'os_state': {'required': True}, + } + + _attribute_map = { + 'os_type': {'key': 'osType', 'type': 'OperatingSystemTypes'}, + 'os_state': {'key': 'osState', 'type': 'OperatingSystemStateTypes'}, + 'snapshot': {'key': 'snapshot', 'type': 'SubResource'}, + 'managed_disk': {'key': 'managedDisk', 'type': 'SubResource'}, + 'blob_uri': {'key': 'blobUri', 'type': 'str'}, + 'caching': {'key': 'caching', 'type': 'CachingTypes'}, + 'disk_size_gb': {'key': 'diskSizeGB', 'type': 'int'}, + 'storage_account_type': {'key': 'storageAccountType', 'type': 'str'}, + } + + def __init__(self, *, os_type, os_state, snapshot=None, managed_disk=None, blob_uri: str=None, caching=None, disk_size_gb: int=None, storage_account_type=None, **kwargs) -> None: + super(ImageOSDisk, self).__init__(**kwargs) + self.os_type = os_type + self.os_state = os_state + self.snapshot = snapshot + self.managed_disk = managed_disk + self.blob_uri = blob_uri + self.caching = caching + self.disk_size_gb = disk_size_gb + self.storage_account_type = storage_account_type + + +class SubResource(Model): + """SubResource. + + :param id: Resource Id + :type id: str + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + } + + def __init__(self, *, id: str=None, **kwargs) -> None: + super(SubResource, self).__init__(**kwargs) + self.id = id + + +class ImageReference(SubResource): + """Specifies information about the image to use. You can specify information + about platform images, marketplace images, or virtual machine images. This + element is required when you want to use a platform image, marketplace + image, or virtual machine image, but is not used in other creation + operations. + + :param id: Resource Id + :type id: str + :param publisher: The image publisher. + :type publisher: str + :param offer: Specifies the offer of the platform image or marketplace + image used to create the virtual machine. + :type offer: str + :param sku: The image SKU. + :type sku: str + :param version: Specifies the version of the platform image or marketplace + image used to create the virtual machine. The allowed formats are + Major.Minor.Build or 'latest'. Major, Minor, and Build are decimal + numbers. Specify 'latest' to use the latest version of an image available + at deploy time. Even if you use 'latest', the VM image will not + automatically update after deploy time even if a new version becomes + available. + :type version: str + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'publisher': {'key': 'publisher', 'type': 'str'}, + 'offer': {'key': 'offer', 'type': 'str'}, + 'sku': {'key': 'sku', 'type': 'str'}, + 'version': {'key': 'version', 'type': 'str'}, + } + + def __init__(self, *, id: str=None, publisher: str=None, offer: str=None, sku: str=None, version: str=None, **kwargs) -> None: + super(ImageReference, self).__init__(id=id, **kwargs) + self.publisher = publisher + self.offer = offer + self.sku = sku + self.version = version + + +class ImageStorageProfile(Model): + """Describes a storage profile. + + :param os_disk: Specifies information about the operating system disk used + by the virtual machine.

    For more information about disks, see + [About disks and VHDs for Azure virtual + machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-about-disks-vhds?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). + :type os_disk: ~azure.mgmt.compute.v2017_12_01.models.ImageOSDisk + :param data_disks: Specifies the parameters that are used to add a data + disk to a virtual machine.

    For more information about disks, see + [About disks and VHDs for Azure virtual + machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-about-disks-vhds?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). + :type data_disks: + list[~azure.mgmt.compute.v2017_12_01.models.ImageDataDisk] + :param zone_resilient: Specifies whether an image is zone resilient or + not. Default is false. Zone resilient images can be created only in + regions that provide Zone Redundant Storage (ZRS). + :type zone_resilient: bool + """ + + _attribute_map = { + 'os_disk': {'key': 'osDisk', 'type': 'ImageOSDisk'}, + 'data_disks': {'key': 'dataDisks', 'type': '[ImageDataDisk]'}, + 'zone_resilient': {'key': 'zoneResilient', 'type': 'bool'}, + } + + def __init__(self, *, os_disk=None, data_disks=None, zone_resilient: bool=None, **kwargs) -> None: + super(ImageStorageProfile, self).__init__(**kwargs) + self.os_disk = os_disk + self.data_disks = data_disks + self.zone_resilient = zone_resilient + + +class ImageUpdate(UpdateResource): + """The source user image virtual hard disk. Only tags may be updated. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :param tags: Resource tags + :type tags: dict[str, str] + :param source_virtual_machine: The source virtual machine from which Image + is created. + :type source_virtual_machine: + ~azure.mgmt.compute.v2017_12_01.models.SubResource + :param storage_profile: Specifies the storage settings for the virtual + machine disks. + :type storage_profile: + ~azure.mgmt.compute.v2017_12_01.models.ImageStorageProfile + :ivar provisioning_state: The provisioning state. + :vartype provisioning_state: str + """ + + _validation = { + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + 'source_virtual_machine': {'key': 'properties.sourceVirtualMachine', 'type': 'SubResource'}, + 'storage_profile': {'key': 'properties.storageProfile', 'type': 'ImageStorageProfile'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + } + + def __init__(self, *, tags=None, source_virtual_machine=None, storage_profile=None, **kwargs) -> None: + super(ImageUpdate, self).__init__(tags=tags, **kwargs) + self.source_virtual_machine = source_virtual_machine + self.storage_profile = storage_profile + self.provisioning_state = None + + +class InnerError(Model): + """Inner error details. + + :param exceptiontype: The exception type. + :type exceptiontype: str + :param errordetail: The internal error message or exception dump. + :type errordetail: str + """ + + _attribute_map = { + 'exceptiontype': {'key': 'exceptiontype', 'type': 'str'}, + 'errordetail': {'key': 'errordetail', 'type': 'str'}, + } + + def __init__(self, *, exceptiontype: str=None, errordetail: str=None, **kwargs) -> None: + super(InnerError, self).__init__(**kwargs) + self.exceptiontype = exceptiontype + self.errordetail = errordetail + + +class InstanceViewStatus(Model): + """Instance view status. + + :param code: The status code. + :type code: str + :param level: The level code. Possible values include: 'Info', 'Warning', + 'Error' + :type level: str or + ~azure.mgmt.compute.v2017_12_01.models.StatusLevelTypes + :param display_status: The short localizable label for the status. + :type display_status: str + :param message: The detailed status message, including for alerts and + error messages. + :type message: str + :param time: The time of the status. + :type time: datetime + """ + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + 'level': {'key': 'level', 'type': 'StatusLevelTypes'}, + 'display_status': {'key': 'displayStatus', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + 'time': {'key': 'time', 'type': 'iso-8601'}, + } + + def __init__(self, *, code: str=None, level=None, display_status: str=None, message: str=None, time=None, **kwargs) -> None: + super(InstanceViewStatus, self).__init__(**kwargs) + self.code = code + self.level = level + self.display_status = display_status + self.message = message + self.time = time + + +class KeyVaultKeyReference(Model): + """Describes a reference to Key Vault Key. + + All required parameters must be populated in order to send to Azure. + + :param key_url: Required. The URL referencing a key encryption key in Key + Vault. + :type key_url: str + :param source_vault: Required. The relative URL of the Key Vault + containing the key. + :type source_vault: ~azure.mgmt.compute.v2017_12_01.models.SubResource + """ + + _validation = { + 'key_url': {'required': True}, + 'source_vault': {'required': True}, + } + + _attribute_map = { + 'key_url': {'key': 'keyUrl', 'type': 'str'}, + 'source_vault': {'key': 'sourceVault', 'type': 'SubResource'}, + } + + def __init__(self, *, key_url: str, source_vault, **kwargs) -> None: + super(KeyVaultKeyReference, self).__init__(**kwargs) + self.key_url = key_url + self.source_vault = source_vault + + +class KeyVaultSecretReference(Model): + """Describes a reference to Key Vault Secret. + + All required parameters must be populated in order to send to Azure. + + :param secret_url: Required. The URL referencing a secret in a Key Vault. + :type secret_url: str + :param source_vault: Required. The relative URL of the Key Vault + containing the secret. + :type source_vault: ~azure.mgmt.compute.v2017_12_01.models.SubResource + """ + + _validation = { + 'secret_url': {'required': True}, + 'source_vault': {'required': True}, + } + + _attribute_map = { + 'secret_url': {'key': 'secretUrl', 'type': 'str'}, + 'source_vault': {'key': 'sourceVault', 'type': 'SubResource'}, + } + + def __init__(self, *, secret_url: str, source_vault, **kwargs) -> None: + super(KeyVaultSecretReference, self).__init__(**kwargs) + self.secret_url = secret_url + self.source_vault = source_vault + + +class LinuxConfiguration(Model): + """Specifies the Linux operating system settings on the virtual machine. +

    For a list of supported Linux distributions, see [Linux on + Azure-Endorsed + Distributions](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-endorsed-distros?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json) +

    For running non-endorsed distributions, see [Information for + Non-Endorsed + Distributions](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-create-upload-generic?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json). + + :param disable_password_authentication: Specifies whether password + authentication should be disabled. + :type disable_password_authentication: bool + :param ssh: Specifies the ssh key configuration for a Linux OS. + :type ssh: ~azure.mgmt.compute.v2017_12_01.models.SshConfiguration + """ + + _attribute_map = { + 'disable_password_authentication': {'key': 'disablePasswordAuthentication', 'type': 'bool'}, + 'ssh': {'key': 'ssh', 'type': 'SshConfiguration'}, + } + + def __init__(self, *, disable_password_authentication: bool=None, ssh=None, **kwargs) -> None: + super(LinuxConfiguration, self).__init__(**kwargs) + self.disable_password_authentication = disable_password_authentication + self.ssh = ssh + + +class LogAnalyticsInputBase(Model): + """Api input base class for LogAnalytics Api. + + All required parameters must be populated in order to send to Azure. + + :param blob_container_sas_uri: Required. SAS Uri of the logging blob + container to which LogAnalytics Api writes output logs to. + :type blob_container_sas_uri: str + :param from_time: Required. From time of the query + :type from_time: datetime + :param to_time: Required. To time of the query + :type to_time: datetime + :param group_by_throttle_policy: Group query result by Throttle Policy + applied. + :type group_by_throttle_policy: bool + :param group_by_operation_name: Group query result by Operation Name. + :type group_by_operation_name: bool + :param group_by_resource_name: Group query result by Resource Name. + :type group_by_resource_name: bool + """ + + _validation = { + 'blob_container_sas_uri': {'required': True}, + 'from_time': {'required': True}, + 'to_time': {'required': True}, + } + + _attribute_map = { + 'blob_container_sas_uri': {'key': 'blobContainerSasUri', 'type': 'str'}, + 'from_time': {'key': 'fromTime', 'type': 'iso-8601'}, + 'to_time': {'key': 'toTime', 'type': 'iso-8601'}, + 'group_by_throttle_policy': {'key': 'groupByThrottlePolicy', 'type': 'bool'}, + 'group_by_operation_name': {'key': 'groupByOperationName', 'type': 'bool'}, + 'group_by_resource_name': {'key': 'groupByResourceName', 'type': 'bool'}, + } + + def __init__(self, *, blob_container_sas_uri: str, from_time, to_time, group_by_throttle_policy: bool=None, group_by_operation_name: bool=None, group_by_resource_name: bool=None, **kwargs) -> None: + super(LogAnalyticsInputBase, self).__init__(**kwargs) + self.blob_container_sas_uri = blob_container_sas_uri + self.from_time = from_time + self.to_time = to_time + self.group_by_throttle_policy = group_by_throttle_policy + self.group_by_operation_name = group_by_operation_name + self.group_by_resource_name = group_by_resource_name + + +class OperationStatusResponse(Model): + """Operation status response. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar name: Operation ID + :vartype name: str + :ivar status: Operation status + :vartype status: str + :ivar start_time: Start time of the operation + :vartype start_time: datetime + :ivar end_time: End time of the operation + :vartype end_time: datetime + :ivar error: Api error + :vartype error: ~azure.mgmt.compute.v2017_12_01.models.ApiError + """ + + _validation = { + 'name': {'readonly': True}, + 'status': {'readonly': True}, + 'start_time': {'readonly': True}, + 'end_time': {'readonly': True}, + 'error': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'status': {'key': 'status', 'type': 'str'}, + 'start_time': {'key': 'startTime', 'type': 'iso-8601'}, + 'end_time': {'key': 'endTime', 'type': 'iso-8601'}, + 'error': {'key': 'error', 'type': 'ApiError'}, + } + + def __init__(self, **kwargs) -> None: + super(OperationStatusResponse, self).__init__(**kwargs) + self.name = None + self.status = None + self.start_time = None + self.end_time = None + self.error = None + + +class LogAnalyticsOperationResult(OperationStatusResponse): + """LogAnalytics operation status response. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar name: Operation ID + :vartype name: str + :ivar status: Operation status + :vartype status: str + :ivar start_time: Start time of the operation + :vartype start_time: datetime + :ivar end_time: End time of the operation + :vartype end_time: datetime + :ivar error: Api error + :vartype error: ~azure.mgmt.compute.v2017_12_01.models.ApiError + :ivar properties: LogAnalyticsOutput + :vartype properties: + ~azure.mgmt.compute.v2017_12_01.models.LogAnalyticsOutput + """ + + _validation = { + 'name': {'readonly': True}, + 'status': {'readonly': True}, + 'start_time': {'readonly': True}, + 'end_time': {'readonly': True}, + 'error': {'readonly': True}, + 'properties': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'status': {'key': 'status', 'type': 'str'}, + 'start_time': {'key': 'startTime', 'type': 'iso-8601'}, + 'end_time': {'key': 'endTime', 'type': 'iso-8601'}, + 'error': {'key': 'error', 'type': 'ApiError'}, + 'properties': {'key': 'properties', 'type': 'LogAnalyticsOutput'}, + } + + def __init__(self, **kwargs) -> None: + super(LogAnalyticsOperationResult, self).__init__(**kwargs) + self.properties = None + + +class LogAnalyticsOutput(Model): + """LogAnalytics output properties. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar output: Output file Uri path to blob container. + :vartype output: str + """ + + _validation = { + 'output': {'readonly': True}, + } + + _attribute_map = { + 'output': {'key': 'output', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(LogAnalyticsOutput, self).__init__(**kwargs) + self.output = None + + +class MaintenanceRedeployStatus(Model): + """Maintenance Operation Status. + + :param is_customer_initiated_maintenance_allowed: True, if customer is + allowed to perform Maintenance. + :type is_customer_initiated_maintenance_allowed: bool + :param pre_maintenance_window_start_time: Start Time for the Pre + Maintenance Window. + :type pre_maintenance_window_start_time: datetime + :param pre_maintenance_window_end_time: End Time for the Pre Maintenance + Window. + :type pre_maintenance_window_end_time: datetime + :param maintenance_window_start_time: Start Time for the Maintenance + Window. + :type maintenance_window_start_time: datetime + :param maintenance_window_end_time: End Time for the Maintenance Window. + :type maintenance_window_end_time: datetime + :param last_operation_result_code: The Last Maintenance Operation Result + Code. Possible values include: 'None', 'RetryLater', 'MaintenanceAborted', + 'MaintenanceCompleted' + :type last_operation_result_code: str or + ~azure.mgmt.compute.v2017_12_01.models.MaintenanceOperationResultCodeTypes + :param last_operation_message: Message returned for the last Maintenance + Operation. + :type last_operation_message: str + """ + + _attribute_map = { + 'is_customer_initiated_maintenance_allowed': {'key': 'isCustomerInitiatedMaintenanceAllowed', 'type': 'bool'}, + 'pre_maintenance_window_start_time': {'key': 'preMaintenanceWindowStartTime', 'type': 'iso-8601'}, + 'pre_maintenance_window_end_time': {'key': 'preMaintenanceWindowEndTime', 'type': 'iso-8601'}, + 'maintenance_window_start_time': {'key': 'maintenanceWindowStartTime', 'type': 'iso-8601'}, + 'maintenance_window_end_time': {'key': 'maintenanceWindowEndTime', 'type': 'iso-8601'}, + 'last_operation_result_code': {'key': 'lastOperationResultCode', 'type': 'MaintenanceOperationResultCodeTypes'}, + 'last_operation_message': {'key': 'lastOperationMessage', 'type': 'str'}, + } + + def __init__(self, *, is_customer_initiated_maintenance_allowed: bool=None, pre_maintenance_window_start_time=None, pre_maintenance_window_end_time=None, maintenance_window_start_time=None, maintenance_window_end_time=None, last_operation_result_code=None, last_operation_message: str=None, **kwargs) -> None: + super(MaintenanceRedeployStatus, self).__init__(**kwargs) + self.is_customer_initiated_maintenance_allowed = is_customer_initiated_maintenance_allowed + self.pre_maintenance_window_start_time = pre_maintenance_window_start_time + self.pre_maintenance_window_end_time = pre_maintenance_window_end_time + self.maintenance_window_start_time = maintenance_window_start_time + self.maintenance_window_end_time = maintenance_window_end_time + self.last_operation_result_code = last_operation_result_code + self.last_operation_message = last_operation_message + + +class ManagedDiskParameters(SubResource): + """The parameters of a managed disk. + + :param id: Resource Id + :type id: str + :param storage_account_type: Specifies the storage account type for the + managed disk. Possible values are: Standard_LRS or Premium_LRS. Possible + values include: 'Standard_LRS', 'Premium_LRS' + :type storage_account_type: str or + ~azure.mgmt.compute.v2017_12_01.models.StorageAccountTypes + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'storage_account_type': {'key': 'storageAccountType', 'type': 'str'}, + } + + def __init__(self, *, id: str=None, storage_account_type=None, **kwargs) -> None: + super(ManagedDiskParameters, self).__init__(id=id, **kwargs) + self.storage_account_type = storage_account_type + + +class NetworkInterfaceReference(SubResource): + """Describes a network interface reference. + + :param id: Resource Id + :type id: str + :param primary: Specifies the primary network interface in case the + virtual machine has more than 1 network interface. + :type primary: bool + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'primary': {'key': 'properties.primary', 'type': 'bool'}, + } + + def __init__(self, *, id: str=None, primary: bool=None, **kwargs) -> None: + super(NetworkInterfaceReference, self).__init__(id=id, **kwargs) + self.primary = primary + + +class NetworkProfile(Model): + """Specifies the network interfaces of the virtual machine. + + :param network_interfaces: Specifies the list of resource Ids for the + network interfaces associated with the virtual machine. + :type network_interfaces: + list[~azure.mgmt.compute.v2017_12_01.models.NetworkInterfaceReference] + """ + + _attribute_map = { + 'network_interfaces': {'key': 'networkInterfaces', 'type': '[NetworkInterfaceReference]'}, + } + + def __init__(self, *, network_interfaces=None, **kwargs) -> None: + super(NetworkProfile, self).__init__(**kwargs) + self.network_interfaces = network_interfaces + + +class OSDisk(Model): + """Specifies information about the operating system disk used by the virtual + machine.

    For more information about disks, see [About disks and + VHDs for Azure virtual + machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-about-disks-vhds?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). + + All required parameters must be populated in order to send to Azure. + + :param os_type: This property allows you to specify the type of the OS + that is included in the disk if creating a VM from user-image or a + specialized VHD.

    Possible values are:

    **Windows** +

    **Linux**. Possible values include: 'Windows', 'Linux' + :type os_type: str or + ~azure.mgmt.compute.v2017_12_01.models.OperatingSystemTypes + :param encryption_settings: Specifies the encryption settings for the OS + Disk.

    Minimum api-version: 2015-06-15 + :type encryption_settings: + ~azure.mgmt.compute.v2017_12_01.models.DiskEncryptionSettings + :param name: The disk name. + :type name: str + :param vhd: The virtual hard disk. + :type vhd: ~azure.mgmt.compute.v2017_12_01.models.VirtualHardDisk + :param image: The source user image virtual hard disk. The virtual hard + disk will be copied before being attached to the virtual machine. If + SourceImage is provided, the destination virtual hard drive must not + exist. + :type image: ~azure.mgmt.compute.v2017_12_01.models.VirtualHardDisk + :param caching: Specifies the caching requirements.

    Possible + values are:

    **None**

    **ReadOnly**

    **ReadWrite** +

    Default: **None for Standard storage. ReadOnly for Premium + storage**. Possible values include: 'None', 'ReadOnly', 'ReadWrite' + :type caching: str or ~azure.mgmt.compute.v2017_12_01.models.CachingTypes + :param write_accelerator_enabled: Specifies whether writeAccelerator + should be enabled or disabled on the disk. + :type write_accelerator_enabled: bool + :param create_option: Required. Specifies how the virtual machine should + be created.

    Possible values are:

    **Attach** \\u2013 This + value is used when you are using a specialized disk to create the virtual + machine.

    **FromImage** \\u2013 This value is used when you are + using an image to create the virtual machine. If you are using a platform + image, you also use the imageReference element described above. If you are + using a marketplace image, you also use the plan element previously + described. Possible values include: 'FromImage', 'Empty', 'Attach' + :type create_option: str or + ~azure.mgmt.compute.v2017_12_01.models.DiskCreateOptionTypes + :param disk_size_gb: Specifies the size of an empty data disk in + gigabytes. This element can be used to overwrite the size of the disk in a + virtual machine image.

    This value cannot be larger than 1023 GB + :type disk_size_gb: int + :param managed_disk: The managed disk parameters. + :type managed_disk: + ~azure.mgmt.compute.v2017_12_01.models.ManagedDiskParameters + """ + + _validation = { + 'create_option': {'required': True}, + } + + _attribute_map = { + 'os_type': {'key': 'osType', 'type': 'OperatingSystemTypes'}, + 'encryption_settings': {'key': 'encryptionSettings', 'type': 'DiskEncryptionSettings'}, + 'name': {'key': 'name', 'type': 'str'}, + 'vhd': {'key': 'vhd', 'type': 'VirtualHardDisk'}, + 'image': {'key': 'image', 'type': 'VirtualHardDisk'}, + 'caching': {'key': 'caching', 'type': 'CachingTypes'}, + 'write_accelerator_enabled': {'key': 'writeAcceleratorEnabled', 'type': 'bool'}, + 'create_option': {'key': 'createOption', 'type': 'str'}, + 'disk_size_gb': {'key': 'diskSizeGB', 'type': 'int'}, + 'managed_disk': {'key': 'managedDisk', 'type': 'ManagedDiskParameters'}, + } + + def __init__(self, *, create_option, os_type=None, encryption_settings=None, name: str=None, vhd=None, image=None, caching=None, write_accelerator_enabled: bool=None, disk_size_gb: int=None, managed_disk=None, **kwargs) -> None: + super(OSDisk, self).__init__(**kwargs) + self.os_type = os_type + self.encryption_settings = encryption_settings + self.name = name + self.vhd = vhd + self.image = image + self.caching = caching + self.write_accelerator_enabled = write_accelerator_enabled + self.create_option = create_option + self.disk_size_gb = disk_size_gb + self.managed_disk = managed_disk + + +class OSDiskImage(Model): + """Contains the os disk image information. + + All required parameters must be populated in order to send to Azure. + + :param operating_system: Required. The operating system of the + osDiskImage. Possible values include: 'Windows', 'Linux' + :type operating_system: str or + ~azure.mgmt.compute.v2017_12_01.models.OperatingSystemTypes + """ + + _validation = { + 'operating_system': {'required': True}, + } + + _attribute_map = { + 'operating_system': {'key': 'operatingSystem', 'type': 'OperatingSystemTypes'}, + } + + def __init__(self, *, operating_system, **kwargs) -> None: + super(OSDiskImage, self).__init__(**kwargs) + self.operating_system = operating_system + + +class OSProfile(Model): + """Specifies the operating system settings for the virtual machine. + + :param computer_name: Specifies the host OS name of the virtual machine. +

    This name cannot be updated after the VM is created.

    + **Max-length (Windows):** 15 characters

    **Max-length (Linux):** + 64 characters.

    For naming conventions and restrictions see [Azure + infrastructure services implementation + guidelines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-infrastructure-subscription-accounts-guidelines?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json#1-naming-conventions). + :type computer_name: str + :param admin_username: Specifies the name of the administrator account. +

    **Windows-only restriction:** Cannot end in "."

    + **Disallowed values:** "administrator", "admin", "user", "user1", "test", + "user2", "test1", "user3", "admin1", "1", "123", "a", "actuser", "adm", + "admin2", "aspnet", "backup", "console", "david", "guest", "john", + "owner", "root", "server", "sql", "support", "support_388945a0", "sys", + "test2", "test3", "user4", "user5".

    **Minimum-length (Linux):** 1 + character

    **Max-length (Linux):** 64 characters

    + **Max-length (Windows):** 20 characters

  • For root access to + the Linux VM, see [Using root privileges on Linux virtual machines in + Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-use-root-privileges?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json)
  • + For a list of built-in system users on Linux that should not be used in + this field, see [Selecting User Names for Linux on + Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-usernames?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json) + :type admin_username: str + :param admin_password: Specifies the password of the administrator + account.

    **Minimum-length (Windows):** 8 characters

    + **Minimum-length (Linux):** 6 characters

    **Max-length + (Windows):** 123 characters

    **Max-length (Linux):** 72 characters +

    **Complexity requirements:** 3 out of 4 conditions below need to + be fulfilled
    Has lower characters
    Has upper characters
    Has a + digit
    Has a special character (Regex match [\\W_])

    + **Disallowed values:** "abc@123", "P@$$w0rd", "P@ssw0rd", "P@ssword123", + "Pa$$word", "pass@word1", "Password!", "Password1", "Password22", + "iloveyou!"

    For resetting the password, see [How to reset the + Remote Desktop service or its login password in a Windows + VM](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-reset-rdp?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json) +

    For resetting root password, see [Manage users, SSH, and check or + repair disks on Azure Linux VMs using the VMAccess + Extension](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-using-vmaccess-extension?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json#reset-root-password) + :type admin_password: str + :param custom_data: Specifies a base-64 encoded string of custom data. The + base-64 encoded string is decoded to a binary array that is saved as a + file on the Virtual Machine. The maximum length of the binary array is + 65535 bytes.

    For using cloud-init for your VM, see [Using + cloud-init to customize a Linux VM during + creation](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-using-cloud-init?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json) + :type custom_data: str + :param windows_configuration: Specifies Windows operating system settings + on the virtual machine. + :type windows_configuration: + ~azure.mgmt.compute.v2017_12_01.models.WindowsConfiguration + :param linux_configuration: Specifies the Linux operating system settings + on the virtual machine.

    For a list of supported Linux + distributions, see [Linux on Azure-Endorsed + Distributions](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-endorsed-distros?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json) +

    For running non-endorsed distributions, see [Information for + Non-Endorsed + Distributions](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-create-upload-generic?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json). + :type linux_configuration: + ~azure.mgmt.compute.v2017_12_01.models.LinuxConfiguration + :param secrets: Specifies set of certificates that should be installed + onto the virtual machine. + :type secrets: + list[~azure.mgmt.compute.v2017_12_01.models.VaultSecretGroup] + """ + + _attribute_map = { + 'computer_name': {'key': 'computerName', 'type': 'str'}, + 'admin_username': {'key': 'adminUsername', 'type': 'str'}, + 'admin_password': {'key': 'adminPassword', 'type': 'str'}, + 'custom_data': {'key': 'customData', 'type': 'str'}, + 'windows_configuration': {'key': 'windowsConfiguration', 'type': 'WindowsConfiguration'}, + 'linux_configuration': {'key': 'linuxConfiguration', 'type': 'LinuxConfiguration'}, + 'secrets': {'key': 'secrets', 'type': '[VaultSecretGroup]'}, + } + + def __init__(self, *, computer_name: str=None, admin_username: str=None, admin_password: str=None, custom_data: str=None, windows_configuration=None, linux_configuration=None, secrets=None, **kwargs) -> None: + super(OSProfile, self).__init__(**kwargs) + self.computer_name = computer_name + self.admin_username = admin_username + self.admin_password = admin_password + self.custom_data = custom_data + self.windows_configuration = windows_configuration + self.linux_configuration = linux_configuration + self.secrets = secrets + + +class Plan(Model): + """Specifies information about the marketplace image used to create the + virtual machine. This element is only used for marketplace images. Before + you can use a marketplace image from an API, you must enable the image for + programmatic use. In the Azure portal, find the marketplace image that you + want to use and then click **Want to deploy programmatically, Get Started + ->**. Enter any required information and then click **Save**. + + :param name: The plan ID. + :type name: str + :param publisher: The publisher ID. + :type publisher: str + :param product: Specifies the product of the image from the marketplace. + This is the same value as Offer under the imageReference element. + :type product: str + :param promotion_code: The promotion code. + :type promotion_code: str + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'publisher': {'key': 'publisher', 'type': 'str'}, + 'product': {'key': 'product', 'type': 'str'}, + 'promotion_code': {'key': 'promotionCode', 'type': 'str'}, + } + + def __init__(self, *, name: str=None, publisher: str=None, product: str=None, promotion_code: str=None, **kwargs) -> None: + super(Plan, self).__init__(**kwargs) + self.name = name + self.publisher = publisher + self.product = product + self.promotion_code = promotion_code + + +class PurchasePlan(Model): + """Used for establishing the purchase context of any 3rd Party artifact + through MarketPlace. + + All required parameters must be populated in order to send to Azure. + + :param publisher: Required. The publisher ID. + :type publisher: str + :param name: Required. The plan ID. + :type name: str + :param product: Required. Specifies the product of the image from the + marketplace. This is the same value as Offer under the imageReference + element. + :type product: str + """ + + _validation = { + 'publisher': {'required': True}, + 'name': {'required': True}, + 'product': {'required': True}, + } + + _attribute_map = { + 'publisher': {'key': 'publisher', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'product': {'key': 'product', 'type': 'str'}, + } + + def __init__(self, *, publisher: str, name: str, product: str, **kwargs) -> None: + super(PurchasePlan, self).__init__(**kwargs) + self.publisher = publisher + self.name = name + self.product = product + + +class RecoveryWalkResponse(Model): + """Response after calling a manual recovery walk. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar walk_performed: Whether the recovery walk was performed + :vartype walk_performed: bool + :ivar next_platform_update_domain: The next update domain that needs to be + walked. Null means walk spanning all update domains has been completed + :vartype next_platform_update_domain: int + """ + + _validation = { + 'walk_performed': {'readonly': True}, + 'next_platform_update_domain': {'readonly': True}, + } + + _attribute_map = { + 'walk_performed': {'key': 'walkPerformed', 'type': 'bool'}, + 'next_platform_update_domain': {'key': 'nextPlatformUpdateDomain', 'type': 'int'}, + } + + def __init__(self, **kwargs) -> None: + super(RecoveryWalkResponse, self).__init__(**kwargs) + self.walk_performed = None + self.next_platform_update_domain = None + + +class RequestRateByIntervalInput(LogAnalyticsInputBase): + """Api request input for LogAnalytics getRequestRateByInterval Api. + + All required parameters must be populated in order to send to Azure. + + :param blob_container_sas_uri: Required. SAS Uri of the logging blob + container to which LogAnalytics Api writes output logs to. + :type blob_container_sas_uri: str + :param from_time: Required. From time of the query + :type from_time: datetime + :param to_time: Required. To time of the query + :type to_time: datetime + :param group_by_throttle_policy: Group query result by Throttle Policy + applied. + :type group_by_throttle_policy: bool + :param group_by_operation_name: Group query result by Operation Name. + :type group_by_operation_name: bool + :param group_by_resource_name: Group query result by Resource Name. + :type group_by_resource_name: bool + :param interval_length: Required. Interval value in minutes used to create + LogAnalytics call rate logs. Possible values include: 'ThreeMins', + 'FiveMins', 'ThirtyMins', 'SixtyMins' + :type interval_length: str or + ~azure.mgmt.compute.v2017_12_01.models.IntervalInMins + """ + + _validation = { + 'blob_container_sas_uri': {'required': True}, + 'from_time': {'required': True}, + 'to_time': {'required': True}, + 'interval_length': {'required': True}, + } + + _attribute_map = { + 'blob_container_sas_uri': {'key': 'blobContainerSasUri', 'type': 'str'}, + 'from_time': {'key': 'fromTime', 'type': 'iso-8601'}, + 'to_time': {'key': 'toTime', 'type': 'iso-8601'}, + 'group_by_throttle_policy': {'key': 'groupByThrottlePolicy', 'type': 'bool'}, + 'group_by_operation_name': {'key': 'groupByOperationName', 'type': 'bool'}, + 'group_by_resource_name': {'key': 'groupByResourceName', 'type': 'bool'}, + 'interval_length': {'key': 'intervalLength', 'type': 'IntervalInMins'}, + } + + def __init__(self, *, blob_container_sas_uri: str, from_time, to_time, interval_length, group_by_throttle_policy: bool=None, group_by_operation_name: bool=None, group_by_resource_name: bool=None, **kwargs) -> None: + super(RequestRateByIntervalInput, self).__init__(blob_container_sas_uri=blob_container_sas_uri, from_time=from_time, to_time=to_time, group_by_throttle_policy=group_by_throttle_policy, group_by_operation_name=group_by_operation_name, group_by_resource_name=group_by_resource_name, **kwargs) + self.interval_length = interval_length + + +class RollbackStatusInfo(Model): + """Information about rollback on failed VM instances after a OS Upgrade + operation. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar successfully_rolledback_instance_count: The number of instances + which have been successfully rolled back. + :vartype successfully_rolledback_instance_count: int + :ivar failed_rolledback_instance_count: The number of instances which + failed to rollback. + :vartype failed_rolledback_instance_count: int + :ivar rollback_error: Error details if OS rollback failed. + :vartype rollback_error: ~azure.mgmt.compute.v2017_12_01.models.ApiError + """ + + _validation = { + 'successfully_rolledback_instance_count': {'readonly': True}, + 'failed_rolledback_instance_count': {'readonly': True}, + 'rollback_error': {'readonly': True}, + } + + _attribute_map = { + 'successfully_rolledback_instance_count': {'key': 'successfullyRolledbackInstanceCount', 'type': 'int'}, + 'failed_rolledback_instance_count': {'key': 'failedRolledbackInstanceCount', 'type': 'int'}, + 'rollback_error': {'key': 'rollbackError', 'type': 'ApiError'}, + } + + def __init__(self, **kwargs) -> None: + super(RollbackStatusInfo, self).__init__(**kwargs) + self.successfully_rolledback_instance_count = None + self.failed_rolledback_instance_count = None + self.rollback_error = None + + +class RollingUpgradePolicy(Model): + """The configuration parameters used while performing a rolling upgrade. + + :param max_batch_instance_percent: The maximum percent of total virtual + machine instances that will be upgraded simultaneously by the rolling + upgrade in one batch. As this is a maximum, unhealthy instances in + previous or future batches can cause the percentage of instances in a + batch to decrease to ensure higher reliability. The default value for this + parameter is 20%. + :type max_batch_instance_percent: int + :param max_unhealthy_instance_percent: The maximum percentage of the total + virtual machine instances in the scale set that can be simultaneously + unhealthy, either as a result of being upgraded, or by being found in an + unhealthy state by the virtual machine health checks before the rolling + upgrade aborts. This constraint will be checked prior to starting any + batch. The default value for this parameter is 20%. + :type max_unhealthy_instance_percent: int + :param max_unhealthy_upgraded_instance_percent: The maximum percentage of + upgraded virtual machine instances that can be found to be in an unhealthy + state. This check will happen after each batch is upgraded. If this + percentage is ever exceeded, the rolling update aborts. The default value + for this parameter is 20%. + :type max_unhealthy_upgraded_instance_percent: int + :param pause_time_between_batches: The wait time between completing the + update for all virtual machines in one batch and starting the next batch. + The time duration should be specified in ISO 8601 format. The default + value is 0 seconds (PT0S). + :type pause_time_between_batches: str + """ + + _validation = { + 'max_batch_instance_percent': {'maximum': 100, 'minimum': 5}, + 'max_unhealthy_instance_percent': {'maximum': 100, 'minimum': 5}, + 'max_unhealthy_upgraded_instance_percent': {'maximum': 100, 'minimum': 0}, + } + + _attribute_map = { + 'max_batch_instance_percent': {'key': 'maxBatchInstancePercent', 'type': 'int'}, + 'max_unhealthy_instance_percent': {'key': 'maxUnhealthyInstancePercent', 'type': 'int'}, + 'max_unhealthy_upgraded_instance_percent': {'key': 'maxUnhealthyUpgradedInstancePercent', 'type': 'int'}, + 'pause_time_between_batches': {'key': 'pauseTimeBetweenBatches', 'type': 'str'}, + } + + def __init__(self, *, max_batch_instance_percent: int=None, max_unhealthy_instance_percent: int=None, max_unhealthy_upgraded_instance_percent: int=None, pause_time_between_batches: str=None, **kwargs) -> None: + super(RollingUpgradePolicy, self).__init__(**kwargs) + self.max_batch_instance_percent = max_batch_instance_percent + self.max_unhealthy_instance_percent = max_unhealthy_instance_percent + self.max_unhealthy_upgraded_instance_percent = max_unhealthy_upgraded_instance_percent + self.pause_time_between_batches = pause_time_between_batches + + +class RollingUpgradeProgressInfo(Model): + """Information about the number of virtual machine instances in each upgrade + state. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar successful_instance_count: The number of instances that have been + successfully upgraded. + :vartype successful_instance_count: int + :ivar failed_instance_count: The number of instances that have failed to + be upgraded successfully. + :vartype failed_instance_count: int + :ivar in_progress_instance_count: The number of instances that are + currently being upgraded. + :vartype in_progress_instance_count: int + :ivar pending_instance_count: The number of instances that have not yet + begun to be upgraded. + :vartype pending_instance_count: int + """ + + _validation = { + 'successful_instance_count': {'readonly': True}, + 'failed_instance_count': {'readonly': True}, + 'in_progress_instance_count': {'readonly': True}, + 'pending_instance_count': {'readonly': True}, + } + + _attribute_map = { + 'successful_instance_count': {'key': 'successfulInstanceCount', 'type': 'int'}, + 'failed_instance_count': {'key': 'failedInstanceCount', 'type': 'int'}, + 'in_progress_instance_count': {'key': 'inProgressInstanceCount', 'type': 'int'}, + 'pending_instance_count': {'key': 'pendingInstanceCount', 'type': 'int'}, + } + + def __init__(self, **kwargs) -> None: + super(RollingUpgradeProgressInfo, self).__init__(**kwargs) + self.successful_instance_count = None + self.failed_instance_count = None + self.in_progress_instance_count = None + self.pending_instance_count = None + + +class RollingUpgradeRunningStatus(Model): + """Information about the current running state of the overall upgrade. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar code: Code indicating the current status of the upgrade. Possible + values include: 'RollingForward', 'Cancelled', 'Completed', 'Faulted' + :vartype code: str or + ~azure.mgmt.compute.v2017_12_01.models.RollingUpgradeStatusCode + :ivar start_time: Start time of the upgrade. + :vartype start_time: datetime + :ivar last_action: The last action performed on the rolling upgrade. + Possible values include: 'Start', 'Cancel' + :vartype last_action: str or + ~azure.mgmt.compute.v2017_12_01.models.RollingUpgradeActionType + :ivar last_action_time: Last action time of the upgrade. + :vartype last_action_time: datetime + """ + + _validation = { + 'code': {'readonly': True}, + 'start_time': {'readonly': True}, + 'last_action': {'readonly': True}, + 'last_action_time': {'readonly': True}, + } + + _attribute_map = { + 'code': {'key': 'code', 'type': 'RollingUpgradeStatusCode'}, + 'start_time': {'key': 'startTime', 'type': 'iso-8601'}, + 'last_action': {'key': 'lastAction', 'type': 'RollingUpgradeActionType'}, + 'last_action_time': {'key': 'lastActionTime', 'type': 'iso-8601'}, + } + + def __init__(self, **kwargs) -> None: + super(RollingUpgradeRunningStatus, self).__init__(**kwargs) + self.code = None + self.start_time = None + self.last_action = None + self.last_action_time = None + + +class RollingUpgradeStatusInfo(Resource): + """The status of the latest virtual machine scale set rolling upgrade. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource Id + :vartype id: str + :ivar name: Resource name + :vartype name: str + :ivar type: Resource type + :vartype type: str + :param location: Required. Resource location + :type location: str + :param tags: Resource tags + :type tags: dict[str, str] + :ivar policy: The rolling upgrade policies applied for this upgrade. + :vartype policy: + ~azure.mgmt.compute.v2017_12_01.models.RollingUpgradePolicy + :ivar running_status: Information about the current running state of the + overall upgrade. + :vartype running_status: + ~azure.mgmt.compute.v2017_12_01.models.RollingUpgradeRunningStatus + :ivar progress: Information about the number of virtual machine instances + in each upgrade state. + :vartype progress: + ~azure.mgmt.compute.v2017_12_01.models.RollingUpgradeProgressInfo + :ivar error: Error details for this upgrade, if there are any. + :vartype error: ~azure.mgmt.compute.v2017_12_01.models.ApiError + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + 'policy': {'readonly': True}, + 'running_status': {'readonly': True}, + 'progress': {'readonly': True}, + 'error': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'policy': {'key': 'properties.policy', 'type': 'RollingUpgradePolicy'}, + 'running_status': {'key': 'properties.runningStatus', 'type': 'RollingUpgradeRunningStatus'}, + 'progress': {'key': 'properties.progress', 'type': 'RollingUpgradeProgressInfo'}, + 'error': {'key': 'properties.error', 'type': 'ApiError'}, + } + + def __init__(self, *, location: str, tags=None, **kwargs) -> None: + super(RollingUpgradeStatusInfo, self).__init__(location=location, tags=tags, **kwargs) + self.policy = None + self.running_status = None + self.progress = None + self.error = None + + +class RunCommandDocumentBase(Model): + """Describes the properties of a Run Command metadata. + + All required parameters must be populated in order to send to Azure. + + :param schema: Required. The VM run command schema. + :type schema: str + :param id: Required. The VM run command id. + :type id: str + :param os_type: Required. The Operating System type. Possible values + include: 'Windows', 'Linux' + :type os_type: str or + ~azure.mgmt.compute.v2017_12_01.models.OperatingSystemTypes + :param label: Required. The VM run command label. + :type label: str + :param description: Required. The VM run command description. + :type description: str + """ + + _validation = { + 'schema': {'required': True}, + 'id': {'required': True}, + 'os_type': {'required': True}, + 'label': {'required': True}, + 'description': {'required': True}, + } + + _attribute_map = { + 'schema': {'key': '$schema', 'type': 'str'}, + 'id': {'key': 'id', 'type': 'str'}, + 'os_type': {'key': 'osType', 'type': 'OperatingSystemTypes'}, + 'label': {'key': 'label', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + } + + def __init__(self, *, schema: str, id: str, os_type, label: str, description: str, **kwargs) -> None: + super(RunCommandDocumentBase, self).__init__(**kwargs) + self.schema = schema + self.id = id + self.os_type = os_type + self.label = label + self.description = description + + +class RunCommandDocument(RunCommandDocumentBase): + """Describes the properties of a Run Command. + + All required parameters must be populated in order to send to Azure. + + :param schema: Required. The VM run command schema. + :type schema: str + :param id: Required. The VM run command id. + :type id: str + :param os_type: Required. The Operating System type. Possible values + include: 'Windows', 'Linux' + :type os_type: str or + ~azure.mgmt.compute.v2017_12_01.models.OperatingSystemTypes + :param label: Required. The VM run command label. + :type label: str + :param description: Required. The VM run command description. + :type description: str + :param script: Required. The script to be executed. + :type script: list[str] + :param parameters: The parameters used by the script. + :type parameters: + list[~azure.mgmt.compute.v2017_12_01.models.RunCommandParameterDefinition] + """ + + _validation = { + 'schema': {'required': True}, + 'id': {'required': True}, + 'os_type': {'required': True}, + 'label': {'required': True}, + 'description': {'required': True}, + 'script': {'required': True}, + } + + _attribute_map = { + 'schema': {'key': '$schema', 'type': 'str'}, + 'id': {'key': 'id', 'type': 'str'}, + 'os_type': {'key': 'osType', 'type': 'OperatingSystemTypes'}, + 'label': {'key': 'label', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + 'script': {'key': 'script', 'type': '[str]'}, + 'parameters': {'key': 'parameters', 'type': '[RunCommandParameterDefinition]'}, + } + + def __init__(self, *, schema: str, id: str, os_type, label: str, description: str, script, parameters=None, **kwargs) -> None: + super(RunCommandDocument, self).__init__(schema=schema, id=id, os_type=os_type, label=label, description=description, **kwargs) + self.script = script + self.parameters = parameters + + +class RunCommandInput(Model): + """Capture Virtual Machine parameters. + + All required parameters must be populated in order to send to Azure. + + :param command_id: Required. The run command id. + :type command_id: str + :param script: Optional. The script to be executed. When this value is + given, the given script will override the default script of the command. + :type script: list[str] + :param parameters: The run command parameters. + :type parameters: + list[~azure.mgmt.compute.v2017_12_01.models.RunCommandInputParameter] + """ + + _validation = { + 'command_id': {'required': True}, + } + + _attribute_map = { + 'command_id': {'key': 'commandId', 'type': 'str'}, + 'script': {'key': 'script', 'type': '[str]'}, + 'parameters': {'key': 'parameters', 'type': '[RunCommandInputParameter]'}, + } + + def __init__(self, *, command_id: str, script=None, parameters=None, **kwargs) -> None: + super(RunCommandInput, self).__init__(**kwargs) + self.command_id = command_id + self.script = script + self.parameters = parameters + + +class RunCommandInputParameter(Model): + """Describes the properties of a run command parameter. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. The run command parameter name. + :type name: str + :param value: Required. The run command parameter value. + :type value: str + """ + + _validation = { + 'name': {'required': True}, + 'value': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'value': {'key': 'value', 'type': 'str'}, + } + + def __init__(self, *, name: str, value: str, **kwargs) -> None: + super(RunCommandInputParameter, self).__init__(**kwargs) + self.name = name + self.value = value + + +class RunCommandParameterDefinition(Model): + """Describes the properties of a run command parameter. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. The run command parameter name. + :type name: str + :param type: Required. The run command parameter type. + :type type: str + :param default_value: The run command parameter default value. + :type default_value: str + :param required: The run command parameter required. Default value: False + . + :type required: bool + """ + + _validation = { + 'name': {'required': True}, + 'type': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'default_value': {'key': 'defaultValue', 'type': 'str'}, + 'required': {'key': 'required', 'type': 'bool'}, + } + + def __init__(self, *, name: str, type: str, default_value: str=None, required: bool=False, **kwargs) -> None: + super(RunCommandParameterDefinition, self).__init__(**kwargs) + self.name = name + self.type = type + self.default_value = default_value + self.required = required + + +class RunCommandResult(OperationStatusResponse): + """Run command operation response. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar name: Operation ID + :vartype name: str + :ivar status: Operation status + :vartype status: str + :ivar start_time: Start time of the operation + :vartype start_time: datetime + :ivar end_time: End time of the operation + :vartype end_time: datetime + :ivar error: Api error + :vartype error: ~azure.mgmt.compute.v2017_12_01.models.ApiError + :param output: Operation output data (raw JSON) + :type output: object + """ + + _validation = { + 'name': {'readonly': True}, + 'status': {'readonly': True}, + 'start_time': {'readonly': True}, + 'end_time': {'readonly': True}, + 'error': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'status': {'key': 'status', 'type': 'str'}, + 'start_time': {'key': 'startTime', 'type': 'iso-8601'}, + 'end_time': {'key': 'endTime', 'type': 'iso-8601'}, + 'error': {'key': 'error', 'type': 'ApiError'}, + 'output': {'key': 'properties.output', 'type': 'object'}, + } + + def __init__(self, *, output=None, **kwargs) -> None: + super(RunCommandResult, self).__init__(**kwargs) + self.output = output + + +class Sku(Model): + """Describes a virtual machine scale set sku. + + :param name: The sku name. + :type name: str + :param tier: Specifies the tier of virtual machines in a scale set.

    Possible Values:

    **Standard**

    **Basic** + :type tier: str + :param capacity: Specifies the number of virtual machines in the scale + set. + :type capacity: long + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'tier': {'key': 'tier', 'type': 'str'}, + 'capacity': {'key': 'capacity', 'type': 'long'}, + } + + def __init__(self, *, name: str=None, tier: str=None, capacity: int=None, **kwargs) -> None: + super(Sku, self).__init__(**kwargs) + self.name = name + self.tier = tier + self.capacity = capacity + + +class SshConfiguration(Model): + """SSH configuration for Linux based VMs running on Azure. + + :param public_keys: The list of SSH public keys used to authenticate with + linux based VMs. + :type public_keys: + list[~azure.mgmt.compute.v2017_12_01.models.SshPublicKey] + """ + + _attribute_map = { + 'public_keys': {'key': 'publicKeys', 'type': '[SshPublicKey]'}, + } + + def __init__(self, *, public_keys=None, **kwargs) -> None: + super(SshConfiguration, self).__init__(**kwargs) + self.public_keys = public_keys + + +class SshPublicKey(Model): + """Contains information about SSH certificate public key and the path on the + Linux VM where the public key is placed. + + :param path: Specifies the full path on the created VM where ssh public + key is stored. If the file already exists, the specified key is appended + to the file. Example: /home/user/.ssh/authorized_keys + :type path: str + :param key_data: SSH public key certificate used to authenticate with the + VM through ssh. The key needs to be at least 2048-bit and in ssh-rsa + format.

    For creating ssh keys, see [Create SSH keys on Linux and + Mac for Linux VMs in + Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-mac-create-ssh-keys?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json). + :type key_data: str + """ + + _attribute_map = { + 'path': {'key': 'path', 'type': 'str'}, + 'key_data': {'key': 'keyData', 'type': 'str'}, + } + + def __init__(self, *, path: str=None, key_data: str=None, **kwargs) -> None: + super(SshPublicKey, self).__init__(**kwargs) + self.path = path + self.key_data = key_data + + +class StorageProfile(Model): + """Specifies the storage settings for the virtual machine disks. + + :param image_reference: Specifies information about the image to use. You + can specify information about platform images, marketplace images, or + virtual machine images. This element is required when you want to use a + platform image, marketplace image, or virtual machine image, but is not + used in other creation operations. + :type image_reference: + ~azure.mgmt.compute.v2017_12_01.models.ImageReference + :param os_disk: Specifies information about the operating system disk used + by the virtual machine.

    For more information about disks, see + [About disks and VHDs for Azure virtual + machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-about-disks-vhds?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). + :type os_disk: ~azure.mgmt.compute.v2017_12_01.models.OSDisk + :param data_disks: Specifies the parameters that are used to add a data + disk to a virtual machine.

    For more information about disks, see + [About disks and VHDs for Azure virtual + machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-about-disks-vhds?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). + :type data_disks: list[~azure.mgmt.compute.v2017_12_01.models.DataDisk] + """ + + _attribute_map = { + 'image_reference': {'key': 'imageReference', 'type': 'ImageReference'}, + 'os_disk': {'key': 'osDisk', 'type': 'OSDisk'}, + 'data_disks': {'key': 'dataDisks', 'type': '[DataDisk]'}, + } + + def __init__(self, *, image_reference=None, os_disk=None, data_disks=None, **kwargs) -> None: + super(StorageProfile, self).__init__(**kwargs) + self.image_reference = image_reference + self.os_disk = os_disk + self.data_disks = data_disks + + +class SubResourceReadOnly(Model): + """SubResourceReadOnly. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource Id + :vartype id: str + """ + + _validation = { + 'id': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(SubResourceReadOnly, self).__init__(**kwargs) + self.id = None + + +class ThrottledRequestsInput(LogAnalyticsInputBase): + """Api request input for LogAnalytics getThrottledRequests Api. + + All required parameters must be populated in order to send to Azure. + + :param blob_container_sas_uri: Required. SAS Uri of the logging blob + container to which LogAnalytics Api writes output logs to. + :type blob_container_sas_uri: str + :param from_time: Required. From time of the query + :type from_time: datetime + :param to_time: Required. To time of the query + :type to_time: datetime + :param group_by_throttle_policy: Group query result by Throttle Policy + applied. + :type group_by_throttle_policy: bool + :param group_by_operation_name: Group query result by Operation Name. + :type group_by_operation_name: bool + :param group_by_resource_name: Group query result by Resource Name. + :type group_by_resource_name: bool + """ + + _validation = { + 'blob_container_sas_uri': {'required': True}, + 'from_time': {'required': True}, + 'to_time': {'required': True}, + } + + _attribute_map = { + 'blob_container_sas_uri': {'key': 'blobContainerSasUri', 'type': 'str'}, + 'from_time': {'key': 'fromTime', 'type': 'iso-8601'}, + 'to_time': {'key': 'toTime', 'type': 'iso-8601'}, + 'group_by_throttle_policy': {'key': 'groupByThrottlePolicy', 'type': 'bool'}, + 'group_by_operation_name': {'key': 'groupByOperationName', 'type': 'bool'}, + 'group_by_resource_name': {'key': 'groupByResourceName', 'type': 'bool'}, + } + + def __init__(self, *, blob_container_sas_uri: str, from_time, to_time, group_by_throttle_policy: bool=None, group_by_operation_name: bool=None, group_by_resource_name: bool=None, **kwargs) -> None: + super(ThrottledRequestsInput, self).__init__(blob_container_sas_uri=blob_container_sas_uri, from_time=from_time, to_time=to_time, group_by_throttle_policy=group_by_throttle_policy, group_by_operation_name=group_by_operation_name, group_by_resource_name=group_by_resource_name, **kwargs) + + +class UpgradeOperationHistoricalStatusInfo(Model): + """Virtual Machine Scale Set OS Upgrade History operation response. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar properties: Information about the properties of the upgrade + operation. + :vartype properties: + ~azure.mgmt.compute.v2017_12_01.models.UpgradeOperationHistoricalStatusInfoProperties + :ivar type: Resource type + :vartype type: str + :ivar location: Resource location + :vartype location: str + """ + + _validation = { + 'properties': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'readonly': True}, + } + + _attribute_map = { + 'properties': {'key': 'properties', 'type': 'UpgradeOperationHistoricalStatusInfoProperties'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(UpgradeOperationHistoricalStatusInfo, self).__init__(**kwargs) + self.properties = None + self.type = None + self.location = None + + +class UpgradeOperationHistoricalStatusInfoProperties(Model): + """Describes each OS upgrade on the Virtual Machine Scale Set. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar running_status: Information about the overall status of the upgrade + operation. + :vartype running_status: + ~azure.mgmt.compute.v2017_12_01.models.UpgradeOperationHistoryStatus + :ivar progress: Counts of the VMs in each state. + :vartype progress: + ~azure.mgmt.compute.v2017_12_01.models.RollingUpgradeProgressInfo + :ivar error: Error Details for this upgrade if there are any. + :vartype error: ~azure.mgmt.compute.v2017_12_01.models.ApiError + :ivar started_by: Invoker of the Upgrade Operation. Possible values + include: 'Unknown', 'User', 'Platform' + :vartype started_by: str or + ~azure.mgmt.compute.v2017_12_01.models.UpgradeOperationInvoker + :ivar target_image_reference: Image Reference details + :vartype target_image_reference: + ~azure.mgmt.compute.v2017_12_01.models.ImageReference + :ivar rollback_info: Information about OS rollback if performed + :vartype rollback_info: + ~azure.mgmt.compute.v2017_12_01.models.RollbackStatusInfo + """ + + _validation = { + 'running_status': {'readonly': True}, + 'progress': {'readonly': True}, + 'error': {'readonly': True}, + 'started_by': {'readonly': True}, + 'target_image_reference': {'readonly': True}, + 'rollback_info': {'readonly': True}, + } + + _attribute_map = { + 'running_status': {'key': 'runningStatus', 'type': 'UpgradeOperationHistoryStatus'}, + 'progress': {'key': 'progress', 'type': 'RollingUpgradeProgressInfo'}, + 'error': {'key': 'error', 'type': 'ApiError'}, + 'started_by': {'key': 'startedBy', 'type': 'UpgradeOperationInvoker'}, + 'target_image_reference': {'key': 'targetImageReference', 'type': 'ImageReference'}, + 'rollback_info': {'key': 'rollbackInfo', 'type': 'RollbackStatusInfo'}, + } + + def __init__(self, **kwargs) -> None: + super(UpgradeOperationHistoricalStatusInfoProperties, self).__init__(**kwargs) + self.running_status = None + self.progress = None + self.error = None + self.started_by = None + self.target_image_reference = None + self.rollback_info = None + + +class UpgradeOperationHistoryStatus(Model): + """Information about the current running state of the overall upgrade. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar code: Code indicating the current status of the upgrade. Possible + values include: 'RollingForward', 'Cancelled', 'Completed', 'Faulted' + :vartype code: str or ~azure.mgmt.compute.v2017_12_01.models.UpgradeState + :ivar start_time: Start time of the upgrade. + :vartype start_time: datetime + :ivar end_time: End time of the upgrade. + :vartype end_time: datetime + """ + + _validation = { + 'code': {'readonly': True}, + 'start_time': {'readonly': True}, + 'end_time': {'readonly': True}, + } + + _attribute_map = { + 'code': {'key': 'code', 'type': 'UpgradeState'}, + 'start_time': {'key': 'startTime', 'type': 'iso-8601'}, + 'end_time': {'key': 'endTime', 'type': 'iso-8601'}, + } + + def __init__(self, **kwargs) -> None: + super(UpgradeOperationHistoryStatus, self).__init__(**kwargs) + self.code = None + self.start_time = None + self.end_time = None + + +class UpgradePolicy(Model): + """Describes an upgrade policy - automatic, manual, or rolling. + + :param mode: Specifies the mode of an upgrade to virtual machines in the + scale set.

    Possible values are:

    **Manual** - You + control the application of updates to virtual machines in the scale set. + You do this by using the manualUpgrade action.

    **Automatic** - + All virtual machines in the scale set are automatically updated at the + same time. Possible values include: 'Automatic', 'Manual', 'Rolling' + :type mode: str or ~azure.mgmt.compute.v2017_12_01.models.UpgradeMode + :param rolling_upgrade_policy: The configuration parameters used while + performing a rolling upgrade. + :type rolling_upgrade_policy: + ~azure.mgmt.compute.v2017_12_01.models.RollingUpgradePolicy + :param automatic_os_upgrade: Whether OS upgrades should automatically be + applied to scale set instances in a rolling fashion when a newer version + of the image becomes available. + :type automatic_os_upgrade: bool + :param auto_os_upgrade_policy: Configuration parameters used for + performing automatic OS Upgrade. + :type auto_os_upgrade_policy: + ~azure.mgmt.compute.v2017_12_01.models.AutoOSUpgradePolicy + """ + + _attribute_map = { + 'mode': {'key': 'mode', 'type': 'UpgradeMode'}, + 'rolling_upgrade_policy': {'key': 'rollingUpgradePolicy', 'type': 'RollingUpgradePolicy'}, + 'automatic_os_upgrade': {'key': 'automaticOSUpgrade', 'type': 'bool'}, + 'auto_os_upgrade_policy': {'key': 'autoOSUpgradePolicy', 'type': 'AutoOSUpgradePolicy'}, + } + + def __init__(self, *, mode=None, rolling_upgrade_policy=None, automatic_os_upgrade: bool=None, auto_os_upgrade_policy=None, **kwargs) -> None: + super(UpgradePolicy, self).__init__(**kwargs) + self.mode = mode + self.rolling_upgrade_policy = rolling_upgrade_policy + self.automatic_os_upgrade = automatic_os_upgrade + self.auto_os_upgrade_policy = auto_os_upgrade_policy + + +class Usage(Model): + """Describes Compute Resource Usage. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar unit: Required. An enum describing the unit of usage measurement. + Default value: "Count" . + :vartype unit: str + :param current_value: Required. The current usage of the resource. + :type current_value: int + :param limit: Required. The maximum permitted usage of the resource. + :type limit: long + :param name: Required. The name of the type of usage. + :type name: ~azure.mgmt.compute.v2017_12_01.models.UsageName + """ + + _validation = { + 'unit': {'required': True, 'constant': True}, + 'current_value': {'required': True}, + 'limit': {'required': True}, + 'name': {'required': True}, + } + + _attribute_map = { + 'unit': {'key': 'unit', 'type': 'str'}, + 'current_value': {'key': 'currentValue', 'type': 'int'}, + 'limit': {'key': 'limit', 'type': 'long'}, + 'name': {'key': 'name', 'type': 'UsageName'}, + } + + unit = "Count" + + def __init__(self, *, current_value: int, limit: int, name, **kwargs) -> None: + super(Usage, self).__init__(**kwargs) + self.current_value = current_value + self.limit = limit + self.name = name + + +class UsageName(Model): + """The Usage Names. + + :param value: The name of the resource. + :type value: str + :param localized_value: The localized name of the resource. + :type localized_value: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': 'str'}, + 'localized_value': {'key': 'localizedValue', 'type': 'str'}, + } + + def __init__(self, *, value: str=None, localized_value: str=None, **kwargs) -> None: + super(UsageName, self).__init__(**kwargs) + self.value = value + self.localized_value = localized_value + + +class VaultCertificate(Model): + """Describes a single certificate reference in a Key Vault, and where the + certificate should reside on the VM. + + :param certificate_url: This is the URL of a certificate that has been + uploaded to Key Vault as a secret. For adding a secret to the Key Vault, + see [Add a key or secret to the key + vault](https://docs.microsoft.com/azure/key-vault/key-vault-get-started/#add). + In this case, your certificate needs to be It is the Base64 encoding of + the following JSON Object which is encoded in UTF-8:

    {
    + "data":"",
    "dataType":"pfx",
    + "password":""
    } + :type certificate_url: str + :param certificate_store: For Windows VMs, specifies the certificate store + on the Virtual Machine to which the certificate should be added. The + specified certificate store is implicitly in the LocalMachine account. +

    For Linux VMs, the certificate file is placed under the + /var/lib/waagent directory, with the file name + <UppercaseThumbprint>.crt for the X509 certificate file and + <UppercaseThumbprint>.prv for private key. Both of these files are + .pem formatted. + :type certificate_store: str + """ + + _attribute_map = { + 'certificate_url': {'key': 'certificateUrl', 'type': 'str'}, + 'certificate_store': {'key': 'certificateStore', 'type': 'str'}, + } + + def __init__(self, *, certificate_url: str=None, certificate_store: str=None, **kwargs) -> None: + super(VaultCertificate, self).__init__(**kwargs) + self.certificate_url = certificate_url + self.certificate_store = certificate_store + + +class VaultSecretGroup(Model): + """Describes a set of certificates which are all in the same Key Vault. + + :param source_vault: The relative URL of the Key Vault containing all of + the certificates in VaultCertificates. + :type source_vault: ~azure.mgmt.compute.v2017_12_01.models.SubResource + :param vault_certificates: The list of key vault references in SourceVault + which contain certificates. + :type vault_certificates: + list[~azure.mgmt.compute.v2017_12_01.models.VaultCertificate] + """ + + _attribute_map = { + 'source_vault': {'key': 'sourceVault', 'type': 'SubResource'}, + 'vault_certificates': {'key': 'vaultCertificates', 'type': '[VaultCertificate]'}, + } + + def __init__(self, *, source_vault=None, vault_certificates=None, **kwargs) -> None: + super(VaultSecretGroup, self).__init__(**kwargs) + self.source_vault = source_vault + self.vault_certificates = vault_certificates + + +class VirtualHardDisk(Model): + """Describes the uri of a disk. + + :param uri: Specifies the virtual hard disk's uri. + :type uri: str + """ + + _attribute_map = { + 'uri': {'key': 'uri', 'type': 'str'}, + } + + def __init__(self, *, uri: str=None, **kwargs) -> None: + super(VirtualHardDisk, self).__init__(**kwargs) + self.uri = uri + + +class VirtualMachine(Resource): + """Describes a Virtual Machine. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource Id + :vartype id: str + :ivar name: Resource name + :vartype name: str + :ivar type: Resource type + :vartype type: str + :param location: Required. Resource location + :type location: str + :param tags: Resource tags + :type tags: dict[str, str] + :param plan: Specifies information about the marketplace image used to + create the virtual machine. This element is only used for marketplace + images. Before you can use a marketplace image from an API, you must + enable the image for programmatic use. In the Azure portal, find the + marketplace image that you want to use and then click **Want to deploy + programmatically, Get Started ->**. Enter any required information and + then click **Save**. + :type plan: ~azure.mgmt.compute.v2017_12_01.models.Plan + :param hardware_profile: Specifies the hardware settings for the virtual + machine. + :type hardware_profile: + ~azure.mgmt.compute.v2017_12_01.models.HardwareProfile + :param storage_profile: Specifies the storage settings for the virtual + machine disks. + :type storage_profile: + ~azure.mgmt.compute.v2017_12_01.models.StorageProfile + :param os_profile: Specifies the operating system settings for the virtual + machine. + :type os_profile: ~azure.mgmt.compute.v2017_12_01.models.OSProfile + :param network_profile: Specifies the network interfaces of the virtual + machine. + :type network_profile: + ~azure.mgmt.compute.v2017_12_01.models.NetworkProfile + :param diagnostics_profile: Specifies the boot diagnostic settings state. +

    Minimum api-version: 2015-06-15. + :type diagnostics_profile: + ~azure.mgmt.compute.v2017_12_01.models.DiagnosticsProfile + :param availability_set: Specifies information about the availability set + that the virtual machine should be assigned to. Virtual machines specified + in the same availability set are allocated to different nodes to maximize + availability. For more information about availability sets, see [Manage + the availability of virtual + machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-manage-availability?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). +

    For more information on Azure planned maintenance, see [Planned + maintenance for virtual machines in + Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-planned-maintenance?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json) +

    Currently, a VM can only be added to availability set at creation + time. An existing VM cannot be added to an availability set. + :type availability_set: ~azure.mgmt.compute.v2017_12_01.models.SubResource + :ivar provisioning_state: The provisioning state, which only appears in + the response. + :vartype provisioning_state: str + :ivar instance_view: The virtual machine instance view. + :vartype instance_view: + ~azure.mgmt.compute.v2017_12_01.models.VirtualMachineInstanceView + :param license_type: Specifies that the image or disk that is being used + was licensed on-premises. This element is only used for images that + contain the Windows Server operating system.

    Possible values are: +

    Windows_Client

    Windows_Server

    If this element + is included in a request for an update, the value must match the initial + value. This value cannot be updated.

    For more information, see + [Azure Hybrid Use Benefit for Windows + Server](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-hybrid-use-benefit-licensing?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json) +

    Minimum api-version: 2015-06-15 + :type license_type: str + :ivar vm_id: Specifies the VM unique ID which is a 128-bits identifier + that is encoded and stored in all Azure IaaS VMs SMBIOS and can be read + using platform BIOS commands. + :vartype vm_id: str + :ivar resources: The virtual machine child extension resources. + :vartype resources: + list[~azure.mgmt.compute.v2017_12_01.models.VirtualMachineExtension] + :param identity: The identity of the virtual machine, if configured. + :type identity: + ~azure.mgmt.compute.v2017_12_01.models.VirtualMachineIdentity + :param zones: The virtual machine zones. + :type zones: list[str] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + 'provisioning_state': {'readonly': True}, + 'instance_view': {'readonly': True}, + 'vm_id': {'readonly': True}, + 'resources': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'plan': {'key': 'plan', 'type': 'Plan'}, + 'hardware_profile': {'key': 'properties.hardwareProfile', 'type': 'HardwareProfile'}, + 'storage_profile': {'key': 'properties.storageProfile', 'type': 'StorageProfile'}, + 'os_profile': {'key': 'properties.osProfile', 'type': 'OSProfile'}, + 'network_profile': {'key': 'properties.networkProfile', 'type': 'NetworkProfile'}, + 'diagnostics_profile': {'key': 'properties.diagnosticsProfile', 'type': 'DiagnosticsProfile'}, + 'availability_set': {'key': 'properties.availabilitySet', 'type': 'SubResource'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'instance_view': {'key': 'properties.instanceView', 'type': 'VirtualMachineInstanceView'}, + 'license_type': {'key': 'properties.licenseType', 'type': 'str'}, + 'vm_id': {'key': 'properties.vmId', 'type': 'str'}, + 'resources': {'key': 'resources', 'type': '[VirtualMachineExtension]'}, + 'identity': {'key': 'identity', 'type': 'VirtualMachineIdentity'}, + 'zones': {'key': 'zones', 'type': '[str]'}, + } + + def __init__(self, *, location: str, tags=None, plan=None, hardware_profile=None, storage_profile=None, os_profile=None, network_profile=None, diagnostics_profile=None, availability_set=None, license_type: str=None, identity=None, zones=None, **kwargs) -> None: + super(VirtualMachine, self).__init__(location=location, tags=tags, **kwargs) + self.plan = plan + self.hardware_profile = hardware_profile + self.storage_profile = storage_profile + self.os_profile = os_profile + self.network_profile = network_profile + self.diagnostics_profile = diagnostics_profile + self.availability_set = availability_set + self.provisioning_state = None + self.instance_view = None + self.license_type = license_type + self.vm_id = None + self.resources = None + self.identity = identity + self.zones = zones + + +class VirtualMachineAgentInstanceView(Model): + """The instance view of the VM Agent running on the virtual machine. + + :param vm_agent_version: The VM Agent full version. + :type vm_agent_version: str + :param extension_handlers: The virtual machine extension handler instance + view. + :type extension_handlers: + list[~azure.mgmt.compute.v2017_12_01.models.VirtualMachineExtensionHandlerInstanceView] + :param statuses: The resource status information. + :type statuses: + list[~azure.mgmt.compute.v2017_12_01.models.InstanceViewStatus] + """ + + _attribute_map = { + 'vm_agent_version': {'key': 'vmAgentVersion', 'type': 'str'}, + 'extension_handlers': {'key': 'extensionHandlers', 'type': '[VirtualMachineExtensionHandlerInstanceView]'}, + 'statuses': {'key': 'statuses', 'type': '[InstanceViewStatus]'}, + } + + def __init__(self, *, vm_agent_version: str=None, extension_handlers=None, statuses=None, **kwargs) -> None: + super(VirtualMachineAgentInstanceView, self).__init__(**kwargs) + self.vm_agent_version = vm_agent_version + self.extension_handlers = extension_handlers + self.statuses = statuses + + +class VirtualMachineCaptureParameters(Model): + """Capture Virtual Machine parameters. + + All required parameters must be populated in order to send to Azure. + + :param vhd_prefix: Required. The captured virtual hard disk's name prefix. + :type vhd_prefix: str + :param destination_container_name: Required. The destination container + name. + :type destination_container_name: str + :param overwrite_vhds: Required. Specifies whether to overwrite the + destination virtual hard disk, in case of conflict. + :type overwrite_vhds: bool + """ + + _validation = { + 'vhd_prefix': {'required': True}, + 'destination_container_name': {'required': True}, + 'overwrite_vhds': {'required': True}, + } + + _attribute_map = { + 'vhd_prefix': {'key': 'vhdPrefix', 'type': 'str'}, + 'destination_container_name': {'key': 'destinationContainerName', 'type': 'str'}, + 'overwrite_vhds': {'key': 'overwriteVhds', 'type': 'bool'}, + } + + def __init__(self, *, vhd_prefix: str, destination_container_name: str, overwrite_vhds: bool, **kwargs) -> None: + super(VirtualMachineCaptureParameters, self).__init__(**kwargs) + self.vhd_prefix = vhd_prefix + self.destination_container_name = destination_container_name + self.overwrite_vhds = overwrite_vhds + + +class VirtualMachineCaptureResult(SubResource): + """Resource Id. + + :param id: Resource Id + :type id: str + :param output: Operation output data (raw JSON) + :type output: object + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'output': {'key': 'properties.output', 'type': 'object'}, + } + + def __init__(self, *, id: str=None, output=None, **kwargs) -> None: + super(VirtualMachineCaptureResult, self).__init__(id=id, **kwargs) + self.output = output + + +class VirtualMachineExtension(Resource): + """Describes a Virtual Machine Extension. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource Id + :vartype id: str + :ivar name: Resource name + :vartype name: str + :ivar type: Resource type + :vartype type: str + :param location: Required. Resource location + :type location: str + :param tags: Resource tags + :type tags: dict[str, str] + :param force_update_tag: How the extension handler should be forced to + update even if the extension configuration has not changed. + :type force_update_tag: str + :param publisher: The name of the extension handler publisher. + :type publisher: str + :param virtual_machine_extension_type: Specifies the type of the + extension; an example is "CustomScriptExtension". + :type virtual_machine_extension_type: str + :param type_handler_version: Specifies the version of the script handler. + :type type_handler_version: str + :param auto_upgrade_minor_version: Indicates whether the extension should + use a newer minor version if one is available at deployment time. Once + deployed, however, the extension will not upgrade minor versions unless + redeployed, even with this property set to true. + :type auto_upgrade_minor_version: bool + :param settings: Json formatted public settings for the extension. + :type settings: object + :param protected_settings: The extension can contain either + protectedSettings or protectedSettingsFromKeyVault or no protected + settings at all. + :type protected_settings: object + :ivar provisioning_state: The provisioning state, which only appears in + the response. + :vartype provisioning_state: str + :param instance_view: The virtual machine extension instance view. + :type instance_view: + ~azure.mgmt.compute.v2017_12_01.models.VirtualMachineExtensionInstanceView + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'force_update_tag': {'key': 'properties.forceUpdateTag', 'type': 'str'}, + 'publisher': {'key': 'properties.publisher', 'type': 'str'}, + 'virtual_machine_extension_type': {'key': 'properties.type', 'type': 'str'}, + 'type_handler_version': {'key': 'properties.typeHandlerVersion', 'type': 'str'}, + 'auto_upgrade_minor_version': {'key': 'properties.autoUpgradeMinorVersion', 'type': 'bool'}, + 'settings': {'key': 'properties.settings', 'type': 'object'}, + 'protected_settings': {'key': 'properties.protectedSettings', 'type': 'object'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'instance_view': {'key': 'properties.instanceView', 'type': 'VirtualMachineExtensionInstanceView'}, + } + + def __init__(self, *, location: str, tags=None, force_update_tag: str=None, publisher: str=None, virtual_machine_extension_type: str=None, type_handler_version: str=None, auto_upgrade_minor_version: bool=None, settings=None, protected_settings=None, instance_view=None, **kwargs) -> None: + super(VirtualMachineExtension, self).__init__(location=location, tags=tags, **kwargs) + self.force_update_tag = force_update_tag + self.publisher = publisher + self.virtual_machine_extension_type = virtual_machine_extension_type + self.type_handler_version = type_handler_version + self.auto_upgrade_minor_version = auto_upgrade_minor_version + self.settings = settings + self.protected_settings = protected_settings + self.provisioning_state = None + self.instance_view = instance_view + + +class VirtualMachineExtensionHandlerInstanceView(Model): + """The instance view of a virtual machine extension handler. + + :param type: Specifies the type of the extension; an example is + "CustomScriptExtension". + :type type: str + :param type_handler_version: Specifies the version of the script handler. + :type type_handler_version: str + :param status: The extension handler status. + :type status: ~azure.mgmt.compute.v2017_12_01.models.InstanceViewStatus + """ + + _attribute_map = { + 'type': {'key': 'type', 'type': 'str'}, + 'type_handler_version': {'key': 'typeHandlerVersion', 'type': 'str'}, + 'status': {'key': 'status', 'type': 'InstanceViewStatus'}, + } + + def __init__(self, *, type: str=None, type_handler_version: str=None, status=None, **kwargs) -> None: + super(VirtualMachineExtensionHandlerInstanceView, self).__init__(**kwargs) + self.type = type + self.type_handler_version = type_handler_version + self.status = status + + +class VirtualMachineExtensionImage(Resource): + """Describes a Virtual Machine Extension Image. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource Id + :vartype id: str + :ivar name: Resource name + :vartype name: str + :ivar type: Resource type + :vartype type: str + :param location: Required. Resource location + :type location: str + :param tags: Resource tags + :type tags: dict[str, str] + :param operating_system: Required. The operating system this extension + supports. + :type operating_system: str + :param compute_role: Required. The type of role (IaaS or PaaS) this + extension supports. + :type compute_role: str + :param handler_schema: Required. The schema defined by publisher, where + extension consumers should provide settings in a matching schema. + :type handler_schema: str + :param vm_scale_set_enabled: Whether the extension can be used on xRP + VMScaleSets. By default existing extensions are usable on scalesets, but + there might be cases where a publisher wants to explicitly indicate the + extension is only enabled for CRP VMs but not VMSS. + :type vm_scale_set_enabled: bool + :param supports_multiple_extensions: Whether the handler can support + multiple extensions. + :type supports_multiple_extensions: bool + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + 'operating_system': {'required': True}, + 'compute_role': {'required': True}, + 'handler_schema': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'operating_system': {'key': 'properties.operatingSystem', 'type': 'str'}, + 'compute_role': {'key': 'properties.computeRole', 'type': 'str'}, + 'handler_schema': {'key': 'properties.handlerSchema', 'type': 'str'}, + 'vm_scale_set_enabled': {'key': 'properties.vmScaleSetEnabled', 'type': 'bool'}, + 'supports_multiple_extensions': {'key': 'properties.supportsMultipleExtensions', 'type': 'bool'}, + } + + def __init__(self, *, location: str, operating_system: str, compute_role: str, handler_schema: str, tags=None, vm_scale_set_enabled: bool=None, supports_multiple_extensions: bool=None, **kwargs) -> None: + super(VirtualMachineExtensionImage, self).__init__(location=location, tags=tags, **kwargs) + self.operating_system = operating_system + self.compute_role = compute_role + self.handler_schema = handler_schema + self.vm_scale_set_enabled = vm_scale_set_enabled + self.supports_multiple_extensions = supports_multiple_extensions + + +class VirtualMachineExtensionInstanceView(Model): + """The instance view of a virtual machine extension. + + :param name: The virtual machine extension name. + :type name: str + :param type: Specifies the type of the extension; an example is + "CustomScriptExtension". + :type type: str + :param type_handler_version: Specifies the version of the script handler. + :type type_handler_version: str + :param substatuses: The resource status information. + :type substatuses: + list[~azure.mgmt.compute.v2017_12_01.models.InstanceViewStatus] + :param statuses: The resource status information. + :type statuses: + list[~azure.mgmt.compute.v2017_12_01.models.InstanceViewStatus] + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'type_handler_version': {'key': 'typeHandlerVersion', 'type': 'str'}, + 'substatuses': {'key': 'substatuses', 'type': '[InstanceViewStatus]'}, + 'statuses': {'key': 'statuses', 'type': '[InstanceViewStatus]'}, + } + + def __init__(self, *, name: str=None, type: str=None, type_handler_version: str=None, substatuses=None, statuses=None, **kwargs) -> None: + super(VirtualMachineExtensionInstanceView, self).__init__(**kwargs) + self.name = name + self.type = type + self.type_handler_version = type_handler_version + self.substatuses = substatuses + self.statuses = statuses + + +class VirtualMachineExtensionsListResult(Model): + """The List Extension operation response. + + :param value: The list of extensions + :type value: + list[~azure.mgmt.compute.v2017_12_01.models.VirtualMachineExtension] + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[VirtualMachineExtension]'}, + } + + def __init__(self, *, value=None, **kwargs) -> None: + super(VirtualMachineExtensionsListResult, self).__init__(**kwargs) + self.value = value + + +class VirtualMachineExtensionUpdate(UpdateResource): + """Describes a Virtual Machine Extension. + + :param tags: Resource tags + :type tags: dict[str, str] + :param force_update_tag: How the extension handler should be forced to + update even if the extension configuration has not changed. + :type force_update_tag: str + :param publisher: The name of the extension handler publisher. + :type publisher: str + :param type: Specifies the type of the extension; an example is + "CustomScriptExtension". + :type type: str + :param type_handler_version: Specifies the version of the script handler. + :type type_handler_version: str + :param auto_upgrade_minor_version: Indicates whether the extension should + use a newer minor version if one is available at deployment time. Once + deployed, however, the extension will not upgrade minor versions unless + redeployed, even with this property set to true. + :type auto_upgrade_minor_version: bool + :param settings: Json formatted public settings for the extension. + :type settings: object + :param protected_settings: The extension can contain either + protectedSettings or protectedSettingsFromKeyVault or no protected + settings at all. + :type protected_settings: object + """ + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + 'force_update_tag': {'key': 'properties.forceUpdateTag', 'type': 'str'}, + 'publisher': {'key': 'properties.publisher', 'type': 'str'}, + 'type': {'key': 'properties.type', 'type': 'str'}, + 'type_handler_version': {'key': 'properties.typeHandlerVersion', 'type': 'str'}, + 'auto_upgrade_minor_version': {'key': 'properties.autoUpgradeMinorVersion', 'type': 'bool'}, + 'settings': {'key': 'properties.settings', 'type': 'object'}, + 'protected_settings': {'key': 'properties.protectedSettings', 'type': 'object'}, + } + + def __init__(self, *, tags=None, force_update_tag: str=None, publisher: str=None, type: str=None, type_handler_version: str=None, auto_upgrade_minor_version: bool=None, settings=None, protected_settings=None, **kwargs) -> None: + super(VirtualMachineExtensionUpdate, self).__init__(tags=tags, **kwargs) + self.force_update_tag = force_update_tag + self.publisher = publisher + self.type = type + self.type_handler_version = type_handler_version + self.auto_upgrade_minor_version = auto_upgrade_minor_version + self.settings = settings + self.protected_settings = protected_settings + + +class VirtualMachineHealthStatus(Model): + """The health status of the VM. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar status: The health status information for the VM. + :vartype status: ~azure.mgmt.compute.v2017_12_01.models.InstanceViewStatus + """ + + _validation = { + 'status': {'readonly': True}, + } + + _attribute_map = { + 'status': {'key': 'status', 'type': 'InstanceViewStatus'}, + } + + def __init__(self, **kwargs) -> None: + super(VirtualMachineHealthStatus, self).__init__(**kwargs) + self.status = None + + +class VirtualMachineIdentity(Model): + """Identity for the virtual machine. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar principal_id: The principal id of virtual machine identity. This + property will only be provided for a system assigned identity. + :vartype principal_id: str + :ivar tenant_id: The tenant id associated with the virtual machine. This + property will only be provided for a system assigned identity. + :vartype tenant_id: str + :param type: The type of identity used for the virtual machine. The type + 'SystemAssigned, UserAssigned' includes both an implicitly created + identity and a set of user assigned identities. The type 'None' will + remove any identities from the virtual machine. Possible values include: + 'SystemAssigned', 'UserAssigned', 'SystemAssigned, UserAssigned', 'None' + :type type: str or + ~azure.mgmt.compute.v2017_12_01.models.ResourceIdentityType + :param identity_ids: The list of user identities associated with the + Virtual Machine. The user identity references will be ARM resource ids in + the form: + '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/identities/{identityName}'. + :type identity_ids: list[str] + """ + + _validation = { + 'principal_id': {'readonly': True}, + 'tenant_id': {'readonly': True}, + } + + _attribute_map = { + 'principal_id': {'key': 'principalId', 'type': 'str'}, + 'tenant_id': {'key': 'tenantId', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'ResourceIdentityType'}, + 'identity_ids': {'key': 'identityIds', 'type': '[str]'}, + } + + def __init__(self, *, type=None, identity_ids=None, **kwargs) -> None: + super(VirtualMachineIdentity, self).__init__(**kwargs) + self.principal_id = None + self.tenant_id = None + self.type = type + self.identity_ids = identity_ids + + +class VirtualMachineImageResource(SubResource): + """Virtual machine image resource information. + + All required parameters must be populated in order to send to Azure. + + :param id: Resource Id + :type id: str + :param name: Required. The name of the resource. + :type name: str + :param location: Required. The supported Azure location of the resource. + :type location: str + :param tags: Specifies the tags that are assigned to the virtual machine. + For more information about using tags, see [Using tags to organize your + Azure + resources](https://docs.microsoft.com/azure/azure-resource-manager/resource-group-using-tags.md). + :type tags: dict[str, str] + """ + + _validation = { + 'name': {'required': True}, + 'location': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__(self, *, name: str, location: str, id: str=None, tags=None, **kwargs) -> None: + super(VirtualMachineImageResource, self).__init__(id=id, **kwargs) + self.name = name + self.location = location + self.tags = tags + + +class VirtualMachineImage(VirtualMachineImageResource): + """Describes a Virtual Machine Image. + + All required parameters must be populated in order to send to Azure. + + :param id: Resource Id + :type id: str + :param name: Required. The name of the resource. + :type name: str + :param location: Required. The supported Azure location of the resource. + :type location: str + :param tags: Specifies the tags that are assigned to the virtual machine. + For more information about using tags, see [Using tags to organize your + Azure + resources](https://docs.microsoft.com/azure/azure-resource-manager/resource-group-using-tags.md). + :type tags: dict[str, str] + :param plan: + :type plan: ~azure.mgmt.compute.v2017_12_01.models.PurchasePlan + :param os_disk_image: + :type os_disk_image: ~azure.mgmt.compute.v2017_12_01.models.OSDiskImage + :param data_disk_images: + :type data_disk_images: + list[~azure.mgmt.compute.v2017_12_01.models.DataDiskImage] + """ + + _validation = { + 'name': {'required': True}, + 'location': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'plan': {'key': 'properties.plan', 'type': 'PurchasePlan'}, + 'os_disk_image': {'key': 'properties.osDiskImage', 'type': 'OSDiskImage'}, + 'data_disk_images': {'key': 'properties.dataDiskImages', 'type': '[DataDiskImage]'}, + } + + def __init__(self, *, name: str, location: str, id: str=None, tags=None, plan=None, os_disk_image=None, data_disk_images=None, **kwargs) -> None: + super(VirtualMachineImage, self).__init__(id=id, name=name, location=location, tags=tags, **kwargs) + self.plan = plan + self.os_disk_image = os_disk_image + self.data_disk_images = data_disk_images + + +class VirtualMachineInstanceView(Model): + """The instance view of a virtual machine. + + :param platform_update_domain: Specifies the update domain of the virtual + machine. + :type platform_update_domain: int + :param platform_fault_domain: Specifies the fault domain of the virtual + machine. + :type platform_fault_domain: int + :param computer_name: The computer name assigned to the virtual machine. + :type computer_name: str + :param os_name: The Operating System running on the virtual machine. + :type os_name: str + :param os_version: The version of Operating System running on the virtual + machine. + :type os_version: str + :param rdp_thumb_print: The Remote desktop certificate thumbprint. + :type rdp_thumb_print: str + :param vm_agent: The VM Agent running on the virtual machine. + :type vm_agent: + ~azure.mgmt.compute.v2017_12_01.models.VirtualMachineAgentInstanceView + :param maintenance_redeploy_status: The Maintenance Operation status on + the virtual machine. + :type maintenance_redeploy_status: + ~azure.mgmt.compute.v2017_12_01.models.MaintenanceRedeployStatus + :param disks: The virtual machine disk information. + :type disks: list[~azure.mgmt.compute.v2017_12_01.models.DiskInstanceView] + :param extensions: The extensions information. + :type extensions: + list[~azure.mgmt.compute.v2017_12_01.models.VirtualMachineExtensionInstanceView] + :param boot_diagnostics: Boot Diagnostics is a debugging feature which + allows you to view Console Output and Screenshot to diagnose VM status. +

    You can easily view the output of your console log.

    + Azure also enables you to see a screenshot of the VM from the hypervisor. + :type boot_diagnostics: + ~azure.mgmt.compute.v2017_12_01.models.BootDiagnosticsInstanceView + :param statuses: The resource status information. + :type statuses: + list[~azure.mgmt.compute.v2017_12_01.models.InstanceViewStatus] + """ + + _attribute_map = { + 'platform_update_domain': {'key': 'platformUpdateDomain', 'type': 'int'}, + 'platform_fault_domain': {'key': 'platformFaultDomain', 'type': 'int'}, + 'computer_name': {'key': 'computerName', 'type': 'str'}, + 'os_name': {'key': 'osName', 'type': 'str'}, + 'os_version': {'key': 'osVersion', 'type': 'str'}, + 'rdp_thumb_print': {'key': 'rdpThumbPrint', 'type': 'str'}, + 'vm_agent': {'key': 'vmAgent', 'type': 'VirtualMachineAgentInstanceView'}, + 'maintenance_redeploy_status': {'key': 'maintenanceRedeployStatus', 'type': 'MaintenanceRedeployStatus'}, + 'disks': {'key': 'disks', 'type': '[DiskInstanceView]'}, + 'extensions': {'key': 'extensions', 'type': '[VirtualMachineExtensionInstanceView]'}, + 'boot_diagnostics': {'key': 'bootDiagnostics', 'type': 'BootDiagnosticsInstanceView'}, + 'statuses': {'key': 'statuses', 'type': '[InstanceViewStatus]'}, + } + + def __init__(self, *, platform_update_domain: int=None, platform_fault_domain: int=None, computer_name: str=None, os_name: str=None, os_version: str=None, rdp_thumb_print: str=None, vm_agent=None, maintenance_redeploy_status=None, disks=None, extensions=None, boot_diagnostics=None, statuses=None, **kwargs) -> None: + super(VirtualMachineInstanceView, self).__init__(**kwargs) + self.platform_update_domain = platform_update_domain + self.platform_fault_domain = platform_fault_domain + self.computer_name = computer_name + self.os_name = os_name + self.os_version = os_version + self.rdp_thumb_print = rdp_thumb_print + self.vm_agent = vm_agent + self.maintenance_redeploy_status = maintenance_redeploy_status + self.disks = disks + self.extensions = extensions + self.boot_diagnostics = boot_diagnostics + self.statuses = statuses + + +class VirtualMachineScaleSet(Resource): + """Describes a Virtual Machine Scale Set. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource Id + :vartype id: str + :ivar name: Resource name + :vartype name: str + :ivar type: Resource type + :vartype type: str + :param location: Required. Resource location + :type location: str + :param tags: Resource tags + :type tags: dict[str, str] + :param sku: The virtual machine scale set sku. + :type sku: ~azure.mgmt.compute.v2017_12_01.models.Sku + :param plan: Specifies information about the marketplace image used to + create the virtual machine. This element is only used for marketplace + images. Before you can use a marketplace image from an API, you must + enable the image for programmatic use. In the Azure portal, find the + marketplace image that you want to use and then click **Want to deploy + programmatically, Get Started ->**. Enter any required information and + then click **Save**. + :type plan: ~azure.mgmt.compute.v2017_12_01.models.Plan + :param upgrade_policy: The upgrade policy. + :type upgrade_policy: ~azure.mgmt.compute.v2017_12_01.models.UpgradePolicy + :param virtual_machine_profile: The virtual machine profile. + :type virtual_machine_profile: + ~azure.mgmt.compute.v2017_12_01.models.VirtualMachineScaleSetVMProfile + :ivar provisioning_state: The provisioning state, which only appears in + the response. + :vartype provisioning_state: str + :param overprovision: Specifies whether the Virtual Machine Scale Set + should be overprovisioned. + :type overprovision: bool + :ivar unique_id: Specifies the ID which uniquely identifies a Virtual + Machine Scale Set. + :vartype unique_id: str + :param single_placement_group: When true this limits the scale set to a + single placement group, of max size 100 virtual machines. + :type single_placement_group: bool + :param zone_balance: Whether to force strictly even Virtual Machine + distribution cross x-zones in case there is zone outage. + :type zone_balance: bool + :param platform_fault_domain_count: Fault Domain count for each placement + group. + :type platform_fault_domain_count: int + :param identity: The identity of the virtual machine scale set, if + configured. + :type identity: + ~azure.mgmt.compute.v2017_12_01.models.VirtualMachineScaleSetIdentity + :param zones: The virtual machine scale set zones. + :type zones: list[str] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + 'provisioning_state': {'readonly': True}, + 'unique_id': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'sku': {'key': 'sku', 'type': 'Sku'}, + 'plan': {'key': 'plan', 'type': 'Plan'}, + 'upgrade_policy': {'key': 'properties.upgradePolicy', 'type': 'UpgradePolicy'}, + 'virtual_machine_profile': {'key': 'properties.virtualMachineProfile', 'type': 'VirtualMachineScaleSetVMProfile'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'overprovision': {'key': 'properties.overprovision', 'type': 'bool'}, + 'unique_id': {'key': 'properties.uniqueId', 'type': 'str'}, + 'single_placement_group': {'key': 'properties.singlePlacementGroup', 'type': 'bool'}, + 'zone_balance': {'key': 'properties.zoneBalance', 'type': 'bool'}, + 'platform_fault_domain_count': {'key': 'properties.platformFaultDomainCount', 'type': 'int'}, + 'identity': {'key': 'identity', 'type': 'VirtualMachineScaleSetIdentity'}, + 'zones': {'key': 'zones', 'type': '[str]'}, + } + + def __init__(self, *, location: str, tags=None, sku=None, plan=None, upgrade_policy=None, virtual_machine_profile=None, overprovision: bool=None, single_placement_group: bool=None, zone_balance: bool=None, platform_fault_domain_count: int=None, identity=None, zones=None, **kwargs) -> None: + super(VirtualMachineScaleSet, self).__init__(location=location, tags=tags, **kwargs) + self.sku = sku + self.plan = plan + self.upgrade_policy = upgrade_policy + self.virtual_machine_profile = virtual_machine_profile + self.provisioning_state = None + self.overprovision = overprovision + self.unique_id = None + self.single_placement_group = single_placement_group + self.zone_balance = zone_balance + self.platform_fault_domain_count = platform_fault_domain_count + self.identity = identity + self.zones = zones + + +class VirtualMachineScaleSetDataDisk(Model): + """Describes a virtual machine scale set data disk. + + All required parameters must be populated in order to send to Azure. + + :param name: The disk name. + :type name: str + :param lun: Required. Specifies the logical unit number of the data disk. + This value is used to identify data disks within the VM and therefore must + be unique for each data disk attached to a VM. + :type lun: int + :param caching: Specifies the caching requirements.

    Possible + values are:

    **None**

    **ReadOnly**

    **ReadWrite** +

    Default: **None for Standard storage. ReadOnly for Premium + storage**. Possible values include: 'None', 'ReadOnly', 'ReadWrite' + :type caching: str or ~azure.mgmt.compute.v2017_12_01.models.CachingTypes + :param write_accelerator_enabled: Specifies whether writeAccelerator + should be enabled or disabled on the disk. + :type write_accelerator_enabled: bool + :param create_option: Required. The create option. Possible values + include: 'FromImage', 'Empty', 'Attach' + :type create_option: str or + ~azure.mgmt.compute.v2017_12_01.models.DiskCreateOptionTypes + :param disk_size_gb: Specifies the size of an empty data disk in + gigabytes. This element can be used to overwrite the size of the disk in a + virtual machine image.

    This value cannot be larger than 1023 GB + :type disk_size_gb: int + :param managed_disk: The managed disk parameters. + :type managed_disk: + ~azure.mgmt.compute.v2017_12_01.models.VirtualMachineScaleSetManagedDiskParameters + """ + + _validation = { + 'lun': {'required': True}, + 'create_option': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'lun': {'key': 'lun', 'type': 'int'}, + 'caching': {'key': 'caching', 'type': 'CachingTypes'}, + 'write_accelerator_enabled': {'key': 'writeAcceleratorEnabled', 'type': 'bool'}, + 'create_option': {'key': 'createOption', 'type': 'str'}, + 'disk_size_gb': {'key': 'diskSizeGB', 'type': 'int'}, + 'managed_disk': {'key': 'managedDisk', 'type': 'VirtualMachineScaleSetManagedDiskParameters'}, + } + + def __init__(self, *, lun: int, create_option, name: str=None, caching=None, write_accelerator_enabled: bool=None, disk_size_gb: int=None, managed_disk=None, **kwargs) -> None: + super(VirtualMachineScaleSetDataDisk, self).__init__(**kwargs) + self.name = name + self.lun = lun + self.caching = caching + self.write_accelerator_enabled = write_accelerator_enabled + self.create_option = create_option + self.disk_size_gb = disk_size_gb + self.managed_disk = managed_disk + + +class VirtualMachineScaleSetExtension(SubResourceReadOnly): + """Describes a Virtual Machine Scale Set Extension. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource Id + :vartype id: str + :param name: The name of the extension. + :type name: str + :param force_update_tag: If a value is provided and is different from the + previous value, the extension handler will be forced to update even if the + extension configuration has not changed. + :type force_update_tag: str + :param publisher: The name of the extension handler publisher. + :type publisher: str + :param type: Specifies the type of the extension; an example is + "CustomScriptExtension". + :type type: str + :param type_handler_version: Specifies the version of the script handler. + :type type_handler_version: str + :param auto_upgrade_minor_version: Indicates whether the extension should + use a newer minor version if one is available at deployment time. Once + deployed, however, the extension will not upgrade minor versions unless + redeployed, even with this property set to true. + :type auto_upgrade_minor_version: bool + :param settings: Json formatted public settings for the extension. + :type settings: object + :param protected_settings: The extension can contain either + protectedSettings or protectedSettingsFromKeyVault or no protected + settings at all. + :type protected_settings: object + :ivar provisioning_state: The provisioning state, which only appears in + the response. + :vartype provisioning_state: str + """ + + _validation = { + 'id': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'force_update_tag': {'key': 'properties.forceUpdateTag', 'type': 'str'}, + 'publisher': {'key': 'properties.publisher', 'type': 'str'}, + 'type': {'key': 'properties.type', 'type': 'str'}, + 'type_handler_version': {'key': 'properties.typeHandlerVersion', 'type': 'str'}, + 'auto_upgrade_minor_version': {'key': 'properties.autoUpgradeMinorVersion', 'type': 'bool'}, + 'settings': {'key': 'properties.settings', 'type': 'object'}, + 'protected_settings': {'key': 'properties.protectedSettings', 'type': 'object'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + } + + def __init__(self, *, name: str=None, force_update_tag: str=None, publisher: str=None, type: str=None, type_handler_version: str=None, auto_upgrade_minor_version: bool=None, settings=None, protected_settings=None, **kwargs) -> None: + super(VirtualMachineScaleSetExtension, self).__init__(**kwargs) + self.name = name + self.force_update_tag = force_update_tag + self.publisher = publisher + self.type = type + self.type_handler_version = type_handler_version + self.auto_upgrade_minor_version = auto_upgrade_minor_version + self.settings = settings + self.protected_settings = protected_settings + self.provisioning_state = None + + +class VirtualMachineScaleSetExtensionProfile(Model): + """Describes a virtual machine scale set extension profile. + + :param extensions: The virtual machine scale set child extension + resources. + :type extensions: + list[~azure.mgmt.compute.v2017_12_01.models.VirtualMachineScaleSetExtension] + """ + + _attribute_map = { + 'extensions': {'key': 'extensions', 'type': '[VirtualMachineScaleSetExtension]'}, + } + + def __init__(self, *, extensions=None, **kwargs) -> None: + super(VirtualMachineScaleSetExtensionProfile, self).__init__(**kwargs) + self.extensions = extensions + + +class VirtualMachineScaleSetIdentity(Model): + """Identity for the virtual machine scale set. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar principal_id: The principal id of virtual machine scale set + identity. This property will only be provided for a system assigned + identity. + :vartype principal_id: str + :ivar tenant_id: The tenant id associated with the virtual machine scale + set. This property will only be provided for a system assigned identity. + :vartype tenant_id: str + :param type: The type of identity used for the virtual machine scale set. + The type 'SystemAssigned, UserAssigned' includes both an implicitly + created identity and a set of user assigned identities. The type 'None' + will remove any identities from the virtual machine scale set. Possible + values include: 'SystemAssigned', 'UserAssigned', 'SystemAssigned, + UserAssigned', 'None' + :type type: str or + ~azure.mgmt.compute.v2017_12_01.models.ResourceIdentityType + :param identity_ids: The list of user identities associated with the + virtual machine scale set. The user identity references will be ARM + resource ids in the form: + '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/identities/{identityName}'. + :type identity_ids: list[str] + """ + + _validation = { + 'principal_id': {'readonly': True}, + 'tenant_id': {'readonly': True}, + } + + _attribute_map = { + 'principal_id': {'key': 'principalId', 'type': 'str'}, + 'tenant_id': {'key': 'tenantId', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'ResourceIdentityType'}, + 'identity_ids': {'key': 'identityIds', 'type': '[str]'}, + } + + def __init__(self, *, type=None, identity_ids=None, **kwargs) -> None: + super(VirtualMachineScaleSetIdentity, self).__init__(**kwargs) + self.principal_id = None + self.tenant_id = None + self.type = type + self.identity_ids = identity_ids + + +class VirtualMachineScaleSetInstanceView(Model): + """The instance view of a virtual machine scale set. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar virtual_machine: The instance view status summary for the virtual + machine scale set. + :vartype virtual_machine: + ~azure.mgmt.compute.v2017_12_01.models.VirtualMachineScaleSetInstanceViewStatusesSummary + :ivar extensions: The extensions information. + :vartype extensions: + list[~azure.mgmt.compute.v2017_12_01.models.VirtualMachineScaleSetVMExtensionsSummary] + :param statuses: The resource status information. + :type statuses: + list[~azure.mgmt.compute.v2017_12_01.models.InstanceViewStatus] + """ + + _validation = { + 'virtual_machine': {'readonly': True}, + 'extensions': {'readonly': True}, + } + + _attribute_map = { + 'virtual_machine': {'key': 'virtualMachine', 'type': 'VirtualMachineScaleSetInstanceViewStatusesSummary'}, + 'extensions': {'key': 'extensions', 'type': '[VirtualMachineScaleSetVMExtensionsSummary]'}, + 'statuses': {'key': 'statuses', 'type': '[InstanceViewStatus]'}, + } + + def __init__(self, *, statuses=None, **kwargs) -> None: + super(VirtualMachineScaleSetInstanceView, self).__init__(**kwargs) + self.virtual_machine = None + self.extensions = None + self.statuses = statuses + + +class VirtualMachineScaleSetInstanceViewStatusesSummary(Model): + """Instance view statuses summary for virtual machines of a virtual machine + scale set. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar statuses_summary: The extensions information. + :vartype statuses_summary: + list[~azure.mgmt.compute.v2017_12_01.models.VirtualMachineStatusCodeCount] + """ + + _validation = { + 'statuses_summary': {'readonly': True}, + } + + _attribute_map = { + 'statuses_summary': {'key': 'statusesSummary', 'type': '[VirtualMachineStatusCodeCount]'}, + } + + def __init__(self, **kwargs) -> None: + super(VirtualMachineScaleSetInstanceViewStatusesSummary, self).__init__(**kwargs) + self.statuses_summary = None + + +class VirtualMachineScaleSetIPConfiguration(SubResource): + """Describes a virtual machine scale set network profile's IP configuration. + + All required parameters must be populated in order to send to Azure. + + :param id: Resource Id + :type id: str + :param name: Required. The IP configuration name. + :type name: str + :param subnet: Specifies the identifier of the subnet. + :type subnet: ~azure.mgmt.compute.v2017_12_01.models.ApiEntityReference + :param primary: Specifies the primary network interface in case the + virtual machine has more than 1 network interface. + :type primary: bool + :param public_ip_address_configuration: The publicIPAddressConfiguration. + :type public_ip_address_configuration: + ~azure.mgmt.compute.v2017_12_01.models.VirtualMachineScaleSetPublicIPAddressConfiguration + :param private_ip_address_version: Available from Api-Version 2017-03-30 + onwards, it represents whether the specific ipconfiguration is IPv4 or + IPv6. Default is taken as IPv4. Possible values are: 'IPv4' and 'IPv6'. + Possible values include: 'IPv4', 'IPv6' + :type private_ip_address_version: str or + ~azure.mgmt.compute.v2017_12_01.models.IPVersion + :param application_gateway_backend_address_pools: Specifies an array of + references to backend address pools of application gateways. A scale set + can reference backend address pools of multiple application gateways. + Multiple scale sets cannot use the same application gateway. + :type application_gateway_backend_address_pools: + list[~azure.mgmt.compute.v2017_12_01.models.SubResource] + :param load_balancer_backend_address_pools: Specifies an array of + references to backend address pools of load balancers. A scale set can + reference backend address pools of one public and one internal load + balancer. Multiple scale sets cannot use the same load balancer. + :type load_balancer_backend_address_pools: + list[~azure.mgmt.compute.v2017_12_01.models.SubResource] + :param load_balancer_inbound_nat_pools: Specifies an array of references + to inbound Nat pools of the load balancers. A scale set can reference + inbound nat pools of one public and one internal load balancer. Multiple + scale sets cannot use the same load balancer + :type load_balancer_inbound_nat_pools: + list[~azure.mgmt.compute.v2017_12_01.models.SubResource] + """ + + _validation = { + 'name': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'subnet': {'key': 'properties.subnet', 'type': 'ApiEntityReference'}, + 'primary': {'key': 'properties.primary', 'type': 'bool'}, + 'public_ip_address_configuration': {'key': 'properties.publicIPAddressConfiguration', 'type': 'VirtualMachineScaleSetPublicIPAddressConfiguration'}, + 'private_ip_address_version': {'key': 'properties.privateIPAddressVersion', 'type': 'str'}, + 'application_gateway_backend_address_pools': {'key': 'properties.applicationGatewayBackendAddressPools', 'type': '[SubResource]'}, + 'load_balancer_backend_address_pools': {'key': 'properties.loadBalancerBackendAddressPools', 'type': '[SubResource]'}, + 'load_balancer_inbound_nat_pools': {'key': 'properties.loadBalancerInboundNatPools', 'type': '[SubResource]'}, + } + + def __init__(self, *, name: str, id: str=None, subnet=None, primary: bool=None, public_ip_address_configuration=None, private_ip_address_version=None, application_gateway_backend_address_pools=None, load_balancer_backend_address_pools=None, load_balancer_inbound_nat_pools=None, **kwargs) -> None: + super(VirtualMachineScaleSetIPConfiguration, self).__init__(id=id, **kwargs) + self.name = name + self.subnet = subnet + self.primary = primary + self.public_ip_address_configuration = public_ip_address_configuration + self.private_ip_address_version = private_ip_address_version + self.application_gateway_backend_address_pools = application_gateway_backend_address_pools + self.load_balancer_backend_address_pools = load_balancer_backend_address_pools + self.load_balancer_inbound_nat_pools = load_balancer_inbound_nat_pools + + +class VirtualMachineScaleSetManagedDiskParameters(Model): + """Describes the parameters of a ScaleSet managed disk. + + :param storage_account_type: Specifies the storage account type for the + managed disk. Possible values are: Standard_LRS or Premium_LRS. Possible + values include: 'Standard_LRS', 'Premium_LRS' + :type storage_account_type: str or + ~azure.mgmt.compute.v2017_12_01.models.StorageAccountTypes + """ + + _attribute_map = { + 'storage_account_type': {'key': 'storageAccountType', 'type': 'str'}, + } + + def __init__(self, *, storage_account_type=None, **kwargs) -> None: + super(VirtualMachineScaleSetManagedDiskParameters, self).__init__(**kwargs) + self.storage_account_type = storage_account_type + + +class VirtualMachineScaleSetNetworkConfiguration(SubResource): + """Describes a virtual machine scale set network profile's network + configurations. + + All required parameters must be populated in order to send to Azure. + + :param id: Resource Id + :type id: str + :param name: Required. The network configuration name. + :type name: str + :param primary: Specifies the primary network interface in case the + virtual machine has more than 1 network interface. + :type primary: bool + :param enable_accelerated_networking: Specifies whether the network + interface is accelerated networking-enabled. + :type enable_accelerated_networking: bool + :param network_security_group: The network security group. + :type network_security_group: + ~azure.mgmt.compute.v2017_12_01.models.SubResource + :param dns_settings: The dns settings to be applied on the network + interfaces. + :type dns_settings: + ~azure.mgmt.compute.v2017_12_01.models.VirtualMachineScaleSetNetworkConfigurationDnsSettings + :param ip_configurations: Required. Specifies the IP configurations of the + network interface. + :type ip_configurations: + list[~azure.mgmt.compute.v2017_12_01.models.VirtualMachineScaleSetIPConfiguration] + :param enable_ip_forwarding: Whether IP forwarding enabled on this NIC. + :type enable_ip_forwarding: bool + """ + + _validation = { + 'name': {'required': True}, + 'ip_configurations': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'primary': {'key': 'properties.primary', 'type': 'bool'}, + 'enable_accelerated_networking': {'key': 'properties.enableAcceleratedNetworking', 'type': 'bool'}, + 'network_security_group': {'key': 'properties.networkSecurityGroup', 'type': 'SubResource'}, + 'dns_settings': {'key': 'properties.dnsSettings', 'type': 'VirtualMachineScaleSetNetworkConfigurationDnsSettings'}, + 'ip_configurations': {'key': 'properties.ipConfigurations', 'type': '[VirtualMachineScaleSetIPConfiguration]'}, + 'enable_ip_forwarding': {'key': 'properties.enableIPForwarding', 'type': 'bool'}, + } + + def __init__(self, *, name: str, ip_configurations, id: str=None, primary: bool=None, enable_accelerated_networking: bool=None, network_security_group=None, dns_settings=None, enable_ip_forwarding: bool=None, **kwargs) -> None: + super(VirtualMachineScaleSetNetworkConfiguration, self).__init__(id=id, **kwargs) + self.name = name + self.primary = primary + self.enable_accelerated_networking = enable_accelerated_networking + self.network_security_group = network_security_group + self.dns_settings = dns_settings + self.ip_configurations = ip_configurations + self.enable_ip_forwarding = enable_ip_forwarding + + +class VirtualMachineScaleSetNetworkConfigurationDnsSettings(Model): + """Describes a virtual machines scale sets network configuration's DNS + settings. + + :param dns_servers: List of DNS servers IP addresses + :type dns_servers: list[str] + """ + + _attribute_map = { + 'dns_servers': {'key': 'dnsServers', 'type': '[str]'}, + } + + def __init__(self, *, dns_servers=None, **kwargs) -> None: + super(VirtualMachineScaleSetNetworkConfigurationDnsSettings, self).__init__(**kwargs) + self.dns_servers = dns_servers + + +class VirtualMachineScaleSetNetworkProfile(Model): + """Describes a virtual machine scale set network profile. + + :param health_probe: A reference to a load balancer probe used to + determine the health of an instance in the virtual machine scale set. The + reference will be in the form: + '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/probes/{probeName}'. + :type health_probe: + ~azure.mgmt.compute.v2017_12_01.models.ApiEntityReference + :param network_interface_configurations: The list of network + configurations. + :type network_interface_configurations: + list[~azure.mgmt.compute.v2017_12_01.models.VirtualMachineScaleSetNetworkConfiguration] + """ + + _attribute_map = { + 'health_probe': {'key': 'healthProbe', 'type': 'ApiEntityReference'}, + 'network_interface_configurations': {'key': 'networkInterfaceConfigurations', 'type': '[VirtualMachineScaleSetNetworkConfiguration]'}, + } + + def __init__(self, *, health_probe=None, network_interface_configurations=None, **kwargs) -> None: + super(VirtualMachineScaleSetNetworkProfile, self).__init__(**kwargs) + self.health_probe = health_probe + self.network_interface_configurations = network_interface_configurations + + +class VirtualMachineScaleSetOSDisk(Model): + """Describes a virtual machine scale set operating system disk. + + All required parameters must be populated in order to send to Azure. + + :param name: The disk name. + :type name: str + :param caching: Specifies the caching requirements.

    Possible + values are:

    **None**

    **ReadOnly**

    **ReadWrite** +

    Default: **None for Standard storage. ReadOnly for Premium + storage**. Possible values include: 'None', 'ReadOnly', 'ReadWrite' + :type caching: str or ~azure.mgmt.compute.v2017_12_01.models.CachingTypes + :param write_accelerator_enabled: Specifies whether writeAccelerator + should be enabled or disabled on the disk. + :type write_accelerator_enabled: bool + :param create_option: Required. Specifies how the virtual machines in the + scale set should be created.

    The only allowed value is: + **FromImage** \\u2013 This value is used when you are using an image to + create the virtual machine. If you are using a platform image, you also + use the imageReference element described above. If you are using a + marketplace image, you also use the plan element previously described. + Possible values include: 'FromImage', 'Empty', 'Attach' + :type create_option: str or + ~azure.mgmt.compute.v2017_12_01.models.DiskCreateOptionTypes + :param os_type: This property allows you to specify the type of the OS + that is included in the disk if creating a VM from user-image or a + specialized VHD.

    Possible values are:

    **Windows** +

    **Linux**. Possible values include: 'Windows', 'Linux' + :type os_type: str or + ~azure.mgmt.compute.v2017_12_01.models.OperatingSystemTypes + :param image: Specifies information about the unmanaged user image to base + the scale set on. + :type image: ~azure.mgmt.compute.v2017_12_01.models.VirtualHardDisk + :param vhd_containers: Specifies the container urls that are used to store + operating system disks for the scale set. + :type vhd_containers: list[str] + :param managed_disk: The managed disk parameters. + :type managed_disk: + ~azure.mgmt.compute.v2017_12_01.models.VirtualMachineScaleSetManagedDiskParameters + """ + + _validation = { + 'create_option': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'caching': {'key': 'caching', 'type': 'CachingTypes'}, + 'write_accelerator_enabled': {'key': 'writeAcceleratorEnabled', 'type': 'bool'}, + 'create_option': {'key': 'createOption', 'type': 'str'}, + 'os_type': {'key': 'osType', 'type': 'OperatingSystemTypes'}, + 'image': {'key': 'image', 'type': 'VirtualHardDisk'}, + 'vhd_containers': {'key': 'vhdContainers', 'type': '[str]'}, + 'managed_disk': {'key': 'managedDisk', 'type': 'VirtualMachineScaleSetManagedDiskParameters'}, + } + + def __init__(self, *, create_option, name: str=None, caching=None, write_accelerator_enabled: bool=None, os_type=None, image=None, vhd_containers=None, managed_disk=None, **kwargs) -> None: + super(VirtualMachineScaleSetOSDisk, self).__init__(**kwargs) + self.name = name + self.caching = caching + self.write_accelerator_enabled = write_accelerator_enabled + self.create_option = create_option + self.os_type = os_type + self.image = image + self.vhd_containers = vhd_containers + self.managed_disk = managed_disk + + +class VirtualMachineScaleSetOSProfile(Model): + """Describes a virtual machine scale set OS profile. + + :param computer_name_prefix: Specifies the computer name prefix for all of + the virtual machines in the scale set. Computer name prefixes must be 1 to + 15 characters long. + :type computer_name_prefix: str + :param admin_username: Specifies the name of the administrator account. +

    **Windows-only restriction:** Cannot end in "."

    + **Disallowed values:** "administrator", "admin", "user", "user1", "test", + "user2", "test1", "user3", "admin1", "1", "123", "a", "actuser", "adm", + "admin2", "aspnet", "backup", "console", "david", "guest", "john", + "owner", "root", "server", "sql", "support", "support_388945a0", "sys", + "test2", "test3", "user4", "user5".

    **Minimum-length (Linux):** 1 + character

    **Max-length (Linux):** 64 characters

    + **Max-length (Windows):** 20 characters

  • For root access to + the Linux VM, see [Using root privileges on Linux virtual machines in + Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-use-root-privileges?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json)
  • + For a list of built-in system users on Linux that should not be used in + this field, see [Selecting User Names for Linux on + Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-usernames?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json) + :type admin_username: str + :param admin_password: Specifies the password of the administrator + account.

    **Minimum-length (Windows):** 8 characters

    + **Minimum-length (Linux):** 6 characters

    **Max-length + (Windows):** 123 characters

    **Max-length (Linux):** 72 characters +

    **Complexity requirements:** 3 out of 4 conditions below need to + be fulfilled
    Has lower characters
    Has upper characters
    Has a + digit
    Has a special character (Regex match [\\W_])

    + **Disallowed values:** "abc@123", "P@$$w0rd", "P@ssw0rd", "P@ssword123", + "Pa$$word", "pass@word1", "Password!", "Password1", "Password22", + "iloveyou!"

    For resetting the password, see [How to reset the + Remote Desktop service or its login password in a Windows + VM](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-reset-rdp?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json) +

    For resetting root password, see [Manage users, SSH, and check or + repair disks on Azure Linux VMs using the VMAccess + Extension](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-using-vmaccess-extension?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json#reset-root-password) + :type admin_password: str + :param custom_data: Specifies a base-64 encoded string of custom data. The + base-64 encoded string is decoded to a binary array that is saved as a + file on the Virtual Machine. The maximum length of the binary array is + 65535 bytes.

    For using cloud-init for your VM, see [Using + cloud-init to customize a Linux VM during + creation](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-using-cloud-init?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json) + :type custom_data: str + :param windows_configuration: Specifies Windows operating system settings + on the virtual machine. + :type windows_configuration: + ~azure.mgmt.compute.v2017_12_01.models.WindowsConfiguration + :param linux_configuration: Specifies the Linux operating system settings + on the virtual machine.

    For a list of supported Linux + distributions, see [Linux on Azure-Endorsed + Distributions](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-endorsed-distros?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json) +

    For running non-endorsed distributions, see [Information for + Non-Endorsed + Distributions](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-create-upload-generic?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json). + :type linux_configuration: + ~azure.mgmt.compute.v2017_12_01.models.LinuxConfiguration + :param secrets: Specifies set of certificates that should be installed + onto the virtual machines in the scale set. + :type secrets: + list[~azure.mgmt.compute.v2017_12_01.models.VaultSecretGroup] + """ + + _attribute_map = { + 'computer_name_prefix': {'key': 'computerNamePrefix', 'type': 'str'}, + 'admin_username': {'key': 'adminUsername', 'type': 'str'}, + 'admin_password': {'key': 'adminPassword', 'type': 'str'}, + 'custom_data': {'key': 'customData', 'type': 'str'}, + 'windows_configuration': {'key': 'windowsConfiguration', 'type': 'WindowsConfiguration'}, + 'linux_configuration': {'key': 'linuxConfiguration', 'type': 'LinuxConfiguration'}, + 'secrets': {'key': 'secrets', 'type': '[VaultSecretGroup]'}, + } + + def __init__(self, *, computer_name_prefix: str=None, admin_username: str=None, admin_password: str=None, custom_data: str=None, windows_configuration=None, linux_configuration=None, secrets=None, **kwargs) -> None: + super(VirtualMachineScaleSetOSProfile, self).__init__(**kwargs) + self.computer_name_prefix = computer_name_prefix + self.admin_username = admin_username + self.admin_password = admin_password + self.custom_data = custom_data + self.windows_configuration = windows_configuration + self.linux_configuration = linux_configuration + self.secrets = secrets + + +class VirtualMachineScaleSetPublicIPAddressConfiguration(Model): + """Describes a virtual machines scale set IP Configuration's PublicIPAddress + configuration. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. The publicIP address configuration name. + :type name: str + :param idle_timeout_in_minutes: The idle timeout of the public IP address. + :type idle_timeout_in_minutes: int + :param dns_settings: The dns settings to be applied on the publicIP + addresses . + :type dns_settings: + ~azure.mgmt.compute.v2017_12_01.models.VirtualMachineScaleSetPublicIPAddressConfigurationDnsSettings + """ + + _validation = { + 'name': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'idle_timeout_in_minutes': {'key': 'properties.idleTimeoutInMinutes', 'type': 'int'}, + 'dns_settings': {'key': 'properties.dnsSettings', 'type': 'VirtualMachineScaleSetPublicIPAddressConfigurationDnsSettings'}, + } + + def __init__(self, *, name: str, idle_timeout_in_minutes: int=None, dns_settings=None, **kwargs) -> None: + super(VirtualMachineScaleSetPublicIPAddressConfiguration, self).__init__(**kwargs) + self.name = name + self.idle_timeout_in_minutes = idle_timeout_in_minutes + self.dns_settings = dns_settings + + +class VirtualMachineScaleSetPublicIPAddressConfigurationDnsSettings(Model): + """Describes a virtual machines scale sets network configuration's DNS + settings. + + All required parameters must be populated in order to send to Azure. + + :param domain_name_label: Required. The Domain name label.The + concatenation of the domain name label and vm index will be the domain + name labels of the PublicIPAddress resources that will be created + :type domain_name_label: str + """ + + _validation = { + 'domain_name_label': {'required': True}, + } + + _attribute_map = { + 'domain_name_label': {'key': 'domainNameLabel', 'type': 'str'}, + } + + def __init__(self, *, domain_name_label: str, **kwargs) -> None: + super(VirtualMachineScaleSetPublicIPAddressConfigurationDnsSettings, self).__init__(**kwargs) + self.domain_name_label = domain_name_label + + +class VirtualMachineScaleSetSku(Model): + """Describes an available virtual machine scale set sku. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar resource_type: The type of resource the sku applies to. + :vartype resource_type: str + :ivar sku: The Sku. + :vartype sku: ~azure.mgmt.compute.v2017_12_01.models.Sku + :ivar capacity: Specifies the number of virtual machines in the scale set. + :vartype capacity: + ~azure.mgmt.compute.v2017_12_01.models.VirtualMachineScaleSetSkuCapacity + """ + + _validation = { + 'resource_type': {'readonly': True}, + 'sku': {'readonly': True}, + 'capacity': {'readonly': True}, + } + + _attribute_map = { + 'resource_type': {'key': 'resourceType', 'type': 'str'}, + 'sku': {'key': 'sku', 'type': 'Sku'}, + 'capacity': {'key': 'capacity', 'type': 'VirtualMachineScaleSetSkuCapacity'}, + } + + def __init__(self, **kwargs) -> None: + super(VirtualMachineScaleSetSku, self).__init__(**kwargs) + self.resource_type = None + self.sku = None + self.capacity = None + + +class VirtualMachineScaleSetSkuCapacity(Model): + """Describes scaling information of a sku. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar minimum: The minimum capacity. + :vartype minimum: long + :ivar maximum: The maximum capacity that can be set. + :vartype maximum: long + :ivar default_capacity: The default capacity. + :vartype default_capacity: long + :ivar scale_type: The scale type applicable to the sku. Possible values + include: 'Automatic', 'None' + :vartype scale_type: str or + ~azure.mgmt.compute.v2017_12_01.models.VirtualMachineScaleSetSkuScaleType + """ + + _validation = { + 'minimum': {'readonly': True}, + 'maximum': {'readonly': True}, + 'default_capacity': {'readonly': True}, + 'scale_type': {'readonly': True}, + } + + _attribute_map = { + 'minimum': {'key': 'minimum', 'type': 'long'}, + 'maximum': {'key': 'maximum', 'type': 'long'}, + 'default_capacity': {'key': 'defaultCapacity', 'type': 'long'}, + 'scale_type': {'key': 'scaleType', 'type': 'VirtualMachineScaleSetSkuScaleType'}, + } + + def __init__(self, **kwargs) -> None: + super(VirtualMachineScaleSetSkuCapacity, self).__init__(**kwargs) + self.minimum = None + self.maximum = None + self.default_capacity = None + self.scale_type = None + + +class VirtualMachineScaleSetStorageProfile(Model): + """Describes a virtual machine scale set storage profile. + + :param image_reference: Specifies information about the image to use. You + can specify information about platform images, marketplace images, or + virtual machine images. This element is required when you want to use a + platform image, marketplace image, or virtual machine image, but is not + used in other creation operations. + :type image_reference: + ~azure.mgmt.compute.v2017_12_01.models.ImageReference + :param os_disk: Specifies information about the operating system disk used + by the virtual machines in the scale set.

    For more information + about disks, see [About disks and VHDs for Azure virtual + machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-about-disks-vhds?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). + :type os_disk: + ~azure.mgmt.compute.v2017_12_01.models.VirtualMachineScaleSetOSDisk + :param data_disks: Specifies the parameters that are used to add data + disks to the virtual machines in the scale set.

    For more + information about disks, see [About disks and VHDs for Azure virtual + machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-about-disks-vhds?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). + :type data_disks: + list[~azure.mgmt.compute.v2017_12_01.models.VirtualMachineScaleSetDataDisk] + """ + + _attribute_map = { + 'image_reference': {'key': 'imageReference', 'type': 'ImageReference'}, + 'os_disk': {'key': 'osDisk', 'type': 'VirtualMachineScaleSetOSDisk'}, + 'data_disks': {'key': 'dataDisks', 'type': '[VirtualMachineScaleSetDataDisk]'}, + } + + def __init__(self, *, image_reference=None, os_disk=None, data_disks=None, **kwargs) -> None: + super(VirtualMachineScaleSetStorageProfile, self).__init__(**kwargs) + self.image_reference = image_reference + self.os_disk = os_disk + self.data_disks = data_disks + + +class VirtualMachineScaleSetUpdate(UpdateResource): + """Describes a Virtual Machine Scale Set. + + :param tags: Resource tags + :type tags: dict[str, str] + :param sku: The virtual machine scale set sku. + :type sku: ~azure.mgmt.compute.v2017_12_01.models.Sku + :param plan: The purchase plan when deploying a virtual machine scale set + from VM Marketplace images. + :type plan: ~azure.mgmt.compute.v2017_12_01.models.Plan + :param upgrade_policy: The upgrade policy. + :type upgrade_policy: ~azure.mgmt.compute.v2017_12_01.models.UpgradePolicy + :param virtual_machine_profile: The virtual machine profile. + :type virtual_machine_profile: + ~azure.mgmt.compute.v2017_12_01.models.VirtualMachineScaleSetUpdateVMProfile + :param overprovision: Specifies whether the Virtual Machine Scale Set + should be overprovisioned. + :type overprovision: bool + :param single_placement_group: When true this limits the scale set to a + single placement group, of max size 100 virtual machines. + :type single_placement_group: bool + :param identity: The identity of the virtual machine scale set, if + configured. + :type identity: + ~azure.mgmt.compute.v2017_12_01.models.VirtualMachineScaleSetIdentity + """ + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + 'sku': {'key': 'sku', 'type': 'Sku'}, + 'plan': {'key': 'plan', 'type': 'Plan'}, + 'upgrade_policy': {'key': 'properties.upgradePolicy', 'type': 'UpgradePolicy'}, + 'virtual_machine_profile': {'key': 'properties.virtualMachineProfile', 'type': 'VirtualMachineScaleSetUpdateVMProfile'}, + 'overprovision': {'key': 'properties.overprovision', 'type': 'bool'}, + 'single_placement_group': {'key': 'properties.singlePlacementGroup', 'type': 'bool'}, + 'identity': {'key': 'identity', 'type': 'VirtualMachineScaleSetIdentity'}, + } + + def __init__(self, *, tags=None, sku=None, plan=None, upgrade_policy=None, virtual_machine_profile=None, overprovision: bool=None, single_placement_group: bool=None, identity=None, **kwargs) -> None: + super(VirtualMachineScaleSetUpdate, self).__init__(tags=tags, **kwargs) + self.sku = sku + self.plan = plan + self.upgrade_policy = upgrade_policy + self.virtual_machine_profile = virtual_machine_profile + self.overprovision = overprovision + self.single_placement_group = single_placement_group + self.identity = identity + + +class VirtualMachineScaleSetUpdateIPConfiguration(SubResource): + """Describes a virtual machine scale set network profile's IP configuration. + + :param id: Resource Id + :type id: str + :param name: The IP configuration name. + :type name: str + :param subnet: The subnet. + :type subnet: ~azure.mgmt.compute.v2017_12_01.models.ApiEntityReference + :param primary: Specifies the primary IP Configuration in case the network + interface has more than one IP Configuration. + :type primary: bool + :param public_ip_address_configuration: The publicIPAddressConfiguration. + :type public_ip_address_configuration: + ~azure.mgmt.compute.v2017_12_01.models.VirtualMachineScaleSetUpdatePublicIPAddressConfiguration + :param private_ip_address_version: Available from Api-Version 2017-03-30 + onwards, it represents whether the specific ipconfiguration is IPv4 or + IPv6. Default is taken as IPv4. Possible values are: 'IPv4' and 'IPv6'. + Possible values include: 'IPv4', 'IPv6' + :type private_ip_address_version: str or + ~azure.mgmt.compute.v2017_12_01.models.IPVersion + :param application_gateway_backend_address_pools: The application gateway + backend address pools. + :type application_gateway_backend_address_pools: + list[~azure.mgmt.compute.v2017_12_01.models.SubResource] + :param load_balancer_backend_address_pools: The load balancer backend + address pools. + :type load_balancer_backend_address_pools: + list[~azure.mgmt.compute.v2017_12_01.models.SubResource] + :param load_balancer_inbound_nat_pools: The load balancer inbound nat + pools. + :type load_balancer_inbound_nat_pools: + list[~azure.mgmt.compute.v2017_12_01.models.SubResource] + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'subnet': {'key': 'properties.subnet', 'type': 'ApiEntityReference'}, + 'primary': {'key': 'properties.primary', 'type': 'bool'}, + 'public_ip_address_configuration': {'key': 'properties.publicIPAddressConfiguration', 'type': 'VirtualMachineScaleSetUpdatePublicIPAddressConfiguration'}, + 'private_ip_address_version': {'key': 'properties.privateIPAddressVersion', 'type': 'str'}, + 'application_gateway_backend_address_pools': {'key': 'properties.applicationGatewayBackendAddressPools', 'type': '[SubResource]'}, + 'load_balancer_backend_address_pools': {'key': 'properties.loadBalancerBackendAddressPools', 'type': '[SubResource]'}, + 'load_balancer_inbound_nat_pools': {'key': 'properties.loadBalancerInboundNatPools', 'type': '[SubResource]'}, + } + + def __init__(self, *, id: str=None, name: str=None, subnet=None, primary: bool=None, public_ip_address_configuration=None, private_ip_address_version=None, application_gateway_backend_address_pools=None, load_balancer_backend_address_pools=None, load_balancer_inbound_nat_pools=None, **kwargs) -> None: + super(VirtualMachineScaleSetUpdateIPConfiguration, self).__init__(id=id, **kwargs) + self.name = name + self.subnet = subnet + self.primary = primary + self.public_ip_address_configuration = public_ip_address_configuration + self.private_ip_address_version = private_ip_address_version + self.application_gateway_backend_address_pools = application_gateway_backend_address_pools + self.load_balancer_backend_address_pools = load_balancer_backend_address_pools + self.load_balancer_inbound_nat_pools = load_balancer_inbound_nat_pools + + +class VirtualMachineScaleSetUpdateNetworkConfiguration(SubResource): + """Describes a virtual machine scale set network profile's network + configurations. + + :param id: Resource Id + :type id: str + :param name: The network configuration name. + :type name: str + :param primary: Whether this is a primary NIC on a virtual machine. + :type primary: bool + :param enable_accelerated_networking: Specifies whether the network + interface is accelerated networking-enabled. + :type enable_accelerated_networking: bool + :param network_security_group: The network security group. + :type network_security_group: + ~azure.mgmt.compute.v2017_12_01.models.SubResource + :param dns_settings: The dns settings to be applied on the network + interfaces. + :type dns_settings: + ~azure.mgmt.compute.v2017_12_01.models.VirtualMachineScaleSetNetworkConfigurationDnsSettings + :param ip_configurations: The virtual machine scale set IP Configuration. + :type ip_configurations: + list[~azure.mgmt.compute.v2017_12_01.models.VirtualMachineScaleSetUpdateIPConfiguration] + :param enable_ip_forwarding: Whether IP forwarding enabled on this NIC. + :type enable_ip_forwarding: bool + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'primary': {'key': 'properties.primary', 'type': 'bool'}, + 'enable_accelerated_networking': {'key': 'properties.enableAcceleratedNetworking', 'type': 'bool'}, + 'network_security_group': {'key': 'properties.networkSecurityGroup', 'type': 'SubResource'}, + 'dns_settings': {'key': 'properties.dnsSettings', 'type': 'VirtualMachineScaleSetNetworkConfigurationDnsSettings'}, + 'ip_configurations': {'key': 'properties.ipConfigurations', 'type': '[VirtualMachineScaleSetUpdateIPConfiguration]'}, + 'enable_ip_forwarding': {'key': 'properties.enableIPForwarding', 'type': 'bool'}, + } + + def __init__(self, *, id: str=None, name: str=None, primary: bool=None, enable_accelerated_networking: bool=None, network_security_group=None, dns_settings=None, ip_configurations=None, enable_ip_forwarding: bool=None, **kwargs) -> None: + super(VirtualMachineScaleSetUpdateNetworkConfiguration, self).__init__(id=id, **kwargs) + self.name = name + self.primary = primary + self.enable_accelerated_networking = enable_accelerated_networking + self.network_security_group = network_security_group + self.dns_settings = dns_settings + self.ip_configurations = ip_configurations + self.enable_ip_forwarding = enable_ip_forwarding + + +class VirtualMachineScaleSetUpdateNetworkProfile(Model): + """Describes a virtual machine scale set network profile. + + :param network_interface_configurations: The list of network + configurations. + :type network_interface_configurations: + list[~azure.mgmt.compute.v2017_12_01.models.VirtualMachineScaleSetUpdateNetworkConfiguration] + """ + + _attribute_map = { + 'network_interface_configurations': {'key': 'networkInterfaceConfigurations', 'type': '[VirtualMachineScaleSetUpdateNetworkConfiguration]'}, + } + + def __init__(self, *, network_interface_configurations=None, **kwargs) -> None: + super(VirtualMachineScaleSetUpdateNetworkProfile, self).__init__(**kwargs) + self.network_interface_configurations = network_interface_configurations + + +class VirtualMachineScaleSetUpdateOSDisk(Model): + """Describes virtual machine scale set operating system disk Update Object. + This should be used for Updating VMSS OS Disk. + + :param caching: The caching type. Possible values include: 'None', + 'ReadOnly', 'ReadWrite' + :type caching: str or ~azure.mgmt.compute.v2017_12_01.models.CachingTypes + :param write_accelerator_enabled: Specifies whether writeAccelerator + should be enabled or disabled on the disk. + :type write_accelerator_enabled: bool + :param image: The Source User Image VirtualHardDisk. This VirtualHardDisk + will be copied before using it to attach to the Virtual Machine. If + SourceImage is provided, the destination VirtualHardDisk should not exist. + :type image: ~azure.mgmt.compute.v2017_12_01.models.VirtualHardDisk + :param vhd_containers: The list of virtual hard disk container uris. + :type vhd_containers: list[str] + :param managed_disk: The managed disk parameters. + :type managed_disk: + ~azure.mgmt.compute.v2017_12_01.models.VirtualMachineScaleSetManagedDiskParameters + """ + + _attribute_map = { + 'caching': {'key': 'caching', 'type': 'CachingTypes'}, + 'write_accelerator_enabled': {'key': 'writeAcceleratorEnabled', 'type': 'bool'}, + 'image': {'key': 'image', 'type': 'VirtualHardDisk'}, + 'vhd_containers': {'key': 'vhdContainers', 'type': '[str]'}, + 'managed_disk': {'key': 'managedDisk', 'type': 'VirtualMachineScaleSetManagedDiskParameters'}, + } + + def __init__(self, *, caching=None, write_accelerator_enabled: bool=None, image=None, vhd_containers=None, managed_disk=None, **kwargs) -> None: + super(VirtualMachineScaleSetUpdateOSDisk, self).__init__(**kwargs) + self.caching = caching + self.write_accelerator_enabled = write_accelerator_enabled + self.image = image + self.vhd_containers = vhd_containers + self.managed_disk = managed_disk + + +class VirtualMachineScaleSetUpdateOSProfile(Model): + """Describes a virtual machine scale set OS profile. + + :param custom_data: A base-64 encoded string of custom data. + :type custom_data: str + :param windows_configuration: The Windows Configuration of the OS profile. + :type windows_configuration: + ~azure.mgmt.compute.v2017_12_01.models.WindowsConfiguration + :param linux_configuration: The Linux Configuration of the OS profile. + :type linux_configuration: + ~azure.mgmt.compute.v2017_12_01.models.LinuxConfiguration + :param secrets: The List of certificates for addition to the VM. + :type secrets: + list[~azure.mgmt.compute.v2017_12_01.models.VaultSecretGroup] + """ + + _attribute_map = { + 'custom_data': {'key': 'customData', 'type': 'str'}, + 'windows_configuration': {'key': 'windowsConfiguration', 'type': 'WindowsConfiguration'}, + 'linux_configuration': {'key': 'linuxConfiguration', 'type': 'LinuxConfiguration'}, + 'secrets': {'key': 'secrets', 'type': '[VaultSecretGroup]'}, + } + + def __init__(self, *, custom_data: str=None, windows_configuration=None, linux_configuration=None, secrets=None, **kwargs) -> None: + super(VirtualMachineScaleSetUpdateOSProfile, self).__init__(**kwargs) + self.custom_data = custom_data + self.windows_configuration = windows_configuration + self.linux_configuration = linux_configuration + self.secrets = secrets + + +class VirtualMachineScaleSetUpdatePublicIPAddressConfiguration(Model): + """Describes a virtual machines scale set IP Configuration's PublicIPAddress + configuration. + + :param name: The publicIP address configuration name. + :type name: str + :param idle_timeout_in_minutes: The idle timeout of the public IP address. + :type idle_timeout_in_minutes: int + :param dns_settings: The dns settings to be applied on the publicIP + addresses . + :type dns_settings: + ~azure.mgmt.compute.v2017_12_01.models.VirtualMachineScaleSetPublicIPAddressConfigurationDnsSettings + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'idle_timeout_in_minutes': {'key': 'properties.idleTimeoutInMinutes', 'type': 'int'}, + 'dns_settings': {'key': 'properties.dnsSettings', 'type': 'VirtualMachineScaleSetPublicIPAddressConfigurationDnsSettings'}, + } + + def __init__(self, *, name: str=None, idle_timeout_in_minutes: int=None, dns_settings=None, **kwargs) -> None: + super(VirtualMachineScaleSetUpdatePublicIPAddressConfiguration, self).__init__(**kwargs) + self.name = name + self.idle_timeout_in_minutes = idle_timeout_in_minutes + self.dns_settings = dns_settings + + +class VirtualMachineScaleSetUpdateStorageProfile(Model): + """Describes a virtual machine scale set storage profile. + + :param image_reference: The image reference. + :type image_reference: + ~azure.mgmt.compute.v2017_12_01.models.ImageReference + :param os_disk: The OS disk. + :type os_disk: + ~azure.mgmt.compute.v2017_12_01.models.VirtualMachineScaleSetUpdateOSDisk + :param data_disks: The data disks. + :type data_disks: + list[~azure.mgmt.compute.v2017_12_01.models.VirtualMachineScaleSetDataDisk] + """ + + _attribute_map = { + 'image_reference': {'key': 'imageReference', 'type': 'ImageReference'}, + 'os_disk': {'key': 'osDisk', 'type': 'VirtualMachineScaleSetUpdateOSDisk'}, + 'data_disks': {'key': 'dataDisks', 'type': '[VirtualMachineScaleSetDataDisk]'}, + } + + def __init__(self, *, image_reference=None, os_disk=None, data_disks=None, **kwargs) -> None: + super(VirtualMachineScaleSetUpdateStorageProfile, self).__init__(**kwargs) + self.image_reference = image_reference + self.os_disk = os_disk + self.data_disks = data_disks + + +class VirtualMachineScaleSetUpdateVMProfile(Model): + """Describes a virtual machine scale set virtual machine profile. + + :param os_profile: The virtual machine scale set OS profile. + :type os_profile: + ~azure.mgmt.compute.v2017_12_01.models.VirtualMachineScaleSetUpdateOSProfile + :param storage_profile: The virtual machine scale set storage profile. + :type storage_profile: + ~azure.mgmt.compute.v2017_12_01.models.VirtualMachineScaleSetUpdateStorageProfile + :param network_profile: The virtual machine scale set network profile. + :type network_profile: + ~azure.mgmt.compute.v2017_12_01.models.VirtualMachineScaleSetUpdateNetworkProfile + :param diagnostics_profile: The virtual machine scale set diagnostics + profile. + :type diagnostics_profile: + ~azure.mgmt.compute.v2017_12_01.models.DiagnosticsProfile + :param extension_profile: The virtual machine scale set extension profile. + :type extension_profile: + ~azure.mgmt.compute.v2017_12_01.models.VirtualMachineScaleSetExtensionProfile + :param license_type: The license type, which is for bring your own license + scenario. + :type license_type: str + """ + + _attribute_map = { + 'os_profile': {'key': 'osProfile', 'type': 'VirtualMachineScaleSetUpdateOSProfile'}, + 'storage_profile': {'key': 'storageProfile', 'type': 'VirtualMachineScaleSetUpdateStorageProfile'}, + 'network_profile': {'key': 'networkProfile', 'type': 'VirtualMachineScaleSetUpdateNetworkProfile'}, + 'diagnostics_profile': {'key': 'diagnosticsProfile', 'type': 'DiagnosticsProfile'}, + 'extension_profile': {'key': 'extensionProfile', 'type': 'VirtualMachineScaleSetExtensionProfile'}, + 'license_type': {'key': 'licenseType', 'type': 'str'}, + } + + def __init__(self, *, os_profile=None, storage_profile=None, network_profile=None, diagnostics_profile=None, extension_profile=None, license_type: str=None, **kwargs) -> None: + super(VirtualMachineScaleSetUpdateVMProfile, self).__init__(**kwargs) + self.os_profile = os_profile + self.storage_profile = storage_profile + self.network_profile = network_profile + self.diagnostics_profile = diagnostics_profile + self.extension_profile = extension_profile + self.license_type = license_type + + +class VirtualMachineScaleSetVM(Resource): + """Describes a virtual machine scale set virtual machine. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource Id + :vartype id: str + :ivar name: Resource name + :vartype name: str + :ivar type: Resource type + :vartype type: str + :param location: Required. Resource location + :type location: str + :param tags: Resource tags + :type tags: dict[str, str] + :ivar instance_id: The virtual machine instance ID. + :vartype instance_id: str + :ivar sku: The virtual machine SKU. + :vartype sku: ~azure.mgmt.compute.v2017_12_01.models.Sku + :ivar latest_model_applied: Specifies whether the latest model has been + applied to the virtual machine. + :vartype latest_model_applied: bool + :ivar vm_id: Azure VM unique ID. + :vartype vm_id: str + :ivar instance_view: The virtual machine instance view. + :vartype instance_view: + ~azure.mgmt.compute.v2017_12_01.models.VirtualMachineScaleSetVMInstanceView + :param hardware_profile: Specifies the hardware settings for the virtual + machine. + :type hardware_profile: + ~azure.mgmt.compute.v2017_12_01.models.HardwareProfile + :param storage_profile: Specifies the storage settings for the virtual + machine disks. + :type storage_profile: + ~azure.mgmt.compute.v2017_12_01.models.StorageProfile + :param os_profile: Specifies the operating system settings for the virtual + machine. + :type os_profile: ~azure.mgmt.compute.v2017_12_01.models.OSProfile + :param network_profile: Specifies the network interfaces of the virtual + machine. + :type network_profile: + ~azure.mgmt.compute.v2017_12_01.models.NetworkProfile + :param diagnostics_profile: Specifies the boot diagnostic settings state. +

    Minimum api-version: 2015-06-15. + :type diagnostics_profile: + ~azure.mgmt.compute.v2017_12_01.models.DiagnosticsProfile + :param availability_set: Specifies information about the availability set + that the virtual machine should be assigned to. Virtual machines specified + in the same availability set are allocated to different nodes to maximize + availability. For more information about availability sets, see [Manage + the availability of virtual + machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-manage-availability?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). +

    For more information on Azure planned maintenance, see [Planned + maintenance for virtual machines in + Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-planned-maintenance?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json) +

    Currently, a VM can only be added to availability set at creation + time. An existing VM cannot be added to an availability set. + :type availability_set: ~azure.mgmt.compute.v2017_12_01.models.SubResource + :ivar provisioning_state: The provisioning state, which only appears in + the response. + :vartype provisioning_state: str + :param license_type: Specifies that the image or disk that is being used + was licensed on-premises. This element is only used for images that + contain the Windows Server operating system.

    Possible values are: +

    Windows_Client

    Windows_Server

    If this element + is included in a request for an update, the value must match the initial + value. This value cannot be updated.

    For more information, see + [Azure Hybrid Use Benefit for Windows + Server](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-hybrid-use-benefit-licensing?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json) +

    Minimum api-version: 2015-06-15 + :type license_type: str + :param plan: Specifies information about the marketplace image used to + create the virtual machine. This element is only used for marketplace + images. Before you can use a marketplace image from an API, you must + enable the image for programmatic use. In the Azure portal, find the + marketplace image that you want to use and then click **Want to deploy + programmatically, Get Started ->**. Enter any required information and + then click **Save**. + :type plan: ~azure.mgmt.compute.v2017_12_01.models.Plan + :ivar resources: The virtual machine child extension resources. + :vartype resources: + list[~azure.mgmt.compute.v2017_12_01.models.VirtualMachineExtension] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + 'instance_id': {'readonly': True}, + 'sku': {'readonly': True}, + 'latest_model_applied': {'readonly': True}, + 'vm_id': {'readonly': True}, + 'instance_view': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + 'resources': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'instance_id': {'key': 'instanceId', 'type': 'str'}, + 'sku': {'key': 'sku', 'type': 'Sku'}, + 'latest_model_applied': {'key': 'properties.latestModelApplied', 'type': 'bool'}, + 'vm_id': {'key': 'properties.vmId', 'type': 'str'}, + 'instance_view': {'key': 'properties.instanceView', 'type': 'VirtualMachineScaleSetVMInstanceView'}, + 'hardware_profile': {'key': 'properties.hardwareProfile', 'type': 'HardwareProfile'}, + 'storage_profile': {'key': 'properties.storageProfile', 'type': 'StorageProfile'}, + 'os_profile': {'key': 'properties.osProfile', 'type': 'OSProfile'}, + 'network_profile': {'key': 'properties.networkProfile', 'type': 'NetworkProfile'}, + 'diagnostics_profile': {'key': 'properties.diagnosticsProfile', 'type': 'DiagnosticsProfile'}, + 'availability_set': {'key': 'properties.availabilitySet', 'type': 'SubResource'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'license_type': {'key': 'properties.licenseType', 'type': 'str'}, + 'plan': {'key': 'plan', 'type': 'Plan'}, + 'resources': {'key': 'resources', 'type': '[VirtualMachineExtension]'}, + } + + def __init__(self, *, location: str, tags=None, hardware_profile=None, storage_profile=None, os_profile=None, network_profile=None, diagnostics_profile=None, availability_set=None, license_type: str=None, plan=None, **kwargs) -> None: + super(VirtualMachineScaleSetVM, self).__init__(location=location, tags=tags, **kwargs) + self.instance_id = None + self.sku = None + self.latest_model_applied = None + self.vm_id = None + self.instance_view = None + self.hardware_profile = hardware_profile + self.storage_profile = storage_profile + self.os_profile = os_profile + self.network_profile = network_profile + self.diagnostics_profile = diagnostics_profile + self.availability_set = availability_set + self.provisioning_state = None + self.license_type = license_type + self.plan = plan + self.resources = None + + +class VirtualMachineScaleSetVMExtensionsSummary(Model): + """Extensions summary for virtual machines of a virtual machine scale set. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar name: The extension name. + :vartype name: str + :ivar statuses_summary: The extensions information. + :vartype statuses_summary: + list[~azure.mgmt.compute.v2017_12_01.models.VirtualMachineStatusCodeCount] + """ + + _validation = { + 'name': {'readonly': True}, + 'statuses_summary': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'statuses_summary': {'key': 'statusesSummary', 'type': '[VirtualMachineStatusCodeCount]'}, + } + + def __init__(self, **kwargs) -> None: + super(VirtualMachineScaleSetVMExtensionsSummary, self).__init__(**kwargs) + self.name = None + self.statuses_summary = None + + +class VirtualMachineScaleSetVMInstanceIDs(Model): + """Specifies a list of virtual machine instance IDs from the VM scale set. + + :param instance_ids: The virtual machine scale set instance ids. Omitting + the virtual machine scale set instance ids will result in the operation + being performed on all virtual machines in the virtual machine scale set. + :type instance_ids: list[str] + """ + + _attribute_map = { + 'instance_ids': {'key': 'instanceIds', 'type': '[str]'}, + } + + def __init__(self, *, instance_ids=None, **kwargs) -> None: + super(VirtualMachineScaleSetVMInstanceIDs, self).__init__(**kwargs) + self.instance_ids = instance_ids + + +class VirtualMachineScaleSetVMInstanceRequiredIDs(Model): + """Specifies a list of virtual machine instance IDs from the VM scale set. + + All required parameters must be populated in order to send to Azure. + + :param instance_ids: Required. The virtual machine scale set instance ids. + :type instance_ids: list[str] + """ + + _validation = { + 'instance_ids': {'required': True}, + } + + _attribute_map = { + 'instance_ids': {'key': 'instanceIds', 'type': '[str]'}, + } + + def __init__(self, *, instance_ids, **kwargs) -> None: + super(VirtualMachineScaleSetVMInstanceRequiredIDs, self).__init__(**kwargs) + self.instance_ids = instance_ids + + +class VirtualMachineScaleSetVMInstanceView(Model): + """The instance view of a virtual machine scale set VM. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :param platform_update_domain: The Update Domain count. + :type platform_update_domain: int + :param platform_fault_domain: The Fault Domain count. + :type platform_fault_domain: int + :param rdp_thumb_print: The Remote desktop certificate thumbprint. + :type rdp_thumb_print: str + :param vm_agent: The VM Agent running on the virtual machine. + :type vm_agent: + ~azure.mgmt.compute.v2017_12_01.models.VirtualMachineAgentInstanceView + :param maintenance_redeploy_status: The Maintenance Operation status on + the virtual machine. + :type maintenance_redeploy_status: + ~azure.mgmt.compute.v2017_12_01.models.MaintenanceRedeployStatus + :param disks: The disks information. + :type disks: list[~azure.mgmt.compute.v2017_12_01.models.DiskInstanceView] + :param extensions: The extensions information. + :type extensions: + list[~azure.mgmt.compute.v2017_12_01.models.VirtualMachineExtensionInstanceView] + :ivar vm_health: The health status for the VM. + :vartype vm_health: + ~azure.mgmt.compute.v2017_12_01.models.VirtualMachineHealthStatus + :param boot_diagnostics: Boot Diagnostics is a debugging feature which + allows you to view Console Output and Screenshot to diagnose VM status. +

    You can easily view the output of your console log.

    + Azure also enables you to see a screenshot of the VM from the hypervisor. + :type boot_diagnostics: + ~azure.mgmt.compute.v2017_12_01.models.BootDiagnosticsInstanceView + :param statuses: The resource status information. + :type statuses: + list[~azure.mgmt.compute.v2017_12_01.models.InstanceViewStatus] + :param placement_group_id: The placement group in which the VM is running. + If the VM is deallocated it will not have a placementGroupId. + :type placement_group_id: str + """ + + _validation = { + 'vm_health': {'readonly': True}, + } + + _attribute_map = { + 'platform_update_domain': {'key': 'platformUpdateDomain', 'type': 'int'}, + 'platform_fault_domain': {'key': 'platformFaultDomain', 'type': 'int'}, + 'rdp_thumb_print': {'key': 'rdpThumbPrint', 'type': 'str'}, + 'vm_agent': {'key': 'vmAgent', 'type': 'VirtualMachineAgentInstanceView'}, + 'maintenance_redeploy_status': {'key': 'maintenanceRedeployStatus', 'type': 'MaintenanceRedeployStatus'}, + 'disks': {'key': 'disks', 'type': '[DiskInstanceView]'}, + 'extensions': {'key': 'extensions', 'type': '[VirtualMachineExtensionInstanceView]'}, + 'vm_health': {'key': 'vmHealth', 'type': 'VirtualMachineHealthStatus'}, + 'boot_diagnostics': {'key': 'bootDiagnostics', 'type': 'BootDiagnosticsInstanceView'}, + 'statuses': {'key': 'statuses', 'type': '[InstanceViewStatus]'}, + 'placement_group_id': {'key': 'placementGroupId', 'type': 'str'}, + } + + def __init__(self, *, platform_update_domain: int=None, platform_fault_domain: int=None, rdp_thumb_print: str=None, vm_agent=None, maintenance_redeploy_status=None, disks=None, extensions=None, boot_diagnostics=None, statuses=None, placement_group_id: str=None, **kwargs) -> None: + super(VirtualMachineScaleSetVMInstanceView, self).__init__(**kwargs) + self.platform_update_domain = platform_update_domain + self.platform_fault_domain = platform_fault_domain + self.rdp_thumb_print = rdp_thumb_print + self.vm_agent = vm_agent + self.maintenance_redeploy_status = maintenance_redeploy_status + self.disks = disks + self.extensions = extensions + self.vm_health = None + self.boot_diagnostics = boot_diagnostics + self.statuses = statuses + self.placement_group_id = placement_group_id + + +class VirtualMachineScaleSetVMProfile(Model): + """Describes a virtual machine scale set virtual machine profile. + + :param os_profile: Specifies the operating system settings for the virtual + machines in the scale set. + :type os_profile: + ~azure.mgmt.compute.v2017_12_01.models.VirtualMachineScaleSetOSProfile + :param storage_profile: Specifies the storage settings for the virtual + machine disks. + :type storage_profile: + ~azure.mgmt.compute.v2017_12_01.models.VirtualMachineScaleSetStorageProfile + :param network_profile: Specifies properties of the network interfaces of + the virtual machines in the scale set. + :type network_profile: + ~azure.mgmt.compute.v2017_12_01.models.VirtualMachineScaleSetNetworkProfile + :param diagnostics_profile: Specifies the boot diagnostic settings state. +

    Minimum api-version: 2015-06-15. + :type diagnostics_profile: + ~azure.mgmt.compute.v2017_12_01.models.DiagnosticsProfile + :param extension_profile: Specifies a collection of settings for + extensions installed on virtual machines in the scale set. + :type extension_profile: + ~azure.mgmt.compute.v2017_12_01.models.VirtualMachineScaleSetExtensionProfile + :param license_type: Specifies that the image or disk that is being used + was licensed on-premises. This element is only used for images that + contain the Windows Server operating system.

    Possible values are: +

    Windows_Client

    Windows_Server

    If this element + is included in a request for an update, the value must match the initial + value. This value cannot be updated.

    For more information, see + [Azure Hybrid Use Benefit for Windows + Server](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-hybrid-use-benefit-licensing?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json) +

    Minimum api-version: 2015-06-15 + :type license_type: str + :param priority: Specifies the priority for the virtual machines in the + scale set.

    Minimum api-version: 2017-10-30-preview. Possible + values include: 'Regular', 'Low' + :type priority: str or + ~azure.mgmt.compute.v2017_12_01.models.VirtualMachinePriorityTypes + :param eviction_policy: Specifies the eviction policy for virtual machines + in a low priority scale set.

    Minimum api-version: + 2017-10-30-preview. Possible values include: 'Deallocate', 'Delete' + :type eviction_policy: str or + ~azure.mgmt.compute.v2017_12_01.models.VirtualMachineEvictionPolicyTypes + """ + + _attribute_map = { + 'os_profile': {'key': 'osProfile', 'type': 'VirtualMachineScaleSetOSProfile'}, + 'storage_profile': {'key': 'storageProfile', 'type': 'VirtualMachineScaleSetStorageProfile'}, + 'network_profile': {'key': 'networkProfile', 'type': 'VirtualMachineScaleSetNetworkProfile'}, + 'diagnostics_profile': {'key': 'diagnosticsProfile', 'type': 'DiagnosticsProfile'}, + 'extension_profile': {'key': 'extensionProfile', 'type': 'VirtualMachineScaleSetExtensionProfile'}, + 'license_type': {'key': 'licenseType', 'type': 'str'}, + 'priority': {'key': 'priority', 'type': 'str'}, + 'eviction_policy': {'key': 'evictionPolicy', 'type': 'str'}, + } + + def __init__(self, *, os_profile=None, storage_profile=None, network_profile=None, diagnostics_profile=None, extension_profile=None, license_type: str=None, priority=None, eviction_policy=None, **kwargs) -> None: + super(VirtualMachineScaleSetVMProfile, self).__init__(**kwargs) + self.os_profile = os_profile + self.storage_profile = storage_profile + self.network_profile = network_profile + self.diagnostics_profile = diagnostics_profile + self.extension_profile = extension_profile + self.license_type = license_type + self.priority = priority + self.eviction_policy = eviction_policy + + +class VirtualMachineSize(Model): + """Describes the properties of a VM size. + + :param name: The name of the virtual machine size. + :type name: str + :param number_of_cores: The number of cores supported by the virtual + machine size. + :type number_of_cores: int + :param os_disk_size_in_mb: The OS disk size, in MB, allowed by the virtual + machine size. + :type os_disk_size_in_mb: int + :param resource_disk_size_in_mb: The resource disk size, in MB, allowed by + the virtual machine size. + :type resource_disk_size_in_mb: int + :param memory_in_mb: The amount of memory, in MB, supported by the virtual + machine size. + :type memory_in_mb: int + :param max_data_disk_count: The maximum number of data disks that can be + attached to the virtual machine size. + :type max_data_disk_count: int + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'number_of_cores': {'key': 'numberOfCores', 'type': 'int'}, + 'os_disk_size_in_mb': {'key': 'osDiskSizeInMB', 'type': 'int'}, + 'resource_disk_size_in_mb': {'key': 'resourceDiskSizeInMB', 'type': 'int'}, + 'memory_in_mb': {'key': 'memoryInMB', 'type': 'int'}, + 'max_data_disk_count': {'key': 'maxDataDiskCount', 'type': 'int'}, + } + + def __init__(self, *, name: str=None, number_of_cores: int=None, os_disk_size_in_mb: int=None, resource_disk_size_in_mb: int=None, memory_in_mb: int=None, max_data_disk_count: int=None, **kwargs) -> None: + super(VirtualMachineSize, self).__init__(**kwargs) + self.name = name + self.number_of_cores = number_of_cores + self.os_disk_size_in_mb = os_disk_size_in_mb + self.resource_disk_size_in_mb = resource_disk_size_in_mb + self.memory_in_mb = memory_in_mb + self.max_data_disk_count = max_data_disk_count + + +class VirtualMachineStatusCodeCount(Model): + """The status code and count of the virtual machine scale set instance view + status summary. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar code: The instance view status code. + :vartype code: str + :ivar count: The number of instances having a particular status code. + :vartype count: int + """ + + _validation = { + 'code': {'readonly': True}, + 'count': {'readonly': True}, + } + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + 'count': {'key': 'count', 'type': 'int'}, + } + + def __init__(self, **kwargs) -> None: + super(VirtualMachineStatusCodeCount, self).__init__(**kwargs) + self.code = None + self.count = None + + +class VirtualMachineUpdate(UpdateResource): + """Describes a Virtual Machine Update. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :param tags: Resource tags + :type tags: dict[str, str] + :param plan: Specifies information about the marketplace image used to + create the virtual machine. This element is only used for marketplace + images. Before you can use a marketplace image from an API, you must + enable the image for programmatic use. In the Azure portal, find the + marketplace image that you want to use and then click **Want to deploy + programmatically, Get Started ->**. Enter any required information and + then click **Save**. + :type plan: ~azure.mgmt.compute.v2017_12_01.models.Plan + :param hardware_profile: Specifies the hardware settings for the virtual + machine. + :type hardware_profile: + ~azure.mgmt.compute.v2017_12_01.models.HardwareProfile + :param storage_profile: Specifies the storage settings for the virtual + machine disks. + :type storage_profile: + ~azure.mgmt.compute.v2017_12_01.models.StorageProfile + :param os_profile: Specifies the operating system settings for the virtual + machine. + :type os_profile: ~azure.mgmt.compute.v2017_12_01.models.OSProfile + :param network_profile: Specifies the network interfaces of the virtual + machine. + :type network_profile: + ~azure.mgmt.compute.v2017_12_01.models.NetworkProfile + :param diagnostics_profile: Specifies the boot diagnostic settings state. +

    Minimum api-version: 2015-06-15. + :type diagnostics_profile: + ~azure.mgmt.compute.v2017_12_01.models.DiagnosticsProfile + :param availability_set: Specifies information about the availability set + that the virtual machine should be assigned to. Virtual machines specified + in the same availability set are allocated to different nodes to maximize + availability. For more information about availability sets, see [Manage + the availability of virtual + machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-manage-availability?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). +

    For more information on Azure planned maintenance, see [Planned + maintenance for virtual machines in + Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-planned-maintenance?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json) +

    Currently, a VM can only be added to availability set at creation + time. An existing VM cannot be added to an availability set. + :type availability_set: ~azure.mgmt.compute.v2017_12_01.models.SubResource + :ivar provisioning_state: The provisioning state, which only appears in + the response. + :vartype provisioning_state: str + :ivar instance_view: The virtual machine instance view. + :vartype instance_view: + ~azure.mgmt.compute.v2017_12_01.models.VirtualMachineInstanceView + :param license_type: Specifies that the image or disk that is being used + was licensed on-premises. This element is only used for images that + contain the Windows Server operating system.

    Possible values are: +

    Windows_Client

    Windows_Server

    If this element + is included in a request for an update, the value must match the initial + value. This value cannot be updated.

    For more information, see + [Azure Hybrid Use Benefit for Windows + Server](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-hybrid-use-benefit-licensing?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json) +

    Minimum api-version: 2015-06-15 + :type license_type: str + :ivar vm_id: Specifies the VM unique ID which is a 128-bits identifier + that is encoded and stored in all Azure IaaS VMs SMBIOS and can be read + using platform BIOS commands. + :vartype vm_id: str + :param identity: The identity of the virtual machine, if configured. + :type identity: + ~azure.mgmt.compute.v2017_12_01.models.VirtualMachineIdentity + :param zones: The virtual machine zones. + :type zones: list[str] + """ + + _validation = { + 'provisioning_state': {'readonly': True}, + 'instance_view': {'readonly': True}, + 'vm_id': {'readonly': True}, + } + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + 'plan': {'key': 'plan', 'type': 'Plan'}, + 'hardware_profile': {'key': 'properties.hardwareProfile', 'type': 'HardwareProfile'}, + 'storage_profile': {'key': 'properties.storageProfile', 'type': 'StorageProfile'}, + 'os_profile': {'key': 'properties.osProfile', 'type': 'OSProfile'}, + 'network_profile': {'key': 'properties.networkProfile', 'type': 'NetworkProfile'}, + 'diagnostics_profile': {'key': 'properties.diagnosticsProfile', 'type': 'DiagnosticsProfile'}, + 'availability_set': {'key': 'properties.availabilitySet', 'type': 'SubResource'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'instance_view': {'key': 'properties.instanceView', 'type': 'VirtualMachineInstanceView'}, + 'license_type': {'key': 'properties.licenseType', 'type': 'str'}, + 'vm_id': {'key': 'properties.vmId', 'type': 'str'}, + 'identity': {'key': 'identity', 'type': 'VirtualMachineIdentity'}, + 'zones': {'key': 'zones', 'type': '[str]'}, + } + + def __init__(self, *, tags=None, plan=None, hardware_profile=None, storage_profile=None, os_profile=None, network_profile=None, diagnostics_profile=None, availability_set=None, license_type: str=None, identity=None, zones=None, **kwargs) -> None: + super(VirtualMachineUpdate, self).__init__(tags=tags, **kwargs) + self.plan = plan + self.hardware_profile = hardware_profile + self.storage_profile = storage_profile + self.os_profile = os_profile + self.network_profile = network_profile + self.diagnostics_profile = diagnostics_profile + self.availability_set = availability_set + self.provisioning_state = None + self.instance_view = None + self.license_type = license_type + self.vm_id = None + self.identity = identity + self.zones = zones + + +class WindowsConfiguration(Model): + """Specifies Windows operating system settings on the virtual machine. + + :param provision_vm_agent: Indicates whether virtual machine agent should + be provisioned on the virtual machine.

    When this property is not + specified in the request body, default behavior is to set it to true. + This will ensure that VM Agent is installed on the VM so that extensions + can be added to the VM later. + :type provision_vm_agent: bool + :param enable_automatic_updates: Indicates whether virtual machine is + enabled for automatic updates. + :type enable_automatic_updates: bool + :param time_zone: Specifies the time zone of the virtual machine. e.g. + "Pacific Standard Time" + :type time_zone: str + :param additional_unattend_content: Specifies additional base-64 encoded + XML formatted information that can be included in the Unattend.xml file, + which is used by Windows Setup. + :type additional_unattend_content: + list[~azure.mgmt.compute.v2017_12_01.models.AdditionalUnattendContent] + :param win_rm: Specifies the Windows Remote Management listeners. This + enables remote Windows PowerShell. + :type win_rm: ~azure.mgmt.compute.v2017_12_01.models.WinRMConfiguration + """ + + _attribute_map = { + 'provision_vm_agent': {'key': 'provisionVMAgent', 'type': 'bool'}, + 'enable_automatic_updates': {'key': 'enableAutomaticUpdates', 'type': 'bool'}, + 'time_zone': {'key': 'timeZone', 'type': 'str'}, + 'additional_unattend_content': {'key': 'additionalUnattendContent', 'type': '[AdditionalUnattendContent]'}, + 'win_rm': {'key': 'winRM', 'type': 'WinRMConfiguration'}, + } + + def __init__(self, *, provision_vm_agent: bool=None, enable_automatic_updates: bool=None, time_zone: str=None, additional_unattend_content=None, win_rm=None, **kwargs) -> None: + super(WindowsConfiguration, self).__init__(**kwargs) + self.provision_vm_agent = provision_vm_agent + self.enable_automatic_updates = enable_automatic_updates + self.time_zone = time_zone + self.additional_unattend_content = additional_unattend_content + self.win_rm = win_rm + + +class WinRMConfiguration(Model): + """Describes Windows Remote Management configuration of the VM. + + :param listeners: The list of Windows Remote Management listeners + :type listeners: + list[~azure.mgmt.compute.v2017_12_01.models.WinRMListener] + """ + + _attribute_map = { + 'listeners': {'key': 'listeners', 'type': '[WinRMListener]'}, + } + + def __init__(self, *, listeners=None, **kwargs) -> None: + super(WinRMConfiguration, self).__init__(**kwargs) + self.listeners = listeners + + +class WinRMListener(Model): + """Describes Protocol and thumbprint of Windows Remote Management listener. + + :param protocol: Specifies the protocol of listener.

    Possible + values are:
    **http**

    **https**. Possible values include: + 'Http', 'Https' + :type protocol: str or + ~azure.mgmt.compute.v2017_12_01.models.ProtocolTypes + :param certificate_url: This is the URL of a certificate that has been + uploaded to Key Vault as a secret. For adding a secret to the Key Vault, + see [Add a key or secret to the key + vault](https://docs.microsoft.com/azure/key-vault/key-vault-get-started/#add). + In this case, your certificate needs to be It is the Base64 encoding of + the following JSON Object which is encoded in UTF-8:

    {
    + "data":"",
    "dataType":"pfx",
    + "password":""
    } + :type certificate_url: str + """ + + _attribute_map = { + 'protocol': {'key': 'protocol', 'type': 'ProtocolTypes'}, + 'certificate_url': {'key': 'certificateUrl', 'type': 'str'}, + } + + def __init__(self, *, protocol=None, certificate_url: str=None, **kwargs) -> None: + super(WinRMListener, self).__init__(**kwargs) + self.protocol = protocol + self.certificate_url = certificate_url diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/_paged_models.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/_paged_models.py new file mode 100644 index 000000000000..e702a111dc5c --- /dev/null +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/_paged_models.py @@ -0,0 +1,170 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.paging import Paged + + +class ComputeOperationValuePaged(Paged): + """ + A paging container for iterating over a list of :class:`ComputeOperationValue ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[ComputeOperationValue]'} + } + + def __init__(self, *args, **kwargs): + + super(ComputeOperationValuePaged, self).__init__(*args, **kwargs) +class AvailabilitySetPaged(Paged): + """ + A paging container for iterating over a list of :class:`AvailabilitySet ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[AvailabilitySet]'} + } + + def __init__(self, *args, **kwargs): + + super(AvailabilitySetPaged, self).__init__(*args, **kwargs) +class VirtualMachineSizePaged(Paged): + """ + A paging container for iterating over a list of :class:`VirtualMachineSize ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[VirtualMachineSize]'} + } + + def __init__(self, *args, **kwargs): + + super(VirtualMachineSizePaged, self).__init__(*args, **kwargs) +class VirtualMachinePaged(Paged): + """ + A paging container for iterating over a list of :class:`VirtualMachine ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[VirtualMachine]'} + } + + def __init__(self, *args, **kwargs): + + super(VirtualMachinePaged, self).__init__(*args, **kwargs) +class UsagePaged(Paged): + """ + A paging container for iterating over a list of :class:`Usage ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[Usage]'} + } + + def __init__(self, *args, **kwargs): + + super(UsagePaged, self).__init__(*args, **kwargs) +class ImagePaged(Paged): + """ + A paging container for iterating over a list of :class:`Image ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[Image]'} + } + + def __init__(self, *args, **kwargs): + + super(ImagePaged, self).__init__(*args, **kwargs) +class VirtualMachineScaleSetPaged(Paged): + """ + A paging container for iterating over a list of :class:`VirtualMachineScaleSet ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[VirtualMachineScaleSet]'} + } + + def __init__(self, *args, **kwargs): + + super(VirtualMachineScaleSetPaged, self).__init__(*args, **kwargs) +class VirtualMachineScaleSetSkuPaged(Paged): + """ + A paging container for iterating over a list of :class:`VirtualMachineScaleSetSku ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[VirtualMachineScaleSetSku]'} + } + + def __init__(self, *args, **kwargs): + + super(VirtualMachineScaleSetSkuPaged, self).__init__(*args, **kwargs) +class UpgradeOperationHistoricalStatusInfoPaged(Paged): + """ + A paging container for iterating over a list of :class:`UpgradeOperationHistoricalStatusInfo ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[UpgradeOperationHistoricalStatusInfo]'} + } + + def __init__(self, *args, **kwargs): + + super(UpgradeOperationHistoricalStatusInfoPaged, self).__init__(*args, **kwargs) +class VirtualMachineScaleSetExtensionPaged(Paged): + """ + A paging container for iterating over a list of :class:`VirtualMachineScaleSetExtension ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[VirtualMachineScaleSetExtension]'} + } + + def __init__(self, *args, **kwargs): + + super(VirtualMachineScaleSetExtensionPaged, self).__init__(*args, **kwargs) +class VirtualMachineScaleSetVMPaged(Paged): + """ + A paging container for iterating over a list of :class:`VirtualMachineScaleSetVM ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[VirtualMachineScaleSetVM]'} + } + + def __init__(self, *args, **kwargs): + + super(VirtualMachineScaleSetVMPaged, self).__init__(*args, **kwargs) +class RunCommandDocumentBasePaged(Paged): + """ + A paging container for iterating over a list of :class:`RunCommandDocumentBase ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[RunCommandDocumentBase]'} + } + + def __init__(self, *args, **kwargs): + + super(RunCommandDocumentBasePaged, self).__init__(*args, **kwargs) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/additional_unattend_content.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/additional_unattend_content.py deleted file mode 100644 index ddbc9f5f506f..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/additional_unattend_content.py +++ /dev/null @@ -1,52 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class AdditionalUnattendContent(Model): - """Specifies additional XML formatted information that can be included in the - Unattend.xml file, which is used by Windows Setup. Contents are defined by - setting name, component name, and the pass in which the content is applied. - - :param pass_name: The pass name. Currently, the only allowable value is - OobeSystem. Possible values include: 'OobeSystem' - :type pass_name: str or ~azure.mgmt.compute.v2017_12_01.models.PassNames - :param component_name: The component name. Currently, the only allowable - value is Microsoft-Windows-Shell-Setup. Possible values include: - 'Microsoft-Windows-Shell-Setup' - :type component_name: str or - ~azure.mgmt.compute.v2017_12_01.models.ComponentNames - :param setting_name: Specifies the name of the setting to which the - content applies. Possible values are: FirstLogonCommands and AutoLogon. - Possible values include: 'AutoLogon', 'FirstLogonCommands' - :type setting_name: str or - ~azure.mgmt.compute.v2017_12_01.models.SettingNames - :param content: Specifies the XML formatted content that is added to the - unattend.xml file for the specified path and component. The XML must be - less than 4KB and must include the root element for the setting or feature - that is being inserted. - :type content: str - """ - - _attribute_map = { - 'pass_name': {'key': 'passName', 'type': 'PassNames'}, - 'component_name': {'key': 'componentName', 'type': 'ComponentNames'}, - 'setting_name': {'key': 'settingName', 'type': 'SettingNames'}, - 'content': {'key': 'content', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(AdditionalUnattendContent, self).__init__(**kwargs) - self.pass_name = kwargs.get('pass_name', None) - self.component_name = kwargs.get('component_name', None) - self.setting_name = kwargs.get('setting_name', None) - self.content = kwargs.get('content', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/additional_unattend_content_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/additional_unattend_content_py3.py deleted file mode 100644 index 3c4cad773bf5..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/additional_unattend_content_py3.py +++ /dev/null @@ -1,52 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class AdditionalUnattendContent(Model): - """Specifies additional XML formatted information that can be included in the - Unattend.xml file, which is used by Windows Setup. Contents are defined by - setting name, component name, and the pass in which the content is applied. - - :param pass_name: The pass name. Currently, the only allowable value is - OobeSystem. Possible values include: 'OobeSystem' - :type pass_name: str or ~azure.mgmt.compute.v2017_12_01.models.PassNames - :param component_name: The component name. Currently, the only allowable - value is Microsoft-Windows-Shell-Setup. Possible values include: - 'Microsoft-Windows-Shell-Setup' - :type component_name: str or - ~azure.mgmt.compute.v2017_12_01.models.ComponentNames - :param setting_name: Specifies the name of the setting to which the - content applies. Possible values are: FirstLogonCommands and AutoLogon. - Possible values include: 'AutoLogon', 'FirstLogonCommands' - :type setting_name: str or - ~azure.mgmt.compute.v2017_12_01.models.SettingNames - :param content: Specifies the XML formatted content that is added to the - unattend.xml file for the specified path and component. The XML must be - less than 4KB and must include the root element for the setting or feature - that is being inserted. - :type content: str - """ - - _attribute_map = { - 'pass_name': {'key': 'passName', 'type': 'PassNames'}, - 'component_name': {'key': 'componentName', 'type': 'ComponentNames'}, - 'setting_name': {'key': 'settingName', 'type': 'SettingNames'}, - 'content': {'key': 'content', 'type': 'str'}, - } - - def __init__(self, *, pass_name=None, component_name=None, setting_name=None, content: str=None, **kwargs) -> None: - super(AdditionalUnattendContent, self).__init__(**kwargs) - self.pass_name = pass_name - self.component_name = component_name - self.setting_name = setting_name - self.content = content diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/api_entity_reference.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/api_entity_reference.py deleted file mode 100644 index d43730af3659..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/api_entity_reference.py +++ /dev/null @@ -1,29 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ApiEntityReference(Model): - """The API entity reference. - - :param id: The ARM resource id in the form of - /subscriptions/{SubscriptionId}/resourceGroups/{ResourceGroupName}/... - :type id: str - """ - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ApiEntityReference, self).__init__(**kwargs) - self.id = kwargs.get('id', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/api_entity_reference_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/api_entity_reference_py3.py deleted file mode 100644 index d42dfb1a5fd0..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/api_entity_reference_py3.py +++ /dev/null @@ -1,29 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ApiEntityReference(Model): - """The API entity reference. - - :param id: The ARM resource id in the form of - /subscriptions/{SubscriptionId}/resourceGroups/{ResourceGroupName}/... - :type id: str - """ - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - } - - def __init__(self, *, id: str=None, **kwargs) -> None: - super(ApiEntityReference, self).__init__(**kwargs) - self.id = id diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/api_error.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/api_error.py deleted file mode 100644 index 253e4718038d..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/api_error.py +++ /dev/null @@ -1,44 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ApiError(Model): - """Api error. - - :param details: The Api error details - :type details: list[~azure.mgmt.compute.v2017_12_01.models.ApiErrorBase] - :param innererror: The Api inner error - :type innererror: ~azure.mgmt.compute.v2017_12_01.models.InnerError - :param code: The error code. - :type code: str - :param target: The target of the particular error. - :type target: str - :param message: The error message. - :type message: str - """ - - _attribute_map = { - 'details': {'key': 'details', 'type': '[ApiErrorBase]'}, - 'innererror': {'key': 'innererror', 'type': 'InnerError'}, - 'code': {'key': 'code', 'type': 'str'}, - 'target': {'key': 'target', 'type': 'str'}, - 'message': {'key': 'message', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ApiError, self).__init__(**kwargs) - self.details = kwargs.get('details', None) - self.innererror = kwargs.get('innererror', None) - self.code = kwargs.get('code', None) - self.target = kwargs.get('target', None) - self.message = kwargs.get('message', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/api_error_base.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/api_error_base.py deleted file mode 100644 index 655c08638905..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/api_error_base.py +++ /dev/null @@ -1,36 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ApiErrorBase(Model): - """Api error base. - - :param code: The error code. - :type code: str - :param target: The target of the particular error. - :type target: str - :param message: The error message. - :type message: str - """ - - _attribute_map = { - 'code': {'key': 'code', 'type': 'str'}, - 'target': {'key': 'target', 'type': 'str'}, - 'message': {'key': 'message', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ApiErrorBase, self).__init__(**kwargs) - self.code = kwargs.get('code', None) - self.target = kwargs.get('target', None) - self.message = kwargs.get('message', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/api_error_base_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/api_error_base_py3.py deleted file mode 100644 index 5ba95aa0283e..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/api_error_base_py3.py +++ /dev/null @@ -1,36 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ApiErrorBase(Model): - """Api error base. - - :param code: The error code. - :type code: str - :param target: The target of the particular error. - :type target: str - :param message: The error message. - :type message: str - """ - - _attribute_map = { - 'code': {'key': 'code', 'type': 'str'}, - 'target': {'key': 'target', 'type': 'str'}, - 'message': {'key': 'message', 'type': 'str'}, - } - - def __init__(self, *, code: str=None, target: str=None, message: str=None, **kwargs) -> None: - super(ApiErrorBase, self).__init__(**kwargs) - self.code = code - self.target = target - self.message = message diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/api_error_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/api_error_py3.py deleted file mode 100644 index f399dc1395af..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/api_error_py3.py +++ /dev/null @@ -1,44 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ApiError(Model): - """Api error. - - :param details: The Api error details - :type details: list[~azure.mgmt.compute.v2017_12_01.models.ApiErrorBase] - :param innererror: The Api inner error - :type innererror: ~azure.mgmt.compute.v2017_12_01.models.InnerError - :param code: The error code. - :type code: str - :param target: The target of the particular error. - :type target: str - :param message: The error message. - :type message: str - """ - - _attribute_map = { - 'details': {'key': 'details', 'type': '[ApiErrorBase]'}, - 'innererror': {'key': 'innererror', 'type': 'InnerError'}, - 'code': {'key': 'code', 'type': 'str'}, - 'target': {'key': 'target', 'type': 'str'}, - 'message': {'key': 'message', 'type': 'str'}, - } - - def __init__(self, *, details=None, innererror=None, code: str=None, target: str=None, message: str=None, **kwargs) -> None: - super(ApiError, self).__init__(**kwargs) - self.details = details - self.innererror = innererror - self.code = code - self.target = target - self.message = message diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/auto_os_upgrade_policy.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/auto_os_upgrade_policy.py deleted file mode 100644 index 2c74af408892..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/auto_os_upgrade_policy.py +++ /dev/null @@ -1,29 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class AutoOSUpgradePolicy(Model): - """The configuration parameters used for performing automatic OS upgrade. - - :param disable_auto_rollback: Whether OS image rollback feature should be - disabled. Default value is false. - :type disable_auto_rollback: bool - """ - - _attribute_map = { - 'disable_auto_rollback': {'key': 'disableAutoRollback', 'type': 'bool'}, - } - - def __init__(self, **kwargs): - super(AutoOSUpgradePolicy, self).__init__(**kwargs) - self.disable_auto_rollback = kwargs.get('disable_auto_rollback', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/auto_os_upgrade_policy_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/auto_os_upgrade_policy_py3.py deleted file mode 100644 index 3e3e751838a8..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/auto_os_upgrade_policy_py3.py +++ /dev/null @@ -1,29 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class AutoOSUpgradePolicy(Model): - """The configuration parameters used for performing automatic OS upgrade. - - :param disable_auto_rollback: Whether OS image rollback feature should be - disabled. Default value is false. - :type disable_auto_rollback: bool - """ - - _attribute_map = { - 'disable_auto_rollback': {'key': 'disableAutoRollback', 'type': 'bool'}, - } - - def __init__(self, *, disable_auto_rollback: bool=None, **kwargs) -> None: - super(AutoOSUpgradePolicy, self).__init__(**kwargs) - self.disable_auto_rollback = disable_auto_rollback diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/availability_set.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/availability_set.py deleted file mode 100644 index 54eed7bf0dd7..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/availability_set.py +++ /dev/null @@ -1,85 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource import Resource - - -class AvailabilitySet(Resource): - """Specifies information about the availability set that the virtual machine - should be assigned to. Virtual machines specified in the same availability - set are allocated to different nodes to maximize availability. For more - information about availability sets, see [Manage the availability of - virtual - machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-manage-availability?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). -

    For more information on Azure planned maintenance, see [Planned - maintenance for virtual machines in - Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-planned-maintenance?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json) -

    Currently, a VM can only be added to availability set at creation - time. An existing VM cannot be added to an availability set. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource Id - :vartype id: str - :ivar name: Resource name - :vartype name: str - :ivar type: Resource type - :vartype type: str - :param location: Required. Resource location - :type location: str - :param tags: Resource tags - :type tags: dict[str, str] - :param platform_update_domain_count: Update Domain count. - :type platform_update_domain_count: int - :param platform_fault_domain_count: Fault Domain count. - :type platform_fault_domain_count: int - :param virtual_machines: A list of references to all virtual machines in - the availability set. - :type virtual_machines: - list[~azure.mgmt.compute.v2017_12_01.models.SubResource] - :ivar statuses: The resource status information. - :vartype statuses: - list[~azure.mgmt.compute.v2017_12_01.models.InstanceViewStatus] - :param sku: Sku of the availability set - :type sku: ~azure.mgmt.compute.v2017_12_01.models.Sku - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - 'statuses': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'platform_update_domain_count': {'key': 'properties.platformUpdateDomainCount', 'type': 'int'}, - 'platform_fault_domain_count': {'key': 'properties.platformFaultDomainCount', 'type': 'int'}, - 'virtual_machines': {'key': 'properties.virtualMachines', 'type': '[SubResource]'}, - 'statuses': {'key': 'properties.statuses', 'type': '[InstanceViewStatus]'}, - 'sku': {'key': 'sku', 'type': 'Sku'}, - } - - def __init__(self, **kwargs): - super(AvailabilitySet, self).__init__(**kwargs) - self.platform_update_domain_count = kwargs.get('platform_update_domain_count', None) - self.platform_fault_domain_count = kwargs.get('platform_fault_domain_count', None) - self.virtual_machines = kwargs.get('virtual_machines', None) - self.statuses = None - self.sku = kwargs.get('sku', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/availability_set_paged.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/availability_set_paged.py deleted file mode 100644 index 7dcb13538199..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/availability_set_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class AvailabilitySetPaged(Paged): - """ - A paging container for iterating over a list of :class:`AvailabilitySet ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[AvailabilitySet]'} - } - - def __init__(self, *args, **kwargs): - - super(AvailabilitySetPaged, self).__init__(*args, **kwargs) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/availability_set_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/availability_set_py3.py deleted file mode 100644 index ac1e0117097d..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/availability_set_py3.py +++ /dev/null @@ -1,85 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource_py3 import Resource - - -class AvailabilitySet(Resource): - """Specifies information about the availability set that the virtual machine - should be assigned to. Virtual machines specified in the same availability - set are allocated to different nodes to maximize availability. For more - information about availability sets, see [Manage the availability of - virtual - machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-manage-availability?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). -

    For more information on Azure planned maintenance, see [Planned - maintenance for virtual machines in - Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-planned-maintenance?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json) -

    Currently, a VM can only be added to availability set at creation - time. An existing VM cannot be added to an availability set. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource Id - :vartype id: str - :ivar name: Resource name - :vartype name: str - :ivar type: Resource type - :vartype type: str - :param location: Required. Resource location - :type location: str - :param tags: Resource tags - :type tags: dict[str, str] - :param platform_update_domain_count: Update Domain count. - :type platform_update_domain_count: int - :param platform_fault_domain_count: Fault Domain count. - :type platform_fault_domain_count: int - :param virtual_machines: A list of references to all virtual machines in - the availability set. - :type virtual_machines: - list[~azure.mgmt.compute.v2017_12_01.models.SubResource] - :ivar statuses: The resource status information. - :vartype statuses: - list[~azure.mgmt.compute.v2017_12_01.models.InstanceViewStatus] - :param sku: Sku of the availability set - :type sku: ~azure.mgmt.compute.v2017_12_01.models.Sku - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - 'statuses': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'platform_update_domain_count': {'key': 'properties.platformUpdateDomainCount', 'type': 'int'}, - 'platform_fault_domain_count': {'key': 'properties.platformFaultDomainCount', 'type': 'int'}, - 'virtual_machines': {'key': 'properties.virtualMachines', 'type': '[SubResource]'}, - 'statuses': {'key': 'properties.statuses', 'type': '[InstanceViewStatus]'}, - 'sku': {'key': 'sku', 'type': 'Sku'}, - } - - def __init__(self, *, location: str, tags=None, platform_update_domain_count: int=None, platform_fault_domain_count: int=None, virtual_machines=None, sku=None, **kwargs) -> None: - super(AvailabilitySet, self).__init__(location=location, tags=tags, **kwargs) - self.platform_update_domain_count = platform_update_domain_count - self.platform_fault_domain_count = platform_fault_domain_count - self.virtual_machines = virtual_machines - self.statuses = None - self.sku = sku diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/availability_set_update.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/availability_set_update.py deleted file mode 100644 index 8c38fcca798b..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/availability_set_update.py +++ /dev/null @@ -1,58 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .update_resource import UpdateResource - - -class AvailabilitySetUpdate(UpdateResource): - """Specifies information about the availability set that the virtual machine - should be assigned to. Only tags may be updated. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :param tags: Resource tags - :type tags: dict[str, str] - :param platform_update_domain_count: Update Domain count. - :type platform_update_domain_count: int - :param platform_fault_domain_count: Fault Domain count. - :type platform_fault_domain_count: int - :param virtual_machines: A list of references to all virtual machines in - the availability set. - :type virtual_machines: - list[~azure.mgmt.compute.v2017_12_01.models.SubResource] - :ivar statuses: The resource status information. - :vartype statuses: - list[~azure.mgmt.compute.v2017_12_01.models.InstanceViewStatus] - :param sku: Sku of the availability set - :type sku: ~azure.mgmt.compute.v2017_12_01.models.Sku - """ - - _validation = { - 'statuses': {'readonly': True}, - } - - _attribute_map = { - 'tags': {'key': 'tags', 'type': '{str}'}, - 'platform_update_domain_count': {'key': 'properties.platformUpdateDomainCount', 'type': 'int'}, - 'platform_fault_domain_count': {'key': 'properties.platformFaultDomainCount', 'type': 'int'}, - 'virtual_machines': {'key': 'properties.virtualMachines', 'type': '[SubResource]'}, - 'statuses': {'key': 'properties.statuses', 'type': '[InstanceViewStatus]'}, - 'sku': {'key': 'sku', 'type': 'Sku'}, - } - - def __init__(self, **kwargs): - super(AvailabilitySetUpdate, self).__init__(**kwargs) - self.platform_update_domain_count = kwargs.get('platform_update_domain_count', None) - self.platform_fault_domain_count = kwargs.get('platform_fault_domain_count', None) - self.virtual_machines = kwargs.get('virtual_machines', None) - self.statuses = None - self.sku = kwargs.get('sku', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/availability_set_update_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/availability_set_update_py3.py deleted file mode 100644 index 0feeb62c51dc..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/availability_set_update_py3.py +++ /dev/null @@ -1,58 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .update_resource_py3 import UpdateResource - - -class AvailabilitySetUpdate(UpdateResource): - """Specifies information about the availability set that the virtual machine - should be assigned to. Only tags may be updated. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :param tags: Resource tags - :type tags: dict[str, str] - :param platform_update_domain_count: Update Domain count. - :type platform_update_domain_count: int - :param platform_fault_domain_count: Fault Domain count. - :type platform_fault_domain_count: int - :param virtual_machines: A list of references to all virtual machines in - the availability set. - :type virtual_machines: - list[~azure.mgmt.compute.v2017_12_01.models.SubResource] - :ivar statuses: The resource status information. - :vartype statuses: - list[~azure.mgmt.compute.v2017_12_01.models.InstanceViewStatus] - :param sku: Sku of the availability set - :type sku: ~azure.mgmt.compute.v2017_12_01.models.Sku - """ - - _validation = { - 'statuses': {'readonly': True}, - } - - _attribute_map = { - 'tags': {'key': 'tags', 'type': '{str}'}, - 'platform_update_domain_count': {'key': 'properties.platformUpdateDomainCount', 'type': 'int'}, - 'platform_fault_domain_count': {'key': 'properties.platformFaultDomainCount', 'type': 'int'}, - 'virtual_machines': {'key': 'properties.virtualMachines', 'type': '[SubResource]'}, - 'statuses': {'key': 'properties.statuses', 'type': '[InstanceViewStatus]'}, - 'sku': {'key': 'sku', 'type': 'Sku'}, - } - - def __init__(self, *, tags=None, platform_update_domain_count: int=None, platform_fault_domain_count: int=None, virtual_machines=None, sku=None, **kwargs) -> None: - super(AvailabilitySetUpdate, self).__init__(tags=tags, **kwargs) - self.platform_update_domain_count = platform_update_domain_count - self.platform_fault_domain_count = platform_fault_domain_count - self.virtual_machines = virtual_machines - self.statuses = None - self.sku = sku diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/boot_diagnostics.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/boot_diagnostics.py deleted file mode 100644 index 4a1f77c4d7d0..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/boot_diagnostics.py +++ /dev/null @@ -1,37 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class BootDiagnostics(Model): - """Boot Diagnostics is a debugging feature which allows you to view Console - Output and Screenshot to diagnose VM status.

    You can easily view - the output of your console log.

    Azure also enables you to see a - screenshot of the VM from the hypervisor. - - :param enabled: Whether boot diagnostics should be enabled on the Virtual - Machine. - :type enabled: bool - :param storage_uri: Uri of the storage account to use for placing the - console output and screenshot. - :type storage_uri: str - """ - - _attribute_map = { - 'enabled': {'key': 'enabled', 'type': 'bool'}, - 'storage_uri': {'key': 'storageUri', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(BootDiagnostics, self).__init__(**kwargs) - self.enabled = kwargs.get('enabled', None) - self.storage_uri = kwargs.get('storage_uri', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/boot_diagnostics_instance_view.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/boot_diagnostics_instance_view.py deleted file mode 100644 index 05ca725929f6..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/boot_diagnostics_instance_view.py +++ /dev/null @@ -1,40 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class BootDiagnosticsInstanceView(Model): - """The instance view of a virtual machine boot diagnostics. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar console_screenshot_blob_uri: The console screenshot blob URI. - :vartype console_screenshot_blob_uri: str - :ivar serial_console_log_blob_uri: The Linux serial console log blob Uri. - :vartype serial_console_log_blob_uri: str - """ - - _validation = { - 'console_screenshot_blob_uri': {'readonly': True}, - 'serial_console_log_blob_uri': {'readonly': True}, - } - - _attribute_map = { - 'console_screenshot_blob_uri': {'key': 'consoleScreenshotBlobUri', 'type': 'str'}, - 'serial_console_log_blob_uri': {'key': 'serialConsoleLogBlobUri', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(BootDiagnosticsInstanceView, self).__init__(**kwargs) - self.console_screenshot_blob_uri = None - self.serial_console_log_blob_uri = None diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/boot_diagnostics_instance_view_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/boot_diagnostics_instance_view_py3.py deleted file mode 100644 index 97e4cdba67c4..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/boot_diagnostics_instance_view_py3.py +++ /dev/null @@ -1,40 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class BootDiagnosticsInstanceView(Model): - """The instance view of a virtual machine boot diagnostics. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar console_screenshot_blob_uri: The console screenshot blob URI. - :vartype console_screenshot_blob_uri: str - :ivar serial_console_log_blob_uri: The Linux serial console log blob Uri. - :vartype serial_console_log_blob_uri: str - """ - - _validation = { - 'console_screenshot_blob_uri': {'readonly': True}, - 'serial_console_log_blob_uri': {'readonly': True}, - } - - _attribute_map = { - 'console_screenshot_blob_uri': {'key': 'consoleScreenshotBlobUri', 'type': 'str'}, - 'serial_console_log_blob_uri': {'key': 'serialConsoleLogBlobUri', 'type': 'str'}, - } - - def __init__(self, **kwargs) -> None: - super(BootDiagnosticsInstanceView, self).__init__(**kwargs) - self.console_screenshot_blob_uri = None - self.serial_console_log_blob_uri = None diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/boot_diagnostics_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/boot_diagnostics_py3.py deleted file mode 100644 index b64ae5b4adde..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/boot_diagnostics_py3.py +++ /dev/null @@ -1,37 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class BootDiagnostics(Model): - """Boot Diagnostics is a debugging feature which allows you to view Console - Output and Screenshot to diagnose VM status.

    You can easily view - the output of your console log.

    Azure also enables you to see a - screenshot of the VM from the hypervisor. - - :param enabled: Whether boot diagnostics should be enabled on the Virtual - Machine. - :type enabled: bool - :param storage_uri: Uri of the storage account to use for placing the - console output and screenshot. - :type storage_uri: str - """ - - _attribute_map = { - 'enabled': {'key': 'enabled', 'type': 'bool'}, - 'storage_uri': {'key': 'storageUri', 'type': 'str'}, - } - - def __init__(self, *, enabled: bool=None, storage_uri: str=None, **kwargs) -> None: - super(BootDiagnostics, self).__init__(**kwargs) - self.enabled = enabled - self.storage_uri = storage_uri diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/compute_long_running_operation_properties.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/compute_long_running_operation_properties.py deleted file mode 100644 index 66ff353eb206..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/compute_long_running_operation_properties.py +++ /dev/null @@ -1,28 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ComputeLongRunningOperationProperties(Model): - """Compute-specific operation properties, including output. - - :param output: Operation output data (raw JSON) - :type output: object - """ - - _attribute_map = { - 'output': {'key': 'output', 'type': 'object'}, - } - - def __init__(self, **kwargs): - super(ComputeLongRunningOperationProperties, self).__init__(**kwargs) - self.output = kwargs.get('output', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/compute_long_running_operation_properties_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/compute_long_running_operation_properties_py3.py deleted file mode 100644 index a4ffd6c8c32f..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/compute_long_running_operation_properties_py3.py +++ /dev/null @@ -1,28 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ComputeLongRunningOperationProperties(Model): - """Compute-specific operation properties, including output. - - :param output: Operation output data (raw JSON) - :type output: object - """ - - _attribute_map = { - 'output': {'key': 'output', 'type': 'object'}, - } - - def __init__(self, *, output=None, **kwargs) -> None: - super(ComputeLongRunningOperationProperties, self).__init__(**kwargs) - self.output = output diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/compute_operation_value.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/compute_operation_value.py deleted file mode 100644 index 525ef3bbb69a..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/compute_operation_value.py +++ /dev/null @@ -1,60 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ComputeOperationValue(Model): - """Describes the properties of a Compute Operation value. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar origin: The origin of the compute operation. - :vartype origin: str - :ivar name: The name of the compute operation. - :vartype name: str - :ivar operation: The display name of the compute operation. - :vartype operation: str - :ivar resource: The display name of the resource the operation applies to. - :vartype resource: str - :ivar description: The description of the operation. - :vartype description: str - :ivar provider: The resource provider for the operation. - :vartype provider: str - """ - - _validation = { - 'origin': {'readonly': True}, - 'name': {'readonly': True}, - 'operation': {'readonly': True}, - 'resource': {'readonly': True}, - 'description': {'readonly': True}, - 'provider': {'readonly': True}, - } - - _attribute_map = { - 'origin': {'key': 'origin', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'operation': {'key': 'display.operation', 'type': 'str'}, - 'resource': {'key': 'display.resource', 'type': 'str'}, - 'description': {'key': 'display.description', 'type': 'str'}, - 'provider': {'key': 'display.provider', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ComputeOperationValue, self).__init__(**kwargs) - self.origin = None - self.name = None - self.operation = None - self.resource = None - self.description = None - self.provider = None diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/compute_operation_value_paged.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/compute_operation_value_paged.py deleted file mode 100644 index d59724285f2d..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/compute_operation_value_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class ComputeOperationValuePaged(Paged): - """ - A paging container for iterating over a list of :class:`ComputeOperationValue ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[ComputeOperationValue]'} - } - - def __init__(self, *args, **kwargs): - - super(ComputeOperationValuePaged, self).__init__(*args, **kwargs) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/compute_operation_value_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/compute_operation_value_py3.py deleted file mode 100644 index 3c4388f312b9..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/compute_operation_value_py3.py +++ /dev/null @@ -1,60 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ComputeOperationValue(Model): - """Describes the properties of a Compute Operation value. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar origin: The origin of the compute operation. - :vartype origin: str - :ivar name: The name of the compute operation. - :vartype name: str - :ivar operation: The display name of the compute operation. - :vartype operation: str - :ivar resource: The display name of the resource the operation applies to. - :vartype resource: str - :ivar description: The description of the operation. - :vartype description: str - :ivar provider: The resource provider for the operation. - :vartype provider: str - """ - - _validation = { - 'origin': {'readonly': True}, - 'name': {'readonly': True}, - 'operation': {'readonly': True}, - 'resource': {'readonly': True}, - 'description': {'readonly': True}, - 'provider': {'readonly': True}, - } - - _attribute_map = { - 'origin': {'key': 'origin', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'operation': {'key': 'display.operation', 'type': 'str'}, - 'resource': {'key': 'display.resource', 'type': 'str'}, - 'description': {'key': 'display.description', 'type': 'str'}, - 'provider': {'key': 'display.provider', 'type': 'str'}, - } - - def __init__(self, **kwargs) -> None: - super(ComputeOperationValue, self).__init__(**kwargs) - self.origin = None - self.name = None - self.operation = None - self.resource = None - self.description = None - self.provider = None diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/data_disk.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/data_disk.py deleted file mode 100644 index 9aa528dc1ffc..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/data_disk.py +++ /dev/null @@ -1,87 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class DataDisk(Model): - """Describes a data disk. - - All required parameters must be populated in order to send to Azure. - - :param lun: Required. Specifies the logical unit number of the data disk. - This value is used to identify data disks within the VM and therefore must - be unique for each data disk attached to a VM. - :type lun: int - :param name: The disk name. - :type name: str - :param vhd: The virtual hard disk. - :type vhd: ~azure.mgmt.compute.v2017_12_01.models.VirtualHardDisk - :param image: The source user image virtual hard disk. The virtual hard - disk will be copied before being attached to the virtual machine. If - SourceImage is provided, the destination virtual hard drive must not - exist. - :type image: ~azure.mgmt.compute.v2017_12_01.models.VirtualHardDisk - :param caching: Specifies the caching requirements.

    Possible - values are:

    **None**

    **ReadOnly**

    **ReadWrite** -

    Default: **None for Standard storage. ReadOnly for Premium - storage**. Possible values include: 'None', 'ReadOnly', 'ReadWrite' - :type caching: str or ~azure.mgmt.compute.v2017_12_01.models.CachingTypes - :param write_accelerator_enabled: Specifies whether writeAccelerator - should be enabled or disabled on the disk. - :type write_accelerator_enabled: bool - :param create_option: Required. Specifies how the virtual machine should - be created.

    Possible values are:

    **Attach** \\u2013 This - value is used when you are using a specialized disk to create the virtual - machine.

    **FromImage** \\u2013 This value is used when you are - using an image to create the virtual machine. If you are using a platform - image, you also use the imageReference element described above. If you are - using a marketplace image, you also use the plan element previously - described. Possible values include: 'FromImage', 'Empty', 'Attach' - :type create_option: str or - ~azure.mgmt.compute.v2017_12_01.models.DiskCreateOptionTypes - :param disk_size_gb: Specifies the size of an empty data disk in - gigabytes. This element can be used to overwrite the size of the disk in a - virtual machine image.

    This value cannot be larger than 1023 GB - :type disk_size_gb: int - :param managed_disk: The managed disk parameters. - :type managed_disk: - ~azure.mgmt.compute.v2017_12_01.models.ManagedDiskParameters - """ - - _validation = { - 'lun': {'required': True}, - 'create_option': {'required': True}, - } - - _attribute_map = { - 'lun': {'key': 'lun', 'type': 'int'}, - 'name': {'key': 'name', 'type': 'str'}, - 'vhd': {'key': 'vhd', 'type': 'VirtualHardDisk'}, - 'image': {'key': 'image', 'type': 'VirtualHardDisk'}, - 'caching': {'key': 'caching', 'type': 'CachingTypes'}, - 'write_accelerator_enabled': {'key': 'writeAcceleratorEnabled', 'type': 'bool'}, - 'create_option': {'key': 'createOption', 'type': 'str'}, - 'disk_size_gb': {'key': 'diskSizeGB', 'type': 'int'}, - 'managed_disk': {'key': 'managedDisk', 'type': 'ManagedDiskParameters'}, - } - - def __init__(self, **kwargs): - super(DataDisk, self).__init__(**kwargs) - self.lun = kwargs.get('lun', None) - self.name = kwargs.get('name', None) - self.vhd = kwargs.get('vhd', None) - self.image = kwargs.get('image', None) - self.caching = kwargs.get('caching', None) - self.write_accelerator_enabled = kwargs.get('write_accelerator_enabled', None) - self.create_option = kwargs.get('create_option', None) - self.disk_size_gb = kwargs.get('disk_size_gb', None) - self.managed_disk = kwargs.get('managed_disk', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/data_disk_image.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/data_disk_image.py deleted file mode 100644 index b5dbfcefb472..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/data_disk_image.py +++ /dev/null @@ -1,37 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class DataDiskImage(Model): - """Contains the data disk images information. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar lun: Specifies the logical unit number of the data disk. This value - is used to identify data disks within the VM and therefore must be unique - for each data disk attached to a VM. - :vartype lun: int - """ - - _validation = { - 'lun': {'readonly': True}, - } - - _attribute_map = { - 'lun': {'key': 'lun', 'type': 'int'}, - } - - def __init__(self, **kwargs): - super(DataDiskImage, self).__init__(**kwargs) - self.lun = None diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/data_disk_image_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/data_disk_image_py3.py deleted file mode 100644 index 8431a3988502..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/data_disk_image_py3.py +++ /dev/null @@ -1,37 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class DataDiskImage(Model): - """Contains the data disk images information. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar lun: Specifies the logical unit number of the data disk. This value - is used to identify data disks within the VM and therefore must be unique - for each data disk attached to a VM. - :vartype lun: int - """ - - _validation = { - 'lun': {'readonly': True}, - } - - _attribute_map = { - 'lun': {'key': 'lun', 'type': 'int'}, - } - - def __init__(self, **kwargs) -> None: - super(DataDiskImage, self).__init__(**kwargs) - self.lun = None diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/data_disk_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/data_disk_py3.py deleted file mode 100644 index 5fa6a4c447b7..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/data_disk_py3.py +++ /dev/null @@ -1,87 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class DataDisk(Model): - """Describes a data disk. - - All required parameters must be populated in order to send to Azure. - - :param lun: Required. Specifies the logical unit number of the data disk. - This value is used to identify data disks within the VM and therefore must - be unique for each data disk attached to a VM. - :type lun: int - :param name: The disk name. - :type name: str - :param vhd: The virtual hard disk. - :type vhd: ~azure.mgmt.compute.v2017_12_01.models.VirtualHardDisk - :param image: The source user image virtual hard disk. The virtual hard - disk will be copied before being attached to the virtual machine. If - SourceImage is provided, the destination virtual hard drive must not - exist. - :type image: ~azure.mgmt.compute.v2017_12_01.models.VirtualHardDisk - :param caching: Specifies the caching requirements.

    Possible - values are:

    **None**

    **ReadOnly**

    **ReadWrite** -

    Default: **None for Standard storage. ReadOnly for Premium - storage**. Possible values include: 'None', 'ReadOnly', 'ReadWrite' - :type caching: str or ~azure.mgmt.compute.v2017_12_01.models.CachingTypes - :param write_accelerator_enabled: Specifies whether writeAccelerator - should be enabled or disabled on the disk. - :type write_accelerator_enabled: bool - :param create_option: Required. Specifies how the virtual machine should - be created.

    Possible values are:

    **Attach** \\u2013 This - value is used when you are using a specialized disk to create the virtual - machine.

    **FromImage** \\u2013 This value is used when you are - using an image to create the virtual machine. If you are using a platform - image, you also use the imageReference element described above. If you are - using a marketplace image, you also use the plan element previously - described. Possible values include: 'FromImage', 'Empty', 'Attach' - :type create_option: str or - ~azure.mgmt.compute.v2017_12_01.models.DiskCreateOptionTypes - :param disk_size_gb: Specifies the size of an empty data disk in - gigabytes. This element can be used to overwrite the size of the disk in a - virtual machine image.

    This value cannot be larger than 1023 GB - :type disk_size_gb: int - :param managed_disk: The managed disk parameters. - :type managed_disk: - ~azure.mgmt.compute.v2017_12_01.models.ManagedDiskParameters - """ - - _validation = { - 'lun': {'required': True}, - 'create_option': {'required': True}, - } - - _attribute_map = { - 'lun': {'key': 'lun', 'type': 'int'}, - 'name': {'key': 'name', 'type': 'str'}, - 'vhd': {'key': 'vhd', 'type': 'VirtualHardDisk'}, - 'image': {'key': 'image', 'type': 'VirtualHardDisk'}, - 'caching': {'key': 'caching', 'type': 'CachingTypes'}, - 'write_accelerator_enabled': {'key': 'writeAcceleratorEnabled', 'type': 'bool'}, - 'create_option': {'key': 'createOption', 'type': 'str'}, - 'disk_size_gb': {'key': 'diskSizeGB', 'type': 'int'}, - 'managed_disk': {'key': 'managedDisk', 'type': 'ManagedDiskParameters'}, - } - - def __init__(self, *, lun: int, create_option, name: str=None, vhd=None, image=None, caching=None, write_accelerator_enabled: bool=None, disk_size_gb: int=None, managed_disk=None, **kwargs) -> None: - super(DataDisk, self).__init__(**kwargs) - self.lun = lun - self.name = name - self.vhd = vhd - self.image = image - self.caching = caching - self.write_accelerator_enabled = write_accelerator_enabled - self.create_option = create_option - self.disk_size_gb = disk_size_gb - self.managed_disk = managed_disk diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/diagnostics_profile.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/diagnostics_profile.py deleted file mode 100644 index 1c8a3b82e686..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/diagnostics_profile.py +++ /dev/null @@ -1,33 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class DiagnosticsProfile(Model): - """Specifies the boot diagnostic settings state.

    Minimum api-version: - 2015-06-15. - - :param boot_diagnostics: Boot Diagnostics is a debugging feature which - allows you to view Console Output and Screenshot to diagnose VM status. -

    You can easily view the output of your console log.

    - Azure also enables you to see a screenshot of the VM from the hypervisor. - :type boot_diagnostics: - ~azure.mgmt.compute.v2017_12_01.models.BootDiagnostics - """ - - _attribute_map = { - 'boot_diagnostics': {'key': 'bootDiagnostics', 'type': 'BootDiagnostics'}, - } - - def __init__(self, **kwargs): - super(DiagnosticsProfile, self).__init__(**kwargs) - self.boot_diagnostics = kwargs.get('boot_diagnostics', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/diagnostics_profile_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/diagnostics_profile_py3.py deleted file mode 100644 index 6446c617cdb5..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/diagnostics_profile_py3.py +++ /dev/null @@ -1,33 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class DiagnosticsProfile(Model): - """Specifies the boot diagnostic settings state.

    Minimum api-version: - 2015-06-15. - - :param boot_diagnostics: Boot Diagnostics is a debugging feature which - allows you to view Console Output and Screenshot to diagnose VM status. -

    You can easily view the output of your console log.

    - Azure also enables you to see a screenshot of the VM from the hypervisor. - :type boot_diagnostics: - ~azure.mgmt.compute.v2017_12_01.models.BootDiagnostics - """ - - _attribute_map = { - 'boot_diagnostics': {'key': 'bootDiagnostics', 'type': 'BootDiagnostics'}, - } - - def __init__(self, *, boot_diagnostics=None, **kwargs) -> None: - super(DiagnosticsProfile, self).__init__(**kwargs) - self.boot_diagnostics = boot_diagnostics diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/disk_encryption_settings.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/disk_encryption_settings.py deleted file mode 100644 index d7974b4359cf..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/disk_encryption_settings.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class DiskEncryptionSettings(Model): - """Describes a Encryption Settings for a Disk. - - :param disk_encryption_key: Specifies the location of the disk encryption - key, which is a Key Vault Secret. - :type disk_encryption_key: - ~azure.mgmt.compute.v2017_12_01.models.KeyVaultSecretReference - :param key_encryption_key: Specifies the location of the key encryption - key in Key Vault. - :type key_encryption_key: - ~azure.mgmt.compute.v2017_12_01.models.KeyVaultKeyReference - :param enabled: Specifies whether disk encryption should be enabled on the - virtual machine. - :type enabled: bool - """ - - _attribute_map = { - 'disk_encryption_key': {'key': 'diskEncryptionKey', 'type': 'KeyVaultSecretReference'}, - 'key_encryption_key': {'key': 'keyEncryptionKey', 'type': 'KeyVaultKeyReference'}, - 'enabled': {'key': 'enabled', 'type': 'bool'}, - } - - def __init__(self, **kwargs): - super(DiskEncryptionSettings, self).__init__(**kwargs) - self.disk_encryption_key = kwargs.get('disk_encryption_key', None) - self.key_encryption_key = kwargs.get('key_encryption_key', None) - self.enabled = kwargs.get('enabled', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/disk_encryption_settings_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/disk_encryption_settings_py3.py deleted file mode 100644 index 9511bd6b4565..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/disk_encryption_settings_py3.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class DiskEncryptionSettings(Model): - """Describes a Encryption Settings for a Disk. - - :param disk_encryption_key: Specifies the location of the disk encryption - key, which is a Key Vault Secret. - :type disk_encryption_key: - ~azure.mgmt.compute.v2017_12_01.models.KeyVaultSecretReference - :param key_encryption_key: Specifies the location of the key encryption - key in Key Vault. - :type key_encryption_key: - ~azure.mgmt.compute.v2017_12_01.models.KeyVaultKeyReference - :param enabled: Specifies whether disk encryption should be enabled on the - virtual machine. - :type enabled: bool - """ - - _attribute_map = { - 'disk_encryption_key': {'key': 'diskEncryptionKey', 'type': 'KeyVaultSecretReference'}, - 'key_encryption_key': {'key': 'keyEncryptionKey', 'type': 'KeyVaultKeyReference'}, - 'enabled': {'key': 'enabled', 'type': 'bool'}, - } - - def __init__(self, *, disk_encryption_key=None, key_encryption_key=None, enabled: bool=None, **kwargs) -> None: - super(DiskEncryptionSettings, self).__init__(**kwargs) - self.disk_encryption_key = disk_encryption_key - self.key_encryption_key = key_encryption_key - self.enabled = enabled diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/disk_instance_view.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/disk_instance_view.py deleted file mode 100644 index 29813c789890..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/disk_instance_view.py +++ /dev/null @@ -1,39 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class DiskInstanceView(Model): - """The instance view of the disk. - - :param name: The disk name. - :type name: str - :param encryption_settings: Specifies the encryption settings for the OS - Disk.

    Minimum api-version: 2015-06-15 - :type encryption_settings: - list[~azure.mgmt.compute.v2017_12_01.models.DiskEncryptionSettings] - :param statuses: The resource status information. - :type statuses: - list[~azure.mgmt.compute.v2017_12_01.models.InstanceViewStatus] - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'encryption_settings': {'key': 'encryptionSettings', 'type': '[DiskEncryptionSettings]'}, - 'statuses': {'key': 'statuses', 'type': '[InstanceViewStatus]'}, - } - - def __init__(self, **kwargs): - super(DiskInstanceView, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.encryption_settings = kwargs.get('encryption_settings', None) - self.statuses = kwargs.get('statuses', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/disk_instance_view_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/disk_instance_view_py3.py deleted file mode 100644 index 675c5b073bff..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/disk_instance_view_py3.py +++ /dev/null @@ -1,39 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class DiskInstanceView(Model): - """The instance view of the disk. - - :param name: The disk name. - :type name: str - :param encryption_settings: Specifies the encryption settings for the OS - Disk.

    Minimum api-version: 2015-06-15 - :type encryption_settings: - list[~azure.mgmt.compute.v2017_12_01.models.DiskEncryptionSettings] - :param statuses: The resource status information. - :type statuses: - list[~azure.mgmt.compute.v2017_12_01.models.InstanceViewStatus] - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'encryption_settings': {'key': 'encryptionSettings', 'type': '[DiskEncryptionSettings]'}, - 'statuses': {'key': 'statuses', 'type': '[InstanceViewStatus]'}, - } - - def __init__(self, *, name: str=None, encryption_settings=None, statuses=None, **kwargs) -> None: - super(DiskInstanceView, self).__init__(**kwargs) - self.name = name - self.encryption_settings = encryption_settings - self.statuses = statuses diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/hardware_profile.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/hardware_profile.py deleted file mode 100644 index 84aad1c4ee3b..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/hardware_profile.py +++ /dev/null @@ -1,85 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class HardwareProfile(Model): - """Specifies the hardware settings for the virtual machine. - - :param vm_size: Specifies the size of the virtual machine. For more - information about virtual machine sizes, see [Sizes for virtual - machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-sizes?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). -

    The available VM sizes depend on region and availability set. For - a list of available sizes use these APIs:

    [List all available - virtual machine sizes in an availability - set](https://docs.microsoft.com/rest/api/compute/availabilitysets/listavailablesizes) -

    [List all available virtual machine sizes in a - region](https://docs.microsoft.com/rest/api/compute/virtualmachinesizes/list) -

    [List all available virtual machine sizes for - resizing](https://docs.microsoft.com/rest/api/compute/virtualmachines/listavailablesizes). - Possible values include: 'Basic_A0', 'Basic_A1', 'Basic_A2', 'Basic_A3', - 'Basic_A4', 'Standard_A0', 'Standard_A1', 'Standard_A2', 'Standard_A3', - 'Standard_A4', 'Standard_A5', 'Standard_A6', 'Standard_A7', 'Standard_A8', - 'Standard_A9', 'Standard_A10', 'Standard_A11', 'Standard_A1_v2', - 'Standard_A2_v2', 'Standard_A4_v2', 'Standard_A8_v2', 'Standard_A2m_v2', - 'Standard_A4m_v2', 'Standard_A8m_v2', 'Standard_B1s', 'Standard_B1ms', - 'Standard_B2s', 'Standard_B2ms', 'Standard_B4ms', 'Standard_B8ms', - 'Standard_D1', 'Standard_D2', 'Standard_D3', 'Standard_D4', - 'Standard_D11', 'Standard_D12', 'Standard_D13', 'Standard_D14', - 'Standard_D1_v2', 'Standard_D2_v2', 'Standard_D3_v2', 'Standard_D4_v2', - 'Standard_D5_v2', 'Standard_D2_v3', 'Standard_D4_v3', 'Standard_D8_v3', - 'Standard_D16_v3', 'Standard_D32_v3', 'Standard_D64_v3', - 'Standard_D2s_v3', 'Standard_D4s_v3', 'Standard_D8s_v3', - 'Standard_D16s_v3', 'Standard_D32s_v3', 'Standard_D64s_v3', - 'Standard_D11_v2', 'Standard_D12_v2', 'Standard_D13_v2', - 'Standard_D14_v2', 'Standard_D15_v2', 'Standard_DS1', 'Standard_DS2', - 'Standard_DS3', 'Standard_DS4', 'Standard_DS11', 'Standard_DS12', - 'Standard_DS13', 'Standard_DS14', 'Standard_DS1_v2', 'Standard_DS2_v2', - 'Standard_DS3_v2', 'Standard_DS4_v2', 'Standard_DS5_v2', - 'Standard_DS11_v2', 'Standard_DS12_v2', 'Standard_DS13_v2', - 'Standard_DS14_v2', 'Standard_DS15_v2', 'Standard_DS13-4_v2', - 'Standard_DS13-2_v2', 'Standard_DS14-8_v2', 'Standard_DS14-4_v2', - 'Standard_E2_v3', 'Standard_E4_v3', 'Standard_E8_v3', 'Standard_E16_v3', - 'Standard_E32_v3', 'Standard_E64_v3', 'Standard_E2s_v3', - 'Standard_E4s_v3', 'Standard_E8s_v3', 'Standard_E16s_v3', - 'Standard_E32s_v3', 'Standard_E64s_v3', 'Standard_E32-16_v3', - 'Standard_E32-8s_v3', 'Standard_E64-32s_v3', 'Standard_E64-16s_v3', - 'Standard_F1', 'Standard_F2', 'Standard_F4', 'Standard_F8', - 'Standard_F16', 'Standard_F1s', 'Standard_F2s', 'Standard_F4s', - 'Standard_F8s', 'Standard_F16s', 'Standard_F2s_v2', 'Standard_F4s_v2', - 'Standard_F8s_v2', 'Standard_F16s_v2', 'Standard_F32s_v2', - 'Standard_F64s_v2', 'Standard_F72s_v2', 'Standard_G1', 'Standard_G2', - 'Standard_G3', 'Standard_G4', 'Standard_G5', 'Standard_GS1', - 'Standard_GS2', 'Standard_GS3', 'Standard_GS4', 'Standard_GS5', - 'Standard_GS4-8', 'Standard_GS4-4', 'Standard_GS5-16', 'Standard_GS5-8', - 'Standard_H8', 'Standard_H16', 'Standard_H8m', 'Standard_H16m', - 'Standard_H16r', 'Standard_H16mr', 'Standard_L4s', 'Standard_L8s', - 'Standard_L16s', 'Standard_L32s', 'Standard_M64s', 'Standard_M64ms', - 'Standard_M128s', 'Standard_M128ms', 'Standard_M64-32ms', - 'Standard_M64-16ms', 'Standard_M128-64ms', 'Standard_M128-32ms', - 'Standard_NC6', 'Standard_NC12', 'Standard_NC24', 'Standard_NC24r', - 'Standard_NC6s_v2', 'Standard_NC12s_v2', 'Standard_NC24s_v2', - 'Standard_NC24rs_v2', 'Standard_NC6s_v3', 'Standard_NC12s_v3', - 'Standard_NC24s_v3', 'Standard_NC24rs_v3', 'Standard_ND6s', - 'Standard_ND12s', 'Standard_ND24s', 'Standard_ND24rs', 'Standard_NV6', - 'Standard_NV12', 'Standard_NV24' - :type vm_size: str or - ~azure.mgmt.compute.v2017_12_01.models.VirtualMachineSizeTypes - """ - - _attribute_map = { - 'vm_size': {'key': 'vmSize', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(HardwareProfile, self).__init__(**kwargs) - self.vm_size = kwargs.get('vm_size', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/hardware_profile_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/hardware_profile_py3.py deleted file mode 100644 index 605f0eb33fad..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/hardware_profile_py3.py +++ /dev/null @@ -1,85 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class HardwareProfile(Model): - """Specifies the hardware settings for the virtual machine. - - :param vm_size: Specifies the size of the virtual machine. For more - information about virtual machine sizes, see [Sizes for virtual - machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-sizes?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). -

    The available VM sizes depend on region and availability set. For - a list of available sizes use these APIs:

    [List all available - virtual machine sizes in an availability - set](https://docs.microsoft.com/rest/api/compute/availabilitysets/listavailablesizes) -

    [List all available virtual machine sizes in a - region](https://docs.microsoft.com/rest/api/compute/virtualmachinesizes/list) -

    [List all available virtual machine sizes for - resizing](https://docs.microsoft.com/rest/api/compute/virtualmachines/listavailablesizes). - Possible values include: 'Basic_A0', 'Basic_A1', 'Basic_A2', 'Basic_A3', - 'Basic_A4', 'Standard_A0', 'Standard_A1', 'Standard_A2', 'Standard_A3', - 'Standard_A4', 'Standard_A5', 'Standard_A6', 'Standard_A7', 'Standard_A8', - 'Standard_A9', 'Standard_A10', 'Standard_A11', 'Standard_A1_v2', - 'Standard_A2_v2', 'Standard_A4_v2', 'Standard_A8_v2', 'Standard_A2m_v2', - 'Standard_A4m_v2', 'Standard_A8m_v2', 'Standard_B1s', 'Standard_B1ms', - 'Standard_B2s', 'Standard_B2ms', 'Standard_B4ms', 'Standard_B8ms', - 'Standard_D1', 'Standard_D2', 'Standard_D3', 'Standard_D4', - 'Standard_D11', 'Standard_D12', 'Standard_D13', 'Standard_D14', - 'Standard_D1_v2', 'Standard_D2_v2', 'Standard_D3_v2', 'Standard_D4_v2', - 'Standard_D5_v2', 'Standard_D2_v3', 'Standard_D4_v3', 'Standard_D8_v3', - 'Standard_D16_v3', 'Standard_D32_v3', 'Standard_D64_v3', - 'Standard_D2s_v3', 'Standard_D4s_v3', 'Standard_D8s_v3', - 'Standard_D16s_v3', 'Standard_D32s_v3', 'Standard_D64s_v3', - 'Standard_D11_v2', 'Standard_D12_v2', 'Standard_D13_v2', - 'Standard_D14_v2', 'Standard_D15_v2', 'Standard_DS1', 'Standard_DS2', - 'Standard_DS3', 'Standard_DS4', 'Standard_DS11', 'Standard_DS12', - 'Standard_DS13', 'Standard_DS14', 'Standard_DS1_v2', 'Standard_DS2_v2', - 'Standard_DS3_v2', 'Standard_DS4_v2', 'Standard_DS5_v2', - 'Standard_DS11_v2', 'Standard_DS12_v2', 'Standard_DS13_v2', - 'Standard_DS14_v2', 'Standard_DS15_v2', 'Standard_DS13-4_v2', - 'Standard_DS13-2_v2', 'Standard_DS14-8_v2', 'Standard_DS14-4_v2', - 'Standard_E2_v3', 'Standard_E4_v3', 'Standard_E8_v3', 'Standard_E16_v3', - 'Standard_E32_v3', 'Standard_E64_v3', 'Standard_E2s_v3', - 'Standard_E4s_v3', 'Standard_E8s_v3', 'Standard_E16s_v3', - 'Standard_E32s_v3', 'Standard_E64s_v3', 'Standard_E32-16_v3', - 'Standard_E32-8s_v3', 'Standard_E64-32s_v3', 'Standard_E64-16s_v3', - 'Standard_F1', 'Standard_F2', 'Standard_F4', 'Standard_F8', - 'Standard_F16', 'Standard_F1s', 'Standard_F2s', 'Standard_F4s', - 'Standard_F8s', 'Standard_F16s', 'Standard_F2s_v2', 'Standard_F4s_v2', - 'Standard_F8s_v2', 'Standard_F16s_v2', 'Standard_F32s_v2', - 'Standard_F64s_v2', 'Standard_F72s_v2', 'Standard_G1', 'Standard_G2', - 'Standard_G3', 'Standard_G4', 'Standard_G5', 'Standard_GS1', - 'Standard_GS2', 'Standard_GS3', 'Standard_GS4', 'Standard_GS5', - 'Standard_GS4-8', 'Standard_GS4-4', 'Standard_GS5-16', 'Standard_GS5-8', - 'Standard_H8', 'Standard_H16', 'Standard_H8m', 'Standard_H16m', - 'Standard_H16r', 'Standard_H16mr', 'Standard_L4s', 'Standard_L8s', - 'Standard_L16s', 'Standard_L32s', 'Standard_M64s', 'Standard_M64ms', - 'Standard_M128s', 'Standard_M128ms', 'Standard_M64-32ms', - 'Standard_M64-16ms', 'Standard_M128-64ms', 'Standard_M128-32ms', - 'Standard_NC6', 'Standard_NC12', 'Standard_NC24', 'Standard_NC24r', - 'Standard_NC6s_v2', 'Standard_NC12s_v2', 'Standard_NC24s_v2', - 'Standard_NC24rs_v2', 'Standard_NC6s_v3', 'Standard_NC12s_v3', - 'Standard_NC24s_v3', 'Standard_NC24rs_v3', 'Standard_ND6s', - 'Standard_ND12s', 'Standard_ND24s', 'Standard_ND24rs', 'Standard_NV6', - 'Standard_NV12', 'Standard_NV24' - :type vm_size: str or - ~azure.mgmt.compute.v2017_12_01.models.VirtualMachineSizeTypes - """ - - _attribute_map = { - 'vm_size': {'key': 'vmSize', 'type': 'str'}, - } - - def __init__(self, *, vm_size=None, **kwargs) -> None: - super(HardwareProfile, self).__init__(**kwargs) - self.vm_size = vm_size diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/image.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/image.py deleted file mode 100644 index 889e56a305fc..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/image.py +++ /dev/null @@ -1,70 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource import Resource - - -class Image(Resource): - """The source user image virtual hard disk. The virtual hard disk will be - copied before being attached to the virtual machine. If SourceImage is - provided, the destination virtual hard drive must not exist. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource Id - :vartype id: str - :ivar name: Resource name - :vartype name: str - :ivar type: Resource type - :vartype type: str - :param location: Required. Resource location - :type location: str - :param tags: Resource tags - :type tags: dict[str, str] - :param source_virtual_machine: The source virtual machine from which Image - is created. - :type source_virtual_machine: - ~azure.mgmt.compute.v2017_12_01.models.SubResource - :param storage_profile: Specifies the storage settings for the virtual - machine disks. - :type storage_profile: - ~azure.mgmt.compute.v2017_12_01.models.ImageStorageProfile - :ivar provisioning_state: The provisioning state. - :vartype provisioning_state: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - 'provisioning_state': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'source_virtual_machine': {'key': 'properties.sourceVirtualMachine', 'type': 'SubResource'}, - 'storage_profile': {'key': 'properties.storageProfile', 'type': 'ImageStorageProfile'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(Image, self).__init__(**kwargs) - self.source_virtual_machine = kwargs.get('source_virtual_machine', None) - self.storage_profile = kwargs.get('storage_profile', None) - self.provisioning_state = None diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/image_data_disk.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/image_data_disk.py deleted file mode 100644 index f5f5c009b54e..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/image_data_disk.py +++ /dev/null @@ -1,68 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ImageDataDisk(Model): - """Describes a data disk. - - All required parameters must be populated in order to send to Azure. - - :param lun: Required. Specifies the logical unit number of the data disk. - This value is used to identify data disks within the VM and therefore must - be unique for each data disk attached to a VM. - :type lun: int - :param snapshot: The snapshot. - :type snapshot: ~azure.mgmt.compute.v2017_12_01.models.SubResource - :param managed_disk: The managedDisk. - :type managed_disk: ~azure.mgmt.compute.v2017_12_01.models.SubResource - :param blob_uri: The Virtual Hard Disk. - :type blob_uri: str - :param caching: Specifies the caching requirements.

    Possible - values are:

    **None**

    **ReadOnly**

    **ReadWrite** -

    Default: **None for Standard storage. ReadOnly for Premium - storage**. Possible values include: 'None', 'ReadOnly', 'ReadWrite' - :type caching: str or ~azure.mgmt.compute.v2017_12_01.models.CachingTypes - :param disk_size_gb: Specifies the size of empty data disks in gigabytes. - This element can be used to overwrite the name of the disk in a virtual - machine image.

    This value cannot be larger than 1023 GB - :type disk_size_gb: int - :param storage_account_type: Specifies the storage account type for the - managed disk. Possible values are: Standard_LRS or Premium_LRS. Possible - values include: 'Standard_LRS', 'Premium_LRS' - :type storage_account_type: str or - ~azure.mgmt.compute.v2017_12_01.models.StorageAccountTypes - """ - - _validation = { - 'lun': {'required': True}, - } - - _attribute_map = { - 'lun': {'key': 'lun', 'type': 'int'}, - 'snapshot': {'key': 'snapshot', 'type': 'SubResource'}, - 'managed_disk': {'key': 'managedDisk', 'type': 'SubResource'}, - 'blob_uri': {'key': 'blobUri', 'type': 'str'}, - 'caching': {'key': 'caching', 'type': 'CachingTypes'}, - 'disk_size_gb': {'key': 'diskSizeGB', 'type': 'int'}, - 'storage_account_type': {'key': 'storageAccountType', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ImageDataDisk, self).__init__(**kwargs) - self.lun = kwargs.get('lun', None) - self.snapshot = kwargs.get('snapshot', None) - self.managed_disk = kwargs.get('managed_disk', None) - self.blob_uri = kwargs.get('blob_uri', None) - self.caching = kwargs.get('caching', None) - self.disk_size_gb = kwargs.get('disk_size_gb', None) - self.storage_account_type = kwargs.get('storage_account_type', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/image_data_disk_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/image_data_disk_py3.py deleted file mode 100644 index fa6eb1bdd30b..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/image_data_disk_py3.py +++ /dev/null @@ -1,68 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ImageDataDisk(Model): - """Describes a data disk. - - All required parameters must be populated in order to send to Azure. - - :param lun: Required. Specifies the logical unit number of the data disk. - This value is used to identify data disks within the VM and therefore must - be unique for each data disk attached to a VM. - :type lun: int - :param snapshot: The snapshot. - :type snapshot: ~azure.mgmt.compute.v2017_12_01.models.SubResource - :param managed_disk: The managedDisk. - :type managed_disk: ~azure.mgmt.compute.v2017_12_01.models.SubResource - :param blob_uri: The Virtual Hard Disk. - :type blob_uri: str - :param caching: Specifies the caching requirements.

    Possible - values are:

    **None**

    **ReadOnly**

    **ReadWrite** -

    Default: **None for Standard storage. ReadOnly for Premium - storage**. Possible values include: 'None', 'ReadOnly', 'ReadWrite' - :type caching: str or ~azure.mgmt.compute.v2017_12_01.models.CachingTypes - :param disk_size_gb: Specifies the size of empty data disks in gigabytes. - This element can be used to overwrite the name of the disk in a virtual - machine image.

    This value cannot be larger than 1023 GB - :type disk_size_gb: int - :param storage_account_type: Specifies the storage account type for the - managed disk. Possible values are: Standard_LRS or Premium_LRS. Possible - values include: 'Standard_LRS', 'Premium_LRS' - :type storage_account_type: str or - ~azure.mgmt.compute.v2017_12_01.models.StorageAccountTypes - """ - - _validation = { - 'lun': {'required': True}, - } - - _attribute_map = { - 'lun': {'key': 'lun', 'type': 'int'}, - 'snapshot': {'key': 'snapshot', 'type': 'SubResource'}, - 'managed_disk': {'key': 'managedDisk', 'type': 'SubResource'}, - 'blob_uri': {'key': 'blobUri', 'type': 'str'}, - 'caching': {'key': 'caching', 'type': 'CachingTypes'}, - 'disk_size_gb': {'key': 'diskSizeGB', 'type': 'int'}, - 'storage_account_type': {'key': 'storageAccountType', 'type': 'str'}, - } - - def __init__(self, *, lun: int, snapshot=None, managed_disk=None, blob_uri: str=None, caching=None, disk_size_gb: int=None, storage_account_type=None, **kwargs) -> None: - super(ImageDataDisk, self).__init__(**kwargs) - self.lun = lun - self.snapshot = snapshot - self.managed_disk = managed_disk - self.blob_uri = blob_uri - self.caching = caching - self.disk_size_gb = disk_size_gb - self.storage_account_type = storage_account_type diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/image_os_disk.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/image_os_disk.py deleted file mode 100644 index afb4cfee8502..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/image_os_disk.py +++ /dev/null @@ -1,77 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ImageOSDisk(Model): - """Describes an Operating System disk. - - All required parameters must be populated in order to send to Azure. - - :param os_type: Required. This property allows you to specify the type of - the OS that is included in the disk if creating a VM from a custom image. -

    Possible values are:

    **Windows**

    **Linux**. - Possible values include: 'Windows', 'Linux' - :type os_type: str or - ~azure.mgmt.compute.v2017_12_01.models.OperatingSystemTypes - :param os_state: Required. The OS State. Possible values include: - 'Generalized', 'Specialized' - :type os_state: str or - ~azure.mgmt.compute.v2017_12_01.models.OperatingSystemStateTypes - :param snapshot: The snapshot. - :type snapshot: ~azure.mgmt.compute.v2017_12_01.models.SubResource - :param managed_disk: The managedDisk. - :type managed_disk: ~azure.mgmt.compute.v2017_12_01.models.SubResource - :param blob_uri: The Virtual Hard Disk. - :type blob_uri: str - :param caching: Specifies the caching requirements.

    Possible - values are:

    **None**

    **ReadOnly**

    **ReadWrite** -

    Default: **None for Standard storage. ReadOnly for Premium - storage**. Possible values include: 'None', 'ReadOnly', 'ReadWrite' - :type caching: str or ~azure.mgmt.compute.v2017_12_01.models.CachingTypes - :param disk_size_gb: Specifies the size of empty data disks in gigabytes. - This element can be used to overwrite the name of the disk in a virtual - machine image.

    This value cannot be larger than 1023 GB - :type disk_size_gb: int - :param storage_account_type: Specifies the storage account type for the - managed disk. Possible values are: Standard_LRS or Premium_LRS. Possible - values include: 'Standard_LRS', 'Premium_LRS' - :type storage_account_type: str or - ~azure.mgmt.compute.v2017_12_01.models.StorageAccountTypes - """ - - _validation = { - 'os_type': {'required': True}, - 'os_state': {'required': True}, - } - - _attribute_map = { - 'os_type': {'key': 'osType', 'type': 'OperatingSystemTypes'}, - 'os_state': {'key': 'osState', 'type': 'OperatingSystemStateTypes'}, - 'snapshot': {'key': 'snapshot', 'type': 'SubResource'}, - 'managed_disk': {'key': 'managedDisk', 'type': 'SubResource'}, - 'blob_uri': {'key': 'blobUri', 'type': 'str'}, - 'caching': {'key': 'caching', 'type': 'CachingTypes'}, - 'disk_size_gb': {'key': 'diskSizeGB', 'type': 'int'}, - 'storage_account_type': {'key': 'storageAccountType', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ImageOSDisk, self).__init__(**kwargs) - self.os_type = kwargs.get('os_type', None) - self.os_state = kwargs.get('os_state', None) - self.snapshot = kwargs.get('snapshot', None) - self.managed_disk = kwargs.get('managed_disk', None) - self.blob_uri = kwargs.get('blob_uri', None) - self.caching = kwargs.get('caching', None) - self.disk_size_gb = kwargs.get('disk_size_gb', None) - self.storage_account_type = kwargs.get('storage_account_type', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/image_os_disk_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/image_os_disk_py3.py deleted file mode 100644 index 82cf4bc8a8ff..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/image_os_disk_py3.py +++ /dev/null @@ -1,77 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ImageOSDisk(Model): - """Describes an Operating System disk. - - All required parameters must be populated in order to send to Azure. - - :param os_type: Required. This property allows you to specify the type of - the OS that is included in the disk if creating a VM from a custom image. -

    Possible values are:

    **Windows**

    **Linux**. - Possible values include: 'Windows', 'Linux' - :type os_type: str or - ~azure.mgmt.compute.v2017_12_01.models.OperatingSystemTypes - :param os_state: Required. The OS State. Possible values include: - 'Generalized', 'Specialized' - :type os_state: str or - ~azure.mgmt.compute.v2017_12_01.models.OperatingSystemStateTypes - :param snapshot: The snapshot. - :type snapshot: ~azure.mgmt.compute.v2017_12_01.models.SubResource - :param managed_disk: The managedDisk. - :type managed_disk: ~azure.mgmt.compute.v2017_12_01.models.SubResource - :param blob_uri: The Virtual Hard Disk. - :type blob_uri: str - :param caching: Specifies the caching requirements.

    Possible - values are:

    **None**

    **ReadOnly**

    **ReadWrite** -

    Default: **None for Standard storage. ReadOnly for Premium - storage**. Possible values include: 'None', 'ReadOnly', 'ReadWrite' - :type caching: str or ~azure.mgmt.compute.v2017_12_01.models.CachingTypes - :param disk_size_gb: Specifies the size of empty data disks in gigabytes. - This element can be used to overwrite the name of the disk in a virtual - machine image.

    This value cannot be larger than 1023 GB - :type disk_size_gb: int - :param storage_account_type: Specifies the storage account type for the - managed disk. Possible values are: Standard_LRS or Premium_LRS. Possible - values include: 'Standard_LRS', 'Premium_LRS' - :type storage_account_type: str or - ~azure.mgmt.compute.v2017_12_01.models.StorageAccountTypes - """ - - _validation = { - 'os_type': {'required': True}, - 'os_state': {'required': True}, - } - - _attribute_map = { - 'os_type': {'key': 'osType', 'type': 'OperatingSystemTypes'}, - 'os_state': {'key': 'osState', 'type': 'OperatingSystemStateTypes'}, - 'snapshot': {'key': 'snapshot', 'type': 'SubResource'}, - 'managed_disk': {'key': 'managedDisk', 'type': 'SubResource'}, - 'blob_uri': {'key': 'blobUri', 'type': 'str'}, - 'caching': {'key': 'caching', 'type': 'CachingTypes'}, - 'disk_size_gb': {'key': 'diskSizeGB', 'type': 'int'}, - 'storage_account_type': {'key': 'storageAccountType', 'type': 'str'}, - } - - def __init__(self, *, os_type, os_state, snapshot=None, managed_disk=None, blob_uri: str=None, caching=None, disk_size_gb: int=None, storage_account_type=None, **kwargs) -> None: - super(ImageOSDisk, self).__init__(**kwargs) - self.os_type = os_type - self.os_state = os_state - self.snapshot = snapshot - self.managed_disk = managed_disk - self.blob_uri = blob_uri - self.caching = caching - self.disk_size_gb = disk_size_gb - self.storage_account_type = storage_account_type diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/image_paged.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/image_paged.py deleted file mode 100644 index 246e7f8043a7..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/image_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class ImagePaged(Paged): - """ - A paging container for iterating over a list of :class:`Image ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[Image]'} - } - - def __init__(self, *args, **kwargs): - - super(ImagePaged, self).__init__(*args, **kwargs) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/image_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/image_py3.py deleted file mode 100644 index 65e29e15d43f..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/image_py3.py +++ /dev/null @@ -1,70 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource_py3 import Resource - - -class Image(Resource): - """The source user image virtual hard disk. The virtual hard disk will be - copied before being attached to the virtual machine. If SourceImage is - provided, the destination virtual hard drive must not exist. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource Id - :vartype id: str - :ivar name: Resource name - :vartype name: str - :ivar type: Resource type - :vartype type: str - :param location: Required. Resource location - :type location: str - :param tags: Resource tags - :type tags: dict[str, str] - :param source_virtual_machine: The source virtual machine from which Image - is created. - :type source_virtual_machine: - ~azure.mgmt.compute.v2017_12_01.models.SubResource - :param storage_profile: Specifies the storage settings for the virtual - machine disks. - :type storage_profile: - ~azure.mgmt.compute.v2017_12_01.models.ImageStorageProfile - :ivar provisioning_state: The provisioning state. - :vartype provisioning_state: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - 'provisioning_state': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'source_virtual_machine': {'key': 'properties.sourceVirtualMachine', 'type': 'SubResource'}, - 'storage_profile': {'key': 'properties.storageProfile', 'type': 'ImageStorageProfile'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - } - - def __init__(self, *, location: str, tags=None, source_virtual_machine=None, storage_profile=None, **kwargs) -> None: - super(Image, self).__init__(location=location, tags=tags, **kwargs) - self.source_virtual_machine = source_virtual_machine - self.storage_profile = storage_profile - self.provisioning_state = None diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/image_reference.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/image_reference.py deleted file mode 100644 index b8f929f4ad70..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/image_reference.py +++ /dev/null @@ -1,54 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .sub_resource import SubResource - - -class ImageReference(SubResource): - """Specifies information about the image to use. You can specify information - about platform images, marketplace images, or virtual machine images. This - element is required when you want to use a platform image, marketplace - image, or virtual machine image, but is not used in other creation - operations. - - :param id: Resource Id - :type id: str - :param publisher: The image publisher. - :type publisher: str - :param offer: Specifies the offer of the platform image or marketplace - image used to create the virtual machine. - :type offer: str - :param sku: The image SKU. - :type sku: str - :param version: Specifies the version of the platform image or marketplace - image used to create the virtual machine. The allowed formats are - Major.Minor.Build or 'latest'. Major, Minor, and Build are decimal - numbers. Specify 'latest' to use the latest version of an image available - at deploy time. Even if you use 'latest', the VM image will not - automatically update after deploy time even if a new version becomes - available. - :type version: str - """ - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'publisher': {'key': 'publisher', 'type': 'str'}, - 'offer': {'key': 'offer', 'type': 'str'}, - 'sku': {'key': 'sku', 'type': 'str'}, - 'version': {'key': 'version', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ImageReference, self).__init__(**kwargs) - self.publisher = kwargs.get('publisher', None) - self.offer = kwargs.get('offer', None) - self.sku = kwargs.get('sku', None) - self.version = kwargs.get('version', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/image_reference_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/image_reference_py3.py deleted file mode 100644 index 1d7eefe5ac65..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/image_reference_py3.py +++ /dev/null @@ -1,54 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .sub_resource_py3 import SubResource - - -class ImageReference(SubResource): - """Specifies information about the image to use. You can specify information - about platform images, marketplace images, or virtual machine images. This - element is required when you want to use a platform image, marketplace - image, or virtual machine image, but is not used in other creation - operations. - - :param id: Resource Id - :type id: str - :param publisher: The image publisher. - :type publisher: str - :param offer: Specifies the offer of the platform image or marketplace - image used to create the virtual machine. - :type offer: str - :param sku: The image SKU. - :type sku: str - :param version: Specifies the version of the platform image or marketplace - image used to create the virtual machine. The allowed formats are - Major.Minor.Build or 'latest'. Major, Minor, and Build are decimal - numbers. Specify 'latest' to use the latest version of an image available - at deploy time. Even if you use 'latest', the VM image will not - automatically update after deploy time even if a new version becomes - available. - :type version: str - """ - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'publisher': {'key': 'publisher', 'type': 'str'}, - 'offer': {'key': 'offer', 'type': 'str'}, - 'sku': {'key': 'sku', 'type': 'str'}, - 'version': {'key': 'version', 'type': 'str'}, - } - - def __init__(self, *, id: str=None, publisher: str=None, offer: str=None, sku: str=None, version: str=None, **kwargs) -> None: - super(ImageReference, self).__init__(id=id, **kwargs) - self.publisher = publisher - self.offer = offer - self.sku = sku - self.version = version diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/image_storage_profile.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/image_storage_profile.py deleted file mode 100644 index 96fbc8a86600..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/image_storage_profile.py +++ /dev/null @@ -1,45 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ImageStorageProfile(Model): - """Describes a storage profile. - - :param os_disk: Specifies information about the operating system disk used - by the virtual machine.

    For more information about disks, see - [About disks and VHDs for Azure virtual - machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-about-disks-vhds?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). - :type os_disk: ~azure.mgmt.compute.v2017_12_01.models.ImageOSDisk - :param data_disks: Specifies the parameters that are used to add a data - disk to a virtual machine.

    For more information about disks, see - [About disks and VHDs for Azure virtual - machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-about-disks-vhds?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). - :type data_disks: - list[~azure.mgmt.compute.v2017_12_01.models.ImageDataDisk] - :param zone_resilient: Specifies whether an image is zone resilient or - not. Default is false. Zone resilient images can be created only in - regions that provide Zone Redundant Storage (ZRS). - :type zone_resilient: bool - """ - - _attribute_map = { - 'os_disk': {'key': 'osDisk', 'type': 'ImageOSDisk'}, - 'data_disks': {'key': 'dataDisks', 'type': '[ImageDataDisk]'}, - 'zone_resilient': {'key': 'zoneResilient', 'type': 'bool'}, - } - - def __init__(self, **kwargs): - super(ImageStorageProfile, self).__init__(**kwargs) - self.os_disk = kwargs.get('os_disk', None) - self.data_disks = kwargs.get('data_disks', None) - self.zone_resilient = kwargs.get('zone_resilient', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/image_storage_profile_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/image_storage_profile_py3.py deleted file mode 100644 index be49697f8a8f..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/image_storage_profile_py3.py +++ /dev/null @@ -1,45 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ImageStorageProfile(Model): - """Describes a storage profile. - - :param os_disk: Specifies information about the operating system disk used - by the virtual machine.

    For more information about disks, see - [About disks and VHDs for Azure virtual - machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-about-disks-vhds?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). - :type os_disk: ~azure.mgmt.compute.v2017_12_01.models.ImageOSDisk - :param data_disks: Specifies the parameters that are used to add a data - disk to a virtual machine.

    For more information about disks, see - [About disks and VHDs for Azure virtual - machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-about-disks-vhds?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). - :type data_disks: - list[~azure.mgmt.compute.v2017_12_01.models.ImageDataDisk] - :param zone_resilient: Specifies whether an image is zone resilient or - not. Default is false. Zone resilient images can be created only in - regions that provide Zone Redundant Storage (ZRS). - :type zone_resilient: bool - """ - - _attribute_map = { - 'os_disk': {'key': 'osDisk', 'type': 'ImageOSDisk'}, - 'data_disks': {'key': 'dataDisks', 'type': '[ImageDataDisk]'}, - 'zone_resilient': {'key': 'zoneResilient', 'type': 'bool'}, - } - - def __init__(self, *, os_disk=None, data_disks=None, zone_resilient: bool=None, **kwargs) -> None: - super(ImageStorageProfile, self).__init__(**kwargs) - self.os_disk = os_disk - self.data_disks = data_disks - self.zone_resilient = zone_resilient diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/image_update.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/image_update.py deleted file mode 100644 index 6a801afa5ee5..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/image_update.py +++ /dev/null @@ -1,50 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .update_resource import UpdateResource - - -class ImageUpdate(UpdateResource): - """The source user image virtual hard disk. Only tags may be updated. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :param tags: Resource tags - :type tags: dict[str, str] - :param source_virtual_machine: The source virtual machine from which Image - is created. - :type source_virtual_machine: - ~azure.mgmt.compute.v2017_12_01.models.SubResource - :param storage_profile: Specifies the storage settings for the virtual - machine disks. - :type storage_profile: - ~azure.mgmt.compute.v2017_12_01.models.ImageStorageProfile - :ivar provisioning_state: The provisioning state. - :vartype provisioning_state: str - """ - - _validation = { - 'provisioning_state': {'readonly': True}, - } - - _attribute_map = { - 'tags': {'key': 'tags', 'type': '{str}'}, - 'source_virtual_machine': {'key': 'properties.sourceVirtualMachine', 'type': 'SubResource'}, - 'storage_profile': {'key': 'properties.storageProfile', 'type': 'ImageStorageProfile'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ImageUpdate, self).__init__(**kwargs) - self.source_virtual_machine = kwargs.get('source_virtual_machine', None) - self.storage_profile = kwargs.get('storage_profile', None) - self.provisioning_state = None diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/image_update_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/image_update_py3.py deleted file mode 100644 index a1d5db473166..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/image_update_py3.py +++ /dev/null @@ -1,50 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .update_resource_py3 import UpdateResource - - -class ImageUpdate(UpdateResource): - """The source user image virtual hard disk. Only tags may be updated. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :param tags: Resource tags - :type tags: dict[str, str] - :param source_virtual_machine: The source virtual machine from which Image - is created. - :type source_virtual_machine: - ~azure.mgmt.compute.v2017_12_01.models.SubResource - :param storage_profile: Specifies the storage settings for the virtual - machine disks. - :type storage_profile: - ~azure.mgmt.compute.v2017_12_01.models.ImageStorageProfile - :ivar provisioning_state: The provisioning state. - :vartype provisioning_state: str - """ - - _validation = { - 'provisioning_state': {'readonly': True}, - } - - _attribute_map = { - 'tags': {'key': 'tags', 'type': '{str}'}, - 'source_virtual_machine': {'key': 'properties.sourceVirtualMachine', 'type': 'SubResource'}, - 'storage_profile': {'key': 'properties.storageProfile', 'type': 'ImageStorageProfile'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - } - - def __init__(self, *, tags=None, source_virtual_machine=None, storage_profile=None, **kwargs) -> None: - super(ImageUpdate, self).__init__(tags=tags, **kwargs) - self.source_virtual_machine = source_virtual_machine - self.storage_profile = storage_profile - self.provisioning_state = None diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/inner_error.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/inner_error.py deleted file mode 100644 index 6324249d7c19..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/inner_error.py +++ /dev/null @@ -1,32 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class InnerError(Model): - """Inner error details. - - :param exceptiontype: The exception type. - :type exceptiontype: str - :param errordetail: The internal error message or exception dump. - :type errordetail: str - """ - - _attribute_map = { - 'exceptiontype': {'key': 'exceptiontype', 'type': 'str'}, - 'errordetail': {'key': 'errordetail', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(InnerError, self).__init__(**kwargs) - self.exceptiontype = kwargs.get('exceptiontype', None) - self.errordetail = kwargs.get('errordetail', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/inner_error_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/inner_error_py3.py deleted file mode 100644 index ccec30d7b53f..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/inner_error_py3.py +++ /dev/null @@ -1,32 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class InnerError(Model): - """Inner error details. - - :param exceptiontype: The exception type. - :type exceptiontype: str - :param errordetail: The internal error message or exception dump. - :type errordetail: str - """ - - _attribute_map = { - 'exceptiontype': {'key': 'exceptiontype', 'type': 'str'}, - 'errordetail': {'key': 'errordetail', 'type': 'str'}, - } - - def __init__(self, *, exceptiontype: str=None, errordetail: str=None, **kwargs) -> None: - super(InnerError, self).__init__(**kwargs) - self.exceptiontype = exceptiontype - self.errordetail = errordetail diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/instance_view_status.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/instance_view_status.py deleted file mode 100644 index b4c68fdfcaf8..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/instance_view_status.py +++ /dev/null @@ -1,47 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class InstanceViewStatus(Model): - """Instance view status. - - :param code: The status code. - :type code: str - :param level: The level code. Possible values include: 'Info', 'Warning', - 'Error' - :type level: str or - ~azure.mgmt.compute.v2017_12_01.models.StatusLevelTypes - :param display_status: The short localizable label for the status. - :type display_status: str - :param message: The detailed status message, including for alerts and - error messages. - :type message: str - :param time: The time of the status. - :type time: datetime - """ - - _attribute_map = { - 'code': {'key': 'code', 'type': 'str'}, - 'level': {'key': 'level', 'type': 'StatusLevelTypes'}, - 'display_status': {'key': 'displayStatus', 'type': 'str'}, - 'message': {'key': 'message', 'type': 'str'}, - 'time': {'key': 'time', 'type': 'iso-8601'}, - } - - def __init__(self, **kwargs): - super(InstanceViewStatus, self).__init__(**kwargs) - self.code = kwargs.get('code', None) - self.level = kwargs.get('level', None) - self.display_status = kwargs.get('display_status', None) - self.message = kwargs.get('message', None) - self.time = kwargs.get('time', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/instance_view_status_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/instance_view_status_py3.py deleted file mode 100644 index d1e94fe3a593..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/instance_view_status_py3.py +++ /dev/null @@ -1,47 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class InstanceViewStatus(Model): - """Instance view status. - - :param code: The status code. - :type code: str - :param level: The level code. Possible values include: 'Info', 'Warning', - 'Error' - :type level: str or - ~azure.mgmt.compute.v2017_12_01.models.StatusLevelTypes - :param display_status: The short localizable label for the status. - :type display_status: str - :param message: The detailed status message, including for alerts and - error messages. - :type message: str - :param time: The time of the status. - :type time: datetime - """ - - _attribute_map = { - 'code': {'key': 'code', 'type': 'str'}, - 'level': {'key': 'level', 'type': 'StatusLevelTypes'}, - 'display_status': {'key': 'displayStatus', 'type': 'str'}, - 'message': {'key': 'message', 'type': 'str'}, - 'time': {'key': 'time', 'type': 'iso-8601'}, - } - - def __init__(self, *, code: str=None, level=None, display_status: str=None, message: str=None, time=None, **kwargs) -> None: - super(InstanceViewStatus, self).__init__(**kwargs) - self.code = code - self.level = level - self.display_status = display_status - self.message = message - self.time = time diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/key_vault_key_reference.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/key_vault_key_reference.py deleted file mode 100644 index dbd9aab31680..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/key_vault_key_reference.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class KeyVaultKeyReference(Model): - """Describes a reference to Key Vault Key. - - All required parameters must be populated in order to send to Azure. - - :param key_url: Required. The URL referencing a key encryption key in Key - Vault. - :type key_url: str - :param source_vault: Required. The relative URL of the Key Vault - containing the key. - :type source_vault: ~azure.mgmt.compute.v2017_12_01.models.SubResource - """ - - _validation = { - 'key_url': {'required': True}, - 'source_vault': {'required': True}, - } - - _attribute_map = { - 'key_url': {'key': 'keyUrl', 'type': 'str'}, - 'source_vault': {'key': 'sourceVault', 'type': 'SubResource'}, - } - - def __init__(self, **kwargs): - super(KeyVaultKeyReference, self).__init__(**kwargs) - self.key_url = kwargs.get('key_url', None) - self.source_vault = kwargs.get('source_vault', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/key_vault_key_reference_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/key_vault_key_reference_py3.py deleted file mode 100644 index 0cc9f051bc12..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/key_vault_key_reference_py3.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class KeyVaultKeyReference(Model): - """Describes a reference to Key Vault Key. - - All required parameters must be populated in order to send to Azure. - - :param key_url: Required. The URL referencing a key encryption key in Key - Vault. - :type key_url: str - :param source_vault: Required. The relative URL of the Key Vault - containing the key. - :type source_vault: ~azure.mgmt.compute.v2017_12_01.models.SubResource - """ - - _validation = { - 'key_url': {'required': True}, - 'source_vault': {'required': True}, - } - - _attribute_map = { - 'key_url': {'key': 'keyUrl', 'type': 'str'}, - 'source_vault': {'key': 'sourceVault', 'type': 'SubResource'}, - } - - def __init__(self, *, key_url: str, source_vault, **kwargs) -> None: - super(KeyVaultKeyReference, self).__init__(**kwargs) - self.key_url = key_url - self.source_vault = source_vault diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/key_vault_secret_reference.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/key_vault_secret_reference.py deleted file mode 100644 index 26f6dd38deab..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/key_vault_secret_reference.py +++ /dev/null @@ -1,40 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class KeyVaultSecretReference(Model): - """Describes a reference to Key Vault Secret. - - All required parameters must be populated in order to send to Azure. - - :param secret_url: Required. The URL referencing a secret in a Key Vault. - :type secret_url: str - :param source_vault: Required. The relative URL of the Key Vault - containing the secret. - :type source_vault: ~azure.mgmt.compute.v2017_12_01.models.SubResource - """ - - _validation = { - 'secret_url': {'required': True}, - 'source_vault': {'required': True}, - } - - _attribute_map = { - 'secret_url': {'key': 'secretUrl', 'type': 'str'}, - 'source_vault': {'key': 'sourceVault', 'type': 'SubResource'}, - } - - def __init__(self, **kwargs): - super(KeyVaultSecretReference, self).__init__(**kwargs) - self.secret_url = kwargs.get('secret_url', None) - self.source_vault = kwargs.get('source_vault', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/key_vault_secret_reference_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/key_vault_secret_reference_py3.py deleted file mode 100644 index 75bf7d78846e..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/key_vault_secret_reference_py3.py +++ /dev/null @@ -1,40 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class KeyVaultSecretReference(Model): - """Describes a reference to Key Vault Secret. - - All required parameters must be populated in order to send to Azure. - - :param secret_url: Required. The URL referencing a secret in a Key Vault. - :type secret_url: str - :param source_vault: Required. The relative URL of the Key Vault - containing the secret. - :type source_vault: ~azure.mgmt.compute.v2017_12_01.models.SubResource - """ - - _validation = { - 'secret_url': {'required': True}, - 'source_vault': {'required': True}, - } - - _attribute_map = { - 'secret_url': {'key': 'secretUrl', 'type': 'str'}, - 'source_vault': {'key': 'sourceVault', 'type': 'SubResource'}, - } - - def __init__(self, *, secret_url: str, source_vault, **kwargs) -> None: - super(KeyVaultSecretReference, self).__init__(**kwargs) - self.secret_url = secret_url - self.source_vault = source_vault diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/linux_configuration.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/linux_configuration.py deleted file mode 100644 index 81edbf298df9..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/linux_configuration.py +++ /dev/null @@ -1,39 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class LinuxConfiguration(Model): - """Specifies the Linux operating system settings on the virtual machine. -

    For a list of supported Linux distributions, see [Linux on - Azure-Endorsed - Distributions](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-endorsed-distros?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json) -

    For running non-endorsed distributions, see [Information for - Non-Endorsed - Distributions](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-create-upload-generic?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json). - - :param disable_password_authentication: Specifies whether password - authentication should be disabled. - :type disable_password_authentication: bool - :param ssh: Specifies the ssh key configuration for a Linux OS. - :type ssh: ~azure.mgmt.compute.v2017_12_01.models.SshConfiguration - """ - - _attribute_map = { - 'disable_password_authentication': {'key': 'disablePasswordAuthentication', 'type': 'bool'}, - 'ssh': {'key': 'ssh', 'type': 'SshConfiguration'}, - } - - def __init__(self, **kwargs): - super(LinuxConfiguration, self).__init__(**kwargs) - self.disable_password_authentication = kwargs.get('disable_password_authentication', None) - self.ssh = kwargs.get('ssh', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/linux_configuration_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/linux_configuration_py3.py deleted file mode 100644 index a2bc8ef028cc..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/linux_configuration_py3.py +++ /dev/null @@ -1,39 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class LinuxConfiguration(Model): - """Specifies the Linux operating system settings on the virtual machine. -

    For a list of supported Linux distributions, see [Linux on - Azure-Endorsed - Distributions](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-endorsed-distros?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json) -

    For running non-endorsed distributions, see [Information for - Non-Endorsed - Distributions](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-create-upload-generic?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json). - - :param disable_password_authentication: Specifies whether password - authentication should be disabled. - :type disable_password_authentication: bool - :param ssh: Specifies the ssh key configuration for a Linux OS. - :type ssh: ~azure.mgmt.compute.v2017_12_01.models.SshConfiguration - """ - - _attribute_map = { - 'disable_password_authentication': {'key': 'disablePasswordAuthentication', 'type': 'bool'}, - 'ssh': {'key': 'ssh', 'type': 'SshConfiguration'}, - } - - def __init__(self, *, disable_password_authentication: bool=None, ssh=None, **kwargs) -> None: - super(LinuxConfiguration, self).__init__(**kwargs) - self.disable_password_authentication = disable_password_authentication - self.ssh = ssh diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/log_analytics_input_base.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/log_analytics_input_base.py deleted file mode 100644 index 46bbc4f44411..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/log_analytics_input_base.py +++ /dev/null @@ -1,58 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class LogAnalyticsInputBase(Model): - """Api input base class for LogAnalytics Api. - - All required parameters must be populated in order to send to Azure. - - :param blob_container_sas_uri: Required. SAS Uri of the logging blob - container to which LogAnalytics Api writes output logs to. - :type blob_container_sas_uri: str - :param from_time: Required. From time of the query - :type from_time: datetime - :param to_time: Required. To time of the query - :type to_time: datetime - :param group_by_throttle_policy: Group query result by Throttle Policy - applied. - :type group_by_throttle_policy: bool - :param group_by_operation_name: Group query result by Operation Name. - :type group_by_operation_name: bool - :param group_by_resource_name: Group query result by Resource Name. - :type group_by_resource_name: bool - """ - - _validation = { - 'blob_container_sas_uri': {'required': True}, - 'from_time': {'required': True}, - 'to_time': {'required': True}, - } - - _attribute_map = { - 'blob_container_sas_uri': {'key': 'blobContainerSasUri', 'type': 'str'}, - 'from_time': {'key': 'fromTime', 'type': 'iso-8601'}, - 'to_time': {'key': 'toTime', 'type': 'iso-8601'}, - 'group_by_throttle_policy': {'key': 'groupByThrottlePolicy', 'type': 'bool'}, - 'group_by_operation_name': {'key': 'groupByOperationName', 'type': 'bool'}, - 'group_by_resource_name': {'key': 'groupByResourceName', 'type': 'bool'}, - } - - def __init__(self, **kwargs): - super(LogAnalyticsInputBase, self).__init__(**kwargs) - self.blob_container_sas_uri = kwargs.get('blob_container_sas_uri', None) - self.from_time = kwargs.get('from_time', None) - self.to_time = kwargs.get('to_time', None) - self.group_by_throttle_policy = kwargs.get('group_by_throttle_policy', None) - self.group_by_operation_name = kwargs.get('group_by_operation_name', None) - self.group_by_resource_name = kwargs.get('group_by_resource_name', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/log_analytics_input_base_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/log_analytics_input_base_py3.py deleted file mode 100644 index f713c2cb0629..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/log_analytics_input_base_py3.py +++ /dev/null @@ -1,58 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class LogAnalyticsInputBase(Model): - """Api input base class for LogAnalytics Api. - - All required parameters must be populated in order to send to Azure. - - :param blob_container_sas_uri: Required. SAS Uri of the logging blob - container to which LogAnalytics Api writes output logs to. - :type blob_container_sas_uri: str - :param from_time: Required. From time of the query - :type from_time: datetime - :param to_time: Required. To time of the query - :type to_time: datetime - :param group_by_throttle_policy: Group query result by Throttle Policy - applied. - :type group_by_throttle_policy: bool - :param group_by_operation_name: Group query result by Operation Name. - :type group_by_operation_name: bool - :param group_by_resource_name: Group query result by Resource Name. - :type group_by_resource_name: bool - """ - - _validation = { - 'blob_container_sas_uri': {'required': True}, - 'from_time': {'required': True}, - 'to_time': {'required': True}, - } - - _attribute_map = { - 'blob_container_sas_uri': {'key': 'blobContainerSasUri', 'type': 'str'}, - 'from_time': {'key': 'fromTime', 'type': 'iso-8601'}, - 'to_time': {'key': 'toTime', 'type': 'iso-8601'}, - 'group_by_throttle_policy': {'key': 'groupByThrottlePolicy', 'type': 'bool'}, - 'group_by_operation_name': {'key': 'groupByOperationName', 'type': 'bool'}, - 'group_by_resource_name': {'key': 'groupByResourceName', 'type': 'bool'}, - } - - def __init__(self, *, blob_container_sas_uri: str, from_time, to_time, group_by_throttle_policy: bool=None, group_by_operation_name: bool=None, group_by_resource_name: bool=None, **kwargs) -> None: - super(LogAnalyticsInputBase, self).__init__(**kwargs) - self.blob_container_sas_uri = blob_container_sas_uri - self.from_time = from_time - self.to_time = to_time - self.group_by_throttle_policy = group_by_throttle_policy - self.group_by_operation_name = group_by_operation_name - self.group_by_resource_name = group_by_resource_name diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/log_analytics_operation_result.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/log_analytics_operation_result.py deleted file mode 100644 index 131f5fcee091..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/log_analytics_operation_result.py +++ /dev/null @@ -1,56 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .operation_status_response import OperationStatusResponse - - -class LogAnalyticsOperationResult(OperationStatusResponse): - """LogAnalytics operation status response. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar name: Operation ID - :vartype name: str - :ivar status: Operation status - :vartype status: str - :ivar start_time: Start time of the operation - :vartype start_time: datetime - :ivar end_time: End time of the operation - :vartype end_time: datetime - :ivar error: Api error - :vartype error: ~azure.mgmt.compute.v2017_12_01.models.ApiError - :ivar properties: LogAnalyticsOutput - :vartype properties: - ~azure.mgmt.compute.v2017_12_01.models.LogAnalyticsOutput - """ - - _validation = { - 'name': {'readonly': True}, - 'status': {'readonly': True}, - 'start_time': {'readonly': True}, - 'end_time': {'readonly': True}, - 'error': {'readonly': True}, - 'properties': {'readonly': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'status': {'key': 'status', 'type': 'str'}, - 'start_time': {'key': 'startTime', 'type': 'iso-8601'}, - 'end_time': {'key': 'endTime', 'type': 'iso-8601'}, - 'error': {'key': 'error', 'type': 'ApiError'}, - 'properties': {'key': 'properties', 'type': 'LogAnalyticsOutput'}, - } - - def __init__(self, **kwargs): - super(LogAnalyticsOperationResult, self).__init__(**kwargs) - self.properties = None diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/log_analytics_operation_result_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/log_analytics_operation_result_py3.py deleted file mode 100644 index bab57ba54ad9..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/log_analytics_operation_result_py3.py +++ /dev/null @@ -1,56 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .operation_status_response_py3 import OperationStatusResponse - - -class LogAnalyticsOperationResult(OperationStatusResponse): - """LogAnalytics operation status response. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar name: Operation ID - :vartype name: str - :ivar status: Operation status - :vartype status: str - :ivar start_time: Start time of the operation - :vartype start_time: datetime - :ivar end_time: End time of the operation - :vartype end_time: datetime - :ivar error: Api error - :vartype error: ~azure.mgmt.compute.v2017_12_01.models.ApiError - :ivar properties: LogAnalyticsOutput - :vartype properties: - ~azure.mgmt.compute.v2017_12_01.models.LogAnalyticsOutput - """ - - _validation = { - 'name': {'readonly': True}, - 'status': {'readonly': True}, - 'start_time': {'readonly': True}, - 'end_time': {'readonly': True}, - 'error': {'readonly': True}, - 'properties': {'readonly': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'status': {'key': 'status', 'type': 'str'}, - 'start_time': {'key': 'startTime', 'type': 'iso-8601'}, - 'end_time': {'key': 'endTime', 'type': 'iso-8601'}, - 'error': {'key': 'error', 'type': 'ApiError'}, - 'properties': {'key': 'properties', 'type': 'LogAnalyticsOutput'}, - } - - def __init__(self, **kwargs) -> None: - super(LogAnalyticsOperationResult, self).__init__(**kwargs) - self.properties = None diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/log_analytics_output.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/log_analytics_output.py deleted file mode 100644 index 5ea1615011c3..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/log_analytics_output.py +++ /dev/null @@ -1,35 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class LogAnalyticsOutput(Model): - """LogAnalytics output properties. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar output: Output file Uri path to blob container. - :vartype output: str - """ - - _validation = { - 'output': {'readonly': True}, - } - - _attribute_map = { - 'output': {'key': 'output', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(LogAnalyticsOutput, self).__init__(**kwargs) - self.output = None diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/log_analytics_output_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/log_analytics_output_py3.py deleted file mode 100644 index 71a428a8e49a..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/log_analytics_output_py3.py +++ /dev/null @@ -1,35 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class LogAnalyticsOutput(Model): - """LogAnalytics output properties. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar output: Output file Uri path to blob container. - :vartype output: str - """ - - _validation = { - 'output': {'readonly': True}, - } - - _attribute_map = { - 'output': {'key': 'output', 'type': 'str'}, - } - - def __init__(self, **kwargs) -> None: - super(LogAnalyticsOutput, self).__init__(**kwargs) - self.output = None diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/maintenance_redeploy_status.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/maintenance_redeploy_status.py deleted file mode 100644 index 3a707b8d7e0e..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/maintenance_redeploy_status.py +++ /dev/null @@ -1,60 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class MaintenanceRedeployStatus(Model): - """Maintenance Operation Status. - - :param is_customer_initiated_maintenance_allowed: True, if customer is - allowed to perform Maintenance. - :type is_customer_initiated_maintenance_allowed: bool - :param pre_maintenance_window_start_time: Start Time for the Pre - Maintenance Window. - :type pre_maintenance_window_start_time: datetime - :param pre_maintenance_window_end_time: End Time for the Pre Maintenance - Window. - :type pre_maintenance_window_end_time: datetime - :param maintenance_window_start_time: Start Time for the Maintenance - Window. - :type maintenance_window_start_time: datetime - :param maintenance_window_end_time: End Time for the Maintenance Window. - :type maintenance_window_end_time: datetime - :param last_operation_result_code: The Last Maintenance Operation Result - Code. Possible values include: 'None', 'RetryLater', 'MaintenanceAborted', - 'MaintenanceCompleted' - :type last_operation_result_code: str or - ~azure.mgmt.compute.v2017_12_01.models.MaintenanceOperationResultCodeTypes - :param last_operation_message: Message returned for the last Maintenance - Operation. - :type last_operation_message: str - """ - - _attribute_map = { - 'is_customer_initiated_maintenance_allowed': {'key': 'isCustomerInitiatedMaintenanceAllowed', 'type': 'bool'}, - 'pre_maintenance_window_start_time': {'key': 'preMaintenanceWindowStartTime', 'type': 'iso-8601'}, - 'pre_maintenance_window_end_time': {'key': 'preMaintenanceWindowEndTime', 'type': 'iso-8601'}, - 'maintenance_window_start_time': {'key': 'maintenanceWindowStartTime', 'type': 'iso-8601'}, - 'maintenance_window_end_time': {'key': 'maintenanceWindowEndTime', 'type': 'iso-8601'}, - 'last_operation_result_code': {'key': 'lastOperationResultCode', 'type': 'MaintenanceOperationResultCodeTypes'}, - 'last_operation_message': {'key': 'lastOperationMessage', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(MaintenanceRedeployStatus, self).__init__(**kwargs) - self.is_customer_initiated_maintenance_allowed = kwargs.get('is_customer_initiated_maintenance_allowed', None) - self.pre_maintenance_window_start_time = kwargs.get('pre_maintenance_window_start_time', None) - self.pre_maintenance_window_end_time = kwargs.get('pre_maintenance_window_end_time', None) - self.maintenance_window_start_time = kwargs.get('maintenance_window_start_time', None) - self.maintenance_window_end_time = kwargs.get('maintenance_window_end_time', None) - self.last_operation_result_code = kwargs.get('last_operation_result_code', None) - self.last_operation_message = kwargs.get('last_operation_message', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/maintenance_redeploy_status_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/maintenance_redeploy_status_py3.py deleted file mode 100644 index a8d2a66f8d32..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/maintenance_redeploy_status_py3.py +++ /dev/null @@ -1,60 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class MaintenanceRedeployStatus(Model): - """Maintenance Operation Status. - - :param is_customer_initiated_maintenance_allowed: True, if customer is - allowed to perform Maintenance. - :type is_customer_initiated_maintenance_allowed: bool - :param pre_maintenance_window_start_time: Start Time for the Pre - Maintenance Window. - :type pre_maintenance_window_start_time: datetime - :param pre_maintenance_window_end_time: End Time for the Pre Maintenance - Window. - :type pre_maintenance_window_end_time: datetime - :param maintenance_window_start_time: Start Time for the Maintenance - Window. - :type maintenance_window_start_time: datetime - :param maintenance_window_end_time: End Time for the Maintenance Window. - :type maintenance_window_end_time: datetime - :param last_operation_result_code: The Last Maintenance Operation Result - Code. Possible values include: 'None', 'RetryLater', 'MaintenanceAborted', - 'MaintenanceCompleted' - :type last_operation_result_code: str or - ~azure.mgmt.compute.v2017_12_01.models.MaintenanceOperationResultCodeTypes - :param last_operation_message: Message returned for the last Maintenance - Operation. - :type last_operation_message: str - """ - - _attribute_map = { - 'is_customer_initiated_maintenance_allowed': {'key': 'isCustomerInitiatedMaintenanceAllowed', 'type': 'bool'}, - 'pre_maintenance_window_start_time': {'key': 'preMaintenanceWindowStartTime', 'type': 'iso-8601'}, - 'pre_maintenance_window_end_time': {'key': 'preMaintenanceWindowEndTime', 'type': 'iso-8601'}, - 'maintenance_window_start_time': {'key': 'maintenanceWindowStartTime', 'type': 'iso-8601'}, - 'maintenance_window_end_time': {'key': 'maintenanceWindowEndTime', 'type': 'iso-8601'}, - 'last_operation_result_code': {'key': 'lastOperationResultCode', 'type': 'MaintenanceOperationResultCodeTypes'}, - 'last_operation_message': {'key': 'lastOperationMessage', 'type': 'str'}, - } - - def __init__(self, *, is_customer_initiated_maintenance_allowed: bool=None, pre_maintenance_window_start_time=None, pre_maintenance_window_end_time=None, maintenance_window_start_time=None, maintenance_window_end_time=None, last_operation_result_code=None, last_operation_message: str=None, **kwargs) -> None: - super(MaintenanceRedeployStatus, self).__init__(**kwargs) - self.is_customer_initiated_maintenance_allowed = is_customer_initiated_maintenance_allowed - self.pre_maintenance_window_start_time = pre_maintenance_window_start_time - self.pre_maintenance_window_end_time = pre_maintenance_window_end_time - self.maintenance_window_start_time = maintenance_window_start_time - self.maintenance_window_end_time = maintenance_window_end_time - self.last_operation_result_code = last_operation_result_code - self.last_operation_message = last_operation_message diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/managed_disk_parameters.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/managed_disk_parameters.py deleted file mode 100644 index 508b95430415..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/managed_disk_parameters.py +++ /dev/null @@ -1,34 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .sub_resource import SubResource - - -class ManagedDiskParameters(SubResource): - """The parameters of a managed disk. - - :param id: Resource Id - :type id: str - :param storage_account_type: Specifies the storage account type for the - managed disk. Possible values are: Standard_LRS or Premium_LRS. Possible - values include: 'Standard_LRS', 'Premium_LRS' - :type storage_account_type: str or - ~azure.mgmt.compute.v2017_12_01.models.StorageAccountTypes - """ - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'storage_account_type': {'key': 'storageAccountType', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ManagedDiskParameters, self).__init__(**kwargs) - self.storage_account_type = kwargs.get('storage_account_type', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/managed_disk_parameters_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/managed_disk_parameters_py3.py deleted file mode 100644 index 8941c0baa651..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/managed_disk_parameters_py3.py +++ /dev/null @@ -1,34 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .sub_resource_py3 import SubResource - - -class ManagedDiskParameters(SubResource): - """The parameters of a managed disk. - - :param id: Resource Id - :type id: str - :param storage_account_type: Specifies the storage account type for the - managed disk. Possible values are: Standard_LRS or Premium_LRS. Possible - values include: 'Standard_LRS', 'Premium_LRS' - :type storage_account_type: str or - ~azure.mgmt.compute.v2017_12_01.models.StorageAccountTypes - """ - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'storage_account_type': {'key': 'storageAccountType', 'type': 'str'}, - } - - def __init__(self, *, id: str=None, storage_account_type=None, **kwargs) -> None: - super(ManagedDiskParameters, self).__init__(id=id, **kwargs) - self.storage_account_type = storage_account_type diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/network_interface_reference.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/network_interface_reference.py deleted file mode 100644 index b86e305e3f74..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/network_interface_reference.py +++ /dev/null @@ -1,32 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .sub_resource import SubResource - - -class NetworkInterfaceReference(SubResource): - """Describes a network interface reference. - - :param id: Resource Id - :type id: str - :param primary: Specifies the primary network interface in case the - virtual machine has more than 1 network interface. - :type primary: bool - """ - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'primary': {'key': 'properties.primary', 'type': 'bool'}, - } - - def __init__(self, **kwargs): - super(NetworkInterfaceReference, self).__init__(**kwargs) - self.primary = kwargs.get('primary', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/network_interface_reference_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/network_interface_reference_py3.py deleted file mode 100644 index 47da29278832..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/network_interface_reference_py3.py +++ /dev/null @@ -1,32 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .sub_resource_py3 import SubResource - - -class NetworkInterfaceReference(SubResource): - """Describes a network interface reference. - - :param id: Resource Id - :type id: str - :param primary: Specifies the primary network interface in case the - virtual machine has more than 1 network interface. - :type primary: bool - """ - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'primary': {'key': 'properties.primary', 'type': 'bool'}, - } - - def __init__(self, *, id: str=None, primary: bool=None, **kwargs) -> None: - super(NetworkInterfaceReference, self).__init__(id=id, **kwargs) - self.primary = primary diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/network_profile.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/network_profile.py deleted file mode 100644 index 0176effa4701..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/network_profile.py +++ /dev/null @@ -1,30 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class NetworkProfile(Model): - """Specifies the network interfaces of the virtual machine. - - :param network_interfaces: Specifies the list of resource Ids for the - network interfaces associated with the virtual machine. - :type network_interfaces: - list[~azure.mgmt.compute.v2017_12_01.models.NetworkInterfaceReference] - """ - - _attribute_map = { - 'network_interfaces': {'key': 'networkInterfaces', 'type': '[NetworkInterfaceReference]'}, - } - - def __init__(self, **kwargs): - super(NetworkProfile, self).__init__(**kwargs) - self.network_interfaces = kwargs.get('network_interfaces', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/network_profile_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/network_profile_py3.py deleted file mode 100644 index 80e37240104b..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/network_profile_py3.py +++ /dev/null @@ -1,30 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class NetworkProfile(Model): - """Specifies the network interfaces of the virtual machine. - - :param network_interfaces: Specifies the list of resource Ids for the - network interfaces associated with the virtual machine. - :type network_interfaces: - list[~azure.mgmt.compute.v2017_12_01.models.NetworkInterfaceReference] - """ - - _attribute_map = { - 'network_interfaces': {'key': 'networkInterfaces', 'type': '[NetworkInterfaceReference]'}, - } - - def __init__(self, *, network_interfaces=None, **kwargs) -> None: - super(NetworkProfile, self).__init__(**kwargs) - self.network_interfaces = network_interfaces diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/operation_status_response.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/operation_status_response.py deleted file mode 100644 index 6fbf5a148137..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/operation_status_response.py +++ /dev/null @@ -1,55 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class OperationStatusResponse(Model): - """Operation status response. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar name: Operation ID - :vartype name: str - :ivar status: Operation status - :vartype status: str - :ivar start_time: Start time of the operation - :vartype start_time: datetime - :ivar end_time: End time of the operation - :vartype end_time: datetime - :ivar error: Api error - :vartype error: ~azure.mgmt.compute.v2017_12_01.models.ApiError - """ - - _validation = { - 'name': {'readonly': True}, - 'status': {'readonly': True}, - 'start_time': {'readonly': True}, - 'end_time': {'readonly': True}, - 'error': {'readonly': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'status': {'key': 'status', 'type': 'str'}, - 'start_time': {'key': 'startTime', 'type': 'iso-8601'}, - 'end_time': {'key': 'endTime', 'type': 'iso-8601'}, - 'error': {'key': 'error', 'type': 'ApiError'}, - } - - def __init__(self, **kwargs): - super(OperationStatusResponse, self).__init__(**kwargs) - self.name = None - self.status = None - self.start_time = None - self.end_time = None - self.error = None diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/operation_status_response_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/operation_status_response_py3.py deleted file mode 100644 index 3c93c2616788..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/operation_status_response_py3.py +++ /dev/null @@ -1,55 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class OperationStatusResponse(Model): - """Operation status response. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar name: Operation ID - :vartype name: str - :ivar status: Operation status - :vartype status: str - :ivar start_time: Start time of the operation - :vartype start_time: datetime - :ivar end_time: End time of the operation - :vartype end_time: datetime - :ivar error: Api error - :vartype error: ~azure.mgmt.compute.v2017_12_01.models.ApiError - """ - - _validation = { - 'name': {'readonly': True}, - 'status': {'readonly': True}, - 'start_time': {'readonly': True}, - 'end_time': {'readonly': True}, - 'error': {'readonly': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'status': {'key': 'status', 'type': 'str'}, - 'start_time': {'key': 'startTime', 'type': 'iso-8601'}, - 'end_time': {'key': 'endTime', 'type': 'iso-8601'}, - 'error': {'key': 'error', 'type': 'ApiError'}, - } - - def __init__(self, **kwargs) -> None: - super(OperationStatusResponse, self).__init__(**kwargs) - self.name = None - self.status = None - self.start_time = None - self.end_time = None - self.error = None diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/os_disk.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/os_disk.py deleted file mode 100644 index 1ea552d93227..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/os_disk.py +++ /dev/null @@ -1,97 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class OSDisk(Model): - """Specifies information about the operating system disk used by the virtual - machine.

    For more information about disks, see [About disks and - VHDs for Azure virtual - machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-about-disks-vhds?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). - - All required parameters must be populated in order to send to Azure. - - :param os_type: This property allows you to specify the type of the OS - that is included in the disk if creating a VM from user-image or a - specialized VHD.

    Possible values are:

    **Windows** -

    **Linux**. Possible values include: 'Windows', 'Linux' - :type os_type: str or - ~azure.mgmt.compute.v2017_12_01.models.OperatingSystemTypes - :param encryption_settings: Specifies the encryption settings for the OS - Disk.

    Minimum api-version: 2015-06-15 - :type encryption_settings: - ~azure.mgmt.compute.v2017_12_01.models.DiskEncryptionSettings - :param name: The disk name. - :type name: str - :param vhd: The virtual hard disk. - :type vhd: ~azure.mgmt.compute.v2017_12_01.models.VirtualHardDisk - :param image: The source user image virtual hard disk. The virtual hard - disk will be copied before being attached to the virtual machine. If - SourceImage is provided, the destination virtual hard drive must not - exist. - :type image: ~azure.mgmt.compute.v2017_12_01.models.VirtualHardDisk - :param caching: Specifies the caching requirements.

    Possible - values are:

    **None**

    **ReadOnly**

    **ReadWrite** -

    Default: **None for Standard storage. ReadOnly for Premium - storage**. Possible values include: 'None', 'ReadOnly', 'ReadWrite' - :type caching: str or ~azure.mgmt.compute.v2017_12_01.models.CachingTypes - :param write_accelerator_enabled: Specifies whether writeAccelerator - should be enabled or disabled on the disk. - :type write_accelerator_enabled: bool - :param create_option: Required. Specifies how the virtual machine should - be created.

    Possible values are:

    **Attach** \\u2013 This - value is used when you are using a specialized disk to create the virtual - machine.

    **FromImage** \\u2013 This value is used when you are - using an image to create the virtual machine. If you are using a platform - image, you also use the imageReference element described above. If you are - using a marketplace image, you also use the plan element previously - described. Possible values include: 'FromImage', 'Empty', 'Attach' - :type create_option: str or - ~azure.mgmt.compute.v2017_12_01.models.DiskCreateOptionTypes - :param disk_size_gb: Specifies the size of an empty data disk in - gigabytes. This element can be used to overwrite the size of the disk in a - virtual machine image.

    This value cannot be larger than 1023 GB - :type disk_size_gb: int - :param managed_disk: The managed disk parameters. - :type managed_disk: - ~azure.mgmt.compute.v2017_12_01.models.ManagedDiskParameters - """ - - _validation = { - 'create_option': {'required': True}, - } - - _attribute_map = { - 'os_type': {'key': 'osType', 'type': 'OperatingSystemTypes'}, - 'encryption_settings': {'key': 'encryptionSettings', 'type': 'DiskEncryptionSettings'}, - 'name': {'key': 'name', 'type': 'str'}, - 'vhd': {'key': 'vhd', 'type': 'VirtualHardDisk'}, - 'image': {'key': 'image', 'type': 'VirtualHardDisk'}, - 'caching': {'key': 'caching', 'type': 'CachingTypes'}, - 'write_accelerator_enabled': {'key': 'writeAcceleratorEnabled', 'type': 'bool'}, - 'create_option': {'key': 'createOption', 'type': 'str'}, - 'disk_size_gb': {'key': 'diskSizeGB', 'type': 'int'}, - 'managed_disk': {'key': 'managedDisk', 'type': 'ManagedDiskParameters'}, - } - - def __init__(self, **kwargs): - super(OSDisk, self).__init__(**kwargs) - self.os_type = kwargs.get('os_type', None) - self.encryption_settings = kwargs.get('encryption_settings', None) - self.name = kwargs.get('name', None) - self.vhd = kwargs.get('vhd', None) - self.image = kwargs.get('image', None) - self.caching = kwargs.get('caching', None) - self.write_accelerator_enabled = kwargs.get('write_accelerator_enabled', None) - self.create_option = kwargs.get('create_option', None) - self.disk_size_gb = kwargs.get('disk_size_gb', None) - self.managed_disk = kwargs.get('managed_disk', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/os_disk_image.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/os_disk_image.py deleted file mode 100644 index 1739604a335e..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/os_disk_image.py +++ /dev/null @@ -1,36 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class OSDiskImage(Model): - """Contains the os disk image information. - - All required parameters must be populated in order to send to Azure. - - :param operating_system: Required. The operating system of the - osDiskImage. Possible values include: 'Windows', 'Linux' - :type operating_system: str or - ~azure.mgmt.compute.v2017_12_01.models.OperatingSystemTypes - """ - - _validation = { - 'operating_system': {'required': True}, - } - - _attribute_map = { - 'operating_system': {'key': 'operatingSystem', 'type': 'OperatingSystemTypes'}, - } - - def __init__(self, **kwargs): - super(OSDiskImage, self).__init__(**kwargs) - self.operating_system = kwargs.get('operating_system', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/os_disk_image_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/os_disk_image_py3.py deleted file mode 100644 index 00a360b8ead5..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/os_disk_image_py3.py +++ /dev/null @@ -1,36 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class OSDiskImage(Model): - """Contains the os disk image information. - - All required parameters must be populated in order to send to Azure. - - :param operating_system: Required. The operating system of the - osDiskImage. Possible values include: 'Windows', 'Linux' - :type operating_system: str or - ~azure.mgmt.compute.v2017_12_01.models.OperatingSystemTypes - """ - - _validation = { - 'operating_system': {'required': True}, - } - - _attribute_map = { - 'operating_system': {'key': 'operatingSystem', 'type': 'OperatingSystemTypes'}, - } - - def __init__(self, *, operating_system, **kwargs) -> None: - super(OSDiskImage, self).__init__(**kwargs) - self.operating_system = operating_system diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/os_disk_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/os_disk_py3.py deleted file mode 100644 index 86fdc0a012b5..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/os_disk_py3.py +++ /dev/null @@ -1,97 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class OSDisk(Model): - """Specifies information about the operating system disk used by the virtual - machine.

    For more information about disks, see [About disks and - VHDs for Azure virtual - machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-about-disks-vhds?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). - - All required parameters must be populated in order to send to Azure. - - :param os_type: This property allows you to specify the type of the OS - that is included in the disk if creating a VM from user-image or a - specialized VHD.

    Possible values are:

    **Windows** -

    **Linux**. Possible values include: 'Windows', 'Linux' - :type os_type: str or - ~azure.mgmt.compute.v2017_12_01.models.OperatingSystemTypes - :param encryption_settings: Specifies the encryption settings for the OS - Disk.

    Minimum api-version: 2015-06-15 - :type encryption_settings: - ~azure.mgmt.compute.v2017_12_01.models.DiskEncryptionSettings - :param name: The disk name. - :type name: str - :param vhd: The virtual hard disk. - :type vhd: ~azure.mgmt.compute.v2017_12_01.models.VirtualHardDisk - :param image: The source user image virtual hard disk. The virtual hard - disk will be copied before being attached to the virtual machine. If - SourceImage is provided, the destination virtual hard drive must not - exist. - :type image: ~azure.mgmt.compute.v2017_12_01.models.VirtualHardDisk - :param caching: Specifies the caching requirements.

    Possible - values are:

    **None**

    **ReadOnly**

    **ReadWrite** -

    Default: **None for Standard storage. ReadOnly for Premium - storage**. Possible values include: 'None', 'ReadOnly', 'ReadWrite' - :type caching: str or ~azure.mgmt.compute.v2017_12_01.models.CachingTypes - :param write_accelerator_enabled: Specifies whether writeAccelerator - should be enabled or disabled on the disk. - :type write_accelerator_enabled: bool - :param create_option: Required. Specifies how the virtual machine should - be created.

    Possible values are:

    **Attach** \\u2013 This - value is used when you are using a specialized disk to create the virtual - machine.

    **FromImage** \\u2013 This value is used when you are - using an image to create the virtual machine. If you are using a platform - image, you also use the imageReference element described above. If you are - using a marketplace image, you also use the plan element previously - described. Possible values include: 'FromImage', 'Empty', 'Attach' - :type create_option: str or - ~azure.mgmt.compute.v2017_12_01.models.DiskCreateOptionTypes - :param disk_size_gb: Specifies the size of an empty data disk in - gigabytes. This element can be used to overwrite the size of the disk in a - virtual machine image.

    This value cannot be larger than 1023 GB - :type disk_size_gb: int - :param managed_disk: The managed disk parameters. - :type managed_disk: - ~azure.mgmt.compute.v2017_12_01.models.ManagedDiskParameters - """ - - _validation = { - 'create_option': {'required': True}, - } - - _attribute_map = { - 'os_type': {'key': 'osType', 'type': 'OperatingSystemTypes'}, - 'encryption_settings': {'key': 'encryptionSettings', 'type': 'DiskEncryptionSettings'}, - 'name': {'key': 'name', 'type': 'str'}, - 'vhd': {'key': 'vhd', 'type': 'VirtualHardDisk'}, - 'image': {'key': 'image', 'type': 'VirtualHardDisk'}, - 'caching': {'key': 'caching', 'type': 'CachingTypes'}, - 'write_accelerator_enabled': {'key': 'writeAcceleratorEnabled', 'type': 'bool'}, - 'create_option': {'key': 'createOption', 'type': 'str'}, - 'disk_size_gb': {'key': 'diskSizeGB', 'type': 'int'}, - 'managed_disk': {'key': 'managedDisk', 'type': 'ManagedDiskParameters'}, - } - - def __init__(self, *, create_option, os_type=None, encryption_settings=None, name: str=None, vhd=None, image=None, caching=None, write_accelerator_enabled: bool=None, disk_size_gb: int=None, managed_disk=None, **kwargs) -> None: - super(OSDisk, self).__init__(**kwargs) - self.os_type = os_type - self.encryption_settings = encryption_settings - self.name = name - self.vhd = vhd - self.image = image - self.caching = caching - self.write_accelerator_enabled = write_accelerator_enabled - self.create_option = create_option - self.disk_size_gb = disk_size_gb - self.managed_disk = managed_disk diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/os_profile.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/os_profile.py deleted file mode 100644 index 9da7e7f4519c..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/os_profile.py +++ /dev/null @@ -1,100 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class OSProfile(Model): - """Specifies the operating system settings for the virtual machine. - - :param computer_name: Specifies the host OS name of the virtual machine. -

    This name cannot be updated after the VM is created.

    - **Max-length (Windows):** 15 characters

    **Max-length (Linux):** - 64 characters.

    For naming conventions and restrictions see [Azure - infrastructure services implementation - guidelines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-infrastructure-subscription-accounts-guidelines?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json#1-naming-conventions). - :type computer_name: str - :param admin_username: Specifies the name of the administrator account. -

    **Windows-only restriction:** Cannot end in "."

    - **Disallowed values:** "administrator", "admin", "user", "user1", "test", - "user2", "test1", "user3", "admin1", "1", "123", "a", "actuser", "adm", - "admin2", "aspnet", "backup", "console", "david", "guest", "john", - "owner", "root", "server", "sql", "support", "support_388945a0", "sys", - "test2", "test3", "user4", "user5".

    **Minimum-length (Linux):** 1 - character

    **Max-length (Linux):** 64 characters

    - **Max-length (Windows):** 20 characters

  • For root access to - the Linux VM, see [Using root privileges on Linux virtual machines in - Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-use-root-privileges?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json)
  • - For a list of built-in system users on Linux that should not be used in - this field, see [Selecting User Names for Linux on - Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-usernames?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json) - :type admin_username: str - :param admin_password: Specifies the password of the administrator - account.

    **Minimum-length (Windows):** 8 characters

    - **Minimum-length (Linux):** 6 characters

    **Max-length - (Windows):** 123 characters

    **Max-length (Linux):** 72 characters -

    **Complexity requirements:** 3 out of 4 conditions below need to - be fulfilled
    Has lower characters
    Has upper characters
    Has a - digit
    Has a special character (Regex match [\\W_])

    - **Disallowed values:** "abc@123", "P@$$w0rd", "P@ssw0rd", "P@ssword123", - "Pa$$word", "pass@word1", "Password!", "Password1", "Password22", - "iloveyou!"

    For resetting the password, see [How to reset the - Remote Desktop service or its login password in a Windows - VM](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-reset-rdp?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json) -

    For resetting root password, see [Manage users, SSH, and check or - repair disks on Azure Linux VMs using the VMAccess - Extension](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-using-vmaccess-extension?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json#reset-root-password) - :type admin_password: str - :param custom_data: Specifies a base-64 encoded string of custom data. The - base-64 encoded string is decoded to a binary array that is saved as a - file on the Virtual Machine. The maximum length of the binary array is - 65535 bytes.

    For using cloud-init for your VM, see [Using - cloud-init to customize a Linux VM during - creation](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-using-cloud-init?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json) - :type custom_data: str - :param windows_configuration: Specifies Windows operating system settings - on the virtual machine. - :type windows_configuration: - ~azure.mgmt.compute.v2017_12_01.models.WindowsConfiguration - :param linux_configuration: Specifies the Linux operating system settings - on the virtual machine.

    For a list of supported Linux - distributions, see [Linux on Azure-Endorsed - Distributions](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-endorsed-distros?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json) -

    For running non-endorsed distributions, see [Information for - Non-Endorsed - Distributions](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-create-upload-generic?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json). - :type linux_configuration: - ~azure.mgmt.compute.v2017_12_01.models.LinuxConfiguration - :param secrets: Specifies set of certificates that should be installed - onto the virtual machine. - :type secrets: - list[~azure.mgmt.compute.v2017_12_01.models.VaultSecretGroup] - """ - - _attribute_map = { - 'computer_name': {'key': 'computerName', 'type': 'str'}, - 'admin_username': {'key': 'adminUsername', 'type': 'str'}, - 'admin_password': {'key': 'adminPassword', 'type': 'str'}, - 'custom_data': {'key': 'customData', 'type': 'str'}, - 'windows_configuration': {'key': 'windowsConfiguration', 'type': 'WindowsConfiguration'}, - 'linux_configuration': {'key': 'linuxConfiguration', 'type': 'LinuxConfiguration'}, - 'secrets': {'key': 'secrets', 'type': '[VaultSecretGroup]'}, - } - - def __init__(self, **kwargs): - super(OSProfile, self).__init__(**kwargs) - self.computer_name = kwargs.get('computer_name', None) - self.admin_username = kwargs.get('admin_username', None) - self.admin_password = kwargs.get('admin_password', None) - self.custom_data = kwargs.get('custom_data', None) - self.windows_configuration = kwargs.get('windows_configuration', None) - self.linux_configuration = kwargs.get('linux_configuration', None) - self.secrets = kwargs.get('secrets', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/os_profile_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/os_profile_py3.py deleted file mode 100644 index 0ade1643b53d..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/os_profile_py3.py +++ /dev/null @@ -1,100 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class OSProfile(Model): - """Specifies the operating system settings for the virtual machine. - - :param computer_name: Specifies the host OS name of the virtual machine. -

    This name cannot be updated after the VM is created.

    - **Max-length (Windows):** 15 characters

    **Max-length (Linux):** - 64 characters.

    For naming conventions and restrictions see [Azure - infrastructure services implementation - guidelines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-infrastructure-subscription-accounts-guidelines?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json#1-naming-conventions). - :type computer_name: str - :param admin_username: Specifies the name of the administrator account. -

    **Windows-only restriction:** Cannot end in "."

    - **Disallowed values:** "administrator", "admin", "user", "user1", "test", - "user2", "test1", "user3", "admin1", "1", "123", "a", "actuser", "adm", - "admin2", "aspnet", "backup", "console", "david", "guest", "john", - "owner", "root", "server", "sql", "support", "support_388945a0", "sys", - "test2", "test3", "user4", "user5".

    **Minimum-length (Linux):** 1 - character

    **Max-length (Linux):** 64 characters

    - **Max-length (Windows):** 20 characters

  • For root access to - the Linux VM, see [Using root privileges on Linux virtual machines in - Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-use-root-privileges?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json)
  • - For a list of built-in system users on Linux that should not be used in - this field, see [Selecting User Names for Linux on - Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-usernames?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json) - :type admin_username: str - :param admin_password: Specifies the password of the administrator - account.

    **Minimum-length (Windows):** 8 characters

    - **Minimum-length (Linux):** 6 characters

    **Max-length - (Windows):** 123 characters

    **Max-length (Linux):** 72 characters -

    **Complexity requirements:** 3 out of 4 conditions below need to - be fulfilled
    Has lower characters
    Has upper characters
    Has a - digit
    Has a special character (Regex match [\\W_])

    - **Disallowed values:** "abc@123", "P@$$w0rd", "P@ssw0rd", "P@ssword123", - "Pa$$word", "pass@word1", "Password!", "Password1", "Password22", - "iloveyou!"

    For resetting the password, see [How to reset the - Remote Desktop service or its login password in a Windows - VM](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-reset-rdp?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json) -

    For resetting root password, see [Manage users, SSH, and check or - repair disks on Azure Linux VMs using the VMAccess - Extension](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-using-vmaccess-extension?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json#reset-root-password) - :type admin_password: str - :param custom_data: Specifies a base-64 encoded string of custom data. The - base-64 encoded string is decoded to a binary array that is saved as a - file on the Virtual Machine. The maximum length of the binary array is - 65535 bytes.

    For using cloud-init for your VM, see [Using - cloud-init to customize a Linux VM during - creation](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-using-cloud-init?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json) - :type custom_data: str - :param windows_configuration: Specifies Windows operating system settings - on the virtual machine. - :type windows_configuration: - ~azure.mgmt.compute.v2017_12_01.models.WindowsConfiguration - :param linux_configuration: Specifies the Linux operating system settings - on the virtual machine.

    For a list of supported Linux - distributions, see [Linux on Azure-Endorsed - Distributions](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-endorsed-distros?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json) -

    For running non-endorsed distributions, see [Information for - Non-Endorsed - Distributions](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-create-upload-generic?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json). - :type linux_configuration: - ~azure.mgmt.compute.v2017_12_01.models.LinuxConfiguration - :param secrets: Specifies set of certificates that should be installed - onto the virtual machine. - :type secrets: - list[~azure.mgmt.compute.v2017_12_01.models.VaultSecretGroup] - """ - - _attribute_map = { - 'computer_name': {'key': 'computerName', 'type': 'str'}, - 'admin_username': {'key': 'adminUsername', 'type': 'str'}, - 'admin_password': {'key': 'adminPassword', 'type': 'str'}, - 'custom_data': {'key': 'customData', 'type': 'str'}, - 'windows_configuration': {'key': 'windowsConfiguration', 'type': 'WindowsConfiguration'}, - 'linux_configuration': {'key': 'linuxConfiguration', 'type': 'LinuxConfiguration'}, - 'secrets': {'key': 'secrets', 'type': '[VaultSecretGroup]'}, - } - - def __init__(self, *, computer_name: str=None, admin_username: str=None, admin_password: str=None, custom_data: str=None, windows_configuration=None, linux_configuration=None, secrets=None, **kwargs) -> None: - super(OSProfile, self).__init__(**kwargs) - self.computer_name = computer_name - self.admin_username = admin_username - self.admin_password = admin_password - self.custom_data = custom_data - self.windows_configuration = windows_configuration - self.linux_configuration = linux_configuration - self.secrets = secrets diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/plan.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/plan.py deleted file mode 100644 index d42b6b32cfac..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/plan.py +++ /dev/null @@ -1,46 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class Plan(Model): - """Specifies information about the marketplace image used to create the - virtual machine. This element is only used for marketplace images. Before - you can use a marketplace image from an API, you must enable the image for - programmatic use. In the Azure portal, find the marketplace image that you - want to use and then click **Want to deploy programmatically, Get Started - ->**. Enter any required information and then click **Save**. - - :param name: The plan ID. - :type name: str - :param publisher: The publisher ID. - :type publisher: str - :param product: Specifies the product of the image from the marketplace. - This is the same value as Offer under the imageReference element. - :type product: str - :param promotion_code: The promotion code. - :type promotion_code: str - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'publisher': {'key': 'publisher', 'type': 'str'}, - 'product': {'key': 'product', 'type': 'str'}, - 'promotion_code': {'key': 'promotionCode', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(Plan, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.publisher = kwargs.get('publisher', None) - self.product = kwargs.get('product', None) - self.promotion_code = kwargs.get('promotion_code', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/plan_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/plan_py3.py deleted file mode 100644 index 9cca2c78a123..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/plan_py3.py +++ /dev/null @@ -1,46 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class Plan(Model): - """Specifies information about the marketplace image used to create the - virtual machine. This element is only used for marketplace images. Before - you can use a marketplace image from an API, you must enable the image for - programmatic use. In the Azure portal, find the marketplace image that you - want to use and then click **Want to deploy programmatically, Get Started - ->**. Enter any required information and then click **Save**. - - :param name: The plan ID. - :type name: str - :param publisher: The publisher ID. - :type publisher: str - :param product: Specifies the product of the image from the marketplace. - This is the same value as Offer under the imageReference element. - :type product: str - :param promotion_code: The promotion code. - :type promotion_code: str - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'publisher': {'key': 'publisher', 'type': 'str'}, - 'product': {'key': 'product', 'type': 'str'}, - 'promotion_code': {'key': 'promotionCode', 'type': 'str'}, - } - - def __init__(self, *, name: str=None, publisher: str=None, product: str=None, promotion_code: str=None, **kwargs) -> None: - super(Plan, self).__init__(**kwargs) - self.name = name - self.publisher = publisher - self.product = product - self.promotion_code = promotion_code diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/purchase_plan.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/purchase_plan.py deleted file mode 100644 index 2e1509addca6..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/purchase_plan.py +++ /dev/null @@ -1,47 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class PurchasePlan(Model): - """Used for establishing the purchase context of any 3rd Party artifact - through MarketPlace. - - All required parameters must be populated in order to send to Azure. - - :param publisher: Required. The publisher ID. - :type publisher: str - :param name: Required. The plan ID. - :type name: str - :param product: Required. Specifies the product of the image from the - marketplace. This is the same value as Offer under the imageReference - element. - :type product: str - """ - - _validation = { - 'publisher': {'required': True}, - 'name': {'required': True}, - 'product': {'required': True}, - } - - _attribute_map = { - 'publisher': {'key': 'publisher', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'product': {'key': 'product', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(PurchasePlan, self).__init__(**kwargs) - self.publisher = kwargs.get('publisher', None) - self.name = kwargs.get('name', None) - self.product = kwargs.get('product', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/purchase_plan_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/purchase_plan_py3.py deleted file mode 100644 index 26f7996f1633..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/purchase_plan_py3.py +++ /dev/null @@ -1,47 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class PurchasePlan(Model): - """Used for establishing the purchase context of any 3rd Party artifact - through MarketPlace. - - All required parameters must be populated in order to send to Azure. - - :param publisher: Required. The publisher ID. - :type publisher: str - :param name: Required. The plan ID. - :type name: str - :param product: Required. Specifies the product of the image from the - marketplace. This is the same value as Offer under the imageReference - element. - :type product: str - """ - - _validation = { - 'publisher': {'required': True}, - 'name': {'required': True}, - 'product': {'required': True}, - } - - _attribute_map = { - 'publisher': {'key': 'publisher', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'product': {'key': 'product', 'type': 'str'}, - } - - def __init__(self, *, publisher: str, name: str, product: str, **kwargs) -> None: - super(PurchasePlan, self).__init__(**kwargs) - self.publisher = publisher - self.name = name - self.product = product diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/recovery_walk_response.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/recovery_walk_response.py deleted file mode 100644 index 8dcbca604c7e..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/recovery_walk_response.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class RecoveryWalkResponse(Model): - """Response after calling a manual recovery walk. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar walk_performed: Whether the recovery walk was performed - :vartype walk_performed: bool - :ivar next_platform_update_domain: The next update domain that needs to be - walked. Null means walk spanning all update domains has been completed - :vartype next_platform_update_domain: int - """ - - _validation = { - 'walk_performed': {'readonly': True}, - 'next_platform_update_domain': {'readonly': True}, - } - - _attribute_map = { - 'walk_performed': {'key': 'walkPerformed', 'type': 'bool'}, - 'next_platform_update_domain': {'key': 'nextPlatformUpdateDomain', 'type': 'int'}, - } - - def __init__(self, **kwargs): - super(RecoveryWalkResponse, self).__init__(**kwargs) - self.walk_performed = None - self.next_platform_update_domain = None diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/recovery_walk_response_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/recovery_walk_response_py3.py deleted file mode 100644 index 5b24a0ed9b7a..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/recovery_walk_response_py3.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class RecoveryWalkResponse(Model): - """Response after calling a manual recovery walk. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar walk_performed: Whether the recovery walk was performed - :vartype walk_performed: bool - :ivar next_platform_update_domain: The next update domain that needs to be - walked. Null means walk spanning all update domains has been completed - :vartype next_platform_update_domain: int - """ - - _validation = { - 'walk_performed': {'readonly': True}, - 'next_platform_update_domain': {'readonly': True}, - } - - _attribute_map = { - 'walk_performed': {'key': 'walkPerformed', 'type': 'bool'}, - 'next_platform_update_domain': {'key': 'nextPlatformUpdateDomain', 'type': 'int'}, - } - - def __init__(self, **kwargs) -> None: - super(RecoveryWalkResponse, self).__init__(**kwargs) - self.walk_performed = None - self.next_platform_update_domain = None diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/request_rate_by_interval_input.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/request_rate_by_interval_input.py deleted file mode 100644 index cc3bcf225a84..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/request_rate_by_interval_input.py +++ /dev/null @@ -1,60 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .log_analytics_input_base import LogAnalyticsInputBase - - -class RequestRateByIntervalInput(LogAnalyticsInputBase): - """Api request input for LogAnalytics getRequestRateByInterval Api. - - All required parameters must be populated in order to send to Azure. - - :param blob_container_sas_uri: Required. SAS Uri of the logging blob - container to which LogAnalytics Api writes output logs to. - :type blob_container_sas_uri: str - :param from_time: Required. From time of the query - :type from_time: datetime - :param to_time: Required. To time of the query - :type to_time: datetime - :param group_by_throttle_policy: Group query result by Throttle Policy - applied. - :type group_by_throttle_policy: bool - :param group_by_operation_name: Group query result by Operation Name. - :type group_by_operation_name: bool - :param group_by_resource_name: Group query result by Resource Name. - :type group_by_resource_name: bool - :param interval_length: Required. Interval value in minutes used to create - LogAnalytics call rate logs. Possible values include: 'ThreeMins', - 'FiveMins', 'ThirtyMins', 'SixtyMins' - :type interval_length: str or - ~azure.mgmt.compute.v2017_12_01.models.IntervalInMins - """ - - _validation = { - 'blob_container_sas_uri': {'required': True}, - 'from_time': {'required': True}, - 'to_time': {'required': True}, - 'interval_length': {'required': True}, - } - - _attribute_map = { - 'blob_container_sas_uri': {'key': 'blobContainerSasUri', 'type': 'str'}, - 'from_time': {'key': 'fromTime', 'type': 'iso-8601'}, - 'to_time': {'key': 'toTime', 'type': 'iso-8601'}, - 'group_by_throttle_policy': {'key': 'groupByThrottlePolicy', 'type': 'bool'}, - 'group_by_operation_name': {'key': 'groupByOperationName', 'type': 'bool'}, - 'group_by_resource_name': {'key': 'groupByResourceName', 'type': 'bool'}, - 'interval_length': {'key': 'intervalLength', 'type': 'IntervalInMins'}, - } - - def __init__(self, **kwargs): - super(RequestRateByIntervalInput, self).__init__(**kwargs) - self.interval_length = kwargs.get('interval_length', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/request_rate_by_interval_input_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/request_rate_by_interval_input_py3.py deleted file mode 100644 index db39bafa4729..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/request_rate_by_interval_input_py3.py +++ /dev/null @@ -1,60 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .log_analytics_input_base_py3 import LogAnalyticsInputBase - - -class RequestRateByIntervalInput(LogAnalyticsInputBase): - """Api request input for LogAnalytics getRequestRateByInterval Api. - - All required parameters must be populated in order to send to Azure. - - :param blob_container_sas_uri: Required. SAS Uri of the logging blob - container to which LogAnalytics Api writes output logs to. - :type blob_container_sas_uri: str - :param from_time: Required. From time of the query - :type from_time: datetime - :param to_time: Required. To time of the query - :type to_time: datetime - :param group_by_throttle_policy: Group query result by Throttle Policy - applied. - :type group_by_throttle_policy: bool - :param group_by_operation_name: Group query result by Operation Name. - :type group_by_operation_name: bool - :param group_by_resource_name: Group query result by Resource Name. - :type group_by_resource_name: bool - :param interval_length: Required. Interval value in minutes used to create - LogAnalytics call rate logs. Possible values include: 'ThreeMins', - 'FiveMins', 'ThirtyMins', 'SixtyMins' - :type interval_length: str or - ~azure.mgmt.compute.v2017_12_01.models.IntervalInMins - """ - - _validation = { - 'blob_container_sas_uri': {'required': True}, - 'from_time': {'required': True}, - 'to_time': {'required': True}, - 'interval_length': {'required': True}, - } - - _attribute_map = { - 'blob_container_sas_uri': {'key': 'blobContainerSasUri', 'type': 'str'}, - 'from_time': {'key': 'fromTime', 'type': 'iso-8601'}, - 'to_time': {'key': 'toTime', 'type': 'iso-8601'}, - 'group_by_throttle_policy': {'key': 'groupByThrottlePolicy', 'type': 'bool'}, - 'group_by_operation_name': {'key': 'groupByOperationName', 'type': 'bool'}, - 'group_by_resource_name': {'key': 'groupByResourceName', 'type': 'bool'}, - 'interval_length': {'key': 'intervalLength', 'type': 'IntervalInMins'}, - } - - def __init__(self, *, blob_container_sas_uri: str, from_time, to_time, interval_length, group_by_throttle_policy: bool=None, group_by_operation_name: bool=None, group_by_resource_name: bool=None, **kwargs) -> None: - super(RequestRateByIntervalInput, self).__init__(blob_container_sas_uri=blob_container_sas_uri, from_time=from_time, to_time=to_time, group_by_throttle_policy=group_by_throttle_policy, group_by_operation_name=group_by_operation_name, group_by_resource_name=group_by_resource_name, **kwargs) - self.interval_length = interval_length diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/resource.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/resource.py deleted file mode 100644 index 5dd7d481c685..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/resource.py +++ /dev/null @@ -1,56 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class Resource(Model): - """The Resource model definition. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource Id - :vartype id: str - :ivar name: Resource name - :vartype name: str - :ivar type: Resource type - :vartype type: str - :param location: Required. Resource location - :type location: str - :param tags: Resource tags - :type tags: dict[str, str] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - } - - def __init__(self, **kwargs): - super(Resource, self).__init__(**kwargs) - self.id = None - self.name = None - self.type = None - self.location = kwargs.get('location', None) - self.tags = kwargs.get('tags', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/resource_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/resource_py3.py deleted file mode 100644 index 2f3702caf609..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/resource_py3.py +++ /dev/null @@ -1,56 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class Resource(Model): - """The Resource model definition. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource Id - :vartype id: str - :ivar name: Resource name - :vartype name: str - :ivar type: Resource type - :vartype type: str - :param location: Required. Resource location - :type location: str - :param tags: Resource tags - :type tags: dict[str, str] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - } - - def __init__(self, *, location: str, tags=None, **kwargs) -> None: - super(Resource, self).__init__(**kwargs) - self.id = None - self.name = None - self.type = None - self.location = location - self.tags = tags diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/rollback_status_info.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/rollback_status_info.py deleted file mode 100644 index 5f4ef5e06784..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/rollback_status_info.py +++ /dev/null @@ -1,48 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class RollbackStatusInfo(Model): - """Information about rollback on failed VM instances after a OS Upgrade - operation. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar successfully_rolledback_instance_count: The number of instances - which have been successfully rolled back. - :vartype successfully_rolledback_instance_count: int - :ivar failed_rolledback_instance_count: The number of instances which - failed to rollback. - :vartype failed_rolledback_instance_count: int - :ivar rollback_error: Error details if OS rollback failed. - :vartype rollback_error: ~azure.mgmt.compute.v2017_12_01.models.ApiError - """ - - _validation = { - 'successfully_rolledback_instance_count': {'readonly': True}, - 'failed_rolledback_instance_count': {'readonly': True}, - 'rollback_error': {'readonly': True}, - } - - _attribute_map = { - 'successfully_rolledback_instance_count': {'key': 'successfullyRolledbackInstanceCount', 'type': 'int'}, - 'failed_rolledback_instance_count': {'key': 'failedRolledbackInstanceCount', 'type': 'int'}, - 'rollback_error': {'key': 'rollbackError', 'type': 'ApiError'}, - } - - def __init__(self, **kwargs): - super(RollbackStatusInfo, self).__init__(**kwargs) - self.successfully_rolledback_instance_count = None - self.failed_rolledback_instance_count = None - self.rollback_error = None diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/rollback_status_info_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/rollback_status_info_py3.py deleted file mode 100644 index c3bab57af6c9..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/rollback_status_info_py3.py +++ /dev/null @@ -1,48 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class RollbackStatusInfo(Model): - """Information about rollback on failed VM instances after a OS Upgrade - operation. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar successfully_rolledback_instance_count: The number of instances - which have been successfully rolled back. - :vartype successfully_rolledback_instance_count: int - :ivar failed_rolledback_instance_count: The number of instances which - failed to rollback. - :vartype failed_rolledback_instance_count: int - :ivar rollback_error: Error details if OS rollback failed. - :vartype rollback_error: ~azure.mgmt.compute.v2017_12_01.models.ApiError - """ - - _validation = { - 'successfully_rolledback_instance_count': {'readonly': True}, - 'failed_rolledback_instance_count': {'readonly': True}, - 'rollback_error': {'readonly': True}, - } - - _attribute_map = { - 'successfully_rolledback_instance_count': {'key': 'successfullyRolledbackInstanceCount', 'type': 'int'}, - 'failed_rolledback_instance_count': {'key': 'failedRolledbackInstanceCount', 'type': 'int'}, - 'rollback_error': {'key': 'rollbackError', 'type': 'ApiError'}, - } - - def __init__(self, **kwargs) -> None: - super(RollbackStatusInfo, self).__init__(**kwargs) - self.successfully_rolledback_instance_count = None - self.failed_rolledback_instance_count = None - self.rollback_error = None diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/rolling_upgrade_policy.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/rolling_upgrade_policy.py deleted file mode 100644 index 1eecaa5e2e65..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/rolling_upgrade_policy.py +++ /dev/null @@ -1,63 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class RollingUpgradePolicy(Model): - """The configuration parameters used while performing a rolling upgrade. - - :param max_batch_instance_percent: The maximum percent of total virtual - machine instances that will be upgraded simultaneously by the rolling - upgrade in one batch. As this is a maximum, unhealthy instances in - previous or future batches can cause the percentage of instances in a - batch to decrease to ensure higher reliability. The default value for this - parameter is 20%. - :type max_batch_instance_percent: int - :param max_unhealthy_instance_percent: The maximum percentage of the total - virtual machine instances in the scale set that can be simultaneously - unhealthy, either as a result of being upgraded, or by being found in an - unhealthy state by the virtual machine health checks before the rolling - upgrade aborts. This constraint will be checked prior to starting any - batch. The default value for this parameter is 20%. - :type max_unhealthy_instance_percent: int - :param max_unhealthy_upgraded_instance_percent: The maximum percentage of - upgraded virtual machine instances that can be found to be in an unhealthy - state. This check will happen after each batch is upgraded. If this - percentage is ever exceeded, the rolling update aborts. The default value - for this parameter is 20%. - :type max_unhealthy_upgraded_instance_percent: int - :param pause_time_between_batches: The wait time between completing the - update for all virtual machines in one batch and starting the next batch. - The time duration should be specified in ISO 8601 format. The default - value is 0 seconds (PT0S). - :type pause_time_between_batches: str - """ - - _validation = { - 'max_batch_instance_percent': {'maximum': 100, 'minimum': 5}, - 'max_unhealthy_instance_percent': {'maximum': 100, 'minimum': 5}, - 'max_unhealthy_upgraded_instance_percent': {'maximum': 100, 'minimum': 0}, - } - - _attribute_map = { - 'max_batch_instance_percent': {'key': 'maxBatchInstancePercent', 'type': 'int'}, - 'max_unhealthy_instance_percent': {'key': 'maxUnhealthyInstancePercent', 'type': 'int'}, - 'max_unhealthy_upgraded_instance_percent': {'key': 'maxUnhealthyUpgradedInstancePercent', 'type': 'int'}, - 'pause_time_between_batches': {'key': 'pauseTimeBetweenBatches', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(RollingUpgradePolicy, self).__init__(**kwargs) - self.max_batch_instance_percent = kwargs.get('max_batch_instance_percent', None) - self.max_unhealthy_instance_percent = kwargs.get('max_unhealthy_instance_percent', None) - self.max_unhealthy_upgraded_instance_percent = kwargs.get('max_unhealthy_upgraded_instance_percent', None) - self.pause_time_between_batches = kwargs.get('pause_time_between_batches', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/rolling_upgrade_policy_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/rolling_upgrade_policy_py3.py deleted file mode 100644 index e698a382f112..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/rolling_upgrade_policy_py3.py +++ /dev/null @@ -1,63 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class RollingUpgradePolicy(Model): - """The configuration parameters used while performing a rolling upgrade. - - :param max_batch_instance_percent: The maximum percent of total virtual - machine instances that will be upgraded simultaneously by the rolling - upgrade in one batch. As this is a maximum, unhealthy instances in - previous or future batches can cause the percentage of instances in a - batch to decrease to ensure higher reliability. The default value for this - parameter is 20%. - :type max_batch_instance_percent: int - :param max_unhealthy_instance_percent: The maximum percentage of the total - virtual machine instances in the scale set that can be simultaneously - unhealthy, either as a result of being upgraded, or by being found in an - unhealthy state by the virtual machine health checks before the rolling - upgrade aborts. This constraint will be checked prior to starting any - batch. The default value for this parameter is 20%. - :type max_unhealthy_instance_percent: int - :param max_unhealthy_upgraded_instance_percent: The maximum percentage of - upgraded virtual machine instances that can be found to be in an unhealthy - state. This check will happen after each batch is upgraded. If this - percentage is ever exceeded, the rolling update aborts. The default value - for this parameter is 20%. - :type max_unhealthy_upgraded_instance_percent: int - :param pause_time_between_batches: The wait time between completing the - update for all virtual machines in one batch and starting the next batch. - The time duration should be specified in ISO 8601 format. The default - value is 0 seconds (PT0S). - :type pause_time_between_batches: str - """ - - _validation = { - 'max_batch_instance_percent': {'maximum': 100, 'minimum': 5}, - 'max_unhealthy_instance_percent': {'maximum': 100, 'minimum': 5}, - 'max_unhealthy_upgraded_instance_percent': {'maximum': 100, 'minimum': 0}, - } - - _attribute_map = { - 'max_batch_instance_percent': {'key': 'maxBatchInstancePercent', 'type': 'int'}, - 'max_unhealthy_instance_percent': {'key': 'maxUnhealthyInstancePercent', 'type': 'int'}, - 'max_unhealthy_upgraded_instance_percent': {'key': 'maxUnhealthyUpgradedInstancePercent', 'type': 'int'}, - 'pause_time_between_batches': {'key': 'pauseTimeBetweenBatches', 'type': 'str'}, - } - - def __init__(self, *, max_batch_instance_percent: int=None, max_unhealthy_instance_percent: int=None, max_unhealthy_upgraded_instance_percent: int=None, pause_time_between_batches: str=None, **kwargs) -> None: - super(RollingUpgradePolicy, self).__init__(**kwargs) - self.max_batch_instance_percent = max_batch_instance_percent - self.max_unhealthy_instance_percent = max_unhealthy_instance_percent - self.max_unhealthy_upgraded_instance_percent = max_unhealthy_upgraded_instance_percent - self.pause_time_between_batches = pause_time_between_batches diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/rolling_upgrade_progress_info.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/rolling_upgrade_progress_info.py deleted file mode 100644 index 87e40590e275..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/rolling_upgrade_progress_info.py +++ /dev/null @@ -1,55 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class RollingUpgradeProgressInfo(Model): - """Information about the number of virtual machine instances in each upgrade - state. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar successful_instance_count: The number of instances that have been - successfully upgraded. - :vartype successful_instance_count: int - :ivar failed_instance_count: The number of instances that have failed to - be upgraded successfully. - :vartype failed_instance_count: int - :ivar in_progress_instance_count: The number of instances that are - currently being upgraded. - :vartype in_progress_instance_count: int - :ivar pending_instance_count: The number of instances that have not yet - begun to be upgraded. - :vartype pending_instance_count: int - """ - - _validation = { - 'successful_instance_count': {'readonly': True}, - 'failed_instance_count': {'readonly': True}, - 'in_progress_instance_count': {'readonly': True}, - 'pending_instance_count': {'readonly': True}, - } - - _attribute_map = { - 'successful_instance_count': {'key': 'successfulInstanceCount', 'type': 'int'}, - 'failed_instance_count': {'key': 'failedInstanceCount', 'type': 'int'}, - 'in_progress_instance_count': {'key': 'inProgressInstanceCount', 'type': 'int'}, - 'pending_instance_count': {'key': 'pendingInstanceCount', 'type': 'int'}, - } - - def __init__(self, **kwargs): - super(RollingUpgradeProgressInfo, self).__init__(**kwargs) - self.successful_instance_count = None - self.failed_instance_count = None - self.in_progress_instance_count = None - self.pending_instance_count = None diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/rolling_upgrade_progress_info_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/rolling_upgrade_progress_info_py3.py deleted file mode 100644 index 060abc3063b4..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/rolling_upgrade_progress_info_py3.py +++ /dev/null @@ -1,55 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class RollingUpgradeProgressInfo(Model): - """Information about the number of virtual machine instances in each upgrade - state. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar successful_instance_count: The number of instances that have been - successfully upgraded. - :vartype successful_instance_count: int - :ivar failed_instance_count: The number of instances that have failed to - be upgraded successfully. - :vartype failed_instance_count: int - :ivar in_progress_instance_count: The number of instances that are - currently being upgraded. - :vartype in_progress_instance_count: int - :ivar pending_instance_count: The number of instances that have not yet - begun to be upgraded. - :vartype pending_instance_count: int - """ - - _validation = { - 'successful_instance_count': {'readonly': True}, - 'failed_instance_count': {'readonly': True}, - 'in_progress_instance_count': {'readonly': True}, - 'pending_instance_count': {'readonly': True}, - } - - _attribute_map = { - 'successful_instance_count': {'key': 'successfulInstanceCount', 'type': 'int'}, - 'failed_instance_count': {'key': 'failedInstanceCount', 'type': 'int'}, - 'in_progress_instance_count': {'key': 'inProgressInstanceCount', 'type': 'int'}, - 'pending_instance_count': {'key': 'pendingInstanceCount', 'type': 'int'}, - } - - def __init__(self, **kwargs) -> None: - super(RollingUpgradeProgressInfo, self).__init__(**kwargs) - self.successful_instance_count = None - self.failed_instance_count = None - self.in_progress_instance_count = None - self.pending_instance_count = None diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/rolling_upgrade_running_status.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/rolling_upgrade_running_status.py deleted file mode 100644 index 75574e9a9b43..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/rolling_upgrade_running_status.py +++ /dev/null @@ -1,54 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class RollingUpgradeRunningStatus(Model): - """Information about the current running state of the overall upgrade. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar code: Code indicating the current status of the upgrade. Possible - values include: 'RollingForward', 'Cancelled', 'Completed', 'Faulted' - :vartype code: str or - ~azure.mgmt.compute.v2017_12_01.models.RollingUpgradeStatusCode - :ivar start_time: Start time of the upgrade. - :vartype start_time: datetime - :ivar last_action: The last action performed on the rolling upgrade. - Possible values include: 'Start', 'Cancel' - :vartype last_action: str or - ~azure.mgmt.compute.v2017_12_01.models.RollingUpgradeActionType - :ivar last_action_time: Last action time of the upgrade. - :vartype last_action_time: datetime - """ - - _validation = { - 'code': {'readonly': True}, - 'start_time': {'readonly': True}, - 'last_action': {'readonly': True}, - 'last_action_time': {'readonly': True}, - } - - _attribute_map = { - 'code': {'key': 'code', 'type': 'RollingUpgradeStatusCode'}, - 'start_time': {'key': 'startTime', 'type': 'iso-8601'}, - 'last_action': {'key': 'lastAction', 'type': 'RollingUpgradeActionType'}, - 'last_action_time': {'key': 'lastActionTime', 'type': 'iso-8601'}, - } - - def __init__(self, **kwargs): - super(RollingUpgradeRunningStatus, self).__init__(**kwargs) - self.code = None - self.start_time = None - self.last_action = None - self.last_action_time = None diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/rolling_upgrade_running_status_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/rolling_upgrade_running_status_py3.py deleted file mode 100644 index 4479a1c66587..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/rolling_upgrade_running_status_py3.py +++ /dev/null @@ -1,54 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class RollingUpgradeRunningStatus(Model): - """Information about the current running state of the overall upgrade. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar code: Code indicating the current status of the upgrade. Possible - values include: 'RollingForward', 'Cancelled', 'Completed', 'Faulted' - :vartype code: str or - ~azure.mgmt.compute.v2017_12_01.models.RollingUpgradeStatusCode - :ivar start_time: Start time of the upgrade. - :vartype start_time: datetime - :ivar last_action: The last action performed on the rolling upgrade. - Possible values include: 'Start', 'Cancel' - :vartype last_action: str or - ~azure.mgmt.compute.v2017_12_01.models.RollingUpgradeActionType - :ivar last_action_time: Last action time of the upgrade. - :vartype last_action_time: datetime - """ - - _validation = { - 'code': {'readonly': True}, - 'start_time': {'readonly': True}, - 'last_action': {'readonly': True}, - 'last_action_time': {'readonly': True}, - } - - _attribute_map = { - 'code': {'key': 'code', 'type': 'RollingUpgradeStatusCode'}, - 'start_time': {'key': 'startTime', 'type': 'iso-8601'}, - 'last_action': {'key': 'lastAction', 'type': 'RollingUpgradeActionType'}, - 'last_action_time': {'key': 'lastActionTime', 'type': 'iso-8601'}, - } - - def __init__(self, **kwargs) -> None: - super(RollingUpgradeRunningStatus, self).__init__(**kwargs) - self.code = None - self.start_time = None - self.last_action = None - self.last_action_time = None diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/rolling_upgrade_status_info.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/rolling_upgrade_status_info.py deleted file mode 100644 index 5ac9aabb9cc3..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/rolling_upgrade_status_info.py +++ /dev/null @@ -1,76 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource import Resource - - -class RollingUpgradeStatusInfo(Resource): - """The status of the latest virtual machine scale set rolling upgrade. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource Id - :vartype id: str - :ivar name: Resource name - :vartype name: str - :ivar type: Resource type - :vartype type: str - :param location: Required. Resource location - :type location: str - :param tags: Resource tags - :type tags: dict[str, str] - :ivar policy: The rolling upgrade policies applied for this upgrade. - :vartype policy: - ~azure.mgmt.compute.v2017_12_01.models.RollingUpgradePolicy - :ivar running_status: Information about the current running state of the - overall upgrade. - :vartype running_status: - ~azure.mgmt.compute.v2017_12_01.models.RollingUpgradeRunningStatus - :ivar progress: Information about the number of virtual machine instances - in each upgrade state. - :vartype progress: - ~azure.mgmt.compute.v2017_12_01.models.RollingUpgradeProgressInfo - :ivar error: Error details for this upgrade, if there are any. - :vartype error: ~azure.mgmt.compute.v2017_12_01.models.ApiError - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - 'policy': {'readonly': True}, - 'running_status': {'readonly': True}, - 'progress': {'readonly': True}, - 'error': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'policy': {'key': 'properties.policy', 'type': 'RollingUpgradePolicy'}, - 'running_status': {'key': 'properties.runningStatus', 'type': 'RollingUpgradeRunningStatus'}, - 'progress': {'key': 'properties.progress', 'type': 'RollingUpgradeProgressInfo'}, - 'error': {'key': 'properties.error', 'type': 'ApiError'}, - } - - def __init__(self, **kwargs): - super(RollingUpgradeStatusInfo, self).__init__(**kwargs) - self.policy = None - self.running_status = None - self.progress = None - self.error = None diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/rolling_upgrade_status_info_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/rolling_upgrade_status_info_py3.py deleted file mode 100644 index 7f5e4ba43de5..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/rolling_upgrade_status_info_py3.py +++ /dev/null @@ -1,76 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource_py3 import Resource - - -class RollingUpgradeStatusInfo(Resource): - """The status of the latest virtual machine scale set rolling upgrade. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource Id - :vartype id: str - :ivar name: Resource name - :vartype name: str - :ivar type: Resource type - :vartype type: str - :param location: Required. Resource location - :type location: str - :param tags: Resource tags - :type tags: dict[str, str] - :ivar policy: The rolling upgrade policies applied for this upgrade. - :vartype policy: - ~azure.mgmt.compute.v2017_12_01.models.RollingUpgradePolicy - :ivar running_status: Information about the current running state of the - overall upgrade. - :vartype running_status: - ~azure.mgmt.compute.v2017_12_01.models.RollingUpgradeRunningStatus - :ivar progress: Information about the number of virtual machine instances - in each upgrade state. - :vartype progress: - ~azure.mgmt.compute.v2017_12_01.models.RollingUpgradeProgressInfo - :ivar error: Error details for this upgrade, if there are any. - :vartype error: ~azure.mgmt.compute.v2017_12_01.models.ApiError - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - 'policy': {'readonly': True}, - 'running_status': {'readonly': True}, - 'progress': {'readonly': True}, - 'error': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'policy': {'key': 'properties.policy', 'type': 'RollingUpgradePolicy'}, - 'running_status': {'key': 'properties.runningStatus', 'type': 'RollingUpgradeRunningStatus'}, - 'progress': {'key': 'properties.progress', 'type': 'RollingUpgradeProgressInfo'}, - 'error': {'key': 'properties.error', 'type': 'ApiError'}, - } - - def __init__(self, *, location: str, tags=None, **kwargs) -> None: - super(RollingUpgradeStatusInfo, self).__init__(location=location, tags=tags, **kwargs) - self.policy = None - self.running_status = None - self.progress = None - self.error = None diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/run_command_document.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/run_command_document.py deleted file mode 100644 index 42ed05596f77..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/run_command_document.py +++ /dev/null @@ -1,61 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .run_command_document_base import RunCommandDocumentBase - - -class RunCommandDocument(RunCommandDocumentBase): - """Describes the properties of a Run Command. - - All required parameters must be populated in order to send to Azure. - - :param schema: Required. The VM run command schema. - :type schema: str - :param id: Required. The VM run command id. - :type id: str - :param os_type: Required. The Operating System type. Possible values - include: 'Windows', 'Linux' - :type os_type: str or - ~azure.mgmt.compute.v2017_12_01.models.OperatingSystemTypes - :param label: Required. The VM run command label. - :type label: str - :param description: Required. The VM run command description. - :type description: str - :param script: Required. The script to be executed. - :type script: list[str] - :param parameters: The parameters used by the script. - :type parameters: - list[~azure.mgmt.compute.v2017_12_01.models.RunCommandParameterDefinition] - """ - - _validation = { - 'schema': {'required': True}, - 'id': {'required': True}, - 'os_type': {'required': True}, - 'label': {'required': True}, - 'description': {'required': True}, - 'script': {'required': True}, - } - - _attribute_map = { - 'schema': {'key': '$schema', 'type': 'str'}, - 'id': {'key': 'id', 'type': 'str'}, - 'os_type': {'key': 'osType', 'type': 'OperatingSystemTypes'}, - 'label': {'key': 'label', 'type': 'str'}, - 'description': {'key': 'description', 'type': 'str'}, - 'script': {'key': 'script', 'type': '[str]'}, - 'parameters': {'key': 'parameters', 'type': '[RunCommandParameterDefinition]'}, - } - - def __init__(self, **kwargs): - super(RunCommandDocument, self).__init__(**kwargs) - self.script = kwargs.get('script', None) - self.parameters = kwargs.get('parameters', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/run_command_document_base.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/run_command_document_base.py deleted file mode 100644 index 76d44f5e280e..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/run_command_document_base.py +++ /dev/null @@ -1,56 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class RunCommandDocumentBase(Model): - """Describes the properties of a Run Command metadata. - - All required parameters must be populated in order to send to Azure. - - :param schema: Required. The VM run command schema. - :type schema: str - :param id: Required. The VM run command id. - :type id: str - :param os_type: Required. The Operating System type. Possible values - include: 'Windows', 'Linux' - :type os_type: str or - ~azure.mgmt.compute.v2017_12_01.models.OperatingSystemTypes - :param label: Required. The VM run command label. - :type label: str - :param description: Required. The VM run command description. - :type description: str - """ - - _validation = { - 'schema': {'required': True}, - 'id': {'required': True}, - 'os_type': {'required': True}, - 'label': {'required': True}, - 'description': {'required': True}, - } - - _attribute_map = { - 'schema': {'key': '$schema', 'type': 'str'}, - 'id': {'key': 'id', 'type': 'str'}, - 'os_type': {'key': 'osType', 'type': 'OperatingSystemTypes'}, - 'label': {'key': 'label', 'type': 'str'}, - 'description': {'key': 'description', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(RunCommandDocumentBase, self).__init__(**kwargs) - self.schema = kwargs.get('schema', None) - self.id = kwargs.get('id', None) - self.os_type = kwargs.get('os_type', None) - self.label = kwargs.get('label', None) - self.description = kwargs.get('description', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/run_command_document_base_paged.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/run_command_document_base_paged.py deleted file mode 100644 index 61f73f8fe175..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/run_command_document_base_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class RunCommandDocumentBasePaged(Paged): - """ - A paging container for iterating over a list of :class:`RunCommandDocumentBase ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[RunCommandDocumentBase]'} - } - - def __init__(self, *args, **kwargs): - - super(RunCommandDocumentBasePaged, self).__init__(*args, **kwargs) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/run_command_document_base_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/run_command_document_base_py3.py deleted file mode 100644 index 02d2b35e3074..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/run_command_document_base_py3.py +++ /dev/null @@ -1,56 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class RunCommandDocumentBase(Model): - """Describes the properties of a Run Command metadata. - - All required parameters must be populated in order to send to Azure. - - :param schema: Required. The VM run command schema. - :type schema: str - :param id: Required. The VM run command id. - :type id: str - :param os_type: Required. The Operating System type. Possible values - include: 'Windows', 'Linux' - :type os_type: str or - ~azure.mgmt.compute.v2017_12_01.models.OperatingSystemTypes - :param label: Required. The VM run command label. - :type label: str - :param description: Required. The VM run command description. - :type description: str - """ - - _validation = { - 'schema': {'required': True}, - 'id': {'required': True}, - 'os_type': {'required': True}, - 'label': {'required': True}, - 'description': {'required': True}, - } - - _attribute_map = { - 'schema': {'key': '$schema', 'type': 'str'}, - 'id': {'key': 'id', 'type': 'str'}, - 'os_type': {'key': 'osType', 'type': 'OperatingSystemTypes'}, - 'label': {'key': 'label', 'type': 'str'}, - 'description': {'key': 'description', 'type': 'str'}, - } - - def __init__(self, *, schema: str, id: str, os_type, label: str, description: str, **kwargs) -> None: - super(RunCommandDocumentBase, self).__init__(**kwargs) - self.schema = schema - self.id = id - self.os_type = os_type - self.label = label - self.description = description diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/run_command_document_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/run_command_document_py3.py deleted file mode 100644 index cb2631691b22..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/run_command_document_py3.py +++ /dev/null @@ -1,61 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .run_command_document_base_py3 import RunCommandDocumentBase - - -class RunCommandDocument(RunCommandDocumentBase): - """Describes the properties of a Run Command. - - All required parameters must be populated in order to send to Azure. - - :param schema: Required. The VM run command schema. - :type schema: str - :param id: Required. The VM run command id. - :type id: str - :param os_type: Required. The Operating System type. Possible values - include: 'Windows', 'Linux' - :type os_type: str or - ~azure.mgmt.compute.v2017_12_01.models.OperatingSystemTypes - :param label: Required. The VM run command label. - :type label: str - :param description: Required. The VM run command description. - :type description: str - :param script: Required. The script to be executed. - :type script: list[str] - :param parameters: The parameters used by the script. - :type parameters: - list[~azure.mgmt.compute.v2017_12_01.models.RunCommandParameterDefinition] - """ - - _validation = { - 'schema': {'required': True}, - 'id': {'required': True}, - 'os_type': {'required': True}, - 'label': {'required': True}, - 'description': {'required': True}, - 'script': {'required': True}, - } - - _attribute_map = { - 'schema': {'key': '$schema', 'type': 'str'}, - 'id': {'key': 'id', 'type': 'str'}, - 'os_type': {'key': 'osType', 'type': 'OperatingSystemTypes'}, - 'label': {'key': 'label', 'type': 'str'}, - 'description': {'key': 'description', 'type': 'str'}, - 'script': {'key': 'script', 'type': '[str]'}, - 'parameters': {'key': 'parameters', 'type': '[RunCommandParameterDefinition]'}, - } - - def __init__(self, *, schema: str, id: str, os_type, label: str, description: str, script, parameters=None, **kwargs) -> None: - super(RunCommandDocument, self).__init__(schema=schema, id=id, os_type=os_type, label=label, description=description, **kwargs) - self.script = script - self.parameters = parameters diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/run_command_input.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/run_command_input.py deleted file mode 100644 index 5f0b1a70edb1..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/run_command_input.py +++ /dev/null @@ -1,44 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class RunCommandInput(Model): - """Capture Virtual Machine parameters. - - All required parameters must be populated in order to send to Azure. - - :param command_id: Required. The run command id. - :type command_id: str - :param script: Optional. The script to be executed. When this value is - given, the given script will override the default script of the command. - :type script: list[str] - :param parameters: The run command parameters. - :type parameters: - list[~azure.mgmt.compute.v2017_12_01.models.RunCommandInputParameter] - """ - - _validation = { - 'command_id': {'required': True}, - } - - _attribute_map = { - 'command_id': {'key': 'commandId', 'type': 'str'}, - 'script': {'key': 'script', 'type': '[str]'}, - 'parameters': {'key': 'parameters', 'type': '[RunCommandInputParameter]'}, - } - - def __init__(self, **kwargs): - super(RunCommandInput, self).__init__(**kwargs) - self.command_id = kwargs.get('command_id', None) - self.script = kwargs.get('script', None) - self.parameters = kwargs.get('parameters', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/run_command_input_parameter.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/run_command_input_parameter.py deleted file mode 100644 index cd76ad81bfa2..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/run_command_input_parameter.py +++ /dev/null @@ -1,39 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class RunCommandInputParameter(Model): - """Describes the properties of a run command parameter. - - All required parameters must be populated in order to send to Azure. - - :param name: Required. The run command parameter name. - :type name: str - :param value: Required. The run command parameter value. - :type value: str - """ - - _validation = { - 'name': {'required': True}, - 'value': {'required': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'value': {'key': 'value', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(RunCommandInputParameter, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.value = kwargs.get('value', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/run_command_input_parameter_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/run_command_input_parameter_py3.py deleted file mode 100644 index 6013f038a1c3..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/run_command_input_parameter_py3.py +++ /dev/null @@ -1,39 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class RunCommandInputParameter(Model): - """Describes the properties of a run command parameter. - - All required parameters must be populated in order to send to Azure. - - :param name: Required. The run command parameter name. - :type name: str - :param value: Required. The run command parameter value. - :type value: str - """ - - _validation = { - 'name': {'required': True}, - 'value': {'required': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'value': {'key': 'value', 'type': 'str'}, - } - - def __init__(self, *, name: str, value: str, **kwargs) -> None: - super(RunCommandInputParameter, self).__init__(**kwargs) - self.name = name - self.value = value diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/run_command_input_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/run_command_input_py3.py deleted file mode 100644 index f988ee06ecc8..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/run_command_input_py3.py +++ /dev/null @@ -1,44 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class RunCommandInput(Model): - """Capture Virtual Machine parameters. - - All required parameters must be populated in order to send to Azure. - - :param command_id: Required. The run command id. - :type command_id: str - :param script: Optional. The script to be executed. When this value is - given, the given script will override the default script of the command. - :type script: list[str] - :param parameters: The run command parameters. - :type parameters: - list[~azure.mgmt.compute.v2017_12_01.models.RunCommandInputParameter] - """ - - _validation = { - 'command_id': {'required': True}, - } - - _attribute_map = { - 'command_id': {'key': 'commandId', 'type': 'str'}, - 'script': {'key': 'script', 'type': '[str]'}, - 'parameters': {'key': 'parameters', 'type': '[RunCommandInputParameter]'}, - } - - def __init__(self, *, command_id: str, script=None, parameters=None, **kwargs) -> None: - super(RunCommandInput, self).__init__(**kwargs) - self.command_id = command_id - self.script = script - self.parameters = parameters diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/run_command_parameter_definition.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/run_command_parameter_definition.py deleted file mode 100644 index e09f774d8241..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/run_command_parameter_definition.py +++ /dev/null @@ -1,48 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class RunCommandParameterDefinition(Model): - """Describes the properties of a run command parameter. - - All required parameters must be populated in order to send to Azure. - - :param name: Required. The run command parameter name. - :type name: str - :param type: Required. The run command parameter type. - :type type: str - :param default_value: The run command parameter default value. - :type default_value: str - :param required: The run command parameter required. Default value: False - . - :type required: bool - """ - - _validation = { - 'name': {'required': True}, - 'type': {'required': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'default_value': {'key': 'defaultValue', 'type': 'str'}, - 'required': {'key': 'required', 'type': 'bool'}, - } - - def __init__(self, **kwargs): - super(RunCommandParameterDefinition, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.type = kwargs.get('type', None) - self.default_value = kwargs.get('default_value', None) - self.required = kwargs.get('required', False) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/run_command_parameter_definition_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/run_command_parameter_definition_py3.py deleted file mode 100644 index e5fbc708f965..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/run_command_parameter_definition_py3.py +++ /dev/null @@ -1,48 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class RunCommandParameterDefinition(Model): - """Describes the properties of a run command parameter. - - All required parameters must be populated in order to send to Azure. - - :param name: Required. The run command parameter name. - :type name: str - :param type: Required. The run command parameter type. - :type type: str - :param default_value: The run command parameter default value. - :type default_value: str - :param required: The run command parameter required. Default value: False - . - :type required: bool - """ - - _validation = { - 'name': {'required': True}, - 'type': {'required': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'default_value': {'key': 'defaultValue', 'type': 'str'}, - 'required': {'key': 'required', 'type': 'bool'}, - } - - def __init__(self, *, name: str, type: str, default_value: str=None, required: bool=False, **kwargs) -> None: - super(RunCommandParameterDefinition, self).__init__(**kwargs) - self.name = name - self.type = type - self.default_value = default_value - self.required = required diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/run_command_result.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/run_command_result.py deleted file mode 100644 index 955299b65293..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/run_command_result.py +++ /dev/null @@ -1,54 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .operation_status_response import OperationStatusResponse - - -class RunCommandResult(OperationStatusResponse): - """Run command operation response. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar name: Operation ID - :vartype name: str - :ivar status: Operation status - :vartype status: str - :ivar start_time: Start time of the operation - :vartype start_time: datetime - :ivar end_time: End time of the operation - :vartype end_time: datetime - :ivar error: Api error - :vartype error: ~azure.mgmt.compute.v2017_12_01.models.ApiError - :param output: Operation output data (raw JSON) - :type output: object - """ - - _validation = { - 'name': {'readonly': True}, - 'status': {'readonly': True}, - 'start_time': {'readonly': True}, - 'end_time': {'readonly': True}, - 'error': {'readonly': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'status': {'key': 'status', 'type': 'str'}, - 'start_time': {'key': 'startTime', 'type': 'iso-8601'}, - 'end_time': {'key': 'endTime', 'type': 'iso-8601'}, - 'error': {'key': 'error', 'type': 'ApiError'}, - 'output': {'key': 'properties.output', 'type': 'object'}, - } - - def __init__(self, **kwargs): - super(RunCommandResult, self).__init__(**kwargs) - self.output = kwargs.get('output', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/run_command_result_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/run_command_result_py3.py deleted file mode 100644 index 4868e9fd3159..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/run_command_result_py3.py +++ /dev/null @@ -1,54 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .operation_status_response_py3 import OperationStatusResponse - - -class RunCommandResult(OperationStatusResponse): - """Run command operation response. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar name: Operation ID - :vartype name: str - :ivar status: Operation status - :vartype status: str - :ivar start_time: Start time of the operation - :vartype start_time: datetime - :ivar end_time: End time of the operation - :vartype end_time: datetime - :ivar error: Api error - :vartype error: ~azure.mgmt.compute.v2017_12_01.models.ApiError - :param output: Operation output data (raw JSON) - :type output: object - """ - - _validation = { - 'name': {'readonly': True}, - 'status': {'readonly': True}, - 'start_time': {'readonly': True}, - 'end_time': {'readonly': True}, - 'error': {'readonly': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'status': {'key': 'status', 'type': 'str'}, - 'start_time': {'key': 'startTime', 'type': 'iso-8601'}, - 'end_time': {'key': 'endTime', 'type': 'iso-8601'}, - 'error': {'key': 'error', 'type': 'ApiError'}, - 'output': {'key': 'properties.output', 'type': 'object'}, - } - - def __init__(self, *, output=None, **kwargs) -> None: - super(RunCommandResult, self).__init__(**kwargs) - self.output = output diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/sku.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/sku.py deleted file mode 100644 index 5c07709435e0..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/sku.py +++ /dev/null @@ -1,38 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class Sku(Model): - """Describes a virtual machine scale set sku. - - :param name: The sku name. - :type name: str - :param tier: Specifies the tier of virtual machines in a scale set.

    Possible Values:

    **Standard**

    **Basic** - :type tier: str - :param capacity: Specifies the number of virtual machines in the scale - set. - :type capacity: long - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'tier': {'key': 'tier', 'type': 'str'}, - 'capacity': {'key': 'capacity', 'type': 'long'}, - } - - def __init__(self, **kwargs): - super(Sku, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.tier = kwargs.get('tier', None) - self.capacity = kwargs.get('capacity', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/sku_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/sku_py3.py deleted file mode 100644 index f6bc74afaadc..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/sku_py3.py +++ /dev/null @@ -1,38 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class Sku(Model): - """Describes a virtual machine scale set sku. - - :param name: The sku name. - :type name: str - :param tier: Specifies the tier of virtual machines in a scale set.

    Possible Values:

    **Standard**

    **Basic** - :type tier: str - :param capacity: Specifies the number of virtual machines in the scale - set. - :type capacity: long - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'tier': {'key': 'tier', 'type': 'str'}, - 'capacity': {'key': 'capacity', 'type': 'long'}, - } - - def __init__(self, *, name: str=None, tier: str=None, capacity: int=None, **kwargs) -> None: - super(Sku, self).__init__(**kwargs) - self.name = name - self.tier = tier - self.capacity = capacity diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/ssh_configuration.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/ssh_configuration.py deleted file mode 100644 index ffad7bb65963..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/ssh_configuration.py +++ /dev/null @@ -1,30 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class SshConfiguration(Model): - """SSH configuration for Linux based VMs running on Azure. - - :param public_keys: The list of SSH public keys used to authenticate with - linux based VMs. - :type public_keys: - list[~azure.mgmt.compute.v2017_12_01.models.SshPublicKey] - """ - - _attribute_map = { - 'public_keys': {'key': 'publicKeys', 'type': '[SshPublicKey]'}, - } - - def __init__(self, **kwargs): - super(SshConfiguration, self).__init__(**kwargs) - self.public_keys = kwargs.get('public_keys', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/ssh_configuration_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/ssh_configuration_py3.py deleted file mode 100644 index cb23de2268e7..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/ssh_configuration_py3.py +++ /dev/null @@ -1,30 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class SshConfiguration(Model): - """SSH configuration for Linux based VMs running on Azure. - - :param public_keys: The list of SSH public keys used to authenticate with - linux based VMs. - :type public_keys: - list[~azure.mgmt.compute.v2017_12_01.models.SshPublicKey] - """ - - _attribute_map = { - 'public_keys': {'key': 'publicKeys', 'type': '[SshPublicKey]'}, - } - - def __init__(self, *, public_keys=None, **kwargs) -> None: - super(SshConfiguration, self).__init__(**kwargs) - self.public_keys = public_keys diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/ssh_public_key.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/ssh_public_key.py deleted file mode 100644 index 122e0d3b9fdd..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/ssh_public_key.py +++ /dev/null @@ -1,39 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class SshPublicKey(Model): - """Contains information about SSH certificate public key and the path on the - Linux VM where the public key is placed. - - :param path: Specifies the full path on the created VM where ssh public - key is stored. If the file already exists, the specified key is appended - to the file. Example: /home/user/.ssh/authorized_keys - :type path: str - :param key_data: SSH public key certificate used to authenticate with the - VM through ssh. The key needs to be at least 2048-bit and in ssh-rsa - format.

    For creating ssh keys, see [Create SSH keys on Linux and - Mac for Linux VMs in - Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-mac-create-ssh-keys?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json). - :type key_data: str - """ - - _attribute_map = { - 'path': {'key': 'path', 'type': 'str'}, - 'key_data': {'key': 'keyData', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(SshPublicKey, self).__init__(**kwargs) - self.path = kwargs.get('path', None) - self.key_data = kwargs.get('key_data', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/ssh_public_key_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/ssh_public_key_py3.py deleted file mode 100644 index b16ee085b36b..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/ssh_public_key_py3.py +++ /dev/null @@ -1,39 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class SshPublicKey(Model): - """Contains information about SSH certificate public key and the path on the - Linux VM where the public key is placed. - - :param path: Specifies the full path on the created VM where ssh public - key is stored. If the file already exists, the specified key is appended - to the file. Example: /home/user/.ssh/authorized_keys - :type path: str - :param key_data: SSH public key certificate used to authenticate with the - VM through ssh. The key needs to be at least 2048-bit and in ssh-rsa - format.

    For creating ssh keys, see [Create SSH keys on Linux and - Mac for Linux VMs in - Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-mac-create-ssh-keys?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json). - :type key_data: str - """ - - _attribute_map = { - 'path': {'key': 'path', 'type': 'str'}, - 'key_data': {'key': 'keyData', 'type': 'str'}, - } - - def __init__(self, *, path: str=None, key_data: str=None, **kwargs) -> None: - super(SshPublicKey, self).__init__(**kwargs) - self.path = path - self.key_data = key_data diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/storage_profile.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/storage_profile.py deleted file mode 100644 index 1eb78c236281..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/storage_profile.py +++ /dev/null @@ -1,47 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class StorageProfile(Model): - """Specifies the storage settings for the virtual machine disks. - - :param image_reference: Specifies information about the image to use. You - can specify information about platform images, marketplace images, or - virtual machine images. This element is required when you want to use a - platform image, marketplace image, or virtual machine image, but is not - used in other creation operations. - :type image_reference: - ~azure.mgmt.compute.v2017_12_01.models.ImageReference - :param os_disk: Specifies information about the operating system disk used - by the virtual machine.

    For more information about disks, see - [About disks and VHDs for Azure virtual - machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-about-disks-vhds?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). - :type os_disk: ~azure.mgmt.compute.v2017_12_01.models.OSDisk - :param data_disks: Specifies the parameters that are used to add a data - disk to a virtual machine.

    For more information about disks, see - [About disks and VHDs for Azure virtual - machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-about-disks-vhds?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). - :type data_disks: list[~azure.mgmt.compute.v2017_12_01.models.DataDisk] - """ - - _attribute_map = { - 'image_reference': {'key': 'imageReference', 'type': 'ImageReference'}, - 'os_disk': {'key': 'osDisk', 'type': 'OSDisk'}, - 'data_disks': {'key': 'dataDisks', 'type': '[DataDisk]'}, - } - - def __init__(self, **kwargs): - super(StorageProfile, self).__init__(**kwargs) - self.image_reference = kwargs.get('image_reference', None) - self.os_disk = kwargs.get('os_disk', None) - self.data_disks = kwargs.get('data_disks', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/storage_profile_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/storage_profile_py3.py deleted file mode 100644 index aeccf45c2b79..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/storage_profile_py3.py +++ /dev/null @@ -1,47 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class StorageProfile(Model): - """Specifies the storage settings for the virtual machine disks. - - :param image_reference: Specifies information about the image to use. You - can specify information about platform images, marketplace images, or - virtual machine images. This element is required when you want to use a - platform image, marketplace image, or virtual machine image, but is not - used in other creation operations. - :type image_reference: - ~azure.mgmt.compute.v2017_12_01.models.ImageReference - :param os_disk: Specifies information about the operating system disk used - by the virtual machine.

    For more information about disks, see - [About disks and VHDs for Azure virtual - machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-about-disks-vhds?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). - :type os_disk: ~azure.mgmt.compute.v2017_12_01.models.OSDisk - :param data_disks: Specifies the parameters that are used to add a data - disk to a virtual machine.

    For more information about disks, see - [About disks and VHDs for Azure virtual - machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-about-disks-vhds?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). - :type data_disks: list[~azure.mgmt.compute.v2017_12_01.models.DataDisk] - """ - - _attribute_map = { - 'image_reference': {'key': 'imageReference', 'type': 'ImageReference'}, - 'os_disk': {'key': 'osDisk', 'type': 'OSDisk'}, - 'data_disks': {'key': 'dataDisks', 'type': '[DataDisk]'}, - } - - def __init__(self, *, image_reference=None, os_disk=None, data_disks=None, **kwargs) -> None: - super(StorageProfile, self).__init__(**kwargs) - self.image_reference = image_reference - self.os_disk = os_disk - self.data_disks = data_disks diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/sub_resource.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/sub_resource.py deleted file mode 100644 index 11e092cc6ff5..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/sub_resource.py +++ /dev/null @@ -1,28 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class SubResource(Model): - """SubResource. - - :param id: Resource Id - :type id: str - """ - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(SubResource, self).__init__(**kwargs) - self.id = kwargs.get('id', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/sub_resource_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/sub_resource_py3.py deleted file mode 100644 index 29e5afee38f9..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/sub_resource_py3.py +++ /dev/null @@ -1,28 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class SubResource(Model): - """SubResource. - - :param id: Resource Id - :type id: str - """ - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - } - - def __init__(self, *, id: str=None, **kwargs) -> None: - super(SubResource, self).__init__(**kwargs) - self.id = id diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/sub_resource_read_only.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/sub_resource_read_only.py deleted file mode 100644 index 4a0ec466c0d4..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/sub_resource_read_only.py +++ /dev/null @@ -1,35 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class SubResourceReadOnly(Model): - """SubResourceReadOnly. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource Id - :vartype id: str - """ - - _validation = { - 'id': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(SubResourceReadOnly, self).__init__(**kwargs) - self.id = None diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/sub_resource_read_only_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/sub_resource_read_only_py3.py deleted file mode 100644 index cb918e9a2ac6..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/sub_resource_read_only_py3.py +++ /dev/null @@ -1,35 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class SubResourceReadOnly(Model): - """SubResourceReadOnly. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource Id - :vartype id: str - """ - - _validation = { - 'id': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - } - - def __init__(self, **kwargs) -> None: - super(SubResourceReadOnly, self).__init__(**kwargs) - self.id = None diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/throttled_requests_input.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/throttled_requests_input.py deleted file mode 100644 index 502e7be62e68..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/throttled_requests_input.py +++ /dev/null @@ -1,52 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .log_analytics_input_base import LogAnalyticsInputBase - - -class ThrottledRequestsInput(LogAnalyticsInputBase): - """Api request input for LogAnalytics getThrottledRequests Api. - - All required parameters must be populated in order to send to Azure. - - :param blob_container_sas_uri: Required. SAS Uri of the logging blob - container to which LogAnalytics Api writes output logs to. - :type blob_container_sas_uri: str - :param from_time: Required. From time of the query - :type from_time: datetime - :param to_time: Required. To time of the query - :type to_time: datetime - :param group_by_throttle_policy: Group query result by Throttle Policy - applied. - :type group_by_throttle_policy: bool - :param group_by_operation_name: Group query result by Operation Name. - :type group_by_operation_name: bool - :param group_by_resource_name: Group query result by Resource Name. - :type group_by_resource_name: bool - """ - - _validation = { - 'blob_container_sas_uri': {'required': True}, - 'from_time': {'required': True}, - 'to_time': {'required': True}, - } - - _attribute_map = { - 'blob_container_sas_uri': {'key': 'blobContainerSasUri', 'type': 'str'}, - 'from_time': {'key': 'fromTime', 'type': 'iso-8601'}, - 'to_time': {'key': 'toTime', 'type': 'iso-8601'}, - 'group_by_throttle_policy': {'key': 'groupByThrottlePolicy', 'type': 'bool'}, - 'group_by_operation_name': {'key': 'groupByOperationName', 'type': 'bool'}, - 'group_by_resource_name': {'key': 'groupByResourceName', 'type': 'bool'}, - } - - def __init__(self, **kwargs): - super(ThrottledRequestsInput, self).__init__(**kwargs) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/throttled_requests_input_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/throttled_requests_input_py3.py deleted file mode 100644 index a4239a5115de..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/throttled_requests_input_py3.py +++ /dev/null @@ -1,52 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .log_analytics_input_base_py3 import LogAnalyticsInputBase - - -class ThrottledRequestsInput(LogAnalyticsInputBase): - """Api request input for LogAnalytics getThrottledRequests Api. - - All required parameters must be populated in order to send to Azure. - - :param blob_container_sas_uri: Required. SAS Uri of the logging blob - container to which LogAnalytics Api writes output logs to. - :type blob_container_sas_uri: str - :param from_time: Required. From time of the query - :type from_time: datetime - :param to_time: Required. To time of the query - :type to_time: datetime - :param group_by_throttle_policy: Group query result by Throttle Policy - applied. - :type group_by_throttle_policy: bool - :param group_by_operation_name: Group query result by Operation Name. - :type group_by_operation_name: bool - :param group_by_resource_name: Group query result by Resource Name. - :type group_by_resource_name: bool - """ - - _validation = { - 'blob_container_sas_uri': {'required': True}, - 'from_time': {'required': True}, - 'to_time': {'required': True}, - } - - _attribute_map = { - 'blob_container_sas_uri': {'key': 'blobContainerSasUri', 'type': 'str'}, - 'from_time': {'key': 'fromTime', 'type': 'iso-8601'}, - 'to_time': {'key': 'toTime', 'type': 'iso-8601'}, - 'group_by_throttle_policy': {'key': 'groupByThrottlePolicy', 'type': 'bool'}, - 'group_by_operation_name': {'key': 'groupByOperationName', 'type': 'bool'}, - 'group_by_resource_name': {'key': 'groupByResourceName', 'type': 'bool'}, - } - - def __init__(self, *, blob_container_sas_uri: str, from_time, to_time, group_by_throttle_policy: bool=None, group_by_operation_name: bool=None, group_by_resource_name: bool=None, **kwargs) -> None: - super(ThrottledRequestsInput, self).__init__(blob_container_sas_uri=blob_container_sas_uri, from_time=from_time, to_time=to_time, group_by_throttle_policy=group_by_throttle_policy, group_by_operation_name=group_by_operation_name, group_by_resource_name=group_by_resource_name, **kwargs) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/update_resource.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/update_resource.py deleted file mode 100644 index b1d2898ff082..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/update_resource.py +++ /dev/null @@ -1,28 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class UpdateResource(Model): - """The Update Resource model definition. - - :param tags: Resource tags - :type tags: dict[str, str] - """ - - _attribute_map = { - 'tags': {'key': 'tags', 'type': '{str}'}, - } - - def __init__(self, **kwargs): - super(UpdateResource, self).__init__(**kwargs) - self.tags = kwargs.get('tags', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/update_resource_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/update_resource_py3.py deleted file mode 100644 index c06c17c124d9..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/update_resource_py3.py +++ /dev/null @@ -1,28 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class UpdateResource(Model): - """The Update Resource model definition. - - :param tags: Resource tags - :type tags: dict[str, str] - """ - - _attribute_map = { - 'tags': {'key': 'tags', 'type': '{str}'}, - } - - def __init__(self, *, tags=None, **kwargs) -> None: - super(UpdateResource, self).__init__(**kwargs) - self.tags = tags diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/upgrade_operation_historical_status_info.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/upgrade_operation_historical_status_info.py deleted file mode 100644 index 2f52105e7bf0..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/upgrade_operation_historical_status_info.py +++ /dev/null @@ -1,47 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class UpgradeOperationHistoricalStatusInfo(Model): - """Virtual Machine Scale Set OS Upgrade History operation response. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar properties: Information about the properties of the upgrade - operation. - :vartype properties: - ~azure.mgmt.compute.v2017_12_01.models.UpgradeOperationHistoricalStatusInfoProperties - :ivar type: Resource type - :vartype type: str - :ivar location: Resource location - :vartype location: str - """ - - _validation = { - 'properties': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'readonly': True}, - } - - _attribute_map = { - 'properties': {'key': 'properties', 'type': 'UpgradeOperationHistoricalStatusInfoProperties'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(UpgradeOperationHistoricalStatusInfo, self).__init__(**kwargs) - self.properties = None - self.type = None - self.location = None diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/upgrade_operation_historical_status_info_paged.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/upgrade_operation_historical_status_info_paged.py deleted file mode 100644 index e3945811e5cd..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/upgrade_operation_historical_status_info_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class UpgradeOperationHistoricalStatusInfoPaged(Paged): - """ - A paging container for iterating over a list of :class:`UpgradeOperationHistoricalStatusInfo ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[UpgradeOperationHistoricalStatusInfo]'} - } - - def __init__(self, *args, **kwargs): - - super(UpgradeOperationHistoricalStatusInfoPaged, self).__init__(*args, **kwargs) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/upgrade_operation_historical_status_info_properties.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/upgrade_operation_historical_status_info_properties.py deleted file mode 100644 index 5b90a618e2ad..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/upgrade_operation_historical_status_info_properties.py +++ /dev/null @@ -1,67 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class UpgradeOperationHistoricalStatusInfoProperties(Model): - """Describes each OS upgrade on the Virtual Machine Scale Set. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar running_status: Information about the overall status of the upgrade - operation. - :vartype running_status: - ~azure.mgmt.compute.v2017_12_01.models.UpgradeOperationHistoryStatus - :ivar progress: Counts of the VMs in each state. - :vartype progress: - ~azure.mgmt.compute.v2017_12_01.models.RollingUpgradeProgressInfo - :ivar error: Error Details for this upgrade if there are any. - :vartype error: ~azure.mgmt.compute.v2017_12_01.models.ApiError - :ivar started_by: Invoker of the Upgrade Operation. Possible values - include: 'Unknown', 'User', 'Platform' - :vartype started_by: str or - ~azure.mgmt.compute.v2017_12_01.models.UpgradeOperationInvoker - :ivar target_image_reference: Image Reference details - :vartype target_image_reference: - ~azure.mgmt.compute.v2017_12_01.models.ImageReference - :ivar rollback_info: Information about OS rollback if performed - :vartype rollback_info: - ~azure.mgmt.compute.v2017_12_01.models.RollbackStatusInfo - """ - - _validation = { - 'running_status': {'readonly': True}, - 'progress': {'readonly': True}, - 'error': {'readonly': True}, - 'started_by': {'readonly': True}, - 'target_image_reference': {'readonly': True}, - 'rollback_info': {'readonly': True}, - } - - _attribute_map = { - 'running_status': {'key': 'runningStatus', 'type': 'UpgradeOperationHistoryStatus'}, - 'progress': {'key': 'progress', 'type': 'RollingUpgradeProgressInfo'}, - 'error': {'key': 'error', 'type': 'ApiError'}, - 'started_by': {'key': 'startedBy', 'type': 'UpgradeOperationInvoker'}, - 'target_image_reference': {'key': 'targetImageReference', 'type': 'ImageReference'}, - 'rollback_info': {'key': 'rollbackInfo', 'type': 'RollbackStatusInfo'}, - } - - def __init__(self, **kwargs): - super(UpgradeOperationHistoricalStatusInfoProperties, self).__init__(**kwargs) - self.running_status = None - self.progress = None - self.error = None - self.started_by = None - self.target_image_reference = None - self.rollback_info = None diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/upgrade_operation_historical_status_info_properties_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/upgrade_operation_historical_status_info_properties_py3.py deleted file mode 100644 index e20743962c8c..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/upgrade_operation_historical_status_info_properties_py3.py +++ /dev/null @@ -1,67 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class UpgradeOperationHistoricalStatusInfoProperties(Model): - """Describes each OS upgrade on the Virtual Machine Scale Set. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar running_status: Information about the overall status of the upgrade - operation. - :vartype running_status: - ~azure.mgmt.compute.v2017_12_01.models.UpgradeOperationHistoryStatus - :ivar progress: Counts of the VMs in each state. - :vartype progress: - ~azure.mgmt.compute.v2017_12_01.models.RollingUpgradeProgressInfo - :ivar error: Error Details for this upgrade if there are any. - :vartype error: ~azure.mgmt.compute.v2017_12_01.models.ApiError - :ivar started_by: Invoker of the Upgrade Operation. Possible values - include: 'Unknown', 'User', 'Platform' - :vartype started_by: str or - ~azure.mgmt.compute.v2017_12_01.models.UpgradeOperationInvoker - :ivar target_image_reference: Image Reference details - :vartype target_image_reference: - ~azure.mgmt.compute.v2017_12_01.models.ImageReference - :ivar rollback_info: Information about OS rollback if performed - :vartype rollback_info: - ~azure.mgmt.compute.v2017_12_01.models.RollbackStatusInfo - """ - - _validation = { - 'running_status': {'readonly': True}, - 'progress': {'readonly': True}, - 'error': {'readonly': True}, - 'started_by': {'readonly': True}, - 'target_image_reference': {'readonly': True}, - 'rollback_info': {'readonly': True}, - } - - _attribute_map = { - 'running_status': {'key': 'runningStatus', 'type': 'UpgradeOperationHistoryStatus'}, - 'progress': {'key': 'progress', 'type': 'RollingUpgradeProgressInfo'}, - 'error': {'key': 'error', 'type': 'ApiError'}, - 'started_by': {'key': 'startedBy', 'type': 'UpgradeOperationInvoker'}, - 'target_image_reference': {'key': 'targetImageReference', 'type': 'ImageReference'}, - 'rollback_info': {'key': 'rollbackInfo', 'type': 'RollbackStatusInfo'}, - } - - def __init__(self, **kwargs) -> None: - super(UpgradeOperationHistoricalStatusInfoProperties, self).__init__(**kwargs) - self.running_status = None - self.progress = None - self.error = None - self.started_by = None - self.target_image_reference = None - self.rollback_info = None diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/upgrade_operation_historical_status_info_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/upgrade_operation_historical_status_info_py3.py deleted file mode 100644 index 5d8d91210bb7..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/upgrade_operation_historical_status_info_py3.py +++ /dev/null @@ -1,47 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class UpgradeOperationHistoricalStatusInfo(Model): - """Virtual Machine Scale Set OS Upgrade History operation response. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar properties: Information about the properties of the upgrade - operation. - :vartype properties: - ~azure.mgmt.compute.v2017_12_01.models.UpgradeOperationHistoricalStatusInfoProperties - :ivar type: Resource type - :vartype type: str - :ivar location: Resource location - :vartype location: str - """ - - _validation = { - 'properties': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'readonly': True}, - } - - _attribute_map = { - 'properties': {'key': 'properties', 'type': 'UpgradeOperationHistoricalStatusInfoProperties'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - } - - def __init__(self, **kwargs) -> None: - super(UpgradeOperationHistoricalStatusInfo, self).__init__(**kwargs) - self.properties = None - self.type = None - self.location = None diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/upgrade_operation_history_status.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/upgrade_operation_history_status.py deleted file mode 100644 index d860440bf552..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/upgrade_operation_history_status.py +++ /dev/null @@ -1,46 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class UpgradeOperationHistoryStatus(Model): - """Information about the current running state of the overall upgrade. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar code: Code indicating the current status of the upgrade. Possible - values include: 'RollingForward', 'Cancelled', 'Completed', 'Faulted' - :vartype code: str or ~azure.mgmt.compute.v2017_12_01.models.UpgradeState - :ivar start_time: Start time of the upgrade. - :vartype start_time: datetime - :ivar end_time: End time of the upgrade. - :vartype end_time: datetime - """ - - _validation = { - 'code': {'readonly': True}, - 'start_time': {'readonly': True}, - 'end_time': {'readonly': True}, - } - - _attribute_map = { - 'code': {'key': 'code', 'type': 'UpgradeState'}, - 'start_time': {'key': 'startTime', 'type': 'iso-8601'}, - 'end_time': {'key': 'endTime', 'type': 'iso-8601'}, - } - - def __init__(self, **kwargs): - super(UpgradeOperationHistoryStatus, self).__init__(**kwargs) - self.code = None - self.start_time = None - self.end_time = None diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/upgrade_operation_history_status_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/upgrade_operation_history_status_py3.py deleted file mode 100644 index 40d6ec5bcd83..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/upgrade_operation_history_status_py3.py +++ /dev/null @@ -1,46 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class UpgradeOperationHistoryStatus(Model): - """Information about the current running state of the overall upgrade. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar code: Code indicating the current status of the upgrade. Possible - values include: 'RollingForward', 'Cancelled', 'Completed', 'Faulted' - :vartype code: str or ~azure.mgmt.compute.v2017_12_01.models.UpgradeState - :ivar start_time: Start time of the upgrade. - :vartype start_time: datetime - :ivar end_time: End time of the upgrade. - :vartype end_time: datetime - """ - - _validation = { - 'code': {'readonly': True}, - 'start_time': {'readonly': True}, - 'end_time': {'readonly': True}, - } - - _attribute_map = { - 'code': {'key': 'code', 'type': 'UpgradeState'}, - 'start_time': {'key': 'startTime', 'type': 'iso-8601'}, - 'end_time': {'key': 'endTime', 'type': 'iso-8601'}, - } - - def __init__(self, **kwargs) -> None: - super(UpgradeOperationHistoryStatus, self).__init__(**kwargs) - self.code = None - self.start_time = None - self.end_time = None diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/upgrade_policy.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/upgrade_policy.py deleted file mode 100644 index 1f73bc7f23b5..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/upgrade_policy.py +++ /dev/null @@ -1,51 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class UpgradePolicy(Model): - """Describes an upgrade policy - automatic, manual, or rolling. - - :param mode: Specifies the mode of an upgrade to virtual machines in the - scale set.

    Possible values are:

    **Manual** - You - control the application of updates to virtual machines in the scale set. - You do this by using the manualUpgrade action.

    **Automatic** - - All virtual machines in the scale set are automatically updated at the - same time. Possible values include: 'Automatic', 'Manual', 'Rolling' - :type mode: str or ~azure.mgmt.compute.v2017_12_01.models.UpgradeMode - :param rolling_upgrade_policy: The configuration parameters used while - performing a rolling upgrade. - :type rolling_upgrade_policy: - ~azure.mgmt.compute.v2017_12_01.models.RollingUpgradePolicy - :param automatic_os_upgrade: Whether OS upgrades should automatically be - applied to scale set instances in a rolling fashion when a newer version - of the image becomes available. - :type automatic_os_upgrade: bool - :param auto_os_upgrade_policy: Configuration parameters used for - performing automatic OS Upgrade. - :type auto_os_upgrade_policy: - ~azure.mgmt.compute.v2017_12_01.models.AutoOSUpgradePolicy - """ - - _attribute_map = { - 'mode': {'key': 'mode', 'type': 'UpgradeMode'}, - 'rolling_upgrade_policy': {'key': 'rollingUpgradePolicy', 'type': 'RollingUpgradePolicy'}, - 'automatic_os_upgrade': {'key': 'automaticOSUpgrade', 'type': 'bool'}, - 'auto_os_upgrade_policy': {'key': 'autoOSUpgradePolicy', 'type': 'AutoOSUpgradePolicy'}, - } - - def __init__(self, **kwargs): - super(UpgradePolicy, self).__init__(**kwargs) - self.mode = kwargs.get('mode', None) - self.rolling_upgrade_policy = kwargs.get('rolling_upgrade_policy', None) - self.automatic_os_upgrade = kwargs.get('automatic_os_upgrade', None) - self.auto_os_upgrade_policy = kwargs.get('auto_os_upgrade_policy', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/upgrade_policy_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/upgrade_policy_py3.py deleted file mode 100644 index 7c0b91a3180d..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/upgrade_policy_py3.py +++ /dev/null @@ -1,51 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class UpgradePolicy(Model): - """Describes an upgrade policy - automatic, manual, or rolling. - - :param mode: Specifies the mode of an upgrade to virtual machines in the - scale set.

    Possible values are:

    **Manual** - You - control the application of updates to virtual machines in the scale set. - You do this by using the manualUpgrade action.

    **Automatic** - - All virtual machines in the scale set are automatically updated at the - same time. Possible values include: 'Automatic', 'Manual', 'Rolling' - :type mode: str or ~azure.mgmt.compute.v2017_12_01.models.UpgradeMode - :param rolling_upgrade_policy: The configuration parameters used while - performing a rolling upgrade. - :type rolling_upgrade_policy: - ~azure.mgmt.compute.v2017_12_01.models.RollingUpgradePolicy - :param automatic_os_upgrade: Whether OS upgrades should automatically be - applied to scale set instances in a rolling fashion when a newer version - of the image becomes available. - :type automatic_os_upgrade: bool - :param auto_os_upgrade_policy: Configuration parameters used for - performing automatic OS Upgrade. - :type auto_os_upgrade_policy: - ~azure.mgmt.compute.v2017_12_01.models.AutoOSUpgradePolicy - """ - - _attribute_map = { - 'mode': {'key': 'mode', 'type': 'UpgradeMode'}, - 'rolling_upgrade_policy': {'key': 'rollingUpgradePolicy', 'type': 'RollingUpgradePolicy'}, - 'automatic_os_upgrade': {'key': 'automaticOSUpgrade', 'type': 'bool'}, - 'auto_os_upgrade_policy': {'key': 'autoOSUpgradePolicy', 'type': 'AutoOSUpgradePolicy'}, - } - - def __init__(self, *, mode=None, rolling_upgrade_policy=None, automatic_os_upgrade: bool=None, auto_os_upgrade_policy=None, **kwargs) -> None: - super(UpgradePolicy, self).__init__(**kwargs) - self.mode = mode - self.rolling_upgrade_policy = rolling_upgrade_policy - self.automatic_os_upgrade = automatic_os_upgrade - self.auto_os_upgrade_policy = auto_os_upgrade_policy diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/usage.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/usage.py deleted file mode 100644 index 4c4b15393951..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/usage.py +++ /dev/null @@ -1,54 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class Usage(Model): - """Describes Compute Resource Usage. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar unit: Required. An enum describing the unit of usage measurement. - Default value: "Count" . - :vartype unit: str - :param current_value: Required. The current usage of the resource. - :type current_value: int - :param limit: Required. The maximum permitted usage of the resource. - :type limit: long - :param name: Required. The name of the type of usage. - :type name: ~azure.mgmt.compute.v2017_12_01.models.UsageName - """ - - _validation = { - 'unit': {'required': True, 'constant': True}, - 'current_value': {'required': True}, - 'limit': {'required': True}, - 'name': {'required': True}, - } - - _attribute_map = { - 'unit': {'key': 'unit', 'type': 'str'}, - 'current_value': {'key': 'currentValue', 'type': 'int'}, - 'limit': {'key': 'limit', 'type': 'long'}, - 'name': {'key': 'name', 'type': 'UsageName'}, - } - - unit = "Count" - - def __init__(self, **kwargs): - super(Usage, self).__init__(**kwargs) - self.current_value = kwargs.get('current_value', None) - self.limit = kwargs.get('limit', None) - self.name = kwargs.get('name', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/usage_name.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/usage_name.py deleted file mode 100644 index e2560936493e..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/usage_name.py +++ /dev/null @@ -1,32 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class UsageName(Model): - """The Usage Names. - - :param value: The name of the resource. - :type value: str - :param localized_value: The localized name of the resource. - :type localized_value: str - """ - - _attribute_map = { - 'value': {'key': 'value', 'type': 'str'}, - 'localized_value': {'key': 'localizedValue', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(UsageName, self).__init__(**kwargs) - self.value = kwargs.get('value', None) - self.localized_value = kwargs.get('localized_value', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/usage_name_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/usage_name_py3.py deleted file mode 100644 index ad0b77459f75..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/usage_name_py3.py +++ /dev/null @@ -1,32 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class UsageName(Model): - """The Usage Names. - - :param value: The name of the resource. - :type value: str - :param localized_value: The localized name of the resource. - :type localized_value: str - """ - - _attribute_map = { - 'value': {'key': 'value', 'type': 'str'}, - 'localized_value': {'key': 'localizedValue', 'type': 'str'}, - } - - def __init__(self, *, value: str=None, localized_value: str=None, **kwargs) -> None: - super(UsageName, self).__init__(**kwargs) - self.value = value - self.localized_value = localized_value diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/usage_paged.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/usage_paged.py deleted file mode 100644 index 1d3c10341c83..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/usage_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class UsagePaged(Paged): - """ - A paging container for iterating over a list of :class:`Usage ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[Usage]'} - } - - def __init__(self, *args, **kwargs): - - super(UsagePaged, self).__init__(*args, **kwargs) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/usage_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/usage_py3.py deleted file mode 100644 index ff0b928775bb..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/usage_py3.py +++ /dev/null @@ -1,54 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class Usage(Model): - """Describes Compute Resource Usage. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar unit: Required. An enum describing the unit of usage measurement. - Default value: "Count" . - :vartype unit: str - :param current_value: Required. The current usage of the resource. - :type current_value: int - :param limit: Required. The maximum permitted usage of the resource. - :type limit: long - :param name: Required. The name of the type of usage. - :type name: ~azure.mgmt.compute.v2017_12_01.models.UsageName - """ - - _validation = { - 'unit': {'required': True, 'constant': True}, - 'current_value': {'required': True}, - 'limit': {'required': True}, - 'name': {'required': True}, - } - - _attribute_map = { - 'unit': {'key': 'unit', 'type': 'str'}, - 'current_value': {'key': 'currentValue', 'type': 'int'}, - 'limit': {'key': 'limit', 'type': 'long'}, - 'name': {'key': 'name', 'type': 'UsageName'}, - } - - unit = "Count" - - def __init__(self, *, current_value: int, limit: int, name, **kwargs) -> None: - super(Usage, self).__init__(**kwargs) - self.current_value = current_value - self.limit = limit - self.name = name diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/vault_certificate.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/vault_certificate.py deleted file mode 100644 index 2dd179480e76..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/vault_certificate.py +++ /dev/null @@ -1,47 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VaultCertificate(Model): - """Describes a single certificate reference in a Key Vault, and where the - certificate should reside on the VM. - - :param certificate_url: This is the URL of a certificate that has been - uploaded to Key Vault as a secret. For adding a secret to the Key Vault, - see [Add a key or secret to the key - vault](https://docs.microsoft.com/azure/key-vault/key-vault-get-started/#add). - In this case, your certificate needs to be It is the Base64 encoding of - the following JSON Object which is encoded in UTF-8:

    {
    - "data":"",
    "dataType":"pfx",
    - "password":""
    } - :type certificate_url: str - :param certificate_store: For Windows VMs, specifies the certificate store - on the Virtual Machine to which the certificate should be added. The - specified certificate store is implicitly in the LocalMachine account. -

    For Linux VMs, the certificate file is placed under the - /var/lib/waagent directory, with the file name - <UppercaseThumbprint>.crt for the X509 certificate file and - <UppercaseThumbprint>.prv for private key. Both of these files are - .pem formatted. - :type certificate_store: str - """ - - _attribute_map = { - 'certificate_url': {'key': 'certificateUrl', 'type': 'str'}, - 'certificate_store': {'key': 'certificateStore', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(VaultCertificate, self).__init__(**kwargs) - self.certificate_url = kwargs.get('certificate_url', None) - self.certificate_store = kwargs.get('certificate_store', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/vault_certificate_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/vault_certificate_py3.py deleted file mode 100644 index 23ecc8101793..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/vault_certificate_py3.py +++ /dev/null @@ -1,47 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VaultCertificate(Model): - """Describes a single certificate reference in a Key Vault, and where the - certificate should reside on the VM. - - :param certificate_url: This is the URL of a certificate that has been - uploaded to Key Vault as a secret. For adding a secret to the Key Vault, - see [Add a key or secret to the key - vault](https://docs.microsoft.com/azure/key-vault/key-vault-get-started/#add). - In this case, your certificate needs to be It is the Base64 encoding of - the following JSON Object which is encoded in UTF-8:

    {
    - "data":"",
    "dataType":"pfx",
    - "password":""
    } - :type certificate_url: str - :param certificate_store: For Windows VMs, specifies the certificate store - on the Virtual Machine to which the certificate should be added. The - specified certificate store is implicitly in the LocalMachine account. -

    For Linux VMs, the certificate file is placed under the - /var/lib/waagent directory, with the file name - <UppercaseThumbprint>.crt for the X509 certificate file and - <UppercaseThumbprint>.prv for private key. Both of these files are - .pem formatted. - :type certificate_store: str - """ - - _attribute_map = { - 'certificate_url': {'key': 'certificateUrl', 'type': 'str'}, - 'certificate_store': {'key': 'certificateStore', 'type': 'str'}, - } - - def __init__(self, *, certificate_url: str=None, certificate_store: str=None, **kwargs) -> None: - super(VaultCertificate, self).__init__(**kwargs) - self.certificate_url = certificate_url - self.certificate_store = certificate_store diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/vault_secret_group.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/vault_secret_group.py deleted file mode 100644 index dcd6fef1eb5a..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/vault_secret_group.py +++ /dev/null @@ -1,35 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VaultSecretGroup(Model): - """Describes a set of certificates which are all in the same Key Vault. - - :param source_vault: The relative URL of the Key Vault containing all of - the certificates in VaultCertificates. - :type source_vault: ~azure.mgmt.compute.v2017_12_01.models.SubResource - :param vault_certificates: The list of key vault references in SourceVault - which contain certificates. - :type vault_certificates: - list[~azure.mgmt.compute.v2017_12_01.models.VaultCertificate] - """ - - _attribute_map = { - 'source_vault': {'key': 'sourceVault', 'type': 'SubResource'}, - 'vault_certificates': {'key': 'vaultCertificates', 'type': '[VaultCertificate]'}, - } - - def __init__(self, **kwargs): - super(VaultSecretGroup, self).__init__(**kwargs) - self.source_vault = kwargs.get('source_vault', None) - self.vault_certificates = kwargs.get('vault_certificates', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/vault_secret_group_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/vault_secret_group_py3.py deleted file mode 100644 index 3fbeeacf9f28..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/vault_secret_group_py3.py +++ /dev/null @@ -1,35 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VaultSecretGroup(Model): - """Describes a set of certificates which are all in the same Key Vault. - - :param source_vault: The relative URL of the Key Vault containing all of - the certificates in VaultCertificates. - :type source_vault: ~azure.mgmt.compute.v2017_12_01.models.SubResource - :param vault_certificates: The list of key vault references in SourceVault - which contain certificates. - :type vault_certificates: - list[~azure.mgmt.compute.v2017_12_01.models.VaultCertificate] - """ - - _attribute_map = { - 'source_vault': {'key': 'sourceVault', 'type': 'SubResource'}, - 'vault_certificates': {'key': 'vaultCertificates', 'type': '[VaultCertificate]'}, - } - - def __init__(self, *, source_vault=None, vault_certificates=None, **kwargs) -> None: - super(VaultSecretGroup, self).__init__(**kwargs) - self.source_vault = source_vault - self.vault_certificates = vault_certificates diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/virtual_hard_disk.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/virtual_hard_disk.py deleted file mode 100644 index 5e3ad9dea7d4..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/virtual_hard_disk.py +++ /dev/null @@ -1,28 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualHardDisk(Model): - """Describes the uri of a disk. - - :param uri: Specifies the virtual hard disk's uri. - :type uri: str - """ - - _attribute_map = { - 'uri': {'key': 'uri', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(VirtualHardDisk, self).__init__(**kwargs) - self.uri = kwargs.get('uri', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/virtual_hard_disk_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/virtual_hard_disk_py3.py deleted file mode 100644 index 9c069b95f084..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/virtual_hard_disk_py3.py +++ /dev/null @@ -1,28 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualHardDisk(Model): - """Describes the uri of a disk. - - :param uri: Specifies the virtual hard disk's uri. - :type uri: str - """ - - _attribute_map = { - 'uri': {'key': 'uri', 'type': 'str'}, - } - - def __init__(self, *, uri: str=None, **kwargs) -> None: - super(VirtualHardDisk, self).__init__(**kwargs) - self.uri = uri diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/virtual_machine.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/virtual_machine.py deleted file mode 100644 index e697b73a34f3..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/virtual_machine.py +++ /dev/null @@ -1,150 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource import Resource - - -class VirtualMachine(Resource): - """Describes a Virtual Machine. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource Id - :vartype id: str - :ivar name: Resource name - :vartype name: str - :ivar type: Resource type - :vartype type: str - :param location: Required. Resource location - :type location: str - :param tags: Resource tags - :type tags: dict[str, str] - :param plan: Specifies information about the marketplace image used to - create the virtual machine. This element is only used for marketplace - images. Before you can use a marketplace image from an API, you must - enable the image for programmatic use. In the Azure portal, find the - marketplace image that you want to use and then click **Want to deploy - programmatically, Get Started ->**. Enter any required information and - then click **Save**. - :type plan: ~azure.mgmt.compute.v2017_12_01.models.Plan - :param hardware_profile: Specifies the hardware settings for the virtual - machine. - :type hardware_profile: - ~azure.mgmt.compute.v2017_12_01.models.HardwareProfile - :param storage_profile: Specifies the storage settings for the virtual - machine disks. - :type storage_profile: - ~azure.mgmt.compute.v2017_12_01.models.StorageProfile - :param os_profile: Specifies the operating system settings for the virtual - machine. - :type os_profile: ~azure.mgmt.compute.v2017_12_01.models.OSProfile - :param network_profile: Specifies the network interfaces of the virtual - machine. - :type network_profile: - ~azure.mgmt.compute.v2017_12_01.models.NetworkProfile - :param diagnostics_profile: Specifies the boot diagnostic settings state. -

    Minimum api-version: 2015-06-15. - :type diagnostics_profile: - ~azure.mgmt.compute.v2017_12_01.models.DiagnosticsProfile - :param availability_set: Specifies information about the availability set - that the virtual machine should be assigned to. Virtual machines specified - in the same availability set are allocated to different nodes to maximize - availability. For more information about availability sets, see [Manage - the availability of virtual - machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-manage-availability?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). -

    For more information on Azure planned maintenance, see [Planned - maintenance for virtual machines in - Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-planned-maintenance?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json) -

    Currently, a VM can only be added to availability set at creation - time. An existing VM cannot be added to an availability set. - :type availability_set: ~azure.mgmt.compute.v2017_12_01.models.SubResource - :ivar provisioning_state: The provisioning state, which only appears in - the response. - :vartype provisioning_state: str - :ivar instance_view: The virtual machine instance view. - :vartype instance_view: - ~azure.mgmt.compute.v2017_12_01.models.VirtualMachineInstanceView - :param license_type: Specifies that the image or disk that is being used - was licensed on-premises. This element is only used for images that - contain the Windows Server operating system.

    Possible values are: -

    Windows_Client

    Windows_Server

    If this element - is included in a request for an update, the value must match the initial - value. This value cannot be updated.

    For more information, see - [Azure Hybrid Use Benefit for Windows - Server](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-hybrid-use-benefit-licensing?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json) -

    Minimum api-version: 2015-06-15 - :type license_type: str - :ivar vm_id: Specifies the VM unique ID which is a 128-bits identifier - that is encoded and stored in all Azure IaaS VMs SMBIOS and can be read - using platform BIOS commands. - :vartype vm_id: str - :ivar resources: The virtual machine child extension resources. - :vartype resources: - list[~azure.mgmt.compute.v2017_12_01.models.VirtualMachineExtension] - :param identity: The identity of the virtual machine, if configured. - :type identity: - ~azure.mgmt.compute.v2017_12_01.models.VirtualMachineIdentity - :param zones: The virtual machine zones. - :type zones: list[str] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - 'provisioning_state': {'readonly': True}, - 'instance_view': {'readonly': True}, - 'vm_id': {'readonly': True}, - 'resources': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'plan': {'key': 'plan', 'type': 'Plan'}, - 'hardware_profile': {'key': 'properties.hardwareProfile', 'type': 'HardwareProfile'}, - 'storage_profile': {'key': 'properties.storageProfile', 'type': 'StorageProfile'}, - 'os_profile': {'key': 'properties.osProfile', 'type': 'OSProfile'}, - 'network_profile': {'key': 'properties.networkProfile', 'type': 'NetworkProfile'}, - 'diagnostics_profile': {'key': 'properties.diagnosticsProfile', 'type': 'DiagnosticsProfile'}, - 'availability_set': {'key': 'properties.availabilitySet', 'type': 'SubResource'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'instance_view': {'key': 'properties.instanceView', 'type': 'VirtualMachineInstanceView'}, - 'license_type': {'key': 'properties.licenseType', 'type': 'str'}, - 'vm_id': {'key': 'properties.vmId', 'type': 'str'}, - 'resources': {'key': 'resources', 'type': '[VirtualMachineExtension]'}, - 'identity': {'key': 'identity', 'type': 'VirtualMachineIdentity'}, - 'zones': {'key': 'zones', 'type': '[str]'}, - } - - def __init__(self, **kwargs): - super(VirtualMachine, self).__init__(**kwargs) - self.plan = kwargs.get('plan', None) - self.hardware_profile = kwargs.get('hardware_profile', None) - self.storage_profile = kwargs.get('storage_profile', None) - self.os_profile = kwargs.get('os_profile', None) - self.network_profile = kwargs.get('network_profile', None) - self.diagnostics_profile = kwargs.get('diagnostics_profile', None) - self.availability_set = kwargs.get('availability_set', None) - self.provisioning_state = None - self.instance_view = None - self.license_type = kwargs.get('license_type', None) - self.vm_id = None - self.resources = None - self.identity = kwargs.get('identity', None) - self.zones = kwargs.get('zones', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/virtual_machine_agent_instance_view.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/virtual_machine_agent_instance_view.py deleted file mode 100644 index 1fba0ceeb672..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/virtual_machine_agent_instance_view.py +++ /dev/null @@ -1,39 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineAgentInstanceView(Model): - """The instance view of the VM Agent running on the virtual machine. - - :param vm_agent_version: The VM Agent full version. - :type vm_agent_version: str - :param extension_handlers: The virtual machine extension handler instance - view. - :type extension_handlers: - list[~azure.mgmt.compute.v2017_12_01.models.VirtualMachineExtensionHandlerInstanceView] - :param statuses: The resource status information. - :type statuses: - list[~azure.mgmt.compute.v2017_12_01.models.InstanceViewStatus] - """ - - _attribute_map = { - 'vm_agent_version': {'key': 'vmAgentVersion', 'type': 'str'}, - 'extension_handlers': {'key': 'extensionHandlers', 'type': '[VirtualMachineExtensionHandlerInstanceView]'}, - 'statuses': {'key': 'statuses', 'type': '[InstanceViewStatus]'}, - } - - def __init__(self, **kwargs): - super(VirtualMachineAgentInstanceView, self).__init__(**kwargs) - self.vm_agent_version = kwargs.get('vm_agent_version', None) - self.extension_handlers = kwargs.get('extension_handlers', None) - self.statuses = kwargs.get('statuses', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/virtual_machine_agent_instance_view_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/virtual_machine_agent_instance_view_py3.py deleted file mode 100644 index be36f320d710..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/virtual_machine_agent_instance_view_py3.py +++ /dev/null @@ -1,39 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineAgentInstanceView(Model): - """The instance view of the VM Agent running on the virtual machine. - - :param vm_agent_version: The VM Agent full version. - :type vm_agent_version: str - :param extension_handlers: The virtual machine extension handler instance - view. - :type extension_handlers: - list[~azure.mgmt.compute.v2017_12_01.models.VirtualMachineExtensionHandlerInstanceView] - :param statuses: The resource status information. - :type statuses: - list[~azure.mgmt.compute.v2017_12_01.models.InstanceViewStatus] - """ - - _attribute_map = { - 'vm_agent_version': {'key': 'vmAgentVersion', 'type': 'str'}, - 'extension_handlers': {'key': 'extensionHandlers', 'type': '[VirtualMachineExtensionHandlerInstanceView]'}, - 'statuses': {'key': 'statuses', 'type': '[InstanceViewStatus]'}, - } - - def __init__(self, *, vm_agent_version: str=None, extension_handlers=None, statuses=None, **kwargs) -> None: - super(VirtualMachineAgentInstanceView, self).__init__(**kwargs) - self.vm_agent_version = vm_agent_version - self.extension_handlers = extension_handlers - self.statuses = statuses diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/virtual_machine_capture_parameters.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/virtual_machine_capture_parameters.py deleted file mode 100644 index 4e6ffbea7a4f..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/virtual_machine_capture_parameters.py +++ /dev/null @@ -1,46 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineCaptureParameters(Model): - """Capture Virtual Machine parameters. - - All required parameters must be populated in order to send to Azure. - - :param vhd_prefix: Required. The captured virtual hard disk's name prefix. - :type vhd_prefix: str - :param destination_container_name: Required. The destination container - name. - :type destination_container_name: str - :param overwrite_vhds: Required. Specifies whether to overwrite the - destination virtual hard disk, in case of conflict. - :type overwrite_vhds: bool - """ - - _validation = { - 'vhd_prefix': {'required': True}, - 'destination_container_name': {'required': True}, - 'overwrite_vhds': {'required': True}, - } - - _attribute_map = { - 'vhd_prefix': {'key': 'vhdPrefix', 'type': 'str'}, - 'destination_container_name': {'key': 'destinationContainerName', 'type': 'str'}, - 'overwrite_vhds': {'key': 'overwriteVhds', 'type': 'bool'}, - } - - def __init__(self, **kwargs): - super(VirtualMachineCaptureParameters, self).__init__(**kwargs) - self.vhd_prefix = kwargs.get('vhd_prefix', None) - self.destination_container_name = kwargs.get('destination_container_name', None) - self.overwrite_vhds = kwargs.get('overwrite_vhds', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/virtual_machine_capture_parameters_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/virtual_machine_capture_parameters_py3.py deleted file mode 100644 index 1866cdc23300..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/virtual_machine_capture_parameters_py3.py +++ /dev/null @@ -1,46 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineCaptureParameters(Model): - """Capture Virtual Machine parameters. - - All required parameters must be populated in order to send to Azure. - - :param vhd_prefix: Required. The captured virtual hard disk's name prefix. - :type vhd_prefix: str - :param destination_container_name: Required. The destination container - name. - :type destination_container_name: str - :param overwrite_vhds: Required. Specifies whether to overwrite the - destination virtual hard disk, in case of conflict. - :type overwrite_vhds: bool - """ - - _validation = { - 'vhd_prefix': {'required': True}, - 'destination_container_name': {'required': True}, - 'overwrite_vhds': {'required': True}, - } - - _attribute_map = { - 'vhd_prefix': {'key': 'vhdPrefix', 'type': 'str'}, - 'destination_container_name': {'key': 'destinationContainerName', 'type': 'str'}, - 'overwrite_vhds': {'key': 'overwriteVhds', 'type': 'bool'}, - } - - def __init__(self, *, vhd_prefix: str, destination_container_name: str, overwrite_vhds: bool, **kwargs) -> None: - super(VirtualMachineCaptureParameters, self).__init__(**kwargs) - self.vhd_prefix = vhd_prefix - self.destination_container_name = destination_container_name - self.overwrite_vhds = overwrite_vhds diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/virtual_machine_capture_result.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/virtual_machine_capture_result.py deleted file mode 100644 index 2b0df7406a34..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/virtual_machine_capture_result.py +++ /dev/null @@ -1,31 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .sub_resource import SubResource - - -class VirtualMachineCaptureResult(SubResource): - """Resource Id. - - :param id: Resource Id - :type id: str - :param output: Operation output data (raw JSON) - :type output: object - """ - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'output': {'key': 'properties.output', 'type': 'object'}, - } - - def __init__(self, **kwargs): - super(VirtualMachineCaptureResult, self).__init__(**kwargs) - self.output = kwargs.get('output', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/virtual_machine_capture_result_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/virtual_machine_capture_result_py3.py deleted file mode 100644 index f2aba4286bb0..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/virtual_machine_capture_result_py3.py +++ /dev/null @@ -1,31 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .sub_resource_py3 import SubResource - - -class VirtualMachineCaptureResult(SubResource): - """Resource Id. - - :param id: Resource Id - :type id: str - :param output: Operation output data (raw JSON) - :type output: object - """ - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'output': {'key': 'properties.output', 'type': 'object'}, - } - - def __init__(self, *, id: str=None, output=None, **kwargs) -> None: - super(VirtualMachineCaptureResult, self).__init__(id=id, **kwargs) - self.output = output diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/virtual_machine_extension.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/virtual_machine_extension.py deleted file mode 100644 index c227f6dd6ea5..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/virtual_machine_extension.py +++ /dev/null @@ -1,97 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource import Resource - - -class VirtualMachineExtension(Resource): - """Describes a Virtual Machine Extension. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource Id - :vartype id: str - :ivar name: Resource name - :vartype name: str - :ivar type: Resource type - :vartype type: str - :param location: Required. Resource location - :type location: str - :param tags: Resource tags - :type tags: dict[str, str] - :param force_update_tag: How the extension handler should be forced to - update even if the extension configuration has not changed. - :type force_update_tag: str - :param publisher: The name of the extension handler publisher. - :type publisher: str - :param virtual_machine_extension_type: Specifies the type of the - extension; an example is "CustomScriptExtension". - :type virtual_machine_extension_type: str - :param type_handler_version: Specifies the version of the script handler. - :type type_handler_version: str - :param auto_upgrade_minor_version: Indicates whether the extension should - use a newer minor version if one is available at deployment time. Once - deployed, however, the extension will not upgrade minor versions unless - redeployed, even with this property set to true. - :type auto_upgrade_minor_version: bool - :param settings: Json formatted public settings for the extension. - :type settings: object - :param protected_settings: The extension can contain either - protectedSettings or protectedSettingsFromKeyVault or no protected - settings at all. - :type protected_settings: object - :ivar provisioning_state: The provisioning state, which only appears in - the response. - :vartype provisioning_state: str - :param instance_view: The virtual machine extension instance view. - :type instance_view: - ~azure.mgmt.compute.v2017_12_01.models.VirtualMachineExtensionInstanceView - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - 'provisioning_state': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'force_update_tag': {'key': 'properties.forceUpdateTag', 'type': 'str'}, - 'publisher': {'key': 'properties.publisher', 'type': 'str'}, - 'virtual_machine_extension_type': {'key': 'properties.type', 'type': 'str'}, - 'type_handler_version': {'key': 'properties.typeHandlerVersion', 'type': 'str'}, - 'auto_upgrade_minor_version': {'key': 'properties.autoUpgradeMinorVersion', 'type': 'bool'}, - 'settings': {'key': 'properties.settings', 'type': 'object'}, - 'protected_settings': {'key': 'properties.protectedSettings', 'type': 'object'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'instance_view': {'key': 'properties.instanceView', 'type': 'VirtualMachineExtensionInstanceView'}, - } - - def __init__(self, **kwargs): - super(VirtualMachineExtension, self).__init__(**kwargs) - self.force_update_tag = kwargs.get('force_update_tag', None) - self.publisher = kwargs.get('publisher', None) - self.virtual_machine_extension_type = kwargs.get('virtual_machine_extension_type', None) - self.type_handler_version = kwargs.get('type_handler_version', None) - self.auto_upgrade_minor_version = kwargs.get('auto_upgrade_minor_version', None) - self.settings = kwargs.get('settings', None) - self.protected_settings = kwargs.get('protected_settings', None) - self.provisioning_state = None - self.instance_view = kwargs.get('instance_view', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/virtual_machine_extension_handler_instance_view.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/virtual_machine_extension_handler_instance_view.py deleted file mode 100644 index 251e292c2889..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/virtual_machine_extension_handler_instance_view.py +++ /dev/null @@ -1,37 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineExtensionHandlerInstanceView(Model): - """The instance view of a virtual machine extension handler. - - :param type: Specifies the type of the extension; an example is - "CustomScriptExtension". - :type type: str - :param type_handler_version: Specifies the version of the script handler. - :type type_handler_version: str - :param status: The extension handler status. - :type status: ~azure.mgmt.compute.v2017_12_01.models.InstanceViewStatus - """ - - _attribute_map = { - 'type': {'key': 'type', 'type': 'str'}, - 'type_handler_version': {'key': 'typeHandlerVersion', 'type': 'str'}, - 'status': {'key': 'status', 'type': 'InstanceViewStatus'}, - } - - def __init__(self, **kwargs): - super(VirtualMachineExtensionHandlerInstanceView, self).__init__(**kwargs) - self.type = kwargs.get('type', None) - self.type_handler_version = kwargs.get('type_handler_version', None) - self.status = kwargs.get('status', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/virtual_machine_extension_handler_instance_view_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/virtual_machine_extension_handler_instance_view_py3.py deleted file mode 100644 index 865aa252c7c3..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/virtual_machine_extension_handler_instance_view_py3.py +++ /dev/null @@ -1,37 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineExtensionHandlerInstanceView(Model): - """The instance view of a virtual machine extension handler. - - :param type: Specifies the type of the extension; an example is - "CustomScriptExtension". - :type type: str - :param type_handler_version: Specifies the version of the script handler. - :type type_handler_version: str - :param status: The extension handler status. - :type status: ~azure.mgmt.compute.v2017_12_01.models.InstanceViewStatus - """ - - _attribute_map = { - 'type': {'key': 'type', 'type': 'str'}, - 'type_handler_version': {'key': 'typeHandlerVersion', 'type': 'str'}, - 'status': {'key': 'status', 'type': 'InstanceViewStatus'}, - } - - def __init__(self, *, type: str=None, type_handler_version: str=None, status=None, **kwargs) -> None: - super(VirtualMachineExtensionHandlerInstanceView, self).__init__(**kwargs) - self.type = type - self.type_handler_version = type_handler_version - self.status = status diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/virtual_machine_extension_image.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/virtual_machine_extension_image.py deleted file mode 100644 index 7273e2b84754..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/virtual_machine_extension_image.py +++ /dev/null @@ -1,81 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource import Resource - - -class VirtualMachineExtensionImage(Resource): - """Describes a Virtual Machine Extension Image. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource Id - :vartype id: str - :ivar name: Resource name - :vartype name: str - :ivar type: Resource type - :vartype type: str - :param location: Required. Resource location - :type location: str - :param tags: Resource tags - :type tags: dict[str, str] - :param operating_system: Required. The operating system this extension - supports. - :type operating_system: str - :param compute_role: Required. The type of role (IaaS or PaaS) this - extension supports. - :type compute_role: str - :param handler_schema: Required. The schema defined by publisher, where - extension consumers should provide settings in a matching schema. - :type handler_schema: str - :param vm_scale_set_enabled: Whether the extension can be used on xRP - VMScaleSets. By default existing extensions are usable on scalesets, but - there might be cases where a publisher wants to explicitly indicate the - extension is only enabled for CRP VMs but not VMSS. - :type vm_scale_set_enabled: bool - :param supports_multiple_extensions: Whether the handler can support - multiple extensions. - :type supports_multiple_extensions: bool - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - 'operating_system': {'required': True}, - 'compute_role': {'required': True}, - 'handler_schema': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'operating_system': {'key': 'properties.operatingSystem', 'type': 'str'}, - 'compute_role': {'key': 'properties.computeRole', 'type': 'str'}, - 'handler_schema': {'key': 'properties.handlerSchema', 'type': 'str'}, - 'vm_scale_set_enabled': {'key': 'properties.vmScaleSetEnabled', 'type': 'bool'}, - 'supports_multiple_extensions': {'key': 'properties.supportsMultipleExtensions', 'type': 'bool'}, - } - - def __init__(self, **kwargs): - super(VirtualMachineExtensionImage, self).__init__(**kwargs) - self.operating_system = kwargs.get('operating_system', None) - self.compute_role = kwargs.get('compute_role', None) - self.handler_schema = kwargs.get('handler_schema', None) - self.vm_scale_set_enabled = kwargs.get('vm_scale_set_enabled', None) - self.supports_multiple_extensions = kwargs.get('supports_multiple_extensions', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/virtual_machine_extension_image_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/virtual_machine_extension_image_py3.py deleted file mode 100644 index 3d48c3a87fb0..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/virtual_machine_extension_image_py3.py +++ /dev/null @@ -1,81 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource_py3 import Resource - - -class VirtualMachineExtensionImage(Resource): - """Describes a Virtual Machine Extension Image. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource Id - :vartype id: str - :ivar name: Resource name - :vartype name: str - :ivar type: Resource type - :vartype type: str - :param location: Required. Resource location - :type location: str - :param tags: Resource tags - :type tags: dict[str, str] - :param operating_system: Required. The operating system this extension - supports. - :type operating_system: str - :param compute_role: Required. The type of role (IaaS or PaaS) this - extension supports. - :type compute_role: str - :param handler_schema: Required. The schema defined by publisher, where - extension consumers should provide settings in a matching schema. - :type handler_schema: str - :param vm_scale_set_enabled: Whether the extension can be used on xRP - VMScaleSets. By default existing extensions are usable on scalesets, but - there might be cases where a publisher wants to explicitly indicate the - extension is only enabled for CRP VMs but not VMSS. - :type vm_scale_set_enabled: bool - :param supports_multiple_extensions: Whether the handler can support - multiple extensions. - :type supports_multiple_extensions: bool - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - 'operating_system': {'required': True}, - 'compute_role': {'required': True}, - 'handler_schema': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'operating_system': {'key': 'properties.operatingSystem', 'type': 'str'}, - 'compute_role': {'key': 'properties.computeRole', 'type': 'str'}, - 'handler_schema': {'key': 'properties.handlerSchema', 'type': 'str'}, - 'vm_scale_set_enabled': {'key': 'properties.vmScaleSetEnabled', 'type': 'bool'}, - 'supports_multiple_extensions': {'key': 'properties.supportsMultipleExtensions', 'type': 'bool'}, - } - - def __init__(self, *, location: str, operating_system: str, compute_role: str, handler_schema: str, tags=None, vm_scale_set_enabled: bool=None, supports_multiple_extensions: bool=None, **kwargs) -> None: - super(VirtualMachineExtensionImage, self).__init__(location=location, tags=tags, **kwargs) - self.operating_system = operating_system - self.compute_role = compute_role - self.handler_schema = handler_schema - self.vm_scale_set_enabled = vm_scale_set_enabled - self.supports_multiple_extensions = supports_multiple_extensions diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/virtual_machine_extension_instance_view.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/virtual_machine_extension_instance_view.py deleted file mode 100644 index 48bd9677fd8b..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/virtual_machine_extension_instance_view.py +++ /dev/null @@ -1,47 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineExtensionInstanceView(Model): - """The instance view of a virtual machine extension. - - :param name: The virtual machine extension name. - :type name: str - :param type: Specifies the type of the extension; an example is - "CustomScriptExtension". - :type type: str - :param type_handler_version: Specifies the version of the script handler. - :type type_handler_version: str - :param substatuses: The resource status information. - :type substatuses: - list[~azure.mgmt.compute.v2017_12_01.models.InstanceViewStatus] - :param statuses: The resource status information. - :type statuses: - list[~azure.mgmt.compute.v2017_12_01.models.InstanceViewStatus] - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'type_handler_version': {'key': 'typeHandlerVersion', 'type': 'str'}, - 'substatuses': {'key': 'substatuses', 'type': '[InstanceViewStatus]'}, - 'statuses': {'key': 'statuses', 'type': '[InstanceViewStatus]'}, - } - - def __init__(self, **kwargs): - super(VirtualMachineExtensionInstanceView, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.type = kwargs.get('type', None) - self.type_handler_version = kwargs.get('type_handler_version', None) - self.substatuses = kwargs.get('substatuses', None) - self.statuses = kwargs.get('statuses', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/virtual_machine_extension_instance_view_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/virtual_machine_extension_instance_view_py3.py deleted file mode 100644 index c0fef4afbf32..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/virtual_machine_extension_instance_view_py3.py +++ /dev/null @@ -1,47 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineExtensionInstanceView(Model): - """The instance view of a virtual machine extension. - - :param name: The virtual machine extension name. - :type name: str - :param type: Specifies the type of the extension; an example is - "CustomScriptExtension". - :type type: str - :param type_handler_version: Specifies the version of the script handler. - :type type_handler_version: str - :param substatuses: The resource status information. - :type substatuses: - list[~azure.mgmt.compute.v2017_12_01.models.InstanceViewStatus] - :param statuses: The resource status information. - :type statuses: - list[~azure.mgmt.compute.v2017_12_01.models.InstanceViewStatus] - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'type_handler_version': {'key': 'typeHandlerVersion', 'type': 'str'}, - 'substatuses': {'key': 'substatuses', 'type': '[InstanceViewStatus]'}, - 'statuses': {'key': 'statuses', 'type': '[InstanceViewStatus]'}, - } - - def __init__(self, *, name: str=None, type: str=None, type_handler_version: str=None, substatuses=None, statuses=None, **kwargs) -> None: - super(VirtualMachineExtensionInstanceView, self).__init__(**kwargs) - self.name = name - self.type = type - self.type_handler_version = type_handler_version - self.substatuses = substatuses - self.statuses = statuses diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/virtual_machine_extension_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/virtual_machine_extension_py3.py deleted file mode 100644 index 7800d917ccfc..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/virtual_machine_extension_py3.py +++ /dev/null @@ -1,97 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource_py3 import Resource - - -class VirtualMachineExtension(Resource): - """Describes a Virtual Machine Extension. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource Id - :vartype id: str - :ivar name: Resource name - :vartype name: str - :ivar type: Resource type - :vartype type: str - :param location: Required. Resource location - :type location: str - :param tags: Resource tags - :type tags: dict[str, str] - :param force_update_tag: How the extension handler should be forced to - update even if the extension configuration has not changed. - :type force_update_tag: str - :param publisher: The name of the extension handler publisher. - :type publisher: str - :param virtual_machine_extension_type: Specifies the type of the - extension; an example is "CustomScriptExtension". - :type virtual_machine_extension_type: str - :param type_handler_version: Specifies the version of the script handler. - :type type_handler_version: str - :param auto_upgrade_minor_version: Indicates whether the extension should - use a newer minor version if one is available at deployment time. Once - deployed, however, the extension will not upgrade minor versions unless - redeployed, even with this property set to true. - :type auto_upgrade_minor_version: bool - :param settings: Json formatted public settings for the extension. - :type settings: object - :param protected_settings: The extension can contain either - protectedSettings or protectedSettingsFromKeyVault or no protected - settings at all. - :type protected_settings: object - :ivar provisioning_state: The provisioning state, which only appears in - the response. - :vartype provisioning_state: str - :param instance_view: The virtual machine extension instance view. - :type instance_view: - ~azure.mgmt.compute.v2017_12_01.models.VirtualMachineExtensionInstanceView - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - 'provisioning_state': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'force_update_tag': {'key': 'properties.forceUpdateTag', 'type': 'str'}, - 'publisher': {'key': 'properties.publisher', 'type': 'str'}, - 'virtual_machine_extension_type': {'key': 'properties.type', 'type': 'str'}, - 'type_handler_version': {'key': 'properties.typeHandlerVersion', 'type': 'str'}, - 'auto_upgrade_minor_version': {'key': 'properties.autoUpgradeMinorVersion', 'type': 'bool'}, - 'settings': {'key': 'properties.settings', 'type': 'object'}, - 'protected_settings': {'key': 'properties.protectedSettings', 'type': 'object'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'instance_view': {'key': 'properties.instanceView', 'type': 'VirtualMachineExtensionInstanceView'}, - } - - def __init__(self, *, location: str, tags=None, force_update_tag: str=None, publisher: str=None, virtual_machine_extension_type: str=None, type_handler_version: str=None, auto_upgrade_minor_version: bool=None, settings=None, protected_settings=None, instance_view=None, **kwargs) -> None: - super(VirtualMachineExtension, self).__init__(location=location, tags=tags, **kwargs) - self.force_update_tag = force_update_tag - self.publisher = publisher - self.virtual_machine_extension_type = virtual_machine_extension_type - self.type_handler_version = type_handler_version - self.auto_upgrade_minor_version = auto_upgrade_minor_version - self.settings = settings - self.protected_settings = protected_settings - self.provisioning_state = None - self.instance_view = instance_view diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/virtual_machine_extension_update.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/virtual_machine_extension_update.py deleted file mode 100644 index b920ff57ff96..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/virtual_machine_extension_update.py +++ /dev/null @@ -1,62 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .update_resource import UpdateResource - - -class VirtualMachineExtensionUpdate(UpdateResource): - """Describes a Virtual Machine Extension. - - :param tags: Resource tags - :type tags: dict[str, str] - :param force_update_tag: How the extension handler should be forced to - update even if the extension configuration has not changed. - :type force_update_tag: str - :param publisher: The name of the extension handler publisher. - :type publisher: str - :param type: Specifies the type of the extension; an example is - "CustomScriptExtension". - :type type: str - :param type_handler_version: Specifies the version of the script handler. - :type type_handler_version: str - :param auto_upgrade_minor_version: Indicates whether the extension should - use a newer minor version if one is available at deployment time. Once - deployed, however, the extension will not upgrade minor versions unless - redeployed, even with this property set to true. - :type auto_upgrade_minor_version: bool - :param settings: Json formatted public settings for the extension. - :type settings: object - :param protected_settings: The extension can contain either - protectedSettings or protectedSettingsFromKeyVault or no protected - settings at all. - :type protected_settings: object - """ - - _attribute_map = { - 'tags': {'key': 'tags', 'type': '{str}'}, - 'force_update_tag': {'key': 'properties.forceUpdateTag', 'type': 'str'}, - 'publisher': {'key': 'properties.publisher', 'type': 'str'}, - 'type': {'key': 'properties.type', 'type': 'str'}, - 'type_handler_version': {'key': 'properties.typeHandlerVersion', 'type': 'str'}, - 'auto_upgrade_minor_version': {'key': 'properties.autoUpgradeMinorVersion', 'type': 'bool'}, - 'settings': {'key': 'properties.settings', 'type': 'object'}, - 'protected_settings': {'key': 'properties.protectedSettings', 'type': 'object'}, - } - - def __init__(self, **kwargs): - super(VirtualMachineExtensionUpdate, self).__init__(**kwargs) - self.force_update_tag = kwargs.get('force_update_tag', None) - self.publisher = kwargs.get('publisher', None) - self.type = kwargs.get('type', None) - self.type_handler_version = kwargs.get('type_handler_version', None) - self.auto_upgrade_minor_version = kwargs.get('auto_upgrade_minor_version', None) - self.settings = kwargs.get('settings', None) - self.protected_settings = kwargs.get('protected_settings', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/virtual_machine_extension_update_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/virtual_machine_extension_update_py3.py deleted file mode 100644 index c32c18d32759..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/virtual_machine_extension_update_py3.py +++ /dev/null @@ -1,62 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .update_resource_py3 import UpdateResource - - -class VirtualMachineExtensionUpdate(UpdateResource): - """Describes a Virtual Machine Extension. - - :param tags: Resource tags - :type tags: dict[str, str] - :param force_update_tag: How the extension handler should be forced to - update even if the extension configuration has not changed. - :type force_update_tag: str - :param publisher: The name of the extension handler publisher. - :type publisher: str - :param type: Specifies the type of the extension; an example is - "CustomScriptExtension". - :type type: str - :param type_handler_version: Specifies the version of the script handler. - :type type_handler_version: str - :param auto_upgrade_minor_version: Indicates whether the extension should - use a newer minor version if one is available at deployment time. Once - deployed, however, the extension will not upgrade minor versions unless - redeployed, even with this property set to true. - :type auto_upgrade_minor_version: bool - :param settings: Json formatted public settings for the extension. - :type settings: object - :param protected_settings: The extension can contain either - protectedSettings or protectedSettingsFromKeyVault or no protected - settings at all. - :type protected_settings: object - """ - - _attribute_map = { - 'tags': {'key': 'tags', 'type': '{str}'}, - 'force_update_tag': {'key': 'properties.forceUpdateTag', 'type': 'str'}, - 'publisher': {'key': 'properties.publisher', 'type': 'str'}, - 'type': {'key': 'properties.type', 'type': 'str'}, - 'type_handler_version': {'key': 'properties.typeHandlerVersion', 'type': 'str'}, - 'auto_upgrade_minor_version': {'key': 'properties.autoUpgradeMinorVersion', 'type': 'bool'}, - 'settings': {'key': 'properties.settings', 'type': 'object'}, - 'protected_settings': {'key': 'properties.protectedSettings', 'type': 'object'}, - } - - def __init__(self, *, tags=None, force_update_tag: str=None, publisher: str=None, type: str=None, type_handler_version: str=None, auto_upgrade_minor_version: bool=None, settings=None, protected_settings=None, **kwargs) -> None: - super(VirtualMachineExtensionUpdate, self).__init__(tags=tags, **kwargs) - self.force_update_tag = force_update_tag - self.publisher = publisher - self.type = type - self.type_handler_version = type_handler_version - self.auto_upgrade_minor_version = auto_upgrade_minor_version - self.settings = settings - self.protected_settings = protected_settings diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/virtual_machine_extensions_list_result.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/virtual_machine_extensions_list_result.py deleted file mode 100644 index ad25f11d0b5f..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/virtual_machine_extensions_list_result.py +++ /dev/null @@ -1,29 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineExtensionsListResult(Model): - """The List Extension operation response. - - :param value: The list of extensions - :type value: - list[~azure.mgmt.compute.v2017_12_01.models.VirtualMachineExtension] - """ - - _attribute_map = { - 'value': {'key': 'value', 'type': '[VirtualMachineExtension]'}, - } - - def __init__(self, **kwargs): - super(VirtualMachineExtensionsListResult, self).__init__(**kwargs) - self.value = kwargs.get('value', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/virtual_machine_extensions_list_result_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/virtual_machine_extensions_list_result_py3.py deleted file mode 100644 index 39ba9f1e381e..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/virtual_machine_extensions_list_result_py3.py +++ /dev/null @@ -1,29 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineExtensionsListResult(Model): - """The List Extension operation response. - - :param value: The list of extensions - :type value: - list[~azure.mgmt.compute.v2017_12_01.models.VirtualMachineExtension] - """ - - _attribute_map = { - 'value': {'key': 'value', 'type': '[VirtualMachineExtension]'}, - } - - def __init__(self, *, value=None, **kwargs) -> None: - super(VirtualMachineExtensionsListResult, self).__init__(**kwargs) - self.value = value diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/virtual_machine_health_status.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/virtual_machine_health_status.py deleted file mode 100644 index 7ac15a51d78b..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/virtual_machine_health_status.py +++ /dev/null @@ -1,35 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineHealthStatus(Model): - """The health status of the VM. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar status: The health status information for the VM. - :vartype status: ~azure.mgmt.compute.v2017_12_01.models.InstanceViewStatus - """ - - _validation = { - 'status': {'readonly': True}, - } - - _attribute_map = { - 'status': {'key': 'status', 'type': 'InstanceViewStatus'}, - } - - def __init__(self, **kwargs): - super(VirtualMachineHealthStatus, self).__init__(**kwargs) - self.status = None diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/virtual_machine_health_status_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/virtual_machine_health_status_py3.py deleted file mode 100644 index 6d461fe6b6b0..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/virtual_machine_health_status_py3.py +++ /dev/null @@ -1,35 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineHealthStatus(Model): - """The health status of the VM. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar status: The health status information for the VM. - :vartype status: ~azure.mgmt.compute.v2017_12_01.models.InstanceViewStatus - """ - - _validation = { - 'status': {'readonly': True}, - } - - _attribute_map = { - 'status': {'key': 'status', 'type': 'InstanceViewStatus'}, - } - - def __init__(self, **kwargs) -> None: - super(VirtualMachineHealthStatus, self).__init__(**kwargs) - self.status = None diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/virtual_machine_identity.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/virtual_machine_identity.py deleted file mode 100644 index 52a97e8b7172..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/virtual_machine_identity.py +++ /dev/null @@ -1,58 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineIdentity(Model): - """Identity for the virtual machine. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar principal_id: The principal id of virtual machine identity. This - property will only be provided for a system assigned identity. - :vartype principal_id: str - :ivar tenant_id: The tenant id associated with the virtual machine. This - property will only be provided for a system assigned identity. - :vartype tenant_id: str - :param type: The type of identity used for the virtual machine. The type - 'SystemAssigned, UserAssigned' includes both an implicitly created - identity and a set of user assigned identities. The type 'None' will - remove any identities from the virtual machine. Possible values include: - 'SystemAssigned', 'UserAssigned', 'SystemAssigned, UserAssigned', 'None' - :type type: str or - ~azure.mgmt.compute.v2017_12_01.models.ResourceIdentityType - :param identity_ids: The list of user identities associated with the - Virtual Machine. The user identity references will be ARM resource ids in - the form: - '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/identities/{identityName}'. - :type identity_ids: list[str] - """ - - _validation = { - 'principal_id': {'readonly': True}, - 'tenant_id': {'readonly': True}, - } - - _attribute_map = { - 'principal_id': {'key': 'principalId', 'type': 'str'}, - 'tenant_id': {'key': 'tenantId', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'ResourceIdentityType'}, - 'identity_ids': {'key': 'identityIds', 'type': '[str]'}, - } - - def __init__(self, **kwargs): - super(VirtualMachineIdentity, self).__init__(**kwargs) - self.principal_id = None - self.tenant_id = None - self.type = kwargs.get('type', None) - self.identity_ids = kwargs.get('identity_ids', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/virtual_machine_identity_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/virtual_machine_identity_py3.py deleted file mode 100644 index a3790d03854c..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/virtual_machine_identity_py3.py +++ /dev/null @@ -1,58 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineIdentity(Model): - """Identity for the virtual machine. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar principal_id: The principal id of virtual machine identity. This - property will only be provided for a system assigned identity. - :vartype principal_id: str - :ivar tenant_id: The tenant id associated with the virtual machine. This - property will only be provided for a system assigned identity. - :vartype tenant_id: str - :param type: The type of identity used for the virtual machine. The type - 'SystemAssigned, UserAssigned' includes both an implicitly created - identity and a set of user assigned identities. The type 'None' will - remove any identities from the virtual machine. Possible values include: - 'SystemAssigned', 'UserAssigned', 'SystemAssigned, UserAssigned', 'None' - :type type: str or - ~azure.mgmt.compute.v2017_12_01.models.ResourceIdentityType - :param identity_ids: The list of user identities associated with the - Virtual Machine. The user identity references will be ARM resource ids in - the form: - '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/identities/{identityName}'. - :type identity_ids: list[str] - """ - - _validation = { - 'principal_id': {'readonly': True}, - 'tenant_id': {'readonly': True}, - } - - _attribute_map = { - 'principal_id': {'key': 'principalId', 'type': 'str'}, - 'tenant_id': {'key': 'tenantId', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'ResourceIdentityType'}, - 'identity_ids': {'key': 'identityIds', 'type': '[str]'}, - } - - def __init__(self, *, type=None, identity_ids=None, **kwargs) -> None: - super(VirtualMachineIdentity, self).__init__(**kwargs) - self.principal_id = None - self.tenant_id = None - self.type = type - self.identity_ids = identity_ids diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/virtual_machine_image.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/virtual_machine_image.py deleted file mode 100644 index fdbb4661de4f..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/virtual_machine_image.py +++ /dev/null @@ -1,59 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .virtual_machine_image_resource import VirtualMachineImageResource - - -class VirtualMachineImage(VirtualMachineImageResource): - """Describes a Virtual Machine Image. - - All required parameters must be populated in order to send to Azure. - - :param id: Resource Id - :type id: str - :param name: Required. The name of the resource. - :type name: str - :param location: Required. The supported Azure location of the resource. - :type location: str - :param tags: Specifies the tags that are assigned to the virtual machine. - For more information about using tags, see [Using tags to organize your - Azure - resources](https://docs.microsoft.com/azure/azure-resource-manager/resource-group-using-tags.md). - :type tags: dict[str, str] - :param plan: - :type plan: ~azure.mgmt.compute.v2017_12_01.models.PurchasePlan - :param os_disk_image: - :type os_disk_image: ~azure.mgmt.compute.v2017_12_01.models.OSDiskImage - :param data_disk_images: - :type data_disk_images: - list[~azure.mgmt.compute.v2017_12_01.models.DataDiskImage] - """ - - _validation = { - 'name': {'required': True}, - 'location': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'plan': {'key': 'properties.plan', 'type': 'PurchasePlan'}, - 'os_disk_image': {'key': 'properties.osDiskImage', 'type': 'OSDiskImage'}, - 'data_disk_images': {'key': 'properties.dataDiskImages', 'type': '[DataDiskImage]'}, - } - - def __init__(self, **kwargs): - super(VirtualMachineImage, self).__init__(**kwargs) - self.plan = kwargs.get('plan', None) - self.os_disk_image = kwargs.get('os_disk_image', None) - self.data_disk_images = kwargs.get('data_disk_images', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/virtual_machine_image_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/virtual_machine_image_py3.py deleted file mode 100644 index 7c05b2469d1e..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/virtual_machine_image_py3.py +++ /dev/null @@ -1,59 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .virtual_machine_image_resource_py3 import VirtualMachineImageResource - - -class VirtualMachineImage(VirtualMachineImageResource): - """Describes a Virtual Machine Image. - - All required parameters must be populated in order to send to Azure. - - :param id: Resource Id - :type id: str - :param name: Required. The name of the resource. - :type name: str - :param location: Required. The supported Azure location of the resource. - :type location: str - :param tags: Specifies the tags that are assigned to the virtual machine. - For more information about using tags, see [Using tags to organize your - Azure - resources](https://docs.microsoft.com/azure/azure-resource-manager/resource-group-using-tags.md). - :type tags: dict[str, str] - :param plan: - :type plan: ~azure.mgmt.compute.v2017_12_01.models.PurchasePlan - :param os_disk_image: - :type os_disk_image: ~azure.mgmt.compute.v2017_12_01.models.OSDiskImage - :param data_disk_images: - :type data_disk_images: - list[~azure.mgmt.compute.v2017_12_01.models.DataDiskImage] - """ - - _validation = { - 'name': {'required': True}, - 'location': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'plan': {'key': 'properties.plan', 'type': 'PurchasePlan'}, - 'os_disk_image': {'key': 'properties.osDiskImage', 'type': 'OSDiskImage'}, - 'data_disk_images': {'key': 'properties.dataDiskImages', 'type': '[DataDiskImage]'}, - } - - def __init__(self, *, name: str, location: str, id: str=None, tags=None, plan=None, os_disk_image=None, data_disk_images=None, **kwargs) -> None: - super(VirtualMachineImage, self).__init__(id=id, name=name, location=location, tags=tags, **kwargs) - self.plan = plan - self.os_disk_image = os_disk_image - self.data_disk_images = data_disk_images diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/virtual_machine_image_resource.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/virtual_machine_image_resource.py deleted file mode 100644 index 8807cc8f391b..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/virtual_machine_image_resource.py +++ /dev/null @@ -1,49 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .sub_resource import SubResource - - -class VirtualMachineImageResource(SubResource): - """Virtual machine image resource information. - - All required parameters must be populated in order to send to Azure. - - :param id: Resource Id - :type id: str - :param name: Required. The name of the resource. - :type name: str - :param location: Required. The supported Azure location of the resource. - :type location: str - :param tags: Specifies the tags that are assigned to the virtual machine. - For more information about using tags, see [Using tags to organize your - Azure - resources](https://docs.microsoft.com/azure/azure-resource-manager/resource-group-using-tags.md). - :type tags: dict[str, str] - """ - - _validation = { - 'name': {'required': True}, - 'location': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - } - - def __init__(self, **kwargs): - super(VirtualMachineImageResource, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.location = kwargs.get('location', None) - self.tags = kwargs.get('tags', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/virtual_machine_image_resource_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/virtual_machine_image_resource_py3.py deleted file mode 100644 index b9d63a8bc9e0..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/virtual_machine_image_resource_py3.py +++ /dev/null @@ -1,49 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .sub_resource_py3 import SubResource - - -class VirtualMachineImageResource(SubResource): - """Virtual machine image resource information. - - All required parameters must be populated in order to send to Azure. - - :param id: Resource Id - :type id: str - :param name: Required. The name of the resource. - :type name: str - :param location: Required. The supported Azure location of the resource. - :type location: str - :param tags: Specifies the tags that are assigned to the virtual machine. - For more information about using tags, see [Using tags to organize your - Azure - resources](https://docs.microsoft.com/azure/azure-resource-manager/resource-group-using-tags.md). - :type tags: dict[str, str] - """ - - _validation = { - 'name': {'required': True}, - 'location': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - } - - def __init__(self, *, name: str, location: str, id: str=None, tags=None, **kwargs) -> None: - super(VirtualMachineImageResource, self).__init__(id=id, **kwargs) - self.name = name - self.location = location - self.tags = tags diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/virtual_machine_instance_view.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/virtual_machine_instance_view.py deleted file mode 100644 index 825a3243f7b8..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/virtual_machine_instance_view.py +++ /dev/null @@ -1,84 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineInstanceView(Model): - """The instance view of a virtual machine. - - :param platform_update_domain: Specifies the update domain of the virtual - machine. - :type platform_update_domain: int - :param platform_fault_domain: Specifies the fault domain of the virtual - machine. - :type platform_fault_domain: int - :param computer_name: The computer name assigned to the virtual machine. - :type computer_name: str - :param os_name: The Operating System running on the virtual machine. - :type os_name: str - :param os_version: The version of Operating System running on the virtual - machine. - :type os_version: str - :param rdp_thumb_print: The Remote desktop certificate thumbprint. - :type rdp_thumb_print: str - :param vm_agent: The VM Agent running on the virtual machine. - :type vm_agent: - ~azure.mgmt.compute.v2017_12_01.models.VirtualMachineAgentInstanceView - :param maintenance_redeploy_status: The Maintenance Operation status on - the virtual machine. - :type maintenance_redeploy_status: - ~azure.mgmt.compute.v2017_12_01.models.MaintenanceRedeployStatus - :param disks: The virtual machine disk information. - :type disks: list[~azure.mgmt.compute.v2017_12_01.models.DiskInstanceView] - :param extensions: The extensions information. - :type extensions: - list[~azure.mgmt.compute.v2017_12_01.models.VirtualMachineExtensionInstanceView] - :param boot_diagnostics: Boot Diagnostics is a debugging feature which - allows you to view Console Output and Screenshot to diagnose VM status. -

    You can easily view the output of your console log.

    - Azure also enables you to see a screenshot of the VM from the hypervisor. - :type boot_diagnostics: - ~azure.mgmt.compute.v2017_12_01.models.BootDiagnosticsInstanceView - :param statuses: The resource status information. - :type statuses: - list[~azure.mgmt.compute.v2017_12_01.models.InstanceViewStatus] - """ - - _attribute_map = { - 'platform_update_domain': {'key': 'platformUpdateDomain', 'type': 'int'}, - 'platform_fault_domain': {'key': 'platformFaultDomain', 'type': 'int'}, - 'computer_name': {'key': 'computerName', 'type': 'str'}, - 'os_name': {'key': 'osName', 'type': 'str'}, - 'os_version': {'key': 'osVersion', 'type': 'str'}, - 'rdp_thumb_print': {'key': 'rdpThumbPrint', 'type': 'str'}, - 'vm_agent': {'key': 'vmAgent', 'type': 'VirtualMachineAgentInstanceView'}, - 'maintenance_redeploy_status': {'key': 'maintenanceRedeployStatus', 'type': 'MaintenanceRedeployStatus'}, - 'disks': {'key': 'disks', 'type': '[DiskInstanceView]'}, - 'extensions': {'key': 'extensions', 'type': '[VirtualMachineExtensionInstanceView]'}, - 'boot_diagnostics': {'key': 'bootDiagnostics', 'type': 'BootDiagnosticsInstanceView'}, - 'statuses': {'key': 'statuses', 'type': '[InstanceViewStatus]'}, - } - - def __init__(self, **kwargs): - super(VirtualMachineInstanceView, self).__init__(**kwargs) - self.platform_update_domain = kwargs.get('platform_update_domain', None) - self.platform_fault_domain = kwargs.get('platform_fault_domain', None) - self.computer_name = kwargs.get('computer_name', None) - self.os_name = kwargs.get('os_name', None) - self.os_version = kwargs.get('os_version', None) - self.rdp_thumb_print = kwargs.get('rdp_thumb_print', None) - self.vm_agent = kwargs.get('vm_agent', None) - self.maintenance_redeploy_status = kwargs.get('maintenance_redeploy_status', None) - self.disks = kwargs.get('disks', None) - self.extensions = kwargs.get('extensions', None) - self.boot_diagnostics = kwargs.get('boot_diagnostics', None) - self.statuses = kwargs.get('statuses', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/virtual_machine_instance_view_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/virtual_machine_instance_view_py3.py deleted file mode 100644 index e26e816f6976..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/virtual_machine_instance_view_py3.py +++ /dev/null @@ -1,84 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineInstanceView(Model): - """The instance view of a virtual machine. - - :param platform_update_domain: Specifies the update domain of the virtual - machine. - :type platform_update_domain: int - :param platform_fault_domain: Specifies the fault domain of the virtual - machine. - :type platform_fault_domain: int - :param computer_name: The computer name assigned to the virtual machine. - :type computer_name: str - :param os_name: The Operating System running on the virtual machine. - :type os_name: str - :param os_version: The version of Operating System running on the virtual - machine. - :type os_version: str - :param rdp_thumb_print: The Remote desktop certificate thumbprint. - :type rdp_thumb_print: str - :param vm_agent: The VM Agent running on the virtual machine. - :type vm_agent: - ~azure.mgmt.compute.v2017_12_01.models.VirtualMachineAgentInstanceView - :param maintenance_redeploy_status: The Maintenance Operation status on - the virtual machine. - :type maintenance_redeploy_status: - ~azure.mgmt.compute.v2017_12_01.models.MaintenanceRedeployStatus - :param disks: The virtual machine disk information. - :type disks: list[~azure.mgmt.compute.v2017_12_01.models.DiskInstanceView] - :param extensions: The extensions information. - :type extensions: - list[~azure.mgmt.compute.v2017_12_01.models.VirtualMachineExtensionInstanceView] - :param boot_diagnostics: Boot Diagnostics is a debugging feature which - allows you to view Console Output and Screenshot to diagnose VM status. -

    You can easily view the output of your console log.

    - Azure also enables you to see a screenshot of the VM from the hypervisor. - :type boot_diagnostics: - ~azure.mgmt.compute.v2017_12_01.models.BootDiagnosticsInstanceView - :param statuses: The resource status information. - :type statuses: - list[~azure.mgmt.compute.v2017_12_01.models.InstanceViewStatus] - """ - - _attribute_map = { - 'platform_update_domain': {'key': 'platformUpdateDomain', 'type': 'int'}, - 'platform_fault_domain': {'key': 'platformFaultDomain', 'type': 'int'}, - 'computer_name': {'key': 'computerName', 'type': 'str'}, - 'os_name': {'key': 'osName', 'type': 'str'}, - 'os_version': {'key': 'osVersion', 'type': 'str'}, - 'rdp_thumb_print': {'key': 'rdpThumbPrint', 'type': 'str'}, - 'vm_agent': {'key': 'vmAgent', 'type': 'VirtualMachineAgentInstanceView'}, - 'maintenance_redeploy_status': {'key': 'maintenanceRedeployStatus', 'type': 'MaintenanceRedeployStatus'}, - 'disks': {'key': 'disks', 'type': '[DiskInstanceView]'}, - 'extensions': {'key': 'extensions', 'type': '[VirtualMachineExtensionInstanceView]'}, - 'boot_diagnostics': {'key': 'bootDiagnostics', 'type': 'BootDiagnosticsInstanceView'}, - 'statuses': {'key': 'statuses', 'type': '[InstanceViewStatus]'}, - } - - def __init__(self, *, platform_update_domain: int=None, platform_fault_domain: int=None, computer_name: str=None, os_name: str=None, os_version: str=None, rdp_thumb_print: str=None, vm_agent=None, maintenance_redeploy_status=None, disks=None, extensions=None, boot_diagnostics=None, statuses=None, **kwargs) -> None: - super(VirtualMachineInstanceView, self).__init__(**kwargs) - self.platform_update_domain = platform_update_domain - self.platform_fault_domain = platform_fault_domain - self.computer_name = computer_name - self.os_name = os_name - self.os_version = os_version - self.rdp_thumb_print = rdp_thumb_print - self.vm_agent = vm_agent - self.maintenance_redeploy_status = maintenance_redeploy_status - self.disks = disks - self.extensions = extensions - self.boot_diagnostics = boot_diagnostics - self.statuses = statuses diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/virtual_machine_paged.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/virtual_machine_paged.py deleted file mode 100644 index fa08e7c0c6c8..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/virtual_machine_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class VirtualMachinePaged(Paged): - """ - A paging container for iterating over a list of :class:`VirtualMachine ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[VirtualMachine]'} - } - - def __init__(self, *args, **kwargs): - - super(VirtualMachinePaged, self).__init__(*args, **kwargs) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/virtual_machine_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/virtual_machine_py3.py deleted file mode 100644 index 92da754ea39d..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/virtual_machine_py3.py +++ /dev/null @@ -1,150 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource_py3 import Resource - - -class VirtualMachine(Resource): - """Describes a Virtual Machine. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource Id - :vartype id: str - :ivar name: Resource name - :vartype name: str - :ivar type: Resource type - :vartype type: str - :param location: Required. Resource location - :type location: str - :param tags: Resource tags - :type tags: dict[str, str] - :param plan: Specifies information about the marketplace image used to - create the virtual machine. This element is only used for marketplace - images. Before you can use a marketplace image from an API, you must - enable the image for programmatic use. In the Azure portal, find the - marketplace image that you want to use and then click **Want to deploy - programmatically, Get Started ->**. Enter any required information and - then click **Save**. - :type plan: ~azure.mgmt.compute.v2017_12_01.models.Plan - :param hardware_profile: Specifies the hardware settings for the virtual - machine. - :type hardware_profile: - ~azure.mgmt.compute.v2017_12_01.models.HardwareProfile - :param storage_profile: Specifies the storage settings for the virtual - machine disks. - :type storage_profile: - ~azure.mgmt.compute.v2017_12_01.models.StorageProfile - :param os_profile: Specifies the operating system settings for the virtual - machine. - :type os_profile: ~azure.mgmt.compute.v2017_12_01.models.OSProfile - :param network_profile: Specifies the network interfaces of the virtual - machine. - :type network_profile: - ~azure.mgmt.compute.v2017_12_01.models.NetworkProfile - :param diagnostics_profile: Specifies the boot diagnostic settings state. -

    Minimum api-version: 2015-06-15. - :type diagnostics_profile: - ~azure.mgmt.compute.v2017_12_01.models.DiagnosticsProfile - :param availability_set: Specifies information about the availability set - that the virtual machine should be assigned to. Virtual machines specified - in the same availability set are allocated to different nodes to maximize - availability. For more information about availability sets, see [Manage - the availability of virtual - machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-manage-availability?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). -

    For more information on Azure planned maintenance, see [Planned - maintenance for virtual machines in - Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-planned-maintenance?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json) -

    Currently, a VM can only be added to availability set at creation - time. An existing VM cannot be added to an availability set. - :type availability_set: ~azure.mgmt.compute.v2017_12_01.models.SubResource - :ivar provisioning_state: The provisioning state, which only appears in - the response. - :vartype provisioning_state: str - :ivar instance_view: The virtual machine instance view. - :vartype instance_view: - ~azure.mgmt.compute.v2017_12_01.models.VirtualMachineInstanceView - :param license_type: Specifies that the image or disk that is being used - was licensed on-premises. This element is only used for images that - contain the Windows Server operating system.

    Possible values are: -

    Windows_Client

    Windows_Server

    If this element - is included in a request for an update, the value must match the initial - value. This value cannot be updated.

    For more information, see - [Azure Hybrid Use Benefit for Windows - Server](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-hybrid-use-benefit-licensing?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json) -

    Minimum api-version: 2015-06-15 - :type license_type: str - :ivar vm_id: Specifies the VM unique ID which is a 128-bits identifier - that is encoded and stored in all Azure IaaS VMs SMBIOS and can be read - using platform BIOS commands. - :vartype vm_id: str - :ivar resources: The virtual machine child extension resources. - :vartype resources: - list[~azure.mgmt.compute.v2017_12_01.models.VirtualMachineExtension] - :param identity: The identity of the virtual machine, if configured. - :type identity: - ~azure.mgmt.compute.v2017_12_01.models.VirtualMachineIdentity - :param zones: The virtual machine zones. - :type zones: list[str] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - 'provisioning_state': {'readonly': True}, - 'instance_view': {'readonly': True}, - 'vm_id': {'readonly': True}, - 'resources': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'plan': {'key': 'plan', 'type': 'Plan'}, - 'hardware_profile': {'key': 'properties.hardwareProfile', 'type': 'HardwareProfile'}, - 'storage_profile': {'key': 'properties.storageProfile', 'type': 'StorageProfile'}, - 'os_profile': {'key': 'properties.osProfile', 'type': 'OSProfile'}, - 'network_profile': {'key': 'properties.networkProfile', 'type': 'NetworkProfile'}, - 'diagnostics_profile': {'key': 'properties.diagnosticsProfile', 'type': 'DiagnosticsProfile'}, - 'availability_set': {'key': 'properties.availabilitySet', 'type': 'SubResource'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'instance_view': {'key': 'properties.instanceView', 'type': 'VirtualMachineInstanceView'}, - 'license_type': {'key': 'properties.licenseType', 'type': 'str'}, - 'vm_id': {'key': 'properties.vmId', 'type': 'str'}, - 'resources': {'key': 'resources', 'type': '[VirtualMachineExtension]'}, - 'identity': {'key': 'identity', 'type': 'VirtualMachineIdentity'}, - 'zones': {'key': 'zones', 'type': '[str]'}, - } - - def __init__(self, *, location: str, tags=None, plan=None, hardware_profile=None, storage_profile=None, os_profile=None, network_profile=None, diagnostics_profile=None, availability_set=None, license_type: str=None, identity=None, zones=None, **kwargs) -> None: - super(VirtualMachine, self).__init__(location=location, tags=tags, **kwargs) - self.plan = plan - self.hardware_profile = hardware_profile - self.storage_profile = storage_profile - self.os_profile = os_profile - self.network_profile = network_profile - self.diagnostics_profile = diagnostics_profile - self.availability_set = availability_set - self.provisioning_state = None - self.instance_view = None - self.license_type = license_type - self.vm_id = None - self.resources = None - self.identity = identity - self.zones = zones diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/virtual_machine_scale_set.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/virtual_machine_scale_set.py deleted file mode 100644 index 5db5e6c2b2c1..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/virtual_machine_scale_set.py +++ /dev/null @@ -1,116 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource import Resource - - -class VirtualMachineScaleSet(Resource): - """Describes a Virtual Machine Scale Set. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource Id - :vartype id: str - :ivar name: Resource name - :vartype name: str - :ivar type: Resource type - :vartype type: str - :param location: Required. Resource location - :type location: str - :param tags: Resource tags - :type tags: dict[str, str] - :param sku: The virtual machine scale set sku. - :type sku: ~azure.mgmt.compute.v2017_12_01.models.Sku - :param plan: Specifies information about the marketplace image used to - create the virtual machine. This element is only used for marketplace - images. Before you can use a marketplace image from an API, you must - enable the image for programmatic use. In the Azure portal, find the - marketplace image that you want to use and then click **Want to deploy - programmatically, Get Started ->**. Enter any required information and - then click **Save**. - :type plan: ~azure.mgmt.compute.v2017_12_01.models.Plan - :param upgrade_policy: The upgrade policy. - :type upgrade_policy: ~azure.mgmt.compute.v2017_12_01.models.UpgradePolicy - :param virtual_machine_profile: The virtual machine profile. - :type virtual_machine_profile: - ~azure.mgmt.compute.v2017_12_01.models.VirtualMachineScaleSetVMProfile - :ivar provisioning_state: The provisioning state, which only appears in - the response. - :vartype provisioning_state: str - :param overprovision: Specifies whether the Virtual Machine Scale Set - should be overprovisioned. - :type overprovision: bool - :ivar unique_id: Specifies the ID which uniquely identifies a Virtual - Machine Scale Set. - :vartype unique_id: str - :param single_placement_group: When true this limits the scale set to a - single placement group, of max size 100 virtual machines. - :type single_placement_group: bool - :param zone_balance: Whether to force strictly even Virtual Machine - distribution cross x-zones in case there is zone outage. - :type zone_balance: bool - :param platform_fault_domain_count: Fault Domain count for each placement - group. - :type platform_fault_domain_count: int - :param identity: The identity of the virtual machine scale set, if - configured. - :type identity: - ~azure.mgmt.compute.v2017_12_01.models.VirtualMachineScaleSetIdentity - :param zones: The virtual machine scale set zones. - :type zones: list[str] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - 'provisioning_state': {'readonly': True}, - 'unique_id': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'sku': {'key': 'sku', 'type': 'Sku'}, - 'plan': {'key': 'plan', 'type': 'Plan'}, - 'upgrade_policy': {'key': 'properties.upgradePolicy', 'type': 'UpgradePolicy'}, - 'virtual_machine_profile': {'key': 'properties.virtualMachineProfile', 'type': 'VirtualMachineScaleSetVMProfile'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'overprovision': {'key': 'properties.overprovision', 'type': 'bool'}, - 'unique_id': {'key': 'properties.uniqueId', 'type': 'str'}, - 'single_placement_group': {'key': 'properties.singlePlacementGroup', 'type': 'bool'}, - 'zone_balance': {'key': 'properties.zoneBalance', 'type': 'bool'}, - 'platform_fault_domain_count': {'key': 'properties.platformFaultDomainCount', 'type': 'int'}, - 'identity': {'key': 'identity', 'type': 'VirtualMachineScaleSetIdentity'}, - 'zones': {'key': 'zones', 'type': '[str]'}, - } - - def __init__(self, **kwargs): - super(VirtualMachineScaleSet, self).__init__(**kwargs) - self.sku = kwargs.get('sku', None) - self.plan = kwargs.get('plan', None) - self.upgrade_policy = kwargs.get('upgrade_policy', None) - self.virtual_machine_profile = kwargs.get('virtual_machine_profile', None) - self.provisioning_state = None - self.overprovision = kwargs.get('overprovision', None) - self.unique_id = None - self.single_placement_group = kwargs.get('single_placement_group', None) - self.zone_balance = kwargs.get('zone_balance', None) - self.platform_fault_domain_count = kwargs.get('platform_fault_domain_count', None) - self.identity = kwargs.get('identity', None) - self.zones = kwargs.get('zones', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/virtual_machine_scale_set_data_disk.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/virtual_machine_scale_set_data_disk.py deleted file mode 100644 index ac080fa560d2..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/virtual_machine_scale_set_data_disk.py +++ /dev/null @@ -1,70 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineScaleSetDataDisk(Model): - """Describes a virtual machine scale set data disk. - - All required parameters must be populated in order to send to Azure. - - :param name: The disk name. - :type name: str - :param lun: Required. Specifies the logical unit number of the data disk. - This value is used to identify data disks within the VM and therefore must - be unique for each data disk attached to a VM. - :type lun: int - :param caching: Specifies the caching requirements.

    Possible - values are:

    **None**

    **ReadOnly**

    **ReadWrite** -

    Default: **None for Standard storage. ReadOnly for Premium - storage**. Possible values include: 'None', 'ReadOnly', 'ReadWrite' - :type caching: str or ~azure.mgmt.compute.v2017_12_01.models.CachingTypes - :param write_accelerator_enabled: Specifies whether writeAccelerator - should be enabled or disabled on the disk. - :type write_accelerator_enabled: bool - :param create_option: Required. The create option. Possible values - include: 'FromImage', 'Empty', 'Attach' - :type create_option: str or - ~azure.mgmt.compute.v2017_12_01.models.DiskCreateOptionTypes - :param disk_size_gb: Specifies the size of an empty data disk in - gigabytes. This element can be used to overwrite the size of the disk in a - virtual machine image.

    This value cannot be larger than 1023 GB - :type disk_size_gb: int - :param managed_disk: The managed disk parameters. - :type managed_disk: - ~azure.mgmt.compute.v2017_12_01.models.VirtualMachineScaleSetManagedDiskParameters - """ - - _validation = { - 'lun': {'required': True}, - 'create_option': {'required': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'lun': {'key': 'lun', 'type': 'int'}, - 'caching': {'key': 'caching', 'type': 'CachingTypes'}, - 'write_accelerator_enabled': {'key': 'writeAcceleratorEnabled', 'type': 'bool'}, - 'create_option': {'key': 'createOption', 'type': 'str'}, - 'disk_size_gb': {'key': 'diskSizeGB', 'type': 'int'}, - 'managed_disk': {'key': 'managedDisk', 'type': 'VirtualMachineScaleSetManagedDiskParameters'}, - } - - def __init__(self, **kwargs): - super(VirtualMachineScaleSetDataDisk, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.lun = kwargs.get('lun', None) - self.caching = kwargs.get('caching', None) - self.write_accelerator_enabled = kwargs.get('write_accelerator_enabled', None) - self.create_option = kwargs.get('create_option', None) - self.disk_size_gb = kwargs.get('disk_size_gb', None) - self.managed_disk = kwargs.get('managed_disk', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/virtual_machine_scale_set_data_disk_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/virtual_machine_scale_set_data_disk_py3.py deleted file mode 100644 index b8f748d8b3f0..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/virtual_machine_scale_set_data_disk_py3.py +++ /dev/null @@ -1,70 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineScaleSetDataDisk(Model): - """Describes a virtual machine scale set data disk. - - All required parameters must be populated in order to send to Azure. - - :param name: The disk name. - :type name: str - :param lun: Required. Specifies the logical unit number of the data disk. - This value is used to identify data disks within the VM and therefore must - be unique for each data disk attached to a VM. - :type lun: int - :param caching: Specifies the caching requirements.

    Possible - values are:

    **None**

    **ReadOnly**

    **ReadWrite** -

    Default: **None for Standard storage. ReadOnly for Premium - storage**. Possible values include: 'None', 'ReadOnly', 'ReadWrite' - :type caching: str or ~azure.mgmt.compute.v2017_12_01.models.CachingTypes - :param write_accelerator_enabled: Specifies whether writeAccelerator - should be enabled or disabled on the disk. - :type write_accelerator_enabled: bool - :param create_option: Required. The create option. Possible values - include: 'FromImage', 'Empty', 'Attach' - :type create_option: str or - ~azure.mgmt.compute.v2017_12_01.models.DiskCreateOptionTypes - :param disk_size_gb: Specifies the size of an empty data disk in - gigabytes. This element can be used to overwrite the size of the disk in a - virtual machine image.

    This value cannot be larger than 1023 GB - :type disk_size_gb: int - :param managed_disk: The managed disk parameters. - :type managed_disk: - ~azure.mgmt.compute.v2017_12_01.models.VirtualMachineScaleSetManagedDiskParameters - """ - - _validation = { - 'lun': {'required': True}, - 'create_option': {'required': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'lun': {'key': 'lun', 'type': 'int'}, - 'caching': {'key': 'caching', 'type': 'CachingTypes'}, - 'write_accelerator_enabled': {'key': 'writeAcceleratorEnabled', 'type': 'bool'}, - 'create_option': {'key': 'createOption', 'type': 'str'}, - 'disk_size_gb': {'key': 'diskSizeGB', 'type': 'int'}, - 'managed_disk': {'key': 'managedDisk', 'type': 'VirtualMachineScaleSetManagedDiskParameters'}, - } - - def __init__(self, *, lun: int, create_option, name: str=None, caching=None, write_accelerator_enabled: bool=None, disk_size_gb: int=None, managed_disk=None, **kwargs) -> None: - super(VirtualMachineScaleSetDataDisk, self).__init__(**kwargs) - self.name = name - self.lun = lun - self.caching = caching - self.write_accelerator_enabled = write_accelerator_enabled - self.create_option = create_option - self.disk_size_gb = disk_size_gb - self.managed_disk = managed_disk diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/virtual_machine_scale_set_extension.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/virtual_machine_scale_set_extension.py deleted file mode 100644 index 24a487547a2a..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/virtual_machine_scale_set_extension.py +++ /dev/null @@ -1,80 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .sub_resource_read_only import SubResourceReadOnly - - -class VirtualMachineScaleSetExtension(SubResourceReadOnly): - """Describes a Virtual Machine Scale Set Extension. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource Id - :vartype id: str - :param name: The name of the extension. - :type name: str - :param force_update_tag: If a value is provided and is different from the - previous value, the extension handler will be forced to update even if the - extension configuration has not changed. - :type force_update_tag: str - :param publisher: The name of the extension handler publisher. - :type publisher: str - :param type: Specifies the type of the extension; an example is - "CustomScriptExtension". - :type type: str - :param type_handler_version: Specifies the version of the script handler. - :type type_handler_version: str - :param auto_upgrade_minor_version: Indicates whether the extension should - use a newer minor version if one is available at deployment time. Once - deployed, however, the extension will not upgrade minor versions unless - redeployed, even with this property set to true. - :type auto_upgrade_minor_version: bool - :param settings: Json formatted public settings for the extension. - :type settings: object - :param protected_settings: The extension can contain either - protectedSettings or protectedSettingsFromKeyVault or no protected - settings at all. - :type protected_settings: object - :ivar provisioning_state: The provisioning state, which only appears in - the response. - :vartype provisioning_state: str - """ - - _validation = { - 'id': {'readonly': True}, - 'provisioning_state': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'force_update_tag': {'key': 'properties.forceUpdateTag', 'type': 'str'}, - 'publisher': {'key': 'properties.publisher', 'type': 'str'}, - 'type': {'key': 'properties.type', 'type': 'str'}, - 'type_handler_version': {'key': 'properties.typeHandlerVersion', 'type': 'str'}, - 'auto_upgrade_minor_version': {'key': 'properties.autoUpgradeMinorVersion', 'type': 'bool'}, - 'settings': {'key': 'properties.settings', 'type': 'object'}, - 'protected_settings': {'key': 'properties.protectedSettings', 'type': 'object'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(VirtualMachineScaleSetExtension, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.force_update_tag = kwargs.get('force_update_tag', None) - self.publisher = kwargs.get('publisher', None) - self.type = kwargs.get('type', None) - self.type_handler_version = kwargs.get('type_handler_version', None) - self.auto_upgrade_minor_version = kwargs.get('auto_upgrade_minor_version', None) - self.settings = kwargs.get('settings', None) - self.protected_settings = kwargs.get('protected_settings', None) - self.provisioning_state = None diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/virtual_machine_scale_set_extension_paged.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/virtual_machine_scale_set_extension_paged.py deleted file mode 100644 index 93b42cf3936b..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/virtual_machine_scale_set_extension_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class VirtualMachineScaleSetExtensionPaged(Paged): - """ - A paging container for iterating over a list of :class:`VirtualMachineScaleSetExtension ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[VirtualMachineScaleSetExtension]'} - } - - def __init__(self, *args, **kwargs): - - super(VirtualMachineScaleSetExtensionPaged, self).__init__(*args, **kwargs) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/virtual_machine_scale_set_extension_profile.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/virtual_machine_scale_set_extension_profile.py deleted file mode 100644 index 74b124b838a3..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/virtual_machine_scale_set_extension_profile.py +++ /dev/null @@ -1,30 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineScaleSetExtensionProfile(Model): - """Describes a virtual machine scale set extension profile. - - :param extensions: The virtual machine scale set child extension - resources. - :type extensions: - list[~azure.mgmt.compute.v2017_12_01.models.VirtualMachineScaleSetExtension] - """ - - _attribute_map = { - 'extensions': {'key': 'extensions', 'type': '[VirtualMachineScaleSetExtension]'}, - } - - def __init__(self, **kwargs): - super(VirtualMachineScaleSetExtensionProfile, self).__init__(**kwargs) - self.extensions = kwargs.get('extensions', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/virtual_machine_scale_set_extension_profile_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/virtual_machine_scale_set_extension_profile_py3.py deleted file mode 100644 index 0b0c6773c796..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/virtual_machine_scale_set_extension_profile_py3.py +++ /dev/null @@ -1,30 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineScaleSetExtensionProfile(Model): - """Describes a virtual machine scale set extension profile. - - :param extensions: The virtual machine scale set child extension - resources. - :type extensions: - list[~azure.mgmt.compute.v2017_12_01.models.VirtualMachineScaleSetExtension] - """ - - _attribute_map = { - 'extensions': {'key': 'extensions', 'type': '[VirtualMachineScaleSetExtension]'}, - } - - def __init__(self, *, extensions=None, **kwargs) -> None: - super(VirtualMachineScaleSetExtensionProfile, self).__init__(**kwargs) - self.extensions = extensions diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/virtual_machine_scale_set_extension_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/virtual_machine_scale_set_extension_py3.py deleted file mode 100644 index 27392a2de9fd..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/virtual_machine_scale_set_extension_py3.py +++ /dev/null @@ -1,80 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .sub_resource_read_only_py3 import SubResourceReadOnly - - -class VirtualMachineScaleSetExtension(SubResourceReadOnly): - """Describes a Virtual Machine Scale Set Extension. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource Id - :vartype id: str - :param name: The name of the extension. - :type name: str - :param force_update_tag: If a value is provided and is different from the - previous value, the extension handler will be forced to update even if the - extension configuration has not changed. - :type force_update_tag: str - :param publisher: The name of the extension handler publisher. - :type publisher: str - :param type: Specifies the type of the extension; an example is - "CustomScriptExtension". - :type type: str - :param type_handler_version: Specifies the version of the script handler. - :type type_handler_version: str - :param auto_upgrade_minor_version: Indicates whether the extension should - use a newer minor version if one is available at deployment time. Once - deployed, however, the extension will not upgrade minor versions unless - redeployed, even with this property set to true. - :type auto_upgrade_minor_version: bool - :param settings: Json formatted public settings for the extension. - :type settings: object - :param protected_settings: The extension can contain either - protectedSettings or protectedSettingsFromKeyVault or no protected - settings at all. - :type protected_settings: object - :ivar provisioning_state: The provisioning state, which only appears in - the response. - :vartype provisioning_state: str - """ - - _validation = { - 'id': {'readonly': True}, - 'provisioning_state': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'force_update_tag': {'key': 'properties.forceUpdateTag', 'type': 'str'}, - 'publisher': {'key': 'properties.publisher', 'type': 'str'}, - 'type': {'key': 'properties.type', 'type': 'str'}, - 'type_handler_version': {'key': 'properties.typeHandlerVersion', 'type': 'str'}, - 'auto_upgrade_minor_version': {'key': 'properties.autoUpgradeMinorVersion', 'type': 'bool'}, - 'settings': {'key': 'properties.settings', 'type': 'object'}, - 'protected_settings': {'key': 'properties.protectedSettings', 'type': 'object'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - } - - def __init__(self, *, name: str=None, force_update_tag: str=None, publisher: str=None, type: str=None, type_handler_version: str=None, auto_upgrade_minor_version: bool=None, settings=None, protected_settings=None, **kwargs) -> None: - super(VirtualMachineScaleSetExtension, self).__init__(**kwargs) - self.name = name - self.force_update_tag = force_update_tag - self.publisher = publisher - self.type = type - self.type_handler_version = type_handler_version - self.auto_upgrade_minor_version = auto_upgrade_minor_version - self.settings = settings - self.protected_settings = protected_settings - self.provisioning_state = None diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/virtual_machine_scale_set_identity.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/virtual_machine_scale_set_identity.py deleted file mode 100644 index 8bb8f14f50bf..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/virtual_machine_scale_set_identity.py +++ /dev/null @@ -1,60 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineScaleSetIdentity(Model): - """Identity for the virtual machine scale set. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar principal_id: The principal id of virtual machine scale set - identity. This property will only be provided for a system assigned - identity. - :vartype principal_id: str - :ivar tenant_id: The tenant id associated with the virtual machine scale - set. This property will only be provided for a system assigned identity. - :vartype tenant_id: str - :param type: The type of identity used for the virtual machine scale set. - The type 'SystemAssigned, UserAssigned' includes both an implicitly - created identity and a set of user assigned identities. The type 'None' - will remove any identities from the virtual machine scale set. Possible - values include: 'SystemAssigned', 'UserAssigned', 'SystemAssigned, - UserAssigned', 'None' - :type type: str or - ~azure.mgmt.compute.v2017_12_01.models.ResourceIdentityType - :param identity_ids: The list of user identities associated with the - virtual machine scale set. The user identity references will be ARM - resource ids in the form: - '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/identities/{identityName}'. - :type identity_ids: list[str] - """ - - _validation = { - 'principal_id': {'readonly': True}, - 'tenant_id': {'readonly': True}, - } - - _attribute_map = { - 'principal_id': {'key': 'principalId', 'type': 'str'}, - 'tenant_id': {'key': 'tenantId', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'ResourceIdentityType'}, - 'identity_ids': {'key': 'identityIds', 'type': '[str]'}, - } - - def __init__(self, **kwargs): - super(VirtualMachineScaleSetIdentity, self).__init__(**kwargs) - self.principal_id = None - self.tenant_id = None - self.type = kwargs.get('type', None) - self.identity_ids = kwargs.get('identity_ids', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/virtual_machine_scale_set_identity_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/virtual_machine_scale_set_identity_py3.py deleted file mode 100644 index 3ad52a3f6907..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/virtual_machine_scale_set_identity_py3.py +++ /dev/null @@ -1,60 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineScaleSetIdentity(Model): - """Identity for the virtual machine scale set. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar principal_id: The principal id of virtual machine scale set - identity. This property will only be provided for a system assigned - identity. - :vartype principal_id: str - :ivar tenant_id: The tenant id associated with the virtual machine scale - set. This property will only be provided for a system assigned identity. - :vartype tenant_id: str - :param type: The type of identity used for the virtual machine scale set. - The type 'SystemAssigned, UserAssigned' includes both an implicitly - created identity and a set of user assigned identities. The type 'None' - will remove any identities from the virtual machine scale set. Possible - values include: 'SystemAssigned', 'UserAssigned', 'SystemAssigned, - UserAssigned', 'None' - :type type: str or - ~azure.mgmt.compute.v2017_12_01.models.ResourceIdentityType - :param identity_ids: The list of user identities associated with the - virtual machine scale set. The user identity references will be ARM - resource ids in the form: - '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/identities/{identityName}'. - :type identity_ids: list[str] - """ - - _validation = { - 'principal_id': {'readonly': True}, - 'tenant_id': {'readonly': True}, - } - - _attribute_map = { - 'principal_id': {'key': 'principalId', 'type': 'str'}, - 'tenant_id': {'key': 'tenantId', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'ResourceIdentityType'}, - 'identity_ids': {'key': 'identityIds', 'type': '[str]'}, - } - - def __init__(self, *, type=None, identity_ids=None, **kwargs) -> None: - super(VirtualMachineScaleSetIdentity, self).__init__(**kwargs) - self.principal_id = None - self.tenant_id = None - self.type = type - self.identity_ids = identity_ids diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/virtual_machine_scale_set_instance_view.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/virtual_machine_scale_set_instance_view.py deleted file mode 100644 index 83c16f482f49..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/virtual_machine_scale_set_instance_view.py +++ /dev/null @@ -1,48 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineScaleSetInstanceView(Model): - """The instance view of a virtual machine scale set. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar virtual_machine: The instance view status summary for the virtual - machine scale set. - :vartype virtual_machine: - ~azure.mgmt.compute.v2017_12_01.models.VirtualMachineScaleSetInstanceViewStatusesSummary - :ivar extensions: The extensions information. - :vartype extensions: - list[~azure.mgmt.compute.v2017_12_01.models.VirtualMachineScaleSetVMExtensionsSummary] - :param statuses: The resource status information. - :type statuses: - list[~azure.mgmt.compute.v2017_12_01.models.InstanceViewStatus] - """ - - _validation = { - 'virtual_machine': {'readonly': True}, - 'extensions': {'readonly': True}, - } - - _attribute_map = { - 'virtual_machine': {'key': 'virtualMachine', 'type': 'VirtualMachineScaleSetInstanceViewStatusesSummary'}, - 'extensions': {'key': 'extensions', 'type': '[VirtualMachineScaleSetVMExtensionsSummary]'}, - 'statuses': {'key': 'statuses', 'type': '[InstanceViewStatus]'}, - } - - def __init__(self, **kwargs): - super(VirtualMachineScaleSetInstanceView, self).__init__(**kwargs) - self.virtual_machine = None - self.extensions = None - self.statuses = kwargs.get('statuses', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/virtual_machine_scale_set_instance_view_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/virtual_machine_scale_set_instance_view_py3.py deleted file mode 100644 index 0fc2b4de9f6a..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/virtual_machine_scale_set_instance_view_py3.py +++ /dev/null @@ -1,48 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineScaleSetInstanceView(Model): - """The instance view of a virtual machine scale set. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar virtual_machine: The instance view status summary for the virtual - machine scale set. - :vartype virtual_machine: - ~azure.mgmt.compute.v2017_12_01.models.VirtualMachineScaleSetInstanceViewStatusesSummary - :ivar extensions: The extensions information. - :vartype extensions: - list[~azure.mgmt.compute.v2017_12_01.models.VirtualMachineScaleSetVMExtensionsSummary] - :param statuses: The resource status information. - :type statuses: - list[~azure.mgmt.compute.v2017_12_01.models.InstanceViewStatus] - """ - - _validation = { - 'virtual_machine': {'readonly': True}, - 'extensions': {'readonly': True}, - } - - _attribute_map = { - 'virtual_machine': {'key': 'virtualMachine', 'type': 'VirtualMachineScaleSetInstanceViewStatusesSummary'}, - 'extensions': {'key': 'extensions', 'type': '[VirtualMachineScaleSetVMExtensionsSummary]'}, - 'statuses': {'key': 'statuses', 'type': '[InstanceViewStatus]'}, - } - - def __init__(self, *, statuses=None, **kwargs) -> None: - super(VirtualMachineScaleSetInstanceView, self).__init__(**kwargs) - self.virtual_machine = None - self.extensions = None - self.statuses = statuses diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/virtual_machine_scale_set_instance_view_statuses_summary.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/virtual_machine_scale_set_instance_view_statuses_summary.py deleted file mode 100644 index b0386bd7d17c..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/virtual_machine_scale_set_instance_view_statuses_summary.py +++ /dev/null @@ -1,37 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineScaleSetInstanceViewStatusesSummary(Model): - """Instance view statuses summary for virtual machines of a virtual machine - scale set. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar statuses_summary: The extensions information. - :vartype statuses_summary: - list[~azure.mgmt.compute.v2017_12_01.models.VirtualMachineStatusCodeCount] - """ - - _validation = { - 'statuses_summary': {'readonly': True}, - } - - _attribute_map = { - 'statuses_summary': {'key': 'statusesSummary', 'type': '[VirtualMachineStatusCodeCount]'}, - } - - def __init__(self, **kwargs): - super(VirtualMachineScaleSetInstanceViewStatusesSummary, self).__init__(**kwargs) - self.statuses_summary = None diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/virtual_machine_scale_set_instance_view_statuses_summary_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/virtual_machine_scale_set_instance_view_statuses_summary_py3.py deleted file mode 100644 index e6bf881e6b21..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/virtual_machine_scale_set_instance_view_statuses_summary_py3.py +++ /dev/null @@ -1,37 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineScaleSetInstanceViewStatusesSummary(Model): - """Instance view statuses summary for virtual machines of a virtual machine - scale set. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar statuses_summary: The extensions information. - :vartype statuses_summary: - list[~azure.mgmt.compute.v2017_12_01.models.VirtualMachineStatusCodeCount] - """ - - _validation = { - 'statuses_summary': {'readonly': True}, - } - - _attribute_map = { - 'statuses_summary': {'key': 'statusesSummary', 'type': '[VirtualMachineStatusCodeCount]'}, - } - - def __init__(self, **kwargs) -> None: - super(VirtualMachineScaleSetInstanceViewStatusesSummary, self).__init__(**kwargs) - self.statuses_summary = None diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/virtual_machine_scale_set_ip_configuration.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/virtual_machine_scale_set_ip_configuration.py deleted file mode 100644 index 71b991e178c2..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/virtual_machine_scale_set_ip_configuration.py +++ /dev/null @@ -1,83 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .sub_resource import SubResource - - -class VirtualMachineScaleSetIPConfiguration(SubResource): - """Describes a virtual machine scale set network profile's IP configuration. - - All required parameters must be populated in order to send to Azure. - - :param id: Resource Id - :type id: str - :param name: Required. The IP configuration name. - :type name: str - :param subnet: Specifies the identifier of the subnet. - :type subnet: ~azure.mgmt.compute.v2017_12_01.models.ApiEntityReference - :param primary: Specifies the primary network interface in case the - virtual machine has more than 1 network interface. - :type primary: bool - :param public_ip_address_configuration: The publicIPAddressConfiguration. - :type public_ip_address_configuration: - ~azure.mgmt.compute.v2017_12_01.models.VirtualMachineScaleSetPublicIPAddressConfiguration - :param private_ip_address_version: Available from Api-Version 2017-03-30 - onwards, it represents whether the specific ipconfiguration is IPv4 or - IPv6. Default is taken as IPv4. Possible values are: 'IPv4' and 'IPv6'. - Possible values include: 'IPv4', 'IPv6' - :type private_ip_address_version: str or - ~azure.mgmt.compute.v2017_12_01.models.IPVersion - :param application_gateway_backend_address_pools: Specifies an array of - references to backend address pools of application gateways. A scale set - can reference backend address pools of multiple application gateways. - Multiple scale sets cannot use the same application gateway. - :type application_gateway_backend_address_pools: - list[~azure.mgmt.compute.v2017_12_01.models.SubResource] - :param load_balancer_backend_address_pools: Specifies an array of - references to backend address pools of load balancers. A scale set can - reference backend address pools of one public and one internal load - balancer. Multiple scale sets cannot use the same load balancer. - :type load_balancer_backend_address_pools: - list[~azure.mgmt.compute.v2017_12_01.models.SubResource] - :param load_balancer_inbound_nat_pools: Specifies an array of references - to inbound Nat pools of the load balancers. A scale set can reference - inbound nat pools of one public and one internal load balancer. Multiple - scale sets cannot use the same load balancer - :type load_balancer_inbound_nat_pools: - list[~azure.mgmt.compute.v2017_12_01.models.SubResource] - """ - - _validation = { - 'name': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'subnet': {'key': 'properties.subnet', 'type': 'ApiEntityReference'}, - 'primary': {'key': 'properties.primary', 'type': 'bool'}, - 'public_ip_address_configuration': {'key': 'properties.publicIPAddressConfiguration', 'type': 'VirtualMachineScaleSetPublicIPAddressConfiguration'}, - 'private_ip_address_version': {'key': 'properties.privateIPAddressVersion', 'type': 'str'}, - 'application_gateway_backend_address_pools': {'key': 'properties.applicationGatewayBackendAddressPools', 'type': '[SubResource]'}, - 'load_balancer_backend_address_pools': {'key': 'properties.loadBalancerBackendAddressPools', 'type': '[SubResource]'}, - 'load_balancer_inbound_nat_pools': {'key': 'properties.loadBalancerInboundNatPools', 'type': '[SubResource]'}, - } - - def __init__(self, **kwargs): - super(VirtualMachineScaleSetIPConfiguration, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.subnet = kwargs.get('subnet', None) - self.primary = kwargs.get('primary', None) - self.public_ip_address_configuration = kwargs.get('public_ip_address_configuration', None) - self.private_ip_address_version = kwargs.get('private_ip_address_version', None) - self.application_gateway_backend_address_pools = kwargs.get('application_gateway_backend_address_pools', None) - self.load_balancer_backend_address_pools = kwargs.get('load_balancer_backend_address_pools', None) - self.load_balancer_inbound_nat_pools = kwargs.get('load_balancer_inbound_nat_pools', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/virtual_machine_scale_set_ip_configuration_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/virtual_machine_scale_set_ip_configuration_py3.py deleted file mode 100644 index 060b37a14daa..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/virtual_machine_scale_set_ip_configuration_py3.py +++ /dev/null @@ -1,83 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .sub_resource_py3 import SubResource - - -class VirtualMachineScaleSetIPConfiguration(SubResource): - """Describes a virtual machine scale set network profile's IP configuration. - - All required parameters must be populated in order to send to Azure. - - :param id: Resource Id - :type id: str - :param name: Required. The IP configuration name. - :type name: str - :param subnet: Specifies the identifier of the subnet. - :type subnet: ~azure.mgmt.compute.v2017_12_01.models.ApiEntityReference - :param primary: Specifies the primary network interface in case the - virtual machine has more than 1 network interface. - :type primary: bool - :param public_ip_address_configuration: The publicIPAddressConfiguration. - :type public_ip_address_configuration: - ~azure.mgmt.compute.v2017_12_01.models.VirtualMachineScaleSetPublicIPAddressConfiguration - :param private_ip_address_version: Available from Api-Version 2017-03-30 - onwards, it represents whether the specific ipconfiguration is IPv4 or - IPv6. Default is taken as IPv4. Possible values are: 'IPv4' and 'IPv6'. - Possible values include: 'IPv4', 'IPv6' - :type private_ip_address_version: str or - ~azure.mgmt.compute.v2017_12_01.models.IPVersion - :param application_gateway_backend_address_pools: Specifies an array of - references to backend address pools of application gateways. A scale set - can reference backend address pools of multiple application gateways. - Multiple scale sets cannot use the same application gateway. - :type application_gateway_backend_address_pools: - list[~azure.mgmt.compute.v2017_12_01.models.SubResource] - :param load_balancer_backend_address_pools: Specifies an array of - references to backend address pools of load balancers. A scale set can - reference backend address pools of one public and one internal load - balancer. Multiple scale sets cannot use the same load balancer. - :type load_balancer_backend_address_pools: - list[~azure.mgmt.compute.v2017_12_01.models.SubResource] - :param load_balancer_inbound_nat_pools: Specifies an array of references - to inbound Nat pools of the load balancers. A scale set can reference - inbound nat pools of one public and one internal load balancer. Multiple - scale sets cannot use the same load balancer - :type load_balancer_inbound_nat_pools: - list[~azure.mgmt.compute.v2017_12_01.models.SubResource] - """ - - _validation = { - 'name': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'subnet': {'key': 'properties.subnet', 'type': 'ApiEntityReference'}, - 'primary': {'key': 'properties.primary', 'type': 'bool'}, - 'public_ip_address_configuration': {'key': 'properties.publicIPAddressConfiguration', 'type': 'VirtualMachineScaleSetPublicIPAddressConfiguration'}, - 'private_ip_address_version': {'key': 'properties.privateIPAddressVersion', 'type': 'str'}, - 'application_gateway_backend_address_pools': {'key': 'properties.applicationGatewayBackendAddressPools', 'type': '[SubResource]'}, - 'load_balancer_backend_address_pools': {'key': 'properties.loadBalancerBackendAddressPools', 'type': '[SubResource]'}, - 'load_balancer_inbound_nat_pools': {'key': 'properties.loadBalancerInboundNatPools', 'type': '[SubResource]'}, - } - - def __init__(self, *, name: str, id: str=None, subnet=None, primary: bool=None, public_ip_address_configuration=None, private_ip_address_version=None, application_gateway_backend_address_pools=None, load_balancer_backend_address_pools=None, load_balancer_inbound_nat_pools=None, **kwargs) -> None: - super(VirtualMachineScaleSetIPConfiguration, self).__init__(id=id, **kwargs) - self.name = name - self.subnet = subnet - self.primary = primary - self.public_ip_address_configuration = public_ip_address_configuration - self.private_ip_address_version = private_ip_address_version - self.application_gateway_backend_address_pools = application_gateway_backend_address_pools - self.load_balancer_backend_address_pools = load_balancer_backend_address_pools - self.load_balancer_inbound_nat_pools = load_balancer_inbound_nat_pools diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/virtual_machine_scale_set_managed_disk_parameters.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/virtual_machine_scale_set_managed_disk_parameters.py deleted file mode 100644 index 44d6a698cc43..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/virtual_machine_scale_set_managed_disk_parameters.py +++ /dev/null @@ -1,31 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineScaleSetManagedDiskParameters(Model): - """Describes the parameters of a ScaleSet managed disk. - - :param storage_account_type: Specifies the storage account type for the - managed disk. Possible values are: Standard_LRS or Premium_LRS. Possible - values include: 'Standard_LRS', 'Premium_LRS' - :type storage_account_type: str or - ~azure.mgmt.compute.v2017_12_01.models.StorageAccountTypes - """ - - _attribute_map = { - 'storage_account_type': {'key': 'storageAccountType', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(VirtualMachineScaleSetManagedDiskParameters, self).__init__(**kwargs) - self.storage_account_type = kwargs.get('storage_account_type', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/virtual_machine_scale_set_managed_disk_parameters_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/virtual_machine_scale_set_managed_disk_parameters_py3.py deleted file mode 100644 index b385ed7af268..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/virtual_machine_scale_set_managed_disk_parameters_py3.py +++ /dev/null @@ -1,31 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineScaleSetManagedDiskParameters(Model): - """Describes the parameters of a ScaleSet managed disk. - - :param storage_account_type: Specifies the storage account type for the - managed disk. Possible values are: Standard_LRS or Premium_LRS. Possible - values include: 'Standard_LRS', 'Premium_LRS' - :type storage_account_type: str or - ~azure.mgmt.compute.v2017_12_01.models.StorageAccountTypes - """ - - _attribute_map = { - 'storage_account_type': {'key': 'storageAccountType', 'type': 'str'}, - } - - def __init__(self, *, storage_account_type=None, **kwargs) -> None: - super(VirtualMachineScaleSetManagedDiskParameters, self).__init__(**kwargs) - self.storage_account_type = storage_account_type diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/virtual_machine_scale_set_network_configuration.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/virtual_machine_scale_set_network_configuration.py deleted file mode 100644 index bae6d7497689..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/virtual_machine_scale_set_network_configuration.py +++ /dev/null @@ -1,70 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .sub_resource import SubResource - - -class VirtualMachineScaleSetNetworkConfiguration(SubResource): - """Describes a virtual machine scale set network profile's network - configurations. - - All required parameters must be populated in order to send to Azure. - - :param id: Resource Id - :type id: str - :param name: Required. The network configuration name. - :type name: str - :param primary: Specifies the primary network interface in case the - virtual machine has more than 1 network interface. - :type primary: bool - :param enable_accelerated_networking: Specifies whether the network - interface is accelerated networking-enabled. - :type enable_accelerated_networking: bool - :param network_security_group: The network security group. - :type network_security_group: - ~azure.mgmt.compute.v2017_12_01.models.SubResource - :param dns_settings: The dns settings to be applied on the network - interfaces. - :type dns_settings: - ~azure.mgmt.compute.v2017_12_01.models.VirtualMachineScaleSetNetworkConfigurationDnsSettings - :param ip_configurations: Required. Specifies the IP configurations of the - network interface. - :type ip_configurations: - list[~azure.mgmt.compute.v2017_12_01.models.VirtualMachineScaleSetIPConfiguration] - :param enable_ip_forwarding: Whether IP forwarding enabled on this NIC. - :type enable_ip_forwarding: bool - """ - - _validation = { - 'name': {'required': True}, - 'ip_configurations': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'primary': {'key': 'properties.primary', 'type': 'bool'}, - 'enable_accelerated_networking': {'key': 'properties.enableAcceleratedNetworking', 'type': 'bool'}, - 'network_security_group': {'key': 'properties.networkSecurityGroup', 'type': 'SubResource'}, - 'dns_settings': {'key': 'properties.dnsSettings', 'type': 'VirtualMachineScaleSetNetworkConfigurationDnsSettings'}, - 'ip_configurations': {'key': 'properties.ipConfigurations', 'type': '[VirtualMachineScaleSetIPConfiguration]'}, - 'enable_ip_forwarding': {'key': 'properties.enableIPForwarding', 'type': 'bool'}, - } - - def __init__(self, **kwargs): - super(VirtualMachineScaleSetNetworkConfiguration, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.primary = kwargs.get('primary', None) - self.enable_accelerated_networking = kwargs.get('enable_accelerated_networking', None) - self.network_security_group = kwargs.get('network_security_group', None) - self.dns_settings = kwargs.get('dns_settings', None) - self.ip_configurations = kwargs.get('ip_configurations', None) - self.enable_ip_forwarding = kwargs.get('enable_ip_forwarding', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/virtual_machine_scale_set_network_configuration_dns_settings.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/virtual_machine_scale_set_network_configuration_dns_settings.py deleted file mode 100644 index 04e1c619383f..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/virtual_machine_scale_set_network_configuration_dns_settings.py +++ /dev/null @@ -1,29 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineScaleSetNetworkConfigurationDnsSettings(Model): - """Describes a virtual machines scale sets network configuration's DNS - settings. - - :param dns_servers: List of DNS servers IP addresses - :type dns_servers: list[str] - """ - - _attribute_map = { - 'dns_servers': {'key': 'dnsServers', 'type': '[str]'}, - } - - def __init__(self, **kwargs): - super(VirtualMachineScaleSetNetworkConfigurationDnsSettings, self).__init__(**kwargs) - self.dns_servers = kwargs.get('dns_servers', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/virtual_machine_scale_set_network_configuration_dns_settings_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/virtual_machine_scale_set_network_configuration_dns_settings_py3.py deleted file mode 100644 index 5607f74d3c6a..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/virtual_machine_scale_set_network_configuration_dns_settings_py3.py +++ /dev/null @@ -1,29 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineScaleSetNetworkConfigurationDnsSettings(Model): - """Describes a virtual machines scale sets network configuration's DNS - settings. - - :param dns_servers: List of DNS servers IP addresses - :type dns_servers: list[str] - """ - - _attribute_map = { - 'dns_servers': {'key': 'dnsServers', 'type': '[str]'}, - } - - def __init__(self, *, dns_servers=None, **kwargs) -> None: - super(VirtualMachineScaleSetNetworkConfigurationDnsSettings, self).__init__(**kwargs) - self.dns_servers = dns_servers diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/virtual_machine_scale_set_network_configuration_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/virtual_machine_scale_set_network_configuration_py3.py deleted file mode 100644 index 995a1db4437e..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/virtual_machine_scale_set_network_configuration_py3.py +++ /dev/null @@ -1,70 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .sub_resource_py3 import SubResource - - -class VirtualMachineScaleSetNetworkConfiguration(SubResource): - """Describes a virtual machine scale set network profile's network - configurations. - - All required parameters must be populated in order to send to Azure. - - :param id: Resource Id - :type id: str - :param name: Required. The network configuration name. - :type name: str - :param primary: Specifies the primary network interface in case the - virtual machine has more than 1 network interface. - :type primary: bool - :param enable_accelerated_networking: Specifies whether the network - interface is accelerated networking-enabled. - :type enable_accelerated_networking: bool - :param network_security_group: The network security group. - :type network_security_group: - ~azure.mgmt.compute.v2017_12_01.models.SubResource - :param dns_settings: The dns settings to be applied on the network - interfaces. - :type dns_settings: - ~azure.mgmt.compute.v2017_12_01.models.VirtualMachineScaleSetNetworkConfigurationDnsSettings - :param ip_configurations: Required. Specifies the IP configurations of the - network interface. - :type ip_configurations: - list[~azure.mgmt.compute.v2017_12_01.models.VirtualMachineScaleSetIPConfiguration] - :param enable_ip_forwarding: Whether IP forwarding enabled on this NIC. - :type enable_ip_forwarding: bool - """ - - _validation = { - 'name': {'required': True}, - 'ip_configurations': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'primary': {'key': 'properties.primary', 'type': 'bool'}, - 'enable_accelerated_networking': {'key': 'properties.enableAcceleratedNetworking', 'type': 'bool'}, - 'network_security_group': {'key': 'properties.networkSecurityGroup', 'type': 'SubResource'}, - 'dns_settings': {'key': 'properties.dnsSettings', 'type': 'VirtualMachineScaleSetNetworkConfigurationDnsSettings'}, - 'ip_configurations': {'key': 'properties.ipConfigurations', 'type': '[VirtualMachineScaleSetIPConfiguration]'}, - 'enable_ip_forwarding': {'key': 'properties.enableIPForwarding', 'type': 'bool'}, - } - - def __init__(self, *, name: str, ip_configurations, id: str=None, primary: bool=None, enable_accelerated_networking: bool=None, network_security_group=None, dns_settings=None, enable_ip_forwarding: bool=None, **kwargs) -> None: - super(VirtualMachineScaleSetNetworkConfiguration, self).__init__(id=id, **kwargs) - self.name = name - self.primary = primary - self.enable_accelerated_networking = enable_accelerated_networking - self.network_security_group = network_security_group - self.dns_settings = dns_settings - self.ip_configurations = ip_configurations - self.enable_ip_forwarding = enable_ip_forwarding diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/virtual_machine_scale_set_network_profile.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/virtual_machine_scale_set_network_profile.py deleted file mode 100644 index 93f2208693cd..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/virtual_machine_scale_set_network_profile.py +++ /dev/null @@ -1,38 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineScaleSetNetworkProfile(Model): - """Describes a virtual machine scale set network profile. - - :param health_probe: A reference to a load balancer probe used to - determine the health of an instance in the virtual machine scale set. The - reference will be in the form: - '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/probes/{probeName}'. - :type health_probe: - ~azure.mgmt.compute.v2017_12_01.models.ApiEntityReference - :param network_interface_configurations: The list of network - configurations. - :type network_interface_configurations: - list[~azure.mgmt.compute.v2017_12_01.models.VirtualMachineScaleSetNetworkConfiguration] - """ - - _attribute_map = { - 'health_probe': {'key': 'healthProbe', 'type': 'ApiEntityReference'}, - 'network_interface_configurations': {'key': 'networkInterfaceConfigurations', 'type': '[VirtualMachineScaleSetNetworkConfiguration]'}, - } - - def __init__(self, **kwargs): - super(VirtualMachineScaleSetNetworkProfile, self).__init__(**kwargs) - self.health_probe = kwargs.get('health_probe', None) - self.network_interface_configurations = kwargs.get('network_interface_configurations', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/virtual_machine_scale_set_network_profile_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/virtual_machine_scale_set_network_profile_py3.py deleted file mode 100644 index db829a6e5f08..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/virtual_machine_scale_set_network_profile_py3.py +++ /dev/null @@ -1,38 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineScaleSetNetworkProfile(Model): - """Describes a virtual machine scale set network profile. - - :param health_probe: A reference to a load balancer probe used to - determine the health of an instance in the virtual machine scale set. The - reference will be in the form: - '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/probes/{probeName}'. - :type health_probe: - ~azure.mgmt.compute.v2017_12_01.models.ApiEntityReference - :param network_interface_configurations: The list of network - configurations. - :type network_interface_configurations: - list[~azure.mgmt.compute.v2017_12_01.models.VirtualMachineScaleSetNetworkConfiguration] - """ - - _attribute_map = { - 'health_probe': {'key': 'healthProbe', 'type': 'ApiEntityReference'}, - 'network_interface_configurations': {'key': 'networkInterfaceConfigurations', 'type': '[VirtualMachineScaleSetNetworkConfiguration]'}, - } - - def __init__(self, *, health_probe=None, network_interface_configurations=None, **kwargs) -> None: - super(VirtualMachineScaleSetNetworkProfile, self).__init__(**kwargs) - self.health_probe = health_probe - self.network_interface_configurations = network_interface_configurations diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/virtual_machine_scale_set_os_disk.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/virtual_machine_scale_set_os_disk.py deleted file mode 100644 index 24fa8103eef7..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/virtual_machine_scale_set_os_disk.py +++ /dev/null @@ -1,80 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineScaleSetOSDisk(Model): - """Describes a virtual machine scale set operating system disk. - - All required parameters must be populated in order to send to Azure. - - :param name: The disk name. - :type name: str - :param caching: Specifies the caching requirements.

    Possible - values are:

    **None**

    **ReadOnly**

    **ReadWrite** -

    Default: **None for Standard storage. ReadOnly for Premium - storage**. Possible values include: 'None', 'ReadOnly', 'ReadWrite' - :type caching: str or ~azure.mgmt.compute.v2017_12_01.models.CachingTypes - :param write_accelerator_enabled: Specifies whether writeAccelerator - should be enabled or disabled on the disk. - :type write_accelerator_enabled: bool - :param create_option: Required. Specifies how the virtual machines in the - scale set should be created.

    The only allowed value is: - **FromImage** \\u2013 This value is used when you are using an image to - create the virtual machine. If you are using a platform image, you also - use the imageReference element described above. If you are using a - marketplace image, you also use the plan element previously described. - Possible values include: 'FromImage', 'Empty', 'Attach' - :type create_option: str or - ~azure.mgmt.compute.v2017_12_01.models.DiskCreateOptionTypes - :param os_type: This property allows you to specify the type of the OS - that is included in the disk if creating a VM from user-image or a - specialized VHD.

    Possible values are:

    **Windows** -

    **Linux**. Possible values include: 'Windows', 'Linux' - :type os_type: str or - ~azure.mgmt.compute.v2017_12_01.models.OperatingSystemTypes - :param image: Specifies information about the unmanaged user image to base - the scale set on. - :type image: ~azure.mgmt.compute.v2017_12_01.models.VirtualHardDisk - :param vhd_containers: Specifies the container urls that are used to store - operating system disks for the scale set. - :type vhd_containers: list[str] - :param managed_disk: The managed disk parameters. - :type managed_disk: - ~azure.mgmt.compute.v2017_12_01.models.VirtualMachineScaleSetManagedDiskParameters - """ - - _validation = { - 'create_option': {'required': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'caching': {'key': 'caching', 'type': 'CachingTypes'}, - 'write_accelerator_enabled': {'key': 'writeAcceleratorEnabled', 'type': 'bool'}, - 'create_option': {'key': 'createOption', 'type': 'str'}, - 'os_type': {'key': 'osType', 'type': 'OperatingSystemTypes'}, - 'image': {'key': 'image', 'type': 'VirtualHardDisk'}, - 'vhd_containers': {'key': 'vhdContainers', 'type': '[str]'}, - 'managed_disk': {'key': 'managedDisk', 'type': 'VirtualMachineScaleSetManagedDiskParameters'}, - } - - def __init__(self, **kwargs): - super(VirtualMachineScaleSetOSDisk, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.caching = kwargs.get('caching', None) - self.write_accelerator_enabled = kwargs.get('write_accelerator_enabled', None) - self.create_option = kwargs.get('create_option', None) - self.os_type = kwargs.get('os_type', None) - self.image = kwargs.get('image', None) - self.vhd_containers = kwargs.get('vhd_containers', None) - self.managed_disk = kwargs.get('managed_disk', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/virtual_machine_scale_set_os_disk_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/virtual_machine_scale_set_os_disk_py3.py deleted file mode 100644 index cd6f8e0254fd..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/virtual_machine_scale_set_os_disk_py3.py +++ /dev/null @@ -1,80 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineScaleSetOSDisk(Model): - """Describes a virtual machine scale set operating system disk. - - All required parameters must be populated in order to send to Azure. - - :param name: The disk name. - :type name: str - :param caching: Specifies the caching requirements.

    Possible - values are:

    **None**

    **ReadOnly**

    **ReadWrite** -

    Default: **None for Standard storage. ReadOnly for Premium - storage**. Possible values include: 'None', 'ReadOnly', 'ReadWrite' - :type caching: str or ~azure.mgmt.compute.v2017_12_01.models.CachingTypes - :param write_accelerator_enabled: Specifies whether writeAccelerator - should be enabled or disabled on the disk. - :type write_accelerator_enabled: bool - :param create_option: Required. Specifies how the virtual machines in the - scale set should be created.

    The only allowed value is: - **FromImage** \\u2013 This value is used when you are using an image to - create the virtual machine. If you are using a platform image, you also - use the imageReference element described above. If you are using a - marketplace image, you also use the plan element previously described. - Possible values include: 'FromImage', 'Empty', 'Attach' - :type create_option: str or - ~azure.mgmt.compute.v2017_12_01.models.DiskCreateOptionTypes - :param os_type: This property allows you to specify the type of the OS - that is included in the disk if creating a VM from user-image or a - specialized VHD.

    Possible values are:

    **Windows** -

    **Linux**. Possible values include: 'Windows', 'Linux' - :type os_type: str or - ~azure.mgmt.compute.v2017_12_01.models.OperatingSystemTypes - :param image: Specifies information about the unmanaged user image to base - the scale set on. - :type image: ~azure.mgmt.compute.v2017_12_01.models.VirtualHardDisk - :param vhd_containers: Specifies the container urls that are used to store - operating system disks for the scale set. - :type vhd_containers: list[str] - :param managed_disk: The managed disk parameters. - :type managed_disk: - ~azure.mgmt.compute.v2017_12_01.models.VirtualMachineScaleSetManagedDiskParameters - """ - - _validation = { - 'create_option': {'required': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'caching': {'key': 'caching', 'type': 'CachingTypes'}, - 'write_accelerator_enabled': {'key': 'writeAcceleratorEnabled', 'type': 'bool'}, - 'create_option': {'key': 'createOption', 'type': 'str'}, - 'os_type': {'key': 'osType', 'type': 'OperatingSystemTypes'}, - 'image': {'key': 'image', 'type': 'VirtualHardDisk'}, - 'vhd_containers': {'key': 'vhdContainers', 'type': '[str]'}, - 'managed_disk': {'key': 'managedDisk', 'type': 'VirtualMachineScaleSetManagedDiskParameters'}, - } - - def __init__(self, *, create_option, name: str=None, caching=None, write_accelerator_enabled: bool=None, os_type=None, image=None, vhd_containers=None, managed_disk=None, **kwargs) -> None: - super(VirtualMachineScaleSetOSDisk, self).__init__(**kwargs) - self.name = name - self.caching = caching - self.write_accelerator_enabled = write_accelerator_enabled - self.create_option = create_option - self.os_type = os_type - self.image = image - self.vhd_containers = vhd_containers - self.managed_disk = managed_disk diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/virtual_machine_scale_set_os_profile.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/virtual_machine_scale_set_os_profile.py deleted file mode 100644 index 7699d4e3fda1..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/virtual_machine_scale_set_os_profile.py +++ /dev/null @@ -1,97 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineScaleSetOSProfile(Model): - """Describes a virtual machine scale set OS profile. - - :param computer_name_prefix: Specifies the computer name prefix for all of - the virtual machines in the scale set. Computer name prefixes must be 1 to - 15 characters long. - :type computer_name_prefix: str - :param admin_username: Specifies the name of the administrator account. -

    **Windows-only restriction:** Cannot end in "."

    - **Disallowed values:** "administrator", "admin", "user", "user1", "test", - "user2", "test1", "user3", "admin1", "1", "123", "a", "actuser", "adm", - "admin2", "aspnet", "backup", "console", "david", "guest", "john", - "owner", "root", "server", "sql", "support", "support_388945a0", "sys", - "test2", "test3", "user4", "user5".

    **Minimum-length (Linux):** 1 - character

    **Max-length (Linux):** 64 characters

    - **Max-length (Windows):** 20 characters

  • For root access to - the Linux VM, see [Using root privileges on Linux virtual machines in - Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-use-root-privileges?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json)
  • - For a list of built-in system users on Linux that should not be used in - this field, see [Selecting User Names for Linux on - Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-usernames?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json) - :type admin_username: str - :param admin_password: Specifies the password of the administrator - account.

    **Minimum-length (Windows):** 8 characters

    - **Minimum-length (Linux):** 6 characters

    **Max-length - (Windows):** 123 characters

    **Max-length (Linux):** 72 characters -

    **Complexity requirements:** 3 out of 4 conditions below need to - be fulfilled
    Has lower characters
    Has upper characters
    Has a - digit
    Has a special character (Regex match [\\W_])

    - **Disallowed values:** "abc@123", "P@$$w0rd", "P@ssw0rd", "P@ssword123", - "Pa$$word", "pass@word1", "Password!", "Password1", "Password22", - "iloveyou!"

    For resetting the password, see [How to reset the - Remote Desktop service or its login password in a Windows - VM](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-reset-rdp?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json) -

    For resetting root password, see [Manage users, SSH, and check or - repair disks on Azure Linux VMs using the VMAccess - Extension](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-using-vmaccess-extension?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json#reset-root-password) - :type admin_password: str - :param custom_data: Specifies a base-64 encoded string of custom data. The - base-64 encoded string is decoded to a binary array that is saved as a - file on the Virtual Machine. The maximum length of the binary array is - 65535 bytes.

    For using cloud-init for your VM, see [Using - cloud-init to customize a Linux VM during - creation](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-using-cloud-init?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json) - :type custom_data: str - :param windows_configuration: Specifies Windows operating system settings - on the virtual machine. - :type windows_configuration: - ~azure.mgmt.compute.v2017_12_01.models.WindowsConfiguration - :param linux_configuration: Specifies the Linux operating system settings - on the virtual machine.

    For a list of supported Linux - distributions, see [Linux on Azure-Endorsed - Distributions](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-endorsed-distros?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json) -

    For running non-endorsed distributions, see [Information for - Non-Endorsed - Distributions](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-create-upload-generic?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json). - :type linux_configuration: - ~azure.mgmt.compute.v2017_12_01.models.LinuxConfiguration - :param secrets: Specifies set of certificates that should be installed - onto the virtual machines in the scale set. - :type secrets: - list[~azure.mgmt.compute.v2017_12_01.models.VaultSecretGroup] - """ - - _attribute_map = { - 'computer_name_prefix': {'key': 'computerNamePrefix', 'type': 'str'}, - 'admin_username': {'key': 'adminUsername', 'type': 'str'}, - 'admin_password': {'key': 'adminPassword', 'type': 'str'}, - 'custom_data': {'key': 'customData', 'type': 'str'}, - 'windows_configuration': {'key': 'windowsConfiguration', 'type': 'WindowsConfiguration'}, - 'linux_configuration': {'key': 'linuxConfiguration', 'type': 'LinuxConfiguration'}, - 'secrets': {'key': 'secrets', 'type': '[VaultSecretGroup]'}, - } - - def __init__(self, **kwargs): - super(VirtualMachineScaleSetOSProfile, self).__init__(**kwargs) - self.computer_name_prefix = kwargs.get('computer_name_prefix', None) - self.admin_username = kwargs.get('admin_username', None) - self.admin_password = kwargs.get('admin_password', None) - self.custom_data = kwargs.get('custom_data', None) - self.windows_configuration = kwargs.get('windows_configuration', None) - self.linux_configuration = kwargs.get('linux_configuration', None) - self.secrets = kwargs.get('secrets', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/virtual_machine_scale_set_os_profile_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/virtual_machine_scale_set_os_profile_py3.py deleted file mode 100644 index 1c4bd36214ed..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/virtual_machine_scale_set_os_profile_py3.py +++ /dev/null @@ -1,97 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineScaleSetOSProfile(Model): - """Describes a virtual machine scale set OS profile. - - :param computer_name_prefix: Specifies the computer name prefix for all of - the virtual machines in the scale set. Computer name prefixes must be 1 to - 15 characters long. - :type computer_name_prefix: str - :param admin_username: Specifies the name of the administrator account. -

    **Windows-only restriction:** Cannot end in "."

    - **Disallowed values:** "administrator", "admin", "user", "user1", "test", - "user2", "test1", "user3", "admin1", "1", "123", "a", "actuser", "adm", - "admin2", "aspnet", "backup", "console", "david", "guest", "john", - "owner", "root", "server", "sql", "support", "support_388945a0", "sys", - "test2", "test3", "user4", "user5".

    **Minimum-length (Linux):** 1 - character

    **Max-length (Linux):** 64 characters

    - **Max-length (Windows):** 20 characters

  • For root access to - the Linux VM, see [Using root privileges on Linux virtual machines in - Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-use-root-privileges?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json)
  • - For a list of built-in system users on Linux that should not be used in - this field, see [Selecting User Names for Linux on - Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-usernames?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json) - :type admin_username: str - :param admin_password: Specifies the password of the administrator - account.

    **Minimum-length (Windows):** 8 characters

    - **Minimum-length (Linux):** 6 characters

    **Max-length - (Windows):** 123 characters

    **Max-length (Linux):** 72 characters -

    **Complexity requirements:** 3 out of 4 conditions below need to - be fulfilled
    Has lower characters
    Has upper characters
    Has a - digit
    Has a special character (Regex match [\\W_])

    - **Disallowed values:** "abc@123", "P@$$w0rd", "P@ssw0rd", "P@ssword123", - "Pa$$word", "pass@word1", "Password!", "Password1", "Password22", - "iloveyou!"

    For resetting the password, see [How to reset the - Remote Desktop service or its login password in a Windows - VM](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-reset-rdp?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json) -

    For resetting root password, see [Manage users, SSH, and check or - repair disks on Azure Linux VMs using the VMAccess - Extension](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-using-vmaccess-extension?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json#reset-root-password) - :type admin_password: str - :param custom_data: Specifies a base-64 encoded string of custom data. The - base-64 encoded string is decoded to a binary array that is saved as a - file on the Virtual Machine. The maximum length of the binary array is - 65535 bytes.

    For using cloud-init for your VM, see [Using - cloud-init to customize a Linux VM during - creation](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-using-cloud-init?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json) - :type custom_data: str - :param windows_configuration: Specifies Windows operating system settings - on the virtual machine. - :type windows_configuration: - ~azure.mgmt.compute.v2017_12_01.models.WindowsConfiguration - :param linux_configuration: Specifies the Linux operating system settings - on the virtual machine.

    For a list of supported Linux - distributions, see [Linux on Azure-Endorsed - Distributions](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-endorsed-distros?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json) -

    For running non-endorsed distributions, see [Information for - Non-Endorsed - Distributions](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-create-upload-generic?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json). - :type linux_configuration: - ~azure.mgmt.compute.v2017_12_01.models.LinuxConfiguration - :param secrets: Specifies set of certificates that should be installed - onto the virtual machines in the scale set. - :type secrets: - list[~azure.mgmt.compute.v2017_12_01.models.VaultSecretGroup] - """ - - _attribute_map = { - 'computer_name_prefix': {'key': 'computerNamePrefix', 'type': 'str'}, - 'admin_username': {'key': 'adminUsername', 'type': 'str'}, - 'admin_password': {'key': 'adminPassword', 'type': 'str'}, - 'custom_data': {'key': 'customData', 'type': 'str'}, - 'windows_configuration': {'key': 'windowsConfiguration', 'type': 'WindowsConfiguration'}, - 'linux_configuration': {'key': 'linuxConfiguration', 'type': 'LinuxConfiguration'}, - 'secrets': {'key': 'secrets', 'type': '[VaultSecretGroup]'}, - } - - def __init__(self, *, computer_name_prefix: str=None, admin_username: str=None, admin_password: str=None, custom_data: str=None, windows_configuration=None, linux_configuration=None, secrets=None, **kwargs) -> None: - super(VirtualMachineScaleSetOSProfile, self).__init__(**kwargs) - self.computer_name_prefix = computer_name_prefix - self.admin_username = admin_username - self.admin_password = admin_password - self.custom_data = custom_data - self.windows_configuration = windows_configuration - self.linux_configuration = linux_configuration - self.secrets = secrets diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/virtual_machine_scale_set_paged.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/virtual_machine_scale_set_paged.py deleted file mode 100644 index a6dae91aa1e4..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/virtual_machine_scale_set_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class VirtualMachineScaleSetPaged(Paged): - """ - A paging container for iterating over a list of :class:`VirtualMachineScaleSet ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[VirtualMachineScaleSet]'} - } - - def __init__(self, *args, **kwargs): - - super(VirtualMachineScaleSetPaged, self).__init__(*args, **kwargs) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/virtual_machine_scale_set_public_ip_address_configuration.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/virtual_machine_scale_set_public_ip_address_configuration.py deleted file mode 100644 index 3a65fd0c337c..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/virtual_machine_scale_set_public_ip_address_configuration.py +++ /dev/null @@ -1,45 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineScaleSetPublicIPAddressConfiguration(Model): - """Describes a virtual machines scale set IP Configuration's PublicIPAddress - configuration. - - All required parameters must be populated in order to send to Azure. - - :param name: Required. The publicIP address configuration name. - :type name: str - :param idle_timeout_in_minutes: The idle timeout of the public IP address. - :type idle_timeout_in_minutes: int - :param dns_settings: The dns settings to be applied on the publicIP - addresses . - :type dns_settings: - ~azure.mgmt.compute.v2017_12_01.models.VirtualMachineScaleSetPublicIPAddressConfigurationDnsSettings - """ - - _validation = { - 'name': {'required': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'idle_timeout_in_minutes': {'key': 'properties.idleTimeoutInMinutes', 'type': 'int'}, - 'dns_settings': {'key': 'properties.dnsSettings', 'type': 'VirtualMachineScaleSetPublicIPAddressConfigurationDnsSettings'}, - } - - def __init__(self, **kwargs): - super(VirtualMachineScaleSetPublicIPAddressConfiguration, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.idle_timeout_in_minutes = kwargs.get('idle_timeout_in_minutes', None) - self.dns_settings = kwargs.get('dns_settings', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/virtual_machine_scale_set_public_ip_address_configuration_dns_settings.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/virtual_machine_scale_set_public_ip_address_configuration_dns_settings.py deleted file mode 100644 index 2fe562244372..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/virtual_machine_scale_set_public_ip_address_configuration_dns_settings.py +++ /dev/null @@ -1,37 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineScaleSetPublicIPAddressConfigurationDnsSettings(Model): - """Describes a virtual machines scale sets network configuration's DNS - settings. - - All required parameters must be populated in order to send to Azure. - - :param domain_name_label: Required. The Domain name label.The - concatenation of the domain name label and vm index will be the domain - name labels of the PublicIPAddress resources that will be created - :type domain_name_label: str - """ - - _validation = { - 'domain_name_label': {'required': True}, - } - - _attribute_map = { - 'domain_name_label': {'key': 'domainNameLabel', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(VirtualMachineScaleSetPublicIPAddressConfigurationDnsSettings, self).__init__(**kwargs) - self.domain_name_label = kwargs.get('domain_name_label', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/virtual_machine_scale_set_public_ip_address_configuration_dns_settings_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/virtual_machine_scale_set_public_ip_address_configuration_dns_settings_py3.py deleted file mode 100644 index 326a36708ff4..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/virtual_machine_scale_set_public_ip_address_configuration_dns_settings_py3.py +++ /dev/null @@ -1,37 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineScaleSetPublicIPAddressConfigurationDnsSettings(Model): - """Describes a virtual machines scale sets network configuration's DNS - settings. - - All required parameters must be populated in order to send to Azure. - - :param domain_name_label: Required. The Domain name label.The - concatenation of the domain name label and vm index will be the domain - name labels of the PublicIPAddress resources that will be created - :type domain_name_label: str - """ - - _validation = { - 'domain_name_label': {'required': True}, - } - - _attribute_map = { - 'domain_name_label': {'key': 'domainNameLabel', 'type': 'str'}, - } - - def __init__(self, *, domain_name_label: str, **kwargs) -> None: - super(VirtualMachineScaleSetPublicIPAddressConfigurationDnsSettings, self).__init__(**kwargs) - self.domain_name_label = domain_name_label diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/virtual_machine_scale_set_public_ip_address_configuration_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/virtual_machine_scale_set_public_ip_address_configuration_py3.py deleted file mode 100644 index 89dbbd54a4b6..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/virtual_machine_scale_set_public_ip_address_configuration_py3.py +++ /dev/null @@ -1,45 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineScaleSetPublicIPAddressConfiguration(Model): - """Describes a virtual machines scale set IP Configuration's PublicIPAddress - configuration. - - All required parameters must be populated in order to send to Azure. - - :param name: Required. The publicIP address configuration name. - :type name: str - :param idle_timeout_in_minutes: The idle timeout of the public IP address. - :type idle_timeout_in_minutes: int - :param dns_settings: The dns settings to be applied on the publicIP - addresses . - :type dns_settings: - ~azure.mgmt.compute.v2017_12_01.models.VirtualMachineScaleSetPublicIPAddressConfigurationDnsSettings - """ - - _validation = { - 'name': {'required': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'idle_timeout_in_minutes': {'key': 'properties.idleTimeoutInMinutes', 'type': 'int'}, - 'dns_settings': {'key': 'properties.dnsSettings', 'type': 'VirtualMachineScaleSetPublicIPAddressConfigurationDnsSettings'}, - } - - def __init__(self, *, name: str, idle_timeout_in_minutes: int=None, dns_settings=None, **kwargs) -> None: - super(VirtualMachineScaleSetPublicIPAddressConfiguration, self).__init__(**kwargs) - self.name = name - self.idle_timeout_in_minutes = idle_timeout_in_minutes - self.dns_settings = dns_settings diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/virtual_machine_scale_set_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/virtual_machine_scale_set_py3.py deleted file mode 100644 index 456eab4e17fa..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/virtual_machine_scale_set_py3.py +++ /dev/null @@ -1,116 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource_py3 import Resource - - -class VirtualMachineScaleSet(Resource): - """Describes a Virtual Machine Scale Set. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource Id - :vartype id: str - :ivar name: Resource name - :vartype name: str - :ivar type: Resource type - :vartype type: str - :param location: Required. Resource location - :type location: str - :param tags: Resource tags - :type tags: dict[str, str] - :param sku: The virtual machine scale set sku. - :type sku: ~azure.mgmt.compute.v2017_12_01.models.Sku - :param plan: Specifies information about the marketplace image used to - create the virtual machine. This element is only used for marketplace - images. Before you can use a marketplace image from an API, you must - enable the image for programmatic use. In the Azure portal, find the - marketplace image that you want to use and then click **Want to deploy - programmatically, Get Started ->**. Enter any required information and - then click **Save**. - :type plan: ~azure.mgmt.compute.v2017_12_01.models.Plan - :param upgrade_policy: The upgrade policy. - :type upgrade_policy: ~azure.mgmt.compute.v2017_12_01.models.UpgradePolicy - :param virtual_machine_profile: The virtual machine profile. - :type virtual_machine_profile: - ~azure.mgmt.compute.v2017_12_01.models.VirtualMachineScaleSetVMProfile - :ivar provisioning_state: The provisioning state, which only appears in - the response. - :vartype provisioning_state: str - :param overprovision: Specifies whether the Virtual Machine Scale Set - should be overprovisioned. - :type overprovision: bool - :ivar unique_id: Specifies the ID which uniquely identifies a Virtual - Machine Scale Set. - :vartype unique_id: str - :param single_placement_group: When true this limits the scale set to a - single placement group, of max size 100 virtual machines. - :type single_placement_group: bool - :param zone_balance: Whether to force strictly even Virtual Machine - distribution cross x-zones in case there is zone outage. - :type zone_balance: bool - :param platform_fault_domain_count: Fault Domain count for each placement - group. - :type platform_fault_domain_count: int - :param identity: The identity of the virtual machine scale set, if - configured. - :type identity: - ~azure.mgmt.compute.v2017_12_01.models.VirtualMachineScaleSetIdentity - :param zones: The virtual machine scale set zones. - :type zones: list[str] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - 'provisioning_state': {'readonly': True}, - 'unique_id': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'sku': {'key': 'sku', 'type': 'Sku'}, - 'plan': {'key': 'plan', 'type': 'Plan'}, - 'upgrade_policy': {'key': 'properties.upgradePolicy', 'type': 'UpgradePolicy'}, - 'virtual_machine_profile': {'key': 'properties.virtualMachineProfile', 'type': 'VirtualMachineScaleSetVMProfile'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'overprovision': {'key': 'properties.overprovision', 'type': 'bool'}, - 'unique_id': {'key': 'properties.uniqueId', 'type': 'str'}, - 'single_placement_group': {'key': 'properties.singlePlacementGroup', 'type': 'bool'}, - 'zone_balance': {'key': 'properties.zoneBalance', 'type': 'bool'}, - 'platform_fault_domain_count': {'key': 'properties.platformFaultDomainCount', 'type': 'int'}, - 'identity': {'key': 'identity', 'type': 'VirtualMachineScaleSetIdentity'}, - 'zones': {'key': 'zones', 'type': '[str]'}, - } - - def __init__(self, *, location: str, tags=None, sku=None, plan=None, upgrade_policy=None, virtual_machine_profile=None, overprovision: bool=None, single_placement_group: bool=None, zone_balance: bool=None, platform_fault_domain_count: int=None, identity=None, zones=None, **kwargs) -> None: - super(VirtualMachineScaleSet, self).__init__(location=location, tags=tags, **kwargs) - self.sku = sku - self.plan = plan - self.upgrade_policy = upgrade_policy - self.virtual_machine_profile = virtual_machine_profile - self.provisioning_state = None - self.overprovision = overprovision - self.unique_id = None - self.single_placement_group = single_placement_group - self.zone_balance = zone_balance - self.platform_fault_domain_count = platform_fault_domain_count - self.identity = identity - self.zones = zones diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/virtual_machine_scale_set_sku.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/virtual_machine_scale_set_sku.py deleted file mode 100644 index 50bf8810caf6..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/virtual_machine_scale_set_sku.py +++ /dev/null @@ -1,46 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineScaleSetSku(Model): - """Describes an available virtual machine scale set sku. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar resource_type: The type of resource the sku applies to. - :vartype resource_type: str - :ivar sku: The Sku. - :vartype sku: ~azure.mgmt.compute.v2017_12_01.models.Sku - :ivar capacity: Specifies the number of virtual machines in the scale set. - :vartype capacity: - ~azure.mgmt.compute.v2017_12_01.models.VirtualMachineScaleSetSkuCapacity - """ - - _validation = { - 'resource_type': {'readonly': True}, - 'sku': {'readonly': True}, - 'capacity': {'readonly': True}, - } - - _attribute_map = { - 'resource_type': {'key': 'resourceType', 'type': 'str'}, - 'sku': {'key': 'sku', 'type': 'Sku'}, - 'capacity': {'key': 'capacity', 'type': 'VirtualMachineScaleSetSkuCapacity'}, - } - - def __init__(self, **kwargs): - super(VirtualMachineScaleSetSku, self).__init__(**kwargs) - self.resource_type = None - self.sku = None - self.capacity = None diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/virtual_machine_scale_set_sku_capacity.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/virtual_machine_scale_set_sku_capacity.py deleted file mode 100644 index b2ce642033c1..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/virtual_machine_scale_set_sku_capacity.py +++ /dev/null @@ -1,52 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineScaleSetSkuCapacity(Model): - """Describes scaling information of a sku. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar minimum: The minimum capacity. - :vartype minimum: long - :ivar maximum: The maximum capacity that can be set. - :vartype maximum: long - :ivar default_capacity: The default capacity. - :vartype default_capacity: long - :ivar scale_type: The scale type applicable to the sku. Possible values - include: 'Automatic', 'None' - :vartype scale_type: str or - ~azure.mgmt.compute.v2017_12_01.models.VirtualMachineScaleSetSkuScaleType - """ - - _validation = { - 'minimum': {'readonly': True}, - 'maximum': {'readonly': True}, - 'default_capacity': {'readonly': True}, - 'scale_type': {'readonly': True}, - } - - _attribute_map = { - 'minimum': {'key': 'minimum', 'type': 'long'}, - 'maximum': {'key': 'maximum', 'type': 'long'}, - 'default_capacity': {'key': 'defaultCapacity', 'type': 'long'}, - 'scale_type': {'key': 'scaleType', 'type': 'VirtualMachineScaleSetSkuScaleType'}, - } - - def __init__(self, **kwargs): - super(VirtualMachineScaleSetSkuCapacity, self).__init__(**kwargs) - self.minimum = None - self.maximum = None - self.default_capacity = None - self.scale_type = None diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/virtual_machine_scale_set_sku_capacity_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/virtual_machine_scale_set_sku_capacity_py3.py deleted file mode 100644 index 35ecf5ec52f2..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/virtual_machine_scale_set_sku_capacity_py3.py +++ /dev/null @@ -1,52 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineScaleSetSkuCapacity(Model): - """Describes scaling information of a sku. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar minimum: The minimum capacity. - :vartype minimum: long - :ivar maximum: The maximum capacity that can be set. - :vartype maximum: long - :ivar default_capacity: The default capacity. - :vartype default_capacity: long - :ivar scale_type: The scale type applicable to the sku. Possible values - include: 'Automatic', 'None' - :vartype scale_type: str or - ~azure.mgmt.compute.v2017_12_01.models.VirtualMachineScaleSetSkuScaleType - """ - - _validation = { - 'minimum': {'readonly': True}, - 'maximum': {'readonly': True}, - 'default_capacity': {'readonly': True}, - 'scale_type': {'readonly': True}, - } - - _attribute_map = { - 'minimum': {'key': 'minimum', 'type': 'long'}, - 'maximum': {'key': 'maximum', 'type': 'long'}, - 'default_capacity': {'key': 'defaultCapacity', 'type': 'long'}, - 'scale_type': {'key': 'scaleType', 'type': 'VirtualMachineScaleSetSkuScaleType'}, - } - - def __init__(self, **kwargs) -> None: - super(VirtualMachineScaleSetSkuCapacity, self).__init__(**kwargs) - self.minimum = None - self.maximum = None - self.default_capacity = None - self.scale_type = None diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/virtual_machine_scale_set_sku_paged.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/virtual_machine_scale_set_sku_paged.py deleted file mode 100644 index 23d9023da8ee..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/virtual_machine_scale_set_sku_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class VirtualMachineScaleSetSkuPaged(Paged): - """ - A paging container for iterating over a list of :class:`VirtualMachineScaleSetSku ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[VirtualMachineScaleSetSku]'} - } - - def __init__(self, *args, **kwargs): - - super(VirtualMachineScaleSetSkuPaged, self).__init__(*args, **kwargs) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/virtual_machine_scale_set_sku_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/virtual_machine_scale_set_sku_py3.py deleted file mode 100644 index 54ff1a125be4..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/virtual_machine_scale_set_sku_py3.py +++ /dev/null @@ -1,46 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineScaleSetSku(Model): - """Describes an available virtual machine scale set sku. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar resource_type: The type of resource the sku applies to. - :vartype resource_type: str - :ivar sku: The Sku. - :vartype sku: ~azure.mgmt.compute.v2017_12_01.models.Sku - :ivar capacity: Specifies the number of virtual machines in the scale set. - :vartype capacity: - ~azure.mgmt.compute.v2017_12_01.models.VirtualMachineScaleSetSkuCapacity - """ - - _validation = { - 'resource_type': {'readonly': True}, - 'sku': {'readonly': True}, - 'capacity': {'readonly': True}, - } - - _attribute_map = { - 'resource_type': {'key': 'resourceType', 'type': 'str'}, - 'sku': {'key': 'sku', 'type': 'Sku'}, - 'capacity': {'key': 'capacity', 'type': 'VirtualMachineScaleSetSkuCapacity'}, - } - - def __init__(self, **kwargs) -> None: - super(VirtualMachineScaleSetSku, self).__init__(**kwargs) - self.resource_type = None - self.sku = None - self.capacity = None diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/virtual_machine_scale_set_storage_profile.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/virtual_machine_scale_set_storage_profile.py deleted file mode 100644 index 63c914868fd1..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/virtual_machine_scale_set_storage_profile.py +++ /dev/null @@ -1,49 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineScaleSetStorageProfile(Model): - """Describes a virtual machine scale set storage profile. - - :param image_reference: Specifies information about the image to use. You - can specify information about platform images, marketplace images, or - virtual machine images. This element is required when you want to use a - platform image, marketplace image, or virtual machine image, but is not - used in other creation operations. - :type image_reference: - ~azure.mgmt.compute.v2017_12_01.models.ImageReference - :param os_disk: Specifies information about the operating system disk used - by the virtual machines in the scale set.

    For more information - about disks, see [About disks and VHDs for Azure virtual - machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-about-disks-vhds?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). - :type os_disk: - ~azure.mgmt.compute.v2017_12_01.models.VirtualMachineScaleSetOSDisk - :param data_disks: Specifies the parameters that are used to add data - disks to the virtual machines in the scale set.

    For more - information about disks, see [About disks and VHDs for Azure virtual - machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-about-disks-vhds?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). - :type data_disks: - list[~azure.mgmt.compute.v2017_12_01.models.VirtualMachineScaleSetDataDisk] - """ - - _attribute_map = { - 'image_reference': {'key': 'imageReference', 'type': 'ImageReference'}, - 'os_disk': {'key': 'osDisk', 'type': 'VirtualMachineScaleSetOSDisk'}, - 'data_disks': {'key': 'dataDisks', 'type': '[VirtualMachineScaleSetDataDisk]'}, - } - - def __init__(self, **kwargs): - super(VirtualMachineScaleSetStorageProfile, self).__init__(**kwargs) - self.image_reference = kwargs.get('image_reference', None) - self.os_disk = kwargs.get('os_disk', None) - self.data_disks = kwargs.get('data_disks', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/virtual_machine_scale_set_storage_profile_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/virtual_machine_scale_set_storage_profile_py3.py deleted file mode 100644 index 403ef780b839..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/virtual_machine_scale_set_storage_profile_py3.py +++ /dev/null @@ -1,49 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineScaleSetStorageProfile(Model): - """Describes a virtual machine scale set storage profile. - - :param image_reference: Specifies information about the image to use. You - can specify information about platform images, marketplace images, or - virtual machine images. This element is required when you want to use a - platform image, marketplace image, or virtual machine image, but is not - used in other creation operations. - :type image_reference: - ~azure.mgmt.compute.v2017_12_01.models.ImageReference - :param os_disk: Specifies information about the operating system disk used - by the virtual machines in the scale set.

    For more information - about disks, see [About disks and VHDs for Azure virtual - machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-about-disks-vhds?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). - :type os_disk: - ~azure.mgmt.compute.v2017_12_01.models.VirtualMachineScaleSetOSDisk - :param data_disks: Specifies the parameters that are used to add data - disks to the virtual machines in the scale set.

    For more - information about disks, see [About disks and VHDs for Azure virtual - machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-about-disks-vhds?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). - :type data_disks: - list[~azure.mgmt.compute.v2017_12_01.models.VirtualMachineScaleSetDataDisk] - """ - - _attribute_map = { - 'image_reference': {'key': 'imageReference', 'type': 'ImageReference'}, - 'os_disk': {'key': 'osDisk', 'type': 'VirtualMachineScaleSetOSDisk'}, - 'data_disks': {'key': 'dataDisks', 'type': '[VirtualMachineScaleSetDataDisk]'}, - } - - def __init__(self, *, image_reference=None, os_disk=None, data_disks=None, **kwargs) -> None: - super(VirtualMachineScaleSetStorageProfile, self).__init__(**kwargs) - self.image_reference = image_reference - self.os_disk = os_disk - self.data_disks = data_disks diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/virtual_machine_scale_set_update.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/virtual_machine_scale_set_update.py deleted file mode 100644 index c2d51bd050ae..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/virtual_machine_scale_set_update.py +++ /dev/null @@ -1,61 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .update_resource import UpdateResource - - -class VirtualMachineScaleSetUpdate(UpdateResource): - """Describes a Virtual Machine Scale Set. - - :param tags: Resource tags - :type tags: dict[str, str] - :param sku: The virtual machine scale set sku. - :type sku: ~azure.mgmt.compute.v2017_12_01.models.Sku - :param plan: The purchase plan when deploying a virtual machine scale set - from VM Marketplace images. - :type plan: ~azure.mgmt.compute.v2017_12_01.models.Plan - :param upgrade_policy: The upgrade policy. - :type upgrade_policy: ~azure.mgmt.compute.v2017_12_01.models.UpgradePolicy - :param virtual_machine_profile: The virtual machine profile. - :type virtual_machine_profile: - ~azure.mgmt.compute.v2017_12_01.models.VirtualMachineScaleSetUpdateVMProfile - :param overprovision: Specifies whether the Virtual Machine Scale Set - should be overprovisioned. - :type overprovision: bool - :param single_placement_group: When true this limits the scale set to a - single placement group, of max size 100 virtual machines. - :type single_placement_group: bool - :param identity: The identity of the virtual machine scale set, if - configured. - :type identity: - ~azure.mgmt.compute.v2017_12_01.models.VirtualMachineScaleSetIdentity - """ - - _attribute_map = { - 'tags': {'key': 'tags', 'type': '{str}'}, - 'sku': {'key': 'sku', 'type': 'Sku'}, - 'plan': {'key': 'plan', 'type': 'Plan'}, - 'upgrade_policy': {'key': 'properties.upgradePolicy', 'type': 'UpgradePolicy'}, - 'virtual_machine_profile': {'key': 'properties.virtualMachineProfile', 'type': 'VirtualMachineScaleSetUpdateVMProfile'}, - 'overprovision': {'key': 'properties.overprovision', 'type': 'bool'}, - 'single_placement_group': {'key': 'properties.singlePlacementGroup', 'type': 'bool'}, - 'identity': {'key': 'identity', 'type': 'VirtualMachineScaleSetIdentity'}, - } - - def __init__(self, **kwargs): - super(VirtualMachineScaleSetUpdate, self).__init__(**kwargs) - self.sku = kwargs.get('sku', None) - self.plan = kwargs.get('plan', None) - self.upgrade_policy = kwargs.get('upgrade_policy', None) - self.virtual_machine_profile = kwargs.get('virtual_machine_profile', None) - self.overprovision = kwargs.get('overprovision', None) - self.single_placement_group = kwargs.get('single_placement_group', None) - self.identity = kwargs.get('identity', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/virtual_machine_scale_set_update_ip_configuration.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/virtual_machine_scale_set_update_ip_configuration.py deleted file mode 100644 index 576e62097dc5..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/virtual_machine_scale_set_update_ip_configuration.py +++ /dev/null @@ -1,71 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .sub_resource import SubResource - - -class VirtualMachineScaleSetUpdateIPConfiguration(SubResource): - """Describes a virtual machine scale set network profile's IP configuration. - - :param id: Resource Id - :type id: str - :param name: The IP configuration name. - :type name: str - :param subnet: The subnet. - :type subnet: ~azure.mgmt.compute.v2017_12_01.models.ApiEntityReference - :param primary: Specifies the primary IP Configuration in case the network - interface has more than one IP Configuration. - :type primary: bool - :param public_ip_address_configuration: The publicIPAddressConfiguration. - :type public_ip_address_configuration: - ~azure.mgmt.compute.v2017_12_01.models.VirtualMachineScaleSetUpdatePublicIPAddressConfiguration - :param private_ip_address_version: Available from Api-Version 2017-03-30 - onwards, it represents whether the specific ipconfiguration is IPv4 or - IPv6. Default is taken as IPv4. Possible values are: 'IPv4' and 'IPv6'. - Possible values include: 'IPv4', 'IPv6' - :type private_ip_address_version: str or - ~azure.mgmt.compute.v2017_12_01.models.IPVersion - :param application_gateway_backend_address_pools: The application gateway - backend address pools. - :type application_gateway_backend_address_pools: - list[~azure.mgmt.compute.v2017_12_01.models.SubResource] - :param load_balancer_backend_address_pools: The load balancer backend - address pools. - :type load_balancer_backend_address_pools: - list[~azure.mgmt.compute.v2017_12_01.models.SubResource] - :param load_balancer_inbound_nat_pools: The load balancer inbound nat - pools. - :type load_balancer_inbound_nat_pools: - list[~azure.mgmt.compute.v2017_12_01.models.SubResource] - """ - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'subnet': {'key': 'properties.subnet', 'type': 'ApiEntityReference'}, - 'primary': {'key': 'properties.primary', 'type': 'bool'}, - 'public_ip_address_configuration': {'key': 'properties.publicIPAddressConfiguration', 'type': 'VirtualMachineScaleSetUpdatePublicIPAddressConfiguration'}, - 'private_ip_address_version': {'key': 'properties.privateIPAddressVersion', 'type': 'str'}, - 'application_gateway_backend_address_pools': {'key': 'properties.applicationGatewayBackendAddressPools', 'type': '[SubResource]'}, - 'load_balancer_backend_address_pools': {'key': 'properties.loadBalancerBackendAddressPools', 'type': '[SubResource]'}, - 'load_balancer_inbound_nat_pools': {'key': 'properties.loadBalancerInboundNatPools', 'type': '[SubResource]'}, - } - - def __init__(self, **kwargs): - super(VirtualMachineScaleSetUpdateIPConfiguration, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.subnet = kwargs.get('subnet', None) - self.primary = kwargs.get('primary', None) - self.public_ip_address_configuration = kwargs.get('public_ip_address_configuration', None) - self.private_ip_address_version = kwargs.get('private_ip_address_version', None) - self.application_gateway_backend_address_pools = kwargs.get('application_gateway_backend_address_pools', None) - self.load_balancer_backend_address_pools = kwargs.get('load_balancer_backend_address_pools', None) - self.load_balancer_inbound_nat_pools = kwargs.get('load_balancer_inbound_nat_pools', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/virtual_machine_scale_set_update_ip_configuration_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/virtual_machine_scale_set_update_ip_configuration_py3.py deleted file mode 100644 index 508b342da128..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/virtual_machine_scale_set_update_ip_configuration_py3.py +++ /dev/null @@ -1,71 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .sub_resource_py3 import SubResource - - -class VirtualMachineScaleSetUpdateIPConfiguration(SubResource): - """Describes a virtual machine scale set network profile's IP configuration. - - :param id: Resource Id - :type id: str - :param name: The IP configuration name. - :type name: str - :param subnet: The subnet. - :type subnet: ~azure.mgmt.compute.v2017_12_01.models.ApiEntityReference - :param primary: Specifies the primary IP Configuration in case the network - interface has more than one IP Configuration. - :type primary: bool - :param public_ip_address_configuration: The publicIPAddressConfiguration. - :type public_ip_address_configuration: - ~azure.mgmt.compute.v2017_12_01.models.VirtualMachineScaleSetUpdatePublicIPAddressConfiguration - :param private_ip_address_version: Available from Api-Version 2017-03-30 - onwards, it represents whether the specific ipconfiguration is IPv4 or - IPv6. Default is taken as IPv4. Possible values are: 'IPv4' and 'IPv6'. - Possible values include: 'IPv4', 'IPv6' - :type private_ip_address_version: str or - ~azure.mgmt.compute.v2017_12_01.models.IPVersion - :param application_gateway_backend_address_pools: The application gateway - backend address pools. - :type application_gateway_backend_address_pools: - list[~azure.mgmt.compute.v2017_12_01.models.SubResource] - :param load_balancer_backend_address_pools: The load balancer backend - address pools. - :type load_balancer_backend_address_pools: - list[~azure.mgmt.compute.v2017_12_01.models.SubResource] - :param load_balancer_inbound_nat_pools: The load balancer inbound nat - pools. - :type load_balancer_inbound_nat_pools: - list[~azure.mgmt.compute.v2017_12_01.models.SubResource] - """ - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'subnet': {'key': 'properties.subnet', 'type': 'ApiEntityReference'}, - 'primary': {'key': 'properties.primary', 'type': 'bool'}, - 'public_ip_address_configuration': {'key': 'properties.publicIPAddressConfiguration', 'type': 'VirtualMachineScaleSetUpdatePublicIPAddressConfiguration'}, - 'private_ip_address_version': {'key': 'properties.privateIPAddressVersion', 'type': 'str'}, - 'application_gateway_backend_address_pools': {'key': 'properties.applicationGatewayBackendAddressPools', 'type': '[SubResource]'}, - 'load_balancer_backend_address_pools': {'key': 'properties.loadBalancerBackendAddressPools', 'type': '[SubResource]'}, - 'load_balancer_inbound_nat_pools': {'key': 'properties.loadBalancerInboundNatPools', 'type': '[SubResource]'}, - } - - def __init__(self, *, id: str=None, name: str=None, subnet=None, primary: bool=None, public_ip_address_configuration=None, private_ip_address_version=None, application_gateway_backend_address_pools=None, load_balancer_backend_address_pools=None, load_balancer_inbound_nat_pools=None, **kwargs) -> None: - super(VirtualMachineScaleSetUpdateIPConfiguration, self).__init__(id=id, **kwargs) - self.name = name - self.subnet = subnet - self.primary = primary - self.public_ip_address_configuration = public_ip_address_configuration - self.private_ip_address_version = private_ip_address_version - self.application_gateway_backend_address_pools = application_gateway_backend_address_pools - self.load_balancer_backend_address_pools = load_balancer_backend_address_pools - self.load_balancer_inbound_nat_pools = load_balancer_inbound_nat_pools diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/virtual_machine_scale_set_update_network_configuration.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/virtual_machine_scale_set_update_network_configuration.py deleted file mode 100644 index 723195aacb02..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/virtual_machine_scale_set_update_network_configuration.py +++ /dev/null @@ -1,61 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .sub_resource import SubResource - - -class VirtualMachineScaleSetUpdateNetworkConfiguration(SubResource): - """Describes a virtual machine scale set network profile's network - configurations. - - :param id: Resource Id - :type id: str - :param name: The network configuration name. - :type name: str - :param primary: Whether this is a primary NIC on a virtual machine. - :type primary: bool - :param enable_accelerated_networking: Specifies whether the network - interface is accelerated networking-enabled. - :type enable_accelerated_networking: bool - :param network_security_group: The network security group. - :type network_security_group: - ~azure.mgmt.compute.v2017_12_01.models.SubResource - :param dns_settings: The dns settings to be applied on the network - interfaces. - :type dns_settings: - ~azure.mgmt.compute.v2017_12_01.models.VirtualMachineScaleSetNetworkConfigurationDnsSettings - :param ip_configurations: The virtual machine scale set IP Configuration. - :type ip_configurations: - list[~azure.mgmt.compute.v2017_12_01.models.VirtualMachineScaleSetUpdateIPConfiguration] - :param enable_ip_forwarding: Whether IP forwarding enabled on this NIC. - :type enable_ip_forwarding: bool - """ - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'primary': {'key': 'properties.primary', 'type': 'bool'}, - 'enable_accelerated_networking': {'key': 'properties.enableAcceleratedNetworking', 'type': 'bool'}, - 'network_security_group': {'key': 'properties.networkSecurityGroup', 'type': 'SubResource'}, - 'dns_settings': {'key': 'properties.dnsSettings', 'type': 'VirtualMachineScaleSetNetworkConfigurationDnsSettings'}, - 'ip_configurations': {'key': 'properties.ipConfigurations', 'type': '[VirtualMachineScaleSetUpdateIPConfiguration]'}, - 'enable_ip_forwarding': {'key': 'properties.enableIPForwarding', 'type': 'bool'}, - } - - def __init__(self, **kwargs): - super(VirtualMachineScaleSetUpdateNetworkConfiguration, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.primary = kwargs.get('primary', None) - self.enable_accelerated_networking = kwargs.get('enable_accelerated_networking', None) - self.network_security_group = kwargs.get('network_security_group', None) - self.dns_settings = kwargs.get('dns_settings', None) - self.ip_configurations = kwargs.get('ip_configurations', None) - self.enable_ip_forwarding = kwargs.get('enable_ip_forwarding', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/virtual_machine_scale_set_update_network_configuration_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/virtual_machine_scale_set_update_network_configuration_py3.py deleted file mode 100644 index cccdbeb9c314..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/virtual_machine_scale_set_update_network_configuration_py3.py +++ /dev/null @@ -1,61 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .sub_resource_py3 import SubResource - - -class VirtualMachineScaleSetUpdateNetworkConfiguration(SubResource): - """Describes a virtual machine scale set network profile's network - configurations. - - :param id: Resource Id - :type id: str - :param name: The network configuration name. - :type name: str - :param primary: Whether this is a primary NIC on a virtual machine. - :type primary: bool - :param enable_accelerated_networking: Specifies whether the network - interface is accelerated networking-enabled. - :type enable_accelerated_networking: bool - :param network_security_group: The network security group. - :type network_security_group: - ~azure.mgmt.compute.v2017_12_01.models.SubResource - :param dns_settings: The dns settings to be applied on the network - interfaces. - :type dns_settings: - ~azure.mgmt.compute.v2017_12_01.models.VirtualMachineScaleSetNetworkConfigurationDnsSettings - :param ip_configurations: The virtual machine scale set IP Configuration. - :type ip_configurations: - list[~azure.mgmt.compute.v2017_12_01.models.VirtualMachineScaleSetUpdateIPConfiguration] - :param enable_ip_forwarding: Whether IP forwarding enabled on this NIC. - :type enable_ip_forwarding: bool - """ - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'primary': {'key': 'properties.primary', 'type': 'bool'}, - 'enable_accelerated_networking': {'key': 'properties.enableAcceleratedNetworking', 'type': 'bool'}, - 'network_security_group': {'key': 'properties.networkSecurityGroup', 'type': 'SubResource'}, - 'dns_settings': {'key': 'properties.dnsSettings', 'type': 'VirtualMachineScaleSetNetworkConfigurationDnsSettings'}, - 'ip_configurations': {'key': 'properties.ipConfigurations', 'type': '[VirtualMachineScaleSetUpdateIPConfiguration]'}, - 'enable_ip_forwarding': {'key': 'properties.enableIPForwarding', 'type': 'bool'}, - } - - def __init__(self, *, id: str=None, name: str=None, primary: bool=None, enable_accelerated_networking: bool=None, network_security_group=None, dns_settings=None, ip_configurations=None, enable_ip_forwarding: bool=None, **kwargs) -> None: - super(VirtualMachineScaleSetUpdateNetworkConfiguration, self).__init__(id=id, **kwargs) - self.name = name - self.primary = primary - self.enable_accelerated_networking = enable_accelerated_networking - self.network_security_group = network_security_group - self.dns_settings = dns_settings - self.ip_configurations = ip_configurations - self.enable_ip_forwarding = enable_ip_forwarding diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/virtual_machine_scale_set_update_network_profile.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/virtual_machine_scale_set_update_network_profile.py deleted file mode 100644 index 8cb5ce297e89..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/virtual_machine_scale_set_update_network_profile.py +++ /dev/null @@ -1,30 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineScaleSetUpdateNetworkProfile(Model): - """Describes a virtual machine scale set network profile. - - :param network_interface_configurations: The list of network - configurations. - :type network_interface_configurations: - list[~azure.mgmt.compute.v2017_12_01.models.VirtualMachineScaleSetUpdateNetworkConfiguration] - """ - - _attribute_map = { - 'network_interface_configurations': {'key': 'networkInterfaceConfigurations', 'type': '[VirtualMachineScaleSetUpdateNetworkConfiguration]'}, - } - - def __init__(self, **kwargs): - super(VirtualMachineScaleSetUpdateNetworkProfile, self).__init__(**kwargs) - self.network_interface_configurations = kwargs.get('network_interface_configurations', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/virtual_machine_scale_set_update_network_profile_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/virtual_machine_scale_set_update_network_profile_py3.py deleted file mode 100644 index db9170b1e1e9..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/virtual_machine_scale_set_update_network_profile_py3.py +++ /dev/null @@ -1,30 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineScaleSetUpdateNetworkProfile(Model): - """Describes a virtual machine scale set network profile. - - :param network_interface_configurations: The list of network - configurations. - :type network_interface_configurations: - list[~azure.mgmt.compute.v2017_12_01.models.VirtualMachineScaleSetUpdateNetworkConfiguration] - """ - - _attribute_map = { - 'network_interface_configurations': {'key': 'networkInterfaceConfigurations', 'type': '[VirtualMachineScaleSetUpdateNetworkConfiguration]'}, - } - - def __init__(self, *, network_interface_configurations=None, **kwargs) -> None: - super(VirtualMachineScaleSetUpdateNetworkProfile, self).__init__(**kwargs) - self.network_interface_configurations = network_interface_configurations diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/virtual_machine_scale_set_update_os_disk.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/virtual_machine_scale_set_update_os_disk.py deleted file mode 100644 index 82ba18002869..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/virtual_machine_scale_set_update_os_disk.py +++ /dev/null @@ -1,50 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineScaleSetUpdateOSDisk(Model): - """Describes virtual machine scale set operating system disk Update Object. - This should be used for Updating VMSS OS Disk. - - :param caching: The caching type. Possible values include: 'None', - 'ReadOnly', 'ReadWrite' - :type caching: str or ~azure.mgmt.compute.v2017_12_01.models.CachingTypes - :param write_accelerator_enabled: Specifies whether writeAccelerator - should be enabled or disabled on the disk. - :type write_accelerator_enabled: bool - :param image: The Source User Image VirtualHardDisk. This VirtualHardDisk - will be copied before using it to attach to the Virtual Machine. If - SourceImage is provided, the destination VirtualHardDisk should not exist. - :type image: ~azure.mgmt.compute.v2017_12_01.models.VirtualHardDisk - :param vhd_containers: The list of virtual hard disk container uris. - :type vhd_containers: list[str] - :param managed_disk: The managed disk parameters. - :type managed_disk: - ~azure.mgmt.compute.v2017_12_01.models.VirtualMachineScaleSetManagedDiskParameters - """ - - _attribute_map = { - 'caching': {'key': 'caching', 'type': 'CachingTypes'}, - 'write_accelerator_enabled': {'key': 'writeAcceleratorEnabled', 'type': 'bool'}, - 'image': {'key': 'image', 'type': 'VirtualHardDisk'}, - 'vhd_containers': {'key': 'vhdContainers', 'type': '[str]'}, - 'managed_disk': {'key': 'managedDisk', 'type': 'VirtualMachineScaleSetManagedDiskParameters'}, - } - - def __init__(self, **kwargs): - super(VirtualMachineScaleSetUpdateOSDisk, self).__init__(**kwargs) - self.caching = kwargs.get('caching', None) - self.write_accelerator_enabled = kwargs.get('write_accelerator_enabled', None) - self.image = kwargs.get('image', None) - self.vhd_containers = kwargs.get('vhd_containers', None) - self.managed_disk = kwargs.get('managed_disk', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/virtual_machine_scale_set_update_os_disk_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/virtual_machine_scale_set_update_os_disk_py3.py deleted file mode 100644 index c6639ba8daf1..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/virtual_machine_scale_set_update_os_disk_py3.py +++ /dev/null @@ -1,50 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineScaleSetUpdateOSDisk(Model): - """Describes virtual machine scale set operating system disk Update Object. - This should be used for Updating VMSS OS Disk. - - :param caching: The caching type. Possible values include: 'None', - 'ReadOnly', 'ReadWrite' - :type caching: str or ~azure.mgmt.compute.v2017_12_01.models.CachingTypes - :param write_accelerator_enabled: Specifies whether writeAccelerator - should be enabled or disabled on the disk. - :type write_accelerator_enabled: bool - :param image: The Source User Image VirtualHardDisk. This VirtualHardDisk - will be copied before using it to attach to the Virtual Machine. If - SourceImage is provided, the destination VirtualHardDisk should not exist. - :type image: ~azure.mgmt.compute.v2017_12_01.models.VirtualHardDisk - :param vhd_containers: The list of virtual hard disk container uris. - :type vhd_containers: list[str] - :param managed_disk: The managed disk parameters. - :type managed_disk: - ~azure.mgmt.compute.v2017_12_01.models.VirtualMachineScaleSetManagedDiskParameters - """ - - _attribute_map = { - 'caching': {'key': 'caching', 'type': 'CachingTypes'}, - 'write_accelerator_enabled': {'key': 'writeAcceleratorEnabled', 'type': 'bool'}, - 'image': {'key': 'image', 'type': 'VirtualHardDisk'}, - 'vhd_containers': {'key': 'vhdContainers', 'type': '[str]'}, - 'managed_disk': {'key': 'managedDisk', 'type': 'VirtualMachineScaleSetManagedDiskParameters'}, - } - - def __init__(self, *, caching=None, write_accelerator_enabled: bool=None, image=None, vhd_containers=None, managed_disk=None, **kwargs) -> None: - super(VirtualMachineScaleSetUpdateOSDisk, self).__init__(**kwargs) - self.caching = caching - self.write_accelerator_enabled = write_accelerator_enabled - self.image = image - self.vhd_containers = vhd_containers - self.managed_disk = managed_disk diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/virtual_machine_scale_set_update_os_profile.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/virtual_machine_scale_set_update_os_profile.py deleted file mode 100644 index ce463ac6d721..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/virtual_machine_scale_set_update_os_profile.py +++ /dev/null @@ -1,43 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineScaleSetUpdateOSProfile(Model): - """Describes a virtual machine scale set OS profile. - - :param custom_data: A base-64 encoded string of custom data. - :type custom_data: str - :param windows_configuration: The Windows Configuration of the OS profile. - :type windows_configuration: - ~azure.mgmt.compute.v2017_12_01.models.WindowsConfiguration - :param linux_configuration: The Linux Configuration of the OS profile. - :type linux_configuration: - ~azure.mgmt.compute.v2017_12_01.models.LinuxConfiguration - :param secrets: The List of certificates for addition to the VM. - :type secrets: - list[~azure.mgmt.compute.v2017_12_01.models.VaultSecretGroup] - """ - - _attribute_map = { - 'custom_data': {'key': 'customData', 'type': 'str'}, - 'windows_configuration': {'key': 'windowsConfiguration', 'type': 'WindowsConfiguration'}, - 'linux_configuration': {'key': 'linuxConfiguration', 'type': 'LinuxConfiguration'}, - 'secrets': {'key': 'secrets', 'type': '[VaultSecretGroup]'}, - } - - def __init__(self, **kwargs): - super(VirtualMachineScaleSetUpdateOSProfile, self).__init__(**kwargs) - self.custom_data = kwargs.get('custom_data', None) - self.windows_configuration = kwargs.get('windows_configuration', None) - self.linux_configuration = kwargs.get('linux_configuration', None) - self.secrets = kwargs.get('secrets', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/virtual_machine_scale_set_update_os_profile_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/virtual_machine_scale_set_update_os_profile_py3.py deleted file mode 100644 index 24a5688fdbd4..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/virtual_machine_scale_set_update_os_profile_py3.py +++ /dev/null @@ -1,43 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineScaleSetUpdateOSProfile(Model): - """Describes a virtual machine scale set OS profile. - - :param custom_data: A base-64 encoded string of custom data. - :type custom_data: str - :param windows_configuration: The Windows Configuration of the OS profile. - :type windows_configuration: - ~azure.mgmt.compute.v2017_12_01.models.WindowsConfiguration - :param linux_configuration: The Linux Configuration of the OS profile. - :type linux_configuration: - ~azure.mgmt.compute.v2017_12_01.models.LinuxConfiguration - :param secrets: The List of certificates for addition to the VM. - :type secrets: - list[~azure.mgmt.compute.v2017_12_01.models.VaultSecretGroup] - """ - - _attribute_map = { - 'custom_data': {'key': 'customData', 'type': 'str'}, - 'windows_configuration': {'key': 'windowsConfiguration', 'type': 'WindowsConfiguration'}, - 'linux_configuration': {'key': 'linuxConfiguration', 'type': 'LinuxConfiguration'}, - 'secrets': {'key': 'secrets', 'type': '[VaultSecretGroup]'}, - } - - def __init__(self, *, custom_data: str=None, windows_configuration=None, linux_configuration=None, secrets=None, **kwargs) -> None: - super(VirtualMachineScaleSetUpdateOSProfile, self).__init__(**kwargs) - self.custom_data = custom_data - self.windows_configuration = windows_configuration - self.linux_configuration = linux_configuration - self.secrets = secrets diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/virtual_machine_scale_set_update_public_ip_address_configuration.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/virtual_machine_scale_set_update_public_ip_address_configuration.py deleted file mode 100644 index f4ef4083f27f..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/virtual_machine_scale_set_update_public_ip_address_configuration.py +++ /dev/null @@ -1,39 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineScaleSetUpdatePublicIPAddressConfiguration(Model): - """Describes a virtual machines scale set IP Configuration's PublicIPAddress - configuration. - - :param name: The publicIP address configuration name. - :type name: str - :param idle_timeout_in_minutes: The idle timeout of the public IP address. - :type idle_timeout_in_minutes: int - :param dns_settings: The dns settings to be applied on the publicIP - addresses . - :type dns_settings: - ~azure.mgmt.compute.v2017_12_01.models.VirtualMachineScaleSetPublicIPAddressConfigurationDnsSettings - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'idle_timeout_in_minutes': {'key': 'properties.idleTimeoutInMinutes', 'type': 'int'}, - 'dns_settings': {'key': 'properties.dnsSettings', 'type': 'VirtualMachineScaleSetPublicIPAddressConfigurationDnsSettings'}, - } - - def __init__(self, **kwargs): - super(VirtualMachineScaleSetUpdatePublicIPAddressConfiguration, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.idle_timeout_in_minutes = kwargs.get('idle_timeout_in_minutes', None) - self.dns_settings = kwargs.get('dns_settings', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/virtual_machine_scale_set_update_public_ip_address_configuration_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/virtual_machine_scale_set_update_public_ip_address_configuration_py3.py deleted file mode 100644 index 68dff9172cd6..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/virtual_machine_scale_set_update_public_ip_address_configuration_py3.py +++ /dev/null @@ -1,39 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineScaleSetUpdatePublicIPAddressConfiguration(Model): - """Describes a virtual machines scale set IP Configuration's PublicIPAddress - configuration. - - :param name: The publicIP address configuration name. - :type name: str - :param idle_timeout_in_minutes: The idle timeout of the public IP address. - :type idle_timeout_in_minutes: int - :param dns_settings: The dns settings to be applied on the publicIP - addresses . - :type dns_settings: - ~azure.mgmt.compute.v2017_12_01.models.VirtualMachineScaleSetPublicIPAddressConfigurationDnsSettings - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'idle_timeout_in_minutes': {'key': 'properties.idleTimeoutInMinutes', 'type': 'int'}, - 'dns_settings': {'key': 'properties.dnsSettings', 'type': 'VirtualMachineScaleSetPublicIPAddressConfigurationDnsSettings'}, - } - - def __init__(self, *, name: str=None, idle_timeout_in_minutes: int=None, dns_settings=None, **kwargs) -> None: - super(VirtualMachineScaleSetUpdatePublicIPAddressConfiguration, self).__init__(**kwargs) - self.name = name - self.idle_timeout_in_minutes = idle_timeout_in_minutes - self.dns_settings = dns_settings diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/virtual_machine_scale_set_update_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/virtual_machine_scale_set_update_py3.py deleted file mode 100644 index cbcb433d0173..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/virtual_machine_scale_set_update_py3.py +++ /dev/null @@ -1,61 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .update_resource_py3 import UpdateResource - - -class VirtualMachineScaleSetUpdate(UpdateResource): - """Describes a Virtual Machine Scale Set. - - :param tags: Resource tags - :type tags: dict[str, str] - :param sku: The virtual machine scale set sku. - :type sku: ~azure.mgmt.compute.v2017_12_01.models.Sku - :param plan: The purchase plan when deploying a virtual machine scale set - from VM Marketplace images. - :type plan: ~azure.mgmt.compute.v2017_12_01.models.Plan - :param upgrade_policy: The upgrade policy. - :type upgrade_policy: ~azure.mgmt.compute.v2017_12_01.models.UpgradePolicy - :param virtual_machine_profile: The virtual machine profile. - :type virtual_machine_profile: - ~azure.mgmt.compute.v2017_12_01.models.VirtualMachineScaleSetUpdateVMProfile - :param overprovision: Specifies whether the Virtual Machine Scale Set - should be overprovisioned. - :type overprovision: bool - :param single_placement_group: When true this limits the scale set to a - single placement group, of max size 100 virtual machines. - :type single_placement_group: bool - :param identity: The identity of the virtual machine scale set, if - configured. - :type identity: - ~azure.mgmt.compute.v2017_12_01.models.VirtualMachineScaleSetIdentity - """ - - _attribute_map = { - 'tags': {'key': 'tags', 'type': '{str}'}, - 'sku': {'key': 'sku', 'type': 'Sku'}, - 'plan': {'key': 'plan', 'type': 'Plan'}, - 'upgrade_policy': {'key': 'properties.upgradePolicy', 'type': 'UpgradePolicy'}, - 'virtual_machine_profile': {'key': 'properties.virtualMachineProfile', 'type': 'VirtualMachineScaleSetUpdateVMProfile'}, - 'overprovision': {'key': 'properties.overprovision', 'type': 'bool'}, - 'single_placement_group': {'key': 'properties.singlePlacementGroup', 'type': 'bool'}, - 'identity': {'key': 'identity', 'type': 'VirtualMachineScaleSetIdentity'}, - } - - def __init__(self, *, tags=None, sku=None, plan=None, upgrade_policy=None, virtual_machine_profile=None, overprovision: bool=None, single_placement_group: bool=None, identity=None, **kwargs) -> None: - super(VirtualMachineScaleSetUpdate, self).__init__(tags=tags, **kwargs) - self.sku = sku - self.plan = plan - self.upgrade_policy = upgrade_policy - self.virtual_machine_profile = virtual_machine_profile - self.overprovision = overprovision - self.single_placement_group = single_placement_group - self.identity = identity diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/virtual_machine_scale_set_update_storage_profile.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/virtual_machine_scale_set_update_storage_profile.py deleted file mode 100644 index 24718c0f5731..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/virtual_machine_scale_set_update_storage_profile.py +++ /dev/null @@ -1,39 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineScaleSetUpdateStorageProfile(Model): - """Describes a virtual machine scale set storage profile. - - :param image_reference: The image reference. - :type image_reference: - ~azure.mgmt.compute.v2017_12_01.models.ImageReference - :param os_disk: The OS disk. - :type os_disk: - ~azure.mgmt.compute.v2017_12_01.models.VirtualMachineScaleSetUpdateOSDisk - :param data_disks: The data disks. - :type data_disks: - list[~azure.mgmt.compute.v2017_12_01.models.VirtualMachineScaleSetDataDisk] - """ - - _attribute_map = { - 'image_reference': {'key': 'imageReference', 'type': 'ImageReference'}, - 'os_disk': {'key': 'osDisk', 'type': 'VirtualMachineScaleSetUpdateOSDisk'}, - 'data_disks': {'key': 'dataDisks', 'type': '[VirtualMachineScaleSetDataDisk]'}, - } - - def __init__(self, **kwargs): - super(VirtualMachineScaleSetUpdateStorageProfile, self).__init__(**kwargs) - self.image_reference = kwargs.get('image_reference', None) - self.os_disk = kwargs.get('os_disk', None) - self.data_disks = kwargs.get('data_disks', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/virtual_machine_scale_set_update_storage_profile_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/virtual_machine_scale_set_update_storage_profile_py3.py deleted file mode 100644 index d2ace5b6fd53..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/virtual_machine_scale_set_update_storage_profile_py3.py +++ /dev/null @@ -1,39 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineScaleSetUpdateStorageProfile(Model): - """Describes a virtual machine scale set storage profile. - - :param image_reference: The image reference. - :type image_reference: - ~azure.mgmt.compute.v2017_12_01.models.ImageReference - :param os_disk: The OS disk. - :type os_disk: - ~azure.mgmt.compute.v2017_12_01.models.VirtualMachineScaleSetUpdateOSDisk - :param data_disks: The data disks. - :type data_disks: - list[~azure.mgmt.compute.v2017_12_01.models.VirtualMachineScaleSetDataDisk] - """ - - _attribute_map = { - 'image_reference': {'key': 'imageReference', 'type': 'ImageReference'}, - 'os_disk': {'key': 'osDisk', 'type': 'VirtualMachineScaleSetUpdateOSDisk'}, - 'data_disks': {'key': 'dataDisks', 'type': '[VirtualMachineScaleSetDataDisk]'}, - } - - def __init__(self, *, image_reference=None, os_disk=None, data_disks=None, **kwargs) -> None: - super(VirtualMachineScaleSetUpdateStorageProfile, self).__init__(**kwargs) - self.image_reference = image_reference - self.os_disk = os_disk - self.data_disks = data_disks diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/virtual_machine_scale_set_update_vm_profile.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/virtual_machine_scale_set_update_vm_profile.py deleted file mode 100644 index 40c07f8708cd..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/virtual_machine_scale_set_update_vm_profile.py +++ /dev/null @@ -1,55 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineScaleSetUpdateVMProfile(Model): - """Describes a virtual machine scale set virtual machine profile. - - :param os_profile: The virtual machine scale set OS profile. - :type os_profile: - ~azure.mgmt.compute.v2017_12_01.models.VirtualMachineScaleSetUpdateOSProfile - :param storage_profile: The virtual machine scale set storage profile. - :type storage_profile: - ~azure.mgmt.compute.v2017_12_01.models.VirtualMachineScaleSetUpdateStorageProfile - :param network_profile: The virtual machine scale set network profile. - :type network_profile: - ~azure.mgmt.compute.v2017_12_01.models.VirtualMachineScaleSetUpdateNetworkProfile - :param diagnostics_profile: The virtual machine scale set diagnostics - profile. - :type diagnostics_profile: - ~azure.mgmt.compute.v2017_12_01.models.DiagnosticsProfile - :param extension_profile: The virtual machine scale set extension profile. - :type extension_profile: - ~azure.mgmt.compute.v2017_12_01.models.VirtualMachineScaleSetExtensionProfile - :param license_type: The license type, which is for bring your own license - scenario. - :type license_type: str - """ - - _attribute_map = { - 'os_profile': {'key': 'osProfile', 'type': 'VirtualMachineScaleSetUpdateOSProfile'}, - 'storage_profile': {'key': 'storageProfile', 'type': 'VirtualMachineScaleSetUpdateStorageProfile'}, - 'network_profile': {'key': 'networkProfile', 'type': 'VirtualMachineScaleSetUpdateNetworkProfile'}, - 'diagnostics_profile': {'key': 'diagnosticsProfile', 'type': 'DiagnosticsProfile'}, - 'extension_profile': {'key': 'extensionProfile', 'type': 'VirtualMachineScaleSetExtensionProfile'}, - 'license_type': {'key': 'licenseType', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(VirtualMachineScaleSetUpdateVMProfile, self).__init__(**kwargs) - self.os_profile = kwargs.get('os_profile', None) - self.storage_profile = kwargs.get('storage_profile', None) - self.network_profile = kwargs.get('network_profile', None) - self.diagnostics_profile = kwargs.get('diagnostics_profile', None) - self.extension_profile = kwargs.get('extension_profile', None) - self.license_type = kwargs.get('license_type', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/virtual_machine_scale_set_update_vm_profile_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/virtual_machine_scale_set_update_vm_profile_py3.py deleted file mode 100644 index c1f00a811741..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/virtual_machine_scale_set_update_vm_profile_py3.py +++ /dev/null @@ -1,55 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineScaleSetUpdateVMProfile(Model): - """Describes a virtual machine scale set virtual machine profile. - - :param os_profile: The virtual machine scale set OS profile. - :type os_profile: - ~azure.mgmt.compute.v2017_12_01.models.VirtualMachineScaleSetUpdateOSProfile - :param storage_profile: The virtual machine scale set storage profile. - :type storage_profile: - ~azure.mgmt.compute.v2017_12_01.models.VirtualMachineScaleSetUpdateStorageProfile - :param network_profile: The virtual machine scale set network profile. - :type network_profile: - ~azure.mgmt.compute.v2017_12_01.models.VirtualMachineScaleSetUpdateNetworkProfile - :param diagnostics_profile: The virtual machine scale set diagnostics - profile. - :type diagnostics_profile: - ~azure.mgmt.compute.v2017_12_01.models.DiagnosticsProfile - :param extension_profile: The virtual machine scale set extension profile. - :type extension_profile: - ~azure.mgmt.compute.v2017_12_01.models.VirtualMachineScaleSetExtensionProfile - :param license_type: The license type, which is for bring your own license - scenario. - :type license_type: str - """ - - _attribute_map = { - 'os_profile': {'key': 'osProfile', 'type': 'VirtualMachineScaleSetUpdateOSProfile'}, - 'storage_profile': {'key': 'storageProfile', 'type': 'VirtualMachineScaleSetUpdateStorageProfile'}, - 'network_profile': {'key': 'networkProfile', 'type': 'VirtualMachineScaleSetUpdateNetworkProfile'}, - 'diagnostics_profile': {'key': 'diagnosticsProfile', 'type': 'DiagnosticsProfile'}, - 'extension_profile': {'key': 'extensionProfile', 'type': 'VirtualMachineScaleSetExtensionProfile'}, - 'license_type': {'key': 'licenseType', 'type': 'str'}, - } - - def __init__(self, *, os_profile=None, storage_profile=None, network_profile=None, diagnostics_profile=None, extension_profile=None, license_type: str=None, **kwargs) -> None: - super(VirtualMachineScaleSetUpdateVMProfile, self).__init__(**kwargs) - self.os_profile = os_profile - self.storage_profile = storage_profile - self.network_profile = network_profile - self.diagnostics_profile = diagnostics_profile - self.extension_profile = extension_profile - self.license_type = license_type diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/virtual_machine_scale_set_vm.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/virtual_machine_scale_set_vm.py deleted file mode 100644 index 880843bffc01..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/virtual_machine_scale_set_vm.py +++ /dev/null @@ -1,155 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource import Resource - - -class VirtualMachineScaleSetVM(Resource): - """Describes a virtual machine scale set virtual machine. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource Id - :vartype id: str - :ivar name: Resource name - :vartype name: str - :ivar type: Resource type - :vartype type: str - :param location: Required. Resource location - :type location: str - :param tags: Resource tags - :type tags: dict[str, str] - :ivar instance_id: The virtual machine instance ID. - :vartype instance_id: str - :ivar sku: The virtual machine SKU. - :vartype sku: ~azure.mgmt.compute.v2017_12_01.models.Sku - :ivar latest_model_applied: Specifies whether the latest model has been - applied to the virtual machine. - :vartype latest_model_applied: bool - :ivar vm_id: Azure VM unique ID. - :vartype vm_id: str - :ivar instance_view: The virtual machine instance view. - :vartype instance_view: - ~azure.mgmt.compute.v2017_12_01.models.VirtualMachineScaleSetVMInstanceView - :param hardware_profile: Specifies the hardware settings for the virtual - machine. - :type hardware_profile: - ~azure.mgmt.compute.v2017_12_01.models.HardwareProfile - :param storage_profile: Specifies the storage settings for the virtual - machine disks. - :type storage_profile: - ~azure.mgmt.compute.v2017_12_01.models.StorageProfile - :param os_profile: Specifies the operating system settings for the virtual - machine. - :type os_profile: ~azure.mgmt.compute.v2017_12_01.models.OSProfile - :param network_profile: Specifies the network interfaces of the virtual - machine. - :type network_profile: - ~azure.mgmt.compute.v2017_12_01.models.NetworkProfile - :param diagnostics_profile: Specifies the boot diagnostic settings state. -

    Minimum api-version: 2015-06-15. - :type diagnostics_profile: - ~azure.mgmt.compute.v2017_12_01.models.DiagnosticsProfile - :param availability_set: Specifies information about the availability set - that the virtual machine should be assigned to. Virtual machines specified - in the same availability set are allocated to different nodes to maximize - availability. For more information about availability sets, see [Manage - the availability of virtual - machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-manage-availability?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). -

    For more information on Azure planned maintenance, see [Planned - maintenance for virtual machines in - Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-planned-maintenance?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json) -

    Currently, a VM can only be added to availability set at creation - time. An existing VM cannot be added to an availability set. - :type availability_set: ~azure.mgmt.compute.v2017_12_01.models.SubResource - :ivar provisioning_state: The provisioning state, which only appears in - the response. - :vartype provisioning_state: str - :param license_type: Specifies that the image or disk that is being used - was licensed on-premises. This element is only used for images that - contain the Windows Server operating system.

    Possible values are: -

    Windows_Client

    Windows_Server

    If this element - is included in a request for an update, the value must match the initial - value. This value cannot be updated.

    For more information, see - [Azure Hybrid Use Benefit for Windows - Server](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-hybrid-use-benefit-licensing?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json) -

    Minimum api-version: 2015-06-15 - :type license_type: str - :param plan: Specifies information about the marketplace image used to - create the virtual machine. This element is only used for marketplace - images. Before you can use a marketplace image from an API, you must - enable the image for programmatic use. In the Azure portal, find the - marketplace image that you want to use and then click **Want to deploy - programmatically, Get Started ->**. Enter any required information and - then click **Save**. - :type plan: ~azure.mgmt.compute.v2017_12_01.models.Plan - :ivar resources: The virtual machine child extension resources. - :vartype resources: - list[~azure.mgmt.compute.v2017_12_01.models.VirtualMachineExtension] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - 'instance_id': {'readonly': True}, - 'sku': {'readonly': True}, - 'latest_model_applied': {'readonly': True}, - 'vm_id': {'readonly': True}, - 'instance_view': {'readonly': True}, - 'provisioning_state': {'readonly': True}, - 'resources': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'instance_id': {'key': 'instanceId', 'type': 'str'}, - 'sku': {'key': 'sku', 'type': 'Sku'}, - 'latest_model_applied': {'key': 'properties.latestModelApplied', 'type': 'bool'}, - 'vm_id': {'key': 'properties.vmId', 'type': 'str'}, - 'instance_view': {'key': 'properties.instanceView', 'type': 'VirtualMachineScaleSetVMInstanceView'}, - 'hardware_profile': {'key': 'properties.hardwareProfile', 'type': 'HardwareProfile'}, - 'storage_profile': {'key': 'properties.storageProfile', 'type': 'StorageProfile'}, - 'os_profile': {'key': 'properties.osProfile', 'type': 'OSProfile'}, - 'network_profile': {'key': 'properties.networkProfile', 'type': 'NetworkProfile'}, - 'diagnostics_profile': {'key': 'properties.diagnosticsProfile', 'type': 'DiagnosticsProfile'}, - 'availability_set': {'key': 'properties.availabilitySet', 'type': 'SubResource'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'license_type': {'key': 'properties.licenseType', 'type': 'str'}, - 'plan': {'key': 'plan', 'type': 'Plan'}, - 'resources': {'key': 'resources', 'type': '[VirtualMachineExtension]'}, - } - - def __init__(self, **kwargs): - super(VirtualMachineScaleSetVM, self).__init__(**kwargs) - self.instance_id = None - self.sku = None - self.latest_model_applied = None - self.vm_id = None - self.instance_view = None - self.hardware_profile = kwargs.get('hardware_profile', None) - self.storage_profile = kwargs.get('storage_profile', None) - self.os_profile = kwargs.get('os_profile', None) - self.network_profile = kwargs.get('network_profile', None) - self.diagnostics_profile = kwargs.get('diagnostics_profile', None) - self.availability_set = kwargs.get('availability_set', None) - self.provisioning_state = None - self.license_type = kwargs.get('license_type', None) - self.plan = kwargs.get('plan', None) - self.resources = None diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/virtual_machine_scale_set_vm_extensions_summary.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/virtual_machine_scale_set_vm_extensions_summary.py deleted file mode 100644 index ff1707059ddb..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/virtual_machine_scale_set_vm_extensions_summary.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineScaleSetVMExtensionsSummary(Model): - """Extensions summary for virtual machines of a virtual machine scale set. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar name: The extension name. - :vartype name: str - :ivar statuses_summary: The extensions information. - :vartype statuses_summary: - list[~azure.mgmt.compute.v2017_12_01.models.VirtualMachineStatusCodeCount] - """ - - _validation = { - 'name': {'readonly': True}, - 'statuses_summary': {'readonly': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'statuses_summary': {'key': 'statusesSummary', 'type': '[VirtualMachineStatusCodeCount]'}, - } - - def __init__(self, **kwargs): - super(VirtualMachineScaleSetVMExtensionsSummary, self).__init__(**kwargs) - self.name = None - self.statuses_summary = None diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/virtual_machine_scale_set_vm_extensions_summary_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/virtual_machine_scale_set_vm_extensions_summary_py3.py deleted file mode 100644 index 011a808042fc..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/virtual_machine_scale_set_vm_extensions_summary_py3.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineScaleSetVMExtensionsSummary(Model): - """Extensions summary for virtual machines of a virtual machine scale set. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar name: The extension name. - :vartype name: str - :ivar statuses_summary: The extensions information. - :vartype statuses_summary: - list[~azure.mgmt.compute.v2017_12_01.models.VirtualMachineStatusCodeCount] - """ - - _validation = { - 'name': {'readonly': True}, - 'statuses_summary': {'readonly': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'statuses_summary': {'key': 'statusesSummary', 'type': '[VirtualMachineStatusCodeCount]'}, - } - - def __init__(self, **kwargs) -> None: - super(VirtualMachineScaleSetVMExtensionsSummary, self).__init__(**kwargs) - self.name = None - self.statuses_summary = None diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/virtual_machine_scale_set_vm_instance_ids.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/virtual_machine_scale_set_vm_instance_ids.py deleted file mode 100644 index 772c66dad326..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/virtual_machine_scale_set_vm_instance_ids.py +++ /dev/null @@ -1,30 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineScaleSetVMInstanceIDs(Model): - """Specifies a list of virtual machine instance IDs from the VM scale set. - - :param instance_ids: The virtual machine scale set instance ids. Omitting - the virtual machine scale set instance ids will result in the operation - being performed on all virtual machines in the virtual machine scale set. - :type instance_ids: list[str] - """ - - _attribute_map = { - 'instance_ids': {'key': 'instanceIds', 'type': '[str]'}, - } - - def __init__(self, **kwargs): - super(VirtualMachineScaleSetVMInstanceIDs, self).__init__(**kwargs) - self.instance_ids = kwargs.get('instance_ids', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/virtual_machine_scale_set_vm_instance_ids_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/virtual_machine_scale_set_vm_instance_ids_py3.py deleted file mode 100644 index 658a8ccb87d5..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/virtual_machine_scale_set_vm_instance_ids_py3.py +++ /dev/null @@ -1,30 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineScaleSetVMInstanceIDs(Model): - """Specifies a list of virtual machine instance IDs from the VM scale set. - - :param instance_ids: The virtual machine scale set instance ids. Omitting - the virtual machine scale set instance ids will result in the operation - being performed on all virtual machines in the virtual machine scale set. - :type instance_ids: list[str] - """ - - _attribute_map = { - 'instance_ids': {'key': 'instanceIds', 'type': '[str]'}, - } - - def __init__(self, *, instance_ids=None, **kwargs) -> None: - super(VirtualMachineScaleSetVMInstanceIDs, self).__init__(**kwargs) - self.instance_ids = instance_ids diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/virtual_machine_scale_set_vm_instance_required_ids.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/virtual_machine_scale_set_vm_instance_required_ids.py deleted file mode 100644 index ece250dd4fd4..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/virtual_machine_scale_set_vm_instance_required_ids.py +++ /dev/null @@ -1,34 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineScaleSetVMInstanceRequiredIDs(Model): - """Specifies a list of virtual machine instance IDs from the VM scale set. - - All required parameters must be populated in order to send to Azure. - - :param instance_ids: Required. The virtual machine scale set instance ids. - :type instance_ids: list[str] - """ - - _validation = { - 'instance_ids': {'required': True}, - } - - _attribute_map = { - 'instance_ids': {'key': 'instanceIds', 'type': '[str]'}, - } - - def __init__(self, **kwargs): - super(VirtualMachineScaleSetVMInstanceRequiredIDs, self).__init__(**kwargs) - self.instance_ids = kwargs.get('instance_ids', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/virtual_machine_scale_set_vm_instance_required_ids_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/virtual_machine_scale_set_vm_instance_required_ids_py3.py deleted file mode 100644 index f32c6181467d..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/virtual_machine_scale_set_vm_instance_required_ids_py3.py +++ /dev/null @@ -1,34 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineScaleSetVMInstanceRequiredIDs(Model): - """Specifies a list of virtual machine instance IDs from the VM scale set. - - All required parameters must be populated in order to send to Azure. - - :param instance_ids: Required. The virtual machine scale set instance ids. - :type instance_ids: list[str] - """ - - _validation = { - 'instance_ids': {'required': True}, - } - - _attribute_map = { - 'instance_ids': {'key': 'instanceIds', 'type': '[str]'}, - } - - def __init__(self, *, instance_ids, **kwargs) -> None: - super(VirtualMachineScaleSetVMInstanceRequiredIDs, self).__init__(**kwargs) - self.instance_ids = instance_ids diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/virtual_machine_scale_set_vm_instance_view.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/virtual_machine_scale_set_vm_instance_view.py deleted file mode 100644 index 280c9c575484..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/virtual_machine_scale_set_vm_instance_view.py +++ /dev/null @@ -1,86 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineScaleSetVMInstanceView(Model): - """The instance view of a virtual machine scale set VM. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :param platform_update_domain: The Update Domain count. - :type platform_update_domain: int - :param platform_fault_domain: The Fault Domain count. - :type platform_fault_domain: int - :param rdp_thumb_print: The Remote desktop certificate thumbprint. - :type rdp_thumb_print: str - :param vm_agent: The VM Agent running on the virtual machine. - :type vm_agent: - ~azure.mgmt.compute.v2017_12_01.models.VirtualMachineAgentInstanceView - :param maintenance_redeploy_status: The Maintenance Operation status on - the virtual machine. - :type maintenance_redeploy_status: - ~azure.mgmt.compute.v2017_12_01.models.MaintenanceRedeployStatus - :param disks: The disks information. - :type disks: list[~azure.mgmt.compute.v2017_12_01.models.DiskInstanceView] - :param extensions: The extensions information. - :type extensions: - list[~azure.mgmt.compute.v2017_12_01.models.VirtualMachineExtensionInstanceView] - :ivar vm_health: The health status for the VM. - :vartype vm_health: - ~azure.mgmt.compute.v2017_12_01.models.VirtualMachineHealthStatus - :param boot_diagnostics: Boot Diagnostics is a debugging feature which - allows you to view Console Output and Screenshot to diagnose VM status. -

    You can easily view the output of your console log.

    - Azure also enables you to see a screenshot of the VM from the hypervisor. - :type boot_diagnostics: - ~azure.mgmt.compute.v2017_12_01.models.BootDiagnosticsInstanceView - :param statuses: The resource status information. - :type statuses: - list[~azure.mgmt.compute.v2017_12_01.models.InstanceViewStatus] - :param placement_group_id: The placement group in which the VM is running. - If the VM is deallocated it will not have a placementGroupId. - :type placement_group_id: str - """ - - _validation = { - 'vm_health': {'readonly': True}, - } - - _attribute_map = { - 'platform_update_domain': {'key': 'platformUpdateDomain', 'type': 'int'}, - 'platform_fault_domain': {'key': 'platformFaultDomain', 'type': 'int'}, - 'rdp_thumb_print': {'key': 'rdpThumbPrint', 'type': 'str'}, - 'vm_agent': {'key': 'vmAgent', 'type': 'VirtualMachineAgentInstanceView'}, - 'maintenance_redeploy_status': {'key': 'maintenanceRedeployStatus', 'type': 'MaintenanceRedeployStatus'}, - 'disks': {'key': 'disks', 'type': '[DiskInstanceView]'}, - 'extensions': {'key': 'extensions', 'type': '[VirtualMachineExtensionInstanceView]'}, - 'vm_health': {'key': 'vmHealth', 'type': 'VirtualMachineHealthStatus'}, - 'boot_diagnostics': {'key': 'bootDiagnostics', 'type': 'BootDiagnosticsInstanceView'}, - 'statuses': {'key': 'statuses', 'type': '[InstanceViewStatus]'}, - 'placement_group_id': {'key': 'placementGroupId', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(VirtualMachineScaleSetVMInstanceView, self).__init__(**kwargs) - self.platform_update_domain = kwargs.get('platform_update_domain', None) - self.platform_fault_domain = kwargs.get('platform_fault_domain', None) - self.rdp_thumb_print = kwargs.get('rdp_thumb_print', None) - self.vm_agent = kwargs.get('vm_agent', None) - self.maintenance_redeploy_status = kwargs.get('maintenance_redeploy_status', None) - self.disks = kwargs.get('disks', None) - self.extensions = kwargs.get('extensions', None) - self.vm_health = None - self.boot_diagnostics = kwargs.get('boot_diagnostics', None) - self.statuses = kwargs.get('statuses', None) - self.placement_group_id = kwargs.get('placement_group_id', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/virtual_machine_scale_set_vm_instance_view_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/virtual_machine_scale_set_vm_instance_view_py3.py deleted file mode 100644 index e4eaf09a4672..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/virtual_machine_scale_set_vm_instance_view_py3.py +++ /dev/null @@ -1,86 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineScaleSetVMInstanceView(Model): - """The instance view of a virtual machine scale set VM. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :param platform_update_domain: The Update Domain count. - :type platform_update_domain: int - :param platform_fault_domain: The Fault Domain count. - :type platform_fault_domain: int - :param rdp_thumb_print: The Remote desktop certificate thumbprint. - :type rdp_thumb_print: str - :param vm_agent: The VM Agent running on the virtual machine. - :type vm_agent: - ~azure.mgmt.compute.v2017_12_01.models.VirtualMachineAgentInstanceView - :param maintenance_redeploy_status: The Maintenance Operation status on - the virtual machine. - :type maintenance_redeploy_status: - ~azure.mgmt.compute.v2017_12_01.models.MaintenanceRedeployStatus - :param disks: The disks information. - :type disks: list[~azure.mgmt.compute.v2017_12_01.models.DiskInstanceView] - :param extensions: The extensions information. - :type extensions: - list[~azure.mgmt.compute.v2017_12_01.models.VirtualMachineExtensionInstanceView] - :ivar vm_health: The health status for the VM. - :vartype vm_health: - ~azure.mgmt.compute.v2017_12_01.models.VirtualMachineHealthStatus - :param boot_diagnostics: Boot Diagnostics is a debugging feature which - allows you to view Console Output and Screenshot to diagnose VM status. -

    You can easily view the output of your console log.

    - Azure also enables you to see a screenshot of the VM from the hypervisor. - :type boot_diagnostics: - ~azure.mgmt.compute.v2017_12_01.models.BootDiagnosticsInstanceView - :param statuses: The resource status information. - :type statuses: - list[~azure.mgmt.compute.v2017_12_01.models.InstanceViewStatus] - :param placement_group_id: The placement group in which the VM is running. - If the VM is deallocated it will not have a placementGroupId. - :type placement_group_id: str - """ - - _validation = { - 'vm_health': {'readonly': True}, - } - - _attribute_map = { - 'platform_update_domain': {'key': 'platformUpdateDomain', 'type': 'int'}, - 'platform_fault_domain': {'key': 'platformFaultDomain', 'type': 'int'}, - 'rdp_thumb_print': {'key': 'rdpThumbPrint', 'type': 'str'}, - 'vm_agent': {'key': 'vmAgent', 'type': 'VirtualMachineAgentInstanceView'}, - 'maintenance_redeploy_status': {'key': 'maintenanceRedeployStatus', 'type': 'MaintenanceRedeployStatus'}, - 'disks': {'key': 'disks', 'type': '[DiskInstanceView]'}, - 'extensions': {'key': 'extensions', 'type': '[VirtualMachineExtensionInstanceView]'}, - 'vm_health': {'key': 'vmHealth', 'type': 'VirtualMachineHealthStatus'}, - 'boot_diagnostics': {'key': 'bootDiagnostics', 'type': 'BootDiagnosticsInstanceView'}, - 'statuses': {'key': 'statuses', 'type': '[InstanceViewStatus]'}, - 'placement_group_id': {'key': 'placementGroupId', 'type': 'str'}, - } - - def __init__(self, *, platform_update_domain: int=None, platform_fault_domain: int=None, rdp_thumb_print: str=None, vm_agent=None, maintenance_redeploy_status=None, disks=None, extensions=None, boot_diagnostics=None, statuses=None, placement_group_id: str=None, **kwargs) -> None: - super(VirtualMachineScaleSetVMInstanceView, self).__init__(**kwargs) - self.platform_update_domain = platform_update_domain - self.platform_fault_domain = platform_fault_domain - self.rdp_thumb_print = rdp_thumb_print - self.vm_agent = vm_agent - self.maintenance_redeploy_status = maintenance_redeploy_status - self.disks = disks - self.extensions = extensions - self.vm_health = None - self.boot_diagnostics = boot_diagnostics - self.statuses = statuses - self.placement_group_id = placement_group_id diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/virtual_machine_scale_set_vm_paged.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/virtual_machine_scale_set_vm_paged.py deleted file mode 100644 index f7dd64b0ebf8..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/virtual_machine_scale_set_vm_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class VirtualMachineScaleSetVMPaged(Paged): - """ - A paging container for iterating over a list of :class:`VirtualMachineScaleSetVM ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[VirtualMachineScaleSetVM]'} - } - - def __init__(self, *args, **kwargs): - - super(VirtualMachineScaleSetVMPaged, self).__init__(*args, **kwargs) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/virtual_machine_scale_set_vm_profile.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/virtual_machine_scale_set_vm_profile.py deleted file mode 100644 index 9a0685fa2b43..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/virtual_machine_scale_set_vm_profile.py +++ /dev/null @@ -1,80 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineScaleSetVMProfile(Model): - """Describes a virtual machine scale set virtual machine profile. - - :param os_profile: Specifies the operating system settings for the virtual - machines in the scale set. - :type os_profile: - ~azure.mgmt.compute.v2017_12_01.models.VirtualMachineScaleSetOSProfile - :param storage_profile: Specifies the storage settings for the virtual - machine disks. - :type storage_profile: - ~azure.mgmt.compute.v2017_12_01.models.VirtualMachineScaleSetStorageProfile - :param network_profile: Specifies properties of the network interfaces of - the virtual machines in the scale set. - :type network_profile: - ~azure.mgmt.compute.v2017_12_01.models.VirtualMachineScaleSetNetworkProfile - :param diagnostics_profile: Specifies the boot diagnostic settings state. -

    Minimum api-version: 2015-06-15. - :type diagnostics_profile: - ~azure.mgmt.compute.v2017_12_01.models.DiagnosticsProfile - :param extension_profile: Specifies a collection of settings for - extensions installed on virtual machines in the scale set. - :type extension_profile: - ~azure.mgmt.compute.v2017_12_01.models.VirtualMachineScaleSetExtensionProfile - :param license_type: Specifies that the image or disk that is being used - was licensed on-premises. This element is only used for images that - contain the Windows Server operating system.

    Possible values are: -

    Windows_Client

    Windows_Server

    If this element - is included in a request for an update, the value must match the initial - value. This value cannot be updated.

    For more information, see - [Azure Hybrid Use Benefit for Windows - Server](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-hybrid-use-benefit-licensing?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json) -

    Minimum api-version: 2015-06-15 - :type license_type: str - :param priority: Specifies the priority for the virtual machines in the - scale set.

    Minimum api-version: 2017-10-30-preview. Possible - values include: 'Regular', 'Low' - :type priority: str or - ~azure.mgmt.compute.v2017_12_01.models.VirtualMachinePriorityTypes - :param eviction_policy: Specifies the eviction policy for virtual machines - in a low priority scale set.

    Minimum api-version: - 2017-10-30-preview. Possible values include: 'Deallocate', 'Delete' - :type eviction_policy: str or - ~azure.mgmt.compute.v2017_12_01.models.VirtualMachineEvictionPolicyTypes - """ - - _attribute_map = { - 'os_profile': {'key': 'osProfile', 'type': 'VirtualMachineScaleSetOSProfile'}, - 'storage_profile': {'key': 'storageProfile', 'type': 'VirtualMachineScaleSetStorageProfile'}, - 'network_profile': {'key': 'networkProfile', 'type': 'VirtualMachineScaleSetNetworkProfile'}, - 'diagnostics_profile': {'key': 'diagnosticsProfile', 'type': 'DiagnosticsProfile'}, - 'extension_profile': {'key': 'extensionProfile', 'type': 'VirtualMachineScaleSetExtensionProfile'}, - 'license_type': {'key': 'licenseType', 'type': 'str'}, - 'priority': {'key': 'priority', 'type': 'str'}, - 'eviction_policy': {'key': 'evictionPolicy', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(VirtualMachineScaleSetVMProfile, self).__init__(**kwargs) - self.os_profile = kwargs.get('os_profile', None) - self.storage_profile = kwargs.get('storage_profile', None) - self.network_profile = kwargs.get('network_profile', None) - self.diagnostics_profile = kwargs.get('diagnostics_profile', None) - self.extension_profile = kwargs.get('extension_profile', None) - self.license_type = kwargs.get('license_type', None) - self.priority = kwargs.get('priority', None) - self.eviction_policy = kwargs.get('eviction_policy', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/virtual_machine_scale_set_vm_profile_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/virtual_machine_scale_set_vm_profile_py3.py deleted file mode 100644 index 01782c2f916f..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/virtual_machine_scale_set_vm_profile_py3.py +++ /dev/null @@ -1,80 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineScaleSetVMProfile(Model): - """Describes a virtual machine scale set virtual machine profile. - - :param os_profile: Specifies the operating system settings for the virtual - machines in the scale set. - :type os_profile: - ~azure.mgmt.compute.v2017_12_01.models.VirtualMachineScaleSetOSProfile - :param storage_profile: Specifies the storage settings for the virtual - machine disks. - :type storage_profile: - ~azure.mgmt.compute.v2017_12_01.models.VirtualMachineScaleSetStorageProfile - :param network_profile: Specifies properties of the network interfaces of - the virtual machines in the scale set. - :type network_profile: - ~azure.mgmt.compute.v2017_12_01.models.VirtualMachineScaleSetNetworkProfile - :param diagnostics_profile: Specifies the boot diagnostic settings state. -

    Minimum api-version: 2015-06-15. - :type diagnostics_profile: - ~azure.mgmt.compute.v2017_12_01.models.DiagnosticsProfile - :param extension_profile: Specifies a collection of settings for - extensions installed on virtual machines in the scale set. - :type extension_profile: - ~azure.mgmt.compute.v2017_12_01.models.VirtualMachineScaleSetExtensionProfile - :param license_type: Specifies that the image or disk that is being used - was licensed on-premises. This element is only used for images that - contain the Windows Server operating system.

    Possible values are: -

    Windows_Client

    Windows_Server

    If this element - is included in a request for an update, the value must match the initial - value. This value cannot be updated.

    For more information, see - [Azure Hybrid Use Benefit for Windows - Server](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-hybrid-use-benefit-licensing?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json) -

    Minimum api-version: 2015-06-15 - :type license_type: str - :param priority: Specifies the priority for the virtual machines in the - scale set.

    Minimum api-version: 2017-10-30-preview. Possible - values include: 'Regular', 'Low' - :type priority: str or - ~azure.mgmt.compute.v2017_12_01.models.VirtualMachinePriorityTypes - :param eviction_policy: Specifies the eviction policy for virtual machines - in a low priority scale set.

    Minimum api-version: - 2017-10-30-preview. Possible values include: 'Deallocate', 'Delete' - :type eviction_policy: str or - ~azure.mgmt.compute.v2017_12_01.models.VirtualMachineEvictionPolicyTypes - """ - - _attribute_map = { - 'os_profile': {'key': 'osProfile', 'type': 'VirtualMachineScaleSetOSProfile'}, - 'storage_profile': {'key': 'storageProfile', 'type': 'VirtualMachineScaleSetStorageProfile'}, - 'network_profile': {'key': 'networkProfile', 'type': 'VirtualMachineScaleSetNetworkProfile'}, - 'diagnostics_profile': {'key': 'diagnosticsProfile', 'type': 'DiagnosticsProfile'}, - 'extension_profile': {'key': 'extensionProfile', 'type': 'VirtualMachineScaleSetExtensionProfile'}, - 'license_type': {'key': 'licenseType', 'type': 'str'}, - 'priority': {'key': 'priority', 'type': 'str'}, - 'eviction_policy': {'key': 'evictionPolicy', 'type': 'str'}, - } - - def __init__(self, *, os_profile=None, storage_profile=None, network_profile=None, diagnostics_profile=None, extension_profile=None, license_type: str=None, priority=None, eviction_policy=None, **kwargs) -> None: - super(VirtualMachineScaleSetVMProfile, self).__init__(**kwargs) - self.os_profile = os_profile - self.storage_profile = storage_profile - self.network_profile = network_profile - self.diagnostics_profile = diagnostics_profile - self.extension_profile = extension_profile - self.license_type = license_type - self.priority = priority - self.eviction_policy = eviction_policy diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/virtual_machine_scale_set_vm_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/virtual_machine_scale_set_vm_py3.py deleted file mode 100644 index e2277cd4dbd5..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/virtual_machine_scale_set_vm_py3.py +++ /dev/null @@ -1,155 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource_py3 import Resource - - -class VirtualMachineScaleSetVM(Resource): - """Describes a virtual machine scale set virtual machine. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource Id - :vartype id: str - :ivar name: Resource name - :vartype name: str - :ivar type: Resource type - :vartype type: str - :param location: Required. Resource location - :type location: str - :param tags: Resource tags - :type tags: dict[str, str] - :ivar instance_id: The virtual machine instance ID. - :vartype instance_id: str - :ivar sku: The virtual machine SKU. - :vartype sku: ~azure.mgmt.compute.v2017_12_01.models.Sku - :ivar latest_model_applied: Specifies whether the latest model has been - applied to the virtual machine. - :vartype latest_model_applied: bool - :ivar vm_id: Azure VM unique ID. - :vartype vm_id: str - :ivar instance_view: The virtual machine instance view. - :vartype instance_view: - ~azure.mgmt.compute.v2017_12_01.models.VirtualMachineScaleSetVMInstanceView - :param hardware_profile: Specifies the hardware settings for the virtual - machine. - :type hardware_profile: - ~azure.mgmt.compute.v2017_12_01.models.HardwareProfile - :param storage_profile: Specifies the storage settings for the virtual - machine disks. - :type storage_profile: - ~azure.mgmt.compute.v2017_12_01.models.StorageProfile - :param os_profile: Specifies the operating system settings for the virtual - machine. - :type os_profile: ~azure.mgmt.compute.v2017_12_01.models.OSProfile - :param network_profile: Specifies the network interfaces of the virtual - machine. - :type network_profile: - ~azure.mgmt.compute.v2017_12_01.models.NetworkProfile - :param diagnostics_profile: Specifies the boot diagnostic settings state. -

    Minimum api-version: 2015-06-15. - :type diagnostics_profile: - ~azure.mgmt.compute.v2017_12_01.models.DiagnosticsProfile - :param availability_set: Specifies information about the availability set - that the virtual machine should be assigned to. Virtual machines specified - in the same availability set are allocated to different nodes to maximize - availability. For more information about availability sets, see [Manage - the availability of virtual - machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-manage-availability?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). -

    For more information on Azure planned maintenance, see [Planned - maintenance for virtual machines in - Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-planned-maintenance?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json) -

    Currently, a VM can only be added to availability set at creation - time. An existing VM cannot be added to an availability set. - :type availability_set: ~azure.mgmt.compute.v2017_12_01.models.SubResource - :ivar provisioning_state: The provisioning state, which only appears in - the response. - :vartype provisioning_state: str - :param license_type: Specifies that the image or disk that is being used - was licensed on-premises. This element is only used for images that - contain the Windows Server operating system.

    Possible values are: -

    Windows_Client

    Windows_Server

    If this element - is included in a request for an update, the value must match the initial - value. This value cannot be updated.

    For more information, see - [Azure Hybrid Use Benefit for Windows - Server](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-hybrid-use-benefit-licensing?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json) -

    Minimum api-version: 2015-06-15 - :type license_type: str - :param plan: Specifies information about the marketplace image used to - create the virtual machine. This element is only used for marketplace - images. Before you can use a marketplace image from an API, you must - enable the image for programmatic use. In the Azure portal, find the - marketplace image that you want to use and then click **Want to deploy - programmatically, Get Started ->**. Enter any required information and - then click **Save**. - :type plan: ~azure.mgmt.compute.v2017_12_01.models.Plan - :ivar resources: The virtual machine child extension resources. - :vartype resources: - list[~azure.mgmt.compute.v2017_12_01.models.VirtualMachineExtension] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - 'instance_id': {'readonly': True}, - 'sku': {'readonly': True}, - 'latest_model_applied': {'readonly': True}, - 'vm_id': {'readonly': True}, - 'instance_view': {'readonly': True}, - 'provisioning_state': {'readonly': True}, - 'resources': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'instance_id': {'key': 'instanceId', 'type': 'str'}, - 'sku': {'key': 'sku', 'type': 'Sku'}, - 'latest_model_applied': {'key': 'properties.latestModelApplied', 'type': 'bool'}, - 'vm_id': {'key': 'properties.vmId', 'type': 'str'}, - 'instance_view': {'key': 'properties.instanceView', 'type': 'VirtualMachineScaleSetVMInstanceView'}, - 'hardware_profile': {'key': 'properties.hardwareProfile', 'type': 'HardwareProfile'}, - 'storage_profile': {'key': 'properties.storageProfile', 'type': 'StorageProfile'}, - 'os_profile': {'key': 'properties.osProfile', 'type': 'OSProfile'}, - 'network_profile': {'key': 'properties.networkProfile', 'type': 'NetworkProfile'}, - 'diagnostics_profile': {'key': 'properties.diagnosticsProfile', 'type': 'DiagnosticsProfile'}, - 'availability_set': {'key': 'properties.availabilitySet', 'type': 'SubResource'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'license_type': {'key': 'properties.licenseType', 'type': 'str'}, - 'plan': {'key': 'plan', 'type': 'Plan'}, - 'resources': {'key': 'resources', 'type': '[VirtualMachineExtension]'}, - } - - def __init__(self, *, location: str, tags=None, hardware_profile=None, storage_profile=None, os_profile=None, network_profile=None, diagnostics_profile=None, availability_set=None, license_type: str=None, plan=None, **kwargs) -> None: - super(VirtualMachineScaleSetVM, self).__init__(location=location, tags=tags, **kwargs) - self.instance_id = None - self.sku = None - self.latest_model_applied = None - self.vm_id = None - self.instance_view = None - self.hardware_profile = hardware_profile - self.storage_profile = storage_profile - self.os_profile = os_profile - self.network_profile = network_profile - self.diagnostics_profile = diagnostics_profile - self.availability_set = availability_set - self.provisioning_state = None - self.license_type = license_type - self.plan = plan - self.resources = None diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/virtual_machine_size.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/virtual_machine_size.py deleted file mode 100644 index 0fef3efd6c8e..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/virtual_machine_size.py +++ /dev/null @@ -1,53 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineSize(Model): - """Describes the properties of a VM size. - - :param name: The name of the virtual machine size. - :type name: str - :param number_of_cores: The number of cores supported by the virtual - machine size. - :type number_of_cores: int - :param os_disk_size_in_mb: The OS disk size, in MB, allowed by the virtual - machine size. - :type os_disk_size_in_mb: int - :param resource_disk_size_in_mb: The resource disk size, in MB, allowed by - the virtual machine size. - :type resource_disk_size_in_mb: int - :param memory_in_mb: The amount of memory, in MB, supported by the virtual - machine size. - :type memory_in_mb: int - :param max_data_disk_count: The maximum number of data disks that can be - attached to the virtual machine size. - :type max_data_disk_count: int - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'number_of_cores': {'key': 'numberOfCores', 'type': 'int'}, - 'os_disk_size_in_mb': {'key': 'osDiskSizeInMB', 'type': 'int'}, - 'resource_disk_size_in_mb': {'key': 'resourceDiskSizeInMB', 'type': 'int'}, - 'memory_in_mb': {'key': 'memoryInMB', 'type': 'int'}, - 'max_data_disk_count': {'key': 'maxDataDiskCount', 'type': 'int'}, - } - - def __init__(self, **kwargs): - super(VirtualMachineSize, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.number_of_cores = kwargs.get('number_of_cores', None) - self.os_disk_size_in_mb = kwargs.get('os_disk_size_in_mb', None) - self.resource_disk_size_in_mb = kwargs.get('resource_disk_size_in_mb', None) - self.memory_in_mb = kwargs.get('memory_in_mb', None) - self.max_data_disk_count = kwargs.get('max_data_disk_count', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/virtual_machine_size_paged.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/virtual_machine_size_paged.py deleted file mode 100644 index 7a20325d74f4..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/virtual_machine_size_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class VirtualMachineSizePaged(Paged): - """ - A paging container for iterating over a list of :class:`VirtualMachineSize ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[VirtualMachineSize]'} - } - - def __init__(self, *args, **kwargs): - - super(VirtualMachineSizePaged, self).__init__(*args, **kwargs) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/virtual_machine_size_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/virtual_machine_size_py3.py deleted file mode 100644 index 9f99ba20ce42..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/virtual_machine_size_py3.py +++ /dev/null @@ -1,53 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineSize(Model): - """Describes the properties of a VM size. - - :param name: The name of the virtual machine size. - :type name: str - :param number_of_cores: The number of cores supported by the virtual - machine size. - :type number_of_cores: int - :param os_disk_size_in_mb: The OS disk size, in MB, allowed by the virtual - machine size. - :type os_disk_size_in_mb: int - :param resource_disk_size_in_mb: The resource disk size, in MB, allowed by - the virtual machine size. - :type resource_disk_size_in_mb: int - :param memory_in_mb: The amount of memory, in MB, supported by the virtual - machine size. - :type memory_in_mb: int - :param max_data_disk_count: The maximum number of data disks that can be - attached to the virtual machine size. - :type max_data_disk_count: int - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'number_of_cores': {'key': 'numberOfCores', 'type': 'int'}, - 'os_disk_size_in_mb': {'key': 'osDiskSizeInMB', 'type': 'int'}, - 'resource_disk_size_in_mb': {'key': 'resourceDiskSizeInMB', 'type': 'int'}, - 'memory_in_mb': {'key': 'memoryInMB', 'type': 'int'}, - 'max_data_disk_count': {'key': 'maxDataDiskCount', 'type': 'int'}, - } - - def __init__(self, *, name: str=None, number_of_cores: int=None, os_disk_size_in_mb: int=None, resource_disk_size_in_mb: int=None, memory_in_mb: int=None, max_data_disk_count: int=None, **kwargs) -> None: - super(VirtualMachineSize, self).__init__(**kwargs) - self.name = name - self.number_of_cores = number_of_cores - self.os_disk_size_in_mb = os_disk_size_in_mb - self.resource_disk_size_in_mb = resource_disk_size_in_mb - self.memory_in_mb = memory_in_mb - self.max_data_disk_count = max_data_disk_count diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/virtual_machine_status_code_count.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/virtual_machine_status_code_count.py deleted file mode 100644 index 7df7b702acd7..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/virtual_machine_status_code_count.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineStatusCodeCount(Model): - """The status code and count of the virtual machine scale set instance view - status summary. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar code: The instance view status code. - :vartype code: str - :ivar count: The number of instances having a particular status code. - :vartype count: int - """ - - _validation = { - 'code': {'readonly': True}, - 'count': {'readonly': True}, - } - - _attribute_map = { - 'code': {'key': 'code', 'type': 'str'}, - 'count': {'key': 'count', 'type': 'int'}, - } - - def __init__(self, **kwargs): - super(VirtualMachineStatusCodeCount, self).__init__(**kwargs) - self.code = None - self.count = None diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/virtual_machine_status_code_count_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/virtual_machine_status_code_count_py3.py deleted file mode 100644 index c38800073a95..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/virtual_machine_status_code_count_py3.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineStatusCodeCount(Model): - """The status code and count of the virtual machine scale set instance view - status summary. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar code: The instance view status code. - :vartype code: str - :ivar count: The number of instances having a particular status code. - :vartype count: int - """ - - _validation = { - 'code': {'readonly': True}, - 'count': {'readonly': True}, - } - - _attribute_map = { - 'code': {'key': 'code', 'type': 'str'}, - 'count': {'key': 'count', 'type': 'int'}, - } - - def __init__(self, **kwargs) -> None: - super(VirtualMachineStatusCodeCount, self).__init__(**kwargs) - self.code = None - self.count = None diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/virtual_machine_update.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/virtual_machine_update.py deleted file mode 100644 index 1689c5ee98b6..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/virtual_machine_update.py +++ /dev/null @@ -1,126 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .update_resource import UpdateResource - - -class VirtualMachineUpdate(UpdateResource): - """Describes a Virtual Machine Update. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :param tags: Resource tags - :type tags: dict[str, str] - :param plan: Specifies information about the marketplace image used to - create the virtual machine. This element is only used for marketplace - images. Before you can use a marketplace image from an API, you must - enable the image for programmatic use. In the Azure portal, find the - marketplace image that you want to use and then click **Want to deploy - programmatically, Get Started ->**. Enter any required information and - then click **Save**. - :type plan: ~azure.mgmt.compute.v2017_12_01.models.Plan - :param hardware_profile: Specifies the hardware settings for the virtual - machine. - :type hardware_profile: - ~azure.mgmt.compute.v2017_12_01.models.HardwareProfile - :param storage_profile: Specifies the storage settings for the virtual - machine disks. - :type storage_profile: - ~azure.mgmt.compute.v2017_12_01.models.StorageProfile - :param os_profile: Specifies the operating system settings for the virtual - machine. - :type os_profile: ~azure.mgmt.compute.v2017_12_01.models.OSProfile - :param network_profile: Specifies the network interfaces of the virtual - machine. - :type network_profile: - ~azure.mgmt.compute.v2017_12_01.models.NetworkProfile - :param diagnostics_profile: Specifies the boot diagnostic settings state. -

    Minimum api-version: 2015-06-15. - :type diagnostics_profile: - ~azure.mgmt.compute.v2017_12_01.models.DiagnosticsProfile - :param availability_set: Specifies information about the availability set - that the virtual machine should be assigned to. Virtual machines specified - in the same availability set are allocated to different nodes to maximize - availability. For more information about availability sets, see [Manage - the availability of virtual - machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-manage-availability?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). -

    For more information on Azure planned maintenance, see [Planned - maintenance for virtual machines in - Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-planned-maintenance?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json) -

    Currently, a VM can only be added to availability set at creation - time. An existing VM cannot be added to an availability set. - :type availability_set: ~azure.mgmt.compute.v2017_12_01.models.SubResource - :ivar provisioning_state: The provisioning state, which only appears in - the response. - :vartype provisioning_state: str - :ivar instance_view: The virtual machine instance view. - :vartype instance_view: - ~azure.mgmt.compute.v2017_12_01.models.VirtualMachineInstanceView - :param license_type: Specifies that the image or disk that is being used - was licensed on-premises. This element is only used for images that - contain the Windows Server operating system.

    Possible values are: -

    Windows_Client

    Windows_Server

    If this element - is included in a request for an update, the value must match the initial - value. This value cannot be updated.

    For more information, see - [Azure Hybrid Use Benefit for Windows - Server](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-hybrid-use-benefit-licensing?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json) -

    Minimum api-version: 2015-06-15 - :type license_type: str - :ivar vm_id: Specifies the VM unique ID which is a 128-bits identifier - that is encoded and stored in all Azure IaaS VMs SMBIOS and can be read - using platform BIOS commands. - :vartype vm_id: str - :param identity: The identity of the virtual machine, if configured. - :type identity: - ~azure.mgmt.compute.v2017_12_01.models.VirtualMachineIdentity - :param zones: The virtual machine zones. - :type zones: list[str] - """ - - _validation = { - 'provisioning_state': {'readonly': True}, - 'instance_view': {'readonly': True}, - 'vm_id': {'readonly': True}, - } - - _attribute_map = { - 'tags': {'key': 'tags', 'type': '{str}'}, - 'plan': {'key': 'plan', 'type': 'Plan'}, - 'hardware_profile': {'key': 'properties.hardwareProfile', 'type': 'HardwareProfile'}, - 'storage_profile': {'key': 'properties.storageProfile', 'type': 'StorageProfile'}, - 'os_profile': {'key': 'properties.osProfile', 'type': 'OSProfile'}, - 'network_profile': {'key': 'properties.networkProfile', 'type': 'NetworkProfile'}, - 'diagnostics_profile': {'key': 'properties.diagnosticsProfile', 'type': 'DiagnosticsProfile'}, - 'availability_set': {'key': 'properties.availabilitySet', 'type': 'SubResource'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'instance_view': {'key': 'properties.instanceView', 'type': 'VirtualMachineInstanceView'}, - 'license_type': {'key': 'properties.licenseType', 'type': 'str'}, - 'vm_id': {'key': 'properties.vmId', 'type': 'str'}, - 'identity': {'key': 'identity', 'type': 'VirtualMachineIdentity'}, - 'zones': {'key': 'zones', 'type': '[str]'}, - } - - def __init__(self, **kwargs): - super(VirtualMachineUpdate, self).__init__(**kwargs) - self.plan = kwargs.get('plan', None) - self.hardware_profile = kwargs.get('hardware_profile', None) - self.storage_profile = kwargs.get('storage_profile', None) - self.os_profile = kwargs.get('os_profile', None) - self.network_profile = kwargs.get('network_profile', None) - self.diagnostics_profile = kwargs.get('diagnostics_profile', None) - self.availability_set = kwargs.get('availability_set', None) - self.provisioning_state = None - self.instance_view = None - self.license_type = kwargs.get('license_type', None) - self.vm_id = None - self.identity = kwargs.get('identity', None) - self.zones = kwargs.get('zones', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/virtual_machine_update_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/virtual_machine_update_py3.py deleted file mode 100644 index ab0907658cd0..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/virtual_machine_update_py3.py +++ /dev/null @@ -1,126 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .update_resource_py3 import UpdateResource - - -class VirtualMachineUpdate(UpdateResource): - """Describes a Virtual Machine Update. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :param tags: Resource tags - :type tags: dict[str, str] - :param plan: Specifies information about the marketplace image used to - create the virtual machine. This element is only used for marketplace - images. Before you can use a marketplace image from an API, you must - enable the image for programmatic use. In the Azure portal, find the - marketplace image that you want to use and then click **Want to deploy - programmatically, Get Started ->**. Enter any required information and - then click **Save**. - :type plan: ~azure.mgmt.compute.v2017_12_01.models.Plan - :param hardware_profile: Specifies the hardware settings for the virtual - machine. - :type hardware_profile: - ~azure.mgmt.compute.v2017_12_01.models.HardwareProfile - :param storage_profile: Specifies the storage settings for the virtual - machine disks. - :type storage_profile: - ~azure.mgmt.compute.v2017_12_01.models.StorageProfile - :param os_profile: Specifies the operating system settings for the virtual - machine. - :type os_profile: ~azure.mgmt.compute.v2017_12_01.models.OSProfile - :param network_profile: Specifies the network interfaces of the virtual - machine. - :type network_profile: - ~azure.mgmt.compute.v2017_12_01.models.NetworkProfile - :param diagnostics_profile: Specifies the boot diagnostic settings state. -

    Minimum api-version: 2015-06-15. - :type diagnostics_profile: - ~azure.mgmt.compute.v2017_12_01.models.DiagnosticsProfile - :param availability_set: Specifies information about the availability set - that the virtual machine should be assigned to. Virtual machines specified - in the same availability set are allocated to different nodes to maximize - availability. For more information about availability sets, see [Manage - the availability of virtual - machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-manage-availability?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). -

    For more information on Azure planned maintenance, see [Planned - maintenance for virtual machines in - Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-planned-maintenance?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json) -

    Currently, a VM can only be added to availability set at creation - time. An existing VM cannot be added to an availability set. - :type availability_set: ~azure.mgmt.compute.v2017_12_01.models.SubResource - :ivar provisioning_state: The provisioning state, which only appears in - the response. - :vartype provisioning_state: str - :ivar instance_view: The virtual machine instance view. - :vartype instance_view: - ~azure.mgmt.compute.v2017_12_01.models.VirtualMachineInstanceView - :param license_type: Specifies that the image or disk that is being used - was licensed on-premises. This element is only used for images that - contain the Windows Server operating system.

    Possible values are: -

    Windows_Client

    Windows_Server

    If this element - is included in a request for an update, the value must match the initial - value. This value cannot be updated.

    For more information, see - [Azure Hybrid Use Benefit for Windows - Server](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-hybrid-use-benefit-licensing?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json) -

    Minimum api-version: 2015-06-15 - :type license_type: str - :ivar vm_id: Specifies the VM unique ID which is a 128-bits identifier - that is encoded and stored in all Azure IaaS VMs SMBIOS and can be read - using platform BIOS commands. - :vartype vm_id: str - :param identity: The identity of the virtual machine, if configured. - :type identity: - ~azure.mgmt.compute.v2017_12_01.models.VirtualMachineIdentity - :param zones: The virtual machine zones. - :type zones: list[str] - """ - - _validation = { - 'provisioning_state': {'readonly': True}, - 'instance_view': {'readonly': True}, - 'vm_id': {'readonly': True}, - } - - _attribute_map = { - 'tags': {'key': 'tags', 'type': '{str}'}, - 'plan': {'key': 'plan', 'type': 'Plan'}, - 'hardware_profile': {'key': 'properties.hardwareProfile', 'type': 'HardwareProfile'}, - 'storage_profile': {'key': 'properties.storageProfile', 'type': 'StorageProfile'}, - 'os_profile': {'key': 'properties.osProfile', 'type': 'OSProfile'}, - 'network_profile': {'key': 'properties.networkProfile', 'type': 'NetworkProfile'}, - 'diagnostics_profile': {'key': 'properties.diagnosticsProfile', 'type': 'DiagnosticsProfile'}, - 'availability_set': {'key': 'properties.availabilitySet', 'type': 'SubResource'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'instance_view': {'key': 'properties.instanceView', 'type': 'VirtualMachineInstanceView'}, - 'license_type': {'key': 'properties.licenseType', 'type': 'str'}, - 'vm_id': {'key': 'properties.vmId', 'type': 'str'}, - 'identity': {'key': 'identity', 'type': 'VirtualMachineIdentity'}, - 'zones': {'key': 'zones', 'type': '[str]'}, - } - - def __init__(self, *, tags=None, plan=None, hardware_profile=None, storage_profile=None, os_profile=None, network_profile=None, diagnostics_profile=None, availability_set=None, license_type: str=None, identity=None, zones=None, **kwargs) -> None: - super(VirtualMachineUpdate, self).__init__(tags=tags, **kwargs) - self.plan = plan - self.hardware_profile = hardware_profile - self.storage_profile = storage_profile - self.os_profile = os_profile - self.network_profile = network_profile - self.diagnostics_profile = diagnostics_profile - self.availability_set = availability_set - self.provisioning_state = None - self.instance_view = None - self.license_type = license_type - self.vm_id = None - self.identity = identity - self.zones = zones diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/win_rm_configuration.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/win_rm_configuration.py deleted file mode 100644 index d8ac60610714..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/win_rm_configuration.py +++ /dev/null @@ -1,29 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class WinRMConfiguration(Model): - """Describes Windows Remote Management configuration of the VM. - - :param listeners: The list of Windows Remote Management listeners - :type listeners: - list[~azure.mgmt.compute.v2017_12_01.models.WinRMListener] - """ - - _attribute_map = { - 'listeners': {'key': 'listeners', 'type': '[WinRMListener]'}, - } - - def __init__(self, **kwargs): - super(WinRMConfiguration, self).__init__(**kwargs) - self.listeners = kwargs.get('listeners', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/win_rm_configuration_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/win_rm_configuration_py3.py deleted file mode 100644 index 6a75a94247b6..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/win_rm_configuration_py3.py +++ /dev/null @@ -1,29 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class WinRMConfiguration(Model): - """Describes Windows Remote Management configuration of the VM. - - :param listeners: The list of Windows Remote Management listeners - :type listeners: - list[~azure.mgmt.compute.v2017_12_01.models.WinRMListener] - """ - - _attribute_map = { - 'listeners': {'key': 'listeners', 'type': '[WinRMListener]'}, - } - - def __init__(self, *, listeners=None, **kwargs) -> None: - super(WinRMConfiguration, self).__init__(**kwargs) - self.listeners = listeners diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/win_rm_listener.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/win_rm_listener.py deleted file mode 100644 index 223d34368cfa..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/win_rm_listener.py +++ /dev/null @@ -1,42 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class WinRMListener(Model): - """Describes Protocol and thumbprint of Windows Remote Management listener. - - :param protocol: Specifies the protocol of listener.

    Possible - values are:
    **http**

    **https**. Possible values include: - 'Http', 'Https' - :type protocol: str or - ~azure.mgmt.compute.v2017_12_01.models.ProtocolTypes - :param certificate_url: This is the URL of a certificate that has been - uploaded to Key Vault as a secret. For adding a secret to the Key Vault, - see [Add a key or secret to the key - vault](https://docs.microsoft.com/azure/key-vault/key-vault-get-started/#add). - In this case, your certificate needs to be It is the Base64 encoding of - the following JSON Object which is encoded in UTF-8:

    {
    - "data":"",
    "dataType":"pfx",
    - "password":""
    } - :type certificate_url: str - """ - - _attribute_map = { - 'protocol': {'key': 'protocol', 'type': 'ProtocolTypes'}, - 'certificate_url': {'key': 'certificateUrl', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(WinRMListener, self).__init__(**kwargs) - self.protocol = kwargs.get('protocol', None) - self.certificate_url = kwargs.get('certificate_url', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/win_rm_listener_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/win_rm_listener_py3.py deleted file mode 100644 index e6e57e1197e9..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/win_rm_listener_py3.py +++ /dev/null @@ -1,42 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class WinRMListener(Model): - """Describes Protocol and thumbprint of Windows Remote Management listener. - - :param protocol: Specifies the protocol of listener.

    Possible - values are:
    **http**

    **https**. Possible values include: - 'Http', 'Https' - :type protocol: str or - ~azure.mgmt.compute.v2017_12_01.models.ProtocolTypes - :param certificate_url: This is the URL of a certificate that has been - uploaded to Key Vault as a secret. For adding a secret to the Key Vault, - see [Add a key or secret to the key - vault](https://docs.microsoft.com/azure/key-vault/key-vault-get-started/#add). - In this case, your certificate needs to be It is the Base64 encoding of - the following JSON Object which is encoded in UTF-8:

    {
    - "data":"",
    "dataType":"pfx",
    - "password":""
    } - :type certificate_url: str - """ - - _attribute_map = { - 'protocol': {'key': 'protocol', 'type': 'ProtocolTypes'}, - 'certificate_url': {'key': 'certificateUrl', 'type': 'str'}, - } - - def __init__(self, *, protocol=None, certificate_url: str=None, **kwargs) -> None: - super(WinRMListener, self).__init__(**kwargs) - self.protocol = protocol - self.certificate_url = certificate_url diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/windows_configuration.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/windows_configuration.py deleted file mode 100644 index 4b4016a17154..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/windows_configuration.py +++ /dev/null @@ -1,54 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class WindowsConfiguration(Model): - """Specifies Windows operating system settings on the virtual machine. - - :param provision_vm_agent: Indicates whether virtual machine agent should - be provisioned on the virtual machine.

    When this property is not - specified in the request body, default behavior is to set it to true. - This will ensure that VM Agent is installed on the VM so that extensions - can be added to the VM later. - :type provision_vm_agent: bool - :param enable_automatic_updates: Indicates whether virtual machine is - enabled for automatic updates. - :type enable_automatic_updates: bool - :param time_zone: Specifies the time zone of the virtual machine. e.g. - "Pacific Standard Time" - :type time_zone: str - :param additional_unattend_content: Specifies additional base-64 encoded - XML formatted information that can be included in the Unattend.xml file, - which is used by Windows Setup. - :type additional_unattend_content: - list[~azure.mgmt.compute.v2017_12_01.models.AdditionalUnattendContent] - :param win_rm: Specifies the Windows Remote Management listeners. This - enables remote Windows PowerShell. - :type win_rm: ~azure.mgmt.compute.v2017_12_01.models.WinRMConfiguration - """ - - _attribute_map = { - 'provision_vm_agent': {'key': 'provisionVMAgent', 'type': 'bool'}, - 'enable_automatic_updates': {'key': 'enableAutomaticUpdates', 'type': 'bool'}, - 'time_zone': {'key': 'timeZone', 'type': 'str'}, - 'additional_unattend_content': {'key': 'additionalUnattendContent', 'type': '[AdditionalUnattendContent]'}, - 'win_rm': {'key': 'winRM', 'type': 'WinRMConfiguration'}, - } - - def __init__(self, **kwargs): - super(WindowsConfiguration, self).__init__(**kwargs) - self.provision_vm_agent = kwargs.get('provision_vm_agent', None) - self.enable_automatic_updates = kwargs.get('enable_automatic_updates', None) - self.time_zone = kwargs.get('time_zone', None) - self.additional_unattend_content = kwargs.get('additional_unattend_content', None) - self.win_rm = kwargs.get('win_rm', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/windows_configuration_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/windows_configuration_py3.py deleted file mode 100644 index 8f7e37c98e4c..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/windows_configuration_py3.py +++ /dev/null @@ -1,54 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class WindowsConfiguration(Model): - """Specifies Windows operating system settings on the virtual machine. - - :param provision_vm_agent: Indicates whether virtual machine agent should - be provisioned on the virtual machine.

    When this property is not - specified in the request body, default behavior is to set it to true. - This will ensure that VM Agent is installed on the VM so that extensions - can be added to the VM later. - :type provision_vm_agent: bool - :param enable_automatic_updates: Indicates whether virtual machine is - enabled for automatic updates. - :type enable_automatic_updates: bool - :param time_zone: Specifies the time zone of the virtual machine. e.g. - "Pacific Standard Time" - :type time_zone: str - :param additional_unattend_content: Specifies additional base-64 encoded - XML formatted information that can be included in the Unattend.xml file, - which is used by Windows Setup. - :type additional_unattend_content: - list[~azure.mgmt.compute.v2017_12_01.models.AdditionalUnattendContent] - :param win_rm: Specifies the Windows Remote Management listeners. This - enables remote Windows PowerShell. - :type win_rm: ~azure.mgmt.compute.v2017_12_01.models.WinRMConfiguration - """ - - _attribute_map = { - 'provision_vm_agent': {'key': 'provisionVMAgent', 'type': 'bool'}, - 'enable_automatic_updates': {'key': 'enableAutomaticUpdates', 'type': 'bool'}, - 'time_zone': {'key': 'timeZone', 'type': 'str'}, - 'additional_unattend_content': {'key': 'additionalUnattendContent', 'type': '[AdditionalUnattendContent]'}, - 'win_rm': {'key': 'winRM', 'type': 'WinRMConfiguration'}, - } - - def __init__(self, *, provision_vm_agent: bool=None, enable_automatic_updates: bool=None, time_zone: str=None, additional_unattend_content=None, win_rm=None, **kwargs) -> None: - super(WindowsConfiguration, self).__init__(**kwargs) - self.provision_vm_agent = provision_vm_agent - self.enable_automatic_updates = enable_automatic_updates - self.time_zone = time_zone - self.additional_unattend_content = additional_unattend_content - self.win_rm = win_rm diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/operations/__init__.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/operations/__init__.py index 2189f2aae9a9..34498dae1e7b 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/operations/__init__.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/operations/__init__.py @@ -9,21 +9,21 @@ # regenerated. # -------------------------------------------------------------------------- -from .operations import Operations -from .availability_sets_operations import AvailabilitySetsOperations -from .virtual_machine_extension_images_operations import VirtualMachineExtensionImagesOperations -from .virtual_machine_extensions_operations import VirtualMachineExtensionsOperations -from .virtual_machines_operations import VirtualMachinesOperations -from .virtual_machine_images_operations import VirtualMachineImagesOperations -from .usage_operations import UsageOperations -from .virtual_machine_sizes_operations import VirtualMachineSizesOperations -from .images_operations import ImagesOperations -from .virtual_machine_scale_sets_operations import VirtualMachineScaleSetsOperations -from .virtual_machine_scale_set_extensions_operations import VirtualMachineScaleSetExtensionsOperations -from .virtual_machine_scale_set_rolling_upgrades_operations import VirtualMachineScaleSetRollingUpgradesOperations -from .virtual_machine_scale_set_vms_operations import VirtualMachineScaleSetVMsOperations -from .log_analytics_operations import LogAnalyticsOperations -from .virtual_machine_run_commands_operations import VirtualMachineRunCommandsOperations +from ._operations import Operations +from ._availability_sets_operations import AvailabilitySetsOperations +from ._virtual_machine_extension_images_operations import VirtualMachineExtensionImagesOperations +from ._virtual_machine_extensions_operations import VirtualMachineExtensionsOperations +from ._virtual_machines_operations import VirtualMachinesOperations +from ._virtual_machine_images_operations import VirtualMachineImagesOperations +from ._usage_operations import UsageOperations +from ._virtual_machine_sizes_operations import VirtualMachineSizesOperations +from ._images_operations import ImagesOperations +from ._virtual_machine_scale_sets_operations import VirtualMachineScaleSetsOperations +from ._virtual_machine_scale_set_extensions_operations import VirtualMachineScaleSetExtensionsOperations +from ._virtual_machine_scale_set_rolling_upgrades_operations import VirtualMachineScaleSetRollingUpgradesOperations +from ._virtual_machine_scale_set_vms_operations import VirtualMachineScaleSetVMsOperations +from ._log_analytics_operations import LogAnalyticsOperations +from ._virtual_machine_run_commands_operations import VirtualMachineRunCommandsOperations __all__ = [ 'Operations', diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/operations/_availability_sets_operations.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/operations/_availability_sets_operations.py new file mode 100644 index 000000000000..b62f0424454f --- /dev/null +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/operations/_availability_sets_operations.py @@ -0,0 +1,508 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse +from msrestazure.azure_exceptions import CloudError + +from .. import models + + +class AvailabilitySetsOperations(object): + """AvailabilitySetsOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: Client Api Version. Constant value: "2017-12-01". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2017-12-01" + + self.config = config + + def create_or_update( + self, resource_group_name, availability_set_name, parameters, custom_headers=None, raw=False, **operation_config): + """Create or update an availability set. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param availability_set_name: The name of the availability set. + :type availability_set_name: str + :param parameters: Parameters supplied to the Create Availability Set + operation. + :type parameters: + ~azure.mgmt.compute.v2017_12_01.models.AvailabilitySet + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: AvailabilitySet or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.compute.v2017_12_01.models.AvailabilitySet or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.create_or_update.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'availabilitySetName': self._serialize.url("availability_set_name", availability_set_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(parameters, 'AvailabilitySet') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('AvailabilitySet', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}'} + + def update( + self, resource_group_name, availability_set_name, parameters, custom_headers=None, raw=False, **operation_config): + """Update an availability set. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param availability_set_name: The name of the availability set. + :type availability_set_name: str + :param parameters: Parameters supplied to the Update Availability Set + operation. + :type parameters: + ~azure.mgmt.compute.v2017_12_01.models.AvailabilitySetUpdate + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: AvailabilitySet or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.compute.v2017_12_01.models.AvailabilitySet or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.update.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'availabilitySetName': self._serialize.url("availability_set_name", availability_set_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(parameters, 'AvailabilitySetUpdate') + + # Construct and send request + request = self._client.patch(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('AvailabilitySet', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}'} + + def delete( + self, resource_group_name, availability_set_name, custom_headers=None, raw=False, **operation_config): + """Delete an availability set. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param availability_set_name: The name of the availability set. + :type availability_set_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: OperationStatusResponse or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.compute.v2017_12_01.models.OperationStatusResponse + or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.delete.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'availabilitySetName': self._serialize.url("availability_set_name", availability_set_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 204]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('OperationStatusResponse', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}'} + + def get( + self, resource_group_name, availability_set_name, custom_headers=None, raw=False, **operation_config): + """Retrieves information about an availability set. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param availability_set_name: The name of the availability set. + :type availability_set_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: AvailabilitySet or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.compute.v2017_12_01.models.AvailabilitySet or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'availabilitySetName': self._serialize.url("availability_set_name", availability_set_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('AvailabilitySet', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}'} + + def list_by_subscription( + self, custom_headers=None, raw=False, **operation_config): + """Lists all availability sets in a subscription. + + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of AvailabilitySet + :rtype: + ~azure.mgmt.compute.v2017_12_01.models.AvailabilitySetPaged[~azure.mgmt.compute.v2017_12_01.models.AvailabilitySet] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_by_subscription.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.AvailabilitySetPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_by_subscription.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Compute/availabilitySets'} + + def list( + self, resource_group_name, custom_headers=None, raw=False, **operation_config): + """Lists all availability sets in a resource group. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of AvailabilitySet + :rtype: + ~azure.mgmt.compute.v2017_12_01.models.AvailabilitySetPaged[~azure.mgmt.compute.v2017_12_01.models.AvailabilitySet] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.AvailabilitySetPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets'} + + def list_available_sizes( + self, resource_group_name, availability_set_name, custom_headers=None, raw=False, **operation_config): + """Lists all available virtual machine sizes that can be used to create a + new virtual machine in an existing availability set. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param availability_set_name: The name of the availability set. + :type availability_set_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of VirtualMachineSize + :rtype: + ~azure.mgmt.compute.v2017_12_01.models.VirtualMachineSizePaged[~azure.mgmt.compute.v2017_12_01.models.VirtualMachineSize] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_available_sizes.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'availabilitySetName': self._serialize.url("availability_set_name", availability_set_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.VirtualMachineSizePaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_available_sizes.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}/vmSizes'} diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/operations/_images_operations.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/operations/_images_operations.py new file mode 100644 index 000000000000..fa1e8bf20bf2 --- /dev/null +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/operations/_images_operations.py @@ -0,0 +1,541 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse +from msrestazure.azure_exceptions import CloudError +from msrest.polling import LROPoller, NoPolling +from msrestazure.polling.arm_polling import ARMPolling + +from .. import models + + +class ImagesOperations(object): + """ImagesOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: Client Api Version. Constant value: "2017-12-01". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2017-12-01" + + self.config = config + + + def _create_or_update_initial( + self, resource_group_name, image_name, parameters, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.create_or_update.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'imageName': self._serialize.url("image_name", image_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(parameters, 'Image') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 201]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('Image', response) + if response.status_code == 201: + deserialized = self._deserialize('Image', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def create_or_update( + self, resource_group_name, image_name, parameters, custom_headers=None, raw=False, polling=True, **operation_config): + """Create or update an image. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param image_name: The name of the image. + :type image_name: str + :param parameters: Parameters supplied to the Create Image operation. + :type parameters: ~azure.mgmt.compute.v2017_12_01.models.Image + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns Image or + ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2017_12_01.models.Image] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2017_12_01.models.Image]] + :raises: :class:`CloudError` + """ + raw_result = self._create_or_update_initial( + resource_group_name=resource_group_name, + image_name=image_name, + parameters=parameters, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('Image', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/images/{imageName}'} + + + def _update_initial( + self, resource_group_name, image_name, parameters, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.update.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'imageName': self._serialize.url("image_name", image_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(parameters, 'ImageUpdate') + + # Construct and send request + request = self._client.patch(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 201]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('Image', response) + if response.status_code == 201: + deserialized = self._deserialize('Image', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def update( + self, resource_group_name, image_name, parameters, custom_headers=None, raw=False, polling=True, **operation_config): + """Update an image. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param image_name: The name of the image. + :type image_name: str + :param parameters: Parameters supplied to the Update Image operation. + :type parameters: ~azure.mgmt.compute.v2017_12_01.models.ImageUpdate + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns Image or + ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2017_12_01.models.Image] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2017_12_01.models.Image]] + :raises: :class:`CloudError` + """ + raw_result = self._update_initial( + resource_group_name=resource_group_name, + image_name=image_name, + parameters=parameters, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('Image', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/images/{imageName}'} + + + def _delete_initial( + self, resource_group_name, image_name, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.delete.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'imageName': self._serialize.url("image_name", image_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202, 204]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('OperationStatusResponse', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def delete( + self, resource_group_name, image_name, custom_headers=None, raw=False, polling=True, **operation_config): + """Deletes an Image. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param image_name: The name of the image. + :type image_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns OperationStatusResponse + or ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2017_12_01.models.OperationStatusResponse] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2017_12_01.models.OperationStatusResponse]] + :raises: :class:`CloudError` + """ + raw_result = self._delete_initial( + resource_group_name=resource_group_name, + image_name=image_name, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('OperationStatusResponse', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/images/{imageName}'} + + def get( + self, resource_group_name, image_name, expand=None, custom_headers=None, raw=False, **operation_config): + """Gets an image. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param image_name: The name of the image. + :type image_name: str + :param expand: The expand expression to apply on the operation. + :type expand: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: Image or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.compute.v2017_12_01.models.Image or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'imageName': self._serialize.url("image_name", image_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + if expand is not None: + query_parameters['$expand'] = self._serialize.query("expand", expand, 'str') + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('Image', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/images/{imageName}'} + + def list_by_resource_group( + self, resource_group_name, custom_headers=None, raw=False, **operation_config): + """Gets the list of images under a resource group. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of Image + :rtype: + ~azure.mgmt.compute.v2017_12_01.models.ImagePaged[~azure.mgmt.compute.v2017_12_01.models.Image] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_by_resource_group.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.ImagePaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/images'} + + def list( + self, custom_headers=None, raw=False, **operation_config): + """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. + + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of Image + :rtype: + ~azure.mgmt.compute.v2017_12_01.models.ImagePaged[~azure.mgmt.compute.v2017_12_01.models.Image] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.ImagePaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Compute/images'} diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/operations/_log_analytics_operations.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/operations/_log_analytics_operations.py new file mode 100644 index 000000000000..24f75df81dd7 --- /dev/null +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/operations/_log_analytics_operations.py @@ -0,0 +1,244 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse +from msrestazure.azure_exceptions import CloudError +from msrest.polling import LROPoller, NoPolling +from msrestazure.polling.arm_polling import ARMPolling + +from .. import models + + +class LogAnalyticsOperations(object): + """LogAnalyticsOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: Client Api Version. Constant value: "2017-12-01". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2017-12-01" + + self.config = config + + + def _export_request_rate_by_interval_initial( + self, parameters, location, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.export_request_rate_by_interval.metadata['url'] + path_format_arguments = { + 'location': self._serialize.url("location", location, 'str', pattern=r'^[-\w\._]+$'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(parameters, 'RequestRateByIntervalInput') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('LogAnalyticsOperationResult', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def export_request_rate_by_interval( + self, parameters, location, custom_headers=None, raw=False, polling=True, **operation_config): + """Export logs that show Api requests made by this subscription in the + given time window to show throttling activities. + + :param parameters: Parameters supplied to the LogAnalytics + getRequestRateByInterval Api. + :type parameters: + ~azure.mgmt.compute.v2017_12_01.models.RequestRateByIntervalInput + :param location: The location upon which virtual-machine-sizes is + queried. + :type location: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns + LogAnalyticsOperationResult or + ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2017_12_01.models.LogAnalyticsOperationResult] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2017_12_01.models.LogAnalyticsOperationResult]] + :raises: :class:`CloudError` + """ + raw_result = self._export_request_rate_by_interval_initial( + parameters=parameters, + location=location, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('LogAnalyticsOperationResult', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + export_request_rate_by_interval.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/logAnalytics/apiAccess/getRequestRateByInterval'} + + + def _export_throttled_requests_initial( + self, parameters, location, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.export_throttled_requests.metadata['url'] + path_format_arguments = { + 'location': self._serialize.url("location", location, 'str', pattern=r'^[-\w\._]+$'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(parameters, 'ThrottledRequestsInput') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('LogAnalyticsOperationResult', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def export_throttled_requests( + self, parameters, location, custom_headers=None, raw=False, polling=True, **operation_config): + """Export logs that show total throttled Api requests for this + subscription in the given time window. + + :param parameters: Parameters supplied to the LogAnalytics + getThrottledRequests Api. + :type parameters: + ~azure.mgmt.compute.v2017_12_01.models.ThrottledRequestsInput + :param location: The location upon which virtual-machine-sizes is + queried. + :type location: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns + LogAnalyticsOperationResult or + ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2017_12_01.models.LogAnalyticsOperationResult] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2017_12_01.models.LogAnalyticsOperationResult]] + :raises: :class:`CloudError` + """ + raw_result = self._export_throttled_requests_initial( + parameters=parameters, + location=location, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('LogAnalyticsOperationResult', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + export_throttled_requests.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/logAnalytics/apiAccess/getThrottledRequests'} diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/operations/_operations.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/operations/_operations.py new file mode 100644 index 000000000000..55351f4eb281 --- /dev/null +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/operations/_operations.py @@ -0,0 +1,102 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse +from msrestazure.azure_exceptions import CloudError + +from .. import models + + +class Operations(object): + """Operations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: Client Api Version. Constant value: "2017-12-01". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2017-12-01" + + self.config = config + + def list( + self, custom_headers=None, raw=False, **operation_config): + """Gets a list of compute operations. + + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of ComputeOperationValue + :rtype: + ~azure.mgmt.compute.v2017_12_01.models.ComputeOperationValuePaged[~azure.mgmt.compute.v2017_12_01.models.ComputeOperationValue] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list.metadata['url'] + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.ComputeOperationValuePaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list.metadata = {'url': '/providers/Microsoft.Compute/operations'} diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/operations/_usage_operations.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/operations/_usage_operations.py new file mode 100644 index 000000000000..a0388cb71e6b --- /dev/null +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/operations/_usage_operations.py @@ -0,0 +1,111 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse +from msrestazure.azure_exceptions import CloudError + +from .. import models + + +class UsageOperations(object): + """UsageOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: Client Api Version. Constant value: "2017-12-01". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2017-12-01" + + self.config = config + + def list( + self, location, custom_headers=None, raw=False, **operation_config): + """Gets, for the specified location, the current compute resource usage + information as well as the limits for compute resources under the + subscription. + + :param location: The location for which resource usage is queried. + :type location: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of Usage + :rtype: + ~azure.mgmt.compute.v2017_12_01.models.UsagePaged[~azure.mgmt.compute.v2017_12_01.models.Usage] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list.metadata['url'] + path_format_arguments = { + 'location': self._serialize.url("location", location, 'str', pattern=r'^[-\w\._]+$'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.UsagePaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/usages'} diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/operations/_virtual_machine_extension_images_operations.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/operations/_virtual_machine_extension_images_operations.py new file mode 100644 index 000000000000..b7591f4d2f37 --- /dev/null +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/operations/_virtual_machine_extension_images_operations.py @@ -0,0 +1,247 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse +from msrestazure.azure_exceptions import CloudError + +from .. import models + + +class VirtualMachineExtensionImagesOperations(object): + """VirtualMachineExtensionImagesOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: Client Api Version. Constant value: "2017-12-01". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2017-12-01" + + self.config = config + + def get( + self, location, publisher_name, type, version, custom_headers=None, raw=False, **operation_config): + """Gets a virtual machine extension image. + + :param location: The name of a supported Azure region. + :type location: str + :param publisher_name: + :type publisher_name: str + :param type: + :type type: str + :param version: + :type version: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: VirtualMachineExtensionImage or ClientRawResponse if raw=true + :rtype: + ~azure.mgmt.compute.v2017_12_01.models.VirtualMachineExtensionImage or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'location': self._serialize.url("location", location, 'str'), + 'publisherName': self._serialize.url("publisher_name", publisher_name, 'str'), + 'type': self._serialize.url("type", type, 'str'), + 'version': self._serialize.url("version", version, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('VirtualMachineExtensionImage', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/publishers/{publisherName}/artifacttypes/vmextension/types/{type}/versions/{version}'} + + def list_types( + self, location, publisher_name, custom_headers=None, raw=False, **operation_config): + """Gets a list of virtual machine extension image types. + + :param location: The name of a supported Azure region. + :type location: str + :param publisher_name: + :type publisher_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: list or ClientRawResponse if raw=true + :rtype: + list[~azure.mgmt.compute.v2017_12_01.models.VirtualMachineExtensionImage] + or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.list_types.metadata['url'] + path_format_arguments = { + 'location': self._serialize.url("location", location, 'str'), + 'publisherName': self._serialize.url("publisher_name", publisher_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('[VirtualMachineExtensionImage]', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + list_types.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/publishers/{publisherName}/artifacttypes/vmextension/types'} + + def list_versions( + self, location, publisher_name, type, filter=None, top=None, orderby=None, custom_headers=None, raw=False, **operation_config): + """Gets a list of virtual machine extension image versions. + + :param location: The name of a supported Azure region. + :type location: str + :param publisher_name: + :type publisher_name: str + :param type: + :type type: str + :param filter: The filter to apply on the operation. + :type filter: str + :param top: + :type top: int + :param orderby: + :type orderby: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: list or ClientRawResponse if raw=true + :rtype: + list[~azure.mgmt.compute.v2017_12_01.models.VirtualMachineExtensionImage] + or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.list_versions.metadata['url'] + path_format_arguments = { + 'location': self._serialize.url("location", location, 'str'), + 'publisherName': self._serialize.url("publisher_name", publisher_name, 'str'), + 'type': self._serialize.url("type", type, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + if filter is not None: + query_parameters['$filter'] = self._serialize.query("filter", filter, 'str') + if top is not None: + query_parameters['$top'] = self._serialize.query("top", top, 'int') + if orderby is not None: + query_parameters['$orderby'] = self._serialize.query("orderby", orderby, 'str') + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('[VirtualMachineExtensionImage]', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + list_versions.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/publishers/{publisherName}/artifacttypes/vmextension/types/{type}/versions'} diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/operations/_virtual_machine_extensions_operations.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/operations/_virtual_machine_extensions_operations.py new file mode 100644 index 000000000000..d85b9539ba31 --- /dev/null +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/operations/_virtual_machine_extensions_operations.py @@ -0,0 +1,425 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse +from msrestazure.azure_exceptions import CloudError +from msrest.polling import LROPoller, NoPolling +from msrestazure.polling.arm_polling import ARMPolling + +from .. import models + + +class VirtualMachineExtensionsOperations(object): + """VirtualMachineExtensionsOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: Client Api Version. Constant value: "2017-12-01". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2017-12-01" + + self.config = config + + + def _create_or_update_initial( + self, resource_group_name, vm_name, vm_extension_name, extension_parameters, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.create_or_update.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vmName': self._serialize.url("vm_name", vm_name, 'str'), + 'vmExtensionName': self._serialize.url("vm_extension_name", vm_extension_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(extension_parameters, 'VirtualMachineExtension') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 201]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('VirtualMachineExtension', response) + if response.status_code == 201: + deserialized = self._deserialize('VirtualMachineExtension', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def create_or_update( + self, resource_group_name, vm_name, vm_extension_name, extension_parameters, custom_headers=None, raw=False, polling=True, **operation_config): + """The operation to create or update the extension. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param vm_name: The name of the virtual machine where the extension + should be created or updated. + :type vm_name: str + :param vm_extension_name: The name of the virtual machine extension. + :type vm_extension_name: str + :param extension_parameters: Parameters supplied to the Create Virtual + Machine Extension operation. + :type extension_parameters: + ~azure.mgmt.compute.v2017_12_01.models.VirtualMachineExtension + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns VirtualMachineExtension + or ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2017_12_01.models.VirtualMachineExtension] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2017_12_01.models.VirtualMachineExtension]] + :raises: :class:`CloudError` + """ + raw_result = self._create_or_update_initial( + resource_group_name=resource_group_name, + vm_name=vm_name, + vm_extension_name=vm_extension_name, + extension_parameters=extension_parameters, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('VirtualMachineExtension', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/extensions/{vmExtensionName}'} + + + def _update_initial( + self, resource_group_name, vm_name, vm_extension_name, extension_parameters, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.update.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vmName': self._serialize.url("vm_name", vm_name, 'str'), + 'vmExtensionName': self._serialize.url("vm_extension_name", vm_extension_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(extension_parameters, 'VirtualMachineExtensionUpdate') + + # Construct and send request + request = self._client.patch(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('VirtualMachineExtension', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def update( + self, resource_group_name, vm_name, vm_extension_name, extension_parameters, custom_headers=None, raw=False, polling=True, **operation_config): + """The operation to update the extension. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param vm_name: The name of the virtual machine where the extension + should be updated. + :type vm_name: str + :param vm_extension_name: The name of the virtual machine extension. + :type vm_extension_name: str + :param extension_parameters: Parameters supplied to the Update Virtual + Machine Extension operation. + :type extension_parameters: + ~azure.mgmt.compute.v2017_12_01.models.VirtualMachineExtensionUpdate + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns VirtualMachineExtension + or ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2017_12_01.models.VirtualMachineExtension] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2017_12_01.models.VirtualMachineExtension]] + :raises: :class:`CloudError` + """ + raw_result = self._update_initial( + resource_group_name=resource_group_name, + vm_name=vm_name, + vm_extension_name=vm_extension_name, + extension_parameters=extension_parameters, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('VirtualMachineExtension', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/extensions/{vmExtensionName}'} + + + def _delete_initial( + self, resource_group_name, vm_name, vm_extension_name, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.delete.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vmName': self._serialize.url("vm_name", vm_name, 'str'), + 'vmExtensionName': self._serialize.url("vm_extension_name", vm_extension_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202, 204]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('OperationStatusResponse', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def delete( + self, resource_group_name, vm_name, vm_extension_name, custom_headers=None, raw=False, polling=True, **operation_config): + """The operation to delete the extension. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param vm_name: The name of the virtual machine where the extension + should be deleted. + :type vm_name: str + :param vm_extension_name: The name of the virtual machine extension. + :type vm_extension_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns OperationStatusResponse + or ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2017_12_01.models.OperationStatusResponse] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2017_12_01.models.OperationStatusResponse]] + :raises: :class:`CloudError` + """ + raw_result = self._delete_initial( + resource_group_name=resource_group_name, + vm_name=vm_name, + vm_extension_name=vm_extension_name, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('OperationStatusResponse', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/extensions/{vmExtensionName}'} + + def get( + self, resource_group_name, vm_name, vm_extension_name, expand=None, custom_headers=None, raw=False, **operation_config): + """The operation to get the extension. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param vm_name: The name of the virtual machine containing the + extension. + :type vm_name: str + :param vm_extension_name: The name of the virtual machine extension. + :type vm_extension_name: str + :param expand: The expand expression to apply on the operation. + :type expand: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: VirtualMachineExtension or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.compute.v2017_12_01.models.VirtualMachineExtension + or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vmName': self._serialize.url("vm_name", vm_name, 'str'), + 'vmExtensionName': self._serialize.url("vm_extension_name", vm_extension_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + if expand is not None: + query_parameters['$expand'] = self._serialize.query("expand", expand, 'str') + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('VirtualMachineExtension', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/extensions/{vmExtensionName}'} diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/operations/_virtual_machine_images_operations.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/operations/_virtual_machine_images_operations.py new file mode 100644 index 000000000000..88a74a51a7b6 --- /dev/null +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/operations/_virtual_machine_images_operations.py @@ -0,0 +1,380 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse +from msrestazure.azure_exceptions import CloudError + +from .. import models + + +class VirtualMachineImagesOperations(object): + """VirtualMachineImagesOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: Client Api Version. Constant value: "2017-12-01". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2017-12-01" + + self.config = config + + def get( + self, location, publisher_name, offer, skus, version, custom_headers=None, raw=False, **operation_config): + """Gets a virtual machine image. + + :param location: The name of a supported Azure region. + :type location: str + :param publisher_name: A valid image publisher. + :type publisher_name: str + :param offer: A valid image publisher offer. + :type offer: str + :param skus: A valid image SKU. + :type skus: str + :param version: A valid image SKU version. + :type version: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: VirtualMachineImage or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.compute.v2017_12_01.models.VirtualMachineImage or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'location': self._serialize.url("location", location, 'str'), + 'publisherName': self._serialize.url("publisher_name", publisher_name, 'str'), + 'offer': self._serialize.url("offer", offer, 'str'), + 'skus': self._serialize.url("skus", skus, 'str'), + 'version': self._serialize.url("version", version, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('VirtualMachineImage', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/publishers/{publisherName}/artifacttypes/vmimage/offers/{offer}/skus/{skus}/versions/{version}'} + + def list( + self, location, publisher_name, offer, skus, filter=None, top=None, orderby=None, custom_headers=None, raw=False, **operation_config): + """Gets a list of all virtual machine image versions for the specified + location, publisher, offer, and SKU. + + :param location: The name of a supported Azure region. + :type location: str + :param publisher_name: A valid image publisher. + :type publisher_name: str + :param offer: A valid image publisher offer. + :type offer: str + :param skus: A valid image SKU. + :type skus: str + :param filter: The filter to apply on the operation. + :type filter: str + :param top: + :type top: int + :param orderby: + :type orderby: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: list or ClientRawResponse if raw=true + :rtype: + list[~azure.mgmt.compute.v2017_12_01.models.VirtualMachineImageResource] + or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.list.metadata['url'] + path_format_arguments = { + 'location': self._serialize.url("location", location, 'str'), + 'publisherName': self._serialize.url("publisher_name", publisher_name, 'str'), + 'offer': self._serialize.url("offer", offer, 'str'), + 'skus': self._serialize.url("skus", skus, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + if filter is not None: + query_parameters['$filter'] = self._serialize.query("filter", filter, 'str') + if top is not None: + query_parameters['$top'] = self._serialize.query("top", top, 'int') + if orderby is not None: + query_parameters['$orderby'] = self._serialize.query("orderby", orderby, 'str') + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('[VirtualMachineImageResource]', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/publishers/{publisherName}/artifacttypes/vmimage/offers/{offer}/skus/{skus}/versions'} + + def list_offers( + self, location, publisher_name, custom_headers=None, raw=False, **operation_config): + """Gets a list of virtual machine image offers for the specified location + and publisher. + + :param location: The name of a supported Azure region. + :type location: str + :param publisher_name: A valid image publisher. + :type publisher_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: list or ClientRawResponse if raw=true + :rtype: + list[~azure.mgmt.compute.v2017_12_01.models.VirtualMachineImageResource] + or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.list_offers.metadata['url'] + path_format_arguments = { + 'location': self._serialize.url("location", location, 'str'), + 'publisherName': self._serialize.url("publisher_name", publisher_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('[VirtualMachineImageResource]', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + list_offers.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/publishers/{publisherName}/artifacttypes/vmimage/offers'} + + def list_publishers( + self, location, custom_headers=None, raw=False, **operation_config): + """Gets a list of virtual machine image publishers for the specified Azure + location. + + :param location: The name of a supported Azure region. + :type location: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: list or ClientRawResponse if raw=true + :rtype: + list[~azure.mgmt.compute.v2017_12_01.models.VirtualMachineImageResource] + or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.list_publishers.metadata['url'] + path_format_arguments = { + 'location': self._serialize.url("location", location, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('[VirtualMachineImageResource]', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + list_publishers.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/publishers'} + + def list_skus( + self, location, publisher_name, offer, custom_headers=None, raw=False, **operation_config): + """Gets a list of virtual machine image SKUs for the specified location, + publisher, and offer. + + :param location: The name of a supported Azure region. + :type location: str + :param publisher_name: A valid image publisher. + :type publisher_name: str + :param offer: A valid image publisher offer. + :type offer: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: list or ClientRawResponse if raw=true + :rtype: + list[~azure.mgmt.compute.v2017_12_01.models.VirtualMachineImageResource] + or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.list_skus.metadata['url'] + path_format_arguments = { + 'location': self._serialize.url("location", location, 'str'), + 'publisherName': self._serialize.url("publisher_name", publisher_name, 'str'), + 'offer': self._serialize.url("offer", offer, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('[VirtualMachineImageResource]', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + list_skus.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/publishers/{publisherName}/artifacttypes/vmimage/offers/{offer}/skus'} diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/operations/_virtual_machine_run_commands_operations.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/operations/_virtual_machine_run_commands_operations.py new file mode 100644 index 000000000000..1948f89a62cf --- /dev/null +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/operations/_virtual_machine_run_commands_operations.py @@ -0,0 +1,170 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse +from msrestazure.azure_exceptions import CloudError + +from .. import models + + +class VirtualMachineRunCommandsOperations(object): + """VirtualMachineRunCommandsOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: Client Api Version. Constant value: "2017-12-01". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2017-12-01" + + self.config = config + + def list( + self, location, custom_headers=None, raw=False, **operation_config): + """Lists all available run commands for a subscription in a location. + + :param location: The location upon which run commands is queried. + :type location: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of RunCommandDocumentBase + :rtype: + ~azure.mgmt.compute.v2017_12_01.models.RunCommandDocumentBasePaged[~azure.mgmt.compute.v2017_12_01.models.RunCommandDocumentBase] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list.metadata['url'] + path_format_arguments = { + 'location': self._serialize.url("location", location, 'str', pattern=r'^[-\w\._]+$'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.RunCommandDocumentBasePaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/runCommands'} + + def get( + self, location, command_id, custom_headers=None, raw=False, **operation_config): + """Gets specific run command for a subscription in a location. + + :param location: The location upon which run commands is queried. + :type location: str + :param command_id: The command id. + :type command_id: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: RunCommandDocument or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.compute.v2017_12_01.models.RunCommandDocument or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'location': self._serialize.url("location", location, 'str', pattern=r'^[-\w\._]+$'), + 'commandId': self._serialize.url("command_id", command_id, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('RunCommandDocument', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/runCommands/{commandId}'} diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/operations/_virtual_machine_scale_set_extensions_operations.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/operations/_virtual_machine_scale_set_extensions_operations.py new file mode 100644 index 000000000000..c8db63b33bc1 --- /dev/null +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/operations/_virtual_machine_scale_set_extensions_operations.py @@ -0,0 +1,394 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse +from msrestazure.azure_exceptions import CloudError +from msrest.polling import LROPoller, NoPolling +from msrestazure.polling.arm_polling import ARMPolling + +from .. import models + + +class VirtualMachineScaleSetExtensionsOperations(object): + """VirtualMachineScaleSetExtensionsOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: Client Api Version. Constant value: "2017-12-01". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2017-12-01" + + self.config = config + + + def _create_or_update_initial( + self, resource_group_name, vm_scale_set_name, vmss_extension_name, extension_parameters, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.create_or_update.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), + 'vmssExtensionName': self._serialize.url("vmss_extension_name", vmss_extension_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(extension_parameters, 'VirtualMachineScaleSetExtension') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 201]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('VirtualMachineScaleSetExtension', response) + if response.status_code == 201: + deserialized = self._deserialize('VirtualMachineScaleSetExtension', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def create_or_update( + self, resource_group_name, vm_scale_set_name, vmss_extension_name, extension_parameters, custom_headers=None, raw=False, polling=True, **operation_config): + """The operation to create or update an extension. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param vm_scale_set_name: The name of the VM scale set where the + extension should be create or updated. + :type vm_scale_set_name: str + :param vmss_extension_name: The name of the VM scale set extension. + :type vmss_extension_name: str + :param extension_parameters: Parameters supplied to the Create VM + scale set Extension operation. + :type extension_parameters: + ~azure.mgmt.compute.v2017_12_01.models.VirtualMachineScaleSetExtension + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns + VirtualMachineScaleSetExtension or + ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2017_12_01.models.VirtualMachineScaleSetExtension] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2017_12_01.models.VirtualMachineScaleSetExtension]] + :raises: :class:`CloudError` + """ + raw_result = self._create_or_update_initial( + resource_group_name=resource_group_name, + vm_scale_set_name=vm_scale_set_name, + vmss_extension_name=vmss_extension_name, + extension_parameters=extension_parameters, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('VirtualMachineScaleSetExtension', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/extensions/{vmssExtensionName}'} + + + def _delete_initial( + self, resource_group_name, vm_scale_set_name, vmss_extension_name, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.delete.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), + 'vmssExtensionName': self._serialize.url("vmss_extension_name", vmss_extension_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202, 204]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('OperationStatusResponse', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def delete( + self, resource_group_name, vm_scale_set_name, vmss_extension_name, custom_headers=None, raw=False, polling=True, **operation_config): + """The operation to delete the extension. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param vm_scale_set_name: The name of the VM scale set where the + extension should be deleted. + :type vm_scale_set_name: str + :param vmss_extension_name: The name of the VM scale set extension. + :type vmss_extension_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns OperationStatusResponse + or ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2017_12_01.models.OperationStatusResponse] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2017_12_01.models.OperationStatusResponse]] + :raises: :class:`CloudError` + """ + raw_result = self._delete_initial( + resource_group_name=resource_group_name, + vm_scale_set_name=vm_scale_set_name, + vmss_extension_name=vmss_extension_name, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('OperationStatusResponse', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/extensions/{vmssExtensionName}'} + + def get( + self, resource_group_name, vm_scale_set_name, vmss_extension_name, expand=None, custom_headers=None, raw=False, **operation_config): + """The operation to get the extension. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param vm_scale_set_name: The name of the VM scale set containing the + extension. + :type vm_scale_set_name: str + :param vmss_extension_name: The name of the VM scale set extension. + :type vmss_extension_name: str + :param expand: The expand expression to apply on the operation. + :type expand: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: VirtualMachineScaleSetExtension or ClientRawResponse if + raw=true + :rtype: + ~azure.mgmt.compute.v2017_12_01.models.VirtualMachineScaleSetExtension + or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), + 'vmssExtensionName': self._serialize.url("vmss_extension_name", vmss_extension_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + if expand is not None: + query_parameters['$expand'] = self._serialize.query("expand", expand, 'str') + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('VirtualMachineScaleSetExtension', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/extensions/{vmssExtensionName}'} + + def list( + self, resource_group_name, vm_scale_set_name, custom_headers=None, raw=False, **operation_config): + """Gets a list of all extensions in a VM scale set. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param vm_scale_set_name: The name of the VM scale set containing the + extension. + :type vm_scale_set_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of VirtualMachineScaleSetExtension + :rtype: + ~azure.mgmt.compute.v2017_12_01.models.VirtualMachineScaleSetExtensionPaged[~azure.mgmt.compute.v2017_12_01.models.VirtualMachineScaleSetExtension] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.VirtualMachineScaleSetExtensionPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/extensions'} diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/operations/_virtual_machine_scale_set_rolling_upgrades_operations.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/operations/_virtual_machine_scale_set_rolling_upgrades_operations.py new file mode 100644 index 000000000000..1cc4c26f9959 --- /dev/null +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/operations/_virtual_machine_scale_set_rolling_upgrades_operations.py @@ -0,0 +1,294 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse +from msrestazure.azure_exceptions import CloudError +from msrest.polling import LROPoller, NoPolling +from msrestazure.polling.arm_polling import ARMPolling + +from .. import models + + +class VirtualMachineScaleSetRollingUpgradesOperations(object): + """VirtualMachineScaleSetRollingUpgradesOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: Client Api Version. Constant value: "2017-12-01". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2017-12-01" + + self.config = config + + + def _cancel_initial( + self, resource_group_name, vm_scale_set_name, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.cancel.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('OperationStatusResponse', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def cancel( + self, resource_group_name, vm_scale_set_name, custom_headers=None, raw=False, polling=True, **operation_config): + """Cancels the current virtual machine scale set rolling upgrade. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param vm_scale_set_name: The name of the VM scale set. + :type vm_scale_set_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns OperationStatusResponse + or ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2017_12_01.models.OperationStatusResponse] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2017_12_01.models.OperationStatusResponse]] + :raises: :class:`CloudError` + """ + raw_result = self._cancel_initial( + resource_group_name=resource_group_name, + vm_scale_set_name=vm_scale_set_name, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('OperationStatusResponse', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + cancel.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/rollingUpgrades/cancel'} + + + def _start_os_upgrade_initial( + self, resource_group_name, vm_scale_set_name, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.start_os_upgrade.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('OperationStatusResponse', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def start_os_upgrade( + self, resource_group_name, vm_scale_set_name, custom_headers=None, raw=False, polling=True, **operation_config): + """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. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param vm_scale_set_name: The name of the VM scale set. + :type vm_scale_set_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns OperationStatusResponse + or ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2017_12_01.models.OperationStatusResponse] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2017_12_01.models.OperationStatusResponse]] + :raises: :class:`CloudError` + """ + raw_result = self._start_os_upgrade_initial( + resource_group_name=resource_group_name, + vm_scale_set_name=vm_scale_set_name, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('OperationStatusResponse', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + start_os_upgrade.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/osRollingUpgrade'} + + def get_latest( + self, resource_group_name, vm_scale_set_name, custom_headers=None, raw=False, **operation_config): + """Gets the status of the latest virtual machine scale set rolling + upgrade. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param vm_scale_set_name: The name of the VM scale set. + :type vm_scale_set_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: RollingUpgradeStatusInfo or ClientRawResponse if raw=true + :rtype: + ~azure.mgmt.compute.v2017_12_01.models.RollingUpgradeStatusInfo or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get_latest.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('RollingUpgradeStatusInfo', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_latest.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/rollingUpgrades/latest'} diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/operations/_virtual_machine_scale_set_vms_operations.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/operations/_virtual_machine_scale_set_vms_operations.py new file mode 100644 index 000000000000..cbf1dc8dbe83 --- /dev/null +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/operations/_virtual_machine_scale_set_vms_operations.py @@ -0,0 +1,1249 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse +from msrestazure.azure_exceptions import CloudError +from msrest.polling import LROPoller, NoPolling +from msrestazure.polling.arm_polling import ARMPolling + +from .. import models + + +class VirtualMachineScaleSetVMsOperations(object): + """VirtualMachineScaleSetVMsOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: Client Api Version. Constant value: "2017-12-01". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2017-12-01" + + self.config = config + + + def _reimage_initial( + self, resource_group_name, vm_scale_set_name, instance_id, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.reimage.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), + 'instanceId': self._serialize.url("instance_id", instance_id, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('OperationStatusResponse', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def reimage( + self, resource_group_name, vm_scale_set_name, instance_id, custom_headers=None, raw=False, polling=True, **operation_config): + """Reimages (upgrade the operating system) a specific virtual machine in a + VM scale set. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param vm_scale_set_name: The name of the VM scale set. + :type vm_scale_set_name: str + :param instance_id: The instance ID of the virtual machine. + :type instance_id: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns OperationStatusResponse + or ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2017_12_01.models.OperationStatusResponse] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2017_12_01.models.OperationStatusResponse]] + :raises: :class:`CloudError` + """ + raw_result = self._reimage_initial( + resource_group_name=resource_group_name, + vm_scale_set_name=vm_scale_set_name, + instance_id=instance_id, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('OperationStatusResponse', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + reimage.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/virtualmachines/{instanceId}/reimage'} + + + def _reimage_all_initial( + self, resource_group_name, vm_scale_set_name, instance_id, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.reimage_all.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), + 'instanceId': self._serialize.url("instance_id", instance_id, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('OperationStatusResponse', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def reimage_all( + self, resource_group_name, vm_scale_set_name, instance_id, custom_headers=None, raw=False, polling=True, **operation_config): + """Allows you to re-image all the disks ( including data disks ) in the a + VM scale set instance. This operation is only supported for managed + disks. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param vm_scale_set_name: The name of the VM scale set. + :type vm_scale_set_name: str + :param instance_id: The instance ID of the virtual machine. + :type instance_id: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns OperationStatusResponse + or ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2017_12_01.models.OperationStatusResponse] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2017_12_01.models.OperationStatusResponse]] + :raises: :class:`CloudError` + """ + raw_result = self._reimage_all_initial( + resource_group_name=resource_group_name, + vm_scale_set_name=vm_scale_set_name, + instance_id=instance_id, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('OperationStatusResponse', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + reimage_all.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/virtualmachines/{instanceId}/reimageall'} + + + def _deallocate_initial( + self, resource_group_name, vm_scale_set_name, instance_id, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.deallocate.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), + 'instanceId': self._serialize.url("instance_id", instance_id, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('OperationStatusResponse', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def deallocate( + self, resource_group_name, vm_scale_set_name, instance_id, custom_headers=None, raw=False, polling=True, **operation_config): + """Deallocates a specific virtual machine in a VM scale set. Shuts down + the virtual machine and releases the compute resources it uses. You are + not billed for the compute resources of this virtual machine once it is + deallocated. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param vm_scale_set_name: The name of the VM scale set. + :type vm_scale_set_name: str + :param instance_id: The instance ID of the virtual machine. + :type instance_id: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns OperationStatusResponse + or ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2017_12_01.models.OperationStatusResponse] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2017_12_01.models.OperationStatusResponse]] + :raises: :class:`CloudError` + """ + raw_result = self._deallocate_initial( + resource_group_name=resource_group_name, + vm_scale_set_name=vm_scale_set_name, + instance_id=instance_id, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('OperationStatusResponse', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + deallocate.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/virtualmachines/{instanceId}/deallocate'} + + + def _update_initial( + self, resource_group_name, vm_scale_set_name, instance_id, parameters, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.update.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), + 'instanceId': self._serialize.url("instance_id", instance_id, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(parameters, 'VirtualMachineScaleSetVM') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('VirtualMachineScaleSetVM', response) + if response.status_code == 202: + deserialized = self._deserialize('VirtualMachineScaleSetVM', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def update( + self, resource_group_name, vm_scale_set_name, instance_id, parameters, custom_headers=None, raw=False, polling=True, **operation_config): + """Updates a virtual machine of a VM scale set. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param vm_scale_set_name: The name of the VM scale set where the + extension should be create or updated. + :type vm_scale_set_name: str + :param instance_id: The instance ID of the virtual machine. + :type instance_id: str + :param parameters: Parameters supplied to the Update Virtual Machine + Scale Sets VM operation. + :type parameters: + ~azure.mgmt.compute.v2017_12_01.models.VirtualMachineScaleSetVM + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns + VirtualMachineScaleSetVM or + ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2017_12_01.models.VirtualMachineScaleSetVM] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2017_12_01.models.VirtualMachineScaleSetVM]] + :raises: :class:`CloudError` + """ + raw_result = self._update_initial( + resource_group_name=resource_group_name, + vm_scale_set_name=vm_scale_set_name, + instance_id=instance_id, + parameters=parameters, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('VirtualMachineScaleSetVM', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/virtualmachines/{instanceId}'} + + + def _delete_initial( + self, resource_group_name, vm_scale_set_name, instance_id, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.delete.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), + 'instanceId': self._serialize.url("instance_id", instance_id, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202, 204]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('OperationStatusResponse', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def delete( + self, resource_group_name, vm_scale_set_name, instance_id, custom_headers=None, raw=False, polling=True, **operation_config): + """Deletes a virtual machine from a VM scale set. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param vm_scale_set_name: The name of the VM scale set. + :type vm_scale_set_name: str + :param instance_id: The instance ID of the virtual machine. + :type instance_id: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns OperationStatusResponse + or ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2017_12_01.models.OperationStatusResponse] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2017_12_01.models.OperationStatusResponse]] + :raises: :class:`CloudError` + """ + raw_result = self._delete_initial( + resource_group_name=resource_group_name, + vm_scale_set_name=vm_scale_set_name, + instance_id=instance_id, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('OperationStatusResponse', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/virtualmachines/{instanceId}'} + + def get( + self, resource_group_name, vm_scale_set_name, instance_id, custom_headers=None, raw=False, **operation_config): + """Gets a virtual machine from a VM scale set. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param vm_scale_set_name: The name of the VM scale set. + :type vm_scale_set_name: str + :param instance_id: The instance ID of the virtual machine. + :type instance_id: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: VirtualMachineScaleSetVM or ClientRawResponse if raw=true + :rtype: + ~azure.mgmt.compute.v2017_12_01.models.VirtualMachineScaleSetVM or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), + 'instanceId': self._serialize.url("instance_id", instance_id, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('VirtualMachineScaleSetVM', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/virtualmachines/{instanceId}'} + + def get_instance_view( + self, resource_group_name, vm_scale_set_name, instance_id, custom_headers=None, raw=False, **operation_config): + """Gets the status of a virtual machine from a VM scale set. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param vm_scale_set_name: The name of the VM scale set. + :type vm_scale_set_name: str + :param instance_id: The instance ID of the virtual machine. + :type instance_id: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: VirtualMachineScaleSetVMInstanceView or ClientRawResponse if + raw=true + :rtype: + ~azure.mgmt.compute.v2017_12_01.models.VirtualMachineScaleSetVMInstanceView + or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get_instance_view.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), + 'instanceId': self._serialize.url("instance_id", instance_id, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('VirtualMachineScaleSetVMInstanceView', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_instance_view.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/virtualmachines/{instanceId}/instanceView'} + + def list( + self, resource_group_name, virtual_machine_scale_set_name, filter=None, select=None, expand=None, custom_headers=None, raw=False, **operation_config): + """Gets a list of all virtual machines in a VM scale sets. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param virtual_machine_scale_set_name: The name of the VM scale set. + :type virtual_machine_scale_set_name: str + :param filter: The filter to apply to the operation. + :type filter: str + :param select: The list parameters. + :type select: str + :param expand: The expand expression to apply to the operation. + :type expand: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of VirtualMachineScaleSetVM + :rtype: + ~azure.mgmt.compute.v2017_12_01.models.VirtualMachineScaleSetVMPaged[~azure.mgmt.compute.v2017_12_01.models.VirtualMachineScaleSetVM] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'virtualMachineScaleSetName': self._serialize.url("virtual_machine_scale_set_name", virtual_machine_scale_set_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + if filter is not None: + query_parameters['$filter'] = self._serialize.query("filter", filter, 'str') + if select is not None: + query_parameters['$select'] = self._serialize.query("select", select, 'str') + if expand is not None: + query_parameters['$expand'] = self._serialize.query("expand", expand, 'str') + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.VirtualMachineScaleSetVMPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{virtualMachineScaleSetName}/virtualMachines'} + + + def _power_off_initial( + self, resource_group_name, vm_scale_set_name, instance_id, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.power_off.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), + 'instanceId': self._serialize.url("instance_id", instance_id, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('OperationStatusResponse', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def power_off( + self, resource_group_name, vm_scale_set_name, instance_id, custom_headers=None, raw=False, polling=True, **operation_config): + """Power off (stop) a virtual machine in a VM scale set. Note that + resources are still attached and you are getting charged for the + resources. Instead, use deallocate to release resources and avoid + charges. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param vm_scale_set_name: The name of the VM scale set. + :type vm_scale_set_name: str + :param instance_id: The instance ID of the virtual machine. + :type instance_id: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns OperationStatusResponse + or ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2017_12_01.models.OperationStatusResponse] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2017_12_01.models.OperationStatusResponse]] + :raises: :class:`CloudError` + """ + raw_result = self._power_off_initial( + resource_group_name=resource_group_name, + vm_scale_set_name=vm_scale_set_name, + instance_id=instance_id, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('OperationStatusResponse', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + power_off.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/virtualmachines/{instanceId}/poweroff'} + + + def _restart_initial( + self, resource_group_name, vm_scale_set_name, instance_id, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.restart.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), + 'instanceId': self._serialize.url("instance_id", instance_id, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('OperationStatusResponse', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def restart( + self, resource_group_name, vm_scale_set_name, instance_id, custom_headers=None, raw=False, polling=True, **operation_config): + """Restarts a virtual machine in a VM scale set. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param vm_scale_set_name: The name of the VM scale set. + :type vm_scale_set_name: str + :param instance_id: The instance ID of the virtual machine. + :type instance_id: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns OperationStatusResponse + or ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2017_12_01.models.OperationStatusResponse] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2017_12_01.models.OperationStatusResponse]] + :raises: :class:`CloudError` + """ + raw_result = self._restart_initial( + resource_group_name=resource_group_name, + vm_scale_set_name=vm_scale_set_name, + instance_id=instance_id, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('OperationStatusResponse', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + restart.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/virtualmachines/{instanceId}/restart'} + + + def _start_initial( + self, resource_group_name, vm_scale_set_name, instance_id, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.start.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), + 'instanceId': self._serialize.url("instance_id", instance_id, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('OperationStatusResponse', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def start( + self, resource_group_name, vm_scale_set_name, instance_id, custom_headers=None, raw=False, polling=True, **operation_config): + """Starts a virtual machine in a VM scale set. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param vm_scale_set_name: The name of the VM scale set. + :type vm_scale_set_name: str + :param instance_id: The instance ID of the virtual machine. + :type instance_id: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns OperationStatusResponse + or ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2017_12_01.models.OperationStatusResponse] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2017_12_01.models.OperationStatusResponse]] + :raises: :class:`CloudError` + """ + raw_result = self._start_initial( + resource_group_name=resource_group_name, + vm_scale_set_name=vm_scale_set_name, + instance_id=instance_id, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('OperationStatusResponse', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + start.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/virtualmachines/{instanceId}/start'} + + + def _redeploy_initial( + self, resource_group_name, vm_scale_set_name, instance_id, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.redeploy.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), + 'instanceId': self._serialize.url("instance_id", instance_id, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('OperationStatusResponse', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def redeploy( + self, resource_group_name, vm_scale_set_name, instance_id, custom_headers=None, raw=False, polling=True, **operation_config): + """Redeploys a virtual machine in a VM scale set. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param vm_scale_set_name: The name of the VM scale set. + :type vm_scale_set_name: str + :param instance_id: The instance ID of the virtual machine. + :type instance_id: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns OperationStatusResponse + or ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2017_12_01.models.OperationStatusResponse] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2017_12_01.models.OperationStatusResponse]] + :raises: :class:`CloudError` + """ + raw_result = self._redeploy_initial( + resource_group_name=resource_group_name, + vm_scale_set_name=vm_scale_set_name, + instance_id=instance_id, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('OperationStatusResponse', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + redeploy.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/virtualmachines/{instanceId}/redeploy'} + + + def _perform_maintenance_initial( + self, resource_group_name, vm_scale_set_name, instance_id, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.perform_maintenance.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), + 'instanceId': self._serialize.url("instance_id", instance_id, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('OperationStatusResponse', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def perform_maintenance( + self, resource_group_name, vm_scale_set_name, instance_id, custom_headers=None, raw=False, polling=True, **operation_config): + """Performs maintenance on a virtual machine in a VM scale set. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param vm_scale_set_name: The name of the VM scale set. + :type vm_scale_set_name: str + :param instance_id: The instance ID of the virtual machine. + :type instance_id: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns OperationStatusResponse + or ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2017_12_01.models.OperationStatusResponse] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2017_12_01.models.OperationStatusResponse]] + :raises: :class:`CloudError` + """ + raw_result = self._perform_maintenance_initial( + resource_group_name=resource_group_name, + vm_scale_set_name=vm_scale_set_name, + instance_id=instance_id, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('OperationStatusResponse', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + perform_maintenance.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/virtualmachines/{instanceId}/performMaintenance'} diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/operations/_virtual_machine_scale_sets_operations.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/operations/_virtual_machine_scale_sets_operations.py new file mode 100644 index 000000000000..9e4bf6c6ddc8 --- /dev/null +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/operations/_virtual_machine_scale_sets_operations.py @@ -0,0 +1,1911 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse +from msrestazure.azure_exceptions import CloudError +from msrest.polling import LROPoller, NoPolling +from msrestazure.polling.arm_polling import ARMPolling + +from .. import models + + +class VirtualMachineScaleSetsOperations(object): + """VirtualMachineScaleSetsOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: Client Api Version. Constant value: "2017-12-01". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2017-12-01" + + self.config = config + + + def _create_or_update_initial( + self, resource_group_name, vm_scale_set_name, parameters, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.create_or_update.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(parameters, 'VirtualMachineScaleSet') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 201]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('VirtualMachineScaleSet', response) + if response.status_code == 201: + deserialized = self._deserialize('VirtualMachineScaleSet', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def create_or_update( + self, resource_group_name, vm_scale_set_name, parameters, custom_headers=None, raw=False, polling=True, **operation_config): + """Create or update a VM scale set. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param vm_scale_set_name: The name of the VM scale set to create or + update. + :type vm_scale_set_name: str + :param parameters: The scale set object. + :type parameters: + ~azure.mgmt.compute.v2017_12_01.models.VirtualMachineScaleSet + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns VirtualMachineScaleSet + or ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2017_12_01.models.VirtualMachineScaleSet] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2017_12_01.models.VirtualMachineScaleSet]] + :raises: :class:`CloudError` + """ + raw_result = self._create_or_update_initial( + resource_group_name=resource_group_name, + vm_scale_set_name=vm_scale_set_name, + parameters=parameters, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('VirtualMachineScaleSet', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}'} + + + def _update_initial( + self, resource_group_name, vm_scale_set_name, parameters, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.update.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(parameters, 'VirtualMachineScaleSetUpdate') + + # Construct and send request + request = self._client.patch(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('VirtualMachineScaleSet', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def update( + self, resource_group_name, vm_scale_set_name, parameters, custom_headers=None, raw=False, polling=True, **operation_config): + """Update a VM scale set. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param vm_scale_set_name: The name of the VM scale set to create or + update. + :type vm_scale_set_name: str + :param parameters: The scale set object. + :type parameters: + ~azure.mgmt.compute.v2017_12_01.models.VirtualMachineScaleSetUpdate + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns VirtualMachineScaleSet + or ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2017_12_01.models.VirtualMachineScaleSet] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2017_12_01.models.VirtualMachineScaleSet]] + :raises: :class:`CloudError` + """ + raw_result = self._update_initial( + resource_group_name=resource_group_name, + vm_scale_set_name=vm_scale_set_name, + parameters=parameters, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('VirtualMachineScaleSet', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}'} + + + def _delete_initial( + self, resource_group_name, vm_scale_set_name, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.delete.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202, 204]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('OperationStatusResponse', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def delete( + self, resource_group_name, vm_scale_set_name, custom_headers=None, raw=False, polling=True, **operation_config): + """Deletes a VM scale set. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param vm_scale_set_name: The name of the VM scale set. + :type vm_scale_set_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns OperationStatusResponse + or ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2017_12_01.models.OperationStatusResponse] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2017_12_01.models.OperationStatusResponse]] + :raises: :class:`CloudError` + """ + raw_result = self._delete_initial( + resource_group_name=resource_group_name, + vm_scale_set_name=vm_scale_set_name, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('OperationStatusResponse', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}'} + + def get( + self, resource_group_name, vm_scale_set_name, custom_headers=None, raw=False, **operation_config): + """Display information about a virtual machine scale set. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param vm_scale_set_name: The name of the VM scale set. + :type vm_scale_set_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: VirtualMachineScaleSet or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.compute.v2017_12_01.models.VirtualMachineScaleSet + or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('VirtualMachineScaleSet', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}'} + + + def _deallocate_initial( + self, resource_group_name, vm_scale_set_name, instance_ids=None, custom_headers=None, raw=False, **operation_config): + vm_instance_ids = None + if instance_ids is not None: + vm_instance_ids = models.VirtualMachineScaleSetVMInstanceIDs(instance_ids=instance_ids) + + # Construct URL + url = self.deallocate.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + if vm_instance_ids is not None: + body_content = self._serialize.body(vm_instance_ids, 'VirtualMachineScaleSetVMInstanceIDs') + else: + body_content = None + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('OperationStatusResponse', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def deallocate( + self, resource_group_name, vm_scale_set_name, instance_ids=None, custom_headers=None, raw=False, polling=True, **operation_config): + """Deallocates specific virtual machines in a VM scale set. Shuts down the + virtual machines and releases the compute resources. You are not billed + for the compute resources that this virtual machine scale set + deallocates. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param vm_scale_set_name: The name of the VM scale set. + :type vm_scale_set_name: str + :param instance_ids: The virtual machine scale set instance ids. + Omitting the virtual machine scale set instance ids will result in the + operation being performed on all virtual machines in the virtual + machine scale set. + :type instance_ids: list[str] + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns OperationStatusResponse + or ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2017_12_01.models.OperationStatusResponse] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2017_12_01.models.OperationStatusResponse]] + :raises: :class:`CloudError` + """ + raw_result = self._deallocate_initial( + resource_group_name=resource_group_name, + vm_scale_set_name=vm_scale_set_name, + instance_ids=instance_ids, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('OperationStatusResponse', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + deallocate.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/deallocate'} + + + def _delete_instances_initial( + self, resource_group_name, vm_scale_set_name, instance_ids, custom_headers=None, raw=False, **operation_config): + vm_instance_ids = models.VirtualMachineScaleSetVMInstanceRequiredIDs(instance_ids=instance_ids) + + # Construct URL + url = self.delete_instances.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(vm_instance_ids, 'VirtualMachineScaleSetVMInstanceRequiredIDs') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('OperationStatusResponse', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def delete_instances( + self, resource_group_name, vm_scale_set_name, instance_ids, custom_headers=None, raw=False, polling=True, **operation_config): + """Deletes virtual machines in a VM scale set. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param vm_scale_set_name: The name of the VM scale set. + :type vm_scale_set_name: str + :param instance_ids: The virtual machine scale set instance ids. + :type instance_ids: list[str] + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns OperationStatusResponse + or ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2017_12_01.models.OperationStatusResponse] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2017_12_01.models.OperationStatusResponse]] + :raises: :class:`CloudError` + """ + raw_result = self._delete_instances_initial( + resource_group_name=resource_group_name, + vm_scale_set_name=vm_scale_set_name, + instance_ids=instance_ids, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('OperationStatusResponse', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + delete_instances.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/delete'} + + def get_instance_view( + self, resource_group_name, vm_scale_set_name, custom_headers=None, raw=False, **operation_config): + """Gets the status of a VM scale set instance. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param vm_scale_set_name: The name of the VM scale set. + :type vm_scale_set_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: VirtualMachineScaleSetInstanceView or ClientRawResponse if + raw=true + :rtype: + ~azure.mgmt.compute.v2017_12_01.models.VirtualMachineScaleSetInstanceView + or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get_instance_view.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('VirtualMachineScaleSetInstanceView', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_instance_view.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/instanceView'} + + def list( + self, resource_group_name, custom_headers=None, raw=False, **operation_config): + """Gets a list of all VM scale sets under a resource group. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of VirtualMachineScaleSet + :rtype: + ~azure.mgmt.compute.v2017_12_01.models.VirtualMachineScaleSetPaged[~azure.mgmt.compute.v2017_12_01.models.VirtualMachineScaleSet] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.VirtualMachineScaleSetPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets'} + + def list_all( + self, custom_headers=None, raw=False, **operation_config): + """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. + + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of VirtualMachineScaleSet + :rtype: + ~azure.mgmt.compute.v2017_12_01.models.VirtualMachineScaleSetPaged[~azure.mgmt.compute.v2017_12_01.models.VirtualMachineScaleSet] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_all.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.VirtualMachineScaleSetPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_all.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Compute/virtualMachineScaleSets'} + + def list_skus( + self, resource_group_name, vm_scale_set_name, custom_headers=None, raw=False, **operation_config): + """Gets a list of SKUs available for your VM scale set, including the + minimum and maximum VM instances allowed for each SKU. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param vm_scale_set_name: The name of the VM scale set. + :type vm_scale_set_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of VirtualMachineScaleSetSku + :rtype: + ~azure.mgmt.compute.v2017_12_01.models.VirtualMachineScaleSetSkuPaged[~azure.mgmt.compute.v2017_12_01.models.VirtualMachineScaleSetSku] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_skus.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.VirtualMachineScaleSetSkuPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_skus.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/skus'} + + def get_os_upgrade_history( + self, resource_group_name, vm_scale_set_name, custom_headers=None, raw=False, **operation_config): + """Gets list of OS upgrades on a VM scale set instance. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param vm_scale_set_name: The name of the VM scale set. + :type vm_scale_set_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of + UpgradeOperationHistoricalStatusInfo + :rtype: + ~azure.mgmt.compute.v2017_12_01.models.UpgradeOperationHistoricalStatusInfoPaged[~azure.mgmt.compute.v2017_12_01.models.UpgradeOperationHistoricalStatusInfo] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.get_os_upgrade_history.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.UpgradeOperationHistoricalStatusInfoPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + get_os_upgrade_history.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/osUpgradeHistory'} + + + def _power_off_initial( + self, resource_group_name, vm_scale_set_name, instance_ids=None, custom_headers=None, raw=False, **operation_config): + vm_instance_ids = None + if instance_ids is not None: + vm_instance_ids = models.VirtualMachineScaleSetVMInstanceIDs(instance_ids=instance_ids) + + # Construct URL + url = self.power_off.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + if vm_instance_ids is not None: + body_content = self._serialize.body(vm_instance_ids, 'VirtualMachineScaleSetVMInstanceIDs') + else: + body_content = None + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('OperationStatusResponse', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def power_off( + self, resource_group_name, vm_scale_set_name, instance_ids=None, custom_headers=None, raw=False, polling=True, **operation_config): + """Power off (stop) one or more virtual machines in a VM scale set. Note + that resources are still attached and you are getting charged for the + resources. Instead, use deallocate to release resources and avoid + charges. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param vm_scale_set_name: The name of the VM scale set. + :type vm_scale_set_name: str + :param instance_ids: The virtual machine scale set instance ids. + Omitting the virtual machine scale set instance ids will result in the + operation being performed on all virtual machines in the virtual + machine scale set. + :type instance_ids: list[str] + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns OperationStatusResponse + or ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2017_12_01.models.OperationStatusResponse] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2017_12_01.models.OperationStatusResponse]] + :raises: :class:`CloudError` + """ + raw_result = self._power_off_initial( + resource_group_name=resource_group_name, + vm_scale_set_name=vm_scale_set_name, + instance_ids=instance_ids, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('OperationStatusResponse', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + power_off.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/poweroff'} + + + def _restart_initial( + self, resource_group_name, vm_scale_set_name, instance_ids=None, custom_headers=None, raw=False, **operation_config): + vm_instance_ids = None + if instance_ids is not None: + vm_instance_ids = models.VirtualMachineScaleSetVMInstanceIDs(instance_ids=instance_ids) + + # Construct URL + url = self.restart.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + if vm_instance_ids is not None: + body_content = self._serialize.body(vm_instance_ids, 'VirtualMachineScaleSetVMInstanceIDs') + else: + body_content = None + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('OperationStatusResponse', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def restart( + self, resource_group_name, vm_scale_set_name, instance_ids=None, custom_headers=None, raw=False, polling=True, **operation_config): + """Restarts one or more virtual machines in a VM scale set. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param vm_scale_set_name: The name of the VM scale set. + :type vm_scale_set_name: str + :param instance_ids: The virtual machine scale set instance ids. + Omitting the virtual machine scale set instance ids will result in the + operation being performed on all virtual machines in the virtual + machine scale set. + :type instance_ids: list[str] + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns OperationStatusResponse + or ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2017_12_01.models.OperationStatusResponse] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2017_12_01.models.OperationStatusResponse]] + :raises: :class:`CloudError` + """ + raw_result = self._restart_initial( + resource_group_name=resource_group_name, + vm_scale_set_name=vm_scale_set_name, + instance_ids=instance_ids, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('OperationStatusResponse', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + restart.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/restart'} + + + def _start_initial( + self, resource_group_name, vm_scale_set_name, instance_ids=None, custom_headers=None, raw=False, **operation_config): + vm_instance_ids = None + if instance_ids is not None: + vm_instance_ids = models.VirtualMachineScaleSetVMInstanceIDs(instance_ids=instance_ids) + + # Construct URL + url = self.start.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + if vm_instance_ids is not None: + body_content = self._serialize.body(vm_instance_ids, 'VirtualMachineScaleSetVMInstanceIDs') + else: + body_content = None + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('OperationStatusResponse', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def start( + self, resource_group_name, vm_scale_set_name, instance_ids=None, custom_headers=None, raw=False, polling=True, **operation_config): + """Starts one or more virtual machines in a VM scale set. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param vm_scale_set_name: The name of the VM scale set. + :type vm_scale_set_name: str + :param instance_ids: The virtual machine scale set instance ids. + Omitting the virtual machine scale set instance ids will result in the + operation being performed on all virtual machines in the virtual + machine scale set. + :type instance_ids: list[str] + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns OperationStatusResponse + or ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2017_12_01.models.OperationStatusResponse] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2017_12_01.models.OperationStatusResponse]] + :raises: :class:`CloudError` + """ + raw_result = self._start_initial( + resource_group_name=resource_group_name, + vm_scale_set_name=vm_scale_set_name, + instance_ids=instance_ids, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('OperationStatusResponse', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + start.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/start'} + + + def _redeploy_initial( + self, resource_group_name, vm_scale_set_name, instance_ids=None, custom_headers=None, raw=False, **operation_config): + vm_instance_ids = None + if instance_ids is not None: + vm_instance_ids = models.VirtualMachineScaleSetVMInstanceIDs(instance_ids=instance_ids) + + # Construct URL + url = self.redeploy.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + if vm_instance_ids is not None: + body_content = self._serialize.body(vm_instance_ids, 'VirtualMachineScaleSetVMInstanceIDs') + else: + body_content = None + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('OperationStatusResponse', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def redeploy( + self, resource_group_name, vm_scale_set_name, instance_ids=None, custom_headers=None, raw=False, polling=True, **operation_config): + """Redeploy one or more virtual machines in a VM scale set. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param vm_scale_set_name: The name of the VM scale set. + :type vm_scale_set_name: str + :param instance_ids: The virtual machine scale set instance ids. + Omitting the virtual machine scale set instance ids will result in the + operation being performed on all virtual machines in the virtual + machine scale set. + :type instance_ids: list[str] + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns OperationStatusResponse + or ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2017_12_01.models.OperationStatusResponse] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2017_12_01.models.OperationStatusResponse]] + :raises: :class:`CloudError` + """ + raw_result = self._redeploy_initial( + resource_group_name=resource_group_name, + vm_scale_set_name=vm_scale_set_name, + instance_ids=instance_ids, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('OperationStatusResponse', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + redeploy.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/redeploy'} + + + def _perform_maintenance_initial( + self, resource_group_name, vm_scale_set_name, instance_ids=None, custom_headers=None, raw=False, **operation_config): + vm_instance_ids = None + if instance_ids is not None: + vm_instance_ids = models.VirtualMachineScaleSetVMInstanceIDs(instance_ids=instance_ids) + + # Construct URL + url = self.perform_maintenance.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + if vm_instance_ids is not None: + body_content = self._serialize.body(vm_instance_ids, 'VirtualMachineScaleSetVMInstanceIDs') + else: + body_content = None + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('OperationStatusResponse', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def perform_maintenance( + self, resource_group_name, vm_scale_set_name, instance_ids=None, custom_headers=None, raw=False, polling=True, **operation_config): + """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. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param vm_scale_set_name: The name of the VM scale set. + :type vm_scale_set_name: str + :param instance_ids: The virtual machine scale set instance ids. + Omitting the virtual machine scale set instance ids will result in the + operation being performed on all virtual machines in the virtual + machine scale set. + :type instance_ids: list[str] + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns OperationStatusResponse + or ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2017_12_01.models.OperationStatusResponse] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2017_12_01.models.OperationStatusResponse]] + :raises: :class:`CloudError` + """ + raw_result = self._perform_maintenance_initial( + resource_group_name=resource_group_name, + vm_scale_set_name=vm_scale_set_name, + instance_ids=instance_ids, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('OperationStatusResponse', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + perform_maintenance.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/performMaintenance'} + + + def _update_instances_initial( + self, resource_group_name, vm_scale_set_name, instance_ids, custom_headers=None, raw=False, **operation_config): + vm_instance_ids = models.VirtualMachineScaleSetVMInstanceRequiredIDs(instance_ids=instance_ids) + + # Construct URL + url = self.update_instances.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(vm_instance_ids, 'VirtualMachineScaleSetVMInstanceRequiredIDs') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('OperationStatusResponse', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def update_instances( + self, resource_group_name, vm_scale_set_name, instance_ids, custom_headers=None, raw=False, polling=True, **operation_config): + """Upgrades one or more virtual machines to the latest SKU set in the VM + scale set model. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param vm_scale_set_name: The name of the VM scale set. + :type vm_scale_set_name: str + :param instance_ids: The virtual machine scale set instance ids. + :type instance_ids: list[str] + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns OperationStatusResponse + or ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2017_12_01.models.OperationStatusResponse] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2017_12_01.models.OperationStatusResponse]] + :raises: :class:`CloudError` + """ + raw_result = self._update_instances_initial( + resource_group_name=resource_group_name, + vm_scale_set_name=vm_scale_set_name, + instance_ids=instance_ids, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('OperationStatusResponse', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + update_instances.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/manualupgrade'} + + + def _reimage_initial( + self, resource_group_name, vm_scale_set_name, instance_ids=None, custom_headers=None, raw=False, **operation_config): + vm_instance_ids = None + if instance_ids is not None: + vm_instance_ids = models.VirtualMachineScaleSetVMInstanceIDs(instance_ids=instance_ids) + + # Construct URL + url = self.reimage.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + if vm_instance_ids is not None: + body_content = self._serialize.body(vm_instance_ids, 'VirtualMachineScaleSetVMInstanceIDs') + else: + body_content = None + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('OperationStatusResponse', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def reimage( + self, resource_group_name, vm_scale_set_name, instance_ids=None, custom_headers=None, raw=False, polling=True, **operation_config): + """Reimages (upgrade the operating system) one or more virtual machines in + a VM scale set. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param vm_scale_set_name: The name of the VM scale set. + :type vm_scale_set_name: str + :param instance_ids: The virtual machine scale set instance ids. + Omitting the virtual machine scale set instance ids will result in the + operation being performed on all virtual machines in the virtual + machine scale set. + :type instance_ids: list[str] + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns OperationStatusResponse + or ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2017_12_01.models.OperationStatusResponse] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2017_12_01.models.OperationStatusResponse]] + :raises: :class:`CloudError` + """ + raw_result = self._reimage_initial( + resource_group_name=resource_group_name, + vm_scale_set_name=vm_scale_set_name, + instance_ids=instance_ids, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('OperationStatusResponse', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + reimage.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/reimage'} + + + def _reimage_all_initial( + self, resource_group_name, vm_scale_set_name, instance_ids=None, custom_headers=None, raw=False, **operation_config): + vm_instance_ids = None + if instance_ids is not None: + vm_instance_ids = models.VirtualMachineScaleSetVMInstanceIDs(instance_ids=instance_ids) + + # Construct URL + url = self.reimage_all.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + if vm_instance_ids is not None: + body_content = self._serialize.body(vm_instance_ids, 'VirtualMachineScaleSetVMInstanceIDs') + else: + body_content = None + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('OperationStatusResponse', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def reimage_all( + self, resource_group_name, vm_scale_set_name, instance_ids=None, custom_headers=None, raw=False, polling=True, **operation_config): + """Reimages all the disks ( including data disks ) in the virtual machines + in a VM scale set. This operation is only supported for managed disks. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param vm_scale_set_name: The name of the VM scale set. + :type vm_scale_set_name: str + :param instance_ids: The virtual machine scale set instance ids. + Omitting the virtual machine scale set instance ids will result in the + operation being performed on all virtual machines in the virtual + machine scale set. + :type instance_ids: list[str] + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns OperationStatusResponse + or ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2017_12_01.models.OperationStatusResponse] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2017_12_01.models.OperationStatusResponse]] + :raises: :class:`CloudError` + """ + raw_result = self._reimage_all_initial( + resource_group_name=resource_group_name, + vm_scale_set_name=vm_scale_set_name, + instance_ids=instance_ids, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('OperationStatusResponse', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + reimage_all.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/reimageall'} + + def force_recovery_service_fabric_platform_update_domain_walk( + self, resource_group_name, vm_scale_set_name, platform_update_domain, custom_headers=None, raw=False, **operation_config): + """Manual platform update domain walk to update virtual machines in a + service fabric virtual machine scale set. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param vm_scale_set_name: The name of the VM scale set. + :type vm_scale_set_name: str + :param platform_update_domain: The platform update domain for which a + manual recovery walk is requested + :type platform_update_domain: int + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: RecoveryWalkResponse or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.compute.v2017_12_01.models.RecoveryWalkResponse or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.force_recovery_service_fabric_platform_update_domain_walk.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + query_parameters['platformUpdateDomain'] = self._serialize.query("platform_update_domain", platform_update_domain, 'int') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('RecoveryWalkResponse', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + force_recovery_service_fabric_platform_update_domain_walk.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/forceRecoveryServiceFabricPlatformUpdateDomainWalk'} diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/operations/_virtual_machine_sizes_operations.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/operations/_virtual_machine_sizes_operations.py new file mode 100644 index 000000000000..de71054db976 --- /dev/null +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/operations/_virtual_machine_sizes_operations.py @@ -0,0 +1,111 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse +from msrestazure.azure_exceptions import CloudError + +from .. import models + + +class VirtualMachineSizesOperations(object): + """VirtualMachineSizesOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: Client Api Version. Constant value: "2017-12-01". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2017-12-01" + + self.config = config + + def list( + self, location, custom_headers=None, raw=False, **operation_config): + """Lists all available virtual machine sizes for a subscription in a + location. + + :param location: The location upon which virtual-machine-sizes is + queried. + :type location: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of VirtualMachineSize + :rtype: + ~azure.mgmt.compute.v2017_12_01.models.VirtualMachineSizePaged[~azure.mgmt.compute.v2017_12_01.models.VirtualMachineSize] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list.metadata['url'] + path_format_arguments = { + 'location': self._serialize.url("location", location, 'str', pattern=r'^[-\w\._]+$'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.VirtualMachineSizePaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/vmSizes'} diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/operations/_virtual_machines_operations.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/operations/_virtual_machines_operations.py new file mode 100644 index 000000000000..7de5d0d8fb12 --- /dev/null +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/operations/_virtual_machines_operations.py @@ -0,0 +1,1747 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse +from msrestazure.azure_exceptions import CloudError +from msrest.polling import LROPoller, NoPolling +from msrestazure.polling.arm_polling import ARMPolling + +from .. import models + + +class VirtualMachinesOperations(object): + """VirtualMachinesOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: Client Api Version. Constant value: "2017-12-01". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2017-12-01" + + self.config = config + + def get_extensions( + self, resource_group_name, vm_name, expand=None, custom_headers=None, raw=False, **operation_config): + """The operation to get all extensions of a Virtual Machine. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param vm_name: The name of the virtual machine containing the + extension. + :type vm_name: str + :param expand: The expand expression to apply on the operation. + :type expand: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: VirtualMachineExtensionsListResult or ClientRawResponse if + raw=true + :rtype: + ~azure.mgmt.compute.v2017_12_01.models.VirtualMachineExtensionsListResult + or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get_extensions.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vmName': self._serialize.url("vm_name", vm_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + if expand is not None: + query_parameters['$expand'] = self._serialize.query("expand", expand, 'str') + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('VirtualMachineExtensionsListResult', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_extensions.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/extensions'} + + def list_by_location( + self, location, custom_headers=None, raw=False, **operation_config): + """Gets all the virtual machines under the specified subscription for the + specified location. + + :param location: The location for which virtual machines under the + subscription are queried. + :type location: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of VirtualMachine + :rtype: + ~azure.mgmt.compute.v2017_12_01.models.VirtualMachinePaged[~azure.mgmt.compute.v2017_12_01.models.VirtualMachine] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_by_location.metadata['url'] + path_format_arguments = { + 'location': self._serialize.url("location", location, 'str', pattern=r'^[-\w\._]+$'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.VirtualMachinePaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_by_location.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/virtualMachines'} + + + def _capture_initial( + self, resource_group_name, vm_name, parameters, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.capture.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vmName': self._serialize.url("vm_name", vm_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(parameters, 'VirtualMachineCaptureParameters') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('VirtualMachineCaptureResult', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def capture( + self, resource_group_name, vm_name, parameters, custom_headers=None, raw=False, polling=True, **operation_config): + """Captures the VM by copying virtual hard disks of the VM and outputs a + template that can be used to create similar VMs. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param vm_name: The name of the virtual machine. + :type vm_name: str + :param parameters: Parameters supplied to the Capture Virtual Machine + operation. + :type parameters: + ~azure.mgmt.compute.v2017_12_01.models.VirtualMachineCaptureParameters + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns + VirtualMachineCaptureResult or + ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2017_12_01.models.VirtualMachineCaptureResult] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2017_12_01.models.VirtualMachineCaptureResult]] + :raises: :class:`CloudError` + """ + raw_result = self._capture_initial( + resource_group_name=resource_group_name, + vm_name=vm_name, + parameters=parameters, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('VirtualMachineCaptureResult', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + capture.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/capture'} + + + def _create_or_update_initial( + self, resource_group_name, vm_name, parameters, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.create_or_update.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vmName': self._serialize.url("vm_name", vm_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(parameters, 'VirtualMachine') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 201]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('VirtualMachine', response) + if response.status_code == 201: + deserialized = self._deserialize('VirtualMachine', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def create_or_update( + self, resource_group_name, vm_name, parameters, custom_headers=None, raw=False, polling=True, **operation_config): + """The operation to create or update a virtual machine. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param vm_name: The name of the virtual machine. + :type vm_name: str + :param parameters: Parameters supplied to the Create Virtual Machine + operation. + :type parameters: + ~azure.mgmt.compute.v2017_12_01.models.VirtualMachine + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns VirtualMachine or + ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2017_12_01.models.VirtualMachine] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2017_12_01.models.VirtualMachine]] + :raises: :class:`CloudError` + """ + raw_result = self._create_or_update_initial( + resource_group_name=resource_group_name, + vm_name=vm_name, + parameters=parameters, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('VirtualMachine', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}'} + + + def _update_initial( + self, resource_group_name, vm_name, parameters, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.update.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vmName': self._serialize.url("vm_name", vm_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(parameters, 'VirtualMachineUpdate') + + # Construct and send request + request = self._client.patch(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 201]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('VirtualMachine', response) + if response.status_code == 201: + deserialized = self._deserialize('VirtualMachine', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def update( + self, resource_group_name, vm_name, parameters, custom_headers=None, raw=False, polling=True, **operation_config): + """The operation to update a virtual machine. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param vm_name: The name of the virtual machine. + :type vm_name: str + :param parameters: Parameters supplied to the Update Virtual Machine + operation. + :type parameters: + ~azure.mgmt.compute.v2017_12_01.models.VirtualMachineUpdate + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns VirtualMachine or + ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2017_12_01.models.VirtualMachine] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2017_12_01.models.VirtualMachine]] + :raises: :class:`CloudError` + """ + raw_result = self._update_initial( + resource_group_name=resource_group_name, + vm_name=vm_name, + parameters=parameters, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('VirtualMachine', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}'} + + + def _delete_initial( + self, resource_group_name, vm_name, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.delete.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vmName': self._serialize.url("vm_name", vm_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202, 204]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('OperationStatusResponse', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def delete( + self, resource_group_name, vm_name, custom_headers=None, raw=False, polling=True, **operation_config): + """The operation to delete a virtual machine. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param vm_name: The name of the virtual machine. + :type vm_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns OperationStatusResponse + or ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2017_12_01.models.OperationStatusResponse] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2017_12_01.models.OperationStatusResponse]] + :raises: :class:`CloudError` + """ + raw_result = self._delete_initial( + resource_group_name=resource_group_name, + vm_name=vm_name, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('OperationStatusResponse', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}'} + + def get( + self, resource_group_name, vm_name, expand=None, custom_headers=None, raw=False, **operation_config): + """Retrieves information about the model view or the instance view of a + virtual machine. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param vm_name: The name of the virtual machine. + :type vm_name: str + :param expand: The expand expression to apply on the operation. + Possible values include: 'instanceView' + :type expand: str or + ~azure.mgmt.compute.v2017_12_01.models.InstanceViewTypes + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: VirtualMachine or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.compute.v2017_12_01.models.VirtualMachine or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vmName': self._serialize.url("vm_name", vm_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + if expand is not None: + query_parameters['$expand'] = self._serialize.query("expand", expand, 'InstanceViewTypes') + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('VirtualMachine', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}'} + + def instance_view( + self, resource_group_name, vm_name, custom_headers=None, raw=False, **operation_config): + """Retrieves information about the run-time state of a virtual machine. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param vm_name: The name of the virtual machine. + :type vm_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: VirtualMachineInstanceView or ClientRawResponse if raw=true + :rtype: + ~azure.mgmt.compute.v2017_12_01.models.VirtualMachineInstanceView or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.instance_view.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vmName': self._serialize.url("vm_name", vm_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('VirtualMachineInstanceView', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + instance_view.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/instanceView'} + + + def _convert_to_managed_disks_initial( + self, resource_group_name, vm_name, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.convert_to_managed_disks.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vmName': self._serialize.url("vm_name", vm_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('OperationStatusResponse', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def convert_to_managed_disks( + self, resource_group_name, vm_name, custom_headers=None, raw=False, polling=True, **operation_config): + """Converts virtual machine disks from blob-based to managed disks. + Virtual machine must be stop-deallocated before invoking this + operation. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param vm_name: The name of the virtual machine. + :type vm_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns OperationStatusResponse + or ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2017_12_01.models.OperationStatusResponse] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2017_12_01.models.OperationStatusResponse]] + :raises: :class:`CloudError` + """ + raw_result = self._convert_to_managed_disks_initial( + resource_group_name=resource_group_name, + vm_name=vm_name, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('OperationStatusResponse', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + convert_to_managed_disks.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/convertToManagedDisks'} + + + def _deallocate_initial( + self, resource_group_name, vm_name, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.deallocate.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vmName': self._serialize.url("vm_name", vm_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('OperationStatusResponse', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def deallocate( + self, resource_group_name, vm_name, custom_headers=None, raw=False, polling=True, **operation_config): + """Shuts down the virtual machine and releases the compute resources. You + are not billed for the compute resources that this virtual machine + uses. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param vm_name: The name of the virtual machine. + :type vm_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns OperationStatusResponse + or ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2017_12_01.models.OperationStatusResponse] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2017_12_01.models.OperationStatusResponse]] + :raises: :class:`CloudError` + """ + raw_result = self._deallocate_initial( + resource_group_name=resource_group_name, + vm_name=vm_name, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('OperationStatusResponse', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + deallocate.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/deallocate'} + + def generalize( + self, resource_group_name, vm_name, custom_headers=None, raw=False, **operation_config): + """Sets the state of the virtual machine to generalized. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param vm_name: The name of the virtual machine. + :type vm_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: OperationStatusResponse or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.compute.v2017_12_01.models.OperationStatusResponse + or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.generalize.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vmName': self._serialize.url("vm_name", vm_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('OperationStatusResponse', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + generalize.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/generalize'} + + def list( + self, resource_group_name, custom_headers=None, raw=False, **operation_config): + """Lists all of the virtual machines in the specified resource group. Use + the nextLink property in the response to get the next page of virtual + machines. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of VirtualMachine + :rtype: + ~azure.mgmt.compute.v2017_12_01.models.VirtualMachinePaged[~azure.mgmt.compute.v2017_12_01.models.VirtualMachine] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.VirtualMachinePaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines'} + + def list_all( + self, custom_headers=None, raw=False, **operation_config): + """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. + + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of VirtualMachine + :rtype: + ~azure.mgmt.compute.v2017_12_01.models.VirtualMachinePaged[~azure.mgmt.compute.v2017_12_01.models.VirtualMachine] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_all.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.VirtualMachinePaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_all.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Compute/virtualMachines'} + + def list_available_sizes( + self, resource_group_name, vm_name, custom_headers=None, raw=False, **operation_config): + """Lists all available virtual machine sizes to which the specified + virtual machine can be resized. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param vm_name: The name of the virtual machine. + :type vm_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of VirtualMachineSize + :rtype: + ~azure.mgmt.compute.v2017_12_01.models.VirtualMachineSizePaged[~azure.mgmt.compute.v2017_12_01.models.VirtualMachineSize] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_available_sizes.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vmName': self._serialize.url("vm_name", vm_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.VirtualMachineSizePaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_available_sizes.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/vmSizes'} + + + def _power_off_initial( + self, resource_group_name, vm_name, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.power_off.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vmName': self._serialize.url("vm_name", vm_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('OperationStatusResponse', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def power_off( + self, resource_group_name, vm_name, custom_headers=None, raw=False, polling=True, **operation_config): + """The operation to power off (stop) a virtual machine. The virtual + machine can be restarted with the same provisioned resources. You are + still charged for this virtual machine. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param vm_name: The name of the virtual machine. + :type vm_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns OperationStatusResponse + or ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2017_12_01.models.OperationStatusResponse] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2017_12_01.models.OperationStatusResponse]] + :raises: :class:`CloudError` + """ + raw_result = self._power_off_initial( + resource_group_name=resource_group_name, + vm_name=vm_name, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('OperationStatusResponse', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + power_off.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/powerOff'} + + + def _restart_initial( + self, resource_group_name, vm_name, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.restart.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vmName': self._serialize.url("vm_name", vm_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('OperationStatusResponse', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def restart( + self, resource_group_name, vm_name, custom_headers=None, raw=False, polling=True, **operation_config): + """The operation to restart a virtual machine. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param vm_name: The name of the virtual machine. + :type vm_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns OperationStatusResponse + or ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2017_12_01.models.OperationStatusResponse] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2017_12_01.models.OperationStatusResponse]] + :raises: :class:`CloudError` + """ + raw_result = self._restart_initial( + resource_group_name=resource_group_name, + vm_name=vm_name, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('OperationStatusResponse', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + restart.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/restart'} + + + def _start_initial( + self, resource_group_name, vm_name, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.start.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vmName': self._serialize.url("vm_name", vm_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('OperationStatusResponse', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def start( + self, resource_group_name, vm_name, custom_headers=None, raw=False, polling=True, **operation_config): + """The operation to start a virtual machine. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param vm_name: The name of the virtual machine. + :type vm_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns OperationStatusResponse + or ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2017_12_01.models.OperationStatusResponse] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2017_12_01.models.OperationStatusResponse]] + :raises: :class:`CloudError` + """ + raw_result = self._start_initial( + resource_group_name=resource_group_name, + vm_name=vm_name, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('OperationStatusResponse', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + start.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/start'} + + + def _redeploy_initial( + self, resource_group_name, vm_name, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.redeploy.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vmName': self._serialize.url("vm_name", vm_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('OperationStatusResponse', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def redeploy( + self, resource_group_name, vm_name, custom_headers=None, raw=False, polling=True, **operation_config): + """The operation to redeploy a virtual machine. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param vm_name: The name of the virtual machine. + :type vm_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns OperationStatusResponse + or ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2017_12_01.models.OperationStatusResponse] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2017_12_01.models.OperationStatusResponse]] + :raises: :class:`CloudError` + """ + raw_result = self._redeploy_initial( + resource_group_name=resource_group_name, + vm_name=vm_name, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('OperationStatusResponse', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + redeploy.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/redeploy'} + + + def _perform_maintenance_initial( + self, resource_group_name, vm_name, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.perform_maintenance.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vmName': self._serialize.url("vm_name", vm_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('OperationStatusResponse', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def perform_maintenance( + self, resource_group_name, vm_name, custom_headers=None, raw=False, polling=True, **operation_config): + """The operation to perform maintenance on a virtual machine. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param vm_name: The name of the virtual machine. + :type vm_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns OperationStatusResponse + or ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2017_12_01.models.OperationStatusResponse] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2017_12_01.models.OperationStatusResponse]] + :raises: :class:`CloudError` + """ + raw_result = self._perform_maintenance_initial( + resource_group_name=resource_group_name, + vm_name=vm_name, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('OperationStatusResponse', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + perform_maintenance.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/performMaintenance'} + + + def _run_command_initial( + self, resource_group_name, vm_name, parameters, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.run_command.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vmName': self._serialize.url("vm_name", vm_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(parameters, 'RunCommandInput') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('RunCommandResult', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def run_command( + self, resource_group_name, vm_name, parameters, custom_headers=None, raw=False, polling=True, **operation_config): + """Run command on the VM. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param vm_name: The name of the virtual machine. + :type vm_name: str + :param parameters: Parameters supplied to the Run command operation. + :type parameters: + ~azure.mgmt.compute.v2017_12_01.models.RunCommandInput + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns RunCommandResult or + ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2017_12_01.models.RunCommandResult] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2017_12_01.models.RunCommandResult]] + :raises: :class:`CloudError` + """ + raw_result = self._run_command_initial( + resource_group_name=resource_group_name, + vm_name=vm_name, + parameters=parameters, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('RunCommandResult', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + run_command.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/runCommand'} diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/operations/availability_sets_operations.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/operations/availability_sets_operations.py deleted file mode 100644 index 1c03e1db2dc7..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/operations/availability_sets_operations.py +++ /dev/null @@ -1,504 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError - -from .. import models - - -class AvailabilitySetsOperations(object): - """AvailabilitySetsOperations operations. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: Client Api Version. Constant value: "2017-12-01". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2017-12-01" - - self.config = config - - def create_or_update( - self, resource_group_name, availability_set_name, parameters, custom_headers=None, raw=False, **operation_config): - """Create or update an availability set. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param availability_set_name: The name of the availability set. - :type availability_set_name: str - :param parameters: Parameters supplied to the Create Availability Set - operation. - :type parameters: - ~azure.mgmt.compute.v2017_12_01.models.AvailabilitySet - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: AvailabilitySet or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.compute.v2017_12_01.models.AvailabilitySet or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.create_or_update.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'availabilitySetName': self._serialize.url("availability_set_name", availability_set_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(parameters, 'AvailabilitySet') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('AvailabilitySet', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}'} - - def update( - self, resource_group_name, availability_set_name, parameters, custom_headers=None, raw=False, **operation_config): - """Update an availability set. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param availability_set_name: The name of the availability set. - :type availability_set_name: str - :param parameters: Parameters supplied to the Update Availability Set - operation. - :type parameters: - ~azure.mgmt.compute.v2017_12_01.models.AvailabilitySetUpdate - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: AvailabilitySet or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.compute.v2017_12_01.models.AvailabilitySet or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.update.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'availabilitySetName': self._serialize.url("availability_set_name", availability_set_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(parameters, 'AvailabilitySetUpdate') - - # Construct and send request - request = self._client.patch(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('AvailabilitySet', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}'} - - def delete( - self, resource_group_name, availability_set_name, custom_headers=None, raw=False, **operation_config): - """Delete an availability set. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param availability_set_name: The name of the availability set. - :type availability_set_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: OperationStatusResponse or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.compute.v2017_12_01.models.OperationStatusResponse - or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.delete.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'availabilitySetName': self._serialize.url("availability_set_name", availability_set_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 204]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('OperationStatusResponse', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}'} - - def get( - self, resource_group_name, availability_set_name, custom_headers=None, raw=False, **operation_config): - """Retrieves information about an availability set. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param availability_set_name: The name of the availability set. - :type availability_set_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: AvailabilitySet or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.compute.v2017_12_01.models.AvailabilitySet or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'availabilitySetName': self._serialize.url("availability_set_name", availability_set_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('AvailabilitySet', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}'} - - def list_by_subscription( - self, custom_headers=None, raw=False, **operation_config): - """Lists all availability sets in a subscription. - - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of AvailabilitySet - :rtype: - ~azure.mgmt.compute.v2017_12_01.models.AvailabilitySetPaged[~azure.mgmt.compute.v2017_12_01.models.AvailabilitySet] - :raises: :class:`CloudError` - """ - def internal_paging(next_link=None, raw=False): - - if not next_link: - # Construct URL - url = self.list_by_subscription.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - deserialized = models.AvailabilitySetPaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.AvailabilitySetPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - list_by_subscription.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Compute/availabilitySets'} - - def list( - self, resource_group_name, custom_headers=None, raw=False, **operation_config): - """Lists all availability sets in a resource group. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of AvailabilitySet - :rtype: - ~azure.mgmt.compute.v2017_12_01.models.AvailabilitySetPaged[~azure.mgmt.compute.v2017_12_01.models.AvailabilitySet] - :raises: :class:`CloudError` - """ - def internal_paging(next_link=None, raw=False): - - if not next_link: - # Construct URL - url = self.list.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - deserialized = models.AvailabilitySetPaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.AvailabilitySetPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets'} - - def list_available_sizes( - self, resource_group_name, availability_set_name, custom_headers=None, raw=False, **operation_config): - """Lists all available virtual machine sizes that can be used to create a - new virtual machine in an existing availability set. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param availability_set_name: The name of the availability set. - :type availability_set_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of VirtualMachineSize - :rtype: - ~azure.mgmt.compute.v2017_12_01.models.VirtualMachineSizePaged[~azure.mgmt.compute.v2017_12_01.models.VirtualMachineSize] - :raises: :class:`CloudError` - """ - def internal_paging(next_link=None, raw=False): - - if not next_link: - # Construct URL - url = self.list_available_sizes.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'availabilitySetName': self._serialize.url("availability_set_name", availability_set_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - deserialized = models.VirtualMachineSizePaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.VirtualMachineSizePaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - list_available_sizes.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}/vmSizes'} diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/operations/images_operations.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/operations/images_operations.py deleted file mode 100644 index cb581ace00f5..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/operations/images_operations.py +++ /dev/null @@ -1,536 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError -from msrest.polling import LROPoller, NoPolling -from msrestazure.polling.arm_polling import ARMPolling - -from .. import models - - -class ImagesOperations(object): - """ImagesOperations operations. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: Client Api Version. Constant value: "2017-12-01". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2017-12-01" - - self.config = config - - - def _create_or_update_initial( - self, resource_group_name, image_name, parameters, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.create_or_update.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'imageName': self._serialize.url("image_name", image_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(parameters, 'Image') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 201]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('Image', response) - if response.status_code == 201: - deserialized = self._deserialize('Image', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def create_or_update( - self, resource_group_name, image_name, parameters, custom_headers=None, raw=False, polling=True, **operation_config): - """Create or update an image. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param image_name: The name of the image. - :type image_name: str - :param parameters: Parameters supplied to the Create Image operation. - :type parameters: ~azure.mgmt.compute.v2017_12_01.models.Image - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns Image or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2017_12_01.models.Image] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2017_12_01.models.Image]] - :raises: :class:`CloudError` - """ - raw_result = self._create_or_update_initial( - resource_group_name=resource_group_name, - image_name=image_name, - parameters=parameters, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('Image', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/images/{imageName}'} - - - def _update_initial( - self, resource_group_name, image_name, parameters, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.update.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'imageName': self._serialize.url("image_name", image_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(parameters, 'ImageUpdate') - - # Construct and send request - request = self._client.patch(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 201]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('Image', response) - if response.status_code == 201: - deserialized = self._deserialize('Image', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def update( - self, resource_group_name, image_name, parameters, custom_headers=None, raw=False, polling=True, **operation_config): - """Update an image. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param image_name: The name of the image. - :type image_name: str - :param parameters: Parameters supplied to the Update Image operation. - :type parameters: ~azure.mgmt.compute.v2017_12_01.models.ImageUpdate - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns Image or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2017_12_01.models.Image] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2017_12_01.models.Image]] - :raises: :class:`CloudError` - """ - raw_result = self._update_initial( - resource_group_name=resource_group_name, - image_name=image_name, - parameters=parameters, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('Image', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/images/{imageName}'} - - - def _delete_initial( - self, resource_group_name, image_name, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.delete.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'imageName': self._serialize.url("image_name", image_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202, 204]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('OperationStatusResponse', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def delete( - self, resource_group_name, image_name, custom_headers=None, raw=False, polling=True, **operation_config): - """Deletes an Image. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param image_name: The name of the image. - :type image_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns OperationStatusResponse - or ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2017_12_01.models.OperationStatusResponse] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2017_12_01.models.OperationStatusResponse]] - :raises: :class:`CloudError` - """ - raw_result = self._delete_initial( - resource_group_name=resource_group_name, - image_name=image_name, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('OperationStatusResponse', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/images/{imageName}'} - - def get( - self, resource_group_name, image_name, expand=None, custom_headers=None, raw=False, **operation_config): - """Gets an image. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param image_name: The name of the image. - :type image_name: str - :param expand: The expand expression to apply on the operation. - :type expand: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: Image or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.compute.v2017_12_01.models.Image or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'imageName': self._serialize.url("image_name", image_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - if expand is not None: - query_parameters['$expand'] = self._serialize.query("expand", expand, 'str') - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('Image', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/images/{imageName}'} - - def list_by_resource_group( - self, resource_group_name, custom_headers=None, raw=False, **operation_config): - """Gets the list of images under a resource group. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of Image - :rtype: - ~azure.mgmt.compute.v2017_12_01.models.ImagePaged[~azure.mgmt.compute.v2017_12_01.models.Image] - :raises: :class:`CloudError` - """ - def internal_paging(next_link=None, raw=False): - - if not next_link: - # Construct URL - url = self.list_by_resource_group.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - deserialized = models.ImagePaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.ImagePaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/images'} - - def list( - self, custom_headers=None, raw=False, **operation_config): - """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. - - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of Image - :rtype: - ~azure.mgmt.compute.v2017_12_01.models.ImagePaged[~azure.mgmt.compute.v2017_12_01.models.Image] - :raises: :class:`CloudError` - """ - def internal_paging(next_link=None, raw=False): - - if not next_link: - # Construct URL - url = self.list.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - deserialized = models.ImagePaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.ImagePaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Compute/images'} diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/operations/log_analytics_operations.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/operations/log_analytics_operations.py deleted file mode 100644 index 20b8a08d6dca..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/operations/log_analytics_operations.py +++ /dev/null @@ -1,242 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError -from msrest.polling import LROPoller, NoPolling -from msrestazure.polling.arm_polling import ARMPolling - -from .. import models - - -class LogAnalyticsOperations(object): - """LogAnalyticsOperations operations. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: Client Api Version. Constant value: "2017-12-01". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2017-12-01" - - self.config = config - - - def _export_request_rate_by_interval_initial( - self, parameters, location, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.export_request_rate_by_interval.metadata['url'] - path_format_arguments = { - 'location': self._serialize.url("location", location, 'str', pattern=r'^[-\w\._]+$'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(parameters, 'RequestRateByIntervalInput') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('LogAnalyticsOperationResult', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def export_request_rate_by_interval( - self, parameters, location, custom_headers=None, raw=False, polling=True, **operation_config): - """Export logs that show Api requests made by this subscription in the - given time window to show throttling activities. - - :param parameters: Parameters supplied to the LogAnalytics - getRequestRateByInterval Api. - :type parameters: - ~azure.mgmt.compute.v2017_12_01.models.RequestRateByIntervalInput - :param location: The location upon which virtual-machine-sizes is - queried. - :type location: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns - LogAnalyticsOperationResult or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2017_12_01.models.LogAnalyticsOperationResult] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2017_12_01.models.LogAnalyticsOperationResult]] - :raises: :class:`CloudError` - """ - raw_result = self._export_request_rate_by_interval_initial( - parameters=parameters, - location=location, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('LogAnalyticsOperationResult', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - export_request_rate_by_interval.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/logAnalytics/apiAccess/getRequestRateByInterval'} - - - def _export_throttled_requests_initial( - self, parameters, location, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.export_throttled_requests.metadata['url'] - path_format_arguments = { - 'location': self._serialize.url("location", location, 'str', pattern=r'^[-\w\._]+$'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(parameters, 'ThrottledRequestsInput') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('LogAnalyticsOperationResult', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def export_throttled_requests( - self, parameters, location, custom_headers=None, raw=False, polling=True, **operation_config): - """Export logs that show total throttled Api requests for this - subscription in the given time window. - - :param parameters: Parameters supplied to the LogAnalytics - getThrottledRequests Api. - :type parameters: - ~azure.mgmt.compute.v2017_12_01.models.ThrottledRequestsInput - :param location: The location upon which virtual-machine-sizes is - queried. - :type location: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns - LogAnalyticsOperationResult or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2017_12_01.models.LogAnalyticsOperationResult] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2017_12_01.models.LogAnalyticsOperationResult]] - :raises: :class:`CloudError` - """ - raw_result = self._export_throttled_requests_initial( - parameters=parameters, - location=location, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('LogAnalyticsOperationResult', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - export_throttled_requests.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/logAnalytics/apiAccess/getThrottledRequests'} diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/operations/operations.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/operations/operations.py deleted file mode 100644 index 36fb56164d1d..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/operations/operations.py +++ /dev/null @@ -1,98 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError - -from .. import models - - -class Operations(object): - """Operations operations. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: Client Api Version. Constant value: "2017-12-01". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2017-12-01" - - self.config = config - - def list( - self, custom_headers=None, raw=False, **operation_config): - """Gets a list of compute operations. - - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of ComputeOperationValue - :rtype: - ~azure.mgmt.compute.v2017_12_01.models.ComputeOperationValuePaged[~azure.mgmt.compute.v2017_12_01.models.ComputeOperationValue] - :raises: :class:`CloudError` - """ - def internal_paging(next_link=None, raw=False): - - if not next_link: - # Construct URL - url = self.list.metadata['url'] - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - deserialized = models.ComputeOperationValuePaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.ComputeOperationValuePaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - list.metadata = {'url': '/providers/Microsoft.Compute/operations'} diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/operations/usage_operations.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/operations/usage_operations.py deleted file mode 100644 index f73139736d7e..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/operations/usage_operations.py +++ /dev/null @@ -1,107 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError - -from .. import models - - -class UsageOperations(object): - """UsageOperations operations. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: Client Api Version. Constant value: "2017-12-01". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2017-12-01" - - self.config = config - - def list( - self, location, custom_headers=None, raw=False, **operation_config): - """Gets, for the specified location, the current compute resource usage - information as well as the limits for compute resources under the - subscription. - - :param location: The location for which resource usage is queried. - :type location: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of Usage - :rtype: - ~azure.mgmt.compute.v2017_12_01.models.UsagePaged[~azure.mgmt.compute.v2017_12_01.models.Usage] - :raises: :class:`CloudError` - """ - def internal_paging(next_link=None, raw=False): - - if not next_link: - # Construct URL - url = self.list.metadata['url'] - path_format_arguments = { - 'location': self._serialize.url("location", location, 'str', pattern=r'^[-\w\._]+$'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - deserialized = models.UsagePaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.UsagePaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/usages'} diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/operations/virtual_machine_extension_images_operations.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/operations/virtual_machine_extension_images_operations.py deleted file mode 100644 index 06828379f550..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/operations/virtual_machine_extension_images_operations.py +++ /dev/null @@ -1,248 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError - -from .. import models - - -class VirtualMachineExtensionImagesOperations(object): - """VirtualMachineExtensionImagesOperations operations. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: Client Api Version. Constant value: "2017-12-01". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2017-12-01" - - self.config = config - - def get( - self, location, publisher_name, type, version, custom_headers=None, raw=False, **operation_config): - """Gets a virtual machine extension image. - - :param location: The name of a supported Azure region. - :type location: str - :param publisher_name: - :type publisher_name: str - :param type: - :type type: str - :param version: - :type version: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: VirtualMachineExtensionImage or ClientRawResponse if raw=true - :rtype: - ~azure.mgmt.compute.v2017_12_01.models.VirtualMachineExtensionImage or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get.metadata['url'] - path_format_arguments = { - 'location': self._serialize.url("location", location, 'str'), - 'publisherName': self._serialize.url("publisher_name", publisher_name, 'str'), - 'type': self._serialize.url("type", type, 'str'), - 'version': self._serialize.url("version", version, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('VirtualMachineExtensionImage', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/publishers/{publisherName}/artifacttypes/vmextension/types/{type}/versions/{version}'} - - def list_types( - self, location, publisher_name, custom_headers=None, raw=False, **operation_config): - """Gets a list of virtual machine extension image types. - - :param location: The name of a supported Azure region. - :type location: str - :param publisher_name: - :type publisher_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: list or ClientRawResponse if raw=true - :rtype: - list[~azure.mgmt.compute.v2017_12_01.models.VirtualMachineExtensionImage] - or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.list_types.metadata['url'] - path_format_arguments = { - 'location': self._serialize.url("location", location, 'str'), - 'publisherName': self._serialize.url("publisher_name", publisher_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('[VirtualMachineExtensionImage]', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - list_types.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/publishers/{publisherName}/artifacttypes/vmextension/types'} - - def list_versions( - self, location, publisher_name, type, filter=None, top=None, orderby=None, custom_headers=None, raw=False, **operation_config): - """Gets a list of virtual machine extension image versions. - - :param location: The name of a supported Azure region. - :type location: str - :param publisher_name: - :type publisher_name: str - :param type: - :type type: str - :param filter: The filter to apply on the operation. - :type filter: str - :param top: - :type top: int - :param orderby: - :type orderby: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: list or ClientRawResponse if raw=true - :rtype: - list[~azure.mgmt.compute.v2017_12_01.models.VirtualMachineExtensionImage] - or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.list_versions.metadata['url'] - path_format_arguments = { - 'location': self._serialize.url("location", location, 'str'), - 'publisherName': self._serialize.url("publisher_name", publisher_name, 'str'), - 'type': self._serialize.url("type", type, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - if filter is not None: - query_parameters['$filter'] = self._serialize.query("filter", filter, 'str') - if top is not None: - query_parameters['$top'] = self._serialize.query("top", top, 'int') - if orderby is not None: - query_parameters['$orderby'] = self._serialize.query("orderby", orderby, 'str') - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('[VirtualMachineExtensionImage]', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - list_versions.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/publishers/{publisherName}/artifacttypes/vmextension/types/{type}/versions'} diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/operations/virtual_machine_extensions_operations.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/operations/virtual_machine_extensions_operations.py deleted file mode 100644 index c19b4f7b9512..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/operations/virtual_machine_extensions_operations.py +++ /dev/null @@ -1,424 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError -from msrest.polling import LROPoller, NoPolling -from msrestazure.polling.arm_polling import ARMPolling - -from .. import models - - -class VirtualMachineExtensionsOperations(object): - """VirtualMachineExtensionsOperations operations. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: Client Api Version. Constant value: "2017-12-01". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2017-12-01" - - self.config = config - - - def _create_or_update_initial( - self, resource_group_name, vm_name, vm_extension_name, extension_parameters, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.create_or_update.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'vmName': self._serialize.url("vm_name", vm_name, 'str'), - 'vmExtensionName': self._serialize.url("vm_extension_name", vm_extension_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(extension_parameters, 'VirtualMachineExtension') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 201]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('VirtualMachineExtension', response) - if response.status_code == 201: - deserialized = self._deserialize('VirtualMachineExtension', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def create_or_update( - self, resource_group_name, vm_name, vm_extension_name, extension_parameters, custom_headers=None, raw=False, polling=True, **operation_config): - """The operation to create or update the extension. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param vm_name: The name of the virtual machine where the extension - should be created or updated. - :type vm_name: str - :param vm_extension_name: The name of the virtual machine extension. - :type vm_extension_name: str - :param extension_parameters: Parameters supplied to the Create Virtual - Machine Extension operation. - :type extension_parameters: - ~azure.mgmt.compute.v2017_12_01.models.VirtualMachineExtension - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns VirtualMachineExtension - or ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2017_12_01.models.VirtualMachineExtension] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2017_12_01.models.VirtualMachineExtension]] - :raises: :class:`CloudError` - """ - raw_result = self._create_or_update_initial( - resource_group_name=resource_group_name, - vm_name=vm_name, - vm_extension_name=vm_extension_name, - extension_parameters=extension_parameters, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('VirtualMachineExtension', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/extensions/{vmExtensionName}'} - - - def _update_initial( - self, resource_group_name, vm_name, vm_extension_name, extension_parameters, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.update.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'vmName': self._serialize.url("vm_name", vm_name, 'str'), - 'vmExtensionName': self._serialize.url("vm_extension_name", vm_extension_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(extension_parameters, 'VirtualMachineExtensionUpdate') - - # Construct and send request - request = self._client.patch(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('VirtualMachineExtension', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def update( - self, resource_group_name, vm_name, vm_extension_name, extension_parameters, custom_headers=None, raw=False, polling=True, **operation_config): - """The operation to update the extension. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param vm_name: The name of the virtual machine where the extension - should be updated. - :type vm_name: str - :param vm_extension_name: The name of the virtual machine extension. - :type vm_extension_name: str - :param extension_parameters: Parameters supplied to the Update Virtual - Machine Extension operation. - :type extension_parameters: - ~azure.mgmt.compute.v2017_12_01.models.VirtualMachineExtensionUpdate - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns VirtualMachineExtension - or ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2017_12_01.models.VirtualMachineExtension] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2017_12_01.models.VirtualMachineExtension]] - :raises: :class:`CloudError` - """ - raw_result = self._update_initial( - resource_group_name=resource_group_name, - vm_name=vm_name, - vm_extension_name=vm_extension_name, - extension_parameters=extension_parameters, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('VirtualMachineExtension', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/extensions/{vmExtensionName}'} - - - def _delete_initial( - self, resource_group_name, vm_name, vm_extension_name, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.delete.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'vmName': self._serialize.url("vm_name", vm_name, 'str'), - 'vmExtensionName': self._serialize.url("vm_extension_name", vm_extension_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202, 204]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('OperationStatusResponse', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def delete( - self, resource_group_name, vm_name, vm_extension_name, custom_headers=None, raw=False, polling=True, **operation_config): - """The operation to delete the extension. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param vm_name: The name of the virtual machine where the extension - should be deleted. - :type vm_name: str - :param vm_extension_name: The name of the virtual machine extension. - :type vm_extension_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns OperationStatusResponse - or ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2017_12_01.models.OperationStatusResponse] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2017_12_01.models.OperationStatusResponse]] - :raises: :class:`CloudError` - """ - raw_result = self._delete_initial( - resource_group_name=resource_group_name, - vm_name=vm_name, - vm_extension_name=vm_extension_name, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('OperationStatusResponse', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/extensions/{vmExtensionName}'} - - def get( - self, resource_group_name, vm_name, vm_extension_name, expand=None, custom_headers=None, raw=False, **operation_config): - """The operation to get the extension. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param vm_name: The name of the virtual machine containing the - extension. - :type vm_name: str - :param vm_extension_name: The name of the virtual machine extension. - :type vm_extension_name: str - :param expand: The expand expression to apply on the operation. - :type expand: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: VirtualMachineExtension or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.compute.v2017_12_01.models.VirtualMachineExtension - or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'vmName': self._serialize.url("vm_name", vm_name, 'str'), - 'vmExtensionName': self._serialize.url("vm_extension_name", vm_extension_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - if expand is not None: - query_parameters['$expand'] = self._serialize.query("expand", expand, 'str') - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('VirtualMachineExtension', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/extensions/{vmExtensionName}'} diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/operations/virtual_machine_images_operations.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/operations/virtual_machine_images_operations.py deleted file mode 100644 index d6f28937b4fc..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/operations/virtual_machine_images_operations.py +++ /dev/null @@ -1,383 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError - -from .. import models - - -class VirtualMachineImagesOperations(object): - """VirtualMachineImagesOperations operations. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: Client Api Version. Constant value: "2017-12-01". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2017-12-01" - - self.config = config - - def get( - self, location, publisher_name, offer, skus, version, custom_headers=None, raw=False, **operation_config): - """Gets a virtual machine image. - - :param location: The name of a supported Azure region. - :type location: str - :param publisher_name: A valid image publisher. - :type publisher_name: str - :param offer: A valid image publisher offer. - :type offer: str - :param skus: A valid image SKU. - :type skus: str - :param version: A valid image SKU version. - :type version: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: VirtualMachineImage or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.compute.v2017_12_01.models.VirtualMachineImage or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get.metadata['url'] - path_format_arguments = { - 'location': self._serialize.url("location", location, 'str'), - 'publisherName': self._serialize.url("publisher_name", publisher_name, 'str'), - 'offer': self._serialize.url("offer", offer, 'str'), - 'skus': self._serialize.url("skus", skus, 'str'), - 'version': self._serialize.url("version", version, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('VirtualMachineImage', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/publishers/{publisherName}/artifacttypes/vmimage/offers/{offer}/skus/{skus}/versions/{version}'} - - def list( - self, location, publisher_name, offer, skus, filter=None, top=None, orderby=None, custom_headers=None, raw=False, **operation_config): - """Gets a list of all virtual machine image versions for the specified - location, publisher, offer, and SKU. - - :param location: The name of a supported Azure region. - :type location: str - :param publisher_name: A valid image publisher. - :type publisher_name: str - :param offer: A valid image publisher offer. - :type offer: str - :param skus: A valid image SKU. - :type skus: str - :param filter: The filter to apply on the operation. - :type filter: str - :param top: - :type top: int - :param orderby: - :type orderby: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: list or ClientRawResponse if raw=true - :rtype: - list[~azure.mgmt.compute.v2017_12_01.models.VirtualMachineImageResource] - or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.list.metadata['url'] - path_format_arguments = { - 'location': self._serialize.url("location", location, 'str'), - 'publisherName': self._serialize.url("publisher_name", publisher_name, 'str'), - 'offer': self._serialize.url("offer", offer, 'str'), - 'skus': self._serialize.url("skus", skus, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - if filter is not None: - query_parameters['$filter'] = self._serialize.query("filter", filter, 'str') - if top is not None: - query_parameters['$top'] = self._serialize.query("top", top, 'int') - if orderby is not None: - query_parameters['$orderby'] = self._serialize.query("orderby", orderby, 'str') - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('[VirtualMachineImageResource]', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/publishers/{publisherName}/artifacttypes/vmimage/offers/{offer}/skus/{skus}/versions'} - - def list_offers( - self, location, publisher_name, custom_headers=None, raw=False, **operation_config): - """Gets a list of virtual machine image offers for the specified location - and publisher. - - :param location: The name of a supported Azure region. - :type location: str - :param publisher_name: A valid image publisher. - :type publisher_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: list or ClientRawResponse if raw=true - :rtype: - list[~azure.mgmt.compute.v2017_12_01.models.VirtualMachineImageResource] - or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.list_offers.metadata['url'] - path_format_arguments = { - 'location': self._serialize.url("location", location, 'str'), - 'publisherName': self._serialize.url("publisher_name", publisher_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('[VirtualMachineImageResource]', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - list_offers.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/publishers/{publisherName}/artifacttypes/vmimage/offers'} - - def list_publishers( - self, location, custom_headers=None, raw=False, **operation_config): - """Gets a list of virtual machine image publishers for the specified Azure - location. - - :param location: The name of a supported Azure region. - :type location: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: list or ClientRawResponse if raw=true - :rtype: - list[~azure.mgmt.compute.v2017_12_01.models.VirtualMachineImageResource] - or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.list_publishers.metadata['url'] - path_format_arguments = { - 'location': self._serialize.url("location", location, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('[VirtualMachineImageResource]', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - list_publishers.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/publishers'} - - def list_skus( - self, location, publisher_name, offer, custom_headers=None, raw=False, **operation_config): - """Gets a list of virtual machine image SKUs for the specified location, - publisher, and offer. - - :param location: The name of a supported Azure region. - :type location: str - :param publisher_name: A valid image publisher. - :type publisher_name: str - :param offer: A valid image publisher offer. - :type offer: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: list or ClientRawResponse if raw=true - :rtype: - list[~azure.mgmt.compute.v2017_12_01.models.VirtualMachineImageResource] - or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.list_skus.metadata['url'] - path_format_arguments = { - 'location': self._serialize.url("location", location, 'str'), - 'publisherName': self._serialize.url("publisher_name", publisher_name, 'str'), - 'offer': self._serialize.url("offer", offer, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('[VirtualMachineImageResource]', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - list_skus.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/publishers/{publisherName}/artifacttypes/vmimage/offers/{offer}/skus'} diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/operations/virtual_machine_run_commands_operations.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/operations/virtual_machine_run_commands_operations.py deleted file mode 100644 index 8d9b516aa004..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/operations/virtual_machine_run_commands_operations.py +++ /dev/null @@ -1,167 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError - -from .. import models - - -class VirtualMachineRunCommandsOperations(object): - """VirtualMachineRunCommandsOperations operations. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: Client Api Version. Constant value: "2017-12-01". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2017-12-01" - - self.config = config - - def list( - self, location, custom_headers=None, raw=False, **operation_config): - """Lists all available run commands for a subscription in a location. - - :param location: The location upon which run commands is queried. - :type location: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of RunCommandDocumentBase - :rtype: - ~azure.mgmt.compute.v2017_12_01.models.RunCommandDocumentBasePaged[~azure.mgmt.compute.v2017_12_01.models.RunCommandDocumentBase] - :raises: :class:`CloudError` - """ - def internal_paging(next_link=None, raw=False): - - if not next_link: - # Construct URL - url = self.list.metadata['url'] - path_format_arguments = { - 'location': self._serialize.url("location", location, 'str', pattern=r'^[-\w\._]+$'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - deserialized = models.RunCommandDocumentBasePaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.RunCommandDocumentBasePaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/runCommands'} - - def get( - self, location, command_id, custom_headers=None, raw=False, **operation_config): - """Gets specific run command for a subscription in a location. - - :param location: The location upon which run commands is queried. - :type location: str - :param command_id: The command id. - :type command_id: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: RunCommandDocument or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.compute.v2017_12_01.models.RunCommandDocument or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get.metadata['url'] - path_format_arguments = { - 'location': self._serialize.url("location", location, 'str', pattern=r'^[-\w\._]+$'), - 'commandId': self._serialize.url("command_id", command_id, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('RunCommandDocument', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/runCommands/{commandId}'} diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/operations/virtual_machine_scale_set_extensions_operations.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/operations/virtual_machine_scale_set_extensions_operations.py deleted file mode 100644 index e4e9013bd3f5..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/operations/virtual_machine_scale_set_extensions_operations.py +++ /dev/null @@ -1,391 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError -from msrest.polling import LROPoller, NoPolling -from msrestazure.polling.arm_polling import ARMPolling - -from .. import models - - -class VirtualMachineScaleSetExtensionsOperations(object): - """VirtualMachineScaleSetExtensionsOperations operations. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: Client Api Version. Constant value: "2017-12-01". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2017-12-01" - - self.config = config - - - def _create_or_update_initial( - self, resource_group_name, vm_scale_set_name, vmss_extension_name, extension_parameters, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.create_or_update.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), - 'vmssExtensionName': self._serialize.url("vmss_extension_name", vmss_extension_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(extension_parameters, 'VirtualMachineScaleSetExtension') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 201]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('VirtualMachineScaleSetExtension', response) - if response.status_code == 201: - deserialized = self._deserialize('VirtualMachineScaleSetExtension', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def create_or_update( - self, resource_group_name, vm_scale_set_name, vmss_extension_name, extension_parameters, custom_headers=None, raw=False, polling=True, **operation_config): - """The operation to create or update an extension. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param vm_scale_set_name: The name of the VM scale set where the - extension should be create or updated. - :type vm_scale_set_name: str - :param vmss_extension_name: The name of the VM scale set extension. - :type vmss_extension_name: str - :param extension_parameters: Parameters supplied to the Create VM - scale set Extension operation. - :type extension_parameters: - ~azure.mgmt.compute.v2017_12_01.models.VirtualMachineScaleSetExtension - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns - VirtualMachineScaleSetExtension or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2017_12_01.models.VirtualMachineScaleSetExtension] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2017_12_01.models.VirtualMachineScaleSetExtension]] - :raises: :class:`CloudError` - """ - raw_result = self._create_or_update_initial( - resource_group_name=resource_group_name, - vm_scale_set_name=vm_scale_set_name, - vmss_extension_name=vmss_extension_name, - extension_parameters=extension_parameters, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('VirtualMachineScaleSetExtension', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/extensions/{vmssExtensionName}'} - - - def _delete_initial( - self, resource_group_name, vm_scale_set_name, vmss_extension_name, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.delete.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), - 'vmssExtensionName': self._serialize.url("vmss_extension_name", vmss_extension_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202, 204]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('OperationStatusResponse', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def delete( - self, resource_group_name, vm_scale_set_name, vmss_extension_name, custom_headers=None, raw=False, polling=True, **operation_config): - """The operation to delete the extension. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param vm_scale_set_name: The name of the VM scale set where the - extension should be deleted. - :type vm_scale_set_name: str - :param vmss_extension_name: The name of the VM scale set extension. - :type vmss_extension_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns OperationStatusResponse - or ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2017_12_01.models.OperationStatusResponse] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2017_12_01.models.OperationStatusResponse]] - :raises: :class:`CloudError` - """ - raw_result = self._delete_initial( - resource_group_name=resource_group_name, - vm_scale_set_name=vm_scale_set_name, - vmss_extension_name=vmss_extension_name, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('OperationStatusResponse', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/extensions/{vmssExtensionName}'} - - def get( - self, resource_group_name, vm_scale_set_name, vmss_extension_name, expand=None, custom_headers=None, raw=False, **operation_config): - """The operation to get the extension. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param vm_scale_set_name: The name of the VM scale set containing the - extension. - :type vm_scale_set_name: str - :param vmss_extension_name: The name of the VM scale set extension. - :type vmss_extension_name: str - :param expand: The expand expression to apply on the operation. - :type expand: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: VirtualMachineScaleSetExtension or ClientRawResponse if - raw=true - :rtype: - ~azure.mgmt.compute.v2017_12_01.models.VirtualMachineScaleSetExtension - or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), - 'vmssExtensionName': self._serialize.url("vmss_extension_name", vmss_extension_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - if expand is not None: - query_parameters['$expand'] = self._serialize.query("expand", expand, 'str') - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('VirtualMachineScaleSetExtension', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/extensions/{vmssExtensionName}'} - - def list( - self, resource_group_name, vm_scale_set_name, custom_headers=None, raw=False, **operation_config): - """Gets a list of all extensions in a VM scale set. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param vm_scale_set_name: The name of the VM scale set containing the - extension. - :type vm_scale_set_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of VirtualMachineScaleSetExtension - :rtype: - ~azure.mgmt.compute.v2017_12_01.models.VirtualMachineScaleSetExtensionPaged[~azure.mgmt.compute.v2017_12_01.models.VirtualMachineScaleSetExtension] - :raises: :class:`CloudError` - """ - def internal_paging(next_link=None, raw=False): - - if not next_link: - # Construct URL - url = self.list.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - deserialized = models.VirtualMachineScaleSetExtensionPaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.VirtualMachineScaleSetExtensionPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/extensions'} diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/operations/virtual_machine_scale_set_rolling_upgrades_operations.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/operations/virtual_machine_scale_set_rolling_upgrades_operations.py deleted file mode 100644 index f7998c1ead7b..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/operations/virtual_machine_scale_set_rolling_upgrades_operations.py +++ /dev/null @@ -1,293 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError -from msrest.polling import LROPoller, NoPolling -from msrestazure.polling.arm_polling import ARMPolling - -from .. import models - - -class VirtualMachineScaleSetRollingUpgradesOperations(object): - """VirtualMachineScaleSetRollingUpgradesOperations operations. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: Client Api Version. Constant value: "2017-12-01". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2017-12-01" - - self.config = config - - - def _cancel_initial( - self, resource_group_name, vm_scale_set_name, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.cancel.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('OperationStatusResponse', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def cancel( - self, resource_group_name, vm_scale_set_name, custom_headers=None, raw=False, polling=True, **operation_config): - """Cancels the current virtual machine scale set rolling upgrade. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param vm_scale_set_name: The name of the VM scale set. - :type vm_scale_set_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns OperationStatusResponse - or ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2017_12_01.models.OperationStatusResponse] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2017_12_01.models.OperationStatusResponse]] - :raises: :class:`CloudError` - """ - raw_result = self._cancel_initial( - resource_group_name=resource_group_name, - vm_scale_set_name=vm_scale_set_name, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('OperationStatusResponse', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - cancel.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/rollingUpgrades/cancel'} - - - def _start_os_upgrade_initial( - self, resource_group_name, vm_scale_set_name, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.start_os_upgrade.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('OperationStatusResponse', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def start_os_upgrade( - self, resource_group_name, vm_scale_set_name, custom_headers=None, raw=False, polling=True, **operation_config): - """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. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param vm_scale_set_name: The name of the VM scale set. - :type vm_scale_set_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns OperationStatusResponse - or ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2017_12_01.models.OperationStatusResponse] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2017_12_01.models.OperationStatusResponse]] - :raises: :class:`CloudError` - """ - raw_result = self._start_os_upgrade_initial( - resource_group_name=resource_group_name, - vm_scale_set_name=vm_scale_set_name, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('OperationStatusResponse', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - start_os_upgrade.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/osRollingUpgrade'} - - def get_latest( - self, resource_group_name, vm_scale_set_name, custom_headers=None, raw=False, **operation_config): - """Gets the status of the latest virtual machine scale set rolling - upgrade. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param vm_scale_set_name: The name of the VM scale set. - :type vm_scale_set_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: RollingUpgradeStatusInfo or ClientRawResponse if raw=true - :rtype: - ~azure.mgmt.compute.v2017_12_01.models.RollingUpgradeStatusInfo or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get_latest.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('RollingUpgradeStatusInfo', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_latest.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/rollingUpgrades/latest'} diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/operations/virtual_machine_scale_set_vms_operations.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/operations/virtual_machine_scale_set_vms_operations.py deleted file mode 100644 index 8617fd76f233..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/operations/virtual_machine_scale_set_vms_operations.py +++ /dev/null @@ -1,1247 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError -from msrest.polling import LROPoller, NoPolling -from msrestazure.polling.arm_polling import ARMPolling - -from .. import models - - -class VirtualMachineScaleSetVMsOperations(object): - """VirtualMachineScaleSetVMsOperations operations. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: Client Api Version. Constant value: "2017-12-01". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2017-12-01" - - self.config = config - - - def _reimage_initial( - self, resource_group_name, vm_scale_set_name, instance_id, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.reimage.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), - 'instanceId': self._serialize.url("instance_id", instance_id, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('OperationStatusResponse', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def reimage( - self, resource_group_name, vm_scale_set_name, instance_id, custom_headers=None, raw=False, polling=True, **operation_config): - """Reimages (upgrade the operating system) a specific virtual machine in a - VM scale set. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param vm_scale_set_name: The name of the VM scale set. - :type vm_scale_set_name: str - :param instance_id: The instance ID of the virtual machine. - :type instance_id: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns OperationStatusResponse - or ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2017_12_01.models.OperationStatusResponse] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2017_12_01.models.OperationStatusResponse]] - :raises: :class:`CloudError` - """ - raw_result = self._reimage_initial( - resource_group_name=resource_group_name, - vm_scale_set_name=vm_scale_set_name, - instance_id=instance_id, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('OperationStatusResponse', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - reimage.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/virtualmachines/{instanceId}/reimage'} - - - def _reimage_all_initial( - self, resource_group_name, vm_scale_set_name, instance_id, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.reimage_all.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), - 'instanceId': self._serialize.url("instance_id", instance_id, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('OperationStatusResponse', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def reimage_all( - self, resource_group_name, vm_scale_set_name, instance_id, custom_headers=None, raw=False, polling=True, **operation_config): - """Allows you to re-image all the disks ( including data disks ) in the a - VM scale set instance. This operation is only supported for managed - disks. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param vm_scale_set_name: The name of the VM scale set. - :type vm_scale_set_name: str - :param instance_id: The instance ID of the virtual machine. - :type instance_id: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns OperationStatusResponse - or ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2017_12_01.models.OperationStatusResponse] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2017_12_01.models.OperationStatusResponse]] - :raises: :class:`CloudError` - """ - raw_result = self._reimage_all_initial( - resource_group_name=resource_group_name, - vm_scale_set_name=vm_scale_set_name, - instance_id=instance_id, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('OperationStatusResponse', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - reimage_all.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/virtualmachines/{instanceId}/reimageall'} - - - def _deallocate_initial( - self, resource_group_name, vm_scale_set_name, instance_id, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.deallocate.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), - 'instanceId': self._serialize.url("instance_id", instance_id, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('OperationStatusResponse', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def deallocate( - self, resource_group_name, vm_scale_set_name, instance_id, custom_headers=None, raw=False, polling=True, **operation_config): - """Deallocates a specific virtual machine in a VM scale set. Shuts down - the virtual machine and releases the compute resources it uses. You are - not billed for the compute resources of this virtual machine once it is - deallocated. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param vm_scale_set_name: The name of the VM scale set. - :type vm_scale_set_name: str - :param instance_id: The instance ID of the virtual machine. - :type instance_id: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns OperationStatusResponse - or ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2017_12_01.models.OperationStatusResponse] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2017_12_01.models.OperationStatusResponse]] - :raises: :class:`CloudError` - """ - raw_result = self._deallocate_initial( - resource_group_name=resource_group_name, - vm_scale_set_name=vm_scale_set_name, - instance_id=instance_id, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('OperationStatusResponse', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - deallocate.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/virtualmachines/{instanceId}/deallocate'} - - - def _update_initial( - self, resource_group_name, vm_scale_set_name, instance_id, parameters, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.update.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), - 'instanceId': self._serialize.url("instance_id", instance_id, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(parameters, 'VirtualMachineScaleSetVM') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('VirtualMachineScaleSetVM', response) - if response.status_code == 202: - deserialized = self._deserialize('VirtualMachineScaleSetVM', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def update( - self, resource_group_name, vm_scale_set_name, instance_id, parameters, custom_headers=None, raw=False, polling=True, **operation_config): - """Updates a virtual machine of a VM scale set. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param vm_scale_set_name: The name of the VM scale set where the - extension should be create or updated. - :type vm_scale_set_name: str - :param instance_id: The instance ID of the virtual machine. - :type instance_id: str - :param parameters: Parameters supplied to the Update Virtual Machine - Scale Sets VM operation. - :type parameters: - ~azure.mgmt.compute.v2017_12_01.models.VirtualMachineScaleSetVM - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns - VirtualMachineScaleSetVM or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2017_12_01.models.VirtualMachineScaleSetVM] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2017_12_01.models.VirtualMachineScaleSetVM]] - :raises: :class:`CloudError` - """ - raw_result = self._update_initial( - resource_group_name=resource_group_name, - vm_scale_set_name=vm_scale_set_name, - instance_id=instance_id, - parameters=parameters, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('VirtualMachineScaleSetVM', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/virtualmachines/{instanceId}'} - - - def _delete_initial( - self, resource_group_name, vm_scale_set_name, instance_id, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.delete.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), - 'instanceId': self._serialize.url("instance_id", instance_id, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202, 204]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('OperationStatusResponse', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def delete( - self, resource_group_name, vm_scale_set_name, instance_id, custom_headers=None, raw=False, polling=True, **operation_config): - """Deletes a virtual machine from a VM scale set. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param vm_scale_set_name: The name of the VM scale set. - :type vm_scale_set_name: str - :param instance_id: The instance ID of the virtual machine. - :type instance_id: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns OperationStatusResponse - or ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2017_12_01.models.OperationStatusResponse] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2017_12_01.models.OperationStatusResponse]] - :raises: :class:`CloudError` - """ - raw_result = self._delete_initial( - resource_group_name=resource_group_name, - vm_scale_set_name=vm_scale_set_name, - instance_id=instance_id, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('OperationStatusResponse', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/virtualmachines/{instanceId}'} - - def get( - self, resource_group_name, vm_scale_set_name, instance_id, custom_headers=None, raw=False, **operation_config): - """Gets a virtual machine from a VM scale set. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param vm_scale_set_name: The name of the VM scale set. - :type vm_scale_set_name: str - :param instance_id: The instance ID of the virtual machine. - :type instance_id: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: VirtualMachineScaleSetVM or ClientRawResponse if raw=true - :rtype: - ~azure.mgmt.compute.v2017_12_01.models.VirtualMachineScaleSetVM or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), - 'instanceId': self._serialize.url("instance_id", instance_id, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('VirtualMachineScaleSetVM', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/virtualmachines/{instanceId}'} - - def get_instance_view( - self, resource_group_name, vm_scale_set_name, instance_id, custom_headers=None, raw=False, **operation_config): - """Gets the status of a virtual machine from a VM scale set. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param vm_scale_set_name: The name of the VM scale set. - :type vm_scale_set_name: str - :param instance_id: The instance ID of the virtual machine. - :type instance_id: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: VirtualMachineScaleSetVMInstanceView or ClientRawResponse if - raw=true - :rtype: - ~azure.mgmt.compute.v2017_12_01.models.VirtualMachineScaleSetVMInstanceView - or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get_instance_view.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), - 'instanceId': self._serialize.url("instance_id", instance_id, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('VirtualMachineScaleSetVMInstanceView', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_instance_view.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/virtualmachines/{instanceId}/instanceView'} - - def list( - self, resource_group_name, virtual_machine_scale_set_name, filter=None, select=None, expand=None, custom_headers=None, raw=False, **operation_config): - """Gets a list of all virtual machines in a VM scale sets. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param virtual_machine_scale_set_name: The name of the VM scale set. - :type virtual_machine_scale_set_name: str - :param filter: The filter to apply to the operation. - :type filter: str - :param select: The list parameters. - :type select: str - :param expand: The expand expression to apply to the operation. - :type expand: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of VirtualMachineScaleSetVM - :rtype: - ~azure.mgmt.compute.v2017_12_01.models.VirtualMachineScaleSetVMPaged[~azure.mgmt.compute.v2017_12_01.models.VirtualMachineScaleSetVM] - :raises: :class:`CloudError` - """ - def internal_paging(next_link=None, raw=False): - - if not next_link: - # Construct URL - url = self.list.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'virtualMachineScaleSetName': self._serialize.url("virtual_machine_scale_set_name", virtual_machine_scale_set_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - if filter is not None: - query_parameters['$filter'] = self._serialize.query("filter", filter, 'str') - if select is not None: - query_parameters['$select'] = self._serialize.query("select", select, 'str') - if expand is not None: - query_parameters['$expand'] = self._serialize.query("expand", expand, 'str') - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - deserialized = models.VirtualMachineScaleSetVMPaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.VirtualMachineScaleSetVMPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{virtualMachineScaleSetName}/virtualMachines'} - - - def _power_off_initial( - self, resource_group_name, vm_scale_set_name, instance_id, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.power_off.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), - 'instanceId': self._serialize.url("instance_id", instance_id, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('OperationStatusResponse', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def power_off( - self, resource_group_name, vm_scale_set_name, instance_id, custom_headers=None, raw=False, polling=True, **operation_config): - """Power off (stop) a virtual machine in a VM scale set. Note that - resources are still attached and you are getting charged for the - resources. Instead, use deallocate to release resources and avoid - charges. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param vm_scale_set_name: The name of the VM scale set. - :type vm_scale_set_name: str - :param instance_id: The instance ID of the virtual machine. - :type instance_id: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns OperationStatusResponse - or ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2017_12_01.models.OperationStatusResponse] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2017_12_01.models.OperationStatusResponse]] - :raises: :class:`CloudError` - """ - raw_result = self._power_off_initial( - resource_group_name=resource_group_name, - vm_scale_set_name=vm_scale_set_name, - instance_id=instance_id, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('OperationStatusResponse', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - power_off.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/virtualmachines/{instanceId}/poweroff'} - - - def _restart_initial( - self, resource_group_name, vm_scale_set_name, instance_id, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.restart.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), - 'instanceId': self._serialize.url("instance_id", instance_id, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('OperationStatusResponse', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def restart( - self, resource_group_name, vm_scale_set_name, instance_id, custom_headers=None, raw=False, polling=True, **operation_config): - """Restarts a virtual machine in a VM scale set. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param vm_scale_set_name: The name of the VM scale set. - :type vm_scale_set_name: str - :param instance_id: The instance ID of the virtual machine. - :type instance_id: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns OperationStatusResponse - or ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2017_12_01.models.OperationStatusResponse] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2017_12_01.models.OperationStatusResponse]] - :raises: :class:`CloudError` - """ - raw_result = self._restart_initial( - resource_group_name=resource_group_name, - vm_scale_set_name=vm_scale_set_name, - instance_id=instance_id, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('OperationStatusResponse', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - restart.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/virtualmachines/{instanceId}/restart'} - - - def _start_initial( - self, resource_group_name, vm_scale_set_name, instance_id, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.start.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), - 'instanceId': self._serialize.url("instance_id", instance_id, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('OperationStatusResponse', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def start( - self, resource_group_name, vm_scale_set_name, instance_id, custom_headers=None, raw=False, polling=True, **operation_config): - """Starts a virtual machine in a VM scale set. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param vm_scale_set_name: The name of the VM scale set. - :type vm_scale_set_name: str - :param instance_id: The instance ID of the virtual machine. - :type instance_id: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns OperationStatusResponse - or ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2017_12_01.models.OperationStatusResponse] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2017_12_01.models.OperationStatusResponse]] - :raises: :class:`CloudError` - """ - raw_result = self._start_initial( - resource_group_name=resource_group_name, - vm_scale_set_name=vm_scale_set_name, - instance_id=instance_id, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('OperationStatusResponse', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - start.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/virtualmachines/{instanceId}/start'} - - - def _redeploy_initial( - self, resource_group_name, vm_scale_set_name, instance_id, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.redeploy.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), - 'instanceId': self._serialize.url("instance_id", instance_id, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('OperationStatusResponse', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def redeploy( - self, resource_group_name, vm_scale_set_name, instance_id, custom_headers=None, raw=False, polling=True, **operation_config): - """Redeploys a virtual machine in a VM scale set. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param vm_scale_set_name: The name of the VM scale set. - :type vm_scale_set_name: str - :param instance_id: The instance ID of the virtual machine. - :type instance_id: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns OperationStatusResponse - or ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2017_12_01.models.OperationStatusResponse] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2017_12_01.models.OperationStatusResponse]] - :raises: :class:`CloudError` - """ - raw_result = self._redeploy_initial( - resource_group_name=resource_group_name, - vm_scale_set_name=vm_scale_set_name, - instance_id=instance_id, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('OperationStatusResponse', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - redeploy.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/virtualmachines/{instanceId}/redeploy'} - - - def _perform_maintenance_initial( - self, resource_group_name, vm_scale_set_name, instance_id, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.perform_maintenance.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), - 'instanceId': self._serialize.url("instance_id", instance_id, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('OperationStatusResponse', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def perform_maintenance( - self, resource_group_name, vm_scale_set_name, instance_id, custom_headers=None, raw=False, polling=True, **operation_config): - """Performs maintenance on a virtual machine in a VM scale set. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param vm_scale_set_name: The name of the VM scale set. - :type vm_scale_set_name: str - :param instance_id: The instance ID of the virtual machine. - :type instance_id: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns OperationStatusResponse - or ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2017_12_01.models.OperationStatusResponse] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2017_12_01.models.OperationStatusResponse]] - :raises: :class:`CloudError` - """ - raw_result = self._perform_maintenance_initial( - resource_group_name=resource_group_name, - vm_scale_set_name=vm_scale_set_name, - instance_id=instance_id, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('OperationStatusResponse', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - perform_maintenance.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/virtualmachines/{instanceId}/performMaintenance'} diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/operations/virtual_machine_scale_sets_operations.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/operations/virtual_machine_scale_sets_operations.py deleted file mode 100644 index 4333c766aba1..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/operations/virtual_machine_scale_sets_operations.py +++ /dev/null @@ -1,1904 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError -from msrest.polling import LROPoller, NoPolling -from msrestazure.polling.arm_polling import ARMPolling - -from .. import models - - -class VirtualMachineScaleSetsOperations(object): - """VirtualMachineScaleSetsOperations operations. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: Client Api Version. Constant value: "2017-12-01". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2017-12-01" - - self.config = config - - - def _create_or_update_initial( - self, resource_group_name, vm_scale_set_name, parameters, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.create_or_update.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(parameters, 'VirtualMachineScaleSet') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 201]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('VirtualMachineScaleSet', response) - if response.status_code == 201: - deserialized = self._deserialize('VirtualMachineScaleSet', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def create_or_update( - self, resource_group_name, vm_scale_set_name, parameters, custom_headers=None, raw=False, polling=True, **operation_config): - """Create or update a VM scale set. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param vm_scale_set_name: The name of the VM scale set to create or - update. - :type vm_scale_set_name: str - :param parameters: The scale set object. - :type parameters: - ~azure.mgmt.compute.v2017_12_01.models.VirtualMachineScaleSet - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns VirtualMachineScaleSet - or ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2017_12_01.models.VirtualMachineScaleSet] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2017_12_01.models.VirtualMachineScaleSet]] - :raises: :class:`CloudError` - """ - raw_result = self._create_or_update_initial( - resource_group_name=resource_group_name, - vm_scale_set_name=vm_scale_set_name, - parameters=parameters, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('VirtualMachineScaleSet', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}'} - - - def _update_initial( - self, resource_group_name, vm_scale_set_name, parameters, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.update.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(parameters, 'VirtualMachineScaleSetUpdate') - - # Construct and send request - request = self._client.patch(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('VirtualMachineScaleSet', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def update( - self, resource_group_name, vm_scale_set_name, parameters, custom_headers=None, raw=False, polling=True, **operation_config): - """Update a VM scale set. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param vm_scale_set_name: The name of the VM scale set to create or - update. - :type vm_scale_set_name: str - :param parameters: The scale set object. - :type parameters: - ~azure.mgmt.compute.v2017_12_01.models.VirtualMachineScaleSetUpdate - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns VirtualMachineScaleSet - or ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2017_12_01.models.VirtualMachineScaleSet] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2017_12_01.models.VirtualMachineScaleSet]] - :raises: :class:`CloudError` - """ - raw_result = self._update_initial( - resource_group_name=resource_group_name, - vm_scale_set_name=vm_scale_set_name, - parameters=parameters, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('VirtualMachineScaleSet', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}'} - - - def _delete_initial( - self, resource_group_name, vm_scale_set_name, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.delete.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202, 204]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('OperationStatusResponse', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def delete( - self, resource_group_name, vm_scale_set_name, custom_headers=None, raw=False, polling=True, **operation_config): - """Deletes a VM scale set. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param vm_scale_set_name: The name of the VM scale set. - :type vm_scale_set_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns OperationStatusResponse - or ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2017_12_01.models.OperationStatusResponse] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2017_12_01.models.OperationStatusResponse]] - :raises: :class:`CloudError` - """ - raw_result = self._delete_initial( - resource_group_name=resource_group_name, - vm_scale_set_name=vm_scale_set_name, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('OperationStatusResponse', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}'} - - def get( - self, resource_group_name, vm_scale_set_name, custom_headers=None, raw=False, **operation_config): - """Display information about a virtual machine scale set. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param vm_scale_set_name: The name of the VM scale set. - :type vm_scale_set_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: VirtualMachineScaleSet or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.compute.v2017_12_01.models.VirtualMachineScaleSet - or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('VirtualMachineScaleSet', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}'} - - - def _deallocate_initial( - self, resource_group_name, vm_scale_set_name, instance_ids=None, custom_headers=None, raw=False, **operation_config): - vm_instance_ids = None - if instance_ids is not None: - vm_instance_ids = models.VirtualMachineScaleSetVMInstanceIDs(instance_ids=instance_ids) - - # Construct URL - url = self.deallocate.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - if vm_instance_ids is not None: - body_content = self._serialize.body(vm_instance_ids, 'VirtualMachineScaleSetVMInstanceIDs') - else: - body_content = None - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('OperationStatusResponse', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def deallocate( - self, resource_group_name, vm_scale_set_name, instance_ids=None, custom_headers=None, raw=False, polling=True, **operation_config): - """Deallocates specific virtual machines in a VM scale set. Shuts down the - virtual machines and releases the compute resources. You are not billed - for the compute resources that this virtual machine scale set - deallocates. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param vm_scale_set_name: The name of the VM scale set. - :type vm_scale_set_name: str - :param instance_ids: The virtual machine scale set instance ids. - Omitting the virtual machine scale set instance ids will result in the - operation being performed on all virtual machines in the virtual - machine scale set. - :type instance_ids: list[str] - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns OperationStatusResponse - or ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2017_12_01.models.OperationStatusResponse] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2017_12_01.models.OperationStatusResponse]] - :raises: :class:`CloudError` - """ - raw_result = self._deallocate_initial( - resource_group_name=resource_group_name, - vm_scale_set_name=vm_scale_set_name, - instance_ids=instance_ids, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('OperationStatusResponse', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - deallocate.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/deallocate'} - - - def _delete_instances_initial( - self, resource_group_name, vm_scale_set_name, instance_ids, custom_headers=None, raw=False, **operation_config): - vm_instance_ids = models.VirtualMachineScaleSetVMInstanceRequiredIDs(instance_ids=instance_ids) - - # Construct URL - url = self.delete_instances.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(vm_instance_ids, 'VirtualMachineScaleSetVMInstanceRequiredIDs') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('OperationStatusResponse', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def delete_instances( - self, resource_group_name, vm_scale_set_name, instance_ids, custom_headers=None, raw=False, polling=True, **operation_config): - """Deletes virtual machines in a VM scale set. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param vm_scale_set_name: The name of the VM scale set. - :type vm_scale_set_name: str - :param instance_ids: The virtual machine scale set instance ids. - :type instance_ids: list[str] - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns OperationStatusResponse - or ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2017_12_01.models.OperationStatusResponse] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2017_12_01.models.OperationStatusResponse]] - :raises: :class:`CloudError` - """ - raw_result = self._delete_instances_initial( - resource_group_name=resource_group_name, - vm_scale_set_name=vm_scale_set_name, - instance_ids=instance_ids, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('OperationStatusResponse', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - delete_instances.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/delete'} - - def get_instance_view( - self, resource_group_name, vm_scale_set_name, custom_headers=None, raw=False, **operation_config): - """Gets the status of a VM scale set instance. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param vm_scale_set_name: The name of the VM scale set. - :type vm_scale_set_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: VirtualMachineScaleSetInstanceView or ClientRawResponse if - raw=true - :rtype: - ~azure.mgmt.compute.v2017_12_01.models.VirtualMachineScaleSetInstanceView - or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get_instance_view.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('VirtualMachineScaleSetInstanceView', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_instance_view.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/instanceView'} - - def list( - self, resource_group_name, custom_headers=None, raw=False, **operation_config): - """Gets a list of all VM scale sets under a resource group. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of VirtualMachineScaleSet - :rtype: - ~azure.mgmt.compute.v2017_12_01.models.VirtualMachineScaleSetPaged[~azure.mgmt.compute.v2017_12_01.models.VirtualMachineScaleSet] - :raises: :class:`CloudError` - """ - def internal_paging(next_link=None, raw=False): - - if not next_link: - # Construct URL - url = self.list.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - deserialized = models.VirtualMachineScaleSetPaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.VirtualMachineScaleSetPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets'} - - def list_all( - self, custom_headers=None, raw=False, **operation_config): - """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. - - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of VirtualMachineScaleSet - :rtype: - ~azure.mgmt.compute.v2017_12_01.models.VirtualMachineScaleSetPaged[~azure.mgmt.compute.v2017_12_01.models.VirtualMachineScaleSet] - :raises: :class:`CloudError` - """ - def internal_paging(next_link=None, raw=False): - - if not next_link: - # Construct URL - url = self.list_all.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - deserialized = models.VirtualMachineScaleSetPaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.VirtualMachineScaleSetPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - list_all.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Compute/virtualMachineScaleSets'} - - def list_skus( - self, resource_group_name, vm_scale_set_name, custom_headers=None, raw=False, **operation_config): - """Gets a list of SKUs available for your VM scale set, including the - minimum and maximum VM instances allowed for each SKU. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param vm_scale_set_name: The name of the VM scale set. - :type vm_scale_set_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of VirtualMachineScaleSetSku - :rtype: - ~azure.mgmt.compute.v2017_12_01.models.VirtualMachineScaleSetSkuPaged[~azure.mgmt.compute.v2017_12_01.models.VirtualMachineScaleSetSku] - :raises: :class:`CloudError` - """ - def internal_paging(next_link=None, raw=False): - - if not next_link: - # Construct URL - url = self.list_skus.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - deserialized = models.VirtualMachineScaleSetSkuPaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.VirtualMachineScaleSetSkuPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - list_skus.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/skus'} - - def get_os_upgrade_history( - self, resource_group_name, vm_scale_set_name, custom_headers=None, raw=False, **operation_config): - """Gets list of OS upgrades on a VM scale set instance. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param vm_scale_set_name: The name of the VM scale set. - :type vm_scale_set_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of - UpgradeOperationHistoricalStatusInfo - :rtype: - ~azure.mgmt.compute.v2017_12_01.models.UpgradeOperationHistoricalStatusInfoPaged[~azure.mgmt.compute.v2017_12_01.models.UpgradeOperationHistoricalStatusInfo] - :raises: :class:`CloudError` - """ - def internal_paging(next_link=None, raw=False): - - if not next_link: - # Construct URL - url = self.get_os_upgrade_history.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - deserialized = models.UpgradeOperationHistoricalStatusInfoPaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.UpgradeOperationHistoricalStatusInfoPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - get_os_upgrade_history.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/osUpgradeHistory'} - - - def _power_off_initial( - self, resource_group_name, vm_scale_set_name, instance_ids=None, custom_headers=None, raw=False, **operation_config): - vm_instance_ids = None - if instance_ids is not None: - vm_instance_ids = models.VirtualMachineScaleSetVMInstanceIDs(instance_ids=instance_ids) - - # Construct URL - url = self.power_off.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - if vm_instance_ids is not None: - body_content = self._serialize.body(vm_instance_ids, 'VirtualMachineScaleSetVMInstanceIDs') - else: - body_content = None - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('OperationStatusResponse', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def power_off( - self, resource_group_name, vm_scale_set_name, instance_ids=None, custom_headers=None, raw=False, polling=True, **operation_config): - """Power off (stop) one or more virtual machines in a VM scale set. Note - that resources are still attached and you are getting charged for the - resources. Instead, use deallocate to release resources and avoid - charges. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param vm_scale_set_name: The name of the VM scale set. - :type vm_scale_set_name: str - :param instance_ids: The virtual machine scale set instance ids. - Omitting the virtual machine scale set instance ids will result in the - operation being performed on all virtual machines in the virtual - machine scale set. - :type instance_ids: list[str] - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns OperationStatusResponse - or ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2017_12_01.models.OperationStatusResponse] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2017_12_01.models.OperationStatusResponse]] - :raises: :class:`CloudError` - """ - raw_result = self._power_off_initial( - resource_group_name=resource_group_name, - vm_scale_set_name=vm_scale_set_name, - instance_ids=instance_ids, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('OperationStatusResponse', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - power_off.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/poweroff'} - - - def _restart_initial( - self, resource_group_name, vm_scale_set_name, instance_ids=None, custom_headers=None, raw=False, **operation_config): - vm_instance_ids = None - if instance_ids is not None: - vm_instance_ids = models.VirtualMachineScaleSetVMInstanceIDs(instance_ids=instance_ids) - - # Construct URL - url = self.restart.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - if vm_instance_ids is not None: - body_content = self._serialize.body(vm_instance_ids, 'VirtualMachineScaleSetVMInstanceIDs') - else: - body_content = None - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('OperationStatusResponse', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def restart( - self, resource_group_name, vm_scale_set_name, instance_ids=None, custom_headers=None, raw=False, polling=True, **operation_config): - """Restarts one or more virtual machines in a VM scale set. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param vm_scale_set_name: The name of the VM scale set. - :type vm_scale_set_name: str - :param instance_ids: The virtual machine scale set instance ids. - Omitting the virtual machine scale set instance ids will result in the - operation being performed on all virtual machines in the virtual - machine scale set. - :type instance_ids: list[str] - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns OperationStatusResponse - or ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2017_12_01.models.OperationStatusResponse] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2017_12_01.models.OperationStatusResponse]] - :raises: :class:`CloudError` - """ - raw_result = self._restart_initial( - resource_group_name=resource_group_name, - vm_scale_set_name=vm_scale_set_name, - instance_ids=instance_ids, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('OperationStatusResponse', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - restart.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/restart'} - - - def _start_initial( - self, resource_group_name, vm_scale_set_name, instance_ids=None, custom_headers=None, raw=False, **operation_config): - vm_instance_ids = None - if instance_ids is not None: - vm_instance_ids = models.VirtualMachineScaleSetVMInstanceIDs(instance_ids=instance_ids) - - # Construct URL - url = self.start.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - if vm_instance_ids is not None: - body_content = self._serialize.body(vm_instance_ids, 'VirtualMachineScaleSetVMInstanceIDs') - else: - body_content = None - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('OperationStatusResponse', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def start( - self, resource_group_name, vm_scale_set_name, instance_ids=None, custom_headers=None, raw=False, polling=True, **operation_config): - """Starts one or more virtual machines in a VM scale set. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param vm_scale_set_name: The name of the VM scale set. - :type vm_scale_set_name: str - :param instance_ids: The virtual machine scale set instance ids. - Omitting the virtual machine scale set instance ids will result in the - operation being performed on all virtual machines in the virtual - machine scale set. - :type instance_ids: list[str] - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns OperationStatusResponse - or ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2017_12_01.models.OperationStatusResponse] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2017_12_01.models.OperationStatusResponse]] - :raises: :class:`CloudError` - """ - raw_result = self._start_initial( - resource_group_name=resource_group_name, - vm_scale_set_name=vm_scale_set_name, - instance_ids=instance_ids, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('OperationStatusResponse', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - start.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/start'} - - - def _redeploy_initial( - self, resource_group_name, vm_scale_set_name, instance_ids=None, custom_headers=None, raw=False, **operation_config): - vm_instance_ids = None - if instance_ids is not None: - vm_instance_ids = models.VirtualMachineScaleSetVMInstanceIDs(instance_ids=instance_ids) - - # Construct URL - url = self.redeploy.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - if vm_instance_ids is not None: - body_content = self._serialize.body(vm_instance_ids, 'VirtualMachineScaleSetVMInstanceIDs') - else: - body_content = None - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('OperationStatusResponse', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def redeploy( - self, resource_group_name, vm_scale_set_name, instance_ids=None, custom_headers=None, raw=False, polling=True, **operation_config): - """Redeploy one or more virtual machines in a VM scale set. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param vm_scale_set_name: The name of the VM scale set. - :type vm_scale_set_name: str - :param instance_ids: The virtual machine scale set instance ids. - Omitting the virtual machine scale set instance ids will result in the - operation being performed on all virtual machines in the virtual - machine scale set. - :type instance_ids: list[str] - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns OperationStatusResponse - or ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2017_12_01.models.OperationStatusResponse] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2017_12_01.models.OperationStatusResponse]] - :raises: :class:`CloudError` - """ - raw_result = self._redeploy_initial( - resource_group_name=resource_group_name, - vm_scale_set_name=vm_scale_set_name, - instance_ids=instance_ids, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('OperationStatusResponse', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - redeploy.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/redeploy'} - - - def _perform_maintenance_initial( - self, resource_group_name, vm_scale_set_name, instance_ids=None, custom_headers=None, raw=False, **operation_config): - vm_instance_ids = None - if instance_ids is not None: - vm_instance_ids = models.VirtualMachineScaleSetVMInstanceIDs(instance_ids=instance_ids) - - # Construct URL - url = self.perform_maintenance.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - if vm_instance_ids is not None: - body_content = self._serialize.body(vm_instance_ids, 'VirtualMachineScaleSetVMInstanceIDs') - else: - body_content = None - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('OperationStatusResponse', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def perform_maintenance( - self, resource_group_name, vm_scale_set_name, instance_ids=None, custom_headers=None, raw=False, polling=True, **operation_config): - """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. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param vm_scale_set_name: The name of the VM scale set. - :type vm_scale_set_name: str - :param instance_ids: The virtual machine scale set instance ids. - Omitting the virtual machine scale set instance ids will result in the - operation being performed on all virtual machines in the virtual - machine scale set. - :type instance_ids: list[str] - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns OperationStatusResponse - or ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2017_12_01.models.OperationStatusResponse] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2017_12_01.models.OperationStatusResponse]] - :raises: :class:`CloudError` - """ - raw_result = self._perform_maintenance_initial( - resource_group_name=resource_group_name, - vm_scale_set_name=vm_scale_set_name, - instance_ids=instance_ids, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('OperationStatusResponse', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - perform_maintenance.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/performMaintenance'} - - - def _update_instances_initial( - self, resource_group_name, vm_scale_set_name, instance_ids, custom_headers=None, raw=False, **operation_config): - vm_instance_ids = models.VirtualMachineScaleSetVMInstanceRequiredIDs(instance_ids=instance_ids) - - # Construct URL - url = self.update_instances.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(vm_instance_ids, 'VirtualMachineScaleSetVMInstanceRequiredIDs') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('OperationStatusResponse', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def update_instances( - self, resource_group_name, vm_scale_set_name, instance_ids, custom_headers=None, raw=False, polling=True, **operation_config): - """Upgrades one or more virtual machines to the latest SKU set in the VM - scale set model. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param vm_scale_set_name: The name of the VM scale set. - :type vm_scale_set_name: str - :param instance_ids: The virtual machine scale set instance ids. - :type instance_ids: list[str] - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns OperationStatusResponse - or ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2017_12_01.models.OperationStatusResponse] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2017_12_01.models.OperationStatusResponse]] - :raises: :class:`CloudError` - """ - raw_result = self._update_instances_initial( - resource_group_name=resource_group_name, - vm_scale_set_name=vm_scale_set_name, - instance_ids=instance_ids, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('OperationStatusResponse', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - update_instances.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/manualupgrade'} - - - def _reimage_initial( - self, resource_group_name, vm_scale_set_name, instance_ids=None, custom_headers=None, raw=False, **operation_config): - vm_instance_ids = None - if instance_ids is not None: - vm_instance_ids = models.VirtualMachineScaleSetVMInstanceIDs(instance_ids=instance_ids) - - # Construct URL - url = self.reimage.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - if vm_instance_ids is not None: - body_content = self._serialize.body(vm_instance_ids, 'VirtualMachineScaleSetVMInstanceIDs') - else: - body_content = None - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('OperationStatusResponse', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def reimage( - self, resource_group_name, vm_scale_set_name, instance_ids=None, custom_headers=None, raw=False, polling=True, **operation_config): - """Reimages (upgrade the operating system) one or more virtual machines in - a VM scale set. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param vm_scale_set_name: The name of the VM scale set. - :type vm_scale_set_name: str - :param instance_ids: The virtual machine scale set instance ids. - Omitting the virtual machine scale set instance ids will result in the - operation being performed on all virtual machines in the virtual - machine scale set. - :type instance_ids: list[str] - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns OperationStatusResponse - or ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2017_12_01.models.OperationStatusResponse] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2017_12_01.models.OperationStatusResponse]] - :raises: :class:`CloudError` - """ - raw_result = self._reimage_initial( - resource_group_name=resource_group_name, - vm_scale_set_name=vm_scale_set_name, - instance_ids=instance_ids, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('OperationStatusResponse', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - reimage.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/reimage'} - - - def _reimage_all_initial( - self, resource_group_name, vm_scale_set_name, instance_ids=None, custom_headers=None, raw=False, **operation_config): - vm_instance_ids = None - if instance_ids is not None: - vm_instance_ids = models.VirtualMachineScaleSetVMInstanceIDs(instance_ids=instance_ids) - - # Construct URL - url = self.reimage_all.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - if vm_instance_ids is not None: - body_content = self._serialize.body(vm_instance_ids, 'VirtualMachineScaleSetVMInstanceIDs') - else: - body_content = None - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('OperationStatusResponse', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def reimage_all( - self, resource_group_name, vm_scale_set_name, instance_ids=None, custom_headers=None, raw=False, polling=True, **operation_config): - """Reimages all the disks ( including data disks ) in the virtual machines - in a VM scale set. This operation is only supported for managed disks. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param vm_scale_set_name: The name of the VM scale set. - :type vm_scale_set_name: str - :param instance_ids: The virtual machine scale set instance ids. - Omitting the virtual machine scale set instance ids will result in the - operation being performed on all virtual machines in the virtual - machine scale set. - :type instance_ids: list[str] - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns OperationStatusResponse - or ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2017_12_01.models.OperationStatusResponse] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2017_12_01.models.OperationStatusResponse]] - :raises: :class:`CloudError` - """ - raw_result = self._reimage_all_initial( - resource_group_name=resource_group_name, - vm_scale_set_name=vm_scale_set_name, - instance_ids=instance_ids, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('OperationStatusResponse', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - reimage_all.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/reimageall'} - - def force_recovery_service_fabric_platform_update_domain_walk( - self, resource_group_name, vm_scale_set_name, platform_update_domain, custom_headers=None, raw=False, **operation_config): - """Manual platform update domain walk to update virtual machines in a - service fabric virtual machine scale set. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param vm_scale_set_name: The name of the VM scale set. - :type vm_scale_set_name: str - :param platform_update_domain: The platform update domain for which a - manual recovery walk is requested - :type platform_update_domain: int - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: RecoveryWalkResponse or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.compute.v2017_12_01.models.RecoveryWalkResponse or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.force_recovery_service_fabric_platform_update_domain_walk.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - query_parameters['platformUpdateDomain'] = self._serialize.query("platform_update_domain", platform_update_domain, 'int') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('RecoveryWalkResponse', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - force_recovery_service_fabric_platform_update_domain_walk.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/forceRecoveryServiceFabricPlatformUpdateDomainWalk'} diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/operations/virtual_machine_sizes_operations.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/operations/virtual_machine_sizes_operations.py deleted file mode 100644 index a00a3e7f346b..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/operations/virtual_machine_sizes_operations.py +++ /dev/null @@ -1,107 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError - -from .. import models - - -class VirtualMachineSizesOperations(object): - """VirtualMachineSizesOperations operations. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: Client Api Version. Constant value: "2017-12-01". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2017-12-01" - - self.config = config - - def list( - self, location, custom_headers=None, raw=False, **operation_config): - """Lists all available virtual machine sizes for a subscription in a - location. - - :param location: The location upon which virtual-machine-sizes is - queried. - :type location: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of VirtualMachineSize - :rtype: - ~azure.mgmt.compute.v2017_12_01.models.VirtualMachineSizePaged[~azure.mgmt.compute.v2017_12_01.models.VirtualMachineSize] - :raises: :class:`CloudError` - """ - def internal_paging(next_link=None, raw=False): - - if not next_link: - # Construct URL - url = self.list.metadata['url'] - path_format_arguments = { - 'location': self._serialize.url("location", location, 'str', pattern=r'^[-\w\._]+$'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - deserialized = models.VirtualMachineSizePaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.VirtualMachineSizePaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/vmSizes'} diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/operations/virtual_machines_operations.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/operations/virtual_machines_operations.py deleted file mode 100644 index ae6d1fdd2e94..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/operations/virtual_machines_operations.py +++ /dev/null @@ -1,1741 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError -from msrest.polling import LROPoller, NoPolling -from msrestazure.polling.arm_polling import ARMPolling - -from .. import models - - -class VirtualMachinesOperations(object): - """VirtualMachinesOperations operations. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: Client Api Version. Constant value: "2017-12-01". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2017-12-01" - - self.config = config - - def get_extensions( - self, resource_group_name, vm_name, expand=None, custom_headers=None, raw=False, **operation_config): - """The operation to get all extensions of a Virtual Machine. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param vm_name: The name of the virtual machine containing the - extension. - :type vm_name: str - :param expand: The expand expression to apply on the operation. - :type expand: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: VirtualMachineExtensionsListResult or ClientRawResponse if - raw=true - :rtype: - ~azure.mgmt.compute.v2017_12_01.models.VirtualMachineExtensionsListResult - or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get_extensions.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'vmName': self._serialize.url("vm_name", vm_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - if expand is not None: - query_parameters['$expand'] = self._serialize.query("expand", expand, 'str') - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('VirtualMachineExtensionsListResult', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_extensions.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/extensions'} - - def list_by_location( - self, location, custom_headers=None, raw=False, **operation_config): - """Gets all the virtual machines under the specified subscription for the - specified location. - - :param location: The location for which virtual machines under the - subscription are queried. - :type location: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of VirtualMachine - :rtype: - ~azure.mgmt.compute.v2017_12_01.models.VirtualMachinePaged[~azure.mgmt.compute.v2017_12_01.models.VirtualMachine] - :raises: :class:`CloudError` - """ - def internal_paging(next_link=None, raw=False): - - if not next_link: - # Construct URL - url = self.list_by_location.metadata['url'] - path_format_arguments = { - 'location': self._serialize.url("location", location, 'str', pattern=r'^[-\w\._]+$'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - deserialized = models.VirtualMachinePaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.VirtualMachinePaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - list_by_location.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/virtualMachines'} - - - def _capture_initial( - self, resource_group_name, vm_name, parameters, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.capture.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'vmName': self._serialize.url("vm_name", vm_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(parameters, 'VirtualMachineCaptureParameters') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('VirtualMachineCaptureResult', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def capture( - self, resource_group_name, vm_name, parameters, custom_headers=None, raw=False, polling=True, **operation_config): - """Captures the VM by copying virtual hard disks of the VM and outputs a - template that can be used to create similar VMs. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param vm_name: The name of the virtual machine. - :type vm_name: str - :param parameters: Parameters supplied to the Capture Virtual Machine - operation. - :type parameters: - ~azure.mgmt.compute.v2017_12_01.models.VirtualMachineCaptureParameters - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns - VirtualMachineCaptureResult or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2017_12_01.models.VirtualMachineCaptureResult] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2017_12_01.models.VirtualMachineCaptureResult]] - :raises: :class:`CloudError` - """ - raw_result = self._capture_initial( - resource_group_name=resource_group_name, - vm_name=vm_name, - parameters=parameters, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('VirtualMachineCaptureResult', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - capture.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/capture'} - - - def _create_or_update_initial( - self, resource_group_name, vm_name, parameters, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.create_or_update.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'vmName': self._serialize.url("vm_name", vm_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(parameters, 'VirtualMachine') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 201]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('VirtualMachine', response) - if response.status_code == 201: - deserialized = self._deserialize('VirtualMachine', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def create_or_update( - self, resource_group_name, vm_name, parameters, custom_headers=None, raw=False, polling=True, **operation_config): - """The operation to create or update a virtual machine. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param vm_name: The name of the virtual machine. - :type vm_name: str - :param parameters: Parameters supplied to the Create Virtual Machine - operation. - :type parameters: - ~azure.mgmt.compute.v2017_12_01.models.VirtualMachine - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns VirtualMachine or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2017_12_01.models.VirtualMachine] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2017_12_01.models.VirtualMachine]] - :raises: :class:`CloudError` - """ - raw_result = self._create_or_update_initial( - resource_group_name=resource_group_name, - vm_name=vm_name, - parameters=parameters, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('VirtualMachine', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}'} - - - def _update_initial( - self, resource_group_name, vm_name, parameters, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.update.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'vmName': self._serialize.url("vm_name", vm_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(parameters, 'VirtualMachineUpdate') - - # Construct and send request - request = self._client.patch(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 201]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('VirtualMachine', response) - if response.status_code == 201: - deserialized = self._deserialize('VirtualMachine', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def update( - self, resource_group_name, vm_name, parameters, custom_headers=None, raw=False, polling=True, **operation_config): - """The operation to update a virtual machine. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param vm_name: The name of the virtual machine. - :type vm_name: str - :param parameters: Parameters supplied to the Update Virtual Machine - operation. - :type parameters: - ~azure.mgmt.compute.v2017_12_01.models.VirtualMachineUpdate - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns VirtualMachine or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2017_12_01.models.VirtualMachine] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2017_12_01.models.VirtualMachine]] - :raises: :class:`CloudError` - """ - raw_result = self._update_initial( - resource_group_name=resource_group_name, - vm_name=vm_name, - parameters=parameters, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('VirtualMachine', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}'} - - - def _delete_initial( - self, resource_group_name, vm_name, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.delete.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'vmName': self._serialize.url("vm_name", vm_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202, 204]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('OperationStatusResponse', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def delete( - self, resource_group_name, vm_name, custom_headers=None, raw=False, polling=True, **operation_config): - """The operation to delete a virtual machine. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param vm_name: The name of the virtual machine. - :type vm_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns OperationStatusResponse - or ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2017_12_01.models.OperationStatusResponse] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2017_12_01.models.OperationStatusResponse]] - :raises: :class:`CloudError` - """ - raw_result = self._delete_initial( - resource_group_name=resource_group_name, - vm_name=vm_name, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('OperationStatusResponse', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}'} - - def get( - self, resource_group_name, vm_name, expand=None, custom_headers=None, raw=False, **operation_config): - """Retrieves information about the model view or the instance view of a - virtual machine. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param vm_name: The name of the virtual machine. - :type vm_name: str - :param expand: The expand expression to apply on the operation. - Possible values include: 'instanceView' - :type expand: str or - ~azure.mgmt.compute.v2017_12_01.models.InstanceViewTypes - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: VirtualMachine or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.compute.v2017_12_01.models.VirtualMachine or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'vmName': self._serialize.url("vm_name", vm_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - if expand is not None: - query_parameters['$expand'] = self._serialize.query("expand", expand, 'InstanceViewTypes') - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('VirtualMachine', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}'} - - def instance_view( - self, resource_group_name, vm_name, custom_headers=None, raw=False, **operation_config): - """Retrieves information about the run-time state of a virtual machine. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param vm_name: The name of the virtual machine. - :type vm_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: VirtualMachineInstanceView or ClientRawResponse if raw=true - :rtype: - ~azure.mgmt.compute.v2017_12_01.models.VirtualMachineInstanceView or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.instance_view.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'vmName': self._serialize.url("vm_name", vm_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('VirtualMachineInstanceView', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - instance_view.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/instanceView'} - - - def _convert_to_managed_disks_initial( - self, resource_group_name, vm_name, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.convert_to_managed_disks.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'vmName': self._serialize.url("vm_name", vm_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('OperationStatusResponse', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def convert_to_managed_disks( - self, resource_group_name, vm_name, custom_headers=None, raw=False, polling=True, **operation_config): - """Converts virtual machine disks from blob-based to managed disks. - Virtual machine must be stop-deallocated before invoking this - operation. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param vm_name: The name of the virtual machine. - :type vm_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns OperationStatusResponse - or ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2017_12_01.models.OperationStatusResponse] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2017_12_01.models.OperationStatusResponse]] - :raises: :class:`CloudError` - """ - raw_result = self._convert_to_managed_disks_initial( - resource_group_name=resource_group_name, - vm_name=vm_name, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('OperationStatusResponse', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - convert_to_managed_disks.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/convertToManagedDisks'} - - - def _deallocate_initial( - self, resource_group_name, vm_name, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.deallocate.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'vmName': self._serialize.url("vm_name", vm_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('OperationStatusResponse', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def deallocate( - self, resource_group_name, vm_name, custom_headers=None, raw=False, polling=True, **operation_config): - """Shuts down the virtual machine and releases the compute resources. You - are not billed for the compute resources that this virtual machine - uses. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param vm_name: The name of the virtual machine. - :type vm_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns OperationStatusResponse - or ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2017_12_01.models.OperationStatusResponse] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2017_12_01.models.OperationStatusResponse]] - :raises: :class:`CloudError` - """ - raw_result = self._deallocate_initial( - resource_group_name=resource_group_name, - vm_name=vm_name, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('OperationStatusResponse', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - deallocate.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/deallocate'} - - def generalize( - self, resource_group_name, vm_name, custom_headers=None, raw=False, **operation_config): - """Sets the state of the virtual machine to generalized. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param vm_name: The name of the virtual machine. - :type vm_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: OperationStatusResponse or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.compute.v2017_12_01.models.OperationStatusResponse - or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.generalize.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'vmName': self._serialize.url("vm_name", vm_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('OperationStatusResponse', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - generalize.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/generalize'} - - def list( - self, resource_group_name, custom_headers=None, raw=False, **operation_config): - """Lists all of the virtual machines in the specified resource group. Use - the nextLink property in the response to get the next page of virtual - machines. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of VirtualMachine - :rtype: - ~azure.mgmt.compute.v2017_12_01.models.VirtualMachinePaged[~azure.mgmt.compute.v2017_12_01.models.VirtualMachine] - :raises: :class:`CloudError` - """ - def internal_paging(next_link=None, raw=False): - - if not next_link: - # Construct URL - url = self.list.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - deserialized = models.VirtualMachinePaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.VirtualMachinePaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines'} - - def list_all( - self, custom_headers=None, raw=False, **operation_config): - """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. - - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of VirtualMachine - :rtype: - ~azure.mgmt.compute.v2017_12_01.models.VirtualMachinePaged[~azure.mgmt.compute.v2017_12_01.models.VirtualMachine] - :raises: :class:`CloudError` - """ - def internal_paging(next_link=None, raw=False): - - if not next_link: - # Construct URL - url = self.list_all.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - deserialized = models.VirtualMachinePaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.VirtualMachinePaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - list_all.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Compute/virtualMachines'} - - def list_available_sizes( - self, resource_group_name, vm_name, custom_headers=None, raw=False, **operation_config): - """Lists all available virtual machine sizes to which the specified - virtual machine can be resized. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param vm_name: The name of the virtual machine. - :type vm_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of VirtualMachineSize - :rtype: - ~azure.mgmt.compute.v2017_12_01.models.VirtualMachineSizePaged[~azure.mgmt.compute.v2017_12_01.models.VirtualMachineSize] - :raises: :class:`CloudError` - """ - def internal_paging(next_link=None, raw=False): - - if not next_link: - # Construct URL - url = self.list_available_sizes.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'vmName': self._serialize.url("vm_name", vm_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - deserialized = models.VirtualMachineSizePaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.VirtualMachineSizePaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - list_available_sizes.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/vmSizes'} - - - def _power_off_initial( - self, resource_group_name, vm_name, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.power_off.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'vmName': self._serialize.url("vm_name", vm_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('OperationStatusResponse', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def power_off( - self, resource_group_name, vm_name, custom_headers=None, raw=False, polling=True, **operation_config): - """The operation to power off (stop) a virtual machine. The virtual - machine can be restarted with the same provisioned resources. You are - still charged for this virtual machine. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param vm_name: The name of the virtual machine. - :type vm_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns OperationStatusResponse - or ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2017_12_01.models.OperationStatusResponse] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2017_12_01.models.OperationStatusResponse]] - :raises: :class:`CloudError` - """ - raw_result = self._power_off_initial( - resource_group_name=resource_group_name, - vm_name=vm_name, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('OperationStatusResponse', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - power_off.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/powerOff'} - - - def _restart_initial( - self, resource_group_name, vm_name, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.restart.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'vmName': self._serialize.url("vm_name", vm_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('OperationStatusResponse', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def restart( - self, resource_group_name, vm_name, custom_headers=None, raw=False, polling=True, **operation_config): - """The operation to restart a virtual machine. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param vm_name: The name of the virtual machine. - :type vm_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns OperationStatusResponse - or ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2017_12_01.models.OperationStatusResponse] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2017_12_01.models.OperationStatusResponse]] - :raises: :class:`CloudError` - """ - raw_result = self._restart_initial( - resource_group_name=resource_group_name, - vm_name=vm_name, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('OperationStatusResponse', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - restart.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/restart'} - - - def _start_initial( - self, resource_group_name, vm_name, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.start.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'vmName': self._serialize.url("vm_name", vm_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('OperationStatusResponse', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def start( - self, resource_group_name, vm_name, custom_headers=None, raw=False, polling=True, **operation_config): - """The operation to start a virtual machine. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param vm_name: The name of the virtual machine. - :type vm_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns OperationStatusResponse - or ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2017_12_01.models.OperationStatusResponse] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2017_12_01.models.OperationStatusResponse]] - :raises: :class:`CloudError` - """ - raw_result = self._start_initial( - resource_group_name=resource_group_name, - vm_name=vm_name, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('OperationStatusResponse', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - start.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/start'} - - - def _redeploy_initial( - self, resource_group_name, vm_name, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.redeploy.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'vmName': self._serialize.url("vm_name", vm_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('OperationStatusResponse', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def redeploy( - self, resource_group_name, vm_name, custom_headers=None, raw=False, polling=True, **operation_config): - """The operation to redeploy a virtual machine. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param vm_name: The name of the virtual machine. - :type vm_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns OperationStatusResponse - or ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2017_12_01.models.OperationStatusResponse] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2017_12_01.models.OperationStatusResponse]] - :raises: :class:`CloudError` - """ - raw_result = self._redeploy_initial( - resource_group_name=resource_group_name, - vm_name=vm_name, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('OperationStatusResponse', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - redeploy.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/redeploy'} - - - def _perform_maintenance_initial( - self, resource_group_name, vm_name, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.perform_maintenance.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'vmName': self._serialize.url("vm_name", vm_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('OperationStatusResponse', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def perform_maintenance( - self, resource_group_name, vm_name, custom_headers=None, raw=False, polling=True, **operation_config): - """The operation to perform maintenance on a virtual machine. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param vm_name: The name of the virtual machine. - :type vm_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns OperationStatusResponse - or ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2017_12_01.models.OperationStatusResponse] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2017_12_01.models.OperationStatusResponse]] - :raises: :class:`CloudError` - """ - raw_result = self._perform_maintenance_initial( - resource_group_name=resource_group_name, - vm_name=vm_name, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('OperationStatusResponse', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - perform_maintenance.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/performMaintenance'} - - - def _run_command_initial( - self, resource_group_name, vm_name, parameters, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.run_command.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'vmName': self._serialize.url("vm_name", vm_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(parameters, 'RunCommandInput') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('RunCommandResult', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def run_command( - self, resource_group_name, vm_name, parameters, custom_headers=None, raw=False, polling=True, **operation_config): - """Run command on the VM. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param vm_name: The name of the virtual machine. - :type vm_name: str - :param parameters: Parameters supplied to the Run command operation. - :type parameters: - ~azure.mgmt.compute.v2017_12_01.models.RunCommandInput - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns RunCommandResult or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2017_12_01.models.RunCommandResult] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2017_12_01.models.RunCommandResult]] - :raises: :class:`CloudError` - """ - raw_result = self._run_command_initial( - resource_group_name=resource_group_name, - vm_name=vm_name, - parameters=parameters, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('RunCommandResult', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - run_command.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/runCommand'} diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/__init__.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/__init__.py index 88ded2f640de..a7bc1ce68e37 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/__init__.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/__init__.py @@ -9,10 +9,11 @@ # regenerated. # -------------------------------------------------------------------------- -from .compute_management_client import ComputeManagementClient -from .version import VERSION +from ._configuration import ComputeManagementClientConfiguration +from ._compute_management_client import ComputeManagementClient +__all__ = ['ComputeManagementClient', 'ComputeManagementClientConfiguration'] -__all__ = ['ComputeManagementClient'] +from .version import VERSION __version__ = VERSION diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/_compute_management_client.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/_compute_management_client.py new file mode 100644 index 000000000000..5515b3642921 --- /dev/null +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/_compute_management_client.py @@ -0,0 +1,136 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.service_client import SDKClient +from msrest import Serializer, Deserializer + +from ._configuration import ComputeManagementClientConfiguration +from .operations import Operations +from .operations import AvailabilitySetsOperations +from .operations import ProximityPlacementGroupsOperations +from .operations import VirtualMachineExtensionImagesOperations +from .operations import VirtualMachineExtensionsOperations +from .operations import VirtualMachineImagesOperations +from .operations import UsageOperations +from .operations import VirtualMachinesOperations +from .operations import VirtualMachineSizesOperations +from .operations import ImagesOperations +from .operations import VirtualMachineScaleSetsOperations +from .operations import VirtualMachineScaleSetExtensionsOperations +from .operations import VirtualMachineScaleSetRollingUpgradesOperations +from .operations import VirtualMachineScaleSetVMsOperations +from .operations import LogAnalyticsOperations +from .operations import VirtualMachineRunCommandsOperations +from .operations import DisksOperations +from .operations import SnapshotsOperations +from . import models + + +class ComputeManagementClient(SDKClient): + """Compute Client + + :ivar config: Configuration for client. + :vartype config: ComputeManagementClientConfiguration + + :ivar operations: Operations operations + :vartype operations: azure.mgmt.compute.v2018_04_01.operations.Operations + :ivar availability_sets: AvailabilitySets operations + :vartype availability_sets: azure.mgmt.compute.v2018_04_01.operations.AvailabilitySetsOperations + :ivar proximity_placement_groups: ProximityPlacementGroups operations + :vartype proximity_placement_groups: azure.mgmt.compute.v2018_04_01.operations.ProximityPlacementGroupsOperations + :ivar virtual_machine_extension_images: VirtualMachineExtensionImages operations + :vartype virtual_machine_extension_images: azure.mgmt.compute.v2018_04_01.operations.VirtualMachineExtensionImagesOperations + :ivar virtual_machine_extensions: VirtualMachineExtensions operations + :vartype virtual_machine_extensions: azure.mgmt.compute.v2018_04_01.operations.VirtualMachineExtensionsOperations + :ivar virtual_machine_images: VirtualMachineImages operations + :vartype virtual_machine_images: azure.mgmt.compute.v2018_04_01.operations.VirtualMachineImagesOperations + :ivar usage: Usage operations + :vartype usage: azure.mgmt.compute.v2018_04_01.operations.UsageOperations + :ivar virtual_machines: VirtualMachines operations + :vartype virtual_machines: azure.mgmt.compute.v2018_04_01.operations.VirtualMachinesOperations + :ivar virtual_machine_sizes: VirtualMachineSizes operations + :vartype virtual_machine_sizes: azure.mgmt.compute.v2018_04_01.operations.VirtualMachineSizesOperations + :ivar images: Images operations + :vartype images: azure.mgmt.compute.v2018_04_01.operations.ImagesOperations + :ivar virtual_machine_scale_sets: VirtualMachineScaleSets operations + :vartype virtual_machine_scale_sets: azure.mgmt.compute.v2018_04_01.operations.VirtualMachineScaleSetsOperations + :ivar virtual_machine_scale_set_extensions: VirtualMachineScaleSetExtensions operations + :vartype virtual_machine_scale_set_extensions: azure.mgmt.compute.v2018_04_01.operations.VirtualMachineScaleSetExtensionsOperations + :ivar virtual_machine_scale_set_rolling_upgrades: VirtualMachineScaleSetRollingUpgrades operations + :vartype virtual_machine_scale_set_rolling_upgrades: azure.mgmt.compute.v2018_04_01.operations.VirtualMachineScaleSetRollingUpgradesOperations + :ivar virtual_machine_scale_set_vms: VirtualMachineScaleSetVMs operations + :vartype virtual_machine_scale_set_vms: azure.mgmt.compute.v2018_04_01.operations.VirtualMachineScaleSetVMsOperations + :ivar log_analytics: LogAnalytics operations + :vartype log_analytics: azure.mgmt.compute.v2018_04_01.operations.LogAnalyticsOperations + :ivar virtual_machine_run_commands: VirtualMachineRunCommands operations + :vartype virtual_machine_run_commands: azure.mgmt.compute.v2018_04_01.operations.VirtualMachineRunCommandsOperations + :ivar disks: Disks operations + :vartype disks: azure.mgmt.compute.v2018_04_01.operations.DisksOperations + :ivar snapshots: Snapshots operations + :vartype snapshots: azure.mgmt.compute.v2018_04_01.operations.SnapshotsOperations + + :param credentials: Credentials needed for the client to connect to Azure. + :type credentials: :mod:`A msrestazure Credentials + object` + :param subscription_id: Subscription credentials which uniquely identify + Microsoft Azure subscription. The subscription ID forms part of the URI + for every service call. + :type subscription_id: str + :param str base_url: Service URL + """ + + def __init__( + self, credentials, subscription_id, base_url=None): + + self.config = ComputeManagementClientConfiguration(credentials, subscription_id, base_url) + super(ComputeManagementClient, self).__init__(self.config.credentials, self.config) + + client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} + self.api_version = '2018-04-01' + self._serialize = Serializer(client_models) + self._deserialize = Deserializer(client_models) + + self.operations = Operations( + self._client, self.config, self._serialize, self._deserialize) + self.availability_sets = AvailabilitySetsOperations( + self._client, self.config, self._serialize, self._deserialize) + self.proximity_placement_groups = ProximityPlacementGroupsOperations( + self._client, self.config, self._serialize, self._deserialize) + self.virtual_machine_extension_images = VirtualMachineExtensionImagesOperations( + self._client, self.config, self._serialize, self._deserialize) + self.virtual_machine_extensions = VirtualMachineExtensionsOperations( + self._client, self.config, self._serialize, self._deserialize) + self.virtual_machine_images = VirtualMachineImagesOperations( + self._client, self.config, self._serialize, self._deserialize) + self.usage = UsageOperations( + self._client, self.config, self._serialize, self._deserialize) + self.virtual_machines = VirtualMachinesOperations( + self._client, self.config, self._serialize, self._deserialize) + self.virtual_machine_sizes = VirtualMachineSizesOperations( + self._client, self.config, self._serialize, self._deserialize) + self.images = ImagesOperations( + self._client, self.config, self._serialize, self._deserialize) + self.virtual_machine_scale_sets = VirtualMachineScaleSetsOperations( + self._client, self.config, self._serialize, self._deserialize) + self.virtual_machine_scale_set_extensions = VirtualMachineScaleSetExtensionsOperations( + self._client, self.config, self._serialize, self._deserialize) + self.virtual_machine_scale_set_rolling_upgrades = VirtualMachineScaleSetRollingUpgradesOperations( + self._client, self.config, self._serialize, self._deserialize) + self.virtual_machine_scale_set_vms = VirtualMachineScaleSetVMsOperations( + self._client, self.config, self._serialize, self._deserialize) + self.log_analytics = LogAnalyticsOperations( + self._client, self.config, self._serialize, self._deserialize) + self.virtual_machine_run_commands = VirtualMachineRunCommandsOperations( + self._client, self.config, self._serialize, self._deserialize) + self.disks = DisksOperations( + self._client, self.config, self._serialize, self._deserialize) + self.snapshots = SnapshotsOperations( + self._client, self.config, self._serialize, self._deserialize) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/_configuration.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/_configuration.py new file mode 100644 index 000000000000..0fcf5984e2ca --- /dev/null +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/_configuration.py @@ -0,0 +1,50 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- +from msrestazure import AzureConfiguration + +from .version import VERSION + + +class ComputeManagementClientConfiguration(AzureConfiguration): + """Configuration for ComputeManagementClient + Note that all parameters used to create this instance are saved as instance + attributes. + + :param credentials: Credentials needed for the client to connect to Azure. + :type credentials: :mod:`A msrestazure Credentials + object` + :param subscription_id: Subscription credentials which uniquely identify + Microsoft Azure subscription. The subscription ID forms part of the URI + for every service call. + :type subscription_id: str + :param str base_url: Service URL + """ + + def __init__( + self, credentials, subscription_id, base_url=None): + + if credentials is None: + raise ValueError("Parameter 'credentials' must not be None.") + if subscription_id is None: + raise ValueError("Parameter 'subscription_id' must not be None.") + if not base_url: + base_url = 'https://management.azure.com' + + super(ComputeManagementClientConfiguration, self).__init__(base_url) + + # Starting Autorest.Python 4.0.64, make connection pool activated by default + self.keep_alive = True + + self.add_user_agent('azure-mgmt-compute/{}'.format(VERSION)) + self.add_user_agent('Azure-SDK-For-Python') + + self.credentials = credentials + self.subscription_id = subscription_id diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/compute_management_client.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/compute_management_client.py deleted file mode 100644 index 43b24d14e502..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/compute_management_client.py +++ /dev/null @@ -1,170 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.service_client import SDKClient -from msrest import Serializer, Deserializer -from msrestazure import AzureConfiguration -from .version import VERSION -from .operations.operations import Operations -from .operations.availability_sets_operations import AvailabilitySetsOperations -from .operations.proximity_placement_groups_operations import ProximityPlacementGroupsOperations -from .operations.virtual_machine_extension_images_operations import VirtualMachineExtensionImagesOperations -from .operations.virtual_machine_extensions_operations import VirtualMachineExtensionsOperations -from .operations.virtual_machine_images_operations import VirtualMachineImagesOperations -from .operations.usage_operations import UsageOperations -from .operations.virtual_machines_operations import VirtualMachinesOperations -from .operations.virtual_machine_sizes_operations import VirtualMachineSizesOperations -from .operations.images_operations import ImagesOperations -from .operations.virtual_machine_scale_sets_operations import VirtualMachineScaleSetsOperations -from .operations.virtual_machine_scale_set_extensions_operations import VirtualMachineScaleSetExtensionsOperations -from .operations.virtual_machine_scale_set_rolling_upgrades_operations import VirtualMachineScaleSetRollingUpgradesOperations -from .operations.virtual_machine_scale_set_vms_operations import VirtualMachineScaleSetVMsOperations -from .operations.log_analytics_operations import LogAnalyticsOperations -from .operations.virtual_machine_run_commands_operations import VirtualMachineRunCommandsOperations -from .operations.disks_operations import DisksOperations -from .operations.snapshots_operations import SnapshotsOperations -from . import models - - -class ComputeManagementClientConfiguration(AzureConfiguration): - """Configuration for ComputeManagementClient - Note that all parameters used to create this instance are saved as instance - attributes. - - :param credentials: Credentials needed for the client to connect to Azure. - :type credentials: :mod:`A msrestazure Credentials - object` - :param subscription_id: Subscription credentials which uniquely identify - Microsoft Azure subscription. The subscription ID forms part of the URI - for every service call. - :type subscription_id: str - :param str base_url: Service URL - """ - - def __init__( - self, credentials, subscription_id, base_url=None): - - if credentials is None: - raise ValueError("Parameter 'credentials' must not be None.") - if subscription_id is None: - raise ValueError("Parameter 'subscription_id' must not be None.") - if not base_url: - base_url = 'https://management.azure.com' - - super(ComputeManagementClientConfiguration, self).__init__(base_url) - - self.add_user_agent('azure-mgmt-compute/{}'.format(VERSION)) - self.add_user_agent('Azure-SDK-For-Python') - - self.credentials = credentials - self.subscription_id = subscription_id - - -class ComputeManagementClient(SDKClient): - """Compute Client - - :ivar config: Configuration for client. - :vartype config: ComputeManagementClientConfiguration - - :ivar operations: Operations operations - :vartype operations: azure.mgmt.compute.v2018_04_01.operations.Operations - :ivar availability_sets: AvailabilitySets operations - :vartype availability_sets: azure.mgmt.compute.v2018_04_01.operations.AvailabilitySetsOperations - :ivar proximity_placement_groups: ProximityPlacementGroups operations - :vartype proximity_placement_groups: azure.mgmt.compute.v2018_04_01.operations.ProximityPlacementGroupsOperations - :ivar virtual_machine_extension_images: VirtualMachineExtensionImages operations - :vartype virtual_machine_extension_images: azure.mgmt.compute.v2018_04_01.operations.VirtualMachineExtensionImagesOperations - :ivar virtual_machine_extensions: VirtualMachineExtensions operations - :vartype virtual_machine_extensions: azure.mgmt.compute.v2018_04_01.operations.VirtualMachineExtensionsOperations - :ivar virtual_machine_images: VirtualMachineImages operations - :vartype virtual_machine_images: azure.mgmt.compute.v2018_04_01.operations.VirtualMachineImagesOperations - :ivar usage: Usage operations - :vartype usage: azure.mgmt.compute.v2018_04_01.operations.UsageOperations - :ivar virtual_machines: VirtualMachines operations - :vartype virtual_machines: azure.mgmt.compute.v2018_04_01.operations.VirtualMachinesOperations - :ivar virtual_machine_sizes: VirtualMachineSizes operations - :vartype virtual_machine_sizes: azure.mgmt.compute.v2018_04_01.operations.VirtualMachineSizesOperations - :ivar images: Images operations - :vartype images: azure.mgmt.compute.v2018_04_01.operations.ImagesOperations - :ivar virtual_machine_scale_sets: VirtualMachineScaleSets operations - :vartype virtual_machine_scale_sets: azure.mgmt.compute.v2018_04_01.operations.VirtualMachineScaleSetsOperations - :ivar virtual_machine_scale_set_extensions: VirtualMachineScaleSetExtensions operations - :vartype virtual_machine_scale_set_extensions: azure.mgmt.compute.v2018_04_01.operations.VirtualMachineScaleSetExtensionsOperations - :ivar virtual_machine_scale_set_rolling_upgrades: VirtualMachineScaleSetRollingUpgrades operations - :vartype virtual_machine_scale_set_rolling_upgrades: azure.mgmt.compute.v2018_04_01.operations.VirtualMachineScaleSetRollingUpgradesOperations - :ivar virtual_machine_scale_set_vms: VirtualMachineScaleSetVMs operations - :vartype virtual_machine_scale_set_vms: azure.mgmt.compute.v2018_04_01.operations.VirtualMachineScaleSetVMsOperations - :ivar log_analytics: LogAnalytics operations - :vartype log_analytics: azure.mgmt.compute.v2018_04_01.operations.LogAnalyticsOperations - :ivar virtual_machine_run_commands: VirtualMachineRunCommands operations - :vartype virtual_machine_run_commands: azure.mgmt.compute.v2018_04_01.operations.VirtualMachineRunCommandsOperations - :ivar disks: Disks operations - :vartype disks: azure.mgmt.compute.v2018_04_01.operations.DisksOperations - :ivar snapshots: Snapshots operations - :vartype snapshots: azure.mgmt.compute.v2018_04_01.operations.SnapshotsOperations - - :param credentials: Credentials needed for the client to connect to Azure. - :type credentials: :mod:`A msrestazure Credentials - object` - :param subscription_id: Subscription credentials which uniquely identify - Microsoft Azure subscription. The subscription ID forms part of the URI - for every service call. - :type subscription_id: str - :param str base_url: Service URL - """ - - def __init__( - self, credentials, subscription_id, base_url=None): - - self.config = ComputeManagementClientConfiguration(credentials, subscription_id, base_url) - super(ComputeManagementClient, self).__init__(self.config.credentials, self.config) - - client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} - self.api_version = '2018-04-01' - self._serialize = Serializer(client_models) - self._deserialize = Deserializer(client_models) - - self.operations = Operations( - self._client, self.config, self._serialize, self._deserialize) - self.availability_sets = AvailabilitySetsOperations( - self._client, self.config, self._serialize, self._deserialize) - self.proximity_placement_groups = ProximityPlacementGroupsOperations( - self._client, self.config, self._serialize, self._deserialize) - self.virtual_machine_extension_images = VirtualMachineExtensionImagesOperations( - self._client, self.config, self._serialize, self._deserialize) - self.virtual_machine_extensions = VirtualMachineExtensionsOperations( - self._client, self.config, self._serialize, self._deserialize) - self.virtual_machine_images = VirtualMachineImagesOperations( - self._client, self.config, self._serialize, self._deserialize) - self.usage = UsageOperations( - self._client, self.config, self._serialize, self._deserialize) - self.virtual_machines = VirtualMachinesOperations( - self._client, self.config, self._serialize, self._deserialize) - self.virtual_machine_sizes = VirtualMachineSizesOperations( - self._client, self.config, self._serialize, self._deserialize) - self.images = ImagesOperations( - self._client, self.config, self._serialize, self._deserialize) - self.virtual_machine_scale_sets = VirtualMachineScaleSetsOperations( - self._client, self.config, self._serialize, self._deserialize) - self.virtual_machine_scale_set_extensions = VirtualMachineScaleSetExtensionsOperations( - self._client, self.config, self._serialize, self._deserialize) - self.virtual_machine_scale_set_rolling_upgrades = VirtualMachineScaleSetRollingUpgradesOperations( - self._client, self.config, self._serialize, self._deserialize) - self.virtual_machine_scale_set_vms = VirtualMachineScaleSetVMsOperations( - self._client, self.config, self._serialize, self._deserialize) - self.log_analytics = LogAnalyticsOperations( - self._client, self.config, self._serialize, self._deserialize) - self.virtual_machine_run_commands = VirtualMachineRunCommandsOperations( - self._client, self.config, self._serialize, self._deserialize) - self.disks = DisksOperations( - self._client, self.config, self._serialize, self._deserialize) - self.snapshots = SnapshotsOperations( - self._client, self.config, self._serialize, self._deserialize) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/__init__.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/__init__.py index 16864dcc19de..d2f8f3b608fe 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/__init__.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/__init__.py @@ -10,307 +10,307 @@ # -------------------------------------------------------------------------- try: - from .compute_operation_value_py3 import ComputeOperationValue - from .instance_view_status_py3 import InstanceViewStatus - from .sub_resource_py3 import SubResource - from .sku_py3 import Sku - from .availability_set_py3 import AvailabilitySet - from .availability_set_update_py3 import AvailabilitySetUpdate - from .proximity_placement_group_py3 import ProximityPlacementGroup - from .proximity_placement_group_update_py3 import ProximityPlacementGroupUpdate - from .virtual_machine_size_py3 import VirtualMachineSize - from .virtual_machine_extension_image_py3 import VirtualMachineExtensionImage - from .virtual_machine_image_resource_py3 import VirtualMachineImageResource - from .virtual_machine_extension_instance_view_py3 import VirtualMachineExtensionInstanceView - from .virtual_machine_extension_py3 import VirtualMachineExtension - from .virtual_machine_extension_update_py3 import VirtualMachineExtensionUpdate - from .virtual_machine_extensions_list_result_py3 import VirtualMachineExtensionsListResult - from .purchase_plan_py3 import PurchasePlan - from .os_disk_image_py3 import OSDiskImage - from .data_disk_image_py3 import DataDiskImage - from .virtual_machine_image_py3 import VirtualMachineImage - from .usage_name_py3 import UsageName - from .usage_py3 import Usage - from .virtual_machine_capture_parameters_py3 import VirtualMachineCaptureParameters - from .virtual_machine_capture_result_py3 import VirtualMachineCaptureResult - from .plan_py3 import Plan - from .hardware_profile_py3 import HardwareProfile - from .image_reference_py3 import ImageReference - from .key_vault_secret_reference_py3 import KeyVaultSecretReference - from .key_vault_key_reference_py3 import KeyVaultKeyReference - from .disk_encryption_settings_py3 import DiskEncryptionSettings - from .virtual_hard_disk_py3 import VirtualHardDisk - from .managed_disk_parameters_py3 import ManagedDiskParameters - from .os_disk_py3 import OSDisk - from .data_disk_py3 import DataDisk - from .storage_profile_py3 import StorageProfile - from .additional_unattend_content_py3 import AdditionalUnattendContent - from .win_rm_listener_py3 import WinRMListener - from .win_rm_configuration_py3 import WinRMConfiguration - from .windows_configuration_py3 import WindowsConfiguration - from .ssh_public_key_py3 import SshPublicKey - from .ssh_configuration_py3 import SshConfiguration - from .linux_configuration_py3 import LinuxConfiguration - from .vault_certificate_py3 import VaultCertificate - from .vault_secret_group_py3 import VaultSecretGroup - from .os_profile_py3 import OSProfile - from .network_interface_reference_py3 import NetworkInterfaceReference - from .network_profile_py3 import NetworkProfile - from .boot_diagnostics_py3 import BootDiagnostics - from .diagnostics_profile_py3 import DiagnosticsProfile - from .virtual_machine_extension_handler_instance_view_py3 import VirtualMachineExtensionHandlerInstanceView - from .virtual_machine_agent_instance_view_py3 import VirtualMachineAgentInstanceView - from .disk_instance_view_py3 import DiskInstanceView - from .boot_diagnostics_instance_view_py3 import BootDiagnosticsInstanceView - from .virtual_machine_identity_py3 import VirtualMachineIdentity - from .maintenance_redeploy_status_py3 import MaintenanceRedeployStatus - from .virtual_machine_instance_view_py3 import VirtualMachineInstanceView - from .virtual_machine_py3 import VirtualMachine - from .virtual_machine_update_py3 import VirtualMachineUpdate - from .auto_os_upgrade_policy_py3 import AutoOSUpgradePolicy - from .rolling_upgrade_policy_py3 import RollingUpgradePolicy - from .upgrade_policy_py3 import UpgradePolicy - from .image_os_disk_py3 import ImageOSDisk - from .image_data_disk_py3 import ImageDataDisk - from .image_storage_profile_py3 import ImageStorageProfile - from .image_py3 import Image - from .image_update_py3 import ImageUpdate - from .virtual_machine_scale_set_identity_py3 import VirtualMachineScaleSetIdentity - from .virtual_machine_scale_set_os_profile_py3 import VirtualMachineScaleSetOSProfile - from .virtual_machine_scale_set_update_os_profile_py3 import VirtualMachineScaleSetUpdateOSProfile - from .virtual_machine_scale_set_managed_disk_parameters_py3 import VirtualMachineScaleSetManagedDiskParameters - from .virtual_machine_scale_set_os_disk_py3 import VirtualMachineScaleSetOSDisk - from .virtual_machine_scale_set_update_os_disk_py3 import VirtualMachineScaleSetUpdateOSDisk - from .virtual_machine_scale_set_data_disk_py3 import VirtualMachineScaleSetDataDisk - from .virtual_machine_scale_set_storage_profile_py3 import VirtualMachineScaleSetStorageProfile - from .virtual_machine_scale_set_update_storage_profile_py3 import VirtualMachineScaleSetUpdateStorageProfile - from .api_entity_reference_py3 import ApiEntityReference - from .virtual_machine_scale_set_public_ip_address_configuration_dns_settings_py3 import VirtualMachineScaleSetPublicIPAddressConfigurationDnsSettings - from .virtual_machine_scale_set_ip_tag_py3 import VirtualMachineScaleSetIpTag - from .virtual_machine_scale_set_public_ip_address_configuration_py3 import VirtualMachineScaleSetPublicIPAddressConfiguration - from .virtual_machine_scale_set_update_public_ip_address_configuration_py3 import VirtualMachineScaleSetUpdatePublicIPAddressConfiguration - from .virtual_machine_scale_set_ip_configuration_py3 import VirtualMachineScaleSetIPConfiguration - from .virtual_machine_scale_set_update_ip_configuration_py3 import VirtualMachineScaleSetUpdateIPConfiguration - from .virtual_machine_scale_set_network_configuration_dns_settings_py3 import VirtualMachineScaleSetNetworkConfigurationDnsSettings - from .virtual_machine_scale_set_network_configuration_py3 import VirtualMachineScaleSetNetworkConfiguration - from .virtual_machine_scale_set_update_network_configuration_py3 import VirtualMachineScaleSetUpdateNetworkConfiguration - from .virtual_machine_scale_set_network_profile_py3 import VirtualMachineScaleSetNetworkProfile - from .virtual_machine_scale_set_update_network_profile_py3 import VirtualMachineScaleSetUpdateNetworkProfile - from .virtual_machine_scale_set_extension_py3 import VirtualMachineScaleSetExtension - from .virtual_machine_scale_set_extension_profile_py3 import VirtualMachineScaleSetExtensionProfile - from .virtual_machine_scale_set_vm_profile_py3 import VirtualMachineScaleSetVMProfile - from .virtual_machine_scale_set_update_vm_profile_py3 import VirtualMachineScaleSetUpdateVMProfile - from .virtual_machine_scale_set_py3 import VirtualMachineScaleSet - from .virtual_machine_scale_set_update_py3 import VirtualMachineScaleSetUpdate - from .virtual_machine_scale_set_vm_instance_ids_py3 import VirtualMachineScaleSetVMInstanceIDs - from .virtual_machine_scale_set_vm_instance_required_ids_py3 import VirtualMachineScaleSetVMInstanceRequiredIDs - from .virtual_machine_status_code_count_py3 import VirtualMachineStatusCodeCount - from .virtual_machine_scale_set_instance_view_statuses_summary_py3 import VirtualMachineScaleSetInstanceViewStatusesSummary - from .virtual_machine_scale_set_vm_extensions_summary_py3 import VirtualMachineScaleSetVMExtensionsSummary - from .virtual_machine_scale_set_instance_view_py3 import VirtualMachineScaleSetInstanceView - from .virtual_machine_scale_set_sku_capacity_py3 import VirtualMachineScaleSetSkuCapacity - from .virtual_machine_scale_set_sku_py3 import VirtualMachineScaleSetSku - from .api_error_base_py3 import ApiErrorBase - from .inner_error_py3 import InnerError - from .api_error_py3 import ApiError - from .rollback_status_info_py3 import RollbackStatusInfo - from .upgrade_operation_history_status_py3 import UpgradeOperationHistoryStatus - from .rolling_upgrade_progress_info_py3 import RollingUpgradeProgressInfo - from .upgrade_operation_historical_status_info_properties_py3 import UpgradeOperationHistoricalStatusInfoProperties - from .upgrade_operation_historical_status_info_py3 import UpgradeOperationHistoricalStatusInfo - from .virtual_machine_health_status_py3 import VirtualMachineHealthStatus - from .virtual_machine_scale_set_vm_instance_view_py3 import VirtualMachineScaleSetVMInstanceView - from .virtual_machine_scale_set_vm_py3 import VirtualMachineScaleSetVM - from .rolling_upgrade_running_status_py3 import RollingUpgradeRunningStatus - from .rolling_upgrade_status_info_py3 import RollingUpgradeStatusInfo - from .resource_py3 import Resource - from .update_resource_py3 import UpdateResource - from .sub_resource_read_only_py3 import SubResourceReadOnly - from .recovery_walk_response_py3 import RecoveryWalkResponse - from .request_rate_by_interval_input_py3 import RequestRateByIntervalInput - from .throttled_requests_input_py3 import ThrottledRequestsInput - from .log_analytics_input_base_py3 import LogAnalyticsInputBase - from .log_analytics_output_py3 import LogAnalyticsOutput - from .log_analytics_operation_result_py3 import LogAnalyticsOperationResult - from .run_command_input_parameter_py3 import RunCommandInputParameter - from .run_command_input_py3 import RunCommandInput - from .run_command_parameter_definition_py3 import RunCommandParameterDefinition - from .run_command_document_base_py3 import RunCommandDocumentBase - from .run_command_document_py3 import RunCommandDocument - from .run_command_result_py3 import RunCommandResult - from .disk_sku_py3 import DiskSku - from .image_disk_reference_py3 import ImageDiskReference - from .creation_data_py3 import CreationData - from .source_vault_py3 import SourceVault - from .key_vault_and_secret_reference_py3 import KeyVaultAndSecretReference - from .key_vault_and_key_reference_py3 import KeyVaultAndKeyReference - from .encryption_settings_py3 import EncryptionSettings - from .disk_py3 import Disk - from .disk_update_py3 import DiskUpdate - from .snapshot_sku_py3 import SnapshotSku - from .grant_access_data_py3 import GrantAccessData - from .access_uri_py3 import AccessUri - from .snapshot_py3 import Snapshot - from .snapshot_update_py3 import SnapshotUpdate + from ._models_py3 import AccessUri + from ._models_py3 import AdditionalUnattendContent + from ._models_py3 import ApiEntityReference + from ._models_py3 import ApiError + from ._models_py3 import ApiErrorBase + from ._models_py3 import AutoOSUpgradePolicy + from ._models_py3 import AvailabilitySet + from ._models_py3 import AvailabilitySetUpdate + from ._models_py3 import BootDiagnostics + from ._models_py3 import BootDiagnosticsInstanceView + from ._models_py3 import ComputeOperationValue + from ._models_py3 import CreationData + from ._models_py3 import DataDisk + from ._models_py3 import DataDiskImage + from ._models_py3 import DiagnosticsProfile + from ._models_py3 import Disk + from ._models_py3 import DiskEncryptionSettings + from ._models_py3 import DiskInstanceView + from ._models_py3 import DiskSku + from ._models_py3 import DiskUpdate + from ._models_py3 import EncryptionSettings + from ._models_py3 import GrantAccessData + from ._models_py3 import HardwareProfile + from ._models_py3 import Image + from ._models_py3 import ImageDataDisk + from ._models_py3 import ImageDiskReference + from ._models_py3 import ImageOSDisk + from ._models_py3 import ImageReference + from ._models_py3 import ImageStorageProfile + from ._models_py3 import ImageUpdate + from ._models_py3 import InnerError + from ._models_py3 import InstanceViewStatus + from ._models_py3 import KeyVaultAndKeyReference + from ._models_py3 import KeyVaultAndSecretReference + from ._models_py3 import KeyVaultKeyReference + from ._models_py3 import KeyVaultSecretReference + from ._models_py3 import LinuxConfiguration + from ._models_py3 import LogAnalyticsInputBase + from ._models_py3 import LogAnalyticsOperationResult + from ._models_py3 import LogAnalyticsOutput + from ._models_py3 import MaintenanceRedeployStatus + from ._models_py3 import ManagedDiskParameters + from ._models_py3 import NetworkInterfaceReference + from ._models_py3 import NetworkProfile + from ._models_py3 import OSDisk + from ._models_py3 import OSDiskImage + from ._models_py3 import OSProfile + from ._models_py3 import Plan + from ._models_py3 import ProximityPlacementGroup + from ._models_py3 import ProximityPlacementGroupUpdate + from ._models_py3 import PurchasePlan + from ._models_py3 import RecoveryWalkResponse + from ._models_py3 import RequestRateByIntervalInput + from ._models_py3 import Resource + from ._models_py3 import RollbackStatusInfo + from ._models_py3 import RollingUpgradePolicy + from ._models_py3 import RollingUpgradeProgressInfo + from ._models_py3 import RollingUpgradeRunningStatus + from ._models_py3 import RollingUpgradeStatusInfo + from ._models_py3 import RunCommandDocument + from ._models_py3 import RunCommandDocumentBase + from ._models_py3 import RunCommandInput + from ._models_py3 import RunCommandInputParameter + from ._models_py3 import RunCommandParameterDefinition + from ._models_py3 import RunCommandResult + from ._models_py3 import Sku + from ._models_py3 import Snapshot + from ._models_py3 import SnapshotSku + from ._models_py3 import SnapshotUpdate + from ._models_py3 import SourceVault + from ._models_py3 import SshConfiguration + from ._models_py3 import SshPublicKey + from ._models_py3 import StorageProfile + from ._models_py3 import SubResource + from ._models_py3 import SubResourceReadOnly + from ._models_py3 import ThrottledRequestsInput + from ._models_py3 import UpdateResource + from ._models_py3 import UpgradeOperationHistoricalStatusInfo + from ._models_py3 import UpgradeOperationHistoricalStatusInfoProperties + from ._models_py3 import UpgradeOperationHistoryStatus + from ._models_py3 import UpgradePolicy + from ._models_py3 import Usage + from ._models_py3 import UsageName + from ._models_py3 import VaultCertificate + from ._models_py3 import VaultSecretGroup + from ._models_py3 import VirtualHardDisk + from ._models_py3 import VirtualMachine + from ._models_py3 import VirtualMachineAgentInstanceView + from ._models_py3 import VirtualMachineCaptureParameters + from ._models_py3 import VirtualMachineCaptureResult + from ._models_py3 import VirtualMachineExtension + from ._models_py3 import VirtualMachineExtensionHandlerInstanceView + from ._models_py3 import VirtualMachineExtensionImage + from ._models_py3 import VirtualMachineExtensionInstanceView + from ._models_py3 import VirtualMachineExtensionsListResult + from ._models_py3 import VirtualMachineExtensionUpdate + from ._models_py3 import VirtualMachineHealthStatus + from ._models_py3 import VirtualMachineIdentity + from ._models_py3 import VirtualMachineImage + from ._models_py3 import VirtualMachineImageResource + from ._models_py3 import VirtualMachineInstanceView + from ._models_py3 import VirtualMachineScaleSet + from ._models_py3 import VirtualMachineScaleSetDataDisk + from ._models_py3 import VirtualMachineScaleSetExtension + from ._models_py3 import VirtualMachineScaleSetExtensionProfile + from ._models_py3 import VirtualMachineScaleSetIdentity + from ._models_py3 import VirtualMachineScaleSetInstanceView + from ._models_py3 import VirtualMachineScaleSetInstanceViewStatusesSummary + from ._models_py3 import VirtualMachineScaleSetIPConfiguration + from ._models_py3 import VirtualMachineScaleSetIpTag + from ._models_py3 import VirtualMachineScaleSetManagedDiskParameters + from ._models_py3 import VirtualMachineScaleSetNetworkConfiguration + from ._models_py3 import VirtualMachineScaleSetNetworkConfigurationDnsSettings + from ._models_py3 import VirtualMachineScaleSetNetworkProfile + from ._models_py3 import VirtualMachineScaleSetOSDisk + from ._models_py3 import VirtualMachineScaleSetOSProfile + from ._models_py3 import VirtualMachineScaleSetPublicIPAddressConfiguration + from ._models_py3 import VirtualMachineScaleSetPublicIPAddressConfigurationDnsSettings + from ._models_py3 import VirtualMachineScaleSetSku + from ._models_py3 import VirtualMachineScaleSetSkuCapacity + from ._models_py3 import VirtualMachineScaleSetStorageProfile + from ._models_py3 import VirtualMachineScaleSetUpdate + from ._models_py3 import VirtualMachineScaleSetUpdateIPConfiguration + from ._models_py3 import VirtualMachineScaleSetUpdateNetworkConfiguration + from ._models_py3 import VirtualMachineScaleSetUpdateNetworkProfile + from ._models_py3 import VirtualMachineScaleSetUpdateOSDisk + from ._models_py3 import VirtualMachineScaleSetUpdateOSProfile + from ._models_py3 import VirtualMachineScaleSetUpdatePublicIPAddressConfiguration + from ._models_py3 import VirtualMachineScaleSetUpdateStorageProfile + from ._models_py3 import VirtualMachineScaleSetUpdateVMProfile + from ._models_py3 import VirtualMachineScaleSetVM + from ._models_py3 import VirtualMachineScaleSetVMExtensionsSummary + from ._models_py3 import VirtualMachineScaleSetVMInstanceIDs + from ._models_py3 import VirtualMachineScaleSetVMInstanceRequiredIDs + from ._models_py3 import VirtualMachineScaleSetVMInstanceView + from ._models_py3 import VirtualMachineScaleSetVMProfile + from ._models_py3 import VirtualMachineSize + from ._models_py3 import VirtualMachineStatusCodeCount + from ._models_py3 import VirtualMachineUpdate + from ._models_py3 import WindowsConfiguration + from ._models_py3 import WinRMConfiguration + from ._models_py3 import WinRMListener except (SyntaxError, ImportError): - from .compute_operation_value import ComputeOperationValue - from .instance_view_status import InstanceViewStatus - from .sub_resource import SubResource - from .sku import Sku - from .availability_set import AvailabilitySet - from .availability_set_update import AvailabilitySetUpdate - from .proximity_placement_group import ProximityPlacementGroup - from .proximity_placement_group_update import ProximityPlacementGroupUpdate - from .virtual_machine_size import VirtualMachineSize - from .virtual_machine_extension_image import VirtualMachineExtensionImage - from .virtual_machine_image_resource import VirtualMachineImageResource - from .virtual_machine_extension_instance_view import VirtualMachineExtensionInstanceView - from .virtual_machine_extension import VirtualMachineExtension - from .virtual_machine_extension_update import VirtualMachineExtensionUpdate - from .virtual_machine_extensions_list_result import VirtualMachineExtensionsListResult - from .purchase_plan import PurchasePlan - from .os_disk_image import OSDiskImage - from .data_disk_image import DataDiskImage - from .virtual_machine_image import VirtualMachineImage - from .usage_name import UsageName - from .usage import Usage - from .virtual_machine_capture_parameters import VirtualMachineCaptureParameters - from .virtual_machine_capture_result import VirtualMachineCaptureResult - from .plan import Plan - from .hardware_profile import HardwareProfile - from .image_reference import ImageReference - from .key_vault_secret_reference import KeyVaultSecretReference - from .key_vault_key_reference import KeyVaultKeyReference - from .disk_encryption_settings import DiskEncryptionSettings - from .virtual_hard_disk import VirtualHardDisk - from .managed_disk_parameters import ManagedDiskParameters - from .os_disk import OSDisk - from .data_disk import DataDisk - from .storage_profile import StorageProfile - from .additional_unattend_content import AdditionalUnattendContent - from .win_rm_listener import WinRMListener - from .win_rm_configuration import WinRMConfiguration - from .windows_configuration import WindowsConfiguration - from .ssh_public_key import SshPublicKey - from .ssh_configuration import SshConfiguration - from .linux_configuration import LinuxConfiguration - from .vault_certificate import VaultCertificate - from .vault_secret_group import VaultSecretGroup - from .os_profile import OSProfile - from .network_interface_reference import NetworkInterfaceReference - from .network_profile import NetworkProfile - from .boot_diagnostics import BootDiagnostics - from .diagnostics_profile import DiagnosticsProfile - from .virtual_machine_extension_handler_instance_view import VirtualMachineExtensionHandlerInstanceView - from .virtual_machine_agent_instance_view import VirtualMachineAgentInstanceView - from .disk_instance_view import DiskInstanceView - from .boot_diagnostics_instance_view import BootDiagnosticsInstanceView - from .virtual_machine_identity import VirtualMachineIdentity - from .maintenance_redeploy_status import MaintenanceRedeployStatus - from .virtual_machine_instance_view import VirtualMachineInstanceView - from .virtual_machine import VirtualMachine - from .virtual_machine_update import VirtualMachineUpdate - from .auto_os_upgrade_policy import AutoOSUpgradePolicy - from .rolling_upgrade_policy import RollingUpgradePolicy - from .upgrade_policy import UpgradePolicy - from .image_os_disk import ImageOSDisk - from .image_data_disk import ImageDataDisk - from .image_storage_profile import ImageStorageProfile - from .image import Image - from .image_update import ImageUpdate - from .virtual_machine_scale_set_identity import VirtualMachineScaleSetIdentity - from .virtual_machine_scale_set_os_profile import VirtualMachineScaleSetOSProfile - from .virtual_machine_scale_set_update_os_profile import VirtualMachineScaleSetUpdateOSProfile - from .virtual_machine_scale_set_managed_disk_parameters import VirtualMachineScaleSetManagedDiskParameters - from .virtual_machine_scale_set_os_disk import VirtualMachineScaleSetOSDisk - from .virtual_machine_scale_set_update_os_disk import VirtualMachineScaleSetUpdateOSDisk - from .virtual_machine_scale_set_data_disk import VirtualMachineScaleSetDataDisk - from .virtual_machine_scale_set_storage_profile import VirtualMachineScaleSetStorageProfile - from .virtual_machine_scale_set_update_storage_profile import VirtualMachineScaleSetUpdateStorageProfile - from .api_entity_reference import ApiEntityReference - from .virtual_machine_scale_set_public_ip_address_configuration_dns_settings import VirtualMachineScaleSetPublicIPAddressConfigurationDnsSettings - from .virtual_machine_scale_set_ip_tag import VirtualMachineScaleSetIpTag - from .virtual_machine_scale_set_public_ip_address_configuration import VirtualMachineScaleSetPublicIPAddressConfiguration - from .virtual_machine_scale_set_update_public_ip_address_configuration import VirtualMachineScaleSetUpdatePublicIPAddressConfiguration - from .virtual_machine_scale_set_ip_configuration import VirtualMachineScaleSetIPConfiguration - from .virtual_machine_scale_set_update_ip_configuration import VirtualMachineScaleSetUpdateIPConfiguration - from .virtual_machine_scale_set_network_configuration_dns_settings import VirtualMachineScaleSetNetworkConfigurationDnsSettings - from .virtual_machine_scale_set_network_configuration import VirtualMachineScaleSetNetworkConfiguration - from .virtual_machine_scale_set_update_network_configuration import VirtualMachineScaleSetUpdateNetworkConfiguration - from .virtual_machine_scale_set_network_profile import VirtualMachineScaleSetNetworkProfile - from .virtual_machine_scale_set_update_network_profile import VirtualMachineScaleSetUpdateNetworkProfile - from .virtual_machine_scale_set_extension import VirtualMachineScaleSetExtension - from .virtual_machine_scale_set_extension_profile import VirtualMachineScaleSetExtensionProfile - from .virtual_machine_scale_set_vm_profile import VirtualMachineScaleSetVMProfile - from .virtual_machine_scale_set_update_vm_profile import VirtualMachineScaleSetUpdateVMProfile - from .virtual_machine_scale_set import VirtualMachineScaleSet - from .virtual_machine_scale_set_update import VirtualMachineScaleSetUpdate - from .virtual_machine_scale_set_vm_instance_ids import VirtualMachineScaleSetVMInstanceIDs - from .virtual_machine_scale_set_vm_instance_required_ids import VirtualMachineScaleSetVMInstanceRequiredIDs - from .virtual_machine_status_code_count import VirtualMachineStatusCodeCount - from .virtual_machine_scale_set_instance_view_statuses_summary import VirtualMachineScaleSetInstanceViewStatusesSummary - from .virtual_machine_scale_set_vm_extensions_summary import VirtualMachineScaleSetVMExtensionsSummary - from .virtual_machine_scale_set_instance_view import VirtualMachineScaleSetInstanceView - from .virtual_machine_scale_set_sku_capacity import VirtualMachineScaleSetSkuCapacity - from .virtual_machine_scale_set_sku import VirtualMachineScaleSetSku - from .api_error_base import ApiErrorBase - from .inner_error import InnerError - from .api_error import ApiError - from .rollback_status_info import RollbackStatusInfo - from .upgrade_operation_history_status import UpgradeOperationHistoryStatus - from .rolling_upgrade_progress_info import RollingUpgradeProgressInfo - from .upgrade_operation_historical_status_info_properties import UpgradeOperationHistoricalStatusInfoProperties - from .upgrade_operation_historical_status_info import UpgradeOperationHistoricalStatusInfo - from .virtual_machine_health_status import VirtualMachineHealthStatus - from .virtual_machine_scale_set_vm_instance_view import VirtualMachineScaleSetVMInstanceView - from .virtual_machine_scale_set_vm import VirtualMachineScaleSetVM - from .rolling_upgrade_running_status import RollingUpgradeRunningStatus - from .rolling_upgrade_status_info import RollingUpgradeStatusInfo - from .resource import Resource - from .update_resource import UpdateResource - from .sub_resource_read_only import SubResourceReadOnly - from .recovery_walk_response import RecoveryWalkResponse - from .request_rate_by_interval_input import RequestRateByIntervalInput - from .throttled_requests_input import ThrottledRequestsInput - from .log_analytics_input_base import LogAnalyticsInputBase - from .log_analytics_output import LogAnalyticsOutput - from .log_analytics_operation_result import LogAnalyticsOperationResult - from .run_command_input_parameter import RunCommandInputParameter - from .run_command_input import RunCommandInput - from .run_command_parameter_definition import RunCommandParameterDefinition - from .run_command_document_base import RunCommandDocumentBase - from .run_command_document import RunCommandDocument - from .run_command_result import RunCommandResult - from .disk_sku import DiskSku - from .image_disk_reference import ImageDiskReference - from .creation_data import CreationData - from .source_vault import SourceVault - from .key_vault_and_secret_reference import KeyVaultAndSecretReference - from .key_vault_and_key_reference import KeyVaultAndKeyReference - from .encryption_settings import EncryptionSettings - from .disk import Disk - from .disk_update import DiskUpdate - from .snapshot_sku import SnapshotSku - from .grant_access_data import GrantAccessData - from .access_uri import AccessUri - from .snapshot import Snapshot - from .snapshot_update import SnapshotUpdate -from .compute_operation_value_paged import ComputeOperationValuePaged -from .availability_set_paged import AvailabilitySetPaged -from .virtual_machine_size_paged import VirtualMachineSizePaged -from .proximity_placement_group_paged import ProximityPlacementGroupPaged -from .usage_paged import UsagePaged -from .virtual_machine_paged import VirtualMachinePaged -from .image_paged import ImagePaged -from .virtual_machine_scale_set_paged import VirtualMachineScaleSetPaged -from .virtual_machine_scale_set_sku_paged import VirtualMachineScaleSetSkuPaged -from .upgrade_operation_historical_status_info_paged import UpgradeOperationHistoricalStatusInfoPaged -from .virtual_machine_scale_set_extension_paged import VirtualMachineScaleSetExtensionPaged -from .virtual_machine_scale_set_vm_paged import VirtualMachineScaleSetVMPaged -from .run_command_document_base_paged import RunCommandDocumentBasePaged -from .disk_paged import DiskPaged -from .snapshot_paged import SnapshotPaged -from .compute_management_client_enums import ( + from ._models import AccessUri + from ._models import AdditionalUnattendContent + from ._models import ApiEntityReference + from ._models import ApiError + from ._models import ApiErrorBase + from ._models import AutoOSUpgradePolicy + from ._models import AvailabilitySet + from ._models import AvailabilitySetUpdate + from ._models import BootDiagnostics + from ._models import BootDiagnosticsInstanceView + from ._models import ComputeOperationValue + from ._models import CreationData + from ._models import DataDisk + from ._models import DataDiskImage + from ._models import DiagnosticsProfile + from ._models import Disk + from ._models import DiskEncryptionSettings + from ._models import DiskInstanceView + from ._models import DiskSku + from ._models import DiskUpdate + from ._models import EncryptionSettings + from ._models import GrantAccessData + from ._models import HardwareProfile + from ._models import Image + from ._models import ImageDataDisk + from ._models import ImageDiskReference + from ._models import ImageOSDisk + from ._models import ImageReference + from ._models import ImageStorageProfile + from ._models import ImageUpdate + from ._models import InnerError + from ._models import InstanceViewStatus + from ._models import KeyVaultAndKeyReference + from ._models import KeyVaultAndSecretReference + from ._models import KeyVaultKeyReference + from ._models import KeyVaultSecretReference + from ._models import LinuxConfiguration + from ._models import LogAnalyticsInputBase + from ._models import LogAnalyticsOperationResult + from ._models import LogAnalyticsOutput + from ._models import MaintenanceRedeployStatus + from ._models import ManagedDiskParameters + from ._models import NetworkInterfaceReference + from ._models import NetworkProfile + from ._models import OSDisk + from ._models import OSDiskImage + from ._models import OSProfile + from ._models import Plan + from ._models import ProximityPlacementGroup + from ._models import ProximityPlacementGroupUpdate + from ._models import PurchasePlan + from ._models import RecoveryWalkResponse + from ._models import RequestRateByIntervalInput + from ._models import Resource + from ._models import RollbackStatusInfo + from ._models import RollingUpgradePolicy + from ._models import RollingUpgradeProgressInfo + from ._models import RollingUpgradeRunningStatus + from ._models import RollingUpgradeStatusInfo + from ._models import RunCommandDocument + from ._models import RunCommandDocumentBase + from ._models import RunCommandInput + from ._models import RunCommandInputParameter + from ._models import RunCommandParameterDefinition + from ._models import RunCommandResult + from ._models import Sku + from ._models import Snapshot + from ._models import SnapshotSku + from ._models import SnapshotUpdate + from ._models import SourceVault + from ._models import SshConfiguration + from ._models import SshPublicKey + from ._models import StorageProfile + from ._models import SubResource + from ._models import SubResourceReadOnly + from ._models import ThrottledRequestsInput + from ._models import UpdateResource + from ._models import UpgradeOperationHistoricalStatusInfo + from ._models import UpgradeOperationHistoricalStatusInfoProperties + from ._models import UpgradeOperationHistoryStatus + from ._models import UpgradePolicy + from ._models import Usage + from ._models import UsageName + from ._models import VaultCertificate + from ._models import VaultSecretGroup + from ._models import VirtualHardDisk + from ._models import VirtualMachine + from ._models import VirtualMachineAgentInstanceView + from ._models import VirtualMachineCaptureParameters + from ._models import VirtualMachineCaptureResult + from ._models import VirtualMachineExtension + from ._models import VirtualMachineExtensionHandlerInstanceView + from ._models import VirtualMachineExtensionImage + from ._models import VirtualMachineExtensionInstanceView + from ._models import VirtualMachineExtensionsListResult + from ._models import VirtualMachineExtensionUpdate + from ._models import VirtualMachineHealthStatus + from ._models import VirtualMachineIdentity + from ._models import VirtualMachineImage + from ._models import VirtualMachineImageResource + from ._models import VirtualMachineInstanceView + from ._models import VirtualMachineScaleSet + from ._models import VirtualMachineScaleSetDataDisk + from ._models import VirtualMachineScaleSetExtension + from ._models import VirtualMachineScaleSetExtensionProfile + from ._models import VirtualMachineScaleSetIdentity + from ._models import VirtualMachineScaleSetInstanceView + from ._models import VirtualMachineScaleSetInstanceViewStatusesSummary + from ._models import VirtualMachineScaleSetIPConfiguration + from ._models import VirtualMachineScaleSetIpTag + from ._models import VirtualMachineScaleSetManagedDiskParameters + from ._models import VirtualMachineScaleSetNetworkConfiguration + from ._models import VirtualMachineScaleSetNetworkConfigurationDnsSettings + from ._models import VirtualMachineScaleSetNetworkProfile + from ._models import VirtualMachineScaleSetOSDisk + from ._models import VirtualMachineScaleSetOSProfile + from ._models import VirtualMachineScaleSetPublicIPAddressConfiguration + from ._models import VirtualMachineScaleSetPublicIPAddressConfigurationDnsSettings + from ._models import VirtualMachineScaleSetSku + from ._models import VirtualMachineScaleSetSkuCapacity + from ._models import VirtualMachineScaleSetStorageProfile + from ._models import VirtualMachineScaleSetUpdate + from ._models import VirtualMachineScaleSetUpdateIPConfiguration + from ._models import VirtualMachineScaleSetUpdateNetworkConfiguration + from ._models import VirtualMachineScaleSetUpdateNetworkProfile + from ._models import VirtualMachineScaleSetUpdateOSDisk + from ._models import VirtualMachineScaleSetUpdateOSProfile + from ._models import VirtualMachineScaleSetUpdatePublicIPAddressConfiguration + from ._models import VirtualMachineScaleSetUpdateStorageProfile + from ._models import VirtualMachineScaleSetUpdateVMProfile + from ._models import VirtualMachineScaleSetVM + from ._models import VirtualMachineScaleSetVMExtensionsSummary + from ._models import VirtualMachineScaleSetVMInstanceIDs + from ._models import VirtualMachineScaleSetVMInstanceRequiredIDs + from ._models import VirtualMachineScaleSetVMInstanceView + from ._models import VirtualMachineScaleSetVMProfile + from ._models import VirtualMachineSize + from ._models import VirtualMachineStatusCodeCount + from ._models import VirtualMachineUpdate + from ._models import WindowsConfiguration + from ._models import WinRMConfiguration + from ._models import WinRMListener +from ._paged_models import AvailabilitySetPaged +from ._paged_models import ComputeOperationValuePaged +from ._paged_models import DiskPaged +from ._paged_models import ImagePaged +from ._paged_models import ProximityPlacementGroupPaged +from ._paged_models import RunCommandDocumentBasePaged +from ._paged_models import SnapshotPaged +from ._paged_models import UpgradeOperationHistoricalStatusInfoPaged +from ._paged_models import UsagePaged +from ._paged_models import VirtualMachinePaged +from ._paged_models import VirtualMachineScaleSetExtensionPaged +from ._paged_models import VirtualMachineScaleSetPaged +from ._paged_models import VirtualMachineScaleSetSkuPaged +from ._paged_models import VirtualMachineScaleSetVMPaged +from ._paged_models import VirtualMachineSizePaged +from ._compute_management_client_enums import ( StatusLevelTypes, ProximityPlacementGroupType, OperatingSystemTypes, @@ -342,148 +342,148 @@ ) __all__ = [ - 'ComputeOperationValue', - 'InstanceViewStatus', - 'SubResource', - 'Sku', + 'AccessUri', + 'AdditionalUnattendContent', + 'ApiEntityReference', + 'ApiError', + 'ApiErrorBase', + 'AutoOSUpgradePolicy', 'AvailabilitySet', 'AvailabilitySetUpdate', - 'ProximityPlacementGroup', - 'ProximityPlacementGroupUpdate', - 'VirtualMachineSize', - 'VirtualMachineExtensionImage', - 'VirtualMachineImageResource', - 'VirtualMachineExtensionInstanceView', - 'VirtualMachineExtension', - 'VirtualMachineExtensionUpdate', - 'VirtualMachineExtensionsListResult', - 'PurchasePlan', - 'OSDiskImage', + 'BootDiagnostics', + 'BootDiagnosticsInstanceView', + 'ComputeOperationValue', + 'CreationData', + 'DataDisk', 'DataDiskImage', - 'VirtualMachineImage', - 'UsageName', - 'Usage', - 'VirtualMachineCaptureParameters', - 'VirtualMachineCaptureResult', - 'Plan', + 'DiagnosticsProfile', + 'Disk', + 'DiskEncryptionSettings', + 'DiskInstanceView', + 'DiskSku', + 'DiskUpdate', + 'EncryptionSettings', + 'GrantAccessData', 'HardwareProfile', + 'Image', + 'ImageDataDisk', + 'ImageDiskReference', + 'ImageOSDisk', 'ImageReference', - 'KeyVaultSecretReference', + 'ImageStorageProfile', + 'ImageUpdate', + 'InnerError', + 'InstanceViewStatus', + 'KeyVaultAndKeyReference', + 'KeyVaultAndSecretReference', 'KeyVaultKeyReference', - 'DiskEncryptionSettings', - 'VirtualHardDisk', + 'KeyVaultSecretReference', + 'LinuxConfiguration', + 'LogAnalyticsInputBase', + 'LogAnalyticsOperationResult', + 'LogAnalyticsOutput', + 'MaintenanceRedeployStatus', 'ManagedDiskParameters', + 'NetworkInterfaceReference', + 'NetworkProfile', 'OSDisk', - 'DataDisk', - 'StorageProfile', - 'AdditionalUnattendContent', - 'WinRMListener', - 'WinRMConfiguration', - 'WindowsConfiguration', - 'SshPublicKey', + 'OSDiskImage', + 'OSProfile', + 'Plan', + 'ProximityPlacementGroup', + 'ProximityPlacementGroupUpdate', + 'PurchasePlan', + 'RecoveryWalkResponse', + 'RequestRateByIntervalInput', + 'Resource', + 'RollbackStatusInfo', + 'RollingUpgradePolicy', + 'RollingUpgradeProgressInfo', + 'RollingUpgradeRunningStatus', + 'RollingUpgradeStatusInfo', + 'RunCommandDocument', + 'RunCommandDocumentBase', + 'RunCommandInput', + 'RunCommandInputParameter', + 'RunCommandParameterDefinition', + 'RunCommandResult', + 'Sku', + 'Snapshot', + 'SnapshotSku', + 'SnapshotUpdate', + 'SourceVault', 'SshConfiguration', - 'LinuxConfiguration', + 'SshPublicKey', + 'StorageProfile', + 'SubResource', + 'SubResourceReadOnly', + 'ThrottledRequestsInput', + 'UpdateResource', + 'UpgradeOperationHistoricalStatusInfo', + 'UpgradeOperationHistoricalStatusInfoProperties', + 'UpgradeOperationHistoryStatus', + 'UpgradePolicy', + 'Usage', + 'UsageName', 'VaultCertificate', 'VaultSecretGroup', - 'OSProfile', - 'NetworkInterfaceReference', - 'NetworkProfile', - 'BootDiagnostics', - 'DiagnosticsProfile', - 'VirtualMachineExtensionHandlerInstanceView', + 'VirtualHardDisk', + 'VirtualMachine', 'VirtualMachineAgentInstanceView', - 'DiskInstanceView', - 'BootDiagnosticsInstanceView', + 'VirtualMachineCaptureParameters', + 'VirtualMachineCaptureResult', + 'VirtualMachineExtension', + 'VirtualMachineExtensionHandlerInstanceView', + 'VirtualMachineExtensionImage', + 'VirtualMachineExtensionInstanceView', + 'VirtualMachineExtensionsListResult', + 'VirtualMachineExtensionUpdate', + 'VirtualMachineHealthStatus', 'VirtualMachineIdentity', - 'MaintenanceRedeployStatus', + 'VirtualMachineImage', + 'VirtualMachineImageResource', 'VirtualMachineInstanceView', - 'VirtualMachine', - 'VirtualMachineUpdate', - 'AutoOSUpgradePolicy', - 'RollingUpgradePolicy', - 'UpgradePolicy', - 'ImageOSDisk', - 'ImageDataDisk', - 'ImageStorageProfile', - 'Image', - 'ImageUpdate', + 'VirtualMachineScaleSet', + 'VirtualMachineScaleSetDataDisk', + 'VirtualMachineScaleSetExtension', + 'VirtualMachineScaleSetExtensionProfile', 'VirtualMachineScaleSetIdentity', - 'VirtualMachineScaleSetOSProfile', - 'VirtualMachineScaleSetUpdateOSProfile', + 'VirtualMachineScaleSetInstanceView', + 'VirtualMachineScaleSetInstanceViewStatusesSummary', + 'VirtualMachineScaleSetIPConfiguration', + 'VirtualMachineScaleSetIpTag', 'VirtualMachineScaleSetManagedDiskParameters', + 'VirtualMachineScaleSetNetworkConfiguration', + 'VirtualMachineScaleSetNetworkConfigurationDnsSettings', + 'VirtualMachineScaleSetNetworkProfile', 'VirtualMachineScaleSetOSDisk', - 'VirtualMachineScaleSetUpdateOSDisk', - 'VirtualMachineScaleSetDataDisk', - 'VirtualMachineScaleSetStorageProfile', - 'VirtualMachineScaleSetUpdateStorageProfile', - 'ApiEntityReference', - 'VirtualMachineScaleSetPublicIPAddressConfigurationDnsSettings', - 'VirtualMachineScaleSetIpTag', + 'VirtualMachineScaleSetOSProfile', 'VirtualMachineScaleSetPublicIPAddressConfiguration', - 'VirtualMachineScaleSetUpdatePublicIPAddressConfiguration', - 'VirtualMachineScaleSetIPConfiguration', + 'VirtualMachineScaleSetPublicIPAddressConfigurationDnsSettings', + 'VirtualMachineScaleSetSku', + 'VirtualMachineScaleSetSkuCapacity', + 'VirtualMachineScaleSetStorageProfile', + 'VirtualMachineScaleSetUpdate', 'VirtualMachineScaleSetUpdateIPConfiguration', - 'VirtualMachineScaleSetNetworkConfigurationDnsSettings', - 'VirtualMachineScaleSetNetworkConfiguration', 'VirtualMachineScaleSetUpdateNetworkConfiguration', - 'VirtualMachineScaleSetNetworkProfile', 'VirtualMachineScaleSetUpdateNetworkProfile', - 'VirtualMachineScaleSetExtension', - 'VirtualMachineScaleSetExtensionProfile', - 'VirtualMachineScaleSetVMProfile', + 'VirtualMachineScaleSetUpdateOSDisk', + 'VirtualMachineScaleSetUpdateOSProfile', + 'VirtualMachineScaleSetUpdatePublicIPAddressConfiguration', + 'VirtualMachineScaleSetUpdateStorageProfile', 'VirtualMachineScaleSetUpdateVMProfile', - 'VirtualMachineScaleSet', - 'VirtualMachineScaleSetUpdate', + 'VirtualMachineScaleSetVM', + 'VirtualMachineScaleSetVMExtensionsSummary', 'VirtualMachineScaleSetVMInstanceIDs', 'VirtualMachineScaleSetVMInstanceRequiredIDs', - 'VirtualMachineStatusCodeCount', - 'VirtualMachineScaleSetInstanceViewStatusesSummary', - 'VirtualMachineScaleSetVMExtensionsSummary', - 'VirtualMachineScaleSetInstanceView', - 'VirtualMachineScaleSetSkuCapacity', - 'VirtualMachineScaleSetSku', - 'ApiErrorBase', - 'InnerError', - 'ApiError', - 'RollbackStatusInfo', - 'UpgradeOperationHistoryStatus', - 'RollingUpgradeProgressInfo', - 'UpgradeOperationHistoricalStatusInfoProperties', - 'UpgradeOperationHistoricalStatusInfo', - 'VirtualMachineHealthStatus', 'VirtualMachineScaleSetVMInstanceView', - 'VirtualMachineScaleSetVM', - 'RollingUpgradeRunningStatus', - 'RollingUpgradeStatusInfo', - 'Resource', - 'UpdateResource', - 'SubResourceReadOnly', - 'RecoveryWalkResponse', - 'RequestRateByIntervalInput', - 'ThrottledRequestsInput', - 'LogAnalyticsInputBase', - 'LogAnalyticsOutput', - 'LogAnalyticsOperationResult', - 'RunCommandInputParameter', - 'RunCommandInput', - 'RunCommandParameterDefinition', - 'RunCommandDocumentBase', - 'RunCommandDocument', - 'RunCommandResult', - 'DiskSku', - 'ImageDiskReference', - 'CreationData', - 'SourceVault', - 'KeyVaultAndSecretReference', - 'KeyVaultAndKeyReference', - 'EncryptionSettings', - 'Disk', - 'DiskUpdate', - 'SnapshotSku', - 'GrantAccessData', - 'AccessUri', - 'Snapshot', - 'SnapshotUpdate', + 'VirtualMachineScaleSetVMProfile', + 'VirtualMachineSize', + 'VirtualMachineStatusCodeCount', + 'VirtualMachineUpdate', + 'WindowsConfiguration', + 'WinRMConfiguration', + 'WinRMListener', 'ComputeOperationValuePaged', 'AvailabilitySetPaged', 'VirtualMachineSizePaged', diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/compute_management_client_enums.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/_compute_management_client_enums.py similarity index 100% rename from sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/compute_management_client_enums.py rename to sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/_compute_management_client_enums.py diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/_models.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/_models.py new file mode 100644 index 000000000000..359483eafcb6 --- /dev/null +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/_models.py @@ -0,0 +1,5875 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class AccessUri(Model): + """A disk access SAS uri. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar access_sas: A SAS uri for accessing a disk. + :vartype access_sas: str + """ + + _validation = { + 'access_sas': {'readonly': True}, + } + + _attribute_map = { + 'access_sas': {'key': 'accessSAS', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(AccessUri, self).__init__(**kwargs) + self.access_sas = None + + +class AdditionalUnattendContent(Model): + """Specifies additional XML formatted information that can be included in the + Unattend.xml file, which is used by Windows Setup. Contents are defined by + setting name, component name, and the pass in which the content is applied. + + :param pass_name: The pass name. Currently, the only allowable value is + OobeSystem. Possible values include: 'OobeSystem' + :type pass_name: str or ~azure.mgmt.compute.v2018_04_01.models.PassNames + :param component_name: The component name. Currently, the only allowable + value is Microsoft-Windows-Shell-Setup. Possible values include: + 'Microsoft-Windows-Shell-Setup' + :type component_name: str or + ~azure.mgmt.compute.v2018_04_01.models.ComponentNames + :param setting_name: Specifies the name of the setting to which the + content applies. Possible values are: FirstLogonCommands and AutoLogon. + Possible values include: 'AutoLogon', 'FirstLogonCommands' + :type setting_name: str or + ~azure.mgmt.compute.v2018_04_01.models.SettingNames + :param content: Specifies the XML formatted content that is added to the + unattend.xml file for the specified path and component. The XML must be + less than 4KB and must include the root element for the setting or feature + that is being inserted. + :type content: str + """ + + _attribute_map = { + 'pass_name': {'key': 'passName', 'type': 'PassNames'}, + 'component_name': {'key': 'componentName', 'type': 'ComponentNames'}, + 'setting_name': {'key': 'settingName', 'type': 'SettingNames'}, + 'content': {'key': 'content', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(AdditionalUnattendContent, self).__init__(**kwargs) + self.pass_name = kwargs.get('pass_name', None) + self.component_name = kwargs.get('component_name', None) + self.setting_name = kwargs.get('setting_name', None) + self.content = kwargs.get('content', None) + + +class ApiEntityReference(Model): + """The API entity reference. + + :param id: The ARM resource id in the form of + /subscriptions/{SubscriptionId}/resourceGroups/{ResourceGroupName}/... + :type id: str + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ApiEntityReference, self).__init__(**kwargs) + self.id = kwargs.get('id', None) + + +class ApiError(Model): + """Api error. + + :param details: The Api error details + :type details: list[~azure.mgmt.compute.v2018_04_01.models.ApiErrorBase] + :param innererror: The Api inner error + :type innererror: ~azure.mgmt.compute.v2018_04_01.models.InnerError + :param code: The error code. + :type code: str + :param target: The target of the particular error. + :type target: str + :param message: The error message. + :type message: str + """ + + _attribute_map = { + 'details': {'key': 'details', 'type': '[ApiErrorBase]'}, + 'innererror': {'key': 'innererror', 'type': 'InnerError'}, + 'code': {'key': 'code', 'type': 'str'}, + 'target': {'key': 'target', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ApiError, self).__init__(**kwargs) + self.details = kwargs.get('details', None) + self.innererror = kwargs.get('innererror', None) + self.code = kwargs.get('code', None) + self.target = kwargs.get('target', None) + self.message = kwargs.get('message', None) + + +class ApiErrorBase(Model): + """Api error base. + + :param code: The error code. + :type code: str + :param target: The target of the particular error. + :type target: str + :param message: The error message. + :type message: str + """ + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + 'target': {'key': 'target', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ApiErrorBase, self).__init__(**kwargs) + self.code = kwargs.get('code', None) + self.target = kwargs.get('target', None) + self.message = kwargs.get('message', None) + + +class AutoOSUpgradePolicy(Model): + """The configuration parameters used for performing automatic OS upgrade. + + :param disable_auto_rollback: Whether OS image rollback feature should be + disabled. Default value is false. + :type disable_auto_rollback: bool + """ + + _attribute_map = { + 'disable_auto_rollback': {'key': 'disableAutoRollback', 'type': 'bool'}, + } + + def __init__(self, **kwargs): + super(AutoOSUpgradePolicy, self).__init__(**kwargs) + self.disable_auto_rollback = kwargs.get('disable_auto_rollback', None) + + +class Resource(Model): + """The Resource model definition. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource Id + :vartype id: str + :ivar name: Resource name + :vartype name: str + :ivar type: Resource type + :vartype type: str + :param location: Required. Resource location + :type location: str + :param tags: Resource tags + :type tags: dict[str, str] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__(self, **kwargs): + super(Resource, self).__init__(**kwargs) + self.id = None + self.name = None + self.type = None + self.location = kwargs.get('location', None) + self.tags = kwargs.get('tags', None) + + +class AvailabilitySet(Resource): + """Specifies information about the availability set that the virtual machine + should be assigned to. Virtual machines specified in the same availability + set are allocated to different nodes to maximize availability. For more + information about availability sets, see [Manage the availability of + virtual + machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-manage-availability?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). +

    For more information on Azure planned maintenance, see [Planned + maintenance for virtual machines in + Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-planned-maintenance?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json) +

    Currently, a VM can only be added to availability set at creation + time. An existing VM cannot be added to an availability set. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource Id + :vartype id: str + :ivar name: Resource name + :vartype name: str + :ivar type: Resource type + :vartype type: str + :param location: Required. Resource location + :type location: str + :param tags: Resource tags + :type tags: dict[str, str] + :param platform_update_domain_count: Update Domain count. + :type platform_update_domain_count: int + :param platform_fault_domain_count: Fault Domain count. + :type platform_fault_domain_count: int + :param virtual_machines: A list of references to all virtual machines in + the availability set. + :type virtual_machines: + list[~azure.mgmt.compute.v2018_04_01.models.SubResource] + :param proximity_placement_group: Specifies information about the + proximity placement group that the availability set should be assigned to. +

    Minimum api-version: 2018-04-01. + :type proximity_placement_group: + ~azure.mgmt.compute.v2018_04_01.models.SubResource + :ivar statuses: The resource status information. + :vartype statuses: + list[~azure.mgmt.compute.v2018_04_01.models.InstanceViewStatus] + :param sku: Sku of the availability set + :type sku: ~azure.mgmt.compute.v2018_04_01.models.Sku + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + 'statuses': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'platform_update_domain_count': {'key': 'properties.platformUpdateDomainCount', 'type': 'int'}, + 'platform_fault_domain_count': {'key': 'properties.platformFaultDomainCount', 'type': 'int'}, + 'virtual_machines': {'key': 'properties.virtualMachines', 'type': '[SubResource]'}, + 'proximity_placement_group': {'key': 'properties.proximityPlacementGroup', 'type': 'SubResource'}, + 'statuses': {'key': 'properties.statuses', 'type': '[InstanceViewStatus]'}, + 'sku': {'key': 'sku', 'type': 'Sku'}, + } + + def __init__(self, **kwargs): + super(AvailabilitySet, self).__init__(**kwargs) + self.platform_update_domain_count = kwargs.get('platform_update_domain_count', None) + self.platform_fault_domain_count = kwargs.get('platform_fault_domain_count', None) + self.virtual_machines = kwargs.get('virtual_machines', None) + self.proximity_placement_group = kwargs.get('proximity_placement_group', None) + self.statuses = None + self.sku = kwargs.get('sku', None) + + +class UpdateResource(Model): + """The Update Resource model definition. + + :param tags: Resource tags + :type tags: dict[str, str] + """ + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__(self, **kwargs): + super(UpdateResource, self).__init__(**kwargs) + self.tags = kwargs.get('tags', None) + + +class AvailabilitySetUpdate(UpdateResource): + """Specifies information about the availability set that the virtual machine + should be assigned to. Only tags may be updated. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :param tags: Resource tags + :type tags: dict[str, str] + :param platform_update_domain_count: Update Domain count. + :type platform_update_domain_count: int + :param platform_fault_domain_count: Fault Domain count. + :type platform_fault_domain_count: int + :param virtual_machines: A list of references to all virtual machines in + the availability set. + :type virtual_machines: + list[~azure.mgmt.compute.v2018_04_01.models.SubResource] + :param proximity_placement_group: Specifies information about the + proximity placement group that the availability set should be assigned to. +

    Minimum api-version: 2018-04-01. + :type proximity_placement_group: + ~azure.mgmt.compute.v2018_04_01.models.SubResource + :ivar statuses: The resource status information. + :vartype statuses: + list[~azure.mgmt.compute.v2018_04_01.models.InstanceViewStatus] + :param sku: Sku of the availability set + :type sku: ~azure.mgmt.compute.v2018_04_01.models.Sku + """ + + _validation = { + 'statuses': {'readonly': True}, + } + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + 'platform_update_domain_count': {'key': 'properties.platformUpdateDomainCount', 'type': 'int'}, + 'platform_fault_domain_count': {'key': 'properties.platformFaultDomainCount', 'type': 'int'}, + 'virtual_machines': {'key': 'properties.virtualMachines', 'type': '[SubResource]'}, + 'proximity_placement_group': {'key': 'properties.proximityPlacementGroup', 'type': 'SubResource'}, + 'statuses': {'key': 'properties.statuses', 'type': '[InstanceViewStatus]'}, + 'sku': {'key': 'sku', 'type': 'Sku'}, + } + + def __init__(self, **kwargs): + super(AvailabilitySetUpdate, self).__init__(**kwargs) + self.platform_update_domain_count = kwargs.get('platform_update_domain_count', None) + self.platform_fault_domain_count = kwargs.get('platform_fault_domain_count', None) + self.virtual_machines = kwargs.get('virtual_machines', None) + self.proximity_placement_group = kwargs.get('proximity_placement_group', None) + self.statuses = None + self.sku = kwargs.get('sku', None) + + +class BootDiagnostics(Model): + """Boot Diagnostics is a debugging feature which allows you to view Console + Output and Screenshot to diagnose VM status.

    You can easily view + the output of your console log.

    Azure also enables you to see a + screenshot of the VM from the hypervisor. + + :param enabled: Whether boot diagnostics should be enabled on the Virtual + Machine. + :type enabled: bool + :param storage_uri: Uri of the storage account to use for placing the + console output and screenshot. + :type storage_uri: str + """ + + _attribute_map = { + 'enabled': {'key': 'enabled', 'type': 'bool'}, + 'storage_uri': {'key': 'storageUri', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(BootDiagnostics, self).__init__(**kwargs) + self.enabled = kwargs.get('enabled', None) + self.storage_uri = kwargs.get('storage_uri', None) + + +class BootDiagnosticsInstanceView(Model): + """The instance view of a virtual machine boot diagnostics. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar console_screenshot_blob_uri: The console screenshot blob URI. + :vartype console_screenshot_blob_uri: str + :ivar serial_console_log_blob_uri: The Linux serial console log blob Uri. + :vartype serial_console_log_blob_uri: str + :ivar status: The boot diagnostics status information for the VM.

    + NOTE: It will be set only if there are errors encountered in enabling boot + diagnostics. + :vartype status: ~azure.mgmt.compute.v2018_04_01.models.InstanceViewStatus + """ + + _validation = { + 'console_screenshot_blob_uri': {'readonly': True}, + 'serial_console_log_blob_uri': {'readonly': True}, + 'status': {'readonly': True}, + } + + _attribute_map = { + 'console_screenshot_blob_uri': {'key': 'consoleScreenshotBlobUri', 'type': 'str'}, + 'serial_console_log_blob_uri': {'key': 'serialConsoleLogBlobUri', 'type': 'str'}, + 'status': {'key': 'status', 'type': 'InstanceViewStatus'}, + } + + def __init__(self, **kwargs): + super(BootDiagnosticsInstanceView, self).__init__(**kwargs) + self.console_screenshot_blob_uri = None + self.serial_console_log_blob_uri = None + self.status = None + + +class CloudError(Model): + """CloudError. + """ + + _attribute_map = { + } + + +class ComputeOperationValue(Model): + """Describes the properties of a Compute Operation value. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar origin: The origin of the compute operation. + :vartype origin: str + :ivar name: The name of the compute operation. + :vartype name: str + :ivar operation: The display name of the compute operation. + :vartype operation: str + :ivar resource: The display name of the resource the operation applies to. + :vartype resource: str + :ivar description: The description of the operation. + :vartype description: str + :ivar provider: The resource provider for the operation. + :vartype provider: str + """ + + _validation = { + 'origin': {'readonly': True}, + 'name': {'readonly': True}, + 'operation': {'readonly': True}, + 'resource': {'readonly': True}, + 'description': {'readonly': True}, + 'provider': {'readonly': True}, + } + + _attribute_map = { + 'origin': {'key': 'origin', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'operation': {'key': 'display.operation', 'type': 'str'}, + 'resource': {'key': 'display.resource', 'type': 'str'}, + 'description': {'key': 'display.description', 'type': 'str'}, + 'provider': {'key': 'display.provider', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ComputeOperationValue, self).__init__(**kwargs) + self.origin = None + self.name = None + self.operation = None + self.resource = None + self.description = None + self.provider = None + + +class CreationData(Model): + """Data used when creating a disk. + + All required parameters must be populated in order to send to Azure. + + :param create_option: Required. This enumerates the possible sources of a + disk's creation. Possible values include: 'Empty', 'Attach', 'FromImage', + 'Import', 'Copy', 'Restore' + :type create_option: str or + ~azure.mgmt.compute.v2018_04_01.models.DiskCreateOption + :param storage_account_id: If createOption is Import, the Azure Resource + Manager identifier of the storage account containing the blob to import as + a disk. Required only if the blob is in a different subscription + :type storage_account_id: str + :param image_reference: Disk source information. + :type image_reference: + ~azure.mgmt.compute.v2018_04_01.models.ImageDiskReference + :param source_uri: If createOption is Import, this is the URI of a blob to + be imported into a managed disk. + :type source_uri: str + :param source_resource_id: If createOption is Copy, this is the ARM id of + the source snapshot or disk. + :type source_resource_id: str + """ + + _validation = { + 'create_option': {'required': True}, + } + + _attribute_map = { + 'create_option': {'key': 'createOption', 'type': 'str'}, + 'storage_account_id': {'key': 'storageAccountId', 'type': 'str'}, + 'image_reference': {'key': 'imageReference', 'type': 'ImageDiskReference'}, + 'source_uri': {'key': 'sourceUri', 'type': 'str'}, + 'source_resource_id': {'key': 'sourceResourceId', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(CreationData, self).__init__(**kwargs) + self.create_option = kwargs.get('create_option', None) + self.storage_account_id = kwargs.get('storage_account_id', None) + self.image_reference = kwargs.get('image_reference', None) + self.source_uri = kwargs.get('source_uri', None) + self.source_resource_id = kwargs.get('source_resource_id', None) + + +class DataDisk(Model): + """Describes a data disk. + + All required parameters must be populated in order to send to Azure. + + :param lun: Required. Specifies the logical unit number of the data disk. + This value is used to identify data disks within the VM and therefore must + be unique for each data disk attached to a VM. + :type lun: int + :param name: The disk name. + :type name: str + :param vhd: The virtual hard disk. + :type vhd: ~azure.mgmt.compute.v2018_04_01.models.VirtualHardDisk + :param image: The source user image virtual hard disk. The virtual hard + disk will be copied before being attached to the virtual machine. If + SourceImage is provided, the destination virtual hard drive must not + exist. + :type image: ~azure.mgmt.compute.v2018_04_01.models.VirtualHardDisk + :param caching: Specifies the caching requirements.

    Possible + values are:

    **None**

    **ReadOnly**

    **ReadWrite** +

    Default: **None for Standard storage. ReadOnly for Premium + storage**. Possible values include: 'None', 'ReadOnly', 'ReadWrite' + :type caching: str or ~azure.mgmt.compute.v2018_04_01.models.CachingTypes + :param write_accelerator_enabled: Specifies whether writeAccelerator + should be enabled or disabled on the disk. + :type write_accelerator_enabled: bool + :param create_option: Required. Specifies how the virtual machine should + be created.

    Possible values are:

    **Attach** \\u2013 This + value is used when you are using a specialized disk to create the virtual + machine.

    **FromImage** \\u2013 This value is used when you are + using an image to create the virtual machine. If you are using a platform + image, you also use the imageReference element described above. If you are + using a marketplace image, you also use the plan element previously + described. Possible values include: 'FromImage', 'Empty', 'Attach' + :type create_option: str or + ~azure.mgmt.compute.v2018_04_01.models.DiskCreateOptionTypes + :param disk_size_gb: Specifies the size of an empty data disk in + gigabytes. This element can be used to overwrite the size of the disk in a + virtual machine image.

    This value cannot be larger than 1023 GB + :type disk_size_gb: int + :param managed_disk: The managed disk parameters. + :type managed_disk: + ~azure.mgmt.compute.v2018_04_01.models.ManagedDiskParameters + """ + + _validation = { + 'lun': {'required': True}, + 'create_option': {'required': True}, + } + + _attribute_map = { + 'lun': {'key': 'lun', 'type': 'int'}, + 'name': {'key': 'name', 'type': 'str'}, + 'vhd': {'key': 'vhd', 'type': 'VirtualHardDisk'}, + 'image': {'key': 'image', 'type': 'VirtualHardDisk'}, + 'caching': {'key': 'caching', 'type': 'CachingTypes'}, + 'write_accelerator_enabled': {'key': 'writeAcceleratorEnabled', 'type': 'bool'}, + 'create_option': {'key': 'createOption', 'type': 'str'}, + 'disk_size_gb': {'key': 'diskSizeGB', 'type': 'int'}, + 'managed_disk': {'key': 'managedDisk', 'type': 'ManagedDiskParameters'}, + } + + def __init__(self, **kwargs): + super(DataDisk, self).__init__(**kwargs) + self.lun = kwargs.get('lun', None) + self.name = kwargs.get('name', None) + self.vhd = kwargs.get('vhd', None) + self.image = kwargs.get('image', None) + self.caching = kwargs.get('caching', None) + self.write_accelerator_enabled = kwargs.get('write_accelerator_enabled', None) + self.create_option = kwargs.get('create_option', None) + self.disk_size_gb = kwargs.get('disk_size_gb', None) + self.managed_disk = kwargs.get('managed_disk', None) + + +class DataDiskImage(Model): + """Contains the data disk images information. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar lun: Specifies the logical unit number of the data disk. This value + is used to identify data disks within the VM and therefore must be unique + for each data disk attached to a VM. + :vartype lun: int + """ + + _validation = { + 'lun': {'readonly': True}, + } + + _attribute_map = { + 'lun': {'key': 'lun', 'type': 'int'}, + } + + def __init__(self, **kwargs): + super(DataDiskImage, self).__init__(**kwargs) + self.lun = None + + +class DiagnosticsProfile(Model): + """Specifies the boot diagnostic settings state.

    Minimum api-version: + 2015-06-15. + + :param boot_diagnostics: Boot Diagnostics is a debugging feature which + allows you to view Console Output and Screenshot to diagnose VM status. +

    You can easily view the output of your console log.

    + Azure also enables you to see a screenshot of the VM from the hypervisor. + :type boot_diagnostics: + ~azure.mgmt.compute.v2018_04_01.models.BootDiagnostics + """ + + _attribute_map = { + 'boot_diagnostics': {'key': 'bootDiagnostics', 'type': 'BootDiagnostics'}, + } + + def __init__(self, **kwargs): + super(DiagnosticsProfile, self).__init__(**kwargs) + self.boot_diagnostics = kwargs.get('boot_diagnostics', None) + + +class Disk(Resource): + """Disk resource. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource Id + :vartype id: str + :ivar name: Resource name + :vartype name: str + :ivar type: Resource type + :vartype type: str + :param location: Required. Resource location + :type location: str + :param tags: Resource tags + :type tags: dict[str, str] + :ivar managed_by: A relative URI containing the ID of the VM that has the + disk attached. + :vartype managed_by: str + :param sku: + :type sku: ~azure.mgmt.compute.v2018_04_01.models.DiskSku + :param zones: The Logical zone list for Disk. + :type zones: list[str] + :ivar time_created: The time when the disk was created. + :vartype time_created: datetime + :param os_type: The Operating System type. Possible values include: + 'Windows', 'Linux' + :type os_type: str or + ~azure.mgmt.compute.v2018_04_01.models.OperatingSystemTypes + :param creation_data: Required. Disk source information. CreationData + information cannot be changed after the disk has been created. + :type creation_data: ~azure.mgmt.compute.v2018_04_01.models.CreationData + :param disk_size_gb: If creationData.createOption is Empty, this field is + mandatory and it indicates the size of the VHD to create. If this field is + present for updates or creation with other options, it indicates a resize. + Resizes are only allowed if the disk is not attached to a running VM, and + can only increase the disk's size. + :type disk_size_gb: int + :param encryption_settings: Encryption settings for disk or snapshot + :type encryption_settings: + ~azure.mgmt.compute.v2018_04_01.models.EncryptionSettings + :ivar provisioning_state: The disk provisioning state. + :vartype provisioning_state: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + 'managed_by': {'readonly': True}, + 'time_created': {'readonly': True}, + 'creation_data': {'required': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'managed_by': {'key': 'managedBy', 'type': 'str'}, + 'sku': {'key': 'sku', 'type': 'DiskSku'}, + 'zones': {'key': 'zones', 'type': '[str]'}, + 'time_created': {'key': 'properties.timeCreated', 'type': 'iso-8601'}, + 'os_type': {'key': 'properties.osType', 'type': 'OperatingSystemTypes'}, + 'creation_data': {'key': 'properties.creationData', 'type': 'CreationData'}, + 'disk_size_gb': {'key': 'properties.diskSizeGB', 'type': 'int'}, + 'encryption_settings': {'key': 'properties.encryptionSettings', 'type': 'EncryptionSettings'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(Disk, self).__init__(**kwargs) + self.managed_by = None + self.sku = kwargs.get('sku', None) + self.zones = kwargs.get('zones', None) + self.time_created = None + self.os_type = kwargs.get('os_type', None) + self.creation_data = kwargs.get('creation_data', None) + self.disk_size_gb = kwargs.get('disk_size_gb', None) + self.encryption_settings = kwargs.get('encryption_settings', None) + self.provisioning_state = None + + +class DiskEncryptionSettings(Model): + """Describes a Encryption Settings for a Disk. + + :param disk_encryption_key: Specifies the location of the disk encryption + key, which is a Key Vault Secret. + :type disk_encryption_key: + ~azure.mgmt.compute.v2018_04_01.models.KeyVaultSecretReference + :param key_encryption_key: Specifies the location of the key encryption + key in Key Vault. + :type key_encryption_key: + ~azure.mgmt.compute.v2018_04_01.models.KeyVaultKeyReference + :param enabled: Specifies whether disk encryption should be enabled on the + virtual machine. + :type enabled: bool + """ + + _attribute_map = { + 'disk_encryption_key': {'key': 'diskEncryptionKey', 'type': 'KeyVaultSecretReference'}, + 'key_encryption_key': {'key': 'keyEncryptionKey', 'type': 'KeyVaultKeyReference'}, + 'enabled': {'key': 'enabled', 'type': 'bool'}, + } + + def __init__(self, **kwargs): + super(DiskEncryptionSettings, self).__init__(**kwargs) + self.disk_encryption_key = kwargs.get('disk_encryption_key', None) + self.key_encryption_key = kwargs.get('key_encryption_key', None) + self.enabled = kwargs.get('enabled', None) + + +class DiskInstanceView(Model): + """The instance view of the disk. + + :param name: The disk name. + :type name: str + :param encryption_settings: Specifies the encryption settings for the OS + Disk.

    Minimum api-version: 2015-06-15 + :type encryption_settings: + list[~azure.mgmt.compute.v2018_04_01.models.DiskEncryptionSettings] + :param statuses: The resource status information. + :type statuses: + list[~azure.mgmt.compute.v2018_04_01.models.InstanceViewStatus] + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'encryption_settings': {'key': 'encryptionSettings', 'type': '[DiskEncryptionSettings]'}, + 'statuses': {'key': 'statuses', 'type': '[InstanceViewStatus]'}, + } + + def __init__(self, **kwargs): + super(DiskInstanceView, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.encryption_settings = kwargs.get('encryption_settings', None) + self.statuses = kwargs.get('statuses', None) + + +class DiskSku(Model): + """The disks sku name. Can be Standard_LRS, Premium_LRS, or StandardSSD_LRS. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :param name: The sku name. Possible values include: 'Standard_LRS', + 'Premium_LRS', 'StandardSSD_LRS' + :type name: str or + ~azure.mgmt.compute.v2018_04_01.models.StorageAccountTypes + :ivar tier: The sku tier. Default value: "Standard" . + :vartype tier: str + """ + + _validation = { + 'tier': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'tier': {'key': 'tier', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(DiskSku, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.tier = None + + +class DiskUpdate(Model): + """Disk update resource. + + :param os_type: the Operating System type. Possible values include: + 'Windows', 'Linux' + :type os_type: str or + ~azure.mgmt.compute.v2018_04_01.models.OperatingSystemTypes + :param disk_size_gb: If creationData.createOption is Empty, this field is + mandatory and it indicates the size of the VHD to create. If this field is + present for updates or creation with other options, it indicates a resize. + Resizes are only allowed if the disk is not attached to a running VM, and + can only increase the disk's size. + :type disk_size_gb: int + :param encryption_settings: Encryption settings for disk or snapshot + :type encryption_settings: + ~azure.mgmt.compute.v2018_04_01.models.EncryptionSettings + :param tags: Resource tags + :type tags: dict[str, str] + :param sku: + :type sku: ~azure.mgmt.compute.v2018_04_01.models.DiskSku + """ + + _attribute_map = { + 'os_type': {'key': 'properties.osType', 'type': 'OperatingSystemTypes'}, + 'disk_size_gb': {'key': 'properties.diskSizeGB', 'type': 'int'}, + 'encryption_settings': {'key': 'properties.encryptionSettings', 'type': 'EncryptionSettings'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'sku': {'key': 'sku', 'type': 'DiskSku'}, + } + + def __init__(self, **kwargs): + super(DiskUpdate, self).__init__(**kwargs) + self.os_type = kwargs.get('os_type', None) + self.disk_size_gb = kwargs.get('disk_size_gb', None) + self.encryption_settings = kwargs.get('encryption_settings', None) + self.tags = kwargs.get('tags', None) + self.sku = kwargs.get('sku', None) + + +class EncryptionSettings(Model): + """Encryption settings for disk or snapshot. + + :param enabled: Set this flag to true and provide DiskEncryptionKey and + optional KeyEncryptionKey to enable encryption. Set this flag to false and + remove DiskEncryptionKey and KeyEncryptionKey to disable encryption. If + EncryptionSettings is null in the request object, the existing settings + remain unchanged. + :type enabled: bool + :param disk_encryption_key: Key Vault Secret Url and vault id of the disk + encryption key + :type disk_encryption_key: + ~azure.mgmt.compute.v2018_04_01.models.KeyVaultAndSecretReference + :param key_encryption_key: Key Vault Key Url and vault id of the key + encryption key + :type key_encryption_key: + ~azure.mgmt.compute.v2018_04_01.models.KeyVaultAndKeyReference + """ + + _attribute_map = { + 'enabled': {'key': 'enabled', 'type': 'bool'}, + 'disk_encryption_key': {'key': 'diskEncryptionKey', 'type': 'KeyVaultAndSecretReference'}, + 'key_encryption_key': {'key': 'keyEncryptionKey', 'type': 'KeyVaultAndKeyReference'}, + } + + def __init__(self, **kwargs): + super(EncryptionSettings, self).__init__(**kwargs) + self.enabled = kwargs.get('enabled', None) + self.disk_encryption_key = kwargs.get('disk_encryption_key', None) + self.key_encryption_key = kwargs.get('key_encryption_key', None) + + +class GrantAccessData(Model): + """Data used for requesting a SAS. + + All required parameters must be populated in order to send to Azure. + + :param access: Required. Possible values include: 'None', 'Read' + :type access: str or ~azure.mgmt.compute.v2018_04_01.models.AccessLevel + :param duration_in_seconds: Required. Time duration in seconds until the + SAS access expires. + :type duration_in_seconds: int + """ + + _validation = { + 'access': {'required': True}, + 'duration_in_seconds': {'required': True}, + } + + _attribute_map = { + 'access': {'key': 'access', 'type': 'str'}, + 'duration_in_seconds': {'key': 'durationInSeconds', 'type': 'int'}, + } + + def __init__(self, **kwargs): + super(GrantAccessData, self).__init__(**kwargs) + self.access = kwargs.get('access', None) + self.duration_in_seconds = kwargs.get('duration_in_seconds', None) + + +class HardwareProfile(Model): + """Specifies the hardware settings for the virtual machine. + + :param vm_size: Specifies the size of the virtual machine. For more + information about virtual machine sizes, see [Sizes for virtual + machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-sizes?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). +

    The available VM sizes depend on region and availability set. For + a list of available sizes use these APIs:

    [List all available + virtual machine sizes in an availability + set](https://docs.microsoft.com/rest/api/compute/availabilitysets/listavailablesizes) +

    [List all available virtual machine sizes in a + region](https://docs.microsoft.com/rest/api/compute/virtualmachinesizes/list) +

    [List all available virtual machine sizes for + resizing](https://docs.microsoft.com/rest/api/compute/virtualmachines/listavailablesizes). + Possible values include: 'Basic_A0', 'Basic_A1', 'Basic_A2', 'Basic_A3', + 'Basic_A4', 'Standard_A0', 'Standard_A1', 'Standard_A2', 'Standard_A3', + 'Standard_A4', 'Standard_A5', 'Standard_A6', 'Standard_A7', 'Standard_A8', + 'Standard_A9', 'Standard_A10', 'Standard_A11', 'Standard_A1_v2', + 'Standard_A2_v2', 'Standard_A4_v2', 'Standard_A8_v2', 'Standard_A2m_v2', + 'Standard_A4m_v2', 'Standard_A8m_v2', 'Standard_B1s', 'Standard_B1ms', + 'Standard_B2s', 'Standard_B2ms', 'Standard_B4ms', 'Standard_B8ms', + 'Standard_D1', 'Standard_D2', 'Standard_D3', 'Standard_D4', + 'Standard_D11', 'Standard_D12', 'Standard_D13', 'Standard_D14', + 'Standard_D1_v2', 'Standard_D2_v2', 'Standard_D3_v2', 'Standard_D4_v2', + 'Standard_D5_v2', 'Standard_D2_v3', 'Standard_D4_v3', 'Standard_D8_v3', + 'Standard_D16_v3', 'Standard_D32_v3', 'Standard_D64_v3', + 'Standard_D2s_v3', 'Standard_D4s_v3', 'Standard_D8s_v3', + 'Standard_D16s_v3', 'Standard_D32s_v3', 'Standard_D64s_v3', + 'Standard_D11_v2', 'Standard_D12_v2', 'Standard_D13_v2', + 'Standard_D14_v2', 'Standard_D15_v2', 'Standard_DS1', 'Standard_DS2', + 'Standard_DS3', 'Standard_DS4', 'Standard_DS11', 'Standard_DS12', + 'Standard_DS13', 'Standard_DS14', 'Standard_DS1_v2', 'Standard_DS2_v2', + 'Standard_DS3_v2', 'Standard_DS4_v2', 'Standard_DS5_v2', + 'Standard_DS11_v2', 'Standard_DS12_v2', 'Standard_DS13_v2', + 'Standard_DS14_v2', 'Standard_DS15_v2', 'Standard_DS13-4_v2', + 'Standard_DS13-2_v2', 'Standard_DS14-8_v2', 'Standard_DS14-4_v2', + 'Standard_E2_v3', 'Standard_E4_v3', 'Standard_E8_v3', 'Standard_E16_v3', + 'Standard_E32_v3', 'Standard_E64_v3', 'Standard_E2s_v3', + 'Standard_E4s_v3', 'Standard_E8s_v3', 'Standard_E16s_v3', + 'Standard_E32s_v3', 'Standard_E64s_v3', 'Standard_E32-16_v3', + 'Standard_E32-8s_v3', 'Standard_E64-32s_v3', 'Standard_E64-16s_v3', + 'Standard_F1', 'Standard_F2', 'Standard_F4', 'Standard_F8', + 'Standard_F16', 'Standard_F1s', 'Standard_F2s', 'Standard_F4s', + 'Standard_F8s', 'Standard_F16s', 'Standard_F2s_v2', 'Standard_F4s_v2', + 'Standard_F8s_v2', 'Standard_F16s_v2', 'Standard_F32s_v2', + 'Standard_F64s_v2', 'Standard_F72s_v2', 'Standard_G1', 'Standard_G2', + 'Standard_G3', 'Standard_G4', 'Standard_G5', 'Standard_GS1', + 'Standard_GS2', 'Standard_GS3', 'Standard_GS4', 'Standard_GS5', + 'Standard_GS4-8', 'Standard_GS4-4', 'Standard_GS5-16', 'Standard_GS5-8', + 'Standard_H8', 'Standard_H16', 'Standard_H8m', 'Standard_H16m', + 'Standard_H16r', 'Standard_H16mr', 'Standard_L4s', 'Standard_L8s', + 'Standard_L16s', 'Standard_L32s', 'Standard_M64s', 'Standard_M64ms', + 'Standard_M128s', 'Standard_M128ms', 'Standard_M64-32ms', + 'Standard_M64-16ms', 'Standard_M128-64ms', 'Standard_M128-32ms', + 'Standard_NC6', 'Standard_NC12', 'Standard_NC24', 'Standard_NC24r', + 'Standard_NC6s_v2', 'Standard_NC12s_v2', 'Standard_NC24s_v2', + 'Standard_NC24rs_v2', 'Standard_NC6s_v3', 'Standard_NC12s_v3', + 'Standard_NC24s_v3', 'Standard_NC24rs_v3', 'Standard_ND6s', + 'Standard_ND12s', 'Standard_ND24s', 'Standard_ND24rs', 'Standard_NV6', + 'Standard_NV12', 'Standard_NV24' + :type vm_size: str or + ~azure.mgmt.compute.v2018_04_01.models.VirtualMachineSizeTypes + """ + + _attribute_map = { + 'vm_size': {'key': 'vmSize', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(HardwareProfile, self).__init__(**kwargs) + self.vm_size = kwargs.get('vm_size', None) + + +class Image(Resource): + """The source user image virtual hard disk. The virtual hard disk will be + copied before being attached to the virtual machine. If SourceImage is + provided, the destination virtual hard drive must not exist. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource Id + :vartype id: str + :ivar name: Resource name + :vartype name: str + :ivar type: Resource type + :vartype type: str + :param location: Required. Resource location + :type location: str + :param tags: Resource tags + :type tags: dict[str, str] + :param source_virtual_machine: The source virtual machine from which Image + is created. + :type source_virtual_machine: + ~azure.mgmt.compute.v2018_04_01.models.SubResource + :param storage_profile: Specifies the storage settings for the virtual + machine disks. + :type storage_profile: + ~azure.mgmt.compute.v2018_04_01.models.ImageStorageProfile + :ivar provisioning_state: The provisioning state. + :vartype provisioning_state: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'source_virtual_machine': {'key': 'properties.sourceVirtualMachine', 'type': 'SubResource'}, + 'storage_profile': {'key': 'properties.storageProfile', 'type': 'ImageStorageProfile'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(Image, self).__init__(**kwargs) + self.source_virtual_machine = kwargs.get('source_virtual_machine', None) + self.storage_profile = kwargs.get('storage_profile', None) + self.provisioning_state = None + + +class ImageDataDisk(Model): + """Describes a data disk. + + All required parameters must be populated in order to send to Azure. + + :param lun: Required. Specifies the logical unit number of the data disk. + This value is used to identify data disks within the VM and therefore must + be unique for each data disk attached to a VM. + :type lun: int + :param snapshot: The snapshot. + :type snapshot: ~azure.mgmt.compute.v2018_04_01.models.SubResource + :param managed_disk: The managedDisk. + :type managed_disk: ~azure.mgmt.compute.v2018_04_01.models.SubResource + :param blob_uri: The Virtual Hard Disk. + :type blob_uri: str + :param caching: Specifies the caching requirements.

    Possible + values are:

    **None**

    **ReadOnly**

    **ReadWrite** +

    Default: **None for Standard storage. ReadOnly for Premium + storage**. Possible values include: 'None', 'ReadOnly', 'ReadWrite' + :type caching: str or ~azure.mgmt.compute.v2018_04_01.models.CachingTypes + :param disk_size_gb: Specifies the size of empty data disks in gigabytes. + This element can be used to overwrite the name of the disk in a virtual + machine image.

    This value cannot be larger than 1023 GB + :type disk_size_gb: int + :param storage_account_type: Specifies the storage account type for the + managed disk. Possible values are: Standard_LRS, Premium_LRS, and + StandardSSD_LRS. Possible values include: 'Standard_LRS', 'Premium_LRS', + 'StandardSSD_LRS' + :type storage_account_type: str or + ~azure.mgmt.compute.v2018_04_01.models.StorageAccountTypes + """ + + _validation = { + 'lun': {'required': True}, + } + + _attribute_map = { + 'lun': {'key': 'lun', 'type': 'int'}, + 'snapshot': {'key': 'snapshot', 'type': 'SubResource'}, + 'managed_disk': {'key': 'managedDisk', 'type': 'SubResource'}, + 'blob_uri': {'key': 'blobUri', 'type': 'str'}, + 'caching': {'key': 'caching', 'type': 'CachingTypes'}, + 'disk_size_gb': {'key': 'diskSizeGB', 'type': 'int'}, + 'storage_account_type': {'key': 'storageAccountType', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ImageDataDisk, self).__init__(**kwargs) + self.lun = kwargs.get('lun', None) + self.snapshot = kwargs.get('snapshot', None) + self.managed_disk = kwargs.get('managed_disk', None) + self.blob_uri = kwargs.get('blob_uri', None) + self.caching = kwargs.get('caching', None) + self.disk_size_gb = kwargs.get('disk_size_gb', None) + self.storage_account_type = kwargs.get('storage_account_type', None) + + +class ImageDiskReference(Model): + """The source image used for creating the disk. + + All required parameters must be populated in order to send to Azure. + + :param id: Required. A relative uri containing either a Platform Image + Repository or user image reference. + :type id: str + :param lun: If the disk is created from an image's data disk, this is an + index that indicates which of the data disks in the image to use. For OS + disks, this field is null. + :type lun: int + """ + + _validation = { + 'id': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'lun': {'key': 'lun', 'type': 'int'}, + } + + def __init__(self, **kwargs): + super(ImageDiskReference, self).__init__(**kwargs) + self.id = kwargs.get('id', None) + self.lun = kwargs.get('lun', None) + + +class ImageOSDisk(Model): + """Describes an Operating System disk. + + All required parameters must be populated in order to send to Azure. + + :param os_type: Required. This property allows you to specify the type of + the OS that is included in the disk if creating a VM from a custom image. +

    Possible values are:

    **Windows**

    **Linux**. + Possible values include: 'Windows', 'Linux' + :type os_type: str or + ~azure.mgmt.compute.v2018_04_01.models.OperatingSystemTypes + :param os_state: Required. The OS State. Possible values include: + 'Generalized', 'Specialized' + :type os_state: str or + ~azure.mgmt.compute.v2018_04_01.models.OperatingSystemStateTypes + :param snapshot: The snapshot. + :type snapshot: ~azure.mgmt.compute.v2018_04_01.models.SubResource + :param managed_disk: The managedDisk. + :type managed_disk: ~azure.mgmt.compute.v2018_04_01.models.SubResource + :param blob_uri: The Virtual Hard Disk. + :type blob_uri: str + :param caching: Specifies the caching requirements.

    Possible + values are:

    **None**

    **ReadOnly**

    **ReadWrite** +

    Default: **None for Standard storage. ReadOnly for Premium + storage**. Possible values include: 'None', 'ReadOnly', 'ReadWrite' + :type caching: str or ~azure.mgmt.compute.v2018_04_01.models.CachingTypes + :param disk_size_gb: Specifies the size of empty data disks in gigabytes. + This element can be used to overwrite the name of the disk in a virtual + machine image.

    This value cannot be larger than 1023 GB + :type disk_size_gb: int + :param storage_account_type: Specifies the storage account type for the + managed disk. Possible values are: Standard_LRS, Premium_LRS, and + StandardSSD_LRS. Possible values include: 'Standard_LRS', 'Premium_LRS', + 'StandardSSD_LRS' + :type storage_account_type: str or + ~azure.mgmt.compute.v2018_04_01.models.StorageAccountTypes + """ + + _validation = { + 'os_type': {'required': True}, + 'os_state': {'required': True}, + } + + _attribute_map = { + 'os_type': {'key': 'osType', 'type': 'OperatingSystemTypes'}, + 'os_state': {'key': 'osState', 'type': 'OperatingSystemStateTypes'}, + 'snapshot': {'key': 'snapshot', 'type': 'SubResource'}, + 'managed_disk': {'key': 'managedDisk', 'type': 'SubResource'}, + 'blob_uri': {'key': 'blobUri', 'type': 'str'}, + 'caching': {'key': 'caching', 'type': 'CachingTypes'}, + 'disk_size_gb': {'key': 'diskSizeGB', 'type': 'int'}, + 'storage_account_type': {'key': 'storageAccountType', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ImageOSDisk, self).__init__(**kwargs) + self.os_type = kwargs.get('os_type', None) + self.os_state = kwargs.get('os_state', None) + self.snapshot = kwargs.get('snapshot', None) + self.managed_disk = kwargs.get('managed_disk', None) + self.blob_uri = kwargs.get('blob_uri', None) + self.caching = kwargs.get('caching', None) + self.disk_size_gb = kwargs.get('disk_size_gb', None) + self.storage_account_type = kwargs.get('storage_account_type', None) + + +class SubResource(Model): + """SubResource. + + :param id: Resource Id + :type id: str + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(SubResource, self).__init__(**kwargs) + self.id = kwargs.get('id', None) + + +class ImageReference(SubResource): + """Specifies information about the image to use. You can specify information + about platform images, marketplace images, or virtual machine images. This + element is required when you want to use a platform image, marketplace + image, or virtual machine image, but is not used in other creation + operations. + + :param id: Resource Id + :type id: str + :param publisher: The image publisher. + :type publisher: str + :param offer: Specifies the offer of the platform image or marketplace + image used to create the virtual machine. + :type offer: str + :param sku: The image SKU. + :type sku: str + :param version: Specifies the version of the platform image or marketplace + image used to create the virtual machine. The allowed formats are + Major.Minor.Build or 'latest'. Major, Minor, and Build are decimal + numbers. Specify 'latest' to use the latest version of an image available + at deploy time. Even if you use 'latest', the VM image will not + automatically update after deploy time even if a new version becomes + available. + :type version: str + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'publisher': {'key': 'publisher', 'type': 'str'}, + 'offer': {'key': 'offer', 'type': 'str'}, + 'sku': {'key': 'sku', 'type': 'str'}, + 'version': {'key': 'version', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ImageReference, self).__init__(**kwargs) + self.publisher = kwargs.get('publisher', None) + self.offer = kwargs.get('offer', None) + self.sku = kwargs.get('sku', None) + self.version = kwargs.get('version', None) + + +class ImageStorageProfile(Model): + """Describes a storage profile. + + :param os_disk: Specifies information about the operating system disk used + by the virtual machine.

    For more information about disks, see + [About disks and VHDs for Azure virtual + machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-about-disks-vhds?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). + :type os_disk: ~azure.mgmt.compute.v2018_04_01.models.ImageOSDisk + :param data_disks: Specifies the parameters that are used to add a data + disk to a virtual machine.

    For more information about disks, see + [About disks and VHDs for Azure virtual + machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-about-disks-vhds?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). + :type data_disks: + list[~azure.mgmt.compute.v2018_04_01.models.ImageDataDisk] + :param zone_resilient: Specifies whether an image is zone resilient or + not. Default is false. Zone resilient images can be created only in + regions that provide Zone Redundant Storage (ZRS). + :type zone_resilient: bool + """ + + _attribute_map = { + 'os_disk': {'key': 'osDisk', 'type': 'ImageOSDisk'}, + 'data_disks': {'key': 'dataDisks', 'type': '[ImageDataDisk]'}, + 'zone_resilient': {'key': 'zoneResilient', 'type': 'bool'}, + } + + def __init__(self, **kwargs): + super(ImageStorageProfile, self).__init__(**kwargs) + self.os_disk = kwargs.get('os_disk', None) + self.data_disks = kwargs.get('data_disks', None) + self.zone_resilient = kwargs.get('zone_resilient', None) + + +class ImageUpdate(UpdateResource): + """The source user image virtual hard disk. Only tags may be updated. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :param tags: Resource tags + :type tags: dict[str, str] + :param source_virtual_machine: The source virtual machine from which Image + is created. + :type source_virtual_machine: + ~azure.mgmt.compute.v2018_04_01.models.SubResource + :param storage_profile: Specifies the storage settings for the virtual + machine disks. + :type storage_profile: + ~azure.mgmt.compute.v2018_04_01.models.ImageStorageProfile + :ivar provisioning_state: The provisioning state. + :vartype provisioning_state: str + """ + + _validation = { + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + 'source_virtual_machine': {'key': 'properties.sourceVirtualMachine', 'type': 'SubResource'}, + 'storage_profile': {'key': 'properties.storageProfile', 'type': 'ImageStorageProfile'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ImageUpdate, self).__init__(**kwargs) + self.source_virtual_machine = kwargs.get('source_virtual_machine', None) + self.storage_profile = kwargs.get('storage_profile', None) + self.provisioning_state = None + + +class InnerError(Model): + """Inner error details. + + :param exceptiontype: The exception type. + :type exceptiontype: str + :param errordetail: The internal error message or exception dump. + :type errordetail: str + """ + + _attribute_map = { + 'exceptiontype': {'key': 'exceptiontype', 'type': 'str'}, + 'errordetail': {'key': 'errordetail', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(InnerError, self).__init__(**kwargs) + self.exceptiontype = kwargs.get('exceptiontype', None) + self.errordetail = kwargs.get('errordetail', None) + + +class InstanceViewStatus(Model): + """Instance view status. + + :param code: The status code. + :type code: str + :param level: The level code. Possible values include: 'Info', 'Warning', + 'Error' + :type level: str or + ~azure.mgmt.compute.v2018_04_01.models.StatusLevelTypes + :param display_status: The short localizable label for the status. + :type display_status: str + :param message: The detailed status message, including for alerts and + error messages. + :type message: str + :param time: The time of the status. + :type time: datetime + """ + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + 'level': {'key': 'level', 'type': 'StatusLevelTypes'}, + 'display_status': {'key': 'displayStatus', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + 'time': {'key': 'time', 'type': 'iso-8601'}, + } + + def __init__(self, **kwargs): + super(InstanceViewStatus, self).__init__(**kwargs) + self.code = kwargs.get('code', None) + self.level = kwargs.get('level', None) + self.display_status = kwargs.get('display_status', None) + self.message = kwargs.get('message', None) + self.time = kwargs.get('time', None) + + +class KeyVaultAndKeyReference(Model): + """Key Vault Key Url and vault id of KeK, KeK is optional and when provided is + used to unwrap the encryptionKey. + + All required parameters must be populated in order to send to Azure. + + :param source_vault: Required. Resource id of the KeyVault containing the + key or secret + :type source_vault: ~azure.mgmt.compute.v2018_04_01.models.SourceVault + :param key_url: Required. Url pointing to a key or secret in KeyVault + :type key_url: str + """ + + _validation = { + 'source_vault': {'required': True}, + 'key_url': {'required': True}, + } + + _attribute_map = { + 'source_vault': {'key': 'sourceVault', 'type': 'SourceVault'}, + 'key_url': {'key': 'keyUrl', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(KeyVaultAndKeyReference, self).__init__(**kwargs) + self.source_vault = kwargs.get('source_vault', None) + self.key_url = kwargs.get('key_url', None) + + +class KeyVaultAndSecretReference(Model): + """Key Vault Secret Url and vault id of the encryption key . + + All required parameters must be populated in order to send to Azure. + + :param source_vault: Required. Resource id of the KeyVault containing the + key or secret + :type source_vault: ~azure.mgmt.compute.v2018_04_01.models.SourceVault + :param secret_url: Required. Url pointing to a key or secret in KeyVault + :type secret_url: str + """ + + _validation = { + 'source_vault': {'required': True}, + 'secret_url': {'required': True}, + } + + _attribute_map = { + 'source_vault': {'key': 'sourceVault', 'type': 'SourceVault'}, + 'secret_url': {'key': 'secretUrl', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(KeyVaultAndSecretReference, self).__init__(**kwargs) + self.source_vault = kwargs.get('source_vault', None) + self.secret_url = kwargs.get('secret_url', None) + + +class KeyVaultKeyReference(Model): + """Describes a reference to Key Vault Key. + + All required parameters must be populated in order to send to Azure. + + :param key_url: Required. The URL referencing a key encryption key in Key + Vault. + :type key_url: str + :param source_vault: Required. The relative URL of the Key Vault + containing the key. + :type source_vault: ~azure.mgmt.compute.v2018_04_01.models.SubResource + """ + + _validation = { + 'key_url': {'required': True}, + 'source_vault': {'required': True}, + } + + _attribute_map = { + 'key_url': {'key': 'keyUrl', 'type': 'str'}, + 'source_vault': {'key': 'sourceVault', 'type': 'SubResource'}, + } + + def __init__(self, **kwargs): + super(KeyVaultKeyReference, self).__init__(**kwargs) + self.key_url = kwargs.get('key_url', None) + self.source_vault = kwargs.get('source_vault', None) + + +class KeyVaultSecretReference(Model): + """Describes a reference to Key Vault Secret. + + All required parameters must be populated in order to send to Azure. + + :param secret_url: Required. The URL referencing a secret in a Key Vault. + :type secret_url: str + :param source_vault: Required. The relative URL of the Key Vault + containing the secret. + :type source_vault: ~azure.mgmt.compute.v2018_04_01.models.SubResource + """ + + _validation = { + 'secret_url': {'required': True}, + 'source_vault': {'required': True}, + } + + _attribute_map = { + 'secret_url': {'key': 'secretUrl', 'type': 'str'}, + 'source_vault': {'key': 'sourceVault', 'type': 'SubResource'}, + } + + def __init__(self, **kwargs): + super(KeyVaultSecretReference, self).__init__(**kwargs) + self.secret_url = kwargs.get('secret_url', None) + self.source_vault = kwargs.get('source_vault', None) + + +class LinuxConfiguration(Model): + """Specifies the Linux operating system settings on the virtual machine. +

    For a list of supported Linux distributions, see [Linux on + Azure-Endorsed + Distributions](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-endorsed-distros?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json) +

    For running non-endorsed distributions, see [Information for + Non-Endorsed + Distributions](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-create-upload-generic?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json). + + :param disable_password_authentication: Specifies whether password + authentication should be disabled. + :type disable_password_authentication: bool + :param ssh: Specifies the ssh key configuration for a Linux OS. + :type ssh: ~azure.mgmt.compute.v2018_04_01.models.SshConfiguration + """ + + _attribute_map = { + 'disable_password_authentication': {'key': 'disablePasswordAuthentication', 'type': 'bool'}, + 'ssh': {'key': 'ssh', 'type': 'SshConfiguration'}, + } + + def __init__(self, **kwargs): + super(LinuxConfiguration, self).__init__(**kwargs) + self.disable_password_authentication = kwargs.get('disable_password_authentication', None) + self.ssh = kwargs.get('ssh', None) + + +class LogAnalyticsInputBase(Model): + """Api input base class for LogAnalytics Api. + + All required parameters must be populated in order to send to Azure. + + :param blob_container_sas_uri: Required. SAS Uri of the logging blob + container to which LogAnalytics Api writes output logs to. + :type blob_container_sas_uri: str + :param from_time: Required. From time of the query + :type from_time: datetime + :param to_time: Required. To time of the query + :type to_time: datetime + :param group_by_throttle_policy: Group query result by Throttle Policy + applied. + :type group_by_throttle_policy: bool + :param group_by_operation_name: Group query result by Operation Name. + :type group_by_operation_name: bool + :param group_by_resource_name: Group query result by Resource Name. + :type group_by_resource_name: bool + """ + + _validation = { + 'blob_container_sas_uri': {'required': True}, + 'from_time': {'required': True}, + 'to_time': {'required': True}, + } + + _attribute_map = { + 'blob_container_sas_uri': {'key': 'blobContainerSasUri', 'type': 'str'}, + 'from_time': {'key': 'fromTime', 'type': 'iso-8601'}, + 'to_time': {'key': 'toTime', 'type': 'iso-8601'}, + 'group_by_throttle_policy': {'key': 'groupByThrottlePolicy', 'type': 'bool'}, + 'group_by_operation_name': {'key': 'groupByOperationName', 'type': 'bool'}, + 'group_by_resource_name': {'key': 'groupByResourceName', 'type': 'bool'}, + } + + def __init__(self, **kwargs): + super(LogAnalyticsInputBase, self).__init__(**kwargs) + self.blob_container_sas_uri = kwargs.get('blob_container_sas_uri', None) + self.from_time = kwargs.get('from_time', None) + self.to_time = kwargs.get('to_time', None) + self.group_by_throttle_policy = kwargs.get('group_by_throttle_policy', None) + self.group_by_operation_name = kwargs.get('group_by_operation_name', None) + self.group_by_resource_name = kwargs.get('group_by_resource_name', None) + + +class LogAnalyticsOperationResult(Model): + """LogAnalytics operation status response. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar properties: LogAnalyticsOutput + :vartype properties: + ~azure.mgmt.compute.v2018_04_01.models.LogAnalyticsOutput + """ + + _validation = { + 'properties': {'readonly': True}, + } + + _attribute_map = { + 'properties': {'key': 'properties', 'type': 'LogAnalyticsOutput'}, + } + + def __init__(self, **kwargs): + super(LogAnalyticsOperationResult, self).__init__(**kwargs) + self.properties = None + + +class LogAnalyticsOutput(Model): + """LogAnalytics output properties. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar output: Output file Uri path to blob container. + :vartype output: str + """ + + _validation = { + 'output': {'readonly': True}, + } + + _attribute_map = { + 'output': {'key': 'output', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(LogAnalyticsOutput, self).__init__(**kwargs) + self.output = None + + +class MaintenanceRedeployStatus(Model): + """Maintenance Operation Status. + + :param is_customer_initiated_maintenance_allowed: True, if customer is + allowed to perform Maintenance. + :type is_customer_initiated_maintenance_allowed: bool + :param pre_maintenance_window_start_time: Start Time for the Pre + Maintenance Window. + :type pre_maintenance_window_start_time: datetime + :param pre_maintenance_window_end_time: End Time for the Pre Maintenance + Window. + :type pre_maintenance_window_end_time: datetime + :param maintenance_window_start_time: Start Time for the Maintenance + Window. + :type maintenance_window_start_time: datetime + :param maintenance_window_end_time: End Time for the Maintenance Window. + :type maintenance_window_end_time: datetime + :param last_operation_result_code: The Last Maintenance Operation Result + Code. Possible values include: 'None', 'RetryLater', 'MaintenanceAborted', + 'MaintenanceCompleted' + :type last_operation_result_code: str or + ~azure.mgmt.compute.v2018_04_01.models.MaintenanceOperationResultCodeTypes + :param last_operation_message: Message returned for the last Maintenance + Operation. + :type last_operation_message: str + """ + + _attribute_map = { + 'is_customer_initiated_maintenance_allowed': {'key': 'isCustomerInitiatedMaintenanceAllowed', 'type': 'bool'}, + 'pre_maintenance_window_start_time': {'key': 'preMaintenanceWindowStartTime', 'type': 'iso-8601'}, + 'pre_maintenance_window_end_time': {'key': 'preMaintenanceWindowEndTime', 'type': 'iso-8601'}, + 'maintenance_window_start_time': {'key': 'maintenanceWindowStartTime', 'type': 'iso-8601'}, + 'maintenance_window_end_time': {'key': 'maintenanceWindowEndTime', 'type': 'iso-8601'}, + 'last_operation_result_code': {'key': 'lastOperationResultCode', 'type': 'MaintenanceOperationResultCodeTypes'}, + 'last_operation_message': {'key': 'lastOperationMessage', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(MaintenanceRedeployStatus, self).__init__(**kwargs) + self.is_customer_initiated_maintenance_allowed = kwargs.get('is_customer_initiated_maintenance_allowed', None) + self.pre_maintenance_window_start_time = kwargs.get('pre_maintenance_window_start_time', None) + self.pre_maintenance_window_end_time = kwargs.get('pre_maintenance_window_end_time', None) + self.maintenance_window_start_time = kwargs.get('maintenance_window_start_time', None) + self.maintenance_window_end_time = kwargs.get('maintenance_window_end_time', None) + self.last_operation_result_code = kwargs.get('last_operation_result_code', None) + self.last_operation_message = kwargs.get('last_operation_message', None) + + +class ManagedDiskParameters(SubResource): + """The parameters of a managed disk. + + :param id: Resource Id + :type id: str + :param storage_account_type: Specifies the storage account type for the + managed disk. Possible values are: Standard_LRS, Premium_LRS, and + StandardSSD_LRS. Possible values include: 'Standard_LRS', 'Premium_LRS', + 'StandardSSD_LRS' + :type storage_account_type: str or + ~azure.mgmt.compute.v2018_04_01.models.StorageAccountTypes + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'storage_account_type': {'key': 'storageAccountType', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ManagedDiskParameters, self).__init__(**kwargs) + self.storage_account_type = kwargs.get('storage_account_type', None) + + +class NetworkInterfaceReference(SubResource): + """Describes a network interface reference. + + :param id: Resource Id + :type id: str + :param primary: Specifies the primary network interface in case the + virtual machine has more than 1 network interface. + :type primary: bool + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'primary': {'key': 'properties.primary', 'type': 'bool'}, + } + + def __init__(self, **kwargs): + super(NetworkInterfaceReference, self).__init__(**kwargs) + self.primary = kwargs.get('primary', None) + + +class NetworkProfile(Model): + """Specifies the network interfaces of the virtual machine. + + :param network_interfaces: Specifies the list of resource Ids for the + network interfaces associated with the virtual machine. + :type network_interfaces: + list[~azure.mgmt.compute.v2018_04_01.models.NetworkInterfaceReference] + """ + + _attribute_map = { + 'network_interfaces': {'key': 'networkInterfaces', 'type': '[NetworkInterfaceReference]'}, + } + + def __init__(self, **kwargs): + super(NetworkProfile, self).__init__(**kwargs) + self.network_interfaces = kwargs.get('network_interfaces', None) + + +class OSDisk(Model): + """Specifies information about the operating system disk used by the virtual + machine.

    For more information about disks, see [About disks and + VHDs for Azure virtual + machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-about-disks-vhds?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). + + All required parameters must be populated in order to send to Azure. + + :param os_type: This property allows you to specify the type of the OS + that is included in the disk if creating a VM from user-image or a + specialized VHD.

    Possible values are:

    **Windows** +

    **Linux**. Possible values include: 'Windows', 'Linux' + :type os_type: str or + ~azure.mgmt.compute.v2018_04_01.models.OperatingSystemTypes + :param encryption_settings: Specifies the encryption settings for the OS + Disk.

    Minimum api-version: 2015-06-15 + :type encryption_settings: + ~azure.mgmt.compute.v2018_04_01.models.DiskEncryptionSettings + :param name: The disk name. + :type name: str + :param vhd: The virtual hard disk. + :type vhd: ~azure.mgmt.compute.v2018_04_01.models.VirtualHardDisk + :param image: The source user image virtual hard disk. The virtual hard + disk will be copied before being attached to the virtual machine. If + SourceImage is provided, the destination virtual hard drive must not + exist. + :type image: ~azure.mgmt.compute.v2018_04_01.models.VirtualHardDisk + :param caching: Specifies the caching requirements.

    Possible + values are:

    **None**

    **ReadOnly**

    **ReadWrite** +

    Default: **None for Standard storage. ReadOnly for Premium + storage**. Possible values include: 'None', 'ReadOnly', 'ReadWrite' + :type caching: str or ~azure.mgmt.compute.v2018_04_01.models.CachingTypes + :param write_accelerator_enabled: Specifies whether writeAccelerator + should be enabled or disabled on the disk. + :type write_accelerator_enabled: bool + :param create_option: Required. Specifies how the virtual machine should + be created.

    Possible values are:

    **Attach** \\u2013 This + value is used when you are using a specialized disk to create the virtual + machine.

    **FromImage** \\u2013 This value is used when you are + using an image to create the virtual machine. If you are using a platform + image, you also use the imageReference element described above. If you are + using a marketplace image, you also use the plan element previously + described. Possible values include: 'FromImage', 'Empty', 'Attach' + :type create_option: str or + ~azure.mgmt.compute.v2018_04_01.models.DiskCreateOptionTypes + :param disk_size_gb: Specifies the size of an empty data disk in + gigabytes. This element can be used to overwrite the size of the disk in a + virtual machine image.

    This value cannot be larger than 1023 GB + :type disk_size_gb: int + :param managed_disk: The managed disk parameters. + :type managed_disk: + ~azure.mgmt.compute.v2018_04_01.models.ManagedDiskParameters + """ + + _validation = { + 'create_option': {'required': True}, + } + + _attribute_map = { + 'os_type': {'key': 'osType', 'type': 'OperatingSystemTypes'}, + 'encryption_settings': {'key': 'encryptionSettings', 'type': 'DiskEncryptionSettings'}, + 'name': {'key': 'name', 'type': 'str'}, + 'vhd': {'key': 'vhd', 'type': 'VirtualHardDisk'}, + 'image': {'key': 'image', 'type': 'VirtualHardDisk'}, + 'caching': {'key': 'caching', 'type': 'CachingTypes'}, + 'write_accelerator_enabled': {'key': 'writeAcceleratorEnabled', 'type': 'bool'}, + 'create_option': {'key': 'createOption', 'type': 'str'}, + 'disk_size_gb': {'key': 'diskSizeGB', 'type': 'int'}, + 'managed_disk': {'key': 'managedDisk', 'type': 'ManagedDiskParameters'}, + } + + def __init__(self, **kwargs): + super(OSDisk, self).__init__(**kwargs) + self.os_type = kwargs.get('os_type', None) + self.encryption_settings = kwargs.get('encryption_settings', None) + self.name = kwargs.get('name', None) + self.vhd = kwargs.get('vhd', None) + self.image = kwargs.get('image', None) + self.caching = kwargs.get('caching', None) + self.write_accelerator_enabled = kwargs.get('write_accelerator_enabled', None) + self.create_option = kwargs.get('create_option', None) + self.disk_size_gb = kwargs.get('disk_size_gb', None) + self.managed_disk = kwargs.get('managed_disk', None) + + +class OSDiskImage(Model): + """Contains the os disk image information. + + All required parameters must be populated in order to send to Azure. + + :param operating_system: Required. The operating system of the + osDiskImage. Possible values include: 'Windows', 'Linux' + :type operating_system: str or + ~azure.mgmt.compute.v2018_04_01.models.OperatingSystemTypes + """ + + _validation = { + 'operating_system': {'required': True}, + } + + _attribute_map = { + 'operating_system': {'key': 'operatingSystem', 'type': 'OperatingSystemTypes'}, + } + + def __init__(self, **kwargs): + super(OSDiskImage, self).__init__(**kwargs) + self.operating_system = kwargs.get('operating_system', None) + + +class OSProfile(Model): + """Specifies the operating system settings for the virtual machine. + + :param computer_name: Specifies the host OS name of the virtual machine. +

    This name cannot be updated after the VM is created.

    + **Max-length (Windows):** 15 characters

    **Max-length (Linux):** + 64 characters.

    For naming conventions and restrictions see [Azure + infrastructure services implementation + guidelines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-infrastructure-subscription-accounts-guidelines?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json#1-naming-conventions). + :type computer_name: str + :param admin_username: Specifies the name of the administrator account. +

    **Windows-only restriction:** Cannot end in "."

    + **Disallowed values:** "administrator", "admin", "user", "user1", "test", + "user2", "test1", "user3", "admin1", "1", "123", "a", "actuser", "adm", + "admin2", "aspnet", "backup", "console", "david", "guest", "john", + "owner", "root", "server", "sql", "support", "support_388945a0", "sys", + "test2", "test3", "user4", "user5".

    **Minimum-length (Linux):** 1 + character

    **Max-length (Linux):** 64 characters

    + **Max-length (Windows):** 20 characters

  • For root access to + the Linux VM, see [Using root privileges on Linux virtual machines in + Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-use-root-privileges?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json)
  • + For a list of built-in system users on Linux that should not be used in + this field, see [Selecting User Names for Linux on + Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-usernames?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json) + :type admin_username: str + :param admin_password: Specifies the password of the administrator + account.

    **Minimum-length (Windows):** 8 characters

    + **Minimum-length (Linux):** 6 characters

    **Max-length + (Windows):** 123 characters

    **Max-length (Linux):** 72 characters +

    **Complexity requirements:** 3 out of 4 conditions below need to + be fulfilled
    Has lower characters
    Has upper characters
    Has a + digit
    Has a special character (Regex match [\\W_])

    + **Disallowed values:** "abc@123", "P@$$w0rd", "P@ssw0rd", "P@ssword123", + "Pa$$word", "pass@word1", "Password!", "Password1", "Password22", + "iloveyou!"

    For resetting the password, see [How to reset the + Remote Desktop service or its login password in a Windows + VM](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-reset-rdp?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json) +

    For resetting root password, see [Manage users, SSH, and check or + repair disks on Azure Linux VMs using the VMAccess + Extension](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-using-vmaccess-extension?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json#reset-root-password) + :type admin_password: str + :param custom_data: Specifies a base-64 encoded string of custom data. The + base-64 encoded string is decoded to a binary array that is saved as a + file on the Virtual Machine. The maximum length of the binary array is + 65535 bytes.

    For using cloud-init for your VM, see [Using + cloud-init to customize a Linux VM during + creation](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-using-cloud-init?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json) + :type custom_data: str + :param windows_configuration: Specifies Windows operating system settings + on the virtual machine. + :type windows_configuration: + ~azure.mgmt.compute.v2018_04_01.models.WindowsConfiguration + :param linux_configuration: Specifies the Linux operating system settings + on the virtual machine.

    For a list of supported Linux + distributions, see [Linux on Azure-Endorsed + Distributions](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-endorsed-distros?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json) +

    For running non-endorsed distributions, see [Information for + Non-Endorsed + Distributions](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-create-upload-generic?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json). + :type linux_configuration: + ~azure.mgmt.compute.v2018_04_01.models.LinuxConfiguration + :param secrets: Specifies set of certificates that should be installed + onto the virtual machine. + :type secrets: + list[~azure.mgmt.compute.v2018_04_01.models.VaultSecretGroup] + """ + + _attribute_map = { + 'computer_name': {'key': 'computerName', 'type': 'str'}, + 'admin_username': {'key': 'adminUsername', 'type': 'str'}, + 'admin_password': {'key': 'adminPassword', 'type': 'str'}, + 'custom_data': {'key': 'customData', 'type': 'str'}, + 'windows_configuration': {'key': 'windowsConfiguration', 'type': 'WindowsConfiguration'}, + 'linux_configuration': {'key': 'linuxConfiguration', 'type': 'LinuxConfiguration'}, + 'secrets': {'key': 'secrets', 'type': '[VaultSecretGroup]'}, + } + + def __init__(self, **kwargs): + super(OSProfile, self).__init__(**kwargs) + self.computer_name = kwargs.get('computer_name', None) + self.admin_username = kwargs.get('admin_username', None) + self.admin_password = kwargs.get('admin_password', None) + self.custom_data = kwargs.get('custom_data', None) + self.windows_configuration = kwargs.get('windows_configuration', None) + self.linux_configuration = kwargs.get('linux_configuration', None) + self.secrets = kwargs.get('secrets', None) + + +class Plan(Model): + """Specifies information about the marketplace image used to create the + virtual machine. This element is only used for marketplace images. Before + you can use a marketplace image from an API, you must enable the image for + programmatic use. In the Azure portal, find the marketplace image that you + want to use and then click **Want to deploy programmatically, Get Started + ->**. Enter any required information and then click **Save**. + + :param name: The plan ID. + :type name: str + :param publisher: The publisher ID. + :type publisher: str + :param product: Specifies the product of the image from the marketplace. + This is the same value as Offer under the imageReference element. + :type product: str + :param promotion_code: The promotion code. + :type promotion_code: str + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'publisher': {'key': 'publisher', 'type': 'str'}, + 'product': {'key': 'product', 'type': 'str'}, + 'promotion_code': {'key': 'promotionCode', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(Plan, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.publisher = kwargs.get('publisher', None) + self.product = kwargs.get('product', None) + self.promotion_code = kwargs.get('promotion_code', None) + + +class ProximityPlacementGroup(Resource): + """Specifies information about the proximity placement group. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource Id + :vartype id: str + :ivar name: Resource name + :vartype name: str + :ivar type: Resource type + :vartype type: str + :param location: Required. Resource location + :type location: str + :param tags: Resource tags + :type tags: dict[str, str] + :param proximity_placement_group_type: Specifies the type of the proximity + placement group.

    Possible values are:

    **Standard** : + Co-locate resources within an Azure region or Availability Zone.

    + **Ultra** : For future use. Possible values include: 'Standard', 'Ultra' + :type proximity_placement_group_type: str or + ~azure.mgmt.compute.v2018_04_01.models.ProximityPlacementGroupType + :ivar virtual_machines: A list of references to all virtual machines in + the proximity placement group. + :vartype virtual_machines: + list[~azure.mgmt.compute.v2018_04_01.models.SubResource] + :ivar virtual_machine_scale_sets: A list of references to all virtual + machine scale sets in the proximity placement group. + :vartype virtual_machine_scale_sets: + list[~azure.mgmt.compute.v2018_04_01.models.SubResource] + :ivar availability_sets: A list of references to all availability sets in + the proximity placement group. + :vartype availability_sets: + list[~azure.mgmt.compute.v2018_04_01.models.SubResource] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + 'virtual_machines': {'readonly': True}, + 'virtual_machine_scale_sets': {'readonly': True}, + 'availability_sets': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'proximity_placement_group_type': {'key': 'properties.proximityPlacementGroupType', 'type': 'str'}, + 'virtual_machines': {'key': 'properties.virtualMachines', 'type': '[SubResource]'}, + 'virtual_machine_scale_sets': {'key': 'properties.virtualMachineScaleSets', 'type': '[SubResource]'}, + 'availability_sets': {'key': 'properties.availabilitySets', 'type': '[SubResource]'}, + } + + def __init__(self, **kwargs): + super(ProximityPlacementGroup, self).__init__(**kwargs) + self.proximity_placement_group_type = kwargs.get('proximity_placement_group_type', None) + self.virtual_machines = None + self.virtual_machine_scale_sets = None + self.availability_sets = None + + +class ProximityPlacementGroupUpdate(UpdateResource): + """Specifies information about the proximity placement group. + + :param tags: Resource tags + :type tags: dict[str, str] + """ + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__(self, **kwargs): + super(ProximityPlacementGroupUpdate, self).__init__(**kwargs) + + +class PurchasePlan(Model): + """Used for establishing the purchase context of any 3rd Party artifact + through MarketPlace. + + All required parameters must be populated in order to send to Azure. + + :param publisher: Required. The publisher ID. + :type publisher: str + :param name: Required. The plan ID. + :type name: str + :param product: Required. Specifies the product of the image from the + marketplace. This is the same value as Offer under the imageReference + element. + :type product: str + """ + + _validation = { + 'publisher': {'required': True}, + 'name': {'required': True}, + 'product': {'required': True}, + } + + _attribute_map = { + 'publisher': {'key': 'publisher', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'product': {'key': 'product', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(PurchasePlan, self).__init__(**kwargs) + self.publisher = kwargs.get('publisher', None) + self.name = kwargs.get('name', None) + self.product = kwargs.get('product', None) + + +class RecoveryWalkResponse(Model): + """Response after calling a manual recovery walk. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar walk_performed: Whether the recovery walk was performed + :vartype walk_performed: bool + :ivar next_platform_update_domain: The next update domain that needs to be + walked. Null means walk spanning all update domains has been completed + :vartype next_platform_update_domain: int + """ + + _validation = { + 'walk_performed': {'readonly': True}, + 'next_platform_update_domain': {'readonly': True}, + } + + _attribute_map = { + 'walk_performed': {'key': 'walkPerformed', 'type': 'bool'}, + 'next_platform_update_domain': {'key': 'nextPlatformUpdateDomain', 'type': 'int'}, + } + + def __init__(self, **kwargs): + super(RecoveryWalkResponse, self).__init__(**kwargs) + self.walk_performed = None + self.next_platform_update_domain = None + + +class RequestRateByIntervalInput(LogAnalyticsInputBase): + """Api request input for LogAnalytics getRequestRateByInterval Api. + + All required parameters must be populated in order to send to Azure. + + :param blob_container_sas_uri: Required. SAS Uri of the logging blob + container to which LogAnalytics Api writes output logs to. + :type blob_container_sas_uri: str + :param from_time: Required. From time of the query + :type from_time: datetime + :param to_time: Required. To time of the query + :type to_time: datetime + :param group_by_throttle_policy: Group query result by Throttle Policy + applied. + :type group_by_throttle_policy: bool + :param group_by_operation_name: Group query result by Operation Name. + :type group_by_operation_name: bool + :param group_by_resource_name: Group query result by Resource Name. + :type group_by_resource_name: bool + :param interval_length: Required. Interval value in minutes used to create + LogAnalytics call rate logs. Possible values include: 'ThreeMins', + 'FiveMins', 'ThirtyMins', 'SixtyMins' + :type interval_length: str or + ~azure.mgmt.compute.v2018_04_01.models.IntervalInMins + """ + + _validation = { + 'blob_container_sas_uri': {'required': True}, + 'from_time': {'required': True}, + 'to_time': {'required': True}, + 'interval_length': {'required': True}, + } + + _attribute_map = { + 'blob_container_sas_uri': {'key': 'blobContainerSasUri', 'type': 'str'}, + 'from_time': {'key': 'fromTime', 'type': 'iso-8601'}, + 'to_time': {'key': 'toTime', 'type': 'iso-8601'}, + 'group_by_throttle_policy': {'key': 'groupByThrottlePolicy', 'type': 'bool'}, + 'group_by_operation_name': {'key': 'groupByOperationName', 'type': 'bool'}, + 'group_by_resource_name': {'key': 'groupByResourceName', 'type': 'bool'}, + 'interval_length': {'key': 'intervalLength', 'type': 'IntervalInMins'}, + } + + def __init__(self, **kwargs): + super(RequestRateByIntervalInput, self).__init__(**kwargs) + self.interval_length = kwargs.get('interval_length', None) + + +class RollbackStatusInfo(Model): + """Information about rollback on failed VM instances after a OS Upgrade + operation. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar successfully_rolledback_instance_count: The number of instances + which have been successfully rolled back. + :vartype successfully_rolledback_instance_count: int + :ivar failed_rolledback_instance_count: The number of instances which + failed to rollback. + :vartype failed_rolledback_instance_count: int + :ivar rollback_error: Error details if OS rollback failed. + :vartype rollback_error: ~azure.mgmt.compute.v2018_04_01.models.ApiError + """ + + _validation = { + 'successfully_rolledback_instance_count': {'readonly': True}, + 'failed_rolledback_instance_count': {'readonly': True}, + 'rollback_error': {'readonly': True}, + } + + _attribute_map = { + 'successfully_rolledback_instance_count': {'key': 'successfullyRolledbackInstanceCount', 'type': 'int'}, + 'failed_rolledback_instance_count': {'key': 'failedRolledbackInstanceCount', 'type': 'int'}, + 'rollback_error': {'key': 'rollbackError', 'type': 'ApiError'}, + } + + def __init__(self, **kwargs): + super(RollbackStatusInfo, self).__init__(**kwargs) + self.successfully_rolledback_instance_count = None + self.failed_rolledback_instance_count = None + self.rollback_error = None + + +class RollingUpgradePolicy(Model): + """The configuration parameters used while performing a rolling upgrade. + + :param max_batch_instance_percent: The maximum percent of total virtual + machine instances that will be upgraded simultaneously by the rolling + upgrade in one batch. As this is a maximum, unhealthy instances in + previous or future batches can cause the percentage of instances in a + batch to decrease to ensure higher reliability. The default value for this + parameter is 20%. + :type max_batch_instance_percent: int + :param max_unhealthy_instance_percent: The maximum percentage of the total + virtual machine instances in the scale set that can be simultaneously + unhealthy, either as a result of being upgraded, or by being found in an + unhealthy state by the virtual machine health checks before the rolling + upgrade aborts. This constraint will be checked prior to starting any + batch. The default value for this parameter is 20%. + :type max_unhealthy_instance_percent: int + :param max_unhealthy_upgraded_instance_percent: The maximum percentage of + upgraded virtual machine instances that can be found to be in an unhealthy + state. This check will happen after each batch is upgraded. If this + percentage is ever exceeded, the rolling update aborts. The default value + for this parameter is 20%. + :type max_unhealthy_upgraded_instance_percent: int + :param pause_time_between_batches: The wait time between completing the + update for all virtual machines in one batch and starting the next batch. + The time duration should be specified in ISO 8601 format. The default + value is 0 seconds (PT0S). + :type pause_time_between_batches: str + """ + + _validation = { + 'max_batch_instance_percent': {'maximum': 100, 'minimum': 5}, + 'max_unhealthy_instance_percent': {'maximum': 100, 'minimum': 5}, + 'max_unhealthy_upgraded_instance_percent': {'maximum': 100, 'minimum': 0}, + } + + _attribute_map = { + 'max_batch_instance_percent': {'key': 'maxBatchInstancePercent', 'type': 'int'}, + 'max_unhealthy_instance_percent': {'key': 'maxUnhealthyInstancePercent', 'type': 'int'}, + 'max_unhealthy_upgraded_instance_percent': {'key': 'maxUnhealthyUpgradedInstancePercent', 'type': 'int'}, + 'pause_time_between_batches': {'key': 'pauseTimeBetweenBatches', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(RollingUpgradePolicy, self).__init__(**kwargs) + self.max_batch_instance_percent = kwargs.get('max_batch_instance_percent', None) + self.max_unhealthy_instance_percent = kwargs.get('max_unhealthy_instance_percent', None) + self.max_unhealthy_upgraded_instance_percent = kwargs.get('max_unhealthy_upgraded_instance_percent', None) + self.pause_time_between_batches = kwargs.get('pause_time_between_batches', None) + + +class RollingUpgradeProgressInfo(Model): + """Information about the number of virtual machine instances in each upgrade + state. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar successful_instance_count: The number of instances that have been + successfully upgraded. + :vartype successful_instance_count: int + :ivar failed_instance_count: The number of instances that have failed to + be upgraded successfully. + :vartype failed_instance_count: int + :ivar in_progress_instance_count: The number of instances that are + currently being upgraded. + :vartype in_progress_instance_count: int + :ivar pending_instance_count: The number of instances that have not yet + begun to be upgraded. + :vartype pending_instance_count: int + """ + + _validation = { + 'successful_instance_count': {'readonly': True}, + 'failed_instance_count': {'readonly': True}, + 'in_progress_instance_count': {'readonly': True}, + 'pending_instance_count': {'readonly': True}, + } + + _attribute_map = { + 'successful_instance_count': {'key': 'successfulInstanceCount', 'type': 'int'}, + 'failed_instance_count': {'key': 'failedInstanceCount', 'type': 'int'}, + 'in_progress_instance_count': {'key': 'inProgressInstanceCount', 'type': 'int'}, + 'pending_instance_count': {'key': 'pendingInstanceCount', 'type': 'int'}, + } + + def __init__(self, **kwargs): + super(RollingUpgradeProgressInfo, self).__init__(**kwargs) + self.successful_instance_count = None + self.failed_instance_count = None + self.in_progress_instance_count = None + self.pending_instance_count = None + + +class RollingUpgradeRunningStatus(Model): + """Information about the current running state of the overall upgrade. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar code: Code indicating the current status of the upgrade. Possible + values include: 'RollingForward', 'Cancelled', 'Completed', 'Faulted' + :vartype code: str or + ~azure.mgmt.compute.v2018_04_01.models.RollingUpgradeStatusCode + :ivar start_time: Start time of the upgrade. + :vartype start_time: datetime + :ivar last_action: The last action performed on the rolling upgrade. + Possible values include: 'Start', 'Cancel' + :vartype last_action: str or + ~azure.mgmt.compute.v2018_04_01.models.RollingUpgradeActionType + :ivar last_action_time: Last action time of the upgrade. + :vartype last_action_time: datetime + """ + + _validation = { + 'code': {'readonly': True}, + 'start_time': {'readonly': True}, + 'last_action': {'readonly': True}, + 'last_action_time': {'readonly': True}, + } + + _attribute_map = { + 'code': {'key': 'code', 'type': 'RollingUpgradeStatusCode'}, + 'start_time': {'key': 'startTime', 'type': 'iso-8601'}, + 'last_action': {'key': 'lastAction', 'type': 'RollingUpgradeActionType'}, + 'last_action_time': {'key': 'lastActionTime', 'type': 'iso-8601'}, + } + + def __init__(self, **kwargs): + super(RollingUpgradeRunningStatus, self).__init__(**kwargs) + self.code = None + self.start_time = None + self.last_action = None + self.last_action_time = None + + +class RollingUpgradeStatusInfo(Resource): + """The status of the latest virtual machine scale set rolling upgrade. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource Id + :vartype id: str + :ivar name: Resource name + :vartype name: str + :ivar type: Resource type + :vartype type: str + :param location: Required. Resource location + :type location: str + :param tags: Resource tags + :type tags: dict[str, str] + :ivar policy: The rolling upgrade policies applied for this upgrade. + :vartype policy: + ~azure.mgmt.compute.v2018_04_01.models.RollingUpgradePolicy + :ivar running_status: Information about the current running state of the + overall upgrade. + :vartype running_status: + ~azure.mgmt.compute.v2018_04_01.models.RollingUpgradeRunningStatus + :ivar progress: Information about the number of virtual machine instances + in each upgrade state. + :vartype progress: + ~azure.mgmt.compute.v2018_04_01.models.RollingUpgradeProgressInfo + :ivar error: Error details for this upgrade, if there are any. + :vartype error: ~azure.mgmt.compute.v2018_04_01.models.ApiError + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + 'policy': {'readonly': True}, + 'running_status': {'readonly': True}, + 'progress': {'readonly': True}, + 'error': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'policy': {'key': 'properties.policy', 'type': 'RollingUpgradePolicy'}, + 'running_status': {'key': 'properties.runningStatus', 'type': 'RollingUpgradeRunningStatus'}, + 'progress': {'key': 'properties.progress', 'type': 'RollingUpgradeProgressInfo'}, + 'error': {'key': 'properties.error', 'type': 'ApiError'}, + } + + def __init__(self, **kwargs): + super(RollingUpgradeStatusInfo, self).__init__(**kwargs) + self.policy = None + self.running_status = None + self.progress = None + self.error = None + + +class RunCommandDocumentBase(Model): + """Describes the properties of a Run Command metadata. + + All required parameters must be populated in order to send to Azure. + + :param schema: Required. The VM run command schema. + :type schema: str + :param id: Required. The VM run command id. + :type id: str + :param os_type: Required. The Operating System type. Possible values + include: 'Windows', 'Linux' + :type os_type: str or + ~azure.mgmt.compute.v2018_04_01.models.OperatingSystemTypes + :param label: Required. The VM run command label. + :type label: str + :param description: Required. The VM run command description. + :type description: str + """ + + _validation = { + 'schema': {'required': True}, + 'id': {'required': True}, + 'os_type': {'required': True}, + 'label': {'required': True}, + 'description': {'required': True}, + } + + _attribute_map = { + 'schema': {'key': '$schema', 'type': 'str'}, + 'id': {'key': 'id', 'type': 'str'}, + 'os_type': {'key': 'osType', 'type': 'OperatingSystemTypes'}, + 'label': {'key': 'label', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(RunCommandDocumentBase, self).__init__(**kwargs) + self.schema = kwargs.get('schema', None) + self.id = kwargs.get('id', None) + self.os_type = kwargs.get('os_type', None) + self.label = kwargs.get('label', None) + self.description = kwargs.get('description', None) + + +class RunCommandDocument(RunCommandDocumentBase): + """Describes the properties of a Run Command. + + All required parameters must be populated in order to send to Azure. + + :param schema: Required. The VM run command schema. + :type schema: str + :param id: Required. The VM run command id. + :type id: str + :param os_type: Required. The Operating System type. Possible values + include: 'Windows', 'Linux' + :type os_type: str or + ~azure.mgmt.compute.v2018_04_01.models.OperatingSystemTypes + :param label: Required. The VM run command label. + :type label: str + :param description: Required. The VM run command description. + :type description: str + :param script: Required. The script to be executed. + :type script: list[str] + :param parameters: The parameters used by the script. + :type parameters: + list[~azure.mgmt.compute.v2018_04_01.models.RunCommandParameterDefinition] + """ + + _validation = { + 'schema': {'required': True}, + 'id': {'required': True}, + 'os_type': {'required': True}, + 'label': {'required': True}, + 'description': {'required': True}, + 'script': {'required': True}, + } + + _attribute_map = { + 'schema': {'key': '$schema', 'type': 'str'}, + 'id': {'key': 'id', 'type': 'str'}, + 'os_type': {'key': 'osType', 'type': 'OperatingSystemTypes'}, + 'label': {'key': 'label', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + 'script': {'key': 'script', 'type': '[str]'}, + 'parameters': {'key': 'parameters', 'type': '[RunCommandParameterDefinition]'}, + } + + def __init__(self, **kwargs): + super(RunCommandDocument, self).__init__(**kwargs) + self.script = kwargs.get('script', None) + self.parameters = kwargs.get('parameters', None) + + +class RunCommandInput(Model): + """Capture Virtual Machine parameters. + + All required parameters must be populated in order to send to Azure. + + :param command_id: Required. The run command id. + :type command_id: str + :param script: Optional. The script to be executed. When this value is + given, the given script will override the default script of the command. + :type script: list[str] + :param parameters: The run command parameters. + :type parameters: + list[~azure.mgmt.compute.v2018_04_01.models.RunCommandInputParameter] + """ + + _validation = { + 'command_id': {'required': True}, + } + + _attribute_map = { + 'command_id': {'key': 'commandId', 'type': 'str'}, + 'script': {'key': 'script', 'type': '[str]'}, + 'parameters': {'key': 'parameters', 'type': '[RunCommandInputParameter]'}, + } + + def __init__(self, **kwargs): + super(RunCommandInput, self).__init__(**kwargs) + self.command_id = kwargs.get('command_id', None) + self.script = kwargs.get('script', None) + self.parameters = kwargs.get('parameters', None) + + +class RunCommandInputParameter(Model): + """Describes the properties of a run command parameter. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. The run command parameter name. + :type name: str + :param value: Required. The run command parameter value. + :type value: str + """ + + _validation = { + 'name': {'required': True}, + 'value': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'value': {'key': 'value', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(RunCommandInputParameter, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.value = kwargs.get('value', None) + + +class RunCommandParameterDefinition(Model): + """Describes the properties of a run command parameter. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. The run command parameter name. + :type name: str + :param type: Required. The run command parameter type. + :type type: str + :param default_value: The run command parameter default value. + :type default_value: str + :param required: The run command parameter required. Default value: False + . + :type required: bool + """ + + _validation = { + 'name': {'required': True}, + 'type': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'default_value': {'key': 'defaultValue', 'type': 'str'}, + 'required': {'key': 'required', 'type': 'bool'}, + } + + def __init__(self, **kwargs): + super(RunCommandParameterDefinition, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.type = kwargs.get('type', None) + self.default_value = kwargs.get('default_value', None) + self.required = kwargs.get('required', False) + + +class RunCommandResult(Model): + """RunCommandResult. + + :param value: Run command operation response. + :type value: + list[~azure.mgmt.compute.v2018_04_01.models.InstanceViewStatus] + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[InstanceViewStatus]'}, + } + + def __init__(self, **kwargs): + super(RunCommandResult, self).__init__(**kwargs) + self.value = kwargs.get('value', None) + + +class Sku(Model): + """Describes a virtual machine scale set sku. + + :param name: The sku name. + :type name: str + :param tier: Specifies the tier of virtual machines in a scale set.

    Possible Values:

    **Standard**

    **Basic** + :type tier: str + :param capacity: Specifies the number of virtual machines in the scale + set. + :type capacity: long + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'tier': {'key': 'tier', 'type': 'str'}, + 'capacity': {'key': 'capacity', 'type': 'long'}, + } + + def __init__(self, **kwargs): + super(Sku, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.tier = kwargs.get('tier', None) + self.capacity = kwargs.get('capacity', None) + + +class Snapshot(Resource): + """Snapshot resource. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource Id + :vartype id: str + :ivar name: Resource name + :vartype name: str + :ivar type: Resource type + :vartype type: str + :param location: Required. Resource location + :type location: str + :param tags: Resource tags + :type tags: dict[str, str] + :ivar managed_by: Unused. Always Null. + :vartype managed_by: str + :param sku: + :type sku: ~azure.mgmt.compute.v2018_04_01.models.SnapshotSku + :ivar time_created: The time when the disk was created. + :vartype time_created: datetime + :param os_type: The Operating System type. Possible values include: + 'Windows', 'Linux' + :type os_type: str or + ~azure.mgmt.compute.v2018_04_01.models.OperatingSystemTypes + :param creation_data: Required. Disk source information. CreationData + information cannot be changed after the disk has been created. + :type creation_data: ~azure.mgmt.compute.v2018_04_01.models.CreationData + :param disk_size_gb: If creationData.createOption is Empty, this field is + mandatory and it indicates the size of the VHD to create. If this field is + present for updates or creation with other options, it indicates a resize. + Resizes are only allowed if the disk is not attached to a running VM, and + can only increase the disk's size. + :type disk_size_gb: int + :param encryption_settings: Encryption settings for disk or snapshot + :type encryption_settings: + ~azure.mgmt.compute.v2018_04_01.models.EncryptionSettings + :ivar provisioning_state: The disk provisioning state. + :vartype provisioning_state: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + 'managed_by': {'readonly': True}, + 'time_created': {'readonly': True}, + 'creation_data': {'required': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'managed_by': {'key': 'managedBy', 'type': 'str'}, + 'sku': {'key': 'sku', 'type': 'SnapshotSku'}, + 'time_created': {'key': 'properties.timeCreated', 'type': 'iso-8601'}, + 'os_type': {'key': 'properties.osType', 'type': 'OperatingSystemTypes'}, + 'creation_data': {'key': 'properties.creationData', 'type': 'CreationData'}, + 'disk_size_gb': {'key': 'properties.diskSizeGB', 'type': 'int'}, + 'encryption_settings': {'key': 'properties.encryptionSettings', 'type': 'EncryptionSettings'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(Snapshot, self).__init__(**kwargs) + self.managed_by = None + self.sku = kwargs.get('sku', None) + self.time_created = None + self.os_type = kwargs.get('os_type', None) + self.creation_data = kwargs.get('creation_data', None) + self.disk_size_gb = kwargs.get('disk_size_gb', None) + self.encryption_settings = kwargs.get('encryption_settings', None) + self.provisioning_state = None + + +class SnapshotSku(Model): + """The snapshots sku name. Can be Standard_LRS, Premium_LRS, or Standard_ZRS. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :param name: The sku name. Possible values include: 'Standard_LRS', + 'Premium_LRS', 'Standard_ZRS' + :type name: str or + ~azure.mgmt.compute.v2018_04_01.models.SnapshotStorageAccountTypes + :ivar tier: The sku tier. Default value: "Standard" . + :vartype tier: str + """ + + _validation = { + 'tier': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'tier': {'key': 'tier', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(SnapshotSku, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.tier = None + + +class SnapshotUpdate(Model): + """Snapshot update resource. + + :param os_type: the Operating System type. Possible values include: + 'Windows', 'Linux' + :type os_type: str or + ~azure.mgmt.compute.v2018_04_01.models.OperatingSystemTypes + :param disk_size_gb: If creationData.createOption is Empty, this field is + mandatory and it indicates the size of the VHD to create. If this field is + present for updates or creation with other options, it indicates a resize. + Resizes are only allowed if the disk is not attached to a running VM, and + can only increase the disk's size. + :type disk_size_gb: int + :param encryption_settings: Encryption settings for disk or snapshot + :type encryption_settings: + ~azure.mgmt.compute.v2018_04_01.models.EncryptionSettings + :param tags: Resource tags + :type tags: dict[str, str] + :param sku: + :type sku: ~azure.mgmt.compute.v2018_04_01.models.SnapshotSku + """ + + _attribute_map = { + 'os_type': {'key': 'properties.osType', 'type': 'OperatingSystemTypes'}, + 'disk_size_gb': {'key': 'properties.diskSizeGB', 'type': 'int'}, + 'encryption_settings': {'key': 'properties.encryptionSettings', 'type': 'EncryptionSettings'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'sku': {'key': 'sku', 'type': 'SnapshotSku'}, + } + + def __init__(self, **kwargs): + super(SnapshotUpdate, self).__init__(**kwargs) + self.os_type = kwargs.get('os_type', None) + self.disk_size_gb = kwargs.get('disk_size_gb', None) + self.encryption_settings = kwargs.get('encryption_settings', None) + self.tags = kwargs.get('tags', None) + self.sku = kwargs.get('sku', None) + + +class SourceVault(Model): + """The vault id is an Azure Resource Manager Resource id in the form + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.KeyVault/vaults/{vaultName}. + + :param id: Resource Id + :type id: str + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(SourceVault, self).__init__(**kwargs) + self.id = kwargs.get('id', None) + + +class SshConfiguration(Model): + """SSH configuration for Linux based VMs running on Azure. + + :param public_keys: The list of SSH public keys used to authenticate with + linux based VMs. + :type public_keys: + list[~azure.mgmt.compute.v2018_04_01.models.SshPublicKey] + """ + + _attribute_map = { + 'public_keys': {'key': 'publicKeys', 'type': '[SshPublicKey]'}, + } + + def __init__(self, **kwargs): + super(SshConfiguration, self).__init__(**kwargs) + self.public_keys = kwargs.get('public_keys', None) + + +class SshPublicKey(Model): + """Contains information about SSH certificate public key and the path on the + Linux VM where the public key is placed. + + :param path: Specifies the full path on the created VM where ssh public + key is stored. If the file already exists, the specified key is appended + to the file. Example: /home/user/.ssh/authorized_keys + :type path: str + :param key_data: SSH public key certificate used to authenticate with the + VM through ssh. The key needs to be at least 2048-bit and in ssh-rsa + format.

    For creating ssh keys, see [Create SSH keys on Linux and + Mac for Linux VMs in + Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-mac-create-ssh-keys?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json). + :type key_data: str + """ + + _attribute_map = { + 'path': {'key': 'path', 'type': 'str'}, + 'key_data': {'key': 'keyData', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(SshPublicKey, self).__init__(**kwargs) + self.path = kwargs.get('path', None) + self.key_data = kwargs.get('key_data', None) + + +class StorageProfile(Model): + """Specifies the storage settings for the virtual machine disks. + + :param image_reference: Specifies information about the image to use. You + can specify information about platform images, marketplace images, or + virtual machine images. This element is required when you want to use a + platform image, marketplace image, or virtual machine image, but is not + used in other creation operations. + :type image_reference: + ~azure.mgmt.compute.v2018_04_01.models.ImageReference + :param os_disk: Specifies information about the operating system disk used + by the virtual machine.

    For more information about disks, see + [About disks and VHDs for Azure virtual + machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-about-disks-vhds?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). + :type os_disk: ~azure.mgmt.compute.v2018_04_01.models.OSDisk + :param data_disks: Specifies the parameters that are used to add a data + disk to a virtual machine.

    For more information about disks, see + [About disks and VHDs for Azure virtual + machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-about-disks-vhds?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). + :type data_disks: list[~azure.mgmt.compute.v2018_04_01.models.DataDisk] + """ + + _attribute_map = { + 'image_reference': {'key': 'imageReference', 'type': 'ImageReference'}, + 'os_disk': {'key': 'osDisk', 'type': 'OSDisk'}, + 'data_disks': {'key': 'dataDisks', 'type': '[DataDisk]'}, + } + + def __init__(self, **kwargs): + super(StorageProfile, self).__init__(**kwargs) + self.image_reference = kwargs.get('image_reference', None) + self.os_disk = kwargs.get('os_disk', None) + self.data_disks = kwargs.get('data_disks', None) + + +class SubResourceReadOnly(Model): + """SubResourceReadOnly. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource Id + :vartype id: str + """ + + _validation = { + 'id': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(SubResourceReadOnly, self).__init__(**kwargs) + self.id = None + + +class ThrottledRequestsInput(LogAnalyticsInputBase): + """Api request input for LogAnalytics getThrottledRequests Api. + + All required parameters must be populated in order to send to Azure. + + :param blob_container_sas_uri: Required. SAS Uri of the logging blob + container to which LogAnalytics Api writes output logs to. + :type blob_container_sas_uri: str + :param from_time: Required. From time of the query + :type from_time: datetime + :param to_time: Required. To time of the query + :type to_time: datetime + :param group_by_throttle_policy: Group query result by Throttle Policy + applied. + :type group_by_throttle_policy: bool + :param group_by_operation_name: Group query result by Operation Name. + :type group_by_operation_name: bool + :param group_by_resource_name: Group query result by Resource Name. + :type group_by_resource_name: bool + """ + + _validation = { + 'blob_container_sas_uri': {'required': True}, + 'from_time': {'required': True}, + 'to_time': {'required': True}, + } + + _attribute_map = { + 'blob_container_sas_uri': {'key': 'blobContainerSasUri', 'type': 'str'}, + 'from_time': {'key': 'fromTime', 'type': 'iso-8601'}, + 'to_time': {'key': 'toTime', 'type': 'iso-8601'}, + 'group_by_throttle_policy': {'key': 'groupByThrottlePolicy', 'type': 'bool'}, + 'group_by_operation_name': {'key': 'groupByOperationName', 'type': 'bool'}, + 'group_by_resource_name': {'key': 'groupByResourceName', 'type': 'bool'}, + } + + def __init__(self, **kwargs): + super(ThrottledRequestsInput, self).__init__(**kwargs) + + +class UpgradeOperationHistoricalStatusInfo(Model): + """Virtual Machine Scale Set OS Upgrade History operation response. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar properties: Information about the properties of the upgrade + operation. + :vartype properties: + ~azure.mgmt.compute.v2018_04_01.models.UpgradeOperationHistoricalStatusInfoProperties + :ivar type: Resource type + :vartype type: str + :ivar location: Resource location + :vartype location: str + """ + + _validation = { + 'properties': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'readonly': True}, + } + + _attribute_map = { + 'properties': {'key': 'properties', 'type': 'UpgradeOperationHistoricalStatusInfoProperties'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(UpgradeOperationHistoricalStatusInfo, self).__init__(**kwargs) + self.properties = None + self.type = None + self.location = None + + +class UpgradeOperationHistoricalStatusInfoProperties(Model): + """Describes each OS upgrade on the Virtual Machine Scale Set. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar running_status: Information about the overall status of the upgrade + operation. + :vartype running_status: + ~azure.mgmt.compute.v2018_04_01.models.UpgradeOperationHistoryStatus + :ivar progress: Counts of the VMs in each state. + :vartype progress: + ~azure.mgmt.compute.v2018_04_01.models.RollingUpgradeProgressInfo + :ivar error: Error Details for this upgrade if there are any. + :vartype error: ~azure.mgmt.compute.v2018_04_01.models.ApiError + :ivar started_by: Invoker of the Upgrade Operation. Possible values + include: 'Unknown', 'User', 'Platform' + :vartype started_by: str or + ~azure.mgmt.compute.v2018_04_01.models.UpgradeOperationInvoker + :ivar target_image_reference: Image Reference details + :vartype target_image_reference: + ~azure.mgmt.compute.v2018_04_01.models.ImageReference + :ivar rollback_info: Information about OS rollback if performed + :vartype rollback_info: + ~azure.mgmt.compute.v2018_04_01.models.RollbackStatusInfo + """ + + _validation = { + 'running_status': {'readonly': True}, + 'progress': {'readonly': True}, + 'error': {'readonly': True}, + 'started_by': {'readonly': True}, + 'target_image_reference': {'readonly': True}, + 'rollback_info': {'readonly': True}, + } + + _attribute_map = { + 'running_status': {'key': 'runningStatus', 'type': 'UpgradeOperationHistoryStatus'}, + 'progress': {'key': 'progress', 'type': 'RollingUpgradeProgressInfo'}, + 'error': {'key': 'error', 'type': 'ApiError'}, + 'started_by': {'key': 'startedBy', 'type': 'UpgradeOperationInvoker'}, + 'target_image_reference': {'key': 'targetImageReference', 'type': 'ImageReference'}, + 'rollback_info': {'key': 'rollbackInfo', 'type': 'RollbackStatusInfo'}, + } + + def __init__(self, **kwargs): + super(UpgradeOperationHistoricalStatusInfoProperties, self).__init__(**kwargs) + self.running_status = None + self.progress = None + self.error = None + self.started_by = None + self.target_image_reference = None + self.rollback_info = None + + +class UpgradeOperationHistoryStatus(Model): + """Information about the current running state of the overall upgrade. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar code: Code indicating the current status of the upgrade. Possible + values include: 'RollingForward', 'Cancelled', 'Completed', 'Faulted' + :vartype code: str or ~azure.mgmt.compute.v2018_04_01.models.UpgradeState + :ivar start_time: Start time of the upgrade. + :vartype start_time: datetime + :ivar end_time: End time of the upgrade. + :vartype end_time: datetime + """ + + _validation = { + 'code': {'readonly': True}, + 'start_time': {'readonly': True}, + 'end_time': {'readonly': True}, + } + + _attribute_map = { + 'code': {'key': 'code', 'type': 'UpgradeState'}, + 'start_time': {'key': 'startTime', 'type': 'iso-8601'}, + 'end_time': {'key': 'endTime', 'type': 'iso-8601'}, + } + + def __init__(self, **kwargs): + super(UpgradeOperationHistoryStatus, self).__init__(**kwargs) + self.code = None + self.start_time = None + self.end_time = None + + +class UpgradePolicy(Model): + """Describes an upgrade policy - automatic, manual, or rolling. + + :param mode: Specifies the mode of an upgrade to virtual machines in the + scale set.

    Possible values are:

    **Manual** - You + control the application of updates to virtual machines in the scale set. + You do this by using the manualUpgrade action.

    **Automatic** - + All virtual machines in the scale set are automatically updated at the + same time. Possible values include: 'Automatic', 'Manual', 'Rolling' + :type mode: str or ~azure.mgmt.compute.v2018_04_01.models.UpgradeMode + :param rolling_upgrade_policy: The configuration parameters used while + performing a rolling upgrade. + :type rolling_upgrade_policy: + ~azure.mgmt.compute.v2018_04_01.models.RollingUpgradePolicy + :param automatic_os_upgrade: Whether OS upgrades should automatically be + applied to scale set instances in a rolling fashion when a newer version + of the image becomes available. + :type automatic_os_upgrade: bool + :param auto_os_upgrade_policy: Configuration parameters used for + performing automatic OS Upgrade. + :type auto_os_upgrade_policy: + ~azure.mgmt.compute.v2018_04_01.models.AutoOSUpgradePolicy + """ + + _attribute_map = { + 'mode': {'key': 'mode', 'type': 'UpgradeMode'}, + 'rolling_upgrade_policy': {'key': 'rollingUpgradePolicy', 'type': 'RollingUpgradePolicy'}, + 'automatic_os_upgrade': {'key': 'automaticOSUpgrade', 'type': 'bool'}, + 'auto_os_upgrade_policy': {'key': 'autoOSUpgradePolicy', 'type': 'AutoOSUpgradePolicy'}, + } + + def __init__(self, **kwargs): + super(UpgradePolicy, self).__init__(**kwargs) + self.mode = kwargs.get('mode', None) + self.rolling_upgrade_policy = kwargs.get('rolling_upgrade_policy', None) + self.automatic_os_upgrade = kwargs.get('automatic_os_upgrade', None) + self.auto_os_upgrade_policy = kwargs.get('auto_os_upgrade_policy', None) + + +class Usage(Model): + """Describes Compute Resource Usage. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar unit: Required. An enum describing the unit of usage measurement. + Default value: "Count" . + :vartype unit: str + :param current_value: Required. The current usage of the resource. + :type current_value: int + :param limit: Required. The maximum permitted usage of the resource. + :type limit: long + :param name: Required. The name of the type of usage. + :type name: ~azure.mgmt.compute.v2018_04_01.models.UsageName + """ + + _validation = { + 'unit': {'required': True, 'constant': True}, + 'current_value': {'required': True}, + 'limit': {'required': True}, + 'name': {'required': True}, + } + + _attribute_map = { + 'unit': {'key': 'unit', 'type': 'str'}, + 'current_value': {'key': 'currentValue', 'type': 'int'}, + 'limit': {'key': 'limit', 'type': 'long'}, + 'name': {'key': 'name', 'type': 'UsageName'}, + } + + unit = "Count" + + def __init__(self, **kwargs): + super(Usage, self).__init__(**kwargs) + self.current_value = kwargs.get('current_value', None) + self.limit = kwargs.get('limit', None) + self.name = kwargs.get('name', None) + + +class UsageName(Model): + """The Usage Names. + + :param value: The name of the resource. + :type value: str + :param localized_value: The localized name of the resource. + :type localized_value: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': 'str'}, + 'localized_value': {'key': 'localizedValue', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(UsageName, self).__init__(**kwargs) + self.value = kwargs.get('value', None) + self.localized_value = kwargs.get('localized_value', None) + + +class VaultCertificate(Model): + """Describes a single certificate reference in a Key Vault, and where the + certificate should reside on the VM. + + :param certificate_url: This is the URL of a certificate that has been + uploaded to Key Vault as a secret. For adding a secret to the Key Vault, + see [Add a key or secret to the key + vault](https://docs.microsoft.com/azure/key-vault/key-vault-get-started/#add). + In this case, your certificate needs to be It is the Base64 encoding of + the following JSON Object which is encoded in UTF-8:

    {
    + "data":"",
    "dataType":"pfx",
    + "password":""
    } + :type certificate_url: str + :param certificate_store: For Windows VMs, specifies the certificate store + on the Virtual Machine to which the certificate should be added. The + specified certificate store is implicitly in the LocalMachine account. +

    For Linux VMs, the certificate file is placed under the + /var/lib/waagent directory, with the file name + <UppercaseThumbprint>.crt for the X509 certificate file and + <UppercaseThumbprint>.prv for private key. Both of these files are + .pem formatted. + :type certificate_store: str + """ + + _attribute_map = { + 'certificate_url': {'key': 'certificateUrl', 'type': 'str'}, + 'certificate_store': {'key': 'certificateStore', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(VaultCertificate, self).__init__(**kwargs) + self.certificate_url = kwargs.get('certificate_url', None) + self.certificate_store = kwargs.get('certificate_store', None) + + +class VaultSecretGroup(Model): + """Describes a set of certificates which are all in the same Key Vault. + + :param source_vault: The relative URL of the Key Vault containing all of + the certificates in VaultCertificates. + :type source_vault: ~azure.mgmt.compute.v2018_04_01.models.SubResource + :param vault_certificates: The list of key vault references in SourceVault + which contain certificates. + :type vault_certificates: + list[~azure.mgmt.compute.v2018_04_01.models.VaultCertificate] + """ + + _attribute_map = { + 'source_vault': {'key': 'sourceVault', 'type': 'SubResource'}, + 'vault_certificates': {'key': 'vaultCertificates', 'type': '[VaultCertificate]'}, + } + + def __init__(self, **kwargs): + super(VaultSecretGroup, self).__init__(**kwargs) + self.source_vault = kwargs.get('source_vault', None) + self.vault_certificates = kwargs.get('vault_certificates', None) + + +class VirtualHardDisk(Model): + """Describes the uri of a disk. + + :param uri: Specifies the virtual hard disk's uri. + :type uri: str + """ + + _attribute_map = { + 'uri': {'key': 'uri', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(VirtualHardDisk, self).__init__(**kwargs) + self.uri = kwargs.get('uri', None) + + +class VirtualMachine(Resource): + """Describes a Virtual Machine. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource Id + :vartype id: str + :ivar name: Resource name + :vartype name: str + :ivar type: Resource type + :vartype type: str + :param location: Required. Resource location + :type location: str + :param tags: Resource tags + :type tags: dict[str, str] + :param plan: Specifies information about the marketplace image used to + create the virtual machine. This element is only used for marketplace + images. Before you can use a marketplace image from an API, you must + enable the image for programmatic use. In the Azure portal, find the + marketplace image that you want to use and then click **Want to deploy + programmatically, Get Started ->**. Enter any required information and + then click **Save**. + :type plan: ~azure.mgmt.compute.v2018_04_01.models.Plan + :param hardware_profile: Specifies the hardware settings for the virtual + machine. + :type hardware_profile: + ~azure.mgmt.compute.v2018_04_01.models.HardwareProfile + :param storage_profile: Specifies the storage settings for the virtual + machine disks. + :type storage_profile: + ~azure.mgmt.compute.v2018_04_01.models.StorageProfile + :param os_profile: Specifies the operating system settings for the virtual + machine. + :type os_profile: ~azure.mgmt.compute.v2018_04_01.models.OSProfile + :param network_profile: Specifies the network interfaces of the virtual + machine. + :type network_profile: + ~azure.mgmt.compute.v2018_04_01.models.NetworkProfile + :param diagnostics_profile: Specifies the boot diagnostic settings state. +

    Minimum api-version: 2015-06-15. + :type diagnostics_profile: + ~azure.mgmt.compute.v2018_04_01.models.DiagnosticsProfile + :param availability_set: Specifies information about the availability set + that the virtual machine should be assigned to. Virtual machines specified + in the same availability set are allocated to different nodes to maximize + availability. For more information about availability sets, see [Manage + the availability of virtual + machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-manage-availability?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). +

    For more information on Azure planned maintenance, see [Planned + maintenance for virtual machines in + Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-planned-maintenance?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json) +

    Currently, a VM can only be added to availability set at creation + time. An existing VM cannot be added to an availability set. + :type availability_set: ~azure.mgmt.compute.v2018_04_01.models.SubResource + :param proximity_placement_group: Specifies information about the + proximity placement group that the virtual machine should be assigned to. +

    Minimum api-version: 2018-04-01. + :type proximity_placement_group: + ~azure.mgmt.compute.v2018_04_01.models.SubResource + :ivar provisioning_state: The provisioning state, which only appears in + the response. + :vartype provisioning_state: str + :ivar instance_view: The virtual machine instance view. + :vartype instance_view: + ~azure.mgmt.compute.v2018_04_01.models.VirtualMachineInstanceView + :param license_type: Specifies that the image or disk that is being used + was licensed on-premises. This element is only used for images that + contain the Windows Server operating system.

    Possible values are: +

    Windows_Client

    Windows_Server

    If this element + is included in a request for an update, the value must match the initial + value. This value cannot be updated.

    For more information, see + [Azure Hybrid Use Benefit for Windows + Server](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-hybrid-use-benefit-licensing?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json) +

    Minimum api-version: 2015-06-15 + :type license_type: str + :ivar vm_id: Specifies the VM unique ID which is a 128-bits identifier + that is encoded and stored in all Azure IaaS VMs SMBIOS and can be read + using platform BIOS commands. + :vartype vm_id: str + :ivar resources: The virtual machine child extension resources. + :vartype resources: + list[~azure.mgmt.compute.v2018_04_01.models.VirtualMachineExtension] + :param identity: The identity of the virtual machine, if configured. + :type identity: + ~azure.mgmt.compute.v2018_04_01.models.VirtualMachineIdentity + :param zones: The virtual machine zones. + :type zones: list[str] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + 'provisioning_state': {'readonly': True}, + 'instance_view': {'readonly': True}, + 'vm_id': {'readonly': True}, + 'resources': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'plan': {'key': 'plan', 'type': 'Plan'}, + 'hardware_profile': {'key': 'properties.hardwareProfile', 'type': 'HardwareProfile'}, + 'storage_profile': {'key': 'properties.storageProfile', 'type': 'StorageProfile'}, + 'os_profile': {'key': 'properties.osProfile', 'type': 'OSProfile'}, + 'network_profile': {'key': 'properties.networkProfile', 'type': 'NetworkProfile'}, + 'diagnostics_profile': {'key': 'properties.diagnosticsProfile', 'type': 'DiagnosticsProfile'}, + 'availability_set': {'key': 'properties.availabilitySet', 'type': 'SubResource'}, + 'proximity_placement_group': {'key': 'properties.proximityPlacementGroup', 'type': 'SubResource'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'instance_view': {'key': 'properties.instanceView', 'type': 'VirtualMachineInstanceView'}, + 'license_type': {'key': 'properties.licenseType', 'type': 'str'}, + 'vm_id': {'key': 'properties.vmId', 'type': 'str'}, + 'resources': {'key': 'resources', 'type': '[VirtualMachineExtension]'}, + 'identity': {'key': 'identity', 'type': 'VirtualMachineIdentity'}, + 'zones': {'key': 'zones', 'type': '[str]'}, + } + + def __init__(self, **kwargs): + super(VirtualMachine, self).__init__(**kwargs) + self.plan = kwargs.get('plan', None) + self.hardware_profile = kwargs.get('hardware_profile', None) + self.storage_profile = kwargs.get('storage_profile', None) + self.os_profile = kwargs.get('os_profile', None) + self.network_profile = kwargs.get('network_profile', None) + self.diagnostics_profile = kwargs.get('diagnostics_profile', None) + self.availability_set = kwargs.get('availability_set', None) + self.proximity_placement_group = kwargs.get('proximity_placement_group', None) + self.provisioning_state = None + self.instance_view = None + self.license_type = kwargs.get('license_type', None) + self.vm_id = None + self.resources = None + self.identity = kwargs.get('identity', None) + self.zones = kwargs.get('zones', None) + + +class VirtualMachineAgentInstanceView(Model): + """The instance view of the VM Agent running on the virtual machine. + + :param vm_agent_version: The VM Agent full version. + :type vm_agent_version: str + :param extension_handlers: The virtual machine extension handler instance + view. + :type extension_handlers: + list[~azure.mgmt.compute.v2018_04_01.models.VirtualMachineExtensionHandlerInstanceView] + :param statuses: The resource status information. + :type statuses: + list[~azure.mgmt.compute.v2018_04_01.models.InstanceViewStatus] + """ + + _attribute_map = { + 'vm_agent_version': {'key': 'vmAgentVersion', 'type': 'str'}, + 'extension_handlers': {'key': 'extensionHandlers', 'type': '[VirtualMachineExtensionHandlerInstanceView]'}, + 'statuses': {'key': 'statuses', 'type': '[InstanceViewStatus]'}, + } + + def __init__(self, **kwargs): + super(VirtualMachineAgentInstanceView, self).__init__(**kwargs) + self.vm_agent_version = kwargs.get('vm_agent_version', None) + self.extension_handlers = kwargs.get('extension_handlers', None) + self.statuses = kwargs.get('statuses', None) + + +class VirtualMachineCaptureParameters(Model): + """Capture Virtual Machine parameters. + + All required parameters must be populated in order to send to Azure. + + :param vhd_prefix: Required. The captured virtual hard disk's name prefix. + :type vhd_prefix: str + :param destination_container_name: Required. The destination container + name. + :type destination_container_name: str + :param overwrite_vhds: Required. Specifies whether to overwrite the + destination virtual hard disk, in case of conflict. + :type overwrite_vhds: bool + """ + + _validation = { + 'vhd_prefix': {'required': True}, + 'destination_container_name': {'required': True}, + 'overwrite_vhds': {'required': True}, + } + + _attribute_map = { + 'vhd_prefix': {'key': 'vhdPrefix', 'type': 'str'}, + 'destination_container_name': {'key': 'destinationContainerName', 'type': 'str'}, + 'overwrite_vhds': {'key': 'overwriteVhds', 'type': 'bool'}, + } + + def __init__(self, **kwargs): + super(VirtualMachineCaptureParameters, self).__init__(**kwargs) + self.vhd_prefix = kwargs.get('vhd_prefix', None) + self.destination_container_name = kwargs.get('destination_container_name', None) + self.overwrite_vhds = kwargs.get('overwrite_vhds', None) + + +class VirtualMachineCaptureResult(SubResource): + """Output of virtual machine capture operation. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :param id: Resource Id + :type id: str + :ivar schema: the schema of the captured virtual machine + :vartype schema: str + :ivar content_version: the version of the content + :vartype content_version: str + :ivar parameters: parameters of the captured virtual machine + :vartype parameters: object + :ivar resources: a list of resource items of the captured virtual machine + :vartype resources: list[object] + """ + + _validation = { + 'schema': {'readonly': True}, + 'content_version': {'readonly': True}, + 'parameters': {'readonly': True}, + 'resources': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'schema': {'key': '$schema', 'type': 'str'}, + 'content_version': {'key': 'contentVersion', 'type': 'str'}, + 'parameters': {'key': 'parameters', 'type': 'object'}, + 'resources': {'key': 'resources', 'type': '[object]'}, + } + + def __init__(self, **kwargs): + super(VirtualMachineCaptureResult, self).__init__(**kwargs) + self.schema = None + self.content_version = None + self.parameters = None + self.resources = None + + +class VirtualMachineExtension(Resource): + """Describes a Virtual Machine Extension. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource Id + :vartype id: str + :ivar name: Resource name + :vartype name: str + :ivar type: Resource type + :vartype type: str + :param location: Required. Resource location + :type location: str + :param tags: Resource tags + :type tags: dict[str, str] + :param force_update_tag: How the extension handler should be forced to + update even if the extension configuration has not changed. + :type force_update_tag: str + :param publisher: The name of the extension handler publisher. + :type publisher: str + :param virtual_machine_extension_type: Specifies the type of the + extension; an example is "CustomScriptExtension". + :type virtual_machine_extension_type: str + :param type_handler_version: Specifies the version of the script handler. + :type type_handler_version: str + :param auto_upgrade_minor_version: Indicates whether the extension should + use a newer minor version if one is available at deployment time. Once + deployed, however, the extension will not upgrade minor versions unless + redeployed, even with this property set to true. + :type auto_upgrade_minor_version: bool + :param settings: Json formatted public settings for the extension. + :type settings: object + :param protected_settings: The extension can contain either + protectedSettings or protectedSettingsFromKeyVault or no protected + settings at all. + :type protected_settings: object + :ivar provisioning_state: The provisioning state, which only appears in + the response. + :vartype provisioning_state: str + :param instance_view: The virtual machine extension instance view. + :type instance_view: + ~azure.mgmt.compute.v2018_04_01.models.VirtualMachineExtensionInstanceView + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'force_update_tag': {'key': 'properties.forceUpdateTag', 'type': 'str'}, + 'publisher': {'key': 'properties.publisher', 'type': 'str'}, + 'virtual_machine_extension_type': {'key': 'properties.type', 'type': 'str'}, + 'type_handler_version': {'key': 'properties.typeHandlerVersion', 'type': 'str'}, + 'auto_upgrade_minor_version': {'key': 'properties.autoUpgradeMinorVersion', 'type': 'bool'}, + 'settings': {'key': 'properties.settings', 'type': 'object'}, + 'protected_settings': {'key': 'properties.protectedSettings', 'type': 'object'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'instance_view': {'key': 'properties.instanceView', 'type': 'VirtualMachineExtensionInstanceView'}, + } + + def __init__(self, **kwargs): + super(VirtualMachineExtension, self).__init__(**kwargs) + self.force_update_tag = kwargs.get('force_update_tag', None) + self.publisher = kwargs.get('publisher', None) + self.virtual_machine_extension_type = kwargs.get('virtual_machine_extension_type', None) + self.type_handler_version = kwargs.get('type_handler_version', None) + self.auto_upgrade_minor_version = kwargs.get('auto_upgrade_minor_version', None) + self.settings = kwargs.get('settings', None) + self.protected_settings = kwargs.get('protected_settings', None) + self.provisioning_state = None + self.instance_view = kwargs.get('instance_view', None) + + +class VirtualMachineExtensionHandlerInstanceView(Model): + """The instance view of a virtual machine extension handler. + + :param type: Specifies the type of the extension; an example is + "CustomScriptExtension". + :type type: str + :param type_handler_version: Specifies the version of the script handler. + :type type_handler_version: str + :param status: The extension handler status. + :type status: ~azure.mgmt.compute.v2018_04_01.models.InstanceViewStatus + """ + + _attribute_map = { + 'type': {'key': 'type', 'type': 'str'}, + 'type_handler_version': {'key': 'typeHandlerVersion', 'type': 'str'}, + 'status': {'key': 'status', 'type': 'InstanceViewStatus'}, + } + + def __init__(self, **kwargs): + super(VirtualMachineExtensionHandlerInstanceView, self).__init__(**kwargs) + self.type = kwargs.get('type', None) + self.type_handler_version = kwargs.get('type_handler_version', None) + self.status = kwargs.get('status', None) + + +class VirtualMachineExtensionImage(Resource): + """Describes a Virtual Machine Extension Image. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource Id + :vartype id: str + :ivar name: Resource name + :vartype name: str + :ivar type: Resource type + :vartype type: str + :param location: Required. Resource location + :type location: str + :param tags: Resource tags + :type tags: dict[str, str] + :param operating_system: Required. The operating system this extension + supports. + :type operating_system: str + :param compute_role: Required. The type of role (IaaS or PaaS) this + extension supports. + :type compute_role: str + :param handler_schema: Required. The schema defined by publisher, where + extension consumers should provide settings in a matching schema. + :type handler_schema: str + :param vm_scale_set_enabled: Whether the extension can be used on xRP + VMScaleSets. By default existing extensions are usable on scalesets, but + there might be cases where a publisher wants to explicitly indicate the + extension is only enabled for CRP VMs but not VMSS. + :type vm_scale_set_enabled: bool + :param supports_multiple_extensions: Whether the handler can support + multiple extensions. + :type supports_multiple_extensions: bool + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + 'operating_system': {'required': True}, + 'compute_role': {'required': True}, + 'handler_schema': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'operating_system': {'key': 'properties.operatingSystem', 'type': 'str'}, + 'compute_role': {'key': 'properties.computeRole', 'type': 'str'}, + 'handler_schema': {'key': 'properties.handlerSchema', 'type': 'str'}, + 'vm_scale_set_enabled': {'key': 'properties.vmScaleSetEnabled', 'type': 'bool'}, + 'supports_multiple_extensions': {'key': 'properties.supportsMultipleExtensions', 'type': 'bool'}, + } + + def __init__(self, **kwargs): + super(VirtualMachineExtensionImage, self).__init__(**kwargs) + self.operating_system = kwargs.get('operating_system', None) + self.compute_role = kwargs.get('compute_role', None) + self.handler_schema = kwargs.get('handler_schema', None) + self.vm_scale_set_enabled = kwargs.get('vm_scale_set_enabled', None) + self.supports_multiple_extensions = kwargs.get('supports_multiple_extensions', None) + + +class VirtualMachineExtensionInstanceView(Model): + """The instance view of a virtual machine extension. + + :param name: The virtual machine extension name. + :type name: str + :param type: Specifies the type of the extension; an example is + "CustomScriptExtension". + :type type: str + :param type_handler_version: Specifies the version of the script handler. + :type type_handler_version: str + :param substatuses: The resource status information. + :type substatuses: + list[~azure.mgmt.compute.v2018_04_01.models.InstanceViewStatus] + :param statuses: The resource status information. + :type statuses: + list[~azure.mgmt.compute.v2018_04_01.models.InstanceViewStatus] + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'type_handler_version': {'key': 'typeHandlerVersion', 'type': 'str'}, + 'substatuses': {'key': 'substatuses', 'type': '[InstanceViewStatus]'}, + 'statuses': {'key': 'statuses', 'type': '[InstanceViewStatus]'}, + } + + def __init__(self, **kwargs): + super(VirtualMachineExtensionInstanceView, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.type = kwargs.get('type', None) + self.type_handler_version = kwargs.get('type_handler_version', None) + self.substatuses = kwargs.get('substatuses', None) + self.statuses = kwargs.get('statuses', None) + + +class VirtualMachineExtensionsListResult(Model): + """The List Extension operation response. + + :param value: The list of extensions + :type value: + list[~azure.mgmt.compute.v2018_04_01.models.VirtualMachineExtension] + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[VirtualMachineExtension]'}, + } + + def __init__(self, **kwargs): + super(VirtualMachineExtensionsListResult, self).__init__(**kwargs) + self.value = kwargs.get('value', None) + + +class VirtualMachineExtensionUpdate(UpdateResource): + """Describes a Virtual Machine Extension. + + :param tags: Resource tags + :type tags: dict[str, str] + :param force_update_tag: How the extension handler should be forced to + update even if the extension configuration has not changed. + :type force_update_tag: str + :param publisher: The name of the extension handler publisher. + :type publisher: str + :param type: Specifies the type of the extension; an example is + "CustomScriptExtension". + :type type: str + :param type_handler_version: Specifies the version of the script handler. + :type type_handler_version: str + :param auto_upgrade_minor_version: Indicates whether the extension should + use a newer minor version if one is available at deployment time. Once + deployed, however, the extension will not upgrade minor versions unless + redeployed, even with this property set to true. + :type auto_upgrade_minor_version: bool + :param settings: Json formatted public settings for the extension. + :type settings: object + :param protected_settings: The extension can contain either + protectedSettings or protectedSettingsFromKeyVault or no protected + settings at all. + :type protected_settings: object + """ + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + 'force_update_tag': {'key': 'properties.forceUpdateTag', 'type': 'str'}, + 'publisher': {'key': 'properties.publisher', 'type': 'str'}, + 'type': {'key': 'properties.type', 'type': 'str'}, + 'type_handler_version': {'key': 'properties.typeHandlerVersion', 'type': 'str'}, + 'auto_upgrade_minor_version': {'key': 'properties.autoUpgradeMinorVersion', 'type': 'bool'}, + 'settings': {'key': 'properties.settings', 'type': 'object'}, + 'protected_settings': {'key': 'properties.protectedSettings', 'type': 'object'}, + } + + def __init__(self, **kwargs): + super(VirtualMachineExtensionUpdate, self).__init__(**kwargs) + self.force_update_tag = kwargs.get('force_update_tag', None) + self.publisher = kwargs.get('publisher', None) + self.type = kwargs.get('type', None) + self.type_handler_version = kwargs.get('type_handler_version', None) + self.auto_upgrade_minor_version = kwargs.get('auto_upgrade_minor_version', None) + self.settings = kwargs.get('settings', None) + self.protected_settings = kwargs.get('protected_settings', None) + + +class VirtualMachineHealthStatus(Model): + """The health status of the VM. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar status: The health status information for the VM. + :vartype status: ~azure.mgmt.compute.v2018_04_01.models.InstanceViewStatus + """ + + _validation = { + 'status': {'readonly': True}, + } + + _attribute_map = { + 'status': {'key': 'status', 'type': 'InstanceViewStatus'}, + } + + def __init__(self, **kwargs): + super(VirtualMachineHealthStatus, self).__init__(**kwargs) + self.status = None + + +class VirtualMachineIdentity(Model): + """Identity for the virtual machine. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar principal_id: The principal id of virtual machine identity. This + property will only be provided for a system assigned identity. + :vartype principal_id: str + :ivar tenant_id: The tenant id associated with the virtual machine. This + property will only be provided for a system assigned identity. + :vartype tenant_id: str + :param type: The type of identity used for the virtual machine. The type + 'SystemAssigned, UserAssigned' includes both an implicitly created + identity and a set of user assigned identities. The type 'None' will + remove any identities from the virtual machine. Possible values include: + 'SystemAssigned', 'UserAssigned', 'SystemAssigned, UserAssigned', 'None' + :type type: str or + ~azure.mgmt.compute.v2018_04_01.models.ResourceIdentityType + :param identity_ids: The list of user identities associated with the + Virtual Machine. The user identity references will be ARM resource ids in + the form: + '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/identities/{identityName}'. + :type identity_ids: list[str] + """ + + _validation = { + 'principal_id': {'readonly': True}, + 'tenant_id': {'readonly': True}, + } + + _attribute_map = { + 'principal_id': {'key': 'principalId', 'type': 'str'}, + 'tenant_id': {'key': 'tenantId', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'ResourceIdentityType'}, + 'identity_ids': {'key': 'identityIds', 'type': '[str]'}, + } + + def __init__(self, **kwargs): + super(VirtualMachineIdentity, self).__init__(**kwargs) + self.principal_id = None + self.tenant_id = None + self.type = kwargs.get('type', None) + self.identity_ids = kwargs.get('identity_ids', None) + + +class VirtualMachineImageResource(SubResource): + """Virtual machine image resource information. + + All required parameters must be populated in order to send to Azure. + + :param id: Resource Id + :type id: str + :param name: Required. The name of the resource. + :type name: str + :param location: Required. The supported Azure location of the resource. + :type location: str + :param tags: Specifies the tags that are assigned to the virtual machine. + For more information about using tags, see [Using tags to organize your + Azure + resources](https://docs.microsoft.com/azure/azure-resource-manager/resource-group-using-tags.md). + :type tags: dict[str, str] + """ + + _validation = { + 'name': {'required': True}, + 'location': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__(self, **kwargs): + super(VirtualMachineImageResource, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.location = kwargs.get('location', None) + self.tags = kwargs.get('tags', None) + + +class VirtualMachineImage(VirtualMachineImageResource): + """Describes a Virtual Machine Image. + + All required parameters must be populated in order to send to Azure. + + :param id: Resource Id + :type id: str + :param name: Required. The name of the resource. + :type name: str + :param location: Required. The supported Azure location of the resource. + :type location: str + :param tags: Specifies the tags that are assigned to the virtual machine. + For more information about using tags, see [Using tags to organize your + Azure + resources](https://docs.microsoft.com/azure/azure-resource-manager/resource-group-using-tags.md). + :type tags: dict[str, str] + :param plan: + :type plan: ~azure.mgmt.compute.v2018_04_01.models.PurchasePlan + :param os_disk_image: + :type os_disk_image: ~azure.mgmt.compute.v2018_04_01.models.OSDiskImage + :param data_disk_images: + :type data_disk_images: + list[~azure.mgmt.compute.v2018_04_01.models.DataDiskImage] + """ + + _validation = { + 'name': {'required': True}, + 'location': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'plan': {'key': 'properties.plan', 'type': 'PurchasePlan'}, + 'os_disk_image': {'key': 'properties.osDiskImage', 'type': 'OSDiskImage'}, + 'data_disk_images': {'key': 'properties.dataDiskImages', 'type': '[DataDiskImage]'}, + } + + def __init__(self, **kwargs): + super(VirtualMachineImage, self).__init__(**kwargs) + self.plan = kwargs.get('plan', None) + self.os_disk_image = kwargs.get('os_disk_image', None) + self.data_disk_images = kwargs.get('data_disk_images', None) + + +class VirtualMachineInstanceView(Model): + """The instance view of a virtual machine. + + :param platform_update_domain: Specifies the update domain of the virtual + machine. + :type platform_update_domain: int + :param platform_fault_domain: Specifies the fault domain of the virtual + machine. + :type platform_fault_domain: int + :param computer_name: The computer name assigned to the virtual machine. + :type computer_name: str + :param os_name: The Operating System running on the virtual machine. + :type os_name: str + :param os_version: The version of Operating System running on the virtual + machine. + :type os_version: str + :param rdp_thumb_print: The Remote desktop certificate thumbprint. + :type rdp_thumb_print: str + :param vm_agent: The VM Agent running on the virtual machine. + :type vm_agent: + ~azure.mgmt.compute.v2018_04_01.models.VirtualMachineAgentInstanceView + :param maintenance_redeploy_status: The Maintenance Operation status on + the virtual machine. + :type maintenance_redeploy_status: + ~azure.mgmt.compute.v2018_04_01.models.MaintenanceRedeployStatus + :param disks: The virtual machine disk information. + :type disks: list[~azure.mgmt.compute.v2018_04_01.models.DiskInstanceView] + :param extensions: The extensions information. + :type extensions: + list[~azure.mgmt.compute.v2018_04_01.models.VirtualMachineExtensionInstanceView] + :param boot_diagnostics: Boot Diagnostics is a debugging feature which + allows you to view Console Output and Screenshot to diagnose VM status. +

    You can easily view the output of your console log.

    + Azure also enables you to see a screenshot of the VM from the hypervisor. + :type boot_diagnostics: + ~azure.mgmt.compute.v2018_04_01.models.BootDiagnosticsInstanceView + :param statuses: The resource status information. + :type statuses: + list[~azure.mgmt.compute.v2018_04_01.models.InstanceViewStatus] + """ + + _attribute_map = { + 'platform_update_domain': {'key': 'platformUpdateDomain', 'type': 'int'}, + 'platform_fault_domain': {'key': 'platformFaultDomain', 'type': 'int'}, + 'computer_name': {'key': 'computerName', 'type': 'str'}, + 'os_name': {'key': 'osName', 'type': 'str'}, + 'os_version': {'key': 'osVersion', 'type': 'str'}, + 'rdp_thumb_print': {'key': 'rdpThumbPrint', 'type': 'str'}, + 'vm_agent': {'key': 'vmAgent', 'type': 'VirtualMachineAgentInstanceView'}, + 'maintenance_redeploy_status': {'key': 'maintenanceRedeployStatus', 'type': 'MaintenanceRedeployStatus'}, + 'disks': {'key': 'disks', 'type': '[DiskInstanceView]'}, + 'extensions': {'key': 'extensions', 'type': '[VirtualMachineExtensionInstanceView]'}, + 'boot_diagnostics': {'key': 'bootDiagnostics', 'type': 'BootDiagnosticsInstanceView'}, + 'statuses': {'key': 'statuses', 'type': '[InstanceViewStatus]'}, + } + + def __init__(self, **kwargs): + super(VirtualMachineInstanceView, self).__init__(**kwargs) + self.platform_update_domain = kwargs.get('platform_update_domain', None) + self.platform_fault_domain = kwargs.get('platform_fault_domain', None) + self.computer_name = kwargs.get('computer_name', None) + self.os_name = kwargs.get('os_name', None) + self.os_version = kwargs.get('os_version', None) + self.rdp_thumb_print = kwargs.get('rdp_thumb_print', None) + self.vm_agent = kwargs.get('vm_agent', None) + self.maintenance_redeploy_status = kwargs.get('maintenance_redeploy_status', None) + self.disks = kwargs.get('disks', None) + self.extensions = kwargs.get('extensions', None) + self.boot_diagnostics = kwargs.get('boot_diagnostics', None) + self.statuses = kwargs.get('statuses', None) + + +class VirtualMachineScaleSet(Resource): + """Describes a Virtual Machine Scale Set. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource Id + :vartype id: str + :ivar name: Resource name + :vartype name: str + :ivar type: Resource type + :vartype type: str + :param location: Required. Resource location + :type location: str + :param tags: Resource tags + :type tags: dict[str, str] + :param sku: The virtual machine scale set sku. + :type sku: ~azure.mgmt.compute.v2018_04_01.models.Sku + :param plan: Specifies information about the marketplace image used to + create the virtual machine. This element is only used for marketplace + images. Before you can use a marketplace image from an API, you must + enable the image for programmatic use. In the Azure portal, find the + marketplace image that you want to use and then click **Want to deploy + programmatically, Get Started ->**. Enter any required information and + then click **Save**. + :type plan: ~azure.mgmt.compute.v2018_04_01.models.Plan + :param upgrade_policy: The upgrade policy. + :type upgrade_policy: ~azure.mgmt.compute.v2018_04_01.models.UpgradePolicy + :param virtual_machine_profile: The virtual machine profile. + :type virtual_machine_profile: + ~azure.mgmt.compute.v2018_04_01.models.VirtualMachineScaleSetVMProfile + :ivar provisioning_state: The provisioning state, which only appears in + the response. + :vartype provisioning_state: str + :param overprovision: Specifies whether the Virtual Machine Scale Set + should be overprovisioned. + :type overprovision: bool + :ivar unique_id: Specifies the ID which uniquely identifies a Virtual + Machine Scale Set. + :vartype unique_id: str + :param single_placement_group: When true this limits the scale set to a + single placement group, of max size 100 virtual machines. + :type single_placement_group: bool + :param zone_balance: Whether to force strictly even Virtual Machine + distribution cross x-zones in case there is zone outage. + :type zone_balance: bool + :param platform_fault_domain_count: Fault Domain count for each placement + group. + :type platform_fault_domain_count: int + :param proximity_placement_group: Specifies information about the + proximity placement group that the virtual machine scale set should be + assigned to.

    Minimum api-version: 2018-04-01. + :type proximity_placement_group: + ~azure.mgmt.compute.v2018_04_01.models.SubResource + :param identity: The identity of the virtual machine scale set, if + configured. + :type identity: + ~azure.mgmt.compute.v2018_04_01.models.VirtualMachineScaleSetIdentity + :param zones: The virtual machine scale set zones. + :type zones: list[str] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + 'provisioning_state': {'readonly': True}, + 'unique_id': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'sku': {'key': 'sku', 'type': 'Sku'}, + 'plan': {'key': 'plan', 'type': 'Plan'}, + 'upgrade_policy': {'key': 'properties.upgradePolicy', 'type': 'UpgradePolicy'}, + 'virtual_machine_profile': {'key': 'properties.virtualMachineProfile', 'type': 'VirtualMachineScaleSetVMProfile'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'overprovision': {'key': 'properties.overprovision', 'type': 'bool'}, + 'unique_id': {'key': 'properties.uniqueId', 'type': 'str'}, + 'single_placement_group': {'key': 'properties.singlePlacementGroup', 'type': 'bool'}, + 'zone_balance': {'key': 'properties.zoneBalance', 'type': 'bool'}, + 'platform_fault_domain_count': {'key': 'properties.platformFaultDomainCount', 'type': 'int'}, + 'proximity_placement_group': {'key': 'properties.proximityPlacementGroup', 'type': 'SubResource'}, + 'identity': {'key': 'identity', 'type': 'VirtualMachineScaleSetIdentity'}, + 'zones': {'key': 'zones', 'type': '[str]'}, + } + + def __init__(self, **kwargs): + super(VirtualMachineScaleSet, self).__init__(**kwargs) + self.sku = kwargs.get('sku', None) + self.plan = kwargs.get('plan', None) + self.upgrade_policy = kwargs.get('upgrade_policy', None) + self.virtual_machine_profile = kwargs.get('virtual_machine_profile', None) + self.provisioning_state = None + self.overprovision = kwargs.get('overprovision', None) + self.unique_id = None + self.single_placement_group = kwargs.get('single_placement_group', None) + self.zone_balance = kwargs.get('zone_balance', None) + self.platform_fault_domain_count = kwargs.get('platform_fault_domain_count', None) + self.proximity_placement_group = kwargs.get('proximity_placement_group', None) + self.identity = kwargs.get('identity', None) + self.zones = kwargs.get('zones', None) + + +class VirtualMachineScaleSetDataDisk(Model): + """Describes a virtual machine scale set data disk. + + All required parameters must be populated in order to send to Azure. + + :param name: The disk name. + :type name: str + :param lun: Required. Specifies the logical unit number of the data disk. + This value is used to identify data disks within the VM and therefore must + be unique for each data disk attached to a VM. + :type lun: int + :param caching: Specifies the caching requirements.

    Possible + values are:

    **None**

    **ReadOnly**

    **ReadWrite** +

    Default: **None for Standard storage. ReadOnly for Premium + storage**. Possible values include: 'None', 'ReadOnly', 'ReadWrite' + :type caching: str or ~azure.mgmt.compute.v2018_04_01.models.CachingTypes + :param write_accelerator_enabled: Specifies whether writeAccelerator + should be enabled or disabled on the disk. + :type write_accelerator_enabled: bool + :param create_option: Required. The create option. Possible values + include: 'FromImage', 'Empty', 'Attach' + :type create_option: str or + ~azure.mgmt.compute.v2018_04_01.models.DiskCreateOptionTypes + :param disk_size_gb: Specifies the size of an empty data disk in + gigabytes. This element can be used to overwrite the size of the disk in a + virtual machine image.

    This value cannot be larger than 1023 GB + :type disk_size_gb: int + :param managed_disk: The managed disk parameters. + :type managed_disk: + ~azure.mgmt.compute.v2018_04_01.models.VirtualMachineScaleSetManagedDiskParameters + """ + + _validation = { + 'lun': {'required': True}, + 'create_option': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'lun': {'key': 'lun', 'type': 'int'}, + 'caching': {'key': 'caching', 'type': 'CachingTypes'}, + 'write_accelerator_enabled': {'key': 'writeAcceleratorEnabled', 'type': 'bool'}, + 'create_option': {'key': 'createOption', 'type': 'str'}, + 'disk_size_gb': {'key': 'diskSizeGB', 'type': 'int'}, + 'managed_disk': {'key': 'managedDisk', 'type': 'VirtualMachineScaleSetManagedDiskParameters'}, + } + + def __init__(self, **kwargs): + super(VirtualMachineScaleSetDataDisk, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.lun = kwargs.get('lun', None) + self.caching = kwargs.get('caching', None) + self.write_accelerator_enabled = kwargs.get('write_accelerator_enabled', None) + self.create_option = kwargs.get('create_option', None) + self.disk_size_gb = kwargs.get('disk_size_gb', None) + self.managed_disk = kwargs.get('managed_disk', None) + + +class VirtualMachineScaleSetExtension(SubResourceReadOnly): + """Describes a Virtual Machine Scale Set Extension. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource Id + :vartype id: str + :param name: The name of the extension. + :type name: str + :param force_update_tag: If a value is provided and is different from the + previous value, the extension handler will be forced to update even if the + extension configuration has not changed. + :type force_update_tag: str + :param publisher: The name of the extension handler publisher. + :type publisher: str + :param type: Specifies the type of the extension; an example is + "CustomScriptExtension". + :type type: str + :param type_handler_version: Specifies the version of the script handler. + :type type_handler_version: str + :param auto_upgrade_minor_version: Indicates whether the extension should + use a newer minor version if one is available at deployment time. Once + deployed, however, the extension will not upgrade minor versions unless + redeployed, even with this property set to true. + :type auto_upgrade_minor_version: bool + :param settings: Json formatted public settings for the extension. + :type settings: object + :param protected_settings: The extension can contain either + protectedSettings or protectedSettingsFromKeyVault or no protected + settings at all. + :type protected_settings: object + :ivar provisioning_state: The provisioning state, which only appears in + the response. + :vartype provisioning_state: str + """ + + _validation = { + 'id': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'force_update_tag': {'key': 'properties.forceUpdateTag', 'type': 'str'}, + 'publisher': {'key': 'properties.publisher', 'type': 'str'}, + 'type': {'key': 'properties.type', 'type': 'str'}, + 'type_handler_version': {'key': 'properties.typeHandlerVersion', 'type': 'str'}, + 'auto_upgrade_minor_version': {'key': 'properties.autoUpgradeMinorVersion', 'type': 'bool'}, + 'settings': {'key': 'properties.settings', 'type': 'object'}, + 'protected_settings': {'key': 'properties.protectedSettings', 'type': 'object'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(VirtualMachineScaleSetExtension, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.force_update_tag = kwargs.get('force_update_tag', None) + self.publisher = kwargs.get('publisher', None) + self.type = kwargs.get('type', None) + self.type_handler_version = kwargs.get('type_handler_version', None) + self.auto_upgrade_minor_version = kwargs.get('auto_upgrade_minor_version', None) + self.settings = kwargs.get('settings', None) + self.protected_settings = kwargs.get('protected_settings', None) + self.provisioning_state = None + + +class VirtualMachineScaleSetExtensionProfile(Model): + """Describes a virtual machine scale set extension profile. + + :param extensions: The virtual machine scale set child extension + resources. + :type extensions: + list[~azure.mgmt.compute.v2018_04_01.models.VirtualMachineScaleSetExtension] + """ + + _attribute_map = { + 'extensions': {'key': 'extensions', 'type': '[VirtualMachineScaleSetExtension]'}, + } + + def __init__(self, **kwargs): + super(VirtualMachineScaleSetExtensionProfile, self).__init__(**kwargs) + self.extensions = kwargs.get('extensions', None) + + +class VirtualMachineScaleSetIdentity(Model): + """Identity for the virtual machine scale set. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar principal_id: The principal id of virtual machine scale set + identity. This property will only be provided for a system assigned + identity. + :vartype principal_id: str + :ivar tenant_id: The tenant id associated with the virtual machine scale + set. This property will only be provided for a system assigned identity. + :vartype tenant_id: str + :param type: The type of identity used for the virtual machine scale set. + The type 'SystemAssigned, UserAssigned' includes both an implicitly + created identity and a set of user assigned identities. The type 'None' + will remove any identities from the virtual machine scale set. Possible + values include: 'SystemAssigned', 'UserAssigned', 'SystemAssigned, + UserAssigned', 'None' + :type type: str or + ~azure.mgmt.compute.v2018_04_01.models.ResourceIdentityType + :param identity_ids: The list of user identities associated with the + virtual machine scale set. The user identity references will be ARM + resource ids in the form: + '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/identities/{identityName}'. + :type identity_ids: list[str] + """ + + _validation = { + 'principal_id': {'readonly': True}, + 'tenant_id': {'readonly': True}, + } + + _attribute_map = { + 'principal_id': {'key': 'principalId', 'type': 'str'}, + 'tenant_id': {'key': 'tenantId', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'ResourceIdentityType'}, + 'identity_ids': {'key': 'identityIds', 'type': '[str]'}, + } + + def __init__(self, **kwargs): + super(VirtualMachineScaleSetIdentity, self).__init__(**kwargs) + self.principal_id = None + self.tenant_id = None + self.type = kwargs.get('type', None) + self.identity_ids = kwargs.get('identity_ids', None) + + +class VirtualMachineScaleSetInstanceView(Model): + """The instance view of a virtual machine scale set. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar virtual_machine: The instance view status summary for the virtual + machine scale set. + :vartype virtual_machine: + ~azure.mgmt.compute.v2018_04_01.models.VirtualMachineScaleSetInstanceViewStatusesSummary + :ivar extensions: The extensions information. + :vartype extensions: + list[~azure.mgmt.compute.v2018_04_01.models.VirtualMachineScaleSetVMExtensionsSummary] + :param statuses: The resource status information. + :type statuses: + list[~azure.mgmt.compute.v2018_04_01.models.InstanceViewStatus] + """ + + _validation = { + 'virtual_machine': {'readonly': True}, + 'extensions': {'readonly': True}, + } + + _attribute_map = { + 'virtual_machine': {'key': 'virtualMachine', 'type': 'VirtualMachineScaleSetInstanceViewStatusesSummary'}, + 'extensions': {'key': 'extensions', 'type': '[VirtualMachineScaleSetVMExtensionsSummary]'}, + 'statuses': {'key': 'statuses', 'type': '[InstanceViewStatus]'}, + } + + def __init__(self, **kwargs): + super(VirtualMachineScaleSetInstanceView, self).__init__(**kwargs) + self.virtual_machine = None + self.extensions = None + self.statuses = kwargs.get('statuses', None) + + +class VirtualMachineScaleSetInstanceViewStatusesSummary(Model): + """Instance view statuses summary for virtual machines of a virtual machine + scale set. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar statuses_summary: The extensions information. + :vartype statuses_summary: + list[~azure.mgmt.compute.v2018_04_01.models.VirtualMachineStatusCodeCount] + """ + + _validation = { + 'statuses_summary': {'readonly': True}, + } + + _attribute_map = { + 'statuses_summary': {'key': 'statusesSummary', 'type': '[VirtualMachineStatusCodeCount]'}, + } + + def __init__(self, **kwargs): + super(VirtualMachineScaleSetInstanceViewStatusesSummary, self).__init__(**kwargs) + self.statuses_summary = None + + +class VirtualMachineScaleSetIPConfiguration(SubResource): + """Describes a virtual machine scale set network profile's IP configuration. + + All required parameters must be populated in order to send to Azure. + + :param id: Resource Id + :type id: str + :param name: Required. The IP configuration name. + :type name: str + :param subnet: Specifies the identifier of the subnet. + :type subnet: ~azure.mgmt.compute.v2018_04_01.models.ApiEntityReference + :param primary: Specifies the primary network interface in case the + virtual machine has more than 1 network interface. + :type primary: bool + :param public_ip_address_configuration: The publicIPAddressConfiguration. + :type public_ip_address_configuration: + ~azure.mgmt.compute.v2018_04_01.models.VirtualMachineScaleSetPublicIPAddressConfiguration + :param private_ip_address_version: Available from Api-Version 2017-03-30 + onwards, it represents whether the specific ipconfiguration is IPv4 or + IPv6. Default is taken as IPv4. Possible values are: 'IPv4' and 'IPv6'. + Possible values include: 'IPv4', 'IPv6' + :type private_ip_address_version: str or + ~azure.mgmt.compute.v2018_04_01.models.IPVersion + :param application_gateway_backend_address_pools: Specifies an array of + references to backend address pools of application gateways. A scale set + can reference backend address pools of multiple application gateways. + Multiple scale sets cannot use the same application gateway. + :type application_gateway_backend_address_pools: + list[~azure.mgmt.compute.v2018_04_01.models.SubResource] + :param load_balancer_backend_address_pools: Specifies an array of + references to backend address pools of load balancers. A scale set can + reference backend address pools of one public and one internal load + balancer. Multiple scale sets cannot use the same load balancer. + :type load_balancer_backend_address_pools: + list[~azure.mgmt.compute.v2018_04_01.models.SubResource] + :param load_balancer_inbound_nat_pools: Specifies an array of references + to inbound Nat pools of the load balancers. A scale set can reference + inbound nat pools of one public and one internal load balancer. Multiple + scale sets cannot use the same load balancer + :type load_balancer_inbound_nat_pools: + list[~azure.mgmt.compute.v2018_04_01.models.SubResource] + """ + + _validation = { + 'name': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'subnet': {'key': 'properties.subnet', 'type': 'ApiEntityReference'}, + 'primary': {'key': 'properties.primary', 'type': 'bool'}, + 'public_ip_address_configuration': {'key': 'properties.publicIPAddressConfiguration', 'type': 'VirtualMachineScaleSetPublicIPAddressConfiguration'}, + 'private_ip_address_version': {'key': 'properties.privateIPAddressVersion', 'type': 'str'}, + 'application_gateway_backend_address_pools': {'key': 'properties.applicationGatewayBackendAddressPools', 'type': '[SubResource]'}, + 'load_balancer_backend_address_pools': {'key': 'properties.loadBalancerBackendAddressPools', 'type': '[SubResource]'}, + 'load_balancer_inbound_nat_pools': {'key': 'properties.loadBalancerInboundNatPools', 'type': '[SubResource]'}, + } + + def __init__(self, **kwargs): + super(VirtualMachineScaleSetIPConfiguration, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.subnet = kwargs.get('subnet', None) + self.primary = kwargs.get('primary', None) + self.public_ip_address_configuration = kwargs.get('public_ip_address_configuration', None) + self.private_ip_address_version = kwargs.get('private_ip_address_version', None) + self.application_gateway_backend_address_pools = kwargs.get('application_gateway_backend_address_pools', None) + self.load_balancer_backend_address_pools = kwargs.get('load_balancer_backend_address_pools', None) + self.load_balancer_inbound_nat_pools = kwargs.get('load_balancer_inbound_nat_pools', None) + + +class VirtualMachineScaleSetIpTag(Model): + """Contains the IP tag associated with the public IP address. + + :param ip_tag_type: IP tag type. Example: FirstPartyUsage. + :type ip_tag_type: str + :param tag: IP tag associated with the public IP. Example: SQL, Storage + etc. + :type tag: str + """ + + _attribute_map = { + 'ip_tag_type': {'key': 'ipTagType', 'type': 'str'}, + 'tag': {'key': 'tag', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(VirtualMachineScaleSetIpTag, self).__init__(**kwargs) + self.ip_tag_type = kwargs.get('ip_tag_type', None) + self.tag = kwargs.get('tag', None) + + +class VirtualMachineScaleSetManagedDiskParameters(Model): + """Describes the parameters of a ScaleSet managed disk. + + :param storage_account_type: Specifies the storage account type for the + managed disk. Possible values are: Standard_LRS, Premium_LRS, and + StandardSSD_LRS. Possible values include: 'Standard_LRS', 'Premium_LRS', + 'StandardSSD_LRS' + :type storage_account_type: str or + ~azure.mgmt.compute.v2018_04_01.models.StorageAccountTypes + """ + + _attribute_map = { + 'storage_account_type': {'key': 'storageAccountType', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(VirtualMachineScaleSetManagedDiskParameters, self).__init__(**kwargs) + self.storage_account_type = kwargs.get('storage_account_type', None) + + +class VirtualMachineScaleSetNetworkConfiguration(SubResource): + """Describes a virtual machine scale set network profile's network + configurations. + + All required parameters must be populated in order to send to Azure. + + :param id: Resource Id + :type id: str + :param name: Required. The network configuration name. + :type name: str + :param primary: Specifies the primary network interface in case the + virtual machine has more than 1 network interface. + :type primary: bool + :param enable_accelerated_networking: Specifies whether the network + interface is accelerated networking-enabled. + :type enable_accelerated_networking: bool + :param network_security_group: The network security group. + :type network_security_group: + ~azure.mgmt.compute.v2018_04_01.models.SubResource + :param dns_settings: The dns settings to be applied on the network + interfaces. + :type dns_settings: + ~azure.mgmt.compute.v2018_04_01.models.VirtualMachineScaleSetNetworkConfigurationDnsSettings + :param ip_configurations: Required. Specifies the IP configurations of the + network interface. + :type ip_configurations: + list[~azure.mgmt.compute.v2018_04_01.models.VirtualMachineScaleSetIPConfiguration] + :param enable_ip_forwarding: Whether IP forwarding enabled on this NIC. + :type enable_ip_forwarding: bool + """ + + _validation = { + 'name': {'required': True}, + 'ip_configurations': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'primary': {'key': 'properties.primary', 'type': 'bool'}, + 'enable_accelerated_networking': {'key': 'properties.enableAcceleratedNetworking', 'type': 'bool'}, + 'network_security_group': {'key': 'properties.networkSecurityGroup', 'type': 'SubResource'}, + 'dns_settings': {'key': 'properties.dnsSettings', 'type': 'VirtualMachineScaleSetNetworkConfigurationDnsSettings'}, + 'ip_configurations': {'key': 'properties.ipConfigurations', 'type': '[VirtualMachineScaleSetIPConfiguration]'}, + 'enable_ip_forwarding': {'key': 'properties.enableIPForwarding', 'type': 'bool'}, + } + + def __init__(self, **kwargs): + super(VirtualMachineScaleSetNetworkConfiguration, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.primary = kwargs.get('primary', None) + self.enable_accelerated_networking = kwargs.get('enable_accelerated_networking', None) + self.network_security_group = kwargs.get('network_security_group', None) + self.dns_settings = kwargs.get('dns_settings', None) + self.ip_configurations = kwargs.get('ip_configurations', None) + self.enable_ip_forwarding = kwargs.get('enable_ip_forwarding', None) + + +class VirtualMachineScaleSetNetworkConfigurationDnsSettings(Model): + """Describes a virtual machines scale sets network configuration's DNS + settings. + + :param dns_servers: List of DNS servers IP addresses + :type dns_servers: list[str] + """ + + _attribute_map = { + 'dns_servers': {'key': 'dnsServers', 'type': '[str]'}, + } + + def __init__(self, **kwargs): + super(VirtualMachineScaleSetNetworkConfigurationDnsSettings, self).__init__(**kwargs) + self.dns_servers = kwargs.get('dns_servers', None) + + +class VirtualMachineScaleSetNetworkProfile(Model): + """Describes a virtual machine scale set network profile. + + :param health_probe: A reference to a load balancer probe used to + determine the health of an instance in the virtual machine scale set. The + reference will be in the form: + '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/probes/{probeName}'. + :type health_probe: + ~azure.mgmt.compute.v2018_04_01.models.ApiEntityReference + :param network_interface_configurations: The list of network + configurations. + :type network_interface_configurations: + list[~azure.mgmt.compute.v2018_04_01.models.VirtualMachineScaleSetNetworkConfiguration] + """ + + _attribute_map = { + 'health_probe': {'key': 'healthProbe', 'type': 'ApiEntityReference'}, + 'network_interface_configurations': {'key': 'networkInterfaceConfigurations', 'type': '[VirtualMachineScaleSetNetworkConfiguration]'}, + } + + def __init__(self, **kwargs): + super(VirtualMachineScaleSetNetworkProfile, self).__init__(**kwargs) + self.health_probe = kwargs.get('health_probe', None) + self.network_interface_configurations = kwargs.get('network_interface_configurations', None) + + +class VirtualMachineScaleSetOSDisk(Model): + """Describes a virtual machine scale set operating system disk. + + All required parameters must be populated in order to send to Azure. + + :param name: The disk name. + :type name: str + :param caching: Specifies the caching requirements.

    Possible + values are:

    **None**

    **ReadOnly**

    **ReadWrite** +

    Default: **None for Standard storage. ReadOnly for Premium + storage**. Possible values include: 'None', 'ReadOnly', 'ReadWrite' + :type caching: str or ~azure.mgmt.compute.v2018_04_01.models.CachingTypes + :param write_accelerator_enabled: Specifies whether writeAccelerator + should be enabled or disabled on the disk. + :type write_accelerator_enabled: bool + :param create_option: Required. Specifies how the virtual machines in the + scale set should be created.

    The only allowed value is: + **FromImage** \\u2013 This value is used when you are using an image to + create the virtual machine. If you are using a platform image, you also + use the imageReference element described above. If you are using a + marketplace image, you also use the plan element previously described. + Possible values include: 'FromImage', 'Empty', 'Attach' + :type create_option: str or + ~azure.mgmt.compute.v2018_04_01.models.DiskCreateOptionTypes + :param disk_size_gb: Specifies the size of the operating system disk in + gigabytes. This element can be used to overwrite the size of the disk in a + virtual machine image.

    This value cannot be larger than 1023 GB + :type disk_size_gb: int + :param os_type: This property allows you to specify the type of the OS + that is included in the disk if creating a VM from user-image or a + specialized VHD.

    Possible values are:

    **Windows** +

    **Linux**. Possible values include: 'Windows', 'Linux' + :type os_type: str or + ~azure.mgmt.compute.v2018_04_01.models.OperatingSystemTypes + :param image: Specifies information about the unmanaged user image to base + the scale set on. + :type image: ~azure.mgmt.compute.v2018_04_01.models.VirtualHardDisk + :param vhd_containers: Specifies the container urls that are used to store + operating system disks for the scale set. + :type vhd_containers: list[str] + :param managed_disk: The managed disk parameters. + :type managed_disk: + ~azure.mgmt.compute.v2018_04_01.models.VirtualMachineScaleSetManagedDiskParameters + """ + + _validation = { + 'create_option': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'caching': {'key': 'caching', 'type': 'CachingTypes'}, + 'write_accelerator_enabled': {'key': 'writeAcceleratorEnabled', 'type': 'bool'}, + 'create_option': {'key': 'createOption', 'type': 'str'}, + 'disk_size_gb': {'key': 'diskSizeGB', 'type': 'int'}, + 'os_type': {'key': 'osType', 'type': 'OperatingSystemTypes'}, + 'image': {'key': 'image', 'type': 'VirtualHardDisk'}, + 'vhd_containers': {'key': 'vhdContainers', 'type': '[str]'}, + 'managed_disk': {'key': 'managedDisk', 'type': 'VirtualMachineScaleSetManagedDiskParameters'}, + } + + def __init__(self, **kwargs): + super(VirtualMachineScaleSetOSDisk, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.caching = kwargs.get('caching', None) + self.write_accelerator_enabled = kwargs.get('write_accelerator_enabled', None) + self.create_option = kwargs.get('create_option', None) + self.disk_size_gb = kwargs.get('disk_size_gb', None) + self.os_type = kwargs.get('os_type', None) + self.image = kwargs.get('image', None) + self.vhd_containers = kwargs.get('vhd_containers', None) + self.managed_disk = kwargs.get('managed_disk', None) + + +class VirtualMachineScaleSetOSProfile(Model): + """Describes a virtual machine scale set OS profile. + + :param computer_name_prefix: Specifies the computer name prefix for all of + the virtual machines in the scale set. Computer name prefixes must be 1 to + 15 characters long. + :type computer_name_prefix: str + :param admin_username: Specifies the name of the administrator account. +

    **Windows-only restriction:** Cannot end in "."

    + **Disallowed values:** "administrator", "admin", "user", "user1", "test", + "user2", "test1", "user3", "admin1", "1", "123", "a", "actuser", "adm", + "admin2", "aspnet", "backup", "console", "david", "guest", "john", + "owner", "root", "server", "sql", "support", "support_388945a0", "sys", + "test2", "test3", "user4", "user5".

    **Minimum-length (Linux):** 1 + character

    **Max-length (Linux):** 64 characters

    + **Max-length (Windows):** 20 characters

  • For root access to + the Linux VM, see [Using root privileges on Linux virtual machines in + Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-use-root-privileges?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json)
  • + For a list of built-in system users on Linux that should not be used in + this field, see [Selecting User Names for Linux on + Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-usernames?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json) + :type admin_username: str + :param admin_password: Specifies the password of the administrator + account.

    **Minimum-length (Windows):** 8 characters

    + **Minimum-length (Linux):** 6 characters

    **Max-length + (Windows):** 123 characters

    **Max-length (Linux):** 72 characters +

    **Complexity requirements:** 3 out of 4 conditions below need to + be fulfilled
    Has lower characters
    Has upper characters
    Has a + digit
    Has a special character (Regex match [\\W_])

    + **Disallowed values:** "abc@123", "P@$$w0rd", "P@ssw0rd", "P@ssword123", + "Pa$$word", "pass@word1", "Password!", "Password1", "Password22", + "iloveyou!"

    For resetting the password, see [How to reset the + Remote Desktop service or its login password in a Windows + VM](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-reset-rdp?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json) +

    For resetting root password, see [Manage users, SSH, and check or + repair disks on Azure Linux VMs using the VMAccess + Extension](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-using-vmaccess-extension?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json#reset-root-password) + :type admin_password: str + :param custom_data: Specifies a base-64 encoded string of custom data. The + base-64 encoded string is decoded to a binary array that is saved as a + file on the Virtual Machine. The maximum length of the binary array is + 65535 bytes.

    For using cloud-init for your VM, see [Using + cloud-init to customize a Linux VM during + creation](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-using-cloud-init?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json) + :type custom_data: str + :param windows_configuration: Specifies Windows operating system settings + on the virtual machine. + :type windows_configuration: + ~azure.mgmt.compute.v2018_04_01.models.WindowsConfiguration + :param linux_configuration: Specifies the Linux operating system settings + on the virtual machine.

    For a list of supported Linux + distributions, see [Linux on Azure-Endorsed + Distributions](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-endorsed-distros?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json) +

    For running non-endorsed distributions, see [Information for + Non-Endorsed + Distributions](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-create-upload-generic?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json). + :type linux_configuration: + ~azure.mgmt.compute.v2018_04_01.models.LinuxConfiguration + :param secrets: Specifies set of certificates that should be installed + onto the virtual machines in the scale set. + :type secrets: + list[~azure.mgmt.compute.v2018_04_01.models.VaultSecretGroup] + """ + + _attribute_map = { + 'computer_name_prefix': {'key': 'computerNamePrefix', 'type': 'str'}, + 'admin_username': {'key': 'adminUsername', 'type': 'str'}, + 'admin_password': {'key': 'adminPassword', 'type': 'str'}, + 'custom_data': {'key': 'customData', 'type': 'str'}, + 'windows_configuration': {'key': 'windowsConfiguration', 'type': 'WindowsConfiguration'}, + 'linux_configuration': {'key': 'linuxConfiguration', 'type': 'LinuxConfiguration'}, + 'secrets': {'key': 'secrets', 'type': '[VaultSecretGroup]'}, + } + + def __init__(self, **kwargs): + super(VirtualMachineScaleSetOSProfile, self).__init__(**kwargs) + self.computer_name_prefix = kwargs.get('computer_name_prefix', None) + self.admin_username = kwargs.get('admin_username', None) + self.admin_password = kwargs.get('admin_password', None) + self.custom_data = kwargs.get('custom_data', None) + self.windows_configuration = kwargs.get('windows_configuration', None) + self.linux_configuration = kwargs.get('linux_configuration', None) + self.secrets = kwargs.get('secrets', None) + + +class VirtualMachineScaleSetPublicIPAddressConfiguration(Model): + """Describes a virtual machines scale set IP Configuration's PublicIPAddress + configuration. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. The publicIP address configuration name. + :type name: str + :param idle_timeout_in_minutes: The idle timeout of the public IP address. + :type idle_timeout_in_minutes: int + :param dns_settings: The dns settings to be applied on the publicIP + addresses . + :type dns_settings: + ~azure.mgmt.compute.v2018_04_01.models.VirtualMachineScaleSetPublicIPAddressConfigurationDnsSettings + :param ip_tags: The list of IP tags associated with the public IP address. + :type ip_tags: + list[~azure.mgmt.compute.v2018_04_01.models.VirtualMachineScaleSetIpTag] + """ + + _validation = { + 'name': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'idle_timeout_in_minutes': {'key': 'properties.idleTimeoutInMinutes', 'type': 'int'}, + 'dns_settings': {'key': 'properties.dnsSettings', 'type': 'VirtualMachineScaleSetPublicIPAddressConfigurationDnsSettings'}, + 'ip_tags': {'key': 'properties.ipTags', 'type': '[VirtualMachineScaleSetIpTag]'}, + } + + def __init__(self, **kwargs): + super(VirtualMachineScaleSetPublicIPAddressConfiguration, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.idle_timeout_in_minutes = kwargs.get('idle_timeout_in_minutes', None) + self.dns_settings = kwargs.get('dns_settings', None) + self.ip_tags = kwargs.get('ip_tags', None) + + +class VirtualMachineScaleSetPublicIPAddressConfigurationDnsSettings(Model): + """Describes a virtual machines scale sets network configuration's DNS + settings. + + All required parameters must be populated in order to send to Azure. + + :param domain_name_label: Required. The Domain name label.The + concatenation of the domain name label and vm index will be the domain + name labels of the PublicIPAddress resources that will be created + :type domain_name_label: str + """ + + _validation = { + 'domain_name_label': {'required': True}, + } + + _attribute_map = { + 'domain_name_label': {'key': 'domainNameLabel', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(VirtualMachineScaleSetPublicIPAddressConfigurationDnsSettings, self).__init__(**kwargs) + self.domain_name_label = kwargs.get('domain_name_label', None) + + +class VirtualMachineScaleSetSku(Model): + """Describes an available virtual machine scale set sku. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar resource_type: The type of resource the sku applies to. + :vartype resource_type: str + :ivar sku: The Sku. + :vartype sku: ~azure.mgmt.compute.v2018_04_01.models.Sku + :ivar capacity: Specifies the number of virtual machines in the scale set. + :vartype capacity: + ~azure.mgmt.compute.v2018_04_01.models.VirtualMachineScaleSetSkuCapacity + """ + + _validation = { + 'resource_type': {'readonly': True}, + 'sku': {'readonly': True}, + 'capacity': {'readonly': True}, + } + + _attribute_map = { + 'resource_type': {'key': 'resourceType', 'type': 'str'}, + 'sku': {'key': 'sku', 'type': 'Sku'}, + 'capacity': {'key': 'capacity', 'type': 'VirtualMachineScaleSetSkuCapacity'}, + } + + def __init__(self, **kwargs): + super(VirtualMachineScaleSetSku, self).__init__(**kwargs) + self.resource_type = None + self.sku = None + self.capacity = None + + +class VirtualMachineScaleSetSkuCapacity(Model): + """Describes scaling information of a sku. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar minimum: The minimum capacity. + :vartype minimum: long + :ivar maximum: The maximum capacity that can be set. + :vartype maximum: long + :ivar default_capacity: The default capacity. + :vartype default_capacity: long + :ivar scale_type: The scale type applicable to the sku. Possible values + include: 'Automatic', 'None' + :vartype scale_type: str or + ~azure.mgmt.compute.v2018_04_01.models.VirtualMachineScaleSetSkuScaleType + """ + + _validation = { + 'minimum': {'readonly': True}, + 'maximum': {'readonly': True}, + 'default_capacity': {'readonly': True}, + 'scale_type': {'readonly': True}, + } + + _attribute_map = { + 'minimum': {'key': 'minimum', 'type': 'long'}, + 'maximum': {'key': 'maximum', 'type': 'long'}, + 'default_capacity': {'key': 'defaultCapacity', 'type': 'long'}, + 'scale_type': {'key': 'scaleType', 'type': 'VirtualMachineScaleSetSkuScaleType'}, + } + + def __init__(self, **kwargs): + super(VirtualMachineScaleSetSkuCapacity, self).__init__(**kwargs) + self.minimum = None + self.maximum = None + self.default_capacity = None + self.scale_type = None + + +class VirtualMachineScaleSetStorageProfile(Model): + """Describes a virtual machine scale set storage profile. + + :param image_reference: Specifies information about the image to use. You + can specify information about platform images, marketplace images, or + virtual machine images. This element is required when you want to use a + platform image, marketplace image, or virtual machine image, but is not + used in other creation operations. + :type image_reference: + ~azure.mgmt.compute.v2018_04_01.models.ImageReference + :param os_disk: Specifies information about the operating system disk used + by the virtual machines in the scale set.

    For more information + about disks, see [About disks and VHDs for Azure virtual + machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-about-disks-vhds?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). + :type os_disk: + ~azure.mgmt.compute.v2018_04_01.models.VirtualMachineScaleSetOSDisk + :param data_disks: Specifies the parameters that are used to add data + disks to the virtual machines in the scale set.

    For more + information about disks, see [About disks and VHDs for Azure virtual + machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-about-disks-vhds?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). + :type data_disks: + list[~azure.mgmt.compute.v2018_04_01.models.VirtualMachineScaleSetDataDisk] + """ + + _attribute_map = { + 'image_reference': {'key': 'imageReference', 'type': 'ImageReference'}, + 'os_disk': {'key': 'osDisk', 'type': 'VirtualMachineScaleSetOSDisk'}, + 'data_disks': {'key': 'dataDisks', 'type': '[VirtualMachineScaleSetDataDisk]'}, + } + + def __init__(self, **kwargs): + super(VirtualMachineScaleSetStorageProfile, self).__init__(**kwargs) + self.image_reference = kwargs.get('image_reference', None) + self.os_disk = kwargs.get('os_disk', None) + self.data_disks = kwargs.get('data_disks', None) + + +class VirtualMachineScaleSetUpdate(UpdateResource): + """Describes a Virtual Machine Scale Set. + + :param tags: Resource tags + :type tags: dict[str, str] + :param sku: The virtual machine scale set sku. + :type sku: ~azure.mgmt.compute.v2018_04_01.models.Sku + :param plan: The purchase plan when deploying a virtual machine scale set + from VM Marketplace images. + :type plan: ~azure.mgmt.compute.v2018_04_01.models.Plan + :param upgrade_policy: The upgrade policy. + :type upgrade_policy: ~azure.mgmt.compute.v2018_04_01.models.UpgradePolicy + :param virtual_machine_profile: The virtual machine profile. + :type virtual_machine_profile: + ~azure.mgmt.compute.v2018_04_01.models.VirtualMachineScaleSetUpdateVMProfile + :param overprovision: Specifies whether the Virtual Machine Scale Set + should be overprovisioned. + :type overprovision: bool + :param single_placement_group: When true this limits the scale set to a + single placement group, of max size 100 virtual machines. + :type single_placement_group: bool + :param identity: The identity of the virtual machine scale set, if + configured. + :type identity: + ~azure.mgmt.compute.v2018_04_01.models.VirtualMachineScaleSetIdentity + """ + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + 'sku': {'key': 'sku', 'type': 'Sku'}, + 'plan': {'key': 'plan', 'type': 'Plan'}, + 'upgrade_policy': {'key': 'properties.upgradePolicy', 'type': 'UpgradePolicy'}, + 'virtual_machine_profile': {'key': 'properties.virtualMachineProfile', 'type': 'VirtualMachineScaleSetUpdateVMProfile'}, + 'overprovision': {'key': 'properties.overprovision', 'type': 'bool'}, + 'single_placement_group': {'key': 'properties.singlePlacementGroup', 'type': 'bool'}, + 'identity': {'key': 'identity', 'type': 'VirtualMachineScaleSetIdentity'}, + } + + def __init__(self, **kwargs): + super(VirtualMachineScaleSetUpdate, self).__init__(**kwargs) + self.sku = kwargs.get('sku', None) + self.plan = kwargs.get('plan', None) + self.upgrade_policy = kwargs.get('upgrade_policy', None) + self.virtual_machine_profile = kwargs.get('virtual_machine_profile', None) + self.overprovision = kwargs.get('overprovision', None) + self.single_placement_group = kwargs.get('single_placement_group', None) + self.identity = kwargs.get('identity', None) + + +class VirtualMachineScaleSetUpdateIPConfiguration(SubResource): + """Describes a virtual machine scale set network profile's IP configuration. + + :param id: Resource Id + :type id: str + :param name: The IP configuration name. + :type name: str + :param subnet: The subnet. + :type subnet: ~azure.mgmt.compute.v2018_04_01.models.ApiEntityReference + :param primary: Specifies the primary IP Configuration in case the network + interface has more than one IP Configuration. + :type primary: bool + :param public_ip_address_configuration: The publicIPAddressConfiguration. + :type public_ip_address_configuration: + ~azure.mgmt.compute.v2018_04_01.models.VirtualMachineScaleSetUpdatePublicIPAddressConfiguration + :param private_ip_address_version: Available from Api-Version 2017-03-30 + onwards, it represents whether the specific ipconfiguration is IPv4 or + IPv6. Default is taken as IPv4. Possible values are: 'IPv4' and 'IPv6'. + Possible values include: 'IPv4', 'IPv6' + :type private_ip_address_version: str or + ~azure.mgmt.compute.v2018_04_01.models.IPVersion + :param application_gateway_backend_address_pools: The application gateway + backend address pools. + :type application_gateway_backend_address_pools: + list[~azure.mgmt.compute.v2018_04_01.models.SubResource] + :param load_balancer_backend_address_pools: The load balancer backend + address pools. + :type load_balancer_backend_address_pools: + list[~azure.mgmt.compute.v2018_04_01.models.SubResource] + :param load_balancer_inbound_nat_pools: The load balancer inbound nat + pools. + :type load_balancer_inbound_nat_pools: + list[~azure.mgmt.compute.v2018_04_01.models.SubResource] + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'subnet': {'key': 'properties.subnet', 'type': 'ApiEntityReference'}, + 'primary': {'key': 'properties.primary', 'type': 'bool'}, + 'public_ip_address_configuration': {'key': 'properties.publicIPAddressConfiguration', 'type': 'VirtualMachineScaleSetUpdatePublicIPAddressConfiguration'}, + 'private_ip_address_version': {'key': 'properties.privateIPAddressVersion', 'type': 'str'}, + 'application_gateway_backend_address_pools': {'key': 'properties.applicationGatewayBackendAddressPools', 'type': '[SubResource]'}, + 'load_balancer_backend_address_pools': {'key': 'properties.loadBalancerBackendAddressPools', 'type': '[SubResource]'}, + 'load_balancer_inbound_nat_pools': {'key': 'properties.loadBalancerInboundNatPools', 'type': '[SubResource]'}, + } + + def __init__(self, **kwargs): + super(VirtualMachineScaleSetUpdateIPConfiguration, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.subnet = kwargs.get('subnet', None) + self.primary = kwargs.get('primary', None) + self.public_ip_address_configuration = kwargs.get('public_ip_address_configuration', None) + self.private_ip_address_version = kwargs.get('private_ip_address_version', None) + self.application_gateway_backend_address_pools = kwargs.get('application_gateway_backend_address_pools', None) + self.load_balancer_backend_address_pools = kwargs.get('load_balancer_backend_address_pools', None) + self.load_balancer_inbound_nat_pools = kwargs.get('load_balancer_inbound_nat_pools', None) + + +class VirtualMachineScaleSetUpdateNetworkConfiguration(SubResource): + """Describes a virtual machine scale set network profile's network + configurations. + + :param id: Resource Id + :type id: str + :param name: The network configuration name. + :type name: str + :param primary: Whether this is a primary NIC on a virtual machine. + :type primary: bool + :param enable_accelerated_networking: Specifies whether the network + interface is accelerated networking-enabled. + :type enable_accelerated_networking: bool + :param network_security_group: The network security group. + :type network_security_group: + ~azure.mgmt.compute.v2018_04_01.models.SubResource + :param dns_settings: The dns settings to be applied on the network + interfaces. + :type dns_settings: + ~azure.mgmt.compute.v2018_04_01.models.VirtualMachineScaleSetNetworkConfigurationDnsSettings + :param ip_configurations: The virtual machine scale set IP Configuration. + :type ip_configurations: + list[~azure.mgmt.compute.v2018_04_01.models.VirtualMachineScaleSetUpdateIPConfiguration] + :param enable_ip_forwarding: Whether IP forwarding enabled on this NIC. + :type enable_ip_forwarding: bool + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'primary': {'key': 'properties.primary', 'type': 'bool'}, + 'enable_accelerated_networking': {'key': 'properties.enableAcceleratedNetworking', 'type': 'bool'}, + 'network_security_group': {'key': 'properties.networkSecurityGroup', 'type': 'SubResource'}, + 'dns_settings': {'key': 'properties.dnsSettings', 'type': 'VirtualMachineScaleSetNetworkConfigurationDnsSettings'}, + 'ip_configurations': {'key': 'properties.ipConfigurations', 'type': '[VirtualMachineScaleSetUpdateIPConfiguration]'}, + 'enable_ip_forwarding': {'key': 'properties.enableIPForwarding', 'type': 'bool'}, + } + + def __init__(self, **kwargs): + super(VirtualMachineScaleSetUpdateNetworkConfiguration, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.primary = kwargs.get('primary', None) + self.enable_accelerated_networking = kwargs.get('enable_accelerated_networking', None) + self.network_security_group = kwargs.get('network_security_group', None) + self.dns_settings = kwargs.get('dns_settings', None) + self.ip_configurations = kwargs.get('ip_configurations', None) + self.enable_ip_forwarding = kwargs.get('enable_ip_forwarding', None) + + +class VirtualMachineScaleSetUpdateNetworkProfile(Model): + """Describes a virtual machine scale set network profile. + + :param network_interface_configurations: The list of network + configurations. + :type network_interface_configurations: + list[~azure.mgmt.compute.v2018_04_01.models.VirtualMachineScaleSetUpdateNetworkConfiguration] + """ + + _attribute_map = { + 'network_interface_configurations': {'key': 'networkInterfaceConfigurations', 'type': '[VirtualMachineScaleSetUpdateNetworkConfiguration]'}, + } + + def __init__(self, **kwargs): + super(VirtualMachineScaleSetUpdateNetworkProfile, self).__init__(**kwargs) + self.network_interface_configurations = kwargs.get('network_interface_configurations', None) + + +class VirtualMachineScaleSetUpdateOSDisk(Model): + """Describes virtual machine scale set operating system disk Update Object. + This should be used for Updating VMSS OS Disk. + + :param caching: The caching type. Possible values include: 'None', + 'ReadOnly', 'ReadWrite' + :type caching: str or ~azure.mgmt.compute.v2018_04_01.models.CachingTypes + :param write_accelerator_enabled: Specifies whether writeAccelerator + should be enabled or disabled on the disk. + :type write_accelerator_enabled: bool + :param disk_size_gb: Specifies the size of the operating system disk in + gigabytes. This element can be used to overwrite the size of the disk in a + virtual machine image.

    This value cannot be larger than 1023 GB + :type disk_size_gb: int + :param image: The Source User Image VirtualHardDisk. This VirtualHardDisk + will be copied before using it to attach to the Virtual Machine. If + SourceImage is provided, the destination VirtualHardDisk should not exist. + :type image: ~azure.mgmt.compute.v2018_04_01.models.VirtualHardDisk + :param vhd_containers: The list of virtual hard disk container uris. + :type vhd_containers: list[str] + :param managed_disk: The managed disk parameters. + :type managed_disk: + ~azure.mgmt.compute.v2018_04_01.models.VirtualMachineScaleSetManagedDiskParameters + """ + + _attribute_map = { + 'caching': {'key': 'caching', 'type': 'CachingTypes'}, + 'write_accelerator_enabled': {'key': 'writeAcceleratorEnabled', 'type': 'bool'}, + 'disk_size_gb': {'key': 'diskSizeGB', 'type': 'int'}, + 'image': {'key': 'image', 'type': 'VirtualHardDisk'}, + 'vhd_containers': {'key': 'vhdContainers', 'type': '[str]'}, + 'managed_disk': {'key': 'managedDisk', 'type': 'VirtualMachineScaleSetManagedDiskParameters'}, + } + + def __init__(self, **kwargs): + super(VirtualMachineScaleSetUpdateOSDisk, self).__init__(**kwargs) + self.caching = kwargs.get('caching', None) + self.write_accelerator_enabled = kwargs.get('write_accelerator_enabled', None) + self.disk_size_gb = kwargs.get('disk_size_gb', None) + self.image = kwargs.get('image', None) + self.vhd_containers = kwargs.get('vhd_containers', None) + self.managed_disk = kwargs.get('managed_disk', None) + + +class VirtualMachineScaleSetUpdateOSProfile(Model): + """Describes a virtual machine scale set OS profile. + + :param custom_data: A base-64 encoded string of custom data. + :type custom_data: str + :param windows_configuration: The Windows Configuration of the OS profile. + :type windows_configuration: + ~azure.mgmt.compute.v2018_04_01.models.WindowsConfiguration + :param linux_configuration: The Linux Configuration of the OS profile. + :type linux_configuration: + ~azure.mgmt.compute.v2018_04_01.models.LinuxConfiguration + :param secrets: The List of certificates for addition to the VM. + :type secrets: + list[~azure.mgmt.compute.v2018_04_01.models.VaultSecretGroup] + """ + + _attribute_map = { + 'custom_data': {'key': 'customData', 'type': 'str'}, + 'windows_configuration': {'key': 'windowsConfiguration', 'type': 'WindowsConfiguration'}, + 'linux_configuration': {'key': 'linuxConfiguration', 'type': 'LinuxConfiguration'}, + 'secrets': {'key': 'secrets', 'type': '[VaultSecretGroup]'}, + } + + def __init__(self, **kwargs): + super(VirtualMachineScaleSetUpdateOSProfile, self).__init__(**kwargs) + self.custom_data = kwargs.get('custom_data', None) + self.windows_configuration = kwargs.get('windows_configuration', None) + self.linux_configuration = kwargs.get('linux_configuration', None) + self.secrets = kwargs.get('secrets', None) + + +class VirtualMachineScaleSetUpdatePublicIPAddressConfiguration(Model): + """Describes a virtual machines scale set IP Configuration's PublicIPAddress + configuration. + + :param name: The publicIP address configuration name. + :type name: str + :param idle_timeout_in_minutes: The idle timeout of the public IP address. + :type idle_timeout_in_minutes: int + :param dns_settings: The dns settings to be applied on the publicIP + addresses . + :type dns_settings: + ~azure.mgmt.compute.v2018_04_01.models.VirtualMachineScaleSetPublicIPAddressConfigurationDnsSettings + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'idle_timeout_in_minutes': {'key': 'properties.idleTimeoutInMinutes', 'type': 'int'}, + 'dns_settings': {'key': 'properties.dnsSettings', 'type': 'VirtualMachineScaleSetPublicIPAddressConfigurationDnsSettings'}, + } + + def __init__(self, **kwargs): + super(VirtualMachineScaleSetUpdatePublicIPAddressConfiguration, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.idle_timeout_in_minutes = kwargs.get('idle_timeout_in_minutes', None) + self.dns_settings = kwargs.get('dns_settings', None) + + +class VirtualMachineScaleSetUpdateStorageProfile(Model): + """Describes a virtual machine scale set storage profile. + + :param image_reference: The image reference. + :type image_reference: + ~azure.mgmt.compute.v2018_04_01.models.ImageReference + :param os_disk: The OS disk. + :type os_disk: + ~azure.mgmt.compute.v2018_04_01.models.VirtualMachineScaleSetUpdateOSDisk + :param data_disks: The data disks. + :type data_disks: + list[~azure.mgmt.compute.v2018_04_01.models.VirtualMachineScaleSetDataDisk] + """ + + _attribute_map = { + 'image_reference': {'key': 'imageReference', 'type': 'ImageReference'}, + 'os_disk': {'key': 'osDisk', 'type': 'VirtualMachineScaleSetUpdateOSDisk'}, + 'data_disks': {'key': 'dataDisks', 'type': '[VirtualMachineScaleSetDataDisk]'}, + } + + def __init__(self, **kwargs): + super(VirtualMachineScaleSetUpdateStorageProfile, self).__init__(**kwargs) + self.image_reference = kwargs.get('image_reference', None) + self.os_disk = kwargs.get('os_disk', None) + self.data_disks = kwargs.get('data_disks', None) + + +class VirtualMachineScaleSetUpdateVMProfile(Model): + """Describes a virtual machine scale set virtual machine profile. + + :param os_profile: The virtual machine scale set OS profile. + :type os_profile: + ~azure.mgmt.compute.v2018_04_01.models.VirtualMachineScaleSetUpdateOSProfile + :param storage_profile: The virtual machine scale set storage profile. + :type storage_profile: + ~azure.mgmt.compute.v2018_04_01.models.VirtualMachineScaleSetUpdateStorageProfile + :param network_profile: The virtual machine scale set network profile. + :type network_profile: + ~azure.mgmt.compute.v2018_04_01.models.VirtualMachineScaleSetUpdateNetworkProfile + :param diagnostics_profile: The virtual machine scale set diagnostics + profile. + :type diagnostics_profile: + ~azure.mgmt.compute.v2018_04_01.models.DiagnosticsProfile + :param extension_profile: The virtual machine scale set extension profile. + :type extension_profile: + ~azure.mgmt.compute.v2018_04_01.models.VirtualMachineScaleSetExtensionProfile + :param license_type: The license type, which is for bring your own license + scenario. + :type license_type: str + """ + + _attribute_map = { + 'os_profile': {'key': 'osProfile', 'type': 'VirtualMachineScaleSetUpdateOSProfile'}, + 'storage_profile': {'key': 'storageProfile', 'type': 'VirtualMachineScaleSetUpdateStorageProfile'}, + 'network_profile': {'key': 'networkProfile', 'type': 'VirtualMachineScaleSetUpdateNetworkProfile'}, + 'diagnostics_profile': {'key': 'diagnosticsProfile', 'type': 'DiagnosticsProfile'}, + 'extension_profile': {'key': 'extensionProfile', 'type': 'VirtualMachineScaleSetExtensionProfile'}, + 'license_type': {'key': 'licenseType', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(VirtualMachineScaleSetUpdateVMProfile, self).__init__(**kwargs) + self.os_profile = kwargs.get('os_profile', None) + self.storage_profile = kwargs.get('storage_profile', None) + self.network_profile = kwargs.get('network_profile', None) + self.diagnostics_profile = kwargs.get('diagnostics_profile', None) + self.extension_profile = kwargs.get('extension_profile', None) + self.license_type = kwargs.get('license_type', None) + + +class VirtualMachineScaleSetVM(Resource): + """Describes a virtual machine scale set virtual machine. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource Id + :vartype id: str + :ivar name: Resource name + :vartype name: str + :ivar type: Resource type + :vartype type: str + :param location: Required. Resource location + :type location: str + :param tags: Resource tags + :type tags: dict[str, str] + :ivar instance_id: The virtual machine instance ID. + :vartype instance_id: str + :ivar sku: The virtual machine SKU. + :vartype sku: ~azure.mgmt.compute.v2018_04_01.models.Sku + :ivar latest_model_applied: Specifies whether the latest model has been + applied to the virtual machine. + :vartype latest_model_applied: bool + :ivar vm_id: Azure VM unique ID. + :vartype vm_id: str + :ivar instance_view: The virtual machine instance view. + :vartype instance_view: + ~azure.mgmt.compute.v2018_04_01.models.VirtualMachineScaleSetVMInstanceView + :param hardware_profile: Specifies the hardware settings for the virtual + machine. + :type hardware_profile: + ~azure.mgmt.compute.v2018_04_01.models.HardwareProfile + :param storage_profile: Specifies the storage settings for the virtual + machine disks. + :type storage_profile: + ~azure.mgmt.compute.v2018_04_01.models.StorageProfile + :param os_profile: Specifies the operating system settings for the virtual + machine. + :type os_profile: ~azure.mgmt.compute.v2018_04_01.models.OSProfile + :param network_profile: Specifies the network interfaces of the virtual + machine. + :type network_profile: + ~azure.mgmt.compute.v2018_04_01.models.NetworkProfile + :param diagnostics_profile: Specifies the boot diagnostic settings state. +

    Minimum api-version: 2015-06-15. + :type diagnostics_profile: + ~azure.mgmt.compute.v2018_04_01.models.DiagnosticsProfile + :param availability_set: Specifies information about the availability set + that the virtual machine should be assigned to. Virtual machines specified + in the same availability set are allocated to different nodes to maximize + availability. For more information about availability sets, see [Manage + the availability of virtual + machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-manage-availability?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). +

    For more information on Azure planned maintenance, see [Planned + maintenance for virtual machines in + Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-planned-maintenance?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json) +

    Currently, a VM can only be added to availability set at creation + time. An existing VM cannot be added to an availability set. + :type availability_set: ~azure.mgmt.compute.v2018_04_01.models.SubResource + :ivar provisioning_state: The provisioning state, which only appears in + the response. + :vartype provisioning_state: str + :param license_type: Specifies that the image or disk that is being used + was licensed on-premises. This element is only used for images that + contain the Windows Server operating system.

    Possible values are: +

    Windows_Client

    Windows_Server

    If this element + is included in a request for an update, the value must match the initial + value. This value cannot be updated.

    For more information, see + [Azure Hybrid Use Benefit for Windows + Server](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-hybrid-use-benefit-licensing?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json) +

    Minimum api-version: 2015-06-15 + :type license_type: str + :param plan: Specifies information about the marketplace image used to + create the virtual machine. This element is only used for marketplace + images. Before you can use a marketplace image from an API, you must + enable the image for programmatic use. In the Azure portal, find the + marketplace image that you want to use and then click **Want to deploy + programmatically, Get Started ->**. Enter any required information and + then click **Save**. + :type plan: ~azure.mgmt.compute.v2018_04_01.models.Plan + :ivar resources: The virtual machine child extension resources. + :vartype resources: + list[~azure.mgmt.compute.v2018_04_01.models.VirtualMachineExtension] + :ivar zones: The virtual machine zones. + :vartype zones: list[str] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + 'instance_id': {'readonly': True}, + 'sku': {'readonly': True}, + 'latest_model_applied': {'readonly': True}, + 'vm_id': {'readonly': True}, + 'instance_view': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + 'resources': {'readonly': True}, + 'zones': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'instance_id': {'key': 'instanceId', 'type': 'str'}, + 'sku': {'key': 'sku', 'type': 'Sku'}, + 'latest_model_applied': {'key': 'properties.latestModelApplied', 'type': 'bool'}, + 'vm_id': {'key': 'properties.vmId', 'type': 'str'}, + 'instance_view': {'key': 'properties.instanceView', 'type': 'VirtualMachineScaleSetVMInstanceView'}, + 'hardware_profile': {'key': 'properties.hardwareProfile', 'type': 'HardwareProfile'}, + 'storage_profile': {'key': 'properties.storageProfile', 'type': 'StorageProfile'}, + 'os_profile': {'key': 'properties.osProfile', 'type': 'OSProfile'}, + 'network_profile': {'key': 'properties.networkProfile', 'type': 'NetworkProfile'}, + 'diagnostics_profile': {'key': 'properties.diagnosticsProfile', 'type': 'DiagnosticsProfile'}, + 'availability_set': {'key': 'properties.availabilitySet', 'type': 'SubResource'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'license_type': {'key': 'properties.licenseType', 'type': 'str'}, + 'plan': {'key': 'plan', 'type': 'Plan'}, + 'resources': {'key': 'resources', 'type': '[VirtualMachineExtension]'}, + 'zones': {'key': 'zones', 'type': '[str]'}, + } + + def __init__(self, **kwargs): + super(VirtualMachineScaleSetVM, self).__init__(**kwargs) + self.instance_id = None + self.sku = None + self.latest_model_applied = None + self.vm_id = None + self.instance_view = None + self.hardware_profile = kwargs.get('hardware_profile', None) + self.storage_profile = kwargs.get('storage_profile', None) + self.os_profile = kwargs.get('os_profile', None) + self.network_profile = kwargs.get('network_profile', None) + self.diagnostics_profile = kwargs.get('diagnostics_profile', None) + self.availability_set = kwargs.get('availability_set', None) + self.provisioning_state = None + self.license_type = kwargs.get('license_type', None) + self.plan = kwargs.get('plan', None) + self.resources = None + self.zones = None + + +class VirtualMachineScaleSetVMExtensionsSummary(Model): + """Extensions summary for virtual machines of a virtual machine scale set. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar name: The extension name. + :vartype name: str + :ivar statuses_summary: The extensions information. + :vartype statuses_summary: + list[~azure.mgmt.compute.v2018_04_01.models.VirtualMachineStatusCodeCount] + """ + + _validation = { + 'name': {'readonly': True}, + 'statuses_summary': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'statuses_summary': {'key': 'statusesSummary', 'type': '[VirtualMachineStatusCodeCount]'}, + } + + def __init__(self, **kwargs): + super(VirtualMachineScaleSetVMExtensionsSummary, self).__init__(**kwargs) + self.name = None + self.statuses_summary = None + + +class VirtualMachineScaleSetVMInstanceIDs(Model): + """Specifies a list of virtual machine instance IDs from the VM scale set. + + :param instance_ids: The virtual machine scale set instance ids. Omitting + the virtual machine scale set instance ids will result in the operation + being performed on all virtual machines in the virtual machine scale set. + :type instance_ids: list[str] + """ + + _attribute_map = { + 'instance_ids': {'key': 'instanceIds', 'type': '[str]'}, + } + + def __init__(self, **kwargs): + super(VirtualMachineScaleSetVMInstanceIDs, self).__init__(**kwargs) + self.instance_ids = kwargs.get('instance_ids', None) + + +class VirtualMachineScaleSetVMInstanceRequiredIDs(Model): + """Specifies a list of virtual machine instance IDs from the VM scale set. + + All required parameters must be populated in order to send to Azure. + + :param instance_ids: Required. The virtual machine scale set instance ids. + :type instance_ids: list[str] + """ + + _validation = { + 'instance_ids': {'required': True}, + } + + _attribute_map = { + 'instance_ids': {'key': 'instanceIds', 'type': '[str]'}, + } + + def __init__(self, **kwargs): + super(VirtualMachineScaleSetVMInstanceRequiredIDs, self).__init__(**kwargs) + self.instance_ids = kwargs.get('instance_ids', None) + + +class VirtualMachineScaleSetVMInstanceView(Model): + """The instance view of a virtual machine scale set VM. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :param platform_update_domain: The Update Domain count. + :type platform_update_domain: int + :param platform_fault_domain: The Fault Domain count. + :type platform_fault_domain: int + :param rdp_thumb_print: The Remote desktop certificate thumbprint. + :type rdp_thumb_print: str + :param vm_agent: The VM Agent running on the virtual machine. + :type vm_agent: + ~azure.mgmt.compute.v2018_04_01.models.VirtualMachineAgentInstanceView + :param maintenance_redeploy_status: The Maintenance Operation status on + the virtual machine. + :type maintenance_redeploy_status: + ~azure.mgmt.compute.v2018_04_01.models.MaintenanceRedeployStatus + :param disks: The disks information. + :type disks: list[~azure.mgmt.compute.v2018_04_01.models.DiskInstanceView] + :param extensions: The extensions information. + :type extensions: + list[~azure.mgmt.compute.v2018_04_01.models.VirtualMachineExtensionInstanceView] + :ivar vm_health: The health status for the VM. + :vartype vm_health: + ~azure.mgmt.compute.v2018_04_01.models.VirtualMachineHealthStatus + :param boot_diagnostics: Boot Diagnostics is a debugging feature which + allows you to view Console Output and Screenshot to diagnose VM status. +

    You can easily view the output of your console log.

    + Azure also enables you to see a screenshot of the VM from the hypervisor. + :type boot_diagnostics: + ~azure.mgmt.compute.v2018_04_01.models.BootDiagnosticsInstanceView + :param statuses: The resource status information. + :type statuses: + list[~azure.mgmt.compute.v2018_04_01.models.InstanceViewStatus] + :param placement_group_id: The placement group in which the VM is running. + If the VM is deallocated it will not have a placementGroupId. + :type placement_group_id: str + """ + + _validation = { + 'vm_health': {'readonly': True}, + } + + _attribute_map = { + 'platform_update_domain': {'key': 'platformUpdateDomain', 'type': 'int'}, + 'platform_fault_domain': {'key': 'platformFaultDomain', 'type': 'int'}, + 'rdp_thumb_print': {'key': 'rdpThumbPrint', 'type': 'str'}, + 'vm_agent': {'key': 'vmAgent', 'type': 'VirtualMachineAgentInstanceView'}, + 'maintenance_redeploy_status': {'key': 'maintenanceRedeployStatus', 'type': 'MaintenanceRedeployStatus'}, + 'disks': {'key': 'disks', 'type': '[DiskInstanceView]'}, + 'extensions': {'key': 'extensions', 'type': '[VirtualMachineExtensionInstanceView]'}, + 'vm_health': {'key': 'vmHealth', 'type': 'VirtualMachineHealthStatus'}, + 'boot_diagnostics': {'key': 'bootDiagnostics', 'type': 'BootDiagnosticsInstanceView'}, + 'statuses': {'key': 'statuses', 'type': '[InstanceViewStatus]'}, + 'placement_group_id': {'key': 'placementGroupId', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(VirtualMachineScaleSetVMInstanceView, self).__init__(**kwargs) + self.platform_update_domain = kwargs.get('platform_update_domain', None) + self.platform_fault_domain = kwargs.get('platform_fault_domain', None) + self.rdp_thumb_print = kwargs.get('rdp_thumb_print', None) + self.vm_agent = kwargs.get('vm_agent', None) + self.maintenance_redeploy_status = kwargs.get('maintenance_redeploy_status', None) + self.disks = kwargs.get('disks', None) + self.extensions = kwargs.get('extensions', None) + self.vm_health = None + self.boot_diagnostics = kwargs.get('boot_diagnostics', None) + self.statuses = kwargs.get('statuses', None) + self.placement_group_id = kwargs.get('placement_group_id', None) + + +class VirtualMachineScaleSetVMProfile(Model): + """Describes a virtual machine scale set virtual machine profile. + + :param os_profile: Specifies the operating system settings for the virtual + machines in the scale set. + :type os_profile: + ~azure.mgmt.compute.v2018_04_01.models.VirtualMachineScaleSetOSProfile + :param storage_profile: Specifies the storage settings for the virtual + machine disks. + :type storage_profile: + ~azure.mgmt.compute.v2018_04_01.models.VirtualMachineScaleSetStorageProfile + :param network_profile: Specifies properties of the network interfaces of + the virtual machines in the scale set. + :type network_profile: + ~azure.mgmt.compute.v2018_04_01.models.VirtualMachineScaleSetNetworkProfile + :param diagnostics_profile: Specifies the boot diagnostic settings state. +

    Minimum api-version: 2015-06-15. + :type diagnostics_profile: + ~azure.mgmt.compute.v2018_04_01.models.DiagnosticsProfile + :param extension_profile: Specifies a collection of settings for + extensions installed on virtual machines in the scale set. + :type extension_profile: + ~azure.mgmt.compute.v2018_04_01.models.VirtualMachineScaleSetExtensionProfile + :param license_type: Specifies that the image or disk that is being used + was licensed on-premises. This element is only used for images that + contain the Windows Server operating system.

    Possible values are: +

    Windows_Client

    Windows_Server

    If this element + is included in a request for an update, the value must match the initial + value. This value cannot be updated.

    For more information, see + [Azure Hybrid Use Benefit for Windows + Server](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-hybrid-use-benefit-licensing?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json) +

    Minimum api-version: 2015-06-15 + :type license_type: str + :param priority: Specifies the priority for the virtual machines in the + scale set.

    Minimum api-version: 2017-10-30-preview. Possible + values include: 'Regular', 'Low' + :type priority: str or + ~azure.mgmt.compute.v2018_04_01.models.VirtualMachinePriorityTypes + :param eviction_policy: Specifies the eviction policy for virtual machines + in a low priority scale set.

    Minimum api-version: + 2017-10-30-preview. Possible values include: 'Deallocate', 'Delete' + :type eviction_policy: str or + ~azure.mgmt.compute.v2018_04_01.models.VirtualMachineEvictionPolicyTypes + """ + + _attribute_map = { + 'os_profile': {'key': 'osProfile', 'type': 'VirtualMachineScaleSetOSProfile'}, + 'storage_profile': {'key': 'storageProfile', 'type': 'VirtualMachineScaleSetStorageProfile'}, + 'network_profile': {'key': 'networkProfile', 'type': 'VirtualMachineScaleSetNetworkProfile'}, + 'diagnostics_profile': {'key': 'diagnosticsProfile', 'type': 'DiagnosticsProfile'}, + 'extension_profile': {'key': 'extensionProfile', 'type': 'VirtualMachineScaleSetExtensionProfile'}, + 'license_type': {'key': 'licenseType', 'type': 'str'}, + 'priority': {'key': 'priority', 'type': 'str'}, + 'eviction_policy': {'key': 'evictionPolicy', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(VirtualMachineScaleSetVMProfile, self).__init__(**kwargs) + self.os_profile = kwargs.get('os_profile', None) + self.storage_profile = kwargs.get('storage_profile', None) + self.network_profile = kwargs.get('network_profile', None) + self.diagnostics_profile = kwargs.get('diagnostics_profile', None) + self.extension_profile = kwargs.get('extension_profile', None) + self.license_type = kwargs.get('license_type', None) + self.priority = kwargs.get('priority', None) + self.eviction_policy = kwargs.get('eviction_policy', None) + + +class VirtualMachineSize(Model): + """Describes the properties of a VM size. + + :param name: The name of the virtual machine size. + :type name: str + :param number_of_cores: The number of cores supported by the virtual + machine size. + :type number_of_cores: int + :param os_disk_size_in_mb: The OS disk size, in MB, allowed by the virtual + machine size. + :type os_disk_size_in_mb: int + :param resource_disk_size_in_mb: The resource disk size, in MB, allowed by + the virtual machine size. + :type resource_disk_size_in_mb: int + :param memory_in_mb: The amount of memory, in MB, supported by the virtual + machine size. + :type memory_in_mb: int + :param max_data_disk_count: The maximum number of data disks that can be + attached to the virtual machine size. + :type max_data_disk_count: int + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'number_of_cores': {'key': 'numberOfCores', 'type': 'int'}, + 'os_disk_size_in_mb': {'key': 'osDiskSizeInMB', 'type': 'int'}, + 'resource_disk_size_in_mb': {'key': 'resourceDiskSizeInMB', 'type': 'int'}, + 'memory_in_mb': {'key': 'memoryInMB', 'type': 'int'}, + 'max_data_disk_count': {'key': 'maxDataDiskCount', 'type': 'int'}, + } + + def __init__(self, **kwargs): + super(VirtualMachineSize, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.number_of_cores = kwargs.get('number_of_cores', None) + self.os_disk_size_in_mb = kwargs.get('os_disk_size_in_mb', None) + self.resource_disk_size_in_mb = kwargs.get('resource_disk_size_in_mb', None) + self.memory_in_mb = kwargs.get('memory_in_mb', None) + self.max_data_disk_count = kwargs.get('max_data_disk_count', None) + + +class VirtualMachineStatusCodeCount(Model): + """The status code and count of the virtual machine scale set instance view + status summary. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar code: The instance view status code. + :vartype code: str + :ivar count: The number of instances having a particular status code. + :vartype count: int + """ + + _validation = { + 'code': {'readonly': True}, + 'count': {'readonly': True}, + } + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + 'count': {'key': 'count', 'type': 'int'}, + } + + def __init__(self, **kwargs): + super(VirtualMachineStatusCodeCount, self).__init__(**kwargs) + self.code = None + self.count = None + + +class VirtualMachineUpdate(UpdateResource): + """Describes a Virtual Machine Update. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :param tags: Resource tags + :type tags: dict[str, str] + :param plan: Specifies information about the marketplace image used to + create the virtual machine. This element is only used for marketplace + images. Before you can use a marketplace image from an API, you must + enable the image for programmatic use. In the Azure portal, find the + marketplace image that you want to use and then click **Want to deploy + programmatically, Get Started ->**. Enter any required information and + then click **Save**. + :type plan: ~azure.mgmt.compute.v2018_04_01.models.Plan + :param hardware_profile: Specifies the hardware settings for the virtual + machine. + :type hardware_profile: + ~azure.mgmt.compute.v2018_04_01.models.HardwareProfile + :param storage_profile: Specifies the storage settings for the virtual + machine disks. + :type storage_profile: + ~azure.mgmt.compute.v2018_04_01.models.StorageProfile + :param os_profile: Specifies the operating system settings for the virtual + machine. + :type os_profile: ~azure.mgmt.compute.v2018_04_01.models.OSProfile + :param network_profile: Specifies the network interfaces of the virtual + machine. + :type network_profile: + ~azure.mgmt.compute.v2018_04_01.models.NetworkProfile + :param diagnostics_profile: Specifies the boot diagnostic settings state. +

    Minimum api-version: 2015-06-15. + :type diagnostics_profile: + ~azure.mgmt.compute.v2018_04_01.models.DiagnosticsProfile + :param availability_set: Specifies information about the availability set + that the virtual machine should be assigned to. Virtual machines specified + in the same availability set are allocated to different nodes to maximize + availability. For more information about availability sets, see [Manage + the availability of virtual + machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-manage-availability?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). +

    For more information on Azure planned maintenance, see [Planned + maintenance for virtual machines in + Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-planned-maintenance?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json) +

    Currently, a VM can only be added to availability set at creation + time. An existing VM cannot be added to an availability set. + :type availability_set: ~azure.mgmt.compute.v2018_04_01.models.SubResource + :param proximity_placement_group: Specifies information about the + proximity placement group that the virtual machine should be assigned to. +

    Minimum api-version: 2018-04-01. + :type proximity_placement_group: + ~azure.mgmt.compute.v2018_04_01.models.SubResource + :ivar provisioning_state: The provisioning state, which only appears in + the response. + :vartype provisioning_state: str + :ivar instance_view: The virtual machine instance view. + :vartype instance_view: + ~azure.mgmt.compute.v2018_04_01.models.VirtualMachineInstanceView + :param license_type: Specifies that the image or disk that is being used + was licensed on-premises. This element is only used for images that + contain the Windows Server operating system.

    Possible values are: +

    Windows_Client

    Windows_Server

    If this element + is included in a request for an update, the value must match the initial + value. This value cannot be updated.

    For more information, see + [Azure Hybrid Use Benefit for Windows + Server](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-hybrid-use-benefit-licensing?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json) +

    Minimum api-version: 2015-06-15 + :type license_type: str + :ivar vm_id: Specifies the VM unique ID which is a 128-bits identifier + that is encoded and stored in all Azure IaaS VMs SMBIOS and can be read + using platform BIOS commands. + :vartype vm_id: str + :param identity: The identity of the virtual machine, if configured. + :type identity: + ~azure.mgmt.compute.v2018_04_01.models.VirtualMachineIdentity + :param zones: The virtual machine zones. + :type zones: list[str] + """ + + _validation = { + 'provisioning_state': {'readonly': True}, + 'instance_view': {'readonly': True}, + 'vm_id': {'readonly': True}, + } + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + 'plan': {'key': 'plan', 'type': 'Plan'}, + 'hardware_profile': {'key': 'properties.hardwareProfile', 'type': 'HardwareProfile'}, + 'storage_profile': {'key': 'properties.storageProfile', 'type': 'StorageProfile'}, + 'os_profile': {'key': 'properties.osProfile', 'type': 'OSProfile'}, + 'network_profile': {'key': 'properties.networkProfile', 'type': 'NetworkProfile'}, + 'diagnostics_profile': {'key': 'properties.diagnosticsProfile', 'type': 'DiagnosticsProfile'}, + 'availability_set': {'key': 'properties.availabilitySet', 'type': 'SubResource'}, + 'proximity_placement_group': {'key': 'properties.proximityPlacementGroup', 'type': 'SubResource'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'instance_view': {'key': 'properties.instanceView', 'type': 'VirtualMachineInstanceView'}, + 'license_type': {'key': 'properties.licenseType', 'type': 'str'}, + 'vm_id': {'key': 'properties.vmId', 'type': 'str'}, + 'identity': {'key': 'identity', 'type': 'VirtualMachineIdentity'}, + 'zones': {'key': 'zones', 'type': '[str]'}, + } + + def __init__(self, **kwargs): + super(VirtualMachineUpdate, self).__init__(**kwargs) + self.plan = kwargs.get('plan', None) + self.hardware_profile = kwargs.get('hardware_profile', None) + self.storage_profile = kwargs.get('storage_profile', None) + self.os_profile = kwargs.get('os_profile', None) + self.network_profile = kwargs.get('network_profile', None) + self.diagnostics_profile = kwargs.get('diagnostics_profile', None) + self.availability_set = kwargs.get('availability_set', None) + self.proximity_placement_group = kwargs.get('proximity_placement_group', None) + self.provisioning_state = None + self.instance_view = None + self.license_type = kwargs.get('license_type', None) + self.vm_id = None + self.identity = kwargs.get('identity', None) + self.zones = kwargs.get('zones', None) + + +class WindowsConfiguration(Model): + """Specifies Windows operating system settings on the virtual machine. + + :param provision_vm_agent: Indicates whether virtual machine agent should + be provisioned on the virtual machine.

    When this property is not + specified in the request body, default behavior is to set it to true. + This will ensure that VM Agent is installed on the VM so that extensions + can be added to the VM later. + :type provision_vm_agent: bool + :param enable_automatic_updates: Indicates whether virtual machine is + enabled for automatic updates. + :type enable_automatic_updates: bool + :param time_zone: Specifies the time zone of the virtual machine. e.g. + "Pacific Standard Time" + :type time_zone: str + :param additional_unattend_content: Specifies additional base-64 encoded + XML formatted information that can be included in the Unattend.xml file, + which is used by Windows Setup. + :type additional_unattend_content: + list[~azure.mgmt.compute.v2018_04_01.models.AdditionalUnattendContent] + :param win_rm: Specifies the Windows Remote Management listeners. This + enables remote Windows PowerShell. + :type win_rm: ~azure.mgmt.compute.v2018_04_01.models.WinRMConfiguration + """ + + _attribute_map = { + 'provision_vm_agent': {'key': 'provisionVMAgent', 'type': 'bool'}, + 'enable_automatic_updates': {'key': 'enableAutomaticUpdates', 'type': 'bool'}, + 'time_zone': {'key': 'timeZone', 'type': 'str'}, + 'additional_unattend_content': {'key': 'additionalUnattendContent', 'type': '[AdditionalUnattendContent]'}, + 'win_rm': {'key': 'winRM', 'type': 'WinRMConfiguration'}, + } + + def __init__(self, **kwargs): + super(WindowsConfiguration, self).__init__(**kwargs) + self.provision_vm_agent = kwargs.get('provision_vm_agent', None) + self.enable_automatic_updates = kwargs.get('enable_automatic_updates', None) + self.time_zone = kwargs.get('time_zone', None) + self.additional_unattend_content = kwargs.get('additional_unattend_content', None) + self.win_rm = kwargs.get('win_rm', None) + + +class WinRMConfiguration(Model): + """Describes Windows Remote Management configuration of the VM. + + :param listeners: The list of Windows Remote Management listeners + :type listeners: + list[~azure.mgmt.compute.v2018_04_01.models.WinRMListener] + """ + + _attribute_map = { + 'listeners': {'key': 'listeners', 'type': '[WinRMListener]'}, + } + + def __init__(self, **kwargs): + super(WinRMConfiguration, self).__init__(**kwargs) + self.listeners = kwargs.get('listeners', None) + + +class WinRMListener(Model): + """Describes Protocol and thumbprint of Windows Remote Management listener. + + :param protocol: Specifies the protocol of listener.

    Possible + values are:
    **http**

    **https**. Possible values include: + 'Http', 'Https' + :type protocol: str or + ~azure.mgmt.compute.v2018_04_01.models.ProtocolTypes + :param certificate_url: This is the URL of a certificate that has been + uploaded to Key Vault as a secret. For adding a secret to the Key Vault, + see [Add a key or secret to the key + vault](https://docs.microsoft.com/azure/key-vault/key-vault-get-started/#add). + In this case, your certificate needs to be It is the Base64 encoding of + the following JSON Object which is encoded in UTF-8:

    {
    + "data":"",
    "dataType":"pfx",
    + "password":""
    } + :type certificate_url: str + """ + + _attribute_map = { + 'protocol': {'key': 'protocol', 'type': 'ProtocolTypes'}, + 'certificate_url': {'key': 'certificateUrl', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(WinRMListener, self).__init__(**kwargs) + self.protocol = kwargs.get('protocol', None) + self.certificate_url = kwargs.get('certificate_url', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/_models_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/_models_py3.py new file mode 100644 index 000000000000..4ed144b607b0 --- /dev/null +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/_models_py3.py @@ -0,0 +1,5875 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class AccessUri(Model): + """A disk access SAS uri. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar access_sas: A SAS uri for accessing a disk. + :vartype access_sas: str + """ + + _validation = { + 'access_sas': {'readonly': True}, + } + + _attribute_map = { + 'access_sas': {'key': 'accessSAS', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(AccessUri, self).__init__(**kwargs) + self.access_sas = None + + +class AdditionalUnattendContent(Model): + """Specifies additional XML formatted information that can be included in the + Unattend.xml file, which is used by Windows Setup. Contents are defined by + setting name, component name, and the pass in which the content is applied. + + :param pass_name: The pass name. Currently, the only allowable value is + OobeSystem. Possible values include: 'OobeSystem' + :type pass_name: str or ~azure.mgmt.compute.v2018_04_01.models.PassNames + :param component_name: The component name. Currently, the only allowable + value is Microsoft-Windows-Shell-Setup. Possible values include: + 'Microsoft-Windows-Shell-Setup' + :type component_name: str or + ~azure.mgmt.compute.v2018_04_01.models.ComponentNames + :param setting_name: Specifies the name of the setting to which the + content applies. Possible values are: FirstLogonCommands and AutoLogon. + Possible values include: 'AutoLogon', 'FirstLogonCommands' + :type setting_name: str or + ~azure.mgmt.compute.v2018_04_01.models.SettingNames + :param content: Specifies the XML formatted content that is added to the + unattend.xml file for the specified path and component. The XML must be + less than 4KB and must include the root element for the setting or feature + that is being inserted. + :type content: str + """ + + _attribute_map = { + 'pass_name': {'key': 'passName', 'type': 'PassNames'}, + 'component_name': {'key': 'componentName', 'type': 'ComponentNames'}, + 'setting_name': {'key': 'settingName', 'type': 'SettingNames'}, + 'content': {'key': 'content', 'type': 'str'}, + } + + def __init__(self, *, pass_name=None, component_name=None, setting_name=None, content: str=None, **kwargs) -> None: + super(AdditionalUnattendContent, self).__init__(**kwargs) + self.pass_name = pass_name + self.component_name = component_name + self.setting_name = setting_name + self.content = content + + +class ApiEntityReference(Model): + """The API entity reference. + + :param id: The ARM resource id in the form of + /subscriptions/{SubscriptionId}/resourceGroups/{ResourceGroupName}/... + :type id: str + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + } + + def __init__(self, *, id: str=None, **kwargs) -> None: + super(ApiEntityReference, self).__init__(**kwargs) + self.id = id + + +class ApiError(Model): + """Api error. + + :param details: The Api error details + :type details: list[~azure.mgmt.compute.v2018_04_01.models.ApiErrorBase] + :param innererror: The Api inner error + :type innererror: ~azure.mgmt.compute.v2018_04_01.models.InnerError + :param code: The error code. + :type code: str + :param target: The target of the particular error. + :type target: str + :param message: The error message. + :type message: str + """ + + _attribute_map = { + 'details': {'key': 'details', 'type': '[ApiErrorBase]'}, + 'innererror': {'key': 'innererror', 'type': 'InnerError'}, + 'code': {'key': 'code', 'type': 'str'}, + 'target': {'key': 'target', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + } + + def __init__(self, *, details=None, innererror=None, code: str=None, target: str=None, message: str=None, **kwargs) -> None: + super(ApiError, self).__init__(**kwargs) + self.details = details + self.innererror = innererror + self.code = code + self.target = target + self.message = message + + +class ApiErrorBase(Model): + """Api error base. + + :param code: The error code. + :type code: str + :param target: The target of the particular error. + :type target: str + :param message: The error message. + :type message: str + """ + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + 'target': {'key': 'target', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + } + + def __init__(self, *, code: str=None, target: str=None, message: str=None, **kwargs) -> None: + super(ApiErrorBase, self).__init__(**kwargs) + self.code = code + self.target = target + self.message = message + + +class AutoOSUpgradePolicy(Model): + """The configuration parameters used for performing automatic OS upgrade. + + :param disable_auto_rollback: Whether OS image rollback feature should be + disabled. Default value is false. + :type disable_auto_rollback: bool + """ + + _attribute_map = { + 'disable_auto_rollback': {'key': 'disableAutoRollback', 'type': 'bool'}, + } + + def __init__(self, *, disable_auto_rollback: bool=None, **kwargs) -> None: + super(AutoOSUpgradePolicy, self).__init__(**kwargs) + self.disable_auto_rollback = disable_auto_rollback + + +class Resource(Model): + """The Resource model definition. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource Id + :vartype id: str + :ivar name: Resource name + :vartype name: str + :ivar type: Resource type + :vartype type: str + :param location: Required. Resource location + :type location: str + :param tags: Resource tags + :type tags: dict[str, str] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__(self, *, location: str, tags=None, **kwargs) -> None: + super(Resource, self).__init__(**kwargs) + self.id = None + self.name = None + self.type = None + self.location = location + self.tags = tags + + +class AvailabilitySet(Resource): + """Specifies information about the availability set that the virtual machine + should be assigned to. Virtual machines specified in the same availability + set are allocated to different nodes to maximize availability. For more + information about availability sets, see [Manage the availability of + virtual + machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-manage-availability?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). +

    For more information on Azure planned maintenance, see [Planned + maintenance for virtual machines in + Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-planned-maintenance?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json) +

    Currently, a VM can only be added to availability set at creation + time. An existing VM cannot be added to an availability set. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource Id + :vartype id: str + :ivar name: Resource name + :vartype name: str + :ivar type: Resource type + :vartype type: str + :param location: Required. Resource location + :type location: str + :param tags: Resource tags + :type tags: dict[str, str] + :param platform_update_domain_count: Update Domain count. + :type platform_update_domain_count: int + :param platform_fault_domain_count: Fault Domain count. + :type platform_fault_domain_count: int + :param virtual_machines: A list of references to all virtual machines in + the availability set. + :type virtual_machines: + list[~azure.mgmt.compute.v2018_04_01.models.SubResource] + :param proximity_placement_group: Specifies information about the + proximity placement group that the availability set should be assigned to. +

    Minimum api-version: 2018-04-01. + :type proximity_placement_group: + ~azure.mgmt.compute.v2018_04_01.models.SubResource + :ivar statuses: The resource status information. + :vartype statuses: + list[~azure.mgmt.compute.v2018_04_01.models.InstanceViewStatus] + :param sku: Sku of the availability set + :type sku: ~azure.mgmt.compute.v2018_04_01.models.Sku + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + 'statuses': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'platform_update_domain_count': {'key': 'properties.platformUpdateDomainCount', 'type': 'int'}, + 'platform_fault_domain_count': {'key': 'properties.platformFaultDomainCount', 'type': 'int'}, + 'virtual_machines': {'key': 'properties.virtualMachines', 'type': '[SubResource]'}, + 'proximity_placement_group': {'key': 'properties.proximityPlacementGroup', 'type': 'SubResource'}, + 'statuses': {'key': 'properties.statuses', 'type': '[InstanceViewStatus]'}, + 'sku': {'key': 'sku', 'type': 'Sku'}, + } + + def __init__(self, *, location: str, tags=None, platform_update_domain_count: int=None, platform_fault_domain_count: int=None, virtual_machines=None, proximity_placement_group=None, sku=None, **kwargs) -> None: + super(AvailabilitySet, self).__init__(location=location, tags=tags, **kwargs) + self.platform_update_domain_count = platform_update_domain_count + self.platform_fault_domain_count = platform_fault_domain_count + self.virtual_machines = virtual_machines + self.proximity_placement_group = proximity_placement_group + self.statuses = None + self.sku = sku + + +class UpdateResource(Model): + """The Update Resource model definition. + + :param tags: Resource tags + :type tags: dict[str, str] + """ + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__(self, *, tags=None, **kwargs) -> None: + super(UpdateResource, self).__init__(**kwargs) + self.tags = tags + + +class AvailabilitySetUpdate(UpdateResource): + """Specifies information about the availability set that the virtual machine + should be assigned to. Only tags may be updated. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :param tags: Resource tags + :type tags: dict[str, str] + :param platform_update_domain_count: Update Domain count. + :type platform_update_domain_count: int + :param platform_fault_domain_count: Fault Domain count. + :type platform_fault_domain_count: int + :param virtual_machines: A list of references to all virtual machines in + the availability set. + :type virtual_machines: + list[~azure.mgmt.compute.v2018_04_01.models.SubResource] + :param proximity_placement_group: Specifies information about the + proximity placement group that the availability set should be assigned to. +

    Minimum api-version: 2018-04-01. + :type proximity_placement_group: + ~azure.mgmt.compute.v2018_04_01.models.SubResource + :ivar statuses: The resource status information. + :vartype statuses: + list[~azure.mgmt.compute.v2018_04_01.models.InstanceViewStatus] + :param sku: Sku of the availability set + :type sku: ~azure.mgmt.compute.v2018_04_01.models.Sku + """ + + _validation = { + 'statuses': {'readonly': True}, + } + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + 'platform_update_domain_count': {'key': 'properties.platformUpdateDomainCount', 'type': 'int'}, + 'platform_fault_domain_count': {'key': 'properties.platformFaultDomainCount', 'type': 'int'}, + 'virtual_machines': {'key': 'properties.virtualMachines', 'type': '[SubResource]'}, + 'proximity_placement_group': {'key': 'properties.proximityPlacementGroup', 'type': 'SubResource'}, + 'statuses': {'key': 'properties.statuses', 'type': '[InstanceViewStatus]'}, + 'sku': {'key': 'sku', 'type': 'Sku'}, + } + + def __init__(self, *, tags=None, platform_update_domain_count: int=None, platform_fault_domain_count: int=None, virtual_machines=None, proximity_placement_group=None, sku=None, **kwargs) -> None: + super(AvailabilitySetUpdate, self).__init__(tags=tags, **kwargs) + self.platform_update_domain_count = platform_update_domain_count + self.platform_fault_domain_count = platform_fault_domain_count + self.virtual_machines = virtual_machines + self.proximity_placement_group = proximity_placement_group + self.statuses = None + self.sku = sku + + +class BootDiagnostics(Model): + """Boot Diagnostics is a debugging feature which allows you to view Console + Output and Screenshot to diagnose VM status.

    You can easily view + the output of your console log.

    Azure also enables you to see a + screenshot of the VM from the hypervisor. + + :param enabled: Whether boot diagnostics should be enabled on the Virtual + Machine. + :type enabled: bool + :param storage_uri: Uri of the storage account to use for placing the + console output and screenshot. + :type storage_uri: str + """ + + _attribute_map = { + 'enabled': {'key': 'enabled', 'type': 'bool'}, + 'storage_uri': {'key': 'storageUri', 'type': 'str'}, + } + + def __init__(self, *, enabled: bool=None, storage_uri: str=None, **kwargs) -> None: + super(BootDiagnostics, self).__init__(**kwargs) + self.enabled = enabled + self.storage_uri = storage_uri + + +class BootDiagnosticsInstanceView(Model): + """The instance view of a virtual machine boot diagnostics. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar console_screenshot_blob_uri: The console screenshot blob URI. + :vartype console_screenshot_blob_uri: str + :ivar serial_console_log_blob_uri: The Linux serial console log blob Uri. + :vartype serial_console_log_blob_uri: str + :ivar status: The boot diagnostics status information for the VM.

    + NOTE: It will be set only if there are errors encountered in enabling boot + diagnostics. + :vartype status: ~azure.mgmt.compute.v2018_04_01.models.InstanceViewStatus + """ + + _validation = { + 'console_screenshot_blob_uri': {'readonly': True}, + 'serial_console_log_blob_uri': {'readonly': True}, + 'status': {'readonly': True}, + } + + _attribute_map = { + 'console_screenshot_blob_uri': {'key': 'consoleScreenshotBlobUri', 'type': 'str'}, + 'serial_console_log_blob_uri': {'key': 'serialConsoleLogBlobUri', 'type': 'str'}, + 'status': {'key': 'status', 'type': 'InstanceViewStatus'}, + } + + def __init__(self, **kwargs) -> None: + super(BootDiagnosticsInstanceView, self).__init__(**kwargs) + self.console_screenshot_blob_uri = None + self.serial_console_log_blob_uri = None + self.status = None + + +class CloudError(Model): + """CloudError. + """ + + _attribute_map = { + } + + +class ComputeOperationValue(Model): + """Describes the properties of a Compute Operation value. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar origin: The origin of the compute operation. + :vartype origin: str + :ivar name: The name of the compute operation. + :vartype name: str + :ivar operation: The display name of the compute operation. + :vartype operation: str + :ivar resource: The display name of the resource the operation applies to. + :vartype resource: str + :ivar description: The description of the operation. + :vartype description: str + :ivar provider: The resource provider for the operation. + :vartype provider: str + """ + + _validation = { + 'origin': {'readonly': True}, + 'name': {'readonly': True}, + 'operation': {'readonly': True}, + 'resource': {'readonly': True}, + 'description': {'readonly': True}, + 'provider': {'readonly': True}, + } + + _attribute_map = { + 'origin': {'key': 'origin', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'operation': {'key': 'display.operation', 'type': 'str'}, + 'resource': {'key': 'display.resource', 'type': 'str'}, + 'description': {'key': 'display.description', 'type': 'str'}, + 'provider': {'key': 'display.provider', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(ComputeOperationValue, self).__init__(**kwargs) + self.origin = None + self.name = None + self.operation = None + self.resource = None + self.description = None + self.provider = None + + +class CreationData(Model): + """Data used when creating a disk. + + All required parameters must be populated in order to send to Azure. + + :param create_option: Required. This enumerates the possible sources of a + disk's creation. Possible values include: 'Empty', 'Attach', 'FromImage', + 'Import', 'Copy', 'Restore' + :type create_option: str or + ~azure.mgmt.compute.v2018_04_01.models.DiskCreateOption + :param storage_account_id: If createOption is Import, the Azure Resource + Manager identifier of the storage account containing the blob to import as + a disk. Required only if the blob is in a different subscription + :type storage_account_id: str + :param image_reference: Disk source information. + :type image_reference: + ~azure.mgmt.compute.v2018_04_01.models.ImageDiskReference + :param source_uri: If createOption is Import, this is the URI of a blob to + be imported into a managed disk. + :type source_uri: str + :param source_resource_id: If createOption is Copy, this is the ARM id of + the source snapshot or disk. + :type source_resource_id: str + """ + + _validation = { + 'create_option': {'required': True}, + } + + _attribute_map = { + 'create_option': {'key': 'createOption', 'type': 'str'}, + 'storage_account_id': {'key': 'storageAccountId', 'type': 'str'}, + 'image_reference': {'key': 'imageReference', 'type': 'ImageDiskReference'}, + 'source_uri': {'key': 'sourceUri', 'type': 'str'}, + 'source_resource_id': {'key': 'sourceResourceId', 'type': 'str'}, + } + + def __init__(self, *, create_option, storage_account_id: str=None, image_reference=None, source_uri: str=None, source_resource_id: str=None, **kwargs) -> None: + super(CreationData, self).__init__(**kwargs) + self.create_option = create_option + self.storage_account_id = storage_account_id + self.image_reference = image_reference + self.source_uri = source_uri + self.source_resource_id = source_resource_id + + +class DataDisk(Model): + """Describes a data disk. + + All required parameters must be populated in order to send to Azure. + + :param lun: Required. Specifies the logical unit number of the data disk. + This value is used to identify data disks within the VM and therefore must + be unique for each data disk attached to a VM. + :type lun: int + :param name: The disk name. + :type name: str + :param vhd: The virtual hard disk. + :type vhd: ~azure.mgmt.compute.v2018_04_01.models.VirtualHardDisk + :param image: The source user image virtual hard disk. The virtual hard + disk will be copied before being attached to the virtual machine. If + SourceImage is provided, the destination virtual hard drive must not + exist. + :type image: ~azure.mgmt.compute.v2018_04_01.models.VirtualHardDisk + :param caching: Specifies the caching requirements.

    Possible + values are:

    **None**

    **ReadOnly**

    **ReadWrite** +

    Default: **None for Standard storage. ReadOnly for Premium + storage**. Possible values include: 'None', 'ReadOnly', 'ReadWrite' + :type caching: str or ~azure.mgmt.compute.v2018_04_01.models.CachingTypes + :param write_accelerator_enabled: Specifies whether writeAccelerator + should be enabled or disabled on the disk. + :type write_accelerator_enabled: bool + :param create_option: Required. Specifies how the virtual machine should + be created.

    Possible values are:

    **Attach** \\u2013 This + value is used when you are using a specialized disk to create the virtual + machine.

    **FromImage** \\u2013 This value is used when you are + using an image to create the virtual machine. If you are using a platform + image, you also use the imageReference element described above. If you are + using a marketplace image, you also use the plan element previously + described. Possible values include: 'FromImage', 'Empty', 'Attach' + :type create_option: str or + ~azure.mgmt.compute.v2018_04_01.models.DiskCreateOptionTypes + :param disk_size_gb: Specifies the size of an empty data disk in + gigabytes. This element can be used to overwrite the size of the disk in a + virtual machine image.

    This value cannot be larger than 1023 GB + :type disk_size_gb: int + :param managed_disk: The managed disk parameters. + :type managed_disk: + ~azure.mgmt.compute.v2018_04_01.models.ManagedDiskParameters + """ + + _validation = { + 'lun': {'required': True}, + 'create_option': {'required': True}, + } + + _attribute_map = { + 'lun': {'key': 'lun', 'type': 'int'}, + 'name': {'key': 'name', 'type': 'str'}, + 'vhd': {'key': 'vhd', 'type': 'VirtualHardDisk'}, + 'image': {'key': 'image', 'type': 'VirtualHardDisk'}, + 'caching': {'key': 'caching', 'type': 'CachingTypes'}, + 'write_accelerator_enabled': {'key': 'writeAcceleratorEnabled', 'type': 'bool'}, + 'create_option': {'key': 'createOption', 'type': 'str'}, + 'disk_size_gb': {'key': 'diskSizeGB', 'type': 'int'}, + 'managed_disk': {'key': 'managedDisk', 'type': 'ManagedDiskParameters'}, + } + + def __init__(self, *, lun: int, create_option, name: str=None, vhd=None, image=None, caching=None, write_accelerator_enabled: bool=None, disk_size_gb: int=None, managed_disk=None, **kwargs) -> None: + super(DataDisk, self).__init__(**kwargs) + self.lun = lun + self.name = name + self.vhd = vhd + self.image = image + self.caching = caching + self.write_accelerator_enabled = write_accelerator_enabled + self.create_option = create_option + self.disk_size_gb = disk_size_gb + self.managed_disk = managed_disk + + +class DataDiskImage(Model): + """Contains the data disk images information. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar lun: Specifies the logical unit number of the data disk. This value + is used to identify data disks within the VM and therefore must be unique + for each data disk attached to a VM. + :vartype lun: int + """ + + _validation = { + 'lun': {'readonly': True}, + } + + _attribute_map = { + 'lun': {'key': 'lun', 'type': 'int'}, + } + + def __init__(self, **kwargs) -> None: + super(DataDiskImage, self).__init__(**kwargs) + self.lun = None + + +class DiagnosticsProfile(Model): + """Specifies the boot diagnostic settings state.

    Minimum api-version: + 2015-06-15. + + :param boot_diagnostics: Boot Diagnostics is a debugging feature which + allows you to view Console Output and Screenshot to diagnose VM status. +

    You can easily view the output of your console log.

    + Azure also enables you to see a screenshot of the VM from the hypervisor. + :type boot_diagnostics: + ~azure.mgmt.compute.v2018_04_01.models.BootDiagnostics + """ + + _attribute_map = { + 'boot_diagnostics': {'key': 'bootDiagnostics', 'type': 'BootDiagnostics'}, + } + + def __init__(self, *, boot_diagnostics=None, **kwargs) -> None: + super(DiagnosticsProfile, self).__init__(**kwargs) + self.boot_diagnostics = boot_diagnostics + + +class Disk(Resource): + """Disk resource. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource Id + :vartype id: str + :ivar name: Resource name + :vartype name: str + :ivar type: Resource type + :vartype type: str + :param location: Required. Resource location + :type location: str + :param tags: Resource tags + :type tags: dict[str, str] + :ivar managed_by: A relative URI containing the ID of the VM that has the + disk attached. + :vartype managed_by: str + :param sku: + :type sku: ~azure.mgmt.compute.v2018_04_01.models.DiskSku + :param zones: The Logical zone list for Disk. + :type zones: list[str] + :ivar time_created: The time when the disk was created. + :vartype time_created: datetime + :param os_type: The Operating System type. Possible values include: + 'Windows', 'Linux' + :type os_type: str or + ~azure.mgmt.compute.v2018_04_01.models.OperatingSystemTypes + :param creation_data: Required. Disk source information. CreationData + information cannot be changed after the disk has been created. + :type creation_data: ~azure.mgmt.compute.v2018_04_01.models.CreationData + :param disk_size_gb: If creationData.createOption is Empty, this field is + mandatory and it indicates the size of the VHD to create. If this field is + present for updates or creation with other options, it indicates a resize. + Resizes are only allowed if the disk is not attached to a running VM, and + can only increase the disk's size. + :type disk_size_gb: int + :param encryption_settings: Encryption settings for disk or snapshot + :type encryption_settings: + ~azure.mgmt.compute.v2018_04_01.models.EncryptionSettings + :ivar provisioning_state: The disk provisioning state. + :vartype provisioning_state: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + 'managed_by': {'readonly': True}, + 'time_created': {'readonly': True}, + 'creation_data': {'required': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'managed_by': {'key': 'managedBy', 'type': 'str'}, + 'sku': {'key': 'sku', 'type': 'DiskSku'}, + 'zones': {'key': 'zones', 'type': '[str]'}, + 'time_created': {'key': 'properties.timeCreated', 'type': 'iso-8601'}, + 'os_type': {'key': 'properties.osType', 'type': 'OperatingSystemTypes'}, + 'creation_data': {'key': 'properties.creationData', 'type': 'CreationData'}, + 'disk_size_gb': {'key': 'properties.diskSizeGB', 'type': 'int'}, + 'encryption_settings': {'key': 'properties.encryptionSettings', 'type': 'EncryptionSettings'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + } + + def __init__(self, *, location: str, creation_data, tags=None, sku=None, zones=None, os_type=None, disk_size_gb: int=None, encryption_settings=None, **kwargs) -> None: + super(Disk, self).__init__(location=location, tags=tags, **kwargs) + self.managed_by = None + self.sku = sku + self.zones = zones + self.time_created = None + self.os_type = os_type + self.creation_data = creation_data + self.disk_size_gb = disk_size_gb + self.encryption_settings = encryption_settings + self.provisioning_state = None + + +class DiskEncryptionSettings(Model): + """Describes a Encryption Settings for a Disk. + + :param disk_encryption_key: Specifies the location of the disk encryption + key, which is a Key Vault Secret. + :type disk_encryption_key: + ~azure.mgmt.compute.v2018_04_01.models.KeyVaultSecretReference + :param key_encryption_key: Specifies the location of the key encryption + key in Key Vault. + :type key_encryption_key: + ~azure.mgmt.compute.v2018_04_01.models.KeyVaultKeyReference + :param enabled: Specifies whether disk encryption should be enabled on the + virtual machine. + :type enabled: bool + """ + + _attribute_map = { + 'disk_encryption_key': {'key': 'diskEncryptionKey', 'type': 'KeyVaultSecretReference'}, + 'key_encryption_key': {'key': 'keyEncryptionKey', 'type': 'KeyVaultKeyReference'}, + 'enabled': {'key': 'enabled', 'type': 'bool'}, + } + + def __init__(self, *, disk_encryption_key=None, key_encryption_key=None, enabled: bool=None, **kwargs) -> None: + super(DiskEncryptionSettings, self).__init__(**kwargs) + self.disk_encryption_key = disk_encryption_key + self.key_encryption_key = key_encryption_key + self.enabled = enabled + + +class DiskInstanceView(Model): + """The instance view of the disk. + + :param name: The disk name. + :type name: str + :param encryption_settings: Specifies the encryption settings for the OS + Disk.

    Minimum api-version: 2015-06-15 + :type encryption_settings: + list[~azure.mgmt.compute.v2018_04_01.models.DiskEncryptionSettings] + :param statuses: The resource status information. + :type statuses: + list[~azure.mgmt.compute.v2018_04_01.models.InstanceViewStatus] + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'encryption_settings': {'key': 'encryptionSettings', 'type': '[DiskEncryptionSettings]'}, + 'statuses': {'key': 'statuses', 'type': '[InstanceViewStatus]'}, + } + + def __init__(self, *, name: str=None, encryption_settings=None, statuses=None, **kwargs) -> None: + super(DiskInstanceView, self).__init__(**kwargs) + self.name = name + self.encryption_settings = encryption_settings + self.statuses = statuses + + +class DiskSku(Model): + """The disks sku name. Can be Standard_LRS, Premium_LRS, or StandardSSD_LRS. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :param name: The sku name. Possible values include: 'Standard_LRS', + 'Premium_LRS', 'StandardSSD_LRS' + :type name: str or + ~azure.mgmt.compute.v2018_04_01.models.StorageAccountTypes + :ivar tier: The sku tier. Default value: "Standard" . + :vartype tier: str + """ + + _validation = { + 'tier': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'tier': {'key': 'tier', 'type': 'str'}, + } + + def __init__(self, *, name=None, **kwargs) -> None: + super(DiskSku, self).__init__(**kwargs) + self.name = name + self.tier = None + + +class DiskUpdate(Model): + """Disk update resource. + + :param os_type: the Operating System type. Possible values include: + 'Windows', 'Linux' + :type os_type: str or + ~azure.mgmt.compute.v2018_04_01.models.OperatingSystemTypes + :param disk_size_gb: If creationData.createOption is Empty, this field is + mandatory and it indicates the size of the VHD to create. If this field is + present for updates or creation with other options, it indicates a resize. + Resizes are only allowed if the disk is not attached to a running VM, and + can only increase the disk's size. + :type disk_size_gb: int + :param encryption_settings: Encryption settings for disk or snapshot + :type encryption_settings: + ~azure.mgmt.compute.v2018_04_01.models.EncryptionSettings + :param tags: Resource tags + :type tags: dict[str, str] + :param sku: + :type sku: ~azure.mgmt.compute.v2018_04_01.models.DiskSku + """ + + _attribute_map = { + 'os_type': {'key': 'properties.osType', 'type': 'OperatingSystemTypes'}, + 'disk_size_gb': {'key': 'properties.diskSizeGB', 'type': 'int'}, + 'encryption_settings': {'key': 'properties.encryptionSettings', 'type': 'EncryptionSettings'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'sku': {'key': 'sku', 'type': 'DiskSku'}, + } + + def __init__(self, *, os_type=None, disk_size_gb: int=None, encryption_settings=None, tags=None, sku=None, **kwargs) -> None: + super(DiskUpdate, self).__init__(**kwargs) + self.os_type = os_type + self.disk_size_gb = disk_size_gb + self.encryption_settings = encryption_settings + self.tags = tags + self.sku = sku + + +class EncryptionSettings(Model): + """Encryption settings for disk or snapshot. + + :param enabled: Set this flag to true and provide DiskEncryptionKey and + optional KeyEncryptionKey to enable encryption. Set this flag to false and + remove DiskEncryptionKey and KeyEncryptionKey to disable encryption. If + EncryptionSettings is null in the request object, the existing settings + remain unchanged. + :type enabled: bool + :param disk_encryption_key: Key Vault Secret Url and vault id of the disk + encryption key + :type disk_encryption_key: + ~azure.mgmt.compute.v2018_04_01.models.KeyVaultAndSecretReference + :param key_encryption_key: Key Vault Key Url and vault id of the key + encryption key + :type key_encryption_key: + ~azure.mgmt.compute.v2018_04_01.models.KeyVaultAndKeyReference + """ + + _attribute_map = { + 'enabled': {'key': 'enabled', 'type': 'bool'}, + 'disk_encryption_key': {'key': 'diskEncryptionKey', 'type': 'KeyVaultAndSecretReference'}, + 'key_encryption_key': {'key': 'keyEncryptionKey', 'type': 'KeyVaultAndKeyReference'}, + } + + def __init__(self, *, enabled: bool=None, disk_encryption_key=None, key_encryption_key=None, **kwargs) -> None: + super(EncryptionSettings, self).__init__(**kwargs) + self.enabled = enabled + self.disk_encryption_key = disk_encryption_key + self.key_encryption_key = key_encryption_key + + +class GrantAccessData(Model): + """Data used for requesting a SAS. + + All required parameters must be populated in order to send to Azure. + + :param access: Required. Possible values include: 'None', 'Read' + :type access: str or ~azure.mgmt.compute.v2018_04_01.models.AccessLevel + :param duration_in_seconds: Required. Time duration in seconds until the + SAS access expires. + :type duration_in_seconds: int + """ + + _validation = { + 'access': {'required': True}, + 'duration_in_seconds': {'required': True}, + } + + _attribute_map = { + 'access': {'key': 'access', 'type': 'str'}, + 'duration_in_seconds': {'key': 'durationInSeconds', 'type': 'int'}, + } + + def __init__(self, *, access, duration_in_seconds: int, **kwargs) -> None: + super(GrantAccessData, self).__init__(**kwargs) + self.access = access + self.duration_in_seconds = duration_in_seconds + + +class HardwareProfile(Model): + """Specifies the hardware settings for the virtual machine. + + :param vm_size: Specifies the size of the virtual machine. For more + information about virtual machine sizes, see [Sizes for virtual + machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-sizes?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). +

    The available VM sizes depend on region and availability set. For + a list of available sizes use these APIs:

    [List all available + virtual machine sizes in an availability + set](https://docs.microsoft.com/rest/api/compute/availabilitysets/listavailablesizes) +

    [List all available virtual machine sizes in a + region](https://docs.microsoft.com/rest/api/compute/virtualmachinesizes/list) +

    [List all available virtual machine sizes for + resizing](https://docs.microsoft.com/rest/api/compute/virtualmachines/listavailablesizes). + Possible values include: 'Basic_A0', 'Basic_A1', 'Basic_A2', 'Basic_A3', + 'Basic_A4', 'Standard_A0', 'Standard_A1', 'Standard_A2', 'Standard_A3', + 'Standard_A4', 'Standard_A5', 'Standard_A6', 'Standard_A7', 'Standard_A8', + 'Standard_A9', 'Standard_A10', 'Standard_A11', 'Standard_A1_v2', + 'Standard_A2_v2', 'Standard_A4_v2', 'Standard_A8_v2', 'Standard_A2m_v2', + 'Standard_A4m_v2', 'Standard_A8m_v2', 'Standard_B1s', 'Standard_B1ms', + 'Standard_B2s', 'Standard_B2ms', 'Standard_B4ms', 'Standard_B8ms', + 'Standard_D1', 'Standard_D2', 'Standard_D3', 'Standard_D4', + 'Standard_D11', 'Standard_D12', 'Standard_D13', 'Standard_D14', + 'Standard_D1_v2', 'Standard_D2_v2', 'Standard_D3_v2', 'Standard_D4_v2', + 'Standard_D5_v2', 'Standard_D2_v3', 'Standard_D4_v3', 'Standard_D8_v3', + 'Standard_D16_v3', 'Standard_D32_v3', 'Standard_D64_v3', + 'Standard_D2s_v3', 'Standard_D4s_v3', 'Standard_D8s_v3', + 'Standard_D16s_v3', 'Standard_D32s_v3', 'Standard_D64s_v3', + 'Standard_D11_v2', 'Standard_D12_v2', 'Standard_D13_v2', + 'Standard_D14_v2', 'Standard_D15_v2', 'Standard_DS1', 'Standard_DS2', + 'Standard_DS3', 'Standard_DS4', 'Standard_DS11', 'Standard_DS12', + 'Standard_DS13', 'Standard_DS14', 'Standard_DS1_v2', 'Standard_DS2_v2', + 'Standard_DS3_v2', 'Standard_DS4_v2', 'Standard_DS5_v2', + 'Standard_DS11_v2', 'Standard_DS12_v2', 'Standard_DS13_v2', + 'Standard_DS14_v2', 'Standard_DS15_v2', 'Standard_DS13-4_v2', + 'Standard_DS13-2_v2', 'Standard_DS14-8_v2', 'Standard_DS14-4_v2', + 'Standard_E2_v3', 'Standard_E4_v3', 'Standard_E8_v3', 'Standard_E16_v3', + 'Standard_E32_v3', 'Standard_E64_v3', 'Standard_E2s_v3', + 'Standard_E4s_v3', 'Standard_E8s_v3', 'Standard_E16s_v3', + 'Standard_E32s_v3', 'Standard_E64s_v3', 'Standard_E32-16_v3', + 'Standard_E32-8s_v3', 'Standard_E64-32s_v3', 'Standard_E64-16s_v3', + 'Standard_F1', 'Standard_F2', 'Standard_F4', 'Standard_F8', + 'Standard_F16', 'Standard_F1s', 'Standard_F2s', 'Standard_F4s', + 'Standard_F8s', 'Standard_F16s', 'Standard_F2s_v2', 'Standard_F4s_v2', + 'Standard_F8s_v2', 'Standard_F16s_v2', 'Standard_F32s_v2', + 'Standard_F64s_v2', 'Standard_F72s_v2', 'Standard_G1', 'Standard_G2', + 'Standard_G3', 'Standard_G4', 'Standard_G5', 'Standard_GS1', + 'Standard_GS2', 'Standard_GS3', 'Standard_GS4', 'Standard_GS5', + 'Standard_GS4-8', 'Standard_GS4-4', 'Standard_GS5-16', 'Standard_GS5-8', + 'Standard_H8', 'Standard_H16', 'Standard_H8m', 'Standard_H16m', + 'Standard_H16r', 'Standard_H16mr', 'Standard_L4s', 'Standard_L8s', + 'Standard_L16s', 'Standard_L32s', 'Standard_M64s', 'Standard_M64ms', + 'Standard_M128s', 'Standard_M128ms', 'Standard_M64-32ms', + 'Standard_M64-16ms', 'Standard_M128-64ms', 'Standard_M128-32ms', + 'Standard_NC6', 'Standard_NC12', 'Standard_NC24', 'Standard_NC24r', + 'Standard_NC6s_v2', 'Standard_NC12s_v2', 'Standard_NC24s_v2', + 'Standard_NC24rs_v2', 'Standard_NC6s_v3', 'Standard_NC12s_v3', + 'Standard_NC24s_v3', 'Standard_NC24rs_v3', 'Standard_ND6s', + 'Standard_ND12s', 'Standard_ND24s', 'Standard_ND24rs', 'Standard_NV6', + 'Standard_NV12', 'Standard_NV24' + :type vm_size: str or + ~azure.mgmt.compute.v2018_04_01.models.VirtualMachineSizeTypes + """ + + _attribute_map = { + 'vm_size': {'key': 'vmSize', 'type': 'str'}, + } + + def __init__(self, *, vm_size=None, **kwargs) -> None: + super(HardwareProfile, self).__init__(**kwargs) + self.vm_size = vm_size + + +class Image(Resource): + """The source user image virtual hard disk. The virtual hard disk will be + copied before being attached to the virtual machine. If SourceImage is + provided, the destination virtual hard drive must not exist. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource Id + :vartype id: str + :ivar name: Resource name + :vartype name: str + :ivar type: Resource type + :vartype type: str + :param location: Required. Resource location + :type location: str + :param tags: Resource tags + :type tags: dict[str, str] + :param source_virtual_machine: The source virtual machine from which Image + is created. + :type source_virtual_machine: + ~azure.mgmt.compute.v2018_04_01.models.SubResource + :param storage_profile: Specifies the storage settings for the virtual + machine disks. + :type storage_profile: + ~azure.mgmt.compute.v2018_04_01.models.ImageStorageProfile + :ivar provisioning_state: The provisioning state. + :vartype provisioning_state: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'source_virtual_machine': {'key': 'properties.sourceVirtualMachine', 'type': 'SubResource'}, + 'storage_profile': {'key': 'properties.storageProfile', 'type': 'ImageStorageProfile'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + } + + def __init__(self, *, location: str, tags=None, source_virtual_machine=None, storage_profile=None, **kwargs) -> None: + super(Image, self).__init__(location=location, tags=tags, **kwargs) + self.source_virtual_machine = source_virtual_machine + self.storage_profile = storage_profile + self.provisioning_state = None + + +class ImageDataDisk(Model): + """Describes a data disk. + + All required parameters must be populated in order to send to Azure. + + :param lun: Required. Specifies the logical unit number of the data disk. + This value is used to identify data disks within the VM and therefore must + be unique for each data disk attached to a VM. + :type lun: int + :param snapshot: The snapshot. + :type snapshot: ~azure.mgmt.compute.v2018_04_01.models.SubResource + :param managed_disk: The managedDisk. + :type managed_disk: ~azure.mgmt.compute.v2018_04_01.models.SubResource + :param blob_uri: The Virtual Hard Disk. + :type blob_uri: str + :param caching: Specifies the caching requirements.

    Possible + values are:

    **None**

    **ReadOnly**

    **ReadWrite** +

    Default: **None for Standard storage. ReadOnly for Premium + storage**. Possible values include: 'None', 'ReadOnly', 'ReadWrite' + :type caching: str or ~azure.mgmt.compute.v2018_04_01.models.CachingTypes + :param disk_size_gb: Specifies the size of empty data disks in gigabytes. + This element can be used to overwrite the name of the disk in a virtual + machine image.

    This value cannot be larger than 1023 GB + :type disk_size_gb: int + :param storage_account_type: Specifies the storage account type for the + managed disk. Possible values are: Standard_LRS, Premium_LRS, and + StandardSSD_LRS. Possible values include: 'Standard_LRS', 'Premium_LRS', + 'StandardSSD_LRS' + :type storage_account_type: str or + ~azure.mgmt.compute.v2018_04_01.models.StorageAccountTypes + """ + + _validation = { + 'lun': {'required': True}, + } + + _attribute_map = { + 'lun': {'key': 'lun', 'type': 'int'}, + 'snapshot': {'key': 'snapshot', 'type': 'SubResource'}, + 'managed_disk': {'key': 'managedDisk', 'type': 'SubResource'}, + 'blob_uri': {'key': 'blobUri', 'type': 'str'}, + 'caching': {'key': 'caching', 'type': 'CachingTypes'}, + 'disk_size_gb': {'key': 'diskSizeGB', 'type': 'int'}, + 'storage_account_type': {'key': 'storageAccountType', 'type': 'str'}, + } + + def __init__(self, *, lun: int, snapshot=None, managed_disk=None, blob_uri: str=None, caching=None, disk_size_gb: int=None, storage_account_type=None, **kwargs) -> None: + super(ImageDataDisk, self).__init__(**kwargs) + self.lun = lun + self.snapshot = snapshot + self.managed_disk = managed_disk + self.blob_uri = blob_uri + self.caching = caching + self.disk_size_gb = disk_size_gb + self.storage_account_type = storage_account_type + + +class ImageDiskReference(Model): + """The source image used for creating the disk. + + All required parameters must be populated in order to send to Azure. + + :param id: Required. A relative uri containing either a Platform Image + Repository or user image reference. + :type id: str + :param lun: If the disk is created from an image's data disk, this is an + index that indicates which of the data disks in the image to use. For OS + disks, this field is null. + :type lun: int + """ + + _validation = { + 'id': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'lun': {'key': 'lun', 'type': 'int'}, + } + + def __init__(self, *, id: str, lun: int=None, **kwargs) -> None: + super(ImageDiskReference, self).__init__(**kwargs) + self.id = id + self.lun = lun + + +class ImageOSDisk(Model): + """Describes an Operating System disk. + + All required parameters must be populated in order to send to Azure. + + :param os_type: Required. This property allows you to specify the type of + the OS that is included in the disk if creating a VM from a custom image. +

    Possible values are:

    **Windows**

    **Linux**. + Possible values include: 'Windows', 'Linux' + :type os_type: str or + ~azure.mgmt.compute.v2018_04_01.models.OperatingSystemTypes + :param os_state: Required. The OS State. Possible values include: + 'Generalized', 'Specialized' + :type os_state: str or + ~azure.mgmt.compute.v2018_04_01.models.OperatingSystemStateTypes + :param snapshot: The snapshot. + :type snapshot: ~azure.mgmt.compute.v2018_04_01.models.SubResource + :param managed_disk: The managedDisk. + :type managed_disk: ~azure.mgmt.compute.v2018_04_01.models.SubResource + :param blob_uri: The Virtual Hard Disk. + :type blob_uri: str + :param caching: Specifies the caching requirements.

    Possible + values are:

    **None**

    **ReadOnly**

    **ReadWrite** +

    Default: **None for Standard storage. ReadOnly for Premium + storage**. Possible values include: 'None', 'ReadOnly', 'ReadWrite' + :type caching: str or ~azure.mgmt.compute.v2018_04_01.models.CachingTypes + :param disk_size_gb: Specifies the size of empty data disks in gigabytes. + This element can be used to overwrite the name of the disk in a virtual + machine image.

    This value cannot be larger than 1023 GB + :type disk_size_gb: int + :param storage_account_type: Specifies the storage account type for the + managed disk. Possible values are: Standard_LRS, Premium_LRS, and + StandardSSD_LRS. Possible values include: 'Standard_LRS', 'Premium_LRS', + 'StandardSSD_LRS' + :type storage_account_type: str or + ~azure.mgmt.compute.v2018_04_01.models.StorageAccountTypes + """ + + _validation = { + 'os_type': {'required': True}, + 'os_state': {'required': True}, + } + + _attribute_map = { + 'os_type': {'key': 'osType', 'type': 'OperatingSystemTypes'}, + 'os_state': {'key': 'osState', 'type': 'OperatingSystemStateTypes'}, + 'snapshot': {'key': 'snapshot', 'type': 'SubResource'}, + 'managed_disk': {'key': 'managedDisk', 'type': 'SubResource'}, + 'blob_uri': {'key': 'blobUri', 'type': 'str'}, + 'caching': {'key': 'caching', 'type': 'CachingTypes'}, + 'disk_size_gb': {'key': 'diskSizeGB', 'type': 'int'}, + 'storage_account_type': {'key': 'storageAccountType', 'type': 'str'}, + } + + def __init__(self, *, os_type, os_state, snapshot=None, managed_disk=None, blob_uri: str=None, caching=None, disk_size_gb: int=None, storage_account_type=None, **kwargs) -> None: + super(ImageOSDisk, self).__init__(**kwargs) + self.os_type = os_type + self.os_state = os_state + self.snapshot = snapshot + self.managed_disk = managed_disk + self.blob_uri = blob_uri + self.caching = caching + self.disk_size_gb = disk_size_gb + self.storage_account_type = storage_account_type + + +class SubResource(Model): + """SubResource. + + :param id: Resource Id + :type id: str + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + } + + def __init__(self, *, id: str=None, **kwargs) -> None: + super(SubResource, self).__init__(**kwargs) + self.id = id + + +class ImageReference(SubResource): + """Specifies information about the image to use. You can specify information + about platform images, marketplace images, or virtual machine images. This + element is required when you want to use a platform image, marketplace + image, or virtual machine image, but is not used in other creation + operations. + + :param id: Resource Id + :type id: str + :param publisher: The image publisher. + :type publisher: str + :param offer: Specifies the offer of the platform image or marketplace + image used to create the virtual machine. + :type offer: str + :param sku: The image SKU. + :type sku: str + :param version: Specifies the version of the platform image or marketplace + image used to create the virtual machine. The allowed formats are + Major.Minor.Build or 'latest'. Major, Minor, and Build are decimal + numbers. Specify 'latest' to use the latest version of an image available + at deploy time. Even if you use 'latest', the VM image will not + automatically update after deploy time even if a new version becomes + available. + :type version: str + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'publisher': {'key': 'publisher', 'type': 'str'}, + 'offer': {'key': 'offer', 'type': 'str'}, + 'sku': {'key': 'sku', 'type': 'str'}, + 'version': {'key': 'version', 'type': 'str'}, + } + + def __init__(self, *, id: str=None, publisher: str=None, offer: str=None, sku: str=None, version: str=None, **kwargs) -> None: + super(ImageReference, self).__init__(id=id, **kwargs) + self.publisher = publisher + self.offer = offer + self.sku = sku + self.version = version + + +class ImageStorageProfile(Model): + """Describes a storage profile. + + :param os_disk: Specifies information about the operating system disk used + by the virtual machine.

    For more information about disks, see + [About disks and VHDs for Azure virtual + machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-about-disks-vhds?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). + :type os_disk: ~azure.mgmt.compute.v2018_04_01.models.ImageOSDisk + :param data_disks: Specifies the parameters that are used to add a data + disk to a virtual machine.

    For more information about disks, see + [About disks and VHDs for Azure virtual + machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-about-disks-vhds?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). + :type data_disks: + list[~azure.mgmt.compute.v2018_04_01.models.ImageDataDisk] + :param zone_resilient: Specifies whether an image is zone resilient or + not. Default is false. Zone resilient images can be created only in + regions that provide Zone Redundant Storage (ZRS). + :type zone_resilient: bool + """ + + _attribute_map = { + 'os_disk': {'key': 'osDisk', 'type': 'ImageOSDisk'}, + 'data_disks': {'key': 'dataDisks', 'type': '[ImageDataDisk]'}, + 'zone_resilient': {'key': 'zoneResilient', 'type': 'bool'}, + } + + def __init__(self, *, os_disk=None, data_disks=None, zone_resilient: bool=None, **kwargs) -> None: + super(ImageStorageProfile, self).__init__(**kwargs) + self.os_disk = os_disk + self.data_disks = data_disks + self.zone_resilient = zone_resilient + + +class ImageUpdate(UpdateResource): + """The source user image virtual hard disk. Only tags may be updated. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :param tags: Resource tags + :type tags: dict[str, str] + :param source_virtual_machine: The source virtual machine from which Image + is created. + :type source_virtual_machine: + ~azure.mgmt.compute.v2018_04_01.models.SubResource + :param storage_profile: Specifies the storage settings for the virtual + machine disks. + :type storage_profile: + ~azure.mgmt.compute.v2018_04_01.models.ImageStorageProfile + :ivar provisioning_state: The provisioning state. + :vartype provisioning_state: str + """ + + _validation = { + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + 'source_virtual_machine': {'key': 'properties.sourceVirtualMachine', 'type': 'SubResource'}, + 'storage_profile': {'key': 'properties.storageProfile', 'type': 'ImageStorageProfile'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + } + + def __init__(self, *, tags=None, source_virtual_machine=None, storage_profile=None, **kwargs) -> None: + super(ImageUpdate, self).__init__(tags=tags, **kwargs) + self.source_virtual_machine = source_virtual_machine + self.storage_profile = storage_profile + self.provisioning_state = None + + +class InnerError(Model): + """Inner error details. + + :param exceptiontype: The exception type. + :type exceptiontype: str + :param errordetail: The internal error message or exception dump. + :type errordetail: str + """ + + _attribute_map = { + 'exceptiontype': {'key': 'exceptiontype', 'type': 'str'}, + 'errordetail': {'key': 'errordetail', 'type': 'str'}, + } + + def __init__(self, *, exceptiontype: str=None, errordetail: str=None, **kwargs) -> None: + super(InnerError, self).__init__(**kwargs) + self.exceptiontype = exceptiontype + self.errordetail = errordetail + + +class InstanceViewStatus(Model): + """Instance view status. + + :param code: The status code. + :type code: str + :param level: The level code. Possible values include: 'Info', 'Warning', + 'Error' + :type level: str or + ~azure.mgmt.compute.v2018_04_01.models.StatusLevelTypes + :param display_status: The short localizable label for the status. + :type display_status: str + :param message: The detailed status message, including for alerts and + error messages. + :type message: str + :param time: The time of the status. + :type time: datetime + """ + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + 'level': {'key': 'level', 'type': 'StatusLevelTypes'}, + 'display_status': {'key': 'displayStatus', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + 'time': {'key': 'time', 'type': 'iso-8601'}, + } + + def __init__(self, *, code: str=None, level=None, display_status: str=None, message: str=None, time=None, **kwargs) -> None: + super(InstanceViewStatus, self).__init__(**kwargs) + self.code = code + self.level = level + self.display_status = display_status + self.message = message + self.time = time + + +class KeyVaultAndKeyReference(Model): + """Key Vault Key Url and vault id of KeK, KeK is optional and when provided is + used to unwrap the encryptionKey. + + All required parameters must be populated in order to send to Azure. + + :param source_vault: Required. Resource id of the KeyVault containing the + key or secret + :type source_vault: ~azure.mgmt.compute.v2018_04_01.models.SourceVault + :param key_url: Required. Url pointing to a key or secret in KeyVault + :type key_url: str + """ + + _validation = { + 'source_vault': {'required': True}, + 'key_url': {'required': True}, + } + + _attribute_map = { + 'source_vault': {'key': 'sourceVault', 'type': 'SourceVault'}, + 'key_url': {'key': 'keyUrl', 'type': 'str'}, + } + + def __init__(self, *, source_vault, key_url: str, **kwargs) -> None: + super(KeyVaultAndKeyReference, self).__init__(**kwargs) + self.source_vault = source_vault + self.key_url = key_url + + +class KeyVaultAndSecretReference(Model): + """Key Vault Secret Url and vault id of the encryption key . + + All required parameters must be populated in order to send to Azure. + + :param source_vault: Required. Resource id of the KeyVault containing the + key or secret + :type source_vault: ~azure.mgmt.compute.v2018_04_01.models.SourceVault + :param secret_url: Required. Url pointing to a key or secret in KeyVault + :type secret_url: str + """ + + _validation = { + 'source_vault': {'required': True}, + 'secret_url': {'required': True}, + } + + _attribute_map = { + 'source_vault': {'key': 'sourceVault', 'type': 'SourceVault'}, + 'secret_url': {'key': 'secretUrl', 'type': 'str'}, + } + + def __init__(self, *, source_vault, secret_url: str, **kwargs) -> None: + super(KeyVaultAndSecretReference, self).__init__(**kwargs) + self.source_vault = source_vault + self.secret_url = secret_url + + +class KeyVaultKeyReference(Model): + """Describes a reference to Key Vault Key. + + All required parameters must be populated in order to send to Azure. + + :param key_url: Required. The URL referencing a key encryption key in Key + Vault. + :type key_url: str + :param source_vault: Required. The relative URL of the Key Vault + containing the key. + :type source_vault: ~azure.mgmt.compute.v2018_04_01.models.SubResource + """ + + _validation = { + 'key_url': {'required': True}, + 'source_vault': {'required': True}, + } + + _attribute_map = { + 'key_url': {'key': 'keyUrl', 'type': 'str'}, + 'source_vault': {'key': 'sourceVault', 'type': 'SubResource'}, + } + + def __init__(self, *, key_url: str, source_vault, **kwargs) -> None: + super(KeyVaultKeyReference, self).__init__(**kwargs) + self.key_url = key_url + self.source_vault = source_vault + + +class KeyVaultSecretReference(Model): + """Describes a reference to Key Vault Secret. + + All required parameters must be populated in order to send to Azure. + + :param secret_url: Required. The URL referencing a secret in a Key Vault. + :type secret_url: str + :param source_vault: Required. The relative URL of the Key Vault + containing the secret. + :type source_vault: ~azure.mgmt.compute.v2018_04_01.models.SubResource + """ + + _validation = { + 'secret_url': {'required': True}, + 'source_vault': {'required': True}, + } + + _attribute_map = { + 'secret_url': {'key': 'secretUrl', 'type': 'str'}, + 'source_vault': {'key': 'sourceVault', 'type': 'SubResource'}, + } + + def __init__(self, *, secret_url: str, source_vault, **kwargs) -> None: + super(KeyVaultSecretReference, self).__init__(**kwargs) + self.secret_url = secret_url + self.source_vault = source_vault + + +class LinuxConfiguration(Model): + """Specifies the Linux operating system settings on the virtual machine. +

    For a list of supported Linux distributions, see [Linux on + Azure-Endorsed + Distributions](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-endorsed-distros?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json) +

    For running non-endorsed distributions, see [Information for + Non-Endorsed + Distributions](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-create-upload-generic?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json). + + :param disable_password_authentication: Specifies whether password + authentication should be disabled. + :type disable_password_authentication: bool + :param ssh: Specifies the ssh key configuration for a Linux OS. + :type ssh: ~azure.mgmt.compute.v2018_04_01.models.SshConfiguration + """ + + _attribute_map = { + 'disable_password_authentication': {'key': 'disablePasswordAuthentication', 'type': 'bool'}, + 'ssh': {'key': 'ssh', 'type': 'SshConfiguration'}, + } + + def __init__(self, *, disable_password_authentication: bool=None, ssh=None, **kwargs) -> None: + super(LinuxConfiguration, self).__init__(**kwargs) + self.disable_password_authentication = disable_password_authentication + self.ssh = ssh + + +class LogAnalyticsInputBase(Model): + """Api input base class for LogAnalytics Api. + + All required parameters must be populated in order to send to Azure. + + :param blob_container_sas_uri: Required. SAS Uri of the logging blob + container to which LogAnalytics Api writes output logs to. + :type blob_container_sas_uri: str + :param from_time: Required. From time of the query + :type from_time: datetime + :param to_time: Required. To time of the query + :type to_time: datetime + :param group_by_throttle_policy: Group query result by Throttle Policy + applied. + :type group_by_throttle_policy: bool + :param group_by_operation_name: Group query result by Operation Name. + :type group_by_operation_name: bool + :param group_by_resource_name: Group query result by Resource Name. + :type group_by_resource_name: bool + """ + + _validation = { + 'blob_container_sas_uri': {'required': True}, + 'from_time': {'required': True}, + 'to_time': {'required': True}, + } + + _attribute_map = { + 'blob_container_sas_uri': {'key': 'blobContainerSasUri', 'type': 'str'}, + 'from_time': {'key': 'fromTime', 'type': 'iso-8601'}, + 'to_time': {'key': 'toTime', 'type': 'iso-8601'}, + 'group_by_throttle_policy': {'key': 'groupByThrottlePolicy', 'type': 'bool'}, + 'group_by_operation_name': {'key': 'groupByOperationName', 'type': 'bool'}, + 'group_by_resource_name': {'key': 'groupByResourceName', 'type': 'bool'}, + } + + def __init__(self, *, blob_container_sas_uri: str, from_time, to_time, group_by_throttle_policy: bool=None, group_by_operation_name: bool=None, group_by_resource_name: bool=None, **kwargs) -> None: + super(LogAnalyticsInputBase, self).__init__(**kwargs) + self.blob_container_sas_uri = blob_container_sas_uri + self.from_time = from_time + self.to_time = to_time + self.group_by_throttle_policy = group_by_throttle_policy + self.group_by_operation_name = group_by_operation_name + self.group_by_resource_name = group_by_resource_name + + +class LogAnalyticsOperationResult(Model): + """LogAnalytics operation status response. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar properties: LogAnalyticsOutput + :vartype properties: + ~azure.mgmt.compute.v2018_04_01.models.LogAnalyticsOutput + """ + + _validation = { + 'properties': {'readonly': True}, + } + + _attribute_map = { + 'properties': {'key': 'properties', 'type': 'LogAnalyticsOutput'}, + } + + def __init__(self, **kwargs) -> None: + super(LogAnalyticsOperationResult, self).__init__(**kwargs) + self.properties = None + + +class LogAnalyticsOutput(Model): + """LogAnalytics output properties. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar output: Output file Uri path to blob container. + :vartype output: str + """ + + _validation = { + 'output': {'readonly': True}, + } + + _attribute_map = { + 'output': {'key': 'output', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(LogAnalyticsOutput, self).__init__(**kwargs) + self.output = None + + +class MaintenanceRedeployStatus(Model): + """Maintenance Operation Status. + + :param is_customer_initiated_maintenance_allowed: True, if customer is + allowed to perform Maintenance. + :type is_customer_initiated_maintenance_allowed: bool + :param pre_maintenance_window_start_time: Start Time for the Pre + Maintenance Window. + :type pre_maintenance_window_start_time: datetime + :param pre_maintenance_window_end_time: End Time for the Pre Maintenance + Window. + :type pre_maintenance_window_end_time: datetime + :param maintenance_window_start_time: Start Time for the Maintenance + Window. + :type maintenance_window_start_time: datetime + :param maintenance_window_end_time: End Time for the Maintenance Window. + :type maintenance_window_end_time: datetime + :param last_operation_result_code: The Last Maintenance Operation Result + Code. Possible values include: 'None', 'RetryLater', 'MaintenanceAborted', + 'MaintenanceCompleted' + :type last_operation_result_code: str or + ~azure.mgmt.compute.v2018_04_01.models.MaintenanceOperationResultCodeTypes + :param last_operation_message: Message returned for the last Maintenance + Operation. + :type last_operation_message: str + """ + + _attribute_map = { + 'is_customer_initiated_maintenance_allowed': {'key': 'isCustomerInitiatedMaintenanceAllowed', 'type': 'bool'}, + 'pre_maintenance_window_start_time': {'key': 'preMaintenanceWindowStartTime', 'type': 'iso-8601'}, + 'pre_maintenance_window_end_time': {'key': 'preMaintenanceWindowEndTime', 'type': 'iso-8601'}, + 'maintenance_window_start_time': {'key': 'maintenanceWindowStartTime', 'type': 'iso-8601'}, + 'maintenance_window_end_time': {'key': 'maintenanceWindowEndTime', 'type': 'iso-8601'}, + 'last_operation_result_code': {'key': 'lastOperationResultCode', 'type': 'MaintenanceOperationResultCodeTypes'}, + 'last_operation_message': {'key': 'lastOperationMessage', 'type': 'str'}, + } + + def __init__(self, *, is_customer_initiated_maintenance_allowed: bool=None, pre_maintenance_window_start_time=None, pre_maintenance_window_end_time=None, maintenance_window_start_time=None, maintenance_window_end_time=None, last_operation_result_code=None, last_operation_message: str=None, **kwargs) -> None: + super(MaintenanceRedeployStatus, self).__init__(**kwargs) + self.is_customer_initiated_maintenance_allowed = is_customer_initiated_maintenance_allowed + self.pre_maintenance_window_start_time = pre_maintenance_window_start_time + self.pre_maintenance_window_end_time = pre_maintenance_window_end_time + self.maintenance_window_start_time = maintenance_window_start_time + self.maintenance_window_end_time = maintenance_window_end_time + self.last_operation_result_code = last_operation_result_code + self.last_operation_message = last_operation_message + + +class ManagedDiskParameters(SubResource): + """The parameters of a managed disk. + + :param id: Resource Id + :type id: str + :param storage_account_type: Specifies the storage account type for the + managed disk. Possible values are: Standard_LRS, Premium_LRS, and + StandardSSD_LRS. Possible values include: 'Standard_LRS', 'Premium_LRS', + 'StandardSSD_LRS' + :type storage_account_type: str or + ~azure.mgmt.compute.v2018_04_01.models.StorageAccountTypes + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'storage_account_type': {'key': 'storageAccountType', 'type': 'str'}, + } + + def __init__(self, *, id: str=None, storage_account_type=None, **kwargs) -> None: + super(ManagedDiskParameters, self).__init__(id=id, **kwargs) + self.storage_account_type = storage_account_type + + +class NetworkInterfaceReference(SubResource): + """Describes a network interface reference. + + :param id: Resource Id + :type id: str + :param primary: Specifies the primary network interface in case the + virtual machine has more than 1 network interface. + :type primary: bool + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'primary': {'key': 'properties.primary', 'type': 'bool'}, + } + + def __init__(self, *, id: str=None, primary: bool=None, **kwargs) -> None: + super(NetworkInterfaceReference, self).__init__(id=id, **kwargs) + self.primary = primary + + +class NetworkProfile(Model): + """Specifies the network interfaces of the virtual machine. + + :param network_interfaces: Specifies the list of resource Ids for the + network interfaces associated with the virtual machine. + :type network_interfaces: + list[~azure.mgmt.compute.v2018_04_01.models.NetworkInterfaceReference] + """ + + _attribute_map = { + 'network_interfaces': {'key': 'networkInterfaces', 'type': '[NetworkInterfaceReference]'}, + } + + def __init__(self, *, network_interfaces=None, **kwargs) -> None: + super(NetworkProfile, self).__init__(**kwargs) + self.network_interfaces = network_interfaces + + +class OSDisk(Model): + """Specifies information about the operating system disk used by the virtual + machine.

    For more information about disks, see [About disks and + VHDs for Azure virtual + machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-about-disks-vhds?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). + + All required parameters must be populated in order to send to Azure. + + :param os_type: This property allows you to specify the type of the OS + that is included in the disk if creating a VM from user-image or a + specialized VHD.

    Possible values are:

    **Windows** +

    **Linux**. Possible values include: 'Windows', 'Linux' + :type os_type: str or + ~azure.mgmt.compute.v2018_04_01.models.OperatingSystemTypes + :param encryption_settings: Specifies the encryption settings for the OS + Disk.

    Minimum api-version: 2015-06-15 + :type encryption_settings: + ~azure.mgmt.compute.v2018_04_01.models.DiskEncryptionSettings + :param name: The disk name. + :type name: str + :param vhd: The virtual hard disk. + :type vhd: ~azure.mgmt.compute.v2018_04_01.models.VirtualHardDisk + :param image: The source user image virtual hard disk. The virtual hard + disk will be copied before being attached to the virtual machine. If + SourceImage is provided, the destination virtual hard drive must not + exist. + :type image: ~azure.mgmt.compute.v2018_04_01.models.VirtualHardDisk + :param caching: Specifies the caching requirements.

    Possible + values are:

    **None**

    **ReadOnly**

    **ReadWrite** +

    Default: **None for Standard storage. ReadOnly for Premium + storage**. Possible values include: 'None', 'ReadOnly', 'ReadWrite' + :type caching: str or ~azure.mgmt.compute.v2018_04_01.models.CachingTypes + :param write_accelerator_enabled: Specifies whether writeAccelerator + should be enabled or disabled on the disk. + :type write_accelerator_enabled: bool + :param create_option: Required. Specifies how the virtual machine should + be created.

    Possible values are:

    **Attach** \\u2013 This + value is used when you are using a specialized disk to create the virtual + machine.

    **FromImage** \\u2013 This value is used when you are + using an image to create the virtual machine. If you are using a platform + image, you also use the imageReference element described above. If you are + using a marketplace image, you also use the plan element previously + described. Possible values include: 'FromImage', 'Empty', 'Attach' + :type create_option: str or + ~azure.mgmt.compute.v2018_04_01.models.DiskCreateOptionTypes + :param disk_size_gb: Specifies the size of an empty data disk in + gigabytes. This element can be used to overwrite the size of the disk in a + virtual machine image.

    This value cannot be larger than 1023 GB + :type disk_size_gb: int + :param managed_disk: The managed disk parameters. + :type managed_disk: + ~azure.mgmt.compute.v2018_04_01.models.ManagedDiskParameters + """ + + _validation = { + 'create_option': {'required': True}, + } + + _attribute_map = { + 'os_type': {'key': 'osType', 'type': 'OperatingSystemTypes'}, + 'encryption_settings': {'key': 'encryptionSettings', 'type': 'DiskEncryptionSettings'}, + 'name': {'key': 'name', 'type': 'str'}, + 'vhd': {'key': 'vhd', 'type': 'VirtualHardDisk'}, + 'image': {'key': 'image', 'type': 'VirtualHardDisk'}, + 'caching': {'key': 'caching', 'type': 'CachingTypes'}, + 'write_accelerator_enabled': {'key': 'writeAcceleratorEnabled', 'type': 'bool'}, + 'create_option': {'key': 'createOption', 'type': 'str'}, + 'disk_size_gb': {'key': 'diskSizeGB', 'type': 'int'}, + 'managed_disk': {'key': 'managedDisk', 'type': 'ManagedDiskParameters'}, + } + + def __init__(self, *, create_option, os_type=None, encryption_settings=None, name: str=None, vhd=None, image=None, caching=None, write_accelerator_enabled: bool=None, disk_size_gb: int=None, managed_disk=None, **kwargs) -> None: + super(OSDisk, self).__init__(**kwargs) + self.os_type = os_type + self.encryption_settings = encryption_settings + self.name = name + self.vhd = vhd + self.image = image + self.caching = caching + self.write_accelerator_enabled = write_accelerator_enabled + self.create_option = create_option + self.disk_size_gb = disk_size_gb + self.managed_disk = managed_disk + + +class OSDiskImage(Model): + """Contains the os disk image information. + + All required parameters must be populated in order to send to Azure. + + :param operating_system: Required. The operating system of the + osDiskImage. Possible values include: 'Windows', 'Linux' + :type operating_system: str or + ~azure.mgmt.compute.v2018_04_01.models.OperatingSystemTypes + """ + + _validation = { + 'operating_system': {'required': True}, + } + + _attribute_map = { + 'operating_system': {'key': 'operatingSystem', 'type': 'OperatingSystemTypes'}, + } + + def __init__(self, *, operating_system, **kwargs) -> None: + super(OSDiskImage, self).__init__(**kwargs) + self.operating_system = operating_system + + +class OSProfile(Model): + """Specifies the operating system settings for the virtual machine. + + :param computer_name: Specifies the host OS name of the virtual machine. +

    This name cannot be updated after the VM is created.

    + **Max-length (Windows):** 15 characters

    **Max-length (Linux):** + 64 characters.

    For naming conventions and restrictions see [Azure + infrastructure services implementation + guidelines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-infrastructure-subscription-accounts-guidelines?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json#1-naming-conventions). + :type computer_name: str + :param admin_username: Specifies the name of the administrator account. +

    **Windows-only restriction:** Cannot end in "."

    + **Disallowed values:** "administrator", "admin", "user", "user1", "test", + "user2", "test1", "user3", "admin1", "1", "123", "a", "actuser", "adm", + "admin2", "aspnet", "backup", "console", "david", "guest", "john", + "owner", "root", "server", "sql", "support", "support_388945a0", "sys", + "test2", "test3", "user4", "user5".

    **Minimum-length (Linux):** 1 + character

    **Max-length (Linux):** 64 characters

    + **Max-length (Windows):** 20 characters

  • For root access to + the Linux VM, see [Using root privileges on Linux virtual machines in + Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-use-root-privileges?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json)
  • + For a list of built-in system users on Linux that should not be used in + this field, see [Selecting User Names for Linux on + Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-usernames?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json) + :type admin_username: str + :param admin_password: Specifies the password of the administrator + account.

    **Minimum-length (Windows):** 8 characters

    + **Minimum-length (Linux):** 6 characters

    **Max-length + (Windows):** 123 characters

    **Max-length (Linux):** 72 characters +

    **Complexity requirements:** 3 out of 4 conditions below need to + be fulfilled
    Has lower characters
    Has upper characters
    Has a + digit
    Has a special character (Regex match [\\W_])

    + **Disallowed values:** "abc@123", "P@$$w0rd", "P@ssw0rd", "P@ssword123", + "Pa$$word", "pass@word1", "Password!", "Password1", "Password22", + "iloveyou!"

    For resetting the password, see [How to reset the + Remote Desktop service or its login password in a Windows + VM](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-reset-rdp?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json) +

    For resetting root password, see [Manage users, SSH, and check or + repair disks on Azure Linux VMs using the VMAccess + Extension](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-using-vmaccess-extension?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json#reset-root-password) + :type admin_password: str + :param custom_data: Specifies a base-64 encoded string of custom data. The + base-64 encoded string is decoded to a binary array that is saved as a + file on the Virtual Machine. The maximum length of the binary array is + 65535 bytes.

    For using cloud-init for your VM, see [Using + cloud-init to customize a Linux VM during + creation](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-using-cloud-init?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json) + :type custom_data: str + :param windows_configuration: Specifies Windows operating system settings + on the virtual machine. + :type windows_configuration: + ~azure.mgmt.compute.v2018_04_01.models.WindowsConfiguration + :param linux_configuration: Specifies the Linux operating system settings + on the virtual machine.

    For a list of supported Linux + distributions, see [Linux on Azure-Endorsed + Distributions](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-endorsed-distros?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json) +

    For running non-endorsed distributions, see [Information for + Non-Endorsed + Distributions](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-create-upload-generic?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json). + :type linux_configuration: + ~azure.mgmt.compute.v2018_04_01.models.LinuxConfiguration + :param secrets: Specifies set of certificates that should be installed + onto the virtual machine. + :type secrets: + list[~azure.mgmt.compute.v2018_04_01.models.VaultSecretGroup] + """ + + _attribute_map = { + 'computer_name': {'key': 'computerName', 'type': 'str'}, + 'admin_username': {'key': 'adminUsername', 'type': 'str'}, + 'admin_password': {'key': 'adminPassword', 'type': 'str'}, + 'custom_data': {'key': 'customData', 'type': 'str'}, + 'windows_configuration': {'key': 'windowsConfiguration', 'type': 'WindowsConfiguration'}, + 'linux_configuration': {'key': 'linuxConfiguration', 'type': 'LinuxConfiguration'}, + 'secrets': {'key': 'secrets', 'type': '[VaultSecretGroup]'}, + } + + def __init__(self, *, computer_name: str=None, admin_username: str=None, admin_password: str=None, custom_data: str=None, windows_configuration=None, linux_configuration=None, secrets=None, **kwargs) -> None: + super(OSProfile, self).__init__(**kwargs) + self.computer_name = computer_name + self.admin_username = admin_username + self.admin_password = admin_password + self.custom_data = custom_data + self.windows_configuration = windows_configuration + self.linux_configuration = linux_configuration + self.secrets = secrets + + +class Plan(Model): + """Specifies information about the marketplace image used to create the + virtual machine. This element is only used for marketplace images. Before + you can use a marketplace image from an API, you must enable the image for + programmatic use. In the Azure portal, find the marketplace image that you + want to use and then click **Want to deploy programmatically, Get Started + ->**. Enter any required information and then click **Save**. + + :param name: The plan ID. + :type name: str + :param publisher: The publisher ID. + :type publisher: str + :param product: Specifies the product of the image from the marketplace. + This is the same value as Offer under the imageReference element. + :type product: str + :param promotion_code: The promotion code. + :type promotion_code: str + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'publisher': {'key': 'publisher', 'type': 'str'}, + 'product': {'key': 'product', 'type': 'str'}, + 'promotion_code': {'key': 'promotionCode', 'type': 'str'}, + } + + def __init__(self, *, name: str=None, publisher: str=None, product: str=None, promotion_code: str=None, **kwargs) -> None: + super(Plan, self).__init__(**kwargs) + self.name = name + self.publisher = publisher + self.product = product + self.promotion_code = promotion_code + + +class ProximityPlacementGroup(Resource): + """Specifies information about the proximity placement group. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource Id + :vartype id: str + :ivar name: Resource name + :vartype name: str + :ivar type: Resource type + :vartype type: str + :param location: Required. Resource location + :type location: str + :param tags: Resource tags + :type tags: dict[str, str] + :param proximity_placement_group_type: Specifies the type of the proximity + placement group.

    Possible values are:

    **Standard** : + Co-locate resources within an Azure region or Availability Zone.

    + **Ultra** : For future use. Possible values include: 'Standard', 'Ultra' + :type proximity_placement_group_type: str or + ~azure.mgmt.compute.v2018_04_01.models.ProximityPlacementGroupType + :ivar virtual_machines: A list of references to all virtual machines in + the proximity placement group. + :vartype virtual_machines: + list[~azure.mgmt.compute.v2018_04_01.models.SubResource] + :ivar virtual_machine_scale_sets: A list of references to all virtual + machine scale sets in the proximity placement group. + :vartype virtual_machine_scale_sets: + list[~azure.mgmt.compute.v2018_04_01.models.SubResource] + :ivar availability_sets: A list of references to all availability sets in + the proximity placement group. + :vartype availability_sets: + list[~azure.mgmt.compute.v2018_04_01.models.SubResource] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + 'virtual_machines': {'readonly': True}, + 'virtual_machine_scale_sets': {'readonly': True}, + 'availability_sets': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'proximity_placement_group_type': {'key': 'properties.proximityPlacementGroupType', 'type': 'str'}, + 'virtual_machines': {'key': 'properties.virtualMachines', 'type': '[SubResource]'}, + 'virtual_machine_scale_sets': {'key': 'properties.virtualMachineScaleSets', 'type': '[SubResource]'}, + 'availability_sets': {'key': 'properties.availabilitySets', 'type': '[SubResource]'}, + } + + def __init__(self, *, location: str, tags=None, proximity_placement_group_type=None, **kwargs) -> None: + super(ProximityPlacementGroup, self).__init__(location=location, tags=tags, **kwargs) + self.proximity_placement_group_type = proximity_placement_group_type + self.virtual_machines = None + self.virtual_machine_scale_sets = None + self.availability_sets = None + + +class ProximityPlacementGroupUpdate(UpdateResource): + """Specifies information about the proximity placement group. + + :param tags: Resource tags + :type tags: dict[str, str] + """ + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__(self, *, tags=None, **kwargs) -> None: + super(ProximityPlacementGroupUpdate, self).__init__(tags=tags, **kwargs) + + +class PurchasePlan(Model): + """Used for establishing the purchase context of any 3rd Party artifact + through MarketPlace. + + All required parameters must be populated in order to send to Azure. + + :param publisher: Required. The publisher ID. + :type publisher: str + :param name: Required. The plan ID. + :type name: str + :param product: Required. Specifies the product of the image from the + marketplace. This is the same value as Offer under the imageReference + element. + :type product: str + """ + + _validation = { + 'publisher': {'required': True}, + 'name': {'required': True}, + 'product': {'required': True}, + } + + _attribute_map = { + 'publisher': {'key': 'publisher', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'product': {'key': 'product', 'type': 'str'}, + } + + def __init__(self, *, publisher: str, name: str, product: str, **kwargs) -> None: + super(PurchasePlan, self).__init__(**kwargs) + self.publisher = publisher + self.name = name + self.product = product + + +class RecoveryWalkResponse(Model): + """Response after calling a manual recovery walk. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar walk_performed: Whether the recovery walk was performed + :vartype walk_performed: bool + :ivar next_platform_update_domain: The next update domain that needs to be + walked. Null means walk spanning all update domains has been completed + :vartype next_platform_update_domain: int + """ + + _validation = { + 'walk_performed': {'readonly': True}, + 'next_platform_update_domain': {'readonly': True}, + } + + _attribute_map = { + 'walk_performed': {'key': 'walkPerformed', 'type': 'bool'}, + 'next_platform_update_domain': {'key': 'nextPlatformUpdateDomain', 'type': 'int'}, + } + + def __init__(self, **kwargs) -> None: + super(RecoveryWalkResponse, self).__init__(**kwargs) + self.walk_performed = None + self.next_platform_update_domain = None + + +class RequestRateByIntervalInput(LogAnalyticsInputBase): + """Api request input for LogAnalytics getRequestRateByInterval Api. + + All required parameters must be populated in order to send to Azure. + + :param blob_container_sas_uri: Required. SAS Uri of the logging blob + container to which LogAnalytics Api writes output logs to. + :type blob_container_sas_uri: str + :param from_time: Required. From time of the query + :type from_time: datetime + :param to_time: Required. To time of the query + :type to_time: datetime + :param group_by_throttle_policy: Group query result by Throttle Policy + applied. + :type group_by_throttle_policy: bool + :param group_by_operation_name: Group query result by Operation Name. + :type group_by_operation_name: bool + :param group_by_resource_name: Group query result by Resource Name. + :type group_by_resource_name: bool + :param interval_length: Required. Interval value in minutes used to create + LogAnalytics call rate logs. Possible values include: 'ThreeMins', + 'FiveMins', 'ThirtyMins', 'SixtyMins' + :type interval_length: str or + ~azure.mgmt.compute.v2018_04_01.models.IntervalInMins + """ + + _validation = { + 'blob_container_sas_uri': {'required': True}, + 'from_time': {'required': True}, + 'to_time': {'required': True}, + 'interval_length': {'required': True}, + } + + _attribute_map = { + 'blob_container_sas_uri': {'key': 'blobContainerSasUri', 'type': 'str'}, + 'from_time': {'key': 'fromTime', 'type': 'iso-8601'}, + 'to_time': {'key': 'toTime', 'type': 'iso-8601'}, + 'group_by_throttle_policy': {'key': 'groupByThrottlePolicy', 'type': 'bool'}, + 'group_by_operation_name': {'key': 'groupByOperationName', 'type': 'bool'}, + 'group_by_resource_name': {'key': 'groupByResourceName', 'type': 'bool'}, + 'interval_length': {'key': 'intervalLength', 'type': 'IntervalInMins'}, + } + + def __init__(self, *, blob_container_sas_uri: str, from_time, to_time, interval_length, group_by_throttle_policy: bool=None, group_by_operation_name: bool=None, group_by_resource_name: bool=None, **kwargs) -> None: + super(RequestRateByIntervalInput, self).__init__(blob_container_sas_uri=blob_container_sas_uri, from_time=from_time, to_time=to_time, group_by_throttle_policy=group_by_throttle_policy, group_by_operation_name=group_by_operation_name, group_by_resource_name=group_by_resource_name, **kwargs) + self.interval_length = interval_length + + +class RollbackStatusInfo(Model): + """Information about rollback on failed VM instances after a OS Upgrade + operation. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar successfully_rolledback_instance_count: The number of instances + which have been successfully rolled back. + :vartype successfully_rolledback_instance_count: int + :ivar failed_rolledback_instance_count: The number of instances which + failed to rollback. + :vartype failed_rolledback_instance_count: int + :ivar rollback_error: Error details if OS rollback failed. + :vartype rollback_error: ~azure.mgmt.compute.v2018_04_01.models.ApiError + """ + + _validation = { + 'successfully_rolledback_instance_count': {'readonly': True}, + 'failed_rolledback_instance_count': {'readonly': True}, + 'rollback_error': {'readonly': True}, + } + + _attribute_map = { + 'successfully_rolledback_instance_count': {'key': 'successfullyRolledbackInstanceCount', 'type': 'int'}, + 'failed_rolledback_instance_count': {'key': 'failedRolledbackInstanceCount', 'type': 'int'}, + 'rollback_error': {'key': 'rollbackError', 'type': 'ApiError'}, + } + + def __init__(self, **kwargs) -> None: + super(RollbackStatusInfo, self).__init__(**kwargs) + self.successfully_rolledback_instance_count = None + self.failed_rolledback_instance_count = None + self.rollback_error = None + + +class RollingUpgradePolicy(Model): + """The configuration parameters used while performing a rolling upgrade. + + :param max_batch_instance_percent: The maximum percent of total virtual + machine instances that will be upgraded simultaneously by the rolling + upgrade in one batch. As this is a maximum, unhealthy instances in + previous or future batches can cause the percentage of instances in a + batch to decrease to ensure higher reliability. The default value for this + parameter is 20%. + :type max_batch_instance_percent: int + :param max_unhealthy_instance_percent: The maximum percentage of the total + virtual machine instances in the scale set that can be simultaneously + unhealthy, either as a result of being upgraded, or by being found in an + unhealthy state by the virtual machine health checks before the rolling + upgrade aborts. This constraint will be checked prior to starting any + batch. The default value for this parameter is 20%. + :type max_unhealthy_instance_percent: int + :param max_unhealthy_upgraded_instance_percent: The maximum percentage of + upgraded virtual machine instances that can be found to be in an unhealthy + state. This check will happen after each batch is upgraded. If this + percentage is ever exceeded, the rolling update aborts. The default value + for this parameter is 20%. + :type max_unhealthy_upgraded_instance_percent: int + :param pause_time_between_batches: The wait time between completing the + update for all virtual machines in one batch and starting the next batch. + The time duration should be specified in ISO 8601 format. The default + value is 0 seconds (PT0S). + :type pause_time_between_batches: str + """ + + _validation = { + 'max_batch_instance_percent': {'maximum': 100, 'minimum': 5}, + 'max_unhealthy_instance_percent': {'maximum': 100, 'minimum': 5}, + 'max_unhealthy_upgraded_instance_percent': {'maximum': 100, 'minimum': 0}, + } + + _attribute_map = { + 'max_batch_instance_percent': {'key': 'maxBatchInstancePercent', 'type': 'int'}, + 'max_unhealthy_instance_percent': {'key': 'maxUnhealthyInstancePercent', 'type': 'int'}, + 'max_unhealthy_upgraded_instance_percent': {'key': 'maxUnhealthyUpgradedInstancePercent', 'type': 'int'}, + 'pause_time_between_batches': {'key': 'pauseTimeBetweenBatches', 'type': 'str'}, + } + + def __init__(self, *, max_batch_instance_percent: int=None, max_unhealthy_instance_percent: int=None, max_unhealthy_upgraded_instance_percent: int=None, pause_time_between_batches: str=None, **kwargs) -> None: + super(RollingUpgradePolicy, self).__init__(**kwargs) + self.max_batch_instance_percent = max_batch_instance_percent + self.max_unhealthy_instance_percent = max_unhealthy_instance_percent + self.max_unhealthy_upgraded_instance_percent = max_unhealthy_upgraded_instance_percent + self.pause_time_between_batches = pause_time_between_batches + + +class RollingUpgradeProgressInfo(Model): + """Information about the number of virtual machine instances in each upgrade + state. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar successful_instance_count: The number of instances that have been + successfully upgraded. + :vartype successful_instance_count: int + :ivar failed_instance_count: The number of instances that have failed to + be upgraded successfully. + :vartype failed_instance_count: int + :ivar in_progress_instance_count: The number of instances that are + currently being upgraded. + :vartype in_progress_instance_count: int + :ivar pending_instance_count: The number of instances that have not yet + begun to be upgraded. + :vartype pending_instance_count: int + """ + + _validation = { + 'successful_instance_count': {'readonly': True}, + 'failed_instance_count': {'readonly': True}, + 'in_progress_instance_count': {'readonly': True}, + 'pending_instance_count': {'readonly': True}, + } + + _attribute_map = { + 'successful_instance_count': {'key': 'successfulInstanceCount', 'type': 'int'}, + 'failed_instance_count': {'key': 'failedInstanceCount', 'type': 'int'}, + 'in_progress_instance_count': {'key': 'inProgressInstanceCount', 'type': 'int'}, + 'pending_instance_count': {'key': 'pendingInstanceCount', 'type': 'int'}, + } + + def __init__(self, **kwargs) -> None: + super(RollingUpgradeProgressInfo, self).__init__(**kwargs) + self.successful_instance_count = None + self.failed_instance_count = None + self.in_progress_instance_count = None + self.pending_instance_count = None + + +class RollingUpgradeRunningStatus(Model): + """Information about the current running state of the overall upgrade. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar code: Code indicating the current status of the upgrade. Possible + values include: 'RollingForward', 'Cancelled', 'Completed', 'Faulted' + :vartype code: str or + ~azure.mgmt.compute.v2018_04_01.models.RollingUpgradeStatusCode + :ivar start_time: Start time of the upgrade. + :vartype start_time: datetime + :ivar last_action: The last action performed on the rolling upgrade. + Possible values include: 'Start', 'Cancel' + :vartype last_action: str or + ~azure.mgmt.compute.v2018_04_01.models.RollingUpgradeActionType + :ivar last_action_time: Last action time of the upgrade. + :vartype last_action_time: datetime + """ + + _validation = { + 'code': {'readonly': True}, + 'start_time': {'readonly': True}, + 'last_action': {'readonly': True}, + 'last_action_time': {'readonly': True}, + } + + _attribute_map = { + 'code': {'key': 'code', 'type': 'RollingUpgradeStatusCode'}, + 'start_time': {'key': 'startTime', 'type': 'iso-8601'}, + 'last_action': {'key': 'lastAction', 'type': 'RollingUpgradeActionType'}, + 'last_action_time': {'key': 'lastActionTime', 'type': 'iso-8601'}, + } + + def __init__(self, **kwargs) -> None: + super(RollingUpgradeRunningStatus, self).__init__(**kwargs) + self.code = None + self.start_time = None + self.last_action = None + self.last_action_time = None + + +class RollingUpgradeStatusInfo(Resource): + """The status of the latest virtual machine scale set rolling upgrade. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource Id + :vartype id: str + :ivar name: Resource name + :vartype name: str + :ivar type: Resource type + :vartype type: str + :param location: Required. Resource location + :type location: str + :param tags: Resource tags + :type tags: dict[str, str] + :ivar policy: The rolling upgrade policies applied for this upgrade. + :vartype policy: + ~azure.mgmt.compute.v2018_04_01.models.RollingUpgradePolicy + :ivar running_status: Information about the current running state of the + overall upgrade. + :vartype running_status: + ~azure.mgmt.compute.v2018_04_01.models.RollingUpgradeRunningStatus + :ivar progress: Information about the number of virtual machine instances + in each upgrade state. + :vartype progress: + ~azure.mgmt.compute.v2018_04_01.models.RollingUpgradeProgressInfo + :ivar error: Error details for this upgrade, if there are any. + :vartype error: ~azure.mgmt.compute.v2018_04_01.models.ApiError + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + 'policy': {'readonly': True}, + 'running_status': {'readonly': True}, + 'progress': {'readonly': True}, + 'error': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'policy': {'key': 'properties.policy', 'type': 'RollingUpgradePolicy'}, + 'running_status': {'key': 'properties.runningStatus', 'type': 'RollingUpgradeRunningStatus'}, + 'progress': {'key': 'properties.progress', 'type': 'RollingUpgradeProgressInfo'}, + 'error': {'key': 'properties.error', 'type': 'ApiError'}, + } + + def __init__(self, *, location: str, tags=None, **kwargs) -> None: + super(RollingUpgradeStatusInfo, self).__init__(location=location, tags=tags, **kwargs) + self.policy = None + self.running_status = None + self.progress = None + self.error = None + + +class RunCommandDocumentBase(Model): + """Describes the properties of a Run Command metadata. + + All required parameters must be populated in order to send to Azure. + + :param schema: Required. The VM run command schema. + :type schema: str + :param id: Required. The VM run command id. + :type id: str + :param os_type: Required. The Operating System type. Possible values + include: 'Windows', 'Linux' + :type os_type: str or + ~azure.mgmt.compute.v2018_04_01.models.OperatingSystemTypes + :param label: Required. The VM run command label. + :type label: str + :param description: Required. The VM run command description. + :type description: str + """ + + _validation = { + 'schema': {'required': True}, + 'id': {'required': True}, + 'os_type': {'required': True}, + 'label': {'required': True}, + 'description': {'required': True}, + } + + _attribute_map = { + 'schema': {'key': '$schema', 'type': 'str'}, + 'id': {'key': 'id', 'type': 'str'}, + 'os_type': {'key': 'osType', 'type': 'OperatingSystemTypes'}, + 'label': {'key': 'label', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + } + + def __init__(self, *, schema: str, id: str, os_type, label: str, description: str, **kwargs) -> None: + super(RunCommandDocumentBase, self).__init__(**kwargs) + self.schema = schema + self.id = id + self.os_type = os_type + self.label = label + self.description = description + + +class RunCommandDocument(RunCommandDocumentBase): + """Describes the properties of a Run Command. + + All required parameters must be populated in order to send to Azure. + + :param schema: Required. The VM run command schema. + :type schema: str + :param id: Required. The VM run command id. + :type id: str + :param os_type: Required. The Operating System type. Possible values + include: 'Windows', 'Linux' + :type os_type: str or + ~azure.mgmt.compute.v2018_04_01.models.OperatingSystemTypes + :param label: Required. The VM run command label. + :type label: str + :param description: Required. The VM run command description. + :type description: str + :param script: Required. The script to be executed. + :type script: list[str] + :param parameters: The parameters used by the script. + :type parameters: + list[~azure.mgmt.compute.v2018_04_01.models.RunCommandParameterDefinition] + """ + + _validation = { + 'schema': {'required': True}, + 'id': {'required': True}, + 'os_type': {'required': True}, + 'label': {'required': True}, + 'description': {'required': True}, + 'script': {'required': True}, + } + + _attribute_map = { + 'schema': {'key': '$schema', 'type': 'str'}, + 'id': {'key': 'id', 'type': 'str'}, + 'os_type': {'key': 'osType', 'type': 'OperatingSystemTypes'}, + 'label': {'key': 'label', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + 'script': {'key': 'script', 'type': '[str]'}, + 'parameters': {'key': 'parameters', 'type': '[RunCommandParameterDefinition]'}, + } + + def __init__(self, *, schema: str, id: str, os_type, label: str, description: str, script, parameters=None, **kwargs) -> None: + super(RunCommandDocument, self).__init__(schema=schema, id=id, os_type=os_type, label=label, description=description, **kwargs) + self.script = script + self.parameters = parameters + + +class RunCommandInput(Model): + """Capture Virtual Machine parameters. + + All required parameters must be populated in order to send to Azure. + + :param command_id: Required. The run command id. + :type command_id: str + :param script: Optional. The script to be executed. When this value is + given, the given script will override the default script of the command. + :type script: list[str] + :param parameters: The run command parameters. + :type parameters: + list[~azure.mgmt.compute.v2018_04_01.models.RunCommandInputParameter] + """ + + _validation = { + 'command_id': {'required': True}, + } + + _attribute_map = { + 'command_id': {'key': 'commandId', 'type': 'str'}, + 'script': {'key': 'script', 'type': '[str]'}, + 'parameters': {'key': 'parameters', 'type': '[RunCommandInputParameter]'}, + } + + def __init__(self, *, command_id: str, script=None, parameters=None, **kwargs) -> None: + super(RunCommandInput, self).__init__(**kwargs) + self.command_id = command_id + self.script = script + self.parameters = parameters + + +class RunCommandInputParameter(Model): + """Describes the properties of a run command parameter. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. The run command parameter name. + :type name: str + :param value: Required. The run command parameter value. + :type value: str + """ + + _validation = { + 'name': {'required': True}, + 'value': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'value': {'key': 'value', 'type': 'str'}, + } + + def __init__(self, *, name: str, value: str, **kwargs) -> None: + super(RunCommandInputParameter, self).__init__(**kwargs) + self.name = name + self.value = value + + +class RunCommandParameterDefinition(Model): + """Describes the properties of a run command parameter. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. The run command parameter name. + :type name: str + :param type: Required. The run command parameter type. + :type type: str + :param default_value: The run command parameter default value. + :type default_value: str + :param required: The run command parameter required. Default value: False + . + :type required: bool + """ + + _validation = { + 'name': {'required': True}, + 'type': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'default_value': {'key': 'defaultValue', 'type': 'str'}, + 'required': {'key': 'required', 'type': 'bool'}, + } + + def __init__(self, *, name: str, type: str, default_value: str=None, required: bool=False, **kwargs) -> None: + super(RunCommandParameterDefinition, self).__init__(**kwargs) + self.name = name + self.type = type + self.default_value = default_value + self.required = required + + +class RunCommandResult(Model): + """RunCommandResult. + + :param value: Run command operation response. + :type value: + list[~azure.mgmt.compute.v2018_04_01.models.InstanceViewStatus] + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[InstanceViewStatus]'}, + } + + def __init__(self, *, value=None, **kwargs) -> None: + super(RunCommandResult, self).__init__(**kwargs) + self.value = value + + +class Sku(Model): + """Describes a virtual machine scale set sku. + + :param name: The sku name. + :type name: str + :param tier: Specifies the tier of virtual machines in a scale set.

    Possible Values:

    **Standard**

    **Basic** + :type tier: str + :param capacity: Specifies the number of virtual machines in the scale + set. + :type capacity: long + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'tier': {'key': 'tier', 'type': 'str'}, + 'capacity': {'key': 'capacity', 'type': 'long'}, + } + + def __init__(self, *, name: str=None, tier: str=None, capacity: int=None, **kwargs) -> None: + super(Sku, self).__init__(**kwargs) + self.name = name + self.tier = tier + self.capacity = capacity + + +class Snapshot(Resource): + """Snapshot resource. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource Id + :vartype id: str + :ivar name: Resource name + :vartype name: str + :ivar type: Resource type + :vartype type: str + :param location: Required. Resource location + :type location: str + :param tags: Resource tags + :type tags: dict[str, str] + :ivar managed_by: Unused. Always Null. + :vartype managed_by: str + :param sku: + :type sku: ~azure.mgmt.compute.v2018_04_01.models.SnapshotSku + :ivar time_created: The time when the disk was created. + :vartype time_created: datetime + :param os_type: The Operating System type. Possible values include: + 'Windows', 'Linux' + :type os_type: str or + ~azure.mgmt.compute.v2018_04_01.models.OperatingSystemTypes + :param creation_data: Required. Disk source information. CreationData + information cannot be changed after the disk has been created. + :type creation_data: ~azure.mgmt.compute.v2018_04_01.models.CreationData + :param disk_size_gb: If creationData.createOption is Empty, this field is + mandatory and it indicates the size of the VHD to create. If this field is + present for updates or creation with other options, it indicates a resize. + Resizes are only allowed if the disk is not attached to a running VM, and + can only increase the disk's size. + :type disk_size_gb: int + :param encryption_settings: Encryption settings for disk or snapshot + :type encryption_settings: + ~azure.mgmt.compute.v2018_04_01.models.EncryptionSettings + :ivar provisioning_state: The disk provisioning state. + :vartype provisioning_state: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + 'managed_by': {'readonly': True}, + 'time_created': {'readonly': True}, + 'creation_data': {'required': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'managed_by': {'key': 'managedBy', 'type': 'str'}, + 'sku': {'key': 'sku', 'type': 'SnapshotSku'}, + 'time_created': {'key': 'properties.timeCreated', 'type': 'iso-8601'}, + 'os_type': {'key': 'properties.osType', 'type': 'OperatingSystemTypes'}, + 'creation_data': {'key': 'properties.creationData', 'type': 'CreationData'}, + 'disk_size_gb': {'key': 'properties.diskSizeGB', 'type': 'int'}, + 'encryption_settings': {'key': 'properties.encryptionSettings', 'type': 'EncryptionSettings'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + } + + def __init__(self, *, location: str, creation_data, tags=None, sku=None, os_type=None, disk_size_gb: int=None, encryption_settings=None, **kwargs) -> None: + super(Snapshot, self).__init__(location=location, tags=tags, **kwargs) + self.managed_by = None + self.sku = sku + self.time_created = None + self.os_type = os_type + self.creation_data = creation_data + self.disk_size_gb = disk_size_gb + self.encryption_settings = encryption_settings + self.provisioning_state = None + + +class SnapshotSku(Model): + """The snapshots sku name. Can be Standard_LRS, Premium_LRS, or Standard_ZRS. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :param name: The sku name. Possible values include: 'Standard_LRS', + 'Premium_LRS', 'Standard_ZRS' + :type name: str or + ~azure.mgmt.compute.v2018_04_01.models.SnapshotStorageAccountTypes + :ivar tier: The sku tier. Default value: "Standard" . + :vartype tier: str + """ + + _validation = { + 'tier': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'tier': {'key': 'tier', 'type': 'str'}, + } + + def __init__(self, *, name=None, **kwargs) -> None: + super(SnapshotSku, self).__init__(**kwargs) + self.name = name + self.tier = None + + +class SnapshotUpdate(Model): + """Snapshot update resource. + + :param os_type: the Operating System type. Possible values include: + 'Windows', 'Linux' + :type os_type: str or + ~azure.mgmt.compute.v2018_04_01.models.OperatingSystemTypes + :param disk_size_gb: If creationData.createOption is Empty, this field is + mandatory and it indicates the size of the VHD to create. If this field is + present for updates or creation with other options, it indicates a resize. + Resizes are only allowed if the disk is not attached to a running VM, and + can only increase the disk's size. + :type disk_size_gb: int + :param encryption_settings: Encryption settings for disk or snapshot + :type encryption_settings: + ~azure.mgmt.compute.v2018_04_01.models.EncryptionSettings + :param tags: Resource tags + :type tags: dict[str, str] + :param sku: + :type sku: ~azure.mgmt.compute.v2018_04_01.models.SnapshotSku + """ + + _attribute_map = { + 'os_type': {'key': 'properties.osType', 'type': 'OperatingSystemTypes'}, + 'disk_size_gb': {'key': 'properties.diskSizeGB', 'type': 'int'}, + 'encryption_settings': {'key': 'properties.encryptionSettings', 'type': 'EncryptionSettings'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'sku': {'key': 'sku', 'type': 'SnapshotSku'}, + } + + def __init__(self, *, os_type=None, disk_size_gb: int=None, encryption_settings=None, tags=None, sku=None, **kwargs) -> None: + super(SnapshotUpdate, self).__init__(**kwargs) + self.os_type = os_type + self.disk_size_gb = disk_size_gb + self.encryption_settings = encryption_settings + self.tags = tags + self.sku = sku + + +class SourceVault(Model): + """The vault id is an Azure Resource Manager Resource id in the form + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.KeyVault/vaults/{vaultName}. + + :param id: Resource Id + :type id: str + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + } + + def __init__(self, *, id: str=None, **kwargs) -> None: + super(SourceVault, self).__init__(**kwargs) + self.id = id + + +class SshConfiguration(Model): + """SSH configuration for Linux based VMs running on Azure. + + :param public_keys: The list of SSH public keys used to authenticate with + linux based VMs. + :type public_keys: + list[~azure.mgmt.compute.v2018_04_01.models.SshPublicKey] + """ + + _attribute_map = { + 'public_keys': {'key': 'publicKeys', 'type': '[SshPublicKey]'}, + } + + def __init__(self, *, public_keys=None, **kwargs) -> None: + super(SshConfiguration, self).__init__(**kwargs) + self.public_keys = public_keys + + +class SshPublicKey(Model): + """Contains information about SSH certificate public key and the path on the + Linux VM where the public key is placed. + + :param path: Specifies the full path on the created VM where ssh public + key is stored. If the file already exists, the specified key is appended + to the file. Example: /home/user/.ssh/authorized_keys + :type path: str + :param key_data: SSH public key certificate used to authenticate with the + VM through ssh. The key needs to be at least 2048-bit and in ssh-rsa + format.

    For creating ssh keys, see [Create SSH keys on Linux and + Mac for Linux VMs in + Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-mac-create-ssh-keys?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json). + :type key_data: str + """ + + _attribute_map = { + 'path': {'key': 'path', 'type': 'str'}, + 'key_data': {'key': 'keyData', 'type': 'str'}, + } + + def __init__(self, *, path: str=None, key_data: str=None, **kwargs) -> None: + super(SshPublicKey, self).__init__(**kwargs) + self.path = path + self.key_data = key_data + + +class StorageProfile(Model): + """Specifies the storage settings for the virtual machine disks. + + :param image_reference: Specifies information about the image to use. You + can specify information about platform images, marketplace images, or + virtual machine images. This element is required when you want to use a + platform image, marketplace image, or virtual machine image, but is not + used in other creation operations. + :type image_reference: + ~azure.mgmt.compute.v2018_04_01.models.ImageReference + :param os_disk: Specifies information about the operating system disk used + by the virtual machine.

    For more information about disks, see + [About disks and VHDs for Azure virtual + machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-about-disks-vhds?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). + :type os_disk: ~azure.mgmt.compute.v2018_04_01.models.OSDisk + :param data_disks: Specifies the parameters that are used to add a data + disk to a virtual machine.

    For more information about disks, see + [About disks and VHDs for Azure virtual + machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-about-disks-vhds?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). + :type data_disks: list[~azure.mgmt.compute.v2018_04_01.models.DataDisk] + """ + + _attribute_map = { + 'image_reference': {'key': 'imageReference', 'type': 'ImageReference'}, + 'os_disk': {'key': 'osDisk', 'type': 'OSDisk'}, + 'data_disks': {'key': 'dataDisks', 'type': '[DataDisk]'}, + } + + def __init__(self, *, image_reference=None, os_disk=None, data_disks=None, **kwargs) -> None: + super(StorageProfile, self).__init__(**kwargs) + self.image_reference = image_reference + self.os_disk = os_disk + self.data_disks = data_disks + + +class SubResourceReadOnly(Model): + """SubResourceReadOnly. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource Id + :vartype id: str + """ + + _validation = { + 'id': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(SubResourceReadOnly, self).__init__(**kwargs) + self.id = None + + +class ThrottledRequestsInput(LogAnalyticsInputBase): + """Api request input for LogAnalytics getThrottledRequests Api. + + All required parameters must be populated in order to send to Azure. + + :param blob_container_sas_uri: Required. SAS Uri of the logging blob + container to which LogAnalytics Api writes output logs to. + :type blob_container_sas_uri: str + :param from_time: Required. From time of the query + :type from_time: datetime + :param to_time: Required. To time of the query + :type to_time: datetime + :param group_by_throttle_policy: Group query result by Throttle Policy + applied. + :type group_by_throttle_policy: bool + :param group_by_operation_name: Group query result by Operation Name. + :type group_by_operation_name: bool + :param group_by_resource_name: Group query result by Resource Name. + :type group_by_resource_name: bool + """ + + _validation = { + 'blob_container_sas_uri': {'required': True}, + 'from_time': {'required': True}, + 'to_time': {'required': True}, + } + + _attribute_map = { + 'blob_container_sas_uri': {'key': 'blobContainerSasUri', 'type': 'str'}, + 'from_time': {'key': 'fromTime', 'type': 'iso-8601'}, + 'to_time': {'key': 'toTime', 'type': 'iso-8601'}, + 'group_by_throttle_policy': {'key': 'groupByThrottlePolicy', 'type': 'bool'}, + 'group_by_operation_name': {'key': 'groupByOperationName', 'type': 'bool'}, + 'group_by_resource_name': {'key': 'groupByResourceName', 'type': 'bool'}, + } + + def __init__(self, *, blob_container_sas_uri: str, from_time, to_time, group_by_throttle_policy: bool=None, group_by_operation_name: bool=None, group_by_resource_name: bool=None, **kwargs) -> None: + super(ThrottledRequestsInput, self).__init__(blob_container_sas_uri=blob_container_sas_uri, from_time=from_time, to_time=to_time, group_by_throttle_policy=group_by_throttle_policy, group_by_operation_name=group_by_operation_name, group_by_resource_name=group_by_resource_name, **kwargs) + + +class UpgradeOperationHistoricalStatusInfo(Model): + """Virtual Machine Scale Set OS Upgrade History operation response. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar properties: Information about the properties of the upgrade + operation. + :vartype properties: + ~azure.mgmt.compute.v2018_04_01.models.UpgradeOperationHistoricalStatusInfoProperties + :ivar type: Resource type + :vartype type: str + :ivar location: Resource location + :vartype location: str + """ + + _validation = { + 'properties': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'readonly': True}, + } + + _attribute_map = { + 'properties': {'key': 'properties', 'type': 'UpgradeOperationHistoricalStatusInfoProperties'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(UpgradeOperationHistoricalStatusInfo, self).__init__(**kwargs) + self.properties = None + self.type = None + self.location = None + + +class UpgradeOperationHistoricalStatusInfoProperties(Model): + """Describes each OS upgrade on the Virtual Machine Scale Set. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar running_status: Information about the overall status of the upgrade + operation. + :vartype running_status: + ~azure.mgmt.compute.v2018_04_01.models.UpgradeOperationHistoryStatus + :ivar progress: Counts of the VMs in each state. + :vartype progress: + ~azure.mgmt.compute.v2018_04_01.models.RollingUpgradeProgressInfo + :ivar error: Error Details for this upgrade if there are any. + :vartype error: ~azure.mgmt.compute.v2018_04_01.models.ApiError + :ivar started_by: Invoker of the Upgrade Operation. Possible values + include: 'Unknown', 'User', 'Platform' + :vartype started_by: str or + ~azure.mgmt.compute.v2018_04_01.models.UpgradeOperationInvoker + :ivar target_image_reference: Image Reference details + :vartype target_image_reference: + ~azure.mgmt.compute.v2018_04_01.models.ImageReference + :ivar rollback_info: Information about OS rollback if performed + :vartype rollback_info: + ~azure.mgmt.compute.v2018_04_01.models.RollbackStatusInfo + """ + + _validation = { + 'running_status': {'readonly': True}, + 'progress': {'readonly': True}, + 'error': {'readonly': True}, + 'started_by': {'readonly': True}, + 'target_image_reference': {'readonly': True}, + 'rollback_info': {'readonly': True}, + } + + _attribute_map = { + 'running_status': {'key': 'runningStatus', 'type': 'UpgradeOperationHistoryStatus'}, + 'progress': {'key': 'progress', 'type': 'RollingUpgradeProgressInfo'}, + 'error': {'key': 'error', 'type': 'ApiError'}, + 'started_by': {'key': 'startedBy', 'type': 'UpgradeOperationInvoker'}, + 'target_image_reference': {'key': 'targetImageReference', 'type': 'ImageReference'}, + 'rollback_info': {'key': 'rollbackInfo', 'type': 'RollbackStatusInfo'}, + } + + def __init__(self, **kwargs) -> None: + super(UpgradeOperationHistoricalStatusInfoProperties, self).__init__(**kwargs) + self.running_status = None + self.progress = None + self.error = None + self.started_by = None + self.target_image_reference = None + self.rollback_info = None + + +class UpgradeOperationHistoryStatus(Model): + """Information about the current running state of the overall upgrade. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar code: Code indicating the current status of the upgrade. Possible + values include: 'RollingForward', 'Cancelled', 'Completed', 'Faulted' + :vartype code: str or ~azure.mgmt.compute.v2018_04_01.models.UpgradeState + :ivar start_time: Start time of the upgrade. + :vartype start_time: datetime + :ivar end_time: End time of the upgrade. + :vartype end_time: datetime + """ + + _validation = { + 'code': {'readonly': True}, + 'start_time': {'readonly': True}, + 'end_time': {'readonly': True}, + } + + _attribute_map = { + 'code': {'key': 'code', 'type': 'UpgradeState'}, + 'start_time': {'key': 'startTime', 'type': 'iso-8601'}, + 'end_time': {'key': 'endTime', 'type': 'iso-8601'}, + } + + def __init__(self, **kwargs) -> None: + super(UpgradeOperationHistoryStatus, self).__init__(**kwargs) + self.code = None + self.start_time = None + self.end_time = None + + +class UpgradePolicy(Model): + """Describes an upgrade policy - automatic, manual, or rolling. + + :param mode: Specifies the mode of an upgrade to virtual machines in the + scale set.

    Possible values are:

    **Manual** - You + control the application of updates to virtual machines in the scale set. + You do this by using the manualUpgrade action.

    **Automatic** - + All virtual machines in the scale set are automatically updated at the + same time. Possible values include: 'Automatic', 'Manual', 'Rolling' + :type mode: str or ~azure.mgmt.compute.v2018_04_01.models.UpgradeMode + :param rolling_upgrade_policy: The configuration parameters used while + performing a rolling upgrade. + :type rolling_upgrade_policy: + ~azure.mgmt.compute.v2018_04_01.models.RollingUpgradePolicy + :param automatic_os_upgrade: Whether OS upgrades should automatically be + applied to scale set instances in a rolling fashion when a newer version + of the image becomes available. + :type automatic_os_upgrade: bool + :param auto_os_upgrade_policy: Configuration parameters used for + performing automatic OS Upgrade. + :type auto_os_upgrade_policy: + ~azure.mgmt.compute.v2018_04_01.models.AutoOSUpgradePolicy + """ + + _attribute_map = { + 'mode': {'key': 'mode', 'type': 'UpgradeMode'}, + 'rolling_upgrade_policy': {'key': 'rollingUpgradePolicy', 'type': 'RollingUpgradePolicy'}, + 'automatic_os_upgrade': {'key': 'automaticOSUpgrade', 'type': 'bool'}, + 'auto_os_upgrade_policy': {'key': 'autoOSUpgradePolicy', 'type': 'AutoOSUpgradePolicy'}, + } + + def __init__(self, *, mode=None, rolling_upgrade_policy=None, automatic_os_upgrade: bool=None, auto_os_upgrade_policy=None, **kwargs) -> None: + super(UpgradePolicy, self).__init__(**kwargs) + self.mode = mode + self.rolling_upgrade_policy = rolling_upgrade_policy + self.automatic_os_upgrade = automatic_os_upgrade + self.auto_os_upgrade_policy = auto_os_upgrade_policy + + +class Usage(Model): + """Describes Compute Resource Usage. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar unit: Required. An enum describing the unit of usage measurement. + Default value: "Count" . + :vartype unit: str + :param current_value: Required. The current usage of the resource. + :type current_value: int + :param limit: Required. The maximum permitted usage of the resource. + :type limit: long + :param name: Required. The name of the type of usage. + :type name: ~azure.mgmt.compute.v2018_04_01.models.UsageName + """ + + _validation = { + 'unit': {'required': True, 'constant': True}, + 'current_value': {'required': True}, + 'limit': {'required': True}, + 'name': {'required': True}, + } + + _attribute_map = { + 'unit': {'key': 'unit', 'type': 'str'}, + 'current_value': {'key': 'currentValue', 'type': 'int'}, + 'limit': {'key': 'limit', 'type': 'long'}, + 'name': {'key': 'name', 'type': 'UsageName'}, + } + + unit = "Count" + + def __init__(self, *, current_value: int, limit: int, name, **kwargs) -> None: + super(Usage, self).__init__(**kwargs) + self.current_value = current_value + self.limit = limit + self.name = name + + +class UsageName(Model): + """The Usage Names. + + :param value: The name of the resource. + :type value: str + :param localized_value: The localized name of the resource. + :type localized_value: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': 'str'}, + 'localized_value': {'key': 'localizedValue', 'type': 'str'}, + } + + def __init__(self, *, value: str=None, localized_value: str=None, **kwargs) -> None: + super(UsageName, self).__init__(**kwargs) + self.value = value + self.localized_value = localized_value + + +class VaultCertificate(Model): + """Describes a single certificate reference in a Key Vault, and where the + certificate should reside on the VM. + + :param certificate_url: This is the URL of a certificate that has been + uploaded to Key Vault as a secret. For adding a secret to the Key Vault, + see [Add a key or secret to the key + vault](https://docs.microsoft.com/azure/key-vault/key-vault-get-started/#add). + In this case, your certificate needs to be It is the Base64 encoding of + the following JSON Object which is encoded in UTF-8:

    {
    + "data":"",
    "dataType":"pfx",
    + "password":""
    } + :type certificate_url: str + :param certificate_store: For Windows VMs, specifies the certificate store + on the Virtual Machine to which the certificate should be added. The + specified certificate store is implicitly in the LocalMachine account. +

    For Linux VMs, the certificate file is placed under the + /var/lib/waagent directory, with the file name + <UppercaseThumbprint>.crt for the X509 certificate file and + <UppercaseThumbprint>.prv for private key. Both of these files are + .pem formatted. + :type certificate_store: str + """ + + _attribute_map = { + 'certificate_url': {'key': 'certificateUrl', 'type': 'str'}, + 'certificate_store': {'key': 'certificateStore', 'type': 'str'}, + } + + def __init__(self, *, certificate_url: str=None, certificate_store: str=None, **kwargs) -> None: + super(VaultCertificate, self).__init__(**kwargs) + self.certificate_url = certificate_url + self.certificate_store = certificate_store + + +class VaultSecretGroup(Model): + """Describes a set of certificates which are all in the same Key Vault. + + :param source_vault: The relative URL of the Key Vault containing all of + the certificates in VaultCertificates. + :type source_vault: ~azure.mgmt.compute.v2018_04_01.models.SubResource + :param vault_certificates: The list of key vault references in SourceVault + which contain certificates. + :type vault_certificates: + list[~azure.mgmt.compute.v2018_04_01.models.VaultCertificate] + """ + + _attribute_map = { + 'source_vault': {'key': 'sourceVault', 'type': 'SubResource'}, + 'vault_certificates': {'key': 'vaultCertificates', 'type': '[VaultCertificate]'}, + } + + def __init__(self, *, source_vault=None, vault_certificates=None, **kwargs) -> None: + super(VaultSecretGroup, self).__init__(**kwargs) + self.source_vault = source_vault + self.vault_certificates = vault_certificates + + +class VirtualHardDisk(Model): + """Describes the uri of a disk. + + :param uri: Specifies the virtual hard disk's uri. + :type uri: str + """ + + _attribute_map = { + 'uri': {'key': 'uri', 'type': 'str'}, + } + + def __init__(self, *, uri: str=None, **kwargs) -> None: + super(VirtualHardDisk, self).__init__(**kwargs) + self.uri = uri + + +class VirtualMachine(Resource): + """Describes a Virtual Machine. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource Id + :vartype id: str + :ivar name: Resource name + :vartype name: str + :ivar type: Resource type + :vartype type: str + :param location: Required. Resource location + :type location: str + :param tags: Resource tags + :type tags: dict[str, str] + :param plan: Specifies information about the marketplace image used to + create the virtual machine. This element is only used for marketplace + images. Before you can use a marketplace image from an API, you must + enable the image for programmatic use. In the Azure portal, find the + marketplace image that you want to use and then click **Want to deploy + programmatically, Get Started ->**. Enter any required information and + then click **Save**. + :type plan: ~azure.mgmt.compute.v2018_04_01.models.Plan + :param hardware_profile: Specifies the hardware settings for the virtual + machine. + :type hardware_profile: + ~azure.mgmt.compute.v2018_04_01.models.HardwareProfile + :param storage_profile: Specifies the storage settings for the virtual + machine disks. + :type storage_profile: + ~azure.mgmt.compute.v2018_04_01.models.StorageProfile + :param os_profile: Specifies the operating system settings for the virtual + machine. + :type os_profile: ~azure.mgmt.compute.v2018_04_01.models.OSProfile + :param network_profile: Specifies the network interfaces of the virtual + machine. + :type network_profile: + ~azure.mgmt.compute.v2018_04_01.models.NetworkProfile + :param diagnostics_profile: Specifies the boot diagnostic settings state. +

    Minimum api-version: 2015-06-15. + :type diagnostics_profile: + ~azure.mgmt.compute.v2018_04_01.models.DiagnosticsProfile + :param availability_set: Specifies information about the availability set + that the virtual machine should be assigned to. Virtual machines specified + in the same availability set are allocated to different nodes to maximize + availability. For more information about availability sets, see [Manage + the availability of virtual + machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-manage-availability?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). +

    For more information on Azure planned maintenance, see [Planned + maintenance for virtual machines in + Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-planned-maintenance?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json) +

    Currently, a VM can only be added to availability set at creation + time. An existing VM cannot be added to an availability set. + :type availability_set: ~azure.mgmt.compute.v2018_04_01.models.SubResource + :param proximity_placement_group: Specifies information about the + proximity placement group that the virtual machine should be assigned to. +

    Minimum api-version: 2018-04-01. + :type proximity_placement_group: + ~azure.mgmt.compute.v2018_04_01.models.SubResource + :ivar provisioning_state: The provisioning state, which only appears in + the response. + :vartype provisioning_state: str + :ivar instance_view: The virtual machine instance view. + :vartype instance_view: + ~azure.mgmt.compute.v2018_04_01.models.VirtualMachineInstanceView + :param license_type: Specifies that the image or disk that is being used + was licensed on-premises. This element is only used for images that + contain the Windows Server operating system.

    Possible values are: +

    Windows_Client

    Windows_Server

    If this element + is included in a request for an update, the value must match the initial + value. This value cannot be updated.

    For more information, see + [Azure Hybrid Use Benefit for Windows + Server](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-hybrid-use-benefit-licensing?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json) +

    Minimum api-version: 2015-06-15 + :type license_type: str + :ivar vm_id: Specifies the VM unique ID which is a 128-bits identifier + that is encoded and stored in all Azure IaaS VMs SMBIOS and can be read + using platform BIOS commands. + :vartype vm_id: str + :ivar resources: The virtual machine child extension resources. + :vartype resources: + list[~azure.mgmt.compute.v2018_04_01.models.VirtualMachineExtension] + :param identity: The identity of the virtual machine, if configured. + :type identity: + ~azure.mgmt.compute.v2018_04_01.models.VirtualMachineIdentity + :param zones: The virtual machine zones. + :type zones: list[str] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + 'provisioning_state': {'readonly': True}, + 'instance_view': {'readonly': True}, + 'vm_id': {'readonly': True}, + 'resources': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'plan': {'key': 'plan', 'type': 'Plan'}, + 'hardware_profile': {'key': 'properties.hardwareProfile', 'type': 'HardwareProfile'}, + 'storage_profile': {'key': 'properties.storageProfile', 'type': 'StorageProfile'}, + 'os_profile': {'key': 'properties.osProfile', 'type': 'OSProfile'}, + 'network_profile': {'key': 'properties.networkProfile', 'type': 'NetworkProfile'}, + 'diagnostics_profile': {'key': 'properties.diagnosticsProfile', 'type': 'DiagnosticsProfile'}, + 'availability_set': {'key': 'properties.availabilitySet', 'type': 'SubResource'}, + 'proximity_placement_group': {'key': 'properties.proximityPlacementGroup', 'type': 'SubResource'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'instance_view': {'key': 'properties.instanceView', 'type': 'VirtualMachineInstanceView'}, + 'license_type': {'key': 'properties.licenseType', 'type': 'str'}, + 'vm_id': {'key': 'properties.vmId', 'type': 'str'}, + 'resources': {'key': 'resources', 'type': '[VirtualMachineExtension]'}, + 'identity': {'key': 'identity', 'type': 'VirtualMachineIdentity'}, + 'zones': {'key': 'zones', 'type': '[str]'}, + } + + def __init__(self, *, location: str, tags=None, plan=None, hardware_profile=None, storage_profile=None, os_profile=None, network_profile=None, diagnostics_profile=None, availability_set=None, proximity_placement_group=None, license_type: str=None, identity=None, zones=None, **kwargs) -> None: + super(VirtualMachine, self).__init__(location=location, tags=tags, **kwargs) + self.plan = plan + self.hardware_profile = hardware_profile + self.storage_profile = storage_profile + self.os_profile = os_profile + self.network_profile = network_profile + self.diagnostics_profile = diagnostics_profile + self.availability_set = availability_set + self.proximity_placement_group = proximity_placement_group + self.provisioning_state = None + self.instance_view = None + self.license_type = license_type + self.vm_id = None + self.resources = None + self.identity = identity + self.zones = zones + + +class VirtualMachineAgentInstanceView(Model): + """The instance view of the VM Agent running on the virtual machine. + + :param vm_agent_version: The VM Agent full version. + :type vm_agent_version: str + :param extension_handlers: The virtual machine extension handler instance + view. + :type extension_handlers: + list[~azure.mgmt.compute.v2018_04_01.models.VirtualMachineExtensionHandlerInstanceView] + :param statuses: The resource status information. + :type statuses: + list[~azure.mgmt.compute.v2018_04_01.models.InstanceViewStatus] + """ + + _attribute_map = { + 'vm_agent_version': {'key': 'vmAgentVersion', 'type': 'str'}, + 'extension_handlers': {'key': 'extensionHandlers', 'type': '[VirtualMachineExtensionHandlerInstanceView]'}, + 'statuses': {'key': 'statuses', 'type': '[InstanceViewStatus]'}, + } + + def __init__(self, *, vm_agent_version: str=None, extension_handlers=None, statuses=None, **kwargs) -> None: + super(VirtualMachineAgentInstanceView, self).__init__(**kwargs) + self.vm_agent_version = vm_agent_version + self.extension_handlers = extension_handlers + self.statuses = statuses + + +class VirtualMachineCaptureParameters(Model): + """Capture Virtual Machine parameters. + + All required parameters must be populated in order to send to Azure. + + :param vhd_prefix: Required. The captured virtual hard disk's name prefix. + :type vhd_prefix: str + :param destination_container_name: Required. The destination container + name. + :type destination_container_name: str + :param overwrite_vhds: Required. Specifies whether to overwrite the + destination virtual hard disk, in case of conflict. + :type overwrite_vhds: bool + """ + + _validation = { + 'vhd_prefix': {'required': True}, + 'destination_container_name': {'required': True}, + 'overwrite_vhds': {'required': True}, + } + + _attribute_map = { + 'vhd_prefix': {'key': 'vhdPrefix', 'type': 'str'}, + 'destination_container_name': {'key': 'destinationContainerName', 'type': 'str'}, + 'overwrite_vhds': {'key': 'overwriteVhds', 'type': 'bool'}, + } + + def __init__(self, *, vhd_prefix: str, destination_container_name: str, overwrite_vhds: bool, **kwargs) -> None: + super(VirtualMachineCaptureParameters, self).__init__(**kwargs) + self.vhd_prefix = vhd_prefix + self.destination_container_name = destination_container_name + self.overwrite_vhds = overwrite_vhds + + +class VirtualMachineCaptureResult(SubResource): + """Output of virtual machine capture operation. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :param id: Resource Id + :type id: str + :ivar schema: the schema of the captured virtual machine + :vartype schema: str + :ivar content_version: the version of the content + :vartype content_version: str + :ivar parameters: parameters of the captured virtual machine + :vartype parameters: object + :ivar resources: a list of resource items of the captured virtual machine + :vartype resources: list[object] + """ + + _validation = { + 'schema': {'readonly': True}, + 'content_version': {'readonly': True}, + 'parameters': {'readonly': True}, + 'resources': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'schema': {'key': '$schema', 'type': 'str'}, + 'content_version': {'key': 'contentVersion', 'type': 'str'}, + 'parameters': {'key': 'parameters', 'type': 'object'}, + 'resources': {'key': 'resources', 'type': '[object]'}, + } + + def __init__(self, *, id: str=None, **kwargs) -> None: + super(VirtualMachineCaptureResult, self).__init__(id=id, **kwargs) + self.schema = None + self.content_version = None + self.parameters = None + self.resources = None + + +class VirtualMachineExtension(Resource): + """Describes a Virtual Machine Extension. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource Id + :vartype id: str + :ivar name: Resource name + :vartype name: str + :ivar type: Resource type + :vartype type: str + :param location: Required. Resource location + :type location: str + :param tags: Resource tags + :type tags: dict[str, str] + :param force_update_tag: How the extension handler should be forced to + update even if the extension configuration has not changed. + :type force_update_tag: str + :param publisher: The name of the extension handler publisher. + :type publisher: str + :param virtual_machine_extension_type: Specifies the type of the + extension; an example is "CustomScriptExtension". + :type virtual_machine_extension_type: str + :param type_handler_version: Specifies the version of the script handler. + :type type_handler_version: str + :param auto_upgrade_minor_version: Indicates whether the extension should + use a newer minor version if one is available at deployment time. Once + deployed, however, the extension will not upgrade minor versions unless + redeployed, even with this property set to true. + :type auto_upgrade_minor_version: bool + :param settings: Json formatted public settings for the extension. + :type settings: object + :param protected_settings: The extension can contain either + protectedSettings or protectedSettingsFromKeyVault or no protected + settings at all. + :type protected_settings: object + :ivar provisioning_state: The provisioning state, which only appears in + the response. + :vartype provisioning_state: str + :param instance_view: The virtual machine extension instance view. + :type instance_view: + ~azure.mgmt.compute.v2018_04_01.models.VirtualMachineExtensionInstanceView + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'force_update_tag': {'key': 'properties.forceUpdateTag', 'type': 'str'}, + 'publisher': {'key': 'properties.publisher', 'type': 'str'}, + 'virtual_machine_extension_type': {'key': 'properties.type', 'type': 'str'}, + 'type_handler_version': {'key': 'properties.typeHandlerVersion', 'type': 'str'}, + 'auto_upgrade_minor_version': {'key': 'properties.autoUpgradeMinorVersion', 'type': 'bool'}, + 'settings': {'key': 'properties.settings', 'type': 'object'}, + 'protected_settings': {'key': 'properties.protectedSettings', 'type': 'object'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'instance_view': {'key': 'properties.instanceView', 'type': 'VirtualMachineExtensionInstanceView'}, + } + + def __init__(self, *, location: str, tags=None, force_update_tag: str=None, publisher: str=None, virtual_machine_extension_type: str=None, type_handler_version: str=None, auto_upgrade_minor_version: bool=None, settings=None, protected_settings=None, instance_view=None, **kwargs) -> None: + super(VirtualMachineExtension, self).__init__(location=location, tags=tags, **kwargs) + self.force_update_tag = force_update_tag + self.publisher = publisher + self.virtual_machine_extension_type = virtual_machine_extension_type + self.type_handler_version = type_handler_version + self.auto_upgrade_minor_version = auto_upgrade_minor_version + self.settings = settings + self.protected_settings = protected_settings + self.provisioning_state = None + self.instance_view = instance_view + + +class VirtualMachineExtensionHandlerInstanceView(Model): + """The instance view of a virtual machine extension handler. + + :param type: Specifies the type of the extension; an example is + "CustomScriptExtension". + :type type: str + :param type_handler_version: Specifies the version of the script handler. + :type type_handler_version: str + :param status: The extension handler status. + :type status: ~azure.mgmt.compute.v2018_04_01.models.InstanceViewStatus + """ + + _attribute_map = { + 'type': {'key': 'type', 'type': 'str'}, + 'type_handler_version': {'key': 'typeHandlerVersion', 'type': 'str'}, + 'status': {'key': 'status', 'type': 'InstanceViewStatus'}, + } + + def __init__(self, *, type: str=None, type_handler_version: str=None, status=None, **kwargs) -> None: + super(VirtualMachineExtensionHandlerInstanceView, self).__init__(**kwargs) + self.type = type + self.type_handler_version = type_handler_version + self.status = status + + +class VirtualMachineExtensionImage(Resource): + """Describes a Virtual Machine Extension Image. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource Id + :vartype id: str + :ivar name: Resource name + :vartype name: str + :ivar type: Resource type + :vartype type: str + :param location: Required. Resource location + :type location: str + :param tags: Resource tags + :type tags: dict[str, str] + :param operating_system: Required. The operating system this extension + supports. + :type operating_system: str + :param compute_role: Required. The type of role (IaaS or PaaS) this + extension supports. + :type compute_role: str + :param handler_schema: Required. The schema defined by publisher, where + extension consumers should provide settings in a matching schema. + :type handler_schema: str + :param vm_scale_set_enabled: Whether the extension can be used on xRP + VMScaleSets. By default existing extensions are usable on scalesets, but + there might be cases where a publisher wants to explicitly indicate the + extension is only enabled for CRP VMs but not VMSS. + :type vm_scale_set_enabled: bool + :param supports_multiple_extensions: Whether the handler can support + multiple extensions. + :type supports_multiple_extensions: bool + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + 'operating_system': {'required': True}, + 'compute_role': {'required': True}, + 'handler_schema': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'operating_system': {'key': 'properties.operatingSystem', 'type': 'str'}, + 'compute_role': {'key': 'properties.computeRole', 'type': 'str'}, + 'handler_schema': {'key': 'properties.handlerSchema', 'type': 'str'}, + 'vm_scale_set_enabled': {'key': 'properties.vmScaleSetEnabled', 'type': 'bool'}, + 'supports_multiple_extensions': {'key': 'properties.supportsMultipleExtensions', 'type': 'bool'}, + } + + def __init__(self, *, location: str, operating_system: str, compute_role: str, handler_schema: str, tags=None, vm_scale_set_enabled: bool=None, supports_multiple_extensions: bool=None, **kwargs) -> None: + super(VirtualMachineExtensionImage, self).__init__(location=location, tags=tags, **kwargs) + self.operating_system = operating_system + self.compute_role = compute_role + self.handler_schema = handler_schema + self.vm_scale_set_enabled = vm_scale_set_enabled + self.supports_multiple_extensions = supports_multiple_extensions + + +class VirtualMachineExtensionInstanceView(Model): + """The instance view of a virtual machine extension. + + :param name: The virtual machine extension name. + :type name: str + :param type: Specifies the type of the extension; an example is + "CustomScriptExtension". + :type type: str + :param type_handler_version: Specifies the version of the script handler. + :type type_handler_version: str + :param substatuses: The resource status information. + :type substatuses: + list[~azure.mgmt.compute.v2018_04_01.models.InstanceViewStatus] + :param statuses: The resource status information. + :type statuses: + list[~azure.mgmt.compute.v2018_04_01.models.InstanceViewStatus] + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'type_handler_version': {'key': 'typeHandlerVersion', 'type': 'str'}, + 'substatuses': {'key': 'substatuses', 'type': '[InstanceViewStatus]'}, + 'statuses': {'key': 'statuses', 'type': '[InstanceViewStatus]'}, + } + + def __init__(self, *, name: str=None, type: str=None, type_handler_version: str=None, substatuses=None, statuses=None, **kwargs) -> None: + super(VirtualMachineExtensionInstanceView, self).__init__(**kwargs) + self.name = name + self.type = type + self.type_handler_version = type_handler_version + self.substatuses = substatuses + self.statuses = statuses + + +class VirtualMachineExtensionsListResult(Model): + """The List Extension operation response. + + :param value: The list of extensions + :type value: + list[~azure.mgmt.compute.v2018_04_01.models.VirtualMachineExtension] + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[VirtualMachineExtension]'}, + } + + def __init__(self, *, value=None, **kwargs) -> None: + super(VirtualMachineExtensionsListResult, self).__init__(**kwargs) + self.value = value + + +class VirtualMachineExtensionUpdate(UpdateResource): + """Describes a Virtual Machine Extension. + + :param tags: Resource tags + :type tags: dict[str, str] + :param force_update_tag: How the extension handler should be forced to + update even if the extension configuration has not changed. + :type force_update_tag: str + :param publisher: The name of the extension handler publisher. + :type publisher: str + :param type: Specifies the type of the extension; an example is + "CustomScriptExtension". + :type type: str + :param type_handler_version: Specifies the version of the script handler. + :type type_handler_version: str + :param auto_upgrade_minor_version: Indicates whether the extension should + use a newer minor version if one is available at deployment time. Once + deployed, however, the extension will not upgrade minor versions unless + redeployed, even with this property set to true. + :type auto_upgrade_minor_version: bool + :param settings: Json formatted public settings for the extension. + :type settings: object + :param protected_settings: The extension can contain either + protectedSettings or protectedSettingsFromKeyVault or no protected + settings at all. + :type protected_settings: object + """ + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + 'force_update_tag': {'key': 'properties.forceUpdateTag', 'type': 'str'}, + 'publisher': {'key': 'properties.publisher', 'type': 'str'}, + 'type': {'key': 'properties.type', 'type': 'str'}, + 'type_handler_version': {'key': 'properties.typeHandlerVersion', 'type': 'str'}, + 'auto_upgrade_minor_version': {'key': 'properties.autoUpgradeMinorVersion', 'type': 'bool'}, + 'settings': {'key': 'properties.settings', 'type': 'object'}, + 'protected_settings': {'key': 'properties.protectedSettings', 'type': 'object'}, + } + + def __init__(self, *, tags=None, force_update_tag: str=None, publisher: str=None, type: str=None, type_handler_version: str=None, auto_upgrade_minor_version: bool=None, settings=None, protected_settings=None, **kwargs) -> None: + super(VirtualMachineExtensionUpdate, self).__init__(tags=tags, **kwargs) + self.force_update_tag = force_update_tag + self.publisher = publisher + self.type = type + self.type_handler_version = type_handler_version + self.auto_upgrade_minor_version = auto_upgrade_minor_version + self.settings = settings + self.protected_settings = protected_settings + + +class VirtualMachineHealthStatus(Model): + """The health status of the VM. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar status: The health status information for the VM. + :vartype status: ~azure.mgmt.compute.v2018_04_01.models.InstanceViewStatus + """ + + _validation = { + 'status': {'readonly': True}, + } + + _attribute_map = { + 'status': {'key': 'status', 'type': 'InstanceViewStatus'}, + } + + def __init__(self, **kwargs) -> None: + super(VirtualMachineHealthStatus, self).__init__(**kwargs) + self.status = None + + +class VirtualMachineIdentity(Model): + """Identity for the virtual machine. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar principal_id: The principal id of virtual machine identity. This + property will only be provided for a system assigned identity. + :vartype principal_id: str + :ivar tenant_id: The tenant id associated with the virtual machine. This + property will only be provided for a system assigned identity. + :vartype tenant_id: str + :param type: The type of identity used for the virtual machine. The type + 'SystemAssigned, UserAssigned' includes both an implicitly created + identity and a set of user assigned identities. The type 'None' will + remove any identities from the virtual machine. Possible values include: + 'SystemAssigned', 'UserAssigned', 'SystemAssigned, UserAssigned', 'None' + :type type: str or + ~azure.mgmt.compute.v2018_04_01.models.ResourceIdentityType + :param identity_ids: The list of user identities associated with the + Virtual Machine. The user identity references will be ARM resource ids in + the form: + '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/identities/{identityName}'. + :type identity_ids: list[str] + """ + + _validation = { + 'principal_id': {'readonly': True}, + 'tenant_id': {'readonly': True}, + } + + _attribute_map = { + 'principal_id': {'key': 'principalId', 'type': 'str'}, + 'tenant_id': {'key': 'tenantId', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'ResourceIdentityType'}, + 'identity_ids': {'key': 'identityIds', 'type': '[str]'}, + } + + def __init__(self, *, type=None, identity_ids=None, **kwargs) -> None: + super(VirtualMachineIdentity, self).__init__(**kwargs) + self.principal_id = None + self.tenant_id = None + self.type = type + self.identity_ids = identity_ids + + +class VirtualMachineImageResource(SubResource): + """Virtual machine image resource information. + + All required parameters must be populated in order to send to Azure. + + :param id: Resource Id + :type id: str + :param name: Required. The name of the resource. + :type name: str + :param location: Required. The supported Azure location of the resource. + :type location: str + :param tags: Specifies the tags that are assigned to the virtual machine. + For more information about using tags, see [Using tags to organize your + Azure + resources](https://docs.microsoft.com/azure/azure-resource-manager/resource-group-using-tags.md). + :type tags: dict[str, str] + """ + + _validation = { + 'name': {'required': True}, + 'location': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__(self, *, name: str, location: str, id: str=None, tags=None, **kwargs) -> None: + super(VirtualMachineImageResource, self).__init__(id=id, **kwargs) + self.name = name + self.location = location + self.tags = tags + + +class VirtualMachineImage(VirtualMachineImageResource): + """Describes a Virtual Machine Image. + + All required parameters must be populated in order to send to Azure. + + :param id: Resource Id + :type id: str + :param name: Required. The name of the resource. + :type name: str + :param location: Required. The supported Azure location of the resource. + :type location: str + :param tags: Specifies the tags that are assigned to the virtual machine. + For more information about using tags, see [Using tags to organize your + Azure + resources](https://docs.microsoft.com/azure/azure-resource-manager/resource-group-using-tags.md). + :type tags: dict[str, str] + :param plan: + :type plan: ~azure.mgmt.compute.v2018_04_01.models.PurchasePlan + :param os_disk_image: + :type os_disk_image: ~azure.mgmt.compute.v2018_04_01.models.OSDiskImage + :param data_disk_images: + :type data_disk_images: + list[~azure.mgmt.compute.v2018_04_01.models.DataDiskImage] + """ + + _validation = { + 'name': {'required': True}, + 'location': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'plan': {'key': 'properties.plan', 'type': 'PurchasePlan'}, + 'os_disk_image': {'key': 'properties.osDiskImage', 'type': 'OSDiskImage'}, + 'data_disk_images': {'key': 'properties.dataDiskImages', 'type': '[DataDiskImage]'}, + } + + def __init__(self, *, name: str, location: str, id: str=None, tags=None, plan=None, os_disk_image=None, data_disk_images=None, **kwargs) -> None: + super(VirtualMachineImage, self).__init__(id=id, name=name, location=location, tags=tags, **kwargs) + self.plan = plan + self.os_disk_image = os_disk_image + self.data_disk_images = data_disk_images + + +class VirtualMachineInstanceView(Model): + """The instance view of a virtual machine. + + :param platform_update_domain: Specifies the update domain of the virtual + machine. + :type platform_update_domain: int + :param platform_fault_domain: Specifies the fault domain of the virtual + machine. + :type platform_fault_domain: int + :param computer_name: The computer name assigned to the virtual machine. + :type computer_name: str + :param os_name: The Operating System running on the virtual machine. + :type os_name: str + :param os_version: The version of Operating System running on the virtual + machine. + :type os_version: str + :param rdp_thumb_print: The Remote desktop certificate thumbprint. + :type rdp_thumb_print: str + :param vm_agent: The VM Agent running on the virtual machine. + :type vm_agent: + ~azure.mgmt.compute.v2018_04_01.models.VirtualMachineAgentInstanceView + :param maintenance_redeploy_status: The Maintenance Operation status on + the virtual machine. + :type maintenance_redeploy_status: + ~azure.mgmt.compute.v2018_04_01.models.MaintenanceRedeployStatus + :param disks: The virtual machine disk information. + :type disks: list[~azure.mgmt.compute.v2018_04_01.models.DiskInstanceView] + :param extensions: The extensions information. + :type extensions: + list[~azure.mgmt.compute.v2018_04_01.models.VirtualMachineExtensionInstanceView] + :param boot_diagnostics: Boot Diagnostics is a debugging feature which + allows you to view Console Output and Screenshot to diagnose VM status. +

    You can easily view the output of your console log.

    + Azure also enables you to see a screenshot of the VM from the hypervisor. + :type boot_diagnostics: + ~azure.mgmt.compute.v2018_04_01.models.BootDiagnosticsInstanceView + :param statuses: The resource status information. + :type statuses: + list[~azure.mgmt.compute.v2018_04_01.models.InstanceViewStatus] + """ + + _attribute_map = { + 'platform_update_domain': {'key': 'platformUpdateDomain', 'type': 'int'}, + 'platform_fault_domain': {'key': 'platformFaultDomain', 'type': 'int'}, + 'computer_name': {'key': 'computerName', 'type': 'str'}, + 'os_name': {'key': 'osName', 'type': 'str'}, + 'os_version': {'key': 'osVersion', 'type': 'str'}, + 'rdp_thumb_print': {'key': 'rdpThumbPrint', 'type': 'str'}, + 'vm_agent': {'key': 'vmAgent', 'type': 'VirtualMachineAgentInstanceView'}, + 'maintenance_redeploy_status': {'key': 'maintenanceRedeployStatus', 'type': 'MaintenanceRedeployStatus'}, + 'disks': {'key': 'disks', 'type': '[DiskInstanceView]'}, + 'extensions': {'key': 'extensions', 'type': '[VirtualMachineExtensionInstanceView]'}, + 'boot_diagnostics': {'key': 'bootDiagnostics', 'type': 'BootDiagnosticsInstanceView'}, + 'statuses': {'key': 'statuses', 'type': '[InstanceViewStatus]'}, + } + + def __init__(self, *, platform_update_domain: int=None, platform_fault_domain: int=None, computer_name: str=None, os_name: str=None, os_version: str=None, rdp_thumb_print: str=None, vm_agent=None, maintenance_redeploy_status=None, disks=None, extensions=None, boot_diagnostics=None, statuses=None, **kwargs) -> None: + super(VirtualMachineInstanceView, self).__init__(**kwargs) + self.platform_update_domain = platform_update_domain + self.platform_fault_domain = platform_fault_domain + self.computer_name = computer_name + self.os_name = os_name + self.os_version = os_version + self.rdp_thumb_print = rdp_thumb_print + self.vm_agent = vm_agent + self.maintenance_redeploy_status = maintenance_redeploy_status + self.disks = disks + self.extensions = extensions + self.boot_diagnostics = boot_diagnostics + self.statuses = statuses + + +class VirtualMachineScaleSet(Resource): + """Describes a Virtual Machine Scale Set. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource Id + :vartype id: str + :ivar name: Resource name + :vartype name: str + :ivar type: Resource type + :vartype type: str + :param location: Required. Resource location + :type location: str + :param tags: Resource tags + :type tags: dict[str, str] + :param sku: The virtual machine scale set sku. + :type sku: ~azure.mgmt.compute.v2018_04_01.models.Sku + :param plan: Specifies information about the marketplace image used to + create the virtual machine. This element is only used for marketplace + images. Before you can use a marketplace image from an API, you must + enable the image for programmatic use. In the Azure portal, find the + marketplace image that you want to use and then click **Want to deploy + programmatically, Get Started ->**. Enter any required information and + then click **Save**. + :type plan: ~azure.mgmt.compute.v2018_04_01.models.Plan + :param upgrade_policy: The upgrade policy. + :type upgrade_policy: ~azure.mgmt.compute.v2018_04_01.models.UpgradePolicy + :param virtual_machine_profile: The virtual machine profile. + :type virtual_machine_profile: + ~azure.mgmt.compute.v2018_04_01.models.VirtualMachineScaleSetVMProfile + :ivar provisioning_state: The provisioning state, which only appears in + the response. + :vartype provisioning_state: str + :param overprovision: Specifies whether the Virtual Machine Scale Set + should be overprovisioned. + :type overprovision: bool + :ivar unique_id: Specifies the ID which uniquely identifies a Virtual + Machine Scale Set. + :vartype unique_id: str + :param single_placement_group: When true this limits the scale set to a + single placement group, of max size 100 virtual machines. + :type single_placement_group: bool + :param zone_balance: Whether to force strictly even Virtual Machine + distribution cross x-zones in case there is zone outage. + :type zone_balance: bool + :param platform_fault_domain_count: Fault Domain count for each placement + group. + :type platform_fault_domain_count: int + :param proximity_placement_group: Specifies information about the + proximity placement group that the virtual machine scale set should be + assigned to.

    Minimum api-version: 2018-04-01. + :type proximity_placement_group: + ~azure.mgmt.compute.v2018_04_01.models.SubResource + :param identity: The identity of the virtual machine scale set, if + configured. + :type identity: + ~azure.mgmt.compute.v2018_04_01.models.VirtualMachineScaleSetIdentity + :param zones: The virtual machine scale set zones. + :type zones: list[str] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + 'provisioning_state': {'readonly': True}, + 'unique_id': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'sku': {'key': 'sku', 'type': 'Sku'}, + 'plan': {'key': 'plan', 'type': 'Plan'}, + 'upgrade_policy': {'key': 'properties.upgradePolicy', 'type': 'UpgradePolicy'}, + 'virtual_machine_profile': {'key': 'properties.virtualMachineProfile', 'type': 'VirtualMachineScaleSetVMProfile'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'overprovision': {'key': 'properties.overprovision', 'type': 'bool'}, + 'unique_id': {'key': 'properties.uniqueId', 'type': 'str'}, + 'single_placement_group': {'key': 'properties.singlePlacementGroup', 'type': 'bool'}, + 'zone_balance': {'key': 'properties.zoneBalance', 'type': 'bool'}, + 'platform_fault_domain_count': {'key': 'properties.platformFaultDomainCount', 'type': 'int'}, + 'proximity_placement_group': {'key': 'properties.proximityPlacementGroup', 'type': 'SubResource'}, + 'identity': {'key': 'identity', 'type': 'VirtualMachineScaleSetIdentity'}, + 'zones': {'key': 'zones', 'type': '[str]'}, + } + + def __init__(self, *, location: str, tags=None, sku=None, plan=None, upgrade_policy=None, virtual_machine_profile=None, overprovision: bool=None, single_placement_group: bool=None, zone_balance: bool=None, platform_fault_domain_count: int=None, proximity_placement_group=None, identity=None, zones=None, **kwargs) -> None: + super(VirtualMachineScaleSet, self).__init__(location=location, tags=tags, **kwargs) + self.sku = sku + self.plan = plan + self.upgrade_policy = upgrade_policy + self.virtual_machine_profile = virtual_machine_profile + self.provisioning_state = None + self.overprovision = overprovision + self.unique_id = None + self.single_placement_group = single_placement_group + self.zone_balance = zone_balance + self.platform_fault_domain_count = platform_fault_domain_count + self.proximity_placement_group = proximity_placement_group + self.identity = identity + self.zones = zones + + +class VirtualMachineScaleSetDataDisk(Model): + """Describes a virtual machine scale set data disk. + + All required parameters must be populated in order to send to Azure. + + :param name: The disk name. + :type name: str + :param lun: Required. Specifies the logical unit number of the data disk. + This value is used to identify data disks within the VM and therefore must + be unique for each data disk attached to a VM. + :type lun: int + :param caching: Specifies the caching requirements.

    Possible + values are:

    **None**

    **ReadOnly**

    **ReadWrite** +

    Default: **None for Standard storage. ReadOnly for Premium + storage**. Possible values include: 'None', 'ReadOnly', 'ReadWrite' + :type caching: str or ~azure.mgmt.compute.v2018_04_01.models.CachingTypes + :param write_accelerator_enabled: Specifies whether writeAccelerator + should be enabled or disabled on the disk. + :type write_accelerator_enabled: bool + :param create_option: Required. The create option. Possible values + include: 'FromImage', 'Empty', 'Attach' + :type create_option: str or + ~azure.mgmt.compute.v2018_04_01.models.DiskCreateOptionTypes + :param disk_size_gb: Specifies the size of an empty data disk in + gigabytes. This element can be used to overwrite the size of the disk in a + virtual machine image.

    This value cannot be larger than 1023 GB + :type disk_size_gb: int + :param managed_disk: The managed disk parameters. + :type managed_disk: + ~azure.mgmt.compute.v2018_04_01.models.VirtualMachineScaleSetManagedDiskParameters + """ + + _validation = { + 'lun': {'required': True}, + 'create_option': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'lun': {'key': 'lun', 'type': 'int'}, + 'caching': {'key': 'caching', 'type': 'CachingTypes'}, + 'write_accelerator_enabled': {'key': 'writeAcceleratorEnabled', 'type': 'bool'}, + 'create_option': {'key': 'createOption', 'type': 'str'}, + 'disk_size_gb': {'key': 'diskSizeGB', 'type': 'int'}, + 'managed_disk': {'key': 'managedDisk', 'type': 'VirtualMachineScaleSetManagedDiskParameters'}, + } + + def __init__(self, *, lun: int, create_option, name: str=None, caching=None, write_accelerator_enabled: bool=None, disk_size_gb: int=None, managed_disk=None, **kwargs) -> None: + super(VirtualMachineScaleSetDataDisk, self).__init__(**kwargs) + self.name = name + self.lun = lun + self.caching = caching + self.write_accelerator_enabled = write_accelerator_enabled + self.create_option = create_option + self.disk_size_gb = disk_size_gb + self.managed_disk = managed_disk + + +class VirtualMachineScaleSetExtension(SubResourceReadOnly): + """Describes a Virtual Machine Scale Set Extension. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource Id + :vartype id: str + :param name: The name of the extension. + :type name: str + :param force_update_tag: If a value is provided and is different from the + previous value, the extension handler will be forced to update even if the + extension configuration has not changed. + :type force_update_tag: str + :param publisher: The name of the extension handler publisher. + :type publisher: str + :param type: Specifies the type of the extension; an example is + "CustomScriptExtension". + :type type: str + :param type_handler_version: Specifies the version of the script handler. + :type type_handler_version: str + :param auto_upgrade_minor_version: Indicates whether the extension should + use a newer minor version if one is available at deployment time. Once + deployed, however, the extension will not upgrade minor versions unless + redeployed, even with this property set to true. + :type auto_upgrade_minor_version: bool + :param settings: Json formatted public settings for the extension. + :type settings: object + :param protected_settings: The extension can contain either + protectedSettings or protectedSettingsFromKeyVault or no protected + settings at all. + :type protected_settings: object + :ivar provisioning_state: The provisioning state, which only appears in + the response. + :vartype provisioning_state: str + """ + + _validation = { + 'id': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'force_update_tag': {'key': 'properties.forceUpdateTag', 'type': 'str'}, + 'publisher': {'key': 'properties.publisher', 'type': 'str'}, + 'type': {'key': 'properties.type', 'type': 'str'}, + 'type_handler_version': {'key': 'properties.typeHandlerVersion', 'type': 'str'}, + 'auto_upgrade_minor_version': {'key': 'properties.autoUpgradeMinorVersion', 'type': 'bool'}, + 'settings': {'key': 'properties.settings', 'type': 'object'}, + 'protected_settings': {'key': 'properties.protectedSettings', 'type': 'object'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + } + + def __init__(self, *, name: str=None, force_update_tag: str=None, publisher: str=None, type: str=None, type_handler_version: str=None, auto_upgrade_minor_version: bool=None, settings=None, protected_settings=None, **kwargs) -> None: + super(VirtualMachineScaleSetExtension, self).__init__(**kwargs) + self.name = name + self.force_update_tag = force_update_tag + self.publisher = publisher + self.type = type + self.type_handler_version = type_handler_version + self.auto_upgrade_minor_version = auto_upgrade_minor_version + self.settings = settings + self.protected_settings = protected_settings + self.provisioning_state = None + + +class VirtualMachineScaleSetExtensionProfile(Model): + """Describes a virtual machine scale set extension profile. + + :param extensions: The virtual machine scale set child extension + resources. + :type extensions: + list[~azure.mgmt.compute.v2018_04_01.models.VirtualMachineScaleSetExtension] + """ + + _attribute_map = { + 'extensions': {'key': 'extensions', 'type': '[VirtualMachineScaleSetExtension]'}, + } + + def __init__(self, *, extensions=None, **kwargs) -> None: + super(VirtualMachineScaleSetExtensionProfile, self).__init__(**kwargs) + self.extensions = extensions + + +class VirtualMachineScaleSetIdentity(Model): + """Identity for the virtual machine scale set. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar principal_id: The principal id of virtual machine scale set + identity. This property will only be provided for a system assigned + identity. + :vartype principal_id: str + :ivar tenant_id: The tenant id associated with the virtual machine scale + set. This property will only be provided for a system assigned identity. + :vartype tenant_id: str + :param type: The type of identity used for the virtual machine scale set. + The type 'SystemAssigned, UserAssigned' includes both an implicitly + created identity and a set of user assigned identities. The type 'None' + will remove any identities from the virtual machine scale set. Possible + values include: 'SystemAssigned', 'UserAssigned', 'SystemAssigned, + UserAssigned', 'None' + :type type: str or + ~azure.mgmt.compute.v2018_04_01.models.ResourceIdentityType + :param identity_ids: The list of user identities associated with the + virtual machine scale set. The user identity references will be ARM + resource ids in the form: + '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/identities/{identityName}'. + :type identity_ids: list[str] + """ + + _validation = { + 'principal_id': {'readonly': True}, + 'tenant_id': {'readonly': True}, + } + + _attribute_map = { + 'principal_id': {'key': 'principalId', 'type': 'str'}, + 'tenant_id': {'key': 'tenantId', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'ResourceIdentityType'}, + 'identity_ids': {'key': 'identityIds', 'type': '[str]'}, + } + + def __init__(self, *, type=None, identity_ids=None, **kwargs) -> None: + super(VirtualMachineScaleSetIdentity, self).__init__(**kwargs) + self.principal_id = None + self.tenant_id = None + self.type = type + self.identity_ids = identity_ids + + +class VirtualMachineScaleSetInstanceView(Model): + """The instance view of a virtual machine scale set. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar virtual_machine: The instance view status summary for the virtual + machine scale set. + :vartype virtual_machine: + ~azure.mgmt.compute.v2018_04_01.models.VirtualMachineScaleSetInstanceViewStatusesSummary + :ivar extensions: The extensions information. + :vartype extensions: + list[~azure.mgmt.compute.v2018_04_01.models.VirtualMachineScaleSetVMExtensionsSummary] + :param statuses: The resource status information. + :type statuses: + list[~azure.mgmt.compute.v2018_04_01.models.InstanceViewStatus] + """ + + _validation = { + 'virtual_machine': {'readonly': True}, + 'extensions': {'readonly': True}, + } + + _attribute_map = { + 'virtual_machine': {'key': 'virtualMachine', 'type': 'VirtualMachineScaleSetInstanceViewStatusesSummary'}, + 'extensions': {'key': 'extensions', 'type': '[VirtualMachineScaleSetVMExtensionsSummary]'}, + 'statuses': {'key': 'statuses', 'type': '[InstanceViewStatus]'}, + } + + def __init__(self, *, statuses=None, **kwargs) -> None: + super(VirtualMachineScaleSetInstanceView, self).__init__(**kwargs) + self.virtual_machine = None + self.extensions = None + self.statuses = statuses + + +class VirtualMachineScaleSetInstanceViewStatusesSummary(Model): + """Instance view statuses summary for virtual machines of a virtual machine + scale set. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar statuses_summary: The extensions information. + :vartype statuses_summary: + list[~azure.mgmt.compute.v2018_04_01.models.VirtualMachineStatusCodeCount] + """ + + _validation = { + 'statuses_summary': {'readonly': True}, + } + + _attribute_map = { + 'statuses_summary': {'key': 'statusesSummary', 'type': '[VirtualMachineStatusCodeCount]'}, + } + + def __init__(self, **kwargs) -> None: + super(VirtualMachineScaleSetInstanceViewStatusesSummary, self).__init__(**kwargs) + self.statuses_summary = None + + +class VirtualMachineScaleSetIPConfiguration(SubResource): + """Describes a virtual machine scale set network profile's IP configuration. + + All required parameters must be populated in order to send to Azure. + + :param id: Resource Id + :type id: str + :param name: Required. The IP configuration name. + :type name: str + :param subnet: Specifies the identifier of the subnet. + :type subnet: ~azure.mgmt.compute.v2018_04_01.models.ApiEntityReference + :param primary: Specifies the primary network interface in case the + virtual machine has more than 1 network interface. + :type primary: bool + :param public_ip_address_configuration: The publicIPAddressConfiguration. + :type public_ip_address_configuration: + ~azure.mgmt.compute.v2018_04_01.models.VirtualMachineScaleSetPublicIPAddressConfiguration + :param private_ip_address_version: Available from Api-Version 2017-03-30 + onwards, it represents whether the specific ipconfiguration is IPv4 or + IPv6. Default is taken as IPv4. Possible values are: 'IPv4' and 'IPv6'. + Possible values include: 'IPv4', 'IPv6' + :type private_ip_address_version: str or + ~azure.mgmt.compute.v2018_04_01.models.IPVersion + :param application_gateway_backend_address_pools: Specifies an array of + references to backend address pools of application gateways. A scale set + can reference backend address pools of multiple application gateways. + Multiple scale sets cannot use the same application gateway. + :type application_gateway_backend_address_pools: + list[~azure.mgmt.compute.v2018_04_01.models.SubResource] + :param load_balancer_backend_address_pools: Specifies an array of + references to backend address pools of load balancers. A scale set can + reference backend address pools of one public and one internal load + balancer. Multiple scale sets cannot use the same load balancer. + :type load_balancer_backend_address_pools: + list[~azure.mgmt.compute.v2018_04_01.models.SubResource] + :param load_balancer_inbound_nat_pools: Specifies an array of references + to inbound Nat pools of the load balancers. A scale set can reference + inbound nat pools of one public and one internal load balancer. Multiple + scale sets cannot use the same load balancer + :type load_balancer_inbound_nat_pools: + list[~azure.mgmt.compute.v2018_04_01.models.SubResource] + """ + + _validation = { + 'name': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'subnet': {'key': 'properties.subnet', 'type': 'ApiEntityReference'}, + 'primary': {'key': 'properties.primary', 'type': 'bool'}, + 'public_ip_address_configuration': {'key': 'properties.publicIPAddressConfiguration', 'type': 'VirtualMachineScaleSetPublicIPAddressConfiguration'}, + 'private_ip_address_version': {'key': 'properties.privateIPAddressVersion', 'type': 'str'}, + 'application_gateway_backend_address_pools': {'key': 'properties.applicationGatewayBackendAddressPools', 'type': '[SubResource]'}, + 'load_balancer_backend_address_pools': {'key': 'properties.loadBalancerBackendAddressPools', 'type': '[SubResource]'}, + 'load_balancer_inbound_nat_pools': {'key': 'properties.loadBalancerInboundNatPools', 'type': '[SubResource]'}, + } + + def __init__(self, *, name: str, id: str=None, subnet=None, primary: bool=None, public_ip_address_configuration=None, private_ip_address_version=None, application_gateway_backend_address_pools=None, load_balancer_backend_address_pools=None, load_balancer_inbound_nat_pools=None, **kwargs) -> None: + super(VirtualMachineScaleSetIPConfiguration, self).__init__(id=id, **kwargs) + self.name = name + self.subnet = subnet + self.primary = primary + self.public_ip_address_configuration = public_ip_address_configuration + self.private_ip_address_version = private_ip_address_version + self.application_gateway_backend_address_pools = application_gateway_backend_address_pools + self.load_balancer_backend_address_pools = load_balancer_backend_address_pools + self.load_balancer_inbound_nat_pools = load_balancer_inbound_nat_pools + + +class VirtualMachineScaleSetIpTag(Model): + """Contains the IP tag associated with the public IP address. + + :param ip_tag_type: IP tag type. Example: FirstPartyUsage. + :type ip_tag_type: str + :param tag: IP tag associated with the public IP. Example: SQL, Storage + etc. + :type tag: str + """ + + _attribute_map = { + 'ip_tag_type': {'key': 'ipTagType', 'type': 'str'}, + 'tag': {'key': 'tag', 'type': 'str'}, + } + + def __init__(self, *, ip_tag_type: str=None, tag: str=None, **kwargs) -> None: + super(VirtualMachineScaleSetIpTag, self).__init__(**kwargs) + self.ip_tag_type = ip_tag_type + self.tag = tag + + +class VirtualMachineScaleSetManagedDiskParameters(Model): + """Describes the parameters of a ScaleSet managed disk. + + :param storage_account_type: Specifies the storage account type for the + managed disk. Possible values are: Standard_LRS, Premium_LRS, and + StandardSSD_LRS. Possible values include: 'Standard_LRS', 'Premium_LRS', + 'StandardSSD_LRS' + :type storage_account_type: str or + ~azure.mgmt.compute.v2018_04_01.models.StorageAccountTypes + """ + + _attribute_map = { + 'storage_account_type': {'key': 'storageAccountType', 'type': 'str'}, + } + + def __init__(self, *, storage_account_type=None, **kwargs) -> None: + super(VirtualMachineScaleSetManagedDiskParameters, self).__init__(**kwargs) + self.storage_account_type = storage_account_type + + +class VirtualMachineScaleSetNetworkConfiguration(SubResource): + """Describes a virtual machine scale set network profile's network + configurations. + + All required parameters must be populated in order to send to Azure. + + :param id: Resource Id + :type id: str + :param name: Required. The network configuration name. + :type name: str + :param primary: Specifies the primary network interface in case the + virtual machine has more than 1 network interface. + :type primary: bool + :param enable_accelerated_networking: Specifies whether the network + interface is accelerated networking-enabled. + :type enable_accelerated_networking: bool + :param network_security_group: The network security group. + :type network_security_group: + ~azure.mgmt.compute.v2018_04_01.models.SubResource + :param dns_settings: The dns settings to be applied on the network + interfaces. + :type dns_settings: + ~azure.mgmt.compute.v2018_04_01.models.VirtualMachineScaleSetNetworkConfigurationDnsSettings + :param ip_configurations: Required. Specifies the IP configurations of the + network interface. + :type ip_configurations: + list[~azure.mgmt.compute.v2018_04_01.models.VirtualMachineScaleSetIPConfiguration] + :param enable_ip_forwarding: Whether IP forwarding enabled on this NIC. + :type enable_ip_forwarding: bool + """ + + _validation = { + 'name': {'required': True}, + 'ip_configurations': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'primary': {'key': 'properties.primary', 'type': 'bool'}, + 'enable_accelerated_networking': {'key': 'properties.enableAcceleratedNetworking', 'type': 'bool'}, + 'network_security_group': {'key': 'properties.networkSecurityGroup', 'type': 'SubResource'}, + 'dns_settings': {'key': 'properties.dnsSettings', 'type': 'VirtualMachineScaleSetNetworkConfigurationDnsSettings'}, + 'ip_configurations': {'key': 'properties.ipConfigurations', 'type': '[VirtualMachineScaleSetIPConfiguration]'}, + 'enable_ip_forwarding': {'key': 'properties.enableIPForwarding', 'type': 'bool'}, + } + + def __init__(self, *, name: str, ip_configurations, id: str=None, primary: bool=None, enable_accelerated_networking: bool=None, network_security_group=None, dns_settings=None, enable_ip_forwarding: bool=None, **kwargs) -> None: + super(VirtualMachineScaleSetNetworkConfiguration, self).__init__(id=id, **kwargs) + self.name = name + self.primary = primary + self.enable_accelerated_networking = enable_accelerated_networking + self.network_security_group = network_security_group + self.dns_settings = dns_settings + self.ip_configurations = ip_configurations + self.enable_ip_forwarding = enable_ip_forwarding + + +class VirtualMachineScaleSetNetworkConfigurationDnsSettings(Model): + """Describes a virtual machines scale sets network configuration's DNS + settings. + + :param dns_servers: List of DNS servers IP addresses + :type dns_servers: list[str] + """ + + _attribute_map = { + 'dns_servers': {'key': 'dnsServers', 'type': '[str]'}, + } + + def __init__(self, *, dns_servers=None, **kwargs) -> None: + super(VirtualMachineScaleSetNetworkConfigurationDnsSettings, self).__init__(**kwargs) + self.dns_servers = dns_servers + + +class VirtualMachineScaleSetNetworkProfile(Model): + """Describes a virtual machine scale set network profile. + + :param health_probe: A reference to a load balancer probe used to + determine the health of an instance in the virtual machine scale set. The + reference will be in the form: + '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/probes/{probeName}'. + :type health_probe: + ~azure.mgmt.compute.v2018_04_01.models.ApiEntityReference + :param network_interface_configurations: The list of network + configurations. + :type network_interface_configurations: + list[~azure.mgmt.compute.v2018_04_01.models.VirtualMachineScaleSetNetworkConfiguration] + """ + + _attribute_map = { + 'health_probe': {'key': 'healthProbe', 'type': 'ApiEntityReference'}, + 'network_interface_configurations': {'key': 'networkInterfaceConfigurations', 'type': '[VirtualMachineScaleSetNetworkConfiguration]'}, + } + + def __init__(self, *, health_probe=None, network_interface_configurations=None, **kwargs) -> None: + super(VirtualMachineScaleSetNetworkProfile, self).__init__(**kwargs) + self.health_probe = health_probe + self.network_interface_configurations = network_interface_configurations + + +class VirtualMachineScaleSetOSDisk(Model): + """Describes a virtual machine scale set operating system disk. + + All required parameters must be populated in order to send to Azure. + + :param name: The disk name. + :type name: str + :param caching: Specifies the caching requirements.

    Possible + values are:

    **None**

    **ReadOnly**

    **ReadWrite** +

    Default: **None for Standard storage. ReadOnly for Premium + storage**. Possible values include: 'None', 'ReadOnly', 'ReadWrite' + :type caching: str or ~azure.mgmt.compute.v2018_04_01.models.CachingTypes + :param write_accelerator_enabled: Specifies whether writeAccelerator + should be enabled or disabled on the disk. + :type write_accelerator_enabled: bool + :param create_option: Required. Specifies how the virtual machines in the + scale set should be created.

    The only allowed value is: + **FromImage** \\u2013 This value is used when you are using an image to + create the virtual machine. If you are using a platform image, you also + use the imageReference element described above. If you are using a + marketplace image, you also use the plan element previously described. + Possible values include: 'FromImage', 'Empty', 'Attach' + :type create_option: str or + ~azure.mgmt.compute.v2018_04_01.models.DiskCreateOptionTypes + :param disk_size_gb: Specifies the size of the operating system disk in + gigabytes. This element can be used to overwrite the size of the disk in a + virtual machine image.

    This value cannot be larger than 1023 GB + :type disk_size_gb: int + :param os_type: This property allows you to specify the type of the OS + that is included in the disk if creating a VM from user-image or a + specialized VHD.

    Possible values are:

    **Windows** +

    **Linux**. Possible values include: 'Windows', 'Linux' + :type os_type: str or + ~azure.mgmt.compute.v2018_04_01.models.OperatingSystemTypes + :param image: Specifies information about the unmanaged user image to base + the scale set on. + :type image: ~azure.mgmt.compute.v2018_04_01.models.VirtualHardDisk + :param vhd_containers: Specifies the container urls that are used to store + operating system disks for the scale set. + :type vhd_containers: list[str] + :param managed_disk: The managed disk parameters. + :type managed_disk: + ~azure.mgmt.compute.v2018_04_01.models.VirtualMachineScaleSetManagedDiskParameters + """ + + _validation = { + 'create_option': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'caching': {'key': 'caching', 'type': 'CachingTypes'}, + 'write_accelerator_enabled': {'key': 'writeAcceleratorEnabled', 'type': 'bool'}, + 'create_option': {'key': 'createOption', 'type': 'str'}, + 'disk_size_gb': {'key': 'diskSizeGB', 'type': 'int'}, + 'os_type': {'key': 'osType', 'type': 'OperatingSystemTypes'}, + 'image': {'key': 'image', 'type': 'VirtualHardDisk'}, + 'vhd_containers': {'key': 'vhdContainers', 'type': '[str]'}, + 'managed_disk': {'key': 'managedDisk', 'type': 'VirtualMachineScaleSetManagedDiskParameters'}, + } + + def __init__(self, *, create_option, name: str=None, caching=None, write_accelerator_enabled: bool=None, disk_size_gb: int=None, os_type=None, image=None, vhd_containers=None, managed_disk=None, **kwargs) -> None: + super(VirtualMachineScaleSetOSDisk, self).__init__(**kwargs) + self.name = name + self.caching = caching + self.write_accelerator_enabled = write_accelerator_enabled + self.create_option = create_option + self.disk_size_gb = disk_size_gb + self.os_type = os_type + self.image = image + self.vhd_containers = vhd_containers + self.managed_disk = managed_disk + + +class VirtualMachineScaleSetOSProfile(Model): + """Describes a virtual machine scale set OS profile. + + :param computer_name_prefix: Specifies the computer name prefix for all of + the virtual machines in the scale set. Computer name prefixes must be 1 to + 15 characters long. + :type computer_name_prefix: str + :param admin_username: Specifies the name of the administrator account. +

    **Windows-only restriction:** Cannot end in "."

    + **Disallowed values:** "administrator", "admin", "user", "user1", "test", + "user2", "test1", "user3", "admin1", "1", "123", "a", "actuser", "adm", + "admin2", "aspnet", "backup", "console", "david", "guest", "john", + "owner", "root", "server", "sql", "support", "support_388945a0", "sys", + "test2", "test3", "user4", "user5".

    **Minimum-length (Linux):** 1 + character

    **Max-length (Linux):** 64 characters

    + **Max-length (Windows):** 20 characters

  • For root access to + the Linux VM, see [Using root privileges on Linux virtual machines in + Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-use-root-privileges?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json)
  • + For a list of built-in system users on Linux that should not be used in + this field, see [Selecting User Names for Linux on + Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-usernames?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json) + :type admin_username: str + :param admin_password: Specifies the password of the administrator + account.

    **Minimum-length (Windows):** 8 characters

    + **Minimum-length (Linux):** 6 characters

    **Max-length + (Windows):** 123 characters

    **Max-length (Linux):** 72 characters +

    **Complexity requirements:** 3 out of 4 conditions below need to + be fulfilled
    Has lower characters
    Has upper characters
    Has a + digit
    Has a special character (Regex match [\\W_])

    + **Disallowed values:** "abc@123", "P@$$w0rd", "P@ssw0rd", "P@ssword123", + "Pa$$word", "pass@word1", "Password!", "Password1", "Password22", + "iloveyou!"

    For resetting the password, see [How to reset the + Remote Desktop service or its login password in a Windows + VM](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-reset-rdp?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json) +

    For resetting root password, see [Manage users, SSH, and check or + repair disks on Azure Linux VMs using the VMAccess + Extension](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-using-vmaccess-extension?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json#reset-root-password) + :type admin_password: str + :param custom_data: Specifies a base-64 encoded string of custom data. The + base-64 encoded string is decoded to a binary array that is saved as a + file on the Virtual Machine. The maximum length of the binary array is + 65535 bytes.

    For using cloud-init for your VM, see [Using + cloud-init to customize a Linux VM during + creation](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-using-cloud-init?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json) + :type custom_data: str + :param windows_configuration: Specifies Windows operating system settings + on the virtual machine. + :type windows_configuration: + ~azure.mgmt.compute.v2018_04_01.models.WindowsConfiguration + :param linux_configuration: Specifies the Linux operating system settings + on the virtual machine.

    For a list of supported Linux + distributions, see [Linux on Azure-Endorsed + Distributions](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-endorsed-distros?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json) +

    For running non-endorsed distributions, see [Information for + Non-Endorsed + Distributions](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-create-upload-generic?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json). + :type linux_configuration: + ~azure.mgmt.compute.v2018_04_01.models.LinuxConfiguration + :param secrets: Specifies set of certificates that should be installed + onto the virtual machines in the scale set. + :type secrets: + list[~azure.mgmt.compute.v2018_04_01.models.VaultSecretGroup] + """ + + _attribute_map = { + 'computer_name_prefix': {'key': 'computerNamePrefix', 'type': 'str'}, + 'admin_username': {'key': 'adminUsername', 'type': 'str'}, + 'admin_password': {'key': 'adminPassword', 'type': 'str'}, + 'custom_data': {'key': 'customData', 'type': 'str'}, + 'windows_configuration': {'key': 'windowsConfiguration', 'type': 'WindowsConfiguration'}, + 'linux_configuration': {'key': 'linuxConfiguration', 'type': 'LinuxConfiguration'}, + 'secrets': {'key': 'secrets', 'type': '[VaultSecretGroup]'}, + } + + def __init__(self, *, computer_name_prefix: str=None, admin_username: str=None, admin_password: str=None, custom_data: str=None, windows_configuration=None, linux_configuration=None, secrets=None, **kwargs) -> None: + super(VirtualMachineScaleSetOSProfile, self).__init__(**kwargs) + self.computer_name_prefix = computer_name_prefix + self.admin_username = admin_username + self.admin_password = admin_password + self.custom_data = custom_data + self.windows_configuration = windows_configuration + self.linux_configuration = linux_configuration + self.secrets = secrets + + +class VirtualMachineScaleSetPublicIPAddressConfiguration(Model): + """Describes a virtual machines scale set IP Configuration's PublicIPAddress + configuration. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. The publicIP address configuration name. + :type name: str + :param idle_timeout_in_minutes: The idle timeout of the public IP address. + :type idle_timeout_in_minutes: int + :param dns_settings: The dns settings to be applied on the publicIP + addresses . + :type dns_settings: + ~azure.mgmt.compute.v2018_04_01.models.VirtualMachineScaleSetPublicIPAddressConfigurationDnsSettings + :param ip_tags: The list of IP tags associated with the public IP address. + :type ip_tags: + list[~azure.mgmt.compute.v2018_04_01.models.VirtualMachineScaleSetIpTag] + """ + + _validation = { + 'name': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'idle_timeout_in_minutes': {'key': 'properties.idleTimeoutInMinutes', 'type': 'int'}, + 'dns_settings': {'key': 'properties.dnsSettings', 'type': 'VirtualMachineScaleSetPublicIPAddressConfigurationDnsSettings'}, + 'ip_tags': {'key': 'properties.ipTags', 'type': '[VirtualMachineScaleSetIpTag]'}, + } + + def __init__(self, *, name: str, idle_timeout_in_minutes: int=None, dns_settings=None, ip_tags=None, **kwargs) -> None: + super(VirtualMachineScaleSetPublicIPAddressConfiguration, self).__init__(**kwargs) + self.name = name + self.idle_timeout_in_minutes = idle_timeout_in_minutes + self.dns_settings = dns_settings + self.ip_tags = ip_tags + + +class VirtualMachineScaleSetPublicIPAddressConfigurationDnsSettings(Model): + """Describes a virtual machines scale sets network configuration's DNS + settings. + + All required parameters must be populated in order to send to Azure. + + :param domain_name_label: Required. The Domain name label.The + concatenation of the domain name label and vm index will be the domain + name labels of the PublicIPAddress resources that will be created + :type domain_name_label: str + """ + + _validation = { + 'domain_name_label': {'required': True}, + } + + _attribute_map = { + 'domain_name_label': {'key': 'domainNameLabel', 'type': 'str'}, + } + + def __init__(self, *, domain_name_label: str, **kwargs) -> None: + super(VirtualMachineScaleSetPublicIPAddressConfigurationDnsSettings, self).__init__(**kwargs) + self.domain_name_label = domain_name_label + + +class VirtualMachineScaleSetSku(Model): + """Describes an available virtual machine scale set sku. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar resource_type: The type of resource the sku applies to. + :vartype resource_type: str + :ivar sku: The Sku. + :vartype sku: ~azure.mgmt.compute.v2018_04_01.models.Sku + :ivar capacity: Specifies the number of virtual machines in the scale set. + :vartype capacity: + ~azure.mgmt.compute.v2018_04_01.models.VirtualMachineScaleSetSkuCapacity + """ + + _validation = { + 'resource_type': {'readonly': True}, + 'sku': {'readonly': True}, + 'capacity': {'readonly': True}, + } + + _attribute_map = { + 'resource_type': {'key': 'resourceType', 'type': 'str'}, + 'sku': {'key': 'sku', 'type': 'Sku'}, + 'capacity': {'key': 'capacity', 'type': 'VirtualMachineScaleSetSkuCapacity'}, + } + + def __init__(self, **kwargs) -> None: + super(VirtualMachineScaleSetSku, self).__init__(**kwargs) + self.resource_type = None + self.sku = None + self.capacity = None + + +class VirtualMachineScaleSetSkuCapacity(Model): + """Describes scaling information of a sku. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar minimum: The minimum capacity. + :vartype minimum: long + :ivar maximum: The maximum capacity that can be set. + :vartype maximum: long + :ivar default_capacity: The default capacity. + :vartype default_capacity: long + :ivar scale_type: The scale type applicable to the sku. Possible values + include: 'Automatic', 'None' + :vartype scale_type: str or + ~azure.mgmt.compute.v2018_04_01.models.VirtualMachineScaleSetSkuScaleType + """ + + _validation = { + 'minimum': {'readonly': True}, + 'maximum': {'readonly': True}, + 'default_capacity': {'readonly': True}, + 'scale_type': {'readonly': True}, + } + + _attribute_map = { + 'minimum': {'key': 'minimum', 'type': 'long'}, + 'maximum': {'key': 'maximum', 'type': 'long'}, + 'default_capacity': {'key': 'defaultCapacity', 'type': 'long'}, + 'scale_type': {'key': 'scaleType', 'type': 'VirtualMachineScaleSetSkuScaleType'}, + } + + def __init__(self, **kwargs) -> None: + super(VirtualMachineScaleSetSkuCapacity, self).__init__(**kwargs) + self.minimum = None + self.maximum = None + self.default_capacity = None + self.scale_type = None + + +class VirtualMachineScaleSetStorageProfile(Model): + """Describes a virtual machine scale set storage profile. + + :param image_reference: Specifies information about the image to use. You + can specify information about platform images, marketplace images, or + virtual machine images. This element is required when you want to use a + platform image, marketplace image, or virtual machine image, but is not + used in other creation operations. + :type image_reference: + ~azure.mgmt.compute.v2018_04_01.models.ImageReference + :param os_disk: Specifies information about the operating system disk used + by the virtual machines in the scale set.

    For more information + about disks, see [About disks and VHDs for Azure virtual + machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-about-disks-vhds?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). + :type os_disk: + ~azure.mgmt.compute.v2018_04_01.models.VirtualMachineScaleSetOSDisk + :param data_disks: Specifies the parameters that are used to add data + disks to the virtual machines in the scale set.

    For more + information about disks, see [About disks and VHDs for Azure virtual + machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-about-disks-vhds?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). + :type data_disks: + list[~azure.mgmt.compute.v2018_04_01.models.VirtualMachineScaleSetDataDisk] + """ + + _attribute_map = { + 'image_reference': {'key': 'imageReference', 'type': 'ImageReference'}, + 'os_disk': {'key': 'osDisk', 'type': 'VirtualMachineScaleSetOSDisk'}, + 'data_disks': {'key': 'dataDisks', 'type': '[VirtualMachineScaleSetDataDisk]'}, + } + + def __init__(self, *, image_reference=None, os_disk=None, data_disks=None, **kwargs) -> None: + super(VirtualMachineScaleSetStorageProfile, self).__init__(**kwargs) + self.image_reference = image_reference + self.os_disk = os_disk + self.data_disks = data_disks + + +class VirtualMachineScaleSetUpdate(UpdateResource): + """Describes a Virtual Machine Scale Set. + + :param tags: Resource tags + :type tags: dict[str, str] + :param sku: The virtual machine scale set sku. + :type sku: ~azure.mgmt.compute.v2018_04_01.models.Sku + :param plan: The purchase plan when deploying a virtual machine scale set + from VM Marketplace images. + :type plan: ~azure.mgmt.compute.v2018_04_01.models.Plan + :param upgrade_policy: The upgrade policy. + :type upgrade_policy: ~azure.mgmt.compute.v2018_04_01.models.UpgradePolicy + :param virtual_machine_profile: The virtual machine profile. + :type virtual_machine_profile: + ~azure.mgmt.compute.v2018_04_01.models.VirtualMachineScaleSetUpdateVMProfile + :param overprovision: Specifies whether the Virtual Machine Scale Set + should be overprovisioned. + :type overprovision: bool + :param single_placement_group: When true this limits the scale set to a + single placement group, of max size 100 virtual machines. + :type single_placement_group: bool + :param identity: The identity of the virtual machine scale set, if + configured. + :type identity: + ~azure.mgmt.compute.v2018_04_01.models.VirtualMachineScaleSetIdentity + """ + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + 'sku': {'key': 'sku', 'type': 'Sku'}, + 'plan': {'key': 'plan', 'type': 'Plan'}, + 'upgrade_policy': {'key': 'properties.upgradePolicy', 'type': 'UpgradePolicy'}, + 'virtual_machine_profile': {'key': 'properties.virtualMachineProfile', 'type': 'VirtualMachineScaleSetUpdateVMProfile'}, + 'overprovision': {'key': 'properties.overprovision', 'type': 'bool'}, + 'single_placement_group': {'key': 'properties.singlePlacementGroup', 'type': 'bool'}, + 'identity': {'key': 'identity', 'type': 'VirtualMachineScaleSetIdentity'}, + } + + def __init__(self, *, tags=None, sku=None, plan=None, upgrade_policy=None, virtual_machine_profile=None, overprovision: bool=None, single_placement_group: bool=None, identity=None, **kwargs) -> None: + super(VirtualMachineScaleSetUpdate, self).__init__(tags=tags, **kwargs) + self.sku = sku + self.plan = plan + self.upgrade_policy = upgrade_policy + self.virtual_machine_profile = virtual_machine_profile + self.overprovision = overprovision + self.single_placement_group = single_placement_group + self.identity = identity + + +class VirtualMachineScaleSetUpdateIPConfiguration(SubResource): + """Describes a virtual machine scale set network profile's IP configuration. + + :param id: Resource Id + :type id: str + :param name: The IP configuration name. + :type name: str + :param subnet: The subnet. + :type subnet: ~azure.mgmt.compute.v2018_04_01.models.ApiEntityReference + :param primary: Specifies the primary IP Configuration in case the network + interface has more than one IP Configuration. + :type primary: bool + :param public_ip_address_configuration: The publicIPAddressConfiguration. + :type public_ip_address_configuration: + ~azure.mgmt.compute.v2018_04_01.models.VirtualMachineScaleSetUpdatePublicIPAddressConfiguration + :param private_ip_address_version: Available from Api-Version 2017-03-30 + onwards, it represents whether the specific ipconfiguration is IPv4 or + IPv6. Default is taken as IPv4. Possible values are: 'IPv4' and 'IPv6'. + Possible values include: 'IPv4', 'IPv6' + :type private_ip_address_version: str or + ~azure.mgmt.compute.v2018_04_01.models.IPVersion + :param application_gateway_backend_address_pools: The application gateway + backend address pools. + :type application_gateway_backend_address_pools: + list[~azure.mgmt.compute.v2018_04_01.models.SubResource] + :param load_balancer_backend_address_pools: The load balancer backend + address pools. + :type load_balancer_backend_address_pools: + list[~azure.mgmt.compute.v2018_04_01.models.SubResource] + :param load_balancer_inbound_nat_pools: The load balancer inbound nat + pools. + :type load_balancer_inbound_nat_pools: + list[~azure.mgmt.compute.v2018_04_01.models.SubResource] + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'subnet': {'key': 'properties.subnet', 'type': 'ApiEntityReference'}, + 'primary': {'key': 'properties.primary', 'type': 'bool'}, + 'public_ip_address_configuration': {'key': 'properties.publicIPAddressConfiguration', 'type': 'VirtualMachineScaleSetUpdatePublicIPAddressConfiguration'}, + 'private_ip_address_version': {'key': 'properties.privateIPAddressVersion', 'type': 'str'}, + 'application_gateway_backend_address_pools': {'key': 'properties.applicationGatewayBackendAddressPools', 'type': '[SubResource]'}, + 'load_balancer_backend_address_pools': {'key': 'properties.loadBalancerBackendAddressPools', 'type': '[SubResource]'}, + 'load_balancer_inbound_nat_pools': {'key': 'properties.loadBalancerInboundNatPools', 'type': '[SubResource]'}, + } + + def __init__(self, *, id: str=None, name: str=None, subnet=None, primary: bool=None, public_ip_address_configuration=None, private_ip_address_version=None, application_gateway_backend_address_pools=None, load_balancer_backend_address_pools=None, load_balancer_inbound_nat_pools=None, **kwargs) -> None: + super(VirtualMachineScaleSetUpdateIPConfiguration, self).__init__(id=id, **kwargs) + self.name = name + self.subnet = subnet + self.primary = primary + self.public_ip_address_configuration = public_ip_address_configuration + self.private_ip_address_version = private_ip_address_version + self.application_gateway_backend_address_pools = application_gateway_backend_address_pools + self.load_balancer_backend_address_pools = load_balancer_backend_address_pools + self.load_balancer_inbound_nat_pools = load_balancer_inbound_nat_pools + + +class VirtualMachineScaleSetUpdateNetworkConfiguration(SubResource): + """Describes a virtual machine scale set network profile's network + configurations. + + :param id: Resource Id + :type id: str + :param name: The network configuration name. + :type name: str + :param primary: Whether this is a primary NIC on a virtual machine. + :type primary: bool + :param enable_accelerated_networking: Specifies whether the network + interface is accelerated networking-enabled. + :type enable_accelerated_networking: bool + :param network_security_group: The network security group. + :type network_security_group: + ~azure.mgmt.compute.v2018_04_01.models.SubResource + :param dns_settings: The dns settings to be applied on the network + interfaces. + :type dns_settings: + ~azure.mgmt.compute.v2018_04_01.models.VirtualMachineScaleSetNetworkConfigurationDnsSettings + :param ip_configurations: The virtual machine scale set IP Configuration. + :type ip_configurations: + list[~azure.mgmt.compute.v2018_04_01.models.VirtualMachineScaleSetUpdateIPConfiguration] + :param enable_ip_forwarding: Whether IP forwarding enabled on this NIC. + :type enable_ip_forwarding: bool + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'primary': {'key': 'properties.primary', 'type': 'bool'}, + 'enable_accelerated_networking': {'key': 'properties.enableAcceleratedNetworking', 'type': 'bool'}, + 'network_security_group': {'key': 'properties.networkSecurityGroup', 'type': 'SubResource'}, + 'dns_settings': {'key': 'properties.dnsSettings', 'type': 'VirtualMachineScaleSetNetworkConfigurationDnsSettings'}, + 'ip_configurations': {'key': 'properties.ipConfigurations', 'type': '[VirtualMachineScaleSetUpdateIPConfiguration]'}, + 'enable_ip_forwarding': {'key': 'properties.enableIPForwarding', 'type': 'bool'}, + } + + def __init__(self, *, id: str=None, name: str=None, primary: bool=None, enable_accelerated_networking: bool=None, network_security_group=None, dns_settings=None, ip_configurations=None, enable_ip_forwarding: bool=None, **kwargs) -> None: + super(VirtualMachineScaleSetUpdateNetworkConfiguration, self).__init__(id=id, **kwargs) + self.name = name + self.primary = primary + self.enable_accelerated_networking = enable_accelerated_networking + self.network_security_group = network_security_group + self.dns_settings = dns_settings + self.ip_configurations = ip_configurations + self.enable_ip_forwarding = enable_ip_forwarding + + +class VirtualMachineScaleSetUpdateNetworkProfile(Model): + """Describes a virtual machine scale set network profile. + + :param network_interface_configurations: The list of network + configurations. + :type network_interface_configurations: + list[~azure.mgmt.compute.v2018_04_01.models.VirtualMachineScaleSetUpdateNetworkConfiguration] + """ + + _attribute_map = { + 'network_interface_configurations': {'key': 'networkInterfaceConfigurations', 'type': '[VirtualMachineScaleSetUpdateNetworkConfiguration]'}, + } + + def __init__(self, *, network_interface_configurations=None, **kwargs) -> None: + super(VirtualMachineScaleSetUpdateNetworkProfile, self).__init__(**kwargs) + self.network_interface_configurations = network_interface_configurations + + +class VirtualMachineScaleSetUpdateOSDisk(Model): + """Describes virtual machine scale set operating system disk Update Object. + This should be used for Updating VMSS OS Disk. + + :param caching: The caching type. Possible values include: 'None', + 'ReadOnly', 'ReadWrite' + :type caching: str or ~azure.mgmt.compute.v2018_04_01.models.CachingTypes + :param write_accelerator_enabled: Specifies whether writeAccelerator + should be enabled or disabled on the disk. + :type write_accelerator_enabled: bool + :param disk_size_gb: Specifies the size of the operating system disk in + gigabytes. This element can be used to overwrite the size of the disk in a + virtual machine image.

    This value cannot be larger than 1023 GB + :type disk_size_gb: int + :param image: The Source User Image VirtualHardDisk. This VirtualHardDisk + will be copied before using it to attach to the Virtual Machine. If + SourceImage is provided, the destination VirtualHardDisk should not exist. + :type image: ~azure.mgmt.compute.v2018_04_01.models.VirtualHardDisk + :param vhd_containers: The list of virtual hard disk container uris. + :type vhd_containers: list[str] + :param managed_disk: The managed disk parameters. + :type managed_disk: + ~azure.mgmt.compute.v2018_04_01.models.VirtualMachineScaleSetManagedDiskParameters + """ + + _attribute_map = { + 'caching': {'key': 'caching', 'type': 'CachingTypes'}, + 'write_accelerator_enabled': {'key': 'writeAcceleratorEnabled', 'type': 'bool'}, + 'disk_size_gb': {'key': 'diskSizeGB', 'type': 'int'}, + 'image': {'key': 'image', 'type': 'VirtualHardDisk'}, + 'vhd_containers': {'key': 'vhdContainers', 'type': '[str]'}, + 'managed_disk': {'key': 'managedDisk', 'type': 'VirtualMachineScaleSetManagedDiskParameters'}, + } + + def __init__(self, *, caching=None, write_accelerator_enabled: bool=None, disk_size_gb: int=None, image=None, vhd_containers=None, managed_disk=None, **kwargs) -> None: + super(VirtualMachineScaleSetUpdateOSDisk, self).__init__(**kwargs) + self.caching = caching + self.write_accelerator_enabled = write_accelerator_enabled + self.disk_size_gb = disk_size_gb + self.image = image + self.vhd_containers = vhd_containers + self.managed_disk = managed_disk + + +class VirtualMachineScaleSetUpdateOSProfile(Model): + """Describes a virtual machine scale set OS profile. + + :param custom_data: A base-64 encoded string of custom data. + :type custom_data: str + :param windows_configuration: The Windows Configuration of the OS profile. + :type windows_configuration: + ~azure.mgmt.compute.v2018_04_01.models.WindowsConfiguration + :param linux_configuration: The Linux Configuration of the OS profile. + :type linux_configuration: + ~azure.mgmt.compute.v2018_04_01.models.LinuxConfiguration + :param secrets: The List of certificates for addition to the VM. + :type secrets: + list[~azure.mgmt.compute.v2018_04_01.models.VaultSecretGroup] + """ + + _attribute_map = { + 'custom_data': {'key': 'customData', 'type': 'str'}, + 'windows_configuration': {'key': 'windowsConfiguration', 'type': 'WindowsConfiguration'}, + 'linux_configuration': {'key': 'linuxConfiguration', 'type': 'LinuxConfiguration'}, + 'secrets': {'key': 'secrets', 'type': '[VaultSecretGroup]'}, + } + + def __init__(self, *, custom_data: str=None, windows_configuration=None, linux_configuration=None, secrets=None, **kwargs) -> None: + super(VirtualMachineScaleSetUpdateOSProfile, self).__init__(**kwargs) + self.custom_data = custom_data + self.windows_configuration = windows_configuration + self.linux_configuration = linux_configuration + self.secrets = secrets + + +class VirtualMachineScaleSetUpdatePublicIPAddressConfiguration(Model): + """Describes a virtual machines scale set IP Configuration's PublicIPAddress + configuration. + + :param name: The publicIP address configuration name. + :type name: str + :param idle_timeout_in_minutes: The idle timeout of the public IP address. + :type idle_timeout_in_minutes: int + :param dns_settings: The dns settings to be applied on the publicIP + addresses . + :type dns_settings: + ~azure.mgmt.compute.v2018_04_01.models.VirtualMachineScaleSetPublicIPAddressConfigurationDnsSettings + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'idle_timeout_in_minutes': {'key': 'properties.idleTimeoutInMinutes', 'type': 'int'}, + 'dns_settings': {'key': 'properties.dnsSettings', 'type': 'VirtualMachineScaleSetPublicIPAddressConfigurationDnsSettings'}, + } + + def __init__(self, *, name: str=None, idle_timeout_in_minutes: int=None, dns_settings=None, **kwargs) -> None: + super(VirtualMachineScaleSetUpdatePublicIPAddressConfiguration, self).__init__(**kwargs) + self.name = name + self.idle_timeout_in_minutes = idle_timeout_in_minutes + self.dns_settings = dns_settings + + +class VirtualMachineScaleSetUpdateStorageProfile(Model): + """Describes a virtual machine scale set storage profile. + + :param image_reference: The image reference. + :type image_reference: + ~azure.mgmt.compute.v2018_04_01.models.ImageReference + :param os_disk: The OS disk. + :type os_disk: + ~azure.mgmt.compute.v2018_04_01.models.VirtualMachineScaleSetUpdateOSDisk + :param data_disks: The data disks. + :type data_disks: + list[~azure.mgmt.compute.v2018_04_01.models.VirtualMachineScaleSetDataDisk] + """ + + _attribute_map = { + 'image_reference': {'key': 'imageReference', 'type': 'ImageReference'}, + 'os_disk': {'key': 'osDisk', 'type': 'VirtualMachineScaleSetUpdateOSDisk'}, + 'data_disks': {'key': 'dataDisks', 'type': '[VirtualMachineScaleSetDataDisk]'}, + } + + def __init__(self, *, image_reference=None, os_disk=None, data_disks=None, **kwargs) -> None: + super(VirtualMachineScaleSetUpdateStorageProfile, self).__init__(**kwargs) + self.image_reference = image_reference + self.os_disk = os_disk + self.data_disks = data_disks + + +class VirtualMachineScaleSetUpdateVMProfile(Model): + """Describes a virtual machine scale set virtual machine profile. + + :param os_profile: The virtual machine scale set OS profile. + :type os_profile: + ~azure.mgmt.compute.v2018_04_01.models.VirtualMachineScaleSetUpdateOSProfile + :param storage_profile: The virtual machine scale set storage profile. + :type storage_profile: + ~azure.mgmt.compute.v2018_04_01.models.VirtualMachineScaleSetUpdateStorageProfile + :param network_profile: The virtual machine scale set network profile. + :type network_profile: + ~azure.mgmt.compute.v2018_04_01.models.VirtualMachineScaleSetUpdateNetworkProfile + :param diagnostics_profile: The virtual machine scale set diagnostics + profile. + :type diagnostics_profile: + ~azure.mgmt.compute.v2018_04_01.models.DiagnosticsProfile + :param extension_profile: The virtual machine scale set extension profile. + :type extension_profile: + ~azure.mgmt.compute.v2018_04_01.models.VirtualMachineScaleSetExtensionProfile + :param license_type: The license type, which is for bring your own license + scenario. + :type license_type: str + """ + + _attribute_map = { + 'os_profile': {'key': 'osProfile', 'type': 'VirtualMachineScaleSetUpdateOSProfile'}, + 'storage_profile': {'key': 'storageProfile', 'type': 'VirtualMachineScaleSetUpdateStorageProfile'}, + 'network_profile': {'key': 'networkProfile', 'type': 'VirtualMachineScaleSetUpdateNetworkProfile'}, + 'diagnostics_profile': {'key': 'diagnosticsProfile', 'type': 'DiagnosticsProfile'}, + 'extension_profile': {'key': 'extensionProfile', 'type': 'VirtualMachineScaleSetExtensionProfile'}, + 'license_type': {'key': 'licenseType', 'type': 'str'}, + } + + def __init__(self, *, os_profile=None, storage_profile=None, network_profile=None, diagnostics_profile=None, extension_profile=None, license_type: str=None, **kwargs) -> None: + super(VirtualMachineScaleSetUpdateVMProfile, self).__init__(**kwargs) + self.os_profile = os_profile + self.storage_profile = storage_profile + self.network_profile = network_profile + self.diagnostics_profile = diagnostics_profile + self.extension_profile = extension_profile + self.license_type = license_type + + +class VirtualMachineScaleSetVM(Resource): + """Describes a virtual machine scale set virtual machine. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource Id + :vartype id: str + :ivar name: Resource name + :vartype name: str + :ivar type: Resource type + :vartype type: str + :param location: Required. Resource location + :type location: str + :param tags: Resource tags + :type tags: dict[str, str] + :ivar instance_id: The virtual machine instance ID. + :vartype instance_id: str + :ivar sku: The virtual machine SKU. + :vartype sku: ~azure.mgmt.compute.v2018_04_01.models.Sku + :ivar latest_model_applied: Specifies whether the latest model has been + applied to the virtual machine. + :vartype latest_model_applied: bool + :ivar vm_id: Azure VM unique ID. + :vartype vm_id: str + :ivar instance_view: The virtual machine instance view. + :vartype instance_view: + ~azure.mgmt.compute.v2018_04_01.models.VirtualMachineScaleSetVMInstanceView + :param hardware_profile: Specifies the hardware settings for the virtual + machine. + :type hardware_profile: + ~azure.mgmt.compute.v2018_04_01.models.HardwareProfile + :param storage_profile: Specifies the storage settings for the virtual + machine disks. + :type storage_profile: + ~azure.mgmt.compute.v2018_04_01.models.StorageProfile + :param os_profile: Specifies the operating system settings for the virtual + machine. + :type os_profile: ~azure.mgmt.compute.v2018_04_01.models.OSProfile + :param network_profile: Specifies the network interfaces of the virtual + machine. + :type network_profile: + ~azure.mgmt.compute.v2018_04_01.models.NetworkProfile + :param diagnostics_profile: Specifies the boot diagnostic settings state. +

    Minimum api-version: 2015-06-15. + :type diagnostics_profile: + ~azure.mgmt.compute.v2018_04_01.models.DiagnosticsProfile + :param availability_set: Specifies information about the availability set + that the virtual machine should be assigned to. Virtual machines specified + in the same availability set are allocated to different nodes to maximize + availability. For more information about availability sets, see [Manage + the availability of virtual + machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-manage-availability?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). +

    For more information on Azure planned maintenance, see [Planned + maintenance for virtual machines in + Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-planned-maintenance?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json) +

    Currently, a VM can only be added to availability set at creation + time. An existing VM cannot be added to an availability set. + :type availability_set: ~azure.mgmt.compute.v2018_04_01.models.SubResource + :ivar provisioning_state: The provisioning state, which only appears in + the response. + :vartype provisioning_state: str + :param license_type: Specifies that the image or disk that is being used + was licensed on-premises. This element is only used for images that + contain the Windows Server operating system.

    Possible values are: +

    Windows_Client

    Windows_Server

    If this element + is included in a request for an update, the value must match the initial + value. This value cannot be updated.

    For more information, see + [Azure Hybrid Use Benefit for Windows + Server](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-hybrid-use-benefit-licensing?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json) +

    Minimum api-version: 2015-06-15 + :type license_type: str + :param plan: Specifies information about the marketplace image used to + create the virtual machine. This element is only used for marketplace + images. Before you can use a marketplace image from an API, you must + enable the image for programmatic use. In the Azure portal, find the + marketplace image that you want to use and then click **Want to deploy + programmatically, Get Started ->**. Enter any required information and + then click **Save**. + :type plan: ~azure.mgmt.compute.v2018_04_01.models.Plan + :ivar resources: The virtual machine child extension resources. + :vartype resources: + list[~azure.mgmt.compute.v2018_04_01.models.VirtualMachineExtension] + :ivar zones: The virtual machine zones. + :vartype zones: list[str] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + 'instance_id': {'readonly': True}, + 'sku': {'readonly': True}, + 'latest_model_applied': {'readonly': True}, + 'vm_id': {'readonly': True}, + 'instance_view': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + 'resources': {'readonly': True}, + 'zones': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'instance_id': {'key': 'instanceId', 'type': 'str'}, + 'sku': {'key': 'sku', 'type': 'Sku'}, + 'latest_model_applied': {'key': 'properties.latestModelApplied', 'type': 'bool'}, + 'vm_id': {'key': 'properties.vmId', 'type': 'str'}, + 'instance_view': {'key': 'properties.instanceView', 'type': 'VirtualMachineScaleSetVMInstanceView'}, + 'hardware_profile': {'key': 'properties.hardwareProfile', 'type': 'HardwareProfile'}, + 'storage_profile': {'key': 'properties.storageProfile', 'type': 'StorageProfile'}, + 'os_profile': {'key': 'properties.osProfile', 'type': 'OSProfile'}, + 'network_profile': {'key': 'properties.networkProfile', 'type': 'NetworkProfile'}, + 'diagnostics_profile': {'key': 'properties.diagnosticsProfile', 'type': 'DiagnosticsProfile'}, + 'availability_set': {'key': 'properties.availabilitySet', 'type': 'SubResource'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'license_type': {'key': 'properties.licenseType', 'type': 'str'}, + 'plan': {'key': 'plan', 'type': 'Plan'}, + 'resources': {'key': 'resources', 'type': '[VirtualMachineExtension]'}, + 'zones': {'key': 'zones', 'type': '[str]'}, + } + + def __init__(self, *, location: str, tags=None, hardware_profile=None, storage_profile=None, os_profile=None, network_profile=None, diagnostics_profile=None, availability_set=None, license_type: str=None, plan=None, **kwargs) -> None: + super(VirtualMachineScaleSetVM, self).__init__(location=location, tags=tags, **kwargs) + self.instance_id = None + self.sku = None + self.latest_model_applied = None + self.vm_id = None + self.instance_view = None + self.hardware_profile = hardware_profile + self.storage_profile = storage_profile + self.os_profile = os_profile + self.network_profile = network_profile + self.diagnostics_profile = diagnostics_profile + self.availability_set = availability_set + self.provisioning_state = None + self.license_type = license_type + self.plan = plan + self.resources = None + self.zones = None + + +class VirtualMachineScaleSetVMExtensionsSummary(Model): + """Extensions summary for virtual machines of a virtual machine scale set. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar name: The extension name. + :vartype name: str + :ivar statuses_summary: The extensions information. + :vartype statuses_summary: + list[~azure.mgmt.compute.v2018_04_01.models.VirtualMachineStatusCodeCount] + """ + + _validation = { + 'name': {'readonly': True}, + 'statuses_summary': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'statuses_summary': {'key': 'statusesSummary', 'type': '[VirtualMachineStatusCodeCount]'}, + } + + def __init__(self, **kwargs) -> None: + super(VirtualMachineScaleSetVMExtensionsSummary, self).__init__(**kwargs) + self.name = None + self.statuses_summary = None + + +class VirtualMachineScaleSetVMInstanceIDs(Model): + """Specifies a list of virtual machine instance IDs from the VM scale set. + + :param instance_ids: The virtual machine scale set instance ids. Omitting + the virtual machine scale set instance ids will result in the operation + being performed on all virtual machines in the virtual machine scale set. + :type instance_ids: list[str] + """ + + _attribute_map = { + 'instance_ids': {'key': 'instanceIds', 'type': '[str]'}, + } + + def __init__(self, *, instance_ids=None, **kwargs) -> None: + super(VirtualMachineScaleSetVMInstanceIDs, self).__init__(**kwargs) + self.instance_ids = instance_ids + + +class VirtualMachineScaleSetVMInstanceRequiredIDs(Model): + """Specifies a list of virtual machine instance IDs from the VM scale set. + + All required parameters must be populated in order to send to Azure. + + :param instance_ids: Required. The virtual machine scale set instance ids. + :type instance_ids: list[str] + """ + + _validation = { + 'instance_ids': {'required': True}, + } + + _attribute_map = { + 'instance_ids': {'key': 'instanceIds', 'type': '[str]'}, + } + + def __init__(self, *, instance_ids, **kwargs) -> None: + super(VirtualMachineScaleSetVMInstanceRequiredIDs, self).__init__(**kwargs) + self.instance_ids = instance_ids + + +class VirtualMachineScaleSetVMInstanceView(Model): + """The instance view of a virtual machine scale set VM. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :param platform_update_domain: The Update Domain count. + :type platform_update_domain: int + :param platform_fault_domain: The Fault Domain count. + :type platform_fault_domain: int + :param rdp_thumb_print: The Remote desktop certificate thumbprint. + :type rdp_thumb_print: str + :param vm_agent: The VM Agent running on the virtual machine. + :type vm_agent: + ~azure.mgmt.compute.v2018_04_01.models.VirtualMachineAgentInstanceView + :param maintenance_redeploy_status: The Maintenance Operation status on + the virtual machine. + :type maintenance_redeploy_status: + ~azure.mgmt.compute.v2018_04_01.models.MaintenanceRedeployStatus + :param disks: The disks information. + :type disks: list[~azure.mgmt.compute.v2018_04_01.models.DiskInstanceView] + :param extensions: The extensions information. + :type extensions: + list[~azure.mgmt.compute.v2018_04_01.models.VirtualMachineExtensionInstanceView] + :ivar vm_health: The health status for the VM. + :vartype vm_health: + ~azure.mgmt.compute.v2018_04_01.models.VirtualMachineHealthStatus + :param boot_diagnostics: Boot Diagnostics is a debugging feature which + allows you to view Console Output and Screenshot to diagnose VM status. +

    You can easily view the output of your console log.

    + Azure also enables you to see a screenshot of the VM from the hypervisor. + :type boot_diagnostics: + ~azure.mgmt.compute.v2018_04_01.models.BootDiagnosticsInstanceView + :param statuses: The resource status information. + :type statuses: + list[~azure.mgmt.compute.v2018_04_01.models.InstanceViewStatus] + :param placement_group_id: The placement group in which the VM is running. + If the VM is deallocated it will not have a placementGroupId. + :type placement_group_id: str + """ + + _validation = { + 'vm_health': {'readonly': True}, + } + + _attribute_map = { + 'platform_update_domain': {'key': 'platformUpdateDomain', 'type': 'int'}, + 'platform_fault_domain': {'key': 'platformFaultDomain', 'type': 'int'}, + 'rdp_thumb_print': {'key': 'rdpThumbPrint', 'type': 'str'}, + 'vm_agent': {'key': 'vmAgent', 'type': 'VirtualMachineAgentInstanceView'}, + 'maintenance_redeploy_status': {'key': 'maintenanceRedeployStatus', 'type': 'MaintenanceRedeployStatus'}, + 'disks': {'key': 'disks', 'type': '[DiskInstanceView]'}, + 'extensions': {'key': 'extensions', 'type': '[VirtualMachineExtensionInstanceView]'}, + 'vm_health': {'key': 'vmHealth', 'type': 'VirtualMachineHealthStatus'}, + 'boot_diagnostics': {'key': 'bootDiagnostics', 'type': 'BootDiagnosticsInstanceView'}, + 'statuses': {'key': 'statuses', 'type': '[InstanceViewStatus]'}, + 'placement_group_id': {'key': 'placementGroupId', 'type': 'str'}, + } + + def __init__(self, *, platform_update_domain: int=None, platform_fault_domain: int=None, rdp_thumb_print: str=None, vm_agent=None, maintenance_redeploy_status=None, disks=None, extensions=None, boot_diagnostics=None, statuses=None, placement_group_id: str=None, **kwargs) -> None: + super(VirtualMachineScaleSetVMInstanceView, self).__init__(**kwargs) + self.platform_update_domain = platform_update_domain + self.platform_fault_domain = platform_fault_domain + self.rdp_thumb_print = rdp_thumb_print + self.vm_agent = vm_agent + self.maintenance_redeploy_status = maintenance_redeploy_status + self.disks = disks + self.extensions = extensions + self.vm_health = None + self.boot_diagnostics = boot_diagnostics + self.statuses = statuses + self.placement_group_id = placement_group_id + + +class VirtualMachineScaleSetVMProfile(Model): + """Describes a virtual machine scale set virtual machine profile. + + :param os_profile: Specifies the operating system settings for the virtual + machines in the scale set. + :type os_profile: + ~azure.mgmt.compute.v2018_04_01.models.VirtualMachineScaleSetOSProfile + :param storage_profile: Specifies the storage settings for the virtual + machine disks. + :type storage_profile: + ~azure.mgmt.compute.v2018_04_01.models.VirtualMachineScaleSetStorageProfile + :param network_profile: Specifies properties of the network interfaces of + the virtual machines in the scale set. + :type network_profile: + ~azure.mgmt.compute.v2018_04_01.models.VirtualMachineScaleSetNetworkProfile + :param diagnostics_profile: Specifies the boot diagnostic settings state. +

    Minimum api-version: 2015-06-15. + :type diagnostics_profile: + ~azure.mgmt.compute.v2018_04_01.models.DiagnosticsProfile + :param extension_profile: Specifies a collection of settings for + extensions installed on virtual machines in the scale set. + :type extension_profile: + ~azure.mgmt.compute.v2018_04_01.models.VirtualMachineScaleSetExtensionProfile + :param license_type: Specifies that the image or disk that is being used + was licensed on-premises. This element is only used for images that + contain the Windows Server operating system.

    Possible values are: +

    Windows_Client

    Windows_Server

    If this element + is included in a request for an update, the value must match the initial + value. This value cannot be updated.

    For more information, see + [Azure Hybrid Use Benefit for Windows + Server](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-hybrid-use-benefit-licensing?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json) +

    Minimum api-version: 2015-06-15 + :type license_type: str + :param priority: Specifies the priority for the virtual machines in the + scale set.

    Minimum api-version: 2017-10-30-preview. Possible + values include: 'Regular', 'Low' + :type priority: str or + ~azure.mgmt.compute.v2018_04_01.models.VirtualMachinePriorityTypes + :param eviction_policy: Specifies the eviction policy for virtual machines + in a low priority scale set.

    Minimum api-version: + 2017-10-30-preview. Possible values include: 'Deallocate', 'Delete' + :type eviction_policy: str or + ~azure.mgmt.compute.v2018_04_01.models.VirtualMachineEvictionPolicyTypes + """ + + _attribute_map = { + 'os_profile': {'key': 'osProfile', 'type': 'VirtualMachineScaleSetOSProfile'}, + 'storage_profile': {'key': 'storageProfile', 'type': 'VirtualMachineScaleSetStorageProfile'}, + 'network_profile': {'key': 'networkProfile', 'type': 'VirtualMachineScaleSetNetworkProfile'}, + 'diagnostics_profile': {'key': 'diagnosticsProfile', 'type': 'DiagnosticsProfile'}, + 'extension_profile': {'key': 'extensionProfile', 'type': 'VirtualMachineScaleSetExtensionProfile'}, + 'license_type': {'key': 'licenseType', 'type': 'str'}, + 'priority': {'key': 'priority', 'type': 'str'}, + 'eviction_policy': {'key': 'evictionPolicy', 'type': 'str'}, + } + + def __init__(self, *, os_profile=None, storage_profile=None, network_profile=None, diagnostics_profile=None, extension_profile=None, license_type: str=None, priority=None, eviction_policy=None, **kwargs) -> None: + super(VirtualMachineScaleSetVMProfile, self).__init__(**kwargs) + self.os_profile = os_profile + self.storage_profile = storage_profile + self.network_profile = network_profile + self.diagnostics_profile = diagnostics_profile + self.extension_profile = extension_profile + self.license_type = license_type + self.priority = priority + self.eviction_policy = eviction_policy + + +class VirtualMachineSize(Model): + """Describes the properties of a VM size. + + :param name: The name of the virtual machine size. + :type name: str + :param number_of_cores: The number of cores supported by the virtual + machine size. + :type number_of_cores: int + :param os_disk_size_in_mb: The OS disk size, in MB, allowed by the virtual + machine size. + :type os_disk_size_in_mb: int + :param resource_disk_size_in_mb: The resource disk size, in MB, allowed by + the virtual machine size. + :type resource_disk_size_in_mb: int + :param memory_in_mb: The amount of memory, in MB, supported by the virtual + machine size. + :type memory_in_mb: int + :param max_data_disk_count: The maximum number of data disks that can be + attached to the virtual machine size. + :type max_data_disk_count: int + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'number_of_cores': {'key': 'numberOfCores', 'type': 'int'}, + 'os_disk_size_in_mb': {'key': 'osDiskSizeInMB', 'type': 'int'}, + 'resource_disk_size_in_mb': {'key': 'resourceDiskSizeInMB', 'type': 'int'}, + 'memory_in_mb': {'key': 'memoryInMB', 'type': 'int'}, + 'max_data_disk_count': {'key': 'maxDataDiskCount', 'type': 'int'}, + } + + def __init__(self, *, name: str=None, number_of_cores: int=None, os_disk_size_in_mb: int=None, resource_disk_size_in_mb: int=None, memory_in_mb: int=None, max_data_disk_count: int=None, **kwargs) -> None: + super(VirtualMachineSize, self).__init__(**kwargs) + self.name = name + self.number_of_cores = number_of_cores + self.os_disk_size_in_mb = os_disk_size_in_mb + self.resource_disk_size_in_mb = resource_disk_size_in_mb + self.memory_in_mb = memory_in_mb + self.max_data_disk_count = max_data_disk_count + + +class VirtualMachineStatusCodeCount(Model): + """The status code and count of the virtual machine scale set instance view + status summary. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar code: The instance view status code. + :vartype code: str + :ivar count: The number of instances having a particular status code. + :vartype count: int + """ + + _validation = { + 'code': {'readonly': True}, + 'count': {'readonly': True}, + } + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + 'count': {'key': 'count', 'type': 'int'}, + } + + def __init__(self, **kwargs) -> None: + super(VirtualMachineStatusCodeCount, self).__init__(**kwargs) + self.code = None + self.count = None + + +class VirtualMachineUpdate(UpdateResource): + """Describes a Virtual Machine Update. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :param tags: Resource tags + :type tags: dict[str, str] + :param plan: Specifies information about the marketplace image used to + create the virtual machine. This element is only used for marketplace + images. Before you can use a marketplace image from an API, you must + enable the image for programmatic use. In the Azure portal, find the + marketplace image that you want to use and then click **Want to deploy + programmatically, Get Started ->**. Enter any required information and + then click **Save**. + :type plan: ~azure.mgmt.compute.v2018_04_01.models.Plan + :param hardware_profile: Specifies the hardware settings for the virtual + machine. + :type hardware_profile: + ~azure.mgmt.compute.v2018_04_01.models.HardwareProfile + :param storage_profile: Specifies the storage settings for the virtual + machine disks. + :type storage_profile: + ~azure.mgmt.compute.v2018_04_01.models.StorageProfile + :param os_profile: Specifies the operating system settings for the virtual + machine. + :type os_profile: ~azure.mgmt.compute.v2018_04_01.models.OSProfile + :param network_profile: Specifies the network interfaces of the virtual + machine. + :type network_profile: + ~azure.mgmt.compute.v2018_04_01.models.NetworkProfile + :param diagnostics_profile: Specifies the boot diagnostic settings state. +

    Minimum api-version: 2015-06-15. + :type diagnostics_profile: + ~azure.mgmt.compute.v2018_04_01.models.DiagnosticsProfile + :param availability_set: Specifies information about the availability set + that the virtual machine should be assigned to. Virtual machines specified + in the same availability set are allocated to different nodes to maximize + availability. For more information about availability sets, see [Manage + the availability of virtual + machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-manage-availability?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). +

    For more information on Azure planned maintenance, see [Planned + maintenance for virtual machines in + Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-planned-maintenance?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json) +

    Currently, a VM can only be added to availability set at creation + time. An existing VM cannot be added to an availability set. + :type availability_set: ~azure.mgmt.compute.v2018_04_01.models.SubResource + :param proximity_placement_group: Specifies information about the + proximity placement group that the virtual machine should be assigned to. +

    Minimum api-version: 2018-04-01. + :type proximity_placement_group: + ~azure.mgmt.compute.v2018_04_01.models.SubResource + :ivar provisioning_state: The provisioning state, which only appears in + the response. + :vartype provisioning_state: str + :ivar instance_view: The virtual machine instance view. + :vartype instance_view: + ~azure.mgmt.compute.v2018_04_01.models.VirtualMachineInstanceView + :param license_type: Specifies that the image or disk that is being used + was licensed on-premises. This element is only used for images that + contain the Windows Server operating system.

    Possible values are: +

    Windows_Client

    Windows_Server

    If this element + is included in a request for an update, the value must match the initial + value. This value cannot be updated.

    For more information, see + [Azure Hybrid Use Benefit for Windows + Server](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-hybrid-use-benefit-licensing?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json) +

    Minimum api-version: 2015-06-15 + :type license_type: str + :ivar vm_id: Specifies the VM unique ID which is a 128-bits identifier + that is encoded and stored in all Azure IaaS VMs SMBIOS and can be read + using platform BIOS commands. + :vartype vm_id: str + :param identity: The identity of the virtual machine, if configured. + :type identity: + ~azure.mgmt.compute.v2018_04_01.models.VirtualMachineIdentity + :param zones: The virtual machine zones. + :type zones: list[str] + """ + + _validation = { + 'provisioning_state': {'readonly': True}, + 'instance_view': {'readonly': True}, + 'vm_id': {'readonly': True}, + } + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + 'plan': {'key': 'plan', 'type': 'Plan'}, + 'hardware_profile': {'key': 'properties.hardwareProfile', 'type': 'HardwareProfile'}, + 'storage_profile': {'key': 'properties.storageProfile', 'type': 'StorageProfile'}, + 'os_profile': {'key': 'properties.osProfile', 'type': 'OSProfile'}, + 'network_profile': {'key': 'properties.networkProfile', 'type': 'NetworkProfile'}, + 'diagnostics_profile': {'key': 'properties.diagnosticsProfile', 'type': 'DiagnosticsProfile'}, + 'availability_set': {'key': 'properties.availabilitySet', 'type': 'SubResource'}, + 'proximity_placement_group': {'key': 'properties.proximityPlacementGroup', 'type': 'SubResource'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'instance_view': {'key': 'properties.instanceView', 'type': 'VirtualMachineInstanceView'}, + 'license_type': {'key': 'properties.licenseType', 'type': 'str'}, + 'vm_id': {'key': 'properties.vmId', 'type': 'str'}, + 'identity': {'key': 'identity', 'type': 'VirtualMachineIdentity'}, + 'zones': {'key': 'zones', 'type': '[str]'}, + } + + def __init__(self, *, tags=None, plan=None, hardware_profile=None, storage_profile=None, os_profile=None, network_profile=None, diagnostics_profile=None, availability_set=None, proximity_placement_group=None, license_type: str=None, identity=None, zones=None, **kwargs) -> None: + super(VirtualMachineUpdate, self).__init__(tags=tags, **kwargs) + self.plan = plan + self.hardware_profile = hardware_profile + self.storage_profile = storage_profile + self.os_profile = os_profile + self.network_profile = network_profile + self.diagnostics_profile = diagnostics_profile + self.availability_set = availability_set + self.proximity_placement_group = proximity_placement_group + self.provisioning_state = None + self.instance_view = None + self.license_type = license_type + self.vm_id = None + self.identity = identity + self.zones = zones + + +class WindowsConfiguration(Model): + """Specifies Windows operating system settings on the virtual machine. + + :param provision_vm_agent: Indicates whether virtual machine agent should + be provisioned on the virtual machine.

    When this property is not + specified in the request body, default behavior is to set it to true. + This will ensure that VM Agent is installed on the VM so that extensions + can be added to the VM later. + :type provision_vm_agent: bool + :param enable_automatic_updates: Indicates whether virtual machine is + enabled for automatic updates. + :type enable_automatic_updates: bool + :param time_zone: Specifies the time zone of the virtual machine. e.g. + "Pacific Standard Time" + :type time_zone: str + :param additional_unattend_content: Specifies additional base-64 encoded + XML formatted information that can be included in the Unattend.xml file, + which is used by Windows Setup. + :type additional_unattend_content: + list[~azure.mgmt.compute.v2018_04_01.models.AdditionalUnattendContent] + :param win_rm: Specifies the Windows Remote Management listeners. This + enables remote Windows PowerShell. + :type win_rm: ~azure.mgmt.compute.v2018_04_01.models.WinRMConfiguration + """ + + _attribute_map = { + 'provision_vm_agent': {'key': 'provisionVMAgent', 'type': 'bool'}, + 'enable_automatic_updates': {'key': 'enableAutomaticUpdates', 'type': 'bool'}, + 'time_zone': {'key': 'timeZone', 'type': 'str'}, + 'additional_unattend_content': {'key': 'additionalUnattendContent', 'type': '[AdditionalUnattendContent]'}, + 'win_rm': {'key': 'winRM', 'type': 'WinRMConfiguration'}, + } + + def __init__(self, *, provision_vm_agent: bool=None, enable_automatic_updates: bool=None, time_zone: str=None, additional_unattend_content=None, win_rm=None, **kwargs) -> None: + super(WindowsConfiguration, self).__init__(**kwargs) + self.provision_vm_agent = provision_vm_agent + self.enable_automatic_updates = enable_automatic_updates + self.time_zone = time_zone + self.additional_unattend_content = additional_unattend_content + self.win_rm = win_rm + + +class WinRMConfiguration(Model): + """Describes Windows Remote Management configuration of the VM. + + :param listeners: The list of Windows Remote Management listeners + :type listeners: + list[~azure.mgmt.compute.v2018_04_01.models.WinRMListener] + """ + + _attribute_map = { + 'listeners': {'key': 'listeners', 'type': '[WinRMListener]'}, + } + + def __init__(self, *, listeners=None, **kwargs) -> None: + super(WinRMConfiguration, self).__init__(**kwargs) + self.listeners = listeners + + +class WinRMListener(Model): + """Describes Protocol and thumbprint of Windows Remote Management listener. + + :param protocol: Specifies the protocol of listener.

    Possible + values are:
    **http**

    **https**. Possible values include: + 'Http', 'Https' + :type protocol: str or + ~azure.mgmt.compute.v2018_04_01.models.ProtocolTypes + :param certificate_url: This is the URL of a certificate that has been + uploaded to Key Vault as a secret. For adding a secret to the Key Vault, + see [Add a key or secret to the key + vault](https://docs.microsoft.com/azure/key-vault/key-vault-get-started/#add). + In this case, your certificate needs to be It is the Base64 encoding of + the following JSON Object which is encoded in UTF-8:

    {
    + "data":"",
    "dataType":"pfx",
    + "password":""
    } + :type certificate_url: str + """ + + _attribute_map = { + 'protocol': {'key': 'protocol', 'type': 'ProtocolTypes'}, + 'certificate_url': {'key': 'certificateUrl', 'type': 'str'}, + } + + def __init__(self, *, protocol=None, certificate_url: str=None, **kwargs) -> None: + super(WinRMListener, self).__init__(**kwargs) + self.protocol = protocol + self.certificate_url = certificate_url diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/_paged_models.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/_paged_models.py new file mode 100644 index 000000000000..eb26fcbdba43 --- /dev/null +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/_paged_models.py @@ -0,0 +1,209 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.paging import Paged + + +class ComputeOperationValuePaged(Paged): + """ + A paging container for iterating over a list of :class:`ComputeOperationValue ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[ComputeOperationValue]'} + } + + def __init__(self, *args, **kwargs): + + super(ComputeOperationValuePaged, self).__init__(*args, **kwargs) +class AvailabilitySetPaged(Paged): + """ + A paging container for iterating over a list of :class:`AvailabilitySet ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[AvailabilitySet]'} + } + + def __init__(self, *args, **kwargs): + + super(AvailabilitySetPaged, self).__init__(*args, **kwargs) +class VirtualMachineSizePaged(Paged): + """ + A paging container for iterating over a list of :class:`VirtualMachineSize ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[VirtualMachineSize]'} + } + + def __init__(self, *args, **kwargs): + + super(VirtualMachineSizePaged, self).__init__(*args, **kwargs) +class ProximityPlacementGroupPaged(Paged): + """ + A paging container for iterating over a list of :class:`ProximityPlacementGroup ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[ProximityPlacementGroup]'} + } + + def __init__(self, *args, **kwargs): + + super(ProximityPlacementGroupPaged, self).__init__(*args, **kwargs) +class UsagePaged(Paged): + """ + A paging container for iterating over a list of :class:`Usage ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[Usage]'} + } + + def __init__(self, *args, **kwargs): + + super(UsagePaged, self).__init__(*args, **kwargs) +class VirtualMachinePaged(Paged): + """ + A paging container for iterating over a list of :class:`VirtualMachine ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[VirtualMachine]'} + } + + def __init__(self, *args, **kwargs): + + super(VirtualMachinePaged, self).__init__(*args, **kwargs) +class ImagePaged(Paged): + """ + A paging container for iterating over a list of :class:`Image ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[Image]'} + } + + def __init__(self, *args, **kwargs): + + super(ImagePaged, self).__init__(*args, **kwargs) +class VirtualMachineScaleSetPaged(Paged): + """ + A paging container for iterating over a list of :class:`VirtualMachineScaleSet ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[VirtualMachineScaleSet]'} + } + + def __init__(self, *args, **kwargs): + + super(VirtualMachineScaleSetPaged, self).__init__(*args, **kwargs) +class VirtualMachineScaleSetSkuPaged(Paged): + """ + A paging container for iterating over a list of :class:`VirtualMachineScaleSetSku ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[VirtualMachineScaleSetSku]'} + } + + def __init__(self, *args, **kwargs): + + super(VirtualMachineScaleSetSkuPaged, self).__init__(*args, **kwargs) +class UpgradeOperationHistoricalStatusInfoPaged(Paged): + """ + A paging container for iterating over a list of :class:`UpgradeOperationHistoricalStatusInfo ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[UpgradeOperationHistoricalStatusInfo]'} + } + + def __init__(self, *args, **kwargs): + + super(UpgradeOperationHistoricalStatusInfoPaged, self).__init__(*args, **kwargs) +class VirtualMachineScaleSetExtensionPaged(Paged): + """ + A paging container for iterating over a list of :class:`VirtualMachineScaleSetExtension ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[VirtualMachineScaleSetExtension]'} + } + + def __init__(self, *args, **kwargs): + + super(VirtualMachineScaleSetExtensionPaged, self).__init__(*args, **kwargs) +class VirtualMachineScaleSetVMPaged(Paged): + """ + A paging container for iterating over a list of :class:`VirtualMachineScaleSetVM ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[VirtualMachineScaleSetVM]'} + } + + def __init__(self, *args, **kwargs): + + super(VirtualMachineScaleSetVMPaged, self).__init__(*args, **kwargs) +class RunCommandDocumentBasePaged(Paged): + """ + A paging container for iterating over a list of :class:`RunCommandDocumentBase ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[RunCommandDocumentBase]'} + } + + def __init__(self, *args, **kwargs): + + super(RunCommandDocumentBasePaged, self).__init__(*args, **kwargs) +class DiskPaged(Paged): + """ + A paging container for iterating over a list of :class:`Disk ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[Disk]'} + } + + def __init__(self, *args, **kwargs): + + super(DiskPaged, self).__init__(*args, **kwargs) +class SnapshotPaged(Paged): + """ + A paging container for iterating over a list of :class:`Snapshot ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[Snapshot]'} + } + + def __init__(self, *args, **kwargs): + + super(SnapshotPaged, self).__init__(*args, **kwargs) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/access_uri.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/access_uri.py deleted file mode 100644 index fec7ad1244ab..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/access_uri.py +++ /dev/null @@ -1,35 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class AccessUri(Model): - """A disk access SAS uri. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar access_sas: A SAS uri for accessing a disk. - :vartype access_sas: str - """ - - _validation = { - 'access_sas': {'readonly': True}, - } - - _attribute_map = { - 'access_sas': {'key': 'accessSAS', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(AccessUri, self).__init__(**kwargs) - self.access_sas = None diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/access_uri_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/access_uri_py3.py deleted file mode 100644 index c13208a20d8d..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/access_uri_py3.py +++ /dev/null @@ -1,35 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class AccessUri(Model): - """A disk access SAS uri. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar access_sas: A SAS uri for accessing a disk. - :vartype access_sas: str - """ - - _validation = { - 'access_sas': {'readonly': True}, - } - - _attribute_map = { - 'access_sas': {'key': 'accessSAS', 'type': 'str'}, - } - - def __init__(self, **kwargs) -> None: - super(AccessUri, self).__init__(**kwargs) - self.access_sas = None diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/additional_unattend_content.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/additional_unattend_content.py deleted file mode 100644 index c8262b8dc95f..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/additional_unattend_content.py +++ /dev/null @@ -1,52 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class AdditionalUnattendContent(Model): - """Specifies additional XML formatted information that can be included in the - Unattend.xml file, which is used by Windows Setup. Contents are defined by - setting name, component name, and the pass in which the content is applied. - - :param pass_name: The pass name. Currently, the only allowable value is - OobeSystem. Possible values include: 'OobeSystem' - :type pass_name: str or ~azure.mgmt.compute.v2018_04_01.models.PassNames - :param component_name: The component name. Currently, the only allowable - value is Microsoft-Windows-Shell-Setup. Possible values include: - 'Microsoft-Windows-Shell-Setup' - :type component_name: str or - ~azure.mgmt.compute.v2018_04_01.models.ComponentNames - :param setting_name: Specifies the name of the setting to which the - content applies. Possible values are: FirstLogonCommands and AutoLogon. - Possible values include: 'AutoLogon', 'FirstLogonCommands' - :type setting_name: str or - ~azure.mgmt.compute.v2018_04_01.models.SettingNames - :param content: Specifies the XML formatted content that is added to the - unattend.xml file for the specified path and component. The XML must be - less than 4KB and must include the root element for the setting or feature - that is being inserted. - :type content: str - """ - - _attribute_map = { - 'pass_name': {'key': 'passName', 'type': 'PassNames'}, - 'component_name': {'key': 'componentName', 'type': 'ComponentNames'}, - 'setting_name': {'key': 'settingName', 'type': 'SettingNames'}, - 'content': {'key': 'content', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(AdditionalUnattendContent, self).__init__(**kwargs) - self.pass_name = kwargs.get('pass_name', None) - self.component_name = kwargs.get('component_name', None) - self.setting_name = kwargs.get('setting_name', None) - self.content = kwargs.get('content', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/additional_unattend_content_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/additional_unattend_content_py3.py deleted file mode 100644 index 17c0266fe4b0..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/additional_unattend_content_py3.py +++ /dev/null @@ -1,52 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class AdditionalUnattendContent(Model): - """Specifies additional XML formatted information that can be included in the - Unattend.xml file, which is used by Windows Setup. Contents are defined by - setting name, component name, and the pass in which the content is applied. - - :param pass_name: The pass name. Currently, the only allowable value is - OobeSystem. Possible values include: 'OobeSystem' - :type pass_name: str or ~azure.mgmt.compute.v2018_04_01.models.PassNames - :param component_name: The component name. Currently, the only allowable - value is Microsoft-Windows-Shell-Setup. Possible values include: - 'Microsoft-Windows-Shell-Setup' - :type component_name: str or - ~azure.mgmt.compute.v2018_04_01.models.ComponentNames - :param setting_name: Specifies the name of the setting to which the - content applies. Possible values are: FirstLogonCommands and AutoLogon. - Possible values include: 'AutoLogon', 'FirstLogonCommands' - :type setting_name: str or - ~azure.mgmt.compute.v2018_04_01.models.SettingNames - :param content: Specifies the XML formatted content that is added to the - unattend.xml file for the specified path and component. The XML must be - less than 4KB and must include the root element for the setting or feature - that is being inserted. - :type content: str - """ - - _attribute_map = { - 'pass_name': {'key': 'passName', 'type': 'PassNames'}, - 'component_name': {'key': 'componentName', 'type': 'ComponentNames'}, - 'setting_name': {'key': 'settingName', 'type': 'SettingNames'}, - 'content': {'key': 'content', 'type': 'str'}, - } - - def __init__(self, *, pass_name=None, component_name=None, setting_name=None, content: str=None, **kwargs) -> None: - super(AdditionalUnattendContent, self).__init__(**kwargs) - self.pass_name = pass_name - self.component_name = component_name - self.setting_name = setting_name - self.content = content diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/api_entity_reference.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/api_entity_reference.py deleted file mode 100644 index d43730af3659..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/api_entity_reference.py +++ /dev/null @@ -1,29 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ApiEntityReference(Model): - """The API entity reference. - - :param id: The ARM resource id in the form of - /subscriptions/{SubscriptionId}/resourceGroups/{ResourceGroupName}/... - :type id: str - """ - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ApiEntityReference, self).__init__(**kwargs) - self.id = kwargs.get('id', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/api_entity_reference_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/api_entity_reference_py3.py deleted file mode 100644 index d42dfb1a5fd0..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/api_entity_reference_py3.py +++ /dev/null @@ -1,29 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ApiEntityReference(Model): - """The API entity reference. - - :param id: The ARM resource id in the form of - /subscriptions/{SubscriptionId}/resourceGroups/{ResourceGroupName}/... - :type id: str - """ - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - } - - def __init__(self, *, id: str=None, **kwargs) -> None: - super(ApiEntityReference, self).__init__(**kwargs) - self.id = id diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/api_error.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/api_error.py deleted file mode 100644 index 6c3ce23571f7..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/api_error.py +++ /dev/null @@ -1,44 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ApiError(Model): - """Api error. - - :param details: The Api error details - :type details: list[~azure.mgmt.compute.v2018_04_01.models.ApiErrorBase] - :param innererror: The Api inner error - :type innererror: ~azure.mgmt.compute.v2018_04_01.models.InnerError - :param code: The error code. - :type code: str - :param target: The target of the particular error. - :type target: str - :param message: The error message. - :type message: str - """ - - _attribute_map = { - 'details': {'key': 'details', 'type': '[ApiErrorBase]'}, - 'innererror': {'key': 'innererror', 'type': 'InnerError'}, - 'code': {'key': 'code', 'type': 'str'}, - 'target': {'key': 'target', 'type': 'str'}, - 'message': {'key': 'message', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ApiError, self).__init__(**kwargs) - self.details = kwargs.get('details', None) - self.innererror = kwargs.get('innererror', None) - self.code = kwargs.get('code', None) - self.target = kwargs.get('target', None) - self.message = kwargs.get('message', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/api_error_base.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/api_error_base.py deleted file mode 100644 index 655c08638905..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/api_error_base.py +++ /dev/null @@ -1,36 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ApiErrorBase(Model): - """Api error base. - - :param code: The error code. - :type code: str - :param target: The target of the particular error. - :type target: str - :param message: The error message. - :type message: str - """ - - _attribute_map = { - 'code': {'key': 'code', 'type': 'str'}, - 'target': {'key': 'target', 'type': 'str'}, - 'message': {'key': 'message', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ApiErrorBase, self).__init__(**kwargs) - self.code = kwargs.get('code', None) - self.target = kwargs.get('target', None) - self.message = kwargs.get('message', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/api_error_base_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/api_error_base_py3.py deleted file mode 100644 index 5ba95aa0283e..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/api_error_base_py3.py +++ /dev/null @@ -1,36 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ApiErrorBase(Model): - """Api error base. - - :param code: The error code. - :type code: str - :param target: The target of the particular error. - :type target: str - :param message: The error message. - :type message: str - """ - - _attribute_map = { - 'code': {'key': 'code', 'type': 'str'}, - 'target': {'key': 'target', 'type': 'str'}, - 'message': {'key': 'message', 'type': 'str'}, - } - - def __init__(self, *, code: str=None, target: str=None, message: str=None, **kwargs) -> None: - super(ApiErrorBase, self).__init__(**kwargs) - self.code = code - self.target = target - self.message = message diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/api_error_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/api_error_py3.py deleted file mode 100644 index ad665ba38599..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/api_error_py3.py +++ /dev/null @@ -1,44 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ApiError(Model): - """Api error. - - :param details: The Api error details - :type details: list[~azure.mgmt.compute.v2018_04_01.models.ApiErrorBase] - :param innererror: The Api inner error - :type innererror: ~azure.mgmt.compute.v2018_04_01.models.InnerError - :param code: The error code. - :type code: str - :param target: The target of the particular error. - :type target: str - :param message: The error message. - :type message: str - """ - - _attribute_map = { - 'details': {'key': 'details', 'type': '[ApiErrorBase]'}, - 'innererror': {'key': 'innererror', 'type': 'InnerError'}, - 'code': {'key': 'code', 'type': 'str'}, - 'target': {'key': 'target', 'type': 'str'}, - 'message': {'key': 'message', 'type': 'str'}, - } - - def __init__(self, *, details=None, innererror=None, code: str=None, target: str=None, message: str=None, **kwargs) -> None: - super(ApiError, self).__init__(**kwargs) - self.details = details - self.innererror = innererror - self.code = code - self.target = target - self.message = message diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/auto_os_upgrade_policy.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/auto_os_upgrade_policy.py deleted file mode 100644 index 2c74af408892..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/auto_os_upgrade_policy.py +++ /dev/null @@ -1,29 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class AutoOSUpgradePolicy(Model): - """The configuration parameters used for performing automatic OS upgrade. - - :param disable_auto_rollback: Whether OS image rollback feature should be - disabled. Default value is false. - :type disable_auto_rollback: bool - """ - - _attribute_map = { - 'disable_auto_rollback': {'key': 'disableAutoRollback', 'type': 'bool'}, - } - - def __init__(self, **kwargs): - super(AutoOSUpgradePolicy, self).__init__(**kwargs) - self.disable_auto_rollback = kwargs.get('disable_auto_rollback', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/auto_os_upgrade_policy_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/auto_os_upgrade_policy_py3.py deleted file mode 100644 index 3e3e751838a8..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/auto_os_upgrade_policy_py3.py +++ /dev/null @@ -1,29 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class AutoOSUpgradePolicy(Model): - """The configuration parameters used for performing automatic OS upgrade. - - :param disable_auto_rollback: Whether OS image rollback feature should be - disabled. Default value is false. - :type disable_auto_rollback: bool - """ - - _attribute_map = { - 'disable_auto_rollback': {'key': 'disableAutoRollback', 'type': 'bool'}, - } - - def __init__(self, *, disable_auto_rollback: bool=None, **kwargs) -> None: - super(AutoOSUpgradePolicy, self).__init__(**kwargs) - self.disable_auto_rollback = disable_auto_rollback diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/availability_set.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/availability_set.py deleted file mode 100644 index f2a9f59f0bf5..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/availability_set.py +++ /dev/null @@ -1,92 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource import Resource - - -class AvailabilitySet(Resource): - """Specifies information about the availability set that the virtual machine - should be assigned to. Virtual machines specified in the same availability - set are allocated to different nodes to maximize availability. For more - information about availability sets, see [Manage the availability of - virtual - machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-manage-availability?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). -

    For more information on Azure planned maintenance, see [Planned - maintenance for virtual machines in - Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-planned-maintenance?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json) -

    Currently, a VM can only be added to availability set at creation - time. An existing VM cannot be added to an availability set. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource Id - :vartype id: str - :ivar name: Resource name - :vartype name: str - :ivar type: Resource type - :vartype type: str - :param location: Required. Resource location - :type location: str - :param tags: Resource tags - :type tags: dict[str, str] - :param platform_update_domain_count: Update Domain count. - :type platform_update_domain_count: int - :param platform_fault_domain_count: Fault Domain count. - :type platform_fault_domain_count: int - :param virtual_machines: A list of references to all virtual machines in - the availability set. - :type virtual_machines: - list[~azure.mgmt.compute.v2018_04_01.models.SubResource] - :param proximity_placement_group: Specifies information about the - proximity placement group that the availability set should be assigned to. -

    Minimum api-version: 2018-04-01. - :type proximity_placement_group: - ~azure.mgmt.compute.v2018_04_01.models.SubResource - :ivar statuses: The resource status information. - :vartype statuses: - list[~azure.mgmt.compute.v2018_04_01.models.InstanceViewStatus] - :param sku: Sku of the availability set - :type sku: ~azure.mgmt.compute.v2018_04_01.models.Sku - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - 'statuses': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'platform_update_domain_count': {'key': 'properties.platformUpdateDomainCount', 'type': 'int'}, - 'platform_fault_domain_count': {'key': 'properties.platformFaultDomainCount', 'type': 'int'}, - 'virtual_machines': {'key': 'properties.virtualMachines', 'type': '[SubResource]'}, - 'proximity_placement_group': {'key': 'properties.proximityPlacementGroup', 'type': 'SubResource'}, - 'statuses': {'key': 'properties.statuses', 'type': '[InstanceViewStatus]'}, - 'sku': {'key': 'sku', 'type': 'Sku'}, - } - - def __init__(self, **kwargs): - super(AvailabilitySet, self).__init__(**kwargs) - self.platform_update_domain_count = kwargs.get('platform_update_domain_count', None) - self.platform_fault_domain_count = kwargs.get('platform_fault_domain_count', None) - self.virtual_machines = kwargs.get('virtual_machines', None) - self.proximity_placement_group = kwargs.get('proximity_placement_group', None) - self.statuses = None - self.sku = kwargs.get('sku', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/availability_set_paged.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/availability_set_paged.py deleted file mode 100644 index d3f242bb4d7d..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/availability_set_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class AvailabilitySetPaged(Paged): - """ - A paging container for iterating over a list of :class:`AvailabilitySet ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[AvailabilitySet]'} - } - - def __init__(self, *args, **kwargs): - - super(AvailabilitySetPaged, self).__init__(*args, **kwargs) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/availability_set_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/availability_set_py3.py deleted file mode 100644 index 4b7b0c09c3ee..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/availability_set_py3.py +++ /dev/null @@ -1,92 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource_py3 import Resource - - -class AvailabilitySet(Resource): - """Specifies information about the availability set that the virtual machine - should be assigned to. Virtual machines specified in the same availability - set are allocated to different nodes to maximize availability. For more - information about availability sets, see [Manage the availability of - virtual - machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-manage-availability?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). -

    For more information on Azure planned maintenance, see [Planned - maintenance for virtual machines in - Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-planned-maintenance?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json) -

    Currently, a VM can only be added to availability set at creation - time. An existing VM cannot be added to an availability set. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource Id - :vartype id: str - :ivar name: Resource name - :vartype name: str - :ivar type: Resource type - :vartype type: str - :param location: Required. Resource location - :type location: str - :param tags: Resource tags - :type tags: dict[str, str] - :param platform_update_domain_count: Update Domain count. - :type platform_update_domain_count: int - :param platform_fault_domain_count: Fault Domain count. - :type platform_fault_domain_count: int - :param virtual_machines: A list of references to all virtual machines in - the availability set. - :type virtual_machines: - list[~azure.mgmt.compute.v2018_04_01.models.SubResource] - :param proximity_placement_group: Specifies information about the - proximity placement group that the availability set should be assigned to. -

    Minimum api-version: 2018-04-01. - :type proximity_placement_group: - ~azure.mgmt.compute.v2018_04_01.models.SubResource - :ivar statuses: The resource status information. - :vartype statuses: - list[~azure.mgmt.compute.v2018_04_01.models.InstanceViewStatus] - :param sku: Sku of the availability set - :type sku: ~azure.mgmt.compute.v2018_04_01.models.Sku - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - 'statuses': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'platform_update_domain_count': {'key': 'properties.platformUpdateDomainCount', 'type': 'int'}, - 'platform_fault_domain_count': {'key': 'properties.platformFaultDomainCount', 'type': 'int'}, - 'virtual_machines': {'key': 'properties.virtualMachines', 'type': '[SubResource]'}, - 'proximity_placement_group': {'key': 'properties.proximityPlacementGroup', 'type': 'SubResource'}, - 'statuses': {'key': 'properties.statuses', 'type': '[InstanceViewStatus]'}, - 'sku': {'key': 'sku', 'type': 'Sku'}, - } - - def __init__(self, *, location: str, tags=None, platform_update_domain_count: int=None, platform_fault_domain_count: int=None, virtual_machines=None, proximity_placement_group=None, sku=None, **kwargs) -> None: - super(AvailabilitySet, self).__init__(location=location, tags=tags, **kwargs) - self.platform_update_domain_count = platform_update_domain_count - self.platform_fault_domain_count = platform_fault_domain_count - self.virtual_machines = virtual_machines - self.proximity_placement_group = proximity_placement_group - self.statuses = None - self.sku = sku diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/availability_set_update.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/availability_set_update.py deleted file mode 100644 index 44be150539b9..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/availability_set_update.py +++ /dev/null @@ -1,65 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .update_resource import UpdateResource - - -class AvailabilitySetUpdate(UpdateResource): - """Specifies information about the availability set that the virtual machine - should be assigned to. Only tags may be updated. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :param tags: Resource tags - :type tags: dict[str, str] - :param platform_update_domain_count: Update Domain count. - :type platform_update_domain_count: int - :param platform_fault_domain_count: Fault Domain count. - :type platform_fault_domain_count: int - :param virtual_machines: A list of references to all virtual machines in - the availability set. - :type virtual_machines: - list[~azure.mgmt.compute.v2018_04_01.models.SubResource] - :param proximity_placement_group: Specifies information about the - proximity placement group that the availability set should be assigned to. -

    Minimum api-version: 2018-04-01. - :type proximity_placement_group: - ~azure.mgmt.compute.v2018_04_01.models.SubResource - :ivar statuses: The resource status information. - :vartype statuses: - list[~azure.mgmt.compute.v2018_04_01.models.InstanceViewStatus] - :param sku: Sku of the availability set - :type sku: ~azure.mgmt.compute.v2018_04_01.models.Sku - """ - - _validation = { - 'statuses': {'readonly': True}, - } - - _attribute_map = { - 'tags': {'key': 'tags', 'type': '{str}'}, - 'platform_update_domain_count': {'key': 'properties.platformUpdateDomainCount', 'type': 'int'}, - 'platform_fault_domain_count': {'key': 'properties.platformFaultDomainCount', 'type': 'int'}, - 'virtual_machines': {'key': 'properties.virtualMachines', 'type': '[SubResource]'}, - 'proximity_placement_group': {'key': 'properties.proximityPlacementGroup', 'type': 'SubResource'}, - 'statuses': {'key': 'properties.statuses', 'type': '[InstanceViewStatus]'}, - 'sku': {'key': 'sku', 'type': 'Sku'}, - } - - def __init__(self, **kwargs): - super(AvailabilitySetUpdate, self).__init__(**kwargs) - self.platform_update_domain_count = kwargs.get('platform_update_domain_count', None) - self.platform_fault_domain_count = kwargs.get('platform_fault_domain_count', None) - self.virtual_machines = kwargs.get('virtual_machines', None) - self.proximity_placement_group = kwargs.get('proximity_placement_group', None) - self.statuses = None - self.sku = kwargs.get('sku', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/availability_set_update_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/availability_set_update_py3.py deleted file mode 100644 index 0c4ce8cc2437..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/availability_set_update_py3.py +++ /dev/null @@ -1,65 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .update_resource_py3 import UpdateResource - - -class AvailabilitySetUpdate(UpdateResource): - """Specifies information about the availability set that the virtual machine - should be assigned to. Only tags may be updated. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :param tags: Resource tags - :type tags: dict[str, str] - :param platform_update_domain_count: Update Domain count. - :type platform_update_domain_count: int - :param platform_fault_domain_count: Fault Domain count. - :type platform_fault_domain_count: int - :param virtual_machines: A list of references to all virtual machines in - the availability set. - :type virtual_machines: - list[~azure.mgmt.compute.v2018_04_01.models.SubResource] - :param proximity_placement_group: Specifies information about the - proximity placement group that the availability set should be assigned to. -

    Minimum api-version: 2018-04-01. - :type proximity_placement_group: - ~azure.mgmt.compute.v2018_04_01.models.SubResource - :ivar statuses: The resource status information. - :vartype statuses: - list[~azure.mgmt.compute.v2018_04_01.models.InstanceViewStatus] - :param sku: Sku of the availability set - :type sku: ~azure.mgmt.compute.v2018_04_01.models.Sku - """ - - _validation = { - 'statuses': {'readonly': True}, - } - - _attribute_map = { - 'tags': {'key': 'tags', 'type': '{str}'}, - 'platform_update_domain_count': {'key': 'properties.platformUpdateDomainCount', 'type': 'int'}, - 'platform_fault_domain_count': {'key': 'properties.platformFaultDomainCount', 'type': 'int'}, - 'virtual_machines': {'key': 'properties.virtualMachines', 'type': '[SubResource]'}, - 'proximity_placement_group': {'key': 'properties.proximityPlacementGroup', 'type': 'SubResource'}, - 'statuses': {'key': 'properties.statuses', 'type': '[InstanceViewStatus]'}, - 'sku': {'key': 'sku', 'type': 'Sku'}, - } - - def __init__(self, *, tags=None, platform_update_domain_count: int=None, platform_fault_domain_count: int=None, virtual_machines=None, proximity_placement_group=None, sku=None, **kwargs) -> None: - super(AvailabilitySetUpdate, self).__init__(tags=tags, **kwargs) - self.platform_update_domain_count = platform_update_domain_count - self.platform_fault_domain_count = platform_fault_domain_count - self.virtual_machines = virtual_machines - self.proximity_placement_group = proximity_placement_group - self.statuses = None - self.sku = sku diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/boot_diagnostics.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/boot_diagnostics.py deleted file mode 100644 index 4a1f77c4d7d0..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/boot_diagnostics.py +++ /dev/null @@ -1,37 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class BootDiagnostics(Model): - """Boot Diagnostics is a debugging feature which allows you to view Console - Output and Screenshot to diagnose VM status.

    You can easily view - the output of your console log.

    Azure also enables you to see a - screenshot of the VM from the hypervisor. - - :param enabled: Whether boot diagnostics should be enabled on the Virtual - Machine. - :type enabled: bool - :param storage_uri: Uri of the storage account to use for placing the - console output and screenshot. - :type storage_uri: str - """ - - _attribute_map = { - 'enabled': {'key': 'enabled', 'type': 'bool'}, - 'storage_uri': {'key': 'storageUri', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(BootDiagnostics, self).__init__(**kwargs) - self.enabled = kwargs.get('enabled', None) - self.storage_uri = kwargs.get('storage_uri', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/boot_diagnostics_instance_view.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/boot_diagnostics_instance_view.py deleted file mode 100644 index 3f17908819ca..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/boot_diagnostics_instance_view.py +++ /dev/null @@ -1,47 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class BootDiagnosticsInstanceView(Model): - """The instance view of a virtual machine boot diagnostics. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar console_screenshot_blob_uri: The console screenshot blob URI. - :vartype console_screenshot_blob_uri: str - :ivar serial_console_log_blob_uri: The Linux serial console log blob Uri. - :vartype serial_console_log_blob_uri: str - :ivar status: The boot diagnostics status information for the VM.

    - NOTE: It will be set only if there are errors encountered in enabling boot - diagnostics. - :vartype status: ~azure.mgmt.compute.v2018_04_01.models.InstanceViewStatus - """ - - _validation = { - 'console_screenshot_blob_uri': {'readonly': True}, - 'serial_console_log_blob_uri': {'readonly': True}, - 'status': {'readonly': True}, - } - - _attribute_map = { - 'console_screenshot_blob_uri': {'key': 'consoleScreenshotBlobUri', 'type': 'str'}, - 'serial_console_log_blob_uri': {'key': 'serialConsoleLogBlobUri', 'type': 'str'}, - 'status': {'key': 'status', 'type': 'InstanceViewStatus'}, - } - - def __init__(self, **kwargs): - super(BootDiagnosticsInstanceView, self).__init__(**kwargs) - self.console_screenshot_blob_uri = None - self.serial_console_log_blob_uri = None - self.status = None diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/boot_diagnostics_instance_view_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/boot_diagnostics_instance_view_py3.py deleted file mode 100644 index 835256c75b26..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/boot_diagnostics_instance_view_py3.py +++ /dev/null @@ -1,47 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class BootDiagnosticsInstanceView(Model): - """The instance view of a virtual machine boot diagnostics. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar console_screenshot_blob_uri: The console screenshot blob URI. - :vartype console_screenshot_blob_uri: str - :ivar serial_console_log_blob_uri: The Linux serial console log blob Uri. - :vartype serial_console_log_blob_uri: str - :ivar status: The boot diagnostics status information for the VM.

    - NOTE: It will be set only if there are errors encountered in enabling boot - diagnostics. - :vartype status: ~azure.mgmt.compute.v2018_04_01.models.InstanceViewStatus - """ - - _validation = { - 'console_screenshot_blob_uri': {'readonly': True}, - 'serial_console_log_blob_uri': {'readonly': True}, - 'status': {'readonly': True}, - } - - _attribute_map = { - 'console_screenshot_blob_uri': {'key': 'consoleScreenshotBlobUri', 'type': 'str'}, - 'serial_console_log_blob_uri': {'key': 'serialConsoleLogBlobUri', 'type': 'str'}, - 'status': {'key': 'status', 'type': 'InstanceViewStatus'}, - } - - def __init__(self, **kwargs) -> None: - super(BootDiagnosticsInstanceView, self).__init__(**kwargs) - self.console_screenshot_blob_uri = None - self.serial_console_log_blob_uri = None - self.status = None diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/boot_diagnostics_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/boot_diagnostics_py3.py deleted file mode 100644 index b64ae5b4adde..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/boot_diagnostics_py3.py +++ /dev/null @@ -1,37 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class BootDiagnostics(Model): - """Boot Diagnostics is a debugging feature which allows you to view Console - Output and Screenshot to diagnose VM status.

    You can easily view - the output of your console log.

    Azure also enables you to see a - screenshot of the VM from the hypervisor. - - :param enabled: Whether boot diagnostics should be enabled on the Virtual - Machine. - :type enabled: bool - :param storage_uri: Uri of the storage account to use for placing the - console output and screenshot. - :type storage_uri: str - """ - - _attribute_map = { - 'enabled': {'key': 'enabled', 'type': 'bool'}, - 'storage_uri': {'key': 'storageUri', 'type': 'str'}, - } - - def __init__(self, *, enabled: bool=None, storage_uri: str=None, **kwargs) -> None: - super(BootDiagnostics, self).__init__(**kwargs) - self.enabled = enabled - self.storage_uri = storage_uri diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/compute_operation_value.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/compute_operation_value.py deleted file mode 100644 index 525ef3bbb69a..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/compute_operation_value.py +++ /dev/null @@ -1,60 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ComputeOperationValue(Model): - """Describes the properties of a Compute Operation value. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar origin: The origin of the compute operation. - :vartype origin: str - :ivar name: The name of the compute operation. - :vartype name: str - :ivar operation: The display name of the compute operation. - :vartype operation: str - :ivar resource: The display name of the resource the operation applies to. - :vartype resource: str - :ivar description: The description of the operation. - :vartype description: str - :ivar provider: The resource provider for the operation. - :vartype provider: str - """ - - _validation = { - 'origin': {'readonly': True}, - 'name': {'readonly': True}, - 'operation': {'readonly': True}, - 'resource': {'readonly': True}, - 'description': {'readonly': True}, - 'provider': {'readonly': True}, - } - - _attribute_map = { - 'origin': {'key': 'origin', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'operation': {'key': 'display.operation', 'type': 'str'}, - 'resource': {'key': 'display.resource', 'type': 'str'}, - 'description': {'key': 'display.description', 'type': 'str'}, - 'provider': {'key': 'display.provider', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ComputeOperationValue, self).__init__(**kwargs) - self.origin = None - self.name = None - self.operation = None - self.resource = None - self.description = None - self.provider = None diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/compute_operation_value_paged.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/compute_operation_value_paged.py deleted file mode 100644 index 0735c0107487..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/compute_operation_value_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class ComputeOperationValuePaged(Paged): - """ - A paging container for iterating over a list of :class:`ComputeOperationValue ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[ComputeOperationValue]'} - } - - def __init__(self, *args, **kwargs): - - super(ComputeOperationValuePaged, self).__init__(*args, **kwargs) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/compute_operation_value_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/compute_operation_value_py3.py deleted file mode 100644 index 3c4388f312b9..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/compute_operation_value_py3.py +++ /dev/null @@ -1,60 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ComputeOperationValue(Model): - """Describes the properties of a Compute Operation value. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar origin: The origin of the compute operation. - :vartype origin: str - :ivar name: The name of the compute operation. - :vartype name: str - :ivar operation: The display name of the compute operation. - :vartype operation: str - :ivar resource: The display name of the resource the operation applies to. - :vartype resource: str - :ivar description: The description of the operation. - :vartype description: str - :ivar provider: The resource provider for the operation. - :vartype provider: str - """ - - _validation = { - 'origin': {'readonly': True}, - 'name': {'readonly': True}, - 'operation': {'readonly': True}, - 'resource': {'readonly': True}, - 'description': {'readonly': True}, - 'provider': {'readonly': True}, - } - - _attribute_map = { - 'origin': {'key': 'origin', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'operation': {'key': 'display.operation', 'type': 'str'}, - 'resource': {'key': 'display.resource', 'type': 'str'}, - 'description': {'key': 'display.description', 'type': 'str'}, - 'provider': {'key': 'display.provider', 'type': 'str'}, - } - - def __init__(self, **kwargs) -> None: - super(ComputeOperationValue, self).__init__(**kwargs) - self.origin = None - self.name = None - self.operation = None - self.resource = None - self.description = None - self.provider = None diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/creation_data.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/creation_data.py deleted file mode 100644 index a7abd1cfe8c8..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/creation_data.py +++ /dev/null @@ -1,58 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class CreationData(Model): - """Data used when creating a disk. - - All required parameters must be populated in order to send to Azure. - - :param create_option: Required. This enumerates the possible sources of a - disk's creation. Possible values include: 'Empty', 'Attach', 'FromImage', - 'Import', 'Copy', 'Restore' - :type create_option: str or - ~azure.mgmt.compute.v2018_04_01.models.DiskCreateOption - :param storage_account_id: If createOption is Import, the Azure Resource - Manager identifier of the storage account containing the blob to import as - a disk. Required only if the blob is in a different subscription - :type storage_account_id: str - :param image_reference: Disk source information. - :type image_reference: - ~azure.mgmt.compute.v2018_04_01.models.ImageDiskReference - :param source_uri: If createOption is Import, this is the URI of a blob to - be imported into a managed disk. - :type source_uri: str - :param source_resource_id: If createOption is Copy, this is the ARM id of - the source snapshot or disk. - :type source_resource_id: str - """ - - _validation = { - 'create_option': {'required': True}, - } - - _attribute_map = { - 'create_option': {'key': 'createOption', 'type': 'str'}, - 'storage_account_id': {'key': 'storageAccountId', 'type': 'str'}, - 'image_reference': {'key': 'imageReference', 'type': 'ImageDiskReference'}, - 'source_uri': {'key': 'sourceUri', 'type': 'str'}, - 'source_resource_id': {'key': 'sourceResourceId', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(CreationData, self).__init__(**kwargs) - self.create_option = kwargs.get('create_option', None) - self.storage_account_id = kwargs.get('storage_account_id', None) - self.image_reference = kwargs.get('image_reference', None) - self.source_uri = kwargs.get('source_uri', None) - self.source_resource_id = kwargs.get('source_resource_id', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/creation_data_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/creation_data_py3.py deleted file mode 100644 index c4486c7da81b..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/creation_data_py3.py +++ /dev/null @@ -1,58 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class CreationData(Model): - """Data used when creating a disk. - - All required parameters must be populated in order to send to Azure. - - :param create_option: Required. This enumerates the possible sources of a - disk's creation. Possible values include: 'Empty', 'Attach', 'FromImage', - 'Import', 'Copy', 'Restore' - :type create_option: str or - ~azure.mgmt.compute.v2018_04_01.models.DiskCreateOption - :param storage_account_id: If createOption is Import, the Azure Resource - Manager identifier of the storage account containing the blob to import as - a disk. Required only if the blob is in a different subscription - :type storage_account_id: str - :param image_reference: Disk source information. - :type image_reference: - ~azure.mgmt.compute.v2018_04_01.models.ImageDiskReference - :param source_uri: If createOption is Import, this is the URI of a blob to - be imported into a managed disk. - :type source_uri: str - :param source_resource_id: If createOption is Copy, this is the ARM id of - the source snapshot or disk. - :type source_resource_id: str - """ - - _validation = { - 'create_option': {'required': True}, - } - - _attribute_map = { - 'create_option': {'key': 'createOption', 'type': 'str'}, - 'storage_account_id': {'key': 'storageAccountId', 'type': 'str'}, - 'image_reference': {'key': 'imageReference', 'type': 'ImageDiskReference'}, - 'source_uri': {'key': 'sourceUri', 'type': 'str'}, - 'source_resource_id': {'key': 'sourceResourceId', 'type': 'str'}, - } - - def __init__(self, *, create_option, storage_account_id: str=None, image_reference=None, source_uri: str=None, source_resource_id: str=None, **kwargs) -> None: - super(CreationData, self).__init__(**kwargs) - self.create_option = create_option - self.storage_account_id = storage_account_id - self.image_reference = image_reference - self.source_uri = source_uri - self.source_resource_id = source_resource_id diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/data_disk.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/data_disk.py deleted file mode 100644 index 830e382d6e10..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/data_disk.py +++ /dev/null @@ -1,87 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class DataDisk(Model): - """Describes a data disk. - - All required parameters must be populated in order to send to Azure. - - :param lun: Required. Specifies the logical unit number of the data disk. - This value is used to identify data disks within the VM and therefore must - be unique for each data disk attached to a VM. - :type lun: int - :param name: The disk name. - :type name: str - :param vhd: The virtual hard disk. - :type vhd: ~azure.mgmt.compute.v2018_04_01.models.VirtualHardDisk - :param image: The source user image virtual hard disk. The virtual hard - disk will be copied before being attached to the virtual machine. If - SourceImage is provided, the destination virtual hard drive must not - exist. - :type image: ~azure.mgmt.compute.v2018_04_01.models.VirtualHardDisk - :param caching: Specifies the caching requirements.

    Possible - values are:

    **None**

    **ReadOnly**

    **ReadWrite** -

    Default: **None for Standard storage. ReadOnly for Premium - storage**. Possible values include: 'None', 'ReadOnly', 'ReadWrite' - :type caching: str or ~azure.mgmt.compute.v2018_04_01.models.CachingTypes - :param write_accelerator_enabled: Specifies whether writeAccelerator - should be enabled or disabled on the disk. - :type write_accelerator_enabled: bool - :param create_option: Required. Specifies how the virtual machine should - be created.

    Possible values are:

    **Attach** \\u2013 This - value is used when you are using a specialized disk to create the virtual - machine.

    **FromImage** \\u2013 This value is used when you are - using an image to create the virtual machine. If you are using a platform - image, you also use the imageReference element described above. If you are - using a marketplace image, you also use the plan element previously - described. Possible values include: 'FromImage', 'Empty', 'Attach' - :type create_option: str or - ~azure.mgmt.compute.v2018_04_01.models.DiskCreateOptionTypes - :param disk_size_gb: Specifies the size of an empty data disk in - gigabytes. This element can be used to overwrite the size of the disk in a - virtual machine image.

    This value cannot be larger than 1023 GB - :type disk_size_gb: int - :param managed_disk: The managed disk parameters. - :type managed_disk: - ~azure.mgmt.compute.v2018_04_01.models.ManagedDiskParameters - """ - - _validation = { - 'lun': {'required': True}, - 'create_option': {'required': True}, - } - - _attribute_map = { - 'lun': {'key': 'lun', 'type': 'int'}, - 'name': {'key': 'name', 'type': 'str'}, - 'vhd': {'key': 'vhd', 'type': 'VirtualHardDisk'}, - 'image': {'key': 'image', 'type': 'VirtualHardDisk'}, - 'caching': {'key': 'caching', 'type': 'CachingTypes'}, - 'write_accelerator_enabled': {'key': 'writeAcceleratorEnabled', 'type': 'bool'}, - 'create_option': {'key': 'createOption', 'type': 'str'}, - 'disk_size_gb': {'key': 'diskSizeGB', 'type': 'int'}, - 'managed_disk': {'key': 'managedDisk', 'type': 'ManagedDiskParameters'}, - } - - def __init__(self, **kwargs): - super(DataDisk, self).__init__(**kwargs) - self.lun = kwargs.get('lun', None) - self.name = kwargs.get('name', None) - self.vhd = kwargs.get('vhd', None) - self.image = kwargs.get('image', None) - self.caching = kwargs.get('caching', None) - self.write_accelerator_enabled = kwargs.get('write_accelerator_enabled', None) - self.create_option = kwargs.get('create_option', None) - self.disk_size_gb = kwargs.get('disk_size_gb', None) - self.managed_disk = kwargs.get('managed_disk', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/data_disk_image.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/data_disk_image.py deleted file mode 100644 index b5dbfcefb472..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/data_disk_image.py +++ /dev/null @@ -1,37 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class DataDiskImage(Model): - """Contains the data disk images information. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar lun: Specifies the logical unit number of the data disk. This value - is used to identify data disks within the VM and therefore must be unique - for each data disk attached to a VM. - :vartype lun: int - """ - - _validation = { - 'lun': {'readonly': True}, - } - - _attribute_map = { - 'lun': {'key': 'lun', 'type': 'int'}, - } - - def __init__(self, **kwargs): - super(DataDiskImage, self).__init__(**kwargs) - self.lun = None diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/data_disk_image_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/data_disk_image_py3.py deleted file mode 100644 index 8431a3988502..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/data_disk_image_py3.py +++ /dev/null @@ -1,37 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class DataDiskImage(Model): - """Contains the data disk images information. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar lun: Specifies the logical unit number of the data disk. This value - is used to identify data disks within the VM and therefore must be unique - for each data disk attached to a VM. - :vartype lun: int - """ - - _validation = { - 'lun': {'readonly': True}, - } - - _attribute_map = { - 'lun': {'key': 'lun', 'type': 'int'}, - } - - def __init__(self, **kwargs) -> None: - super(DataDiskImage, self).__init__(**kwargs) - self.lun = None diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/data_disk_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/data_disk_py3.py deleted file mode 100644 index 304ad2575077..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/data_disk_py3.py +++ /dev/null @@ -1,87 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class DataDisk(Model): - """Describes a data disk. - - All required parameters must be populated in order to send to Azure. - - :param lun: Required. Specifies the logical unit number of the data disk. - This value is used to identify data disks within the VM and therefore must - be unique for each data disk attached to a VM. - :type lun: int - :param name: The disk name. - :type name: str - :param vhd: The virtual hard disk. - :type vhd: ~azure.mgmt.compute.v2018_04_01.models.VirtualHardDisk - :param image: The source user image virtual hard disk. The virtual hard - disk will be copied before being attached to the virtual machine. If - SourceImage is provided, the destination virtual hard drive must not - exist. - :type image: ~azure.mgmt.compute.v2018_04_01.models.VirtualHardDisk - :param caching: Specifies the caching requirements.

    Possible - values are:

    **None**

    **ReadOnly**

    **ReadWrite** -

    Default: **None for Standard storage. ReadOnly for Premium - storage**. Possible values include: 'None', 'ReadOnly', 'ReadWrite' - :type caching: str or ~azure.mgmt.compute.v2018_04_01.models.CachingTypes - :param write_accelerator_enabled: Specifies whether writeAccelerator - should be enabled or disabled on the disk. - :type write_accelerator_enabled: bool - :param create_option: Required. Specifies how the virtual machine should - be created.

    Possible values are:

    **Attach** \\u2013 This - value is used when you are using a specialized disk to create the virtual - machine.

    **FromImage** \\u2013 This value is used when you are - using an image to create the virtual machine. If you are using a platform - image, you also use the imageReference element described above. If you are - using a marketplace image, you also use the plan element previously - described. Possible values include: 'FromImage', 'Empty', 'Attach' - :type create_option: str or - ~azure.mgmt.compute.v2018_04_01.models.DiskCreateOptionTypes - :param disk_size_gb: Specifies the size of an empty data disk in - gigabytes. This element can be used to overwrite the size of the disk in a - virtual machine image.

    This value cannot be larger than 1023 GB - :type disk_size_gb: int - :param managed_disk: The managed disk parameters. - :type managed_disk: - ~azure.mgmt.compute.v2018_04_01.models.ManagedDiskParameters - """ - - _validation = { - 'lun': {'required': True}, - 'create_option': {'required': True}, - } - - _attribute_map = { - 'lun': {'key': 'lun', 'type': 'int'}, - 'name': {'key': 'name', 'type': 'str'}, - 'vhd': {'key': 'vhd', 'type': 'VirtualHardDisk'}, - 'image': {'key': 'image', 'type': 'VirtualHardDisk'}, - 'caching': {'key': 'caching', 'type': 'CachingTypes'}, - 'write_accelerator_enabled': {'key': 'writeAcceleratorEnabled', 'type': 'bool'}, - 'create_option': {'key': 'createOption', 'type': 'str'}, - 'disk_size_gb': {'key': 'diskSizeGB', 'type': 'int'}, - 'managed_disk': {'key': 'managedDisk', 'type': 'ManagedDiskParameters'}, - } - - def __init__(self, *, lun: int, create_option, name: str=None, vhd=None, image=None, caching=None, write_accelerator_enabled: bool=None, disk_size_gb: int=None, managed_disk=None, **kwargs) -> None: - super(DataDisk, self).__init__(**kwargs) - self.lun = lun - self.name = name - self.vhd = vhd - self.image = image - self.caching = caching - self.write_accelerator_enabled = write_accelerator_enabled - self.create_option = create_option - self.disk_size_gb = disk_size_gb - self.managed_disk = managed_disk diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/diagnostics_profile.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/diagnostics_profile.py deleted file mode 100644 index f8751002a675..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/diagnostics_profile.py +++ /dev/null @@ -1,33 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class DiagnosticsProfile(Model): - """Specifies the boot diagnostic settings state.

    Minimum api-version: - 2015-06-15. - - :param boot_diagnostics: Boot Diagnostics is a debugging feature which - allows you to view Console Output and Screenshot to diagnose VM status. -

    You can easily view the output of your console log.

    - Azure also enables you to see a screenshot of the VM from the hypervisor. - :type boot_diagnostics: - ~azure.mgmt.compute.v2018_04_01.models.BootDiagnostics - """ - - _attribute_map = { - 'boot_diagnostics': {'key': 'bootDiagnostics', 'type': 'BootDiagnostics'}, - } - - def __init__(self, **kwargs): - super(DiagnosticsProfile, self).__init__(**kwargs) - self.boot_diagnostics = kwargs.get('boot_diagnostics', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/diagnostics_profile_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/diagnostics_profile_py3.py deleted file mode 100644 index 7fad1fcdb26e..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/diagnostics_profile_py3.py +++ /dev/null @@ -1,33 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class DiagnosticsProfile(Model): - """Specifies the boot diagnostic settings state.

    Minimum api-version: - 2015-06-15. - - :param boot_diagnostics: Boot Diagnostics is a debugging feature which - allows you to view Console Output and Screenshot to diagnose VM status. -

    You can easily view the output of your console log.

    - Azure also enables you to see a screenshot of the VM from the hypervisor. - :type boot_diagnostics: - ~azure.mgmt.compute.v2018_04_01.models.BootDiagnostics - """ - - _attribute_map = { - 'boot_diagnostics': {'key': 'bootDiagnostics', 'type': 'BootDiagnostics'}, - } - - def __init__(self, *, boot_diagnostics=None, **kwargs) -> None: - super(DiagnosticsProfile, self).__init__(**kwargs) - self.boot_diagnostics = boot_diagnostics diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/disk.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/disk.py deleted file mode 100644 index eed027e0056f..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/disk.py +++ /dev/null @@ -1,100 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource import Resource - - -class Disk(Resource): - """Disk resource. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource Id - :vartype id: str - :ivar name: Resource name - :vartype name: str - :ivar type: Resource type - :vartype type: str - :param location: Required. Resource location - :type location: str - :param tags: Resource tags - :type tags: dict[str, str] - :ivar managed_by: A relative URI containing the ID of the VM that has the - disk attached. - :vartype managed_by: str - :param sku: - :type sku: ~azure.mgmt.compute.v2018_04_01.models.DiskSku - :param zones: The Logical zone list for Disk. - :type zones: list[str] - :ivar time_created: The time when the disk was created. - :vartype time_created: datetime - :param os_type: The Operating System type. Possible values include: - 'Windows', 'Linux' - :type os_type: str or - ~azure.mgmt.compute.v2018_04_01.models.OperatingSystemTypes - :param creation_data: Required. Disk source information. CreationData - information cannot be changed after the disk has been created. - :type creation_data: ~azure.mgmt.compute.v2018_04_01.models.CreationData - :param disk_size_gb: If creationData.createOption is Empty, this field is - mandatory and it indicates the size of the VHD to create. If this field is - present for updates or creation with other options, it indicates a resize. - Resizes are only allowed if the disk is not attached to a running VM, and - can only increase the disk's size. - :type disk_size_gb: int - :param encryption_settings: Encryption settings for disk or snapshot - :type encryption_settings: - ~azure.mgmt.compute.v2018_04_01.models.EncryptionSettings - :ivar provisioning_state: The disk provisioning state. - :vartype provisioning_state: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - 'managed_by': {'readonly': True}, - 'time_created': {'readonly': True}, - 'creation_data': {'required': True}, - 'provisioning_state': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'managed_by': {'key': 'managedBy', 'type': 'str'}, - 'sku': {'key': 'sku', 'type': 'DiskSku'}, - 'zones': {'key': 'zones', 'type': '[str]'}, - 'time_created': {'key': 'properties.timeCreated', 'type': 'iso-8601'}, - 'os_type': {'key': 'properties.osType', 'type': 'OperatingSystemTypes'}, - 'creation_data': {'key': 'properties.creationData', 'type': 'CreationData'}, - 'disk_size_gb': {'key': 'properties.diskSizeGB', 'type': 'int'}, - 'encryption_settings': {'key': 'properties.encryptionSettings', 'type': 'EncryptionSettings'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(Disk, self).__init__(**kwargs) - self.managed_by = None - self.sku = kwargs.get('sku', None) - self.zones = kwargs.get('zones', None) - self.time_created = None - self.os_type = kwargs.get('os_type', None) - self.creation_data = kwargs.get('creation_data', None) - self.disk_size_gb = kwargs.get('disk_size_gb', None) - self.encryption_settings = kwargs.get('encryption_settings', None) - self.provisioning_state = None diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/disk_encryption_settings.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/disk_encryption_settings.py deleted file mode 100644 index 7fd550357d75..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/disk_encryption_settings.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class DiskEncryptionSettings(Model): - """Describes a Encryption Settings for a Disk. - - :param disk_encryption_key: Specifies the location of the disk encryption - key, which is a Key Vault Secret. - :type disk_encryption_key: - ~azure.mgmt.compute.v2018_04_01.models.KeyVaultSecretReference - :param key_encryption_key: Specifies the location of the key encryption - key in Key Vault. - :type key_encryption_key: - ~azure.mgmt.compute.v2018_04_01.models.KeyVaultKeyReference - :param enabled: Specifies whether disk encryption should be enabled on the - virtual machine. - :type enabled: bool - """ - - _attribute_map = { - 'disk_encryption_key': {'key': 'diskEncryptionKey', 'type': 'KeyVaultSecretReference'}, - 'key_encryption_key': {'key': 'keyEncryptionKey', 'type': 'KeyVaultKeyReference'}, - 'enabled': {'key': 'enabled', 'type': 'bool'}, - } - - def __init__(self, **kwargs): - super(DiskEncryptionSettings, self).__init__(**kwargs) - self.disk_encryption_key = kwargs.get('disk_encryption_key', None) - self.key_encryption_key = kwargs.get('key_encryption_key', None) - self.enabled = kwargs.get('enabled', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/disk_encryption_settings_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/disk_encryption_settings_py3.py deleted file mode 100644 index 380a0b7f1176..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/disk_encryption_settings_py3.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class DiskEncryptionSettings(Model): - """Describes a Encryption Settings for a Disk. - - :param disk_encryption_key: Specifies the location of the disk encryption - key, which is a Key Vault Secret. - :type disk_encryption_key: - ~azure.mgmt.compute.v2018_04_01.models.KeyVaultSecretReference - :param key_encryption_key: Specifies the location of the key encryption - key in Key Vault. - :type key_encryption_key: - ~azure.mgmt.compute.v2018_04_01.models.KeyVaultKeyReference - :param enabled: Specifies whether disk encryption should be enabled on the - virtual machine. - :type enabled: bool - """ - - _attribute_map = { - 'disk_encryption_key': {'key': 'diskEncryptionKey', 'type': 'KeyVaultSecretReference'}, - 'key_encryption_key': {'key': 'keyEncryptionKey', 'type': 'KeyVaultKeyReference'}, - 'enabled': {'key': 'enabled', 'type': 'bool'}, - } - - def __init__(self, *, disk_encryption_key=None, key_encryption_key=None, enabled: bool=None, **kwargs) -> None: - super(DiskEncryptionSettings, self).__init__(**kwargs) - self.disk_encryption_key = disk_encryption_key - self.key_encryption_key = key_encryption_key - self.enabled = enabled diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/disk_instance_view.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/disk_instance_view.py deleted file mode 100644 index 9a040fd5739b..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/disk_instance_view.py +++ /dev/null @@ -1,39 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class DiskInstanceView(Model): - """The instance view of the disk. - - :param name: The disk name. - :type name: str - :param encryption_settings: Specifies the encryption settings for the OS - Disk.

    Minimum api-version: 2015-06-15 - :type encryption_settings: - list[~azure.mgmt.compute.v2018_04_01.models.DiskEncryptionSettings] - :param statuses: The resource status information. - :type statuses: - list[~azure.mgmt.compute.v2018_04_01.models.InstanceViewStatus] - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'encryption_settings': {'key': 'encryptionSettings', 'type': '[DiskEncryptionSettings]'}, - 'statuses': {'key': 'statuses', 'type': '[InstanceViewStatus]'}, - } - - def __init__(self, **kwargs): - super(DiskInstanceView, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.encryption_settings = kwargs.get('encryption_settings', None) - self.statuses = kwargs.get('statuses', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/disk_instance_view_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/disk_instance_view_py3.py deleted file mode 100644 index b9583371ba8b..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/disk_instance_view_py3.py +++ /dev/null @@ -1,39 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class DiskInstanceView(Model): - """The instance view of the disk. - - :param name: The disk name. - :type name: str - :param encryption_settings: Specifies the encryption settings for the OS - Disk.

    Minimum api-version: 2015-06-15 - :type encryption_settings: - list[~azure.mgmt.compute.v2018_04_01.models.DiskEncryptionSettings] - :param statuses: The resource status information. - :type statuses: - list[~azure.mgmt.compute.v2018_04_01.models.InstanceViewStatus] - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'encryption_settings': {'key': 'encryptionSettings', 'type': '[DiskEncryptionSettings]'}, - 'statuses': {'key': 'statuses', 'type': '[InstanceViewStatus]'}, - } - - def __init__(self, *, name: str=None, encryption_settings=None, statuses=None, **kwargs) -> None: - super(DiskInstanceView, self).__init__(**kwargs) - self.name = name - self.encryption_settings = encryption_settings - self.statuses = statuses diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/disk_paged.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/disk_paged.py deleted file mode 100644 index aa6febc82f16..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/disk_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class DiskPaged(Paged): - """ - A paging container for iterating over a list of :class:`Disk ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[Disk]'} - } - - def __init__(self, *args, **kwargs): - - super(DiskPaged, self).__init__(*args, **kwargs) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/disk_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/disk_py3.py deleted file mode 100644 index 8fa2d4b9828d..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/disk_py3.py +++ /dev/null @@ -1,100 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource_py3 import Resource - - -class Disk(Resource): - """Disk resource. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource Id - :vartype id: str - :ivar name: Resource name - :vartype name: str - :ivar type: Resource type - :vartype type: str - :param location: Required. Resource location - :type location: str - :param tags: Resource tags - :type tags: dict[str, str] - :ivar managed_by: A relative URI containing the ID of the VM that has the - disk attached. - :vartype managed_by: str - :param sku: - :type sku: ~azure.mgmt.compute.v2018_04_01.models.DiskSku - :param zones: The Logical zone list for Disk. - :type zones: list[str] - :ivar time_created: The time when the disk was created. - :vartype time_created: datetime - :param os_type: The Operating System type. Possible values include: - 'Windows', 'Linux' - :type os_type: str or - ~azure.mgmt.compute.v2018_04_01.models.OperatingSystemTypes - :param creation_data: Required. Disk source information. CreationData - information cannot be changed after the disk has been created. - :type creation_data: ~azure.mgmt.compute.v2018_04_01.models.CreationData - :param disk_size_gb: If creationData.createOption is Empty, this field is - mandatory and it indicates the size of the VHD to create. If this field is - present for updates or creation with other options, it indicates a resize. - Resizes are only allowed if the disk is not attached to a running VM, and - can only increase the disk's size. - :type disk_size_gb: int - :param encryption_settings: Encryption settings for disk or snapshot - :type encryption_settings: - ~azure.mgmt.compute.v2018_04_01.models.EncryptionSettings - :ivar provisioning_state: The disk provisioning state. - :vartype provisioning_state: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - 'managed_by': {'readonly': True}, - 'time_created': {'readonly': True}, - 'creation_data': {'required': True}, - 'provisioning_state': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'managed_by': {'key': 'managedBy', 'type': 'str'}, - 'sku': {'key': 'sku', 'type': 'DiskSku'}, - 'zones': {'key': 'zones', 'type': '[str]'}, - 'time_created': {'key': 'properties.timeCreated', 'type': 'iso-8601'}, - 'os_type': {'key': 'properties.osType', 'type': 'OperatingSystemTypes'}, - 'creation_data': {'key': 'properties.creationData', 'type': 'CreationData'}, - 'disk_size_gb': {'key': 'properties.diskSizeGB', 'type': 'int'}, - 'encryption_settings': {'key': 'properties.encryptionSettings', 'type': 'EncryptionSettings'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - } - - def __init__(self, *, location: str, creation_data, tags=None, sku=None, zones=None, os_type=None, disk_size_gb: int=None, encryption_settings=None, **kwargs) -> None: - super(Disk, self).__init__(location=location, tags=tags, **kwargs) - self.managed_by = None - self.sku = sku - self.zones = zones - self.time_created = None - self.os_type = os_type - self.creation_data = creation_data - self.disk_size_gb = disk_size_gb - self.encryption_settings = encryption_settings - self.provisioning_state = None diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/disk_sku.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/disk_sku.py deleted file mode 100644 index 1123feabd42c..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/disk_sku.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class DiskSku(Model): - """The disks sku name. Can be Standard_LRS, Premium_LRS, or StandardSSD_LRS. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :param name: The sku name. Possible values include: 'Standard_LRS', - 'Premium_LRS', 'StandardSSD_LRS' - :type name: str or - ~azure.mgmt.compute.v2018_04_01.models.StorageAccountTypes - :ivar tier: The sku tier. Default value: "Standard" . - :vartype tier: str - """ - - _validation = { - 'tier': {'readonly': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'tier': {'key': 'tier', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(DiskSku, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.tier = None diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/disk_sku_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/disk_sku_py3.py deleted file mode 100644 index df30d24c240a..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/disk_sku_py3.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class DiskSku(Model): - """The disks sku name. Can be Standard_LRS, Premium_LRS, or StandardSSD_LRS. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :param name: The sku name. Possible values include: 'Standard_LRS', - 'Premium_LRS', 'StandardSSD_LRS' - :type name: str or - ~azure.mgmt.compute.v2018_04_01.models.StorageAccountTypes - :ivar tier: The sku tier. Default value: "Standard" . - :vartype tier: str - """ - - _validation = { - 'tier': {'readonly': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'tier': {'key': 'tier', 'type': 'str'}, - } - - def __init__(self, *, name=None, **kwargs) -> None: - super(DiskSku, self).__init__(**kwargs) - self.name = name - self.tier = None diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/disk_update.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/disk_update.py deleted file mode 100644 index 3ca75fec3871..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/disk_update.py +++ /dev/null @@ -1,51 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class DiskUpdate(Model): - """Disk update resource. - - :param os_type: the Operating System type. Possible values include: - 'Windows', 'Linux' - :type os_type: str or - ~azure.mgmt.compute.v2018_04_01.models.OperatingSystemTypes - :param disk_size_gb: If creationData.createOption is Empty, this field is - mandatory and it indicates the size of the VHD to create. If this field is - present for updates or creation with other options, it indicates a resize. - Resizes are only allowed if the disk is not attached to a running VM, and - can only increase the disk's size. - :type disk_size_gb: int - :param encryption_settings: Encryption settings for disk or snapshot - :type encryption_settings: - ~azure.mgmt.compute.v2018_04_01.models.EncryptionSettings - :param tags: Resource tags - :type tags: dict[str, str] - :param sku: - :type sku: ~azure.mgmt.compute.v2018_04_01.models.DiskSku - """ - - _attribute_map = { - 'os_type': {'key': 'properties.osType', 'type': 'OperatingSystemTypes'}, - 'disk_size_gb': {'key': 'properties.diskSizeGB', 'type': 'int'}, - 'encryption_settings': {'key': 'properties.encryptionSettings', 'type': 'EncryptionSettings'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'sku': {'key': 'sku', 'type': 'DiskSku'}, - } - - def __init__(self, **kwargs): - super(DiskUpdate, self).__init__(**kwargs) - self.os_type = kwargs.get('os_type', None) - self.disk_size_gb = kwargs.get('disk_size_gb', None) - self.encryption_settings = kwargs.get('encryption_settings', None) - self.tags = kwargs.get('tags', None) - self.sku = kwargs.get('sku', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/disk_update_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/disk_update_py3.py deleted file mode 100644 index 407d553cff9e..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/disk_update_py3.py +++ /dev/null @@ -1,51 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class DiskUpdate(Model): - """Disk update resource. - - :param os_type: the Operating System type. Possible values include: - 'Windows', 'Linux' - :type os_type: str or - ~azure.mgmt.compute.v2018_04_01.models.OperatingSystemTypes - :param disk_size_gb: If creationData.createOption is Empty, this field is - mandatory and it indicates the size of the VHD to create. If this field is - present for updates or creation with other options, it indicates a resize. - Resizes are only allowed if the disk is not attached to a running VM, and - can only increase the disk's size. - :type disk_size_gb: int - :param encryption_settings: Encryption settings for disk or snapshot - :type encryption_settings: - ~azure.mgmt.compute.v2018_04_01.models.EncryptionSettings - :param tags: Resource tags - :type tags: dict[str, str] - :param sku: - :type sku: ~azure.mgmt.compute.v2018_04_01.models.DiskSku - """ - - _attribute_map = { - 'os_type': {'key': 'properties.osType', 'type': 'OperatingSystemTypes'}, - 'disk_size_gb': {'key': 'properties.diskSizeGB', 'type': 'int'}, - 'encryption_settings': {'key': 'properties.encryptionSettings', 'type': 'EncryptionSettings'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'sku': {'key': 'sku', 'type': 'DiskSku'}, - } - - def __init__(self, *, os_type=None, disk_size_gb: int=None, encryption_settings=None, tags=None, sku=None, **kwargs) -> None: - super(DiskUpdate, self).__init__(**kwargs) - self.os_type = os_type - self.disk_size_gb = disk_size_gb - self.encryption_settings = encryption_settings - self.tags = tags - self.sku = sku diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/encryption_settings.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/encryption_settings.py deleted file mode 100644 index 5a17496c81b2..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/encryption_settings.py +++ /dev/null @@ -1,44 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class EncryptionSettings(Model): - """Encryption settings for disk or snapshot. - - :param enabled: Set this flag to true and provide DiskEncryptionKey and - optional KeyEncryptionKey to enable encryption. Set this flag to false and - remove DiskEncryptionKey and KeyEncryptionKey to disable encryption. If - EncryptionSettings is null in the request object, the existing settings - remain unchanged. - :type enabled: bool - :param disk_encryption_key: Key Vault Secret Url and vault id of the disk - encryption key - :type disk_encryption_key: - ~azure.mgmt.compute.v2018_04_01.models.KeyVaultAndSecretReference - :param key_encryption_key: Key Vault Key Url and vault id of the key - encryption key - :type key_encryption_key: - ~azure.mgmt.compute.v2018_04_01.models.KeyVaultAndKeyReference - """ - - _attribute_map = { - 'enabled': {'key': 'enabled', 'type': 'bool'}, - 'disk_encryption_key': {'key': 'diskEncryptionKey', 'type': 'KeyVaultAndSecretReference'}, - 'key_encryption_key': {'key': 'keyEncryptionKey', 'type': 'KeyVaultAndKeyReference'}, - } - - def __init__(self, **kwargs): - super(EncryptionSettings, self).__init__(**kwargs) - self.enabled = kwargs.get('enabled', None) - self.disk_encryption_key = kwargs.get('disk_encryption_key', None) - self.key_encryption_key = kwargs.get('key_encryption_key', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/encryption_settings_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/encryption_settings_py3.py deleted file mode 100644 index f3ac5a66cb84..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/encryption_settings_py3.py +++ /dev/null @@ -1,44 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class EncryptionSettings(Model): - """Encryption settings for disk or snapshot. - - :param enabled: Set this flag to true and provide DiskEncryptionKey and - optional KeyEncryptionKey to enable encryption. Set this flag to false and - remove DiskEncryptionKey and KeyEncryptionKey to disable encryption. If - EncryptionSettings is null in the request object, the existing settings - remain unchanged. - :type enabled: bool - :param disk_encryption_key: Key Vault Secret Url and vault id of the disk - encryption key - :type disk_encryption_key: - ~azure.mgmt.compute.v2018_04_01.models.KeyVaultAndSecretReference - :param key_encryption_key: Key Vault Key Url and vault id of the key - encryption key - :type key_encryption_key: - ~azure.mgmt.compute.v2018_04_01.models.KeyVaultAndKeyReference - """ - - _attribute_map = { - 'enabled': {'key': 'enabled', 'type': 'bool'}, - 'disk_encryption_key': {'key': 'diskEncryptionKey', 'type': 'KeyVaultAndSecretReference'}, - 'key_encryption_key': {'key': 'keyEncryptionKey', 'type': 'KeyVaultAndKeyReference'}, - } - - def __init__(self, *, enabled: bool=None, disk_encryption_key=None, key_encryption_key=None, **kwargs) -> None: - super(EncryptionSettings, self).__init__(**kwargs) - self.enabled = enabled - self.disk_encryption_key = disk_encryption_key - self.key_encryption_key = key_encryption_key diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/grant_access_data.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/grant_access_data.py deleted file mode 100644 index 30f3229efa0b..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/grant_access_data.py +++ /dev/null @@ -1,40 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class GrantAccessData(Model): - """Data used for requesting a SAS. - - All required parameters must be populated in order to send to Azure. - - :param access: Required. Possible values include: 'None', 'Read' - :type access: str or ~azure.mgmt.compute.v2018_04_01.models.AccessLevel - :param duration_in_seconds: Required. Time duration in seconds until the - SAS access expires. - :type duration_in_seconds: int - """ - - _validation = { - 'access': {'required': True}, - 'duration_in_seconds': {'required': True}, - } - - _attribute_map = { - 'access': {'key': 'access', 'type': 'str'}, - 'duration_in_seconds': {'key': 'durationInSeconds', 'type': 'int'}, - } - - def __init__(self, **kwargs): - super(GrantAccessData, self).__init__(**kwargs) - self.access = kwargs.get('access', None) - self.duration_in_seconds = kwargs.get('duration_in_seconds', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/grant_access_data_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/grant_access_data_py3.py deleted file mode 100644 index 0e6cf91e26cf..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/grant_access_data_py3.py +++ /dev/null @@ -1,40 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class GrantAccessData(Model): - """Data used for requesting a SAS. - - All required parameters must be populated in order to send to Azure. - - :param access: Required. Possible values include: 'None', 'Read' - :type access: str or ~azure.mgmt.compute.v2018_04_01.models.AccessLevel - :param duration_in_seconds: Required. Time duration in seconds until the - SAS access expires. - :type duration_in_seconds: int - """ - - _validation = { - 'access': {'required': True}, - 'duration_in_seconds': {'required': True}, - } - - _attribute_map = { - 'access': {'key': 'access', 'type': 'str'}, - 'duration_in_seconds': {'key': 'durationInSeconds', 'type': 'int'}, - } - - def __init__(self, *, access, duration_in_seconds: int, **kwargs) -> None: - super(GrantAccessData, self).__init__(**kwargs) - self.access = access - self.duration_in_seconds = duration_in_seconds diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/hardware_profile.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/hardware_profile.py deleted file mode 100644 index c9f1db70f257..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/hardware_profile.py +++ /dev/null @@ -1,85 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class HardwareProfile(Model): - """Specifies the hardware settings for the virtual machine. - - :param vm_size: Specifies the size of the virtual machine. For more - information about virtual machine sizes, see [Sizes for virtual - machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-sizes?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). -

    The available VM sizes depend on region and availability set. For - a list of available sizes use these APIs:

    [List all available - virtual machine sizes in an availability - set](https://docs.microsoft.com/rest/api/compute/availabilitysets/listavailablesizes) -

    [List all available virtual machine sizes in a - region](https://docs.microsoft.com/rest/api/compute/virtualmachinesizes/list) -

    [List all available virtual machine sizes for - resizing](https://docs.microsoft.com/rest/api/compute/virtualmachines/listavailablesizes). - Possible values include: 'Basic_A0', 'Basic_A1', 'Basic_A2', 'Basic_A3', - 'Basic_A4', 'Standard_A0', 'Standard_A1', 'Standard_A2', 'Standard_A3', - 'Standard_A4', 'Standard_A5', 'Standard_A6', 'Standard_A7', 'Standard_A8', - 'Standard_A9', 'Standard_A10', 'Standard_A11', 'Standard_A1_v2', - 'Standard_A2_v2', 'Standard_A4_v2', 'Standard_A8_v2', 'Standard_A2m_v2', - 'Standard_A4m_v2', 'Standard_A8m_v2', 'Standard_B1s', 'Standard_B1ms', - 'Standard_B2s', 'Standard_B2ms', 'Standard_B4ms', 'Standard_B8ms', - 'Standard_D1', 'Standard_D2', 'Standard_D3', 'Standard_D4', - 'Standard_D11', 'Standard_D12', 'Standard_D13', 'Standard_D14', - 'Standard_D1_v2', 'Standard_D2_v2', 'Standard_D3_v2', 'Standard_D4_v2', - 'Standard_D5_v2', 'Standard_D2_v3', 'Standard_D4_v3', 'Standard_D8_v3', - 'Standard_D16_v3', 'Standard_D32_v3', 'Standard_D64_v3', - 'Standard_D2s_v3', 'Standard_D4s_v3', 'Standard_D8s_v3', - 'Standard_D16s_v3', 'Standard_D32s_v3', 'Standard_D64s_v3', - 'Standard_D11_v2', 'Standard_D12_v2', 'Standard_D13_v2', - 'Standard_D14_v2', 'Standard_D15_v2', 'Standard_DS1', 'Standard_DS2', - 'Standard_DS3', 'Standard_DS4', 'Standard_DS11', 'Standard_DS12', - 'Standard_DS13', 'Standard_DS14', 'Standard_DS1_v2', 'Standard_DS2_v2', - 'Standard_DS3_v2', 'Standard_DS4_v2', 'Standard_DS5_v2', - 'Standard_DS11_v2', 'Standard_DS12_v2', 'Standard_DS13_v2', - 'Standard_DS14_v2', 'Standard_DS15_v2', 'Standard_DS13-4_v2', - 'Standard_DS13-2_v2', 'Standard_DS14-8_v2', 'Standard_DS14-4_v2', - 'Standard_E2_v3', 'Standard_E4_v3', 'Standard_E8_v3', 'Standard_E16_v3', - 'Standard_E32_v3', 'Standard_E64_v3', 'Standard_E2s_v3', - 'Standard_E4s_v3', 'Standard_E8s_v3', 'Standard_E16s_v3', - 'Standard_E32s_v3', 'Standard_E64s_v3', 'Standard_E32-16_v3', - 'Standard_E32-8s_v3', 'Standard_E64-32s_v3', 'Standard_E64-16s_v3', - 'Standard_F1', 'Standard_F2', 'Standard_F4', 'Standard_F8', - 'Standard_F16', 'Standard_F1s', 'Standard_F2s', 'Standard_F4s', - 'Standard_F8s', 'Standard_F16s', 'Standard_F2s_v2', 'Standard_F4s_v2', - 'Standard_F8s_v2', 'Standard_F16s_v2', 'Standard_F32s_v2', - 'Standard_F64s_v2', 'Standard_F72s_v2', 'Standard_G1', 'Standard_G2', - 'Standard_G3', 'Standard_G4', 'Standard_G5', 'Standard_GS1', - 'Standard_GS2', 'Standard_GS3', 'Standard_GS4', 'Standard_GS5', - 'Standard_GS4-8', 'Standard_GS4-4', 'Standard_GS5-16', 'Standard_GS5-8', - 'Standard_H8', 'Standard_H16', 'Standard_H8m', 'Standard_H16m', - 'Standard_H16r', 'Standard_H16mr', 'Standard_L4s', 'Standard_L8s', - 'Standard_L16s', 'Standard_L32s', 'Standard_M64s', 'Standard_M64ms', - 'Standard_M128s', 'Standard_M128ms', 'Standard_M64-32ms', - 'Standard_M64-16ms', 'Standard_M128-64ms', 'Standard_M128-32ms', - 'Standard_NC6', 'Standard_NC12', 'Standard_NC24', 'Standard_NC24r', - 'Standard_NC6s_v2', 'Standard_NC12s_v2', 'Standard_NC24s_v2', - 'Standard_NC24rs_v2', 'Standard_NC6s_v3', 'Standard_NC12s_v3', - 'Standard_NC24s_v3', 'Standard_NC24rs_v3', 'Standard_ND6s', - 'Standard_ND12s', 'Standard_ND24s', 'Standard_ND24rs', 'Standard_NV6', - 'Standard_NV12', 'Standard_NV24' - :type vm_size: str or - ~azure.mgmt.compute.v2018_04_01.models.VirtualMachineSizeTypes - """ - - _attribute_map = { - 'vm_size': {'key': 'vmSize', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(HardwareProfile, self).__init__(**kwargs) - self.vm_size = kwargs.get('vm_size', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/hardware_profile_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/hardware_profile_py3.py deleted file mode 100644 index a9f8ba14df0e..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/hardware_profile_py3.py +++ /dev/null @@ -1,85 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class HardwareProfile(Model): - """Specifies the hardware settings for the virtual machine. - - :param vm_size: Specifies the size of the virtual machine. For more - information about virtual machine sizes, see [Sizes for virtual - machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-sizes?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). -

    The available VM sizes depend on region and availability set. For - a list of available sizes use these APIs:

    [List all available - virtual machine sizes in an availability - set](https://docs.microsoft.com/rest/api/compute/availabilitysets/listavailablesizes) -

    [List all available virtual machine sizes in a - region](https://docs.microsoft.com/rest/api/compute/virtualmachinesizes/list) -

    [List all available virtual machine sizes for - resizing](https://docs.microsoft.com/rest/api/compute/virtualmachines/listavailablesizes). - Possible values include: 'Basic_A0', 'Basic_A1', 'Basic_A2', 'Basic_A3', - 'Basic_A4', 'Standard_A0', 'Standard_A1', 'Standard_A2', 'Standard_A3', - 'Standard_A4', 'Standard_A5', 'Standard_A6', 'Standard_A7', 'Standard_A8', - 'Standard_A9', 'Standard_A10', 'Standard_A11', 'Standard_A1_v2', - 'Standard_A2_v2', 'Standard_A4_v2', 'Standard_A8_v2', 'Standard_A2m_v2', - 'Standard_A4m_v2', 'Standard_A8m_v2', 'Standard_B1s', 'Standard_B1ms', - 'Standard_B2s', 'Standard_B2ms', 'Standard_B4ms', 'Standard_B8ms', - 'Standard_D1', 'Standard_D2', 'Standard_D3', 'Standard_D4', - 'Standard_D11', 'Standard_D12', 'Standard_D13', 'Standard_D14', - 'Standard_D1_v2', 'Standard_D2_v2', 'Standard_D3_v2', 'Standard_D4_v2', - 'Standard_D5_v2', 'Standard_D2_v3', 'Standard_D4_v3', 'Standard_D8_v3', - 'Standard_D16_v3', 'Standard_D32_v3', 'Standard_D64_v3', - 'Standard_D2s_v3', 'Standard_D4s_v3', 'Standard_D8s_v3', - 'Standard_D16s_v3', 'Standard_D32s_v3', 'Standard_D64s_v3', - 'Standard_D11_v2', 'Standard_D12_v2', 'Standard_D13_v2', - 'Standard_D14_v2', 'Standard_D15_v2', 'Standard_DS1', 'Standard_DS2', - 'Standard_DS3', 'Standard_DS4', 'Standard_DS11', 'Standard_DS12', - 'Standard_DS13', 'Standard_DS14', 'Standard_DS1_v2', 'Standard_DS2_v2', - 'Standard_DS3_v2', 'Standard_DS4_v2', 'Standard_DS5_v2', - 'Standard_DS11_v2', 'Standard_DS12_v2', 'Standard_DS13_v2', - 'Standard_DS14_v2', 'Standard_DS15_v2', 'Standard_DS13-4_v2', - 'Standard_DS13-2_v2', 'Standard_DS14-8_v2', 'Standard_DS14-4_v2', - 'Standard_E2_v3', 'Standard_E4_v3', 'Standard_E8_v3', 'Standard_E16_v3', - 'Standard_E32_v3', 'Standard_E64_v3', 'Standard_E2s_v3', - 'Standard_E4s_v3', 'Standard_E8s_v3', 'Standard_E16s_v3', - 'Standard_E32s_v3', 'Standard_E64s_v3', 'Standard_E32-16_v3', - 'Standard_E32-8s_v3', 'Standard_E64-32s_v3', 'Standard_E64-16s_v3', - 'Standard_F1', 'Standard_F2', 'Standard_F4', 'Standard_F8', - 'Standard_F16', 'Standard_F1s', 'Standard_F2s', 'Standard_F4s', - 'Standard_F8s', 'Standard_F16s', 'Standard_F2s_v2', 'Standard_F4s_v2', - 'Standard_F8s_v2', 'Standard_F16s_v2', 'Standard_F32s_v2', - 'Standard_F64s_v2', 'Standard_F72s_v2', 'Standard_G1', 'Standard_G2', - 'Standard_G3', 'Standard_G4', 'Standard_G5', 'Standard_GS1', - 'Standard_GS2', 'Standard_GS3', 'Standard_GS4', 'Standard_GS5', - 'Standard_GS4-8', 'Standard_GS4-4', 'Standard_GS5-16', 'Standard_GS5-8', - 'Standard_H8', 'Standard_H16', 'Standard_H8m', 'Standard_H16m', - 'Standard_H16r', 'Standard_H16mr', 'Standard_L4s', 'Standard_L8s', - 'Standard_L16s', 'Standard_L32s', 'Standard_M64s', 'Standard_M64ms', - 'Standard_M128s', 'Standard_M128ms', 'Standard_M64-32ms', - 'Standard_M64-16ms', 'Standard_M128-64ms', 'Standard_M128-32ms', - 'Standard_NC6', 'Standard_NC12', 'Standard_NC24', 'Standard_NC24r', - 'Standard_NC6s_v2', 'Standard_NC12s_v2', 'Standard_NC24s_v2', - 'Standard_NC24rs_v2', 'Standard_NC6s_v3', 'Standard_NC12s_v3', - 'Standard_NC24s_v3', 'Standard_NC24rs_v3', 'Standard_ND6s', - 'Standard_ND12s', 'Standard_ND24s', 'Standard_ND24rs', 'Standard_NV6', - 'Standard_NV12', 'Standard_NV24' - :type vm_size: str or - ~azure.mgmt.compute.v2018_04_01.models.VirtualMachineSizeTypes - """ - - _attribute_map = { - 'vm_size': {'key': 'vmSize', 'type': 'str'}, - } - - def __init__(self, *, vm_size=None, **kwargs) -> None: - super(HardwareProfile, self).__init__(**kwargs) - self.vm_size = vm_size diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/image.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/image.py deleted file mode 100644 index d3a1f84f255c..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/image.py +++ /dev/null @@ -1,70 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource import Resource - - -class Image(Resource): - """The source user image virtual hard disk. The virtual hard disk will be - copied before being attached to the virtual machine. If SourceImage is - provided, the destination virtual hard drive must not exist. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource Id - :vartype id: str - :ivar name: Resource name - :vartype name: str - :ivar type: Resource type - :vartype type: str - :param location: Required. Resource location - :type location: str - :param tags: Resource tags - :type tags: dict[str, str] - :param source_virtual_machine: The source virtual machine from which Image - is created. - :type source_virtual_machine: - ~azure.mgmt.compute.v2018_04_01.models.SubResource - :param storage_profile: Specifies the storage settings for the virtual - machine disks. - :type storage_profile: - ~azure.mgmt.compute.v2018_04_01.models.ImageStorageProfile - :ivar provisioning_state: The provisioning state. - :vartype provisioning_state: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - 'provisioning_state': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'source_virtual_machine': {'key': 'properties.sourceVirtualMachine', 'type': 'SubResource'}, - 'storage_profile': {'key': 'properties.storageProfile', 'type': 'ImageStorageProfile'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(Image, self).__init__(**kwargs) - self.source_virtual_machine = kwargs.get('source_virtual_machine', None) - self.storage_profile = kwargs.get('storage_profile', None) - self.provisioning_state = None diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/image_data_disk.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/image_data_disk.py deleted file mode 100644 index 3d96a893bb63..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/image_data_disk.py +++ /dev/null @@ -1,69 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ImageDataDisk(Model): - """Describes a data disk. - - All required parameters must be populated in order to send to Azure. - - :param lun: Required. Specifies the logical unit number of the data disk. - This value is used to identify data disks within the VM and therefore must - be unique for each data disk attached to a VM. - :type lun: int - :param snapshot: The snapshot. - :type snapshot: ~azure.mgmt.compute.v2018_04_01.models.SubResource - :param managed_disk: The managedDisk. - :type managed_disk: ~azure.mgmt.compute.v2018_04_01.models.SubResource - :param blob_uri: The Virtual Hard Disk. - :type blob_uri: str - :param caching: Specifies the caching requirements.

    Possible - values are:

    **None**

    **ReadOnly**

    **ReadWrite** -

    Default: **None for Standard storage. ReadOnly for Premium - storage**. Possible values include: 'None', 'ReadOnly', 'ReadWrite' - :type caching: str or ~azure.mgmt.compute.v2018_04_01.models.CachingTypes - :param disk_size_gb: Specifies the size of empty data disks in gigabytes. - This element can be used to overwrite the name of the disk in a virtual - machine image.

    This value cannot be larger than 1023 GB - :type disk_size_gb: int - :param storage_account_type: Specifies the storage account type for the - managed disk. Possible values are: Standard_LRS, Premium_LRS, and - StandardSSD_LRS. Possible values include: 'Standard_LRS', 'Premium_LRS', - 'StandardSSD_LRS' - :type storage_account_type: str or - ~azure.mgmt.compute.v2018_04_01.models.StorageAccountTypes - """ - - _validation = { - 'lun': {'required': True}, - } - - _attribute_map = { - 'lun': {'key': 'lun', 'type': 'int'}, - 'snapshot': {'key': 'snapshot', 'type': 'SubResource'}, - 'managed_disk': {'key': 'managedDisk', 'type': 'SubResource'}, - 'blob_uri': {'key': 'blobUri', 'type': 'str'}, - 'caching': {'key': 'caching', 'type': 'CachingTypes'}, - 'disk_size_gb': {'key': 'diskSizeGB', 'type': 'int'}, - 'storage_account_type': {'key': 'storageAccountType', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ImageDataDisk, self).__init__(**kwargs) - self.lun = kwargs.get('lun', None) - self.snapshot = kwargs.get('snapshot', None) - self.managed_disk = kwargs.get('managed_disk', None) - self.blob_uri = kwargs.get('blob_uri', None) - self.caching = kwargs.get('caching', None) - self.disk_size_gb = kwargs.get('disk_size_gb', None) - self.storage_account_type = kwargs.get('storage_account_type', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/image_data_disk_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/image_data_disk_py3.py deleted file mode 100644 index d7262b81ba6b..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/image_data_disk_py3.py +++ /dev/null @@ -1,69 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ImageDataDisk(Model): - """Describes a data disk. - - All required parameters must be populated in order to send to Azure. - - :param lun: Required. Specifies the logical unit number of the data disk. - This value is used to identify data disks within the VM and therefore must - be unique for each data disk attached to a VM. - :type lun: int - :param snapshot: The snapshot. - :type snapshot: ~azure.mgmt.compute.v2018_04_01.models.SubResource - :param managed_disk: The managedDisk. - :type managed_disk: ~azure.mgmt.compute.v2018_04_01.models.SubResource - :param blob_uri: The Virtual Hard Disk. - :type blob_uri: str - :param caching: Specifies the caching requirements.

    Possible - values are:

    **None**

    **ReadOnly**

    **ReadWrite** -

    Default: **None for Standard storage. ReadOnly for Premium - storage**. Possible values include: 'None', 'ReadOnly', 'ReadWrite' - :type caching: str or ~azure.mgmt.compute.v2018_04_01.models.CachingTypes - :param disk_size_gb: Specifies the size of empty data disks in gigabytes. - This element can be used to overwrite the name of the disk in a virtual - machine image.

    This value cannot be larger than 1023 GB - :type disk_size_gb: int - :param storage_account_type: Specifies the storage account type for the - managed disk. Possible values are: Standard_LRS, Premium_LRS, and - StandardSSD_LRS. Possible values include: 'Standard_LRS', 'Premium_LRS', - 'StandardSSD_LRS' - :type storage_account_type: str or - ~azure.mgmt.compute.v2018_04_01.models.StorageAccountTypes - """ - - _validation = { - 'lun': {'required': True}, - } - - _attribute_map = { - 'lun': {'key': 'lun', 'type': 'int'}, - 'snapshot': {'key': 'snapshot', 'type': 'SubResource'}, - 'managed_disk': {'key': 'managedDisk', 'type': 'SubResource'}, - 'blob_uri': {'key': 'blobUri', 'type': 'str'}, - 'caching': {'key': 'caching', 'type': 'CachingTypes'}, - 'disk_size_gb': {'key': 'diskSizeGB', 'type': 'int'}, - 'storage_account_type': {'key': 'storageAccountType', 'type': 'str'}, - } - - def __init__(self, *, lun: int, snapshot=None, managed_disk=None, blob_uri: str=None, caching=None, disk_size_gb: int=None, storage_account_type=None, **kwargs) -> None: - super(ImageDataDisk, self).__init__(**kwargs) - self.lun = lun - self.snapshot = snapshot - self.managed_disk = managed_disk - self.blob_uri = blob_uri - self.caching = caching - self.disk_size_gb = disk_size_gb - self.storage_account_type = storage_account_type diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/image_disk_reference.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/image_disk_reference.py deleted file mode 100644 index b47ddd445024..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/image_disk_reference.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ImageDiskReference(Model): - """The source image used for creating the disk. - - All required parameters must be populated in order to send to Azure. - - :param id: Required. A relative uri containing either a Platform Image - Repository or user image reference. - :type id: str - :param lun: If the disk is created from an image's data disk, this is an - index that indicates which of the data disks in the image to use. For OS - disks, this field is null. - :type lun: int - """ - - _validation = { - 'id': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'lun': {'key': 'lun', 'type': 'int'}, - } - - def __init__(self, **kwargs): - super(ImageDiskReference, self).__init__(**kwargs) - self.id = kwargs.get('id', None) - self.lun = kwargs.get('lun', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/image_disk_reference_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/image_disk_reference_py3.py deleted file mode 100644 index 85bf966bc6e0..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/image_disk_reference_py3.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ImageDiskReference(Model): - """The source image used for creating the disk. - - All required parameters must be populated in order to send to Azure. - - :param id: Required. A relative uri containing either a Platform Image - Repository or user image reference. - :type id: str - :param lun: If the disk is created from an image's data disk, this is an - index that indicates which of the data disks in the image to use. For OS - disks, this field is null. - :type lun: int - """ - - _validation = { - 'id': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'lun': {'key': 'lun', 'type': 'int'}, - } - - def __init__(self, *, id: str, lun: int=None, **kwargs) -> None: - super(ImageDiskReference, self).__init__(**kwargs) - self.id = id - self.lun = lun diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/image_os_disk.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/image_os_disk.py deleted file mode 100644 index 7515a838e5cf..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/image_os_disk.py +++ /dev/null @@ -1,78 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ImageOSDisk(Model): - """Describes an Operating System disk. - - All required parameters must be populated in order to send to Azure. - - :param os_type: Required. This property allows you to specify the type of - the OS that is included in the disk if creating a VM from a custom image. -

    Possible values are:

    **Windows**

    **Linux**. - Possible values include: 'Windows', 'Linux' - :type os_type: str or - ~azure.mgmt.compute.v2018_04_01.models.OperatingSystemTypes - :param os_state: Required. The OS State. Possible values include: - 'Generalized', 'Specialized' - :type os_state: str or - ~azure.mgmt.compute.v2018_04_01.models.OperatingSystemStateTypes - :param snapshot: The snapshot. - :type snapshot: ~azure.mgmt.compute.v2018_04_01.models.SubResource - :param managed_disk: The managedDisk. - :type managed_disk: ~azure.mgmt.compute.v2018_04_01.models.SubResource - :param blob_uri: The Virtual Hard Disk. - :type blob_uri: str - :param caching: Specifies the caching requirements.

    Possible - values are:

    **None**

    **ReadOnly**

    **ReadWrite** -

    Default: **None for Standard storage. ReadOnly for Premium - storage**. Possible values include: 'None', 'ReadOnly', 'ReadWrite' - :type caching: str or ~azure.mgmt.compute.v2018_04_01.models.CachingTypes - :param disk_size_gb: Specifies the size of empty data disks in gigabytes. - This element can be used to overwrite the name of the disk in a virtual - machine image.

    This value cannot be larger than 1023 GB - :type disk_size_gb: int - :param storage_account_type: Specifies the storage account type for the - managed disk. Possible values are: Standard_LRS, Premium_LRS, and - StandardSSD_LRS. Possible values include: 'Standard_LRS', 'Premium_LRS', - 'StandardSSD_LRS' - :type storage_account_type: str or - ~azure.mgmt.compute.v2018_04_01.models.StorageAccountTypes - """ - - _validation = { - 'os_type': {'required': True}, - 'os_state': {'required': True}, - } - - _attribute_map = { - 'os_type': {'key': 'osType', 'type': 'OperatingSystemTypes'}, - 'os_state': {'key': 'osState', 'type': 'OperatingSystemStateTypes'}, - 'snapshot': {'key': 'snapshot', 'type': 'SubResource'}, - 'managed_disk': {'key': 'managedDisk', 'type': 'SubResource'}, - 'blob_uri': {'key': 'blobUri', 'type': 'str'}, - 'caching': {'key': 'caching', 'type': 'CachingTypes'}, - 'disk_size_gb': {'key': 'diskSizeGB', 'type': 'int'}, - 'storage_account_type': {'key': 'storageAccountType', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ImageOSDisk, self).__init__(**kwargs) - self.os_type = kwargs.get('os_type', None) - self.os_state = kwargs.get('os_state', None) - self.snapshot = kwargs.get('snapshot', None) - self.managed_disk = kwargs.get('managed_disk', None) - self.blob_uri = kwargs.get('blob_uri', None) - self.caching = kwargs.get('caching', None) - self.disk_size_gb = kwargs.get('disk_size_gb', None) - self.storage_account_type = kwargs.get('storage_account_type', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/image_os_disk_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/image_os_disk_py3.py deleted file mode 100644 index 06cc994712fa..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/image_os_disk_py3.py +++ /dev/null @@ -1,78 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ImageOSDisk(Model): - """Describes an Operating System disk. - - All required parameters must be populated in order to send to Azure. - - :param os_type: Required. This property allows you to specify the type of - the OS that is included in the disk if creating a VM from a custom image. -

    Possible values are:

    **Windows**

    **Linux**. - Possible values include: 'Windows', 'Linux' - :type os_type: str or - ~azure.mgmt.compute.v2018_04_01.models.OperatingSystemTypes - :param os_state: Required. The OS State. Possible values include: - 'Generalized', 'Specialized' - :type os_state: str or - ~azure.mgmt.compute.v2018_04_01.models.OperatingSystemStateTypes - :param snapshot: The snapshot. - :type snapshot: ~azure.mgmt.compute.v2018_04_01.models.SubResource - :param managed_disk: The managedDisk. - :type managed_disk: ~azure.mgmt.compute.v2018_04_01.models.SubResource - :param blob_uri: The Virtual Hard Disk. - :type blob_uri: str - :param caching: Specifies the caching requirements.

    Possible - values are:

    **None**

    **ReadOnly**

    **ReadWrite** -

    Default: **None for Standard storage. ReadOnly for Premium - storage**. Possible values include: 'None', 'ReadOnly', 'ReadWrite' - :type caching: str or ~azure.mgmt.compute.v2018_04_01.models.CachingTypes - :param disk_size_gb: Specifies the size of empty data disks in gigabytes. - This element can be used to overwrite the name of the disk in a virtual - machine image.

    This value cannot be larger than 1023 GB - :type disk_size_gb: int - :param storage_account_type: Specifies the storage account type for the - managed disk. Possible values are: Standard_LRS, Premium_LRS, and - StandardSSD_LRS. Possible values include: 'Standard_LRS', 'Premium_LRS', - 'StandardSSD_LRS' - :type storage_account_type: str or - ~azure.mgmt.compute.v2018_04_01.models.StorageAccountTypes - """ - - _validation = { - 'os_type': {'required': True}, - 'os_state': {'required': True}, - } - - _attribute_map = { - 'os_type': {'key': 'osType', 'type': 'OperatingSystemTypes'}, - 'os_state': {'key': 'osState', 'type': 'OperatingSystemStateTypes'}, - 'snapshot': {'key': 'snapshot', 'type': 'SubResource'}, - 'managed_disk': {'key': 'managedDisk', 'type': 'SubResource'}, - 'blob_uri': {'key': 'blobUri', 'type': 'str'}, - 'caching': {'key': 'caching', 'type': 'CachingTypes'}, - 'disk_size_gb': {'key': 'diskSizeGB', 'type': 'int'}, - 'storage_account_type': {'key': 'storageAccountType', 'type': 'str'}, - } - - def __init__(self, *, os_type, os_state, snapshot=None, managed_disk=None, blob_uri: str=None, caching=None, disk_size_gb: int=None, storage_account_type=None, **kwargs) -> None: - super(ImageOSDisk, self).__init__(**kwargs) - self.os_type = os_type - self.os_state = os_state - self.snapshot = snapshot - self.managed_disk = managed_disk - self.blob_uri = blob_uri - self.caching = caching - self.disk_size_gb = disk_size_gb - self.storage_account_type = storage_account_type diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/image_paged.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/image_paged.py deleted file mode 100644 index de04f8efc49c..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/image_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class ImagePaged(Paged): - """ - A paging container for iterating over a list of :class:`Image ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[Image]'} - } - - def __init__(self, *args, **kwargs): - - super(ImagePaged, self).__init__(*args, **kwargs) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/image_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/image_py3.py deleted file mode 100644 index 916f2df5e511..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/image_py3.py +++ /dev/null @@ -1,70 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource_py3 import Resource - - -class Image(Resource): - """The source user image virtual hard disk. The virtual hard disk will be - copied before being attached to the virtual machine. If SourceImage is - provided, the destination virtual hard drive must not exist. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource Id - :vartype id: str - :ivar name: Resource name - :vartype name: str - :ivar type: Resource type - :vartype type: str - :param location: Required. Resource location - :type location: str - :param tags: Resource tags - :type tags: dict[str, str] - :param source_virtual_machine: The source virtual machine from which Image - is created. - :type source_virtual_machine: - ~azure.mgmt.compute.v2018_04_01.models.SubResource - :param storage_profile: Specifies the storage settings for the virtual - machine disks. - :type storage_profile: - ~azure.mgmt.compute.v2018_04_01.models.ImageStorageProfile - :ivar provisioning_state: The provisioning state. - :vartype provisioning_state: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - 'provisioning_state': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'source_virtual_machine': {'key': 'properties.sourceVirtualMachine', 'type': 'SubResource'}, - 'storage_profile': {'key': 'properties.storageProfile', 'type': 'ImageStorageProfile'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - } - - def __init__(self, *, location: str, tags=None, source_virtual_machine=None, storage_profile=None, **kwargs) -> None: - super(Image, self).__init__(location=location, tags=tags, **kwargs) - self.source_virtual_machine = source_virtual_machine - self.storage_profile = storage_profile - self.provisioning_state = None diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/image_reference.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/image_reference.py deleted file mode 100644 index b8f929f4ad70..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/image_reference.py +++ /dev/null @@ -1,54 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .sub_resource import SubResource - - -class ImageReference(SubResource): - """Specifies information about the image to use. You can specify information - about platform images, marketplace images, or virtual machine images. This - element is required when you want to use a platform image, marketplace - image, or virtual machine image, but is not used in other creation - operations. - - :param id: Resource Id - :type id: str - :param publisher: The image publisher. - :type publisher: str - :param offer: Specifies the offer of the platform image or marketplace - image used to create the virtual machine. - :type offer: str - :param sku: The image SKU. - :type sku: str - :param version: Specifies the version of the platform image or marketplace - image used to create the virtual machine. The allowed formats are - Major.Minor.Build or 'latest'. Major, Minor, and Build are decimal - numbers. Specify 'latest' to use the latest version of an image available - at deploy time. Even if you use 'latest', the VM image will not - automatically update after deploy time even if a new version becomes - available. - :type version: str - """ - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'publisher': {'key': 'publisher', 'type': 'str'}, - 'offer': {'key': 'offer', 'type': 'str'}, - 'sku': {'key': 'sku', 'type': 'str'}, - 'version': {'key': 'version', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ImageReference, self).__init__(**kwargs) - self.publisher = kwargs.get('publisher', None) - self.offer = kwargs.get('offer', None) - self.sku = kwargs.get('sku', None) - self.version = kwargs.get('version', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/image_reference_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/image_reference_py3.py deleted file mode 100644 index 1d7eefe5ac65..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/image_reference_py3.py +++ /dev/null @@ -1,54 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .sub_resource_py3 import SubResource - - -class ImageReference(SubResource): - """Specifies information about the image to use. You can specify information - about platform images, marketplace images, or virtual machine images. This - element is required when you want to use a platform image, marketplace - image, or virtual machine image, but is not used in other creation - operations. - - :param id: Resource Id - :type id: str - :param publisher: The image publisher. - :type publisher: str - :param offer: Specifies the offer of the platform image or marketplace - image used to create the virtual machine. - :type offer: str - :param sku: The image SKU. - :type sku: str - :param version: Specifies the version of the platform image or marketplace - image used to create the virtual machine. The allowed formats are - Major.Minor.Build or 'latest'. Major, Minor, and Build are decimal - numbers. Specify 'latest' to use the latest version of an image available - at deploy time. Even if you use 'latest', the VM image will not - automatically update after deploy time even if a new version becomes - available. - :type version: str - """ - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'publisher': {'key': 'publisher', 'type': 'str'}, - 'offer': {'key': 'offer', 'type': 'str'}, - 'sku': {'key': 'sku', 'type': 'str'}, - 'version': {'key': 'version', 'type': 'str'}, - } - - def __init__(self, *, id: str=None, publisher: str=None, offer: str=None, sku: str=None, version: str=None, **kwargs) -> None: - super(ImageReference, self).__init__(id=id, **kwargs) - self.publisher = publisher - self.offer = offer - self.sku = sku - self.version = version diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/image_storage_profile.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/image_storage_profile.py deleted file mode 100644 index 2cd188cf28f9..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/image_storage_profile.py +++ /dev/null @@ -1,45 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ImageStorageProfile(Model): - """Describes a storage profile. - - :param os_disk: Specifies information about the operating system disk used - by the virtual machine.

    For more information about disks, see - [About disks and VHDs for Azure virtual - machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-about-disks-vhds?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). - :type os_disk: ~azure.mgmt.compute.v2018_04_01.models.ImageOSDisk - :param data_disks: Specifies the parameters that are used to add a data - disk to a virtual machine.

    For more information about disks, see - [About disks and VHDs for Azure virtual - machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-about-disks-vhds?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). - :type data_disks: - list[~azure.mgmt.compute.v2018_04_01.models.ImageDataDisk] - :param zone_resilient: Specifies whether an image is zone resilient or - not. Default is false. Zone resilient images can be created only in - regions that provide Zone Redundant Storage (ZRS). - :type zone_resilient: bool - """ - - _attribute_map = { - 'os_disk': {'key': 'osDisk', 'type': 'ImageOSDisk'}, - 'data_disks': {'key': 'dataDisks', 'type': '[ImageDataDisk]'}, - 'zone_resilient': {'key': 'zoneResilient', 'type': 'bool'}, - } - - def __init__(self, **kwargs): - super(ImageStorageProfile, self).__init__(**kwargs) - self.os_disk = kwargs.get('os_disk', None) - self.data_disks = kwargs.get('data_disks', None) - self.zone_resilient = kwargs.get('zone_resilient', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/image_storage_profile_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/image_storage_profile_py3.py deleted file mode 100644 index 359c87789cc3..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/image_storage_profile_py3.py +++ /dev/null @@ -1,45 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ImageStorageProfile(Model): - """Describes a storage profile. - - :param os_disk: Specifies information about the operating system disk used - by the virtual machine.

    For more information about disks, see - [About disks and VHDs for Azure virtual - machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-about-disks-vhds?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). - :type os_disk: ~azure.mgmt.compute.v2018_04_01.models.ImageOSDisk - :param data_disks: Specifies the parameters that are used to add a data - disk to a virtual machine.

    For more information about disks, see - [About disks and VHDs for Azure virtual - machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-about-disks-vhds?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). - :type data_disks: - list[~azure.mgmt.compute.v2018_04_01.models.ImageDataDisk] - :param zone_resilient: Specifies whether an image is zone resilient or - not. Default is false. Zone resilient images can be created only in - regions that provide Zone Redundant Storage (ZRS). - :type zone_resilient: bool - """ - - _attribute_map = { - 'os_disk': {'key': 'osDisk', 'type': 'ImageOSDisk'}, - 'data_disks': {'key': 'dataDisks', 'type': '[ImageDataDisk]'}, - 'zone_resilient': {'key': 'zoneResilient', 'type': 'bool'}, - } - - def __init__(self, *, os_disk=None, data_disks=None, zone_resilient: bool=None, **kwargs) -> None: - super(ImageStorageProfile, self).__init__(**kwargs) - self.os_disk = os_disk - self.data_disks = data_disks - self.zone_resilient = zone_resilient diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/image_update.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/image_update.py deleted file mode 100644 index 56f1f29d62d6..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/image_update.py +++ /dev/null @@ -1,50 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .update_resource import UpdateResource - - -class ImageUpdate(UpdateResource): - """The source user image virtual hard disk. Only tags may be updated. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :param tags: Resource tags - :type tags: dict[str, str] - :param source_virtual_machine: The source virtual machine from which Image - is created. - :type source_virtual_machine: - ~azure.mgmt.compute.v2018_04_01.models.SubResource - :param storage_profile: Specifies the storage settings for the virtual - machine disks. - :type storage_profile: - ~azure.mgmt.compute.v2018_04_01.models.ImageStorageProfile - :ivar provisioning_state: The provisioning state. - :vartype provisioning_state: str - """ - - _validation = { - 'provisioning_state': {'readonly': True}, - } - - _attribute_map = { - 'tags': {'key': 'tags', 'type': '{str}'}, - 'source_virtual_machine': {'key': 'properties.sourceVirtualMachine', 'type': 'SubResource'}, - 'storage_profile': {'key': 'properties.storageProfile', 'type': 'ImageStorageProfile'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ImageUpdate, self).__init__(**kwargs) - self.source_virtual_machine = kwargs.get('source_virtual_machine', None) - self.storage_profile = kwargs.get('storage_profile', None) - self.provisioning_state = None diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/image_update_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/image_update_py3.py deleted file mode 100644 index 47658e7217f1..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/image_update_py3.py +++ /dev/null @@ -1,50 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .update_resource_py3 import UpdateResource - - -class ImageUpdate(UpdateResource): - """The source user image virtual hard disk. Only tags may be updated. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :param tags: Resource tags - :type tags: dict[str, str] - :param source_virtual_machine: The source virtual machine from which Image - is created. - :type source_virtual_machine: - ~azure.mgmt.compute.v2018_04_01.models.SubResource - :param storage_profile: Specifies the storage settings for the virtual - machine disks. - :type storage_profile: - ~azure.mgmt.compute.v2018_04_01.models.ImageStorageProfile - :ivar provisioning_state: The provisioning state. - :vartype provisioning_state: str - """ - - _validation = { - 'provisioning_state': {'readonly': True}, - } - - _attribute_map = { - 'tags': {'key': 'tags', 'type': '{str}'}, - 'source_virtual_machine': {'key': 'properties.sourceVirtualMachine', 'type': 'SubResource'}, - 'storage_profile': {'key': 'properties.storageProfile', 'type': 'ImageStorageProfile'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - } - - def __init__(self, *, tags=None, source_virtual_machine=None, storage_profile=None, **kwargs) -> None: - super(ImageUpdate, self).__init__(tags=tags, **kwargs) - self.source_virtual_machine = source_virtual_machine - self.storage_profile = storage_profile - self.provisioning_state = None diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/inner_error.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/inner_error.py deleted file mode 100644 index 6324249d7c19..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/inner_error.py +++ /dev/null @@ -1,32 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class InnerError(Model): - """Inner error details. - - :param exceptiontype: The exception type. - :type exceptiontype: str - :param errordetail: The internal error message or exception dump. - :type errordetail: str - """ - - _attribute_map = { - 'exceptiontype': {'key': 'exceptiontype', 'type': 'str'}, - 'errordetail': {'key': 'errordetail', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(InnerError, self).__init__(**kwargs) - self.exceptiontype = kwargs.get('exceptiontype', None) - self.errordetail = kwargs.get('errordetail', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/inner_error_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/inner_error_py3.py deleted file mode 100644 index ccec30d7b53f..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/inner_error_py3.py +++ /dev/null @@ -1,32 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class InnerError(Model): - """Inner error details. - - :param exceptiontype: The exception type. - :type exceptiontype: str - :param errordetail: The internal error message or exception dump. - :type errordetail: str - """ - - _attribute_map = { - 'exceptiontype': {'key': 'exceptiontype', 'type': 'str'}, - 'errordetail': {'key': 'errordetail', 'type': 'str'}, - } - - def __init__(self, *, exceptiontype: str=None, errordetail: str=None, **kwargs) -> None: - super(InnerError, self).__init__(**kwargs) - self.exceptiontype = exceptiontype - self.errordetail = errordetail diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/instance_view_status.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/instance_view_status.py deleted file mode 100644 index fb7e1d99269e..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/instance_view_status.py +++ /dev/null @@ -1,47 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class InstanceViewStatus(Model): - """Instance view status. - - :param code: The status code. - :type code: str - :param level: The level code. Possible values include: 'Info', 'Warning', - 'Error' - :type level: str or - ~azure.mgmt.compute.v2018_04_01.models.StatusLevelTypes - :param display_status: The short localizable label for the status. - :type display_status: str - :param message: The detailed status message, including for alerts and - error messages. - :type message: str - :param time: The time of the status. - :type time: datetime - """ - - _attribute_map = { - 'code': {'key': 'code', 'type': 'str'}, - 'level': {'key': 'level', 'type': 'StatusLevelTypes'}, - 'display_status': {'key': 'displayStatus', 'type': 'str'}, - 'message': {'key': 'message', 'type': 'str'}, - 'time': {'key': 'time', 'type': 'iso-8601'}, - } - - def __init__(self, **kwargs): - super(InstanceViewStatus, self).__init__(**kwargs) - self.code = kwargs.get('code', None) - self.level = kwargs.get('level', None) - self.display_status = kwargs.get('display_status', None) - self.message = kwargs.get('message', None) - self.time = kwargs.get('time', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/instance_view_status_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/instance_view_status_py3.py deleted file mode 100644 index b3cf969f8cae..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/instance_view_status_py3.py +++ /dev/null @@ -1,47 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class InstanceViewStatus(Model): - """Instance view status. - - :param code: The status code. - :type code: str - :param level: The level code. Possible values include: 'Info', 'Warning', - 'Error' - :type level: str or - ~azure.mgmt.compute.v2018_04_01.models.StatusLevelTypes - :param display_status: The short localizable label for the status. - :type display_status: str - :param message: The detailed status message, including for alerts and - error messages. - :type message: str - :param time: The time of the status. - :type time: datetime - """ - - _attribute_map = { - 'code': {'key': 'code', 'type': 'str'}, - 'level': {'key': 'level', 'type': 'StatusLevelTypes'}, - 'display_status': {'key': 'displayStatus', 'type': 'str'}, - 'message': {'key': 'message', 'type': 'str'}, - 'time': {'key': 'time', 'type': 'iso-8601'}, - } - - def __init__(self, *, code: str=None, level=None, display_status: str=None, message: str=None, time=None, **kwargs) -> None: - super(InstanceViewStatus, self).__init__(**kwargs) - self.code = code - self.level = level - self.display_status = display_status - self.message = message - self.time = time diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/key_vault_and_key_reference.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/key_vault_and_key_reference.py deleted file mode 100644 index 12c3b3b5516d..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/key_vault_and_key_reference.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class KeyVaultAndKeyReference(Model): - """Key Vault Key Url and vault id of KeK, KeK is optional and when provided is - used to unwrap the encryptionKey. - - All required parameters must be populated in order to send to Azure. - - :param source_vault: Required. Resource id of the KeyVault containing the - key or secret - :type source_vault: ~azure.mgmt.compute.v2018_04_01.models.SourceVault - :param key_url: Required. Url pointing to a key or secret in KeyVault - :type key_url: str - """ - - _validation = { - 'source_vault': {'required': True}, - 'key_url': {'required': True}, - } - - _attribute_map = { - 'source_vault': {'key': 'sourceVault', 'type': 'SourceVault'}, - 'key_url': {'key': 'keyUrl', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(KeyVaultAndKeyReference, self).__init__(**kwargs) - self.source_vault = kwargs.get('source_vault', None) - self.key_url = kwargs.get('key_url', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/key_vault_and_key_reference_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/key_vault_and_key_reference_py3.py deleted file mode 100644 index ba330572235f..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/key_vault_and_key_reference_py3.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class KeyVaultAndKeyReference(Model): - """Key Vault Key Url and vault id of KeK, KeK is optional and when provided is - used to unwrap the encryptionKey. - - All required parameters must be populated in order to send to Azure. - - :param source_vault: Required. Resource id of the KeyVault containing the - key or secret - :type source_vault: ~azure.mgmt.compute.v2018_04_01.models.SourceVault - :param key_url: Required. Url pointing to a key or secret in KeyVault - :type key_url: str - """ - - _validation = { - 'source_vault': {'required': True}, - 'key_url': {'required': True}, - } - - _attribute_map = { - 'source_vault': {'key': 'sourceVault', 'type': 'SourceVault'}, - 'key_url': {'key': 'keyUrl', 'type': 'str'}, - } - - def __init__(self, *, source_vault, key_url: str, **kwargs) -> None: - super(KeyVaultAndKeyReference, self).__init__(**kwargs) - self.source_vault = source_vault - self.key_url = key_url diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/key_vault_and_secret_reference.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/key_vault_and_secret_reference.py deleted file mode 100644 index 0e13cba0e3fd..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/key_vault_and_secret_reference.py +++ /dev/null @@ -1,40 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class KeyVaultAndSecretReference(Model): - """Key Vault Secret Url and vault id of the encryption key . - - All required parameters must be populated in order to send to Azure. - - :param source_vault: Required. Resource id of the KeyVault containing the - key or secret - :type source_vault: ~azure.mgmt.compute.v2018_04_01.models.SourceVault - :param secret_url: Required. Url pointing to a key or secret in KeyVault - :type secret_url: str - """ - - _validation = { - 'source_vault': {'required': True}, - 'secret_url': {'required': True}, - } - - _attribute_map = { - 'source_vault': {'key': 'sourceVault', 'type': 'SourceVault'}, - 'secret_url': {'key': 'secretUrl', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(KeyVaultAndSecretReference, self).__init__(**kwargs) - self.source_vault = kwargs.get('source_vault', None) - self.secret_url = kwargs.get('secret_url', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/key_vault_and_secret_reference_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/key_vault_and_secret_reference_py3.py deleted file mode 100644 index d342cfb37a14..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/key_vault_and_secret_reference_py3.py +++ /dev/null @@ -1,40 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class KeyVaultAndSecretReference(Model): - """Key Vault Secret Url and vault id of the encryption key . - - All required parameters must be populated in order to send to Azure. - - :param source_vault: Required. Resource id of the KeyVault containing the - key or secret - :type source_vault: ~azure.mgmt.compute.v2018_04_01.models.SourceVault - :param secret_url: Required. Url pointing to a key or secret in KeyVault - :type secret_url: str - """ - - _validation = { - 'source_vault': {'required': True}, - 'secret_url': {'required': True}, - } - - _attribute_map = { - 'source_vault': {'key': 'sourceVault', 'type': 'SourceVault'}, - 'secret_url': {'key': 'secretUrl', 'type': 'str'}, - } - - def __init__(self, *, source_vault, secret_url: str, **kwargs) -> None: - super(KeyVaultAndSecretReference, self).__init__(**kwargs) - self.source_vault = source_vault - self.secret_url = secret_url diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/key_vault_key_reference.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/key_vault_key_reference.py deleted file mode 100644 index f1eb6d6c120a..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/key_vault_key_reference.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class KeyVaultKeyReference(Model): - """Describes a reference to Key Vault Key. - - All required parameters must be populated in order to send to Azure. - - :param key_url: Required. The URL referencing a key encryption key in Key - Vault. - :type key_url: str - :param source_vault: Required. The relative URL of the Key Vault - containing the key. - :type source_vault: ~azure.mgmt.compute.v2018_04_01.models.SubResource - """ - - _validation = { - 'key_url': {'required': True}, - 'source_vault': {'required': True}, - } - - _attribute_map = { - 'key_url': {'key': 'keyUrl', 'type': 'str'}, - 'source_vault': {'key': 'sourceVault', 'type': 'SubResource'}, - } - - def __init__(self, **kwargs): - super(KeyVaultKeyReference, self).__init__(**kwargs) - self.key_url = kwargs.get('key_url', None) - self.source_vault = kwargs.get('source_vault', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/key_vault_key_reference_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/key_vault_key_reference_py3.py deleted file mode 100644 index 378de235d684..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/key_vault_key_reference_py3.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class KeyVaultKeyReference(Model): - """Describes a reference to Key Vault Key. - - All required parameters must be populated in order to send to Azure. - - :param key_url: Required. The URL referencing a key encryption key in Key - Vault. - :type key_url: str - :param source_vault: Required. The relative URL of the Key Vault - containing the key. - :type source_vault: ~azure.mgmt.compute.v2018_04_01.models.SubResource - """ - - _validation = { - 'key_url': {'required': True}, - 'source_vault': {'required': True}, - } - - _attribute_map = { - 'key_url': {'key': 'keyUrl', 'type': 'str'}, - 'source_vault': {'key': 'sourceVault', 'type': 'SubResource'}, - } - - def __init__(self, *, key_url: str, source_vault, **kwargs) -> None: - super(KeyVaultKeyReference, self).__init__(**kwargs) - self.key_url = key_url - self.source_vault = source_vault diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/key_vault_secret_reference.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/key_vault_secret_reference.py deleted file mode 100644 index 082199bce901..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/key_vault_secret_reference.py +++ /dev/null @@ -1,40 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class KeyVaultSecretReference(Model): - """Describes a reference to Key Vault Secret. - - All required parameters must be populated in order to send to Azure. - - :param secret_url: Required. The URL referencing a secret in a Key Vault. - :type secret_url: str - :param source_vault: Required. The relative URL of the Key Vault - containing the secret. - :type source_vault: ~azure.mgmt.compute.v2018_04_01.models.SubResource - """ - - _validation = { - 'secret_url': {'required': True}, - 'source_vault': {'required': True}, - } - - _attribute_map = { - 'secret_url': {'key': 'secretUrl', 'type': 'str'}, - 'source_vault': {'key': 'sourceVault', 'type': 'SubResource'}, - } - - def __init__(self, **kwargs): - super(KeyVaultSecretReference, self).__init__(**kwargs) - self.secret_url = kwargs.get('secret_url', None) - self.source_vault = kwargs.get('source_vault', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/key_vault_secret_reference_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/key_vault_secret_reference_py3.py deleted file mode 100644 index 8d938cbf5e89..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/key_vault_secret_reference_py3.py +++ /dev/null @@ -1,40 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class KeyVaultSecretReference(Model): - """Describes a reference to Key Vault Secret. - - All required parameters must be populated in order to send to Azure. - - :param secret_url: Required. The URL referencing a secret in a Key Vault. - :type secret_url: str - :param source_vault: Required. The relative URL of the Key Vault - containing the secret. - :type source_vault: ~azure.mgmt.compute.v2018_04_01.models.SubResource - """ - - _validation = { - 'secret_url': {'required': True}, - 'source_vault': {'required': True}, - } - - _attribute_map = { - 'secret_url': {'key': 'secretUrl', 'type': 'str'}, - 'source_vault': {'key': 'sourceVault', 'type': 'SubResource'}, - } - - def __init__(self, *, secret_url: str, source_vault, **kwargs) -> None: - super(KeyVaultSecretReference, self).__init__(**kwargs) - self.secret_url = secret_url - self.source_vault = source_vault diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/linux_configuration.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/linux_configuration.py deleted file mode 100644 index 3dc5246c35d7..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/linux_configuration.py +++ /dev/null @@ -1,39 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class LinuxConfiguration(Model): - """Specifies the Linux operating system settings on the virtual machine. -

    For a list of supported Linux distributions, see [Linux on - Azure-Endorsed - Distributions](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-endorsed-distros?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json) -

    For running non-endorsed distributions, see [Information for - Non-Endorsed - Distributions](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-create-upload-generic?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json). - - :param disable_password_authentication: Specifies whether password - authentication should be disabled. - :type disable_password_authentication: bool - :param ssh: Specifies the ssh key configuration for a Linux OS. - :type ssh: ~azure.mgmt.compute.v2018_04_01.models.SshConfiguration - """ - - _attribute_map = { - 'disable_password_authentication': {'key': 'disablePasswordAuthentication', 'type': 'bool'}, - 'ssh': {'key': 'ssh', 'type': 'SshConfiguration'}, - } - - def __init__(self, **kwargs): - super(LinuxConfiguration, self).__init__(**kwargs) - self.disable_password_authentication = kwargs.get('disable_password_authentication', None) - self.ssh = kwargs.get('ssh', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/linux_configuration_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/linux_configuration_py3.py deleted file mode 100644 index 45614597db33..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/linux_configuration_py3.py +++ /dev/null @@ -1,39 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class LinuxConfiguration(Model): - """Specifies the Linux operating system settings on the virtual machine. -

    For a list of supported Linux distributions, see [Linux on - Azure-Endorsed - Distributions](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-endorsed-distros?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json) -

    For running non-endorsed distributions, see [Information for - Non-Endorsed - Distributions](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-create-upload-generic?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json). - - :param disable_password_authentication: Specifies whether password - authentication should be disabled. - :type disable_password_authentication: bool - :param ssh: Specifies the ssh key configuration for a Linux OS. - :type ssh: ~azure.mgmt.compute.v2018_04_01.models.SshConfiguration - """ - - _attribute_map = { - 'disable_password_authentication': {'key': 'disablePasswordAuthentication', 'type': 'bool'}, - 'ssh': {'key': 'ssh', 'type': 'SshConfiguration'}, - } - - def __init__(self, *, disable_password_authentication: bool=None, ssh=None, **kwargs) -> None: - super(LinuxConfiguration, self).__init__(**kwargs) - self.disable_password_authentication = disable_password_authentication - self.ssh = ssh diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/log_analytics_input_base.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/log_analytics_input_base.py deleted file mode 100644 index 46bbc4f44411..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/log_analytics_input_base.py +++ /dev/null @@ -1,58 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class LogAnalyticsInputBase(Model): - """Api input base class for LogAnalytics Api. - - All required parameters must be populated in order to send to Azure. - - :param blob_container_sas_uri: Required. SAS Uri of the logging blob - container to which LogAnalytics Api writes output logs to. - :type blob_container_sas_uri: str - :param from_time: Required. From time of the query - :type from_time: datetime - :param to_time: Required. To time of the query - :type to_time: datetime - :param group_by_throttle_policy: Group query result by Throttle Policy - applied. - :type group_by_throttle_policy: bool - :param group_by_operation_name: Group query result by Operation Name. - :type group_by_operation_name: bool - :param group_by_resource_name: Group query result by Resource Name. - :type group_by_resource_name: bool - """ - - _validation = { - 'blob_container_sas_uri': {'required': True}, - 'from_time': {'required': True}, - 'to_time': {'required': True}, - } - - _attribute_map = { - 'blob_container_sas_uri': {'key': 'blobContainerSasUri', 'type': 'str'}, - 'from_time': {'key': 'fromTime', 'type': 'iso-8601'}, - 'to_time': {'key': 'toTime', 'type': 'iso-8601'}, - 'group_by_throttle_policy': {'key': 'groupByThrottlePolicy', 'type': 'bool'}, - 'group_by_operation_name': {'key': 'groupByOperationName', 'type': 'bool'}, - 'group_by_resource_name': {'key': 'groupByResourceName', 'type': 'bool'}, - } - - def __init__(self, **kwargs): - super(LogAnalyticsInputBase, self).__init__(**kwargs) - self.blob_container_sas_uri = kwargs.get('blob_container_sas_uri', None) - self.from_time = kwargs.get('from_time', None) - self.to_time = kwargs.get('to_time', None) - self.group_by_throttle_policy = kwargs.get('group_by_throttle_policy', None) - self.group_by_operation_name = kwargs.get('group_by_operation_name', None) - self.group_by_resource_name = kwargs.get('group_by_resource_name', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/log_analytics_input_base_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/log_analytics_input_base_py3.py deleted file mode 100644 index f713c2cb0629..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/log_analytics_input_base_py3.py +++ /dev/null @@ -1,58 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class LogAnalyticsInputBase(Model): - """Api input base class for LogAnalytics Api. - - All required parameters must be populated in order to send to Azure. - - :param blob_container_sas_uri: Required. SAS Uri of the logging blob - container to which LogAnalytics Api writes output logs to. - :type blob_container_sas_uri: str - :param from_time: Required. From time of the query - :type from_time: datetime - :param to_time: Required. To time of the query - :type to_time: datetime - :param group_by_throttle_policy: Group query result by Throttle Policy - applied. - :type group_by_throttle_policy: bool - :param group_by_operation_name: Group query result by Operation Name. - :type group_by_operation_name: bool - :param group_by_resource_name: Group query result by Resource Name. - :type group_by_resource_name: bool - """ - - _validation = { - 'blob_container_sas_uri': {'required': True}, - 'from_time': {'required': True}, - 'to_time': {'required': True}, - } - - _attribute_map = { - 'blob_container_sas_uri': {'key': 'blobContainerSasUri', 'type': 'str'}, - 'from_time': {'key': 'fromTime', 'type': 'iso-8601'}, - 'to_time': {'key': 'toTime', 'type': 'iso-8601'}, - 'group_by_throttle_policy': {'key': 'groupByThrottlePolicy', 'type': 'bool'}, - 'group_by_operation_name': {'key': 'groupByOperationName', 'type': 'bool'}, - 'group_by_resource_name': {'key': 'groupByResourceName', 'type': 'bool'}, - } - - def __init__(self, *, blob_container_sas_uri: str, from_time, to_time, group_by_throttle_policy: bool=None, group_by_operation_name: bool=None, group_by_resource_name: bool=None, **kwargs) -> None: - super(LogAnalyticsInputBase, self).__init__(**kwargs) - self.blob_container_sas_uri = blob_container_sas_uri - self.from_time = from_time - self.to_time = to_time - self.group_by_throttle_policy = group_by_throttle_policy - self.group_by_operation_name = group_by_operation_name - self.group_by_resource_name = group_by_resource_name diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/log_analytics_operation_result.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/log_analytics_operation_result.py deleted file mode 100644 index ebb7a1177049..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/log_analytics_operation_result.py +++ /dev/null @@ -1,36 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class LogAnalyticsOperationResult(Model): - """LogAnalytics operation status response. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar properties: LogAnalyticsOutput - :vartype properties: - ~azure.mgmt.compute.v2018_04_01.models.LogAnalyticsOutput - """ - - _validation = { - 'properties': {'readonly': True}, - } - - _attribute_map = { - 'properties': {'key': 'properties', 'type': 'LogAnalyticsOutput'}, - } - - def __init__(self, **kwargs): - super(LogAnalyticsOperationResult, self).__init__(**kwargs) - self.properties = None diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/log_analytics_operation_result_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/log_analytics_operation_result_py3.py deleted file mode 100644 index dfeceeb58cf4..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/log_analytics_operation_result_py3.py +++ /dev/null @@ -1,36 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class LogAnalyticsOperationResult(Model): - """LogAnalytics operation status response. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar properties: LogAnalyticsOutput - :vartype properties: - ~azure.mgmt.compute.v2018_04_01.models.LogAnalyticsOutput - """ - - _validation = { - 'properties': {'readonly': True}, - } - - _attribute_map = { - 'properties': {'key': 'properties', 'type': 'LogAnalyticsOutput'}, - } - - def __init__(self, **kwargs) -> None: - super(LogAnalyticsOperationResult, self).__init__(**kwargs) - self.properties = None diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/log_analytics_output.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/log_analytics_output.py deleted file mode 100644 index 5ea1615011c3..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/log_analytics_output.py +++ /dev/null @@ -1,35 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class LogAnalyticsOutput(Model): - """LogAnalytics output properties. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar output: Output file Uri path to blob container. - :vartype output: str - """ - - _validation = { - 'output': {'readonly': True}, - } - - _attribute_map = { - 'output': {'key': 'output', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(LogAnalyticsOutput, self).__init__(**kwargs) - self.output = None diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/log_analytics_output_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/log_analytics_output_py3.py deleted file mode 100644 index 71a428a8e49a..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/log_analytics_output_py3.py +++ /dev/null @@ -1,35 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class LogAnalyticsOutput(Model): - """LogAnalytics output properties. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar output: Output file Uri path to blob container. - :vartype output: str - """ - - _validation = { - 'output': {'readonly': True}, - } - - _attribute_map = { - 'output': {'key': 'output', 'type': 'str'}, - } - - def __init__(self, **kwargs) -> None: - super(LogAnalyticsOutput, self).__init__(**kwargs) - self.output = None diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/maintenance_redeploy_status.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/maintenance_redeploy_status.py deleted file mode 100644 index 6c22c904d185..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/maintenance_redeploy_status.py +++ /dev/null @@ -1,60 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class MaintenanceRedeployStatus(Model): - """Maintenance Operation Status. - - :param is_customer_initiated_maintenance_allowed: True, if customer is - allowed to perform Maintenance. - :type is_customer_initiated_maintenance_allowed: bool - :param pre_maintenance_window_start_time: Start Time for the Pre - Maintenance Window. - :type pre_maintenance_window_start_time: datetime - :param pre_maintenance_window_end_time: End Time for the Pre Maintenance - Window. - :type pre_maintenance_window_end_time: datetime - :param maintenance_window_start_time: Start Time for the Maintenance - Window. - :type maintenance_window_start_time: datetime - :param maintenance_window_end_time: End Time for the Maintenance Window. - :type maintenance_window_end_time: datetime - :param last_operation_result_code: The Last Maintenance Operation Result - Code. Possible values include: 'None', 'RetryLater', 'MaintenanceAborted', - 'MaintenanceCompleted' - :type last_operation_result_code: str or - ~azure.mgmt.compute.v2018_04_01.models.MaintenanceOperationResultCodeTypes - :param last_operation_message: Message returned for the last Maintenance - Operation. - :type last_operation_message: str - """ - - _attribute_map = { - 'is_customer_initiated_maintenance_allowed': {'key': 'isCustomerInitiatedMaintenanceAllowed', 'type': 'bool'}, - 'pre_maintenance_window_start_time': {'key': 'preMaintenanceWindowStartTime', 'type': 'iso-8601'}, - 'pre_maintenance_window_end_time': {'key': 'preMaintenanceWindowEndTime', 'type': 'iso-8601'}, - 'maintenance_window_start_time': {'key': 'maintenanceWindowStartTime', 'type': 'iso-8601'}, - 'maintenance_window_end_time': {'key': 'maintenanceWindowEndTime', 'type': 'iso-8601'}, - 'last_operation_result_code': {'key': 'lastOperationResultCode', 'type': 'MaintenanceOperationResultCodeTypes'}, - 'last_operation_message': {'key': 'lastOperationMessage', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(MaintenanceRedeployStatus, self).__init__(**kwargs) - self.is_customer_initiated_maintenance_allowed = kwargs.get('is_customer_initiated_maintenance_allowed', None) - self.pre_maintenance_window_start_time = kwargs.get('pre_maintenance_window_start_time', None) - self.pre_maintenance_window_end_time = kwargs.get('pre_maintenance_window_end_time', None) - self.maintenance_window_start_time = kwargs.get('maintenance_window_start_time', None) - self.maintenance_window_end_time = kwargs.get('maintenance_window_end_time', None) - self.last_operation_result_code = kwargs.get('last_operation_result_code', None) - self.last_operation_message = kwargs.get('last_operation_message', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/maintenance_redeploy_status_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/maintenance_redeploy_status_py3.py deleted file mode 100644 index f2e8bbf807df..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/maintenance_redeploy_status_py3.py +++ /dev/null @@ -1,60 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class MaintenanceRedeployStatus(Model): - """Maintenance Operation Status. - - :param is_customer_initiated_maintenance_allowed: True, if customer is - allowed to perform Maintenance. - :type is_customer_initiated_maintenance_allowed: bool - :param pre_maintenance_window_start_time: Start Time for the Pre - Maintenance Window. - :type pre_maintenance_window_start_time: datetime - :param pre_maintenance_window_end_time: End Time for the Pre Maintenance - Window. - :type pre_maintenance_window_end_time: datetime - :param maintenance_window_start_time: Start Time for the Maintenance - Window. - :type maintenance_window_start_time: datetime - :param maintenance_window_end_time: End Time for the Maintenance Window. - :type maintenance_window_end_time: datetime - :param last_operation_result_code: The Last Maintenance Operation Result - Code. Possible values include: 'None', 'RetryLater', 'MaintenanceAborted', - 'MaintenanceCompleted' - :type last_operation_result_code: str or - ~azure.mgmt.compute.v2018_04_01.models.MaintenanceOperationResultCodeTypes - :param last_operation_message: Message returned for the last Maintenance - Operation. - :type last_operation_message: str - """ - - _attribute_map = { - 'is_customer_initiated_maintenance_allowed': {'key': 'isCustomerInitiatedMaintenanceAllowed', 'type': 'bool'}, - 'pre_maintenance_window_start_time': {'key': 'preMaintenanceWindowStartTime', 'type': 'iso-8601'}, - 'pre_maintenance_window_end_time': {'key': 'preMaintenanceWindowEndTime', 'type': 'iso-8601'}, - 'maintenance_window_start_time': {'key': 'maintenanceWindowStartTime', 'type': 'iso-8601'}, - 'maintenance_window_end_time': {'key': 'maintenanceWindowEndTime', 'type': 'iso-8601'}, - 'last_operation_result_code': {'key': 'lastOperationResultCode', 'type': 'MaintenanceOperationResultCodeTypes'}, - 'last_operation_message': {'key': 'lastOperationMessage', 'type': 'str'}, - } - - def __init__(self, *, is_customer_initiated_maintenance_allowed: bool=None, pre_maintenance_window_start_time=None, pre_maintenance_window_end_time=None, maintenance_window_start_time=None, maintenance_window_end_time=None, last_operation_result_code=None, last_operation_message: str=None, **kwargs) -> None: - super(MaintenanceRedeployStatus, self).__init__(**kwargs) - self.is_customer_initiated_maintenance_allowed = is_customer_initiated_maintenance_allowed - self.pre_maintenance_window_start_time = pre_maintenance_window_start_time - self.pre_maintenance_window_end_time = pre_maintenance_window_end_time - self.maintenance_window_start_time = maintenance_window_start_time - self.maintenance_window_end_time = maintenance_window_end_time - self.last_operation_result_code = last_operation_result_code - self.last_operation_message = last_operation_message diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/managed_disk_parameters.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/managed_disk_parameters.py deleted file mode 100644 index e3f0b5324e39..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/managed_disk_parameters.py +++ /dev/null @@ -1,35 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .sub_resource import SubResource - - -class ManagedDiskParameters(SubResource): - """The parameters of a managed disk. - - :param id: Resource Id - :type id: str - :param storage_account_type: Specifies the storage account type for the - managed disk. Possible values are: Standard_LRS, Premium_LRS, and - StandardSSD_LRS. Possible values include: 'Standard_LRS', 'Premium_LRS', - 'StandardSSD_LRS' - :type storage_account_type: str or - ~azure.mgmt.compute.v2018_04_01.models.StorageAccountTypes - """ - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'storage_account_type': {'key': 'storageAccountType', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ManagedDiskParameters, self).__init__(**kwargs) - self.storage_account_type = kwargs.get('storage_account_type', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/managed_disk_parameters_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/managed_disk_parameters_py3.py deleted file mode 100644 index 02d27c61f9d3..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/managed_disk_parameters_py3.py +++ /dev/null @@ -1,35 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .sub_resource_py3 import SubResource - - -class ManagedDiskParameters(SubResource): - """The parameters of a managed disk. - - :param id: Resource Id - :type id: str - :param storage_account_type: Specifies the storage account type for the - managed disk. Possible values are: Standard_LRS, Premium_LRS, and - StandardSSD_LRS. Possible values include: 'Standard_LRS', 'Premium_LRS', - 'StandardSSD_LRS' - :type storage_account_type: str or - ~azure.mgmt.compute.v2018_04_01.models.StorageAccountTypes - """ - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'storage_account_type': {'key': 'storageAccountType', 'type': 'str'}, - } - - def __init__(self, *, id: str=None, storage_account_type=None, **kwargs) -> None: - super(ManagedDiskParameters, self).__init__(id=id, **kwargs) - self.storage_account_type = storage_account_type diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/network_interface_reference.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/network_interface_reference.py deleted file mode 100644 index b86e305e3f74..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/network_interface_reference.py +++ /dev/null @@ -1,32 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .sub_resource import SubResource - - -class NetworkInterfaceReference(SubResource): - """Describes a network interface reference. - - :param id: Resource Id - :type id: str - :param primary: Specifies the primary network interface in case the - virtual machine has more than 1 network interface. - :type primary: bool - """ - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'primary': {'key': 'properties.primary', 'type': 'bool'}, - } - - def __init__(self, **kwargs): - super(NetworkInterfaceReference, self).__init__(**kwargs) - self.primary = kwargs.get('primary', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/network_interface_reference_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/network_interface_reference_py3.py deleted file mode 100644 index 47da29278832..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/network_interface_reference_py3.py +++ /dev/null @@ -1,32 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .sub_resource_py3 import SubResource - - -class NetworkInterfaceReference(SubResource): - """Describes a network interface reference. - - :param id: Resource Id - :type id: str - :param primary: Specifies the primary network interface in case the - virtual machine has more than 1 network interface. - :type primary: bool - """ - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'primary': {'key': 'properties.primary', 'type': 'bool'}, - } - - def __init__(self, *, id: str=None, primary: bool=None, **kwargs) -> None: - super(NetworkInterfaceReference, self).__init__(id=id, **kwargs) - self.primary = primary diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/network_profile.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/network_profile.py deleted file mode 100644 index b547518c8397..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/network_profile.py +++ /dev/null @@ -1,30 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class NetworkProfile(Model): - """Specifies the network interfaces of the virtual machine. - - :param network_interfaces: Specifies the list of resource Ids for the - network interfaces associated with the virtual machine. - :type network_interfaces: - list[~azure.mgmt.compute.v2018_04_01.models.NetworkInterfaceReference] - """ - - _attribute_map = { - 'network_interfaces': {'key': 'networkInterfaces', 'type': '[NetworkInterfaceReference]'}, - } - - def __init__(self, **kwargs): - super(NetworkProfile, self).__init__(**kwargs) - self.network_interfaces = kwargs.get('network_interfaces', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/network_profile_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/network_profile_py3.py deleted file mode 100644 index 63e37d139e29..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/network_profile_py3.py +++ /dev/null @@ -1,30 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class NetworkProfile(Model): - """Specifies the network interfaces of the virtual machine. - - :param network_interfaces: Specifies the list of resource Ids for the - network interfaces associated with the virtual machine. - :type network_interfaces: - list[~azure.mgmt.compute.v2018_04_01.models.NetworkInterfaceReference] - """ - - _attribute_map = { - 'network_interfaces': {'key': 'networkInterfaces', 'type': '[NetworkInterfaceReference]'}, - } - - def __init__(self, *, network_interfaces=None, **kwargs) -> None: - super(NetworkProfile, self).__init__(**kwargs) - self.network_interfaces = network_interfaces diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/os_disk.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/os_disk.py deleted file mode 100644 index e1c2cab2b103..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/os_disk.py +++ /dev/null @@ -1,97 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class OSDisk(Model): - """Specifies information about the operating system disk used by the virtual - machine.

    For more information about disks, see [About disks and - VHDs for Azure virtual - machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-about-disks-vhds?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). - - All required parameters must be populated in order to send to Azure. - - :param os_type: This property allows you to specify the type of the OS - that is included in the disk if creating a VM from user-image or a - specialized VHD.

    Possible values are:

    **Windows** -

    **Linux**. Possible values include: 'Windows', 'Linux' - :type os_type: str or - ~azure.mgmt.compute.v2018_04_01.models.OperatingSystemTypes - :param encryption_settings: Specifies the encryption settings for the OS - Disk.

    Minimum api-version: 2015-06-15 - :type encryption_settings: - ~azure.mgmt.compute.v2018_04_01.models.DiskEncryptionSettings - :param name: The disk name. - :type name: str - :param vhd: The virtual hard disk. - :type vhd: ~azure.mgmt.compute.v2018_04_01.models.VirtualHardDisk - :param image: The source user image virtual hard disk. The virtual hard - disk will be copied before being attached to the virtual machine. If - SourceImage is provided, the destination virtual hard drive must not - exist. - :type image: ~azure.mgmt.compute.v2018_04_01.models.VirtualHardDisk - :param caching: Specifies the caching requirements.

    Possible - values are:

    **None**

    **ReadOnly**

    **ReadWrite** -

    Default: **None for Standard storage. ReadOnly for Premium - storage**. Possible values include: 'None', 'ReadOnly', 'ReadWrite' - :type caching: str or ~azure.mgmt.compute.v2018_04_01.models.CachingTypes - :param write_accelerator_enabled: Specifies whether writeAccelerator - should be enabled or disabled on the disk. - :type write_accelerator_enabled: bool - :param create_option: Required. Specifies how the virtual machine should - be created.

    Possible values are:

    **Attach** \\u2013 This - value is used when you are using a specialized disk to create the virtual - machine.

    **FromImage** \\u2013 This value is used when you are - using an image to create the virtual machine. If you are using a platform - image, you also use the imageReference element described above. If you are - using a marketplace image, you also use the plan element previously - described. Possible values include: 'FromImage', 'Empty', 'Attach' - :type create_option: str or - ~azure.mgmt.compute.v2018_04_01.models.DiskCreateOptionTypes - :param disk_size_gb: Specifies the size of an empty data disk in - gigabytes. This element can be used to overwrite the size of the disk in a - virtual machine image.

    This value cannot be larger than 1023 GB - :type disk_size_gb: int - :param managed_disk: The managed disk parameters. - :type managed_disk: - ~azure.mgmt.compute.v2018_04_01.models.ManagedDiskParameters - """ - - _validation = { - 'create_option': {'required': True}, - } - - _attribute_map = { - 'os_type': {'key': 'osType', 'type': 'OperatingSystemTypes'}, - 'encryption_settings': {'key': 'encryptionSettings', 'type': 'DiskEncryptionSettings'}, - 'name': {'key': 'name', 'type': 'str'}, - 'vhd': {'key': 'vhd', 'type': 'VirtualHardDisk'}, - 'image': {'key': 'image', 'type': 'VirtualHardDisk'}, - 'caching': {'key': 'caching', 'type': 'CachingTypes'}, - 'write_accelerator_enabled': {'key': 'writeAcceleratorEnabled', 'type': 'bool'}, - 'create_option': {'key': 'createOption', 'type': 'str'}, - 'disk_size_gb': {'key': 'diskSizeGB', 'type': 'int'}, - 'managed_disk': {'key': 'managedDisk', 'type': 'ManagedDiskParameters'}, - } - - def __init__(self, **kwargs): - super(OSDisk, self).__init__(**kwargs) - self.os_type = kwargs.get('os_type', None) - self.encryption_settings = kwargs.get('encryption_settings', None) - self.name = kwargs.get('name', None) - self.vhd = kwargs.get('vhd', None) - self.image = kwargs.get('image', None) - self.caching = kwargs.get('caching', None) - self.write_accelerator_enabled = kwargs.get('write_accelerator_enabled', None) - self.create_option = kwargs.get('create_option', None) - self.disk_size_gb = kwargs.get('disk_size_gb', None) - self.managed_disk = kwargs.get('managed_disk', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/os_disk_image.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/os_disk_image.py deleted file mode 100644 index ad439c7ab470..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/os_disk_image.py +++ /dev/null @@ -1,36 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class OSDiskImage(Model): - """Contains the os disk image information. - - All required parameters must be populated in order to send to Azure. - - :param operating_system: Required. The operating system of the - osDiskImage. Possible values include: 'Windows', 'Linux' - :type operating_system: str or - ~azure.mgmt.compute.v2018_04_01.models.OperatingSystemTypes - """ - - _validation = { - 'operating_system': {'required': True}, - } - - _attribute_map = { - 'operating_system': {'key': 'operatingSystem', 'type': 'OperatingSystemTypes'}, - } - - def __init__(self, **kwargs): - super(OSDiskImage, self).__init__(**kwargs) - self.operating_system = kwargs.get('operating_system', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/os_disk_image_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/os_disk_image_py3.py deleted file mode 100644 index 1d9c6e45d677..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/os_disk_image_py3.py +++ /dev/null @@ -1,36 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class OSDiskImage(Model): - """Contains the os disk image information. - - All required parameters must be populated in order to send to Azure. - - :param operating_system: Required. The operating system of the - osDiskImage. Possible values include: 'Windows', 'Linux' - :type operating_system: str or - ~azure.mgmt.compute.v2018_04_01.models.OperatingSystemTypes - """ - - _validation = { - 'operating_system': {'required': True}, - } - - _attribute_map = { - 'operating_system': {'key': 'operatingSystem', 'type': 'OperatingSystemTypes'}, - } - - def __init__(self, *, operating_system, **kwargs) -> None: - super(OSDiskImage, self).__init__(**kwargs) - self.operating_system = operating_system diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/os_disk_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/os_disk_py3.py deleted file mode 100644 index c7376df8249b..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/os_disk_py3.py +++ /dev/null @@ -1,97 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class OSDisk(Model): - """Specifies information about the operating system disk used by the virtual - machine.

    For more information about disks, see [About disks and - VHDs for Azure virtual - machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-about-disks-vhds?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). - - All required parameters must be populated in order to send to Azure. - - :param os_type: This property allows you to specify the type of the OS - that is included in the disk if creating a VM from user-image or a - specialized VHD.

    Possible values are:

    **Windows** -

    **Linux**. Possible values include: 'Windows', 'Linux' - :type os_type: str or - ~azure.mgmt.compute.v2018_04_01.models.OperatingSystemTypes - :param encryption_settings: Specifies the encryption settings for the OS - Disk.

    Minimum api-version: 2015-06-15 - :type encryption_settings: - ~azure.mgmt.compute.v2018_04_01.models.DiskEncryptionSettings - :param name: The disk name. - :type name: str - :param vhd: The virtual hard disk. - :type vhd: ~azure.mgmt.compute.v2018_04_01.models.VirtualHardDisk - :param image: The source user image virtual hard disk. The virtual hard - disk will be copied before being attached to the virtual machine. If - SourceImage is provided, the destination virtual hard drive must not - exist. - :type image: ~azure.mgmt.compute.v2018_04_01.models.VirtualHardDisk - :param caching: Specifies the caching requirements.

    Possible - values are:

    **None**

    **ReadOnly**

    **ReadWrite** -

    Default: **None for Standard storage. ReadOnly for Premium - storage**. Possible values include: 'None', 'ReadOnly', 'ReadWrite' - :type caching: str or ~azure.mgmt.compute.v2018_04_01.models.CachingTypes - :param write_accelerator_enabled: Specifies whether writeAccelerator - should be enabled or disabled on the disk. - :type write_accelerator_enabled: bool - :param create_option: Required. Specifies how the virtual machine should - be created.

    Possible values are:

    **Attach** \\u2013 This - value is used when you are using a specialized disk to create the virtual - machine.

    **FromImage** \\u2013 This value is used when you are - using an image to create the virtual machine. If you are using a platform - image, you also use the imageReference element described above. If you are - using a marketplace image, you also use the plan element previously - described. Possible values include: 'FromImage', 'Empty', 'Attach' - :type create_option: str or - ~azure.mgmt.compute.v2018_04_01.models.DiskCreateOptionTypes - :param disk_size_gb: Specifies the size of an empty data disk in - gigabytes. This element can be used to overwrite the size of the disk in a - virtual machine image.

    This value cannot be larger than 1023 GB - :type disk_size_gb: int - :param managed_disk: The managed disk parameters. - :type managed_disk: - ~azure.mgmt.compute.v2018_04_01.models.ManagedDiskParameters - """ - - _validation = { - 'create_option': {'required': True}, - } - - _attribute_map = { - 'os_type': {'key': 'osType', 'type': 'OperatingSystemTypes'}, - 'encryption_settings': {'key': 'encryptionSettings', 'type': 'DiskEncryptionSettings'}, - 'name': {'key': 'name', 'type': 'str'}, - 'vhd': {'key': 'vhd', 'type': 'VirtualHardDisk'}, - 'image': {'key': 'image', 'type': 'VirtualHardDisk'}, - 'caching': {'key': 'caching', 'type': 'CachingTypes'}, - 'write_accelerator_enabled': {'key': 'writeAcceleratorEnabled', 'type': 'bool'}, - 'create_option': {'key': 'createOption', 'type': 'str'}, - 'disk_size_gb': {'key': 'diskSizeGB', 'type': 'int'}, - 'managed_disk': {'key': 'managedDisk', 'type': 'ManagedDiskParameters'}, - } - - def __init__(self, *, create_option, os_type=None, encryption_settings=None, name: str=None, vhd=None, image=None, caching=None, write_accelerator_enabled: bool=None, disk_size_gb: int=None, managed_disk=None, **kwargs) -> None: - super(OSDisk, self).__init__(**kwargs) - self.os_type = os_type - self.encryption_settings = encryption_settings - self.name = name - self.vhd = vhd - self.image = image - self.caching = caching - self.write_accelerator_enabled = write_accelerator_enabled - self.create_option = create_option - self.disk_size_gb = disk_size_gb - self.managed_disk = managed_disk diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/os_profile.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/os_profile.py deleted file mode 100644 index 43a0df6f1582..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/os_profile.py +++ /dev/null @@ -1,100 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class OSProfile(Model): - """Specifies the operating system settings for the virtual machine. - - :param computer_name: Specifies the host OS name of the virtual machine. -

    This name cannot be updated after the VM is created.

    - **Max-length (Windows):** 15 characters

    **Max-length (Linux):** - 64 characters.

    For naming conventions and restrictions see [Azure - infrastructure services implementation - guidelines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-infrastructure-subscription-accounts-guidelines?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json#1-naming-conventions). - :type computer_name: str - :param admin_username: Specifies the name of the administrator account. -

    **Windows-only restriction:** Cannot end in "."

    - **Disallowed values:** "administrator", "admin", "user", "user1", "test", - "user2", "test1", "user3", "admin1", "1", "123", "a", "actuser", "adm", - "admin2", "aspnet", "backup", "console", "david", "guest", "john", - "owner", "root", "server", "sql", "support", "support_388945a0", "sys", - "test2", "test3", "user4", "user5".

    **Minimum-length (Linux):** 1 - character

    **Max-length (Linux):** 64 characters

    - **Max-length (Windows):** 20 characters

  • For root access to - the Linux VM, see [Using root privileges on Linux virtual machines in - Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-use-root-privileges?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json)
  • - For a list of built-in system users on Linux that should not be used in - this field, see [Selecting User Names for Linux on - Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-usernames?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json) - :type admin_username: str - :param admin_password: Specifies the password of the administrator - account.

    **Minimum-length (Windows):** 8 characters

    - **Minimum-length (Linux):** 6 characters

    **Max-length - (Windows):** 123 characters

    **Max-length (Linux):** 72 characters -

    **Complexity requirements:** 3 out of 4 conditions below need to - be fulfilled
    Has lower characters
    Has upper characters
    Has a - digit
    Has a special character (Regex match [\\W_])

    - **Disallowed values:** "abc@123", "P@$$w0rd", "P@ssw0rd", "P@ssword123", - "Pa$$word", "pass@word1", "Password!", "Password1", "Password22", - "iloveyou!"

    For resetting the password, see [How to reset the - Remote Desktop service or its login password in a Windows - VM](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-reset-rdp?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json) -

    For resetting root password, see [Manage users, SSH, and check or - repair disks on Azure Linux VMs using the VMAccess - Extension](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-using-vmaccess-extension?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json#reset-root-password) - :type admin_password: str - :param custom_data: Specifies a base-64 encoded string of custom data. The - base-64 encoded string is decoded to a binary array that is saved as a - file on the Virtual Machine. The maximum length of the binary array is - 65535 bytes.

    For using cloud-init for your VM, see [Using - cloud-init to customize a Linux VM during - creation](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-using-cloud-init?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json) - :type custom_data: str - :param windows_configuration: Specifies Windows operating system settings - on the virtual machine. - :type windows_configuration: - ~azure.mgmt.compute.v2018_04_01.models.WindowsConfiguration - :param linux_configuration: Specifies the Linux operating system settings - on the virtual machine.

    For a list of supported Linux - distributions, see [Linux on Azure-Endorsed - Distributions](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-endorsed-distros?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json) -

    For running non-endorsed distributions, see [Information for - Non-Endorsed - Distributions](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-create-upload-generic?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json). - :type linux_configuration: - ~azure.mgmt.compute.v2018_04_01.models.LinuxConfiguration - :param secrets: Specifies set of certificates that should be installed - onto the virtual machine. - :type secrets: - list[~azure.mgmt.compute.v2018_04_01.models.VaultSecretGroup] - """ - - _attribute_map = { - 'computer_name': {'key': 'computerName', 'type': 'str'}, - 'admin_username': {'key': 'adminUsername', 'type': 'str'}, - 'admin_password': {'key': 'adminPassword', 'type': 'str'}, - 'custom_data': {'key': 'customData', 'type': 'str'}, - 'windows_configuration': {'key': 'windowsConfiguration', 'type': 'WindowsConfiguration'}, - 'linux_configuration': {'key': 'linuxConfiguration', 'type': 'LinuxConfiguration'}, - 'secrets': {'key': 'secrets', 'type': '[VaultSecretGroup]'}, - } - - def __init__(self, **kwargs): - super(OSProfile, self).__init__(**kwargs) - self.computer_name = kwargs.get('computer_name', None) - self.admin_username = kwargs.get('admin_username', None) - self.admin_password = kwargs.get('admin_password', None) - self.custom_data = kwargs.get('custom_data', None) - self.windows_configuration = kwargs.get('windows_configuration', None) - self.linux_configuration = kwargs.get('linux_configuration', None) - self.secrets = kwargs.get('secrets', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/os_profile_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/os_profile_py3.py deleted file mode 100644 index 4251ac838119..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/os_profile_py3.py +++ /dev/null @@ -1,100 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class OSProfile(Model): - """Specifies the operating system settings for the virtual machine. - - :param computer_name: Specifies the host OS name of the virtual machine. -

    This name cannot be updated after the VM is created.

    - **Max-length (Windows):** 15 characters

    **Max-length (Linux):** - 64 characters.

    For naming conventions and restrictions see [Azure - infrastructure services implementation - guidelines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-infrastructure-subscription-accounts-guidelines?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json#1-naming-conventions). - :type computer_name: str - :param admin_username: Specifies the name of the administrator account. -

    **Windows-only restriction:** Cannot end in "."

    - **Disallowed values:** "administrator", "admin", "user", "user1", "test", - "user2", "test1", "user3", "admin1", "1", "123", "a", "actuser", "adm", - "admin2", "aspnet", "backup", "console", "david", "guest", "john", - "owner", "root", "server", "sql", "support", "support_388945a0", "sys", - "test2", "test3", "user4", "user5".

    **Minimum-length (Linux):** 1 - character

    **Max-length (Linux):** 64 characters

    - **Max-length (Windows):** 20 characters

  • For root access to - the Linux VM, see [Using root privileges on Linux virtual machines in - Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-use-root-privileges?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json)
  • - For a list of built-in system users on Linux that should not be used in - this field, see [Selecting User Names for Linux on - Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-usernames?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json) - :type admin_username: str - :param admin_password: Specifies the password of the administrator - account.

    **Minimum-length (Windows):** 8 characters

    - **Minimum-length (Linux):** 6 characters

    **Max-length - (Windows):** 123 characters

    **Max-length (Linux):** 72 characters -

    **Complexity requirements:** 3 out of 4 conditions below need to - be fulfilled
    Has lower characters
    Has upper characters
    Has a - digit
    Has a special character (Regex match [\\W_])

    - **Disallowed values:** "abc@123", "P@$$w0rd", "P@ssw0rd", "P@ssword123", - "Pa$$word", "pass@word1", "Password!", "Password1", "Password22", - "iloveyou!"

    For resetting the password, see [How to reset the - Remote Desktop service or its login password in a Windows - VM](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-reset-rdp?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json) -

    For resetting root password, see [Manage users, SSH, and check or - repair disks on Azure Linux VMs using the VMAccess - Extension](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-using-vmaccess-extension?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json#reset-root-password) - :type admin_password: str - :param custom_data: Specifies a base-64 encoded string of custom data. The - base-64 encoded string is decoded to a binary array that is saved as a - file on the Virtual Machine. The maximum length of the binary array is - 65535 bytes.

    For using cloud-init for your VM, see [Using - cloud-init to customize a Linux VM during - creation](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-using-cloud-init?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json) - :type custom_data: str - :param windows_configuration: Specifies Windows operating system settings - on the virtual machine. - :type windows_configuration: - ~azure.mgmt.compute.v2018_04_01.models.WindowsConfiguration - :param linux_configuration: Specifies the Linux operating system settings - on the virtual machine.

    For a list of supported Linux - distributions, see [Linux on Azure-Endorsed - Distributions](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-endorsed-distros?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json) -

    For running non-endorsed distributions, see [Information for - Non-Endorsed - Distributions](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-create-upload-generic?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json). - :type linux_configuration: - ~azure.mgmt.compute.v2018_04_01.models.LinuxConfiguration - :param secrets: Specifies set of certificates that should be installed - onto the virtual machine. - :type secrets: - list[~azure.mgmt.compute.v2018_04_01.models.VaultSecretGroup] - """ - - _attribute_map = { - 'computer_name': {'key': 'computerName', 'type': 'str'}, - 'admin_username': {'key': 'adminUsername', 'type': 'str'}, - 'admin_password': {'key': 'adminPassword', 'type': 'str'}, - 'custom_data': {'key': 'customData', 'type': 'str'}, - 'windows_configuration': {'key': 'windowsConfiguration', 'type': 'WindowsConfiguration'}, - 'linux_configuration': {'key': 'linuxConfiguration', 'type': 'LinuxConfiguration'}, - 'secrets': {'key': 'secrets', 'type': '[VaultSecretGroup]'}, - } - - def __init__(self, *, computer_name: str=None, admin_username: str=None, admin_password: str=None, custom_data: str=None, windows_configuration=None, linux_configuration=None, secrets=None, **kwargs) -> None: - super(OSProfile, self).__init__(**kwargs) - self.computer_name = computer_name - self.admin_username = admin_username - self.admin_password = admin_password - self.custom_data = custom_data - self.windows_configuration = windows_configuration - self.linux_configuration = linux_configuration - self.secrets = secrets diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/plan.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/plan.py deleted file mode 100644 index d42b6b32cfac..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/plan.py +++ /dev/null @@ -1,46 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class Plan(Model): - """Specifies information about the marketplace image used to create the - virtual machine. This element is only used for marketplace images. Before - you can use a marketplace image from an API, you must enable the image for - programmatic use. In the Azure portal, find the marketplace image that you - want to use and then click **Want to deploy programmatically, Get Started - ->**. Enter any required information and then click **Save**. - - :param name: The plan ID. - :type name: str - :param publisher: The publisher ID. - :type publisher: str - :param product: Specifies the product of the image from the marketplace. - This is the same value as Offer under the imageReference element. - :type product: str - :param promotion_code: The promotion code. - :type promotion_code: str - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'publisher': {'key': 'publisher', 'type': 'str'}, - 'product': {'key': 'product', 'type': 'str'}, - 'promotion_code': {'key': 'promotionCode', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(Plan, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.publisher = kwargs.get('publisher', None) - self.product = kwargs.get('product', None) - self.promotion_code = kwargs.get('promotion_code', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/plan_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/plan_py3.py deleted file mode 100644 index 9cca2c78a123..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/plan_py3.py +++ /dev/null @@ -1,46 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class Plan(Model): - """Specifies information about the marketplace image used to create the - virtual machine. This element is only used for marketplace images. Before - you can use a marketplace image from an API, you must enable the image for - programmatic use. In the Azure portal, find the marketplace image that you - want to use and then click **Want to deploy programmatically, Get Started - ->**. Enter any required information and then click **Save**. - - :param name: The plan ID. - :type name: str - :param publisher: The publisher ID. - :type publisher: str - :param product: Specifies the product of the image from the marketplace. - This is the same value as Offer under the imageReference element. - :type product: str - :param promotion_code: The promotion code. - :type promotion_code: str - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'publisher': {'key': 'publisher', 'type': 'str'}, - 'product': {'key': 'product', 'type': 'str'}, - 'promotion_code': {'key': 'promotionCode', 'type': 'str'}, - } - - def __init__(self, *, name: str=None, publisher: str=None, product: str=None, promotion_code: str=None, **kwargs) -> None: - super(Plan, self).__init__(**kwargs) - self.name = name - self.publisher = publisher - self.product = product - self.promotion_code = promotion_code diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/proximity_placement_group.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/proximity_placement_group.py deleted file mode 100644 index b2eae1228b55..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/proximity_placement_group.py +++ /dev/null @@ -1,79 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource import Resource - - -class ProximityPlacementGroup(Resource): - """Specifies information about the proximity placement group. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource Id - :vartype id: str - :ivar name: Resource name - :vartype name: str - :ivar type: Resource type - :vartype type: str - :param location: Required. Resource location - :type location: str - :param tags: Resource tags - :type tags: dict[str, str] - :param proximity_placement_group_type: Specifies the type of the proximity - placement group.

    Possible values are:

    **Standard** -

    **Ultra**. Possible values include: 'Standard', 'Ultra' - :type proximity_placement_group_type: str or - ~azure.mgmt.compute.v2018_04_01.models.ProximityPlacementGroupType - :ivar virtual_machines: A list of references to all virtual machines in - the proximity placement group. - :vartype virtual_machines: - list[~azure.mgmt.compute.v2018_04_01.models.SubResource] - :ivar virtual_machine_scale_sets: A list of references to all virtual - machine scale sets in the proximity placement group. - :vartype virtual_machine_scale_sets: - list[~azure.mgmt.compute.v2018_04_01.models.SubResource] - :ivar availability_sets: A list of references to all availability sets in - the proximity placement group. - :vartype availability_sets: - list[~azure.mgmt.compute.v2018_04_01.models.SubResource] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - 'virtual_machines': {'readonly': True}, - 'virtual_machine_scale_sets': {'readonly': True}, - 'availability_sets': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'proximity_placement_group_type': {'key': 'properties.proximityPlacementGroupType', 'type': 'str'}, - 'virtual_machines': {'key': 'properties.virtualMachines', 'type': '[SubResource]'}, - 'virtual_machine_scale_sets': {'key': 'properties.virtualMachineScaleSets', 'type': '[SubResource]'}, - 'availability_sets': {'key': 'properties.availabilitySets', 'type': '[SubResource]'}, - } - - def __init__(self, **kwargs): - super(ProximityPlacementGroup, self).__init__(**kwargs) - self.proximity_placement_group_type = kwargs.get('proximity_placement_group_type', None) - self.virtual_machines = None - self.virtual_machine_scale_sets = None - self.availability_sets = None diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/proximity_placement_group_paged.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/proximity_placement_group_paged.py deleted file mode 100644 index 5eece203908e..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/proximity_placement_group_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class ProximityPlacementGroupPaged(Paged): - """ - A paging container for iterating over a list of :class:`ProximityPlacementGroup ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[ProximityPlacementGroup]'} - } - - def __init__(self, *args, **kwargs): - - super(ProximityPlacementGroupPaged, self).__init__(*args, **kwargs) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/proximity_placement_group_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/proximity_placement_group_py3.py deleted file mode 100644 index 47c3743e1ebf..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/proximity_placement_group_py3.py +++ /dev/null @@ -1,79 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource_py3 import Resource - - -class ProximityPlacementGroup(Resource): - """Specifies information about the proximity placement group. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource Id - :vartype id: str - :ivar name: Resource name - :vartype name: str - :ivar type: Resource type - :vartype type: str - :param location: Required. Resource location - :type location: str - :param tags: Resource tags - :type tags: dict[str, str] - :param proximity_placement_group_type: Specifies the type of the proximity - placement group.

    Possible values are:

    **Standard** -

    **Ultra**. Possible values include: 'Standard', 'Ultra' - :type proximity_placement_group_type: str or - ~azure.mgmt.compute.v2018_04_01.models.ProximityPlacementGroupType - :ivar virtual_machines: A list of references to all virtual machines in - the proximity placement group. - :vartype virtual_machines: - list[~azure.mgmt.compute.v2018_04_01.models.SubResource] - :ivar virtual_machine_scale_sets: A list of references to all virtual - machine scale sets in the proximity placement group. - :vartype virtual_machine_scale_sets: - list[~azure.mgmt.compute.v2018_04_01.models.SubResource] - :ivar availability_sets: A list of references to all availability sets in - the proximity placement group. - :vartype availability_sets: - list[~azure.mgmt.compute.v2018_04_01.models.SubResource] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - 'virtual_machines': {'readonly': True}, - 'virtual_machine_scale_sets': {'readonly': True}, - 'availability_sets': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'proximity_placement_group_type': {'key': 'properties.proximityPlacementGroupType', 'type': 'str'}, - 'virtual_machines': {'key': 'properties.virtualMachines', 'type': '[SubResource]'}, - 'virtual_machine_scale_sets': {'key': 'properties.virtualMachineScaleSets', 'type': '[SubResource]'}, - 'availability_sets': {'key': 'properties.availabilitySets', 'type': '[SubResource]'}, - } - - def __init__(self, *, location: str, tags=None, proximity_placement_group_type=None, **kwargs) -> None: - super(ProximityPlacementGroup, self).__init__(location=location, tags=tags, **kwargs) - self.proximity_placement_group_type = proximity_placement_group_type - self.virtual_machines = None - self.virtual_machine_scale_sets = None - self.availability_sets = None diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/proximity_placement_group_update.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/proximity_placement_group_update.py deleted file mode 100644 index cf795d53b0c1..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/proximity_placement_group_update.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .update_resource import UpdateResource - - -class ProximityPlacementGroupUpdate(UpdateResource): - """Specifies information about the proximity placement group. - - :param tags: Resource tags - :type tags: dict[str, str] - """ - - _attribute_map = { - 'tags': {'key': 'tags', 'type': '{str}'}, - } - - def __init__(self, **kwargs): - super(ProximityPlacementGroupUpdate, self).__init__(**kwargs) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/proximity_placement_group_update_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/proximity_placement_group_update_py3.py deleted file mode 100644 index 9d60be7ba9ed..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/proximity_placement_group_update_py3.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .update_resource_py3 import UpdateResource - - -class ProximityPlacementGroupUpdate(UpdateResource): - """Specifies information about the proximity placement group. - - :param tags: Resource tags - :type tags: dict[str, str] - """ - - _attribute_map = { - 'tags': {'key': 'tags', 'type': '{str}'}, - } - - def __init__(self, *, tags=None, **kwargs) -> None: - super(ProximityPlacementGroupUpdate, self).__init__(tags=tags, **kwargs) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/purchase_plan.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/purchase_plan.py deleted file mode 100644 index 2e1509addca6..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/purchase_plan.py +++ /dev/null @@ -1,47 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class PurchasePlan(Model): - """Used for establishing the purchase context of any 3rd Party artifact - through MarketPlace. - - All required parameters must be populated in order to send to Azure. - - :param publisher: Required. The publisher ID. - :type publisher: str - :param name: Required. The plan ID. - :type name: str - :param product: Required. Specifies the product of the image from the - marketplace. This is the same value as Offer under the imageReference - element. - :type product: str - """ - - _validation = { - 'publisher': {'required': True}, - 'name': {'required': True}, - 'product': {'required': True}, - } - - _attribute_map = { - 'publisher': {'key': 'publisher', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'product': {'key': 'product', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(PurchasePlan, self).__init__(**kwargs) - self.publisher = kwargs.get('publisher', None) - self.name = kwargs.get('name', None) - self.product = kwargs.get('product', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/purchase_plan_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/purchase_plan_py3.py deleted file mode 100644 index 26f7996f1633..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/purchase_plan_py3.py +++ /dev/null @@ -1,47 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class PurchasePlan(Model): - """Used for establishing the purchase context of any 3rd Party artifact - through MarketPlace. - - All required parameters must be populated in order to send to Azure. - - :param publisher: Required. The publisher ID. - :type publisher: str - :param name: Required. The plan ID. - :type name: str - :param product: Required. Specifies the product of the image from the - marketplace. This is the same value as Offer under the imageReference - element. - :type product: str - """ - - _validation = { - 'publisher': {'required': True}, - 'name': {'required': True}, - 'product': {'required': True}, - } - - _attribute_map = { - 'publisher': {'key': 'publisher', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'product': {'key': 'product', 'type': 'str'}, - } - - def __init__(self, *, publisher: str, name: str, product: str, **kwargs) -> None: - super(PurchasePlan, self).__init__(**kwargs) - self.publisher = publisher - self.name = name - self.product = product diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/recovery_walk_response.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/recovery_walk_response.py deleted file mode 100644 index 8dcbca604c7e..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/recovery_walk_response.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class RecoveryWalkResponse(Model): - """Response after calling a manual recovery walk. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar walk_performed: Whether the recovery walk was performed - :vartype walk_performed: bool - :ivar next_platform_update_domain: The next update domain that needs to be - walked. Null means walk spanning all update domains has been completed - :vartype next_platform_update_domain: int - """ - - _validation = { - 'walk_performed': {'readonly': True}, - 'next_platform_update_domain': {'readonly': True}, - } - - _attribute_map = { - 'walk_performed': {'key': 'walkPerformed', 'type': 'bool'}, - 'next_platform_update_domain': {'key': 'nextPlatformUpdateDomain', 'type': 'int'}, - } - - def __init__(self, **kwargs): - super(RecoveryWalkResponse, self).__init__(**kwargs) - self.walk_performed = None - self.next_platform_update_domain = None diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/recovery_walk_response_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/recovery_walk_response_py3.py deleted file mode 100644 index 5b24a0ed9b7a..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/recovery_walk_response_py3.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class RecoveryWalkResponse(Model): - """Response after calling a manual recovery walk. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar walk_performed: Whether the recovery walk was performed - :vartype walk_performed: bool - :ivar next_platform_update_domain: The next update domain that needs to be - walked. Null means walk spanning all update domains has been completed - :vartype next_platform_update_domain: int - """ - - _validation = { - 'walk_performed': {'readonly': True}, - 'next_platform_update_domain': {'readonly': True}, - } - - _attribute_map = { - 'walk_performed': {'key': 'walkPerformed', 'type': 'bool'}, - 'next_platform_update_domain': {'key': 'nextPlatformUpdateDomain', 'type': 'int'}, - } - - def __init__(self, **kwargs) -> None: - super(RecoveryWalkResponse, self).__init__(**kwargs) - self.walk_performed = None - self.next_platform_update_domain = None diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/request_rate_by_interval_input.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/request_rate_by_interval_input.py deleted file mode 100644 index 5e0f97a95128..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/request_rate_by_interval_input.py +++ /dev/null @@ -1,60 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .log_analytics_input_base import LogAnalyticsInputBase - - -class RequestRateByIntervalInput(LogAnalyticsInputBase): - """Api request input for LogAnalytics getRequestRateByInterval Api. - - All required parameters must be populated in order to send to Azure. - - :param blob_container_sas_uri: Required. SAS Uri of the logging blob - container to which LogAnalytics Api writes output logs to. - :type blob_container_sas_uri: str - :param from_time: Required. From time of the query - :type from_time: datetime - :param to_time: Required. To time of the query - :type to_time: datetime - :param group_by_throttle_policy: Group query result by Throttle Policy - applied. - :type group_by_throttle_policy: bool - :param group_by_operation_name: Group query result by Operation Name. - :type group_by_operation_name: bool - :param group_by_resource_name: Group query result by Resource Name. - :type group_by_resource_name: bool - :param interval_length: Required. Interval value in minutes used to create - LogAnalytics call rate logs. Possible values include: 'ThreeMins', - 'FiveMins', 'ThirtyMins', 'SixtyMins' - :type interval_length: str or - ~azure.mgmt.compute.v2018_04_01.models.IntervalInMins - """ - - _validation = { - 'blob_container_sas_uri': {'required': True}, - 'from_time': {'required': True}, - 'to_time': {'required': True}, - 'interval_length': {'required': True}, - } - - _attribute_map = { - 'blob_container_sas_uri': {'key': 'blobContainerSasUri', 'type': 'str'}, - 'from_time': {'key': 'fromTime', 'type': 'iso-8601'}, - 'to_time': {'key': 'toTime', 'type': 'iso-8601'}, - 'group_by_throttle_policy': {'key': 'groupByThrottlePolicy', 'type': 'bool'}, - 'group_by_operation_name': {'key': 'groupByOperationName', 'type': 'bool'}, - 'group_by_resource_name': {'key': 'groupByResourceName', 'type': 'bool'}, - 'interval_length': {'key': 'intervalLength', 'type': 'IntervalInMins'}, - } - - def __init__(self, **kwargs): - super(RequestRateByIntervalInput, self).__init__(**kwargs) - self.interval_length = kwargs.get('interval_length', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/request_rate_by_interval_input_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/request_rate_by_interval_input_py3.py deleted file mode 100644 index 730abee03ba3..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/request_rate_by_interval_input_py3.py +++ /dev/null @@ -1,60 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .log_analytics_input_base_py3 import LogAnalyticsInputBase - - -class RequestRateByIntervalInput(LogAnalyticsInputBase): - """Api request input for LogAnalytics getRequestRateByInterval Api. - - All required parameters must be populated in order to send to Azure. - - :param blob_container_sas_uri: Required. SAS Uri of the logging blob - container to which LogAnalytics Api writes output logs to. - :type blob_container_sas_uri: str - :param from_time: Required. From time of the query - :type from_time: datetime - :param to_time: Required. To time of the query - :type to_time: datetime - :param group_by_throttle_policy: Group query result by Throttle Policy - applied. - :type group_by_throttle_policy: bool - :param group_by_operation_name: Group query result by Operation Name. - :type group_by_operation_name: bool - :param group_by_resource_name: Group query result by Resource Name. - :type group_by_resource_name: bool - :param interval_length: Required. Interval value in minutes used to create - LogAnalytics call rate logs. Possible values include: 'ThreeMins', - 'FiveMins', 'ThirtyMins', 'SixtyMins' - :type interval_length: str or - ~azure.mgmt.compute.v2018_04_01.models.IntervalInMins - """ - - _validation = { - 'blob_container_sas_uri': {'required': True}, - 'from_time': {'required': True}, - 'to_time': {'required': True}, - 'interval_length': {'required': True}, - } - - _attribute_map = { - 'blob_container_sas_uri': {'key': 'blobContainerSasUri', 'type': 'str'}, - 'from_time': {'key': 'fromTime', 'type': 'iso-8601'}, - 'to_time': {'key': 'toTime', 'type': 'iso-8601'}, - 'group_by_throttle_policy': {'key': 'groupByThrottlePolicy', 'type': 'bool'}, - 'group_by_operation_name': {'key': 'groupByOperationName', 'type': 'bool'}, - 'group_by_resource_name': {'key': 'groupByResourceName', 'type': 'bool'}, - 'interval_length': {'key': 'intervalLength', 'type': 'IntervalInMins'}, - } - - def __init__(self, *, blob_container_sas_uri: str, from_time, to_time, interval_length, group_by_throttle_policy: bool=None, group_by_operation_name: bool=None, group_by_resource_name: bool=None, **kwargs) -> None: - super(RequestRateByIntervalInput, self).__init__(blob_container_sas_uri=blob_container_sas_uri, from_time=from_time, to_time=to_time, group_by_throttle_policy=group_by_throttle_policy, group_by_operation_name=group_by_operation_name, group_by_resource_name=group_by_resource_name, **kwargs) - self.interval_length = interval_length diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/resource.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/resource.py deleted file mode 100644 index 5dd7d481c685..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/resource.py +++ /dev/null @@ -1,56 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class Resource(Model): - """The Resource model definition. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource Id - :vartype id: str - :ivar name: Resource name - :vartype name: str - :ivar type: Resource type - :vartype type: str - :param location: Required. Resource location - :type location: str - :param tags: Resource tags - :type tags: dict[str, str] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - } - - def __init__(self, **kwargs): - super(Resource, self).__init__(**kwargs) - self.id = None - self.name = None - self.type = None - self.location = kwargs.get('location', None) - self.tags = kwargs.get('tags', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/resource_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/resource_py3.py deleted file mode 100644 index 2f3702caf609..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/resource_py3.py +++ /dev/null @@ -1,56 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class Resource(Model): - """The Resource model definition. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource Id - :vartype id: str - :ivar name: Resource name - :vartype name: str - :ivar type: Resource type - :vartype type: str - :param location: Required. Resource location - :type location: str - :param tags: Resource tags - :type tags: dict[str, str] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - } - - def __init__(self, *, location: str, tags=None, **kwargs) -> None: - super(Resource, self).__init__(**kwargs) - self.id = None - self.name = None - self.type = None - self.location = location - self.tags = tags diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/rollback_status_info.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/rollback_status_info.py deleted file mode 100644 index ebc35953f076..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/rollback_status_info.py +++ /dev/null @@ -1,48 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class RollbackStatusInfo(Model): - """Information about rollback on failed VM instances after a OS Upgrade - operation. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar successfully_rolledback_instance_count: The number of instances - which have been successfully rolled back. - :vartype successfully_rolledback_instance_count: int - :ivar failed_rolledback_instance_count: The number of instances which - failed to rollback. - :vartype failed_rolledback_instance_count: int - :ivar rollback_error: Error details if OS rollback failed. - :vartype rollback_error: ~azure.mgmt.compute.v2018_04_01.models.ApiError - """ - - _validation = { - 'successfully_rolledback_instance_count': {'readonly': True}, - 'failed_rolledback_instance_count': {'readonly': True}, - 'rollback_error': {'readonly': True}, - } - - _attribute_map = { - 'successfully_rolledback_instance_count': {'key': 'successfullyRolledbackInstanceCount', 'type': 'int'}, - 'failed_rolledback_instance_count': {'key': 'failedRolledbackInstanceCount', 'type': 'int'}, - 'rollback_error': {'key': 'rollbackError', 'type': 'ApiError'}, - } - - def __init__(self, **kwargs): - super(RollbackStatusInfo, self).__init__(**kwargs) - self.successfully_rolledback_instance_count = None - self.failed_rolledback_instance_count = None - self.rollback_error = None diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/rollback_status_info_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/rollback_status_info_py3.py deleted file mode 100644 index 478f15ca323b..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/rollback_status_info_py3.py +++ /dev/null @@ -1,48 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class RollbackStatusInfo(Model): - """Information about rollback on failed VM instances after a OS Upgrade - operation. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar successfully_rolledback_instance_count: The number of instances - which have been successfully rolled back. - :vartype successfully_rolledback_instance_count: int - :ivar failed_rolledback_instance_count: The number of instances which - failed to rollback. - :vartype failed_rolledback_instance_count: int - :ivar rollback_error: Error details if OS rollback failed. - :vartype rollback_error: ~azure.mgmt.compute.v2018_04_01.models.ApiError - """ - - _validation = { - 'successfully_rolledback_instance_count': {'readonly': True}, - 'failed_rolledback_instance_count': {'readonly': True}, - 'rollback_error': {'readonly': True}, - } - - _attribute_map = { - 'successfully_rolledback_instance_count': {'key': 'successfullyRolledbackInstanceCount', 'type': 'int'}, - 'failed_rolledback_instance_count': {'key': 'failedRolledbackInstanceCount', 'type': 'int'}, - 'rollback_error': {'key': 'rollbackError', 'type': 'ApiError'}, - } - - def __init__(self, **kwargs) -> None: - super(RollbackStatusInfo, self).__init__(**kwargs) - self.successfully_rolledback_instance_count = None - self.failed_rolledback_instance_count = None - self.rollback_error = None diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/rolling_upgrade_policy.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/rolling_upgrade_policy.py deleted file mode 100644 index 1eecaa5e2e65..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/rolling_upgrade_policy.py +++ /dev/null @@ -1,63 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class RollingUpgradePolicy(Model): - """The configuration parameters used while performing a rolling upgrade. - - :param max_batch_instance_percent: The maximum percent of total virtual - machine instances that will be upgraded simultaneously by the rolling - upgrade in one batch. As this is a maximum, unhealthy instances in - previous or future batches can cause the percentage of instances in a - batch to decrease to ensure higher reliability. The default value for this - parameter is 20%. - :type max_batch_instance_percent: int - :param max_unhealthy_instance_percent: The maximum percentage of the total - virtual machine instances in the scale set that can be simultaneously - unhealthy, either as a result of being upgraded, or by being found in an - unhealthy state by the virtual machine health checks before the rolling - upgrade aborts. This constraint will be checked prior to starting any - batch. The default value for this parameter is 20%. - :type max_unhealthy_instance_percent: int - :param max_unhealthy_upgraded_instance_percent: The maximum percentage of - upgraded virtual machine instances that can be found to be in an unhealthy - state. This check will happen after each batch is upgraded. If this - percentage is ever exceeded, the rolling update aborts. The default value - for this parameter is 20%. - :type max_unhealthy_upgraded_instance_percent: int - :param pause_time_between_batches: The wait time between completing the - update for all virtual machines in one batch and starting the next batch. - The time duration should be specified in ISO 8601 format. The default - value is 0 seconds (PT0S). - :type pause_time_between_batches: str - """ - - _validation = { - 'max_batch_instance_percent': {'maximum': 100, 'minimum': 5}, - 'max_unhealthy_instance_percent': {'maximum': 100, 'minimum': 5}, - 'max_unhealthy_upgraded_instance_percent': {'maximum': 100, 'minimum': 0}, - } - - _attribute_map = { - 'max_batch_instance_percent': {'key': 'maxBatchInstancePercent', 'type': 'int'}, - 'max_unhealthy_instance_percent': {'key': 'maxUnhealthyInstancePercent', 'type': 'int'}, - 'max_unhealthy_upgraded_instance_percent': {'key': 'maxUnhealthyUpgradedInstancePercent', 'type': 'int'}, - 'pause_time_between_batches': {'key': 'pauseTimeBetweenBatches', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(RollingUpgradePolicy, self).__init__(**kwargs) - self.max_batch_instance_percent = kwargs.get('max_batch_instance_percent', None) - self.max_unhealthy_instance_percent = kwargs.get('max_unhealthy_instance_percent', None) - self.max_unhealthy_upgraded_instance_percent = kwargs.get('max_unhealthy_upgraded_instance_percent', None) - self.pause_time_between_batches = kwargs.get('pause_time_between_batches', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/rolling_upgrade_policy_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/rolling_upgrade_policy_py3.py deleted file mode 100644 index e698a382f112..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/rolling_upgrade_policy_py3.py +++ /dev/null @@ -1,63 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class RollingUpgradePolicy(Model): - """The configuration parameters used while performing a rolling upgrade. - - :param max_batch_instance_percent: The maximum percent of total virtual - machine instances that will be upgraded simultaneously by the rolling - upgrade in one batch. As this is a maximum, unhealthy instances in - previous or future batches can cause the percentage of instances in a - batch to decrease to ensure higher reliability. The default value for this - parameter is 20%. - :type max_batch_instance_percent: int - :param max_unhealthy_instance_percent: The maximum percentage of the total - virtual machine instances in the scale set that can be simultaneously - unhealthy, either as a result of being upgraded, or by being found in an - unhealthy state by the virtual machine health checks before the rolling - upgrade aborts. This constraint will be checked prior to starting any - batch. The default value for this parameter is 20%. - :type max_unhealthy_instance_percent: int - :param max_unhealthy_upgraded_instance_percent: The maximum percentage of - upgraded virtual machine instances that can be found to be in an unhealthy - state. This check will happen after each batch is upgraded. If this - percentage is ever exceeded, the rolling update aborts. The default value - for this parameter is 20%. - :type max_unhealthy_upgraded_instance_percent: int - :param pause_time_between_batches: The wait time between completing the - update for all virtual machines in one batch and starting the next batch. - The time duration should be specified in ISO 8601 format. The default - value is 0 seconds (PT0S). - :type pause_time_between_batches: str - """ - - _validation = { - 'max_batch_instance_percent': {'maximum': 100, 'minimum': 5}, - 'max_unhealthy_instance_percent': {'maximum': 100, 'minimum': 5}, - 'max_unhealthy_upgraded_instance_percent': {'maximum': 100, 'minimum': 0}, - } - - _attribute_map = { - 'max_batch_instance_percent': {'key': 'maxBatchInstancePercent', 'type': 'int'}, - 'max_unhealthy_instance_percent': {'key': 'maxUnhealthyInstancePercent', 'type': 'int'}, - 'max_unhealthy_upgraded_instance_percent': {'key': 'maxUnhealthyUpgradedInstancePercent', 'type': 'int'}, - 'pause_time_between_batches': {'key': 'pauseTimeBetweenBatches', 'type': 'str'}, - } - - def __init__(self, *, max_batch_instance_percent: int=None, max_unhealthy_instance_percent: int=None, max_unhealthy_upgraded_instance_percent: int=None, pause_time_between_batches: str=None, **kwargs) -> None: - super(RollingUpgradePolicy, self).__init__(**kwargs) - self.max_batch_instance_percent = max_batch_instance_percent - self.max_unhealthy_instance_percent = max_unhealthy_instance_percent - self.max_unhealthy_upgraded_instance_percent = max_unhealthy_upgraded_instance_percent - self.pause_time_between_batches = pause_time_between_batches diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/rolling_upgrade_progress_info.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/rolling_upgrade_progress_info.py deleted file mode 100644 index 87e40590e275..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/rolling_upgrade_progress_info.py +++ /dev/null @@ -1,55 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class RollingUpgradeProgressInfo(Model): - """Information about the number of virtual machine instances in each upgrade - state. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar successful_instance_count: The number of instances that have been - successfully upgraded. - :vartype successful_instance_count: int - :ivar failed_instance_count: The number of instances that have failed to - be upgraded successfully. - :vartype failed_instance_count: int - :ivar in_progress_instance_count: The number of instances that are - currently being upgraded. - :vartype in_progress_instance_count: int - :ivar pending_instance_count: The number of instances that have not yet - begun to be upgraded. - :vartype pending_instance_count: int - """ - - _validation = { - 'successful_instance_count': {'readonly': True}, - 'failed_instance_count': {'readonly': True}, - 'in_progress_instance_count': {'readonly': True}, - 'pending_instance_count': {'readonly': True}, - } - - _attribute_map = { - 'successful_instance_count': {'key': 'successfulInstanceCount', 'type': 'int'}, - 'failed_instance_count': {'key': 'failedInstanceCount', 'type': 'int'}, - 'in_progress_instance_count': {'key': 'inProgressInstanceCount', 'type': 'int'}, - 'pending_instance_count': {'key': 'pendingInstanceCount', 'type': 'int'}, - } - - def __init__(self, **kwargs): - super(RollingUpgradeProgressInfo, self).__init__(**kwargs) - self.successful_instance_count = None - self.failed_instance_count = None - self.in_progress_instance_count = None - self.pending_instance_count = None diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/rolling_upgrade_progress_info_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/rolling_upgrade_progress_info_py3.py deleted file mode 100644 index 060abc3063b4..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/rolling_upgrade_progress_info_py3.py +++ /dev/null @@ -1,55 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class RollingUpgradeProgressInfo(Model): - """Information about the number of virtual machine instances in each upgrade - state. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar successful_instance_count: The number of instances that have been - successfully upgraded. - :vartype successful_instance_count: int - :ivar failed_instance_count: The number of instances that have failed to - be upgraded successfully. - :vartype failed_instance_count: int - :ivar in_progress_instance_count: The number of instances that are - currently being upgraded. - :vartype in_progress_instance_count: int - :ivar pending_instance_count: The number of instances that have not yet - begun to be upgraded. - :vartype pending_instance_count: int - """ - - _validation = { - 'successful_instance_count': {'readonly': True}, - 'failed_instance_count': {'readonly': True}, - 'in_progress_instance_count': {'readonly': True}, - 'pending_instance_count': {'readonly': True}, - } - - _attribute_map = { - 'successful_instance_count': {'key': 'successfulInstanceCount', 'type': 'int'}, - 'failed_instance_count': {'key': 'failedInstanceCount', 'type': 'int'}, - 'in_progress_instance_count': {'key': 'inProgressInstanceCount', 'type': 'int'}, - 'pending_instance_count': {'key': 'pendingInstanceCount', 'type': 'int'}, - } - - def __init__(self, **kwargs) -> None: - super(RollingUpgradeProgressInfo, self).__init__(**kwargs) - self.successful_instance_count = None - self.failed_instance_count = None - self.in_progress_instance_count = None - self.pending_instance_count = None diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/rolling_upgrade_running_status.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/rolling_upgrade_running_status.py deleted file mode 100644 index 0fc6dadaaac9..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/rolling_upgrade_running_status.py +++ /dev/null @@ -1,54 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class RollingUpgradeRunningStatus(Model): - """Information about the current running state of the overall upgrade. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar code: Code indicating the current status of the upgrade. Possible - values include: 'RollingForward', 'Cancelled', 'Completed', 'Faulted' - :vartype code: str or - ~azure.mgmt.compute.v2018_04_01.models.RollingUpgradeStatusCode - :ivar start_time: Start time of the upgrade. - :vartype start_time: datetime - :ivar last_action: The last action performed on the rolling upgrade. - Possible values include: 'Start', 'Cancel' - :vartype last_action: str or - ~azure.mgmt.compute.v2018_04_01.models.RollingUpgradeActionType - :ivar last_action_time: Last action time of the upgrade. - :vartype last_action_time: datetime - """ - - _validation = { - 'code': {'readonly': True}, - 'start_time': {'readonly': True}, - 'last_action': {'readonly': True}, - 'last_action_time': {'readonly': True}, - } - - _attribute_map = { - 'code': {'key': 'code', 'type': 'RollingUpgradeStatusCode'}, - 'start_time': {'key': 'startTime', 'type': 'iso-8601'}, - 'last_action': {'key': 'lastAction', 'type': 'RollingUpgradeActionType'}, - 'last_action_time': {'key': 'lastActionTime', 'type': 'iso-8601'}, - } - - def __init__(self, **kwargs): - super(RollingUpgradeRunningStatus, self).__init__(**kwargs) - self.code = None - self.start_time = None - self.last_action = None - self.last_action_time = None diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/rolling_upgrade_running_status_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/rolling_upgrade_running_status_py3.py deleted file mode 100644 index 013502d02229..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/rolling_upgrade_running_status_py3.py +++ /dev/null @@ -1,54 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class RollingUpgradeRunningStatus(Model): - """Information about the current running state of the overall upgrade. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar code: Code indicating the current status of the upgrade. Possible - values include: 'RollingForward', 'Cancelled', 'Completed', 'Faulted' - :vartype code: str or - ~azure.mgmt.compute.v2018_04_01.models.RollingUpgradeStatusCode - :ivar start_time: Start time of the upgrade. - :vartype start_time: datetime - :ivar last_action: The last action performed on the rolling upgrade. - Possible values include: 'Start', 'Cancel' - :vartype last_action: str or - ~azure.mgmt.compute.v2018_04_01.models.RollingUpgradeActionType - :ivar last_action_time: Last action time of the upgrade. - :vartype last_action_time: datetime - """ - - _validation = { - 'code': {'readonly': True}, - 'start_time': {'readonly': True}, - 'last_action': {'readonly': True}, - 'last_action_time': {'readonly': True}, - } - - _attribute_map = { - 'code': {'key': 'code', 'type': 'RollingUpgradeStatusCode'}, - 'start_time': {'key': 'startTime', 'type': 'iso-8601'}, - 'last_action': {'key': 'lastAction', 'type': 'RollingUpgradeActionType'}, - 'last_action_time': {'key': 'lastActionTime', 'type': 'iso-8601'}, - } - - def __init__(self, **kwargs) -> None: - super(RollingUpgradeRunningStatus, self).__init__(**kwargs) - self.code = None - self.start_time = None - self.last_action = None - self.last_action_time = None diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/rolling_upgrade_status_info.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/rolling_upgrade_status_info.py deleted file mode 100644 index eb679db28958..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/rolling_upgrade_status_info.py +++ /dev/null @@ -1,76 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource import Resource - - -class RollingUpgradeStatusInfo(Resource): - """The status of the latest virtual machine scale set rolling upgrade. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource Id - :vartype id: str - :ivar name: Resource name - :vartype name: str - :ivar type: Resource type - :vartype type: str - :param location: Required. Resource location - :type location: str - :param tags: Resource tags - :type tags: dict[str, str] - :ivar policy: The rolling upgrade policies applied for this upgrade. - :vartype policy: - ~azure.mgmt.compute.v2018_04_01.models.RollingUpgradePolicy - :ivar running_status: Information about the current running state of the - overall upgrade. - :vartype running_status: - ~azure.mgmt.compute.v2018_04_01.models.RollingUpgradeRunningStatus - :ivar progress: Information about the number of virtual machine instances - in each upgrade state. - :vartype progress: - ~azure.mgmt.compute.v2018_04_01.models.RollingUpgradeProgressInfo - :ivar error: Error details for this upgrade, if there are any. - :vartype error: ~azure.mgmt.compute.v2018_04_01.models.ApiError - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - 'policy': {'readonly': True}, - 'running_status': {'readonly': True}, - 'progress': {'readonly': True}, - 'error': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'policy': {'key': 'properties.policy', 'type': 'RollingUpgradePolicy'}, - 'running_status': {'key': 'properties.runningStatus', 'type': 'RollingUpgradeRunningStatus'}, - 'progress': {'key': 'properties.progress', 'type': 'RollingUpgradeProgressInfo'}, - 'error': {'key': 'properties.error', 'type': 'ApiError'}, - } - - def __init__(self, **kwargs): - super(RollingUpgradeStatusInfo, self).__init__(**kwargs) - self.policy = None - self.running_status = None - self.progress = None - self.error = None diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/rolling_upgrade_status_info_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/rolling_upgrade_status_info_py3.py deleted file mode 100644 index 8baa5b20df04..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/rolling_upgrade_status_info_py3.py +++ /dev/null @@ -1,76 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource_py3 import Resource - - -class RollingUpgradeStatusInfo(Resource): - """The status of the latest virtual machine scale set rolling upgrade. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource Id - :vartype id: str - :ivar name: Resource name - :vartype name: str - :ivar type: Resource type - :vartype type: str - :param location: Required. Resource location - :type location: str - :param tags: Resource tags - :type tags: dict[str, str] - :ivar policy: The rolling upgrade policies applied for this upgrade. - :vartype policy: - ~azure.mgmt.compute.v2018_04_01.models.RollingUpgradePolicy - :ivar running_status: Information about the current running state of the - overall upgrade. - :vartype running_status: - ~azure.mgmt.compute.v2018_04_01.models.RollingUpgradeRunningStatus - :ivar progress: Information about the number of virtual machine instances - in each upgrade state. - :vartype progress: - ~azure.mgmt.compute.v2018_04_01.models.RollingUpgradeProgressInfo - :ivar error: Error details for this upgrade, if there are any. - :vartype error: ~azure.mgmt.compute.v2018_04_01.models.ApiError - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - 'policy': {'readonly': True}, - 'running_status': {'readonly': True}, - 'progress': {'readonly': True}, - 'error': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'policy': {'key': 'properties.policy', 'type': 'RollingUpgradePolicy'}, - 'running_status': {'key': 'properties.runningStatus', 'type': 'RollingUpgradeRunningStatus'}, - 'progress': {'key': 'properties.progress', 'type': 'RollingUpgradeProgressInfo'}, - 'error': {'key': 'properties.error', 'type': 'ApiError'}, - } - - def __init__(self, *, location: str, tags=None, **kwargs) -> None: - super(RollingUpgradeStatusInfo, self).__init__(location=location, tags=tags, **kwargs) - self.policy = None - self.running_status = None - self.progress = None - self.error = None diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/run_command_document.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/run_command_document.py deleted file mode 100644 index fb511a45281d..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/run_command_document.py +++ /dev/null @@ -1,61 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .run_command_document_base import RunCommandDocumentBase - - -class RunCommandDocument(RunCommandDocumentBase): - """Describes the properties of a Run Command. - - All required parameters must be populated in order to send to Azure. - - :param schema: Required. The VM run command schema. - :type schema: str - :param id: Required. The VM run command id. - :type id: str - :param os_type: Required. The Operating System type. Possible values - include: 'Windows', 'Linux' - :type os_type: str or - ~azure.mgmt.compute.v2018_04_01.models.OperatingSystemTypes - :param label: Required. The VM run command label. - :type label: str - :param description: Required. The VM run command description. - :type description: str - :param script: Required. The script to be executed. - :type script: list[str] - :param parameters: The parameters used by the script. - :type parameters: - list[~azure.mgmt.compute.v2018_04_01.models.RunCommandParameterDefinition] - """ - - _validation = { - 'schema': {'required': True}, - 'id': {'required': True}, - 'os_type': {'required': True}, - 'label': {'required': True}, - 'description': {'required': True}, - 'script': {'required': True}, - } - - _attribute_map = { - 'schema': {'key': '$schema', 'type': 'str'}, - 'id': {'key': 'id', 'type': 'str'}, - 'os_type': {'key': 'osType', 'type': 'OperatingSystemTypes'}, - 'label': {'key': 'label', 'type': 'str'}, - 'description': {'key': 'description', 'type': 'str'}, - 'script': {'key': 'script', 'type': '[str]'}, - 'parameters': {'key': 'parameters', 'type': '[RunCommandParameterDefinition]'}, - } - - def __init__(self, **kwargs): - super(RunCommandDocument, self).__init__(**kwargs) - self.script = kwargs.get('script', None) - self.parameters = kwargs.get('parameters', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/run_command_document_base.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/run_command_document_base.py deleted file mode 100644 index 2ae3371b83e7..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/run_command_document_base.py +++ /dev/null @@ -1,56 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class RunCommandDocumentBase(Model): - """Describes the properties of a Run Command metadata. - - All required parameters must be populated in order to send to Azure. - - :param schema: Required. The VM run command schema. - :type schema: str - :param id: Required. The VM run command id. - :type id: str - :param os_type: Required. The Operating System type. Possible values - include: 'Windows', 'Linux' - :type os_type: str or - ~azure.mgmt.compute.v2018_04_01.models.OperatingSystemTypes - :param label: Required. The VM run command label. - :type label: str - :param description: Required. The VM run command description. - :type description: str - """ - - _validation = { - 'schema': {'required': True}, - 'id': {'required': True}, - 'os_type': {'required': True}, - 'label': {'required': True}, - 'description': {'required': True}, - } - - _attribute_map = { - 'schema': {'key': '$schema', 'type': 'str'}, - 'id': {'key': 'id', 'type': 'str'}, - 'os_type': {'key': 'osType', 'type': 'OperatingSystemTypes'}, - 'label': {'key': 'label', 'type': 'str'}, - 'description': {'key': 'description', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(RunCommandDocumentBase, self).__init__(**kwargs) - self.schema = kwargs.get('schema', None) - self.id = kwargs.get('id', None) - self.os_type = kwargs.get('os_type', None) - self.label = kwargs.get('label', None) - self.description = kwargs.get('description', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/run_command_document_base_paged.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/run_command_document_base_paged.py deleted file mode 100644 index 1ac583338364..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/run_command_document_base_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class RunCommandDocumentBasePaged(Paged): - """ - A paging container for iterating over a list of :class:`RunCommandDocumentBase ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[RunCommandDocumentBase]'} - } - - def __init__(self, *args, **kwargs): - - super(RunCommandDocumentBasePaged, self).__init__(*args, **kwargs) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/run_command_document_base_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/run_command_document_base_py3.py deleted file mode 100644 index 45919bf4d325..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/run_command_document_base_py3.py +++ /dev/null @@ -1,56 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class RunCommandDocumentBase(Model): - """Describes the properties of a Run Command metadata. - - All required parameters must be populated in order to send to Azure. - - :param schema: Required. The VM run command schema. - :type schema: str - :param id: Required. The VM run command id. - :type id: str - :param os_type: Required. The Operating System type. Possible values - include: 'Windows', 'Linux' - :type os_type: str or - ~azure.mgmt.compute.v2018_04_01.models.OperatingSystemTypes - :param label: Required. The VM run command label. - :type label: str - :param description: Required. The VM run command description. - :type description: str - """ - - _validation = { - 'schema': {'required': True}, - 'id': {'required': True}, - 'os_type': {'required': True}, - 'label': {'required': True}, - 'description': {'required': True}, - } - - _attribute_map = { - 'schema': {'key': '$schema', 'type': 'str'}, - 'id': {'key': 'id', 'type': 'str'}, - 'os_type': {'key': 'osType', 'type': 'OperatingSystemTypes'}, - 'label': {'key': 'label', 'type': 'str'}, - 'description': {'key': 'description', 'type': 'str'}, - } - - def __init__(self, *, schema: str, id: str, os_type, label: str, description: str, **kwargs) -> None: - super(RunCommandDocumentBase, self).__init__(**kwargs) - self.schema = schema - self.id = id - self.os_type = os_type - self.label = label - self.description = description diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/run_command_document_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/run_command_document_py3.py deleted file mode 100644 index 3543a6d45ef5..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/run_command_document_py3.py +++ /dev/null @@ -1,61 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .run_command_document_base_py3 import RunCommandDocumentBase - - -class RunCommandDocument(RunCommandDocumentBase): - """Describes the properties of a Run Command. - - All required parameters must be populated in order to send to Azure. - - :param schema: Required. The VM run command schema. - :type schema: str - :param id: Required. The VM run command id. - :type id: str - :param os_type: Required. The Operating System type. Possible values - include: 'Windows', 'Linux' - :type os_type: str or - ~azure.mgmt.compute.v2018_04_01.models.OperatingSystemTypes - :param label: Required. The VM run command label. - :type label: str - :param description: Required. The VM run command description. - :type description: str - :param script: Required. The script to be executed. - :type script: list[str] - :param parameters: The parameters used by the script. - :type parameters: - list[~azure.mgmt.compute.v2018_04_01.models.RunCommandParameterDefinition] - """ - - _validation = { - 'schema': {'required': True}, - 'id': {'required': True}, - 'os_type': {'required': True}, - 'label': {'required': True}, - 'description': {'required': True}, - 'script': {'required': True}, - } - - _attribute_map = { - 'schema': {'key': '$schema', 'type': 'str'}, - 'id': {'key': 'id', 'type': 'str'}, - 'os_type': {'key': 'osType', 'type': 'OperatingSystemTypes'}, - 'label': {'key': 'label', 'type': 'str'}, - 'description': {'key': 'description', 'type': 'str'}, - 'script': {'key': 'script', 'type': '[str]'}, - 'parameters': {'key': 'parameters', 'type': '[RunCommandParameterDefinition]'}, - } - - def __init__(self, *, schema: str, id: str, os_type, label: str, description: str, script, parameters=None, **kwargs) -> None: - super(RunCommandDocument, self).__init__(schema=schema, id=id, os_type=os_type, label=label, description=description, **kwargs) - self.script = script - self.parameters = parameters diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/run_command_input.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/run_command_input.py deleted file mode 100644 index 25b53a1f0336..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/run_command_input.py +++ /dev/null @@ -1,44 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class RunCommandInput(Model): - """Capture Virtual Machine parameters. - - All required parameters must be populated in order to send to Azure. - - :param command_id: Required. The run command id. - :type command_id: str - :param script: Optional. The script to be executed. When this value is - given, the given script will override the default script of the command. - :type script: list[str] - :param parameters: The run command parameters. - :type parameters: - list[~azure.mgmt.compute.v2018_04_01.models.RunCommandInputParameter] - """ - - _validation = { - 'command_id': {'required': True}, - } - - _attribute_map = { - 'command_id': {'key': 'commandId', 'type': 'str'}, - 'script': {'key': 'script', 'type': '[str]'}, - 'parameters': {'key': 'parameters', 'type': '[RunCommandInputParameter]'}, - } - - def __init__(self, **kwargs): - super(RunCommandInput, self).__init__(**kwargs) - self.command_id = kwargs.get('command_id', None) - self.script = kwargs.get('script', None) - self.parameters = kwargs.get('parameters', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/run_command_input_parameter.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/run_command_input_parameter.py deleted file mode 100644 index cd76ad81bfa2..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/run_command_input_parameter.py +++ /dev/null @@ -1,39 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class RunCommandInputParameter(Model): - """Describes the properties of a run command parameter. - - All required parameters must be populated in order to send to Azure. - - :param name: Required. The run command parameter name. - :type name: str - :param value: Required. The run command parameter value. - :type value: str - """ - - _validation = { - 'name': {'required': True}, - 'value': {'required': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'value': {'key': 'value', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(RunCommandInputParameter, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.value = kwargs.get('value', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/run_command_input_parameter_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/run_command_input_parameter_py3.py deleted file mode 100644 index 6013f038a1c3..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/run_command_input_parameter_py3.py +++ /dev/null @@ -1,39 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class RunCommandInputParameter(Model): - """Describes the properties of a run command parameter. - - All required parameters must be populated in order to send to Azure. - - :param name: Required. The run command parameter name. - :type name: str - :param value: Required. The run command parameter value. - :type value: str - """ - - _validation = { - 'name': {'required': True}, - 'value': {'required': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'value': {'key': 'value', 'type': 'str'}, - } - - def __init__(self, *, name: str, value: str, **kwargs) -> None: - super(RunCommandInputParameter, self).__init__(**kwargs) - self.name = name - self.value = value diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/run_command_input_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/run_command_input_py3.py deleted file mode 100644 index ae2a3588c64d..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/run_command_input_py3.py +++ /dev/null @@ -1,44 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class RunCommandInput(Model): - """Capture Virtual Machine parameters. - - All required parameters must be populated in order to send to Azure. - - :param command_id: Required. The run command id. - :type command_id: str - :param script: Optional. The script to be executed. When this value is - given, the given script will override the default script of the command. - :type script: list[str] - :param parameters: The run command parameters. - :type parameters: - list[~azure.mgmt.compute.v2018_04_01.models.RunCommandInputParameter] - """ - - _validation = { - 'command_id': {'required': True}, - } - - _attribute_map = { - 'command_id': {'key': 'commandId', 'type': 'str'}, - 'script': {'key': 'script', 'type': '[str]'}, - 'parameters': {'key': 'parameters', 'type': '[RunCommandInputParameter]'}, - } - - def __init__(self, *, command_id: str, script=None, parameters=None, **kwargs) -> None: - super(RunCommandInput, self).__init__(**kwargs) - self.command_id = command_id - self.script = script - self.parameters = parameters diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/run_command_parameter_definition.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/run_command_parameter_definition.py deleted file mode 100644 index e09f774d8241..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/run_command_parameter_definition.py +++ /dev/null @@ -1,48 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class RunCommandParameterDefinition(Model): - """Describes the properties of a run command parameter. - - All required parameters must be populated in order to send to Azure. - - :param name: Required. The run command parameter name. - :type name: str - :param type: Required. The run command parameter type. - :type type: str - :param default_value: The run command parameter default value. - :type default_value: str - :param required: The run command parameter required. Default value: False - . - :type required: bool - """ - - _validation = { - 'name': {'required': True}, - 'type': {'required': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'default_value': {'key': 'defaultValue', 'type': 'str'}, - 'required': {'key': 'required', 'type': 'bool'}, - } - - def __init__(self, **kwargs): - super(RunCommandParameterDefinition, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.type = kwargs.get('type', None) - self.default_value = kwargs.get('default_value', None) - self.required = kwargs.get('required', False) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/run_command_parameter_definition_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/run_command_parameter_definition_py3.py deleted file mode 100644 index e5fbc708f965..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/run_command_parameter_definition_py3.py +++ /dev/null @@ -1,48 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class RunCommandParameterDefinition(Model): - """Describes the properties of a run command parameter. - - All required parameters must be populated in order to send to Azure. - - :param name: Required. The run command parameter name. - :type name: str - :param type: Required. The run command parameter type. - :type type: str - :param default_value: The run command parameter default value. - :type default_value: str - :param required: The run command parameter required. Default value: False - . - :type required: bool - """ - - _validation = { - 'name': {'required': True}, - 'type': {'required': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'default_value': {'key': 'defaultValue', 'type': 'str'}, - 'required': {'key': 'required', 'type': 'bool'}, - } - - def __init__(self, *, name: str, type: str, default_value: str=None, required: bool=False, **kwargs) -> None: - super(RunCommandParameterDefinition, self).__init__(**kwargs) - self.name = name - self.type = type - self.default_value = default_value - self.required = required diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/run_command_result.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/run_command_result.py deleted file mode 100644 index 751a49481d82..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/run_command_result.py +++ /dev/null @@ -1,29 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class RunCommandResult(Model): - """RunCommandResult. - - :param value: Run command operation response. - :type value: - list[~azure.mgmt.compute.v2018_04_01.models.InstanceViewStatus] - """ - - _attribute_map = { - 'value': {'key': 'value', 'type': '[InstanceViewStatus]'}, - } - - def __init__(self, **kwargs): - super(RunCommandResult, self).__init__(**kwargs) - self.value = kwargs.get('value', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/run_command_result_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/run_command_result_py3.py deleted file mode 100644 index 659243f62725..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/run_command_result_py3.py +++ /dev/null @@ -1,29 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class RunCommandResult(Model): - """RunCommandResult. - - :param value: Run command operation response. - :type value: - list[~azure.mgmt.compute.v2018_04_01.models.InstanceViewStatus] - """ - - _attribute_map = { - 'value': {'key': 'value', 'type': '[InstanceViewStatus]'}, - } - - def __init__(self, *, value=None, **kwargs) -> None: - super(RunCommandResult, self).__init__(**kwargs) - self.value = value diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/sku.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/sku.py deleted file mode 100644 index 5c07709435e0..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/sku.py +++ /dev/null @@ -1,38 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class Sku(Model): - """Describes a virtual machine scale set sku. - - :param name: The sku name. - :type name: str - :param tier: Specifies the tier of virtual machines in a scale set.

    Possible Values:

    **Standard**

    **Basic** - :type tier: str - :param capacity: Specifies the number of virtual machines in the scale - set. - :type capacity: long - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'tier': {'key': 'tier', 'type': 'str'}, - 'capacity': {'key': 'capacity', 'type': 'long'}, - } - - def __init__(self, **kwargs): - super(Sku, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.tier = kwargs.get('tier', None) - self.capacity = kwargs.get('capacity', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/sku_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/sku_py3.py deleted file mode 100644 index f6bc74afaadc..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/sku_py3.py +++ /dev/null @@ -1,38 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class Sku(Model): - """Describes a virtual machine scale set sku. - - :param name: The sku name. - :type name: str - :param tier: Specifies the tier of virtual machines in a scale set.

    Possible Values:

    **Standard**

    **Basic** - :type tier: str - :param capacity: Specifies the number of virtual machines in the scale - set. - :type capacity: long - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'tier': {'key': 'tier', 'type': 'str'}, - 'capacity': {'key': 'capacity', 'type': 'long'}, - } - - def __init__(self, *, name: str=None, tier: str=None, capacity: int=None, **kwargs) -> None: - super(Sku, self).__init__(**kwargs) - self.name = name - self.tier = tier - self.capacity = capacity diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/snapshot.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/snapshot.py deleted file mode 100644 index 31299f475824..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/snapshot.py +++ /dev/null @@ -1,95 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource import Resource - - -class Snapshot(Resource): - """Snapshot resource. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource Id - :vartype id: str - :ivar name: Resource name - :vartype name: str - :ivar type: Resource type - :vartype type: str - :param location: Required. Resource location - :type location: str - :param tags: Resource tags - :type tags: dict[str, str] - :ivar managed_by: Unused. Always Null. - :vartype managed_by: str - :param sku: - :type sku: ~azure.mgmt.compute.v2018_04_01.models.SnapshotSku - :ivar time_created: The time when the disk was created. - :vartype time_created: datetime - :param os_type: The Operating System type. Possible values include: - 'Windows', 'Linux' - :type os_type: str or - ~azure.mgmt.compute.v2018_04_01.models.OperatingSystemTypes - :param creation_data: Required. Disk source information. CreationData - information cannot be changed after the disk has been created. - :type creation_data: ~azure.mgmt.compute.v2018_04_01.models.CreationData - :param disk_size_gb: If creationData.createOption is Empty, this field is - mandatory and it indicates the size of the VHD to create. If this field is - present for updates or creation with other options, it indicates a resize. - Resizes are only allowed if the disk is not attached to a running VM, and - can only increase the disk's size. - :type disk_size_gb: int - :param encryption_settings: Encryption settings for disk or snapshot - :type encryption_settings: - ~azure.mgmt.compute.v2018_04_01.models.EncryptionSettings - :ivar provisioning_state: The disk provisioning state. - :vartype provisioning_state: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - 'managed_by': {'readonly': True}, - 'time_created': {'readonly': True}, - 'creation_data': {'required': True}, - 'provisioning_state': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'managed_by': {'key': 'managedBy', 'type': 'str'}, - 'sku': {'key': 'sku', 'type': 'SnapshotSku'}, - 'time_created': {'key': 'properties.timeCreated', 'type': 'iso-8601'}, - 'os_type': {'key': 'properties.osType', 'type': 'OperatingSystemTypes'}, - 'creation_data': {'key': 'properties.creationData', 'type': 'CreationData'}, - 'disk_size_gb': {'key': 'properties.diskSizeGB', 'type': 'int'}, - 'encryption_settings': {'key': 'properties.encryptionSettings', 'type': 'EncryptionSettings'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(Snapshot, self).__init__(**kwargs) - self.managed_by = None - self.sku = kwargs.get('sku', None) - self.time_created = None - self.os_type = kwargs.get('os_type', None) - self.creation_data = kwargs.get('creation_data', None) - self.disk_size_gb = kwargs.get('disk_size_gb', None) - self.encryption_settings = kwargs.get('encryption_settings', None) - self.provisioning_state = None diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/snapshot_paged.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/snapshot_paged.py deleted file mode 100644 index 5ff7a760fa0c..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/snapshot_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class SnapshotPaged(Paged): - """ - A paging container for iterating over a list of :class:`Snapshot ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[Snapshot]'} - } - - def __init__(self, *args, **kwargs): - - super(SnapshotPaged, self).__init__(*args, **kwargs) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/snapshot_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/snapshot_py3.py deleted file mode 100644 index d44887e1c702..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/snapshot_py3.py +++ /dev/null @@ -1,95 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource_py3 import Resource - - -class Snapshot(Resource): - """Snapshot resource. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource Id - :vartype id: str - :ivar name: Resource name - :vartype name: str - :ivar type: Resource type - :vartype type: str - :param location: Required. Resource location - :type location: str - :param tags: Resource tags - :type tags: dict[str, str] - :ivar managed_by: Unused. Always Null. - :vartype managed_by: str - :param sku: - :type sku: ~azure.mgmt.compute.v2018_04_01.models.SnapshotSku - :ivar time_created: The time when the disk was created. - :vartype time_created: datetime - :param os_type: The Operating System type. Possible values include: - 'Windows', 'Linux' - :type os_type: str or - ~azure.mgmt.compute.v2018_04_01.models.OperatingSystemTypes - :param creation_data: Required. Disk source information. CreationData - information cannot be changed after the disk has been created. - :type creation_data: ~azure.mgmt.compute.v2018_04_01.models.CreationData - :param disk_size_gb: If creationData.createOption is Empty, this field is - mandatory and it indicates the size of the VHD to create. If this field is - present for updates or creation with other options, it indicates a resize. - Resizes are only allowed if the disk is not attached to a running VM, and - can only increase the disk's size. - :type disk_size_gb: int - :param encryption_settings: Encryption settings for disk or snapshot - :type encryption_settings: - ~azure.mgmt.compute.v2018_04_01.models.EncryptionSettings - :ivar provisioning_state: The disk provisioning state. - :vartype provisioning_state: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - 'managed_by': {'readonly': True}, - 'time_created': {'readonly': True}, - 'creation_data': {'required': True}, - 'provisioning_state': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'managed_by': {'key': 'managedBy', 'type': 'str'}, - 'sku': {'key': 'sku', 'type': 'SnapshotSku'}, - 'time_created': {'key': 'properties.timeCreated', 'type': 'iso-8601'}, - 'os_type': {'key': 'properties.osType', 'type': 'OperatingSystemTypes'}, - 'creation_data': {'key': 'properties.creationData', 'type': 'CreationData'}, - 'disk_size_gb': {'key': 'properties.diskSizeGB', 'type': 'int'}, - 'encryption_settings': {'key': 'properties.encryptionSettings', 'type': 'EncryptionSettings'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - } - - def __init__(self, *, location: str, creation_data, tags=None, sku=None, os_type=None, disk_size_gb: int=None, encryption_settings=None, **kwargs) -> None: - super(Snapshot, self).__init__(location=location, tags=tags, **kwargs) - self.managed_by = None - self.sku = sku - self.time_created = None - self.os_type = os_type - self.creation_data = creation_data - self.disk_size_gb = disk_size_gb - self.encryption_settings = encryption_settings - self.provisioning_state = None diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/snapshot_sku.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/snapshot_sku.py deleted file mode 100644 index 91efbc68afa5..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/snapshot_sku.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class SnapshotSku(Model): - """The snapshots sku name. Can be Standard_LRS, Premium_LRS, or Standard_ZRS. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :param name: The sku name. Possible values include: 'Standard_LRS', - 'Premium_LRS', 'Standard_ZRS' - :type name: str or - ~azure.mgmt.compute.v2018_04_01.models.SnapshotStorageAccountTypes - :ivar tier: The sku tier. Default value: "Standard" . - :vartype tier: str - """ - - _validation = { - 'tier': {'readonly': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'tier': {'key': 'tier', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(SnapshotSku, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.tier = None diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/snapshot_sku_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/snapshot_sku_py3.py deleted file mode 100644 index 9975abf7d694..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/snapshot_sku_py3.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class SnapshotSku(Model): - """The snapshots sku name. Can be Standard_LRS, Premium_LRS, or Standard_ZRS. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :param name: The sku name. Possible values include: 'Standard_LRS', - 'Premium_LRS', 'Standard_ZRS' - :type name: str or - ~azure.mgmt.compute.v2018_04_01.models.SnapshotStorageAccountTypes - :ivar tier: The sku tier. Default value: "Standard" . - :vartype tier: str - """ - - _validation = { - 'tier': {'readonly': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'tier': {'key': 'tier', 'type': 'str'}, - } - - def __init__(self, *, name=None, **kwargs) -> None: - super(SnapshotSku, self).__init__(**kwargs) - self.name = name - self.tier = None diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/snapshot_update.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/snapshot_update.py deleted file mode 100644 index 119c6f05bc49..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/snapshot_update.py +++ /dev/null @@ -1,51 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class SnapshotUpdate(Model): - """Snapshot update resource. - - :param os_type: the Operating System type. Possible values include: - 'Windows', 'Linux' - :type os_type: str or - ~azure.mgmt.compute.v2018_04_01.models.OperatingSystemTypes - :param disk_size_gb: If creationData.createOption is Empty, this field is - mandatory and it indicates the size of the VHD to create. If this field is - present for updates or creation with other options, it indicates a resize. - Resizes are only allowed if the disk is not attached to a running VM, and - can only increase the disk's size. - :type disk_size_gb: int - :param encryption_settings: Encryption settings for disk or snapshot - :type encryption_settings: - ~azure.mgmt.compute.v2018_04_01.models.EncryptionSettings - :param tags: Resource tags - :type tags: dict[str, str] - :param sku: - :type sku: ~azure.mgmt.compute.v2018_04_01.models.SnapshotSku - """ - - _attribute_map = { - 'os_type': {'key': 'properties.osType', 'type': 'OperatingSystemTypes'}, - 'disk_size_gb': {'key': 'properties.diskSizeGB', 'type': 'int'}, - 'encryption_settings': {'key': 'properties.encryptionSettings', 'type': 'EncryptionSettings'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'sku': {'key': 'sku', 'type': 'SnapshotSku'}, - } - - def __init__(self, **kwargs): - super(SnapshotUpdate, self).__init__(**kwargs) - self.os_type = kwargs.get('os_type', None) - self.disk_size_gb = kwargs.get('disk_size_gb', None) - self.encryption_settings = kwargs.get('encryption_settings', None) - self.tags = kwargs.get('tags', None) - self.sku = kwargs.get('sku', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/snapshot_update_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/snapshot_update_py3.py deleted file mode 100644 index 54e05426ce8e..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/snapshot_update_py3.py +++ /dev/null @@ -1,51 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class SnapshotUpdate(Model): - """Snapshot update resource. - - :param os_type: the Operating System type. Possible values include: - 'Windows', 'Linux' - :type os_type: str or - ~azure.mgmt.compute.v2018_04_01.models.OperatingSystemTypes - :param disk_size_gb: If creationData.createOption is Empty, this field is - mandatory and it indicates the size of the VHD to create. If this field is - present for updates or creation with other options, it indicates a resize. - Resizes are only allowed if the disk is not attached to a running VM, and - can only increase the disk's size. - :type disk_size_gb: int - :param encryption_settings: Encryption settings for disk or snapshot - :type encryption_settings: - ~azure.mgmt.compute.v2018_04_01.models.EncryptionSettings - :param tags: Resource tags - :type tags: dict[str, str] - :param sku: - :type sku: ~azure.mgmt.compute.v2018_04_01.models.SnapshotSku - """ - - _attribute_map = { - 'os_type': {'key': 'properties.osType', 'type': 'OperatingSystemTypes'}, - 'disk_size_gb': {'key': 'properties.diskSizeGB', 'type': 'int'}, - 'encryption_settings': {'key': 'properties.encryptionSettings', 'type': 'EncryptionSettings'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'sku': {'key': 'sku', 'type': 'SnapshotSku'}, - } - - def __init__(self, *, os_type=None, disk_size_gb: int=None, encryption_settings=None, tags=None, sku=None, **kwargs) -> None: - super(SnapshotUpdate, self).__init__(**kwargs) - self.os_type = os_type - self.disk_size_gb = disk_size_gb - self.encryption_settings = encryption_settings - self.tags = tags - self.sku = sku diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/source_vault.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/source_vault.py deleted file mode 100644 index 88537f33905f..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/source_vault.py +++ /dev/null @@ -1,29 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class SourceVault(Model): - """The vault id is an Azure Resource Manager Resource id in the form - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.KeyVault/vaults/{vaultName}. - - :param id: Resource Id - :type id: str - """ - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(SourceVault, self).__init__(**kwargs) - self.id = kwargs.get('id', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/source_vault_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/source_vault_py3.py deleted file mode 100644 index 1cb922017c06..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/source_vault_py3.py +++ /dev/null @@ -1,29 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class SourceVault(Model): - """The vault id is an Azure Resource Manager Resource id in the form - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.KeyVault/vaults/{vaultName}. - - :param id: Resource Id - :type id: str - """ - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - } - - def __init__(self, *, id: str=None, **kwargs) -> None: - super(SourceVault, self).__init__(**kwargs) - self.id = id diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/ssh_configuration.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/ssh_configuration.py deleted file mode 100644 index ff92fd1a9376..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/ssh_configuration.py +++ /dev/null @@ -1,30 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class SshConfiguration(Model): - """SSH configuration for Linux based VMs running on Azure. - - :param public_keys: The list of SSH public keys used to authenticate with - linux based VMs. - :type public_keys: - list[~azure.mgmt.compute.v2018_04_01.models.SshPublicKey] - """ - - _attribute_map = { - 'public_keys': {'key': 'publicKeys', 'type': '[SshPublicKey]'}, - } - - def __init__(self, **kwargs): - super(SshConfiguration, self).__init__(**kwargs) - self.public_keys = kwargs.get('public_keys', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/ssh_configuration_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/ssh_configuration_py3.py deleted file mode 100644 index e81ca2f47af3..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/ssh_configuration_py3.py +++ /dev/null @@ -1,30 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class SshConfiguration(Model): - """SSH configuration for Linux based VMs running on Azure. - - :param public_keys: The list of SSH public keys used to authenticate with - linux based VMs. - :type public_keys: - list[~azure.mgmt.compute.v2018_04_01.models.SshPublicKey] - """ - - _attribute_map = { - 'public_keys': {'key': 'publicKeys', 'type': '[SshPublicKey]'}, - } - - def __init__(self, *, public_keys=None, **kwargs) -> None: - super(SshConfiguration, self).__init__(**kwargs) - self.public_keys = public_keys diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/ssh_public_key.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/ssh_public_key.py deleted file mode 100644 index 122e0d3b9fdd..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/ssh_public_key.py +++ /dev/null @@ -1,39 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class SshPublicKey(Model): - """Contains information about SSH certificate public key and the path on the - Linux VM where the public key is placed. - - :param path: Specifies the full path on the created VM where ssh public - key is stored. If the file already exists, the specified key is appended - to the file. Example: /home/user/.ssh/authorized_keys - :type path: str - :param key_data: SSH public key certificate used to authenticate with the - VM through ssh. The key needs to be at least 2048-bit and in ssh-rsa - format.

    For creating ssh keys, see [Create SSH keys on Linux and - Mac for Linux VMs in - Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-mac-create-ssh-keys?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json). - :type key_data: str - """ - - _attribute_map = { - 'path': {'key': 'path', 'type': 'str'}, - 'key_data': {'key': 'keyData', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(SshPublicKey, self).__init__(**kwargs) - self.path = kwargs.get('path', None) - self.key_data = kwargs.get('key_data', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/ssh_public_key_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/ssh_public_key_py3.py deleted file mode 100644 index b16ee085b36b..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/ssh_public_key_py3.py +++ /dev/null @@ -1,39 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class SshPublicKey(Model): - """Contains information about SSH certificate public key and the path on the - Linux VM where the public key is placed. - - :param path: Specifies the full path on the created VM where ssh public - key is stored. If the file already exists, the specified key is appended - to the file. Example: /home/user/.ssh/authorized_keys - :type path: str - :param key_data: SSH public key certificate used to authenticate with the - VM through ssh. The key needs to be at least 2048-bit and in ssh-rsa - format.

    For creating ssh keys, see [Create SSH keys on Linux and - Mac for Linux VMs in - Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-mac-create-ssh-keys?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json). - :type key_data: str - """ - - _attribute_map = { - 'path': {'key': 'path', 'type': 'str'}, - 'key_data': {'key': 'keyData', 'type': 'str'}, - } - - def __init__(self, *, path: str=None, key_data: str=None, **kwargs) -> None: - super(SshPublicKey, self).__init__(**kwargs) - self.path = path - self.key_data = key_data diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/storage_profile.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/storage_profile.py deleted file mode 100644 index da1fef243048..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/storage_profile.py +++ /dev/null @@ -1,47 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class StorageProfile(Model): - """Specifies the storage settings for the virtual machine disks. - - :param image_reference: Specifies information about the image to use. You - can specify information about platform images, marketplace images, or - virtual machine images. This element is required when you want to use a - platform image, marketplace image, or virtual machine image, but is not - used in other creation operations. - :type image_reference: - ~azure.mgmt.compute.v2018_04_01.models.ImageReference - :param os_disk: Specifies information about the operating system disk used - by the virtual machine.

    For more information about disks, see - [About disks and VHDs for Azure virtual - machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-about-disks-vhds?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). - :type os_disk: ~azure.mgmt.compute.v2018_04_01.models.OSDisk - :param data_disks: Specifies the parameters that are used to add a data - disk to a virtual machine.

    For more information about disks, see - [About disks and VHDs for Azure virtual - machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-about-disks-vhds?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). - :type data_disks: list[~azure.mgmt.compute.v2018_04_01.models.DataDisk] - """ - - _attribute_map = { - 'image_reference': {'key': 'imageReference', 'type': 'ImageReference'}, - 'os_disk': {'key': 'osDisk', 'type': 'OSDisk'}, - 'data_disks': {'key': 'dataDisks', 'type': '[DataDisk]'}, - } - - def __init__(self, **kwargs): - super(StorageProfile, self).__init__(**kwargs) - self.image_reference = kwargs.get('image_reference', None) - self.os_disk = kwargs.get('os_disk', None) - self.data_disks = kwargs.get('data_disks', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/storage_profile_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/storage_profile_py3.py deleted file mode 100644 index 62cb9eb9b38e..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/storage_profile_py3.py +++ /dev/null @@ -1,47 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class StorageProfile(Model): - """Specifies the storage settings for the virtual machine disks. - - :param image_reference: Specifies information about the image to use. You - can specify information about platform images, marketplace images, or - virtual machine images. This element is required when you want to use a - platform image, marketplace image, or virtual machine image, but is not - used in other creation operations. - :type image_reference: - ~azure.mgmt.compute.v2018_04_01.models.ImageReference - :param os_disk: Specifies information about the operating system disk used - by the virtual machine.

    For more information about disks, see - [About disks and VHDs for Azure virtual - machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-about-disks-vhds?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). - :type os_disk: ~azure.mgmt.compute.v2018_04_01.models.OSDisk - :param data_disks: Specifies the parameters that are used to add a data - disk to a virtual machine.

    For more information about disks, see - [About disks and VHDs for Azure virtual - machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-about-disks-vhds?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). - :type data_disks: list[~azure.mgmt.compute.v2018_04_01.models.DataDisk] - """ - - _attribute_map = { - 'image_reference': {'key': 'imageReference', 'type': 'ImageReference'}, - 'os_disk': {'key': 'osDisk', 'type': 'OSDisk'}, - 'data_disks': {'key': 'dataDisks', 'type': '[DataDisk]'}, - } - - def __init__(self, *, image_reference=None, os_disk=None, data_disks=None, **kwargs) -> None: - super(StorageProfile, self).__init__(**kwargs) - self.image_reference = image_reference - self.os_disk = os_disk - self.data_disks = data_disks diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/sub_resource.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/sub_resource.py deleted file mode 100644 index 11e092cc6ff5..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/sub_resource.py +++ /dev/null @@ -1,28 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class SubResource(Model): - """SubResource. - - :param id: Resource Id - :type id: str - """ - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(SubResource, self).__init__(**kwargs) - self.id = kwargs.get('id', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/sub_resource_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/sub_resource_py3.py deleted file mode 100644 index 29e5afee38f9..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/sub_resource_py3.py +++ /dev/null @@ -1,28 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class SubResource(Model): - """SubResource. - - :param id: Resource Id - :type id: str - """ - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - } - - def __init__(self, *, id: str=None, **kwargs) -> None: - super(SubResource, self).__init__(**kwargs) - self.id = id diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/sub_resource_read_only.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/sub_resource_read_only.py deleted file mode 100644 index 4a0ec466c0d4..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/sub_resource_read_only.py +++ /dev/null @@ -1,35 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class SubResourceReadOnly(Model): - """SubResourceReadOnly. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource Id - :vartype id: str - """ - - _validation = { - 'id': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(SubResourceReadOnly, self).__init__(**kwargs) - self.id = None diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/sub_resource_read_only_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/sub_resource_read_only_py3.py deleted file mode 100644 index cb918e9a2ac6..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/sub_resource_read_only_py3.py +++ /dev/null @@ -1,35 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class SubResourceReadOnly(Model): - """SubResourceReadOnly. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource Id - :vartype id: str - """ - - _validation = { - 'id': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - } - - def __init__(self, **kwargs) -> None: - super(SubResourceReadOnly, self).__init__(**kwargs) - self.id = None diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/throttled_requests_input.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/throttled_requests_input.py deleted file mode 100644 index 502e7be62e68..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/throttled_requests_input.py +++ /dev/null @@ -1,52 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .log_analytics_input_base import LogAnalyticsInputBase - - -class ThrottledRequestsInput(LogAnalyticsInputBase): - """Api request input for LogAnalytics getThrottledRequests Api. - - All required parameters must be populated in order to send to Azure. - - :param blob_container_sas_uri: Required. SAS Uri of the logging blob - container to which LogAnalytics Api writes output logs to. - :type blob_container_sas_uri: str - :param from_time: Required. From time of the query - :type from_time: datetime - :param to_time: Required. To time of the query - :type to_time: datetime - :param group_by_throttle_policy: Group query result by Throttle Policy - applied. - :type group_by_throttle_policy: bool - :param group_by_operation_name: Group query result by Operation Name. - :type group_by_operation_name: bool - :param group_by_resource_name: Group query result by Resource Name. - :type group_by_resource_name: bool - """ - - _validation = { - 'blob_container_sas_uri': {'required': True}, - 'from_time': {'required': True}, - 'to_time': {'required': True}, - } - - _attribute_map = { - 'blob_container_sas_uri': {'key': 'blobContainerSasUri', 'type': 'str'}, - 'from_time': {'key': 'fromTime', 'type': 'iso-8601'}, - 'to_time': {'key': 'toTime', 'type': 'iso-8601'}, - 'group_by_throttle_policy': {'key': 'groupByThrottlePolicy', 'type': 'bool'}, - 'group_by_operation_name': {'key': 'groupByOperationName', 'type': 'bool'}, - 'group_by_resource_name': {'key': 'groupByResourceName', 'type': 'bool'}, - } - - def __init__(self, **kwargs): - super(ThrottledRequestsInput, self).__init__(**kwargs) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/throttled_requests_input_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/throttled_requests_input_py3.py deleted file mode 100644 index a4239a5115de..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/throttled_requests_input_py3.py +++ /dev/null @@ -1,52 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .log_analytics_input_base_py3 import LogAnalyticsInputBase - - -class ThrottledRequestsInput(LogAnalyticsInputBase): - """Api request input for LogAnalytics getThrottledRequests Api. - - All required parameters must be populated in order to send to Azure. - - :param blob_container_sas_uri: Required. SAS Uri of the logging blob - container to which LogAnalytics Api writes output logs to. - :type blob_container_sas_uri: str - :param from_time: Required. From time of the query - :type from_time: datetime - :param to_time: Required. To time of the query - :type to_time: datetime - :param group_by_throttle_policy: Group query result by Throttle Policy - applied. - :type group_by_throttle_policy: bool - :param group_by_operation_name: Group query result by Operation Name. - :type group_by_operation_name: bool - :param group_by_resource_name: Group query result by Resource Name. - :type group_by_resource_name: bool - """ - - _validation = { - 'blob_container_sas_uri': {'required': True}, - 'from_time': {'required': True}, - 'to_time': {'required': True}, - } - - _attribute_map = { - 'blob_container_sas_uri': {'key': 'blobContainerSasUri', 'type': 'str'}, - 'from_time': {'key': 'fromTime', 'type': 'iso-8601'}, - 'to_time': {'key': 'toTime', 'type': 'iso-8601'}, - 'group_by_throttle_policy': {'key': 'groupByThrottlePolicy', 'type': 'bool'}, - 'group_by_operation_name': {'key': 'groupByOperationName', 'type': 'bool'}, - 'group_by_resource_name': {'key': 'groupByResourceName', 'type': 'bool'}, - } - - def __init__(self, *, blob_container_sas_uri: str, from_time, to_time, group_by_throttle_policy: bool=None, group_by_operation_name: bool=None, group_by_resource_name: bool=None, **kwargs) -> None: - super(ThrottledRequestsInput, self).__init__(blob_container_sas_uri=blob_container_sas_uri, from_time=from_time, to_time=to_time, group_by_throttle_policy=group_by_throttle_policy, group_by_operation_name=group_by_operation_name, group_by_resource_name=group_by_resource_name, **kwargs) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/update_resource.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/update_resource.py deleted file mode 100644 index b1d2898ff082..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/update_resource.py +++ /dev/null @@ -1,28 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class UpdateResource(Model): - """The Update Resource model definition. - - :param tags: Resource tags - :type tags: dict[str, str] - """ - - _attribute_map = { - 'tags': {'key': 'tags', 'type': '{str}'}, - } - - def __init__(self, **kwargs): - super(UpdateResource, self).__init__(**kwargs) - self.tags = kwargs.get('tags', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/update_resource_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/update_resource_py3.py deleted file mode 100644 index c06c17c124d9..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/update_resource_py3.py +++ /dev/null @@ -1,28 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class UpdateResource(Model): - """The Update Resource model definition. - - :param tags: Resource tags - :type tags: dict[str, str] - """ - - _attribute_map = { - 'tags': {'key': 'tags', 'type': '{str}'}, - } - - def __init__(self, *, tags=None, **kwargs) -> None: - super(UpdateResource, self).__init__(**kwargs) - self.tags = tags diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/upgrade_operation_historical_status_info.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/upgrade_operation_historical_status_info.py deleted file mode 100644 index d243b61b2e80..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/upgrade_operation_historical_status_info.py +++ /dev/null @@ -1,47 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class UpgradeOperationHistoricalStatusInfo(Model): - """Virtual Machine Scale Set OS Upgrade History operation response. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar properties: Information about the properties of the upgrade - operation. - :vartype properties: - ~azure.mgmt.compute.v2018_04_01.models.UpgradeOperationHistoricalStatusInfoProperties - :ivar type: Resource type - :vartype type: str - :ivar location: Resource location - :vartype location: str - """ - - _validation = { - 'properties': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'readonly': True}, - } - - _attribute_map = { - 'properties': {'key': 'properties', 'type': 'UpgradeOperationHistoricalStatusInfoProperties'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(UpgradeOperationHistoricalStatusInfo, self).__init__(**kwargs) - self.properties = None - self.type = None - self.location = None diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/upgrade_operation_historical_status_info_paged.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/upgrade_operation_historical_status_info_paged.py deleted file mode 100644 index b7296a3dedb1..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/upgrade_operation_historical_status_info_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class UpgradeOperationHistoricalStatusInfoPaged(Paged): - """ - A paging container for iterating over a list of :class:`UpgradeOperationHistoricalStatusInfo ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[UpgradeOperationHistoricalStatusInfo]'} - } - - def __init__(self, *args, **kwargs): - - super(UpgradeOperationHistoricalStatusInfoPaged, self).__init__(*args, **kwargs) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/upgrade_operation_historical_status_info_properties.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/upgrade_operation_historical_status_info_properties.py deleted file mode 100644 index e34d9c292996..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/upgrade_operation_historical_status_info_properties.py +++ /dev/null @@ -1,67 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class UpgradeOperationHistoricalStatusInfoProperties(Model): - """Describes each OS upgrade on the Virtual Machine Scale Set. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar running_status: Information about the overall status of the upgrade - operation. - :vartype running_status: - ~azure.mgmt.compute.v2018_04_01.models.UpgradeOperationHistoryStatus - :ivar progress: Counts of the VMs in each state. - :vartype progress: - ~azure.mgmt.compute.v2018_04_01.models.RollingUpgradeProgressInfo - :ivar error: Error Details for this upgrade if there are any. - :vartype error: ~azure.mgmt.compute.v2018_04_01.models.ApiError - :ivar started_by: Invoker of the Upgrade Operation. Possible values - include: 'Unknown', 'User', 'Platform' - :vartype started_by: str or - ~azure.mgmt.compute.v2018_04_01.models.UpgradeOperationInvoker - :ivar target_image_reference: Image Reference details - :vartype target_image_reference: - ~azure.mgmt.compute.v2018_04_01.models.ImageReference - :ivar rollback_info: Information about OS rollback if performed - :vartype rollback_info: - ~azure.mgmt.compute.v2018_04_01.models.RollbackStatusInfo - """ - - _validation = { - 'running_status': {'readonly': True}, - 'progress': {'readonly': True}, - 'error': {'readonly': True}, - 'started_by': {'readonly': True}, - 'target_image_reference': {'readonly': True}, - 'rollback_info': {'readonly': True}, - } - - _attribute_map = { - 'running_status': {'key': 'runningStatus', 'type': 'UpgradeOperationHistoryStatus'}, - 'progress': {'key': 'progress', 'type': 'RollingUpgradeProgressInfo'}, - 'error': {'key': 'error', 'type': 'ApiError'}, - 'started_by': {'key': 'startedBy', 'type': 'UpgradeOperationInvoker'}, - 'target_image_reference': {'key': 'targetImageReference', 'type': 'ImageReference'}, - 'rollback_info': {'key': 'rollbackInfo', 'type': 'RollbackStatusInfo'}, - } - - def __init__(self, **kwargs): - super(UpgradeOperationHistoricalStatusInfoProperties, self).__init__(**kwargs) - self.running_status = None - self.progress = None - self.error = None - self.started_by = None - self.target_image_reference = None - self.rollback_info = None diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/upgrade_operation_historical_status_info_properties_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/upgrade_operation_historical_status_info_properties_py3.py deleted file mode 100644 index 869b3993f999..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/upgrade_operation_historical_status_info_properties_py3.py +++ /dev/null @@ -1,67 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class UpgradeOperationHistoricalStatusInfoProperties(Model): - """Describes each OS upgrade on the Virtual Machine Scale Set. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar running_status: Information about the overall status of the upgrade - operation. - :vartype running_status: - ~azure.mgmt.compute.v2018_04_01.models.UpgradeOperationHistoryStatus - :ivar progress: Counts of the VMs in each state. - :vartype progress: - ~azure.mgmt.compute.v2018_04_01.models.RollingUpgradeProgressInfo - :ivar error: Error Details for this upgrade if there are any. - :vartype error: ~azure.mgmt.compute.v2018_04_01.models.ApiError - :ivar started_by: Invoker of the Upgrade Operation. Possible values - include: 'Unknown', 'User', 'Platform' - :vartype started_by: str or - ~azure.mgmt.compute.v2018_04_01.models.UpgradeOperationInvoker - :ivar target_image_reference: Image Reference details - :vartype target_image_reference: - ~azure.mgmt.compute.v2018_04_01.models.ImageReference - :ivar rollback_info: Information about OS rollback if performed - :vartype rollback_info: - ~azure.mgmt.compute.v2018_04_01.models.RollbackStatusInfo - """ - - _validation = { - 'running_status': {'readonly': True}, - 'progress': {'readonly': True}, - 'error': {'readonly': True}, - 'started_by': {'readonly': True}, - 'target_image_reference': {'readonly': True}, - 'rollback_info': {'readonly': True}, - } - - _attribute_map = { - 'running_status': {'key': 'runningStatus', 'type': 'UpgradeOperationHistoryStatus'}, - 'progress': {'key': 'progress', 'type': 'RollingUpgradeProgressInfo'}, - 'error': {'key': 'error', 'type': 'ApiError'}, - 'started_by': {'key': 'startedBy', 'type': 'UpgradeOperationInvoker'}, - 'target_image_reference': {'key': 'targetImageReference', 'type': 'ImageReference'}, - 'rollback_info': {'key': 'rollbackInfo', 'type': 'RollbackStatusInfo'}, - } - - def __init__(self, **kwargs) -> None: - super(UpgradeOperationHistoricalStatusInfoProperties, self).__init__(**kwargs) - self.running_status = None - self.progress = None - self.error = None - self.started_by = None - self.target_image_reference = None - self.rollback_info = None diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/upgrade_operation_historical_status_info_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/upgrade_operation_historical_status_info_py3.py deleted file mode 100644 index 9e967e04a07d..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/upgrade_operation_historical_status_info_py3.py +++ /dev/null @@ -1,47 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class UpgradeOperationHistoricalStatusInfo(Model): - """Virtual Machine Scale Set OS Upgrade History operation response. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar properties: Information about the properties of the upgrade - operation. - :vartype properties: - ~azure.mgmt.compute.v2018_04_01.models.UpgradeOperationHistoricalStatusInfoProperties - :ivar type: Resource type - :vartype type: str - :ivar location: Resource location - :vartype location: str - """ - - _validation = { - 'properties': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'readonly': True}, - } - - _attribute_map = { - 'properties': {'key': 'properties', 'type': 'UpgradeOperationHistoricalStatusInfoProperties'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - } - - def __init__(self, **kwargs) -> None: - super(UpgradeOperationHistoricalStatusInfo, self).__init__(**kwargs) - self.properties = None - self.type = None - self.location = None diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/upgrade_operation_history_status.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/upgrade_operation_history_status.py deleted file mode 100644 index e0d6390aeeb5..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/upgrade_operation_history_status.py +++ /dev/null @@ -1,46 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class UpgradeOperationHistoryStatus(Model): - """Information about the current running state of the overall upgrade. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar code: Code indicating the current status of the upgrade. Possible - values include: 'RollingForward', 'Cancelled', 'Completed', 'Faulted' - :vartype code: str or ~azure.mgmt.compute.v2018_04_01.models.UpgradeState - :ivar start_time: Start time of the upgrade. - :vartype start_time: datetime - :ivar end_time: End time of the upgrade. - :vartype end_time: datetime - """ - - _validation = { - 'code': {'readonly': True}, - 'start_time': {'readonly': True}, - 'end_time': {'readonly': True}, - } - - _attribute_map = { - 'code': {'key': 'code', 'type': 'UpgradeState'}, - 'start_time': {'key': 'startTime', 'type': 'iso-8601'}, - 'end_time': {'key': 'endTime', 'type': 'iso-8601'}, - } - - def __init__(self, **kwargs): - super(UpgradeOperationHistoryStatus, self).__init__(**kwargs) - self.code = None - self.start_time = None - self.end_time = None diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/upgrade_operation_history_status_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/upgrade_operation_history_status_py3.py deleted file mode 100644 index a7e9eaa62a69..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/upgrade_operation_history_status_py3.py +++ /dev/null @@ -1,46 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class UpgradeOperationHistoryStatus(Model): - """Information about the current running state of the overall upgrade. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar code: Code indicating the current status of the upgrade. Possible - values include: 'RollingForward', 'Cancelled', 'Completed', 'Faulted' - :vartype code: str or ~azure.mgmt.compute.v2018_04_01.models.UpgradeState - :ivar start_time: Start time of the upgrade. - :vartype start_time: datetime - :ivar end_time: End time of the upgrade. - :vartype end_time: datetime - """ - - _validation = { - 'code': {'readonly': True}, - 'start_time': {'readonly': True}, - 'end_time': {'readonly': True}, - } - - _attribute_map = { - 'code': {'key': 'code', 'type': 'UpgradeState'}, - 'start_time': {'key': 'startTime', 'type': 'iso-8601'}, - 'end_time': {'key': 'endTime', 'type': 'iso-8601'}, - } - - def __init__(self, **kwargs) -> None: - super(UpgradeOperationHistoryStatus, self).__init__(**kwargs) - self.code = None - self.start_time = None - self.end_time = None diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/upgrade_policy.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/upgrade_policy.py deleted file mode 100644 index 4335909afd81..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/upgrade_policy.py +++ /dev/null @@ -1,51 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class UpgradePolicy(Model): - """Describes an upgrade policy - automatic, manual, or rolling. - - :param mode: Specifies the mode of an upgrade to virtual machines in the - scale set.

    Possible values are:

    **Manual** - You - control the application of updates to virtual machines in the scale set. - You do this by using the manualUpgrade action.

    **Automatic** - - All virtual machines in the scale set are automatically updated at the - same time. Possible values include: 'Automatic', 'Manual', 'Rolling' - :type mode: str or ~azure.mgmt.compute.v2018_04_01.models.UpgradeMode - :param rolling_upgrade_policy: The configuration parameters used while - performing a rolling upgrade. - :type rolling_upgrade_policy: - ~azure.mgmt.compute.v2018_04_01.models.RollingUpgradePolicy - :param automatic_os_upgrade: Whether OS upgrades should automatically be - applied to scale set instances in a rolling fashion when a newer version - of the image becomes available. - :type automatic_os_upgrade: bool - :param auto_os_upgrade_policy: Configuration parameters used for - performing automatic OS Upgrade. - :type auto_os_upgrade_policy: - ~azure.mgmt.compute.v2018_04_01.models.AutoOSUpgradePolicy - """ - - _attribute_map = { - 'mode': {'key': 'mode', 'type': 'UpgradeMode'}, - 'rolling_upgrade_policy': {'key': 'rollingUpgradePolicy', 'type': 'RollingUpgradePolicy'}, - 'automatic_os_upgrade': {'key': 'automaticOSUpgrade', 'type': 'bool'}, - 'auto_os_upgrade_policy': {'key': 'autoOSUpgradePolicy', 'type': 'AutoOSUpgradePolicy'}, - } - - def __init__(self, **kwargs): - super(UpgradePolicy, self).__init__(**kwargs) - self.mode = kwargs.get('mode', None) - self.rolling_upgrade_policy = kwargs.get('rolling_upgrade_policy', None) - self.automatic_os_upgrade = kwargs.get('automatic_os_upgrade', None) - self.auto_os_upgrade_policy = kwargs.get('auto_os_upgrade_policy', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/upgrade_policy_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/upgrade_policy_py3.py deleted file mode 100644 index 526357dfaf1c..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/upgrade_policy_py3.py +++ /dev/null @@ -1,51 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class UpgradePolicy(Model): - """Describes an upgrade policy - automatic, manual, or rolling. - - :param mode: Specifies the mode of an upgrade to virtual machines in the - scale set.

    Possible values are:

    **Manual** - You - control the application of updates to virtual machines in the scale set. - You do this by using the manualUpgrade action.

    **Automatic** - - All virtual machines in the scale set are automatically updated at the - same time. Possible values include: 'Automatic', 'Manual', 'Rolling' - :type mode: str or ~azure.mgmt.compute.v2018_04_01.models.UpgradeMode - :param rolling_upgrade_policy: The configuration parameters used while - performing a rolling upgrade. - :type rolling_upgrade_policy: - ~azure.mgmt.compute.v2018_04_01.models.RollingUpgradePolicy - :param automatic_os_upgrade: Whether OS upgrades should automatically be - applied to scale set instances in a rolling fashion when a newer version - of the image becomes available. - :type automatic_os_upgrade: bool - :param auto_os_upgrade_policy: Configuration parameters used for - performing automatic OS Upgrade. - :type auto_os_upgrade_policy: - ~azure.mgmt.compute.v2018_04_01.models.AutoOSUpgradePolicy - """ - - _attribute_map = { - 'mode': {'key': 'mode', 'type': 'UpgradeMode'}, - 'rolling_upgrade_policy': {'key': 'rollingUpgradePolicy', 'type': 'RollingUpgradePolicy'}, - 'automatic_os_upgrade': {'key': 'automaticOSUpgrade', 'type': 'bool'}, - 'auto_os_upgrade_policy': {'key': 'autoOSUpgradePolicy', 'type': 'AutoOSUpgradePolicy'}, - } - - def __init__(self, *, mode=None, rolling_upgrade_policy=None, automatic_os_upgrade: bool=None, auto_os_upgrade_policy=None, **kwargs) -> None: - super(UpgradePolicy, self).__init__(**kwargs) - self.mode = mode - self.rolling_upgrade_policy = rolling_upgrade_policy - self.automatic_os_upgrade = automatic_os_upgrade - self.auto_os_upgrade_policy = auto_os_upgrade_policy diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/usage.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/usage.py deleted file mode 100644 index eae36ebf0dc2..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/usage.py +++ /dev/null @@ -1,54 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class Usage(Model): - """Describes Compute Resource Usage. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar unit: Required. An enum describing the unit of usage measurement. - Default value: "Count" . - :vartype unit: str - :param current_value: Required. The current usage of the resource. - :type current_value: int - :param limit: Required. The maximum permitted usage of the resource. - :type limit: long - :param name: Required. The name of the type of usage. - :type name: ~azure.mgmt.compute.v2018_04_01.models.UsageName - """ - - _validation = { - 'unit': {'required': True, 'constant': True}, - 'current_value': {'required': True}, - 'limit': {'required': True}, - 'name': {'required': True}, - } - - _attribute_map = { - 'unit': {'key': 'unit', 'type': 'str'}, - 'current_value': {'key': 'currentValue', 'type': 'int'}, - 'limit': {'key': 'limit', 'type': 'long'}, - 'name': {'key': 'name', 'type': 'UsageName'}, - } - - unit = "Count" - - def __init__(self, **kwargs): - super(Usage, self).__init__(**kwargs) - self.current_value = kwargs.get('current_value', None) - self.limit = kwargs.get('limit', None) - self.name = kwargs.get('name', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/usage_name.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/usage_name.py deleted file mode 100644 index e2560936493e..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/usage_name.py +++ /dev/null @@ -1,32 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class UsageName(Model): - """The Usage Names. - - :param value: The name of the resource. - :type value: str - :param localized_value: The localized name of the resource. - :type localized_value: str - """ - - _attribute_map = { - 'value': {'key': 'value', 'type': 'str'}, - 'localized_value': {'key': 'localizedValue', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(UsageName, self).__init__(**kwargs) - self.value = kwargs.get('value', None) - self.localized_value = kwargs.get('localized_value', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/usage_name_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/usage_name_py3.py deleted file mode 100644 index ad0b77459f75..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/usage_name_py3.py +++ /dev/null @@ -1,32 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class UsageName(Model): - """The Usage Names. - - :param value: The name of the resource. - :type value: str - :param localized_value: The localized name of the resource. - :type localized_value: str - """ - - _attribute_map = { - 'value': {'key': 'value', 'type': 'str'}, - 'localized_value': {'key': 'localizedValue', 'type': 'str'}, - } - - def __init__(self, *, value: str=None, localized_value: str=None, **kwargs) -> None: - super(UsageName, self).__init__(**kwargs) - self.value = value - self.localized_value = localized_value diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/usage_paged.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/usage_paged.py deleted file mode 100644 index d3533ab09848..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/usage_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class UsagePaged(Paged): - """ - A paging container for iterating over a list of :class:`Usage ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[Usage]'} - } - - def __init__(self, *args, **kwargs): - - super(UsagePaged, self).__init__(*args, **kwargs) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/usage_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/usage_py3.py deleted file mode 100644 index 7a2ae5cbd250..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/usage_py3.py +++ /dev/null @@ -1,54 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class Usage(Model): - """Describes Compute Resource Usage. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar unit: Required. An enum describing the unit of usage measurement. - Default value: "Count" . - :vartype unit: str - :param current_value: Required. The current usage of the resource. - :type current_value: int - :param limit: Required. The maximum permitted usage of the resource. - :type limit: long - :param name: Required. The name of the type of usage. - :type name: ~azure.mgmt.compute.v2018_04_01.models.UsageName - """ - - _validation = { - 'unit': {'required': True, 'constant': True}, - 'current_value': {'required': True}, - 'limit': {'required': True}, - 'name': {'required': True}, - } - - _attribute_map = { - 'unit': {'key': 'unit', 'type': 'str'}, - 'current_value': {'key': 'currentValue', 'type': 'int'}, - 'limit': {'key': 'limit', 'type': 'long'}, - 'name': {'key': 'name', 'type': 'UsageName'}, - } - - unit = "Count" - - def __init__(self, *, current_value: int, limit: int, name, **kwargs) -> None: - super(Usage, self).__init__(**kwargs) - self.current_value = current_value - self.limit = limit - self.name = name diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/vault_certificate.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/vault_certificate.py deleted file mode 100644 index 2dd179480e76..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/vault_certificate.py +++ /dev/null @@ -1,47 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VaultCertificate(Model): - """Describes a single certificate reference in a Key Vault, and where the - certificate should reside on the VM. - - :param certificate_url: This is the URL of a certificate that has been - uploaded to Key Vault as a secret. For adding a secret to the Key Vault, - see [Add a key or secret to the key - vault](https://docs.microsoft.com/azure/key-vault/key-vault-get-started/#add). - In this case, your certificate needs to be It is the Base64 encoding of - the following JSON Object which is encoded in UTF-8:

    {
    - "data":"",
    "dataType":"pfx",
    - "password":""
    } - :type certificate_url: str - :param certificate_store: For Windows VMs, specifies the certificate store - on the Virtual Machine to which the certificate should be added. The - specified certificate store is implicitly in the LocalMachine account. -

    For Linux VMs, the certificate file is placed under the - /var/lib/waagent directory, with the file name - <UppercaseThumbprint>.crt for the X509 certificate file and - <UppercaseThumbprint>.prv for private key. Both of these files are - .pem formatted. - :type certificate_store: str - """ - - _attribute_map = { - 'certificate_url': {'key': 'certificateUrl', 'type': 'str'}, - 'certificate_store': {'key': 'certificateStore', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(VaultCertificate, self).__init__(**kwargs) - self.certificate_url = kwargs.get('certificate_url', None) - self.certificate_store = kwargs.get('certificate_store', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/vault_certificate_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/vault_certificate_py3.py deleted file mode 100644 index 23ecc8101793..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/vault_certificate_py3.py +++ /dev/null @@ -1,47 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VaultCertificate(Model): - """Describes a single certificate reference in a Key Vault, and where the - certificate should reside on the VM. - - :param certificate_url: This is the URL of a certificate that has been - uploaded to Key Vault as a secret. For adding a secret to the Key Vault, - see [Add a key or secret to the key - vault](https://docs.microsoft.com/azure/key-vault/key-vault-get-started/#add). - In this case, your certificate needs to be It is the Base64 encoding of - the following JSON Object which is encoded in UTF-8:

    {
    - "data":"",
    "dataType":"pfx",
    - "password":""
    } - :type certificate_url: str - :param certificate_store: For Windows VMs, specifies the certificate store - on the Virtual Machine to which the certificate should be added. The - specified certificate store is implicitly in the LocalMachine account. -

    For Linux VMs, the certificate file is placed under the - /var/lib/waagent directory, with the file name - <UppercaseThumbprint>.crt for the X509 certificate file and - <UppercaseThumbprint>.prv for private key. Both of these files are - .pem formatted. - :type certificate_store: str - """ - - _attribute_map = { - 'certificate_url': {'key': 'certificateUrl', 'type': 'str'}, - 'certificate_store': {'key': 'certificateStore', 'type': 'str'}, - } - - def __init__(self, *, certificate_url: str=None, certificate_store: str=None, **kwargs) -> None: - super(VaultCertificate, self).__init__(**kwargs) - self.certificate_url = certificate_url - self.certificate_store = certificate_store diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/vault_secret_group.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/vault_secret_group.py deleted file mode 100644 index 182f200952fc..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/vault_secret_group.py +++ /dev/null @@ -1,35 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VaultSecretGroup(Model): - """Describes a set of certificates which are all in the same Key Vault. - - :param source_vault: The relative URL of the Key Vault containing all of - the certificates in VaultCertificates. - :type source_vault: ~azure.mgmt.compute.v2018_04_01.models.SubResource - :param vault_certificates: The list of key vault references in SourceVault - which contain certificates. - :type vault_certificates: - list[~azure.mgmt.compute.v2018_04_01.models.VaultCertificate] - """ - - _attribute_map = { - 'source_vault': {'key': 'sourceVault', 'type': 'SubResource'}, - 'vault_certificates': {'key': 'vaultCertificates', 'type': '[VaultCertificate]'}, - } - - def __init__(self, **kwargs): - super(VaultSecretGroup, self).__init__(**kwargs) - self.source_vault = kwargs.get('source_vault', None) - self.vault_certificates = kwargs.get('vault_certificates', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/vault_secret_group_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/vault_secret_group_py3.py deleted file mode 100644 index c92697778df0..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/vault_secret_group_py3.py +++ /dev/null @@ -1,35 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VaultSecretGroup(Model): - """Describes a set of certificates which are all in the same Key Vault. - - :param source_vault: The relative URL of the Key Vault containing all of - the certificates in VaultCertificates. - :type source_vault: ~azure.mgmt.compute.v2018_04_01.models.SubResource - :param vault_certificates: The list of key vault references in SourceVault - which contain certificates. - :type vault_certificates: - list[~azure.mgmt.compute.v2018_04_01.models.VaultCertificate] - """ - - _attribute_map = { - 'source_vault': {'key': 'sourceVault', 'type': 'SubResource'}, - 'vault_certificates': {'key': 'vaultCertificates', 'type': '[VaultCertificate]'}, - } - - def __init__(self, *, source_vault=None, vault_certificates=None, **kwargs) -> None: - super(VaultSecretGroup, self).__init__(**kwargs) - self.source_vault = source_vault - self.vault_certificates = vault_certificates diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_hard_disk.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_hard_disk.py deleted file mode 100644 index 5e3ad9dea7d4..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_hard_disk.py +++ /dev/null @@ -1,28 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualHardDisk(Model): - """Describes the uri of a disk. - - :param uri: Specifies the virtual hard disk's uri. - :type uri: str - """ - - _attribute_map = { - 'uri': {'key': 'uri', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(VirtualHardDisk, self).__init__(**kwargs) - self.uri = kwargs.get('uri', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_hard_disk_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_hard_disk_py3.py deleted file mode 100644 index 9c069b95f084..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_hard_disk_py3.py +++ /dev/null @@ -1,28 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualHardDisk(Model): - """Describes the uri of a disk. - - :param uri: Specifies the virtual hard disk's uri. - :type uri: str - """ - - _attribute_map = { - 'uri': {'key': 'uri', 'type': 'str'}, - } - - def __init__(self, *, uri: str=None, **kwargs) -> None: - super(VirtualHardDisk, self).__init__(**kwargs) - self.uri = uri diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine.py deleted file mode 100644 index 25674ef9fc8c..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine.py +++ /dev/null @@ -1,157 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource import Resource - - -class VirtualMachine(Resource): - """Describes a Virtual Machine. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource Id - :vartype id: str - :ivar name: Resource name - :vartype name: str - :ivar type: Resource type - :vartype type: str - :param location: Required. Resource location - :type location: str - :param tags: Resource tags - :type tags: dict[str, str] - :param plan: Specifies information about the marketplace image used to - create the virtual machine. This element is only used for marketplace - images. Before you can use a marketplace image from an API, you must - enable the image for programmatic use. In the Azure portal, find the - marketplace image that you want to use and then click **Want to deploy - programmatically, Get Started ->**. Enter any required information and - then click **Save**. - :type plan: ~azure.mgmt.compute.v2018_04_01.models.Plan - :param hardware_profile: Specifies the hardware settings for the virtual - machine. - :type hardware_profile: - ~azure.mgmt.compute.v2018_04_01.models.HardwareProfile - :param storage_profile: Specifies the storage settings for the virtual - machine disks. - :type storage_profile: - ~azure.mgmt.compute.v2018_04_01.models.StorageProfile - :param os_profile: Specifies the operating system settings for the virtual - machine. - :type os_profile: ~azure.mgmt.compute.v2018_04_01.models.OSProfile - :param network_profile: Specifies the network interfaces of the virtual - machine. - :type network_profile: - ~azure.mgmt.compute.v2018_04_01.models.NetworkProfile - :param diagnostics_profile: Specifies the boot diagnostic settings state. -

    Minimum api-version: 2015-06-15. - :type diagnostics_profile: - ~azure.mgmt.compute.v2018_04_01.models.DiagnosticsProfile - :param availability_set: Specifies information about the availability set - that the virtual machine should be assigned to. Virtual machines specified - in the same availability set are allocated to different nodes to maximize - availability. For more information about availability sets, see [Manage - the availability of virtual - machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-manage-availability?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). -

    For more information on Azure planned maintenance, see [Planned - maintenance for virtual machines in - Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-planned-maintenance?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json) -

    Currently, a VM can only be added to availability set at creation - time. An existing VM cannot be added to an availability set. - :type availability_set: ~azure.mgmt.compute.v2018_04_01.models.SubResource - :param proximity_placement_group: Specifies information about the - proximity placement group that the virtual machine should be assigned to. -

    Minimum api-version: 2018-04-01. - :type proximity_placement_group: - ~azure.mgmt.compute.v2018_04_01.models.SubResource - :ivar provisioning_state: The provisioning state, which only appears in - the response. - :vartype provisioning_state: str - :ivar instance_view: The virtual machine instance view. - :vartype instance_view: - ~azure.mgmt.compute.v2018_04_01.models.VirtualMachineInstanceView - :param license_type: Specifies that the image or disk that is being used - was licensed on-premises. This element is only used for images that - contain the Windows Server operating system.

    Possible values are: -

    Windows_Client

    Windows_Server

    If this element - is included in a request for an update, the value must match the initial - value. This value cannot be updated.

    For more information, see - [Azure Hybrid Use Benefit for Windows - Server](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-hybrid-use-benefit-licensing?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json) -

    Minimum api-version: 2015-06-15 - :type license_type: str - :ivar vm_id: Specifies the VM unique ID which is a 128-bits identifier - that is encoded and stored in all Azure IaaS VMs SMBIOS and can be read - using platform BIOS commands. - :vartype vm_id: str - :ivar resources: The virtual machine child extension resources. - :vartype resources: - list[~azure.mgmt.compute.v2018_04_01.models.VirtualMachineExtension] - :param identity: The identity of the virtual machine, if configured. - :type identity: - ~azure.mgmt.compute.v2018_04_01.models.VirtualMachineIdentity - :param zones: The virtual machine zones. - :type zones: list[str] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - 'provisioning_state': {'readonly': True}, - 'instance_view': {'readonly': True}, - 'vm_id': {'readonly': True}, - 'resources': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'plan': {'key': 'plan', 'type': 'Plan'}, - 'hardware_profile': {'key': 'properties.hardwareProfile', 'type': 'HardwareProfile'}, - 'storage_profile': {'key': 'properties.storageProfile', 'type': 'StorageProfile'}, - 'os_profile': {'key': 'properties.osProfile', 'type': 'OSProfile'}, - 'network_profile': {'key': 'properties.networkProfile', 'type': 'NetworkProfile'}, - 'diagnostics_profile': {'key': 'properties.diagnosticsProfile', 'type': 'DiagnosticsProfile'}, - 'availability_set': {'key': 'properties.availabilitySet', 'type': 'SubResource'}, - 'proximity_placement_group': {'key': 'properties.proximityPlacementGroup', 'type': 'SubResource'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'instance_view': {'key': 'properties.instanceView', 'type': 'VirtualMachineInstanceView'}, - 'license_type': {'key': 'properties.licenseType', 'type': 'str'}, - 'vm_id': {'key': 'properties.vmId', 'type': 'str'}, - 'resources': {'key': 'resources', 'type': '[VirtualMachineExtension]'}, - 'identity': {'key': 'identity', 'type': 'VirtualMachineIdentity'}, - 'zones': {'key': 'zones', 'type': '[str]'}, - } - - def __init__(self, **kwargs): - super(VirtualMachine, self).__init__(**kwargs) - self.plan = kwargs.get('plan', None) - self.hardware_profile = kwargs.get('hardware_profile', None) - self.storage_profile = kwargs.get('storage_profile', None) - self.os_profile = kwargs.get('os_profile', None) - self.network_profile = kwargs.get('network_profile', None) - self.diagnostics_profile = kwargs.get('diagnostics_profile', None) - self.availability_set = kwargs.get('availability_set', None) - self.proximity_placement_group = kwargs.get('proximity_placement_group', None) - self.provisioning_state = None - self.instance_view = None - self.license_type = kwargs.get('license_type', None) - self.vm_id = None - self.resources = None - self.identity = kwargs.get('identity', None) - self.zones = kwargs.get('zones', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_agent_instance_view.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_agent_instance_view.py deleted file mode 100644 index a2ad4c4f8bc8..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_agent_instance_view.py +++ /dev/null @@ -1,39 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineAgentInstanceView(Model): - """The instance view of the VM Agent running on the virtual machine. - - :param vm_agent_version: The VM Agent full version. - :type vm_agent_version: str - :param extension_handlers: The virtual machine extension handler instance - view. - :type extension_handlers: - list[~azure.mgmt.compute.v2018_04_01.models.VirtualMachineExtensionHandlerInstanceView] - :param statuses: The resource status information. - :type statuses: - list[~azure.mgmt.compute.v2018_04_01.models.InstanceViewStatus] - """ - - _attribute_map = { - 'vm_agent_version': {'key': 'vmAgentVersion', 'type': 'str'}, - 'extension_handlers': {'key': 'extensionHandlers', 'type': '[VirtualMachineExtensionHandlerInstanceView]'}, - 'statuses': {'key': 'statuses', 'type': '[InstanceViewStatus]'}, - } - - def __init__(self, **kwargs): - super(VirtualMachineAgentInstanceView, self).__init__(**kwargs) - self.vm_agent_version = kwargs.get('vm_agent_version', None) - self.extension_handlers = kwargs.get('extension_handlers', None) - self.statuses = kwargs.get('statuses', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_agent_instance_view_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_agent_instance_view_py3.py deleted file mode 100644 index dce8f0d40cc8..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_agent_instance_view_py3.py +++ /dev/null @@ -1,39 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineAgentInstanceView(Model): - """The instance view of the VM Agent running on the virtual machine. - - :param vm_agent_version: The VM Agent full version. - :type vm_agent_version: str - :param extension_handlers: The virtual machine extension handler instance - view. - :type extension_handlers: - list[~azure.mgmt.compute.v2018_04_01.models.VirtualMachineExtensionHandlerInstanceView] - :param statuses: The resource status information. - :type statuses: - list[~azure.mgmt.compute.v2018_04_01.models.InstanceViewStatus] - """ - - _attribute_map = { - 'vm_agent_version': {'key': 'vmAgentVersion', 'type': 'str'}, - 'extension_handlers': {'key': 'extensionHandlers', 'type': '[VirtualMachineExtensionHandlerInstanceView]'}, - 'statuses': {'key': 'statuses', 'type': '[InstanceViewStatus]'}, - } - - def __init__(self, *, vm_agent_version: str=None, extension_handlers=None, statuses=None, **kwargs) -> None: - super(VirtualMachineAgentInstanceView, self).__init__(**kwargs) - self.vm_agent_version = vm_agent_version - self.extension_handlers = extension_handlers - self.statuses = statuses diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_capture_parameters.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_capture_parameters.py deleted file mode 100644 index 4e6ffbea7a4f..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_capture_parameters.py +++ /dev/null @@ -1,46 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineCaptureParameters(Model): - """Capture Virtual Machine parameters. - - All required parameters must be populated in order to send to Azure. - - :param vhd_prefix: Required. The captured virtual hard disk's name prefix. - :type vhd_prefix: str - :param destination_container_name: Required. The destination container - name. - :type destination_container_name: str - :param overwrite_vhds: Required. Specifies whether to overwrite the - destination virtual hard disk, in case of conflict. - :type overwrite_vhds: bool - """ - - _validation = { - 'vhd_prefix': {'required': True}, - 'destination_container_name': {'required': True}, - 'overwrite_vhds': {'required': True}, - } - - _attribute_map = { - 'vhd_prefix': {'key': 'vhdPrefix', 'type': 'str'}, - 'destination_container_name': {'key': 'destinationContainerName', 'type': 'str'}, - 'overwrite_vhds': {'key': 'overwriteVhds', 'type': 'bool'}, - } - - def __init__(self, **kwargs): - super(VirtualMachineCaptureParameters, self).__init__(**kwargs) - self.vhd_prefix = kwargs.get('vhd_prefix', None) - self.destination_container_name = kwargs.get('destination_container_name', None) - self.overwrite_vhds = kwargs.get('overwrite_vhds', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_capture_parameters_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_capture_parameters_py3.py deleted file mode 100644 index 1866cdc23300..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_capture_parameters_py3.py +++ /dev/null @@ -1,46 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineCaptureParameters(Model): - """Capture Virtual Machine parameters. - - All required parameters must be populated in order to send to Azure. - - :param vhd_prefix: Required. The captured virtual hard disk's name prefix. - :type vhd_prefix: str - :param destination_container_name: Required. The destination container - name. - :type destination_container_name: str - :param overwrite_vhds: Required. Specifies whether to overwrite the - destination virtual hard disk, in case of conflict. - :type overwrite_vhds: bool - """ - - _validation = { - 'vhd_prefix': {'required': True}, - 'destination_container_name': {'required': True}, - 'overwrite_vhds': {'required': True}, - } - - _attribute_map = { - 'vhd_prefix': {'key': 'vhdPrefix', 'type': 'str'}, - 'destination_container_name': {'key': 'destinationContainerName', 'type': 'str'}, - 'overwrite_vhds': {'key': 'overwriteVhds', 'type': 'bool'}, - } - - def __init__(self, *, vhd_prefix: str, destination_container_name: str, overwrite_vhds: bool, **kwargs) -> None: - super(VirtualMachineCaptureParameters, self).__init__(**kwargs) - self.vhd_prefix = vhd_prefix - self.destination_container_name = destination_container_name - self.overwrite_vhds = overwrite_vhds diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_capture_result.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_capture_result.py deleted file mode 100644 index 2972e1f2fcda..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_capture_result.py +++ /dev/null @@ -1,53 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .sub_resource import SubResource - - -class VirtualMachineCaptureResult(SubResource): - """Output of virtual machine capture operation. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :param id: Resource Id - :type id: str - :ivar schema: the schema of the captured virtual machine - :vartype schema: str - :ivar content_version: the version of the content - :vartype content_version: str - :ivar parameters: parameters of the captured virtual machine - :vartype parameters: object - :ivar resources: a list of resource items of the captured virtual machine - :vartype resources: list[object] - """ - - _validation = { - 'schema': {'readonly': True}, - 'content_version': {'readonly': True}, - 'parameters': {'readonly': True}, - 'resources': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'schema': {'key': '$schema', 'type': 'str'}, - 'content_version': {'key': 'contentVersion', 'type': 'str'}, - 'parameters': {'key': 'parameters', 'type': 'object'}, - 'resources': {'key': 'resources', 'type': '[object]'}, - } - - def __init__(self, **kwargs): - super(VirtualMachineCaptureResult, self).__init__(**kwargs) - self.schema = None - self.content_version = None - self.parameters = None - self.resources = None diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_capture_result_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_capture_result_py3.py deleted file mode 100644 index 09e8afde1591..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_capture_result_py3.py +++ /dev/null @@ -1,53 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .sub_resource_py3 import SubResource - - -class VirtualMachineCaptureResult(SubResource): - """Output of virtual machine capture operation. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :param id: Resource Id - :type id: str - :ivar schema: the schema of the captured virtual machine - :vartype schema: str - :ivar content_version: the version of the content - :vartype content_version: str - :ivar parameters: parameters of the captured virtual machine - :vartype parameters: object - :ivar resources: a list of resource items of the captured virtual machine - :vartype resources: list[object] - """ - - _validation = { - 'schema': {'readonly': True}, - 'content_version': {'readonly': True}, - 'parameters': {'readonly': True}, - 'resources': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'schema': {'key': '$schema', 'type': 'str'}, - 'content_version': {'key': 'contentVersion', 'type': 'str'}, - 'parameters': {'key': 'parameters', 'type': 'object'}, - 'resources': {'key': 'resources', 'type': '[object]'}, - } - - def __init__(self, *, id: str=None, **kwargs) -> None: - super(VirtualMachineCaptureResult, self).__init__(id=id, **kwargs) - self.schema = None - self.content_version = None - self.parameters = None - self.resources = None diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_extension.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_extension.py deleted file mode 100644 index 02db951458f4..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_extension.py +++ /dev/null @@ -1,97 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource import Resource - - -class VirtualMachineExtension(Resource): - """Describes a Virtual Machine Extension. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource Id - :vartype id: str - :ivar name: Resource name - :vartype name: str - :ivar type: Resource type - :vartype type: str - :param location: Required. Resource location - :type location: str - :param tags: Resource tags - :type tags: dict[str, str] - :param force_update_tag: How the extension handler should be forced to - update even if the extension configuration has not changed. - :type force_update_tag: str - :param publisher: The name of the extension handler publisher. - :type publisher: str - :param virtual_machine_extension_type: Specifies the type of the - extension; an example is "CustomScriptExtension". - :type virtual_machine_extension_type: str - :param type_handler_version: Specifies the version of the script handler. - :type type_handler_version: str - :param auto_upgrade_minor_version: Indicates whether the extension should - use a newer minor version if one is available at deployment time. Once - deployed, however, the extension will not upgrade minor versions unless - redeployed, even with this property set to true. - :type auto_upgrade_minor_version: bool - :param settings: Json formatted public settings for the extension. - :type settings: object - :param protected_settings: The extension can contain either - protectedSettings or protectedSettingsFromKeyVault or no protected - settings at all. - :type protected_settings: object - :ivar provisioning_state: The provisioning state, which only appears in - the response. - :vartype provisioning_state: str - :param instance_view: The virtual machine extension instance view. - :type instance_view: - ~azure.mgmt.compute.v2018_04_01.models.VirtualMachineExtensionInstanceView - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - 'provisioning_state': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'force_update_tag': {'key': 'properties.forceUpdateTag', 'type': 'str'}, - 'publisher': {'key': 'properties.publisher', 'type': 'str'}, - 'virtual_machine_extension_type': {'key': 'properties.type', 'type': 'str'}, - 'type_handler_version': {'key': 'properties.typeHandlerVersion', 'type': 'str'}, - 'auto_upgrade_minor_version': {'key': 'properties.autoUpgradeMinorVersion', 'type': 'bool'}, - 'settings': {'key': 'properties.settings', 'type': 'object'}, - 'protected_settings': {'key': 'properties.protectedSettings', 'type': 'object'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'instance_view': {'key': 'properties.instanceView', 'type': 'VirtualMachineExtensionInstanceView'}, - } - - def __init__(self, **kwargs): - super(VirtualMachineExtension, self).__init__(**kwargs) - self.force_update_tag = kwargs.get('force_update_tag', None) - self.publisher = kwargs.get('publisher', None) - self.virtual_machine_extension_type = kwargs.get('virtual_machine_extension_type', None) - self.type_handler_version = kwargs.get('type_handler_version', None) - self.auto_upgrade_minor_version = kwargs.get('auto_upgrade_minor_version', None) - self.settings = kwargs.get('settings', None) - self.protected_settings = kwargs.get('protected_settings', None) - self.provisioning_state = None - self.instance_view = kwargs.get('instance_view', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_extension_handler_instance_view.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_extension_handler_instance_view.py deleted file mode 100644 index 2d7ec6ac6782..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_extension_handler_instance_view.py +++ /dev/null @@ -1,37 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineExtensionHandlerInstanceView(Model): - """The instance view of a virtual machine extension handler. - - :param type: Specifies the type of the extension; an example is - "CustomScriptExtension". - :type type: str - :param type_handler_version: Specifies the version of the script handler. - :type type_handler_version: str - :param status: The extension handler status. - :type status: ~azure.mgmt.compute.v2018_04_01.models.InstanceViewStatus - """ - - _attribute_map = { - 'type': {'key': 'type', 'type': 'str'}, - 'type_handler_version': {'key': 'typeHandlerVersion', 'type': 'str'}, - 'status': {'key': 'status', 'type': 'InstanceViewStatus'}, - } - - def __init__(self, **kwargs): - super(VirtualMachineExtensionHandlerInstanceView, self).__init__(**kwargs) - self.type = kwargs.get('type', None) - self.type_handler_version = kwargs.get('type_handler_version', None) - self.status = kwargs.get('status', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_extension_handler_instance_view_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_extension_handler_instance_view_py3.py deleted file mode 100644 index ba82a5e876e4..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_extension_handler_instance_view_py3.py +++ /dev/null @@ -1,37 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineExtensionHandlerInstanceView(Model): - """The instance view of a virtual machine extension handler. - - :param type: Specifies the type of the extension; an example is - "CustomScriptExtension". - :type type: str - :param type_handler_version: Specifies the version of the script handler. - :type type_handler_version: str - :param status: The extension handler status. - :type status: ~azure.mgmt.compute.v2018_04_01.models.InstanceViewStatus - """ - - _attribute_map = { - 'type': {'key': 'type', 'type': 'str'}, - 'type_handler_version': {'key': 'typeHandlerVersion', 'type': 'str'}, - 'status': {'key': 'status', 'type': 'InstanceViewStatus'}, - } - - def __init__(self, *, type: str=None, type_handler_version: str=None, status=None, **kwargs) -> None: - super(VirtualMachineExtensionHandlerInstanceView, self).__init__(**kwargs) - self.type = type - self.type_handler_version = type_handler_version - self.status = status diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_extension_image.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_extension_image.py deleted file mode 100644 index 7273e2b84754..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_extension_image.py +++ /dev/null @@ -1,81 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource import Resource - - -class VirtualMachineExtensionImage(Resource): - """Describes a Virtual Machine Extension Image. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource Id - :vartype id: str - :ivar name: Resource name - :vartype name: str - :ivar type: Resource type - :vartype type: str - :param location: Required. Resource location - :type location: str - :param tags: Resource tags - :type tags: dict[str, str] - :param operating_system: Required. The operating system this extension - supports. - :type operating_system: str - :param compute_role: Required. The type of role (IaaS or PaaS) this - extension supports. - :type compute_role: str - :param handler_schema: Required. The schema defined by publisher, where - extension consumers should provide settings in a matching schema. - :type handler_schema: str - :param vm_scale_set_enabled: Whether the extension can be used on xRP - VMScaleSets. By default existing extensions are usable on scalesets, but - there might be cases where a publisher wants to explicitly indicate the - extension is only enabled for CRP VMs but not VMSS. - :type vm_scale_set_enabled: bool - :param supports_multiple_extensions: Whether the handler can support - multiple extensions. - :type supports_multiple_extensions: bool - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - 'operating_system': {'required': True}, - 'compute_role': {'required': True}, - 'handler_schema': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'operating_system': {'key': 'properties.operatingSystem', 'type': 'str'}, - 'compute_role': {'key': 'properties.computeRole', 'type': 'str'}, - 'handler_schema': {'key': 'properties.handlerSchema', 'type': 'str'}, - 'vm_scale_set_enabled': {'key': 'properties.vmScaleSetEnabled', 'type': 'bool'}, - 'supports_multiple_extensions': {'key': 'properties.supportsMultipleExtensions', 'type': 'bool'}, - } - - def __init__(self, **kwargs): - super(VirtualMachineExtensionImage, self).__init__(**kwargs) - self.operating_system = kwargs.get('operating_system', None) - self.compute_role = kwargs.get('compute_role', None) - self.handler_schema = kwargs.get('handler_schema', None) - self.vm_scale_set_enabled = kwargs.get('vm_scale_set_enabled', None) - self.supports_multiple_extensions = kwargs.get('supports_multiple_extensions', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_extension_image_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_extension_image_py3.py deleted file mode 100644 index 3d48c3a87fb0..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_extension_image_py3.py +++ /dev/null @@ -1,81 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource_py3 import Resource - - -class VirtualMachineExtensionImage(Resource): - """Describes a Virtual Machine Extension Image. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource Id - :vartype id: str - :ivar name: Resource name - :vartype name: str - :ivar type: Resource type - :vartype type: str - :param location: Required. Resource location - :type location: str - :param tags: Resource tags - :type tags: dict[str, str] - :param operating_system: Required. The operating system this extension - supports. - :type operating_system: str - :param compute_role: Required. The type of role (IaaS or PaaS) this - extension supports. - :type compute_role: str - :param handler_schema: Required. The schema defined by publisher, where - extension consumers should provide settings in a matching schema. - :type handler_schema: str - :param vm_scale_set_enabled: Whether the extension can be used on xRP - VMScaleSets. By default existing extensions are usable on scalesets, but - there might be cases where a publisher wants to explicitly indicate the - extension is only enabled for CRP VMs but not VMSS. - :type vm_scale_set_enabled: bool - :param supports_multiple_extensions: Whether the handler can support - multiple extensions. - :type supports_multiple_extensions: bool - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - 'operating_system': {'required': True}, - 'compute_role': {'required': True}, - 'handler_schema': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'operating_system': {'key': 'properties.operatingSystem', 'type': 'str'}, - 'compute_role': {'key': 'properties.computeRole', 'type': 'str'}, - 'handler_schema': {'key': 'properties.handlerSchema', 'type': 'str'}, - 'vm_scale_set_enabled': {'key': 'properties.vmScaleSetEnabled', 'type': 'bool'}, - 'supports_multiple_extensions': {'key': 'properties.supportsMultipleExtensions', 'type': 'bool'}, - } - - def __init__(self, *, location: str, operating_system: str, compute_role: str, handler_schema: str, tags=None, vm_scale_set_enabled: bool=None, supports_multiple_extensions: bool=None, **kwargs) -> None: - super(VirtualMachineExtensionImage, self).__init__(location=location, tags=tags, **kwargs) - self.operating_system = operating_system - self.compute_role = compute_role - self.handler_schema = handler_schema - self.vm_scale_set_enabled = vm_scale_set_enabled - self.supports_multiple_extensions = supports_multiple_extensions diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_extension_instance_view.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_extension_instance_view.py deleted file mode 100644 index d79fad9754ac..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_extension_instance_view.py +++ /dev/null @@ -1,47 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineExtensionInstanceView(Model): - """The instance view of a virtual machine extension. - - :param name: The virtual machine extension name. - :type name: str - :param type: Specifies the type of the extension; an example is - "CustomScriptExtension". - :type type: str - :param type_handler_version: Specifies the version of the script handler. - :type type_handler_version: str - :param substatuses: The resource status information. - :type substatuses: - list[~azure.mgmt.compute.v2018_04_01.models.InstanceViewStatus] - :param statuses: The resource status information. - :type statuses: - list[~azure.mgmt.compute.v2018_04_01.models.InstanceViewStatus] - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'type_handler_version': {'key': 'typeHandlerVersion', 'type': 'str'}, - 'substatuses': {'key': 'substatuses', 'type': '[InstanceViewStatus]'}, - 'statuses': {'key': 'statuses', 'type': '[InstanceViewStatus]'}, - } - - def __init__(self, **kwargs): - super(VirtualMachineExtensionInstanceView, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.type = kwargs.get('type', None) - self.type_handler_version = kwargs.get('type_handler_version', None) - self.substatuses = kwargs.get('substatuses', None) - self.statuses = kwargs.get('statuses', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_extension_instance_view_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_extension_instance_view_py3.py deleted file mode 100644 index 4de254438718..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_extension_instance_view_py3.py +++ /dev/null @@ -1,47 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineExtensionInstanceView(Model): - """The instance view of a virtual machine extension. - - :param name: The virtual machine extension name. - :type name: str - :param type: Specifies the type of the extension; an example is - "CustomScriptExtension". - :type type: str - :param type_handler_version: Specifies the version of the script handler. - :type type_handler_version: str - :param substatuses: The resource status information. - :type substatuses: - list[~azure.mgmt.compute.v2018_04_01.models.InstanceViewStatus] - :param statuses: The resource status information. - :type statuses: - list[~azure.mgmt.compute.v2018_04_01.models.InstanceViewStatus] - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'type_handler_version': {'key': 'typeHandlerVersion', 'type': 'str'}, - 'substatuses': {'key': 'substatuses', 'type': '[InstanceViewStatus]'}, - 'statuses': {'key': 'statuses', 'type': '[InstanceViewStatus]'}, - } - - def __init__(self, *, name: str=None, type: str=None, type_handler_version: str=None, substatuses=None, statuses=None, **kwargs) -> None: - super(VirtualMachineExtensionInstanceView, self).__init__(**kwargs) - self.name = name - self.type = type - self.type_handler_version = type_handler_version - self.substatuses = substatuses - self.statuses = statuses diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_extension_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_extension_py3.py deleted file mode 100644 index 8fa667369a33..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_extension_py3.py +++ /dev/null @@ -1,97 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource_py3 import Resource - - -class VirtualMachineExtension(Resource): - """Describes a Virtual Machine Extension. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource Id - :vartype id: str - :ivar name: Resource name - :vartype name: str - :ivar type: Resource type - :vartype type: str - :param location: Required. Resource location - :type location: str - :param tags: Resource tags - :type tags: dict[str, str] - :param force_update_tag: How the extension handler should be forced to - update even if the extension configuration has not changed. - :type force_update_tag: str - :param publisher: The name of the extension handler publisher. - :type publisher: str - :param virtual_machine_extension_type: Specifies the type of the - extension; an example is "CustomScriptExtension". - :type virtual_machine_extension_type: str - :param type_handler_version: Specifies the version of the script handler. - :type type_handler_version: str - :param auto_upgrade_minor_version: Indicates whether the extension should - use a newer minor version if one is available at deployment time. Once - deployed, however, the extension will not upgrade minor versions unless - redeployed, even with this property set to true. - :type auto_upgrade_minor_version: bool - :param settings: Json formatted public settings for the extension. - :type settings: object - :param protected_settings: The extension can contain either - protectedSettings or protectedSettingsFromKeyVault or no protected - settings at all. - :type protected_settings: object - :ivar provisioning_state: The provisioning state, which only appears in - the response. - :vartype provisioning_state: str - :param instance_view: The virtual machine extension instance view. - :type instance_view: - ~azure.mgmt.compute.v2018_04_01.models.VirtualMachineExtensionInstanceView - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - 'provisioning_state': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'force_update_tag': {'key': 'properties.forceUpdateTag', 'type': 'str'}, - 'publisher': {'key': 'properties.publisher', 'type': 'str'}, - 'virtual_machine_extension_type': {'key': 'properties.type', 'type': 'str'}, - 'type_handler_version': {'key': 'properties.typeHandlerVersion', 'type': 'str'}, - 'auto_upgrade_minor_version': {'key': 'properties.autoUpgradeMinorVersion', 'type': 'bool'}, - 'settings': {'key': 'properties.settings', 'type': 'object'}, - 'protected_settings': {'key': 'properties.protectedSettings', 'type': 'object'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'instance_view': {'key': 'properties.instanceView', 'type': 'VirtualMachineExtensionInstanceView'}, - } - - def __init__(self, *, location: str, tags=None, force_update_tag: str=None, publisher: str=None, virtual_machine_extension_type: str=None, type_handler_version: str=None, auto_upgrade_minor_version: bool=None, settings=None, protected_settings=None, instance_view=None, **kwargs) -> None: - super(VirtualMachineExtension, self).__init__(location=location, tags=tags, **kwargs) - self.force_update_tag = force_update_tag - self.publisher = publisher - self.virtual_machine_extension_type = virtual_machine_extension_type - self.type_handler_version = type_handler_version - self.auto_upgrade_minor_version = auto_upgrade_minor_version - self.settings = settings - self.protected_settings = protected_settings - self.provisioning_state = None - self.instance_view = instance_view diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_extension_update.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_extension_update.py deleted file mode 100644 index b920ff57ff96..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_extension_update.py +++ /dev/null @@ -1,62 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .update_resource import UpdateResource - - -class VirtualMachineExtensionUpdate(UpdateResource): - """Describes a Virtual Machine Extension. - - :param tags: Resource tags - :type tags: dict[str, str] - :param force_update_tag: How the extension handler should be forced to - update even if the extension configuration has not changed. - :type force_update_tag: str - :param publisher: The name of the extension handler publisher. - :type publisher: str - :param type: Specifies the type of the extension; an example is - "CustomScriptExtension". - :type type: str - :param type_handler_version: Specifies the version of the script handler. - :type type_handler_version: str - :param auto_upgrade_minor_version: Indicates whether the extension should - use a newer minor version if one is available at deployment time. Once - deployed, however, the extension will not upgrade minor versions unless - redeployed, even with this property set to true. - :type auto_upgrade_minor_version: bool - :param settings: Json formatted public settings for the extension. - :type settings: object - :param protected_settings: The extension can contain either - protectedSettings or protectedSettingsFromKeyVault or no protected - settings at all. - :type protected_settings: object - """ - - _attribute_map = { - 'tags': {'key': 'tags', 'type': '{str}'}, - 'force_update_tag': {'key': 'properties.forceUpdateTag', 'type': 'str'}, - 'publisher': {'key': 'properties.publisher', 'type': 'str'}, - 'type': {'key': 'properties.type', 'type': 'str'}, - 'type_handler_version': {'key': 'properties.typeHandlerVersion', 'type': 'str'}, - 'auto_upgrade_minor_version': {'key': 'properties.autoUpgradeMinorVersion', 'type': 'bool'}, - 'settings': {'key': 'properties.settings', 'type': 'object'}, - 'protected_settings': {'key': 'properties.protectedSettings', 'type': 'object'}, - } - - def __init__(self, **kwargs): - super(VirtualMachineExtensionUpdate, self).__init__(**kwargs) - self.force_update_tag = kwargs.get('force_update_tag', None) - self.publisher = kwargs.get('publisher', None) - self.type = kwargs.get('type', None) - self.type_handler_version = kwargs.get('type_handler_version', None) - self.auto_upgrade_minor_version = kwargs.get('auto_upgrade_minor_version', None) - self.settings = kwargs.get('settings', None) - self.protected_settings = kwargs.get('protected_settings', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_extension_update_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_extension_update_py3.py deleted file mode 100644 index c32c18d32759..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_extension_update_py3.py +++ /dev/null @@ -1,62 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .update_resource_py3 import UpdateResource - - -class VirtualMachineExtensionUpdate(UpdateResource): - """Describes a Virtual Machine Extension. - - :param tags: Resource tags - :type tags: dict[str, str] - :param force_update_tag: How the extension handler should be forced to - update even if the extension configuration has not changed. - :type force_update_tag: str - :param publisher: The name of the extension handler publisher. - :type publisher: str - :param type: Specifies the type of the extension; an example is - "CustomScriptExtension". - :type type: str - :param type_handler_version: Specifies the version of the script handler. - :type type_handler_version: str - :param auto_upgrade_minor_version: Indicates whether the extension should - use a newer minor version if one is available at deployment time. Once - deployed, however, the extension will not upgrade minor versions unless - redeployed, even with this property set to true. - :type auto_upgrade_minor_version: bool - :param settings: Json formatted public settings for the extension. - :type settings: object - :param protected_settings: The extension can contain either - protectedSettings or protectedSettingsFromKeyVault or no protected - settings at all. - :type protected_settings: object - """ - - _attribute_map = { - 'tags': {'key': 'tags', 'type': '{str}'}, - 'force_update_tag': {'key': 'properties.forceUpdateTag', 'type': 'str'}, - 'publisher': {'key': 'properties.publisher', 'type': 'str'}, - 'type': {'key': 'properties.type', 'type': 'str'}, - 'type_handler_version': {'key': 'properties.typeHandlerVersion', 'type': 'str'}, - 'auto_upgrade_minor_version': {'key': 'properties.autoUpgradeMinorVersion', 'type': 'bool'}, - 'settings': {'key': 'properties.settings', 'type': 'object'}, - 'protected_settings': {'key': 'properties.protectedSettings', 'type': 'object'}, - } - - def __init__(self, *, tags=None, force_update_tag: str=None, publisher: str=None, type: str=None, type_handler_version: str=None, auto_upgrade_minor_version: bool=None, settings=None, protected_settings=None, **kwargs) -> None: - super(VirtualMachineExtensionUpdate, self).__init__(tags=tags, **kwargs) - self.force_update_tag = force_update_tag - self.publisher = publisher - self.type = type - self.type_handler_version = type_handler_version - self.auto_upgrade_minor_version = auto_upgrade_minor_version - self.settings = settings - self.protected_settings = protected_settings diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_extensions_list_result.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_extensions_list_result.py deleted file mode 100644 index a00529b436fb..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_extensions_list_result.py +++ /dev/null @@ -1,29 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineExtensionsListResult(Model): - """The List Extension operation response. - - :param value: The list of extensions - :type value: - list[~azure.mgmt.compute.v2018_04_01.models.VirtualMachineExtension] - """ - - _attribute_map = { - 'value': {'key': 'value', 'type': '[VirtualMachineExtension]'}, - } - - def __init__(self, **kwargs): - super(VirtualMachineExtensionsListResult, self).__init__(**kwargs) - self.value = kwargs.get('value', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_extensions_list_result_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_extensions_list_result_py3.py deleted file mode 100644 index 0b64c0d2cd38..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_extensions_list_result_py3.py +++ /dev/null @@ -1,29 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineExtensionsListResult(Model): - """The List Extension operation response. - - :param value: The list of extensions - :type value: - list[~azure.mgmt.compute.v2018_04_01.models.VirtualMachineExtension] - """ - - _attribute_map = { - 'value': {'key': 'value', 'type': '[VirtualMachineExtension]'}, - } - - def __init__(self, *, value=None, **kwargs) -> None: - super(VirtualMachineExtensionsListResult, self).__init__(**kwargs) - self.value = value diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_health_status.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_health_status.py deleted file mode 100644 index 28c49e91d1e1..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_health_status.py +++ /dev/null @@ -1,35 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineHealthStatus(Model): - """The health status of the VM. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar status: The health status information for the VM. - :vartype status: ~azure.mgmt.compute.v2018_04_01.models.InstanceViewStatus - """ - - _validation = { - 'status': {'readonly': True}, - } - - _attribute_map = { - 'status': {'key': 'status', 'type': 'InstanceViewStatus'}, - } - - def __init__(self, **kwargs): - super(VirtualMachineHealthStatus, self).__init__(**kwargs) - self.status = None diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_health_status_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_health_status_py3.py deleted file mode 100644 index b6311ea93d34..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_health_status_py3.py +++ /dev/null @@ -1,35 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineHealthStatus(Model): - """The health status of the VM. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar status: The health status information for the VM. - :vartype status: ~azure.mgmt.compute.v2018_04_01.models.InstanceViewStatus - """ - - _validation = { - 'status': {'readonly': True}, - } - - _attribute_map = { - 'status': {'key': 'status', 'type': 'InstanceViewStatus'}, - } - - def __init__(self, **kwargs) -> None: - super(VirtualMachineHealthStatus, self).__init__(**kwargs) - self.status = None diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_identity.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_identity.py deleted file mode 100644 index 3c9fa46adfb9..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_identity.py +++ /dev/null @@ -1,58 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineIdentity(Model): - """Identity for the virtual machine. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar principal_id: The principal id of virtual machine identity. This - property will only be provided for a system assigned identity. - :vartype principal_id: str - :ivar tenant_id: The tenant id associated with the virtual machine. This - property will only be provided for a system assigned identity. - :vartype tenant_id: str - :param type: The type of identity used for the virtual machine. The type - 'SystemAssigned, UserAssigned' includes both an implicitly created - identity and a set of user assigned identities. The type 'None' will - remove any identities from the virtual machine. Possible values include: - 'SystemAssigned', 'UserAssigned', 'SystemAssigned, UserAssigned', 'None' - :type type: str or - ~azure.mgmt.compute.v2018_04_01.models.ResourceIdentityType - :param identity_ids: The list of user identities associated with the - Virtual Machine. The user identity references will be ARM resource ids in - the form: - '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/identities/{identityName}'. - :type identity_ids: list[str] - """ - - _validation = { - 'principal_id': {'readonly': True}, - 'tenant_id': {'readonly': True}, - } - - _attribute_map = { - 'principal_id': {'key': 'principalId', 'type': 'str'}, - 'tenant_id': {'key': 'tenantId', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'ResourceIdentityType'}, - 'identity_ids': {'key': 'identityIds', 'type': '[str]'}, - } - - def __init__(self, **kwargs): - super(VirtualMachineIdentity, self).__init__(**kwargs) - self.principal_id = None - self.tenant_id = None - self.type = kwargs.get('type', None) - self.identity_ids = kwargs.get('identity_ids', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_identity_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_identity_py3.py deleted file mode 100644 index 96d2849dfd9d..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_identity_py3.py +++ /dev/null @@ -1,58 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineIdentity(Model): - """Identity for the virtual machine. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar principal_id: The principal id of virtual machine identity. This - property will only be provided for a system assigned identity. - :vartype principal_id: str - :ivar tenant_id: The tenant id associated with the virtual machine. This - property will only be provided for a system assigned identity. - :vartype tenant_id: str - :param type: The type of identity used for the virtual machine. The type - 'SystemAssigned, UserAssigned' includes both an implicitly created - identity and a set of user assigned identities. The type 'None' will - remove any identities from the virtual machine. Possible values include: - 'SystemAssigned', 'UserAssigned', 'SystemAssigned, UserAssigned', 'None' - :type type: str or - ~azure.mgmt.compute.v2018_04_01.models.ResourceIdentityType - :param identity_ids: The list of user identities associated with the - Virtual Machine. The user identity references will be ARM resource ids in - the form: - '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/identities/{identityName}'. - :type identity_ids: list[str] - """ - - _validation = { - 'principal_id': {'readonly': True}, - 'tenant_id': {'readonly': True}, - } - - _attribute_map = { - 'principal_id': {'key': 'principalId', 'type': 'str'}, - 'tenant_id': {'key': 'tenantId', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'ResourceIdentityType'}, - 'identity_ids': {'key': 'identityIds', 'type': '[str]'}, - } - - def __init__(self, *, type=None, identity_ids=None, **kwargs) -> None: - super(VirtualMachineIdentity, self).__init__(**kwargs) - self.principal_id = None - self.tenant_id = None - self.type = type - self.identity_ids = identity_ids diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_image.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_image.py deleted file mode 100644 index ea35eefb5ad4..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_image.py +++ /dev/null @@ -1,59 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .virtual_machine_image_resource import VirtualMachineImageResource - - -class VirtualMachineImage(VirtualMachineImageResource): - """Describes a Virtual Machine Image. - - All required parameters must be populated in order to send to Azure. - - :param id: Resource Id - :type id: str - :param name: Required. The name of the resource. - :type name: str - :param location: Required. The supported Azure location of the resource. - :type location: str - :param tags: Specifies the tags that are assigned to the virtual machine. - For more information about using tags, see [Using tags to organize your - Azure - resources](https://docs.microsoft.com/azure/azure-resource-manager/resource-group-using-tags.md). - :type tags: dict[str, str] - :param plan: - :type plan: ~azure.mgmt.compute.v2018_04_01.models.PurchasePlan - :param os_disk_image: - :type os_disk_image: ~azure.mgmt.compute.v2018_04_01.models.OSDiskImage - :param data_disk_images: - :type data_disk_images: - list[~azure.mgmt.compute.v2018_04_01.models.DataDiskImage] - """ - - _validation = { - 'name': {'required': True}, - 'location': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'plan': {'key': 'properties.plan', 'type': 'PurchasePlan'}, - 'os_disk_image': {'key': 'properties.osDiskImage', 'type': 'OSDiskImage'}, - 'data_disk_images': {'key': 'properties.dataDiskImages', 'type': '[DataDiskImage]'}, - } - - def __init__(self, **kwargs): - super(VirtualMachineImage, self).__init__(**kwargs) - self.plan = kwargs.get('plan', None) - self.os_disk_image = kwargs.get('os_disk_image', None) - self.data_disk_images = kwargs.get('data_disk_images', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_image_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_image_py3.py deleted file mode 100644 index 655c2909f7aa..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_image_py3.py +++ /dev/null @@ -1,59 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .virtual_machine_image_resource_py3 import VirtualMachineImageResource - - -class VirtualMachineImage(VirtualMachineImageResource): - """Describes a Virtual Machine Image. - - All required parameters must be populated in order to send to Azure. - - :param id: Resource Id - :type id: str - :param name: Required. The name of the resource. - :type name: str - :param location: Required. The supported Azure location of the resource. - :type location: str - :param tags: Specifies the tags that are assigned to the virtual machine. - For more information about using tags, see [Using tags to organize your - Azure - resources](https://docs.microsoft.com/azure/azure-resource-manager/resource-group-using-tags.md). - :type tags: dict[str, str] - :param plan: - :type plan: ~azure.mgmt.compute.v2018_04_01.models.PurchasePlan - :param os_disk_image: - :type os_disk_image: ~azure.mgmt.compute.v2018_04_01.models.OSDiskImage - :param data_disk_images: - :type data_disk_images: - list[~azure.mgmt.compute.v2018_04_01.models.DataDiskImage] - """ - - _validation = { - 'name': {'required': True}, - 'location': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'plan': {'key': 'properties.plan', 'type': 'PurchasePlan'}, - 'os_disk_image': {'key': 'properties.osDiskImage', 'type': 'OSDiskImage'}, - 'data_disk_images': {'key': 'properties.dataDiskImages', 'type': '[DataDiskImage]'}, - } - - def __init__(self, *, name: str, location: str, id: str=None, tags=None, plan=None, os_disk_image=None, data_disk_images=None, **kwargs) -> None: - super(VirtualMachineImage, self).__init__(id=id, name=name, location=location, tags=tags, **kwargs) - self.plan = plan - self.os_disk_image = os_disk_image - self.data_disk_images = data_disk_images diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_image_resource.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_image_resource.py deleted file mode 100644 index 8807cc8f391b..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_image_resource.py +++ /dev/null @@ -1,49 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .sub_resource import SubResource - - -class VirtualMachineImageResource(SubResource): - """Virtual machine image resource information. - - All required parameters must be populated in order to send to Azure. - - :param id: Resource Id - :type id: str - :param name: Required. The name of the resource. - :type name: str - :param location: Required. The supported Azure location of the resource. - :type location: str - :param tags: Specifies the tags that are assigned to the virtual machine. - For more information about using tags, see [Using tags to organize your - Azure - resources](https://docs.microsoft.com/azure/azure-resource-manager/resource-group-using-tags.md). - :type tags: dict[str, str] - """ - - _validation = { - 'name': {'required': True}, - 'location': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - } - - def __init__(self, **kwargs): - super(VirtualMachineImageResource, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.location = kwargs.get('location', None) - self.tags = kwargs.get('tags', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_image_resource_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_image_resource_py3.py deleted file mode 100644 index b9d63a8bc9e0..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_image_resource_py3.py +++ /dev/null @@ -1,49 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .sub_resource_py3 import SubResource - - -class VirtualMachineImageResource(SubResource): - """Virtual machine image resource information. - - All required parameters must be populated in order to send to Azure. - - :param id: Resource Id - :type id: str - :param name: Required. The name of the resource. - :type name: str - :param location: Required. The supported Azure location of the resource. - :type location: str - :param tags: Specifies the tags that are assigned to the virtual machine. - For more information about using tags, see [Using tags to organize your - Azure - resources](https://docs.microsoft.com/azure/azure-resource-manager/resource-group-using-tags.md). - :type tags: dict[str, str] - """ - - _validation = { - 'name': {'required': True}, - 'location': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - } - - def __init__(self, *, name: str, location: str, id: str=None, tags=None, **kwargs) -> None: - super(VirtualMachineImageResource, self).__init__(id=id, **kwargs) - self.name = name - self.location = location - self.tags = tags diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_instance_view.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_instance_view.py deleted file mode 100644 index 52963d0a1224..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_instance_view.py +++ /dev/null @@ -1,84 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineInstanceView(Model): - """The instance view of a virtual machine. - - :param platform_update_domain: Specifies the update domain of the virtual - machine. - :type platform_update_domain: int - :param platform_fault_domain: Specifies the fault domain of the virtual - machine. - :type platform_fault_domain: int - :param computer_name: The computer name assigned to the virtual machine. - :type computer_name: str - :param os_name: The Operating System running on the virtual machine. - :type os_name: str - :param os_version: The version of Operating System running on the virtual - machine. - :type os_version: str - :param rdp_thumb_print: The Remote desktop certificate thumbprint. - :type rdp_thumb_print: str - :param vm_agent: The VM Agent running on the virtual machine. - :type vm_agent: - ~azure.mgmt.compute.v2018_04_01.models.VirtualMachineAgentInstanceView - :param maintenance_redeploy_status: The Maintenance Operation status on - the virtual machine. - :type maintenance_redeploy_status: - ~azure.mgmt.compute.v2018_04_01.models.MaintenanceRedeployStatus - :param disks: The virtual machine disk information. - :type disks: list[~azure.mgmt.compute.v2018_04_01.models.DiskInstanceView] - :param extensions: The extensions information. - :type extensions: - list[~azure.mgmt.compute.v2018_04_01.models.VirtualMachineExtensionInstanceView] - :param boot_diagnostics: Boot Diagnostics is a debugging feature which - allows you to view Console Output and Screenshot to diagnose VM status. -

    You can easily view the output of your console log.

    - Azure also enables you to see a screenshot of the VM from the hypervisor. - :type boot_diagnostics: - ~azure.mgmt.compute.v2018_04_01.models.BootDiagnosticsInstanceView - :param statuses: The resource status information. - :type statuses: - list[~azure.mgmt.compute.v2018_04_01.models.InstanceViewStatus] - """ - - _attribute_map = { - 'platform_update_domain': {'key': 'platformUpdateDomain', 'type': 'int'}, - 'platform_fault_domain': {'key': 'platformFaultDomain', 'type': 'int'}, - 'computer_name': {'key': 'computerName', 'type': 'str'}, - 'os_name': {'key': 'osName', 'type': 'str'}, - 'os_version': {'key': 'osVersion', 'type': 'str'}, - 'rdp_thumb_print': {'key': 'rdpThumbPrint', 'type': 'str'}, - 'vm_agent': {'key': 'vmAgent', 'type': 'VirtualMachineAgentInstanceView'}, - 'maintenance_redeploy_status': {'key': 'maintenanceRedeployStatus', 'type': 'MaintenanceRedeployStatus'}, - 'disks': {'key': 'disks', 'type': '[DiskInstanceView]'}, - 'extensions': {'key': 'extensions', 'type': '[VirtualMachineExtensionInstanceView]'}, - 'boot_diagnostics': {'key': 'bootDiagnostics', 'type': 'BootDiagnosticsInstanceView'}, - 'statuses': {'key': 'statuses', 'type': '[InstanceViewStatus]'}, - } - - def __init__(self, **kwargs): - super(VirtualMachineInstanceView, self).__init__(**kwargs) - self.platform_update_domain = kwargs.get('platform_update_domain', None) - self.platform_fault_domain = kwargs.get('platform_fault_domain', None) - self.computer_name = kwargs.get('computer_name', None) - self.os_name = kwargs.get('os_name', None) - self.os_version = kwargs.get('os_version', None) - self.rdp_thumb_print = kwargs.get('rdp_thumb_print', None) - self.vm_agent = kwargs.get('vm_agent', None) - self.maintenance_redeploy_status = kwargs.get('maintenance_redeploy_status', None) - self.disks = kwargs.get('disks', None) - self.extensions = kwargs.get('extensions', None) - self.boot_diagnostics = kwargs.get('boot_diagnostics', None) - self.statuses = kwargs.get('statuses', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_instance_view_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_instance_view_py3.py deleted file mode 100644 index 4ba78b7e4b23..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_instance_view_py3.py +++ /dev/null @@ -1,84 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineInstanceView(Model): - """The instance view of a virtual machine. - - :param platform_update_domain: Specifies the update domain of the virtual - machine. - :type platform_update_domain: int - :param platform_fault_domain: Specifies the fault domain of the virtual - machine. - :type platform_fault_domain: int - :param computer_name: The computer name assigned to the virtual machine. - :type computer_name: str - :param os_name: The Operating System running on the virtual machine. - :type os_name: str - :param os_version: The version of Operating System running on the virtual - machine. - :type os_version: str - :param rdp_thumb_print: The Remote desktop certificate thumbprint. - :type rdp_thumb_print: str - :param vm_agent: The VM Agent running on the virtual machine. - :type vm_agent: - ~azure.mgmt.compute.v2018_04_01.models.VirtualMachineAgentInstanceView - :param maintenance_redeploy_status: The Maintenance Operation status on - the virtual machine. - :type maintenance_redeploy_status: - ~azure.mgmt.compute.v2018_04_01.models.MaintenanceRedeployStatus - :param disks: The virtual machine disk information. - :type disks: list[~azure.mgmt.compute.v2018_04_01.models.DiskInstanceView] - :param extensions: The extensions information. - :type extensions: - list[~azure.mgmt.compute.v2018_04_01.models.VirtualMachineExtensionInstanceView] - :param boot_diagnostics: Boot Diagnostics is a debugging feature which - allows you to view Console Output and Screenshot to diagnose VM status. -

    You can easily view the output of your console log.

    - Azure also enables you to see a screenshot of the VM from the hypervisor. - :type boot_diagnostics: - ~azure.mgmt.compute.v2018_04_01.models.BootDiagnosticsInstanceView - :param statuses: The resource status information. - :type statuses: - list[~azure.mgmt.compute.v2018_04_01.models.InstanceViewStatus] - """ - - _attribute_map = { - 'platform_update_domain': {'key': 'platformUpdateDomain', 'type': 'int'}, - 'platform_fault_domain': {'key': 'platformFaultDomain', 'type': 'int'}, - 'computer_name': {'key': 'computerName', 'type': 'str'}, - 'os_name': {'key': 'osName', 'type': 'str'}, - 'os_version': {'key': 'osVersion', 'type': 'str'}, - 'rdp_thumb_print': {'key': 'rdpThumbPrint', 'type': 'str'}, - 'vm_agent': {'key': 'vmAgent', 'type': 'VirtualMachineAgentInstanceView'}, - 'maintenance_redeploy_status': {'key': 'maintenanceRedeployStatus', 'type': 'MaintenanceRedeployStatus'}, - 'disks': {'key': 'disks', 'type': '[DiskInstanceView]'}, - 'extensions': {'key': 'extensions', 'type': '[VirtualMachineExtensionInstanceView]'}, - 'boot_diagnostics': {'key': 'bootDiagnostics', 'type': 'BootDiagnosticsInstanceView'}, - 'statuses': {'key': 'statuses', 'type': '[InstanceViewStatus]'}, - } - - def __init__(self, *, platform_update_domain: int=None, platform_fault_domain: int=None, computer_name: str=None, os_name: str=None, os_version: str=None, rdp_thumb_print: str=None, vm_agent=None, maintenance_redeploy_status=None, disks=None, extensions=None, boot_diagnostics=None, statuses=None, **kwargs) -> None: - super(VirtualMachineInstanceView, self).__init__(**kwargs) - self.platform_update_domain = platform_update_domain - self.platform_fault_domain = platform_fault_domain - self.computer_name = computer_name - self.os_name = os_name - self.os_version = os_version - self.rdp_thumb_print = rdp_thumb_print - self.vm_agent = vm_agent - self.maintenance_redeploy_status = maintenance_redeploy_status - self.disks = disks - self.extensions = extensions - self.boot_diagnostics = boot_diagnostics - self.statuses = statuses diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_paged.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_paged.py deleted file mode 100644 index 387e4c3f253f..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class VirtualMachinePaged(Paged): - """ - A paging container for iterating over a list of :class:`VirtualMachine ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[VirtualMachine]'} - } - - def __init__(self, *args, **kwargs): - - super(VirtualMachinePaged, self).__init__(*args, **kwargs) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_py3.py deleted file mode 100644 index f1ace9798e0c..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_py3.py +++ /dev/null @@ -1,157 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource_py3 import Resource - - -class VirtualMachine(Resource): - """Describes a Virtual Machine. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource Id - :vartype id: str - :ivar name: Resource name - :vartype name: str - :ivar type: Resource type - :vartype type: str - :param location: Required. Resource location - :type location: str - :param tags: Resource tags - :type tags: dict[str, str] - :param plan: Specifies information about the marketplace image used to - create the virtual machine. This element is only used for marketplace - images. Before you can use a marketplace image from an API, you must - enable the image for programmatic use. In the Azure portal, find the - marketplace image that you want to use and then click **Want to deploy - programmatically, Get Started ->**. Enter any required information and - then click **Save**. - :type plan: ~azure.mgmt.compute.v2018_04_01.models.Plan - :param hardware_profile: Specifies the hardware settings for the virtual - machine. - :type hardware_profile: - ~azure.mgmt.compute.v2018_04_01.models.HardwareProfile - :param storage_profile: Specifies the storage settings for the virtual - machine disks. - :type storage_profile: - ~azure.mgmt.compute.v2018_04_01.models.StorageProfile - :param os_profile: Specifies the operating system settings for the virtual - machine. - :type os_profile: ~azure.mgmt.compute.v2018_04_01.models.OSProfile - :param network_profile: Specifies the network interfaces of the virtual - machine. - :type network_profile: - ~azure.mgmt.compute.v2018_04_01.models.NetworkProfile - :param diagnostics_profile: Specifies the boot diagnostic settings state. -

    Minimum api-version: 2015-06-15. - :type diagnostics_profile: - ~azure.mgmt.compute.v2018_04_01.models.DiagnosticsProfile - :param availability_set: Specifies information about the availability set - that the virtual machine should be assigned to. Virtual machines specified - in the same availability set are allocated to different nodes to maximize - availability. For more information about availability sets, see [Manage - the availability of virtual - machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-manage-availability?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). -

    For more information on Azure planned maintenance, see [Planned - maintenance for virtual machines in - Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-planned-maintenance?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json) -

    Currently, a VM can only be added to availability set at creation - time. An existing VM cannot be added to an availability set. - :type availability_set: ~azure.mgmt.compute.v2018_04_01.models.SubResource - :param proximity_placement_group: Specifies information about the - proximity placement group that the virtual machine should be assigned to. -

    Minimum api-version: 2018-04-01. - :type proximity_placement_group: - ~azure.mgmt.compute.v2018_04_01.models.SubResource - :ivar provisioning_state: The provisioning state, which only appears in - the response. - :vartype provisioning_state: str - :ivar instance_view: The virtual machine instance view. - :vartype instance_view: - ~azure.mgmt.compute.v2018_04_01.models.VirtualMachineInstanceView - :param license_type: Specifies that the image or disk that is being used - was licensed on-premises. This element is only used for images that - contain the Windows Server operating system.

    Possible values are: -

    Windows_Client

    Windows_Server

    If this element - is included in a request for an update, the value must match the initial - value. This value cannot be updated.

    For more information, see - [Azure Hybrid Use Benefit for Windows - Server](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-hybrid-use-benefit-licensing?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json) -

    Minimum api-version: 2015-06-15 - :type license_type: str - :ivar vm_id: Specifies the VM unique ID which is a 128-bits identifier - that is encoded and stored in all Azure IaaS VMs SMBIOS and can be read - using platform BIOS commands. - :vartype vm_id: str - :ivar resources: The virtual machine child extension resources. - :vartype resources: - list[~azure.mgmt.compute.v2018_04_01.models.VirtualMachineExtension] - :param identity: The identity of the virtual machine, if configured. - :type identity: - ~azure.mgmt.compute.v2018_04_01.models.VirtualMachineIdentity - :param zones: The virtual machine zones. - :type zones: list[str] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - 'provisioning_state': {'readonly': True}, - 'instance_view': {'readonly': True}, - 'vm_id': {'readonly': True}, - 'resources': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'plan': {'key': 'plan', 'type': 'Plan'}, - 'hardware_profile': {'key': 'properties.hardwareProfile', 'type': 'HardwareProfile'}, - 'storage_profile': {'key': 'properties.storageProfile', 'type': 'StorageProfile'}, - 'os_profile': {'key': 'properties.osProfile', 'type': 'OSProfile'}, - 'network_profile': {'key': 'properties.networkProfile', 'type': 'NetworkProfile'}, - 'diagnostics_profile': {'key': 'properties.diagnosticsProfile', 'type': 'DiagnosticsProfile'}, - 'availability_set': {'key': 'properties.availabilitySet', 'type': 'SubResource'}, - 'proximity_placement_group': {'key': 'properties.proximityPlacementGroup', 'type': 'SubResource'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'instance_view': {'key': 'properties.instanceView', 'type': 'VirtualMachineInstanceView'}, - 'license_type': {'key': 'properties.licenseType', 'type': 'str'}, - 'vm_id': {'key': 'properties.vmId', 'type': 'str'}, - 'resources': {'key': 'resources', 'type': '[VirtualMachineExtension]'}, - 'identity': {'key': 'identity', 'type': 'VirtualMachineIdentity'}, - 'zones': {'key': 'zones', 'type': '[str]'}, - } - - def __init__(self, *, location: str, tags=None, plan=None, hardware_profile=None, storage_profile=None, os_profile=None, network_profile=None, diagnostics_profile=None, availability_set=None, proximity_placement_group=None, license_type: str=None, identity=None, zones=None, **kwargs) -> None: - super(VirtualMachine, self).__init__(location=location, tags=tags, **kwargs) - self.plan = plan - self.hardware_profile = hardware_profile - self.storage_profile = storage_profile - self.os_profile = os_profile - self.network_profile = network_profile - self.diagnostics_profile = diagnostics_profile - self.availability_set = availability_set - self.proximity_placement_group = proximity_placement_group - self.provisioning_state = None - self.instance_view = None - self.license_type = license_type - self.vm_id = None - self.resources = None - self.identity = identity - self.zones = zones diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_scale_set.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_scale_set.py deleted file mode 100644 index 47c9504438a0..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_scale_set.py +++ /dev/null @@ -1,123 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource import Resource - - -class VirtualMachineScaleSet(Resource): - """Describes a Virtual Machine Scale Set. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource Id - :vartype id: str - :ivar name: Resource name - :vartype name: str - :ivar type: Resource type - :vartype type: str - :param location: Required. Resource location - :type location: str - :param tags: Resource tags - :type tags: dict[str, str] - :param sku: The virtual machine scale set sku. - :type sku: ~azure.mgmt.compute.v2018_04_01.models.Sku - :param plan: Specifies information about the marketplace image used to - create the virtual machine. This element is only used for marketplace - images. Before you can use a marketplace image from an API, you must - enable the image for programmatic use. In the Azure portal, find the - marketplace image that you want to use and then click **Want to deploy - programmatically, Get Started ->**. Enter any required information and - then click **Save**. - :type plan: ~azure.mgmt.compute.v2018_04_01.models.Plan - :param upgrade_policy: The upgrade policy. - :type upgrade_policy: ~azure.mgmt.compute.v2018_04_01.models.UpgradePolicy - :param virtual_machine_profile: The virtual machine profile. - :type virtual_machine_profile: - ~azure.mgmt.compute.v2018_04_01.models.VirtualMachineScaleSetVMProfile - :ivar provisioning_state: The provisioning state, which only appears in - the response. - :vartype provisioning_state: str - :param overprovision: Specifies whether the Virtual Machine Scale Set - should be overprovisioned. - :type overprovision: bool - :ivar unique_id: Specifies the ID which uniquely identifies a Virtual - Machine Scale Set. - :vartype unique_id: str - :param single_placement_group: When true this limits the scale set to a - single placement group, of max size 100 virtual machines. - :type single_placement_group: bool - :param zone_balance: Whether to force strictly even Virtual Machine - distribution cross x-zones in case there is zone outage. - :type zone_balance: bool - :param platform_fault_domain_count: Fault Domain count for each placement - group. - :type platform_fault_domain_count: int - :param proximity_placement_group: Specifies information about the - proximity placement group that the virtual machine scale set should be - assigned to.

    Minimum api-version: 2018-04-01. - :type proximity_placement_group: - ~azure.mgmt.compute.v2018_04_01.models.SubResource - :param identity: The identity of the virtual machine scale set, if - configured. - :type identity: - ~azure.mgmt.compute.v2018_04_01.models.VirtualMachineScaleSetIdentity - :param zones: The virtual machine scale set zones. - :type zones: list[str] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - 'provisioning_state': {'readonly': True}, - 'unique_id': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'sku': {'key': 'sku', 'type': 'Sku'}, - 'plan': {'key': 'plan', 'type': 'Plan'}, - 'upgrade_policy': {'key': 'properties.upgradePolicy', 'type': 'UpgradePolicy'}, - 'virtual_machine_profile': {'key': 'properties.virtualMachineProfile', 'type': 'VirtualMachineScaleSetVMProfile'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'overprovision': {'key': 'properties.overprovision', 'type': 'bool'}, - 'unique_id': {'key': 'properties.uniqueId', 'type': 'str'}, - 'single_placement_group': {'key': 'properties.singlePlacementGroup', 'type': 'bool'}, - 'zone_balance': {'key': 'properties.zoneBalance', 'type': 'bool'}, - 'platform_fault_domain_count': {'key': 'properties.platformFaultDomainCount', 'type': 'int'}, - 'proximity_placement_group': {'key': 'properties.proximityPlacementGroup', 'type': 'SubResource'}, - 'identity': {'key': 'identity', 'type': 'VirtualMachineScaleSetIdentity'}, - 'zones': {'key': 'zones', 'type': '[str]'}, - } - - def __init__(self, **kwargs): - super(VirtualMachineScaleSet, self).__init__(**kwargs) - self.sku = kwargs.get('sku', None) - self.plan = kwargs.get('plan', None) - self.upgrade_policy = kwargs.get('upgrade_policy', None) - self.virtual_machine_profile = kwargs.get('virtual_machine_profile', None) - self.provisioning_state = None - self.overprovision = kwargs.get('overprovision', None) - self.unique_id = None - self.single_placement_group = kwargs.get('single_placement_group', None) - self.zone_balance = kwargs.get('zone_balance', None) - self.platform_fault_domain_count = kwargs.get('platform_fault_domain_count', None) - self.proximity_placement_group = kwargs.get('proximity_placement_group', None) - self.identity = kwargs.get('identity', None) - self.zones = kwargs.get('zones', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_scale_set_data_disk.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_scale_set_data_disk.py deleted file mode 100644 index 9b732ee4b771..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_scale_set_data_disk.py +++ /dev/null @@ -1,70 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineScaleSetDataDisk(Model): - """Describes a virtual machine scale set data disk. - - All required parameters must be populated in order to send to Azure. - - :param name: The disk name. - :type name: str - :param lun: Required. Specifies the logical unit number of the data disk. - This value is used to identify data disks within the VM and therefore must - be unique for each data disk attached to a VM. - :type lun: int - :param caching: Specifies the caching requirements.

    Possible - values are:

    **None**

    **ReadOnly**

    **ReadWrite** -

    Default: **None for Standard storage. ReadOnly for Premium - storage**. Possible values include: 'None', 'ReadOnly', 'ReadWrite' - :type caching: str or ~azure.mgmt.compute.v2018_04_01.models.CachingTypes - :param write_accelerator_enabled: Specifies whether writeAccelerator - should be enabled or disabled on the disk. - :type write_accelerator_enabled: bool - :param create_option: Required. The create option. Possible values - include: 'FromImage', 'Empty', 'Attach' - :type create_option: str or - ~azure.mgmt.compute.v2018_04_01.models.DiskCreateOptionTypes - :param disk_size_gb: Specifies the size of an empty data disk in - gigabytes. This element can be used to overwrite the size of the disk in a - virtual machine image.

    This value cannot be larger than 1023 GB - :type disk_size_gb: int - :param managed_disk: The managed disk parameters. - :type managed_disk: - ~azure.mgmt.compute.v2018_04_01.models.VirtualMachineScaleSetManagedDiskParameters - """ - - _validation = { - 'lun': {'required': True}, - 'create_option': {'required': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'lun': {'key': 'lun', 'type': 'int'}, - 'caching': {'key': 'caching', 'type': 'CachingTypes'}, - 'write_accelerator_enabled': {'key': 'writeAcceleratorEnabled', 'type': 'bool'}, - 'create_option': {'key': 'createOption', 'type': 'str'}, - 'disk_size_gb': {'key': 'diskSizeGB', 'type': 'int'}, - 'managed_disk': {'key': 'managedDisk', 'type': 'VirtualMachineScaleSetManagedDiskParameters'}, - } - - def __init__(self, **kwargs): - super(VirtualMachineScaleSetDataDisk, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.lun = kwargs.get('lun', None) - self.caching = kwargs.get('caching', None) - self.write_accelerator_enabled = kwargs.get('write_accelerator_enabled', None) - self.create_option = kwargs.get('create_option', None) - self.disk_size_gb = kwargs.get('disk_size_gb', None) - self.managed_disk = kwargs.get('managed_disk', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_scale_set_data_disk_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_scale_set_data_disk_py3.py deleted file mode 100644 index d90ede5f54e0..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_scale_set_data_disk_py3.py +++ /dev/null @@ -1,70 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineScaleSetDataDisk(Model): - """Describes a virtual machine scale set data disk. - - All required parameters must be populated in order to send to Azure. - - :param name: The disk name. - :type name: str - :param lun: Required. Specifies the logical unit number of the data disk. - This value is used to identify data disks within the VM and therefore must - be unique for each data disk attached to a VM. - :type lun: int - :param caching: Specifies the caching requirements.

    Possible - values are:

    **None**

    **ReadOnly**

    **ReadWrite** -

    Default: **None for Standard storage. ReadOnly for Premium - storage**. Possible values include: 'None', 'ReadOnly', 'ReadWrite' - :type caching: str or ~azure.mgmt.compute.v2018_04_01.models.CachingTypes - :param write_accelerator_enabled: Specifies whether writeAccelerator - should be enabled or disabled on the disk. - :type write_accelerator_enabled: bool - :param create_option: Required. The create option. Possible values - include: 'FromImage', 'Empty', 'Attach' - :type create_option: str or - ~azure.mgmt.compute.v2018_04_01.models.DiskCreateOptionTypes - :param disk_size_gb: Specifies the size of an empty data disk in - gigabytes. This element can be used to overwrite the size of the disk in a - virtual machine image.

    This value cannot be larger than 1023 GB - :type disk_size_gb: int - :param managed_disk: The managed disk parameters. - :type managed_disk: - ~azure.mgmt.compute.v2018_04_01.models.VirtualMachineScaleSetManagedDiskParameters - """ - - _validation = { - 'lun': {'required': True}, - 'create_option': {'required': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'lun': {'key': 'lun', 'type': 'int'}, - 'caching': {'key': 'caching', 'type': 'CachingTypes'}, - 'write_accelerator_enabled': {'key': 'writeAcceleratorEnabled', 'type': 'bool'}, - 'create_option': {'key': 'createOption', 'type': 'str'}, - 'disk_size_gb': {'key': 'diskSizeGB', 'type': 'int'}, - 'managed_disk': {'key': 'managedDisk', 'type': 'VirtualMachineScaleSetManagedDiskParameters'}, - } - - def __init__(self, *, lun: int, create_option, name: str=None, caching=None, write_accelerator_enabled: bool=None, disk_size_gb: int=None, managed_disk=None, **kwargs) -> None: - super(VirtualMachineScaleSetDataDisk, self).__init__(**kwargs) - self.name = name - self.lun = lun - self.caching = caching - self.write_accelerator_enabled = write_accelerator_enabled - self.create_option = create_option - self.disk_size_gb = disk_size_gb - self.managed_disk = managed_disk diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_scale_set_extension.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_scale_set_extension.py deleted file mode 100644 index 24a487547a2a..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_scale_set_extension.py +++ /dev/null @@ -1,80 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .sub_resource_read_only import SubResourceReadOnly - - -class VirtualMachineScaleSetExtension(SubResourceReadOnly): - """Describes a Virtual Machine Scale Set Extension. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource Id - :vartype id: str - :param name: The name of the extension. - :type name: str - :param force_update_tag: If a value is provided and is different from the - previous value, the extension handler will be forced to update even if the - extension configuration has not changed. - :type force_update_tag: str - :param publisher: The name of the extension handler publisher. - :type publisher: str - :param type: Specifies the type of the extension; an example is - "CustomScriptExtension". - :type type: str - :param type_handler_version: Specifies the version of the script handler. - :type type_handler_version: str - :param auto_upgrade_minor_version: Indicates whether the extension should - use a newer minor version if one is available at deployment time. Once - deployed, however, the extension will not upgrade minor versions unless - redeployed, even with this property set to true. - :type auto_upgrade_minor_version: bool - :param settings: Json formatted public settings for the extension. - :type settings: object - :param protected_settings: The extension can contain either - protectedSettings or protectedSettingsFromKeyVault or no protected - settings at all. - :type protected_settings: object - :ivar provisioning_state: The provisioning state, which only appears in - the response. - :vartype provisioning_state: str - """ - - _validation = { - 'id': {'readonly': True}, - 'provisioning_state': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'force_update_tag': {'key': 'properties.forceUpdateTag', 'type': 'str'}, - 'publisher': {'key': 'properties.publisher', 'type': 'str'}, - 'type': {'key': 'properties.type', 'type': 'str'}, - 'type_handler_version': {'key': 'properties.typeHandlerVersion', 'type': 'str'}, - 'auto_upgrade_minor_version': {'key': 'properties.autoUpgradeMinorVersion', 'type': 'bool'}, - 'settings': {'key': 'properties.settings', 'type': 'object'}, - 'protected_settings': {'key': 'properties.protectedSettings', 'type': 'object'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(VirtualMachineScaleSetExtension, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.force_update_tag = kwargs.get('force_update_tag', None) - self.publisher = kwargs.get('publisher', None) - self.type = kwargs.get('type', None) - self.type_handler_version = kwargs.get('type_handler_version', None) - self.auto_upgrade_minor_version = kwargs.get('auto_upgrade_minor_version', None) - self.settings = kwargs.get('settings', None) - self.protected_settings = kwargs.get('protected_settings', None) - self.provisioning_state = None diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_scale_set_extension_paged.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_scale_set_extension_paged.py deleted file mode 100644 index 36a70d58d957..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_scale_set_extension_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class VirtualMachineScaleSetExtensionPaged(Paged): - """ - A paging container for iterating over a list of :class:`VirtualMachineScaleSetExtension ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[VirtualMachineScaleSetExtension]'} - } - - def __init__(self, *args, **kwargs): - - super(VirtualMachineScaleSetExtensionPaged, self).__init__(*args, **kwargs) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_scale_set_extension_profile.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_scale_set_extension_profile.py deleted file mode 100644 index 918951d9fe26..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_scale_set_extension_profile.py +++ /dev/null @@ -1,30 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineScaleSetExtensionProfile(Model): - """Describes a virtual machine scale set extension profile. - - :param extensions: The virtual machine scale set child extension - resources. - :type extensions: - list[~azure.mgmt.compute.v2018_04_01.models.VirtualMachineScaleSetExtension] - """ - - _attribute_map = { - 'extensions': {'key': 'extensions', 'type': '[VirtualMachineScaleSetExtension]'}, - } - - def __init__(self, **kwargs): - super(VirtualMachineScaleSetExtensionProfile, self).__init__(**kwargs) - self.extensions = kwargs.get('extensions', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_scale_set_extension_profile_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_scale_set_extension_profile_py3.py deleted file mode 100644 index c00f190696d9..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_scale_set_extension_profile_py3.py +++ /dev/null @@ -1,30 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineScaleSetExtensionProfile(Model): - """Describes a virtual machine scale set extension profile. - - :param extensions: The virtual machine scale set child extension - resources. - :type extensions: - list[~azure.mgmt.compute.v2018_04_01.models.VirtualMachineScaleSetExtension] - """ - - _attribute_map = { - 'extensions': {'key': 'extensions', 'type': '[VirtualMachineScaleSetExtension]'}, - } - - def __init__(self, *, extensions=None, **kwargs) -> None: - super(VirtualMachineScaleSetExtensionProfile, self).__init__(**kwargs) - self.extensions = extensions diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_scale_set_extension_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_scale_set_extension_py3.py deleted file mode 100644 index 27392a2de9fd..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_scale_set_extension_py3.py +++ /dev/null @@ -1,80 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .sub_resource_read_only_py3 import SubResourceReadOnly - - -class VirtualMachineScaleSetExtension(SubResourceReadOnly): - """Describes a Virtual Machine Scale Set Extension. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource Id - :vartype id: str - :param name: The name of the extension. - :type name: str - :param force_update_tag: If a value is provided and is different from the - previous value, the extension handler will be forced to update even if the - extension configuration has not changed. - :type force_update_tag: str - :param publisher: The name of the extension handler publisher. - :type publisher: str - :param type: Specifies the type of the extension; an example is - "CustomScriptExtension". - :type type: str - :param type_handler_version: Specifies the version of the script handler. - :type type_handler_version: str - :param auto_upgrade_minor_version: Indicates whether the extension should - use a newer minor version if one is available at deployment time. Once - deployed, however, the extension will not upgrade minor versions unless - redeployed, even with this property set to true. - :type auto_upgrade_minor_version: bool - :param settings: Json formatted public settings for the extension. - :type settings: object - :param protected_settings: The extension can contain either - protectedSettings or protectedSettingsFromKeyVault or no protected - settings at all. - :type protected_settings: object - :ivar provisioning_state: The provisioning state, which only appears in - the response. - :vartype provisioning_state: str - """ - - _validation = { - 'id': {'readonly': True}, - 'provisioning_state': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'force_update_tag': {'key': 'properties.forceUpdateTag', 'type': 'str'}, - 'publisher': {'key': 'properties.publisher', 'type': 'str'}, - 'type': {'key': 'properties.type', 'type': 'str'}, - 'type_handler_version': {'key': 'properties.typeHandlerVersion', 'type': 'str'}, - 'auto_upgrade_minor_version': {'key': 'properties.autoUpgradeMinorVersion', 'type': 'bool'}, - 'settings': {'key': 'properties.settings', 'type': 'object'}, - 'protected_settings': {'key': 'properties.protectedSettings', 'type': 'object'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - } - - def __init__(self, *, name: str=None, force_update_tag: str=None, publisher: str=None, type: str=None, type_handler_version: str=None, auto_upgrade_minor_version: bool=None, settings=None, protected_settings=None, **kwargs) -> None: - super(VirtualMachineScaleSetExtension, self).__init__(**kwargs) - self.name = name - self.force_update_tag = force_update_tag - self.publisher = publisher - self.type = type - self.type_handler_version = type_handler_version - self.auto_upgrade_minor_version = auto_upgrade_minor_version - self.settings = settings - self.protected_settings = protected_settings - self.provisioning_state = None diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_scale_set_identity.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_scale_set_identity.py deleted file mode 100644 index 0d3064e622d2..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_scale_set_identity.py +++ /dev/null @@ -1,60 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineScaleSetIdentity(Model): - """Identity for the virtual machine scale set. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar principal_id: The principal id of virtual machine scale set - identity. This property will only be provided for a system assigned - identity. - :vartype principal_id: str - :ivar tenant_id: The tenant id associated with the virtual machine scale - set. This property will only be provided for a system assigned identity. - :vartype tenant_id: str - :param type: The type of identity used for the virtual machine scale set. - The type 'SystemAssigned, UserAssigned' includes both an implicitly - created identity and a set of user assigned identities. The type 'None' - will remove any identities from the virtual machine scale set. Possible - values include: 'SystemAssigned', 'UserAssigned', 'SystemAssigned, - UserAssigned', 'None' - :type type: str or - ~azure.mgmt.compute.v2018_04_01.models.ResourceIdentityType - :param identity_ids: The list of user identities associated with the - virtual machine scale set. The user identity references will be ARM - resource ids in the form: - '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/identities/{identityName}'. - :type identity_ids: list[str] - """ - - _validation = { - 'principal_id': {'readonly': True}, - 'tenant_id': {'readonly': True}, - } - - _attribute_map = { - 'principal_id': {'key': 'principalId', 'type': 'str'}, - 'tenant_id': {'key': 'tenantId', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'ResourceIdentityType'}, - 'identity_ids': {'key': 'identityIds', 'type': '[str]'}, - } - - def __init__(self, **kwargs): - super(VirtualMachineScaleSetIdentity, self).__init__(**kwargs) - self.principal_id = None - self.tenant_id = None - self.type = kwargs.get('type', None) - self.identity_ids = kwargs.get('identity_ids', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_scale_set_identity_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_scale_set_identity_py3.py deleted file mode 100644 index 0d4c71f5c2e4..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_scale_set_identity_py3.py +++ /dev/null @@ -1,60 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineScaleSetIdentity(Model): - """Identity for the virtual machine scale set. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar principal_id: The principal id of virtual machine scale set - identity. This property will only be provided for a system assigned - identity. - :vartype principal_id: str - :ivar tenant_id: The tenant id associated with the virtual machine scale - set. This property will only be provided for a system assigned identity. - :vartype tenant_id: str - :param type: The type of identity used for the virtual machine scale set. - The type 'SystemAssigned, UserAssigned' includes both an implicitly - created identity and a set of user assigned identities. The type 'None' - will remove any identities from the virtual machine scale set. Possible - values include: 'SystemAssigned', 'UserAssigned', 'SystemAssigned, - UserAssigned', 'None' - :type type: str or - ~azure.mgmt.compute.v2018_04_01.models.ResourceIdentityType - :param identity_ids: The list of user identities associated with the - virtual machine scale set. The user identity references will be ARM - resource ids in the form: - '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/identities/{identityName}'. - :type identity_ids: list[str] - """ - - _validation = { - 'principal_id': {'readonly': True}, - 'tenant_id': {'readonly': True}, - } - - _attribute_map = { - 'principal_id': {'key': 'principalId', 'type': 'str'}, - 'tenant_id': {'key': 'tenantId', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'ResourceIdentityType'}, - 'identity_ids': {'key': 'identityIds', 'type': '[str]'}, - } - - def __init__(self, *, type=None, identity_ids=None, **kwargs) -> None: - super(VirtualMachineScaleSetIdentity, self).__init__(**kwargs) - self.principal_id = None - self.tenant_id = None - self.type = type - self.identity_ids = identity_ids diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_scale_set_instance_view.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_scale_set_instance_view.py deleted file mode 100644 index 1622490f7033..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_scale_set_instance_view.py +++ /dev/null @@ -1,48 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineScaleSetInstanceView(Model): - """The instance view of a virtual machine scale set. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar virtual_machine: The instance view status summary for the virtual - machine scale set. - :vartype virtual_machine: - ~azure.mgmt.compute.v2018_04_01.models.VirtualMachineScaleSetInstanceViewStatusesSummary - :ivar extensions: The extensions information. - :vartype extensions: - list[~azure.mgmt.compute.v2018_04_01.models.VirtualMachineScaleSetVMExtensionsSummary] - :param statuses: The resource status information. - :type statuses: - list[~azure.mgmt.compute.v2018_04_01.models.InstanceViewStatus] - """ - - _validation = { - 'virtual_machine': {'readonly': True}, - 'extensions': {'readonly': True}, - } - - _attribute_map = { - 'virtual_machine': {'key': 'virtualMachine', 'type': 'VirtualMachineScaleSetInstanceViewStatusesSummary'}, - 'extensions': {'key': 'extensions', 'type': '[VirtualMachineScaleSetVMExtensionsSummary]'}, - 'statuses': {'key': 'statuses', 'type': '[InstanceViewStatus]'}, - } - - def __init__(self, **kwargs): - super(VirtualMachineScaleSetInstanceView, self).__init__(**kwargs) - self.virtual_machine = None - self.extensions = None - self.statuses = kwargs.get('statuses', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_scale_set_instance_view_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_scale_set_instance_view_py3.py deleted file mode 100644 index b32213a53b1e..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_scale_set_instance_view_py3.py +++ /dev/null @@ -1,48 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineScaleSetInstanceView(Model): - """The instance view of a virtual machine scale set. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar virtual_machine: The instance view status summary for the virtual - machine scale set. - :vartype virtual_machine: - ~azure.mgmt.compute.v2018_04_01.models.VirtualMachineScaleSetInstanceViewStatusesSummary - :ivar extensions: The extensions information. - :vartype extensions: - list[~azure.mgmt.compute.v2018_04_01.models.VirtualMachineScaleSetVMExtensionsSummary] - :param statuses: The resource status information. - :type statuses: - list[~azure.mgmt.compute.v2018_04_01.models.InstanceViewStatus] - """ - - _validation = { - 'virtual_machine': {'readonly': True}, - 'extensions': {'readonly': True}, - } - - _attribute_map = { - 'virtual_machine': {'key': 'virtualMachine', 'type': 'VirtualMachineScaleSetInstanceViewStatusesSummary'}, - 'extensions': {'key': 'extensions', 'type': '[VirtualMachineScaleSetVMExtensionsSummary]'}, - 'statuses': {'key': 'statuses', 'type': '[InstanceViewStatus]'}, - } - - def __init__(self, *, statuses=None, **kwargs) -> None: - super(VirtualMachineScaleSetInstanceView, self).__init__(**kwargs) - self.virtual_machine = None - self.extensions = None - self.statuses = statuses diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_scale_set_instance_view_statuses_summary.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_scale_set_instance_view_statuses_summary.py deleted file mode 100644 index b0166ebb5800..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_scale_set_instance_view_statuses_summary.py +++ /dev/null @@ -1,37 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineScaleSetInstanceViewStatusesSummary(Model): - """Instance view statuses summary for virtual machines of a virtual machine - scale set. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar statuses_summary: The extensions information. - :vartype statuses_summary: - list[~azure.mgmt.compute.v2018_04_01.models.VirtualMachineStatusCodeCount] - """ - - _validation = { - 'statuses_summary': {'readonly': True}, - } - - _attribute_map = { - 'statuses_summary': {'key': 'statusesSummary', 'type': '[VirtualMachineStatusCodeCount]'}, - } - - def __init__(self, **kwargs): - super(VirtualMachineScaleSetInstanceViewStatusesSummary, self).__init__(**kwargs) - self.statuses_summary = None diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_scale_set_instance_view_statuses_summary_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_scale_set_instance_view_statuses_summary_py3.py deleted file mode 100644 index 40b07db6f65e..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_scale_set_instance_view_statuses_summary_py3.py +++ /dev/null @@ -1,37 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineScaleSetInstanceViewStatusesSummary(Model): - """Instance view statuses summary for virtual machines of a virtual machine - scale set. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar statuses_summary: The extensions information. - :vartype statuses_summary: - list[~azure.mgmt.compute.v2018_04_01.models.VirtualMachineStatusCodeCount] - """ - - _validation = { - 'statuses_summary': {'readonly': True}, - } - - _attribute_map = { - 'statuses_summary': {'key': 'statusesSummary', 'type': '[VirtualMachineStatusCodeCount]'}, - } - - def __init__(self, **kwargs) -> None: - super(VirtualMachineScaleSetInstanceViewStatusesSummary, self).__init__(**kwargs) - self.statuses_summary = None diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_scale_set_ip_configuration.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_scale_set_ip_configuration.py deleted file mode 100644 index cab729ab5dba..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_scale_set_ip_configuration.py +++ /dev/null @@ -1,83 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .sub_resource import SubResource - - -class VirtualMachineScaleSetIPConfiguration(SubResource): - """Describes a virtual machine scale set network profile's IP configuration. - - All required parameters must be populated in order to send to Azure. - - :param id: Resource Id - :type id: str - :param name: Required. The IP configuration name. - :type name: str - :param subnet: Specifies the identifier of the subnet. - :type subnet: ~azure.mgmt.compute.v2018_04_01.models.ApiEntityReference - :param primary: Specifies the primary network interface in case the - virtual machine has more than 1 network interface. - :type primary: bool - :param public_ip_address_configuration: The publicIPAddressConfiguration. - :type public_ip_address_configuration: - ~azure.mgmt.compute.v2018_04_01.models.VirtualMachineScaleSetPublicIPAddressConfiguration - :param private_ip_address_version: Available from Api-Version 2017-03-30 - onwards, it represents whether the specific ipconfiguration is IPv4 or - IPv6. Default is taken as IPv4. Possible values are: 'IPv4' and 'IPv6'. - Possible values include: 'IPv4', 'IPv6' - :type private_ip_address_version: str or - ~azure.mgmt.compute.v2018_04_01.models.IPVersion - :param application_gateway_backend_address_pools: Specifies an array of - references to backend address pools of application gateways. A scale set - can reference backend address pools of multiple application gateways. - Multiple scale sets cannot use the same application gateway. - :type application_gateway_backend_address_pools: - list[~azure.mgmt.compute.v2018_04_01.models.SubResource] - :param load_balancer_backend_address_pools: Specifies an array of - references to backend address pools of load balancers. A scale set can - reference backend address pools of one public and one internal load - balancer. Multiple scale sets cannot use the same load balancer. - :type load_balancer_backend_address_pools: - list[~azure.mgmt.compute.v2018_04_01.models.SubResource] - :param load_balancer_inbound_nat_pools: Specifies an array of references - to inbound Nat pools of the load balancers. A scale set can reference - inbound nat pools of one public and one internal load balancer. Multiple - scale sets cannot use the same load balancer - :type load_balancer_inbound_nat_pools: - list[~azure.mgmt.compute.v2018_04_01.models.SubResource] - """ - - _validation = { - 'name': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'subnet': {'key': 'properties.subnet', 'type': 'ApiEntityReference'}, - 'primary': {'key': 'properties.primary', 'type': 'bool'}, - 'public_ip_address_configuration': {'key': 'properties.publicIPAddressConfiguration', 'type': 'VirtualMachineScaleSetPublicIPAddressConfiguration'}, - 'private_ip_address_version': {'key': 'properties.privateIPAddressVersion', 'type': 'str'}, - 'application_gateway_backend_address_pools': {'key': 'properties.applicationGatewayBackendAddressPools', 'type': '[SubResource]'}, - 'load_balancer_backend_address_pools': {'key': 'properties.loadBalancerBackendAddressPools', 'type': '[SubResource]'}, - 'load_balancer_inbound_nat_pools': {'key': 'properties.loadBalancerInboundNatPools', 'type': '[SubResource]'}, - } - - def __init__(self, **kwargs): - super(VirtualMachineScaleSetIPConfiguration, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.subnet = kwargs.get('subnet', None) - self.primary = kwargs.get('primary', None) - self.public_ip_address_configuration = kwargs.get('public_ip_address_configuration', None) - self.private_ip_address_version = kwargs.get('private_ip_address_version', None) - self.application_gateway_backend_address_pools = kwargs.get('application_gateway_backend_address_pools', None) - self.load_balancer_backend_address_pools = kwargs.get('load_balancer_backend_address_pools', None) - self.load_balancer_inbound_nat_pools = kwargs.get('load_balancer_inbound_nat_pools', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_scale_set_ip_configuration_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_scale_set_ip_configuration_py3.py deleted file mode 100644 index 1c73ea10f6fd..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_scale_set_ip_configuration_py3.py +++ /dev/null @@ -1,83 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .sub_resource_py3 import SubResource - - -class VirtualMachineScaleSetIPConfiguration(SubResource): - """Describes a virtual machine scale set network profile's IP configuration. - - All required parameters must be populated in order to send to Azure. - - :param id: Resource Id - :type id: str - :param name: Required. The IP configuration name. - :type name: str - :param subnet: Specifies the identifier of the subnet. - :type subnet: ~azure.mgmt.compute.v2018_04_01.models.ApiEntityReference - :param primary: Specifies the primary network interface in case the - virtual machine has more than 1 network interface. - :type primary: bool - :param public_ip_address_configuration: The publicIPAddressConfiguration. - :type public_ip_address_configuration: - ~azure.mgmt.compute.v2018_04_01.models.VirtualMachineScaleSetPublicIPAddressConfiguration - :param private_ip_address_version: Available from Api-Version 2017-03-30 - onwards, it represents whether the specific ipconfiguration is IPv4 or - IPv6. Default is taken as IPv4. Possible values are: 'IPv4' and 'IPv6'. - Possible values include: 'IPv4', 'IPv6' - :type private_ip_address_version: str or - ~azure.mgmt.compute.v2018_04_01.models.IPVersion - :param application_gateway_backend_address_pools: Specifies an array of - references to backend address pools of application gateways. A scale set - can reference backend address pools of multiple application gateways. - Multiple scale sets cannot use the same application gateway. - :type application_gateway_backend_address_pools: - list[~azure.mgmt.compute.v2018_04_01.models.SubResource] - :param load_balancer_backend_address_pools: Specifies an array of - references to backend address pools of load balancers. A scale set can - reference backend address pools of one public and one internal load - balancer. Multiple scale sets cannot use the same load balancer. - :type load_balancer_backend_address_pools: - list[~azure.mgmt.compute.v2018_04_01.models.SubResource] - :param load_balancer_inbound_nat_pools: Specifies an array of references - to inbound Nat pools of the load balancers. A scale set can reference - inbound nat pools of one public and one internal load balancer. Multiple - scale sets cannot use the same load balancer - :type load_balancer_inbound_nat_pools: - list[~azure.mgmt.compute.v2018_04_01.models.SubResource] - """ - - _validation = { - 'name': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'subnet': {'key': 'properties.subnet', 'type': 'ApiEntityReference'}, - 'primary': {'key': 'properties.primary', 'type': 'bool'}, - 'public_ip_address_configuration': {'key': 'properties.publicIPAddressConfiguration', 'type': 'VirtualMachineScaleSetPublicIPAddressConfiguration'}, - 'private_ip_address_version': {'key': 'properties.privateIPAddressVersion', 'type': 'str'}, - 'application_gateway_backend_address_pools': {'key': 'properties.applicationGatewayBackendAddressPools', 'type': '[SubResource]'}, - 'load_balancer_backend_address_pools': {'key': 'properties.loadBalancerBackendAddressPools', 'type': '[SubResource]'}, - 'load_balancer_inbound_nat_pools': {'key': 'properties.loadBalancerInboundNatPools', 'type': '[SubResource]'}, - } - - def __init__(self, *, name: str, id: str=None, subnet=None, primary: bool=None, public_ip_address_configuration=None, private_ip_address_version=None, application_gateway_backend_address_pools=None, load_balancer_backend_address_pools=None, load_balancer_inbound_nat_pools=None, **kwargs) -> None: - super(VirtualMachineScaleSetIPConfiguration, self).__init__(id=id, **kwargs) - self.name = name - self.subnet = subnet - self.primary = primary - self.public_ip_address_configuration = public_ip_address_configuration - self.private_ip_address_version = private_ip_address_version - self.application_gateway_backend_address_pools = application_gateway_backend_address_pools - self.load_balancer_backend_address_pools = load_balancer_backend_address_pools - self.load_balancer_inbound_nat_pools = load_balancer_inbound_nat_pools diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_scale_set_ip_tag.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_scale_set_ip_tag.py deleted file mode 100644 index 36b70260d646..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_scale_set_ip_tag.py +++ /dev/null @@ -1,33 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineScaleSetIpTag(Model): - """Contains the IP tag associated with the public IP address. - - :param ip_tag_type: IP tag type. Example: FirstPartyUsage. - :type ip_tag_type: str - :param tag: IP tag associated with the public IP. Example: SQL, Storage - etc. - :type tag: str - """ - - _attribute_map = { - 'ip_tag_type': {'key': 'ipTagType', 'type': 'str'}, - 'tag': {'key': 'tag', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(VirtualMachineScaleSetIpTag, self).__init__(**kwargs) - self.ip_tag_type = kwargs.get('ip_tag_type', None) - self.tag = kwargs.get('tag', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_scale_set_ip_tag_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_scale_set_ip_tag_py3.py deleted file mode 100644 index aaf788c9d772..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_scale_set_ip_tag_py3.py +++ /dev/null @@ -1,33 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineScaleSetIpTag(Model): - """Contains the IP tag associated with the public IP address. - - :param ip_tag_type: IP tag type. Example: FirstPartyUsage. - :type ip_tag_type: str - :param tag: IP tag associated with the public IP. Example: SQL, Storage - etc. - :type tag: str - """ - - _attribute_map = { - 'ip_tag_type': {'key': 'ipTagType', 'type': 'str'}, - 'tag': {'key': 'tag', 'type': 'str'}, - } - - def __init__(self, *, ip_tag_type: str=None, tag: str=None, **kwargs) -> None: - super(VirtualMachineScaleSetIpTag, self).__init__(**kwargs) - self.ip_tag_type = ip_tag_type - self.tag = tag diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_scale_set_managed_disk_parameters.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_scale_set_managed_disk_parameters.py deleted file mode 100644 index 89b93a0524f2..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_scale_set_managed_disk_parameters.py +++ /dev/null @@ -1,32 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineScaleSetManagedDiskParameters(Model): - """Describes the parameters of a ScaleSet managed disk. - - :param storage_account_type: Specifies the storage account type for the - managed disk. Possible values are: Standard_LRS, Premium_LRS, and - StandardSSD_LRS. Possible values include: 'Standard_LRS', 'Premium_LRS', - 'StandardSSD_LRS' - :type storage_account_type: str or - ~azure.mgmt.compute.v2018_04_01.models.StorageAccountTypes - """ - - _attribute_map = { - 'storage_account_type': {'key': 'storageAccountType', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(VirtualMachineScaleSetManagedDiskParameters, self).__init__(**kwargs) - self.storage_account_type = kwargs.get('storage_account_type', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_scale_set_managed_disk_parameters_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_scale_set_managed_disk_parameters_py3.py deleted file mode 100644 index a35e25fcba75..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_scale_set_managed_disk_parameters_py3.py +++ /dev/null @@ -1,32 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineScaleSetManagedDiskParameters(Model): - """Describes the parameters of a ScaleSet managed disk. - - :param storage_account_type: Specifies the storage account type for the - managed disk. Possible values are: Standard_LRS, Premium_LRS, and - StandardSSD_LRS. Possible values include: 'Standard_LRS', 'Premium_LRS', - 'StandardSSD_LRS' - :type storage_account_type: str or - ~azure.mgmt.compute.v2018_04_01.models.StorageAccountTypes - """ - - _attribute_map = { - 'storage_account_type': {'key': 'storageAccountType', 'type': 'str'}, - } - - def __init__(self, *, storage_account_type=None, **kwargs) -> None: - super(VirtualMachineScaleSetManagedDiskParameters, self).__init__(**kwargs) - self.storage_account_type = storage_account_type diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_scale_set_network_configuration.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_scale_set_network_configuration.py deleted file mode 100644 index 232955519b0f..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_scale_set_network_configuration.py +++ /dev/null @@ -1,70 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .sub_resource import SubResource - - -class VirtualMachineScaleSetNetworkConfiguration(SubResource): - """Describes a virtual machine scale set network profile's network - configurations. - - All required parameters must be populated in order to send to Azure. - - :param id: Resource Id - :type id: str - :param name: Required. The network configuration name. - :type name: str - :param primary: Specifies the primary network interface in case the - virtual machine has more than 1 network interface. - :type primary: bool - :param enable_accelerated_networking: Specifies whether the network - interface is accelerated networking-enabled. - :type enable_accelerated_networking: bool - :param network_security_group: The network security group. - :type network_security_group: - ~azure.mgmt.compute.v2018_04_01.models.SubResource - :param dns_settings: The dns settings to be applied on the network - interfaces. - :type dns_settings: - ~azure.mgmt.compute.v2018_04_01.models.VirtualMachineScaleSetNetworkConfigurationDnsSettings - :param ip_configurations: Required. Specifies the IP configurations of the - network interface. - :type ip_configurations: - list[~azure.mgmt.compute.v2018_04_01.models.VirtualMachineScaleSetIPConfiguration] - :param enable_ip_forwarding: Whether IP forwarding enabled on this NIC. - :type enable_ip_forwarding: bool - """ - - _validation = { - 'name': {'required': True}, - 'ip_configurations': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'primary': {'key': 'properties.primary', 'type': 'bool'}, - 'enable_accelerated_networking': {'key': 'properties.enableAcceleratedNetworking', 'type': 'bool'}, - 'network_security_group': {'key': 'properties.networkSecurityGroup', 'type': 'SubResource'}, - 'dns_settings': {'key': 'properties.dnsSettings', 'type': 'VirtualMachineScaleSetNetworkConfigurationDnsSettings'}, - 'ip_configurations': {'key': 'properties.ipConfigurations', 'type': '[VirtualMachineScaleSetIPConfiguration]'}, - 'enable_ip_forwarding': {'key': 'properties.enableIPForwarding', 'type': 'bool'}, - } - - def __init__(self, **kwargs): - super(VirtualMachineScaleSetNetworkConfiguration, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.primary = kwargs.get('primary', None) - self.enable_accelerated_networking = kwargs.get('enable_accelerated_networking', None) - self.network_security_group = kwargs.get('network_security_group', None) - self.dns_settings = kwargs.get('dns_settings', None) - self.ip_configurations = kwargs.get('ip_configurations', None) - self.enable_ip_forwarding = kwargs.get('enable_ip_forwarding', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_scale_set_network_configuration_dns_settings.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_scale_set_network_configuration_dns_settings.py deleted file mode 100644 index 04e1c619383f..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_scale_set_network_configuration_dns_settings.py +++ /dev/null @@ -1,29 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineScaleSetNetworkConfigurationDnsSettings(Model): - """Describes a virtual machines scale sets network configuration's DNS - settings. - - :param dns_servers: List of DNS servers IP addresses - :type dns_servers: list[str] - """ - - _attribute_map = { - 'dns_servers': {'key': 'dnsServers', 'type': '[str]'}, - } - - def __init__(self, **kwargs): - super(VirtualMachineScaleSetNetworkConfigurationDnsSettings, self).__init__(**kwargs) - self.dns_servers = kwargs.get('dns_servers', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_scale_set_network_configuration_dns_settings_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_scale_set_network_configuration_dns_settings_py3.py deleted file mode 100644 index 5607f74d3c6a..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_scale_set_network_configuration_dns_settings_py3.py +++ /dev/null @@ -1,29 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineScaleSetNetworkConfigurationDnsSettings(Model): - """Describes a virtual machines scale sets network configuration's DNS - settings. - - :param dns_servers: List of DNS servers IP addresses - :type dns_servers: list[str] - """ - - _attribute_map = { - 'dns_servers': {'key': 'dnsServers', 'type': '[str]'}, - } - - def __init__(self, *, dns_servers=None, **kwargs) -> None: - super(VirtualMachineScaleSetNetworkConfigurationDnsSettings, self).__init__(**kwargs) - self.dns_servers = dns_servers diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_scale_set_network_configuration_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_scale_set_network_configuration_py3.py deleted file mode 100644 index d8847da6356d..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_scale_set_network_configuration_py3.py +++ /dev/null @@ -1,70 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .sub_resource_py3 import SubResource - - -class VirtualMachineScaleSetNetworkConfiguration(SubResource): - """Describes a virtual machine scale set network profile's network - configurations. - - All required parameters must be populated in order to send to Azure. - - :param id: Resource Id - :type id: str - :param name: Required. The network configuration name. - :type name: str - :param primary: Specifies the primary network interface in case the - virtual machine has more than 1 network interface. - :type primary: bool - :param enable_accelerated_networking: Specifies whether the network - interface is accelerated networking-enabled. - :type enable_accelerated_networking: bool - :param network_security_group: The network security group. - :type network_security_group: - ~azure.mgmt.compute.v2018_04_01.models.SubResource - :param dns_settings: The dns settings to be applied on the network - interfaces. - :type dns_settings: - ~azure.mgmt.compute.v2018_04_01.models.VirtualMachineScaleSetNetworkConfigurationDnsSettings - :param ip_configurations: Required. Specifies the IP configurations of the - network interface. - :type ip_configurations: - list[~azure.mgmt.compute.v2018_04_01.models.VirtualMachineScaleSetIPConfiguration] - :param enable_ip_forwarding: Whether IP forwarding enabled on this NIC. - :type enable_ip_forwarding: bool - """ - - _validation = { - 'name': {'required': True}, - 'ip_configurations': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'primary': {'key': 'properties.primary', 'type': 'bool'}, - 'enable_accelerated_networking': {'key': 'properties.enableAcceleratedNetworking', 'type': 'bool'}, - 'network_security_group': {'key': 'properties.networkSecurityGroup', 'type': 'SubResource'}, - 'dns_settings': {'key': 'properties.dnsSettings', 'type': 'VirtualMachineScaleSetNetworkConfigurationDnsSettings'}, - 'ip_configurations': {'key': 'properties.ipConfigurations', 'type': '[VirtualMachineScaleSetIPConfiguration]'}, - 'enable_ip_forwarding': {'key': 'properties.enableIPForwarding', 'type': 'bool'}, - } - - def __init__(self, *, name: str, ip_configurations, id: str=None, primary: bool=None, enable_accelerated_networking: bool=None, network_security_group=None, dns_settings=None, enable_ip_forwarding: bool=None, **kwargs) -> None: - super(VirtualMachineScaleSetNetworkConfiguration, self).__init__(id=id, **kwargs) - self.name = name - self.primary = primary - self.enable_accelerated_networking = enable_accelerated_networking - self.network_security_group = network_security_group - self.dns_settings = dns_settings - self.ip_configurations = ip_configurations - self.enable_ip_forwarding = enable_ip_forwarding diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_scale_set_network_profile.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_scale_set_network_profile.py deleted file mode 100644 index b7b3854e671e..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_scale_set_network_profile.py +++ /dev/null @@ -1,38 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineScaleSetNetworkProfile(Model): - """Describes a virtual machine scale set network profile. - - :param health_probe: A reference to a load balancer probe used to - determine the health of an instance in the virtual machine scale set. The - reference will be in the form: - '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/probes/{probeName}'. - :type health_probe: - ~azure.mgmt.compute.v2018_04_01.models.ApiEntityReference - :param network_interface_configurations: The list of network - configurations. - :type network_interface_configurations: - list[~azure.mgmt.compute.v2018_04_01.models.VirtualMachineScaleSetNetworkConfiguration] - """ - - _attribute_map = { - 'health_probe': {'key': 'healthProbe', 'type': 'ApiEntityReference'}, - 'network_interface_configurations': {'key': 'networkInterfaceConfigurations', 'type': '[VirtualMachineScaleSetNetworkConfiguration]'}, - } - - def __init__(self, **kwargs): - super(VirtualMachineScaleSetNetworkProfile, self).__init__(**kwargs) - self.health_probe = kwargs.get('health_probe', None) - self.network_interface_configurations = kwargs.get('network_interface_configurations', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_scale_set_network_profile_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_scale_set_network_profile_py3.py deleted file mode 100644 index 4fd85adaca7a..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_scale_set_network_profile_py3.py +++ /dev/null @@ -1,38 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineScaleSetNetworkProfile(Model): - """Describes a virtual machine scale set network profile. - - :param health_probe: A reference to a load balancer probe used to - determine the health of an instance in the virtual machine scale set. The - reference will be in the form: - '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/probes/{probeName}'. - :type health_probe: - ~azure.mgmt.compute.v2018_04_01.models.ApiEntityReference - :param network_interface_configurations: The list of network - configurations. - :type network_interface_configurations: - list[~azure.mgmt.compute.v2018_04_01.models.VirtualMachineScaleSetNetworkConfiguration] - """ - - _attribute_map = { - 'health_probe': {'key': 'healthProbe', 'type': 'ApiEntityReference'}, - 'network_interface_configurations': {'key': 'networkInterfaceConfigurations', 'type': '[VirtualMachineScaleSetNetworkConfiguration]'}, - } - - def __init__(self, *, health_probe=None, network_interface_configurations=None, **kwargs) -> None: - super(VirtualMachineScaleSetNetworkProfile, self).__init__(**kwargs) - self.health_probe = health_probe - self.network_interface_configurations = network_interface_configurations diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_scale_set_os_disk.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_scale_set_os_disk.py deleted file mode 100644 index b2ac0d43825c..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_scale_set_os_disk.py +++ /dev/null @@ -1,86 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineScaleSetOSDisk(Model): - """Describes a virtual machine scale set operating system disk. - - All required parameters must be populated in order to send to Azure. - - :param name: The disk name. - :type name: str - :param caching: Specifies the caching requirements.

    Possible - values are:

    **None**

    **ReadOnly**

    **ReadWrite** -

    Default: **None for Standard storage. ReadOnly for Premium - storage**. Possible values include: 'None', 'ReadOnly', 'ReadWrite' - :type caching: str or ~azure.mgmt.compute.v2018_04_01.models.CachingTypes - :param write_accelerator_enabled: Specifies whether writeAccelerator - should be enabled or disabled on the disk. - :type write_accelerator_enabled: bool - :param create_option: Required. Specifies how the virtual machines in the - scale set should be created.

    The only allowed value is: - **FromImage** \\u2013 This value is used when you are using an image to - create the virtual machine. If you are using a platform image, you also - use the imageReference element described above. If you are using a - marketplace image, you also use the plan element previously described. - Possible values include: 'FromImage', 'Empty', 'Attach' - :type create_option: str or - ~azure.mgmt.compute.v2018_04_01.models.DiskCreateOptionTypes - :param disk_size_gb: Specifies the size of the operating system disk in - gigabytes. This element can be used to overwrite the size of the disk in a - virtual machine image.

    This value cannot be larger than 1023 GB - :type disk_size_gb: int - :param os_type: This property allows you to specify the type of the OS - that is included in the disk if creating a VM from user-image or a - specialized VHD.

    Possible values are:

    **Windows** -

    **Linux**. Possible values include: 'Windows', 'Linux' - :type os_type: str or - ~azure.mgmt.compute.v2018_04_01.models.OperatingSystemTypes - :param image: Specifies information about the unmanaged user image to base - the scale set on. - :type image: ~azure.mgmt.compute.v2018_04_01.models.VirtualHardDisk - :param vhd_containers: Specifies the container urls that are used to store - operating system disks for the scale set. - :type vhd_containers: list[str] - :param managed_disk: The managed disk parameters. - :type managed_disk: - ~azure.mgmt.compute.v2018_04_01.models.VirtualMachineScaleSetManagedDiskParameters - """ - - _validation = { - 'create_option': {'required': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'caching': {'key': 'caching', 'type': 'CachingTypes'}, - 'write_accelerator_enabled': {'key': 'writeAcceleratorEnabled', 'type': 'bool'}, - 'create_option': {'key': 'createOption', 'type': 'str'}, - 'disk_size_gb': {'key': 'diskSizeGB', 'type': 'int'}, - 'os_type': {'key': 'osType', 'type': 'OperatingSystemTypes'}, - 'image': {'key': 'image', 'type': 'VirtualHardDisk'}, - 'vhd_containers': {'key': 'vhdContainers', 'type': '[str]'}, - 'managed_disk': {'key': 'managedDisk', 'type': 'VirtualMachineScaleSetManagedDiskParameters'}, - } - - def __init__(self, **kwargs): - super(VirtualMachineScaleSetOSDisk, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.caching = kwargs.get('caching', None) - self.write_accelerator_enabled = kwargs.get('write_accelerator_enabled', None) - self.create_option = kwargs.get('create_option', None) - self.disk_size_gb = kwargs.get('disk_size_gb', None) - self.os_type = kwargs.get('os_type', None) - self.image = kwargs.get('image', None) - self.vhd_containers = kwargs.get('vhd_containers', None) - self.managed_disk = kwargs.get('managed_disk', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_scale_set_os_disk_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_scale_set_os_disk_py3.py deleted file mode 100644 index e71cadd64a16..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_scale_set_os_disk_py3.py +++ /dev/null @@ -1,86 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineScaleSetOSDisk(Model): - """Describes a virtual machine scale set operating system disk. - - All required parameters must be populated in order to send to Azure. - - :param name: The disk name. - :type name: str - :param caching: Specifies the caching requirements.

    Possible - values are:

    **None**

    **ReadOnly**

    **ReadWrite** -

    Default: **None for Standard storage. ReadOnly for Premium - storage**. Possible values include: 'None', 'ReadOnly', 'ReadWrite' - :type caching: str or ~azure.mgmt.compute.v2018_04_01.models.CachingTypes - :param write_accelerator_enabled: Specifies whether writeAccelerator - should be enabled or disabled on the disk. - :type write_accelerator_enabled: bool - :param create_option: Required. Specifies how the virtual machines in the - scale set should be created.

    The only allowed value is: - **FromImage** \\u2013 This value is used when you are using an image to - create the virtual machine. If you are using a platform image, you also - use the imageReference element described above. If you are using a - marketplace image, you also use the plan element previously described. - Possible values include: 'FromImage', 'Empty', 'Attach' - :type create_option: str or - ~azure.mgmt.compute.v2018_04_01.models.DiskCreateOptionTypes - :param disk_size_gb: Specifies the size of the operating system disk in - gigabytes. This element can be used to overwrite the size of the disk in a - virtual machine image.

    This value cannot be larger than 1023 GB - :type disk_size_gb: int - :param os_type: This property allows you to specify the type of the OS - that is included in the disk if creating a VM from user-image or a - specialized VHD.

    Possible values are:

    **Windows** -

    **Linux**. Possible values include: 'Windows', 'Linux' - :type os_type: str or - ~azure.mgmt.compute.v2018_04_01.models.OperatingSystemTypes - :param image: Specifies information about the unmanaged user image to base - the scale set on. - :type image: ~azure.mgmt.compute.v2018_04_01.models.VirtualHardDisk - :param vhd_containers: Specifies the container urls that are used to store - operating system disks for the scale set. - :type vhd_containers: list[str] - :param managed_disk: The managed disk parameters. - :type managed_disk: - ~azure.mgmt.compute.v2018_04_01.models.VirtualMachineScaleSetManagedDiskParameters - """ - - _validation = { - 'create_option': {'required': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'caching': {'key': 'caching', 'type': 'CachingTypes'}, - 'write_accelerator_enabled': {'key': 'writeAcceleratorEnabled', 'type': 'bool'}, - 'create_option': {'key': 'createOption', 'type': 'str'}, - 'disk_size_gb': {'key': 'diskSizeGB', 'type': 'int'}, - 'os_type': {'key': 'osType', 'type': 'OperatingSystemTypes'}, - 'image': {'key': 'image', 'type': 'VirtualHardDisk'}, - 'vhd_containers': {'key': 'vhdContainers', 'type': '[str]'}, - 'managed_disk': {'key': 'managedDisk', 'type': 'VirtualMachineScaleSetManagedDiskParameters'}, - } - - def __init__(self, *, create_option, name: str=None, caching=None, write_accelerator_enabled: bool=None, disk_size_gb: int=None, os_type=None, image=None, vhd_containers=None, managed_disk=None, **kwargs) -> None: - super(VirtualMachineScaleSetOSDisk, self).__init__(**kwargs) - self.name = name - self.caching = caching - self.write_accelerator_enabled = write_accelerator_enabled - self.create_option = create_option - self.disk_size_gb = disk_size_gb - self.os_type = os_type - self.image = image - self.vhd_containers = vhd_containers - self.managed_disk = managed_disk diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_scale_set_os_profile.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_scale_set_os_profile.py deleted file mode 100644 index fc813cc7a45f..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_scale_set_os_profile.py +++ /dev/null @@ -1,97 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineScaleSetOSProfile(Model): - """Describes a virtual machine scale set OS profile. - - :param computer_name_prefix: Specifies the computer name prefix for all of - the virtual machines in the scale set. Computer name prefixes must be 1 to - 15 characters long. - :type computer_name_prefix: str - :param admin_username: Specifies the name of the administrator account. -

    **Windows-only restriction:** Cannot end in "."

    - **Disallowed values:** "administrator", "admin", "user", "user1", "test", - "user2", "test1", "user3", "admin1", "1", "123", "a", "actuser", "adm", - "admin2", "aspnet", "backup", "console", "david", "guest", "john", - "owner", "root", "server", "sql", "support", "support_388945a0", "sys", - "test2", "test3", "user4", "user5".

    **Minimum-length (Linux):** 1 - character

    **Max-length (Linux):** 64 characters

    - **Max-length (Windows):** 20 characters

  • For root access to - the Linux VM, see [Using root privileges on Linux virtual machines in - Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-use-root-privileges?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json)
  • - For a list of built-in system users on Linux that should not be used in - this field, see [Selecting User Names for Linux on - Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-usernames?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json) - :type admin_username: str - :param admin_password: Specifies the password of the administrator - account.

    **Minimum-length (Windows):** 8 characters

    - **Minimum-length (Linux):** 6 characters

    **Max-length - (Windows):** 123 characters

    **Max-length (Linux):** 72 characters -

    **Complexity requirements:** 3 out of 4 conditions below need to - be fulfilled
    Has lower characters
    Has upper characters
    Has a - digit
    Has a special character (Regex match [\\W_])

    - **Disallowed values:** "abc@123", "P@$$w0rd", "P@ssw0rd", "P@ssword123", - "Pa$$word", "pass@word1", "Password!", "Password1", "Password22", - "iloveyou!"

    For resetting the password, see [How to reset the - Remote Desktop service or its login password in a Windows - VM](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-reset-rdp?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json) -

    For resetting root password, see [Manage users, SSH, and check or - repair disks on Azure Linux VMs using the VMAccess - Extension](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-using-vmaccess-extension?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json#reset-root-password) - :type admin_password: str - :param custom_data: Specifies a base-64 encoded string of custom data. The - base-64 encoded string is decoded to a binary array that is saved as a - file on the Virtual Machine. The maximum length of the binary array is - 65535 bytes.

    For using cloud-init for your VM, see [Using - cloud-init to customize a Linux VM during - creation](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-using-cloud-init?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json) - :type custom_data: str - :param windows_configuration: Specifies Windows operating system settings - on the virtual machine. - :type windows_configuration: - ~azure.mgmt.compute.v2018_04_01.models.WindowsConfiguration - :param linux_configuration: Specifies the Linux operating system settings - on the virtual machine.

    For a list of supported Linux - distributions, see [Linux on Azure-Endorsed - Distributions](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-endorsed-distros?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json) -

    For running non-endorsed distributions, see [Information for - Non-Endorsed - Distributions](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-create-upload-generic?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json). - :type linux_configuration: - ~azure.mgmt.compute.v2018_04_01.models.LinuxConfiguration - :param secrets: Specifies set of certificates that should be installed - onto the virtual machines in the scale set. - :type secrets: - list[~azure.mgmt.compute.v2018_04_01.models.VaultSecretGroup] - """ - - _attribute_map = { - 'computer_name_prefix': {'key': 'computerNamePrefix', 'type': 'str'}, - 'admin_username': {'key': 'adminUsername', 'type': 'str'}, - 'admin_password': {'key': 'adminPassword', 'type': 'str'}, - 'custom_data': {'key': 'customData', 'type': 'str'}, - 'windows_configuration': {'key': 'windowsConfiguration', 'type': 'WindowsConfiguration'}, - 'linux_configuration': {'key': 'linuxConfiguration', 'type': 'LinuxConfiguration'}, - 'secrets': {'key': 'secrets', 'type': '[VaultSecretGroup]'}, - } - - def __init__(self, **kwargs): - super(VirtualMachineScaleSetOSProfile, self).__init__(**kwargs) - self.computer_name_prefix = kwargs.get('computer_name_prefix', None) - self.admin_username = kwargs.get('admin_username', None) - self.admin_password = kwargs.get('admin_password', None) - self.custom_data = kwargs.get('custom_data', None) - self.windows_configuration = kwargs.get('windows_configuration', None) - self.linux_configuration = kwargs.get('linux_configuration', None) - self.secrets = kwargs.get('secrets', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_scale_set_os_profile_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_scale_set_os_profile_py3.py deleted file mode 100644 index f6f5abf8eb58..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_scale_set_os_profile_py3.py +++ /dev/null @@ -1,97 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineScaleSetOSProfile(Model): - """Describes a virtual machine scale set OS profile. - - :param computer_name_prefix: Specifies the computer name prefix for all of - the virtual machines in the scale set. Computer name prefixes must be 1 to - 15 characters long. - :type computer_name_prefix: str - :param admin_username: Specifies the name of the administrator account. -

    **Windows-only restriction:** Cannot end in "."

    - **Disallowed values:** "administrator", "admin", "user", "user1", "test", - "user2", "test1", "user3", "admin1", "1", "123", "a", "actuser", "adm", - "admin2", "aspnet", "backup", "console", "david", "guest", "john", - "owner", "root", "server", "sql", "support", "support_388945a0", "sys", - "test2", "test3", "user4", "user5".

    **Minimum-length (Linux):** 1 - character

    **Max-length (Linux):** 64 characters

    - **Max-length (Windows):** 20 characters

  • For root access to - the Linux VM, see [Using root privileges on Linux virtual machines in - Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-use-root-privileges?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json)
  • - For a list of built-in system users on Linux that should not be used in - this field, see [Selecting User Names for Linux on - Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-usernames?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json) - :type admin_username: str - :param admin_password: Specifies the password of the administrator - account.

    **Minimum-length (Windows):** 8 characters

    - **Minimum-length (Linux):** 6 characters

    **Max-length - (Windows):** 123 characters

    **Max-length (Linux):** 72 characters -

    **Complexity requirements:** 3 out of 4 conditions below need to - be fulfilled
    Has lower characters
    Has upper characters
    Has a - digit
    Has a special character (Regex match [\\W_])

    - **Disallowed values:** "abc@123", "P@$$w0rd", "P@ssw0rd", "P@ssword123", - "Pa$$word", "pass@word1", "Password!", "Password1", "Password22", - "iloveyou!"

    For resetting the password, see [How to reset the - Remote Desktop service or its login password in a Windows - VM](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-reset-rdp?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json) -

    For resetting root password, see [Manage users, SSH, and check or - repair disks on Azure Linux VMs using the VMAccess - Extension](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-using-vmaccess-extension?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json#reset-root-password) - :type admin_password: str - :param custom_data: Specifies a base-64 encoded string of custom data. The - base-64 encoded string is decoded to a binary array that is saved as a - file on the Virtual Machine. The maximum length of the binary array is - 65535 bytes.

    For using cloud-init for your VM, see [Using - cloud-init to customize a Linux VM during - creation](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-using-cloud-init?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json) - :type custom_data: str - :param windows_configuration: Specifies Windows operating system settings - on the virtual machine. - :type windows_configuration: - ~azure.mgmt.compute.v2018_04_01.models.WindowsConfiguration - :param linux_configuration: Specifies the Linux operating system settings - on the virtual machine.

    For a list of supported Linux - distributions, see [Linux on Azure-Endorsed - Distributions](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-endorsed-distros?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json) -

    For running non-endorsed distributions, see [Information for - Non-Endorsed - Distributions](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-create-upload-generic?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json). - :type linux_configuration: - ~azure.mgmt.compute.v2018_04_01.models.LinuxConfiguration - :param secrets: Specifies set of certificates that should be installed - onto the virtual machines in the scale set. - :type secrets: - list[~azure.mgmt.compute.v2018_04_01.models.VaultSecretGroup] - """ - - _attribute_map = { - 'computer_name_prefix': {'key': 'computerNamePrefix', 'type': 'str'}, - 'admin_username': {'key': 'adminUsername', 'type': 'str'}, - 'admin_password': {'key': 'adminPassword', 'type': 'str'}, - 'custom_data': {'key': 'customData', 'type': 'str'}, - 'windows_configuration': {'key': 'windowsConfiguration', 'type': 'WindowsConfiguration'}, - 'linux_configuration': {'key': 'linuxConfiguration', 'type': 'LinuxConfiguration'}, - 'secrets': {'key': 'secrets', 'type': '[VaultSecretGroup]'}, - } - - def __init__(self, *, computer_name_prefix: str=None, admin_username: str=None, admin_password: str=None, custom_data: str=None, windows_configuration=None, linux_configuration=None, secrets=None, **kwargs) -> None: - super(VirtualMachineScaleSetOSProfile, self).__init__(**kwargs) - self.computer_name_prefix = computer_name_prefix - self.admin_username = admin_username - self.admin_password = admin_password - self.custom_data = custom_data - self.windows_configuration = windows_configuration - self.linux_configuration = linux_configuration - self.secrets = secrets diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_scale_set_paged.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_scale_set_paged.py deleted file mode 100644 index 5492e1f69e53..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_scale_set_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class VirtualMachineScaleSetPaged(Paged): - """ - A paging container for iterating over a list of :class:`VirtualMachineScaleSet ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[VirtualMachineScaleSet]'} - } - - def __init__(self, *args, **kwargs): - - super(VirtualMachineScaleSetPaged, self).__init__(*args, **kwargs) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_scale_set_public_ip_address_configuration.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_scale_set_public_ip_address_configuration.py deleted file mode 100644 index 373b43a6af6d..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_scale_set_public_ip_address_configuration.py +++ /dev/null @@ -1,50 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineScaleSetPublicIPAddressConfiguration(Model): - """Describes a virtual machines scale set IP Configuration's PublicIPAddress - configuration. - - All required parameters must be populated in order to send to Azure. - - :param name: Required. The publicIP address configuration name. - :type name: str - :param idle_timeout_in_minutes: The idle timeout of the public IP address. - :type idle_timeout_in_minutes: int - :param dns_settings: The dns settings to be applied on the publicIP - addresses . - :type dns_settings: - ~azure.mgmt.compute.v2018_04_01.models.VirtualMachineScaleSetPublicIPAddressConfigurationDnsSettings - :param ip_tags: The list of IP tags associated with the public IP address. - :type ip_tags: - list[~azure.mgmt.compute.v2018_04_01.models.VirtualMachineScaleSetIpTag] - """ - - _validation = { - 'name': {'required': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'idle_timeout_in_minutes': {'key': 'properties.idleTimeoutInMinutes', 'type': 'int'}, - 'dns_settings': {'key': 'properties.dnsSettings', 'type': 'VirtualMachineScaleSetPublicIPAddressConfigurationDnsSettings'}, - 'ip_tags': {'key': 'properties.ipTags', 'type': '[VirtualMachineScaleSetIpTag]'}, - } - - def __init__(self, **kwargs): - super(VirtualMachineScaleSetPublicIPAddressConfiguration, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.idle_timeout_in_minutes = kwargs.get('idle_timeout_in_minutes', None) - self.dns_settings = kwargs.get('dns_settings', None) - self.ip_tags = kwargs.get('ip_tags', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_scale_set_public_ip_address_configuration_dns_settings.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_scale_set_public_ip_address_configuration_dns_settings.py deleted file mode 100644 index 2fe562244372..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_scale_set_public_ip_address_configuration_dns_settings.py +++ /dev/null @@ -1,37 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineScaleSetPublicIPAddressConfigurationDnsSettings(Model): - """Describes a virtual machines scale sets network configuration's DNS - settings. - - All required parameters must be populated in order to send to Azure. - - :param domain_name_label: Required. The Domain name label.The - concatenation of the domain name label and vm index will be the domain - name labels of the PublicIPAddress resources that will be created - :type domain_name_label: str - """ - - _validation = { - 'domain_name_label': {'required': True}, - } - - _attribute_map = { - 'domain_name_label': {'key': 'domainNameLabel', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(VirtualMachineScaleSetPublicIPAddressConfigurationDnsSettings, self).__init__(**kwargs) - self.domain_name_label = kwargs.get('domain_name_label', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_scale_set_public_ip_address_configuration_dns_settings_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_scale_set_public_ip_address_configuration_dns_settings_py3.py deleted file mode 100644 index 326a36708ff4..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_scale_set_public_ip_address_configuration_dns_settings_py3.py +++ /dev/null @@ -1,37 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineScaleSetPublicIPAddressConfigurationDnsSettings(Model): - """Describes a virtual machines scale sets network configuration's DNS - settings. - - All required parameters must be populated in order to send to Azure. - - :param domain_name_label: Required. The Domain name label.The - concatenation of the domain name label and vm index will be the domain - name labels of the PublicIPAddress resources that will be created - :type domain_name_label: str - """ - - _validation = { - 'domain_name_label': {'required': True}, - } - - _attribute_map = { - 'domain_name_label': {'key': 'domainNameLabel', 'type': 'str'}, - } - - def __init__(self, *, domain_name_label: str, **kwargs) -> None: - super(VirtualMachineScaleSetPublicIPAddressConfigurationDnsSettings, self).__init__(**kwargs) - self.domain_name_label = domain_name_label diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_scale_set_public_ip_address_configuration_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_scale_set_public_ip_address_configuration_py3.py deleted file mode 100644 index 76a82b78db87..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_scale_set_public_ip_address_configuration_py3.py +++ /dev/null @@ -1,50 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineScaleSetPublicIPAddressConfiguration(Model): - """Describes a virtual machines scale set IP Configuration's PublicIPAddress - configuration. - - All required parameters must be populated in order to send to Azure. - - :param name: Required. The publicIP address configuration name. - :type name: str - :param idle_timeout_in_minutes: The idle timeout of the public IP address. - :type idle_timeout_in_minutes: int - :param dns_settings: The dns settings to be applied on the publicIP - addresses . - :type dns_settings: - ~azure.mgmt.compute.v2018_04_01.models.VirtualMachineScaleSetPublicIPAddressConfigurationDnsSettings - :param ip_tags: The list of IP tags associated with the public IP address. - :type ip_tags: - list[~azure.mgmt.compute.v2018_04_01.models.VirtualMachineScaleSetIpTag] - """ - - _validation = { - 'name': {'required': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'idle_timeout_in_minutes': {'key': 'properties.idleTimeoutInMinutes', 'type': 'int'}, - 'dns_settings': {'key': 'properties.dnsSettings', 'type': 'VirtualMachineScaleSetPublicIPAddressConfigurationDnsSettings'}, - 'ip_tags': {'key': 'properties.ipTags', 'type': '[VirtualMachineScaleSetIpTag]'}, - } - - def __init__(self, *, name: str, idle_timeout_in_minutes: int=None, dns_settings=None, ip_tags=None, **kwargs) -> None: - super(VirtualMachineScaleSetPublicIPAddressConfiguration, self).__init__(**kwargs) - self.name = name - self.idle_timeout_in_minutes = idle_timeout_in_minutes - self.dns_settings = dns_settings - self.ip_tags = ip_tags diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_scale_set_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_scale_set_py3.py deleted file mode 100644 index 6603d8754e4c..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_scale_set_py3.py +++ /dev/null @@ -1,123 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource_py3 import Resource - - -class VirtualMachineScaleSet(Resource): - """Describes a Virtual Machine Scale Set. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource Id - :vartype id: str - :ivar name: Resource name - :vartype name: str - :ivar type: Resource type - :vartype type: str - :param location: Required. Resource location - :type location: str - :param tags: Resource tags - :type tags: dict[str, str] - :param sku: The virtual machine scale set sku. - :type sku: ~azure.mgmt.compute.v2018_04_01.models.Sku - :param plan: Specifies information about the marketplace image used to - create the virtual machine. This element is only used for marketplace - images. Before you can use a marketplace image from an API, you must - enable the image for programmatic use. In the Azure portal, find the - marketplace image that you want to use and then click **Want to deploy - programmatically, Get Started ->**. Enter any required information and - then click **Save**. - :type plan: ~azure.mgmt.compute.v2018_04_01.models.Plan - :param upgrade_policy: The upgrade policy. - :type upgrade_policy: ~azure.mgmt.compute.v2018_04_01.models.UpgradePolicy - :param virtual_machine_profile: The virtual machine profile. - :type virtual_machine_profile: - ~azure.mgmt.compute.v2018_04_01.models.VirtualMachineScaleSetVMProfile - :ivar provisioning_state: The provisioning state, which only appears in - the response. - :vartype provisioning_state: str - :param overprovision: Specifies whether the Virtual Machine Scale Set - should be overprovisioned. - :type overprovision: bool - :ivar unique_id: Specifies the ID which uniquely identifies a Virtual - Machine Scale Set. - :vartype unique_id: str - :param single_placement_group: When true this limits the scale set to a - single placement group, of max size 100 virtual machines. - :type single_placement_group: bool - :param zone_balance: Whether to force strictly even Virtual Machine - distribution cross x-zones in case there is zone outage. - :type zone_balance: bool - :param platform_fault_domain_count: Fault Domain count for each placement - group. - :type platform_fault_domain_count: int - :param proximity_placement_group: Specifies information about the - proximity placement group that the virtual machine scale set should be - assigned to.

    Minimum api-version: 2018-04-01. - :type proximity_placement_group: - ~azure.mgmt.compute.v2018_04_01.models.SubResource - :param identity: The identity of the virtual machine scale set, if - configured. - :type identity: - ~azure.mgmt.compute.v2018_04_01.models.VirtualMachineScaleSetIdentity - :param zones: The virtual machine scale set zones. - :type zones: list[str] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - 'provisioning_state': {'readonly': True}, - 'unique_id': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'sku': {'key': 'sku', 'type': 'Sku'}, - 'plan': {'key': 'plan', 'type': 'Plan'}, - 'upgrade_policy': {'key': 'properties.upgradePolicy', 'type': 'UpgradePolicy'}, - 'virtual_machine_profile': {'key': 'properties.virtualMachineProfile', 'type': 'VirtualMachineScaleSetVMProfile'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'overprovision': {'key': 'properties.overprovision', 'type': 'bool'}, - 'unique_id': {'key': 'properties.uniqueId', 'type': 'str'}, - 'single_placement_group': {'key': 'properties.singlePlacementGroup', 'type': 'bool'}, - 'zone_balance': {'key': 'properties.zoneBalance', 'type': 'bool'}, - 'platform_fault_domain_count': {'key': 'properties.platformFaultDomainCount', 'type': 'int'}, - 'proximity_placement_group': {'key': 'properties.proximityPlacementGroup', 'type': 'SubResource'}, - 'identity': {'key': 'identity', 'type': 'VirtualMachineScaleSetIdentity'}, - 'zones': {'key': 'zones', 'type': '[str]'}, - } - - def __init__(self, *, location: str, tags=None, sku=None, plan=None, upgrade_policy=None, virtual_machine_profile=None, overprovision: bool=None, single_placement_group: bool=None, zone_balance: bool=None, platform_fault_domain_count: int=None, proximity_placement_group=None, identity=None, zones=None, **kwargs) -> None: - super(VirtualMachineScaleSet, self).__init__(location=location, tags=tags, **kwargs) - self.sku = sku - self.plan = plan - self.upgrade_policy = upgrade_policy - self.virtual_machine_profile = virtual_machine_profile - self.provisioning_state = None - self.overprovision = overprovision - self.unique_id = None - self.single_placement_group = single_placement_group - self.zone_balance = zone_balance - self.platform_fault_domain_count = platform_fault_domain_count - self.proximity_placement_group = proximity_placement_group - self.identity = identity - self.zones = zones diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_scale_set_sku.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_scale_set_sku.py deleted file mode 100644 index 3c601b81ecda..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_scale_set_sku.py +++ /dev/null @@ -1,46 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineScaleSetSku(Model): - """Describes an available virtual machine scale set sku. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar resource_type: The type of resource the sku applies to. - :vartype resource_type: str - :ivar sku: The Sku. - :vartype sku: ~azure.mgmt.compute.v2018_04_01.models.Sku - :ivar capacity: Specifies the number of virtual machines in the scale set. - :vartype capacity: - ~azure.mgmt.compute.v2018_04_01.models.VirtualMachineScaleSetSkuCapacity - """ - - _validation = { - 'resource_type': {'readonly': True}, - 'sku': {'readonly': True}, - 'capacity': {'readonly': True}, - } - - _attribute_map = { - 'resource_type': {'key': 'resourceType', 'type': 'str'}, - 'sku': {'key': 'sku', 'type': 'Sku'}, - 'capacity': {'key': 'capacity', 'type': 'VirtualMachineScaleSetSkuCapacity'}, - } - - def __init__(self, **kwargs): - super(VirtualMachineScaleSetSku, self).__init__(**kwargs) - self.resource_type = None - self.sku = None - self.capacity = None diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_scale_set_sku_capacity.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_scale_set_sku_capacity.py deleted file mode 100644 index a54bfd2b20b1..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_scale_set_sku_capacity.py +++ /dev/null @@ -1,52 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineScaleSetSkuCapacity(Model): - """Describes scaling information of a sku. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar minimum: The minimum capacity. - :vartype minimum: long - :ivar maximum: The maximum capacity that can be set. - :vartype maximum: long - :ivar default_capacity: The default capacity. - :vartype default_capacity: long - :ivar scale_type: The scale type applicable to the sku. Possible values - include: 'Automatic', 'None' - :vartype scale_type: str or - ~azure.mgmt.compute.v2018_04_01.models.VirtualMachineScaleSetSkuScaleType - """ - - _validation = { - 'minimum': {'readonly': True}, - 'maximum': {'readonly': True}, - 'default_capacity': {'readonly': True}, - 'scale_type': {'readonly': True}, - } - - _attribute_map = { - 'minimum': {'key': 'minimum', 'type': 'long'}, - 'maximum': {'key': 'maximum', 'type': 'long'}, - 'default_capacity': {'key': 'defaultCapacity', 'type': 'long'}, - 'scale_type': {'key': 'scaleType', 'type': 'VirtualMachineScaleSetSkuScaleType'}, - } - - def __init__(self, **kwargs): - super(VirtualMachineScaleSetSkuCapacity, self).__init__(**kwargs) - self.minimum = None - self.maximum = None - self.default_capacity = None - self.scale_type = None diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_scale_set_sku_capacity_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_scale_set_sku_capacity_py3.py deleted file mode 100644 index e3906808d039..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_scale_set_sku_capacity_py3.py +++ /dev/null @@ -1,52 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineScaleSetSkuCapacity(Model): - """Describes scaling information of a sku. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar minimum: The minimum capacity. - :vartype minimum: long - :ivar maximum: The maximum capacity that can be set. - :vartype maximum: long - :ivar default_capacity: The default capacity. - :vartype default_capacity: long - :ivar scale_type: The scale type applicable to the sku. Possible values - include: 'Automatic', 'None' - :vartype scale_type: str or - ~azure.mgmt.compute.v2018_04_01.models.VirtualMachineScaleSetSkuScaleType - """ - - _validation = { - 'minimum': {'readonly': True}, - 'maximum': {'readonly': True}, - 'default_capacity': {'readonly': True}, - 'scale_type': {'readonly': True}, - } - - _attribute_map = { - 'minimum': {'key': 'minimum', 'type': 'long'}, - 'maximum': {'key': 'maximum', 'type': 'long'}, - 'default_capacity': {'key': 'defaultCapacity', 'type': 'long'}, - 'scale_type': {'key': 'scaleType', 'type': 'VirtualMachineScaleSetSkuScaleType'}, - } - - def __init__(self, **kwargs) -> None: - super(VirtualMachineScaleSetSkuCapacity, self).__init__(**kwargs) - self.minimum = None - self.maximum = None - self.default_capacity = None - self.scale_type = None diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_scale_set_sku_paged.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_scale_set_sku_paged.py deleted file mode 100644 index e4ea6350b52c..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_scale_set_sku_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class VirtualMachineScaleSetSkuPaged(Paged): - """ - A paging container for iterating over a list of :class:`VirtualMachineScaleSetSku ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[VirtualMachineScaleSetSku]'} - } - - def __init__(self, *args, **kwargs): - - super(VirtualMachineScaleSetSkuPaged, self).__init__(*args, **kwargs) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_scale_set_sku_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_scale_set_sku_py3.py deleted file mode 100644 index 2c0303850bc0..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_scale_set_sku_py3.py +++ /dev/null @@ -1,46 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineScaleSetSku(Model): - """Describes an available virtual machine scale set sku. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar resource_type: The type of resource the sku applies to. - :vartype resource_type: str - :ivar sku: The Sku. - :vartype sku: ~azure.mgmt.compute.v2018_04_01.models.Sku - :ivar capacity: Specifies the number of virtual machines in the scale set. - :vartype capacity: - ~azure.mgmt.compute.v2018_04_01.models.VirtualMachineScaleSetSkuCapacity - """ - - _validation = { - 'resource_type': {'readonly': True}, - 'sku': {'readonly': True}, - 'capacity': {'readonly': True}, - } - - _attribute_map = { - 'resource_type': {'key': 'resourceType', 'type': 'str'}, - 'sku': {'key': 'sku', 'type': 'Sku'}, - 'capacity': {'key': 'capacity', 'type': 'VirtualMachineScaleSetSkuCapacity'}, - } - - def __init__(self, **kwargs) -> None: - super(VirtualMachineScaleSetSku, self).__init__(**kwargs) - self.resource_type = None - self.sku = None - self.capacity = None diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_scale_set_storage_profile.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_scale_set_storage_profile.py deleted file mode 100644 index c80219cb987d..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_scale_set_storage_profile.py +++ /dev/null @@ -1,49 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineScaleSetStorageProfile(Model): - """Describes a virtual machine scale set storage profile. - - :param image_reference: Specifies information about the image to use. You - can specify information about platform images, marketplace images, or - virtual machine images. This element is required when you want to use a - platform image, marketplace image, or virtual machine image, but is not - used in other creation operations. - :type image_reference: - ~azure.mgmt.compute.v2018_04_01.models.ImageReference - :param os_disk: Specifies information about the operating system disk used - by the virtual machines in the scale set.

    For more information - about disks, see [About disks and VHDs for Azure virtual - machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-about-disks-vhds?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). - :type os_disk: - ~azure.mgmt.compute.v2018_04_01.models.VirtualMachineScaleSetOSDisk - :param data_disks: Specifies the parameters that are used to add data - disks to the virtual machines in the scale set.

    For more - information about disks, see [About disks and VHDs for Azure virtual - machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-about-disks-vhds?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). - :type data_disks: - list[~azure.mgmt.compute.v2018_04_01.models.VirtualMachineScaleSetDataDisk] - """ - - _attribute_map = { - 'image_reference': {'key': 'imageReference', 'type': 'ImageReference'}, - 'os_disk': {'key': 'osDisk', 'type': 'VirtualMachineScaleSetOSDisk'}, - 'data_disks': {'key': 'dataDisks', 'type': '[VirtualMachineScaleSetDataDisk]'}, - } - - def __init__(self, **kwargs): - super(VirtualMachineScaleSetStorageProfile, self).__init__(**kwargs) - self.image_reference = kwargs.get('image_reference', None) - self.os_disk = kwargs.get('os_disk', None) - self.data_disks = kwargs.get('data_disks', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_scale_set_storage_profile_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_scale_set_storage_profile_py3.py deleted file mode 100644 index e10ef0ecaed2..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_scale_set_storage_profile_py3.py +++ /dev/null @@ -1,49 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineScaleSetStorageProfile(Model): - """Describes a virtual machine scale set storage profile. - - :param image_reference: Specifies information about the image to use. You - can specify information about platform images, marketplace images, or - virtual machine images. This element is required when you want to use a - platform image, marketplace image, or virtual machine image, but is not - used in other creation operations. - :type image_reference: - ~azure.mgmt.compute.v2018_04_01.models.ImageReference - :param os_disk: Specifies information about the operating system disk used - by the virtual machines in the scale set.

    For more information - about disks, see [About disks and VHDs for Azure virtual - machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-about-disks-vhds?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). - :type os_disk: - ~azure.mgmt.compute.v2018_04_01.models.VirtualMachineScaleSetOSDisk - :param data_disks: Specifies the parameters that are used to add data - disks to the virtual machines in the scale set.

    For more - information about disks, see [About disks and VHDs for Azure virtual - machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-about-disks-vhds?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). - :type data_disks: - list[~azure.mgmt.compute.v2018_04_01.models.VirtualMachineScaleSetDataDisk] - """ - - _attribute_map = { - 'image_reference': {'key': 'imageReference', 'type': 'ImageReference'}, - 'os_disk': {'key': 'osDisk', 'type': 'VirtualMachineScaleSetOSDisk'}, - 'data_disks': {'key': 'dataDisks', 'type': '[VirtualMachineScaleSetDataDisk]'}, - } - - def __init__(self, *, image_reference=None, os_disk=None, data_disks=None, **kwargs) -> None: - super(VirtualMachineScaleSetStorageProfile, self).__init__(**kwargs) - self.image_reference = image_reference - self.os_disk = os_disk - self.data_disks = data_disks diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_scale_set_update.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_scale_set_update.py deleted file mode 100644 index 150098be5e3a..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_scale_set_update.py +++ /dev/null @@ -1,61 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .update_resource import UpdateResource - - -class VirtualMachineScaleSetUpdate(UpdateResource): - """Describes a Virtual Machine Scale Set. - - :param tags: Resource tags - :type tags: dict[str, str] - :param sku: The virtual machine scale set sku. - :type sku: ~azure.mgmt.compute.v2018_04_01.models.Sku - :param plan: The purchase plan when deploying a virtual machine scale set - from VM Marketplace images. - :type plan: ~azure.mgmt.compute.v2018_04_01.models.Plan - :param upgrade_policy: The upgrade policy. - :type upgrade_policy: ~azure.mgmt.compute.v2018_04_01.models.UpgradePolicy - :param virtual_machine_profile: The virtual machine profile. - :type virtual_machine_profile: - ~azure.mgmt.compute.v2018_04_01.models.VirtualMachineScaleSetUpdateVMProfile - :param overprovision: Specifies whether the Virtual Machine Scale Set - should be overprovisioned. - :type overprovision: bool - :param single_placement_group: When true this limits the scale set to a - single placement group, of max size 100 virtual machines. - :type single_placement_group: bool - :param identity: The identity of the virtual machine scale set, if - configured. - :type identity: - ~azure.mgmt.compute.v2018_04_01.models.VirtualMachineScaleSetIdentity - """ - - _attribute_map = { - 'tags': {'key': 'tags', 'type': '{str}'}, - 'sku': {'key': 'sku', 'type': 'Sku'}, - 'plan': {'key': 'plan', 'type': 'Plan'}, - 'upgrade_policy': {'key': 'properties.upgradePolicy', 'type': 'UpgradePolicy'}, - 'virtual_machine_profile': {'key': 'properties.virtualMachineProfile', 'type': 'VirtualMachineScaleSetUpdateVMProfile'}, - 'overprovision': {'key': 'properties.overprovision', 'type': 'bool'}, - 'single_placement_group': {'key': 'properties.singlePlacementGroup', 'type': 'bool'}, - 'identity': {'key': 'identity', 'type': 'VirtualMachineScaleSetIdentity'}, - } - - def __init__(self, **kwargs): - super(VirtualMachineScaleSetUpdate, self).__init__(**kwargs) - self.sku = kwargs.get('sku', None) - self.plan = kwargs.get('plan', None) - self.upgrade_policy = kwargs.get('upgrade_policy', None) - self.virtual_machine_profile = kwargs.get('virtual_machine_profile', None) - self.overprovision = kwargs.get('overprovision', None) - self.single_placement_group = kwargs.get('single_placement_group', None) - self.identity = kwargs.get('identity', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_scale_set_update_ip_configuration.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_scale_set_update_ip_configuration.py deleted file mode 100644 index 6b71a481c5a0..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_scale_set_update_ip_configuration.py +++ /dev/null @@ -1,71 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .sub_resource import SubResource - - -class VirtualMachineScaleSetUpdateIPConfiguration(SubResource): - """Describes a virtual machine scale set network profile's IP configuration. - - :param id: Resource Id - :type id: str - :param name: The IP configuration name. - :type name: str - :param subnet: The subnet. - :type subnet: ~azure.mgmt.compute.v2018_04_01.models.ApiEntityReference - :param primary: Specifies the primary IP Configuration in case the network - interface has more than one IP Configuration. - :type primary: bool - :param public_ip_address_configuration: The publicIPAddressConfiguration. - :type public_ip_address_configuration: - ~azure.mgmt.compute.v2018_04_01.models.VirtualMachineScaleSetUpdatePublicIPAddressConfiguration - :param private_ip_address_version: Available from Api-Version 2017-03-30 - onwards, it represents whether the specific ipconfiguration is IPv4 or - IPv6. Default is taken as IPv4. Possible values are: 'IPv4' and 'IPv6'. - Possible values include: 'IPv4', 'IPv6' - :type private_ip_address_version: str or - ~azure.mgmt.compute.v2018_04_01.models.IPVersion - :param application_gateway_backend_address_pools: The application gateway - backend address pools. - :type application_gateway_backend_address_pools: - list[~azure.mgmt.compute.v2018_04_01.models.SubResource] - :param load_balancer_backend_address_pools: The load balancer backend - address pools. - :type load_balancer_backend_address_pools: - list[~azure.mgmt.compute.v2018_04_01.models.SubResource] - :param load_balancer_inbound_nat_pools: The load balancer inbound nat - pools. - :type load_balancer_inbound_nat_pools: - list[~azure.mgmt.compute.v2018_04_01.models.SubResource] - """ - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'subnet': {'key': 'properties.subnet', 'type': 'ApiEntityReference'}, - 'primary': {'key': 'properties.primary', 'type': 'bool'}, - 'public_ip_address_configuration': {'key': 'properties.publicIPAddressConfiguration', 'type': 'VirtualMachineScaleSetUpdatePublicIPAddressConfiguration'}, - 'private_ip_address_version': {'key': 'properties.privateIPAddressVersion', 'type': 'str'}, - 'application_gateway_backend_address_pools': {'key': 'properties.applicationGatewayBackendAddressPools', 'type': '[SubResource]'}, - 'load_balancer_backend_address_pools': {'key': 'properties.loadBalancerBackendAddressPools', 'type': '[SubResource]'}, - 'load_balancer_inbound_nat_pools': {'key': 'properties.loadBalancerInboundNatPools', 'type': '[SubResource]'}, - } - - def __init__(self, **kwargs): - super(VirtualMachineScaleSetUpdateIPConfiguration, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.subnet = kwargs.get('subnet', None) - self.primary = kwargs.get('primary', None) - self.public_ip_address_configuration = kwargs.get('public_ip_address_configuration', None) - self.private_ip_address_version = kwargs.get('private_ip_address_version', None) - self.application_gateway_backend_address_pools = kwargs.get('application_gateway_backend_address_pools', None) - self.load_balancer_backend_address_pools = kwargs.get('load_balancer_backend_address_pools', None) - self.load_balancer_inbound_nat_pools = kwargs.get('load_balancer_inbound_nat_pools', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_scale_set_update_ip_configuration_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_scale_set_update_ip_configuration_py3.py deleted file mode 100644 index 25a443480dba..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_scale_set_update_ip_configuration_py3.py +++ /dev/null @@ -1,71 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .sub_resource_py3 import SubResource - - -class VirtualMachineScaleSetUpdateIPConfiguration(SubResource): - """Describes a virtual machine scale set network profile's IP configuration. - - :param id: Resource Id - :type id: str - :param name: The IP configuration name. - :type name: str - :param subnet: The subnet. - :type subnet: ~azure.mgmt.compute.v2018_04_01.models.ApiEntityReference - :param primary: Specifies the primary IP Configuration in case the network - interface has more than one IP Configuration. - :type primary: bool - :param public_ip_address_configuration: The publicIPAddressConfiguration. - :type public_ip_address_configuration: - ~azure.mgmt.compute.v2018_04_01.models.VirtualMachineScaleSetUpdatePublicIPAddressConfiguration - :param private_ip_address_version: Available from Api-Version 2017-03-30 - onwards, it represents whether the specific ipconfiguration is IPv4 or - IPv6. Default is taken as IPv4. Possible values are: 'IPv4' and 'IPv6'. - Possible values include: 'IPv4', 'IPv6' - :type private_ip_address_version: str or - ~azure.mgmt.compute.v2018_04_01.models.IPVersion - :param application_gateway_backend_address_pools: The application gateway - backend address pools. - :type application_gateway_backend_address_pools: - list[~azure.mgmt.compute.v2018_04_01.models.SubResource] - :param load_balancer_backend_address_pools: The load balancer backend - address pools. - :type load_balancer_backend_address_pools: - list[~azure.mgmt.compute.v2018_04_01.models.SubResource] - :param load_balancer_inbound_nat_pools: The load balancer inbound nat - pools. - :type load_balancer_inbound_nat_pools: - list[~azure.mgmt.compute.v2018_04_01.models.SubResource] - """ - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'subnet': {'key': 'properties.subnet', 'type': 'ApiEntityReference'}, - 'primary': {'key': 'properties.primary', 'type': 'bool'}, - 'public_ip_address_configuration': {'key': 'properties.publicIPAddressConfiguration', 'type': 'VirtualMachineScaleSetUpdatePublicIPAddressConfiguration'}, - 'private_ip_address_version': {'key': 'properties.privateIPAddressVersion', 'type': 'str'}, - 'application_gateway_backend_address_pools': {'key': 'properties.applicationGatewayBackendAddressPools', 'type': '[SubResource]'}, - 'load_balancer_backend_address_pools': {'key': 'properties.loadBalancerBackendAddressPools', 'type': '[SubResource]'}, - 'load_balancer_inbound_nat_pools': {'key': 'properties.loadBalancerInboundNatPools', 'type': '[SubResource]'}, - } - - def __init__(self, *, id: str=None, name: str=None, subnet=None, primary: bool=None, public_ip_address_configuration=None, private_ip_address_version=None, application_gateway_backend_address_pools=None, load_balancer_backend_address_pools=None, load_balancer_inbound_nat_pools=None, **kwargs) -> None: - super(VirtualMachineScaleSetUpdateIPConfiguration, self).__init__(id=id, **kwargs) - self.name = name - self.subnet = subnet - self.primary = primary - self.public_ip_address_configuration = public_ip_address_configuration - self.private_ip_address_version = private_ip_address_version - self.application_gateway_backend_address_pools = application_gateway_backend_address_pools - self.load_balancer_backend_address_pools = load_balancer_backend_address_pools - self.load_balancer_inbound_nat_pools = load_balancer_inbound_nat_pools diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_scale_set_update_network_configuration.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_scale_set_update_network_configuration.py deleted file mode 100644 index d0fcbff4ffb9..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_scale_set_update_network_configuration.py +++ /dev/null @@ -1,61 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .sub_resource import SubResource - - -class VirtualMachineScaleSetUpdateNetworkConfiguration(SubResource): - """Describes a virtual machine scale set network profile's network - configurations. - - :param id: Resource Id - :type id: str - :param name: The network configuration name. - :type name: str - :param primary: Whether this is a primary NIC on a virtual machine. - :type primary: bool - :param enable_accelerated_networking: Specifies whether the network - interface is accelerated networking-enabled. - :type enable_accelerated_networking: bool - :param network_security_group: The network security group. - :type network_security_group: - ~azure.mgmt.compute.v2018_04_01.models.SubResource - :param dns_settings: The dns settings to be applied on the network - interfaces. - :type dns_settings: - ~azure.mgmt.compute.v2018_04_01.models.VirtualMachineScaleSetNetworkConfigurationDnsSettings - :param ip_configurations: The virtual machine scale set IP Configuration. - :type ip_configurations: - list[~azure.mgmt.compute.v2018_04_01.models.VirtualMachineScaleSetUpdateIPConfiguration] - :param enable_ip_forwarding: Whether IP forwarding enabled on this NIC. - :type enable_ip_forwarding: bool - """ - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'primary': {'key': 'properties.primary', 'type': 'bool'}, - 'enable_accelerated_networking': {'key': 'properties.enableAcceleratedNetworking', 'type': 'bool'}, - 'network_security_group': {'key': 'properties.networkSecurityGroup', 'type': 'SubResource'}, - 'dns_settings': {'key': 'properties.dnsSettings', 'type': 'VirtualMachineScaleSetNetworkConfigurationDnsSettings'}, - 'ip_configurations': {'key': 'properties.ipConfigurations', 'type': '[VirtualMachineScaleSetUpdateIPConfiguration]'}, - 'enable_ip_forwarding': {'key': 'properties.enableIPForwarding', 'type': 'bool'}, - } - - def __init__(self, **kwargs): - super(VirtualMachineScaleSetUpdateNetworkConfiguration, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.primary = kwargs.get('primary', None) - self.enable_accelerated_networking = kwargs.get('enable_accelerated_networking', None) - self.network_security_group = kwargs.get('network_security_group', None) - self.dns_settings = kwargs.get('dns_settings', None) - self.ip_configurations = kwargs.get('ip_configurations', None) - self.enable_ip_forwarding = kwargs.get('enable_ip_forwarding', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_scale_set_update_network_configuration_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_scale_set_update_network_configuration_py3.py deleted file mode 100644 index 131729e4532c..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_scale_set_update_network_configuration_py3.py +++ /dev/null @@ -1,61 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .sub_resource_py3 import SubResource - - -class VirtualMachineScaleSetUpdateNetworkConfiguration(SubResource): - """Describes a virtual machine scale set network profile's network - configurations. - - :param id: Resource Id - :type id: str - :param name: The network configuration name. - :type name: str - :param primary: Whether this is a primary NIC on a virtual machine. - :type primary: bool - :param enable_accelerated_networking: Specifies whether the network - interface is accelerated networking-enabled. - :type enable_accelerated_networking: bool - :param network_security_group: The network security group. - :type network_security_group: - ~azure.mgmt.compute.v2018_04_01.models.SubResource - :param dns_settings: The dns settings to be applied on the network - interfaces. - :type dns_settings: - ~azure.mgmt.compute.v2018_04_01.models.VirtualMachineScaleSetNetworkConfigurationDnsSettings - :param ip_configurations: The virtual machine scale set IP Configuration. - :type ip_configurations: - list[~azure.mgmt.compute.v2018_04_01.models.VirtualMachineScaleSetUpdateIPConfiguration] - :param enable_ip_forwarding: Whether IP forwarding enabled on this NIC. - :type enable_ip_forwarding: bool - """ - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'primary': {'key': 'properties.primary', 'type': 'bool'}, - 'enable_accelerated_networking': {'key': 'properties.enableAcceleratedNetworking', 'type': 'bool'}, - 'network_security_group': {'key': 'properties.networkSecurityGroup', 'type': 'SubResource'}, - 'dns_settings': {'key': 'properties.dnsSettings', 'type': 'VirtualMachineScaleSetNetworkConfigurationDnsSettings'}, - 'ip_configurations': {'key': 'properties.ipConfigurations', 'type': '[VirtualMachineScaleSetUpdateIPConfiguration]'}, - 'enable_ip_forwarding': {'key': 'properties.enableIPForwarding', 'type': 'bool'}, - } - - def __init__(self, *, id: str=None, name: str=None, primary: bool=None, enable_accelerated_networking: bool=None, network_security_group=None, dns_settings=None, ip_configurations=None, enable_ip_forwarding: bool=None, **kwargs) -> None: - super(VirtualMachineScaleSetUpdateNetworkConfiguration, self).__init__(id=id, **kwargs) - self.name = name - self.primary = primary - self.enable_accelerated_networking = enable_accelerated_networking - self.network_security_group = network_security_group - self.dns_settings = dns_settings - self.ip_configurations = ip_configurations - self.enable_ip_forwarding = enable_ip_forwarding diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_scale_set_update_network_profile.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_scale_set_update_network_profile.py deleted file mode 100644 index cd4f5f839764..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_scale_set_update_network_profile.py +++ /dev/null @@ -1,30 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineScaleSetUpdateNetworkProfile(Model): - """Describes a virtual machine scale set network profile. - - :param network_interface_configurations: The list of network - configurations. - :type network_interface_configurations: - list[~azure.mgmt.compute.v2018_04_01.models.VirtualMachineScaleSetUpdateNetworkConfiguration] - """ - - _attribute_map = { - 'network_interface_configurations': {'key': 'networkInterfaceConfigurations', 'type': '[VirtualMachineScaleSetUpdateNetworkConfiguration]'}, - } - - def __init__(self, **kwargs): - super(VirtualMachineScaleSetUpdateNetworkProfile, self).__init__(**kwargs) - self.network_interface_configurations = kwargs.get('network_interface_configurations', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_scale_set_update_network_profile_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_scale_set_update_network_profile_py3.py deleted file mode 100644 index 5dcc3e1dd1f2..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_scale_set_update_network_profile_py3.py +++ /dev/null @@ -1,30 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineScaleSetUpdateNetworkProfile(Model): - """Describes a virtual machine scale set network profile. - - :param network_interface_configurations: The list of network - configurations. - :type network_interface_configurations: - list[~azure.mgmt.compute.v2018_04_01.models.VirtualMachineScaleSetUpdateNetworkConfiguration] - """ - - _attribute_map = { - 'network_interface_configurations': {'key': 'networkInterfaceConfigurations', 'type': '[VirtualMachineScaleSetUpdateNetworkConfiguration]'}, - } - - def __init__(self, *, network_interface_configurations=None, **kwargs) -> None: - super(VirtualMachineScaleSetUpdateNetworkProfile, self).__init__(**kwargs) - self.network_interface_configurations = network_interface_configurations diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_scale_set_update_os_disk.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_scale_set_update_os_disk.py deleted file mode 100644 index 937e6570a99f..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_scale_set_update_os_disk.py +++ /dev/null @@ -1,56 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineScaleSetUpdateOSDisk(Model): - """Describes virtual machine scale set operating system disk Update Object. - This should be used for Updating VMSS OS Disk. - - :param caching: The caching type. Possible values include: 'None', - 'ReadOnly', 'ReadWrite' - :type caching: str or ~azure.mgmt.compute.v2018_04_01.models.CachingTypes - :param write_accelerator_enabled: Specifies whether writeAccelerator - should be enabled or disabled on the disk. - :type write_accelerator_enabled: bool - :param disk_size_gb: Specifies the size of the operating system disk in - gigabytes. This element can be used to overwrite the size of the disk in a - virtual machine image.

    This value cannot be larger than 1023 GB - :type disk_size_gb: int - :param image: The Source User Image VirtualHardDisk. This VirtualHardDisk - will be copied before using it to attach to the Virtual Machine. If - SourceImage is provided, the destination VirtualHardDisk should not exist. - :type image: ~azure.mgmt.compute.v2018_04_01.models.VirtualHardDisk - :param vhd_containers: The list of virtual hard disk container uris. - :type vhd_containers: list[str] - :param managed_disk: The managed disk parameters. - :type managed_disk: - ~azure.mgmt.compute.v2018_04_01.models.VirtualMachineScaleSetManagedDiskParameters - """ - - _attribute_map = { - 'caching': {'key': 'caching', 'type': 'CachingTypes'}, - 'write_accelerator_enabled': {'key': 'writeAcceleratorEnabled', 'type': 'bool'}, - 'disk_size_gb': {'key': 'diskSizeGB', 'type': 'int'}, - 'image': {'key': 'image', 'type': 'VirtualHardDisk'}, - 'vhd_containers': {'key': 'vhdContainers', 'type': '[str]'}, - 'managed_disk': {'key': 'managedDisk', 'type': 'VirtualMachineScaleSetManagedDiskParameters'}, - } - - def __init__(self, **kwargs): - super(VirtualMachineScaleSetUpdateOSDisk, self).__init__(**kwargs) - self.caching = kwargs.get('caching', None) - self.write_accelerator_enabled = kwargs.get('write_accelerator_enabled', None) - self.disk_size_gb = kwargs.get('disk_size_gb', None) - self.image = kwargs.get('image', None) - self.vhd_containers = kwargs.get('vhd_containers', None) - self.managed_disk = kwargs.get('managed_disk', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_scale_set_update_os_disk_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_scale_set_update_os_disk_py3.py deleted file mode 100644 index feb0156c7a78..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_scale_set_update_os_disk_py3.py +++ /dev/null @@ -1,56 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineScaleSetUpdateOSDisk(Model): - """Describes virtual machine scale set operating system disk Update Object. - This should be used for Updating VMSS OS Disk. - - :param caching: The caching type. Possible values include: 'None', - 'ReadOnly', 'ReadWrite' - :type caching: str or ~azure.mgmt.compute.v2018_04_01.models.CachingTypes - :param write_accelerator_enabled: Specifies whether writeAccelerator - should be enabled or disabled on the disk. - :type write_accelerator_enabled: bool - :param disk_size_gb: Specifies the size of the operating system disk in - gigabytes. This element can be used to overwrite the size of the disk in a - virtual machine image.

    This value cannot be larger than 1023 GB - :type disk_size_gb: int - :param image: The Source User Image VirtualHardDisk. This VirtualHardDisk - will be copied before using it to attach to the Virtual Machine. If - SourceImage is provided, the destination VirtualHardDisk should not exist. - :type image: ~azure.mgmt.compute.v2018_04_01.models.VirtualHardDisk - :param vhd_containers: The list of virtual hard disk container uris. - :type vhd_containers: list[str] - :param managed_disk: The managed disk parameters. - :type managed_disk: - ~azure.mgmt.compute.v2018_04_01.models.VirtualMachineScaleSetManagedDiskParameters - """ - - _attribute_map = { - 'caching': {'key': 'caching', 'type': 'CachingTypes'}, - 'write_accelerator_enabled': {'key': 'writeAcceleratorEnabled', 'type': 'bool'}, - 'disk_size_gb': {'key': 'diskSizeGB', 'type': 'int'}, - 'image': {'key': 'image', 'type': 'VirtualHardDisk'}, - 'vhd_containers': {'key': 'vhdContainers', 'type': '[str]'}, - 'managed_disk': {'key': 'managedDisk', 'type': 'VirtualMachineScaleSetManagedDiskParameters'}, - } - - def __init__(self, *, caching=None, write_accelerator_enabled: bool=None, disk_size_gb: int=None, image=None, vhd_containers=None, managed_disk=None, **kwargs) -> None: - super(VirtualMachineScaleSetUpdateOSDisk, self).__init__(**kwargs) - self.caching = caching - self.write_accelerator_enabled = write_accelerator_enabled - self.disk_size_gb = disk_size_gb - self.image = image - self.vhd_containers = vhd_containers - self.managed_disk = managed_disk diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_scale_set_update_os_profile.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_scale_set_update_os_profile.py deleted file mode 100644 index 2ebc2b14b292..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_scale_set_update_os_profile.py +++ /dev/null @@ -1,43 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineScaleSetUpdateOSProfile(Model): - """Describes a virtual machine scale set OS profile. - - :param custom_data: A base-64 encoded string of custom data. - :type custom_data: str - :param windows_configuration: The Windows Configuration of the OS profile. - :type windows_configuration: - ~azure.mgmt.compute.v2018_04_01.models.WindowsConfiguration - :param linux_configuration: The Linux Configuration of the OS profile. - :type linux_configuration: - ~azure.mgmt.compute.v2018_04_01.models.LinuxConfiguration - :param secrets: The List of certificates for addition to the VM. - :type secrets: - list[~azure.mgmt.compute.v2018_04_01.models.VaultSecretGroup] - """ - - _attribute_map = { - 'custom_data': {'key': 'customData', 'type': 'str'}, - 'windows_configuration': {'key': 'windowsConfiguration', 'type': 'WindowsConfiguration'}, - 'linux_configuration': {'key': 'linuxConfiguration', 'type': 'LinuxConfiguration'}, - 'secrets': {'key': 'secrets', 'type': '[VaultSecretGroup]'}, - } - - def __init__(self, **kwargs): - super(VirtualMachineScaleSetUpdateOSProfile, self).__init__(**kwargs) - self.custom_data = kwargs.get('custom_data', None) - self.windows_configuration = kwargs.get('windows_configuration', None) - self.linux_configuration = kwargs.get('linux_configuration', None) - self.secrets = kwargs.get('secrets', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_scale_set_update_os_profile_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_scale_set_update_os_profile_py3.py deleted file mode 100644 index b54bfc2b563a..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_scale_set_update_os_profile_py3.py +++ /dev/null @@ -1,43 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineScaleSetUpdateOSProfile(Model): - """Describes a virtual machine scale set OS profile. - - :param custom_data: A base-64 encoded string of custom data. - :type custom_data: str - :param windows_configuration: The Windows Configuration of the OS profile. - :type windows_configuration: - ~azure.mgmt.compute.v2018_04_01.models.WindowsConfiguration - :param linux_configuration: The Linux Configuration of the OS profile. - :type linux_configuration: - ~azure.mgmt.compute.v2018_04_01.models.LinuxConfiguration - :param secrets: The List of certificates for addition to the VM. - :type secrets: - list[~azure.mgmt.compute.v2018_04_01.models.VaultSecretGroup] - """ - - _attribute_map = { - 'custom_data': {'key': 'customData', 'type': 'str'}, - 'windows_configuration': {'key': 'windowsConfiguration', 'type': 'WindowsConfiguration'}, - 'linux_configuration': {'key': 'linuxConfiguration', 'type': 'LinuxConfiguration'}, - 'secrets': {'key': 'secrets', 'type': '[VaultSecretGroup]'}, - } - - def __init__(self, *, custom_data: str=None, windows_configuration=None, linux_configuration=None, secrets=None, **kwargs) -> None: - super(VirtualMachineScaleSetUpdateOSProfile, self).__init__(**kwargs) - self.custom_data = custom_data - self.windows_configuration = windows_configuration - self.linux_configuration = linux_configuration - self.secrets = secrets diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_scale_set_update_public_ip_address_configuration.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_scale_set_update_public_ip_address_configuration.py deleted file mode 100644 index 0fc8d8517fcf..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_scale_set_update_public_ip_address_configuration.py +++ /dev/null @@ -1,39 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineScaleSetUpdatePublicIPAddressConfiguration(Model): - """Describes a virtual machines scale set IP Configuration's PublicIPAddress - configuration. - - :param name: The publicIP address configuration name. - :type name: str - :param idle_timeout_in_minutes: The idle timeout of the public IP address. - :type idle_timeout_in_minutes: int - :param dns_settings: The dns settings to be applied on the publicIP - addresses . - :type dns_settings: - ~azure.mgmt.compute.v2018_04_01.models.VirtualMachineScaleSetPublicIPAddressConfigurationDnsSettings - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'idle_timeout_in_minutes': {'key': 'properties.idleTimeoutInMinutes', 'type': 'int'}, - 'dns_settings': {'key': 'properties.dnsSettings', 'type': 'VirtualMachineScaleSetPublicIPAddressConfigurationDnsSettings'}, - } - - def __init__(self, **kwargs): - super(VirtualMachineScaleSetUpdatePublicIPAddressConfiguration, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.idle_timeout_in_minutes = kwargs.get('idle_timeout_in_minutes', None) - self.dns_settings = kwargs.get('dns_settings', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_scale_set_update_public_ip_address_configuration_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_scale_set_update_public_ip_address_configuration_py3.py deleted file mode 100644 index 6675e7831652..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_scale_set_update_public_ip_address_configuration_py3.py +++ /dev/null @@ -1,39 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineScaleSetUpdatePublicIPAddressConfiguration(Model): - """Describes a virtual machines scale set IP Configuration's PublicIPAddress - configuration. - - :param name: The publicIP address configuration name. - :type name: str - :param idle_timeout_in_minutes: The idle timeout of the public IP address. - :type idle_timeout_in_minutes: int - :param dns_settings: The dns settings to be applied on the publicIP - addresses . - :type dns_settings: - ~azure.mgmt.compute.v2018_04_01.models.VirtualMachineScaleSetPublicIPAddressConfigurationDnsSettings - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'idle_timeout_in_minutes': {'key': 'properties.idleTimeoutInMinutes', 'type': 'int'}, - 'dns_settings': {'key': 'properties.dnsSettings', 'type': 'VirtualMachineScaleSetPublicIPAddressConfigurationDnsSettings'}, - } - - def __init__(self, *, name: str=None, idle_timeout_in_minutes: int=None, dns_settings=None, **kwargs) -> None: - super(VirtualMachineScaleSetUpdatePublicIPAddressConfiguration, self).__init__(**kwargs) - self.name = name - self.idle_timeout_in_minutes = idle_timeout_in_minutes - self.dns_settings = dns_settings diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_scale_set_update_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_scale_set_update_py3.py deleted file mode 100644 index 48bb74fb1948..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_scale_set_update_py3.py +++ /dev/null @@ -1,61 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .update_resource_py3 import UpdateResource - - -class VirtualMachineScaleSetUpdate(UpdateResource): - """Describes a Virtual Machine Scale Set. - - :param tags: Resource tags - :type tags: dict[str, str] - :param sku: The virtual machine scale set sku. - :type sku: ~azure.mgmt.compute.v2018_04_01.models.Sku - :param plan: The purchase plan when deploying a virtual machine scale set - from VM Marketplace images. - :type plan: ~azure.mgmt.compute.v2018_04_01.models.Plan - :param upgrade_policy: The upgrade policy. - :type upgrade_policy: ~azure.mgmt.compute.v2018_04_01.models.UpgradePolicy - :param virtual_machine_profile: The virtual machine profile. - :type virtual_machine_profile: - ~azure.mgmt.compute.v2018_04_01.models.VirtualMachineScaleSetUpdateVMProfile - :param overprovision: Specifies whether the Virtual Machine Scale Set - should be overprovisioned. - :type overprovision: bool - :param single_placement_group: When true this limits the scale set to a - single placement group, of max size 100 virtual machines. - :type single_placement_group: bool - :param identity: The identity of the virtual machine scale set, if - configured. - :type identity: - ~azure.mgmt.compute.v2018_04_01.models.VirtualMachineScaleSetIdentity - """ - - _attribute_map = { - 'tags': {'key': 'tags', 'type': '{str}'}, - 'sku': {'key': 'sku', 'type': 'Sku'}, - 'plan': {'key': 'plan', 'type': 'Plan'}, - 'upgrade_policy': {'key': 'properties.upgradePolicy', 'type': 'UpgradePolicy'}, - 'virtual_machine_profile': {'key': 'properties.virtualMachineProfile', 'type': 'VirtualMachineScaleSetUpdateVMProfile'}, - 'overprovision': {'key': 'properties.overprovision', 'type': 'bool'}, - 'single_placement_group': {'key': 'properties.singlePlacementGroup', 'type': 'bool'}, - 'identity': {'key': 'identity', 'type': 'VirtualMachineScaleSetIdentity'}, - } - - def __init__(self, *, tags=None, sku=None, plan=None, upgrade_policy=None, virtual_machine_profile=None, overprovision: bool=None, single_placement_group: bool=None, identity=None, **kwargs) -> None: - super(VirtualMachineScaleSetUpdate, self).__init__(tags=tags, **kwargs) - self.sku = sku - self.plan = plan - self.upgrade_policy = upgrade_policy - self.virtual_machine_profile = virtual_machine_profile - self.overprovision = overprovision - self.single_placement_group = single_placement_group - self.identity = identity diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_scale_set_update_storage_profile.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_scale_set_update_storage_profile.py deleted file mode 100644 index 037ebc157fc8..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_scale_set_update_storage_profile.py +++ /dev/null @@ -1,39 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineScaleSetUpdateStorageProfile(Model): - """Describes a virtual machine scale set storage profile. - - :param image_reference: The image reference. - :type image_reference: - ~azure.mgmt.compute.v2018_04_01.models.ImageReference - :param os_disk: The OS disk. - :type os_disk: - ~azure.mgmt.compute.v2018_04_01.models.VirtualMachineScaleSetUpdateOSDisk - :param data_disks: The data disks. - :type data_disks: - list[~azure.mgmt.compute.v2018_04_01.models.VirtualMachineScaleSetDataDisk] - """ - - _attribute_map = { - 'image_reference': {'key': 'imageReference', 'type': 'ImageReference'}, - 'os_disk': {'key': 'osDisk', 'type': 'VirtualMachineScaleSetUpdateOSDisk'}, - 'data_disks': {'key': 'dataDisks', 'type': '[VirtualMachineScaleSetDataDisk]'}, - } - - def __init__(self, **kwargs): - super(VirtualMachineScaleSetUpdateStorageProfile, self).__init__(**kwargs) - self.image_reference = kwargs.get('image_reference', None) - self.os_disk = kwargs.get('os_disk', None) - self.data_disks = kwargs.get('data_disks', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_scale_set_update_storage_profile_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_scale_set_update_storage_profile_py3.py deleted file mode 100644 index b442b5196c4e..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_scale_set_update_storage_profile_py3.py +++ /dev/null @@ -1,39 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineScaleSetUpdateStorageProfile(Model): - """Describes a virtual machine scale set storage profile. - - :param image_reference: The image reference. - :type image_reference: - ~azure.mgmt.compute.v2018_04_01.models.ImageReference - :param os_disk: The OS disk. - :type os_disk: - ~azure.mgmt.compute.v2018_04_01.models.VirtualMachineScaleSetUpdateOSDisk - :param data_disks: The data disks. - :type data_disks: - list[~azure.mgmt.compute.v2018_04_01.models.VirtualMachineScaleSetDataDisk] - """ - - _attribute_map = { - 'image_reference': {'key': 'imageReference', 'type': 'ImageReference'}, - 'os_disk': {'key': 'osDisk', 'type': 'VirtualMachineScaleSetUpdateOSDisk'}, - 'data_disks': {'key': 'dataDisks', 'type': '[VirtualMachineScaleSetDataDisk]'}, - } - - def __init__(self, *, image_reference=None, os_disk=None, data_disks=None, **kwargs) -> None: - super(VirtualMachineScaleSetUpdateStorageProfile, self).__init__(**kwargs) - self.image_reference = image_reference - self.os_disk = os_disk - self.data_disks = data_disks diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_scale_set_update_vm_profile.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_scale_set_update_vm_profile.py deleted file mode 100644 index 88d5c0c10149..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_scale_set_update_vm_profile.py +++ /dev/null @@ -1,55 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineScaleSetUpdateVMProfile(Model): - """Describes a virtual machine scale set virtual machine profile. - - :param os_profile: The virtual machine scale set OS profile. - :type os_profile: - ~azure.mgmt.compute.v2018_04_01.models.VirtualMachineScaleSetUpdateOSProfile - :param storage_profile: The virtual machine scale set storage profile. - :type storage_profile: - ~azure.mgmt.compute.v2018_04_01.models.VirtualMachineScaleSetUpdateStorageProfile - :param network_profile: The virtual machine scale set network profile. - :type network_profile: - ~azure.mgmt.compute.v2018_04_01.models.VirtualMachineScaleSetUpdateNetworkProfile - :param diagnostics_profile: The virtual machine scale set diagnostics - profile. - :type diagnostics_profile: - ~azure.mgmt.compute.v2018_04_01.models.DiagnosticsProfile - :param extension_profile: The virtual machine scale set extension profile. - :type extension_profile: - ~azure.mgmt.compute.v2018_04_01.models.VirtualMachineScaleSetExtensionProfile - :param license_type: The license type, which is for bring your own license - scenario. - :type license_type: str - """ - - _attribute_map = { - 'os_profile': {'key': 'osProfile', 'type': 'VirtualMachineScaleSetUpdateOSProfile'}, - 'storage_profile': {'key': 'storageProfile', 'type': 'VirtualMachineScaleSetUpdateStorageProfile'}, - 'network_profile': {'key': 'networkProfile', 'type': 'VirtualMachineScaleSetUpdateNetworkProfile'}, - 'diagnostics_profile': {'key': 'diagnosticsProfile', 'type': 'DiagnosticsProfile'}, - 'extension_profile': {'key': 'extensionProfile', 'type': 'VirtualMachineScaleSetExtensionProfile'}, - 'license_type': {'key': 'licenseType', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(VirtualMachineScaleSetUpdateVMProfile, self).__init__(**kwargs) - self.os_profile = kwargs.get('os_profile', None) - self.storage_profile = kwargs.get('storage_profile', None) - self.network_profile = kwargs.get('network_profile', None) - self.diagnostics_profile = kwargs.get('diagnostics_profile', None) - self.extension_profile = kwargs.get('extension_profile', None) - self.license_type = kwargs.get('license_type', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_scale_set_update_vm_profile_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_scale_set_update_vm_profile_py3.py deleted file mode 100644 index 83cab7cf6fd0..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_scale_set_update_vm_profile_py3.py +++ /dev/null @@ -1,55 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineScaleSetUpdateVMProfile(Model): - """Describes a virtual machine scale set virtual machine profile. - - :param os_profile: The virtual machine scale set OS profile. - :type os_profile: - ~azure.mgmt.compute.v2018_04_01.models.VirtualMachineScaleSetUpdateOSProfile - :param storage_profile: The virtual machine scale set storage profile. - :type storage_profile: - ~azure.mgmt.compute.v2018_04_01.models.VirtualMachineScaleSetUpdateStorageProfile - :param network_profile: The virtual machine scale set network profile. - :type network_profile: - ~azure.mgmt.compute.v2018_04_01.models.VirtualMachineScaleSetUpdateNetworkProfile - :param diagnostics_profile: The virtual machine scale set diagnostics - profile. - :type diagnostics_profile: - ~azure.mgmt.compute.v2018_04_01.models.DiagnosticsProfile - :param extension_profile: The virtual machine scale set extension profile. - :type extension_profile: - ~azure.mgmt.compute.v2018_04_01.models.VirtualMachineScaleSetExtensionProfile - :param license_type: The license type, which is for bring your own license - scenario. - :type license_type: str - """ - - _attribute_map = { - 'os_profile': {'key': 'osProfile', 'type': 'VirtualMachineScaleSetUpdateOSProfile'}, - 'storage_profile': {'key': 'storageProfile', 'type': 'VirtualMachineScaleSetUpdateStorageProfile'}, - 'network_profile': {'key': 'networkProfile', 'type': 'VirtualMachineScaleSetUpdateNetworkProfile'}, - 'diagnostics_profile': {'key': 'diagnosticsProfile', 'type': 'DiagnosticsProfile'}, - 'extension_profile': {'key': 'extensionProfile', 'type': 'VirtualMachineScaleSetExtensionProfile'}, - 'license_type': {'key': 'licenseType', 'type': 'str'}, - } - - def __init__(self, *, os_profile=None, storage_profile=None, network_profile=None, diagnostics_profile=None, extension_profile=None, license_type: str=None, **kwargs) -> None: - super(VirtualMachineScaleSetUpdateVMProfile, self).__init__(**kwargs) - self.os_profile = os_profile - self.storage_profile = storage_profile - self.network_profile = network_profile - self.diagnostics_profile = diagnostics_profile - self.extension_profile = extension_profile - self.license_type = license_type diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_scale_set_vm.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_scale_set_vm.py deleted file mode 100644 index ee9268b134ef..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_scale_set_vm.py +++ /dev/null @@ -1,160 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource import Resource - - -class VirtualMachineScaleSetVM(Resource): - """Describes a virtual machine scale set virtual machine. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource Id - :vartype id: str - :ivar name: Resource name - :vartype name: str - :ivar type: Resource type - :vartype type: str - :param location: Required. Resource location - :type location: str - :param tags: Resource tags - :type tags: dict[str, str] - :ivar instance_id: The virtual machine instance ID. - :vartype instance_id: str - :ivar sku: The virtual machine SKU. - :vartype sku: ~azure.mgmt.compute.v2018_04_01.models.Sku - :ivar latest_model_applied: Specifies whether the latest model has been - applied to the virtual machine. - :vartype latest_model_applied: bool - :ivar vm_id: Azure VM unique ID. - :vartype vm_id: str - :ivar instance_view: The virtual machine instance view. - :vartype instance_view: - ~azure.mgmt.compute.v2018_04_01.models.VirtualMachineScaleSetVMInstanceView - :param hardware_profile: Specifies the hardware settings for the virtual - machine. - :type hardware_profile: - ~azure.mgmt.compute.v2018_04_01.models.HardwareProfile - :param storage_profile: Specifies the storage settings for the virtual - machine disks. - :type storage_profile: - ~azure.mgmt.compute.v2018_04_01.models.StorageProfile - :param os_profile: Specifies the operating system settings for the virtual - machine. - :type os_profile: ~azure.mgmt.compute.v2018_04_01.models.OSProfile - :param network_profile: Specifies the network interfaces of the virtual - machine. - :type network_profile: - ~azure.mgmt.compute.v2018_04_01.models.NetworkProfile - :param diagnostics_profile: Specifies the boot diagnostic settings state. -

    Minimum api-version: 2015-06-15. - :type diagnostics_profile: - ~azure.mgmt.compute.v2018_04_01.models.DiagnosticsProfile - :param availability_set: Specifies information about the availability set - that the virtual machine should be assigned to. Virtual machines specified - in the same availability set are allocated to different nodes to maximize - availability. For more information about availability sets, see [Manage - the availability of virtual - machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-manage-availability?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). -

    For more information on Azure planned maintenance, see [Planned - maintenance for virtual machines in - Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-planned-maintenance?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json) -

    Currently, a VM can only be added to availability set at creation - time. An existing VM cannot be added to an availability set. - :type availability_set: ~azure.mgmt.compute.v2018_04_01.models.SubResource - :ivar provisioning_state: The provisioning state, which only appears in - the response. - :vartype provisioning_state: str - :param license_type: Specifies that the image or disk that is being used - was licensed on-premises. This element is only used for images that - contain the Windows Server operating system.

    Possible values are: -

    Windows_Client

    Windows_Server

    If this element - is included in a request for an update, the value must match the initial - value. This value cannot be updated.

    For more information, see - [Azure Hybrid Use Benefit for Windows - Server](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-hybrid-use-benefit-licensing?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json) -

    Minimum api-version: 2015-06-15 - :type license_type: str - :param plan: Specifies information about the marketplace image used to - create the virtual machine. This element is only used for marketplace - images. Before you can use a marketplace image from an API, you must - enable the image for programmatic use. In the Azure portal, find the - marketplace image that you want to use and then click **Want to deploy - programmatically, Get Started ->**. Enter any required information and - then click **Save**. - :type plan: ~azure.mgmt.compute.v2018_04_01.models.Plan - :ivar resources: The virtual machine child extension resources. - :vartype resources: - list[~azure.mgmt.compute.v2018_04_01.models.VirtualMachineExtension] - :ivar zones: The virtual machine zones. - :vartype zones: list[str] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - 'instance_id': {'readonly': True}, - 'sku': {'readonly': True}, - 'latest_model_applied': {'readonly': True}, - 'vm_id': {'readonly': True}, - 'instance_view': {'readonly': True}, - 'provisioning_state': {'readonly': True}, - 'resources': {'readonly': True}, - 'zones': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'instance_id': {'key': 'instanceId', 'type': 'str'}, - 'sku': {'key': 'sku', 'type': 'Sku'}, - 'latest_model_applied': {'key': 'properties.latestModelApplied', 'type': 'bool'}, - 'vm_id': {'key': 'properties.vmId', 'type': 'str'}, - 'instance_view': {'key': 'properties.instanceView', 'type': 'VirtualMachineScaleSetVMInstanceView'}, - 'hardware_profile': {'key': 'properties.hardwareProfile', 'type': 'HardwareProfile'}, - 'storage_profile': {'key': 'properties.storageProfile', 'type': 'StorageProfile'}, - 'os_profile': {'key': 'properties.osProfile', 'type': 'OSProfile'}, - 'network_profile': {'key': 'properties.networkProfile', 'type': 'NetworkProfile'}, - 'diagnostics_profile': {'key': 'properties.diagnosticsProfile', 'type': 'DiagnosticsProfile'}, - 'availability_set': {'key': 'properties.availabilitySet', 'type': 'SubResource'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'license_type': {'key': 'properties.licenseType', 'type': 'str'}, - 'plan': {'key': 'plan', 'type': 'Plan'}, - 'resources': {'key': 'resources', 'type': '[VirtualMachineExtension]'}, - 'zones': {'key': 'zones', 'type': '[str]'}, - } - - def __init__(self, **kwargs): - super(VirtualMachineScaleSetVM, self).__init__(**kwargs) - self.instance_id = None - self.sku = None - self.latest_model_applied = None - self.vm_id = None - self.instance_view = None - self.hardware_profile = kwargs.get('hardware_profile', None) - self.storage_profile = kwargs.get('storage_profile', None) - self.os_profile = kwargs.get('os_profile', None) - self.network_profile = kwargs.get('network_profile', None) - self.diagnostics_profile = kwargs.get('diagnostics_profile', None) - self.availability_set = kwargs.get('availability_set', None) - self.provisioning_state = None - self.license_type = kwargs.get('license_type', None) - self.plan = kwargs.get('plan', None) - self.resources = None - self.zones = None diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_scale_set_vm_extensions_summary.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_scale_set_vm_extensions_summary.py deleted file mode 100644 index e9e19adfc1b6..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_scale_set_vm_extensions_summary.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineScaleSetVMExtensionsSummary(Model): - """Extensions summary for virtual machines of a virtual machine scale set. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar name: The extension name. - :vartype name: str - :ivar statuses_summary: The extensions information. - :vartype statuses_summary: - list[~azure.mgmt.compute.v2018_04_01.models.VirtualMachineStatusCodeCount] - """ - - _validation = { - 'name': {'readonly': True}, - 'statuses_summary': {'readonly': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'statuses_summary': {'key': 'statusesSummary', 'type': '[VirtualMachineStatusCodeCount]'}, - } - - def __init__(self, **kwargs): - super(VirtualMachineScaleSetVMExtensionsSummary, self).__init__(**kwargs) - self.name = None - self.statuses_summary = None diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_scale_set_vm_extensions_summary_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_scale_set_vm_extensions_summary_py3.py deleted file mode 100644 index c88df418881b..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_scale_set_vm_extensions_summary_py3.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineScaleSetVMExtensionsSummary(Model): - """Extensions summary for virtual machines of a virtual machine scale set. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar name: The extension name. - :vartype name: str - :ivar statuses_summary: The extensions information. - :vartype statuses_summary: - list[~azure.mgmt.compute.v2018_04_01.models.VirtualMachineStatusCodeCount] - """ - - _validation = { - 'name': {'readonly': True}, - 'statuses_summary': {'readonly': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'statuses_summary': {'key': 'statusesSummary', 'type': '[VirtualMachineStatusCodeCount]'}, - } - - def __init__(self, **kwargs) -> None: - super(VirtualMachineScaleSetVMExtensionsSummary, self).__init__(**kwargs) - self.name = None - self.statuses_summary = None diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_scale_set_vm_instance_ids.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_scale_set_vm_instance_ids.py deleted file mode 100644 index 772c66dad326..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_scale_set_vm_instance_ids.py +++ /dev/null @@ -1,30 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineScaleSetVMInstanceIDs(Model): - """Specifies a list of virtual machine instance IDs from the VM scale set. - - :param instance_ids: The virtual machine scale set instance ids. Omitting - the virtual machine scale set instance ids will result in the operation - being performed on all virtual machines in the virtual machine scale set. - :type instance_ids: list[str] - """ - - _attribute_map = { - 'instance_ids': {'key': 'instanceIds', 'type': '[str]'}, - } - - def __init__(self, **kwargs): - super(VirtualMachineScaleSetVMInstanceIDs, self).__init__(**kwargs) - self.instance_ids = kwargs.get('instance_ids', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_scale_set_vm_instance_ids_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_scale_set_vm_instance_ids_py3.py deleted file mode 100644 index 658a8ccb87d5..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_scale_set_vm_instance_ids_py3.py +++ /dev/null @@ -1,30 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineScaleSetVMInstanceIDs(Model): - """Specifies a list of virtual machine instance IDs from the VM scale set. - - :param instance_ids: The virtual machine scale set instance ids. Omitting - the virtual machine scale set instance ids will result in the operation - being performed on all virtual machines in the virtual machine scale set. - :type instance_ids: list[str] - """ - - _attribute_map = { - 'instance_ids': {'key': 'instanceIds', 'type': '[str]'}, - } - - def __init__(self, *, instance_ids=None, **kwargs) -> None: - super(VirtualMachineScaleSetVMInstanceIDs, self).__init__(**kwargs) - self.instance_ids = instance_ids diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_scale_set_vm_instance_required_ids.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_scale_set_vm_instance_required_ids.py deleted file mode 100644 index ece250dd4fd4..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_scale_set_vm_instance_required_ids.py +++ /dev/null @@ -1,34 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineScaleSetVMInstanceRequiredIDs(Model): - """Specifies a list of virtual machine instance IDs from the VM scale set. - - All required parameters must be populated in order to send to Azure. - - :param instance_ids: Required. The virtual machine scale set instance ids. - :type instance_ids: list[str] - """ - - _validation = { - 'instance_ids': {'required': True}, - } - - _attribute_map = { - 'instance_ids': {'key': 'instanceIds', 'type': '[str]'}, - } - - def __init__(self, **kwargs): - super(VirtualMachineScaleSetVMInstanceRequiredIDs, self).__init__(**kwargs) - self.instance_ids = kwargs.get('instance_ids', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_scale_set_vm_instance_required_ids_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_scale_set_vm_instance_required_ids_py3.py deleted file mode 100644 index f32c6181467d..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_scale_set_vm_instance_required_ids_py3.py +++ /dev/null @@ -1,34 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineScaleSetVMInstanceRequiredIDs(Model): - """Specifies a list of virtual machine instance IDs from the VM scale set. - - All required parameters must be populated in order to send to Azure. - - :param instance_ids: Required. The virtual machine scale set instance ids. - :type instance_ids: list[str] - """ - - _validation = { - 'instance_ids': {'required': True}, - } - - _attribute_map = { - 'instance_ids': {'key': 'instanceIds', 'type': '[str]'}, - } - - def __init__(self, *, instance_ids, **kwargs) -> None: - super(VirtualMachineScaleSetVMInstanceRequiredIDs, self).__init__(**kwargs) - self.instance_ids = instance_ids diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_scale_set_vm_instance_view.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_scale_set_vm_instance_view.py deleted file mode 100644 index 1a5045707968..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_scale_set_vm_instance_view.py +++ /dev/null @@ -1,86 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineScaleSetVMInstanceView(Model): - """The instance view of a virtual machine scale set VM. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :param platform_update_domain: The Update Domain count. - :type platform_update_domain: int - :param platform_fault_domain: The Fault Domain count. - :type platform_fault_domain: int - :param rdp_thumb_print: The Remote desktop certificate thumbprint. - :type rdp_thumb_print: str - :param vm_agent: The VM Agent running on the virtual machine. - :type vm_agent: - ~azure.mgmt.compute.v2018_04_01.models.VirtualMachineAgentInstanceView - :param maintenance_redeploy_status: The Maintenance Operation status on - the virtual machine. - :type maintenance_redeploy_status: - ~azure.mgmt.compute.v2018_04_01.models.MaintenanceRedeployStatus - :param disks: The disks information. - :type disks: list[~azure.mgmt.compute.v2018_04_01.models.DiskInstanceView] - :param extensions: The extensions information. - :type extensions: - list[~azure.mgmt.compute.v2018_04_01.models.VirtualMachineExtensionInstanceView] - :ivar vm_health: The health status for the VM. - :vartype vm_health: - ~azure.mgmt.compute.v2018_04_01.models.VirtualMachineHealthStatus - :param boot_diagnostics: Boot Diagnostics is a debugging feature which - allows you to view Console Output and Screenshot to diagnose VM status. -

    You can easily view the output of your console log.

    - Azure also enables you to see a screenshot of the VM from the hypervisor. - :type boot_diagnostics: - ~azure.mgmt.compute.v2018_04_01.models.BootDiagnosticsInstanceView - :param statuses: The resource status information. - :type statuses: - list[~azure.mgmt.compute.v2018_04_01.models.InstanceViewStatus] - :param placement_group_id: The placement group in which the VM is running. - If the VM is deallocated it will not have a placementGroupId. - :type placement_group_id: str - """ - - _validation = { - 'vm_health': {'readonly': True}, - } - - _attribute_map = { - 'platform_update_domain': {'key': 'platformUpdateDomain', 'type': 'int'}, - 'platform_fault_domain': {'key': 'platformFaultDomain', 'type': 'int'}, - 'rdp_thumb_print': {'key': 'rdpThumbPrint', 'type': 'str'}, - 'vm_agent': {'key': 'vmAgent', 'type': 'VirtualMachineAgentInstanceView'}, - 'maintenance_redeploy_status': {'key': 'maintenanceRedeployStatus', 'type': 'MaintenanceRedeployStatus'}, - 'disks': {'key': 'disks', 'type': '[DiskInstanceView]'}, - 'extensions': {'key': 'extensions', 'type': '[VirtualMachineExtensionInstanceView]'}, - 'vm_health': {'key': 'vmHealth', 'type': 'VirtualMachineHealthStatus'}, - 'boot_diagnostics': {'key': 'bootDiagnostics', 'type': 'BootDiagnosticsInstanceView'}, - 'statuses': {'key': 'statuses', 'type': '[InstanceViewStatus]'}, - 'placement_group_id': {'key': 'placementGroupId', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(VirtualMachineScaleSetVMInstanceView, self).__init__(**kwargs) - self.platform_update_domain = kwargs.get('platform_update_domain', None) - self.platform_fault_domain = kwargs.get('platform_fault_domain', None) - self.rdp_thumb_print = kwargs.get('rdp_thumb_print', None) - self.vm_agent = kwargs.get('vm_agent', None) - self.maintenance_redeploy_status = kwargs.get('maintenance_redeploy_status', None) - self.disks = kwargs.get('disks', None) - self.extensions = kwargs.get('extensions', None) - self.vm_health = None - self.boot_diagnostics = kwargs.get('boot_diagnostics', None) - self.statuses = kwargs.get('statuses', None) - self.placement_group_id = kwargs.get('placement_group_id', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_scale_set_vm_instance_view_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_scale_set_vm_instance_view_py3.py deleted file mode 100644 index 2c2e2701a0e7..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_scale_set_vm_instance_view_py3.py +++ /dev/null @@ -1,86 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineScaleSetVMInstanceView(Model): - """The instance view of a virtual machine scale set VM. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :param platform_update_domain: The Update Domain count. - :type platform_update_domain: int - :param platform_fault_domain: The Fault Domain count. - :type platform_fault_domain: int - :param rdp_thumb_print: The Remote desktop certificate thumbprint. - :type rdp_thumb_print: str - :param vm_agent: The VM Agent running on the virtual machine. - :type vm_agent: - ~azure.mgmt.compute.v2018_04_01.models.VirtualMachineAgentInstanceView - :param maintenance_redeploy_status: The Maintenance Operation status on - the virtual machine. - :type maintenance_redeploy_status: - ~azure.mgmt.compute.v2018_04_01.models.MaintenanceRedeployStatus - :param disks: The disks information. - :type disks: list[~azure.mgmt.compute.v2018_04_01.models.DiskInstanceView] - :param extensions: The extensions information. - :type extensions: - list[~azure.mgmt.compute.v2018_04_01.models.VirtualMachineExtensionInstanceView] - :ivar vm_health: The health status for the VM. - :vartype vm_health: - ~azure.mgmt.compute.v2018_04_01.models.VirtualMachineHealthStatus - :param boot_diagnostics: Boot Diagnostics is a debugging feature which - allows you to view Console Output and Screenshot to diagnose VM status. -

    You can easily view the output of your console log.

    - Azure also enables you to see a screenshot of the VM from the hypervisor. - :type boot_diagnostics: - ~azure.mgmt.compute.v2018_04_01.models.BootDiagnosticsInstanceView - :param statuses: The resource status information. - :type statuses: - list[~azure.mgmt.compute.v2018_04_01.models.InstanceViewStatus] - :param placement_group_id: The placement group in which the VM is running. - If the VM is deallocated it will not have a placementGroupId. - :type placement_group_id: str - """ - - _validation = { - 'vm_health': {'readonly': True}, - } - - _attribute_map = { - 'platform_update_domain': {'key': 'platformUpdateDomain', 'type': 'int'}, - 'platform_fault_domain': {'key': 'platformFaultDomain', 'type': 'int'}, - 'rdp_thumb_print': {'key': 'rdpThumbPrint', 'type': 'str'}, - 'vm_agent': {'key': 'vmAgent', 'type': 'VirtualMachineAgentInstanceView'}, - 'maintenance_redeploy_status': {'key': 'maintenanceRedeployStatus', 'type': 'MaintenanceRedeployStatus'}, - 'disks': {'key': 'disks', 'type': '[DiskInstanceView]'}, - 'extensions': {'key': 'extensions', 'type': '[VirtualMachineExtensionInstanceView]'}, - 'vm_health': {'key': 'vmHealth', 'type': 'VirtualMachineHealthStatus'}, - 'boot_diagnostics': {'key': 'bootDiagnostics', 'type': 'BootDiagnosticsInstanceView'}, - 'statuses': {'key': 'statuses', 'type': '[InstanceViewStatus]'}, - 'placement_group_id': {'key': 'placementGroupId', 'type': 'str'}, - } - - def __init__(self, *, platform_update_domain: int=None, platform_fault_domain: int=None, rdp_thumb_print: str=None, vm_agent=None, maintenance_redeploy_status=None, disks=None, extensions=None, boot_diagnostics=None, statuses=None, placement_group_id: str=None, **kwargs) -> None: - super(VirtualMachineScaleSetVMInstanceView, self).__init__(**kwargs) - self.platform_update_domain = platform_update_domain - self.platform_fault_domain = platform_fault_domain - self.rdp_thumb_print = rdp_thumb_print - self.vm_agent = vm_agent - self.maintenance_redeploy_status = maintenance_redeploy_status - self.disks = disks - self.extensions = extensions - self.vm_health = None - self.boot_diagnostics = boot_diagnostics - self.statuses = statuses - self.placement_group_id = placement_group_id diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_scale_set_vm_paged.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_scale_set_vm_paged.py deleted file mode 100644 index 52a46c26fd23..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_scale_set_vm_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class VirtualMachineScaleSetVMPaged(Paged): - """ - A paging container for iterating over a list of :class:`VirtualMachineScaleSetVM ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[VirtualMachineScaleSetVM]'} - } - - def __init__(self, *args, **kwargs): - - super(VirtualMachineScaleSetVMPaged, self).__init__(*args, **kwargs) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_scale_set_vm_profile.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_scale_set_vm_profile.py deleted file mode 100644 index 177efbb43373..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_scale_set_vm_profile.py +++ /dev/null @@ -1,80 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineScaleSetVMProfile(Model): - """Describes a virtual machine scale set virtual machine profile. - - :param os_profile: Specifies the operating system settings for the virtual - machines in the scale set. - :type os_profile: - ~azure.mgmt.compute.v2018_04_01.models.VirtualMachineScaleSetOSProfile - :param storage_profile: Specifies the storage settings for the virtual - machine disks. - :type storage_profile: - ~azure.mgmt.compute.v2018_04_01.models.VirtualMachineScaleSetStorageProfile - :param network_profile: Specifies properties of the network interfaces of - the virtual machines in the scale set. - :type network_profile: - ~azure.mgmt.compute.v2018_04_01.models.VirtualMachineScaleSetNetworkProfile - :param diagnostics_profile: Specifies the boot diagnostic settings state. -

    Minimum api-version: 2015-06-15. - :type diagnostics_profile: - ~azure.mgmt.compute.v2018_04_01.models.DiagnosticsProfile - :param extension_profile: Specifies a collection of settings for - extensions installed on virtual machines in the scale set. - :type extension_profile: - ~azure.mgmt.compute.v2018_04_01.models.VirtualMachineScaleSetExtensionProfile - :param license_type: Specifies that the image or disk that is being used - was licensed on-premises. This element is only used for images that - contain the Windows Server operating system.

    Possible values are: -

    Windows_Client

    Windows_Server

    If this element - is included in a request for an update, the value must match the initial - value. This value cannot be updated.

    For more information, see - [Azure Hybrid Use Benefit for Windows - Server](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-hybrid-use-benefit-licensing?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json) -

    Minimum api-version: 2015-06-15 - :type license_type: str - :param priority: Specifies the priority for the virtual machines in the - scale set.

    Minimum api-version: 2017-10-30-preview. Possible - values include: 'Regular', 'Low' - :type priority: str or - ~azure.mgmt.compute.v2018_04_01.models.VirtualMachinePriorityTypes - :param eviction_policy: Specifies the eviction policy for virtual machines - in a low priority scale set.

    Minimum api-version: - 2017-10-30-preview. Possible values include: 'Deallocate', 'Delete' - :type eviction_policy: str or - ~azure.mgmt.compute.v2018_04_01.models.VirtualMachineEvictionPolicyTypes - """ - - _attribute_map = { - 'os_profile': {'key': 'osProfile', 'type': 'VirtualMachineScaleSetOSProfile'}, - 'storage_profile': {'key': 'storageProfile', 'type': 'VirtualMachineScaleSetStorageProfile'}, - 'network_profile': {'key': 'networkProfile', 'type': 'VirtualMachineScaleSetNetworkProfile'}, - 'diagnostics_profile': {'key': 'diagnosticsProfile', 'type': 'DiagnosticsProfile'}, - 'extension_profile': {'key': 'extensionProfile', 'type': 'VirtualMachineScaleSetExtensionProfile'}, - 'license_type': {'key': 'licenseType', 'type': 'str'}, - 'priority': {'key': 'priority', 'type': 'str'}, - 'eviction_policy': {'key': 'evictionPolicy', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(VirtualMachineScaleSetVMProfile, self).__init__(**kwargs) - self.os_profile = kwargs.get('os_profile', None) - self.storage_profile = kwargs.get('storage_profile', None) - self.network_profile = kwargs.get('network_profile', None) - self.diagnostics_profile = kwargs.get('diagnostics_profile', None) - self.extension_profile = kwargs.get('extension_profile', None) - self.license_type = kwargs.get('license_type', None) - self.priority = kwargs.get('priority', None) - self.eviction_policy = kwargs.get('eviction_policy', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_scale_set_vm_profile_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_scale_set_vm_profile_py3.py deleted file mode 100644 index d7e74bb365b2..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_scale_set_vm_profile_py3.py +++ /dev/null @@ -1,80 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineScaleSetVMProfile(Model): - """Describes a virtual machine scale set virtual machine profile. - - :param os_profile: Specifies the operating system settings for the virtual - machines in the scale set. - :type os_profile: - ~azure.mgmt.compute.v2018_04_01.models.VirtualMachineScaleSetOSProfile - :param storage_profile: Specifies the storage settings for the virtual - machine disks. - :type storage_profile: - ~azure.mgmt.compute.v2018_04_01.models.VirtualMachineScaleSetStorageProfile - :param network_profile: Specifies properties of the network interfaces of - the virtual machines in the scale set. - :type network_profile: - ~azure.mgmt.compute.v2018_04_01.models.VirtualMachineScaleSetNetworkProfile - :param diagnostics_profile: Specifies the boot diagnostic settings state. -

    Minimum api-version: 2015-06-15. - :type diagnostics_profile: - ~azure.mgmt.compute.v2018_04_01.models.DiagnosticsProfile - :param extension_profile: Specifies a collection of settings for - extensions installed on virtual machines in the scale set. - :type extension_profile: - ~azure.mgmt.compute.v2018_04_01.models.VirtualMachineScaleSetExtensionProfile - :param license_type: Specifies that the image or disk that is being used - was licensed on-premises. This element is only used for images that - contain the Windows Server operating system.

    Possible values are: -

    Windows_Client

    Windows_Server

    If this element - is included in a request for an update, the value must match the initial - value. This value cannot be updated.

    For more information, see - [Azure Hybrid Use Benefit for Windows - Server](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-hybrid-use-benefit-licensing?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json) -

    Minimum api-version: 2015-06-15 - :type license_type: str - :param priority: Specifies the priority for the virtual machines in the - scale set.

    Minimum api-version: 2017-10-30-preview. Possible - values include: 'Regular', 'Low' - :type priority: str or - ~azure.mgmt.compute.v2018_04_01.models.VirtualMachinePriorityTypes - :param eviction_policy: Specifies the eviction policy for virtual machines - in a low priority scale set.

    Minimum api-version: - 2017-10-30-preview. Possible values include: 'Deallocate', 'Delete' - :type eviction_policy: str or - ~azure.mgmt.compute.v2018_04_01.models.VirtualMachineEvictionPolicyTypes - """ - - _attribute_map = { - 'os_profile': {'key': 'osProfile', 'type': 'VirtualMachineScaleSetOSProfile'}, - 'storage_profile': {'key': 'storageProfile', 'type': 'VirtualMachineScaleSetStorageProfile'}, - 'network_profile': {'key': 'networkProfile', 'type': 'VirtualMachineScaleSetNetworkProfile'}, - 'diagnostics_profile': {'key': 'diagnosticsProfile', 'type': 'DiagnosticsProfile'}, - 'extension_profile': {'key': 'extensionProfile', 'type': 'VirtualMachineScaleSetExtensionProfile'}, - 'license_type': {'key': 'licenseType', 'type': 'str'}, - 'priority': {'key': 'priority', 'type': 'str'}, - 'eviction_policy': {'key': 'evictionPolicy', 'type': 'str'}, - } - - def __init__(self, *, os_profile=None, storage_profile=None, network_profile=None, diagnostics_profile=None, extension_profile=None, license_type: str=None, priority=None, eviction_policy=None, **kwargs) -> None: - super(VirtualMachineScaleSetVMProfile, self).__init__(**kwargs) - self.os_profile = os_profile - self.storage_profile = storage_profile - self.network_profile = network_profile - self.diagnostics_profile = diagnostics_profile - self.extension_profile = extension_profile - self.license_type = license_type - self.priority = priority - self.eviction_policy = eviction_policy diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_scale_set_vm_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_scale_set_vm_py3.py deleted file mode 100644 index 9ef5249911f0..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_scale_set_vm_py3.py +++ /dev/null @@ -1,160 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource_py3 import Resource - - -class VirtualMachineScaleSetVM(Resource): - """Describes a virtual machine scale set virtual machine. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource Id - :vartype id: str - :ivar name: Resource name - :vartype name: str - :ivar type: Resource type - :vartype type: str - :param location: Required. Resource location - :type location: str - :param tags: Resource tags - :type tags: dict[str, str] - :ivar instance_id: The virtual machine instance ID. - :vartype instance_id: str - :ivar sku: The virtual machine SKU. - :vartype sku: ~azure.mgmt.compute.v2018_04_01.models.Sku - :ivar latest_model_applied: Specifies whether the latest model has been - applied to the virtual machine. - :vartype latest_model_applied: bool - :ivar vm_id: Azure VM unique ID. - :vartype vm_id: str - :ivar instance_view: The virtual machine instance view. - :vartype instance_view: - ~azure.mgmt.compute.v2018_04_01.models.VirtualMachineScaleSetVMInstanceView - :param hardware_profile: Specifies the hardware settings for the virtual - machine. - :type hardware_profile: - ~azure.mgmt.compute.v2018_04_01.models.HardwareProfile - :param storage_profile: Specifies the storage settings for the virtual - machine disks. - :type storage_profile: - ~azure.mgmt.compute.v2018_04_01.models.StorageProfile - :param os_profile: Specifies the operating system settings for the virtual - machine. - :type os_profile: ~azure.mgmt.compute.v2018_04_01.models.OSProfile - :param network_profile: Specifies the network interfaces of the virtual - machine. - :type network_profile: - ~azure.mgmt.compute.v2018_04_01.models.NetworkProfile - :param diagnostics_profile: Specifies the boot diagnostic settings state. -

    Minimum api-version: 2015-06-15. - :type diagnostics_profile: - ~azure.mgmt.compute.v2018_04_01.models.DiagnosticsProfile - :param availability_set: Specifies information about the availability set - that the virtual machine should be assigned to. Virtual machines specified - in the same availability set are allocated to different nodes to maximize - availability. For more information about availability sets, see [Manage - the availability of virtual - machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-manage-availability?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). -

    For more information on Azure planned maintenance, see [Planned - maintenance for virtual machines in - Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-planned-maintenance?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json) -

    Currently, a VM can only be added to availability set at creation - time. An existing VM cannot be added to an availability set. - :type availability_set: ~azure.mgmt.compute.v2018_04_01.models.SubResource - :ivar provisioning_state: The provisioning state, which only appears in - the response. - :vartype provisioning_state: str - :param license_type: Specifies that the image or disk that is being used - was licensed on-premises. This element is only used for images that - contain the Windows Server operating system.

    Possible values are: -

    Windows_Client

    Windows_Server

    If this element - is included in a request for an update, the value must match the initial - value. This value cannot be updated.

    For more information, see - [Azure Hybrid Use Benefit for Windows - Server](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-hybrid-use-benefit-licensing?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json) -

    Minimum api-version: 2015-06-15 - :type license_type: str - :param plan: Specifies information about the marketplace image used to - create the virtual machine. This element is only used for marketplace - images. Before you can use a marketplace image from an API, you must - enable the image for programmatic use. In the Azure portal, find the - marketplace image that you want to use and then click **Want to deploy - programmatically, Get Started ->**. Enter any required information and - then click **Save**. - :type plan: ~azure.mgmt.compute.v2018_04_01.models.Plan - :ivar resources: The virtual machine child extension resources. - :vartype resources: - list[~azure.mgmt.compute.v2018_04_01.models.VirtualMachineExtension] - :ivar zones: The virtual machine zones. - :vartype zones: list[str] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - 'instance_id': {'readonly': True}, - 'sku': {'readonly': True}, - 'latest_model_applied': {'readonly': True}, - 'vm_id': {'readonly': True}, - 'instance_view': {'readonly': True}, - 'provisioning_state': {'readonly': True}, - 'resources': {'readonly': True}, - 'zones': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'instance_id': {'key': 'instanceId', 'type': 'str'}, - 'sku': {'key': 'sku', 'type': 'Sku'}, - 'latest_model_applied': {'key': 'properties.latestModelApplied', 'type': 'bool'}, - 'vm_id': {'key': 'properties.vmId', 'type': 'str'}, - 'instance_view': {'key': 'properties.instanceView', 'type': 'VirtualMachineScaleSetVMInstanceView'}, - 'hardware_profile': {'key': 'properties.hardwareProfile', 'type': 'HardwareProfile'}, - 'storage_profile': {'key': 'properties.storageProfile', 'type': 'StorageProfile'}, - 'os_profile': {'key': 'properties.osProfile', 'type': 'OSProfile'}, - 'network_profile': {'key': 'properties.networkProfile', 'type': 'NetworkProfile'}, - 'diagnostics_profile': {'key': 'properties.diagnosticsProfile', 'type': 'DiagnosticsProfile'}, - 'availability_set': {'key': 'properties.availabilitySet', 'type': 'SubResource'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'license_type': {'key': 'properties.licenseType', 'type': 'str'}, - 'plan': {'key': 'plan', 'type': 'Plan'}, - 'resources': {'key': 'resources', 'type': '[VirtualMachineExtension]'}, - 'zones': {'key': 'zones', 'type': '[str]'}, - } - - def __init__(self, *, location: str, tags=None, hardware_profile=None, storage_profile=None, os_profile=None, network_profile=None, diagnostics_profile=None, availability_set=None, license_type: str=None, plan=None, **kwargs) -> None: - super(VirtualMachineScaleSetVM, self).__init__(location=location, tags=tags, **kwargs) - self.instance_id = None - self.sku = None - self.latest_model_applied = None - self.vm_id = None - self.instance_view = None - self.hardware_profile = hardware_profile - self.storage_profile = storage_profile - self.os_profile = os_profile - self.network_profile = network_profile - self.diagnostics_profile = diagnostics_profile - self.availability_set = availability_set - self.provisioning_state = None - self.license_type = license_type - self.plan = plan - self.resources = None - self.zones = None diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_size.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_size.py deleted file mode 100644 index 0fef3efd6c8e..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_size.py +++ /dev/null @@ -1,53 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineSize(Model): - """Describes the properties of a VM size. - - :param name: The name of the virtual machine size. - :type name: str - :param number_of_cores: The number of cores supported by the virtual - machine size. - :type number_of_cores: int - :param os_disk_size_in_mb: The OS disk size, in MB, allowed by the virtual - machine size. - :type os_disk_size_in_mb: int - :param resource_disk_size_in_mb: The resource disk size, in MB, allowed by - the virtual machine size. - :type resource_disk_size_in_mb: int - :param memory_in_mb: The amount of memory, in MB, supported by the virtual - machine size. - :type memory_in_mb: int - :param max_data_disk_count: The maximum number of data disks that can be - attached to the virtual machine size. - :type max_data_disk_count: int - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'number_of_cores': {'key': 'numberOfCores', 'type': 'int'}, - 'os_disk_size_in_mb': {'key': 'osDiskSizeInMB', 'type': 'int'}, - 'resource_disk_size_in_mb': {'key': 'resourceDiskSizeInMB', 'type': 'int'}, - 'memory_in_mb': {'key': 'memoryInMB', 'type': 'int'}, - 'max_data_disk_count': {'key': 'maxDataDiskCount', 'type': 'int'}, - } - - def __init__(self, **kwargs): - super(VirtualMachineSize, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.number_of_cores = kwargs.get('number_of_cores', None) - self.os_disk_size_in_mb = kwargs.get('os_disk_size_in_mb', None) - self.resource_disk_size_in_mb = kwargs.get('resource_disk_size_in_mb', None) - self.memory_in_mb = kwargs.get('memory_in_mb', None) - self.max_data_disk_count = kwargs.get('max_data_disk_count', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_size_paged.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_size_paged.py deleted file mode 100644 index d8dc313a5c4a..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_size_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class VirtualMachineSizePaged(Paged): - """ - A paging container for iterating over a list of :class:`VirtualMachineSize ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[VirtualMachineSize]'} - } - - def __init__(self, *args, **kwargs): - - super(VirtualMachineSizePaged, self).__init__(*args, **kwargs) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_size_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_size_py3.py deleted file mode 100644 index 9f99ba20ce42..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_size_py3.py +++ /dev/null @@ -1,53 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineSize(Model): - """Describes the properties of a VM size. - - :param name: The name of the virtual machine size. - :type name: str - :param number_of_cores: The number of cores supported by the virtual - machine size. - :type number_of_cores: int - :param os_disk_size_in_mb: The OS disk size, in MB, allowed by the virtual - machine size. - :type os_disk_size_in_mb: int - :param resource_disk_size_in_mb: The resource disk size, in MB, allowed by - the virtual machine size. - :type resource_disk_size_in_mb: int - :param memory_in_mb: The amount of memory, in MB, supported by the virtual - machine size. - :type memory_in_mb: int - :param max_data_disk_count: The maximum number of data disks that can be - attached to the virtual machine size. - :type max_data_disk_count: int - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'number_of_cores': {'key': 'numberOfCores', 'type': 'int'}, - 'os_disk_size_in_mb': {'key': 'osDiskSizeInMB', 'type': 'int'}, - 'resource_disk_size_in_mb': {'key': 'resourceDiskSizeInMB', 'type': 'int'}, - 'memory_in_mb': {'key': 'memoryInMB', 'type': 'int'}, - 'max_data_disk_count': {'key': 'maxDataDiskCount', 'type': 'int'}, - } - - def __init__(self, *, name: str=None, number_of_cores: int=None, os_disk_size_in_mb: int=None, resource_disk_size_in_mb: int=None, memory_in_mb: int=None, max_data_disk_count: int=None, **kwargs) -> None: - super(VirtualMachineSize, self).__init__(**kwargs) - self.name = name - self.number_of_cores = number_of_cores - self.os_disk_size_in_mb = os_disk_size_in_mb - self.resource_disk_size_in_mb = resource_disk_size_in_mb - self.memory_in_mb = memory_in_mb - self.max_data_disk_count = max_data_disk_count diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_status_code_count.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_status_code_count.py deleted file mode 100644 index 7df7b702acd7..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_status_code_count.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineStatusCodeCount(Model): - """The status code and count of the virtual machine scale set instance view - status summary. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar code: The instance view status code. - :vartype code: str - :ivar count: The number of instances having a particular status code. - :vartype count: int - """ - - _validation = { - 'code': {'readonly': True}, - 'count': {'readonly': True}, - } - - _attribute_map = { - 'code': {'key': 'code', 'type': 'str'}, - 'count': {'key': 'count', 'type': 'int'}, - } - - def __init__(self, **kwargs): - super(VirtualMachineStatusCodeCount, self).__init__(**kwargs) - self.code = None - self.count = None diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_status_code_count_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_status_code_count_py3.py deleted file mode 100644 index c38800073a95..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_status_code_count_py3.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineStatusCodeCount(Model): - """The status code and count of the virtual machine scale set instance view - status summary. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar code: The instance view status code. - :vartype code: str - :ivar count: The number of instances having a particular status code. - :vartype count: int - """ - - _validation = { - 'code': {'readonly': True}, - 'count': {'readonly': True}, - } - - _attribute_map = { - 'code': {'key': 'code', 'type': 'str'}, - 'count': {'key': 'count', 'type': 'int'}, - } - - def __init__(self, **kwargs) -> None: - super(VirtualMachineStatusCodeCount, self).__init__(**kwargs) - self.code = None - self.count = None diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_update.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_update.py deleted file mode 100644 index a2a7d61b561c..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_update.py +++ /dev/null @@ -1,133 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .update_resource import UpdateResource - - -class VirtualMachineUpdate(UpdateResource): - """Describes a Virtual Machine Update. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :param tags: Resource tags - :type tags: dict[str, str] - :param plan: Specifies information about the marketplace image used to - create the virtual machine. This element is only used for marketplace - images. Before you can use a marketplace image from an API, you must - enable the image for programmatic use. In the Azure portal, find the - marketplace image that you want to use and then click **Want to deploy - programmatically, Get Started ->**. Enter any required information and - then click **Save**. - :type plan: ~azure.mgmt.compute.v2018_04_01.models.Plan - :param hardware_profile: Specifies the hardware settings for the virtual - machine. - :type hardware_profile: - ~azure.mgmt.compute.v2018_04_01.models.HardwareProfile - :param storage_profile: Specifies the storage settings for the virtual - machine disks. - :type storage_profile: - ~azure.mgmt.compute.v2018_04_01.models.StorageProfile - :param os_profile: Specifies the operating system settings for the virtual - machine. - :type os_profile: ~azure.mgmt.compute.v2018_04_01.models.OSProfile - :param network_profile: Specifies the network interfaces of the virtual - machine. - :type network_profile: - ~azure.mgmt.compute.v2018_04_01.models.NetworkProfile - :param diagnostics_profile: Specifies the boot diagnostic settings state. -

    Minimum api-version: 2015-06-15. - :type diagnostics_profile: - ~azure.mgmt.compute.v2018_04_01.models.DiagnosticsProfile - :param availability_set: Specifies information about the availability set - that the virtual machine should be assigned to. Virtual machines specified - in the same availability set are allocated to different nodes to maximize - availability. For more information about availability sets, see [Manage - the availability of virtual - machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-manage-availability?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). -

    For more information on Azure planned maintenance, see [Planned - maintenance for virtual machines in - Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-planned-maintenance?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json) -

    Currently, a VM can only be added to availability set at creation - time. An existing VM cannot be added to an availability set. - :type availability_set: ~azure.mgmt.compute.v2018_04_01.models.SubResource - :param proximity_placement_group: Specifies information about the - proximity placement group that the virtual machine should be assigned to. -

    Minimum api-version: 2018-04-01. - :type proximity_placement_group: - ~azure.mgmt.compute.v2018_04_01.models.SubResource - :ivar provisioning_state: The provisioning state, which only appears in - the response. - :vartype provisioning_state: str - :ivar instance_view: The virtual machine instance view. - :vartype instance_view: - ~azure.mgmt.compute.v2018_04_01.models.VirtualMachineInstanceView - :param license_type: Specifies that the image or disk that is being used - was licensed on-premises. This element is only used for images that - contain the Windows Server operating system.

    Possible values are: -

    Windows_Client

    Windows_Server

    If this element - is included in a request for an update, the value must match the initial - value. This value cannot be updated.

    For more information, see - [Azure Hybrid Use Benefit for Windows - Server](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-hybrid-use-benefit-licensing?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json) -

    Minimum api-version: 2015-06-15 - :type license_type: str - :ivar vm_id: Specifies the VM unique ID which is a 128-bits identifier - that is encoded and stored in all Azure IaaS VMs SMBIOS and can be read - using platform BIOS commands. - :vartype vm_id: str - :param identity: The identity of the virtual machine, if configured. - :type identity: - ~azure.mgmt.compute.v2018_04_01.models.VirtualMachineIdentity - :param zones: The virtual machine zones. - :type zones: list[str] - """ - - _validation = { - 'provisioning_state': {'readonly': True}, - 'instance_view': {'readonly': True}, - 'vm_id': {'readonly': True}, - } - - _attribute_map = { - 'tags': {'key': 'tags', 'type': '{str}'}, - 'plan': {'key': 'plan', 'type': 'Plan'}, - 'hardware_profile': {'key': 'properties.hardwareProfile', 'type': 'HardwareProfile'}, - 'storage_profile': {'key': 'properties.storageProfile', 'type': 'StorageProfile'}, - 'os_profile': {'key': 'properties.osProfile', 'type': 'OSProfile'}, - 'network_profile': {'key': 'properties.networkProfile', 'type': 'NetworkProfile'}, - 'diagnostics_profile': {'key': 'properties.diagnosticsProfile', 'type': 'DiagnosticsProfile'}, - 'availability_set': {'key': 'properties.availabilitySet', 'type': 'SubResource'}, - 'proximity_placement_group': {'key': 'properties.proximityPlacementGroup', 'type': 'SubResource'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'instance_view': {'key': 'properties.instanceView', 'type': 'VirtualMachineInstanceView'}, - 'license_type': {'key': 'properties.licenseType', 'type': 'str'}, - 'vm_id': {'key': 'properties.vmId', 'type': 'str'}, - 'identity': {'key': 'identity', 'type': 'VirtualMachineIdentity'}, - 'zones': {'key': 'zones', 'type': '[str]'}, - } - - def __init__(self, **kwargs): - super(VirtualMachineUpdate, self).__init__(**kwargs) - self.plan = kwargs.get('plan', None) - self.hardware_profile = kwargs.get('hardware_profile', None) - self.storage_profile = kwargs.get('storage_profile', None) - self.os_profile = kwargs.get('os_profile', None) - self.network_profile = kwargs.get('network_profile', None) - self.diagnostics_profile = kwargs.get('diagnostics_profile', None) - self.availability_set = kwargs.get('availability_set', None) - self.proximity_placement_group = kwargs.get('proximity_placement_group', None) - self.provisioning_state = None - self.instance_view = None - self.license_type = kwargs.get('license_type', None) - self.vm_id = None - self.identity = kwargs.get('identity', None) - self.zones = kwargs.get('zones', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_update_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_update_py3.py deleted file mode 100644 index e9630843cbf0..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_update_py3.py +++ /dev/null @@ -1,133 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .update_resource_py3 import UpdateResource - - -class VirtualMachineUpdate(UpdateResource): - """Describes a Virtual Machine Update. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :param tags: Resource tags - :type tags: dict[str, str] - :param plan: Specifies information about the marketplace image used to - create the virtual machine. This element is only used for marketplace - images. Before you can use a marketplace image from an API, you must - enable the image for programmatic use. In the Azure portal, find the - marketplace image that you want to use and then click **Want to deploy - programmatically, Get Started ->**. Enter any required information and - then click **Save**. - :type plan: ~azure.mgmt.compute.v2018_04_01.models.Plan - :param hardware_profile: Specifies the hardware settings for the virtual - machine. - :type hardware_profile: - ~azure.mgmt.compute.v2018_04_01.models.HardwareProfile - :param storage_profile: Specifies the storage settings for the virtual - machine disks. - :type storage_profile: - ~azure.mgmt.compute.v2018_04_01.models.StorageProfile - :param os_profile: Specifies the operating system settings for the virtual - machine. - :type os_profile: ~azure.mgmt.compute.v2018_04_01.models.OSProfile - :param network_profile: Specifies the network interfaces of the virtual - machine. - :type network_profile: - ~azure.mgmt.compute.v2018_04_01.models.NetworkProfile - :param diagnostics_profile: Specifies the boot diagnostic settings state. -

    Minimum api-version: 2015-06-15. - :type diagnostics_profile: - ~azure.mgmt.compute.v2018_04_01.models.DiagnosticsProfile - :param availability_set: Specifies information about the availability set - that the virtual machine should be assigned to. Virtual machines specified - in the same availability set are allocated to different nodes to maximize - availability. For more information about availability sets, see [Manage - the availability of virtual - machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-manage-availability?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). -

    For more information on Azure planned maintenance, see [Planned - maintenance for virtual machines in - Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-planned-maintenance?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json) -

    Currently, a VM can only be added to availability set at creation - time. An existing VM cannot be added to an availability set. - :type availability_set: ~azure.mgmt.compute.v2018_04_01.models.SubResource - :param proximity_placement_group: Specifies information about the - proximity placement group that the virtual machine should be assigned to. -

    Minimum api-version: 2018-04-01. - :type proximity_placement_group: - ~azure.mgmt.compute.v2018_04_01.models.SubResource - :ivar provisioning_state: The provisioning state, which only appears in - the response. - :vartype provisioning_state: str - :ivar instance_view: The virtual machine instance view. - :vartype instance_view: - ~azure.mgmt.compute.v2018_04_01.models.VirtualMachineInstanceView - :param license_type: Specifies that the image or disk that is being used - was licensed on-premises. This element is only used for images that - contain the Windows Server operating system.

    Possible values are: -

    Windows_Client

    Windows_Server

    If this element - is included in a request for an update, the value must match the initial - value. This value cannot be updated.

    For more information, see - [Azure Hybrid Use Benefit for Windows - Server](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-hybrid-use-benefit-licensing?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json) -

    Minimum api-version: 2015-06-15 - :type license_type: str - :ivar vm_id: Specifies the VM unique ID which is a 128-bits identifier - that is encoded and stored in all Azure IaaS VMs SMBIOS and can be read - using platform BIOS commands. - :vartype vm_id: str - :param identity: The identity of the virtual machine, if configured. - :type identity: - ~azure.mgmt.compute.v2018_04_01.models.VirtualMachineIdentity - :param zones: The virtual machine zones. - :type zones: list[str] - """ - - _validation = { - 'provisioning_state': {'readonly': True}, - 'instance_view': {'readonly': True}, - 'vm_id': {'readonly': True}, - } - - _attribute_map = { - 'tags': {'key': 'tags', 'type': '{str}'}, - 'plan': {'key': 'plan', 'type': 'Plan'}, - 'hardware_profile': {'key': 'properties.hardwareProfile', 'type': 'HardwareProfile'}, - 'storage_profile': {'key': 'properties.storageProfile', 'type': 'StorageProfile'}, - 'os_profile': {'key': 'properties.osProfile', 'type': 'OSProfile'}, - 'network_profile': {'key': 'properties.networkProfile', 'type': 'NetworkProfile'}, - 'diagnostics_profile': {'key': 'properties.diagnosticsProfile', 'type': 'DiagnosticsProfile'}, - 'availability_set': {'key': 'properties.availabilitySet', 'type': 'SubResource'}, - 'proximity_placement_group': {'key': 'properties.proximityPlacementGroup', 'type': 'SubResource'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'instance_view': {'key': 'properties.instanceView', 'type': 'VirtualMachineInstanceView'}, - 'license_type': {'key': 'properties.licenseType', 'type': 'str'}, - 'vm_id': {'key': 'properties.vmId', 'type': 'str'}, - 'identity': {'key': 'identity', 'type': 'VirtualMachineIdentity'}, - 'zones': {'key': 'zones', 'type': '[str]'}, - } - - def __init__(self, *, tags=None, plan=None, hardware_profile=None, storage_profile=None, os_profile=None, network_profile=None, diagnostics_profile=None, availability_set=None, proximity_placement_group=None, license_type: str=None, identity=None, zones=None, **kwargs) -> None: - super(VirtualMachineUpdate, self).__init__(tags=tags, **kwargs) - self.plan = plan - self.hardware_profile = hardware_profile - self.storage_profile = storage_profile - self.os_profile = os_profile - self.network_profile = network_profile - self.diagnostics_profile = diagnostics_profile - self.availability_set = availability_set - self.proximity_placement_group = proximity_placement_group - self.provisioning_state = None - self.instance_view = None - self.license_type = license_type - self.vm_id = None - self.identity = identity - self.zones = zones diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/win_rm_configuration.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/win_rm_configuration.py deleted file mode 100644 index 0d429a3c06eb..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/win_rm_configuration.py +++ /dev/null @@ -1,29 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class WinRMConfiguration(Model): - """Describes Windows Remote Management configuration of the VM. - - :param listeners: The list of Windows Remote Management listeners - :type listeners: - list[~azure.mgmt.compute.v2018_04_01.models.WinRMListener] - """ - - _attribute_map = { - 'listeners': {'key': 'listeners', 'type': '[WinRMListener]'}, - } - - def __init__(self, **kwargs): - super(WinRMConfiguration, self).__init__(**kwargs) - self.listeners = kwargs.get('listeners', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/win_rm_configuration_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/win_rm_configuration_py3.py deleted file mode 100644 index 4a3c13531623..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/win_rm_configuration_py3.py +++ /dev/null @@ -1,29 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class WinRMConfiguration(Model): - """Describes Windows Remote Management configuration of the VM. - - :param listeners: The list of Windows Remote Management listeners - :type listeners: - list[~azure.mgmt.compute.v2018_04_01.models.WinRMListener] - """ - - _attribute_map = { - 'listeners': {'key': 'listeners', 'type': '[WinRMListener]'}, - } - - def __init__(self, *, listeners=None, **kwargs) -> None: - super(WinRMConfiguration, self).__init__(**kwargs) - self.listeners = listeners diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/win_rm_listener.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/win_rm_listener.py deleted file mode 100644 index dd80b495e328..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/win_rm_listener.py +++ /dev/null @@ -1,42 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class WinRMListener(Model): - """Describes Protocol and thumbprint of Windows Remote Management listener. - - :param protocol: Specifies the protocol of listener.

    Possible - values are:
    **http**

    **https**. Possible values include: - 'Http', 'Https' - :type protocol: str or - ~azure.mgmt.compute.v2018_04_01.models.ProtocolTypes - :param certificate_url: This is the URL of a certificate that has been - uploaded to Key Vault as a secret. For adding a secret to the Key Vault, - see [Add a key or secret to the key - vault](https://docs.microsoft.com/azure/key-vault/key-vault-get-started/#add). - In this case, your certificate needs to be It is the Base64 encoding of - the following JSON Object which is encoded in UTF-8:

    {
    - "data":"",
    "dataType":"pfx",
    - "password":""
    } - :type certificate_url: str - """ - - _attribute_map = { - 'protocol': {'key': 'protocol', 'type': 'ProtocolTypes'}, - 'certificate_url': {'key': 'certificateUrl', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(WinRMListener, self).__init__(**kwargs) - self.protocol = kwargs.get('protocol', None) - self.certificate_url = kwargs.get('certificate_url', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/win_rm_listener_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/win_rm_listener_py3.py deleted file mode 100644 index a4aae022b007..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/win_rm_listener_py3.py +++ /dev/null @@ -1,42 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class WinRMListener(Model): - """Describes Protocol and thumbprint of Windows Remote Management listener. - - :param protocol: Specifies the protocol of listener.

    Possible - values are:
    **http**

    **https**. Possible values include: - 'Http', 'Https' - :type protocol: str or - ~azure.mgmt.compute.v2018_04_01.models.ProtocolTypes - :param certificate_url: This is the URL of a certificate that has been - uploaded to Key Vault as a secret. For adding a secret to the Key Vault, - see [Add a key or secret to the key - vault](https://docs.microsoft.com/azure/key-vault/key-vault-get-started/#add). - In this case, your certificate needs to be It is the Base64 encoding of - the following JSON Object which is encoded in UTF-8:

    {
    - "data":"",
    "dataType":"pfx",
    - "password":""
    } - :type certificate_url: str - """ - - _attribute_map = { - 'protocol': {'key': 'protocol', 'type': 'ProtocolTypes'}, - 'certificate_url': {'key': 'certificateUrl', 'type': 'str'}, - } - - def __init__(self, *, protocol=None, certificate_url: str=None, **kwargs) -> None: - super(WinRMListener, self).__init__(**kwargs) - self.protocol = protocol - self.certificate_url = certificate_url diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/windows_configuration.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/windows_configuration.py deleted file mode 100644 index a8341ce9d8bb..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/windows_configuration.py +++ /dev/null @@ -1,54 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class WindowsConfiguration(Model): - """Specifies Windows operating system settings on the virtual machine. - - :param provision_vm_agent: Indicates whether virtual machine agent should - be provisioned on the virtual machine.

    When this property is not - specified in the request body, default behavior is to set it to true. - This will ensure that VM Agent is installed on the VM so that extensions - can be added to the VM later. - :type provision_vm_agent: bool - :param enable_automatic_updates: Indicates whether virtual machine is - enabled for automatic updates. - :type enable_automatic_updates: bool - :param time_zone: Specifies the time zone of the virtual machine. e.g. - "Pacific Standard Time" - :type time_zone: str - :param additional_unattend_content: Specifies additional base-64 encoded - XML formatted information that can be included in the Unattend.xml file, - which is used by Windows Setup. - :type additional_unattend_content: - list[~azure.mgmt.compute.v2018_04_01.models.AdditionalUnattendContent] - :param win_rm: Specifies the Windows Remote Management listeners. This - enables remote Windows PowerShell. - :type win_rm: ~azure.mgmt.compute.v2018_04_01.models.WinRMConfiguration - """ - - _attribute_map = { - 'provision_vm_agent': {'key': 'provisionVMAgent', 'type': 'bool'}, - 'enable_automatic_updates': {'key': 'enableAutomaticUpdates', 'type': 'bool'}, - 'time_zone': {'key': 'timeZone', 'type': 'str'}, - 'additional_unattend_content': {'key': 'additionalUnattendContent', 'type': '[AdditionalUnattendContent]'}, - 'win_rm': {'key': 'winRM', 'type': 'WinRMConfiguration'}, - } - - def __init__(self, **kwargs): - super(WindowsConfiguration, self).__init__(**kwargs) - self.provision_vm_agent = kwargs.get('provision_vm_agent', None) - self.enable_automatic_updates = kwargs.get('enable_automatic_updates', None) - self.time_zone = kwargs.get('time_zone', None) - self.additional_unattend_content = kwargs.get('additional_unattend_content', None) - self.win_rm = kwargs.get('win_rm', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/windows_configuration_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/windows_configuration_py3.py deleted file mode 100644 index fe5fc14e963f..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/windows_configuration_py3.py +++ /dev/null @@ -1,54 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class WindowsConfiguration(Model): - """Specifies Windows operating system settings on the virtual machine. - - :param provision_vm_agent: Indicates whether virtual machine agent should - be provisioned on the virtual machine.

    When this property is not - specified in the request body, default behavior is to set it to true. - This will ensure that VM Agent is installed on the VM so that extensions - can be added to the VM later. - :type provision_vm_agent: bool - :param enable_automatic_updates: Indicates whether virtual machine is - enabled for automatic updates. - :type enable_automatic_updates: bool - :param time_zone: Specifies the time zone of the virtual machine. e.g. - "Pacific Standard Time" - :type time_zone: str - :param additional_unattend_content: Specifies additional base-64 encoded - XML formatted information that can be included in the Unattend.xml file, - which is used by Windows Setup. - :type additional_unattend_content: - list[~azure.mgmt.compute.v2018_04_01.models.AdditionalUnattendContent] - :param win_rm: Specifies the Windows Remote Management listeners. This - enables remote Windows PowerShell. - :type win_rm: ~azure.mgmt.compute.v2018_04_01.models.WinRMConfiguration - """ - - _attribute_map = { - 'provision_vm_agent': {'key': 'provisionVMAgent', 'type': 'bool'}, - 'enable_automatic_updates': {'key': 'enableAutomaticUpdates', 'type': 'bool'}, - 'time_zone': {'key': 'timeZone', 'type': 'str'}, - 'additional_unattend_content': {'key': 'additionalUnattendContent', 'type': '[AdditionalUnattendContent]'}, - 'win_rm': {'key': 'winRM', 'type': 'WinRMConfiguration'}, - } - - def __init__(self, *, provision_vm_agent: bool=None, enable_automatic_updates: bool=None, time_zone: str=None, additional_unattend_content=None, win_rm=None, **kwargs) -> None: - super(WindowsConfiguration, self).__init__(**kwargs) - self.provision_vm_agent = provision_vm_agent - self.enable_automatic_updates = enable_automatic_updates - self.time_zone = time_zone - self.additional_unattend_content = additional_unattend_content - self.win_rm = win_rm diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/operations/__init__.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/operations/__init__.py index c1aa6be1704f..1eaf795cbe93 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/operations/__init__.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/operations/__init__.py @@ -9,24 +9,24 @@ # regenerated. # -------------------------------------------------------------------------- -from .operations import Operations -from .availability_sets_operations import AvailabilitySetsOperations -from .proximity_placement_groups_operations import ProximityPlacementGroupsOperations -from .virtual_machine_extension_images_operations import VirtualMachineExtensionImagesOperations -from .virtual_machine_extensions_operations import VirtualMachineExtensionsOperations -from .virtual_machine_images_operations import VirtualMachineImagesOperations -from .usage_operations import UsageOperations -from .virtual_machines_operations import VirtualMachinesOperations -from .virtual_machine_sizes_operations import VirtualMachineSizesOperations -from .images_operations import ImagesOperations -from .virtual_machine_scale_sets_operations import VirtualMachineScaleSetsOperations -from .virtual_machine_scale_set_extensions_operations import VirtualMachineScaleSetExtensionsOperations -from .virtual_machine_scale_set_rolling_upgrades_operations import VirtualMachineScaleSetRollingUpgradesOperations -from .virtual_machine_scale_set_vms_operations import VirtualMachineScaleSetVMsOperations -from .log_analytics_operations import LogAnalyticsOperations -from .virtual_machine_run_commands_operations import VirtualMachineRunCommandsOperations -from .disks_operations import DisksOperations -from .snapshots_operations import SnapshotsOperations +from ._operations import Operations +from ._availability_sets_operations import AvailabilitySetsOperations +from ._proximity_placement_groups_operations import ProximityPlacementGroupsOperations +from ._virtual_machine_extension_images_operations import VirtualMachineExtensionImagesOperations +from ._virtual_machine_extensions_operations import VirtualMachineExtensionsOperations +from ._virtual_machine_images_operations import VirtualMachineImagesOperations +from ._usage_operations import UsageOperations +from ._virtual_machines_operations import VirtualMachinesOperations +from ._virtual_machine_sizes_operations import VirtualMachineSizesOperations +from ._images_operations import ImagesOperations +from ._virtual_machine_scale_sets_operations import VirtualMachineScaleSetsOperations +from ._virtual_machine_scale_set_extensions_operations import VirtualMachineScaleSetExtensionsOperations +from ._virtual_machine_scale_set_rolling_upgrades_operations import VirtualMachineScaleSetRollingUpgradesOperations +from ._virtual_machine_scale_set_vms_operations import VirtualMachineScaleSetVMsOperations +from ._log_analytics_operations import LogAnalyticsOperations +from ._virtual_machine_run_commands_operations import VirtualMachineRunCommandsOperations +from ._disks_operations import DisksOperations +from ._snapshots_operations import SnapshotsOperations __all__ = [ 'Operations', diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/operations/_availability_sets_operations.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/operations/_availability_sets_operations.py new file mode 100644 index 000000000000..c582106f427e --- /dev/null +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/operations/_availability_sets_operations.py @@ -0,0 +1,500 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse +from msrestazure.azure_exceptions import CloudError + +from .. import models + + +class AvailabilitySetsOperations(object): + """AvailabilitySetsOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: Client Api Version. Constant value: "2018-04-01". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2018-04-01" + + self.config = config + + def create_or_update( + self, resource_group_name, availability_set_name, parameters, custom_headers=None, raw=False, **operation_config): + """Create or update an availability set. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param availability_set_name: The name of the availability set. + :type availability_set_name: str + :param parameters: Parameters supplied to the Create Availability Set + operation. + :type parameters: + ~azure.mgmt.compute.v2018_04_01.models.AvailabilitySet + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: AvailabilitySet or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.compute.v2018_04_01.models.AvailabilitySet or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.create_or_update.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'availabilitySetName': self._serialize.url("availability_set_name", availability_set_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(parameters, 'AvailabilitySet') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('AvailabilitySet', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}'} + + def update( + self, resource_group_name, availability_set_name, parameters, custom_headers=None, raw=False, **operation_config): + """Update an availability set. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param availability_set_name: The name of the availability set. + :type availability_set_name: str + :param parameters: Parameters supplied to the Update Availability Set + operation. + :type parameters: + ~azure.mgmt.compute.v2018_04_01.models.AvailabilitySetUpdate + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: AvailabilitySet or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.compute.v2018_04_01.models.AvailabilitySet or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.update.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'availabilitySetName': self._serialize.url("availability_set_name", availability_set_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(parameters, 'AvailabilitySetUpdate') + + # Construct and send request + request = self._client.patch(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('AvailabilitySet', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}'} + + def delete( + self, resource_group_name, availability_set_name, custom_headers=None, raw=False, **operation_config): + """Delete an availability set. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param availability_set_name: The name of the availability set. + :type availability_set_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.delete.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'availabilitySetName': self._serialize.url("availability_set_name", availability_set_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 204]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}'} + + def get( + self, resource_group_name, availability_set_name, custom_headers=None, raw=False, **operation_config): + """Retrieves information about an availability set. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param availability_set_name: The name of the availability set. + :type availability_set_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: AvailabilitySet or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.compute.v2018_04_01.models.AvailabilitySet or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'availabilitySetName': self._serialize.url("availability_set_name", availability_set_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('AvailabilitySet', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}'} + + def list_by_subscription( + self, custom_headers=None, raw=False, **operation_config): + """Lists all availability sets in a subscription. + + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of AvailabilitySet + :rtype: + ~azure.mgmt.compute.v2018_04_01.models.AvailabilitySetPaged[~azure.mgmt.compute.v2018_04_01.models.AvailabilitySet] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_by_subscription.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.AvailabilitySetPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_by_subscription.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Compute/availabilitySets'} + + def list( + self, resource_group_name, custom_headers=None, raw=False, **operation_config): + """Lists all availability sets in a resource group. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of AvailabilitySet + :rtype: + ~azure.mgmt.compute.v2018_04_01.models.AvailabilitySetPaged[~azure.mgmt.compute.v2018_04_01.models.AvailabilitySet] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.AvailabilitySetPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets'} + + def list_available_sizes( + self, resource_group_name, availability_set_name, custom_headers=None, raw=False, **operation_config): + """Lists all available virtual machine sizes that can be used to create a + new virtual machine in an existing availability set. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param availability_set_name: The name of the availability set. + :type availability_set_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of VirtualMachineSize + :rtype: + ~azure.mgmt.compute.v2018_04_01.models.VirtualMachineSizePaged[~azure.mgmt.compute.v2018_04_01.models.VirtualMachineSize] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_available_sizes.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'availabilitySetName': self._serialize.url("availability_set_name", availability_set_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.VirtualMachineSizePaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_available_sizes.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}/vmSizes'} diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/operations/_disks_operations.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/operations/_disks_operations.py new file mode 100644 index 000000000000..fc5d6e7c2df9 --- /dev/null +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/operations/_disks_operations.py @@ -0,0 +1,727 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse +from msrestazure.azure_exceptions import CloudError +from msrest.polling import LROPoller, NoPolling +from msrestazure.polling.arm_polling import ARMPolling + +from .. import models + + +class DisksOperations(object): + """DisksOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: Client Api Version. Constant value: "2018-04-01". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2018-04-01" + + self.config = config + + + def _create_or_update_initial( + self, resource_group_name, disk_name, disk, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.create_or_update.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'diskName': self._serialize.url("disk_name", disk_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(disk, 'Disk') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('Disk', response) + if response.status_code == 202: + deserialized = self._deserialize('Disk', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def create_or_update( + self, resource_group_name, disk_name, disk, custom_headers=None, raw=False, polling=True, **operation_config): + """Creates or updates a disk. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param disk_name: The name of the managed disk that is being created. + The name can't be changed after the disk is created. Supported + characters for the name are a-z, A-Z, 0-9 and _. The maximum name + length is 80 characters. + :type disk_name: str + :param disk: Disk object supplied in the body of the Put disk + operation. + :type disk: ~azure.mgmt.compute.v2018_04_01.models.Disk + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns Disk or + ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2018_04_01.models.Disk] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2018_04_01.models.Disk]] + :raises: :class:`CloudError` + """ + raw_result = self._create_or_update_initial( + resource_group_name=resource_group_name, + disk_name=disk_name, + disk=disk, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('Disk', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/disks/{diskName}'} + + + def _update_initial( + self, resource_group_name, disk_name, disk, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.update.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'diskName': self._serialize.url("disk_name", disk_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(disk, 'DiskUpdate') + + # Construct and send request + request = self._client.patch(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('Disk', response) + if response.status_code == 202: + deserialized = self._deserialize('Disk', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def update( + self, resource_group_name, disk_name, disk, custom_headers=None, raw=False, polling=True, **operation_config): + """Updates (patches) a disk. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param disk_name: The name of the managed disk that is being created. + The name can't be changed after the disk is created. Supported + characters for the name are a-z, A-Z, 0-9 and _. The maximum name + length is 80 characters. + :type disk_name: str + :param disk: Disk object supplied in the body of the Patch disk + operation. + :type disk: ~azure.mgmt.compute.v2018_04_01.models.DiskUpdate + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns Disk or + ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2018_04_01.models.Disk] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2018_04_01.models.Disk]] + :raises: :class:`CloudError` + """ + raw_result = self._update_initial( + resource_group_name=resource_group_name, + disk_name=disk_name, + disk=disk, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('Disk', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/disks/{diskName}'} + + def get( + self, resource_group_name, disk_name, custom_headers=None, raw=False, **operation_config): + """Gets information about a disk. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param disk_name: The name of the managed disk that is being created. + The name can't be changed after the disk is created. Supported + characters for the name are a-z, A-Z, 0-9 and _. The maximum name + length is 80 characters. + :type disk_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: Disk or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.compute.v2018_04_01.models.Disk or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'diskName': self._serialize.url("disk_name", disk_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('Disk', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/disks/{diskName}'} + + + def _delete_initial( + self, resource_group_name, disk_name, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.delete.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'diskName': self._serialize.url("disk_name", disk_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202, 204]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + def delete( + self, resource_group_name, disk_name, custom_headers=None, raw=False, polling=True, **operation_config): + """Deletes a disk. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param disk_name: The name of the managed disk that is being created. + The name can't be changed after the disk is created. Supported + characters for the name are a-z, A-Z, 0-9 and _. The maximum name + length is 80 characters. + :type disk_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns None or + ClientRawResponse if raw==True + :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] + :raises: :class:`CloudError` + """ + raw_result = self._delete_initial( + resource_group_name=resource_group_name, + disk_name=disk_name, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/disks/{diskName}'} + + def list_by_resource_group( + self, resource_group_name, custom_headers=None, raw=False, **operation_config): + """Lists all the disks under a resource group. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of Disk + :rtype: + ~azure.mgmt.compute.v2018_04_01.models.DiskPaged[~azure.mgmt.compute.v2018_04_01.models.Disk] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_by_resource_group.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.DiskPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/disks'} + + def list( + self, custom_headers=None, raw=False, **operation_config): + """Lists all the disks under a subscription. + + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of Disk + :rtype: + ~azure.mgmt.compute.v2018_04_01.models.DiskPaged[~azure.mgmt.compute.v2018_04_01.models.Disk] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.DiskPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Compute/disks'} + + + def _grant_access_initial( + self, resource_group_name, disk_name, access, duration_in_seconds, custom_headers=None, raw=False, **operation_config): + grant_access_data = models.GrantAccessData(access=access, duration_in_seconds=duration_in_seconds) + + # Construct URL + url = self.grant_access.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'diskName': self._serialize.url("disk_name", disk_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(grant_access_data, 'GrantAccessData') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('AccessUri', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def grant_access( + self, resource_group_name, disk_name, access, duration_in_seconds, custom_headers=None, raw=False, polling=True, **operation_config): + """Grants access to a disk. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param disk_name: The name of the managed disk that is being created. + The name can't be changed after the disk is created. Supported + characters for the name are a-z, A-Z, 0-9 and _. The maximum name + length is 80 characters. + :type disk_name: str + :param access: Possible values include: 'None', 'Read' + :type access: str or + ~azure.mgmt.compute.v2018_04_01.models.AccessLevel + :param duration_in_seconds: Time duration in seconds until the SAS + access expires. + :type duration_in_seconds: int + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns AccessUri or + ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2018_04_01.models.AccessUri] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2018_04_01.models.AccessUri]] + :raises: :class:`CloudError` + """ + raw_result = self._grant_access_initial( + resource_group_name=resource_group_name, + disk_name=disk_name, + access=access, + duration_in_seconds=duration_in_seconds, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('AccessUri', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + grant_access.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/disks/{diskName}/beginGetAccess'} + + + def _revoke_access_initial( + self, resource_group_name, disk_name, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.revoke_access.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'diskName': self._serialize.url("disk_name", disk_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + def revoke_access( + self, resource_group_name, disk_name, custom_headers=None, raw=False, polling=True, **operation_config): + """Revokes access to a disk. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param disk_name: The name of the managed disk that is being created. + The name can't be changed after the disk is created. Supported + characters for the name are a-z, A-Z, 0-9 and _. The maximum name + length is 80 characters. + :type disk_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns None or + ClientRawResponse if raw==True + :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] + :raises: :class:`CloudError` + """ + raw_result = self._revoke_access_initial( + resource_group_name=resource_group_name, + disk_name=disk_name, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + revoke_access.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/disks/{diskName}/endGetAccess'} diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/operations/_images_operations.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/operations/_images_operations.py new file mode 100644 index 000000000000..f88e8e45ad1a --- /dev/null +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/operations/_images_operations.py @@ -0,0 +1,527 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse +from msrestazure.azure_exceptions import CloudError +from msrest.polling import LROPoller, NoPolling +from msrestazure.polling.arm_polling import ARMPolling + +from .. import models + + +class ImagesOperations(object): + """ImagesOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: Client Api Version. Constant value: "2018-04-01". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2018-04-01" + + self.config = config + + + def _create_or_update_initial( + self, resource_group_name, image_name, parameters, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.create_or_update.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'imageName': self._serialize.url("image_name", image_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(parameters, 'Image') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 201]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('Image', response) + if response.status_code == 201: + deserialized = self._deserialize('Image', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def create_or_update( + self, resource_group_name, image_name, parameters, custom_headers=None, raw=False, polling=True, **operation_config): + """Create or update an image. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param image_name: The name of the image. + :type image_name: str + :param parameters: Parameters supplied to the Create Image operation. + :type parameters: ~azure.mgmt.compute.v2018_04_01.models.Image + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns Image or + ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2018_04_01.models.Image] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2018_04_01.models.Image]] + :raises: :class:`CloudError` + """ + raw_result = self._create_or_update_initial( + resource_group_name=resource_group_name, + image_name=image_name, + parameters=parameters, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('Image', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/images/{imageName}'} + + + def _update_initial( + self, resource_group_name, image_name, parameters, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.update.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'imageName': self._serialize.url("image_name", image_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(parameters, 'ImageUpdate') + + # Construct and send request + request = self._client.patch(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 201]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('Image', response) + if response.status_code == 201: + deserialized = self._deserialize('Image', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def update( + self, resource_group_name, image_name, parameters, custom_headers=None, raw=False, polling=True, **operation_config): + """Update an image. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param image_name: The name of the image. + :type image_name: str + :param parameters: Parameters supplied to the Update Image operation. + :type parameters: ~azure.mgmt.compute.v2018_04_01.models.ImageUpdate + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns Image or + ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2018_04_01.models.Image] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2018_04_01.models.Image]] + :raises: :class:`CloudError` + """ + raw_result = self._update_initial( + resource_group_name=resource_group_name, + image_name=image_name, + parameters=parameters, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('Image', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/images/{imageName}'} + + + def _delete_initial( + self, resource_group_name, image_name, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.delete.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'imageName': self._serialize.url("image_name", image_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202, 204]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + def delete( + self, resource_group_name, image_name, custom_headers=None, raw=False, polling=True, **operation_config): + """Deletes an Image. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param image_name: The name of the image. + :type image_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns None or + ClientRawResponse if raw==True + :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] + :raises: :class:`CloudError` + """ + raw_result = self._delete_initial( + resource_group_name=resource_group_name, + image_name=image_name, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/images/{imageName}'} + + def get( + self, resource_group_name, image_name, expand=None, custom_headers=None, raw=False, **operation_config): + """Gets an image. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param image_name: The name of the image. + :type image_name: str + :param expand: The expand expression to apply on the operation. + :type expand: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: Image or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.compute.v2018_04_01.models.Image or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'imageName': self._serialize.url("image_name", image_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + if expand is not None: + query_parameters['$expand'] = self._serialize.query("expand", expand, 'str') + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('Image', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/images/{imageName}'} + + def list_by_resource_group( + self, resource_group_name, custom_headers=None, raw=False, **operation_config): + """Gets the list of images under a resource group. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of Image + :rtype: + ~azure.mgmt.compute.v2018_04_01.models.ImagePaged[~azure.mgmt.compute.v2018_04_01.models.Image] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_by_resource_group.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.ImagePaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/images'} + + def list( + self, custom_headers=None, raw=False, **operation_config): + """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. + + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of Image + :rtype: + ~azure.mgmt.compute.v2018_04_01.models.ImagePaged[~azure.mgmt.compute.v2018_04_01.models.Image] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.ImagePaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Compute/images'} diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/operations/_log_analytics_operations.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/operations/_log_analytics_operations.py new file mode 100644 index 000000000000..70d7e7a9a640 --- /dev/null +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/operations/_log_analytics_operations.py @@ -0,0 +1,244 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse +from msrestazure.azure_exceptions import CloudError +from msrest.polling import LROPoller, NoPolling +from msrestazure.polling.arm_polling import ARMPolling + +from .. import models + + +class LogAnalyticsOperations(object): + """LogAnalyticsOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: Client Api Version. Constant value: "2018-04-01". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2018-04-01" + + self.config = config + + + def _export_request_rate_by_interval_initial( + self, parameters, location, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.export_request_rate_by_interval.metadata['url'] + path_format_arguments = { + 'location': self._serialize.url("location", location, 'str', pattern=r'^[-\w\._]+$'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(parameters, 'RequestRateByIntervalInput') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('LogAnalyticsOperationResult', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def export_request_rate_by_interval( + self, parameters, location, custom_headers=None, raw=False, polling=True, **operation_config): + """Export logs that show Api requests made by this subscription in the + given time window to show throttling activities. + + :param parameters: Parameters supplied to the LogAnalytics + getRequestRateByInterval Api. + :type parameters: + ~azure.mgmt.compute.v2018_04_01.models.RequestRateByIntervalInput + :param location: The location upon which virtual-machine-sizes is + queried. + :type location: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns + LogAnalyticsOperationResult or + ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2018_04_01.models.LogAnalyticsOperationResult] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2018_04_01.models.LogAnalyticsOperationResult]] + :raises: :class:`CloudError` + """ + raw_result = self._export_request_rate_by_interval_initial( + parameters=parameters, + location=location, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('LogAnalyticsOperationResult', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + export_request_rate_by_interval.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/logAnalytics/apiAccess/getRequestRateByInterval'} + + + def _export_throttled_requests_initial( + self, parameters, location, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.export_throttled_requests.metadata['url'] + path_format_arguments = { + 'location': self._serialize.url("location", location, 'str', pattern=r'^[-\w\._]+$'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(parameters, 'ThrottledRequestsInput') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('LogAnalyticsOperationResult', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def export_throttled_requests( + self, parameters, location, custom_headers=None, raw=False, polling=True, **operation_config): + """Export logs that show total throttled Api requests for this + subscription in the given time window. + + :param parameters: Parameters supplied to the LogAnalytics + getThrottledRequests Api. + :type parameters: + ~azure.mgmt.compute.v2018_04_01.models.ThrottledRequestsInput + :param location: The location upon which virtual-machine-sizes is + queried. + :type location: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns + LogAnalyticsOperationResult or + ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2018_04_01.models.LogAnalyticsOperationResult] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2018_04_01.models.LogAnalyticsOperationResult]] + :raises: :class:`CloudError` + """ + raw_result = self._export_throttled_requests_initial( + parameters=parameters, + location=location, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('LogAnalyticsOperationResult', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + export_throttled_requests.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/logAnalytics/apiAccess/getThrottledRequests'} diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/operations/_operations.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/operations/_operations.py new file mode 100644 index 000000000000..da52cf7cf618 --- /dev/null +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/operations/_operations.py @@ -0,0 +1,102 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse +from msrestazure.azure_exceptions import CloudError + +from .. import models + + +class Operations(object): + """Operations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: Client Api Version. Constant value: "2018-04-01". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2018-04-01" + + self.config = config + + def list( + self, custom_headers=None, raw=False, **operation_config): + """Gets a list of compute operations. + + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of ComputeOperationValue + :rtype: + ~azure.mgmt.compute.v2018_04_01.models.ComputeOperationValuePaged[~azure.mgmt.compute.v2018_04_01.models.ComputeOperationValue] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list.metadata['url'] + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.ComputeOperationValuePaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list.metadata = {'url': '/providers/Microsoft.Compute/operations'} diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/operations/_proximity_placement_groups_operations.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/operations/_proximity_placement_groups_operations.py new file mode 100644 index 000000000000..f662fb4d6ac4 --- /dev/null +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/operations/_proximity_placement_groups_operations.py @@ -0,0 +1,433 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse +from msrestazure.azure_exceptions import CloudError + +from .. import models + + +class ProximityPlacementGroupsOperations(object): + """ProximityPlacementGroupsOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: Client Api Version. Constant value: "2018-04-01". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2018-04-01" + + self.config = config + + def create_or_update( + self, resource_group_name, proximity_placement_group_name, parameters, custom_headers=None, raw=False, **operation_config): + """Create or update a proximity placement group. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param proximity_placement_group_name: The name of the proximity + placement group. + :type proximity_placement_group_name: str + :param parameters: Parameters supplied to the Create Proximity + Placement Group operation. + :type parameters: + ~azure.mgmt.compute.v2018_04_01.models.ProximityPlacementGroup + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: ProximityPlacementGroup or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.compute.v2018_04_01.models.ProximityPlacementGroup + or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.create_or_update.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'proximityPlacementGroupName': self._serialize.url("proximity_placement_group_name", proximity_placement_group_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(parameters, 'ProximityPlacementGroup') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 201]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('ProximityPlacementGroup', response) + if response.status_code == 201: + deserialized = self._deserialize('ProximityPlacementGroup', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/proximityPlacementGroups/{proximityPlacementGroupName}'} + + def update( + self, resource_group_name, proximity_placement_group_name, tags=None, custom_headers=None, raw=False, **operation_config): + """Update a proximity placement group. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param proximity_placement_group_name: The name of the proximity + placement group. + :type proximity_placement_group_name: str + :param tags: Resource tags + :type tags: dict[str, str] + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: ProximityPlacementGroup or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.compute.v2018_04_01.models.ProximityPlacementGroup + or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + parameters = models.ProximityPlacementGroupUpdate(tags=tags) + + # Construct URL + url = self.update.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'proximityPlacementGroupName': self._serialize.url("proximity_placement_group_name", proximity_placement_group_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(parameters, 'ProximityPlacementGroupUpdate') + + # Construct and send request + request = self._client.patch(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('ProximityPlacementGroup', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/proximityPlacementGroups/{proximityPlacementGroupName}'} + + def delete( + self, resource_group_name, proximity_placement_group_name, custom_headers=None, raw=False, **operation_config): + """Delete a proximity placement group. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param proximity_placement_group_name: The name of the proximity + placement group. + :type proximity_placement_group_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.delete.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'proximityPlacementGroupName': self._serialize.url("proximity_placement_group_name", proximity_placement_group_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/proximityPlacementGroups/{proximityPlacementGroupName}'} + + def get( + self, resource_group_name, proximity_placement_group_name, custom_headers=None, raw=False, **operation_config): + """Retrieves information about a proximity placement group . + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param proximity_placement_group_name: The name of the proximity + placement group. + :type proximity_placement_group_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: ProximityPlacementGroup or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.compute.v2018_04_01.models.ProximityPlacementGroup + or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'proximityPlacementGroupName': self._serialize.url("proximity_placement_group_name", proximity_placement_group_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('ProximityPlacementGroup', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/proximityPlacementGroups/{proximityPlacementGroupName}'} + + def list_by_subscription( + self, custom_headers=None, raw=False, **operation_config): + """Lists all proximity placement groups in a subscription. + + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of ProximityPlacementGroup + :rtype: + ~azure.mgmt.compute.v2018_04_01.models.ProximityPlacementGroupPaged[~azure.mgmt.compute.v2018_04_01.models.ProximityPlacementGroup] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_by_subscription.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.ProximityPlacementGroupPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_by_subscription.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Compute/proximityPlacementGroups'} + + def list_by_resource_group( + self, resource_group_name, custom_headers=None, raw=False, **operation_config): + """Lists all proximity placement groups in a resource group. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of ProximityPlacementGroup + :rtype: + ~azure.mgmt.compute.v2018_04_01.models.ProximityPlacementGroupPaged[~azure.mgmt.compute.v2018_04_01.models.ProximityPlacementGroup] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_by_resource_group.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.ProximityPlacementGroupPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/proximityPlacementGroups'} diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/operations/_snapshots_operations.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/operations/_snapshots_operations.py new file mode 100644 index 000000000000..ee1d341407ef --- /dev/null +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/operations/_snapshots_operations.py @@ -0,0 +1,727 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse +from msrestazure.azure_exceptions import CloudError +from msrest.polling import LROPoller, NoPolling +from msrestazure.polling.arm_polling import ARMPolling + +from .. import models + + +class SnapshotsOperations(object): + """SnapshotsOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: Client Api Version. Constant value: "2018-04-01". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2018-04-01" + + self.config = config + + + def _create_or_update_initial( + self, resource_group_name, snapshot_name, snapshot, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.create_or_update.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'snapshotName': self._serialize.url("snapshot_name", snapshot_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(snapshot, 'Snapshot') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('Snapshot', response) + if response.status_code == 202: + deserialized = self._deserialize('Snapshot', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def create_or_update( + self, resource_group_name, snapshot_name, snapshot, custom_headers=None, raw=False, polling=True, **operation_config): + """Creates or updates a snapshot. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param snapshot_name: The name of the snapshot that is being created. + The name can't be changed after the snapshot is created. Supported + characters for the name are a-z, A-Z, 0-9 and _. The max name length + is 80 characters. + :type snapshot_name: str + :param snapshot: Snapshot object supplied in the body of the Put disk + operation. + :type snapshot: ~azure.mgmt.compute.v2018_04_01.models.Snapshot + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns Snapshot or + ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2018_04_01.models.Snapshot] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2018_04_01.models.Snapshot]] + :raises: :class:`CloudError` + """ + raw_result = self._create_or_update_initial( + resource_group_name=resource_group_name, + snapshot_name=snapshot_name, + snapshot=snapshot, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('Snapshot', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/snapshots/{snapshotName}'} + + + def _update_initial( + self, resource_group_name, snapshot_name, snapshot, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.update.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'snapshotName': self._serialize.url("snapshot_name", snapshot_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(snapshot, 'SnapshotUpdate') + + # Construct and send request + request = self._client.patch(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('Snapshot', response) + if response.status_code == 202: + deserialized = self._deserialize('Snapshot', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def update( + self, resource_group_name, snapshot_name, snapshot, custom_headers=None, raw=False, polling=True, **operation_config): + """Updates (patches) a snapshot. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param snapshot_name: The name of the snapshot that is being created. + The name can't be changed after the snapshot is created. Supported + characters for the name are a-z, A-Z, 0-9 and _. The max name length + is 80 characters. + :type snapshot_name: str + :param snapshot: Snapshot object supplied in the body of the Patch + snapshot operation. + :type snapshot: ~azure.mgmt.compute.v2018_04_01.models.SnapshotUpdate + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns Snapshot or + ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2018_04_01.models.Snapshot] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2018_04_01.models.Snapshot]] + :raises: :class:`CloudError` + """ + raw_result = self._update_initial( + resource_group_name=resource_group_name, + snapshot_name=snapshot_name, + snapshot=snapshot, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('Snapshot', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/snapshots/{snapshotName}'} + + def get( + self, resource_group_name, snapshot_name, custom_headers=None, raw=False, **operation_config): + """Gets information about a snapshot. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param snapshot_name: The name of the snapshot that is being created. + The name can't be changed after the snapshot is created. Supported + characters for the name are a-z, A-Z, 0-9 and _. The max name length + is 80 characters. + :type snapshot_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: Snapshot or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.compute.v2018_04_01.models.Snapshot or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'snapshotName': self._serialize.url("snapshot_name", snapshot_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('Snapshot', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/snapshots/{snapshotName}'} + + + def _delete_initial( + self, resource_group_name, snapshot_name, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.delete.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'snapshotName': self._serialize.url("snapshot_name", snapshot_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202, 204]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + def delete( + self, resource_group_name, snapshot_name, custom_headers=None, raw=False, polling=True, **operation_config): + """Deletes a snapshot. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param snapshot_name: The name of the snapshot that is being created. + The name can't be changed after the snapshot is created. Supported + characters for the name are a-z, A-Z, 0-9 and _. The max name length + is 80 characters. + :type snapshot_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns None or + ClientRawResponse if raw==True + :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] + :raises: :class:`CloudError` + """ + raw_result = self._delete_initial( + resource_group_name=resource_group_name, + snapshot_name=snapshot_name, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/snapshots/{snapshotName}'} + + def list_by_resource_group( + self, resource_group_name, custom_headers=None, raw=False, **operation_config): + """Lists snapshots under a resource group. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of Snapshot + :rtype: + ~azure.mgmt.compute.v2018_04_01.models.SnapshotPaged[~azure.mgmt.compute.v2018_04_01.models.Snapshot] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_by_resource_group.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.SnapshotPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/snapshots'} + + def list( + self, custom_headers=None, raw=False, **operation_config): + """Lists snapshots under a subscription. + + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of Snapshot + :rtype: + ~azure.mgmt.compute.v2018_04_01.models.SnapshotPaged[~azure.mgmt.compute.v2018_04_01.models.Snapshot] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.SnapshotPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Compute/snapshots'} + + + def _grant_access_initial( + self, resource_group_name, snapshot_name, access, duration_in_seconds, custom_headers=None, raw=False, **operation_config): + grant_access_data = models.GrantAccessData(access=access, duration_in_seconds=duration_in_seconds) + + # Construct URL + url = self.grant_access.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'snapshotName': self._serialize.url("snapshot_name", snapshot_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(grant_access_data, 'GrantAccessData') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('AccessUri', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def grant_access( + self, resource_group_name, snapshot_name, access, duration_in_seconds, custom_headers=None, raw=False, polling=True, **operation_config): + """Grants access to a snapshot. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param snapshot_name: The name of the snapshot that is being created. + The name can't be changed after the snapshot is created. Supported + characters for the name are a-z, A-Z, 0-9 and _. The max name length + is 80 characters. + :type snapshot_name: str + :param access: Possible values include: 'None', 'Read' + :type access: str or + ~azure.mgmt.compute.v2018_04_01.models.AccessLevel + :param duration_in_seconds: Time duration in seconds until the SAS + access expires. + :type duration_in_seconds: int + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns AccessUri or + ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2018_04_01.models.AccessUri] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2018_04_01.models.AccessUri]] + :raises: :class:`CloudError` + """ + raw_result = self._grant_access_initial( + resource_group_name=resource_group_name, + snapshot_name=snapshot_name, + access=access, + duration_in_seconds=duration_in_seconds, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('AccessUri', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + grant_access.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/snapshots/{snapshotName}/beginGetAccess'} + + + def _revoke_access_initial( + self, resource_group_name, snapshot_name, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.revoke_access.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'snapshotName': self._serialize.url("snapshot_name", snapshot_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + def revoke_access( + self, resource_group_name, snapshot_name, custom_headers=None, raw=False, polling=True, **operation_config): + """Revokes access to a snapshot. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param snapshot_name: The name of the snapshot that is being created. + The name can't be changed after the snapshot is created. Supported + characters for the name are a-z, A-Z, 0-9 and _. The max name length + is 80 characters. + :type snapshot_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns None or + ClientRawResponse if raw==True + :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] + :raises: :class:`CloudError` + """ + raw_result = self._revoke_access_initial( + resource_group_name=resource_group_name, + snapshot_name=snapshot_name, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + revoke_access.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/snapshots/{snapshotName}/endGetAccess'} diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/operations/_usage_operations.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/operations/_usage_operations.py new file mode 100644 index 000000000000..8fe01b520003 --- /dev/null +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/operations/_usage_operations.py @@ -0,0 +1,111 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse +from msrestazure.azure_exceptions import CloudError + +from .. import models + + +class UsageOperations(object): + """UsageOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: Client Api Version. Constant value: "2018-04-01". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2018-04-01" + + self.config = config + + def list( + self, location, custom_headers=None, raw=False, **operation_config): + """Gets, for the specified location, the current compute resource usage + information as well as the limits for compute resources under the + subscription. + + :param location: The location for which resource usage is queried. + :type location: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of Usage + :rtype: + ~azure.mgmt.compute.v2018_04_01.models.UsagePaged[~azure.mgmt.compute.v2018_04_01.models.Usage] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list.metadata['url'] + path_format_arguments = { + 'location': self._serialize.url("location", location, 'str', pattern=r'^[-\w\._]+$'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.UsagePaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/usages'} diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/operations/_virtual_machine_extension_images_operations.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/operations/_virtual_machine_extension_images_operations.py new file mode 100644 index 000000000000..37cab6f28aa8 --- /dev/null +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/operations/_virtual_machine_extension_images_operations.py @@ -0,0 +1,247 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse +from msrestazure.azure_exceptions import CloudError + +from .. import models + + +class VirtualMachineExtensionImagesOperations(object): + """VirtualMachineExtensionImagesOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: Client Api Version. Constant value: "2018-04-01". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2018-04-01" + + self.config = config + + def get( + self, location, publisher_name, type, version, custom_headers=None, raw=False, **operation_config): + """Gets a virtual machine extension image. + + :param location: The name of a supported Azure region. + :type location: str + :param publisher_name: + :type publisher_name: str + :param type: + :type type: str + :param version: + :type version: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: VirtualMachineExtensionImage or ClientRawResponse if raw=true + :rtype: + ~azure.mgmt.compute.v2018_04_01.models.VirtualMachineExtensionImage or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'location': self._serialize.url("location", location, 'str'), + 'publisherName': self._serialize.url("publisher_name", publisher_name, 'str'), + 'type': self._serialize.url("type", type, 'str'), + 'version': self._serialize.url("version", version, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('VirtualMachineExtensionImage', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/publishers/{publisherName}/artifacttypes/vmextension/types/{type}/versions/{version}'} + + def list_types( + self, location, publisher_name, custom_headers=None, raw=False, **operation_config): + """Gets a list of virtual machine extension image types. + + :param location: The name of a supported Azure region. + :type location: str + :param publisher_name: + :type publisher_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: list or ClientRawResponse if raw=true + :rtype: + list[~azure.mgmt.compute.v2018_04_01.models.VirtualMachineExtensionImage] + or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.list_types.metadata['url'] + path_format_arguments = { + 'location': self._serialize.url("location", location, 'str'), + 'publisherName': self._serialize.url("publisher_name", publisher_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('[VirtualMachineExtensionImage]', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + list_types.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/publishers/{publisherName}/artifacttypes/vmextension/types'} + + def list_versions( + self, location, publisher_name, type, filter=None, top=None, orderby=None, custom_headers=None, raw=False, **operation_config): + """Gets a list of virtual machine extension image versions. + + :param location: The name of a supported Azure region. + :type location: str + :param publisher_name: + :type publisher_name: str + :param type: + :type type: str + :param filter: The filter to apply on the operation. + :type filter: str + :param top: + :type top: int + :param orderby: + :type orderby: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: list or ClientRawResponse if raw=true + :rtype: + list[~azure.mgmt.compute.v2018_04_01.models.VirtualMachineExtensionImage] + or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.list_versions.metadata['url'] + path_format_arguments = { + 'location': self._serialize.url("location", location, 'str'), + 'publisherName': self._serialize.url("publisher_name", publisher_name, 'str'), + 'type': self._serialize.url("type", type, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + if filter is not None: + query_parameters['$filter'] = self._serialize.query("filter", filter, 'str') + if top is not None: + query_parameters['$top'] = self._serialize.query("top", top, 'int') + if orderby is not None: + query_parameters['$orderby'] = self._serialize.query("orderby", orderby, 'str') + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('[VirtualMachineExtensionImage]', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + list_versions.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/publishers/{publisherName}/artifacttypes/vmextension/types/{type}/versions'} diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/operations/_virtual_machine_extensions_operations.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/operations/_virtual_machine_extensions_operations.py new file mode 100644 index 000000000000..0dc764e2a921 --- /dev/null +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/operations/_virtual_machine_extensions_operations.py @@ -0,0 +1,479 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse +from msrestazure.azure_exceptions import CloudError +from msrest.polling import LROPoller, NoPolling +from msrestazure.polling.arm_polling import ARMPolling + +from .. import models + + +class VirtualMachineExtensionsOperations(object): + """VirtualMachineExtensionsOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: Client Api Version. Constant value: "2018-04-01". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2018-04-01" + + self.config = config + + + def _create_or_update_initial( + self, resource_group_name, vm_name, vm_extension_name, extension_parameters, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.create_or_update.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vmName': self._serialize.url("vm_name", vm_name, 'str'), + 'vmExtensionName': self._serialize.url("vm_extension_name", vm_extension_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(extension_parameters, 'VirtualMachineExtension') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 201]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('VirtualMachineExtension', response) + if response.status_code == 201: + deserialized = self._deserialize('VirtualMachineExtension', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def create_or_update( + self, resource_group_name, vm_name, vm_extension_name, extension_parameters, custom_headers=None, raw=False, polling=True, **operation_config): + """The operation to create or update the extension. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param vm_name: The name of the virtual machine where the extension + should be created or updated. + :type vm_name: str + :param vm_extension_name: The name of the virtual machine extension. + :type vm_extension_name: str + :param extension_parameters: Parameters supplied to the Create Virtual + Machine Extension operation. + :type extension_parameters: + ~azure.mgmt.compute.v2018_04_01.models.VirtualMachineExtension + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns VirtualMachineExtension + or ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2018_04_01.models.VirtualMachineExtension] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2018_04_01.models.VirtualMachineExtension]] + :raises: :class:`CloudError` + """ + raw_result = self._create_or_update_initial( + resource_group_name=resource_group_name, + vm_name=vm_name, + vm_extension_name=vm_extension_name, + extension_parameters=extension_parameters, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('VirtualMachineExtension', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/extensions/{vmExtensionName}'} + + + def _update_initial( + self, resource_group_name, vm_name, vm_extension_name, extension_parameters, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.update.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vmName': self._serialize.url("vm_name", vm_name, 'str'), + 'vmExtensionName': self._serialize.url("vm_extension_name", vm_extension_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(extension_parameters, 'VirtualMachineExtensionUpdate') + + # Construct and send request + request = self._client.patch(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('VirtualMachineExtension', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def update( + self, resource_group_name, vm_name, vm_extension_name, extension_parameters, custom_headers=None, raw=False, polling=True, **operation_config): + """The operation to update the extension. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param vm_name: The name of the virtual machine where the extension + should be updated. + :type vm_name: str + :param vm_extension_name: The name of the virtual machine extension. + :type vm_extension_name: str + :param extension_parameters: Parameters supplied to the Update Virtual + Machine Extension operation. + :type extension_parameters: + ~azure.mgmt.compute.v2018_04_01.models.VirtualMachineExtensionUpdate + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns VirtualMachineExtension + or ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2018_04_01.models.VirtualMachineExtension] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2018_04_01.models.VirtualMachineExtension]] + :raises: :class:`CloudError` + """ + raw_result = self._update_initial( + resource_group_name=resource_group_name, + vm_name=vm_name, + vm_extension_name=vm_extension_name, + extension_parameters=extension_parameters, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('VirtualMachineExtension', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/extensions/{vmExtensionName}'} + + + def _delete_initial( + self, resource_group_name, vm_name, vm_extension_name, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.delete.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vmName': self._serialize.url("vm_name", vm_name, 'str'), + 'vmExtensionName': self._serialize.url("vm_extension_name", vm_extension_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202, 204]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + def delete( + self, resource_group_name, vm_name, vm_extension_name, custom_headers=None, raw=False, polling=True, **operation_config): + """The operation to delete the extension. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param vm_name: The name of the virtual machine where the extension + should be deleted. + :type vm_name: str + :param vm_extension_name: The name of the virtual machine extension. + :type vm_extension_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns None or + ClientRawResponse if raw==True + :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] + :raises: :class:`CloudError` + """ + raw_result = self._delete_initial( + resource_group_name=resource_group_name, + vm_name=vm_name, + vm_extension_name=vm_extension_name, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/extensions/{vmExtensionName}'} + + def get( + self, resource_group_name, vm_name, vm_extension_name, expand=None, custom_headers=None, raw=False, **operation_config): + """The operation to get the extension. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param vm_name: The name of the virtual machine containing the + extension. + :type vm_name: str + :param vm_extension_name: The name of the virtual machine extension. + :type vm_extension_name: str + :param expand: The expand expression to apply on the operation. + :type expand: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: VirtualMachineExtension or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.compute.v2018_04_01.models.VirtualMachineExtension + or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vmName': self._serialize.url("vm_name", vm_name, 'str'), + 'vmExtensionName': self._serialize.url("vm_extension_name", vm_extension_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + if expand is not None: + query_parameters['$expand'] = self._serialize.query("expand", expand, 'str') + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('VirtualMachineExtension', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/extensions/{vmExtensionName}'} + + def list( + self, resource_group_name, vm_name, expand=None, custom_headers=None, raw=False, **operation_config): + """The operation to get all extensions of a Virtual Machine. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param vm_name: The name of the virtual machine containing the + extension. + :type vm_name: str + :param expand: The expand expression to apply on the operation. + :type expand: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: VirtualMachineExtensionsListResult or ClientRawResponse if + raw=true + :rtype: + ~azure.mgmt.compute.v2018_04_01.models.VirtualMachineExtensionsListResult + or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.list.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vmName': self._serialize.url("vm_name", vm_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + if expand is not None: + query_parameters['$expand'] = self._serialize.query("expand", expand, 'str') + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('VirtualMachineExtensionsListResult', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/extensions'} diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/operations/_virtual_machine_images_operations.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/operations/_virtual_machine_images_operations.py new file mode 100644 index 000000000000..901b84febc70 --- /dev/null +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/operations/_virtual_machine_images_operations.py @@ -0,0 +1,380 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse +from msrestazure.azure_exceptions import CloudError + +from .. import models + + +class VirtualMachineImagesOperations(object): + """VirtualMachineImagesOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: Client Api Version. Constant value: "2018-04-01". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2018-04-01" + + self.config = config + + def get( + self, location, publisher_name, offer, skus, version, custom_headers=None, raw=False, **operation_config): + """Gets a virtual machine image. + + :param location: The name of a supported Azure region. + :type location: str + :param publisher_name: A valid image publisher. + :type publisher_name: str + :param offer: A valid image publisher offer. + :type offer: str + :param skus: A valid image SKU. + :type skus: str + :param version: A valid image SKU version. + :type version: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: VirtualMachineImage or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.compute.v2018_04_01.models.VirtualMachineImage or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'location': self._serialize.url("location", location, 'str'), + 'publisherName': self._serialize.url("publisher_name", publisher_name, 'str'), + 'offer': self._serialize.url("offer", offer, 'str'), + 'skus': self._serialize.url("skus", skus, 'str'), + 'version': self._serialize.url("version", version, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('VirtualMachineImage', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/publishers/{publisherName}/artifacttypes/vmimage/offers/{offer}/skus/{skus}/versions/{version}'} + + def list( + self, location, publisher_name, offer, skus, filter=None, top=None, orderby=None, custom_headers=None, raw=False, **operation_config): + """Gets a list of all virtual machine image versions for the specified + location, publisher, offer, and SKU. + + :param location: The name of a supported Azure region. + :type location: str + :param publisher_name: A valid image publisher. + :type publisher_name: str + :param offer: A valid image publisher offer. + :type offer: str + :param skus: A valid image SKU. + :type skus: str + :param filter: The filter to apply on the operation. + :type filter: str + :param top: + :type top: int + :param orderby: + :type orderby: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: list or ClientRawResponse if raw=true + :rtype: + list[~azure.mgmt.compute.v2018_04_01.models.VirtualMachineImageResource] + or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.list.metadata['url'] + path_format_arguments = { + 'location': self._serialize.url("location", location, 'str'), + 'publisherName': self._serialize.url("publisher_name", publisher_name, 'str'), + 'offer': self._serialize.url("offer", offer, 'str'), + 'skus': self._serialize.url("skus", skus, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + if filter is not None: + query_parameters['$filter'] = self._serialize.query("filter", filter, 'str') + if top is not None: + query_parameters['$top'] = self._serialize.query("top", top, 'int') + if orderby is not None: + query_parameters['$orderby'] = self._serialize.query("orderby", orderby, 'str') + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('[VirtualMachineImageResource]', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/publishers/{publisherName}/artifacttypes/vmimage/offers/{offer}/skus/{skus}/versions'} + + def list_offers( + self, location, publisher_name, custom_headers=None, raw=False, **operation_config): + """Gets a list of virtual machine image offers for the specified location + and publisher. + + :param location: The name of a supported Azure region. + :type location: str + :param publisher_name: A valid image publisher. + :type publisher_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: list or ClientRawResponse if raw=true + :rtype: + list[~azure.mgmt.compute.v2018_04_01.models.VirtualMachineImageResource] + or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.list_offers.metadata['url'] + path_format_arguments = { + 'location': self._serialize.url("location", location, 'str'), + 'publisherName': self._serialize.url("publisher_name", publisher_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('[VirtualMachineImageResource]', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + list_offers.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/publishers/{publisherName}/artifacttypes/vmimage/offers'} + + def list_publishers( + self, location, custom_headers=None, raw=False, **operation_config): + """Gets a list of virtual machine image publishers for the specified Azure + location. + + :param location: The name of a supported Azure region. + :type location: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: list or ClientRawResponse if raw=true + :rtype: + list[~azure.mgmt.compute.v2018_04_01.models.VirtualMachineImageResource] + or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.list_publishers.metadata['url'] + path_format_arguments = { + 'location': self._serialize.url("location", location, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('[VirtualMachineImageResource]', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + list_publishers.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/publishers'} + + def list_skus( + self, location, publisher_name, offer, custom_headers=None, raw=False, **operation_config): + """Gets a list of virtual machine image SKUs for the specified location, + publisher, and offer. + + :param location: The name of a supported Azure region. + :type location: str + :param publisher_name: A valid image publisher. + :type publisher_name: str + :param offer: A valid image publisher offer. + :type offer: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: list or ClientRawResponse if raw=true + :rtype: + list[~azure.mgmt.compute.v2018_04_01.models.VirtualMachineImageResource] + or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.list_skus.metadata['url'] + path_format_arguments = { + 'location': self._serialize.url("location", location, 'str'), + 'publisherName': self._serialize.url("publisher_name", publisher_name, 'str'), + 'offer': self._serialize.url("offer", offer, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('[VirtualMachineImageResource]', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + list_skus.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/publishers/{publisherName}/artifacttypes/vmimage/offers/{offer}/skus'} diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/operations/_virtual_machine_run_commands_operations.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/operations/_virtual_machine_run_commands_operations.py new file mode 100644 index 000000000000..511b910f2c3d --- /dev/null +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/operations/_virtual_machine_run_commands_operations.py @@ -0,0 +1,170 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse +from msrestazure.azure_exceptions import CloudError + +from .. import models + + +class VirtualMachineRunCommandsOperations(object): + """VirtualMachineRunCommandsOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: Client Api Version. Constant value: "2018-04-01". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2018-04-01" + + self.config = config + + def list( + self, location, custom_headers=None, raw=False, **operation_config): + """Lists all available run commands for a subscription in a location. + + :param location: The location upon which run commands is queried. + :type location: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of RunCommandDocumentBase + :rtype: + ~azure.mgmt.compute.v2018_04_01.models.RunCommandDocumentBasePaged[~azure.mgmt.compute.v2018_04_01.models.RunCommandDocumentBase] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list.metadata['url'] + path_format_arguments = { + 'location': self._serialize.url("location", location, 'str', pattern=r'^[-\w\._]+$'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.RunCommandDocumentBasePaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/runCommands'} + + def get( + self, location, command_id, custom_headers=None, raw=False, **operation_config): + """Gets specific run command for a subscription in a location. + + :param location: The location upon which run commands is queried. + :type location: str + :param command_id: The command id. + :type command_id: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: RunCommandDocument or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.compute.v2018_04_01.models.RunCommandDocument or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'location': self._serialize.url("location", location, 'str', pattern=r'^[-\w\._]+$'), + 'commandId': self._serialize.url("command_id", command_id, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('RunCommandDocument', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/runCommands/{commandId}'} diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/operations/_virtual_machine_scale_set_extensions_operations.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/operations/_virtual_machine_scale_set_extensions_operations.py new file mode 100644 index 000000000000..93f2d377f483 --- /dev/null +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/operations/_virtual_machine_scale_set_extensions_operations.py @@ -0,0 +1,380 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse +from msrestazure.azure_exceptions import CloudError +from msrest.polling import LROPoller, NoPolling +from msrestazure.polling.arm_polling import ARMPolling + +from .. import models + + +class VirtualMachineScaleSetExtensionsOperations(object): + """VirtualMachineScaleSetExtensionsOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: Client Api Version. Constant value: "2018-04-01". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2018-04-01" + + self.config = config + + + def _create_or_update_initial( + self, resource_group_name, vm_scale_set_name, vmss_extension_name, extension_parameters, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.create_or_update.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), + 'vmssExtensionName': self._serialize.url("vmss_extension_name", vmss_extension_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(extension_parameters, 'VirtualMachineScaleSetExtension') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 201]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('VirtualMachineScaleSetExtension', response) + if response.status_code == 201: + deserialized = self._deserialize('VirtualMachineScaleSetExtension', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def create_or_update( + self, resource_group_name, vm_scale_set_name, vmss_extension_name, extension_parameters, custom_headers=None, raw=False, polling=True, **operation_config): + """The operation to create or update an extension. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param vm_scale_set_name: The name of the VM scale set where the + extension should be create or updated. + :type vm_scale_set_name: str + :param vmss_extension_name: The name of the VM scale set extension. + :type vmss_extension_name: str + :param extension_parameters: Parameters supplied to the Create VM + scale set Extension operation. + :type extension_parameters: + ~azure.mgmt.compute.v2018_04_01.models.VirtualMachineScaleSetExtension + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns + VirtualMachineScaleSetExtension or + ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2018_04_01.models.VirtualMachineScaleSetExtension] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2018_04_01.models.VirtualMachineScaleSetExtension]] + :raises: :class:`CloudError` + """ + raw_result = self._create_or_update_initial( + resource_group_name=resource_group_name, + vm_scale_set_name=vm_scale_set_name, + vmss_extension_name=vmss_extension_name, + extension_parameters=extension_parameters, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('VirtualMachineScaleSetExtension', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/extensions/{vmssExtensionName}'} + + + def _delete_initial( + self, resource_group_name, vm_scale_set_name, vmss_extension_name, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.delete.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), + 'vmssExtensionName': self._serialize.url("vmss_extension_name", vmss_extension_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202, 204]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + def delete( + self, resource_group_name, vm_scale_set_name, vmss_extension_name, custom_headers=None, raw=False, polling=True, **operation_config): + """The operation to delete the extension. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param vm_scale_set_name: The name of the VM scale set where the + extension should be deleted. + :type vm_scale_set_name: str + :param vmss_extension_name: The name of the VM scale set extension. + :type vmss_extension_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns None or + ClientRawResponse if raw==True + :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] + :raises: :class:`CloudError` + """ + raw_result = self._delete_initial( + resource_group_name=resource_group_name, + vm_scale_set_name=vm_scale_set_name, + vmss_extension_name=vmss_extension_name, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/extensions/{vmssExtensionName}'} + + def get( + self, resource_group_name, vm_scale_set_name, vmss_extension_name, expand=None, custom_headers=None, raw=False, **operation_config): + """The operation to get the extension. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param vm_scale_set_name: The name of the VM scale set containing the + extension. + :type vm_scale_set_name: str + :param vmss_extension_name: The name of the VM scale set extension. + :type vmss_extension_name: str + :param expand: The expand expression to apply on the operation. + :type expand: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: VirtualMachineScaleSetExtension or ClientRawResponse if + raw=true + :rtype: + ~azure.mgmt.compute.v2018_04_01.models.VirtualMachineScaleSetExtension + or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), + 'vmssExtensionName': self._serialize.url("vmss_extension_name", vmss_extension_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + if expand is not None: + query_parameters['$expand'] = self._serialize.query("expand", expand, 'str') + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('VirtualMachineScaleSetExtension', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/extensions/{vmssExtensionName}'} + + def list( + self, resource_group_name, vm_scale_set_name, custom_headers=None, raw=False, **operation_config): + """Gets a list of all extensions in a VM scale set. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param vm_scale_set_name: The name of the VM scale set containing the + extension. + :type vm_scale_set_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of VirtualMachineScaleSetExtension + :rtype: + ~azure.mgmt.compute.v2018_04_01.models.VirtualMachineScaleSetExtensionPaged[~azure.mgmt.compute.v2018_04_01.models.VirtualMachineScaleSetExtension] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.VirtualMachineScaleSetExtensionPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/extensions'} diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/operations/_virtual_machine_scale_set_rolling_upgrades_operations.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/operations/_virtual_machine_scale_set_rolling_upgrades_operations.py new file mode 100644 index 000000000000..5cfd7e380f4c --- /dev/null +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/operations/_virtual_machine_scale_set_rolling_upgrades_operations.py @@ -0,0 +1,266 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse +from msrestazure.azure_exceptions import CloudError +from msrest.polling import LROPoller, NoPolling +from msrestazure.polling.arm_polling import ARMPolling + +from .. import models + + +class VirtualMachineScaleSetRollingUpgradesOperations(object): + """VirtualMachineScaleSetRollingUpgradesOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: Client Api Version. Constant value: "2018-04-01". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2018-04-01" + + self.config = config + + + def _cancel_initial( + self, resource_group_name, vm_scale_set_name, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.cancel.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + def cancel( + self, resource_group_name, vm_scale_set_name, custom_headers=None, raw=False, polling=True, **operation_config): + """Cancels the current virtual machine scale set rolling upgrade. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param vm_scale_set_name: The name of the VM scale set. + :type vm_scale_set_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns None or + ClientRawResponse if raw==True + :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] + :raises: :class:`CloudError` + """ + raw_result = self._cancel_initial( + resource_group_name=resource_group_name, + vm_scale_set_name=vm_scale_set_name, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + cancel.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/rollingUpgrades/cancel'} + + + def _start_os_upgrade_initial( + self, resource_group_name, vm_scale_set_name, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.start_os_upgrade.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + def start_os_upgrade( + self, resource_group_name, vm_scale_set_name, custom_headers=None, raw=False, polling=True, **operation_config): + """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. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param vm_scale_set_name: The name of the VM scale set. + :type vm_scale_set_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns None or + ClientRawResponse if raw==True + :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] + :raises: :class:`CloudError` + """ + raw_result = self._start_os_upgrade_initial( + resource_group_name=resource_group_name, + vm_scale_set_name=vm_scale_set_name, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + start_os_upgrade.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/osRollingUpgrade'} + + def get_latest( + self, resource_group_name, vm_scale_set_name, custom_headers=None, raw=False, **operation_config): + """Gets the status of the latest virtual machine scale set rolling + upgrade. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param vm_scale_set_name: The name of the VM scale set. + :type vm_scale_set_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: RollingUpgradeStatusInfo or ClientRawResponse if raw=true + :rtype: + ~azure.mgmt.compute.v2018_04_01.models.RollingUpgradeStatusInfo or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get_latest.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('RollingUpgradeStatusInfo', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_latest.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/rollingUpgrades/latest'} diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/operations/_virtual_machine_scale_set_vms_operations.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/operations/_virtual_machine_scale_set_vms_operations.py new file mode 100644 index 000000000000..3947ec6a0e76 --- /dev/null +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/operations/_virtual_machine_scale_set_vms_operations.py @@ -0,0 +1,1228 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse +from msrestazure.azure_exceptions import CloudError +from msrest.polling import LROPoller, NoPolling +from msrestazure.polling.arm_polling import ARMPolling + +from .. import models + + +class VirtualMachineScaleSetVMsOperations(object): + """VirtualMachineScaleSetVMsOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: Client Api Version. Constant value: "2018-04-01". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2018-04-01" + + self.config = config + + + def _reimage_initial( + self, resource_group_name, vm_scale_set_name, instance_id, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.reimage.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), + 'instanceId': self._serialize.url("instance_id", instance_id, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + def reimage( + self, resource_group_name, vm_scale_set_name, instance_id, custom_headers=None, raw=False, polling=True, **operation_config): + """Reimages (upgrade the operating system) a specific virtual machine in a + VM scale set. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param vm_scale_set_name: The name of the VM scale set. + :type vm_scale_set_name: str + :param instance_id: The instance ID of the virtual machine. + :type instance_id: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns None or + ClientRawResponse if raw==True + :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] + :raises: :class:`CloudError` + """ + raw_result = self._reimage_initial( + resource_group_name=resource_group_name, + vm_scale_set_name=vm_scale_set_name, + instance_id=instance_id, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + reimage.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/virtualmachines/{instanceId}/reimage'} + + + def _reimage_all_initial( + self, resource_group_name, vm_scale_set_name, instance_id, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.reimage_all.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), + 'instanceId': self._serialize.url("instance_id", instance_id, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + def reimage_all( + self, resource_group_name, vm_scale_set_name, instance_id, custom_headers=None, raw=False, polling=True, **operation_config): + """Allows you to re-image all the disks ( including data disks ) in the a + VM scale set instance. This operation is only supported for managed + disks. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param vm_scale_set_name: The name of the VM scale set. + :type vm_scale_set_name: str + :param instance_id: The instance ID of the virtual machine. + :type instance_id: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns None or + ClientRawResponse if raw==True + :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] + :raises: :class:`CloudError` + """ + raw_result = self._reimage_all_initial( + resource_group_name=resource_group_name, + vm_scale_set_name=vm_scale_set_name, + instance_id=instance_id, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + reimage_all.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/virtualmachines/{instanceId}/reimageall'} + + + def _deallocate_initial( + self, resource_group_name, vm_scale_set_name, instance_id, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.deallocate.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), + 'instanceId': self._serialize.url("instance_id", instance_id, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + def deallocate( + self, resource_group_name, vm_scale_set_name, instance_id, custom_headers=None, raw=False, polling=True, **operation_config): + """Deallocates a specific virtual machine in a VM scale set. Shuts down + the virtual machine and releases the compute resources it uses. You are + not billed for the compute resources of this virtual machine once it is + deallocated. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param vm_scale_set_name: The name of the VM scale set. + :type vm_scale_set_name: str + :param instance_id: The instance ID of the virtual machine. + :type instance_id: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns None or + ClientRawResponse if raw==True + :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] + :raises: :class:`CloudError` + """ + raw_result = self._deallocate_initial( + resource_group_name=resource_group_name, + vm_scale_set_name=vm_scale_set_name, + instance_id=instance_id, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + deallocate.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/virtualmachines/{instanceId}/deallocate'} + + + def _update_initial( + self, resource_group_name, vm_scale_set_name, instance_id, parameters, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.update.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), + 'instanceId': self._serialize.url("instance_id", instance_id, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(parameters, 'VirtualMachineScaleSetVM') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('VirtualMachineScaleSetVM', response) + if response.status_code == 202: + deserialized = self._deserialize('VirtualMachineScaleSetVM', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def update( + self, resource_group_name, vm_scale_set_name, instance_id, parameters, custom_headers=None, raw=False, polling=True, **operation_config): + """Updates a virtual machine of a VM scale set. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param vm_scale_set_name: The name of the VM scale set where the + extension should be create or updated. + :type vm_scale_set_name: str + :param instance_id: The instance ID of the virtual machine. + :type instance_id: str + :param parameters: Parameters supplied to the Update Virtual Machine + Scale Sets VM operation. + :type parameters: + ~azure.mgmt.compute.v2018_04_01.models.VirtualMachineScaleSetVM + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns + VirtualMachineScaleSetVM or + ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2018_04_01.models.VirtualMachineScaleSetVM] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2018_04_01.models.VirtualMachineScaleSetVM]] + :raises: :class:`CloudError` + """ + raw_result = self._update_initial( + resource_group_name=resource_group_name, + vm_scale_set_name=vm_scale_set_name, + instance_id=instance_id, + parameters=parameters, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('VirtualMachineScaleSetVM', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/virtualmachines/{instanceId}'} + + + def _delete_initial( + self, resource_group_name, vm_scale_set_name, instance_id, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.delete.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), + 'instanceId': self._serialize.url("instance_id", instance_id, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202, 204]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + def delete( + self, resource_group_name, vm_scale_set_name, instance_id, custom_headers=None, raw=False, polling=True, **operation_config): + """Deletes a virtual machine from a VM scale set. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param vm_scale_set_name: The name of the VM scale set. + :type vm_scale_set_name: str + :param instance_id: The instance ID of the virtual machine. + :type instance_id: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns None or + ClientRawResponse if raw==True + :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] + :raises: :class:`CloudError` + """ + raw_result = self._delete_initial( + resource_group_name=resource_group_name, + vm_scale_set_name=vm_scale_set_name, + instance_id=instance_id, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/virtualmachines/{instanceId}'} + + def get( + self, resource_group_name, vm_scale_set_name, instance_id, custom_headers=None, raw=False, **operation_config): + """Gets a virtual machine from a VM scale set. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param vm_scale_set_name: The name of the VM scale set. + :type vm_scale_set_name: str + :param instance_id: The instance ID of the virtual machine. + :type instance_id: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: VirtualMachineScaleSetVM or ClientRawResponse if raw=true + :rtype: + ~azure.mgmt.compute.v2018_04_01.models.VirtualMachineScaleSetVM or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), + 'instanceId': self._serialize.url("instance_id", instance_id, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('VirtualMachineScaleSetVM', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/virtualmachines/{instanceId}'} + + def get_instance_view( + self, resource_group_name, vm_scale_set_name, instance_id, custom_headers=None, raw=False, **operation_config): + """Gets the status of a virtual machine from a VM scale set. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param vm_scale_set_name: The name of the VM scale set. + :type vm_scale_set_name: str + :param instance_id: The instance ID of the virtual machine. + :type instance_id: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: VirtualMachineScaleSetVMInstanceView or ClientRawResponse if + raw=true + :rtype: + ~azure.mgmt.compute.v2018_04_01.models.VirtualMachineScaleSetVMInstanceView + or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get_instance_view.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), + 'instanceId': self._serialize.url("instance_id", instance_id, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('VirtualMachineScaleSetVMInstanceView', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_instance_view.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/virtualmachines/{instanceId}/instanceView'} + + def list( + self, resource_group_name, virtual_machine_scale_set_name, filter=None, select=None, expand=None, custom_headers=None, raw=False, **operation_config): + """Gets a list of all virtual machines in a VM scale sets. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param virtual_machine_scale_set_name: The name of the VM scale set. + :type virtual_machine_scale_set_name: str + :param filter: The filter to apply to the operation. + :type filter: str + :param select: The list parameters. + :type select: str + :param expand: The expand expression to apply to the operation. + :type expand: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of VirtualMachineScaleSetVM + :rtype: + ~azure.mgmt.compute.v2018_04_01.models.VirtualMachineScaleSetVMPaged[~azure.mgmt.compute.v2018_04_01.models.VirtualMachineScaleSetVM] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'virtualMachineScaleSetName': self._serialize.url("virtual_machine_scale_set_name", virtual_machine_scale_set_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + if filter is not None: + query_parameters['$filter'] = self._serialize.query("filter", filter, 'str') + if select is not None: + query_parameters['$select'] = self._serialize.query("select", select, 'str') + if expand is not None: + query_parameters['$expand'] = self._serialize.query("expand", expand, 'str') + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.VirtualMachineScaleSetVMPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{virtualMachineScaleSetName}/virtualMachines'} + + + def _power_off_initial( + self, resource_group_name, vm_scale_set_name, instance_id, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.power_off.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), + 'instanceId': self._serialize.url("instance_id", instance_id, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + def power_off( + self, resource_group_name, vm_scale_set_name, instance_id, custom_headers=None, raw=False, polling=True, **operation_config): + """Power off (stop) a virtual machine in a VM scale set. Note that + resources are still attached and you are getting charged for the + resources. Instead, use deallocate to release resources and avoid + charges. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param vm_scale_set_name: The name of the VM scale set. + :type vm_scale_set_name: str + :param instance_id: The instance ID of the virtual machine. + :type instance_id: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns None or + ClientRawResponse if raw==True + :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] + :raises: :class:`CloudError` + """ + raw_result = self._power_off_initial( + resource_group_name=resource_group_name, + vm_scale_set_name=vm_scale_set_name, + instance_id=instance_id, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + power_off.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/virtualmachines/{instanceId}/poweroff'} + + + def _restart_initial( + self, resource_group_name, vm_scale_set_name, instance_id, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.restart.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), + 'instanceId': self._serialize.url("instance_id", instance_id, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + def restart( + self, resource_group_name, vm_scale_set_name, instance_id, custom_headers=None, raw=False, polling=True, **operation_config): + """Restarts a virtual machine in a VM scale set. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param vm_scale_set_name: The name of the VM scale set. + :type vm_scale_set_name: str + :param instance_id: The instance ID of the virtual machine. + :type instance_id: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns None or + ClientRawResponse if raw==True + :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] + :raises: :class:`CloudError` + """ + raw_result = self._restart_initial( + resource_group_name=resource_group_name, + vm_scale_set_name=vm_scale_set_name, + instance_id=instance_id, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + restart.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/virtualmachines/{instanceId}/restart'} + + + def _start_initial( + self, resource_group_name, vm_scale_set_name, instance_id, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.start.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), + 'instanceId': self._serialize.url("instance_id", instance_id, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + def start( + self, resource_group_name, vm_scale_set_name, instance_id, custom_headers=None, raw=False, polling=True, **operation_config): + """Starts a virtual machine in a VM scale set. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param vm_scale_set_name: The name of the VM scale set. + :type vm_scale_set_name: str + :param instance_id: The instance ID of the virtual machine. + :type instance_id: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns None or + ClientRawResponse if raw==True + :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] + :raises: :class:`CloudError` + """ + raw_result = self._start_initial( + resource_group_name=resource_group_name, + vm_scale_set_name=vm_scale_set_name, + instance_id=instance_id, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + start.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/virtualmachines/{instanceId}/start'} + + + def _redeploy_initial( + self, resource_group_name, vm_scale_set_name, instance_id, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.redeploy.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), + 'instanceId': self._serialize.url("instance_id", instance_id, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + def redeploy( + self, resource_group_name, vm_scale_set_name, instance_id, custom_headers=None, raw=False, polling=True, **operation_config): + """Redeploys a virtual machine in a VM scale set. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param vm_scale_set_name: The name of the VM scale set. + :type vm_scale_set_name: str + :param instance_id: The instance ID of the virtual machine. + :type instance_id: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns None or + ClientRawResponse if raw==True + :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] + :raises: :class:`CloudError` + """ + raw_result = self._redeploy_initial( + resource_group_name=resource_group_name, + vm_scale_set_name=vm_scale_set_name, + instance_id=instance_id, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + redeploy.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/virtualmachines/{instanceId}/redeploy'} + + + def _perform_maintenance_initial( + self, resource_group_name, vm_scale_set_name, instance_id, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.perform_maintenance.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), + 'instanceId': self._serialize.url("instance_id", instance_id, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + def perform_maintenance( + self, resource_group_name, vm_scale_set_name, instance_id, custom_headers=None, raw=False, polling=True, **operation_config): + """Performs maintenance on a virtual machine in a VM scale set. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param vm_scale_set_name: The name of the VM scale set. + :type vm_scale_set_name: str + :param instance_id: The instance ID of the virtual machine. + :type instance_id: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns None or + ClientRawResponse if raw==True + :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] + :raises: :class:`CloudError` + """ + raw_result = self._perform_maintenance_initial( + resource_group_name=resource_group_name, + vm_scale_set_name=vm_scale_set_name, + instance_id=instance_id, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + perform_maintenance.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/virtualmachines/{instanceId}/performMaintenance'} + + + def _run_command_initial( + self, resource_group_name, vm_scale_set_name, instance_id, parameters, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.run_command.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), + 'instanceId': self._serialize.url("instance_id", instance_id, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(parameters, 'RunCommandInput') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('RunCommandResult', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def run_command( + self, resource_group_name, vm_scale_set_name, instance_id, parameters, custom_headers=None, raw=False, polling=True, **operation_config): + """Run command on a virtual machine in a VM scale set. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param vm_scale_set_name: The name of the VM scale set. + :type vm_scale_set_name: str + :param instance_id: The instance ID of the virtual machine. + :type instance_id: str + :param parameters: Parameters supplied to the Run command operation. + :type parameters: + ~azure.mgmt.compute.v2018_04_01.models.RunCommandInput + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns RunCommandResult or + ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2018_04_01.models.RunCommandResult] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2018_04_01.models.RunCommandResult]] + :raises: :class:`CloudError` + """ + raw_result = self._run_command_initial( + resource_group_name=resource_group_name, + vm_scale_set_name=vm_scale_set_name, + instance_id=instance_id, + parameters=parameters, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('RunCommandResult', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + run_command.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/virtualmachines/{instanceId}/runCommand'} diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/operations/_virtual_machine_scale_sets_operations.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/operations/_virtual_machine_scale_sets_operations.py new file mode 100644 index 000000000000..5de0ed843e32 --- /dev/null +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/operations/_virtual_machine_scale_sets_operations.py @@ -0,0 +1,1757 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse +from msrestazure.azure_exceptions import CloudError +from msrest.polling import LROPoller, NoPolling +from msrestazure.polling.arm_polling import ARMPolling + +from .. import models + + +class VirtualMachineScaleSetsOperations(object): + """VirtualMachineScaleSetsOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: Client Api Version. Constant value: "2018-04-01". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2018-04-01" + + self.config = config + + + def _create_or_update_initial( + self, resource_group_name, vm_scale_set_name, parameters, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.create_or_update.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(parameters, 'VirtualMachineScaleSet') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 201]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('VirtualMachineScaleSet', response) + if response.status_code == 201: + deserialized = self._deserialize('VirtualMachineScaleSet', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def create_or_update( + self, resource_group_name, vm_scale_set_name, parameters, custom_headers=None, raw=False, polling=True, **operation_config): + """Create or update a VM scale set. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param vm_scale_set_name: The name of the VM scale set to create or + update. + :type vm_scale_set_name: str + :param parameters: The scale set object. + :type parameters: + ~azure.mgmt.compute.v2018_04_01.models.VirtualMachineScaleSet + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns VirtualMachineScaleSet + or ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2018_04_01.models.VirtualMachineScaleSet] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2018_04_01.models.VirtualMachineScaleSet]] + :raises: :class:`CloudError` + """ + raw_result = self._create_or_update_initial( + resource_group_name=resource_group_name, + vm_scale_set_name=vm_scale_set_name, + parameters=parameters, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('VirtualMachineScaleSet', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}'} + + + def _update_initial( + self, resource_group_name, vm_scale_set_name, parameters, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.update.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(parameters, 'VirtualMachineScaleSetUpdate') + + # Construct and send request + request = self._client.patch(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('VirtualMachineScaleSet', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def update( + self, resource_group_name, vm_scale_set_name, parameters, custom_headers=None, raw=False, polling=True, **operation_config): + """Update a VM scale set. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param vm_scale_set_name: The name of the VM scale set to create or + update. + :type vm_scale_set_name: str + :param parameters: The scale set object. + :type parameters: + ~azure.mgmt.compute.v2018_04_01.models.VirtualMachineScaleSetUpdate + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns VirtualMachineScaleSet + or ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2018_04_01.models.VirtualMachineScaleSet] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2018_04_01.models.VirtualMachineScaleSet]] + :raises: :class:`CloudError` + """ + raw_result = self._update_initial( + resource_group_name=resource_group_name, + vm_scale_set_name=vm_scale_set_name, + parameters=parameters, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('VirtualMachineScaleSet', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}'} + + + def _delete_initial( + self, resource_group_name, vm_scale_set_name, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.delete.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202, 204]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + def delete( + self, resource_group_name, vm_scale_set_name, custom_headers=None, raw=False, polling=True, **operation_config): + """Deletes a VM scale set. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param vm_scale_set_name: The name of the VM scale set. + :type vm_scale_set_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns None or + ClientRawResponse if raw==True + :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] + :raises: :class:`CloudError` + """ + raw_result = self._delete_initial( + resource_group_name=resource_group_name, + vm_scale_set_name=vm_scale_set_name, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}'} + + def get( + self, resource_group_name, vm_scale_set_name, custom_headers=None, raw=False, **operation_config): + """Display information about a virtual machine scale set. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param vm_scale_set_name: The name of the VM scale set. + :type vm_scale_set_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: VirtualMachineScaleSet or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.compute.v2018_04_01.models.VirtualMachineScaleSet + or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('VirtualMachineScaleSet', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}'} + + + def _deallocate_initial( + self, resource_group_name, vm_scale_set_name, instance_ids=None, custom_headers=None, raw=False, **operation_config): + vm_instance_ids = None + if instance_ids is not None: + vm_instance_ids = models.VirtualMachineScaleSetVMInstanceIDs(instance_ids=instance_ids) + + # Construct URL + url = self.deallocate.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + if vm_instance_ids is not None: + body_content = self._serialize.body(vm_instance_ids, 'VirtualMachineScaleSetVMInstanceIDs') + else: + body_content = None + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + def deallocate( + self, resource_group_name, vm_scale_set_name, instance_ids=None, custom_headers=None, raw=False, polling=True, **operation_config): + """Deallocates specific virtual machines in a VM scale set. Shuts down the + virtual machines and releases the compute resources. You are not billed + for the compute resources that this virtual machine scale set + deallocates. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param vm_scale_set_name: The name of the VM scale set. + :type vm_scale_set_name: str + :param instance_ids: The virtual machine scale set instance ids. + Omitting the virtual machine scale set instance ids will result in the + operation being performed on all virtual machines in the virtual + machine scale set. + :type instance_ids: list[str] + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns None or + ClientRawResponse if raw==True + :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] + :raises: :class:`CloudError` + """ + raw_result = self._deallocate_initial( + resource_group_name=resource_group_name, + vm_scale_set_name=vm_scale_set_name, + instance_ids=instance_ids, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + deallocate.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/deallocate'} + + + def _delete_instances_initial( + self, resource_group_name, vm_scale_set_name, instance_ids, custom_headers=None, raw=False, **operation_config): + vm_instance_ids = models.VirtualMachineScaleSetVMInstanceRequiredIDs(instance_ids=instance_ids) + + # Construct URL + url = self.delete_instances.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(vm_instance_ids, 'VirtualMachineScaleSetVMInstanceRequiredIDs') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + def delete_instances( + self, resource_group_name, vm_scale_set_name, instance_ids, custom_headers=None, raw=False, polling=True, **operation_config): + """Deletes virtual machines in a VM scale set. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param vm_scale_set_name: The name of the VM scale set. + :type vm_scale_set_name: str + :param instance_ids: The virtual machine scale set instance ids. + :type instance_ids: list[str] + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns None or + ClientRawResponse if raw==True + :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] + :raises: :class:`CloudError` + """ + raw_result = self._delete_instances_initial( + resource_group_name=resource_group_name, + vm_scale_set_name=vm_scale_set_name, + instance_ids=instance_ids, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + delete_instances.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/delete'} + + def get_instance_view( + self, resource_group_name, vm_scale_set_name, custom_headers=None, raw=False, **operation_config): + """Gets the status of a VM scale set instance. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param vm_scale_set_name: The name of the VM scale set. + :type vm_scale_set_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: VirtualMachineScaleSetInstanceView or ClientRawResponse if + raw=true + :rtype: + ~azure.mgmt.compute.v2018_04_01.models.VirtualMachineScaleSetInstanceView + or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get_instance_view.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('VirtualMachineScaleSetInstanceView', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_instance_view.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/instanceView'} + + def list( + self, resource_group_name, custom_headers=None, raw=False, **operation_config): + """Gets a list of all VM scale sets under a resource group. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of VirtualMachineScaleSet + :rtype: + ~azure.mgmt.compute.v2018_04_01.models.VirtualMachineScaleSetPaged[~azure.mgmt.compute.v2018_04_01.models.VirtualMachineScaleSet] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.VirtualMachineScaleSetPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets'} + + def list_all( + self, custom_headers=None, raw=False, **operation_config): + """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. + + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of VirtualMachineScaleSet + :rtype: + ~azure.mgmt.compute.v2018_04_01.models.VirtualMachineScaleSetPaged[~azure.mgmt.compute.v2018_04_01.models.VirtualMachineScaleSet] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_all.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.VirtualMachineScaleSetPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_all.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Compute/virtualMachineScaleSets'} + + def list_skus( + self, resource_group_name, vm_scale_set_name, custom_headers=None, raw=False, **operation_config): + """Gets a list of SKUs available for your VM scale set, including the + minimum and maximum VM instances allowed for each SKU. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param vm_scale_set_name: The name of the VM scale set. + :type vm_scale_set_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of VirtualMachineScaleSetSku + :rtype: + ~azure.mgmt.compute.v2018_04_01.models.VirtualMachineScaleSetSkuPaged[~azure.mgmt.compute.v2018_04_01.models.VirtualMachineScaleSetSku] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_skus.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.VirtualMachineScaleSetSkuPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_skus.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/skus'} + + def get_os_upgrade_history( + self, resource_group_name, vm_scale_set_name, custom_headers=None, raw=False, **operation_config): + """Gets list of OS upgrades on a VM scale set instance. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param vm_scale_set_name: The name of the VM scale set. + :type vm_scale_set_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of + UpgradeOperationHistoricalStatusInfo + :rtype: + ~azure.mgmt.compute.v2018_04_01.models.UpgradeOperationHistoricalStatusInfoPaged[~azure.mgmt.compute.v2018_04_01.models.UpgradeOperationHistoricalStatusInfo] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.get_os_upgrade_history.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.UpgradeOperationHistoricalStatusInfoPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + get_os_upgrade_history.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/osUpgradeHistory'} + + + def _power_off_initial( + self, resource_group_name, vm_scale_set_name, instance_ids=None, custom_headers=None, raw=False, **operation_config): + vm_instance_ids = None + if instance_ids is not None: + vm_instance_ids = models.VirtualMachineScaleSetVMInstanceIDs(instance_ids=instance_ids) + + # Construct URL + url = self.power_off.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + if vm_instance_ids is not None: + body_content = self._serialize.body(vm_instance_ids, 'VirtualMachineScaleSetVMInstanceIDs') + else: + body_content = None + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + def power_off( + self, resource_group_name, vm_scale_set_name, instance_ids=None, custom_headers=None, raw=False, polling=True, **operation_config): + """Power off (stop) one or more virtual machines in a VM scale set. Note + that resources are still attached and you are getting charged for the + resources. Instead, use deallocate to release resources and avoid + charges. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param vm_scale_set_name: The name of the VM scale set. + :type vm_scale_set_name: str + :param instance_ids: The virtual machine scale set instance ids. + Omitting the virtual machine scale set instance ids will result in the + operation being performed on all virtual machines in the virtual + machine scale set. + :type instance_ids: list[str] + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns None or + ClientRawResponse if raw==True + :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] + :raises: :class:`CloudError` + """ + raw_result = self._power_off_initial( + resource_group_name=resource_group_name, + vm_scale_set_name=vm_scale_set_name, + instance_ids=instance_ids, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + power_off.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/poweroff'} + + + def _restart_initial( + self, resource_group_name, vm_scale_set_name, instance_ids=None, custom_headers=None, raw=False, **operation_config): + vm_instance_ids = None + if instance_ids is not None: + vm_instance_ids = models.VirtualMachineScaleSetVMInstanceIDs(instance_ids=instance_ids) + + # Construct URL + url = self.restart.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + if vm_instance_ids is not None: + body_content = self._serialize.body(vm_instance_ids, 'VirtualMachineScaleSetVMInstanceIDs') + else: + body_content = None + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + def restart( + self, resource_group_name, vm_scale_set_name, instance_ids=None, custom_headers=None, raw=False, polling=True, **operation_config): + """Restarts one or more virtual machines in a VM scale set. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param vm_scale_set_name: The name of the VM scale set. + :type vm_scale_set_name: str + :param instance_ids: The virtual machine scale set instance ids. + Omitting the virtual machine scale set instance ids will result in the + operation being performed on all virtual machines in the virtual + machine scale set. + :type instance_ids: list[str] + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns None or + ClientRawResponse if raw==True + :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] + :raises: :class:`CloudError` + """ + raw_result = self._restart_initial( + resource_group_name=resource_group_name, + vm_scale_set_name=vm_scale_set_name, + instance_ids=instance_ids, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + restart.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/restart'} + + + def _start_initial( + self, resource_group_name, vm_scale_set_name, instance_ids=None, custom_headers=None, raw=False, **operation_config): + vm_instance_ids = None + if instance_ids is not None: + vm_instance_ids = models.VirtualMachineScaleSetVMInstanceIDs(instance_ids=instance_ids) + + # Construct URL + url = self.start.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + if vm_instance_ids is not None: + body_content = self._serialize.body(vm_instance_ids, 'VirtualMachineScaleSetVMInstanceIDs') + else: + body_content = None + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + def start( + self, resource_group_name, vm_scale_set_name, instance_ids=None, custom_headers=None, raw=False, polling=True, **operation_config): + """Starts one or more virtual machines in a VM scale set. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param vm_scale_set_name: The name of the VM scale set. + :type vm_scale_set_name: str + :param instance_ids: The virtual machine scale set instance ids. + Omitting the virtual machine scale set instance ids will result in the + operation being performed on all virtual machines in the virtual + machine scale set. + :type instance_ids: list[str] + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns None or + ClientRawResponse if raw==True + :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] + :raises: :class:`CloudError` + """ + raw_result = self._start_initial( + resource_group_name=resource_group_name, + vm_scale_set_name=vm_scale_set_name, + instance_ids=instance_ids, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + start.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/start'} + + + def _redeploy_initial( + self, resource_group_name, vm_scale_set_name, instance_ids=None, custom_headers=None, raw=False, **operation_config): + vm_instance_ids = None + if instance_ids is not None: + vm_instance_ids = models.VirtualMachineScaleSetVMInstanceIDs(instance_ids=instance_ids) + + # Construct URL + url = self.redeploy.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + if vm_instance_ids is not None: + body_content = self._serialize.body(vm_instance_ids, 'VirtualMachineScaleSetVMInstanceIDs') + else: + body_content = None + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + def redeploy( + self, resource_group_name, vm_scale_set_name, instance_ids=None, custom_headers=None, raw=False, polling=True, **operation_config): + """Redeploy one or more virtual machines in a VM scale set. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param vm_scale_set_name: The name of the VM scale set. + :type vm_scale_set_name: str + :param instance_ids: The virtual machine scale set instance ids. + Omitting the virtual machine scale set instance ids will result in the + operation being performed on all virtual machines in the virtual + machine scale set. + :type instance_ids: list[str] + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns None or + ClientRawResponse if raw==True + :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] + :raises: :class:`CloudError` + """ + raw_result = self._redeploy_initial( + resource_group_name=resource_group_name, + vm_scale_set_name=vm_scale_set_name, + instance_ids=instance_ids, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + redeploy.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/redeploy'} + + + def _perform_maintenance_initial( + self, resource_group_name, vm_scale_set_name, instance_ids=None, custom_headers=None, raw=False, **operation_config): + vm_instance_ids = None + if instance_ids is not None: + vm_instance_ids = models.VirtualMachineScaleSetVMInstanceIDs(instance_ids=instance_ids) + + # Construct URL + url = self.perform_maintenance.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + if vm_instance_ids is not None: + body_content = self._serialize.body(vm_instance_ids, 'VirtualMachineScaleSetVMInstanceIDs') + else: + body_content = None + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + def perform_maintenance( + self, resource_group_name, vm_scale_set_name, instance_ids=None, custom_headers=None, raw=False, polling=True, **operation_config): + """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. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param vm_scale_set_name: The name of the VM scale set. + :type vm_scale_set_name: str + :param instance_ids: The virtual machine scale set instance ids. + Omitting the virtual machine scale set instance ids will result in the + operation being performed on all virtual machines in the virtual + machine scale set. + :type instance_ids: list[str] + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns None or + ClientRawResponse if raw==True + :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] + :raises: :class:`CloudError` + """ + raw_result = self._perform_maintenance_initial( + resource_group_name=resource_group_name, + vm_scale_set_name=vm_scale_set_name, + instance_ids=instance_ids, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + perform_maintenance.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/performMaintenance'} + + + def _update_instances_initial( + self, resource_group_name, vm_scale_set_name, instance_ids, custom_headers=None, raw=False, **operation_config): + vm_instance_ids = models.VirtualMachineScaleSetVMInstanceRequiredIDs(instance_ids=instance_ids) + + # Construct URL + url = self.update_instances.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(vm_instance_ids, 'VirtualMachineScaleSetVMInstanceRequiredIDs') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + def update_instances( + self, resource_group_name, vm_scale_set_name, instance_ids, custom_headers=None, raw=False, polling=True, **operation_config): + """Upgrades one or more virtual machines to the latest SKU set in the VM + scale set model. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param vm_scale_set_name: The name of the VM scale set. + :type vm_scale_set_name: str + :param instance_ids: The virtual machine scale set instance ids. + :type instance_ids: list[str] + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns None or + ClientRawResponse if raw==True + :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] + :raises: :class:`CloudError` + """ + raw_result = self._update_instances_initial( + resource_group_name=resource_group_name, + vm_scale_set_name=vm_scale_set_name, + instance_ids=instance_ids, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + update_instances.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/manualupgrade'} + + + def _reimage_initial( + self, resource_group_name, vm_scale_set_name, instance_ids=None, custom_headers=None, raw=False, **operation_config): + vm_instance_ids = None + if instance_ids is not None: + vm_instance_ids = models.VirtualMachineScaleSetVMInstanceIDs(instance_ids=instance_ids) + + # Construct URL + url = self.reimage.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + if vm_instance_ids is not None: + body_content = self._serialize.body(vm_instance_ids, 'VirtualMachineScaleSetVMInstanceIDs') + else: + body_content = None + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + def reimage( + self, resource_group_name, vm_scale_set_name, instance_ids=None, custom_headers=None, raw=False, polling=True, **operation_config): + """Reimages (upgrade the operating system) one or more virtual machines in + a VM scale set. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param vm_scale_set_name: The name of the VM scale set. + :type vm_scale_set_name: str + :param instance_ids: The virtual machine scale set instance ids. + Omitting the virtual machine scale set instance ids will result in the + operation being performed on all virtual machines in the virtual + machine scale set. + :type instance_ids: list[str] + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns None or + ClientRawResponse if raw==True + :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] + :raises: :class:`CloudError` + """ + raw_result = self._reimage_initial( + resource_group_name=resource_group_name, + vm_scale_set_name=vm_scale_set_name, + instance_ids=instance_ids, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + reimage.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/reimage'} + + + def _reimage_all_initial( + self, resource_group_name, vm_scale_set_name, instance_ids=None, custom_headers=None, raw=False, **operation_config): + vm_instance_ids = None + if instance_ids is not None: + vm_instance_ids = models.VirtualMachineScaleSetVMInstanceIDs(instance_ids=instance_ids) + + # Construct URL + url = self.reimage_all.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + if vm_instance_ids is not None: + body_content = self._serialize.body(vm_instance_ids, 'VirtualMachineScaleSetVMInstanceIDs') + else: + body_content = None + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + def reimage_all( + self, resource_group_name, vm_scale_set_name, instance_ids=None, custom_headers=None, raw=False, polling=True, **operation_config): + """Reimages all the disks ( including data disks ) in the virtual machines + in a VM scale set. This operation is only supported for managed disks. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param vm_scale_set_name: The name of the VM scale set. + :type vm_scale_set_name: str + :param instance_ids: The virtual machine scale set instance ids. + Omitting the virtual machine scale set instance ids will result in the + operation being performed on all virtual machines in the virtual + machine scale set. + :type instance_ids: list[str] + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns None or + ClientRawResponse if raw==True + :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] + :raises: :class:`CloudError` + """ + raw_result = self._reimage_all_initial( + resource_group_name=resource_group_name, + vm_scale_set_name=vm_scale_set_name, + instance_ids=instance_ids, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + reimage_all.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/reimageall'} + + def force_recovery_service_fabric_platform_update_domain_walk( + self, resource_group_name, vm_scale_set_name, platform_update_domain, custom_headers=None, raw=False, **operation_config): + """Manual platform update domain walk to update virtual machines in a + service fabric virtual machine scale set. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param vm_scale_set_name: The name of the VM scale set. + :type vm_scale_set_name: str + :param platform_update_domain: The platform update domain for which a + manual recovery walk is requested + :type platform_update_domain: int + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: RecoveryWalkResponse or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.compute.v2018_04_01.models.RecoveryWalkResponse or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.force_recovery_service_fabric_platform_update_domain_walk.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + query_parameters['platformUpdateDomain'] = self._serialize.query("platform_update_domain", platform_update_domain, 'int') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('RecoveryWalkResponse', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + force_recovery_service_fabric_platform_update_domain_walk.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/forceRecoveryServiceFabricPlatformUpdateDomainWalk'} diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/operations/_virtual_machine_sizes_operations.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/operations/_virtual_machine_sizes_operations.py new file mode 100644 index 000000000000..bd74d4062626 --- /dev/null +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/operations/_virtual_machine_sizes_operations.py @@ -0,0 +1,111 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse +from msrestazure.azure_exceptions import CloudError + +from .. import models + + +class VirtualMachineSizesOperations(object): + """VirtualMachineSizesOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: Client Api Version. Constant value: "2018-04-01". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2018-04-01" + + self.config = config + + def list( + self, location, custom_headers=None, raw=False, **operation_config): + """Lists all available virtual machine sizes for a subscription in a + location. + + :param location: The location upon which virtual-machine-sizes is + queried. + :type location: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of VirtualMachineSize + :rtype: + ~azure.mgmt.compute.v2018_04_01.models.VirtualMachineSizePaged[~azure.mgmt.compute.v2018_04_01.models.VirtualMachineSize] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list.metadata['url'] + path_format_arguments = { + 'location': self._serialize.url("location", location, 'str', pattern=r'^[-\w\._]+$'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.VirtualMachineSizePaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/vmSizes'} diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/operations/_virtual_machines_operations.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/operations/_virtual_machines_operations.py new file mode 100644 index 000000000000..c06df8e43f5b --- /dev/null +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/operations/_virtual_machines_operations.py @@ -0,0 +1,1559 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse +from msrestazure.azure_exceptions import CloudError +from msrest.polling import LROPoller, NoPolling +from msrestazure.polling.arm_polling import ARMPolling + +from .. import models + + +class VirtualMachinesOperations(object): + """VirtualMachinesOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: Client Api Version. Constant value: "2018-04-01". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2018-04-01" + + self.config = config + + def list_by_location( + self, location, custom_headers=None, raw=False, **operation_config): + """Gets all the virtual machines under the specified subscription for the + specified location. + + :param location: The location for which virtual machines under the + subscription are queried. + :type location: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of VirtualMachine + :rtype: + ~azure.mgmt.compute.v2018_04_01.models.VirtualMachinePaged[~azure.mgmt.compute.v2018_04_01.models.VirtualMachine] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_by_location.metadata['url'] + path_format_arguments = { + 'location': self._serialize.url("location", location, 'str', pattern=r'^[-\w\._]+$'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.VirtualMachinePaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_by_location.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/virtualMachines'} + + + def _capture_initial( + self, resource_group_name, vm_name, parameters, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.capture.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vmName': self._serialize.url("vm_name", vm_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(parameters, 'VirtualMachineCaptureParameters') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('VirtualMachineCaptureResult', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def capture( + self, resource_group_name, vm_name, parameters, custom_headers=None, raw=False, polling=True, **operation_config): + """Captures the VM by copying virtual hard disks of the VM and outputs a + template that can be used to create similar VMs. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param vm_name: The name of the virtual machine. + :type vm_name: str + :param parameters: Parameters supplied to the Capture Virtual Machine + operation. + :type parameters: + ~azure.mgmt.compute.v2018_04_01.models.VirtualMachineCaptureParameters + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns + VirtualMachineCaptureResult or + ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2018_04_01.models.VirtualMachineCaptureResult] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2018_04_01.models.VirtualMachineCaptureResult]] + :raises: :class:`CloudError` + """ + raw_result = self._capture_initial( + resource_group_name=resource_group_name, + vm_name=vm_name, + parameters=parameters, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('VirtualMachineCaptureResult', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + capture.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/capture'} + + + def _create_or_update_initial( + self, resource_group_name, vm_name, parameters, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.create_or_update.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vmName': self._serialize.url("vm_name", vm_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(parameters, 'VirtualMachine') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 201]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('VirtualMachine', response) + if response.status_code == 201: + deserialized = self._deserialize('VirtualMachine', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def create_or_update( + self, resource_group_name, vm_name, parameters, custom_headers=None, raw=False, polling=True, **operation_config): + """The operation to create or update a virtual machine. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param vm_name: The name of the virtual machine. + :type vm_name: str + :param parameters: Parameters supplied to the Create Virtual Machine + operation. + :type parameters: + ~azure.mgmt.compute.v2018_04_01.models.VirtualMachine + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns VirtualMachine or + ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2018_04_01.models.VirtualMachine] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2018_04_01.models.VirtualMachine]] + :raises: :class:`CloudError` + """ + raw_result = self._create_or_update_initial( + resource_group_name=resource_group_name, + vm_name=vm_name, + parameters=parameters, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('VirtualMachine', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}'} + + + def _update_initial( + self, resource_group_name, vm_name, parameters, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.update.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vmName': self._serialize.url("vm_name", vm_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(parameters, 'VirtualMachineUpdate') + + # Construct and send request + request = self._client.patch(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 201]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('VirtualMachine', response) + if response.status_code == 201: + deserialized = self._deserialize('VirtualMachine', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def update( + self, resource_group_name, vm_name, parameters, custom_headers=None, raw=False, polling=True, **operation_config): + """The operation to update a virtual machine. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param vm_name: The name of the virtual machine. + :type vm_name: str + :param parameters: Parameters supplied to the Update Virtual Machine + operation. + :type parameters: + ~azure.mgmt.compute.v2018_04_01.models.VirtualMachineUpdate + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns VirtualMachine or + ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2018_04_01.models.VirtualMachine] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2018_04_01.models.VirtualMachine]] + :raises: :class:`CloudError` + """ + raw_result = self._update_initial( + resource_group_name=resource_group_name, + vm_name=vm_name, + parameters=parameters, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('VirtualMachine', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}'} + + + def _delete_initial( + self, resource_group_name, vm_name, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.delete.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vmName': self._serialize.url("vm_name", vm_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202, 204]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + def delete( + self, resource_group_name, vm_name, custom_headers=None, raw=False, polling=True, **operation_config): + """The operation to delete a virtual machine. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param vm_name: The name of the virtual machine. + :type vm_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns None or + ClientRawResponse if raw==True + :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] + :raises: :class:`CloudError` + """ + raw_result = self._delete_initial( + resource_group_name=resource_group_name, + vm_name=vm_name, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}'} + + def get( + self, resource_group_name, vm_name, expand=None, custom_headers=None, raw=False, **operation_config): + """Retrieves information about the model view or the instance view of a + virtual machine. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param vm_name: The name of the virtual machine. + :type vm_name: str + :param expand: The expand expression to apply on the operation. + Possible values include: 'instanceView' + :type expand: str or + ~azure.mgmt.compute.v2018_04_01.models.InstanceViewTypes + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: VirtualMachine or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.compute.v2018_04_01.models.VirtualMachine or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vmName': self._serialize.url("vm_name", vm_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + if expand is not None: + query_parameters['$expand'] = self._serialize.query("expand", expand, 'InstanceViewTypes') + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('VirtualMachine', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}'} + + def instance_view( + self, resource_group_name, vm_name, custom_headers=None, raw=False, **operation_config): + """Retrieves information about the run-time state of a virtual machine. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param vm_name: The name of the virtual machine. + :type vm_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: VirtualMachineInstanceView or ClientRawResponse if raw=true + :rtype: + ~azure.mgmt.compute.v2018_04_01.models.VirtualMachineInstanceView or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.instance_view.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vmName': self._serialize.url("vm_name", vm_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('VirtualMachineInstanceView', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + instance_view.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/instanceView'} + + + def _convert_to_managed_disks_initial( + self, resource_group_name, vm_name, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.convert_to_managed_disks.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vmName': self._serialize.url("vm_name", vm_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + def convert_to_managed_disks( + self, resource_group_name, vm_name, custom_headers=None, raw=False, polling=True, **operation_config): + """Converts virtual machine disks from blob-based to managed disks. + Virtual machine must be stop-deallocated before invoking this + operation. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param vm_name: The name of the virtual machine. + :type vm_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns None or + ClientRawResponse if raw==True + :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] + :raises: :class:`CloudError` + """ + raw_result = self._convert_to_managed_disks_initial( + resource_group_name=resource_group_name, + vm_name=vm_name, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + convert_to_managed_disks.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/convertToManagedDisks'} + + + def _deallocate_initial( + self, resource_group_name, vm_name, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.deallocate.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vmName': self._serialize.url("vm_name", vm_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + def deallocate( + self, resource_group_name, vm_name, custom_headers=None, raw=False, polling=True, **operation_config): + """Shuts down the virtual machine and releases the compute resources. You + are not billed for the compute resources that this virtual machine + uses. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param vm_name: The name of the virtual machine. + :type vm_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns None or + ClientRawResponse if raw==True + :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] + :raises: :class:`CloudError` + """ + raw_result = self._deallocate_initial( + resource_group_name=resource_group_name, + vm_name=vm_name, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + deallocate.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/deallocate'} + + def generalize( + self, resource_group_name, vm_name, custom_headers=None, raw=False, **operation_config): + """Sets the state of the virtual machine to generalized. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param vm_name: The name of the virtual machine. + :type vm_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.generalize.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vmName': self._serialize.url("vm_name", vm_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + generalize.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/generalize'} + + def list( + self, resource_group_name, custom_headers=None, raw=False, **operation_config): + """Lists all of the virtual machines in the specified resource group. Use + the nextLink property in the response to get the next page of virtual + machines. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of VirtualMachine + :rtype: + ~azure.mgmt.compute.v2018_04_01.models.VirtualMachinePaged[~azure.mgmt.compute.v2018_04_01.models.VirtualMachine] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.VirtualMachinePaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines'} + + def list_all( + self, custom_headers=None, raw=False, **operation_config): + """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. + + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of VirtualMachine + :rtype: + ~azure.mgmt.compute.v2018_04_01.models.VirtualMachinePaged[~azure.mgmt.compute.v2018_04_01.models.VirtualMachine] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_all.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.VirtualMachinePaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_all.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Compute/virtualMachines'} + + def list_available_sizes( + self, resource_group_name, vm_name, custom_headers=None, raw=False, **operation_config): + """Lists all available virtual machine sizes to which the specified + virtual machine can be resized. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param vm_name: The name of the virtual machine. + :type vm_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of VirtualMachineSize + :rtype: + ~azure.mgmt.compute.v2018_04_01.models.VirtualMachineSizePaged[~azure.mgmt.compute.v2018_04_01.models.VirtualMachineSize] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_available_sizes.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vmName': self._serialize.url("vm_name", vm_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.VirtualMachineSizePaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_available_sizes.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/vmSizes'} + + + def _power_off_initial( + self, resource_group_name, vm_name, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.power_off.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vmName': self._serialize.url("vm_name", vm_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + def power_off( + self, resource_group_name, vm_name, custom_headers=None, raw=False, polling=True, **operation_config): + """The operation to power off (stop) a virtual machine. The virtual + machine can be restarted with the same provisioned resources. You are + still charged for this virtual machine. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param vm_name: The name of the virtual machine. + :type vm_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns None or + ClientRawResponse if raw==True + :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] + :raises: :class:`CloudError` + """ + raw_result = self._power_off_initial( + resource_group_name=resource_group_name, + vm_name=vm_name, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + power_off.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/powerOff'} + + + def _restart_initial( + self, resource_group_name, vm_name, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.restart.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vmName': self._serialize.url("vm_name", vm_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + def restart( + self, resource_group_name, vm_name, custom_headers=None, raw=False, polling=True, **operation_config): + """The operation to restart a virtual machine. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param vm_name: The name of the virtual machine. + :type vm_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns None or + ClientRawResponse if raw==True + :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] + :raises: :class:`CloudError` + """ + raw_result = self._restart_initial( + resource_group_name=resource_group_name, + vm_name=vm_name, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + restart.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/restart'} + + + def _start_initial( + self, resource_group_name, vm_name, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.start.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vmName': self._serialize.url("vm_name", vm_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + def start( + self, resource_group_name, vm_name, custom_headers=None, raw=False, polling=True, **operation_config): + """The operation to start a virtual machine. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param vm_name: The name of the virtual machine. + :type vm_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns None or + ClientRawResponse if raw==True + :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] + :raises: :class:`CloudError` + """ + raw_result = self._start_initial( + resource_group_name=resource_group_name, + vm_name=vm_name, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + start.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/start'} + + + def _redeploy_initial( + self, resource_group_name, vm_name, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.redeploy.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vmName': self._serialize.url("vm_name", vm_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + def redeploy( + self, resource_group_name, vm_name, custom_headers=None, raw=False, polling=True, **operation_config): + """The operation to redeploy a virtual machine. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param vm_name: The name of the virtual machine. + :type vm_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns None or + ClientRawResponse if raw==True + :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] + :raises: :class:`CloudError` + """ + raw_result = self._redeploy_initial( + resource_group_name=resource_group_name, + vm_name=vm_name, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + redeploy.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/redeploy'} + + + def _perform_maintenance_initial( + self, resource_group_name, vm_name, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.perform_maintenance.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vmName': self._serialize.url("vm_name", vm_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + def perform_maintenance( + self, resource_group_name, vm_name, custom_headers=None, raw=False, polling=True, **operation_config): + """The operation to perform maintenance on a virtual machine. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param vm_name: The name of the virtual machine. + :type vm_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns None or + ClientRawResponse if raw==True + :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] + :raises: :class:`CloudError` + """ + raw_result = self._perform_maintenance_initial( + resource_group_name=resource_group_name, + vm_name=vm_name, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + perform_maintenance.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/performMaintenance'} + + + def _run_command_initial( + self, resource_group_name, vm_name, parameters, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.run_command.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vmName': self._serialize.url("vm_name", vm_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(parameters, 'RunCommandInput') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('RunCommandResult', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def run_command( + self, resource_group_name, vm_name, parameters, custom_headers=None, raw=False, polling=True, **operation_config): + """Run command on the VM. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param vm_name: The name of the virtual machine. + :type vm_name: str + :param parameters: Parameters supplied to the Run command operation. + :type parameters: + ~azure.mgmt.compute.v2018_04_01.models.RunCommandInput + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns RunCommandResult or + ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2018_04_01.models.RunCommandResult] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2018_04_01.models.RunCommandResult]] + :raises: :class:`CloudError` + """ + raw_result = self._run_command_initial( + resource_group_name=resource_group_name, + vm_name=vm_name, + parameters=parameters, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('RunCommandResult', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + run_command.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/runCommand'} diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/operations/availability_sets_operations.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/operations/availability_sets_operations.py deleted file mode 100644 index 8b4cdc61f273..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/operations/availability_sets_operations.py +++ /dev/null @@ -1,495 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError - -from .. import models - - -class AvailabilitySetsOperations(object): - """AvailabilitySetsOperations operations. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: Client Api Version. Constant value: "2018-04-01". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2018-04-01" - - self.config = config - - def create_or_update( - self, resource_group_name, availability_set_name, parameters, custom_headers=None, raw=False, **operation_config): - """Create or update an availability set. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param availability_set_name: The name of the availability set. - :type availability_set_name: str - :param parameters: Parameters supplied to the Create Availability Set - operation. - :type parameters: - ~azure.mgmt.compute.v2018_04_01.models.AvailabilitySet - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: AvailabilitySet or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.compute.v2018_04_01.models.AvailabilitySet or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.create_or_update.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'availabilitySetName': self._serialize.url("availability_set_name", availability_set_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(parameters, 'AvailabilitySet') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('AvailabilitySet', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}'} - - def update( - self, resource_group_name, availability_set_name, parameters, custom_headers=None, raw=False, **operation_config): - """Update an availability set. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param availability_set_name: The name of the availability set. - :type availability_set_name: str - :param parameters: Parameters supplied to the Update Availability Set - operation. - :type parameters: - ~azure.mgmt.compute.v2018_04_01.models.AvailabilitySetUpdate - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: AvailabilitySet or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.compute.v2018_04_01.models.AvailabilitySet or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.update.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'availabilitySetName': self._serialize.url("availability_set_name", availability_set_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(parameters, 'AvailabilitySetUpdate') - - # Construct and send request - request = self._client.patch(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('AvailabilitySet', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}'} - - def delete( - self, resource_group_name, availability_set_name, custom_headers=None, raw=False, **operation_config): - """Delete an availability set. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param availability_set_name: The name of the availability set. - :type availability_set_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.delete.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'availabilitySetName': self._serialize.url("availability_set_name", availability_set_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 204]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}'} - - def get( - self, resource_group_name, availability_set_name, custom_headers=None, raw=False, **operation_config): - """Retrieves information about an availability set. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param availability_set_name: The name of the availability set. - :type availability_set_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: AvailabilitySet or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.compute.v2018_04_01.models.AvailabilitySet or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'availabilitySetName': self._serialize.url("availability_set_name", availability_set_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('AvailabilitySet', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}'} - - def list_by_subscription( - self, custom_headers=None, raw=False, **operation_config): - """Lists all availability sets in a subscription. - - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of AvailabilitySet - :rtype: - ~azure.mgmt.compute.v2018_04_01.models.AvailabilitySetPaged[~azure.mgmt.compute.v2018_04_01.models.AvailabilitySet] - :raises: :class:`CloudError` - """ - def internal_paging(next_link=None, raw=False): - - if not next_link: - # Construct URL - url = self.list_by_subscription.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - deserialized = models.AvailabilitySetPaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.AvailabilitySetPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - list_by_subscription.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Compute/availabilitySets'} - - def list( - self, resource_group_name, custom_headers=None, raw=False, **operation_config): - """Lists all availability sets in a resource group. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of AvailabilitySet - :rtype: - ~azure.mgmt.compute.v2018_04_01.models.AvailabilitySetPaged[~azure.mgmt.compute.v2018_04_01.models.AvailabilitySet] - :raises: :class:`CloudError` - """ - def internal_paging(next_link=None, raw=False): - - if not next_link: - # Construct URL - url = self.list.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - deserialized = models.AvailabilitySetPaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.AvailabilitySetPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets'} - - def list_available_sizes( - self, resource_group_name, availability_set_name, custom_headers=None, raw=False, **operation_config): - """Lists all available virtual machine sizes that can be used to create a - new virtual machine in an existing availability set. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param availability_set_name: The name of the availability set. - :type availability_set_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of VirtualMachineSize - :rtype: - ~azure.mgmt.compute.v2018_04_01.models.VirtualMachineSizePaged[~azure.mgmt.compute.v2018_04_01.models.VirtualMachineSize] - :raises: :class:`CloudError` - """ - def internal_paging(next_link=None, raw=False): - - if not next_link: - # Construct URL - url = self.list_available_sizes.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'availabilitySetName': self._serialize.url("availability_set_name", availability_set_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - deserialized = models.VirtualMachineSizePaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.VirtualMachineSizePaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - list_available_sizes.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}/vmSizes'} diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/operations/disks_operations.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/operations/disks_operations.py deleted file mode 100644 index 1a742e3eec9d..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/operations/disks_operations.py +++ /dev/null @@ -1,722 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError -from msrest.polling import LROPoller, NoPolling -from msrestazure.polling.arm_polling import ARMPolling - -from .. import models - - -class DisksOperations(object): - """DisksOperations operations. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: Client Api Version. Constant value: "2018-04-01". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2018-04-01" - - self.config = config - - - def _create_or_update_initial( - self, resource_group_name, disk_name, disk, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.create_or_update.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'diskName': self._serialize.url("disk_name", disk_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(disk, 'Disk') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('Disk', response) - if response.status_code == 202: - deserialized = self._deserialize('Disk', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def create_or_update( - self, resource_group_name, disk_name, disk, custom_headers=None, raw=False, polling=True, **operation_config): - """Creates or updates a disk. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param disk_name: The name of the managed disk that is being created. - The name can't be changed after the disk is created. Supported - characters for the name are a-z, A-Z, 0-9 and _. The maximum name - length is 80 characters. - :type disk_name: str - :param disk: Disk object supplied in the body of the Put disk - operation. - :type disk: ~azure.mgmt.compute.v2018_04_01.models.Disk - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns Disk or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2018_04_01.models.Disk] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2018_04_01.models.Disk]] - :raises: :class:`CloudError` - """ - raw_result = self._create_or_update_initial( - resource_group_name=resource_group_name, - disk_name=disk_name, - disk=disk, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('Disk', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/disks/{diskName}'} - - - def _update_initial( - self, resource_group_name, disk_name, disk, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.update.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'diskName': self._serialize.url("disk_name", disk_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(disk, 'DiskUpdate') - - # Construct and send request - request = self._client.patch(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('Disk', response) - if response.status_code == 202: - deserialized = self._deserialize('Disk', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def update( - self, resource_group_name, disk_name, disk, custom_headers=None, raw=False, polling=True, **operation_config): - """Updates (patches) a disk. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param disk_name: The name of the managed disk that is being created. - The name can't be changed after the disk is created. Supported - characters for the name are a-z, A-Z, 0-9 and _. The maximum name - length is 80 characters. - :type disk_name: str - :param disk: Disk object supplied in the body of the Patch disk - operation. - :type disk: ~azure.mgmt.compute.v2018_04_01.models.DiskUpdate - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns Disk or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2018_04_01.models.Disk] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2018_04_01.models.Disk]] - :raises: :class:`CloudError` - """ - raw_result = self._update_initial( - resource_group_name=resource_group_name, - disk_name=disk_name, - disk=disk, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('Disk', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/disks/{diskName}'} - - def get( - self, resource_group_name, disk_name, custom_headers=None, raw=False, **operation_config): - """Gets information about a disk. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param disk_name: The name of the managed disk that is being created. - The name can't be changed after the disk is created. Supported - characters for the name are a-z, A-Z, 0-9 and _. The maximum name - length is 80 characters. - :type disk_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: Disk or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.compute.v2018_04_01.models.Disk or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'diskName': self._serialize.url("disk_name", disk_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('Disk', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/disks/{diskName}'} - - - def _delete_initial( - self, resource_group_name, disk_name, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.delete.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'diskName': self._serialize.url("disk_name", disk_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202, 204]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - def delete( - self, resource_group_name, disk_name, custom_headers=None, raw=False, polling=True, **operation_config): - """Deletes a disk. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param disk_name: The name of the managed disk that is being created. - The name can't be changed after the disk is created. Supported - characters for the name are a-z, A-Z, 0-9 and _. The maximum name - length is 80 characters. - :type disk_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns None or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] - :raises: :class:`CloudError` - """ - raw_result = self._delete_initial( - resource_group_name=resource_group_name, - disk_name=disk_name, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/disks/{diskName}'} - - def list_by_resource_group( - self, resource_group_name, custom_headers=None, raw=False, **operation_config): - """Lists all the disks under a resource group. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of Disk - :rtype: - ~azure.mgmt.compute.v2018_04_01.models.DiskPaged[~azure.mgmt.compute.v2018_04_01.models.Disk] - :raises: :class:`CloudError` - """ - def internal_paging(next_link=None, raw=False): - - if not next_link: - # Construct URL - url = self.list_by_resource_group.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - deserialized = models.DiskPaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.DiskPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/disks'} - - def list( - self, custom_headers=None, raw=False, **operation_config): - """Lists all the disks under a subscription. - - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of Disk - :rtype: - ~azure.mgmt.compute.v2018_04_01.models.DiskPaged[~azure.mgmt.compute.v2018_04_01.models.Disk] - :raises: :class:`CloudError` - """ - def internal_paging(next_link=None, raw=False): - - if not next_link: - # Construct URL - url = self.list.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - deserialized = models.DiskPaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.DiskPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Compute/disks'} - - - def _grant_access_initial( - self, resource_group_name, disk_name, access, duration_in_seconds, custom_headers=None, raw=False, **operation_config): - grant_access_data = models.GrantAccessData(access=access, duration_in_seconds=duration_in_seconds) - - # Construct URL - url = self.grant_access.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'diskName': self._serialize.url("disk_name", disk_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(grant_access_data, 'GrantAccessData') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('AccessUri', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def grant_access( - self, resource_group_name, disk_name, access, duration_in_seconds, custom_headers=None, raw=False, polling=True, **operation_config): - """Grants access to a disk. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param disk_name: The name of the managed disk that is being created. - The name can't be changed after the disk is created. Supported - characters for the name are a-z, A-Z, 0-9 and _. The maximum name - length is 80 characters. - :type disk_name: str - :param access: Possible values include: 'None', 'Read' - :type access: str or - ~azure.mgmt.compute.v2018_04_01.models.AccessLevel - :param duration_in_seconds: Time duration in seconds until the SAS - access expires. - :type duration_in_seconds: int - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns AccessUri or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2018_04_01.models.AccessUri] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2018_04_01.models.AccessUri]] - :raises: :class:`CloudError` - """ - raw_result = self._grant_access_initial( - resource_group_name=resource_group_name, - disk_name=disk_name, - access=access, - duration_in_seconds=duration_in_seconds, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('AccessUri', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - grant_access.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/disks/{diskName}/beginGetAccess'} - - - def _revoke_access_initial( - self, resource_group_name, disk_name, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.revoke_access.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'diskName': self._serialize.url("disk_name", disk_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - def revoke_access( - self, resource_group_name, disk_name, custom_headers=None, raw=False, polling=True, **operation_config): - """Revokes access to a disk. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param disk_name: The name of the managed disk that is being created. - The name can't be changed after the disk is created. Supported - characters for the name are a-z, A-Z, 0-9 and _. The maximum name - length is 80 characters. - :type disk_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns None or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] - :raises: :class:`CloudError` - """ - raw_result = self._revoke_access_initial( - resource_group_name=resource_group_name, - disk_name=disk_name, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - revoke_access.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/disks/{diskName}/endGetAccess'} diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/operations/images_operations.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/operations/images_operations.py deleted file mode 100644 index e50c243bf1b4..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/operations/images_operations.py +++ /dev/null @@ -1,522 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError -from msrest.polling import LROPoller, NoPolling -from msrestazure.polling.arm_polling import ARMPolling - -from .. import models - - -class ImagesOperations(object): - """ImagesOperations operations. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: Client Api Version. Constant value: "2018-04-01". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2018-04-01" - - self.config = config - - - def _create_or_update_initial( - self, resource_group_name, image_name, parameters, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.create_or_update.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'imageName': self._serialize.url("image_name", image_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(parameters, 'Image') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 201]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('Image', response) - if response.status_code == 201: - deserialized = self._deserialize('Image', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def create_or_update( - self, resource_group_name, image_name, parameters, custom_headers=None, raw=False, polling=True, **operation_config): - """Create or update an image. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param image_name: The name of the image. - :type image_name: str - :param parameters: Parameters supplied to the Create Image operation. - :type parameters: ~azure.mgmt.compute.v2018_04_01.models.Image - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns Image or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2018_04_01.models.Image] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2018_04_01.models.Image]] - :raises: :class:`CloudError` - """ - raw_result = self._create_or_update_initial( - resource_group_name=resource_group_name, - image_name=image_name, - parameters=parameters, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('Image', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/images/{imageName}'} - - - def _update_initial( - self, resource_group_name, image_name, parameters, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.update.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'imageName': self._serialize.url("image_name", image_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(parameters, 'ImageUpdate') - - # Construct and send request - request = self._client.patch(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 201]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('Image', response) - if response.status_code == 201: - deserialized = self._deserialize('Image', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def update( - self, resource_group_name, image_name, parameters, custom_headers=None, raw=False, polling=True, **operation_config): - """Update an image. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param image_name: The name of the image. - :type image_name: str - :param parameters: Parameters supplied to the Update Image operation. - :type parameters: ~azure.mgmt.compute.v2018_04_01.models.ImageUpdate - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns Image or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2018_04_01.models.Image] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2018_04_01.models.Image]] - :raises: :class:`CloudError` - """ - raw_result = self._update_initial( - resource_group_name=resource_group_name, - image_name=image_name, - parameters=parameters, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('Image', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/images/{imageName}'} - - - def _delete_initial( - self, resource_group_name, image_name, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.delete.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'imageName': self._serialize.url("image_name", image_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202, 204]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - def delete( - self, resource_group_name, image_name, custom_headers=None, raw=False, polling=True, **operation_config): - """Deletes an Image. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param image_name: The name of the image. - :type image_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns None or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] - :raises: :class:`CloudError` - """ - raw_result = self._delete_initial( - resource_group_name=resource_group_name, - image_name=image_name, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/images/{imageName}'} - - def get( - self, resource_group_name, image_name, expand=None, custom_headers=None, raw=False, **operation_config): - """Gets an image. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param image_name: The name of the image. - :type image_name: str - :param expand: The expand expression to apply on the operation. - :type expand: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: Image or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.compute.v2018_04_01.models.Image or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'imageName': self._serialize.url("image_name", image_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - if expand is not None: - query_parameters['$expand'] = self._serialize.query("expand", expand, 'str') - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('Image', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/images/{imageName}'} - - def list_by_resource_group( - self, resource_group_name, custom_headers=None, raw=False, **operation_config): - """Gets the list of images under a resource group. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of Image - :rtype: - ~azure.mgmt.compute.v2018_04_01.models.ImagePaged[~azure.mgmt.compute.v2018_04_01.models.Image] - :raises: :class:`CloudError` - """ - def internal_paging(next_link=None, raw=False): - - if not next_link: - # Construct URL - url = self.list_by_resource_group.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - deserialized = models.ImagePaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.ImagePaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/images'} - - def list( - self, custom_headers=None, raw=False, **operation_config): - """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. - - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of Image - :rtype: - ~azure.mgmt.compute.v2018_04_01.models.ImagePaged[~azure.mgmt.compute.v2018_04_01.models.Image] - :raises: :class:`CloudError` - """ - def internal_paging(next_link=None, raw=False): - - if not next_link: - # Construct URL - url = self.list.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - deserialized = models.ImagePaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.ImagePaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Compute/images'} diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/operations/log_analytics_operations.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/operations/log_analytics_operations.py deleted file mode 100644 index 519044fc41f7..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/operations/log_analytics_operations.py +++ /dev/null @@ -1,242 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError -from msrest.polling import LROPoller, NoPolling -from msrestazure.polling.arm_polling import ARMPolling - -from .. import models - - -class LogAnalyticsOperations(object): - """LogAnalyticsOperations operations. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: Client Api Version. Constant value: "2018-04-01". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2018-04-01" - - self.config = config - - - def _export_request_rate_by_interval_initial( - self, parameters, location, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.export_request_rate_by_interval.metadata['url'] - path_format_arguments = { - 'location': self._serialize.url("location", location, 'str', pattern=r'^[-\w\._]+$'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(parameters, 'RequestRateByIntervalInput') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('LogAnalyticsOperationResult', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def export_request_rate_by_interval( - self, parameters, location, custom_headers=None, raw=False, polling=True, **operation_config): - """Export logs that show Api requests made by this subscription in the - given time window to show throttling activities. - - :param parameters: Parameters supplied to the LogAnalytics - getRequestRateByInterval Api. - :type parameters: - ~azure.mgmt.compute.v2018_04_01.models.RequestRateByIntervalInput - :param location: The location upon which virtual-machine-sizes is - queried. - :type location: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns - LogAnalyticsOperationResult or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2018_04_01.models.LogAnalyticsOperationResult] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2018_04_01.models.LogAnalyticsOperationResult]] - :raises: :class:`CloudError` - """ - raw_result = self._export_request_rate_by_interval_initial( - parameters=parameters, - location=location, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('LogAnalyticsOperationResult', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - export_request_rate_by_interval.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/logAnalytics/apiAccess/getRequestRateByInterval'} - - - def _export_throttled_requests_initial( - self, parameters, location, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.export_throttled_requests.metadata['url'] - path_format_arguments = { - 'location': self._serialize.url("location", location, 'str', pattern=r'^[-\w\._]+$'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(parameters, 'ThrottledRequestsInput') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('LogAnalyticsOperationResult', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def export_throttled_requests( - self, parameters, location, custom_headers=None, raw=False, polling=True, **operation_config): - """Export logs that show total throttled Api requests for this - subscription in the given time window. - - :param parameters: Parameters supplied to the LogAnalytics - getThrottledRequests Api. - :type parameters: - ~azure.mgmt.compute.v2018_04_01.models.ThrottledRequestsInput - :param location: The location upon which virtual-machine-sizes is - queried. - :type location: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns - LogAnalyticsOperationResult or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2018_04_01.models.LogAnalyticsOperationResult] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2018_04_01.models.LogAnalyticsOperationResult]] - :raises: :class:`CloudError` - """ - raw_result = self._export_throttled_requests_initial( - parameters=parameters, - location=location, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('LogAnalyticsOperationResult', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - export_throttled_requests.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/logAnalytics/apiAccess/getThrottledRequests'} diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/operations/operations.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/operations/operations.py deleted file mode 100644 index 389ece6362f8..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/operations/operations.py +++ /dev/null @@ -1,98 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError - -from .. import models - - -class Operations(object): - """Operations operations. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: Client Api Version. Constant value: "2018-04-01". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2018-04-01" - - self.config = config - - def list( - self, custom_headers=None, raw=False, **operation_config): - """Gets a list of compute operations. - - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of ComputeOperationValue - :rtype: - ~azure.mgmt.compute.v2018_04_01.models.ComputeOperationValuePaged[~azure.mgmt.compute.v2018_04_01.models.ComputeOperationValue] - :raises: :class:`CloudError` - """ - def internal_paging(next_link=None, raw=False): - - if not next_link: - # Construct URL - url = self.list.metadata['url'] - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - deserialized = models.ComputeOperationValuePaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.ComputeOperationValuePaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - list.metadata = {'url': '/providers/Microsoft.Compute/operations'} diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/operations/proximity_placement_groups_operations.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/operations/proximity_placement_groups_operations.py deleted file mode 100644 index 9a806c424074..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/operations/proximity_placement_groups_operations.py +++ /dev/null @@ -1,430 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError - -from .. import models - - -class ProximityPlacementGroupsOperations(object): - """ProximityPlacementGroupsOperations operations. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: Client Api Version. Constant value: "2018-04-01". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2018-04-01" - - self.config = config - - def create_or_update( - self, resource_group_name, proximity_placement_group_name, parameters, custom_headers=None, raw=False, **operation_config): - """Create or update a proximity placement group. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param proximity_placement_group_name: The name of the proximity - placement group. - :type proximity_placement_group_name: str - :param parameters: Parameters supplied to the Create Proximity - Placement Group operation. - :type parameters: - ~azure.mgmt.compute.v2018_04_01.models.ProximityPlacementGroup - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: ProximityPlacementGroup or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.compute.v2018_04_01.models.ProximityPlacementGroup - or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.create_or_update.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'proximityPlacementGroupName': self._serialize.url("proximity_placement_group_name", proximity_placement_group_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(parameters, 'ProximityPlacementGroup') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 201]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('ProximityPlacementGroup', response) - if response.status_code == 201: - deserialized = self._deserialize('ProximityPlacementGroup', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/proximityPlacementGroups/{proximityPlacementGroupName}'} - - def update( - self, resource_group_name, proximity_placement_group_name, tags=None, custom_headers=None, raw=False, **operation_config): - """Update a proximity placement group. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param proximity_placement_group_name: The name of the proximity - placement group. - :type proximity_placement_group_name: str - :param tags: Resource tags - :type tags: dict[str, str] - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: ProximityPlacementGroup or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.compute.v2018_04_01.models.ProximityPlacementGroup - or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - parameters = models.ProximityPlacementGroupUpdate(tags=tags) - - # Construct URL - url = self.update.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'proximityPlacementGroupName': self._serialize.url("proximity_placement_group_name", proximity_placement_group_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(parameters, 'ProximityPlacementGroupUpdate') - - # Construct and send request - request = self._client.patch(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('ProximityPlacementGroup', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/proximityPlacementGroups/{proximityPlacementGroupName}'} - - def delete( - self, resource_group_name, proximity_placement_group_name, custom_headers=None, raw=False, **operation_config): - """Delete a proximity placement group. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param proximity_placement_group_name: The name of the proximity - placement group. - :type proximity_placement_group_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.delete.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'proximityPlacementGroupName': self._serialize.url("proximity_placement_group_name", proximity_placement_group_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/proximityPlacementGroups/{proximityPlacementGroupName}'} - - def get( - self, resource_group_name, proximity_placement_group_name, custom_headers=None, raw=False, **operation_config): - """Retrieves information about a proximity placement group . - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param proximity_placement_group_name: The name of the proximity - placement group. - :type proximity_placement_group_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: ProximityPlacementGroup or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.compute.v2018_04_01.models.ProximityPlacementGroup - or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'proximityPlacementGroupName': self._serialize.url("proximity_placement_group_name", proximity_placement_group_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('ProximityPlacementGroup', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/proximityPlacementGroups/{proximityPlacementGroupName}'} - - def list_by_subscription( - self, custom_headers=None, raw=False, **operation_config): - """Lists all proximity placement groups in a subscription. - - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of ProximityPlacementGroup - :rtype: - ~azure.mgmt.compute.v2018_04_01.models.ProximityPlacementGroupPaged[~azure.mgmt.compute.v2018_04_01.models.ProximityPlacementGroup] - :raises: :class:`CloudError` - """ - def internal_paging(next_link=None, raw=False): - - if not next_link: - # Construct URL - url = self.list_by_subscription.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - deserialized = models.ProximityPlacementGroupPaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.ProximityPlacementGroupPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - list_by_subscription.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Compute/proximityPlacementGroups'} - - def list_by_resource_group( - self, resource_group_name, custom_headers=None, raw=False, **operation_config): - """Lists all proximity placement groups in a resource group. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of ProximityPlacementGroup - :rtype: - ~azure.mgmt.compute.v2018_04_01.models.ProximityPlacementGroupPaged[~azure.mgmt.compute.v2018_04_01.models.ProximityPlacementGroup] - :raises: :class:`CloudError` - """ - def internal_paging(next_link=None, raw=False): - - if not next_link: - # Construct URL - url = self.list_by_resource_group.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - deserialized = models.ProximityPlacementGroupPaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.ProximityPlacementGroupPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/proximityPlacementGroups'} diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/operations/snapshots_operations.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/operations/snapshots_operations.py deleted file mode 100644 index 83fcd98aa1f1..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/operations/snapshots_operations.py +++ /dev/null @@ -1,722 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError -from msrest.polling import LROPoller, NoPolling -from msrestazure.polling.arm_polling import ARMPolling - -from .. import models - - -class SnapshotsOperations(object): - """SnapshotsOperations operations. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: Client Api Version. Constant value: "2018-04-01". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2018-04-01" - - self.config = config - - - def _create_or_update_initial( - self, resource_group_name, snapshot_name, snapshot, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.create_or_update.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'snapshotName': self._serialize.url("snapshot_name", snapshot_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(snapshot, 'Snapshot') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('Snapshot', response) - if response.status_code == 202: - deserialized = self._deserialize('Snapshot', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def create_or_update( - self, resource_group_name, snapshot_name, snapshot, custom_headers=None, raw=False, polling=True, **operation_config): - """Creates or updates a snapshot. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param snapshot_name: The name of the snapshot that is being created. - The name can't be changed after the snapshot is created. Supported - characters for the name are a-z, A-Z, 0-9 and _. The max name length - is 80 characters. - :type snapshot_name: str - :param snapshot: Snapshot object supplied in the body of the Put disk - operation. - :type snapshot: ~azure.mgmt.compute.v2018_04_01.models.Snapshot - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns Snapshot or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2018_04_01.models.Snapshot] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2018_04_01.models.Snapshot]] - :raises: :class:`CloudError` - """ - raw_result = self._create_or_update_initial( - resource_group_name=resource_group_name, - snapshot_name=snapshot_name, - snapshot=snapshot, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('Snapshot', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/snapshots/{snapshotName}'} - - - def _update_initial( - self, resource_group_name, snapshot_name, snapshot, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.update.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'snapshotName': self._serialize.url("snapshot_name", snapshot_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(snapshot, 'SnapshotUpdate') - - # Construct and send request - request = self._client.patch(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('Snapshot', response) - if response.status_code == 202: - deserialized = self._deserialize('Snapshot', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def update( - self, resource_group_name, snapshot_name, snapshot, custom_headers=None, raw=False, polling=True, **operation_config): - """Updates (patches) a snapshot. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param snapshot_name: The name of the snapshot that is being created. - The name can't be changed after the snapshot is created. Supported - characters for the name are a-z, A-Z, 0-9 and _. The max name length - is 80 characters. - :type snapshot_name: str - :param snapshot: Snapshot object supplied in the body of the Patch - snapshot operation. - :type snapshot: ~azure.mgmt.compute.v2018_04_01.models.SnapshotUpdate - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns Snapshot or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2018_04_01.models.Snapshot] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2018_04_01.models.Snapshot]] - :raises: :class:`CloudError` - """ - raw_result = self._update_initial( - resource_group_name=resource_group_name, - snapshot_name=snapshot_name, - snapshot=snapshot, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('Snapshot', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/snapshots/{snapshotName}'} - - def get( - self, resource_group_name, snapshot_name, custom_headers=None, raw=False, **operation_config): - """Gets information about a snapshot. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param snapshot_name: The name of the snapshot that is being created. - The name can't be changed after the snapshot is created. Supported - characters for the name are a-z, A-Z, 0-9 and _. The max name length - is 80 characters. - :type snapshot_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: Snapshot or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.compute.v2018_04_01.models.Snapshot or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'snapshotName': self._serialize.url("snapshot_name", snapshot_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('Snapshot', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/snapshots/{snapshotName}'} - - - def _delete_initial( - self, resource_group_name, snapshot_name, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.delete.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'snapshotName': self._serialize.url("snapshot_name", snapshot_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202, 204]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - def delete( - self, resource_group_name, snapshot_name, custom_headers=None, raw=False, polling=True, **operation_config): - """Deletes a snapshot. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param snapshot_name: The name of the snapshot that is being created. - The name can't be changed after the snapshot is created. Supported - characters for the name are a-z, A-Z, 0-9 and _. The max name length - is 80 characters. - :type snapshot_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns None or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] - :raises: :class:`CloudError` - """ - raw_result = self._delete_initial( - resource_group_name=resource_group_name, - snapshot_name=snapshot_name, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/snapshots/{snapshotName}'} - - def list_by_resource_group( - self, resource_group_name, custom_headers=None, raw=False, **operation_config): - """Lists snapshots under a resource group. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of Snapshot - :rtype: - ~azure.mgmt.compute.v2018_04_01.models.SnapshotPaged[~azure.mgmt.compute.v2018_04_01.models.Snapshot] - :raises: :class:`CloudError` - """ - def internal_paging(next_link=None, raw=False): - - if not next_link: - # Construct URL - url = self.list_by_resource_group.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - deserialized = models.SnapshotPaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.SnapshotPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/snapshots'} - - def list( - self, custom_headers=None, raw=False, **operation_config): - """Lists snapshots under a subscription. - - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of Snapshot - :rtype: - ~azure.mgmt.compute.v2018_04_01.models.SnapshotPaged[~azure.mgmt.compute.v2018_04_01.models.Snapshot] - :raises: :class:`CloudError` - """ - def internal_paging(next_link=None, raw=False): - - if not next_link: - # Construct URL - url = self.list.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - deserialized = models.SnapshotPaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.SnapshotPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Compute/snapshots'} - - - def _grant_access_initial( - self, resource_group_name, snapshot_name, access, duration_in_seconds, custom_headers=None, raw=False, **operation_config): - grant_access_data = models.GrantAccessData(access=access, duration_in_seconds=duration_in_seconds) - - # Construct URL - url = self.grant_access.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'snapshotName': self._serialize.url("snapshot_name", snapshot_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(grant_access_data, 'GrantAccessData') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('AccessUri', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def grant_access( - self, resource_group_name, snapshot_name, access, duration_in_seconds, custom_headers=None, raw=False, polling=True, **operation_config): - """Grants access to a snapshot. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param snapshot_name: The name of the snapshot that is being created. - The name can't be changed after the snapshot is created. Supported - characters for the name are a-z, A-Z, 0-9 and _. The max name length - is 80 characters. - :type snapshot_name: str - :param access: Possible values include: 'None', 'Read' - :type access: str or - ~azure.mgmt.compute.v2018_04_01.models.AccessLevel - :param duration_in_seconds: Time duration in seconds until the SAS - access expires. - :type duration_in_seconds: int - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns AccessUri or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2018_04_01.models.AccessUri] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2018_04_01.models.AccessUri]] - :raises: :class:`CloudError` - """ - raw_result = self._grant_access_initial( - resource_group_name=resource_group_name, - snapshot_name=snapshot_name, - access=access, - duration_in_seconds=duration_in_seconds, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('AccessUri', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - grant_access.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/snapshots/{snapshotName}/beginGetAccess'} - - - def _revoke_access_initial( - self, resource_group_name, snapshot_name, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.revoke_access.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'snapshotName': self._serialize.url("snapshot_name", snapshot_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - def revoke_access( - self, resource_group_name, snapshot_name, custom_headers=None, raw=False, polling=True, **operation_config): - """Revokes access to a snapshot. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param snapshot_name: The name of the snapshot that is being created. - The name can't be changed after the snapshot is created. Supported - characters for the name are a-z, A-Z, 0-9 and _. The max name length - is 80 characters. - :type snapshot_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns None or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] - :raises: :class:`CloudError` - """ - raw_result = self._revoke_access_initial( - resource_group_name=resource_group_name, - snapshot_name=snapshot_name, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - revoke_access.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/snapshots/{snapshotName}/endGetAccess'} diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/operations/usage_operations.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/operations/usage_operations.py deleted file mode 100644 index 50d843d46355..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/operations/usage_operations.py +++ /dev/null @@ -1,107 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError - -from .. import models - - -class UsageOperations(object): - """UsageOperations operations. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: Client Api Version. Constant value: "2018-04-01". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2018-04-01" - - self.config = config - - def list( - self, location, custom_headers=None, raw=False, **operation_config): - """Gets, for the specified location, the current compute resource usage - information as well as the limits for compute resources under the - subscription. - - :param location: The location for which resource usage is queried. - :type location: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of Usage - :rtype: - ~azure.mgmt.compute.v2018_04_01.models.UsagePaged[~azure.mgmt.compute.v2018_04_01.models.Usage] - :raises: :class:`CloudError` - """ - def internal_paging(next_link=None, raw=False): - - if not next_link: - # Construct URL - url = self.list.metadata['url'] - path_format_arguments = { - 'location': self._serialize.url("location", location, 'str', pattern=r'^[-\w\._]+$'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - deserialized = models.UsagePaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.UsagePaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/usages'} diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/operations/virtual_machine_extension_images_operations.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/operations/virtual_machine_extension_images_operations.py deleted file mode 100644 index 91cfcbfa9db4..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/operations/virtual_machine_extension_images_operations.py +++ /dev/null @@ -1,248 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError - -from .. import models - - -class VirtualMachineExtensionImagesOperations(object): - """VirtualMachineExtensionImagesOperations operations. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: Client Api Version. Constant value: "2018-04-01". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2018-04-01" - - self.config = config - - def get( - self, location, publisher_name, type, version, custom_headers=None, raw=False, **operation_config): - """Gets a virtual machine extension image. - - :param location: The name of a supported Azure region. - :type location: str - :param publisher_name: - :type publisher_name: str - :param type: - :type type: str - :param version: - :type version: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: VirtualMachineExtensionImage or ClientRawResponse if raw=true - :rtype: - ~azure.mgmt.compute.v2018_04_01.models.VirtualMachineExtensionImage or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get.metadata['url'] - path_format_arguments = { - 'location': self._serialize.url("location", location, 'str'), - 'publisherName': self._serialize.url("publisher_name", publisher_name, 'str'), - 'type': self._serialize.url("type", type, 'str'), - 'version': self._serialize.url("version", version, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('VirtualMachineExtensionImage', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/publishers/{publisherName}/artifacttypes/vmextension/types/{type}/versions/{version}'} - - def list_types( - self, location, publisher_name, custom_headers=None, raw=False, **operation_config): - """Gets a list of virtual machine extension image types. - - :param location: The name of a supported Azure region. - :type location: str - :param publisher_name: - :type publisher_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: list or ClientRawResponse if raw=true - :rtype: - list[~azure.mgmt.compute.v2018_04_01.models.VirtualMachineExtensionImage] - or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.list_types.metadata['url'] - path_format_arguments = { - 'location': self._serialize.url("location", location, 'str'), - 'publisherName': self._serialize.url("publisher_name", publisher_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('[VirtualMachineExtensionImage]', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - list_types.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/publishers/{publisherName}/artifacttypes/vmextension/types'} - - def list_versions( - self, location, publisher_name, type, filter=None, top=None, orderby=None, custom_headers=None, raw=False, **operation_config): - """Gets a list of virtual machine extension image versions. - - :param location: The name of a supported Azure region. - :type location: str - :param publisher_name: - :type publisher_name: str - :param type: - :type type: str - :param filter: The filter to apply on the operation. - :type filter: str - :param top: - :type top: int - :param orderby: - :type orderby: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: list or ClientRawResponse if raw=true - :rtype: - list[~azure.mgmt.compute.v2018_04_01.models.VirtualMachineExtensionImage] - or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.list_versions.metadata['url'] - path_format_arguments = { - 'location': self._serialize.url("location", location, 'str'), - 'publisherName': self._serialize.url("publisher_name", publisher_name, 'str'), - 'type': self._serialize.url("type", type, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - if filter is not None: - query_parameters['$filter'] = self._serialize.query("filter", filter, 'str') - if top is not None: - query_parameters['$top'] = self._serialize.query("top", top, 'int') - if orderby is not None: - query_parameters['$orderby'] = self._serialize.query("orderby", orderby, 'str') - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('[VirtualMachineExtensionImage]', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - list_versions.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/publishers/{publisherName}/artifacttypes/vmextension/types/{type}/versions'} diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/operations/virtual_machine_extensions_operations.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/operations/virtual_machine_extensions_operations.py deleted file mode 100644 index 253dfe24a8f3..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/operations/virtual_machine_extensions_operations.py +++ /dev/null @@ -1,479 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError -from msrest.polling import LROPoller, NoPolling -from msrestazure.polling.arm_polling import ARMPolling - -from .. import models - - -class VirtualMachineExtensionsOperations(object): - """VirtualMachineExtensionsOperations operations. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: Client Api Version. Constant value: "2018-04-01". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2018-04-01" - - self.config = config - - - def _create_or_update_initial( - self, resource_group_name, vm_name, vm_extension_name, extension_parameters, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.create_or_update.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'vmName': self._serialize.url("vm_name", vm_name, 'str'), - 'vmExtensionName': self._serialize.url("vm_extension_name", vm_extension_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(extension_parameters, 'VirtualMachineExtension') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 201]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('VirtualMachineExtension', response) - if response.status_code == 201: - deserialized = self._deserialize('VirtualMachineExtension', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def create_or_update( - self, resource_group_name, vm_name, vm_extension_name, extension_parameters, custom_headers=None, raw=False, polling=True, **operation_config): - """The operation to create or update the extension. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param vm_name: The name of the virtual machine where the extension - should be created or updated. - :type vm_name: str - :param vm_extension_name: The name of the virtual machine extension. - :type vm_extension_name: str - :param extension_parameters: Parameters supplied to the Create Virtual - Machine Extension operation. - :type extension_parameters: - ~azure.mgmt.compute.v2018_04_01.models.VirtualMachineExtension - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns VirtualMachineExtension - or ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2018_04_01.models.VirtualMachineExtension] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2018_04_01.models.VirtualMachineExtension]] - :raises: :class:`CloudError` - """ - raw_result = self._create_or_update_initial( - resource_group_name=resource_group_name, - vm_name=vm_name, - vm_extension_name=vm_extension_name, - extension_parameters=extension_parameters, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('VirtualMachineExtension', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/extensions/{vmExtensionName}'} - - - def _update_initial( - self, resource_group_name, vm_name, vm_extension_name, extension_parameters, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.update.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'vmName': self._serialize.url("vm_name", vm_name, 'str'), - 'vmExtensionName': self._serialize.url("vm_extension_name", vm_extension_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(extension_parameters, 'VirtualMachineExtensionUpdate') - - # Construct and send request - request = self._client.patch(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('VirtualMachineExtension', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def update( - self, resource_group_name, vm_name, vm_extension_name, extension_parameters, custom_headers=None, raw=False, polling=True, **operation_config): - """The operation to update the extension. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param vm_name: The name of the virtual machine where the extension - should be updated. - :type vm_name: str - :param vm_extension_name: The name of the virtual machine extension. - :type vm_extension_name: str - :param extension_parameters: Parameters supplied to the Update Virtual - Machine Extension operation. - :type extension_parameters: - ~azure.mgmt.compute.v2018_04_01.models.VirtualMachineExtensionUpdate - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns VirtualMachineExtension - or ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2018_04_01.models.VirtualMachineExtension] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2018_04_01.models.VirtualMachineExtension]] - :raises: :class:`CloudError` - """ - raw_result = self._update_initial( - resource_group_name=resource_group_name, - vm_name=vm_name, - vm_extension_name=vm_extension_name, - extension_parameters=extension_parameters, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('VirtualMachineExtension', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/extensions/{vmExtensionName}'} - - - def _delete_initial( - self, resource_group_name, vm_name, vm_extension_name, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.delete.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'vmName': self._serialize.url("vm_name", vm_name, 'str'), - 'vmExtensionName': self._serialize.url("vm_extension_name", vm_extension_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202, 204]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - def delete( - self, resource_group_name, vm_name, vm_extension_name, custom_headers=None, raw=False, polling=True, **operation_config): - """The operation to delete the extension. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param vm_name: The name of the virtual machine where the extension - should be deleted. - :type vm_name: str - :param vm_extension_name: The name of the virtual machine extension. - :type vm_extension_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns None or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] - :raises: :class:`CloudError` - """ - raw_result = self._delete_initial( - resource_group_name=resource_group_name, - vm_name=vm_name, - vm_extension_name=vm_extension_name, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/extensions/{vmExtensionName}'} - - def get( - self, resource_group_name, vm_name, vm_extension_name, expand=None, custom_headers=None, raw=False, **operation_config): - """The operation to get the extension. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param vm_name: The name of the virtual machine containing the - extension. - :type vm_name: str - :param vm_extension_name: The name of the virtual machine extension. - :type vm_extension_name: str - :param expand: The expand expression to apply on the operation. - :type expand: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: VirtualMachineExtension or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.compute.v2018_04_01.models.VirtualMachineExtension - or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'vmName': self._serialize.url("vm_name", vm_name, 'str'), - 'vmExtensionName': self._serialize.url("vm_extension_name", vm_extension_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - if expand is not None: - query_parameters['$expand'] = self._serialize.query("expand", expand, 'str') - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('VirtualMachineExtension', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/extensions/{vmExtensionName}'} - - def list( - self, resource_group_name, vm_name, expand=None, custom_headers=None, raw=False, **operation_config): - """The operation to get all extensions of a Virtual Machine. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param vm_name: The name of the virtual machine containing the - extension. - :type vm_name: str - :param expand: The expand expression to apply on the operation. - :type expand: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: VirtualMachineExtensionsListResult or ClientRawResponse if - raw=true - :rtype: - ~azure.mgmt.compute.v2018_04_01.models.VirtualMachineExtensionsListResult - or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.list.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'vmName': self._serialize.url("vm_name", vm_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - if expand is not None: - query_parameters['$expand'] = self._serialize.query("expand", expand, 'str') - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('VirtualMachineExtensionsListResult', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/extensions'} diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/operations/virtual_machine_images_operations.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/operations/virtual_machine_images_operations.py deleted file mode 100644 index 290a55dd5c19..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/operations/virtual_machine_images_operations.py +++ /dev/null @@ -1,383 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError - -from .. import models - - -class VirtualMachineImagesOperations(object): - """VirtualMachineImagesOperations operations. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: Client Api Version. Constant value: "2018-04-01". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2018-04-01" - - self.config = config - - def get( - self, location, publisher_name, offer, skus, version, custom_headers=None, raw=False, **operation_config): - """Gets a virtual machine image. - - :param location: The name of a supported Azure region. - :type location: str - :param publisher_name: A valid image publisher. - :type publisher_name: str - :param offer: A valid image publisher offer. - :type offer: str - :param skus: A valid image SKU. - :type skus: str - :param version: A valid image SKU version. - :type version: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: VirtualMachineImage or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.compute.v2018_04_01.models.VirtualMachineImage or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get.metadata['url'] - path_format_arguments = { - 'location': self._serialize.url("location", location, 'str'), - 'publisherName': self._serialize.url("publisher_name", publisher_name, 'str'), - 'offer': self._serialize.url("offer", offer, 'str'), - 'skus': self._serialize.url("skus", skus, 'str'), - 'version': self._serialize.url("version", version, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('VirtualMachineImage', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/publishers/{publisherName}/artifacttypes/vmimage/offers/{offer}/skus/{skus}/versions/{version}'} - - def list( - self, location, publisher_name, offer, skus, filter=None, top=None, orderby=None, custom_headers=None, raw=False, **operation_config): - """Gets a list of all virtual machine image versions for the specified - location, publisher, offer, and SKU. - - :param location: The name of a supported Azure region. - :type location: str - :param publisher_name: A valid image publisher. - :type publisher_name: str - :param offer: A valid image publisher offer. - :type offer: str - :param skus: A valid image SKU. - :type skus: str - :param filter: The filter to apply on the operation. - :type filter: str - :param top: - :type top: int - :param orderby: - :type orderby: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: list or ClientRawResponse if raw=true - :rtype: - list[~azure.mgmt.compute.v2018_04_01.models.VirtualMachineImageResource] - or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.list.metadata['url'] - path_format_arguments = { - 'location': self._serialize.url("location", location, 'str'), - 'publisherName': self._serialize.url("publisher_name", publisher_name, 'str'), - 'offer': self._serialize.url("offer", offer, 'str'), - 'skus': self._serialize.url("skus", skus, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - if filter is not None: - query_parameters['$filter'] = self._serialize.query("filter", filter, 'str') - if top is not None: - query_parameters['$top'] = self._serialize.query("top", top, 'int') - if orderby is not None: - query_parameters['$orderby'] = self._serialize.query("orderby", orderby, 'str') - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('[VirtualMachineImageResource]', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/publishers/{publisherName}/artifacttypes/vmimage/offers/{offer}/skus/{skus}/versions'} - - def list_offers( - self, location, publisher_name, custom_headers=None, raw=False, **operation_config): - """Gets a list of virtual machine image offers for the specified location - and publisher. - - :param location: The name of a supported Azure region. - :type location: str - :param publisher_name: A valid image publisher. - :type publisher_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: list or ClientRawResponse if raw=true - :rtype: - list[~azure.mgmt.compute.v2018_04_01.models.VirtualMachineImageResource] - or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.list_offers.metadata['url'] - path_format_arguments = { - 'location': self._serialize.url("location", location, 'str'), - 'publisherName': self._serialize.url("publisher_name", publisher_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('[VirtualMachineImageResource]', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - list_offers.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/publishers/{publisherName}/artifacttypes/vmimage/offers'} - - def list_publishers( - self, location, custom_headers=None, raw=False, **operation_config): - """Gets a list of virtual machine image publishers for the specified Azure - location. - - :param location: The name of a supported Azure region. - :type location: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: list or ClientRawResponse if raw=true - :rtype: - list[~azure.mgmt.compute.v2018_04_01.models.VirtualMachineImageResource] - or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.list_publishers.metadata['url'] - path_format_arguments = { - 'location': self._serialize.url("location", location, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('[VirtualMachineImageResource]', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - list_publishers.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/publishers'} - - def list_skus( - self, location, publisher_name, offer, custom_headers=None, raw=False, **operation_config): - """Gets a list of virtual machine image SKUs for the specified location, - publisher, and offer. - - :param location: The name of a supported Azure region. - :type location: str - :param publisher_name: A valid image publisher. - :type publisher_name: str - :param offer: A valid image publisher offer. - :type offer: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: list or ClientRawResponse if raw=true - :rtype: - list[~azure.mgmt.compute.v2018_04_01.models.VirtualMachineImageResource] - or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.list_skus.metadata['url'] - path_format_arguments = { - 'location': self._serialize.url("location", location, 'str'), - 'publisherName': self._serialize.url("publisher_name", publisher_name, 'str'), - 'offer': self._serialize.url("offer", offer, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('[VirtualMachineImageResource]', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - list_skus.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/publishers/{publisherName}/artifacttypes/vmimage/offers/{offer}/skus'} diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/operations/virtual_machine_run_commands_operations.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/operations/virtual_machine_run_commands_operations.py deleted file mode 100644 index 0c8eeab43450..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/operations/virtual_machine_run_commands_operations.py +++ /dev/null @@ -1,167 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError - -from .. import models - - -class VirtualMachineRunCommandsOperations(object): - """VirtualMachineRunCommandsOperations operations. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: Client Api Version. Constant value: "2018-04-01". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2018-04-01" - - self.config = config - - def list( - self, location, custom_headers=None, raw=False, **operation_config): - """Lists all available run commands for a subscription in a location. - - :param location: The location upon which run commands is queried. - :type location: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of RunCommandDocumentBase - :rtype: - ~azure.mgmt.compute.v2018_04_01.models.RunCommandDocumentBasePaged[~azure.mgmt.compute.v2018_04_01.models.RunCommandDocumentBase] - :raises: :class:`CloudError` - """ - def internal_paging(next_link=None, raw=False): - - if not next_link: - # Construct URL - url = self.list.metadata['url'] - path_format_arguments = { - 'location': self._serialize.url("location", location, 'str', pattern=r'^[-\w\._]+$'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - deserialized = models.RunCommandDocumentBasePaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.RunCommandDocumentBasePaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/runCommands'} - - def get( - self, location, command_id, custom_headers=None, raw=False, **operation_config): - """Gets specific run command for a subscription in a location. - - :param location: The location upon which run commands is queried. - :type location: str - :param command_id: The command id. - :type command_id: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: RunCommandDocument or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.compute.v2018_04_01.models.RunCommandDocument or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get.metadata['url'] - path_format_arguments = { - 'location': self._serialize.url("location", location, 'str', pattern=r'^[-\w\._]+$'), - 'commandId': self._serialize.url("command_id", command_id, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('RunCommandDocument', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/runCommands/{commandId}'} diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/operations/virtual_machine_scale_set_extensions_operations.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/operations/virtual_machine_scale_set_extensions_operations.py deleted file mode 100644 index 093cfd9bd739..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/operations/virtual_machine_scale_set_extensions_operations.py +++ /dev/null @@ -1,377 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError -from msrest.polling import LROPoller, NoPolling -from msrestazure.polling.arm_polling import ARMPolling - -from .. import models - - -class VirtualMachineScaleSetExtensionsOperations(object): - """VirtualMachineScaleSetExtensionsOperations operations. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: Client Api Version. Constant value: "2018-04-01". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2018-04-01" - - self.config = config - - - def _create_or_update_initial( - self, resource_group_name, vm_scale_set_name, vmss_extension_name, extension_parameters, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.create_or_update.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), - 'vmssExtensionName': self._serialize.url("vmss_extension_name", vmss_extension_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(extension_parameters, 'VirtualMachineScaleSetExtension') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 201]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('VirtualMachineScaleSetExtension', response) - if response.status_code == 201: - deserialized = self._deserialize('VirtualMachineScaleSetExtension', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def create_or_update( - self, resource_group_name, vm_scale_set_name, vmss_extension_name, extension_parameters, custom_headers=None, raw=False, polling=True, **operation_config): - """The operation to create or update an extension. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param vm_scale_set_name: The name of the VM scale set where the - extension should be create or updated. - :type vm_scale_set_name: str - :param vmss_extension_name: The name of the VM scale set extension. - :type vmss_extension_name: str - :param extension_parameters: Parameters supplied to the Create VM - scale set Extension operation. - :type extension_parameters: - ~azure.mgmt.compute.v2018_04_01.models.VirtualMachineScaleSetExtension - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns - VirtualMachineScaleSetExtension or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2018_04_01.models.VirtualMachineScaleSetExtension] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2018_04_01.models.VirtualMachineScaleSetExtension]] - :raises: :class:`CloudError` - """ - raw_result = self._create_or_update_initial( - resource_group_name=resource_group_name, - vm_scale_set_name=vm_scale_set_name, - vmss_extension_name=vmss_extension_name, - extension_parameters=extension_parameters, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('VirtualMachineScaleSetExtension', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/extensions/{vmssExtensionName}'} - - - def _delete_initial( - self, resource_group_name, vm_scale_set_name, vmss_extension_name, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.delete.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), - 'vmssExtensionName': self._serialize.url("vmss_extension_name", vmss_extension_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202, 204]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - def delete( - self, resource_group_name, vm_scale_set_name, vmss_extension_name, custom_headers=None, raw=False, polling=True, **operation_config): - """The operation to delete the extension. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param vm_scale_set_name: The name of the VM scale set where the - extension should be deleted. - :type vm_scale_set_name: str - :param vmss_extension_name: The name of the VM scale set extension. - :type vmss_extension_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns None or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] - :raises: :class:`CloudError` - """ - raw_result = self._delete_initial( - resource_group_name=resource_group_name, - vm_scale_set_name=vm_scale_set_name, - vmss_extension_name=vmss_extension_name, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/extensions/{vmssExtensionName}'} - - def get( - self, resource_group_name, vm_scale_set_name, vmss_extension_name, expand=None, custom_headers=None, raw=False, **operation_config): - """The operation to get the extension. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param vm_scale_set_name: The name of the VM scale set containing the - extension. - :type vm_scale_set_name: str - :param vmss_extension_name: The name of the VM scale set extension. - :type vmss_extension_name: str - :param expand: The expand expression to apply on the operation. - :type expand: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: VirtualMachineScaleSetExtension or ClientRawResponse if - raw=true - :rtype: - ~azure.mgmt.compute.v2018_04_01.models.VirtualMachineScaleSetExtension - or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), - 'vmssExtensionName': self._serialize.url("vmss_extension_name", vmss_extension_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - if expand is not None: - query_parameters['$expand'] = self._serialize.query("expand", expand, 'str') - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('VirtualMachineScaleSetExtension', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/extensions/{vmssExtensionName}'} - - def list( - self, resource_group_name, vm_scale_set_name, custom_headers=None, raw=False, **operation_config): - """Gets a list of all extensions in a VM scale set. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param vm_scale_set_name: The name of the VM scale set containing the - extension. - :type vm_scale_set_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of VirtualMachineScaleSetExtension - :rtype: - ~azure.mgmt.compute.v2018_04_01.models.VirtualMachineScaleSetExtensionPaged[~azure.mgmt.compute.v2018_04_01.models.VirtualMachineScaleSetExtension] - :raises: :class:`CloudError` - """ - def internal_paging(next_link=None, raw=False): - - if not next_link: - # Construct URL - url = self.list.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - deserialized = models.VirtualMachineScaleSetExtensionPaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.VirtualMachineScaleSetExtensionPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/extensions'} diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/operations/virtual_machine_scale_set_rolling_upgrades_operations.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/operations/virtual_machine_scale_set_rolling_upgrades_operations.py deleted file mode 100644 index 53d2f79560d3..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/operations/virtual_machine_scale_set_rolling_upgrades_operations.py +++ /dev/null @@ -1,265 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError -from msrest.polling import LROPoller, NoPolling -from msrestazure.polling.arm_polling import ARMPolling - -from .. import models - - -class VirtualMachineScaleSetRollingUpgradesOperations(object): - """VirtualMachineScaleSetRollingUpgradesOperations operations. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: Client Api Version. Constant value: "2018-04-01". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2018-04-01" - - self.config = config - - - def _cancel_initial( - self, resource_group_name, vm_scale_set_name, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.cancel.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - def cancel( - self, resource_group_name, vm_scale_set_name, custom_headers=None, raw=False, polling=True, **operation_config): - """Cancels the current virtual machine scale set rolling upgrade. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param vm_scale_set_name: The name of the VM scale set. - :type vm_scale_set_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns None or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] - :raises: :class:`CloudError` - """ - raw_result = self._cancel_initial( - resource_group_name=resource_group_name, - vm_scale_set_name=vm_scale_set_name, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - cancel.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/rollingUpgrades/cancel'} - - - def _start_os_upgrade_initial( - self, resource_group_name, vm_scale_set_name, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.start_os_upgrade.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - def start_os_upgrade( - self, resource_group_name, vm_scale_set_name, custom_headers=None, raw=False, polling=True, **operation_config): - """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. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param vm_scale_set_name: The name of the VM scale set. - :type vm_scale_set_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns None or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] - :raises: :class:`CloudError` - """ - raw_result = self._start_os_upgrade_initial( - resource_group_name=resource_group_name, - vm_scale_set_name=vm_scale_set_name, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - start_os_upgrade.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/osRollingUpgrade'} - - def get_latest( - self, resource_group_name, vm_scale_set_name, custom_headers=None, raw=False, **operation_config): - """Gets the status of the latest virtual machine scale set rolling - upgrade. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param vm_scale_set_name: The name of the VM scale set. - :type vm_scale_set_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: RollingUpgradeStatusInfo or ClientRawResponse if raw=true - :rtype: - ~azure.mgmt.compute.v2018_04_01.models.RollingUpgradeStatusInfo or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get_latest.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('RollingUpgradeStatusInfo', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_latest.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/rollingUpgrades/latest'} diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/operations/virtual_machine_scale_set_vms_operations.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/operations/virtual_machine_scale_set_vms_operations.py deleted file mode 100644 index fa2de2d4f985..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/operations/virtual_machine_scale_set_vms_operations.py +++ /dev/null @@ -1,1226 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError -from msrest.polling import LROPoller, NoPolling -from msrestazure.polling.arm_polling import ARMPolling - -from .. import models - - -class VirtualMachineScaleSetVMsOperations(object): - """VirtualMachineScaleSetVMsOperations operations. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: Client Api Version. Constant value: "2018-04-01". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2018-04-01" - - self.config = config - - - def _reimage_initial( - self, resource_group_name, vm_scale_set_name, instance_id, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.reimage.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), - 'instanceId': self._serialize.url("instance_id", instance_id, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - def reimage( - self, resource_group_name, vm_scale_set_name, instance_id, custom_headers=None, raw=False, polling=True, **operation_config): - """Reimages (upgrade the operating system) a specific virtual machine in a - VM scale set. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param vm_scale_set_name: The name of the VM scale set. - :type vm_scale_set_name: str - :param instance_id: The instance ID of the virtual machine. - :type instance_id: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns None or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] - :raises: :class:`CloudError` - """ - raw_result = self._reimage_initial( - resource_group_name=resource_group_name, - vm_scale_set_name=vm_scale_set_name, - instance_id=instance_id, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - reimage.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/virtualmachines/{instanceId}/reimage'} - - - def _reimage_all_initial( - self, resource_group_name, vm_scale_set_name, instance_id, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.reimage_all.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), - 'instanceId': self._serialize.url("instance_id", instance_id, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - def reimage_all( - self, resource_group_name, vm_scale_set_name, instance_id, custom_headers=None, raw=False, polling=True, **operation_config): - """Allows you to re-image all the disks ( including data disks ) in the a - VM scale set instance. This operation is only supported for managed - disks. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param vm_scale_set_name: The name of the VM scale set. - :type vm_scale_set_name: str - :param instance_id: The instance ID of the virtual machine. - :type instance_id: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns None or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] - :raises: :class:`CloudError` - """ - raw_result = self._reimage_all_initial( - resource_group_name=resource_group_name, - vm_scale_set_name=vm_scale_set_name, - instance_id=instance_id, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - reimage_all.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/virtualmachines/{instanceId}/reimageall'} - - - def _deallocate_initial( - self, resource_group_name, vm_scale_set_name, instance_id, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.deallocate.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), - 'instanceId': self._serialize.url("instance_id", instance_id, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - def deallocate( - self, resource_group_name, vm_scale_set_name, instance_id, custom_headers=None, raw=False, polling=True, **operation_config): - """Deallocates a specific virtual machine in a VM scale set. Shuts down - the virtual machine and releases the compute resources it uses. You are - not billed for the compute resources of this virtual machine once it is - deallocated. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param vm_scale_set_name: The name of the VM scale set. - :type vm_scale_set_name: str - :param instance_id: The instance ID of the virtual machine. - :type instance_id: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns None or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] - :raises: :class:`CloudError` - """ - raw_result = self._deallocate_initial( - resource_group_name=resource_group_name, - vm_scale_set_name=vm_scale_set_name, - instance_id=instance_id, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - deallocate.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/virtualmachines/{instanceId}/deallocate'} - - - def _update_initial( - self, resource_group_name, vm_scale_set_name, instance_id, parameters, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.update.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), - 'instanceId': self._serialize.url("instance_id", instance_id, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(parameters, 'VirtualMachineScaleSetVM') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('VirtualMachineScaleSetVM', response) - if response.status_code == 202: - deserialized = self._deserialize('VirtualMachineScaleSetVM', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def update( - self, resource_group_name, vm_scale_set_name, instance_id, parameters, custom_headers=None, raw=False, polling=True, **operation_config): - """Updates a virtual machine of a VM scale set. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param vm_scale_set_name: The name of the VM scale set where the - extension should be create or updated. - :type vm_scale_set_name: str - :param instance_id: The instance ID of the virtual machine. - :type instance_id: str - :param parameters: Parameters supplied to the Update Virtual Machine - Scale Sets VM operation. - :type parameters: - ~azure.mgmt.compute.v2018_04_01.models.VirtualMachineScaleSetVM - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns - VirtualMachineScaleSetVM or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2018_04_01.models.VirtualMachineScaleSetVM] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2018_04_01.models.VirtualMachineScaleSetVM]] - :raises: :class:`CloudError` - """ - raw_result = self._update_initial( - resource_group_name=resource_group_name, - vm_scale_set_name=vm_scale_set_name, - instance_id=instance_id, - parameters=parameters, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('VirtualMachineScaleSetVM', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/virtualmachines/{instanceId}'} - - - def _delete_initial( - self, resource_group_name, vm_scale_set_name, instance_id, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.delete.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), - 'instanceId': self._serialize.url("instance_id", instance_id, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202, 204]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - def delete( - self, resource_group_name, vm_scale_set_name, instance_id, custom_headers=None, raw=False, polling=True, **operation_config): - """Deletes a virtual machine from a VM scale set. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param vm_scale_set_name: The name of the VM scale set. - :type vm_scale_set_name: str - :param instance_id: The instance ID of the virtual machine. - :type instance_id: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns None or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] - :raises: :class:`CloudError` - """ - raw_result = self._delete_initial( - resource_group_name=resource_group_name, - vm_scale_set_name=vm_scale_set_name, - instance_id=instance_id, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/virtualmachines/{instanceId}'} - - def get( - self, resource_group_name, vm_scale_set_name, instance_id, custom_headers=None, raw=False, **operation_config): - """Gets a virtual machine from a VM scale set. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param vm_scale_set_name: The name of the VM scale set. - :type vm_scale_set_name: str - :param instance_id: The instance ID of the virtual machine. - :type instance_id: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: VirtualMachineScaleSetVM or ClientRawResponse if raw=true - :rtype: - ~azure.mgmt.compute.v2018_04_01.models.VirtualMachineScaleSetVM or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), - 'instanceId': self._serialize.url("instance_id", instance_id, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('VirtualMachineScaleSetVM', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/virtualmachines/{instanceId}'} - - def get_instance_view( - self, resource_group_name, vm_scale_set_name, instance_id, custom_headers=None, raw=False, **operation_config): - """Gets the status of a virtual machine from a VM scale set. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param vm_scale_set_name: The name of the VM scale set. - :type vm_scale_set_name: str - :param instance_id: The instance ID of the virtual machine. - :type instance_id: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: VirtualMachineScaleSetVMInstanceView or ClientRawResponse if - raw=true - :rtype: - ~azure.mgmt.compute.v2018_04_01.models.VirtualMachineScaleSetVMInstanceView - or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get_instance_view.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), - 'instanceId': self._serialize.url("instance_id", instance_id, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('VirtualMachineScaleSetVMInstanceView', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_instance_view.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/virtualmachines/{instanceId}/instanceView'} - - def list( - self, resource_group_name, virtual_machine_scale_set_name, filter=None, select=None, expand=None, custom_headers=None, raw=False, **operation_config): - """Gets a list of all virtual machines in a VM scale sets. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param virtual_machine_scale_set_name: The name of the VM scale set. - :type virtual_machine_scale_set_name: str - :param filter: The filter to apply to the operation. - :type filter: str - :param select: The list parameters. - :type select: str - :param expand: The expand expression to apply to the operation. - :type expand: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of VirtualMachineScaleSetVM - :rtype: - ~azure.mgmt.compute.v2018_04_01.models.VirtualMachineScaleSetVMPaged[~azure.mgmt.compute.v2018_04_01.models.VirtualMachineScaleSetVM] - :raises: :class:`CloudError` - """ - def internal_paging(next_link=None, raw=False): - - if not next_link: - # Construct URL - url = self.list.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'virtualMachineScaleSetName': self._serialize.url("virtual_machine_scale_set_name", virtual_machine_scale_set_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - if filter is not None: - query_parameters['$filter'] = self._serialize.query("filter", filter, 'str') - if select is not None: - query_parameters['$select'] = self._serialize.query("select", select, 'str') - if expand is not None: - query_parameters['$expand'] = self._serialize.query("expand", expand, 'str') - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - deserialized = models.VirtualMachineScaleSetVMPaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.VirtualMachineScaleSetVMPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{virtualMachineScaleSetName}/virtualMachines'} - - - def _power_off_initial( - self, resource_group_name, vm_scale_set_name, instance_id, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.power_off.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), - 'instanceId': self._serialize.url("instance_id", instance_id, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - def power_off( - self, resource_group_name, vm_scale_set_name, instance_id, custom_headers=None, raw=False, polling=True, **operation_config): - """Power off (stop) a virtual machine in a VM scale set. Note that - resources are still attached and you are getting charged for the - resources. Instead, use deallocate to release resources and avoid - charges. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param vm_scale_set_name: The name of the VM scale set. - :type vm_scale_set_name: str - :param instance_id: The instance ID of the virtual machine. - :type instance_id: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns None or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] - :raises: :class:`CloudError` - """ - raw_result = self._power_off_initial( - resource_group_name=resource_group_name, - vm_scale_set_name=vm_scale_set_name, - instance_id=instance_id, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - power_off.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/virtualmachines/{instanceId}/poweroff'} - - - def _restart_initial( - self, resource_group_name, vm_scale_set_name, instance_id, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.restart.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), - 'instanceId': self._serialize.url("instance_id", instance_id, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - def restart( - self, resource_group_name, vm_scale_set_name, instance_id, custom_headers=None, raw=False, polling=True, **operation_config): - """Restarts a virtual machine in a VM scale set. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param vm_scale_set_name: The name of the VM scale set. - :type vm_scale_set_name: str - :param instance_id: The instance ID of the virtual machine. - :type instance_id: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns None or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] - :raises: :class:`CloudError` - """ - raw_result = self._restart_initial( - resource_group_name=resource_group_name, - vm_scale_set_name=vm_scale_set_name, - instance_id=instance_id, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - restart.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/virtualmachines/{instanceId}/restart'} - - - def _start_initial( - self, resource_group_name, vm_scale_set_name, instance_id, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.start.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), - 'instanceId': self._serialize.url("instance_id", instance_id, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - def start( - self, resource_group_name, vm_scale_set_name, instance_id, custom_headers=None, raw=False, polling=True, **operation_config): - """Starts a virtual machine in a VM scale set. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param vm_scale_set_name: The name of the VM scale set. - :type vm_scale_set_name: str - :param instance_id: The instance ID of the virtual machine. - :type instance_id: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns None or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] - :raises: :class:`CloudError` - """ - raw_result = self._start_initial( - resource_group_name=resource_group_name, - vm_scale_set_name=vm_scale_set_name, - instance_id=instance_id, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - start.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/virtualmachines/{instanceId}/start'} - - - def _redeploy_initial( - self, resource_group_name, vm_scale_set_name, instance_id, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.redeploy.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), - 'instanceId': self._serialize.url("instance_id", instance_id, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - def redeploy( - self, resource_group_name, vm_scale_set_name, instance_id, custom_headers=None, raw=False, polling=True, **operation_config): - """Redeploys a virtual machine in a VM scale set. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param vm_scale_set_name: The name of the VM scale set. - :type vm_scale_set_name: str - :param instance_id: The instance ID of the virtual machine. - :type instance_id: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns None or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] - :raises: :class:`CloudError` - """ - raw_result = self._redeploy_initial( - resource_group_name=resource_group_name, - vm_scale_set_name=vm_scale_set_name, - instance_id=instance_id, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - redeploy.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/virtualmachines/{instanceId}/redeploy'} - - - def _perform_maintenance_initial( - self, resource_group_name, vm_scale_set_name, instance_id, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.perform_maintenance.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), - 'instanceId': self._serialize.url("instance_id", instance_id, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - def perform_maintenance( - self, resource_group_name, vm_scale_set_name, instance_id, custom_headers=None, raw=False, polling=True, **operation_config): - """Performs maintenance on a virtual machine in a VM scale set. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param vm_scale_set_name: The name of the VM scale set. - :type vm_scale_set_name: str - :param instance_id: The instance ID of the virtual machine. - :type instance_id: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns None or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] - :raises: :class:`CloudError` - """ - raw_result = self._perform_maintenance_initial( - resource_group_name=resource_group_name, - vm_scale_set_name=vm_scale_set_name, - instance_id=instance_id, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - perform_maintenance.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/virtualmachines/{instanceId}/performMaintenance'} - - - def _run_command_initial( - self, resource_group_name, vm_scale_set_name, instance_id, parameters, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.run_command.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), - 'instanceId': self._serialize.url("instance_id", instance_id, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(parameters, 'RunCommandInput') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('RunCommandResult', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def run_command( - self, resource_group_name, vm_scale_set_name, instance_id, parameters, custom_headers=None, raw=False, polling=True, **operation_config): - """Run command on a virtual machine in a VM scale set. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param vm_scale_set_name: The name of the VM scale set. - :type vm_scale_set_name: str - :param instance_id: The instance ID of the virtual machine. - :type instance_id: str - :param parameters: Parameters supplied to the Run command operation. - :type parameters: - ~azure.mgmt.compute.v2018_04_01.models.RunCommandInput - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns RunCommandResult or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2018_04_01.models.RunCommandResult] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2018_04_01.models.RunCommandResult]] - :raises: :class:`CloudError` - """ - raw_result = self._run_command_initial( - resource_group_name=resource_group_name, - vm_scale_set_name=vm_scale_set_name, - instance_id=instance_id, - parameters=parameters, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('RunCommandResult', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - run_command.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/virtualmachines/{instanceId}/runCommand'} diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/operations/virtual_machine_scale_sets_operations.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/operations/virtual_machine_scale_sets_operations.py deleted file mode 100644 index e2ec6fe9dcd1..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/operations/virtual_machine_scale_sets_operations.py +++ /dev/null @@ -1,1750 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError -from msrest.polling import LROPoller, NoPolling -from msrestazure.polling.arm_polling import ARMPolling - -from .. import models - - -class VirtualMachineScaleSetsOperations(object): - """VirtualMachineScaleSetsOperations operations. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: Client Api Version. Constant value: "2018-04-01". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2018-04-01" - - self.config = config - - - def _create_or_update_initial( - self, resource_group_name, vm_scale_set_name, parameters, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.create_or_update.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(parameters, 'VirtualMachineScaleSet') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 201]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('VirtualMachineScaleSet', response) - if response.status_code == 201: - deserialized = self._deserialize('VirtualMachineScaleSet', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def create_or_update( - self, resource_group_name, vm_scale_set_name, parameters, custom_headers=None, raw=False, polling=True, **operation_config): - """Create or update a VM scale set. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param vm_scale_set_name: The name of the VM scale set to create or - update. - :type vm_scale_set_name: str - :param parameters: The scale set object. - :type parameters: - ~azure.mgmt.compute.v2018_04_01.models.VirtualMachineScaleSet - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns VirtualMachineScaleSet - or ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2018_04_01.models.VirtualMachineScaleSet] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2018_04_01.models.VirtualMachineScaleSet]] - :raises: :class:`CloudError` - """ - raw_result = self._create_or_update_initial( - resource_group_name=resource_group_name, - vm_scale_set_name=vm_scale_set_name, - parameters=parameters, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('VirtualMachineScaleSet', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}'} - - - def _update_initial( - self, resource_group_name, vm_scale_set_name, parameters, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.update.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(parameters, 'VirtualMachineScaleSetUpdate') - - # Construct and send request - request = self._client.patch(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('VirtualMachineScaleSet', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def update( - self, resource_group_name, vm_scale_set_name, parameters, custom_headers=None, raw=False, polling=True, **operation_config): - """Update a VM scale set. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param vm_scale_set_name: The name of the VM scale set to create or - update. - :type vm_scale_set_name: str - :param parameters: The scale set object. - :type parameters: - ~azure.mgmt.compute.v2018_04_01.models.VirtualMachineScaleSetUpdate - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns VirtualMachineScaleSet - or ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2018_04_01.models.VirtualMachineScaleSet] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2018_04_01.models.VirtualMachineScaleSet]] - :raises: :class:`CloudError` - """ - raw_result = self._update_initial( - resource_group_name=resource_group_name, - vm_scale_set_name=vm_scale_set_name, - parameters=parameters, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('VirtualMachineScaleSet', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}'} - - - def _delete_initial( - self, resource_group_name, vm_scale_set_name, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.delete.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202, 204]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - def delete( - self, resource_group_name, vm_scale_set_name, custom_headers=None, raw=False, polling=True, **operation_config): - """Deletes a VM scale set. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param vm_scale_set_name: The name of the VM scale set. - :type vm_scale_set_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns None or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] - :raises: :class:`CloudError` - """ - raw_result = self._delete_initial( - resource_group_name=resource_group_name, - vm_scale_set_name=vm_scale_set_name, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}'} - - def get( - self, resource_group_name, vm_scale_set_name, custom_headers=None, raw=False, **operation_config): - """Display information about a virtual machine scale set. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param vm_scale_set_name: The name of the VM scale set. - :type vm_scale_set_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: VirtualMachineScaleSet or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.compute.v2018_04_01.models.VirtualMachineScaleSet - or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('VirtualMachineScaleSet', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}'} - - - def _deallocate_initial( - self, resource_group_name, vm_scale_set_name, instance_ids=None, custom_headers=None, raw=False, **operation_config): - vm_instance_ids = None - if instance_ids is not None: - vm_instance_ids = models.VirtualMachineScaleSetVMInstanceIDs(instance_ids=instance_ids) - - # Construct URL - url = self.deallocate.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - if vm_instance_ids is not None: - body_content = self._serialize.body(vm_instance_ids, 'VirtualMachineScaleSetVMInstanceIDs') - else: - body_content = None - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - def deallocate( - self, resource_group_name, vm_scale_set_name, instance_ids=None, custom_headers=None, raw=False, polling=True, **operation_config): - """Deallocates specific virtual machines in a VM scale set. Shuts down the - virtual machines and releases the compute resources. You are not billed - for the compute resources that this virtual machine scale set - deallocates. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param vm_scale_set_name: The name of the VM scale set. - :type vm_scale_set_name: str - :param instance_ids: The virtual machine scale set instance ids. - Omitting the virtual machine scale set instance ids will result in the - operation being performed on all virtual machines in the virtual - machine scale set. - :type instance_ids: list[str] - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns None or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] - :raises: :class:`CloudError` - """ - raw_result = self._deallocate_initial( - resource_group_name=resource_group_name, - vm_scale_set_name=vm_scale_set_name, - instance_ids=instance_ids, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - deallocate.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/deallocate'} - - - def _delete_instances_initial( - self, resource_group_name, vm_scale_set_name, instance_ids, custom_headers=None, raw=False, **operation_config): - vm_instance_ids = models.VirtualMachineScaleSetVMInstanceRequiredIDs(instance_ids=instance_ids) - - # Construct URL - url = self.delete_instances.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(vm_instance_ids, 'VirtualMachineScaleSetVMInstanceRequiredIDs') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - def delete_instances( - self, resource_group_name, vm_scale_set_name, instance_ids, custom_headers=None, raw=False, polling=True, **operation_config): - """Deletes virtual machines in a VM scale set. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param vm_scale_set_name: The name of the VM scale set. - :type vm_scale_set_name: str - :param instance_ids: The virtual machine scale set instance ids. - :type instance_ids: list[str] - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns None or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] - :raises: :class:`CloudError` - """ - raw_result = self._delete_instances_initial( - resource_group_name=resource_group_name, - vm_scale_set_name=vm_scale_set_name, - instance_ids=instance_ids, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - delete_instances.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/delete'} - - def get_instance_view( - self, resource_group_name, vm_scale_set_name, custom_headers=None, raw=False, **operation_config): - """Gets the status of a VM scale set instance. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param vm_scale_set_name: The name of the VM scale set. - :type vm_scale_set_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: VirtualMachineScaleSetInstanceView or ClientRawResponse if - raw=true - :rtype: - ~azure.mgmt.compute.v2018_04_01.models.VirtualMachineScaleSetInstanceView - or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get_instance_view.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('VirtualMachineScaleSetInstanceView', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_instance_view.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/instanceView'} - - def list( - self, resource_group_name, custom_headers=None, raw=False, **operation_config): - """Gets a list of all VM scale sets under a resource group. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of VirtualMachineScaleSet - :rtype: - ~azure.mgmt.compute.v2018_04_01.models.VirtualMachineScaleSetPaged[~azure.mgmt.compute.v2018_04_01.models.VirtualMachineScaleSet] - :raises: :class:`CloudError` - """ - def internal_paging(next_link=None, raw=False): - - if not next_link: - # Construct URL - url = self.list.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - deserialized = models.VirtualMachineScaleSetPaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.VirtualMachineScaleSetPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets'} - - def list_all( - self, custom_headers=None, raw=False, **operation_config): - """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. - - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of VirtualMachineScaleSet - :rtype: - ~azure.mgmt.compute.v2018_04_01.models.VirtualMachineScaleSetPaged[~azure.mgmt.compute.v2018_04_01.models.VirtualMachineScaleSet] - :raises: :class:`CloudError` - """ - def internal_paging(next_link=None, raw=False): - - if not next_link: - # Construct URL - url = self.list_all.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - deserialized = models.VirtualMachineScaleSetPaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.VirtualMachineScaleSetPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - list_all.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Compute/virtualMachineScaleSets'} - - def list_skus( - self, resource_group_name, vm_scale_set_name, custom_headers=None, raw=False, **operation_config): - """Gets a list of SKUs available for your VM scale set, including the - minimum and maximum VM instances allowed for each SKU. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param vm_scale_set_name: The name of the VM scale set. - :type vm_scale_set_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of VirtualMachineScaleSetSku - :rtype: - ~azure.mgmt.compute.v2018_04_01.models.VirtualMachineScaleSetSkuPaged[~azure.mgmt.compute.v2018_04_01.models.VirtualMachineScaleSetSku] - :raises: :class:`CloudError` - """ - def internal_paging(next_link=None, raw=False): - - if not next_link: - # Construct URL - url = self.list_skus.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - deserialized = models.VirtualMachineScaleSetSkuPaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.VirtualMachineScaleSetSkuPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - list_skus.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/skus'} - - def get_os_upgrade_history( - self, resource_group_name, vm_scale_set_name, custom_headers=None, raw=False, **operation_config): - """Gets list of OS upgrades on a VM scale set instance. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param vm_scale_set_name: The name of the VM scale set. - :type vm_scale_set_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of - UpgradeOperationHistoricalStatusInfo - :rtype: - ~azure.mgmt.compute.v2018_04_01.models.UpgradeOperationHistoricalStatusInfoPaged[~azure.mgmt.compute.v2018_04_01.models.UpgradeOperationHistoricalStatusInfo] - :raises: :class:`CloudError` - """ - def internal_paging(next_link=None, raw=False): - - if not next_link: - # Construct URL - url = self.get_os_upgrade_history.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - deserialized = models.UpgradeOperationHistoricalStatusInfoPaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.UpgradeOperationHistoricalStatusInfoPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - get_os_upgrade_history.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/osUpgradeHistory'} - - - def _power_off_initial( - self, resource_group_name, vm_scale_set_name, instance_ids=None, custom_headers=None, raw=False, **operation_config): - vm_instance_ids = None - if instance_ids is not None: - vm_instance_ids = models.VirtualMachineScaleSetVMInstanceIDs(instance_ids=instance_ids) - - # Construct URL - url = self.power_off.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - if vm_instance_ids is not None: - body_content = self._serialize.body(vm_instance_ids, 'VirtualMachineScaleSetVMInstanceIDs') - else: - body_content = None - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - def power_off( - self, resource_group_name, vm_scale_set_name, instance_ids=None, custom_headers=None, raw=False, polling=True, **operation_config): - """Power off (stop) one or more virtual machines in a VM scale set. Note - that resources are still attached and you are getting charged for the - resources. Instead, use deallocate to release resources and avoid - charges. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param vm_scale_set_name: The name of the VM scale set. - :type vm_scale_set_name: str - :param instance_ids: The virtual machine scale set instance ids. - Omitting the virtual machine scale set instance ids will result in the - operation being performed on all virtual machines in the virtual - machine scale set. - :type instance_ids: list[str] - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns None or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] - :raises: :class:`CloudError` - """ - raw_result = self._power_off_initial( - resource_group_name=resource_group_name, - vm_scale_set_name=vm_scale_set_name, - instance_ids=instance_ids, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - power_off.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/poweroff'} - - - def _restart_initial( - self, resource_group_name, vm_scale_set_name, instance_ids=None, custom_headers=None, raw=False, **operation_config): - vm_instance_ids = None - if instance_ids is not None: - vm_instance_ids = models.VirtualMachineScaleSetVMInstanceIDs(instance_ids=instance_ids) - - # Construct URL - url = self.restart.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - if vm_instance_ids is not None: - body_content = self._serialize.body(vm_instance_ids, 'VirtualMachineScaleSetVMInstanceIDs') - else: - body_content = None - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - def restart( - self, resource_group_name, vm_scale_set_name, instance_ids=None, custom_headers=None, raw=False, polling=True, **operation_config): - """Restarts one or more virtual machines in a VM scale set. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param vm_scale_set_name: The name of the VM scale set. - :type vm_scale_set_name: str - :param instance_ids: The virtual machine scale set instance ids. - Omitting the virtual machine scale set instance ids will result in the - operation being performed on all virtual machines in the virtual - machine scale set. - :type instance_ids: list[str] - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns None or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] - :raises: :class:`CloudError` - """ - raw_result = self._restart_initial( - resource_group_name=resource_group_name, - vm_scale_set_name=vm_scale_set_name, - instance_ids=instance_ids, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - restart.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/restart'} - - - def _start_initial( - self, resource_group_name, vm_scale_set_name, instance_ids=None, custom_headers=None, raw=False, **operation_config): - vm_instance_ids = None - if instance_ids is not None: - vm_instance_ids = models.VirtualMachineScaleSetVMInstanceIDs(instance_ids=instance_ids) - - # Construct URL - url = self.start.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - if vm_instance_ids is not None: - body_content = self._serialize.body(vm_instance_ids, 'VirtualMachineScaleSetVMInstanceIDs') - else: - body_content = None - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - def start( - self, resource_group_name, vm_scale_set_name, instance_ids=None, custom_headers=None, raw=False, polling=True, **operation_config): - """Starts one or more virtual machines in a VM scale set. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param vm_scale_set_name: The name of the VM scale set. - :type vm_scale_set_name: str - :param instance_ids: The virtual machine scale set instance ids. - Omitting the virtual machine scale set instance ids will result in the - operation being performed on all virtual machines in the virtual - machine scale set. - :type instance_ids: list[str] - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns None or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] - :raises: :class:`CloudError` - """ - raw_result = self._start_initial( - resource_group_name=resource_group_name, - vm_scale_set_name=vm_scale_set_name, - instance_ids=instance_ids, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - start.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/start'} - - - def _redeploy_initial( - self, resource_group_name, vm_scale_set_name, instance_ids=None, custom_headers=None, raw=False, **operation_config): - vm_instance_ids = None - if instance_ids is not None: - vm_instance_ids = models.VirtualMachineScaleSetVMInstanceIDs(instance_ids=instance_ids) - - # Construct URL - url = self.redeploy.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - if vm_instance_ids is not None: - body_content = self._serialize.body(vm_instance_ids, 'VirtualMachineScaleSetVMInstanceIDs') - else: - body_content = None - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - def redeploy( - self, resource_group_name, vm_scale_set_name, instance_ids=None, custom_headers=None, raw=False, polling=True, **operation_config): - """Redeploy one or more virtual machines in a VM scale set. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param vm_scale_set_name: The name of the VM scale set. - :type vm_scale_set_name: str - :param instance_ids: The virtual machine scale set instance ids. - Omitting the virtual machine scale set instance ids will result in the - operation being performed on all virtual machines in the virtual - machine scale set. - :type instance_ids: list[str] - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns None or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] - :raises: :class:`CloudError` - """ - raw_result = self._redeploy_initial( - resource_group_name=resource_group_name, - vm_scale_set_name=vm_scale_set_name, - instance_ids=instance_ids, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - redeploy.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/redeploy'} - - - def _perform_maintenance_initial( - self, resource_group_name, vm_scale_set_name, instance_ids=None, custom_headers=None, raw=False, **operation_config): - vm_instance_ids = None - if instance_ids is not None: - vm_instance_ids = models.VirtualMachineScaleSetVMInstanceIDs(instance_ids=instance_ids) - - # Construct URL - url = self.perform_maintenance.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - if vm_instance_ids is not None: - body_content = self._serialize.body(vm_instance_ids, 'VirtualMachineScaleSetVMInstanceIDs') - else: - body_content = None - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - def perform_maintenance( - self, resource_group_name, vm_scale_set_name, instance_ids=None, custom_headers=None, raw=False, polling=True, **operation_config): - """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. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param vm_scale_set_name: The name of the VM scale set. - :type vm_scale_set_name: str - :param instance_ids: The virtual machine scale set instance ids. - Omitting the virtual machine scale set instance ids will result in the - operation being performed on all virtual machines in the virtual - machine scale set. - :type instance_ids: list[str] - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns None or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] - :raises: :class:`CloudError` - """ - raw_result = self._perform_maintenance_initial( - resource_group_name=resource_group_name, - vm_scale_set_name=vm_scale_set_name, - instance_ids=instance_ids, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - perform_maintenance.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/performMaintenance'} - - - def _update_instances_initial( - self, resource_group_name, vm_scale_set_name, instance_ids, custom_headers=None, raw=False, **operation_config): - vm_instance_ids = models.VirtualMachineScaleSetVMInstanceRequiredIDs(instance_ids=instance_ids) - - # Construct URL - url = self.update_instances.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(vm_instance_ids, 'VirtualMachineScaleSetVMInstanceRequiredIDs') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - def update_instances( - self, resource_group_name, vm_scale_set_name, instance_ids, custom_headers=None, raw=False, polling=True, **operation_config): - """Upgrades one or more virtual machines to the latest SKU set in the VM - scale set model. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param vm_scale_set_name: The name of the VM scale set. - :type vm_scale_set_name: str - :param instance_ids: The virtual machine scale set instance ids. - :type instance_ids: list[str] - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns None or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] - :raises: :class:`CloudError` - """ - raw_result = self._update_instances_initial( - resource_group_name=resource_group_name, - vm_scale_set_name=vm_scale_set_name, - instance_ids=instance_ids, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - update_instances.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/manualupgrade'} - - - def _reimage_initial( - self, resource_group_name, vm_scale_set_name, instance_ids=None, custom_headers=None, raw=False, **operation_config): - vm_instance_ids = None - if instance_ids is not None: - vm_instance_ids = models.VirtualMachineScaleSetVMInstanceIDs(instance_ids=instance_ids) - - # Construct URL - url = self.reimage.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - if vm_instance_ids is not None: - body_content = self._serialize.body(vm_instance_ids, 'VirtualMachineScaleSetVMInstanceIDs') - else: - body_content = None - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - def reimage( - self, resource_group_name, vm_scale_set_name, instance_ids=None, custom_headers=None, raw=False, polling=True, **operation_config): - """Reimages (upgrade the operating system) one or more virtual machines in - a VM scale set. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param vm_scale_set_name: The name of the VM scale set. - :type vm_scale_set_name: str - :param instance_ids: The virtual machine scale set instance ids. - Omitting the virtual machine scale set instance ids will result in the - operation being performed on all virtual machines in the virtual - machine scale set. - :type instance_ids: list[str] - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns None or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] - :raises: :class:`CloudError` - """ - raw_result = self._reimage_initial( - resource_group_name=resource_group_name, - vm_scale_set_name=vm_scale_set_name, - instance_ids=instance_ids, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - reimage.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/reimage'} - - - def _reimage_all_initial( - self, resource_group_name, vm_scale_set_name, instance_ids=None, custom_headers=None, raw=False, **operation_config): - vm_instance_ids = None - if instance_ids is not None: - vm_instance_ids = models.VirtualMachineScaleSetVMInstanceIDs(instance_ids=instance_ids) - - # Construct URL - url = self.reimage_all.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - if vm_instance_ids is not None: - body_content = self._serialize.body(vm_instance_ids, 'VirtualMachineScaleSetVMInstanceIDs') - else: - body_content = None - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - def reimage_all( - self, resource_group_name, vm_scale_set_name, instance_ids=None, custom_headers=None, raw=False, polling=True, **operation_config): - """Reimages all the disks ( including data disks ) in the virtual machines - in a VM scale set. This operation is only supported for managed disks. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param vm_scale_set_name: The name of the VM scale set. - :type vm_scale_set_name: str - :param instance_ids: The virtual machine scale set instance ids. - Omitting the virtual machine scale set instance ids will result in the - operation being performed on all virtual machines in the virtual - machine scale set. - :type instance_ids: list[str] - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns None or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] - :raises: :class:`CloudError` - """ - raw_result = self._reimage_all_initial( - resource_group_name=resource_group_name, - vm_scale_set_name=vm_scale_set_name, - instance_ids=instance_ids, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - reimage_all.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/reimageall'} - - def force_recovery_service_fabric_platform_update_domain_walk( - self, resource_group_name, vm_scale_set_name, platform_update_domain, custom_headers=None, raw=False, **operation_config): - """Manual platform update domain walk to update virtual machines in a - service fabric virtual machine scale set. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param vm_scale_set_name: The name of the VM scale set. - :type vm_scale_set_name: str - :param platform_update_domain: The platform update domain for which a - manual recovery walk is requested - :type platform_update_domain: int - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: RecoveryWalkResponse or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.compute.v2018_04_01.models.RecoveryWalkResponse or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.force_recovery_service_fabric_platform_update_domain_walk.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - query_parameters['platformUpdateDomain'] = self._serialize.query("platform_update_domain", platform_update_domain, 'int') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('RecoveryWalkResponse', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - force_recovery_service_fabric_platform_update_domain_walk.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/forceRecoveryServiceFabricPlatformUpdateDomainWalk'} diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/operations/virtual_machine_sizes_operations.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/operations/virtual_machine_sizes_operations.py deleted file mode 100644 index b25f7f135d02..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/operations/virtual_machine_sizes_operations.py +++ /dev/null @@ -1,107 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError - -from .. import models - - -class VirtualMachineSizesOperations(object): - """VirtualMachineSizesOperations operations. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: Client Api Version. Constant value: "2018-04-01". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2018-04-01" - - self.config = config - - def list( - self, location, custom_headers=None, raw=False, **operation_config): - """Lists all available virtual machine sizes for a subscription in a - location. - - :param location: The location upon which virtual-machine-sizes is - queried. - :type location: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of VirtualMachineSize - :rtype: - ~azure.mgmt.compute.v2018_04_01.models.VirtualMachineSizePaged[~azure.mgmt.compute.v2018_04_01.models.VirtualMachineSize] - :raises: :class:`CloudError` - """ - def internal_paging(next_link=None, raw=False): - - if not next_link: - # Construct URL - url = self.list.metadata['url'] - path_format_arguments = { - 'location': self._serialize.url("location", location, 'str', pattern=r'^[-\w\._]+$'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - deserialized = models.VirtualMachineSizePaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.VirtualMachineSizePaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/vmSizes'} diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/operations/virtual_machines_operations.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/operations/virtual_machines_operations.py deleted file mode 100644 index 2b9af6befaba..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/operations/virtual_machines_operations.py +++ /dev/null @@ -1,1551 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError -from msrest.polling import LROPoller, NoPolling -from msrestazure.polling.arm_polling import ARMPolling - -from .. import models - - -class VirtualMachinesOperations(object): - """VirtualMachinesOperations operations. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: Client Api Version. Constant value: "2018-04-01". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2018-04-01" - - self.config = config - - def list_by_location( - self, location, custom_headers=None, raw=False, **operation_config): - """Gets all the virtual machines under the specified subscription for the - specified location. - - :param location: The location for which virtual machines under the - subscription are queried. - :type location: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of VirtualMachine - :rtype: - ~azure.mgmt.compute.v2018_04_01.models.VirtualMachinePaged[~azure.mgmt.compute.v2018_04_01.models.VirtualMachine] - :raises: :class:`CloudError` - """ - def internal_paging(next_link=None, raw=False): - - if not next_link: - # Construct URL - url = self.list_by_location.metadata['url'] - path_format_arguments = { - 'location': self._serialize.url("location", location, 'str', pattern=r'^[-\w\._]+$'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - deserialized = models.VirtualMachinePaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.VirtualMachinePaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - list_by_location.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/virtualMachines'} - - - def _capture_initial( - self, resource_group_name, vm_name, parameters, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.capture.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'vmName': self._serialize.url("vm_name", vm_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(parameters, 'VirtualMachineCaptureParameters') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('VirtualMachineCaptureResult', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def capture( - self, resource_group_name, vm_name, parameters, custom_headers=None, raw=False, polling=True, **operation_config): - """Captures the VM by copying virtual hard disks of the VM and outputs a - template that can be used to create similar VMs. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param vm_name: The name of the virtual machine. - :type vm_name: str - :param parameters: Parameters supplied to the Capture Virtual Machine - operation. - :type parameters: - ~azure.mgmt.compute.v2018_04_01.models.VirtualMachineCaptureParameters - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns - VirtualMachineCaptureResult or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2018_04_01.models.VirtualMachineCaptureResult] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2018_04_01.models.VirtualMachineCaptureResult]] - :raises: :class:`CloudError` - """ - raw_result = self._capture_initial( - resource_group_name=resource_group_name, - vm_name=vm_name, - parameters=parameters, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('VirtualMachineCaptureResult', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - capture.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/capture'} - - - def _create_or_update_initial( - self, resource_group_name, vm_name, parameters, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.create_or_update.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'vmName': self._serialize.url("vm_name", vm_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(parameters, 'VirtualMachine') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 201]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('VirtualMachine', response) - if response.status_code == 201: - deserialized = self._deserialize('VirtualMachine', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def create_or_update( - self, resource_group_name, vm_name, parameters, custom_headers=None, raw=False, polling=True, **operation_config): - """The operation to create or update a virtual machine. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param vm_name: The name of the virtual machine. - :type vm_name: str - :param parameters: Parameters supplied to the Create Virtual Machine - operation. - :type parameters: - ~azure.mgmt.compute.v2018_04_01.models.VirtualMachine - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns VirtualMachine or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2018_04_01.models.VirtualMachine] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2018_04_01.models.VirtualMachine]] - :raises: :class:`CloudError` - """ - raw_result = self._create_or_update_initial( - resource_group_name=resource_group_name, - vm_name=vm_name, - parameters=parameters, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('VirtualMachine', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}'} - - - def _update_initial( - self, resource_group_name, vm_name, parameters, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.update.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'vmName': self._serialize.url("vm_name", vm_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(parameters, 'VirtualMachineUpdate') - - # Construct and send request - request = self._client.patch(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 201]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('VirtualMachine', response) - if response.status_code == 201: - deserialized = self._deserialize('VirtualMachine', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def update( - self, resource_group_name, vm_name, parameters, custom_headers=None, raw=False, polling=True, **operation_config): - """The operation to update a virtual machine. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param vm_name: The name of the virtual machine. - :type vm_name: str - :param parameters: Parameters supplied to the Update Virtual Machine - operation. - :type parameters: - ~azure.mgmt.compute.v2018_04_01.models.VirtualMachineUpdate - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns VirtualMachine or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2018_04_01.models.VirtualMachine] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2018_04_01.models.VirtualMachine]] - :raises: :class:`CloudError` - """ - raw_result = self._update_initial( - resource_group_name=resource_group_name, - vm_name=vm_name, - parameters=parameters, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('VirtualMachine', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}'} - - - def _delete_initial( - self, resource_group_name, vm_name, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.delete.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'vmName': self._serialize.url("vm_name", vm_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202, 204]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - def delete( - self, resource_group_name, vm_name, custom_headers=None, raw=False, polling=True, **operation_config): - """The operation to delete a virtual machine. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param vm_name: The name of the virtual machine. - :type vm_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns None or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] - :raises: :class:`CloudError` - """ - raw_result = self._delete_initial( - resource_group_name=resource_group_name, - vm_name=vm_name, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}'} - - def get( - self, resource_group_name, vm_name, expand=None, custom_headers=None, raw=False, **operation_config): - """Retrieves information about the model view or the instance view of a - virtual machine. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param vm_name: The name of the virtual machine. - :type vm_name: str - :param expand: The expand expression to apply on the operation. - Possible values include: 'instanceView' - :type expand: str or - ~azure.mgmt.compute.v2018_04_01.models.InstanceViewTypes - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: VirtualMachine or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.compute.v2018_04_01.models.VirtualMachine or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'vmName': self._serialize.url("vm_name", vm_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - if expand is not None: - query_parameters['$expand'] = self._serialize.query("expand", expand, 'InstanceViewTypes') - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('VirtualMachine', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}'} - - def instance_view( - self, resource_group_name, vm_name, custom_headers=None, raw=False, **operation_config): - """Retrieves information about the run-time state of a virtual machine. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param vm_name: The name of the virtual machine. - :type vm_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: VirtualMachineInstanceView or ClientRawResponse if raw=true - :rtype: - ~azure.mgmt.compute.v2018_04_01.models.VirtualMachineInstanceView or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.instance_view.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'vmName': self._serialize.url("vm_name", vm_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('VirtualMachineInstanceView', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - instance_view.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/instanceView'} - - - def _convert_to_managed_disks_initial( - self, resource_group_name, vm_name, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.convert_to_managed_disks.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'vmName': self._serialize.url("vm_name", vm_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - def convert_to_managed_disks( - self, resource_group_name, vm_name, custom_headers=None, raw=False, polling=True, **operation_config): - """Converts virtual machine disks from blob-based to managed disks. - Virtual machine must be stop-deallocated before invoking this - operation. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param vm_name: The name of the virtual machine. - :type vm_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns None or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] - :raises: :class:`CloudError` - """ - raw_result = self._convert_to_managed_disks_initial( - resource_group_name=resource_group_name, - vm_name=vm_name, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - convert_to_managed_disks.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/convertToManagedDisks'} - - - def _deallocate_initial( - self, resource_group_name, vm_name, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.deallocate.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'vmName': self._serialize.url("vm_name", vm_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - def deallocate( - self, resource_group_name, vm_name, custom_headers=None, raw=False, polling=True, **operation_config): - """Shuts down the virtual machine and releases the compute resources. You - are not billed for the compute resources that this virtual machine - uses. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param vm_name: The name of the virtual machine. - :type vm_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns None or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] - :raises: :class:`CloudError` - """ - raw_result = self._deallocate_initial( - resource_group_name=resource_group_name, - vm_name=vm_name, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - deallocate.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/deallocate'} - - def generalize( - self, resource_group_name, vm_name, custom_headers=None, raw=False, **operation_config): - """Sets the state of the virtual machine to generalized. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param vm_name: The name of the virtual machine. - :type vm_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.generalize.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'vmName': self._serialize.url("vm_name", vm_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - generalize.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/generalize'} - - def list( - self, resource_group_name, custom_headers=None, raw=False, **operation_config): - """Lists all of the virtual machines in the specified resource group. Use - the nextLink property in the response to get the next page of virtual - machines. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of VirtualMachine - :rtype: - ~azure.mgmt.compute.v2018_04_01.models.VirtualMachinePaged[~azure.mgmt.compute.v2018_04_01.models.VirtualMachine] - :raises: :class:`CloudError` - """ - def internal_paging(next_link=None, raw=False): - - if not next_link: - # Construct URL - url = self.list.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - deserialized = models.VirtualMachinePaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.VirtualMachinePaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines'} - - def list_all( - self, custom_headers=None, raw=False, **operation_config): - """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. - - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of VirtualMachine - :rtype: - ~azure.mgmt.compute.v2018_04_01.models.VirtualMachinePaged[~azure.mgmt.compute.v2018_04_01.models.VirtualMachine] - :raises: :class:`CloudError` - """ - def internal_paging(next_link=None, raw=False): - - if not next_link: - # Construct URL - url = self.list_all.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - deserialized = models.VirtualMachinePaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.VirtualMachinePaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - list_all.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Compute/virtualMachines'} - - def list_available_sizes( - self, resource_group_name, vm_name, custom_headers=None, raw=False, **operation_config): - """Lists all available virtual machine sizes to which the specified - virtual machine can be resized. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param vm_name: The name of the virtual machine. - :type vm_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of VirtualMachineSize - :rtype: - ~azure.mgmt.compute.v2018_04_01.models.VirtualMachineSizePaged[~azure.mgmt.compute.v2018_04_01.models.VirtualMachineSize] - :raises: :class:`CloudError` - """ - def internal_paging(next_link=None, raw=False): - - if not next_link: - # Construct URL - url = self.list_available_sizes.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'vmName': self._serialize.url("vm_name", vm_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - deserialized = models.VirtualMachineSizePaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.VirtualMachineSizePaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - list_available_sizes.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/vmSizes'} - - - def _power_off_initial( - self, resource_group_name, vm_name, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.power_off.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'vmName': self._serialize.url("vm_name", vm_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - def power_off( - self, resource_group_name, vm_name, custom_headers=None, raw=False, polling=True, **operation_config): - """The operation to power off (stop) a virtual machine. The virtual - machine can be restarted with the same provisioned resources. You are - still charged for this virtual machine. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param vm_name: The name of the virtual machine. - :type vm_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns None or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] - :raises: :class:`CloudError` - """ - raw_result = self._power_off_initial( - resource_group_name=resource_group_name, - vm_name=vm_name, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - power_off.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/powerOff'} - - - def _restart_initial( - self, resource_group_name, vm_name, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.restart.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'vmName': self._serialize.url("vm_name", vm_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - def restart( - self, resource_group_name, vm_name, custom_headers=None, raw=False, polling=True, **operation_config): - """The operation to restart a virtual machine. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param vm_name: The name of the virtual machine. - :type vm_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns None or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] - :raises: :class:`CloudError` - """ - raw_result = self._restart_initial( - resource_group_name=resource_group_name, - vm_name=vm_name, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - restart.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/restart'} - - - def _start_initial( - self, resource_group_name, vm_name, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.start.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'vmName': self._serialize.url("vm_name", vm_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - def start( - self, resource_group_name, vm_name, custom_headers=None, raw=False, polling=True, **operation_config): - """The operation to start a virtual machine. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param vm_name: The name of the virtual machine. - :type vm_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns None or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] - :raises: :class:`CloudError` - """ - raw_result = self._start_initial( - resource_group_name=resource_group_name, - vm_name=vm_name, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - start.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/start'} - - - def _redeploy_initial( - self, resource_group_name, vm_name, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.redeploy.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'vmName': self._serialize.url("vm_name", vm_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - def redeploy( - self, resource_group_name, vm_name, custom_headers=None, raw=False, polling=True, **operation_config): - """The operation to redeploy a virtual machine. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param vm_name: The name of the virtual machine. - :type vm_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns None or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] - :raises: :class:`CloudError` - """ - raw_result = self._redeploy_initial( - resource_group_name=resource_group_name, - vm_name=vm_name, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - redeploy.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/redeploy'} - - - def _perform_maintenance_initial( - self, resource_group_name, vm_name, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.perform_maintenance.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'vmName': self._serialize.url("vm_name", vm_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - def perform_maintenance( - self, resource_group_name, vm_name, custom_headers=None, raw=False, polling=True, **operation_config): - """The operation to perform maintenance on a virtual machine. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param vm_name: The name of the virtual machine. - :type vm_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns None or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] - :raises: :class:`CloudError` - """ - raw_result = self._perform_maintenance_initial( - resource_group_name=resource_group_name, - vm_name=vm_name, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - perform_maintenance.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/performMaintenance'} - - - def _run_command_initial( - self, resource_group_name, vm_name, parameters, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.run_command.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'vmName': self._serialize.url("vm_name", vm_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(parameters, 'RunCommandInput') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('RunCommandResult', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def run_command( - self, resource_group_name, vm_name, parameters, custom_headers=None, raw=False, polling=True, **operation_config): - """Run command on the VM. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param vm_name: The name of the virtual machine. - :type vm_name: str - :param parameters: Parameters supplied to the Run command operation. - :type parameters: - ~azure.mgmt.compute.v2018_04_01.models.RunCommandInput - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns RunCommandResult or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2018_04_01.models.RunCommandResult] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2018_04_01.models.RunCommandResult]] - :raises: :class:`CloudError` - """ - raw_result = self._run_command_initial( - resource_group_name=resource_group_name, - vm_name=vm_name, - parameters=parameters, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('RunCommandResult', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - run_command.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/runCommand'} diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/__init__.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/__init__.py index 88ded2f640de..a7bc1ce68e37 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/__init__.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/__init__.py @@ -9,10 +9,11 @@ # regenerated. # -------------------------------------------------------------------------- -from .compute_management_client import ComputeManagementClient -from .version import VERSION +from ._configuration import ComputeManagementClientConfiguration +from ._compute_management_client import ComputeManagementClient +__all__ = ['ComputeManagementClient', 'ComputeManagementClientConfiguration'] -__all__ = ['ComputeManagementClient'] +from .version import VERSION __version__ = VERSION diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/_compute_management_client.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/_compute_management_client.py new file mode 100644 index 000000000000..8e8b75ff81a3 --- /dev/null +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/_compute_management_client.py @@ -0,0 +1,151 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.service_client import SDKClient +from msrest import Serializer, Deserializer + +from ._configuration import ComputeManagementClientConfiguration +from .operations import Operations +from .operations import AvailabilitySetsOperations +from .operations import ProximityPlacementGroupsOperations +from .operations import VirtualMachineExtensionImagesOperations +from .operations import VirtualMachineExtensionsOperations +from .operations import VirtualMachineImagesOperations +from .operations import UsageOperations +from .operations import VirtualMachinesOperations +from .operations import VirtualMachineSizesOperations +from .operations import ImagesOperations +from .operations import VirtualMachineScaleSetsOperations +from .operations import VirtualMachineScaleSetExtensionsOperations +from .operations import VirtualMachineScaleSetRollingUpgradesOperations +from .operations import VirtualMachineScaleSetVMsOperations +from .operations import LogAnalyticsOperations +from .operations import VirtualMachineRunCommandsOperations +from .operations import GalleriesOperations +from .operations import GalleryImagesOperations +from .operations import GalleryImageVersionsOperations +from .operations import DisksOperations +from .operations import SnapshotsOperations +from . import models + + +class ComputeManagementClient(SDKClient): + """Compute Client + + :ivar config: Configuration for client. + :vartype config: ComputeManagementClientConfiguration + + :ivar operations: Operations operations + :vartype operations: azure.mgmt.compute.v2018_06_01.operations.Operations + :ivar availability_sets: AvailabilitySets operations + :vartype availability_sets: azure.mgmt.compute.v2018_06_01.operations.AvailabilitySetsOperations + :ivar proximity_placement_groups: ProximityPlacementGroups operations + :vartype proximity_placement_groups: azure.mgmt.compute.v2018_06_01.operations.ProximityPlacementGroupsOperations + :ivar virtual_machine_extension_images: VirtualMachineExtensionImages operations + :vartype virtual_machine_extension_images: azure.mgmt.compute.v2018_06_01.operations.VirtualMachineExtensionImagesOperations + :ivar virtual_machine_extensions: VirtualMachineExtensions operations + :vartype virtual_machine_extensions: azure.mgmt.compute.v2018_06_01.operations.VirtualMachineExtensionsOperations + :ivar virtual_machine_images: VirtualMachineImages operations + :vartype virtual_machine_images: azure.mgmt.compute.v2018_06_01.operations.VirtualMachineImagesOperations + :ivar usage: Usage operations + :vartype usage: azure.mgmt.compute.v2018_06_01.operations.UsageOperations + :ivar virtual_machines: VirtualMachines operations + :vartype virtual_machines: azure.mgmt.compute.v2018_06_01.operations.VirtualMachinesOperations + :ivar virtual_machine_sizes: VirtualMachineSizes operations + :vartype virtual_machine_sizes: azure.mgmt.compute.v2018_06_01.operations.VirtualMachineSizesOperations + :ivar images: Images operations + :vartype images: azure.mgmt.compute.v2018_06_01.operations.ImagesOperations + :ivar virtual_machine_scale_sets: VirtualMachineScaleSets operations + :vartype virtual_machine_scale_sets: azure.mgmt.compute.v2018_06_01.operations.VirtualMachineScaleSetsOperations + :ivar virtual_machine_scale_set_extensions: VirtualMachineScaleSetExtensions operations + :vartype virtual_machine_scale_set_extensions: azure.mgmt.compute.v2018_06_01.operations.VirtualMachineScaleSetExtensionsOperations + :ivar virtual_machine_scale_set_rolling_upgrades: VirtualMachineScaleSetRollingUpgrades operations + :vartype virtual_machine_scale_set_rolling_upgrades: azure.mgmt.compute.v2018_06_01.operations.VirtualMachineScaleSetRollingUpgradesOperations + :ivar virtual_machine_scale_set_vms: VirtualMachineScaleSetVMs operations + :vartype virtual_machine_scale_set_vms: azure.mgmt.compute.v2018_06_01.operations.VirtualMachineScaleSetVMsOperations + :ivar log_analytics: LogAnalytics operations + :vartype log_analytics: azure.mgmt.compute.v2018_06_01.operations.LogAnalyticsOperations + :ivar virtual_machine_run_commands: VirtualMachineRunCommands operations + :vartype virtual_machine_run_commands: azure.mgmt.compute.v2018_06_01.operations.VirtualMachineRunCommandsOperations + :ivar galleries: Galleries operations + :vartype galleries: azure.mgmt.compute.v2018_06_01.operations.GalleriesOperations + :ivar gallery_images: GalleryImages operations + :vartype gallery_images: azure.mgmt.compute.v2018_06_01.operations.GalleryImagesOperations + :ivar gallery_image_versions: GalleryImageVersions operations + :vartype gallery_image_versions: azure.mgmt.compute.v2018_06_01.operations.GalleryImageVersionsOperations + :ivar disks: Disks operations + :vartype disks: azure.mgmt.compute.v2018_06_01.operations.DisksOperations + :ivar snapshots: Snapshots operations + :vartype snapshots: azure.mgmt.compute.v2018_06_01.operations.SnapshotsOperations + + :param credentials: Credentials needed for the client to connect to Azure. + :type credentials: :mod:`A msrestazure Credentials + object` + :param subscription_id: Subscription credentials which uniquely identify + Microsoft Azure subscription. The subscription ID forms part of the URI + for every service call. + :type subscription_id: str + :param str base_url: Service URL + """ + + def __init__( + self, credentials, subscription_id, base_url=None): + + self.config = ComputeManagementClientConfiguration(credentials, subscription_id, base_url) + super(ComputeManagementClient, self).__init__(self.config.credentials, self.config) + + client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} + self.api_version = '2018-06-01' + self._serialize = Serializer(client_models) + self._deserialize = Deserializer(client_models) + + self.operations = Operations( + self._client, self.config, self._serialize, self._deserialize) + self.availability_sets = AvailabilitySetsOperations( + self._client, self.config, self._serialize, self._deserialize) + self.proximity_placement_groups = ProximityPlacementGroupsOperations( + self._client, self.config, self._serialize, self._deserialize) + self.virtual_machine_extension_images = VirtualMachineExtensionImagesOperations( + self._client, self.config, self._serialize, self._deserialize) + self.virtual_machine_extensions = VirtualMachineExtensionsOperations( + self._client, self.config, self._serialize, self._deserialize) + self.virtual_machine_images = VirtualMachineImagesOperations( + self._client, self.config, self._serialize, self._deserialize) + self.usage = UsageOperations( + self._client, self.config, self._serialize, self._deserialize) + self.virtual_machines = VirtualMachinesOperations( + self._client, self.config, self._serialize, self._deserialize) + self.virtual_machine_sizes = VirtualMachineSizesOperations( + self._client, self.config, self._serialize, self._deserialize) + self.images = ImagesOperations( + self._client, self.config, self._serialize, self._deserialize) + self.virtual_machine_scale_sets = VirtualMachineScaleSetsOperations( + self._client, self.config, self._serialize, self._deserialize) + self.virtual_machine_scale_set_extensions = VirtualMachineScaleSetExtensionsOperations( + self._client, self.config, self._serialize, self._deserialize) + self.virtual_machine_scale_set_rolling_upgrades = VirtualMachineScaleSetRollingUpgradesOperations( + self._client, self.config, self._serialize, self._deserialize) + self.virtual_machine_scale_set_vms = VirtualMachineScaleSetVMsOperations( + self._client, self.config, self._serialize, self._deserialize) + self.log_analytics = LogAnalyticsOperations( + self._client, self.config, self._serialize, self._deserialize) + self.virtual_machine_run_commands = VirtualMachineRunCommandsOperations( + self._client, self.config, self._serialize, self._deserialize) + self.galleries = GalleriesOperations( + self._client, self.config, self._serialize, self._deserialize) + self.gallery_images = GalleryImagesOperations( + self._client, self.config, self._serialize, self._deserialize) + self.gallery_image_versions = GalleryImageVersionsOperations( + self._client, self.config, self._serialize, self._deserialize) + self.disks = DisksOperations( + self._client, self.config, self._serialize, self._deserialize) + self.snapshots = SnapshotsOperations( + self._client, self.config, self._serialize, self._deserialize) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/_configuration.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/_configuration.py new file mode 100644 index 000000000000..0fcf5984e2ca --- /dev/null +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/_configuration.py @@ -0,0 +1,50 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- +from msrestazure import AzureConfiguration + +from .version import VERSION + + +class ComputeManagementClientConfiguration(AzureConfiguration): + """Configuration for ComputeManagementClient + Note that all parameters used to create this instance are saved as instance + attributes. + + :param credentials: Credentials needed for the client to connect to Azure. + :type credentials: :mod:`A msrestazure Credentials + object` + :param subscription_id: Subscription credentials which uniquely identify + Microsoft Azure subscription. The subscription ID forms part of the URI + for every service call. + :type subscription_id: str + :param str base_url: Service URL + """ + + def __init__( + self, credentials, subscription_id, base_url=None): + + if credentials is None: + raise ValueError("Parameter 'credentials' must not be None.") + if subscription_id is None: + raise ValueError("Parameter 'subscription_id' must not be None.") + if not base_url: + base_url = 'https://management.azure.com' + + super(ComputeManagementClientConfiguration, self).__init__(base_url) + + # Starting Autorest.Python 4.0.64, make connection pool activated by default + self.keep_alive = True + + self.add_user_agent('azure-mgmt-compute/{}'.format(VERSION)) + self.add_user_agent('Azure-SDK-For-Python') + + self.credentials = credentials + self.subscription_id = subscription_id diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/compute_management_client.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/compute_management_client.py deleted file mode 100644 index 9e99fdc31e51..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/compute_management_client.py +++ /dev/null @@ -1,185 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.service_client import SDKClient -from msrest import Serializer, Deserializer -from msrestazure import AzureConfiguration -from .version import VERSION -from .operations.operations import Operations -from .operations.availability_sets_operations import AvailabilitySetsOperations -from .operations.proximity_placement_groups_operations import ProximityPlacementGroupsOperations -from .operations.virtual_machine_extension_images_operations import VirtualMachineExtensionImagesOperations -from .operations.virtual_machine_extensions_operations import VirtualMachineExtensionsOperations -from .operations.virtual_machine_images_operations import VirtualMachineImagesOperations -from .operations.usage_operations import UsageOperations -from .operations.virtual_machines_operations import VirtualMachinesOperations -from .operations.virtual_machine_sizes_operations import VirtualMachineSizesOperations -from .operations.images_operations import ImagesOperations -from .operations.virtual_machine_scale_sets_operations import VirtualMachineScaleSetsOperations -from .operations.virtual_machine_scale_set_extensions_operations import VirtualMachineScaleSetExtensionsOperations -from .operations.virtual_machine_scale_set_rolling_upgrades_operations import VirtualMachineScaleSetRollingUpgradesOperations -from .operations.virtual_machine_scale_set_vms_operations import VirtualMachineScaleSetVMsOperations -from .operations.log_analytics_operations import LogAnalyticsOperations -from .operations.virtual_machine_run_commands_operations import VirtualMachineRunCommandsOperations -from .operations.galleries_operations import GalleriesOperations -from .operations.gallery_images_operations import GalleryImagesOperations -from .operations.gallery_image_versions_operations import GalleryImageVersionsOperations -from .operations.disks_operations import DisksOperations -from .operations.snapshots_operations import SnapshotsOperations -from . import models - - -class ComputeManagementClientConfiguration(AzureConfiguration): - """Configuration for ComputeManagementClient - Note that all parameters used to create this instance are saved as instance - attributes. - - :param credentials: Credentials needed for the client to connect to Azure. - :type credentials: :mod:`A msrestazure Credentials - object` - :param subscription_id: Subscription credentials which uniquely identify - Microsoft Azure subscription. The subscription ID forms part of the URI - for every service call. - :type subscription_id: str - :param str base_url: Service URL - """ - - def __init__( - self, credentials, subscription_id, base_url=None): - - if credentials is None: - raise ValueError("Parameter 'credentials' must not be None.") - if subscription_id is None: - raise ValueError("Parameter 'subscription_id' must not be None.") - if not base_url: - base_url = 'https://management.azure.com' - - super(ComputeManagementClientConfiguration, self).__init__(base_url) - - self.add_user_agent('azure-mgmt-compute/{}'.format(VERSION)) - self.add_user_agent('Azure-SDK-For-Python') - - self.credentials = credentials - self.subscription_id = subscription_id - - -class ComputeManagementClient(SDKClient): - """Compute Client - - :ivar config: Configuration for client. - :vartype config: ComputeManagementClientConfiguration - - :ivar operations: Operations operations - :vartype operations: azure.mgmt.compute.v2018_06_01.operations.Operations - :ivar availability_sets: AvailabilitySets operations - :vartype availability_sets: azure.mgmt.compute.v2018_06_01.operations.AvailabilitySetsOperations - :ivar proximity_placement_groups: ProximityPlacementGroups operations - :vartype proximity_placement_groups: azure.mgmt.compute.v2018_06_01.operations.ProximityPlacementGroupsOperations - :ivar virtual_machine_extension_images: VirtualMachineExtensionImages operations - :vartype virtual_machine_extension_images: azure.mgmt.compute.v2018_06_01.operations.VirtualMachineExtensionImagesOperations - :ivar virtual_machine_extensions: VirtualMachineExtensions operations - :vartype virtual_machine_extensions: azure.mgmt.compute.v2018_06_01.operations.VirtualMachineExtensionsOperations - :ivar virtual_machine_images: VirtualMachineImages operations - :vartype virtual_machine_images: azure.mgmt.compute.v2018_06_01.operations.VirtualMachineImagesOperations - :ivar usage: Usage operations - :vartype usage: azure.mgmt.compute.v2018_06_01.operations.UsageOperations - :ivar virtual_machines: VirtualMachines operations - :vartype virtual_machines: azure.mgmt.compute.v2018_06_01.operations.VirtualMachinesOperations - :ivar virtual_machine_sizes: VirtualMachineSizes operations - :vartype virtual_machine_sizes: azure.mgmt.compute.v2018_06_01.operations.VirtualMachineSizesOperations - :ivar images: Images operations - :vartype images: azure.mgmt.compute.v2018_06_01.operations.ImagesOperations - :ivar virtual_machine_scale_sets: VirtualMachineScaleSets operations - :vartype virtual_machine_scale_sets: azure.mgmt.compute.v2018_06_01.operations.VirtualMachineScaleSetsOperations - :ivar virtual_machine_scale_set_extensions: VirtualMachineScaleSetExtensions operations - :vartype virtual_machine_scale_set_extensions: azure.mgmt.compute.v2018_06_01.operations.VirtualMachineScaleSetExtensionsOperations - :ivar virtual_machine_scale_set_rolling_upgrades: VirtualMachineScaleSetRollingUpgrades operations - :vartype virtual_machine_scale_set_rolling_upgrades: azure.mgmt.compute.v2018_06_01.operations.VirtualMachineScaleSetRollingUpgradesOperations - :ivar virtual_machine_scale_set_vms: VirtualMachineScaleSetVMs operations - :vartype virtual_machine_scale_set_vms: azure.mgmt.compute.v2018_06_01.operations.VirtualMachineScaleSetVMsOperations - :ivar log_analytics: LogAnalytics operations - :vartype log_analytics: azure.mgmt.compute.v2018_06_01.operations.LogAnalyticsOperations - :ivar virtual_machine_run_commands: VirtualMachineRunCommands operations - :vartype virtual_machine_run_commands: azure.mgmt.compute.v2018_06_01.operations.VirtualMachineRunCommandsOperations - :ivar galleries: Galleries operations - :vartype galleries: azure.mgmt.compute.v2018_06_01.operations.GalleriesOperations - :ivar gallery_images: GalleryImages operations - :vartype gallery_images: azure.mgmt.compute.v2018_06_01.operations.GalleryImagesOperations - :ivar gallery_image_versions: GalleryImageVersions operations - :vartype gallery_image_versions: azure.mgmt.compute.v2018_06_01.operations.GalleryImageVersionsOperations - :ivar disks: Disks operations - :vartype disks: azure.mgmt.compute.v2018_06_01.operations.DisksOperations - :ivar snapshots: Snapshots operations - :vartype snapshots: azure.mgmt.compute.v2018_06_01.operations.SnapshotsOperations - - :param credentials: Credentials needed for the client to connect to Azure. - :type credentials: :mod:`A msrestazure Credentials - object` - :param subscription_id: Subscription credentials which uniquely identify - Microsoft Azure subscription. The subscription ID forms part of the URI - for every service call. - :type subscription_id: str - :param str base_url: Service URL - """ - - def __init__( - self, credentials, subscription_id, base_url=None): - - self.config = ComputeManagementClientConfiguration(credentials, subscription_id, base_url) - super(ComputeManagementClient, self).__init__(self.config.credentials, self.config) - - client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} - self.api_version = '2018-06-01' - self._serialize = Serializer(client_models) - self._deserialize = Deserializer(client_models) - - self.operations = Operations( - self._client, self.config, self._serialize, self._deserialize) - self.availability_sets = AvailabilitySetsOperations( - self._client, self.config, self._serialize, self._deserialize) - self.proximity_placement_groups = ProximityPlacementGroupsOperations( - self._client, self.config, self._serialize, self._deserialize) - self.virtual_machine_extension_images = VirtualMachineExtensionImagesOperations( - self._client, self.config, self._serialize, self._deserialize) - self.virtual_machine_extensions = VirtualMachineExtensionsOperations( - self._client, self.config, self._serialize, self._deserialize) - self.virtual_machine_images = VirtualMachineImagesOperations( - self._client, self.config, self._serialize, self._deserialize) - self.usage = UsageOperations( - self._client, self.config, self._serialize, self._deserialize) - self.virtual_machines = VirtualMachinesOperations( - self._client, self.config, self._serialize, self._deserialize) - self.virtual_machine_sizes = VirtualMachineSizesOperations( - self._client, self.config, self._serialize, self._deserialize) - self.images = ImagesOperations( - self._client, self.config, self._serialize, self._deserialize) - self.virtual_machine_scale_sets = VirtualMachineScaleSetsOperations( - self._client, self.config, self._serialize, self._deserialize) - self.virtual_machine_scale_set_extensions = VirtualMachineScaleSetExtensionsOperations( - self._client, self.config, self._serialize, self._deserialize) - self.virtual_machine_scale_set_rolling_upgrades = VirtualMachineScaleSetRollingUpgradesOperations( - self._client, self.config, self._serialize, self._deserialize) - self.virtual_machine_scale_set_vms = VirtualMachineScaleSetVMsOperations( - self._client, self.config, self._serialize, self._deserialize) - self.log_analytics = LogAnalyticsOperations( - self._client, self.config, self._serialize, self._deserialize) - self.virtual_machine_run_commands = VirtualMachineRunCommandsOperations( - self._client, self.config, self._serialize, self._deserialize) - self.galleries = GalleriesOperations( - self._client, self.config, self._serialize, self._deserialize) - self.gallery_images = GalleryImagesOperations( - self._client, self.config, self._serialize, self._deserialize) - self.gallery_image_versions = GalleryImageVersionsOperations( - self._client, self.config, self._serialize, self._deserialize) - self.disks = DisksOperations( - self._client, self.config, self._serialize, self._deserialize) - self.snapshots = SnapshotsOperations( - self._client, self.config, self._serialize, self._deserialize) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/__init__.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/__init__.py index 844bcbeac080..57f52e7cd1de 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/__init__.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/__init__.py @@ -10,364 +10,364 @@ # -------------------------------------------------------------------------- try: - from .compute_operation_value_py3 import ComputeOperationValue - from .instance_view_status_py3 import InstanceViewStatus - from .sub_resource_py3 import SubResource - from .sku_py3 import Sku - from .availability_set_py3 import AvailabilitySet - from .availability_set_update_py3 import AvailabilitySetUpdate - from .proximity_placement_group_py3 import ProximityPlacementGroup - from .proximity_placement_group_update_py3 import ProximityPlacementGroupUpdate - from .virtual_machine_size_py3 import VirtualMachineSize - from .virtual_machine_extension_image_py3 import VirtualMachineExtensionImage - from .virtual_machine_image_resource_py3 import VirtualMachineImageResource - from .virtual_machine_extension_instance_view_py3 import VirtualMachineExtensionInstanceView - from .virtual_machine_extension_py3 import VirtualMachineExtension - from .virtual_machine_extension_update_py3 import VirtualMachineExtensionUpdate - from .virtual_machine_extensions_list_result_py3 import VirtualMachineExtensionsListResult - from .purchase_plan_py3 import PurchasePlan - from .os_disk_image_py3 import OSDiskImage - from .data_disk_image_py3 import DataDiskImage - from .virtual_machine_image_py3 import VirtualMachineImage - from .usage_name_py3 import UsageName - from .usage_py3 import Usage - from .virtual_machine_reimage_parameters_py3 import VirtualMachineReimageParameters - from .virtual_machine_capture_parameters_py3 import VirtualMachineCaptureParameters - from .virtual_machine_capture_result_py3 import VirtualMachineCaptureResult - from .plan_py3 import Plan - from .hardware_profile_py3 import HardwareProfile - from .image_reference_py3 import ImageReference - from .key_vault_secret_reference_py3 import KeyVaultSecretReference - from .key_vault_key_reference_py3 import KeyVaultKeyReference - from .disk_encryption_settings_py3 import DiskEncryptionSettings - from .virtual_hard_disk_py3 import VirtualHardDisk - from .diff_disk_settings_py3 import DiffDiskSettings - from .managed_disk_parameters_py3 import ManagedDiskParameters - from .os_disk_py3 import OSDisk - from .data_disk_py3 import DataDisk - from .storage_profile_py3 import StorageProfile - from .additional_capabilities_py3 import AdditionalCapabilities - from .additional_unattend_content_py3 import AdditionalUnattendContent - from .win_rm_listener_py3 import WinRMListener - from .win_rm_configuration_py3 import WinRMConfiguration - from .windows_configuration_py3 import WindowsConfiguration - from .ssh_public_key_py3 import SshPublicKey - from .ssh_configuration_py3 import SshConfiguration - from .linux_configuration_py3 import LinuxConfiguration - from .vault_certificate_py3 import VaultCertificate - from .vault_secret_group_py3 import VaultSecretGroup - from .os_profile_py3 import OSProfile - from .network_interface_reference_py3 import NetworkInterfaceReference - from .network_profile_py3 import NetworkProfile - from .boot_diagnostics_py3 import BootDiagnostics - from .diagnostics_profile_py3 import DiagnosticsProfile - from .virtual_machine_extension_handler_instance_view_py3 import VirtualMachineExtensionHandlerInstanceView - from .virtual_machine_agent_instance_view_py3 import VirtualMachineAgentInstanceView - from .disk_instance_view_py3 import DiskInstanceView - from .boot_diagnostics_instance_view_py3 import BootDiagnosticsInstanceView - from .virtual_machine_identity_user_assigned_identities_value_py3 import VirtualMachineIdentityUserAssignedIdentitiesValue - from .virtual_machine_identity_py3 import VirtualMachineIdentity - from .maintenance_redeploy_status_py3 import MaintenanceRedeployStatus - from .virtual_machine_instance_view_py3 import VirtualMachineInstanceView - from .virtual_machine_py3 import VirtualMachine - from .virtual_machine_update_py3 import VirtualMachineUpdate - from .auto_os_upgrade_policy_py3 import AutoOSUpgradePolicy - from .rolling_upgrade_policy_py3 import RollingUpgradePolicy - from .upgrade_policy_py3 import UpgradePolicy - from .image_os_disk_py3 import ImageOSDisk - from .image_data_disk_py3 import ImageDataDisk - from .image_storage_profile_py3 import ImageStorageProfile - from .image_py3 import Image - from .image_update_py3 import ImageUpdate - from .virtual_machine_scale_set_identity_user_assigned_identities_value_py3 import VirtualMachineScaleSetIdentityUserAssignedIdentitiesValue - from .virtual_machine_scale_set_identity_py3 import VirtualMachineScaleSetIdentity - from .virtual_machine_scale_set_os_profile_py3 import VirtualMachineScaleSetOSProfile - from .virtual_machine_scale_set_update_os_profile_py3 import VirtualMachineScaleSetUpdateOSProfile - from .virtual_machine_scale_set_managed_disk_parameters_py3 import VirtualMachineScaleSetManagedDiskParameters - from .virtual_machine_scale_set_os_disk_py3 import VirtualMachineScaleSetOSDisk - from .virtual_machine_scale_set_update_os_disk_py3 import VirtualMachineScaleSetUpdateOSDisk - from .virtual_machine_scale_set_data_disk_py3 import VirtualMachineScaleSetDataDisk - from .virtual_machine_scale_set_storage_profile_py3 import VirtualMachineScaleSetStorageProfile - from .virtual_machine_scale_set_update_storage_profile_py3 import VirtualMachineScaleSetUpdateStorageProfile - from .api_entity_reference_py3 import ApiEntityReference - from .virtual_machine_scale_set_public_ip_address_configuration_dns_settings_py3 import VirtualMachineScaleSetPublicIPAddressConfigurationDnsSettings - from .virtual_machine_scale_set_ip_tag_py3 import VirtualMachineScaleSetIpTag - from .virtual_machine_scale_set_public_ip_address_configuration_py3 import VirtualMachineScaleSetPublicIPAddressConfiguration - from .virtual_machine_scale_set_update_public_ip_address_configuration_py3 import VirtualMachineScaleSetUpdatePublicIPAddressConfiguration - from .virtual_machine_scale_set_ip_configuration_py3 import VirtualMachineScaleSetIPConfiguration - from .virtual_machine_scale_set_update_ip_configuration_py3 import VirtualMachineScaleSetUpdateIPConfiguration - from .virtual_machine_scale_set_network_configuration_dns_settings_py3 import VirtualMachineScaleSetNetworkConfigurationDnsSettings - from .virtual_machine_scale_set_network_configuration_py3 import VirtualMachineScaleSetNetworkConfiguration - from .virtual_machine_scale_set_update_network_configuration_py3 import VirtualMachineScaleSetUpdateNetworkConfiguration - from .virtual_machine_scale_set_network_profile_py3 import VirtualMachineScaleSetNetworkProfile - from .virtual_machine_scale_set_update_network_profile_py3 import VirtualMachineScaleSetUpdateNetworkProfile - from .virtual_machine_scale_set_extension_py3 import VirtualMachineScaleSetExtension - from .virtual_machine_scale_set_extension_profile_py3 import VirtualMachineScaleSetExtensionProfile - from .virtual_machine_scale_set_vm_profile_py3 import VirtualMachineScaleSetVMProfile - from .virtual_machine_scale_set_update_vm_profile_py3 import VirtualMachineScaleSetUpdateVMProfile - from .virtual_machine_scale_set_py3 import VirtualMachineScaleSet - from .virtual_machine_scale_set_vm_reimage_parameters_py3 import VirtualMachineScaleSetVMReimageParameters - from .virtual_machine_scale_set_reimage_parameters_py3 import VirtualMachineScaleSetReimageParameters - from .virtual_machine_scale_set_update_py3 import VirtualMachineScaleSetUpdate - from .virtual_machine_scale_set_vm_instance_ids_py3 import VirtualMachineScaleSetVMInstanceIDs - from .virtual_machine_scale_set_vm_instance_required_ids_py3 import VirtualMachineScaleSetVMInstanceRequiredIDs - from .virtual_machine_status_code_count_py3 import VirtualMachineStatusCodeCount - from .virtual_machine_scale_set_instance_view_statuses_summary_py3 import VirtualMachineScaleSetInstanceViewStatusesSummary - from .virtual_machine_scale_set_vm_extensions_summary_py3 import VirtualMachineScaleSetVMExtensionsSummary - from .virtual_machine_scale_set_instance_view_py3 import VirtualMachineScaleSetInstanceView - from .virtual_machine_scale_set_sku_capacity_py3 import VirtualMachineScaleSetSkuCapacity - from .virtual_machine_scale_set_sku_py3 import VirtualMachineScaleSetSku - from .api_error_base_py3 import ApiErrorBase - from .inner_error_py3 import InnerError - from .api_error_py3 import ApiError - from .rollback_status_info_py3 import RollbackStatusInfo - from .upgrade_operation_history_status_py3 import UpgradeOperationHistoryStatus - from .rolling_upgrade_progress_info_py3 import RollingUpgradeProgressInfo - from .upgrade_operation_historical_status_info_properties_py3 import UpgradeOperationHistoricalStatusInfoProperties - from .upgrade_operation_historical_status_info_py3 import UpgradeOperationHistoricalStatusInfo - from .virtual_machine_health_status_py3 import VirtualMachineHealthStatus - from .virtual_machine_scale_set_vm_instance_view_py3 import VirtualMachineScaleSetVMInstanceView - from .virtual_machine_scale_set_vm_py3 import VirtualMachineScaleSetVM - from .rolling_upgrade_running_status_py3 import RollingUpgradeRunningStatus - from .rolling_upgrade_status_info_py3 import RollingUpgradeStatusInfo - from .resource_py3 import Resource - from .update_resource_py3 import UpdateResource - from .sub_resource_read_only_py3 import SubResourceReadOnly - from .recovery_walk_response_py3 import RecoveryWalkResponse - from .request_rate_by_interval_input_py3 import RequestRateByIntervalInput - from .throttled_requests_input_py3 import ThrottledRequestsInput - from .log_analytics_input_base_py3 import LogAnalyticsInputBase - from .log_analytics_output_py3 import LogAnalyticsOutput - from .log_analytics_operation_result_py3 import LogAnalyticsOperationResult - from .run_command_input_parameter_py3 import RunCommandInputParameter - from .run_command_input_py3 import RunCommandInput - from .run_command_parameter_definition_py3 import RunCommandParameterDefinition - from .run_command_document_base_py3 import RunCommandDocumentBase - from .run_command_document_py3 import RunCommandDocument - from .run_command_result_py3 import RunCommandResult - from .gallery_identifier_py3 import GalleryIdentifier - from .gallery_py3 import Gallery - from .gallery_image_identifier_py3 import GalleryImageIdentifier - from .resource_range_py3 import ResourceRange - from .recommended_machine_configuration_py3 import RecommendedMachineConfiguration - from .disallowed_py3 import Disallowed - from .image_purchase_plan_py3 import ImagePurchasePlan - from .gallery_image_py3 import GalleryImage - from .gallery_image_version_publishing_profile_py3 import GalleryImageVersionPublishingProfile - from .gallery_os_disk_image_py3 import GalleryOSDiskImage - from .gallery_data_disk_image_py3 import GalleryDataDiskImage - from .gallery_image_version_storage_profile_py3 import GalleryImageVersionStorageProfile - from .regional_replication_status_py3 import RegionalReplicationStatus - from .replication_status_py3 import ReplicationStatus - from .gallery_image_version_py3 import GalleryImageVersion - from .target_region_py3 import TargetRegion - from .managed_artifact_py3 import ManagedArtifact - from .gallery_artifact_source_py3 import GalleryArtifactSource - from .gallery_artifact_publishing_profile_base_py3 import GalleryArtifactPublishingProfileBase - from .gallery_disk_image_py3 import GalleryDiskImage - from .disk_sku_py3 import DiskSku - from .image_disk_reference_py3 import ImageDiskReference - from .creation_data_py3 import CreationData - from .source_vault_py3 import SourceVault - from .key_vault_and_secret_reference_py3 import KeyVaultAndSecretReference - from .key_vault_and_key_reference_py3 import KeyVaultAndKeyReference - from .encryption_settings_py3 import EncryptionSettings - from .disk_py3 import Disk - from .disk_update_py3 import DiskUpdate - from .snapshot_sku_py3 import SnapshotSku - from .grant_access_data_py3 import GrantAccessData - from .access_uri_py3 import AccessUri - from .snapshot_py3 import Snapshot - from .snapshot_update_py3 import SnapshotUpdate + from ._models_py3 import AccessUri + from ._models_py3 import AdditionalCapabilities + from ._models_py3 import AdditionalUnattendContent + from ._models_py3 import ApiEntityReference + from ._models_py3 import ApiError + from ._models_py3 import ApiErrorBase + from ._models_py3 import AutoOSUpgradePolicy + from ._models_py3 import AvailabilitySet + from ._models_py3 import AvailabilitySetUpdate + from ._models_py3 import BootDiagnostics + from ._models_py3 import BootDiagnosticsInstanceView + from ._models_py3 import ComputeOperationValue + from ._models_py3 import CreationData + from ._models_py3 import DataDisk + from ._models_py3 import DataDiskImage + from ._models_py3 import DiagnosticsProfile + from ._models_py3 import DiffDiskSettings + from ._models_py3 import Disallowed + from ._models_py3 import Disk + from ._models_py3 import DiskEncryptionSettings + from ._models_py3 import DiskInstanceView + from ._models_py3 import DiskSku + from ._models_py3 import DiskUpdate + from ._models_py3 import EncryptionSettings + from ._models_py3 import Gallery + from ._models_py3 import GalleryArtifactPublishingProfileBase + from ._models_py3 import GalleryArtifactSource + from ._models_py3 import GalleryDataDiskImage + from ._models_py3 import GalleryDiskImage + from ._models_py3 import GalleryIdentifier + from ._models_py3 import GalleryImage + from ._models_py3 import GalleryImageIdentifier + from ._models_py3 import GalleryImageVersion + from ._models_py3 import GalleryImageVersionPublishingProfile + from ._models_py3 import GalleryImageVersionStorageProfile + from ._models_py3 import GalleryOSDiskImage + from ._models_py3 import GrantAccessData + from ._models_py3 import HardwareProfile + from ._models_py3 import Image + from ._models_py3 import ImageDataDisk + from ._models_py3 import ImageDiskReference + from ._models_py3 import ImageOSDisk + from ._models_py3 import ImagePurchasePlan + from ._models_py3 import ImageReference + from ._models_py3 import ImageStorageProfile + from ._models_py3 import ImageUpdate + from ._models_py3 import InnerError + from ._models_py3 import InstanceViewStatus + from ._models_py3 import KeyVaultAndKeyReference + from ._models_py3 import KeyVaultAndSecretReference + from ._models_py3 import KeyVaultKeyReference + from ._models_py3 import KeyVaultSecretReference + from ._models_py3 import LinuxConfiguration + from ._models_py3 import LogAnalyticsInputBase + from ._models_py3 import LogAnalyticsOperationResult + from ._models_py3 import LogAnalyticsOutput + from ._models_py3 import MaintenanceRedeployStatus + from ._models_py3 import ManagedArtifact + from ._models_py3 import ManagedDiskParameters + from ._models_py3 import NetworkInterfaceReference + from ._models_py3 import NetworkProfile + from ._models_py3 import OSDisk + from ._models_py3 import OSDiskImage + from ._models_py3 import OSProfile + from ._models_py3 import Plan + from ._models_py3 import ProximityPlacementGroup + from ._models_py3 import ProximityPlacementGroupUpdate + from ._models_py3 import PurchasePlan + from ._models_py3 import RecommendedMachineConfiguration + from ._models_py3 import RecoveryWalkResponse + from ._models_py3 import RegionalReplicationStatus + from ._models_py3 import ReplicationStatus + from ._models_py3 import RequestRateByIntervalInput + from ._models_py3 import Resource + from ._models_py3 import ResourceRange + from ._models_py3 import RollbackStatusInfo + from ._models_py3 import RollingUpgradePolicy + from ._models_py3 import RollingUpgradeProgressInfo + from ._models_py3 import RollingUpgradeRunningStatus + from ._models_py3 import RollingUpgradeStatusInfo + from ._models_py3 import RunCommandDocument + from ._models_py3 import RunCommandDocumentBase + from ._models_py3 import RunCommandInput + from ._models_py3 import RunCommandInputParameter + from ._models_py3 import RunCommandParameterDefinition + from ._models_py3 import RunCommandResult + from ._models_py3 import Sku + from ._models_py3 import Snapshot + from ._models_py3 import SnapshotSku + from ._models_py3 import SnapshotUpdate + from ._models_py3 import SourceVault + from ._models_py3 import SshConfiguration + from ._models_py3 import SshPublicKey + from ._models_py3 import StorageProfile + from ._models_py3 import SubResource + from ._models_py3 import SubResourceReadOnly + from ._models_py3 import TargetRegion + from ._models_py3 import ThrottledRequestsInput + from ._models_py3 import UpdateResource + from ._models_py3 import UpgradeOperationHistoricalStatusInfo + from ._models_py3 import UpgradeOperationHistoricalStatusInfoProperties + from ._models_py3 import UpgradeOperationHistoryStatus + from ._models_py3 import UpgradePolicy + from ._models_py3 import Usage + from ._models_py3 import UsageName + from ._models_py3 import VaultCertificate + from ._models_py3 import VaultSecretGroup + from ._models_py3 import VirtualHardDisk + from ._models_py3 import VirtualMachine + from ._models_py3 import VirtualMachineAgentInstanceView + from ._models_py3 import VirtualMachineCaptureParameters + from ._models_py3 import VirtualMachineCaptureResult + from ._models_py3 import VirtualMachineExtension + from ._models_py3 import VirtualMachineExtensionHandlerInstanceView + from ._models_py3 import VirtualMachineExtensionImage + from ._models_py3 import VirtualMachineExtensionInstanceView + from ._models_py3 import VirtualMachineExtensionsListResult + from ._models_py3 import VirtualMachineExtensionUpdate + from ._models_py3 import VirtualMachineHealthStatus + from ._models_py3 import VirtualMachineIdentity + from ._models_py3 import VirtualMachineIdentityUserAssignedIdentitiesValue + from ._models_py3 import VirtualMachineImage + from ._models_py3 import VirtualMachineImageResource + from ._models_py3 import VirtualMachineInstanceView + from ._models_py3 import VirtualMachineReimageParameters + from ._models_py3 import VirtualMachineScaleSet + from ._models_py3 import VirtualMachineScaleSetDataDisk + from ._models_py3 import VirtualMachineScaleSetExtension + from ._models_py3 import VirtualMachineScaleSetExtensionProfile + from ._models_py3 import VirtualMachineScaleSetIdentity + from ._models_py3 import VirtualMachineScaleSetIdentityUserAssignedIdentitiesValue + from ._models_py3 import VirtualMachineScaleSetInstanceView + from ._models_py3 import VirtualMachineScaleSetInstanceViewStatusesSummary + from ._models_py3 import VirtualMachineScaleSetIPConfiguration + from ._models_py3 import VirtualMachineScaleSetIpTag + from ._models_py3 import VirtualMachineScaleSetManagedDiskParameters + from ._models_py3 import VirtualMachineScaleSetNetworkConfiguration + from ._models_py3 import VirtualMachineScaleSetNetworkConfigurationDnsSettings + from ._models_py3 import VirtualMachineScaleSetNetworkProfile + from ._models_py3 import VirtualMachineScaleSetOSDisk + from ._models_py3 import VirtualMachineScaleSetOSProfile + from ._models_py3 import VirtualMachineScaleSetPublicIPAddressConfiguration + from ._models_py3 import VirtualMachineScaleSetPublicIPAddressConfigurationDnsSettings + from ._models_py3 import VirtualMachineScaleSetReimageParameters + from ._models_py3 import VirtualMachineScaleSetSku + from ._models_py3 import VirtualMachineScaleSetSkuCapacity + from ._models_py3 import VirtualMachineScaleSetStorageProfile + from ._models_py3 import VirtualMachineScaleSetUpdate + from ._models_py3 import VirtualMachineScaleSetUpdateIPConfiguration + from ._models_py3 import VirtualMachineScaleSetUpdateNetworkConfiguration + from ._models_py3 import VirtualMachineScaleSetUpdateNetworkProfile + from ._models_py3 import VirtualMachineScaleSetUpdateOSDisk + from ._models_py3 import VirtualMachineScaleSetUpdateOSProfile + from ._models_py3 import VirtualMachineScaleSetUpdatePublicIPAddressConfiguration + from ._models_py3 import VirtualMachineScaleSetUpdateStorageProfile + from ._models_py3 import VirtualMachineScaleSetUpdateVMProfile + from ._models_py3 import VirtualMachineScaleSetVM + from ._models_py3 import VirtualMachineScaleSetVMExtensionsSummary + from ._models_py3 import VirtualMachineScaleSetVMInstanceIDs + from ._models_py3 import VirtualMachineScaleSetVMInstanceRequiredIDs + from ._models_py3 import VirtualMachineScaleSetVMInstanceView + from ._models_py3 import VirtualMachineScaleSetVMProfile + from ._models_py3 import VirtualMachineScaleSetVMReimageParameters + from ._models_py3 import VirtualMachineSize + from ._models_py3 import VirtualMachineStatusCodeCount + from ._models_py3 import VirtualMachineUpdate + from ._models_py3 import WindowsConfiguration + from ._models_py3 import WinRMConfiguration + from ._models_py3 import WinRMListener except (SyntaxError, ImportError): - from .compute_operation_value import ComputeOperationValue - from .instance_view_status import InstanceViewStatus - from .sub_resource import SubResource - from .sku import Sku - from .availability_set import AvailabilitySet - from .availability_set_update import AvailabilitySetUpdate - from .proximity_placement_group import ProximityPlacementGroup - from .proximity_placement_group_update import ProximityPlacementGroupUpdate - from .virtual_machine_size import VirtualMachineSize - from .virtual_machine_extension_image import VirtualMachineExtensionImage - from .virtual_machine_image_resource import VirtualMachineImageResource - from .virtual_machine_extension_instance_view import VirtualMachineExtensionInstanceView - from .virtual_machine_extension import VirtualMachineExtension - from .virtual_machine_extension_update import VirtualMachineExtensionUpdate - from .virtual_machine_extensions_list_result import VirtualMachineExtensionsListResult - from .purchase_plan import PurchasePlan - from .os_disk_image import OSDiskImage - from .data_disk_image import DataDiskImage - from .virtual_machine_image import VirtualMachineImage - from .usage_name import UsageName - from .usage import Usage - from .virtual_machine_reimage_parameters import VirtualMachineReimageParameters - from .virtual_machine_capture_parameters import VirtualMachineCaptureParameters - from .virtual_machine_capture_result import VirtualMachineCaptureResult - from .plan import Plan - from .hardware_profile import HardwareProfile - from .image_reference import ImageReference - from .key_vault_secret_reference import KeyVaultSecretReference - from .key_vault_key_reference import KeyVaultKeyReference - from .disk_encryption_settings import DiskEncryptionSettings - from .virtual_hard_disk import VirtualHardDisk - from .diff_disk_settings import DiffDiskSettings - from .managed_disk_parameters import ManagedDiskParameters - from .os_disk import OSDisk - from .data_disk import DataDisk - from .storage_profile import StorageProfile - from .additional_capabilities import AdditionalCapabilities - from .additional_unattend_content import AdditionalUnattendContent - from .win_rm_listener import WinRMListener - from .win_rm_configuration import WinRMConfiguration - from .windows_configuration import WindowsConfiguration - from .ssh_public_key import SshPublicKey - from .ssh_configuration import SshConfiguration - from .linux_configuration import LinuxConfiguration - from .vault_certificate import VaultCertificate - from .vault_secret_group import VaultSecretGroup - from .os_profile import OSProfile - from .network_interface_reference import NetworkInterfaceReference - from .network_profile import NetworkProfile - from .boot_diagnostics import BootDiagnostics - from .diagnostics_profile import DiagnosticsProfile - from .virtual_machine_extension_handler_instance_view import VirtualMachineExtensionHandlerInstanceView - from .virtual_machine_agent_instance_view import VirtualMachineAgentInstanceView - from .disk_instance_view import DiskInstanceView - from .boot_diagnostics_instance_view import BootDiagnosticsInstanceView - from .virtual_machine_identity_user_assigned_identities_value import VirtualMachineIdentityUserAssignedIdentitiesValue - from .virtual_machine_identity import VirtualMachineIdentity - from .maintenance_redeploy_status import MaintenanceRedeployStatus - from .virtual_machine_instance_view import VirtualMachineInstanceView - from .virtual_machine import VirtualMachine - from .virtual_machine_update import VirtualMachineUpdate - from .auto_os_upgrade_policy import AutoOSUpgradePolicy - from .rolling_upgrade_policy import RollingUpgradePolicy - from .upgrade_policy import UpgradePolicy - from .image_os_disk import ImageOSDisk - from .image_data_disk import ImageDataDisk - from .image_storage_profile import ImageStorageProfile - from .image import Image - from .image_update import ImageUpdate - from .virtual_machine_scale_set_identity_user_assigned_identities_value import VirtualMachineScaleSetIdentityUserAssignedIdentitiesValue - from .virtual_machine_scale_set_identity import VirtualMachineScaleSetIdentity - from .virtual_machine_scale_set_os_profile import VirtualMachineScaleSetOSProfile - from .virtual_machine_scale_set_update_os_profile import VirtualMachineScaleSetUpdateOSProfile - from .virtual_machine_scale_set_managed_disk_parameters import VirtualMachineScaleSetManagedDiskParameters - from .virtual_machine_scale_set_os_disk import VirtualMachineScaleSetOSDisk - from .virtual_machine_scale_set_update_os_disk import VirtualMachineScaleSetUpdateOSDisk - from .virtual_machine_scale_set_data_disk import VirtualMachineScaleSetDataDisk - from .virtual_machine_scale_set_storage_profile import VirtualMachineScaleSetStorageProfile - from .virtual_machine_scale_set_update_storage_profile import VirtualMachineScaleSetUpdateStorageProfile - from .api_entity_reference import ApiEntityReference - from .virtual_machine_scale_set_public_ip_address_configuration_dns_settings import VirtualMachineScaleSetPublicIPAddressConfigurationDnsSettings - from .virtual_machine_scale_set_ip_tag import VirtualMachineScaleSetIpTag - from .virtual_machine_scale_set_public_ip_address_configuration import VirtualMachineScaleSetPublicIPAddressConfiguration - from .virtual_machine_scale_set_update_public_ip_address_configuration import VirtualMachineScaleSetUpdatePublicIPAddressConfiguration - from .virtual_machine_scale_set_ip_configuration import VirtualMachineScaleSetIPConfiguration - from .virtual_machine_scale_set_update_ip_configuration import VirtualMachineScaleSetUpdateIPConfiguration - from .virtual_machine_scale_set_network_configuration_dns_settings import VirtualMachineScaleSetNetworkConfigurationDnsSettings - from .virtual_machine_scale_set_network_configuration import VirtualMachineScaleSetNetworkConfiguration - from .virtual_machine_scale_set_update_network_configuration import VirtualMachineScaleSetUpdateNetworkConfiguration - from .virtual_machine_scale_set_network_profile import VirtualMachineScaleSetNetworkProfile - from .virtual_machine_scale_set_update_network_profile import VirtualMachineScaleSetUpdateNetworkProfile - from .virtual_machine_scale_set_extension import VirtualMachineScaleSetExtension - from .virtual_machine_scale_set_extension_profile import VirtualMachineScaleSetExtensionProfile - from .virtual_machine_scale_set_vm_profile import VirtualMachineScaleSetVMProfile - from .virtual_machine_scale_set_update_vm_profile import VirtualMachineScaleSetUpdateVMProfile - from .virtual_machine_scale_set import VirtualMachineScaleSet - from .virtual_machine_scale_set_vm_reimage_parameters import VirtualMachineScaleSetVMReimageParameters - from .virtual_machine_scale_set_reimage_parameters import VirtualMachineScaleSetReimageParameters - from .virtual_machine_scale_set_update import VirtualMachineScaleSetUpdate - from .virtual_machine_scale_set_vm_instance_ids import VirtualMachineScaleSetVMInstanceIDs - from .virtual_machine_scale_set_vm_instance_required_ids import VirtualMachineScaleSetVMInstanceRequiredIDs - from .virtual_machine_status_code_count import VirtualMachineStatusCodeCount - from .virtual_machine_scale_set_instance_view_statuses_summary import VirtualMachineScaleSetInstanceViewStatusesSummary - from .virtual_machine_scale_set_vm_extensions_summary import VirtualMachineScaleSetVMExtensionsSummary - from .virtual_machine_scale_set_instance_view import VirtualMachineScaleSetInstanceView - from .virtual_machine_scale_set_sku_capacity import VirtualMachineScaleSetSkuCapacity - from .virtual_machine_scale_set_sku import VirtualMachineScaleSetSku - from .api_error_base import ApiErrorBase - from .inner_error import InnerError - from .api_error import ApiError - from .rollback_status_info import RollbackStatusInfo - from .upgrade_operation_history_status import UpgradeOperationHistoryStatus - from .rolling_upgrade_progress_info import RollingUpgradeProgressInfo - from .upgrade_operation_historical_status_info_properties import UpgradeOperationHistoricalStatusInfoProperties - from .upgrade_operation_historical_status_info import UpgradeOperationHistoricalStatusInfo - from .virtual_machine_health_status import VirtualMachineHealthStatus - from .virtual_machine_scale_set_vm_instance_view import VirtualMachineScaleSetVMInstanceView - from .virtual_machine_scale_set_vm import VirtualMachineScaleSetVM - from .rolling_upgrade_running_status import RollingUpgradeRunningStatus - from .rolling_upgrade_status_info import RollingUpgradeStatusInfo - from .resource import Resource - from .update_resource import UpdateResource - from .sub_resource_read_only import SubResourceReadOnly - from .recovery_walk_response import RecoveryWalkResponse - from .request_rate_by_interval_input import RequestRateByIntervalInput - from .throttled_requests_input import ThrottledRequestsInput - from .log_analytics_input_base import LogAnalyticsInputBase - from .log_analytics_output import LogAnalyticsOutput - from .log_analytics_operation_result import LogAnalyticsOperationResult - from .run_command_input_parameter import RunCommandInputParameter - from .run_command_input import RunCommandInput - from .run_command_parameter_definition import RunCommandParameterDefinition - from .run_command_document_base import RunCommandDocumentBase - from .run_command_document import RunCommandDocument - from .run_command_result import RunCommandResult - from .gallery_identifier import GalleryIdentifier - from .gallery import Gallery - from .gallery_image_identifier import GalleryImageIdentifier - from .resource_range import ResourceRange - from .recommended_machine_configuration import RecommendedMachineConfiguration - from .disallowed import Disallowed - from .image_purchase_plan import ImagePurchasePlan - from .gallery_image import GalleryImage - from .gallery_image_version_publishing_profile import GalleryImageVersionPublishingProfile - from .gallery_os_disk_image import GalleryOSDiskImage - from .gallery_data_disk_image import GalleryDataDiskImage - from .gallery_image_version_storage_profile import GalleryImageVersionStorageProfile - from .regional_replication_status import RegionalReplicationStatus - from .replication_status import ReplicationStatus - from .gallery_image_version import GalleryImageVersion - from .target_region import TargetRegion - from .managed_artifact import ManagedArtifact - from .gallery_artifact_source import GalleryArtifactSource - from .gallery_artifact_publishing_profile_base import GalleryArtifactPublishingProfileBase - from .gallery_disk_image import GalleryDiskImage - from .disk_sku import DiskSku - from .image_disk_reference import ImageDiskReference - from .creation_data import CreationData - from .source_vault import SourceVault - from .key_vault_and_secret_reference import KeyVaultAndSecretReference - from .key_vault_and_key_reference import KeyVaultAndKeyReference - from .encryption_settings import EncryptionSettings - from .disk import Disk - from .disk_update import DiskUpdate - from .snapshot_sku import SnapshotSku - from .grant_access_data import GrantAccessData - from .access_uri import AccessUri - from .snapshot import Snapshot - from .snapshot_update import SnapshotUpdate -from .compute_operation_value_paged import ComputeOperationValuePaged -from .availability_set_paged import AvailabilitySetPaged -from .virtual_machine_size_paged import VirtualMachineSizePaged -from .proximity_placement_group_paged import ProximityPlacementGroupPaged -from .usage_paged import UsagePaged -from .virtual_machine_paged import VirtualMachinePaged -from .image_paged import ImagePaged -from .virtual_machine_scale_set_paged import VirtualMachineScaleSetPaged -from .virtual_machine_scale_set_sku_paged import VirtualMachineScaleSetSkuPaged -from .upgrade_operation_historical_status_info_paged import UpgradeOperationHistoricalStatusInfoPaged -from .virtual_machine_scale_set_extension_paged import VirtualMachineScaleSetExtensionPaged -from .virtual_machine_scale_set_vm_paged import VirtualMachineScaleSetVMPaged -from .run_command_document_base_paged import RunCommandDocumentBasePaged -from .gallery_paged import GalleryPaged -from .gallery_image_paged import GalleryImagePaged -from .gallery_image_version_paged import GalleryImageVersionPaged -from .disk_paged import DiskPaged -from .snapshot_paged import SnapshotPaged -from .compute_management_client_enums import ( + from ._models import AccessUri + from ._models import AdditionalCapabilities + from ._models import AdditionalUnattendContent + from ._models import ApiEntityReference + from ._models import ApiError + from ._models import ApiErrorBase + from ._models import AutoOSUpgradePolicy + from ._models import AvailabilitySet + from ._models import AvailabilitySetUpdate + from ._models import BootDiagnostics + from ._models import BootDiagnosticsInstanceView + from ._models import ComputeOperationValue + from ._models import CreationData + from ._models import DataDisk + from ._models import DataDiskImage + from ._models import DiagnosticsProfile + from ._models import DiffDiskSettings + from ._models import Disallowed + from ._models import Disk + from ._models import DiskEncryptionSettings + from ._models import DiskInstanceView + from ._models import DiskSku + from ._models import DiskUpdate + from ._models import EncryptionSettings + from ._models import Gallery + from ._models import GalleryArtifactPublishingProfileBase + from ._models import GalleryArtifactSource + from ._models import GalleryDataDiskImage + from ._models import GalleryDiskImage + from ._models import GalleryIdentifier + from ._models import GalleryImage + from ._models import GalleryImageIdentifier + from ._models import GalleryImageVersion + from ._models import GalleryImageVersionPublishingProfile + from ._models import GalleryImageVersionStorageProfile + from ._models import GalleryOSDiskImage + from ._models import GrantAccessData + from ._models import HardwareProfile + from ._models import Image + from ._models import ImageDataDisk + from ._models import ImageDiskReference + from ._models import ImageOSDisk + from ._models import ImagePurchasePlan + from ._models import ImageReference + from ._models import ImageStorageProfile + from ._models import ImageUpdate + from ._models import InnerError + from ._models import InstanceViewStatus + from ._models import KeyVaultAndKeyReference + from ._models import KeyVaultAndSecretReference + from ._models import KeyVaultKeyReference + from ._models import KeyVaultSecretReference + from ._models import LinuxConfiguration + from ._models import LogAnalyticsInputBase + from ._models import LogAnalyticsOperationResult + from ._models import LogAnalyticsOutput + from ._models import MaintenanceRedeployStatus + from ._models import ManagedArtifact + from ._models import ManagedDiskParameters + from ._models import NetworkInterfaceReference + from ._models import NetworkProfile + from ._models import OSDisk + from ._models import OSDiskImage + from ._models import OSProfile + from ._models import Plan + from ._models import ProximityPlacementGroup + from ._models import ProximityPlacementGroupUpdate + from ._models import PurchasePlan + from ._models import RecommendedMachineConfiguration + from ._models import RecoveryWalkResponse + from ._models import RegionalReplicationStatus + from ._models import ReplicationStatus + from ._models import RequestRateByIntervalInput + from ._models import Resource + from ._models import ResourceRange + from ._models import RollbackStatusInfo + from ._models import RollingUpgradePolicy + from ._models import RollingUpgradeProgressInfo + from ._models import RollingUpgradeRunningStatus + from ._models import RollingUpgradeStatusInfo + from ._models import RunCommandDocument + from ._models import RunCommandDocumentBase + from ._models import RunCommandInput + from ._models import RunCommandInputParameter + from ._models import RunCommandParameterDefinition + from ._models import RunCommandResult + from ._models import Sku + from ._models import Snapshot + from ._models import SnapshotSku + from ._models import SnapshotUpdate + from ._models import SourceVault + from ._models import SshConfiguration + from ._models import SshPublicKey + from ._models import StorageProfile + from ._models import SubResource + from ._models import SubResourceReadOnly + from ._models import TargetRegion + from ._models import ThrottledRequestsInput + from ._models import UpdateResource + from ._models import UpgradeOperationHistoricalStatusInfo + from ._models import UpgradeOperationHistoricalStatusInfoProperties + from ._models import UpgradeOperationHistoryStatus + from ._models import UpgradePolicy + from ._models import Usage + from ._models import UsageName + from ._models import VaultCertificate + from ._models import VaultSecretGroup + from ._models import VirtualHardDisk + from ._models import VirtualMachine + from ._models import VirtualMachineAgentInstanceView + from ._models import VirtualMachineCaptureParameters + from ._models import VirtualMachineCaptureResult + from ._models import VirtualMachineExtension + from ._models import VirtualMachineExtensionHandlerInstanceView + from ._models import VirtualMachineExtensionImage + from ._models import VirtualMachineExtensionInstanceView + from ._models import VirtualMachineExtensionsListResult + from ._models import VirtualMachineExtensionUpdate + from ._models import VirtualMachineHealthStatus + from ._models import VirtualMachineIdentity + from ._models import VirtualMachineIdentityUserAssignedIdentitiesValue + from ._models import VirtualMachineImage + from ._models import VirtualMachineImageResource + from ._models import VirtualMachineInstanceView + from ._models import VirtualMachineReimageParameters + from ._models import VirtualMachineScaleSet + from ._models import VirtualMachineScaleSetDataDisk + from ._models import VirtualMachineScaleSetExtension + from ._models import VirtualMachineScaleSetExtensionProfile + from ._models import VirtualMachineScaleSetIdentity + from ._models import VirtualMachineScaleSetIdentityUserAssignedIdentitiesValue + from ._models import VirtualMachineScaleSetInstanceView + from ._models import VirtualMachineScaleSetInstanceViewStatusesSummary + from ._models import VirtualMachineScaleSetIPConfiguration + from ._models import VirtualMachineScaleSetIpTag + from ._models import VirtualMachineScaleSetManagedDiskParameters + from ._models import VirtualMachineScaleSetNetworkConfiguration + from ._models import VirtualMachineScaleSetNetworkConfigurationDnsSettings + from ._models import VirtualMachineScaleSetNetworkProfile + from ._models import VirtualMachineScaleSetOSDisk + from ._models import VirtualMachineScaleSetOSProfile + from ._models import VirtualMachineScaleSetPublicIPAddressConfiguration + from ._models import VirtualMachineScaleSetPublicIPAddressConfigurationDnsSettings + from ._models import VirtualMachineScaleSetReimageParameters + from ._models import VirtualMachineScaleSetSku + from ._models import VirtualMachineScaleSetSkuCapacity + from ._models import VirtualMachineScaleSetStorageProfile + from ._models import VirtualMachineScaleSetUpdate + from ._models import VirtualMachineScaleSetUpdateIPConfiguration + from ._models import VirtualMachineScaleSetUpdateNetworkConfiguration + from ._models import VirtualMachineScaleSetUpdateNetworkProfile + from ._models import VirtualMachineScaleSetUpdateOSDisk + from ._models import VirtualMachineScaleSetUpdateOSProfile + from ._models import VirtualMachineScaleSetUpdatePublicIPAddressConfiguration + from ._models import VirtualMachineScaleSetUpdateStorageProfile + from ._models import VirtualMachineScaleSetUpdateVMProfile + from ._models import VirtualMachineScaleSetVM + from ._models import VirtualMachineScaleSetVMExtensionsSummary + from ._models import VirtualMachineScaleSetVMInstanceIDs + from ._models import VirtualMachineScaleSetVMInstanceRequiredIDs + from ._models import VirtualMachineScaleSetVMInstanceView + from ._models import VirtualMachineScaleSetVMProfile + from ._models import VirtualMachineScaleSetVMReimageParameters + from ._models import VirtualMachineSize + from ._models import VirtualMachineStatusCodeCount + from ._models import VirtualMachineUpdate + from ._models import WindowsConfiguration + from ._models import WinRMConfiguration + from ._models import WinRMListener +from ._paged_models import AvailabilitySetPaged +from ._paged_models import ComputeOperationValuePaged +from ._paged_models import DiskPaged +from ._paged_models import GalleryImagePaged +from ._paged_models import GalleryImageVersionPaged +from ._paged_models import GalleryPaged +from ._paged_models import ImagePaged +from ._paged_models import ProximityPlacementGroupPaged +from ._paged_models import RunCommandDocumentBasePaged +from ._paged_models import SnapshotPaged +from ._paged_models import UpgradeOperationHistoricalStatusInfoPaged +from ._paged_models import UsagePaged +from ._paged_models import VirtualMachinePaged +from ._paged_models import VirtualMachineScaleSetExtensionPaged +from ._paged_models import VirtualMachineScaleSetPaged +from ._paged_models import VirtualMachineScaleSetSkuPaged +from ._paged_models import VirtualMachineScaleSetVMPaged +from ._paged_models import VirtualMachineSizePaged +from ._compute_management_client_enums import ( StatusLevelTypes, AvailabilitySetSkuTypes, ProximityPlacementGroupType, @@ -406,175 +406,175 @@ ) __all__ = [ - 'ComputeOperationValue', - 'InstanceViewStatus', - 'SubResource', - 'Sku', + 'AccessUri', + 'AdditionalCapabilities', + 'AdditionalUnattendContent', + 'ApiEntityReference', + 'ApiError', + 'ApiErrorBase', + 'AutoOSUpgradePolicy', 'AvailabilitySet', 'AvailabilitySetUpdate', - 'ProximityPlacementGroup', - 'ProximityPlacementGroupUpdate', - 'VirtualMachineSize', - 'VirtualMachineExtensionImage', - 'VirtualMachineImageResource', - 'VirtualMachineExtensionInstanceView', - 'VirtualMachineExtension', - 'VirtualMachineExtensionUpdate', - 'VirtualMachineExtensionsListResult', - 'PurchasePlan', - 'OSDiskImage', + 'BootDiagnostics', + 'BootDiagnosticsInstanceView', + 'ComputeOperationValue', + 'CreationData', + 'DataDisk', 'DataDiskImage', - 'VirtualMachineImage', - 'UsageName', - 'Usage', - 'VirtualMachineReimageParameters', - 'VirtualMachineCaptureParameters', - 'VirtualMachineCaptureResult', - 'Plan', + 'DiagnosticsProfile', + 'DiffDiskSettings', + 'Disallowed', + 'Disk', + 'DiskEncryptionSettings', + 'DiskInstanceView', + 'DiskSku', + 'DiskUpdate', + 'EncryptionSettings', + 'Gallery', + 'GalleryArtifactPublishingProfileBase', + 'GalleryArtifactSource', + 'GalleryDataDiskImage', + 'GalleryDiskImage', + 'GalleryIdentifier', + 'GalleryImage', + 'GalleryImageIdentifier', + 'GalleryImageVersion', + 'GalleryImageVersionPublishingProfile', + 'GalleryImageVersionStorageProfile', + 'GalleryOSDiskImage', + 'GrantAccessData', 'HardwareProfile', + 'Image', + 'ImageDataDisk', + 'ImageDiskReference', + 'ImageOSDisk', + 'ImagePurchasePlan', 'ImageReference', - 'KeyVaultSecretReference', + 'ImageStorageProfile', + 'ImageUpdate', + 'InnerError', + 'InstanceViewStatus', + 'KeyVaultAndKeyReference', + 'KeyVaultAndSecretReference', 'KeyVaultKeyReference', - 'DiskEncryptionSettings', - 'VirtualHardDisk', - 'DiffDiskSettings', + 'KeyVaultSecretReference', + 'LinuxConfiguration', + 'LogAnalyticsInputBase', + 'LogAnalyticsOperationResult', + 'LogAnalyticsOutput', + 'MaintenanceRedeployStatus', + 'ManagedArtifact', 'ManagedDiskParameters', + 'NetworkInterfaceReference', + 'NetworkProfile', 'OSDisk', - 'DataDisk', - 'StorageProfile', - 'AdditionalCapabilities', - 'AdditionalUnattendContent', - 'WinRMListener', - 'WinRMConfiguration', - 'WindowsConfiguration', - 'SshPublicKey', + 'OSDiskImage', + 'OSProfile', + 'Plan', + 'ProximityPlacementGroup', + 'ProximityPlacementGroupUpdate', + 'PurchasePlan', + 'RecommendedMachineConfiguration', + 'RecoveryWalkResponse', + 'RegionalReplicationStatus', + 'ReplicationStatus', + 'RequestRateByIntervalInput', + 'Resource', + 'ResourceRange', + 'RollbackStatusInfo', + 'RollingUpgradePolicy', + 'RollingUpgradeProgressInfo', + 'RollingUpgradeRunningStatus', + 'RollingUpgradeStatusInfo', + 'RunCommandDocument', + 'RunCommandDocumentBase', + 'RunCommandInput', + 'RunCommandInputParameter', + 'RunCommandParameterDefinition', + 'RunCommandResult', + 'Sku', + 'Snapshot', + 'SnapshotSku', + 'SnapshotUpdate', + 'SourceVault', 'SshConfiguration', - 'LinuxConfiguration', + 'SshPublicKey', + 'StorageProfile', + 'SubResource', + 'SubResourceReadOnly', + 'TargetRegion', + 'ThrottledRequestsInput', + 'UpdateResource', + 'UpgradeOperationHistoricalStatusInfo', + 'UpgradeOperationHistoricalStatusInfoProperties', + 'UpgradeOperationHistoryStatus', + 'UpgradePolicy', + 'Usage', + 'UsageName', 'VaultCertificate', 'VaultSecretGroup', - 'OSProfile', - 'NetworkInterfaceReference', - 'NetworkProfile', - 'BootDiagnostics', - 'DiagnosticsProfile', - 'VirtualMachineExtensionHandlerInstanceView', + 'VirtualHardDisk', + 'VirtualMachine', 'VirtualMachineAgentInstanceView', - 'DiskInstanceView', - 'BootDiagnosticsInstanceView', - 'VirtualMachineIdentityUserAssignedIdentitiesValue', + 'VirtualMachineCaptureParameters', + 'VirtualMachineCaptureResult', + 'VirtualMachineExtension', + 'VirtualMachineExtensionHandlerInstanceView', + 'VirtualMachineExtensionImage', + 'VirtualMachineExtensionInstanceView', + 'VirtualMachineExtensionsListResult', + 'VirtualMachineExtensionUpdate', + 'VirtualMachineHealthStatus', 'VirtualMachineIdentity', - 'MaintenanceRedeployStatus', + 'VirtualMachineIdentityUserAssignedIdentitiesValue', + 'VirtualMachineImage', + 'VirtualMachineImageResource', 'VirtualMachineInstanceView', - 'VirtualMachine', - 'VirtualMachineUpdate', - 'AutoOSUpgradePolicy', - 'RollingUpgradePolicy', - 'UpgradePolicy', - 'ImageOSDisk', - 'ImageDataDisk', - 'ImageStorageProfile', - 'Image', - 'ImageUpdate', - 'VirtualMachineScaleSetIdentityUserAssignedIdentitiesValue', + 'VirtualMachineReimageParameters', + 'VirtualMachineScaleSet', + 'VirtualMachineScaleSetDataDisk', + 'VirtualMachineScaleSetExtension', + 'VirtualMachineScaleSetExtensionProfile', 'VirtualMachineScaleSetIdentity', - 'VirtualMachineScaleSetOSProfile', - 'VirtualMachineScaleSetUpdateOSProfile', + 'VirtualMachineScaleSetIdentityUserAssignedIdentitiesValue', + 'VirtualMachineScaleSetInstanceView', + 'VirtualMachineScaleSetInstanceViewStatusesSummary', + 'VirtualMachineScaleSetIPConfiguration', + 'VirtualMachineScaleSetIpTag', 'VirtualMachineScaleSetManagedDiskParameters', + 'VirtualMachineScaleSetNetworkConfiguration', + 'VirtualMachineScaleSetNetworkConfigurationDnsSettings', + 'VirtualMachineScaleSetNetworkProfile', 'VirtualMachineScaleSetOSDisk', - 'VirtualMachineScaleSetUpdateOSDisk', - 'VirtualMachineScaleSetDataDisk', - 'VirtualMachineScaleSetStorageProfile', - 'VirtualMachineScaleSetUpdateStorageProfile', - 'ApiEntityReference', - 'VirtualMachineScaleSetPublicIPAddressConfigurationDnsSettings', - 'VirtualMachineScaleSetIpTag', + 'VirtualMachineScaleSetOSProfile', 'VirtualMachineScaleSetPublicIPAddressConfiguration', - 'VirtualMachineScaleSetUpdatePublicIPAddressConfiguration', - 'VirtualMachineScaleSetIPConfiguration', + 'VirtualMachineScaleSetPublicIPAddressConfigurationDnsSettings', + 'VirtualMachineScaleSetReimageParameters', + 'VirtualMachineScaleSetSku', + 'VirtualMachineScaleSetSkuCapacity', + 'VirtualMachineScaleSetStorageProfile', + 'VirtualMachineScaleSetUpdate', 'VirtualMachineScaleSetUpdateIPConfiguration', - 'VirtualMachineScaleSetNetworkConfigurationDnsSettings', - 'VirtualMachineScaleSetNetworkConfiguration', 'VirtualMachineScaleSetUpdateNetworkConfiguration', - 'VirtualMachineScaleSetNetworkProfile', 'VirtualMachineScaleSetUpdateNetworkProfile', - 'VirtualMachineScaleSetExtension', - 'VirtualMachineScaleSetExtensionProfile', - 'VirtualMachineScaleSetVMProfile', + 'VirtualMachineScaleSetUpdateOSDisk', + 'VirtualMachineScaleSetUpdateOSProfile', + 'VirtualMachineScaleSetUpdatePublicIPAddressConfiguration', + 'VirtualMachineScaleSetUpdateStorageProfile', 'VirtualMachineScaleSetUpdateVMProfile', - 'VirtualMachineScaleSet', - 'VirtualMachineScaleSetVMReimageParameters', - 'VirtualMachineScaleSetReimageParameters', - 'VirtualMachineScaleSetUpdate', + 'VirtualMachineScaleSetVM', + 'VirtualMachineScaleSetVMExtensionsSummary', 'VirtualMachineScaleSetVMInstanceIDs', 'VirtualMachineScaleSetVMInstanceRequiredIDs', - 'VirtualMachineStatusCodeCount', - 'VirtualMachineScaleSetInstanceViewStatusesSummary', - 'VirtualMachineScaleSetVMExtensionsSummary', - 'VirtualMachineScaleSetInstanceView', - 'VirtualMachineScaleSetSkuCapacity', - 'VirtualMachineScaleSetSku', - 'ApiErrorBase', - 'InnerError', - 'ApiError', - 'RollbackStatusInfo', - 'UpgradeOperationHistoryStatus', - 'RollingUpgradeProgressInfo', - 'UpgradeOperationHistoricalStatusInfoProperties', - 'UpgradeOperationHistoricalStatusInfo', - 'VirtualMachineHealthStatus', 'VirtualMachineScaleSetVMInstanceView', - 'VirtualMachineScaleSetVM', - 'RollingUpgradeRunningStatus', - 'RollingUpgradeStatusInfo', - 'Resource', - 'UpdateResource', - 'SubResourceReadOnly', - 'RecoveryWalkResponse', - 'RequestRateByIntervalInput', - 'ThrottledRequestsInput', - 'LogAnalyticsInputBase', - 'LogAnalyticsOutput', - 'LogAnalyticsOperationResult', - 'RunCommandInputParameter', - 'RunCommandInput', - 'RunCommandParameterDefinition', - 'RunCommandDocumentBase', - 'RunCommandDocument', - 'RunCommandResult', - 'GalleryIdentifier', - 'Gallery', - 'GalleryImageIdentifier', - 'ResourceRange', - 'RecommendedMachineConfiguration', - 'Disallowed', - 'ImagePurchasePlan', - 'GalleryImage', - 'GalleryImageVersionPublishingProfile', - 'GalleryOSDiskImage', - 'GalleryDataDiskImage', - 'GalleryImageVersionStorageProfile', - 'RegionalReplicationStatus', - 'ReplicationStatus', - 'GalleryImageVersion', - 'TargetRegion', - 'ManagedArtifact', - 'GalleryArtifactSource', - 'GalleryArtifactPublishingProfileBase', - 'GalleryDiskImage', - 'DiskSku', - 'ImageDiskReference', - 'CreationData', - 'SourceVault', - 'KeyVaultAndSecretReference', - 'KeyVaultAndKeyReference', - 'EncryptionSettings', - 'Disk', - 'DiskUpdate', - 'SnapshotSku', - 'GrantAccessData', - 'AccessUri', - 'Snapshot', - 'SnapshotUpdate', + 'VirtualMachineScaleSetVMProfile', + 'VirtualMachineScaleSetVMReimageParameters', + 'VirtualMachineSize', + 'VirtualMachineStatusCodeCount', + 'VirtualMachineUpdate', + 'WindowsConfiguration', + 'WinRMConfiguration', + 'WinRMListener', 'ComputeOperationValuePaged', 'AvailabilitySetPaged', 'VirtualMachineSizePaged', diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/compute_management_client_enums.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/_compute_management_client_enums.py similarity index 100% rename from sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/compute_management_client_enums.py rename to sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/_compute_management_client_enums.py diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/_models.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/_models.py new file mode 100644 index 000000000000..49ab62592a7c --- /dev/null +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/_models.py @@ -0,0 +1,6888 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model +from msrest.exceptions import HttpOperationError + + +class AccessUri(Model): + """A disk access SAS uri. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar access_sas: A SAS uri for accessing a disk. + :vartype access_sas: str + """ + + _validation = { + 'access_sas': {'readonly': True}, + } + + _attribute_map = { + 'access_sas': {'key': 'accessSAS', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(AccessUri, self).__init__(**kwargs) + self.access_sas = None + + +class AdditionalCapabilities(Model): + """Enables or disables a capability on the virtual machine or virtual machine + scale set. + + :param ultra_ssd_enabled: The flag that enables or disables a capability + to have one or more managed data disks with UltraSSD_LRS storage account + type on the VM or VMSS. Managed disks with storage account type + UltraSSD_LRS can be added to a virtual machine or virtual machine scale + set only if this property is enabled. + :type ultra_ssd_enabled: bool + """ + + _attribute_map = { + 'ultra_ssd_enabled': {'key': 'ultraSSDEnabled', 'type': 'bool'}, + } + + def __init__(self, **kwargs): + super(AdditionalCapabilities, self).__init__(**kwargs) + self.ultra_ssd_enabled = kwargs.get('ultra_ssd_enabled', None) + + +class AdditionalUnattendContent(Model): + """Specifies additional XML formatted information that can be included in the + Unattend.xml file, which is used by Windows Setup. Contents are defined by + setting name, component name, and the pass in which the content is applied. + + :param pass_name: The pass name. Currently, the only allowable value is + OobeSystem. Possible values include: 'OobeSystem' + :type pass_name: str or ~azure.mgmt.compute.v2018_06_01.models.PassNames + :param component_name: The component name. Currently, the only allowable + value is Microsoft-Windows-Shell-Setup. Possible values include: + 'Microsoft-Windows-Shell-Setup' + :type component_name: str or + ~azure.mgmt.compute.v2018_06_01.models.ComponentNames + :param setting_name: Specifies the name of the setting to which the + content applies. Possible values are: FirstLogonCommands and AutoLogon. + Possible values include: 'AutoLogon', 'FirstLogonCommands' + :type setting_name: str or + ~azure.mgmt.compute.v2018_06_01.models.SettingNames + :param content: Specifies the XML formatted content that is added to the + unattend.xml file for the specified path and component. The XML must be + less than 4KB and must include the root element for the setting or feature + that is being inserted. + :type content: str + """ + + _attribute_map = { + 'pass_name': {'key': 'passName', 'type': 'PassNames'}, + 'component_name': {'key': 'componentName', 'type': 'ComponentNames'}, + 'setting_name': {'key': 'settingName', 'type': 'SettingNames'}, + 'content': {'key': 'content', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(AdditionalUnattendContent, self).__init__(**kwargs) + self.pass_name = kwargs.get('pass_name', None) + self.component_name = kwargs.get('component_name', None) + self.setting_name = kwargs.get('setting_name', None) + self.content = kwargs.get('content', None) + + +class ApiEntityReference(Model): + """The API entity reference. + + :param id: The ARM resource id in the form of + /subscriptions/{SubscriptionId}/resourceGroups/{ResourceGroupName}/... + :type id: str + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ApiEntityReference, self).__init__(**kwargs) + self.id = kwargs.get('id', None) + + +class ApiError(Model): + """Api error. + + :param details: The Api error details + :type details: list[~azure.mgmt.compute.v2018_06_01.models.ApiErrorBase] + :param innererror: The Api inner error + :type innererror: ~azure.mgmt.compute.v2018_06_01.models.InnerError + :param code: The error code. + :type code: str + :param target: The target of the particular error. + :type target: str + :param message: The error message. + :type message: str + """ + + _attribute_map = { + 'details': {'key': 'details', 'type': '[ApiErrorBase]'}, + 'innererror': {'key': 'innererror', 'type': 'InnerError'}, + 'code': {'key': 'code', 'type': 'str'}, + 'target': {'key': 'target', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ApiError, self).__init__(**kwargs) + self.details = kwargs.get('details', None) + self.innererror = kwargs.get('innererror', None) + self.code = kwargs.get('code', None) + self.target = kwargs.get('target', None) + self.message = kwargs.get('message', None) + + +class ApiErrorBase(Model): + """Api error base. + + :param code: The error code. + :type code: str + :param target: The target of the particular error. + :type target: str + :param message: The error message. + :type message: str + """ + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + 'target': {'key': 'target', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ApiErrorBase, self).__init__(**kwargs) + self.code = kwargs.get('code', None) + self.target = kwargs.get('target', None) + self.message = kwargs.get('message', None) + + +class AutoOSUpgradePolicy(Model): + """The configuration parameters used for performing automatic OS upgrade. + + :param disable_auto_rollback: Whether OS image rollback feature should be + disabled. Default value is false. + :type disable_auto_rollback: bool + """ + + _attribute_map = { + 'disable_auto_rollback': {'key': 'disableAutoRollback', 'type': 'bool'}, + } + + def __init__(self, **kwargs): + super(AutoOSUpgradePolicy, self).__init__(**kwargs) + self.disable_auto_rollback = kwargs.get('disable_auto_rollback', None) + + +class Resource(Model): + """The Resource model definition. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource Id + :vartype id: str + :ivar name: Resource name + :vartype name: str + :ivar type: Resource type + :vartype type: str + :param location: Required. Resource location + :type location: str + :param tags: Resource tags + :type tags: dict[str, str] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__(self, **kwargs): + super(Resource, self).__init__(**kwargs) + self.id = None + self.name = None + self.type = None + self.location = kwargs.get('location', None) + self.tags = kwargs.get('tags', None) + + +class AvailabilitySet(Resource): + """Specifies information about the availability set that the virtual machine + should be assigned to. Virtual machines specified in the same availability + set are allocated to different nodes to maximize availability. For more + information about availability sets, see [Manage the availability of + virtual + machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-manage-availability?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). +

    For more information on Azure planned maintenance, see [Planned + maintenance for virtual machines in + Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-planned-maintenance?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json) +

    Currently, a VM can only be added to availability set at creation + time. An existing VM cannot be added to an availability set. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource Id + :vartype id: str + :ivar name: Resource name + :vartype name: str + :ivar type: Resource type + :vartype type: str + :param location: Required. Resource location + :type location: str + :param tags: Resource tags + :type tags: dict[str, str] + :param platform_update_domain_count: Update Domain count. + :type platform_update_domain_count: int + :param platform_fault_domain_count: Fault Domain count. + :type platform_fault_domain_count: int + :param virtual_machines: A list of references to all virtual machines in + the availability set. + :type virtual_machines: + list[~azure.mgmt.compute.v2018_06_01.models.SubResource] + :param proximity_placement_group: Specifies information about the + proximity placement group that the availability set should be assigned to. +

    Minimum api-version: 2018-04-01. + :type proximity_placement_group: + ~azure.mgmt.compute.v2018_06_01.models.SubResource + :ivar statuses: The resource status information. + :vartype statuses: + list[~azure.mgmt.compute.v2018_06_01.models.InstanceViewStatus] + :param sku: Sku of the availability set, only name is required to be set. + See AvailabilitySetSkuTypes for possible set of values. Use 'Aligned' for + virtual machines with managed disks and 'Classic' for virtual machines + with unmanaged disks. Default value is 'Classic'. + :type sku: ~azure.mgmt.compute.v2018_06_01.models.Sku + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + 'statuses': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'platform_update_domain_count': {'key': 'properties.platformUpdateDomainCount', 'type': 'int'}, + 'platform_fault_domain_count': {'key': 'properties.platformFaultDomainCount', 'type': 'int'}, + 'virtual_machines': {'key': 'properties.virtualMachines', 'type': '[SubResource]'}, + 'proximity_placement_group': {'key': 'properties.proximityPlacementGroup', 'type': 'SubResource'}, + 'statuses': {'key': 'properties.statuses', 'type': '[InstanceViewStatus]'}, + 'sku': {'key': 'sku', 'type': 'Sku'}, + } + + def __init__(self, **kwargs): + super(AvailabilitySet, self).__init__(**kwargs) + self.platform_update_domain_count = kwargs.get('platform_update_domain_count', None) + self.platform_fault_domain_count = kwargs.get('platform_fault_domain_count', None) + self.virtual_machines = kwargs.get('virtual_machines', None) + self.proximity_placement_group = kwargs.get('proximity_placement_group', None) + self.statuses = None + self.sku = kwargs.get('sku', None) + + +class UpdateResource(Model): + """The Update Resource model definition. + + :param tags: Resource tags + :type tags: dict[str, str] + """ + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__(self, **kwargs): + super(UpdateResource, self).__init__(**kwargs) + self.tags = kwargs.get('tags', None) + + +class AvailabilitySetUpdate(UpdateResource): + """Specifies information about the availability set that the virtual machine + should be assigned to. Only tags may be updated. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :param tags: Resource tags + :type tags: dict[str, str] + :param platform_update_domain_count: Update Domain count. + :type platform_update_domain_count: int + :param platform_fault_domain_count: Fault Domain count. + :type platform_fault_domain_count: int + :param virtual_machines: A list of references to all virtual machines in + the availability set. + :type virtual_machines: + list[~azure.mgmt.compute.v2018_06_01.models.SubResource] + :param proximity_placement_group: Specifies information about the + proximity placement group that the availability set should be assigned to. +

    Minimum api-version: 2018-04-01. + :type proximity_placement_group: + ~azure.mgmt.compute.v2018_06_01.models.SubResource + :ivar statuses: The resource status information. + :vartype statuses: + list[~azure.mgmt.compute.v2018_06_01.models.InstanceViewStatus] + :param sku: Sku of the availability set + :type sku: ~azure.mgmt.compute.v2018_06_01.models.Sku + """ + + _validation = { + 'statuses': {'readonly': True}, + } + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + 'platform_update_domain_count': {'key': 'properties.platformUpdateDomainCount', 'type': 'int'}, + 'platform_fault_domain_count': {'key': 'properties.platformFaultDomainCount', 'type': 'int'}, + 'virtual_machines': {'key': 'properties.virtualMachines', 'type': '[SubResource]'}, + 'proximity_placement_group': {'key': 'properties.proximityPlacementGroup', 'type': 'SubResource'}, + 'statuses': {'key': 'properties.statuses', 'type': '[InstanceViewStatus]'}, + 'sku': {'key': 'sku', 'type': 'Sku'}, + } + + def __init__(self, **kwargs): + super(AvailabilitySetUpdate, self).__init__(**kwargs) + self.platform_update_domain_count = kwargs.get('platform_update_domain_count', None) + self.platform_fault_domain_count = kwargs.get('platform_fault_domain_count', None) + self.virtual_machines = kwargs.get('virtual_machines', None) + self.proximity_placement_group = kwargs.get('proximity_placement_group', None) + self.statuses = None + self.sku = kwargs.get('sku', None) + + +class BootDiagnostics(Model): + """Boot Diagnostics is a debugging feature which allows you to view Console + Output and Screenshot to diagnose VM status.

    You can easily view + the output of your console log.

    Azure also enables you to see a + screenshot of the VM from the hypervisor. + + :param enabled: Whether boot diagnostics should be enabled on the Virtual + Machine. + :type enabled: bool + :param storage_uri: Uri of the storage account to use for placing the + console output and screenshot. + :type storage_uri: str + """ + + _attribute_map = { + 'enabled': {'key': 'enabled', 'type': 'bool'}, + 'storage_uri': {'key': 'storageUri', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(BootDiagnostics, self).__init__(**kwargs) + self.enabled = kwargs.get('enabled', None) + self.storage_uri = kwargs.get('storage_uri', None) + + +class BootDiagnosticsInstanceView(Model): + """The instance view of a virtual machine boot diagnostics. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar console_screenshot_blob_uri: The console screenshot blob URI. + :vartype console_screenshot_blob_uri: str + :ivar serial_console_log_blob_uri: The Linux serial console log blob Uri. + :vartype serial_console_log_blob_uri: str + :ivar status: The boot diagnostics status information for the VM.

    + NOTE: It will be set only if there are errors encountered in enabling boot + diagnostics. + :vartype status: ~azure.mgmt.compute.v2018_06_01.models.InstanceViewStatus + """ + + _validation = { + 'console_screenshot_blob_uri': {'readonly': True}, + 'serial_console_log_blob_uri': {'readonly': True}, + 'status': {'readonly': True}, + } + + _attribute_map = { + 'console_screenshot_blob_uri': {'key': 'consoleScreenshotBlobUri', 'type': 'str'}, + 'serial_console_log_blob_uri': {'key': 'serialConsoleLogBlobUri', 'type': 'str'}, + 'status': {'key': 'status', 'type': 'InstanceViewStatus'}, + } + + def __init__(self, **kwargs): + super(BootDiagnosticsInstanceView, self).__init__(**kwargs) + self.console_screenshot_blob_uri = None + self.serial_console_log_blob_uri = None + self.status = None + + +class CloudError(Model): + """An error response from the Gallery service. + + :param error: + :type error: ~azure.mgmt.compute.v2018_06_01.models.ApiError + """ + + _attribute_map = { + 'error': {'key': 'error', 'type': 'ApiError'}, + } + + def __init__(self, **kwargs): + super(CloudError, self).__init__(**kwargs) + self.error = kwargs.get('error', None) + + +class CloudErrorException(HttpOperationError): + """Server responsed with exception of type: 'CloudError'. + + :param deserialize: A deserializer + :param response: Server response to be deserialized. + """ + + def __init__(self, deserialize, response, *args): + + super(CloudErrorException, self).__init__(deserialize, response, 'CloudError', *args) + + +class ComputeOperationValue(Model): + """Describes the properties of a Compute Operation value. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar origin: The origin of the compute operation. + :vartype origin: str + :ivar name: The name of the compute operation. + :vartype name: str + :ivar operation: The display name of the compute operation. + :vartype operation: str + :ivar resource: The display name of the resource the operation applies to. + :vartype resource: str + :ivar description: The description of the operation. + :vartype description: str + :ivar provider: The resource provider for the operation. + :vartype provider: str + """ + + _validation = { + 'origin': {'readonly': True}, + 'name': {'readonly': True}, + 'operation': {'readonly': True}, + 'resource': {'readonly': True}, + 'description': {'readonly': True}, + 'provider': {'readonly': True}, + } + + _attribute_map = { + 'origin': {'key': 'origin', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'operation': {'key': 'display.operation', 'type': 'str'}, + 'resource': {'key': 'display.resource', 'type': 'str'}, + 'description': {'key': 'display.description', 'type': 'str'}, + 'provider': {'key': 'display.provider', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ComputeOperationValue, self).__init__(**kwargs) + self.origin = None + self.name = None + self.operation = None + self.resource = None + self.description = None + self.provider = None + + +class CreationData(Model): + """Data used when creating a disk. + + All required parameters must be populated in order to send to Azure. + + :param create_option: Required. This enumerates the possible sources of a + disk's creation. Possible values include: 'Empty', 'Attach', 'FromImage', + 'Import', 'Copy', 'Restore' + :type create_option: str or + ~azure.mgmt.compute.v2018_06_01.models.DiskCreateOption + :param storage_account_id: If createOption is Import, the Azure Resource + Manager identifier of the storage account containing the blob to import as + a disk. Required only if the blob is in a different subscription + :type storage_account_id: str + :param image_reference: Disk source information. + :type image_reference: + ~azure.mgmt.compute.v2018_06_01.models.ImageDiskReference + :param source_uri: If createOption is Import, this is the URI of a blob to + be imported into a managed disk. + :type source_uri: str + :param source_resource_id: If createOption is Copy, this is the ARM id of + the source snapshot or disk. + :type source_resource_id: str + """ + + _validation = { + 'create_option': {'required': True}, + } + + _attribute_map = { + 'create_option': {'key': 'createOption', 'type': 'str'}, + 'storage_account_id': {'key': 'storageAccountId', 'type': 'str'}, + 'image_reference': {'key': 'imageReference', 'type': 'ImageDiskReference'}, + 'source_uri': {'key': 'sourceUri', 'type': 'str'}, + 'source_resource_id': {'key': 'sourceResourceId', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(CreationData, self).__init__(**kwargs) + self.create_option = kwargs.get('create_option', None) + self.storage_account_id = kwargs.get('storage_account_id', None) + self.image_reference = kwargs.get('image_reference', None) + self.source_uri = kwargs.get('source_uri', None) + self.source_resource_id = kwargs.get('source_resource_id', None) + + +class DataDisk(Model): + """Describes a data disk. + + All required parameters must be populated in order to send to Azure. + + :param lun: Required. Specifies the logical unit number of the data disk. + This value is used to identify data disks within the VM and therefore must + be unique for each data disk attached to a VM. + :type lun: int + :param name: The disk name. + :type name: str + :param vhd: The virtual hard disk. + :type vhd: ~azure.mgmt.compute.v2018_06_01.models.VirtualHardDisk + :param image: The source user image virtual hard disk. The virtual hard + disk will be copied before being attached to the virtual machine. If + SourceImage is provided, the destination virtual hard drive must not + exist. + :type image: ~azure.mgmt.compute.v2018_06_01.models.VirtualHardDisk + :param caching: Specifies the caching requirements.

    Possible + values are:

    **None**

    **ReadOnly**

    **ReadWrite** +

    Default: **None for Standard storage. ReadOnly for Premium + storage**. Possible values include: 'None', 'ReadOnly', 'ReadWrite' + :type caching: str or ~azure.mgmt.compute.v2018_06_01.models.CachingTypes + :param write_accelerator_enabled: Specifies whether writeAccelerator + should be enabled or disabled on the disk. + :type write_accelerator_enabled: bool + :param create_option: Required. Specifies how the virtual machine should + be created.

    Possible values are:

    **Attach** \\u2013 This + value is used when you are using a specialized disk to create the virtual + machine.

    **FromImage** \\u2013 This value is used when you are + using an image to create the virtual machine. If you are using a platform + image, you also use the imageReference element described above. If you are + using a marketplace image, you also use the plan element previously + described. Possible values include: 'FromImage', 'Empty', 'Attach' + :type create_option: str or + ~azure.mgmt.compute.v2018_06_01.models.DiskCreateOptionTypes + :param disk_size_gb: Specifies the size of an empty data disk in + gigabytes. This element can be used to overwrite the size of the disk in a + virtual machine image.

    This value cannot be larger than 1023 GB + :type disk_size_gb: int + :param managed_disk: The managed disk parameters. + :type managed_disk: + ~azure.mgmt.compute.v2018_06_01.models.ManagedDiskParameters + """ + + _validation = { + 'lun': {'required': True}, + 'create_option': {'required': True}, + } + + _attribute_map = { + 'lun': {'key': 'lun', 'type': 'int'}, + 'name': {'key': 'name', 'type': 'str'}, + 'vhd': {'key': 'vhd', 'type': 'VirtualHardDisk'}, + 'image': {'key': 'image', 'type': 'VirtualHardDisk'}, + 'caching': {'key': 'caching', 'type': 'CachingTypes'}, + 'write_accelerator_enabled': {'key': 'writeAcceleratorEnabled', 'type': 'bool'}, + 'create_option': {'key': 'createOption', 'type': 'str'}, + 'disk_size_gb': {'key': 'diskSizeGB', 'type': 'int'}, + 'managed_disk': {'key': 'managedDisk', 'type': 'ManagedDiskParameters'}, + } + + def __init__(self, **kwargs): + super(DataDisk, self).__init__(**kwargs) + self.lun = kwargs.get('lun', None) + self.name = kwargs.get('name', None) + self.vhd = kwargs.get('vhd', None) + self.image = kwargs.get('image', None) + self.caching = kwargs.get('caching', None) + self.write_accelerator_enabled = kwargs.get('write_accelerator_enabled', None) + self.create_option = kwargs.get('create_option', None) + self.disk_size_gb = kwargs.get('disk_size_gb', None) + self.managed_disk = kwargs.get('managed_disk', None) + + +class DataDiskImage(Model): + """Contains the data disk images information. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar lun: Specifies the logical unit number of the data disk. This value + is used to identify data disks within the VM and therefore must be unique + for each data disk attached to a VM. + :vartype lun: int + """ + + _validation = { + 'lun': {'readonly': True}, + } + + _attribute_map = { + 'lun': {'key': 'lun', 'type': 'int'}, + } + + def __init__(self, **kwargs): + super(DataDiskImage, self).__init__(**kwargs) + self.lun = None + + +class DiagnosticsProfile(Model): + """Specifies the boot diagnostic settings state.

    Minimum api-version: + 2015-06-15. + + :param boot_diagnostics: Boot Diagnostics is a debugging feature which + allows you to view Console Output and Screenshot to diagnose VM status. +

    You can easily view the output of your console log.

    + Azure also enables you to see a screenshot of the VM from the hypervisor. + :type boot_diagnostics: + ~azure.mgmt.compute.v2018_06_01.models.BootDiagnostics + """ + + _attribute_map = { + 'boot_diagnostics': {'key': 'bootDiagnostics', 'type': 'BootDiagnostics'}, + } + + def __init__(self, **kwargs): + super(DiagnosticsProfile, self).__init__(**kwargs) + self.boot_diagnostics = kwargs.get('boot_diagnostics', None) + + +class DiffDiskSettings(Model): + """Describes the parameters of ephemeral disk settings that can be specified + for operating system disk.

    NOTE: The ephemeral disk settings can + only be specified for managed disk. + + :param option: Specifies the ephemeral disk settings for operating system + disk. Possible values include: 'Local' + :type option: str or + ~azure.mgmt.compute.v2018_06_01.models.DiffDiskOptions + """ + + _attribute_map = { + 'option': {'key': 'option', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(DiffDiskSettings, self).__init__(**kwargs) + self.option = kwargs.get('option', None) + + +class Disallowed(Model): + """Describes the disallowed disk types. + + :param disk_types: A list of disk types. + :type disk_types: list[str] + """ + + _attribute_map = { + 'disk_types': {'key': 'diskTypes', 'type': '[str]'}, + } + + def __init__(self, **kwargs): + super(Disallowed, self).__init__(**kwargs) + self.disk_types = kwargs.get('disk_types', None) + + +class Disk(Resource): + """Disk resource. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource Id + :vartype id: str + :ivar name: Resource name + :vartype name: str + :ivar type: Resource type + :vartype type: str + :param location: Required. Resource location + :type location: str + :param tags: Resource tags + :type tags: dict[str, str] + :ivar managed_by: A relative URI containing the ID of the VM that has the + disk attached. + :vartype managed_by: str + :param sku: + :type sku: ~azure.mgmt.compute.v2018_06_01.models.DiskSku + :param zones: The Logical zone list for Disk. + :type zones: list[str] + :ivar time_created: The time when the disk was created. + :vartype time_created: datetime + :param os_type: The Operating System type. Possible values include: + 'Windows', 'Linux' + :type os_type: str or + ~azure.mgmt.compute.v2018_06_01.models.OperatingSystemTypes + :param creation_data: Required. Disk source information. CreationData + information cannot be changed after the disk has been created. + :type creation_data: ~azure.mgmt.compute.v2018_06_01.models.CreationData + :param disk_size_gb: If creationData.createOption is Empty, this field is + mandatory and it indicates the size of the VHD to create. If this field is + present for updates or creation with other options, it indicates a resize. + Resizes are only allowed if the disk is not attached to a running VM, and + can only increase the disk's size. + :type disk_size_gb: int + :param encryption_settings: Encryption settings for disk or snapshot + :type encryption_settings: + ~azure.mgmt.compute.v2018_06_01.models.EncryptionSettings + :ivar provisioning_state: The disk provisioning state. + :vartype provisioning_state: str + :param disk_iops_read_write: The number of IOPS allowed for this disk; + only settable for UltraSSD disks. One operation can transfer between 4k + and 256k bytes. For a description of the range of values you can set, see + [Ultra SSD Managed Disk + Offerings](https://docs.microsoft.com/azure/virtual-machines/windows/disks-ultra-ssd#ultra-ssd-managed-disk-offerings). + :type disk_iops_read_write: long + :param disk_mbps_read_write: The bandwidth allowed for this disk; only + settable for UltraSSD disks. MBps means millions of bytes per second - MB + here uses the ISO notation, of powers of 10. For a description of the + range of values you can set, see [Ultra SSD Managed Disk + Offerings](https://docs.microsoft.com/azure/virtual-machines/windows/disks-ultra-ssd#ultra-ssd-managed-disk-offerings). + :type disk_mbps_read_write: int + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + 'managed_by': {'readonly': True}, + 'time_created': {'readonly': True}, + 'creation_data': {'required': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'managed_by': {'key': 'managedBy', 'type': 'str'}, + 'sku': {'key': 'sku', 'type': 'DiskSku'}, + 'zones': {'key': 'zones', 'type': '[str]'}, + 'time_created': {'key': 'properties.timeCreated', 'type': 'iso-8601'}, + 'os_type': {'key': 'properties.osType', 'type': 'OperatingSystemTypes'}, + 'creation_data': {'key': 'properties.creationData', 'type': 'CreationData'}, + 'disk_size_gb': {'key': 'properties.diskSizeGB', 'type': 'int'}, + 'encryption_settings': {'key': 'properties.encryptionSettings', 'type': 'EncryptionSettings'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'disk_iops_read_write': {'key': 'properties.diskIOPSReadWrite', 'type': 'long'}, + 'disk_mbps_read_write': {'key': 'properties.diskMBpsReadWrite', 'type': 'int'}, + } + + def __init__(self, **kwargs): + super(Disk, self).__init__(**kwargs) + self.managed_by = None + self.sku = kwargs.get('sku', None) + self.zones = kwargs.get('zones', None) + self.time_created = None + self.os_type = kwargs.get('os_type', None) + self.creation_data = kwargs.get('creation_data', None) + self.disk_size_gb = kwargs.get('disk_size_gb', None) + self.encryption_settings = kwargs.get('encryption_settings', None) + self.provisioning_state = None + self.disk_iops_read_write = kwargs.get('disk_iops_read_write', None) + self.disk_mbps_read_write = kwargs.get('disk_mbps_read_write', None) + + +class DiskEncryptionSettings(Model): + """Describes a Encryption Settings for a Disk. + + :param disk_encryption_key: Specifies the location of the disk encryption + key, which is a Key Vault Secret. + :type disk_encryption_key: + ~azure.mgmt.compute.v2018_06_01.models.KeyVaultSecretReference + :param key_encryption_key: Specifies the location of the key encryption + key in Key Vault. + :type key_encryption_key: + ~azure.mgmt.compute.v2018_06_01.models.KeyVaultKeyReference + :param enabled: Specifies whether disk encryption should be enabled on the + virtual machine. + :type enabled: bool + """ + + _attribute_map = { + 'disk_encryption_key': {'key': 'diskEncryptionKey', 'type': 'KeyVaultSecretReference'}, + 'key_encryption_key': {'key': 'keyEncryptionKey', 'type': 'KeyVaultKeyReference'}, + 'enabled': {'key': 'enabled', 'type': 'bool'}, + } + + def __init__(self, **kwargs): + super(DiskEncryptionSettings, self).__init__(**kwargs) + self.disk_encryption_key = kwargs.get('disk_encryption_key', None) + self.key_encryption_key = kwargs.get('key_encryption_key', None) + self.enabled = kwargs.get('enabled', None) + + +class DiskInstanceView(Model): + """The instance view of the disk. + + :param name: The disk name. + :type name: str + :param encryption_settings: Specifies the encryption settings for the OS + Disk.

    Minimum api-version: 2015-06-15 + :type encryption_settings: + list[~azure.mgmt.compute.v2018_06_01.models.DiskEncryptionSettings] + :param statuses: The resource status information. + :type statuses: + list[~azure.mgmt.compute.v2018_06_01.models.InstanceViewStatus] + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'encryption_settings': {'key': 'encryptionSettings', 'type': '[DiskEncryptionSettings]'}, + 'statuses': {'key': 'statuses', 'type': '[InstanceViewStatus]'}, + } + + def __init__(self, **kwargs): + super(DiskInstanceView, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.encryption_settings = kwargs.get('encryption_settings', None) + self.statuses = kwargs.get('statuses', None) + + +class DiskSku(Model): + """The disks sku name. Can be Standard_LRS, Premium_LRS, StandardSSD_LRS, or + UltraSSD_LRS. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :param name: The sku name. Possible values include: 'Standard_LRS', + 'Premium_LRS', 'StandardSSD_LRS', 'UltraSSD_LRS' + :type name: str or + ~azure.mgmt.compute.v2018_06_01.models.DiskStorageAccountTypes + :ivar tier: The sku tier. Default value: "Standard" . + :vartype tier: str + """ + + _validation = { + 'tier': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'tier': {'key': 'tier', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(DiskSku, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.tier = None + + +class DiskUpdate(Model): + """Disk update resource. + + :param os_type: the Operating System type. Possible values include: + 'Windows', 'Linux' + :type os_type: str or + ~azure.mgmt.compute.v2018_06_01.models.OperatingSystemTypes + :param disk_size_gb: If creationData.createOption is Empty, this field is + mandatory and it indicates the size of the VHD to create. If this field is + present for updates or creation with other options, it indicates a resize. + Resizes are only allowed if the disk is not attached to a running VM, and + can only increase the disk's size. + :type disk_size_gb: int + :param encryption_settings: Encryption settings for disk or snapshot + :type encryption_settings: + ~azure.mgmt.compute.v2018_06_01.models.EncryptionSettings + :param disk_iops_read_write: The number of IOPS allowed for this disk; + only settable for UltraSSD disks. One operation can transfer between 4k + and 256k bytes. + :type disk_iops_read_write: long + :param disk_mbps_read_write: The bandwidth allowed for this disk; only + settable for UltraSSD disks. MBps means millions of bytes per second - MB + here uses the ISO notation, of powers of 10. + :type disk_mbps_read_write: int + :param tags: Resource tags + :type tags: dict[str, str] + :param sku: + :type sku: ~azure.mgmt.compute.v2018_06_01.models.DiskSku + """ + + _attribute_map = { + 'os_type': {'key': 'properties.osType', 'type': 'OperatingSystemTypes'}, + 'disk_size_gb': {'key': 'properties.diskSizeGB', 'type': 'int'}, + 'encryption_settings': {'key': 'properties.encryptionSettings', 'type': 'EncryptionSettings'}, + 'disk_iops_read_write': {'key': 'properties.diskIOPSReadWrite', 'type': 'long'}, + 'disk_mbps_read_write': {'key': 'properties.diskMBpsReadWrite', 'type': 'int'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'sku': {'key': 'sku', 'type': 'DiskSku'}, + } + + def __init__(self, **kwargs): + super(DiskUpdate, self).__init__(**kwargs) + self.os_type = kwargs.get('os_type', None) + self.disk_size_gb = kwargs.get('disk_size_gb', None) + self.encryption_settings = kwargs.get('encryption_settings', None) + self.disk_iops_read_write = kwargs.get('disk_iops_read_write', None) + self.disk_mbps_read_write = kwargs.get('disk_mbps_read_write', None) + self.tags = kwargs.get('tags', None) + self.sku = kwargs.get('sku', None) + + +class EncryptionSettings(Model): + """Encryption settings for disk or snapshot. + + :param enabled: Set this flag to true and provide DiskEncryptionKey and + optional KeyEncryptionKey to enable encryption. Set this flag to false and + remove DiskEncryptionKey and KeyEncryptionKey to disable encryption. If + EncryptionSettings is null in the request object, the existing settings + remain unchanged. + :type enabled: bool + :param disk_encryption_key: Key Vault Secret Url and vault id of the disk + encryption key + :type disk_encryption_key: + ~azure.mgmt.compute.v2018_06_01.models.KeyVaultAndSecretReference + :param key_encryption_key: Key Vault Key Url and vault id of the key + encryption key + :type key_encryption_key: + ~azure.mgmt.compute.v2018_06_01.models.KeyVaultAndKeyReference + """ + + _attribute_map = { + 'enabled': {'key': 'enabled', 'type': 'bool'}, + 'disk_encryption_key': {'key': 'diskEncryptionKey', 'type': 'KeyVaultAndSecretReference'}, + 'key_encryption_key': {'key': 'keyEncryptionKey', 'type': 'KeyVaultAndKeyReference'}, + } + + def __init__(self, **kwargs): + super(EncryptionSettings, self).__init__(**kwargs) + self.enabled = kwargs.get('enabled', None) + self.disk_encryption_key = kwargs.get('disk_encryption_key', None) + self.key_encryption_key = kwargs.get('key_encryption_key', None) + + +class Gallery(Resource): + """Specifies information about the Shared Image Gallery that you want to + create or update. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource Id + :vartype id: str + :ivar name: Resource name + :vartype name: str + :ivar type: Resource type + :vartype type: str + :param location: Required. Resource location + :type location: str + :param tags: Resource tags + :type tags: dict[str, str] + :param description: The description of this Shared Image Gallery resource. + This property is updatable. + :type description: str + :param identifier: + :type identifier: ~azure.mgmt.compute.v2018_06_01.models.GalleryIdentifier + :ivar provisioning_state: The current state of the gallery. The + provisioning state, which only appears in the response. Possible values + include: 'Creating', 'Updating', 'Failed', 'Succeeded', 'Deleting', + 'Migrating' + :vartype provisioning_state: str or + ~azure.mgmt.compute.v2018_06_01.models.enum + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'identifier': {'key': 'properties.identifier', 'type': 'GalleryIdentifier'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(Gallery, self).__init__(**kwargs) + self.description = kwargs.get('description', None) + self.identifier = kwargs.get('identifier', None) + self.provisioning_state = None + + +class GalleryArtifactPublishingProfileBase(Model): + """Describes the basic gallery artifact publishing profile. + + All required parameters must be populated in order to send to Azure. + + :param target_regions: The target regions where the Image Version is going + to be replicated to. This property is updatable. + :type target_regions: + list[~azure.mgmt.compute.v2018_06_01.models.TargetRegion] + :param source: Required. + :type source: ~azure.mgmt.compute.v2018_06_01.models.GalleryArtifactSource + """ + + _validation = { + 'source': {'required': True}, + } + + _attribute_map = { + 'target_regions': {'key': 'targetRegions', 'type': '[TargetRegion]'}, + 'source': {'key': 'source', 'type': 'GalleryArtifactSource'}, + } + + def __init__(self, **kwargs): + super(GalleryArtifactPublishingProfileBase, self).__init__(**kwargs) + self.target_regions = kwargs.get('target_regions', None) + self.source = kwargs.get('source', None) + + +class GalleryArtifactSource(Model): + """The source image from which the Image Version is going to be created. + + All required parameters must be populated in order to send to Azure. + + :param managed_image: Required. + :type managed_image: + ~azure.mgmt.compute.v2018_06_01.models.ManagedArtifact + """ + + _validation = { + 'managed_image': {'required': True}, + } + + _attribute_map = { + 'managed_image': {'key': 'managedImage', 'type': 'ManagedArtifact'}, + } + + def __init__(self, **kwargs): + super(GalleryArtifactSource, self).__init__(**kwargs) + self.managed_image = kwargs.get('managed_image', None) + + +class GalleryDiskImage(Model): + """This is the disk image base class. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar size_in_gb: This property indicates the size of the VHD to be + created. + :vartype size_in_gb: int + :ivar host_caching: The host caching of the disk. Valid values are 'None', + 'ReadOnly', and 'ReadWrite'. Possible values include: 'None', 'ReadOnly', + 'ReadWrite' + :vartype host_caching: str or + ~azure.mgmt.compute.v2018_06_01.models.HostCaching + """ + + _validation = { + 'size_in_gb': {'readonly': True}, + 'host_caching': {'readonly': True}, + } + + _attribute_map = { + 'size_in_gb': {'key': 'sizeInGB', 'type': 'int'}, + 'host_caching': {'key': 'hostCaching', 'type': 'HostCaching'}, + } + + def __init__(self, **kwargs): + super(GalleryDiskImage, self).__init__(**kwargs) + self.size_in_gb = None + self.host_caching = None + + +class GalleryDataDiskImage(GalleryDiskImage): + """This is the data disk image. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar size_in_gb: This property indicates the size of the VHD to be + created. + :vartype size_in_gb: int + :ivar host_caching: The host caching of the disk. Valid values are 'None', + 'ReadOnly', and 'ReadWrite'. Possible values include: 'None', 'ReadOnly', + 'ReadWrite' + :vartype host_caching: str or + ~azure.mgmt.compute.v2018_06_01.models.HostCaching + :ivar lun: This property specifies the logical unit number of the data + disk. This value is used to identify data disks within the Virtual Machine + and therefore must be unique for each data disk attached to the Virtual + Machine. + :vartype lun: int + """ + + _validation = { + 'size_in_gb': {'readonly': True}, + 'host_caching': {'readonly': True}, + 'lun': {'readonly': True}, + } + + _attribute_map = { + 'size_in_gb': {'key': 'sizeInGB', 'type': 'int'}, + 'host_caching': {'key': 'hostCaching', 'type': 'HostCaching'}, + 'lun': {'key': 'lun', 'type': 'int'}, + } + + def __init__(self, **kwargs): + super(GalleryDataDiskImage, self).__init__(**kwargs) + self.lun = None + + +class GalleryIdentifier(Model): + """Describes the gallery unique name. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar unique_name: The unique name of the Shared Image Gallery. This name + is generated automatically by Azure. + :vartype unique_name: str + """ + + _validation = { + 'unique_name': {'readonly': True}, + } + + _attribute_map = { + 'unique_name': {'key': 'uniqueName', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(GalleryIdentifier, self).__init__(**kwargs) + self.unique_name = None + + +class GalleryImage(Resource): + """Specifies information about the gallery Image Definition that you want to + create or update. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource Id + :vartype id: str + :ivar name: Resource name + :vartype name: str + :ivar type: Resource type + :vartype type: str + :param location: Required. Resource location + :type location: str + :param tags: Resource tags + :type tags: dict[str, str] + :param description: The description of this gallery Image Definition + resource. This property is updatable. + :type description: str + :param eula: The Eula agreement for the gallery Image Definition. + :type eula: str + :param privacy_statement_uri: The privacy statement uri. + :type privacy_statement_uri: str + :param release_note_uri: The release note uri. + :type release_note_uri: str + :param os_type: Required. This property allows you to specify the type of + the OS that is included in the disk when creating a VM from a managed + image.

    Possible values are:

    **Windows**

    + **Linux**. Possible values include: 'Windows', 'Linux' + :type os_type: str or + ~azure.mgmt.compute.v2018_06_01.models.OperatingSystemTypes + :param os_state: Required. The allowed values for OS State are + 'Generalized'. Possible values include: 'Generalized', 'Specialized' + :type os_state: str or + ~azure.mgmt.compute.v2018_06_01.models.OperatingSystemStateTypes + :param end_of_life_date: The end of life date of the gallery Image + Definition. This property can be used for decommissioning purposes. This + property is updatable. + :type end_of_life_date: datetime + :param identifier: Required. + :type identifier: + ~azure.mgmt.compute.v2018_06_01.models.GalleryImageIdentifier + :param recommended: + :type recommended: + ~azure.mgmt.compute.v2018_06_01.models.RecommendedMachineConfiguration + :param disallowed: + :type disallowed: ~azure.mgmt.compute.v2018_06_01.models.Disallowed + :param purchase_plan: + :type purchase_plan: + ~azure.mgmt.compute.v2018_06_01.models.ImagePurchasePlan + :ivar provisioning_state: The current state of the gallery Image + Definition. The provisioning state, which only appears in the response. + Possible values include: 'Creating', 'Updating', 'Failed', 'Succeeded', + 'Deleting', 'Migrating' + :vartype provisioning_state: str or + ~azure.mgmt.compute.v2018_06_01.models.enum + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + 'os_type': {'required': True}, + 'os_state': {'required': True}, + 'identifier': {'required': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'eula': {'key': 'properties.eula', 'type': 'str'}, + 'privacy_statement_uri': {'key': 'properties.privacyStatementUri', 'type': 'str'}, + 'release_note_uri': {'key': 'properties.releaseNoteUri', 'type': 'str'}, + 'os_type': {'key': 'properties.osType', 'type': 'OperatingSystemTypes'}, + 'os_state': {'key': 'properties.osState', 'type': 'OperatingSystemStateTypes'}, + 'end_of_life_date': {'key': 'properties.endOfLifeDate', 'type': 'iso-8601'}, + 'identifier': {'key': 'properties.identifier', 'type': 'GalleryImageIdentifier'}, + 'recommended': {'key': 'properties.recommended', 'type': 'RecommendedMachineConfiguration'}, + 'disallowed': {'key': 'properties.disallowed', 'type': 'Disallowed'}, + 'purchase_plan': {'key': 'properties.purchasePlan', 'type': 'ImagePurchasePlan'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(GalleryImage, self).__init__(**kwargs) + self.description = kwargs.get('description', None) + self.eula = kwargs.get('eula', None) + self.privacy_statement_uri = kwargs.get('privacy_statement_uri', None) + self.release_note_uri = kwargs.get('release_note_uri', None) + self.os_type = kwargs.get('os_type', None) + self.os_state = kwargs.get('os_state', None) + self.end_of_life_date = kwargs.get('end_of_life_date', None) + self.identifier = kwargs.get('identifier', None) + self.recommended = kwargs.get('recommended', None) + self.disallowed = kwargs.get('disallowed', None) + self.purchase_plan = kwargs.get('purchase_plan', None) + self.provisioning_state = None + + +class GalleryImageIdentifier(Model): + """This is the gallery Image Definition identifier. + + All required parameters must be populated in order to send to Azure. + + :param publisher: Required. The name of the gallery Image Definition + publisher. + :type publisher: str + :param offer: Required. The name of the gallery Image Definition offer. + :type offer: str + :param sku: Required. The name of the gallery Image Definition SKU. + :type sku: str + """ + + _validation = { + 'publisher': {'required': True}, + 'offer': {'required': True}, + 'sku': {'required': True}, + } + + _attribute_map = { + 'publisher': {'key': 'publisher', 'type': 'str'}, + 'offer': {'key': 'offer', 'type': 'str'}, + 'sku': {'key': 'sku', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(GalleryImageIdentifier, self).__init__(**kwargs) + self.publisher = kwargs.get('publisher', None) + self.offer = kwargs.get('offer', None) + self.sku = kwargs.get('sku', None) + + +class GalleryImageVersion(Resource): + """Specifies information about the gallery Image Version that you want to + create or update. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource Id + :vartype id: str + :ivar name: Resource name + :vartype name: str + :ivar type: Resource type + :vartype type: str + :param location: Required. Resource location + :type location: str + :param tags: Resource tags + :type tags: dict[str, str] + :param publishing_profile: Required. + :type publishing_profile: + ~azure.mgmt.compute.v2018_06_01.models.GalleryImageVersionPublishingProfile + :ivar provisioning_state: The current state of the gallery Image Version. + The provisioning state, which only appears in the response. Possible + values include: 'Creating', 'Updating', 'Failed', 'Succeeded', 'Deleting', + 'Migrating' + :vartype provisioning_state: str or + ~azure.mgmt.compute.v2018_06_01.models.enum + :ivar storage_profile: + :vartype storage_profile: + ~azure.mgmt.compute.v2018_06_01.models.GalleryImageVersionStorageProfile + :ivar replication_status: + :vartype replication_status: + ~azure.mgmt.compute.v2018_06_01.models.ReplicationStatus + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + 'publishing_profile': {'required': True}, + 'provisioning_state': {'readonly': True}, + 'storage_profile': {'readonly': True}, + 'replication_status': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'publishing_profile': {'key': 'properties.publishingProfile', 'type': 'GalleryImageVersionPublishingProfile'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'storage_profile': {'key': 'properties.storageProfile', 'type': 'GalleryImageVersionStorageProfile'}, + 'replication_status': {'key': 'properties.replicationStatus', 'type': 'ReplicationStatus'}, + } + + def __init__(self, **kwargs): + super(GalleryImageVersion, self).__init__(**kwargs) + self.publishing_profile = kwargs.get('publishing_profile', None) + self.provisioning_state = None + self.storage_profile = None + self.replication_status = None + + +class GalleryImageVersionPublishingProfile(GalleryArtifactPublishingProfileBase): + """The publishing profile of a gallery Image Version. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :param target_regions: The target regions where the Image Version is going + to be replicated to. This property is updatable. + :type target_regions: + list[~azure.mgmt.compute.v2018_06_01.models.TargetRegion] + :param source: Required. + :type source: ~azure.mgmt.compute.v2018_06_01.models.GalleryArtifactSource + :param replica_count: The number of replicas of the Image Version to be + created per region. This property would take effect for a region when + regionalReplicaCount is not specified. This property is updatable. + :type replica_count: int + :param exclude_from_latest: If set to true, Virtual Machines deployed from + the latest version of the Image Definition won't use this Image Version. + :type exclude_from_latest: bool + :ivar published_date: The timestamp for when the gallery Image Version is + published. + :vartype published_date: datetime + :param end_of_life_date: The end of life date of the gallery Image + Version. This property can be used for decommissioning purposes. This + property is updatable. + :type end_of_life_date: datetime + """ + + _validation = { + 'source': {'required': True}, + 'published_date': {'readonly': True}, + } + + _attribute_map = { + 'target_regions': {'key': 'targetRegions', 'type': '[TargetRegion]'}, + 'source': {'key': 'source', 'type': 'GalleryArtifactSource'}, + 'replica_count': {'key': 'replicaCount', 'type': 'int'}, + 'exclude_from_latest': {'key': 'excludeFromLatest', 'type': 'bool'}, + 'published_date': {'key': 'publishedDate', 'type': 'iso-8601'}, + 'end_of_life_date': {'key': 'endOfLifeDate', 'type': 'iso-8601'}, + } + + def __init__(self, **kwargs): + super(GalleryImageVersionPublishingProfile, self).__init__(**kwargs) + self.replica_count = kwargs.get('replica_count', None) + self.exclude_from_latest = kwargs.get('exclude_from_latest', None) + self.published_date = None + self.end_of_life_date = kwargs.get('end_of_life_date', None) + + +class GalleryImageVersionStorageProfile(Model): + """This is the storage profile of a gallery Image Version. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar os_disk_image: + :vartype os_disk_image: + ~azure.mgmt.compute.v2018_06_01.models.GalleryOSDiskImage + :ivar data_disk_images: A list of data disk images. + :vartype data_disk_images: + list[~azure.mgmt.compute.v2018_06_01.models.GalleryDataDiskImage] + """ + + _validation = { + 'os_disk_image': {'readonly': True}, + 'data_disk_images': {'readonly': True}, + } + + _attribute_map = { + 'os_disk_image': {'key': 'osDiskImage', 'type': 'GalleryOSDiskImage'}, + 'data_disk_images': {'key': 'dataDiskImages', 'type': '[GalleryDataDiskImage]'}, + } + + def __init__(self, **kwargs): + super(GalleryImageVersionStorageProfile, self).__init__(**kwargs) + self.os_disk_image = None + self.data_disk_images = None + + +class GalleryOSDiskImage(GalleryDiskImage): + """This is the OS disk image. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar size_in_gb: This property indicates the size of the VHD to be + created. + :vartype size_in_gb: int + :ivar host_caching: The host caching of the disk. Valid values are 'None', + 'ReadOnly', and 'ReadWrite'. Possible values include: 'None', 'ReadOnly', + 'ReadWrite' + :vartype host_caching: str or + ~azure.mgmt.compute.v2018_06_01.models.HostCaching + """ + + _validation = { + 'size_in_gb': {'readonly': True}, + 'host_caching': {'readonly': True}, + } + + _attribute_map = { + 'size_in_gb': {'key': 'sizeInGB', 'type': 'int'}, + 'host_caching': {'key': 'hostCaching', 'type': 'HostCaching'}, + } + + def __init__(self, **kwargs): + super(GalleryOSDiskImage, self).__init__(**kwargs) + + +class GrantAccessData(Model): + """Data used for requesting a SAS. + + All required parameters must be populated in order to send to Azure. + + :param access: Required. Possible values include: 'None', 'Read' + :type access: str or ~azure.mgmt.compute.v2018_06_01.models.AccessLevel + :param duration_in_seconds: Required. Time duration in seconds until the + SAS access expires. + :type duration_in_seconds: int + """ + + _validation = { + 'access': {'required': True}, + 'duration_in_seconds': {'required': True}, + } + + _attribute_map = { + 'access': {'key': 'access', 'type': 'str'}, + 'duration_in_seconds': {'key': 'durationInSeconds', 'type': 'int'}, + } + + def __init__(self, **kwargs): + super(GrantAccessData, self).__init__(**kwargs) + self.access = kwargs.get('access', None) + self.duration_in_seconds = kwargs.get('duration_in_seconds', None) + + +class HardwareProfile(Model): + """Specifies the hardware settings for the virtual machine. + + :param vm_size: Specifies the size of the virtual machine. For more + information about virtual machine sizes, see [Sizes for virtual + machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-sizes?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). +

    The available VM sizes depend on region and availability set. For + a list of available sizes use these APIs:

    [List all available + virtual machine sizes in an availability + set](https://docs.microsoft.com/rest/api/compute/availabilitysets/listavailablesizes) +

    [List all available virtual machine sizes in a + region](https://docs.microsoft.com/rest/api/compute/virtualmachinesizes/list) +

    [List all available virtual machine sizes for + resizing](https://docs.microsoft.com/rest/api/compute/virtualmachines/listavailablesizes). + Possible values include: 'Basic_A0', 'Basic_A1', 'Basic_A2', 'Basic_A3', + 'Basic_A4', 'Standard_A0', 'Standard_A1', 'Standard_A2', 'Standard_A3', + 'Standard_A4', 'Standard_A5', 'Standard_A6', 'Standard_A7', 'Standard_A8', + 'Standard_A9', 'Standard_A10', 'Standard_A11', 'Standard_A1_v2', + 'Standard_A2_v2', 'Standard_A4_v2', 'Standard_A8_v2', 'Standard_A2m_v2', + 'Standard_A4m_v2', 'Standard_A8m_v2', 'Standard_B1s', 'Standard_B1ms', + 'Standard_B2s', 'Standard_B2ms', 'Standard_B4ms', 'Standard_B8ms', + 'Standard_D1', 'Standard_D2', 'Standard_D3', 'Standard_D4', + 'Standard_D11', 'Standard_D12', 'Standard_D13', 'Standard_D14', + 'Standard_D1_v2', 'Standard_D2_v2', 'Standard_D3_v2', 'Standard_D4_v2', + 'Standard_D5_v2', 'Standard_D2_v3', 'Standard_D4_v3', 'Standard_D8_v3', + 'Standard_D16_v3', 'Standard_D32_v3', 'Standard_D64_v3', + 'Standard_D2s_v3', 'Standard_D4s_v3', 'Standard_D8s_v3', + 'Standard_D16s_v3', 'Standard_D32s_v3', 'Standard_D64s_v3', + 'Standard_D11_v2', 'Standard_D12_v2', 'Standard_D13_v2', + 'Standard_D14_v2', 'Standard_D15_v2', 'Standard_DS1', 'Standard_DS2', + 'Standard_DS3', 'Standard_DS4', 'Standard_DS11', 'Standard_DS12', + 'Standard_DS13', 'Standard_DS14', 'Standard_DS1_v2', 'Standard_DS2_v2', + 'Standard_DS3_v2', 'Standard_DS4_v2', 'Standard_DS5_v2', + 'Standard_DS11_v2', 'Standard_DS12_v2', 'Standard_DS13_v2', + 'Standard_DS14_v2', 'Standard_DS15_v2', 'Standard_DS13-4_v2', + 'Standard_DS13-2_v2', 'Standard_DS14-8_v2', 'Standard_DS14-4_v2', + 'Standard_E2_v3', 'Standard_E4_v3', 'Standard_E8_v3', 'Standard_E16_v3', + 'Standard_E32_v3', 'Standard_E64_v3', 'Standard_E2s_v3', + 'Standard_E4s_v3', 'Standard_E8s_v3', 'Standard_E16s_v3', + 'Standard_E32s_v3', 'Standard_E64s_v3', 'Standard_E32-16_v3', + 'Standard_E32-8s_v3', 'Standard_E64-32s_v3', 'Standard_E64-16s_v3', + 'Standard_F1', 'Standard_F2', 'Standard_F4', 'Standard_F8', + 'Standard_F16', 'Standard_F1s', 'Standard_F2s', 'Standard_F4s', + 'Standard_F8s', 'Standard_F16s', 'Standard_F2s_v2', 'Standard_F4s_v2', + 'Standard_F8s_v2', 'Standard_F16s_v2', 'Standard_F32s_v2', + 'Standard_F64s_v2', 'Standard_F72s_v2', 'Standard_G1', 'Standard_G2', + 'Standard_G3', 'Standard_G4', 'Standard_G5', 'Standard_GS1', + 'Standard_GS2', 'Standard_GS3', 'Standard_GS4', 'Standard_GS5', + 'Standard_GS4-8', 'Standard_GS4-4', 'Standard_GS5-16', 'Standard_GS5-8', + 'Standard_H8', 'Standard_H16', 'Standard_H8m', 'Standard_H16m', + 'Standard_H16r', 'Standard_H16mr', 'Standard_L4s', 'Standard_L8s', + 'Standard_L16s', 'Standard_L32s', 'Standard_M64s', 'Standard_M64ms', + 'Standard_M128s', 'Standard_M128ms', 'Standard_M64-32ms', + 'Standard_M64-16ms', 'Standard_M128-64ms', 'Standard_M128-32ms', + 'Standard_NC6', 'Standard_NC12', 'Standard_NC24', 'Standard_NC24r', + 'Standard_NC6s_v2', 'Standard_NC12s_v2', 'Standard_NC24s_v2', + 'Standard_NC24rs_v2', 'Standard_NC6s_v3', 'Standard_NC12s_v3', + 'Standard_NC24s_v3', 'Standard_NC24rs_v3', 'Standard_ND6s', + 'Standard_ND12s', 'Standard_ND24s', 'Standard_ND24rs', 'Standard_NV6', + 'Standard_NV12', 'Standard_NV24' + :type vm_size: str or + ~azure.mgmt.compute.v2018_06_01.models.VirtualMachineSizeTypes + """ + + _attribute_map = { + 'vm_size': {'key': 'vmSize', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(HardwareProfile, self).__init__(**kwargs) + self.vm_size = kwargs.get('vm_size', None) + + +class Image(Resource): + """The source user image virtual hard disk. The virtual hard disk will be + copied before being attached to the virtual machine. If SourceImage is + provided, the destination virtual hard drive must not exist. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource Id + :vartype id: str + :ivar name: Resource name + :vartype name: str + :ivar type: Resource type + :vartype type: str + :param location: Required. Resource location + :type location: str + :param tags: Resource tags + :type tags: dict[str, str] + :param source_virtual_machine: The source virtual machine from which Image + is created. + :type source_virtual_machine: + ~azure.mgmt.compute.v2018_06_01.models.SubResource + :param storage_profile: Specifies the storage settings for the virtual + machine disks. + :type storage_profile: + ~azure.mgmt.compute.v2018_06_01.models.ImageStorageProfile + :ivar provisioning_state: The provisioning state. + :vartype provisioning_state: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'source_virtual_machine': {'key': 'properties.sourceVirtualMachine', 'type': 'SubResource'}, + 'storage_profile': {'key': 'properties.storageProfile', 'type': 'ImageStorageProfile'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(Image, self).__init__(**kwargs) + self.source_virtual_machine = kwargs.get('source_virtual_machine', None) + self.storage_profile = kwargs.get('storage_profile', None) + self.provisioning_state = None + + +class ImageDataDisk(Model): + """Describes a data disk. + + All required parameters must be populated in order to send to Azure. + + :param lun: Required. Specifies the logical unit number of the data disk. + This value is used to identify data disks within the VM and therefore must + be unique for each data disk attached to a VM. + :type lun: int + :param snapshot: The snapshot. + :type snapshot: ~azure.mgmt.compute.v2018_06_01.models.SubResource + :param managed_disk: The managedDisk. + :type managed_disk: ~azure.mgmt.compute.v2018_06_01.models.SubResource + :param blob_uri: The Virtual Hard Disk. + :type blob_uri: str + :param caching: Specifies the caching requirements.

    Possible + values are:

    **None**

    **ReadOnly**

    **ReadWrite** +

    Default: **None for Standard storage. ReadOnly for Premium + storage**. Possible values include: 'None', 'ReadOnly', 'ReadWrite' + :type caching: str or ~azure.mgmt.compute.v2018_06_01.models.CachingTypes + :param disk_size_gb: Specifies the size of empty data disks in gigabytes. + This element can be used to overwrite the name of the disk in a virtual + machine image.

    This value cannot be larger than 1023 GB + :type disk_size_gb: int + :param storage_account_type: Specifies the storage account type for the + managed disk. NOTE: UltraSSD_LRS can only be used with data disks, it + cannot be used with OS Disk. Possible values include: 'Standard_LRS', + 'Premium_LRS', 'StandardSSD_LRS', 'UltraSSD_LRS' + :type storage_account_type: str or + ~azure.mgmt.compute.v2018_06_01.models.StorageAccountTypes + """ + + _validation = { + 'lun': {'required': True}, + } + + _attribute_map = { + 'lun': {'key': 'lun', 'type': 'int'}, + 'snapshot': {'key': 'snapshot', 'type': 'SubResource'}, + 'managed_disk': {'key': 'managedDisk', 'type': 'SubResource'}, + 'blob_uri': {'key': 'blobUri', 'type': 'str'}, + 'caching': {'key': 'caching', 'type': 'CachingTypes'}, + 'disk_size_gb': {'key': 'diskSizeGB', 'type': 'int'}, + 'storage_account_type': {'key': 'storageAccountType', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ImageDataDisk, self).__init__(**kwargs) + self.lun = kwargs.get('lun', None) + self.snapshot = kwargs.get('snapshot', None) + self.managed_disk = kwargs.get('managed_disk', None) + self.blob_uri = kwargs.get('blob_uri', None) + self.caching = kwargs.get('caching', None) + self.disk_size_gb = kwargs.get('disk_size_gb', None) + self.storage_account_type = kwargs.get('storage_account_type', None) + + +class ImageDiskReference(Model): + """The source image used for creating the disk. + + All required parameters must be populated in order to send to Azure. + + :param id: Required. A relative uri containing either a Platform Image + Repository or user image reference. + :type id: str + :param lun: If the disk is created from an image's data disk, this is an + index that indicates which of the data disks in the image to use. For OS + disks, this field is null. + :type lun: int + """ + + _validation = { + 'id': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'lun': {'key': 'lun', 'type': 'int'}, + } + + def __init__(self, **kwargs): + super(ImageDiskReference, self).__init__(**kwargs) + self.id = kwargs.get('id', None) + self.lun = kwargs.get('lun', None) + + +class ImageOSDisk(Model): + """Describes an Operating System disk. + + All required parameters must be populated in order to send to Azure. + + :param os_type: Required. This property allows you to specify the type of + the OS that is included in the disk if creating a VM from a custom image. +

    Possible values are:

    **Windows**

    **Linux**. + Possible values include: 'Windows', 'Linux' + :type os_type: str or + ~azure.mgmt.compute.v2018_06_01.models.OperatingSystemTypes + :param os_state: Required. The OS State. Possible values include: + 'Generalized', 'Specialized' + :type os_state: str or + ~azure.mgmt.compute.v2018_06_01.models.OperatingSystemStateTypes + :param snapshot: The snapshot. + :type snapshot: ~azure.mgmt.compute.v2018_06_01.models.SubResource + :param managed_disk: The managedDisk. + :type managed_disk: ~azure.mgmt.compute.v2018_06_01.models.SubResource + :param blob_uri: The Virtual Hard Disk. + :type blob_uri: str + :param caching: Specifies the caching requirements.

    Possible + values are:

    **None**

    **ReadOnly**

    **ReadWrite** +

    Default: **None for Standard storage. ReadOnly for Premium + storage**. Possible values include: 'None', 'ReadOnly', 'ReadWrite' + :type caching: str or ~azure.mgmt.compute.v2018_06_01.models.CachingTypes + :param disk_size_gb: Specifies the size of empty data disks in gigabytes. + This element can be used to overwrite the name of the disk in a virtual + machine image.

    This value cannot be larger than 1023 GB + :type disk_size_gb: int + :param storage_account_type: Specifies the storage account type for the + managed disk. UltraSSD_LRS cannot be used with OS Disk. Possible values + include: 'Standard_LRS', 'Premium_LRS', 'StandardSSD_LRS', 'UltraSSD_LRS' + :type storage_account_type: str or + ~azure.mgmt.compute.v2018_06_01.models.StorageAccountTypes + """ + + _validation = { + 'os_type': {'required': True}, + 'os_state': {'required': True}, + } + + _attribute_map = { + 'os_type': {'key': 'osType', 'type': 'OperatingSystemTypes'}, + 'os_state': {'key': 'osState', 'type': 'OperatingSystemStateTypes'}, + 'snapshot': {'key': 'snapshot', 'type': 'SubResource'}, + 'managed_disk': {'key': 'managedDisk', 'type': 'SubResource'}, + 'blob_uri': {'key': 'blobUri', 'type': 'str'}, + 'caching': {'key': 'caching', 'type': 'CachingTypes'}, + 'disk_size_gb': {'key': 'diskSizeGB', 'type': 'int'}, + 'storage_account_type': {'key': 'storageAccountType', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ImageOSDisk, self).__init__(**kwargs) + self.os_type = kwargs.get('os_type', None) + self.os_state = kwargs.get('os_state', None) + self.snapshot = kwargs.get('snapshot', None) + self.managed_disk = kwargs.get('managed_disk', None) + self.blob_uri = kwargs.get('blob_uri', None) + self.caching = kwargs.get('caching', None) + self.disk_size_gb = kwargs.get('disk_size_gb', None) + self.storage_account_type = kwargs.get('storage_account_type', None) + + +class ImagePurchasePlan(Model): + """Describes the gallery Image Definition purchase plan. This is used by + marketplace images. + + :param name: The plan ID. + :type name: str + :param publisher: The publisher ID. + :type publisher: str + :param product: The product ID. + :type product: str + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'publisher': {'key': 'publisher', 'type': 'str'}, + 'product': {'key': 'product', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ImagePurchasePlan, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.publisher = kwargs.get('publisher', None) + self.product = kwargs.get('product', None) + + +class SubResource(Model): + """SubResource. + + :param id: Resource Id + :type id: str + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(SubResource, self).__init__(**kwargs) + self.id = kwargs.get('id', None) + + +class ImageReference(SubResource): + """Specifies information about the image to use. You can specify information + about platform images, marketplace images, or virtual machine images. This + element is required when you want to use a platform image, marketplace + image, or virtual machine image, but is not used in other creation + operations. + + :param id: Resource Id + :type id: str + :param publisher: The image publisher. + :type publisher: str + :param offer: Specifies the offer of the platform image or marketplace + image used to create the virtual machine. + :type offer: str + :param sku: The image SKU. + :type sku: str + :param version: Specifies the version of the platform image or marketplace + image used to create the virtual machine. The allowed formats are + Major.Minor.Build or 'latest'. Major, Minor, and Build are decimal + numbers. Specify 'latest' to use the latest version of an image available + at deploy time. Even if you use 'latest', the VM image will not + automatically update after deploy time even if a new version becomes + available. + :type version: str + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'publisher': {'key': 'publisher', 'type': 'str'}, + 'offer': {'key': 'offer', 'type': 'str'}, + 'sku': {'key': 'sku', 'type': 'str'}, + 'version': {'key': 'version', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ImageReference, self).__init__(**kwargs) + self.publisher = kwargs.get('publisher', None) + self.offer = kwargs.get('offer', None) + self.sku = kwargs.get('sku', None) + self.version = kwargs.get('version', None) + + +class ImageStorageProfile(Model): + """Describes a storage profile. + + :param os_disk: Specifies information about the operating system disk used + by the virtual machine.

    For more information about disks, see + [About disks and VHDs for Azure virtual + machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-about-disks-vhds?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). + :type os_disk: ~azure.mgmt.compute.v2018_06_01.models.ImageOSDisk + :param data_disks: Specifies the parameters that are used to add a data + disk to a virtual machine.

    For more information about disks, see + [About disks and VHDs for Azure virtual + machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-about-disks-vhds?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). + :type data_disks: + list[~azure.mgmt.compute.v2018_06_01.models.ImageDataDisk] + :param zone_resilient: Specifies whether an image is zone resilient or + not. Default is false. Zone resilient images can be created only in + regions that provide Zone Redundant Storage (ZRS). + :type zone_resilient: bool + """ + + _attribute_map = { + 'os_disk': {'key': 'osDisk', 'type': 'ImageOSDisk'}, + 'data_disks': {'key': 'dataDisks', 'type': '[ImageDataDisk]'}, + 'zone_resilient': {'key': 'zoneResilient', 'type': 'bool'}, + } + + def __init__(self, **kwargs): + super(ImageStorageProfile, self).__init__(**kwargs) + self.os_disk = kwargs.get('os_disk', None) + self.data_disks = kwargs.get('data_disks', None) + self.zone_resilient = kwargs.get('zone_resilient', None) + + +class ImageUpdate(UpdateResource): + """The source user image virtual hard disk. Only tags may be updated. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :param tags: Resource tags + :type tags: dict[str, str] + :param source_virtual_machine: The source virtual machine from which Image + is created. + :type source_virtual_machine: + ~azure.mgmt.compute.v2018_06_01.models.SubResource + :param storage_profile: Specifies the storage settings for the virtual + machine disks. + :type storage_profile: + ~azure.mgmt.compute.v2018_06_01.models.ImageStorageProfile + :ivar provisioning_state: The provisioning state. + :vartype provisioning_state: str + """ + + _validation = { + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + 'source_virtual_machine': {'key': 'properties.sourceVirtualMachine', 'type': 'SubResource'}, + 'storage_profile': {'key': 'properties.storageProfile', 'type': 'ImageStorageProfile'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ImageUpdate, self).__init__(**kwargs) + self.source_virtual_machine = kwargs.get('source_virtual_machine', None) + self.storage_profile = kwargs.get('storage_profile', None) + self.provisioning_state = None + + +class InnerError(Model): + """Inner error details. + + :param exceptiontype: The exception type. + :type exceptiontype: str + :param errordetail: The internal error message or exception dump. + :type errordetail: str + """ + + _attribute_map = { + 'exceptiontype': {'key': 'exceptiontype', 'type': 'str'}, + 'errordetail': {'key': 'errordetail', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(InnerError, self).__init__(**kwargs) + self.exceptiontype = kwargs.get('exceptiontype', None) + self.errordetail = kwargs.get('errordetail', None) + + +class InstanceViewStatus(Model): + """Instance view status. + + :param code: The status code. + :type code: str + :param level: The level code. Possible values include: 'Info', 'Warning', + 'Error' + :type level: str or + ~azure.mgmt.compute.v2018_06_01.models.StatusLevelTypes + :param display_status: The short localizable label for the status. + :type display_status: str + :param message: The detailed status message, including for alerts and + error messages. + :type message: str + :param time: The time of the status. + :type time: datetime + """ + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + 'level': {'key': 'level', 'type': 'StatusLevelTypes'}, + 'display_status': {'key': 'displayStatus', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + 'time': {'key': 'time', 'type': 'iso-8601'}, + } + + def __init__(self, **kwargs): + super(InstanceViewStatus, self).__init__(**kwargs) + self.code = kwargs.get('code', None) + self.level = kwargs.get('level', None) + self.display_status = kwargs.get('display_status', None) + self.message = kwargs.get('message', None) + self.time = kwargs.get('time', None) + + +class KeyVaultAndKeyReference(Model): + """Key Vault Key Url and vault id of KeK, KeK is optional and when provided is + used to unwrap the encryptionKey. + + All required parameters must be populated in order to send to Azure. + + :param source_vault: Required. Resource id of the KeyVault containing the + key or secret + :type source_vault: ~azure.mgmt.compute.v2018_06_01.models.SourceVault + :param key_url: Required. Url pointing to a key or secret in KeyVault + :type key_url: str + """ + + _validation = { + 'source_vault': {'required': True}, + 'key_url': {'required': True}, + } + + _attribute_map = { + 'source_vault': {'key': 'sourceVault', 'type': 'SourceVault'}, + 'key_url': {'key': 'keyUrl', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(KeyVaultAndKeyReference, self).__init__(**kwargs) + self.source_vault = kwargs.get('source_vault', None) + self.key_url = kwargs.get('key_url', None) + + +class KeyVaultAndSecretReference(Model): + """Key Vault Secret Url and vault id of the encryption key . + + All required parameters must be populated in order to send to Azure. + + :param source_vault: Required. Resource id of the KeyVault containing the + key or secret + :type source_vault: ~azure.mgmt.compute.v2018_06_01.models.SourceVault + :param secret_url: Required. Url pointing to a key or secret in KeyVault + :type secret_url: str + """ + + _validation = { + 'source_vault': {'required': True}, + 'secret_url': {'required': True}, + } + + _attribute_map = { + 'source_vault': {'key': 'sourceVault', 'type': 'SourceVault'}, + 'secret_url': {'key': 'secretUrl', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(KeyVaultAndSecretReference, self).__init__(**kwargs) + self.source_vault = kwargs.get('source_vault', None) + self.secret_url = kwargs.get('secret_url', None) + + +class KeyVaultKeyReference(Model): + """Describes a reference to Key Vault Key. + + All required parameters must be populated in order to send to Azure. + + :param key_url: Required. The URL referencing a key encryption key in Key + Vault. + :type key_url: str + :param source_vault: Required. The relative URL of the Key Vault + containing the key. + :type source_vault: ~azure.mgmt.compute.v2018_06_01.models.SubResource + """ + + _validation = { + 'key_url': {'required': True}, + 'source_vault': {'required': True}, + } + + _attribute_map = { + 'key_url': {'key': 'keyUrl', 'type': 'str'}, + 'source_vault': {'key': 'sourceVault', 'type': 'SubResource'}, + } + + def __init__(self, **kwargs): + super(KeyVaultKeyReference, self).__init__(**kwargs) + self.key_url = kwargs.get('key_url', None) + self.source_vault = kwargs.get('source_vault', None) + + +class KeyVaultSecretReference(Model): + """Describes a reference to Key Vault Secret. + + All required parameters must be populated in order to send to Azure. + + :param secret_url: Required. The URL referencing a secret in a Key Vault. + :type secret_url: str + :param source_vault: Required. The relative URL of the Key Vault + containing the secret. + :type source_vault: ~azure.mgmt.compute.v2018_06_01.models.SubResource + """ + + _validation = { + 'secret_url': {'required': True}, + 'source_vault': {'required': True}, + } + + _attribute_map = { + 'secret_url': {'key': 'secretUrl', 'type': 'str'}, + 'source_vault': {'key': 'sourceVault', 'type': 'SubResource'}, + } + + def __init__(self, **kwargs): + super(KeyVaultSecretReference, self).__init__(**kwargs) + self.secret_url = kwargs.get('secret_url', None) + self.source_vault = kwargs.get('source_vault', None) + + +class LinuxConfiguration(Model): + """Specifies the Linux operating system settings on the virtual machine. +

    For a list of supported Linux distributions, see [Linux on + Azure-Endorsed + Distributions](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-endorsed-distros?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json) +

    For running non-endorsed distributions, see [Information for + Non-Endorsed + Distributions](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-create-upload-generic?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json). + + :param disable_password_authentication: Specifies whether password + authentication should be disabled. + :type disable_password_authentication: bool + :param ssh: Specifies the ssh key configuration for a Linux OS. + :type ssh: ~azure.mgmt.compute.v2018_06_01.models.SshConfiguration + :param provision_vm_agent: Indicates whether virtual machine agent should + be provisioned on the virtual machine.

    When this property is not + specified in the request body, default behavior is to set it to true. + This will ensure that VM Agent is installed on the VM so that extensions + can be added to the VM later. + :type provision_vm_agent: bool + """ + + _attribute_map = { + 'disable_password_authentication': {'key': 'disablePasswordAuthentication', 'type': 'bool'}, + 'ssh': {'key': 'ssh', 'type': 'SshConfiguration'}, + 'provision_vm_agent': {'key': 'provisionVMAgent', 'type': 'bool'}, + } + + def __init__(self, **kwargs): + super(LinuxConfiguration, self).__init__(**kwargs) + self.disable_password_authentication = kwargs.get('disable_password_authentication', None) + self.ssh = kwargs.get('ssh', None) + self.provision_vm_agent = kwargs.get('provision_vm_agent', None) + + +class LogAnalyticsInputBase(Model): + """Api input base class for LogAnalytics Api. + + All required parameters must be populated in order to send to Azure. + + :param blob_container_sas_uri: Required. SAS Uri of the logging blob + container to which LogAnalytics Api writes output logs to. + :type blob_container_sas_uri: str + :param from_time: Required. From time of the query + :type from_time: datetime + :param to_time: Required. To time of the query + :type to_time: datetime + :param group_by_throttle_policy: Group query result by Throttle Policy + applied. + :type group_by_throttle_policy: bool + :param group_by_operation_name: Group query result by Operation Name. + :type group_by_operation_name: bool + :param group_by_resource_name: Group query result by Resource Name. + :type group_by_resource_name: bool + """ + + _validation = { + 'blob_container_sas_uri': {'required': True}, + 'from_time': {'required': True}, + 'to_time': {'required': True}, + } + + _attribute_map = { + 'blob_container_sas_uri': {'key': 'blobContainerSasUri', 'type': 'str'}, + 'from_time': {'key': 'fromTime', 'type': 'iso-8601'}, + 'to_time': {'key': 'toTime', 'type': 'iso-8601'}, + 'group_by_throttle_policy': {'key': 'groupByThrottlePolicy', 'type': 'bool'}, + 'group_by_operation_name': {'key': 'groupByOperationName', 'type': 'bool'}, + 'group_by_resource_name': {'key': 'groupByResourceName', 'type': 'bool'}, + } + + def __init__(self, **kwargs): + super(LogAnalyticsInputBase, self).__init__(**kwargs) + self.blob_container_sas_uri = kwargs.get('blob_container_sas_uri', None) + self.from_time = kwargs.get('from_time', None) + self.to_time = kwargs.get('to_time', None) + self.group_by_throttle_policy = kwargs.get('group_by_throttle_policy', None) + self.group_by_operation_name = kwargs.get('group_by_operation_name', None) + self.group_by_resource_name = kwargs.get('group_by_resource_name', None) + + +class LogAnalyticsOperationResult(Model): + """LogAnalytics operation status response. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar properties: LogAnalyticsOutput + :vartype properties: + ~azure.mgmt.compute.v2018_06_01.models.LogAnalyticsOutput + """ + + _validation = { + 'properties': {'readonly': True}, + } + + _attribute_map = { + 'properties': {'key': 'properties', 'type': 'LogAnalyticsOutput'}, + } + + def __init__(self, **kwargs): + super(LogAnalyticsOperationResult, self).__init__(**kwargs) + self.properties = None + + +class LogAnalyticsOutput(Model): + """LogAnalytics output properties. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar output: Output file Uri path to blob container. + :vartype output: str + """ + + _validation = { + 'output': {'readonly': True}, + } + + _attribute_map = { + 'output': {'key': 'output', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(LogAnalyticsOutput, self).__init__(**kwargs) + self.output = None + + +class MaintenanceRedeployStatus(Model): + """Maintenance Operation Status. + + :param is_customer_initiated_maintenance_allowed: True, if customer is + allowed to perform Maintenance. + :type is_customer_initiated_maintenance_allowed: bool + :param pre_maintenance_window_start_time: Start Time for the Pre + Maintenance Window. + :type pre_maintenance_window_start_time: datetime + :param pre_maintenance_window_end_time: End Time for the Pre Maintenance + Window. + :type pre_maintenance_window_end_time: datetime + :param maintenance_window_start_time: Start Time for the Maintenance + Window. + :type maintenance_window_start_time: datetime + :param maintenance_window_end_time: End Time for the Maintenance Window. + :type maintenance_window_end_time: datetime + :param last_operation_result_code: The Last Maintenance Operation Result + Code. Possible values include: 'None', 'RetryLater', 'MaintenanceAborted', + 'MaintenanceCompleted' + :type last_operation_result_code: str or + ~azure.mgmt.compute.v2018_06_01.models.MaintenanceOperationResultCodeTypes + :param last_operation_message: Message returned for the last Maintenance + Operation. + :type last_operation_message: str + """ + + _attribute_map = { + 'is_customer_initiated_maintenance_allowed': {'key': 'isCustomerInitiatedMaintenanceAllowed', 'type': 'bool'}, + 'pre_maintenance_window_start_time': {'key': 'preMaintenanceWindowStartTime', 'type': 'iso-8601'}, + 'pre_maintenance_window_end_time': {'key': 'preMaintenanceWindowEndTime', 'type': 'iso-8601'}, + 'maintenance_window_start_time': {'key': 'maintenanceWindowStartTime', 'type': 'iso-8601'}, + 'maintenance_window_end_time': {'key': 'maintenanceWindowEndTime', 'type': 'iso-8601'}, + 'last_operation_result_code': {'key': 'lastOperationResultCode', 'type': 'MaintenanceOperationResultCodeTypes'}, + 'last_operation_message': {'key': 'lastOperationMessage', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(MaintenanceRedeployStatus, self).__init__(**kwargs) + self.is_customer_initiated_maintenance_allowed = kwargs.get('is_customer_initiated_maintenance_allowed', None) + self.pre_maintenance_window_start_time = kwargs.get('pre_maintenance_window_start_time', None) + self.pre_maintenance_window_end_time = kwargs.get('pre_maintenance_window_end_time', None) + self.maintenance_window_start_time = kwargs.get('maintenance_window_start_time', None) + self.maintenance_window_end_time = kwargs.get('maintenance_window_end_time', None) + self.last_operation_result_code = kwargs.get('last_operation_result_code', None) + self.last_operation_message = kwargs.get('last_operation_message', None) + + +class ManagedArtifact(Model): + """The managed artifact. + + All required parameters must be populated in order to send to Azure. + + :param id: Required. The managed artifact id. + :type id: str + """ + + _validation = { + 'id': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ManagedArtifact, self).__init__(**kwargs) + self.id = kwargs.get('id', None) + + +class ManagedDiskParameters(SubResource): + """The parameters of a managed disk. + + :param id: Resource Id + :type id: str + :param storage_account_type: Specifies the storage account type for the + managed disk. NOTE: UltraSSD_LRS can only be used with data disks, it + cannot be used with OS Disk. Possible values include: 'Standard_LRS', + 'Premium_LRS', 'StandardSSD_LRS', 'UltraSSD_LRS' + :type storage_account_type: str or + ~azure.mgmt.compute.v2018_06_01.models.StorageAccountTypes + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'storage_account_type': {'key': 'storageAccountType', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ManagedDiskParameters, self).__init__(**kwargs) + self.storage_account_type = kwargs.get('storage_account_type', None) + + +class NetworkInterfaceReference(SubResource): + """Describes a network interface reference. + + :param id: Resource Id + :type id: str + :param primary: Specifies the primary network interface in case the + virtual machine has more than 1 network interface. + :type primary: bool + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'primary': {'key': 'properties.primary', 'type': 'bool'}, + } + + def __init__(self, **kwargs): + super(NetworkInterfaceReference, self).__init__(**kwargs) + self.primary = kwargs.get('primary', None) + + +class NetworkProfile(Model): + """Specifies the network interfaces of the virtual machine. + + :param network_interfaces: Specifies the list of resource Ids for the + network interfaces associated with the virtual machine. + :type network_interfaces: + list[~azure.mgmt.compute.v2018_06_01.models.NetworkInterfaceReference] + """ + + _attribute_map = { + 'network_interfaces': {'key': 'networkInterfaces', 'type': '[NetworkInterfaceReference]'}, + } + + def __init__(self, **kwargs): + super(NetworkProfile, self).__init__(**kwargs) + self.network_interfaces = kwargs.get('network_interfaces', None) + + +class OSDisk(Model): + """Specifies information about the operating system disk used by the virtual + machine.

    For more information about disks, see [About disks and + VHDs for Azure virtual + machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-about-disks-vhds?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). + + All required parameters must be populated in order to send to Azure. + + :param os_type: This property allows you to specify the type of the OS + that is included in the disk if creating a VM from user-image or a + specialized VHD.

    Possible values are:

    **Windows** +

    **Linux**. Possible values include: 'Windows', 'Linux' + :type os_type: str or + ~azure.mgmt.compute.v2018_06_01.models.OperatingSystemTypes + :param encryption_settings: Specifies the encryption settings for the OS + Disk.

    Minimum api-version: 2015-06-15 + :type encryption_settings: + ~azure.mgmt.compute.v2018_06_01.models.DiskEncryptionSettings + :param name: The disk name. + :type name: str + :param vhd: The virtual hard disk. + :type vhd: ~azure.mgmt.compute.v2018_06_01.models.VirtualHardDisk + :param image: The source user image virtual hard disk. The virtual hard + disk will be copied before being attached to the virtual machine. If + SourceImage is provided, the destination virtual hard drive must not + exist. + :type image: ~azure.mgmt.compute.v2018_06_01.models.VirtualHardDisk + :param caching: Specifies the caching requirements.

    Possible + values are:

    **None**

    **ReadOnly**

    **ReadWrite** +

    Default: **None for Standard storage. ReadOnly for Premium + storage**. Possible values include: 'None', 'ReadOnly', 'ReadWrite' + :type caching: str or ~azure.mgmt.compute.v2018_06_01.models.CachingTypes + :param write_accelerator_enabled: Specifies whether writeAccelerator + should be enabled or disabled on the disk. + :type write_accelerator_enabled: bool + :param diff_disk_settings: Specifies the ephemeral Disk Settings for the + operating system disk used by the virtual machine. + :type diff_disk_settings: + ~azure.mgmt.compute.v2018_06_01.models.DiffDiskSettings + :param create_option: Required. Specifies how the virtual machine should + be created.

    Possible values are:

    **Attach** \\u2013 This + value is used when you are using a specialized disk to create the virtual + machine.

    **FromImage** \\u2013 This value is used when you are + using an image to create the virtual machine. If you are using a platform + image, you also use the imageReference element described above. If you are + using a marketplace image, you also use the plan element previously + described. Possible values include: 'FromImage', 'Empty', 'Attach' + :type create_option: str or + ~azure.mgmt.compute.v2018_06_01.models.DiskCreateOptionTypes + :param disk_size_gb: Specifies the size of an empty data disk in + gigabytes. This element can be used to overwrite the size of the disk in a + virtual machine image.

    This value cannot be larger than 1023 GB + :type disk_size_gb: int + :param managed_disk: The managed disk parameters. + :type managed_disk: + ~azure.mgmt.compute.v2018_06_01.models.ManagedDiskParameters + """ + + _validation = { + 'create_option': {'required': True}, + } + + _attribute_map = { + 'os_type': {'key': 'osType', 'type': 'OperatingSystemTypes'}, + 'encryption_settings': {'key': 'encryptionSettings', 'type': 'DiskEncryptionSettings'}, + 'name': {'key': 'name', 'type': 'str'}, + 'vhd': {'key': 'vhd', 'type': 'VirtualHardDisk'}, + 'image': {'key': 'image', 'type': 'VirtualHardDisk'}, + 'caching': {'key': 'caching', 'type': 'CachingTypes'}, + 'write_accelerator_enabled': {'key': 'writeAcceleratorEnabled', 'type': 'bool'}, + 'diff_disk_settings': {'key': 'diffDiskSettings', 'type': 'DiffDiskSettings'}, + 'create_option': {'key': 'createOption', 'type': 'str'}, + 'disk_size_gb': {'key': 'diskSizeGB', 'type': 'int'}, + 'managed_disk': {'key': 'managedDisk', 'type': 'ManagedDiskParameters'}, + } + + def __init__(self, **kwargs): + super(OSDisk, self).__init__(**kwargs) + self.os_type = kwargs.get('os_type', None) + self.encryption_settings = kwargs.get('encryption_settings', None) + self.name = kwargs.get('name', None) + self.vhd = kwargs.get('vhd', None) + self.image = kwargs.get('image', None) + self.caching = kwargs.get('caching', None) + self.write_accelerator_enabled = kwargs.get('write_accelerator_enabled', None) + self.diff_disk_settings = kwargs.get('diff_disk_settings', None) + self.create_option = kwargs.get('create_option', None) + self.disk_size_gb = kwargs.get('disk_size_gb', None) + self.managed_disk = kwargs.get('managed_disk', None) + + +class OSDiskImage(Model): + """Contains the os disk image information. + + All required parameters must be populated in order to send to Azure. + + :param operating_system: Required. The operating system of the + osDiskImage. Possible values include: 'Windows', 'Linux' + :type operating_system: str or + ~azure.mgmt.compute.v2018_06_01.models.OperatingSystemTypes + """ + + _validation = { + 'operating_system': {'required': True}, + } + + _attribute_map = { + 'operating_system': {'key': 'operatingSystem', 'type': 'OperatingSystemTypes'}, + } + + def __init__(self, **kwargs): + super(OSDiskImage, self).__init__(**kwargs) + self.operating_system = kwargs.get('operating_system', None) + + +class OSProfile(Model): + """Specifies the operating system settings for the virtual machine. + + :param computer_name: Specifies the host OS name of the virtual machine. +

    This name cannot be updated after the VM is created.

    + **Max-length (Windows):** 15 characters

    **Max-length (Linux):** + 64 characters.

    For naming conventions and restrictions see [Azure + infrastructure services implementation + guidelines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-infrastructure-subscription-accounts-guidelines?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json#1-naming-conventions). + :type computer_name: str + :param admin_username: Specifies the name of the administrator account. +

    **Windows-only restriction:** Cannot end in "."

    + **Disallowed values:** "administrator", "admin", "user", "user1", "test", + "user2", "test1", "user3", "admin1", "1", "123", "a", "actuser", "adm", + "admin2", "aspnet", "backup", "console", "david", "guest", "john", + "owner", "root", "server", "sql", "support", "support_388945a0", "sys", + "test2", "test3", "user4", "user5".

    **Minimum-length (Linux):** 1 + character

    **Max-length (Linux):** 64 characters

    + **Max-length (Windows):** 20 characters

  • For root access to + the Linux VM, see [Using root privileges on Linux virtual machines in + Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-use-root-privileges?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json)
  • + For a list of built-in system users on Linux that should not be used in + this field, see [Selecting User Names for Linux on + Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-usernames?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json) + :type admin_username: str + :param admin_password: Specifies the password of the administrator + account.

    **Minimum-length (Windows):** 8 characters

    + **Minimum-length (Linux):** 6 characters

    **Max-length + (Windows):** 123 characters

    **Max-length (Linux):** 72 characters +

    **Complexity requirements:** 3 out of 4 conditions below need to + be fulfilled
    Has lower characters
    Has upper characters
    Has a + digit
    Has a special character (Regex match [\\W_])

    + **Disallowed values:** "abc@123", "P@$$w0rd", "P@ssw0rd", "P@ssword123", + "Pa$$word", "pass@word1", "Password!", "Password1", "Password22", + "iloveyou!"

    For resetting the password, see [How to reset the + Remote Desktop service or its login password in a Windows + VM](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-reset-rdp?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json) +

    For resetting root password, see [Manage users, SSH, and check or + repair disks on Azure Linux VMs using the VMAccess + Extension](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-using-vmaccess-extension?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json#reset-root-password) + :type admin_password: str + :param custom_data: Specifies a base-64 encoded string of custom data. The + base-64 encoded string is decoded to a binary array that is saved as a + file on the Virtual Machine. The maximum length of the binary array is + 65535 bytes.

    For using cloud-init for your VM, see [Using + cloud-init to customize a Linux VM during + creation](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-using-cloud-init?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json) + :type custom_data: str + :param windows_configuration: Specifies Windows operating system settings + on the virtual machine. + :type windows_configuration: + ~azure.mgmt.compute.v2018_06_01.models.WindowsConfiguration + :param linux_configuration: Specifies the Linux operating system settings + on the virtual machine.

    For a list of supported Linux + distributions, see [Linux on Azure-Endorsed + Distributions](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-endorsed-distros?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json) +

    For running non-endorsed distributions, see [Information for + Non-Endorsed + Distributions](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-create-upload-generic?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json). + :type linux_configuration: + ~azure.mgmt.compute.v2018_06_01.models.LinuxConfiguration + :param secrets: Specifies set of certificates that should be installed + onto the virtual machine. + :type secrets: + list[~azure.mgmt.compute.v2018_06_01.models.VaultSecretGroup] + :param allow_extension_operations: Specifies whether extension operations + should be allowed on the virtual machine.

    This may only be set to + False when no extensions are present on the virtual machine. + :type allow_extension_operations: bool + """ + + _attribute_map = { + 'computer_name': {'key': 'computerName', 'type': 'str'}, + 'admin_username': {'key': 'adminUsername', 'type': 'str'}, + 'admin_password': {'key': 'adminPassword', 'type': 'str'}, + 'custom_data': {'key': 'customData', 'type': 'str'}, + 'windows_configuration': {'key': 'windowsConfiguration', 'type': 'WindowsConfiguration'}, + 'linux_configuration': {'key': 'linuxConfiguration', 'type': 'LinuxConfiguration'}, + 'secrets': {'key': 'secrets', 'type': '[VaultSecretGroup]'}, + 'allow_extension_operations': {'key': 'allowExtensionOperations', 'type': 'bool'}, + } + + def __init__(self, **kwargs): + super(OSProfile, self).__init__(**kwargs) + self.computer_name = kwargs.get('computer_name', None) + self.admin_username = kwargs.get('admin_username', None) + self.admin_password = kwargs.get('admin_password', None) + self.custom_data = kwargs.get('custom_data', None) + self.windows_configuration = kwargs.get('windows_configuration', None) + self.linux_configuration = kwargs.get('linux_configuration', None) + self.secrets = kwargs.get('secrets', None) + self.allow_extension_operations = kwargs.get('allow_extension_operations', None) + + +class Plan(Model): + """Specifies information about the marketplace image used to create the + virtual machine. This element is only used for marketplace images. Before + you can use a marketplace image from an API, you must enable the image for + programmatic use. In the Azure portal, find the marketplace image that you + want to use and then click **Want to deploy programmatically, Get Started + ->**. Enter any required information and then click **Save**. + + :param name: The plan ID. + :type name: str + :param publisher: The publisher ID. + :type publisher: str + :param product: Specifies the product of the image from the marketplace. + This is the same value as Offer under the imageReference element. + :type product: str + :param promotion_code: The promotion code. + :type promotion_code: str + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'publisher': {'key': 'publisher', 'type': 'str'}, + 'product': {'key': 'product', 'type': 'str'}, + 'promotion_code': {'key': 'promotionCode', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(Plan, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.publisher = kwargs.get('publisher', None) + self.product = kwargs.get('product', None) + self.promotion_code = kwargs.get('promotion_code', None) + + +class ProximityPlacementGroup(Resource): + """Specifies information about the proximity placement group. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource Id + :vartype id: str + :ivar name: Resource name + :vartype name: str + :ivar type: Resource type + :vartype type: str + :param location: Required. Resource location + :type location: str + :param tags: Resource tags + :type tags: dict[str, str] + :param proximity_placement_group_type: Specifies the type of the proximity + placement group.

    Possible values are:

    **Standard** : + Co-locate resources within an Azure region or Availability Zone.

    + **Ultra** : For future use. Possible values include: 'Standard', 'Ultra' + :type proximity_placement_group_type: str or + ~azure.mgmt.compute.v2018_06_01.models.ProximityPlacementGroupType + :ivar virtual_machines: A list of references to all virtual machines in + the proximity placement group. + :vartype virtual_machines: + list[~azure.mgmt.compute.v2018_06_01.models.SubResource] + :ivar virtual_machine_scale_sets: A list of references to all virtual + machine scale sets in the proximity placement group. + :vartype virtual_machine_scale_sets: + list[~azure.mgmt.compute.v2018_06_01.models.SubResource] + :ivar availability_sets: A list of references to all availability sets in + the proximity placement group. + :vartype availability_sets: + list[~azure.mgmt.compute.v2018_06_01.models.SubResource] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + 'virtual_machines': {'readonly': True}, + 'virtual_machine_scale_sets': {'readonly': True}, + 'availability_sets': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'proximity_placement_group_type': {'key': 'properties.proximityPlacementGroupType', 'type': 'str'}, + 'virtual_machines': {'key': 'properties.virtualMachines', 'type': '[SubResource]'}, + 'virtual_machine_scale_sets': {'key': 'properties.virtualMachineScaleSets', 'type': '[SubResource]'}, + 'availability_sets': {'key': 'properties.availabilitySets', 'type': '[SubResource]'}, + } + + def __init__(self, **kwargs): + super(ProximityPlacementGroup, self).__init__(**kwargs) + self.proximity_placement_group_type = kwargs.get('proximity_placement_group_type', None) + self.virtual_machines = None + self.virtual_machine_scale_sets = None + self.availability_sets = None + + +class ProximityPlacementGroupUpdate(UpdateResource): + """Specifies information about the proximity placement group. + + :param tags: Resource tags + :type tags: dict[str, str] + """ + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__(self, **kwargs): + super(ProximityPlacementGroupUpdate, self).__init__(**kwargs) + + +class PurchasePlan(Model): + """Used for establishing the purchase context of any 3rd Party artifact + through MarketPlace. + + All required parameters must be populated in order to send to Azure. + + :param publisher: Required. The publisher ID. + :type publisher: str + :param name: Required. The plan ID. + :type name: str + :param product: Required. Specifies the product of the image from the + marketplace. This is the same value as Offer under the imageReference + element. + :type product: str + """ + + _validation = { + 'publisher': {'required': True}, + 'name': {'required': True}, + 'product': {'required': True}, + } + + _attribute_map = { + 'publisher': {'key': 'publisher', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'product': {'key': 'product', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(PurchasePlan, self).__init__(**kwargs) + self.publisher = kwargs.get('publisher', None) + self.name = kwargs.get('name', None) + self.product = kwargs.get('product', None) + + +class RecommendedMachineConfiguration(Model): + """The properties describe the recommended machine configuration for this + Image Definition. These properties are updatable. + + :param v_cp_us: + :type v_cp_us: ~azure.mgmt.compute.v2018_06_01.models.ResourceRange + :param memory: + :type memory: ~azure.mgmt.compute.v2018_06_01.models.ResourceRange + """ + + _attribute_map = { + 'v_cp_us': {'key': 'vCPUs', 'type': 'ResourceRange'}, + 'memory': {'key': 'memory', 'type': 'ResourceRange'}, + } + + def __init__(self, **kwargs): + super(RecommendedMachineConfiguration, self).__init__(**kwargs) + self.v_cp_us = kwargs.get('v_cp_us', None) + self.memory = kwargs.get('memory', None) + + +class RecoveryWalkResponse(Model): + """Response after calling a manual recovery walk. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar walk_performed: Whether the recovery walk was performed + :vartype walk_performed: bool + :ivar next_platform_update_domain: The next update domain that needs to be + walked. Null means walk spanning all update domains has been completed + :vartype next_platform_update_domain: int + """ + + _validation = { + 'walk_performed': {'readonly': True}, + 'next_platform_update_domain': {'readonly': True}, + } + + _attribute_map = { + 'walk_performed': {'key': 'walkPerformed', 'type': 'bool'}, + 'next_platform_update_domain': {'key': 'nextPlatformUpdateDomain', 'type': 'int'}, + } + + def __init__(self, **kwargs): + super(RecoveryWalkResponse, self).__init__(**kwargs) + self.walk_performed = None + self.next_platform_update_domain = None + + +class RegionalReplicationStatus(Model): + """This is the regional replication status. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar region: The region to which the gallery Image Version is being + replicated to. + :vartype region: str + :ivar state: This is the regional replication state. Possible values + include: 'Unknown', 'Replicating', 'Completed', 'Failed' + :vartype state: str or + ~azure.mgmt.compute.v2018_06_01.models.ReplicationState + :ivar details: The details of the replication status. + :vartype details: str + :ivar progress: It indicates progress of the replication job. + :vartype progress: int + """ + + _validation = { + 'region': {'readonly': True}, + 'state': {'readonly': True}, + 'details': {'readonly': True}, + 'progress': {'readonly': True}, + } + + _attribute_map = { + 'region': {'key': 'region', 'type': 'str'}, + 'state': {'key': 'state', 'type': 'str'}, + 'details': {'key': 'details', 'type': 'str'}, + 'progress': {'key': 'progress', 'type': 'int'}, + } + + def __init__(self, **kwargs): + super(RegionalReplicationStatus, self).__init__(**kwargs) + self.region = None + self.state = None + self.details = None + self.progress = None + + +class ReplicationStatus(Model): + """This is the replication status of the gallery Image Version. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar aggregated_state: This is the aggregated replication status based on + all the regional replication status flags. Possible values include: + 'Unknown', 'InProgress', 'Completed', 'Failed' + :vartype aggregated_state: str or + ~azure.mgmt.compute.v2018_06_01.models.AggregatedReplicationState + :ivar summary: This is a summary of replication status for each region. + :vartype summary: + list[~azure.mgmt.compute.v2018_06_01.models.RegionalReplicationStatus] + """ + + _validation = { + 'aggregated_state': {'readonly': True}, + 'summary': {'readonly': True}, + } + + _attribute_map = { + 'aggregated_state': {'key': 'aggregatedState', 'type': 'str'}, + 'summary': {'key': 'summary', 'type': '[RegionalReplicationStatus]'}, + } + + def __init__(self, **kwargs): + super(ReplicationStatus, self).__init__(**kwargs) + self.aggregated_state = None + self.summary = None + + +class RequestRateByIntervalInput(LogAnalyticsInputBase): + """Api request input for LogAnalytics getRequestRateByInterval Api. + + All required parameters must be populated in order to send to Azure. + + :param blob_container_sas_uri: Required. SAS Uri of the logging blob + container to which LogAnalytics Api writes output logs to. + :type blob_container_sas_uri: str + :param from_time: Required. From time of the query + :type from_time: datetime + :param to_time: Required. To time of the query + :type to_time: datetime + :param group_by_throttle_policy: Group query result by Throttle Policy + applied. + :type group_by_throttle_policy: bool + :param group_by_operation_name: Group query result by Operation Name. + :type group_by_operation_name: bool + :param group_by_resource_name: Group query result by Resource Name. + :type group_by_resource_name: bool + :param interval_length: Required. Interval value in minutes used to create + LogAnalytics call rate logs. Possible values include: 'ThreeMins', + 'FiveMins', 'ThirtyMins', 'SixtyMins' + :type interval_length: str or + ~azure.mgmt.compute.v2018_06_01.models.IntervalInMins + """ + + _validation = { + 'blob_container_sas_uri': {'required': True}, + 'from_time': {'required': True}, + 'to_time': {'required': True}, + 'interval_length': {'required': True}, + } + + _attribute_map = { + 'blob_container_sas_uri': {'key': 'blobContainerSasUri', 'type': 'str'}, + 'from_time': {'key': 'fromTime', 'type': 'iso-8601'}, + 'to_time': {'key': 'toTime', 'type': 'iso-8601'}, + 'group_by_throttle_policy': {'key': 'groupByThrottlePolicy', 'type': 'bool'}, + 'group_by_operation_name': {'key': 'groupByOperationName', 'type': 'bool'}, + 'group_by_resource_name': {'key': 'groupByResourceName', 'type': 'bool'}, + 'interval_length': {'key': 'intervalLength', 'type': 'IntervalInMins'}, + } + + def __init__(self, **kwargs): + super(RequestRateByIntervalInput, self).__init__(**kwargs) + self.interval_length = kwargs.get('interval_length', None) + + +class ResourceRange(Model): + """Describes the resource range. + + :param min: The minimum number of the resource. + :type min: int + :param max: The maximum number of the resource. + :type max: int + """ + + _attribute_map = { + 'min': {'key': 'min', 'type': 'int'}, + 'max': {'key': 'max', 'type': 'int'}, + } + + def __init__(self, **kwargs): + super(ResourceRange, self).__init__(**kwargs) + self.min = kwargs.get('min', None) + self.max = kwargs.get('max', None) + + +class RollbackStatusInfo(Model): + """Information about rollback on failed VM instances after a OS Upgrade + operation. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar successfully_rolledback_instance_count: The number of instances + which have been successfully rolled back. + :vartype successfully_rolledback_instance_count: int + :ivar failed_rolledback_instance_count: The number of instances which + failed to rollback. + :vartype failed_rolledback_instance_count: int + :ivar rollback_error: Error details if OS rollback failed. + :vartype rollback_error: ~azure.mgmt.compute.v2018_06_01.models.ApiError + """ + + _validation = { + 'successfully_rolledback_instance_count': {'readonly': True}, + 'failed_rolledback_instance_count': {'readonly': True}, + 'rollback_error': {'readonly': True}, + } + + _attribute_map = { + 'successfully_rolledback_instance_count': {'key': 'successfullyRolledbackInstanceCount', 'type': 'int'}, + 'failed_rolledback_instance_count': {'key': 'failedRolledbackInstanceCount', 'type': 'int'}, + 'rollback_error': {'key': 'rollbackError', 'type': 'ApiError'}, + } + + def __init__(self, **kwargs): + super(RollbackStatusInfo, self).__init__(**kwargs) + self.successfully_rolledback_instance_count = None + self.failed_rolledback_instance_count = None + self.rollback_error = None + + +class RollingUpgradePolicy(Model): + """The configuration parameters used while performing a rolling upgrade. + + :param max_batch_instance_percent: The maximum percent of total virtual + machine instances that will be upgraded simultaneously by the rolling + upgrade in one batch. As this is a maximum, unhealthy instances in + previous or future batches can cause the percentage of instances in a + batch to decrease to ensure higher reliability. The default value for this + parameter is 20%. + :type max_batch_instance_percent: int + :param max_unhealthy_instance_percent: The maximum percentage of the total + virtual machine instances in the scale set that can be simultaneously + unhealthy, either as a result of being upgraded, or by being found in an + unhealthy state by the virtual machine health checks before the rolling + upgrade aborts. This constraint will be checked prior to starting any + batch. The default value for this parameter is 20%. + :type max_unhealthy_instance_percent: int + :param max_unhealthy_upgraded_instance_percent: The maximum percentage of + upgraded virtual machine instances that can be found to be in an unhealthy + state. This check will happen after each batch is upgraded. If this + percentage is ever exceeded, the rolling update aborts. The default value + for this parameter is 20%. + :type max_unhealthy_upgraded_instance_percent: int + :param pause_time_between_batches: The wait time between completing the + update for all virtual machines in one batch and starting the next batch. + The time duration should be specified in ISO 8601 format. The default + value is 0 seconds (PT0S). + :type pause_time_between_batches: str + """ + + _validation = { + 'max_batch_instance_percent': {'maximum': 100, 'minimum': 5}, + 'max_unhealthy_instance_percent': {'maximum': 100, 'minimum': 5}, + 'max_unhealthy_upgraded_instance_percent': {'maximum': 100, 'minimum': 0}, + } + + _attribute_map = { + 'max_batch_instance_percent': {'key': 'maxBatchInstancePercent', 'type': 'int'}, + 'max_unhealthy_instance_percent': {'key': 'maxUnhealthyInstancePercent', 'type': 'int'}, + 'max_unhealthy_upgraded_instance_percent': {'key': 'maxUnhealthyUpgradedInstancePercent', 'type': 'int'}, + 'pause_time_between_batches': {'key': 'pauseTimeBetweenBatches', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(RollingUpgradePolicy, self).__init__(**kwargs) + self.max_batch_instance_percent = kwargs.get('max_batch_instance_percent', None) + self.max_unhealthy_instance_percent = kwargs.get('max_unhealthy_instance_percent', None) + self.max_unhealthy_upgraded_instance_percent = kwargs.get('max_unhealthy_upgraded_instance_percent', None) + self.pause_time_between_batches = kwargs.get('pause_time_between_batches', None) + + +class RollingUpgradeProgressInfo(Model): + """Information about the number of virtual machine instances in each upgrade + state. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar successful_instance_count: The number of instances that have been + successfully upgraded. + :vartype successful_instance_count: int + :ivar failed_instance_count: The number of instances that have failed to + be upgraded successfully. + :vartype failed_instance_count: int + :ivar in_progress_instance_count: The number of instances that are + currently being upgraded. + :vartype in_progress_instance_count: int + :ivar pending_instance_count: The number of instances that have not yet + begun to be upgraded. + :vartype pending_instance_count: int + """ + + _validation = { + 'successful_instance_count': {'readonly': True}, + 'failed_instance_count': {'readonly': True}, + 'in_progress_instance_count': {'readonly': True}, + 'pending_instance_count': {'readonly': True}, + } + + _attribute_map = { + 'successful_instance_count': {'key': 'successfulInstanceCount', 'type': 'int'}, + 'failed_instance_count': {'key': 'failedInstanceCount', 'type': 'int'}, + 'in_progress_instance_count': {'key': 'inProgressInstanceCount', 'type': 'int'}, + 'pending_instance_count': {'key': 'pendingInstanceCount', 'type': 'int'}, + } + + def __init__(self, **kwargs): + super(RollingUpgradeProgressInfo, self).__init__(**kwargs) + self.successful_instance_count = None + self.failed_instance_count = None + self.in_progress_instance_count = None + self.pending_instance_count = None + + +class RollingUpgradeRunningStatus(Model): + """Information about the current running state of the overall upgrade. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar code: Code indicating the current status of the upgrade. Possible + values include: 'RollingForward', 'Cancelled', 'Completed', 'Faulted' + :vartype code: str or + ~azure.mgmt.compute.v2018_06_01.models.RollingUpgradeStatusCode + :ivar start_time: Start time of the upgrade. + :vartype start_time: datetime + :ivar last_action: The last action performed on the rolling upgrade. + Possible values include: 'Start', 'Cancel' + :vartype last_action: str or + ~azure.mgmt.compute.v2018_06_01.models.RollingUpgradeActionType + :ivar last_action_time: Last action time of the upgrade. + :vartype last_action_time: datetime + """ + + _validation = { + 'code': {'readonly': True}, + 'start_time': {'readonly': True}, + 'last_action': {'readonly': True}, + 'last_action_time': {'readonly': True}, + } + + _attribute_map = { + 'code': {'key': 'code', 'type': 'RollingUpgradeStatusCode'}, + 'start_time': {'key': 'startTime', 'type': 'iso-8601'}, + 'last_action': {'key': 'lastAction', 'type': 'RollingUpgradeActionType'}, + 'last_action_time': {'key': 'lastActionTime', 'type': 'iso-8601'}, + } + + def __init__(self, **kwargs): + super(RollingUpgradeRunningStatus, self).__init__(**kwargs) + self.code = None + self.start_time = None + self.last_action = None + self.last_action_time = None + + +class RollingUpgradeStatusInfo(Resource): + """The status of the latest virtual machine scale set rolling upgrade. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource Id + :vartype id: str + :ivar name: Resource name + :vartype name: str + :ivar type: Resource type + :vartype type: str + :param location: Required. Resource location + :type location: str + :param tags: Resource tags + :type tags: dict[str, str] + :ivar policy: The rolling upgrade policies applied for this upgrade. + :vartype policy: + ~azure.mgmt.compute.v2018_06_01.models.RollingUpgradePolicy + :ivar running_status: Information about the current running state of the + overall upgrade. + :vartype running_status: + ~azure.mgmt.compute.v2018_06_01.models.RollingUpgradeRunningStatus + :ivar progress: Information about the number of virtual machine instances + in each upgrade state. + :vartype progress: + ~azure.mgmt.compute.v2018_06_01.models.RollingUpgradeProgressInfo + :ivar error: Error details for this upgrade, if there are any. + :vartype error: ~azure.mgmt.compute.v2018_06_01.models.ApiError + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + 'policy': {'readonly': True}, + 'running_status': {'readonly': True}, + 'progress': {'readonly': True}, + 'error': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'policy': {'key': 'properties.policy', 'type': 'RollingUpgradePolicy'}, + 'running_status': {'key': 'properties.runningStatus', 'type': 'RollingUpgradeRunningStatus'}, + 'progress': {'key': 'properties.progress', 'type': 'RollingUpgradeProgressInfo'}, + 'error': {'key': 'properties.error', 'type': 'ApiError'}, + } + + def __init__(self, **kwargs): + super(RollingUpgradeStatusInfo, self).__init__(**kwargs) + self.policy = None + self.running_status = None + self.progress = None + self.error = None + + +class RunCommandDocumentBase(Model): + """Describes the properties of a Run Command metadata. + + All required parameters must be populated in order to send to Azure. + + :param schema: Required. The VM run command schema. + :type schema: str + :param id: Required. The VM run command id. + :type id: str + :param os_type: Required. The Operating System type. Possible values + include: 'Windows', 'Linux' + :type os_type: str or + ~azure.mgmt.compute.v2018_06_01.models.OperatingSystemTypes + :param label: Required. The VM run command label. + :type label: str + :param description: Required. The VM run command description. + :type description: str + """ + + _validation = { + 'schema': {'required': True}, + 'id': {'required': True}, + 'os_type': {'required': True}, + 'label': {'required': True}, + 'description': {'required': True}, + } + + _attribute_map = { + 'schema': {'key': '$schema', 'type': 'str'}, + 'id': {'key': 'id', 'type': 'str'}, + 'os_type': {'key': 'osType', 'type': 'OperatingSystemTypes'}, + 'label': {'key': 'label', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(RunCommandDocumentBase, self).__init__(**kwargs) + self.schema = kwargs.get('schema', None) + self.id = kwargs.get('id', None) + self.os_type = kwargs.get('os_type', None) + self.label = kwargs.get('label', None) + self.description = kwargs.get('description', None) + + +class RunCommandDocument(RunCommandDocumentBase): + """Describes the properties of a Run Command. + + All required parameters must be populated in order to send to Azure. + + :param schema: Required. The VM run command schema. + :type schema: str + :param id: Required. The VM run command id. + :type id: str + :param os_type: Required. The Operating System type. Possible values + include: 'Windows', 'Linux' + :type os_type: str or + ~azure.mgmt.compute.v2018_06_01.models.OperatingSystemTypes + :param label: Required. The VM run command label. + :type label: str + :param description: Required. The VM run command description. + :type description: str + :param script: Required. The script to be executed. + :type script: list[str] + :param parameters: The parameters used by the script. + :type parameters: + list[~azure.mgmt.compute.v2018_06_01.models.RunCommandParameterDefinition] + """ + + _validation = { + 'schema': {'required': True}, + 'id': {'required': True}, + 'os_type': {'required': True}, + 'label': {'required': True}, + 'description': {'required': True}, + 'script': {'required': True}, + } + + _attribute_map = { + 'schema': {'key': '$schema', 'type': 'str'}, + 'id': {'key': 'id', 'type': 'str'}, + 'os_type': {'key': 'osType', 'type': 'OperatingSystemTypes'}, + 'label': {'key': 'label', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + 'script': {'key': 'script', 'type': '[str]'}, + 'parameters': {'key': 'parameters', 'type': '[RunCommandParameterDefinition]'}, + } + + def __init__(self, **kwargs): + super(RunCommandDocument, self).__init__(**kwargs) + self.script = kwargs.get('script', None) + self.parameters = kwargs.get('parameters', None) + + +class RunCommandInput(Model): + """Capture Virtual Machine parameters. + + All required parameters must be populated in order to send to Azure. + + :param command_id: Required. The run command id. + :type command_id: str + :param script: Optional. The script to be executed. When this value is + given, the given script will override the default script of the command. + :type script: list[str] + :param parameters: The run command parameters. + :type parameters: + list[~azure.mgmt.compute.v2018_06_01.models.RunCommandInputParameter] + """ + + _validation = { + 'command_id': {'required': True}, + } + + _attribute_map = { + 'command_id': {'key': 'commandId', 'type': 'str'}, + 'script': {'key': 'script', 'type': '[str]'}, + 'parameters': {'key': 'parameters', 'type': '[RunCommandInputParameter]'}, + } + + def __init__(self, **kwargs): + super(RunCommandInput, self).__init__(**kwargs) + self.command_id = kwargs.get('command_id', None) + self.script = kwargs.get('script', None) + self.parameters = kwargs.get('parameters', None) + + +class RunCommandInputParameter(Model): + """Describes the properties of a run command parameter. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. The run command parameter name. + :type name: str + :param value: Required. The run command parameter value. + :type value: str + """ + + _validation = { + 'name': {'required': True}, + 'value': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'value': {'key': 'value', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(RunCommandInputParameter, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.value = kwargs.get('value', None) + + +class RunCommandParameterDefinition(Model): + """Describes the properties of a run command parameter. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. The run command parameter name. + :type name: str + :param type: Required. The run command parameter type. + :type type: str + :param default_value: The run command parameter default value. + :type default_value: str + :param required: The run command parameter required. Default value: False + . + :type required: bool + """ + + _validation = { + 'name': {'required': True}, + 'type': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'default_value': {'key': 'defaultValue', 'type': 'str'}, + 'required': {'key': 'required', 'type': 'bool'}, + } + + def __init__(self, **kwargs): + super(RunCommandParameterDefinition, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.type = kwargs.get('type', None) + self.default_value = kwargs.get('default_value', None) + self.required = kwargs.get('required', False) + + +class RunCommandResult(Model): + """RunCommandResult. + + :param value: Run command operation response. + :type value: + list[~azure.mgmt.compute.v2018_06_01.models.InstanceViewStatus] + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[InstanceViewStatus]'}, + } + + def __init__(self, **kwargs): + super(RunCommandResult, self).__init__(**kwargs) + self.value = kwargs.get('value', None) + + +class Sku(Model): + """Describes a virtual machine scale set sku. + + :param name: The sku name. + :type name: str + :param tier: Specifies the tier of virtual machines in a scale set.

    Possible Values:

    **Standard**

    **Basic** + :type tier: str + :param capacity: Specifies the number of virtual machines in the scale + set. + :type capacity: long + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'tier': {'key': 'tier', 'type': 'str'}, + 'capacity': {'key': 'capacity', 'type': 'long'}, + } + + def __init__(self, **kwargs): + super(Sku, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.tier = kwargs.get('tier', None) + self.capacity = kwargs.get('capacity', None) + + +class Snapshot(Resource): + """Snapshot resource. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource Id + :vartype id: str + :ivar name: Resource name + :vartype name: str + :ivar type: Resource type + :vartype type: str + :param location: Required. Resource location + :type location: str + :param tags: Resource tags + :type tags: dict[str, str] + :ivar managed_by: Unused. Always Null. + :vartype managed_by: str + :param sku: + :type sku: ~azure.mgmt.compute.v2018_06_01.models.SnapshotSku + :ivar time_created: The time when the disk was created. + :vartype time_created: datetime + :param os_type: The Operating System type. Possible values include: + 'Windows', 'Linux' + :type os_type: str or + ~azure.mgmt.compute.v2018_06_01.models.OperatingSystemTypes + :param creation_data: Required. Disk source information. CreationData + information cannot be changed after the disk has been created. + :type creation_data: ~azure.mgmt.compute.v2018_06_01.models.CreationData + :param disk_size_gb: If creationData.createOption is Empty, this field is + mandatory and it indicates the size of the VHD to create. If this field is + present for updates or creation with other options, it indicates a resize. + Resizes are only allowed if the disk is not attached to a running VM, and + can only increase the disk's size. + :type disk_size_gb: int + :param encryption_settings: Encryption settings for disk or snapshot + :type encryption_settings: + ~azure.mgmt.compute.v2018_06_01.models.EncryptionSettings + :ivar provisioning_state: The disk provisioning state. + :vartype provisioning_state: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + 'managed_by': {'readonly': True}, + 'time_created': {'readonly': True}, + 'creation_data': {'required': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'managed_by': {'key': 'managedBy', 'type': 'str'}, + 'sku': {'key': 'sku', 'type': 'SnapshotSku'}, + 'time_created': {'key': 'properties.timeCreated', 'type': 'iso-8601'}, + 'os_type': {'key': 'properties.osType', 'type': 'OperatingSystemTypes'}, + 'creation_data': {'key': 'properties.creationData', 'type': 'CreationData'}, + 'disk_size_gb': {'key': 'properties.diskSizeGB', 'type': 'int'}, + 'encryption_settings': {'key': 'properties.encryptionSettings', 'type': 'EncryptionSettings'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(Snapshot, self).__init__(**kwargs) + self.managed_by = None + self.sku = kwargs.get('sku', None) + self.time_created = None + self.os_type = kwargs.get('os_type', None) + self.creation_data = kwargs.get('creation_data', None) + self.disk_size_gb = kwargs.get('disk_size_gb', None) + self.encryption_settings = kwargs.get('encryption_settings', None) + self.provisioning_state = None + + +class SnapshotSku(Model): + """The snapshots sku name. Can be Standard_LRS, Premium_LRS, or Standard_ZRS. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :param name: The sku name. Possible values include: 'Standard_LRS', + 'Premium_LRS', 'Standard_ZRS' + :type name: str or + ~azure.mgmt.compute.v2018_06_01.models.SnapshotStorageAccountTypes + :ivar tier: The sku tier. Default value: "Standard" . + :vartype tier: str + """ + + _validation = { + 'tier': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'tier': {'key': 'tier', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(SnapshotSku, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.tier = None + + +class SnapshotUpdate(Model): + """Snapshot update resource. + + :param os_type: the Operating System type. Possible values include: + 'Windows', 'Linux' + :type os_type: str or + ~azure.mgmt.compute.v2018_06_01.models.OperatingSystemTypes + :param disk_size_gb: If creationData.createOption is Empty, this field is + mandatory and it indicates the size of the VHD to create. If this field is + present for updates or creation with other options, it indicates a resize. + Resizes are only allowed if the disk is not attached to a running VM, and + can only increase the disk's size. + :type disk_size_gb: int + :param encryption_settings: Encryption settings for disk or snapshot + :type encryption_settings: + ~azure.mgmt.compute.v2018_06_01.models.EncryptionSettings + :param tags: Resource tags + :type tags: dict[str, str] + :param sku: + :type sku: ~azure.mgmt.compute.v2018_06_01.models.SnapshotSku + """ + + _attribute_map = { + 'os_type': {'key': 'properties.osType', 'type': 'OperatingSystemTypes'}, + 'disk_size_gb': {'key': 'properties.diskSizeGB', 'type': 'int'}, + 'encryption_settings': {'key': 'properties.encryptionSettings', 'type': 'EncryptionSettings'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'sku': {'key': 'sku', 'type': 'SnapshotSku'}, + } + + def __init__(self, **kwargs): + super(SnapshotUpdate, self).__init__(**kwargs) + self.os_type = kwargs.get('os_type', None) + self.disk_size_gb = kwargs.get('disk_size_gb', None) + self.encryption_settings = kwargs.get('encryption_settings', None) + self.tags = kwargs.get('tags', None) + self.sku = kwargs.get('sku', None) + + +class SourceVault(Model): + """The vault id is an Azure Resource Manager Resource id in the form + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.KeyVault/vaults/{vaultName}. + + :param id: Resource Id + :type id: str + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(SourceVault, self).__init__(**kwargs) + self.id = kwargs.get('id', None) + + +class SshConfiguration(Model): + """SSH configuration for Linux based VMs running on Azure. + + :param public_keys: The list of SSH public keys used to authenticate with + linux based VMs. + :type public_keys: + list[~azure.mgmt.compute.v2018_06_01.models.SshPublicKey] + """ + + _attribute_map = { + 'public_keys': {'key': 'publicKeys', 'type': '[SshPublicKey]'}, + } + + def __init__(self, **kwargs): + super(SshConfiguration, self).__init__(**kwargs) + self.public_keys = kwargs.get('public_keys', None) + + +class SshPublicKey(Model): + """Contains information about SSH certificate public key and the path on the + Linux VM where the public key is placed. + + :param path: Specifies the full path on the created VM where ssh public + key is stored. If the file already exists, the specified key is appended + to the file. Example: /home/user/.ssh/authorized_keys + :type path: str + :param key_data: SSH public key certificate used to authenticate with the + VM through ssh. The key needs to be at least 2048-bit and in ssh-rsa + format.

    For creating ssh keys, see [Create SSH keys on Linux and + Mac for Linux VMs in + Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-mac-create-ssh-keys?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json). + :type key_data: str + """ + + _attribute_map = { + 'path': {'key': 'path', 'type': 'str'}, + 'key_data': {'key': 'keyData', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(SshPublicKey, self).__init__(**kwargs) + self.path = kwargs.get('path', None) + self.key_data = kwargs.get('key_data', None) + + +class StorageProfile(Model): + """Specifies the storage settings for the virtual machine disks. + + :param image_reference: Specifies information about the image to use. You + can specify information about platform images, marketplace images, or + virtual machine images. This element is required when you want to use a + platform image, marketplace image, or virtual machine image, but is not + used in other creation operations. + :type image_reference: + ~azure.mgmt.compute.v2018_06_01.models.ImageReference + :param os_disk: Specifies information about the operating system disk used + by the virtual machine.

    For more information about disks, see + [About disks and VHDs for Azure virtual + machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-about-disks-vhds?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). + :type os_disk: ~azure.mgmt.compute.v2018_06_01.models.OSDisk + :param data_disks: Specifies the parameters that are used to add a data + disk to a virtual machine.

    For more information about disks, see + [About disks and VHDs for Azure virtual + machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-about-disks-vhds?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). + :type data_disks: list[~azure.mgmt.compute.v2018_06_01.models.DataDisk] + """ + + _attribute_map = { + 'image_reference': {'key': 'imageReference', 'type': 'ImageReference'}, + 'os_disk': {'key': 'osDisk', 'type': 'OSDisk'}, + 'data_disks': {'key': 'dataDisks', 'type': '[DataDisk]'}, + } + + def __init__(self, **kwargs): + super(StorageProfile, self).__init__(**kwargs) + self.image_reference = kwargs.get('image_reference', None) + self.os_disk = kwargs.get('os_disk', None) + self.data_disks = kwargs.get('data_disks', None) + + +class SubResourceReadOnly(Model): + """SubResourceReadOnly. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource Id + :vartype id: str + """ + + _validation = { + 'id': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(SubResourceReadOnly, self).__init__(**kwargs) + self.id = None + + +class TargetRegion(Model): + """Describes the target region information. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. The name of the region. + :type name: str + :param regional_replica_count: The number of replicas of the Image Version + to be created per region. This property is updatable. + :type regional_replica_count: int + """ + + _validation = { + 'name': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'regional_replica_count': {'key': 'regionalReplicaCount', 'type': 'int'}, + } + + def __init__(self, **kwargs): + super(TargetRegion, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.regional_replica_count = kwargs.get('regional_replica_count', None) + + +class ThrottledRequestsInput(LogAnalyticsInputBase): + """Api request input for LogAnalytics getThrottledRequests Api. + + All required parameters must be populated in order to send to Azure. + + :param blob_container_sas_uri: Required. SAS Uri of the logging blob + container to which LogAnalytics Api writes output logs to. + :type blob_container_sas_uri: str + :param from_time: Required. From time of the query + :type from_time: datetime + :param to_time: Required. To time of the query + :type to_time: datetime + :param group_by_throttle_policy: Group query result by Throttle Policy + applied. + :type group_by_throttle_policy: bool + :param group_by_operation_name: Group query result by Operation Name. + :type group_by_operation_name: bool + :param group_by_resource_name: Group query result by Resource Name. + :type group_by_resource_name: bool + """ + + _validation = { + 'blob_container_sas_uri': {'required': True}, + 'from_time': {'required': True}, + 'to_time': {'required': True}, + } + + _attribute_map = { + 'blob_container_sas_uri': {'key': 'blobContainerSasUri', 'type': 'str'}, + 'from_time': {'key': 'fromTime', 'type': 'iso-8601'}, + 'to_time': {'key': 'toTime', 'type': 'iso-8601'}, + 'group_by_throttle_policy': {'key': 'groupByThrottlePolicy', 'type': 'bool'}, + 'group_by_operation_name': {'key': 'groupByOperationName', 'type': 'bool'}, + 'group_by_resource_name': {'key': 'groupByResourceName', 'type': 'bool'}, + } + + def __init__(self, **kwargs): + super(ThrottledRequestsInput, self).__init__(**kwargs) + + +class UpgradeOperationHistoricalStatusInfo(Model): + """Virtual Machine Scale Set OS Upgrade History operation response. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar properties: Information about the properties of the upgrade + operation. + :vartype properties: + ~azure.mgmt.compute.v2018_06_01.models.UpgradeOperationHistoricalStatusInfoProperties + :ivar type: Resource type + :vartype type: str + :ivar location: Resource location + :vartype location: str + """ + + _validation = { + 'properties': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'readonly': True}, + } + + _attribute_map = { + 'properties': {'key': 'properties', 'type': 'UpgradeOperationHistoricalStatusInfoProperties'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(UpgradeOperationHistoricalStatusInfo, self).__init__(**kwargs) + self.properties = None + self.type = None + self.location = None + + +class UpgradeOperationHistoricalStatusInfoProperties(Model): + """Describes each OS upgrade on the Virtual Machine Scale Set. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar running_status: Information about the overall status of the upgrade + operation. + :vartype running_status: + ~azure.mgmt.compute.v2018_06_01.models.UpgradeOperationHistoryStatus + :ivar progress: Counts of the VMs in each state. + :vartype progress: + ~azure.mgmt.compute.v2018_06_01.models.RollingUpgradeProgressInfo + :ivar error: Error Details for this upgrade if there are any. + :vartype error: ~azure.mgmt.compute.v2018_06_01.models.ApiError + :ivar started_by: Invoker of the Upgrade Operation. Possible values + include: 'Unknown', 'User', 'Platform' + :vartype started_by: str or + ~azure.mgmt.compute.v2018_06_01.models.UpgradeOperationInvoker + :ivar target_image_reference: Image Reference details + :vartype target_image_reference: + ~azure.mgmt.compute.v2018_06_01.models.ImageReference + :ivar rollback_info: Information about OS rollback if performed + :vartype rollback_info: + ~azure.mgmt.compute.v2018_06_01.models.RollbackStatusInfo + """ + + _validation = { + 'running_status': {'readonly': True}, + 'progress': {'readonly': True}, + 'error': {'readonly': True}, + 'started_by': {'readonly': True}, + 'target_image_reference': {'readonly': True}, + 'rollback_info': {'readonly': True}, + } + + _attribute_map = { + 'running_status': {'key': 'runningStatus', 'type': 'UpgradeOperationHistoryStatus'}, + 'progress': {'key': 'progress', 'type': 'RollingUpgradeProgressInfo'}, + 'error': {'key': 'error', 'type': 'ApiError'}, + 'started_by': {'key': 'startedBy', 'type': 'UpgradeOperationInvoker'}, + 'target_image_reference': {'key': 'targetImageReference', 'type': 'ImageReference'}, + 'rollback_info': {'key': 'rollbackInfo', 'type': 'RollbackStatusInfo'}, + } + + def __init__(self, **kwargs): + super(UpgradeOperationHistoricalStatusInfoProperties, self).__init__(**kwargs) + self.running_status = None + self.progress = None + self.error = None + self.started_by = None + self.target_image_reference = None + self.rollback_info = None + + +class UpgradeOperationHistoryStatus(Model): + """Information about the current running state of the overall upgrade. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar code: Code indicating the current status of the upgrade. Possible + values include: 'RollingForward', 'Cancelled', 'Completed', 'Faulted' + :vartype code: str or ~azure.mgmt.compute.v2018_06_01.models.UpgradeState + :ivar start_time: Start time of the upgrade. + :vartype start_time: datetime + :ivar end_time: End time of the upgrade. + :vartype end_time: datetime + """ + + _validation = { + 'code': {'readonly': True}, + 'start_time': {'readonly': True}, + 'end_time': {'readonly': True}, + } + + _attribute_map = { + 'code': {'key': 'code', 'type': 'UpgradeState'}, + 'start_time': {'key': 'startTime', 'type': 'iso-8601'}, + 'end_time': {'key': 'endTime', 'type': 'iso-8601'}, + } + + def __init__(self, **kwargs): + super(UpgradeOperationHistoryStatus, self).__init__(**kwargs) + self.code = None + self.start_time = None + self.end_time = None + + +class UpgradePolicy(Model): + """Describes an upgrade policy - automatic, manual, or rolling. + + :param mode: Specifies the mode of an upgrade to virtual machines in the + scale set.

    Possible values are:

    **Manual** - You + control the application of updates to virtual machines in the scale set. + You do this by using the manualUpgrade action.

    **Automatic** - + All virtual machines in the scale set are automatically updated at the + same time. Possible values include: 'Automatic', 'Manual', 'Rolling' + :type mode: str or ~azure.mgmt.compute.v2018_06_01.models.UpgradeMode + :param rolling_upgrade_policy: The configuration parameters used while + performing a rolling upgrade. + :type rolling_upgrade_policy: + ~azure.mgmt.compute.v2018_06_01.models.RollingUpgradePolicy + :param automatic_os_upgrade: Whether OS upgrades should automatically be + applied to scale set instances in a rolling fashion when a newer version + of the image becomes available. + :type automatic_os_upgrade: bool + :param auto_os_upgrade_policy: Configuration parameters used for + performing automatic OS Upgrade. + :type auto_os_upgrade_policy: + ~azure.mgmt.compute.v2018_06_01.models.AutoOSUpgradePolicy + """ + + _attribute_map = { + 'mode': {'key': 'mode', 'type': 'UpgradeMode'}, + 'rolling_upgrade_policy': {'key': 'rollingUpgradePolicy', 'type': 'RollingUpgradePolicy'}, + 'automatic_os_upgrade': {'key': 'automaticOSUpgrade', 'type': 'bool'}, + 'auto_os_upgrade_policy': {'key': 'autoOSUpgradePolicy', 'type': 'AutoOSUpgradePolicy'}, + } + + def __init__(self, **kwargs): + super(UpgradePolicy, self).__init__(**kwargs) + self.mode = kwargs.get('mode', None) + self.rolling_upgrade_policy = kwargs.get('rolling_upgrade_policy', None) + self.automatic_os_upgrade = kwargs.get('automatic_os_upgrade', None) + self.auto_os_upgrade_policy = kwargs.get('auto_os_upgrade_policy', None) + + +class Usage(Model): + """Describes Compute Resource Usage. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar unit: Required. An enum describing the unit of usage measurement. + Default value: "Count" . + :vartype unit: str + :param current_value: Required. The current usage of the resource. + :type current_value: int + :param limit: Required. The maximum permitted usage of the resource. + :type limit: long + :param name: Required. The name of the type of usage. + :type name: ~azure.mgmt.compute.v2018_06_01.models.UsageName + """ + + _validation = { + 'unit': {'required': True, 'constant': True}, + 'current_value': {'required': True}, + 'limit': {'required': True}, + 'name': {'required': True}, + } + + _attribute_map = { + 'unit': {'key': 'unit', 'type': 'str'}, + 'current_value': {'key': 'currentValue', 'type': 'int'}, + 'limit': {'key': 'limit', 'type': 'long'}, + 'name': {'key': 'name', 'type': 'UsageName'}, + } + + unit = "Count" + + def __init__(self, **kwargs): + super(Usage, self).__init__(**kwargs) + self.current_value = kwargs.get('current_value', None) + self.limit = kwargs.get('limit', None) + self.name = kwargs.get('name', None) + + +class UsageName(Model): + """The Usage Names. + + :param value: The name of the resource. + :type value: str + :param localized_value: The localized name of the resource. + :type localized_value: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': 'str'}, + 'localized_value': {'key': 'localizedValue', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(UsageName, self).__init__(**kwargs) + self.value = kwargs.get('value', None) + self.localized_value = kwargs.get('localized_value', None) + + +class VaultCertificate(Model): + """Describes a single certificate reference in a Key Vault, and where the + certificate should reside on the VM. + + :param certificate_url: This is the URL of a certificate that has been + uploaded to Key Vault as a secret. For adding a secret to the Key Vault, + see [Add a key or secret to the key + vault](https://docs.microsoft.com/azure/key-vault/key-vault-get-started/#add). + In this case, your certificate needs to be It is the Base64 encoding of + the following JSON Object which is encoded in UTF-8:

    {
    + "data":"",
    "dataType":"pfx",
    + "password":""
    } + :type certificate_url: str + :param certificate_store: For Windows VMs, specifies the certificate store + on the Virtual Machine to which the certificate should be added. The + specified certificate store is implicitly in the LocalMachine account. +

    For Linux VMs, the certificate file is placed under the + /var/lib/waagent directory, with the file name + <UppercaseThumbprint>.crt for the X509 certificate file and + <UppercaseThumbprint>.prv for private key. Both of these files are + .pem formatted. + :type certificate_store: str + """ + + _attribute_map = { + 'certificate_url': {'key': 'certificateUrl', 'type': 'str'}, + 'certificate_store': {'key': 'certificateStore', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(VaultCertificate, self).__init__(**kwargs) + self.certificate_url = kwargs.get('certificate_url', None) + self.certificate_store = kwargs.get('certificate_store', None) + + +class VaultSecretGroup(Model): + """Describes a set of certificates which are all in the same Key Vault. + + :param source_vault: The relative URL of the Key Vault containing all of + the certificates in VaultCertificates. + :type source_vault: ~azure.mgmt.compute.v2018_06_01.models.SubResource + :param vault_certificates: The list of key vault references in SourceVault + which contain certificates. + :type vault_certificates: + list[~azure.mgmt.compute.v2018_06_01.models.VaultCertificate] + """ + + _attribute_map = { + 'source_vault': {'key': 'sourceVault', 'type': 'SubResource'}, + 'vault_certificates': {'key': 'vaultCertificates', 'type': '[VaultCertificate]'}, + } + + def __init__(self, **kwargs): + super(VaultSecretGroup, self).__init__(**kwargs) + self.source_vault = kwargs.get('source_vault', None) + self.vault_certificates = kwargs.get('vault_certificates', None) + + +class VirtualHardDisk(Model): + """Describes the uri of a disk. + + :param uri: Specifies the virtual hard disk's uri. + :type uri: str + """ + + _attribute_map = { + 'uri': {'key': 'uri', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(VirtualHardDisk, self).__init__(**kwargs) + self.uri = kwargs.get('uri', None) + + +class VirtualMachine(Resource): + """Describes a Virtual Machine. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource Id + :vartype id: str + :ivar name: Resource name + :vartype name: str + :ivar type: Resource type + :vartype type: str + :param location: Required. Resource location + :type location: str + :param tags: Resource tags + :type tags: dict[str, str] + :param plan: Specifies information about the marketplace image used to + create the virtual machine. This element is only used for marketplace + images. Before you can use a marketplace image from an API, you must + enable the image for programmatic use. In the Azure portal, find the + marketplace image that you want to use and then click **Want to deploy + programmatically, Get Started ->**. Enter any required information and + then click **Save**. + :type plan: ~azure.mgmt.compute.v2018_06_01.models.Plan + :param hardware_profile: Specifies the hardware settings for the virtual + machine. + :type hardware_profile: + ~azure.mgmt.compute.v2018_06_01.models.HardwareProfile + :param storage_profile: Specifies the storage settings for the virtual + machine disks. + :type storage_profile: + ~azure.mgmt.compute.v2018_06_01.models.StorageProfile + :param additional_capabilities: Specifies additional capabilities enabled + or disabled on the virtual machine. + :type additional_capabilities: + ~azure.mgmt.compute.v2018_06_01.models.AdditionalCapabilities + :param os_profile: Specifies the operating system settings for the virtual + machine. + :type os_profile: ~azure.mgmt.compute.v2018_06_01.models.OSProfile + :param network_profile: Specifies the network interfaces of the virtual + machine. + :type network_profile: + ~azure.mgmt.compute.v2018_06_01.models.NetworkProfile + :param diagnostics_profile: Specifies the boot diagnostic settings state. +

    Minimum api-version: 2015-06-15. + :type diagnostics_profile: + ~azure.mgmt.compute.v2018_06_01.models.DiagnosticsProfile + :param availability_set: Specifies information about the availability set + that the virtual machine should be assigned to. Virtual machines specified + in the same availability set are allocated to different nodes to maximize + availability. For more information about availability sets, see [Manage + the availability of virtual + machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-manage-availability?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). +

    For more information on Azure planned maintenance, see [Planned + maintenance for virtual machines in + Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-planned-maintenance?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json) +

    Currently, a VM can only be added to availability set at creation + time. An existing VM cannot be added to an availability set. + :type availability_set: ~azure.mgmt.compute.v2018_06_01.models.SubResource + :param proximity_placement_group: Specifies information about the + proximity placement group that the virtual machine should be assigned to. +

    Minimum api-version: 2018-04-01. + :type proximity_placement_group: + ~azure.mgmt.compute.v2018_06_01.models.SubResource + :ivar provisioning_state: The provisioning state, which only appears in + the response. + :vartype provisioning_state: str + :ivar instance_view: The virtual machine instance view. + :vartype instance_view: + ~azure.mgmt.compute.v2018_06_01.models.VirtualMachineInstanceView + :param license_type: Specifies that the image or disk that is being used + was licensed on-premises. This element is only used for images that + contain the Windows Server operating system.

    Possible values are: +

    Windows_Client

    Windows_Server

    If this element + is included in a request for an update, the value must match the initial + value. This value cannot be updated.

    For more information, see + [Azure Hybrid Use Benefit for Windows + Server](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-hybrid-use-benefit-licensing?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json) +

    Minimum api-version: 2015-06-15 + :type license_type: str + :ivar vm_id: Specifies the VM unique ID which is a 128-bits identifier + that is encoded and stored in all Azure IaaS VMs SMBIOS and can be read + using platform BIOS commands. + :vartype vm_id: str + :ivar resources: The virtual machine child extension resources. + :vartype resources: + list[~azure.mgmt.compute.v2018_06_01.models.VirtualMachineExtension] + :param identity: The identity of the virtual machine, if configured. + :type identity: + ~azure.mgmt.compute.v2018_06_01.models.VirtualMachineIdentity + :param zones: The virtual machine zones. + :type zones: list[str] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + 'provisioning_state': {'readonly': True}, + 'instance_view': {'readonly': True}, + 'vm_id': {'readonly': True}, + 'resources': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'plan': {'key': 'plan', 'type': 'Plan'}, + 'hardware_profile': {'key': 'properties.hardwareProfile', 'type': 'HardwareProfile'}, + 'storage_profile': {'key': 'properties.storageProfile', 'type': 'StorageProfile'}, + 'additional_capabilities': {'key': 'properties.additionalCapabilities', 'type': 'AdditionalCapabilities'}, + 'os_profile': {'key': 'properties.osProfile', 'type': 'OSProfile'}, + 'network_profile': {'key': 'properties.networkProfile', 'type': 'NetworkProfile'}, + 'diagnostics_profile': {'key': 'properties.diagnosticsProfile', 'type': 'DiagnosticsProfile'}, + 'availability_set': {'key': 'properties.availabilitySet', 'type': 'SubResource'}, + 'proximity_placement_group': {'key': 'properties.proximityPlacementGroup', 'type': 'SubResource'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'instance_view': {'key': 'properties.instanceView', 'type': 'VirtualMachineInstanceView'}, + 'license_type': {'key': 'properties.licenseType', 'type': 'str'}, + 'vm_id': {'key': 'properties.vmId', 'type': 'str'}, + 'resources': {'key': 'resources', 'type': '[VirtualMachineExtension]'}, + 'identity': {'key': 'identity', 'type': 'VirtualMachineIdentity'}, + 'zones': {'key': 'zones', 'type': '[str]'}, + } + + def __init__(self, **kwargs): + super(VirtualMachine, self).__init__(**kwargs) + self.plan = kwargs.get('plan', None) + self.hardware_profile = kwargs.get('hardware_profile', None) + self.storage_profile = kwargs.get('storage_profile', None) + self.additional_capabilities = kwargs.get('additional_capabilities', None) + self.os_profile = kwargs.get('os_profile', None) + self.network_profile = kwargs.get('network_profile', None) + self.diagnostics_profile = kwargs.get('diagnostics_profile', None) + self.availability_set = kwargs.get('availability_set', None) + self.proximity_placement_group = kwargs.get('proximity_placement_group', None) + self.provisioning_state = None + self.instance_view = None + self.license_type = kwargs.get('license_type', None) + self.vm_id = None + self.resources = None + self.identity = kwargs.get('identity', None) + self.zones = kwargs.get('zones', None) + + +class VirtualMachineAgentInstanceView(Model): + """The instance view of the VM Agent running on the virtual machine. + + :param vm_agent_version: The VM Agent full version. + :type vm_agent_version: str + :param extension_handlers: The virtual machine extension handler instance + view. + :type extension_handlers: + list[~azure.mgmt.compute.v2018_06_01.models.VirtualMachineExtensionHandlerInstanceView] + :param statuses: The resource status information. + :type statuses: + list[~azure.mgmt.compute.v2018_06_01.models.InstanceViewStatus] + """ + + _attribute_map = { + 'vm_agent_version': {'key': 'vmAgentVersion', 'type': 'str'}, + 'extension_handlers': {'key': 'extensionHandlers', 'type': '[VirtualMachineExtensionHandlerInstanceView]'}, + 'statuses': {'key': 'statuses', 'type': '[InstanceViewStatus]'}, + } + + def __init__(self, **kwargs): + super(VirtualMachineAgentInstanceView, self).__init__(**kwargs) + self.vm_agent_version = kwargs.get('vm_agent_version', None) + self.extension_handlers = kwargs.get('extension_handlers', None) + self.statuses = kwargs.get('statuses', None) + + +class VirtualMachineCaptureParameters(Model): + """Capture Virtual Machine parameters. + + All required parameters must be populated in order to send to Azure. + + :param vhd_prefix: Required. The captured virtual hard disk's name prefix. + :type vhd_prefix: str + :param destination_container_name: Required. The destination container + name. + :type destination_container_name: str + :param overwrite_vhds: Required. Specifies whether to overwrite the + destination virtual hard disk, in case of conflict. + :type overwrite_vhds: bool + """ + + _validation = { + 'vhd_prefix': {'required': True}, + 'destination_container_name': {'required': True}, + 'overwrite_vhds': {'required': True}, + } + + _attribute_map = { + 'vhd_prefix': {'key': 'vhdPrefix', 'type': 'str'}, + 'destination_container_name': {'key': 'destinationContainerName', 'type': 'str'}, + 'overwrite_vhds': {'key': 'overwriteVhds', 'type': 'bool'}, + } + + def __init__(self, **kwargs): + super(VirtualMachineCaptureParameters, self).__init__(**kwargs) + self.vhd_prefix = kwargs.get('vhd_prefix', None) + self.destination_container_name = kwargs.get('destination_container_name', None) + self.overwrite_vhds = kwargs.get('overwrite_vhds', None) + + +class VirtualMachineCaptureResult(SubResource): + """Output of virtual machine capture operation. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :param id: Resource Id + :type id: str + :ivar schema: the schema of the captured virtual machine + :vartype schema: str + :ivar content_version: the version of the content + :vartype content_version: str + :ivar parameters: parameters of the captured virtual machine + :vartype parameters: object + :ivar resources: a list of resource items of the captured virtual machine + :vartype resources: list[object] + """ + + _validation = { + 'schema': {'readonly': True}, + 'content_version': {'readonly': True}, + 'parameters': {'readonly': True}, + 'resources': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'schema': {'key': '$schema', 'type': 'str'}, + 'content_version': {'key': 'contentVersion', 'type': 'str'}, + 'parameters': {'key': 'parameters', 'type': 'object'}, + 'resources': {'key': 'resources', 'type': '[object]'}, + } + + def __init__(self, **kwargs): + super(VirtualMachineCaptureResult, self).__init__(**kwargs) + self.schema = None + self.content_version = None + self.parameters = None + self.resources = None + + +class VirtualMachineExtension(Resource): + """Describes a Virtual Machine Extension. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource Id + :vartype id: str + :ivar name: Resource name + :vartype name: str + :ivar type: Resource type + :vartype type: str + :param location: Required. Resource location + :type location: str + :param tags: Resource tags + :type tags: dict[str, str] + :param force_update_tag: How the extension handler should be forced to + update even if the extension configuration has not changed. + :type force_update_tag: str + :param publisher: The name of the extension handler publisher. + :type publisher: str + :param virtual_machine_extension_type: Specifies the type of the + extension; an example is "CustomScriptExtension". + :type virtual_machine_extension_type: str + :param type_handler_version: Specifies the version of the script handler. + :type type_handler_version: str + :param auto_upgrade_minor_version: Indicates whether the extension should + use a newer minor version if one is available at deployment time. Once + deployed, however, the extension will not upgrade minor versions unless + redeployed, even with this property set to true. + :type auto_upgrade_minor_version: bool + :param settings: Json formatted public settings for the extension. + :type settings: object + :param protected_settings: The extension can contain either + protectedSettings or protectedSettingsFromKeyVault or no protected + settings at all. + :type protected_settings: object + :ivar provisioning_state: The provisioning state, which only appears in + the response. + :vartype provisioning_state: str + :param instance_view: The virtual machine extension instance view. + :type instance_view: + ~azure.mgmt.compute.v2018_06_01.models.VirtualMachineExtensionInstanceView + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'force_update_tag': {'key': 'properties.forceUpdateTag', 'type': 'str'}, + 'publisher': {'key': 'properties.publisher', 'type': 'str'}, + 'virtual_machine_extension_type': {'key': 'properties.type', 'type': 'str'}, + 'type_handler_version': {'key': 'properties.typeHandlerVersion', 'type': 'str'}, + 'auto_upgrade_minor_version': {'key': 'properties.autoUpgradeMinorVersion', 'type': 'bool'}, + 'settings': {'key': 'properties.settings', 'type': 'object'}, + 'protected_settings': {'key': 'properties.protectedSettings', 'type': 'object'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'instance_view': {'key': 'properties.instanceView', 'type': 'VirtualMachineExtensionInstanceView'}, + } + + def __init__(self, **kwargs): + super(VirtualMachineExtension, self).__init__(**kwargs) + self.force_update_tag = kwargs.get('force_update_tag', None) + self.publisher = kwargs.get('publisher', None) + self.virtual_machine_extension_type = kwargs.get('virtual_machine_extension_type', None) + self.type_handler_version = kwargs.get('type_handler_version', None) + self.auto_upgrade_minor_version = kwargs.get('auto_upgrade_minor_version', None) + self.settings = kwargs.get('settings', None) + self.protected_settings = kwargs.get('protected_settings', None) + self.provisioning_state = None + self.instance_view = kwargs.get('instance_view', None) + + +class VirtualMachineExtensionHandlerInstanceView(Model): + """The instance view of a virtual machine extension handler. + + :param type: Specifies the type of the extension; an example is + "CustomScriptExtension". + :type type: str + :param type_handler_version: Specifies the version of the script handler. + :type type_handler_version: str + :param status: The extension handler status. + :type status: ~azure.mgmt.compute.v2018_06_01.models.InstanceViewStatus + """ + + _attribute_map = { + 'type': {'key': 'type', 'type': 'str'}, + 'type_handler_version': {'key': 'typeHandlerVersion', 'type': 'str'}, + 'status': {'key': 'status', 'type': 'InstanceViewStatus'}, + } + + def __init__(self, **kwargs): + super(VirtualMachineExtensionHandlerInstanceView, self).__init__(**kwargs) + self.type = kwargs.get('type', None) + self.type_handler_version = kwargs.get('type_handler_version', None) + self.status = kwargs.get('status', None) + + +class VirtualMachineExtensionImage(Resource): + """Describes a Virtual Machine Extension Image. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource Id + :vartype id: str + :ivar name: Resource name + :vartype name: str + :ivar type: Resource type + :vartype type: str + :param location: Required. Resource location + :type location: str + :param tags: Resource tags + :type tags: dict[str, str] + :param operating_system: Required. The operating system this extension + supports. + :type operating_system: str + :param compute_role: Required. The type of role (IaaS or PaaS) this + extension supports. + :type compute_role: str + :param handler_schema: Required. The schema defined by publisher, where + extension consumers should provide settings in a matching schema. + :type handler_schema: str + :param vm_scale_set_enabled: Whether the extension can be used on xRP + VMScaleSets. By default existing extensions are usable on scalesets, but + there might be cases where a publisher wants to explicitly indicate the + extension is only enabled for CRP VMs but not VMSS. + :type vm_scale_set_enabled: bool + :param supports_multiple_extensions: Whether the handler can support + multiple extensions. + :type supports_multiple_extensions: bool + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + 'operating_system': {'required': True}, + 'compute_role': {'required': True}, + 'handler_schema': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'operating_system': {'key': 'properties.operatingSystem', 'type': 'str'}, + 'compute_role': {'key': 'properties.computeRole', 'type': 'str'}, + 'handler_schema': {'key': 'properties.handlerSchema', 'type': 'str'}, + 'vm_scale_set_enabled': {'key': 'properties.vmScaleSetEnabled', 'type': 'bool'}, + 'supports_multiple_extensions': {'key': 'properties.supportsMultipleExtensions', 'type': 'bool'}, + } + + def __init__(self, **kwargs): + super(VirtualMachineExtensionImage, self).__init__(**kwargs) + self.operating_system = kwargs.get('operating_system', None) + self.compute_role = kwargs.get('compute_role', None) + self.handler_schema = kwargs.get('handler_schema', None) + self.vm_scale_set_enabled = kwargs.get('vm_scale_set_enabled', None) + self.supports_multiple_extensions = kwargs.get('supports_multiple_extensions', None) + + +class VirtualMachineExtensionInstanceView(Model): + """The instance view of a virtual machine extension. + + :param name: The virtual machine extension name. + :type name: str + :param type: Specifies the type of the extension; an example is + "CustomScriptExtension". + :type type: str + :param type_handler_version: Specifies the version of the script handler. + :type type_handler_version: str + :param substatuses: The resource status information. + :type substatuses: + list[~azure.mgmt.compute.v2018_06_01.models.InstanceViewStatus] + :param statuses: The resource status information. + :type statuses: + list[~azure.mgmt.compute.v2018_06_01.models.InstanceViewStatus] + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'type_handler_version': {'key': 'typeHandlerVersion', 'type': 'str'}, + 'substatuses': {'key': 'substatuses', 'type': '[InstanceViewStatus]'}, + 'statuses': {'key': 'statuses', 'type': '[InstanceViewStatus]'}, + } + + def __init__(self, **kwargs): + super(VirtualMachineExtensionInstanceView, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.type = kwargs.get('type', None) + self.type_handler_version = kwargs.get('type_handler_version', None) + self.substatuses = kwargs.get('substatuses', None) + self.statuses = kwargs.get('statuses', None) + + +class VirtualMachineExtensionsListResult(Model): + """The List Extension operation response. + + :param value: The list of extensions + :type value: + list[~azure.mgmt.compute.v2018_06_01.models.VirtualMachineExtension] + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[VirtualMachineExtension]'}, + } + + def __init__(self, **kwargs): + super(VirtualMachineExtensionsListResult, self).__init__(**kwargs) + self.value = kwargs.get('value', None) + + +class VirtualMachineExtensionUpdate(UpdateResource): + """Describes a Virtual Machine Extension. + + :param tags: Resource tags + :type tags: dict[str, str] + :param force_update_tag: How the extension handler should be forced to + update even if the extension configuration has not changed. + :type force_update_tag: str + :param publisher: The name of the extension handler publisher. + :type publisher: str + :param type: Specifies the type of the extension; an example is + "CustomScriptExtension". + :type type: str + :param type_handler_version: Specifies the version of the script handler. + :type type_handler_version: str + :param auto_upgrade_minor_version: Indicates whether the extension should + use a newer minor version if one is available at deployment time. Once + deployed, however, the extension will not upgrade minor versions unless + redeployed, even with this property set to true. + :type auto_upgrade_minor_version: bool + :param settings: Json formatted public settings for the extension. + :type settings: object + :param protected_settings: The extension can contain either + protectedSettings or protectedSettingsFromKeyVault or no protected + settings at all. + :type protected_settings: object + """ + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + 'force_update_tag': {'key': 'properties.forceUpdateTag', 'type': 'str'}, + 'publisher': {'key': 'properties.publisher', 'type': 'str'}, + 'type': {'key': 'properties.type', 'type': 'str'}, + 'type_handler_version': {'key': 'properties.typeHandlerVersion', 'type': 'str'}, + 'auto_upgrade_minor_version': {'key': 'properties.autoUpgradeMinorVersion', 'type': 'bool'}, + 'settings': {'key': 'properties.settings', 'type': 'object'}, + 'protected_settings': {'key': 'properties.protectedSettings', 'type': 'object'}, + } + + def __init__(self, **kwargs): + super(VirtualMachineExtensionUpdate, self).__init__(**kwargs) + self.force_update_tag = kwargs.get('force_update_tag', None) + self.publisher = kwargs.get('publisher', None) + self.type = kwargs.get('type', None) + self.type_handler_version = kwargs.get('type_handler_version', None) + self.auto_upgrade_minor_version = kwargs.get('auto_upgrade_minor_version', None) + self.settings = kwargs.get('settings', None) + self.protected_settings = kwargs.get('protected_settings', None) + + +class VirtualMachineHealthStatus(Model): + """The health status of the VM. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar status: The health status information for the VM. + :vartype status: ~azure.mgmt.compute.v2018_06_01.models.InstanceViewStatus + """ + + _validation = { + 'status': {'readonly': True}, + } + + _attribute_map = { + 'status': {'key': 'status', 'type': 'InstanceViewStatus'}, + } + + def __init__(self, **kwargs): + super(VirtualMachineHealthStatus, self).__init__(**kwargs) + self.status = None + + +class VirtualMachineIdentity(Model): + """Identity for the virtual machine. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar principal_id: The principal id of virtual machine identity. This + property will only be provided for a system assigned identity. + :vartype principal_id: str + :ivar tenant_id: The tenant id associated with the virtual machine. This + property will only be provided for a system assigned identity. + :vartype tenant_id: str + :param type: The type of identity used for the virtual machine. The type + 'SystemAssigned, UserAssigned' includes both an implicitly created + identity and a set of user assigned identities. The type 'None' will + remove any identities from the virtual machine. Possible values include: + 'SystemAssigned', 'UserAssigned', 'SystemAssigned, UserAssigned', 'None' + :type type: str or + ~azure.mgmt.compute.v2018_06_01.models.ResourceIdentityType + :param user_assigned_identities: The list of user identities associated + with the Virtual Machine. The user identity dictionary key references will + be ARM resource ids in the form: + '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'. + :type user_assigned_identities: dict[str, + ~azure.mgmt.compute.v2018_06_01.models.VirtualMachineIdentityUserAssignedIdentitiesValue] + """ + + _validation = { + 'principal_id': {'readonly': True}, + 'tenant_id': {'readonly': True}, + } + + _attribute_map = { + 'principal_id': {'key': 'principalId', 'type': 'str'}, + 'tenant_id': {'key': 'tenantId', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'ResourceIdentityType'}, + 'user_assigned_identities': {'key': 'userAssignedIdentities', 'type': '{VirtualMachineIdentityUserAssignedIdentitiesValue}'}, + } + + def __init__(self, **kwargs): + super(VirtualMachineIdentity, self).__init__(**kwargs) + self.principal_id = None + self.tenant_id = None + self.type = kwargs.get('type', None) + self.user_assigned_identities = kwargs.get('user_assigned_identities', None) + + +class VirtualMachineIdentityUserAssignedIdentitiesValue(Model): + """VirtualMachineIdentityUserAssignedIdentitiesValue. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar principal_id: The principal id of user assigned identity. + :vartype principal_id: str + :ivar client_id: The client id of user assigned identity. + :vartype client_id: str + """ + + _validation = { + 'principal_id': {'readonly': True}, + 'client_id': {'readonly': True}, + } + + _attribute_map = { + 'principal_id': {'key': 'principalId', 'type': 'str'}, + 'client_id': {'key': 'clientId', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(VirtualMachineIdentityUserAssignedIdentitiesValue, self).__init__(**kwargs) + self.principal_id = None + self.client_id = None + + +class VirtualMachineImageResource(SubResource): + """Virtual machine image resource information. + + All required parameters must be populated in order to send to Azure. + + :param id: Resource Id + :type id: str + :param name: Required. The name of the resource. + :type name: str + :param location: Required. The supported Azure location of the resource. + :type location: str + :param tags: Specifies the tags that are assigned to the virtual machine. + For more information about using tags, see [Using tags to organize your + Azure + resources](https://docs.microsoft.com/azure/azure-resource-manager/resource-group-using-tags.md). + :type tags: dict[str, str] + """ + + _validation = { + 'name': {'required': True}, + 'location': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__(self, **kwargs): + super(VirtualMachineImageResource, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.location = kwargs.get('location', None) + self.tags = kwargs.get('tags', None) + + +class VirtualMachineImage(VirtualMachineImageResource): + """Describes a Virtual Machine Image. + + All required parameters must be populated in order to send to Azure. + + :param id: Resource Id + :type id: str + :param name: Required. The name of the resource. + :type name: str + :param location: Required. The supported Azure location of the resource. + :type location: str + :param tags: Specifies the tags that are assigned to the virtual machine. + For more information about using tags, see [Using tags to organize your + Azure + resources](https://docs.microsoft.com/azure/azure-resource-manager/resource-group-using-tags.md). + :type tags: dict[str, str] + :param plan: + :type plan: ~azure.mgmt.compute.v2018_06_01.models.PurchasePlan + :param os_disk_image: + :type os_disk_image: ~azure.mgmt.compute.v2018_06_01.models.OSDiskImage + :param data_disk_images: + :type data_disk_images: + list[~azure.mgmt.compute.v2018_06_01.models.DataDiskImage] + """ + + _validation = { + 'name': {'required': True}, + 'location': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'plan': {'key': 'properties.plan', 'type': 'PurchasePlan'}, + 'os_disk_image': {'key': 'properties.osDiskImage', 'type': 'OSDiskImage'}, + 'data_disk_images': {'key': 'properties.dataDiskImages', 'type': '[DataDiskImage]'}, + } + + def __init__(self, **kwargs): + super(VirtualMachineImage, self).__init__(**kwargs) + self.plan = kwargs.get('plan', None) + self.os_disk_image = kwargs.get('os_disk_image', None) + self.data_disk_images = kwargs.get('data_disk_images', None) + + +class VirtualMachineInstanceView(Model): + """The instance view of a virtual machine. + + :param platform_update_domain: Specifies the update domain of the virtual + machine. + :type platform_update_domain: int + :param platform_fault_domain: Specifies the fault domain of the virtual + machine. + :type platform_fault_domain: int + :param computer_name: The computer name assigned to the virtual machine. + :type computer_name: str + :param os_name: The Operating System running on the virtual machine. + :type os_name: str + :param os_version: The version of Operating System running on the virtual + machine. + :type os_version: str + :param rdp_thumb_print: The Remote desktop certificate thumbprint. + :type rdp_thumb_print: str + :param vm_agent: The VM Agent running on the virtual machine. + :type vm_agent: + ~azure.mgmt.compute.v2018_06_01.models.VirtualMachineAgentInstanceView + :param maintenance_redeploy_status: The Maintenance Operation status on + the virtual machine. + :type maintenance_redeploy_status: + ~azure.mgmt.compute.v2018_06_01.models.MaintenanceRedeployStatus + :param disks: The virtual machine disk information. + :type disks: list[~azure.mgmt.compute.v2018_06_01.models.DiskInstanceView] + :param extensions: The extensions information. + :type extensions: + list[~azure.mgmt.compute.v2018_06_01.models.VirtualMachineExtensionInstanceView] + :param boot_diagnostics: Boot Diagnostics is a debugging feature which + allows you to view Console Output and Screenshot to diagnose VM status. +

    You can easily view the output of your console log.

    + Azure also enables you to see a screenshot of the VM from the hypervisor. + :type boot_diagnostics: + ~azure.mgmt.compute.v2018_06_01.models.BootDiagnosticsInstanceView + :param statuses: The resource status information. + :type statuses: + list[~azure.mgmt.compute.v2018_06_01.models.InstanceViewStatus] + """ + + _attribute_map = { + 'platform_update_domain': {'key': 'platformUpdateDomain', 'type': 'int'}, + 'platform_fault_domain': {'key': 'platformFaultDomain', 'type': 'int'}, + 'computer_name': {'key': 'computerName', 'type': 'str'}, + 'os_name': {'key': 'osName', 'type': 'str'}, + 'os_version': {'key': 'osVersion', 'type': 'str'}, + 'rdp_thumb_print': {'key': 'rdpThumbPrint', 'type': 'str'}, + 'vm_agent': {'key': 'vmAgent', 'type': 'VirtualMachineAgentInstanceView'}, + 'maintenance_redeploy_status': {'key': 'maintenanceRedeployStatus', 'type': 'MaintenanceRedeployStatus'}, + 'disks': {'key': 'disks', 'type': '[DiskInstanceView]'}, + 'extensions': {'key': 'extensions', 'type': '[VirtualMachineExtensionInstanceView]'}, + 'boot_diagnostics': {'key': 'bootDiagnostics', 'type': 'BootDiagnosticsInstanceView'}, + 'statuses': {'key': 'statuses', 'type': '[InstanceViewStatus]'}, + } + + def __init__(self, **kwargs): + super(VirtualMachineInstanceView, self).__init__(**kwargs) + self.platform_update_domain = kwargs.get('platform_update_domain', None) + self.platform_fault_domain = kwargs.get('platform_fault_domain', None) + self.computer_name = kwargs.get('computer_name', None) + self.os_name = kwargs.get('os_name', None) + self.os_version = kwargs.get('os_version', None) + self.rdp_thumb_print = kwargs.get('rdp_thumb_print', None) + self.vm_agent = kwargs.get('vm_agent', None) + self.maintenance_redeploy_status = kwargs.get('maintenance_redeploy_status', None) + self.disks = kwargs.get('disks', None) + self.extensions = kwargs.get('extensions', None) + self.boot_diagnostics = kwargs.get('boot_diagnostics', None) + self.statuses = kwargs.get('statuses', None) + + +class VirtualMachineReimageParameters(Model): + """Parameters for Reimaging Virtual Machine. NOTE: Virtual Machine OS disk + will always be reimaged. + + :param temp_disk: Specifies whether to reimage temp disk. Default value: + false. Note: This temp disk reimage parameter is only supported for + VM/VMSS with Ephemeral OS disk. + :type temp_disk: bool + """ + + _attribute_map = { + 'temp_disk': {'key': 'tempDisk', 'type': 'bool'}, + } + + def __init__(self, **kwargs): + super(VirtualMachineReimageParameters, self).__init__(**kwargs) + self.temp_disk = kwargs.get('temp_disk', None) + + +class VirtualMachineScaleSet(Resource): + """Describes a Virtual Machine Scale Set. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource Id + :vartype id: str + :ivar name: Resource name + :vartype name: str + :ivar type: Resource type + :vartype type: str + :param location: Required. Resource location + :type location: str + :param tags: Resource tags + :type tags: dict[str, str] + :param sku: The virtual machine scale set sku. + :type sku: ~azure.mgmt.compute.v2018_06_01.models.Sku + :param plan: Specifies information about the marketplace image used to + create the virtual machine. This element is only used for marketplace + images. Before you can use a marketplace image from an API, you must + enable the image for programmatic use. In the Azure portal, find the + marketplace image that you want to use and then click **Want to deploy + programmatically, Get Started ->**. Enter any required information and + then click **Save**. + :type plan: ~azure.mgmt.compute.v2018_06_01.models.Plan + :param upgrade_policy: The upgrade policy. + :type upgrade_policy: ~azure.mgmt.compute.v2018_06_01.models.UpgradePolicy + :param virtual_machine_profile: The virtual machine profile. + :type virtual_machine_profile: + ~azure.mgmt.compute.v2018_06_01.models.VirtualMachineScaleSetVMProfile + :ivar provisioning_state: The provisioning state, which only appears in + the response. + :vartype provisioning_state: str + :param overprovision: Specifies whether the Virtual Machine Scale Set + should be overprovisioned. + :type overprovision: bool + :ivar unique_id: Specifies the ID which uniquely identifies a Virtual + Machine Scale Set. + :vartype unique_id: str + :param single_placement_group: When true this limits the scale set to a + single placement group, of max size 100 virtual machines. + :type single_placement_group: bool + :param zone_balance: Whether to force strictly even Virtual Machine + distribution cross x-zones in case there is zone outage. + :type zone_balance: bool + :param platform_fault_domain_count: Fault Domain count for each placement + group. + :type platform_fault_domain_count: int + :param proximity_placement_group: Specifies information about the + proximity placement group that the virtual machine scale set should be + assigned to.

    Minimum api-version: 2018-04-01. + :type proximity_placement_group: + ~azure.mgmt.compute.v2018_06_01.models.SubResource + :param identity: The identity of the virtual machine scale set, if + configured. + :type identity: + ~azure.mgmt.compute.v2018_06_01.models.VirtualMachineScaleSetIdentity + :param zones: The virtual machine scale set zones. + :type zones: list[str] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + 'provisioning_state': {'readonly': True}, + 'unique_id': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'sku': {'key': 'sku', 'type': 'Sku'}, + 'plan': {'key': 'plan', 'type': 'Plan'}, + 'upgrade_policy': {'key': 'properties.upgradePolicy', 'type': 'UpgradePolicy'}, + 'virtual_machine_profile': {'key': 'properties.virtualMachineProfile', 'type': 'VirtualMachineScaleSetVMProfile'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'overprovision': {'key': 'properties.overprovision', 'type': 'bool'}, + 'unique_id': {'key': 'properties.uniqueId', 'type': 'str'}, + 'single_placement_group': {'key': 'properties.singlePlacementGroup', 'type': 'bool'}, + 'zone_balance': {'key': 'properties.zoneBalance', 'type': 'bool'}, + 'platform_fault_domain_count': {'key': 'properties.platformFaultDomainCount', 'type': 'int'}, + 'proximity_placement_group': {'key': 'properties.proximityPlacementGroup', 'type': 'SubResource'}, + 'identity': {'key': 'identity', 'type': 'VirtualMachineScaleSetIdentity'}, + 'zones': {'key': 'zones', 'type': '[str]'}, + } + + def __init__(self, **kwargs): + super(VirtualMachineScaleSet, self).__init__(**kwargs) + self.sku = kwargs.get('sku', None) + self.plan = kwargs.get('plan', None) + self.upgrade_policy = kwargs.get('upgrade_policy', None) + self.virtual_machine_profile = kwargs.get('virtual_machine_profile', None) + self.provisioning_state = None + self.overprovision = kwargs.get('overprovision', None) + self.unique_id = None + self.single_placement_group = kwargs.get('single_placement_group', None) + self.zone_balance = kwargs.get('zone_balance', None) + self.platform_fault_domain_count = kwargs.get('platform_fault_domain_count', None) + self.proximity_placement_group = kwargs.get('proximity_placement_group', None) + self.identity = kwargs.get('identity', None) + self.zones = kwargs.get('zones', None) + + +class VirtualMachineScaleSetDataDisk(Model): + """Describes a virtual machine scale set data disk. + + All required parameters must be populated in order to send to Azure. + + :param name: The disk name. + :type name: str + :param lun: Required. Specifies the logical unit number of the data disk. + This value is used to identify data disks within the VM and therefore must + be unique for each data disk attached to a VM. + :type lun: int + :param caching: Specifies the caching requirements.

    Possible + values are:

    **None**

    **ReadOnly**

    **ReadWrite** +

    Default: **None for Standard storage. ReadOnly for Premium + storage**. Possible values include: 'None', 'ReadOnly', 'ReadWrite' + :type caching: str or ~azure.mgmt.compute.v2018_06_01.models.CachingTypes + :param write_accelerator_enabled: Specifies whether writeAccelerator + should be enabled or disabled on the disk. + :type write_accelerator_enabled: bool + :param create_option: Required. The create option. Possible values + include: 'FromImage', 'Empty', 'Attach' + :type create_option: str or + ~azure.mgmt.compute.v2018_06_01.models.DiskCreateOptionTypes + :param disk_size_gb: Specifies the size of an empty data disk in + gigabytes. This element can be used to overwrite the size of the disk in a + virtual machine image.

    This value cannot be larger than 1023 GB + :type disk_size_gb: int + :param managed_disk: The managed disk parameters. + :type managed_disk: + ~azure.mgmt.compute.v2018_06_01.models.VirtualMachineScaleSetManagedDiskParameters + """ + + _validation = { + 'lun': {'required': True}, + 'create_option': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'lun': {'key': 'lun', 'type': 'int'}, + 'caching': {'key': 'caching', 'type': 'CachingTypes'}, + 'write_accelerator_enabled': {'key': 'writeAcceleratorEnabled', 'type': 'bool'}, + 'create_option': {'key': 'createOption', 'type': 'str'}, + 'disk_size_gb': {'key': 'diskSizeGB', 'type': 'int'}, + 'managed_disk': {'key': 'managedDisk', 'type': 'VirtualMachineScaleSetManagedDiskParameters'}, + } + + def __init__(self, **kwargs): + super(VirtualMachineScaleSetDataDisk, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.lun = kwargs.get('lun', None) + self.caching = kwargs.get('caching', None) + self.write_accelerator_enabled = kwargs.get('write_accelerator_enabled', None) + self.create_option = kwargs.get('create_option', None) + self.disk_size_gb = kwargs.get('disk_size_gb', None) + self.managed_disk = kwargs.get('managed_disk', None) + + +class VirtualMachineScaleSetExtension(SubResourceReadOnly): + """Describes a Virtual Machine Scale Set Extension. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource Id + :vartype id: str + :param name: The name of the extension. + :type name: str + :param force_update_tag: If a value is provided and is different from the + previous value, the extension handler will be forced to update even if the + extension configuration has not changed. + :type force_update_tag: str + :param publisher: The name of the extension handler publisher. + :type publisher: str + :param type: Specifies the type of the extension; an example is + "CustomScriptExtension". + :type type: str + :param type_handler_version: Specifies the version of the script handler. + :type type_handler_version: str + :param auto_upgrade_minor_version: Indicates whether the extension should + use a newer minor version if one is available at deployment time. Once + deployed, however, the extension will not upgrade minor versions unless + redeployed, even with this property set to true. + :type auto_upgrade_minor_version: bool + :param settings: Json formatted public settings for the extension. + :type settings: object + :param protected_settings: The extension can contain either + protectedSettings or protectedSettingsFromKeyVault or no protected + settings at all. + :type protected_settings: object + :ivar provisioning_state: The provisioning state, which only appears in + the response. + :vartype provisioning_state: str + :param provision_after_extensions: Collection of extension names after + which this extension needs to be provisioned. + :type provision_after_extensions: list[str] + """ + + _validation = { + 'id': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'force_update_tag': {'key': 'properties.forceUpdateTag', 'type': 'str'}, + 'publisher': {'key': 'properties.publisher', 'type': 'str'}, + 'type': {'key': 'properties.type', 'type': 'str'}, + 'type_handler_version': {'key': 'properties.typeHandlerVersion', 'type': 'str'}, + 'auto_upgrade_minor_version': {'key': 'properties.autoUpgradeMinorVersion', 'type': 'bool'}, + 'settings': {'key': 'properties.settings', 'type': 'object'}, + 'protected_settings': {'key': 'properties.protectedSettings', 'type': 'object'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'provision_after_extensions': {'key': 'properties.provisionAfterExtensions', 'type': '[str]'}, + } + + def __init__(self, **kwargs): + super(VirtualMachineScaleSetExtension, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.force_update_tag = kwargs.get('force_update_tag', None) + self.publisher = kwargs.get('publisher', None) + self.type = kwargs.get('type', None) + self.type_handler_version = kwargs.get('type_handler_version', None) + self.auto_upgrade_minor_version = kwargs.get('auto_upgrade_minor_version', None) + self.settings = kwargs.get('settings', None) + self.protected_settings = kwargs.get('protected_settings', None) + self.provisioning_state = None + self.provision_after_extensions = kwargs.get('provision_after_extensions', None) + + +class VirtualMachineScaleSetExtensionProfile(Model): + """Describes a virtual machine scale set extension profile. + + :param extensions: The virtual machine scale set child extension + resources. + :type extensions: + list[~azure.mgmt.compute.v2018_06_01.models.VirtualMachineScaleSetExtension] + """ + + _attribute_map = { + 'extensions': {'key': 'extensions', 'type': '[VirtualMachineScaleSetExtension]'}, + } + + def __init__(self, **kwargs): + super(VirtualMachineScaleSetExtensionProfile, self).__init__(**kwargs) + self.extensions = kwargs.get('extensions', None) + + +class VirtualMachineScaleSetIdentity(Model): + """Identity for the virtual machine scale set. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar principal_id: The principal id of virtual machine scale set + identity. This property will only be provided for a system assigned + identity. + :vartype principal_id: str + :ivar tenant_id: The tenant id associated with the virtual machine scale + set. This property will only be provided for a system assigned identity. + :vartype tenant_id: str + :param type: The type of identity used for the virtual machine scale set. + The type 'SystemAssigned, UserAssigned' includes both an implicitly + created identity and a set of user assigned identities. The type 'None' + will remove any identities from the virtual machine scale set. Possible + values include: 'SystemAssigned', 'UserAssigned', 'SystemAssigned, + UserAssigned', 'None' + :type type: str or + ~azure.mgmt.compute.v2018_06_01.models.ResourceIdentityType + :param user_assigned_identities: The list of user identities associated + with the virtual machine scale set. The user identity dictionary key + references will be ARM resource ids in the form: + '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'. + :type user_assigned_identities: dict[str, + ~azure.mgmt.compute.v2018_06_01.models.VirtualMachineScaleSetIdentityUserAssignedIdentitiesValue] + """ + + _validation = { + 'principal_id': {'readonly': True}, + 'tenant_id': {'readonly': True}, + } + + _attribute_map = { + 'principal_id': {'key': 'principalId', 'type': 'str'}, + 'tenant_id': {'key': 'tenantId', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'ResourceIdentityType'}, + 'user_assigned_identities': {'key': 'userAssignedIdentities', 'type': '{VirtualMachineScaleSetIdentityUserAssignedIdentitiesValue}'}, + } + + def __init__(self, **kwargs): + super(VirtualMachineScaleSetIdentity, self).__init__(**kwargs) + self.principal_id = None + self.tenant_id = None + self.type = kwargs.get('type', None) + self.user_assigned_identities = kwargs.get('user_assigned_identities', None) + + +class VirtualMachineScaleSetIdentityUserAssignedIdentitiesValue(Model): + """VirtualMachineScaleSetIdentityUserAssignedIdentitiesValue. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar principal_id: The principal id of user assigned identity. + :vartype principal_id: str + :ivar client_id: The client id of user assigned identity. + :vartype client_id: str + """ + + _validation = { + 'principal_id': {'readonly': True}, + 'client_id': {'readonly': True}, + } + + _attribute_map = { + 'principal_id': {'key': 'principalId', 'type': 'str'}, + 'client_id': {'key': 'clientId', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(VirtualMachineScaleSetIdentityUserAssignedIdentitiesValue, self).__init__(**kwargs) + self.principal_id = None + self.client_id = None + + +class VirtualMachineScaleSetInstanceView(Model): + """The instance view of a virtual machine scale set. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar virtual_machine: The instance view status summary for the virtual + machine scale set. + :vartype virtual_machine: + ~azure.mgmt.compute.v2018_06_01.models.VirtualMachineScaleSetInstanceViewStatusesSummary + :ivar extensions: The extensions information. + :vartype extensions: + list[~azure.mgmt.compute.v2018_06_01.models.VirtualMachineScaleSetVMExtensionsSummary] + :param statuses: The resource status information. + :type statuses: + list[~azure.mgmt.compute.v2018_06_01.models.InstanceViewStatus] + """ + + _validation = { + 'virtual_machine': {'readonly': True}, + 'extensions': {'readonly': True}, + } + + _attribute_map = { + 'virtual_machine': {'key': 'virtualMachine', 'type': 'VirtualMachineScaleSetInstanceViewStatusesSummary'}, + 'extensions': {'key': 'extensions', 'type': '[VirtualMachineScaleSetVMExtensionsSummary]'}, + 'statuses': {'key': 'statuses', 'type': '[InstanceViewStatus]'}, + } + + def __init__(self, **kwargs): + super(VirtualMachineScaleSetInstanceView, self).__init__(**kwargs) + self.virtual_machine = None + self.extensions = None + self.statuses = kwargs.get('statuses', None) + + +class VirtualMachineScaleSetInstanceViewStatusesSummary(Model): + """Instance view statuses summary for virtual machines of a virtual machine + scale set. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar statuses_summary: The extensions information. + :vartype statuses_summary: + list[~azure.mgmt.compute.v2018_06_01.models.VirtualMachineStatusCodeCount] + """ + + _validation = { + 'statuses_summary': {'readonly': True}, + } + + _attribute_map = { + 'statuses_summary': {'key': 'statusesSummary', 'type': '[VirtualMachineStatusCodeCount]'}, + } + + def __init__(self, **kwargs): + super(VirtualMachineScaleSetInstanceViewStatusesSummary, self).__init__(**kwargs) + self.statuses_summary = None + + +class VirtualMachineScaleSetIPConfiguration(SubResource): + """Describes a virtual machine scale set network profile's IP configuration. + + All required parameters must be populated in order to send to Azure. + + :param id: Resource Id + :type id: str + :param name: Required. The IP configuration name. + :type name: str + :param subnet: Specifies the identifier of the subnet. + :type subnet: ~azure.mgmt.compute.v2018_06_01.models.ApiEntityReference + :param primary: Specifies the primary network interface in case the + virtual machine has more than 1 network interface. + :type primary: bool + :param public_ip_address_configuration: The publicIPAddressConfiguration. + :type public_ip_address_configuration: + ~azure.mgmt.compute.v2018_06_01.models.VirtualMachineScaleSetPublicIPAddressConfiguration + :param private_ip_address_version: Available from Api-Version 2017-03-30 + onwards, it represents whether the specific ipconfiguration is IPv4 or + IPv6. Default is taken as IPv4. Possible values are: 'IPv4' and 'IPv6'. + Possible values include: 'IPv4', 'IPv6' + :type private_ip_address_version: str or + ~azure.mgmt.compute.v2018_06_01.models.IPVersion + :param application_gateway_backend_address_pools: Specifies an array of + references to backend address pools of application gateways. A scale set + can reference backend address pools of multiple application gateways. + Multiple scale sets cannot use the same application gateway. + :type application_gateway_backend_address_pools: + list[~azure.mgmt.compute.v2018_06_01.models.SubResource] + :param application_security_groups: Specifies an array of references to + application security group. + :type application_security_groups: + list[~azure.mgmt.compute.v2018_06_01.models.SubResource] + :param load_balancer_backend_address_pools: Specifies an array of + references to backend address pools of load balancers. A scale set can + reference backend address pools of one public and one internal load + balancer. Multiple scale sets cannot use the same load balancer. + :type load_balancer_backend_address_pools: + list[~azure.mgmt.compute.v2018_06_01.models.SubResource] + :param load_balancer_inbound_nat_pools: Specifies an array of references + to inbound Nat pools of the load balancers. A scale set can reference + inbound nat pools of one public and one internal load balancer. Multiple + scale sets cannot use the same load balancer + :type load_balancer_inbound_nat_pools: + list[~azure.mgmt.compute.v2018_06_01.models.SubResource] + """ + + _validation = { + 'name': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'subnet': {'key': 'properties.subnet', 'type': 'ApiEntityReference'}, + 'primary': {'key': 'properties.primary', 'type': 'bool'}, + 'public_ip_address_configuration': {'key': 'properties.publicIPAddressConfiguration', 'type': 'VirtualMachineScaleSetPublicIPAddressConfiguration'}, + 'private_ip_address_version': {'key': 'properties.privateIPAddressVersion', 'type': 'str'}, + 'application_gateway_backend_address_pools': {'key': 'properties.applicationGatewayBackendAddressPools', 'type': '[SubResource]'}, + 'application_security_groups': {'key': 'properties.applicationSecurityGroups', 'type': '[SubResource]'}, + 'load_balancer_backend_address_pools': {'key': 'properties.loadBalancerBackendAddressPools', 'type': '[SubResource]'}, + 'load_balancer_inbound_nat_pools': {'key': 'properties.loadBalancerInboundNatPools', 'type': '[SubResource]'}, + } + + def __init__(self, **kwargs): + super(VirtualMachineScaleSetIPConfiguration, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.subnet = kwargs.get('subnet', None) + self.primary = kwargs.get('primary', None) + self.public_ip_address_configuration = kwargs.get('public_ip_address_configuration', None) + self.private_ip_address_version = kwargs.get('private_ip_address_version', None) + self.application_gateway_backend_address_pools = kwargs.get('application_gateway_backend_address_pools', None) + self.application_security_groups = kwargs.get('application_security_groups', None) + self.load_balancer_backend_address_pools = kwargs.get('load_balancer_backend_address_pools', None) + self.load_balancer_inbound_nat_pools = kwargs.get('load_balancer_inbound_nat_pools', None) + + +class VirtualMachineScaleSetIpTag(Model): + """Contains the IP tag associated with the public IP address. + + :param ip_tag_type: IP tag type. Example: FirstPartyUsage. + :type ip_tag_type: str + :param tag: IP tag associated with the public IP. Example: SQL, Storage + etc. + :type tag: str + """ + + _attribute_map = { + 'ip_tag_type': {'key': 'ipTagType', 'type': 'str'}, + 'tag': {'key': 'tag', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(VirtualMachineScaleSetIpTag, self).__init__(**kwargs) + self.ip_tag_type = kwargs.get('ip_tag_type', None) + self.tag = kwargs.get('tag', None) + + +class VirtualMachineScaleSetManagedDiskParameters(Model): + """Describes the parameters of a ScaleSet managed disk. + + :param storage_account_type: Specifies the storage account type for the + managed disk. NOTE: UltraSSD_LRS can only be used with data disks, it + cannot be used with OS Disk. Possible values include: 'Standard_LRS', + 'Premium_LRS', 'StandardSSD_LRS', 'UltraSSD_LRS' + :type storage_account_type: str or + ~azure.mgmt.compute.v2018_06_01.models.StorageAccountTypes + """ + + _attribute_map = { + 'storage_account_type': {'key': 'storageAccountType', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(VirtualMachineScaleSetManagedDiskParameters, self).__init__(**kwargs) + self.storage_account_type = kwargs.get('storage_account_type', None) + + +class VirtualMachineScaleSetNetworkConfiguration(SubResource): + """Describes a virtual machine scale set network profile's network + configurations. + + All required parameters must be populated in order to send to Azure. + + :param id: Resource Id + :type id: str + :param name: Required. The network configuration name. + :type name: str + :param primary: Specifies the primary network interface in case the + virtual machine has more than 1 network interface. + :type primary: bool + :param enable_accelerated_networking: Specifies whether the network + interface is accelerated networking-enabled. + :type enable_accelerated_networking: bool + :param network_security_group: The network security group. + :type network_security_group: + ~azure.mgmt.compute.v2018_06_01.models.SubResource + :param dns_settings: The dns settings to be applied on the network + interfaces. + :type dns_settings: + ~azure.mgmt.compute.v2018_06_01.models.VirtualMachineScaleSetNetworkConfigurationDnsSettings + :param ip_configurations: Required. Specifies the IP configurations of the + network interface. + :type ip_configurations: + list[~azure.mgmt.compute.v2018_06_01.models.VirtualMachineScaleSetIPConfiguration] + :param enable_ip_forwarding: Whether IP forwarding enabled on this NIC. + :type enable_ip_forwarding: bool + """ + + _validation = { + 'name': {'required': True}, + 'ip_configurations': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'primary': {'key': 'properties.primary', 'type': 'bool'}, + 'enable_accelerated_networking': {'key': 'properties.enableAcceleratedNetworking', 'type': 'bool'}, + 'network_security_group': {'key': 'properties.networkSecurityGroup', 'type': 'SubResource'}, + 'dns_settings': {'key': 'properties.dnsSettings', 'type': 'VirtualMachineScaleSetNetworkConfigurationDnsSettings'}, + 'ip_configurations': {'key': 'properties.ipConfigurations', 'type': '[VirtualMachineScaleSetIPConfiguration]'}, + 'enable_ip_forwarding': {'key': 'properties.enableIPForwarding', 'type': 'bool'}, + } + + def __init__(self, **kwargs): + super(VirtualMachineScaleSetNetworkConfiguration, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.primary = kwargs.get('primary', None) + self.enable_accelerated_networking = kwargs.get('enable_accelerated_networking', None) + self.network_security_group = kwargs.get('network_security_group', None) + self.dns_settings = kwargs.get('dns_settings', None) + self.ip_configurations = kwargs.get('ip_configurations', None) + self.enable_ip_forwarding = kwargs.get('enable_ip_forwarding', None) + + +class VirtualMachineScaleSetNetworkConfigurationDnsSettings(Model): + """Describes a virtual machines scale sets network configuration's DNS + settings. + + :param dns_servers: List of DNS servers IP addresses + :type dns_servers: list[str] + """ + + _attribute_map = { + 'dns_servers': {'key': 'dnsServers', 'type': '[str]'}, + } + + def __init__(self, **kwargs): + super(VirtualMachineScaleSetNetworkConfigurationDnsSettings, self).__init__(**kwargs) + self.dns_servers = kwargs.get('dns_servers', None) + + +class VirtualMachineScaleSetNetworkProfile(Model): + """Describes a virtual machine scale set network profile. + + :param health_probe: A reference to a load balancer probe used to + determine the health of an instance in the virtual machine scale set. The + reference will be in the form: + '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/probes/{probeName}'. + :type health_probe: + ~azure.mgmt.compute.v2018_06_01.models.ApiEntityReference + :param network_interface_configurations: The list of network + configurations. + :type network_interface_configurations: + list[~azure.mgmt.compute.v2018_06_01.models.VirtualMachineScaleSetNetworkConfiguration] + """ + + _attribute_map = { + 'health_probe': {'key': 'healthProbe', 'type': 'ApiEntityReference'}, + 'network_interface_configurations': {'key': 'networkInterfaceConfigurations', 'type': '[VirtualMachineScaleSetNetworkConfiguration]'}, + } + + def __init__(self, **kwargs): + super(VirtualMachineScaleSetNetworkProfile, self).__init__(**kwargs) + self.health_probe = kwargs.get('health_probe', None) + self.network_interface_configurations = kwargs.get('network_interface_configurations', None) + + +class VirtualMachineScaleSetOSDisk(Model): + """Describes a virtual machine scale set operating system disk. + + All required parameters must be populated in order to send to Azure. + + :param name: The disk name. + :type name: str + :param caching: Specifies the caching requirements.

    Possible + values are:

    **None**

    **ReadOnly**

    **ReadWrite** +

    Default: **None for Standard storage. ReadOnly for Premium + storage**. Possible values include: 'None', 'ReadOnly', 'ReadWrite' + :type caching: str or ~azure.mgmt.compute.v2018_06_01.models.CachingTypes + :param write_accelerator_enabled: Specifies whether writeAccelerator + should be enabled or disabled on the disk. + :type write_accelerator_enabled: bool + :param create_option: Required. Specifies how the virtual machines in the + scale set should be created.

    The only allowed value is: + **FromImage** \\u2013 This value is used when you are using an image to + create the virtual machine. If you are using a platform image, you also + use the imageReference element described above. If you are using a + marketplace image, you also use the plan element previously described. + Possible values include: 'FromImage', 'Empty', 'Attach' + :type create_option: str or + ~azure.mgmt.compute.v2018_06_01.models.DiskCreateOptionTypes + :param diff_disk_settings: Specifies the ephemeral disk Settings for the + operating system disk used by the virtual machine scale set. + :type diff_disk_settings: + ~azure.mgmt.compute.v2018_06_01.models.DiffDiskSettings + :param disk_size_gb: Specifies the size of the operating system disk in + gigabytes. This element can be used to overwrite the size of the disk in a + virtual machine image.

    This value cannot be larger than 1023 GB + :type disk_size_gb: int + :param os_type: This property allows you to specify the type of the OS + that is included in the disk if creating a VM from user-image or a + specialized VHD.

    Possible values are:

    **Windows** +

    **Linux**. Possible values include: 'Windows', 'Linux' + :type os_type: str or + ~azure.mgmt.compute.v2018_06_01.models.OperatingSystemTypes + :param image: Specifies information about the unmanaged user image to base + the scale set on. + :type image: ~azure.mgmt.compute.v2018_06_01.models.VirtualHardDisk + :param vhd_containers: Specifies the container urls that are used to store + operating system disks for the scale set. + :type vhd_containers: list[str] + :param managed_disk: The managed disk parameters. + :type managed_disk: + ~azure.mgmt.compute.v2018_06_01.models.VirtualMachineScaleSetManagedDiskParameters + """ + + _validation = { + 'create_option': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'caching': {'key': 'caching', 'type': 'CachingTypes'}, + 'write_accelerator_enabled': {'key': 'writeAcceleratorEnabled', 'type': 'bool'}, + 'create_option': {'key': 'createOption', 'type': 'str'}, + 'diff_disk_settings': {'key': 'diffDiskSettings', 'type': 'DiffDiskSettings'}, + 'disk_size_gb': {'key': 'diskSizeGB', 'type': 'int'}, + 'os_type': {'key': 'osType', 'type': 'OperatingSystemTypes'}, + 'image': {'key': 'image', 'type': 'VirtualHardDisk'}, + 'vhd_containers': {'key': 'vhdContainers', 'type': '[str]'}, + 'managed_disk': {'key': 'managedDisk', 'type': 'VirtualMachineScaleSetManagedDiskParameters'}, + } + + def __init__(self, **kwargs): + super(VirtualMachineScaleSetOSDisk, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.caching = kwargs.get('caching', None) + self.write_accelerator_enabled = kwargs.get('write_accelerator_enabled', None) + self.create_option = kwargs.get('create_option', None) + self.diff_disk_settings = kwargs.get('diff_disk_settings', None) + self.disk_size_gb = kwargs.get('disk_size_gb', None) + self.os_type = kwargs.get('os_type', None) + self.image = kwargs.get('image', None) + self.vhd_containers = kwargs.get('vhd_containers', None) + self.managed_disk = kwargs.get('managed_disk', None) + + +class VirtualMachineScaleSetOSProfile(Model): + """Describes a virtual machine scale set OS profile. + + :param computer_name_prefix: Specifies the computer name prefix for all of + the virtual machines in the scale set. Computer name prefixes must be 1 to + 15 characters long. + :type computer_name_prefix: str + :param admin_username: Specifies the name of the administrator account. +

    **Windows-only restriction:** Cannot end in "."

    + **Disallowed values:** "administrator", "admin", "user", "user1", "test", + "user2", "test1", "user3", "admin1", "1", "123", "a", "actuser", "adm", + "admin2", "aspnet", "backup", "console", "david", "guest", "john", + "owner", "root", "server", "sql", "support", "support_388945a0", "sys", + "test2", "test3", "user4", "user5".

    **Minimum-length (Linux):** 1 + character

    **Max-length (Linux):** 64 characters

    + **Max-length (Windows):** 20 characters

  • For root access to + the Linux VM, see [Using root privileges on Linux virtual machines in + Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-use-root-privileges?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json)
  • + For a list of built-in system users on Linux that should not be used in + this field, see [Selecting User Names for Linux on + Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-usernames?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json) + :type admin_username: str + :param admin_password: Specifies the password of the administrator + account.

    **Minimum-length (Windows):** 8 characters

    + **Minimum-length (Linux):** 6 characters

    **Max-length + (Windows):** 123 characters

    **Max-length (Linux):** 72 characters +

    **Complexity requirements:** 3 out of 4 conditions below need to + be fulfilled
    Has lower characters
    Has upper characters
    Has a + digit
    Has a special character (Regex match [\\W_])

    + **Disallowed values:** "abc@123", "P@$$w0rd", "P@ssw0rd", "P@ssword123", + "Pa$$word", "pass@word1", "Password!", "Password1", "Password22", + "iloveyou!"

    For resetting the password, see [How to reset the + Remote Desktop service or its login password in a Windows + VM](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-reset-rdp?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json) +

    For resetting root password, see [Manage users, SSH, and check or + repair disks on Azure Linux VMs using the VMAccess + Extension](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-using-vmaccess-extension?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json#reset-root-password) + :type admin_password: str + :param custom_data: Specifies a base-64 encoded string of custom data. The + base-64 encoded string is decoded to a binary array that is saved as a + file on the Virtual Machine. The maximum length of the binary array is + 65535 bytes.

    For using cloud-init for your VM, see [Using + cloud-init to customize a Linux VM during + creation](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-using-cloud-init?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json) + :type custom_data: str + :param windows_configuration: Specifies Windows operating system settings + on the virtual machine. + :type windows_configuration: + ~azure.mgmt.compute.v2018_06_01.models.WindowsConfiguration + :param linux_configuration: Specifies the Linux operating system settings + on the virtual machine.

    For a list of supported Linux + distributions, see [Linux on Azure-Endorsed + Distributions](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-endorsed-distros?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json) +

    For running non-endorsed distributions, see [Information for + Non-Endorsed + Distributions](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-create-upload-generic?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json). + :type linux_configuration: + ~azure.mgmt.compute.v2018_06_01.models.LinuxConfiguration + :param secrets: Specifies set of certificates that should be installed + onto the virtual machines in the scale set. + :type secrets: + list[~azure.mgmt.compute.v2018_06_01.models.VaultSecretGroup] + """ + + _attribute_map = { + 'computer_name_prefix': {'key': 'computerNamePrefix', 'type': 'str'}, + 'admin_username': {'key': 'adminUsername', 'type': 'str'}, + 'admin_password': {'key': 'adminPassword', 'type': 'str'}, + 'custom_data': {'key': 'customData', 'type': 'str'}, + 'windows_configuration': {'key': 'windowsConfiguration', 'type': 'WindowsConfiguration'}, + 'linux_configuration': {'key': 'linuxConfiguration', 'type': 'LinuxConfiguration'}, + 'secrets': {'key': 'secrets', 'type': '[VaultSecretGroup]'}, + } + + def __init__(self, **kwargs): + super(VirtualMachineScaleSetOSProfile, self).__init__(**kwargs) + self.computer_name_prefix = kwargs.get('computer_name_prefix', None) + self.admin_username = kwargs.get('admin_username', None) + self.admin_password = kwargs.get('admin_password', None) + self.custom_data = kwargs.get('custom_data', None) + self.windows_configuration = kwargs.get('windows_configuration', None) + self.linux_configuration = kwargs.get('linux_configuration', None) + self.secrets = kwargs.get('secrets', None) + + +class VirtualMachineScaleSetPublicIPAddressConfiguration(Model): + """Describes a virtual machines scale set IP Configuration's PublicIPAddress + configuration. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. The publicIP address configuration name. + :type name: str + :param idle_timeout_in_minutes: The idle timeout of the public IP address. + :type idle_timeout_in_minutes: int + :param dns_settings: The dns settings to be applied on the publicIP + addresses . + :type dns_settings: + ~azure.mgmt.compute.v2018_06_01.models.VirtualMachineScaleSetPublicIPAddressConfigurationDnsSettings + :param ip_tags: The list of IP tags associated with the public IP address. + :type ip_tags: + list[~azure.mgmt.compute.v2018_06_01.models.VirtualMachineScaleSetIpTag] + :param public_ip_prefix: The PublicIPPrefix from which to allocate + publicIP addresses. + :type public_ip_prefix: ~azure.mgmt.compute.v2018_06_01.models.SubResource + """ + + _validation = { + 'name': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'idle_timeout_in_minutes': {'key': 'properties.idleTimeoutInMinutes', 'type': 'int'}, + 'dns_settings': {'key': 'properties.dnsSettings', 'type': 'VirtualMachineScaleSetPublicIPAddressConfigurationDnsSettings'}, + 'ip_tags': {'key': 'properties.ipTags', 'type': '[VirtualMachineScaleSetIpTag]'}, + 'public_ip_prefix': {'key': 'properties.publicIPPrefix', 'type': 'SubResource'}, + } + + def __init__(self, **kwargs): + super(VirtualMachineScaleSetPublicIPAddressConfiguration, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.idle_timeout_in_minutes = kwargs.get('idle_timeout_in_minutes', None) + self.dns_settings = kwargs.get('dns_settings', None) + self.ip_tags = kwargs.get('ip_tags', None) + self.public_ip_prefix = kwargs.get('public_ip_prefix', None) + + +class VirtualMachineScaleSetPublicIPAddressConfigurationDnsSettings(Model): + """Describes a virtual machines scale sets network configuration's DNS + settings. + + All required parameters must be populated in order to send to Azure. + + :param domain_name_label: Required. The Domain name label.The + concatenation of the domain name label and vm index will be the domain + name labels of the PublicIPAddress resources that will be created + :type domain_name_label: str + """ + + _validation = { + 'domain_name_label': {'required': True}, + } + + _attribute_map = { + 'domain_name_label': {'key': 'domainNameLabel', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(VirtualMachineScaleSetPublicIPAddressConfigurationDnsSettings, self).__init__(**kwargs) + self.domain_name_label = kwargs.get('domain_name_label', None) + + +class VirtualMachineScaleSetVMReimageParameters(VirtualMachineReimageParameters): + """Describes a Virtual Machine Scale Set VM Reimage Parameters. + + :param temp_disk: Specifies whether to reimage temp disk. Default value: + false. Note: This temp disk reimage parameter is only supported for + VM/VMSS with Ephemeral OS disk. + :type temp_disk: bool + """ + + _attribute_map = { + 'temp_disk': {'key': 'tempDisk', 'type': 'bool'}, + } + + def __init__(self, **kwargs): + super(VirtualMachineScaleSetVMReimageParameters, self).__init__(**kwargs) + + +class VirtualMachineScaleSetReimageParameters(VirtualMachineScaleSetVMReimageParameters): + """Describes a Virtual Machine Scale Set VM Reimage Parameters. + + :param temp_disk: Specifies whether to reimage temp disk. Default value: + false. Note: This temp disk reimage parameter is only supported for + VM/VMSS with Ephemeral OS disk. + :type temp_disk: bool + :param instance_ids: The virtual machine scale set instance ids. Omitting + the virtual machine scale set instance ids will result in the operation + being performed on all virtual machines in the virtual machine scale set. + :type instance_ids: list[str] + """ + + _attribute_map = { + 'temp_disk': {'key': 'tempDisk', 'type': 'bool'}, + 'instance_ids': {'key': 'instanceIds', 'type': '[str]'}, + } + + def __init__(self, **kwargs): + super(VirtualMachineScaleSetReimageParameters, self).__init__(**kwargs) + self.instance_ids = kwargs.get('instance_ids', None) + + +class VirtualMachineScaleSetSku(Model): + """Describes an available virtual machine scale set sku. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar resource_type: The type of resource the sku applies to. + :vartype resource_type: str + :ivar sku: The Sku. + :vartype sku: ~azure.mgmt.compute.v2018_06_01.models.Sku + :ivar capacity: Specifies the number of virtual machines in the scale set. + :vartype capacity: + ~azure.mgmt.compute.v2018_06_01.models.VirtualMachineScaleSetSkuCapacity + """ + + _validation = { + 'resource_type': {'readonly': True}, + 'sku': {'readonly': True}, + 'capacity': {'readonly': True}, + } + + _attribute_map = { + 'resource_type': {'key': 'resourceType', 'type': 'str'}, + 'sku': {'key': 'sku', 'type': 'Sku'}, + 'capacity': {'key': 'capacity', 'type': 'VirtualMachineScaleSetSkuCapacity'}, + } + + def __init__(self, **kwargs): + super(VirtualMachineScaleSetSku, self).__init__(**kwargs) + self.resource_type = None + self.sku = None + self.capacity = None + + +class VirtualMachineScaleSetSkuCapacity(Model): + """Describes scaling information of a sku. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar minimum: The minimum capacity. + :vartype minimum: long + :ivar maximum: The maximum capacity that can be set. + :vartype maximum: long + :ivar default_capacity: The default capacity. + :vartype default_capacity: long + :ivar scale_type: The scale type applicable to the sku. Possible values + include: 'Automatic', 'None' + :vartype scale_type: str or + ~azure.mgmt.compute.v2018_06_01.models.VirtualMachineScaleSetSkuScaleType + """ + + _validation = { + 'minimum': {'readonly': True}, + 'maximum': {'readonly': True}, + 'default_capacity': {'readonly': True}, + 'scale_type': {'readonly': True}, + } + + _attribute_map = { + 'minimum': {'key': 'minimum', 'type': 'long'}, + 'maximum': {'key': 'maximum', 'type': 'long'}, + 'default_capacity': {'key': 'defaultCapacity', 'type': 'long'}, + 'scale_type': {'key': 'scaleType', 'type': 'VirtualMachineScaleSetSkuScaleType'}, + } + + def __init__(self, **kwargs): + super(VirtualMachineScaleSetSkuCapacity, self).__init__(**kwargs) + self.minimum = None + self.maximum = None + self.default_capacity = None + self.scale_type = None + + +class VirtualMachineScaleSetStorageProfile(Model): + """Describes a virtual machine scale set storage profile. + + :param image_reference: Specifies information about the image to use. You + can specify information about platform images, marketplace images, or + virtual machine images. This element is required when you want to use a + platform image, marketplace image, or virtual machine image, but is not + used in other creation operations. + :type image_reference: + ~azure.mgmt.compute.v2018_06_01.models.ImageReference + :param os_disk: Specifies information about the operating system disk used + by the virtual machines in the scale set.

    For more information + about disks, see [About disks and VHDs for Azure virtual + machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-about-disks-vhds?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). + :type os_disk: + ~azure.mgmt.compute.v2018_06_01.models.VirtualMachineScaleSetOSDisk + :param data_disks: Specifies the parameters that are used to add data + disks to the virtual machines in the scale set.

    For more + information about disks, see [About disks and VHDs for Azure virtual + machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-about-disks-vhds?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). + :type data_disks: + list[~azure.mgmt.compute.v2018_06_01.models.VirtualMachineScaleSetDataDisk] + """ + + _attribute_map = { + 'image_reference': {'key': 'imageReference', 'type': 'ImageReference'}, + 'os_disk': {'key': 'osDisk', 'type': 'VirtualMachineScaleSetOSDisk'}, + 'data_disks': {'key': 'dataDisks', 'type': '[VirtualMachineScaleSetDataDisk]'}, + } + + def __init__(self, **kwargs): + super(VirtualMachineScaleSetStorageProfile, self).__init__(**kwargs) + self.image_reference = kwargs.get('image_reference', None) + self.os_disk = kwargs.get('os_disk', None) + self.data_disks = kwargs.get('data_disks', None) + + +class VirtualMachineScaleSetUpdate(UpdateResource): + """Describes a Virtual Machine Scale Set. + + :param tags: Resource tags + :type tags: dict[str, str] + :param sku: The virtual machine scale set sku. + :type sku: ~azure.mgmt.compute.v2018_06_01.models.Sku + :param plan: The purchase plan when deploying a virtual machine scale set + from VM Marketplace images. + :type plan: ~azure.mgmt.compute.v2018_06_01.models.Plan + :param upgrade_policy: The upgrade policy. + :type upgrade_policy: ~azure.mgmt.compute.v2018_06_01.models.UpgradePolicy + :param virtual_machine_profile: The virtual machine profile. + :type virtual_machine_profile: + ~azure.mgmt.compute.v2018_06_01.models.VirtualMachineScaleSetUpdateVMProfile + :param overprovision: Specifies whether the Virtual Machine Scale Set + should be overprovisioned. + :type overprovision: bool + :param single_placement_group: When true this limits the scale set to a + single placement group, of max size 100 virtual machines. + :type single_placement_group: bool + :param identity: The identity of the virtual machine scale set, if + configured. + :type identity: + ~azure.mgmt.compute.v2018_06_01.models.VirtualMachineScaleSetIdentity + """ + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + 'sku': {'key': 'sku', 'type': 'Sku'}, + 'plan': {'key': 'plan', 'type': 'Plan'}, + 'upgrade_policy': {'key': 'properties.upgradePolicy', 'type': 'UpgradePolicy'}, + 'virtual_machine_profile': {'key': 'properties.virtualMachineProfile', 'type': 'VirtualMachineScaleSetUpdateVMProfile'}, + 'overprovision': {'key': 'properties.overprovision', 'type': 'bool'}, + 'single_placement_group': {'key': 'properties.singlePlacementGroup', 'type': 'bool'}, + 'identity': {'key': 'identity', 'type': 'VirtualMachineScaleSetIdentity'}, + } + + def __init__(self, **kwargs): + super(VirtualMachineScaleSetUpdate, self).__init__(**kwargs) + self.sku = kwargs.get('sku', None) + self.plan = kwargs.get('plan', None) + self.upgrade_policy = kwargs.get('upgrade_policy', None) + self.virtual_machine_profile = kwargs.get('virtual_machine_profile', None) + self.overprovision = kwargs.get('overprovision', None) + self.single_placement_group = kwargs.get('single_placement_group', None) + self.identity = kwargs.get('identity', None) + + +class VirtualMachineScaleSetUpdateIPConfiguration(SubResource): + """Describes a virtual machine scale set network profile's IP configuration. + + :param id: Resource Id + :type id: str + :param name: The IP configuration name. + :type name: str + :param subnet: The subnet. + :type subnet: ~azure.mgmt.compute.v2018_06_01.models.ApiEntityReference + :param primary: Specifies the primary IP Configuration in case the network + interface has more than one IP Configuration. + :type primary: bool + :param public_ip_address_configuration: The publicIPAddressConfiguration. + :type public_ip_address_configuration: + ~azure.mgmt.compute.v2018_06_01.models.VirtualMachineScaleSetUpdatePublicIPAddressConfiguration + :param private_ip_address_version: Available from Api-Version 2017-03-30 + onwards, it represents whether the specific ipconfiguration is IPv4 or + IPv6. Default is taken as IPv4. Possible values are: 'IPv4' and 'IPv6'. + Possible values include: 'IPv4', 'IPv6' + :type private_ip_address_version: str or + ~azure.mgmt.compute.v2018_06_01.models.IPVersion + :param application_gateway_backend_address_pools: The application gateway + backend address pools. + :type application_gateway_backend_address_pools: + list[~azure.mgmt.compute.v2018_06_01.models.SubResource] + :param application_security_groups: Specifies an array of references to + application security group. + :type application_security_groups: + list[~azure.mgmt.compute.v2018_06_01.models.SubResource] + :param load_balancer_backend_address_pools: The load balancer backend + address pools. + :type load_balancer_backend_address_pools: + list[~azure.mgmt.compute.v2018_06_01.models.SubResource] + :param load_balancer_inbound_nat_pools: The load balancer inbound nat + pools. + :type load_balancer_inbound_nat_pools: + list[~azure.mgmt.compute.v2018_06_01.models.SubResource] + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'subnet': {'key': 'properties.subnet', 'type': 'ApiEntityReference'}, + 'primary': {'key': 'properties.primary', 'type': 'bool'}, + 'public_ip_address_configuration': {'key': 'properties.publicIPAddressConfiguration', 'type': 'VirtualMachineScaleSetUpdatePublicIPAddressConfiguration'}, + 'private_ip_address_version': {'key': 'properties.privateIPAddressVersion', 'type': 'str'}, + 'application_gateway_backend_address_pools': {'key': 'properties.applicationGatewayBackendAddressPools', 'type': '[SubResource]'}, + 'application_security_groups': {'key': 'properties.applicationSecurityGroups', 'type': '[SubResource]'}, + 'load_balancer_backend_address_pools': {'key': 'properties.loadBalancerBackendAddressPools', 'type': '[SubResource]'}, + 'load_balancer_inbound_nat_pools': {'key': 'properties.loadBalancerInboundNatPools', 'type': '[SubResource]'}, + } + + def __init__(self, **kwargs): + super(VirtualMachineScaleSetUpdateIPConfiguration, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.subnet = kwargs.get('subnet', None) + self.primary = kwargs.get('primary', None) + self.public_ip_address_configuration = kwargs.get('public_ip_address_configuration', None) + self.private_ip_address_version = kwargs.get('private_ip_address_version', None) + self.application_gateway_backend_address_pools = kwargs.get('application_gateway_backend_address_pools', None) + self.application_security_groups = kwargs.get('application_security_groups', None) + self.load_balancer_backend_address_pools = kwargs.get('load_balancer_backend_address_pools', None) + self.load_balancer_inbound_nat_pools = kwargs.get('load_balancer_inbound_nat_pools', None) + + +class VirtualMachineScaleSetUpdateNetworkConfiguration(SubResource): + """Describes a virtual machine scale set network profile's network + configurations. + + :param id: Resource Id + :type id: str + :param name: The network configuration name. + :type name: str + :param primary: Whether this is a primary NIC on a virtual machine. + :type primary: bool + :param enable_accelerated_networking: Specifies whether the network + interface is accelerated networking-enabled. + :type enable_accelerated_networking: bool + :param network_security_group: The network security group. + :type network_security_group: + ~azure.mgmt.compute.v2018_06_01.models.SubResource + :param dns_settings: The dns settings to be applied on the network + interfaces. + :type dns_settings: + ~azure.mgmt.compute.v2018_06_01.models.VirtualMachineScaleSetNetworkConfigurationDnsSettings + :param ip_configurations: The virtual machine scale set IP Configuration. + :type ip_configurations: + list[~azure.mgmt.compute.v2018_06_01.models.VirtualMachineScaleSetUpdateIPConfiguration] + :param enable_ip_forwarding: Whether IP forwarding enabled on this NIC. + :type enable_ip_forwarding: bool + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'primary': {'key': 'properties.primary', 'type': 'bool'}, + 'enable_accelerated_networking': {'key': 'properties.enableAcceleratedNetworking', 'type': 'bool'}, + 'network_security_group': {'key': 'properties.networkSecurityGroup', 'type': 'SubResource'}, + 'dns_settings': {'key': 'properties.dnsSettings', 'type': 'VirtualMachineScaleSetNetworkConfigurationDnsSettings'}, + 'ip_configurations': {'key': 'properties.ipConfigurations', 'type': '[VirtualMachineScaleSetUpdateIPConfiguration]'}, + 'enable_ip_forwarding': {'key': 'properties.enableIPForwarding', 'type': 'bool'}, + } + + def __init__(self, **kwargs): + super(VirtualMachineScaleSetUpdateNetworkConfiguration, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.primary = kwargs.get('primary', None) + self.enable_accelerated_networking = kwargs.get('enable_accelerated_networking', None) + self.network_security_group = kwargs.get('network_security_group', None) + self.dns_settings = kwargs.get('dns_settings', None) + self.ip_configurations = kwargs.get('ip_configurations', None) + self.enable_ip_forwarding = kwargs.get('enable_ip_forwarding', None) + + +class VirtualMachineScaleSetUpdateNetworkProfile(Model): + """Describes a virtual machine scale set network profile. + + :param network_interface_configurations: The list of network + configurations. + :type network_interface_configurations: + list[~azure.mgmt.compute.v2018_06_01.models.VirtualMachineScaleSetUpdateNetworkConfiguration] + """ + + _attribute_map = { + 'network_interface_configurations': {'key': 'networkInterfaceConfigurations', 'type': '[VirtualMachineScaleSetUpdateNetworkConfiguration]'}, + } + + def __init__(self, **kwargs): + super(VirtualMachineScaleSetUpdateNetworkProfile, self).__init__(**kwargs) + self.network_interface_configurations = kwargs.get('network_interface_configurations', None) + + +class VirtualMachineScaleSetUpdateOSDisk(Model): + """Describes virtual machine scale set operating system disk Update Object. + This should be used for Updating VMSS OS Disk. + + :param caching: The caching type. Possible values include: 'None', + 'ReadOnly', 'ReadWrite' + :type caching: str or ~azure.mgmt.compute.v2018_06_01.models.CachingTypes + :param write_accelerator_enabled: Specifies whether writeAccelerator + should be enabled or disabled on the disk. + :type write_accelerator_enabled: bool + :param disk_size_gb: Specifies the size of the operating system disk in + gigabytes. This element can be used to overwrite the size of the disk in a + virtual machine image.

    This value cannot be larger than 1023 GB + :type disk_size_gb: int + :param image: The Source User Image VirtualHardDisk. This VirtualHardDisk + will be copied before using it to attach to the Virtual Machine. If + SourceImage is provided, the destination VirtualHardDisk should not exist. + :type image: ~azure.mgmt.compute.v2018_06_01.models.VirtualHardDisk + :param vhd_containers: The list of virtual hard disk container uris. + :type vhd_containers: list[str] + :param managed_disk: The managed disk parameters. + :type managed_disk: + ~azure.mgmt.compute.v2018_06_01.models.VirtualMachineScaleSetManagedDiskParameters + """ + + _attribute_map = { + 'caching': {'key': 'caching', 'type': 'CachingTypes'}, + 'write_accelerator_enabled': {'key': 'writeAcceleratorEnabled', 'type': 'bool'}, + 'disk_size_gb': {'key': 'diskSizeGB', 'type': 'int'}, + 'image': {'key': 'image', 'type': 'VirtualHardDisk'}, + 'vhd_containers': {'key': 'vhdContainers', 'type': '[str]'}, + 'managed_disk': {'key': 'managedDisk', 'type': 'VirtualMachineScaleSetManagedDiskParameters'}, + } + + def __init__(self, **kwargs): + super(VirtualMachineScaleSetUpdateOSDisk, self).__init__(**kwargs) + self.caching = kwargs.get('caching', None) + self.write_accelerator_enabled = kwargs.get('write_accelerator_enabled', None) + self.disk_size_gb = kwargs.get('disk_size_gb', None) + self.image = kwargs.get('image', None) + self.vhd_containers = kwargs.get('vhd_containers', None) + self.managed_disk = kwargs.get('managed_disk', None) + + +class VirtualMachineScaleSetUpdateOSProfile(Model): + """Describes a virtual machine scale set OS profile. + + :param custom_data: A base-64 encoded string of custom data. + :type custom_data: str + :param windows_configuration: The Windows Configuration of the OS profile. + :type windows_configuration: + ~azure.mgmt.compute.v2018_06_01.models.WindowsConfiguration + :param linux_configuration: The Linux Configuration of the OS profile. + :type linux_configuration: + ~azure.mgmt.compute.v2018_06_01.models.LinuxConfiguration + :param secrets: The List of certificates for addition to the VM. + :type secrets: + list[~azure.mgmt.compute.v2018_06_01.models.VaultSecretGroup] + """ + + _attribute_map = { + 'custom_data': {'key': 'customData', 'type': 'str'}, + 'windows_configuration': {'key': 'windowsConfiguration', 'type': 'WindowsConfiguration'}, + 'linux_configuration': {'key': 'linuxConfiguration', 'type': 'LinuxConfiguration'}, + 'secrets': {'key': 'secrets', 'type': '[VaultSecretGroup]'}, + } + + def __init__(self, **kwargs): + super(VirtualMachineScaleSetUpdateOSProfile, self).__init__(**kwargs) + self.custom_data = kwargs.get('custom_data', None) + self.windows_configuration = kwargs.get('windows_configuration', None) + self.linux_configuration = kwargs.get('linux_configuration', None) + self.secrets = kwargs.get('secrets', None) + + +class VirtualMachineScaleSetUpdatePublicIPAddressConfiguration(Model): + """Describes a virtual machines scale set IP Configuration's PublicIPAddress + configuration. + + :param name: The publicIP address configuration name. + :type name: str + :param idle_timeout_in_minutes: The idle timeout of the public IP address. + :type idle_timeout_in_minutes: int + :param dns_settings: The dns settings to be applied on the publicIP + addresses . + :type dns_settings: + ~azure.mgmt.compute.v2018_06_01.models.VirtualMachineScaleSetPublicIPAddressConfigurationDnsSettings + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'idle_timeout_in_minutes': {'key': 'properties.idleTimeoutInMinutes', 'type': 'int'}, + 'dns_settings': {'key': 'properties.dnsSettings', 'type': 'VirtualMachineScaleSetPublicIPAddressConfigurationDnsSettings'}, + } + + def __init__(self, **kwargs): + super(VirtualMachineScaleSetUpdatePublicIPAddressConfiguration, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.idle_timeout_in_minutes = kwargs.get('idle_timeout_in_minutes', None) + self.dns_settings = kwargs.get('dns_settings', None) + + +class VirtualMachineScaleSetUpdateStorageProfile(Model): + """Describes a virtual machine scale set storage profile. + + :param image_reference: The image reference. + :type image_reference: + ~azure.mgmt.compute.v2018_06_01.models.ImageReference + :param os_disk: The OS disk. + :type os_disk: + ~azure.mgmt.compute.v2018_06_01.models.VirtualMachineScaleSetUpdateOSDisk + :param data_disks: The data disks. + :type data_disks: + list[~azure.mgmt.compute.v2018_06_01.models.VirtualMachineScaleSetDataDisk] + """ + + _attribute_map = { + 'image_reference': {'key': 'imageReference', 'type': 'ImageReference'}, + 'os_disk': {'key': 'osDisk', 'type': 'VirtualMachineScaleSetUpdateOSDisk'}, + 'data_disks': {'key': 'dataDisks', 'type': '[VirtualMachineScaleSetDataDisk]'}, + } + + def __init__(self, **kwargs): + super(VirtualMachineScaleSetUpdateStorageProfile, self).__init__(**kwargs) + self.image_reference = kwargs.get('image_reference', None) + self.os_disk = kwargs.get('os_disk', None) + self.data_disks = kwargs.get('data_disks', None) + + +class VirtualMachineScaleSetUpdateVMProfile(Model): + """Describes a virtual machine scale set virtual machine profile. + + :param os_profile: The virtual machine scale set OS profile. + :type os_profile: + ~azure.mgmt.compute.v2018_06_01.models.VirtualMachineScaleSetUpdateOSProfile + :param storage_profile: The virtual machine scale set storage profile. + :type storage_profile: + ~azure.mgmt.compute.v2018_06_01.models.VirtualMachineScaleSetUpdateStorageProfile + :param network_profile: The virtual machine scale set network profile. + :type network_profile: + ~azure.mgmt.compute.v2018_06_01.models.VirtualMachineScaleSetUpdateNetworkProfile + :param diagnostics_profile: The virtual machine scale set diagnostics + profile. + :type diagnostics_profile: + ~azure.mgmt.compute.v2018_06_01.models.DiagnosticsProfile + :param extension_profile: The virtual machine scale set extension profile. + :type extension_profile: + ~azure.mgmt.compute.v2018_06_01.models.VirtualMachineScaleSetExtensionProfile + :param license_type: The license type, which is for bring your own license + scenario. + :type license_type: str + """ + + _attribute_map = { + 'os_profile': {'key': 'osProfile', 'type': 'VirtualMachineScaleSetUpdateOSProfile'}, + 'storage_profile': {'key': 'storageProfile', 'type': 'VirtualMachineScaleSetUpdateStorageProfile'}, + 'network_profile': {'key': 'networkProfile', 'type': 'VirtualMachineScaleSetUpdateNetworkProfile'}, + 'diagnostics_profile': {'key': 'diagnosticsProfile', 'type': 'DiagnosticsProfile'}, + 'extension_profile': {'key': 'extensionProfile', 'type': 'VirtualMachineScaleSetExtensionProfile'}, + 'license_type': {'key': 'licenseType', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(VirtualMachineScaleSetUpdateVMProfile, self).__init__(**kwargs) + self.os_profile = kwargs.get('os_profile', None) + self.storage_profile = kwargs.get('storage_profile', None) + self.network_profile = kwargs.get('network_profile', None) + self.diagnostics_profile = kwargs.get('diagnostics_profile', None) + self.extension_profile = kwargs.get('extension_profile', None) + self.license_type = kwargs.get('license_type', None) + + +class VirtualMachineScaleSetVM(Resource): + """Describes a virtual machine scale set virtual machine. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource Id + :vartype id: str + :ivar name: Resource name + :vartype name: str + :ivar type: Resource type + :vartype type: str + :param location: Required. Resource location + :type location: str + :param tags: Resource tags + :type tags: dict[str, str] + :ivar instance_id: The virtual machine instance ID. + :vartype instance_id: str + :ivar sku: The virtual machine SKU. + :vartype sku: ~azure.mgmt.compute.v2018_06_01.models.Sku + :ivar latest_model_applied: Specifies whether the latest model has been + applied to the virtual machine. + :vartype latest_model_applied: bool + :ivar vm_id: Azure VM unique ID. + :vartype vm_id: str + :ivar instance_view: The virtual machine instance view. + :vartype instance_view: + ~azure.mgmt.compute.v2018_06_01.models.VirtualMachineScaleSetVMInstanceView + :param hardware_profile: Specifies the hardware settings for the virtual + machine. + :type hardware_profile: + ~azure.mgmt.compute.v2018_06_01.models.HardwareProfile + :param storage_profile: Specifies the storage settings for the virtual + machine disks. + :type storage_profile: + ~azure.mgmt.compute.v2018_06_01.models.StorageProfile + :param additional_capabilities: Specifies additional capabilities enabled + or disabled on the virtual machine in the scale set. For instance: whether + the virtual machine has the capability to support attaching managed data + disks with UltraSSD_LRS storage account type. + :type additional_capabilities: + ~azure.mgmt.compute.v2018_06_01.models.AdditionalCapabilities + :param os_profile: Specifies the operating system settings for the virtual + machine. + :type os_profile: ~azure.mgmt.compute.v2018_06_01.models.OSProfile + :param network_profile: Specifies the network interfaces of the virtual + machine. + :type network_profile: + ~azure.mgmt.compute.v2018_06_01.models.NetworkProfile + :param diagnostics_profile: Specifies the boot diagnostic settings state. +

    Minimum api-version: 2015-06-15. + :type diagnostics_profile: + ~azure.mgmt.compute.v2018_06_01.models.DiagnosticsProfile + :param availability_set: Specifies information about the availability set + that the virtual machine should be assigned to. Virtual machines specified + in the same availability set are allocated to different nodes to maximize + availability. For more information about availability sets, see [Manage + the availability of virtual + machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-manage-availability?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). +

    For more information on Azure planned maintenance, see [Planned + maintenance for virtual machines in + Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-planned-maintenance?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json) +

    Currently, a VM can only be added to availability set at creation + time. An existing VM cannot be added to an availability set. + :type availability_set: ~azure.mgmt.compute.v2018_06_01.models.SubResource + :ivar provisioning_state: The provisioning state, which only appears in + the response. + :vartype provisioning_state: str + :param license_type: Specifies that the image or disk that is being used + was licensed on-premises. This element is only used for images that + contain the Windows Server operating system.

    Possible values are: +

    Windows_Client

    Windows_Server

    If this element + is included in a request for an update, the value must match the initial + value. This value cannot be updated.

    For more information, see + [Azure Hybrid Use Benefit for Windows + Server](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-hybrid-use-benefit-licensing?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json) +

    Minimum api-version: 2015-06-15 + :type license_type: str + :param plan: Specifies information about the marketplace image used to + create the virtual machine. This element is only used for marketplace + images. Before you can use a marketplace image from an API, you must + enable the image for programmatic use. In the Azure portal, find the + marketplace image that you want to use and then click **Want to deploy + programmatically, Get Started ->**. Enter any required information and + then click **Save**. + :type plan: ~azure.mgmt.compute.v2018_06_01.models.Plan + :ivar resources: The virtual machine child extension resources. + :vartype resources: + list[~azure.mgmt.compute.v2018_06_01.models.VirtualMachineExtension] + :ivar zones: The virtual machine zones. + :vartype zones: list[str] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + 'instance_id': {'readonly': True}, + 'sku': {'readonly': True}, + 'latest_model_applied': {'readonly': True}, + 'vm_id': {'readonly': True}, + 'instance_view': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + 'resources': {'readonly': True}, + 'zones': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'instance_id': {'key': 'instanceId', 'type': 'str'}, + 'sku': {'key': 'sku', 'type': 'Sku'}, + 'latest_model_applied': {'key': 'properties.latestModelApplied', 'type': 'bool'}, + 'vm_id': {'key': 'properties.vmId', 'type': 'str'}, + 'instance_view': {'key': 'properties.instanceView', 'type': 'VirtualMachineScaleSetVMInstanceView'}, + 'hardware_profile': {'key': 'properties.hardwareProfile', 'type': 'HardwareProfile'}, + 'storage_profile': {'key': 'properties.storageProfile', 'type': 'StorageProfile'}, + 'additional_capabilities': {'key': 'properties.additionalCapabilities', 'type': 'AdditionalCapabilities'}, + 'os_profile': {'key': 'properties.osProfile', 'type': 'OSProfile'}, + 'network_profile': {'key': 'properties.networkProfile', 'type': 'NetworkProfile'}, + 'diagnostics_profile': {'key': 'properties.diagnosticsProfile', 'type': 'DiagnosticsProfile'}, + 'availability_set': {'key': 'properties.availabilitySet', 'type': 'SubResource'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'license_type': {'key': 'properties.licenseType', 'type': 'str'}, + 'plan': {'key': 'plan', 'type': 'Plan'}, + 'resources': {'key': 'resources', 'type': '[VirtualMachineExtension]'}, + 'zones': {'key': 'zones', 'type': '[str]'}, + } + + def __init__(self, **kwargs): + super(VirtualMachineScaleSetVM, self).__init__(**kwargs) + self.instance_id = None + self.sku = None + self.latest_model_applied = None + self.vm_id = None + self.instance_view = None + self.hardware_profile = kwargs.get('hardware_profile', None) + self.storage_profile = kwargs.get('storage_profile', None) + self.additional_capabilities = kwargs.get('additional_capabilities', None) + self.os_profile = kwargs.get('os_profile', None) + self.network_profile = kwargs.get('network_profile', None) + self.diagnostics_profile = kwargs.get('diagnostics_profile', None) + self.availability_set = kwargs.get('availability_set', None) + self.provisioning_state = None + self.license_type = kwargs.get('license_type', None) + self.plan = kwargs.get('plan', None) + self.resources = None + self.zones = None + + +class VirtualMachineScaleSetVMExtensionsSummary(Model): + """Extensions summary for virtual machines of a virtual machine scale set. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar name: The extension name. + :vartype name: str + :ivar statuses_summary: The extensions information. + :vartype statuses_summary: + list[~azure.mgmt.compute.v2018_06_01.models.VirtualMachineStatusCodeCount] + """ + + _validation = { + 'name': {'readonly': True}, + 'statuses_summary': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'statuses_summary': {'key': 'statusesSummary', 'type': '[VirtualMachineStatusCodeCount]'}, + } + + def __init__(self, **kwargs): + super(VirtualMachineScaleSetVMExtensionsSummary, self).__init__(**kwargs) + self.name = None + self.statuses_summary = None + + +class VirtualMachineScaleSetVMInstanceIDs(Model): + """Specifies a list of virtual machine instance IDs from the VM scale set. + + :param instance_ids: The virtual machine scale set instance ids. Omitting + the virtual machine scale set instance ids will result in the operation + being performed on all virtual machines in the virtual machine scale set. + :type instance_ids: list[str] + """ + + _attribute_map = { + 'instance_ids': {'key': 'instanceIds', 'type': '[str]'}, + } + + def __init__(self, **kwargs): + super(VirtualMachineScaleSetVMInstanceIDs, self).__init__(**kwargs) + self.instance_ids = kwargs.get('instance_ids', None) + + +class VirtualMachineScaleSetVMInstanceRequiredIDs(Model): + """Specifies a list of virtual machine instance IDs from the VM scale set. + + All required parameters must be populated in order to send to Azure. + + :param instance_ids: Required. The virtual machine scale set instance ids. + :type instance_ids: list[str] + """ + + _validation = { + 'instance_ids': {'required': True}, + } + + _attribute_map = { + 'instance_ids': {'key': 'instanceIds', 'type': '[str]'}, + } + + def __init__(self, **kwargs): + super(VirtualMachineScaleSetVMInstanceRequiredIDs, self).__init__(**kwargs) + self.instance_ids = kwargs.get('instance_ids', None) + + +class VirtualMachineScaleSetVMInstanceView(Model): + """The instance view of a virtual machine scale set VM. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :param platform_update_domain: The Update Domain count. + :type platform_update_domain: int + :param platform_fault_domain: The Fault Domain count. + :type platform_fault_domain: int + :param rdp_thumb_print: The Remote desktop certificate thumbprint. + :type rdp_thumb_print: str + :param vm_agent: The VM Agent running on the virtual machine. + :type vm_agent: + ~azure.mgmt.compute.v2018_06_01.models.VirtualMachineAgentInstanceView + :param maintenance_redeploy_status: The Maintenance Operation status on + the virtual machine. + :type maintenance_redeploy_status: + ~azure.mgmt.compute.v2018_06_01.models.MaintenanceRedeployStatus + :param disks: The disks information. + :type disks: list[~azure.mgmt.compute.v2018_06_01.models.DiskInstanceView] + :param extensions: The extensions information. + :type extensions: + list[~azure.mgmt.compute.v2018_06_01.models.VirtualMachineExtensionInstanceView] + :ivar vm_health: The health status for the VM. + :vartype vm_health: + ~azure.mgmt.compute.v2018_06_01.models.VirtualMachineHealthStatus + :param boot_diagnostics: Boot Diagnostics is a debugging feature which + allows you to view Console Output and Screenshot to diagnose VM status. +

    You can easily view the output of your console log.

    + Azure also enables you to see a screenshot of the VM from the hypervisor. + :type boot_diagnostics: + ~azure.mgmt.compute.v2018_06_01.models.BootDiagnosticsInstanceView + :param statuses: The resource status information. + :type statuses: + list[~azure.mgmt.compute.v2018_06_01.models.InstanceViewStatus] + :param placement_group_id: The placement group in which the VM is running. + If the VM is deallocated it will not have a placementGroupId. + :type placement_group_id: str + """ + + _validation = { + 'vm_health': {'readonly': True}, + } + + _attribute_map = { + 'platform_update_domain': {'key': 'platformUpdateDomain', 'type': 'int'}, + 'platform_fault_domain': {'key': 'platformFaultDomain', 'type': 'int'}, + 'rdp_thumb_print': {'key': 'rdpThumbPrint', 'type': 'str'}, + 'vm_agent': {'key': 'vmAgent', 'type': 'VirtualMachineAgentInstanceView'}, + 'maintenance_redeploy_status': {'key': 'maintenanceRedeployStatus', 'type': 'MaintenanceRedeployStatus'}, + 'disks': {'key': 'disks', 'type': '[DiskInstanceView]'}, + 'extensions': {'key': 'extensions', 'type': '[VirtualMachineExtensionInstanceView]'}, + 'vm_health': {'key': 'vmHealth', 'type': 'VirtualMachineHealthStatus'}, + 'boot_diagnostics': {'key': 'bootDiagnostics', 'type': 'BootDiagnosticsInstanceView'}, + 'statuses': {'key': 'statuses', 'type': '[InstanceViewStatus]'}, + 'placement_group_id': {'key': 'placementGroupId', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(VirtualMachineScaleSetVMInstanceView, self).__init__(**kwargs) + self.platform_update_domain = kwargs.get('platform_update_domain', None) + self.platform_fault_domain = kwargs.get('platform_fault_domain', None) + self.rdp_thumb_print = kwargs.get('rdp_thumb_print', None) + self.vm_agent = kwargs.get('vm_agent', None) + self.maintenance_redeploy_status = kwargs.get('maintenance_redeploy_status', None) + self.disks = kwargs.get('disks', None) + self.extensions = kwargs.get('extensions', None) + self.vm_health = None + self.boot_diagnostics = kwargs.get('boot_diagnostics', None) + self.statuses = kwargs.get('statuses', None) + self.placement_group_id = kwargs.get('placement_group_id', None) + + +class VirtualMachineScaleSetVMProfile(Model): + """Describes a virtual machine scale set virtual machine profile. + + :param os_profile: Specifies the operating system settings for the virtual + machines in the scale set. + :type os_profile: + ~azure.mgmt.compute.v2018_06_01.models.VirtualMachineScaleSetOSProfile + :param storage_profile: Specifies the storage settings for the virtual + machine disks. + :type storage_profile: + ~azure.mgmt.compute.v2018_06_01.models.VirtualMachineScaleSetStorageProfile + :param additional_capabilities: Specifies additional capabilities enabled + or disabled on the virtual machine in the scale set. For instance: whether + the virtual machine has the capability to support attaching managed data + disks with UltraSSD_LRS storage account type. + :type additional_capabilities: + ~azure.mgmt.compute.v2018_06_01.models.AdditionalCapabilities + :param network_profile: Specifies properties of the network interfaces of + the virtual machines in the scale set. + :type network_profile: + ~azure.mgmt.compute.v2018_06_01.models.VirtualMachineScaleSetNetworkProfile + :param diagnostics_profile: Specifies the boot diagnostic settings state. +

    Minimum api-version: 2015-06-15. + :type diagnostics_profile: + ~azure.mgmt.compute.v2018_06_01.models.DiagnosticsProfile + :param extension_profile: Specifies a collection of settings for + extensions installed on virtual machines in the scale set. + :type extension_profile: + ~azure.mgmt.compute.v2018_06_01.models.VirtualMachineScaleSetExtensionProfile + :param license_type: Specifies that the image or disk that is being used + was licensed on-premises. This element is only used for images that + contain the Windows Server operating system.

    Possible values are: +

    Windows_Client

    Windows_Server

    If this element + is included in a request for an update, the value must match the initial + value. This value cannot be updated.

    For more information, see + [Azure Hybrid Use Benefit for Windows + Server](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-hybrid-use-benefit-licensing?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json) +

    Minimum api-version: 2015-06-15 + :type license_type: str + :param priority: Specifies the priority for the virtual machines in the + scale set.

    Minimum api-version: 2017-10-30-preview. Possible + values include: 'Regular', 'Low' + :type priority: str or + ~azure.mgmt.compute.v2018_06_01.models.VirtualMachinePriorityTypes + :param eviction_policy: Specifies the eviction policy for virtual machines + in a low priority scale set.

    Minimum api-version: + 2017-10-30-preview. Possible values include: 'Deallocate', 'Delete' + :type eviction_policy: str or + ~azure.mgmt.compute.v2018_06_01.models.VirtualMachineEvictionPolicyTypes + """ + + _attribute_map = { + 'os_profile': {'key': 'osProfile', 'type': 'VirtualMachineScaleSetOSProfile'}, + 'storage_profile': {'key': 'storageProfile', 'type': 'VirtualMachineScaleSetStorageProfile'}, + 'additional_capabilities': {'key': 'additionalCapabilities', 'type': 'AdditionalCapabilities'}, + 'network_profile': {'key': 'networkProfile', 'type': 'VirtualMachineScaleSetNetworkProfile'}, + 'diagnostics_profile': {'key': 'diagnosticsProfile', 'type': 'DiagnosticsProfile'}, + 'extension_profile': {'key': 'extensionProfile', 'type': 'VirtualMachineScaleSetExtensionProfile'}, + 'license_type': {'key': 'licenseType', 'type': 'str'}, + 'priority': {'key': 'priority', 'type': 'str'}, + 'eviction_policy': {'key': 'evictionPolicy', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(VirtualMachineScaleSetVMProfile, self).__init__(**kwargs) + self.os_profile = kwargs.get('os_profile', None) + self.storage_profile = kwargs.get('storage_profile', None) + self.additional_capabilities = kwargs.get('additional_capabilities', None) + self.network_profile = kwargs.get('network_profile', None) + self.diagnostics_profile = kwargs.get('diagnostics_profile', None) + self.extension_profile = kwargs.get('extension_profile', None) + self.license_type = kwargs.get('license_type', None) + self.priority = kwargs.get('priority', None) + self.eviction_policy = kwargs.get('eviction_policy', None) + + +class VirtualMachineSize(Model): + """Describes the properties of a VM size. + + :param name: The name of the virtual machine size. + :type name: str + :param number_of_cores: The number of cores supported by the virtual + machine size. + :type number_of_cores: int + :param os_disk_size_in_mb: The OS disk size, in MB, allowed by the virtual + machine size. + :type os_disk_size_in_mb: int + :param resource_disk_size_in_mb: The resource disk size, in MB, allowed by + the virtual machine size. + :type resource_disk_size_in_mb: int + :param memory_in_mb: The amount of memory, in MB, supported by the virtual + machine size. + :type memory_in_mb: int + :param max_data_disk_count: The maximum number of data disks that can be + attached to the virtual machine size. + :type max_data_disk_count: int + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'number_of_cores': {'key': 'numberOfCores', 'type': 'int'}, + 'os_disk_size_in_mb': {'key': 'osDiskSizeInMB', 'type': 'int'}, + 'resource_disk_size_in_mb': {'key': 'resourceDiskSizeInMB', 'type': 'int'}, + 'memory_in_mb': {'key': 'memoryInMB', 'type': 'int'}, + 'max_data_disk_count': {'key': 'maxDataDiskCount', 'type': 'int'}, + } + + def __init__(self, **kwargs): + super(VirtualMachineSize, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.number_of_cores = kwargs.get('number_of_cores', None) + self.os_disk_size_in_mb = kwargs.get('os_disk_size_in_mb', None) + self.resource_disk_size_in_mb = kwargs.get('resource_disk_size_in_mb', None) + self.memory_in_mb = kwargs.get('memory_in_mb', None) + self.max_data_disk_count = kwargs.get('max_data_disk_count', None) + + +class VirtualMachineStatusCodeCount(Model): + """The status code and count of the virtual machine scale set instance view + status summary. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar code: The instance view status code. + :vartype code: str + :ivar count: The number of instances having a particular status code. + :vartype count: int + """ + + _validation = { + 'code': {'readonly': True}, + 'count': {'readonly': True}, + } + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + 'count': {'key': 'count', 'type': 'int'}, + } + + def __init__(self, **kwargs): + super(VirtualMachineStatusCodeCount, self).__init__(**kwargs) + self.code = None + self.count = None + + +class VirtualMachineUpdate(UpdateResource): + """Describes a Virtual Machine Update. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :param tags: Resource tags + :type tags: dict[str, str] + :param plan: Specifies information about the marketplace image used to + create the virtual machine. This element is only used for marketplace + images. Before you can use a marketplace image from an API, you must + enable the image for programmatic use. In the Azure portal, find the + marketplace image that you want to use and then click **Want to deploy + programmatically, Get Started ->**. Enter any required information and + then click **Save**. + :type plan: ~azure.mgmt.compute.v2018_06_01.models.Plan + :param hardware_profile: Specifies the hardware settings for the virtual + machine. + :type hardware_profile: + ~azure.mgmt.compute.v2018_06_01.models.HardwareProfile + :param storage_profile: Specifies the storage settings for the virtual + machine disks. + :type storage_profile: + ~azure.mgmt.compute.v2018_06_01.models.StorageProfile + :param additional_capabilities: Specifies additional capabilities enabled + or disabled on the virtual machine. + :type additional_capabilities: + ~azure.mgmt.compute.v2018_06_01.models.AdditionalCapabilities + :param os_profile: Specifies the operating system settings for the virtual + machine. + :type os_profile: ~azure.mgmt.compute.v2018_06_01.models.OSProfile + :param network_profile: Specifies the network interfaces of the virtual + machine. + :type network_profile: + ~azure.mgmt.compute.v2018_06_01.models.NetworkProfile + :param diagnostics_profile: Specifies the boot diagnostic settings state. +

    Minimum api-version: 2015-06-15. + :type diagnostics_profile: + ~azure.mgmt.compute.v2018_06_01.models.DiagnosticsProfile + :param availability_set: Specifies information about the availability set + that the virtual machine should be assigned to. Virtual machines specified + in the same availability set are allocated to different nodes to maximize + availability. For more information about availability sets, see [Manage + the availability of virtual + machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-manage-availability?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). +

    For more information on Azure planned maintenance, see [Planned + maintenance for virtual machines in + Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-planned-maintenance?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json) +

    Currently, a VM can only be added to availability set at creation + time. An existing VM cannot be added to an availability set. + :type availability_set: ~azure.mgmt.compute.v2018_06_01.models.SubResource + :param proximity_placement_group: Specifies information about the + proximity placement group that the virtual machine should be assigned to. +

    Minimum api-version: 2018-04-01. + :type proximity_placement_group: + ~azure.mgmt.compute.v2018_06_01.models.SubResource + :ivar provisioning_state: The provisioning state, which only appears in + the response. + :vartype provisioning_state: str + :ivar instance_view: The virtual machine instance view. + :vartype instance_view: + ~azure.mgmt.compute.v2018_06_01.models.VirtualMachineInstanceView + :param license_type: Specifies that the image or disk that is being used + was licensed on-premises. This element is only used for images that + contain the Windows Server operating system.

    Possible values are: +

    Windows_Client

    Windows_Server

    If this element + is included in a request for an update, the value must match the initial + value. This value cannot be updated.

    For more information, see + [Azure Hybrid Use Benefit for Windows + Server](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-hybrid-use-benefit-licensing?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json) +

    Minimum api-version: 2015-06-15 + :type license_type: str + :ivar vm_id: Specifies the VM unique ID which is a 128-bits identifier + that is encoded and stored in all Azure IaaS VMs SMBIOS and can be read + using platform BIOS commands. + :vartype vm_id: str + :param identity: The identity of the virtual machine, if configured. + :type identity: + ~azure.mgmt.compute.v2018_06_01.models.VirtualMachineIdentity + :param zones: The virtual machine zones. + :type zones: list[str] + """ + + _validation = { + 'provisioning_state': {'readonly': True}, + 'instance_view': {'readonly': True}, + 'vm_id': {'readonly': True}, + } + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + 'plan': {'key': 'plan', 'type': 'Plan'}, + 'hardware_profile': {'key': 'properties.hardwareProfile', 'type': 'HardwareProfile'}, + 'storage_profile': {'key': 'properties.storageProfile', 'type': 'StorageProfile'}, + 'additional_capabilities': {'key': 'properties.additionalCapabilities', 'type': 'AdditionalCapabilities'}, + 'os_profile': {'key': 'properties.osProfile', 'type': 'OSProfile'}, + 'network_profile': {'key': 'properties.networkProfile', 'type': 'NetworkProfile'}, + 'diagnostics_profile': {'key': 'properties.diagnosticsProfile', 'type': 'DiagnosticsProfile'}, + 'availability_set': {'key': 'properties.availabilitySet', 'type': 'SubResource'}, + 'proximity_placement_group': {'key': 'properties.proximityPlacementGroup', 'type': 'SubResource'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'instance_view': {'key': 'properties.instanceView', 'type': 'VirtualMachineInstanceView'}, + 'license_type': {'key': 'properties.licenseType', 'type': 'str'}, + 'vm_id': {'key': 'properties.vmId', 'type': 'str'}, + 'identity': {'key': 'identity', 'type': 'VirtualMachineIdentity'}, + 'zones': {'key': 'zones', 'type': '[str]'}, + } + + def __init__(self, **kwargs): + super(VirtualMachineUpdate, self).__init__(**kwargs) + self.plan = kwargs.get('plan', None) + self.hardware_profile = kwargs.get('hardware_profile', None) + self.storage_profile = kwargs.get('storage_profile', None) + self.additional_capabilities = kwargs.get('additional_capabilities', None) + self.os_profile = kwargs.get('os_profile', None) + self.network_profile = kwargs.get('network_profile', None) + self.diagnostics_profile = kwargs.get('diagnostics_profile', None) + self.availability_set = kwargs.get('availability_set', None) + self.proximity_placement_group = kwargs.get('proximity_placement_group', None) + self.provisioning_state = None + self.instance_view = None + self.license_type = kwargs.get('license_type', None) + self.vm_id = None + self.identity = kwargs.get('identity', None) + self.zones = kwargs.get('zones', None) + + +class WindowsConfiguration(Model): + """Specifies Windows operating system settings on the virtual machine. + + :param provision_vm_agent: Indicates whether virtual machine agent should + be provisioned on the virtual machine.

    When this property is not + specified in the request body, default behavior is to set it to true. + This will ensure that VM Agent is installed on the VM so that extensions + can be added to the VM later. + :type provision_vm_agent: bool + :param enable_automatic_updates: Indicates whether virtual machine is + enabled for automatic updates. + :type enable_automatic_updates: bool + :param time_zone: Specifies the time zone of the virtual machine. e.g. + "Pacific Standard Time" + :type time_zone: str + :param additional_unattend_content: Specifies additional base-64 encoded + XML formatted information that can be included in the Unattend.xml file, + which is used by Windows Setup. + :type additional_unattend_content: + list[~azure.mgmt.compute.v2018_06_01.models.AdditionalUnattendContent] + :param win_rm: Specifies the Windows Remote Management listeners. This + enables remote Windows PowerShell. + :type win_rm: ~azure.mgmt.compute.v2018_06_01.models.WinRMConfiguration + """ + + _attribute_map = { + 'provision_vm_agent': {'key': 'provisionVMAgent', 'type': 'bool'}, + 'enable_automatic_updates': {'key': 'enableAutomaticUpdates', 'type': 'bool'}, + 'time_zone': {'key': 'timeZone', 'type': 'str'}, + 'additional_unattend_content': {'key': 'additionalUnattendContent', 'type': '[AdditionalUnattendContent]'}, + 'win_rm': {'key': 'winRM', 'type': 'WinRMConfiguration'}, + } + + def __init__(self, **kwargs): + super(WindowsConfiguration, self).__init__(**kwargs) + self.provision_vm_agent = kwargs.get('provision_vm_agent', None) + self.enable_automatic_updates = kwargs.get('enable_automatic_updates', None) + self.time_zone = kwargs.get('time_zone', None) + self.additional_unattend_content = kwargs.get('additional_unattend_content', None) + self.win_rm = kwargs.get('win_rm', None) + + +class WinRMConfiguration(Model): + """Describes Windows Remote Management configuration of the VM. + + :param listeners: The list of Windows Remote Management listeners + :type listeners: + list[~azure.mgmt.compute.v2018_06_01.models.WinRMListener] + """ + + _attribute_map = { + 'listeners': {'key': 'listeners', 'type': '[WinRMListener]'}, + } + + def __init__(self, **kwargs): + super(WinRMConfiguration, self).__init__(**kwargs) + self.listeners = kwargs.get('listeners', None) + + +class WinRMListener(Model): + """Describes Protocol and thumbprint of Windows Remote Management listener. + + :param protocol: Specifies the protocol of listener.

    Possible + values are:
    **http**

    **https**. Possible values include: + 'Http', 'Https' + :type protocol: str or + ~azure.mgmt.compute.v2018_06_01.models.ProtocolTypes + :param certificate_url: This is the URL of a certificate that has been + uploaded to Key Vault as a secret. For adding a secret to the Key Vault, + see [Add a key or secret to the key + vault](https://docs.microsoft.com/azure/key-vault/key-vault-get-started/#add). + In this case, your certificate needs to be It is the Base64 encoding of + the following JSON Object which is encoded in UTF-8:

    {
    + "data":"",
    "dataType":"pfx",
    + "password":""
    } + :type certificate_url: str + """ + + _attribute_map = { + 'protocol': {'key': 'protocol', 'type': 'ProtocolTypes'}, + 'certificate_url': {'key': 'certificateUrl', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(WinRMListener, self).__init__(**kwargs) + self.protocol = kwargs.get('protocol', None) + self.certificate_url = kwargs.get('certificate_url', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/_models_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/_models_py3.py new file mode 100644 index 000000000000..16f76a151a2e --- /dev/null +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/_models_py3.py @@ -0,0 +1,6888 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model +from msrest.exceptions import HttpOperationError + + +class AccessUri(Model): + """A disk access SAS uri. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar access_sas: A SAS uri for accessing a disk. + :vartype access_sas: str + """ + + _validation = { + 'access_sas': {'readonly': True}, + } + + _attribute_map = { + 'access_sas': {'key': 'accessSAS', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(AccessUri, self).__init__(**kwargs) + self.access_sas = None + + +class AdditionalCapabilities(Model): + """Enables or disables a capability on the virtual machine or virtual machine + scale set. + + :param ultra_ssd_enabled: The flag that enables or disables a capability + to have one or more managed data disks with UltraSSD_LRS storage account + type on the VM or VMSS. Managed disks with storage account type + UltraSSD_LRS can be added to a virtual machine or virtual machine scale + set only if this property is enabled. + :type ultra_ssd_enabled: bool + """ + + _attribute_map = { + 'ultra_ssd_enabled': {'key': 'ultraSSDEnabled', 'type': 'bool'}, + } + + def __init__(self, *, ultra_ssd_enabled: bool=None, **kwargs) -> None: + super(AdditionalCapabilities, self).__init__(**kwargs) + self.ultra_ssd_enabled = ultra_ssd_enabled + + +class AdditionalUnattendContent(Model): + """Specifies additional XML formatted information that can be included in the + Unattend.xml file, which is used by Windows Setup. Contents are defined by + setting name, component name, and the pass in which the content is applied. + + :param pass_name: The pass name. Currently, the only allowable value is + OobeSystem. Possible values include: 'OobeSystem' + :type pass_name: str or ~azure.mgmt.compute.v2018_06_01.models.PassNames + :param component_name: The component name. Currently, the only allowable + value is Microsoft-Windows-Shell-Setup. Possible values include: + 'Microsoft-Windows-Shell-Setup' + :type component_name: str or + ~azure.mgmt.compute.v2018_06_01.models.ComponentNames + :param setting_name: Specifies the name of the setting to which the + content applies. Possible values are: FirstLogonCommands and AutoLogon. + Possible values include: 'AutoLogon', 'FirstLogonCommands' + :type setting_name: str or + ~azure.mgmt.compute.v2018_06_01.models.SettingNames + :param content: Specifies the XML formatted content that is added to the + unattend.xml file for the specified path and component. The XML must be + less than 4KB and must include the root element for the setting or feature + that is being inserted. + :type content: str + """ + + _attribute_map = { + 'pass_name': {'key': 'passName', 'type': 'PassNames'}, + 'component_name': {'key': 'componentName', 'type': 'ComponentNames'}, + 'setting_name': {'key': 'settingName', 'type': 'SettingNames'}, + 'content': {'key': 'content', 'type': 'str'}, + } + + def __init__(self, *, pass_name=None, component_name=None, setting_name=None, content: str=None, **kwargs) -> None: + super(AdditionalUnattendContent, self).__init__(**kwargs) + self.pass_name = pass_name + self.component_name = component_name + self.setting_name = setting_name + self.content = content + + +class ApiEntityReference(Model): + """The API entity reference. + + :param id: The ARM resource id in the form of + /subscriptions/{SubscriptionId}/resourceGroups/{ResourceGroupName}/... + :type id: str + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + } + + def __init__(self, *, id: str=None, **kwargs) -> None: + super(ApiEntityReference, self).__init__(**kwargs) + self.id = id + + +class ApiError(Model): + """Api error. + + :param details: The Api error details + :type details: list[~azure.mgmt.compute.v2018_06_01.models.ApiErrorBase] + :param innererror: The Api inner error + :type innererror: ~azure.mgmt.compute.v2018_06_01.models.InnerError + :param code: The error code. + :type code: str + :param target: The target of the particular error. + :type target: str + :param message: The error message. + :type message: str + """ + + _attribute_map = { + 'details': {'key': 'details', 'type': '[ApiErrorBase]'}, + 'innererror': {'key': 'innererror', 'type': 'InnerError'}, + 'code': {'key': 'code', 'type': 'str'}, + 'target': {'key': 'target', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + } + + def __init__(self, *, details=None, innererror=None, code: str=None, target: str=None, message: str=None, **kwargs) -> None: + super(ApiError, self).__init__(**kwargs) + self.details = details + self.innererror = innererror + self.code = code + self.target = target + self.message = message + + +class ApiErrorBase(Model): + """Api error base. + + :param code: The error code. + :type code: str + :param target: The target of the particular error. + :type target: str + :param message: The error message. + :type message: str + """ + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + 'target': {'key': 'target', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + } + + def __init__(self, *, code: str=None, target: str=None, message: str=None, **kwargs) -> None: + super(ApiErrorBase, self).__init__(**kwargs) + self.code = code + self.target = target + self.message = message + + +class AutoOSUpgradePolicy(Model): + """The configuration parameters used for performing automatic OS upgrade. + + :param disable_auto_rollback: Whether OS image rollback feature should be + disabled. Default value is false. + :type disable_auto_rollback: bool + """ + + _attribute_map = { + 'disable_auto_rollback': {'key': 'disableAutoRollback', 'type': 'bool'}, + } + + def __init__(self, *, disable_auto_rollback: bool=None, **kwargs) -> None: + super(AutoOSUpgradePolicy, self).__init__(**kwargs) + self.disable_auto_rollback = disable_auto_rollback + + +class Resource(Model): + """The Resource model definition. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource Id + :vartype id: str + :ivar name: Resource name + :vartype name: str + :ivar type: Resource type + :vartype type: str + :param location: Required. Resource location + :type location: str + :param tags: Resource tags + :type tags: dict[str, str] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__(self, *, location: str, tags=None, **kwargs) -> None: + super(Resource, self).__init__(**kwargs) + self.id = None + self.name = None + self.type = None + self.location = location + self.tags = tags + + +class AvailabilitySet(Resource): + """Specifies information about the availability set that the virtual machine + should be assigned to. Virtual machines specified in the same availability + set are allocated to different nodes to maximize availability. For more + information about availability sets, see [Manage the availability of + virtual + machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-manage-availability?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). +

    For more information on Azure planned maintenance, see [Planned + maintenance for virtual machines in + Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-planned-maintenance?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json) +

    Currently, a VM can only be added to availability set at creation + time. An existing VM cannot be added to an availability set. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource Id + :vartype id: str + :ivar name: Resource name + :vartype name: str + :ivar type: Resource type + :vartype type: str + :param location: Required. Resource location + :type location: str + :param tags: Resource tags + :type tags: dict[str, str] + :param platform_update_domain_count: Update Domain count. + :type platform_update_domain_count: int + :param platform_fault_domain_count: Fault Domain count. + :type platform_fault_domain_count: int + :param virtual_machines: A list of references to all virtual machines in + the availability set. + :type virtual_machines: + list[~azure.mgmt.compute.v2018_06_01.models.SubResource] + :param proximity_placement_group: Specifies information about the + proximity placement group that the availability set should be assigned to. +

    Minimum api-version: 2018-04-01. + :type proximity_placement_group: + ~azure.mgmt.compute.v2018_06_01.models.SubResource + :ivar statuses: The resource status information. + :vartype statuses: + list[~azure.mgmt.compute.v2018_06_01.models.InstanceViewStatus] + :param sku: Sku of the availability set, only name is required to be set. + See AvailabilitySetSkuTypes for possible set of values. Use 'Aligned' for + virtual machines with managed disks and 'Classic' for virtual machines + with unmanaged disks. Default value is 'Classic'. + :type sku: ~azure.mgmt.compute.v2018_06_01.models.Sku + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + 'statuses': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'platform_update_domain_count': {'key': 'properties.platformUpdateDomainCount', 'type': 'int'}, + 'platform_fault_domain_count': {'key': 'properties.platformFaultDomainCount', 'type': 'int'}, + 'virtual_machines': {'key': 'properties.virtualMachines', 'type': '[SubResource]'}, + 'proximity_placement_group': {'key': 'properties.proximityPlacementGroup', 'type': 'SubResource'}, + 'statuses': {'key': 'properties.statuses', 'type': '[InstanceViewStatus]'}, + 'sku': {'key': 'sku', 'type': 'Sku'}, + } + + def __init__(self, *, location: str, tags=None, platform_update_domain_count: int=None, platform_fault_domain_count: int=None, virtual_machines=None, proximity_placement_group=None, sku=None, **kwargs) -> None: + super(AvailabilitySet, self).__init__(location=location, tags=tags, **kwargs) + self.platform_update_domain_count = platform_update_domain_count + self.platform_fault_domain_count = platform_fault_domain_count + self.virtual_machines = virtual_machines + self.proximity_placement_group = proximity_placement_group + self.statuses = None + self.sku = sku + + +class UpdateResource(Model): + """The Update Resource model definition. + + :param tags: Resource tags + :type tags: dict[str, str] + """ + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__(self, *, tags=None, **kwargs) -> None: + super(UpdateResource, self).__init__(**kwargs) + self.tags = tags + + +class AvailabilitySetUpdate(UpdateResource): + """Specifies information about the availability set that the virtual machine + should be assigned to. Only tags may be updated. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :param tags: Resource tags + :type tags: dict[str, str] + :param platform_update_domain_count: Update Domain count. + :type platform_update_domain_count: int + :param platform_fault_domain_count: Fault Domain count. + :type platform_fault_domain_count: int + :param virtual_machines: A list of references to all virtual machines in + the availability set. + :type virtual_machines: + list[~azure.mgmt.compute.v2018_06_01.models.SubResource] + :param proximity_placement_group: Specifies information about the + proximity placement group that the availability set should be assigned to. +

    Minimum api-version: 2018-04-01. + :type proximity_placement_group: + ~azure.mgmt.compute.v2018_06_01.models.SubResource + :ivar statuses: The resource status information. + :vartype statuses: + list[~azure.mgmt.compute.v2018_06_01.models.InstanceViewStatus] + :param sku: Sku of the availability set + :type sku: ~azure.mgmt.compute.v2018_06_01.models.Sku + """ + + _validation = { + 'statuses': {'readonly': True}, + } + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + 'platform_update_domain_count': {'key': 'properties.platformUpdateDomainCount', 'type': 'int'}, + 'platform_fault_domain_count': {'key': 'properties.platformFaultDomainCount', 'type': 'int'}, + 'virtual_machines': {'key': 'properties.virtualMachines', 'type': '[SubResource]'}, + 'proximity_placement_group': {'key': 'properties.proximityPlacementGroup', 'type': 'SubResource'}, + 'statuses': {'key': 'properties.statuses', 'type': '[InstanceViewStatus]'}, + 'sku': {'key': 'sku', 'type': 'Sku'}, + } + + def __init__(self, *, tags=None, platform_update_domain_count: int=None, platform_fault_domain_count: int=None, virtual_machines=None, proximity_placement_group=None, sku=None, **kwargs) -> None: + super(AvailabilitySetUpdate, self).__init__(tags=tags, **kwargs) + self.platform_update_domain_count = platform_update_domain_count + self.platform_fault_domain_count = platform_fault_domain_count + self.virtual_machines = virtual_machines + self.proximity_placement_group = proximity_placement_group + self.statuses = None + self.sku = sku + + +class BootDiagnostics(Model): + """Boot Diagnostics is a debugging feature which allows you to view Console + Output and Screenshot to diagnose VM status.

    You can easily view + the output of your console log.

    Azure also enables you to see a + screenshot of the VM from the hypervisor. + + :param enabled: Whether boot diagnostics should be enabled on the Virtual + Machine. + :type enabled: bool + :param storage_uri: Uri of the storage account to use for placing the + console output and screenshot. + :type storage_uri: str + """ + + _attribute_map = { + 'enabled': {'key': 'enabled', 'type': 'bool'}, + 'storage_uri': {'key': 'storageUri', 'type': 'str'}, + } + + def __init__(self, *, enabled: bool=None, storage_uri: str=None, **kwargs) -> None: + super(BootDiagnostics, self).__init__(**kwargs) + self.enabled = enabled + self.storage_uri = storage_uri + + +class BootDiagnosticsInstanceView(Model): + """The instance view of a virtual machine boot diagnostics. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar console_screenshot_blob_uri: The console screenshot blob URI. + :vartype console_screenshot_blob_uri: str + :ivar serial_console_log_blob_uri: The Linux serial console log blob Uri. + :vartype serial_console_log_blob_uri: str + :ivar status: The boot diagnostics status information for the VM.

    + NOTE: It will be set only if there are errors encountered in enabling boot + diagnostics. + :vartype status: ~azure.mgmt.compute.v2018_06_01.models.InstanceViewStatus + """ + + _validation = { + 'console_screenshot_blob_uri': {'readonly': True}, + 'serial_console_log_blob_uri': {'readonly': True}, + 'status': {'readonly': True}, + } + + _attribute_map = { + 'console_screenshot_blob_uri': {'key': 'consoleScreenshotBlobUri', 'type': 'str'}, + 'serial_console_log_blob_uri': {'key': 'serialConsoleLogBlobUri', 'type': 'str'}, + 'status': {'key': 'status', 'type': 'InstanceViewStatus'}, + } + + def __init__(self, **kwargs) -> None: + super(BootDiagnosticsInstanceView, self).__init__(**kwargs) + self.console_screenshot_blob_uri = None + self.serial_console_log_blob_uri = None + self.status = None + + +class CloudError(Model): + """An error response from the Gallery service. + + :param error: + :type error: ~azure.mgmt.compute.v2018_06_01.models.ApiError + """ + + _attribute_map = { + 'error': {'key': 'error', 'type': 'ApiError'}, + } + + def __init__(self, *, error=None, **kwargs) -> None: + super(CloudError, self).__init__(**kwargs) + self.error = error + + +class CloudErrorException(HttpOperationError): + """Server responsed with exception of type: 'CloudError'. + + :param deserialize: A deserializer + :param response: Server response to be deserialized. + """ + + def __init__(self, deserialize, response, *args): + + super(CloudErrorException, self).__init__(deserialize, response, 'CloudError', *args) + + +class ComputeOperationValue(Model): + """Describes the properties of a Compute Operation value. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar origin: The origin of the compute operation. + :vartype origin: str + :ivar name: The name of the compute operation. + :vartype name: str + :ivar operation: The display name of the compute operation. + :vartype operation: str + :ivar resource: The display name of the resource the operation applies to. + :vartype resource: str + :ivar description: The description of the operation. + :vartype description: str + :ivar provider: The resource provider for the operation. + :vartype provider: str + """ + + _validation = { + 'origin': {'readonly': True}, + 'name': {'readonly': True}, + 'operation': {'readonly': True}, + 'resource': {'readonly': True}, + 'description': {'readonly': True}, + 'provider': {'readonly': True}, + } + + _attribute_map = { + 'origin': {'key': 'origin', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'operation': {'key': 'display.operation', 'type': 'str'}, + 'resource': {'key': 'display.resource', 'type': 'str'}, + 'description': {'key': 'display.description', 'type': 'str'}, + 'provider': {'key': 'display.provider', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(ComputeOperationValue, self).__init__(**kwargs) + self.origin = None + self.name = None + self.operation = None + self.resource = None + self.description = None + self.provider = None + + +class CreationData(Model): + """Data used when creating a disk. + + All required parameters must be populated in order to send to Azure. + + :param create_option: Required. This enumerates the possible sources of a + disk's creation. Possible values include: 'Empty', 'Attach', 'FromImage', + 'Import', 'Copy', 'Restore' + :type create_option: str or + ~azure.mgmt.compute.v2018_06_01.models.DiskCreateOption + :param storage_account_id: If createOption is Import, the Azure Resource + Manager identifier of the storage account containing the blob to import as + a disk. Required only if the blob is in a different subscription + :type storage_account_id: str + :param image_reference: Disk source information. + :type image_reference: + ~azure.mgmt.compute.v2018_06_01.models.ImageDiskReference + :param source_uri: If createOption is Import, this is the URI of a blob to + be imported into a managed disk. + :type source_uri: str + :param source_resource_id: If createOption is Copy, this is the ARM id of + the source snapshot or disk. + :type source_resource_id: str + """ + + _validation = { + 'create_option': {'required': True}, + } + + _attribute_map = { + 'create_option': {'key': 'createOption', 'type': 'str'}, + 'storage_account_id': {'key': 'storageAccountId', 'type': 'str'}, + 'image_reference': {'key': 'imageReference', 'type': 'ImageDiskReference'}, + 'source_uri': {'key': 'sourceUri', 'type': 'str'}, + 'source_resource_id': {'key': 'sourceResourceId', 'type': 'str'}, + } + + def __init__(self, *, create_option, storage_account_id: str=None, image_reference=None, source_uri: str=None, source_resource_id: str=None, **kwargs) -> None: + super(CreationData, self).__init__(**kwargs) + self.create_option = create_option + self.storage_account_id = storage_account_id + self.image_reference = image_reference + self.source_uri = source_uri + self.source_resource_id = source_resource_id + + +class DataDisk(Model): + """Describes a data disk. + + All required parameters must be populated in order to send to Azure. + + :param lun: Required. Specifies the logical unit number of the data disk. + This value is used to identify data disks within the VM and therefore must + be unique for each data disk attached to a VM. + :type lun: int + :param name: The disk name. + :type name: str + :param vhd: The virtual hard disk. + :type vhd: ~azure.mgmt.compute.v2018_06_01.models.VirtualHardDisk + :param image: The source user image virtual hard disk. The virtual hard + disk will be copied before being attached to the virtual machine. If + SourceImage is provided, the destination virtual hard drive must not + exist. + :type image: ~azure.mgmt.compute.v2018_06_01.models.VirtualHardDisk + :param caching: Specifies the caching requirements.

    Possible + values are:

    **None**

    **ReadOnly**

    **ReadWrite** +

    Default: **None for Standard storage. ReadOnly for Premium + storage**. Possible values include: 'None', 'ReadOnly', 'ReadWrite' + :type caching: str or ~azure.mgmt.compute.v2018_06_01.models.CachingTypes + :param write_accelerator_enabled: Specifies whether writeAccelerator + should be enabled or disabled on the disk. + :type write_accelerator_enabled: bool + :param create_option: Required. Specifies how the virtual machine should + be created.

    Possible values are:

    **Attach** \\u2013 This + value is used when you are using a specialized disk to create the virtual + machine.

    **FromImage** \\u2013 This value is used when you are + using an image to create the virtual machine. If you are using a platform + image, you also use the imageReference element described above. If you are + using a marketplace image, you also use the plan element previously + described. Possible values include: 'FromImage', 'Empty', 'Attach' + :type create_option: str or + ~azure.mgmt.compute.v2018_06_01.models.DiskCreateOptionTypes + :param disk_size_gb: Specifies the size of an empty data disk in + gigabytes. This element can be used to overwrite the size of the disk in a + virtual machine image.

    This value cannot be larger than 1023 GB + :type disk_size_gb: int + :param managed_disk: The managed disk parameters. + :type managed_disk: + ~azure.mgmt.compute.v2018_06_01.models.ManagedDiskParameters + """ + + _validation = { + 'lun': {'required': True}, + 'create_option': {'required': True}, + } + + _attribute_map = { + 'lun': {'key': 'lun', 'type': 'int'}, + 'name': {'key': 'name', 'type': 'str'}, + 'vhd': {'key': 'vhd', 'type': 'VirtualHardDisk'}, + 'image': {'key': 'image', 'type': 'VirtualHardDisk'}, + 'caching': {'key': 'caching', 'type': 'CachingTypes'}, + 'write_accelerator_enabled': {'key': 'writeAcceleratorEnabled', 'type': 'bool'}, + 'create_option': {'key': 'createOption', 'type': 'str'}, + 'disk_size_gb': {'key': 'diskSizeGB', 'type': 'int'}, + 'managed_disk': {'key': 'managedDisk', 'type': 'ManagedDiskParameters'}, + } + + def __init__(self, *, lun: int, create_option, name: str=None, vhd=None, image=None, caching=None, write_accelerator_enabled: bool=None, disk_size_gb: int=None, managed_disk=None, **kwargs) -> None: + super(DataDisk, self).__init__(**kwargs) + self.lun = lun + self.name = name + self.vhd = vhd + self.image = image + self.caching = caching + self.write_accelerator_enabled = write_accelerator_enabled + self.create_option = create_option + self.disk_size_gb = disk_size_gb + self.managed_disk = managed_disk + + +class DataDiskImage(Model): + """Contains the data disk images information. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar lun: Specifies the logical unit number of the data disk. This value + is used to identify data disks within the VM and therefore must be unique + for each data disk attached to a VM. + :vartype lun: int + """ + + _validation = { + 'lun': {'readonly': True}, + } + + _attribute_map = { + 'lun': {'key': 'lun', 'type': 'int'}, + } + + def __init__(self, **kwargs) -> None: + super(DataDiskImage, self).__init__(**kwargs) + self.lun = None + + +class DiagnosticsProfile(Model): + """Specifies the boot diagnostic settings state.

    Minimum api-version: + 2015-06-15. + + :param boot_diagnostics: Boot Diagnostics is a debugging feature which + allows you to view Console Output and Screenshot to diagnose VM status. +

    You can easily view the output of your console log.

    + Azure also enables you to see a screenshot of the VM from the hypervisor. + :type boot_diagnostics: + ~azure.mgmt.compute.v2018_06_01.models.BootDiagnostics + """ + + _attribute_map = { + 'boot_diagnostics': {'key': 'bootDiagnostics', 'type': 'BootDiagnostics'}, + } + + def __init__(self, *, boot_diagnostics=None, **kwargs) -> None: + super(DiagnosticsProfile, self).__init__(**kwargs) + self.boot_diagnostics = boot_diagnostics + + +class DiffDiskSettings(Model): + """Describes the parameters of ephemeral disk settings that can be specified + for operating system disk.

    NOTE: The ephemeral disk settings can + only be specified for managed disk. + + :param option: Specifies the ephemeral disk settings for operating system + disk. Possible values include: 'Local' + :type option: str or + ~azure.mgmt.compute.v2018_06_01.models.DiffDiskOptions + """ + + _attribute_map = { + 'option': {'key': 'option', 'type': 'str'}, + } + + def __init__(self, *, option=None, **kwargs) -> None: + super(DiffDiskSettings, self).__init__(**kwargs) + self.option = option + + +class Disallowed(Model): + """Describes the disallowed disk types. + + :param disk_types: A list of disk types. + :type disk_types: list[str] + """ + + _attribute_map = { + 'disk_types': {'key': 'diskTypes', 'type': '[str]'}, + } + + def __init__(self, *, disk_types=None, **kwargs) -> None: + super(Disallowed, self).__init__(**kwargs) + self.disk_types = disk_types + + +class Disk(Resource): + """Disk resource. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource Id + :vartype id: str + :ivar name: Resource name + :vartype name: str + :ivar type: Resource type + :vartype type: str + :param location: Required. Resource location + :type location: str + :param tags: Resource tags + :type tags: dict[str, str] + :ivar managed_by: A relative URI containing the ID of the VM that has the + disk attached. + :vartype managed_by: str + :param sku: + :type sku: ~azure.mgmt.compute.v2018_06_01.models.DiskSku + :param zones: The Logical zone list for Disk. + :type zones: list[str] + :ivar time_created: The time when the disk was created. + :vartype time_created: datetime + :param os_type: The Operating System type. Possible values include: + 'Windows', 'Linux' + :type os_type: str or + ~azure.mgmt.compute.v2018_06_01.models.OperatingSystemTypes + :param creation_data: Required. Disk source information. CreationData + information cannot be changed after the disk has been created. + :type creation_data: ~azure.mgmt.compute.v2018_06_01.models.CreationData + :param disk_size_gb: If creationData.createOption is Empty, this field is + mandatory and it indicates the size of the VHD to create. If this field is + present for updates or creation with other options, it indicates a resize. + Resizes are only allowed if the disk is not attached to a running VM, and + can only increase the disk's size. + :type disk_size_gb: int + :param encryption_settings: Encryption settings for disk or snapshot + :type encryption_settings: + ~azure.mgmt.compute.v2018_06_01.models.EncryptionSettings + :ivar provisioning_state: The disk provisioning state. + :vartype provisioning_state: str + :param disk_iops_read_write: The number of IOPS allowed for this disk; + only settable for UltraSSD disks. One operation can transfer between 4k + and 256k bytes. For a description of the range of values you can set, see + [Ultra SSD Managed Disk + Offerings](https://docs.microsoft.com/azure/virtual-machines/windows/disks-ultra-ssd#ultra-ssd-managed-disk-offerings). + :type disk_iops_read_write: long + :param disk_mbps_read_write: The bandwidth allowed for this disk; only + settable for UltraSSD disks. MBps means millions of bytes per second - MB + here uses the ISO notation, of powers of 10. For a description of the + range of values you can set, see [Ultra SSD Managed Disk + Offerings](https://docs.microsoft.com/azure/virtual-machines/windows/disks-ultra-ssd#ultra-ssd-managed-disk-offerings). + :type disk_mbps_read_write: int + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + 'managed_by': {'readonly': True}, + 'time_created': {'readonly': True}, + 'creation_data': {'required': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'managed_by': {'key': 'managedBy', 'type': 'str'}, + 'sku': {'key': 'sku', 'type': 'DiskSku'}, + 'zones': {'key': 'zones', 'type': '[str]'}, + 'time_created': {'key': 'properties.timeCreated', 'type': 'iso-8601'}, + 'os_type': {'key': 'properties.osType', 'type': 'OperatingSystemTypes'}, + 'creation_data': {'key': 'properties.creationData', 'type': 'CreationData'}, + 'disk_size_gb': {'key': 'properties.diskSizeGB', 'type': 'int'}, + 'encryption_settings': {'key': 'properties.encryptionSettings', 'type': 'EncryptionSettings'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'disk_iops_read_write': {'key': 'properties.diskIOPSReadWrite', 'type': 'long'}, + 'disk_mbps_read_write': {'key': 'properties.diskMBpsReadWrite', 'type': 'int'}, + } + + def __init__(self, *, location: str, creation_data, tags=None, sku=None, zones=None, os_type=None, disk_size_gb: int=None, encryption_settings=None, disk_iops_read_write: int=None, disk_mbps_read_write: int=None, **kwargs) -> None: + super(Disk, self).__init__(location=location, tags=tags, **kwargs) + self.managed_by = None + self.sku = sku + self.zones = zones + self.time_created = None + self.os_type = os_type + self.creation_data = creation_data + self.disk_size_gb = disk_size_gb + self.encryption_settings = encryption_settings + self.provisioning_state = None + self.disk_iops_read_write = disk_iops_read_write + self.disk_mbps_read_write = disk_mbps_read_write + + +class DiskEncryptionSettings(Model): + """Describes a Encryption Settings for a Disk. + + :param disk_encryption_key: Specifies the location of the disk encryption + key, which is a Key Vault Secret. + :type disk_encryption_key: + ~azure.mgmt.compute.v2018_06_01.models.KeyVaultSecretReference + :param key_encryption_key: Specifies the location of the key encryption + key in Key Vault. + :type key_encryption_key: + ~azure.mgmt.compute.v2018_06_01.models.KeyVaultKeyReference + :param enabled: Specifies whether disk encryption should be enabled on the + virtual machine. + :type enabled: bool + """ + + _attribute_map = { + 'disk_encryption_key': {'key': 'diskEncryptionKey', 'type': 'KeyVaultSecretReference'}, + 'key_encryption_key': {'key': 'keyEncryptionKey', 'type': 'KeyVaultKeyReference'}, + 'enabled': {'key': 'enabled', 'type': 'bool'}, + } + + def __init__(self, *, disk_encryption_key=None, key_encryption_key=None, enabled: bool=None, **kwargs) -> None: + super(DiskEncryptionSettings, self).__init__(**kwargs) + self.disk_encryption_key = disk_encryption_key + self.key_encryption_key = key_encryption_key + self.enabled = enabled + + +class DiskInstanceView(Model): + """The instance view of the disk. + + :param name: The disk name. + :type name: str + :param encryption_settings: Specifies the encryption settings for the OS + Disk.

    Minimum api-version: 2015-06-15 + :type encryption_settings: + list[~azure.mgmt.compute.v2018_06_01.models.DiskEncryptionSettings] + :param statuses: The resource status information. + :type statuses: + list[~azure.mgmt.compute.v2018_06_01.models.InstanceViewStatus] + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'encryption_settings': {'key': 'encryptionSettings', 'type': '[DiskEncryptionSettings]'}, + 'statuses': {'key': 'statuses', 'type': '[InstanceViewStatus]'}, + } + + def __init__(self, *, name: str=None, encryption_settings=None, statuses=None, **kwargs) -> None: + super(DiskInstanceView, self).__init__(**kwargs) + self.name = name + self.encryption_settings = encryption_settings + self.statuses = statuses + + +class DiskSku(Model): + """The disks sku name. Can be Standard_LRS, Premium_LRS, StandardSSD_LRS, or + UltraSSD_LRS. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :param name: The sku name. Possible values include: 'Standard_LRS', + 'Premium_LRS', 'StandardSSD_LRS', 'UltraSSD_LRS' + :type name: str or + ~azure.mgmt.compute.v2018_06_01.models.DiskStorageAccountTypes + :ivar tier: The sku tier. Default value: "Standard" . + :vartype tier: str + """ + + _validation = { + 'tier': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'tier': {'key': 'tier', 'type': 'str'}, + } + + def __init__(self, *, name=None, **kwargs) -> None: + super(DiskSku, self).__init__(**kwargs) + self.name = name + self.tier = None + + +class DiskUpdate(Model): + """Disk update resource. + + :param os_type: the Operating System type. Possible values include: + 'Windows', 'Linux' + :type os_type: str or + ~azure.mgmt.compute.v2018_06_01.models.OperatingSystemTypes + :param disk_size_gb: If creationData.createOption is Empty, this field is + mandatory and it indicates the size of the VHD to create. If this field is + present for updates or creation with other options, it indicates a resize. + Resizes are only allowed if the disk is not attached to a running VM, and + can only increase the disk's size. + :type disk_size_gb: int + :param encryption_settings: Encryption settings for disk or snapshot + :type encryption_settings: + ~azure.mgmt.compute.v2018_06_01.models.EncryptionSettings + :param disk_iops_read_write: The number of IOPS allowed for this disk; + only settable for UltraSSD disks. One operation can transfer between 4k + and 256k bytes. + :type disk_iops_read_write: long + :param disk_mbps_read_write: The bandwidth allowed for this disk; only + settable for UltraSSD disks. MBps means millions of bytes per second - MB + here uses the ISO notation, of powers of 10. + :type disk_mbps_read_write: int + :param tags: Resource tags + :type tags: dict[str, str] + :param sku: + :type sku: ~azure.mgmt.compute.v2018_06_01.models.DiskSku + """ + + _attribute_map = { + 'os_type': {'key': 'properties.osType', 'type': 'OperatingSystemTypes'}, + 'disk_size_gb': {'key': 'properties.diskSizeGB', 'type': 'int'}, + 'encryption_settings': {'key': 'properties.encryptionSettings', 'type': 'EncryptionSettings'}, + 'disk_iops_read_write': {'key': 'properties.diskIOPSReadWrite', 'type': 'long'}, + 'disk_mbps_read_write': {'key': 'properties.diskMBpsReadWrite', 'type': 'int'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'sku': {'key': 'sku', 'type': 'DiskSku'}, + } + + def __init__(self, *, os_type=None, disk_size_gb: int=None, encryption_settings=None, disk_iops_read_write: int=None, disk_mbps_read_write: int=None, tags=None, sku=None, **kwargs) -> None: + super(DiskUpdate, self).__init__(**kwargs) + self.os_type = os_type + self.disk_size_gb = disk_size_gb + self.encryption_settings = encryption_settings + self.disk_iops_read_write = disk_iops_read_write + self.disk_mbps_read_write = disk_mbps_read_write + self.tags = tags + self.sku = sku + + +class EncryptionSettings(Model): + """Encryption settings for disk or snapshot. + + :param enabled: Set this flag to true and provide DiskEncryptionKey and + optional KeyEncryptionKey to enable encryption. Set this flag to false and + remove DiskEncryptionKey and KeyEncryptionKey to disable encryption. If + EncryptionSettings is null in the request object, the existing settings + remain unchanged. + :type enabled: bool + :param disk_encryption_key: Key Vault Secret Url and vault id of the disk + encryption key + :type disk_encryption_key: + ~azure.mgmt.compute.v2018_06_01.models.KeyVaultAndSecretReference + :param key_encryption_key: Key Vault Key Url and vault id of the key + encryption key + :type key_encryption_key: + ~azure.mgmt.compute.v2018_06_01.models.KeyVaultAndKeyReference + """ + + _attribute_map = { + 'enabled': {'key': 'enabled', 'type': 'bool'}, + 'disk_encryption_key': {'key': 'diskEncryptionKey', 'type': 'KeyVaultAndSecretReference'}, + 'key_encryption_key': {'key': 'keyEncryptionKey', 'type': 'KeyVaultAndKeyReference'}, + } + + def __init__(self, *, enabled: bool=None, disk_encryption_key=None, key_encryption_key=None, **kwargs) -> None: + super(EncryptionSettings, self).__init__(**kwargs) + self.enabled = enabled + self.disk_encryption_key = disk_encryption_key + self.key_encryption_key = key_encryption_key + + +class Gallery(Resource): + """Specifies information about the Shared Image Gallery that you want to + create or update. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource Id + :vartype id: str + :ivar name: Resource name + :vartype name: str + :ivar type: Resource type + :vartype type: str + :param location: Required. Resource location + :type location: str + :param tags: Resource tags + :type tags: dict[str, str] + :param description: The description of this Shared Image Gallery resource. + This property is updatable. + :type description: str + :param identifier: + :type identifier: ~azure.mgmt.compute.v2018_06_01.models.GalleryIdentifier + :ivar provisioning_state: The current state of the gallery. The + provisioning state, which only appears in the response. Possible values + include: 'Creating', 'Updating', 'Failed', 'Succeeded', 'Deleting', + 'Migrating' + :vartype provisioning_state: str or + ~azure.mgmt.compute.v2018_06_01.models.enum + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'identifier': {'key': 'properties.identifier', 'type': 'GalleryIdentifier'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + } + + def __init__(self, *, location: str, tags=None, description: str=None, identifier=None, **kwargs) -> None: + super(Gallery, self).__init__(location=location, tags=tags, **kwargs) + self.description = description + self.identifier = identifier + self.provisioning_state = None + + +class GalleryArtifactPublishingProfileBase(Model): + """Describes the basic gallery artifact publishing profile. + + All required parameters must be populated in order to send to Azure. + + :param target_regions: The target regions where the Image Version is going + to be replicated to. This property is updatable. + :type target_regions: + list[~azure.mgmt.compute.v2018_06_01.models.TargetRegion] + :param source: Required. + :type source: ~azure.mgmt.compute.v2018_06_01.models.GalleryArtifactSource + """ + + _validation = { + 'source': {'required': True}, + } + + _attribute_map = { + 'target_regions': {'key': 'targetRegions', 'type': '[TargetRegion]'}, + 'source': {'key': 'source', 'type': 'GalleryArtifactSource'}, + } + + def __init__(self, *, source, target_regions=None, **kwargs) -> None: + super(GalleryArtifactPublishingProfileBase, self).__init__(**kwargs) + self.target_regions = target_regions + self.source = source + + +class GalleryArtifactSource(Model): + """The source image from which the Image Version is going to be created. + + All required parameters must be populated in order to send to Azure. + + :param managed_image: Required. + :type managed_image: + ~azure.mgmt.compute.v2018_06_01.models.ManagedArtifact + """ + + _validation = { + 'managed_image': {'required': True}, + } + + _attribute_map = { + 'managed_image': {'key': 'managedImage', 'type': 'ManagedArtifact'}, + } + + def __init__(self, *, managed_image, **kwargs) -> None: + super(GalleryArtifactSource, self).__init__(**kwargs) + self.managed_image = managed_image + + +class GalleryDiskImage(Model): + """This is the disk image base class. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar size_in_gb: This property indicates the size of the VHD to be + created. + :vartype size_in_gb: int + :ivar host_caching: The host caching of the disk. Valid values are 'None', + 'ReadOnly', and 'ReadWrite'. Possible values include: 'None', 'ReadOnly', + 'ReadWrite' + :vartype host_caching: str or + ~azure.mgmt.compute.v2018_06_01.models.HostCaching + """ + + _validation = { + 'size_in_gb': {'readonly': True}, + 'host_caching': {'readonly': True}, + } + + _attribute_map = { + 'size_in_gb': {'key': 'sizeInGB', 'type': 'int'}, + 'host_caching': {'key': 'hostCaching', 'type': 'HostCaching'}, + } + + def __init__(self, **kwargs) -> None: + super(GalleryDiskImage, self).__init__(**kwargs) + self.size_in_gb = None + self.host_caching = None + + +class GalleryDataDiskImage(GalleryDiskImage): + """This is the data disk image. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar size_in_gb: This property indicates the size of the VHD to be + created. + :vartype size_in_gb: int + :ivar host_caching: The host caching of the disk. Valid values are 'None', + 'ReadOnly', and 'ReadWrite'. Possible values include: 'None', 'ReadOnly', + 'ReadWrite' + :vartype host_caching: str or + ~azure.mgmt.compute.v2018_06_01.models.HostCaching + :ivar lun: This property specifies the logical unit number of the data + disk. This value is used to identify data disks within the Virtual Machine + and therefore must be unique for each data disk attached to the Virtual + Machine. + :vartype lun: int + """ + + _validation = { + 'size_in_gb': {'readonly': True}, + 'host_caching': {'readonly': True}, + 'lun': {'readonly': True}, + } + + _attribute_map = { + 'size_in_gb': {'key': 'sizeInGB', 'type': 'int'}, + 'host_caching': {'key': 'hostCaching', 'type': 'HostCaching'}, + 'lun': {'key': 'lun', 'type': 'int'}, + } + + def __init__(self, **kwargs) -> None: + super(GalleryDataDiskImage, self).__init__(**kwargs) + self.lun = None + + +class GalleryIdentifier(Model): + """Describes the gallery unique name. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar unique_name: The unique name of the Shared Image Gallery. This name + is generated automatically by Azure. + :vartype unique_name: str + """ + + _validation = { + 'unique_name': {'readonly': True}, + } + + _attribute_map = { + 'unique_name': {'key': 'uniqueName', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(GalleryIdentifier, self).__init__(**kwargs) + self.unique_name = None + + +class GalleryImage(Resource): + """Specifies information about the gallery Image Definition that you want to + create or update. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource Id + :vartype id: str + :ivar name: Resource name + :vartype name: str + :ivar type: Resource type + :vartype type: str + :param location: Required. Resource location + :type location: str + :param tags: Resource tags + :type tags: dict[str, str] + :param description: The description of this gallery Image Definition + resource. This property is updatable. + :type description: str + :param eula: The Eula agreement for the gallery Image Definition. + :type eula: str + :param privacy_statement_uri: The privacy statement uri. + :type privacy_statement_uri: str + :param release_note_uri: The release note uri. + :type release_note_uri: str + :param os_type: Required. This property allows you to specify the type of + the OS that is included in the disk when creating a VM from a managed + image.

    Possible values are:

    **Windows**

    + **Linux**. Possible values include: 'Windows', 'Linux' + :type os_type: str or + ~azure.mgmt.compute.v2018_06_01.models.OperatingSystemTypes + :param os_state: Required. The allowed values for OS State are + 'Generalized'. Possible values include: 'Generalized', 'Specialized' + :type os_state: str or + ~azure.mgmt.compute.v2018_06_01.models.OperatingSystemStateTypes + :param end_of_life_date: The end of life date of the gallery Image + Definition. This property can be used for decommissioning purposes. This + property is updatable. + :type end_of_life_date: datetime + :param identifier: Required. + :type identifier: + ~azure.mgmt.compute.v2018_06_01.models.GalleryImageIdentifier + :param recommended: + :type recommended: + ~azure.mgmt.compute.v2018_06_01.models.RecommendedMachineConfiguration + :param disallowed: + :type disallowed: ~azure.mgmt.compute.v2018_06_01.models.Disallowed + :param purchase_plan: + :type purchase_plan: + ~azure.mgmt.compute.v2018_06_01.models.ImagePurchasePlan + :ivar provisioning_state: The current state of the gallery Image + Definition. The provisioning state, which only appears in the response. + Possible values include: 'Creating', 'Updating', 'Failed', 'Succeeded', + 'Deleting', 'Migrating' + :vartype provisioning_state: str or + ~azure.mgmt.compute.v2018_06_01.models.enum + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + 'os_type': {'required': True}, + 'os_state': {'required': True}, + 'identifier': {'required': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'eula': {'key': 'properties.eula', 'type': 'str'}, + 'privacy_statement_uri': {'key': 'properties.privacyStatementUri', 'type': 'str'}, + 'release_note_uri': {'key': 'properties.releaseNoteUri', 'type': 'str'}, + 'os_type': {'key': 'properties.osType', 'type': 'OperatingSystemTypes'}, + 'os_state': {'key': 'properties.osState', 'type': 'OperatingSystemStateTypes'}, + 'end_of_life_date': {'key': 'properties.endOfLifeDate', 'type': 'iso-8601'}, + 'identifier': {'key': 'properties.identifier', 'type': 'GalleryImageIdentifier'}, + 'recommended': {'key': 'properties.recommended', 'type': 'RecommendedMachineConfiguration'}, + 'disallowed': {'key': 'properties.disallowed', 'type': 'Disallowed'}, + 'purchase_plan': {'key': 'properties.purchasePlan', 'type': 'ImagePurchasePlan'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + } + + def __init__(self, *, location: str, os_type, os_state, identifier, tags=None, description: str=None, eula: str=None, privacy_statement_uri: str=None, release_note_uri: str=None, end_of_life_date=None, recommended=None, disallowed=None, purchase_plan=None, **kwargs) -> None: + super(GalleryImage, self).__init__(location=location, tags=tags, **kwargs) + self.description = description + self.eula = eula + self.privacy_statement_uri = privacy_statement_uri + self.release_note_uri = release_note_uri + self.os_type = os_type + self.os_state = os_state + self.end_of_life_date = end_of_life_date + self.identifier = identifier + self.recommended = recommended + self.disallowed = disallowed + self.purchase_plan = purchase_plan + self.provisioning_state = None + + +class GalleryImageIdentifier(Model): + """This is the gallery Image Definition identifier. + + All required parameters must be populated in order to send to Azure. + + :param publisher: Required. The name of the gallery Image Definition + publisher. + :type publisher: str + :param offer: Required. The name of the gallery Image Definition offer. + :type offer: str + :param sku: Required. The name of the gallery Image Definition SKU. + :type sku: str + """ + + _validation = { + 'publisher': {'required': True}, + 'offer': {'required': True}, + 'sku': {'required': True}, + } + + _attribute_map = { + 'publisher': {'key': 'publisher', 'type': 'str'}, + 'offer': {'key': 'offer', 'type': 'str'}, + 'sku': {'key': 'sku', 'type': 'str'}, + } + + def __init__(self, *, publisher: str, offer: str, sku: str, **kwargs) -> None: + super(GalleryImageIdentifier, self).__init__(**kwargs) + self.publisher = publisher + self.offer = offer + self.sku = sku + + +class GalleryImageVersion(Resource): + """Specifies information about the gallery Image Version that you want to + create or update. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource Id + :vartype id: str + :ivar name: Resource name + :vartype name: str + :ivar type: Resource type + :vartype type: str + :param location: Required. Resource location + :type location: str + :param tags: Resource tags + :type tags: dict[str, str] + :param publishing_profile: Required. + :type publishing_profile: + ~azure.mgmt.compute.v2018_06_01.models.GalleryImageVersionPublishingProfile + :ivar provisioning_state: The current state of the gallery Image Version. + The provisioning state, which only appears in the response. Possible + values include: 'Creating', 'Updating', 'Failed', 'Succeeded', 'Deleting', + 'Migrating' + :vartype provisioning_state: str or + ~azure.mgmt.compute.v2018_06_01.models.enum + :ivar storage_profile: + :vartype storage_profile: + ~azure.mgmt.compute.v2018_06_01.models.GalleryImageVersionStorageProfile + :ivar replication_status: + :vartype replication_status: + ~azure.mgmt.compute.v2018_06_01.models.ReplicationStatus + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + 'publishing_profile': {'required': True}, + 'provisioning_state': {'readonly': True}, + 'storage_profile': {'readonly': True}, + 'replication_status': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'publishing_profile': {'key': 'properties.publishingProfile', 'type': 'GalleryImageVersionPublishingProfile'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'storage_profile': {'key': 'properties.storageProfile', 'type': 'GalleryImageVersionStorageProfile'}, + 'replication_status': {'key': 'properties.replicationStatus', 'type': 'ReplicationStatus'}, + } + + def __init__(self, *, location: str, publishing_profile, tags=None, **kwargs) -> None: + super(GalleryImageVersion, self).__init__(location=location, tags=tags, **kwargs) + self.publishing_profile = publishing_profile + self.provisioning_state = None + self.storage_profile = None + self.replication_status = None + + +class GalleryImageVersionPublishingProfile(GalleryArtifactPublishingProfileBase): + """The publishing profile of a gallery Image Version. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :param target_regions: The target regions where the Image Version is going + to be replicated to. This property is updatable. + :type target_regions: + list[~azure.mgmt.compute.v2018_06_01.models.TargetRegion] + :param source: Required. + :type source: ~azure.mgmt.compute.v2018_06_01.models.GalleryArtifactSource + :param replica_count: The number of replicas of the Image Version to be + created per region. This property would take effect for a region when + regionalReplicaCount is not specified. This property is updatable. + :type replica_count: int + :param exclude_from_latest: If set to true, Virtual Machines deployed from + the latest version of the Image Definition won't use this Image Version. + :type exclude_from_latest: bool + :ivar published_date: The timestamp for when the gallery Image Version is + published. + :vartype published_date: datetime + :param end_of_life_date: The end of life date of the gallery Image + Version. This property can be used for decommissioning purposes. This + property is updatable. + :type end_of_life_date: datetime + """ + + _validation = { + 'source': {'required': True}, + 'published_date': {'readonly': True}, + } + + _attribute_map = { + 'target_regions': {'key': 'targetRegions', 'type': '[TargetRegion]'}, + 'source': {'key': 'source', 'type': 'GalleryArtifactSource'}, + 'replica_count': {'key': 'replicaCount', 'type': 'int'}, + 'exclude_from_latest': {'key': 'excludeFromLatest', 'type': 'bool'}, + 'published_date': {'key': 'publishedDate', 'type': 'iso-8601'}, + 'end_of_life_date': {'key': 'endOfLifeDate', 'type': 'iso-8601'}, + } + + def __init__(self, *, source, target_regions=None, replica_count: int=None, exclude_from_latest: bool=None, end_of_life_date=None, **kwargs) -> None: + super(GalleryImageVersionPublishingProfile, self).__init__(target_regions=target_regions, source=source, **kwargs) + self.replica_count = replica_count + self.exclude_from_latest = exclude_from_latest + self.published_date = None + self.end_of_life_date = end_of_life_date + + +class GalleryImageVersionStorageProfile(Model): + """This is the storage profile of a gallery Image Version. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar os_disk_image: + :vartype os_disk_image: + ~azure.mgmt.compute.v2018_06_01.models.GalleryOSDiskImage + :ivar data_disk_images: A list of data disk images. + :vartype data_disk_images: + list[~azure.mgmt.compute.v2018_06_01.models.GalleryDataDiskImage] + """ + + _validation = { + 'os_disk_image': {'readonly': True}, + 'data_disk_images': {'readonly': True}, + } + + _attribute_map = { + 'os_disk_image': {'key': 'osDiskImage', 'type': 'GalleryOSDiskImage'}, + 'data_disk_images': {'key': 'dataDiskImages', 'type': '[GalleryDataDiskImage]'}, + } + + def __init__(self, **kwargs) -> None: + super(GalleryImageVersionStorageProfile, self).__init__(**kwargs) + self.os_disk_image = None + self.data_disk_images = None + + +class GalleryOSDiskImage(GalleryDiskImage): + """This is the OS disk image. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar size_in_gb: This property indicates the size of the VHD to be + created. + :vartype size_in_gb: int + :ivar host_caching: The host caching of the disk. Valid values are 'None', + 'ReadOnly', and 'ReadWrite'. Possible values include: 'None', 'ReadOnly', + 'ReadWrite' + :vartype host_caching: str or + ~azure.mgmt.compute.v2018_06_01.models.HostCaching + """ + + _validation = { + 'size_in_gb': {'readonly': True}, + 'host_caching': {'readonly': True}, + } + + _attribute_map = { + 'size_in_gb': {'key': 'sizeInGB', 'type': 'int'}, + 'host_caching': {'key': 'hostCaching', 'type': 'HostCaching'}, + } + + def __init__(self, **kwargs) -> None: + super(GalleryOSDiskImage, self).__init__(**kwargs) + + +class GrantAccessData(Model): + """Data used for requesting a SAS. + + All required parameters must be populated in order to send to Azure. + + :param access: Required. Possible values include: 'None', 'Read' + :type access: str or ~azure.mgmt.compute.v2018_06_01.models.AccessLevel + :param duration_in_seconds: Required. Time duration in seconds until the + SAS access expires. + :type duration_in_seconds: int + """ + + _validation = { + 'access': {'required': True}, + 'duration_in_seconds': {'required': True}, + } + + _attribute_map = { + 'access': {'key': 'access', 'type': 'str'}, + 'duration_in_seconds': {'key': 'durationInSeconds', 'type': 'int'}, + } + + def __init__(self, *, access, duration_in_seconds: int, **kwargs) -> None: + super(GrantAccessData, self).__init__(**kwargs) + self.access = access + self.duration_in_seconds = duration_in_seconds + + +class HardwareProfile(Model): + """Specifies the hardware settings for the virtual machine. + + :param vm_size: Specifies the size of the virtual machine. For more + information about virtual machine sizes, see [Sizes for virtual + machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-sizes?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). +

    The available VM sizes depend on region and availability set. For + a list of available sizes use these APIs:

    [List all available + virtual machine sizes in an availability + set](https://docs.microsoft.com/rest/api/compute/availabilitysets/listavailablesizes) +

    [List all available virtual machine sizes in a + region](https://docs.microsoft.com/rest/api/compute/virtualmachinesizes/list) +

    [List all available virtual machine sizes for + resizing](https://docs.microsoft.com/rest/api/compute/virtualmachines/listavailablesizes). + Possible values include: 'Basic_A0', 'Basic_A1', 'Basic_A2', 'Basic_A3', + 'Basic_A4', 'Standard_A0', 'Standard_A1', 'Standard_A2', 'Standard_A3', + 'Standard_A4', 'Standard_A5', 'Standard_A6', 'Standard_A7', 'Standard_A8', + 'Standard_A9', 'Standard_A10', 'Standard_A11', 'Standard_A1_v2', + 'Standard_A2_v2', 'Standard_A4_v2', 'Standard_A8_v2', 'Standard_A2m_v2', + 'Standard_A4m_v2', 'Standard_A8m_v2', 'Standard_B1s', 'Standard_B1ms', + 'Standard_B2s', 'Standard_B2ms', 'Standard_B4ms', 'Standard_B8ms', + 'Standard_D1', 'Standard_D2', 'Standard_D3', 'Standard_D4', + 'Standard_D11', 'Standard_D12', 'Standard_D13', 'Standard_D14', + 'Standard_D1_v2', 'Standard_D2_v2', 'Standard_D3_v2', 'Standard_D4_v2', + 'Standard_D5_v2', 'Standard_D2_v3', 'Standard_D4_v3', 'Standard_D8_v3', + 'Standard_D16_v3', 'Standard_D32_v3', 'Standard_D64_v3', + 'Standard_D2s_v3', 'Standard_D4s_v3', 'Standard_D8s_v3', + 'Standard_D16s_v3', 'Standard_D32s_v3', 'Standard_D64s_v3', + 'Standard_D11_v2', 'Standard_D12_v2', 'Standard_D13_v2', + 'Standard_D14_v2', 'Standard_D15_v2', 'Standard_DS1', 'Standard_DS2', + 'Standard_DS3', 'Standard_DS4', 'Standard_DS11', 'Standard_DS12', + 'Standard_DS13', 'Standard_DS14', 'Standard_DS1_v2', 'Standard_DS2_v2', + 'Standard_DS3_v2', 'Standard_DS4_v2', 'Standard_DS5_v2', + 'Standard_DS11_v2', 'Standard_DS12_v2', 'Standard_DS13_v2', + 'Standard_DS14_v2', 'Standard_DS15_v2', 'Standard_DS13-4_v2', + 'Standard_DS13-2_v2', 'Standard_DS14-8_v2', 'Standard_DS14-4_v2', + 'Standard_E2_v3', 'Standard_E4_v3', 'Standard_E8_v3', 'Standard_E16_v3', + 'Standard_E32_v3', 'Standard_E64_v3', 'Standard_E2s_v3', + 'Standard_E4s_v3', 'Standard_E8s_v3', 'Standard_E16s_v3', + 'Standard_E32s_v3', 'Standard_E64s_v3', 'Standard_E32-16_v3', + 'Standard_E32-8s_v3', 'Standard_E64-32s_v3', 'Standard_E64-16s_v3', + 'Standard_F1', 'Standard_F2', 'Standard_F4', 'Standard_F8', + 'Standard_F16', 'Standard_F1s', 'Standard_F2s', 'Standard_F4s', + 'Standard_F8s', 'Standard_F16s', 'Standard_F2s_v2', 'Standard_F4s_v2', + 'Standard_F8s_v2', 'Standard_F16s_v2', 'Standard_F32s_v2', + 'Standard_F64s_v2', 'Standard_F72s_v2', 'Standard_G1', 'Standard_G2', + 'Standard_G3', 'Standard_G4', 'Standard_G5', 'Standard_GS1', + 'Standard_GS2', 'Standard_GS3', 'Standard_GS4', 'Standard_GS5', + 'Standard_GS4-8', 'Standard_GS4-4', 'Standard_GS5-16', 'Standard_GS5-8', + 'Standard_H8', 'Standard_H16', 'Standard_H8m', 'Standard_H16m', + 'Standard_H16r', 'Standard_H16mr', 'Standard_L4s', 'Standard_L8s', + 'Standard_L16s', 'Standard_L32s', 'Standard_M64s', 'Standard_M64ms', + 'Standard_M128s', 'Standard_M128ms', 'Standard_M64-32ms', + 'Standard_M64-16ms', 'Standard_M128-64ms', 'Standard_M128-32ms', + 'Standard_NC6', 'Standard_NC12', 'Standard_NC24', 'Standard_NC24r', + 'Standard_NC6s_v2', 'Standard_NC12s_v2', 'Standard_NC24s_v2', + 'Standard_NC24rs_v2', 'Standard_NC6s_v3', 'Standard_NC12s_v3', + 'Standard_NC24s_v3', 'Standard_NC24rs_v3', 'Standard_ND6s', + 'Standard_ND12s', 'Standard_ND24s', 'Standard_ND24rs', 'Standard_NV6', + 'Standard_NV12', 'Standard_NV24' + :type vm_size: str or + ~azure.mgmt.compute.v2018_06_01.models.VirtualMachineSizeTypes + """ + + _attribute_map = { + 'vm_size': {'key': 'vmSize', 'type': 'str'}, + } + + def __init__(self, *, vm_size=None, **kwargs) -> None: + super(HardwareProfile, self).__init__(**kwargs) + self.vm_size = vm_size + + +class Image(Resource): + """The source user image virtual hard disk. The virtual hard disk will be + copied before being attached to the virtual machine. If SourceImage is + provided, the destination virtual hard drive must not exist. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource Id + :vartype id: str + :ivar name: Resource name + :vartype name: str + :ivar type: Resource type + :vartype type: str + :param location: Required. Resource location + :type location: str + :param tags: Resource tags + :type tags: dict[str, str] + :param source_virtual_machine: The source virtual machine from which Image + is created. + :type source_virtual_machine: + ~azure.mgmt.compute.v2018_06_01.models.SubResource + :param storage_profile: Specifies the storage settings for the virtual + machine disks. + :type storage_profile: + ~azure.mgmt.compute.v2018_06_01.models.ImageStorageProfile + :ivar provisioning_state: The provisioning state. + :vartype provisioning_state: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'source_virtual_machine': {'key': 'properties.sourceVirtualMachine', 'type': 'SubResource'}, + 'storage_profile': {'key': 'properties.storageProfile', 'type': 'ImageStorageProfile'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + } + + def __init__(self, *, location: str, tags=None, source_virtual_machine=None, storage_profile=None, **kwargs) -> None: + super(Image, self).__init__(location=location, tags=tags, **kwargs) + self.source_virtual_machine = source_virtual_machine + self.storage_profile = storage_profile + self.provisioning_state = None + + +class ImageDataDisk(Model): + """Describes a data disk. + + All required parameters must be populated in order to send to Azure. + + :param lun: Required. Specifies the logical unit number of the data disk. + This value is used to identify data disks within the VM and therefore must + be unique for each data disk attached to a VM. + :type lun: int + :param snapshot: The snapshot. + :type snapshot: ~azure.mgmt.compute.v2018_06_01.models.SubResource + :param managed_disk: The managedDisk. + :type managed_disk: ~azure.mgmt.compute.v2018_06_01.models.SubResource + :param blob_uri: The Virtual Hard Disk. + :type blob_uri: str + :param caching: Specifies the caching requirements.

    Possible + values are:

    **None**

    **ReadOnly**

    **ReadWrite** +

    Default: **None for Standard storage. ReadOnly for Premium + storage**. Possible values include: 'None', 'ReadOnly', 'ReadWrite' + :type caching: str or ~azure.mgmt.compute.v2018_06_01.models.CachingTypes + :param disk_size_gb: Specifies the size of empty data disks in gigabytes. + This element can be used to overwrite the name of the disk in a virtual + machine image.

    This value cannot be larger than 1023 GB + :type disk_size_gb: int + :param storage_account_type: Specifies the storage account type for the + managed disk. NOTE: UltraSSD_LRS can only be used with data disks, it + cannot be used with OS Disk. Possible values include: 'Standard_LRS', + 'Premium_LRS', 'StandardSSD_LRS', 'UltraSSD_LRS' + :type storage_account_type: str or + ~azure.mgmt.compute.v2018_06_01.models.StorageAccountTypes + """ + + _validation = { + 'lun': {'required': True}, + } + + _attribute_map = { + 'lun': {'key': 'lun', 'type': 'int'}, + 'snapshot': {'key': 'snapshot', 'type': 'SubResource'}, + 'managed_disk': {'key': 'managedDisk', 'type': 'SubResource'}, + 'blob_uri': {'key': 'blobUri', 'type': 'str'}, + 'caching': {'key': 'caching', 'type': 'CachingTypes'}, + 'disk_size_gb': {'key': 'diskSizeGB', 'type': 'int'}, + 'storage_account_type': {'key': 'storageAccountType', 'type': 'str'}, + } + + def __init__(self, *, lun: int, snapshot=None, managed_disk=None, blob_uri: str=None, caching=None, disk_size_gb: int=None, storage_account_type=None, **kwargs) -> None: + super(ImageDataDisk, self).__init__(**kwargs) + self.lun = lun + self.snapshot = snapshot + self.managed_disk = managed_disk + self.blob_uri = blob_uri + self.caching = caching + self.disk_size_gb = disk_size_gb + self.storage_account_type = storage_account_type + + +class ImageDiskReference(Model): + """The source image used for creating the disk. + + All required parameters must be populated in order to send to Azure. + + :param id: Required. A relative uri containing either a Platform Image + Repository or user image reference. + :type id: str + :param lun: If the disk is created from an image's data disk, this is an + index that indicates which of the data disks in the image to use. For OS + disks, this field is null. + :type lun: int + """ + + _validation = { + 'id': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'lun': {'key': 'lun', 'type': 'int'}, + } + + def __init__(self, *, id: str, lun: int=None, **kwargs) -> None: + super(ImageDiskReference, self).__init__(**kwargs) + self.id = id + self.lun = lun + + +class ImageOSDisk(Model): + """Describes an Operating System disk. + + All required parameters must be populated in order to send to Azure. + + :param os_type: Required. This property allows you to specify the type of + the OS that is included in the disk if creating a VM from a custom image. +

    Possible values are:

    **Windows**

    **Linux**. + Possible values include: 'Windows', 'Linux' + :type os_type: str or + ~azure.mgmt.compute.v2018_06_01.models.OperatingSystemTypes + :param os_state: Required. The OS State. Possible values include: + 'Generalized', 'Specialized' + :type os_state: str or + ~azure.mgmt.compute.v2018_06_01.models.OperatingSystemStateTypes + :param snapshot: The snapshot. + :type snapshot: ~azure.mgmt.compute.v2018_06_01.models.SubResource + :param managed_disk: The managedDisk. + :type managed_disk: ~azure.mgmt.compute.v2018_06_01.models.SubResource + :param blob_uri: The Virtual Hard Disk. + :type blob_uri: str + :param caching: Specifies the caching requirements.

    Possible + values are:

    **None**

    **ReadOnly**

    **ReadWrite** +

    Default: **None for Standard storage. ReadOnly for Premium + storage**. Possible values include: 'None', 'ReadOnly', 'ReadWrite' + :type caching: str or ~azure.mgmt.compute.v2018_06_01.models.CachingTypes + :param disk_size_gb: Specifies the size of empty data disks in gigabytes. + This element can be used to overwrite the name of the disk in a virtual + machine image.

    This value cannot be larger than 1023 GB + :type disk_size_gb: int + :param storage_account_type: Specifies the storage account type for the + managed disk. UltraSSD_LRS cannot be used with OS Disk. Possible values + include: 'Standard_LRS', 'Premium_LRS', 'StandardSSD_LRS', 'UltraSSD_LRS' + :type storage_account_type: str or + ~azure.mgmt.compute.v2018_06_01.models.StorageAccountTypes + """ + + _validation = { + 'os_type': {'required': True}, + 'os_state': {'required': True}, + } + + _attribute_map = { + 'os_type': {'key': 'osType', 'type': 'OperatingSystemTypes'}, + 'os_state': {'key': 'osState', 'type': 'OperatingSystemStateTypes'}, + 'snapshot': {'key': 'snapshot', 'type': 'SubResource'}, + 'managed_disk': {'key': 'managedDisk', 'type': 'SubResource'}, + 'blob_uri': {'key': 'blobUri', 'type': 'str'}, + 'caching': {'key': 'caching', 'type': 'CachingTypes'}, + 'disk_size_gb': {'key': 'diskSizeGB', 'type': 'int'}, + 'storage_account_type': {'key': 'storageAccountType', 'type': 'str'}, + } + + def __init__(self, *, os_type, os_state, snapshot=None, managed_disk=None, blob_uri: str=None, caching=None, disk_size_gb: int=None, storage_account_type=None, **kwargs) -> None: + super(ImageOSDisk, self).__init__(**kwargs) + self.os_type = os_type + self.os_state = os_state + self.snapshot = snapshot + self.managed_disk = managed_disk + self.blob_uri = blob_uri + self.caching = caching + self.disk_size_gb = disk_size_gb + self.storage_account_type = storage_account_type + + +class ImagePurchasePlan(Model): + """Describes the gallery Image Definition purchase plan. This is used by + marketplace images. + + :param name: The plan ID. + :type name: str + :param publisher: The publisher ID. + :type publisher: str + :param product: The product ID. + :type product: str + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'publisher': {'key': 'publisher', 'type': 'str'}, + 'product': {'key': 'product', 'type': 'str'}, + } + + def __init__(self, *, name: str=None, publisher: str=None, product: str=None, **kwargs) -> None: + super(ImagePurchasePlan, self).__init__(**kwargs) + self.name = name + self.publisher = publisher + self.product = product + + +class SubResource(Model): + """SubResource. + + :param id: Resource Id + :type id: str + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + } + + def __init__(self, *, id: str=None, **kwargs) -> None: + super(SubResource, self).__init__(**kwargs) + self.id = id + + +class ImageReference(SubResource): + """Specifies information about the image to use. You can specify information + about platform images, marketplace images, or virtual machine images. This + element is required when you want to use a platform image, marketplace + image, or virtual machine image, but is not used in other creation + operations. + + :param id: Resource Id + :type id: str + :param publisher: The image publisher. + :type publisher: str + :param offer: Specifies the offer of the platform image or marketplace + image used to create the virtual machine. + :type offer: str + :param sku: The image SKU. + :type sku: str + :param version: Specifies the version of the platform image or marketplace + image used to create the virtual machine. The allowed formats are + Major.Minor.Build or 'latest'. Major, Minor, and Build are decimal + numbers. Specify 'latest' to use the latest version of an image available + at deploy time. Even if you use 'latest', the VM image will not + automatically update after deploy time even if a new version becomes + available. + :type version: str + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'publisher': {'key': 'publisher', 'type': 'str'}, + 'offer': {'key': 'offer', 'type': 'str'}, + 'sku': {'key': 'sku', 'type': 'str'}, + 'version': {'key': 'version', 'type': 'str'}, + } + + def __init__(self, *, id: str=None, publisher: str=None, offer: str=None, sku: str=None, version: str=None, **kwargs) -> None: + super(ImageReference, self).__init__(id=id, **kwargs) + self.publisher = publisher + self.offer = offer + self.sku = sku + self.version = version + + +class ImageStorageProfile(Model): + """Describes a storage profile. + + :param os_disk: Specifies information about the operating system disk used + by the virtual machine.

    For more information about disks, see + [About disks and VHDs for Azure virtual + machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-about-disks-vhds?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). + :type os_disk: ~azure.mgmt.compute.v2018_06_01.models.ImageOSDisk + :param data_disks: Specifies the parameters that are used to add a data + disk to a virtual machine.

    For more information about disks, see + [About disks and VHDs for Azure virtual + machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-about-disks-vhds?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). + :type data_disks: + list[~azure.mgmt.compute.v2018_06_01.models.ImageDataDisk] + :param zone_resilient: Specifies whether an image is zone resilient or + not. Default is false. Zone resilient images can be created only in + regions that provide Zone Redundant Storage (ZRS). + :type zone_resilient: bool + """ + + _attribute_map = { + 'os_disk': {'key': 'osDisk', 'type': 'ImageOSDisk'}, + 'data_disks': {'key': 'dataDisks', 'type': '[ImageDataDisk]'}, + 'zone_resilient': {'key': 'zoneResilient', 'type': 'bool'}, + } + + def __init__(self, *, os_disk=None, data_disks=None, zone_resilient: bool=None, **kwargs) -> None: + super(ImageStorageProfile, self).__init__(**kwargs) + self.os_disk = os_disk + self.data_disks = data_disks + self.zone_resilient = zone_resilient + + +class ImageUpdate(UpdateResource): + """The source user image virtual hard disk. Only tags may be updated. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :param tags: Resource tags + :type tags: dict[str, str] + :param source_virtual_machine: The source virtual machine from which Image + is created. + :type source_virtual_machine: + ~azure.mgmt.compute.v2018_06_01.models.SubResource + :param storage_profile: Specifies the storage settings for the virtual + machine disks. + :type storage_profile: + ~azure.mgmt.compute.v2018_06_01.models.ImageStorageProfile + :ivar provisioning_state: The provisioning state. + :vartype provisioning_state: str + """ + + _validation = { + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + 'source_virtual_machine': {'key': 'properties.sourceVirtualMachine', 'type': 'SubResource'}, + 'storage_profile': {'key': 'properties.storageProfile', 'type': 'ImageStorageProfile'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + } + + def __init__(self, *, tags=None, source_virtual_machine=None, storage_profile=None, **kwargs) -> None: + super(ImageUpdate, self).__init__(tags=tags, **kwargs) + self.source_virtual_machine = source_virtual_machine + self.storage_profile = storage_profile + self.provisioning_state = None + + +class InnerError(Model): + """Inner error details. + + :param exceptiontype: The exception type. + :type exceptiontype: str + :param errordetail: The internal error message or exception dump. + :type errordetail: str + """ + + _attribute_map = { + 'exceptiontype': {'key': 'exceptiontype', 'type': 'str'}, + 'errordetail': {'key': 'errordetail', 'type': 'str'}, + } + + def __init__(self, *, exceptiontype: str=None, errordetail: str=None, **kwargs) -> None: + super(InnerError, self).__init__(**kwargs) + self.exceptiontype = exceptiontype + self.errordetail = errordetail + + +class InstanceViewStatus(Model): + """Instance view status. + + :param code: The status code. + :type code: str + :param level: The level code. Possible values include: 'Info', 'Warning', + 'Error' + :type level: str or + ~azure.mgmt.compute.v2018_06_01.models.StatusLevelTypes + :param display_status: The short localizable label for the status. + :type display_status: str + :param message: The detailed status message, including for alerts and + error messages. + :type message: str + :param time: The time of the status. + :type time: datetime + """ + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + 'level': {'key': 'level', 'type': 'StatusLevelTypes'}, + 'display_status': {'key': 'displayStatus', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + 'time': {'key': 'time', 'type': 'iso-8601'}, + } + + def __init__(self, *, code: str=None, level=None, display_status: str=None, message: str=None, time=None, **kwargs) -> None: + super(InstanceViewStatus, self).__init__(**kwargs) + self.code = code + self.level = level + self.display_status = display_status + self.message = message + self.time = time + + +class KeyVaultAndKeyReference(Model): + """Key Vault Key Url and vault id of KeK, KeK is optional and when provided is + used to unwrap the encryptionKey. + + All required parameters must be populated in order to send to Azure. + + :param source_vault: Required. Resource id of the KeyVault containing the + key or secret + :type source_vault: ~azure.mgmt.compute.v2018_06_01.models.SourceVault + :param key_url: Required. Url pointing to a key or secret in KeyVault + :type key_url: str + """ + + _validation = { + 'source_vault': {'required': True}, + 'key_url': {'required': True}, + } + + _attribute_map = { + 'source_vault': {'key': 'sourceVault', 'type': 'SourceVault'}, + 'key_url': {'key': 'keyUrl', 'type': 'str'}, + } + + def __init__(self, *, source_vault, key_url: str, **kwargs) -> None: + super(KeyVaultAndKeyReference, self).__init__(**kwargs) + self.source_vault = source_vault + self.key_url = key_url + + +class KeyVaultAndSecretReference(Model): + """Key Vault Secret Url and vault id of the encryption key . + + All required parameters must be populated in order to send to Azure. + + :param source_vault: Required. Resource id of the KeyVault containing the + key or secret + :type source_vault: ~azure.mgmt.compute.v2018_06_01.models.SourceVault + :param secret_url: Required. Url pointing to a key or secret in KeyVault + :type secret_url: str + """ + + _validation = { + 'source_vault': {'required': True}, + 'secret_url': {'required': True}, + } + + _attribute_map = { + 'source_vault': {'key': 'sourceVault', 'type': 'SourceVault'}, + 'secret_url': {'key': 'secretUrl', 'type': 'str'}, + } + + def __init__(self, *, source_vault, secret_url: str, **kwargs) -> None: + super(KeyVaultAndSecretReference, self).__init__(**kwargs) + self.source_vault = source_vault + self.secret_url = secret_url + + +class KeyVaultKeyReference(Model): + """Describes a reference to Key Vault Key. + + All required parameters must be populated in order to send to Azure. + + :param key_url: Required. The URL referencing a key encryption key in Key + Vault. + :type key_url: str + :param source_vault: Required. The relative URL of the Key Vault + containing the key. + :type source_vault: ~azure.mgmt.compute.v2018_06_01.models.SubResource + """ + + _validation = { + 'key_url': {'required': True}, + 'source_vault': {'required': True}, + } + + _attribute_map = { + 'key_url': {'key': 'keyUrl', 'type': 'str'}, + 'source_vault': {'key': 'sourceVault', 'type': 'SubResource'}, + } + + def __init__(self, *, key_url: str, source_vault, **kwargs) -> None: + super(KeyVaultKeyReference, self).__init__(**kwargs) + self.key_url = key_url + self.source_vault = source_vault + + +class KeyVaultSecretReference(Model): + """Describes a reference to Key Vault Secret. + + All required parameters must be populated in order to send to Azure. + + :param secret_url: Required. The URL referencing a secret in a Key Vault. + :type secret_url: str + :param source_vault: Required. The relative URL of the Key Vault + containing the secret. + :type source_vault: ~azure.mgmt.compute.v2018_06_01.models.SubResource + """ + + _validation = { + 'secret_url': {'required': True}, + 'source_vault': {'required': True}, + } + + _attribute_map = { + 'secret_url': {'key': 'secretUrl', 'type': 'str'}, + 'source_vault': {'key': 'sourceVault', 'type': 'SubResource'}, + } + + def __init__(self, *, secret_url: str, source_vault, **kwargs) -> None: + super(KeyVaultSecretReference, self).__init__(**kwargs) + self.secret_url = secret_url + self.source_vault = source_vault + + +class LinuxConfiguration(Model): + """Specifies the Linux operating system settings on the virtual machine. +

    For a list of supported Linux distributions, see [Linux on + Azure-Endorsed + Distributions](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-endorsed-distros?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json) +

    For running non-endorsed distributions, see [Information for + Non-Endorsed + Distributions](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-create-upload-generic?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json). + + :param disable_password_authentication: Specifies whether password + authentication should be disabled. + :type disable_password_authentication: bool + :param ssh: Specifies the ssh key configuration for a Linux OS. + :type ssh: ~azure.mgmt.compute.v2018_06_01.models.SshConfiguration + :param provision_vm_agent: Indicates whether virtual machine agent should + be provisioned on the virtual machine.

    When this property is not + specified in the request body, default behavior is to set it to true. + This will ensure that VM Agent is installed on the VM so that extensions + can be added to the VM later. + :type provision_vm_agent: bool + """ + + _attribute_map = { + 'disable_password_authentication': {'key': 'disablePasswordAuthentication', 'type': 'bool'}, + 'ssh': {'key': 'ssh', 'type': 'SshConfiguration'}, + 'provision_vm_agent': {'key': 'provisionVMAgent', 'type': 'bool'}, + } + + def __init__(self, *, disable_password_authentication: bool=None, ssh=None, provision_vm_agent: bool=None, **kwargs) -> None: + super(LinuxConfiguration, self).__init__(**kwargs) + self.disable_password_authentication = disable_password_authentication + self.ssh = ssh + self.provision_vm_agent = provision_vm_agent + + +class LogAnalyticsInputBase(Model): + """Api input base class for LogAnalytics Api. + + All required parameters must be populated in order to send to Azure. + + :param blob_container_sas_uri: Required. SAS Uri of the logging blob + container to which LogAnalytics Api writes output logs to. + :type blob_container_sas_uri: str + :param from_time: Required. From time of the query + :type from_time: datetime + :param to_time: Required. To time of the query + :type to_time: datetime + :param group_by_throttle_policy: Group query result by Throttle Policy + applied. + :type group_by_throttle_policy: bool + :param group_by_operation_name: Group query result by Operation Name. + :type group_by_operation_name: bool + :param group_by_resource_name: Group query result by Resource Name. + :type group_by_resource_name: bool + """ + + _validation = { + 'blob_container_sas_uri': {'required': True}, + 'from_time': {'required': True}, + 'to_time': {'required': True}, + } + + _attribute_map = { + 'blob_container_sas_uri': {'key': 'blobContainerSasUri', 'type': 'str'}, + 'from_time': {'key': 'fromTime', 'type': 'iso-8601'}, + 'to_time': {'key': 'toTime', 'type': 'iso-8601'}, + 'group_by_throttle_policy': {'key': 'groupByThrottlePolicy', 'type': 'bool'}, + 'group_by_operation_name': {'key': 'groupByOperationName', 'type': 'bool'}, + 'group_by_resource_name': {'key': 'groupByResourceName', 'type': 'bool'}, + } + + def __init__(self, *, blob_container_sas_uri: str, from_time, to_time, group_by_throttle_policy: bool=None, group_by_operation_name: bool=None, group_by_resource_name: bool=None, **kwargs) -> None: + super(LogAnalyticsInputBase, self).__init__(**kwargs) + self.blob_container_sas_uri = blob_container_sas_uri + self.from_time = from_time + self.to_time = to_time + self.group_by_throttle_policy = group_by_throttle_policy + self.group_by_operation_name = group_by_operation_name + self.group_by_resource_name = group_by_resource_name + + +class LogAnalyticsOperationResult(Model): + """LogAnalytics operation status response. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar properties: LogAnalyticsOutput + :vartype properties: + ~azure.mgmt.compute.v2018_06_01.models.LogAnalyticsOutput + """ + + _validation = { + 'properties': {'readonly': True}, + } + + _attribute_map = { + 'properties': {'key': 'properties', 'type': 'LogAnalyticsOutput'}, + } + + def __init__(self, **kwargs) -> None: + super(LogAnalyticsOperationResult, self).__init__(**kwargs) + self.properties = None + + +class LogAnalyticsOutput(Model): + """LogAnalytics output properties. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar output: Output file Uri path to blob container. + :vartype output: str + """ + + _validation = { + 'output': {'readonly': True}, + } + + _attribute_map = { + 'output': {'key': 'output', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(LogAnalyticsOutput, self).__init__(**kwargs) + self.output = None + + +class MaintenanceRedeployStatus(Model): + """Maintenance Operation Status. + + :param is_customer_initiated_maintenance_allowed: True, if customer is + allowed to perform Maintenance. + :type is_customer_initiated_maintenance_allowed: bool + :param pre_maintenance_window_start_time: Start Time for the Pre + Maintenance Window. + :type pre_maintenance_window_start_time: datetime + :param pre_maintenance_window_end_time: End Time for the Pre Maintenance + Window. + :type pre_maintenance_window_end_time: datetime + :param maintenance_window_start_time: Start Time for the Maintenance + Window. + :type maintenance_window_start_time: datetime + :param maintenance_window_end_time: End Time for the Maintenance Window. + :type maintenance_window_end_time: datetime + :param last_operation_result_code: The Last Maintenance Operation Result + Code. Possible values include: 'None', 'RetryLater', 'MaintenanceAborted', + 'MaintenanceCompleted' + :type last_operation_result_code: str or + ~azure.mgmt.compute.v2018_06_01.models.MaintenanceOperationResultCodeTypes + :param last_operation_message: Message returned for the last Maintenance + Operation. + :type last_operation_message: str + """ + + _attribute_map = { + 'is_customer_initiated_maintenance_allowed': {'key': 'isCustomerInitiatedMaintenanceAllowed', 'type': 'bool'}, + 'pre_maintenance_window_start_time': {'key': 'preMaintenanceWindowStartTime', 'type': 'iso-8601'}, + 'pre_maintenance_window_end_time': {'key': 'preMaintenanceWindowEndTime', 'type': 'iso-8601'}, + 'maintenance_window_start_time': {'key': 'maintenanceWindowStartTime', 'type': 'iso-8601'}, + 'maintenance_window_end_time': {'key': 'maintenanceWindowEndTime', 'type': 'iso-8601'}, + 'last_operation_result_code': {'key': 'lastOperationResultCode', 'type': 'MaintenanceOperationResultCodeTypes'}, + 'last_operation_message': {'key': 'lastOperationMessage', 'type': 'str'}, + } + + def __init__(self, *, is_customer_initiated_maintenance_allowed: bool=None, pre_maintenance_window_start_time=None, pre_maintenance_window_end_time=None, maintenance_window_start_time=None, maintenance_window_end_time=None, last_operation_result_code=None, last_operation_message: str=None, **kwargs) -> None: + super(MaintenanceRedeployStatus, self).__init__(**kwargs) + self.is_customer_initiated_maintenance_allowed = is_customer_initiated_maintenance_allowed + self.pre_maintenance_window_start_time = pre_maintenance_window_start_time + self.pre_maintenance_window_end_time = pre_maintenance_window_end_time + self.maintenance_window_start_time = maintenance_window_start_time + self.maintenance_window_end_time = maintenance_window_end_time + self.last_operation_result_code = last_operation_result_code + self.last_operation_message = last_operation_message + + +class ManagedArtifact(Model): + """The managed artifact. + + All required parameters must be populated in order to send to Azure. + + :param id: Required. The managed artifact id. + :type id: str + """ + + _validation = { + 'id': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + } + + def __init__(self, *, id: str, **kwargs) -> None: + super(ManagedArtifact, self).__init__(**kwargs) + self.id = id + + +class ManagedDiskParameters(SubResource): + """The parameters of a managed disk. + + :param id: Resource Id + :type id: str + :param storage_account_type: Specifies the storage account type for the + managed disk. NOTE: UltraSSD_LRS can only be used with data disks, it + cannot be used with OS Disk. Possible values include: 'Standard_LRS', + 'Premium_LRS', 'StandardSSD_LRS', 'UltraSSD_LRS' + :type storage_account_type: str or + ~azure.mgmt.compute.v2018_06_01.models.StorageAccountTypes + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'storage_account_type': {'key': 'storageAccountType', 'type': 'str'}, + } + + def __init__(self, *, id: str=None, storage_account_type=None, **kwargs) -> None: + super(ManagedDiskParameters, self).__init__(id=id, **kwargs) + self.storage_account_type = storage_account_type + + +class NetworkInterfaceReference(SubResource): + """Describes a network interface reference. + + :param id: Resource Id + :type id: str + :param primary: Specifies the primary network interface in case the + virtual machine has more than 1 network interface. + :type primary: bool + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'primary': {'key': 'properties.primary', 'type': 'bool'}, + } + + def __init__(self, *, id: str=None, primary: bool=None, **kwargs) -> None: + super(NetworkInterfaceReference, self).__init__(id=id, **kwargs) + self.primary = primary + + +class NetworkProfile(Model): + """Specifies the network interfaces of the virtual machine. + + :param network_interfaces: Specifies the list of resource Ids for the + network interfaces associated with the virtual machine. + :type network_interfaces: + list[~azure.mgmt.compute.v2018_06_01.models.NetworkInterfaceReference] + """ + + _attribute_map = { + 'network_interfaces': {'key': 'networkInterfaces', 'type': '[NetworkInterfaceReference]'}, + } + + def __init__(self, *, network_interfaces=None, **kwargs) -> None: + super(NetworkProfile, self).__init__(**kwargs) + self.network_interfaces = network_interfaces + + +class OSDisk(Model): + """Specifies information about the operating system disk used by the virtual + machine.

    For more information about disks, see [About disks and + VHDs for Azure virtual + machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-about-disks-vhds?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). + + All required parameters must be populated in order to send to Azure. + + :param os_type: This property allows you to specify the type of the OS + that is included in the disk if creating a VM from user-image or a + specialized VHD.

    Possible values are:

    **Windows** +

    **Linux**. Possible values include: 'Windows', 'Linux' + :type os_type: str or + ~azure.mgmt.compute.v2018_06_01.models.OperatingSystemTypes + :param encryption_settings: Specifies the encryption settings for the OS + Disk.

    Minimum api-version: 2015-06-15 + :type encryption_settings: + ~azure.mgmt.compute.v2018_06_01.models.DiskEncryptionSettings + :param name: The disk name. + :type name: str + :param vhd: The virtual hard disk. + :type vhd: ~azure.mgmt.compute.v2018_06_01.models.VirtualHardDisk + :param image: The source user image virtual hard disk. The virtual hard + disk will be copied before being attached to the virtual machine. If + SourceImage is provided, the destination virtual hard drive must not + exist. + :type image: ~azure.mgmt.compute.v2018_06_01.models.VirtualHardDisk + :param caching: Specifies the caching requirements.

    Possible + values are:

    **None**

    **ReadOnly**

    **ReadWrite** +

    Default: **None for Standard storage. ReadOnly for Premium + storage**. Possible values include: 'None', 'ReadOnly', 'ReadWrite' + :type caching: str or ~azure.mgmt.compute.v2018_06_01.models.CachingTypes + :param write_accelerator_enabled: Specifies whether writeAccelerator + should be enabled or disabled on the disk. + :type write_accelerator_enabled: bool + :param diff_disk_settings: Specifies the ephemeral Disk Settings for the + operating system disk used by the virtual machine. + :type diff_disk_settings: + ~azure.mgmt.compute.v2018_06_01.models.DiffDiskSettings + :param create_option: Required. Specifies how the virtual machine should + be created.

    Possible values are:

    **Attach** \\u2013 This + value is used when you are using a specialized disk to create the virtual + machine.

    **FromImage** \\u2013 This value is used when you are + using an image to create the virtual machine. If you are using a platform + image, you also use the imageReference element described above. If you are + using a marketplace image, you also use the plan element previously + described. Possible values include: 'FromImage', 'Empty', 'Attach' + :type create_option: str or + ~azure.mgmt.compute.v2018_06_01.models.DiskCreateOptionTypes + :param disk_size_gb: Specifies the size of an empty data disk in + gigabytes. This element can be used to overwrite the size of the disk in a + virtual machine image.

    This value cannot be larger than 1023 GB + :type disk_size_gb: int + :param managed_disk: The managed disk parameters. + :type managed_disk: + ~azure.mgmt.compute.v2018_06_01.models.ManagedDiskParameters + """ + + _validation = { + 'create_option': {'required': True}, + } + + _attribute_map = { + 'os_type': {'key': 'osType', 'type': 'OperatingSystemTypes'}, + 'encryption_settings': {'key': 'encryptionSettings', 'type': 'DiskEncryptionSettings'}, + 'name': {'key': 'name', 'type': 'str'}, + 'vhd': {'key': 'vhd', 'type': 'VirtualHardDisk'}, + 'image': {'key': 'image', 'type': 'VirtualHardDisk'}, + 'caching': {'key': 'caching', 'type': 'CachingTypes'}, + 'write_accelerator_enabled': {'key': 'writeAcceleratorEnabled', 'type': 'bool'}, + 'diff_disk_settings': {'key': 'diffDiskSettings', 'type': 'DiffDiskSettings'}, + 'create_option': {'key': 'createOption', 'type': 'str'}, + 'disk_size_gb': {'key': 'diskSizeGB', 'type': 'int'}, + 'managed_disk': {'key': 'managedDisk', 'type': 'ManagedDiskParameters'}, + } + + def __init__(self, *, create_option, os_type=None, encryption_settings=None, name: str=None, vhd=None, image=None, caching=None, write_accelerator_enabled: bool=None, diff_disk_settings=None, disk_size_gb: int=None, managed_disk=None, **kwargs) -> None: + super(OSDisk, self).__init__(**kwargs) + self.os_type = os_type + self.encryption_settings = encryption_settings + self.name = name + self.vhd = vhd + self.image = image + self.caching = caching + self.write_accelerator_enabled = write_accelerator_enabled + self.diff_disk_settings = diff_disk_settings + self.create_option = create_option + self.disk_size_gb = disk_size_gb + self.managed_disk = managed_disk + + +class OSDiskImage(Model): + """Contains the os disk image information. + + All required parameters must be populated in order to send to Azure. + + :param operating_system: Required. The operating system of the + osDiskImage. Possible values include: 'Windows', 'Linux' + :type operating_system: str or + ~azure.mgmt.compute.v2018_06_01.models.OperatingSystemTypes + """ + + _validation = { + 'operating_system': {'required': True}, + } + + _attribute_map = { + 'operating_system': {'key': 'operatingSystem', 'type': 'OperatingSystemTypes'}, + } + + def __init__(self, *, operating_system, **kwargs) -> None: + super(OSDiskImage, self).__init__(**kwargs) + self.operating_system = operating_system + + +class OSProfile(Model): + """Specifies the operating system settings for the virtual machine. + + :param computer_name: Specifies the host OS name of the virtual machine. +

    This name cannot be updated after the VM is created.

    + **Max-length (Windows):** 15 characters

    **Max-length (Linux):** + 64 characters.

    For naming conventions and restrictions see [Azure + infrastructure services implementation + guidelines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-infrastructure-subscription-accounts-guidelines?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json#1-naming-conventions). + :type computer_name: str + :param admin_username: Specifies the name of the administrator account. +

    **Windows-only restriction:** Cannot end in "."

    + **Disallowed values:** "administrator", "admin", "user", "user1", "test", + "user2", "test1", "user3", "admin1", "1", "123", "a", "actuser", "adm", + "admin2", "aspnet", "backup", "console", "david", "guest", "john", + "owner", "root", "server", "sql", "support", "support_388945a0", "sys", + "test2", "test3", "user4", "user5".

    **Minimum-length (Linux):** 1 + character

    **Max-length (Linux):** 64 characters

    + **Max-length (Windows):** 20 characters

  • For root access to + the Linux VM, see [Using root privileges on Linux virtual machines in + Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-use-root-privileges?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json)
  • + For a list of built-in system users on Linux that should not be used in + this field, see [Selecting User Names for Linux on + Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-usernames?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json) + :type admin_username: str + :param admin_password: Specifies the password of the administrator + account.

    **Minimum-length (Windows):** 8 characters

    + **Minimum-length (Linux):** 6 characters

    **Max-length + (Windows):** 123 characters

    **Max-length (Linux):** 72 characters +

    **Complexity requirements:** 3 out of 4 conditions below need to + be fulfilled
    Has lower characters
    Has upper characters
    Has a + digit
    Has a special character (Regex match [\\W_])

    + **Disallowed values:** "abc@123", "P@$$w0rd", "P@ssw0rd", "P@ssword123", + "Pa$$word", "pass@word1", "Password!", "Password1", "Password22", + "iloveyou!"

    For resetting the password, see [How to reset the + Remote Desktop service or its login password in a Windows + VM](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-reset-rdp?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json) +

    For resetting root password, see [Manage users, SSH, and check or + repair disks on Azure Linux VMs using the VMAccess + Extension](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-using-vmaccess-extension?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json#reset-root-password) + :type admin_password: str + :param custom_data: Specifies a base-64 encoded string of custom data. The + base-64 encoded string is decoded to a binary array that is saved as a + file on the Virtual Machine. The maximum length of the binary array is + 65535 bytes.

    For using cloud-init for your VM, see [Using + cloud-init to customize a Linux VM during + creation](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-using-cloud-init?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json) + :type custom_data: str + :param windows_configuration: Specifies Windows operating system settings + on the virtual machine. + :type windows_configuration: + ~azure.mgmt.compute.v2018_06_01.models.WindowsConfiguration + :param linux_configuration: Specifies the Linux operating system settings + on the virtual machine.

    For a list of supported Linux + distributions, see [Linux on Azure-Endorsed + Distributions](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-endorsed-distros?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json) +

    For running non-endorsed distributions, see [Information for + Non-Endorsed + Distributions](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-create-upload-generic?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json). + :type linux_configuration: + ~azure.mgmt.compute.v2018_06_01.models.LinuxConfiguration + :param secrets: Specifies set of certificates that should be installed + onto the virtual machine. + :type secrets: + list[~azure.mgmt.compute.v2018_06_01.models.VaultSecretGroup] + :param allow_extension_operations: Specifies whether extension operations + should be allowed on the virtual machine.

    This may only be set to + False when no extensions are present on the virtual machine. + :type allow_extension_operations: bool + """ + + _attribute_map = { + 'computer_name': {'key': 'computerName', 'type': 'str'}, + 'admin_username': {'key': 'adminUsername', 'type': 'str'}, + 'admin_password': {'key': 'adminPassword', 'type': 'str'}, + 'custom_data': {'key': 'customData', 'type': 'str'}, + 'windows_configuration': {'key': 'windowsConfiguration', 'type': 'WindowsConfiguration'}, + 'linux_configuration': {'key': 'linuxConfiguration', 'type': 'LinuxConfiguration'}, + 'secrets': {'key': 'secrets', 'type': '[VaultSecretGroup]'}, + 'allow_extension_operations': {'key': 'allowExtensionOperations', 'type': 'bool'}, + } + + def __init__(self, *, computer_name: str=None, admin_username: str=None, admin_password: str=None, custom_data: str=None, windows_configuration=None, linux_configuration=None, secrets=None, allow_extension_operations: bool=None, **kwargs) -> None: + super(OSProfile, self).__init__(**kwargs) + self.computer_name = computer_name + self.admin_username = admin_username + self.admin_password = admin_password + self.custom_data = custom_data + self.windows_configuration = windows_configuration + self.linux_configuration = linux_configuration + self.secrets = secrets + self.allow_extension_operations = allow_extension_operations + + +class Plan(Model): + """Specifies information about the marketplace image used to create the + virtual machine. This element is only used for marketplace images. Before + you can use a marketplace image from an API, you must enable the image for + programmatic use. In the Azure portal, find the marketplace image that you + want to use and then click **Want to deploy programmatically, Get Started + ->**. Enter any required information and then click **Save**. + + :param name: The plan ID. + :type name: str + :param publisher: The publisher ID. + :type publisher: str + :param product: Specifies the product of the image from the marketplace. + This is the same value as Offer under the imageReference element. + :type product: str + :param promotion_code: The promotion code. + :type promotion_code: str + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'publisher': {'key': 'publisher', 'type': 'str'}, + 'product': {'key': 'product', 'type': 'str'}, + 'promotion_code': {'key': 'promotionCode', 'type': 'str'}, + } + + def __init__(self, *, name: str=None, publisher: str=None, product: str=None, promotion_code: str=None, **kwargs) -> None: + super(Plan, self).__init__(**kwargs) + self.name = name + self.publisher = publisher + self.product = product + self.promotion_code = promotion_code + + +class ProximityPlacementGroup(Resource): + """Specifies information about the proximity placement group. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource Id + :vartype id: str + :ivar name: Resource name + :vartype name: str + :ivar type: Resource type + :vartype type: str + :param location: Required. Resource location + :type location: str + :param tags: Resource tags + :type tags: dict[str, str] + :param proximity_placement_group_type: Specifies the type of the proximity + placement group.

    Possible values are:

    **Standard** : + Co-locate resources within an Azure region or Availability Zone.

    + **Ultra** : For future use. Possible values include: 'Standard', 'Ultra' + :type proximity_placement_group_type: str or + ~azure.mgmt.compute.v2018_06_01.models.ProximityPlacementGroupType + :ivar virtual_machines: A list of references to all virtual machines in + the proximity placement group. + :vartype virtual_machines: + list[~azure.mgmt.compute.v2018_06_01.models.SubResource] + :ivar virtual_machine_scale_sets: A list of references to all virtual + machine scale sets in the proximity placement group. + :vartype virtual_machine_scale_sets: + list[~azure.mgmt.compute.v2018_06_01.models.SubResource] + :ivar availability_sets: A list of references to all availability sets in + the proximity placement group. + :vartype availability_sets: + list[~azure.mgmt.compute.v2018_06_01.models.SubResource] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + 'virtual_machines': {'readonly': True}, + 'virtual_machine_scale_sets': {'readonly': True}, + 'availability_sets': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'proximity_placement_group_type': {'key': 'properties.proximityPlacementGroupType', 'type': 'str'}, + 'virtual_machines': {'key': 'properties.virtualMachines', 'type': '[SubResource]'}, + 'virtual_machine_scale_sets': {'key': 'properties.virtualMachineScaleSets', 'type': '[SubResource]'}, + 'availability_sets': {'key': 'properties.availabilitySets', 'type': '[SubResource]'}, + } + + def __init__(self, *, location: str, tags=None, proximity_placement_group_type=None, **kwargs) -> None: + super(ProximityPlacementGroup, self).__init__(location=location, tags=tags, **kwargs) + self.proximity_placement_group_type = proximity_placement_group_type + self.virtual_machines = None + self.virtual_machine_scale_sets = None + self.availability_sets = None + + +class ProximityPlacementGroupUpdate(UpdateResource): + """Specifies information about the proximity placement group. + + :param tags: Resource tags + :type tags: dict[str, str] + """ + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__(self, *, tags=None, **kwargs) -> None: + super(ProximityPlacementGroupUpdate, self).__init__(tags=tags, **kwargs) + + +class PurchasePlan(Model): + """Used for establishing the purchase context of any 3rd Party artifact + through MarketPlace. + + All required parameters must be populated in order to send to Azure. + + :param publisher: Required. The publisher ID. + :type publisher: str + :param name: Required. The plan ID. + :type name: str + :param product: Required. Specifies the product of the image from the + marketplace. This is the same value as Offer under the imageReference + element. + :type product: str + """ + + _validation = { + 'publisher': {'required': True}, + 'name': {'required': True}, + 'product': {'required': True}, + } + + _attribute_map = { + 'publisher': {'key': 'publisher', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'product': {'key': 'product', 'type': 'str'}, + } + + def __init__(self, *, publisher: str, name: str, product: str, **kwargs) -> None: + super(PurchasePlan, self).__init__(**kwargs) + self.publisher = publisher + self.name = name + self.product = product + + +class RecommendedMachineConfiguration(Model): + """The properties describe the recommended machine configuration for this + Image Definition. These properties are updatable. + + :param v_cp_us: + :type v_cp_us: ~azure.mgmt.compute.v2018_06_01.models.ResourceRange + :param memory: + :type memory: ~azure.mgmt.compute.v2018_06_01.models.ResourceRange + """ + + _attribute_map = { + 'v_cp_us': {'key': 'vCPUs', 'type': 'ResourceRange'}, + 'memory': {'key': 'memory', 'type': 'ResourceRange'}, + } + + def __init__(self, *, v_cp_us=None, memory=None, **kwargs) -> None: + super(RecommendedMachineConfiguration, self).__init__(**kwargs) + self.v_cp_us = v_cp_us + self.memory = memory + + +class RecoveryWalkResponse(Model): + """Response after calling a manual recovery walk. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar walk_performed: Whether the recovery walk was performed + :vartype walk_performed: bool + :ivar next_platform_update_domain: The next update domain that needs to be + walked. Null means walk spanning all update domains has been completed + :vartype next_platform_update_domain: int + """ + + _validation = { + 'walk_performed': {'readonly': True}, + 'next_platform_update_domain': {'readonly': True}, + } + + _attribute_map = { + 'walk_performed': {'key': 'walkPerformed', 'type': 'bool'}, + 'next_platform_update_domain': {'key': 'nextPlatformUpdateDomain', 'type': 'int'}, + } + + def __init__(self, **kwargs) -> None: + super(RecoveryWalkResponse, self).__init__(**kwargs) + self.walk_performed = None + self.next_platform_update_domain = None + + +class RegionalReplicationStatus(Model): + """This is the regional replication status. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar region: The region to which the gallery Image Version is being + replicated to. + :vartype region: str + :ivar state: This is the regional replication state. Possible values + include: 'Unknown', 'Replicating', 'Completed', 'Failed' + :vartype state: str or + ~azure.mgmt.compute.v2018_06_01.models.ReplicationState + :ivar details: The details of the replication status. + :vartype details: str + :ivar progress: It indicates progress of the replication job. + :vartype progress: int + """ + + _validation = { + 'region': {'readonly': True}, + 'state': {'readonly': True}, + 'details': {'readonly': True}, + 'progress': {'readonly': True}, + } + + _attribute_map = { + 'region': {'key': 'region', 'type': 'str'}, + 'state': {'key': 'state', 'type': 'str'}, + 'details': {'key': 'details', 'type': 'str'}, + 'progress': {'key': 'progress', 'type': 'int'}, + } + + def __init__(self, **kwargs) -> None: + super(RegionalReplicationStatus, self).__init__(**kwargs) + self.region = None + self.state = None + self.details = None + self.progress = None + + +class ReplicationStatus(Model): + """This is the replication status of the gallery Image Version. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar aggregated_state: This is the aggregated replication status based on + all the regional replication status flags. Possible values include: + 'Unknown', 'InProgress', 'Completed', 'Failed' + :vartype aggregated_state: str or + ~azure.mgmt.compute.v2018_06_01.models.AggregatedReplicationState + :ivar summary: This is a summary of replication status for each region. + :vartype summary: + list[~azure.mgmt.compute.v2018_06_01.models.RegionalReplicationStatus] + """ + + _validation = { + 'aggregated_state': {'readonly': True}, + 'summary': {'readonly': True}, + } + + _attribute_map = { + 'aggregated_state': {'key': 'aggregatedState', 'type': 'str'}, + 'summary': {'key': 'summary', 'type': '[RegionalReplicationStatus]'}, + } + + def __init__(self, **kwargs) -> None: + super(ReplicationStatus, self).__init__(**kwargs) + self.aggregated_state = None + self.summary = None + + +class RequestRateByIntervalInput(LogAnalyticsInputBase): + """Api request input for LogAnalytics getRequestRateByInterval Api. + + All required parameters must be populated in order to send to Azure. + + :param blob_container_sas_uri: Required. SAS Uri of the logging blob + container to which LogAnalytics Api writes output logs to. + :type blob_container_sas_uri: str + :param from_time: Required. From time of the query + :type from_time: datetime + :param to_time: Required. To time of the query + :type to_time: datetime + :param group_by_throttle_policy: Group query result by Throttle Policy + applied. + :type group_by_throttle_policy: bool + :param group_by_operation_name: Group query result by Operation Name. + :type group_by_operation_name: bool + :param group_by_resource_name: Group query result by Resource Name. + :type group_by_resource_name: bool + :param interval_length: Required. Interval value in minutes used to create + LogAnalytics call rate logs. Possible values include: 'ThreeMins', + 'FiveMins', 'ThirtyMins', 'SixtyMins' + :type interval_length: str or + ~azure.mgmt.compute.v2018_06_01.models.IntervalInMins + """ + + _validation = { + 'blob_container_sas_uri': {'required': True}, + 'from_time': {'required': True}, + 'to_time': {'required': True}, + 'interval_length': {'required': True}, + } + + _attribute_map = { + 'blob_container_sas_uri': {'key': 'blobContainerSasUri', 'type': 'str'}, + 'from_time': {'key': 'fromTime', 'type': 'iso-8601'}, + 'to_time': {'key': 'toTime', 'type': 'iso-8601'}, + 'group_by_throttle_policy': {'key': 'groupByThrottlePolicy', 'type': 'bool'}, + 'group_by_operation_name': {'key': 'groupByOperationName', 'type': 'bool'}, + 'group_by_resource_name': {'key': 'groupByResourceName', 'type': 'bool'}, + 'interval_length': {'key': 'intervalLength', 'type': 'IntervalInMins'}, + } + + def __init__(self, *, blob_container_sas_uri: str, from_time, to_time, interval_length, group_by_throttle_policy: bool=None, group_by_operation_name: bool=None, group_by_resource_name: bool=None, **kwargs) -> None: + super(RequestRateByIntervalInput, self).__init__(blob_container_sas_uri=blob_container_sas_uri, from_time=from_time, to_time=to_time, group_by_throttle_policy=group_by_throttle_policy, group_by_operation_name=group_by_operation_name, group_by_resource_name=group_by_resource_name, **kwargs) + self.interval_length = interval_length + + +class ResourceRange(Model): + """Describes the resource range. + + :param min: The minimum number of the resource. + :type min: int + :param max: The maximum number of the resource. + :type max: int + """ + + _attribute_map = { + 'min': {'key': 'min', 'type': 'int'}, + 'max': {'key': 'max', 'type': 'int'}, + } + + def __init__(self, *, min: int=None, max: int=None, **kwargs) -> None: + super(ResourceRange, self).__init__(**kwargs) + self.min = min + self.max = max + + +class RollbackStatusInfo(Model): + """Information about rollback on failed VM instances after a OS Upgrade + operation. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar successfully_rolledback_instance_count: The number of instances + which have been successfully rolled back. + :vartype successfully_rolledback_instance_count: int + :ivar failed_rolledback_instance_count: The number of instances which + failed to rollback. + :vartype failed_rolledback_instance_count: int + :ivar rollback_error: Error details if OS rollback failed. + :vartype rollback_error: ~azure.mgmt.compute.v2018_06_01.models.ApiError + """ + + _validation = { + 'successfully_rolledback_instance_count': {'readonly': True}, + 'failed_rolledback_instance_count': {'readonly': True}, + 'rollback_error': {'readonly': True}, + } + + _attribute_map = { + 'successfully_rolledback_instance_count': {'key': 'successfullyRolledbackInstanceCount', 'type': 'int'}, + 'failed_rolledback_instance_count': {'key': 'failedRolledbackInstanceCount', 'type': 'int'}, + 'rollback_error': {'key': 'rollbackError', 'type': 'ApiError'}, + } + + def __init__(self, **kwargs) -> None: + super(RollbackStatusInfo, self).__init__(**kwargs) + self.successfully_rolledback_instance_count = None + self.failed_rolledback_instance_count = None + self.rollback_error = None + + +class RollingUpgradePolicy(Model): + """The configuration parameters used while performing a rolling upgrade. + + :param max_batch_instance_percent: The maximum percent of total virtual + machine instances that will be upgraded simultaneously by the rolling + upgrade in one batch. As this is a maximum, unhealthy instances in + previous or future batches can cause the percentage of instances in a + batch to decrease to ensure higher reliability. The default value for this + parameter is 20%. + :type max_batch_instance_percent: int + :param max_unhealthy_instance_percent: The maximum percentage of the total + virtual machine instances in the scale set that can be simultaneously + unhealthy, either as a result of being upgraded, or by being found in an + unhealthy state by the virtual machine health checks before the rolling + upgrade aborts. This constraint will be checked prior to starting any + batch. The default value for this parameter is 20%. + :type max_unhealthy_instance_percent: int + :param max_unhealthy_upgraded_instance_percent: The maximum percentage of + upgraded virtual machine instances that can be found to be in an unhealthy + state. This check will happen after each batch is upgraded. If this + percentage is ever exceeded, the rolling update aborts. The default value + for this parameter is 20%. + :type max_unhealthy_upgraded_instance_percent: int + :param pause_time_between_batches: The wait time between completing the + update for all virtual machines in one batch and starting the next batch. + The time duration should be specified in ISO 8601 format. The default + value is 0 seconds (PT0S). + :type pause_time_between_batches: str + """ + + _validation = { + 'max_batch_instance_percent': {'maximum': 100, 'minimum': 5}, + 'max_unhealthy_instance_percent': {'maximum': 100, 'minimum': 5}, + 'max_unhealthy_upgraded_instance_percent': {'maximum': 100, 'minimum': 0}, + } + + _attribute_map = { + 'max_batch_instance_percent': {'key': 'maxBatchInstancePercent', 'type': 'int'}, + 'max_unhealthy_instance_percent': {'key': 'maxUnhealthyInstancePercent', 'type': 'int'}, + 'max_unhealthy_upgraded_instance_percent': {'key': 'maxUnhealthyUpgradedInstancePercent', 'type': 'int'}, + 'pause_time_between_batches': {'key': 'pauseTimeBetweenBatches', 'type': 'str'}, + } + + def __init__(self, *, max_batch_instance_percent: int=None, max_unhealthy_instance_percent: int=None, max_unhealthy_upgraded_instance_percent: int=None, pause_time_between_batches: str=None, **kwargs) -> None: + super(RollingUpgradePolicy, self).__init__(**kwargs) + self.max_batch_instance_percent = max_batch_instance_percent + self.max_unhealthy_instance_percent = max_unhealthy_instance_percent + self.max_unhealthy_upgraded_instance_percent = max_unhealthy_upgraded_instance_percent + self.pause_time_between_batches = pause_time_between_batches + + +class RollingUpgradeProgressInfo(Model): + """Information about the number of virtual machine instances in each upgrade + state. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar successful_instance_count: The number of instances that have been + successfully upgraded. + :vartype successful_instance_count: int + :ivar failed_instance_count: The number of instances that have failed to + be upgraded successfully. + :vartype failed_instance_count: int + :ivar in_progress_instance_count: The number of instances that are + currently being upgraded. + :vartype in_progress_instance_count: int + :ivar pending_instance_count: The number of instances that have not yet + begun to be upgraded. + :vartype pending_instance_count: int + """ + + _validation = { + 'successful_instance_count': {'readonly': True}, + 'failed_instance_count': {'readonly': True}, + 'in_progress_instance_count': {'readonly': True}, + 'pending_instance_count': {'readonly': True}, + } + + _attribute_map = { + 'successful_instance_count': {'key': 'successfulInstanceCount', 'type': 'int'}, + 'failed_instance_count': {'key': 'failedInstanceCount', 'type': 'int'}, + 'in_progress_instance_count': {'key': 'inProgressInstanceCount', 'type': 'int'}, + 'pending_instance_count': {'key': 'pendingInstanceCount', 'type': 'int'}, + } + + def __init__(self, **kwargs) -> None: + super(RollingUpgradeProgressInfo, self).__init__(**kwargs) + self.successful_instance_count = None + self.failed_instance_count = None + self.in_progress_instance_count = None + self.pending_instance_count = None + + +class RollingUpgradeRunningStatus(Model): + """Information about the current running state of the overall upgrade. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar code: Code indicating the current status of the upgrade. Possible + values include: 'RollingForward', 'Cancelled', 'Completed', 'Faulted' + :vartype code: str or + ~azure.mgmt.compute.v2018_06_01.models.RollingUpgradeStatusCode + :ivar start_time: Start time of the upgrade. + :vartype start_time: datetime + :ivar last_action: The last action performed on the rolling upgrade. + Possible values include: 'Start', 'Cancel' + :vartype last_action: str or + ~azure.mgmt.compute.v2018_06_01.models.RollingUpgradeActionType + :ivar last_action_time: Last action time of the upgrade. + :vartype last_action_time: datetime + """ + + _validation = { + 'code': {'readonly': True}, + 'start_time': {'readonly': True}, + 'last_action': {'readonly': True}, + 'last_action_time': {'readonly': True}, + } + + _attribute_map = { + 'code': {'key': 'code', 'type': 'RollingUpgradeStatusCode'}, + 'start_time': {'key': 'startTime', 'type': 'iso-8601'}, + 'last_action': {'key': 'lastAction', 'type': 'RollingUpgradeActionType'}, + 'last_action_time': {'key': 'lastActionTime', 'type': 'iso-8601'}, + } + + def __init__(self, **kwargs) -> None: + super(RollingUpgradeRunningStatus, self).__init__(**kwargs) + self.code = None + self.start_time = None + self.last_action = None + self.last_action_time = None + + +class RollingUpgradeStatusInfo(Resource): + """The status of the latest virtual machine scale set rolling upgrade. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource Id + :vartype id: str + :ivar name: Resource name + :vartype name: str + :ivar type: Resource type + :vartype type: str + :param location: Required. Resource location + :type location: str + :param tags: Resource tags + :type tags: dict[str, str] + :ivar policy: The rolling upgrade policies applied for this upgrade. + :vartype policy: + ~azure.mgmt.compute.v2018_06_01.models.RollingUpgradePolicy + :ivar running_status: Information about the current running state of the + overall upgrade. + :vartype running_status: + ~azure.mgmt.compute.v2018_06_01.models.RollingUpgradeRunningStatus + :ivar progress: Information about the number of virtual machine instances + in each upgrade state. + :vartype progress: + ~azure.mgmt.compute.v2018_06_01.models.RollingUpgradeProgressInfo + :ivar error: Error details for this upgrade, if there are any. + :vartype error: ~azure.mgmt.compute.v2018_06_01.models.ApiError + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + 'policy': {'readonly': True}, + 'running_status': {'readonly': True}, + 'progress': {'readonly': True}, + 'error': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'policy': {'key': 'properties.policy', 'type': 'RollingUpgradePolicy'}, + 'running_status': {'key': 'properties.runningStatus', 'type': 'RollingUpgradeRunningStatus'}, + 'progress': {'key': 'properties.progress', 'type': 'RollingUpgradeProgressInfo'}, + 'error': {'key': 'properties.error', 'type': 'ApiError'}, + } + + def __init__(self, *, location: str, tags=None, **kwargs) -> None: + super(RollingUpgradeStatusInfo, self).__init__(location=location, tags=tags, **kwargs) + self.policy = None + self.running_status = None + self.progress = None + self.error = None + + +class RunCommandDocumentBase(Model): + """Describes the properties of a Run Command metadata. + + All required parameters must be populated in order to send to Azure. + + :param schema: Required. The VM run command schema. + :type schema: str + :param id: Required. The VM run command id. + :type id: str + :param os_type: Required. The Operating System type. Possible values + include: 'Windows', 'Linux' + :type os_type: str or + ~azure.mgmt.compute.v2018_06_01.models.OperatingSystemTypes + :param label: Required. The VM run command label. + :type label: str + :param description: Required. The VM run command description. + :type description: str + """ + + _validation = { + 'schema': {'required': True}, + 'id': {'required': True}, + 'os_type': {'required': True}, + 'label': {'required': True}, + 'description': {'required': True}, + } + + _attribute_map = { + 'schema': {'key': '$schema', 'type': 'str'}, + 'id': {'key': 'id', 'type': 'str'}, + 'os_type': {'key': 'osType', 'type': 'OperatingSystemTypes'}, + 'label': {'key': 'label', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + } + + def __init__(self, *, schema: str, id: str, os_type, label: str, description: str, **kwargs) -> None: + super(RunCommandDocumentBase, self).__init__(**kwargs) + self.schema = schema + self.id = id + self.os_type = os_type + self.label = label + self.description = description + + +class RunCommandDocument(RunCommandDocumentBase): + """Describes the properties of a Run Command. + + All required parameters must be populated in order to send to Azure. + + :param schema: Required. The VM run command schema. + :type schema: str + :param id: Required. The VM run command id. + :type id: str + :param os_type: Required. The Operating System type. Possible values + include: 'Windows', 'Linux' + :type os_type: str or + ~azure.mgmt.compute.v2018_06_01.models.OperatingSystemTypes + :param label: Required. The VM run command label. + :type label: str + :param description: Required. The VM run command description. + :type description: str + :param script: Required. The script to be executed. + :type script: list[str] + :param parameters: The parameters used by the script. + :type parameters: + list[~azure.mgmt.compute.v2018_06_01.models.RunCommandParameterDefinition] + """ + + _validation = { + 'schema': {'required': True}, + 'id': {'required': True}, + 'os_type': {'required': True}, + 'label': {'required': True}, + 'description': {'required': True}, + 'script': {'required': True}, + } + + _attribute_map = { + 'schema': {'key': '$schema', 'type': 'str'}, + 'id': {'key': 'id', 'type': 'str'}, + 'os_type': {'key': 'osType', 'type': 'OperatingSystemTypes'}, + 'label': {'key': 'label', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + 'script': {'key': 'script', 'type': '[str]'}, + 'parameters': {'key': 'parameters', 'type': '[RunCommandParameterDefinition]'}, + } + + def __init__(self, *, schema: str, id: str, os_type, label: str, description: str, script, parameters=None, **kwargs) -> None: + super(RunCommandDocument, self).__init__(schema=schema, id=id, os_type=os_type, label=label, description=description, **kwargs) + self.script = script + self.parameters = parameters + + +class RunCommandInput(Model): + """Capture Virtual Machine parameters. + + All required parameters must be populated in order to send to Azure. + + :param command_id: Required. The run command id. + :type command_id: str + :param script: Optional. The script to be executed. When this value is + given, the given script will override the default script of the command. + :type script: list[str] + :param parameters: The run command parameters. + :type parameters: + list[~azure.mgmt.compute.v2018_06_01.models.RunCommandInputParameter] + """ + + _validation = { + 'command_id': {'required': True}, + } + + _attribute_map = { + 'command_id': {'key': 'commandId', 'type': 'str'}, + 'script': {'key': 'script', 'type': '[str]'}, + 'parameters': {'key': 'parameters', 'type': '[RunCommandInputParameter]'}, + } + + def __init__(self, *, command_id: str, script=None, parameters=None, **kwargs) -> None: + super(RunCommandInput, self).__init__(**kwargs) + self.command_id = command_id + self.script = script + self.parameters = parameters + + +class RunCommandInputParameter(Model): + """Describes the properties of a run command parameter. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. The run command parameter name. + :type name: str + :param value: Required. The run command parameter value. + :type value: str + """ + + _validation = { + 'name': {'required': True}, + 'value': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'value': {'key': 'value', 'type': 'str'}, + } + + def __init__(self, *, name: str, value: str, **kwargs) -> None: + super(RunCommandInputParameter, self).__init__(**kwargs) + self.name = name + self.value = value + + +class RunCommandParameterDefinition(Model): + """Describes the properties of a run command parameter. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. The run command parameter name. + :type name: str + :param type: Required. The run command parameter type. + :type type: str + :param default_value: The run command parameter default value. + :type default_value: str + :param required: The run command parameter required. Default value: False + . + :type required: bool + """ + + _validation = { + 'name': {'required': True}, + 'type': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'default_value': {'key': 'defaultValue', 'type': 'str'}, + 'required': {'key': 'required', 'type': 'bool'}, + } + + def __init__(self, *, name: str, type: str, default_value: str=None, required: bool=False, **kwargs) -> None: + super(RunCommandParameterDefinition, self).__init__(**kwargs) + self.name = name + self.type = type + self.default_value = default_value + self.required = required + + +class RunCommandResult(Model): + """RunCommandResult. + + :param value: Run command operation response. + :type value: + list[~azure.mgmt.compute.v2018_06_01.models.InstanceViewStatus] + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[InstanceViewStatus]'}, + } + + def __init__(self, *, value=None, **kwargs) -> None: + super(RunCommandResult, self).__init__(**kwargs) + self.value = value + + +class Sku(Model): + """Describes a virtual machine scale set sku. + + :param name: The sku name. + :type name: str + :param tier: Specifies the tier of virtual machines in a scale set.

    Possible Values:

    **Standard**

    **Basic** + :type tier: str + :param capacity: Specifies the number of virtual machines in the scale + set. + :type capacity: long + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'tier': {'key': 'tier', 'type': 'str'}, + 'capacity': {'key': 'capacity', 'type': 'long'}, + } + + def __init__(self, *, name: str=None, tier: str=None, capacity: int=None, **kwargs) -> None: + super(Sku, self).__init__(**kwargs) + self.name = name + self.tier = tier + self.capacity = capacity + + +class Snapshot(Resource): + """Snapshot resource. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource Id + :vartype id: str + :ivar name: Resource name + :vartype name: str + :ivar type: Resource type + :vartype type: str + :param location: Required. Resource location + :type location: str + :param tags: Resource tags + :type tags: dict[str, str] + :ivar managed_by: Unused. Always Null. + :vartype managed_by: str + :param sku: + :type sku: ~azure.mgmt.compute.v2018_06_01.models.SnapshotSku + :ivar time_created: The time when the disk was created. + :vartype time_created: datetime + :param os_type: The Operating System type. Possible values include: + 'Windows', 'Linux' + :type os_type: str or + ~azure.mgmt.compute.v2018_06_01.models.OperatingSystemTypes + :param creation_data: Required. Disk source information. CreationData + information cannot be changed after the disk has been created. + :type creation_data: ~azure.mgmt.compute.v2018_06_01.models.CreationData + :param disk_size_gb: If creationData.createOption is Empty, this field is + mandatory and it indicates the size of the VHD to create. If this field is + present for updates or creation with other options, it indicates a resize. + Resizes are only allowed if the disk is not attached to a running VM, and + can only increase the disk's size. + :type disk_size_gb: int + :param encryption_settings: Encryption settings for disk or snapshot + :type encryption_settings: + ~azure.mgmt.compute.v2018_06_01.models.EncryptionSettings + :ivar provisioning_state: The disk provisioning state. + :vartype provisioning_state: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + 'managed_by': {'readonly': True}, + 'time_created': {'readonly': True}, + 'creation_data': {'required': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'managed_by': {'key': 'managedBy', 'type': 'str'}, + 'sku': {'key': 'sku', 'type': 'SnapshotSku'}, + 'time_created': {'key': 'properties.timeCreated', 'type': 'iso-8601'}, + 'os_type': {'key': 'properties.osType', 'type': 'OperatingSystemTypes'}, + 'creation_data': {'key': 'properties.creationData', 'type': 'CreationData'}, + 'disk_size_gb': {'key': 'properties.diskSizeGB', 'type': 'int'}, + 'encryption_settings': {'key': 'properties.encryptionSettings', 'type': 'EncryptionSettings'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + } + + def __init__(self, *, location: str, creation_data, tags=None, sku=None, os_type=None, disk_size_gb: int=None, encryption_settings=None, **kwargs) -> None: + super(Snapshot, self).__init__(location=location, tags=tags, **kwargs) + self.managed_by = None + self.sku = sku + self.time_created = None + self.os_type = os_type + self.creation_data = creation_data + self.disk_size_gb = disk_size_gb + self.encryption_settings = encryption_settings + self.provisioning_state = None + + +class SnapshotSku(Model): + """The snapshots sku name. Can be Standard_LRS, Premium_LRS, or Standard_ZRS. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :param name: The sku name. Possible values include: 'Standard_LRS', + 'Premium_LRS', 'Standard_ZRS' + :type name: str or + ~azure.mgmt.compute.v2018_06_01.models.SnapshotStorageAccountTypes + :ivar tier: The sku tier. Default value: "Standard" . + :vartype tier: str + """ + + _validation = { + 'tier': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'tier': {'key': 'tier', 'type': 'str'}, + } + + def __init__(self, *, name=None, **kwargs) -> None: + super(SnapshotSku, self).__init__(**kwargs) + self.name = name + self.tier = None + + +class SnapshotUpdate(Model): + """Snapshot update resource. + + :param os_type: the Operating System type. Possible values include: + 'Windows', 'Linux' + :type os_type: str or + ~azure.mgmt.compute.v2018_06_01.models.OperatingSystemTypes + :param disk_size_gb: If creationData.createOption is Empty, this field is + mandatory and it indicates the size of the VHD to create. If this field is + present for updates or creation with other options, it indicates a resize. + Resizes are only allowed if the disk is not attached to a running VM, and + can only increase the disk's size. + :type disk_size_gb: int + :param encryption_settings: Encryption settings for disk or snapshot + :type encryption_settings: + ~azure.mgmt.compute.v2018_06_01.models.EncryptionSettings + :param tags: Resource tags + :type tags: dict[str, str] + :param sku: + :type sku: ~azure.mgmt.compute.v2018_06_01.models.SnapshotSku + """ + + _attribute_map = { + 'os_type': {'key': 'properties.osType', 'type': 'OperatingSystemTypes'}, + 'disk_size_gb': {'key': 'properties.diskSizeGB', 'type': 'int'}, + 'encryption_settings': {'key': 'properties.encryptionSettings', 'type': 'EncryptionSettings'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'sku': {'key': 'sku', 'type': 'SnapshotSku'}, + } + + def __init__(self, *, os_type=None, disk_size_gb: int=None, encryption_settings=None, tags=None, sku=None, **kwargs) -> None: + super(SnapshotUpdate, self).__init__(**kwargs) + self.os_type = os_type + self.disk_size_gb = disk_size_gb + self.encryption_settings = encryption_settings + self.tags = tags + self.sku = sku + + +class SourceVault(Model): + """The vault id is an Azure Resource Manager Resource id in the form + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.KeyVault/vaults/{vaultName}. + + :param id: Resource Id + :type id: str + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + } + + def __init__(self, *, id: str=None, **kwargs) -> None: + super(SourceVault, self).__init__(**kwargs) + self.id = id + + +class SshConfiguration(Model): + """SSH configuration for Linux based VMs running on Azure. + + :param public_keys: The list of SSH public keys used to authenticate with + linux based VMs. + :type public_keys: + list[~azure.mgmt.compute.v2018_06_01.models.SshPublicKey] + """ + + _attribute_map = { + 'public_keys': {'key': 'publicKeys', 'type': '[SshPublicKey]'}, + } + + def __init__(self, *, public_keys=None, **kwargs) -> None: + super(SshConfiguration, self).__init__(**kwargs) + self.public_keys = public_keys + + +class SshPublicKey(Model): + """Contains information about SSH certificate public key and the path on the + Linux VM where the public key is placed. + + :param path: Specifies the full path on the created VM where ssh public + key is stored. If the file already exists, the specified key is appended + to the file. Example: /home/user/.ssh/authorized_keys + :type path: str + :param key_data: SSH public key certificate used to authenticate with the + VM through ssh. The key needs to be at least 2048-bit and in ssh-rsa + format.

    For creating ssh keys, see [Create SSH keys on Linux and + Mac for Linux VMs in + Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-mac-create-ssh-keys?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json). + :type key_data: str + """ + + _attribute_map = { + 'path': {'key': 'path', 'type': 'str'}, + 'key_data': {'key': 'keyData', 'type': 'str'}, + } + + def __init__(self, *, path: str=None, key_data: str=None, **kwargs) -> None: + super(SshPublicKey, self).__init__(**kwargs) + self.path = path + self.key_data = key_data + + +class StorageProfile(Model): + """Specifies the storage settings for the virtual machine disks. + + :param image_reference: Specifies information about the image to use. You + can specify information about platform images, marketplace images, or + virtual machine images. This element is required when you want to use a + platform image, marketplace image, or virtual machine image, but is not + used in other creation operations. + :type image_reference: + ~azure.mgmt.compute.v2018_06_01.models.ImageReference + :param os_disk: Specifies information about the operating system disk used + by the virtual machine.

    For more information about disks, see + [About disks and VHDs for Azure virtual + machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-about-disks-vhds?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). + :type os_disk: ~azure.mgmt.compute.v2018_06_01.models.OSDisk + :param data_disks: Specifies the parameters that are used to add a data + disk to a virtual machine.

    For more information about disks, see + [About disks and VHDs for Azure virtual + machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-about-disks-vhds?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). + :type data_disks: list[~azure.mgmt.compute.v2018_06_01.models.DataDisk] + """ + + _attribute_map = { + 'image_reference': {'key': 'imageReference', 'type': 'ImageReference'}, + 'os_disk': {'key': 'osDisk', 'type': 'OSDisk'}, + 'data_disks': {'key': 'dataDisks', 'type': '[DataDisk]'}, + } + + def __init__(self, *, image_reference=None, os_disk=None, data_disks=None, **kwargs) -> None: + super(StorageProfile, self).__init__(**kwargs) + self.image_reference = image_reference + self.os_disk = os_disk + self.data_disks = data_disks + + +class SubResourceReadOnly(Model): + """SubResourceReadOnly. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource Id + :vartype id: str + """ + + _validation = { + 'id': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(SubResourceReadOnly, self).__init__(**kwargs) + self.id = None + + +class TargetRegion(Model): + """Describes the target region information. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. The name of the region. + :type name: str + :param regional_replica_count: The number of replicas of the Image Version + to be created per region. This property is updatable. + :type regional_replica_count: int + """ + + _validation = { + 'name': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'regional_replica_count': {'key': 'regionalReplicaCount', 'type': 'int'}, + } + + def __init__(self, *, name: str, regional_replica_count: int=None, **kwargs) -> None: + super(TargetRegion, self).__init__(**kwargs) + self.name = name + self.regional_replica_count = regional_replica_count + + +class ThrottledRequestsInput(LogAnalyticsInputBase): + """Api request input for LogAnalytics getThrottledRequests Api. + + All required parameters must be populated in order to send to Azure. + + :param blob_container_sas_uri: Required. SAS Uri of the logging blob + container to which LogAnalytics Api writes output logs to. + :type blob_container_sas_uri: str + :param from_time: Required. From time of the query + :type from_time: datetime + :param to_time: Required. To time of the query + :type to_time: datetime + :param group_by_throttle_policy: Group query result by Throttle Policy + applied. + :type group_by_throttle_policy: bool + :param group_by_operation_name: Group query result by Operation Name. + :type group_by_operation_name: bool + :param group_by_resource_name: Group query result by Resource Name. + :type group_by_resource_name: bool + """ + + _validation = { + 'blob_container_sas_uri': {'required': True}, + 'from_time': {'required': True}, + 'to_time': {'required': True}, + } + + _attribute_map = { + 'blob_container_sas_uri': {'key': 'blobContainerSasUri', 'type': 'str'}, + 'from_time': {'key': 'fromTime', 'type': 'iso-8601'}, + 'to_time': {'key': 'toTime', 'type': 'iso-8601'}, + 'group_by_throttle_policy': {'key': 'groupByThrottlePolicy', 'type': 'bool'}, + 'group_by_operation_name': {'key': 'groupByOperationName', 'type': 'bool'}, + 'group_by_resource_name': {'key': 'groupByResourceName', 'type': 'bool'}, + } + + def __init__(self, *, blob_container_sas_uri: str, from_time, to_time, group_by_throttle_policy: bool=None, group_by_operation_name: bool=None, group_by_resource_name: bool=None, **kwargs) -> None: + super(ThrottledRequestsInput, self).__init__(blob_container_sas_uri=blob_container_sas_uri, from_time=from_time, to_time=to_time, group_by_throttle_policy=group_by_throttle_policy, group_by_operation_name=group_by_operation_name, group_by_resource_name=group_by_resource_name, **kwargs) + + +class UpgradeOperationHistoricalStatusInfo(Model): + """Virtual Machine Scale Set OS Upgrade History operation response. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar properties: Information about the properties of the upgrade + operation. + :vartype properties: + ~azure.mgmt.compute.v2018_06_01.models.UpgradeOperationHistoricalStatusInfoProperties + :ivar type: Resource type + :vartype type: str + :ivar location: Resource location + :vartype location: str + """ + + _validation = { + 'properties': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'readonly': True}, + } + + _attribute_map = { + 'properties': {'key': 'properties', 'type': 'UpgradeOperationHistoricalStatusInfoProperties'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(UpgradeOperationHistoricalStatusInfo, self).__init__(**kwargs) + self.properties = None + self.type = None + self.location = None + + +class UpgradeOperationHistoricalStatusInfoProperties(Model): + """Describes each OS upgrade on the Virtual Machine Scale Set. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar running_status: Information about the overall status of the upgrade + operation. + :vartype running_status: + ~azure.mgmt.compute.v2018_06_01.models.UpgradeOperationHistoryStatus + :ivar progress: Counts of the VMs in each state. + :vartype progress: + ~azure.mgmt.compute.v2018_06_01.models.RollingUpgradeProgressInfo + :ivar error: Error Details for this upgrade if there are any. + :vartype error: ~azure.mgmt.compute.v2018_06_01.models.ApiError + :ivar started_by: Invoker of the Upgrade Operation. Possible values + include: 'Unknown', 'User', 'Platform' + :vartype started_by: str or + ~azure.mgmt.compute.v2018_06_01.models.UpgradeOperationInvoker + :ivar target_image_reference: Image Reference details + :vartype target_image_reference: + ~azure.mgmt.compute.v2018_06_01.models.ImageReference + :ivar rollback_info: Information about OS rollback if performed + :vartype rollback_info: + ~azure.mgmt.compute.v2018_06_01.models.RollbackStatusInfo + """ + + _validation = { + 'running_status': {'readonly': True}, + 'progress': {'readonly': True}, + 'error': {'readonly': True}, + 'started_by': {'readonly': True}, + 'target_image_reference': {'readonly': True}, + 'rollback_info': {'readonly': True}, + } + + _attribute_map = { + 'running_status': {'key': 'runningStatus', 'type': 'UpgradeOperationHistoryStatus'}, + 'progress': {'key': 'progress', 'type': 'RollingUpgradeProgressInfo'}, + 'error': {'key': 'error', 'type': 'ApiError'}, + 'started_by': {'key': 'startedBy', 'type': 'UpgradeOperationInvoker'}, + 'target_image_reference': {'key': 'targetImageReference', 'type': 'ImageReference'}, + 'rollback_info': {'key': 'rollbackInfo', 'type': 'RollbackStatusInfo'}, + } + + def __init__(self, **kwargs) -> None: + super(UpgradeOperationHistoricalStatusInfoProperties, self).__init__(**kwargs) + self.running_status = None + self.progress = None + self.error = None + self.started_by = None + self.target_image_reference = None + self.rollback_info = None + + +class UpgradeOperationHistoryStatus(Model): + """Information about the current running state of the overall upgrade. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar code: Code indicating the current status of the upgrade. Possible + values include: 'RollingForward', 'Cancelled', 'Completed', 'Faulted' + :vartype code: str or ~azure.mgmt.compute.v2018_06_01.models.UpgradeState + :ivar start_time: Start time of the upgrade. + :vartype start_time: datetime + :ivar end_time: End time of the upgrade. + :vartype end_time: datetime + """ + + _validation = { + 'code': {'readonly': True}, + 'start_time': {'readonly': True}, + 'end_time': {'readonly': True}, + } + + _attribute_map = { + 'code': {'key': 'code', 'type': 'UpgradeState'}, + 'start_time': {'key': 'startTime', 'type': 'iso-8601'}, + 'end_time': {'key': 'endTime', 'type': 'iso-8601'}, + } + + def __init__(self, **kwargs) -> None: + super(UpgradeOperationHistoryStatus, self).__init__(**kwargs) + self.code = None + self.start_time = None + self.end_time = None + + +class UpgradePolicy(Model): + """Describes an upgrade policy - automatic, manual, or rolling. + + :param mode: Specifies the mode of an upgrade to virtual machines in the + scale set.

    Possible values are:

    **Manual** - You + control the application of updates to virtual machines in the scale set. + You do this by using the manualUpgrade action.

    **Automatic** - + All virtual machines in the scale set are automatically updated at the + same time. Possible values include: 'Automatic', 'Manual', 'Rolling' + :type mode: str or ~azure.mgmt.compute.v2018_06_01.models.UpgradeMode + :param rolling_upgrade_policy: The configuration parameters used while + performing a rolling upgrade. + :type rolling_upgrade_policy: + ~azure.mgmt.compute.v2018_06_01.models.RollingUpgradePolicy + :param automatic_os_upgrade: Whether OS upgrades should automatically be + applied to scale set instances in a rolling fashion when a newer version + of the image becomes available. + :type automatic_os_upgrade: bool + :param auto_os_upgrade_policy: Configuration parameters used for + performing automatic OS Upgrade. + :type auto_os_upgrade_policy: + ~azure.mgmt.compute.v2018_06_01.models.AutoOSUpgradePolicy + """ + + _attribute_map = { + 'mode': {'key': 'mode', 'type': 'UpgradeMode'}, + 'rolling_upgrade_policy': {'key': 'rollingUpgradePolicy', 'type': 'RollingUpgradePolicy'}, + 'automatic_os_upgrade': {'key': 'automaticOSUpgrade', 'type': 'bool'}, + 'auto_os_upgrade_policy': {'key': 'autoOSUpgradePolicy', 'type': 'AutoOSUpgradePolicy'}, + } + + def __init__(self, *, mode=None, rolling_upgrade_policy=None, automatic_os_upgrade: bool=None, auto_os_upgrade_policy=None, **kwargs) -> None: + super(UpgradePolicy, self).__init__(**kwargs) + self.mode = mode + self.rolling_upgrade_policy = rolling_upgrade_policy + self.automatic_os_upgrade = automatic_os_upgrade + self.auto_os_upgrade_policy = auto_os_upgrade_policy + + +class Usage(Model): + """Describes Compute Resource Usage. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar unit: Required. An enum describing the unit of usage measurement. + Default value: "Count" . + :vartype unit: str + :param current_value: Required. The current usage of the resource. + :type current_value: int + :param limit: Required. The maximum permitted usage of the resource. + :type limit: long + :param name: Required. The name of the type of usage. + :type name: ~azure.mgmt.compute.v2018_06_01.models.UsageName + """ + + _validation = { + 'unit': {'required': True, 'constant': True}, + 'current_value': {'required': True}, + 'limit': {'required': True}, + 'name': {'required': True}, + } + + _attribute_map = { + 'unit': {'key': 'unit', 'type': 'str'}, + 'current_value': {'key': 'currentValue', 'type': 'int'}, + 'limit': {'key': 'limit', 'type': 'long'}, + 'name': {'key': 'name', 'type': 'UsageName'}, + } + + unit = "Count" + + def __init__(self, *, current_value: int, limit: int, name, **kwargs) -> None: + super(Usage, self).__init__(**kwargs) + self.current_value = current_value + self.limit = limit + self.name = name + + +class UsageName(Model): + """The Usage Names. + + :param value: The name of the resource. + :type value: str + :param localized_value: The localized name of the resource. + :type localized_value: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': 'str'}, + 'localized_value': {'key': 'localizedValue', 'type': 'str'}, + } + + def __init__(self, *, value: str=None, localized_value: str=None, **kwargs) -> None: + super(UsageName, self).__init__(**kwargs) + self.value = value + self.localized_value = localized_value + + +class VaultCertificate(Model): + """Describes a single certificate reference in a Key Vault, and where the + certificate should reside on the VM. + + :param certificate_url: This is the URL of a certificate that has been + uploaded to Key Vault as a secret. For adding a secret to the Key Vault, + see [Add a key or secret to the key + vault](https://docs.microsoft.com/azure/key-vault/key-vault-get-started/#add). + In this case, your certificate needs to be It is the Base64 encoding of + the following JSON Object which is encoded in UTF-8:

    {
    + "data":"",
    "dataType":"pfx",
    + "password":""
    } + :type certificate_url: str + :param certificate_store: For Windows VMs, specifies the certificate store + on the Virtual Machine to which the certificate should be added. The + specified certificate store is implicitly in the LocalMachine account. +

    For Linux VMs, the certificate file is placed under the + /var/lib/waagent directory, with the file name + <UppercaseThumbprint>.crt for the X509 certificate file and + <UppercaseThumbprint>.prv for private key. Both of these files are + .pem formatted. + :type certificate_store: str + """ + + _attribute_map = { + 'certificate_url': {'key': 'certificateUrl', 'type': 'str'}, + 'certificate_store': {'key': 'certificateStore', 'type': 'str'}, + } + + def __init__(self, *, certificate_url: str=None, certificate_store: str=None, **kwargs) -> None: + super(VaultCertificate, self).__init__(**kwargs) + self.certificate_url = certificate_url + self.certificate_store = certificate_store + + +class VaultSecretGroup(Model): + """Describes a set of certificates which are all in the same Key Vault. + + :param source_vault: The relative URL of the Key Vault containing all of + the certificates in VaultCertificates. + :type source_vault: ~azure.mgmt.compute.v2018_06_01.models.SubResource + :param vault_certificates: The list of key vault references in SourceVault + which contain certificates. + :type vault_certificates: + list[~azure.mgmt.compute.v2018_06_01.models.VaultCertificate] + """ + + _attribute_map = { + 'source_vault': {'key': 'sourceVault', 'type': 'SubResource'}, + 'vault_certificates': {'key': 'vaultCertificates', 'type': '[VaultCertificate]'}, + } + + def __init__(self, *, source_vault=None, vault_certificates=None, **kwargs) -> None: + super(VaultSecretGroup, self).__init__(**kwargs) + self.source_vault = source_vault + self.vault_certificates = vault_certificates + + +class VirtualHardDisk(Model): + """Describes the uri of a disk. + + :param uri: Specifies the virtual hard disk's uri. + :type uri: str + """ + + _attribute_map = { + 'uri': {'key': 'uri', 'type': 'str'}, + } + + def __init__(self, *, uri: str=None, **kwargs) -> None: + super(VirtualHardDisk, self).__init__(**kwargs) + self.uri = uri + + +class VirtualMachine(Resource): + """Describes a Virtual Machine. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource Id + :vartype id: str + :ivar name: Resource name + :vartype name: str + :ivar type: Resource type + :vartype type: str + :param location: Required. Resource location + :type location: str + :param tags: Resource tags + :type tags: dict[str, str] + :param plan: Specifies information about the marketplace image used to + create the virtual machine. This element is only used for marketplace + images. Before you can use a marketplace image from an API, you must + enable the image for programmatic use. In the Azure portal, find the + marketplace image that you want to use and then click **Want to deploy + programmatically, Get Started ->**. Enter any required information and + then click **Save**. + :type plan: ~azure.mgmt.compute.v2018_06_01.models.Plan + :param hardware_profile: Specifies the hardware settings for the virtual + machine. + :type hardware_profile: + ~azure.mgmt.compute.v2018_06_01.models.HardwareProfile + :param storage_profile: Specifies the storage settings for the virtual + machine disks. + :type storage_profile: + ~azure.mgmt.compute.v2018_06_01.models.StorageProfile + :param additional_capabilities: Specifies additional capabilities enabled + or disabled on the virtual machine. + :type additional_capabilities: + ~azure.mgmt.compute.v2018_06_01.models.AdditionalCapabilities + :param os_profile: Specifies the operating system settings for the virtual + machine. + :type os_profile: ~azure.mgmt.compute.v2018_06_01.models.OSProfile + :param network_profile: Specifies the network interfaces of the virtual + machine. + :type network_profile: + ~azure.mgmt.compute.v2018_06_01.models.NetworkProfile + :param diagnostics_profile: Specifies the boot diagnostic settings state. +

    Minimum api-version: 2015-06-15. + :type diagnostics_profile: + ~azure.mgmt.compute.v2018_06_01.models.DiagnosticsProfile + :param availability_set: Specifies information about the availability set + that the virtual machine should be assigned to. Virtual machines specified + in the same availability set are allocated to different nodes to maximize + availability. For more information about availability sets, see [Manage + the availability of virtual + machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-manage-availability?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). +

    For more information on Azure planned maintenance, see [Planned + maintenance for virtual machines in + Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-planned-maintenance?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json) +

    Currently, a VM can only be added to availability set at creation + time. An existing VM cannot be added to an availability set. + :type availability_set: ~azure.mgmt.compute.v2018_06_01.models.SubResource + :param proximity_placement_group: Specifies information about the + proximity placement group that the virtual machine should be assigned to. +

    Minimum api-version: 2018-04-01. + :type proximity_placement_group: + ~azure.mgmt.compute.v2018_06_01.models.SubResource + :ivar provisioning_state: The provisioning state, which only appears in + the response. + :vartype provisioning_state: str + :ivar instance_view: The virtual machine instance view. + :vartype instance_view: + ~azure.mgmt.compute.v2018_06_01.models.VirtualMachineInstanceView + :param license_type: Specifies that the image or disk that is being used + was licensed on-premises. This element is only used for images that + contain the Windows Server operating system.

    Possible values are: +

    Windows_Client

    Windows_Server

    If this element + is included in a request for an update, the value must match the initial + value. This value cannot be updated.

    For more information, see + [Azure Hybrid Use Benefit for Windows + Server](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-hybrid-use-benefit-licensing?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json) +

    Minimum api-version: 2015-06-15 + :type license_type: str + :ivar vm_id: Specifies the VM unique ID which is a 128-bits identifier + that is encoded and stored in all Azure IaaS VMs SMBIOS and can be read + using platform BIOS commands. + :vartype vm_id: str + :ivar resources: The virtual machine child extension resources. + :vartype resources: + list[~azure.mgmt.compute.v2018_06_01.models.VirtualMachineExtension] + :param identity: The identity of the virtual machine, if configured. + :type identity: + ~azure.mgmt.compute.v2018_06_01.models.VirtualMachineIdentity + :param zones: The virtual machine zones. + :type zones: list[str] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + 'provisioning_state': {'readonly': True}, + 'instance_view': {'readonly': True}, + 'vm_id': {'readonly': True}, + 'resources': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'plan': {'key': 'plan', 'type': 'Plan'}, + 'hardware_profile': {'key': 'properties.hardwareProfile', 'type': 'HardwareProfile'}, + 'storage_profile': {'key': 'properties.storageProfile', 'type': 'StorageProfile'}, + 'additional_capabilities': {'key': 'properties.additionalCapabilities', 'type': 'AdditionalCapabilities'}, + 'os_profile': {'key': 'properties.osProfile', 'type': 'OSProfile'}, + 'network_profile': {'key': 'properties.networkProfile', 'type': 'NetworkProfile'}, + 'diagnostics_profile': {'key': 'properties.diagnosticsProfile', 'type': 'DiagnosticsProfile'}, + 'availability_set': {'key': 'properties.availabilitySet', 'type': 'SubResource'}, + 'proximity_placement_group': {'key': 'properties.proximityPlacementGroup', 'type': 'SubResource'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'instance_view': {'key': 'properties.instanceView', 'type': 'VirtualMachineInstanceView'}, + 'license_type': {'key': 'properties.licenseType', 'type': 'str'}, + 'vm_id': {'key': 'properties.vmId', 'type': 'str'}, + 'resources': {'key': 'resources', 'type': '[VirtualMachineExtension]'}, + 'identity': {'key': 'identity', 'type': 'VirtualMachineIdentity'}, + 'zones': {'key': 'zones', 'type': '[str]'}, + } + + def __init__(self, *, location: str, tags=None, plan=None, hardware_profile=None, storage_profile=None, additional_capabilities=None, os_profile=None, network_profile=None, diagnostics_profile=None, availability_set=None, proximity_placement_group=None, license_type: str=None, identity=None, zones=None, **kwargs) -> None: + super(VirtualMachine, self).__init__(location=location, tags=tags, **kwargs) + self.plan = plan + self.hardware_profile = hardware_profile + self.storage_profile = storage_profile + self.additional_capabilities = additional_capabilities + self.os_profile = os_profile + self.network_profile = network_profile + self.diagnostics_profile = diagnostics_profile + self.availability_set = availability_set + self.proximity_placement_group = proximity_placement_group + self.provisioning_state = None + self.instance_view = None + self.license_type = license_type + self.vm_id = None + self.resources = None + self.identity = identity + self.zones = zones + + +class VirtualMachineAgentInstanceView(Model): + """The instance view of the VM Agent running on the virtual machine. + + :param vm_agent_version: The VM Agent full version. + :type vm_agent_version: str + :param extension_handlers: The virtual machine extension handler instance + view. + :type extension_handlers: + list[~azure.mgmt.compute.v2018_06_01.models.VirtualMachineExtensionHandlerInstanceView] + :param statuses: The resource status information. + :type statuses: + list[~azure.mgmt.compute.v2018_06_01.models.InstanceViewStatus] + """ + + _attribute_map = { + 'vm_agent_version': {'key': 'vmAgentVersion', 'type': 'str'}, + 'extension_handlers': {'key': 'extensionHandlers', 'type': '[VirtualMachineExtensionHandlerInstanceView]'}, + 'statuses': {'key': 'statuses', 'type': '[InstanceViewStatus]'}, + } + + def __init__(self, *, vm_agent_version: str=None, extension_handlers=None, statuses=None, **kwargs) -> None: + super(VirtualMachineAgentInstanceView, self).__init__(**kwargs) + self.vm_agent_version = vm_agent_version + self.extension_handlers = extension_handlers + self.statuses = statuses + + +class VirtualMachineCaptureParameters(Model): + """Capture Virtual Machine parameters. + + All required parameters must be populated in order to send to Azure. + + :param vhd_prefix: Required. The captured virtual hard disk's name prefix. + :type vhd_prefix: str + :param destination_container_name: Required. The destination container + name. + :type destination_container_name: str + :param overwrite_vhds: Required. Specifies whether to overwrite the + destination virtual hard disk, in case of conflict. + :type overwrite_vhds: bool + """ + + _validation = { + 'vhd_prefix': {'required': True}, + 'destination_container_name': {'required': True}, + 'overwrite_vhds': {'required': True}, + } + + _attribute_map = { + 'vhd_prefix': {'key': 'vhdPrefix', 'type': 'str'}, + 'destination_container_name': {'key': 'destinationContainerName', 'type': 'str'}, + 'overwrite_vhds': {'key': 'overwriteVhds', 'type': 'bool'}, + } + + def __init__(self, *, vhd_prefix: str, destination_container_name: str, overwrite_vhds: bool, **kwargs) -> None: + super(VirtualMachineCaptureParameters, self).__init__(**kwargs) + self.vhd_prefix = vhd_prefix + self.destination_container_name = destination_container_name + self.overwrite_vhds = overwrite_vhds + + +class VirtualMachineCaptureResult(SubResource): + """Output of virtual machine capture operation. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :param id: Resource Id + :type id: str + :ivar schema: the schema of the captured virtual machine + :vartype schema: str + :ivar content_version: the version of the content + :vartype content_version: str + :ivar parameters: parameters of the captured virtual machine + :vartype parameters: object + :ivar resources: a list of resource items of the captured virtual machine + :vartype resources: list[object] + """ + + _validation = { + 'schema': {'readonly': True}, + 'content_version': {'readonly': True}, + 'parameters': {'readonly': True}, + 'resources': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'schema': {'key': '$schema', 'type': 'str'}, + 'content_version': {'key': 'contentVersion', 'type': 'str'}, + 'parameters': {'key': 'parameters', 'type': 'object'}, + 'resources': {'key': 'resources', 'type': '[object]'}, + } + + def __init__(self, *, id: str=None, **kwargs) -> None: + super(VirtualMachineCaptureResult, self).__init__(id=id, **kwargs) + self.schema = None + self.content_version = None + self.parameters = None + self.resources = None + + +class VirtualMachineExtension(Resource): + """Describes a Virtual Machine Extension. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource Id + :vartype id: str + :ivar name: Resource name + :vartype name: str + :ivar type: Resource type + :vartype type: str + :param location: Required. Resource location + :type location: str + :param tags: Resource tags + :type tags: dict[str, str] + :param force_update_tag: How the extension handler should be forced to + update even if the extension configuration has not changed. + :type force_update_tag: str + :param publisher: The name of the extension handler publisher. + :type publisher: str + :param virtual_machine_extension_type: Specifies the type of the + extension; an example is "CustomScriptExtension". + :type virtual_machine_extension_type: str + :param type_handler_version: Specifies the version of the script handler. + :type type_handler_version: str + :param auto_upgrade_minor_version: Indicates whether the extension should + use a newer minor version if one is available at deployment time. Once + deployed, however, the extension will not upgrade minor versions unless + redeployed, even with this property set to true. + :type auto_upgrade_minor_version: bool + :param settings: Json formatted public settings for the extension. + :type settings: object + :param protected_settings: The extension can contain either + protectedSettings or protectedSettingsFromKeyVault or no protected + settings at all. + :type protected_settings: object + :ivar provisioning_state: The provisioning state, which only appears in + the response. + :vartype provisioning_state: str + :param instance_view: The virtual machine extension instance view. + :type instance_view: + ~azure.mgmt.compute.v2018_06_01.models.VirtualMachineExtensionInstanceView + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'force_update_tag': {'key': 'properties.forceUpdateTag', 'type': 'str'}, + 'publisher': {'key': 'properties.publisher', 'type': 'str'}, + 'virtual_machine_extension_type': {'key': 'properties.type', 'type': 'str'}, + 'type_handler_version': {'key': 'properties.typeHandlerVersion', 'type': 'str'}, + 'auto_upgrade_minor_version': {'key': 'properties.autoUpgradeMinorVersion', 'type': 'bool'}, + 'settings': {'key': 'properties.settings', 'type': 'object'}, + 'protected_settings': {'key': 'properties.protectedSettings', 'type': 'object'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'instance_view': {'key': 'properties.instanceView', 'type': 'VirtualMachineExtensionInstanceView'}, + } + + def __init__(self, *, location: str, tags=None, force_update_tag: str=None, publisher: str=None, virtual_machine_extension_type: str=None, type_handler_version: str=None, auto_upgrade_minor_version: bool=None, settings=None, protected_settings=None, instance_view=None, **kwargs) -> None: + super(VirtualMachineExtension, self).__init__(location=location, tags=tags, **kwargs) + self.force_update_tag = force_update_tag + self.publisher = publisher + self.virtual_machine_extension_type = virtual_machine_extension_type + self.type_handler_version = type_handler_version + self.auto_upgrade_minor_version = auto_upgrade_minor_version + self.settings = settings + self.protected_settings = protected_settings + self.provisioning_state = None + self.instance_view = instance_view + + +class VirtualMachineExtensionHandlerInstanceView(Model): + """The instance view of a virtual machine extension handler. + + :param type: Specifies the type of the extension; an example is + "CustomScriptExtension". + :type type: str + :param type_handler_version: Specifies the version of the script handler. + :type type_handler_version: str + :param status: The extension handler status. + :type status: ~azure.mgmt.compute.v2018_06_01.models.InstanceViewStatus + """ + + _attribute_map = { + 'type': {'key': 'type', 'type': 'str'}, + 'type_handler_version': {'key': 'typeHandlerVersion', 'type': 'str'}, + 'status': {'key': 'status', 'type': 'InstanceViewStatus'}, + } + + def __init__(self, *, type: str=None, type_handler_version: str=None, status=None, **kwargs) -> None: + super(VirtualMachineExtensionHandlerInstanceView, self).__init__(**kwargs) + self.type = type + self.type_handler_version = type_handler_version + self.status = status + + +class VirtualMachineExtensionImage(Resource): + """Describes a Virtual Machine Extension Image. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource Id + :vartype id: str + :ivar name: Resource name + :vartype name: str + :ivar type: Resource type + :vartype type: str + :param location: Required. Resource location + :type location: str + :param tags: Resource tags + :type tags: dict[str, str] + :param operating_system: Required. The operating system this extension + supports. + :type operating_system: str + :param compute_role: Required. The type of role (IaaS or PaaS) this + extension supports. + :type compute_role: str + :param handler_schema: Required. The schema defined by publisher, where + extension consumers should provide settings in a matching schema. + :type handler_schema: str + :param vm_scale_set_enabled: Whether the extension can be used on xRP + VMScaleSets. By default existing extensions are usable on scalesets, but + there might be cases where a publisher wants to explicitly indicate the + extension is only enabled for CRP VMs but not VMSS. + :type vm_scale_set_enabled: bool + :param supports_multiple_extensions: Whether the handler can support + multiple extensions. + :type supports_multiple_extensions: bool + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + 'operating_system': {'required': True}, + 'compute_role': {'required': True}, + 'handler_schema': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'operating_system': {'key': 'properties.operatingSystem', 'type': 'str'}, + 'compute_role': {'key': 'properties.computeRole', 'type': 'str'}, + 'handler_schema': {'key': 'properties.handlerSchema', 'type': 'str'}, + 'vm_scale_set_enabled': {'key': 'properties.vmScaleSetEnabled', 'type': 'bool'}, + 'supports_multiple_extensions': {'key': 'properties.supportsMultipleExtensions', 'type': 'bool'}, + } + + def __init__(self, *, location: str, operating_system: str, compute_role: str, handler_schema: str, tags=None, vm_scale_set_enabled: bool=None, supports_multiple_extensions: bool=None, **kwargs) -> None: + super(VirtualMachineExtensionImage, self).__init__(location=location, tags=tags, **kwargs) + self.operating_system = operating_system + self.compute_role = compute_role + self.handler_schema = handler_schema + self.vm_scale_set_enabled = vm_scale_set_enabled + self.supports_multiple_extensions = supports_multiple_extensions + + +class VirtualMachineExtensionInstanceView(Model): + """The instance view of a virtual machine extension. + + :param name: The virtual machine extension name. + :type name: str + :param type: Specifies the type of the extension; an example is + "CustomScriptExtension". + :type type: str + :param type_handler_version: Specifies the version of the script handler. + :type type_handler_version: str + :param substatuses: The resource status information. + :type substatuses: + list[~azure.mgmt.compute.v2018_06_01.models.InstanceViewStatus] + :param statuses: The resource status information. + :type statuses: + list[~azure.mgmt.compute.v2018_06_01.models.InstanceViewStatus] + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'type_handler_version': {'key': 'typeHandlerVersion', 'type': 'str'}, + 'substatuses': {'key': 'substatuses', 'type': '[InstanceViewStatus]'}, + 'statuses': {'key': 'statuses', 'type': '[InstanceViewStatus]'}, + } + + def __init__(self, *, name: str=None, type: str=None, type_handler_version: str=None, substatuses=None, statuses=None, **kwargs) -> None: + super(VirtualMachineExtensionInstanceView, self).__init__(**kwargs) + self.name = name + self.type = type + self.type_handler_version = type_handler_version + self.substatuses = substatuses + self.statuses = statuses + + +class VirtualMachineExtensionsListResult(Model): + """The List Extension operation response. + + :param value: The list of extensions + :type value: + list[~azure.mgmt.compute.v2018_06_01.models.VirtualMachineExtension] + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[VirtualMachineExtension]'}, + } + + def __init__(self, *, value=None, **kwargs) -> None: + super(VirtualMachineExtensionsListResult, self).__init__(**kwargs) + self.value = value + + +class VirtualMachineExtensionUpdate(UpdateResource): + """Describes a Virtual Machine Extension. + + :param tags: Resource tags + :type tags: dict[str, str] + :param force_update_tag: How the extension handler should be forced to + update even if the extension configuration has not changed. + :type force_update_tag: str + :param publisher: The name of the extension handler publisher. + :type publisher: str + :param type: Specifies the type of the extension; an example is + "CustomScriptExtension". + :type type: str + :param type_handler_version: Specifies the version of the script handler. + :type type_handler_version: str + :param auto_upgrade_minor_version: Indicates whether the extension should + use a newer minor version if one is available at deployment time. Once + deployed, however, the extension will not upgrade minor versions unless + redeployed, even with this property set to true. + :type auto_upgrade_minor_version: bool + :param settings: Json formatted public settings for the extension. + :type settings: object + :param protected_settings: The extension can contain either + protectedSettings or protectedSettingsFromKeyVault or no protected + settings at all. + :type protected_settings: object + """ + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + 'force_update_tag': {'key': 'properties.forceUpdateTag', 'type': 'str'}, + 'publisher': {'key': 'properties.publisher', 'type': 'str'}, + 'type': {'key': 'properties.type', 'type': 'str'}, + 'type_handler_version': {'key': 'properties.typeHandlerVersion', 'type': 'str'}, + 'auto_upgrade_minor_version': {'key': 'properties.autoUpgradeMinorVersion', 'type': 'bool'}, + 'settings': {'key': 'properties.settings', 'type': 'object'}, + 'protected_settings': {'key': 'properties.protectedSettings', 'type': 'object'}, + } + + def __init__(self, *, tags=None, force_update_tag: str=None, publisher: str=None, type: str=None, type_handler_version: str=None, auto_upgrade_minor_version: bool=None, settings=None, protected_settings=None, **kwargs) -> None: + super(VirtualMachineExtensionUpdate, self).__init__(tags=tags, **kwargs) + self.force_update_tag = force_update_tag + self.publisher = publisher + self.type = type + self.type_handler_version = type_handler_version + self.auto_upgrade_minor_version = auto_upgrade_minor_version + self.settings = settings + self.protected_settings = protected_settings + + +class VirtualMachineHealthStatus(Model): + """The health status of the VM. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar status: The health status information for the VM. + :vartype status: ~azure.mgmt.compute.v2018_06_01.models.InstanceViewStatus + """ + + _validation = { + 'status': {'readonly': True}, + } + + _attribute_map = { + 'status': {'key': 'status', 'type': 'InstanceViewStatus'}, + } + + def __init__(self, **kwargs) -> None: + super(VirtualMachineHealthStatus, self).__init__(**kwargs) + self.status = None + + +class VirtualMachineIdentity(Model): + """Identity for the virtual machine. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar principal_id: The principal id of virtual machine identity. This + property will only be provided for a system assigned identity. + :vartype principal_id: str + :ivar tenant_id: The tenant id associated with the virtual machine. This + property will only be provided for a system assigned identity. + :vartype tenant_id: str + :param type: The type of identity used for the virtual machine. The type + 'SystemAssigned, UserAssigned' includes both an implicitly created + identity and a set of user assigned identities. The type 'None' will + remove any identities from the virtual machine. Possible values include: + 'SystemAssigned', 'UserAssigned', 'SystemAssigned, UserAssigned', 'None' + :type type: str or + ~azure.mgmt.compute.v2018_06_01.models.ResourceIdentityType + :param user_assigned_identities: The list of user identities associated + with the Virtual Machine. The user identity dictionary key references will + be ARM resource ids in the form: + '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'. + :type user_assigned_identities: dict[str, + ~azure.mgmt.compute.v2018_06_01.models.VirtualMachineIdentityUserAssignedIdentitiesValue] + """ + + _validation = { + 'principal_id': {'readonly': True}, + 'tenant_id': {'readonly': True}, + } + + _attribute_map = { + 'principal_id': {'key': 'principalId', 'type': 'str'}, + 'tenant_id': {'key': 'tenantId', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'ResourceIdentityType'}, + 'user_assigned_identities': {'key': 'userAssignedIdentities', 'type': '{VirtualMachineIdentityUserAssignedIdentitiesValue}'}, + } + + def __init__(self, *, type=None, user_assigned_identities=None, **kwargs) -> None: + super(VirtualMachineIdentity, self).__init__(**kwargs) + self.principal_id = None + self.tenant_id = None + self.type = type + self.user_assigned_identities = user_assigned_identities + + +class VirtualMachineIdentityUserAssignedIdentitiesValue(Model): + """VirtualMachineIdentityUserAssignedIdentitiesValue. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar principal_id: The principal id of user assigned identity. + :vartype principal_id: str + :ivar client_id: The client id of user assigned identity. + :vartype client_id: str + """ + + _validation = { + 'principal_id': {'readonly': True}, + 'client_id': {'readonly': True}, + } + + _attribute_map = { + 'principal_id': {'key': 'principalId', 'type': 'str'}, + 'client_id': {'key': 'clientId', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(VirtualMachineIdentityUserAssignedIdentitiesValue, self).__init__(**kwargs) + self.principal_id = None + self.client_id = None + + +class VirtualMachineImageResource(SubResource): + """Virtual machine image resource information. + + All required parameters must be populated in order to send to Azure. + + :param id: Resource Id + :type id: str + :param name: Required. The name of the resource. + :type name: str + :param location: Required. The supported Azure location of the resource. + :type location: str + :param tags: Specifies the tags that are assigned to the virtual machine. + For more information about using tags, see [Using tags to organize your + Azure + resources](https://docs.microsoft.com/azure/azure-resource-manager/resource-group-using-tags.md). + :type tags: dict[str, str] + """ + + _validation = { + 'name': {'required': True}, + 'location': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__(self, *, name: str, location: str, id: str=None, tags=None, **kwargs) -> None: + super(VirtualMachineImageResource, self).__init__(id=id, **kwargs) + self.name = name + self.location = location + self.tags = tags + + +class VirtualMachineImage(VirtualMachineImageResource): + """Describes a Virtual Machine Image. + + All required parameters must be populated in order to send to Azure. + + :param id: Resource Id + :type id: str + :param name: Required. The name of the resource. + :type name: str + :param location: Required. The supported Azure location of the resource. + :type location: str + :param tags: Specifies the tags that are assigned to the virtual machine. + For more information about using tags, see [Using tags to organize your + Azure + resources](https://docs.microsoft.com/azure/azure-resource-manager/resource-group-using-tags.md). + :type tags: dict[str, str] + :param plan: + :type plan: ~azure.mgmt.compute.v2018_06_01.models.PurchasePlan + :param os_disk_image: + :type os_disk_image: ~azure.mgmt.compute.v2018_06_01.models.OSDiskImage + :param data_disk_images: + :type data_disk_images: + list[~azure.mgmt.compute.v2018_06_01.models.DataDiskImage] + """ + + _validation = { + 'name': {'required': True}, + 'location': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'plan': {'key': 'properties.plan', 'type': 'PurchasePlan'}, + 'os_disk_image': {'key': 'properties.osDiskImage', 'type': 'OSDiskImage'}, + 'data_disk_images': {'key': 'properties.dataDiskImages', 'type': '[DataDiskImage]'}, + } + + def __init__(self, *, name: str, location: str, id: str=None, tags=None, plan=None, os_disk_image=None, data_disk_images=None, **kwargs) -> None: + super(VirtualMachineImage, self).__init__(id=id, name=name, location=location, tags=tags, **kwargs) + self.plan = plan + self.os_disk_image = os_disk_image + self.data_disk_images = data_disk_images + + +class VirtualMachineInstanceView(Model): + """The instance view of a virtual machine. + + :param platform_update_domain: Specifies the update domain of the virtual + machine. + :type platform_update_domain: int + :param platform_fault_domain: Specifies the fault domain of the virtual + machine. + :type platform_fault_domain: int + :param computer_name: The computer name assigned to the virtual machine. + :type computer_name: str + :param os_name: The Operating System running on the virtual machine. + :type os_name: str + :param os_version: The version of Operating System running on the virtual + machine. + :type os_version: str + :param rdp_thumb_print: The Remote desktop certificate thumbprint. + :type rdp_thumb_print: str + :param vm_agent: The VM Agent running on the virtual machine. + :type vm_agent: + ~azure.mgmt.compute.v2018_06_01.models.VirtualMachineAgentInstanceView + :param maintenance_redeploy_status: The Maintenance Operation status on + the virtual machine. + :type maintenance_redeploy_status: + ~azure.mgmt.compute.v2018_06_01.models.MaintenanceRedeployStatus + :param disks: The virtual machine disk information. + :type disks: list[~azure.mgmt.compute.v2018_06_01.models.DiskInstanceView] + :param extensions: The extensions information. + :type extensions: + list[~azure.mgmt.compute.v2018_06_01.models.VirtualMachineExtensionInstanceView] + :param boot_diagnostics: Boot Diagnostics is a debugging feature which + allows you to view Console Output and Screenshot to diagnose VM status. +

    You can easily view the output of your console log.

    + Azure also enables you to see a screenshot of the VM from the hypervisor. + :type boot_diagnostics: + ~azure.mgmt.compute.v2018_06_01.models.BootDiagnosticsInstanceView + :param statuses: The resource status information. + :type statuses: + list[~azure.mgmt.compute.v2018_06_01.models.InstanceViewStatus] + """ + + _attribute_map = { + 'platform_update_domain': {'key': 'platformUpdateDomain', 'type': 'int'}, + 'platform_fault_domain': {'key': 'platformFaultDomain', 'type': 'int'}, + 'computer_name': {'key': 'computerName', 'type': 'str'}, + 'os_name': {'key': 'osName', 'type': 'str'}, + 'os_version': {'key': 'osVersion', 'type': 'str'}, + 'rdp_thumb_print': {'key': 'rdpThumbPrint', 'type': 'str'}, + 'vm_agent': {'key': 'vmAgent', 'type': 'VirtualMachineAgentInstanceView'}, + 'maintenance_redeploy_status': {'key': 'maintenanceRedeployStatus', 'type': 'MaintenanceRedeployStatus'}, + 'disks': {'key': 'disks', 'type': '[DiskInstanceView]'}, + 'extensions': {'key': 'extensions', 'type': '[VirtualMachineExtensionInstanceView]'}, + 'boot_diagnostics': {'key': 'bootDiagnostics', 'type': 'BootDiagnosticsInstanceView'}, + 'statuses': {'key': 'statuses', 'type': '[InstanceViewStatus]'}, + } + + def __init__(self, *, platform_update_domain: int=None, platform_fault_domain: int=None, computer_name: str=None, os_name: str=None, os_version: str=None, rdp_thumb_print: str=None, vm_agent=None, maintenance_redeploy_status=None, disks=None, extensions=None, boot_diagnostics=None, statuses=None, **kwargs) -> None: + super(VirtualMachineInstanceView, self).__init__(**kwargs) + self.platform_update_domain = platform_update_domain + self.platform_fault_domain = platform_fault_domain + self.computer_name = computer_name + self.os_name = os_name + self.os_version = os_version + self.rdp_thumb_print = rdp_thumb_print + self.vm_agent = vm_agent + self.maintenance_redeploy_status = maintenance_redeploy_status + self.disks = disks + self.extensions = extensions + self.boot_diagnostics = boot_diagnostics + self.statuses = statuses + + +class VirtualMachineReimageParameters(Model): + """Parameters for Reimaging Virtual Machine. NOTE: Virtual Machine OS disk + will always be reimaged. + + :param temp_disk: Specifies whether to reimage temp disk. Default value: + false. Note: This temp disk reimage parameter is only supported for + VM/VMSS with Ephemeral OS disk. + :type temp_disk: bool + """ + + _attribute_map = { + 'temp_disk': {'key': 'tempDisk', 'type': 'bool'}, + } + + def __init__(self, *, temp_disk: bool=None, **kwargs) -> None: + super(VirtualMachineReimageParameters, self).__init__(**kwargs) + self.temp_disk = temp_disk + + +class VirtualMachineScaleSet(Resource): + """Describes a Virtual Machine Scale Set. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource Id + :vartype id: str + :ivar name: Resource name + :vartype name: str + :ivar type: Resource type + :vartype type: str + :param location: Required. Resource location + :type location: str + :param tags: Resource tags + :type tags: dict[str, str] + :param sku: The virtual machine scale set sku. + :type sku: ~azure.mgmt.compute.v2018_06_01.models.Sku + :param plan: Specifies information about the marketplace image used to + create the virtual machine. This element is only used for marketplace + images. Before you can use a marketplace image from an API, you must + enable the image for programmatic use. In the Azure portal, find the + marketplace image that you want to use and then click **Want to deploy + programmatically, Get Started ->**. Enter any required information and + then click **Save**. + :type plan: ~azure.mgmt.compute.v2018_06_01.models.Plan + :param upgrade_policy: The upgrade policy. + :type upgrade_policy: ~azure.mgmt.compute.v2018_06_01.models.UpgradePolicy + :param virtual_machine_profile: The virtual machine profile. + :type virtual_machine_profile: + ~azure.mgmt.compute.v2018_06_01.models.VirtualMachineScaleSetVMProfile + :ivar provisioning_state: The provisioning state, which only appears in + the response. + :vartype provisioning_state: str + :param overprovision: Specifies whether the Virtual Machine Scale Set + should be overprovisioned. + :type overprovision: bool + :ivar unique_id: Specifies the ID which uniquely identifies a Virtual + Machine Scale Set. + :vartype unique_id: str + :param single_placement_group: When true this limits the scale set to a + single placement group, of max size 100 virtual machines. + :type single_placement_group: bool + :param zone_balance: Whether to force strictly even Virtual Machine + distribution cross x-zones in case there is zone outage. + :type zone_balance: bool + :param platform_fault_domain_count: Fault Domain count for each placement + group. + :type platform_fault_domain_count: int + :param proximity_placement_group: Specifies information about the + proximity placement group that the virtual machine scale set should be + assigned to.

    Minimum api-version: 2018-04-01. + :type proximity_placement_group: + ~azure.mgmt.compute.v2018_06_01.models.SubResource + :param identity: The identity of the virtual machine scale set, if + configured. + :type identity: + ~azure.mgmt.compute.v2018_06_01.models.VirtualMachineScaleSetIdentity + :param zones: The virtual machine scale set zones. + :type zones: list[str] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + 'provisioning_state': {'readonly': True}, + 'unique_id': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'sku': {'key': 'sku', 'type': 'Sku'}, + 'plan': {'key': 'plan', 'type': 'Plan'}, + 'upgrade_policy': {'key': 'properties.upgradePolicy', 'type': 'UpgradePolicy'}, + 'virtual_machine_profile': {'key': 'properties.virtualMachineProfile', 'type': 'VirtualMachineScaleSetVMProfile'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'overprovision': {'key': 'properties.overprovision', 'type': 'bool'}, + 'unique_id': {'key': 'properties.uniqueId', 'type': 'str'}, + 'single_placement_group': {'key': 'properties.singlePlacementGroup', 'type': 'bool'}, + 'zone_balance': {'key': 'properties.zoneBalance', 'type': 'bool'}, + 'platform_fault_domain_count': {'key': 'properties.platformFaultDomainCount', 'type': 'int'}, + 'proximity_placement_group': {'key': 'properties.proximityPlacementGroup', 'type': 'SubResource'}, + 'identity': {'key': 'identity', 'type': 'VirtualMachineScaleSetIdentity'}, + 'zones': {'key': 'zones', 'type': '[str]'}, + } + + def __init__(self, *, location: str, tags=None, sku=None, plan=None, upgrade_policy=None, virtual_machine_profile=None, overprovision: bool=None, single_placement_group: bool=None, zone_balance: bool=None, platform_fault_domain_count: int=None, proximity_placement_group=None, identity=None, zones=None, **kwargs) -> None: + super(VirtualMachineScaleSet, self).__init__(location=location, tags=tags, **kwargs) + self.sku = sku + self.plan = plan + self.upgrade_policy = upgrade_policy + self.virtual_machine_profile = virtual_machine_profile + self.provisioning_state = None + self.overprovision = overprovision + self.unique_id = None + self.single_placement_group = single_placement_group + self.zone_balance = zone_balance + self.platform_fault_domain_count = platform_fault_domain_count + self.proximity_placement_group = proximity_placement_group + self.identity = identity + self.zones = zones + + +class VirtualMachineScaleSetDataDisk(Model): + """Describes a virtual machine scale set data disk. + + All required parameters must be populated in order to send to Azure. + + :param name: The disk name. + :type name: str + :param lun: Required. Specifies the logical unit number of the data disk. + This value is used to identify data disks within the VM and therefore must + be unique for each data disk attached to a VM. + :type lun: int + :param caching: Specifies the caching requirements.

    Possible + values are:

    **None**

    **ReadOnly**

    **ReadWrite** +

    Default: **None for Standard storage. ReadOnly for Premium + storage**. Possible values include: 'None', 'ReadOnly', 'ReadWrite' + :type caching: str or ~azure.mgmt.compute.v2018_06_01.models.CachingTypes + :param write_accelerator_enabled: Specifies whether writeAccelerator + should be enabled or disabled on the disk. + :type write_accelerator_enabled: bool + :param create_option: Required. The create option. Possible values + include: 'FromImage', 'Empty', 'Attach' + :type create_option: str or + ~azure.mgmt.compute.v2018_06_01.models.DiskCreateOptionTypes + :param disk_size_gb: Specifies the size of an empty data disk in + gigabytes. This element can be used to overwrite the size of the disk in a + virtual machine image.

    This value cannot be larger than 1023 GB + :type disk_size_gb: int + :param managed_disk: The managed disk parameters. + :type managed_disk: + ~azure.mgmt.compute.v2018_06_01.models.VirtualMachineScaleSetManagedDiskParameters + """ + + _validation = { + 'lun': {'required': True}, + 'create_option': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'lun': {'key': 'lun', 'type': 'int'}, + 'caching': {'key': 'caching', 'type': 'CachingTypes'}, + 'write_accelerator_enabled': {'key': 'writeAcceleratorEnabled', 'type': 'bool'}, + 'create_option': {'key': 'createOption', 'type': 'str'}, + 'disk_size_gb': {'key': 'diskSizeGB', 'type': 'int'}, + 'managed_disk': {'key': 'managedDisk', 'type': 'VirtualMachineScaleSetManagedDiskParameters'}, + } + + def __init__(self, *, lun: int, create_option, name: str=None, caching=None, write_accelerator_enabled: bool=None, disk_size_gb: int=None, managed_disk=None, **kwargs) -> None: + super(VirtualMachineScaleSetDataDisk, self).__init__(**kwargs) + self.name = name + self.lun = lun + self.caching = caching + self.write_accelerator_enabled = write_accelerator_enabled + self.create_option = create_option + self.disk_size_gb = disk_size_gb + self.managed_disk = managed_disk + + +class VirtualMachineScaleSetExtension(SubResourceReadOnly): + """Describes a Virtual Machine Scale Set Extension. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource Id + :vartype id: str + :param name: The name of the extension. + :type name: str + :param force_update_tag: If a value is provided and is different from the + previous value, the extension handler will be forced to update even if the + extension configuration has not changed. + :type force_update_tag: str + :param publisher: The name of the extension handler publisher. + :type publisher: str + :param type: Specifies the type of the extension; an example is + "CustomScriptExtension". + :type type: str + :param type_handler_version: Specifies the version of the script handler. + :type type_handler_version: str + :param auto_upgrade_minor_version: Indicates whether the extension should + use a newer minor version if one is available at deployment time. Once + deployed, however, the extension will not upgrade minor versions unless + redeployed, even with this property set to true. + :type auto_upgrade_minor_version: bool + :param settings: Json formatted public settings for the extension. + :type settings: object + :param protected_settings: The extension can contain either + protectedSettings or protectedSettingsFromKeyVault or no protected + settings at all. + :type protected_settings: object + :ivar provisioning_state: The provisioning state, which only appears in + the response. + :vartype provisioning_state: str + :param provision_after_extensions: Collection of extension names after + which this extension needs to be provisioned. + :type provision_after_extensions: list[str] + """ + + _validation = { + 'id': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'force_update_tag': {'key': 'properties.forceUpdateTag', 'type': 'str'}, + 'publisher': {'key': 'properties.publisher', 'type': 'str'}, + 'type': {'key': 'properties.type', 'type': 'str'}, + 'type_handler_version': {'key': 'properties.typeHandlerVersion', 'type': 'str'}, + 'auto_upgrade_minor_version': {'key': 'properties.autoUpgradeMinorVersion', 'type': 'bool'}, + 'settings': {'key': 'properties.settings', 'type': 'object'}, + 'protected_settings': {'key': 'properties.protectedSettings', 'type': 'object'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'provision_after_extensions': {'key': 'properties.provisionAfterExtensions', 'type': '[str]'}, + } + + def __init__(self, *, name: str=None, force_update_tag: str=None, publisher: str=None, type: str=None, type_handler_version: str=None, auto_upgrade_minor_version: bool=None, settings=None, protected_settings=None, provision_after_extensions=None, **kwargs) -> None: + super(VirtualMachineScaleSetExtension, self).__init__(**kwargs) + self.name = name + self.force_update_tag = force_update_tag + self.publisher = publisher + self.type = type + self.type_handler_version = type_handler_version + self.auto_upgrade_minor_version = auto_upgrade_minor_version + self.settings = settings + self.protected_settings = protected_settings + self.provisioning_state = None + self.provision_after_extensions = provision_after_extensions + + +class VirtualMachineScaleSetExtensionProfile(Model): + """Describes a virtual machine scale set extension profile. + + :param extensions: The virtual machine scale set child extension + resources. + :type extensions: + list[~azure.mgmt.compute.v2018_06_01.models.VirtualMachineScaleSetExtension] + """ + + _attribute_map = { + 'extensions': {'key': 'extensions', 'type': '[VirtualMachineScaleSetExtension]'}, + } + + def __init__(self, *, extensions=None, **kwargs) -> None: + super(VirtualMachineScaleSetExtensionProfile, self).__init__(**kwargs) + self.extensions = extensions + + +class VirtualMachineScaleSetIdentity(Model): + """Identity for the virtual machine scale set. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar principal_id: The principal id of virtual machine scale set + identity. This property will only be provided for a system assigned + identity. + :vartype principal_id: str + :ivar tenant_id: The tenant id associated with the virtual machine scale + set. This property will only be provided for a system assigned identity. + :vartype tenant_id: str + :param type: The type of identity used for the virtual machine scale set. + The type 'SystemAssigned, UserAssigned' includes both an implicitly + created identity and a set of user assigned identities. The type 'None' + will remove any identities from the virtual machine scale set. Possible + values include: 'SystemAssigned', 'UserAssigned', 'SystemAssigned, + UserAssigned', 'None' + :type type: str or + ~azure.mgmt.compute.v2018_06_01.models.ResourceIdentityType + :param user_assigned_identities: The list of user identities associated + with the virtual machine scale set. The user identity dictionary key + references will be ARM resource ids in the form: + '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'. + :type user_assigned_identities: dict[str, + ~azure.mgmt.compute.v2018_06_01.models.VirtualMachineScaleSetIdentityUserAssignedIdentitiesValue] + """ + + _validation = { + 'principal_id': {'readonly': True}, + 'tenant_id': {'readonly': True}, + } + + _attribute_map = { + 'principal_id': {'key': 'principalId', 'type': 'str'}, + 'tenant_id': {'key': 'tenantId', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'ResourceIdentityType'}, + 'user_assigned_identities': {'key': 'userAssignedIdentities', 'type': '{VirtualMachineScaleSetIdentityUserAssignedIdentitiesValue}'}, + } + + def __init__(self, *, type=None, user_assigned_identities=None, **kwargs) -> None: + super(VirtualMachineScaleSetIdentity, self).__init__(**kwargs) + self.principal_id = None + self.tenant_id = None + self.type = type + self.user_assigned_identities = user_assigned_identities + + +class VirtualMachineScaleSetIdentityUserAssignedIdentitiesValue(Model): + """VirtualMachineScaleSetIdentityUserAssignedIdentitiesValue. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar principal_id: The principal id of user assigned identity. + :vartype principal_id: str + :ivar client_id: The client id of user assigned identity. + :vartype client_id: str + """ + + _validation = { + 'principal_id': {'readonly': True}, + 'client_id': {'readonly': True}, + } + + _attribute_map = { + 'principal_id': {'key': 'principalId', 'type': 'str'}, + 'client_id': {'key': 'clientId', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(VirtualMachineScaleSetIdentityUserAssignedIdentitiesValue, self).__init__(**kwargs) + self.principal_id = None + self.client_id = None + + +class VirtualMachineScaleSetInstanceView(Model): + """The instance view of a virtual machine scale set. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar virtual_machine: The instance view status summary for the virtual + machine scale set. + :vartype virtual_machine: + ~azure.mgmt.compute.v2018_06_01.models.VirtualMachineScaleSetInstanceViewStatusesSummary + :ivar extensions: The extensions information. + :vartype extensions: + list[~azure.mgmt.compute.v2018_06_01.models.VirtualMachineScaleSetVMExtensionsSummary] + :param statuses: The resource status information. + :type statuses: + list[~azure.mgmt.compute.v2018_06_01.models.InstanceViewStatus] + """ + + _validation = { + 'virtual_machine': {'readonly': True}, + 'extensions': {'readonly': True}, + } + + _attribute_map = { + 'virtual_machine': {'key': 'virtualMachine', 'type': 'VirtualMachineScaleSetInstanceViewStatusesSummary'}, + 'extensions': {'key': 'extensions', 'type': '[VirtualMachineScaleSetVMExtensionsSummary]'}, + 'statuses': {'key': 'statuses', 'type': '[InstanceViewStatus]'}, + } + + def __init__(self, *, statuses=None, **kwargs) -> None: + super(VirtualMachineScaleSetInstanceView, self).__init__(**kwargs) + self.virtual_machine = None + self.extensions = None + self.statuses = statuses + + +class VirtualMachineScaleSetInstanceViewStatusesSummary(Model): + """Instance view statuses summary for virtual machines of a virtual machine + scale set. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar statuses_summary: The extensions information. + :vartype statuses_summary: + list[~azure.mgmt.compute.v2018_06_01.models.VirtualMachineStatusCodeCount] + """ + + _validation = { + 'statuses_summary': {'readonly': True}, + } + + _attribute_map = { + 'statuses_summary': {'key': 'statusesSummary', 'type': '[VirtualMachineStatusCodeCount]'}, + } + + def __init__(self, **kwargs) -> None: + super(VirtualMachineScaleSetInstanceViewStatusesSummary, self).__init__(**kwargs) + self.statuses_summary = None + + +class VirtualMachineScaleSetIPConfiguration(SubResource): + """Describes a virtual machine scale set network profile's IP configuration. + + All required parameters must be populated in order to send to Azure. + + :param id: Resource Id + :type id: str + :param name: Required. The IP configuration name. + :type name: str + :param subnet: Specifies the identifier of the subnet. + :type subnet: ~azure.mgmt.compute.v2018_06_01.models.ApiEntityReference + :param primary: Specifies the primary network interface in case the + virtual machine has more than 1 network interface. + :type primary: bool + :param public_ip_address_configuration: The publicIPAddressConfiguration. + :type public_ip_address_configuration: + ~azure.mgmt.compute.v2018_06_01.models.VirtualMachineScaleSetPublicIPAddressConfiguration + :param private_ip_address_version: Available from Api-Version 2017-03-30 + onwards, it represents whether the specific ipconfiguration is IPv4 or + IPv6. Default is taken as IPv4. Possible values are: 'IPv4' and 'IPv6'. + Possible values include: 'IPv4', 'IPv6' + :type private_ip_address_version: str or + ~azure.mgmt.compute.v2018_06_01.models.IPVersion + :param application_gateway_backend_address_pools: Specifies an array of + references to backend address pools of application gateways. A scale set + can reference backend address pools of multiple application gateways. + Multiple scale sets cannot use the same application gateway. + :type application_gateway_backend_address_pools: + list[~azure.mgmt.compute.v2018_06_01.models.SubResource] + :param application_security_groups: Specifies an array of references to + application security group. + :type application_security_groups: + list[~azure.mgmt.compute.v2018_06_01.models.SubResource] + :param load_balancer_backend_address_pools: Specifies an array of + references to backend address pools of load balancers. A scale set can + reference backend address pools of one public and one internal load + balancer. Multiple scale sets cannot use the same load balancer. + :type load_balancer_backend_address_pools: + list[~azure.mgmt.compute.v2018_06_01.models.SubResource] + :param load_balancer_inbound_nat_pools: Specifies an array of references + to inbound Nat pools of the load balancers. A scale set can reference + inbound nat pools of one public and one internal load balancer. Multiple + scale sets cannot use the same load balancer + :type load_balancer_inbound_nat_pools: + list[~azure.mgmt.compute.v2018_06_01.models.SubResource] + """ + + _validation = { + 'name': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'subnet': {'key': 'properties.subnet', 'type': 'ApiEntityReference'}, + 'primary': {'key': 'properties.primary', 'type': 'bool'}, + 'public_ip_address_configuration': {'key': 'properties.publicIPAddressConfiguration', 'type': 'VirtualMachineScaleSetPublicIPAddressConfiguration'}, + 'private_ip_address_version': {'key': 'properties.privateIPAddressVersion', 'type': 'str'}, + 'application_gateway_backend_address_pools': {'key': 'properties.applicationGatewayBackendAddressPools', 'type': '[SubResource]'}, + 'application_security_groups': {'key': 'properties.applicationSecurityGroups', 'type': '[SubResource]'}, + 'load_balancer_backend_address_pools': {'key': 'properties.loadBalancerBackendAddressPools', 'type': '[SubResource]'}, + 'load_balancer_inbound_nat_pools': {'key': 'properties.loadBalancerInboundNatPools', 'type': '[SubResource]'}, + } + + def __init__(self, *, name: str, id: str=None, subnet=None, primary: bool=None, public_ip_address_configuration=None, private_ip_address_version=None, application_gateway_backend_address_pools=None, application_security_groups=None, load_balancer_backend_address_pools=None, load_balancer_inbound_nat_pools=None, **kwargs) -> None: + super(VirtualMachineScaleSetIPConfiguration, self).__init__(id=id, **kwargs) + self.name = name + self.subnet = subnet + self.primary = primary + self.public_ip_address_configuration = public_ip_address_configuration + self.private_ip_address_version = private_ip_address_version + self.application_gateway_backend_address_pools = application_gateway_backend_address_pools + self.application_security_groups = application_security_groups + self.load_balancer_backend_address_pools = load_balancer_backend_address_pools + self.load_balancer_inbound_nat_pools = load_balancer_inbound_nat_pools + + +class VirtualMachineScaleSetIpTag(Model): + """Contains the IP tag associated with the public IP address. + + :param ip_tag_type: IP tag type. Example: FirstPartyUsage. + :type ip_tag_type: str + :param tag: IP tag associated with the public IP. Example: SQL, Storage + etc. + :type tag: str + """ + + _attribute_map = { + 'ip_tag_type': {'key': 'ipTagType', 'type': 'str'}, + 'tag': {'key': 'tag', 'type': 'str'}, + } + + def __init__(self, *, ip_tag_type: str=None, tag: str=None, **kwargs) -> None: + super(VirtualMachineScaleSetIpTag, self).__init__(**kwargs) + self.ip_tag_type = ip_tag_type + self.tag = tag + + +class VirtualMachineScaleSetManagedDiskParameters(Model): + """Describes the parameters of a ScaleSet managed disk. + + :param storage_account_type: Specifies the storage account type for the + managed disk. NOTE: UltraSSD_LRS can only be used with data disks, it + cannot be used with OS Disk. Possible values include: 'Standard_LRS', + 'Premium_LRS', 'StandardSSD_LRS', 'UltraSSD_LRS' + :type storage_account_type: str or + ~azure.mgmt.compute.v2018_06_01.models.StorageAccountTypes + """ + + _attribute_map = { + 'storage_account_type': {'key': 'storageAccountType', 'type': 'str'}, + } + + def __init__(self, *, storage_account_type=None, **kwargs) -> None: + super(VirtualMachineScaleSetManagedDiskParameters, self).__init__(**kwargs) + self.storage_account_type = storage_account_type + + +class VirtualMachineScaleSetNetworkConfiguration(SubResource): + """Describes a virtual machine scale set network profile's network + configurations. + + All required parameters must be populated in order to send to Azure. + + :param id: Resource Id + :type id: str + :param name: Required. The network configuration name. + :type name: str + :param primary: Specifies the primary network interface in case the + virtual machine has more than 1 network interface. + :type primary: bool + :param enable_accelerated_networking: Specifies whether the network + interface is accelerated networking-enabled. + :type enable_accelerated_networking: bool + :param network_security_group: The network security group. + :type network_security_group: + ~azure.mgmt.compute.v2018_06_01.models.SubResource + :param dns_settings: The dns settings to be applied on the network + interfaces. + :type dns_settings: + ~azure.mgmt.compute.v2018_06_01.models.VirtualMachineScaleSetNetworkConfigurationDnsSettings + :param ip_configurations: Required. Specifies the IP configurations of the + network interface. + :type ip_configurations: + list[~azure.mgmt.compute.v2018_06_01.models.VirtualMachineScaleSetIPConfiguration] + :param enable_ip_forwarding: Whether IP forwarding enabled on this NIC. + :type enable_ip_forwarding: bool + """ + + _validation = { + 'name': {'required': True}, + 'ip_configurations': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'primary': {'key': 'properties.primary', 'type': 'bool'}, + 'enable_accelerated_networking': {'key': 'properties.enableAcceleratedNetworking', 'type': 'bool'}, + 'network_security_group': {'key': 'properties.networkSecurityGroup', 'type': 'SubResource'}, + 'dns_settings': {'key': 'properties.dnsSettings', 'type': 'VirtualMachineScaleSetNetworkConfigurationDnsSettings'}, + 'ip_configurations': {'key': 'properties.ipConfigurations', 'type': '[VirtualMachineScaleSetIPConfiguration]'}, + 'enable_ip_forwarding': {'key': 'properties.enableIPForwarding', 'type': 'bool'}, + } + + def __init__(self, *, name: str, ip_configurations, id: str=None, primary: bool=None, enable_accelerated_networking: bool=None, network_security_group=None, dns_settings=None, enable_ip_forwarding: bool=None, **kwargs) -> None: + super(VirtualMachineScaleSetNetworkConfiguration, self).__init__(id=id, **kwargs) + self.name = name + self.primary = primary + self.enable_accelerated_networking = enable_accelerated_networking + self.network_security_group = network_security_group + self.dns_settings = dns_settings + self.ip_configurations = ip_configurations + self.enable_ip_forwarding = enable_ip_forwarding + + +class VirtualMachineScaleSetNetworkConfigurationDnsSettings(Model): + """Describes a virtual machines scale sets network configuration's DNS + settings. + + :param dns_servers: List of DNS servers IP addresses + :type dns_servers: list[str] + """ + + _attribute_map = { + 'dns_servers': {'key': 'dnsServers', 'type': '[str]'}, + } + + def __init__(self, *, dns_servers=None, **kwargs) -> None: + super(VirtualMachineScaleSetNetworkConfigurationDnsSettings, self).__init__(**kwargs) + self.dns_servers = dns_servers + + +class VirtualMachineScaleSetNetworkProfile(Model): + """Describes a virtual machine scale set network profile. + + :param health_probe: A reference to a load balancer probe used to + determine the health of an instance in the virtual machine scale set. The + reference will be in the form: + '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/probes/{probeName}'. + :type health_probe: + ~azure.mgmt.compute.v2018_06_01.models.ApiEntityReference + :param network_interface_configurations: The list of network + configurations. + :type network_interface_configurations: + list[~azure.mgmt.compute.v2018_06_01.models.VirtualMachineScaleSetNetworkConfiguration] + """ + + _attribute_map = { + 'health_probe': {'key': 'healthProbe', 'type': 'ApiEntityReference'}, + 'network_interface_configurations': {'key': 'networkInterfaceConfigurations', 'type': '[VirtualMachineScaleSetNetworkConfiguration]'}, + } + + def __init__(self, *, health_probe=None, network_interface_configurations=None, **kwargs) -> None: + super(VirtualMachineScaleSetNetworkProfile, self).__init__(**kwargs) + self.health_probe = health_probe + self.network_interface_configurations = network_interface_configurations + + +class VirtualMachineScaleSetOSDisk(Model): + """Describes a virtual machine scale set operating system disk. + + All required parameters must be populated in order to send to Azure. + + :param name: The disk name. + :type name: str + :param caching: Specifies the caching requirements.

    Possible + values are:

    **None**

    **ReadOnly**

    **ReadWrite** +

    Default: **None for Standard storage. ReadOnly for Premium + storage**. Possible values include: 'None', 'ReadOnly', 'ReadWrite' + :type caching: str or ~azure.mgmt.compute.v2018_06_01.models.CachingTypes + :param write_accelerator_enabled: Specifies whether writeAccelerator + should be enabled or disabled on the disk. + :type write_accelerator_enabled: bool + :param create_option: Required. Specifies how the virtual machines in the + scale set should be created.

    The only allowed value is: + **FromImage** \\u2013 This value is used when you are using an image to + create the virtual machine. If you are using a platform image, you also + use the imageReference element described above. If you are using a + marketplace image, you also use the plan element previously described. + Possible values include: 'FromImage', 'Empty', 'Attach' + :type create_option: str or + ~azure.mgmt.compute.v2018_06_01.models.DiskCreateOptionTypes + :param diff_disk_settings: Specifies the ephemeral disk Settings for the + operating system disk used by the virtual machine scale set. + :type diff_disk_settings: + ~azure.mgmt.compute.v2018_06_01.models.DiffDiskSettings + :param disk_size_gb: Specifies the size of the operating system disk in + gigabytes. This element can be used to overwrite the size of the disk in a + virtual machine image.

    This value cannot be larger than 1023 GB + :type disk_size_gb: int + :param os_type: This property allows you to specify the type of the OS + that is included in the disk if creating a VM from user-image or a + specialized VHD.

    Possible values are:

    **Windows** +

    **Linux**. Possible values include: 'Windows', 'Linux' + :type os_type: str or + ~azure.mgmt.compute.v2018_06_01.models.OperatingSystemTypes + :param image: Specifies information about the unmanaged user image to base + the scale set on. + :type image: ~azure.mgmt.compute.v2018_06_01.models.VirtualHardDisk + :param vhd_containers: Specifies the container urls that are used to store + operating system disks for the scale set. + :type vhd_containers: list[str] + :param managed_disk: The managed disk parameters. + :type managed_disk: + ~azure.mgmt.compute.v2018_06_01.models.VirtualMachineScaleSetManagedDiskParameters + """ + + _validation = { + 'create_option': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'caching': {'key': 'caching', 'type': 'CachingTypes'}, + 'write_accelerator_enabled': {'key': 'writeAcceleratorEnabled', 'type': 'bool'}, + 'create_option': {'key': 'createOption', 'type': 'str'}, + 'diff_disk_settings': {'key': 'diffDiskSettings', 'type': 'DiffDiskSettings'}, + 'disk_size_gb': {'key': 'diskSizeGB', 'type': 'int'}, + 'os_type': {'key': 'osType', 'type': 'OperatingSystemTypes'}, + 'image': {'key': 'image', 'type': 'VirtualHardDisk'}, + 'vhd_containers': {'key': 'vhdContainers', 'type': '[str]'}, + 'managed_disk': {'key': 'managedDisk', 'type': 'VirtualMachineScaleSetManagedDiskParameters'}, + } + + def __init__(self, *, create_option, name: str=None, caching=None, write_accelerator_enabled: bool=None, diff_disk_settings=None, disk_size_gb: int=None, os_type=None, image=None, vhd_containers=None, managed_disk=None, **kwargs) -> None: + super(VirtualMachineScaleSetOSDisk, self).__init__(**kwargs) + self.name = name + self.caching = caching + self.write_accelerator_enabled = write_accelerator_enabled + self.create_option = create_option + self.diff_disk_settings = diff_disk_settings + self.disk_size_gb = disk_size_gb + self.os_type = os_type + self.image = image + self.vhd_containers = vhd_containers + self.managed_disk = managed_disk + + +class VirtualMachineScaleSetOSProfile(Model): + """Describes a virtual machine scale set OS profile. + + :param computer_name_prefix: Specifies the computer name prefix for all of + the virtual machines in the scale set. Computer name prefixes must be 1 to + 15 characters long. + :type computer_name_prefix: str + :param admin_username: Specifies the name of the administrator account. +

    **Windows-only restriction:** Cannot end in "."

    + **Disallowed values:** "administrator", "admin", "user", "user1", "test", + "user2", "test1", "user3", "admin1", "1", "123", "a", "actuser", "adm", + "admin2", "aspnet", "backup", "console", "david", "guest", "john", + "owner", "root", "server", "sql", "support", "support_388945a0", "sys", + "test2", "test3", "user4", "user5".

    **Minimum-length (Linux):** 1 + character

    **Max-length (Linux):** 64 characters

    + **Max-length (Windows):** 20 characters

  • For root access to + the Linux VM, see [Using root privileges on Linux virtual machines in + Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-use-root-privileges?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json)
  • + For a list of built-in system users on Linux that should not be used in + this field, see [Selecting User Names for Linux on + Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-usernames?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json) + :type admin_username: str + :param admin_password: Specifies the password of the administrator + account.

    **Minimum-length (Windows):** 8 characters

    + **Minimum-length (Linux):** 6 characters

    **Max-length + (Windows):** 123 characters

    **Max-length (Linux):** 72 characters +

    **Complexity requirements:** 3 out of 4 conditions below need to + be fulfilled
    Has lower characters
    Has upper characters
    Has a + digit
    Has a special character (Regex match [\\W_])

    + **Disallowed values:** "abc@123", "P@$$w0rd", "P@ssw0rd", "P@ssword123", + "Pa$$word", "pass@word1", "Password!", "Password1", "Password22", + "iloveyou!"

    For resetting the password, see [How to reset the + Remote Desktop service or its login password in a Windows + VM](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-reset-rdp?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json) +

    For resetting root password, see [Manage users, SSH, and check or + repair disks on Azure Linux VMs using the VMAccess + Extension](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-using-vmaccess-extension?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json#reset-root-password) + :type admin_password: str + :param custom_data: Specifies a base-64 encoded string of custom data. The + base-64 encoded string is decoded to a binary array that is saved as a + file on the Virtual Machine. The maximum length of the binary array is + 65535 bytes.

    For using cloud-init for your VM, see [Using + cloud-init to customize a Linux VM during + creation](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-using-cloud-init?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json) + :type custom_data: str + :param windows_configuration: Specifies Windows operating system settings + on the virtual machine. + :type windows_configuration: + ~azure.mgmt.compute.v2018_06_01.models.WindowsConfiguration + :param linux_configuration: Specifies the Linux operating system settings + on the virtual machine.

    For a list of supported Linux + distributions, see [Linux on Azure-Endorsed + Distributions](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-endorsed-distros?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json) +

    For running non-endorsed distributions, see [Information for + Non-Endorsed + Distributions](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-create-upload-generic?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json). + :type linux_configuration: + ~azure.mgmt.compute.v2018_06_01.models.LinuxConfiguration + :param secrets: Specifies set of certificates that should be installed + onto the virtual machines in the scale set. + :type secrets: + list[~azure.mgmt.compute.v2018_06_01.models.VaultSecretGroup] + """ + + _attribute_map = { + 'computer_name_prefix': {'key': 'computerNamePrefix', 'type': 'str'}, + 'admin_username': {'key': 'adminUsername', 'type': 'str'}, + 'admin_password': {'key': 'adminPassword', 'type': 'str'}, + 'custom_data': {'key': 'customData', 'type': 'str'}, + 'windows_configuration': {'key': 'windowsConfiguration', 'type': 'WindowsConfiguration'}, + 'linux_configuration': {'key': 'linuxConfiguration', 'type': 'LinuxConfiguration'}, + 'secrets': {'key': 'secrets', 'type': '[VaultSecretGroup]'}, + } + + def __init__(self, *, computer_name_prefix: str=None, admin_username: str=None, admin_password: str=None, custom_data: str=None, windows_configuration=None, linux_configuration=None, secrets=None, **kwargs) -> None: + super(VirtualMachineScaleSetOSProfile, self).__init__(**kwargs) + self.computer_name_prefix = computer_name_prefix + self.admin_username = admin_username + self.admin_password = admin_password + self.custom_data = custom_data + self.windows_configuration = windows_configuration + self.linux_configuration = linux_configuration + self.secrets = secrets + + +class VirtualMachineScaleSetPublicIPAddressConfiguration(Model): + """Describes a virtual machines scale set IP Configuration's PublicIPAddress + configuration. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. The publicIP address configuration name. + :type name: str + :param idle_timeout_in_minutes: The idle timeout of the public IP address. + :type idle_timeout_in_minutes: int + :param dns_settings: The dns settings to be applied on the publicIP + addresses . + :type dns_settings: + ~azure.mgmt.compute.v2018_06_01.models.VirtualMachineScaleSetPublicIPAddressConfigurationDnsSettings + :param ip_tags: The list of IP tags associated with the public IP address. + :type ip_tags: + list[~azure.mgmt.compute.v2018_06_01.models.VirtualMachineScaleSetIpTag] + :param public_ip_prefix: The PublicIPPrefix from which to allocate + publicIP addresses. + :type public_ip_prefix: ~azure.mgmt.compute.v2018_06_01.models.SubResource + """ + + _validation = { + 'name': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'idle_timeout_in_minutes': {'key': 'properties.idleTimeoutInMinutes', 'type': 'int'}, + 'dns_settings': {'key': 'properties.dnsSettings', 'type': 'VirtualMachineScaleSetPublicIPAddressConfigurationDnsSettings'}, + 'ip_tags': {'key': 'properties.ipTags', 'type': '[VirtualMachineScaleSetIpTag]'}, + 'public_ip_prefix': {'key': 'properties.publicIPPrefix', 'type': 'SubResource'}, + } + + def __init__(self, *, name: str, idle_timeout_in_minutes: int=None, dns_settings=None, ip_tags=None, public_ip_prefix=None, **kwargs) -> None: + super(VirtualMachineScaleSetPublicIPAddressConfiguration, self).__init__(**kwargs) + self.name = name + self.idle_timeout_in_minutes = idle_timeout_in_minutes + self.dns_settings = dns_settings + self.ip_tags = ip_tags + self.public_ip_prefix = public_ip_prefix + + +class VirtualMachineScaleSetPublicIPAddressConfigurationDnsSettings(Model): + """Describes a virtual machines scale sets network configuration's DNS + settings. + + All required parameters must be populated in order to send to Azure. + + :param domain_name_label: Required. The Domain name label.The + concatenation of the domain name label and vm index will be the domain + name labels of the PublicIPAddress resources that will be created + :type domain_name_label: str + """ + + _validation = { + 'domain_name_label': {'required': True}, + } + + _attribute_map = { + 'domain_name_label': {'key': 'domainNameLabel', 'type': 'str'}, + } + + def __init__(self, *, domain_name_label: str, **kwargs) -> None: + super(VirtualMachineScaleSetPublicIPAddressConfigurationDnsSettings, self).__init__(**kwargs) + self.domain_name_label = domain_name_label + + +class VirtualMachineScaleSetVMReimageParameters(VirtualMachineReimageParameters): + """Describes a Virtual Machine Scale Set VM Reimage Parameters. + + :param temp_disk: Specifies whether to reimage temp disk. Default value: + false. Note: This temp disk reimage parameter is only supported for + VM/VMSS with Ephemeral OS disk. + :type temp_disk: bool + """ + + _attribute_map = { + 'temp_disk': {'key': 'tempDisk', 'type': 'bool'}, + } + + def __init__(self, *, temp_disk: bool=None, **kwargs) -> None: + super(VirtualMachineScaleSetVMReimageParameters, self).__init__(temp_disk=temp_disk, **kwargs) + + +class VirtualMachineScaleSetReimageParameters(VirtualMachineScaleSetVMReimageParameters): + """Describes a Virtual Machine Scale Set VM Reimage Parameters. + + :param temp_disk: Specifies whether to reimage temp disk. Default value: + false. Note: This temp disk reimage parameter is only supported for + VM/VMSS with Ephemeral OS disk. + :type temp_disk: bool + :param instance_ids: The virtual machine scale set instance ids. Omitting + the virtual machine scale set instance ids will result in the operation + being performed on all virtual machines in the virtual machine scale set. + :type instance_ids: list[str] + """ + + _attribute_map = { + 'temp_disk': {'key': 'tempDisk', 'type': 'bool'}, + 'instance_ids': {'key': 'instanceIds', 'type': '[str]'}, + } + + def __init__(self, *, temp_disk: bool=None, instance_ids=None, **kwargs) -> None: + super(VirtualMachineScaleSetReimageParameters, self).__init__(temp_disk=temp_disk, **kwargs) + self.instance_ids = instance_ids + + +class VirtualMachineScaleSetSku(Model): + """Describes an available virtual machine scale set sku. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar resource_type: The type of resource the sku applies to. + :vartype resource_type: str + :ivar sku: The Sku. + :vartype sku: ~azure.mgmt.compute.v2018_06_01.models.Sku + :ivar capacity: Specifies the number of virtual machines in the scale set. + :vartype capacity: + ~azure.mgmt.compute.v2018_06_01.models.VirtualMachineScaleSetSkuCapacity + """ + + _validation = { + 'resource_type': {'readonly': True}, + 'sku': {'readonly': True}, + 'capacity': {'readonly': True}, + } + + _attribute_map = { + 'resource_type': {'key': 'resourceType', 'type': 'str'}, + 'sku': {'key': 'sku', 'type': 'Sku'}, + 'capacity': {'key': 'capacity', 'type': 'VirtualMachineScaleSetSkuCapacity'}, + } + + def __init__(self, **kwargs) -> None: + super(VirtualMachineScaleSetSku, self).__init__(**kwargs) + self.resource_type = None + self.sku = None + self.capacity = None + + +class VirtualMachineScaleSetSkuCapacity(Model): + """Describes scaling information of a sku. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar minimum: The minimum capacity. + :vartype minimum: long + :ivar maximum: The maximum capacity that can be set. + :vartype maximum: long + :ivar default_capacity: The default capacity. + :vartype default_capacity: long + :ivar scale_type: The scale type applicable to the sku. Possible values + include: 'Automatic', 'None' + :vartype scale_type: str or + ~azure.mgmt.compute.v2018_06_01.models.VirtualMachineScaleSetSkuScaleType + """ + + _validation = { + 'minimum': {'readonly': True}, + 'maximum': {'readonly': True}, + 'default_capacity': {'readonly': True}, + 'scale_type': {'readonly': True}, + } + + _attribute_map = { + 'minimum': {'key': 'minimum', 'type': 'long'}, + 'maximum': {'key': 'maximum', 'type': 'long'}, + 'default_capacity': {'key': 'defaultCapacity', 'type': 'long'}, + 'scale_type': {'key': 'scaleType', 'type': 'VirtualMachineScaleSetSkuScaleType'}, + } + + def __init__(self, **kwargs) -> None: + super(VirtualMachineScaleSetSkuCapacity, self).__init__(**kwargs) + self.minimum = None + self.maximum = None + self.default_capacity = None + self.scale_type = None + + +class VirtualMachineScaleSetStorageProfile(Model): + """Describes a virtual machine scale set storage profile. + + :param image_reference: Specifies information about the image to use. You + can specify information about platform images, marketplace images, or + virtual machine images. This element is required when you want to use a + platform image, marketplace image, or virtual machine image, but is not + used in other creation operations. + :type image_reference: + ~azure.mgmt.compute.v2018_06_01.models.ImageReference + :param os_disk: Specifies information about the operating system disk used + by the virtual machines in the scale set.

    For more information + about disks, see [About disks and VHDs for Azure virtual + machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-about-disks-vhds?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). + :type os_disk: + ~azure.mgmt.compute.v2018_06_01.models.VirtualMachineScaleSetOSDisk + :param data_disks: Specifies the parameters that are used to add data + disks to the virtual machines in the scale set.

    For more + information about disks, see [About disks and VHDs for Azure virtual + machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-about-disks-vhds?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). + :type data_disks: + list[~azure.mgmt.compute.v2018_06_01.models.VirtualMachineScaleSetDataDisk] + """ + + _attribute_map = { + 'image_reference': {'key': 'imageReference', 'type': 'ImageReference'}, + 'os_disk': {'key': 'osDisk', 'type': 'VirtualMachineScaleSetOSDisk'}, + 'data_disks': {'key': 'dataDisks', 'type': '[VirtualMachineScaleSetDataDisk]'}, + } + + def __init__(self, *, image_reference=None, os_disk=None, data_disks=None, **kwargs) -> None: + super(VirtualMachineScaleSetStorageProfile, self).__init__(**kwargs) + self.image_reference = image_reference + self.os_disk = os_disk + self.data_disks = data_disks + + +class VirtualMachineScaleSetUpdate(UpdateResource): + """Describes a Virtual Machine Scale Set. + + :param tags: Resource tags + :type tags: dict[str, str] + :param sku: The virtual machine scale set sku. + :type sku: ~azure.mgmt.compute.v2018_06_01.models.Sku + :param plan: The purchase plan when deploying a virtual machine scale set + from VM Marketplace images. + :type plan: ~azure.mgmt.compute.v2018_06_01.models.Plan + :param upgrade_policy: The upgrade policy. + :type upgrade_policy: ~azure.mgmt.compute.v2018_06_01.models.UpgradePolicy + :param virtual_machine_profile: The virtual machine profile. + :type virtual_machine_profile: + ~azure.mgmt.compute.v2018_06_01.models.VirtualMachineScaleSetUpdateVMProfile + :param overprovision: Specifies whether the Virtual Machine Scale Set + should be overprovisioned. + :type overprovision: bool + :param single_placement_group: When true this limits the scale set to a + single placement group, of max size 100 virtual machines. + :type single_placement_group: bool + :param identity: The identity of the virtual machine scale set, if + configured. + :type identity: + ~azure.mgmt.compute.v2018_06_01.models.VirtualMachineScaleSetIdentity + """ + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + 'sku': {'key': 'sku', 'type': 'Sku'}, + 'plan': {'key': 'plan', 'type': 'Plan'}, + 'upgrade_policy': {'key': 'properties.upgradePolicy', 'type': 'UpgradePolicy'}, + 'virtual_machine_profile': {'key': 'properties.virtualMachineProfile', 'type': 'VirtualMachineScaleSetUpdateVMProfile'}, + 'overprovision': {'key': 'properties.overprovision', 'type': 'bool'}, + 'single_placement_group': {'key': 'properties.singlePlacementGroup', 'type': 'bool'}, + 'identity': {'key': 'identity', 'type': 'VirtualMachineScaleSetIdentity'}, + } + + def __init__(self, *, tags=None, sku=None, plan=None, upgrade_policy=None, virtual_machine_profile=None, overprovision: bool=None, single_placement_group: bool=None, identity=None, **kwargs) -> None: + super(VirtualMachineScaleSetUpdate, self).__init__(tags=tags, **kwargs) + self.sku = sku + self.plan = plan + self.upgrade_policy = upgrade_policy + self.virtual_machine_profile = virtual_machine_profile + self.overprovision = overprovision + self.single_placement_group = single_placement_group + self.identity = identity + + +class VirtualMachineScaleSetUpdateIPConfiguration(SubResource): + """Describes a virtual machine scale set network profile's IP configuration. + + :param id: Resource Id + :type id: str + :param name: The IP configuration name. + :type name: str + :param subnet: The subnet. + :type subnet: ~azure.mgmt.compute.v2018_06_01.models.ApiEntityReference + :param primary: Specifies the primary IP Configuration in case the network + interface has more than one IP Configuration. + :type primary: bool + :param public_ip_address_configuration: The publicIPAddressConfiguration. + :type public_ip_address_configuration: + ~azure.mgmt.compute.v2018_06_01.models.VirtualMachineScaleSetUpdatePublicIPAddressConfiguration + :param private_ip_address_version: Available from Api-Version 2017-03-30 + onwards, it represents whether the specific ipconfiguration is IPv4 or + IPv6. Default is taken as IPv4. Possible values are: 'IPv4' and 'IPv6'. + Possible values include: 'IPv4', 'IPv6' + :type private_ip_address_version: str or + ~azure.mgmt.compute.v2018_06_01.models.IPVersion + :param application_gateway_backend_address_pools: The application gateway + backend address pools. + :type application_gateway_backend_address_pools: + list[~azure.mgmt.compute.v2018_06_01.models.SubResource] + :param application_security_groups: Specifies an array of references to + application security group. + :type application_security_groups: + list[~azure.mgmt.compute.v2018_06_01.models.SubResource] + :param load_balancer_backend_address_pools: The load balancer backend + address pools. + :type load_balancer_backend_address_pools: + list[~azure.mgmt.compute.v2018_06_01.models.SubResource] + :param load_balancer_inbound_nat_pools: The load balancer inbound nat + pools. + :type load_balancer_inbound_nat_pools: + list[~azure.mgmt.compute.v2018_06_01.models.SubResource] + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'subnet': {'key': 'properties.subnet', 'type': 'ApiEntityReference'}, + 'primary': {'key': 'properties.primary', 'type': 'bool'}, + 'public_ip_address_configuration': {'key': 'properties.publicIPAddressConfiguration', 'type': 'VirtualMachineScaleSetUpdatePublicIPAddressConfiguration'}, + 'private_ip_address_version': {'key': 'properties.privateIPAddressVersion', 'type': 'str'}, + 'application_gateway_backend_address_pools': {'key': 'properties.applicationGatewayBackendAddressPools', 'type': '[SubResource]'}, + 'application_security_groups': {'key': 'properties.applicationSecurityGroups', 'type': '[SubResource]'}, + 'load_balancer_backend_address_pools': {'key': 'properties.loadBalancerBackendAddressPools', 'type': '[SubResource]'}, + 'load_balancer_inbound_nat_pools': {'key': 'properties.loadBalancerInboundNatPools', 'type': '[SubResource]'}, + } + + def __init__(self, *, id: str=None, name: str=None, subnet=None, primary: bool=None, public_ip_address_configuration=None, private_ip_address_version=None, application_gateway_backend_address_pools=None, application_security_groups=None, load_balancer_backend_address_pools=None, load_balancer_inbound_nat_pools=None, **kwargs) -> None: + super(VirtualMachineScaleSetUpdateIPConfiguration, self).__init__(id=id, **kwargs) + self.name = name + self.subnet = subnet + self.primary = primary + self.public_ip_address_configuration = public_ip_address_configuration + self.private_ip_address_version = private_ip_address_version + self.application_gateway_backend_address_pools = application_gateway_backend_address_pools + self.application_security_groups = application_security_groups + self.load_balancer_backend_address_pools = load_balancer_backend_address_pools + self.load_balancer_inbound_nat_pools = load_balancer_inbound_nat_pools + + +class VirtualMachineScaleSetUpdateNetworkConfiguration(SubResource): + """Describes a virtual machine scale set network profile's network + configurations. + + :param id: Resource Id + :type id: str + :param name: The network configuration name. + :type name: str + :param primary: Whether this is a primary NIC on a virtual machine. + :type primary: bool + :param enable_accelerated_networking: Specifies whether the network + interface is accelerated networking-enabled. + :type enable_accelerated_networking: bool + :param network_security_group: The network security group. + :type network_security_group: + ~azure.mgmt.compute.v2018_06_01.models.SubResource + :param dns_settings: The dns settings to be applied on the network + interfaces. + :type dns_settings: + ~azure.mgmt.compute.v2018_06_01.models.VirtualMachineScaleSetNetworkConfigurationDnsSettings + :param ip_configurations: The virtual machine scale set IP Configuration. + :type ip_configurations: + list[~azure.mgmt.compute.v2018_06_01.models.VirtualMachineScaleSetUpdateIPConfiguration] + :param enable_ip_forwarding: Whether IP forwarding enabled on this NIC. + :type enable_ip_forwarding: bool + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'primary': {'key': 'properties.primary', 'type': 'bool'}, + 'enable_accelerated_networking': {'key': 'properties.enableAcceleratedNetworking', 'type': 'bool'}, + 'network_security_group': {'key': 'properties.networkSecurityGroup', 'type': 'SubResource'}, + 'dns_settings': {'key': 'properties.dnsSettings', 'type': 'VirtualMachineScaleSetNetworkConfigurationDnsSettings'}, + 'ip_configurations': {'key': 'properties.ipConfigurations', 'type': '[VirtualMachineScaleSetUpdateIPConfiguration]'}, + 'enable_ip_forwarding': {'key': 'properties.enableIPForwarding', 'type': 'bool'}, + } + + def __init__(self, *, id: str=None, name: str=None, primary: bool=None, enable_accelerated_networking: bool=None, network_security_group=None, dns_settings=None, ip_configurations=None, enable_ip_forwarding: bool=None, **kwargs) -> None: + super(VirtualMachineScaleSetUpdateNetworkConfiguration, self).__init__(id=id, **kwargs) + self.name = name + self.primary = primary + self.enable_accelerated_networking = enable_accelerated_networking + self.network_security_group = network_security_group + self.dns_settings = dns_settings + self.ip_configurations = ip_configurations + self.enable_ip_forwarding = enable_ip_forwarding + + +class VirtualMachineScaleSetUpdateNetworkProfile(Model): + """Describes a virtual machine scale set network profile. + + :param network_interface_configurations: The list of network + configurations. + :type network_interface_configurations: + list[~azure.mgmt.compute.v2018_06_01.models.VirtualMachineScaleSetUpdateNetworkConfiguration] + """ + + _attribute_map = { + 'network_interface_configurations': {'key': 'networkInterfaceConfigurations', 'type': '[VirtualMachineScaleSetUpdateNetworkConfiguration]'}, + } + + def __init__(self, *, network_interface_configurations=None, **kwargs) -> None: + super(VirtualMachineScaleSetUpdateNetworkProfile, self).__init__(**kwargs) + self.network_interface_configurations = network_interface_configurations + + +class VirtualMachineScaleSetUpdateOSDisk(Model): + """Describes virtual machine scale set operating system disk Update Object. + This should be used for Updating VMSS OS Disk. + + :param caching: The caching type. Possible values include: 'None', + 'ReadOnly', 'ReadWrite' + :type caching: str or ~azure.mgmt.compute.v2018_06_01.models.CachingTypes + :param write_accelerator_enabled: Specifies whether writeAccelerator + should be enabled or disabled on the disk. + :type write_accelerator_enabled: bool + :param disk_size_gb: Specifies the size of the operating system disk in + gigabytes. This element can be used to overwrite the size of the disk in a + virtual machine image.

    This value cannot be larger than 1023 GB + :type disk_size_gb: int + :param image: The Source User Image VirtualHardDisk. This VirtualHardDisk + will be copied before using it to attach to the Virtual Machine. If + SourceImage is provided, the destination VirtualHardDisk should not exist. + :type image: ~azure.mgmt.compute.v2018_06_01.models.VirtualHardDisk + :param vhd_containers: The list of virtual hard disk container uris. + :type vhd_containers: list[str] + :param managed_disk: The managed disk parameters. + :type managed_disk: + ~azure.mgmt.compute.v2018_06_01.models.VirtualMachineScaleSetManagedDiskParameters + """ + + _attribute_map = { + 'caching': {'key': 'caching', 'type': 'CachingTypes'}, + 'write_accelerator_enabled': {'key': 'writeAcceleratorEnabled', 'type': 'bool'}, + 'disk_size_gb': {'key': 'diskSizeGB', 'type': 'int'}, + 'image': {'key': 'image', 'type': 'VirtualHardDisk'}, + 'vhd_containers': {'key': 'vhdContainers', 'type': '[str]'}, + 'managed_disk': {'key': 'managedDisk', 'type': 'VirtualMachineScaleSetManagedDiskParameters'}, + } + + def __init__(self, *, caching=None, write_accelerator_enabled: bool=None, disk_size_gb: int=None, image=None, vhd_containers=None, managed_disk=None, **kwargs) -> None: + super(VirtualMachineScaleSetUpdateOSDisk, self).__init__(**kwargs) + self.caching = caching + self.write_accelerator_enabled = write_accelerator_enabled + self.disk_size_gb = disk_size_gb + self.image = image + self.vhd_containers = vhd_containers + self.managed_disk = managed_disk + + +class VirtualMachineScaleSetUpdateOSProfile(Model): + """Describes a virtual machine scale set OS profile. + + :param custom_data: A base-64 encoded string of custom data. + :type custom_data: str + :param windows_configuration: The Windows Configuration of the OS profile. + :type windows_configuration: + ~azure.mgmt.compute.v2018_06_01.models.WindowsConfiguration + :param linux_configuration: The Linux Configuration of the OS profile. + :type linux_configuration: + ~azure.mgmt.compute.v2018_06_01.models.LinuxConfiguration + :param secrets: The List of certificates for addition to the VM. + :type secrets: + list[~azure.mgmt.compute.v2018_06_01.models.VaultSecretGroup] + """ + + _attribute_map = { + 'custom_data': {'key': 'customData', 'type': 'str'}, + 'windows_configuration': {'key': 'windowsConfiguration', 'type': 'WindowsConfiguration'}, + 'linux_configuration': {'key': 'linuxConfiguration', 'type': 'LinuxConfiguration'}, + 'secrets': {'key': 'secrets', 'type': '[VaultSecretGroup]'}, + } + + def __init__(self, *, custom_data: str=None, windows_configuration=None, linux_configuration=None, secrets=None, **kwargs) -> None: + super(VirtualMachineScaleSetUpdateOSProfile, self).__init__(**kwargs) + self.custom_data = custom_data + self.windows_configuration = windows_configuration + self.linux_configuration = linux_configuration + self.secrets = secrets + + +class VirtualMachineScaleSetUpdatePublicIPAddressConfiguration(Model): + """Describes a virtual machines scale set IP Configuration's PublicIPAddress + configuration. + + :param name: The publicIP address configuration name. + :type name: str + :param idle_timeout_in_minutes: The idle timeout of the public IP address. + :type idle_timeout_in_minutes: int + :param dns_settings: The dns settings to be applied on the publicIP + addresses . + :type dns_settings: + ~azure.mgmt.compute.v2018_06_01.models.VirtualMachineScaleSetPublicIPAddressConfigurationDnsSettings + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'idle_timeout_in_minutes': {'key': 'properties.idleTimeoutInMinutes', 'type': 'int'}, + 'dns_settings': {'key': 'properties.dnsSettings', 'type': 'VirtualMachineScaleSetPublicIPAddressConfigurationDnsSettings'}, + } + + def __init__(self, *, name: str=None, idle_timeout_in_minutes: int=None, dns_settings=None, **kwargs) -> None: + super(VirtualMachineScaleSetUpdatePublicIPAddressConfiguration, self).__init__(**kwargs) + self.name = name + self.idle_timeout_in_minutes = idle_timeout_in_minutes + self.dns_settings = dns_settings + + +class VirtualMachineScaleSetUpdateStorageProfile(Model): + """Describes a virtual machine scale set storage profile. + + :param image_reference: The image reference. + :type image_reference: + ~azure.mgmt.compute.v2018_06_01.models.ImageReference + :param os_disk: The OS disk. + :type os_disk: + ~azure.mgmt.compute.v2018_06_01.models.VirtualMachineScaleSetUpdateOSDisk + :param data_disks: The data disks. + :type data_disks: + list[~azure.mgmt.compute.v2018_06_01.models.VirtualMachineScaleSetDataDisk] + """ + + _attribute_map = { + 'image_reference': {'key': 'imageReference', 'type': 'ImageReference'}, + 'os_disk': {'key': 'osDisk', 'type': 'VirtualMachineScaleSetUpdateOSDisk'}, + 'data_disks': {'key': 'dataDisks', 'type': '[VirtualMachineScaleSetDataDisk]'}, + } + + def __init__(self, *, image_reference=None, os_disk=None, data_disks=None, **kwargs) -> None: + super(VirtualMachineScaleSetUpdateStorageProfile, self).__init__(**kwargs) + self.image_reference = image_reference + self.os_disk = os_disk + self.data_disks = data_disks + + +class VirtualMachineScaleSetUpdateVMProfile(Model): + """Describes a virtual machine scale set virtual machine profile. + + :param os_profile: The virtual machine scale set OS profile. + :type os_profile: + ~azure.mgmt.compute.v2018_06_01.models.VirtualMachineScaleSetUpdateOSProfile + :param storage_profile: The virtual machine scale set storage profile. + :type storage_profile: + ~azure.mgmt.compute.v2018_06_01.models.VirtualMachineScaleSetUpdateStorageProfile + :param network_profile: The virtual machine scale set network profile. + :type network_profile: + ~azure.mgmt.compute.v2018_06_01.models.VirtualMachineScaleSetUpdateNetworkProfile + :param diagnostics_profile: The virtual machine scale set diagnostics + profile. + :type diagnostics_profile: + ~azure.mgmt.compute.v2018_06_01.models.DiagnosticsProfile + :param extension_profile: The virtual machine scale set extension profile. + :type extension_profile: + ~azure.mgmt.compute.v2018_06_01.models.VirtualMachineScaleSetExtensionProfile + :param license_type: The license type, which is for bring your own license + scenario. + :type license_type: str + """ + + _attribute_map = { + 'os_profile': {'key': 'osProfile', 'type': 'VirtualMachineScaleSetUpdateOSProfile'}, + 'storage_profile': {'key': 'storageProfile', 'type': 'VirtualMachineScaleSetUpdateStorageProfile'}, + 'network_profile': {'key': 'networkProfile', 'type': 'VirtualMachineScaleSetUpdateNetworkProfile'}, + 'diagnostics_profile': {'key': 'diagnosticsProfile', 'type': 'DiagnosticsProfile'}, + 'extension_profile': {'key': 'extensionProfile', 'type': 'VirtualMachineScaleSetExtensionProfile'}, + 'license_type': {'key': 'licenseType', 'type': 'str'}, + } + + def __init__(self, *, os_profile=None, storage_profile=None, network_profile=None, diagnostics_profile=None, extension_profile=None, license_type: str=None, **kwargs) -> None: + super(VirtualMachineScaleSetUpdateVMProfile, self).__init__(**kwargs) + self.os_profile = os_profile + self.storage_profile = storage_profile + self.network_profile = network_profile + self.diagnostics_profile = diagnostics_profile + self.extension_profile = extension_profile + self.license_type = license_type + + +class VirtualMachineScaleSetVM(Resource): + """Describes a virtual machine scale set virtual machine. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource Id + :vartype id: str + :ivar name: Resource name + :vartype name: str + :ivar type: Resource type + :vartype type: str + :param location: Required. Resource location + :type location: str + :param tags: Resource tags + :type tags: dict[str, str] + :ivar instance_id: The virtual machine instance ID. + :vartype instance_id: str + :ivar sku: The virtual machine SKU. + :vartype sku: ~azure.mgmt.compute.v2018_06_01.models.Sku + :ivar latest_model_applied: Specifies whether the latest model has been + applied to the virtual machine. + :vartype latest_model_applied: bool + :ivar vm_id: Azure VM unique ID. + :vartype vm_id: str + :ivar instance_view: The virtual machine instance view. + :vartype instance_view: + ~azure.mgmt.compute.v2018_06_01.models.VirtualMachineScaleSetVMInstanceView + :param hardware_profile: Specifies the hardware settings for the virtual + machine. + :type hardware_profile: + ~azure.mgmt.compute.v2018_06_01.models.HardwareProfile + :param storage_profile: Specifies the storage settings for the virtual + machine disks. + :type storage_profile: + ~azure.mgmt.compute.v2018_06_01.models.StorageProfile + :param additional_capabilities: Specifies additional capabilities enabled + or disabled on the virtual machine in the scale set. For instance: whether + the virtual machine has the capability to support attaching managed data + disks with UltraSSD_LRS storage account type. + :type additional_capabilities: + ~azure.mgmt.compute.v2018_06_01.models.AdditionalCapabilities + :param os_profile: Specifies the operating system settings for the virtual + machine. + :type os_profile: ~azure.mgmt.compute.v2018_06_01.models.OSProfile + :param network_profile: Specifies the network interfaces of the virtual + machine. + :type network_profile: + ~azure.mgmt.compute.v2018_06_01.models.NetworkProfile + :param diagnostics_profile: Specifies the boot diagnostic settings state. +

    Minimum api-version: 2015-06-15. + :type diagnostics_profile: + ~azure.mgmt.compute.v2018_06_01.models.DiagnosticsProfile + :param availability_set: Specifies information about the availability set + that the virtual machine should be assigned to. Virtual machines specified + in the same availability set are allocated to different nodes to maximize + availability. For more information about availability sets, see [Manage + the availability of virtual + machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-manage-availability?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). +

    For more information on Azure planned maintenance, see [Planned + maintenance for virtual machines in + Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-planned-maintenance?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json) +

    Currently, a VM can only be added to availability set at creation + time. An existing VM cannot be added to an availability set. + :type availability_set: ~azure.mgmt.compute.v2018_06_01.models.SubResource + :ivar provisioning_state: The provisioning state, which only appears in + the response. + :vartype provisioning_state: str + :param license_type: Specifies that the image or disk that is being used + was licensed on-premises. This element is only used for images that + contain the Windows Server operating system.

    Possible values are: +

    Windows_Client

    Windows_Server

    If this element + is included in a request for an update, the value must match the initial + value. This value cannot be updated.

    For more information, see + [Azure Hybrid Use Benefit for Windows + Server](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-hybrid-use-benefit-licensing?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json) +

    Minimum api-version: 2015-06-15 + :type license_type: str + :param plan: Specifies information about the marketplace image used to + create the virtual machine. This element is only used for marketplace + images. Before you can use a marketplace image from an API, you must + enable the image for programmatic use. In the Azure portal, find the + marketplace image that you want to use and then click **Want to deploy + programmatically, Get Started ->**. Enter any required information and + then click **Save**. + :type plan: ~azure.mgmt.compute.v2018_06_01.models.Plan + :ivar resources: The virtual machine child extension resources. + :vartype resources: + list[~azure.mgmt.compute.v2018_06_01.models.VirtualMachineExtension] + :ivar zones: The virtual machine zones. + :vartype zones: list[str] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + 'instance_id': {'readonly': True}, + 'sku': {'readonly': True}, + 'latest_model_applied': {'readonly': True}, + 'vm_id': {'readonly': True}, + 'instance_view': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + 'resources': {'readonly': True}, + 'zones': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'instance_id': {'key': 'instanceId', 'type': 'str'}, + 'sku': {'key': 'sku', 'type': 'Sku'}, + 'latest_model_applied': {'key': 'properties.latestModelApplied', 'type': 'bool'}, + 'vm_id': {'key': 'properties.vmId', 'type': 'str'}, + 'instance_view': {'key': 'properties.instanceView', 'type': 'VirtualMachineScaleSetVMInstanceView'}, + 'hardware_profile': {'key': 'properties.hardwareProfile', 'type': 'HardwareProfile'}, + 'storage_profile': {'key': 'properties.storageProfile', 'type': 'StorageProfile'}, + 'additional_capabilities': {'key': 'properties.additionalCapabilities', 'type': 'AdditionalCapabilities'}, + 'os_profile': {'key': 'properties.osProfile', 'type': 'OSProfile'}, + 'network_profile': {'key': 'properties.networkProfile', 'type': 'NetworkProfile'}, + 'diagnostics_profile': {'key': 'properties.diagnosticsProfile', 'type': 'DiagnosticsProfile'}, + 'availability_set': {'key': 'properties.availabilitySet', 'type': 'SubResource'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'license_type': {'key': 'properties.licenseType', 'type': 'str'}, + 'plan': {'key': 'plan', 'type': 'Plan'}, + 'resources': {'key': 'resources', 'type': '[VirtualMachineExtension]'}, + 'zones': {'key': 'zones', 'type': '[str]'}, + } + + def __init__(self, *, location: str, tags=None, hardware_profile=None, storage_profile=None, additional_capabilities=None, os_profile=None, network_profile=None, diagnostics_profile=None, availability_set=None, license_type: str=None, plan=None, **kwargs) -> None: + super(VirtualMachineScaleSetVM, self).__init__(location=location, tags=tags, **kwargs) + self.instance_id = None + self.sku = None + self.latest_model_applied = None + self.vm_id = None + self.instance_view = None + self.hardware_profile = hardware_profile + self.storage_profile = storage_profile + self.additional_capabilities = additional_capabilities + self.os_profile = os_profile + self.network_profile = network_profile + self.diagnostics_profile = diagnostics_profile + self.availability_set = availability_set + self.provisioning_state = None + self.license_type = license_type + self.plan = plan + self.resources = None + self.zones = None + + +class VirtualMachineScaleSetVMExtensionsSummary(Model): + """Extensions summary for virtual machines of a virtual machine scale set. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar name: The extension name. + :vartype name: str + :ivar statuses_summary: The extensions information. + :vartype statuses_summary: + list[~azure.mgmt.compute.v2018_06_01.models.VirtualMachineStatusCodeCount] + """ + + _validation = { + 'name': {'readonly': True}, + 'statuses_summary': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'statuses_summary': {'key': 'statusesSummary', 'type': '[VirtualMachineStatusCodeCount]'}, + } + + def __init__(self, **kwargs) -> None: + super(VirtualMachineScaleSetVMExtensionsSummary, self).__init__(**kwargs) + self.name = None + self.statuses_summary = None + + +class VirtualMachineScaleSetVMInstanceIDs(Model): + """Specifies a list of virtual machine instance IDs from the VM scale set. + + :param instance_ids: The virtual machine scale set instance ids. Omitting + the virtual machine scale set instance ids will result in the operation + being performed on all virtual machines in the virtual machine scale set. + :type instance_ids: list[str] + """ + + _attribute_map = { + 'instance_ids': {'key': 'instanceIds', 'type': '[str]'}, + } + + def __init__(self, *, instance_ids=None, **kwargs) -> None: + super(VirtualMachineScaleSetVMInstanceIDs, self).__init__(**kwargs) + self.instance_ids = instance_ids + + +class VirtualMachineScaleSetVMInstanceRequiredIDs(Model): + """Specifies a list of virtual machine instance IDs from the VM scale set. + + All required parameters must be populated in order to send to Azure. + + :param instance_ids: Required. The virtual machine scale set instance ids. + :type instance_ids: list[str] + """ + + _validation = { + 'instance_ids': {'required': True}, + } + + _attribute_map = { + 'instance_ids': {'key': 'instanceIds', 'type': '[str]'}, + } + + def __init__(self, *, instance_ids, **kwargs) -> None: + super(VirtualMachineScaleSetVMInstanceRequiredIDs, self).__init__(**kwargs) + self.instance_ids = instance_ids + + +class VirtualMachineScaleSetVMInstanceView(Model): + """The instance view of a virtual machine scale set VM. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :param platform_update_domain: The Update Domain count. + :type platform_update_domain: int + :param platform_fault_domain: The Fault Domain count. + :type platform_fault_domain: int + :param rdp_thumb_print: The Remote desktop certificate thumbprint. + :type rdp_thumb_print: str + :param vm_agent: The VM Agent running on the virtual machine. + :type vm_agent: + ~azure.mgmt.compute.v2018_06_01.models.VirtualMachineAgentInstanceView + :param maintenance_redeploy_status: The Maintenance Operation status on + the virtual machine. + :type maintenance_redeploy_status: + ~azure.mgmt.compute.v2018_06_01.models.MaintenanceRedeployStatus + :param disks: The disks information. + :type disks: list[~azure.mgmt.compute.v2018_06_01.models.DiskInstanceView] + :param extensions: The extensions information. + :type extensions: + list[~azure.mgmt.compute.v2018_06_01.models.VirtualMachineExtensionInstanceView] + :ivar vm_health: The health status for the VM. + :vartype vm_health: + ~azure.mgmt.compute.v2018_06_01.models.VirtualMachineHealthStatus + :param boot_diagnostics: Boot Diagnostics is a debugging feature which + allows you to view Console Output and Screenshot to diagnose VM status. +

    You can easily view the output of your console log.

    + Azure also enables you to see a screenshot of the VM from the hypervisor. + :type boot_diagnostics: + ~azure.mgmt.compute.v2018_06_01.models.BootDiagnosticsInstanceView + :param statuses: The resource status information. + :type statuses: + list[~azure.mgmt.compute.v2018_06_01.models.InstanceViewStatus] + :param placement_group_id: The placement group in which the VM is running. + If the VM is deallocated it will not have a placementGroupId. + :type placement_group_id: str + """ + + _validation = { + 'vm_health': {'readonly': True}, + } + + _attribute_map = { + 'platform_update_domain': {'key': 'platformUpdateDomain', 'type': 'int'}, + 'platform_fault_domain': {'key': 'platformFaultDomain', 'type': 'int'}, + 'rdp_thumb_print': {'key': 'rdpThumbPrint', 'type': 'str'}, + 'vm_agent': {'key': 'vmAgent', 'type': 'VirtualMachineAgentInstanceView'}, + 'maintenance_redeploy_status': {'key': 'maintenanceRedeployStatus', 'type': 'MaintenanceRedeployStatus'}, + 'disks': {'key': 'disks', 'type': '[DiskInstanceView]'}, + 'extensions': {'key': 'extensions', 'type': '[VirtualMachineExtensionInstanceView]'}, + 'vm_health': {'key': 'vmHealth', 'type': 'VirtualMachineHealthStatus'}, + 'boot_diagnostics': {'key': 'bootDiagnostics', 'type': 'BootDiagnosticsInstanceView'}, + 'statuses': {'key': 'statuses', 'type': '[InstanceViewStatus]'}, + 'placement_group_id': {'key': 'placementGroupId', 'type': 'str'}, + } + + def __init__(self, *, platform_update_domain: int=None, platform_fault_domain: int=None, rdp_thumb_print: str=None, vm_agent=None, maintenance_redeploy_status=None, disks=None, extensions=None, boot_diagnostics=None, statuses=None, placement_group_id: str=None, **kwargs) -> None: + super(VirtualMachineScaleSetVMInstanceView, self).__init__(**kwargs) + self.platform_update_domain = platform_update_domain + self.platform_fault_domain = platform_fault_domain + self.rdp_thumb_print = rdp_thumb_print + self.vm_agent = vm_agent + self.maintenance_redeploy_status = maintenance_redeploy_status + self.disks = disks + self.extensions = extensions + self.vm_health = None + self.boot_diagnostics = boot_diagnostics + self.statuses = statuses + self.placement_group_id = placement_group_id + + +class VirtualMachineScaleSetVMProfile(Model): + """Describes a virtual machine scale set virtual machine profile. + + :param os_profile: Specifies the operating system settings for the virtual + machines in the scale set. + :type os_profile: + ~azure.mgmt.compute.v2018_06_01.models.VirtualMachineScaleSetOSProfile + :param storage_profile: Specifies the storage settings for the virtual + machine disks. + :type storage_profile: + ~azure.mgmt.compute.v2018_06_01.models.VirtualMachineScaleSetStorageProfile + :param additional_capabilities: Specifies additional capabilities enabled + or disabled on the virtual machine in the scale set. For instance: whether + the virtual machine has the capability to support attaching managed data + disks with UltraSSD_LRS storage account type. + :type additional_capabilities: + ~azure.mgmt.compute.v2018_06_01.models.AdditionalCapabilities + :param network_profile: Specifies properties of the network interfaces of + the virtual machines in the scale set. + :type network_profile: + ~azure.mgmt.compute.v2018_06_01.models.VirtualMachineScaleSetNetworkProfile + :param diagnostics_profile: Specifies the boot diagnostic settings state. +

    Minimum api-version: 2015-06-15. + :type diagnostics_profile: + ~azure.mgmt.compute.v2018_06_01.models.DiagnosticsProfile + :param extension_profile: Specifies a collection of settings for + extensions installed on virtual machines in the scale set. + :type extension_profile: + ~azure.mgmt.compute.v2018_06_01.models.VirtualMachineScaleSetExtensionProfile + :param license_type: Specifies that the image or disk that is being used + was licensed on-premises. This element is only used for images that + contain the Windows Server operating system.

    Possible values are: +

    Windows_Client

    Windows_Server

    If this element + is included in a request for an update, the value must match the initial + value. This value cannot be updated.

    For more information, see + [Azure Hybrid Use Benefit for Windows + Server](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-hybrid-use-benefit-licensing?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json) +

    Minimum api-version: 2015-06-15 + :type license_type: str + :param priority: Specifies the priority for the virtual machines in the + scale set.

    Minimum api-version: 2017-10-30-preview. Possible + values include: 'Regular', 'Low' + :type priority: str or + ~azure.mgmt.compute.v2018_06_01.models.VirtualMachinePriorityTypes + :param eviction_policy: Specifies the eviction policy for virtual machines + in a low priority scale set.

    Minimum api-version: + 2017-10-30-preview. Possible values include: 'Deallocate', 'Delete' + :type eviction_policy: str or + ~azure.mgmt.compute.v2018_06_01.models.VirtualMachineEvictionPolicyTypes + """ + + _attribute_map = { + 'os_profile': {'key': 'osProfile', 'type': 'VirtualMachineScaleSetOSProfile'}, + 'storage_profile': {'key': 'storageProfile', 'type': 'VirtualMachineScaleSetStorageProfile'}, + 'additional_capabilities': {'key': 'additionalCapabilities', 'type': 'AdditionalCapabilities'}, + 'network_profile': {'key': 'networkProfile', 'type': 'VirtualMachineScaleSetNetworkProfile'}, + 'diagnostics_profile': {'key': 'diagnosticsProfile', 'type': 'DiagnosticsProfile'}, + 'extension_profile': {'key': 'extensionProfile', 'type': 'VirtualMachineScaleSetExtensionProfile'}, + 'license_type': {'key': 'licenseType', 'type': 'str'}, + 'priority': {'key': 'priority', 'type': 'str'}, + 'eviction_policy': {'key': 'evictionPolicy', 'type': 'str'}, + } + + def __init__(self, *, os_profile=None, storage_profile=None, additional_capabilities=None, network_profile=None, diagnostics_profile=None, extension_profile=None, license_type: str=None, priority=None, eviction_policy=None, **kwargs) -> None: + super(VirtualMachineScaleSetVMProfile, self).__init__(**kwargs) + self.os_profile = os_profile + self.storage_profile = storage_profile + self.additional_capabilities = additional_capabilities + self.network_profile = network_profile + self.diagnostics_profile = diagnostics_profile + self.extension_profile = extension_profile + self.license_type = license_type + self.priority = priority + self.eviction_policy = eviction_policy + + +class VirtualMachineSize(Model): + """Describes the properties of a VM size. + + :param name: The name of the virtual machine size. + :type name: str + :param number_of_cores: The number of cores supported by the virtual + machine size. + :type number_of_cores: int + :param os_disk_size_in_mb: The OS disk size, in MB, allowed by the virtual + machine size. + :type os_disk_size_in_mb: int + :param resource_disk_size_in_mb: The resource disk size, in MB, allowed by + the virtual machine size. + :type resource_disk_size_in_mb: int + :param memory_in_mb: The amount of memory, in MB, supported by the virtual + machine size. + :type memory_in_mb: int + :param max_data_disk_count: The maximum number of data disks that can be + attached to the virtual machine size. + :type max_data_disk_count: int + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'number_of_cores': {'key': 'numberOfCores', 'type': 'int'}, + 'os_disk_size_in_mb': {'key': 'osDiskSizeInMB', 'type': 'int'}, + 'resource_disk_size_in_mb': {'key': 'resourceDiskSizeInMB', 'type': 'int'}, + 'memory_in_mb': {'key': 'memoryInMB', 'type': 'int'}, + 'max_data_disk_count': {'key': 'maxDataDiskCount', 'type': 'int'}, + } + + def __init__(self, *, name: str=None, number_of_cores: int=None, os_disk_size_in_mb: int=None, resource_disk_size_in_mb: int=None, memory_in_mb: int=None, max_data_disk_count: int=None, **kwargs) -> None: + super(VirtualMachineSize, self).__init__(**kwargs) + self.name = name + self.number_of_cores = number_of_cores + self.os_disk_size_in_mb = os_disk_size_in_mb + self.resource_disk_size_in_mb = resource_disk_size_in_mb + self.memory_in_mb = memory_in_mb + self.max_data_disk_count = max_data_disk_count + + +class VirtualMachineStatusCodeCount(Model): + """The status code and count of the virtual machine scale set instance view + status summary. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar code: The instance view status code. + :vartype code: str + :ivar count: The number of instances having a particular status code. + :vartype count: int + """ + + _validation = { + 'code': {'readonly': True}, + 'count': {'readonly': True}, + } + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + 'count': {'key': 'count', 'type': 'int'}, + } + + def __init__(self, **kwargs) -> None: + super(VirtualMachineStatusCodeCount, self).__init__(**kwargs) + self.code = None + self.count = None + + +class VirtualMachineUpdate(UpdateResource): + """Describes a Virtual Machine Update. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :param tags: Resource tags + :type tags: dict[str, str] + :param plan: Specifies information about the marketplace image used to + create the virtual machine. This element is only used for marketplace + images. Before you can use a marketplace image from an API, you must + enable the image for programmatic use. In the Azure portal, find the + marketplace image that you want to use and then click **Want to deploy + programmatically, Get Started ->**. Enter any required information and + then click **Save**. + :type plan: ~azure.mgmt.compute.v2018_06_01.models.Plan + :param hardware_profile: Specifies the hardware settings for the virtual + machine. + :type hardware_profile: + ~azure.mgmt.compute.v2018_06_01.models.HardwareProfile + :param storage_profile: Specifies the storage settings for the virtual + machine disks. + :type storage_profile: + ~azure.mgmt.compute.v2018_06_01.models.StorageProfile + :param additional_capabilities: Specifies additional capabilities enabled + or disabled on the virtual machine. + :type additional_capabilities: + ~azure.mgmt.compute.v2018_06_01.models.AdditionalCapabilities + :param os_profile: Specifies the operating system settings for the virtual + machine. + :type os_profile: ~azure.mgmt.compute.v2018_06_01.models.OSProfile + :param network_profile: Specifies the network interfaces of the virtual + machine. + :type network_profile: + ~azure.mgmt.compute.v2018_06_01.models.NetworkProfile + :param diagnostics_profile: Specifies the boot diagnostic settings state. +

    Minimum api-version: 2015-06-15. + :type diagnostics_profile: + ~azure.mgmt.compute.v2018_06_01.models.DiagnosticsProfile + :param availability_set: Specifies information about the availability set + that the virtual machine should be assigned to. Virtual machines specified + in the same availability set are allocated to different nodes to maximize + availability. For more information about availability sets, see [Manage + the availability of virtual + machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-manage-availability?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). +

    For more information on Azure planned maintenance, see [Planned + maintenance for virtual machines in + Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-planned-maintenance?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json) +

    Currently, a VM can only be added to availability set at creation + time. An existing VM cannot be added to an availability set. + :type availability_set: ~azure.mgmt.compute.v2018_06_01.models.SubResource + :param proximity_placement_group: Specifies information about the + proximity placement group that the virtual machine should be assigned to. +

    Minimum api-version: 2018-04-01. + :type proximity_placement_group: + ~azure.mgmt.compute.v2018_06_01.models.SubResource + :ivar provisioning_state: The provisioning state, which only appears in + the response. + :vartype provisioning_state: str + :ivar instance_view: The virtual machine instance view. + :vartype instance_view: + ~azure.mgmt.compute.v2018_06_01.models.VirtualMachineInstanceView + :param license_type: Specifies that the image or disk that is being used + was licensed on-premises. This element is only used for images that + contain the Windows Server operating system.

    Possible values are: +

    Windows_Client

    Windows_Server

    If this element + is included in a request for an update, the value must match the initial + value. This value cannot be updated.

    For more information, see + [Azure Hybrid Use Benefit for Windows + Server](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-hybrid-use-benefit-licensing?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json) +

    Minimum api-version: 2015-06-15 + :type license_type: str + :ivar vm_id: Specifies the VM unique ID which is a 128-bits identifier + that is encoded and stored in all Azure IaaS VMs SMBIOS and can be read + using platform BIOS commands. + :vartype vm_id: str + :param identity: The identity of the virtual machine, if configured. + :type identity: + ~azure.mgmt.compute.v2018_06_01.models.VirtualMachineIdentity + :param zones: The virtual machine zones. + :type zones: list[str] + """ + + _validation = { + 'provisioning_state': {'readonly': True}, + 'instance_view': {'readonly': True}, + 'vm_id': {'readonly': True}, + } + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + 'plan': {'key': 'plan', 'type': 'Plan'}, + 'hardware_profile': {'key': 'properties.hardwareProfile', 'type': 'HardwareProfile'}, + 'storage_profile': {'key': 'properties.storageProfile', 'type': 'StorageProfile'}, + 'additional_capabilities': {'key': 'properties.additionalCapabilities', 'type': 'AdditionalCapabilities'}, + 'os_profile': {'key': 'properties.osProfile', 'type': 'OSProfile'}, + 'network_profile': {'key': 'properties.networkProfile', 'type': 'NetworkProfile'}, + 'diagnostics_profile': {'key': 'properties.diagnosticsProfile', 'type': 'DiagnosticsProfile'}, + 'availability_set': {'key': 'properties.availabilitySet', 'type': 'SubResource'}, + 'proximity_placement_group': {'key': 'properties.proximityPlacementGroup', 'type': 'SubResource'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'instance_view': {'key': 'properties.instanceView', 'type': 'VirtualMachineInstanceView'}, + 'license_type': {'key': 'properties.licenseType', 'type': 'str'}, + 'vm_id': {'key': 'properties.vmId', 'type': 'str'}, + 'identity': {'key': 'identity', 'type': 'VirtualMachineIdentity'}, + 'zones': {'key': 'zones', 'type': '[str]'}, + } + + def __init__(self, *, tags=None, plan=None, hardware_profile=None, storage_profile=None, additional_capabilities=None, os_profile=None, network_profile=None, diagnostics_profile=None, availability_set=None, proximity_placement_group=None, license_type: str=None, identity=None, zones=None, **kwargs) -> None: + super(VirtualMachineUpdate, self).__init__(tags=tags, **kwargs) + self.plan = plan + self.hardware_profile = hardware_profile + self.storage_profile = storage_profile + self.additional_capabilities = additional_capabilities + self.os_profile = os_profile + self.network_profile = network_profile + self.diagnostics_profile = diagnostics_profile + self.availability_set = availability_set + self.proximity_placement_group = proximity_placement_group + self.provisioning_state = None + self.instance_view = None + self.license_type = license_type + self.vm_id = None + self.identity = identity + self.zones = zones + + +class WindowsConfiguration(Model): + """Specifies Windows operating system settings on the virtual machine. + + :param provision_vm_agent: Indicates whether virtual machine agent should + be provisioned on the virtual machine.

    When this property is not + specified in the request body, default behavior is to set it to true. + This will ensure that VM Agent is installed on the VM so that extensions + can be added to the VM later. + :type provision_vm_agent: bool + :param enable_automatic_updates: Indicates whether virtual machine is + enabled for automatic updates. + :type enable_automatic_updates: bool + :param time_zone: Specifies the time zone of the virtual machine. e.g. + "Pacific Standard Time" + :type time_zone: str + :param additional_unattend_content: Specifies additional base-64 encoded + XML formatted information that can be included in the Unattend.xml file, + which is used by Windows Setup. + :type additional_unattend_content: + list[~azure.mgmt.compute.v2018_06_01.models.AdditionalUnattendContent] + :param win_rm: Specifies the Windows Remote Management listeners. This + enables remote Windows PowerShell. + :type win_rm: ~azure.mgmt.compute.v2018_06_01.models.WinRMConfiguration + """ + + _attribute_map = { + 'provision_vm_agent': {'key': 'provisionVMAgent', 'type': 'bool'}, + 'enable_automatic_updates': {'key': 'enableAutomaticUpdates', 'type': 'bool'}, + 'time_zone': {'key': 'timeZone', 'type': 'str'}, + 'additional_unattend_content': {'key': 'additionalUnattendContent', 'type': '[AdditionalUnattendContent]'}, + 'win_rm': {'key': 'winRM', 'type': 'WinRMConfiguration'}, + } + + def __init__(self, *, provision_vm_agent: bool=None, enable_automatic_updates: bool=None, time_zone: str=None, additional_unattend_content=None, win_rm=None, **kwargs) -> None: + super(WindowsConfiguration, self).__init__(**kwargs) + self.provision_vm_agent = provision_vm_agent + self.enable_automatic_updates = enable_automatic_updates + self.time_zone = time_zone + self.additional_unattend_content = additional_unattend_content + self.win_rm = win_rm + + +class WinRMConfiguration(Model): + """Describes Windows Remote Management configuration of the VM. + + :param listeners: The list of Windows Remote Management listeners + :type listeners: + list[~azure.mgmt.compute.v2018_06_01.models.WinRMListener] + """ + + _attribute_map = { + 'listeners': {'key': 'listeners', 'type': '[WinRMListener]'}, + } + + def __init__(self, *, listeners=None, **kwargs) -> None: + super(WinRMConfiguration, self).__init__(**kwargs) + self.listeners = listeners + + +class WinRMListener(Model): + """Describes Protocol and thumbprint of Windows Remote Management listener. + + :param protocol: Specifies the protocol of listener.

    Possible + values are:
    **http**

    **https**. Possible values include: + 'Http', 'Https' + :type protocol: str or + ~azure.mgmt.compute.v2018_06_01.models.ProtocolTypes + :param certificate_url: This is the URL of a certificate that has been + uploaded to Key Vault as a secret. For adding a secret to the Key Vault, + see [Add a key or secret to the key + vault](https://docs.microsoft.com/azure/key-vault/key-vault-get-started/#add). + In this case, your certificate needs to be It is the Base64 encoding of + the following JSON Object which is encoded in UTF-8:

    {
    + "data":"",
    "dataType":"pfx",
    + "password":""
    } + :type certificate_url: str + """ + + _attribute_map = { + 'protocol': {'key': 'protocol', 'type': 'ProtocolTypes'}, + 'certificate_url': {'key': 'certificateUrl', 'type': 'str'}, + } + + def __init__(self, *, protocol=None, certificate_url: str=None, **kwargs) -> None: + super(WinRMListener, self).__init__(**kwargs) + self.protocol = protocol + self.certificate_url = certificate_url diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/_paged_models.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/_paged_models.py new file mode 100644 index 000000000000..871abfe631dd --- /dev/null +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/_paged_models.py @@ -0,0 +1,248 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.paging import Paged + + +class ComputeOperationValuePaged(Paged): + """ + A paging container for iterating over a list of :class:`ComputeOperationValue ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[ComputeOperationValue]'} + } + + def __init__(self, *args, **kwargs): + + super(ComputeOperationValuePaged, self).__init__(*args, **kwargs) +class AvailabilitySetPaged(Paged): + """ + A paging container for iterating over a list of :class:`AvailabilitySet ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[AvailabilitySet]'} + } + + def __init__(self, *args, **kwargs): + + super(AvailabilitySetPaged, self).__init__(*args, **kwargs) +class VirtualMachineSizePaged(Paged): + """ + A paging container for iterating over a list of :class:`VirtualMachineSize ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[VirtualMachineSize]'} + } + + def __init__(self, *args, **kwargs): + + super(VirtualMachineSizePaged, self).__init__(*args, **kwargs) +class ProximityPlacementGroupPaged(Paged): + """ + A paging container for iterating over a list of :class:`ProximityPlacementGroup ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[ProximityPlacementGroup]'} + } + + def __init__(self, *args, **kwargs): + + super(ProximityPlacementGroupPaged, self).__init__(*args, **kwargs) +class UsagePaged(Paged): + """ + A paging container for iterating over a list of :class:`Usage ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[Usage]'} + } + + def __init__(self, *args, **kwargs): + + super(UsagePaged, self).__init__(*args, **kwargs) +class VirtualMachinePaged(Paged): + """ + A paging container for iterating over a list of :class:`VirtualMachine ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[VirtualMachine]'} + } + + def __init__(self, *args, **kwargs): + + super(VirtualMachinePaged, self).__init__(*args, **kwargs) +class ImagePaged(Paged): + """ + A paging container for iterating over a list of :class:`Image ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[Image]'} + } + + def __init__(self, *args, **kwargs): + + super(ImagePaged, self).__init__(*args, **kwargs) +class VirtualMachineScaleSetPaged(Paged): + """ + A paging container for iterating over a list of :class:`VirtualMachineScaleSet ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[VirtualMachineScaleSet]'} + } + + def __init__(self, *args, **kwargs): + + super(VirtualMachineScaleSetPaged, self).__init__(*args, **kwargs) +class VirtualMachineScaleSetSkuPaged(Paged): + """ + A paging container for iterating over a list of :class:`VirtualMachineScaleSetSku ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[VirtualMachineScaleSetSku]'} + } + + def __init__(self, *args, **kwargs): + + super(VirtualMachineScaleSetSkuPaged, self).__init__(*args, **kwargs) +class UpgradeOperationHistoricalStatusInfoPaged(Paged): + """ + A paging container for iterating over a list of :class:`UpgradeOperationHistoricalStatusInfo ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[UpgradeOperationHistoricalStatusInfo]'} + } + + def __init__(self, *args, **kwargs): + + super(UpgradeOperationHistoricalStatusInfoPaged, self).__init__(*args, **kwargs) +class VirtualMachineScaleSetExtensionPaged(Paged): + """ + A paging container for iterating over a list of :class:`VirtualMachineScaleSetExtension ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[VirtualMachineScaleSetExtension]'} + } + + def __init__(self, *args, **kwargs): + + super(VirtualMachineScaleSetExtensionPaged, self).__init__(*args, **kwargs) +class VirtualMachineScaleSetVMPaged(Paged): + """ + A paging container for iterating over a list of :class:`VirtualMachineScaleSetVM ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[VirtualMachineScaleSetVM]'} + } + + def __init__(self, *args, **kwargs): + + super(VirtualMachineScaleSetVMPaged, self).__init__(*args, **kwargs) +class RunCommandDocumentBasePaged(Paged): + """ + A paging container for iterating over a list of :class:`RunCommandDocumentBase ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[RunCommandDocumentBase]'} + } + + def __init__(self, *args, **kwargs): + + super(RunCommandDocumentBasePaged, self).__init__(*args, **kwargs) +class GalleryPaged(Paged): + """ + A paging container for iterating over a list of :class:`Gallery ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[Gallery]'} + } + + def __init__(self, *args, **kwargs): + + super(GalleryPaged, self).__init__(*args, **kwargs) +class GalleryImagePaged(Paged): + """ + A paging container for iterating over a list of :class:`GalleryImage ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[GalleryImage]'} + } + + def __init__(self, *args, **kwargs): + + super(GalleryImagePaged, self).__init__(*args, **kwargs) +class GalleryImageVersionPaged(Paged): + """ + A paging container for iterating over a list of :class:`GalleryImageVersion ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[GalleryImageVersion]'} + } + + def __init__(self, *args, **kwargs): + + super(GalleryImageVersionPaged, self).__init__(*args, **kwargs) +class DiskPaged(Paged): + """ + A paging container for iterating over a list of :class:`Disk ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[Disk]'} + } + + def __init__(self, *args, **kwargs): + + super(DiskPaged, self).__init__(*args, **kwargs) +class SnapshotPaged(Paged): + """ + A paging container for iterating over a list of :class:`Snapshot ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[Snapshot]'} + } + + def __init__(self, *args, **kwargs): + + super(SnapshotPaged, self).__init__(*args, **kwargs) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/access_uri.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/access_uri.py deleted file mode 100644 index fec7ad1244ab..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/access_uri.py +++ /dev/null @@ -1,35 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class AccessUri(Model): - """A disk access SAS uri. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar access_sas: A SAS uri for accessing a disk. - :vartype access_sas: str - """ - - _validation = { - 'access_sas': {'readonly': True}, - } - - _attribute_map = { - 'access_sas': {'key': 'accessSAS', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(AccessUri, self).__init__(**kwargs) - self.access_sas = None diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/access_uri_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/access_uri_py3.py deleted file mode 100644 index c13208a20d8d..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/access_uri_py3.py +++ /dev/null @@ -1,35 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class AccessUri(Model): - """A disk access SAS uri. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar access_sas: A SAS uri for accessing a disk. - :vartype access_sas: str - """ - - _validation = { - 'access_sas': {'readonly': True}, - } - - _attribute_map = { - 'access_sas': {'key': 'accessSAS', 'type': 'str'}, - } - - def __init__(self, **kwargs) -> None: - super(AccessUri, self).__init__(**kwargs) - self.access_sas = None diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/additional_capabilities.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/additional_capabilities.py deleted file mode 100644 index 18ff109310c8..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/additional_capabilities.py +++ /dev/null @@ -1,33 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class AdditionalCapabilities(Model): - """Enables or disables a capability on the virtual machine or virtual machine - scale set. - - :param ultra_ssd_enabled: The flag that enables or disables a capability - to have one or more managed data disks with UltraSSD_LRS storage account - type on the VM or VMSS. Managed disks with storage account type - UltraSSD_LRS can be added to a virtual machine or virtual machine scale - set only if this property is enabled. - :type ultra_ssd_enabled: bool - """ - - _attribute_map = { - 'ultra_ssd_enabled': {'key': 'ultraSSDEnabled', 'type': 'bool'}, - } - - def __init__(self, **kwargs): - super(AdditionalCapabilities, self).__init__(**kwargs) - self.ultra_ssd_enabled = kwargs.get('ultra_ssd_enabled', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/additional_capabilities_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/additional_capabilities_py3.py deleted file mode 100644 index db83a0a4eacb..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/additional_capabilities_py3.py +++ /dev/null @@ -1,33 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class AdditionalCapabilities(Model): - """Enables or disables a capability on the virtual machine or virtual machine - scale set. - - :param ultra_ssd_enabled: The flag that enables or disables a capability - to have one or more managed data disks with UltraSSD_LRS storage account - type on the VM or VMSS. Managed disks with storage account type - UltraSSD_LRS can be added to a virtual machine or virtual machine scale - set only if this property is enabled. - :type ultra_ssd_enabled: bool - """ - - _attribute_map = { - 'ultra_ssd_enabled': {'key': 'ultraSSDEnabled', 'type': 'bool'}, - } - - def __init__(self, *, ultra_ssd_enabled: bool=None, **kwargs) -> None: - super(AdditionalCapabilities, self).__init__(**kwargs) - self.ultra_ssd_enabled = ultra_ssd_enabled diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/additional_unattend_content.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/additional_unattend_content.py deleted file mode 100644 index 7a2b04fa830e..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/additional_unattend_content.py +++ /dev/null @@ -1,52 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class AdditionalUnattendContent(Model): - """Specifies additional XML formatted information that can be included in the - Unattend.xml file, which is used by Windows Setup. Contents are defined by - setting name, component name, and the pass in which the content is applied. - - :param pass_name: The pass name. Currently, the only allowable value is - OobeSystem. Possible values include: 'OobeSystem' - :type pass_name: str or ~azure.mgmt.compute.v2018_06_01.models.PassNames - :param component_name: The component name. Currently, the only allowable - value is Microsoft-Windows-Shell-Setup. Possible values include: - 'Microsoft-Windows-Shell-Setup' - :type component_name: str or - ~azure.mgmt.compute.v2018_06_01.models.ComponentNames - :param setting_name: Specifies the name of the setting to which the - content applies. Possible values are: FirstLogonCommands and AutoLogon. - Possible values include: 'AutoLogon', 'FirstLogonCommands' - :type setting_name: str or - ~azure.mgmt.compute.v2018_06_01.models.SettingNames - :param content: Specifies the XML formatted content that is added to the - unattend.xml file for the specified path and component. The XML must be - less than 4KB and must include the root element for the setting or feature - that is being inserted. - :type content: str - """ - - _attribute_map = { - 'pass_name': {'key': 'passName', 'type': 'PassNames'}, - 'component_name': {'key': 'componentName', 'type': 'ComponentNames'}, - 'setting_name': {'key': 'settingName', 'type': 'SettingNames'}, - 'content': {'key': 'content', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(AdditionalUnattendContent, self).__init__(**kwargs) - self.pass_name = kwargs.get('pass_name', None) - self.component_name = kwargs.get('component_name', None) - self.setting_name = kwargs.get('setting_name', None) - self.content = kwargs.get('content', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/additional_unattend_content_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/additional_unattend_content_py3.py deleted file mode 100644 index 4ca484f69dac..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/additional_unattend_content_py3.py +++ /dev/null @@ -1,52 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class AdditionalUnattendContent(Model): - """Specifies additional XML formatted information that can be included in the - Unattend.xml file, which is used by Windows Setup. Contents are defined by - setting name, component name, and the pass in which the content is applied. - - :param pass_name: The pass name. Currently, the only allowable value is - OobeSystem. Possible values include: 'OobeSystem' - :type pass_name: str or ~azure.mgmt.compute.v2018_06_01.models.PassNames - :param component_name: The component name. Currently, the only allowable - value is Microsoft-Windows-Shell-Setup. Possible values include: - 'Microsoft-Windows-Shell-Setup' - :type component_name: str or - ~azure.mgmt.compute.v2018_06_01.models.ComponentNames - :param setting_name: Specifies the name of the setting to which the - content applies. Possible values are: FirstLogonCommands and AutoLogon. - Possible values include: 'AutoLogon', 'FirstLogonCommands' - :type setting_name: str or - ~azure.mgmt.compute.v2018_06_01.models.SettingNames - :param content: Specifies the XML formatted content that is added to the - unattend.xml file for the specified path and component. The XML must be - less than 4KB and must include the root element for the setting or feature - that is being inserted. - :type content: str - """ - - _attribute_map = { - 'pass_name': {'key': 'passName', 'type': 'PassNames'}, - 'component_name': {'key': 'componentName', 'type': 'ComponentNames'}, - 'setting_name': {'key': 'settingName', 'type': 'SettingNames'}, - 'content': {'key': 'content', 'type': 'str'}, - } - - def __init__(self, *, pass_name=None, component_name=None, setting_name=None, content: str=None, **kwargs) -> None: - super(AdditionalUnattendContent, self).__init__(**kwargs) - self.pass_name = pass_name - self.component_name = component_name - self.setting_name = setting_name - self.content = content diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/api_entity_reference.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/api_entity_reference.py deleted file mode 100644 index d43730af3659..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/api_entity_reference.py +++ /dev/null @@ -1,29 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ApiEntityReference(Model): - """The API entity reference. - - :param id: The ARM resource id in the form of - /subscriptions/{SubscriptionId}/resourceGroups/{ResourceGroupName}/... - :type id: str - """ - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ApiEntityReference, self).__init__(**kwargs) - self.id = kwargs.get('id', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/api_entity_reference_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/api_entity_reference_py3.py deleted file mode 100644 index d42dfb1a5fd0..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/api_entity_reference_py3.py +++ /dev/null @@ -1,29 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ApiEntityReference(Model): - """The API entity reference. - - :param id: The ARM resource id in the form of - /subscriptions/{SubscriptionId}/resourceGroups/{ResourceGroupName}/... - :type id: str - """ - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - } - - def __init__(self, *, id: str=None, **kwargs) -> None: - super(ApiEntityReference, self).__init__(**kwargs) - self.id = id diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/api_error.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/api_error.py deleted file mode 100644 index 8771ac2086c0..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/api_error.py +++ /dev/null @@ -1,44 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ApiError(Model): - """Api error. - - :param details: The Api error details - :type details: list[~azure.mgmt.compute.v2018_06_01.models.ApiErrorBase] - :param innererror: The Api inner error - :type innererror: ~azure.mgmt.compute.v2018_06_01.models.InnerError - :param code: The error code. - :type code: str - :param target: The target of the particular error. - :type target: str - :param message: The error message. - :type message: str - """ - - _attribute_map = { - 'details': {'key': 'details', 'type': '[ApiErrorBase]'}, - 'innererror': {'key': 'innererror', 'type': 'InnerError'}, - 'code': {'key': 'code', 'type': 'str'}, - 'target': {'key': 'target', 'type': 'str'}, - 'message': {'key': 'message', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ApiError, self).__init__(**kwargs) - self.details = kwargs.get('details', None) - self.innererror = kwargs.get('innererror', None) - self.code = kwargs.get('code', None) - self.target = kwargs.get('target', None) - self.message = kwargs.get('message', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/api_error_base.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/api_error_base.py deleted file mode 100644 index 655c08638905..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/api_error_base.py +++ /dev/null @@ -1,36 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ApiErrorBase(Model): - """Api error base. - - :param code: The error code. - :type code: str - :param target: The target of the particular error. - :type target: str - :param message: The error message. - :type message: str - """ - - _attribute_map = { - 'code': {'key': 'code', 'type': 'str'}, - 'target': {'key': 'target', 'type': 'str'}, - 'message': {'key': 'message', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ApiErrorBase, self).__init__(**kwargs) - self.code = kwargs.get('code', None) - self.target = kwargs.get('target', None) - self.message = kwargs.get('message', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/api_error_base_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/api_error_base_py3.py deleted file mode 100644 index 5ba95aa0283e..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/api_error_base_py3.py +++ /dev/null @@ -1,36 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ApiErrorBase(Model): - """Api error base. - - :param code: The error code. - :type code: str - :param target: The target of the particular error. - :type target: str - :param message: The error message. - :type message: str - """ - - _attribute_map = { - 'code': {'key': 'code', 'type': 'str'}, - 'target': {'key': 'target', 'type': 'str'}, - 'message': {'key': 'message', 'type': 'str'}, - } - - def __init__(self, *, code: str=None, target: str=None, message: str=None, **kwargs) -> None: - super(ApiErrorBase, self).__init__(**kwargs) - self.code = code - self.target = target - self.message = message diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/api_error_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/api_error_py3.py deleted file mode 100644 index c09870827f5f..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/api_error_py3.py +++ /dev/null @@ -1,44 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ApiError(Model): - """Api error. - - :param details: The Api error details - :type details: list[~azure.mgmt.compute.v2018_06_01.models.ApiErrorBase] - :param innererror: The Api inner error - :type innererror: ~azure.mgmt.compute.v2018_06_01.models.InnerError - :param code: The error code. - :type code: str - :param target: The target of the particular error. - :type target: str - :param message: The error message. - :type message: str - """ - - _attribute_map = { - 'details': {'key': 'details', 'type': '[ApiErrorBase]'}, - 'innererror': {'key': 'innererror', 'type': 'InnerError'}, - 'code': {'key': 'code', 'type': 'str'}, - 'target': {'key': 'target', 'type': 'str'}, - 'message': {'key': 'message', 'type': 'str'}, - } - - def __init__(self, *, details=None, innererror=None, code: str=None, target: str=None, message: str=None, **kwargs) -> None: - super(ApiError, self).__init__(**kwargs) - self.details = details - self.innererror = innererror - self.code = code - self.target = target - self.message = message diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/auto_os_upgrade_policy.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/auto_os_upgrade_policy.py deleted file mode 100644 index 2c74af408892..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/auto_os_upgrade_policy.py +++ /dev/null @@ -1,29 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class AutoOSUpgradePolicy(Model): - """The configuration parameters used for performing automatic OS upgrade. - - :param disable_auto_rollback: Whether OS image rollback feature should be - disabled. Default value is false. - :type disable_auto_rollback: bool - """ - - _attribute_map = { - 'disable_auto_rollback': {'key': 'disableAutoRollback', 'type': 'bool'}, - } - - def __init__(self, **kwargs): - super(AutoOSUpgradePolicy, self).__init__(**kwargs) - self.disable_auto_rollback = kwargs.get('disable_auto_rollback', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/auto_os_upgrade_policy_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/auto_os_upgrade_policy_py3.py deleted file mode 100644 index 3e3e751838a8..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/auto_os_upgrade_policy_py3.py +++ /dev/null @@ -1,29 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class AutoOSUpgradePolicy(Model): - """The configuration parameters used for performing automatic OS upgrade. - - :param disable_auto_rollback: Whether OS image rollback feature should be - disabled. Default value is false. - :type disable_auto_rollback: bool - """ - - _attribute_map = { - 'disable_auto_rollback': {'key': 'disableAutoRollback', 'type': 'bool'}, - } - - def __init__(self, *, disable_auto_rollback: bool=None, **kwargs) -> None: - super(AutoOSUpgradePolicy, self).__init__(**kwargs) - self.disable_auto_rollback = disable_auto_rollback diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/availability_set.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/availability_set.py deleted file mode 100644 index 9a6009bb4523..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/availability_set.py +++ /dev/null @@ -1,95 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource import Resource - - -class AvailabilitySet(Resource): - """Specifies information about the availability set that the virtual machine - should be assigned to. Virtual machines specified in the same availability - set are allocated to different nodes to maximize availability. For more - information about availability sets, see [Manage the availability of - virtual - machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-manage-availability?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). -

    For more information on Azure planned maintenance, see [Planned - maintenance for virtual machines in - Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-planned-maintenance?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json) -

    Currently, a VM can only be added to availability set at creation - time. An existing VM cannot be added to an availability set. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource Id - :vartype id: str - :ivar name: Resource name - :vartype name: str - :ivar type: Resource type - :vartype type: str - :param location: Required. Resource location - :type location: str - :param tags: Resource tags - :type tags: dict[str, str] - :param platform_update_domain_count: Update Domain count. - :type platform_update_domain_count: int - :param platform_fault_domain_count: Fault Domain count. - :type platform_fault_domain_count: int - :param virtual_machines: A list of references to all virtual machines in - the availability set. - :type virtual_machines: - list[~azure.mgmt.compute.v2018_06_01.models.SubResource] - :param proximity_placement_group: Specifies information about the - proximity placement group that the availability set should be assigned to. -

    Minimum api-version: 2018-04-01. - :type proximity_placement_group: - ~azure.mgmt.compute.v2018_06_01.models.SubResource - :ivar statuses: The resource status information. - :vartype statuses: - list[~azure.mgmt.compute.v2018_06_01.models.InstanceViewStatus] - :param sku: Sku of the availability set, only name is required to be set. - See AvailabilitySetSkuTypes for possible set of values. Use 'Aligned' for - virtual machines with managed disks and 'Classic' for virtual machines - with unmanaged disks. Default value is 'Classic'. - :type sku: ~azure.mgmt.compute.v2018_06_01.models.Sku - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - 'statuses': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'platform_update_domain_count': {'key': 'properties.platformUpdateDomainCount', 'type': 'int'}, - 'platform_fault_domain_count': {'key': 'properties.platformFaultDomainCount', 'type': 'int'}, - 'virtual_machines': {'key': 'properties.virtualMachines', 'type': '[SubResource]'}, - 'proximity_placement_group': {'key': 'properties.proximityPlacementGroup', 'type': 'SubResource'}, - 'statuses': {'key': 'properties.statuses', 'type': '[InstanceViewStatus]'}, - 'sku': {'key': 'sku', 'type': 'Sku'}, - } - - def __init__(self, **kwargs): - super(AvailabilitySet, self).__init__(**kwargs) - self.platform_update_domain_count = kwargs.get('platform_update_domain_count', None) - self.platform_fault_domain_count = kwargs.get('platform_fault_domain_count', None) - self.virtual_machines = kwargs.get('virtual_machines', None) - self.proximity_placement_group = kwargs.get('proximity_placement_group', None) - self.statuses = None - self.sku = kwargs.get('sku', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/availability_set_paged.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/availability_set_paged.py deleted file mode 100644 index e321ccaf5b29..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/availability_set_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class AvailabilitySetPaged(Paged): - """ - A paging container for iterating over a list of :class:`AvailabilitySet ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[AvailabilitySet]'} - } - - def __init__(self, *args, **kwargs): - - super(AvailabilitySetPaged, self).__init__(*args, **kwargs) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/availability_set_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/availability_set_py3.py deleted file mode 100644 index 72011d97ac6a..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/availability_set_py3.py +++ /dev/null @@ -1,95 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource_py3 import Resource - - -class AvailabilitySet(Resource): - """Specifies information about the availability set that the virtual machine - should be assigned to. Virtual machines specified in the same availability - set are allocated to different nodes to maximize availability. For more - information about availability sets, see [Manage the availability of - virtual - machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-manage-availability?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). -

    For more information on Azure planned maintenance, see [Planned - maintenance for virtual machines in - Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-planned-maintenance?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json) -

    Currently, a VM can only be added to availability set at creation - time. An existing VM cannot be added to an availability set. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource Id - :vartype id: str - :ivar name: Resource name - :vartype name: str - :ivar type: Resource type - :vartype type: str - :param location: Required. Resource location - :type location: str - :param tags: Resource tags - :type tags: dict[str, str] - :param platform_update_domain_count: Update Domain count. - :type platform_update_domain_count: int - :param platform_fault_domain_count: Fault Domain count. - :type platform_fault_domain_count: int - :param virtual_machines: A list of references to all virtual machines in - the availability set. - :type virtual_machines: - list[~azure.mgmt.compute.v2018_06_01.models.SubResource] - :param proximity_placement_group: Specifies information about the - proximity placement group that the availability set should be assigned to. -

    Minimum api-version: 2018-04-01. - :type proximity_placement_group: - ~azure.mgmt.compute.v2018_06_01.models.SubResource - :ivar statuses: The resource status information. - :vartype statuses: - list[~azure.mgmt.compute.v2018_06_01.models.InstanceViewStatus] - :param sku: Sku of the availability set, only name is required to be set. - See AvailabilitySetSkuTypes for possible set of values. Use 'Aligned' for - virtual machines with managed disks and 'Classic' for virtual machines - with unmanaged disks. Default value is 'Classic'. - :type sku: ~azure.mgmt.compute.v2018_06_01.models.Sku - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - 'statuses': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'platform_update_domain_count': {'key': 'properties.platformUpdateDomainCount', 'type': 'int'}, - 'platform_fault_domain_count': {'key': 'properties.platformFaultDomainCount', 'type': 'int'}, - 'virtual_machines': {'key': 'properties.virtualMachines', 'type': '[SubResource]'}, - 'proximity_placement_group': {'key': 'properties.proximityPlacementGroup', 'type': 'SubResource'}, - 'statuses': {'key': 'properties.statuses', 'type': '[InstanceViewStatus]'}, - 'sku': {'key': 'sku', 'type': 'Sku'}, - } - - def __init__(self, *, location: str, tags=None, platform_update_domain_count: int=None, platform_fault_domain_count: int=None, virtual_machines=None, proximity_placement_group=None, sku=None, **kwargs) -> None: - super(AvailabilitySet, self).__init__(location=location, tags=tags, **kwargs) - self.platform_update_domain_count = platform_update_domain_count - self.platform_fault_domain_count = platform_fault_domain_count - self.virtual_machines = virtual_machines - self.proximity_placement_group = proximity_placement_group - self.statuses = None - self.sku = sku diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/availability_set_update.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/availability_set_update.py deleted file mode 100644 index 8e848a51b51e..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/availability_set_update.py +++ /dev/null @@ -1,65 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .update_resource import UpdateResource - - -class AvailabilitySetUpdate(UpdateResource): - """Specifies information about the availability set that the virtual machine - should be assigned to. Only tags may be updated. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :param tags: Resource tags - :type tags: dict[str, str] - :param platform_update_domain_count: Update Domain count. - :type platform_update_domain_count: int - :param platform_fault_domain_count: Fault Domain count. - :type platform_fault_domain_count: int - :param virtual_machines: A list of references to all virtual machines in - the availability set. - :type virtual_machines: - list[~azure.mgmt.compute.v2018_06_01.models.SubResource] - :param proximity_placement_group: Specifies information about the - proximity placement group that the availability set should be assigned to. -

    Minimum api-version: 2018-04-01. - :type proximity_placement_group: - ~azure.mgmt.compute.v2018_06_01.models.SubResource - :ivar statuses: The resource status information. - :vartype statuses: - list[~azure.mgmt.compute.v2018_06_01.models.InstanceViewStatus] - :param sku: Sku of the availability set - :type sku: ~azure.mgmt.compute.v2018_06_01.models.Sku - """ - - _validation = { - 'statuses': {'readonly': True}, - } - - _attribute_map = { - 'tags': {'key': 'tags', 'type': '{str}'}, - 'platform_update_domain_count': {'key': 'properties.platformUpdateDomainCount', 'type': 'int'}, - 'platform_fault_domain_count': {'key': 'properties.platformFaultDomainCount', 'type': 'int'}, - 'virtual_machines': {'key': 'properties.virtualMachines', 'type': '[SubResource]'}, - 'proximity_placement_group': {'key': 'properties.proximityPlacementGroup', 'type': 'SubResource'}, - 'statuses': {'key': 'properties.statuses', 'type': '[InstanceViewStatus]'}, - 'sku': {'key': 'sku', 'type': 'Sku'}, - } - - def __init__(self, **kwargs): - super(AvailabilitySetUpdate, self).__init__(**kwargs) - self.platform_update_domain_count = kwargs.get('platform_update_domain_count', None) - self.platform_fault_domain_count = kwargs.get('platform_fault_domain_count', None) - self.virtual_machines = kwargs.get('virtual_machines', None) - self.proximity_placement_group = kwargs.get('proximity_placement_group', None) - self.statuses = None - self.sku = kwargs.get('sku', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/availability_set_update_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/availability_set_update_py3.py deleted file mode 100644 index fedf951de009..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/availability_set_update_py3.py +++ /dev/null @@ -1,65 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .update_resource_py3 import UpdateResource - - -class AvailabilitySetUpdate(UpdateResource): - """Specifies information about the availability set that the virtual machine - should be assigned to. Only tags may be updated. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :param tags: Resource tags - :type tags: dict[str, str] - :param platform_update_domain_count: Update Domain count. - :type platform_update_domain_count: int - :param platform_fault_domain_count: Fault Domain count. - :type platform_fault_domain_count: int - :param virtual_machines: A list of references to all virtual machines in - the availability set. - :type virtual_machines: - list[~azure.mgmt.compute.v2018_06_01.models.SubResource] - :param proximity_placement_group: Specifies information about the - proximity placement group that the availability set should be assigned to. -

    Minimum api-version: 2018-04-01. - :type proximity_placement_group: - ~azure.mgmt.compute.v2018_06_01.models.SubResource - :ivar statuses: The resource status information. - :vartype statuses: - list[~azure.mgmt.compute.v2018_06_01.models.InstanceViewStatus] - :param sku: Sku of the availability set - :type sku: ~azure.mgmt.compute.v2018_06_01.models.Sku - """ - - _validation = { - 'statuses': {'readonly': True}, - } - - _attribute_map = { - 'tags': {'key': 'tags', 'type': '{str}'}, - 'platform_update_domain_count': {'key': 'properties.platformUpdateDomainCount', 'type': 'int'}, - 'platform_fault_domain_count': {'key': 'properties.platformFaultDomainCount', 'type': 'int'}, - 'virtual_machines': {'key': 'properties.virtualMachines', 'type': '[SubResource]'}, - 'proximity_placement_group': {'key': 'properties.proximityPlacementGroup', 'type': 'SubResource'}, - 'statuses': {'key': 'properties.statuses', 'type': '[InstanceViewStatus]'}, - 'sku': {'key': 'sku', 'type': 'Sku'}, - } - - def __init__(self, *, tags=None, platform_update_domain_count: int=None, platform_fault_domain_count: int=None, virtual_machines=None, proximity_placement_group=None, sku=None, **kwargs) -> None: - super(AvailabilitySetUpdate, self).__init__(tags=tags, **kwargs) - self.platform_update_domain_count = platform_update_domain_count - self.platform_fault_domain_count = platform_fault_domain_count - self.virtual_machines = virtual_machines - self.proximity_placement_group = proximity_placement_group - self.statuses = None - self.sku = sku diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/boot_diagnostics.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/boot_diagnostics.py deleted file mode 100644 index 4a1f77c4d7d0..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/boot_diagnostics.py +++ /dev/null @@ -1,37 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class BootDiagnostics(Model): - """Boot Diagnostics is a debugging feature which allows you to view Console - Output and Screenshot to diagnose VM status.

    You can easily view - the output of your console log.

    Azure also enables you to see a - screenshot of the VM from the hypervisor. - - :param enabled: Whether boot diagnostics should be enabled on the Virtual - Machine. - :type enabled: bool - :param storage_uri: Uri of the storage account to use for placing the - console output and screenshot. - :type storage_uri: str - """ - - _attribute_map = { - 'enabled': {'key': 'enabled', 'type': 'bool'}, - 'storage_uri': {'key': 'storageUri', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(BootDiagnostics, self).__init__(**kwargs) - self.enabled = kwargs.get('enabled', None) - self.storage_uri = kwargs.get('storage_uri', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/boot_diagnostics_instance_view.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/boot_diagnostics_instance_view.py deleted file mode 100644 index 4b01ce822908..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/boot_diagnostics_instance_view.py +++ /dev/null @@ -1,47 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class BootDiagnosticsInstanceView(Model): - """The instance view of a virtual machine boot diagnostics. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar console_screenshot_blob_uri: The console screenshot blob URI. - :vartype console_screenshot_blob_uri: str - :ivar serial_console_log_blob_uri: The Linux serial console log blob Uri. - :vartype serial_console_log_blob_uri: str - :ivar status: The boot diagnostics status information for the VM.

    - NOTE: It will be set only if there are errors encountered in enabling boot - diagnostics. - :vartype status: ~azure.mgmt.compute.v2018_06_01.models.InstanceViewStatus - """ - - _validation = { - 'console_screenshot_blob_uri': {'readonly': True}, - 'serial_console_log_blob_uri': {'readonly': True}, - 'status': {'readonly': True}, - } - - _attribute_map = { - 'console_screenshot_blob_uri': {'key': 'consoleScreenshotBlobUri', 'type': 'str'}, - 'serial_console_log_blob_uri': {'key': 'serialConsoleLogBlobUri', 'type': 'str'}, - 'status': {'key': 'status', 'type': 'InstanceViewStatus'}, - } - - def __init__(self, **kwargs): - super(BootDiagnosticsInstanceView, self).__init__(**kwargs) - self.console_screenshot_blob_uri = None - self.serial_console_log_blob_uri = None - self.status = None diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/boot_diagnostics_instance_view_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/boot_diagnostics_instance_view_py3.py deleted file mode 100644 index 6ec8694acf3e..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/boot_diagnostics_instance_view_py3.py +++ /dev/null @@ -1,47 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class BootDiagnosticsInstanceView(Model): - """The instance view of a virtual machine boot diagnostics. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar console_screenshot_blob_uri: The console screenshot blob URI. - :vartype console_screenshot_blob_uri: str - :ivar serial_console_log_blob_uri: The Linux serial console log blob Uri. - :vartype serial_console_log_blob_uri: str - :ivar status: The boot diagnostics status information for the VM.

    - NOTE: It will be set only if there are errors encountered in enabling boot - diagnostics. - :vartype status: ~azure.mgmt.compute.v2018_06_01.models.InstanceViewStatus - """ - - _validation = { - 'console_screenshot_blob_uri': {'readonly': True}, - 'serial_console_log_blob_uri': {'readonly': True}, - 'status': {'readonly': True}, - } - - _attribute_map = { - 'console_screenshot_blob_uri': {'key': 'consoleScreenshotBlobUri', 'type': 'str'}, - 'serial_console_log_blob_uri': {'key': 'serialConsoleLogBlobUri', 'type': 'str'}, - 'status': {'key': 'status', 'type': 'InstanceViewStatus'}, - } - - def __init__(self, **kwargs) -> None: - super(BootDiagnosticsInstanceView, self).__init__(**kwargs) - self.console_screenshot_blob_uri = None - self.serial_console_log_blob_uri = None - self.status = None diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/boot_diagnostics_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/boot_diagnostics_py3.py deleted file mode 100644 index b64ae5b4adde..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/boot_diagnostics_py3.py +++ /dev/null @@ -1,37 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class BootDiagnostics(Model): - """Boot Diagnostics is a debugging feature which allows you to view Console - Output and Screenshot to diagnose VM status.

    You can easily view - the output of your console log.

    Azure also enables you to see a - screenshot of the VM from the hypervisor. - - :param enabled: Whether boot diagnostics should be enabled on the Virtual - Machine. - :type enabled: bool - :param storage_uri: Uri of the storage account to use for placing the - console output and screenshot. - :type storage_uri: str - """ - - _attribute_map = { - 'enabled': {'key': 'enabled', 'type': 'bool'}, - 'storage_uri': {'key': 'storageUri', 'type': 'str'}, - } - - def __init__(self, *, enabled: bool=None, storage_uri: str=None, **kwargs) -> None: - super(BootDiagnostics, self).__init__(**kwargs) - self.enabled = enabled - self.storage_uri = storage_uri diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/compute_operation_value.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/compute_operation_value.py deleted file mode 100644 index 525ef3bbb69a..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/compute_operation_value.py +++ /dev/null @@ -1,60 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ComputeOperationValue(Model): - """Describes the properties of a Compute Operation value. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar origin: The origin of the compute operation. - :vartype origin: str - :ivar name: The name of the compute operation. - :vartype name: str - :ivar operation: The display name of the compute operation. - :vartype operation: str - :ivar resource: The display name of the resource the operation applies to. - :vartype resource: str - :ivar description: The description of the operation. - :vartype description: str - :ivar provider: The resource provider for the operation. - :vartype provider: str - """ - - _validation = { - 'origin': {'readonly': True}, - 'name': {'readonly': True}, - 'operation': {'readonly': True}, - 'resource': {'readonly': True}, - 'description': {'readonly': True}, - 'provider': {'readonly': True}, - } - - _attribute_map = { - 'origin': {'key': 'origin', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'operation': {'key': 'display.operation', 'type': 'str'}, - 'resource': {'key': 'display.resource', 'type': 'str'}, - 'description': {'key': 'display.description', 'type': 'str'}, - 'provider': {'key': 'display.provider', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ComputeOperationValue, self).__init__(**kwargs) - self.origin = None - self.name = None - self.operation = None - self.resource = None - self.description = None - self.provider = None diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/compute_operation_value_paged.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/compute_operation_value_paged.py deleted file mode 100644 index 5a0a2d6ed17e..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/compute_operation_value_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class ComputeOperationValuePaged(Paged): - """ - A paging container for iterating over a list of :class:`ComputeOperationValue ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[ComputeOperationValue]'} - } - - def __init__(self, *args, **kwargs): - - super(ComputeOperationValuePaged, self).__init__(*args, **kwargs) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/compute_operation_value_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/compute_operation_value_py3.py deleted file mode 100644 index 3c4388f312b9..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/compute_operation_value_py3.py +++ /dev/null @@ -1,60 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ComputeOperationValue(Model): - """Describes the properties of a Compute Operation value. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar origin: The origin of the compute operation. - :vartype origin: str - :ivar name: The name of the compute operation. - :vartype name: str - :ivar operation: The display name of the compute operation. - :vartype operation: str - :ivar resource: The display name of the resource the operation applies to. - :vartype resource: str - :ivar description: The description of the operation. - :vartype description: str - :ivar provider: The resource provider for the operation. - :vartype provider: str - """ - - _validation = { - 'origin': {'readonly': True}, - 'name': {'readonly': True}, - 'operation': {'readonly': True}, - 'resource': {'readonly': True}, - 'description': {'readonly': True}, - 'provider': {'readonly': True}, - } - - _attribute_map = { - 'origin': {'key': 'origin', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'operation': {'key': 'display.operation', 'type': 'str'}, - 'resource': {'key': 'display.resource', 'type': 'str'}, - 'description': {'key': 'display.description', 'type': 'str'}, - 'provider': {'key': 'display.provider', 'type': 'str'}, - } - - def __init__(self, **kwargs) -> None: - super(ComputeOperationValue, self).__init__(**kwargs) - self.origin = None - self.name = None - self.operation = None - self.resource = None - self.description = None - self.provider = None diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/creation_data.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/creation_data.py deleted file mode 100644 index 788d10ece334..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/creation_data.py +++ /dev/null @@ -1,58 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class CreationData(Model): - """Data used when creating a disk. - - All required parameters must be populated in order to send to Azure. - - :param create_option: Required. This enumerates the possible sources of a - disk's creation. Possible values include: 'Empty', 'Attach', 'FromImage', - 'Import', 'Copy', 'Restore' - :type create_option: str or - ~azure.mgmt.compute.v2018_06_01.models.DiskCreateOption - :param storage_account_id: If createOption is Import, the Azure Resource - Manager identifier of the storage account containing the blob to import as - a disk. Required only if the blob is in a different subscription - :type storage_account_id: str - :param image_reference: Disk source information. - :type image_reference: - ~azure.mgmt.compute.v2018_06_01.models.ImageDiskReference - :param source_uri: If createOption is Import, this is the URI of a blob to - be imported into a managed disk. - :type source_uri: str - :param source_resource_id: If createOption is Copy, this is the ARM id of - the source snapshot or disk. - :type source_resource_id: str - """ - - _validation = { - 'create_option': {'required': True}, - } - - _attribute_map = { - 'create_option': {'key': 'createOption', 'type': 'str'}, - 'storage_account_id': {'key': 'storageAccountId', 'type': 'str'}, - 'image_reference': {'key': 'imageReference', 'type': 'ImageDiskReference'}, - 'source_uri': {'key': 'sourceUri', 'type': 'str'}, - 'source_resource_id': {'key': 'sourceResourceId', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(CreationData, self).__init__(**kwargs) - self.create_option = kwargs.get('create_option', None) - self.storage_account_id = kwargs.get('storage_account_id', None) - self.image_reference = kwargs.get('image_reference', None) - self.source_uri = kwargs.get('source_uri', None) - self.source_resource_id = kwargs.get('source_resource_id', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/creation_data_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/creation_data_py3.py deleted file mode 100644 index 834999d555af..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/creation_data_py3.py +++ /dev/null @@ -1,58 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class CreationData(Model): - """Data used when creating a disk. - - All required parameters must be populated in order to send to Azure. - - :param create_option: Required. This enumerates the possible sources of a - disk's creation. Possible values include: 'Empty', 'Attach', 'FromImage', - 'Import', 'Copy', 'Restore' - :type create_option: str or - ~azure.mgmt.compute.v2018_06_01.models.DiskCreateOption - :param storage_account_id: If createOption is Import, the Azure Resource - Manager identifier of the storage account containing the blob to import as - a disk. Required only if the blob is in a different subscription - :type storage_account_id: str - :param image_reference: Disk source information. - :type image_reference: - ~azure.mgmt.compute.v2018_06_01.models.ImageDiskReference - :param source_uri: If createOption is Import, this is the URI of a blob to - be imported into a managed disk. - :type source_uri: str - :param source_resource_id: If createOption is Copy, this is the ARM id of - the source snapshot or disk. - :type source_resource_id: str - """ - - _validation = { - 'create_option': {'required': True}, - } - - _attribute_map = { - 'create_option': {'key': 'createOption', 'type': 'str'}, - 'storage_account_id': {'key': 'storageAccountId', 'type': 'str'}, - 'image_reference': {'key': 'imageReference', 'type': 'ImageDiskReference'}, - 'source_uri': {'key': 'sourceUri', 'type': 'str'}, - 'source_resource_id': {'key': 'sourceResourceId', 'type': 'str'}, - } - - def __init__(self, *, create_option, storage_account_id: str=None, image_reference=None, source_uri: str=None, source_resource_id: str=None, **kwargs) -> None: - super(CreationData, self).__init__(**kwargs) - self.create_option = create_option - self.storage_account_id = storage_account_id - self.image_reference = image_reference - self.source_uri = source_uri - self.source_resource_id = source_resource_id diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/data_disk.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/data_disk.py deleted file mode 100644 index 82ac3b499fa2..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/data_disk.py +++ /dev/null @@ -1,87 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class DataDisk(Model): - """Describes a data disk. - - All required parameters must be populated in order to send to Azure. - - :param lun: Required. Specifies the logical unit number of the data disk. - This value is used to identify data disks within the VM and therefore must - be unique for each data disk attached to a VM. - :type lun: int - :param name: The disk name. - :type name: str - :param vhd: The virtual hard disk. - :type vhd: ~azure.mgmt.compute.v2018_06_01.models.VirtualHardDisk - :param image: The source user image virtual hard disk. The virtual hard - disk will be copied before being attached to the virtual machine. If - SourceImage is provided, the destination virtual hard drive must not - exist. - :type image: ~azure.mgmt.compute.v2018_06_01.models.VirtualHardDisk - :param caching: Specifies the caching requirements.

    Possible - values are:

    **None**

    **ReadOnly**

    **ReadWrite** -

    Default: **None for Standard storage. ReadOnly for Premium - storage**. Possible values include: 'None', 'ReadOnly', 'ReadWrite' - :type caching: str or ~azure.mgmt.compute.v2018_06_01.models.CachingTypes - :param write_accelerator_enabled: Specifies whether writeAccelerator - should be enabled or disabled on the disk. - :type write_accelerator_enabled: bool - :param create_option: Required. Specifies how the virtual machine should - be created.

    Possible values are:

    **Attach** \\u2013 This - value is used when you are using a specialized disk to create the virtual - machine.

    **FromImage** \\u2013 This value is used when you are - using an image to create the virtual machine. If you are using a platform - image, you also use the imageReference element described above. If you are - using a marketplace image, you also use the plan element previously - described. Possible values include: 'FromImage', 'Empty', 'Attach' - :type create_option: str or - ~azure.mgmt.compute.v2018_06_01.models.DiskCreateOptionTypes - :param disk_size_gb: Specifies the size of an empty data disk in - gigabytes. This element can be used to overwrite the size of the disk in a - virtual machine image.

    This value cannot be larger than 1023 GB - :type disk_size_gb: int - :param managed_disk: The managed disk parameters. - :type managed_disk: - ~azure.mgmt.compute.v2018_06_01.models.ManagedDiskParameters - """ - - _validation = { - 'lun': {'required': True}, - 'create_option': {'required': True}, - } - - _attribute_map = { - 'lun': {'key': 'lun', 'type': 'int'}, - 'name': {'key': 'name', 'type': 'str'}, - 'vhd': {'key': 'vhd', 'type': 'VirtualHardDisk'}, - 'image': {'key': 'image', 'type': 'VirtualHardDisk'}, - 'caching': {'key': 'caching', 'type': 'CachingTypes'}, - 'write_accelerator_enabled': {'key': 'writeAcceleratorEnabled', 'type': 'bool'}, - 'create_option': {'key': 'createOption', 'type': 'str'}, - 'disk_size_gb': {'key': 'diskSizeGB', 'type': 'int'}, - 'managed_disk': {'key': 'managedDisk', 'type': 'ManagedDiskParameters'}, - } - - def __init__(self, **kwargs): - super(DataDisk, self).__init__(**kwargs) - self.lun = kwargs.get('lun', None) - self.name = kwargs.get('name', None) - self.vhd = kwargs.get('vhd', None) - self.image = kwargs.get('image', None) - self.caching = kwargs.get('caching', None) - self.write_accelerator_enabled = kwargs.get('write_accelerator_enabled', None) - self.create_option = kwargs.get('create_option', None) - self.disk_size_gb = kwargs.get('disk_size_gb', None) - self.managed_disk = kwargs.get('managed_disk', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/data_disk_image.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/data_disk_image.py deleted file mode 100644 index b5dbfcefb472..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/data_disk_image.py +++ /dev/null @@ -1,37 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class DataDiskImage(Model): - """Contains the data disk images information. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar lun: Specifies the logical unit number of the data disk. This value - is used to identify data disks within the VM and therefore must be unique - for each data disk attached to a VM. - :vartype lun: int - """ - - _validation = { - 'lun': {'readonly': True}, - } - - _attribute_map = { - 'lun': {'key': 'lun', 'type': 'int'}, - } - - def __init__(self, **kwargs): - super(DataDiskImage, self).__init__(**kwargs) - self.lun = None diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/data_disk_image_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/data_disk_image_py3.py deleted file mode 100644 index 8431a3988502..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/data_disk_image_py3.py +++ /dev/null @@ -1,37 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class DataDiskImage(Model): - """Contains the data disk images information. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar lun: Specifies the logical unit number of the data disk. This value - is used to identify data disks within the VM and therefore must be unique - for each data disk attached to a VM. - :vartype lun: int - """ - - _validation = { - 'lun': {'readonly': True}, - } - - _attribute_map = { - 'lun': {'key': 'lun', 'type': 'int'}, - } - - def __init__(self, **kwargs) -> None: - super(DataDiskImage, self).__init__(**kwargs) - self.lun = None diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/data_disk_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/data_disk_py3.py deleted file mode 100644 index 5a12f5f91bea..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/data_disk_py3.py +++ /dev/null @@ -1,87 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class DataDisk(Model): - """Describes a data disk. - - All required parameters must be populated in order to send to Azure. - - :param lun: Required. Specifies the logical unit number of the data disk. - This value is used to identify data disks within the VM and therefore must - be unique for each data disk attached to a VM. - :type lun: int - :param name: The disk name. - :type name: str - :param vhd: The virtual hard disk. - :type vhd: ~azure.mgmt.compute.v2018_06_01.models.VirtualHardDisk - :param image: The source user image virtual hard disk. The virtual hard - disk will be copied before being attached to the virtual machine. If - SourceImage is provided, the destination virtual hard drive must not - exist. - :type image: ~azure.mgmt.compute.v2018_06_01.models.VirtualHardDisk - :param caching: Specifies the caching requirements.

    Possible - values are:

    **None**

    **ReadOnly**

    **ReadWrite** -

    Default: **None for Standard storage. ReadOnly for Premium - storage**. Possible values include: 'None', 'ReadOnly', 'ReadWrite' - :type caching: str or ~azure.mgmt.compute.v2018_06_01.models.CachingTypes - :param write_accelerator_enabled: Specifies whether writeAccelerator - should be enabled or disabled on the disk. - :type write_accelerator_enabled: bool - :param create_option: Required. Specifies how the virtual machine should - be created.

    Possible values are:

    **Attach** \\u2013 This - value is used when you are using a specialized disk to create the virtual - machine.

    **FromImage** \\u2013 This value is used when you are - using an image to create the virtual machine. If you are using a platform - image, you also use the imageReference element described above. If you are - using a marketplace image, you also use the plan element previously - described. Possible values include: 'FromImage', 'Empty', 'Attach' - :type create_option: str or - ~azure.mgmt.compute.v2018_06_01.models.DiskCreateOptionTypes - :param disk_size_gb: Specifies the size of an empty data disk in - gigabytes. This element can be used to overwrite the size of the disk in a - virtual machine image.

    This value cannot be larger than 1023 GB - :type disk_size_gb: int - :param managed_disk: The managed disk parameters. - :type managed_disk: - ~azure.mgmt.compute.v2018_06_01.models.ManagedDiskParameters - """ - - _validation = { - 'lun': {'required': True}, - 'create_option': {'required': True}, - } - - _attribute_map = { - 'lun': {'key': 'lun', 'type': 'int'}, - 'name': {'key': 'name', 'type': 'str'}, - 'vhd': {'key': 'vhd', 'type': 'VirtualHardDisk'}, - 'image': {'key': 'image', 'type': 'VirtualHardDisk'}, - 'caching': {'key': 'caching', 'type': 'CachingTypes'}, - 'write_accelerator_enabled': {'key': 'writeAcceleratorEnabled', 'type': 'bool'}, - 'create_option': {'key': 'createOption', 'type': 'str'}, - 'disk_size_gb': {'key': 'diskSizeGB', 'type': 'int'}, - 'managed_disk': {'key': 'managedDisk', 'type': 'ManagedDiskParameters'}, - } - - def __init__(self, *, lun: int, create_option, name: str=None, vhd=None, image=None, caching=None, write_accelerator_enabled: bool=None, disk_size_gb: int=None, managed_disk=None, **kwargs) -> None: - super(DataDisk, self).__init__(**kwargs) - self.lun = lun - self.name = name - self.vhd = vhd - self.image = image - self.caching = caching - self.write_accelerator_enabled = write_accelerator_enabled - self.create_option = create_option - self.disk_size_gb = disk_size_gb - self.managed_disk = managed_disk diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/diagnostics_profile.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/diagnostics_profile.py deleted file mode 100644 index f72721038694..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/diagnostics_profile.py +++ /dev/null @@ -1,33 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class DiagnosticsProfile(Model): - """Specifies the boot diagnostic settings state.

    Minimum api-version: - 2015-06-15. - - :param boot_diagnostics: Boot Diagnostics is a debugging feature which - allows you to view Console Output and Screenshot to diagnose VM status. -

    You can easily view the output of your console log.

    - Azure also enables you to see a screenshot of the VM from the hypervisor. - :type boot_diagnostics: - ~azure.mgmt.compute.v2018_06_01.models.BootDiagnostics - """ - - _attribute_map = { - 'boot_diagnostics': {'key': 'bootDiagnostics', 'type': 'BootDiagnostics'}, - } - - def __init__(self, **kwargs): - super(DiagnosticsProfile, self).__init__(**kwargs) - self.boot_diagnostics = kwargs.get('boot_diagnostics', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/diagnostics_profile_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/diagnostics_profile_py3.py deleted file mode 100644 index da0a1e350105..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/diagnostics_profile_py3.py +++ /dev/null @@ -1,33 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class DiagnosticsProfile(Model): - """Specifies the boot diagnostic settings state.

    Minimum api-version: - 2015-06-15. - - :param boot_diagnostics: Boot Diagnostics is a debugging feature which - allows you to view Console Output and Screenshot to diagnose VM status. -

    You can easily view the output of your console log.

    - Azure also enables you to see a screenshot of the VM from the hypervisor. - :type boot_diagnostics: - ~azure.mgmt.compute.v2018_06_01.models.BootDiagnostics - """ - - _attribute_map = { - 'boot_diagnostics': {'key': 'bootDiagnostics', 'type': 'BootDiagnostics'}, - } - - def __init__(self, *, boot_diagnostics=None, **kwargs) -> None: - super(DiagnosticsProfile, self).__init__(**kwargs) - self.boot_diagnostics = boot_diagnostics diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/diff_disk_settings.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/diff_disk_settings.py deleted file mode 100644 index 3f1084ab4c45..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/diff_disk_settings.py +++ /dev/null @@ -1,32 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class DiffDiskSettings(Model): - """Describes the parameters of ephemeral disk settings that can be specified - for operating system disk.

    NOTE: The ephemeral disk settings can - only be specified for managed disk. - - :param option: Specifies the ephemeral disk settings for operating system - disk. Possible values include: 'Local' - :type option: str or - ~azure.mgmt.compute.v2018_06_01.models.DiffDiskOptions - """ - - _attribute_map = { - 'option': {'key': 'option', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(DiffDiskSettings, self).__init__(**kwargs) - self.option = kwargs.get('option', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/diff_disk_settings_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/diff_disk_settings_py3.py deleted file mode 100644 index 6d8a0430434c..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/diff_disk_settings_py3.py +++ /dev/null @@ -1,32 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class DiffDiskSettings(Model): - """Describes the parameters of ephemeral disk settings that can be specified - for operating system disk.

    NOTE: The ephemeral disk settings can - only be specified for managed disk. - - :param option: Specifies the ephemeral disk settings for operating system - disk. Possible values include: 'Local' - :type option: str or - ~azure.mgmt.compute.v2018_06_01.models.DiffDiskOptions - """ - - _attribute_map = { - 'option': {'key': 'option', 'type': 'str'}, - } - - def __init__(self, *, option=None, **kwargs) -> None: - super(DiffDiskSettings, self).__init__(**kwargs) - self.option = option diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/disallowed.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/disallowed.py deleted file mode 100644 index 4269dd604e66..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/disallowed.py +++ /dev/null @@ -1,28 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class Disallowed(Model): - """Describes the disallowed disk types. - - :param disk_types: A list of disk types. - :type disk_types: list[str] - """ - - _attribute_map = { - 'disk_types': {'key': 'diskTypes', 'type': '[str]'}, - } - - def __init__(self, **kwargs): - super(Disallowed, self).__init__(**kwargs) - self.disk_types = kwargs.get('disk_types', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/disallowed_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/disallowed_py3.py deleted file mode 100644 index 95e07d7a7533..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/disallowed_py3.py +++ /dev/null @@ -1,28 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class Disallowed(Model): - """Describes the disallowed disk types. - - :param disk_types: A list of disk types. - :type disk_types: list[str] - """ - - _attribute_map = { - 'disk_types': {'key': 'diskTypes', 'type': '[str]'}, - } - - def __init__(self, *, disk_types=None, **kwargs) -> None: - super(Disallowed, self).__init__(**kwargs) - self.disk_types = disk_types diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/disk.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/disk.py deleted file mode 100644 index f4cf817c4f99..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/disk.py +++ /dev/null @@ -1,116 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource import Resource - - -class Disk(Resource): - """Disk resource. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource Id - :vartype id: str - :ivar name: Resource name - :vartype name: str - :ivar type: Resource type - :vartype type: str - :param location: Required. Resource location - :type location: str - :param tags: Resource tags - :type tags: dict[str, str] - :ivar managed_by: A relative URI containing the ID of the VM that has the - disk attached. - :vartype managed_by: str - :param sku: - :type sku: ~azure.mgmt.compute.v2018_06_01.models.DiskSku - :param zones: The Logical zone list for Disk. - :type zones: list[str] - :ivar time_created: The time when the disk was created. - :vartype time_created: datetime - :param os_type: The Operating System type. Possible values include: - 'Windows', 'Linux' - :type os_type: str or - ~azure.mgmt.compute.v2018_06_01.models.OperatingSystemTypes - :param creation_data: Required. Disk source information. CreationData - information cannot be changed after the disk has been created. - :type creation_data: ~azure.mgmt.compute.v2018_06_01.models.CreationData - :param disk_size_gb: If creationData.createOption is Empty, this field is - mandatory and it indicates the size of the VHD to create. If this field is - present for updates or creation with other options, it indicates a resize. - Resizes are only allowed if the disk is not attached to a running VM, and - can only increase the disk's size. - :type disk_size_gb: int - :param encryption_settings: Encryption settings for disk or snapshot - :type encryption_settings: - ~azure.mgmt.compute.v2018_06_01.models.EncryptionSettings - :ivar provisioning_state: The disk provisioning state. - :vartype provisioning_state: str - :param disk_iops_read_write: The number of IOPS allowed for this disk; - only settable for UltraSSD disks. One operation can transfer between 4k - and 256k bytes. For a description of the range of values you can set, see - [Ultra SSD Managed Disk - Offerings](https://docs.microsoft.com/azure/virtual-machines/windows/disks-ultra-ssd#ultra-ssd-managed-disk-offerings). - :type disk_iops_read_write: long - :param disk_mbps_read_write: The bandwidth allowed for this disk; only - settable for UltraSSD disks. MBps means millions of bytes per second - MB - here uses the ISO notation, of powers of 10. For a description of the - range of values you can set, see [Ultra SSD Managed Disk - Offerings](https://docs.microsoft.com/azure/virtual-machines/windows/disks-ultra-ssd#ultra-ssd-managed-disk-offerings). - :type disk_mbps_read_write: int - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - 'managed_by': {'readonly': True}, - 'time_created': {'readonly': True}, - 'creation_data': {'required': True}, - 'provisioning_state': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'managed_by': {'key': 'managedBy', 'type': 'str'}, - 'sku': {'key': 'sku', 'type': 'DiskSku'}, - 'zones': {'key': 'zones', 'type': '[str]'}, - 'time_created': {'key': 'properties.timeCreated', 'type': 'iso-8601'}, - 'os_type': {'key': 'properties.osType', 'type': 'OperatingSystemTypes'}, - 'creation_data': {'key': 'properties.creationData', 'type': 'CreationData'}, - 'disk_size_gb': {'key': 'properties.diskSizeGB', 'type': 'int'}, - 'encryption_settings': {'key': 'properties.encryptionSettings', 'type': 'EncryptionSettings'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'disk_iops_read_write': {'key': 'properties.diskIOPSReadWrite', 'type': 'long'}, - 'disk_mbps_read_write': {'key': 'properties.diskMBpsReadWrite', 'type': 'int'}, - } - - def __init__(self, **kwargs): - super(Disk, self).__init__(**kwargs) - self.managed_by = None - self.sku = kwargs.get('sku', None) - self.zones = kwargs.get('zones', None) - self.time_created = None - self.os_type = kwargs.get('os_type', None) - self.creation_data = kwargs.get('creation_data', None) - self.disk_size_gb = kwargs.get('disk_size_gb', None) - self.encryption_settings = kwargs.get('encryption_settings', None) - self.provisioning_state = None - self.disk_iops_read_write = kwargs.get('disk_iops_read_write', None) - self.disk_mbps_read_write = kwargs.get('disk_mbps_read_write', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/disk_encryption_settings.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/disk_encryption_settings.py deleted file mode 100644 index 4963bf2831e5..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/disk_encryption_settings.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class DiskEncryptionSettings(Model): - """Describes a Encryption Settings for a Disk. - - :param disk_encryption_key: Specifies the location of the disk encryption - key, which is a Key Vault Secret. - :type disk_encryption_key: - ~azure.mgmt.compute.v2018_06_01.models.KeyVaultSecretReference - :param key_encryption_key: Specifies the location of the key encryption - key in Key Vault. - :type key_encryption_key: - ~azure.mgmt.compute.v2018_06_01.models.KeyVaultKeyReference - :param enabled: Specifies whether disk encryption should be enabled on the - virtual machine. - :type enabled: bool - """ - - _attribute_map = { - 'disk_encryption_key': {'key': 'diskEncryptionKey', 'type': 'KeyVaultSecretReference'}, - 'key_encryption_key': {'key': 'keyEncryptionKey', 'type': 'KeyVaultKeyReference'}, - 'enabled': {'key': 'enabled', 'type': 'bool'}, - } - - def __init__(self, **kwargs): - super(DiskEncryptionSettings, self).__init__(**kwargs) - self.disk_encryption_key = kwargs.get('disk_encryption_key', None) - self.key_encryption_key = kwargs.get('key_encryption_key', None) - self.enabled = kwargs.get('enabled', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/disk_encryption_settings_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/disk_encryption_settings_py3.py deleted file mode 100644 index 05ea2823bcf4..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/disk_encryption_settings_py3.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class DiskEncryptionSettings(Model): - """Describes a Encryption Settings for a Disk. - - :param disk_encryption_key: Specifies the location of the disk encryption - key, which is a Key Vault Secret. - :type disk_encryption_key: - ~azure.mgmt.compute.v2018_06_01.models.KeyVaultSecretReference - :param key_encryption_key: Specifies the location of the key encryption - key in Key Vault. - :type key_encryption_key: - ~azure.mgmt.compute.v2018_06_01.models.KeyVaultKeyReference - :param enabled: Specifies whether disk encryption should be enabled on the - virtual machine. - :type enabled: bool - """ - - _attribute_map = { - 'disk_encryption_key': {'key': 'diskEncryptionKey', 'type': 'KeyVaultSecretReference'}, - 'key_encryption_key': {'key': 'keyEncryptionKey', 'type': 'KeyVaultKeyReference'}, - 'enabled': {'key': 'enabled', 'type': 'bool'}, - } - - def __init__(self, *, disk_encryption_key=None, key_encryption_key=None, enabled: bool=None, **kwargs) -> None: - super(DiskEncryptionSettings, self).__init__(**kwargs) - self.disk_encryption_key = disk_encryption_key - self.key_encryption_key = key_encryption_key - self.enabled = enabled diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/disk_instance_view.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/disk_instance_view.py deleted file mode 100644 index 5547326ab911..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/disk_instance_view.py +++ /dev/null @@ -1,39 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class DiskInstanceView(Model): - """The instance view of the disk. - - :param name: The disk name. - :type name: str - :param encryption_settings: Specifies the encryption settings for the OS - Disk.

    Minimum api-version: 2015-06-15 - :type encryption_settings: - list[~azure.mgmt.compute.v2018_06_01.models.DiskEncryptionSettings] - :param statuses: The resource status information. - :type statuses: - list[~azure.mgmt.compute.v2018_06_01.models.InstanceViewStatus] - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'encryption_settings': {'key': 'encryptionSettings', 'type': '[DiskEncryptionSettings]'}, - 'statuses': {'key': 'statuses', 'type': '[InstanceViewStatus]'}, - } - - def __init__(self, **kwargs): - super(DiskInstanceView, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.encryption_settings = kwargs.get('encryption_settings', None) - self.statuses = kwargs.get('statuses', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/disk_instance_view_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/disk_instance_view_py3.py deleted file mode 100644 index f25091adab47..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/disk_instance_view_py3.py +++ /dev/null @@ -1,39 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class DiskInstanceView(Model): - """The instance view of the disk. - - :param name: The disk name. - :type name: str - :param encryption_settings: Specifies the encryption settings for the OS - Disk.

    Minimum api-version: 2015-06-15 - :type encryption_settings: - list[~azure.mgmt.compute.v2018_06_01.models.DiskEncryptionSettings] - :param statuses: The resource status information. - :type statuses: - list[~azure.mgmt.compute.v2018_06_01.models.InstanceViewStatus] - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'encryption_settings': {'key': 'encryptionSettings', 'type': '[DiskEncryptionSettings]'}, - 'statuses': {'key': 'statuses', 'type': '[InstanceViewStatus]'}, - } - - def __init__(self, *, name: str=None, encryption_settings=None, statuses=None, **kwargs) -> None: - super(DiskInstanceView, self).__init__(**kwargs) - self.name = name - self.encryption_settings = encryption_settings - self.statuses = statuses diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/disk_paged.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/disk_paged.py deleted file mode 100644 index d51f242cd3bf..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/disk_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class DiskPaged(Paged): - """ - A paging container for iterating over a list of :class:`Disk ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[Disk]'} - } - - def __init__(self, *args, **kwargs): - - super(DiskPaged, self).__init__(*args, **kwargs) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/disk_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/disk_py3.py deleted file mode 100644 index dc7f4272bfc3..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/disk_py3.py +++ /dev/null @@ -1,116 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource_py3 import Resource - - -class Disk(Resource): - """Disk resource. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource Id - :vartype id: str - :ivar name: Resource name - :vartype name: str - :ivar type: Resource type - :vartype type: str - :param location: Required. Resource location - :type location: str - :param tags: Resource tags - :type tags: dict[str, str] - :ivar managed_by: A relative URI containing the ID of the VM that has the - disk attached. - :vartype managed_by: str - :param sku: - :type sku: ~azure.mgmt.compute.v2018_06_01.models.DiskSku - :param zones: The Logical zone list for Disk. - :type zones: list[str] - :ivar time_created: The time when the disk was created. - :vartype time_created: datetime - :param os_type: The Operating System type. Possible values include: - 'Windows', 'Linux' - :type os_type: str or - ~azure.mgmt.compute.v2018_06_01.models.OperatingSystemTypes - :param creation_data: Required. Disk source information. CreationData - information cannot be changed after the disk has been created. - :type creation_data: ~azure.mgmt.compute.v2018_06_01.models.CreationData - :param disk_size_gb: If creationData.createOption is Empty, this field is - mandatory and it indicates the size of the VHD to create. If this field is - present for updates or creation with other options, it indicates a resize. - Resizes are only allowed if the disk is not attached to a running VM, and - can only increase the disk's size. - :type disk_size_gb: int - :param encryption_settings: Encryption settings for disk or snapshot - :type encryption_settings: - ~azure.mgmt.compute.v2018_06_01.models.EncryptionSettings - :ivar provisioning_state: The disk provisioning state. - :vartype provisioning_state: str - :param disk_iops_read_write: The number of IOPS allowed for this disk; - only settable for UltraSSD disks. One operation can transfer between 4k - and 256k bytes. For a description of the range of values you can set, see - [Ultra SSD Managed Disk - Offerings](https://docs.microsoft.com/azure/virtual-machines/windows/disks-ultra-ssd#ultra-ssd-managed-disk-offerings). - :type disk_iops_read_write: long - :param disk_mbps_read_write: The bandwidth allowed for this disk; only - settable for UltraSSD disks. MBps means millions of bytes per second - MB - here uses the ISO notation, of powers of 10. For a description of the - range of values you can set, see [Ultra SSD Managed Disk - Offerings](https://docs.microsoft.com/azure/virtual-machines/windows/disks-ultra-ssd#ultra-ssd-managed-disk-offerings). - :type disk_mbps_read_write: int - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - 'managed_by': {'readonly': True}, - 'time_created': {'readonly': True}, - 'creation_data': {'required': True}, - 'provisioning_state': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'managed_by': {'key': 'managedBy', 'type': 'str'}, - 'sku': {'key': 'sku', 'type': 'DiskSku'}, - 'zones': {'key': 'zones', 'type': '[str]'}, - 'time_created': {'key': 'properties.timeCreated', 'type': 'iso-8601'}, - 'os_type': {'key': 'properties.osType', 'type': 'OperatingSystemTypes'}, - 'creation_data': {'key': 'properties.creationData', 'type': 'CreationData'}, - 'disk_size_gb': {'key': 'properties.diskSizeGB', 'type': 'int'}, - 'encryption_settings': {'key': 'properties.encryptionSettings', 'type': 'EncryptionSettings'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'disk_iops_read_write': {'key': 'properties.diskIOPSReadWrite', 'type': 'long'}, - 'disk_mbps_read_write': {'key': 'properties.diskMBpsReadWrite', 'type': 'int'}, - } - - def __init__(self, *, location: str, creation_data, tags=None, sku=None, zones=None, os_type=None, disk_size_gb: int=None, encryption_settings=None, disk_iops_read_write: int=None, disk_mbps_read_write: int=None, **kwargs) -> None: - super(Disk, self).__init__(location=location, tags=tags, **kwargs) - self.managed_by = None - self.sku = sku - self.zones = zones - self.time_created = None - self.os_type = os_type - self.creation_data = creation_data - self.disk_size_gb = disk_size_gb - self.encryption_settings = encryption_settings - self.provisioning_state = None - self.disk_iops_read_write = disk_iops_read_write - self.disk_mbps_read_write = disk_mbps_read_write diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/disk_sku.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/disk_sku.py deleted file mode 100644 index 802ea83e4151..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/disk_sku.py +++ /dev/null @@ -1,42 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class DiskSku(Model): - """The disks sku name. Can be Standard_LRS, Premium_LRS, StandardSSD_LRS, or - UltraSSD_LRS. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :param name: The sku name. Possible values include: 'Standard_LRS', - 'Premium_LRS', 'StandardSSD_LRS', 'UltraSSD_LRS' - :type name: str or - ~azure.mgmt.compute.v2018_06_01.models.DiskStorageAccountTypes - :ivar tier: The sku tier. Default value: "Standard" . - :vartype tier: str - """ - - _validation = { - 'tier': {'readonly': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'tier': {'key': 'tier', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(DiskSku, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.tier = None diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/disk_sku_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/disk_sku_py3.py deleted file mode 100644 index 2a98570cde4d..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/disk_sku_py3.py +++ /dev/null @@ -1,42 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class DiskSku(Model): - """The disks sku name. Can be Standard_LRS, Premium_LRS, StandardSSD_LRS, or - UltraSSD_LRS. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :param name: The sku name. Possible values include: 'Standard_LRS', - 'Premium_LRS', 'StandardSSD_LRS', 'UltraSSD_LRS' - :type name: str or - ~azure.mgmt.compute.v2018_06_01.models.DiskStorageAccountTypes - :ivar tier: The sku tier. Default value: "Standard" . - :vartype tier: str - """ - - _validation = { - 'tier': {'readonly': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'tier': {'key': 'tier', 'type': 'str'}, - } - - def __init__(self, *, name=None, **kwargs) -> None: - super(DiskSku, self).__init__(**kwargs) - self.name = name - self.tier = None diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/disk_update.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/disk_update.py deleted file mode 100644 index 13e8753cefb7..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/disk_update.py +++ /dev/null @@ -1,63 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class DiskUpdate(Model): - """Disk update resource. - - :param os_type: the Operating System type. Possible values include: - 'Windows', 'Linux' - :type os_type: str or - ~azure.mgmt.compute.v2018_06_01.models.OperatingSystemTypes - :param disk_size_gb: If creationData.createOption is Empty, this field is - mandatory and it indicates the size of the VHD to create. If this field is - present for updates or creation with other options, it indicates a resize. - Resizes are only allowed if the disk is not attached to a running VM, and - can only increase the disk's size. - :type disk_size_gb: int - :param encryption_settings: Encryption settings for disk or snapshot - :type encryption_settings: - ~azure.mgmt.compute.v2018_06_01.models.EncryptionSettings - :param disk_iops_read_write: The number of IOPS allowed for this disk; - only settable for UltraSSD disks. One operation can transfer between 4k - and 256k bytes. - :type disk_iops_read_write: long - :param disk_mbps_read_write: The bandwidth allowed for this disk; only - settable for UltraSSD disks. MBps means millions of bytes per second - MB - here uses the ISO notation, of powers of 10. - :type disk_mbps_read_write: int - :param tags: Resource tags - :type tags: dict[str, str] - :param sku: - :type sku: ~azure.mgmt.compute.v2018_06_01.models.DiskSku - """ - - _attribute_map = { - 'os_type': {'key': 'properties.osType', 'type': 'OperatingSystemTypes'}, - 'disk_size_gb': {'key': 'properties.diskSizeGB', 'type': 'int'}, - 'encryption_settings': {'key': 'properties.encryptionSettings', 'type': 'EncryptionSettings'}, - 'disk_iops_read_write': {'key': 'properties.diskIOPSReadWrite', 'type': 'long'}, - 'disk_mbps_read_write': {'key': 'properties.diskMBpsReadWrite', 'type': 'int'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'sku': {'key': 'sku', 'type': 'DiskSku'}, - } - - def __init__(self, **kwargs): - super(DiskUpdate, self).__init__(**kwargs) - self.os_type = kwargs.get('os_type', None) - self.disk_size_gb = kwargs.get('disk_size_gb', None) - self.encryption_settings = kwargs.get('encryption_settings', None) - self.disk_iops_read_write = kwargs.get('disk_iops_read_write', None) - self.disk_mbps_read_write = kwargs.get('disk_mbps_read_write', None) - self.tags = kwargs.get('tags', None) - self.sku = kwargs.get('sku', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/disk_update_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/disk_update_py3.py deleted file mode 100644 index ed3cd1f878e0..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/disk_update_py3.py +++ /dev/null @@ -1,63 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class DiskUpdate(Model): - """Disk update resource. - - :param os_type: the Operating System type. Possible values include: - 'Windows', 'Linux' - :type os_type: str or - ~azure.mgmt.compute.v2018_06_01.models.OperatingSystemTypes - :param disk_size_gb: If creationData.createOption is Empty, this field is - mandatory and it indicates the size of the VHD to create. If this field is - present for updates or creation with other options, it indicates a resize. - Resizes are only allowed if the disk is not attached to a running VM, and - can only increase the disk's size. - :type disk_size_gb: int - :param encryption_settings: Encryption settings for disk or snapshot - :type encryption_settings: - ~azure.mgmt.compute.v2018_06_01.models.EncryptionSettings - :param disk_iops_read_write: The number of IOPS allowed for this disk; - only settable for UltraSSD disks. One operation can transfer between 4k - and 256k bytes. - :type disk_iops_read_write: long - :param disk_mbps_read_write: The bandwidth allowed for this disk; only - settable for UltraSSD disks. MBps means millions of bytes per second - MB - here uses the ISO notation, of powers of 10. - :type disk_mbps_read_write: int - :param tags: Resource tags - :type tags: dict[str, str] - :param sku: - :type sku: ~azure.mgmt.compute.v2018_06_01.models.DiskSku - """ - - _attribute_map = { - 'os_type': {'key': 'properties.osType', 'type': 'OperatingSystemTypes'}, - 'disk_size_gb': {'key': 'properties.diskSizeGB', 'type': 'int'}, - 'encryption_settings': {'key': 'properties.encryptionSettings', 'type': 'EncryptionSettings'}, - 'disk_iops_read_write': {'key': 'properties.diskIOPSReadWrite', 'type': 'long'}, - 'disk_mbps_read_write': {'key': 'properties.diskMBpsReadWrite', 'type': 'int'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'sku': {'key': 'sku', 'type': 'DiskSku'}, - } - - def __init__(self, *, os_type=None, disk_size_gb: int=None, encryption_settings=None, disk_iops_read_write: int=None, disk_mbps_read_write: int=None, tags=None, sku=None, **kwargs) -> None: - super(DiskUpdate, self).__init__(**kwargs) - self.os_type = os_type - self.disk_size_gb = disk_size_gb - self.encryption_settings = encryption_settings - self.disk_iops_read_write = disk_iops_read_write - self.disk_mbps_read_write = disk_mbps_read_write - self.tags = tags - self.sku = sku diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/encryption_settings.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/encryption_settings.py deleted file mode 100644 index 14584c01005c..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/encryption_settings.py +++ /dev/null @@ -1,44 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class EncryptionSettings(Model): - """Encryption settings for disk or snapshot. - - :param enabled: Set this flag to true and provide DiskEncryptionKey and - optional KeyEncryptionKey to enable encryption. Set this flag to false and - remove DiskEncryptionKey and KeyEncryptionKey to disable encryption. If - EncryptionSettings is null in the request object, the existing settings - remain unchanged. - :type enabled: bool - :param disk_encryption_key: Key Vault Secret Url and vault id of the disk - encryption key - :type disk_encryption_key: - ~azure.mgmt.compute.v2018_06_01.models.KeyVaultAndSecretReference - :param key_encryption_key: Key Vault Key Url and vault id of the key - encryption key - :type key_encryption_key: - ~azure.mgmt.compute.v2018_06_01.models.KeyVaultAndKeyReference - """ - - _attribute_map = { - 'enabled': {'key': 'enabled', 'type': 'bool'}, - 'disk_encryption_key': {'key': 'diskEncryptionKey', 'type': 'KeyVaultAndSecretReference'}, - 'key_encryption_key': {'key': 'keyEncryptionKey', 'type': 'KeyVaultAndKeyReference'}, - } - - def __init__(self, **kwargs): - super(EncryptionSettings, self).__init__(**kwargs) - self.enabled = kwargs.get('enabled', None) - self.disk_encryption_key = kwargs.get('disk_encryption_key', None) - self.key_encryption_key = kwargs.get('key_encryption_key', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/encryption_settings_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/encryption_settings_py3.py deleted file mode 100644 index 94d40ae9eebe..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/encryption_settings_py3.py +++ /dev/null @@ -1,44 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class EncryptionSettings(Model): - """Encryption settings for disk or snapshot. - - :param enabled: Set this flag to true and provide DiskEncryptionKey and - optional KeyEncryptionKey to enable encryption. Set this flag to false and - remove DiskEncryptionKey and KeyEncryptionKey to disable encryption. If - EncryptionSettings is null in the request object, the existing settings - remain unchanged. - :type enabled: bool - :param disk_encryption_key: Key Vault Secret Url and vault id of the disk - encryption key - :type disk_encryption_key: - ~azure.mgmt.compute.v2018_06_01.models.KeyVaultAndSecretReference - :param key_encryption_key: Key Vault Key Url and vault id of the key - encryption key - :type key_encryption_key: - ~azure.mgmt.compute.v2018_06_01.models.KeyVaultAndKeyReference - """ - - _attribute_map = { - 'enabled': {'key': 'enabled', 'type': 'bool'}, - 'disk_encryption_key': {'key': 'diskEncryptionKey', 'type': 'KeyVaultAndSecretReference'}, - 'key_encryption_key': {'key': 'keyEncryptionKey', 'type': 'KeyVaultAndKeyReference'}, - } - - def __init__(self, *, enabled: bool=None, disk_encryption_key=None, key_encryption_key=None, **kwargs) -> None: - super(EncryptionSettings, self).__init__(**kwargs) - self.enabled = enabled - self.disk_encryption_key = disk_encryption_key - self.key_encryption_key = key_encryption_key diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/gallery.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/gallery.py deleted file mode 100644 index d32b2ba6749e..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/gallery.py +++ /dev/null @@ -1,70 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource import Resource - - -class Gallery(Resource): - """Specifies information about the Shared Image Gallery that you want to - create or update. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource Id - :vartype id: str - :ivar name: Resource name - :vartype name: str - :ivar type: Resource type - :vartype type: str - :param location: Required. Resource location - :type location: str - :param tags: Resource tags - :type tags: dict[str, str] - :param description: The description of this Shared Image Gallery resource. - This property is updatable. - :type description: str - :param identifier: - :type identifier: ~azure.mgmt.compute.v2018_06_01.models.GalleryIdentifier - :ivar provisioning_state: The current state of the gallery. The - provisioning state, which only appears in the response. Possible values - include: 'Creating', 'Updating', 'Failed', 'Succeeded', 'Deleting', - 'Migrating' - :vartype provisioning_state: str or - ~azure.mgmt.compute.v2018_06_01.models.enum - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - 'provisioning_state': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'description': {'key': 'properties.description', 'type': 'str'}, - 'identifier': {'key': 'properties.identifier', 'type': 'GalleryIdentifier'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(Gallery, self).__init__(**kwargs) - self.description = kwargs.get('description', None) - self.identifier = kwargs.get('identifier', None) - self.provisioning_state = None diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/gallery_artifact_publishing_profile_base.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/gallery_artifact_publishing_profile_base.py deleted file mode 100644 index a3d4ff30e926..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/gallery_artifact_publishing_profile_base.py +++ /dev/null @@ -1,40 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class GalleryArtifactPublishingProfileBase(Model): - """Describes the basic gallery artifact publishing profile. - - All required parameters must be populated in order to send to Azure. - - :param target_regions: The target regions where the Image Version is going - to be replicated to. This property is updatable. - :type target_regions: - list[~azure.mgmt.compute.v2018_06_01.models.TargetRegion] - :param source: Required. - :type source: ~azure.mgmt.compute.v2018_06_01.models.GalleryArtifactSource - """ - - _validation = { - 'source': {'required': True}, - } - - _attribute_map = { - 'target_regions': {'key': 'targetRegions', 'type': '[TargetRegion]'}, - 'source': {'key': 'source', 'type': 'GalleryArtifactSource'}, - } - - def __init__(self, **kwargs): - super(GalleryArtifactPublishingProfileBase, self).__init__(**kwargs) - self.target_regions = kwargs.get('target_regions', None) - self.source = kwargs.get('source', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/gallery_artifact_publishing_profile_base_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/gallery_artifact_publishing_profile_base_py3.py deleted file mode 100644 index 16f9f1754010..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/gallery_artifact_publishing_profile_base_py3.py +++ /dev/null @@ -1,40 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class GalleryArtifactPublishingProfileBase(Model): - """Describes the basic gallery artifact publishing profile. - - All required parameters must be populated in order to send to Azure. - - :param target_regions: The target regions where the Image Version is going - to be replicated to. This property is updatable. - :type target_regions: - list[~azure.mgmt.compute.v2018_06_01.models.TargetRegion] - :param source: Required. - :type source: ~azure.mgmt.compute.v2018_06_01.models.GalleryArtifactSource - """ - - _validation = { - 'source': {'required': True}, - } - - _attribute_map = { - 'target_regions': {'key': 'targetRegions', 'type': '[TargetRegion]'}, - 'source': {'key': 'source', 'type': 'GalleryArtifactSource'}, - } - - def __init__(self, *, source, target_regions=None, **kwargs) -> None: - super(GalleryArtifactPublishingProfileBase, self).__init__(**kwargs) - self.target_regions = target_regions - self.source = source diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/gallery_artifact_source.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/gallery_artifact_source.py deleted file mode 100644 index 7e653ff73b50..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/gallery_artifact_source.py +++ /dev/null @@ -1,35 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class GalleryArtifactSource(Model): - """The source image from which the Image Version is going to be created. - - All required parameters must be populated in order to send to Azure. - - :param managed_image: Required. - :type managed_image: - ~azure.mgmt.compute.v2018_06_01.models.ManagedArtifact - """ - - _validation = { - 'managed_image': {'required': True}, - } - - _attribute_map = { - 'managed_image': {'key': 'managedImage', 'type': 'ManagedArtifact'}, - } - - def __init__(self, **kwargs): - super(GalleryArtifactSource, self).__init__(**kwargs) - self.managed_image = kwargs.get('managed_image', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/gallery_artifact_source_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/gallery_artifact_source_py3.py deleted file mode 100644 index 0428d4d3ce0b..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/gallery_artifact_source_py3.py +++ /dev/null @@ -1,35 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class GalleryArtifactSource(Model): - """The source image from which the Image Version is going to be created. - - All required parameters must be populated in order to send to Azure. - - :param managed_image: Required. - :type managed_image: - ~azure.mgmt.compute.v2018_06_01.models.ManagedArtifact - """ - - _validation = { - 'managed_image': {'required': True}, - } - - _attribute_map = { - 'managed_image': {'key': 'managedImage', 'type': 'ManagedArtifact'}, - } - - def __init__(self, *, managed_image, **kwargs) -> None: - super(GalleryArtifactSource, self).__init__(**kwargs) - self.managed_image = managed_image diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/gallery_data_disk_image.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/gallery_data_disk_image.py deleted file mode 100644 index fc5413c0f896..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/gallery_data_disk_image.py +++ /dev/null @@ -1,50 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .gallery_disk_image import GalleryDiskImage - - -class GalleryDataDiskImage(GalleryDiskImage): - """This is the data disk image. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar size_in_gb: This property indicates the size of the VHD to be - created. - :vartype size_in_gb: int - :ivar host_caching: The host caching of the disk. Valid values are 'None', - 'ReadOnly', and 'ReadWrite'. Possible values include: 'None', 'ReadOnly', - 'ReadWrite' - :vartype host_caching: str or - ~azure.mgmt.compute.v2018_06_01.models.HostCaching - :ivar lun: This property specifies the logical unit number of the data - disk. This value is used to identify data disks within the Virtual Machine - and therefore must be unique for each data disk attached to the Virtual - Machine. - :vartype lun: int - """ - - _validation = { - 'size_in_gb': {'readonly': True}, - 'host_caching': {'readonly': True}, - 'lun': {'readonly': True}, - } - - _attribute_map = { - 'size_in_gb': {'key': 'sizeInGB', 'type': 'int'}, - 'host_caching': {'key': 'hostCaching', 'type': 'HostCaching'}, - 'lun': {'key': 'lun', 'type': 'int'}, - } - - def __init__(self, **kwargs): - super(GalleryDataDiskImage, self).__init__(**kwargs) - self.lun = None diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/gallery_data_disk_image_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/gallery_data_disk_image_py3.py deleted file mode 100644 index a31d13a83397..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/gallery_data_disk_image_py3.py +++ /dev/null @@ -1,50 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .gallery_disk_image_py3 import GalleryDiskImage - - -class GalleryDataDiskImage(GalleryDiskImage): - """This is the data disk image. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar size_in_gb: This property indicates the size of the VHD to be - created. - :vartype size_in_gb: int - :ivar host_caching: The host caching of the disk. Valid values are 'None', - 'ReadOnly', and 'ReadWrite'. Possible values include: 'None', 'ReadOnly', - 'ReadWrite' - :vartype host_caching: str or - ~azure.mgmt.compute.v2018_06_01.models.HostCaching - :ivar lun: This property specifies the logical unit number of the data - disk. This value is used to identify data disks within the Virtual Machine - and therefore must be unique for each data disk attached to the Virtual - Machine. - :vartype lun: int - """ - - _validation = { - 'size_in_gb': {'readonly': True}, - 'host_caching': {'readonly': True}, - 'lun': {'readonly': True}, - } - - _attribute_map = { - 'size_in_gb': {'key': 'sizeInGB', 'type': 'int'}, - 'host_caching': {'key': 'hostCaching', 'type': 'HostCaching'}, - 'lun': {'key': 'lun', 'type': 'int'}, - } - - def __init__(self, **kwargs) -> None: - super(GalleryDataDiskImage, self).__init__(**kwargs) - self.lun = None diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/gallery_disk_image.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/gallery_disk_image.py deleted file mode 100644 index 58ea87f0af3a..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/gallery_disk_image.py +++ /dev/null @@ -1,44 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class GalleryDiskImage(Model): - """This is the disk image base class. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar size_in_gb: This property indicates the size of the VHD to be - created. - :vartype size_in_gb: int - :ivar host_caching: The host caching of the disk. Valid values are 'None', - 'ReadOnly', and 'ReadWrite'. Possible values include: 'None', 'ReadOnly', - 'ReadWrite' - :vartype host_caching: str or - ~azure.mgmt.compute.v2018_06_01.models.HostCaching - """ - - _validation = { - 'size_in_gb': {'readonly': True}, - 'host_caching': {'readonly': True}, - } - - _attribute_map = { - 'size_in_gb': {'key': 'sizeInGB', 'type': 'int'}, - 'host_caching': {'key': 'hostCaching', 'type': 'HostCaching'}, - } - - def __init__(self, **kwargs): - super(GalleryDiskImage, self).__init__(**kwargs) - self.size_in_gb = None - self.host_caching = None diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/gallery_disk_image_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/gallery_disk_image_py3.py deleted file mode 100644 index 44f832029d60..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/gallery_disk_image_py3.py +++ /dev/null @@ -1,44 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class GalleryDiskImage(Model): - """This is the disk image base class. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar size_in_gb: This property indicates the size of the VHD to be - created. - :vartype size_in_gb: int - :ivar host_caching: The host caching of the disk. Valid values are 'None', - 'ReadOnly', and 'ReadWrite'. Possible values include: 'None', 'ReadOnly', - 'ReadWrite' - :vartype host_caching: str or - ~azure.mgmt.compute.v2018_06_01.models.HostCaching - """ - - _validation = { - 'size_in_gb': {'readonly': True}, - 'host_caching': {'readonly': True}, - } - - _attribute_map = { - 'size_in_gb': {'key': 'sizeInGB', 'type': 'int'}, - 'host_caching': {'key': 'hostCaching', 'type': 'HostCaching'}, - } - - def __init__(self, **kwargs) -> None: - super(GalleryDiskImage, self).__init__(**kwargs) - self.size_in_gb = None - self.host_caching = None diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/gallery_identifier.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/gallery_identifier.py deleted file mode 100644 index 324d20c34cfd..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/gallery_identifier.py +++ /dev/null @@ -1,36 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class GalleryIdentifier(Model): - """Describes the gallery unique name. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar unique_name: The unique name of the Shared Image Gallery. This name - is generated automatically by Azure. - :vartype unique_name: str - """ - - _validation = { - 'unique_name': {'readonly': True}, - } - - _attribute_map = { - 'unique_name': {'key': 'uniqueName', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(GalleryIdentifier, self).__init__(**kwargs) - self.unique_name = None diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/gallery_identifier_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/gallery_identifier_py3.py deleted file mode 100644 index d7279159b636..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/gallery_identifier_py3.py +++ /dev/null @@ -1,36 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class GalleryIdentifier(Model): - """Describes the gallery unique name. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar unique_name: The unique name of the Shared Image Gallery. This name - is generated automatically by Azure. - :vartype unique_name: str - """ - - _validation = { - 'unique_name': {'readonly': True}, - } - - _attribute_map = { - 'unique_name': {'key': 'uniqueName', 'type': 'str'}, - } - - def __init__(self, **kwargs) -> None: - super(GalleryIdentifier, self).__init__(**kwargs) - self.unique_name = None diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/gallery_image.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/gallery_image.py deleted file mode 100644 index 65a59f68ee6b..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/gallery_image.py +++ /dev/null @@ -1,120 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource import Resource - - -class GalleryImage(Resource): - """Specifies information about the gallery Image Definition that you want to - create or update. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource Id - :vartype id: str - :ivar name: Resource name - :vartype name: str - :ivar type: Resource type - :vartype type: str - :param location: Required. Resource location - :type location: str - :param tags: Resource tags - :type tags: dict[str, str] - :param description: The description of this gallery Image Definition - resource. This property is updatable. - :type description: str - :param eula: The Eula agreement for the gallery Image Definition. - :type eula: str - :param privacy_statement_uri: The privacy statement uri. - :type privacy_statement_uri: str - :param release_note_uri: The release note uri. - :type release_note_uri: str - :param os_type: Required. This property allows you to specify the type of - the OS that is included in the disk when creating a VM from a managed - image.

    Possible values are:

    **Windows**

    - **Linux**. Possible values include: 'Windows', 'Linux' - :type os_type: str or - ~azure.mgmt.compute.v2018_06_01.models.OperatingSystemTypes - :param os_state: Required. The allowed values for OS State are - 'Generalized'. Possible values include: 'Generalized', 'Specialized' - :type os_state: str or - ~azure.mgmt.compute.v2018_06_01.models.OperatingSystemStateTypes - :param end_of_life_date: The end of life date of the gallery Image - Definition. This property can be used for decommissioning purposes. This - property is updatable. - :type end_of_life_date: datetime - :param identifier: Required. - :type identifier: - ~azure.mgmt.compute.v2018_06_01.models.GalleryImageIdentifier - :param recommended: - :type recommended: - ~azure.mgmt.compute.v2018_06_01.models.RecommendedMachineConfiguration - :param disallowed: - :type disallowed: ~azure.mgmt.compute.v2018_06_01.models.Disallowed - :param purchase_plan: - :type purchase_plan: - ~azure.mgmt.compute.v2018_06_01.models.ImagePurchasePlan - :ivar provisioning_state: The current state of the gallery Image - Definition. The provisioning state, which only appears in the response. - Possible values include: 'Creating', 'Updating', 'Failed', 'Succeeded', - 'Deleting', 'Migrating' - :vartype provisioning_state: str or - ~azure.mgmt.compute.v2018_06_01.models.enum - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - 'os_type': {'required': True}, - 'os_state': {'required': True}, - 'identifier': {'required': True}, - 'provisioning_state': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'description': {'key': 'properties.description', 'type': 'str'}, - 'eula': {'key': 'properties.eula', 'type': 'str'}, - 'privacy_statement_uri': {'key': 'properties.privacyStatementUri', 'type': 'str'}, - 'release_note_uri': {'key': 'properties.releaseNoteUri', 'type': 'str'}, - 'os_type': {'key': 'properties.osType', 'type': 'OperatingSystemTypes'}, - 'os_state': {'key': 'properties.osState', 'type': 'OperatingSystemStateTypes'}, - 'end_of_life_date': {'key': 'properties.endOfLifeDate', 'type': 'iso-8601'}, - 'identifier': {'key': 'properties.identifier', 'type': 'GalleryImageIdentifier'}, - 'recommended': {'key': 'properties.recommended', 'type': 'RecommendedMachineConfiguration'}, - 'disallowed': {'key': 'properties.disallowed', 'type': 'Disallowed'}, - 'purchase_plan': {'key': 'properties.purchasePlan', 'type': 'ImagePurchasePlan'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(GalleryImage, self).__init__(**kwargs) - self.description = kwargs.get('description', None) - self.eula = kwargs.get('eula', None) - self.privacy_statement_uri = kwargs.get('privacy_statement_uri', None) - self.release_note_uri = kwargs.get('release_note_uri', None) - self.os_type = kwargs.get('os_type', None) - self.os_state = kwargs.get('os_state', None) - self.end_of_life_date = kwargs.get('end_of_life_date', None) - self.identifier = kwargs.get('identifier', None) - self.recommended = kwargs.get('recommended', None) - self.disallowed = kwargs.get('disallowed', None) - self.purchase_plan = kwargs.get('purchase_plan', None) - self.provisioning_state = None diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/gallery_image_identifier.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/gallery_image_identifier.py deleted file mode 100644 index 15699690de5e..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/gallery_image_identifier.py +++ /dev/null @@ -1,45 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class GalleryImageIdentifier(Model): - """This is the gallery Image Definition identifier. - - All required parameters must be populated in order to send to Azure. - - :param publisher: Required. The name of the gallery Image Definition - publisher. - :type publisher: str - :param offer: Required. The name of the gallery Image Definition offer. - :type offer: str - :param sku: Required. The name of the gallery Image Definition SKU. - :type sku: str - """ - - _validation = { - 'publisher': {'required': True}, - 'offer': {'required': True}, - 'sku': {'required': True}, - } - - _attribute_map = { - 'publisher': {'key': 'publisher', 'type': 'str'}, - 'offer': {'key': 'offer', 'type': 'str'}, - 'sku': {'key': 'sku', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(GalleryImageIdentifier, self).__init__(**kwargs) - self.publisher = kwargs.get('publisher', None) - self.offer = kwargs.get('offer', None) - self.sku = kwargs.get('sku', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/gallery_image_identifier_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/gallery_image_identifier_py3.py deleted file mode 100644 index 3876526cebe4..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/gallery_image_identifier_py3.py +++ /dev/null @@ -1,45 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class GalleryImageIdentifier(Model): - """This is the gallery Image Definition identifier. - - All required parameters must be populated in order to send to Azure. - - :param publisher: Required. The name of the gallery Image Definition - publisher. - :type publisher: str - :param offer: Required. The name of the gallery Image Definition offer. - :type offer: str - :param sku: Required. The name of the gallery Image Definition SKU. - :type sku: str - """ - - _validation = { - 'publisher': {'required': True}, - 'offer': {'required': True}, - 'sku': {'required': True}, - } - - _attribute_map = { - 'publisher': {'key': 'publisher', 'type': 'str'}, - 'offer': {'key': 'offer', 'type': 'str'}, - 'sku': {'key': 'sku', 'type': 'str'}, - } - - def __init__(self, *, publisher: str, offer: str, sku: str, **kwargs) -> None: - super(GalleryImageIdentifier, self).__init__(**kwargs) - self.publisher = publisher - self.offer = offer - self.sku = sku diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/gallery_image_paged.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/gallery_image_paged.py deleted file mode 100644 index 33a318d5f30d..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/gallery_image_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class GalleryImagePaged(Paged): - """ - A paging container for iterating over a list of :class:`GalleryImage ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[GalleryImage]'} - } - - def __init__(self, *args, **kwargs): - - super(GalleryImagePaged, self).__init__(*args, **kwargs) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/gallery_image_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/gallery_image_py3.py deleted file mode 100644 index 1540b82348fa..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/gallery_image_py3.py +++ /dev/null @@ -1,120 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource_py3 import Resource - - -class GalleryImage(Resource): - """Specifies information about the gallery Image Definition that you want to - create or update. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource Id - :vartype id: str - :ivar name: Resource name - :vartype name: str - :ivar type: Resource type - :vartype type: str - :param location: Required. Resource location - :type location: str - :param tags: Resource tags - :type tags: dict[str, str] - :param description: The description of this gallery Image Definition - resource. This property is updatable. - :type description: str - :param eula: The Eula agreement for the gallery Image Definition. - :type eula: str - :param privacy_statement_uri: The privacy statement uri. - :type privacy_statement_uri: str - :param release_note_uri: The release note uri. - :type release_note_uri: str - :param os_type: Required. This property allows you to specify the type of - the OS that is included in the disk when creating a VM from a managed - image.

    Possible values are:

    **Windows**

    - **Linux**. Possible values include: 'Windows', 'Linux' - :type os_type: str or - ~azure.mgmt.compute.v2018_06_01.models.OperatingSystemTypes - :param os_state: Required. The allowed values for OS State are - 'Generalized'. Possible values include: 'Generalized', 'Specialized' - :type os_state: str or - ~azure.mgmt.compute.v2018_06_01.models.OperatingSystemStateTypes - :param end_of_life_date: The end of life date of the gallery Image - Definition. This property can be used for decommissioning purposes. This - property is updatable. - :type end_of_life_date: datetime - :param identifier: Required. - :type identifier: - ~azure.mgmt.compute.v2018_06_01.models.GalleryImageIdentifier - :param recommended: - :type recommended: - ~azure.mgmt.compute.v2018_06_01.models.RecommendedMachineConfiguration - :param disallowed: - :type disallowed: ~azure.mgmt.compute.v2018_06_01.models.Disallowed - :param purchase_plan: - :type purchase_plan: - ~azure.mgmt.compute.v2018_06_01.models.ImagePurchasePlan - :ivar provisioning_state: The current state of the gallery Image - Definition. The provisioning state, which only appears in the response. - Possible values include: 'Creating', 'Updating', 'Failed', 'Succeeded', - 'Deleting', 'Migrating' - :vartype provisioning_state: str or - ~azure.mgmt.compute.v2018_06_01.models.enum - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - 'os_type': {'required': True}, - 'os_state': {'required': True}, - 'identifier': {'required': True}, - 'provisioning_state': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'description': {'key': 'properties.description', 'type': 'str'}, - 'eula': {'key': 'properties.eula', 'type': 'str'}, - 'privacy_statement_uri': {'key': 'properties.privacyStatementUri', 'type': 'str'}, - 'release_note_uri': {'key': 'properties.releaseNoteUri', 'type': 'str'}, - 'os_type': {'key': 'properties.osType', 'type': 'OperatingSystemTypes'}, - 'os_state': {'key': 'properties.osState', 'type': 'OperatingSystemStateTypes'}, - 'end_of_life_date': {'key': 'properties.endOfLifeDate', 'type': 'iso-8601'}, - 'identifier': {'key': 'properties.identifier', 'type': 'GalleryImageIdentifier'}, - 'recommended': {'key': 'properties.recommended', 'type': 'RecommendedMachineConfiguration'}, - 'disallowed': {'key': 'properties.disallowed', 'type': 'Disallowed'}, - 'purchase_plan': {'key': 'properties.purchasePlan', 'type': 'ImagePurchasePlan'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - } - - def __init__(self, *, location: str, os_type, os_state, identifier, tags=None, description: str=None, eula: str=None, privacy_statement_uri: str=None, release_note_uri: str=None, end_of_life_date=None, recommended=None, disallowed=None, purchase_plan=None, **kwargs) -> None: - super(GalleryImage, self).__init__(location=location, tags=tags, **kwargs) - self.description = description - self.eula = eula - self.privacy_statement_uri = privacy_statement_uri - self.release_note_uri = release_note_uri - self.os_type = os_type - self.os_state = os_state - self.end_of_life_date = end_of_life_date - self.identifier = identifier - self.recommended = recommended - self.disallowed = disallowed - self.purchase_plan = purchase_plan - self.provisioning_state = None diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/gallery_image_version.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/gallery_image_version.py deleted file mode 100644 index 56db99959d98..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/gallery_image_version.py +++ /dev/null @@ -1,79 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource import Resource - - -class GalleryImageVersion(Resource): - """Specifies information about the gallery Image Version that you want to - create or update. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource Id - :vartype id: str - :ivar name: Resource name - :vartype name: str - :ivar type: Resource type - :vartype type: str - :param location: Required. Resource location - :type location: str - :param tags: Resource tags - :type tags: dict[str, str] - :param publishing_profile: Required. - :type publishing_profile: - ~azure.mgmt.compute.v2018_06_01.models.GalleryImageVersionPublishingProfile - :ivar provisioning_state: The current state of the gallery Image Version. - The provisioning state, which only appears in the response. Possible - values include: 'Creating', 'Updating', 'Failed', 'Succeeded', 'Deleting', - 'Migrating' - :vartype provisioning_state: str or - ~azure.mgmt.compute.v2018_06_01.models.enum - :ivar storage_profile: - :vartype storage_profile: - ~azure.mgmt.compute.v2018_06_01.models.GalleryImageVersionStorageProfile - :ivar replication_status: - :vartype replication_status: - ~azure.mgmt.compute.v2018_06_01.models.ReplicationStatus - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - 'publishing_profile': {'required': True}, - 'provisioning_state': {'readonly': True}, - 'storage_profile': {'readonly': True}, - 'replication_status': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'publishing_profile': {'key': 'properties.publishingProfile', 'type': 'GalleryImageVersionPublishingProfile'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'storage_profile': {'key': 'properties.storageProfile', 'type': 'GalleryImageVersionStorageProfile'}, - 'replication_status': {'key': 'properties.replicationStatus', 'type': 'ReplicationStatus'}, - } - - def __init__(self, **kwargs): - super(GalleryImageVersion, self).__init__(**kwargs) - self.publishing_profile = kwargs.get('publishing_profile', None) - self.provisioning_state = None - self.storage_profile = None - self.replication_status = None diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/gallery_image_version_paged.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/gallery_image_version_paged.py deleted file mode 100644 index 3e87c3b3f77f..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/gallery_image_version_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class GalleryImageVersionPaged(Paged): - """ - A paging container for iterating over a list of :class:`GalleryImageVersion ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[GalleryImageVersion]'} - } - - def __init__(self, *args, **kwargs): - - super(GalleryImageVersionPaged, self).__init__(*args, **kwargs) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/gallery_image_version_publishing_profile.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/gallery_image_version_publishing_profile.py deleted file mode 100644 index 30823fee0552..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/gallery_image_version_publishing_profile.py +++ /dev/null @@ -1,64 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .gallery_artifact_publishing_profile_base import GalleryArtifactPublishingProfileBase - - -class GalleryImageVersionPublishingProfile(GalleryArtifactPublishingProfileBase): - """The publishing profile of a gallery Image Version. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :param target_regions: The target regions where the Image Version is going - to be replicated to. This property is updatable. - :type target_regions: - list[~azure.mgmt.compute.v2018_06_01.models.TargetRegion] - :param source: Required. - :type source: ~azure.mgmt.compute.v2018_06_01.models.GalleryArtifactSource - :param replica_count: The number of replicas of the Image Version to be - created per region. This property would take effect for a region when - regionalReplicaCount is not specified. This property is updatable. - :type replica_count: int - :param exclude_from_latest: If set to true, Virtual Machines deployed from - the latest version of the Image Definition won't use this Image Version. - :type exclude_from_latest: bool - :ivar published_date: The timestamp for when the gallery Image Version is - published. - :vartype published_date: datetime - :param end_of_life_date: The end of life date of the gallery Image - Version. This property can be used for decommissioning purposes. This - property is updatable. - :type end_of_life_date: datetime - """ - - _validation = { - 'source': {'required': True}, - 'published_date': {'readonly': True}, - } - - _attribute_map = { - 'target_regions': {'key': 'targetRegions', 'type': '[TargetRegion]'}, - 'source': {'key': 'source', 'type': 'GalleryArtifactSource'}, - 'replica_count': {'key': 'replicaCount', 'type': 'int'}, - 'exclude_from_latest': {'key': 'excludeFromLatest', 'type': 'bool'}, - 'published_date': {'key': 'publishedDate', 'type': 'iso-8601'}, - 'end_of_life_date': {'key': 'endOfLifeDate', 'type': 'iso-8601'}, - } - - def __init__(self, **kwargs): - super(GalleryImageVersionPublishingProfile, self).__init__(**kwargs) - self.replica_count = kwargs.get('replica_count', None) - self.exclude_from_latest = kwargs.get('exclude_from_latest', None) - self.published_date = None - self.end_of_life_date = kwargs.get('end_of_life_date', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/gallery_image_version_publishing_profile_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/gallery_image_version_publishing_profile_py3.py deleted file mode 100644 index d88f2b05afe1..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/gallery_image_version_publishing_profile_py3.py +++ /dev/null @@ -1,64 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .gallery_artifact_publishing_profile_base_py3 import GalleryArtifactPublishingProfileBase - - -class GalleryImageVersionPublishingProfile(GalleryArtifactPublishingProfileBase): - """The publishing profile of a gallery Image Version. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :param target_regions: The target regions where the Image Version is going - to be replicated to. This property is updatable. - :type target_regions: - list[~azure.mgmt.compute.v2018_06_01.models.TargetRegion] - :param source: Required. - :type source: ~azure.mgmt.compute.v2018_06_01.models.GalleryArtifactSource - :param replica_count: The number of replicas of the Image Version to be - created per region. This property would take effect for a region when - regionalReplicaCount is not specified. This property is updatable. - :type replica_count: int - :param exclude_from_latest: If set to true, Virtual Machines deployed from - the latest version of the Image Definition won't use this Image Version. - :type exclude_from_latest: bool - :ivar published_date: The timestamp for when the gallery Image Version is - published. - :vartype published_date: datetime - :param end_of_life_date: The end of life date of the gallery Image - Version. This property can be used for decommissioning purposes. This - property is updatable. - :type end_of_life_date: datetime - """ - - _validation = { - 'source': {'required': True}, - 'published_date': {'readonly': True}, - } - - _attribute_map = { - 'target_regions': {'key': 'targetRegions', 'type': '[TargetRegion]'}, - 'source': {'key': 'source', 'type': 'GalleryArtifactSource'}, - 'replica_count': {'key': 'replicaCount', 'type': 'int'}, - 'exclude_from_latest': {'key': 'excludeFromLatest', 'type': 'bool'}, - 'published_date': {'key': 'publishedDate', 'type': 'iso-8601'}, - 'end_of_life_date': {'key': 'endOfLifeDate', 'type': 'iso-8601'}, - } - - def __init__(self, *, source, target_regions=None, replica_count: int=None, exclude_from_latest: bool=None, end_of_life_date=None, **kwargs) -> None: - super(GalleryImageVersionPublishingProfile, self).__init__(target_regions=target_regions, source=source, **kwargs) - self.replica_count = replica_count - self.exclude_from_latest = exclude_from_latest - self.published_date = None - self.end_of_life_date = end_of_life_date diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/gallery_image_version_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/gallery_image_version_py3.py deleted file mode 100644 index 61890bef61d4..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/gallery_image_version_py3.py +++ /dev/null @@ -1,79 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource_py3 import Resource - - -class GalleryImageVersion(Resource): - """Specifies information about the gallery Image Version that you want to - create or update. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource Id - :vartype id: str - :ivar name: Resource name - :vartype name: str - :ivar type: Resource type - :vartype type: str - :param location: Required. Resource location - :type location: str - :param tags: Resource tags - :type tags: dict[str, str] - :param publishing_profile: Required. - :type publishing_profile: - ~azure.mgmt.compute.v2018_06_01.models.GalleryImageVersionPublishingProfile - :ivar provisioning_state: The current state of the gallery Image Version. - The provisioning state, which only appears in the response. Possible - values include: 'Creating', 'Updating', 'Failed', 'Succeeded', 'Deleting', - 'Migrating' - :vartype provisioning_state: str or - ~azure.mgmt.compute.v2018_06_01.models.enum - :ivar storage_profile: - :vartype storage_profile: - ~azure.mgmt.compute.v2018_06_01.models.GalleryImageVersionStorageProfile - :ivar replication_status: - :vartype replication_status: - ~azure.mgmt.compute.v2018_06_01.models.ReplicationStatus - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - 'publishing_profile': {'required': True}, - 'provisioning_state': {'readonly': True}, - 'storage_profile': {'readonly': True}, - 'replication_status': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'publishing_profile': {'key': 'properties.publishingProfile', 'type': 'GalleryImageVersionPublishingProfile'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'storage_profile': {'key': 'properties.storageProfile', 'type': 'GalleryImageVersionStorageProfile'}, - 'replication_status': {'key': 'properties.replicationStatus', 'type': 'ReplicationStatus'}, - } - - def __init__(self, *, location: str, publishing_profile, tags=None, **kwargs) -> None: - super(GalleryImageVersion, self).__init__(location=location, tags=tags, **kwargs) - self.publishing_profile = publishing_profile - self.provisioning_state = None - self.storage_profile = None - self.replication_status = None diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/gallery_image_version_storage_profile.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/gallery_image_version_storage_profile.py deleted file mode 100644 index b9deddba3ad0..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/gallery_image_version_storage_profile.py +++ /dev/null @@ -1,42 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class GalleryImageVersionStorageProfile(Model): - """This is the storage profile of a gallery Image Version. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar os_disk_image: - :vartype os_disk_image: - ~azure.mgmt.compute.v2018_06_01.models.GalleryOSDiskImage - :ivar data_disk_images: A list of data disk images. - :vartype data_disk_images: - list[~azure.mgmt.compute.v2018_06_01.models.GalleryDataDiskImage] - """ - - _validation = { - 'os_disk_image': {'readonly': True}, - 'data_disk_images': {'readonly': True}, - } - - _attribute_map = { - 'os_disk_image': {'key': 'osDiskImage', 'type': 'GalleryOSDiskImage'}, - 'data_disk_images': {'key': 'dataDiskImages', 'type': '[GalleryDataDiskImage]'}, - } - - def __init__(self, **kwargs): - super(GalleryImageVersionStorageProfile, self).__init__(**kwargs) - self.os_disk_image = None - self.data_disk_images = None diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/gallery_image_version_storage_profile_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/gallery_image_version_storage_profile_py3.py deleted file mode 100644 index 9703a40fe507..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/gallery_image_version_storage_profile_py3.py +++ /dev/null @@ -1,42 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class GalleryImageVersionStorageProfile(Model): - """This is the storage profile of a gallery Image Version. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar os_disk_image: - :vartype os_disk_image: - ~azure.mgmt.compute.v2018_06_01.models.GalleryOSDiskImage - :ivar data_disk_images: A list of data disk images. - :vartype data_disk_images: - list[~azure.mgmt.compute.v2018_06_01.models.GalleryDataDiskImage] - """ - - _validation = { - 'os_disk_image': {'readonly': True}, - 'data_disk_images': {'readonly': True}, - } - - _attribute_map = { - 'os_disk_image': {'key': 'osDiskImage', 'type': 'GalleryOSDiskImage'}, - 'data_disk_images': {'key': 'dataDiskImages', 'type': '[GalleryDataDiskImage]'}, - } - - def __init__(self, **kwargs) -> None: - super(GalleryImageVersionStorageProfile, self).__init__(**kwargs) - self.os_disk_image = None - self.data_disk_images = None diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/gallery_os_disk_image.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/gallery_os_disk_image.py deleted file mode 100644 index 6ed9165cd45f..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/gallery_os_disk_image.py +++ /dev/null @@ -1,42 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .gallery_disk_image import GalleryDiskImage - - -class GalleryOSDiskImage(GalleryDiskImage): - """This is the OS disk image. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar size_in_gb: This property indicates the size of the VHD to be - created. - :vartype size_in_gb: int - :ivar host_caching: The host caching of the disk. Valid values are 'None', - 'ReadOnly', and 'ReadWrite'. Possible values include: 'None', 'ReadOnly', - 'ReadWrite' - :vartype host_caching: str or - ~azure.mgmt.compute.v2018_06_01.models.HostCaching - """ - - _validation = { - 'size_in_gb': {'readonly': True}, - 'host_caching': {'readonly': True}, - } - - _attribute_map = { - 'size_in_gb': {'key': 'sizeInGB', 'type': 'int'}, - 'host_caching': {'key': 'hostCaching', 'type': 'HostCaching'}, - } - - def __init__(self, **kwargs): - super(GalleryOSDiskImage, self).__init__(**kwargs) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/gallery_os_disk_image_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/gallery_os_disk_image_py3.py deleted file mode 100644 index 52a0833d369d..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/gallery_os_disk_image_py3.py +++ /dev/null @@ -1,42 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .gallery_disk_image_py3 import GalleryDiskImage - - -class GalleryOSDiskImage(GalleryDiskImage): - """This is the OS disk image. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar size_in_gb: This property indicates the size of the VHD to be - created. - :vartype size_in_gb: int - :ivar host_caching: The host caching of the disk. Valid values are 'None', - 'ReadOnly', and 'ReadWrite'. Possible values include: 'None', 'ReadOnly', - 'ReadWrite' - :vartype host_caching: str or - ~azure.mgmt.compute.v2018_06_01.models.HostCaching - """ - - _validation = { - 'size_in_gb': {'readonly': True}, - 'host_caching': {'readonly': True}, - } - - _attribute_map = { - 'size_in_gb': {'key': 'sizeInGB', 'type': 'int'}, - 'host_caching': {'key': 'hostCaching', 'type': 'HostCaching'}, - } - - def __init__(self, **kwargs) -> None: - super(GalleryOSDiskImage, self).__init__(**kwargs) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/gallery_paged.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/gallery_paged.py deleted file mode 100644 index 4b9ba1b78cee..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/gallery_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class GalleryPaged(Paged): - """ - A paging container for iterating over a list of :class:`Gallery ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[Gallery]'} - } - - def __init__(self, *args, **kwargs): - - super(GalleryPaged, self).__init__(*args, **kwargs) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/gallery_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/gallery_py3.py deleted file mode 100644 index 453d52c40c5d..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/gallery_py3.py +++ /dev/null @@ -1,70 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource_py3 import Resource - - -class Gallery(Resource): - """Specifies information about the Shared Image Gallery that you want to - create or update. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource Id - :vartype id: str - :ivar name: Resource name - :vartype name: str - :ivar type: Resource type - :vartype type: str - :param location: Required. Resource location - :type location: str - :param tags: Resource tags - :type tags: dict[str, str] - :param description: The description of this Shared Image Gallery resource. - This property is updatable. - :type description: str - :param identifier: - :type identifier: ~azure.mgmt.compute.v2018_06_01.models.GalleryIdentifier - :ivar provisioning_state: The current state of the gallery. The - provisioning state, which only appears in the response. Possible values - include: 'Creating', 'Updating', 'Failed', 'Succeeded', 'Deleting', - 'Migrating' - :vartype provisioning_state: str or - ~azure.mgmt.compute.v2018_06_01.models.enum - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - 'provisioning_state': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'description': {'key': 'properties.description', 'type': 'str'}, - 'identifier': {'key': 'properties.identifier', 'type': 'GalleryIdentifier'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - } - - def __init__(self, *, location: str, tags=None, description: str=None, identifier=None, **kwargs) -> None: - super(Gallery, self).__init__(location=location, tags=tags, **kwargs) - self.description = description - self.identifier = identifier - self.provisioning_state = None diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/grant_access_data.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/grant_access_data.py deleted file mode 100644 index 39d400ba48f5..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/grant_access_data.py +++ /dev/null @@ -1,40 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class GrantAccessData(Model): - """Data used for requesting a SAS. - - All required parameters must be populated in order to send to Azure. - - :param access: Required. Possible values include: 'None', 'Read' - :type access: str or ~azure.mgmt.compute.v2018_06_01.models.AccessLevel - :param duration_in_seconds: Required. Time duration in seconds until the - SAS access expires. - :type duration_in_seconds: int - """ - - _validation = { - 'access': {'required': True}, - 'duration_in_seconds': {'required': True}, - } - - _attribute_map = { - 'access': {'key': 'access', 'type': 'str'}, - 'duration_in_seconds': {'key': 'durationInSeconds', 'type': 'int'}, - } - - def __init__(self, **kwargs): - super(GrantAccessData, self).__init__(**kwargs) - self.access = kwargs.get('access', None) - self.duration_in_seconds = kwargs.get('duration_in_seconds', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/grant_access_data_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/grant_access_data_py3.py deleted file mode 100644 index fe8ce77f24ee..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/grant_access_data_py3.py +++ /dev/null @@ -1,40 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class GrantAccessData(Model): - """Data used for requesting a SAS. - - All required parameters must be populated in order to send to Azure. - - :param access: Required. Possible values include: 'None', 'Read' - :type access: str or ~azure.mgmt.compute.v2018_06_01.models.AccessLevel - :param duration_in_seconds: Required. Time duration in seconds until the - SAS access expires. - :type duration_in_seconds: int - """ - - _validation = { - 'access': {'required': True}, - 'duration_in_seconds': {'required': True}, - } - - _attribute_map = { - 'access': {'key': 'access', 'type': 'str'}, - 'duration_in_seconds': {'key': 'durationInSeconds', 'type': 'int'}, - } - - def __init__(self, *, access, duration_in_seconds: int, **kwargs) -> None: - super(GrantAccessData, self).__init__(**kwargs) - self.access = access - self.duration_in_seconds = duration_in_seconds diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/hardware_profile.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/hardware_profile.py deleted file mode 100644 index 4d0bee440154..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/hardware_profile.py +++ /dev/null @@ -1,85 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class HardwareProfile(Model): - """Specifies the hardware settings for the virtual machine. - - :param vm_size: Specifies the size of the virtual machine. For more - information about virtual machine sizes, see [Sizes for virtual - machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-sizes?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). -

    The available VM sizes depend on region and availability set. For - a list of available sizes use these APIs:

    [List all available - virtual machine sizes in an availability - set](https://docs.microsoft.com/rest/api/compute/availabilitysets/listavailablesizes) -

    [List all available virtual machine sizes in a - region](https://docs.microsoft.com/rest/api/compute/virtualmachinesizes/list) -

    [List all available virtual machine sizes for - resizing](https://docs.microsoft.com/rest/api/compute/virtualmachines/listavailablesizes). - Possible values include: 'Basic_A0', 'Basic_A1', 'Basic_A2', 'Basic_A3', - 'Basic_A4', 'Standard_A0', 'Standard_A1', 'Standard_A2', 'Standard_A3', - 'Standard_A4', 'Standard_A5', 'Standard_A6', 'Standard_A7', 'Standard_A8', - 'Standard_A9', 'Standard_A10', 'Standard_A11', 'Standard_A1_v2', - 'Standard_A2_v2', 'Standard_A4_v2', 'Standard_A8_v2', 'Standard_A2m_v2', - 'Standard_A4m_v2', 'Standard_A8m_v2', 'Standard_B1s', 'Standard_B1ms', - 'Standard_B2s', 'Standard_B2ms', 'Standard_B4ms', 'Standard_B8ms', - 'Standard_D1', 'Standard_D2', 'Standard_D3', 'Standard_D4', - 'Standard_D11', 'Standard_D12', 'Standard_D13', 'Standard_D14', - 'Standard_D1_v2', 'Standard_D2_v2', 'Standard_D3_v2', 'Standard_D4_v2', - 'Standard_D5_v2', 'Standard_D2_v3', 'Standard_D4_v3', 'Standard_D8_v3', - 'Standard_D16_v3', 'Standard_D32_v3', 'Standard_D64_v3', - 'Standard_D2s_v3', 'Standard_D4s_v3', 'Standard_D8s_v3', - 'Standard_D16s_v3', 'Standard_D32s_v3', 'Standard_D64s_v3', - 'Standard_D11_v2', 'Standard_D12_v2', 'Standard_D13_v2', - 'Standard_D14_v2', 'Standard_D15_v2', 'Standard_DS1', 'Standard_DS2', - 'Standard_DS3', 'Standard_DS4', 'Standard_DS11', 'Standard_DS12', - 'Standard_DS13', 'Standard_DS14', 'Standard_DS1_v2', 'Standard_DS2_v2', - 'Standard_DS3_v2', 'Standard_DS4_v2', 'Standard_DS5_v2', - 'Standard_DS11_v2', 'Standard_DS12_v2', 'Standard_DS13_v2', - 'Standard_DS14_v2', 'Standard_DS15_v2', 'Standard_DS13-4_v2', - 'Standard_DS13-2_v2', 'Standard_DS14-8_v2', 'Standard_DS14-4_v2', - 'Standard_E2_v3', 'Standard_E4_v3', 'Standard_E8_v3', 'Standard_E16_v3', - 'Standard_E32_v3', 'Standard_E64_v3', 'Standard_E2s_v3', - 'Standard_E4s_v3', 'Standard_E8s_v3', 'Standard_E16s_v3', - 'Standard_E32s_v3', 'Standard_E64s_v3', 'Standard_E32-16_v3', - 'Standard_E32-8s_v3', 'Standard_E64-32s_v3', 'Standard_E64-16s_v3', - 'Standard_F1', 'Standard_F2', 'Standard_F4', 'Standard_F8', - 'Standard_F16', 'Standard_F1s', 'Standard_F2s', 'Standard_F4s', - 'Standard_F8s', 'Standard_F16s', 'Standard_F2s_v2', 'Standard_F4s_v2', - 'Standard_F8s_v2', 'Standard_F16s_v2', 'Standard_F32s_v2', - 'Standard_F64s_v2', 'Standard_F72s_v2', 'Standard_G1', 'Standard_G2', - 'Standard_G3', 'Standard_G4', 'Standard_G5', 'Standard_GS1', - 'Standard_GS2', 'Standard_GS3', 'Standard_GS4', 'Standard_GS5', - 'Standard_GS4-8', 'Standard_GS4-4', 'Standard_GS5-16', 'Standard_GS5-8', - 'Standard_H8', 'Standard_H16', 'Standard_H8m', 'Standard_H16m', - 'Standard_H16r', 'Standard_H16mr', 'Standard_L4s', 'Standard_L8s', - 'Standard_L16s', 'Standard_L32s', 'Standard_M64s', 'Standard_M64ms', - 'Standard_M128s', 'Standard_M128ms', 'Standard_M64-32ms', - 'Standard_M64-16ms', 'Standard_M128-64ms', 'Standard_M128-32ms', - 'Standard_NC6', 'Standard_NC12', 'Standard_NC24', 'Standard_NC24r', - 'Standard_NC6s_v2', 'Standard_NC12s_v2', 'Standard_NC24s_v2', - 'Standard_NC24rs_v2', 'Standard_NC6s_v3', 'Standard_NC12s_v3', - 'Standard_NC24s_v3', 'Standard_NC24rs_v3', 'Standard_ND6s', - 'Standard_ND12s', 'Standard_ND24s', 'Standard_ND24rs', 'Standard_NV6', - 'Standard_NV12', 'Standard_NV24' - :type vm_size: str or - ~azure.mgmt.compute.v2018_06_01.models.VirtualMachineSizeTypes - """ - - _attribute_map = { - 'vm_size': {'key': 'vmSize', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(HardwareProfile, self).__init__(**kwargs) - self.vm_size = kwargs.get('vm_size', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/hardware_profile_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/hardware_profile_py3.py deleted file mode 100644 index 39de37732177..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/hardware_profile_py3.py +++ /dev/null @@ -1,85 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class HardwareProfile(Model): - """Specifies the hardware settings for the virtual machine. - - :param vm_size: Specifies the size of the virtual machine. For more - information about virtual machine sizes, see [Sizes for virtual - machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-sizes?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). -

    The available VM sizes depend on region and availability set. For - a list of available sizes use these APIs:

    [List all available - virtual machine sizes in an availability - set](https://docs.microsoft.com/rest/api/compute/availabilitysets/listavailablesizes) -

    [List all available virtual machine sizes in a - region](https://docs.microsoft.com/rest/api/compute/virtualmachinesizes/list) -

    [List all available virtual machine sizes for - resizing](https://docs.microsoft.com/rest/api/compute/virtualmachines/listavailablesizes). - Possible values include: 'Basic_A0', 'Basic_A1', 'Basic_A2', 'Basic_A3', - 'Basic_A4', 'Standard_A0', 'Standard_A1', 'Standard_A2', 'Standard_A3', - 'Standard_A4', 'Standard_A5', 'Standard_A6', 'Standard_A7', 'Standard_A8', - 'Standard_A9', 'Standard_A10', 'Standard_A11', 'Standard_A1_v2', - 'Standard_A2_v2', 'Standard_A4_v2', 'Standard_A8_v2', 'Standard_A2m_v2', - 'Standard_A4m_v2', 'Standard_A8m_v2', 'Standard_B1s', 'Standard_B1ms', - 'Standard_B2s', 'Standard_B2ms', 'Standard_B4ms', 'Standard_B8ms', - 'Standard_D1', 'Standard_D2', 'Standard_D3', 'Standard_D4', - 'Standard_D11', 'Standard_D12', 'Standard_D13', 'Standard_D14', - 'Standard_D1_v2', 'Standard_D2_v2', 'Standard_D3_v2', 'Standard_D4_v2', - 'Standard_D5_v2', 'Standard_D2_v3', 'Standard_D4_v3', 'Standard_D8_v3', - 'Standard_D16_v3', 'Standard_D32_v3', 'Standard_D64_v3', - 'Standard_D2s_v3', 'Standard_D4s_v3', 'Standard_D8s_v3', - 'Standard_D16s_v3', 'Standard_D32s_v3', 'Standard_D64s_v3', - 'Standard_D11_v2', 'Standard_D12_v2', 'Standard_D13_v2', - 'Standard_D14_v2', 'Standard_D15_v2', 'Standard_DS1', 'Standard_DS2', - 'Standard_DS3', 'Standard_DS4', 'Standard_DS11', 'Standard_DS12', - 'Standard_DS13', 'Standard_DS14', 'Standard_DS1_v2', 'Standard_DS2_v2', - 'Standard_DS3_v2', 'Standard_DS4_v2', 'Standard_DS5_v2', - 'Standard_DS11_v2', 'Standard_DS12_v2', 'Standard_DS13_v2', - 'Standard_DS14_v2', 'Standard_DS15_v2', 'Standard_DS13-4_v2', - 'Standard_DS13-2_v2', 'Standard_DS14-8_v2', 'Standard_DS14-4_v2', - 'Standard_E2_v3', 'Standard_E4_v3', 'Standard_E8_v3', 'Standard_E16_v3', - 'Standard_E32_v3', 'Standard_E64_v3', 'Standard_E2s_v3', - 'Standard_E4s_v3', 'Standard_E8s_v3', 'Standard_E16s_v3', - 'Standard_E32s_v3', 'Standard_E64s_v3', 'Standard_E32-16_v3', - 'Standard_E32-8s_v3', 'Standard_E64-32s_v3', 'Standard_E64-16s_v3', - 'Standard_F1', 'Standard_F2', 'Standard_F4', 'Standard_F8', - 'Standard_F16', 'Standard_F1s', 'Standard_F2s', 'Standard_F4s', - 'Standard_F8s', 'Standard_F16s', 'Standard_F2s_v2', 'Standard_F4s_v2', - 'Standard_F8s_v2', 'Standard_F16s_v2', 'Standard_F32s_v2', - 'Standard_F64s_v2', 'Standard_F72s_v2', 'Standard_G1', 'Standard_G2', - 'Standard_G3', 'Standard_G4', 'Standard_G5', 'Standard_GS1', - 'Standard_GS2', 'Standard_GS3', 'Standard_GS4', 'Standard_GS5', - 'Standard_GS4-8', 'Standard_GS4-4', 'Standard_GS5-16', 'Standard_GS5-8', - 'Standard_H8', 'Standard_H16', 'Standard_H8m', 'Standard_H16m', - 'Standard_H16r', 'Standard_H16mr', 'Standard_L4s', 'Standard_L8s', - 'Standard_L16s', 'Standard_L32s', 'Standard_M64s', 'Standard_M64ms', - 'Standard_M128s', 'Standard_M128ms', 'Standard_M64-32ms', - 'Standard_M64-16ms', 'Standard_M128-64ms', 'Standard_M128-32ms', - 'Standard_NC6', 'Standard_NC12', 'Standard_NC24', 'Standard_NC24r', - 'Standard_NC6s_v2', 'Standard_NC12s_v2', 'Standard_NC24s_v2', - 'Standard_NC24rs_v2', 'Standard_NC6s_v3', 'Standard_NC12s_v3', - 'Standard_NC24s_v3', 'Standard_NC24rs_v3', 'Standard_ND6s', - 'Standard_ND12s', 'Standard_ND24s', 'Standard_ND24rs', 'Standard_NV6', - 'Standard_NV12', 'Standard_NV24' - :type vm_size: str or - ~azure.mgmt.compute.v2018_06_01.models.VirtualMachineSizeTypes - """ - - _attribute_map = { - 'vm_size': {'key': 'vmSize', 'type': 'str'}, - } - - def __init__(self, *, vm_size=None, **kwargs) -> None: - super(HardwareProfile, self).__init__(**kwargs) - self.vm_size = vm_size diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/image.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/image.py deleted file mode 100644 index b059cea001e2..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/image.py +++ /dev/null @@ -1,70 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource import Resource - - -class Image(Resource): - """The source user image virtual hard disk. The virtual hard disk will be - copied before being attached to the virtual machine. If SourceImage is - provided, the destination virtual hard drive must not exist. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource Id - :vartype id: str - :ivar name: Resource name - :vartype name: str - :ivar type: Resource type - :vartype type: str - :param location: Required. Resource location - :type location: str - :param tags: Resource tags - :type tags: dict[str, str] - :param source_virtual_machine: The source virtual machine from which Image - is created. - :type source_virtual_machine: - ~azure.mgmt.compute.v2018_06_01.models.SubResource - :param storage_profile: Specifies the storage settings for the virtual - machine disks. - :type storage_profile: - ~azure.mgmt.compute.v2018_06_01.models.ImageStorageProfile - :ivar provisioning_state: The provisioning state. - :vartype provisioning_state: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - 'provisioning_state': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'source_virtual_machine': {'key': 'properties.sourceVirtualMachine', 'type': 'SubResource'}, - 'storage_profile': {'key': 'properties.storageProfile', 'type': 'ImageStorageProfile'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(Image, self).__init__(**kwargs) - self.source_virtual_machine = kwargs.get('source_virtual_machine', None) - self.storage_profile = kwargs.get('storage_profile', None) - self.provisioning_state = None diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/image_data_disk.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/image_data_disk.py deleted file mode 100644 index 55dd251aa125..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/image_data_disk.py +++ /dev/null @@ -1,69 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ImageDataDisk(Model): - """Describes a data disk. - - All required parameters must be populated in order to send to Azure. - - :param lun: Required. Specifies the logical unit number of the data disk. - This value is used to identify data disks within the VM and therefore must - be unique for each data disk attached to a VM. - :type lun: int - :param snapshot: The snapshot. - :type snapshot: ~azure.mgmt.compute.v2018_06_01.models.SubResource - :param managed_disk: The managedDisk. - :type managed_disk: ~azure.mgmt.compute.v2018_06_01.models.SubResource - :param blob_uri: The Virtual Hard Disk. - :type blob_uri: str - :param caching: Specifies the caching requirements.

    Possible - values are:

    **None**

    **ReadOnly**

    **ReadWrite** -

    Default: **None for Standard storage. ReadOnly for Premium - storage**. Possible values include: 'None', 'ReadOnly', 'ReadWrite' - :type caching: str or ~azure.mgmt.compute.v2018_06_01.models.CachingTypes - :param disk_size_gb: Specifies the size of empty data disks in gigabytes. - This element can be used to overwrite the name of the disk in a virtual - machine image.

    This value cannot be larger than 1023 GB - :type disk_size_gb: int - :param storage_account_type: Specifies the storage account type for the - managed disk. NOTE: UltraSSD_LRS can only be used with data disks, it - cannot be used with OS Disk. Possible values include: 'Standard_LRS', - 'Premium_LRS', 'StandardSSD_LRS', 'UltraSSD_LRS' - :type storage_account_type: str or - ~azure.mgmt.compute.v2018_06_01.models.StorageAccountTypes - """ - - _validation = { - 'lun': {'required': True}, - } - - _attribute_map = { - 'lun': {'key': 'lun', 'type': 'int'}, - 'snapshot': {'key': 'snapshot', 'type': 'SubResource'}, - 'managed_disk': {'key': 'managedDisk', 'type': 'SubResource'}, - 'blob_uri': {'key': 'blobUri', 'type': 'str'}, - 'caching': {'key': 'caching', 'type': 'CachingTypes'}, - 'disk_size_gb': {'key': 'diskSizeGB', 'type': 'int'}, - 'storage_account_type': {'key': 'storageAccountType', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ImageDataDisk, self).__init__(**kwargs) - self.lun = kwargs.get('lun', None) - self.snapshot = kwargs.get('snapshot', None) - self.managed_disk = kwargs.get('managed_disk', None) - self.blob_uri = kwargs.get('blob_uri', None) - self.caching = kwargs.get('caching', None) - self.disk_size_gb = kwargs.get('disk_size_gb', None) - self.storage_account_type = kwargs.get('storage_account_type', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/image_data_disk_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/image_data_disk_py3.py deleted file mode 100644 index cad193d6eef7..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/image_data_disk_py3.py +++ /dev/null @@ -1,69 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ImageDataDisk(Model): - """Describes a data disk. - - All required parameters must be populated in order to send to Azure. - - :param lun: Required. Specifies the logical unit number of the data disk. - This value is used to identify data disks within the VM and therefore must - be unique for each data disk attached to a VM. - :type lun: int - :param snapshot: The snapshot. - :type snapshot: ~azure.mgmt.compute.v2018_06_01.models.SubResource - :param managed_disk: The managedDisk. - :type managed_disk: ~azure.mgmt.compute.v2018_06_01.models.SubResource - :param blob_uri: The Virtual Hard Disk. - :type blob_uri: str - :param caching: Specifies the caching requirements.

    Possible - values are:

    **None**

    **ReadOnly**

    **ReadWrite** -

    Default: **None for Standard storage. ReadOnly for Premium - storage**. Possible values include: 'None', 'ReadOnly', 'ReadWrite' - :type caching: str or ~azure.mgmt.compute.v2018_06_01.models.CachingTypes - :param disk_size_gb: Specifies the size of empty data disks in gigabytes. - This element can be used to overwrite the name of the disk in a virtual - machine image.

    This value cannot be larger than 1023 GB - :type disk_size_gb: int - :param storage_account_type: Specifies the storage account type for the - managed disk. NOTE: UltraSSD_LRS can only be used with data disks, it - cannot be used with OS Disk. Possible values include: 'Standard_LRS', - 'Premium_LRS', 'StandardSSD_LRS', 'UltraSSD_LRS' - :type storage_account_type: str or - ~azure.mgmt.compute.v2018_06_01.models.StorageAccountTypes - """ - - _validation = { - 'lun': {'required': True}, - } - - _attribute_map = { - 'lun': {'key': 'lun', 'type': 'int'}, - 'snapshot': {'key': 'snapshot', 'type': 'SubResource'}, - 'managed_disk': {'key': 'managedDisk', 'type': 'SubResource'}, - 'blob_uri': {'key': 'blobUri', 'type': 'str'}, - 'caching': {'key': 'caching', 'type': 'CachingTypes'}, - 'disk_size_gb': {'key': 'diskSizeGB', 'type': 'int'}, - 'storage_account_type': {'key': 'storageAccountType', 'type': 'str'}, - } - - def __init__(self, *, lun: int, snapshot=None, managed_disk=None, blob_uri: str=None, caching=None, disk_size_gb: int=None, storage_account_type=None, **kwargs) -> None: - super(ImageDataDisk, self).__init__(**kwargs) - self.lun = lun - self.snapshot = snapshot - self.managed_disk = managed_disk - self.blob_uri = blob_uri - self.caching = caching - self.disk_size_gb = disk_size_gb - self.storage_account_type = storage_account_type diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/image_disk_reference.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/image_disk_reference.py deleted file mode 100644 index b47ddd445024..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/image_disk_reference.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ImageDiskReference(Model): - """The source image used for creating the disk. - - All required parameters must be populated in order to send to Azure. - - :param id: Required. A relative uri containing either a Platform Image - Repository or user image reference. - :type id: str - :param lun: If the disk is created from an image's data disk, this is an - index that indicates which of the data disks in the image to use. For OS - disks, this field is null. - :type lun: int - """ - - _validation = { - 'id': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'lun': {'key': 'lun', 'type': 'int'}, - } - - def __init__(self, **kwargs): - super(ImageDiskReference, self).__init__(**kwargs) - self.id = kwargs.get('id', None) - self.lun = kwargs.get('lun', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/image_disk_reference_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/image_disk_reference_py3.py deleted file mode 100644 index 85bf966bc6e0..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/image_disk_reference_py3.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ImageDiskReference(Model): - """The source image used for creating the disk. - - All required parameters must be populated in order to send to Azure. - - :param id: Required. A relative uri containing either a Platform Image - Repository or user image reference. - :type id: str - :param lun: If the disk is created from an image's data disk, this is an - index that indicates which of the data disks in the image to use. For OS - disks, this field is null. - :type lun: int - """ - - _validation = { - 'id': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'lun': {'key': 'lun', 'type': 'int'}, - } - - def __init__(self, *, id: str, lun: int=None, **kwargs) -> None: - super(ImageDiskReference, self).__init__(**kwargs) - self.id = id - self.lun = lun diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/image_os_disk.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/image_os_disk.py deleted file mode 100644 index db287a53c829..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/image_os_disk.py +++ /dev/null @@ -1,77 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ImageOSDisk(Model): - """Describes an Operating System disk. - - All required parameters must be populated in order to send to Azure. - - :param os_type: Required. This property allows you to specify the type of - the OS that is included in the disk if creating a VM from a custom image. -

    Possible values are:

    **Windows**

    **Linux**. - Possible values include: 'Windows', 'Linux' - :type os_type: str or - ~azure.mgmt.compute.v2018_06_01.models.OperatingSystemTypes - :param os_state: Required. The OS State. Possible values include: - 'Generalized', 'Specialized' - :type os_state: str or - ~azure.mgmt.compute.v2018_06_01.models.OperatingSystemStateTypes - :param snapshot: The snapshot. - :type snapshot: ~azure.mgmt.compute.v2018_06_01.models.SubResource - :param managed_disk: The managedDisk. - :type managed_disk: ~azure.mgmt.compute.v2018_06_01.models.SubResource - :param blob_uri: The Virtual Hard Disk. - :type blob_uri: str - :param caching: Specifies the caching requirements.

    Possible - values are:

    **None**

    **ReadOnly**

    **ReadWrite** -

    Default: **None for Standard storage. ReadOnly for Premium - storage**. Possible values include: 'None', 'ReadOnly', 'ReadWrite' - :type caching: str or ~azure.mgmt.compute.v2018_06_01.models.CachingTypes - :param disk_size_gb: Specifies the size of empty data disks in gigabytes. - This element can be used to overwrite the name of the disk in a virtual - machine image.

    This value cannot be larger than 1023 GB - :type disk_size_gb: int - :param storage_account_type: Specifies the storage account type for the - managed disk. UltraSSD_LRS cannot be used with OS Disk. Possible values - include: 'Standard_LRS', 'Premium_LRS', 'StandardSSD_LRS', 'UltraSSD_LRS' - :type storage_account_type: str or - ~azure.mgmt.compute.v2018_06_01.models.StorageAccountTypes - """ - - _validation = { - 'os_type': {'required': True}, - 'os_state': {'required': True}, - } - - _attribute_map = { - 'os_type': {'key': 'osType', 'type': 'OperatingSystemTypes'}, - 'os_state': {'key': 'osState', 'type': 'OperatingSystemStateTypes'}, - 'snapshot': {'key': 'snapshot', 'type': 'SubResource'}, - 'managed_disk': {'key': 'managedDisk', 'type': 'SubResource'}, - 'blob_uri': {'key': 'blobUri', 'type': 'str'}, - 'caching': {'key': 'caching', 'type': 'CachingTypes'}, - 'disk_size_gb': {'key': 'diskSizeGB', 'type': 'int'}, - 'storage_account_type': {'key': 'storageAccountType', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ImageOSDisk, self).__init__(**kwargs) - self.os_type = kwargs.get('os_type', None) - self.os_state = kwargs.get('os_state', None) - self.snapshot = kwargs.get('snapshot', None) - self.managed_disk = kwargs.get('managed_disk', None) - self.blob_uri = kwargs.get('blob_uri', None) - self.caching = kwargs.get('caching', None) - self.disk_size_gb = kwargs.get('disk_size_gb', None) - self.storage_account_type = kwargs.get('storage_account_type', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/image_os_disk_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/image_os_disk_py3.py deleted file mode 100644 index 983e63d672e2..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/image_os_disk_py3.py +++ /dev/null @@ -1,77 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ImageOSDisk(Model): - """Describes an Operating System disk. - - All required parameters must be populated in order to send to Azure. - - :param os_type: Required. This property allows you to specify the type of - the OS that is included in the disk if creating a VM from a custom image. -

    Possible values are:

    **Windows**

    **Linux**. - Possible values include: 'Windows', 'Linux' - :type os_type: str or - ~azure.mgmt.compute.v2018_06_01.models.OperatingSystemTypes - :param os_state: Required. The OS State. Possible values include: - 'Generalized', 'Specialized' - :type os_state: str or - ~azure.mgmt.compute.v2018_06_01.models.OperatingSystemStateTypes - :param snapshot: The snapshot. - :type snapshot: ~azure.mgmt.compute.v2018_06_01.models.SubResource - :param managed_disk: The managedDisk. - :type managed_disk: ~azure.mgmt.compute.v2018_06_01.models.SubResource - :param blob_uri: The Virtual Hard Disk. - :type blob_uri: str - :param caching: Specifies the caching requirements.

    Possible - values are:

    **None**

    **ReadOnly**

    **ReadWrite** -

    Default: **None for Standard storage. ReadOnly for Premium - storage**. Possible values include: 'None', 'ReadOnly', 'ReadWrite' - :type caching: str or ~azure.mgmt.compute.v2018_06_01.models.CachingTypes - :param disk_size_gb: Specifies the size of empty data disks in gigabytes. - This element can be used to overwrite the name of the disk in a virtual - machine image.

    This value cannot be larger than 1023 GB - :type disk_size_gb: int - :param storage_account_type: Specifies the storage account type for the - managed disk. UltraSSD_LRS cannot be used with OS Disk. Possible values - include: 'Standard_LRS', 'Premium_LRS', 'StandardSSD_LRS', 'UltraSSD_LRS' - :type storage_account_type: str or - ~azure.mgmt.compute.v2018_06_01.models.StorageAccountTypes - """ - - _validation = { - 'os_type': {'required': True}, - 'os_state': {'required': True}, - } - - _attribute_map = { - 'os_type': {'key': 'osType', 'type': 'OperatingSystemTypes'}, - 'os_state': {'key': 'osState', 'type': 'OperatingSystemStateTypes'}, - 'snapshot': {'key': 'snapshot', 'type': 'SubResource'}, - 'managed_disk': {'key': 'managedDisk', 'type': 'SubResource'}, - 'blob_uri': {'key': 'blobUri', 'type': 'str'}, - 'caching': {'key': 'caching', 'type': 'CachingTypes'}, - 'disk_size_gb': {'key': 'diskSizeGB', 'type': 'int'}, - 'storage_account_type': {'key': 'storageAccountType', 'type': 'str'}, - } - - def __init__(self, *, os_type, os_state, snapshot=None, managed_disk=None, blob_uri: str=None, caching=None, disk_size_gb: int=None, storage_account_type=None, **kwargs) -> None: - super(ImageOSDisk, self).__init__(**kwargs) - self.os_type = os_type - self.os_state = os_state - self.snapshot = snapshot - self.managed_disk = managed_disk - self.blob_uri = blob_uri - self.caching = caching - self.disk_size_gb = disk_size_gb - self.storage_account_type = storage_account_type diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/image_paged.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/image_paged.py deleted file mode 100644 index bd91758bd2d3..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/image_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class ImagePaged(Paged): - """ - A paging container for iterating over a list of :class:`Image ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[Image]'} - } - - def __init__(self, *args, **kwargs): - - super(ImagePaged, self).__init__(*args, **kwargs) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/image_purchase_plan.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/image_purchase_plan.py deleted file mode 100644 index 5e0f4cbfe7ac..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/image_purchase_plan.py +++ /dev/null @@ -1,37 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ImagePurchasePlan(Model): - """Describes the gallery Image Definition purchase plan. This is used by - marketplace images. - - :param name: The plan ID. - :type name: str - :param publisher: The publisher ID. - :type publisher: str - :param product: The product ID. - :type product: str - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'publisher': {'key': 'publisher', 'type': 'str'}, - 'product': {'key': 'product', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ImagePurchasePlan, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.publisher = kwargs.get('publisher', None) - self.product = kwargs.get('product', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/image_purchase_plan_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/image_purchase_plan_py3.py deleted file mode 100644 index 7f9596924d7d..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/image_purchase_plan_py3.py +++ /dev/null @@ -1,37 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ImagePurchasePlan(Model): - """Describes the gallery Image Definition purchase plan. This is used by - marketplace images. - - :param name: The plan ID. - :type name: str - :param publisher: The publisher ID. - :type publisher: str - :param product: The product ID. - :type product: str - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'publisher': {'key': 'publisher', 'type': 'str'}, - 'product': {'key': 'product', 'type': 'str'}, - } - - def __init__(self, *, name: str=None, publisher: str=None, product: str=None, **kwargs) -> None: - super(ImagePurchasePlan, self).__init__(**kwargs) - self.name = name - self.publisher = publisher - self.product = product diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/image_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/image_py3.py deleted file mode 100644 index edab16a19ec3..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/image_py3.py +++ /dev/null @@ -1,70 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource_py3 import Resource - - -class Image(Resource): - """The source user image virtual hard disk. The virtual hard disk will be - copied before being attached to the virtual machine. If SourceImage is - provided, the destination virtual hard drive must not exist. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource Id - :vartype id: str - :ivar name: Resource name - :vartype name: str - :ivar type: Resource type - :vartype type: str - :param location: Required. Resource location - :type location: str - :param tags: Resource tags - :type tags: dict[str, str] - :param source_virtual_machine: The source virtual machine from which Image - is created. - :type source_virtual_machine: - ~azure.mgmt.compute.v2018_06_01.models.SubResource - :param storage_profile: Specifies the storage settings for the virtual - machine disks. - :type storage_profile: - ~azure.mgmt.compute.v2018_06_01.models.ImageStorageProfile - :ivar provisioning_state: The provisioning state. - :vartype provisioning_state: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - 'provisioning_state': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'source_virtual_machine': {'key': 'properties.sourceVirtualMachine', 'type': 'SubResource'}, - 'storage_profile': {'key': 'properties.storageProfile', 'type': 'ImageStorageProfile'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - } - - def __init__(self, *, location: str, tags=None, source_virtual_machine=None, storage_profile=None, **kwargs) -> None: - super(Image, self).__init__(location=location, tags=tags, **kwargs) - self.source_virtual_machine = source_virtual_machine - self.storage_profile = storage_profile - self.provisioning_state = None diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/image_reference.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/image_reference.py deleted file mode 100644 index b8f929f4ad70..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/image_reference.py +++ /dev/null @@ -1,54 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .sub_resource import SubResource - - -class ImageReference(SubResource): - """Specifies information about the image to use. You can specify information - about platform images, marketplace images, or virtual machine images. This - element is required when you want to use a platform image, marketplace - image, or virtual machine image, but is not used in other creation - operations. - - :param id: Resource Id - :type id: str - :param publisher: The image publisher. - :type publisher: str - :param offer: Specifies the offer of the platform image or marketplace - image used to create the virtual machine. - :type offer: str - :param sku: The image SKU. - :type sku: str - :param version: Specifies the version of the platform image or marketplace - image used to create the virtual machine. The allowed formats are - Major.Minor.Build or 'latest'. Major, Minor, and Build are decimal - numbers. Specify 'latest' to use the latest version of an image available - at deploy time. Even if you use 'latest', the VM image will not - automatically update after deploy time even if a new version becomes - available. - :type version: str - """ - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'publisher': {'key': 'publisher', 'type': 'str'}, - 'offer': {'key': 'offer', 'type': 'str'}, - 'sku': {'key': 'sku', 'type': 'str'}, - 'version': {'key': 'version', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ImageReference, self).__init__(**kwargs) - self.publisher = kwargs.get('publisher', None) - self.offer = kwargs.get('offer', None) - self.sku = kwargs.get('sku', None) - self.version = kwargs.get('version', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/image_reference_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/image_reference_py3.py deleted file mode 100644 index 1d7eefe5ac65..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/image_reference_py3.py +++ /dev/null @@ -1,54 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .sub_resource_py3 import SubResource - - -class ImageReference(SubResource): - """Specifies information about the image to use. You can specify information - about platform images, marketplace images, or virtual machine images. This - element is required when you want to use a platform image, marketplace - image, or virtual machine image, but is not used in other creation - operations. - - :param id: Resource Id - :type id: str - :param publisher: The image publisher. - :type publisher: str - :param offer: Specifies the offer of the platform image or marketplace - image used to create the virtual machine. - :type offer: str - :param sku: The image SKU. - :type sku: str - :param version: Specifies the version of the platform image or marketplace - image used to create the virtual machine. The allowed formats are - Major.Minor.Build or 'latest'. Major, Minor, and Build are decimal - numbers. Specify 'latest' to use the latest version of an image available - at deploy time. Even if you use 'latest', the VM image will not - automatically update after deploy time even if a new version becomes - available. - :type version: str - """ - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'publisher': {'key': 'publisher', 'type': 'str'}, - 'offer': {'key': 'offer', 'type': 'str'}, - 'sku': {'key': 'sku', 'type': 'str'}, - 'version': {'key': 'version', 'type': 'str'}, - } - - def __init__(self, *, id: str=None, publisher: str=None, offer: str=None, sku: str=None, version: str=None, **kwargs) -> None: - super(ImageReference, self).__init__(id=id, **kwargs) - self.publisher = publisher - self.offer = offer - self.sku = sku - self.version = version diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/image_storage_profile.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/image_storage_profile.py deleted file mode 100644 index 035adb2c538c..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/image_storage_profile.py +++ /dev/null @@ -1,45 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ImageStorageProfile(Model): - """Describes a storage profile. - - :param os_disk: Specifies information about the operating system disk used - by the virtual machine.

    For more information about disks, see - [About disks and VHDs for Azure virtual - machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-about-disks-vhds?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). - :type os_disk: ~azure.mgmt.compute.v2018_06_01.models.ImageOSDisk - :param data_disks: Specifies the parameters that are used to add a data - disk to a virtual machine.

    For more information about disks, see - [About disks and VHDs for Azure virtual - machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-about-disks-vhds?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). - :type data_disks: - list[~azure.mgmt.compute.v2018_06_01.models.ImageDataDisk] - :param zone_resilient: Specifies whether an image is zone resilient or - not. Default is false. Zone resilient images can be created only in - regions that provide Zone Redundant Storage (ZRS). - :type zone_resilient: bool - """ - - _attribute_map = { - 'os_disk': {'key': 'osDisk', 'type': 'ImageOSDisk'}, - 'data_disks': {'key': 'dataDisks', 'type': '[ImageDataDisk]'}, - 'zone_resilient': {'key': 'zoneResilient', 'type': 'bool'}, - } - - def __init__(self, **kwargs): - super(ImageStorageProfile, self).__init__(**kwargs) - self.os_disk = kwargs.get('os_disk', None) - self.data_disks = kwargs.get('data_disks', None) - self.zone_resilient = kwargs.get('zone_resilient', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/image_storage_profile_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/image_storage_profile_py3.py deleted file mode 100644 index f359b74fe49f..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/image_storage_profile_py3.py +++ /dev/null @@ -1,45 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ImageStorageProfile(Model): - """Describes a storage profile. - - :param os_disk: Specifies information about the operating system disk used - by the virtual machine.

    For more information about disks, see - [About disks and VHDs for Azure virtual - machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-about-disks-vhds?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). - :type os_disk: ~azure.mgmt.compute.v2018_06_01.models.ImageOSDisk - :param data_disks: Specifies the parameters that are used to add a data - disk to a virtual machine.

    For more information about disks, see - [About disks and VHDs for Azure virtual - machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-about-disks-vhds?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). - :type data_disks: - list[~azure.mgmt.compute.v2018_06_01.models.ImageDataDisk] - :param zone_resilient: Specifies whether an image is zone resilient or - not. Default is false. Zone resilient images can be created only in - regions that provide Zone Redundant Storage (ZRS). - :type zone_resilient: bool - """ - - _attribute_map = { - 'os_disk': {'key': 'osDisk', 'type': 'ImageOSDisk'}, - 'data_disks': {'key': 'dataDisks', 'type': '[ImageDataDisk]'}, - 'zone_resilient': {'key': 'zoneResilient', 'type': 'bool'}, - } - - def __init__(self, *, os_disk=None, data_disks=None, zone_resilient: bool=None, **kwargs) -> None: - super(ImageStorageProfile, self).__init__(**kwargs) - self.os_disk = os_disk - self.data_disks = data_disks - self.zone_resilient = zone_resilient diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/image_update.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/image_update.py deleted file mode 100644 index f294f5592de3..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/image_update.py +++ /dev/null @@ -1,50 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .update_resource import UpdateResource - - -class ImageUpdate(UpdateResource): - """The source user image virtual hard disk. Only tags may be updated. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :param tags: Resource tags - :type tags: dict[str, str] - :param source_virtual_machine: The source virtual machine from which Image - is created. - :type source_virtual_machine: - ~azure.mgmt.compute.v2018_06_01.models.SubResource - :param storage_profile: Specifies the storage settings for the virtual - machine disks. - :type storage_profile: - ~azure.mgmt.compute.v2018_06_01.models.ImageStorageProfile - :ivar provisioning_state: The provisioning state. - :vartype provisioning_state: str - """ - - _validation = { - 'provisioning_state': {'readonly': True}, - } - - _attribute_map = { - 'tags': {'key': 'tags', 'type': '{str}'}, - 'source_virtual_machine': {'key': 'properties.sourceVirtualMachine', 'type': 'SubResource'}, - 'storage_profile': {'key': 'properties.storageProfile', 'type': 'ImageStorageProfile'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ImageUpdate, self).__init__(**kwargs) - self.source_virtual_machine = kwargs.get('source_virtual_machine', None) - self.storage_profile = kwargs.get('storage_profile', None) - self.provisioning_state = None diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/image_update_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/image_update_py3.py deleted file mode 100644 index effbc357fd43..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/image_update_py3.py +++ /dev/null @@ -1,50 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .update_resource_py3 import UpdateResource - - -class ImageUpdate(UpdateResource): - """The source user image virtual hard disk. Only tags may be updated. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :param tags: Resource tags - :type tags: dict[str, str] - :param source_virtual_machine: The source virtual machine from which Image - is created. - :type source_virtual_machine: - ~azure.mgmt.compute.v2018_06_01.models.SubResource - :param storage_profile: Specifies the storage settings for the virtual - machine disks. - :type storage_profile: - ~azure.mgmt.compute.v2018_06_01.models.ImageStorageProfile - :ivar provisioning_state: The provisioning state. - :vartype provisioning_state: str - """ - - _validation = { - 'provisioning_state': {'readonly': True}, - } - - _attribute_map = { - 'tags': {'key': 'tags', 'type': '{str}'}, - 'source_virtual_machine': {'key': 'properties.sourceVirtualMachine', 'type': 'SubResource'}, - 'storage_profile': {'key': 'properties.storageProfile', 'type': 'ImageStorageProfile'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - } - - def __init__(self, *, tags=None, source_virtual_machine=None, storage_profile=None, **kwargs) -> None: - super(ImageUpdate, self).__init__(tags=tags, **kwargs) - self.source_virtual_machine = source_virtual_machine - self.storage_profile = storage_profile - self.provisioning_state = None diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/inner_error.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/inner_error.py deleted file mode 100644 index 6324249d7c19..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/inner_error.py +++ /dev/null @@ -1,32 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class InnerError(Model): - """Inner error details. - - :param exceptiontype: The exception type. - :type exceptiontype: str - :param errordetail: The internal error message or exception dump. - :type errordetail: str - """ - - _attribute_map = { - 'exceptiontype': {'key': 'exceptiontype', 'type': 'str'}, - 'errordetail': {'key': 'errordetail', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(InnerError, self).__init__(**kwargs) - self.exceptiontype = kwargs.get('exceptiontype', None) - self.errordetail = kwargs.get('errordetail', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/inner_error_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/inner_error_py3.py deleted file mode 100644 index ccec30d7b53f..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/inner_error_py3.py +++ /dev/null @@ -1,32 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class InnerError(Model): - """Inner error details. - - :param exceptiontype: The exception type. - :type exceptiontype: str - :param errordetail: The internal error message or exception dump. - :type errordetail: str - """ - - _attribute_map = { - 'exceptiontype': {'key': 'exceptiontype', 'type': 'str'}, - 'errordetail': {'key': 'errordetail', 'type': 'str'}, - } - - def __init__(self, *, exceptiontype: str=None, errordetail: str=None, **kwargs) -> None: - super(InnerError, self).__init__(**kwargs) - self.exceptiontype = exceptiontype - self.errordetail = errordetail diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/instance_view_status.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/instance_view_status.py deleted file mode 100644 index 3de16cb0d1d2..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/instance_view_status.py +++ /dev/null @@ -1,47 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class InstanceViewStatus(Model): - """Instance view status. - - :param code: The status code. - :type code: str - :param level: The level code. Possible values include: 'Info', 'Warning', - 'Error' - :type level: str or - ~azure.mgmt.compute.v2018_06_01.models.StatusLevelTypes - :param display_status: The short localizable label for the status. - :type display_status: str - :param message: The detailed status message, including for alerts and - error messages. - :type message: str - :param time: The time of the status. - :type time: datetime - """ - - _attribute_map = { - 'code': {'key': 'code', 'type': 'str'}, - 'level': {'key': 'level', 'type': 'StatusLevelTypes'}, - 'display_status': {'key': 'displayStatus', 'type': 'str'}, - 'message': {'key': 'message', 'type': 'str'}, - 'time': {'key': 'time', 'type': 'iso-8601'}, - } - - def __init__(self, **kwargs): - super(InstanceViewStatus, self).__init__(**kwargs) - self.code = kwargs.get('code', None) - self.level = kwargs.get('level', None) - self.display_status = kwargs.get('display_status', None) - self.message = kwargs.get('message', None) - self.time = kwargs.get('time', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/instance_view_status_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/instance_view_status_py3.py deleted file mode 100644 index 2098b03be405..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/instance_view_status_py3.py +++ /dev/null @@ -1,47 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class InstanceViewStatus(Model): - """Instance view status. - - :param code: The status code. - :type code: str - :param level: The level code. Possible values include: 'Info', 'Warning', - 'Error' - :type level: str or - ~azure.mgmt.compute.v2018_06_01.models.StatusLevelTypes - :param display_status: The short localizable label for the status. - :type display_status: str - :param message: The detailed status message, including for alerts and - error messages. - :type message: str - :param time: The time of the status. - :type time: datetime - """ - - _attribute_map = { - 'code': {'key': 'code', 'type': 'str'}, - 'level': {'key': 'level', 'type': 'StatusLevelTypes'}, - 'display_status': {'key': 'displayStatus', 'type': 'str'}, - 'message': {'key': 'message', 'type': 'str'}, - 'time': {'key': 'time', 'type': 'iso-8601'}, - } - - def __init__(self, *, code: str=None, level=None, display_status: str=None, message: str=None, time=None, **kwargs) -> None: - super(InstanceViewStatus, self).__init__(**kwargs) - self.code = code - self.level = level - self.display_status = display_status - self.message = message - self.time = time diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/key_vault_and_key_reference.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/key_vault_and_key_reference.py deleted file mode 100644 index 16ff78c677e4..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/key_vault_and_key_reference.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class KeyVaultAndKeyReference(Model): - """Key Vault Key Url and vault id of KeK, KeK is optional and when provided is - used to unwrap the encryptionKey. - - All required parameters must be populated in order to send to Azure. - - :param source_vault: Required. Resource id of the KeyVault containing the - key or secret - :type source_vault: ~azure.mgmt.compute.v2018_06_01.models.SourceVault - :param key_url: Required. Url pointing to a key or secret in KeyVault - :type key_url: str - """ - - _validation = { - 'source_vault': {'required': True}, - 'key_url': {'required': True}, - } - - _attribute_map = { - 'source_vault': {'key': 'sourceVault', 'type': 'SourceVault'}, - 'key_url': {'key': 'keyUrl', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(KeyVaultAndKeyReference, self).__init__(**kwargs) - self.source_vault = kwargs.get('source_vault', None) - self.key_url = kwargs.get('key_url', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/key_vault_and_key_reference_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/key_vault_and_key_reference_py3.py deleted file mode 100644 index 20a79a09314b..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/key_vault_and_key_reference_py3.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class KeyVaultAndKeyReference(Model): - """Key Vault Key Url and vault id of KeK, KeK is optional and when provided is - used to unwrap the encryptionKey. - - All required parameters must be populated in order to send to Azure. - - :param source_vault: Required. Resource id of the KeyVault containing the - key or secret - :type source_vault: ~azure.mgmt.compute.v2018_06_01.models.SourceVault - :param key_url: Required. Url pointing to a key or secret in KeyVault - :type key_url: str - """ - - _validation = { - 'source_vault': {'required': True}, - 'key_url': {'required': True}, - } - - _attribute_map = { - 'source_vault': {'key': 'sourceVault', 'type': 'SourceVault'}, - 'key_url': {'key': 'keyUrl', 'type': 'str'}, - } - - def __init__(self, *, source_vault, key_url: str, **kwargs) -> None: - super(KeyVaultAndKeyReference, self).__init__(**kwargs) - self.source_vault = source_vault - self.key_url = key_url diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/key_vault_and_secret_reference.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/key_vault_and_secret_reference.py deleted file mode 100644 index 09058d9fe672..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/key_vault_and_secret_reference.py +++ /dev/null @@ -1,40 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class KeyVaultAndSecretReference(Model): - """Key Vault Secret Url and vault id of the encryption key . - - All required parameters must be populated in order to send to Azure. - - :param source_vault: Required. Resource id of the KeyVault containing the - key or secret - :type source_vault: ~azure.mgmt.compute.v2018_06_01.models.SourceVault - :param secret_url: Required. Url pointing to a key or secret in KeyVault - :type secret_url: str - """ - - _validation = { - 'source_vault': {'required': True}, - 'secret_url': {'required': True}, - } - - _attribute_map = { - 'source_vault': {'key': 'sourceVault', 'type': 'SourceVault'}, - 'secret_url': {'key': 'secretUrl', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(KeyVaultAndSecretReference, self).__init__(**kwargs) - self.source_vault = kwargs.get('source_vault', None) - self.secret_url = kwargs.get('secret_url', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/key_vault_and_secret_reference_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/key_vault_and_secret_reference_py3.py deleted file mode 100644 index 1266a3f8bc01..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/key_vault_and_secret_reference_py3.py +++ /dev/null @@ -1,40 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class KeyVaultAndSecretReference(Model): - """Key Vault Secret Url and vault id of the encryption key . - - All required parameters must be populated in order to send to Azure. - - :param source_vault: Required. Resource id of the KeyVault containing the - key or secret - :type source_vault: ~azure.mgmt.compute.v2018_06_01.models.SourceVault - :param secret_url: Required. Url pointing to a key or secret in KeyVault - :type secret_url: str - """ - - _validation = { - 'source_vault': {'required': True}, - 'secret_url': {'required': True}, - } - - _attribute_map = { - 'source_vault': {'key': 'sourceVault', 'type': 'SourceVault'}, - 'secret_url': {'key': 'secretUrl', 'type': 'str'}, - } - - def __init__(self, *, source_vault, secret_url: str, **kwargs) -> None: - super(KeyVaultAndSecretReference, self).__init__(**kwargs) - self.source_vault = source_vault - self.secret_url = secret_url diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/key_vault_key_reference.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/key_vault_key_reference.py deleted file mode 100644 index 982bcf7f2275..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/key_vault_key_reference.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class KeyVaultKeyReference(Model): - """Describes a reference to Key Vault Key. - - All required parameters must be populated in order to send to Azure. - - :param key_url: Required. The URL referencing a key encryption key in Key - Vault. - :type key_url: str - :param source_vault: Required. The relative URL of the Key Vault - containing the key. - :type source_vault: ~azure.mgmt.compute.v2018_06_01.models.SubResource - """ - - _validation = { - 'key_url': {'required': True}, - 'source_vault': {'required': True}, - } - - _attribute_map = { - 'key_url': {'key': 'keyUrl', 'type': 'str'}, - 'source_vault': {'key': 'sourceVault', 'type': 'SubResource'}, - } - - def __init__(self, **kwargs): - super(KeyVaultKeyReference, self).__init__(**kwargs) - self.key_url = kwargs.get('key_url', None) - self.source_vault = kwargs.get('source_vault', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/key_vault_key_reference_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/key_vault_key_reference_py3.py deleted file mode 100644 index 8949ec597000..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/key_vault_key_reference_py3.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class KeyVaultKeyReference(Model): - """Describes a reference to Key Vault Key. - - All required parameters must be populated in order to send to Azure. - - :param key_url: Required. The URL referencing a key encryption key in Key - Vault. - :type key_url: str - :param source_vault: Required. The relative URL of the Key Vault - containing the key. - :type source_vault: ~azure.mgmt.compute.v2018_06_01.models.SubResource - """ - - _validation = { - 'key_url': {'required': True}, - 'source_vault': {'required': True}, - } - - _attribute_map = { - 'key_url': {'key': 'keyUrl', 'type': 'str'}, - 'source_vault': {'key': 'sourceVault', 'type': 'SubResource'}, - } - - def __init__(self, *, key_url: str, source_vault, **kwargs) -> None: - super(KeyVaultKeyReference, self).__init__(**kwargs) - self.key_url = key_url - self.source_vault = source_vault diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/key_vault_secret_reference.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/key_vault_secret_reference.py deleted file mode 100644 index 3fe0ba1f016d..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/key_vault_secret_reference.py +++ /dev/null @@ -1,40 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class KeyVaultSecretReference(Model): - """Describes a reference to Key Vault Secret. - - All required parameters must be populated in order to send to Azure. - - :param secret_url: Required. The URL referencing a secret in a Key Vault. - :type secret_url: str - :param source_vault: Required. The relative URL of the Key Vault - containing the secret. - :type source_vault: ~azure.mgmt.compute.v2018_06_01.models.SubResource - """ - - _validation = { - 'secret_url': {'required': True}, - 'source_vault': {'required': True}, - } - - _attribute_map = { - 'secret_url': {'key': 'secretUrl', 'type': 'str'}, - 'source_vault': {'key': 'sourceVault', 'type': 'SubResource'}, - } - - def __init__(self, **kwargs): - super(KeyVaultSecretReference, self).__init__(**kwargs) - self.secret_url = kwargs.get('secret_url', None) - self.source_vault = kwargs.get('source_vault', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/key_vault_secret_reference_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/key_vault_secret_reference_py3.py deleted file mode 100644 index a705b0ff48f2..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/key_vault_secret_reference_py3.py +++ /dev/null @@ -1,40 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class KeyVaultSecretReference(Model): - """Describes a reference to Key Vault Secret. - - All required parameters must be populated in order to send to Azure. - - :param secret_url: Required. The URL referencing a secret in a Key Vault. - :type secret_url: str - :param source_vault: Required. The relative URL of the Key Vault - containing the secret. - :type source_vault: ~azure.mgmt.compute.v2018_06_01.models.SubResource - """ - - _validation = { - 'secret_url': {'required': True}, - 'source_vault': {'required': True}, - } - - _attribute_map = { - 'secret_url': {'key': 'secretUrl', 'type': 'str'}, - 'source_vault': {'key': 'sourceVault', 'type': 'SubResource'}, - } - - def __init__(self, *, secret_url: str, source_vault, **kwargs) -> None: - super(KeyVaultSecretReference, self).__init__(**kwargs) - self.secret_url = secret_url - self.source_vault = source_vault diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/linux_configuration.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/linux_configuration.py deleted file mode 100644 index 2cbcb6d5232d..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/linux_configuration.py +++ /dev/null @@ -1,47 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class LinuxConfiguration(Model): - """Specifies the Linux operating system settings on the virtual machine. -

    For a list of supported Linux distributions, see [Linux on - Azure-Endorsed - Distributions](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-endorsed-distros?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json) -

    For running non-endorsed distributions, see [Information for - Non-Endorsed - Distributions](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-create-upload-generic?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json). - - :param disable_password_authentication: Specifies whether password - authentication should be disabled. - :type disable_password_authentication: bool - :param ssh: Specifies the ssh key configuration for a Linux OS. - :type ssh: ~azure.mgmt.compute.v2018_06_01.models.SshConfiguration - :param provision_vm_agent: Indicates whether virtual machine agent should - be provisioned on the virtual machine.

    When this property is not - specified in the request body, default behavior is to set it to true. - This will ensure that VM Agent is installed on the VM so that extensions - can be added to the VM later. - :type provision_vm_agent: bool - """ - - _attribute_map = { - 'disable_password_authentication': {'key': 'disablePasswordAuthentication', 'type': 'bool'}, - 'ssh': {'key': 'ssh', 'type': 'SshConfiguration'}, - 'provision_vm_agent': {'key': 'provisionVMAgent', 'type': 'bool'}, - } - - def __init__(self, **kwargs): - super(LinuxConfiguration, self).__init__(**kwargs) - self.disable_password_authentication = kwargs.get('disable_password_authentication', None) - self.ssh = kwargs.get('ssh', None) - self.provision_vm_agent = kwargs.get('provision_vm_agent', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/linux_configuration_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/linux_configuration_py3.py deleted file mode 100644 index 362feb8a1b99..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/linux_configuration_py3.py +++ /dev/null @@ -1,47 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class LinuxConfiguration(Model): - """Specifies the Linux operating system settings on the virtual machine. -

    For a list of supported Linux distributions, see [Linux on - Azure-Endorsed - Distributions](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-endorsed-distros?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json) -

    For running non-endorsed distributions, see [Information for - Non-Endorsed - Distributions](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-create-upload-generic?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json). - - :param disable_password_authentication: Specifies whether password - authentication should be disabled. - :type disable_password_authentication: bool - :param ssh: Specifies the ssh key configuration for a Linux OS. - :type ssh: ~azure.mgmt.compute.v2018_06_01.models.SshConfiguration - :param provision_vm_agent: Indicates whether virtual machine agent should - be provisioned on the virtual machine.

    When this property is not - specified in the request body, default behavior is to set it to true. - This will ensure that VM Agent is installed on the VM so that extensions - can be added to the VM later. - :type provision_vm_agent: bool - """ - - _attribute_map = { - 'disable_password_authentication': {'key': 'disablePasswordAuthentication', 'type': 'bool'}, - 'ssh': {'key': 'ssh', 'type': 'SshConfiguration'}, - 'provision_vm_agent': {'key': 'provisionVMAgent', 'type': 'bool'}, - } - - def __init__(self, *, disable_password_authentication: bool=None, ssh=None, provision_vm_agent: bool=None, **kwargs) -> None: - super(LinuxConfiguration, self).__init__(**kwargs) - self.disable_password_authentication = disable_password_authentication - self.ssh = ssh - self.provision_vm_agent = provision_vm_agent diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/log_analytics_input_base.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/log_analytics_input_base.py deleted file mode 100644 index 46bbc4f44411..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/log_analytics_input_base.py +++ /dev/null @@ -1,58 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class LogAnalyticsInputBase(Model): - """Api input base class for LogAnalytics Api. - - All required parameters must be populated in order to send to Azure. - - :param blob_container_sas_uri: Required. SAS Uri of the logging blob - container to which LogAnalytics Api writes output logs to. - :type blob_container_sas_uri: str - :param from_time: Required. From time of the query - :type from_time: datetime - :param to_time: Required. To time of the query - :type to_time: datetime - :param group_by_throttle_policy: Group query result by Throttle Policy - applied. - :type group_by_throttle_policy: bool - :param group_by_operation_name: Group query result by Operation Name. - :type group_by_operation_name: bool - :param group_by_resource_name: Group query result by Resource Name. - :type group_by_resource_name: bool - """ - - _validation = { - 'blob_container_sas_uri': {'required': True}, - 'from_time': {'required': True}, - 'to_time': {'required': True}, - } - - _attribute_map = { - 'blob_container_sas_uri': {'key': 'blobContainerSasUri', 'type': 'str'}, - 'from_time': {'key': 'fromTime', 'type': 'iso-8601'}, - 'to_time': {'key': 'toTime', 'type': 'iso-8601'}, - 'group_by_throttle_policy': {'key': 'groupByThrottlePolicy', 'type': 'bool'}, - 'group_by_operation_name': {'key': 'groupByOperationName', 'type': 'bool'}, - 'group_by_resource_name': {'key': 'groupByResourceName', 'type': 'bool'}, - } - - def __init__(self, **kwargs): - super(LogAnalyticsInputBase, self).__init__(**kwargs) - self.blob_container_sas_uri = kwargs.get('blob_container_sas_uri', None) - self.from_time = kwargs.get('from_time', None) - self.to_time = kwargs.get('to_time', None) - self.group_by_throttle_policy = kwargs.get('group_by_throttle_policy', None) - self.group_by_operation_name = kwargs.get('group_by_operation_name', None) - self.group_by_resource_name = kwargs.get('group_by_resource_name', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/log_analytics_input_base_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/log_analytics_input_base_py3.py deleted file mode 100644 index f713c2cb0629..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/log_analytics_input_base_py3.py +++ /dev/null @@ -1,58 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class LogAnalyticsInputBase(Model): - """Api input base class for LogAnalytics Api. - - All required parameters must be populated in order to send to Azure. - - :param blob_container_sas_uri: Required. SAS Uri of the logging blob - container to which LogAnalytics Api writes output logs to. - :type blob_container_sas_uri: str - :param from_time: Required. From time of the query - :type from_time: datetime - :param to_time: Required. To time of the query - :type to_time: datetime - :param group_by_throttle_policy: Group query result by Throttle Policy - applied. - :type group_by_throttle_policy: bool - :param group_by_operation_name: Group query result by Operation Name. - :type group_by_operation_name: bool - :param group_by_resource_name: Group query result by Resource Name. - :type group_by_resource_name: bool - """ - - _validation = { - 'blob_container_sas_uri': {'required': True}, - 'from_time': {'required': True}, - 'to_time': {'required': True}, - } - - _attribute_map = { - 'blob_container_sas_uri': {'key': 'blobContainerSasUri', 'type': 'str'}, - 'from_time': {'key': 'fromTime', 'type': 'iso-8601'}, - 'to_time': {'key': 'toTime', 'type': 'iso-8601'}, - 'group_by_throttle_policy': {'key': 'groupByThrottlePolicy', 'type': 'bool'}, - 'group_by_operation_name': {'key': 'groupByOperationName', 'type': 'bool'}, - 'group_by_resource_name': {'key': 'groupByResourceName', 'type': 'bool'}, - } - - def __init__(self, *, blob_container_sas_uri: str, from_time, to_time, group_by_throttle_policy: bool=None, group_by_operation_name: bool=None, group_by_resource_name: bool=None, **kwargs) -> None: - super(LogAnalyticsInputBase, self).__init__(**kwargs) - self.blob_container_sas_uri = blob_container_sas_uri - self.from_time = from_time - self.to_time = to_time - self.group_by_throttle_policy = group_by_throttle_policy - self.group_by_operation_name = group_by_operation_name - self.group_by_resource_name = group_by_resource_name diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/log_analytics_operation_result.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/log_analytics_operation_result.py deleted file mode 100644 index eeb149cce9cd..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/log_analytics_operation_result.py +++ /dev/null @@ -1,36 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class LogAnalyticsOperationResult(Model): - """LogAnalytics operation status response. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar properties: LogAnalyticsOutput - :vartype properties: - ~azure.mgmt.compute.v2018_06_01.models.LogAnalyticsOutput - """ - - _validation = { - 'properties': {'readonly': True}, - } - - _attribute_map = { - 'properties': {'key': 'properties', 'type': 'LogAnalyticsOutput'}, - } - - def __init__(self, **kwargs): - super(LogAnalyticsOperationResult, self).__init__(**kwargs) - self.properties = None diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/log_analytics_operation_result_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/log_analytics_operation_result_py3.py deleted file mode 100644 index bb34ad66506a..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/log_analytics_operation_result_py3.py +++ /dev/null @@ -1,36 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class LogAnalyticsOperationResult(Model): - """LogAnalytics operation status response. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar properties: LogAnalyticsOutput - :vartype properties: - ~azure.mgmt.compute.v2018_06_01.models.LogAnalyticsOutput - """ - - _validation = { - 'properties': {'readonly': True}, - } - - _attribute_map = { - 'properties': {'key': 'properties', 'type': 'LogAnalyticsOutput'}, - } - - def __init__(self, **kwargs) -> None: - super(LogAnalyticsOperationResult, self).__init__(**kwargs) - self.properties = None diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/log_analytics_output.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/log_analytics_output.py deleted file mode 100644 index 5ea1615011c3..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/log_analytics_output.py +++ /dev/null @@ -1,35 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class LogAnalyticsOutput(Model): - """LogAnalytics output properties. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar output: Output file Uri path to blob container. - :vartype output: str - """ - - _validation = { - 'output': {'readonly': True}, - } - - _attribute_map = { - 'output': {'key': 'output', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(LogAnalyticsOutput, self).__init__(**kwargs) - self.output = None diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/log_analytics_output_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/log_analytics_output_py3.py deleted file mode 100644 index 71a428a8e49a..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/log_analytics_output_py3.py +++ /dev/null @@ -1,35 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class LogAnalyticsOutput(Model): - """LogAnalytics output properties. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar output: Output file Uri path to blob container. - :vartype output: str - """ - - _validation = { - 'output': {'readonly': True}, - } - - _attribute_map = { - 'output': {'key': 'output', 'type': 'str'}, - } - - def __init__(self, **kwargs) -> None: - super(LogAnalyticsOutput, self).__init__(**kwargs) - self.output = None diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/maintenance_redeploy_status.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/maintenance_redeploy_status.py deleted file mode 100644 index ee6ab2934a63..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/maintenance_redeploy_status.py +++ /dev/null @@ -1,60 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class MaintenanceRedeployStatus(Model): - """Maintenance Operation Status. - - :param is_customer_initiated_maintenance_allowed: True, if customer is - allowed to perform Maintenance. - :type is_customer_initiated_maintenance_allowed: bool - :param pre_maintenance_window_start_time: Start Time for the Pre - Maintenance Window. - :type pre_maintenance_window_start_time: datetime - :param pre_maintenance_window_end_time: End Time for the Pre Maintenance - Window. - :type pre_maintenance_window_end_time: datetime - :param maintenance_window_start_time: Start Time for the Maintenance - Window. - :type maintenance_window_start_time: datetime - :param maintenance_window_end_time: End Time for the Maintenance Window. - :type maintenance_window_end_time: datetime - :param last_operation_result_code: The Last Maintenance Operation Result - Code. Possible values include: 'None', 'RetryLater', 'MaintenanceAborted', - 'MaintenanceCompleted' - :type last_operation_result_code: str or - ~azure.mgmt.compute.v2018_06_01.models.MaintenanceOperationResultCodeTypes - :param last_operation_message: Message returned for the last Maintenance - Operation. - :type last_operation_message: str - """ - - _attribute_map = { - 'is_customer_initiated_maintenance_allowed': {'key': 'isCustomerInitiatedMaintenanceAllowed', 'type': 'bool'}, - 'pre_maintenance_window_start_time': {'key': 'preMaintenanceWindowStartTime', 'type': 'iso-8601'}, - 'pre_maintenance_window_end_time': {'key': 'preMaintenanceWindowEndTime', 'type': 'iso-8601'}, - 'maintenance_window_start_time': {'key': 'maintenanceWindowStartTime', 'type': 'iso-8601'}, - 'maintenance_window_end_time': {'key': 'maintenanceWindowEndTime', 'type': 'iso-8601'}, - 'last_operation_result_code': {'key': 'lastOperationResultCode', 'type': 'MaintenanceOperationResultCodeTypes'}, - 'last_operation_message': {'key': 'lastOperationMessage', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(MaintenanceRedeployStatus, self).__init__(**kwargs) - self.is_customer_initiated_maintenance_allowed = kwargs.get('is_customer_initiated_maintenance_allowed', None) - self.pre_maintenance_window_start_time = kwargs.get('pre_maintenance_window_start_time', None) - self.pre_maintenance_window_end_time = kwargs.get('pre_maintenance_window_end_time', None) - self.maintenance_window_start_time = kwargs.get('maintenance_window_start_time', None) - self.maintenance_window_end_time = kwargs.get('maintenance_window_end_time', None) - self.last_operation_result_code = kwargs.get('last_operation_result_code', None) - self.last_operation_message = kwargs.get('last_operation_message', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/maintenance_redeploy_status_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/maintenance_redeploy_status_py3.py deleted file mode 100644 index 435bb41bdabf..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/maintenance_redeploy_status_py3.py +++ /dev/null @@ -1,60 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class MaintenanceRedeployStatus(Model): - """Maintenance Operation Status. - - :param is_customer_initiated_maintenance_allowed: True, if customer is - allowed to perform Maintenance. - :type is_customer_initiated_maintenance_allowed: bool - :param pre_maintenance_window_start_time: Start Time for the Pre - Maintenance Window. - :type pre_maintenance_window_start_time: datetime - :param pre_maintenance_window_end_time: End Time for the Pre Maintenance - Window. - :type pre_maintenance_window_end_time: datetime - :param maintenance_window_start_time: Start Time for the Maintenance - Window. - :type maintenance_window_start_time: datetime - :param maintenance_window_end_time: End Time for the Maintenance Window. - :type maintenance_window_end_time: datetime - :param last_operation_result_code: The Last Maintenance Operation Result - Code. Possible values include: 'None', 'RetryLater', 'MaintenanceAborted', - 'MaintenanceCompleted' - :type last_operation_result_code: str or - ~azure.mgmt.compute.v2018_06_01.models.MaintenanceOperationResultCodeTypes - :param last_operation_message: Message returned for the last Maintenance - Operation. - :type last_operation_message: str - """ - - _attribute_map = { - 'is_customer_initiated_maintenance_allowed': {'key': 'isCustomerInitiatedMaintenanceAllowed', 'type': 'bool'}, - 'pre_maintenance_window_start_time': {'key': 'preMaintenanceWindowStartTime', 'type': 'iso-8601'}, - 'pre_maintenance_window_end_time': {'key': 'preMaintenanceWindowEndTime', 'type': 'iso-8601'}, - 'maintenance_window_start_time': {'key': 'maintenanceWindowStartTime', 'type': 'iso-8601'}, - 'maintenance_window_end_time': {'key': 'maintenanceWindowEndTime', 'type': 'iso-8601'}, - 'last_operation_result_code': {'key': 'lastOperationResultCode', 'type': 'MaintenanceOperationResultCodeTypes'}, - 'last_operation_message': {'key': 'lastOperationMessage', 'type': 'str'}, - } - - def __init__(self, *, is_customer_initiated_maintenance_allowed: bool=None, pre_maintenance_window_start_time=None, pre_maintenance_window_end_time=None, maintenance_window_start_time=None, maintenance_window_end_time=None, last_operation_result_code=None, last_operation_message: str=None, **kwargs) -> None: - super(MaintenanceRedeployStatus, self).__init__(**kwargs) - self.is_customer_initiated_maintenance_allowed = is_customer_initiated_maintenance_allowed - self.pre_maintenance_window_start_time = pre_maintenance_window_start_time - self.pre_maintenance_window_end_time = pre_maintenance_window_end_time - self.maintenance_window_start_time = maintenance_window_start_time - self.maintenance_window_end_time = maintenance_window_end_time - self.last_operation_result_code = last_operation_result_code - self.last_operation_message = last_operation_message diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/managed_artifact.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/managed_artifact.py deleted file mode 100644 index 753e9704d755..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/managed_artifact.py +++ /dev/null @@ -1,34 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ManagedArtifact(Model): - """The managed artifact. - - All required parameters must be populated in order to send to Azure. - - :param id: Required. The managed artifact id. - :type id: str - """ - - _validation = { - 'id': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ManagedArtifact, self).__init__(**kwargs) - self.id = kwargs.get('id', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/managed_artifact_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/managed_artifact_py3.py deleted file mode 100644 index 0e8a6b2bfa40..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/managed_artifact_py3.py +++ /dev/null @@ -1,34 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ManagedArtifact(Model): - """The managed artifact. - - All required parameters must be populated in order to send to Azure. - - :param id: Required. The managed artifact id. - :type id: str - """ - - _validation = { - 'id': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - } - - def __init__(self, *, id: str, **kwargs) -> None: - super(ManagedArtifact, self).__init__(**kwargs) - self.id = id diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/managed_disk_parameters.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/managed_disk_parameters.py deleted file mode 100644 index 9fa397ac98d7..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/managed_disk_parameters.py +++ /dev/null @@ -1,35 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .sub_resource import SubResource - - -class ManagedDiskParameters(SubResource): - """The parameters of a managed disk. - - :param id: Resource Id - :type id: str - :param storage_account_type: Specifies the storage account type for the - managed disk. NOTE: UltraSSD_LRS can only be used with data disks, it - cannot be used with OS Disk. Possible values include: 'Standard_LRS', - 'Premium_LRS', 'StandardSSD_LRS', 'UltraSSD_LRS' - :type storage_account_type: str or - ~azure.mgmt.compute.v2018_06_01.models.StorageAccountTypes - """ - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'storage_account_type': {'key': 'storageAccountType', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ManagedDiskParameters, self).__init__(**kwargs) - self.storage_account_type = kwargs.get('storage_account_type', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/managed_disk_parameters_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/managed_disk_parameters_py3.py deleted file mode 100644 index bbf6a7770b56..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/managed_disk_parameters_py3.py +++ /dev/null @@ -1,35 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .sub_resource_py3 import SubResource - - -class ManagedDiskParameters(SubResource): - """The parameters of a managed disk. - - :param id: Resource Id - :type id: str - :param storage_account_type: Specifies the storage account type for the - managed disk. NOTE: UltraSSD_LRS can only be used with data disks, it - cannot be used with OS Disk. Possible values include: 'Standard_LRS', - 'Premium_LRS', 'StandardSSD_LRS', 'UltraSSD_LRS' - :type storage_account_type: str or - ~azure.mgmt.compute.v2018_06_01.models.StorageAccountTypes - """ - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'storage_account_type': {'key': 'storageAccountType', 'type': 'str'}, - } - - def __init__(self, *, id: str=None, storage_account_type=None, **kwargs) -> None: - super(ManagedDiskParameters, self).__init__(id=id, **kwargs) - self.storage_account_type = storage_account_type diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/network_interface_reference.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/network_interface_reference.py deleted file mode 100644 index b86e305e3f74..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/network_interface_reference.py +++ /dev/null @@ -1,32 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .sub_resource import SubResource - - -class NetworkInterfaceReference(SubResource): - """Describes a network interface reference. - - :param id: Resource Id - :type id: str - :param primary: Specifies the primary network interface in case the - virtual machine has more than 1 network interface. - :type primary: bool - """ - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'primary': {'key': 'properties.primary', 'type': 'bool'}, - } - - def __init__(self, **kwargs): - super(NetworkInterfaceReference, self).__init__(**kwargs) - self.primary = kwargs.get('primary', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/network_interface_reference_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/network_interface_reference_py3.py deleted file mode 100644 index 47da29278832..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/network_interface_reference_py3.py +++ /dev/null @@ -1,32 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .sub_resource_py3 import SubResource - - -class NetworkInterfaceReference(SubResource): - """Describes a network interface reference. - - :param id: Resource Id - :type id: str - :param primary: Specifies the primary network interface in case the - virtual machine has more than 1 network interface. - :type primary: bool - """ - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'primary': {'key': 'properties.primary', 'type': 'bool'}, - } - - def __init__(self, *, id: str=None, primary: bool=None, **kwargs) -> None: - super(NetworkInterfaceReference, self).__init__(id=id, **kwargs) - self.primary = primary diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/network_profile.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/network_profile.py deleted file mode 100644 index ac3e28ae5095..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/network_profile.py +++ /dev/null @@ -1,30 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class NetworkProfile(Model): - """Specifies the network interfaces of the virtual machine. - - :param network_interfaces: Specifies the list of resource Ids for the - network interfaces associated with the virtual machine. - :type network_interfaces: - list[~azure.mgmt.compute.v2018_06_01.models.NetworkInterfaceReference] - """ - - _attribute_map = { - 'network_interfaces': {'key': 'networkInterfaces', 'type': '[NetworkInterfaceReference]'}, - } - - def __init__(self, **kwargs): - super(NetworkProfile, self).__init__(**kwargs) - self.network_interfaces = kwargs.get('network_interfaces', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/network_profile_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/network_profile_py3.py deleted file mode 100644 index 1aa6b1780358..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/network_profile_py3.py +++ /dev/null @@ -1,30 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class NetworkProfile(Model): - """Specifies the network interfaces of the virtual machine. - - :param network_interfaces: Specifies the list of resource Ids for the - network interfaces associated with the virtual machine. - :type network_interfaces: - list[~azure.mgmt.compute.v2018_06_01.models.NetworkInterfaceReference] - """ - - _attribute_map = { - 'network_interfaces': {'key': 'networkInterfaces', 'type': '[NetworkInterfaceReference]'}, - } - - def __init__(self, *, network_interfaces=None, **kwargs) -> None: - super(NetworkProfile, self).__init__(**kwargs) - self.network_interfaces = network_interfaces diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/os_disk.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/os_disk.py deleted file mode 100644 index d2c00ad37871..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/os_disk.py +++ /dev/null @@ -1,103 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class OSDisk(Model): - """Specifies information about the operating system disk used by the virtual - machine.

    For more information about disks, see [About disks and - VHDs for Azure virtual - machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-about-disks-vhds?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). - - All required parameters must be populated in order to send to Azure. - - :param os_type: This property allows you to specify the type of the OS - that is included in the disk if creating a VM from user-image or a - specialized VHD.

    Possible values are:

    **Windows** -

    **Linux**. Possible values include: 'Windows', 'Linux' - :type os_type: str or - ~azure.mgmt.compute.v2018_06_01.models.OperatingSystemTypes - :param encryption_settings: Specifies the encryption settings for the OS - Disk.

    Minimum api-version: 2015-06-15 - :type encryption_settings: - ~azure.mgmt.compute.v2018_06_01.models.DiskEncryptionSettings - :param name: The disk name. - :type name: str - :param vhd: The virtual hard disk. - :type vhd: ~azure.mgmt.compute.v2018_06_01.models.VirtualHardDisk - :param image: The source user image virtual hard disk. The virtual hard - disk will be copied before being attached to the virtual machine. If - SourceImage is provided, the destination virtual hard drive must not - exist. - :type image: ~azure.mgmt.compute.v2018_06_01.models.VirtualHardDisk - :param caching: Specifies the caching requirements.

    Possible - values are:

    **None**

    **ReadOnly**

    **ReadWrite** -

    Default: **None for Standard storage. ReadOnly for Premium - storage**. Possible values include: 'None', 'ReadOnly', 'ReadWrite' - :type caching: str or ~azure.mgmt.compute.v2018_06_01.models.CachingTypes - :param write_accelerator_enabled: Specifies whether writeAccelerator - should be enabled or disabled on the disk. - :type write_accelerator_enabled: bool - :param diff_disk_settings: Specifies the ephemeral Disk Settings for the - operating system disk used by the virtual machine. - :type diff_disk_settings: - ~azure.mgmt.compute.v2018_06_01.models.DiffDiskSettings - :param create_option: Required. Specifies how the virtual machine should - be created.

    Possible values are:

    **Attach** \\u2013 This - value is used when you are using a specialized disk to create the virtual - machine.

    **FromImage** \\u2013 This value is used when you are - using an image to create the virtual machine. If you are using a platform - image, you also use the imageReference element described above. If you are - using a marketplace image, you also use the plan element previously - described. Possible values include: 'FromImage', 'Empty', 'Attach' - :type create_option: str or - ~azure.mgmt.compute.v2018_06_01.models.DiskCreateOptionTypes - :param disk_size_gb: Specifies the size of an empty data disk in - gigabytes. This element can be used to overwrite the size of the disk in a - virtual machine image.

    This value cannot be larger than 1023 GB - :type disk_size_gb: int - :param managed_disk: The managed disk parameters. - :type managed_disk: - ~azure.mgmt.compute.v2018_06_01.models.ManagedDiskParameters - """ - - _validation = { - 'create_option': {'required': True}, - } - - _attribute_map = { - 'os_type': {'key': 'osType', 'type': 'OperatingSystemTypes'}, - 'encryption_settings': {'key': 'encryptionSettings', 'type': 'DiskEncryptionSettings'}, - 'name': {'key': 'name', 'type': 'str'}, - 'vhd': {'key': 'vhd', 'type': 'VirtualHardDisk'}, - 'image': {'key': 'image', 'type': 'VirtualHardDisk'}, - 'caching': {'key': 'caching', 'type': 'CachingTypes'}, - 'write_accelerator_enabled': {'key': 'writeAcceleratorEnabled', 'type': 'bool'}, - 'diff_disk_settings': {'key': 'diffDiskSettings', 'type': 'DiffDiskSettings'}, - 'create_option': {'key': 'createOption', 'type': 'str'}, - 'disk_size_gb': {'key': 'diskSizeGB', 'type': 'int'}, - 'managed_disk': {'key': 'managedDisk', 'type': 'ManagedDiskParameters'}, - } - - def __init__(self, **kwargs): - super(OSDisk, self).__init__(**kwargs) - self.os_type = kwargs.get('os_type', None) - self.encryption_settings = kwargs.get('encryption_settings', None) - self.name = kwargs.get('name', None) - self.vhd = kwargs.get('vhd', None) - self.image = kwargs.get('image', None) - self.caching = kwargs.get('caching', None) - self.write_accelerator_enabled = kwargs.get('write_accelerator_enabled', None) - self.diff_disk_settings = kwargs.get('diff_disk_settings', None) - self.create_option = kwargs.get('create_option', None) - self.disk_size_gb = kwargs.get('disk_size_gb', None) - self.managed_disk = kwargs.get('managed_disk', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/os_disk_image.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/os_disk_image.py deleted file mode 100644 index a05bb7d0ef68..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/os_disk_image.py +++ /dev/null @@ -1,36 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class OSDiskImage(Model): - """Contains the os disk image information. - - All required parameters must be populated in order to send to Azure. - - :param operating_system: Required. The operating system of the - osDiskImage. Possible values include: 'Windows', 'Linux' - :type operating_system: str or - ~azure.mgmt.compute.v2018_06_01.models.OperatingSystemTypes - """ - - _validation = { - 'operating_system': {'required': True}, - } - - _attribute_map = { - 'operating_system': {'key': 'operatingSystem', 'type': 'OperatingSystemTypes'}, - } - - def __init__(self, **kwargs): - super(OSDiskImage, self).__init__(**kwargs) - self.operating_system = kwargs.get('operating_system', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/os_disk_image_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/os_disk_image_py3.py deleted file mode 100644 index a96627150e39..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/os_disk_image_py3.py +++ /dev/null @@ -1,36 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class OSDiskImage(Model): - """Contains the os disk image information. - - All required parameters must be populated in order to send to Azure. - - :param operating_system: Required. The operating system of the - osDiskImage. Possible values include: 'Windows', 'Linux' - :type operating_system: str or - ~azure.mgmt.compute.v2018_06_01.models.OperatingSystemTypes - """ - - _validation = { - 'operating_system': {'required': True}, - } - - _attribute_map = { - 'operating_system': {'key': 'operatingSystem', 'type': 'OperatingSystemTypes'}, - } - - def __init__(self, *, operating_system, **kwargs) -> None: - super(OSDiskImage, self).__init__(**kwargs) - self.operating_system = operating_system diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/os_disk_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/os_disk_py3.py deleted file mode 100644 index 80a07403d2e4..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/os_disk_py3.py +++ /dev/null @@ -1,103 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class OSDisk(Model): - """Specifies information about the operating system disk used by the virtual - machine.

    For more information about disks, see [About disks and - VHDs for Azure virtual - machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-about-disks-vhds?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). - - All required parameters must be populated in order to send to Azure. - - :param os_type: This property allows you to specify the type of the OS - that is included in the disk if creating a VM from user-image or a - specialized VHD.

    Possible values are:

    **Windows** -

    **Linux**. Possible values include: 'Windows', 'Linux' - :type os_type: str or - ~azure.mgmt.compute.v2018_06_01.models.OperatingSystemTypes - :param encryption_settings: Specifies the encryption settings for the OS - Disk.

    Minimum api-version: 2015-06-15 - :type encryption_settings: - ~azure.mgmt.compute.v2018_06_01.models.DiskEncryptionSettings - :param name: The disk name. - :type name: str - :param vhd: The virtual hard disk. - :type vhd: ~azure.mgmt.compute.v2018_06_01.models.VirtualHardDisk - :param image: The source user image virtual hard disk. The virtual hard - disk will be copied before being attached to the virtual machine. If - SourceImage is provided, the destination virtual hard drive must not - exist. - :type image: ~azure.mgmt.compute.v2018_06_01.models.VirtualHardDisk - :param caching: Specifies the caching requirements.

    Possible - values are:

    **None**

    **ReadOnly**

    **ReadWrite** -

    Default: **None for Standard storage. ReadOnly for Premium - storage**. Possible values include: 'None', 'ReadOnly', 'ReadWrite' - :type caching: str or ~azure.mgmt.compute.v2018_06_01.models.CachingTypes - :param write_accelerator_enabled: Specifies whether writeAccelerator - should be enabled or disabled on the disk. - :type write_accelerator_enabled: bool - :param diff_disk_settings: Specifies the ephemeral Disk Settings for the - operating system disk used by the virtual machine. - :type diff_disk_settings: - ~azure.mgmt.compute.v2018_06_01.models.DiffDiskSettings - :param create_option: Required. Specifies how the virtual machine should - be created.

    Possible values are:

    **Attach** \\u2013 This - value is used when you are using a specialized disk to create the virtual - machine.

    **FromImage** \\u2013 This value is used when you are - using an image to create the virtual machine. If you are using a platform - image, you also use the imageReference element described above. If you are - using a marketplace image, you also use the plan element previously - described. Possible values include: 'FromImage', 'Empty', 'Attach' - :type create_option: str or - ~azure.mgmt.compute.v2018_06_01.models.DiskCreateOptionTypes - :param disk_size_gb: Specifies the size of an empty data disk in - gigabytes. This element can be used to overwrite the size of the disk in a - virtual machine image.

    This value cannot be larger than 1023 GB - :type disk_size_gb: int - :param managed_disk: The managed disk parameters. - :type managed_disk: - ~azure.mgmt.compute.v2018_06_01.models.ManagedDiskParameters - """ - - _validation = { - 'create_option': {'required': True}, - } - - _attribute_map = { - 'os_type': {'key': 'osType', 'type': 'OperatingSystemTypes'}, - 'encryption_settings': {'key': 'encryptionSettings', 'type': 'DiskEncryptionSettings'}, - 'name': {'key': 'name', 'type': 'str'}, - 'vhd': {'key': 'vhd', 'type': 'VirtualHardDisk'}, - 'image': {'key': 'image', 'type': 'VirtualHardDisk'}, - 'caching': {'key': 'caching', 'type': 'CachingTypes'}, - 'write_accelerator_enabled': {'key': 'writeAcceleratorEnabled', 'type': 'bool'}, - 'diff_disk_settings': {'key': 'diffDiskSettings', 'type': 'DiffDiskSettings'}, - 'create_option': {'key': 'createOption', 'type': 'str'}, - 'disk_size_gb': {'key': 'diskSizeGB', 'type': 'int'}, - 'managed_disk': {'key': 'managedDisk', 'type': 'ManagedDiskParameters'}, - } - - def __init__(self, *, create_option, os_type=None, encryption_settings=None, name: str=None, vhd=None, image=None, caching=None, write_accelerator_enabled: bool=None, diff_disk_settings=None, disk_size_gb: int=None, managed_disk=None, **kwargs) -> None: - super(OSDisk, self).__init__(**kwargs) - self.os_type = os_type - self.encryption_settings = encryption_settings - self.name = name - self.vhd = vhd - self.image = image - self.caching = caching - self.write_accelerator_enabled = write_accelerator_enabled - self.diff_disk_settings = diff_disk_settings - self.create_option = create_option - self.disk_size_gb = disk_size_gb - self.managed_disk = managed_disk diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/os_profile.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/os_profile.py deleted file mode 100644 index 1857b681dee8..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/os_profile.py +++ /dev/null @@ -1,106 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class OSProfile(Model): - """Specifies the operating system settings for the virtual machine. - - :param computer_name: Specifies the host OS name of the virtual machine. -

    This name cannot be updated after the VM is created.

    - **Max-length (Windows):** 15 characters

    **Max-length (Linux):** - 64 characters.

    For naming conventions and restrictions see [Azure - infrastructure services implementation - guidelines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-infrastructure-subscription-accounts-guidelines?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json#1-naming-conventions). - :type computer_name: str - :param admin_username: Specifies the name of the administrator account. -

    **Windows-only restriction:** Cannot end in "."

    - **Disallowed values:** "administrator", "admin", "user", "user1", "test", - "user2", "test1", "user3", "admin1", "1", "123", "a", "actuser", "adm", - "admin2", "aspnet", "backup", "console", "david", "guest", "john", - "owner", "root", "server", "sql", "support", "support_388945a0", "sys", - "test2", "test3", "user4", "user5".

    **Minimum-length (Linux):** 1 - character

    **Max-length (Linux):** 64 characters

    - **Max-length (Windows):** 20 characters

  • For root access to - the Linux VM, see [Using root privileges on Linux virtual machines in - Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-use-root-privileges?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json)
  • - For a list of built-in system users on Linux that should not be used in - this field, see [Selecting User Names for Linux on - Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-usernames?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json) - :type admin_username: str - :param admin_password: Specifies the password of the administrator - account.

    **Minimum-length (Windows):** 8 characters

    - **Minimum-length (Linux):** 6 characters

    **Max-length - (Windows):** 123 characters

    **Max-length (Linux):** 72 characters -

    **Complexity requirements:** 3 out of 4 conditions below need to - be fulfilled
    Has lower characters
    Has upper characters
    Has a - digit
    Has a special character (Regex match [\\W_])

    - **Disallowed values:** "abc@123", "P@$$w0rd", "P@ssw0rd", "P@ssword123", - "Pa$$word", "pass@word1", "Password!", "Password1", "Password22", - "iloveyou!"

    For resetting the password, see [How to reset the - Remote Desktop service or its login password in a Windows - VM](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-reset-rdp?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json) -

    For resetting root password, see [Manage users, SSH, and check or - repair disks on Azure Linux VMs using the VMAccess - Extension](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-using-vmaccess-extension?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json#reset-root-password) - :type admin_password: str - :param custom_data: Specifies a base-64 encoded string of custom data. The - base-64 encoded string is decoded to a binary array that is saved as a - file on the Virtual Machine. The maximum length of the binary array is - 65535 bytes.

    For using cloud-init for your VM, see [Using - cloud-init to customize a Linux VM during - creation](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-using-cloud-init?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json) - :type custom_data: str - :param windows_configuration: Specifies Windows operating system settings - on the virtual machine. - :type windows_configuration: - ~azure.mgmt.compute.v2018_06_01.models.WindowsConfiguration - :param linux_configuration: Specifies the Linux operating system settings - on the virtual machine.

    For a list of supported Linux - distributions, see [Linux on Azure-Endorsed - Distributions](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-endorsed-distros?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json) -

    For running non-endorsed distributions, see [Information for - Non-Endorsed - Distributions](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-create-upload-generic?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json). - :type linux_configuration: - ~azure.mgmt.compute.v2018_06_01.models.LinuxConfiguration - :param secrets: Specifies set of certificates that should be installed - onto the virtual machine. - :type secrets: - list[~azure.mgmt.compute.v2018_06_01.models.VaultSecretGroup] - :param allow_extension_operations: Specifies whether extension operations - should be allowed on the virtual machine.

    This may only be set to - False when no extensions are present on the virtual machine. - :type allow_extension_operations: bool - """ - - _attribute_map = { - 'computer_name': {'key': 'computerName', 'type': 'str'}, - 'admin_username': {'key': 'adminUsername', 'type': 'str'}, - 'admin_password': {'key': 'adminPassword', 'type': 'str'}, - 'custom_data': {'key': 'customData', 'type': 'str'}, - 'windows_configuration': {'key': 'windowsConfiguration', 'type': 'WindowsConfiguration'}, - 'linux_configuration': {'key': 'linuxConfiguration', 'type': 'LinuxConfiguration'}, - 'secrets': {'key': 'secrets', 'type': '[VaultSecretGroup]'}, - 'allow_extension_operations': {'key': 'allowExtensionOperations', 'type': 'bool'}, - } - - def __init__(self, **kwargs): - super(OSProfile, self).__init__(**kwargs) - self.computer_name = kwargs.get('computer_name', None) - self.admin_username = kwargs.get('admin_username', None) - self.admin_password = kwargs.get('admin_password', None) - self.custom_data = kwargs.get('custom_data', None) - self.windows_configuration = kwargs.get('windows_configuration', None) - self.linux_configuration = kwargs.get('linux_configuration', None) - self.secrets = kwargs.get('secrets', None) - self.allow_extension_operations = kwargs.get('allow_extension_operations', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/os_profile_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/os_profile_py3.py deleted file mode 100644 index fe58408945a0..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/os_profile_py3.py +++ /dev/null @@ -1,106 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class OSProfile(Model): - """Specifies the operating system settings for the virtual machine. - - :param computer_name: Specifies the host OS name of the virtual machine. -

    This name cannot be updated after the VM is created.

    - **Max-length (Windows):** 15 characters

    **Max-length (Linux):** - 64 characters.

    For naming conventions and restrictions see [Azure - infrastructure services implementation - guidelines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-infrastructure-subscription-accounts-guidelines?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json#1-naming-conventions). - :type computer_name: str - :param admin_username: Specifies the name of the administrator account. -

    **Windows-only restriction:** Cannot end in "."

    - **Disallowed values:** "administrator", "admin", "user", "user1", "test", - "user2", "test1", "user3", "admin1", "1", "123", "a", "actuser", "adm", - "admin2", "aspnet", "backup", "console", "david", "guest", "john", - "owner", "root", "server", "sql", "support", "support_388945a0", "sys", - "test2", "test3", "user4", "user5".

    **Minimum-length (Linux):** 1 - character

    **Max-length (Linux):** 64 characters

    - **Max-length (Windows):** 20 characters

  • For root access to - the Linux VM, see [Using root privileges on Linux virtual machines in - Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-use-root-privileges?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json)
  • - For a list of built-in system users on Linux that should not be used in - this field, see [Selecting User Names for Linux on - Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-usernames?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json) - :type admin_username: str - :param admin_password: Specifies the password of the administrator - account.

    **Minimum-length (Windows):** 8 characters

    - **Minimum-length (Linux):** 6 characters

    **Max-length - (Windows):** 123 characters

    **Max-length (Linux):** 72 characters -

    **Complexity requirements:** 3 out of 4 conditions below need to - be fulfilled
    Has lower characters
    Has upper characters
    Has a - digit
    Has a special character (Regex match [\\W_])

    - **Disallowed values:** "abc@123", "P@$$w0rd", "P@ssw0rd", "P@ssword123", - "Pa$$word", "pass@word1", "Password!", "Password1", "Password22", - "iloveyou!"

    For resetting the password, see [How to reset the - Remote Desktop service or its login password in a Windows - VM](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-reset-rdp?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json) -

    For resetting root password, see [Manage users, SSH, and check or - repair disks on Azure Linux VMs using the VMAccess - Extension](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-using-vmaccess-extension?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json#reset-root-password) - :type admin_password: str - :param custom_data: Specifies a base-64 encoded string of custom data. The - base-64 encoded string is decoded to a binary array that is saved as a - file on the Virtual Machine. The maximum length of the binary array is - 65535 bytes.

    For using cloud-init for your VM, see [Using - cloud-init to customize a Linux VM during - creation](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-using-cloud-init?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json) - :type custom_data: str - :param windows_configuration: Specifies Windows operating system settings - on the virtual machine. - :type windows_configuration: - ~azure.mgmt.compute.v2018_06_01.models.WindowsConfiguration - :param linux_configuration: Specifies the Linux operating system settings - on the virtual machine.

    For a list of supported Linux - distributions, see [Linux on Azure-Endorsed - Distributions](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-endorsed-distros?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json) -

    For running non-endorsed distributions, see [Information for - Non-Endorsed - Distributions](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-create-upload-generic?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json). - :type linux_configuration: - ~azure.mgmt.compute.v2018_06_01.models.LinuxConfiguration - :param secrets: Specifies set of certificates that should be installed - onto the virtual machine. - :type secrets: - list[~azure.mgmt.compute.v2018_06_01.models.VaultSecretGroup] - :param allow_extension_operations: Specifies whether extension operations - should be allowed on the virtual machine.

    This may only be set to - False when no extensions are present on the virtual machine. - :type allow_extension_operations: bool - """ - - _attribute_map = { - 'computer_name': {'key': 'computerName', 'type': 'str'}, - 'admin_username': {'key': 'adminUsername', 'type': 'str'}, - 'admin_password': {'key': 'adminPassword', 'type': 'str'}, - 'custom_data': {'key': 'customData', 'type': 'str'}, - 'windows_configuration': {'key': 'windowsConfiguration', 'type': 'WindowsConfiguration'}, - 'linux_configuration': {'key': 'linuxConfiguration', 'type': 'LinuxConfiguration'}, - 'secrets': {'key': 'secrets', 'type': '[VaultSecretGroup]'}, - 'allow_extension_operations': {'key': 'allowExtensionOperations', 'type': 'bool'}, - } - - def __init__(self, *, computer_name: str=None, admin_username: str=None, admin_password: str=None, custom_data: str=None, windows_configuration=None, linux_configuration=None, secrets=None, allow_extension_operations: bool=None, **kwargs) -> None: - super(OSProfile, self).__init__(**kwargs) - self.computer_name = computer_name - self.admin_username = admin_username - self.admin_password = admin_password - self.custom_data = custom_data - self.windows_configuration = windows_configuration - self.linux_configuration = linux_configuration - self.secrets = secrets - self.allow_extension_operations = allow_extension_operations diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/plan.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/plan.py deleted file mode 100644 index d42b6b32cfac..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/plan.py +++ /dev/null @@ -1,46 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class Plan(Model): - """Specifies information about the marketplace image used to create the - virtual machine. This element is only used for marketplace images. Before - you can use a marketplace image from an API, you must enable the image for - programmatic use. In the Azure portal, find the marketplace image that you - want to use and then click **Want to deploy programmatically, Get Started - ->**. Enter any required information and then click **Save**. - - :param name: The plan ID. - :type name: str - :param publisher: The publisher ID. - :type publisher: str - :param product: Specifies the product of the image from the marketplace. - This is the same value as Offer under the imageReference element. - :type product: str - :param promotion_code: The promotion code. - :type promotion_code: str - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'publisher': {'key': 'publisher', 'type': 'str'}, - 'product': {'key': 'product', 'type': 'str'}, - 'promotion_code': {'key': 'promotionCode', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(Plan, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.publisher = kwargs.get('publisher', None) - self.product = kwargs.get('product', None) - self.promotion_code = kwargs.get('promotion_code', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/plan_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/plan_py3.py deleted file mode 100644 index 9cca2c78a123..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/plan_py3.py +++ /dev/null @@ -1,46 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class Plan(Model): - """Specifies information about the marketplace image used to create the - virtual machine. This element is only used for marketplace images. Before - you can use a marketplace image from an API, you must enable the image for - programmatic use. In the Azure portal, find the marketplace image that you - want to use and then click **Want to deploy programmatically, Get Started - ->**. Enter any required information and then click **Save**. - - :param name: The plan ID. - :type name: str - :param publisher: The publisher ID. - :type publisher: str - :param product: Specifies the product of the image from the marketplace. - This is the same value as Offer under the imageReference element. - :type product: str - :param promotion_code: The promotion code. - :type promotion_code: str - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'publisher': {'key': 'publisher', 'type': 'str'}, - 'product': {'key': 'product', 'type': 'str'}, - 'promotion_code': {'key': 'promotionCode', 'type': 'str'}, - } - - def __init__(self, *, name: str=None, publisher: str=None, product: str=None, promotion_code: str=None, **kwargs) -> None: - super(Plan, self).__init__(**kwargs) - self.name = name - self.publisher = publisher - self.product = product - self.promotion_code = promotion_code diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/proximity_placement_group.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/proximity_placement_group.py deleted file mode 100644 index 84ba71e78b13..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/proximity_placement_group.py +++ /dev/null @@ -1,79 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource import Resource - - -class ProximityPlacementGroup(Resource): - """Specifies information about the proximity placement group. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource Id - :vartype id: str - :ivar name: Resource name - :vartype name: str - :ivar type: Resource type - :vartype type: str - :param location: Required. Resource location - :type location: str - :param tags: Resource tags - :type tags: dict[str, str] - :param proximity_placement_group_type: Specifies the type of the proximity - placement group.

    Possible values are:

    **Standard** -

    **Ultra**. Possible values include: 'Standard', 'Ultra' - :type proximity_placement_group_type: str or - ~azure.mgmt.compute.v2018_06_01.models.ProximityPlacementGroupType - :ivar virtual_machines: A list of references to all virtual machines in - the proximity placement group. - :vartype virtual_machines: - list[~azure.mgmt.compute.v2018_06_01.models.SubResource] - :ivar virtual_machine_scale_sets: A list of references to all virtual - machine scale sets in the proximity placement group. - :vartype virtual_machine_scale_sets: - list[~azure.mgmt.compute.v2018_06_01.models.SubResource] - :ivar availability_sets: A list of references to all availability sets in - the proximity placement group. - :vartype availability_sets: - list[~azure.mgmt.compute.v2018_06_01.models.SubResource] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - 'virtual_machines': {'readonly': True}, - 'virtual_machine_scale_sets': {'readonly': True}, - 'availability_sets': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'proximity_placement_group_type': {'key': 'properties.proximityPlacementGroupType', 'type': 'str'}, - 'virtual_machines': {'key': 'properties.virtualMachines', 'type': '[SubResource]'}, - 'virtual_machine_scale_sets': {'key': 'properties.virtualMachineScaleSets', 'type': '[SubResource]'}, - 'availability_sets': {'key': 'properties.availabilitySets', 'type': '[SubResource]'}, - } - - def __init__(self, **kwargs): - super(ProximityPlacementGroup, self).__init__(**kwargs) - self.proximity_placement_group_type = kwargs.get('proximity_placement_group_type', None) - self.virtual_machines = None - self.virtual_machine_scale_sets = None - self.availability_sets = None diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/proximity_placement_group_paged.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/proximity_placement_group_paged.py deleted file mode 100644 index c75832d216a2..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/proximity_placement_group_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class ProximityPlacementGroupPaged(Paged): - """ - A paging container for iterating over a list of :class:`ProximityPlacementGroup ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[ProximityPlacementGroup]'} - } - - def __init__(self, *args, **kwargs): - - super(ProximityPlacementGroupPaged, self).__init__(*args, **kwargs) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/proximity_placement_group_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/proximity_placement_group_py3.py deleted file mode 100644 index 7e07052c09b3..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/proximity_placement_group_py3.py +++ /dev/null @@ -1,79 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource_py3 import Resource - - -class ProximityPlacementGroup(Resource): - """Specifies information about the proximity placement group. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource Id - :vartype id: str - :ivar name: Resource name - :vartype name: str - :ivar type: Resource type - :vartype type: str - :param location: Required. Resource location - :type location: str - :param tags: Resource tags - :type tags: dict[str, str] - :param proximity_placement_group_type: Specifies the type of the proximity - placement group.

    Possible values are:

    **Standard** -

    **Ultra**. Possible values include: 'Standard', 'Ultra' - :type proximity_placement_group_type: str or - ~azure.mgmt.compute.v2018_06_01.models.ProximityPlacementGroupType - :ivar virtual_machines: A list of references to all virtual machines in - the proximity placement group. - :vartype virtual_machines: - list[~azure.mgmt.compute.v2018_06_01.models.SubResource] - :ivar virtual_machine_scale_sets: A list of references to all virtual - machine scale sets in the proximity placement group. - :vartype virtual_machine_scale_sets: - list[~azure.mgmt.compute.v2018_06_01.models.SubResource] - :ivar availability_sets: A list of references to all availability sets in - the proximity placement group. - :vartype availability_sets: - list[~azure.mgmt.compute.v2018_06_01.models.SubResource] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - 'virtual_machines': {'readonly': True}, - 'virtual_machine_scale_sets': {'readonly': True}, - 'availability_sets': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'proximity_placement_group_type': {'key': 'properties.proximityPlacementGroupType', 'type': 'str'}, - 'virtual_machines': {'key': 'properties.virtualMachines', 'type': '[SubResource]'}, - 'virtual_machine_scale_sets': {'key': 'properties.virtualMachineScaleSets', 'type': '[SubResource]'}, - 'availability_sets': {'key': 'properties.availabilitySets', 'type': '[SubResource]'}, - } - - def __init__(self, *, location: str, tags=None, proximity_placement_group_type=None, **kwargs) -> None: - super(ProximityPlacementGroup, self).__init__(location=location, tags=tags, **kwargs) - self.proximity_placement_group_type = proximity_placement_group_type - self.virtual_machines = None - self.virtual_machine_scale_sets = None - self.availability_sets = None diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/proximity_placement_group_update.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/proximity_placement_group_update.py deleted file mode 100644 index cf795d53b0c1..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/proximity_placement_group_update.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .update_resource import UpdateResource - - -class ProximityPlacementGroupUpdate(UpdateResource): - """Specifies information about the proximity placement group. - - :param tags: Resource tags - :type tags: dict[str, str] - """ - - _attribute_map = { - 'tags': {'key': 'tags', 'type': '{str}'}, - } - - def __init__(self, **kwargs): - super(ProximityPlacementGroupUpdate, self).__init__(**kwargs) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/proximity_placement_group_update_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/proximity_placement_group_update_py3.py deleted file mode 100644 index 9d60be7ba9ed..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/proximity_placement_group_update_py3.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .update_resource_py3 import UpdateResource - - -class ProximityPlacementGroupUpdate(UpdateResource): - """Specifies information about the proximity placement group. - - :param tags: Resource tags - :type tags: dict[str, str] - """ - - _attribute_map = { - 'tags': {'key': 'tags', 'type': '{str}'}, - } - - def __init__(self, *, tags=None, **kwargs) -> None: - super(ProximityPlacementGroupUpdate, self).__init__(tags=tags, **kwargs) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/purchase_plan.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/purchase_plan.py deleted file mode 100644 index 2e1509addca6..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/purchase_plan.py +++ /dev/null @@ -1,47 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class PurchasePlan(Model): - """Used for establishing the purchase context of any 3rd Party artifact - through MarketPlace. - - All required parameters must be populated in order to send to Azure. - - :param publisher: Required. The publisher ID. - :type publisher: str - :param name: Required. The plan ID. - :type name: str - :param product: Required. Specifies the product of the image from the - marketplace. This is the same value as Offer under the imageReference - element. - :type product: str - """ - - _validation = { - 'publisher': {'required': True}, - 'name': {'required': True}, - 'product': {'required': True}, - } - - _attribute_map = { - 'publisher': {'key': 'publisher', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'product': {'key': 'product', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(PurchasePlan, self).__init__(**kwargs) - self.publisher = kwargs.get('publisher', None) - self.name = kwargs.get('name', None) - self.product = kwargs.get('product', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/purchase_plan_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/purchase_plan_py3.py deleted file mode 100644 index 26f7996f1633..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/purchase_plan_py3.py +++ /dev/null @@ -1,47 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class PurchasePlan(Model): - """Used for establishing the purchase context of any 3rd Party artifact - through MarketPlace. - - All required parameters must be populated in order to send to Azure. - - :param publisher: Required. The publisher ID. - :type publisher: str - :param name: Required. The plan ID. - :type name: str - :param product: Required. Specifies the product of the image from the - marketplace. This is the same value as Offer under the imageReference - element. - :type product: str - """ - - _validation = { - 'publisher': {'required': True}, - 'name': {'required': True}, - 'product': {'required': True}, - } - - _attribute_map = { - 'publisher': {'key': 'publisher', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'product': {'key': 'product', 'type': 'str'}, - } - - def __init__(self, *, publisher: str, name: str, product: str, **kwargs) -> None: - super(PurchasePlan, self).__init__(**kwargs) - self.publisher = publisher - self.name = name - self.product = product diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/recommended_machine_configuration.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/recommended_machine_configuration.py deleted file mode 100644 index 6e6a0b6012b4..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/recommended_machine_configuration.py +++ /dev/null @@ -1,33 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class RecommendedMachineConfiguration(Model): - """The properties describe the recommended machine configuration for this - Image Definition. These properties are updatable. - - :param v_cp_us: - :type v_cp_us: ~azure.mgmt.compute.v2018_06_01.models.ResourceRange - :param memory: - :type memory: ~azure.mgmt.compute.v2018_06_01.models.ResourceRange - """ - - _attribute_map = { - 'v_cp_us': {'key': 'vCPUs', 'type': 'ResourceRange'}, - 'memory': {'key': 'memory', 'type': 'ResourceRange'}, - } - - def __init__(self, **kwargs): - super(RecommendedMachineConfiguration, self).__init__(**kwargs) - self.v_cp_us = kwargs.get('v_cp_us', None) - self.memory = kwargs.get('memory', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/recommended_machine_configuration_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/recommended_machine_configuration_py3.py deleted file mode 100644 index 5af3a04fed28..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/recommended_machine_configuration_py3.py +++ /dev/null @@ -1,33 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class RecommendedMachineConfiguration(Model): - """The properties describe the recommended machine configuration for this - Image Definition. These properties are updatable. - - :param v_cp_us: - :type v_cp_us: ~azure.mgmt.compute.v2018_06_01.models.ResourceRange - :param memory: - :type memory: ~azure.mgmt.compute.v2018_06_01.models.ResourceRange - """ - - _attribute_map = { - 'v_cp_us': {'key': 'vCPUs', 'type': 'ResourceRange'}, - 'memory': {'key': 'memory', 'type': 'ResourceRange'}, - } - - def __init__(self, *, v_cp_us=None, memory=None, **kwargs) -> None: - super(RecommendedMachineConfiguration, self).__init__(**kwargs) - self.v_cp_us = v_cp_us - self.memory = memory diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/recovery_walk_response.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/recovery_walk_response.py deleted file mode 100644 index 8dcbca604c7e..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/recovery_walk_response.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class RecoveryWalkResponse(Model): - """Response after calling a manual recovery walk. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar walk_performed: Whether the recovery walk was performed - :vartype walk_performed: bool - :ivar next_platform_update_domain: The next update domain that needs to be - walked. Null means walk spanning all update domains has been completed - :vartype next_platform_update_domain: int - """ - - _validation = { - 'walk_performed': {'readonly': True}, - 'next_platform_update_domain': {'readonly': True}, - } - - _attribute_map = { - 'walk_performed': {'key': 'walkPerformed', 'type': 'bool'}, - 'next_platform_update_domain': {'key': 'nextPlatformUpdateDomain', 'type': 'int'}, - } - - def __init__(self, **kwargs): - super(RecoveryWalkResponse, self).__init__(**kwargs) - self.walk_performed = None - self.next_platform_update_domain = None diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/recovery_walk_response_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/recovery_walk_response_py3.py deleted file mode 100644 index 5b24a0ed9b7a..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/recovery_walk_response_py3.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class RecoveryWalkResponse(Model): - """Response after calling a manual recovery walk. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar walk_performed: Whether the recovery walk was performed - :vartype walk_performed: bool - :ivar next_platform_update_domain: The next update domain that needs to be - walked. Null means walk spanning all update domains has been completed - :vartype next_platform_update_domain: int - """ - - _validation = { - 'walk_performed': {'readonly': True}, - 'next_platform_update_domain': {'readonly': True}, - } - - _attribute_map = { - 'walk_performed': {'key': 'walkPerformed', 'type': 'bool'}, - 'next_platform_update_domain': {'key': 'nextPlatformUpdateDomain', 'type': 'int'}, - } - - def __init__(self, **kwargs) -> None: - super(RecoveryWalkResponse, self).__init__(**kwargs) - self.walk_performed = None - self.next_platform_update_domain = None diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/regional_replication_status.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/regional_replication_status.py deleted file mode 100644 index ebc65bbe1146..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/regional_replication_status.py +++ /dev/null @@ -1,53 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class RegionalReplicationStatus(Model): - """This is the regional replication status. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar region: The region to which the gallery Image Version is being - replicated to. - :vartype region: str - :ivar state: This is the regional replication state. Possible values - include: 'Unknown', 'Replicating', 'Completed', 'Failed' - :vartype state: str or - ~azure.mgmt.compute.v2018_06_01.models.ReplicationState - :ivar details: The details of the replication status. - :vartype details: str - :ivar progress: It indicates progress of the replication job. - :vartype progress: int - """ - - _validation = { - 'region': {'readonly': True}, - 'state': {'readonly': True}, - 'details': {'readonly': True}, - 'progress': {'readonly': True}, - } - - _attribute_map = { - 'region': {'key': 'region', 'type': 'str'}, - 'state': {'key': 'state', 'type': 'str'}, - 'details': {'key': 'details', 'type': 'str'}, - 'progress': {'key': 'progress', 'type': 'int'}, - } - - def __init__(self, **kwargs): - super(RegionalReplicationStatus, self).__init__(**kwargs) - self.region = None - self.state = None - self.details = None - self.progress = None diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/regional_replication_status_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/regional_replication_status_py3.py deleted file mode 100644 index df66758183a1..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/regional_replication_status_py3.py +++ /dev/null @@ -1,53 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class RegionalReplicationStatus(Model): - """This is the regional replication status. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar region: The region to which the gallery Image Version is being - replicated to. - :vartype region: str - :ivar state: This is the regional replication state. Possible values - include: 'Unknown', 'Replicating', 'Completed', 'Failed' - :vartype state: str or - ~azure.mgmt.compute.v2018_06_01.models.ReplicationState - :ivar details: The details of the replication status. - :vartype details: str - :ivar progress: It indicates progress of the replication job. - :vartype progress: int - """ - - _validation = { - 'region': {'readonly': True}, - 'state': {'readonly': True}, - 'details': {'readonly': True}, - 'progress': {'readonly': True}, - } - - _attribute_map = { - 'region': {'key': 'region', 'type': 'str'}, - 'state': {'key': 'state', 'type': 'str'}, - 'details': {'key': 'details', 'type': 'str'}, - 'progress': {'key': 'progress', 'type': 'int'}, - } - - def __init__(self, **kwargs) -> None: - super(RegionalReplicationStatus, self).__init__(**kwargs) - self.region = None - self.state = None - self.details = None - self.progress = None diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/replication_status.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/replication_status.py deleted file mode 100644 index b15aec7c4824..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/replication_status.py +++ /dev/null @@ -1,44 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ReplicationStatus(Model): - """This is the replication status of the gallery Image Version. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar aggregated_state: This is the aggregated replication status based on - all the regional replication status flags. Possible values include: - 'Unknown', 'InProgress', 'Completed', 'Failed' - :vartype aggregated_state: str or - ~azure.mgmt.compute.v2018_06_01.models.AggregatedReplicationState - :ivar summary: This is a summary of replication status for each region. - :vartype summary: - list[~azure.mgmt.compute.v2018_06_01.models.RegionalReplicationStatus] - """ - - _validation = { - 'aggregated_state': {'readonly': True}, - 'summary': {'readonly': True}, - } - - _attribute_map = { - 'aggregated_state': {'key': 'aggregatedState', 'type': 'str'}, - 'summary': {'key': 'summary', 'type': '[RegionalReplicationStatus]'}, - } - - def __init__(self, **kwargs): - super(ReplicationStatus, self).__init__(**kwargs) - self.aggregated_state = None - self.summary = None diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/replication_status_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/replication_status_py3.py deleted file mode 100644 index 7901644916c4..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/replication_status_py3.py +++ /dev/null @@ -1,44 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ReplicationStatus(Model): - """This is the replication status of the gallery Image Version. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar aggregated_state: This is the aggregated replication status based on - all the regional replication status flags. Possible values include: - 'Unknown', 'InProgress', 'Completed', 'Failed' - :vartype aggregated_state: str or - ~azure.mgmt.compute.v2018_06_01.models.AggregatedReplicationState - :ivar summary: This is a summary of replication status for each region. - :vartype summary: - list[~azure.mgmt.compute.v2018_06_01.models.RegionalReplicationStatus] - """ - - _validation = { - 'aggregated_state': {'readonly': True}, - 'summary': {'readonly': True}, - } - - _attribute_map = { - 'aggregated_state': {'key': 'aggregatedState', 'type': 'str'}, - 'summary': {'key': 'summary', 'type': '[RegionalReplicationStatus]'}, - } - - def __init__(self, **kwargs) -> None: - super(ReplicationStatus, self).__init__(**kwargs) - self.aggregated_state = None - self.summary = None diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/request_rate_by_interval_input.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/request_rate_by_interval_input.py deleted file mode 100644 index 3667e1d725d9..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/request_rate_by_interval_input.py +++ /dev/null @@ -1,60 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .log_analytics_input_base import LogAnalyticsInputBase - - -class RequestRateByIntervalInput(LogAnalyticsInputBase): - """Api request input for LogAnalytics getRequestRateByInterval Api. - - All required parameters must be populated in order to send to Azure. - - :param blob_container_sas_uri: Required. SAS Uri of the logging blob - container to which LogAnalytics Api writes output logs to. - :type blob_container_sas_uri: str - :param from_time: Required. From time of the query - :type from_time: datetime - :param to_time: Required. To time of the query - :type to_time: datetime - :param group_by_throttle_policy: Group query result by Throttle Policy - applied. - :type group_by_throttle_policy: bool - :param group_by_operation_name: Group query result by Operation Name. - :type group_by_operation_name: bool - :param group_by_resource_name: Group query result by Resource Name. - :type group_by_resource_name: bool - :param interval_length: Required. Interval value in minutes used to create - LogAnalytics call rate logs. Possible values include: 'ThreeMins', - 'FiveMins', 'ThirtyMins', 'SixtyMins' - :type interval_length: str or - ~azure.mgmt.compute.v2018_06_01.models.IntervalInMins - """ - - _validation = { - 'blob_container_sas_uri': {'required': True}, - 'from_time': {'required': True}, - 'to_time': {'required': True}, - 'interval_length': {'required': True}, - } - - _attribute_map = { - 'blob_container_sas_uri': {'key': 'blobContainerSasUri', 'type': 'str'}, - 'from_time': {'key': 'fromTime', 'type': 'iso-8601'}, - 'to_time': {'key': 'toTime', 'type': 'iso-8601'}, - 'group_by_throttle_policy': {'key': 'groupByThrottlePolicy', 'type': 'bool'}, - 'group_by_operation_name': {'key': 'groupByOperationName', 'type': 'bool'}, - 'group_by_resource_name': {'key': 'groupByResourceName', 'type': 'bool'}, - 'interval_length': {'key': 'intervalLength', 'type': 'IntervalInMins'}, - } - - def __init__(self, **kwargs): - super(RequestRateByIntervalInput, self).__init__(**kwargs) - self.interval_length = kwargs.get('interval_length', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/request_rate_by_interval_input_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/request_rate_by_interval_input_py3.py deleted file mode 100644 index 2d8b5fa5d9a0..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/request_rate_by_interval_input_py3.py +++ /dev/null @@ -1,60 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .log_analytics_input_base_py3 import LogAnalyticsInputBase - - -class RequestRateByIntervalInput(LogAnalyticsInputBase): - """Api request input for LogAnalytics getRequestRateByInterval Api. - - All required parameters must be populated in order to send to Azure. - - :param blob_container_sas_uri: Required. SAS Uri of the logging blob - container to which LogAnalytics Api writes output logs to. - :type blob_container_sas_uri: str - :param from_time: Required. From time of the query - :type from_time: datetime - :param to_time: Required. To time of the query - :type to_time: datetime - :param group_by_throttle_policy: Group query result by Throttle Policy - applied. - :type group_by_throttle_policy: bool - :param group_by_operation_name: Group query result by Operation Name. - :type group_by_operation_name: bool - :param group_by_resource_name: Group query result by Resource Name. - :type group_by_resource_name: bool - :param interval_length: Required. Interval value in minutes used to create - LogAnalytics call rate logs. Possible values include: 'ThreeMins', - 'FiveMins', 'ThirtyMins', 'SixtyMins' - :type interval_length: str or - ~azure.mgmt.compute.v2018_06_01.models.IntervalInMins - """ - - _validation = { - 'blob_container_sas_uri': {'required': True}, - 'from_time': {'required': True}, - 'to_time': {'required': True}, - 'interval_length': {'required': True}, - } - - _attribute_map = { - 'blob_container_sas_uri': {'key': 'blobContainerSasUri', 'type': 'str'}, - 'from_time': {'key': 'fromTime', 'type': 'iso-8601'}, - 'to_time': {'key': 'toTime', 'type': 'iso-8601'}, - 'group_by_throttle_policy': {'key': 'groupByThrottlePolicy', 'type': 'bool'}, - 'group_by_operation_name': {'key': 'groupByOperationName', 'type': 'bool'}, - 'group_by_resource_name': {'key': 'groupByResourceName', 'type': 'bool'}, - 'interval_length': {'key': 'intervalLength', 'type': 'IntervalInMins'}, - } - - def __init__(self, *, blob_container_sas_uri: str, from_time, to_time, interval_length, group_by_throttle_policy: bool=None, group_by_operation_name: bool=None, group_by_resource_name: bool=None, **kwargs) -> None: - super(RequestRateByIntervalInput, self).__init__(blob_container_sas_uri=blob_container_sas_uri, from_time=from_time, to_time=to_time, group_by_throttle_policy=group_by_throttle_policy, group_by_operation_name=group_by_operation_name, group_by_resource_name=group_by_resource_name, **kwargs) - self.interval_length = interval_length diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/resource.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/resource.py deleted file mode 100644 index 5dd7d481c685..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/resource.py +++ /dev/null @@ -1,56 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class Resource(Model): - """The Resource model definition. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource Id - :vartype id: str - :ivar name: Resource name - :vartype name: str - :ivar type: Resource type - :vartype type: str - :param location: Required. Resource location - :type location: str - :param tags: Resource tags - :type tags: dict[str, str] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - } - - def __init__(self, **kwargs): - super(Resource, self).__init__(**kwargs) - self.id = None - self.name = None - self.type = None - self.location = kwargs.get('location', None) - self.tags = kwargs.get('tags', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/resource_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/resource_py3.py deleted file mode 100644 index 2f3702caf609..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/resource_py3.py +++ /dev/null @@ -1,56 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class Resource(Model): - """The Resource model definition. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource Id - :vartype id: str - :ivar name: Resource name - :vartype name: str - :ivar type: Resource type - :vartype type: str - :param location: Required. Resource location - :type location: str - :param tags: Resource tags - :type tags: dict[str, str] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - } - - def __init__(self, *, location: str, tags=None, **kwargs) -> None: - super(Resource, self).__init__(**kwargs) - self.id = None - self.name = None - self.type = None - self.location = location - self.tags = tags diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/resource_range.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/resource_range.py deleted file mode 100644 index 6ebd52ac68d6..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/resource_range.py +++ /dev/null @@ -1,32 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ResourceRange(Model): - """Describes the resource range. - - :param min: The minimum number of the resource. - :type min: int - :param max: The maximum number of the resource. - :type max: int - """ - - _attribute_map = { - 'min': {'key': 'min', 'type': 'int'}, - 'max': {'key': 'max', 'type': 'int'}, - } - - def __init__(self, **kwargs): - super(ResourceRange, self).__init__(**kwargs) - self.min = kwargs.get('min', None) - self.max = kwargs.get('max', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/resource_range_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/resource_range_py3.py deleted file mode 100644 index 8ce42edfcc6d..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/resource_range_py3.py +++ /dev/null @@ -1,32 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ResourceRange(Model): - """Describes the resource range. - - :param min: The minimum number of the resource. - :type min: int - :param max: The maximum number of the resource. - :type max: int - """ - - _attribute_map = { - 'min': {'key': 'min', 'type': 'int'}, - 'max': {'key': 'max', 'type': 'int'}, - } - - def __init__(self, *, min: int=None, max: int=None, **kwargs) -> None: - super(ResourceRange, self).__init__(**kwargs) - self.min = min - self.max = max diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/rollback_status_info.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/rollback_status_info.py deleted file mode 100644 index 50fa9b3ab6f6..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/rollback_status_info.py +++ /dev/null @@ -1,48 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class RollbackStatusInfo(Model): - """Information about rollback on failed VM instances after a OS Upgrade - operation. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar successfully_rolledback_instance_count: The number of instances - which have been successfully rolled back. - :vartype successfully_rolledback_instance_count: int - :ivar failed_rolledback_instance_count: The number of instances which - failed to rollback. - :vartype failed_rolledback_instance_count: int - :ivar rollback_error: Error details if OS rollback failed. - :vartype rollback_error: ~azure.mgmt.compute.v2018_06_01.models.ApiError - """ - - _validation = { - 'successfully_rolledback_instance_count': {'readonly': True}, - 'failed_rolledback_instance_count': {'readonly': True}, - 'rollback_error': {'readonly': True}, - } - - _attribute_map = { - 'successfully_rolledback_instance_count': {'key': 'successfullyRolledbackInstanceCount', 'type': 'int'}, - 'failed_rolledback_instance_count': {'key': 'failedRolledbackInstanceCount', 'type': 'int'}, - 'rollback_error': {'key': 'rollbackError', 'type': 'ApiError'}, - } - - def __init__(self, **kwargs): - super(RollbackStatusInfo, self).__init__(**kwargs) - self.successfully_rolledback_instance_count = None - self.failed_rolledback_instance_count = None - self.rollback_error = None diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/rollback_status_info_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/rollback_status_info_py3.py deleted file mode 100644 index 9a0442704ff3..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/rollback_status_info_py3.py +++ /dev/null @@ -1,48 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class RollbackStatusInfo(Model): - """Information about rollback on failed VM instances after a OS Upgrade - operation. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar successfully_rolledback_instance_count: The number of instances - which have been successfully rolled back. - :vartype successfully_rolledback_instance_count: int - :ivar failed_rolledback_instance_count: The number of instances which - failed to rollback. - :vartype failed_rolledback_instance_count: int - :ivar rollback_error: Error details if OS rollback failed. - :vartype rollback_error: ~azure.mgmt.compute.v2018_06_01.models.ApiError - """ - - _validation = { - 'successfully_rolledback_instance_count': {'readonly': True}, - 'failed_rolledback_instance_count': {'readonly': True}, - 'rollback_error': {'readonly': True}, - } - - _attribute_map = { - 'successfully_rolledback_instance_count': {'key': 'successfullyRolledbackInstanceCount', 'type': 'int'}, - 'failed_rolledback_instance_count': {'key': 'failedRolledbackInstanceCount', 'type': 'int'}, - 'rollback_error': {'key': 'rollbackError', 'type': 'ApiError'}, - } - - def __init__(self, **kwargs) -> None: - super(RollbackStatusInfo, self).__init__(**kwargs) - self.successfully_rolledback_instance_count = None - self.failed_rolledback_instance_count = None - self.rollback_error = None diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/rolling_upgrade_policy.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/rolling_upgrade_policy.py deleted file mode 100644 index 1eecaa5e2e65..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/rolling_upgrade_policy.py +++ /dev/null @@ -1,63 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class RollingUpgradePolicy(Model): - """The configuration parameters used while performing a rolling upgrade. - - :param max_batch_instance_percent: The maximum percent of total virtual - machine instances that will be upgraded simultaneously by the rolling - upgrade in one batch. As this is a maximum, unhealthy instances in - previous or future batches can cause the percentage of instances in a - batch to decrease to ensure higher reliability. The default value for this - parameter is 20%. - :type max_batch_instance_percent: int - :param max_unhealthy_instance_percent: The maximum percentage of the total - virtual machine instances in the scale set that can be simultaneously - unhealthy, either as a result of being upgraded, or by being found in an - unhealthy state by the virtual machine health checks before the rolling - upgrade aborts. This constraint will be checked prior to starting any - batch. The default value for this parameter is 20%. - :type max_unhealthy_instance_percent: int - :param max_unhealthy_upgraded_instance_percent: The maximum percentage of - upgraded virtual machine instances that can be found to be in an unhealthy - state. This check will happen after each batch is upgraded. If this - percentage is ever exceeded, the rolling update aborts. The default value - for this parameter is 20%. - :type max_unhealthy_upgraded_instance_percent: int - :param pause_time_between_batches: The wait time between completing the - update for all virtual machines in one batch and starting the next batch. - The time duration should be specified in ISO 8601 format. The default - value is 0 seconds (PT0S). - :type pause_time_between_batches: str - """ - - _validation = { - 'max_batch_instance_percent': {'maximum': 100, 'minimum': 5}, - 'max_unhealthy_instance_percent': {'maximum': 100, 'minimum': 5}, - 'max_unhealthy_upgraded_instance_percent': {'maximum': 100, 'minimum': 0}, - } - - _attribute_map = { - 'max_batch_instance_percent': {'key': 'maxBatchInstancePercent', 'type': 'int'}, - 'max_unhealthy_instance_percent': {'key': 'maxUnhealthyInstancePercent', 'type': 'int'}, - 'max_unhealthy_upgraded_instance_percent': {'key': 'maxUnhealthyUpgradedInstancePercent', 'type': 'int'}, - 'pause_time_between_batches': {'key': 'pauseTimeBetweenBatches', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(RollingUpgradePolicy, self).__init__(**kwargs) - self.max_batch_instance_percent = kwargs.get('max_batch_instance_percent', None) - self.max_unhealthy_instance_percent = kwargs.get('max_unhealthy_instance_percent', None) - self.max_unhealthy_upgraded_instance_percent = kwargs.get('max_unhealthy_upgraded_instance_percent', None) - self.pause_time_between_batches = kwargs.get('pause_time_between_batches', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/rolling_upgrade_policy_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/rolling_upgrade_policy_py3.py deleted file mode 100644 index e698a382f112..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/rolling_upgrade_policy_py3.py +++ /dev/null @@ -1,63 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class RollingUpgradePolicy(Model): - """The configuration parameters used while performing a rolling upgrade. - - :param max_batch_instance_percent: The maximum percent of total virtual - machine instances that will be upgraded simultaneously by the rolling - upgrade in one batch. As this is a maximum, unhealthy instances in - previous or future batches can cause the percentage of instances in a - batch to decrease to ensure higher reliability. The default value for this - parameter is 20%. - :type max_batch_instance_percent: int - :param max_unhealthy_instance_percent: The maximum percentage of the total - virtual machine instances in the scale set that can be simultaneously - unhealthy, either as a result of being upgraded, or by being found in an - unhealthy state by the virtual machine health checks before the rolling - upgrade aborts. This constraint will be checked prior to starting any - batch. The default value for this parameter is 20%. - :type max_unhealthy_instance_percent: int - :param max_unhealthy_upgraded_instance_percent: The maximum percentage of - upgraded virtual machine instances that can be found to be in an unhealthy - state. This check will happen after each batch is upgraded. If this - percentage is ever exceeded, the rolling update aborts. The default value - for this parameter is 20%. - :type max_unhealthy_upgraded_instance_percent: int - :param pause_time_between_batches: The wait time between completing the - update for all virtual machines in one batch and starting the next batch. - The time duration should be specified in ISO 8601 format. The default - value is 0 seconds (PT0S). - :type pause_time_between_batches: str - """ - - _validation = { - 'max_batch_instance_percent': {'maximum': 100, 'minimum': 5}, - 'max_unhealthy_instance_percent': {'maximum': 100, 'minimum': 5}, - 'max_unhealthy_upgraded_instance_percent': {'maximum': 100, 'minimum': 0}, - } - - _attribute_map = { - 'max_batch_instance_percent': {'key': 'maxBatchInstancePercent', 'type': 'int'}, - 'max_unhealthy_instance_percent': {'key': 'maxUnhealthyInstancePercent', 'type': 'int'}, - 'max_unhealthy_upgraded_instance_percent': {'key': 'maxUnhealthyUpgradedInstancePercent', 'type': 'int'}, - 'pause_time_between_batches': {'key': 'pauseTimeBetweenBatches', 'type': 'str'}, - } - - def __init__(self, *, max_batch_instance_percent: int=None, max_unhealthy_instance_percent: int=None, max_unhealthy_upgraded_instance_percent: int=None, pause_time_between_batches: str=None, **kwargs) -> None: - super(RollingUpgradePolicy, self).__init__(**kwargs) - self.max_batch_instance_percent = max_batch_instance_percent - self.max_unhealthy_instance_percent = max_unhealthy_instance_percent - self.max_unhealthy_upgraded_instance_percent = max_unhealthy_upgraded_instance_percent - self.pause_time_between_batches = pause_time_between_batches diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/rolling_upgrade_progress_info.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/rolling_upgrade_progress_info.py deleted file mode 100644 index 87e40590e275..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/rolling_upgrade_progress_info.py +++ /dev/null @@ -1,55 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class RollingUpgradeProgressInfo(Model): - """Information about the number of virtual machine instances in each upgrade - state. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar successful_instance_count: The number of instances that have been - successfully upgraded. - :vartype successful_instance_count: int - :ivar failed_instance_count: The number of instances that have failed to - be upgraded successfully. - :vartype failed_instance_count: int - :ivar in_progress_instance_count: The number of instances that are - currently being upgraded. - :vartype in_progress_instance_count: int - :ivar pending_instance_count: The number of instances that have not yet - begun to be upgraded. - :vartype pending_instance_count: int - """ - - _validation = { - 'successful_instance_count': {'readonly': True}, - 'failed_instance_count': {'readonly': True}, - 'in_progress_instance_count': {'readonly': True}, - 'pending_instance_count': {'readonly': True}, - } - - _attribute_map = { - 'successful_instance_count': {'key': 'successfulInstanceCount', 'type': 'int'}, - 'failed_instance_count': {'key': 'failedInstanceCount', 'type': 'int'}, - 'in_progress_instance_count': {'key': 'inProgressInstanceCount', 'type': 'int'}, - 'pending_instance_count': {'key': 'pendingInstanceCount', 'type': 'int'}, - } - - def __init__(self, **kwargs): - super(RollingUpgradeProgressInfo, self).__init__(**kwargs) - self.successful_instance_count = None - self.failed_instance_count = None - self.in_progress_instance_count = None - self.pending_instance_count = None diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/rolling_upgrade_progress_info_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/rolling_upgrade_progress_info_py3.py deleted file mode 100644 index 060abc3063b4..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/rolling_upgrade_progress_info_py3.py +++ /dev/null @@ -1,55 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class RollingUpgradeProgressInfo(Model): - """Information about the number of virtual machine instances in each upgrade - state. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar successful_instance_count: The number of instances that have been - successfully upgraded. - :vartype successful_instance_count: int - :ivar failed_instance_count: The number of instances that have failed to - be upgraded successfully. - :vartype failed_instance_count: int - :ivar in_progress_instance_count: The number of instances that are - currently being upgraded. - :vartype in_progress_instance_count: int - :ivar pending_instance_count: The number of instances that have not yet - begun to be upgraded. - :vartype pending_instance_count: int - """ - - _validation = { - 'successful_instance_count': {'readonly': True}, - 'failed_instance_count': {'readonly': True}, - 'in_progress_instance_count': {'readonly': True}, - 'pending_instance_count': {'readonly': True}, - } - - _attribute_map = { - 'successful_instance_count': {'key': 'successfulInstanceCount', 'type': 'int'}, - 'failed_instance_count': {'key': 'failedInstanceCount', 'type': 'int'}, - 'in_progress_instance_count': {'key': 'inProgressInstanceCount', 'type': 'int'}, - 'pending_instance_count': {'key': 'pendingInstanceCount', 'type': 'int'}, - } - - def __init__(self, **kwargs) -> None: - super(RollingUpgradeProgressInfo, self).__init__(**kwargs) - self.successful_instance_count = None - self.failed_instance_count = None - self.in_progress_instance_count = None - self.pending_instance_count = None diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/rolling_upgrade_running_status.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/rolling_upgrade_running_status.py deleted file mode 100644 index a493b63db4da..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/rolling_upgrade_running_status.py +++ /dev/null @@ -1,54 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class RollingUpgradeRunningStatus(Model): - """Information about the current running state of the overall upgrade. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar code: Code indicating the current status of the upgrade. Possible - values include: 'RollingForward', 'Cancelled', 'Completed', 'Faulted' - :vartype code: str or - ~azure.mgmt.compute.v2018_06_01.models.RollingUpgradeStatusCode - :ivar start_time: Start time of the upgrade. - :vartype start_time: datetime - :ivar last_action: The last action performed on the rolling upgrade. - Possible values include: 'Start', 'Cancel' - :vartype last_action: str or - ~azure.mgmt.compute.v2018_06_01.models.RollingUpgradeActionType - :ivar last_action_time: Last action time of the upgrade. - :vartype last_action_time: datetime - """ - - _validation = { - 'code': {'readonly': True}, - 'start_time': {'readonly': True}, - 'last_action': {'readonly': True}, - 'last_action_time': {'readonly': True}, - } - - _attribute_map = { - 'code': {'key': 'code', 'type': 'RollingUpgradeStatusCode'}, - 'start_time': {'key': 'startTime', 'type': 'iso-8601'}, - 'last_action': {'key': 'lastAction', 'type': 'RollingUpgradeActionType'}, - 'last_action_time': {'key': 'lastActionTime', 'type': 'iso-8601'}, - } - - def __init__(self, **kwargs): - super(RollingUpgradeRunningStatus, self).__init__(**kwargs) - self.code = None - self.start_time = None - self.last_action = None - self.last_action_time = None diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/rolling_upgrade_running_status_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/rolling_upgrade_running_status_py3.py deleted file mode 100644 index 479e95ee27d1..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/rolling_upgrade_running_status_py3.py +++ /dev/null @@ -1,54 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class RollingUpgradeRunningStatus(Model): - """Information about the current running state of the overall upgrade. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar code: Code indicating the current status of the upgrade. Possible - values include: 'RollingForward', 'Cancelled', 'Completed', 'Faulted' - :vartype code: str or - ~azure.mgmt.compute.v2018_06_01.models.RollingUpgradeStatusCode - :ivar start_time: Start time of the upgrade. - :vartype start_time: datetime - :ivar last_action: The last action performed on the rolling upgrade. - Possible values include: 'Start', 'Cancel' - :vartype last_action: str or - ~azure.mgmt.compute.v2018_06_01.models.RollingUpgradeActionType - :ivar last_action_time: Last action time of the upgrade. - :vartype last_action_time: datetime - """ - - _validation = { - 'code': {'readonly': True}, - 'start_time': {'readonly': True}, - 'last_action': {'readonly': True}, - 'last_action_time': {'readonly': True}, - } - - _attribute_map = { - 'code': {'key': 'code', 'type': 'RollingUpgradeStatusCode'}, - 'start_time': {'key': 'startTime', 'type': 'iso-8601'}, - 'last_action': {'key': 'lastAction', 'type': 'RollingUpgradeActionType'}, - 'last_action_time': {'key': 'lastActionTime', 'type': 'iso-8601'}, - } - - def __init__(self, **kwargs) -> None: - super(RollingUpgradeRunningStatus, self).__init__(**kwargs) - self.code = None - self.start_time = None - self.last_action = None - self.last_action_time = None diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/rolling_upgrade_status_info.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/rolling_upgrade_status_info.py deleted file mode 100644 index 3a96c43852b7..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/rolling_upgrade_status_info.py +++ /dev/null @@ -1,76 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource import Resource - - -class RollingUpgradeStatusInfo(Resource): - """The status of the latest virtual machine scale set rolling upgrade. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource Id - :vartype id: str - :ivar name: Resource name - :vartype name: str - :ivar type: Resource type - :vartype type: str - :param location: Required. Resource location - :type location: str - :param tags: Resource tags - :type tags: dict[str, str] - :ivar policy: The rolling upgrade policies applied for this upgrade. - :vartype policy: - ~azure.mgmt.compute.v2018_06_01.models.RollingUpgradePolicy - :ivar running_status: Information about the current running state of the - overall upgrade. - :vartype running_status: - ~azure.mgmt.compute.v2018_06_01.models.RollingUpgradeRunningStatus - :ivar progress: Information about the number of virtual machine instances - in each upgrade state. - :vartype progress: - ~azure.mgmt.compute.v2018_06_01.models.RollingUpgradeProgressInfo - :ivar error: Error details for this upgrade, if there are any. - :vartype error: ~azure.mgmt.compute.v2018_06_01.models.ApiError - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - 'policy': {'readonly': True}, - 'running_status': {'readonly': True}, - 'progress': {'readonly': True}, - 'error': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'policy': {'key': 'properties.policy', 'type': 'RollingUpgradePolicy'}, - 'running_status': {'key': 'properties.runningStatus', 'type': 'RollingUpgradeRunningStatus'}, - 'progress': {'key': 'properties.progress', 'type': 'RollingUpgradeProgressInfo'}, - 'error': {'key': 'properties.error', 'type': 'ApiError'}, - } - - def __init__(self, **kwargs): - super(RollingUpgradeStatusInfo, self).__init__(**kwargs) - self.policy = None - self.running_status = None - self.progress = None - self.error = None diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/rolling_upgrade_status_info_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/rolling_upgrade_status_info_py3.py deleted file mode 100644 index afb2112208a4..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/rolling_upgrade_status_info_py3.py +++ /dev/null @@ -1,76 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource_py3 import Resource - - -class RollingUpgradeStatusInfo(Resource): - """The status of the latest virtual machine scale set rolling upgrade. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource Id - :vartype id: str - :ivar name: Resource name - :vartype name: str - :ivar type: Resource type - :vartype type: str - :param location: Required. Resource location - :type location: str - :param tags: Resource tags - :type tags: dict[str, str] - :ivar policy: The rolling upgrade policies applied for this upgrade. - :vartype policy: - ~azure.mgmt.compute.v2018_06_01.models.RollingUpgradePolicy - :ivar running_status: Information about the current running state of the - overall upgrade. - :vartype running_status: - ~azure.mgmt.compute.v2018_06_01.models.RollingUpgradeRunningStatus - :ivar progress: Information about the number of virtual machine instances - in each upgrade state. - :vartype progress: - ~azure.mgmt.compute.v2018_06_01.models.RollingUpgradeProgressInfo - :ivar error: Error details for this upgrade, if there are any. - :vartype error: ~azure.mgmt.compute.v2018_06_01.models.ApiError - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - 'policy': {'readonly': True}, - 'running_status': {'readonly': True}, - 'progress': {'readonly': True}, - 'error': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'policy': {'key': 'properties.policy', 'type': 'RollingUpgradePolicy'}, - 'running_status': {'key': 'properties.runningStatus', 'type': 'RollingUpgradeRunningStatus'}, - 'progress': {'key': 'properties.progress', 'type': 'RollingUpgradeProgressInfo'}, - 'error': {'key': 'properties.error', 'type': 'ApiError'}, - } - - def __init__(self, *, location: str, tags=None, **kwargs) -> None: - super(RollingUpgradeStatusInfo, self).__init__(location=location, tags=tags, **kwargs) - self.policy = None - self.running_status = None - self.progress = None - self.error = None diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/run_command_document.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/run_command_document.py deleted file mode 100644 index c4f94125b69b..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/run_command_document.py +++ /dev/null @@ -1,61 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .run_command_document_base import RunCommandDocumentBase - - -class RunCommandDocument(RunCommandDocumentBase): - """Describes the properties of a Run Command. - - All required parameters must be populated in order to send to Azure. - - :param schema: Required. The VM run command schema. - :type schema: str - :param id: Required. The VM run command id. - :type id: str - :param os_type: Required. The Operating System type. Possible values - include: 'Windows', 'Linux' - :type os_type: str or - ~azure.mgmt.compute.v2018_06_01.models.OperatingSystemTypes - :param label: Required. The VM run command label. - :type label: str - :param description: Required. The VM run command description. - :type description: str - :param script: Required. The script to be executed. - :type script: list[str] - :param parameters: The parameters used by the script. - :type parameters: - list[~azure.mgmt.compute.v2018_06_01.models.RunCommandParameterDefinition] - """ - - _validation = { - 'schema': {'required': True}, - 'id': {'required': True}, - 'os_type': {'required': True}, - 'label': {'required': True}, - 'description': {'required': True}, - 'script': {'required': True}, - } - - _attribute_map = { - 'schema': {'key': '$schema', 'type': 'str'}, - 'id': {'key': 'id', 'type': 'str'}, - 'os_type': {'key': 'osType', 'type': 'OperatingSystemTypes'}, - 'label': {'key': 'label', 'type': 'str'}, - 'description': {'key': 'description', 'type': 'str'}, - 'script': {'key': 'script', 'type': '[str]'}, - 'parameters': {'key': 'parameters', 'type': '[RunCommandParameterDefinition]'}, - } - - def __init__(self, **kwargs): - super(RunCommandDocument, self).__init__(**kwargs) - self.script = kwargs.get('script', None) - self.parameters = kwargs.get('parameters', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/run_command_document_base.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/run_command_document_base.py deleted file mode 100644 index 194bd6703d71..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/run_command_document_base.py +++ /dev/null @@ -1,56 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class RunCommandDocumentBase(Model): - """Describes the properties of a Run Command metadata. - - All required parameters must be populated in order to send to Azure. - - :param schema: Required. The VM run command schema. - :type schema: str - :param id: Required. The VM run command id. - :type id: str - :param os_type: Required. The Operating System type. Possible values - include: 'Windows', 'Linux' - :type os_type: str or - ~azure.mgmt.compute.v2018_06_01.models.OperatingSystemTypes - :param label: Required. The VM run command label. - :type label: str - :param description: Required. The VM run command description. - :type description: str - """ - - _validation = { - 'schema': {'required': True}, - 'id': {'required': True}, - 'os_type': {'required': True}, - 'label': {'required': True}, - 'description': {'required': True}, - } - - _attribute_map = { - 'schema': {'key': '$schema', 'type': 'str'}, - 'id': {'key': 'id', 'type': 'str'}, - 'os_type': {'key': 'osType', 'type': 'OperatingSystemTypes'}, - 'label': {'key': 'label', 'type': 'str'}, - 'description': {'key': 'description', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(RunCommandDocumentBase, self).__init__(**kwargs) - self.schema = kwargs.get('schema', None) - self.id = kwargs.get('id', None) - self.os_type = kwargs.get('os_type', None) - self.label = kwargs.get('label', None) - self.description = kwargs.get('description', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/run_command_document_base_paged.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/run_command_document_base_paged.py deleted file mode 100644 index 59eee10b12bf..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/run_command_document_base_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class RunCommandDocumentBasePaged(Paged): - """ - A paging container for iterating over a list of :class:`RunCommandDocumentBase ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[RunCommandDocumentBase]'} - } - - def __init__(self, *args, **kwargs): - - super(RunCommandDocumentBasePaged, self).__init__(*args, **kwargs) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/run_command_document_base_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/run_command_document_base_py3.py deleted file mode 100644 index e82b42e4328d..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/run_command_document_base_py3.py +++ /dev/null @@ -1,56 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class RunCommandDocumentBase(Model): - """Describes the properties of a Run Command metadata. - - All required parameters must be populated in order to send to Azure. - - :param schema: Required. The VM run command schema. - :type schema: str - :param id: Required. The VM run command id. - :type id: str - :param os_type: Required. The Operating System type. Possible values - include: 'Windows', 'Linux' - :type os_type: str or - ~azure.mgmt.compute.v2018_06_01.models.OperatingSystemTypes - :param label: Required. The VM run command label. - :type label: str - :param description: Required. The VM run command description. - :type description: str - """ - - _validation = { - 'schema': {'required': True}, - 'id': {'required': True}, - 'os_type': {'required': True}, - 'label': {'required': True}, - 'description': {'required': True}, - } - - _attribute_map = { - 'schema': {'key': '$schema', 'type': 'str'}, - 'id': {'key': 'id', 'type': 'str'}, - 'os_type': {'key': 'osType', 'type': 'OperatingSystemTypes'}, - 'label': {'key': 'label', 'type': 'str'}, - 'description': {'key': 'description', 'type': 'str'}, - } - - def __init__(self, *, schema: str, id: str, os_type, label: str, description: str, **kwargs) -> None: - super(RunCommandDocumentBase, self).__init__(**kwargs) - self.schema = schema - self.id = id - self.os_type = os_type - self.label = label - self.description = description diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/run_command_document_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/run_command_document_py3.py deleted file mode 100644 index 698a77668818..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/run_command_document_py3.py +++ /dev/null @@ -1,61 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .run_command_document_base_py3 import RunCommandDocumentBase - - -class RunCommandDocument(RunCommandDocumentBase): - """Describes the properties of a Run Command. - - All required parameters must be populated in order to send to Azure. - - :param schema: Required. The VM run command schema. - :type schema: str - :param id: Required. The VM run command id. - :type id: str - :param os_type: Required. The Operating System type. Possible values - include: 'Windows', 'Linux' - :type os_type: str or - ~azure.mgmt.compute.v2018_06_01.models.OperatingSystemTypes - :param label: Required. The VM run command label. - :type label: str - :param description: Required. The VM run command description. - :type description: str - :param script: Required. The script to be executed. - :type script: list[str] - :param parameters: The parameters used by the script. - :type parameters: - list[~azure.mgmt.compute.v2018_06_01.models.RunCommandParameterDefinition] - """ - - _validation = { - 'schema': {'required': True}, - 'id': {'required': True}, - 'os_type': {'required': True}, - 'label': {'required': True}, - 'description': {'required': True}, - 'script': {'required': True}, - } - - _attribute_map = { - 'schema': {'key': '$schema', 'type': 'str'}, - 'id': {'key': 'id', 'type': 'str'}, - 'os_type': {'key': 'osType', 'type': 'OperatingSystemTypes'}, - 'label': {'key': 'label', 'type': 'str'}, - 'description': {'key': 'description', 'type': 'str'}, - 'script': {'key': 'script', 'type': '[str]'}, - 'parameters': {'key': 'parameters', 'type': '[RunCommandParameterDefinition]'}, - } - - def __init__(self, *, schema: str, id: str, os_type, label: str, description: str, script, parameters=None, **kwargs) -> None: - super(RunCommandDocument, self).__init__(schema=schema, id=id, os_type=os_type, label=label, description=description, **kwargs) - self.script = script - self.parameters = parameters diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/run_command_input.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/run_command_input.py deleted file mode 100644 index 90dd6d6a5c1f..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/run_command_input.py +++ /dev/null @@ -1,44 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class RunCommandInput(Model): - """Capture Virtual Machine parameters. - - All required parameters must be populated in order to send to Azure. - - :param command_id: Required. The run command id. - :type command_id: str - :param script: Optional. The script to be executed. When this value is - given, the given script will override the default script of the command. - :type script: list[str] - :param parameters: The run command parameters. - :type parameters: - list[~azure.mgmt.compute.v2018_06_01.models.RunCommandInputParameter] - """ - - _validation = { - 'command_id': {'required': True}, - } - - _attribute_map = { - 'command_id': {'key': 'commandId', 'type': 'str'}, - 'script': {'key': 'script', 'type': '[str]'}, - 'parameters': {'key': 'parameters', 'type': '[RunCommandInputParameter]'}, - } - - def __init__(self, **kwargs): - super(RunCommandInput, self).__init__(**kwargs) - self.command_id = kwargs.get('command_id', None) - self.script = kwargs.get('script', None) - self.parameters = kwargs.get('parameters', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/run_command_input_parameter.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/run_command_input_parameter.py deleted file mode 100644 index cd76ad81bfa2..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/run_command_input_parameter.py +++ /dev/null @@ -1,39 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class RunCommandInputParameter(Model): - """Describes the properties of a run command parameter. - - All required parameters must be populated in order to send to Azure. - - :param name: Required. The run command parameter name. - :type name: str - :param value: Required. The run command parameter value. - :type value: str - """ - - _validation = { - 'name': {'required': True}, - 'value': {'required': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'value': {'key': 'value', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(RunCommandInputParameter, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.value = kwargs.get('value', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/run_command_input_parameter_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/run_command_input_parameter_py3.py deleted file mode 100644 index 6013f038a1c3..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/run_command_input_parameter_py3.py +++ /dev/null @@ -1,39 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class RunCommandInputParameter(Model): - """Describes the properties of a run command parameter. - - All required parameters must be populated in order to send to Azure. - - :param name: Required. The run command parameter name. - :type name: str - :param value: Required. The run command parameter value. - :type value: str - """ - - _validation = { - 'name': {'required': True}, - 'value': {'required': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'value': {'key': 'value', 'type': 'str'}, - } - - def __init__(self, *, name: str, value: str, **kwargs) -> None: - super(RunCommandInputParameter, self).__init__(**kwargs) - self.name = name - self.value = value diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/run_command_input_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/run_command_input_py3.py deleted file mode 100644 index cb2c7da12b4c..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/run_command_input_py3.py +++ /dev/null @@ -1,44 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class RunCommandInput(Model): - """Capture Virtual Machine parameters. - - All required parameters must be populated in order to send to Azure. - - :param command_id: Required. The run command id. - :type command_id: str - :param script: Optional. The script to be executed. When this value is - given, the given script will override the default script of the command. - :type script: list[str] - :param parameters: The run command parameters. - :type parameters: - list[~azure.mgmt.compute.v2018_06_01.models.RunCommandInputParameter] - """ - - _validation = { - 'command_id': {'required': True}, - } - - _attribute_map = { - 'command_id': {'key': 'commandId', 'type': 'str'}, - 'script': {'key': 'script', 'type': '[str]'}, - 'parameters': {'key': 'parameters', 'type': '[RunCommandInputParameter]'}, - } - - def __init__(self, *, command_id: str, script=None, parameters=None, **kwargs) -> None: - super(RunCommandInput, self).__init__(**kwargs) - self.command_id = command_id - self.script = script - self.parameters = parameters diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/run_command_parameter_definition.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/run_command_parameter_definition.py deleted file mode 100644 index e09f774d8241..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/run_command_parameter_definition.py +++ /dev/null @@ -1,48 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class RunCommandParameterDefinition(Model): - """Describes the properties of a run command parameter. - - All required parameters must be populated in order to send to Azure. - - :param name: Required. The run command parameter name. - :type name: str - :param type: Required. The run command parameter type. - :type type: str - :param default_value: The run command parameter default value. - :type default_value: str - :param required: The run command parameter required. Default value: False - . - :type required: bool - """ - - _validation = { - 'name': {'required': True}, - 'type': {'required': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'default_value': {'key': 'defaultValue', 'type': 'str'}, - 'required': {'key': 'required', 'type': 'bool'}, - } - - def __init__(self, **kwargs): - super(RunCommandParameterDefinition, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.type = kwargs.get('type', None) - self.default_value = kwargs.get('default_value', None) - self.required = kwargs.get('required', False) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/run_command_parameter_definition_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/run_command_parameter_definition_py3.py deleted file mode 100644 index e5fbc708f965..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/run_command_parameter_definition_py3.py +++ /dev/null @@ -1,48 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class RunCommandParameterDefinition(Model): - """Describes the properties of a run command parameter. - - All required parameters must be populated in order to send to Azure. - - :param name: Required. The run command parameter name. - :type name: str - :param type: Required. The run command parameter type. - :type type: str - :param default_value: The run command parameter default value. - :type default_value: str - :param required: The run command parameter required. Default value: False - . - :type required: bool - """ - - _validation = { - 'name': {'required': True}, - 'type': {'required': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'default_value': {'key': 'defaultValue', 'type': 'str'}, - 'required': {'key': 'required', 'type': 'bool'}, - } - - def __init__(self, *, name: str, type: str, default_value: str=None, required: bool=False, **kwargs) -> None: - super(RunCommandParameterDefinition, self).__init__(**kwargs) - self.name = name - self.type = type - self.default_value = default_value - self.required = required diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/run_command_result.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/run_command_result.py deleted file mode 100644 index 927839a4451b..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/run_command_result.py +++ /dev/null @@ -1,29 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class RunCommandResult(Model): - """RunCommandResult. - - :param value: Run command operation response. - :type value: - list[~azure.mgmt.compute.v2018_06_01.models.InstanceViewStatus] - """ - - _attribute_map = { - 'value': {'key': 'value', 'type': '[InstanceViewStatus]'}, - } - - def __init__(self, **kwargs): - super(RunCommandResult, self).__init__(**kwargs) - self.value = kwargs.get('value', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/run_command_result_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/run_command_result_py3.py deleted file mode 100644 index bf0e76643ad6..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/run_command_result_py3.py +++ /dev/null @@ -1,29 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class RunCommandResult(Model): - """RunCommandResult. - - :param value: Run command operation response. - :type value: - list[~azure.mgmt.compute.v2018_06_01.models.InstanceViewStatus] - """ - - _attribute_map = { - 'value': {'key': 'value', 'type': '[InstanceViewStatus]'}, - } - - def __init__(self, *, value=None, **kwargs) -> None: - super(RunCommandResult, self).__init__(**kwargs) - self.value = value diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/sku.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/sku.py deleted file mode 100644 index 5c07709435e0..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/sku.py +++ /dev/null @@ -1,38 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class Sku(Model): - """Describes a virtual machine scale set sku. - - :param name: The sku name. - :type name: str - :param tier: Specifies the tier of virtual machines in a scale set.

    Possible Values:

    **Standard**

    **Basic** - :type tier: str - :param capacity: Specifies the number of virtual machines in the scale - set. - :type capacity: long - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'tier': {'key': 'tier', 'type': 'str'}, - 'capacity': {'key': 'capacity', 'type': 'long'}, - } - - def __init__(self, **kwargs): - super(Sku, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.tier = kwargs.get('tier', None) - self.capacity = kwargs.get('capacity', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/sku_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/sku_py3.py deleted file mode 100644 index f6bc74afaadc..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/sku_py3.py +++ /dev/null @@ -1,38 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class Sku(Model): - """Describes a virtual machine scale set sku. - - :param name: The sku name. - :type name: str - :param tier: Specifies the tier of virtual machines in a scale set.

    Possible Values:

    **Standard**

    **Basic** - :type tier: str - :param capacity: Specifies the number of virtual machines in the scale - set. - :type capacity: long - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'tier': {'key': 'tier', 'type': 'str'}, - 'capacity': {'key': 'capacity', 'type': 'long'}, - } - - def __init__(self, *, name: str=None, tier: str=None, capacity: int=None, **kwargs) -> None: - super(Sku, self).__init__(**kwargs) - self.name = name - self.tier = tier - self.capacity = capacity diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/snapshot.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/snapshot.py deleted file mode 100644 index ff5d5014d273..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/snapshot.py +++ /dev/null @@ -1,95 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource import Resource - - -class Snapshot(Resource): - """Snapshot resource. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource Id - :vartype id: str - :ivar name: Resource name - :vartype name: str - :ivar type: Resource type - :vartype type: str - :param location: Required. Resource location - :type location: str - :param tags: Resource tags - :type tags: dict[str, str] - :ivar managed_by: Unused. Always Null. - :vartype managed_by: str - :param sku: - :type sku: ~azure.mgmt.compute.v2018_06_01.models.SnapshotSku - :ivar time_created: The time when the disk was created. - :vartype time_created: datetime - :param os_type: The Operating System type. Possible values include: - 'Windows', 'Linux' - :type os_type: str or - ~azure.mgmt.compute.v2018_06_01.models.OperatingSystemTypes - :param creation_data: Required. Disk source information. CreationData - information cannot be changed after the disk has been created. - :type creation_data: ~azure.mgmt.compute.v2018_06_01.models.CreationData - :param disk_size_gb: If creationData.createOption is Empty, this field is - mandatory and it indicates the size of the VHD to create. If this field is - present for updates or creation with other options, it indicates a resize. - Resizes are only allowed if the disk is not attached to a running VM, and - can only increase the disk's size. - :type disk_size_gb: int - :param encryption_settings: Encryption settings for disk or snapshot - :type encryption_settings: - ~azure.mgmt.compute.v2018_06_01.models.EncryptionSettings - :ivar provisioning_state: The disk provisioning state. - :vartype provisioning_state: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - 'managed_by': {'readonly': True}, - 'time_created': {'readonly': True}, - 'creation_data': {'required': True}, - 'provisioning_state': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'managed_by': {'key': 'managedBy', 'type': 'str'}, - 'sku': {'key': 'sku', 'type': 'SnapshotSku'}, - 'time_created': {'key': 'properties.timeCreated', 'type': 'iso-8601'}, - 'os_type': {'key': 'properties.osType', 'type': 'OperatingSystemTypes'}, - 'creation_data': {'key': 'properties.creationData', 'type': 'CreationData'}, - 'disk_size_gb': {'key': 'properties.diskSizeGB', 'type': 'int'}, - 'encryption_settings': {'key': 'properties.encryptionSettings', 'type': 'EncryptionSettings'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(Snapshot, self).__init__(**kwargs) - self.managed_by = None - self.sku = kwargs.get('sku', None) - self.time_created = None - self.os_type = kwargs.get('os_type', None) - self.creation_data = kwargs.get('creation_data', None) - self.disk_size_gb = kwargs.get('disk_size_gb', None) - self.encryption_settings = kwargs.get('encryption_settings', None) - self.provisioning_state = None diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/snapshot_paged.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/snapshot_paged.py deleted file mode 100644 index 250970ea9f6b..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/snapshot_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class SnapshotPaged(Paged): - """ - A paging container for iterating over a list of :class:`Snapshot ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[Snapshot]'} - } - - def __init__(self, *args, **kwargs): - - super(SnapshotPaged, self).__init__(*args, **kwargs) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/snapshot_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/snapshot_py3.py deleted file mode 100644 index 8921a3c46991..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/snapshot_py3.py +++ /dev/null @@ -1,95 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource_py3 import Resource - - -class Snapshot(Resource): - """Snapshot resource. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource Id - :vartype id: str - :ivar name: Resource name - :vartype name: str - :ivar type: Resource type - :vartype type: str - :param location: Required. Resource location - :type location: str - :param tags: Resource tags - :type tags: dict[str, str] - :ivar managed_by: Unused. Always Null. - :vartype managed_by: str - :param sku: - :type sku: ~azure.mgmt.compute.v2018_06_01.models.SnapshotSku - :ivar time_created: The time when the disk was created. - :vartype time_created: datetime - :param os_type: The Operating System type. Possible values include: - 'Windows', 'Linux' - :type os_type: str or - ~azure.mgmt.compute.v2018_06_01.models.OperatingSystemTypes - :param creation_data: Required. Disk source information. CreationData - information cannot be changed after the disk has been created. - :type creation_data: ~azure.mgmt.compute.v2018_06_01.models.CreationData - :param disk_size_gb: If creationData.createOption is Empty, this field is - mandatory and it indicates the size of the VHD to create. If this field is - present for updates or creation with other options, it indicates a resize. - Resizes are only allowed if the disk is not attached to a running VM, and - can only increase the disk's size. - :type disk_size_gb: int - :param encryption_settings: Encryption settings for disk or snapshot - :type encryption_settings: - ~azure.mgmt.compute.v2018_06_01.models.EncryptionSettings - :ivar provisioning_state: The disk provisioning state. - :vartype provisioning_state: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - 'managed_by': {'readonly': True}, - 'time_created': {'readonly': True}, - 'creation_data': {'required': True}, - 'provisioning_state': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'managed_by': {'key': 'managedBy', 'type': 'str'}, - 'sku': {'key': 'sku', 'type': 'SnapshotSku'}, - 'time_created': {'key': 'properties.timeCreated', 'type': 'iso-8601'}, - 'os_type': {'key': 'properties.osType', 'type': 'OperatingSystemTypes'}, - 'creation_data': {'key': 'properties.creationData', 'type': 'CreationData'}, - 'disk_size_gb': {'key': 'properties.diskSizeGB', 'type': 'int'}, - 'encryption_settings': {'key': 'properties.encryptionSettings', 'type': 'EncryptionSettings'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - } - - def __init__(self, *, location: str, creation_data, tags=None, sku=None, os_type=None, disk_size_gb: int=None, encryption_settings=None, **kwargs) -> None: - super(Snapshot, self).__init__(location=location, tags=tags, **kwargs) - self.managed_by = None - self.sku = sku - self.time_created = None - self.os_type = os_type - self.creation_data = creation_data - self.disk_size_gb = disk_size_gb - self.encryption_settings = encryption_settings - self.provisioning_state = None diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/snapshot_sku.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/snapshot_sku.py deleted file mode 100644 index d73b6283b82c..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/snapshot_sku.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class SnapshotSku(Model): - """The snapshots sku name. Can be Standard_LRS, Premium_LRS, or Standard_ZRS. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :param name: The sku name. Possible values include: 'Standard_LRS', - 'Premium_LRS', 'Standard_ZRS' - :type name: str or - ~azure.mgmt.compute.v2018_06_01.models.SnapshotStorageAccountTypes - :ivar tier: The sku tier. Default value: "Standard" . - :vartype tier: str - """ - - _validation = { - 'tier': {'readonly': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'tier': {'key': 'tier', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(SnapshotSku, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.tier = None diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/snapshot_sku_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/snapshot_sku_py3.py deleted file mode 100644 index 55d281f87d30..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/snapshot_sku_py3.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class SnapshotSku(Model): - """The snapshots sku name. Can be Standard_LRS, Premium_LRS, or Standard_ZRS. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :param name: The sku name. Possible values include: 'Standard_LRS', - 'Premium_LRS', 'Standard_ZRS' - :type name: str or - ~azure.mgmt.compute.v2018_06_01.models.SnapshotStorageAccountTypes - :ivar tier: The sku tier. Default value: "Standard" . - :vartype tier: str - """ - - _validation = { - 'tier': {'readonly': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'tier': {'key': 'tier', 'type': 'str'}, - } - - def __init__(self, *, name=None, **kwargs) -> None: - super(SnapshotSku, self).__init__(**kwargs) - self.name = name - self.tier = None diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/snapshot_update.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/snapshot_update.py deleted file mode 100644 index cfc9634ccf54..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/snapshot_update.py +++ /dev/null @@ -1,51 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class SnapshotUpdate(Model): - """Snapshot update resource. - - :param os_type: the Operating System type. Possible values include: - 'Windows', 'Linux' - :type os_type: str or - ~azure.mgmt.compute.v2018_06_01.models.OperatingSystemTypes - :param disk_size_gb: If creationData.createOption is Empty, this field is - mandatory and it indicates the size of the VHD to create. If this field is - present for updates or creation with other options, it indicates a resize. - Resizes are only allowed if the disk is not attached to a running VM, and - can only increase the disk's size. - :type disk_size_gb: int - :param encryption_settings: Encryption settings for disk or snapshot - :type encryption_settings: - ~azure.mgmt.compute.v2018_06_01.models.EncryptionSettings - :param tags: Resource tags - :type tags: dict[str, str] - :param sku: - :type sku: ~azure.mgmt.compute.v2018_06_01.models.SnapshotSku - """ - - _attribute_map = { - 'os_type': {'key': 'properties.osType', 'type': 'OperatingSystemTypes'}, - 'disk_size_gb': {'key': 'properties.diskSizeGB', 'type': 'int'}, - 'encryption_settings': {'key': 'properties.encryptionSettings', 'type': 'EncryptionSettings'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'sku': {'key': 'sku', 'type': 'SnapshotSku'}, - } - - def __init__(self, **kwargs): - super(SnapshotUpdate, self).__init__(**kwargs) - self.os_type = kwargs.get('os_type', None) - self.disk_size_gb = kwargs.get('disk_size_gb', None) - self.encryption_settings = kwargs.get('encryption_settings', None) - self.tags = kwargs.get('tags', None) - self.sku = kwargs.get('sku', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/snapshot_update_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/snapshot_update_py3.py deleted file mode 100644 index d5b3ec204313..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/snapshot_update_py3.py +++ /dev/null @@ -1,51 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class SnapshotUpdate(Model): - """Snapshot update resource. - - :param os_type: the Operating System type. Possible values include: - 'Windows', 'Linux' - :type os_type: str or - ~azure.mgmt.compute.v2018_06_01.models.OperatingSystemTypes - :param disk_size_gb: If creationData.createOption is Empty, this field is - mandatory and it indicates the size of the VHD to create. If this field is - present for updates or creation with other options, it indicates a resize. - Resizes are only allowed if the disk is not attached to a running VM, and - can only increase the disk's size. - :type disk_size_gb: int - :param encryption_settings: Encryption settings for disk or snapshot - :type encryption_settings: - ~azure.mgmt.compute.v2018_06_01.models.EncryptionSettings - :param tags: Resource tags - :type tags: dict[str, str] - :param sku: - :type sku: ~azure.mgmt.compute.v2018_06_01.models.SnapshotSku - """ - - _attribute_map = { - 'os_type': {'key': 'properties.osType', 'type': 'OperatingSystemTypes'}, - 'disk_size_gb': {'key': 'properties.diskSizeGB', 'type': 'int'}, - 'encryption_settings': {'key': 'properties.encryptionSettings', 'type': 'EncryptionSettings'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'sku': {'key': 'sku', 'type': 'SnapshotSku'}, - } - - def __init__(self, *, os_type=None, disk_size_gb: int=None, encryption_settings=None, tags=None, sku=None, **kwargs) -> None: - super(SnapshotUpdate, self).__init__(**kwargs) - self.os_type = os_type - self.disk_size_gb = disk_size_gb - self.encryption_settings = encryption_settings - self.tags = tags - self.sku = sku diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/source_vault.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/source_vault.py deleted file mode 100644 index 88537f33905f..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/source_vault.py +++ /dev/null @@ -1,29 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class SourceVault(Model): - """The vault id is an Azure Resource Manager Resource id in the form - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.KeyVault/vaults/{vaultName}. - - :param id: Resource Id - :type id: str - """ - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(SourceVault, self).__init__(**kwargs) - self.id = kwargs.get('id', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/source_vault_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/source_vault_py3.py deleted file mode 100644 index 1cb922017c06..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/source_vault_py3.py +++ /dev/null @@ -1,29 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class SourceVault(Model): - """The vault id is an Azure Resource Manager Resource id in the form - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.KeyVault/vaults/{vaultName}. - - :param id: Resource Id - :type id: str - """ - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - } - - def __init__(self, *, id: str=None, **kwargs) -> None: - super(SourceVault, self).__init__(**kwargs) - self.id = id diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/ssh_configuration.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/ssh_configuration.py deleted file mode 100644 index 75abd89078e7..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/ssh_configuration.py +++ /dev/null @@ -1,30 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class SshConfiguration(Model): - """SSH configuration for Linux based VMs running on Azure. - - :param public_keys: The list of SSH public keys used to authenticate with - linux based VMs. - :type public_keys: - list[~azure.mgmt.compute.v2018_06_01.models.SshPublicKey] - """ - - _attribute_map = { - 'public_keys': {'key': 'publicKeys', 'type': '[SshPublicKey]'}, - } - - def __init__(self, **kwargs): - super(SshConfiguration, self).__init__(**kwargs) - self.public_keys = kwargs.get('public_keys', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/ssh_configuration_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/ssh_configuration_py3.py deleted file mode 100644 index 57599c8f1561..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/ssh_configuration_py3.py +++ /dev/null @@ -1,30 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class SshConfiguration(Model): - """SSH configuration for Linux based VMs running on Azure. - - :param public_keys: The list of SSH public keys used to authenticate with - linux based VMs. - :type public_keys: - list[~azure.mgmt.compute.v2018_06_01.models.SshPublicKey] - """ - - _attribute_map = { - 'public_keys': {'key': 'publicKeys', 'type': '[SshPublicKey]'}, - } - - def __init__(self, *, public_keys=None, **kwargs) -> None: - super(SshConfiguration, self).__init__(**kwargs) - self.public_keys = public_keys diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/ssh_public_key.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/ssh_public_key.py deleted file mode 100644 index 122e0d3b9fdd..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/ssh_public_key.py +++ /dev/null @@ -1,39 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class SshPublicKey(Model): - """Contains information about SSH certificate public key and the path on the - Linux VM where the public key is placed. - - :param path: Specifies the full path on the created VM where ssh public - key is stored. If the file already exists, the specified key is appended - to the file. Example: /home/user/.ssh/authorized_keys - :type path: str - :param key_data: SSH public key certificate used to authenticate with the - VM through ssh. The key needs to be at least 2048-bit and in ssh-rsa - format.

    For creating ssh keys, see [Create SSH keys on Linux and - Mac for Linux VMs in - Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-mac-create-ssh-keys?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json). - :type key_data: str - """ - - _attribute_map = { - 'path': {'key': 'path', 'type': 'str'}, - 'key_data': {'key': 'keyData', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(SshPublicKey, self).__init__(**kwargs) - self.path = kwargs.get('path', None) - self.key_data = kwargs.get('key_data', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/ssh_public_key_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/ssh_public_key_py3.py deleted file mode 100644 index b16ee085b36b..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/ssh_public_key_py3.py +++ /dev/null @@ -1,39 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class SshPublicKey(Model): - """Contains information about SSH certificate public key and the path on the - Linux VM where the public key is placed. - - :param path: Specifies the full path on the created VM where ssh public - key is stored. If the file already exists, the specified key is appended - to the file. Example: /home/user/.ssh/authorized_keys - :type path: str - :param key_data: SSH public key certificate used to authenticate with the - VM through ssh. The key needs to be at least 2048-bit and in ssh-rsa - format.

    For creating ssh keys, see [Create SSH keys on Linux and - Mac for Linux VMs in - Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-mac-create-ssh-keys?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json). - :type key_data: str - """ - - _attribute_map = { - 'path': {'key': 'path', 'type': 'str'}, - 'key_data': {'key': 'keyData', 'type': 'str'}, - } - - def __init__(self, *, path: str=None, key_data: str=None, **kwargs) -> None: - super(SshPublicKey, self).__init__(**kwargs) - self.path = path - self.key_data = key_data diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/storage_profile.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/storage_profile.py deleted file mode 100644 index 4d6540891452..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/storage_profile.py +++ /dev/null @@ -1,47 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class StorageProfile(Model): - """Specifies the storage settings for the virtual machine disks. - - :param image_reference: Specifies information about the image to use. You - can specify information about platform images, marketplace images, or - virtual machine images. This element is required when you want to use a - platform image, marketplace image, or virtual machine image, but is not - used in other creation operations. - :type image_reference: - ~azure.mgmt.compute.v2018_06_01.models.ImageReference - :param os_disk: Specifies information about the operating system disk used - by the virtual machine.

    For more information about disks, see - [About disks and VHDs for Azure virtual - machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-about-disks-vhds?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). - :type os_disk: ~azure.mgmt.compute.v2018_06_01.models.OSDisk - :param data_disks: Specifies the parameters that are used to add a data - disk to a virtual machine.

    For more information about disks, see - [About disks and VHDs for Azure virtual - machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-about-disks-vhds?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). - :type data_disks: list[~azure.mgmt.compute.v2018_06_01.models.DataDisk] - """ - - _attribute_map = { - 'image_reference': {'key': 'imageReference', 'type': 'ImageReference'}, - 'os_disk': {'key': 'osDisk', 'type': 'OSDisk'}, - 'data_disks': {'key': 'dataDisks', 'type': '[DataDisk]'}, - } - - def __init__(self, **kwargs): - super(StorageProfile, self).__init__(**kwargs) - self.image_reference = kwargs.get('image_reference', None) - self.os_disk = kwargs.get('os_disk', None) - self.data_disks = kwargs.get('data_disks', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/storage_profile_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/storage_profile_py3.py deleted file mode 100644 index 832fc2897f1d..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/storage_profile_py3.py +++ /dev/null @@ -1,47 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class StorageProfile(Model): - """Specifies the storage settings for the virtual machine disks. - - :param image_reference: Specifies information about the image to use. You - can specify information about platform images, marketplace images, or - virtual machine images. This element is required when you want to use a - platform image, marketplace image, or virtual machine image, but is not - used in other creation operations. - :type image_reference: - ~azure.mgmt.compute.v2018_06_01.models.ImageReference - :param os_disk: Specifies information about the operating system disk used - by the virtual machine.

    For more information about disks, see - [About disks and VHDs for Azure virtual - machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-about-disks-vhds?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). - :type os_disk: ~azure.mgmt.compute.v2018_06_01.models.OSDisk - :param data_disks: Specifies the parameters that are used to add a data - disk to a virtual machine.

    For more information about disks, see - [About disks and VHDs for Azure virtual - machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-about-disks-vhds?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). - :type data_disks: list[~azure.mgmt.compute.v2018_06_01.models.DataDisk] - """ - - _attribute_map = { - 'image_reference': {'key': 'imageReference', 'type': 'ImageReference'}, - 'os_disk': {'key': 'osDisk', 'type': 'OSDisk'}, - 'data_disks': {'key': 'dataDisks', 'type': '[DataDisk]'}, - } - - def __init__(self, *, image_reference=None, os_disk=None, data_disks=None, **kwargs) -> None: - super(StorageProfile, self).__init__(**kwargs) - self.image_reference = image_reference - self.os_disk = os_disk - self.data_disks = data_disks diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/sub_resource.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/sub_resource.py deleted file mode 100644 index 11e092cc6ff5..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/sub_resource.py +++ /dev/null @@ -1,28 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class SubResource(Model): - """SubResource. - - :param id: Resource Id - :type id: str - """ - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(SubResource, self).__init__(**kwargs) - self.id = kwargs.get('id', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/sub_resource_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/sub_resource_py3.py deleted file mode 100644 index 29e5afee38f9..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/sub_resource_py3.py +++ /dev/null @@ -1,28 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class SubResource(Model): - """SubResource. - - :param id: Resource Id - :type id: str - """ - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - } - - def __init__(self, *, id: str=None, **kwargs) -> None: - super(SubResource, self).__init__(**kwargs) - self.id = id diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/sub_resource_read_only.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/sub_resource_read_only.py deleted file mode 100644 index 4a0ec466c0d4..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/sub_resource_read_only.py +++ /dev/null @@ -1,35 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class SubResourceReadOnly(Model): - """SubResourceReadOnly. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource Id - :vartype id: str - """ - - _validation = { - 'id': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(SubResourceReadOnly, self).__init__(**kwargs) - self.id = None diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/sub_resource_read_only_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/sub_resource_read_only_py3.py deleted file mode 100644 index cb918e9a2ac6..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/sub_resource_read_only_py3.py +++ /dev/null @@ -1,35 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class SubResourceReadOnly(Model): - """SubResourceReadOnly. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource Id - :vartype id: str - """ - - _validation = { - 'id': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - } - - def __init__(self, **kwargs) -> None: - super(SubResourceReadOnly, self).__init__(**kwargs) - self.id = None diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/target_region.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/target_region.py deleted file mode 100644 index 7987bf4aadf0..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/target_region.py +++ /dev/null @@ -1,39 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class TargetRegion(Model): - """Describes the target region information. - - All required parameters must be populated in order to send to Azure. - - :param name: Required. The name of the region. - :type name: str - :param regional_replica_count: The number of replicas of the Image Version - to be created per region. This property is updatable. - :type regional_replica_count: int - """ - - _validation = { - 'name': {'required': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'regional_replica_count': {'key': 'regionalReplicaCount', 'type': 'int'}, - } - - def __init__(self, **kwargs): - super(TargetRegion, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.regional_replica_count = kwargs.get('regional_replica_count', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/target_region_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/target_region_py3.py deleted file mode 100644 index 1560a2c5ebe4..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/target_region_py3.py +++ /dev/null @@ -1,39 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class TargetRegion(Model): - """Describes the target region information. - - All required parameters must be populated in order to send to Azure. - - :param name: Required. The name of the region. - :type name: str - :param regional_replica_count: The number of replicas of the Image Version - to be created per region. This property is updatable. - :type regional_replica_count: int - """ - - _validation = { - 'name': {'required': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'regional_replica_count': {'key': 'regionalReplicaCount', 'type': 'int'}, - } - - def __init__(self, *, name: str, regional_replica_count: int=None, **kwargs) -> None: - super(TargetRegion, self).__init__(**kwargs) - self.name = name - self.regional_replica_count = regional_replica_count diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/throttled_requests_input.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/throttled_requests_input.py deleted file mode 100644 index 502e7be62e68..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/throttled_requests_input.py +++ /dev/null @@ -1,52 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .log_analytics_input_base import LogAnalyticsInputBase - - -class ThrottledRequestsInput(LogAnalyticsInputBase): - """Api request input for LogAnalytics getThrottledRequests Api. - - All required parameters must be populated in order to send to Azure. - - :param blob_container_sas_uri: Required. SAS Uri of the logging blob - container to which LogAnalytics Api writes output logs to. - :type blob_container_sas_uri: str - :param from_time: Required. From time of the query - :type from_time: datetime - :param to_time: Required. To time of the query - :type to_time: datetime - :param group_by_throttle_policy: Group query result by Throttle Policy - applied. - :type group_by_throttle_policy: bool - :param group_by_operation_name: Group query result by Operation Name. - :type group_by_operation_name: bool - :param group_by_resource_name: Group query result by Resource Name. - :type group_by_resource_name: bool - """ - - _validation = { - 'blob_container_sas_uri': {'required': True}, - 'from_time': {'required': True}, - 'to_time': {'required': True}, - } - - _attribute_map = { - 'blob_container_sas_uri': {'key': 'blobContainerSasUri', 'type': 'str'}, - 'from_time': {'key': 'fromTime', 'type': 'iso-8601'}, - 'to_time': {'key': 'toTime', 'type': 'iso-8601'}, - 'group_by_throttle_policy': {'key': 'groupByThrottlePolicy', 'type': 'bool'}, - 'group_by_operation_name': {'key': 'groupByOperationName', 'type': 'bool'}, - 'group_by_resource_name': {'key': 'groupByResourceName', 'type': 'bool'}, - } - - def __init__(self, **kwargs): - super(ThrottledRequestsInput, self).__init__(**kwargs) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/throttled_requests_input_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/throttled_requests_input_py3.py deleted file mode 100644 index a4239a5115de..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/throttled_requests_input_py3.py +++ /dev/null @@ -1,52 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .log_analytics_input_base_py3 import LogAnalyticsInputBase - - -class ThrottledRequestsInput(LogAnalyticsInputBase): - """Api request input for LogAnalytics getThrottledRequests Api. - - All required parameters must be populated in order to send to Azure. - - :param blob_container_sas_uri: Required. SAS Uri of the logging blob - container to which LogAnalytics Api writes output logs to. - :type blob_container_sas_uri: str - :param from_time: Required. From time of the query - :type from_time: datetime - :param to_time: Required. To time of the query - :type to_time: datetime - :param group_by_throttle_policy: Group query result by Throttle Policy - applied. - :type group_by_throttle_policy: bool - :param group_by_operation_name: Group query result by Operation Name. - :type group_by_operation_name: bool - :param group_by_resource_name: Group query result by Resource Name. - :type group_by_resource_name: bool - """ - - _validation = { - 'blob_container_sas_uri': {'required': True}, - 'from_time': {'required': True}, - 'to_time': {'required': True}, - } - - _attribute_map = { - 'blob_container_sas_uri': {'key': 'blobContainerSasUri', 'type': 'str'}, - 'from_time': {'key': 'fromTime', 'type': 'iso-8601'}, - 'to_time': {'key': 'toTime', 'type': 'iso-8601'}, - 'group_by_throttle_policy': {'key': 'groupByThrottlePolicy', 'type': 'bool'}, - 'group_by_operation_name': {'key': 'groupByOperationName', 'type': 'bool'}, - 'group_by_resource_name': {'key': 'groupByResourceName', 'type': 'bool'}, - } - - def __init__(self, *, blob_container_sas_uri: str, from_time, to_time, group_by_throttle_policy: bool=None, group_by_operation_name: bool=None, group_by_resource_name: bool=None, **kwargs) -> None: - super(ThrottledRequestsInput, self).__init__(blob_container_sas_uri=blob_container_sas_uri, from_time=from_time, to_time=to_time, group_by_throttle_policy=group_by_throttle_policy, group_by_operation_name=group_by_operation_name, group_by_resource_name=group_by_resource_name, **kwargs) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/update_resource.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/update_resource.py deleted file mode 100644 index b1d2898ff082..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/update_resource.py +++ /dev/null @@ -1,28 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class UpdateResource(Model): - """The Update Resource model definition. - - :param tags: Resource tags - :type tags: dict[str, str] - """ - - _attribute_map = { - 'tags': {'key': 'tags', 'type': '{str}'}, - } - - def __init__(self, **kwargs): - super(UpdateResource, self).__init__(**kwargs) - self.tags = kwargs.get('tags', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/update_resource_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/update_resource_py3.py deleted file mode 100644 index c06c17c124d9..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/update_resource_py3.py +++ /dev/null @@ -1,28 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class UpdateResource(Model): - """The Update Resource model definition. - - :param tags: Resource tags - :type tags: dict[str, str] - """ - - _attribute_map = { - 'tags': {'key': 'tags', 'type': '{str}'}, - } - - def __init__(self, *, tags=None, **kwargs) -> None: - super(UpdateResource, self).__init__(**kwargs) - self.tags = tags diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/upgrade_operation_historical_status_info.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/upgrade_operation_historical_status_info.py deleted file mode 100644 index 66d4e5fba5de..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/upgrade_operation_historical_status_info.py +++ /dev/null @@ -1,47 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class UpgradeOperationHistoricalStatusInfo(Model): - """Virtual Machine Scale Set OS Upgrade History operation response. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar properties: Information about the properties of the upgrade - operation. - :vartype properties: - ~azure.mgmt.compute.v2018_06_01.models.UpgradeOperationHistoricalStatusInfoProperties - :ivar type: Resource type - :vartype type: str - :ivar location: Resource location - :vartype location: str - """ - - _validation = { - 'properties': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'readonly': True}, - } - - _attribute_map = { - 'properties': {'key': 'properties', 'type': 'UpgradeOperationHistoricalStatusInfoProperties'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(UpgradeOperationHistoricalStatusInfo, self).__init__(**kwargs) - self.properties = None - self.type = None - self.location = None diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/upgrade_operation_historical_status_info_paged.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/upgrade_operation_historical_status_info_paged.py deleted file mode 100644 index 559abad8dd7b..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/upgrade_operation_historical_status_info_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class UpgradeOperationHistoricalStatusInfoPaged(Paged): - """ - A paging container for iterating over a list of :class:`UpgradeOperationHistoricalStatusInfo ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[UpgradeOperationHistoricalStatusInfo]'} - } - - def __init__(self, *args, **kwargs): - - super(UpgradeOperationHistoricalStatusInfoPaged, self).__init__(*args, **kwargs) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/upgrade_operation_historical_status_info_properties.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/upgrade_operation_historical_status_info_properties.py deleted file mode 100644 index c37e50d88ab2..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/upgrade_operation_historical_status_info_properties.py +++ /dev/null @@ -1,67 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class UpgradeOperationHistoricalStatusInfoProperties(Model): - """Describes each OS upgrade on the Virtual Machine Scale Set. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar running_status: Information about the overall status of the upgrade - operation. - :vartype running_status: - ~azure.mgmt.compute.v2018_06_01.models.UpgradeOperationHistoryStatus - :ivar progress: Counts of the VMs in each state. - :vartype progress: - ~azure.mgmt.compute.v2018_06_01.models.RollingUpgradeProgressInfo - :ivar error: Error Details for this upgrade if there are any. - :vartype error: ~azure.mgmt.compute.v2018_06_01.models.ApiError - :ivar started_by: Invoker of the Upgrade Operation. Possible values - include: 'Unknown', 'User', 'Platform' - :vartype started_by: str or - ~azure.mgmt.compute.v2018_06_01.models.UpgradeOperationInvoker - :ivar target_image_reference: Image Reference details - :vartype target_image_reference: - ~azure.mgmt.compute.v2018_06_01.models.ImageReference - :ivar rollback_info: Information about OS rollback if performed - :vartype rollback_info: - ~azure.mgmt.compute.v2018_06_01.models.RollbackStatusInfo - """ - - _validation = { - 'running_status': {'readonly': True}, - 'progress': {'readonly': True}, - 'error': {'readonly': True}, - 'started_by': {'readonly': True}, - 'target_image_reference': {'readonly': True}, - 'rollback_info': {'readonly': True}, - } - - _attribute_map = { - 'running_status': {'key': 'runningStatus', 'type': 'UpgradeOperationHistoryStatus'}, - 'progress': {'key': 'progress', 'type': 'RollingUpgradeProgressInfo'}, - 'error': {'key': 'error', 'type': 'ApiError'}, - 'started_by': {'key': 'startedBy', 'type': 'UpgradeOperationInvoker'}, - 'target_image_reference': {'key': 'targetImageReference', 'type': 'ImageReference'}, - 'rollback_info': {'key': 'rollbackInfo', 'type': 'RollbackStatusInfo'}, - } - - def __init__(self, **kwargs): - super(UpgradeOperationHistoricalStatusInfoProperties, self).__init__(**kwargs) - self.running_status = None - self.progress = None - self.error = None - self.started_by = None - self.target_image_reference = None - self.rollback_info = None diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/upgrade_operation_historical_status_info_properties_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/upgrade_operation_historical_status_info_properties_py3.py deleted file mode 100644 index 6a4d68d461c3..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/upgrade_operation_historical_status_info_properties_py3.py +++ /dev/null @@ -1,67 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class UpgradeOperationHistoricalStatusInfoProperties(Model): - """Describes each OS upgrade on the Virtual Machine Scale Set. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar running_status: Information about the overall status of the upgrade - operation. - :vartype running_status: - ~azure.mgmt.compute.v2018_06_01.models.UpgradeOperationHistoryStatus - :ivar progress: Counts of the VMs in each state. - :vartype progress: - ~azure.mgmt.compute.v2018_06_01.models.RollingUpgradeProgressInfo - :ivar error: Error Details for this upgrade if there are any. - :vartype error: ~azure.mgmt.compute.v2018_06_01.models.ApiError - :ivar started_by: Invoker of the Upgrade Operation. Possible values - include: 'Unknown', 'User', 'Platform' - :vartype started_by: str or - ~azure.mgmt.compute.v2018_06_01.models.UpgradeOperationInvoker - :ivar target_image_reference: Image Reference details - :vartype target_image_reference: - ~azure.mgmt.compute.v2018_06_01.models.ImageReference - :ivar rollback_info: Information about OS rollback if performed - :vartype rollback_info: - ~azure.mgmt.compute.v2018_06_01.models.RollbackStatusInfo - """ - - _validation = { - 'running_status': {'readonly': True}, - 'progress': {'readonly': True}, - 'error': {'readonly': True}, - 'started_by': {'readonly': True}, - 'target_image_reference': {'readonly': True}, - 'rollback_info': {'readonly': True}, - } - - _attribute_map = { - 'running_status': {'key': 'runningStatus', 'type': 'UpgradeOperationHistoryStatus'}, - 'progress': {'key': 'progress', 'type': 'RollingUpgradeProgressInfo'}, - 'error': {'key': 'error', 'type': 'ApiError'}, - 'started_by': {'key': 'startedBy', 'type': 'UpgradeOperationInvoker'}, - 'target_image_reference': {'key': 'targetImageReference', 'type': 'ImageReference'}, - 'rollback_info': {'key': 'rollbackInfo', 'type': 'RollbackStatusInfo'}, - } - - def __init__(self, **kwargs) -> None: - super(UpgradeOperationHistoricalStatusInfoProperties, self).__init__(**kwargs) - self.running_status = None - self.progress = None - self.error = None - self.started_by = None - self.target_image_reference = None - self.rollback_info = None diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/upgrade_operation_historical_status_info_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/upgrade_operation_historical_status_info_py3.py deleted file mode 100644 index 700d150fa350..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/upgrade_operation_historical_status_info_py3.py +++ /dev/null @@ -1,47 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class UpgradeOperationHistoricalStatusInfo(Model): - """Virtual Machine Scale Set OS Upgrade History operation response. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar properties: Information about the properties of the upgrade - operation. - :vartype properties: - ~azure.mgmt.compute.v2018_06_01.models.UpgradeOperationHistoricalStatusInfoProperties - :ivar type: Resource type - :vartype type: str - :ivar location: Resource location - :vartype location: str - """ - - _validation = { - 'properties': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'readonly': True}, - } - - _attribute_map = { - 'properties': {'key': 'properties', 'type': 'UpgradeOperationHistoricalStatusInfoProperties'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - } - - def __init__(self, **kwargs) -> None: - super(UpgradeOperationHistoricalStatusInfo, self).__init__(**kwargs) - self.properties = None - self.type = None - self.location = None diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/upgrade_operation_history_status.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/upgrade_operation_history_status.py deleted file mode 100644 index d6e1950e6d86..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/upgrade_operation_history_status.py +++ /dev/null @@ -1,46 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class UpgradeOperationHistoryStatus(Model): - """Information about the current running state of the overall upgrade. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar code: Code indicating the current status of the upgrade. Possible - values include: 'RollingForward', 'Cancelled', 'Completed', 'Faulted' - :vartype code: str or ~azure.mgmt.compute.v2018_06_01.models.UpgradeState - :ivar start_time: Start time of the upgrade. - :vartype start_time: datetime - :ivar end_time: End time of the upgrade. - :vartype end_time: datetime - """ - - _validation = { - 'code': {'readonly': True}, - 'start_time': {'readonly': True}, - 'end_time': {'readonly': True}, - } - - _attribute_map = { - 'code': {'key': 'code', 'type': 'UpgradeState'}, - 'start_time': {'key': 'startTime', 'type': 'iso-8601'}, - 'end_time': {'key': 'endTime', 'type': 'iso-8601'}, - } - - def __init__(self, **kwargs): - super(UpgradeOperationHistoryStatus, self).__init__(**kwargs) - self.code = None - self.start_time = None - self.end_time = None diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/upgrade_operation_history_status_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/upgrade_operation_history_status_py3.py deleted file mode 100644 index 858d03eeac93..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/upgrade_operation_history_status_py3.py +++ /dev/null @@ -1,46 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class UpgradeOperationHistoryStatus(Model): - """Information about the current running state of the overall upgrade. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar code: Code indicating the current status of the upgrade. Possible - values include: 'RollingForward', 'Cancelled', 'Completed', 'Faulted' - :vartype code: str or ~azure.mgmt.compute.v2018_06_01.models.UpgradeState - :ivar start_time: Start time of the upgrade. - :vartype start_time: datetime - :ivar end_time: End time of the upgrade. - :vartype end_time: datetime - """ - - _validation = { - 'code': {'readonly': True}, - 'start_time': {'readonly': True}, - 'end_time': {'readonly': True}, - } - - _attribute_map = { - 'code': {'key': 'code', 'type': 'UpgradeState'}, - 'start_time': {'key': 'startTime', 'type': 'iso-8601'}, - 'end_time': {'key': 'endTime', 'type': 'iso-8601'}, - } - - def __init__(self, **kwargs) -> None: - super(UpgradeOperationHistoryStatus, self).__init__(**kwargs) - self.code = None - self.start_time = None - self.end_time = None diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/upgrade_policy.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/upgrade_policy.py deleted file mode 100644 index 513ba0ec5588..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/upgrade_policy.py +++ /dev/null @@ -1,51 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class UpgradePolicy(Model): - """Describes an upgrade policy - automatic, manual, or rolling. - - :param mode: Specifies the mode of an upgrade to virtual machines in the - scale set.

    Possible values are:

    **Manual** - You - control the application of updates to virtual machines in the scale set. - You do this by using the manualUpgrade action.

    **Automatic** - - All virtual machines in the scale set are automatically updated at the - same time. Possible values include: 'Automatic', 'Manual', 'Rolling' - :type mode: str or ~azure.mgmt.compute.v2018_06_01.models.UpgradeMode - :param rolling_upgrade_policy: The configuration parameters used while - performing a rolling upgrade. - :type rolling_upgrade_policy: - ~azure.mgmt.compute.v2018_06_01.models.RollingUpgradePolicy - :param automatic_os_upgrade: Whether OS upgrades should automatically be - applied to scale set instances in a rolling fashion when a newer version - of the image becomes available. - :type automatic_os_upgrade: bool - :param auto_os_upgrade_policy: Configuration parameters used for - performing automatic OS Upgrade. - :type auto_os_upgrade_policy: - ~azure.mgmt.compute.v2018_06_01.models.AutoOSUpgradePolicy - """ - - _attribute_map = { - 'mode': {'key': 'mode', 'type': 'UpgradeMode'}, - 'rolling_upgrade_policy': {'key': 'rollingUpgradePolicy', 'type': 'RollingUpgradePolicy'}, - 'automatic_os_upgrade': {'key': 'automaticOSUpgrade', 'type': 'bool'}, - 'auto_os_upgrade_policy': {'key': 'autoOSUpgradePolicy', 'type': 'AutoOSUpgradePolicy'}, - } - - def __init__(self, **kwargs): - super(UpgradePolicy, self).__init__(**kwargs) - self.mode = kwargs.get('mode', None) - self.rolling_upgrade_policy = kwargs.get('rolling_upgrade_policy', None) - self.automatic_os_upgrade = kwargs.get('automatic_os_upgrade', None) - self.auto_os_upgrade_policy = kwargs.get('auto_os_upgrade_policy', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/upgrade_policy_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/upgrade_policy_py3.py deleted file mode 100644 index 99a24dae2f77..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/upgrade_policy_py3.py +++ /dev/null @@ -1,51 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class UpgradePolicy(Model): - """Describes an upgrade policy - automatic, manual, or rolling. - - :param mode: Specifies the mode of an upgrade to virtual machines in the - scale set.

    Possible values are:

    **Manual** - You - control the application of updates to virtual machines in the scale set. - You do this by using the manualUpgrade action.

    **Automatic** - - All virtual machines in the scale set are automatically updated at the - same time. Possible values include: 'Automatic', 'Manual', 'Rolling' - :type mode: str or ~azure.mgmt.compute.v2018_06_01.models.UpgradeMode - :param rolling_upgrade_policy: The configuration parameters used while - performing a rolling upgrade. - :type rolling_upgrade_policy: - ~azure.mgmt.compute.v2018_06_01.models.RollingUpgradePolicy - :param automatic_os_upgrade: Whether OS upgrades should automatically be - applied to scale set instances in a rolling fashion when a newer version - of the image becomes available. - :type automatic_os_upgrade: bool - :param auto_os_upgrade_policy: Configuration parameters used for - performing automatic OS Upgrade. - :type auto_os_upgrade_policy: - ~azure.mgmt.compute.v2018_06_01.models.AutoOSUpgradePolicy - """ - - _attribute_map = { - 'mode': {'key': 'mode', 'type': 'UpgradeMode'}, - 'rolling_upgrade_policy': {'key': 'rollingUpgradePolicy', 'type': 'RollingUpgradePolicy'}, - 'automatic_os_upgrade': {'key': 'automaticOSUpgrade', 'type': 'bool'}, - 'auto_os_upgrade_policy': {'key': 'autoOSUpgradePolicy', 'type': 'AutoOSUpgradePolicy'}, - } - - def __init__(self, *, mode=None, rolling_upgrade_policy=None, automatic_os_upgrade: bool=None, auto_os_upgrade_policy=None, **kwargs) -> None: - super(UpgradePolicy, self).__init__(**kwargs) - self.mode = mode - self.rolling_upgrade_policy = rolling_upgrade_policy - self.automatic_os_upgrade = automatic_os_upgrade - self.auto_os_upgrade_policy = auto_os_upgrade_policy diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/usage.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/usage.py deleted file mode 100644 index 9b3b77b2f49d..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/usage.py +++ /dev/null @@ -1,54 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class Usage(Model): - """Describes Compute Resource Usage. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar unit: Required. An enum describing the unit of usage measurement. - Default value: "Count" . - :vartype unit: str - :param current_value: Required. The current usage of the resource. - :type current_value: int - :param limit: Required. The maximum permitted usage of the resource. - :type limit: long - :param name: Required. The name of the type of usage. - :type name: ~azure.mgmt.compute.v2018_06_01.models.UsageName - """ - - _validation = { - 'unit': {'required': True, 'constant': True}, - 'current_value': {'required': True}, - 'limit': {'required': True}, - 'name': {'required': True}, - } - - _attribute_map = { - 'unit': {'key': 'unit', 'type': 'str'}, - 'current_value': {'key': 'currentValue', 'type': 'int'}, - 'limit': {'key': 'limit', 'type': 'long'}, - 'name': {'key': 'name', 'type': 'UsageName'}, - } - - unit = "Count" - - def __init__(self, **kwargs): - super(Usage, self).__init__(**kwargs) - self.current_value = kwargs.get('current_value', None) - self.limit = kwargs.get('limit', None) - self.name = kwargs.get('name', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/usage_name.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/usage_name.py deleted file mode 100644 index e2560936493e..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/usage_name.py +++ /dev/null @@ -1,32 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class UsageName(Model): - """The Usage Names. - - :param value: The name of the resource. - :type value: str - :param localized_value: The localized name of the resource. - :type localized_value: str - """ - - _attribute_map = { - 'value': {'key': 'value', 'type': 'str'}, - 'localized_value': {'key': 'localizedValue', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(UsageName, self).__init__(**kwargs) - self.value = kwargs.get('value', None) - self.localized_value = kwargs.get('localized_value', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/usage_name_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/usage_name_py3.py deleted file mode 100644 index ad0b77459f75..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/usage_name_py3.py +++ /dev/null @@ -1,32 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class UsageName(Model): - """The Usage Names. - - :param value: The name of the resource. - :type value: str - :param localized_value: The localized name of the resource. - :type localized_value: str - """ - - _attribute_map = { - 'value': {'key': 'value', 'type': 'str'}, - 'localized_value': {'key': 'localizedValue', 'type': 'str'}, - } - - def __init__(self, *, value: str=None, localized_value: str=None, **kwargs) -> None: - super(UsageName, self).__init__(**kwargs) - self.value = value - self.localized_value = localized_value diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/usage_paged.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/usage_paged.py deleted file mode 100644 index 7bed22a45648..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/usage_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class UsagePaged(Paged): - """ - A paging container for iterating over a list of :class:`Usage ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[Usage]'} - } - - def __init__(self, *args, **kwargs): - - super(UsagePaged, self).__init__(*args, **kwargs) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/usage_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/usage_py3.py deleted file mode 100644 index f3ffae30d56c..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/usage_py3.py +++ /dev/null @@ -1,54 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class Usage(Model): - """Describes Compute Resource Usage. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar unit: Required. An enum describing the unit of usage measurement. - Default value: "Count" . - :vartype unit: str - :param current_value: Required. The current usage of the resource. - :type current_value: int - :param limit: Required. The maximum permitted usage of the resource. - :type limit: long - :param name: Required. The name of the type of usage. - :type name: ~azure.mgmt.compute.v2018_06_01.models.UsageName - """ - - _validation = { - 'unit': {'required': True, 'constant': True}, - 'current_value': {'required': True}, - 'limit': {'required': True}, - 'name': {'required': True}, - } - - _attribute_map = { - 'unit': {'key': 'unit', 'type': 'str'}, - 'current_value': {'key': 'currentValue', 'type': 'int'}, - 'limit': {'key': 'limit', 'type': 'long'}, - 'name': {'key': 'name', 'type': 'UsageName'}, - } - - unit = "Count" - - def __init__(self, *, current_value: int, limit: int, name, **kwargs) -> None: - super(Usage, self).__init__(**kwargs) - self.current_value = current_value - self.limit = limit - self.name = name diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/vault_certificate.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/vault_certificate.py deleted file mode 100644 index 2dd179480e76..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/vault_certificate.py +++ /dev/null @@ -1,47 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VaultCertificate(Model): - """Describes a single certificate reference in a Key Vault, and where the - certificate should reside on the VM. - - :param certificate_url: This is the URL of a certificate that has been - uploaded to Key Vault as a secret. For adding a secret to the Key Vault, - see [Add a key or secret to the key - vault](https://docs.microsoft.com/azure/key-vault/key-vault-get-started/#add). - In this case, your certificate needs to be It is the Base64 encoding of - the following JSON Object which is encoded in UTF-8:

    {
    - "data":"",
    "dataType":"pfx",
    - "password":""
    } - :type certificate_url: str - :param certificate_store: For Windows VMs, specifies the certificate store - on the Virtual Machine to which the certificate should be added. The - specified certificate store is implicitly in the LocalMachine account. -

    For Linux VMs, the certificate file is placed under the - /var/lib/waagent directory, with the file name - <UppercaseThumbprint>.crt for the X509 certificate file and - <UppercaseThumbprint>.prv for private key. Both of these files are - .pem formatted. - :type certificate_store: str - """ - - _attribute_map = { - 'certificate_url': {'key': 'certificateUrl', 'type': 'str'}, - 'certificate_store': {'key': 'certificateStore', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(VaultCertificate, self).__init__(**kwargs) - self.certificate_url = kwargs.get('certificate_url', None) - self.certificate_store = kwargs.get('certificate_store', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/vault_certificate_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/vault_certificate_py3.py deleted file mode 100644 index 23ecc8101793..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/vault_certificate_py3.py +++ /dev/null @@ -1,47 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VaultCertificate(Model): - """Describes a single certificate reference in a Key Vault, and where the - certificate should reside on the VM. - - :param certificate_url: This is the URL of a certificate that has been - uploaded to Key Vault as a secret. For adding a secret to the Key Vault, - see [Add a key or secret to the key - vault](https://docs.microsoft.com/azure/key-vault/key-vault-get-started/#add). - In this case, your certificate needs to be It is the Base64 encoding of - the following JSON Object which is encoded in UTF-8:

    {
    - "data":"",
    "dataType":"pfx",
    - "password":""
    } - :type certificate_url: str - :param certificate_store: For Windows VMs, specifies the certificate store - on the Virtual Machine to which the certificate should be added. The - specified certificate store is implicitly in the LocalMachine account. -

    For Linux VMs, the certificate file is placed under the - /var/lib/waagent directory, with the file name - <UppercaseThumbprint>.crt for the X509 certificate file and - <UppercaseThumbprint>.prv for private key. Both of these files are - .pem formatted. - :type certificate_store: str - """ - - _attribute_map = { - 'certificate_url': {'key': 'certificateUrl', 'type': 'str'}, - 'certificate_store': {'key': 'certificateStore', 'type': 'str'}, - } - - def __init__(self, *, certificate_url: str=None, certificate_store: str=None, **kwargs) -> None: - super(VaultCertificate, self).__init__(**kwargs) - self.certificate_url = certificate_url - self.certificate_store = certificate_store diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/vault_secret_group.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/vault_secret_group.py deleted file mode 100644 index d79a189ed937..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/vault_secret_group.py +++ /dev/null @@ -1,35 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VaultSecretGroup(Model): - """Describes a set of certificates which are all in the same Key Vault. - - :param source_vault: The relative URL of the Key Vault containing all of - the certificates in VaultCertificates. - :type source_vault: ~azure.mgmt.compute.v2018_06_01.models.SubResource - :param vault_certificates: The list of key vault references in SourceVault - which contain certificates. - :type vault_certificates: - list[~azure.mgmt.compute.v2018_06_01.models.VaultCertificate] - """ - - _attribute_map = { - 'source_vault': {'key': 'sourceVault', 'type': 'SubResource'}, - 'vault_certificates': {'key': 'vaultCertificates', 'type': '[VaultCertificate]'}, - } - - def __init__(self, **kwargs): - super(VaultSecretGroup, self).__init__(**kwargs) - self.source_vault = kwargs.get('source_vault', None) - self.vault_certificates = kwargs.get('vault_certificates', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/vault_secret_group_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/vault_secret_group_py3.py deleted file mode 100644 index 42a4b92ac763..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/vault_secret_group_py3.py +++ /dev/null @@ -1,35 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VaultSecretGroup(Model): - """Describes a set of certificates which are all in the same Key Vault. - - :param source_vault: The relative URL of the Key Vault containing all of - the certificates in VaultCertificates. - :type source_vault: ~azure.mgmt.compute.v2018_06_01.models.SubResource - :param vault_certificates: The list of key vault references in SourceVault - which contain certificates. - :type vault_certificates: - list[~azure.mgmt.compute.v2018_06_01.models.VaultCertificate] - """ - - _attribute_map = { - 'source_vault': {'key': 'sourceVault', 'type': 'SubResource'}, - 'vault_certificates': {'key': 'vaultCertificates', 'type': '[VaultCertificate]'}, - } - - def __init__(self, *, source_vault=None, vault_certificates=None, **kwargs) -> None: - super(VaultSecretGroup, self).__init__(**kwargs) - self.source_vault = source_vault - self.vault_certificates = vault_certificates diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/virtual_hard_disk.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/virtual_hard_disk.py deleted file mode 100644 index 5e3ad9dea7d4..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/virtual_hard_disk.py +++ /dev/null @@ -1,28 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualHardDisk(Model): - """Describes the uri of a disk. - - :param uri: Specifies the virtual hard disk's uri. - :type uri: str - """ - - _attribute_map = { - 'uri': {'key': 'uri', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(VirtualHardDisk, self).__init__(**kwargs) - self.uri = kwargs.get('uri', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/virtual_hard_disk_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/virtual_hard_disk_py3.py deleted file mode 100644 index 9c069b95f084..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/virtual_hard_disk_py3.py +++ /dev/null @@ -1,28 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualHardDisk(Model): - """Describes the uri of a disk. - - :param uri: Specifies the virtual hard disk's uri. - :type uri: str - """ - - _attribute_map = { - 'uri': {'key': 'uri', 'type': 'str'}, - } - - def __init__(self, *, uri: str=None, **kwargs) -> None: - super(VirtualHardDisk, self).__init__(**kwargs) - self.uri = uri diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/virtual_machine.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/virtual_machine.py deleted file mode 100644 index 861432529b99..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/virtual_machine.py +++ /dev/null @@ -1,163 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource import Resource - - -class VirtualMachine(Resource): - """Describes a Virtual Machine. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource Id - :vartype id: str - :ivar name: Resource name - :vartype name: str - :ivar type: Resource type - :vartype type: str - :param location: Required. Resource location - :type location: str - :param tags: Resource tags - :type tags: dict[str, str] - :param plan: Specifies information about the marketplace image used to - create the virtual machine. This element is only used for marketplace - images. Before you can use a marketplace image from an API, you must - enable the image for programmatic use. In the Azure portal, find the - marketplace image that you want to use and then click **Want to deploy - programmatically, Get Started ->**. Enter any required information and - then click **Save**. - :type plan: ~azure.mgmt.compute.v2018_06_01.models.Plan - :param hardware_profile: Specifies the hardware settings for the virtual - machine. - :type hardware_profile: - ~azure.mgmt.compute.v2018_06_01.models.HardwareProfile - :param storage_profile: Specifies the storage settings for the virtual - machine disks. - :type storage_profile: - ~azure.mgmt.compute.v2018_06_01.models.StorageProfile - :param additional_capabilities: Specifies additional capabilities enabled - or disabled on the virtual machine. - :type additional_capabilities: - ~azure.mgmt.compute.v2018_06_01.models.AdditionalCapabilities - :param os_profile: Specifies the operating system settings for the virtual - machine. - :type os_profile: ~azure.mgmt.compute.v2018_06_01.models.OSProfile - :param network_profile: Specifies the network interfaces of the virtual - machine. - :type network_profile: - ~azure.mgmt.compute.v2018_06_01.models.NetworkProfile - :param diagnostics_profile: Specifies the boot diagnostic settings state. -

    Minimum api-version: 2015-06-15. - :type diagnostics_profile: - ~azure.mgmt.compute.v2018_06_01.models.DiagnosticsProfile - :param availability_set: Specifies information about the availability set - that the virtual machine should be assigned to. Virtual machines specified - in the same availability set are allocated to different nodes to maximize - availability. For more information about availability sets, see [Manage - the availability of virtual - machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-manage-availability?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). -

    For more information on Azure planned maintenance, see [Planned - maintenance for virtual machines in - Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-planned-maintenance?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json) -

    Currently, a VM can only be added to availability set at creation - time. An existing VM cannot be added to an availability set. - :type availability_set: ~azure.mgmt.compute.v2018_06_01.models.SubResource - :param proximity_placement_group: Specifies information about the - proximity placement group that the virtual machine should be assigned to. -

    Minimum api-version: 2018-04-01. - :type proximity_placement_group: - ~azure.mgmt.compute.v2018_06_01.models.SubResource - :ivar provisioning_state: The provisioning state, which only appears in - the response. - :vartype provisioning_state: str - :ivar instance_view: The virtual machine instance view. - :vartype instance_view: - ~azure.mgmt.compute.v2018_06_01.models.VirtualMachineInstanceView - :param license_type: Specifies that the image or disk that is being used - was licensed on-premises. This element is only used for images that - contain the Windows Server operating system.

    Possible values are: -

    Windows_Client

    Windows_Server

    If this element - is included in a request for an update, the value must match the initial - value. This value cannot be updated.

    For more information, see - [Azure Hybrid Use Benefit for Windows - Server](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-hybrid-use-benefit-licensing?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json) -

    Minimum api-version: 2015-06-15 - :type license_type: str - :ivar vm_id: Specifies the VM unique ID which is a 128-bits identifier - that is encoded and stored in all Azure IaaS VMs SMBIOS and can be read - using platform BIOS commands. - :vartype vm_id: str - :ivar resources: The virtual machine child extension resources. - :vartype resources: - list[~azure.mgmt.compute.v2018_06_01.models.VirtualMachineExtension] - :param identity: The identity of the virtual machine, if configured. - :type identity: - ~azure.mgmt.compute.v2018_06_01.models.VirtualMachineIdentity - :param zones: The virtual machine zones. - :type zones: list[str] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - 'provisioning_state': {'readonly': True}, - 'instance_view': {'readonly': True}, - 'vm_id': {'readonly': True}, - 'resources': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'plan': {'key': 'plan', 'type': 'Plan'}, - 'hardware_profile': {'key': 'properties.hardwareProfile', 'type': 'HardwareProfile'}, - 'storage_profile': {'key': 'properties.storageProfile', 'type': 'StorageProfile'}, - 'additional_capabilities': {'key': 'properties.additionalCapabilities', 'type': 'AdditionalCapabilities'}, - 'os_profile': {'key': 'properties.osProfile', 'type': 'OSProfile'}, - 'network_profile': {'key': 'properties.networkProfile', 'type': 'NetworkProfile'}, - 'diagnostics_profile': {'key': 'properties.diagnosticsProfile', 'type': 'DiagnosticsProfile'}, - 'availability_set': {'key': 'properties.availabilitySet', 'type': 'SubResource'}, - 'proximity_placement_group': {'key': 'properties.proximityPlacementGroup', 'type': 'SubResource'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'instance_view': {'key': 'properties.instanceView', 'type': 'VirtualMachineInstanceView'}, - 'license_type': {'key': 'properties.licenseType', 'type': 'str'}, - 'vm_id': {'key': 'properties.vmId', 'type': 'str'}, - 'resources': {'key': 'resources', 'type': '[VirtualMachineExtension]'}, - 'identity': {'key': 'identity', 'type': 'VirtualMachineIdentity'}, - 'zones': {'key': 'zones', 'type': '[str]'}, - } - - def __init__(self, **kwargs): - super(VirtualMachine, self).__init__(**kwargs) - self.plan = kwargs.get('plan', None) - self.hardware_profile = kwargs.get('hardware_profile', None) - self.storage_profile = kwargs.get('storage_profile', None) - self.additional_capabilities = kwargs.get('additional_capabilities', None) - self.os_profile = kwargs.get('os_profile', None) - self.network_profile = kwargs.get('network_profile', None) - self.diagnostics_profile = kwargs.get('diagnostics_profile', None) - self.availability_set = kwargs.get('availability_set', None) - self.proximity_placement_group = kwargs.get('proximity_placement_group', None) - self.provisioning_state = None - self.instance_view = None - self.license_type = kwargs.get('license_type', None) - self.vm_id = None - self.resources = None - self.identity = kwargs.get('identity', None) - self.zones = kwargs.get('zones', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/virtual_machine_agent_instance_view.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/virtual_machine_agent_instance_view.py deleted file mode 100644 index d154b74e33f6..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/virtual_machine_agent_instance_view.py +++ /dev/null @@ -1,39 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineAgentInstanceView(Model): - """The instance view of the VM Agent running on the virtual machine. - - :param vm_agent_version: The VM Agent full version. - :type vm_agent_version: str - :param extension_handlers: The virtual machine extension handler instance - view. - :type extension_handlers: - list[~azure.mgmt.compute.v2018_06_01.models.VirtualMachineExtensionHandlerInstanceView] - :param statuses: The resource status information. - :type statuses: - list[~azure.mgmt.compute.v2018_06_01.models.InstanceViewStatus] - """ - - _attribute_map = { - 'vm_agent_version': {'key': 'vmAgentVersion', 'type': 'str'}, - 'extension_handlers': {'key': 'extensionHandlers', 'type': '[VirtualMachineExtensionHandlerInstanceView]'}, - 'statuses': {'key': 'statuses', 'type': '[InstanceViewStatus]'}, - } - - def __init__(self, **kwargs): - super(VirtualMachineAgentInstanceView, self).__init__(**kwargs) - self.vm_agent_version = kwargs.get('vm_agent_version', None) - self.extension_handlers = kwargs.get('extension_handlers', None) - self.statuses = kwargs.get('statuses', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/virtual_machine_agent_instance_view_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/virtual_machine_agent_instance_view_py3.py deleted file mode 100644 index d0cdb97ae53b..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/virtual_machine_agent_instance_view_py3.py +++ /dev/null @@ -1,39 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineAgentInstanceView(Model): - """The instance view of the VM Agent running on the virtual machine. - - :param vm_agent_version: The VM Agent full version. - :type vm_agent_version: str - :param extension_handlers: The virtual machine extension handler instance - view. - :type extension_handlers: - list[~azure.mgmt.compute.v2018_06_01.models.VirtualMachineExtensionHandlerInstanceView] - :param statuses: The resource status information. - :type statuses: - list[~azure.mgmt.compute.v2018_06_01.models.InstanceViewStatus] - """ - - _attribute_map = { - 'vm_agent_version': {'key': 'vmAgentVersion', 'type': 'str'}, - 'extension_handlers': {'key': 'extensionHandlers', 'type': '[VirtualMachineExtensionHandlerInstanceView]'}, - 'statuses': {'key': 'statuses', 'type': '[InstanceViewStatus]'}, - } - - def __init__(self, *, vm_agent_version: str=None, extension_handlers=None, statuses=None, **kwargs) -> None: - super(VirtualMachineAgentInstanceView, self).__init__(**kwargs) - self.vm_agent_version = vm_agent_version - self.extension_handlers = extension_handlers - self.statuses = statuses diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/virtual_machine_capture_parameters.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/virtual_machine_capture_parameters.py deleted file mode 100644 index 4e6ffbea7a4f..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/virtual_machine_capture_parameters.py +++ /dev/null @@ -1,46 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineCaptureParameters(Model): - """Capture Virtual Machine parameters. - - All required parameters must be populated in order to send to Azure. - - :param vhd_prefix: Required. The captured virtual hard disk's name prefix. - :type vhd_prefix: str - :param destination_container_name: Required. The destination container - name. - :type destination_container_name: str - :param overwrite_vhds: Required. Specifies whether to overwrite the - destination virtual hard disk, in case of conflict. - :type overwrite_vhds: bool - """ - - _validation = { - 'vhd_prefix': {'required': True}, - 'destination_container_name': {'required': True}, - 'overwrite_vhds': {'required': True}, - } - - _attribute_map = { - 'vhd_prefix': {'key': 'vhdPrefix', 'type': 'str'}, - 'destination_container_name': {'key': 'destinationContainerName', 'type': 'str'}, - 'overwrite_vhds': {'key': 'overwriteVhds', 'type': 'bool'}, - } - - def __init__(self, **kwargs): - super(VirtualMachineCaptureParameters, self).__init__(**kwargs) - self.vhd_prefix = kwargs.get('vhd_prefix', None) - self.destination_container_name = kwargs.get('destination_container_name', None) - self.overwrite_vhds = kwargs.get('overwrite_vhds', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/virtual_machine_capture_parameters_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/virtual_machine_capture_parameters_py3.py deleted file mode 100644 index 1866cdc23300..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/virtual_machine_capture_parameters_py3.py +++ /dev/null @@ -1,46 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineCaptureParameters(Model): - """Capture Virtual Machine parameters. - - All required parameters must be populated in order to send to Azure. - - :param vhd_prefix: Required. The captured virtual hard disk's name prefix. - :type vhd_prefix: str - :param destination_container_name: Required. The destination container - name. - :type destination_container_name: str - :param overwrite_vhds: Required. Specifies whether to overwrite the - destination virtual hard disk, in case of conflict. - :type overwrite_vhds: bool - """ - - _validation = { - 'vhd_prefix': {'required': True}, - 'destination_container_name': {'required': True}, - 'overwrite_vhds': {'required': True}, - } - - _attribute_map = { - 'vhd_prefix': {'key': 'vhdPrefix', 'type': 'str'}, - 'destination_container_name': {'key': 'destinationContainerName', 'type': 'str'}, - 'overwrite_vhds': {'key': 'overwriteVhds', 'type': 'bool'}, - } - - def __init__(self, *, vhd_prefix: str, destination_container_name: str, overwrite_vhds: bool, **kwargs) -> None: - super(VirtualMachineCaptureParameters, self).__init__(**kwargs) - self.vhd_prefix = vhd_prefix - self.destination_container_name = destination_container_name - self.overwrite_vhds = overwrite_vhds diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/virtual_machine_capture_result.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/virtual_machine_capture_result.py deleted file mode 100644 index 2972e1f2fcda..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/virtual_machine_capture_result.py +++ /dev/null @@ -1,53 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .sub_resource import SubResource - - -class VirtualMachineCaptureResult(SubResource): - """Output of virtual machine capture operation. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :param id: Resource Id - :type id: str - :ivar schema: the schema of the captured virtual machine - :vartype schema: str - :ivar content_version: the version of the content - :vartype content_version: str - :ivar parameters: parameters of the captured virtual machine - :vartype parameters: object - :ivar resources: a list of resource items of the captured virtual machine - :vartype resources: list[object] - """ - - _validation = { - 'schema': {'readonly': True}, - 'content_version': {'readonly': True}, - 'parameters': {'readonly': True}, - 'resources': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'schema': {'key': '$schema', 'type': 'str'}, - 'content_version': {'key': 'contentVersion', 'type': 'str'}, - 'parameters': {'key': 'parameters', 'type': 'object'}, - 'resources': {'key': 'resources', 'type': '[object]'}, - } - - def __init__(self, **kwargs): - super(VirtualMachineCaptureResult, self).__init__(**kwargs) - self.schema = None - self.content_version = None - self.parameters = None - self.resources = None diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/virtual_machine_capture_result_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/virtual_machine_capture_result_py3.py deleted file mode 100644 index 09e8afde1591..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/virtual_machine_capture_result_py3.py +++ /dev/null @@ -1,53 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .sub_resource_py3 import SubResource - - -class VirtualMachineCaptureResult(SubResource): - """Output of virtual machine capture operation. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :param id: Resource Id - :type id: str - :ivar schema: the schema of the captured virtual machine - :vartype schema: str - :ivar content_version: the version of the content - :vartype content_version: str - :ivar parameters: parameters of the captured virtual machine - :vartype parameters: object - :ivar resources: a list of resource items of the captured virtual machine - :vartype resources: list[object] - """ - - _validation = { - 'schema': {'readonly': True}, - 'content_version': {'readonly': True}, - 'parameters': {'readonly': True}, - 'resources': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'schema': {'key': '$schema', 'type': 'str'}, - 'content_version': {'key': 'contentVersion', 'type': 'str'}, - 'parameters': {'key': 'parameters', 'type': 'object'}, - 'resources': {'key': 'resources', 'type': '[object]'}, - } - - def __init__(self, *, id: str=None, **kwargs) -> None: - super(VirtualMachineCaptureResult, self).__init__(id=id, **kwargs) - self.schema = None - self.content_version = None - self.parameters = None - self.resources = None diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/virtual_machine_extension.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/virtual_machine_extension.py deleted file mode 100644 index 8b81c7301315..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/virtual_machine_extension.py +++ /dev/null @@ -1,97 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource import Resource - - -class VirtualMachineExtension(Resource): - """Describes a Virtual Machine Extension. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource Id - :vartype id: str - :ivar name: Resource name - :vartype name: str - :ivar type: Resource type - :vartype type: str - :param location: Required. Resource location - :type location: str - :param tags: Resource tags - :type tags: dict[str, str] - :param force_update_tag: How the extension handler should be forced to - update even if the extension configuration has not changed. - :type force_update_tag: str - :param publisher: The name of the extension handler publisher. - :type publisher: str - :param virtual_machine_extension_type: Specifies the type of the - extension; an example is "CustomScriptExtension". - :type virtual_machine_extension_type: str - :param type_handler_version: Specifies the version of the script handler. - :type type_handler_version: str - :param auto_upgrade_minor_version: Indicates whether the extension should - use a newer minor version if one is available at deployment time. Once - deployed, however, the extension will not upgrade minor versions unless - redeployed, even with this property set to true. - :type auto_upgrade_minor_version: bool - :param settings: Json formatted public settings for the extension. - :type settings: object - :param protected_settings: The extension can contain either - protectedSettings or protectedSettingsFromKeyVault or no protected - settings at all. - :type protected_settings: object - :ivar provisioning_state: The provisioning state, which only appears in - the response. - :vartype provisioning_state: str - :param instance_view: The virtual machine extension instance view. - :type instance_view: - ~azure.mgmt.compute.v2018_06_01.models.VirtualMachineExtensionInstanceView - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - 'provisioning_state': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'force_update_tag': {'key': 'properties.forceUpdateTag', 'type': 'str'}, - 'publisher': {'key': 'properties.publisher', 'type': 'str'}, - 'virtual_machine_extension_type': {'key': 'properties.type', 'type': 'str'}, - 'type_handler_version': {'key': 'properties.typeHandlerVersion', 'type': 'str'}, - 'auto_upgrade_minor_version': {'key': 'properties.autoUpgradeMinorVersion', 'type': 'bool'}, - 'settings': {'key': 'properties.settings', 'type': 'object'}, - 'protected_settings': {'key': 'properties.protectedSettings', 'type': 'object'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'instance_view': {'key': 'properties.instanceView', 'type': 'VirtualMachineExtensionInstanceView'}, - } - - def __init__(self, **kwargs): - super(VirtualMachineExtension, self).__init__(**kwargs) - self.force_update_tag = kwargs.get('force_update_tag', None) - self.publisher = kwargs.get('publisher', None) - self.virtual_machine_extension_type = kwargs.get('virtual_machine_extension_type', None) - self.type_handler_version = kwargs.get('type_handler_version', None) - self.auto_upgrade_minor_version = kwargs.get('auto_upgrade_minor_version', None) - self.settings = kwargs.get('settings', None) - self.protected_settings = kwargs.get('protected_settings', None) - self.provisioning_state = None - self.instance_view = kwargs.get('instance_view', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/virtual_machine_extension_handler_instance_view.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/virtual_machine_extension_handler_instance_view.py deleted file mode 100644 index 2756ace1f244..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/virtual_machine_extension_handler_instance_view.py +++ /dev/null @@ -1,37 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineExtensionHandlerInstanceView(Model): - """The instance view of a virtual machine extension handler. - - :param type: Specifies the type of the extension; an example is - "CustomScriptExtension". - :type type: str - :param type_handler_version: Specifies the version of the script handler. - :type type_handler_version: str - :param status: The extension handler status. - :type status: ~azure.mgmt.compute.v2018_06_01.models.InstanceViewStatus - """ - - _attribute_map = { - 'type': {'key': 'type', 'type': 'str'}, - 'type_handler_version': {'key': 'typeHandlerVersion', 'type': 'str'}, - 'status': {'key': 'status', 'type': 'InstanceViewStatus'}, - } - - def __init__(self, **kwargs): - super(VirtualMachineExtensionHandlerInstanceView, self).__init__(**kwargs) - self.type = kwargs.get('type', None) - self.type_handler_version = kwargs.get('type_handler_version', None) - self.status = kwargs.get('status', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/virtual_machine_extension_handler_instance_view_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/virtual_machine_extension_handler_instance_view_py3.py deleted file mode 100644 index 105a38c36494..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/virtual_machine_extension_handler_instance_view_py3.py +++ /dev/null @@ -1,37 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineExtensionHandlerInstanceView(Model): - """The instance view of a virtual machine extension handler. - - :param type: Specifies the type of the extension; an example is - "CustomScriptExtension". - :type type: str - :param type_handler_version: Specifies the version of the script handler. - :type type_handler_version: str - :param status: The extension handler status. - :type status: ~azure.mgmt.compute.v2018_06_01.models.InstanceViewStatus - """ - - _attribute_map = { - 'type': {'key': 'type', 'type': 'str'}, - 'type_handler_version': {'key': 'typeHandlerVersion', 'type': 'str'}, - 'status': {'key': 'status', 'type': 'InstanceViewStatus'}, - } - - def __init__(self, *, type: str=None, type_handler_version: str=None, status=None, **kwargs) -> None: - super(VirtualMachineExtensionHandlerInstanceView, self).__init__(**kwargs) - self.type = type - self.type_handler_version = type_handler_version - self.status = status diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/virtual_machine_extension_image.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/virtual_machine_extension_image.py deleted file mode 100644 index 7273e2b84754..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/virtual_machine_extension_image.py +++ /dev/null @@ -1,81 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource import Resource - - -class VirtualMachineExtensionImage(Resource): - """Describes a Virtual Machine Extension Image. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource Id - :vartype id: str - :ivar name: Resource name - :vartype name: str - :ivar type: Resource type - :vartype type: str - :param location: Required. Resource location - :type location: str - :param tags: Resource tags - :type tags: dict[str, str] - :param operating_system: Required. The operating system this extension - supports. - :type operating_system: str - :param compute_role: Required. The type of role (IaaS or PaaS) this - extension supports. - :type compute_role: str - :param handler_schema: Required. The schema defined by publisher, where - extension consumers should provide settings in a matching schema. - :type handler_schema: str - :param vm_scale_set_enabled: Whether the extension can be used on xRP - VMScaleSets. By default existing extensions are usable on scalesets, but - there might be cases where a publisher wants to explicitly indicate the - extension is only enabled for CRP VMs but not VMSS. - :type vm_scale_set_enabled: bool - :param supports_multiple_extensions: Whether the handler can support - multiple extensions. - :type supports_multiple_extensions: bool - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - 'operating_system': {'required': True}, - 'compute_role': {'required': True}, - 'handler_schema': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'operating_system': {'key': 'properties.operatingSystem', 'type': 'str'}, - 'compute_role': {'key': 'properties.computeRole', 'type': 'str'}, - 'handler_schema': {'key': 'properties.handlerSchema', 'type': 'str'}, - 'vm_scale_set_enabled': {'key': 'properties.vmScaleSetEnabled', 'type': 'bool'}, - 'supports_multiple_extensions': {'key': 'properties.supportsMultipleExtensions', 'type': 'bool'}, - } - - def __init__(self, **kwargs): - super(VirtualMachineExtensionImage, self).__init__(**kwargs) - self.operating_system = kwargs.get('operating_system', None) - self.compute_role = kwargs.get('compute_role', None) - self.handler_schema = kwargs.get('handler_schema', None) - self.vm_scale_set_enabled = kwargs.get('vm_scale_set_enabled', None) - self.supports_multiple_extensions = kwargs.get('supports_multiple_extensions', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/virtual_machine_extension_image_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/virtual_machine_extension_image_py3.py deleted file mode 100644 index 3d48c3a87fb0..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/virtual_machine_extension_image_py3.py +++ /dev/null @@ -1,81 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource_py3 import Resource - - -class VirtualMachineExtensionImage(Resource): - """Describes a Virtual Machine Extension Image. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource Id - :vartype id: str - :ivar name: Resource name - :vartype name: str - :ivar type: Resource type - :vartype type: str - :param location: Required. Resource location - :type location: str - :param tags: Resource tags - :type tags: dict[str, str] - :param operating_system: Required. The operating system this extension - supports. - :type operating_system: str - :param compute_role: Required. The type of role (IaaS or PaaS) this - extension supports. - :type compute_role: str - :param handler_schema: Required. The schema defined by publisher, where - extension consumers should provide settings in a matching schema. - :type handler_schema: str - :param vm_scale_set_enabled: Whether the extension can be used on xRP - VMScaleSets. By default existing extensions are usable on scalesets, but - there might be cases where a publisher wants to explicitly indicate the - extension is only enabled for CRP VMs but not VMSS. - :type vm_scale_set_enabled: bool - :param supports_multiple_extensions: Whether the handler can support - multiple extensions. - :type supports_multiple_extensions: bool - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - 'operating_system': {'required': True}, - 'compute_role': {'required': True}, - 'handler_schema': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'operating_system': {'key': 'properties.operatingSystem', 'type': 'str'}, - 'compute_role': {'key': 'properties.computeRole', 'type': 'str'}, - 'handler_schema': {'key': 'properties.handlerSchema', 'type': 'str'}, - 'vm_scale_set_enabled': {'key': 'properties.vmScaleSetEnabled', 'type': 'bool'}, - 'supports_multiple_extensions': {'key': 'properties.supportsMultipleExtensions', 'type': 'bool'}, - } - - def __init__(self, *, location: str, operating_system: str, compute_role: str, handler_schema: str, tags=None, vm_scale_set_enabled: bool=None, supports_multiple_extensions: bool=None, **kwargs) -> None: - super(VirtualMachineExtensionImage, self).__init__(location=location, tags=tags, **kwargs) - self.operating_system = operating_system - self.compute_role = compute_role - self.handler_schema = handler_schema - self.vm_scale_set_enabled = vm_scale_set_enabled - self.supports_multiple_extensions = supports_multiple_extensions diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/virtual_machine_extension_instance_view.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/virtual_machine_extension_instance_view.py deleted file mode 100644 index 883d78c6f1ad..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/virtual_machine_extension_instance_view.py +++ /dev/null @@ -1,47 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineExtensionInstanceView(Model): - """The instance view of a virtual machine extension. - - :param name: The virtual machine extension name. - :type name: str - :param type: Specifies the type of the extension; an example is - "CustomScriptExtension". - :type type: str - :param type_handler_version: Specifies the version of the script handler. - :type type_handler_version: str - :param substatuses: The resource status information. - :type substatuses: - list[~azure.mgmt.compute.v2018_06_01.models.InstanceViewStatus] - :param statuses: The resource status information. - :type statuses: - list[~azure.mgmt.compute.v2018_06_01.models.InstanceViewStatus] - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'type_handler_version': {'key': 'typeHandlerVersion', 'type': 'str'}, - 'substatuses': {'key': 'substatuses', 'type': '[InstanceViewStatus]'}, - 'statuses': {'key': 'statuses', 'type': '[InstanceViewStatus]'}, - } - - def __init__(self, **kwargs): - super(VirtualMachineExtensionInstanceView, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.type = kwargs.get('type', None) - self.type_handler_version = kwargs.get('type_handler_version', None) - self.substatuses = kwargs.get('substatuses', None) - self.statuses = kwargs.get('statuses', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/virtual_machine_extension_instance_view_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/virtual_machine_extension_instance_view_py3.py deleted file mode 100644 index 52f3e8ae2f4c..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/virtual_machine_extension_instance_view_py3.py +++ /dev/null @@ -1,47 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineExtensionInstanceView(Model): - """The instance view of a virtual machine extension. - - :param name: The virtual machine extension name. - :type name: str - :param type: Specifies the type of the extension; an example is - "CustomScriptExtension". - :type type: str - :param type_handler_version: Specifies the version of the script handler. - :type type_handler_version: str - :param substatuses: The resource status information. - :type substatuses: - list[~azure.mgmt.compute.v2018_06_01.models.InstanceViewStatus] - :param statuses: The resource status information. - :type statuses: - list[~azure.mgmt.compute.v2018_06_01.models.InstanceViewStatus] - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'type_handler_version': {'key': 'typeHandlerVersion', 'type': 'str'}, - 'substatuses': {'key': 'substatuses', 'type': '[InstanceViewStatus]'}, - 'statuses': {'key': 'statuses', 'type': '[InstanceViewStatus]'}, - } - - def __init__(self, *, name: str=None, type: str=None, type_handler_version: str=None, substatuses=None, statuses=None, **kwargs) -> None: - super(VirtualMachineExtensionInstanceView, self).__init__(**kwargs) - self.name = name - self.type = type - self.type_handler_version = type_handler_version - self.substatuses = substatuses - self.statuses = statuses diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/virtual_machine_extension_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/virtual_machine_extension_py3.py deleted file mode 100644 index 1661bdd25f73..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/virtual_machine_extension_py3.py +++ /dev/null @@ -1,97 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource_py3 import Resource - - -class VirtualMachineExtension(Resource): - """Describes a Virtual Machine Extension. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource Id - :vartype id: str - :ivar name: Resource name - :vartype name: str - :ivar type: Resource type - :vartype type: str - :param location: Required. Resource location - :type location: str - :param tags: Resource tags - :type tags: dict[str, str] - :param force_update_tag: How the extension handler should be forced to - update even if the extension configuration has not changed. - :type force_update_tag: str - :param publisher: The name of the extension handler publisher. - :type publisher: str - :param virtual_machine_extension_type: Specifies the type of the - extension; an example is "CustomScriptExtension". - :type virtual_machine_extension_type: str - :param type_handler_version: Specifies the version of the script handler. - :type type_handler_version: str - :param auto_upgrade_minor_version: Indicates whether the extension should - use a newer minor version if one is available at deployment time. Once - deployed, however, the extension will not upgrade minor versions unless - redeployed, even with this property set to true. - :type auto_upgrade_minor_version: bool - :param settings: Json formatted public settings for the extension. - :type settings: object - :param protected_settings: The extension can contain either - protectedSettings or protectedSettingsFromKeyVault or no protected - settings at all. - :type protected_settings: object - :ivar provisioning_state: The provisioning state, which only appears in - the response. - :vartype provisioning_state: str - :param instance_view: The virtual machine extension instance view. - :type instance_view: - ~azure.mgmt.compute.v2018_06_01.models.VirtualMachineExtensionInstanceView - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - 'provisioning_state': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'force_update_tag': {'key': 'properties.forceUpdateTag', 'type': 'str'}, - 'publisher': {'key': 'properties.publisher', 'type': 'str'}, - 'virtual_machine_extension_type': {'key': 'properties.type', 'type': 'str'}, - 'type_handler_version': {'key': 'properties.typeHandlerVersion', 'type': 'str'}, - 'auto_upgrade_minor_version': {'key': 'properties.autoUpgradeMinorVersion', 'type': 'bool'}, - 'settings': {'key': 'properties.settings', 'type': 'object'}, - 'protected_settings': {'key': 'properties.protectedSettings', 'type': 'object'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'instance_view': {'key': 'properties.instanceView', 'type': 'VirtualMachineExtensionInstanceView'}, - } - - def __init__(self, *, location: str, tags=None, force_update_tag: str=None, publisher: str=None, virtual_machine_extension_type: str=None, type_handler_version: str=None, auto_upgrade_minor_version: bool=None, settings=None, protected_settings=None, instance_view=None, **kwargs) -> None: - super(VirtualMachineExtension, self).__init__(location=location, tags=tags, **kwargs) - self.force_update_tag = force_update_tag - self.publisher = publisher - self.virtual_machine_extension_type = virtual_machine_extension_type - self.type_handler_version = type_handler_version - self.auto_upgrade_minor_version = auto_upgrade_minor_version - self.settings = settings - self.protected_settings = protected_settings - self.provisioning_state = None - self.instance_view = instance_view diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/virtual_machine_extension_update.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/virtual_machine_extension_update.py deleted file mode 100644 index b920ff57ff96..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/virtual_machine_extension_update.py +++ /dev/null @@ -1,62 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .update_resource import UpdateResource - - -class VirtualMachineExtensionUpdate(UpdateResource): - """Describes a Virtual Machine Extension. - - :param tags: Resource tags - :type tags: dict[str, str] - :param force_update_tag: How the extension handler should be forced to - update even if the extension configuration has not changed. - :type force_update_tag: str - :param publisher: The name of the extension handler publisher. - :type publisher: str - :param type: Specifies the type of the extension; an example is - "CustomScriptExtension". - :type type: str - :param type_handler_version: Specifies the version of the script handler. - :type type_handler_version: str - :param auto_upgrade_minor_version: Indicates whether the extension should - use a newer minor version if one is available at deployment time. Once - deployed, however, the extension will not upgrade minor versions unless - redeployed, even with this property set to true. - :type auto_upgrade_minor_version: bool - :param settings: Json formatted public settings for the extension. - :type settings: object - :param protected_settings: The extension can contain either - protectedSettings or protectedSettingsFromKeyVault or no protected - settings at all. - :type protected_settings: object - """ - - _attribute_map = { - 'tags': {'key': 'tags', 'type': '{str}'}, - 'force_update_tag': {'key': 'properties.forceUpdateTag', 'type': 'str'}, - 'publisher': {'key': 'properties.publisher', 'type': 'str'}, - 'type': {'key': 'properties.type', 'type': 'str'}, - 'type_handler_version': {'key': 'properties.typeHandlerVersion', 'type': 'str'}, - 'auto_upgrade_minor_version': {'key': 'properties.autoUpgradeMinorVersion', 'type': 'bool'}, - 'settings': {'key': 'properties.settings', 'type': 'object'}, - 'protected_settings': {'key': 'properties.protectedSettings', 'type': 'object'}, - } - - def __init__(self, **kwargs): - super(VirtualMachineExtensionUpdate, self).__init__(**kwargs) - self.force_update_tag = kwargs.get('force_update_tag', None) - self.publisher = kwargs.get('publisher', None) - self.type = kwargs.get('type', None) - self.type_handler_version = kwargs.get('type_handler_version', None) - self.auto_upgrade_minor_version = kwargs.get('auto_upgrade_minor_version', None) - self.settings = kwargs.get('settings', None) - self.protected_settings = kwargs.get('protected_settings', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/virtual_machine_extension_update_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/virtual_machine_extension_update_py3.py deleted file mode 100644 index c32c18d32759..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/virtual_machine_extension_update_py3.py +++ /dev/null @@ -1,62 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .update_resource_py3 import UpdateResource - - -class VirtualMachineExtensionUpdate(UpdateResource): - """Describes a Virtual Machine Extension. - - :param tags: Resource tags - :type tags: dict[str, str] - :param force_update_tag: How the extension handler should be forced to - update even if the extension configuration has not changed. - :type force_update_tag: str - :param publisher: The name of the extension handler publisher. - :type publisher: str - :param type: Specifies the type of the extension; an example is - "CustomScriptExtension". - :type type: str - :param type_handler_version: Specifies the version of the script handler. - :type type_handler_version: str - :param auto_upgrade_minor_version: Indicates whether the extension should - use a newer minor version if one is available at deployment time. Once - deployed, however, the extension will not upgrade minor versions unless - redeployed, even with this property set to true. - :type auto_upgrade_minor_version: bool - :param settings: Json formatted public settings for the extension. - :type settings: object - :param protected_settings: The extension can contain either - protectedSettings or protectedSettingsFromKeyVault or no protected - settings at all. - :type protected_settings: object - """ - - _attribute_map = { - 'tags': {'key': 'tags', 'type': '{str}'}, - 'force_update_tag': {'key': 'properties.forceUpdateTag', 'type': 'str'}, - 'publisher': {'key': 'properties.publisher', 'type': 'str'}, - 'type': {'key': 'properties.type', 'type': 'str'}, - 'type_handler_version': {'key': 'properties.typeHandlerVersion', 'type': 'str'}, - 'auto_upgrade_minor_version': {'key': 'properties.autoUpgradeMinorVersion', 'type': 'bool'}, - 'settings': {'key': 'properties.settings', 'type': 'object'}, - 'protected_settings': {'key': 'properties.protectedSettings', 'type': 'object'}, - } - - def __init__(self, *, tags=None, force_update_tag: str=None, publisher: str=None, type: str=None, type_handler_version: str=None, auto_upgrade_minor_version: bool=None, settings=None, protected_settings=None, **kwargs) -> None: - super(VirtualMachineExtensionUpdate, self).__init__(tags=tags, **kwargs) - self.force_update_tag = force_update_tag - self.publisher = publisher - self.type = type - self.type_handler_version = type_handler_version - self.auto_upgrade_minor_version = auto_upgrade_minor_version - self.settings = settings - self.protected_settings = protected_settings diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/virtual_machine_extensions_list_result.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/virtual_machine_extensions_list_result.py deleted file mode 100644 index 6ca61d5c0afb..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/virtual_machine_extensions_list_result.py +++ /dev/null @@ -1,29 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineExtensionsListResult(Model): - """The List Extension operation response. - - :param value: The list of extensions - :type value: - list[~azure.mgmt.compute.v2018_06_01.models.VirtualMachineExtension] - """ - - _attribute_map = { - 'value': {'key': 'value', 'type': '[VirtualMachineExtension]'}, - } - - def __init__(self, **kwargs): - super(VirtualMachineExtensionsListResult, self).__init__(**kwargs) - self.value = kwargs.get('value', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/virtual_machine_extensions_list_result_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/virtual_machine_extensions_list_result_py3.py deleted file mode 100644 index 07cdead08256..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/virtual_machine_extensions_list_result_py3.py +++ /dev/null @@ -1,29 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineExtensionsListResult(Model): - """The List Extension operation response. - - :param value: The list of extensions - :type value: - list[~azure.mgmt.compute.v2018_06_01.models.VirtualMachineExtension] - """ - - _attribute_map = { - 'value': {'key': 'value', 'type': '[VirtualMachineExtension]'}, - } - - def __init__(self, *, value=None, **kwargs) -> None: - super(VirtualMachineExtensionsListResult, self).__init__(**kwargs) - self.value = value diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/virtual_machine_health_status.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/virtual_machine_health_status.py deleted file mode 100644 index 264fba4efaf1..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/virtual_machine_health_status.py +++ /dev/null @@ -1,35 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineHealthStatus(Model): - """The health status of the VM. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar status: The health status information for the VM. - :vartype status: ~azure.mgmt.compute.v2018_06_01.models.InstanceViewStatus - """ - - _validation = { - 'status': {'readonly': True}, - } - - _attribute_map = { - 'status': {'key': 'status', 'type': 'InstanceViewStatus'}, - } - - def __init__(self, **kwargs): - super(VirtualMachineHealthStatus, self).__init__(**kwargs) - self.status = None diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/virtual_machine_health_status_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/virtual_machine_health_status_py3.py deleted file mode 100644 index 0ce5813c371e..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/virtual_machine_health_status_py3.py +++ /dev/null @@ -1,35 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineHealthStatus(Model): - """The health status of the VM. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar status: The health status information for the VM. - :vartype status: ~azure.mgmt.compute.v2018_06_01.models.InstanceViewStatus - """ - - _validation = { - 'status': {'readonly': True}, - } - - _attribute_map = { - 'status': {'key': 'status', 'type': 'InstanceViewStatus'}, - } - - def __init__(self, **kwargs) -> None: - super(VirtualMachineHealthStatus, self).__init__(**kwargs) - self.status = None diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/virtual_machine_identity.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/virtual_machine_identity.py deleted file mode 100644 index 4069c2eb7bee..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/virtual_machine_identity.py +++ /dev/null @@ -1,59 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineIdentity(Model): - """Identity for the virtual machine. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar principal_id: The principal id of virtual machine identity. This - property will only be provided for a system assigned identity. - :vartype principal_id: str - :ivar tenant_id: The tenant id associated with the virtual machine. This - property will only be provided for a system assigned identity. - :vartype tenant_id: str - :param type: The type of identity used for the virtual machine. The type - 'SystemAssigned, UserAssigned' includes both an implicitly created - identity and a set of user assigned identities. The type 'None' will - remove any identities from the virtual machine. Possible values include: - 'SystemAssigned', 'UserAssigned', 'SystemAssigned, UserAssigned', 'None' - :type type: str or - ~azure.mgmt.compute.v2018_06_01.models.ResourceIdentityType - :param user_assigned_identities: The list of user identities associated - with the Virtual Machine. The user identity dictionary key references will - be ARM resource ids in the form: - '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'. - :type user_assigned_identities: dict[str, - ~azure.mgmt.compute.v2018_06_01.models.VirtualMachineIdentityUserAssignedIdentitiesValue] - """ - - _validation = { - 'principal_id': {'readonly': True}, - 'tenant_id': {'readonly': True}, - } - - _attribute_map = { - 'principal_id': {'key': 'principalId', 'type': 'str'}, - 'tenant_id': {'key': 'tenantId', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'ResourceIdentityType'}, - 'user_assigned_identities': {'key': 'userAssignedIdentities', 'type': '{VirtualMachineIdentityUserAssignedIdentitiesValue}'}, - } - - def __init__(self, **kwargs): - super(VirtualMachineIdentity, self).__init__(**kwargs) - self.principal_id = None - self.tenant_id = None - self.type = kwargs.get('type', None) - self.user_assigned_identities = kwargs.get('user_assigned_identities', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/virtual_machine_identity_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/virtual_machine_identity_py3.py deleted file mode 100644 index f5da27db3490..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/virtual_machine_identity_py3.py +++ /dev/null @@ -1,59 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineIdentity(Model): - """Identity for the virtual machine. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar principal_id: The principal id of virtual machine identity. This - property will only be provided for a system assigned identity. - :vartype principal_id: str - :ivar tenant_id: The tenant id associated with the virtual machine. This - property will only be provided for a system assigned identity. - :vartype tenant_id: str - :param type: The type of identity used for the virtual machine. The type - 'SystemAssigned, UserAssigned' includes both an implicitly created - identity and a set of user assigned identities. The type 'None' will - remove any identities from the virtual machine. Possible values include: - 'SystemAssigned', 'UserAssigned', 'SystemAssigned, UserAssigned', 'None' - :type type: str or - ~azure.mgmt.compute.v2018_06_01.models.ResourceIdentityType - :param user_assigned_identities: The list of user identities associated - with the Virtual Machine. The user identity dictionary key references will - be ARM resource ids in the form: - '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'. - :type user_assigned_identities: dict[str, - ~azure.mgmt.compute.v2018_06_01.models.VirtualMachineIdentityUserAssignedIdentitiesValue] - """ - - _validation = { - 'principal_id': {'readonly': True}, - 'tenant_id': {'readonly': True}, - } - - _attribute_map = { - 'principal_id': {'key': 'principalId', 'type': 'str'}, - 'tenant_id': {'key': 'tenantId', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'ResourceIdentityType'}, - 'user_assigned_identities': {'key': 'userAssignedIdentities', 'type': '{VirtualMachineIdentityUserAssignedIdentitiesValue}'}, - } - - def __init__(self, *, type=None, user_assigned_identities=None, **kwargs) -> None: - super(VirtualMachineIdentity, self).__init__(**kwargs) - self.principal_id = None - self.tenant_id = None - self.type = type - self.user_assigned_identities = user_assigned_identities diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/virtual_machine_identity_user_assigned_identities_value.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/virtual_machine_identity_user_assigned_identities_value.py deleted file mode 100644 index 8df9f5c86f49..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/virtual_machine_identity_user_assigned_identities_value.py +++ /dev/null @@ -1,40 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineIdentityUserAssignedIdentitiesValue(Model): - """VirtualMachineIdentityUserAssignedIdentitiesValue. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar principal_id: The principal id of user assigned identity. - :vartype principal_id: str - :ivar client_id: The client id of user assigned identity. - :vartype client_id: str - """ - - _validation = { - 'principal_id': {'readonly': True}, - 'client_id': {'readonly': True}, - } - - _attribute_map = { - 'principal_id': {'key': 'principalId', 'type': 'str'}, - 'client_id': {'key': 'clientId', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(VirtualMachineIdentityUserAssignedIdentitiesValue, self).__init__(**kwargs) - self.principal_id = None - self.client_id = None diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/virtual_machine_identity_user_assigned_identities_value_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/virtual_machine_identity_user_assigned_identities_value_py3.py deleted file mode 100644 index 0921bb643ccf..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/virtual_machine_identity_user_assigned_identities_value_py3.py +++ /dev/null @@ -1,40 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineIdentityUserAssignedIdentitiesValue(Model): - """VirtualMachineIdentityUserAssignedIdentitiesValue. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar principal_id: The principal id of user assigned identity. - :vartype principal_id: str - :ivar client_id: The client id of user assigned identity. - :vartype client_id: str - """ - - _validation = { - 'principal_id': {'readonly': True}, - 'client_id': {'readonly': True}, - } - - _attribute_map = { - 'principal_id': {'key': 'principalId', 'type': 'str'}, - 'client_id': {'key': 'clientId', 'type': 'str'}, - } - - def __init__(self, **kwargs) -> None: - super(VirtualMachineIdentityUserAssignedIdentitiesValue, self).__init__(**kwargs) - self.principal_id = None - self.client_id = None diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/virtual_machine_image.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/virtual_machine_image.py deleted file mode 100644 index 0b5583e10a82..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/virtual_machine_image.py +++ /dev/null @@ -1,59 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .virtual_machine_image_resource import VirtualMachineImageResource - - -class VirtualMachineImage(VirtualMachineImageResource): - """Describes a Virtual Machine Image. - - All required parameters must be populated in order to send to Azure. - - :param id: Resource Id - :type id: str - :param name: Required. The name of the resource. - :type name: str - :param location: Required. The supported Azure location of the resource. - :type location: str - :param tags: Specifies the tags that are assigned to the virtual machine. - For more information about using tags, see [Using tags to organize your - Azure - resources](https://docs.microsoft.com/azure/azure-resource-manager/resource-group-using-tags.md). - :type tags: dict[str, str] - :param plan: - :type plan: ~azure.mgmt.compute.v2018_06_01.models.PurchasePlan - :param os_disk_image: - :type os_disk_image: ~azure.mgmt.compute.v2018_06_01.models.OSDiskImage - :param data_disk_images: - :type data_disk_images: - list[~azure.mgmt.compute.v2018_06_01.models.DataDiskImage] - """ - - _validation = { - 'name': {'required': True}, - 'location': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'plan': {'key': 'properties.plan', 'type': 'PurchasePlan'}, - 'os_disk_image': {'key': 'properties.osDiskImage', 'type': 'OSDiskImage'}, - 'data_disk_images': {'key': 'properties.dataDiskImages', 'type': '[DataDiskImage]'}, - } - - def __init__(self, **kwargs): - super(VirtualMachineImage, self).__init__(**kwargs) - self.plan = kwargs.get('plan', None) - self.os_disk_image = kwargs.get('os_disk_image', None) - self.data_disk_images = kwargs.get('data_disk_images', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/virtual_machine_image_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/virtual_machine_image_py3.py deleted file mode 100644 index f9f16cbb7f77..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/virtual_machine_image_py3.py +++ /dev/null @@ -1,59 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .virtual_machine_image_resource_py3 import VirtualMachineImageResource - - -class VirtualMachineImage(VirtualMachineImageResource): - """Describes a Virtual Machine Image. - - All required parameters must be populated in order to send to Azure. - - :param id: Resource Id - :type id: str - :param name: Required. The name of the resource. - :type name: str - :param location: Required. The supported Azure location of the resource. - :type location: str - :param tags: Specifies the tags that are assigned to the virtual machine. - For more information about using tags, see [Using tags to organize your - Azure - resources](https://docs.microsoft.com/azure/azure-resource-manager/resource-group-using-tags.md). - :type tags: dict[str, str] - :param plan: - :type plan: ~azure.mgmt.compute.v2018_06_01.models.PurchasePlan - :param os_disk_image: - :type os_disk_image: ~azure.mgmt.compute.v2018_06_01.models.OSDiskImage - :param data_disk_images: - :type data_disk_images: - list[~azure.mgmt.compute.v2018_06_01.models.DataDiskImage] - """ - - _validation = { - 'name': {'required': True}, - 'location': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'plan': {'key': 'properties.plan', 'type': 'PurchasePlan'}, - 'os_disk_image': {'key': 'properties.osDiskImage', 'type': 'OSDiskImage'}, - 'data_disk_images': {'key': 'properties.dataDiskImages', 'type': '[DataDiskImage]'}, - } - - def __init__(self, *, name: str, location: str, id: str=None, tags=None, plan=None, os_disk_image=None, data_disk_images=None, **kwargs) -> None: - super(VirtualMachineImage, self).__init__(id=id, name=name, location=location, tags=tags, **kwargs) - self.plan = plan - self.os_disk_image = os_disk_image - self.data_disk_images = data_disk_images diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/virtual_machine_image_resource.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/virtual_machine_image_resource.py deleted file mode 100644 index 8807cc8f391b..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/virtual_machine_image_resource.py +++ /dev/null @@ -1,49 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .sub_resource import SubResource - - -class VirtualMachineImageResource(SubResource): - """Virtual machine image resource information. - - All required parameters must be populated in order to send to Azure. - - :param id: Resource Id - :type id: str - :param name: Required. The name of the resource. - :type name: str - :param location: Required. The supported Azure location of the resource. - :type location: str - :param tags: Specifies the tags that are assigned to the virtual machine. - For more information about using tags, see [Using tags to organize your - Azure - resources](https://docs.microsoft.com/azure/azure-resource-manager/resource-group-using-tags.md). - :type tags: dict[str, str] - """ - - _validation = { - 'name': {'required': True}, - 'location': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - } - - def __init__(self, **kwargs): - super(VirtualMachineImageResource, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.location = kwargs.get('location', None) - self.tags = kwargs.get('tags', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/virtual_machine_image_resource_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/virtual_machine_image_resource_py3.py deleted file mode 100644 index b9d63a8bc9e0..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/virtual_machine_image_resource_py3.py +++ /dev/null @@ -1,49 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .sub_resource_py3 import SubResource - - -class VirtualMachineImageResource(SubResource): - """Virtual machine image resource information. - - All required parameters must be populated in order to send to Azure. - - :param id: Resource Id - :type id: str - :param name: Required. The name of the resource. - :type name: str - :param location: Required. The supported Azure location of the resource. - :type location: str - :param tags: Specifies the tags that are assigned to the virtual machine. - For more information about using tags, see [Using tags to organize your - Azure - resources](https://docs.microsoft.com/azure/azure-resource-manager/resource-group-using-tags.md). - :type tags: dict[str, str] - """ - - _validation = { - 'name': {'required': True}, - 'location': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - } - - def __init__(self, *, name: str, location: str, id: str=None, tags=None, **kwargs) -> None: - super(VirtualMachineImageResource, self).__init__(id=id, **kwargs) - self.name = name - self.location = location - self.tags = tags diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/virtual_machine_instance_view.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/virtual_machine_instance_view.py deleted file mode 100644 index c64305728eba..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/virtual_machine_instance_view.py +++ /dev/null @@ -1,84 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineInstanceView(Model): - """The instance view of a virtual machine. - - :param platform_update_domain: Specifies the update domain of the virtual - machine. - :type platform_update_domain: int - :param platform_fault_domain: Specifies the fault domain of the virtual - machine. - :type platform_fault_domain: int - :param computer_name: The computer name assigned to the virtual machine. - :type computer_name: str - :param os_name: The Operating System running on the virtual machine. - :type os_name: str - :param os_version: The version of Operating System running on the virtual - machine. - :type os_version: str - :param rdp_thumb_print: The Remote desktop certificate thumbprint. - :type rdp_thumb_print: str - :param vm_agent: The VM Agent running on the virtual machine. - :type vm_agent: - ~azure.mgmt.compute.v2018_06_01.models.VirtualMachineAgentInstanceView - :param maintenance_redeploy_status: The Maintenance Operation status on - the virtual machine. - :type maintenance_redeploy_status: - ~azure.mgmt.compute.v2018_06_01.models.MaintenanceRedeployStatus - :param disks: The virtual machine disk information. - :type disks: list[~azure.mgmt.compute.v2018_06_01.models.DiskInstanceView] - :param extensions: The extensions information. - :type extensions: - list[~azure.mgmt.compute.v2018_06_01.models.VirtualMachineExtensionInstanceView] - :param boot_diagnostics: Boot Diagnostics is a debugging feature which - allows you to view Console Output and Screenshot to diagnose VM status. -

    You can easily view the output of your console log.

    - Azure also enables you to see a screenshot of the VM from the hypervisor. - :type boot_diagnostics: - ~azure.mgmt.compute.v2018_06_01.models.BootDiagnosticsInstanceView - :param statuses: The resource status information. - :type statuses: - list[~azure.mgmt.compute.v2018_06_01.models.InstanceViewStatus] - """ - - _attribute_map = { - 'platform_update_domain': {'key': 'platformUpdateDomain', 'type': 'int'}, - 'platform_fault_domain': {'key': 'platformFaultDomain', 'type': 'int'}, - 'computer_name': {'key': 'computerName', 'type': 'str'}, - 'os_name': {'key': 'osName', 'type': 'str'}, - 'os_version': {'key': 'osVersion', 'type': 'str'}, - 'rdp_thumb_print': {'key': 'rdpThumbPrint', 'type': 'str'}, - 'vm_agent': {'key': 'vmAgent', 'type': 'VirtualMachineAgentInstanceView'}, - 'maintenance_redeploy_status': {'key': 'maintenanceRedeployStatus', 'type': 'MaintenanceRedeployStatus'}, - 'disks': {'key': 'disks', 'type': '[DiskInstanceView]'}, - 'extensions': {'key': 'extensions', 'type': '[VirtualMachineExtensionInstanceView]'}, - 'boot_diagnostics': {'key': 'bootDiagnostics', 'type': 'BootDiagnosticsInstanceView'}, - 'statuses': {'key': 'statuses', 'type': '[InstanceViewStatus]'}, - } - - def __init__(self, **kwargs): - super(VirtualMachineInstanceView, self).__init__(**kwargs) - self.platform_update_domain = kwargs.get('platform_update_domain', None) - self.platform_fault_domain = kwargs.get('platform_fault_domain', None) - self.computer_name = kwargs.get('computer_name', None) - self.os_name = kwargs.get('os_name', None) - self.os_version = kwargs.get('os_version', None) - self.rdp_thumb_print = kwargs.get('rdp_thumb_print', None) - self.vm_agent = kwargs.get('vm_agent', None) - self.maintenance_redeploy_status = kwargs.get('maintenance_redeploy_status', None) - self.disks = kwargs.get('disks', None) - self.extensions = kwargs.get('extensions', None) - self.boot_diagnostics = kwargs.get('boot_diagnostics', None) - self.statuses = kwargs.get('statuses', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/virtual_machine_instance_view_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/virtual_machine_instance_view_py3.py deleted file mode 100644 index f1aea49e5739..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/virtual_machine_instance_view_py3.py +++ /dev/null @@ -1,84 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineInstanceView(Model): - """The instance view of a virtual machine. - - :param platform_update_domain: Specifies the update domain of the virtual - machine. - :type platform_update_domain: int - :param platform_fault_domain: Specifies the fault domain of the virtual - machine. - :type platform_fault_domain: int - :param computer_name: The computer name assigned to the virtual machine. - :type computer_name: str - :param os_name: The Operating System running on the virtual machine. - :type os_name: str - :param os_version: The version of Operating System running on the virtual - machine. - :type os_version: str - :param rdp_thumb_print: The Remote desktop certificate thumbprint. - :type rdp_thumb_print: str - :param vm_agent: The VM Agent running on the virtual machine. - :type vm_agent: - ~azure.mgmt.compute.v2018_06_01.models.VirtualMachineAgentInstanceView - :param maintenance_redeploy_status: The Maintenance Operation status on - the virtual machine. - :type maintenance_redeploy_status: - ~azure.mgmt.compute.v2018_06_01.models.MaintenanceRedeployStatus - :param disks: The virtual machine disk information. - :type disks: list[~azure.mgmt.compute.v2018_06_01.models.DiskInstanceView] - :param extensions: The extensions information. - :type extensions: - list[~azure.mgmt.compute.v2018_06_01.models.VirtualMachineExtensionInstanceView] - :param boot_diagnostics: Boot Diagnostics is a debugging feature which - allows you to view Console Output and Screenshot to diagnose VM status. -

    You can easily view the output of your console log.

    - Azure also enables you to see a screenshot of the VM from the hypervisor. - :type boot_diagnostics: - ~azure.mgmt.compute.v2018_06_01.models.BootDiagnosticsInstanceView - :param statuses: The resource status information. - :type statuses: - list[~azure.mgmt.compute.v2018_06_01.models.InstanceViewStatus] - """ - - _attribute_map = { - 'platform_update_domain': {'key': 'platformUpdateDomain', 'type': 'int'}, - 'platform_fault_domain': {'key': 'platformFaultDomain', 'type': 'int'}, - 'computer_name': {'key': 'computerName', 'type': 'str'}, - 'os_name': {'key': 'osName', 'type': 'str'}, - 'os_version': {'key': 'osVersion', 'type': 'str'}, - 'rdp_thumb_print': {'key': 'rdpThumbPrint', 'type': 'str'}, - 'vm_agent': {'key': 'vmAgent', 'type': 'VirtualMachineAgentInstanceView'}, - 'maintenance_redeploy_status': {'key': 'maintenanceRedeployStatus', 'type': 'MaintenanceRedeployStatus'}, - 'disks': {'key': 'disks', 'type': '[DiskInstanceView]'}, - 'extensions': {'key': 'extensions', 'type': '[VirtualMachineExtensionInstanceView]'}, - 'boot_diagnostics': {'key': 'bootDiagnostics', 'type': 'BootDiagnosticsInstanceView'}, - 'statuses': {'key': 'statuses', 'type': '[InstanceViewStatus]'}, - } - - def __init__(self, *, platform_update_domain: int=None, platform_fault_domain: int=None, computer_name: str=None, os_name: str=None, os_version: str=None, rdp_thumb_print: str=None, vm_agent=None, maintenance_redeploy_status=None, disks=None, extensions=None, boot_diagnostics=None, statuses=None, **kwargs) -> None: - super(VirtualMachineInstanceView, self).__init__(**kwargs) - self.platform_update_domain = platform_update_domain - self.platform_fault_domain = platform_fault_domain - self.computer_name = computer_name - self.os_name = os_name - self.os_version = os_version - self.rdp_thumb_print = rdp_thumb_print - self.vm_agent = vm_agent - self.maintenance_redeploy_status = maintenance_redeploy_status - self.disks = disks - self.extensions = extensions - self.boot_diagnostics = boot_diagnostics - self.statuses = statuses diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/virtual_machine_paged.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/virtual_machine_paged.py deleted file mode 100644 index ebf00ac1115a..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/virtual_machine_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class VirtualMachinePaged(Paged): - """ - A paging container for iterating over a list of :class:`VirtualMachine ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[VirtualMachine]'} - } - - def __init__(self, *args, **kwargs): - - super(VirtualMachinePaged, self).__init__(*args, **kwargs) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/virtual_machine_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/virtual_machine_py3.py deleted file mode 100644 index b0c24ddba5ad..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/virtual_machine_py3.py +++ /dev/null @@ -1,163 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource_py3 import Resource - - -class VirtualMachine(Resource): - """Describes a Virtual Machine. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource Id - :vartype id: str - :ivar name: Resource name - :vartype name: str - :ivar type: Resource type - :vartype type: str - :param location: Required. Resource location - :type location: str - :param tags: Resource tags - :type tags: dict[str, str] - :param plan: Specifies information about the marketplace image used to - create the virtual machine. This element is only used for marketplace - images. Before you can use a marketplace image from an API, you must - enable the image for programmatic use. In the Azure portal, find the - marketplace image that you want to use and then click **Want to deploy - programmatically, Get Started ->**. Enter any required information and - then click **Save**. - :type plan: ~azure.mgmt.compute.v2018_06_01.models.Plan - :param hardware_profile: Specifies the hardware settings for the virtual - machine. - :type hardware_profile: - ~azure.mgmt.compute.v2018_06_01.models.HardwareProfile - :param storage_profile: Specifies the storage settings for the virtual - machine disks. - :type storage_profile: - ~azure.mgmt.compute.v2018_06_01.models.StorageProfile - :param additional_capabilities: Specifies additional capabilities enabled - or disabled on the virtual machine. - :type additional_capabilities: - ~azure.mgmt.compute.v2018_06_01.models.AdditionalCapabilities - :param os_profile: Specifies the operating system settings for the virtual - machine. - :type os_profile: ~azure.mgmt.compute.v2018_06_01.models.OSProfile - :param network_profile: Specifies the network interfaces of the virtual - machine. - :type network_profile: - ~azure.mgmt.compute.v2018_06_01.models.NetworkProfile - :param diagnostics_profile: Specifies the boot diagnostic settings state. -

    Minimum api-version: 2015-06-15. - :type diagnostics_profile: - ~azure.mgmt.compute.v2018_06_01.models.DiagnosticsProfile - :param availability_set: Specifies information about the availability set - that the virtual machine should be assigned to. Virtual machines specified - in the same availability set are allocated to different nodes to maximize - availability. For more information about availability sets, see [Manage - the availability of virtual - machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-manage-availability?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). -

    For more information on Azure planned maintenance, see [Planned - maintenance for virtual machines in - Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-planned-maintenance?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json) -

    Currently, a VM can only be added to availability set at creation - time. An existing VM cannot be added to an availability set. - :type availability_set: ~azure.mgmt.compute.v2018_06_01.models.SubResource - :param proximity_placement_group: Specifies information about the - proximity placement group that the virtual machine should be assigned to. -

    Minimum api-version: 2018-04-01. - :type proximity_placement_group: - ~azure.mgmt.compute.v2018_06_01.models.SubResource - :ivar provisioning_state: The provisioning state, which only appears in - the response. - :vartype provisioning_state: str - :ivar instance_view: The virtual machine instance view. - :vartype instance_view: - ~azure.mgmt.compute.v2018_06_01.models.VirtualMachineInstanceView - :param license_type: Specifies that the image or disk that is being used - was licensed on-premises. This element is only used for images that - contain the Windows Server operating system.

    Possible values are: -

    Windows_Client

    Windows_Server

    If this element - is included in a request for an update, the value must match the initial - value. This value cannot be updated.

    For more information, see - [Azure Hybrid Use Benefit for Windows - Server](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-hybrid-use-benefit-licensing?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json) -

    Minimum api-version: 2015-06-15 - :type license_type: str - :ivar vm_id: Specifies the VM unique ID which is a 128-bits identifier - that is encoded and stored in all Azure IaaS VMs SMBIOS and can be read - using platform BIOS commands. - :vartype vm_id: str - :ivar resources: The virtual machine child extension resources. - :vartype resources: - list[~azure.mgmt.compute.v2018_06_01.models.VirtualMachineExtension] - :param identity: The identity of the virtual machine, if configured. - :type identity: - ~azure.mgmt.compute.v2018_06_01.models.VirtualMachineIdentity - :param zones: The virtual machine zones. - :type zones: list[str] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - 'provisioning_state': {'readonly': True}, - 'instance_view': {'readonly': True}, - 'vm_id': {'readonly': True}, - 'resources': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'plan': {'key': 'plan', 'type': 'Plan'}, - 'hardware_profile': {'key': 'properties.hardwareProfile', 'type': 'HardwareProfile'}, - 'storage_profile': {'key': 'properties.storageProfile', 'type': 'StorageProfile'}, - 'additional_capabilities': {'key': 'properties.additionalCapabilities', 'type': 'AdditionalCapabilities'}, - 'os_profile': {'key': 'properties.osProfile', 'type': 'OSProfile'}, - 'network_profile': {'key': 'properties.networkProfile', 'type': 'NetworkProfile'}, - 'diagnostics_profile': {'key': 'properties.diagnosticsProfile', 'type': 'DiagnosticsProfile'}, - 'availability_set': {'key': 'properties.availabilitySet', 'type': 'SubResource'}, - 'proximity_placement_group': {'key': 'properties.proximityPlacementGroup', 'type': 'SubResource'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'instance_view': {'key': 'properties.instanceView', 'type': 'VirtualMachineInstanceView'}, - 'license_type': {'key': 'properties.licenseType', 'type': 'str'}, - 'vm_id': {'key': 'properties.vmId', 'type': 'str'}, - 'resources': {'key': 'resources', 'type': '[VirtualMachineExtension]'}, - 'identity': {'key': 'identity', 'type': 'VirtualMachineIdentity'}, - 'zones': {'key': 'zones', 'type': '[str]'}, - } - - def __init__(self, *, location: str, tags=None, plan=None, hardware_profile=None, storage_profile=None, additional_capabilities=None, os_profile=None, network_profile=None, diagnostics_profile=None, availability_set=None, proximity_placement_group=None, license_type: str=None, identity=None, zones=None, **kwargs) -> None: - super(VirtualMachine, self).__init__(location=location, tags=tags, **kwargs) - self.plan = plan - self.hardware_profile = hardware_profile - self.storage_profile = storage_profile - self.additional_capabilities = additional_capabilities - self.os_profile = os_profile - self.network_profile = network_profile - self.diagnostics_profile = diagnostics_profile - self.availability_set = availability_set - self.proximity_placement_group = proximity_placement_group - self.provisioning_state = None - self.instance_view = None - self.license_type = license_type - self.vm_id = None - self.resources = None - self.identity = identity - self.zones = zones diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/virtual_machine_reimage_parameters.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/virtual_machine_reimage_parameters.py deleted file mode 100644 index e505f13a5083..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/virtual_machine_reimage_parameters.py +++ /dev/null @@ -1,29 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineReimageParameters(Model): - """Parameters for Reimaging Virtual Machine. Default value for OSDisk : true. - - :param temp_disk: Specifies whether to reimage temp disk. Default value: - false. - :type temp_disk: bool - """ - - _attribute_map = { - 'temp_disk': {'key': 'tempDisk', 'type': 'bool'}, - } - - def __init__(self, **kwargs): - super(VirtualMachineReimageParameters, self).__init__(**kwargs) - self.temp_disk = kwargs.get('temp_disk', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/virtual_machine_reimage_parameters_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/virtual_machine_reimage_parameters_py3.py deleted file mode 100644 index 90ec54085ba2..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/virtual_machine_reimage_parameters_py3.py +++ /dev/null @@ -1,29 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineReimageParameters(Model): - """Parameters for Reimaging Virtual Machine. Default value for OSDisk : true. - - :param temp_disk: Specifies whether to reimage temp disk. Default value: - false. - :type temp_disk: bool - """ - - _attribute_map = { - 'temp_disk': {'key': 'tempDisk', 'type': 'bool'}, - } - - def __init__(self, *, temp_disk: bool=None, **kwargs) -> None: - super(VirtualMachineReimageParameters, self).__init__(**kwargs) - self.temp_disk = temp_disk diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/virtual_machine_scale_set.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/virtual_machine_scale_set.py deleted file mode 100644 index 60c6b4c76871..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/virtual_machine_scale_set.py +++ /dev/null @@ -1,123 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource import Resource - - -class VirtualMachineScaleSet(Resource): - """Describes a Virtual Machine Scale Set. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource Id - :vartype id: str - :ivar name: Resource name - :vartype name: str - :ivar type: Resource type - :vartype type: str - :param location: Required. Resource location - :type location: str - :param tags: Resource tags - :type tags: dict[str, str] - :param sku: The virtual machine scale set sku. - :type sku: ~azure.mgmt.compute.v2018_06_01.models.Sku - :param plan: Specifies information about the marketplace image used to - create the virtual machine. This element is only used for marketplace - images. Before you can use a marketplace image from an API, you must - enable the image for programmatic use. In the Azure portal, find the - marketplace image that you want to use and then click **Want to deploy - programmatically, Get Started ->**. Enter any required information and - then click **Save**. - :type plan: ~azure.mgmt.compute.v2018_06_01.models.Plan - :param upgrade_policy: The upgrade policy. - :type upgrade_policy: ~azure.mgmt.compute.v2018_06_01.models.UpgradePolicy - :param virtual_machine_profile: The virtual machine profile. - :type virtual_machine_profile: - ~azure.mgmt.compute.v2018_06_01.models.VirtualMachineScaleSetVMProfile - :ivar provisioning_state: The provisioning state, which only appears in - the response. - :vartype provisioning_state: str - :param overprovision: Specifies whether the Virtual Machine Scale Set - should be overprovisioned. - :type overprovision: bool - :ivar unique_id: Specifies the ID which uniquely identifies a Virtual - Machine Scale Set. - :vartype unique_id: str - :param single_placement_group: When true this limits the scale set to a - single placement group, of max size 100 virtual machines. - :type single_placement_group: bool - :param zone_balance: Whether to force strictly even Virtual Machine - distribution cross x-zones in case there is zone outage. - :type zone_balance: bool - :param platform_fault_domain_count: Fault Domain count for each placement - group. - :type platform_fault_domain_count: int - :param proximity_placement_group: Specifies information about the - proximity placement group that the virtual machine scale set should be - assigned to.

    Minimum api-version: 2018-04-01. - :type proximity_placement_group: - ~azure.mgmt.compute.v2018_06_01.models.SubResource - :param identity: The identity of the virtual machine scale set, if - configured. - :type identity: - ~azure.mgmt.compute.v2018_06_01.models.VirtualMachineScaleSetIdentity - :param zones: The virtual machine scale set zones. - :type zones: list[str] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - 'provisioning_state': {'readonly': True}, - 'unique_id': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'sku': {'key': 'sku', 'type': 'Sku'}, - 'plan': {'key': 'plan', 'type': 'Plan'}, - 'upgrade_policy': {'key': 'properties.upgradePolicy', 'type': 'UpgradePolicy'}, - 'virtual_machine_profile': {'key': 'properties.virtualMachineProfile', 'type': 'VirtualMachineScaleSetVMProfile'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'overprovision': {'key': 'properties.overprovision', 'type': 'bool'}, - 'unique_id': {'key': 'properties.uniqueId', 'type': 'str'}, - 'single_placement_group': {'key': 'properties.singlePlacementGroup', 'type': 'bool'}, - 'zone_balance': {'key': 'properties.zoneBalance', 'type': 'bool'}, - 'platform_fault_domain_count': {'key': 'properties.platformFaultDomainCount', 'type': 'int'}, - 'proximity_placement_group': {'key': 'properties.proximityPlacementGroup', 'type': 'SubResource'}, - 'identity': {'key': 'identity', 'type': 'VirtualMachineScaleSetIdentity'}, - 'zones': {'key': 'zones', 'type': '[str]'}, - } - - def __init__(self, **kwargs): - super(VirtualMachineScaleSet, self).__init__(**kwargs) - self.sku = kwargs.get('sku', None) - self.plan = kwargs.get('plan', None) - self.upgrade_policy = kwargs.get('upgrade_policy', None) - self.virtual_machine_profile = kwargs.get('virtual_machine_profile', None) - self.provisioning_state = None - self.overprovision = kwargs.get('overprovision', None) - self.unique_id = None - self.single_placement_group = kwargs.get('single_placement_group', None) - self.zone_balance = kwargs.get('zone_balance', None) - self.platform_fault_domain_count = kwargs.get('platform_fault_domain_count', None) - self.proximity_placement_group = kwargs.get('proximity_placement_group', None) - self.identity = kwargs.get('identity', None) - self.zones = kwargs.get('zones', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/virtual_machine_scale_set_data_disk.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/virtual_machine_scale_set_data_disk.py deleted file mode 100644 index 48791267028c..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/virtual_machine_scale_set_data_disk.py +++ /dev/null @@ -1,70 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineScaleSetDataDisk(Model): - """Describes a virtual machine scale set data disk. - - All required parameters must be populated in order to send to Azure. - - :param name: The disk name. - :type name: str - :param lun: Required. Specifies the logical unit number of the data disk. - This value is used to identify data disks within the VM and therefore must - be unique for each data disk attached to a VM. - :type lun: int - :param caching: Specifies the caching requirements.

    Possible - values are:

    **None**

    **ReadOnly**

    **ReadWrite** -

    Default: **None for Standard storage. ReadOnly for Premium - storage**. Possible values include: 'None', 'ReadOnly', 'ReadWrite' - :type caching: str or ~azure.mgmt.compute.v2018_06_01.models.CachingTypes - :param write_accelerator_enabled: Specifies whether writeAccelerator - should be enabled or disabled on the disk. - :type write_accelerator_enabled: bool - :param create_option: Required. The create option. Possible values - include: 'FromImage', 'Empty', 'Attach' - :type create_option: str or - ~azure.mgmt.compute.v2018_06_01.models.DiskCreateOptionTypes - :param disk_size_gb: Specifies the size of an empty data disk in - gigabytes. This element can be used to overwrite the size of the disk in a - virtual machine image.

    This value cannot be larger than 1023 GB - :type disk_size_gb: int - :param managed_disk: The managed disk parameters. - :type managed_disk: - ~azure.mgmt.compute.v2018_06_01.models.VirtualMachineScaleSetManagedDiskParameters - """ - - _validation = { - 'lun': {'required': True}, - 'create_option': {'required': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'lun': {'key': 'lun', 'type': 'int'}, - 'caching': {'key': 'caching', 'type': 'CachingTypes'}, - 'write_accelerator_enabled': {'key': 'writeAcceleratorEnabled', 'type': 'bool'}, - 'create_option': {'key': 'createOption', 'type': 'str'}, - 'disk_size_gb': {'key': 'diskSizeGB', 'type': 'int'}, - 'managed_disk': {'key': 'managedDisk', 'type': 'VirtualMachineScaleSetManagedDiskParameters'}, - } - - def __init__(self, **kwargs): - super(VirtualMachineScaleSetDataDisk, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.lun = kwargs.get('lun', None) - self.caching = kwargs.get('caching', None) - self.write_accelerator_enabled = kwargs.get('write_accelerator_enabled', None) - self.create_option = kwargs.get('create_option', None) - self.disk_size_gb = kwargs.get('disk_size_gb', None) - self.managed_disk = kwargs.get('managed_disk', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/virtual_machine_scale_set_data_disk_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/virtual_machine_scale_set_data_disk_py3.py deleted file mode 100644 index 92a530925ba5..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/virtual_machine_scale_set_data_disk_py3.py +++ /dev/null @@ -1,70 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineScaleSetDataDisk(Model): - """Describes a virtual machine scale set data disk. - - All required parameters must be populated in order to send to Azure. - - :param name: The disk name. - :type name: str - :param lun: Required. Specifies the logical unit number of the data disk. - This value is used to identify data disks within the VM and therefore must - be unique for each data disk attached to a VM. - :type lun: int - :param caching: Specifies the caching requirements.

    Possible - values are:

    **None**

    **ReadOnly**

    **ReadWrite** -

    Default: **None for Standard storage. ReadOnly for Premium - storage**. Possible values include: 'None', 'ReadOnly', 'ReadWrite' - :type caching: str or ~azure.mgmt.compute.v2018_06_01.models.CachingTypes - :param write_accelerator_enabled: Specifies whether writeAccelerator - should be enabled or disabled on the disk. - :type write_accelerator_enabled: bool - :param create_option: Required. The create option. Possible values - include: 'FromImage', 'Empty', 'Attach' - :type create_option: str or - ~azure.mgmt.compute.v2018_06_01.models.DiskCreateOptionTypes - :param disk_size_gb: Specifies the size of an empty data disk in - gigabytes. This element can be used to overwrite the size of the disk in a - virtual machine image.

    This value cannot be larger than 1023 GB - :type disk_size_gb: int - :param managed_disk: The managed disk parameters. - :type managed_disk: - ~azure.mgmt.compute.v2018_06_01.models.VirtualMachineScaleSetManagedDiskParameters - """ - - _validation = { - 'lun': {'required': True}, - 'create_option': {'required': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'lun': {'key': 'lun', 'type': 'int'}, - 'caching': {'key': 'caching', 'type': 'CachingTypes'}, - 'write_accelerator_enabled': {'key': 'writeAcceleratorEnabled', 'type': 'bool'}, - 'create_option': {'key': 'createOption', 'type': 'str'}, - 'disk_size_gb': {'key': 'diskSizeGB', 'type': 'int'}, - 'managed_disk': {'key': 'managedDisk', 'type': 'VirtualMachineScaleSetManagedDiskParameters'}, - } - - def __init__(self, *, lun: int, create_option, name: str=None, caching=None, write_accelerator_enabled: bool=None, disk_size_gb: int=None, managed_disk=None, **kwargs) -> None: - super(VirtualMachineScaleSetDataDisk, self).__init__(**kwargs) - self.name = name - self.lun = lun - self.caching = caching - self.write_accelerator_enabled = write_accelerator_enabled - self.create_option = create_option - self.disk_size_gb = disk_size_gb - self.managed_disk = managed_disk diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/virtual_machine_scale_set_extension.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/virtual_machine_scale_set_extension.py deleted file mode 100644 index 206e7a851351..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/virtual_machine_scale_set_extension.py +++ /dev/null @@ -1,85 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .sub_resource_read_only import SubResourceReadOnly - - -class VirtualMachineScaleSetExtension(SubResourceReadOnly): - """Describes a Virtual Machine Scale Set Extension. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource Id - :vartype id: str - :param name: The name of the extension. - :type name: str - :param force_update_tag: If a value is provided and is different from the - previous value, the extension handler will be forced to update even if the - extension configuration has not changed. - :type force_update_tag: str - :param publisher: The name of the extension handler publisher. - :type publisher: str - :param type: Specifies the type of the extension; an example is - "CustomScriptExtension". - :type type: str - :param type_handler_version: Specifies the version of the script handler. - :type type_handler_version: str - :param auto_upgrade_minor_version: Indicates whether the extension should - use a newer minor version if one is available at deployment time. Once - deployed, however, the extension will not upgrade minor versions unless - redeployed, even with this property set to true. - :type auto_upgrade_minor_version: bool - :param settings: Json formatted public settings for the extension. - :type settings: object - :param protected_settings: The extension can contain either - protectedSettings or protectedSettingsFromKeyVault or no protected - settings at all. - :type protected_settings: object - :ivar provisioning_state: The provisioning state, which only appears in - the response. - :vartype provisioning_state: str - :param provision_after_extensions: Collection of extension names after - which this extension needs to be provisioned. - :type provision_after_extensions: list[str] - """ - - _validation = { - 'id': {'readonly': True}, - 'provisioning_state': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'force_update_tag': {'key': 'properties.forceUpdateTag', 'type': 'str'}, - 'publisher': {'key': 'properties.publisher', 'type': 'str'}, - 'type': {'key': 'properties.type', 'type': 'str'}, - 'type_handler_version': {'key': 'properties.typeHandlerVersion', 'type': 'str'}, - 'auto_upgrade_minor_version': {'key': 'properties.autoUpgradeMinorVersion', 'type': 'bool'}, - 'settings': {'key': 'properties.settings', 'type': 'object'}, - 'protected_settings': {'key': 'properties.protectedSettings', 'type': 'object'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'provision_after_extensions': {'key': 'properties.provisionAfterExtensions', 'type': '[str]'}, - } - - def __init__(self, **kwargs): - super(VirtualMachineScaleSetExtension, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.force_update_tag = kwargs.get('force_update_tag', None) - self.publisher = kwargs.get('publisher', None) - self.type = kwargs.get('type', None) - self.type_handler_version = kwargs.get('type_handler_version', None) - self.auto_upgrade_minor_version = kwargs.get('auto_upgrade_minor_version', None) - self.settings = kwargs.get('settings', None) - self.protected_settings = kwargs.get('protected_settings', None) - self.provisioning_state = None - self.provision_after_extensions = kwargs.get('provision_after_extensions', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/virtual_machine_scale_set_extension_paged.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/virtual_machine_scale_set_extension_paged.py deleted file mode 100644 index a002ee520ed9..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/virtual_machine_scale_set_extension_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class VirtualMachineScaleSetExtensionPaged(Paged): - """ - A paging container for iterating over a list of :class:`VirtualMachineScaleSetExtension ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[VirtualMachineScaleSetExtension]'} - } - - def __init__(self, *args, **kwargs): - - super(VirtualMachineScaleSetExtensionPaged, self).__init__(*args, **kwargs) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/virtual_machine_scale_set_extension_profile.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/virtual_machine_scale_set_extension_profile.py deleted file mode 100644 index 9af4754c6d94..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/virtual_machine_scale_set_extension_profile.py +++ /dev/null @@ -1,30 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineScaleSetExtensionProfile(Model): - """Describes a virtual machine scale set extension profile. - - :param extensions: The virtual machine scale set child extension - resources. - :type extensions: - list[~azure.mgmt.compute.v2018_06_01.models.VirtualMachineScaleSetExtension] - """ - - _attribute_map = { - 'extensions': {'key': 'extensions', 'type': '[VirtualMachineScaleSetExtension]'}, - } - - def __init__(self, **kwargs): - super(VirtualMachineScaleSetExtensionProfile, self).__init__(**kwargs) - self.extensions = kwargs.get('extensions', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/virtual_machine_scale_set_extension_profile_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/virtual_machine_scale_set_extension_profile_py3.py deleted file mode 100644 index 67d7dea3d24a..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/virtual_machine_scale_set_extension_profile_py3.py +++ /dev/null @@ -1,30 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineScaleSetExtensionProfile(Model): - """Describes a virtual machine scale set extension profile. - - :param extensions: The virtual machine scale set child extension - resources. - :type extensions: - list[~azure.mgmt.compute.v2018_06_01.models.VirtualMachineScaleSetExtension] - """ - - _attribute_map = { - 'extensions': {'key': 'extensions', 'type': '[VirtualMachineScaleSetExtension]'}, - } - - def __init__(self, *, extensions=None, **kwargs) -> None: - super(VirtualMachineScaleSetExtensionProfile, self).__init__(**kwargs) - self.extensions = extensions diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/virtual_machine_scale_set_extension_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/virtual_machine_scale_set_extension_py3.py deleted file mode 100644 index 895641055c44..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/virtual_machine_scale_set_extension_py3.py +++ /dev/null @@ -1,85 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .sub_resource_read_only_py3 import SubResourceReadOnly - - -class VirtualMachineScaleSetExtension(SubResourceReadOnly): - """Describes a Virtual Machine Scale Set Extension. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource Id - :vartype id: str - :param name: The name of the extension. - :type name: str - :param force_update_tag: If a value is provided and is different from the - previous value, the extension handler will be forced to update even if the - extension configuration has not changed. - :type force_update_tag: str - :param publisher: The name of the extension handler publisher. - :type publisher: str - :param type: Specifies the type of the extension; an example is - "CustomScriptExtension". - :type type: str - :param type_handler_version: Specifies the version of the script handler. - :type type_handler_version: str - :param auto_upgrade_minor_version: Indicates whether the extension should - use a newer minor version if one is available at deployment time. Once - deployed, however, the extension will not upgrade minor versions unless - redeployed, even with this property set to true. - :type auto_upgrade_minor_version: bool - :param settings: Json formatted public settings for the extension. - :type settings: object - :param protected_settings: The extension can contain either - protectedSettings or protectedSettingsFromKeyVault or no protected - settings at all. - :type protected_settings: object - :ivar provisioning_state: The provisioning state, which only appears in - the response. - :vartype provisioning_state: str - :param provision_after_extensions: Collection of extension names after - which this extension needs to be provisioned. - :type provision_after_extensions: list[str] - """ - - _validation = { - 'id': {'readonly': True}, - 'provisioning_state': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'force_update_tag': {'key': 'properties.forceUpdateTag', 'type': 'str'}, - 'publisher': {'key': 'properties.publisher', 'type': 'str'}, - 'type': {'key': 'properties.type', 'type': 'str'}, - 'type_handler_version': {'key': 'properties.typeHandlerVersion', 'type': 'str'}, - 'auto_upgrade_minor_version': {'key': 'properties.autoUpgradeMinorVersion', 'type': 'bool'}, - 'settings': {'key': 'properties.settings', 'type': 'object'}, - 'protected_settings': {'key': 'properties.protectedSettings', 'type': 'object'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'provision_after_extensions': {'key': 'properties.provisionAfterExtensions', 'type': '[str]'}, - } - - def __init__(self, *, name: str=None, force_update_tag: str=None, publisher: str=None, type: str=None, type_handler_version: str=None, auto_upgrade_minor_version: bool=None, settings=None, protected_settings=None, provision_after_extensions=None, **kwargs) -> None: - super(VirtualMachineScaleSetExtension, self).__init__(**kwargs) - self.name = name - self.force_update_tag = force_update_tag - self.publisher = publisher - self.type = type - self.type_handler_version = type_handler_version - self.auto_upgrade_minor_version = auto_upgrade_minor_version - self.settings = settings - self.protected_settings = protected_settings - self.provisioning_state = None - self.provision_after_extensions = provision_after_extensions diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/virtual_machine_scale_set_identity.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/virtual_machine_scale_set_identity.py deleted file mode 100644 index 70529891807f..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/virtual_machine_scale_set_identity.py +++ /dev/null @@ -1,61 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineScaleSetIdentity(Model): - """Identity for the virtual machine scale set. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar principal_id: The principal id of virtual machine scale set - identity. This property will only be provided for a system assigned - identity. - :vartype principal_id: str - :ivar tenant_id: The tenant id associated with the virtual machine scale - set. This property will only be provided for a system assigned identity. - :vartype tenant_id: str - :param type: The type of identity used for the virtual machine scale set. - The type 'SystemAssigned, UserAssigned' includes both an implicitly - created identity and a set of user assigned identities. The type 'None' - will remove any identities from the virtual machine scale set. Possible - values include: 'SystemAssigned', 'UserAssigned', 'SystemAssigned, - UserAssigned', 'None' - :type type: str or - ~azure.mgmt.compute.v2018_06_01.models.ResourceIdentityType - :param user_assigned_identities: The list of user identities associated - with the virtual machine scale set. The user identity dictionary key - references will be ARM resource ids in the form: - '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'. - :type user_assigned_identities: dict[str, - ~azure.mgmt.compute.v2018_06_01.models.VirtualMachineScaleSetIdentityUserAssignedIdentitiesValue] - """ - - _validation = { - 'principal_id': {'readonly': True}, - 'tenant_id': {'readonly': True}, - } - - _attribute_map = { - 'principal_id': {'key': 'principalId', 'type': 'str'}, - 'tenant_id': {'key': 'tenantId', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'ResourceIdentityType'}, - 'user_assigned_identities': {'key': 'userAssignedIdentities', 'type': '{VirtualMachineScaleSetIdentityUserAssignedIdentitiesValue}'}, - } - - def __init__(self, **kwargs): - super(VirtualMachineScaleSetIdentity, self).__init__(**kwargs) - self.principal_id = None - self.tenant_id = None - self.type = kwargs.get('type', None) - self.user_assigned_identities = kwargs.get('user_assigned_identities', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/virtual_machine_scale_set_identity_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/virtual_machine_scale_set_identity_py3.py deleted file mode 100644 index 9189070f95f2..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/virtual_machine_scale_set_identity_py3.py +++ /dev/null @@ -1,61 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineScaleSetIdentity(Model): - """Identity for the virtual machine scale set. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar principal_id: The principal id of virtual machine scale set - identity. This property will only be provided for a system assigned - identity. - :vartype principal_id: str - :ivar tenant_id: The tenant id associated with the virtual machine scale - set. This property will only be provided for a system assigned identity. - :vartype tenant_id: str - :param type: The type of identity used for the virtual machine scale set. - The type 'SystemAssigned, UserAssigned' includes both an implicitly - created identity and a set of user assigned identities. The type 'None' - will remove any identities from the virtual machine scale set. Possible - values include: 'SystemAssigned', 'UserAssigned', 'SystemAssigned, - UserAssigned', 'None' - :type type: str or - ~azure.mgmt.compute.v2018_06_01.models.ResourceIdentityType - :param user_assigned_identities: The list of user identities associated - with the virtual machine scale set. The user identity dictionary key - references will be ARM resource ids in the form: - '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'. - :type user_assigned_identities: dict[str, - ~azure.mgmt.compute.v2018_06_01.models.VirtualMachineScaleSetIdentityUserAssignedIdentitiesValue] - """ - - _validation = { - 'principal_id': {'readonly': True}, - 'tenant_id': {'readonly': True}, - } - - _attribute_map = { - 'principal_id': {'key': 'principalId', 'type': 'str'}, - 'tenant_id': {'key': 'tenantId', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'ResourceIdentityType'}, - 'user_assigned_identities': {'key': 'userAssignedIdentities', 'type': '{VirtualMachineScaleSetIdentityUserAssignedIdentitiesValue}'}, - } - - def __init__(self, *, type=None, user_assigned_identities=None, **kwargs) -> None: - super(VirtualMachineScaleSetIdentity, self).__init__(**kwargs) - self.principal_id = None - self.tenant_id = None - self.type = type - self.user_assigned_identities = user_assigned_identities diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/virtual_machine_scale_set_identity_user_assigned_identities_value.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/virtual_machine_scale_set_identity_user_assigned_identities_value.py deleted file mode 100644 index e362323ac96e..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/virtual_machine_scale_set_identity_user_assigned_identities_value.py +++ /dev/null @@ -1,40 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineScaleSetIdentityUserAssignedIdentitiesValue(Model): - """VirtualMachineScaleSetIdentityUserAssignedIdentitiesValue. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar principal_id: The principal id of user assigned identity. - :vartype principal_id: str - :ivar client_id: The client id of user assigned identity. - :vartype client_id: str - """ - - _validation = { - 'principal_id': {'readonly': True}, - 'client_id': {'readonly': True}, - } - - _attribute_map = { - 'principal_id': {'key': 'principalId', 'type': 'str'}, - 'client_id': {'key': 'clientId', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(VirtualMachineScaleSetIdentityUserAssignedIdentitiesValue, self).__init__(**kwargs) - self.principal_id = None - self.client_id = None diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/virtual_machine_scale_set_identity_user_assigned_identities_value_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/virtual_machine_scale_set_identity_user_assigned_identities_value_py3.py deleted file mode 100644 index 2839c26040cc..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/virtual_machine_scale_set_identity_user_assigned_identities_value_py3.py +++ /dev/null @@ -1,40 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineScaleSetIdentityUserAssignedIdentitiesValue(Model): - """VirtualMachineScaleSetIdentityUserAssignedIdentitiesValue. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar principal_id: The principal id of user assigned identity. - :vartype principal_id: str - :ivar client_id: The client id of user assigned identity. - :vartype client_id: str - """ - - _validation = { - 'principal_id': {'readonly': True}, - 'client_id': {'readonly': True}, - } - - _attribute_map = { - 'principal_id': {'key': 'principalId', 'type': 'str'}, - 'client_id': {'key': 'clientId', 'type': 'str'}, - } - - def __init__(self, **kwargs) -> None: - super(VirtualMachineScaleSetIdentityUserAssignedIdentitiesValue, self).__init__(**kwargs) - self.principal_id = None - self.client_id = None diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/virtual_machine_scale_set_instance_view.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/virtual_machine_scale_set_instance_view.py deleted file mode 100644 index b409783abd55..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/virtual_machine_scale_set_instance_view.py +++ /dev/null @@ -1,48 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineScaleSetInstanceView(Model): - """The instance view of a virtual machine scale set. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar virtual_machine: The instance view status summary for the virtual - machine scale set. - :vartype virtual_machine: - ~azure.mgmt.compute.v2018_06_01.models.VirtualMachineScaleSetInstanceViewStatusesSummary - :ivar extensions: The extensions information. - :vartype extensions: - list[~azure.mgmt.compute.v2018_06_01.models.VirtualMachineScaleSetVMExtensionsSummary] - :param statuses: The resource status information. - :type statuses: - list[~azure.mgmt.compute.v2018_06_01.models.InstanceViewStatus] - """ - - _validation = { - 'virtual_machine': {'readonly': True}, - 'extensions': {'readonly': True}, - } - - _attribute_map = { - 'virtual_machine': {'key': 'virtualMachine', 'type': 'VirtualMachineScaleSetInstanceViewStatusesSummary'}, - 'extensions': {'key': 'extensions', 'type': '[VirtualMachineScaleSetVMExtensionsSummary]'}, - 'statuses': {'key': 'statuses', 'type': '[InstanceViewStatus]'}, - } - - def __init__(self, **kwargs): - super(VirtualMachineScaleSetInstanceView, self).__init__(**kwargs) - self.virtual_machine = None - self.extensions = None - self.statuses = kwargs.get('statuses', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/virtual_machine_scale_set_instance_view_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/virtual_machine_scale_set_instance_view_py3.py deleted file mode 100644 index 18ba110ccc77..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/virtual_machine_scale_set_instance_view_py3.py +++ /dev/null @@ -1,48 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineScaleSetInstanceView(Model): - """The instance view of a virtual machine scale set. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar virtual_machine: The instance view status summary for the virtual - machine scale set. - :vartype virtual_machine: - ~azure.mgmt.compute.v2018_06_01.models.VirtualMachineScaleSetInstanceViewStatusesSummary - :ivar extensions: The extensions information. - :vartype extensions: - list[~azure.mgmt.compute.v2018_06_01.models.VirtualMachineScaleSetVMExtensionsSummary] - :param statuses: The resource status information. - :type statuses: - list[~azure.mgmt.compute.v2018_06_01.models.InstanceViewStatus] - """ - - _validation = { - 'virtual_machine': {'readonly': True}, - 'extensions': {'readonly': True}, - } - - _attribute_map = { - 'virtual_machine': {'key': 'virtualMachine', 'type': 'VirtualMachineScaleSetInstanceViewStatusesSummary'}, - 'extensions': {'key': 'extensions', 'type': '[VirtualMachineScaleSetVMExtensionsSummary]'}, - 'statuses': {'key': 'statuses', 'type': '[InstanceViewStatus]'}, - } - - def __init__(self, *, statuses=None, **kwargs) -> None: - super(VirtualMachineScaleSetInstanceView, self).__init__(**kwargs) - self.virtual_machine = None - self.extensions = None - self.statuses = statuses diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/virtual_machine_scale_set_instance_view_statuses_summary.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/virtual_machine_scale_set_instance_view_statuses_summary.py deleted file mode 100644 index 5b56f5e61356..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/virtual_machine_scale_set_instance_view_statuses_summary.py +++ /dev/null @@ -1,37 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineScaleSetInstanceViewStatusesSummary(Model): - """Instance view statuses summary for virtual machines of a virtual machine - scale set. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar statuses_summary: The extensions information. - :vartype statuses_summary: - list[~azure.mgmt.compute.v2018_06_01.models.VirtualMachineStatusCodeCount] - """ - - _validation = { - 'statuses_summary': {'readonly': True}, - } - - _attribute_map = { - 'statuses_summary': {'key': 'statusesSummary', 'type': '[VirtualMachineStatusCodeCount]'}, - } - - def __init__(self, **kwargs): - super(VirtualMachineScaleSetInstanceViewStatusesSummary, self).__init__(**kwargs) - self.statuses_summary = None diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/virtual_machine_scale_set_instance_view_statuses_summary_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/virtual_machine_scale_set_instance_view_statuses_summary_py3.py deleted file mode 100644 index c2e487d7ffb9..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/virtual_machine_scale_set_instance_view_statuses_summary_py3.py +++ /dev/null @@ -1,37 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineScaleSetInstanceViewStatusesSummary(Model): - """Instance view statuses summary for virtual machines of a virtual machine - scale set. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar statuses_summary: The extensions information. - :vartype statuses_summary: - list[~azure.mgmt.compute.v2018_06_01.models.VirtualMachineStatusCodeCount] - """ - - _validation = { - 'statuses_summary': {'readonly': True}, - } - - _attribute_map = { - 'statuses_summary': {'key': 'statusesSummary', 'type': '[VirtualMachineStatusCodeCount]'}, - } - - def __init__(self, **kwargs) -> None: - super(VirtualMachineScaleSetInstanceViewStatusesSummary, self).__init__(**kwargs) - self.statuses_summary = None diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/virtual_machine_scale_set_ip_configuration.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/virtual_machine_scale_set_ip_configuration.py deleted file mode 100644 index 6d5d3dfcb3e3..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/virtual_machine_scale_set_ip_configuration.py +++ /dev/null @@ -1,89 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .sub_resource import SubResource - - -class VirtualMachineScaleSetIPConfiguration(SubResource): - """Describes a virtual machine scale set network profile's IP configuration. - - All required parameters must be populated in order to send to Azure. - - :param id: Resource Id - :type id: str - :param name: Required. The IP configuration name. - :type name: str - :param subnet: Specifies the identifier of the subnet. - :type subnet: ~azure.mgmt.compute.v2018_06_01.models.ApiEntityReference - :param primary: Specifies the primary network interface in case the - virtual machine has more than 1 network interface. - :type primary: bool - :param public_ip_address_configuration: The publicIPAddressConfiguration. - :type public_ip_address_configuration: - ~azure.mgmt.compute.v2018_06_01.models.VirtualMachineScaleSetPublicIPAddressConfiguration - :param private_ip_address_version: Available from Api-Version 2017-03-30 - onwards, it represents whether the specific ipconfiguration is IPv4 or - IPv6. Default is taken as IPv4. Possible values are: 'IPv4' and 'IPv6'. - Possible values include: 'IPv4', 'IPv6' - :type private_ip_address_version: str or - ~azure.mgmt.compute.v2018_06_01.models.IPVersion - :param application_gateway_backend_address_pools: Specifies an array of - references to backend address pools of application gateways. A scale set - can reference backend address pools of multiple application gateways. - Multiple scale sets cannot use the same application gateway. - :type application_gateway_backend_address_pools: - list[~azure.mgmt.compute.v2018_06_01.models.SubResource] - :param application_security_groups: Specifies an array of references to - application security group. - :type application_security_groups: - list[~azure.mgmt.compute.v2018_06_01.models.SubResource] - :param load_balancer_backend_address_pools: Specifies an array of - references to backend address pools of load balancers. A scale set can - reference backend address pools of one public and one internal load - balancer. Multiple scale sets cannot use the same load balancer. - :type load_balancer_backend_address_pools: - list[~azure.mgmt.compute.v2018_06_01.models.SubResource] - :param load_balancer_inbound_nat_pools: Specifies an array of references - to inbound Nat pools of the load balancers. A scale set can reference - inbound nat pools of one public and one internal load balancer. Multiple - scale sets cannot use the same load balancer - :type load_balancer_inbound_nat_pools: - list[~azure.mgmt.compute.v2018_06_01.models.SubResource] - """ - - _validation = { - 'name': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'subnet': {'key': 'properties.subnet', 'type': 'ApiEntityReference'}, - 'primary': {'key': 'properties.primary', 'type': 'bool'}, - 'public_ip_address_configuration': {'key': 'properties.publicIPAddressConfiguration', 'type': 'VirtualMachineScaleSetPublicIPAddressConfiguration'}, - 'private_ip_address_version': {'key': 'properties.privateIPAddressVersion', 'type': 'str'}, - 'application_gateway_backend_address_pools': {'key': 'properties.applicationGatewayBackendAddressPools', 'type': '[SubResource]'}, - 'application_security_groups': {'key': 'properties.applicationSecurityGroups', 'type': '[SubResource]'}, - 'load_balancer_backend_address_pools': {'key': 'properties.loadBalancerBackendAddressPools', 'type': '[SubResource]'}, - 'load_balancer_inbound_nat_pools': {'key': 'properties.loadBalancerInboundNatPools', 'type': '[SubResource]'}, - } - - def __init__(self, **kwargs): - super(VirtualMachineScaleSetIPConfiguration, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.subnet = kwargs.get('subnet', None) - self.primary = kwargs.get('primary', None) - self.public_ip_address_configuration = kwargs.get('public_ip_address_configuration', None) - self.private_ip_address_version = kwargs.get('private_ip_address_version', None) - self.application_gateway_backend_address_pools = kwargs.get('application_gateway_backend_address_pools', None) - self.application_security_groups = kwargs.get('application_security_groups', None) - self.load_balancer_backend_address_pools = kwargs.get('load_balancer_backend_address_pools', None) - self.load_balancer_inbound_nat_pools = kwargs.get('load_balancer_inbound_nat_pools', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/virtual_machine_scale_set_ip_configuration_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/virtual_machine_scale_set_ip_configuration_py3.py deleted file mode 100644 index 52ef1edeac0c..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/virtual_machine_scale_set_ip_configuration_py3.py +++ /dev/null @@ -1,89 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .sub_resource_py3 import SubResource - - -class VirtualMachineScaleSetIPConfiguration(SubResource): - """Describes a virtual machine scale set network profile's IP configuration. - - All required parameters must be populated in order to send to Azure. - - :param id: Resource Id - :type id: str - :param name: Required. The IP configuration name. - :type name: str - :param subnet: Specifies the identifier of the subnet. - :type subnet: ~azure.mgmt.compute.v2018_06_01.models.ApiEntityReference - :param primary: Specifies the primary network interface in case the - virtual machine has more than 1 network interface. - :type primary: bool - :param public_ip_address_configuration: The publicIPAddressConfiguration. - :type public_ip_address_configuration: - ~azure.mgmt.compute.v2018_06_01.models.VirtualMachineScaleSetPublicIPAddressConfiguration - :param private_ip_address_version: Available from Api-Version 2017-03-30 - onwards, it represents whether the specific ipconfiguration is IPv4 or - IPv6. Default is taken as IPv4. Possible values are: 'IPv4' and 'IPv6'. - Possible values include: 'IPv4', 'IPv6' - :type private_ip_address_version: str or - ~azure.mgmt.compute.v2018_06_01.models.IPVersion - :param application_gateway_backend_address_pools: Specifies an array of - references to backend address pools of application gateways. A scale set - can reference backend address pools of multiple application gateways. - Multiple scale sets cannot use the same application gateway. - :type application_gateway_backend_address_pools: - list[~azure.mgmt.compute.v2018_06_01.models.SubResource] - :param application_security_groups: Specifies an array of references to - application security group. - :type application_security_groups: - list[~azure.mgmt.compute.v2018_06_01.models.SubResource] - :param load_balancer_backend_address_pools: Specifies an array of - references to backend address pools of load balancers. A scale set can - reference backend address pools of one public and one internal load - balancer. Multiple scale sets cannot use the same load balancer. - :type load_balancer_backend_address_pools: - list[~azure.mgmt.compute.v2018_06_01.models.SubResource] - :param load_balancer_inbound_nat_pools: Specifies an array of references - to inbound Nat pools of the load balancers. A scale set can reference - inbound nat pools of one public and one internal load balancer. Multiple - scale sets cannot use the same load balancer - :type load_balancer_inbound_nat_pools: - list[~azure.mgmt.compute.v2018_06_01.models.SubResource] - """ - - _validation = { - 'name': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'subnet': {'key': 'properties.subnet', 'type': 'ApiEntityReference'}, - 'primary': {'key': 'properties.primary', 'type': 'bool'}, - 'public_ip_address_configuration': {'key': 'properties.publicIPAddressConfiguration', 'type': 'VirtualMachineScaleSetPublicIPAddressConfiguration'}, - 'private_ip_address_version': {'key': 'properties.privateIPAddressVersion', 'type': 'str'}, - 'application_gateway_backend_address_pools': {'key': 'properties.applicationGatewayBackendAddressPools', 'type': '[SubResource]'}, - 'application_security_groups': {'key': 'properties.applicationSecurityGroups', 'type': '[SubResource]'}, - 'load_balancer_backend_address_pools': {'key': 'properties.loadBalancerBackendAddressPools', 'type': '[SubResource]'}, - 'load_balancer_inbound_nat_pools': {'key': 'properties.loadBalancerInboundNatPools', 'type': '[SubResource]'}, - } - - def __init__(self, *, name: str, id: str=None, subnet=None, primary: bool=None, public_ip_address_configuration=None, private_ip_address_version=None, application_gateway_backend_address_pools=None, application_security_groups=None, load_balancer_backend_address_pools=None, load_balancer_inbound_nat_pools=None, **kwargs) -> None: - super(VirtualMachineScaleSetIPConfiguration, self).__init__(id=id, **kwargs) - self.name = name - self.subnet = subnet - self.primary = primary - self.public_ip_address_configuration = public_ip_address_configuration - self.private_ip_address_version = private_ip_address_version - self.application_gateway_backend_address_pools = application_gateway_backend_address_pools - self.application_security_groups = application_security_groups - self.load_balancer_backend_address_pools = load_balancer_backend_address_pools - self.load_balancer_inbound_nat_pools = load_balancer_inbound_nat_pools diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/virtual_machine_scale_set_ip_tag.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/virtual_machine_scale_set_ip_tag.py deleted file mode 100644 index 36b70260d646..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/virtual_machine_scale_set_ip_tag.py +++ /dev/null @@ -1,33 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineScaleSetIpTag(Model): - """Contains the IP tag associated with the public IP address. - - :param ip_tag_type: IP tag type. Example: FirstPartyUsage. - :type ip_tag_type: str - :param tag: IP tag associated with the public IP. Example: SQL, Storage - etc. - :type tag: str - """ - - _attribute_map = { - 'ip_tag_type': {'key': 'ipTagType', 'type': 'str'}, - 'tag': {'key': 'tag', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(VirtualMachineScaleSetIpTag, self).__init__(**kwargs) - self.ip_tag_type = kwargs.get('ip_tag_type', None) - self.tag = kwargs.get('tag', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/virtual_machine_scale_set_ip_tag_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/virtual_machine_scale_set_ip_tag_py3.py deleted file mode 100644 index aaf788c9d772..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/virtual_machine_scale_set_ip_tag_py3.py +++ /dev/null @@ -1,33 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineScaleSetIpTag(Model): - """Contains the IP tag associated with the public IP address. - - :param ip_tag_type: IP tag type. Example: FirstPartyUsage. - :type ip_tag_type: str - :param tag: IP tag associated with the public IP. Example: SQL, Storage - etc. - :type tag: str - """ - - _attribute_map = { - 'ip_tag_type': {'key': 'ipTagType', 'type': 'str'}, - 'tag': {'key': 'tag', 'type': 'str'}, - } - - def __init__(self, *, ip_tag_type: str=None, tag: str=None, **kwargs) -> None: - super(VirtualMachineScaleSetIpTag, self).__init__(**kwargs) - self.ip_tag_type = ip_tag_type - self.tag = tag diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/virtual_machine_scale_set_managed_disk_parameters.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/virtual_machine_scale_set_managed_disk_parameters.py deleted file mode 100644 index 9abca6a1818e..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/virtual_machine_scale_set_managed_disk_parameters.py +++ /dev/null @@ -1,32 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineScaleSetManagedDiskParameters(Model): - """Describes the parameters of a ScaleSet managed disk. - - :param storage_account_type: Specifies the storage account type for the - managed disk. NOTE: UltraSSD_LRS can only be used with data disks, it - cannot be used with OS Disk. Possible values include: 'Standard_LRS', - 'Premium_LRS', 'StandardSSD_LRS', 'UltraSSD_LRS' - :type storage_account_type: str or - ~azure.mgmt.compute.v2018_06_01.models.StorageAccountTypes - """ - - _attribute_map = { - 'storage_account_type': {'key': 'storageAccountType', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(VirtualMachineScaleSetManagedDiskParameters, self).__init__(**kwargs) - self.storage_account_type = kwargs.get('storage_account_type', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/virtual_machine_scale_set_managed_disk_parameters_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/virtual_machine_scale_set_managed_disk_parameters_py3.py deleted file mode 100644 index 1df9ec0b5415..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/virtual_machine_scale_set_managed_disk_parameters_py3.py +++ /dev/null @@ -1,32 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineScaleSetManagedDiskParameters(Model): - """Describes the parameters of a ScaleSet managed disk. - - :param storage_account_type: Specifies the storage account type for the - managed disk. NOTE: UltraSSD_LRS can only be used with data disks, it - cannot be used with OS Disk. Possible values include: 'Standard_LRS', - 'Premium_LRS', 'StandardSSD_LRS', 'UltraSSD_LRS' - :type storage_account_type: str or - ~azure.mgmt.compute.v2018_06_01.models.StorageAccountTypes - """ - - _attribute_map = { - 'storage_account_type': {'key': 'storageAccountType', 'type': 'str'}, - } - - def __init__(self, *, storage_account_type=None, **kwargs) -> None: - super(VirtualMachineScaleSetManagedDiskParameters, self).__init__(**kwargs) - self.storage_account_type = storage_account_type diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/virtual_machine_scale_set_network_configuration.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/virtual_machine_scale_set_network_configuration.py deleted file mode 100644 index 5a6f335df9d6..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/virtual_machine_scale_set_network_configuration.py +++ /dev/null @@ -1,70 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .sub_resource import SubResource - - -class VirtualMachineScaleSetNetworkConfiguration(SubResource): - """Describes a virtual machine scale set network profile's network - configurations. - - All required parameters must be populated in order to send to Azure. - - :param id: Resource Id - :type id: str - :param name: Required. The network configuration name. - :type name: str - :param primary: Specifies the primary network interface in case the - virtual machine has more than 1 network interface. - :type primary: bool - :param enable_accelerated_networking: Specifies whether the network - interface is accelerated networking-enabled. - :type enable_accelerated_networking: bool - :param network_security_group: The network security group. - :type network_security_group: - ~azure.mgmt.compute.v2018_06_01.models.SubResource - :param dns_settings: The dns settings to be applied on the network - interfaces. - :type dns_settings: - ~azure.mgmt.compute.v2018_06_01.models.VirtualMachineScaleSetNetworkConfigurationDnsSettings - :param ip_configurations: Required. Specifies the IP configurations of the - network interface. - :type ip_configurations: - list[~azure.mgmt.compute.v2018_06_01.models.VirtualMachineScaleSetIPConfiguration] - :param enable_ip_forwarding: Whether IP forwarding enabled on this NIC. - :type enable_ip_forwarding: bool - """ - - _validation = { - 'name': {'required': True}, - 'ip_configurations': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'primary': {'key': 'properties.primary', 'type': 'bool'}, - 'enable_accelerated_networking': {'key': 'properties.enableAcceleratedNetworking', 'type': 'bool'}, - 'network_security_group': {'key': 'properties.networkSecurityGroup', 'type': 'SubResource'}, - 'dns_settings': {'key': 'properties.dnsSettings', 'type': 'VirtualMachineScaleSetNetworkConfigurationDnsSettings'}, - 'ip_configurations': {'key': 'properties.ipConfigurations', 'type': '[VirtualMachineScaleSetIPConfiguration]'}, - 'enable_ip_forwarding': {'key': 'properties.enableIPForwarding', 'type': 'bool'}, - } - - def __init__(self, **kwargs): - super(VirtualMachineScaleSetNetworkConfiguration, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.primary = kwargs.get('primary', None) - self.enable_accelerated_networking = kwargs.get('enable_accelerated_networking', None) - self.network_security_group = kwargs.get('network_security_group', None) - self.dns_settings = kwargs.get('dns_settings', None) - self.ip_configurations = kwargs.get('ip_configurations', None) - self.enable_ip_forwarding = kwargs.get('enable_ip_forwarding', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/virtual_machine_scale_set_network_configuration_dns_settings.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/virtual_machine_scale_set_network_configuration_dns_settings.py deleted file mode 100644 index 04e1c619383f..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/virtual_machine_scale_set_network_configuration_dns_settings.py +++ /dev/null @@ -1,29 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineScaleSetNetworkConfigurationDnsSettings(Model): - """Describes a virtual machines scale sets network configuration's DNS - settings. - - :param dns_servers: List of DNS servers IP addresses - :type dns_servers: list[str] - """ - - _attribute_map = { - 'dns_servers': {'key': 'dnsServers', 'type': '[str]'}, - } - - def __init__(self, **kwargs): - super(VirtualMachineScaleSetNetworkConfigurationDnsSettings, self).__init__(**kwargs) - self.dns_servers = kwargs.get('dns_servers', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/virtual_machine_scale_set_network_configuration_dns_settings_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/virtual_machine_scale_set_network_configuration_dns_settings_py3.py deleted file mode 100644 index 5607f74d3c6a..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/virtual_machine_scale_set_network_configuration_dns_settings_py3.py +++ /dev/null @@ -1,29 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineScaleSetNetworkConfigurationDnsSettings(Model): - """Describes a virtual machines scale sets network configuration's DNS - settings. - - :param dns_servers: List of DNS servers IP addresses - :type dns_servers: list[str] - """ - - _attribute_map = { - 'dns_servers': {'key': 'dnsServers', 'type': '[str]'}, - } - - def __init__(self, *, dns_servers=None, **kwargs) -> None: - super(VirtualMachineScaleSetNetworkConfigurationDnsSettings, self).__init__(**kwargs) - self.dns_servers = dns_servers diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/virtual_machine_scale_set_network_configuration_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/virtual_machine_scale_set_network_configuration_py3.py deleted file mode 100644 index 94b5018fe871..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/virtual_machine_scale_set_network_configuration_py3.py +++ /dev/null @@ -1,70 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .sub_resource_py3 import SubResource - - -class VirtualMachineScaleSetNetworkConfiguration(SubResource): - """Describes a virtual machine scale set network profile's network - configurations. - - All required parameters must be populated in order to send to Azure. - - :param id: Resource Id - :type id: str - :param name: Required. The network configuration name. - :type name: str - :param primary: Specifies the primary network interface in case the - virtual machine has more than 1 network interface. - :type primary: bool - :param enable_accelerated_networking: Specifies whether the network - interface is accelerated networking-enabled. - :type enable_accelerated_networking: bool - :param network_security_group: The network security group. - :type network_security_group: - ~azure.mgmt.compute.v2018_06_01.models.SubResource - :param dns_settings: The dns settings to be applied on the network - interfaces. - :type dns_settings: - ~azure.mgmt.compute.v2018_06_01.models.VirtualMachineScaleSetNetworkConfigurationDnsSettings - :param ip_configurations: Required. Specifies the IP configurations of the - network interface. - :type ip_configurations: - list[~azure.mgmt.compute.v2018_06_01.models.VirtualMachineScaleSetIPConfiguration] - :param enable_ip_forwarding: Whether IP forwarding enabled on this NIC. - :type enable_ip_forwarding: bool - """ - - _validation = { - 'name': {'required': True}, - 'ip_configurations': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'primary': {'key': 'properties.primary', 'type': 'bool'}, - 'enable_accelerated_networking': {'key': 'properties.enableAcceleratedNetworking', 'type': 'bool'}, - 'network_security_group': {'key': 'properties.networkSecurityGroup', 'type': 'SubResource'}, - 'dns_settings': {'key': 'properties.dnsSettings', 'type': 'VirtualMachineScaleSetNetworkConfigurationDnsSettings'}, - 'ip_configurations': {'key': 'properties.ipConfigurations', 'type': '[VirtualMachineScaleSetIPConfiguration]'}, - 'enable_ip_forwarding': {'key': 'properties.enableIPForwarding', 'type': 'bool'}, - } - - def __init__(self, *, name: str, ip_configurations, id: str=None, primary: bool=None, enable_accelerated_networking: bool=None, network_security_group=None, dns_settings=None, enable_ip_forwarding: bool=None, **kwargs) -> None: - super(VirtualMachineScaleSetNetworkConfiguration, self).__init__(id=id, **kwargs) - self.name = name - self.primary = primary - self.enable_accelerated_networking = enable_accelerated_networking - self.network_security_group = network_security_group - self.dns_settings = dns_settings - self.ip_configurations = ip_configurations - self.enable_ip_forwarding = enable_ip_forwarding diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/virtual_machine_scale_set_network_profile.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/virtual_machine_scale_set_network_profile.py deleted file mode 100644 index 6bf7de78bc96..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/virtual_machine_scale_set_network_profile.py +++ /dev/null @@ -1,38 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineScaleSetNetworkProfile(Model): - """Describes a virtual machine scale set network profile. - - :param health_probe: A reference to a load balancer probe used to - determine the health of an instance in the virtual machine scale set. The - reference will be in the form: - '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/probes/{probeName}'. - :type health_probe: - ~azure.mgmt.compute.v2018_06_01.models.ApiEntityReference - :param network_interface_configurations: The list of network - configurations. - :type network_interface_configurations: - list[~azure.mgmt.compute.v2018_06_01.models.VirtualMachineScaleSetNetworkConfiguration] - """ - - _attribute_map = { - 'health_probe': {'key': 'healthProbe', 'type': 'ApiEntityReference'}, - 'network_interface_configurations': {'key': 'networkInterfaceConfigurations', 'type': '[VirtualMachineScaleSetNetworkConfiguration]'}, - } - - def __init__(self, **kwargs): - super(VirtualMachineScaleSetNetworkProfile, self).__init__(**kwargs) - self.health_probe = kwargs.get('health_probe', None) - self.network_interface_configurations = kwargs.get('network_interface_configurations', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/virtual_machine_scale_set_network_profile_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/virtual_machine_scale_set_network_profile_py3.py deleted file mode 100644 index f9c5a1b1e6d3..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/virtual_machine_scale_set_network_profile_py3.py +++ /dev/null @@ -1,38 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineScaleSetNetworkProfile(Model): - """Describes a virtual machine scale set network profile. - - :param health_probe: A reference to a load balancer probe used to - determine the health of an instance in the virtual machine scale set. The - reference will be in the form: - '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/probes/{probeName}'. - :type health_probe: - ~azure.mgmt.compute.v2018_06_01.models.ApiEntityReference - :param network_interface_configurations: The list of network - configurations. - :type network_interface_configurations: - list[~azure.mgmt.compute.v2018_06_01.models.VirtualMachineScaleSetNetworkConfiguration] - """ - - _attribute_map = { - 'health_probe': {'key': 'healthProbe', 'type': 'ApiEntityReference'}, - 'network_interface_configurations': {'key': 'networkInterfaceConfigurations', 'type': '[VirtualMachineScaleSetNetworkConfiguration]'}, - } - - def __init__(self, *, health_probe=None, network_interface_configurations=None, **kwargs) -> None: - super(VirtualMachineScaleSetNetworkProfile, self).__init__(**kwargs) - self.health_probe = health_probe - self.network_interface_configurations = network_interface_configurations diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/virtual_machine_scale_set_os_disk.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/virtual_machine_scale_set_os_disk.py deleted file mode 100644 index 654e1f3257d5..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/virtual_machine_scale_set_os_disk.py +++ /dev/null @@ -1,92 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineScaleSetOSDisk(Model): - """Describes a virtual machine scale set operating system disk. - - All required parameters must be populated in order to send to Azure. - - :param name: The disk name. - :type name: str - :param caching: Specifies the caching requirements.

    Possible - values are:

    **None**

    **ReadOnly**

    **ReadWrite** -

    Default: **None for Standard storage. ReadOnly for Premium - storage**. Possible values include: 'None', 'ReadOnly', 'ReadWrite' - :type caching: str or ~azure.mgmt.compute.v2018_06_01.models.CachingTypes - :param write_accelerator_enabled: Specifies whether writeAccelerator - should be enabled or disabled on the disk. - :type write_accelerator_enabled: bool - :param create_option: Required. Specifies how the virtual machines in the - scale set should be created.

    The only allowed value is: - **FromImage** \\u2013 This value is used when you are using an image to - create the virtual machine. If you are using a platform image, you also - use the imageReference element described above. If you are using a - marketplace image, you also use the plan element previously described. - Possible values include: 'FromImage', 'Empty', 'Attach' - :type create_option: str or - ~azure.mgmt.compute.v2018_06_01.models.DiskCreateOptionTypes - :param diff_disk_settings: Specifies the ephemeral disk Settings for the - operating system disk used by the virtual machine scale set. - :type diff_disk_settings: - ~azure.mgmt.compute.v2018_06_01.models.DiffDiskSettings - :param disk_size_gb: Specifies the size of the operating system disk in - gigabytes. This element can be used to overwrite the size of the disk in a - virtual machine image.

    This value cannot be larger than 1023 GB - :type disk_size_gb: int - :param os_type: This property allows you to specify the type of the OS - that is included in the disk if creating a VM from user-image or a - specialized VHD.

    Possible values are:

    **Windows** -

    **Linux**. Possible values include: 'Windows', 'Linux' - :type os_type: str or - ~azure.mgmt.compute.v2018_06_01.models.OperatingSystemTypes - :param image: Specifies information about the unmanaged user image to base - the scale set on. - :type image: ~azure.mgmt.compute.v2018_06_01.models.VirtualHardDisk - :param vhd_containers: Specifies the container urls that are used to store - operating system disks for the scale set. - :type vhd_containers: list[str] - :param managed_disk: The managed disk parameters. - :type managed_disk: - ~azure.mgmt.compute.v2018_06_01.models.VirtualMachineScaleSetManagedDiskParameters - """ - - _validation = { - 'create_option': {'required': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'caching': {'key': 'caching', 'type': 'CachingTypes'}, - 'write_accelerator_enabled': {'key': 'writeAcceleratorEnabled', 'type': 'bool'}, - 'create_option': {'key': 'createOption', 'type': 'str'}, - 'diff_disk_settings': {'key': 'diffDiskSettings', 'type': 'DiffDiskSettings'}, - 'disk_size_gb': {'key': 'diskSizeGB', 'type': 'int'}, - 'os_type': {'key': 'osType', 'type': 'OperatingSystemTypes'}, - 'image': {'key': 'image', 'type': 'VirtualHardDisk'}, - 'vhd_containers': {'key': 'vhdContainers', 'type': '[str]'}, - 'managed_disk': {'key': 'managedDisk', 'type': 'VirtualMachineScaleSetManagedDiskParameters'}, - } - - def __init__(self, **kwargs): - super(VirtualMachineScaleSetOSDisk, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.caching = kwargs.get('caching', None) - self.write_accelerator_enabled = kwargs.get('write_accelerator_enabled', None) - self.create_option = kwargs.get('create_option', None) - self.diff_disk_settings = kwargs.get('diff_disk_settings', None) - self.disk_size_gb = kwargs.get('disk_size_gb', None) - self.os_type = kwargs.get('os_type', None) - self.image = kwargs.get('image', None) - self.vhd_containers = kwargs.get('vhd_containers', None) - self.managed_disk = kwargs.get('managed_disk', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/virtual_machine_scale_set_os_disk_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/virtual_machine_scale_set_os_disk_py3.py deleted file mode 100644 index d6173e1005bd..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/virtual_machine_scale_set_os_disk_py3.py +++ /dev/null @@ -1,92 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineScaleSetOSDisk(Model): - """Describes a virtual machine scale set operating system disk. - - All required parameters must be populated in order to send to Azure. - - :param name: The disk name. - :type name: str - :param caching: Specifies the caching requirements.

    Possible - values are:

    **None**

    **ReadOnly**

    **ReadWrite** -

    Default: **None for Standard storage. ReadOnly for Premium - storage**. Possible values include: 'None', 'ReadOnly', 'ReadWrite' - :type caching: str or ~azure.mgmt.compute.v2018_06_01.models.CachingTypes - :param write_accelerator_enabled: Specifies whether writeAccelerator - should be enabled or disabled on the disk. - :type write_accelerator_enabled: bool - :param create_option: Required. Specifies how the virtual machines in the - scale set should be created.

    The only allowed value is: - **FromImage** \\u2013 This value is used when you are using an image to - create the virtual machine. If you are using a platform image, you also - use the imageReference element described above. If you are using a - marketplace image, you also use the plan element previously described. - Possible values include: 'FromImage', 'Empty', 'Attach' - :type create_option: str or - ~azure.mgmt.compute.v2018_06_01.models.DiskCreateOptionTypes - :param diff_disk_settings: Specifies the ephemeral disk Settings for the - operating system disk used by the virtual machine scale set. - :type diff_disk_settings: - ~azure.mgmt.compute.v2018_06_01.models.DiffDiskSettings - :param disk_size_gb: Specifies the size of the operating system disk in - gigabytes. This element can be used to overwrite the size of the disk in a - virtual machine image.

    This value cannot be larger than 1023 GB - :type disk_size_gb: int - :param os_type: This property allows you to specify the type of the OS - that is included in the disk if creating a VM from user-image or a - specialized VHD.

    Possible values are:

    **Windows** -

    **Linux**. Possible values include: 'Windows', 'Linux' - :type os_type: str or - ~azure.mgmt.compute.v2018_06_01.models.OperatingSystemTypes - :param image: Specifies information about the unmanaged user image to base - the scale set on. - :type image: ~azure.mgmt.compute.v2018_06_01.models.VirtualHardDisk - :param vhd_containers: Specifies the container urls that are used to store - operating system disks for the scale set. - :type vhd_containers: list[str] - :param managed_disk: The managed disk parameters. - :type managed_disk: - ~azure.mgmt.compute.v2018_06_01.models.VirtualMachineScaleSetManagedDiskParameters - """ - - _validation = { - 'create_option': {'required': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'caching': {'key': 'caching', 'type': 'CachingTypes'}, - 'write_accelerator_enabled': {'key': 'writeAcceleratorEnabled', 'type': 'bool'}, - 'create_option': {'key': 'createOption', 'type': 'str'}, - 'diff_disk_settings': {'key': 'diffDiskSettings', 'type': 'DiffDiskSettings'}, - 'disk_size_gb': {'key': 'diskSizeGB', 'type': 'int'}, - 'os_type': {'key': 'osType', 'type': 'OperatingSystemTypes'}, - 'image': {'key': 'image', 'type': 'VirtualHardDisk'}, - 'vhd_containers': {'key': 'vhdContainers', 'type': '[str]'}, - 'managed_disk': {'key': 'managedDisk', 'type': 'VirtualMachineScaleSetManagedDiskParameters'}, - } - - def __init__(self, *, create_option, name: str=None, caching=None, write_accelerator_enabled: bool=None, diff_disk_settings=None, disk_size_gb: int=None, os_type=None, image=None, vhd_containers=None, managed_disk=None, **kwargs) -> None: - super(VirtualMachineScaleSetOSDisk, self).__init__(**kwargs) - self.name = name - self.caching = caching - self.write_accelerator_enabled = write_accelerator_enabled - self.create_option = create_option - self.diff_disk_settings = diff_disk_settings - self.disk_size_gb = disk_size_gb - self.os_type = os_type - self.image = image - self.vhd_containers = vhd_containers - self.managed_disk = managed_disk diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/virtual_machine_scale_set_os_profile.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/virtual_machine_scale_set_os_profile.py deleted file mode 100644 index c808be381e12..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/virtual_machine_scale_set_os_profile.py +++ /dev/null @@ -1,97 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineScaleSetOSProfile(Model): - """Describes a virtual machine scale set OS profile. - - :param computer_name_prefix: Specifies the computer name prefix for all of - the virtual machines in the scale set. Computer name prefixes must be 1 to - 15 characters long. - :type computer_name_prefix: str - :param admin_username: Specifies the name of the administrator account. -

    **Windows-only restriction:** Cannot end in "."

    - **Disallowed values:** "administrator", "admin", "user", "user1", "test", - "user2", "test1", "user3", "admin1", "1", "123", "a", "actuser", "adm", - "admin2", "aspnet", "backup", "console", "david", "guest", "john", - "owner", "root", "server", "sql", "support", "support_388945a0", "sys", - "test2", "test3", "user4", "user5".

    **Minimum-length (Linux):** 1 - character

    **Max-length (Linux):** 64 characters

    - **Max-length (Windows):** 20 characters

  • For root access to - the Linux VM, see [Using root privileges on Linux virtual machines in - Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-use-root-privileges?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json)
  • - For a list of built-in system users on Linux that should not be used in - this field, see [Selecting User Names for Linux on - Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-usernames?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json) - :type admin_username: str - :param admin_password: Specifies the password of the administrator - account.

    **Minimum-length (Windows):** 8 characters

    - **Minimum-length (Linux):** 6 characters

    **Max-length - (Windows):** 123 characters

    **Max-length (Linux):** 72 characters -

    **Complexity requirements:** 3 out of 4 conditions below need to - be fulfilled
    Has lower characters
    Has upper characters
    Has a - digit
    Has a special character (Regex match [\\W_])

    - **Disallowed values:** "abc@123", "P@$$w0rd", "P@ssw0rd", "P@ssword123", - "Pa$$word", "pass@word1", "Password!", "Password1", "Password22", - "iloveyou!"

    For resetting the password, see [How to reset the - Remote Desktop service or its login password in a Windows - VM](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-reset-rdp?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json) -

    For resetting root password, see [Manage users, SSH, and check or - repair disks on Azure Linux VMs using the VMAccess - Extension](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-using-vmaccess-extension?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json#reset-root-password) - :type admin_password: str - :param custom_data: Specifies a base-64 encoded string of custom data. The - base-64 encoded string is decoded to a binary array that is saved as a - file on the Virtual Machine. The maximum length of the binary array is - 65535 bytes.

    For using cloud-init for your VM, see [Using - cloud-init to customize a Linux VM during - creation](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-using-cloud-init?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json) - :type custom_data: str - :param windows_configuration: Specifies Windows operating system settings - on the virtual machine. - :type windows_configuration: - ~azure.mgmt.compute.v2018_06_01.models.WindowsConfiguration - :param linux_configuration: Specifies the Linux operating system settings - on the virtual machine.

    For a list of supported Linux - distributions, see [Linux on Azure-Endorsed - Distributions](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-endorsed-distros?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json) -

    For running non-endorsed distributions, see [Information for - Non-Endorsed - Distributions](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-create-upload-generic?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json). - :type linux_configuration: - ~azure.mgmt.compute.v2018_06_01.models.LinuxConfiguration - :param secrets: Specifies set of certificates that should be installed - onto the virtual machines in the scale set. - :type secrets: - list[~azure.mgmt.compute.v2018_06_01.models.VaultSecretGroup] - """ - - _attribute_map = { - 'computer_name_prefix': {'key': 'computerNamePrefix', 'type': 'str'}, - 'admin_username': {'key': 'adminUsername', 'type': 'str'}, - 'admin_password': {'key': 'adminPassword', 'type': 'str'}, - 'custom_data': {'key': 'customData', 'type': 'str'}, - 'windows_configuration': {'key': 'windowsConfiguration', 'type': 'WindowsConfiguration'}, - 'linux_configuration': {'key': 'linuxConfiguration', 'type': 'LinuxConfiguration'}, - 'secrets': {'key': 'secrets', 'type': '[VaultSecretGroup]'}, - } - - def __init__(self, **kwargs): - super(VirtualMachineScaleSetOSProfile, self).__init__(**kwargs) - self.computer_name_prefix = kwargs.get('computer_name_prefix', None) - self.admin_username = kwargs.get('admin_username', None) - self.admin_password = kwargs.get('admin_password', None) - self.custom_data = kwargs.get('custom_data', None) - self.windows_configuration = kwargs.get('windows_configuration', None) - self.linux_configuration = kwargs.get('linux_configuration', None) - self.secrets = kwargs.get('secrets', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/virtual_machine_scale_set_os_profile_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/virtual_machine_scale_set_os_profile_py3.py deleted file mode 100644 index 7825dc5cca51..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/virtual_machine_scale_set_os_profile_py3.py +++ /dev/null @@ -1,97 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineScaleSetOSProfile(Model): - """Describes a virtual machine scale set OS profile. - - :param computer_name_prefix: Specifies the computer name prefix for all of - the virtual machines in the scale set. Computer name prefixes must be 1 to - 15 characters long. - :type computer_name_prefix: str - :param admin_username: Specifies the name of the administrator account. -

    **Windows-only restriction:** Cannot end in "."

    - **Disallowed values:** "administrator", "admin", "user", "user1", "test", - "user2", "test1", "user3", "admin1", "1", "123", "a", "actuser", "adm", - "admin2", "aspnet", "backup", "console", "david", "guest", "john", - "owner", "root", "server", "sql", "support", "support_388945a0", "sys", - "test2", "test3", "user4", "user5".

    **Minimum-length (Linux):** 1 - character

    **Max-length (Linux):** 64 characters

    - **Max-length (Windows):** 20 characters

  • For root access to - the Linux VM, see [Using root privileges on Linux virtual machines in - Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-use-root-privileges?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json)
  • - For a list of built-in system users on Linux that should not be used in - this field, see [Selecting User Names for Linux on - Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-usernames?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json) - :type admin_username: str - :param admin_password: Specifies the password of the administrator - account.

    **Minimum-length (Windows):** 8 characters

    - **Minimum-length (Linux):** 6 characters

    **Max-length - (Windows):** 123 characters

    **Max-length (Linux):** 72 characters -

    **Complexity requirements:** 3 out of 4 conditions below need to - be fulfilled
    Has lower characters
    Has upper characters
    Has a - digit
    Has a special character (Regex match [\\W_])

    - **Disallowed values:** "abc@123", "P@$$w0rd", "P@ssw0rd", "P@ssword123", - "Pa$$word", "pass@word1", "Password!", "Password1", "Password22", - "iloveyou!"

    For resetting the password, see [How to reset the - Remote Desktop service or its login password in a Windows - VM](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-reset-rdp?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json) -

    For resetting root password, see [Manage users, SSH, and check or - repair disks on Azure Linux VMs using the VMAccess - Extension](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-using-vmaccess-extension?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json#reset-root-password) - :type admin_password: str - :param custom_data: Specifies a base-64 encoded string of custom data. The - base-64 encoded string is decoded to a binary array that is saved as a - file on the Virtual Machine. The maximum length of the binary array is - 65535 bytes.

    For using cloud-init for your VM, see [Using - cloud-init to customize a Linux VM during - creation](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-using-cloud-init?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json) - :type custom_data: str - :param windows_configuration: Specifies Windows operating system settings - on the virtual machine. - :type windows_configuration: - ~azure.mgmt.compute.v2018_06_01.models.WindowsConfiguration - :param linux_configuration: Specifies the Linux operating system settings - on the virtual machine.

    For a list of supported Linux - distributions, see [Linux on Azure-Endorsed - Distributions](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-endorsed-distros?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json) -

    For running non-endorsed distributions, see [Information for - Non-Endorsed - Distributions](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-create-upload-generic?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json). - :type linux_configuration: - ~azure.mgmt.compute.v2018_06_01.models.LinuxConfiguration - :param secrets: Specifies set of certificates that should be installed - onto the virtual machines in the scale set. - :type secrets: - list[~azure.mgmt.compute.v2018_06_01.models.VaultSecretGroup] - """ - - _attribute_map = { - 'computer_name_prefix': {'key': 'computerNamePrefix', 'type': 'str'}, - 'admin_username': {'key': 'adminUsername', 'type': 'str'}, - 'admin_password': {'key': 'adminPassword', 'type': 'str'}, - 'custom_data': {'key': 'customData', 'type': 'str'}, - 'windows_configuration': {'key': 'windowsConfiguration', 'type': 'WindowsConfiguration'}, - 'linux_configuration': {'key': 'linuxConfiguration', 'type': 'LinuxConfiguration'}, - 'secrets': {'key': 'secrets', 'type': '[VaultSecretGroup]'}, - } - - def __init__(self, *, computer_name_prefix: str=None, admin_username: str=None, admin_password: str=None, custom_data: str=None, windows_configuration=None, linux_configuration=None, secrets=None, **kwargs) -> None: - super(VirtualMachineScaleSetOSProfile, self).__init__(**kwargs) - self.computer_name_prefix = computer_name_prefix - self.admin_username = admin_username - self.admin_password = admin_password - self.custom_data = custom_data - self.windows_configuration = windows_configuration - self.linux_configuration = linux_configuration - self.secrets = secrets diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/virtual_machine_scale_set_paged.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/virtual_machine_scale_set_paged.py deleted file mode 100644 index 78f7ff3168ab..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/virtual_machine_scale_set_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class VirtualMachineScaleSetPaged(Paged): - """ - A paging container for iterating over a list of :class:`VirtualMachineScaleSet ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[VirtualMachineScaleSet]'} - } - - def __init__(self, *args, **kwargs): - - super(VirtualMachineScaleSetPaged, self).__init__(*args, **kwargs) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/virtual_machine_scale_set_public_ip_address_configuration.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/virtual_machine_scale_set_public_ip_address_configuration.py deleted file mode 100644 index ca667579db68..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/virtual_machine_scale_set_public_ip_address_configuration.py +++ /dev/null @@ -1,55 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineScaleSetPublicIPAddressConfiguration(Model): - """Describes a virtual machines scale set IP Configuration's PublicIPAddress - configuration. - - All required parameters must be populated in order to send to Azure. - - :param name: Required. The publicIP address configuration name. - :type name: str - :param idle_timeout_in_minutes: The idle timeout of the public IP address. - :type idle_timeout_in_minutes: int - :param dns_settings: The dns settings to be applied on the publicIP - addresses . - :type dns_settings: - ~azure.mgmt.compute.v2018_06_01.models.VirtualMachineScaleSetPublicIPAddressConfigurationDnsSettings - :param ip_tags: The list of IP tags associated with the public IP address. - :type ip_tags: - list[~azure.mgmt.compute.v2018_06_01.models.VirtualMachineScaleSetIpTag] - :param public_ip_prefix: The PublicIPPrefix from which to allocate - publicIP addresses. - :type public_ip_prefix: ~azure.mgmt.compute.v2018_06_01.models.SubResource - """ - - _validation = { - 'name': {'required': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'idle_timeout_in_minutes': {'key': 'properties.idleTimeoutInMinutes', 'type': 'int'}, - 'dns_settings': {'key': 'properties.dnsSettings', 'type': 'VirtualMachineScaleSetPublicIPAddressConfigurationDnsSettings'}, - 'ip_tags': {'key': 'properties.ipTags', 'type': '[VirtualMachineScaleSetIpTag]'}, - 'public_ip_prefix': {'key': 'properties.publicIPPrefix', 'type': 'SubResource'}, - } - - def __init__(self, **kwargs): - super(VirtualMachineScaleSetPublicIPAddressConfiguration, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.idle_timeout_in_minutes = kwargs.get('idle_timeout_in_minutes', None) - self.dns_settings = kwargs.get('dns_settings', None) - self.ip_tags = kwargs.get('ip_tags', None) - self.public_ip_prefix = kwargs.get('public_ip_prefix', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/virtual_machine_scale_set_public_ip_address_configuration_dns_settings.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/virtual_machine_scale_set_public_ip_address_configuration_dns_settings.py deleted file mode 100644 index 2fe562244372..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/virtual_machine_scale_set_public_ip_address_configuration_dns_settings.py +++ /dev/null @@ -1,37 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineScaleSetPublicIPAddressConfigurationDnsSettings(Model): - """Describes a virtual machines scale sets network configuration's DNS - settings. - - All required parameters must be populated in order to send to Azure. - - :param domain_name_label: Required. The Domain name label.The - concatenation of the domain name label and vm index will be the domain - name labels of the PublicIPAddress resources that will be created - :type domain_name_label: str - """ - - _validation = { - 'domain_name_label': {'required': True}, - } - - _attribute_map = { - 'domain_name_label': {'key': 'domainNameLabel', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(VirtualMachineScaleSetPublicIPAddressConfigurationDnsSettings, self).__init__(**kwargs) - self.domain_name_label = kwargs.get('domain_name_label', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/virtual_machine_scale_set_public_ip_address_configuration_dns_settings_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/virtual_machine_scale_set_public_ip_address_configuration_dns_settings_py3.py deleted file mode 100644 index 326a36708ff4..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/virtual_machine_scale_set_public_ip_address_configuration_dns_settings_py3.py +++ /dev/null @@ -1,37 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineScaleSetPublicIPAddressConfigurationDnsSettings(Model): - """Describes a virtual machines scale sets network configuration's DNS - settings. - - All required parameters must be populated in order to send to Azure. - - :param domain_name_label: Required. The Domain name label.The - concatenation of the domain name label and vm index will be the domain - name labels of the PublicIPAddress resources that will be created - :type domain_name_label: str - """ - - _validation = { - 'domain_name_label': {'required': True}, - } - - _attribute_map = { - 'domain_name_label': {'key': 'domainNameLabel', 'type': 'str'}, - } - - def __init__(self, *, domain_name_label: str, **kwargs) -> None: - super(VirtualMachineScaleSetPublicIPAddressConfigurationDnsSettings, self).__init__(**kwargs) - self.domain_name_label = domain_name_label diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/virtual_machine_scale_set_public_ip_address_configuration_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/virtual_machine_scale_set_public_ip_address_configuration_py3.py deleted file mode 100644 index 3d6ba42bf5f6..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/virtual_machine_scale_set_public_ip_address_configuration_py3.py +++ /dev/null @@ -1,55 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineScaleSetPublicIPAddressConfiguration(Model): - """Describes a virtual machines scale set IP Configuration's PublicIPAddress - configuration. - - All required parameters must be populated in order to send to Azure. - - :param name: Required. The publicIP address configuration name. - :type name: str - :param idle_timeout_in_minutes: The idle timeout of the public IP address. - :type idle_timeout_in_minutes: int - :param dns_settings: The dns settings to be applied on the publicIP - addresses . - :type dns_settings: - ~azure.mgmt.compute.v2018_06_01.models.VirtualMachineScaleSetPublicIPAddressConfigurationDnsSettings - :param ip_tags: The list of IP tags associated with the public IP address. - :type ip_tags: - list[~azure.mgmt.compute.v2018_06_01.models.VirtualMachineScaleSetIpTag] - :param public_ip_prefix: The PublicIPPrefix from which to allocate - publicIP addresses. - :type public_ip_prefix: ~azure.mgmt.compute.v2018_06_01.models.SubResource - """ - - _validation = { - 'name': {'required': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'idle_timeout_in_minutes': {'key': 'properties.idleTimeoutInMinutes', 'type': 'int'}, - 'dns_settings': {'key': 'properties.dnsSettings', 'type': 'VirtualMachineScaleSetPublicIPAddressConfigurationDnsSettings'}, - 'ip_tags': {'key': 'properties.ipTags', 'type': '[VirtualMachineScaleSetIpTag]'}, - 'public_ip_prefix': {'key': 'properties.publicIPPrefix', 'type': 'SubResource'}, - } - - def __init__(self, *, name: str, idle_timeout_in_minutes: int=None, dns_settings=None, ip_tags=None, public_ip_prefix=None, **kwargs) -> None: - super(VirtualMachineScaleSetPublicIPAddressConfiguration, self).__init__(**kwargs) - self.name = name - self.idle_timeout_in_minutes = idle_timeout_in_minutes - self.dns_settings = dns_settings - self.ip_tags = ip_tags - self.public_ip_prefix = public_ip_prefix diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/virtual_machine_scale_set_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/virtual_machine_scale_set_py3.py deleted file mode 100644 index e2a9927dc2b7..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/virtual_machine_scale_set_py3.py +++ /dev/null @@ -1,123 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource_py3 import Resource - - -class VirtualMachineScaleSet(Resource): - """Describes a Virtual Machine Scale Set. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource Id - :vartype id: str - :ivar name: Resource name - :vartype name: str - :ivar type: Resource type - :vartype type: str - :param location: Required. Resource location - :type location: str - :param tags: Resource tags - :type tags: dict[str, str] - :param sku: The virtual machine scale set sku. - :type sku: ~azure.mgmt.compute.v2018_06_01.models.Sku - :param plan: Specifies information about the marketplace image used to - create the virtual machine. This element is only used for marketplace - images. Before you can use a marketplace image from an API, you must - enable the image for programmatic use. In the Azure portal, find the - marketplace image that you want to use and then click **Want to deploy - programmatically, Get Started ->**. Enter any required information and - then click **Save**. - :type plan: ~azure.mgmt.compute.v2018_06_01.models.Plan - :param upgrade_policy: The upgrade policy. - :type upgrade_policy: ~azure.mgmt.compute.v2018_06_01.models.UpgradePolicy - :param virtual_machine_profile: The virtual machine profile. - :type virtual_machine_profile: - ~azure.mgmt.compute.v2018_06_01.models.VirtualMachineScaleSetVMProfile - :ivar provisioning_state: The provisioning state, which only appears in - the response. - :vartype provisioning_state: str - :param overprovision: Specifies whether the Virtual Machine Scale Set - should be overprovisioned. - :type overprovision: bool - :ivar unique_id: Specifies the ID which uniquely identifies a Virtual - Machine Scale Set. - :vartype unique_id: str - :param single_placement_group: When true this limits the scale set to a - single placement group, of max size 100 virtual machines. - :type single_placement_group: bool - :param zone_balance: Whether to force strictly even Virtual Machine - distribution cross x-zones in case there is zone outage. - :type zone_balance: bool - :param platform_fault_domain_count: Fault Domain count for each placement - group. - :type platform_fault_domain_count: int - :param proximity_placement_group: Specifies information about the - proximity placement group that the virtual machine scale set should be - assigned to.

    Minimum api-version: 2018-04-01. - :type proximity_placement_group: - ~azure.mgmt.compute.v2018_06_01.models.SubResource - :param identity: The identity of the virtual machine scale set, if - configured. - :type identity: - ~azure.mgmt.compute.v2018_06_01.models.VirtualMachineScaleSetIdentity - :param zones: The virtual machine scale set zones. - :type zones: list[str] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - 'provisioning_state': {'readonly': True}, - 'unique_id': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'sku': {'key': 'sku', 'type': 'Sku'}, - 'plan': {'key': 'plan', 'type': 'Plan'}, - 'upgrade_policy': {'key': 'properties.upgradePolicy', 'type': 'UpgradePolicy'}, - 'virtual_machine_profile': {'key': 'properties.virtualMachineProfile', 'type': 'VirtualMachineScaleSetVMProfile'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'overprovision': {'key': 'properties.overprovision', 'type': 'bool'}, - 'unique_id': {'key': 'properties.uniqueId', 'type': 'str'}, - 'single_placement_group': {'key': 'properties.singlePlacementGroup', 'type': 'bool'}, - 'zone_balance': {'key': 'properties.zoneBalance', 'type': 'bool'}, - 'platform_fault_domain_count': {'key': 'properties.platformFaultDomainCount', 'type': 'int'}, - 'proximity_placement_group': {'key': 'properties.proximityPlacementGroup', 'type': 'SubResource'}, - 'identity': {'key': 'identity', 'type': 'VirtualMachineScaleSetIdentity'}, - 'zones': {'key': 'zones', 'type': '[str]'}, - } - - def __init__(self, *, location: str, tags=None, sku=None, plan=None, upgrade_policy=None, virtual_machine_profile=None, overprovision: bool=None, single_placement_group: bool=None, zone_balance: bool=None, platform_fault_domain_count: int=None, proximity_placement_group=None, identity=None, zones=None, **kwargs) -> None: - super(VirtualMachineScaleSet, self).__init__(location=location, tags=tags, **kwargs) - self.sku = sku - self.plan = plan - self.upgrade_policy = upgrade_policy - self.virtual_machine_profile = virtual_machine_profile - self.provisioning_state = None - self.overprovision = overprovision - self.unique_id = None - self.single_placement_group = single_placement_group - self.zone_balance = zone_balance - self.platform_fault_domain_count = platform_fault_domain_count - self.proximity_placement_group = proximity_placement_group - self.identity = identity - self.zones = zones diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/virtual_machine_scale_set_reimage_parameters.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/virtual_machine_scale_set_reimage_parameters.py deleted file mode 100644 index d1c583c6ca1b..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/virtual_machine_scale_set_reimage_parameters.py +++ /dev/null @@ -1,34 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .virtual_machine_scale_set_vm_reimage_parameters import VirtualMachineScaleSetVMReimageParameters - - -class VirtualMachineScaleSetReimageParameters(VirtualMachineScaleSetVMReimageParameters): - """Describes a Virtual Machine Scale Set VM Reimage Parameters. - - :param temp_disk: Specifies whether to reimage temp disk. Default value: - false. - :type temp_disk: bool - :param instance_ids: The virtual machine scale set instance ids. Omitting - the virtual machine scale set instance ids will result in the operation - being performed on all virtual machines in the virtual machine scale set. - :type instance_ids: list[str] - """ - - _attribute_map = { - 'temp_disk': {'key': 'tempDisk', 'type': 'bool'}, - 'instance_ids': {'key': 'instanceIds', 'type': '[str]'}, - } - - def __init__(self, **kwargs): - super(VirtualMachineScaleSetReimageParameters, self).__init__(**kwargs) - self.instance_ids = kwargs.get('instance_ids', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/virtual_machine_scale_set_reimage_parameters_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/virtual_machine_scale_set_reimage_parameters_py3.py deleted file mode 100644 index 0c3b6962d17e..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/virtual_machine_scale_set_reimage_parameters_py3.py +++ /dev/null @@ -1,34 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .virtual_machine_scale_set_vm_reimage_parameters_py3 import VirtualMachineScaleSetVMReimageParameters - - -class VirtualMachineScaleSetReimageParameters(VirtualMachineScaleSetVMReimageParameters): - """Describes a Virtual Machine Scale Set VM Reimage Parameters. - - :param temp_disk: Specifies whether to reimage temp disk. Default value: - false. - :type temp_disk: bool - :param instance_ids: The virtual machine scale set instance ids. Omitting - the virtual machine scale set instance ids will result in the operation - being performed on all virtual machines in the virtual machine scale set. - :type instance_ids: list[str] - """ - - _attribute_map = { - 'temp_disk': {'key': 'tempDisk', 'type': 'bool'}, - 'instance_ids': {'key': 'instanceIds', 'type': '[str]'}, - } - - def __init__(self, *, temp_disk: bool=None, instance_ids=None, **kwargs) -> None: - super(VirtualMachineScaleSetReimageParameters, self).__init__(temp_disk=temp_disk, **kwargs) - self.instance_ids = instance_ids diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/virtual_machine_scale_set_sku.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/virtual_machine_scale_set_sku.py deleted file mode 100644 index 618b9998cc99..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/virtual_machine_scale_set_sku.py +++ /dev/null @@ -1,46 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineScaleSetSku(Model): - """Describes an available virtual machine scale set sku. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar resource_type: The type of resource the sku applies to. - :vartype resource_type: str - :ivar sku: The Sku. - :vartype sku: ~azure.mgmt.compute.v2018_06_01.models.Sku - :ivar capacity: Specifies the number of virtual machines in the scale set. - :vartype capacity: - ~azure.mgmt.compute.v2018_06_01.models.VirtualMachineScaleSetSkuCapacity - """ - - _validation = { - 'resource_type': {'readonly': True}, - 'sku': {'readonly': True}, - 'capacity': {'readonly': True}, - } - - _attribute_map = { - 'resource_type': {'key': 'resourceType', 'type': 'str'}, - 'sku': {'key': 'sku', 'type': 'Sku'}, - 'capacity': {'key': 'capacity', 'type': 'VirtualMachineScaleSetSkuCapacity'}, - } - - def __init__(self, **kwargs): - super(VirtualMachineScaleSetSku, self).__init__(**kwargs) - self.resource_type = None - self.sku = None - self.capacity = None diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/virtual_machine_scale_set_sku_capacity.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/virtual_machine_scale_set_sku_capacity.py deleted file mode 100644 index 5d2a2630997e..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/virtual_machine_scale_set_sku_capacity.py +++ /dev/null @@ -1,52 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineScaleSetSkuCapacity(Model): - """Describes scaling information of a sku. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar minimum: The minimum capacity. - :vartype minimum: long - :ivar maximum: The maximum capacity that can be set. - :vartype maximum: long - :ivar default_capacity: The default capacity. - :vartype default_capacity: long - :ivar scale_type: The scale type applicable to the sku. Possible values - include: 'Automatic', 'None' - :vartype scale_type: str or - ~azure.mgmt.compute.v2018_06_01.models.VirtualMachineScaleSetSkuScaleType - """ - - _validation = { - 'minimum': {'readonly': True}, - 'maximum': {'readonly': True}, - 'default_capacity': {'readonly': True}, - 'scale_type': {'readonly': True}, - } - - _attribute_map = { - 'minimum': {'key': 'minimum', 'type': 'long'}, - 'maximum': {'key': 'maximum', 'type': 'long'}, - 'default_capacity': {'key': 'defaultCapacity', 'type': 'long'}, - 'scale_type': {'key': 'scaleType', 'type': 'VirtualMachineScaleSetSkuScaleType'}, - } - - def __init__(self, **kwargs): - super(VirtualMachineScaleSetSkuCapacity, self).__init__(**kwargs) - self.minimum = None - self.maximum = None - self.default_capacity = None - self.scale_type = None diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/virtual_machine_scale_set_sku_capacity_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/virtual_machine_scale_set_sku_capacity_py3.py deleted file mode 100644 index e7fd9b370581..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/virtual_machine_scale_set_sku_capacity_py3.py +++ /dev/null @@ -1,52 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineScaleSetSkuCapacity(Model): - """Describes scaling information of a sku. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar minimum: The minimum capacity. - :vartype minimum: long - :ivar maximum: The maximum capacity that can be set. - :vartype maximum: long - :ivar default_capacity: The default capacity. - :vartype default_capacity: long - :ivar scale_type: The scale type applicable to the sku. Possible values - include: 'Automatic', 'None' - :vartype scale_type: str or - ~azure.mgmt.compute.v2018_06_01.models.VirtualMachineScaleSetSkuScaleType - """ - - _validation = { - 'minimum': {'readonly': True}, - 'maximum': {'readonly': True}, - 'default_capacity': {'readonly': True}, - 'scale_type': {'readonly': True}, - } - - _attribute_map = { - 'minimum': {'key': 'minimum', 'type': 'long'}, - 'maximum': {'key': 'maximum', 'type': 'long'}, - 'default_capacity': {'key': 'defaultCapacity', 'type': 'long'}, - 'scale_type': {'key': 'scaleType', 'type': 'VirtualMachineScaleSetSkuScaleType'}, - } - - def __init__(self, **kwargs) -> None: - super(VirtualMachineScaleSetSkuCapacity, self).__init__(**kwargs) - self.minimum = None - self.maximum = None - self.default_capacity = None - self.scale_type = None diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/virtual_machine_scale_set_sku_paged.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/virtual_machine_scale_set_sku_paged.py deleted file mode 100644 index 37dc0505a05d..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/virtual_machine_scale_set_sku_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class VirtualMachineScaleSetSkuPaged(Paged): - """ - A paging container for iterating over a list of :class:`VirtualMachineScaleSetSku ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[VirtualMachineScaleSetSku]'} - } - - def __init__(self, *args, **kwargs): - - super(VirtualMachineScaleSetSkuPaged, self).__init__(*args, **kwargs) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/virtual_machine_scale_set_sku_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/virtual_machine_scale_set_sku_py3.py deleted file mode 100644 index b36efbcca3ca..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/virtual_machine_scale_set_sku_py3.py +++ /dev/null @@ -1,46 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineScaleSetSku(Model): - """Describes an available virtual machine scale set sku. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar resource_type: The type of resource the sku applies to. - :vartype resource_type: str - :ivar sku: The Sku. - :vartype sku: ~azure.mgmt.compute.v2018_06_01.models.Sku - :ivar capacity: Specifies the number of virtual machines in the scale set. - :vartype capacity: - ~azure.mgmt.compute.v2018_06_01.models.VirtualMachineScaleSetSkuCapacity - """ - - _validation = { - 'resource_type': {'readonly': True}, - 'sku': {'readonly': True}, - 'capacity': {'readonly': True}, - } - - _attribute_map = { - 'resource_type': {'key': 'resourceType', 'type': 'str'}, - 'sku': {'key': 'sku', 'type': 'Sku'}, - 'capacity': {'key': 'capacity', 'type': 'VirtualMachineScaleSetSkuCapacity'}, - } - - def __init__(self, **kwargs) -> None: - super(VirtualMachineScaleSetSku, self).__init__(**kwargs) - self.resource_type = None - self.sku = None - self.capacity = None diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/virtual_machine_scale_set_storage_profile.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/virtual_machine_scale_set_storage_profile.py deleted file mode 100644 index b26bcc3a7d98..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/virtual_machine_scale_set_storage_profile.py +++ /dev/null @@ -1,49 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineScaleSetStorageProfile(Model): - """Describes a virtual machine scale set storage profile. - - :param image_reference: Specifies information about the image to use. You - can specify information about platform images, marketplace images, or - virtual machine images. This element is required when you want to use a - platform image, marketplace image, or virtual machine image, but is not - used in other creation operations. - :type image_reference: - ~azure.mgmt.compute.v2018_06_01.models.ImageReference - :param os_disk: Specifies information about the operating system disk used - by the virtual machines in the scale set.

    For more information - about disks, see [About disks and VHDs for Azure virtual - machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-about-disks-vhds?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). - :type os_disk: - ~azure.mgmt.compute.v2018_06_01.models.VirtualMachineScaleSetOSDisk - :param data_disks: Specifies the parameters that are used to add data - disks to the virtual machines in the scale set.

    For more - information about disks, see [About disks and VHDs for Azure virtual - machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-about-disks-vhds?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). - :type data_disks: - list[~azure.mgmt.compute.v2018_06_01.models.VirtualMachineScaleSetDataDisk] - """ - - _attribute_map = { - 'image_reference': {'key': 'imageReference', 'type': 'ImageReference'}, - 'os_disk': {'key': 'osDisk', 'type': 'VirtualMachineScaleSetOSDisk'}, - 'data_disks': {'key': 'dataDisks', 'type': '[VirtualMachineScaleSetDataDisk]'}, - } - - def __init__(self, **kwargs): - super(VirtualMachineScaleSetStorageProfile, self).__init__(**kwargs) - self.image_reference = kwargs.get('image_reference', None) - self.os_disk = kwargs.get('os_disk', None) - self.data_disks = kwargs.get('data_disks', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/virtual_machine_scale_set_storage_profile_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/virtual_machine_scale_set_storage_profile_py3.py deleted file mode 100644 index dbaede50817d..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/virtual_machine_scale_set_storage_profile_py3.py +++ /dev/null @@ -1,49 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineScaleSetStorageProfile(Model): - """Describes a virtual machine scale set storage profile. - - :param image_reference: Specifies information about the image to use. You - can specify information about platform images, marketplace images, or - virtual machine images. This element is required when you want to use a - platform image, marketplace image, or virtual machine image, but is not - used in other creation operations. - :type image_reference: - ~azure.mgmt.compute.v2018_06_01.models.ImageReference - :param os_disk: Specifies information about the operating system disk used - by the virtual machines in the scale set.

    For more information - about disks, see [About disks and VHDs for Azure virtual - machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-about-disks-vhds?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). - :type os_disk: - ~azure.mgmt.compute.v2018_06_01.models.VirtualMachineScaleSetOSDisk - :param data_disks: Specifies the parameters that are used to add data - disks to the virtual machines in the scale set.

    For more - information about disks, see [About disks and VHDs for Azure virtual - machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-about-disks-vhds?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). - :type data_disks: - list[~azure.mgmt.compute.v2018_06_01.models.VirtualMachineScaleSetDataDisk] - """ - - _attribute_map = { - 'image_reference': {'key': 'imageReference', 'type': 'ImageReference'}, - 'os_disk': {'key': 'osDisk', 'type': 'VirtualMachineScaleSetOSDisk'}, - 'data_disks': {'key': 'dataDisks', 'type': '[VirtualMachineScaleSetDataDisk]'}, - } - - def __init__(self, *, image_reference=None, os_disk=None, data_disks=None, **kwargs) -> None: - super(VirtualMachineScaleSetStorageProfile, self).__init__(**kwargs) - self.image_reference = image_reference - self.os_disk = os_disk - self.data_disks = data_disks diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/virtual_machine_scale_set_update.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/virtual_machine_scale_set_update.py deleted file mode 100644 index 41f4dc1df753..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/virtual_machine_scale_set_update.py +++ /dev/null @@ -1,61 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .update_resource import UpdateResource - - -class VirtualMachineScaleSetUpdate(UpdateResource): - """Describes a Virtual Machine Scale Set. - - :param tags: Resource tags - :type tags: dict[str, str] - :param sku: The virtual machine scale set sku. - :type sku: ~azure.mgmt.compute.v2018_06_01.models.Sku - :param plan: The purchase plan when deploying a virtual machine scale set - from VM Marketplace images. - :type plan: ~azure.mgmt.compute.v2018_06_01.models.Plan - :param upgrade_policy: The upgrade policy. - :type upgrade_policy: ~azure.mgmt.compute.v2018_06_01.models.UpgradePolicy - :param virtual_machine_profile: The virtual machine profile. - :type virtual_machine_profile: - ~azure.mgmt.compute.v2018_06_01.models.VirtualMachineScaleSetUpdateVMProfile - :param overprovision: Specifies whether the Virtual Machine Scale Set - should be overprovisioned. - :type overprovision: bool - :param single_placement_group: When true this limits the scale set to a - single placement group, of max size 100 virtual machines. - :type single_placement_group: bool - :param identity: The identity of the virtual machine scale set, if - configured. - :type identity: - ~azure.mgmt.compute.v2018_06_01.models.VirtualMachineScaleSetIdentity - """ - - _attribute_map = { - 'tags': {'key': 'tags', 'type': '{str}'}, - 'sku': {'key': 'sku', 'type': 'Sku'}, - 'plan': {'key': 'plan', 'type': 'Plan'}, - 'upgrade_policy': {'key': 'properties.upgradePolicy', 'type': 'UpgradePolicy'}, - 'virtual_machine_profile': {'key': 'properties.virtualMachineProfile', 'type': 'VirtualMachineScaleSetUpdateVMProfile'}, - 'overprovision': {'key': 'properties.overprovision', 'type': 'bool'}, - 'single_placement_group': {'key': 'properties.singlePlacementGroup', 'type': 'bool'}, - 'identity': {'key': 'identity', 'type': 'VirtualMachineScaleSetIdentity'}, - } - - def __init__(self, **kwargs): - super(VirtualMachineScaleSetUpdate, self).__init__(**kwargs) - self.sku = kwargs.get('sku', None) - self.plan = kwargs.get('plan', None) - self.upgrade_policy = kwargs.get('upgrade_policy', None) - self.virtual_machine_profile = kwargs.get('virtual_machine_profile', None) - self.overprovision = kwargs.get('overprovision', None) - self.single_placement_group = kwargs.get('single_placement_group', None) - self.identity = kwargs.get('identity', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/virtual_machine_scale_set_update_ip_configuration.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/virtual_machine_scale_set_update_ip_configuration.py deleted file mode 100644 index 231785638f0f..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/virtual_machine_scale_set_update_ip_configuration.py +++ /dev/null @@ -1,77 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .sub_resource import SubResource - - -class VirtualMachineScaleSetUpdateIPConfiguration(SubResource): - """Describes a virtual machine scale set network profile's IP configuration. - - :param id: Resource Id - :type id: str - :param name: The IP configuration name. - :type name: str - :param subnet: The subnet. - :type subnet: ~azure.mgmt.compute.v2018_06_01.models.ApiEntityReference - :param primary: Specifies the primary IP Configuration in case the network - interface has more than one IP Configuration. - :type primary: bool - :param public_ip_address_configuration: The publicIPAddressConfiguration. - :type public_ip_address_configuration: - ~azure.mgmt.compute.v2018_06_01.models.VirtualMachineScaleSetUpdatePublicIPAddressConfiguration - :param private_ip_address_version: Available from Api-Version 2017-03-30 - onwards, it represents whether the specific ipconfiguration is IPv4 or - IPv6. Default is taken as IPv4. Possible values are: 'IPv4' and 'IPv6'. - Possible values include: 'IPv4', 'IPv6' - :type private_ip_address_version: str or - ~azure.mgmt.compute.v2018_06_01.models.IPVersion - :param application_gateway_backend_address_pools: The application gateway - backend address pools. - :type application_gateway_backend_address_pools: - list[~azure.mgmt.compute.v2018_06_01.models.SubResource] - :param application_security_groups: Specifies an array of references to - application security group. - :type application_security_groups: - list[~azure.mgmt.compute.v2018_06_01.models.SubResource] - :param load_balancer_backend_address_pools: The load balancer backend - address pools. - :type load_balancer_backend_address_pools: - list[~azure.mgmt.compute.v2018_06_01.models.SubResource] - :param load_balancer_inbound_nat_pools: The load balancer inbound nat - pools. - :type load_balancer_inbound_nat_pools: - list[~azure.mgmt.compute.v2018_06_01.models.SubResource] - """ - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'subnet': {'key': 'properties.subnet', 'type': 'ApiEntityReference'}, - 'primary': {'key': 'properties.primary', 'type': 'bool'}, - 'public_ip_address_configuration': {'key': 'properties.publicIPAddressConfiguration', 'type': 'VirtualMachineScaleSetUpdatePublicIPAddressConfiguration'}, - 'private_ip_address_version': {'key': 'properties.privateIPAddressVersion', 'type': 'str'}, - 'application_gateway_backend_address_pools': {'key': 'properties.applicationGatewayBackendAddressPools', 'type': '[SubResource]'}, - 'application_security_groups': {'key': 'properties.applicationSecurityGroups', 'type': '[SubResource]'}, - 'load_balancer_backend_address_pools': {'key': 'properties.loadBalancerBackendAddressPools', 'type': '[SubResource]'}, - 'load_balancer_inbound_nat_pools': {'key': 'properties.loadBalancerInboundNatPools', 'type': '[SubResource]'}, - } - - def __init__(self, **kwargs): - super(VirtualMachineScaleSetUpdateIPConfiguration, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.subnet = kwargs.get('subnet', None) - self.primary = kwargs.get('primary', None) - self.public_ip_address_configuration = kwargs.get('public_ip_address_configuration', None) - self.private_ip_address_version = kwargs.get('private_ip_address_version', None) - self.application_gateway_backend_address_pools = kwargs.get('application_gateway_backend_address_pools', None) - self.application_security_groups = kwargs.get('application_security_groups', None) - self.load_balancer_backend_address_pools = kwargs.get('load_balancer_backend_address_pools', None) - self.load_balancer_inbound_nat_pools = kwargs.get('load_balancer_inbound_nat_pools', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/virtual_machine_scale_set_update_ip_configuration_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/virtual_machine_scale_set_update_ip_configuration_py3.py deleted file mode 100644 index 69d9b652cca1..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/virtual_machine_scale_set_update_ip_configuration_py3.py +++ /dev/null @@ -1,77 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .sub_resource_py3 import SubResource - - -class VirtualMachineScaleSetUpdateIPConfiguration(SubResource): - """Describes a virtual machine scale set network profile's IP configuration. - - :param id: Resource Id - :type id: str - :param name: The IP configuration name. - :type name: str - :param subnet: The subnet. - :type subnet: ~azure.mgmt.compute.v2018_06_01.models.ApiEntityReference - :param primary: Specifies the primary IP Configuration in case the network - interface has more than one IP Configuration. - :type primary: bool - :param public_ip_address_configuration: The publicIPAddressConfiguration. - :type public_ip_address_configuration: - ~azure.mgmt.compute.v2018_06_01.models.VirtualMachineScaleSetUpdatePublicIPAddressConfiguration - :param private_ip_address_version: Available from Api-Version 2017-03-30 - onwards, it represents whether the specific ipconfiguration is IPv4 or - IPv6. Default is taken as IPv4. Possible values are: 'IPv4' and 'IPv6'. - Possible values include: 'IPv4', 'IPv6' - :type private_ip_address_version: str or - ~azure.mgmt.compute.v2018_06_01.models.IPVersion - :param application_gateway_backend_address_pools: The application gateway - backend address pools. - :type application_gateway_backend_address_pools: - list[~azure.mgmt.compute.v2018_06_01.models.SubResource] - :param application_security_groups: Specifies an array of references to - application security group. - :type application_security_groups: - list[~azure.mgmt.compute.v2018_06_01.models.SubResource] - :param load_balancer_backend_address_pools: The load balancer backend - address pools. - :type load_balancer_backend_address_pools: - list[~azure.mgmt.compute.v2018_06_01.models.SubResource] - :param load_balancer_inbound_nat_pools: The load balancer inbound nat - pools. - :type load_balancer_inbound_nat_pools: - list[~azure.mgmt.compute.v2018_06_01.models.SubResource] - """ - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'subnet': {'key': 'properties.subnet', 'type': 'ApiEntityReference'}, - 'primary': {'key': 'properties.primary', 'type': 'bool'}, - 'public_ip_address_configuration': {'key': 'properties.publicIPAddressConfiguration', 'type': 'VirtualMachineScaleSetUpdatePublicIPAddressConfiguration'}, - 'private_ip_address_version': {'key': 'properties.privateIPAddressVersion', 'type': 'str'}, - 'application_gateway_backend_address_pools': {'key': 'properties.applicationGatewayBackendAddressPools', 'type': '[SubResource]'}, - 'application_security_groups': {'key': 'properties.applicationSecurityGroups', 'type': '[SubResource]'}, - 'load_balancer_backend_address_pools': {'key': 'properties.loadBalancerBackendAddressPools', 'type': '[SubResource]'}, - 'load_balancer_inbound_nat_pools': {'key': 'properties.loadBalancerInboundNatPools', 'type': '[SubResource]'}, - } - - def __init__(self, *, id: str=None, name: str=None, subnet=None, primary: bool=None, public_ip_address_configuration=None, private_ip_address_version=None, application_gateway_backend_address_pools=None, application_security_groups=None, load_balancer_backend_address_pools=None, load_balancer_inbound_nat_pools=None, **kwargs) -> None: - super(VirtualMachineScaleSetUpdateIPConfiguration, self).__init__(id=id, **kwargs) - self.name = name - self.subnet = subnet - self.primary = primary - self.public_ip_address_configuration = public_ip_address_configuration - self.private_ip_address_version = private_ip_address_version - self.application_gateway_backend_address_pools = application_gateway_backend_address_pools - self.application_security_groups = application_security_groups - self.load_balancer_backend_address_pools = load_balancer_backend_address_pools - self.load_balancer_inbound_nat_pools = load_balancer_inbound_nat_pools diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/virtual_machine_scale_set_update_network_configuration.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/virtual_machine_scale_set_update_network_configuration.py deleted file mode 100644 index 4893646d98c6..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/virtual_machine_scale_set_update_network_configuration.py +++ /dev/null @@ -1,61 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .sub_resource import SubResource - - -class VirtualMachineScaleSetUpdateNetworkConfiguration(SubResource): - """Describes a virtual machine scale set network profile's network - configurations. - - :param id: Resource Id - :type id: str - :param name: The network configuration name. - :type name: str - :param primary: Whether this is a primary NIC on a virtual machine. - :type primary: bool - :param enable_accelerated_networking: Specifies whether the network - interface is accelerated networking-enabled. - :type enable_accelerated_networking: bool - :param network_security_group: The network security group. - :type network_security_group: - ~azure.mgmt.compute.v2018_06_01.models.SubResource - :param dns_settings: The dns settings to be applied on the network - interfaces. - :type dns_settings: - ~azure.mgmt.compute.v2018_06_01.models.VirtualMachineScaleSetNetworkConfigurationDnsSettings - :param ip_configurations: The virtual machine scale set IP Configuration. - :type ip_configurations: - list[~azure.mgmt.compute.v2018_06_01.models.VirtualMachineScaleSetUpdateIPConfiguration] - :param enable_ip_forwarding: Whether IP forwarding enabled on this NIC. - :type enable_ip_forwarding: bool - """ - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'primary': {'key': 'properties.primary', 'type': 'bool'}, - 'enable_accelerated_networking': {'key': 'properties.enableAcceleratedNetworking', 'type': 'bool'}, - 'network_security_group': {'key': 'properties.networkSecurityGroup', 'type': 'SubResource'}, - 'dns_settings': {'key': 'properties.dnsSettings', 'type': 'VirtualMachineScaleSetNetworkConfigurationDnsSettings'}, - 'ip_configurations': {'key': 'properties.ipConfigurations', 'type': '[VirtualMachineScaleSetUpdateIPConfiguration]'}, - 'enable_ip_forwarding': {'key': 'properties.enableIPForwarding', 'type': 'bool'}, - } - - def __init__(self, **kwargs): - super(VirtualMachineScaleSetUpdateNetworkConfiguration, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.primary = kwargs.get('primary', None) - self.enable_accelerated_networking = kwargs.get('enable_accelerated_networking', None) - self.network_security_group = kwargs.get('network_security_group', None) - self.dns_settings = kwargs.get('dns_settings', None) - self.ip_configurations = kwargs.get('ip_configurations', None) - self.enable_ip_forwarding = kwargs.get('enable_ip_forwarding', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/virtual_machine_scale_set_update_network_configuration_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/virtual_machine_scale_set_update_network_configuration_py3.py deleted file mode 100644 index 5d910e8bf206..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/virtual_machine_scale_set_update_network_configuration_py3.py +++ /dev/null @@ -1,61 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .sub_resource_py3 import SubResource - - -class VirtualMachineScaleSetUpdateNetworkConfiguration(SubResource): - """Describes a virtual machine scale set network profile's network - configurations. - - :param id: Resource Id - :type id: str - :param name: The network configuration name. - :type name: str - :param primary: Whether this is a primary NIC on a virtual machine. - :type primary: bool - :param enable_accelerated_networking: Specifies whether the network - interface is accelerated networking-enabled. - :type enable_accelerated_networking: bool - :param network_security_group: The network security group. - :type network_security_group: - ~azure.mgmt.compute.v2018_06_01.models.SubResource - :param dns_settings: The dns settings to be applied on the network - interfaces. - :type dns_settings: - ~azure.mgmt.compute.v2018_06_01.models.VirtualMachineScaleSetNetworkConfigurationDnsSettings - :param ip_configurations: The virtual machine scale set IP Configuration. - :type ip_configurations: - list[~azure.mgmt.compute.v2018_06_01.models.VirtualMachineScaleSetUpdateIPConfiguration] - :param enable_ip_forwarding: Whether IP forwarding enabled on this NIC. - :type enable_ip_forwarding: bool - """ - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'primary': {'key': 'properties.primary', 'type': 'bool'}, - 'enable_accelerated_networking': {'key': 'properties.enableAcceleratedNetworking', 'type': 'bool'}, - 'network_security_group': {'key': 'properties.networkSecurityGroup', 'type': 'SubResource'}, - 'dns_settings': {'key': 'properties.dnsSettings', 'type': 'VirtualMachineScaleSetNetworkConfigurationDnsSettings'}, - 'ip_configurations': {'key': 'properties.ipConfigurations', 'type': '[VirtualMachineScaleSetUpdateIPConfiguration]'}, - 'enable_ip_forwarding': {'key': 'properties.enableIPForwarding', 'type': 'bool'}, - } - - def __init__(self, *, id: str=None, name: str=None, primary: bool=None, enable_accelerated_networking: bool=None, network_security_group=None, dns_settings=None, ip_configurations=None, enable_ip_forwarding: bool=None, **kwargs) -> None: - super(VirtualMachineScaleSetUpdateNetworkConfiguration, self).__init__(id=id, **kwargs) - self.name = name - self.primary = primary - self.enable_accelerated_networking = enable_accelerated_networking - self.network_security_group = network_security_group - self.dns_settings = dns_settings - self.ip_configurations = ip_configurations - self.enable_ip_forwarding = enable_ip_forwarding diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/virtual_machine_scale_set_update_network_profile.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/virtual_machine_scale_set_update_network_profile.py deleted file mode 100644 index 32c65bc418f8..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/virtual_machine_scale_set_update_network_profile.py +++ /dev/null @@ -1,30 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineScaleSetUpdateNetworkProfile(Model): - """Describes a virtual machine scale set network profile. - - :param network_interface_configurations: The list of network - configurations. - :type network_interface_configurations: - list[~azure.mgmt.compute.v2018_06_01.models.VirtualMachineScaleSetUpdateNetworkConfiguration] - """ - - _attribute_map = { - 'network_interface_configurations': {'key': 'networkInterfaceConfigurations', 'type': '[VirtualMachineScaleSetUpdateNetworkConfiguration]'}, - } - - def __init__(self, **kwargs): - super(VirtualMachineScaleSetUpdateNetworkProfile, self).__init__(**kwargs) - self.network_interface_configurations = kwargs.get('network_interface_configurations', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/virtual_machine_scale_set_update_network_profile_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/virtual_machine_scale_set_update_network_profile_py3.py deleted file mode 100644 index de79c3f9051d..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/virtual_machine_scale_set_update_network_profile_py3.py +++ /dev/null @@ -1,30 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineScaleSetUpdateNetworkProfile(Model): - """Describes a virtual machine scale set network profile. - - :param network_interface_configurations: The list of network - configurations. - :type network_interface_configurations: - list[~azure.mgmt.compute.v2018_06_01.models.VirtualMachineScaleSetUpdateNetworkConfiguration] - """ - - _attribute_map = { - 'network_interface_configurations': {'key': 'networkInterfaceConfigurations', 'type': '[VirtualMachineScaleSetUpdateNetworkConfiguration]'}, - } - - def __init__(self, *, network_interface_configurations=None, **kwargs) -> None: - super(VirtualMachineScaleSetUpdateNetworkProfile, self).__init__(**kwargs) - self.network_interface_configurations = network_interface_configurations diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/virtual_machine_scale_set_update_os_disk.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/virtual_machine_scale_set_update_os_disk.py deleted file mode 100644 index 1b2702a1659d..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/virtual_machine_scale_set_update_os_disk.py +++ /dev/null @@ -1,56 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineScaleSetUpdateOSDisk(Model): - """Describes virtual machine scale set operating system disk Update Object. - This should be used for Updating VMSS OS Disk. - - :param caching: The caching type. Possible values include: 'None', - 'ReadOnly', 'ReadWrite' - :type caching: str or ~azure.mgmt.compute.v2018_06_01.models.CachingTypes - :param write_accelerator_enabled: Specifies whether writeAccelerator - should be enabled or disabled on the disk. - :type write_accelerator_enabled: bool - :param disk_size_gb: Specifies the size of the operating system disk in - gigabytes. This element can be used to overwrite the size of the disk in a - virtual machine image.

    This value cannot be larger than 1023 GB - :type disk_size_gb: int - :param image: The Source User Image VirtualHardDisk. This VirtualHardDisk - will be copied before using it to attach to the Virtual Machine. If - SourceImage is provided, the destination VirtualHardDisk should not exist. - :type image: ~azure.mgmt.compute.v2018_06_01.models.VirtualHardDisk - :param vhd_containers: The list of virtual hard disk container uris. - :type vhd_containers: list[str] - :param managed_disk: The managed disk parameters. - :type managed_disk: - ~azure.mgmt.compute.v2018_06_01.models.VirtualMachineScaleSetManagedDiskParameters - """ - - _attribute_map = { - 'caching': {'key': 'caching', 'type': 'CachingTypes'}, - 'write_accelerator_enabled': {'key': 'writeAcceleratorEnabled', 'type': 'bool'}, - 'disk_size_gb': {'key': 'diskSizeGB', 'type': 'int'}, - 'image': {'key': 'image', 'type': 'VirtualHardDisk'}, - 'vhd_containers': {'key': 'vhdContainers', 'type': '[str]'}, - 'managed_disk': {'key': 'managedDisk', 'type': 'VirtualMachineScaleSetManagedDiskParameters'}, - } - - def __init__(self, **kwargs): - super(VirtualMachineScaleSetUpdateOSDisk, self).__init__(**kwargs) - self.caching = kwargs.get('caching', None) - self.write_accelerator_enabled = kwargs.get('write_accelerator_enabled', None) - self.disk_size_gb = kwargs.get('disk_size_gb', None) - self.image = kwargs.get('image', None) - self.vhd_containers = kwargs.get('vhd_containers', None) - self.managed_disk = kwargs.get('managed_disk', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/virtual_machine_scale_set_update_os_disk_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/virtual_machine_scale_set_update_os_disk_py3.py deleted file mode 100644 index ae479089bf38..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/virtual_machine_scale_set_update_os_disk_py3.py +++ /dev/null @@ -1,56 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineScaleSetUpdateOSDisk(Model): - """Describes virtual machine scale set operating system disk Update Object. - This should be used for Updating VMSS OS Disk. - - :param caching: The caching type. Possible values include: 'None', - 'ReadOnly', 'ReadWrite' - :type caching: str or ~azure.mgmt.compute.v2018_06_01.models.CachingTypes - :param write_accelerator_enabled: Specifies whether writeAccelerator - should be enabled or disabled on the disk. - :type write_accelerator_enabled: bool - :param disk_size_gb: Specifies the size of the operating system disk in - gigabytes. This element can be used to overwrite the size of the disk in a - virtual machine image.

    This value cannot be larger than 1023 GB - :type disk_size_gb: int - :param image: The Source User Image VirtualHardDisk. This VirtualHardDisk - will be copied before using it to attach to the Virtual Machine. If - SourceImage is provided, the destination VirtualHardDisk should not exist. - :type image: ~azure.mgmt.compute.v2018_06_01.models.VirtualHardDisk - :param vhd_containers: The list of virtual hard disk container uris. - :type vhd_containers: list[str] - :param managed_disk: The managed disk parameters. - :type managed_disk: - ~azure.mgmt.compute.v2018_06_01.models.VirtualMachineScaleSetManagedDiskParameters - """ - - _attribute_map = { - 'caching': {'key': 'caching', 'type': 'CachingTypes'}, - 'write_accelerator_enabled': {'key': 'writeAcceleratorEnabled', 'type': 'bool'}, - 'disk_size_gb': {'key': 'diskSizeGB', 'type': 'int'}, - 'image': {'key': 'image', 'type': 'VirtualHardDisk'}, - 'vhd_containers': {'key': 'vhdContainers', 'type': '[str]'}, - 'managed_disk': {'key': 'managedDisk', 'type': 'VirtualMachineScaleSetManagedDiskParameters'}, - } - - def __init__(self, *, caching=None, write_accelerator_enabled: bool=None, disk_size_gb: int=None, image=None, vhd_containers=None, managed_disk=None, **kwargs) -> None: - super(VirtualMachineScaleSetUpdateOSDisk, self).__init__(**kwargs) - self.caching = caching - self.write_accelerator_enabled = write_accelerator_enabled - self.disk_size_gb = disk_size_gb - self.image = image - self.vhd_containers = vhd_containers - self.managed_disk = managed_disk diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/virtual_machine_scale_set_update_os_profile.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/virtual_machine_scale_set_update_os_profile.py deleted file mode 100644 index f043e23776ca..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/virtual_machine_scale_set_update_os_profile.py +++ /dev/null @@ -1,43 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineScaleSetUpdateOSProfile(Model): - """Describes a virtual machine scale set OS profile. - - :param custom_data: A base-64 encoded string of custom data. - :type custom_data: str - :param windows_configuration: The Windows Configuration of the OS profile. - :type windows_configuration: - ~azure.mgmt.compute.v2018_06_01.models.WindowsConfiguration - :param linux_configuration: The Linux Configuration of the OS profile. - :type linux_configuration: - ~azure.mgmt.compute.v2018_06_01.models.LinuxConfiguration - :param secrets: The List of certificates for addition to the VM. - :type secrets: - list[~azure.mgmt.compute.v2018_06_01.models.VaultSecretGroup] - """ - - _attribute_map = { - 'custom_data': {'key': 'customData', 'type': 'str'}, - 'windows_configuration': {'key': 'windowsConfiguration', 'type': 'WindowsConfiguration'}, - 'linux_configuration': {'key': 'linuxConfiguration', 'type': 'LinuxConfiguration'}, - 'secrets': {'key': 'secrets', 'type': '[VaultSecretGroup]'}, - } - - def __init__(self, **kwargs): - super(VirtualMachineScaleSetUpdateOSProfile, self).__init__(**kwargs) - self.custom_data = kwargs.get('custom_data', None) - self.windows_configuration = kwargs.get('windows_configuration', None) - self.linux_configuration = kwargs.get('linux_configuration', None) - self.secrets = kwargs.get('secrets', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/virtual_machine_scale_set_update_os_profile_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/virtual_machine_scale_set_update_os_profile_py3.py deleted file mode 100644 index fab18009bdbe..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/virtual_machine_scale_set_update_os_profile_py3.py +++ /dev/null @@ -1,43 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineScaleSetUpdateOSProfile(Model): - """Describes a virtual machine scale set OS profile. - - :param custom_data: A base-64 encoded string of custom data. - :type custom_data: str - :param windows_configuration: The Windows Configuration of the OS profile. - :type windows_configuration: - ~azure.mgmt.compute.v2018_06_01.models.WindowsConfiguration - :param linux_configuration: The Linux Configuration of the OS profile. - :type linux_configuration: - ~azure.mgmt.compute.v2018_06_01.models.LinuxConfiguration - :param secrets: The List of certificates for addition to the VM. - :type secrets: - list[~azure.mgmt.compute.v2018_06_01.models.VaultSecretGroup] - """ - - _attribute_map = { - 'custom_data': {'key': 'customData', 'type': 'str'}, - 'windows_configuration': {'key': 'windowsConfiguration', 'type': 'WindowsConfiguration'}, - 'linux_configuration': {'key': 'linuxConfiguration', 'type': 'LinuxConfiguration'}, - 'secrets': {'key': 'secrets', 'type': '[VaultSecretGroup]'}, - } - - def __init__(self, *, custom_data: str=None, windows_configuration=None, linux_configuration=None, secrets=None, **kwargs) -> None: - super(VirtualMachineScaleSetUpdateOSProfile, self).__init__(**kwargs) - self.custom_data = custom_data - self.windows_configuration = windows_configuration - self.linux_configuration = linux_configuration - self.secrets = secrets diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/virtual_machine_scale_set_update_public_ip_address_configuration.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/virtual_machine_scale_set_update_public_ip_address_configuration.py deleted file mode 100644 index 9e2c06edb276..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/virtual_machine_scale_set_update_public_ip_address_configuration.py +++ /dev/null @@ -1,39 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineScaleSetUpdatePublicIPAddressConfiguration(Model): - """Describes a virtual machines scale set IP Configuration's PublicIPAddress - configuration. - - :param name: The publicIP address configuration name. - :type name: str - :param idle_timeout_in_minutes: The idle timeout of the public IP address. - :type idle_timeout_in_minutes: int - :param dns_settings: The dns settings to be applied on the publicIP - addresses . - :type dns_settings: - ~azure.mgmt.compute.v2018_06_01.models.VirtualMachineScaleSetPublicIPAddressConfigurationDnsSettings - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'idle_timeout_in_minutes': {'key': 'properties.idleTimeoutInMinutes', 'type': 'int'}, - 'dns_settings': {'key': 'properties.dnsSettings', 'type': 'VirtualMachineScaleSetPublicIPAddressConfigurationDnsSettings'}, - } - - def __init__(self, **kwargs): - super(VirtualMachineScaleSetUpdatePublicIPAddressConfiguration, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.idle_timeout_in_minutes = kwargs.get('idle_timeout_in_minutes', None) - self.dns_settings = kwargs.get('dns_settings', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/virtual_machine_scale_set_update_public_ip_address_configuration_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/virtual_machine_scale_set_update_public_ip_address_configuration_py3.py deleted file mode 100644 index 51444f9b7568..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/virtual_machine_scale_set_update_public_ip_address_configuration_py3.py +++ /dev/null @@ -1,39 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineScaleSetUpdatePublicIPAddressConfiguration(Model): - """Describes a virtual machines scale set IP Configuration's PublicIPAddress - configuration. - - :param name: The publicIP address configuration name. - :type name: str - :param idle_timeout_in_minutes: The idle timeout of the public IP address. - :type idle_timeout_in_minutes: int - :param dns_settings: The dns settings to be applied on the publicIP - addresses . - :type dns_settings: - ~azure.mgmt.compute.v2018_06_01.models.VirtualMachineScaleSetPublicIPAddressConfigurationDnsSettings - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'idle_timeout_in_minutes': {'key': 'properties.idleTimeoutInMinutes', 'type': 'int'}, - 'dns_settings': {'key': 'properties.dnsSettings', 'type': 'VirtualMachineScaleSetPublicIPAddressConfigurationDnsSettings'}, - } - - def __init__(self, *, name: str=None, idle_timeout_in_minutes: int=None, dns_settings=None, **kwargs) -> None: - super(VirtualMachineScaleSetUpdatePublicIPAddressConfiguration, self).__init__(**kwargs) - self.name = name - self.idle_timeout_in_minutes = idle_timeout_in_minutes - self.dns_settings = dns_settings diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/virtual_machine_scale_set_update_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/virtual_machine_scale_set_update_py3.py deleted file mode 100644 index 55dda9c80548..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/virtual_machine_scale_set_update_py3.py +++ /dev/null @@ -1,61 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .update_resource_py3 import UpdateResource - - -class VirtualMachineScaleSetUpdate(UpdateResource): - """Describes a Virtual Machine Scale Set. - - :param tags: Resource tags - :type tags: dict[str, str] - :param sku: The virtual machine scale set sku. - :type sku: ~azure.mgmt.compute.v2018_06_01.models.Sku - :param plan: The purchase plan when deploying a virtual machine scale set - from VM Marketplace images. - :type plan: ~azure.mgmt.compute.v2018_06_01.models.Plan - :param upgrade_policy: The upgrade policy. - :type upgrade_policy: ~azure.mgmt.compute.v2018_06_01.models.UpgradePolicy - :param virtual_machine_profile: The virtual machine profile. - :type virtual_machine_profile: - ~azure.mgmt.compute.v2018_06_01.models.VirtualMachineScaleSetUpdateVMProfile - :param overprovision: Specifies whether the Virtual Machine Scale Set - should be overprovisioned. - :type overprovision: bool - :param single_placement_group: When true this limits the scale set to a - single placement group, of max size 100 virtual machines. - :type single_placement_group: bool - :param identity: The identity of the virtual machine scale set, if - configured. - :type identity: - ~azure.mgmt.compute.v2018_06_01.models.VirtualMachineScaleSetIdentity - """ - - _attribute_map = { - 'tags': {'key': 'tags', 'type': '{str}'}, - 'sku': {'key': 'sku', 'type': 'Sku'}, - 'plan': {'key': 'plan', 'type': 'Plan'}, - 'upgrade_policy': {'key': 'properties.upgradePolicy', 'type': 'UpgradePolicy'}, - 'virtual_machine_profile': {'key': 'properties.virtualMachineProfile', 'type': 'VirtualMachineScaleSetUpdateVMProfile'}, - 'overprovision': {'key': 'properties.overprovision', 'type': 'bool'}, - 'single_placement_group': {'key': 'properties.singlePlacementGroup', 'type': 'bool'}, - 'identity': {'key': 'identity', 'type': 'VirtualMachineScaleSetIdentity'}, - } - - def __init__(self, *, tags=None, sku=None, plan=None, upgrade_policy=None, virtual_machine_profile=None, overprovision: bool=None, single_placement_group: bool=None, identity=None, **kwargs) -> None: - super(VirtualMachineScaleSetUpdate, self).__init__(tags=tags, **kwargs) - self.sku = sku - self.plan = plan - self.upgrade_policy = upgrade_policy - self.virtual_machine_profile = virtual_machine_profile - self.overprovision = overprovision - self.single_placement_group = single_placement_group - self.identity = identity diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/virtual_machine_scale_set_update_storage_profile.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/virtual_machine_scale_set_update_storage_profile.py deleted file mode 100644 index 97cd8aea9b24..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/virtual_machine_scale_set_update_storage_profile.py +++ /dev/null @@ -1,39 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineScaleSetUpdateStorageProfile(Model): - """Describes a virtual machine scale set storage profile. - - :param image_reference: The image reference. - :type image_reference: - ~azure.mgmt.compute.v2018_06_01.models.ImageReference - :param os_disk: The OS disk. - :type os_disk: - ~azure.mgmt.compute.v2018_06_01.models.VirtualMachineScaleSetUpdateOSDisk - :param data_disks: The data disks. - :type data_disks: - list[~azure.mgmt.compute.v2018_06_01.models.VirtualMachineScaleSetDataDisk] - """ - - _attribute_map = { - 'image_reference': {'key': 'imageReference', 'type': 'ImageReference'}, - 'os_disk': {'key': 'osDisk', 'type': 'VirtualMachineScaleSetUpdateOSDisk'}, - 'data_disks': {'key': 'dataDisks', 'type': '[VirtualMachineScaleSetDataDisk]'}, - } - - def __init__(self, **kwargs): - super(VirtualMachineScaleSetUpdateStorageProfile, self).__init__(**kwargs) - self.image_reference = kwargs.get('image_reference', None) - self.os_disk = kwargs.get('os_disk', None) - self.data_disks = kwargs.get('data_disks', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/virtual_machine_scale_set_update_storage_profile_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/virtual_machine_scale_set_update_storage_profile_py3.py deleted file mode 100644 index f24573c96349..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/virtual_machine_scale_set_update_storage_profile_py3.py +++ /dev/null @@ -1,39 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineScaleSetUpdateStorageProfile(Model): - """Describes a virtual machine scale set storage profile. - - :param image_reference: The image reference. - :type image_reference: - ~azure.mgmt.compute.v2018_06_01.models.ImageReference - :param os_disk: The OS disk. - :type os_disk: - ~azure.mgmt.compute.v2018_06_01.models.VirtualMachineScaleSetUpdateOSDisk - :param data_disks: The data disks. - :type data_disks: - list[~azure.mgmt.compute.v2018_06_01.models.VirtualMachineScaleSetDataDisk] - """ - - _attribute_map = { - 'image_reference': {'key': 'imageReference', 'type': 'ImageReference'}, - 'os_disk': {'key': 'osDisk', 'type': 'VirtualMachineScaleSetUpdateOSDisk'}, - 'data_disks': {'key': 'dataDisks', 'type': '[VirtualMachineScaleSetDataDisk]'}, - } - - def __init__(self, *, image_reference=None, os_disk=None, data_disks=None, **kwargs) -> None: - super(VirtualMachineScaleSetUpdateStorageProfile, self).__init__(**kwargs) - self.image_reference = image_reference - self.os_disk = os_disk - self.data_disks = data_disks diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/virtual_machine_scale_set_update_vm_profile.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/virtual_machine_scale_set_update_vm_profile.py deleted file mode 100644 index cb61ee4f68c5..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/virtual_machine_scale_set_update_vm_profile.py +++ /dev/null @@ -1,55 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineScaleSetUpdateVMProfile(Model): - """Describes a virtual machine scale set virtual machine profile. - - :param os_profile: The virtual machine scale set OS profile. - :type os_profile: - ~azure.mgmt.compute.v2018_06_01.models.VirtualMachineScaleSetUpdateOSProfile - :param storage_profile: The virtual machine scale set storage profile. - :type storage_profile: - ~azure.mgmt.compute.v2018_06_01.models.VirtualMachineScaleSetUpdateStorageProfile - :param network_profile: The virtual machine scale set network profile. - :type network_profile: - ~azure.mgmt.compute.v2018_06_01.models.VirtualMachineScaleSetUpdateNetworkProfile - :param diagnostics_profile: The virtual machine scale set diagnostics - profile. - :type diagnostics_profile: - ~azure.mgmt.compute.v2018_06_01.models.DiagnosticsProfile - :param extension_profile: The virtual machine scale set extension profile. - :type extension_profile: - ~azure.mgmt.compute.v2018_06_01.models.VirtualMachineScaleSetExtensionProfile - :param license_type: The license type, which is for bring your own license - scenario. - :type license_type: str - """ - - _attribute_map = { - 'os_profile': {'key': 'osProfile', 'type': 'VirtualMachineScaleSetUpdateOSProfile'}, - 'storage_profile': {'key': 'storageProfile', 'type': 'VirtualMachineScaleSetUpdateStorageProfile'}, - 'network_profile': {'key': 'networkProfile', 'type': 'VirtualMachineScaleSetUpdateNetworkProfile'}, - 'diagnostics_profile': {'key': 'diagnosticsProfile', 'type': 'DiagnosticsProfile'}, - 'extension_profile': {'key': 'extensionProfile', 'type': 'VirtualMachineScaleSetExtensionProfile'}, - 'license_type': {'key': 'licenseType', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(VirtualMachineScaleSetUpdateVMProfile, self).__init__(**kwargs) - self.os_profile = kwargs.get('os_profile', None) - self.storage_profile = kwargs.get('storage_profile', None) - self.network_profile = kwargs.get('network_profile', None) - self.diagnostics_profile = kwargs.get('diagnostics_profile', None) - self.extension_profile = kwargs.get('extension_profile', None) - self.license_type = kwargs.get('license_type', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/virtual_machine_scale_set_update_vm_profile_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/virtual_machine_scale_set_update_vm_profile_py3.py deleted file mode 100644 index d915ae470357..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/virtual_machine_scale_set_update_vm_profile_py3.py +++ /dev/null @@ -1,55 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineScaleSetUpdateVMProfile(Model): - """Describes a virtual machine scale set virtual machine profile. - - :param os_profile: The virtual machine scale set OS profile. - :type os_profile: - ~azure.mgmt.compute.v2018_06_01.models.VirtualMachineScaleSetUpdateOSProfile - :param storage_profile: The virtual machine scale set storage profile. - :type storage_profile: - ~azure.mgmt.compute.v2018_06_01.models.VirtualMachineScaleSetUpdateStorageProfile - :param network_profile: The virtual machine scale set network profile. - :type network_profile: - ~azure.mgmt.compute.v2018_06_01.models.VirtualMachineScaleSetUpdateNetworkProfile - :param diagnostics_profile: The virtual machine scale set diagnostics - profile. - :type diagnostics_profile: - ~azure.mgmt.compute.v2018_06_01.models.DiagnosticsProfile - :param extension_profile: The virtual machine scale set extension profile. - :type extension_profile: - ~azure.mgmt.compute.v2018_06_01.models.VirtualMachineScaleSetExtensionProfile - :param license_type: The license type, which is for bring your own license - scenario. - :type license_type: str - """ - - _attribute_map = { - 'os_profile': {'key': 'osProfile', 'type': 'VirtualMachineScaleSetUpdateOSProfile'}, - 'storage_profile': {'key': 'storageProfile', 'type': 'VirtualMachineScaleSetUpdateStorageProfile'}, - 'network_profile': {'key': 'networkProfile', 'type': 'VirtualMachineScaleSetUpdateNetworkProfile'}, - 'diagnostics_profile': {'key': 'diagnosticsProfile', 'type': 'DiagnosticsProfile'}, - 'extension_profile': {'key': 'extensionProfile', 'type': 'VirtualMachineScaleSetExtensionProfile'}, - 'license_type': {'key': 'licenseType', 'type': 'str'}, - } - - def __init__(self, *, os_profile=None, storage_profile=None, network_profile=None, diagnostics_profile=None, extension_profile=None, license_type: str=None, **kwargs) -> None: - super(VirtualMachineScaleSetUpdateVMProfile, self).__init__(**kwargs) - self.os_profile = os_profile - self.storage_profile = storage_profile - self.network_profile = network_profile - self.diagnostics_profile = diagnostics_profile - self.extension_profile = extension_profile - self.license_type = license_type diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/virtual_machine_scale_set_vm.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/virtual_machine_scale_set_vm.py deleted file mode 100644 index 647c14bd7a42..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/virtual_machine_scale_set_vm.py +++ /dev/null @@ -1,168 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource import Resource - - -class VirtualMachineScaleSetVM(Resource): - """Describes a virtual machine scale set virtual machine. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource Id - :vartype id: str - :ivar name: Resource name - :vartype name: str - :ivar type: Resource type - :vartype type: str - :param location: Required. Resource location - :type location: str - :param tags: Resource tags - :type tags: dict[str, str] - :ivar instance_id: The virtual machine instance ID. - :vartype instance_id: str - :ivar sku: The virtual machine SKU. - :vartype sku: ~azure.mgmt.compute.v2018_06_01.models.Sku - :ivar latest_model_applied: Specifies whether the latest model has been - applied to the virtual machine. - :vartype latest_model_applied: bool - :ivar vm_id: Azure VM unique ID. - :vartype vm_id: str - :ivar instance_view: The virtual machine instance view. - :vartype instance_view: - ~azure.mgmt.compute.v2018_06_01.models.VirtualMachineScaleSetVMInstanceView - :param hardware_profile: Specifies the hardware settings for the virtual - machine. - :type hardware_profile: - ~azure.mgmt.compute.v2018_06_01.models.HardwareProfile - :param storage_profile: Specifies the storage settings for the virtual - machine disks. - :type storage_profile: - ~azure.mgmt.compute.v2018_06_01.models.StorageProfile - :param additional_capabilities: Specifies additional capabilities enabled - or disabled on the virtual machine in the scale set. For instance: whether - the virtual machine has the capability to support attaching managed data - disks with UltraSSD_LRS storage account type. - :type additional_capabilities: - ~azure.mgmt.compute.v2018_06_01.models.AdditionalCapabilities - :param os_profile: Specifies the operating system settings for the virtual - machine. - :type os_profile: ~azure.mgmt.compute.v2018_06_01.models.OSProfile - :param network_profile: Specifies the network interfaces of the virtual - machine. - :type network_profile: - ~azure.mgmt.compute.v2018_06_01.models.NetworkProfile - :param diagnostics_profile: Specifies the boot diagnostic settings state. -

    Minimum api-version: 2015-06-15. - :type diagnostics_profile: - ~azure.mgmt.compute.v2018_06_01.models.DiagnosticsProfile - :param availability_set: Specifies information about the availability set - that the virtual machine should be assigned to. Virtual machines specified - in the same availability set are allocated to different nodes to maximize - availability. For more information about availability sets, see [Manage - the availability of virtual - machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-manage-availability?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). -

    For more information on Azure planned maintenance, see [Planned - maintenance for virtual machines in - Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-planned-maintenance?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json) -

    Currently, a VM can only be added to availability set at creation - time. An existing VM cannot be added to an availability set. - :type availability_set: ~azure.mgmt.compute.v2018_06_01.models.SubResource - :ivar provisioning_state: The provisioning state, which only appears in - the response. - :vartype provisioning_state: str - :param license_type: Specifies that the image or disk that is being used - was licensed on-premises. This element is only used for images that - contain the Windows Server operating system.

    Possible values are: -

    Windows_Client

    Windows_Server

    If this element - is included in a request for an update, the value must match the initial - value. This value cannot be updated.

    For more information, see - [Azure Hybrid Use Benefit for Windows - Server](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-hybrid-use-benefit-licensing?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json) -

    Minimum api-version: 2015-06-15 - :type license_type: str - :param plan: Specifies information about the marketplace image used to - create the virtual machine. This element is only used for marketplace - images. Before you can use a marketplace image from an API, you must - enable the image for programmatic use. In the Azure portal, find the - marketplace image that you want to use and then click **Want to deploy - programmatically, Get Started ->**. Enter any required information and - then click **Save**. - :type plan: ~azure.mgmt.compute.v2018_06_01.models.Plan - :ivar resources: The virtual machine child extension resources. - :vartype resources: - list[~azure.mgmt.compute.v2018_06_01.models.VirtualMachineExtension] - :ivar zones: The virtual machine zones. - :vartype zones: list[str] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - 'instance_id': {'readonly': True}, - 'sku': {'readonly': True}, - 'latest_model_applied': {'readonly': True}, - 'vm_id': {'readonly': True}, - 'instance_view': {'readonly': True}, - 'provisioning_state': {'readonly': True}, - 'resources': {'readonly': True}, - 'zones': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'instance_id': {'key': 'instanceId', 'type': 'str'}, - 'sku': {'key': 'sku', 'type': 'Sku'}, - 'latest_model_applied': {'key': 'properties.latestModelApplied', 'type': 'bool'}, - 'vm_id': {'key': 'properties.vmId', 'type': 'str'}, - 'instance_view': {'key': 'properties.instanceView', 'type': 'VirtualMachineScaleSetVMInstanceView'}, - 'hardware_profile': {'key': 'properties.hardwareProfile', 'type': 'HardwareProfile'}, - 'storage_profile': {'key': 'properties.storageProfile', 'type': 'StorageProfile'}, - 'additional_capabilities': {'key': 'properties.additionalCapabilities', 'type': 'AdditionalCapabilities'}, - 'os_profile': {'key': 'properties.osProfile', 'type': 'OSProfile'}, - 'network_profile': {'key': 'properties.networkProfile', 'type': 'NetworkProfile'}, - 'diagnostics_profile': {'key': 'properties.diagnosticsProfile', 'type': 'DiagnosticsProfile'}, - 'availability_set': {'key': 'properties.availabilitySet', 'type': 'SubResource'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'license_type': {'key': 'properties.licenseType', 'type': 'str'}, - 'plan': {'key': 'plan', 'type': 'Plan'}, - 'resources': {'key': 'resources', 'type': '[VirtualMachineExtension]'}, - 'zones': {'key': 'zones', 'type': '[str]'}, - } - - def __init__(self, **kwargs): - super(VirtualMachineScaleSetVM, self).__init__(**kwargs) - self.instance_id = None - self.sku = None - self.latest_model_applied = None - self.vm_id = None - self.instance_view = None - self.hardware_profile = kwargs.get('hardware_profile', None) - self.storage_profile = kwargs.get('storage_profile', None) - self.additional_capabilities = kwargs.get('additional_capabilities', None) - self.os_profile = kwargs.get('os_profile', None) - self.network_profile = kwargs.get('network_profile', None) - self.diagnostics_profile = kwargs.get('diagnostics_profile', None) - self.availability_set = kwargs.get('availability_set', None) - self.provisioning_state = None - self.license_type = kwargs.get('license_type', None) - self.plan = kwargs.get('plan', None) - self.resources = None - self.zones = None diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/virtual_machine_scale_set_vm_extensions_summary.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/virtual_machine_scale_set_vm_extensions_summary.py deleted file mode 100644 index 9a5311199fe5..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/virtual_machine_scale_set_vm_extensions_summary.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineScaleSetVMExtensionsSummary(Model): - """Extensions summary for virtual machines of a virtual machine scale set. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar name: The extension name. - :vartype name: str - :ivar statuses_summary: The extensions information. - :vartype statuses_summary: - list[~azure.mgmt.compute.v2018_06_01.models.VirtualMachineStatusCodeCount] - """ - - _validation = { - 'name': {'readonly': True}, - 'statuses_summary': {'readonly': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'statuses_summary': {'key': 'statusesSummary', 'type': '[VirtualMachineStatusCodeCount]'}, - } - - def __init__(self, **kwargs): - super(VirtualMachineScaleSetVMExtensionsSummary, self).__init__(**kwargs) - self.name = None - self.statuses_summary = None diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/virtual_machine_scale_set_vm_extensions_summary_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/virtual_machine_scale_set_vm_extensions_summary_py3.py deleted file mode 100644 index da37a4f927b7..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/virtual_machine_scale_set_vm_extensions_summary_py3.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineScaleSetVMExtensionsSummary(Model): - """Extensions summary for virtual machines of a virtual machine scale set. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar name: The extension name. - :vartype name: str - :ivar statuses_summary: The extensions information. - :vartype statuses_summary: - list[~azure.mgmt.compute.v2018_06_01.models.VirtualMachineStatusCodeCount] - """ - - _validation = { - 'name': {'readonly': True}, - 'statuses_summary': {'readonly': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'statuses_summary': {'key': 'statusesSummary', 'type': '[VirtualMachineStatusCodeCount]'}, - } - - def __init__(self, **kwargs) -> None: - super(VirtualMachineScaleSetVMExtensionsSummary, self).__init__(**kwargs) - self.name = None - self.statuses_summary = None diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/virtual_machine_scale_set_vm_instance_ids.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/virtual_machine_scale_set_vm_instance_ids.py deleted file mode 100644 index 772c66dad326..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/virtual_machine_scale_set_vm_instance_ids.py +++ /dev/null @@ -1,30 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineScaleSetVMInstanceIDs(Model): - """Specifies a list of virtual machine instance IDs from the VM scale set. - - :param instance_ids: The virtual machine scale set instance ids. Omitting - the virtual machine scale set instance ids will result in the operation - being performed on all virtual machines in the virtual machine scale set. - :type instance_ids: list[str] - """ - - _attribute_map = { - 'instance_ids': {'key': 'instanceIds', 'type': '[str]'}, - } - - def __init__(self, **kwargs): - super(VirtualMachineScaleSetVMInstanceIDs, self).__init__(**kwargs) - self.instance_ids = kwargs.get('instance_ids', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/virtual_machine_scale_set_vm_instance_ids_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/virtual_machine_scale_set_vm_instance_ids_py3.py deleted file mode 100644 index 658a8ccb87d5..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/virtual_machine_scale_set_vm_instance_ids_py3.py +++ /dev/null @@ -1,30 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineScaleSetVMInstanceIDs(Model): - """Specifies a list of virtual machine instance IDs from the VM scale set. - - :param instance_ids: The virtual machine scale set instance ids. Omitting - the virtual machine scale set instance ids will result in the operation - being performed on all virtual machines in the virtual machine scale set. - :type instance_ids: list[str] - """ - - _attribute_map = { - 'instance_ids': {'key': 'instanceIds', 'type': '[str]'}, - } - - def __init__(self, *, instance_ids=None, **kwargs) -> None: - super(VirtualMachineScaleSetVMInstanceIDs, self).__init__(**kwargs) - self.instance_ids = instance_ids diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/virtual_machine_scale_set_vm_instance_required_ids.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/virtual_machine_scale_set_vm_instance_required_ids.py deleted file mode 100644 index ece250dd4fd4..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/virtual_machine_scale_set_vm_instance_required_ids.py +++ /dev/null @@ -1,34 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineScaleSetVMInstanceRequiredIDs(Model): - """Specifies a list of virtual machine instance IDs from the VM scale set. - - All required parameters must be populated in order to send to Azure. - - :param instance_ids: Required. The virtual machine scale set instance ids. - :type instance_ids: list[str] - """ - - _validation = { - 'instance_ids': {'required': True}, - } - - _attribute_map = { - 'instance_ids': {'key': 'instanceIds', 'type': '[str]'}, - } - - def __init__(self, **kwargs): - super(VirtualMachineScaleSetVMInstanceRequiredIDs, self).__init__(**kwargs) - self.instance_ids = kwargs.get('instance_ids', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/virtual_machine_scale_set_vm_instance_required_ids_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/virtual_machine_scale_set_vm_instance_required_ids_py3.py deleted file mode 100644 index f32c6181467d..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/virtual_machine_scale_set_vm_instance_required_ids_py3.py +++ /dev/null @@ -1,34 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineScaleSetVMInstanceRequiredIDs(Model): - """Specifies a list of virtual machine instance IDs from the VM scale set. - - All required parameters must be populated in order to send to Azure. - - :param instance_ids: Required. The virtual machine scale set instance ids. - :type instance_ids: list[str] - """ - - _validation = { - 'instance_ids': {'required': True}, - } - - _attribute_map = { - 'instance_ids': {'key': 'instanceIds', 'type': '[str]'}, - } - - def __init__(self, *, instance_ids, **kwargs) -> None: - super(VirtualMachineScaleSetVMInstanceRequiredIDs, self).__init__(**kwargs) - self.instance_ids = instance_ids diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/virtual_machine_scale_set_vm_instance_view.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/virtual_machine_scale_set_vm_instance_view.py deleted file mode 100644 index 8ac2d0633dc8..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/virtual_machine_scale_set_vm_instance_view.py +++ /dev/null @@ -1,86 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineScaleSetVMInstanceView(Model): - """The instance view of a virtual machine scale set VM. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :param platform_update_domain: The Update Domain count. - :type platform_update_domain: int - :param platform_fault_domain: The Fault Domain count. - :type platform_fault_domain: int - :param rdp_thumb_print: The Remote desktop certificate thumbprint. - :type rdp_thumb_print: str - :param vm_agent: The VM Agent running on the virtual machine. - :type vm_agent: - ~azure.mgmt.compute.v2018_06_01.models.VirtualMachineAgentInstanceView - :param maintenance_redeploy_status: The Maintenance Operation status on - the virtual machine. - :type maintenance_redeploy_status: - ~azure.mgmt.compute.v2018_06_01.models.MaintenanceRedeployStatus - :param disks: The disks information. - :type disks: list[~azure.mgmt.compute.v2018_06_01.models.DiskInstanceView] - :param extensions: The extensions information. - :type extensions: - list[~azure.mgmt.compute.v2018_06_01.models.VirtualMachineExtensionInstanceView] - :ivar vm_health: The health status for the VM. - :vartype vm_health: - ~azure.mgmt.compute.v2018_06_01.models.VirtualMachineHealthStatus - :param boot_diagnostics: Boot Diagnostics is a debugging feature which - allows you to view Console Output and Screenshot to diagnose VM status. -

    You can easily view the output of your console log.

    - Azure also enables you to see a screenshot of the VM from the hypervisor. - :type boot_diagnostics: - ~azure.mgmt.compute.v2018_06_01.models.BootDiagnosticsInstanceView - :param statuses: The resource status information. - :type statuses: - list[~azure.mgmt.compute.v2018_06_01.models.InstanceViewStatus] - :param placement_group_id: The placement group in which the VM is running. - If the VM is deallocated it will not have a placementGroupId. - :type placement_group_id: str - """ - - _validation = { - 'vm_health': {'readonly': True}, - } - - _attribute_map = { - 'platform_update_domain': {'key': 'platformUpdateDomain', 'type': 'int'}, - 'platform_fault_domain': {'key': 'platformFaultDomain', 'type': 'int'}, - 'rdp_thumb_print': {'key': 'rdpThumbPrint', 'type': 'str'}, - 'vm_agent': {'key': 'vmAgent', 'type': 'VirtualMachineAgentInstanceView'}, - 'maintenance_redeploy_status': {'key': 'maintenanceRedeployStatus', 'type': 'MaintenanceRedeployStatus'}, - 'disks': {'key': 'disks', 'type': '[DiskInstanceView]'}, - 'extensions': {'key': 'extensions', 'type': '[VirtualMachineExtensionInstanceView]'}, - 'vm_health': {'key': 'vmHealth', 'type': 'VirtualMachineHealthStatus'}, - 'boot_diagnostics': {'key': 'bootDiagnostics', 'type': 'BootDiagnosticsInstanceView'}, - 'statuses': {'key': 'statuses', 'type': '[InstanceViewStatus]'}, - 'placement_group_id': {'key': 'placementGroupId', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(VirtualMachineScaleSetVMInstanceView, self).__init__(**kwargs) - self.platform_update_domain = kwargs.get('platform_update_domain', None) - self.platform_fault_domain = kwargs.get('platform_fault_domain', None) - self.rdp_thumb_print = kwargs.get('rdp_thumb_print', None) - self.vm_agent = kwargs.get('vm_agent', None) - self.maintenance_redeploy_status = kwargs.get('maintenance_redeploy_status', None) - self.disks = kwargs.get('disks', None) - self.extensions = kwargs.get('extensions', None) - self.vm_health = None - self.boot_diagnostics = kwargs.get('boot_diagnostics', None) - self.statuses = kwargs.get('statuses', None) - self.placement_group_id = kwargs.get('placement_group_id', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/virtual_machine_scale_set_vm_instance_view_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/virtual_machine_scale_set_vm_instance_view_py3.py deleted file mode 100644 index 5266cd011872..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/virtual_machine_scale_set_vm_instance_view_py3.py +++ /dev/null @@ -1,86 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineScaleSetVMInstanceView(Model): - """The instance view of a virtual machine scale set VM. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :param platform_update_domain: The Update Domain count. - :type platform_update_domain: int - :param platform_fault_domain: The Fault Domain count. - :type platform_fault_domain: int - :param rdp_thumb_print: The Remote desktop certificate thumbprint. - :type rdp_thumb_print: str - :param vm_agent: The VM Agent running on the virtual machine. - :type vm_agent: - ~azure.mgmt.compute.v2018_06_01.models.VirtualMachineAgentInstanceView - :param maintenance_redeploy_status: The Maintenance Operation status on - the virtual machine. - :type maintenance_redeploy_status: - ~azure.mgmt.compute.v2018_06_01.models.MaintenanceRedeployStatus - :param disks: The disks information. - :type disks: list[~azure.mgmt.compute.v2018_06_01.models.DiskInstanceView] - :param extensions: The extensions information. - :type extensions: - list[~azure.mgmt.compute.v2018_06_01.models.VirtualMachineExtensionInstanceView] - :ivar vm_health: The health status for the VM. - :vartype vm_health: - ~azure.mgmt.compute.v2018_06_01.models.VirtualMachineHealthStatus - :param boot_diagnostics: Boot Diagnostics is a debugging feature which - allows you to view Console Output and Screenshot to diagnose VM status. -

    You can easily view the output of your console log.

    - Azure also enables you to see a screenshot of the VM from the hypervisor. - :type boot_diagnostics: - ~azure.mgmt.compute.v2018_06_01.models.BootDiagnosticsInstanceView - :param statuses: The resource status information. - :type statuses: - list[~azure.mgmt.compute.v2018_06_01.models.InstanceViewStatus] - :param placement_group_id: The placement group in which the VM is running. - If the VM is deallocated it will not have a placementGroupId. - :type placement_group_id: str - """ - - _validation = { - 'vm_health': {'readonly': True}, - } - - _attribute_map = { - 'platform_update_domain': {'key': 'platformUpdateDomain', 'type': 'int'}, - 'platform_fault_domain': {'key': 'platformFaultDomain', 'type': 'int'}, - 'rdp_thumb_print': {'key': 'rdpThumbPrint', 'type': 'str'}, - 'vm_agent': {'key': 'vmAgent', 'type': 'VirtualMachineAgentInstanceView'}, - 'maintenance_redeploy_status': {'key': 'maintenanceRedeployStatus', 'type': 'MaintenanceRedeployStatus'}, - 'disks': {'key': 'disks', 'type': '[DiskInstanceView]'}, - 'extensions': {'key': 'extensions', 'type': '[VirtualMachineExtensionInstanceView]'}, - 'vm_health': {'key': 'vmHealth', 'type': 'VirtualMachineHealthStatus'}, - 'boot_diagnostics': {'key': 'bootDiagnostics', 'type': 'BootDiagnosticsInstanceView'}, - 'statuses': {'key': 'statuses', 'type': '[InstanceViewStatus]'}, - 'placement_group_id': {'key': 'placementGroupId', 'type': 'str'}, - } - - def __init__(self, *, platform_update_domain: int=None, platform_fault_domain: int=None, rdp_thumb_print: str=None, vm_agent=None, maintenance_redeploy_status=None, disks=None, extensions=None, boot_diagnostics=None, statuses=None, placement_group_id: str=None, **kwargs) -> None: - super(VirtualMachineScaleSetVMInstanceView, self).__init__(**kwargs) - self.platform_update_domain = platform_update_domain - self.platform_fault_domain = platform_fault_domain - self.rdp_thumb_print = rdp_thumb_print - self.vm_agent = vm_agent - self.maintenance_redeploy_status = maintenance_redeploy_status - self.disks = disks - self.extensions = extensions - self.vm_health = None - self.boot_diagnostics = boot_diagnostics - self.statuses = statuses - self.placement_group_id = placement_group_id diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/virtual_machine_scale_set_vm_paged.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/virtual_machine_scale_set_vm_paged.py deleted file mode 100644 index 1a069e7137aa..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/virtual_machine_scale_set_vm_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class VirtualMachineScaleSetVMPaged(Paged): - """ - A paging container for iterating over a list of :class:`VirtualMachineScaleSetVM ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[VirtualMachineScaleSetVM]'} - } - - def __init__(self, *args, **kwargs): - - super(VirtualMachineScaleSetVMPaged, self).__init__(*args, **kwargs) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/virtual_machine_scale_set_vm_profile.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/virtual_machine_scale_set_vm_profile.py deleted file mode 100644 index 7631eee97d95..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/virtual_machine_scale_set_vm_profile.py +++ /dev/null @@ -1,88 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineScaleSetVMProfile(Model): - """Describes a virtual machine scale set virtual machine profile. - - :param os_profile: Specifies the operating system settings for the virtual - machines in the scale set. - :type os_profile: - ~azure.mgmt.compute.v2018_06_01.models.VirtualMachineScaleSetOSProfile - :param storage_profile: Specifies the storage settings for the virtual - machine disks. - :type storage_profile: - ~azure.mgmt.compute.v2018_06_01.models.VirtualMachineScaleSetStorageProfile - :param additional_capabilities: Specifies additional capabilities enabled - or disabled on the virtual machine in the scale set. For instance: whether - the virtual machine has the capability to support attaching managed data - disks with UltraSSD_LRS storage account type. - :type additional_capabilities: - ~azure.mgmt.compute.v2018_06_01.models.AdditionalCapabilities - :param network_profile: Specifies properties of the network interfaces of - the virtual machines in the scale set. - :type network_profile: - ~azure.mgmt.compute.v2018_06_01.models.VirtualMachineScaleSetNetworkProfile - :param diagnostics_profile: Specifies the boot diagnostic settings state. -

    Minimum api-version: 2015-06-15. - :type diagnostics_profile: - ~azure.mgmt.compute.v2018_06_01.models.DiagnosticsProfile - :param extension_profile: Specifies a collection of settings for - extensions installed on virtual machines in the scale set. - :type extension_profile: - ~azure.mgmt.compute.v2018_06_01.models.VirtualMachineScaleSetExtensionProfile - :param license_type: Specifies that the image or disk that is being used - was licensed on-premises. This element is only used for images that - contain the Windows Server operating system.

    Possible values are: -

    Windows_Client

    Windows_Server

    If this element - is included in a request for an update, the value must match the initial - value. This value cannot be updated.

    For more information, see - [Azure Hybrid Use Benefit for Windows - Server](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-hybrid-use-benefit-licensing?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json) -

    Minimum api-version: 2015-06-15 - :type license_type: str - :param priority: Specifies the priority for the virtual machines in the - scale set.

    Minimum api-version: 2017-10-30-preview. Possible - values include: 'Regular', 'Low' - :type priority: str or - ~azure.mgmt.compute.v2018_06_01.models.VirtualMachinePriorityTypes - :param eviction_policy: Specifies the eviction policy for virtual machines - in a low priority scale set.

    Minimum api-version: - 2017-10-30-preview. Possible values include: 'Deallocate', 'Delete' - :type eviction_policy: str or - ~azure.mgmt.compute.v2018_06_01.models.VirtualMachineEvictionPolicyTypes - """ - - _attribute_map = { - 'os_profile': {'key': 'osProfile', 'type': 'VirtualMachineScaleSetOSProfile'}, - 'storage_profile': {'key': 'storageProfile', 'type': 'VirtualMachineScaleSetStorageProfile'}, - 'additional_capabilities': {'key': 'additionalCapabilities', 'type': 'AdditionalCapabilities'}, - 'network_profile': {'key': 'networkProfile', 'type': 'VirtualMachineScaleSetNetworkProfile'}, - 'diagnostics_profile': {'key': 'diagnosticsProfile', 'type': 'DiagnosticsProfile'}, - 'extension_profile': {'key': 'extensionProfile', 'type': 'VirtualMachineScaleSetExtensionProfile'}, - 'license_type': {'key': 'licenseType', 'type': 'str'}, - 'priority': {'key': 'priority', 'type': 'str'}, - 'eviction_policy': {'key': 'evictionPolicy', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(VirtualMachineScaleSetVMProfile, self).__init__(**kwargs) - self.os_profile = kwargs.get('os_profile', None) - self.storage_profile = kwargs.get('storage_profile', None) - self.additional_capabilities = kwargs.get('additional_capabilities', None) - self.network_profile = kwargs.get('network_profile', None) - self.diagnostics_profile = kwargs.get('diagnostics_profile', None) - self.extension_profile = kwargs.get('extension_profile', None) - self.license_type = kwargs.get('license_type', None) - self.priority = kwargs.get('priority', None) - self.eviction_policy = kwargs.get('eviction_policy', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/virtual_machine_scale_set_vm_profile_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/virtual_machine_scale_set_vm_profile_py3.py deleted file mode 100644 index 90608e71b679..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/virtual_machine_scale_set_vm_profile_py3.py +++ /dev/null @@ -1,88 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineScaleSetVMProfile(Model): - """Describes a virtual machine scale set virtual machine profile. - - :param os_profile: Specifies the operating system settings for the virtual - machines in the scale set. - :type os_profile: - ~azure.mgmt.compute.v2018_06_01.models.VirtualMachineScaleSetOSProfile - :param storage_profile: Specifies the storage settings for the virtual - machine disks. - :type storage_profile: - ~azure.mgmt.compute.v2018_06_01.models.VirtualMachineScaleSetStorageProfile - :param additional_capabilities: Specifies additional capabilities enabled - or disabled on the virtual machine in the scale set. For instance: whether - the virtual machine has the capability to support attaching managed data - disks with UltraSSD_LRS storage account type. - :type additional_capabilities: - ~azure.mgmt.compute.v2018_06_01.models.AdditionalCapabilities - :param network_profile: Specifies properties of the network interfaces of - the virtual machines in the scale set. - :type network_profile: - ~azure.mgmt.compute.v2018_06_01.models.VirtualMachineScaleSetNetworkProfile - :param diagnostics_profile: Specifies the boot diagnostic settings state. -

    Minimum api-version: 2015-06-15. - :type diagnostics_profile: - ~azure.mgmt.compute.v2018_06_01.models.DiagnosticsProfile - :param extension_profile: Specifies a collection of settings for - extensions installed on virtual machines in the scale set. - :type extension_profile: - ~azure.mgmt.compute.v2018_06_01.models.VirtualMachineScaleSetExtensionProfile - :param license_type: Specifies that the image or disk that is being used - was licensed on-premises. This element is only used for images that - contain the Windows Server operating system.

    Possible values are: -

    Windows_Client

    Windows_Server

    If this element - is included in a request for an update, the value must match the initial - value. This value cannot be updated.

    For more information, see - [Azure Hybrid Use Benefit for Windows - Server](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-hybrid-use-benefit-licensing?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json) -

    Minimum api-version: 2015-06-15 - :type license_type: str - :param priority: Specifies the priority for the virtual machines in the - scale set.

    Minimum api-version: 2017-10-30-preview. Possible - values include: 'Regular', 'Low' - :type priority: str or - ~azure.mgmt.compute.v2018_06_01.models.VirtualMachinePriorityTypes - :param eviction_policy: Specifies the eviction policy for virtual machines - in a low priority scale set.

    Minimum api-version: - 2017-10-30-preview. Possible values include: 'Deallocate', 'Delete' - :type eviction_policy: str or - ~azure.mgmt.compute.v2018_06_01.models.VirtualMachineEvictionPolicyTypes - """ - - _attribute_map = { - 'os_profile': {'key': 'osProfile', 'type': 'VirtualMachineScaleSetOSProfile'}, - 'storage_profile': {'key': 'storageProfile', 'type': 'VirtualMachineScaleSetStorageProfile'}, - 'additional_capabilities': {'key': 'additionalCapabilities', 'type': 'AdditionalCapabilities'}, - 'network_profile': {'key': 'networkProfile', 'type': 'VirtualMachineScaleSetNetworkProfile'}, - 'diagnostics_profile': {'key': 'diagnosticsProfile', 'type': 'DiagnosticsProfile'}, - 'extension_profile': {'key': 'extensionProfile', 'type': 'VirtualMachineScaleSetExtensionProfile'}, - 'license_type': {'key': 'licenseType', 'type': 'str'}, - 'priority': {'key': 'priority', 'type': 'str'}, - 'eviction_policy': {'key': 'evictionPolicy', 'type': 'str'}, - } - - def __init__(self, *, os_profile=None, storage_profile=None, additional_capabilities=None, network_profile=None, diagnostics_profile=None, extension_profile=None, license_type: str=None, priority=None, eviction_policy=None, **kwargs) -> None: - super(VirtualMachineScaleSetVMProfile, self).__init__(**kwargs) - self.os_profile = os_profile - self.storage_profile = storage_profile - self.additional_capabilities = additional_capabilities - self.network_profile = network_profile - self.diagnostics_profile = diagnostics_profile - self.extension_profile = extension_profile - self.license_type = license_type - self.priority = priority - self.eviction_policy = eviction_policy diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/virtual_machine_scale_set_vm_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/virtual_machine_scale_set_vm_py3.py deleted file mode 100644 index 5902631119c3..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/virtual_machine_scale_set_vm_py3.py +++ /dev/null @@ -1,168 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource_py3 import Resource - - -class VirtualMachineScaleSetVM(Resource): - """Describes a virtual machine scale set virtual machine. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource Id - :vartype id: str - :ivar name: Resource name - :vartype name: str - :ivar type: Resource type - :vartype type: str - :param location: Required. Resource location - :type location: str - :param tags: Resource tags - :type tags: dict[str, str] - :ivar instance_id: The virtual machine instance ID. - :vartype instance_id: str - :ivar sku: The virtual machine SKU. - :vartype sku: ~azure.mgmt.compute.v2018_06_01.models.Sku - :ivar latest_model_applied: Specifies whether the latest model has been - applied to the virtual machine. - :vartype latest_model_applied: bool - :ivar vm_id: Azure VM unique ID. - :vartype vm_id: str - :ivar instance_view: The virtual machine instance view. - :vartype instance_view: - ~azure.mgmt.compute.v2018_06_01.models.VirtualMachineScaleSetVMInstanceView - :param hardware_profile: Specifies the hardware settings for the virtual - machine. - :type hardware_profile: - ~azure.mgmt.compute.v2018_06_01.models.HardwareProfile - :param storage_profile: Specifies the storage settings for the virtual - machine disks. - :type storage_profile: - ~azure.mgmt.compute.v2018_06_01.models.StorageProfile - :param additional_capabilities: Specifies additional capabilities enabled - or disabled on the virtual machine in the scale set. For instance: whether - the virtual machine has the capability to support attaching managed data - disks with UltraSSD_LRS storage account type. - :type additional_capabilities: - ~azure.mgmt.compute.v2018_06_01.models.AdditionalCapabilities - :param os_profile: Specifies the operating system settings for the virtual - machine. - :type os_profile: ~azure.mgmt.compute.v2018_06_01.models.OSProfile - :param network_profile: Specifies the network interfaces of the virtual - machine. - :type network_profile: - ~azure.mgmt.compute.v2018_06_01.models.NetworkProfile - :param diagnostics_profile: Specifies the boot diagnostic settings state. -

    Minimum api-version: 2015-06-15. - :type diagnostics_profile: - ~azure.mgmt.compute.v2018_06_01.models.DiagnosticsProfile - :param availability_set: Specifies information about the availability set - that the virtual machine should be assigned to. Virtual machines specified - in the same availability set are allocated to different nodes to maximize - availability. For more information about availability sets, see [Manage - the availability of virtual - machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-manage-availability?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). -

    For more information on Azure planned maintenance, see [Planned - maintenance for virtual machines in - Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-planned-maintenance?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json) -

    Currently, a VM can only be added to availability set at creation - time. An existing VM cannot be added to an availability set. - :type availability_set: ~azure.mgmt.compute.v2018_06_01.models.SubResource - :ivar provisioning_state: The provisioning state, which only appears in - the response. - :vartype provisioning_state: str - :param license_type: Specifies that the image or disk that is being used - was licensed on-premises. This element is only used for images that - contain the Windows Server operating system.

    Possible values are: -

    Windows_Client

    Windows_Server

    If this element - is included in a request for an update, the value must match the initial - value. This value cannot be updated.

    For more information, see - [Azure Hybrid Use Benefit for Windows - Server](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-hybrid-use-benefit-licensing?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json) -

    Minimum api-version: 2015-06-15 - :type license_type: str - :param plan: Specifies information about the marketplace image used to - create the virtual machine. This element is only used for marketplace - images. Before you can use a marketplace image from an API, you must - enable the image for programmatic use. In the Azure portal, find the - marketplace image that you want to use and then click **Want to deploy - programmatically, Get Started ->**. Enter any required information and - then click **Save**. - :type plan: ~azure.mgmt.compute.v2018_06_01.models.Plan - :ivar resources: The virtual machine child extension resources. - :vartype resources: - list[~azure.mgmt.compute.v2018_06_01.models.VirtualMachineExtension] - :ivar zones: The virtual machine zones. - :vartype zones: list[str] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - 'instance_id': {'readonly': True}, - 'sku': {'readonly': True}, - 'latest_model_applied': {'readonly': True}, - 'vm_id': {'readonly': True}, - 'instance_view': {'readonly': True}, - 'provisioning_state': {'readonly': True}, - 'resources': {'readonly': True}, - 'zones': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'instance_id': {'key': 'instanceId', 'type': 'str'}, - 'sku': {'key': 'sku', 'type': 'Sku'}, - 'latest_model_applied': {'key': 'properties.latestModelApplied', 'type': 'bool'}, - 'vm_id': {'key': 'properties.vmId', 'type': 'str'}, - 'instance_view': {'key': 'properties.instanceView', 'type': 'VirtualMachineScaleSetVMInstanceView'}, - 'hardware_profile': {'key': 'properties.hardwareProfile', 'type': 'HardwareProfile'}, - 'storage_profile': {'key': 'properties.storageProfile', 'type': 'StorageProfile'}, - 'additional_capabilities': {'key': 'properties.additionalCapabilities', 'type': 'AdditionalCapabilities'}, - 'os_profile': {'key': 'properties.osProfile', 'type': 'OSProfile'}, - 'network_profile': {'key': 'properties.networkProfile', 'type': 'NetworkProfile'}, - 'diagnostics_profile': {'key': 'properties.diagnosticsProfile', 'type': 'DiagnosticsProfile'}, - 'availability_set': {'key': 'properties.availabilitySet', 'type': 'SubResource'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'license_type': {'key': 'properties.licenseType', 'type': 'str'}, - 'plan': {'key': 'plan', 'type': 'Plan'}, - 'resources': {'key': 'resources', 'type': '[VirtualMachineExtension]'}, - 'zones': {'key': 'zones', 'type': '[str]'}, - } - - def __init__(self, *, location: str, tags=None, hardware_profile=None, storage_profile=None, additional_capabilities=None, os_profile=None, network_profile=None, diagnostics_profile=None, availability_set=None, license_type: str=None, plan=None, **kwargs) -> None: - super(VirtualMachineScaleSetVM, self).__init__(location=location, tags=tags, **kwargs) - self.instance_id = None - self.sku = None - self.latest_model_applied = None - self.vm_id = None - self.instance_view = None - self.hardware_profile = hardware_profile - self.storage_profile = storage_profile - self.additional_capabilities = additional_capabilities - self.os_profile = os_profile - self.network_profile = network_profile - self.diagnostics_profile = diagnostics_profile - self.availability_set = availability_set - self.provisioning_state = None - self.license_type = license_type - self.plan = plan - self.resources = None - self.zones = None diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/virtual_machine_scale_set_vm_reimage_parameters.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/virtual_machine_scale_set_vm_reimage_parameters.py deleted file mode 100644 index 811a1427369e..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/virtual_machine_scale_set_vm_reimage_parameters.py +++ /dev/null @@ -1,28 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .virtual_machine_reimage_parameters import VirtualMachineReimageParameters - - -class VirtualMachineScaleSetVMReimageParameters(VirtualMachineReimageParameters): - """Describes a Virtual Machine Scale Set VM Reimage Parameters. - - :param temp_disk: Specifies whether to reimage temp disk. Default value: - false. - :type temp_disk: bool - """ - - _attribute_map = { - 'temp_disk': {'key': 'tempDisk', 'type': 'bool'}, - } - - def __init__(self, **kwargs): - super(VirtualMachineScaleSetVMReimageParameters, self).__init__(**kwargs) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/virtual_machine_scale_set_vm_reimage_parameters_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/virtual_machine_scale_set_vm_reimage_parameters_py3.py deleted file mode 100644 index d30d5fd8fa86..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/virtual_machine_scale_set_vm_reimage_parameters_py3.py +++ /dev/null @@ -1,28 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .virtual_machine_reimage_parameters_py3 import VirtualMachineReimageParameters - - -class VirtualMachineScaleSetVMReimageParameters(VirtualMachineReimageParameters): - """Describes a Virtual Machine Scale Set VM Reimage Parameters. - - :param temp_disk: Specifies whether to reimage temp disk. Default value: - false. - :type temp_disk: bool - """ - - _attribute_map = { - 'temp_disk': {'key': 'tempDisk', 'type': 'bool'}, - } - - def __init__(self, *, temp_disk: bool=None, **kwargs) -> None: - super(VirtualMachineScaleSetVMReimageParameters, self).__init__(temp_disk=temp_disk, **kwargs) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/virtual_machine_size.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/virtual_machine_size.py deleted file mode 100644 index 0fef3efd6c8e..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/virtual_machine_size.py +++ /dev/null @@ -1,53 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineSize(Model): - """Describes the properties of a VM size. - - :param name: The name of the virtual machine size. - :type name: str - :param number_of_cores: The number of cores supported by the virtual - machine size. - :type number_of_cores: int - :param os_disk_size_in_mb: The OS disk size, in MB, allowed by the virtual - machine size. - :type os_disk_size_in_mb: int - :param resource_disk_size_in_mb: The resource disk size, in MB, allowed by - the virtual machine size. - :type resource_disk_size_in_mb: int - :param memory_in_mb: The amount of memory, in MB, supported by the virtual - machine size. - :type memory_in_mb: int - :param max_data_disk_count: The maximum number of data disks that can be - attached to the virtual machine size. - :type max_data_disk_count: int - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'number_of_cores': {'key': 'numberOfCores', 'type': 'int'}, - 'os_disk_size_in_mb': {'key': 'osDiskSizeInMB', 'type': 'int'}, - 'resource_disk_size_in_mb': {'key': 'resourceDiskSizeInMB', 'type': 'int'}, - 'memory_in_mb': {'key': 'memoryInMB', 'type': 'int'}, - 'max_data_disk_count': {'key': 'maxDataDiskCount', 'type': 'int'}, - } - - def __init__(self, **kwargs): - super(VirtualMachineSize, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.number_of_cores = kwargs.get('number_of_cores', None) - self.os_disk_size_in_mb = kwargs.get('os_disk_size_in_mb', None) - self.resource_disk_size_in_mb = kwargs.get('resource_disk_size_in_mb', None) - self.memory_in_mb = kwargs.get('memory_in_mb', None) - self.max_data_disk_count = kwargs.get('max_data_disk_count', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/virtual_machine_size_paged.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/virtual_machine_size_paged.py deleted file mode 100644 index 11c60502fb33..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/virtual_machine_size_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class VirtualMachineSizePaged(Paged): - """ - A paging container for iterating over a list of :class:`VirtualMachineSize ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[VirtualMachineSize]'} - } - - def __init__(self, *args, **kwargs): - - super(VirtualMachineSizePaged, self).__init__(*args, **kwargs) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/virtual_machine_size_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/virtual_machine_size_py3.py deleted file mode 100644 index 9f99ba20ce42..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/virtual_machine_size_py3.py +++ /dev/null @@ -1,53 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineSize(Model): - """Describes the properties of a VM size. - - :param name: The name of the virtual machine size. - :type name: str - :param number_of_cores: The number of cores supported by the virtual - machine size. - :type number_of_cores: int - :param os_disk_size_in_mb: The OS disk size, in MB, allowed by the virtual - machine size. - :type os_disk_size_in_mb: int - :param resource_disk_size_in_mb: The resource disk size, in MB, allowed by - the virtual machine size. - :type resource_disk_size_in_mb: int - :param memory_in_mb: The amount of memory, in MB, supported by the virtual - machine size. - :type memory_in_mb: int - :param max_data_disk_count: The maximum number of data disks that can be - attached to the virtual machine size. - :type max_data_disk_count: int - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'number_of_cores': {'key': 'numberOfCores', 'type': 'int'}, - 'os_disk_size_in_mb': {'key': 'osDiskSizeInMB', 'type': 'int'}, - 'resource_disk_size_in_mb': {'key': 'resourceDiskSizeInMB', 'type': 'int'}, - 'memory_in_mb': {'key': 'memoryInMB', 'type': 'int'}, - 'max_data_disk_count': {'key': 'maxDataDiskCount', 'type': 'int'}, - } - - def __init__(self, *, name: str=None, number_of_cores: int=None, os_disk_size_in_mb: int=None, resource_disk_size_in_mb: int=None, memory_in_mb: int=None, max_data_disk_count: int=None, **kwargs) -> None: - super(VirtualMachineSize, self).__init__(**kwargs) - self.name = name - self.number_of_cores = number_of_cores - self.os_disk_size_in_mb = os_disk_size_in_mb - self.resource_disk_size_in_mb = resource_disk_size_in_mb - self.memory_in_mb = memory_in_mb - self.max_data_disk_count = max_data_disk_count diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/virtual_machine_status_code_count.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/virtual_machine_status_code_count.py deleted file mode 100644 index 7df7b702acd7..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/virtual_machine_status_code_count.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineStatusCodeCount(Model): - """The status code and count of the virtual machine scale set instance view - status summary. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar code: The instance view status code. - :vartype code: str - :ivar count: The number of instances having a particular status code. - :vartype count: int - """ - - _validation = { - 'code': {'readonly': True}, - 'count': {'readonly': True}, - } - - _attribute_map = { - 'code': {'key': 'code', 'type': 'str'}, - 'count': {'key': 'count', 'type': 'int'}, - } - - def __init__(self, **kwargs): - super(VirtualMachineStatusCodeCount, self).__init__(**kwargs) - self.code = None - self.count = None diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/virtual_machine_status_code_count_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/virtual_machine_status_code_count_py3.py deleted file mode 100644 index c38800073a95..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/virtual_machine_status_code_count_py3.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineStatusCodeCount(Model): - """The status code and count of the virtual machine scale set instance view - status summary. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar code: The instance view status code. - :vartype code: str - :ivar count: The number of instances having a particular status code. - :vartype count: int - """ - - _validation = { - 'code': {'readonly': True}, - 'count': {'readonly': True}, - } - - _attribute_map = { - 'code': {'key': 'code', 'type': 'str'}, - 'count': {'key': 'count', 'type': 'int'}, - } - - def __init__(self, **kwargs) -> None: - super(VirtualMachineStatusCodeCount, self).__init__(**kwargs) - self.code = None - self.count = None diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/virtual_machine_update.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/virtual_machine_update.py deleted file mode 100644 index 7f25652d5301..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/virtual_machine_update.py +++ /dev/null @@ -1,139 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .update_resource import UpdateResource - - -class VirtualMachineUpdate(UpdateResource): - """Describes a Virtual Machine Update. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :param tags: Resource tags - :type tags: dict[str, str] - :param plan: Specifies information about the marketplace image used to - create the virtual machine. This element is only used for marketplace - images. Before you can use a marketplace image from an API, you must - enable the image for programmatic use. In the Azure portal, find the - marketplace image that you want to use and then click **Want to deploy - programmatically, Get Started ->**. Enter any required information and - then click **Save**. - :type plan: ~azure.mgmt.compute.v2018_06_01.models.Plan - :param hardware_profile: Specifies the hardware settings for the virtual - machine. - :type hardware_profile: - ~azure.mgmt.compute.v2018_06_01.models.HardwareProfile - :param storage_profile: Specifies the storage settings for the virtual - machine disks. - :type storage_profile: - ~azure.mgmt.compute.v2018_06_01.models.StorageProfile - :param additional_capabilities: Specifies additional capabilities enabled - or disabled on the virtual machine. - :type additional_capabilities: - ~azure.mgmt.compute.v2018_06_01.models.AdditionalCapabilities - :param os_profile: Specifies the operating system settings for the virtual - machine. - :type os_profile: ~azure.mgmt.compute.v2018_06_01.models.OSProfile - :param network_profile: Specifies the network interfaces of the virtual - machine. - :type network_profile: - ~azure.mgmt.compute.v2018_06_01.models.NetworkProfile - :param diagnostics_profile: Specifies the boot diagnostic settings state. -

    Minimum api-version: 2015-06-15. - :type diagnostics_profile: - ~azure.mgmt.compute.v2018_06_01.models.DiagnosticsProfile - :param availability_set: Specifies information about the availability set - that the virtual machine should be assigned to. Virtual machines specified - in the same availability set are allocated to different nodes to maximize - availability. For more information about availability sets, see [Manage - the availability of virtual - machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-manage-availability?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). -

    For more information on Azure planned maintenance, see [Planned - maintenance for virtual machines in - Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-planned-maintenance?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json) -

    Currently, a VM can only be added to availability set at creation - time. An existing VM cannot be added to an availability set. - :type availability_set: ~azure.mgmt.compute.v2018_06_01.models.SubResource - :param proximity_placement_group: Specifies information about the - proximity placement group that the virtual machine should be assigned to. -

    Minimum api-version: 2018-04-01. - :type proximity_placement_group: - ~azure.mgmt.compute.v2018_06_01.models.SubResource - :ivar provisioning_state: The provisioning state, which only appears in - the response. - :vartype provisioning_state: str - :ivar instance_view: The virtual machine instance view. - :vartype instance_view: - ~azure.mgmt.compute.v2018_06_01.models.VirtualMachineInstanceView - :param license_type: Specifies that the image or disk that is being used - was licensed on-premises. This element is only used for images that - contain the Windows Server operating system.

    Possible values are: -

    Windows_Client

    Windows_Server

    If this element - is included in a request for an update, the value must match the initial - value. This value cannot be updated.

    For more information, see - [Azure Hybrid Use Benefit for Windows - Server](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-hybrid-use-benefit-licensing?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json) -

    Minimum api-version: 2015-06-15 - :type license_type: str - :ivar vm_id: Specifies the VM unique ID which is a 128-bits identifier - that is encoded and stored in all Azure IaaS VMs SMBIOS and can be read - using platform BIOS commands. - :vartype vm_id: str - :param identity: The identity of the virtual machine, if configured. - :type identity: - ~azure.mgmt.compute.v2018_06_01.models.VirtualMachineIdentity - :param zones: The virtual machine zones. - :type zones: list[str] - """ - - _validation = { - 'provisioning_state': {'readonly': True}, - 'instance_view': {'readonly': True}, - 'vm_id': {'readonly': True}, - } - - _attribute_map = { - 'tags': {'key': 'tags', 'type': '{str}'}, - 'plan': {'key': 'plan', 'type': 'Plan'}, - 'hardware_profile': {'key': 'properties.hardwareProfile', 'type': 'HardwareProfile'}, - 'storage_profile': {'key': 'properties.storageProfile', 'type': 'StorageProfile'}, - 'additional_capabilities': {'key': 'properties.additionalCapabilities', 'type': 'AdditionalCapabilities'}, - 'os_profile': {'key': 'properties.osProfile', 'type': 'OSProfile'}, - 'network_profile': {'key': 'properties.networkProfile', 'type': 'NetworkProfile'}, - 'diagnostics_profile': {'key': 'properties.diagnosticsProfile', 'type': 'DiagnosticsProfile'}, - 'availability_set': {'key': 'properties.availabilitySet', 'type': 'SubResource'}, - 'proximity_placement_group': {'key': 'properties.proximityPlacementGroup', 'type': 'SubResource'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'instance_view': {'key': 'properties.instanceView', 'type': 'VirtualMachineInstanceView'}, - 'license_type': {'key': 'properties.licenseType', 'type': 'str'}, - 'vm_id': {'key': 'properties.vmId', 'type': 'str'}, - 'identity': {'key': 'identity', 'type': 'VirtualMachineIdentity'}, - 'zones': {'key': 'zones', 'type': '[str]'}, - } - - def __init__(self, **kwargs): - super(VirtualMachineUpdate, self).__init__(**kwargs) - self.plan = kwargs.get('plan', None) - self.hardware_profile = kwargs.get('hardware_profile', None) - self.storage_profile = kwargs.get('storage_profile', None) - self.additional_capabilities = kwargs.get('additional_capabilities', None) - self.os_profile = kwargs.get('os_profile', None) - self.network_profile = kwargs.get('network_profile', None) - self.diagnostics_profile = kwargs.get('diagnostics_profile', None) - self.availability_set = kwargs.get('availability_set', None) - self.proximity_placement_group = kwargs.get('proximity_placement_group', None) - self.provisioning_state = None - self.instance_view = None - self.license_type = kwargs.get('license_type', None) - self.vm_id = None - self.identity = kwargs.get('identity', None) - self.zones = kwargs.get('zones', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/virtual_machine_update_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/virtual_machine_update_py3.py deleted file mode 100644 index dc5875667528..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/virtual_machine_update_py3.py +++ /dev/null @@ -1,139 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .update_resource_py3 import UpdateResource - - -class VirtualMachineUpdate(UpdateResource): - """Describes a Virtual Machine Update. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :param tags: Resource tags - :type tags: dict[str, str] - :param plan: Specifies information about the marketplace image used to - create the virtual machine. This element is only used for marketplace - images. Before you can use a marketplace image from an API, you must - enable the image for programmatic use. In the Azure portal, find the - marketplace image that you want to use and then click **Want to deploy - programmatically, Get Started ->**. Enter any required information and - then click **Save**. - :type plan: ~azure.mgmt.compute.v2018_06_01.models.Plan - :param hardware_profile: Specifies the hardware settings for the virtual - machine. - :type hardware_profile: - ~azure.mgmt.compute.v2018_06_01.models.HardwareProfile - :param storage_profile: Specifies the storage settings for the virtual - machine disks. - :type storage_profile: - ~azure.mgmt.compute.v2018_06_01.models.StorageProfile - :param additional_capabilities: Specifies additional capabilities enabled - or disabled on the virtual machine. - :type additional_capabilities: - ~azure.mgmt.compute.v2018_06_01.models.AdditionalCapabilities - :param os_profile: Specifies the operating system settings for the virtual - machine. - :type os_profile: ~azure.mgmt.compute.v2018_06_01.models.OSProfile - :param network_profile: Specifies the network interfaces of the virtual - machine. - :type network_profile: - ~azure.mgmt.compute.v2018_06_01.models.NetworkProfile - :param diagnostics_profile: Specifies the boot diagnostic settings state. -

    Minimum api-version: 2015-06-15. - :type diagnostics_profile: - ~azure.mgmt.compute.v2018_06_01.models.DiagnosticsProfile - :param availability_set: Specifies information about the availability set - that the virtual machine should be assigned to. Virtual machines specified - in the same availability set are allocated to different nodes to maximize - availability. For more information about availability sets, see [Manage - the availability of virtual - machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-manage-availability?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). -

    For more information on Azure planned maintenance, see [Planned - maintenance for virtual machines in - Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-planned-maintenance?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json) -

    Currently, a VM can only be added to availability set at creation - time. An existing VM cannot be added to an availability set. - :type availability_set: ~azure.mgmt.compute.v2018_06_01.models.SubResource - :param proximity_placement_group: Specifies information about the - proximity placement group that the virtual machine should be assigned to. -

    Minimum api-version: 2018-04-01. - :type proximity_placement_group: - ~azure.mgmt.compute.v2018_06_01.models.SubResource - :ivar provisioning_state: The provisioning state, which only appears in - the response. - :vartype provisioning_state: str - :ivar instance_view: The virtual machine instance view. - :vartype instance_view: - ~azure.mgmt.compute.v2018_06_01.models.VirtualMachineInstanceView - :param license_type: Specifies that the image or disk that is being used - was licensed on-premises. This element is only used for images that - contain the Windows Server operating system.

    Possible values are: -

    Windows_Client

    Windows_Server

    If this element - is included in a request for an update, the value must match the initial - value. This value cannot be updated.

    For more information, see - [Azure Hybrid Use Benefit for Windows - Server](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-hybrid-use-benefit-licensing?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json) -

    Minimum api-version: 2015-06-15 - :type license_type: str - :ivar vm_id: Specifies the VM unique ID which is a 128-bits identifier - that is encoded and stored in all Azure IaaS VMs SMBIOS and can be read - using platform BIOS commands. - :vartype vm_id: str - :param identity: The identity of the virtual machine, if configured. - :type identity: - ~azure.mgmt.compute.v2018_06_01.models.VirtualMachineIdentity - :param zones: The virtual machine zones. - :type zones: list[str] - """ - - _validation = { - 'provisioning_state': {'readonly': True}, - 'instance_view': {'readonly': True}, - 'vm_id': {'readonly': True}, - } - - _attribute_map = { - 'tags': {'key': 'tags', 'type': '{str}'}, - 'plan': {'key': 'plan', 'type': 'Plan'}, - 'hardware_profile': {'key': 'properties.hardwareProfile', 'type': 'HardwareProfile'}, - 'storage_profile': {'key': 'properties.storageProfile', 'type': 'StorageProfile'}, - 'additional_capabilities': {'key': 'properties.additionalCapabilities', 'type': 'AdditionalCapabilities'}, - 'os_profile': {'key': 'properties.osProfile', 'type': 'OSProfile'}, - 'network_profile': {'key': 'properties.networkProfile', 'type': 'NetworkProfile'}, - 'diagnostics_profile': {'key': 'properties.diagnosticsProfile', 'type': 'DiagnosticsProfile'}, - 'availability_set': {'key': 'properties.availabilitySet', 'type': 'SubResource'}, - 'proximity_placement_group': {'key': 'properties.proximityPlacementGroup', 'type': 'SubResource'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'instance_view': {'key': 'properties.instanceView', 'type': 'VirtualMachineInstanceView'}, - 'license_type': {'key': 'properties.licenseType', 'type': 'str'}, - 'vm_id': {'key': 'properties.vmId', 'type': 'str'}, - 'identity': {'key': 'identity', 'type': 'VirtualMachineIdentity'}, - 'zones': {'key': 'zones', 'type': '[str]'}, - } - - def __init__(self, *, tags=None, plan=None, hardware_profile=None, storage_profile=None, additional_capabilities=None, os_profile=None, network_profile=None, diagnostics_profile=None, availability_set=None, proximity_placement_group=None, license_type: str=None, identity=None, zones=None, **kwargs) -> None: - super(VirtualMachineUpdate, self).__init__(tags=tags, **kwargs) - self.plan = plan - self.hardware_profile = hardware_profile - self.storage_profile = storage_profile - self.additional_capabilities = additional_capabilities - self.os_profile = os_profile - self.network_profile = network_profile - self.diagnostics_profile = diagnostics_profile - self.availability_set = availability_set - self.proximity_placement_group = proximity_placement_group - self.provisioning_state = None - self.instance_view = None - self.license_type = license_type - self.vm_id = None - self.identity = identity - self.zones = zones diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/win_rm_configuration.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/win_rm_configuration.py deleted file mode 100644 index b05699c9bc0f..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/win_rm_configuration.py +++ /dev/null @@ -1,29 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class WinRMConfiguration(Model): - """Describes Windows Remote Management configuration of the VM. - - :param listeners: The list of Windows Remote Management listeners - :type listeners: - list[~azure.mgmt.compute.v2018_06_01.models.WinRMListener] - """ - - _attribute_map = { - 'listeners': {'key': 'listeners', 'type': '[WinRMListener]'}, - } - - def __init__(self, **kwargs): - super(WinRMConfiguration, self).__init__(**kwargs) - self.listeners = kwargs.get('listeners', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/win_rm_configuration_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/win_rm_configuration_py3.py deleted file mode 100644 index 65abb9524f5a..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/win_rm_configuration_py3.py +++ /dev/null @@ -1,29 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class WinRMConfiguration(Model): - """Describes Windows Remote Management configuration of the VM. - - :param listeners: The list of Windows Remote Management listeners - :type listeners: - list[~azure.mgmt.compute.v2018_06_01.models.WinRMListener] - """ - - _attribute_map = { - 'listeners': {'key': 'listeners', 'type': '[WinRMListener]'}, - } - - def __init__(self, *, listeners=None, **kwargs) -> None: - super(WinRMConfiguration, self).__init__(**kwargs) - self.listeners = listeners diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/win_rm_listener.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/win_rm_listener.py deleted file mode 100644 index 60380cd251ef..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/win_rm_listener.py +++ /dev/null @@ -1,42 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class WinRMListener(Model): - """Describes Protocol and thumbprint of Windows Remote Management listener. - - :param protocol: Specifies the protocol of listener.

    Possible - values are:
    **http**

    **https**. Possible values include: - 'Http', 'Https' - :type protocol: str or - ~azure.mgmt.compute.v2018_06_01.models.ProtocolTypes - :param certificate_url: This is the URL of a certificate that has been - uploaded to Key Vault as a secret. For adding a secret to the Key Vault, - see [Add a key or secret to the key - vault](https://docs.microsoft.com/azure/key-vault/key-vault-get-started/#add). - In this case, your certificate needs to be It is the Base64 encoding of - the following JSON Object which is encoded in UTF-8:

    {
    - "data":"",
    "dataType":"pfx",
    - "password":""
    } - :type certificate_url: str - """ - - _attribute_map = { - 'protocol': {'key': 'protocol', 'type': 'ProtocolTypes'}, - 'certificate_url': {'key': 'certificateUrl', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(WinRMListener, self).__init__(**kwargs) - self.protocol = kwargs.get('protocol', None) - self.certificate_url = kwargs.get('certificate_url', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/win_rm_listener_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/win_rm_listener_py3.py deleted file mode 100644 index cb8630cc8979..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/win_rm_listener_py3.py +++ /dev/null @@ -1,42 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class WinRMListener(Model): - """Describes Protocol and thumbprint of Windows Remote Management listener. - - :param protocol: Specifies the protocol of listener.

    Possible - values are:
    **http**

    **https**. Possible values include: - 'Http', 'Https' - :type protocol: str or - ~azure.mgmt.compute.v2018_06_01.models.ProtocolTypes - :param certificate_url: This is the URL of a certificate that has been - uploaded to Key Vault as a secret. For adding a secret to the Key Vault, - see [Add a key or secret to the key - vault](https://docs.microsoft.com/azure/key-vault/key-vault-get-started/#add). - In this case, your certificate needs to be It is the Base64 encoding of - the following JSON Object which is encoded in UTF-8:

    {
    - "data":"",
    "dataType":"pfx",
    - "password":""
    } - :type certificate_url: str - """ - - _attribute_map = { - 'protocol': {'key': 'protocol', 'type': 'ProtocolTypes'}, - 'certificate_url': {'key': 'certificateUrl', 'type': 'str'}, - } - - def __init__(self, *, protocol=None, certificate_url: str=None, **kwargs) -> None: - super(WinRMListener, self).__init__(**kwargs) - self.protocol = protocol - self.certificate_url = certificate_url diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/windows_configuration.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/windows_configuration.py deleted file mode 100644 index e862239614c7..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/windows_configuration.py +++ /dev/null @@ -1,54 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class WindowsConfiguration(Model): - """Specifies Windows operating system settings on the virtual machine. - - :param provision_vm_agent: Indicates whether virtual machine agent should - be provisioned on the virtual machine.

    When this property is not - specified in the request body, default behavior is to set it to true. - This will ensure that VM Agent is installed on the VM so that extensions - can be added to the VM later. - :type provision_vm_agent: bool - :param enable_automatic_updates: Indicates whether virtual machine is - enabled for automatic updates. - :type enable_automatic_updates: bool - :param time_zone: Specifies the time zone of the virtual machine. e.g. - "Pacific Standard Time" - :type time_zone: str - :param additional_unattend_content: Specifies additional base-64 encoded - XML formatted information that can be included in the Unattend.xml file, - which is used by Windows Setup. - :type additional_unattend_content: - list[~azure.mgmt.compute.v2018_06_01.models.AdditionalUnattendContent] - :param win_rm: Specifies the Windows Remote Management listeners. This - enables remote Windows PowerShell. - :type win_rm: ~azure.mgmt.compute.v2018_06_01.models.WinRMConfiguration - """ - - _attribute_map = { - 'provision_vm_agent': {'key': 'provisionVMAgent', 'type': 'bool'}, - 'enable_automatic_updates': {'key': 'enableAutomaticUpdates', 'type': 'bool'}, - 'time_zone': {'key': 'timeZone', 'type': 'str'}, - 'additional_unattend_content': {'key': 'additionalUnattendContent', 'type': '[AdditionalUnattendContent]'}, - 'win_rm': {'key': 'winRM', 'type': 'WinRMConfiguration'}, - } - - def __init__(self, **kwargs): - super(WindowsConfiguration, self).__init__(**kwargs) - self.provision_vm_agent = kwargs.get('provision_vm_agent', None) - self.enable_automatic_updates = kwargs.get('enable_automatic_updates', None) - self.time_zone = kwargs.get('time_zone', None) - self.additional_unattend_content = kwargs.get('additional_unattend_content', None) - self.win_rm = kwargs.get('win_rm', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/windows_configuration_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/windows_configuration_py3.py deleted file mode 100644 index d05164409126..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/windows_configuration_py3.py +++ /dev/null @@ -1,54 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class WindowsConfiguration(Model): - """Specifies Windows operating system settings on the virtual machine. - - :param provision_vm_agent: Indicates whether virtual machine agent should - be provisioned on the virtual machine.

    When this property is not - specified in the request body, default behavior is to set it to true. - This will ensure that VM Agent is installed on the VM so that extensions - can be added to the VM later. - :type provision_vm_agent: bool - :param enable_automatic_updates: Indicates whether virtual machine is - enabled for automatic updates. - :type enable_automatic_updates: bool - :param time_zone: Specifies the time zone of the virtual machine. e.g. - "Pacific Standard Time" - :type time_zone: str - :param additional_unattend_content: Specifies additional base-64 encoded - XML formatted information that can be included in the Unattend.xml file, - which is used by Windows Setup. - :type additional_unattend_content: - list[~azure.mgmt.compute.v2018_06_01.models.AdditionalUnattendContent] - :param win_rm: Specifies the Windows Remote Management listeners. This - enables remote Windows PowerShell. - :type win_rm: ~azure.mgmt.compute.v2018_06_01.models.WinRMConfiguration - """ - - _attribute_map = { - 'provision_vm_agent': {'key': 'provisionVMAgent', 'type': 'bool'}, - 'enable_automatic_updates': {'key': 'enableAutomaticUpdates', 'type': 'bool'}, - 'time_zone': {'key': 'timeZone', 'type': 'str'}, - 'additional_unattend_content': {'key': 'additionalUnattendContent', 'type': '[AdditionalUnattendContent]'}, - 'win_rm': {'key': 'winRM', 'type': 'WinRMConfiguration'}, - } - - def __init__(self, *, provision_vm_agent: bool=None, enable_automatic_updates: bool=None, time_zone: str=None, additional_unattend_content=None, win_rm=None, **kwargs) -> None: - super(WindowsConfiguration, self).__init__(**kwargs) - self.provision_vm_agent = provision_vm_agent - self.enable_automatic_updates = enable_automatic_updates - self.time_zone = time_zone - self.additional_unattend_content = additional_unattend_content - self.win_rm = win_rm diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/operations/__init__.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/operations/__init__.py index 6453ffb5c290..449b2c5819c1 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/operations/__init__.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/operations/__init__.py @@ -9,27 +9,27 @@ # regenerated. # -------------------------------------------------------------------------- -from .operations import Operations -from .availability_sets_operations import AvailabilitySetsOperations -from .proximity_placement_groups_operations import ProximityPlacementGroupsOperations -from .virtual_machine_extension_images_operations import VirtualMachineExtensionImagesOperations -from .virtual_machine_extensions_operations import VirtualMachineExtensionsOperations -from .virtual_machine_images_operations import VirtualMachineImagesOperations -from .usage_operations import UsageOperations -from .virtual_machines_operations import VirtualMachinesOperations -from .virtual_machine_sizes_operations import VirtualMachineSizesOperations -from .images_operations import ImagesOperations -from .virtual_machine_scale_sets_operations import VirtualMachineScaleSetsOperations -from .virtual_machine_scale_set_extensions_operations import VirtualMachineScaleSetExtensionsOperations -from .virtual_machine_scale_set_rolling_upgrades_operations import VirtualMachineScaleSetRollingUpgradesOperations -from .virtual_machine_scale_set_vms_operations import VirtualMachineScaleSetVMsOperations -from .log_analytics_operations import LogAnalyticsOperations -from .virtual_machine_run_commands_operations import VirtualMachineRunCommandsOperations -from .galleries_operations import GalleriesOperations -from .gallery_images_operations import GalleryImagesOperations -from .gallery_image_versions_operations import GalleryImageVersionsOperations -from .disks_operations import DisksOperations -from .snapshots_operations import SnapshotsOperations +from ._operations import Operations +from ._availability_sets_operations import AvailabilitySetsOperations +from ._proximity_placement_groups_operations import ProximityPlacementGroupsOperations +from ._virtual_machine_extension_images_operations import VirtualMachineExtensionImagesOperations +from ._virtual_machine_extensions_operations import VirtualMachineExtensionsOperations +from ._virtual_machine_images_operations import VirtualMachineImagesOperations +from ._usage_operations import UsageOperations +from ._virtual_machines_operations import VirtualMachinesOperations +from ._virtual_machine_sizes_operations import VirtualMachineSizesOperations +from ._images_operations import ImagesOperations +from ._virtual_machine_scale_sets_operations import VirtualMachineScaleSetsOperations +from ._virtual_machine_scale_set_extensions_operations import VirtualMachineScaleSetExtensionsOperations +from ._virtual_machine_scale_set_rolling_upgrades_operations import VirtualMachineScaleSetRollingUpgradesOperations +from ._virtual_machine_scale_set_vms_operations import VirtualMachineScaleSetVMsOperations +from ._log_analytics_operations import LogAnalyticsOperations +from ._virtual_machine_run_commands_operations import VirtualMachineRunCommandsOperations +from ._galleries_operations import GalleriesOperations +from ._gallery_images_operations import GalleryImagesOperations +from ._gallery_image_versions_operations import GalleryImageVersionsOperations +from ._disks_operations import DisksOperations +from ._snapshots_operations import SnapshotsOperations __all__ = [ 'Operations', diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/operations/_availability_sets_operations.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/operations/_availability_sets_operations.py new file mode 100644 index 000000000000..1adfe675daf5 --- /dev/null +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/operations/_availability_sets_operations.py @@ -0,0 +1,500 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse +from msrestazure.azure_exceptions import CloudError + +from .. import models + + +class AvailabilitySetsOperations(object): + """AvailabilitySetsOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: Client Api Version. Constant value: "2018-06-01". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2018-06-01" + + self.config = config + + def create_or_update( + self, resource_group_name, availability_set_name, parameters, custom_headers=None, raw=False, **operation_config): + """Create or update an availability set. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param availability_set_name: The name of the availability set. + :type availability_set_name: str + :param parameters: Parameters supplied to the Create Availability Set + operation. + :type parameters: + ~azure.mgmt.compute.v2018_06_01.models.AvailabilitySet + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: AvailabilitySet or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.compute.v2018_06_01.models.AvailabilitySet or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.create_or_update.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'availabilitySetName': self._serialize.url("availability_set_name", availability_set_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(parameters, 'AvailabilitySet') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('AvailabilitySet', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}'} + + def update( + self, resource_group_name, availability_set_name, parameters, custom_headers=None, raw=False, **operation_config): + """Update an availability set. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param availability_set_name: The name of the availability set. + :type availability_set_name: str + :param parameters: Parameters supplied to the Update Availability Set + operation. + :type parameters: + ~azure.mgmt.compute.v2018_06_01.models.AvailabilitySetUpdate + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: AvailabilitySet or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.compute.v2018_06_01.models.AvailabilitySet or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.update.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'availabilitySetName': self._serialize.url("availability_set_name", availability_set_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(parameters, 'AvailabilitySetUpdate') + + # Construct and send request + request = self._client.patch(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('AvailabilitySet', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}'} + + def delete( + self, resource_group_name, availability_set_name, custom_headers=None, raw=False, **operation_config): + """Delete an availability set. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param availability_set_name: The name of the availability set. + :type availability_set_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.delete.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'availabilitySetName': self._serialize.url("availability_set_name", availability_set_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 204]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}'} + + def get( + self, resource_group_name, availability_set_name, custom_headers=None, raw=False, **operation_config): + """Retrieves information about an availability set. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param availability_set_name: The name of the availability set. + :type availability_set_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: AvailabilitySet or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.compute.v2018_06_01.models.AvailabilitySet or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'availabilitySetName': self._serialize.url("availability_set_name", availability_set_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('AvailabilitySet', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}'} + + def list_by_subscription( + self, custom_headers=None, raw=False, **operation_config): + """Lists all availability sets in a subscription. + + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of AvailabilitySet + :rtype: + ~azure.mgmt.compute.v2018_06_01.models.AvailabilitySetPaged[~azure.mgmt.compute.v2018_06_01.models.AvailabilitySet] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_by_subscription.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.AvailabilitySetPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_by_subscription.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Compute/availabilitySets'} + + def list( + self, resource_group_name, custom_headers=None, raw=False, **operation_config): + """Lists all availability sets in a resource group. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of AvailabilitySet + :rtype: + ~azure.mgmt.compute.v2018_06_01.models.AvailabilitySetPaged[~azure.mgmt.compute.v2018_06_01.models.AvailabilitySet] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.AvailabilitySetPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets'} + + def list_available_sizes( + self, resource_group_name, availability_set_name, custom_headers=None, raw=False, **operation_config): + """Lists all available virtual machine sizes that can be used to create a + new virtual machine in an existing availability set. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param availability_set_name: The name of the availability set. + :type availability_set_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of VirtualMachineSize + :rtype: + ~azure.mgmt.compute.v2018_06_01.models.VirtualMachineSizePaged[~azure.mgmt.compute.v2018_06_01.models.VirtualMachineSize] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_available_sizes.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'availabilitySetName': self._serialize.url("availability_set_name", availability_set_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.VirtualMachineSizePaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_available_sizes.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}/vmSizes'} diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/operations/_disks_operations.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/operations/_disks_operations.py new file mode 100644 index 000000000000..a8f2734a694d --- /dev/null +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/operations/_disks_operations.py @@ -0,0 +1,727 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse +from msrestazure.azure_exceptions import CloudError +from msrest.polling import LROPoller, NoPolling +from msrestazure.polling.arm_polling import ARMPolling + +from .. import models + + +class DisksOperations(object): + """DisksOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: Client Api Version. Constant value: "2018-06-01". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2018-06-01" + + self.config = config + + + def _create_or_update_initial( + self, resource_group_name, disk_name, disk, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.create_or_update.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'diskName': self._serialize.url("disk_name", disk_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(disk, 'Disk') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('Disk', response) + if response.status_code == 202: + deserialized = self._deserialize('Disk', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def create_or_update( + self, resource_group_name, disk_name, disk, custom_headers=None, raw=False, polling=True, **operation_config): + """Creates or updates a disk. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param disk_name: The name of the managed disk that is being created. + The name can't be changed after the disk is created. Supported + characters for the name are a-z, A-Z, 0-9 and _. The maximum name + length is 80 characters. + :type disk_name: str + :param disk: Disk object supplied in the body of the Put disk + operation. + :type disk: ~azure.mgmt.compute.v2018_06_01.models.Disk + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns Disk or + ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2018_06_01.models.Disk] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2018_06_01.models.Disk]] + :raises: :class:`CloudError` + """ + raw_result = self._create_or_update_initial( + resource_group_name=resource_group_name, + disk_name=disk_name, + disk=disk, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('Disk', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/disks/{diskName}'} + + + def _update_initial( + self, resource_group_name, disk_name, disk, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.update.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'diskName': self._serialize.url("disk_name", disk_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(disk, 'DiskUpdate') + + # Construct and send request + request = self._client.patch(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('Disk', response) + if response.status_code == 202: + deserialized = self._deserialize('Disk', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def update( + self, resource_group_name, disk_name, disk, custom_headers=None, raw=False, polling=True, **operation_config): + """Updates (patches) a disk. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param disk_name: The name of the managed disk that is being created. + The name can't be changed after the disk is created. Supported + characters for the name are a-z, A-Z, 0-9 and _. The maximum name + length is 80 characters. + :type disk_name: str + :param disk: Disk object supplied in the body of the Patch disk + operation. + :type disk: ~azure.mgmt.compute.v2018_06_01.models.DiskUpdate + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns Disk or + ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2018_06_01.models.Disk] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2018_06_01.models.Disk]] + :raises: :class:`CloudError` + """ + raw_result = self._update_initial( + resource_group_name=resource_group_name, + disk_name=disk_name, + disk=disk, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('Disk', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/disks/{diskName}'} + + def get( + self, resource_group_name, disk_name, custom_headers=None, raw=False, **operation_config): + """Gets information about a disk. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param disk_name: The name of the managed disk that is being created. + The name can't be changed after the disk is created. Supported + characters for the name are a-z, A-Z, 0-9 and _. The maximum name + length is 80 characters. + :type disk_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: Disk or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.compute.v2018_06_01.models.Disk or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'diskName': self._serialize.url("disk_name", disk_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('Disk', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/disks/{diskName}'} + + + def _delete_initial( + self, resource_group_name, disk_name, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.delete.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'diskName': self._serialize.url("disk_name", disk_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202, 204]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + def delete( + self, resource_group_name, disk_name, custom_headers=None, raw=False, polling=True, **operation_config): + """Deletes a disk. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param disk_name: The name of the managed disk that is being created. + The name can't be changed after the disk is created. Supported + characters for the name are a-z, A-Z, 0-9 and _. The maximum name + length is 80 characters. + :type disk_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns None or + ClientRawResponse if raw==True + :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] + :raises: :class:`CloudError` + """ + raw_result = self._delete_initial( + resource_group_name=resource_group_name, + disk_name=disk_name, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/disks/{diskName}'} + + def list_by_resource_group( + self, resource_group_name, custom_headers=None, raw=False, **operation_config): + """Lists all the disks under a resource group. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of Disk + :rtype: + ~azure.mgmt.compute.v2018_06_01.models.DiskPaged[~azure.mgmt.compute.v2018_06_01.models.Disk] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_by_resource_group.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.DiskPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/disks'} + + def list( + self, custom_headers=None, raw=False, **operation_config): + """Lists all the disks under a subscription. + + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of Disk + :rtype: + ~azure.mgmt.compute.v2018_06_01.models.DiskPaged[~azure.mgmt.compute.v2018_06_01.models.Disk] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.DiskPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Compute/disks'} + + + def _grant_access_initial( + self, resource_group_name, disk_name, access, duration_in_seconds, custom_headers=None, raw=False, **operation_config): + grant_access_data = models.GrantAccessData(access=access, duration_in_seconds=duration_in_seconds) + + # Construct URL + url = self.grant_access.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'diskName': self._serialize.url("disk_name", disk_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(grant_access_data, 'GrantAccessData') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('AccessUri', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def grant_access( + self, resource_group_name, disk_name, access, duration_in_seconds, custom_headers=None, raw=False, polling=True, **operation_config): + """Grants access to a disk. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param disk_name: The name of the managed disk that is being created. + The name can't be changed after the disk is created. Supported + characters for the name are a-z, A-Z, 0-9 and _. The maximum name + length is 80 characters. + :type disk_name: str + :param access: Possible values include: 'None', 'Read' + :type access: str or + ~azure.mgmt.compute.v2018_06_01.models.AccessLevel + :param duration_in_seconds: Time duration in seconds until the SAS + access expires. + :type duration_in_seconds: int + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns AccessUri or + ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2018_06_01.models.AccessUri] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2018_06_01.models.AccessUri]] + :raises: :class:`CloudError` + """ + raw_result = self._grant_access_initial( + resource_group_name=resource_group_name, + disk_name=disk_name, + access=access, + duration_in_seconds=duration_in_seconds, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('AccessUri', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + grant_access.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/disks/{diskName}/beginGetAccess'} + + + def _revoke_access_initial( + self, resource_group_name, disk_name, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.revoke_access.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'diskName': self._serialize.url("disk_name", disk_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + def revoke_access( + self, resource_group_name, disk_name, custom_headers=None, raw=False, polling=True, **operation_config): + """Revokes access to a disk. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param disk_name: The name of the managed disk that is being created. + The name can't be changed after the disk is created. Supported + characters for the name are a-z, A-Z, 0-9 and _. The maximum name + length is 80 characters. + :type disk_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns None or + ClientRawResponse if raw==True + :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] + :raises: :class:`CloudError` + """ + raw_result = self._revoke_access_initial( + resource_group_name=resource_group_name, + disk_name=disk_name, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + revoke_access.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/disks/{diskName}/endGetAccess'} diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/operations/_galleries_operations.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/operations/_galleries_operations.py new file mode 100644 index 000000000000..f43ca8b32f20 --- /dev/null +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/operations/_galleries_operations.py @@ -0,0 +1,425 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse +from msrestazure.azure_exceptions import CloudError +from msrest.polling import LROPoller, NoPolling +from msrestazure.polling.arm_polling import ARMPolling + +from .. import models + + +class GalleriesOperations(object): + """GalleriesOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: Client Api Version. Constant value: "2018-06-01". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2018-06-01" + + self.config = config + + + def _create_or_update_initial( + self, resource_group_name, gallery_name, gallery, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.create_or_update.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'galleryName': self._serialize.url("gallery_name", gallery_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(gallery, 'Gallery') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 201, 202]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('Gallery', response) + if response.status_code == 201: + deserialized = self._deserialize('Gallery', response) + if response.status_code == 202: + deserialized = self._deserialize('Gallery', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def create_or_update( + self, resource_group_name, gallery_name, gallery, custom_headers=None, raw=False, polling=True, **operation_config): + """Create or update a Shared Image Gallery. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param gallery_name: The name of the Shared Image Gallery. The allowed + characters are alphabets and numbers with dots and periods allowed in + the middle. The maximum length is 80 characters. + :type gallery_name: str + :param gallery: Parameters supplied to the create or update Shared + Image Gallery operation. + :type gallery: ~azure.mgmt.compute.v2018_06_01.models.Gallery + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns Gallery or + ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2018_06_01.models.Gallery] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2018_06_01.models.Gallery]] + :raises: :class:`CloudError` + """ + raw_result = self._create_or_update_initial( + resource_group_name=resource_group_name, + gallery_name=gallery_name, + gallery=gallery, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('Gallery', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}'} + + def get( + self, resource_group_name, gallery_name, custom_headers=None, raw=False, **operation_config): + """Retrieves information about a Shared Image Gallery. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param gallery_name: The name of the Shared Image Gallery. + :type gallery_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: Gallery or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.compute.v2018_06_01.models.Gallery or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'galleryName': self._serialize.url("gallery_name", gallery_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('Gallery', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}'} + + + def _delete_initial( + self, resource_group_name, gallery_name, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.delete.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'galleryName': self._serialize.url("gallery_name", gallery_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202, 204]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + def delete( + self, resource_group_name, gallery_name, custom_headers=None, raw=False, polling=True, **operation_config): + """Delete a Shared Image Gallery. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param gallery_name: The name of the Shared Image Gallery to be + deleted. + :type gallery_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns None or + ClientRawResponse if raw==True + :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] + :raises: :class:`CloudError` + """ + raw_result = self._delete_initial( + resource_group_name=resource_group_name, + gallery_name=gallery_name, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}'} + + def list_by_resource_group( + self, resource_group_name, custom_headers=None, raw=False, **operation_config): + """List galleries under a resource group. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of Gallery + :rtype: + ~azure.mgmt.compute.v2018_06_01.models.GalleryPaged[~azure.mgmt.compute.v2018_06_01.models.Gallery] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_by_resource_group.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.GalleryPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries'} + + def list( + self, custom_headers=None, raw=False, **operation_config): + """List galleries under a subscription. + + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of Gallery + :rtype: + ~azure.mgmt.compute.v2018_06_01.models.GalleryPaged[~azure.mgmt.compute.v2018_06_01.models.Gallery] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.GalleryPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Compute/galleries'} diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/operations/_gallery_image_versions_operations.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/operations/_gallery_image_versions_operations.py new file mode 100644 index 000000000000..e27d1b96c04c --- /dev/null +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/operations/_gallery_image_versions_operations.py @@ -0,0 +1,405 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse +from msrestazure.azure_exceptions import CloudError +from msrest.polling import LROPoller, NoPolling +from msrestazure.polling.arm_polling import ARMPolling + +from .. import models + + +class GalleryImageVersionsOperations(object): + """GalleryImageVersionsOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: Client Api Version. Constant value: "2018-06-01". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2018-06-01" + + self.config = config + + + def _create_or_update_initial( + self, resource_group_name, gallery_name, gallery_image_name, gallery_image_version_name, gallery_image_version, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.create_or_update.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'galleryName': self._serialize.url("gallery_name", gallery_name, 'str'), + 'galleryImageName': self._serialize.url("gallery_image_name", gallery_image_name, 'str'), + 'galleryImageVersionName': self._serialize.url("gallery_image_version_name", gallery_image_version_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(gallery_image_version, 'GalleryImageVersion') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 201, 202]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('GalleryImageVersion', response) + if response.status_code == 201: + deserialized = self._deserialize('GalleryImageVersion', response) + if response.status_code == 202: + deserialized = self._deserialize('GalleryImageVersion', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def create_or_update( + self, resource_group_name, gallery_name, gallery_image_name, gallery_image_version_name, gallery_image_version, custom_headers=None, raw=False, polling=True, **operation_config): + """Create or update a gallery Image Version. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param gallery_name: The name of the Shared Image Gallery in which the + Image Definition resides. + :type gallery_name: str + :param gallery_image_name: The name of the gallery Image Definition in + which the Image Version is to be created. + :type gallery_image_name: str + :param gallery_image_version_name: The name of the gallery Image + Version to be created. Needs to follow semantic version name pattern: + The allowed characters are digit and period. Digits must be within the + range of a 32-bit integer. Format: + .. + :type gallery_image_version_name: str + :param gallery_image_version: Parameters supplied to the create or + update gallery Image Version operation. + :type gallery_image_version: + ~azure.mgmt.compute.v2018_06_01.models.GalleryImageVersion + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns GalleryImageVersion or + ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2018_06_01.models.GalleryImageVersion] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2018_06_01.models.GalleryImageVersion]] + :raises: :class:`CloudError` + """ + raw_result = self._create_or_update_initial( + resource_group_name=resource_group_name, + gallery_name=gallery_name, + gallery_image_name=gallery_image_name, + gallery_image_version_name=gallery_image_version_name, + gallery_image_version=gallery_image_version, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('GalleryImageVersion', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/images/{galleryImageName}/versions/{galleryImageVersionName}'} + + def get( + self, resource_group_name, gallery_name, gallery_image_name, gallery_image_version_name, expand=None, custom_headers=None, raw=False, **operation_config): + """Retrieves information about a gallery Image Version. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param gallery_name: The name of the Shared Image Gallery in which the + Image Definition resides. + :type gallery_name: str + :param gallery_image_name: The name of the gallery Image Definition in + which the Image Version resides. + :type gallery_image_name: str + :param gallery_image_version_name: The name of the gallery Image + Version to be retrieved. + :type gallery_image_version_name: str + :param expand: The expand expression to apply on the operation. + Possible values include: 'ReplicationStatus' + :type expand: str or + ~azure.mgmt.compute.v2018_06_01.models.ReplicationStatusTypes + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: GalleryImageVersion or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.compute.v2018_06_01.models.GalleryImageVersion or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'galleryName': self._serialize.url("gallery_name", gallery_name, 'str'), + 'galleryImageName': self._serialize.url("gallery_image_name", gallery_image_name, 'str'), + 'galleryImageVersionName': self._serialize.url("gallery_image_version_name", gallery_image_version_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + if expand is not None: + query_parameters['$expand'] = self._serialize.query("expand", expand, 'str') + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('GalleryImageVersion', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/images/{galleryImageName}/versions/{galleryImageVersionName}'} + + + def _delete_initial( + self, resource_group_name, gallery_name, gallery_image_name, gallery_image_version_name, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.delete.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'galleryName': self._serialize.url("gallery_name", gallery_name, 'str'), + 'galleryImageName': self._serialize.url("gallery_image_name", gallery_image_name, 'str'), + 'galleryImageVersionName': self._serialize.url("gallery_image_version_name", gallery_image_version_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202, 204]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + def delete( + self, resource_group_name, gallery_name, gallery_image_name, gallery_image_version_name, custom_headers=None, raw=False, polling=True, **operation_config): + """Delete a gallery Image Version. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param gallery_name: The name of the Shared Image Gallery in which the + Image Definition resides. + :type gallery_name: str + :param gallery_image_name: The name of the gallery Image Definition in + which the Image Version resides. + :type gallery_image_name: str + :param gallery_image_version_name: The name of the gallery Image + Version to be deleted. + :type gallery_image_version_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns None or + ClientRawResponse if raw==True + :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] + :raises: :class:`CloudError` + """ + raw_result = self._delete_initial( + resource_group_name=resource_group_name, + gallery_name=gallery_name, + gallery_image_name=gallery_image_name, + gallery_image_version_name=gallery_image_version_name, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/images/{galleryImageName}/versions/{galleryImageVersionName}'} + + def list_by_gallery_image( + self, resource_group_name, gallery_name, gallery_image_name, custom_headers=None, raw=False, **operation_config): + """List gallery Image Versions in a gallery Image Definition. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param gallery_name: The name of the Shared Image Gallery in which the + Image Definition resides. + :type gallery_name: str + :param gallery_image_name: The name of the Shared Image Gallery Image + Definition from which the Image Versions are to be listed. + :type gallery_image_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of GalleryImageVersion + :rtype: + ~azure.mgmt.compute.v2018_06_01.models.GalleryImageVersionPaged[~azure.mgmt.compute.v2018_06_01.models.GalleryImageVersion] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_by_gallery_image.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'galleryName': self._serialize.url("gallery_name", gallery_name, 'str'), + 'galleryImageName': self._serialize.url("gallery_image_name", gallery_image_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.GalleryImageVersionPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_by_gallery_image.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/images/{galleryImageName}/versions'} diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/operations/_gallery_images_operations.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/operations/_gallery_images_operations.py new file mode 100644 index 000000000000..ed717aacb253 --- /dev/null +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/operations/_gallery_images_operations.py @@ -0,0 +1,380 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse +from msrestazure.azure_exceptions import CloudError +from msrest.polling import LROPoller, NoPolling +from msrestazure.polling.arm_polling import ARMPolling + +from .. import models + + +class GalleryImagesOperations(object): + """GalleryImagesOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: Client Api Version. Constant value: "2018-06-01". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2018-06-01" + + self.config = config + + + def _create_or_update_initial( + self, resource_group_name, gallery_name, gallery_image_name, gallery_image, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.create_or_update.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'galleryName': self._serialize.url("gallery_name", gallery_name, 'str'), + 'galleryImageName': self._serialize.url("gallery_image_name", gallery_image_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(gallery_image, 'GalleryImage') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 201, 202]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('GalleryImage', response) + if response.status_code == 201: + deserialized = self._deserialize('GalleryImage', response) + if response.status_code == 202: + deserialized = self._deserialize('GalleryImage', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def create_or_update( + self, resource_group_name, gallery_name, gallery_image_name, gallery_image, custom_headers=None, raw=False, polling=True, **operation_config): + """Create or update a gallery Image Definition. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param gallery_name: The name of the Shared Image Gallery in which the + Image Definition is to be created. + :type gallery_name: str + :param gallery_image_name: The name of the gallery Image Definition to + be created or updated. The allowed characters are alphabets and + numbers with dots, dashes, and periods allowed in the middle. The + maximum length is 80 characters. + :type gallery_image_name: str + :param gallery_image: Parameters supplied to the create or update + gallery image operation. + :type gallery_image: + ~azure.mgmt.compute.v2018_06_01.models.GalleryImage + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns GalleryImage or + ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2018_06_01.models.GalleryImage] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2018_06_01.models.GalleryImage]] + :raises: :class:`CloudError` + """ + raw_result = self._create_or_update_initial( + resource_group_name=resource_group_name, + gallery_name=gallery_name, + gallery_image_name=gallery_image_name, + gallery_image=gallery_image, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('GalleryImage', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/images/{galleryImageName}'} + + def get( + self, resource_group_name, gallery_name, gallery_image_name, custom_headers=None, raw=False, **operation_config): + """Retrieves information about a gallery Image Definition. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param gallery_name: The name of the Shared Image Gallery from which + the Image Definitions are to be retrieved. + :type gallery_name: str + :param gallery_image_name: The name of the gallery Image Definition to + be retrieved. + :type gallery_image_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: GalleryImage or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.compute.v2018_06_01.models.GalleryImage or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'galleryName': self._serialize.url("gallery_name", gallery_name, 'str'), + 'galleryImageName': self._serialize.url("gallery_image_name", gallery_image_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('GalleryImage', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/images/{galleryImageName}'} + + + def _delete_initial( + self, resource_group_name, gallery_name, gallery_image_name, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.delete.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'galleryName': self._serialize.url("gallery_name", gallery_name, 'str'), + 'galleryImageName': self._serialize.url("gallery_image_name", gallery_image_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202, 204]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + def delete( + self, resource_group_name, gallery_name, gallery_image_name, custom_headers=None, raw=False, polling=True, **operation_config): + """Delete a gallery image. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param gallery_name: The name of the Shared Image Gallery in which the + Image Definition is to be deleted. + :type gallery_name: str + :param gallery_image_name: The name of the gallery Image Definition to + be deleted. + :type gallery_image_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns None or + ClientRawResponse if raw==True + :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] + :raises: :class:`CloudError` + """ + raw_result = self._delete_initial( + resource_group_name=resource_group_name, + gallery_name=gallery_name, + gallery_image_name=gallery_image_name, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/images/{galleryImageName}'} + + def list_by_gallery( + self, resource_group_name, gallery_name, custom_headers=None, raw=False, **operation_config): + """List gallery Image Definitions in a gallery. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param gallery_name: The name of the Shared Image Gallery from which + Image Definitions are to be listed. + :type gallery_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of GalleryImage + :rtype: + ~azure.mgmt.compute.v2018_06_01.models.GalleryImagePaged[~azure.mgmt.compute.v2018_06_01.models.GalleryImage] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_by_gallery.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'galleryName': self._serialize.url("gallery_name", gallery_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.GalleryImagePaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_by_gallery.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/images'} diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/operations/_images_operations.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/operations/_images_operations.py new file mode 100644 index 000000000000..75fbba32f233 --- /dev/null +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/operations/_images_operations.py @@ -0,0 +1,527 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse +from msrestazure.azure_exceptions import CloudError +from msrest.polling import LROPoller, NoPolling +from msrestazure.polling.arm_polling import ARMPolling + +from .. import models + + +class ImagesOperations(object): + """ImagesOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: Client Api Version. Constant value: "2018-06-01". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2018-06-01" + + self.config = config + + + def _create_or_update_initial( + self, resource_group_name, image_name, parameters, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.create_or_update.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'imageName': self._serialize.url("image_name", image_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(parameters, 'Image') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 201]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('Image', response) + if response.status_code == 201: + deserialized = self._deserialize('Image', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def create_or_update( + self, resource_group_name, image_name, parameters, custom_headers=None, raw=False, polling=True, **operation_config): + """Create or update an image. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param image_name: The name of the image. + :type image_name: str + :param parameters: Parameters supplied to the Create Image operation. + :type parameters: ~azure.mgmt.compute.v2018_06_01.models.Image + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns Image or + ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2018_06_01.models.Image] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2018_06_01.models.Image]] + :raises: :class:`CloudError` + """ + raw_result = self._create_or_update_initial( + resource_group_name=resource_group_name, + image_name=image_name, + parameters=parameters, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('Image', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/images/{imageName}'} + + + def _update_initial( + self, resource_group_name, image_name, parameters, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.update.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'imageName': self._serialize.url("image_name", image_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(parameters, 'ImageUpdate') + + # Construct and send request + request = self._client.patch(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 201]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('Image', response) + if response.status_code == 201: + deserialized = self._deserialize('Image', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def update( + self, resource_group_name, image_name, parameters, custom_headers=None, raw=False, polling=True, **operation_config): + """Update an image. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param image_name: The name of the image. + :type image_name: str + :param parameters: Parameters supplied to the Update Image operation. + :type parameters: ~azure.mgmt.compute.v2018_06_01.models.ImageUpdate + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns Image or + ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2018_06_01.models.Image] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2018_06_01.models.Image]] + :raises: :class:`CloudError` + """ + raw_result = self._update_initial( + resource_group_name=resource_group_name, + image_name=image_name, + parameters=parameters, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('Image', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/images/{imageName}'} + + + def _delete_initial( + self, resource_group_name, image_name, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.delete.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'imageName': self._serialize.url("image_name", image_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202, 204]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + def delete( + self, resource_group_name, image_name, custom_headers=None, raw=False, polling=True, **operation_config): + """Deletes an Image. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param image_name: The name of the image. + :type image_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns None or + ClientRawResponse if raw==True + :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] + :raises: :class:`CloudError` + """ + raw_result = self._delete_initial( + resource_group_name=resource_group_name, + image_name=image_name, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/images/{imageName}'} + + def get( + self, resource_group_name, image_name, expand=None, custom_headers=None, raw=False, **operation_config): + """Gets an image. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param image_name: The name of the image. + :type image_name: str + :param expand: The expand expression to apply on the operation. + :type expand: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: Image or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.compute.v2018_06_01.models.Image or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'imageName': self._serialize.url("image_name", image_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + if expand is not None: + query_parameters['$expand'] = self._serialize.query("expand", expand, 'str') + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('Image', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/images/{imageName}'} + + def list_by_resource_group( + self, resource_group_name, custom_headers=None, raw=False, **operation_config): + """Gets the list of images under a resource group. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of Image + :rtype: + ~azure.mgmt.compute.v2018_06_01.models.ImagePaged[~azure.mgmt.compute.v2018_06_01.models.Image] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_by_resource_group.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.ImagePaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/images'} + + def list( + self, custom_headers=None, raw=False, **operation_config): + """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. + + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of Image + :rtype: + ~azure.mgmt.compute.v2018_06_01.models.ImagePaged[~azure.mgmt.compute.v2018_06_01.models.Image] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.ImagePaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Compute/images'} diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/operations/_log_analytics_operations.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/operations/_log_analytics_operations.py new file mode 100644 index 000000000000..b0aa49693df6 --- /dev/null +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/operations/_log_analytics_operations.py @@ -0,0 +1,244 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse +from msrestazure.azure_exceptions import CloudError +from msrest.polling import LROPoller, NoPolling +from msrestazure.polling.arm_polling import ARMPolling + +from .. import models + + +class LogAnalyticsOperations(object): + """LogAnalyticsOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: Client Api Version. Constant value: "2018-06-01". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2018-06-01" + + self.config = config + + + def _export_request_rate_by_interval_initial( + self, parameters, location, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.export_request_rate_by_interval.metadata['url'] + path_format_arguments = { + 'location': self._serialize.url("location", location, 'str', pattern=r'^[-\w\._]+$'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(parameters, 'RequestRateByIntervalInput') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('LogAnalyticsOperationResult', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def export_request_rate_by_interval( + self, parameters, location, custom_headers=None, raw=False, polling=True, **operation_config): + """Export logs that show Api requests made by this subscription in the + given time window to show throttling activities. + + :param parameters: Parameters supplied to the LogAnalytics + getRequestRateByInterval Api. + :type parameters: + ~azure.mgmt.compute.v2018_06_01.models.RequestRateByIntervalInput + :param location: The location upon which virtual-machine-sizes is + queried. + :type location: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns + LogAnalyticsOperationResult or + ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2018_06_01.models.LogAnalyticsOperationResult] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2018_06_01.models.LogAnalyticsOperationResult]] + :raises: :class:`CloudError` + """ + raw_result = self._export_request_rate_by_interval_initial( + parameters=parameters, + location=location, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('LogAnalyticsOperationResult', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + export_request_rate_by_interval.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/logAnalytics/apiAccess/getRequestRateByInterval'} + + + def _export_throttled_requests_initial( + self, parameters, location, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.export_throttled_requests.metadata['url'] + path_format_arguments = { + 'location': self._serialize.url("location", location, 'str', pattern=r'^[-\w\._]+$'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(parameters, 'ThrottledRequestsInput') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('LogAnalyticsOperationResult', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def export_throttled_requests( + self, parameters, location, custom_headers=None, raw=False, polling=True, **operation_config): + """Export logs that show total throttled Api requests for this + subscription in the given time window. + + :param parameters: Parameters supplied to the LogAnalytics + getThrottledRequests Api. + :type parameters: + ~azure.mgmt.compute.v2018_06_01.models.ThrottledRequestsInput + :param location: The location upon which virtual-machine-sizes is + queried. + :type location: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns + LogAnalyticsOperationResult or + ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2018_06_01.models.LogAnalyticsOperationResult] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2018_06_01.models.LogAnalyticsOperationResult]] + :raises: :class:`CloudError` + """ + raw_result = self._export_throttled_requests_initial( + parameters=parameters, + location=location, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('LogAnalyticsOperationResult', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + export_throttled_requests.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/logAnalytics/apiAccess/getThrottledRequests'} diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/operations/_operations.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/operations/_operations.py new file mode 100644 index 000000000000..a94ee2d2ca72 --- /dev/null +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/operations/_operations.py @@ -0,0 +1,102 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse +from msrestazure.azure_exceptions import CloudError + +from .. import models + + +class Operations(object): + """Operations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: Client Api Version. Constant value: "2018-06-01". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2018-06-01" + + self.config = config + + def list( + self, custom_headers=None, raw=False, **operation_config): + """Gets a list of compute operations. + + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of ComputeOperationValue + :rtype: + ~azure.mgmt.compute.v2018_06_01.models.ComputeOperationValuePaged[~azure.mgmt.compute.v2018_06_01.models.ComputeOperationValue] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list.metadata['url'] + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.ComputeOperationValuePaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list.metadata = {'url': '/providers/Microsoft.Compute/operations'} diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/operations/_proximity_placement_groups_operations.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/operations/_proximity_placement_groups_operations.py new file mode 100644 index 000000000000..7b051216df22 --- /dev/null +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/operations/_proximity_placement_groups_operations.py @@ -0,0 +1,433 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse +from msrestazure.azure_exceptions import CloudError + +from .. import models + + +class ProximityPlacementGroupsOperations(object): + """ProximityPlacementGroupsOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: Client Api Version. Constant value: "2018-06-01". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2018-06-01" + + self.config = config + + def create_or_update( + self, resource_group_name, proximity_placement_group_name, parameters, custom_headers=None, raw=False, **operation_config): + """Create or update a proximity placement group. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param proximity_placement_group_name: The name of the proximity + placement group. + :type proximity_placement_group_name: str + :param parameters: Parameters supplied to the Create Proximity + Placement Group operation. + :type parameters: + ~azure.mgmt.compute.v2018_06_01.models.ProximityPlacementGroup + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: ProximityPlacementGroup or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.compute.v2018_06_01.models.ProximityPlacementGroup + or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.create_or_update.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'proximityPlacementGroupName': self._serialize.url("proximity_placement_group_name", proximity_placement_group_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(parameters, 'ProximityPlacementGroup') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 201]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('ProximityPlacementGroup', response) + if response.status_code == 201: + deserialized = self._deserialize('ProximityPlacementGroup', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/proximityPlacementGroups/{proximityPlacementGroupName}'} + + def update( + self, resource_group_name, proximity_placement_group_name, tags=None, custom_headers=None, raw=False, **operation_config): + """Update a proximity placement group. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param proximity_placement_group_name: The name of the proximity + placement group. + :type proximity_placement_group_name: str + :param tags: Resource tags + :type tags: dict[str, str] + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: ProximityPlacementGroup or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.compute.v2018_06_01.models.ProximityPlacementGroup + or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + parameters = models.ProximityPlacementGroupUpdate(tags=tags) + + # Construct URL + url = self.update.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'proximityPlacementGroupName': self._serialize.url("proximity_placement_group_name", proximity_placement_group_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(parameters, 'ProximityPlacementGroupUpdate') + + # Construct and send request + request = self._client.patch(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('ProximityPlacementGroup', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/proximityPlacementGroups/{proximityPlacementGroupName}'} + + def delete( + self, resource_group_name, proximity_placement_group_name, custom_headers=None, raw=False, **operation_config): + """Delete a proximity placement group. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param proximity_placement_group_name: The name of the proximity + placement group. + :type proximity_placement_group_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.delete.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'proximityPlacementGroupName': self._serialize.url("proximity_placement_group_name", proximity_placement_group_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/proximityPlacementGroups/{proximityPlacementGroupName}'} + + def get( + self, resource_group_name, proximity_placement_group_name, custom_headers=None, raw=False, **operation_config): + """Retrieves information about a proximity placement group . + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param proximity_placement_group_name: The name of the proximity + placement group. + :type proximity_placement_group_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: ProximityPlacementGroup or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.compute.v2018_06_01.models.ProximityPlacementGroup + or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'proximityPlacementGroupName': self._serialize.url("proximity_placement_group_name", proximity_placement_group_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('ProximityPlacementGroup', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/proximityPlacementGroups/{proximityPlacementGroupName}'} + + def list_by_subscription( + self, custom_headers=None, raw=False, **operation_config): + """Lists all proximity placement groups in a subscription. + + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of ProximityPlacementGroup + :rtype: + ~azure.mgmt.compute.v2018_06_01.models.ProximityPlacementGroupPaged[~azure.mgmt.compute.v2018_06_01.models.ProximityPlacementGroup] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_by_subscription.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.ProximityPlacementGroupPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_by_subscription.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Compute/proximityPlacementGroups'} + + def list_by_resource_group( + self, resource_group_name, custom_headers=None, raw=False, **operation_config): + """Lists all proximity placement groups in a resource group. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of ProximityPlacementGroup + :rtype: + ~azure.mgmt.compute.v2018_06_01.models.ProximityPlacementGroupPaged[~azure.mgmt.compute.v2018_06_01.models.ProximityPlacementGroup] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_by_resource_group.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.ProximityPlacementGroupPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/proximityPlacementGroups'} diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/operations/_snapshots_operations.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/operations/_snapshots_operations.py new file mode 100644 index 000000000000..6446394e06cd --- /dev/null +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/operations/_snapshots_operations.py @@ -0,0 +1,727 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse +from msrestazure.azure_exceptions import CloudError +from msrest.polling import LROPoller, NoPolling +from msrestazure.polling.arm_polling import ARMPolling + +from .. import models + + +class SnapshotsOperations(object): + """SnapshotsOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: Client Api Version. Constant value: "2018-06-01". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2018-06-01" + + self.config = config + + + def _create_or_update_initial( + self, resource_group_name, snapshot_name, snapshot, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.create_or_update.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'snapshotName': self._serialize.url("snapshot_name", snapshot_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(snapshot, 'Snapshot') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('Snapshot', response) + if response.status_code == 202: + deserialized = self._deserialize('Snapshot', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def create_or_update( + self, resource_group_name, snapshot_name, snapshot, custom_headers=None, raw=False, polling=True, **operation_config): + """Creates or updates a snapshot. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param snapshot_name: The name of the snapshot that is being created. + The name can't be changed after the snapshot is created. Supported + characters for the name are a-z, A-Z, 0-9 and _. The max name length + is 80 characters. + :type snapshot_name: str + :param snapshot: Snapshot object supplied in the body of the Put disk + operation. + :type snapshot: ~azure.mgmt.compute.v2018_06_01.models.Snapshot + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns Snapshot or + ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2018_06_01.models.Snapshot] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2018_06_01.models.Snapshot]] + :raises: :class:`CloudError` + """ + raw_result = self._create_or_update_initial( + resource_group_name=resource_group_name, + snapshot_name=snapshot_name, + snapshot=snapshot, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('Snapshot', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/snapshots/{snapshotName}'} + + + def _update_initial( + self, resource_group_name, snapshot_name, snapshot, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.update.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'snapshotName': self._serialize.url("snapshot_name", snapshot_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(snapshot, 'SnapshotUpdate') + + # Construct and send request + request = self._client.patch(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('Snapshot', response) + if response.status_code == 202: + deserialized = self._deserialize('Snapshot', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def update( + self, resource_group_name, snapshot_name, snapshot, custom_headers=None, raw=False, polling=True, **operation_config): + """Updates (patches) a snapshot. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param snapshot_name: The name of the snapshot that is being created. + The name can't be changed after the snapshot is created. Supported + characters for the name are a-z, A-Z, 0-9 and _. The max name length + is 80 characters. + :type snapshot_name: str + :param snapshot: Snapshot object supplied in the body of the Patch + snapshot operation. + :type snapshot: ~azure.mgmt.compute.v2018_06_01.models.SnapshotUpdate + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns Snapshot or + ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2018_06_01.models.Snapshot] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2018_06_01.models.Snapshot]] + :raises: :class:`CloudError` + """ + raw_result = self._update_initial( + resource_group_name=resource_group_name, + snapshot_name=snapshot_name, + snapshot=snapshot, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('Snapshot', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/snapshots/{snapshotName}'} + + def get( + self, resource_group_name, snapshot_name, custom_headers=None, raw=False, **operation_config): + """Gets information about a snapshot. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param snapshot_name: The name of the snapshot that is being created. + The name can't be changed after the snapshot is created. Supported + characters for the name are a-z, A-Z, 0-9 and _. The max name length + is 80 characters. + :type snapshot_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: Snapshot or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.compute.v2018_06_01.models.Snapshot or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'snapshotName': self._serialize.url("snapshot_name", snapshot_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('Snapshot', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/snapshots/{snapshotName}'} + + + def _delete_initial( + self, resource_group_name, snapshot_name, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.delete.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'snapshotName': self._serialize.url("snapshot_name", snapshot_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202, 204]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + def delete( + self, resource_group_name, snapshot_name, custom_headers=None, raw=False, polling=True, **operation_config): + """Deletes a snapshot. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param snapshot_name: The name of the snapshot that is being created. + The name can't be changed after the snapshot is created. Supported + characters for the name are a-z, A-Z, 0-9 and _. The max name length + is 80 characters. + :type snapshot_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns None or + ClientRawResponse if raw==True + :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] + :raises: :class:`CloudError` + """ + raw_result = self._delete_initial( + resource_group_name=resource_group_name, + snapshot_name=snapshot_name, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/snapshots/{snapshotName}'} + + def list_by_resource_group( + self, resource_group_name, custom_headers=None, raw=False, **operation_config): + """Lists snapshots under a resource group. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of Snapshot + :rtype: + ~azure.mgmt.compute.v2018_06_01.models.SnapshotPaged[~azure.mgmt.compute.v2018_06_01.models.Snapshot] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_by_resource_group.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.SnapshotPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/snapshots'} + + def list( + self, custom_headers=None, raw=False, **operation_config): + """Lists snapshots under a subscription. + + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of Snapshot + :rtype: + ~azure.mgmt.compute.v2018_06_01.models.SnapshotPaged[~azure.mgmt.compute.v2018_06_01.models.Snapshot] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.SnapshotPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Compute/snapshots'} + + + def _grant_access_initial( + self, resource_group_name, snapshot_name, access, duration_in_seconds, custom_headers=None, raw=False, **operation_config): + grant_access_data = models.GrantAccessData(access=access, duration_in_seconds=duration_in_seconds) + + # Construct URL + url = self.grant_access.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'snapshotName': self._serialize.url("snapshot_name", snapshot_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(grant_access_data, 'GrantAccessData') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('AccessUri', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def grant_access( + self, resource_group_name, snapshot_name, access, duration_in_seconds, custom_headers=None, raw=False, polling=True, **operation_config): + """Grants access to a snapshot. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param snapshot_name: The name of the snapshot that is being created. + The name can't be changed after the snapshot is created. Supported + characters for the name are a-z, A-Z, 0-9 and _. The max name length + is 80 characters. + :type snapshot_name: str + :param access: Possible values include: 'None', 'Read' + :type access: str or + ~azure.mgmt.compute.v2018_06_01.models.AccessLevel + :param duration_in_seconds: Time duration in seconds until the SAS + access expires. + :type duration_in_seconds: int + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns AccessUri or + ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2018_06_01.models.AccessUri] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2018_06_01.models.AccessUri]] + :raises: :class:`CloudError` + """ + raw_result = self._grant_access_initial( + resource_group_name=resource_group_name, + snapshot_name=snapshot_name, + access=access, + duration_in_seconds=duration_in_seconds, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('AccessUri', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + grant_access.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/snapshots/{snapshotName}/beginGetAccess'} + + + def _revoke_access_initial( + self, resource_group_name, snapshot_name, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.revoke_access.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'snapshotName': self._serialize.url("snapshot_name", snapshot_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + def revoke_access( + self, resource_group_name, snapshot_name, custom_headers=None, raw=False, polling=True, **operation_config): + """Revokes access to a snapshot. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param snapshot_name: The name of the snapshot that is being created. + The name can't be changed after the snapshot is created. Supported + characters for the name are a-z, A-Z, 0-9 and _. The max name length + is 80 characters. + :type snapshot_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns None or + ClientRawResponse if raw==True + :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] + :raises: :class:`CloudError` + """ + raw_result = self._revoke_access_initial( + resource_group_name=resource_group_name, + snapshot_name=snapshot_name, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + revoke_access.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/snapshots/{snapshotName}/endGetAccess'} diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/operations/_usage_operations.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/operations/_usage_operations.py new file mode 100644 index 000000000000..8c2bfb7a2c00 --- /dev/null +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/operations/_usage_operations.py @@ -0,0 +1,111 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse +from msrestazure.azure_exceptions import CloudError + +from .. import models + + +class UsageOperations(object): + """UsageOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: Client Api Version. Constant value: "2018-06-01". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2018-06-01" + + self.config = config + + def list( + self, location, custom_headers=None, raw=False, **operation_config): + """Gets, for the specified location, the current compute resource usage + information as well as the limits for compute resources under the + subscription. + + :param location: The location for which resource usage is queried. + :type location: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of Usage + :rtype: + ~azure.mgmt.compute.v2018_06_01.models.UsagePaged[~azure.mgmt.compute.v2018_06_01.models.Usage] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list.metadata['url'] + path_format_arguments = { + 'location': self._serialize.url("location", location, 'str', pattern=r'^[-\w\._]+$'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.UsagePaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/usages'} diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/operations/_virtual_machine_extension_images_operations.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/operations/_virtual_machine_extension_images_operations.py new file mode 100644 index 000000000000..9b9a25fb6b55 --- /dev/null +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/operations/_virtual_machine_extension_images_operations.py @@ -0,0 +1,247 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse +from msrestazure.azure_exceptions import CloudError + +from .. import models + + +class VirtualMachineExtensionImagesOperations(object): + """VirtualMachineExtensionImagesOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: Client Api Version. Constant value: "2018-06-01". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2018-06-01" + + self.config = config + + def get( + self, location, publisher_name, type, version, custom_headers=None, raw=False, **operation_config): + """Gets a virtual machine extension image. + + :param location: The name of a supported Azure region. + :type location: str + :param publisher_name: + :type publisher_name: str + :param type: + :type type: str + :param version: + :type version: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: VirtualMachineExtensionImage or ClientRawResponse if raw=true + :rtype: + ~azure.mgmt.compute.v2018_06_01.models.VirtualMachineExtensionImage or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'location': self._serialize.url("location", location, 'str'), + 'publisherName': self._serialize.url("publisher_name", publisher_name, 'str'), + 'type': self._serialize.url("type", type, 'str'), + 'version': self._serialize.url("version", version, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('VirtualMachineExtensionImage', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/publishers/{publisherName}/artifacttypes/vmextension/types/{type}/versions/{version}'} + + def list_types( + self, location, publisher_name, custom_headers=None, raw=False, **operation_config): + """Gets a list of virtual machine extension image types. + + :param location: The name of a supported Azure region. + :type location: str + :param publisher_name: + :type publisher_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: list or ClientRawResponse if raw=true + :rtype: + list[~azure.mgmt.compute.v2018_06_01.models.VirtualMachineExtensionImage] + or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.list_types.metadata['url'] + path_format_arguments = { + 'location': self._serialize.url("location", location, 'str'), + 'publisherName': self._serialize.url("publisher_name", publisher_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('[VirtualMachineExtensionImage]', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + list_types.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/publishers/{publisherName}/artifacttypes/vmextension/types'} + + def list_versions( + self, location, publisher_name, type, filter=None, top=None, orderby=None, custom_headers=None, raw=False, **operation_config): + """Gets a list of virtual machine extension image versions. + + :param location: The name of a supported Azure region. + :type location: str + :param publisher_name: + :type publisher_name: str + :param type: + :type type: str + :param filter: The filter to apply on the operation. + :type filter: str + :param top: + :type top: int + :param orderby: + :type orderby: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: list or ClientRawResponse if raw=true + :rtype: + list[~azure.mgmt.compute.v2018_06_01.models.VirtualMachineExtensionImage] + or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.list_versions.metadata['url'] + path_format_arguments = { + 'location': self._serialize.url("location", location, 'str'), + 'publisherName': self._serialize.url("publisher_name", publisher_name, 'str'), + 'type': self._serialize.url("type", type, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + if filter is not None: + query_parameters['$filter'] = self._serialize.query("filter", filter, 'str') + if top is not None: + query_parameters['$top'] = self._serialize.query("top", top, 'int') + if orderby is not None: + query_parameters['$orderby'] = self._serialize.query("orderby", orderby, 'str') + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('[VirtualMachineExtensionImage]', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + list_versions.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/publishers/{publisherName}/artifacttypes/vmextension/types/{type}/versions'} diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/operations/_virtual_machine_extensions_operations.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/operations/_virtual_machine_extensions_operations.py new file mode 100644 index 000000000000..92934987a6d6 --- /dev/null +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/operations/_virtual_machine_extensions_operations.py @@ -0,0 +1,479 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse +from msrestazure.azure_exceptions import CloudError +from msrest.polling import LROPoller, NoPolling +from msrestazure.polling.arm_polling import ARMPolling + +from .. import models + + +class VirtualMachineExtensionsOperations(object): + """VirtualMachineExtensionsOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: Client Api Version. Constant value: "2018-06-01". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2018-06-01" + + self.config = config + + + def _create_or_update_initial( + self, resource_group_name, vm_name, vm_extension_name, extension_parameters, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.create_or_update.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vmName': self._serialize.url("vm_name", vm_name, 'str'), + 'vmExtensionName': self._serialize.url("vm_extension_name", vm_extension_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(extension_parameters, 'VirtualMachineExtension') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 201]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('VirtualMachineExtension', response) + if response.status_code == 201: + deserialized = self._deserialize('VirtualMachineExtension', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def create_or_update( + self, resource_group_name, vm_name, vm_extension_name, extension_parameters, custom_headers=None, raw=False, polling=True, **operation_config): + """The operation to create or update the extension. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param vm_name: The name of the virtual machine where the extension + should be created or updated. + :type vm_name: str + :param vm_extension_name: The name of the virtual machine extension. + :type vm_extension_name: str + :param extension_parameters: Parameters supplied to the Create Virtual + Machine Extension operation. + :type extension_parameters: + ~azure.mgmt.compute.v2018_06_01.models.VirtualMachineExtension + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns VirtualMachineExtension + or ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2018_06_01.models.VirtualMachineExtension] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2018_06_01.models.VirtualMachineExtension]] + :raises: :class:`CloudError` + """ + raw_result = self._create_or_update_initial( + resource_group_name=resource_group_name, + vm_name=vm_name, + vm_extension_name=vm_extension_name, + extension_parameters=extension_parameters, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('VirtualMachineExtension', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/extensions/{vmExtensionName}'} + + + def _update_initial( + self, resource_group_name, vm_name, vm_extension_name, extension_parameters, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.update.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vmName': self._serialize.url("vm_name", vm_name, 'str'), + 'vmExtensionName': self._serialize.url("vm_extension_name", vm_extension_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(extension_parameters, 'VirtualMachineExtensionUpdate') + + # Construct and send request + request = self._client.patch(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('VirtualMachineExtension', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def update( + self, resource_group_name, vm_name, vm_extension_name, extension_parameters, custom_headers=None, raw=False, polling=True, **operation_config): + """The operation to update the extension. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param vm_name: The name of the virtual machine where the extension + should be updated. + :type vm_name: str + :param vm_extension_name: The name of the virtual machine extension. + :type vm_extension_name: str + :param extension_parameters: Parameters supplied to the Update Virtual + Machine Extension operation. + :type extension_parameters: + ~azure.mgmt.compute.v2018_06_01.models.VirtualMachineExtensionUpdate + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns VirtualMachineExtension + or ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2018_06_01.models.VirtualMachineExtension] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2018_06_01.models.VirtualMachineExtension]] + :raises: :class:`CloudError` + """ + raw_result = self._update_initial( + resource_group_name=resource_group_name, + vm_name=vm_name, + vm_extension_name=vm_extension_name, + extension_parameters=extension_parameters, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('VirtualMachineExtension', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/extensions/{vmExtensionName}'} + + + def _delete_initial( + self, resource_group_name, vm_name, vm_extension_name, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.delete.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vmName': self._serialize.url("vm_name", vm_name, 'str'), + 'vmExtensionName': self._serialize.url("vm_extension_name", vm_extension_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202, 204]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + def delete( + self, resource_group_name, vm_name, vm_extension_name, custom_headers=None, raw=False, polling=True, **operation_config): + """The operation to delete the extension. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param vm_name: The name of the virtual machine where the extension + should be deleted. + :type vm_name: str + :param vm_extension_name: The name of the virtual machine extension. + :type vm_extension_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns None or + ClientRawResponse if raw==True + :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] + :raises: :class:`CloudError` + """ + raw_result = self._delete_initial( + resource_group_name=resource_group_name, + vm_name=vm_name, + vm_extension_name=vm_extension_name, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/extensions/{vmExtensionName}'} + + def get( + self, resource_group_name, vm_name, vm_extension_name, expand=None, custom_headers=None, raw=False, **operation_config): + """The operation to get the extension. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param vm_name: The name of the virtual machine containing the + extension. + :type vm_name: str + :param vm_extension_name: The name of the virtual machine extension. + :type vm_extension_name: str + :param expand: The expand expression to apply on the operation. + :type expand: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: VirtualMachineExtension or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.compute.v2018_06_01.models.VirtualMachineExtension + or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vmName': self._serialize.url("vm_name", vm_name, 'str'), + 'vmExtensionName': self._serialize.url("vm_extension_name", vm_extension_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + if expand is not None: + query_parameters['$expand'] = self._serialize.query("expand", expand, 'str') + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('VirtualMachineExtension', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/extensions/{vmExtensionName}'} + + def list( + self, resource_group_name, vm_name, expand=None, custom_headers=None, raw=False, **operation_config): + """The operation to get all extensions of a Virtual Machine. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param vm_name: The name of the virtual machine containing the + extension. + :type vm_name: str + :param expand: The expand expression to apply on the operation. + :type expand: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: VirtualMachineExtensionsListResult or ClientRawResponse if + raw=true + :rtype: + ~azure.mgmt.compute.v2018_06_01.models.VirtualMachineExtensionsListResult + or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.list.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vmName': self._serialize.url("vm_name", vm_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + if expand is not None: + query_parameters['$expand'] = self._serialize.query("expand", expand, 'str') + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('VirtualMachineExtensionsListResult', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/extensions'} diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/operations/_virtual_machine_images_operations.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/operations/_virtual_machine_images_operations.py new file mode 100644 index 000000000000..e41bcec0b625 --- /dev/null +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/operations/_virtual_machine_images_operations.py @@ -0,0 +1,380 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse +from msrestazure.azure_exceptions import CloudError + +from .. import models + + +class VirtualMachineImagesOperations(object): + """VirtualMachineImagesOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: Client Api Version. Constant value: "2018-06-01". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2018-06-01" + + self.config = config + + def get( + self, location, publisher_name, offer, skus, version, custom_headers=None, raw=False, **operation_config): + """Gets a virtual machine image. + + :param location: The name of a supported Azure region. + :type location: str + :param publisher_name: A valid image publisher. + :type publisher_name: str + :param offer: A valid image publisher offer. + :type offer: str + :param skus: A valid image SKU. + :type skus: str + :param version: A valid image SKU version. + :type version: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: VirtualMachineImage or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.compute.v2018_06_01.models.VirtualMachineImage or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'location': self._serialize.url("location", location, 'str'), + 'publisherName': self._serialize.url("publisher_name", publisher_name, 'str'), + 'offer': self._serialize.url("offer", offer, 'str'), + 'skus': self._serialize.url("skus", skus, 'str'), + 'version': self._serialize.url("version", version, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('VirtualMachineImage', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/publishers/{publisherName}/artifacttypes/vmimage/offers/{offer}/skus/{skus}/versions/{version}'} + + def list( + self, location, publisher_name, offer, skus, filter=None, top=None, orderby=None, custom_headers=None, raw=False, **operation_config): + """Gets a list of all virtual machine image versions for the specified + location, publisher, offer, and SKU. + + :param location: The name of a supported Azure region. + :type location: str + :param publisher_name: A valid image publisher. + :type publisher_name: str + :param offer: A valid image publisher offer. + :type offer: str + :param skus: A valid image SKU. + :type skus: str + :param filter: The filter to apply on the operation. + :type filter: str + :param top: + :type top: int + :param orderby: + :type orderby: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: list or ClientRawResponse if raw=true + :rtype: + list[~azure.mgmt.compute.v2018_06_01.models.VirtualMachineImageResource] + or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.list.metadata['url'] + path_format_arguments = { + 'location': self._serialize.url("location", location, 'str'), + 'publisherName': self._serialize.url("publisher_name", publisher_name, 'str'), + 'offer': self._serialize.url("offer", offer, 'str'), + 'skus': self._serialize.url("skus", skus, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + if filter is not None: + query_parameters['$filter'] = self._serialize.query("filter", filter, 'str') + if top is not None: + query_parameters['$top'] = self._serialize.query("top", top, 'int') + if orderby is not None: + query_parameters['$orderby'] = self._serialize.query("orderby", orderby, 'str') + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('[VirtualMachineImageResource]', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/publishers/{publisherName}/artifacttypes/vmimage/offers/{offer}/skus/{skus}/versions'} + + def list_offers( + self, location, publisher_name, custom_headers=None, raw=False, **operation_config): + """Gets a list of virtual machine image offers for the specified location + and publisher. + + :param location: The name of a supported Azure region. + :type location: str + :param publisher_name: A valid image publisher. + :type publisher_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: list or ClientRawResponse if raw=true + :rtype: + list[~azure.mgmt.compute.v2018_06_01.models.VirtualMachineImageResource] + or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.list_offers.metadata['url'] + path_format_arguments = { + 'location': self._serialize.url("location", location, 'str'), + 'publisherName': self._serialize.url("publisher_name", publisher_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('[VirtualMachineImageResource]', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + list_offers.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/publishers/{publisherName}/artifacttypes/vmimage/offers'} + + def list_publishers( + self, location, custom_headers=None, raw=False, **operation_config): + """Gets a list of virtual machine image publishers for the specified Azure + location. + + :param location: The name of a supported Azure region. + :type location: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: list or ClientRawResponse if raw=true + :rtype: + list[~azure.mgmt.compute.v2018_06_01.models.VirtualMachineImageResource] + or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.list_publishers.metadata['url'] + path_format_arguments = { + 'location': self._serialize.url("location", location, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('[VirtualMachineImageResource]', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + list_publishers.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/publishers'} + + def list_skus( + self, location, publisher_name, offer, custom_headers=None, raw=False, **operation_config): + """Gets a list of virtual machine image SKUs for the specified location, + publisher, and offer. + + :param location: The name of a supported Azure region. + :type location: str + :param publisher_name: A valid image publisher. + :type publisher_name: str + :param offer: A valid image publisher offer. + :type offer: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: list or ClientRawResponse if raw=true + :rtype: + list[~azure.mgmt.compute.v2018_06_01.models.VirtualMachineImageResource] + or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.list_skus.metadata['url'] + path_format_arguments = { + 'location': self._serialize.url("location", location, 'str'), + 'publisherName': self._serialize.url("publisher_name", publisher_name, 'str'), + 'offer': self._serialize.url("offer", offer, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('[VirtualMachineImageResource]', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + list_skus.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/publishers/{publisherName}/artifacttypes/vmimage/offers/{offer}/skus'} diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/operations/_virtual_machine_run_commands_operations.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/operations/_virtual_machine_run_commands_operations.py new file mode 100644 index 000000000000..ddd5c9cdcb5f --- /dev/null +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/operations/_virtual_machine_run_commands_operations.py @@ -0,0 +1,170 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse +from msrestazure.azure_exceptions import CloudError + +from .. import models + + +class VirtualMachineRunCommandsOperations(object): + """VirtualMachineRunCommandsOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: Client Api Version. Constant value: "2018-06-01". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2018-06-01" + + self.config = config + + def list( + self, location, custom_headers=None, raw=False, **operation_config): + """Lists all available run commands for a subscription in a location. + + :param location: The location upon which run commands is queried. + :type location: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of RunCommandDocumentBase + :rtype: + ~azure.mgmt.compute.v2018_06_01.models.RunCommandDocumentBasePaged[~azure.mgmt.compute.v2018_06_01.models.RunCommandDocumentBase] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list.metadata['url'] + path_format_arguments = { + 'location': self._serialize.url("location", location, 'str', pattern=r'^[-\w\._]+$'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.RunCommandDocumentBasePaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/runCommands'} + + def get( + self, location, command_id, custom_headers=None, raw=False, **operation_config): + """Gets specific run command for a subscription in a location. + + :param location: The location upon which run commands is queried. + :type location: str + :param command_id: The command id. + :type command_id: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: RunCommandDocument or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.compute.v2018_06_01.models.RunCommandDocument or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'location': self._serialize.url("location", location, 'str', pattern=r'^[-\w\._]+$'), + 'commandId': self._serialize.url("command_id", command_id, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('RunCommandDocument', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/runCommands/{commandId}'} diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/operations/_virtual_machine_scale_set_extensions_operations.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/operations/_virtual_machine_scale_set_extensions_operations.py new file mode 100644 index 000000000000..670e412b1300 --- /dev/null +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/operations/_virtual_machine_scale_set_extensions_operations.py @@ -0,0 +1,380 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse +from msrestazure.azure_exceptions import CloudError +from msrest.polling import LROPoller, NoPolling +from msrestazure.polling.arm_polling import ARMPolling + +from .. import models + + +class VirtualMachineScaleSetExtensionsOperations(object): + """VirtualMachineScaleSetExtensionsOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: Client Api Version. Constant value: "2018-06-01". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2018-06-01" + + self.config = config + + + def _create_or_update_initial( + self, resource_group_name, vm_scale_set_name, vmss_extension_name, extension_parameters, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.create_or_update.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), + 'vmssExtensionName': self._serialize.url("vmss_extension_name", vmss_extension_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(extension_parameters, 'VirtualMachineScaleSetExtension') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 201]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('VirtualMachineScaleSetExtension', response) + if response.status_code == 201: + deserialized = self._deserialize('VirtualMachineScaleSetExtension', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def create_or_update( + self, resource_group_name, vm_scale_set_name, vmss_extension_name, extension_parameters, custom_headers=None, raw=False, polling=True, **operation_config): + """The operation to create or update an extension. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param vm_scale_set_name: The name of the VM scale set where the + extension should be create or updated. + :type vm_scale_set_name: str + :param vmss_extension_name: The name of the VM scale set extension. + :type vmss_extension_name: str + :param extension_parameters: Parameters supplied to the Create VM + scale set Extension operation. + :type extension_parameters: + ~azure.mgmt.compute.v2018_06_01.models.VirtualMachineScaleSetExtension + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns + VirtualMachineScaleSetExtension or + ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2018_06_01.models.VirtualMachineScaleSetExtension] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2018_06_01.models.VirtualMachineScaleSetExtension]] + :raises: :class:`CloudError` + """ + raw_result = self._create_or_update_initial( + resource_group_name=resource_group_name, + vm_scale_set_name=vm_scale_set_name, + vmss_extension_name=vmss_extension_name, + extension_parameters=extension_parameters, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('VirtualMachineScaleSetExtension', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/extensions/{vmssExtensionName}'} + + + def _delete_initial( + self, resource_group_name, vm_scale_set_name, vmss_extension_name, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.delete.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), + 'vmssExtensionName': self._serialize.url("vmss_extension_name", vmss_extension_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202, 204]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + def delete( + self, resource_group_name, vm_scale_set_name, vmss_extension_name, custom_headers=None, raw=False, polling=True, **operation_config): + """The operation to delete the extension. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param vm_scale_set_name: The name of the VM scale set where the + extension should be deleted. + :type vm_scale_set_name: str + :param vmss_extension_name: The name of the VM scale set extension. + :type vmss_extension_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns None or + ClientRawResponse if raw==True + :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] + :raises: :class:`CloudError` + """ + raw_result = self._delete_initial( + resource_group_name=resource_group_name, + vm_scale_set_name=vm_scale_set_name, + vmss_extension_name=vmss_extension_name, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/extensions/{vmssExtensionName}'} + + def get( + self, resource_group_name, vm_scale_set_name, vmss_extension_name, expand=None, custom_headers=None, raw=False, **operation_config): + """The operation to get the extension. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param vm_scale_set_name: The name of the VM scale set containing the + extension. + :type vm_scale_set_name: str + :param vmss_extension_name: The name of the VM scale set extension. + :type vmss_extension_name: str + :param expand: The expand expression to apply on the operation. + :type expand: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: VirtualMachineScaleSetExtension or ClientRawResponse if + raw=true + :rtype: + ~azure.mgmt.compute.v2018_06_01.models.VirtualMachineScaleSetExtension + or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), + 'vmssExtensionName': self._serialize.url("vmss_extension_name", vmss_extension_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + if expand is not None: + query_parameters['$expand'] = self._serialize.query("expand", expand, 'str') + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('VirtualMachineScaleSetExtension', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/extensions/{vmssExtensionName}'} + + def list( + self, resource_group_name, vm_scale_set_name, custom_headers=None, raw=False, **operation_config): + """Gets a list of all extensions in a VM scale set. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param vm_scale_set_name: The name of the VM scale set containing the + extension. + :type vm_scale_set_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of VirtualMachineScaleSetExtension + :rtype: + ~azure.mgmt.compute.v2018_06_01.models.VirtualMachineScaleSetExtensionPaged[~azure.mgmt.compute.v2018_06_01.models.VirtualMachineScaleSetExtension] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.VirtualMachineScaleSetExtensionPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/extensions'} diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/operations/_virtual_machine_scale_set_rolling_upgrades_operations.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/operations/_virtual_machine_scale_set_rolling_upgrades_operations.py new file mode 100644 index 000000000000..3cfb1a23ce66 --- /dev/null +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/operations/_virtual_machine_scale_set_rolling_upgrades_operations.py @@ -0,0 +1,348 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse +from msrestazure.azure_exceptions import CloudError +from msrest.polling import LROPoller, NoPolling +from msrestazure.polling.arm_polling import ARMPolling + +from .. import models + + +class VirtualMachineScaleSetRollingUpgradesOperations(object): + """VirtualMachineScaleSetRollingUpgradesOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: Client Api Version. Constant value: "2018-06-01". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2018-06-01" + + self.config = config + + + def _cancel_initial( + self, resource_group_name, vm_scale_set_name, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.cancel.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + def cancel( + self, resource_group_name, vm_scale_set_name, custom_headers=None, raw=False, polling=True, **operation_config): + """Cancels the current virtual machine scale set rolling upgrade. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param vm_scale_set_name: The name of the VM scale set. + :type vm_scale_set_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns None or + ClientRawResponse if raw==True + :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] + :raises: :class:`CloudError` + """ + raw_result = self._cancel_initial( + resource_group_name=resource_group_name, + vm_scale_set_name=vm_scale_set_name, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + cancel.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/rollingUpgrades/cancel'} + + + def _start_os_upgrade_initial( + self, resource_group_name, vm_scale_set_name, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.start_os_upgrade.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + def start_os_upgrade( + self, resource_group_name, vm_scale_set_name, custom_headers=None, raw=False, polling=True, **operation_config): + """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. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param vm_scale_set_name: The name of the VM scale set. + :type vm_scale_set_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns None or + ClientRawResponse if raw==True + :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] + :raises: :class:`CloudError` + """ + raw_result = self._start_os_upgrade_initial( + resource_group_name=resource_group_name, + vm_scale_set_name=vm_scale_set_name, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + start_os_upgrade.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/osRollingUpgrade'} + + + def _start_extension_upgrade_initial( + self, resource_group_name, vm_scale_set_name, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.start_extension_upgrade.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + def start_extension_upgrade( + self, resource_group_name, vm_scale_set_name, custom_headers=None, raw=False, polling=True, **operation_config): + """Starts a rolling upgrade to move all extensions for all virtual machine + scale set instances to the latest available extension version. + Instances which are already running the latest extension versions are + not affected. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param vm_scale_set_name: The name of the VM scale set. + :type vm_scale_set_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns None or + ClientRawResponse if raw==True + :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] + :raises: :class:`CloudError` + """ + raw_result = self._start_extension_upgrade_initial( + resource_group_name=resource_group_name, + vm_scale_set_name=vm_scale_set_name, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + start_extension_upgrade.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/extensionRollingUpgrade'} + + def get_latest( + self, resource_group_name, vm_scale_set_name, custom_headers=None, raw=False, **operation_config): + """Gets the status of the latest virtual machine scale set rolling + upgrade. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param vm_scale_set_name: The name of the VM scale set. + :type vm_scale_set_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: RollingUpgradeStatusInfo or ClientRawResponse if raw=true + :rtype: + ~azure.mgmt.compute.v2018_06_01.models.RollingUpgradeStatusInfo or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get_latest.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('RollingUpgradeStatusInfo', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_latest.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/rollingUpgrades/latest'} diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/operations/_virtual_machine_scale_set_vms_operations.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/operations/_virtual_machine_scale_set_vms_operations.py new file mode 100644 index 000000000000..3a64fc9a6b14 --- /dev/null +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/operations/_virtual_machine_scale_set_vms_operations.py @@ -0,0 +1,1244 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse +from msrestazure.azure_exceptions import CloudError +from msrest.polling import LROPoller, NoPolling +from msrestazure.polling.arm_polling import ARMPolling + +from .. import models + + +class VirtualMachineScaleSetVMsOperations(object): + """VirtualMachineScaleSetVMsOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: Client Api Version. Constant value: "2018-06-01". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2018-06-01" + + self.config = config + + + def _reimage_initial( + self, resource_group_name, vm_scale_set_name, instance_id, temp_disk=None, custom_headers=None, raw=False, **operation_config): + vm_scale_set_vm_reimage_input = None + if temp_disk is not None: + vm_scale_set_vm_reimage_input = models.VirtualMachineScaleSetVMReimageParameters(temp_disk=temp_disk) + + # Construct URL + url = self.reimage.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), + 'instanceId': self._serialize.url("instance_id", instance_id, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + if vm_scale_set_vm_reimage_input is not None: + body_content = self._serialize.body(vm_scale_set_vm_reimage_input, 'VirtualMachineScaleSetVMReimageParameters') + else: + body_content = None + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + def reimage( + self, resource_group_name, vm_scale_set_name, instance_id, temp_disk=None, custom_headers=None, raw=False, polling=True, **operation_config): + """Reimages (upgrade the operating system) a specific virtual machine in a + VM scale set. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param vm_scale_set_name: The name of the VM scale set. + :type vm_scale_set_name: str + :param instance_id: The instance ID of the virtual machine. + :type instance_id: str + :param temp_disk: Specifies whether to reimage temp disk. Default + value: false. Note: This temp disk reimage parameter is only supported + for VM/VMSS with Ephemeral OS disk. + :type temp_disk: bool + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns None or + ClientRawResponse if raw==True + :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] + :raises: :class:`CloudError` + """ + raw_result = self._reimage_initial( + resource_group_name=resource_group_name, + vm_scale_set_name=vm_scale_set_name, + instance_id=instance_id, + temp_disk=temp_disk, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + reimage.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/virtualmachines/{instanceId}/reimage'} + + + def _reimage_all_initial( + self, resource_group_name, vm_scale_set_name, instance_id, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.reimage_all.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), + 'instanceId': self._serialize.url("instance_id", instance_id, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + def reimage_all( + self, resource_group_name, vm_scale_set_name, instance_id, custom_headers=None, raw=False, polling=True, **operation_config): + """Allows you to re-image all the disks ( including data disks ) in the a + VM scale set instance. This operation is only supported for managed + disks. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param vm_scale_set_name: The name of the VM scale set. + :type vm_scale_set_name: str + :param instance_id: The instance ID of the virtual machine. + :type instance_id: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns None or + ClientRawResponse if raw==True + :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] + :raises: :class:`CloudError` + """ + raw_result = self._reimage_all_initial( + resource_group_name=resource_group_name, + vm_scale_set_name=vm_scale_set_name, + instance_id=instance_id, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + reimage_all.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/virtualmachines/{instanceId}/reimageall'} + + + def _deallocate_initial( + self, resource_group_name, vm_scale_set_name, instance_id, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.deallocate.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), + 'instanceId': self._serialize.url("instance_id", instance_id, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + def deallocate( + self, resource_group_name, vm_scale_set_name, instance_id, custom_headers=None, raw=False, polling=True, **operation_config): + """Deallocates a specific virtual machine in a VM scale set. Shuts down + the virtual machine and releases the compute resources it uses. You are + not billed for the compute resources of this virtual machine once it is + deallocated. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param vm_scale_set_name: The name of the VM scale set. + :type vm_scale_set_name: str + :param instance_id: The instance ID of the virtual machine. + :type instance_id: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns None or + ClientRawResponse if raw==True + :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] + :raises: :class:`CloudError` + """ + raw_result = self._deallocate_initial( + resource_group_name=resource_group_name, + vm_scale_set_name=vm_scale_set_name, + instance_id=instance_id, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + deallocate.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/virtualmachines/{instanceId}/deallocate'} + + + def _update_initial( + self, resource_group_name, vm_scale_set_name, instance_id, parameters, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.update.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), + 'instanceId': self._serialize.url("instance_id", instance_id, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(parameters, 'VirtualMachineScaleSetVM') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('VirtualMachineScaleSetVM', response) + if response.status_code == 202: + deserialized = self._deserialize('VirtualMachineScaleSetVM', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def update( + self, resource_group_name, vm_scale_set_name, instance_id, parameters, custom_headers=None, raw=False, polling=True, **operation_config): + """Updates a virtual machine of a VM scale set. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param vm_scale_set_name: The name of the VM scale set where the + extension should be create or updated. + :type vm_scale_set_name: str + :param instance_id: The instance ID of the virtual machine. + :type instance_id: str + :param parameters: Parameters supplied to the Update Virtual Machine + Scale Sets VM operation. + :type parameters: + ~azure.mgmt.compute.v2018_06_01.models.VirtualMachineScaleSetVM + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns + VirtualMachineScaleSetVM or + ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2018_06_01.models.VirtualMachineScaleSetVM] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2018_06_01.models.VirtualMachineScaleSetVM]] + :raises: :class:`CloudError` + """ + raw_result = self._update_initial( + resource_group_name=resource_group_name, + vm_scale_set_name=vm_scale_set_name, + instance_id=instance_id, + parameters=parameters, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('VirtualMachineScaleSetVM', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/virtualmachines/{instanceId}'} + + + def _delete_initial( + self, resource_group_name, vm_scale_set_name, instance_id, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.delete.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), + 'instanceId': self._serialize.url("instance_id", instance_id, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202, 204]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + def delete( + self, resource_group_name, vm_scale_set_name, instance_id, custom_headers=None, raw=False, polling=True, **operation_config): + """Deletes a virtual machine from a VM scale set. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param vm_scale_set_name: The name of the VM scale set. + :type vm_scale_set_name: str + :param instance_id: The instance ID of the virtual machine. + :type instance_id: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns None or + ClientRawResponse if raw==True + :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] + :raises: :class:`CloudError` + """ + raw_result = self._delete_initial( + resource_group_name=resource_group_name, + vm_scale_set_name=vm_scale_set_name, + instance_id=instance_id, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/virtualmachines/{instanceId}'} + + def get( + self, resource_group_name, vm_scale_set_name, instance_id, custom_headers=None, raw=False, **operation_config): + """Gets a virtual machine from a VM scale set. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param vm_scale_set_name: The name of the VM scale set. + :type vm_scale_set_name: str + :param instance_id: The instance ID of the virtual machine. + :type instance_id: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: VirtualMachineScaleSetVM or ClientRawResponse if raw=true + :rtype: + ~azure.mgmt.compute.v2018_06_01.models.VirtualMachineScaleSetVM or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), + 'instanceId': self._serialize.url("instance_id", instance_id, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('VirtualMachineScaleSetVM', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/virtualmachines/{instanceId}'} + + def get_instance_view( + self, resource_group_name, vm_scale_set_name, instance_id, custom_headers=None, raw=False, **operation_config): + """Gets the status of a virtual machine from a VM scale set. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param vm_scale_set_name: The name of the VM scale set. + :type vm_scale_set_name: str + :param instance_id: The instance ID of the virtual machine. + :type instance_id: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: VirtualMachineScaleSetVMInstanceView or ClientRawResponse if + raw=true + :rtype: + ~azure.mgmt.compute.v2018_06_01.models.VirtualMachineScaleSetVMInstanceView + or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get_instance_view.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), + 'instanceId': self._serialize.url("instance_id", instance_id, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('VirtualMachineScaleSetVMInstanceView', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_instance_view.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/virtualmachines/{instanceId}/instanceView'} + + def list( + self, resource_group_name, virtual_machine_scale_set_name, filter=None, select=None, expand=None, custom_headers=None, raw=False, **operation_config): + """Gets a list of all virtual machines in a VM scale sets. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param virtual_machine_scale_set_name: The name of the VM scale set. + :type virtual_machine_scale_set_name: str + :param filter: The filter to apply to the operation. + :type filter: str + :param select: The list parameters. + :type select: str + :param expand: The expand expression to apply to the operation. + :type expand: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of VirtualMachineScaleSetVM + :rtype: + ~azure.mgmt.compute.v2018_06_01.models.VirtualMachineScaleSetVMPaged[~azure.mgmt.compute.v2018_06_01.models.VirtualMachineScaleSetVM] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'virtualMachineScaleSetName': self._serialize.url("virtual_machine_scale_set_name", virtual_machine_scale_set_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + if filter is not None: + query_parameters['$filter'] = self._serialize.query("filter", filter, 'str') + if select is not None: + query_parameters['$select'] = self._serialize.query("select", select, 'str') + if expand is not None: + query_parameters['$expand'] = self._serialize.query("expand", expand, 'str') + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.VirtualMachineScaleSetVMPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{virtualMachineScaleSetName}/virtualMachines'} + + + def _power_off_initial( + self, resource_group_name, vm_scale_set_name, instance_id, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.power_off.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), + 'instanceId': self._serialize.url("instance_id", instance_id, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + def power_off( + self, resource_group_name, vm_scale_set_name, instance_id, custom_headers=None, raw=False, polling=True, **operation_config): + """Power off (stop) a virtual machine in a VM scale set. Note that + resources are still attached and you are getting charged for the + resources. Instead, use deallocate to release resources and avoid + charges. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param vm_scale_set_name: The name of the VM scale set. + :type vm_scale_set_name: str + :param instance_id: The instance ID of the virtual machine. + :type instance_id: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns None or + ClientRawResponse if raw==True + :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] + :raises: :class:`CloudError` + """ + raw_result = self._power_off_initial( + resource_group_name=resource_group_name, + vm_scale_set_name=vm_scale_set_name, + instance_id=instance_id, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + power_off.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/virtualmachines/{instanceId}/poweroff'} + + + def _restart_initial( + self, resource_group_name, vm_scale_set_name, instance_id, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.restart.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), + 'instanceId': self._serialize.url("instance_id", instance_id, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + def restart( + self, resource_group_name, vm_scale_set_name, instance_id, custom_headers=None, raw=False, polling=True, **operation_config): + """Restarts a virtual machine in a VM scale set. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param vm_scale_set_name: The name of the VM scale set. + :type vm_scale_set_name: str + :param instance_id: The instance ID of the virtual machine. + :type instance_id: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns None or + ClientRawResponse if raw==True + :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] + :raises: :class:`CloudError` + """ + raw_result = self._restart_initial( + resource_group_name=resource_group_name, + vm_scale_set_name=vm_scale_set_name, + instance_id=instance_id, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + restart.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/virtualmachines/{instanceId}/restart'} + + + def _start_initial( + self, resource_group_name, vm_scale_set_name, instance_id, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.start.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), + 'instanceId': self._serialize.url("instance_id", instance_id, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + def start( + self, resource_group_name, vm_scale_set_name, instance_id, custom_headers=None, raw=False, polling=True, **operation_config): + """Starts a virtual machine in a VM scale set. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param vm_scale_set_name: The name of the VM scale set. + :type vm_scale_set_name: str + :param instance_id: The instance ID of the virtual machine. + :type instance_id: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns None or + ClientRawResponse if raw==True + :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] + :raises: :class:`CloudError` + """ + raw_result = self._start_initial( + resource_group_name=resource_group_name, + vm_scale_set_name=vm_scale_set_name, + instance_id=instance_id, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + start.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/virtualmachines/{instanceId}/start'} + + + def _redeploy_initial( + self, resource_group_name, vm_scale_set_name, instance_id, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.redeploy.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), + 'instanceId': self._serialize.url("instance_id", instance_id, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + def redeploy( + self, resource_group_name, vm_scale_set_name, instance_id, custom_headers=None, raw=False, polling=True, **operation_config): + """Redeploys a virtual machine in a VM scale set. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param vm_scale_set_name: The name of the VM scale set. + :type vm_scale_set_name: str + :param instance_id: The instance ID of the virtual machine. + :type instance_id: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns None or + ClientRawResponse if raw==True + :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] + :raises: :class:`CloudError` + """ + raw_result = self._redeploy_initial( + resource_group_name=resource_group_name, + vm_scale_set_name=vm_scale_set_name, + instance_id=instance_id, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + redeploy.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/virtualmachines/{instanceId}/redeploy'} + + + def _perform_maintenance_initial( + self, resource_group_name, vm_scale_set_name, instance_id, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.perform_maintenance.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), + 'instanceId': self._serialize.url("instance_id", instance_id, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + def perform_maintenance( + self, resource_group_name, vm_scale_set_name, instance_id, custom_headers=None, raw=False, polling=True, **operation_config): + """Performs maintenance on a virtual machine in a VM scale set. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param vm_scale_set_name: The name of the VM scale set. + :type vm_scale_set_name: str + :param instance_id: The instance ID of the virtual machine. + :type instance_id: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns None or + ClientRawResponse if raw==True + :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] + :raises: :class:`CloudError` + """ + raw_result = self._perform_maintenance_initial( + resource_group_name=resource_group_name, + vm_scale_set_name=vm_scale_set_name, + instance_id=instance_id, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + perform_maintenance.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/virtualmachines/{instanceId}/performMaintenance'} + + + def _run_command_initial( + self, resource_group_name, vm_scale_set_name, instance_id, parameters, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.run_command.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), + 'instanceId': self._serialize.url("instance_id", instance_id, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(parameters, 'RunCommandInput') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('RunCommandResult', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def run_command( + self, resource_group_name, vm_scale_set_name, instance_id, parameters, custom_headers=None, raw=False, polling=True, **operation_config): + """Run command on a virtual machine in a VM scale set. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param vm_scale_set_name: The name of the VM scale set. + :type vm_scale_set_name: str + :param instance_id: The instance ID of the virtual machine. + :type instance_id: str + :param parameters: Parameters supplied to the Run command operation. + :type parameters: + ~azure.mgmt.compute.v2018_06_01.models.RunCommandInput + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns RunCommandResult or + ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2018_06_01.models.RunCommandResult] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2018_06_01.models.RunCommandResult]] + :raises: :class:`CloudError` + """ + raw_result = self._run_command_initial( + resource_group_name=resource_group_name, + vm_scale_set_name=vm_scale_set_name, + instance_id=instance_id, + parameters=parameters, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('RunCommandResult', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + run_command.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/virtualmachines/{instanceId}/runCommand'} diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/operations/_virtual_machine_scale_sets_operations.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/operations/_virtual_machine_scale_sets_operations.py new file mode 100644 index 000000000000..6037dd039d95 --- /dev/null +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/operations/_virtual_machine_scale_sets_operations.py @@ -0,0 +1,1764 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse +from msrestazure.azure_exceptions import CloudError +from msrest.polling import LROPoller, NoPolling +from msrestazure.polling.arm_polling import ARMPolling + +from .. import models + + +class VirtualMachineScaleSetsOperations(object): + """VirtualMachineScaleSetsOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: Client Api Version. Constant value: "2018-06-01". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2018-06-01" + + self.config = config + + + def _create_or_update_initial( + self, resource_group_name, vm_scale_set_name, parameters, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.create_or_update.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(parameters, 'VirtualMachineScaleSet') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 201]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('VirtualMachineScaleSet', response) + if response.status_code == 201: + deserialized = self._deserialize('VirtualMachineScaleSet', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def create_or_update( + self, resource_group_name, vm_scale_set_name, parameters, custom_headers=None, raw=False, polling=True, **operation_config): + """Create or update a VM scale set. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param vm_scale_set_name: The name of the VM scale set to create or + update. + :type vm_scale_set_name: str + :param parameters: The scale set object. + :type parameters: + ~azure.mgmt.compute.v2018_06_01.models.VirtualMachineScaleSet + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns VirtualMachineScaleSet + or ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2018_06_01.models.VirtualMachineScaleSet] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2018_06_01.models.VirtualMachineScaleSet]] + :raises: :class:`CloudError` + """ + raw_result = self._create_or_update_initial( + resource_group_name=resource_group_name, + vm_scale_set_name=vm_scale_set_name, + parameters=parameters, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('VirtualMachineScaleSet', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}'} + + + def _update_initial( + self, resource_group_name, vm_scale_set_name, parameters, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.update.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(parameters, 'VirtualMachineScaleSetUpdate') + + # Construct and send request + request = self._client.patch(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('VirtualMachineScaleSet', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def update( + self, resource_group_name, vm_scale_set_name, parameters, custom_headers=None, raw=False, polling=True, **operation_config): + """Update a VM scale set. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param vm_scale_set_name: The name of the VM scale set to create or + update. + :type vm_scale_set_name: str + :param parameters: The scale set object. + :type parameters: + ~azure.mgmt.compute.v2018_06_01.models.VirtualMachineScaleSetUpdate + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns VirtualMachineScaleSet + or ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2018_06_01.models.VirtualMachineScaleSet] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2018_06_01.models.VirtualMachineScaleSet]] + :raises: :class:`CloudError` + """ + raw_result = self._update_initial( + resource_group_name=resource_group_name, + vm_scale_set_name=vm_scale_set_name, + parameters=parameters, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('VirtualMachineScaleSet', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}'} + + + def _delete_initial( + self, resource_group_name, vm_scale_set_name, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.delete.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202, 204]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + def delete( + self, resource_group_name, vm_scale_set_name, custom_headers=None, raw=False, polling=True, **operation_config): + """Deletes a VM scale set. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param vm_scale_set_name: The name of the VM scale set. + :type vm_scale_set_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns None or + ClientRawResponse if raw==True + :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] + :raises: :class:`CloudError` + """ + raw_result = self._delete_initial( + resource_group_name=resource_group_name, + vm_scale_set_name=vm_scale_set_name, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}'} + + def get( + self, resource_group_name, vm_scale_set_name, custom_headers=None, raw=False, **operation_config): + """Display information about a virtual machine scale set. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param vm_scale_set_name: The name of the VM scale set. + :type vm_scale_set_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: VirtualMachineScaleSet or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.compute.v2018_06_01.models.VirtualMachineScaleSet + or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('VirtualMachineScaleSet', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}'} + + + def _deallocate_initial( + self, resource_group_name, vm_scale_set_name, instance_ids=None, custom_headers=None, raw=False, **operation_config): + vm_instance_ids = None + if instance_ids is not None: + vm_instance_ids = models.VirtualMachineScaleSetVMInstanceIDs(instance_ids=instance_ids) + + # Construct URL + url = self.deallocate.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + if vm_instance_ids is not None: + body_content = self._serialize.body(vm_instance_ids, 'VirtualMachineScaleSetVMInstanceIDs') + else: + body_content = None + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + def deallocate( + self, resource_group_name, vm_scale_set_name, instance_ids=None, custom_headers=None, raw=False, polling=True, **operation_config): + """Deallocates specific virtual machines in a VM scale set. Shuts down the + virtual machines and releases the compute resources. You are not billed + for the compute resources that this virtual machine scale set + deallocates. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param vm_scale_set_name: The name of the VM scale set. + :type vm_scale_set_name: str + :param instance_ids: The virtual machine scale set instance ids. + Omitting the virtual machine scale set instance ids will result in the + operation being performed on all virtual machines in the virtual + machine scale set. + :type instance_ids: list[str] + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns None or + ClientRawResponse if raw==True + :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] + :raises: :class:`CloudError` + """ + raw_result = self._deallocate_initial( + resource_group_name=resource_group_name, + vm_scale_set_name=vm_scale_set_name, + instance_ids=instance_ids, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + deallocate.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/deallocate'} + + + def _delete_instances_initial( + self, resource_group_name, vm_scale_set_name, instance_ids, custom_headers=None, raw=False, **operation_config): + vm_instance_ids = models.VirtualMachineScaleSetVMInstanceRequiredIDs(instance_ids=instance_ids) + + # Construct URL + url = self.delete_instances.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(vm_instance_ids, 'VirtualMachineScaleSetVMInstanceRequiredIDs') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + def delete_instances( + self, resource_group_name, vm_scale_set_name, instance_ids, custom_headers=None, raw=False, polling=True, **operation_config): + """Deletes virtual machines in a VM scale set. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param vm_scale_set_name: The name of the VM scale set. + :type vm_scale_set_name: str + :param instance_ids: The virtual machine scale set instance ids. + :type instance_ids: list[str] + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns None or + ClientRawResponse if raw==True + :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] + :raises: :class:`CloudError` + """ + raw_result = self._delete_instances_initial( + resource_group_name=resource_group_name, + vm_scale_set_name=vm_scale_set_name, + instance_ids=instance_ids, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + delete_instances.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/delete'} + + def get_instance_view( + self, resource_group_name, vm_scale_set_name, custom_headers=None, raw=False, **operation_config): + """Gets the status of a VM scale set instance. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param vm_scale_set_name: The name of the VM scale set. + :type vm_scale_set_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: VirtualMachineScaleSetInstanceView or ClientRawResponse if + raw=true + :rtype: + ~azure.mgmt.compute.v2018_06_01.models.VirtualMachineScaleSetInstanceView + or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get_instance_view.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('VirtualMachineScaleSetInstanceView', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_instance_view.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/instanceView'} + + def list( + self, resource_group_name, custom_headers=None, raw=False, **operation_config): + """Gets a list of all VM scale sets under a resource group. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of VirtualMachineScaleSet + :rtype: + ~azure.mgmt.compute.v2018_06_01.models.VirtualMachineScaleSetPaged[~azure.mgmt.compute.v2018_06_01.models.VirtualMachineScaleSet] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.VirtualMachineScaleSetPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets'} + + def list_all( + self, custom_headers=None, raw=False, **operation_config): + """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. + + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of VirtualMachineScaleSet + :rtype: + ~azure.mgmt.compute.v2018_06_01.models.VirtualMachineScaleSetPaged[~azure.mgmt.compute.v2018_06_01.models.VirtualMachineScaleSet] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_all.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.VirtualMachineScaleSetPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_all.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Compute/virtualMachineScaleSets'} + + def list_skus( + self, resource_group_name, vm_scale_set_name, custom_headers=None, raw=False, **operation_config): + """Gets a list of SKUs available for your VM scale set, including the + minimum and maximum VM instances allowed for each SKU. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param vm_scale_set_name: The name of the VM scale set. + :type vm_scale_set_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of VirtualMachineScaleSetSku + :rtype: + ~azure.mgmt.compute.v2018_06_01.models.VirtualMachineScaleSetSkuPaged[~azure.mgmt.compute.v2018_06_01.models.VirtualMachineScaleSetSku] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_skus.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.VirtualMachineScaleSetSkuPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_skus.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/skus'} + + def get_os_upgrade_history( + self, resource_group_name, vm_scale_set_name, custom_headers=None, raw=False, **operation_config): + """Gets list of OS upgrades on a VM scale set instance. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param vm_scale_set_name: The name of the VM scale set. + :type vm_scale_set_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of + UpgradeOperationHistoricalStatusInfo + :rtype: + ~azure.mgmt.compute.v2018_06_01.models.UpgradeOperationHistoricalStatusInfoPaged[~azure.mgmt.compute.v2018_06_01.models.UpgradeOperationHistoricalStatusInfo] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.get_os_upgrade_history.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.UpgradeOperationHistoricalStatusInfoPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + get_os_upgrade_history.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/osUpgradeHistory'} + + + def _power_off_initial( + self, resource_group_name, vm_scale_set_name, instance_ids=None, custom_headers=None, raw=False, **operation_config): + vm_instance_ids = None + if instance_ids is not None: + vm_instance_ids = models.VirtualMachineScaleSetVMInstanceIDs(instance_ids=instance_ids) + + # Construct URL + url = self.power_off.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + if vm_instance_ids is not None: + body_content = self._serialize.body(vm_instance_ids, 'VirtualMachineScaleSetVMInstanceIDs') + else: + body_content = None + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + def power_off( + self, resource_group_name, vm_scale_set_name, instance_ids=None, custom_headers=None, raw=False, polling=True, **operation_config): + """Power off (stop) one or more virtual machines in a VM scale set. Note + that resources are still attached and you are getting charged for the + resources. Instead, use deallocate to release resources and avoid + charges. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param vm_scale_set_name: The name of the VM scale set. + :type vm_scale_set_name: str + :param instance_ids: The virtual machine scale set instance ids. + Omitting the virtual machine scale set instance ids will result in the + operation being performed on all virtual machines in the virtual + machine scale set. + :type instance_ids: list[str] + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns None or + ClientRawResponse if raw==True + :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] + :raises: :class:`CloudError` + """ + raw_result = self._power_off_initial( + resource_group_name=resource_group_name, + vm_scale_set_name=vm_scale_set_name, + instance_ids=instance_ids, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + power_off.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/poweroff'} + + + def _restart_initial( + self, resource_group_name, vm_scale_set_name, instance_ids=None, custom_headers=None, raw=False, **operation_config): + vm_instance_ids = None + if instance_ids is not None: + vm_instance_ids = models.VirtualMachineScaleSetVMInstanceIDs(instance_ids=instance_ids) + + # Construct URL + url = self.restart.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + if vm_instance_ids is not None: + body_content = self._serialize.body(vm_instance_ids, 'VirtualMachineScaleSetVMInstanceIDs') + else: + body_content = None + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + def restart( + self, resource_group_name, vm_scale_set_name, instance_ids=None, custom_headers=None, raw=False, polling=True, **operation_config): + """Restarts one or more virtual machines in a VM scale set. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param vm_scale_set_name: The name of the VM scale set. + :type vm_scale_set_name: str + :param instance_ids: The virtual machine scale set instance ids. + Omitting the virtual machine scale set instance ids will result in the + operation being performed on all virtual machines in the virtual + machine scale set. + :type instance_ids: list[str] + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns None or + ClientRawResponse if raw==True + :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] + :raises: :class:`CloudError` + """ + raw_result = self._restart_initial( + resource_group_name=resource_group_name, + vm_scale_set_name=vm_scale_set_name, + instance_ids=instance_ids, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + restart.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/restart'} + + + def _start_initial( + self, resource_group_name, vm_scale_set_name, instance_ids=None, custom_headers=None, raw=False, **operation_config): + vm_instance_ids = None + if instance_ids is not None: + vm_instance_ids = models.VirtualMachineScaleSetVMInstanceIDs(instance_ids=instance_ids) + + # Construct URL + url = self.start.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + if vm_instance_ids is not None: + body_content = self._serialize.body(vm_instance_ids, 'VirtualMachineScaleSetVMInstanceIDs') + else: + body_content = None + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + def start( + self, resource_group_name, vm_scale_set_name, instance_ids=None, custom_headers=None, raw=False, polling=True, **operation_config): + """Starts one or more virtual machines in a VM scale set. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param vm_scale_set_name: The name of the VM scale set. + :type vm_scale_set_name: str + :param instance_ids: The virtual machine scale set instance ids. + Omitting the virtual machine scale set instance ids will result in the + operation being performed on all virtual machines in the virtual + machine scale set. + :type instance_ids: list[str] + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns None or + ClientRawResponse if raw==True + :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] + :raises: :class:`CloudError` + """ + raw_result = self._start_initial( + resource_group_name=resource_group_name, + vm_scale_set_name=vm_scale_set_name, + instance_ids=instance_ids, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + start.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/start'} + + + def _redeploy_initial( + self, resource_group_name, vm_scale_set_name, instance_ids=None, custom_headers=None, raw=False, **operation_config): + vm_instance_ids = None + if instance_ids is not None: + vm_instance_ids = models.VirtualMachineScaleSetVMInstanceIDs(instance_ids=instance_ids) + + # Construct URL + url = self.redeploy.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + if vm_instance_ids is not None: + body_content = self._serialize.body(vm_instance_ids, 'VirtualMachineScaleSetVMInstanceIDs') + else: + body_content = None + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + def redeploy( + self, resource_group_name, vm_scale_set_name, instance_ids=None, custom_headers=None, raw=False, polling=True, **operation_config): + """Redeploy one or more virtual machines in a VM scale set. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param vm_scale_set_name: The name of the VM scale set. + :type vm_scale_set_name: str + :param instance_ids: The virtual machine scale set instance ids. + Omitting the virtual machine scale set instance ids will result in the + operation being performed on all virtual machines in the virtual + machine scale set. + :type instance_ids: list[str] + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns None or + ClientRawResponse if raw==True + :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] + :raises: :class:`CloudError` + """ + raw_result = self._redeploy_initial( + resource_group_name=resource_group_name, + vm_scale_set_name=vm_scale_set_name, + instance_ids=instance_ids, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + redeploy.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/redeploy'} + + + def _perform_maintenance_initial( + self, resource_group_name, vm_scale_set_name, instance_ids=None, custom_headers=None, raw=False, **operation_config): + vm_instance_ids = None + if instance_ids is not None: + vm_instance_ids = models.VirtualMachineScaleSetVMInstanceIDs(instance_ids=instance_ids) + + # Construct URL + url = self.perform_maintenance.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + if vm_instance_ids is not None: + body_content = self._serialize.body(vm_instance_ids, 'VirtualMachineScaleSetVMInstanceIDs') + else: + body_content = None + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + def perform_maintenance( + self, resource_group_name, vm_scale_set_name, instance_ids=None, custom_headers=None, raw=False, polling=True, **operation_config): + """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. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param vm_scale_set_name: The name of the VM scale set. + :type vm_scale_set_name: str + :param instance_ids: The virtual machine scale set instance ids. + Omitting the virtual machine scale set instance ids will result in the + operation being performed on all virtual machines in the virtual + machine scale set. + :type instance_ids: list[str] + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns None or + ClientRawResponse if raw==True + :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] + :raises: :class:`CloudError` + """ + raw_result = self._perform_maintenance_initial( + resource_group_name=resource_group_name, + vm_scale_set_name=vm_scale_set_name, + instance_ids=instance_ids, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + perform_maintenance.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/performMaintenance'} + + + def _update_instances_initial( + self, resource_group_name, vm_scale_set_name, instance_ids, custom_headers=None, raw=False, **operation_config): + vm_instance_ids = models.VirtualMachineScaleSetVMInstanceRequiredIDs(instance_ids=instance_ids) + + # Construct URL + url = self.update_instances.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(vm_instance_ids, 'VirtualMachineScaleSetVMInstanceRequiredIDs') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + def update_instances( + self, resource_group_name, vm_scale_set_name, instance_ids, custom_headers=None, raw=False, polling=True, **operation_config): + """Upgrades one or more virtual machines to the latest SKU set in the VM + scale set model. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param vm_scale_set_name: The name of the VM scale set. + :type vm_scale_set_name: str + :param instance_ids: The virtual machine scale set instance ids. + :type instance_ids: list[str] + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns None or + ClientRawResponse if raw==True + :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] + :raises: :class:`CloudError` + """ + raw_result = self._update_instances_initial( + resource_group_name=resource_group_name, + vm_scale_set_name=vm_scale_set_name, + instance_ids=instance_ids, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + update_instances.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/manualupgrade'} + + + def _reimage_initial( + self, resource_group_name, vm_scale_set_name, temp_disk=None, instance_ids=None, custom_headers=None, raw=False, **operation_config): + vm_scale_set_reimage_input = None + if temp_disk is not None or instance_ids is not None: + vm_scale_set_reimage_input = models.VirtualMachineScaleSetReimageParameters(temp_disk=temp_disk, instance_ids=instance_ids) + + # Construct URL + url = self.reimage.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + if vm_scale_set_reimage_input is not None: + body_content = self._serialize.body(vm_scale_set_reimage_input, 'VirtualMachineScaleSetReimageParameters') + else: + body_content = None + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + def reimage( + self, resource_group_name, vm_scale_set_name, temp_disk=None, instance_ids=None, custom_headers=None, raw=False, polling=True, **operation_config): + """Reimages (upgrade the operating system) one or more virtual machines in + a VM scale set which don't have a ephemeral OS disk, for virtual + machines who have a ephemeral OS disk the virtual machine is reset to + initial state. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param vm_scale_set_name: The name of the VM scale set. + :type vm_scale_set_name: str + :param temp_disk: Specifies whether to reimage temp disk. Default + value: false. Note: This temp disk reimage parameter is only supported + for VM/VMSS with Ephemeral OS disk. + :type temp_disk: bool + :param instance_ids: The virtual machine scale set instance ids. + Omitting the virtual machine scale set instance ids will result in the + operation being performed on all virtual machines in the virtual + machine scale set. + :type instance_ids: list[str] + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns None or + ClientRawResponse if raw==True + :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] + :raises: :class:`CloudError` + """ + raw_result = self._reimage_initial( + resource_group_name=resource_group_name, + vm_scale_set_name=vm_scale_set_name, + temp_disk=temp_disk, + instance_ids=instance_ids, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + reimage.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/reimage'} + + + def _reimage_all_initial( + self, resource_group_name, vm_scale_set_name, instance_ids=None, custom_headers=None, raw=False, **operation_config): + vm_instance_ids = None + if instance_ids is not None: + vm_instance_ids = models.VirtualMachineScaleSetVMInstanceIDs(instance_ids=instance_ids) + + # Construct URL + url = self.reimage_all.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + if vm_instance_ids is not None: + body_content = self._serialize.body(vm_instance_ids, 'VirtualMachineScaleSetVMInstanceIDs') + else: + body_content = None + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + def reimage_all( + self, resource_group_name, vm_scale_set_name, instance_ids=None, custom_headers=None, raw=False, polling=True, **operation_config): + """Reimages all the disks ( including data disks ) in the virtual machines + in a VM scale set. This operation is only supported for managed disks. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param vm_scale_set_name: The name of the VM scale set. + :type vm_scale_set_name: str + :param instance_ids: The virtual machine scale set instance ids. + Omitting the virtual machine scale set instance ids will result in the + operation being performed on all virtual machines in the virtual + machine scale set. + :type instance_ids: list[str] + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns None or + ClientRawResponse if raw==True + :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] + :raises: :class:`CloudError` + """ + raw_result = self._reimage_all_initial( + resource_group_name=resource_group_name, + vm_scale_set_name=vm_scale_set_name, + instance_ids=instance_ids, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + reimage_all.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/reimageall'} + + def force_recovery_service_fabric_platform_update_domain_walk( + self, resource_group_name, vm_scale_set_name, platform_update_domain, custom_headers=None, raw=False, **operation_config): + """Manual platform update domain walk to update virtual machines in a + service fabric virtual machine scale set. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param vm_scale_set_name: The name of the VM scale set. + :type vm_scale_set_name: str + :param platform_update_domain: The platform update domain for which a + manual recovery walk is requested + :type platform_update_domain: int + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: RecoveryWalkResponse or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.compute.v2018_06_01.models.RecoveryWalkResponse or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.force_recovery_service_fabric_platform_update_domain_walk.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + query_parameters['platformUpdateDomain'] = self._serialize.query("platform_update_domain", platform_update_domain, 'int') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('RecoveryWalkResponse', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + force_recovery_service_fabric_platform_update_domain_walk.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/forceRecoveryServiceFabricPlatformUpdateDomainWalk'} diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/operations/_virtual_machine_sizes_operations.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/operations/_virtual_machine_sizes_operations.py new file mode 100644 index 000000000000..d5d01b2a747e --- /dev/null +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/operations/_virtual_machine_sizes_operations.py @@ -0,0 +1,111 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse +from msrestazure.azure_exceptions import CloudError + +from .. import models + + +class VirtualMachineSizesOperations(object): + """VirtualMachineSizesOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: Client Api Version. Constant value: "2018-06-01". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2018-06-01" + + self.config = config + + def list( + self, location, custom_headers=None, raw=False, **operation_config): + """This API is deprecated. Use [Resources + Skus](https://docs.microsoft.com/en-us/rest/api/compute/resourceskus/list). + + :param location: The location upon which virtual-machine-sizes is + queried. + :type location: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of VirtualMachineSize + :rtype: + ~azure.mgmt.compute.v2018_06_01.models.VirtualMachineSizePaged[~azure.mgmt.compute.v2018_06_01.models.VirtualMachineSize] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list.metadata['url'] + path_format_arguments = { + 'location': self._serialize.url("location", location, 'str', pattern=r'^[-\w\._]+$'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.VirtualMachineSizePaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/vmSizes'} diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/operations/_virtual_machines_operations.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/operations/_virtual_machines_operations.py new file mode 100644 index 000000000000..8c9f22e17663 --- /dev/null +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/operations/_virtual_machines_operations.py @@ -0,0 +1,1655 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse +from msrestazure.azure_exceptions import CloudError +from msrest.polling import LROPoller, NoPolling +from msrestazure.polling.arm_polling import ARMPolling + +from .. import models + + +class VirtualMachinesOperations(object): + """VirtualMachinesOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: Client Api Version. Constant value: "2018-06-01". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2018-06-01" + + self.config = config + + def list_by_location( + self, location, custom_headers=None, raw=False, **operation_config): + """Gets all the virtual machines under the specified subscription for the + specified location. + + :param location: The location for which virtual machines under the + subscription are queried. + :type location: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of VirtualMachine + :rtype: + ~azure.mgmt.compute.v2018_06_01.models.VirtualMachinePaged[~azure.mgmt.compute.v2018_06_01.models.VirtualMachine] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_by_location.metadata['url'] + path_format_arguments = { + 'location': self._serialize.url("location", location, 'str', pattern=r'^[-\w\._]+$'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.VirtualMachinePaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_by_location.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/virtualMachines'} + + + def _capture_initial( + self, resource_group_name, vm_name, parameters, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.capture.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vmName': self._serialize.url("vm_name", vm_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(parameters, 'VirtualMachineCaptureParameters') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('VirtualMachineCaptureResult', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def capture( + self, resource_group_name, vm_name, parameters, custom_headers=None, raw=False, polling=True, **operation_config): + """Captures the VM by copying virtual hard disks of the VM and outputs a + template that can be used to create similar VMs. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param vm_name: The name of the virtual machine. + :type vm_name: str + :param parameters: Parameters supplied to the Capture Virtual Machine + operation. + :type parameters: + ~azure.mgmt.compute.v2018_06_01.models.VirtualMachineCaptureParameters + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns + VirtualMachineCaptureResult or + ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2018_06_01.models.VirtualMachineCaptureResult] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2018_06_01.models.VirtualMachineCaptureResult]] + :raises: :class:`CloudError` + """ + raw_result = self._capture_initial( + resource_group_name=resource_group_name, + vm_name=vm_name, + parameters=parameters, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('VirtualMachineCaptureResult', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + capture.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/capture'} + + + def _create_or_update_initial( + self, resource_group_name, vm_name, parameters, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.create_or_update.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vmName': self._serialize.url("vm_name", vm_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(parameters, 'VirtualMachine') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 201]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('VirtualMachine', response) + if response.status_code == 201: + deserialized = self._deserialize('VirtualMachine', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def create_or_update( + self, resource_group_name, vm_name, parameters, custom_headers=None, raw=False, polling=True, **operation_config): + """The operation to create or update a virtual machine. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param vm_name: The name of the virtual machine. + :type vm_name: str + :param parameters: Parameters supplied to the Create Virtual Machine + operation. + :type parameters: + ~azure.mgmt.compute.v2018_06_01.models.VirtualMachine + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns VirtualMachine or + ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2018_06_01.models.VirtualMachine] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2018_06_01.models.VirtualMachine]] + :raises: :class:`CloudError` + """ + raw_result = self._create_or_update_initial( + resource_group_name=resource_group_name, + vm_name=vm_name, + parameters=parameters, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('VirtualMachine', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}'} + + + def _update_initial( + self, resource_group_name, vm_name, parameters, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.update.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vmName': self._serialize.url("vm_name", vm_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(parameters, 'VirtualMachineUpdate') + + # Construct and send request + request = self._client.patch(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 201]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('VirtualMachine', response) + if response.status_code == 201: + deserialized = self._deserialize('VirtualMachine', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def update( + self, resource_group_name, vm_name, parameters, custom_headers=None, raw=False, polling=True, **operation_config): + """The operation to update a virtual machine. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param vm_name: The name of the virtual machine. + :type vm_name: str + :param parameters: Parameters supplied to the Update Virtual Machine + operation. + :type parameters: + ~azure.mgmt.compute.v2018_06_01.models.VirtualMachineUpdate + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns VirtualMachine or + ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2018_06_01.models.VirtualMachine] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2018_06_01.models.VirtualMachine]] + :raises: :class:`CloudError` + """ + raw_result = self._update_initial( + resource_group_name=resource_group_name, + vm_name=vm_name, + parameters=parameters, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('VirtualMachine', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}'} + + + def _delete_initial( + self, resource_group_name, vm_name, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.delete.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vmName': self._serialize.url("vm_name", vm_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202, 204]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + def delete( + self, resource_group_name, vm_name, custom_headers=None, raw=False, polling=True, **operation_config): + """The operation to delete a virtual machine. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param vm_name: The name of the virtual machine. + :type vm_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns None or + ClientRawResponse if raw==True + :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] + :raises: :class:`CloudError` + """ + raw_result = self._delete_initial( + resource_group_name=resource_group_name, + vm_name=vm_name, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}'} + + def get( + self, resource_group_name, vm_name, expand=None, custom_headers=None, raw=False, **operation_config): + """Retrieves information about the model view or the instance view of a + virtual machine. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param vm_name: The name of the virtual machine. + :type vm_name: str + :param expand: The expand expression to apply on the operation. + Possible values include: 'instanceView' + :type expand: str or + ~azure.mgmt.compute.v2018_06_01.models.InstanceViewTypes + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: VirtualMachine or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.compute.v2018_06_01.models.VirtualMachine or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vmName': self._serialize.url("vm_name", vm_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + if expand is not None: + query_parameters['$expand'] = self._serialize.query("expand", expand, 'InstanceViewTypes') + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('VirtualMachine', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}'} + + def instance_view( + self, resource_group_name, vm_name, custom_headers=None, raw=False, **operation_config): + """Retrieves information about the run-time state of a virtual machine. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param vm_name: The name of the virtual machine. + :type vm_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: VirtualMachineInstanceView or ClientRawResponse if raw=true + :rtype: + ~azure.mgmt.compute.v2018_06_01.models.VirtualMachineInstanceView or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.instance_view.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vmName': self._serialize.url("vm_name", vm_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('VirtualMachineInstanceView', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + instance_view.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/instanceView'} + + + def _convert_to_managed_disks_initial( + self, resource_group_name, vm_name, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.convert_to_managed_disks.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vmName': self._serialize.url("vm_name", vm_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + def convert_to_managed_disks( + self, resource_group_name, vm_name, custom_headers=None, raw=False, polling=True, **operation_config): + """Converts virtual machine disks from blob-based to managed disks. + Virtual machine must be stop-deallocated before invoking this + operation. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param vm_name: The name of the virtual machine. + :type vm_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns None or + ClientRawResponse if raw==True + :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] + :raises: :class:`CloudError` + """ + raw_result = self._convert_to_managed_disks_initial( + resource_group_name=resource_group_name, + vm_name=vm_name, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + convert_to_managed_disks.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/convertToManagedDisks'} + + + def _deallocate_initial( + self, resource_group_name, vm_name, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.deallocate.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vmName': self._serialize.url("vm_name", vm_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + def deallocate( + self, resource_group_name, vm_name, custom_headers=None, raw=False, polling=True, **operation_config): + """Shuts down the virtual machine and releases the compute resources. You + are not billed for the compute resources that this virtual machine + uses. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param vm_name: The name of the virtual machine. + :type vm_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns None or + ClientRawResponse if raw==True + :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] + :raises: :class:`CloudError` + """ + raw_result = self._deallocate_initial( + resource_group_name=resource_group_name, + vm_name=vm_name, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + deallocate.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/deallocate'} + + def generalize( + self, resource_group_name, vm_name, custom_headers=None, raw=False, **operation_config): + """Sets the state of the virtual machine to generalized. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param vm_name: The name of the virtual machine. + :type vm_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.generalize.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vmName': self._serialize.url("vm_name", vm_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + generalize.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/generalize'} + + def list( + self, resource_group_name, custom_headers=None, raw=False, **operation_config): + """Lists all of the virtual machines in the specified resource group. Use + the nextLink property in the response to get the next page of virtual + machines. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of VirtualMachine + :rtype: + ~azure.mgmt.compute.v2018_06_01.models.VirtualMachinePaged[~azure.mgmt.compute.v2018_06_01.models.VirtualMachine] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.VirtualMachinePaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines'} + + def list_all( + self, custom_headers=None, raw=False, **operation_config): + """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. + + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of VirtualMachine + :rtype: + ~azure.mgmt.compute.v2018_06_01.models.VirtualMachinePaged[~azure.mgmt.compute.v2018_06_01.models.VirtualMachine] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_all.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.VirtualMachinePaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_all.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Compute/virtualMachines'} + + def list_available_sizes( + self, resource_group_name, vm_name, custom_headers=None, raw=False, **operation_config): + """Lists all available virtual machine sizes to which the specified + virtual machine can be resized. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param vm_name: The name of the virtual machine. + :type vm_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of VirtualMachineSize + :rtype: + ~azure.mgmt.compute.v2018_06_01.models.VirtualMachineSizePaged[~azure.mgmt.compute.v2018_06_01.models.VirtualMachineSize] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_available_sizes.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vmName': self._serialize.url("vm_name", vm_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.VirtualMachineSizePaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_available_sizes.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/vmSizes'} + + + def _power_off_initial( + self, resource_group_name, vm_name, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.power_off.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vmName': self._serialize.url("vm_name", vm_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + def power_off( + self, resource_group_name, vm_name, custom_headers=None, raw=False, polling=True, **operation_config): + """The operation to power off (stop) a virtual machine. The virtual + machine can be restarted with the same provisioned resources. You are + still charged for this virtual machine. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param vm_name: The name of the virtual machine. + :type vm_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns None or + ClientRawResponse if raw==True + :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] + :raises: :class:`CloudError` + """ + raw_result = self._power_off_initial( + resource_group_name=resource_group_name, + vm_name=vm_name, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + power_off.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/powerOff'} + + + def _restart_initial( + self, resource_group_name, vm_name, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.restart.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vmName': self._serialize.url("vm_name", vm_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + def restart( + self, resource_group_name, vm_name, custom_headers=None, raw=False, polling=True, **operation_config): + """The operation to restart a virtual machine. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param vm_name: The name of the virtual machine. + :type vm_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns None or + ClientRawResponse if raw==True + :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] + :raises: :class:`CloudError` + """ + raw_result = self._restart_initial( + resource_group_name=resource_group_name, + vm_name=vm_name, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + restart.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/restart'} + + + def _start_initial( + self, resource_group_name, vm_name, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.start.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vmName': self._serialize.url("vm_name", vm_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + def start( + self, resource_group_name, vm_name, custom_headers=None, raw=False, polling=True, **operation_config): + """The operation to start a virtual machine. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param vm_name: The name of the virtual machine. + :type vm_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns None or + ClientRawResponse if raw==True + :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] + :raises: :class:`CloudError` + """ + raw_result = self._start_initial( + resource_group_name=resource_group_name, + vm_name=vm_name, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + start.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/start'} + + + def _redeploy_initial( + self, resource_group_name, vm_name, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.redeploy.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vmName': self._serialize.url("vm_name", vm_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + def redeploy( + self, resource_group_name, vm_name, custom_headers=None, raw=False, polling=True, **operation_config): + """The operation to redeploy a virtual machine. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param vm_name: The name of the virtual machine. + :type vm_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns None or + ClientRawResponse if raw==True + :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] + :raises: :class:`CloudError` + """ + raw_result = self._redeploy_initial( + resource_group_name=resource_group_name, + vm_name=vm_name, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + redeploy.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/redeploy'} + + + def _reimage_initial( + self, resource_group_name, vm_name, temp_disk=None, custom_headers=None, raw=False, **operation_config): + parameters = None + if temp_disk is not None: + parameters = models.VirtualMachineReimageParameters(temp_disk=temp_disk) + + # Construct URL + url = self.reimage.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vmName': self._serialize.url("vm_name", vm_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + if parameters is not None: + body_content = self._serialize.body(parameters, 'VirtualMachineReimageParameters') + else: + body_content = None + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + def reimage( + self, resource_group_name, vm_name, temp_disk=None, custom_headers=None, raw=False, polling=True, **operation_config): + """Reimages the virtual machine which has an ephemeral OS disk back to its + initial state. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param vm_name: The name of the virtual machine. + :type vm_name: str + :param temp_disk: Specifies whether to reimage temp disk. Default + value: false. Note: This temp disk reimage parameter is only supported + for VM/VMSS with Ephemeral OS disk. + :type temp_disk: bool + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns None or + ClientRawResponse if raw==True + :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] + :raises: :class:`CloudError` + """ + raw_result = self._reimage_initial( + resource_group_name=resource_group_name, + vm_name=vm_name, + temp_disk=temp_disk, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + reimage.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/reimage'} + + + def _perform_maintenance_initial( + self, resource_group_name, vm_name, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.perform_maintenance.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vmName': self._serialize.url("vm_name", vm_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + def perform_maintenance( + self, resource_group_name, vm_name, custom_headers=None, raw=False, polling=True, **operation_config): + """The operation to perform maintenance on a virtual machine. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param vm_name: The name of the virtual machine. + :type vm_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns None or + ClientRawResponse if raw==True + :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] + :raises: :class:`CloudError` + """ + raw_result = self._perform_maintenance_initial( + resource_group_name=resource_group_name, + vm_name=vm_name, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + perform_maintenance.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/performMaintenance'} + + + def _run_command_initial( + self, resource_group_name, vm_name, parameters, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.run_command.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vmName': self._serialize.url("vm_name", vm_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(parameters, 'RunCommandInput') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('RunCommandResult', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def run_command( + self, resource_group_name, vm_name, parameters, custom_headers=None, raw=False, polling=True, **operation_config): + """Run command on the VM. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param vm_name: The name of the virtual machine. + :type vm_name: str + :param parameters: Parameters supplied to the Run command operation. + :type parameters: + ~azure.mgmt.compute.v2018_06_01.models.RunCommandInput + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns RunCommandResult or + ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2018_06_01.models.RunCommandResult] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2018_06_01.models.RunCommandResult]] + :raises: :class:`CloudError` + """ + raw_result = self._run_command_initial( + resource_group_name=resource_group_name, + vm_name=vm_name, + parameters=parameters, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('RunCommandResult', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + run_command.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/runCommand'} diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/operations/availability_sets_operations.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/operations/availability_sets_operations.py deleted file mode 100644 index 2028e318b9b5..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/operations/availability_sets_operations.py +++ /dev/null @@ -1,495 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError - -from .. import models - - -class AvailabilitySetsOperations(object): - """AvailabilitySetsOperations operations. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: Client Api Version. Constant value: "2018-06-01". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2018-06-01" - - self.config = config - - def create_or_update( - self, resource_group_name, availability_set_name, parameters, custom_headers=None, raw=False, **operation_config): - """Create or update an availability set. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param availability_set_name: The name of the availability set. - :type availability_set_name: str - :param parameters: Parameters supplied to the Create Availability Set - operation. - :type parameters: - ~azure.mgmt.compute.v2018_06_01.models.AvailabilitySet - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: AvailabilitySet or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.compute.v2018_06_01.models.AvailabilitySet or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.create_or_update.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'availabilitySetName': self._serialize.url("availability_set_name", availability_set_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(parameters, 'AvailabilitySet') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('AvailabilitySet', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}'} - - def update( - self, resource_group_name, availability_set_name, parameters, custom_headers=None, raw=False, **operation_config): - """Update an availability set. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param availability_set_name: The name of the availability set. - :type availability_set_name: str - :param parameters: Parameters supplied to the Update Availability Set - operation. - :type parameters: - ~azure.mgmt.compute.v2018_06_01.models.AvailabilitySetUpdate - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: AvailabilitySet or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.compute.v2018_06_01.models.AvailabilitySet or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.update.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'availabilitySetName': self._serialize.url("availability_set_name", availability_set_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(parameters, 'AvailabilitySetUpdate') - - # Construct and send request - request = self._client.patch(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('AvailabilitySet', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}'} - - def delete( - self, resource_group_name, availability_set_name, custom_headers=None, raw=False, **operation_config): - """Delete an availability set. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param availability_set_name: The name of the availability set. - :type availability_set_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.delete.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'availabilitySetName': self._serialize.url("availability_set_name", availability_set_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 204]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}'} - - def get( - self, resource_group_name, availability_set_name, custom_headers=None, raw=False, **operation_config): - """Retrieves information about an availability set. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param availability_set_name: The name of the availability set. - :type availability_set_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: AvailabilitySet or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.compute.v2018_06_01.models.AvailabilitySet or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'availabilitySetName': self._serialize.url("availability_set_name", availability_set_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('AvailabilitySet', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}'} - - def list_by_subscription( - self, custom_headers=None, raw=False, **operation_config): - """Lists all availability sets in a subscription. - - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of AvailabilitySet - :rtype: - ~azure.mgmt.compute.v2018_06_01.models.AvailabilitySetPaged[~azure.mgmt.compute.v2018_06_01.models.AvailabilitySet] - :raises: :class:`CloudError` - """ - def internal_paging(next_link=None, raw=False): - - if not next_link: - # Construct URL - url = self.list_by_subscription.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - deserialized = models.AvailabilitySetPaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.AvailabilitySetPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - list_by_subscription.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Compute/availabilitySets'} - - def list( - self, resource_group_name, custom_headers=None, raw=False, **operation_config): - """Lists all availability sets in a resource group. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of AvailabilitySet - :rtype: - ~azure.mgmt.compute.v2018_06_01.models.AvailabilitySetPaged[~azure.mgmt.compute.v2018_06_01.models.AvailabilitySet] - :raises: :class:`CloudError` - """ - def internal_paging(next_link=None, raw=False): - - if not next_link: - # Construct URL - url = self.list.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - deserialized = models.AvailabilitySetPaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.AvailabilitySetPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets'} - - def list_available_sizes( - self, resource_group_name, availability_set_name, custom_headers=None, raw=False, **operation_config): - """Lists all available virtual machine sizes that can be used to create a - new virtual machine in an existing availability set. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param availability_set_name: The name of the availability set. - :type availability_set_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of VirtualMachineSize - :rtype: - ~azure.mgmt.compute.v2018_06_01.models.VirtualMachineSizePaged[~azure.mgmt.compute.v2018_06_01.models.VirtualMachineSize] - :raises: :class:`CloudError` - """ - def internal_paging(next_link=None, raw=False): - - if not next_link: - # Construct URL - url = self.list_available_sizes.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'availabilitySetName': self._serialize.url("availability_set_name", availability_set_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - deserialized = models.VirtualMachineSizePaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.VirtualMachineSizePaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - list_available_sizes.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}/vmSizes'} diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/operations/disks_operations.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/operations/disks_operations.py deleted file mode 100644 index aba6f86fc995..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/operations/disks_operations.py +++ /dev/null @@ -1,722 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError -from msrest.polling import LROPoller, NoPolling -from msrestazure.polling.arm_polling import ARMPolling - -from .. import models - - -class DisksOperations(object): - """DisksOperations operations. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: Client Api Version. Constant value: "2018-06-01". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2018-06-01" - - self.config = config - - - def _create_or_update_initial( - self, resource_group_name, disk_name, disk, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.create_or_update.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'diskName': self._serialize.url("disk_name", disk_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(disk, 'Disk') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('Disk', response) - if response.status_code == 202: - deserialized = self._deserialize('Disk', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def create_or_update( - self, resource_group_name, disk_name, disk, custom_headers=None, raw=False, polling=True, **operation_config): - """Creates or updates a disk. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param disk_name: The name of the managed disk that is being created. - The name can't be changed after the disk is created. Supported - characters for the name are a-z, A-Z, 0-9 and _. The maximum name - length is 80 characters. - :type disk_name: str - :param disk: Disk object supplied in the body of the Put disk - operation. - :type disk: ~azure.mgmt.compute.v2018_06_01.models.Disk - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns Disk or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2018_06_01.models.Disk] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2018_06_01.models.Disk]] - :raises: :class:`CloudError` - """ - raw_result = self._create_or_update_initial( - resource_group_name=resource_group_name, - disk_name=disk_name, - disk=disk, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('Disk', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/disks/{diskName}'} - - - def _update_initial( - self, resource_group_name, disk_name, disk, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.update.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'diskName': self._serialize.url("disk_name", disk_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(disk, 'DiskUpdate') - - # Construct and send request - request = self._client.patch(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('Disk', response) - if response.status_code == 202: - deserialized = self._deserialize('Disk', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def update( - self, resource_group_name, disk_name, disk, custom_headers=None, raw=False, polling=True, **operation_config): - """Updates (patches) a disk. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param disk_name: The name of the managed disk that is being created. - The name can't be changed after the disk is created. Supported - characters for the name are a-z, A-Z, 0-9 and _. The maximum name - length is 80 characters. - :type disk_name: str - :param disk: Disk object supplied in the body of the Patch disk - operation. - :type disk: ~azure.mgmt.compute.v2018_06_01.models.DiskUpdate - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns Disk or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2018_06_01.models.Disk] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2018_06_01.models.Disk]] - :raises: :class:`CloudError` - """ - raw_result = self._update_initial( - resource_group_name=resource_group_name, - disk_name=disk_name, - disk=disk, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('Disk', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/disks/{diskName}'} - - def get( - self, resource_group_name, disk_name, custom_headers=None, raw=False, **operation_config): - """Gets information about a disk. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param disk_name: The name of the managed disk that is being created. - The name can't be changed after the disk is created. Supported - characters for the name are a-z, A-Z, 0-9 and _. The maximum name - length is 80 characters. - :type disk_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: Disk or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.compute.v2018_06_01.models.Disk or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'diskName': self._serialize.url("disk_name", disk_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('Disk', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/disks/{diskName}'} - - - def _delete_initial( - self, resource_group_name, disk_name, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.delete.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'diskName': self._serialize.url("disk_name", disk_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202, 204]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - def delete( - self, resource_group_name, disk_name, custom_headers=None, raw=False, polling=True, **operation_config): - """Deletes a disk. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param disk_name: The name of the managed disk that is being created. - The name can't be changed after the disk is created. Supported - characters for the name are a-z, A-Z, 0-9 and _. The maximum name - length is 80 characters. - :type disk_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns None or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] - :raises: :class:`CloudError` - """ - raw_result = self._delete_initial( - resource_group_name=resource_group_name, - disk_name=disk_name, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/disks/{diskName}'} - - def list_by_resource_group( - self, resource_group_name, custom_headers=None, raw=False, **operation_config): - """Lists all the disks under a resource group. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of Disk - :rtype: - ~azure.mgmt.compute.v2018_06_01.models.DiskPaged[~azure.mgmt.compute.v2018_06_01.models.Disk] - :raises: :class:`CloudError` - """ - def internal_paging(next_link=None, raw=False): - - if not next_link: - # Construct URL - url = self.list_by_resource_group.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - deserialized = models.DiskPaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.DiskPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/disks'} - - def list( - self, custom_headers=None, raw=False, **operation_config): - """Lists all the disks under a subscription. - - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of Disk - :rtype: - ~azure.mgmt.compute.v2018_06_01.models.DiskPaged[~azure.mgmt.compute.v2018_06_01.models.Disk] - :raises: :class:`CloudError` - """ - def internal_paging(next_link=None, raw=False): - - if not next_link: - # Construct URL - url = self.list.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - deserialized = models.DiskPaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.DiskPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Compute/disks'} - - - def _grant_access_initial( - self, resource_group_name, disk_name, access, duration_in_seconds, custom_headers=None, raw=False, **operation_config): - grant_access_data = models.GrantAccessData(access=access, duration_in_seconds=duration_in_seconds) - - # Construct URL - url = self.grant_access.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'diskName': self._serialize.url("disk_name", disk_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(grant_access_data, 'GrantAccessData') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('AccessUri', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def grant_access( - self, resource_group_name, disk_name, access, duration_in_seconds, custom_headers=None, raw=False, polling=True, **operation_config): - """Grants access to a disk. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param disk_name: The name of the managed disk that is being created. - The name can't be changed after the disk is created. Supported - characters for the name are a-z, A-Z, 0-9 and _. The maximum name - length is 80 characters. - :type disk_name: str - :param access: Possible values include: 'None', 'Read' - :type access: str or - ~azure.mgmt.compute.v2018_06_01.models.AccessLevel - :param duration_in_seconds: Time duration in seconds until the SAS - access expires. - :type duration_in_seconds: int - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns AccessUri or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2018_06_01.models.AccessUri] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2018_06_01.models.AccessUri]] - :raises: :class:`CloudError` - """ - raw_result = self._grant_access_initial( - resource_group_name=resource_group_name, - disk_name=disk_name, - access=access, - duration_in_seconds=duration_in_seconds, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('AccessUri', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - grant_access.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/disks/{diskName}/beginGetAccess'} - - - def _revoke_access_initial( - self, resource_group_name, disk_name, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.revoke_access.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'diskName': self._serialize.url("disk_name", disk_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - def revoke_access( - self, resource_group_name, disk_name, custom_headers=None, raw=False, polling=True, **operation_config): - """Revokes access to a disk. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param disk_name: The name of the managed disk that is being created. - The name can't be changed after the disk is created. Supported - characters for the name are a-z, A-Z, 0-9 and _. The maximum name - length is 80 characters. - :type disk_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns None or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] - :raises: :class:`CloudError` - """ - raw_result = self._revoke_access_initial( - resource_group_name=resource_group_name, - disk_name=disk_name, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - revoke_access.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/disks/{diskName}/endGetAccess'} diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/operations/galleries_operations.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/operations/galleries_operations.py deleted file mode 100644 index 9a04fb8a60e8..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/operations/galleries_operations.py +++ /dev/null @@ -1,420 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError -from msrest.polling import LROPoller, NoPolling -from msrestazure.polling.arm_polling import ARMPolling - -from .. import models - - -class GalleriesOperations(object): - """GalleriesOperations operations. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: Client Api Version. Constant value: "2018-06-01". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2018-06-01" - - self.config = config - - - def _create_or_update_initial( - self, resource_group_name, gallery_name, gallery, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.create_or_update.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'galleryName': self._serialize.url("gallery_name", gallery_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(gallery, 'Gallery') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 201, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('Gallery', response) - if response.status_code == 201: - deserialized = self._deserialize('Gallery', response) - if response.status_code == 202: - deserialized = self._deserialize('Gallery', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def create_or_update( - self, resource_group_name, gallery_name, gallery, custom_headers=None, raw=False, polling=True, **operation_config): - """Create or update a Shared Image Gallery. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param gallery_name: The name of the Shared Image Gallery. The allowed - characters are alphabets and numbers with dots and periods allowed in - the middle. The maximum length is 80 characters. - :type gallery_name: str - :param gallery: Parameters supplied to the create or update Shared - Image Gallery operation. - :type gallery: ~azure.mgmt.compute.v2018_06_01.models.Gallery - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns Gallery or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2018_06_01.models.Gallery] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2018_06_01.models.Gallery]] - :raises: :class:`CloudError` - """ - raw_result = self._create_or_update_initial( - resource_group_name=resource_group_name, - gallery_name=gallery_name, - gallery=gallery, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('Gallery', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}'} - - def get( - self, resource_group_name, gallery_name, custom_headers=None, raw=False, **operation_config): - """Retrieves information about a Shared Image Gallery. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param gallery_name: The name of the Shared Image Gallery. - :type gallery_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: Gallery or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.compute.v2018_06_01.models.Gallery or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'galleryName': self._serialize.url("gallery_name", gallery_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('Gallery', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}'} - - - def _delete_initial( - self, resource_group_name, gallery_name, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.delete.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'galleryName': self._serialize.url("gallery_name", gallery_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202, 204]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - def delete( - self, resource_group_name, gallery_name, custom_headers=None, raw=False, polling=True, **operation_config): - """Delete a Shared Image Gallery. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param gallery_name: The name of the Shared Image Gallery to be - deleted. - :type gallery_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns None or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] - :raises: :class:`CloudError` - """ - raw_result = self._delete_initial( - resource_group_name=resource_group_name, - gallery_name=gallery_name, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}'} - - def list_by_resource_group( - self, resource_group_name, custom_headers=None, raw=False, **operation_config): - """List galleries under a resource group. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of Gallery - :rtype: - ~azure.mgmt.compute.v2018_06_01.models.GalleryPaged[~azure.mgmt.compute.v2018_06_01.models.Gallery] - :raises: :class:`CloudError` - """ - def internal_paging(next_link=None, raw=False): - - if not next_link: - # Construct URL - url = self.list_by_resource_group.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - deserialized = models.GalleryPaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.GalleryPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries'} - - def list( - self, custom_headers=None, raw=False, **operation_config): - """List galleries under a subscription. - - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of Gallery - :rtype: - ~azure.mgmt.compute.v2018_06_01.models.GalleryPaged[~azure.mgmt.compute.v2018_06_01.models.Gallery] - :raises: :class:`CloudError` - """ - def internal_paging(next_link=None, raw=False): - - if not next_link: - # Construct URL - url = self.list.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - deserialized = models.GalleryPaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.GalleryPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Compute/galleries'} diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/operations/gallery_image_versions_operations.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/operations/gallery_image_versions_operations.py deleted file mode 100644 index cb024e59c299..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/operations/gallery_image_versions_operations.py +++ /dev/null @@ -1,402 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError -from msrest.polling import LROPoller, NoPolling -from msrestazure.polling.arm_polling import ARMPolling - -from .. import models - - -class GalleryImageVersionsOperations(object): - """GalleryImageVersionsOperations operations. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: Client Api Version. Constant value: "2018-06-01". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2018-06-01" - - self.config = config - - - def _create_or_update_initial( - self, resource_group_name, gallery_name, gallery_image_name, gallery_image_version_name, gallery_image_version, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.create_or_update.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'galleryName': self._serialize.url("gallery_name", gallery_name, 'str'), - 'galleryImageName': self._serialize.url("gallery_image_name", gallery_image_name, 'str'), - 'galleryImageVersionName': self._serialize.url("gallery_image_version_name", gallery_image_version_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(gallery_image_version, 'GalleryImageVersion') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 201, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('GalleryImageVersion', response) - if response.status_code == 201: - deserialized = self._deserialize('GalleryImageVersion', response) - if response.status_code == 202: - deserialized = self._deserialize('GalleryImageVersion', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def create_or_update( - self, resource_group_name, gallery_name, gallery_image_name, gallery_image_version_name, gallery_image_version, custom_headers=None, raw=False, polling=True, **operation_config): - """Create or update a gallery Image Version. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param gallery_name: The name of the Shared Image Gallery in which the - Image Definition resides. - :type gallery_name: str - :param gallery_image_name: The name of the gallery Image Definition in - which the Image Version is to be created. - :type gallery_image_name: str - :param gallery_image_version_name: The name of the gallery Image - Version to be created. Needs to follow semantic version name pattern: - The allowed characters are digit and period. Digits must be within the - range of a 32-bit integer. Format: - .. - :type gallery_image_version_name: str - :param gallery_image_version: Parameters supplied to the create or - update gallery Image Version operation. - :type gallery_image_version: - ~azure.mgmt.compute.v2018_06_01.models.GalleryImageVersion - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns GalleryImageVersion or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2018_06_01.models.GalleryImageVersion] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2018_06_01.models.GalleryImageVersion]] - :raises: :class:`CloudError` - """ - raw_result = self._create_or_update_initial( - resource_group_name=resource_group_name, - gallery_name=gallery_name, - gallery_image_name=gallery_image_name, - gallery_image_version_name=gallery_image_version_name, - gallery_image_version=gallery_image_version, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('GalleryImageVersion', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/images/{galleryImageName}/versions/{galleryImageVersionName}'} - - def get( - self, resource_group_name, gallery_name, gallery_image_name, gallery_image_version_name, expand=None, custom_headers=None, raw=False, **operation_config): - """Retrieves information about a gallery Image Version. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param gallery_name: The name of the Shared Image Gallery in which the - Image Definition resides. - :type gallery_name: str - :param gallery_image_name: The name of the gallery Image Definition in - which the Image Version resides. - :type gallery_image_name: str - :param gallery_image_version_name: The name of the gallery Image - Version to be retrieved. - :type gallery_image_version_name: str - :param expand: The expand expression to apply on the operation. - Possible values include: 'ReplicationStatus' - :type expand: str or - ~azure.mgmt.compute.v2018_06_01.models.ReplicationStatusTypes - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: GalleryImageVersion or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.compute.v2018_06_01.models.GalleryImageVersion or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'galleryName': self._serialize.url("gallery_name", gallery_name, 'str'), - 'galleryImageName': self._serialize.url("gallery_image_name", gallery_image_name, 'str'), - 'galleryImageVersionName': self._serialize.url("gallery_image_version_name", gallery_image_version_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - if expand is not None: - query_parameters['$expand'] = self._serialize.query("expand", expand, 'str') - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('GalleryImageVersion', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/images/{galleryImageName}/versions/{galleryImageVersionName}'} - - - def _delete_initial( - self, resource_group_name, gallery_name, gallery_image_name, gallery_image_version_name, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.delete.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'galleryName': self._serialize.url("gallery_name", gallery_name, 'str'), - 'galleryImageName': self._serialize.url("gallery_image_name", gallery_image_name, 'str'), - 'galleryImageVersionName': self._serialize.url("gallery_image_version_name", gallery_image_version_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202, 204]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - def delete( - self, resource_group_name, gallery_name, gallery_image_name, gallery_image_version_name, custom_headers=None, raw=False, polling=True, **operation_config): - """Delete a gallery Image Version. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param gallery_name: The name of the Shared Image Gallery in which the - Image Definition resides. - :type gallery_name: str - :param gallery_image_name: The name of the gallery Image Definition in - which the Image Version resides. - :type gallery_image_name: str - :param gallery_image_version_name: The name of the gallery Image - Version to be deleted. - :type gallery_image_version_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns None or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] - :raises: :class:`CloudError` - """ - raw_result = self._delete_initial( - resource_group_name=resource_group_name, - gallery_name=gallery_name, - gallery_image_name=gallery_image_name, - gallery_image_version_name=gallery_image_version_name, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/images/{galleryImageName}/versions/{galleryImageVersionName}'} - - def list_by_gallery_image( - self, resource_group_name, gallery_name, gallery_image_name, custom_headers=None, raw=False, **operation_config): - """List gallery Image Versions in a gallery Image Definition. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param gallery_name: The name of the Shared Image Gallery in which the - Image Definition resides. - :type gallery_name: str - :param gallery_image_name: The name of the Shared Image Gallery Image - Definition from which the Image Versions are to be listed. - :type gallery_image_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of GalleryImageVersion - :rtype: - ~azure.mgmt.compute.v2018_06_01.models.GalleryImageVersionPaged[~azure.mgmt.compute.v2018_06_01.models.GalleryImageVersion] - :raises: :class:`CloudError` - """ - def internal_paging(next_link=None, raw=False): - - if not next_link: - # Construct URL - url = self.list_by_gallery_image.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'galleryName': self._serialize.url("gallery_name", gallery_name, 'str'), - 'galleryImageName': self._serialize.url("gallery_image_name", gallery_image_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - deserialized = models.GalleryImageVersionPaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.GalleryImageVersionPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - list_by_gallery_image.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/images/{galleryImageName}/versions'} diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/operations/gallery_images_operations.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/operations/gallery_images_operations.py deleted file mode 100644 index 3a73ceb60df4..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/operations/gallery_images_operations.py +++ /dev/null @@ -1,377 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError -from msrest.polling import LROPoller, NoPolling -from msrestazure.polling.arm_polling import ARMPolling - -from .. import models - - -class GalleryImagesOperations(object): - """GalleryImagesOperations operations. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: Client Api Version. Constant value: "2018-06-01". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2018-06-01" - - self.config = config - - - def _create_or_update_initial( - self, resource_group_name, gallery_name, gallery_image_name, gallery_image, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.create_or_update.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'galleryName': self._serialize.url("gallery_name", gallery_name, 'str'), - 'galleryImageName': self._serialize.url("gallery_image_name", gallery_image_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(gallery_image, 'GalleryImage') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 201, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('GalleryImage', response) - if response.status_code == 201: - deserialized = self._deserialize('GalleryImage', response) - if response.status_code == 202: - deserialized = self._deserialize('GalleryImage', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def create_or_update( - self, resource_group_name, gallery_name, gallery_image_name, gallery_image, custom_headers=None, raw=False, polling=True, **operation_config): - """Create or update a gallery Image Definition. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param gallery_name: The name of the Shared Image Gallery in which the - Image Definition is to be created. - :type gallery_name: str - :param gallery_image_name: The name of the gallery Image Definition to - be created or updated. The allowed characters are alphabets and - numbers with dots, dashes, and periods allowed in the middle. The - maximum length is 80 characters. - :type gallery_image_name: str - :param gallery_image: Parameters supplied to the create or update - gallery image operation. - :type gallery_image: - ~azure.mgmt.compute.v2018_06_01.models.GalleryImage - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns GalleryImage or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2018_06_01.models.GalleryImage] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2018_06_01.models.GalleryImage]] - :raises: :class:`CloudError` - """ - raw_result = self._create_or_update_initial( - resource_group_name=resource_group_name, - gallery_name=gallery_name, - gallery_image_name=gallery_image_name, - gallery_image=gallery_image, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('GalleryImage', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/images/{galleryImageName}'} - - def get( - self, resource_group_name, gallery_name, gallery_image_name, custom_headers=None, raw=False, **operation_config): - """Retrieves information about a gallery Image Definition. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param gallery_name: The name of the Shared Image Gallery from which - the Image Definitions are to be retrieved. - :type gallery_name: str - :param gallery_image_name: The name of the gallery Image Definition to - be retrieved. - :type gallery_image_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: GalleryImage or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.compute.v2018_06_01.models.GalleryImage or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'galleryName': self._serialize.url("gallery_name", gallery_name, 'str'), - 'galleryImageName': self._serialize.url("gallery_image_name", gallery_image_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('GalleryImage', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/images/{galleryImageName}'} - - - def _delete_initial( - self, resource_group_name, gallery_name, gallery_image_name, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.delete.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'galleryName': self._serialize.url("gallery_name", gallery_name, 'str'), - 'galleryImageName': self._serialize.url("gallery_image_name", gallery_image_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202, 204]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - def delete( - self, resource_group_name, gallery_name, gallery_image_name, custom_headers=None, raw=False, polling=True, **operation_config): - """Delete a gallery image. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param gallery_name: The name of the Shared Image Gallery in which the - Image Definition is to be deleted. - :type gallery_name: str - :param gallery_image_name: The name of the gallery Image Definition to - be deleted. - :type gallery_image_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns None or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] - :raises: :class:`CloudError` - """ - raw_result = self._delete_initial( - resource_group_name=resource_group_name, - gallery_name=gallery_name, - gallery_image_name=gallery_image_name, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/images/{galleryImageName}'} - - def list_by_gallery( - self, resource_group_name, gallery_name, custom_headers=None, raw=False, **operation_config): - """List gallery Image Definitions in a gallery. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param gallery_name: The name of the Shared Image Gallery from which - Image Definitions are to be listed. - :type gallery_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of GalleryImage - :rtype: - ~azure.mgmt.compute.v2018_06_01.models.GalleryImagePaged[~azure.mgmt.compute.v2018_06_01.models.GalleryImage] - :raises: :class:`CloudError` - """ - def internal_paging(next_link=None, raw=False): - - if not next_link: - # Construct URL - url = self.list_by_gallery.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'galleryName': self._serialize.url("gallery_name", gallery_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - deserialized = models.GalleryImagePaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.GalleryImagePaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - list_by_gallery.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/images'} diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/operations/images_operations.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/operations/images_operations.py deleted file mode 100644 index 27d51e7c4b66..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/operations/images_operations.py +++ /dev/null @@ -1,522 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError -from msrest.polling import LROPoller, NoPolling -from msrestazure.polling.arm_polling import ARMPolling - -from .. import models - - -class ImagesOperations(object): - """ImagesOperations operations. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: Client Api Version. Constant value: "2018-06-01". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2018-06-01" - - self.config = config - - - def _create_or_update_initial( - self, resource_group_name, image_name, parameters, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.create_or_update.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'imageName': self._serialize.url("image_name", image_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(parameters, 'Image') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 201]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('Image', response) - if response.status_code == 201: - deserialized = self._deserialize('Image', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def create_or_update( - self, resource_group_name, image_name, parameters, custom_headers=None, raw=False, polling=True, **operation_config): - """Create or update an image. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param image_name: The name of the image. - :type image_name: str - :param parameters: Parameters supplied to the Create Image operation. - :type parameters: ~azure.mgmt.compute.v2018_06_01.models.Image - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns Image or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2018_06_01.models.Image] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2018_06_01.models.Image]] - :raises: :class:`CloudError` - """ - raw_result = self._create_or_update_initial( - resource_group_name=resource_group_name, - image_name=image_name, - parameters=parameters, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('Image', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/images/{imageName}'} - - - def _update_initial( - self, resource_group_name, image_name, parameters, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.update.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'imageName': self._serialize.url("image_name", image_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(parameters, 'ImageUpdate') - - # Construct and send request - request = self._client.patch(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 201]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('Image', response) - if response.status_code == 201: - deserialized = self._deserialize('Image', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def update( - self, resource_group_name, image_name, parameters, custom_headers=None, raw=False, polling=True, **operation_config): - """Update an image. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param image_name: The name of the image. - :type image_name: str - :param parameters: Parameters supplied to the Update Image operation. - :type parameters: ~azure.mgmt.compute.v2018_06_01.models.ImageUpdate - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns Image or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2018_06_01.models.Image] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2018_06_01.models.Image]] - :raises: :class:`CloudError` - """ - raw_result = self._update_initial( - resource_group_name=resource_group_name, - image_name=image_name, - parameters=parameters, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('Image', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/images/{imageName}'} - - - def _delete_initial( - self, resource_group_name, image_name, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.delete.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'imageName': self._serialize.url("image_name", image_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202, 204]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - def delete( - self, resource_group_name, image_name, custom_headers=None, raw=False, polling=True, **operation_config): - """Deletes an Image. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param image_name: The name of the image. - :type image_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns None or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] - :raises: :class:`CloudError` - """ - raw_result = self._delete_initial( - resource_group_name=resource_group_name, - image_name=image_name, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/images/{imageName}'} - - def get( - self, resource_group_name, image_name, expand=None, custom_headers=None, raw=False, **operation_config): - """Gets an image. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param image_name: The name of the image. - :type image_name: str - :param expand: The expand expression to apply on the operation. - :type expand: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: Image or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.compute.v2018_06_01.models.Image or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'imageName': self._serialize.url("image_name", image_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - if expand is not None: - query_parameters['$expand'] = self._serialize.query("expand", expand, 'str') - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('Image', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/images/{imageName}'} - - def list_by_resource_group( - self, resource_group_name, custom_headers=None, raw=False, **operation_config): - """Gets the list of images under a resource group. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of Image - :rtype: - ~azure.mgmt.compute.v2018_06_01.models.ImagePaged[~azure.mgmt.compute.v2018_06_01.models.Image] - :raises: :class:`CloudError` - """ - def internal_paging(next_link=None, raw=False): - - if not next_link: - # Construct URL - url = self.list_by_resource_group.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - deserialized = models.ImagePaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.ImagePaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/images'} - - def list( - self, custom_headers=None, raw=False, **operation_config): - """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. - - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of Image - :rtype: - ~azure.mgmt.compute.v2018_06_01.models.ImagePaged[~azure.mgmt.compute.v2018_06_01.models.Image] - :raises: :class:`CloudError` - """ - def internal_paging(next_link=None, raw=False): - - if not next_link: - # Construct URL - url = self.list.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - deserialized = models.ImagePaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.ImagePaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Compute/images'} diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/operations/log_analytics_operations.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/operations/log_analytics_operations.py deleted file mode 100644 index cdbc436a43c9..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/operations/log_analytics_operations.py +++ /dev/null @@ -1,242 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError -from msrest.polling import LROPoller, NoPolling -from msrestazure.polling.arm_polling import ARMPolling - -from .. import models - - -class LogAnalyticsOperations(object): - """LogAnalyticsOperations operations. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: Client Api Version. Constant value: "2018-06-01". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2018-06-01" - - self.config = config - - - def _export_request_rate_by_interval_initial( - self, parameters, location, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.export_request_rate_by_interval.metadata['url'] - path_format_arguments = { - 'location': self._serialize.url("location", location, 'str', pattern=r'^[-\w\._]+$'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(parameters, 'RequestRateByIntervalInput') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('LogAnalyticsOperationResult', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def export_request_rate_by_interval( - self, parameters, location, custom_headers=None, raw=False, polling=True, **operation_config): - """Export logs that show Api requests made by this subscription in the - given time window to show throttling activities. - - :param parameters: Parameters supplied to the LogAnalytics - getRequestRateByInterval Api. - :type parameters: - ~azure.mgmt.compute.v2018_06_01.models.RequestRateByIntervalInput - :param location: The location upon which virtual-machine-sizes is - queried. - :type location: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns - LogAnalyticsOperationResult or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2018_06_01.models.LogAnalyticsOperationResult] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2018_06_01.models.LogAnalyticsOperationResult]] - :raises: :class:`CloudError` - """ - raw_result = self._export_request_rate_by_interval_initial( - parameters=parameters, - location=location, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('LogAnalyticsOperationResult', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - export_request_rate_by_interval.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/logAnalytics/apiAccess/getRequestRateByInterval'} - - - def _export_throttled_requests_initial( - self, parameters, location, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.export_throttled_requests.metadata['url'] - path_format_arguments = { - 'location': self._serialize.url("location", location, 'str', pattern=r'^[-\w\._]+$'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(parameters, 'ThrottledRequestsInput') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('LogAnalyticsOperationResult', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def export_throttled_requests( - self, parameters, location, custom_headers=None, raw=False, polling=True, **operation_config): - """Export logs that show total throttled Api requests for this - subscription in the given time window. - - :param parameters: Parameters supplied to the LogAnalytics - getThrottledRequests Api. - :type parameters: - ~azure.mgmt.compute.v2018_06_01.models.ThrottledRequestsInput - :param location: The location upon which virtual-machine-sizes is - queried. - :type location: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns - LogAnalyticsOperationResult or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2018_06_01.models.LogAnalyticsOperationResult] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2018_06_01.models.LogAnalyticsOperationResult]] - :raises: :class:`CloudError` - """ - raw_result = self._export_throttled_requests_initial( - parameters=parameters, - location=location, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('LogAnalyticsOperationResult', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - export_throttled_requests.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/logAnalytics/apiAccess/getThrottledRequests'} diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/operations/operations.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/operations/operations.py deleted file mode 100644 index 08c4de77f78d..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/operations/operations.py +++ /dev/null @@ -1,98 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError - -from .. import models - - -class Operations(object): - """Operations operations. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: Client Api Version. Constant value: "2018-06-01". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2018-06-01" - - self.config = config - - def list( - self, custom_headers=None, raw=False, **operation_config): - """Gets a list of compute operations. - - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of ComputeOperationValue - :rtype: - ~azure.mgmt.compute.v2018_06_01.models.ComputeOperationValuePaged[~azure.mgmt.compute.v2018_06_01.models.ComputeOperationValue] - :raises: :class:`CloudError` - """ - def internal_paging(next_link=None, raw=False): - - if not next_link: - # Construct URL - url = self.list.metadata['url'] - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - deserialized = models.ComputeOperationValuePaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.ComputeOperationValuePaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - list.metadata = {'url': '/providers/Microsoft.Compute/operations'} diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/operations/proximity_placement_groups_operations.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/operations/proximity_placement_groups_operations.py deleted file mode 100644 index c7a0d19a7302..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/operations/proximity_placement_groups_operations.py +++ /dev/null @@ -1,430 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError - -from .. import models - - -class ProximityPlacementGroupsOperations(object): - """ProximityPlacementGroupsOperations operations. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: Client Api Version. Constant value: "2018-06-01". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2018-06-01" - - self.config = config - - def create_or_update( - self, resource_group_name, proximity_placement_group_name, parameters, custom_headers=None, raw=False, **operation_config): - """Create or update a proximity placement group. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param proximity_placement_group_name: The name of the proximity - placement group. - :type proximity_placement_group_name: str - :param parameters: Parameters supplied to the Create Proximity - Placement Group operation. - :type parameters: - ~azure.mgmt.compute.v2018_06_01.models.ProximityPlacementGroup - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: ProximityPlacementGroup or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.compute.v2018_06_01.models.ProximityPlacementGroup - or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.create_or_update.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'proximityPlacementGroupName': self._serialize.url("proximity_placement_group_name", proximity_placement_group_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(parameters, 'ProximityPlacementGroup') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 201]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('ProximityPlacementGroup', response) - if response.status_code == 201: - deserialized = self._deserialize('ProximityPlacementGroup', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/proximityPlacementGroups/{proximityPlacementGroupName}'} - - def update( - self, resource_group_name, proximity_placement_group_name, tags=None, custom_headers=None, raw=False, **operation_config): - """Update a proximity placement group. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param proximity_placement_group_name: The name of the proximity - placement group. - :type proximity_placement_group_name: str - :param tags: Resource tags - :type tags: dict[str, str] - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: ProximityPlacementGroup or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.compute.v2018_06_01.models.ProximityPlacementGroup - or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - parameters = models.ProximityPlacementGroupUpdate(tags=tags) - - # Construct URL - url = self.update.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'proximityPlacementGroupName': self._serialize.url("proximity_placement_group_name", proximity_placement_group_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(parameters, 'ProximityPlacementGroupUpdate') - - # Construct and send request - request = self._client.patch(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('ProximityPlacementGroup', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/proximityPlacementGroups/{proximityPlacementGroupName}'} - - def delete( - self, resource_group_name, proximity_placement_group_name, custom_headers=None, raw=False, **operation_config): - """Delete a proximity placement group. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param proximity_placement_group_name: The name of the proximity - placement group. - :type proximity_placement_group_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.delete.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'proximityPlacementGroupName': self._serialize.url("proximity_placement_group_name", proximity_placement_group_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/proximityPlacementGroups/{proximityPlacementGroupName}'} - - def get( - self, resource_group_name, proximity_placement_group_name, custom_headers=None, raw=False, **operation_config): - """Retrieves information about a proximity placement group . - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param proximity_placement_group_name: The name of the proximity - placement group. - :type proximity_placement_group_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: ProximityPlacementGroup or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.compute.v2018_06_01.models.ProximityPlacementGroup - or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'proximityPlacementGroupName': self._serialize.url("proximity_placement_group_name", proximity_placement_group_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('ProximityPlacementGroup', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/proximityPlacementGroups/{proximityPlacementGroupName}'} - - def list_by_subscription( - self, custom_headers=None, raw=False, **operation_config): - """Lists all proximity placement groups in a subscription. - - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of ProximityPlacementGroup - :rtype: - ~azure.mgmt.compute.v2018_06_01.models.ProximityPlacementGroupPaged[~azure.mgmt.compute.v2018_06_01.models.ProximityPlacementGroup] - :raises: :class:`CloudError` - """ - def internal_paging(next_link=None, raw=False): - - if not next_link: - # Construct URL - url = self.list_by_subscription.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - deserialized = models.ProximityPlacementGroupPaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.ProximityPlacementGroupPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - list_by_subscription.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Compute/proximityPlacementGroups'} - - def list_by_resource_group( - self, resource_group_name, custom_headers=None, raw=False, **operation_config): - """Lists all proximity placement groups in a resource group. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of ProximityPlacementGroup - :rtype: - ~azure.mgmt.compute.v2018_06_01.models.ProximityPlacementGroupPaged[~azure.mgmt.compute.v2018_06_01.models.ProximityPlacementGroup] - :raises: :class:`CloudError` - """ - def internal_paging(next_link=None, raw=False): - - if not next_link: - # Construct URL - url = self.list_by_resource_group.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - deserialized = models.ProximityPlacementGroupPaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.ProximityPlacementGroupPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/proximityPlacementGroups'} diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/operations/snapshots_operations.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/operations/snapshots_operations.py deleted file mode 100644 index 8056b1204eda..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/operations/snapshots_operations.py +++ /dev/null @@ -1,722 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError -from msrest.polling import LROPoller, NoPolling -from msrestazure.polling.arm_polling import ARMPolling - -from .. import models - - -class SnapshotsOperations(object): - """SnapshotsOperations operations. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: Client Api Version. Constant value: "2018-06-01". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2018-06-01" - - self.config = config - - - def _create_or_update_initial( - self, resource_group_name, snapshot_name, snapshot, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.create_or_update.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'snapshotName': self._serialize.url("snapshot_name", snapshot_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(snapshot, 'Snapshot') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('Snapshot', response) - if response.status_code == 202: - deserialized = self._deserialize('Snapshot', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def create_or_update( - self, resource_group_name, snapshot_name, snapshot, custom_headers=None, raw=False, polling=True, **operation_config): - """Creates or updates a snapshot. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param snapshot_name: The name of the snapshot that is being created. - The name can't be changed after the snapshot is created. Supported - characters for the name are a-z, A-Z, 0-9 and _. The max name length - is 80 characters. - :type snapshot_name: str - :param snapshot: Snapshot object supplied in the body of the Put disk - operation. - :type snapshot: ~azure.mgmt.compute.v2018_06_01.models.Snapshot - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns Snapshot or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2018_06_01.models.Snapshot] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2018_06_01.models.Snapshot]] - :raises: :class:`CloudError` - """ - raw_result = self._create_or_update_initial( - resource_group_name=resource_group_name, - snapshot_name=snapshot_name, - snapshot=snapshot, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('Snapshot', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/snapshots/{snapshotName}'} - - - def _update_initial( - self, resource_group_name, snapshot_name, snapshot, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.update.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'snapshotName': self._serialize.url("snapshot_name", snapshot_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(snapshot, 'SnapshotUpdate') - - # Construct and send request - request = self._client.patch(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('Snapshot', response) - if response.status_code == 202: - deserialized = self._deserialize('Snapshot', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def update( - self, resource_group_name, snapshot_name, snapshot, custom_headers=None, raw=False, polling=True, **operation_config): - """Updates (patches) a snapshot. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param snapshot_name: The name of the snapshot that is being created. - The name can't be changed after the snapshot is created. Supported - characters for the name are a-z, A-Z, 0-9 and _. The max name length - is 80 characters. - :type snapshot_name: str - :param snapshot: Snapshot object supplied in the body of the Patch - snapshot operation. - :type snapshot: ~azure.mgmt.compute.v2018_06_01.models.SnapshotUpdate - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns Snapshot or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2018_06_01.models.Snapshot] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2018_06_01.models.Snapshot]] - :raises: :class:`CloudError` - """ - raw_result = self._update_initial( - resource_group_name=resource_group_name, - snapshot_name=snapshot_name, - snapshot=snapshot, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('Snapshot', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/snapshots/{snapshotName}'} - - def get( - self, resource_group_name, snapshot_name, custom_headers=None, raw=False, **operation_config): - """Gets information about a snapshot. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param snapshot_name: The name of the snapshot that is being created. - The name can't be changed after the snapshot is created. Supported - characters for the name are a-z, A-Z, 0-9 and _. The max name length - is 80 characters. - :type snapshot_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: Snapshot or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.compute.v2018_06_01.models.Snapshot or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'snapshotName': self._serialize.url("snapshot_name", snapshot_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('Snapshot', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/snapshots/{snapshotName}'} - - - def _delete_initial( - self, resource_group_name, snapshot_name, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.delete.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'snapshotName': self._serialize.url("snapshot_name", snapshot_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202, 204]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - def delete( - self, resource_group_name, snapshot_name, custom_headers=None, raw=False, polling=True, **operation_config): - """Deletes a snapshot. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param snapshot_name: The name of the snapshot that is being created. - The name can't be changed after the snapshot is created. Supported - characters for the name are a-z, A-Z, 0-9 and _. The max name length - is 80 characters. - :type snapshot_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns None or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] - :raises: :class:`CloudError` - """ - raw_result = self._delete_initial( - resource_group_name=resource_group_name, - snapshot_name=snapshot_name, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/snapshots/{snapshotName}'} - - def list_by_resource_group( - self, resource_group_name, custom_headers=None, raw=False, **operation_config): - """Lists snapshots under a resource group. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of Snapshot - :rtype: - ~azure.mgmt.compute.v2018_06_01.models.SnapshotPaged[~azure.mgmt.compute.v2018_06_01.models.Snapshot] - :raises: :class:`CloudError` - """ - def internal_paging(next_link=None, raw=False): - - if not next_link: - # Construct URL - url = self.list_by_resource_group.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - deserialized = models.SnapshotPaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.SnapshotPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/snapshots'} - - def list( - self, custom_headers=None, raw=False, **operation_config): - """Lists snapshots under a subscription. - - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of Snapshot - :rtype: - ~azure.mgmt.compute.v2018_06_01.models.SnapshotPaged[~azure.mgmt.compute.v2018_06_01.models.Snapshot] - :raises: :class:`CloudError` - """ - def internal_paging(next_link=None, raw=False): - - if not next_link: - # Construct URL - url = self.list.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - deserialized = models.SnapshotPaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.SnapshotPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Compute/snapshots'} - - - def _grant_access_initial( - self, resource_group_name, snapshot_name, access, duration_in_seconds, custom_headers=None, raw=False, **operation_config): - grant_access_data = models.GrantAccessData(access=access, duration_in_seconds=duration_in_seconds) - - # Construct URL - url = self.grant_access.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'snapshotName': self._serialize.url("snapshot_name", snapshot_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(grant_access_data, 'GrantAccessData') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('AccessUri', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def grant_access( - self, resource_group_name, snapshot_name, access, duration_in_seconds, custom_headers=None, raw=False, polling=True, **operation_config): - """Grants access to a snapshot. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param snapshot_name: The name of the snapshot that is being created. - The name can't be changed after the snapshot is created. Supported - characters for the name are a-z, A-Z, 0-9 and _. The max name length - is 80 characters. - :type snapshot_name: str - :param access: Possible values include: 'None', 'Read' - :type access: str or - ~azure.mgmt.compute.v2018_06_01.models.AccessLevel - :param duration_in_seconds: Time duration in seconds until the SAS - access expires. - :type duration_in_seconds: int - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns AccessUri or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2018_06_01.models.AccessUri] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2018_06_01.models.AccessUri]] - :raises: :class:`CloudError` - """ - raw_result = self._grant_access_initial( - resource_group_name=resource_group_name, - snapshot_name=snapshot_name, - access=access, - duration_in_seconds=duration_in_seconds, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('AccessUri', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - grant_access.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/snapshots/{snapshotName}/beginGetAccess'} - - - def _revoke_access_initial( - self, resource_group_name, snapshot_name, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.revoke_access.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'snapshotName': self._serialize.url("snapshot_name", snapshot_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - def revoke_access( - self, resource_group_name, snapshot_name, custom_headers=None, raw=False, polling=True, **operation_config): - """Revokes access to a snapshot. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param snapshot_name: The name of the snapshot that is being created. - The name can't be changed after the snapshot is created. Supported - characters for the name are a-z, A-Z, 0-9 and _. The max name length - is 80 characters. - :type snapshot_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns None or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] - :raises: :class:`CloudError` - """ - raw_result = self._revoke_access_initial( - resource_group_name=resource_group_name, - snapshot_name=snapshot_name, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - revoke_access.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/snapshots/{snapshotName}/endGetAccess'} diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/operations/usage_operations.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/operations/usage_operations.py deleted file mode 100644 index 9e13544b0b0c..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/operations/usage_operations.py +++ /dev/null @@ -1,107 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError - -from .. import models - - -class UsageOperations(object): - """UsageOperations operations. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: Client Api Version. Constant value: "2018-06-01". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2018-06-01" - - self.config = config - - def list( - self, location, custom_headers=None, raw=False, **operation_config): - """Gets, for the specified location, the current compute resource usage - information as well as the limits for compute resources under the - subscription. - - :param location: The location for which resource usage is queried. - :type location: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of Usage - :rtype: - ~azure.mgmt.compute.v2018_06_01.models.UsagePaged[~azure.mgmt.compute.v2018_06_01.models.Usage] - :raises: :class:`CloudError` - """ - def internal_paging(next_link=None, raw=False): - - if not next_link: - # Construct URL - url = self.list.metadata['url'] - path_format_arguments = { - 'location': self._serialize.url("location", location, 'str', pattern=r'^[-\w\._]+$'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - deserialized = models.UsagePaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.UsagePaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/usages'} diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/operations/virtual_machine_extension_images_operations.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/operations/virtual_machine_extension_images_operations.py deleted file mode 100644 index f2f0f1ef9296..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/operations/virtual_machine_extension_images_operations.py +++ /dev/null @@ -1,248 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError - -from .. import models - - -class VirtualMachineExtensionImagesOperations(object): - """VirtualMachineExtensionImagesOperations operations. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: Client Api Version. Constant value: "2018-06-01". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2018-06-01" - - self.config = config - - def get( - self, location, publisher_name, type, version, custom_headers=None, raw=False, **operation_config): - """Gets a virtual machine extension image. - - :param location: The name of a supported Azure region. - :type location: str - :param publisher_name: - :type publisher_name: str - :param type: - :type type: str - :param version: - :type version: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: VirtualMachineExtensionImage or ClientRawResponse if raw=true - :rtype: - ~azure.mgmt.compute.v2018_06_01.models.VirtualMachineExtensionImage or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get.metadata['url'] - path_format_arguments = { - 'location': self._serialize.url("location", location, 'str'), - 'publisherName': self._serialize.url("publisher_name", publisher_name, 'str'), - 'type': self._serialize.url("type", type, 'str'), - 'version': self._serialize.url("version", version, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('VirtualMachineExtensionImage', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/publishers/{publisherName}/artifacttypes/vmextension/types/{type}/versions/{version}'} - - def list_types( - self, location, publisher_name, custom_headers=None, raw=False, **operation_config): - """Gets a list of virtual machine extension image types. - - :param location: The name of a supported Azure region. - :type location: str - :param publisher_name: - :type publisher_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: list or ClientRawResponse if raw=true - :rtype: - list[~azure.mgmt.compute.v2018_06_01.models.VirtualMachineExtensionImage] - or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.list_types.metadata['url'] - path_format_arguments = { - 'location': self._serialize.url("location", location, 'str'), - 'publisherName': self._serialize.url("publisher_name", publisher_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('[VirtualMachineExtensionImage]', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - list_types.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/publishers/{publisherName}/artifacttypes/vmextension/types'} - - def list_versions( - self, location, publisher_name, type, filter=None, top=None, orderby=None, custom_headers=None, raw=False, **operation_config): - """Gets a list of virtual machine extension image versions. - - :param location: The name of a supported Azure region. - :type location: str - :param publisher_name: - :type publisher_name: str - :param type: - :type type: str - :param filter: The filter to apply on the operation. - :type filter: str - :param top: - :type top: int - :param orderby: - :type orderby: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: list or ClientRawResponse if raw=true - :rtype: - list[~azure.mgmt.compute.v2018_06_01.models.VirtualMachineExtensionImage] - or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.list_versions.metadata['url'] - path_format_arguments = { - 'location': self._serialize.url("location", location, 'str'), - 'publisherName': self._serialize.url("publisher_name", publisher_name, 'str'), - 'type': self._serialize.url("type", type, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - if filter is not None: - query_parameters['$filter'] = self._serialize.query("filter", filter, 'str') - if top is not None: - query_parameters['$top'] = self._serialize.query("top", top, 'int') - if orderby is not None: - query_parameters['$orderby'] = self._serialize.query("orderby", orderby, 'str') - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('[VirtualMachineExtensionImage]', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - list_versions.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/publishers/{publisherName}/artifacttypes/vmextension/types/{type}/versions'} diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/operations/virtual_machine_extensions_operations.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/operations/virtual_machine_extensions_operations.py deleted file mode 100644 index 0e6777f54ca8..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/operations/virtual_machine_extensions_operations.py +++ /dev/null @@ -1,479 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError -from msrest.polling import LROPoller, NoPolling -from msrestazure.polling.arm_polling import ARMPolling - -from .. import models - - -class VirtualMachineExtensionsOperations(object): - """VirtualMachineExtensionsOperations operations. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: Client Api Version. Constant value: "2018-06-01". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2018-06-01" - - self.config = config - - - def _create_or_update_initial( - self, resource_group_name, vm_name, vm_extension_name, extension_parameters, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.create_or_update.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'vmName': self._serialize.url("vm_name", vm_name, 'str'), - 'vmExtensionName': self._serialize.url("vm_extension_name", vm_extension_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(extension_parameters, 'VirtualMachineExtension') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 201]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('VirtualMachineExtension', response) - if response.status_code == 201: - deserialized = self._deserialize('VirtualMachineExtension', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def create_or_update( - self, resource_group_name, vm_name, vm_extension_name, extension_parameters, custom_headers=None, raw=False, polling=True, **operation_config): - """The operation to create or update the extension. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param vm_name: The name of the virtual machine where the extension - should be created or updated. - :type vm_name: str - :param vm_extension_name: The name of the virtual machine extension. - :type vm_extension_name: str - :param extension_parameters: Parameters supplied to the Create Virtual - Machine Extension operation. - :type extension_parameters: - ~azure.mgmt.compute.v2018_06_01.models.VirtualMachineExtension - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns VirtualMachineExtension - or ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2018_06_01.models.VirtualMachineExtension] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2018_06_01.models.VirtualMachineExtension]] - :raises: :class:`CloudError` - """ - raw_result = self._create_or_update_initial( - resource_group_name=resource_group_name, - vm_name=vm_name, - vm_extension_name=vm_extension_name, - extension_parameters=extension_parameters, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('VirtualMachineExtension', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/extensions/{vmExtensionName}'} - - - def _update_initial( - self, resource_group_name, vm_name, vm_extension_name, extension_parameters, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.update.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'vmName': self._serialize.url("vm_name", vm_name, 'str'), - 'vmExtensionName': self._serialize.url("vm_extension_name", vm_extension_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(extension_parameters, 'VirtualMachineExtensionUpdate') - - # Construct and send request - request = self._client.patch(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('VirtualMachineExtension', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def update( - self, resource_group_name, vm_name, vm_extension_name, extension_parameters, custom_headers=None, raw=False, polling=True, **operation_config): - """The operation to update the extension. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param vm_name: The name of the virtual machine where the extension - should be updated. - :type vm_name: str - :param vm_extension_name: The name of the virtual machine extension. - :type vm_extension_name: str - :param extension_parameters: Parameters supplied to the Update Virtual - Machine Extension operation. - :type extension_parameters: - ~azure.mgmt.compute.v2018_06_01.models.VirtualMachineExtensionUpdate - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns VirtualMachineExtension - or ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2018_06_01.models.VirtualMachineExtension] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2018_06_01.models.VirtualMachineExtension]] - :raises: :class:`CloudError` - """ - raw_result = self._update_initial( - resource_group_name=resource_group_name, - vm_name=vm_name, - vm_extension_name=vm_extension_name, - extension_parameters=extension_parameters, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('VirtualMachineExtension', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/extensions/{vmExtensionName}'} - - - def _delete_initial( - self, resource_group_name, vm_name, vm_extension_name, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.delete.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'vmName': self._serialize.url("vm_name", vm_name, 'str'), - 'vmExtensionName': self._serialize.url("vm_extension_name", vm_extension_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202, 204]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - def delete( - self, resource_group_name, vm_name, vm_extension_name, custom_headers=None, raw=False, polling=True, **operation_config): - """The operation to delete the extension. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param vm_name: The name of the virtual machine where the extension - should be deleted. - :type vm_name: str - :param vm_extension_name: The name of the virtual machine extension. - :type vm_extension_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns None or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] - :raises: :class:`CloudError` - """ - raw_result = self._delete_initial( - resource_group_name=resource_group_name, - vm_name=vm_name, - vm_extension_name=vm_extension_name, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/extensions/{vmExtensionName}'} - - def get( - self, resource_group_name, vm_name, vm_extension_name, expand=None, custom_headers=None, raw=False, **operation_config): - """The operation to get the extension. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param vm_name: The name of the virtual machine containing the - extension. - :type vm_name: str - :param vm_extension_name: The name of the virtual machine extension. - :type vm_extension_name: str - :param expand: The expand expression to apply on the operation. - :type expand: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: VirtualMachineExtension or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.compute.v2018_06_01.models.VirtualMachineExtension - or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'vmName': self._serialize.url("vm_name", vm_name, 'str'), - 'vmExtensionName': self._serialize.url("vm_extension_name", vm_extension_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - if expand is not None: - query_parameters['$expand'] = self._serialize.query("expand", expand, 'str') - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('VirtualMachineExtension', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/extensions/{vmExtensionName}'} - - def list( - self, resource_group_name, vm_name, expand=None, custom_headers=None, raw=False, **operation_config): - """The operation to get all extensions of a Virtual Machine. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param vm_name: The name of the virtual machine containing the - extension. - :type vm_name: str - :param expand: The expand expression to apply on the operation. - :type expand: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: VirtualMachineExtensionsListResult or ClientRawResponse if - raw=true - :rtype: - ~azure.mgmt.compute.v2018_06_01.models.VirtualMachineExtensionsListResult - or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.list.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'vmName': self._serialize.url("vm_name", vm_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - if expand is not None: - query_parameters['$expand'] = self._serialize.query("expand", expand, 'str') - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('VirtualMachineExtensionsListResult', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/extensions'} diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/operations/virtual_machine_images_operations.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/operations/virtual_machine_images_operations.py deleted file mode 100644 index 65daa8e4524b..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/operations/virtual_machine_images_operations.py +++ /dev/null @@ -1,383 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError - -from .. import models - - -class VirtualMachineImagesOperations(object): - """VirtualMachineImagesOperations operations. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: Client Api Version. Constant value: "2018-06-01". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2018-06-01" - - self.config = config - - def get( - self, location, publisher_name, offer, skus, version, custom_headers=None, raw=False, **operation_config): - """Gets a virtual machine image. - - :param location: The name of a supported Azure region. - :type location: str - :param publisher_name: A valid image publisher. - :type publisher_name: str - :param offer: A valid image publisher offer. - :type offer: str - :param skus: A valid image SKU. - :type skus: str - :param version: A valid image SKU version. - :type version: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: VirtualMachineImage or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.compute.v2018_06_01.models.VirtualMachineImage or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get.metadata['url'] - path_format_arguments = { - 'location': self._serialize.url("location", location, 'str'), - 'publisherName': self._serialize.url("publisher_name", publisher_name, 'str'), - 'offer': self._serialize.url("offer", offer, 'str'), - 'skus': self._serialize.url("skus", skus, 'str'), - 'version': self._serialize.url("version", version, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('VirtualMachineImage', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/publishers/{publisherName}/artifacttypes/vmimage/offers/{offer}/skus/{skus}/versions/{version}'} - - def list( - self, location, publisher_name, offer, skus, filter=None, top=None, orderby=None, custom_headers=None, raw=False, **operation_config): - """Gets a list of all virtual machine image versions for the specified - location, publisher, offer, and SKU. - - :param location: The name of a supported Azure region. - :type location: str - :param publisher_name: A valid image publisher. - :type publisher_name: str - :param offer: A valid image publisher offer. - :type offer: str - :param skus: A valid image SKU. - :type skus: str - :param filter: The filter to apply on the operation. - :type filter: str - :param top: - :type top: int - :param orderby: - :type orderby: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: list or ClientRawResponse if raw=true - :rtype: - list[~azure.mgmt.compute.v2018_06_01.models.VirtualMachineImageResource] - or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.list.metadata['url'] - path_format_arguments = { - 'location': self._serialize.url("location", location, 'str'), - 'publisherName': self._serialize.url("publisher_name", publisher_name, 'str'), - 'offer': self._serialize.url("offer", offer, 'str'), - 'skus': self._serialize.url("skus", skus, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - if filter is not None: - query_parameters['$filter'] = self._serialize.query("filter", filter, 'str') - if top is not None: - query_parameters['$top'] = self._serialize.query("top", top, 'int') - if orderby is not None: - query_parameters['$orderby'] = self._serialize.query("orderby", orderby, 'str') - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('[VirtualMachineImageResource]', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/publishers/{publisherName}/artifacttypes/vmimage/offers/{offer}/skus/{skus}/versions'} - - def list_offers( - self, location, publisher_name, custom_headers=None, raw=False, **operation_config): - """Gets a list of virtual machine image offers for the specified location - and publisher. - - :param location: The name of a supported Azure region. - :type location: str - :param publisher_name: A valid image publisher. - :type publisher_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: list or ClientRawResponse if raw=true - :rtype: - list[~azure.mgmt.compute.v2018_06_01.models.VirtualMachineImageResource] - or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.list_offers.metadata['url'] - path_format_arguments = { - 'location': self._serialize.url("location", location, 'str'), - 'publisherName': self._serialize.url("publisher_name", publisher_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('[VirtualMachineImageResource]', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - list_offers.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/publishers/{publisherName}/artifacttypes/vmimage/offers'} - - def list_publishers( - self, location, custom_headers=None, raw=False, **operation_config): - """Gets a list of virtual machine image publishers for the specified Azure - location. - - :param location: The name of a supported Azure region. - :type location: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: list or ClientRawResponse if raw=true - :rtype: - list[~azure.mgmt.compute.v2018_06_01.models.VirtualMachineImageResource] - or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.list_publishers.metadata['url'] - path_format_arguments = { - 'location': self._serialize.url("location", location, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('[VirtualMachineImageResource]', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - list_publishers.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/publishers'} - - def list_skus( - self, location, publisher_name, offer, custom_headers=None, raw=False, **operation_config): - """Gets a list of virtual machine image SKUs for the specified location, - publisher, and offer. - - :param location: The name of a supported Azure region. - :type location: str - :param publisher_name: A valid image publisher. - :type publisher_name: str - :param offer: A valid image publisher offer. - :type offer: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: list or ClientRawResponse if raw=true - :rtype: - list[~azure.mgmt.compute.v2018_06_01.models.VirtualMachineImageResource] - or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.list_skus.metadata['url'] - path_format_arguments = { - 'location': self._serialize.url("location", location, 'str'), - 'publisherName': self._serialize.url("publisher_name", publisher_name, 'str'), - 'offer': self._serialize.url("offer", offer, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('[VirtualMachineImageResource]', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - list_skus.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/publishers/{publisherName}/artifacttypes/vmimage/offers/{offer}/skus'} diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/operations/virtual_machine_run_commands_operations.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/operations/virtual_machine_run_commands_operations.py deleted file mode 100644 index a1408b92aa2e..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/operations/virtual_machine_run_commands_operations.py +++ /dev/null @@ -1,167 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError - -from .. import models - - -class VirtualMachineRunCommandsOperations(object): - """VirtualMachineRunCommandsOperations operations. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: Client Api Version. Constant value: "2018-06-01". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2018-06-01" - - self.config = config - - def list( - self, location, custom_headers=None, raw=False, **operation_config): - """Lists all available run commands for a subscription in a location. - - :param location: The location upon which run commands is queried. - :type location: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of RunCommandDocumentBase - :rtype: - ~azure.mgmt.compute.v2018_06_01.models.RunCommandDocumentBasePaged[~azure.mgmt.compute.v2018_06_01.models.RunCommandDocumentBase] - :raises: :class:`CloudError` - """ - def internal_paging(next_link=None, raw=False): - - if not next_link: - # Construct URL - url = self.list.metadata['url'] - path_format_arguments = { - 'location': self._serialize.url("location", location, 'str', pattern=r'^[-\w\._]+$'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - deserialized = models.RunCommandDocumentBasePaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.RunCommandDocumentBasePaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/runCommands'} - - def get( - self, location, command_id, custom_headers=None, raw=False, **operation_config): - """Gets specific run command for a subscription in a location. - - :param location: The location upon which run commands is queried. - :type location: str - :param command_id: The command id. - :type command_id: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: RunCommandDocument or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.compute.v2018_06_01.models.RunCommandDocument or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get.metadata['url'] - path_format_arguments = { - 'location': self._serialize.url("location", location, 'str', pattern=r'^[-\w\._]+$'), - 'commandId': self._serialize.url("command_id", command_id, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('RunCommandDocument', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/runCommands/{commandId}'} diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/operations/virtual_machine_scale_set_extensions_operations.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/operations/virtual_machine_scale_set_extensions_operations.py deleted file mode 100644 index 15118f7a5d69..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/operations/virtual_machine_scale_set_extensions_operations.py +++ /dev/null @@ -1,377 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError -from msrest.polling import LROPoller, NoPolling -from msrestazure.polling.arm_polling import ARMPolling - -from .. import models - - -class VirtualMachineScaleSetExtensionsOperations(object): - """VirtualMachineScaleSetExtensionsOperations operations. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: Client Api Version. Constant value: "2018-06-01". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2018-06-01" - - self.config = config - - - def _create_or_update_initial( - self, resource_group_name, vm_scale_set_name, vmss_extension_name, extension_parameters, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.create_or_update.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), - 'vmssExtensionName': self._serialize.url("vmss_extension_name", vmss_extension_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(extension_parameters, 'VirtualMachineScaleSetExtension') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 201]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('VirtualMachineScaleSetExtension', response) - if response.status_code == 201: - deserialized = self._deserialize('VirtualMachineScaleSetExtension', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def create_or_update( - self, resource_group_name, vm_scale_set_name, vmss_extension_name, extension_parameters, custom_headers=None, raw=False, polling=True, **operation_config): - """The operation to create or update an extension. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param vm_scale_set_name: The name of the VM scale set where the - extension should be create or updated. - :type vm_scale_set_name: str - :param vmss_extension_name: The name of the VM scale set extension. - :type vmss_extension_name: str - :param extension_parameters: Parameters supplied to the Create VM - scale set Extension operation. - :type extension_parameters: - ~azure.mgmt.compute.v2018_06_01.models.VirtualMachineScaleSetExtension - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns - VirtualMachineScaleSetExtension or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2018_06_01.models.VirtualMachineScaleSetExtension] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2018_06_01.models.VirtualMachineScaleSetExtension]] - :raises: :class:`CloudError` - """ - raw_result = self._create_or_update_initial( - resource_group_name=resource_group_name, - vm_scale_set_name=vm_scale_set_name, - vmss_extension_name=vmss_extension_name, - extension_parameters=extension_parameters, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('VirtualMachineScaleSetExtension', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/extensions/{vmssExtensionName}'} - - - def _delete_initial( - self, resource_group_name, vm_scale_set_name, vmss_extension_name, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.delete.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), - 'vmssExtensionName': self._serialize.url("vmss_extension_name", vmss_extension_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202, 204]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - def delete( - self, resource_group_name, vm_scale_set_name, vmss_extension_name, custom_headers=None, raw=False, polling=True, **operation_config): - """The operation to delete the extension. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param vm_scale_set_name: The name of the VM scale set where the - extension should be deleted. - :type vm_scale_set_name: str - :param vmss_extension_name: The name of the VM scale set extension. - :type vmss_extension_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns None or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] - :raises: :class:`CloudError` - """ - raw_result = self._delete_initial( - resource_group_name=resource_group_name, - vm_scale_set_name=vm_scale_set_name, - vmss_extension_name=vmss_extension_name, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/extensions/{vmssExtensionName}'} - - def get( - self, resource_group_name, vm_scale_set_name, vmss_extension_name, expand=None, custom_headers=None, raw=False, **operation_config): - """The operation to get the extension. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param vm_scale_set_name: The name of the VM scale set containing the - extension. - :type vm_scale_set_name: str - :param vmss_extension_name: The name of the VM scale set extension. - :type vmss_extension_name: str - :param expand: The expand expression to apply on the operation. - :type expand: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: VirtualMachineScaleSetExtension or ClientRawResponse if - raw=true - :rtype: - ~azure.mgmt.compute.v2018_06_01.models.VirtualMachineScaleSetExtension - or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), - 'vmssExtensionName': self._serialize.url("vmss_extension_name", vmss_extension_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - if expand is not None: - query_parameters['$expand'] = self._serialize.query("expand", expand, 'str') - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('VirtualMachineScaleSetExtension', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/extensions/{vmssExtensionName}'} - - def list( - self, resource_group_name, vm_scale_set_name, custom_headers=None, raw=False, **operation_config): - """Gets a list of all extensions in a VM scale set. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param vm_scale_set_name: The name of the VM scale set containing the - extension. - :type vm_scale_set_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of VirtualMachineScaleSetExtension - :rtype: - ~azure.mgmt.compute.v2018_06_01.models.VirtualMachineScaleSetExtensionPaged[~azure.mgmt.compute.v2018_06_01.models.VirtualMachineScaleSetExtension] - :raises: :class:`CloudError` - """ - def internal_paging(next_link=None, raw=False): - - if not next_link: - # Construct URL - url = self.list.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - deserialized = models.VirtualMachineScaleSetExtensionPaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.VirtualMachineScaleSetExtensionPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/extensions'} diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/operations/virtual_machine_scale_set_rolling_upgrades_operations.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/operations/virtual_machine_scale_set_rolling_upgrades_operations.py deleted file mode 100644 index 0127fe1c5c4a..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/operations/virtual_machine_scale_set_rolling_upgrades_operations.py +++ /dev/null @@ -1,347 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError -from msrest.polling import LROPoller, NoPolling -from msrestazure.polling.arm_polling import ARMPolling - -from .. import models - - -class VirtualMachineScaleSetRollingUpgradesOperations(object): - """VirtualMachineScaleSetRollingUpgradesOperations operations. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: Client Api Version. Constant value: "2018-06-01". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2018-06-01" - - self.config = config - - - def _cancel_initial( - self, resource_group_name, vm_scale_set_name, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.cancel.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - def cancel( - self, resource_group_name, vm_scale_set_name, custom_headers=None, raw=False, polling=True, **operation_config): - """Cancels the current virtual machine scale set rolling upgrade. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param vm_scale_set_name: The name of the VM scale set. - :type vm_scale_set_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns None or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] - :raises: :class:`CloudError` - """ - raw_result = self._cancel_initial( - resource_group_name=resource_group_name, - vm_scale_set_name=vm_scale_set_name, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - cancel.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/rollingUpgrades/cancel'} - - - def _start_os_upgrade_initial( - self, resource_group_name, vm_scale_set_name, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.start_os_upgrade.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - def start_os_upgrade( - self, resource_group_name, vm_scale_set_name, custom_headers=None, raw=False, polling=True, **operation_config): - """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. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param vm_scale_set_name: The name of the VM scale set. - :type vm_scale_set_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns None or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] - :raises: :class:`CloudError` - """ - raw_result = self._start_os_upgrade_initial( - resource_group_name=resource_group_name, - vm_scale_set_name=vm_scale_set_name, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - start_os_upgrade.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/osRollingUpgrade'} - - - def _start_extension_upgrade_initial( - self, resource_group_name, vm_scale_set_name, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.start_extension_upgrade.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - def start_extension_upgrade( - self, resource_group_name, vm_scale_set_name, custom_headers=None, raw=False, polling=True, **operation_config): - """Starts a rolling upgrade to move all extensions for all virtual machine - scale set instances to the latest available extension version. - Instances which are already running the latest extension versions are - not affected. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param vm_scale_set_name: The name of the VM scale set. - :type vm_scale_set_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns None or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] - :raises: :class:`CloudError` - """ - raw_result = self._start_extension_upgrade_initial( - resource_group_name=resource_group_name, - vm_scale_set_name=vm_scale_set_name, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - start_extension_upgrade.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/extensionRollingUpgrade'} - - def get_latest( - self, resource_group_name, vm_scale_set_name, custom_headers=None, raw=False, **operation_config): - """Gets the status of the latest virtual machine scale set rolling - upgrade. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param vm_scale_set_name: The name of the VM scale set. - :type vm_scale_set_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: RollingUpgradeStatusInfo or ClientRawResponse if raw=true - :rtype: - ~azure.mgmt.compute.v2018_06_01.models.RollingUpgradeStatusInfo or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get_latest.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('RollingUpgradeStatusInfo', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_latest.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/rollingUpgrades/latest'} diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/operations/virtual_machine_scale_set_vms_operations.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/operations/virtual_machine_scale_set_vms_operations.py deleted file mode 100644 index 6210e30840fa..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/operations/virtual_machine_scale_set_vms_operations.py +++ /dev/null @@ -1,1241 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError -from msrest.polling import LROPoller, NoPolling -from msrestazure.polling.arm_polling import ARMPolling - -from .. import models - - -class VirtualMachineScaleSetVMsOperations(object): - """VirtualMachineScaleSetVMsOperations operations. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: Client Api Version. Constant value: "2018-06-01". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2018-06-01" - - self.config = config - - - def _reimage_initial( - self, resource_group_name, vm_scale_set_name, instance_id, temp_disk=None, custom_headers=None, raw=False, **operation_config): - vm_scale_set_vm_reimage_input = None - if temp_disk is not None: - vm_scale_set_vm_reimage_input = models.VirtualMachineScaleSetVMReimageParameters(temp_disk=temp_disk) - - # Construct URL - url = self.reimage.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), - 'instanceId': self._serialize.url("instance_id", instance_id, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - if vm_scale_set_vm_reimage_input is not None: - body_content = self._serialize.body(vm_scale_set_vm_reimage_input, 'VirtualMachineScaleSetVMReimageParameters') - else: - body_content = None - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - def reimage( - self, resource_group_name, vm_scale_set_name, instance_id, temp_disk=None, custom_headers=None, raw=False, polling=True, **operation_config): - """Reimages (upgrade the operating system) a specific virtual machine in a - VM scale set. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param vm_scale_set_name: The name of the VM scale set. - :type vm_scale_set_name: str - :param instance_id: The instance ID of the virtual machine. - :type instance_id: str - :param temp_disk: Specifies whether to reimage temp disk. Default - value: false. - :type temp_disk: bool - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns None or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] - :raises: :class:`CloudError` - """ - raw_result = self._reimage_initial( - resource_group_name=resource_group_name, - vm_scale_set_name=vm_scale_set_name, - instance_id=instance_id, - temp_disk=temp_disk, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - reimage.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/virtualmachines/{instanceId}/reimage'} - - - def _reimage_all_initial( - self, resource_group_name, vm_scale_set_name, instance_id, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.reimage_all.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), - 'instanceId': self._serialize.url("instance_id", instance_id, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - def reimage_all( - self, resource_group_name, vm_scale_set_name, instance_id, custom_headers=None, raw=False, polling=True, **operation_config): - """Allows you to re-image all the disks ( including data disks ) in the a - VM scale set instance. This operation is only supported for managed - disks. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param vm_scale_set_name: The name of the VM scale set. - :type vm_scale_set_name: str - :param instance_id: The instance ID of the virtual machine. - :type instance_id: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns None or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] - :raises: :class:`CloudError` - """ - raw_result = self._reimage_all_initial( - resource_group_name=resource_group_name, - vm_scale_set_name=vm_scale_set_name, - instance_id=instance_id, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - reimage_all.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/virtualmachines/{instanceId}/reimageall'} - - - def _deallocate_initial( - self, resource_group_name, vm_scale_set_name, instance_id, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.deallocate.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), - 'instanceId': self._serialize.url("instance_id", instance_id, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - def deallocate( - self, resource_group_name, vm_scale_set_name, instance_id, custom_headers=None, raw=False, polling=True, **operation_config): - """Deallocates a specific virtual machine in a VM scale set. Shuts down - the virtual machine and releases the compute resources it uses. You are - not billed for the compute resources of this virtual machine once it is - deallocated. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param vm_scale_set_name: The name of the VM scale set. - :type vm_scale_set_name: str - :param instance_id: The instance ID of the virtual machine. - :type instance_id: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns None or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] - :raises: :class:`CloudError` - """ - raw_result = self._deallocate_initial( - resource_group_name=resource_group_name, - vm_scale_set_name=vm_scale_set_name, - instance_id=instance_id, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - deallocate.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/virtualmachines/{instanceId}/deallocate'} - - - def _update_initial( - self, resource_group_name, vm_scale_set_name, instance_id, parameters, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.update.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), - 'instanceId': self._serialize.url("instance_id", instance_id, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(parameters, 'VirtualMachineScaleSetVM') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('VirtualMachineScaleSetVM', response) - if response.status_code == 202: - deserialized = self._deserialize('VirtualMachineScaleSetVM', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def update( - self, resource_group_name, vm_scale_set_name, instance_id, parameters, custom_headers=None, raw=False, polling=True, **operation_config): - """Updates a virtual machine of a VM scale set. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param vm_scale_set_name: The name of the VM scale set where the - extension should be create or updated. - :type vm_scale_set_name: str - :param instance_id: The instance ID of the virtual machine. - :type instance_id: str - :param parameters: Parameters supplied to the Update Virtual Machine - Scale Sets VM operation. - :type parameters: - ~azure.mgmt.compute.v2018_06_01.models.VirtualMachineScaleSetVM - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns - VirtualMachineScaleSetVM or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2018_06_01.models.VirtualMachineScaleSetVM] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2018_06_01.models.VirtualMachineScaleSetVM]] - :raises: :class:`CloudError` - """ - raw_result = self._update_initial( - resource_group_name=resource_group_name, - vm_scale_set_name=vm_scale_set_name, - instance_id=instance_id, - parameters=parameters, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('VirtualMachineScaleSetVM', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/virtualmachines/{instanceId}'} - - - def _delete_initial( - self, resource_group_name, vm_scale_set_name, instance_id, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.delete.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), - 'instanceId': self._serialize.url("instance_id", instance_id, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202, 204]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - def delete( - self, resource_group_name, vm_scale_set_name, instance_id, custom_headers=None, raw=False, polling=True, **operation_config): - """Deletes a virtual machine from a VM scale set. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param vm_scale_set_name: The name of the VM scale set. - :type vm_scale_set_name: str - :param instance_id: The instance ID of the virtual machine. - :type instance_id: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns None or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] - :raises: :class:`CloudError` - """ - raw_result = self._delete_initial( - resource_group_name=resource_group_name, - vm_scale_set_name=vm_scale_set_name, - instance_id=instance_id, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/virtualmachines/{instanceId}'} - - def get( - self, resource_group_name, vm_scale_set_name, instance_id, custom_headers=None, raw=False, **operation_config): - """Gets a virtual machine from a VM scale set. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param vm_scale_set_name: The name of the VM scale set. - :type vm_scale_set_name: str - :param instance_id: The instance ID of the virtual machine. - :type instance_id: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: VirtualMachineScaleSetVM or ClientRawResponse if raw=true - :rtype: - ~azure.mgmt.compute.v2018_06_01.models.VirtualMachineScaleSetVM or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), - 'instanceId': self._serialize.url("instance_id", instance_id, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('VirtualMachineScaleSetVM', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/virtualmachines/{instanceId}'} - - def get_instance_view( - self, resource_group_name, vm_scale_set_name, instance_id, custom_headers=None, raw=False, **operation_config): - """Gets the status of a virtual machine from a VM scale set. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param vm_scale_set_name: The name of the VM scale set. - :type vm_scale_set_name: str - :param instance_id: The instance ID of the virtual machine. - :type instance_id: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: VirtualMachineScaleSetVMInstanceView or ClientRawResponse if - raw=true - :rtype: - ~azure.mgmt.compute.v2018_06_01.models.VirtualMachineScaleSetVMInstanceView - or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get_instance_view.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), - 'instanceId': self._serialize.url("instance_id", instance_id, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('VirtualMachineScaleSetVMInstanceView', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_instance_view.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/virtualmachines/{instanceId}/instanceView'} - - def list( - self, resource_group_name, virtual_machine_scale_set_name, filter=None, select=None, expand=None, custom_headers=None, raw=False, **operation_config): - """Gets a list of all virtual machines in a VM scale sets. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param virtual_machine_scale_set_name: The name of the VM scale set. - :type virtual_machine_scale_set_name: str - :param filter: The filter to apply to the operation. - :type filter: str - :param select: The list parameters. - :type select: str - :param expand: The expand expression to apply to the operation. - :type expand: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of VirtualMachineScaleSetVM - :rtype: - ~azure.mgmt.compute.v2018_06_01.models.VirtualMachineScaleSetVMPaged[~azure.mgmt.compute.v2018_06_01.models.VirtualMachineScaleSetVM] - :raises: :class:`CloudError` - """ - def internal_paging(next_link=None, raw=False): - - if not next_link: - # Construct URL - url = self.list.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'virtualMachineScaleSetName': self._serialize.url("virtual_machine_scale_set_name", virtual_machine_scale_set_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - if filter is not None: - query_parameters['$filter'] = self._serialize.query("filter", filter, 'str') - if select is not None: - query_parameters['$select'] = self._serialize.query("select", select, 'str') - if expand is not None: - query_parameters['$expand'] = self._serialize.query("expand", expand, 'str') - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - deserialized = models.VirtualMachineScaleSetVMPaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.VirtualMachineScaleSetVMPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{virtualMachineScaleSetName}/virtualMachines'} - - - def _power_off_initial( - self, resource_group_name, vm_scale_set_name, instance_id, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.power_off.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), - 'instanceId': self._serialize.url("instance_id", instance_id, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - def power_off( - self, resource_group_name, vm_scale_set_name, instance_id, custom_headers=None, raw=False, polling=True, **operation_config): - """Power off (stop) a virtual machine in a VM scale set. Note that - resources are still attached and you are getting charged for the - resources. Instead, use deallocate to release resources and avoid - charges. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param vm_scale_set_name: The name of the VM scale set. - :type vm_scale_set_name: str - :param instance_id: The instance ID of the virtual machine. - :type instance_id: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns None or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] - :raises: :class:`CloudError` - """ - raw_result = self._power_off_initial( - resource_group_name=resource_group_name, - vm_scale_set_name=vm_scale_set_name, - instance_id=instance_id, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - power_off.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/virtualmachines/{instanceId}/poweroff'} - - - def _restart_initial( - self, resource_group_name, vm_scale_set_name, instance_id, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.restart.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), - 'instanceId': self._serialize.url("instance_id", instance_id, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - def restart( - self, resource_group_name, vm_scale_set_name, instance_id, custom_headers=None, raw=False, polling=True, **operation_config): - """Restarts a virtual machine in a VM scale set. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param vm_scale_set_name: The name of the VM scale set. - :type vm_scale_set_name: str - :param instance_id: The instance ID of the virtual machine. - :type instance_id: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns None or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] - :raises: :class:`CloudError` - """ - raw_result = self._restart_initial( - resource_group_name=resource_group_name, - vm_scale_set_name=vm_scale_set_name, - instance_id=instance_id, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - restart.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/virtualmachines/{instanceId}/restart'} - - - def _start_initial( - self, resource_group_name, vm_scale_set_name, instance_id, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.start.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), - 'instanceId': self._serialize.url("instance_id", instance_id, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - def start( - self, resource_group_name, vm_scale_set_name, instance_id, custom_headers=None, raw=False, polling=True, **operation_config): - """Starts a virtual machine in a VM scale set. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param vm_scale_set_name: The name of the VM scale set. - :type vm_scale_set_name: str - :param instance_id: The instance ID of the virtual machine. - :type instance_id: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns None or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] - :raises: :class:`CloudError` - """ - raw_result = self._start_initial( - resource_group_name=resource_group_name, - vm_scale_set_name=vm_scale_set_name, - instance_id=instance_id, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - start.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/virtualmachines/{instanceId}/start'} - - - def _redeploy_initial( - self, resource_group_name, vm_scale_set_name, instance_id, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.redeploy.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), - 'instanceId': self._serialize.url("instance_id", instance_id, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - def redeploy( - self, resource_group_name, vm_scale_set_name, instance_id, custom_headers=None, raw=False, polling=True, **operation_config): - """Redeploys a virtual machine in a VM scale set. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param vm_scale_set_name: The name of the VM scale set. - :type vm_scale_set_name: str - :param instance_id: The instance ID of the virtual machine. - :type instance_id: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns None or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] - :raises: :class:`CloudError` - """ - raw_result = self._redeploy_initial( - resource_group_name=resource_group_name, - vm_scale_set_name=vm_scale_set_name, - instance_id=instance_id, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - redeploy.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/virtualmachines/{instanceId}/redeploy'} - - - def _perform_maintenance_initial( - self, resource_group_name, vm_scale_set_name, instance_id, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.perform_maintenance.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), - 'instanceId': self._serialize.url("instance_id", instance_id, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - def perform_maintenance( - self, resource_group_name, vm_scale_set_name, instance_id, custom_headers=None, raw=False, polling=True, **operation_config): - """Performs maintenance on a virtual machine in a VM scale set. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param vm_scale_set_name: The name of the VM scale set. - :type vm_scale_set_name: str - :param instance_id: The instance ID of the virtual machine. - :type instance_id: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns None or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] - :raises: :class:`CloudError` - """ - raw_result = self._perform_maintenance_initial( - resource_group_name=resource_group_name, - vm_scale_set_name=vm_scale_set_name, - instance_id=instance_id, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - perform_maintenance.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/virtualmachines/{instanceId}/performMaintenance'} - - - def _run_command_initial( - self, resource_group_name, vm_scale_set_name, instance_id, parameters, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.run_command.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), - 'instanceId': self._serialize.url("instance_id", instance_id, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(parameters, 'RunCommandInput') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('RunCommandResult', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def run_command( - self, resource_group_name, vm_scale_set_name, instance_id, parameters, custom_headers=None, raw=False, polling=True, **operation_config): - """Run command on a virtual machine in a VM scale set. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param vm_scale_set_name: The name of the VM scale set. - :type vm_scale_set_name: str - :param instance_id: The instance ID of the virtual machine. - :type instance_id: str - :param parameters: Parameters supplied to the Run command operation. - :type parameters: - ~azure.mgmt.compute.v2018_06_01.models.RunCommandInput - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns RunCommandResult or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2018_06_01.models.RunCommandResult] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2018_06_01.models.RunCommandResult]] - :raises: :class:`CloudError` - """ - raw_result = self._run_command_initial( - resource_group_name=resource_group_name, - vm_scale_set_name=vm_scale_set_name, - instance_id=instance_id, - parameters=parameters, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('RunCommandResult', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - run_command.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/virtualmachines/{instanceId}/runCommand'} diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/operations/virtual_machine_scale_sets_operations.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/operations/virtual_machine_scale_sets_operations.py deleted file mode 100644 index 659cf0efdeb2..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/operations/virtual_machine_scale_sets_operations.py +++ /dev/null @@ -1,1756 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError -from msrest.polling import LROPoller, NoPolling -from msrestazure.polling.arm_polling import ARMPolling - -from .. import models - - -class VirtualMachineScaleSetsOperations(object): - """VirtualMachineScaleSetsOperations operations. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: Client Api Version. Constant value: "2018-06-01". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2018-06-01" - - self.config = config - - - def _create_or_update_initial( - self, resource_group_name, vm_scale_set_name, parameters, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.create_or_update.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(parameters, 'VirtualMachineScaleSet') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 201]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('VirtualMachineScaleSet', response) - if response.status_code == 201: - deserialized = self._deserialize('VirtualMachineScaleSet', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def create_or_update( - self, resource_group_name, vm_scale_set_name, parameters, custom_headers=None, raw=False, polling=True, **operation_config): - """Create or update a VM scale set. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param vm_scale_set_name: The name of the VM scale set to create or - update. - :type vm_scale_set_name: str - :param parameters: The scale set object. - :type parameters: - ~azure.mgmt.compute.v2018_06_01.models.VirtualMachineScaleSet - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns VirtualMachineScaleSet - or ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2018_06_01.models.VirtualMachineScaleSet] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2018_06_01.models.VirtualMachineScaleSet]] - :raises: :class:`CloudError` - """ - raw_result = self._create_or_update_initial( - resource_group_name=resource_group_name, - vm_scale_set_name=vm_scale_set_name, - parameters=parameters, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('VirtualMachineScaleSet', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}'} - - - def _update_initial( - self, resource_group_name, vm_scale_set_name, parameters, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.update.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(parameters, 'VirtualMachineScaleSetUpdate') - - # Construct and send request - request = self._client.patch(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('VirtualMachineScaleSet', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def update( - self, resource_group_name, vm_scale_set_name, parameters, custom_headers=None, raw=False, polling=True, **operation_config): - """Update a VM scale set. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param vm_scale_set_name: The name of the VM scale set to create or - update. - :type vm_scale_set_name: str - :param parameters: The scale set object. - :type parameters: - ~azure.mgmt.compute.v2018_06_01.models.VirtualMachineScaleSetUpdate - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns VirtualMachineScaleSet - or ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2018_06_01.models.VirtualMachineScaleSet] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2018_06_01.models.VirtualMachineScaleSet]] - :raises: :class:`CloudError` - """ - raw_result = self._update_initial( - resource_group_name=resource_group_name, - vm_scale_set_name=vm_scale_set_name, - parameters=parameters, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('VirtualMachineScaleSet', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}'} - - - def _delete_initial( - self, resource_group_name, vm_scale_set_name, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.delete.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202, 204]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - def delete( - self, resource_group_name, vm_scale_set_name, custom_headers=None, raw=False, polling=True, **operation_config): - """Deletes a VM scale set. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param vm_scale_set_name: The name of the VM scale set. - :type vm_scale_set_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns None or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] - :raises: :class:`CloudError` - """ - raw_result = self._delete_initial( - resource_group_name=resource_group_name, - vm_scale_set_name=vm_scale_set_name, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}'} - - def get( - self, resource_group_name, vm_scale_set_name, custom_headers=None, raw=False, **operation_config): - """Display information about a virtual machine scale set. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param vm_scale_set_name: The name of the VM scale set. - :type vm_scale_set_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: VirtualMachineScaleSet or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.compute.v2018_06_01.models.VirtualMachineScaleSet - or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('VirtualMachineScaleSet', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}'} - - - def _deallocate_initial( - self, resource_group_name, vm_scale_set_name, instance_ids=None, custom_headers=None, raw=False, **operation_config): - vm_instance_ids = None - if instance_ids is not None: - vm_instance_ids = models.VirtualMachineScaleSetVMInstanceIDs(instance_ids=instance_ids) - - # Construct URL - url = self.deallocate.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - if vm_instance_ids is not None: - body_content = self._serialize.body(vm_instance_ids, 'VirtualMachineScaleSetVMInstanceIDs') - else: - body_content = None - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - def deallocate( - self, resource_group_name, vm_scale_set_name, instance_ids=None, custom_headers=None, raw=False, polling=True, **operation_config): - """Deallocates specific virtual machines in a VM scale set. Shuts down the - virtual machines and releases the compute resources. You are not billed - for the compute resources that this virtual machine scale set - deallocates. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param vm_scale_set_name: The name of the VM scale set. - :type vm_scale_set_name: str - :param instance_ids: The virtual machine scale set instance ids. - Omitting the virtual machine scale set instance ids will result in the - operation being performed on all virtual machines in the virtual - machine scale set. - :type instance_ids: list[str] - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns None or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] - :raises: :class:`CloudError` - """ - raw_result = self._deallocate_initial( - resource_group_name=resource_group_name, - vm_scale_set_name=vm_scale_set_name, - instance_ids=instance_ids, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - deallocate.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/deallocate'} - - - def _delete_instances_initial( - self, resource_group_name, vm_scale_set_name, instance_ids, custom_headers=None, raw=False, **operation_config): - vm_instance_ids = models.VirtualMachineScaleSetVMInstanceRequiredIDs(instance_ids=instance_ids) - - # Construct URL - url = self.delete_instances.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(vm_instance_ids, 'VirtualMachineScaleSetVMInstanceRequiredIDs') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - def delete_instances( - self, resource_group_name, vm_scale_set_name, instance_ids, custom_headers=None, raw=False, polling=True, **operation_config): - """Deletes virtual machines in a VM scale set. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param vm_scale_set_name: The name of the VM scale set. - :type vm_scale_set_name: str - :param instance_ids: The virtual machine scale set instance ids. - :type instance_ids: list[str] - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns None or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] - :raises: :class:`CloudError` - """ - raw_result = self._delete_instances_initial( - resource_group_name=resource_group_name, - vm_scale_set_name=vm_scale_set_name, - instance_ids=instance_ids, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - delete_instances.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/delete'} - - def get_instance_view( - self, resource_group_name, vm_scale_set_name, custom_headers=None, raw=False, **operation_config): - """Gets the status of a VM scale set instance. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param vm_scale_set_name: The name of the VM scale set. - :type vm_scale_set_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: VirtualMachineScaleSetInstanceView or ClientRawResponse if - raw=true - :rtype: - ~azure.mgmt.compute.v2018_06_01.models.VirtualMachineScaleSetInstanceView - or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get_instance_view.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('VirtualMachineScaleSetInstanceView', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_instance_view.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/instanceView'} - - def list( - self, resource_group_name, custom_headers=None, raw=False, **operation_config): - """Gets a list of all VM scale sets under a resource group. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of VirtualMachineScaleSet - :rtype: - ~azure.mgmt.compute.v2018_06_01.models.VirtualMachineScaleSetPaged[~azure.mgmt.compute.v2018_06_01.models.VirtualMachineScaleSet] - :raises: :class:`CloudError` - """ - def internal_paging(next_link=None, raw=False): - - if not next_link: - # Construct URL - url = self.list.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - deserialized = models.VirtualMachineScaleSetPaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.VirtualMachineScaleSetPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets'} - - def list_all( - self, custom_headers=None, raw=False, **operation_config): - """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. - - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of VirtualMachineScaleSet - :rtype: - ~azure.mgmt.compute.v2018_06_01.models.VirtualMachineScaleSetPaged[~azure.mgmt.compute.v2018_06_01.models.VirtualMachineScaleSet] - :raises: :class:`CloudError` - """ - def internal_paging(next_link=None, raw=False): - - if not next_link: - # Construct URL - url = self.list_all.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - deserialized = models.VirtualMachineScaleSetPaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.VirtualMachineScaleSetPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - list_all.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Compute/virtualMachineScaleSets'} - - def list_skus( - self, resource_group_name, vm_scale_set_name, custom_headers=None, raw=False, **operation_config): - """Gets a list of SKUs available for your VM scale set, including the - minimum and maximum VM instances allowed for each SKU. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param vm_scale_set_name: The name of the VM scale set. - :type vm_scale_set_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of VirtualMachineScaleSetSku - :rtype: - ~azure.mgmt.compute.v2018_06_01.models.VirtualMachineScaleSetSkuPaged[~azure.mgmt.compute.v2018_06_01.models.VirtualMachineScaleSetSku] - :raises: :class:`CloudError` - """ - def internal_paging(next_link=None, raw=False): - - if not next_link: - # Construct URL - url = self.list_skus.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - deserialized = models.VirtualMachineScaleSetSkuPaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.VirtualMachineScaleSetSkuPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - list_skus.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/skus'} - - def get_os_upgrade_history( - self, resource_group_name, vm_scale_set_name, custom_headers=None, raw=False, **operation_config): - """Gets list of OS upgrades on a VM scale set instance. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param vm_scale_set_name: The name of the VM scale set. - :type vm_scale_set_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of - UpgradeOperationHistoricalStatusInfo - :rtype: - ~azure.mgmt.compute.v2018_06_01.models.UpgradeOperationHistoricalStatusInfoPaged[~azure.mgmt.compute.v2018_06_01.models.UpgradeOperationHistoricalStatusInfo] - :raises: :class:`CloudError` - """ - def internal_paging(next_link=None, raw=False): - - if not next_link: - # Construct URL - url = self.get_os_upgrade_history.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - deserialized = models.UpgradeOperationHistoricalStatusInfoPaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.UpgradeOperationHistoricalStatusInfoPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - get_os_upgrade_history.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/osUpgradeHistory'} - - - def _power_off_initial( - self, resource_group_name, vm_scale_set_name, instance_ids=None, custom_headers=None, raw=False, **operation_config): - vm_instance_ids = None - if instance_ids is not None: - vm_instance_ids = models.VirtualMachineScaleSetVMInstanceIDs(instance_ids=instance_ids) - - # Construct URL - url = self.power_off.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - if vm_instance_ids is not None: - body_content = self._serialize.body(vm_instance_ids, 'VirtualMachineScaleSetVMInstanceIDs') - else: - body_content = None - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - def power_off( - self, resource_group_name, vm_scale_set_name, instance_ids=None, custom_headers=None, raw=False, polling=True, **operation_config): - """Power off (stop) one or more virtual machines in a VM scale set. Note - that resources are still attached and you are getting charged for the - resources. Instead, use deallocate to release resources and avoid - charges. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param vm_scale_set_name: The name of the VM scale set. - :type vm_scale_set_name: str - :param instance_ids: The virtual machine scale set instance ids. - Omitting the virtual machine scale set instance ids will result in the - operation being performed on all virtual machines in the virtual - machine scale set. - :type instance_ids: list[str] - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns None or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] - :raises: :class:`CloudError` - """ - raw_result = self._power_off_initial( - resource_group_name=resource_group_name, - vm_scale_set_name=vm_scale_set_name, - instance_ids=instance_ids, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - power_off.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/poweroff'} - - - def _restart_initial( - self, resource_group_name, vm_scale_set_name, instance_ids=None, custom_headers=None, raw=False, **operation_config): - vm_instance_ids = None - if instance_ids is not None: - vm_instance_ids = models.VirtualMachineScaleSetVMInstanceIDs(instance_ids=instance_ids) - - # Construct URL - url = self.restart.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - if vm_instance_ids is not None: - body_content = self._serialize.body(vm_instance_ids, 'VirtualMachineScaleSetVMInstanceIDs') - else: - body_content = None - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - def restart( - self, resource_group_name, vm_scale_set_name, instance_ids=None, custom_headers=None, raw=False, polling=True, **operation_config): - """Restarts one or more virtual machines in a VM scale set. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param vm_scale_set_name: The name of the VM scale set. - :type vm_scale_set_name: str - :param instance_ids: The virtual machine scale set instance ids. - Omitting the virtual machine scale set instance ids will result in the - operation being performed on all virtual machines in the virtual - machine scale set. - :type instance_ids: list[str] - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns None or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] - :raises: :class:`CloudError` - """ - raw_result = self._restart_initial( - resource_group_name=resource_group_name, - vm_scale_set_name=vm_scale_set_name, - instance_ids=instance_ids, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - restart.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/restart'} - - - def _start_initial( - self, resource_group_name, vm_scale_set_name, instance_ids=None, custom_headers=None, raw=False, **operation_config): - vm_instance_ids = None - if instance_ids is not None: - vm_instance_ids = models.VirtualMachineScaleSetVMInstanceIDs(instance_ids=instance_ids) - - # Construct URL - url = self.start.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - if vm_instance_ids is not None: - body_content = self._serialize.body(vm_instance_ids, 'VirtualMachineScaleSetVMInstanceIDs') - else: - body_content = None - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - def start( - self, resource_group_name, vm_scale_set_name, instance_ids=None, custom_headers=None, raw=False, polling=True, **operation_config): - """Starts one or more virtual machines in a VM scale set. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param vm_scale_set_name: The name of the VM scale set. - :type vm_scale_set_name: str - :param instance_ids: The virtual machine scale set instance ids. - Omitting the virtual machine scale set instance ids will result in the - operation being performed on all virtual machines in the virtual - machine scale set. - :type instance_ids: list[str] - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns None or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] - :raises: :class:`CloudError` - """ - raw_result = self._start_initial( - resource_group_name=resource_group_name, - vm_scale_set_name=vm_scale_set_name, - instance_ids=instance_ids, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - start.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/start'} - - - def _redeploy_initial( - self, resource_group_name, vm_scale_set_name, instance_ids=None, custom_headers=None, raw=False, **operation_config): - vm_instance_ids = None - if instance_ids is not None: - vm_instance_ids = models.VirtualMachineScaleSetVMInstanceIDs(instance_ids=instance_ids) - - # Construct URL - url = self.redeploy.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - if vm_instance_ids is not None: - body_content = self._serialize.body(vm_instance_ids, 'VirtualMachineScaleSetVMInstanceIDs') - else: - body_content = None - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - def redeploy( - self, resource_group_name, vm_scale_set_name, instance_ids=None, custom_headers=None, raw=False, polling=True, **operation_config): - """Redeploy one or more virtual machines in a VM scale set. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param vm_scale_set_name: The name of the VM scale set. - :type vm_scale_set_name: str - :param instance_ids: The virtual machine scale set instance ids. - Omitting the virtual machine scale set instance ids will result in the - operation being performed on all virtual machines in the virtual - machine scale set. - :type instance_ids: list[str] - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns None or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] - :raises: :class:`CloudError` - """ - raw_result = self._redeploy_initial( - resource_group_name=resource_group_name, - vm_scale_set_name=vm_scale_set_name, - instance_ids=instance_ids, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - redeploy.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/redeploy'} - - - def _perform_maintenance_initial( - self, resource_group_name, vm_scale_set_name, instance_ids=None, custom_headers=None, raw=False, **operation_config): - vm_instance_ids = None - if instance_ids is not None: - vm_instance_ids = models.VirtualMachineScaleSetVMInstanceIDs(instance_ids=instance_ids) - - # Construct URL - url = self.perform_maintenance.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - if vm_instance_ids is not None: - body_content = self._serialize.body(vm_instance_ids, 'VirtualMachineScaleSetVMInstanceIDs') - else: - body_content = None - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - def perform_maintenance( - self, resource_group_name, vm_scale_set_name, instance_ids=None, custom_headers=None, raw=False, polling=True, **operation_config): - """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. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param vm_scale_set_name: The name of the VM scale set. - :type vm_scale_set_name: str - :param instance_ids: The virtual machine scale set instance ids. - Omitting the virtual machine scale set instance ids will result in the - operation being performed on all virtual machines in the virtual - machine scale set. - :type instance_ids: list[str] - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns None or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] - :raises: :class:`CloudError` - """ - raw_result = self._perform_maintenance_initial( - resource_group_name=resource_group_name, - vm_scale_set_name=vm_scale_set_name, - instance_ids=instance_ids, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - perform_maintenance.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/performMaintenance'} - - - def _update_instances_initial( - self, resource_group_name, vm_scale_set_name, instance_ids, custom_headers=None, raw=False, **operation_config): - vm_instance_ids = models.VirtualMachineScaleSetVMInstanceRequiredIDs(instance_ids=instance_ids) - - # Construct URL - url = self.update_instances.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(vm_instance_ids, 'VirtualMachineScaleSetVMInstanceRequiredIDs') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - def update_instances( - self, resource_group_name, vm_scale_set_name, instance_ids, custom_headers=None, raw=False, polling=True, **operation_config): - """Upgrades one or more virtual machines to the latest SKU set in the VM - scale set model. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param vm_scale_set_name: The name of the VM scale set. - :type vm_scale_set_name: str - :param instance_ids: The virtual machine scale set instance ids. - :type instance_ids: list[str] - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns None or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] - :raises: :class:`CloudError` - """ - raw_result = self._update_instances_initial( - resource_group_name=resource_group_name, - vm_scale_set_name=vm_scale_set_name, - instance_ids=instance_ids, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - update_instances.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/manualupgrade'} - - - def _reimage_initial( - self, resource_group_name, vm_scale_set_name, temp_disk=None, instance_ids=None, custom_headers=None, raw=False, **operation_config): - vm_scale_set_reimage_input = None - if temp_disk is not None or instance_ids is not None: - vm_scale_set_reimage_input = models.VirtualMachineScaleSetReimageParameters(temp_disk=temp_disk, instance_ids=instance_ids) - - # Construct URL - url = self.reimage.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - if vm_scale_set_reimage_input is not None: - body_content = self._serialize.body(vm_scale_set_reimage_input, 'VirtualMachineScaleSetReimageParameters') - else: - body_content = None - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - def reimage( - self, resource_group_name, vm_scale_set_name, temp_disk=None, instance_ids=None, custom_headers=None, raw=False, polling=True, **operation_config): - """Reimages (upgrade the operating system) one or more virtual machines in - a VM scale set which don't have a ephemeral OS disk, for virtual - machines who have a ephemeral OS disk the virtual machine is reset to - initial state. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param vm_scale_set_name: The name of the VM scale set. - :type vm_scale_set_name: str - :param temp_disk: Specifies whether to reimage temp disk. Default - value: false. - :type temp_disk: bool - :param instance_ids: The virtual machine scale set instance ids. - Omitting the virtual machine scale set instance ids will result in the - operation being performed on all virtual machines in the virtual - machine scale set. - :type instance_ids: list[str] - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns None or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] - :raises: :class:`CloudError` - """ - raw_result = self._reimage_initial( - resource_group_name=resource_group_name, - vm_scale_set_name=vm_scale_set_name, - temp_disk=temp_disk, - instance_ids=instance_ids, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - reimage.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/reimage'} - - - def _reimage_all_initial( - self, resource_group_name, vm_scale_set_name, instance_ids=None, custom_headers=None, raw=False, **operation_config): - vm_instance_ids = None - if instance_ids is not None: - vm_instance_ids = models.VirtualMachineScaleSetVMInstanceIDs(instance_ids=instance_ids) - - # Construct URL - url = self.reimage_all.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - if vm_instance_ids is not None: - body_content = self._serialize.body(vm_instance_ids, 'VirtualMachineScaleSetVMInstanceIDs') - else: - body_content = None - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - def reimage_all( - self, resource_group_name, vm_scale_set_name, instance_ids=None, custom_headers=None, raw=False, polling=True, **operation_config): - """Reimages all the disks ( including data disks ) in the virtual machines - in a VM scale set. This operation is only supported for managed disks. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param vm_scale_set_name: The name of the VM scale set. - :type vm_scale_set_name: str - :param instance_ids: The virtual machine scale set instance ids. - Omitting the virtual machine scale set instance ids will result in the - operation being performed on all virtual machines in the virtual - machine scale set. - :type instance_ids: list[str] - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns None or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] - :raises: :class:`CloudError` - """ - raw_result = self._reimage_all_initial( - resource_group_name=resource_group_name, - vm_scale_set_name=vm_scale_set_name, - instance_ids=instance_ids, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - reimage_all.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/reimageall'} - - def force_recovery_service_fabric_platform_update_domain_walk( - self, resource_group_name, vm_scale_set_name, platform_update_domain, custom_headers=None, raw=False, **operation_config): - """Manual platform update domain walk to update virtual machines in a - service fabric virtual machine scale set. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param vm_scale_set_name: The name of the VM scale set. - :type vm_scale_set_name: str - :param platform_update_domain: The platform update domain for which a - manual recovery walk is requested - :type platform_update_domain: int - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: RecoveryWalkResponse or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.compute.v2018_06_01.models.RecoveryWalkResponse or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.force_recovery_service_fabric_platform_update_domain_walk.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - query_parameters['platformUpdateDomain'] = self._serialize.query("platform_update_domain", platform_update_domain, 'int') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('RecoveryWalkResponse', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - force_recovery_service_fabric_platform_update_domain_walk.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/forceRecoveryServiceFabricPlatformUpdateDomainWalk'} diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/operations/virtual_machine_sizes_operations.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/operations/virtual_machine_sizes_operations.py deleted file mode 100644 index 799ade49c144..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/operations/virtual_machine_sizes_operations.py +++ /dev/null @@ -1,107 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError - -from .. import models - - -class VirtualMachineSizesOperations(object): - """VirtualMachineSizesOperations operations. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: Client Api Version. Constant value: "2018-06-01". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2018-06-01" - - self.config = config - - def list( - self, location, custom_headers=None, raw=False, **operation_config): - """This API is deprecated. Use [Resources - Skus](https://docs.microsoft.com/en-us/rest/api/compute/resourceskus/list). - - :param location: The location upon which virtual-machine-sizes is - queried. - :type location: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of VirtualMachineSize - :rtype: - ~azure.mgmt.compute.v2018_06_01.models.VirtualMachineSizePaged[~azure.mgmt.compute.v2018_06_01.models.VirtualMachineSize] - :raises: :class:`CloudError` - """ - def internal_paging(next_link=None, raw=False): - - if not next_link: - # Construct URL - url = self.list.metadata['url'] - path_format_arguments = { - 'location': self._serialize.url("location", location, 'str', pattern=r'^[-\w\._]+$'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - deserialized = models.VirtualMachineSizePaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.VirtualMachineSizePaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/vmSizes'} diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/operations/virtual_machines_operations.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/operations/virtual_machines_operations.py deleted file mode 100644 index f0a98f293fe9..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/operations/virtual_machines_operations.py +++ /dev/null @@ -1,1646 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError -from msrest.polling import LROPoller, NoPolling -from msrestazure.polling.arm_polling import ARMPolling - -from .. import models - - -class VirtualMachinesOperations(object): - """VirtualMachinesOperations operations. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: Client Api Version. Constant value: "2018-06-01". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2018-06-01" - - self.config = config - - def list_by_location( - self, location, custom_headers=None, raw=False, **operation_config): - """Gets all the virtual machines under the specified subscription for the - specified location. - - :param location: The location for which virtual machines under the - subscription are queried. - :type location: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of VirtualMachine - :rtype: - ~azure.mgmt.compute.v2018_06_01.models.VirtualMachinePaged[~azure.mgmt.compute.v2018_06_01.models.VirtualMachine] - :raises: :class:`CloudError` - """ - def internal_paging(next_link=None, raw=False): - - if not next_link: - # Construct URL - url = self.list_by_location.metadata['url'] - path_format_arguments = { - 'location': self._serialize.url("location", location, 'str', pattern=r'^[-\w\._]+$'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - deserialized = models.VirtualMachinePaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.VirtualMachinePaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - list_by_location.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/virtualMachines'} - - - def _capture_initial( - self, resource_group_name, vm_name, parameters, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.capture.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'vmName': self._serialize.url("vm_name", vm_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(parameters, 'VirtualMachineCaptureParameters') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('VirtualMachineCaptureResult', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def capture( - self, resource_group_name, vm_name, parameters, custom_headers=None, raw=False, polling=True, **operation_config): - """Captures the VM by copying virtual hard disks of the VM and outputs a - template that can be used to create similar VMs. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param vm_name: The name of the virtual machine. - :type vm_name: str - :param parameters: Parameters supplied to the Capture Virtual Machine - operation. - :type parameters: - ~azure.mgmt.compute.v2018_06_01.models.VirtualMachineCaptureParameters - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns - VirtualMachineCaptureResult or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2018_06_01.models.VirtualMachineCaptureResult] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2018_06_01.models.VirtualMachineCaptureResult]] - :raises: :class:`CloudError` - """ - raw_result = self._capture_initial( - resource_group_name=resource_group_name, - vm_name=vm_name, - parameters=parameters, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('VirtualMachineCaptureResult', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - capture.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/capture'} - - - def _create_or_update_initial( - self, resource_group_name, vm_name, parameters, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.create_or_update.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'vmName': self._serialize.url("vm_name", vm_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(parameters, 'VirtualMachine') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 201]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('VirtualMachine', response) - if response.status_code == 201: - deserialized = self._deserialize('VirtualMachine', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def create_or_update( - self, resource_group_name, vm_name, parameters, custom_headers=None, raw=False, polling=True, **operation_config): - """The operation to create or update a virtual machine. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param vm_name: The name of the virtual machine. - :type vm_name: str - :param parameters: Parameters supplied to the Create Virtual Machine - operation. - :type parameters: - ~azure.mgmt.compute.v2018_06_01.models.VirtualMachine - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns VirtualMachine or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2018_06_01.models.VirtualMachine] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2018_06_01.models.VirtualMachine]] - :raises: :class:`CloudError` - """ - raw_result = self._create_or_update_initial( - resource_group_name=resource_group_name, - vm_name=vm_name, - parameters=parameters, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('VirtualMachine', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}'} - - - def _update_initial( - self, resource_group_name, vm_name, parameters, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.update.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'vmName': self._serialize.url("vm_name", vm_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(parameters, 'VirtualMachineUpdate') - - # Construct and send request - request = self._client.patch(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 201]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('VirtualMachine', response) - if response.status_code == 201: - deserialized = self._deserialize('VirtualMachine', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def update( - self, resource_group_name, vm_name, parameters, custom_headers=None, raw=False, polling=True, **operation_config): - """The operation to update a virtual machine. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param vm_name: The name of the virtual machine. - :type vm_name: str - :param parameters: Parameters supplied to the Update Virtual Machine - operation. - :type parameters: - ~azure.mgmt.compute.v2018_06_01.models.VirtualMachineUpdate - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns VirtualMachine or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2018_06_01.models.VirtualMachine] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2018_06_01.models.VirtualMachine]] - :raises: :class:`CloudError` - """ - raw_result = self._update_initial( - resource_group_name=resource_group_name, - vm_name=vm_name, - parameters=parameters, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('VirtualMachine', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}'} - - - def _delete_initial( - self, resource_group_name, vm_name, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.delete.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'vmName': self._serialize.url("vm_name", vm_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202, 204]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - def delete( - self, resource_group_name, vm_name, custom_headers=None, raw=False, polling=True, **operation_config): - """The operation to delete a virtual machine. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param vm_name: The name of the virtual machine. - :type vm_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns None or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] - :raises: :class:`CloudError` - """ - raw_result = self._delete_initial( - resource_group_name=resource_group_name, - vm_name=vm_name, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}'} - - def get( - self, resource_group_name, vm_name, expand=None, custom_headers=None, raw=False, **operation_config): - """Retrieves information about the model view or the instance view of a - virtual machine. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param vm_name: The name of the virtual machine. - :type vm_name: str - :param expand: The expand expression to apply on the operation. - Possible values include: 'instanceView' - :type expand: str or - ~azure.mgmt.compute.v2018_06_01.models.InstanceViewTypes - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: VirtualMachine or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.compute.v2018_06_01.models.VirtualMachine or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'vmName': self._serialize.url("vm_name", vm_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - if expand is not None: - query_parameters['$expand'] = self._serialize.query("expand", expand, 'InstanceViewTypes') - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('VirtualMachine', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}'} - - def instance_view( - self, resource_group_name, vm_name, custom_headers=None, raw=False, **operation_config): - """Retrieves information about the run-time state of a virtual machine. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param vm_name: The name of the virtual machine. - :type vm_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: VirtualMachineInstanceView or ClientRawResponse if raw=true - :rtype: - ~azure.mgmt.compute.v2018_06_01.models.VirtualMachineInstanceView or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.instance_view.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'vmName': self._serialize.url("vm_name", vm_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('VirtualMachineInstanceView', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - instance_view.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/instanceView'} - - - def _convert_to_managed_disks_initial( - self, resource_group_name, vm_name, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.convert_to_managed_disks.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'vmName': self._serialize.url("vm_name", vm_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - def convert_to_managed_disks( - self, resource_group_name, vm_name, custom_headers=None, raw=False, polling=True, **operation_config): - """Converts virtual machine disks from blob-based to managed disks. - Virtual machine must be stop-deallocated before invoking this - operation. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param vm_name: The name of the virtual machine. - :type vm_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns None or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] - :raises: :class:`CloudError` - """ - raw_result = self._convert_to_managed_disks_initial( - resource_group_name=resource_group_name, - vm_name=vm_name, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - convert_to_managed_disks.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/convertToManagedDisks'} - - - def _deallocate_initial( - self, resource_group_name, vm_name, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.deallocate.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'vmName': self._serialize.url("vm_name", vm_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - def deallocate( - self, resource_group_name, vm_name, custom_headers=None, raw=False, polling=True, **operation_config): - """Shuts down the virtual machine and releases the compute resources. You - are not billed for the compute resources that this virtual machine - uses. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param vm_name: The name of the virtual machine. - :type vm_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns None or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] - :raises: :class:`CloudError` - """ - raw_result = self._deallocate_initial( - resource_group_name=resource_group_name, - vm_name=vm_name, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - deallocate.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/deallocate'} - - def generalize( - self, resource_group_name, vm_name, custom_headers=None, raw=False, **operation_config): - """Sets the state of the virtual machine to generalized. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param vm_name: The name of the virtual machine. - :type vm_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.generalize.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'vmName': self._serialize.url("vm_name", vm_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - generalize.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/generalize'} - - def list( - self, resource_group_name, custom_headers=None, raw=False, **operation_config): - """Lists all of the virtual machines in the specified resource group. Use - the nextLink property in the response to get the next page of virtual - machines. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of VirtualMachine - :rtype: - ~azure.mgmt.compute.v2018_06_01.models.VirtualMachinePaged[~azure.mgmt.compute.v2018_06_01.models.VirtualMachine] - :raises: :class:`CloudError` - """ - def internal_paging(next_link=None, raw=False): - - if not next_link: - # Construct URL - url = self.list.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - deserialized = models.VirtualMachinePaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.VirtualMachinePaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines'} - - def list_all( - self, custom_headers=None, raw=False, **operation_config): - """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. - - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of VirtualMachine - :rtype: - ~azure.mgmt.compute.v2018_06_01.models.VirtualMachinePaged[~azure.mgmt.compute.v2018_06_01.models.VirtualMachine] - :raises: :class:`CloudError` - """ - def internal_paging(next_link=None, raw=False): - - if not next_link: - # Construct URL - url = self.list_all.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - deserialized = models.VirtualMachinePaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.VirtualMachinePaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - list_all.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Compute/virtualMachines'} - - def list_available_sizes( - self, resource_group_name, vm_name, custom_headers=None, raw=False, **operation_config): - """Lists all available virtual machine sizes to which the specified - virtual machine can be resized. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param vm_name: The name of the virtual machine. - :type vm_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of VirtualMachineSize - :rtype: - ~azure.mgmt.compute.v2018_06_01.models.VirtualMachineSizePaged[~azure.mgmt.compute.v2018_06_01.models.VirtualMachineSize] - :raises: :class:`CloudError` - """ - def internal_paging(next_link=None, raw=False): - - if not next_link: - # Construct URL - url = self.list_available_sizes.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'vmName': self._serialize.url("vm_name", vm_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - deserialized = models.VirtualMachineSizePaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.VirtualMachineSizePaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - list_available_sizes.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/vmSizes'} - - - def _power_off_initial( - self, resource_group_name, vm_name, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.power_off.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'vmName': self._serialize.url("vm_name", vm_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - def power_off( - self, resource_group_name, vm_name, custom_headers=None, raw=False, polling=True, **operation_config): - """The operation to power off (stop) a virtual machine. The virtual - machine can be restarted with the same provisioned resources. You are - still charged for this virtual machine. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param vm_name: The name of the virtual machine. - :type vm_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns None or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] - :raises: :class:`CloudError` - """ - raw_result = self._power_off_initial( - resource_group_name=resource_group_name, - vm_name=vm_name, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - power_off.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/powerOff'} - - - def _restart_initial( - self, resource_group_name, vm_name, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.restart.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'vmName': self._serialize.url("vm_name", vm_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - def restart( - self, resource_group_name, vm_name, custom_headers=None, raw=False, polling=True, **operation_config): - """The operation to restart a virtual machine. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param vm_name: The name of the virtual machine. - :type vm_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns None or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] - :raises: :class:`CloudError` - """ - raw_result = self._restart_initial( - resource_group_name=resource_group_name, - vm_name=vm_name, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - restart.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/restart'} - - - def _start_initial( - self, resource_group_name, vm_name, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.start.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'vmName': self._serialize.url("vm_name", vm_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - def start( - self, resource_group_name, vm_name, custom_headers=None, raw=False, polling=True, **operation_config): - """The operation to start a virtual machine. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param vm_name: The name of the virtual machine. - :type vm_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns None or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] - :raises: :class:`CloudError` - """ - raw_result = self._start_initial( - resource_group_name=resource_group_name, - vm_name=vm_name, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - start.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/start'} - - - def _redeploy_initial( - self, resource_group_name, vm_name, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.redeploy.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'vmName': self._serialize.url("vm_name", vm_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - def redeploy( - self, resource_group_name, vm_name, custom_headers=None, raw=False, polling=True, **operation_config): - """The operation to redeploy a virtual machine. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param vm_name: The name of the virtual machine. - :type vm_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns None or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] - :raises: :class:`CloudError` - """ - raw_result = self._redeploy_initial( - resource_group_name=resource_group_name, - vm_name=vm_name, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - redeploy.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/redeploy'} - - - def _reimage_initial( - self, resource_group_name, vm_name, temp_disk=None, custom_headers=None, raw=False, **operation_config): - parameters = None - if temp_disk is not None: - parameters = models.VirtualMachineReimageParameters(temp_disk=temp_disk) - - # Construct URL - url = self.reimage.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'vmName': self._serialize.url("vm_name", vm_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - if parameters is not None: - body_content = self._serialize.body(parameters, 'VirtualMachineReimageParameters') - else: - body_content = None - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - def reimage( - self, resource_group_name, vm_name, temp_disk=None, custom_headers=None, raw=False, polling=True, **operation_config): - """Reimages the virtual machine which has an ephemeral OS disk back to its - initial state. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param vm_name: The name of the virtual machine. - :type vm_name: str - :param temp_disk: Specifies whether to reimage temp disk. Default - value: false. - :type temp_disk: bool - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns None or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] - :raises: :class:`CloudError` - """ - raw_result = self._reimage_initial( - resource_group_name=resource_group_name, - vm_name=vm_name, - temp_disk=temp_disk, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - reimage.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/reimage'} - - - def _perform_maintenance_initial( - self, resource_group_name, vm_name, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.perform_maintenance.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'vmName': self._serialize.url("vm_name", vm_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - def perform_maintenance( - self, resource_group_name, vm_name, custom_headers=None, raw=False, polling=True, **operation_config): - """The operation to perform maintenance on a virtual machine. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param vm_name: The name of the virtual machine. - :type vm_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns None or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] - :raises: :class:`CloudError` - """ - raw_result = self._perform_maintenance_initial( - resource_group_name=resource_group_name, - vm_name=vm_name, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - perform_maintenance.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/performMaintenance'} - - - def _run_command_initial( - self, resource_group_name, vm_name, parameters, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.run_command.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'vmName': self._serialize.url("vm_name", vm_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(parameters, 'RunCommandInput') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('RunCommandResult', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def run_command( - self, resource_group_name, vm_name, parameters, custom_headers=None, raw=False, polling=True, **operation_config): - """Run command on the VM. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param vm_name: The name of the virtual machine. - :type vm_name: str - :param parameters: Parameters supplied to the Run command operation. - :type parameters: - ~azure.mgmt.compute.v2018_06_01.models.RunCommandInput - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns RunCommandResult or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2018_06_01.models.RunCommandResult] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2018_06_01.models.RunCommandResult]] - :raises: :class:`CloudError` - """ - raw_result = self._run_command_initial( - resource_group_name=resource_group_name, - vm_name=vm_name, - parameters=parameters, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('RunCommandResult', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - run_command.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/runCommand'} diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_09_30/__init__.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_09_30/__init__.py index 88ded2f640de..a7bc1ce68e37 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_09_30/__init__.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_09_30/__init__.py @@ -9,10 +9,11 @@ # regenerated. # -------------------------------------------------------------------------- -from .compute_management_client import ComputeManagementClient -from .version import VERSION +from ._configuration import ComputeManagementClientConfiguration +from ._compute_management_client import ComputeManagementClient +__all__ = ['ComputeManagementClient', 'ComputeManagementClientConfiguration'] -__all__ = ['ComputeManagementClient'] +from .version import VERSION __version__ = VERSION diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_09_30/_compute_management_client.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_09_30/_compute_management_client.py new file mode 100644 index 000000000000..c652250314c0 --- /dev/null +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_09_30/_compute_management_client.py @@ -0,0 +1,56 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.service_client import SDKClient +from msrest import Serializer, Deserializer + +from ._configuration import ComputeManagementClientConfiguration +from .operations import DisksOperations +from .operations import SnapshotsOperations +from . import models + + +class ComputeManagementClient(SDKClient): + """Compute Client + + :ivar config: Configuration for client. + :vartype config: ComputeManagementClientConfiguration + + :ivar disks: Disks operations + :vartype disks: azure.mgmt.compute.v2018_09_30.operations.DisksOperations + :ivar snapshots: Snapshots operations + :vartype snapshots: azure.mgmt.compute.v2018_09_30.operations.SnapshotsOperations + + :param credentials: Credentials needed for the client to connect to Azure. + :type credentials: :mod:`A msrestazure Credentials + object` + :param subscription_id: Subscription credentials which uniquely identify + Microsoft Azure subscription. The subscription ID forms part of the URI + for every service call. + :type subscription_id: str + :param str base_url: Service URL + """ + + def __init__( + self, credentials, subscription_id, base_url=None): + + self.config = ComputeManagementClientConfiguration(credentials, subscription_id, base_url) + super(ComputeManagementClient, self).__init__(self.config.credentials, self.config) + + client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} + self.api_version = '2018-09-30' + self._serialize = Serializer(client_models) + self._deserialize = Deserializer(client_models) + + self.disks = DisksOperations( + self._client, self.config, self._serialize, self._deserialize) + self.snapshots = SnapshotsOperations( + self._client, self.config, self._serialize, self._deserialize) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_09_30/_configuration.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_09_30/_configuration.py new file mode 100644 index 000000000000..0fcf5984e2ca --- /dev/null +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_09_30/_configuration.py @@ -0,0 +1,50 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- +from msrestazure import AzureConfiguration + +from .version import VERSION + + +class ComputeManagementClientConfiguration(AzureConfiguration): + """Configuration for ComputeManagementClient + Note that all parameters used to create this instance are saved as instance + attributes. + + :param credentials: Credentials needed for the client to connect to Azure. + :type credentials: :mod:`A msrestazure Credentials + object` + :param subscription_id: Subscription credentials which uniquely identify + Microsoft Azure subscription. The subscription ID forms part of the URI + for every service call. + :type subscription_id: str + :param str base_url: Service URL + """ + + def __init__( + self, credentials, subscription_id, base_url=None): + + if credentials is None: + raise ValueError("Parameter 'credentials' must not be None.") + if subscription_id is None: + raise ValueError("Parameter 'subscription_id' must not be None.") + if not base_url: + base_url = 'https://management.azure.com' + + super(ComputeManagementClientConfiguration, self).__init__(base_url) + + # Starting Autorest.Python 4.0.64, make connection pool activated by default + self.keep_alive = True + + self.add_user_agent('azure-mgmt-compute/{}'.format(VERSION)) + self.add_user_agent('Azure-SDK-For-Python') + + self.credentials = credentials + self.subscription_id = subscription_id diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_09_30/compute_management_client.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_09_30/compute_management_client.py deleted file mode 100644 index 7712e577588f..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_09_30/compute_management_client.py +++ /dev/null @@ -1,90 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.service_client import SDKClient -from msrest import Serializer, Deserializer -from msrestazure import AzureConfiguration -from .version import VERSION -from .operations.disks_operations import DisksOperations -from .operations.snapshots_operations import SnapshotsOperations -from . import models - - -class ComputeManagementClientConfiguration(AzureConfiguration): - """Configuration for ComputeManagementClient - Note that all parameters used to create this instance are saved as instance - attributes. - - :param credentials: Credentials needed for the client to connect to Azure. - :type credentials: :mod:`A msrestazure Credentials - object` - :param subscription_id: Subscription credentials which uniquely identify - Microsoft Azure subscription. The subscription ID forms part of the URI - for every service call. - :type subscription_id: str - :param str base_url: Service URL - """ - - def __init__( - self, credentials, subscription_id, base_url=None): - - if credentials is None: - raise ValueError("Parameter 'credentials' must not be None.") - if subscription_id is None: - raise ValueError("Parameter 'subscription_id' must not be None.") - if not base_url: - base_url = 'https://management.azure.com' - - super(ComputeManagementClientConfiguration, self).__init__(base_url) - - self.add_user_agent('azure-mgmt-compute/{}'.format(VERSION)) - self.add_user_agent('Azure-SDK-For-Python') - - self.credentials = credentials - self.subscription_id = subscription_id - - -class ComputeManagementClient(SDKClient): - """Compute Client - - :ivar config: Configuration for client. - :vartype config: ComputeManagementClientConfiguration - - :ivar disks: Disks operations - :vartype disks: azure.mgmt.compute.v2018_09_30.operations.DisksOperations - :ivar snapshots: Snapshots operations - :vartype snapshots: azure.mgmt.compute.v2018_09_30.operations.SnapshotsOperations - - :param credentials: Credentials needed for the client to connect to Azure. - :type credentials: :mod:`A msrestazure Credentials - object` - :param subscription_id: Subscription credentials which uniquely identify - Microsoft Azure subscription. The subscription ID forms part of the URI - for every service call. - :type subscription_id: str - :param str base_url: Service URL - """ - - def __init__( - self, credentials, subscription_id, base_url=None): - - self.config = ComputeManagementClientConfiguration(credentials, subscription_id, base_url) - super(ComputeManagementClient, self).__init__(self.config.credentials, self.config) - - client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} - self.api_version = '2018-09-30' - self._serialize = Serializer(client_models) - self._deserialize = Deserializer(client_models) - - self.disks = DisksOperations( - self._client, self.config, self._serialize, self._deserialize) - self.snapshots = SnapshotsOperations( - self._client, self.config, self._serialize, self._deserialize) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_09_30/models/__init__.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_09_30/models/__init__.py index 4a1cc092e224..27b52be7b8af 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_09_30/models/__init__.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_09_30/models/__init__.py @@ -10,42 +10,42 @@ # -------------------------------------------------------------------------- try: - from .resource_py3 import Resource - from .disk_sku_py3 import DiskSku - from .image_disk_reference_py3 import ImageDiskReference - from .creation_data_py3 import CreationData - from .source_vault_py3 import SourceVault - from .key_vault_and_secret_reference_py3 import KeyVaultAndSecretReference - from .key_vault_and_key_reference_py3 import KeyVaultAndKeyReference - from .encryption_settings_element_py3 import EncryptionSettingsElement - from .encryption_settings_collection_py3 import EncryptionSettingsCollection - from .disk_py3 import Disk - from .disk_update_py3 import DiskUpdate - from .snapshot_sku_py3 import SnapshotSku - from .grant_access_data_py3 import GrantAccessData - from .access_uri_py3 import AccessUri - from .snapshot_py3 import Snapshot - from .snapshot_update_py3 import SnapshotUpdate + from ._models_py3 import AccessUri + from ._models_py3 import CreationData + from ._models_py3 import Disk + from ._models_py3 import DiskSku + from ._models_py3 import DiskUpdate + from ._models_py3 import EncryptionSettingsCollection + from ._models_py3 import EncryptionSettingsElement + from ._models_py3 import GrantAccessData + from ._models_py3 import ImageDiskReference + from ._models_py3 import KeyVaultAndKeyReference + from ._models_py3 import KeyVaultAndSecretReference + from ._models_py3 import Resource + from ._models_py3 import Snapshot + from ._models_py3 import SnapshotSku + from ._models_py3 import SnapshotUpdate + from ._models_py3 import SourceVault except (SyntaxError, ImportError): - from .resource import Resource - from .disk_sku import DiskSku - from .image_disk_reference import ImageDiskReference - from .creation_data import CreationData - from .source_vault import SourceVault - from .key_vault_and_secret_reference import KeyVaultAndSecretReference - from .key_vault_and_key_reference import KeyVaultAndKeyReference - from .encryption_settings_element import EncryptionSettingsElement - from .encryption_settings_collection import EncryptionSettingsCollection - from .disk import Disk - from .disk_update import DiskUpdate - from .snapshot_sku import SnapshotSku - from .grant_access_data import GrantAccessData - from .access_uri import AccessUri - from .snapshot import Snapshot - from .snapshot_update import SnapshotUpdate -from .disk_paged import DiskPaged -from .snapshot_paged import SnapshotPaged -from .compute_management_client_enums import ( + from ._models import AccessUri + from ._models import CreationData + from ._models import Disk + from ._models import DiskSku + from ._models import DiskUpdate + from ._models import EncryptionSettingsCollection + from ._models import EncryptionSettingsElement + from ._models import GrantAccessData + from ._models import ImageDiskReference + from ._models import KeyVaultAndKeyReference + from ._models import KeyVaultAndSecretReference + from ._models import Resource + from ._models import Snapshot + from ._models import SnapshotSku + from ._models import SnapshotUpdate + from ._models import SourceVault +from ._paged_models import DiskPaged +from ._paged_models import SnapshotPaged +from ._compute_management_client_enums import ( DiskStorageAccountTypes, OperatingSystemTypes, HyperVGeneration, @@ -56,22 +56,22 @@ ) __all__ = [ - 'Resource', - 'DiskSku', - 'ImageDiskReference', + 'AccessUri', 'CreationData', - 'SourceVault', - 'KeyVaultAndSecretReference', - 'KeyVaultAndKeyReference', - 'EncryptionSettingsElement', - 'EncryptionSettingsCollection', 'Disk', + 'DiskSku', 'DiskUpdate', - 'SnapshotSku', + 'EncryptionSettingsCollection', + 'EncryptionSettingsElement', 'GrantAccessData', - 'AccessUri', + 'ImageDiskReference', + 'KeyVaultAndKeyReference', + 'KeyVaultAndSecretReference', + 'Resource', 'Snapshot', + 'SnapshotSku', 'SnapshotUpdate', + 'SourceVault', 'DiskPaged', 'SnapshotPaged', 'DiskStorageAccountTypes', diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_09_30/models/compute_management_client_enums.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_09_30/models/_compute_management_client_enums.py similarity index 100% rename from sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_09_30/models/compute_management_client_enums.py rename to sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_09_30/models/_compute_management_client_enums.py diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_09_30/models/_models.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_09_30/models/_models.py new file mode 100644 index 000000000000..e7d12f4fcf9f --- /dev/null +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_09_30/models/_models.py @@ -0,0 +1,681 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class AccessUri(Model): + """A disk access SAS uri. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar access_sas: A SAS uri for accessing a disk. + :vartype access_sas: str + """ + + _validation = { + 'access_sas': {'readonly': True}, + } + + _attribute_map = { + 'access_sas': {'key': 'accessSAS', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(AccessUri, self).__init__(**kwargs) + self.access_sas = None + + +class CloudError(Model): + """CloudError. + """ + + _attribute_map = { + } + + +class CreationData(Model): + """Data used when creating a disk. + + All required parameters must be populated in order to send to Azure. + + :param create_option: Required. This enumerates the possible sources of a + disk's creation. Possible values include: 'Empty', 'Attach', 'FromImage', + 'Import', 'Copy', 'Restore', 'Upload' + :type create_option: str or + ~azure.mgmt.compute.v2018_09_30.models.DiskCreateOption + :param storage_account_id: If createOption is Import, the Azure Resource + Manager identifier of the storage account containing the blob to import as + a disk. Required only if the blob is in a different subscription + :type storage_account_id: str + :param image_reference: Disk source information. + :type image_reference: + ~azure.mgmt.compute.v2018_09_30.models.ImageDiskReference + :param source_uri: If createOption is Import, this is the URI of a blob to + be imported into a managed disk. + :type source_uri: str + :param source_resource_id: If createOption is Copy, this is the ARM id of + the source snapshot or disk. + :type source_resource_id: str + """ + + _validation = { + 'create_option': {'required': True}, + } + + _attribute_map = { + 'create_option': {'key': 'createOption', 'type': 'str'}, + 'storage_account_id': {'key': 'storageAccountId', 'type': 'str'}, + 'image_reference': {'key': 'imageReference', 'type': 'ImageDiskReference'}, + 'source_uri': {'key': 'sourceUri', 'type': 'str'}, + 'source_resource_id': {'key': 'sourceResourceId', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(CreationData, self).__init__(**kwargs) + self.create_option = kwargs.get('create_option', None) + self.storage_account_id = kwargs.get('storage_account_id', None) + self.image_reference = kwargs.get('image_reference', None) + self.source_uri = kwargs.get('source_uri', None) + self.source_resource_id = kwargs.get('source_resource_id', None) + + +class Resource(Model): + """The Resource model definition. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource Id + :vartype id: str + :ivar name: Resource name + :vartype name: str + :ivar type: Resource type + :vartype type: str + :param location: Required. Resource location + :type location: str + :param tags: Resource tags + :type tags: dict[str, str] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__(self, **kwargs): + super(Resource, self).__init__(**kwargs) + self.id = None + self.name = None + self.type = None + self.location = kwargs.get('location', None) + self.tags = kwargs.get('tags', None) + + +class Disk(Resource): + """Disk resource. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource Id + :vartype id: str + :ivar name: Resource name + :vartype name: str + :ivar type: Resource type + :vartype type: str + :param location: Required. Resource location + :type location: str + :param tags: Resource tags + :type tags: dict[str, str] + :ivar managed_by: A relative URI containing the ID of the VM that has the + disk attached. + :vartype managed_by: str + :param sku: + :type sku: ~azure.mgmt.compute.v2018_09_30.models.DiskSku + :param zones: The Logical zone list for Disk. + :type zones: list[str] + :ivar time_created: The time when the disk was created. + :vartype time_created: datetime + :param os_type: The Operating System type. Possible values include: + 'Windows', 'Linux' + :type os_type: str or + ~azure.mgmt.compute.v2018_09_30.models.OperatingSystemTypes + :param hyper_vgeneration: The hypervisor generation of the Virtual + Machine. Applicable to OS disks only. Possible values include: 'V1', 'V2' + :type hyper_vgeneration: str or + ~azure.mgmt.compute.v2018_09_30.models.HyperVGeneration + :param creation_data: Required. Disk source information. CreationData + information cannot be changed after the disk has been created. + :type creation_data: ~azure.mgmt.compute.v2018_09_30.models.CreationData + :param disk_size_gb: If creationData.createOption is Empty, this field is + mandatory and it indicates the size of the VHD to create. If this field is + present for updates or creation with other options, it indicates a resize. + Resizes are only allowed if the disk is not attached to a running VM, and + can only increase the disk's size. + :type disk_size_gb: int + :param encryption_settings_collection: Encryption settings collection used + for Azure Disk Encryption, can contain multiple encryption settings per + disk or snapshot. + :type encryption_settings_collection: + ~azure.mgmt.compute.v2018_09_30.models.EncryptionSettingsCollection + :ivar provisioning_state: The disk provisioning state. + :vartype provisioning_state: str + :param disk_iops_read_write: The number of IOPS allowed for this disk; + only settable for UltraSSD disks. One operation can transfer between 4k + and 256k bytes. + :type disk_iops_read_write: long + :param disk_mbps_read_write: The bandwidth allowed for this disk; only + settable for UltraSSD disks. MBps means millions of bytes per second - MB + here uses the ISO notation, of powers of 10. + :type disk_mbps_read_write: int + :ivar disk_state: The state of the disk. Possible values include: + 'Unattached', 'Attached', 'Reserved', 'ActiveSAS', 'ReadyToUpload', + 'ActiveUpload' + :vartype disk_state: str or + ~azure.mgmt.compute.v2018_09_30.models.DiskState + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + 'managed_by': {'readonly': True}, + 'time_created': {'readonly': True}, + 'creation_data': {'required': True}, + 'provisioning_state': {'readonly': True}, + 'disk_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'managed_by': {'key': 'managedBy', 'type': 'str'}, + 'sku': {'key': 'sku', 'type': 'DiskSku'}, + 'zones': {'key': 'zones', 'type': '[str]'}, + 'time_created': {'key': 'properties.timeCreated', 'type': 'iso-8601'}, + 'os_type': {'key': 'properties.osType', 'type': 'OperatingSystemTypes'}, + 'hyper_vgeneration': {'key': 'properties.hyperVGeneration', 'type': 'str'}, + 'creation_data': {'key': 'properties.creationData', 'type': 'CreationData'}, + 'disk_size_gb': {'key': 'properties.diskSizeGB', 'type': 'int'}, + 'encryption_settings_collection': {'key': 'properties.encryptionSettingsCollection', 'type': 'EncryptionSettingsCollection'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'disk_iops_read_write': {'key': 'properties.diskIOPSReadWrite', 'type': 'long'}, + 'disk_mbps_read_write': {'key': 'properties.diskMBpsReadWrite', 'type': 'int'}, + 'disk_state': {'key': 'properties.diskState', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(Disk, self).__init__(**kwargs) + self.managed_by = None + self.sku = kwargs.get('sku', None) + self.zones = kwargs.get('zones', None) + self.time_created = None + self.os_type = kwargs.get('os_type', None) + self.hyper_vgeneration = kwargs.get('hyper_vgeneration', None) + self.creation_data = kwargs.get('creation_data', None) + self.disk_size_gb = kwargs.get('disk_size_gb', None) + self.encryption_settings_collection = kwargs.get('encryption_settings_collection', None) + self.provisioning_state = None + self.disk_iops_read_write = kwargs.get('disk_iops_read_write', None) + self.disk_mbps_read_write = kwargs.get('disk_mbps_read_write', None) + self.disk_state = None + + +class DiskSku(Model): + """The disks sku name. Can be Standard_LRS, Premium_LRS, StandardSSD_LRS, or + UltraSSD_LRS. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :param name: The sku name. Possible values include: 'Standard_LRS', + 'Premium_LRS', 'StandardSSD_LRS', 'UltraSSD_LRS' + :type name: str or + ~azure.mgmt.compute.v2018_09_30.models.DiskStorageAccountTypes + :ivar tier: The sku tier. Default value: "Standard" . + :vartype tier: str + """ + + _validation = { + 'tier': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'tier': {'key': 'tier', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(DiskSku, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.tier = None + + +class DiskUpdate(Model): + """Disk update resource. + + :param os_type: the Operating System type. Possible values include: + 'Windows', 'Linux' + :type os_type: str or + ~azure.mgmt.compute.v2018_09_30.models.OperatingSystemTypes + :param disk_size_gb: If creationData.createOption is Empty, this field is + mandatory and it indicates the size of the VHD to create. If this field is + present for updates or creation with other options, it indicates a resize. + Resizes are only allowed if the disk is not attached to a running VM, and + can only increase the disk's size. + :type disk_size_gb: int + :param encryption_settings_collection: Encryption settings collection used + be Azure Disk Encryption, can contain multiple encryption settings per + disk or snapshot. + :type encryption_settings_collection: + ~azure.mgmt.compute.v2018_09_30.models.EncryptionSettingsCollection + :param disk_iops_read_write: The number of IOPS allowed for this disk; + only settable for UltraSSD disks. One operation can transfer between 4k + and 256k bytes. + :type disk_iops_read_write: long + :param disk_mbps_read_write: The bandwidth allowed for this disk; only + settable for UltraSSD disks. MBps means millions of bytes per second - MB + here uses the ISO notation, of powers of 10. + :type disk_mbps_read_write: int + :param tags: Resource tags + :type tags: dict[str, str] + :param sku: + :type sku: ~azure.mgmt.compute.v2018_09_30.models.DiskSku + """ + + _attribute_map = { + 'os_type': {'key': 'properties.osType', 'type': 'OperatingSystemTypes'}, + 'disk_size_gb': {'key': 'properties.diskSizeGB', 'type': 'int'}, + 'encryption_settings_collection': {'key': 'properties.encryptionSettingsCollection', 'type': 'EncryptionSettingsCollection'}, + 'disk_iops_read_write': {'key': 'properties.diskIOPSReadWrite', 'type': 'long'}, + 'disk_mbps_read_write': {'key': 'properties.diskMBpsReadWrite', 'type': 'int'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'sku': {'key': 'sku', 'type': 'DiskSku'}, + } + + def __init__(self, **kwargs): + super(DiskUpdate, self).__init__(**kwargs) + self.os_type = kwargs.get('os_type', None) + self.disk_size_gb = kwargs.get('disk_size_gb', None) + self.encryption_settings_collection = kwargs.get('encryption_settings_collection', None) + self.disk_iops_read_write = kwargs.get('disk_iops_read_write', None) + self.disk_mbps_read_write = kwargs.get('disk_mbps_read_write', None) + self.tags = kwargs.get('tags', None) + self.sku = kwargs.get('sku', None) + + +class EncryptionSettingsCollection(Model): + """Encryption settings for disk or snapshot. + + All required parameters must be populated in order to send to Azure. + + :param enabled: Required. Set this flag to true and provide + DiskEncryptionKey and optional KeyEncryptionKey to enable encryption. Set + this flag to false and remove DiskEncryptionKey and KeyEncryptionKey to + disable encryption. If EncryptionSettings is null in the request object, + the existing settings remain unchanged. + :type enabled: bool + :param encryption_settings: A collection of encryption settings, one for + each disk volume. + :type encryption_settings: + list[~azure.mgmt.compute.v2018_09_30.models.EncryptionSettingsElement] + """ + + _validation = { + 'enabled': {'required': True}, + } + + _attribute_map = { + 'enabled': {'key': 'enabled', 'type': 'bool'}, + 'encryption_settings': {'key': 'encryptionSettings', 'type': '[EncryptionSettingsElement]'}, + } + + def __init__(self, **kwargs): + super(EncryptionSettingsCollection, self).__init__(**kwargs) + self.enabled = kwargs.get('enabled', None) + self.encryption_settings = kwargs.get('encryption_settings', None) + + +class EncryptionSettingsElement(Model): + """Encryption settings for one disk volume. + + :param disk_encryption_key: Key Vault Secret Url and vault id of the disk + encryption key + :type disk_encryption_key: + ~azure.mgmt.compute.v2018_09_30.models.KeyVaultAndSecretReference + :param key_encryption_key: Key Vault Key Url and vault id of the key + encryption key. KeyEncryptionKey is optional and when provided is used to + unwrap the disk encryption key. + :type key_encryption_key: + ~azure.mgmt.compute.v2018_09_30.models.KeyVaultAndKeyReference + """ + + _attribute_map = { + 'disk_encryption_key': {'key': 'diskEncryptionKey', 'type': 'KeyVaultAndSecretReference'}, + 'key_encryption_key': {'key': 'keyEncryptionKey', 'type': 'KeyVaultAndKeyReference'}, + } + + def __init__(self, **kwargs): + super(EncryptionSettingsElement, self).__init__(**kwargs) + self.disk_encryption_key = kwargs.get('disk_encryption_key', None) + self.key_encryption_key = kwargs.get('key_encryption_key', None) + + +class GrantAccessData(Model): + """Data used for requesting a SAS. + + All required parameters must be populated in order to send to Azure. + + :param access: Required. Possible values include: 'None', 'Read', 'Write' + :type access: str or ~azure.mgmt.compute.v2018_09_30.models.AccessLevel + :param duration_in_seconds: Required. Time duration in seconds until the + SAS access expires. + :type duration_in_seconds: int + """ + + _validation = { + 'access': {'required': True}, + 'duration_in_seconds': {'required': True}, + } + + _attribute_map = { + 'access': {'key': 'access', 'type': 'str'}, + 'duration_in_seconds': {'key': 'durationInSeconds', 'type': 'int'}, + } + + def __init__(self, **kwargs): + super(GrantAccessData, self).__init__(**kwargs) + self.access = kwargs.get('access', None) + self.duration_in_seconds = kwargs.get('duration_in_seconds', None) + + +class ImageDiskReference(Model): + """The source image used for creating the disk. + + All required parameters must be populated in order to send to Azure. + + :param id: Required. A relative uri containing either a Platform Image + Repository or user image reference. + :type id: str + :param lun: If the disk is created from an image's data disk, this is an + index that indicates which of the data disks in the image to use. For OS + disks, this field is null. + :type lun: int + """ + + _validation = { + 'id': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'lun': {'key': 'lun', 'type': 'int'}, + } + + def __init__(self, **kwargs): + super(ImageDiskReference, self).__init__(**kwargs) + self.id = kwargs.get('id', None) + self.lun = kwargs.get('lun', None) + + +class KeyVaultAndKeyReference(Model): + """Key Vault Key Url and vault id of KeK, KeK is optional and when provided is + used to unwrap the encryptionKey. + + All required parameters must be populated in order to send to Azure. + + :param source_vault: Required. Resource id of the KeyVault containing the + key or secret + :type source_vault: ~azure.mgmt.compute.v2018_09_30.models.SourceVault + :param key_url: Required. Url pointing to a key or secret in KeyVault + :type key_url: str + """ + + _validation = { + 'source_vault': {'required': True}, + 'key_url': {'required': True}, + } + + _attribute_map = { + 'source_vault': {'key': 'sourceVault', 'type': 'SourceVault'}, + 'key_url': {'key': 'keyUrl', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(KeyVaultAndKeyReference, self).__init__(**kwargs) + self.source_vault = kwargs.get('source_vault', None) + self.key_url = kwargs.get('key_url', None) + + +class KeyVaultAndSecretReference(Model): + """Key Vault Secret Url and vault id of the encryption key . + + All required parameters must be populated in order to send to Azure. + + :param source_vault: Required. Resource id of the KeyVault containing the + key or secret + :type source_vault: ~azure.mgmt.compute.v2018_09_30.models.SourceVault + :param secret_url: Required. Url pointing to a key or secret in KeyVault + :type secret_url: str + """ + + _validation = { + 'source_vault': {'required': True}, + 'secret_url': {'required': True}, + } + + _attribute_map = { + 'source_vault': {'key': 'sourceVault', 'type': 'SourceVault'}, + 'secret_url': {'key': 'secretUrl', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(KeyVaultAndSecretReference, self).__init__(**kwargs) + self.source_vault = kwargs.get('source_vault', None) + self.secret_url = kwargs.get('secret_url', None) + + +class Snapshot(Resource): + """Snapshot resource. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource Id + :vartype id: str + :ivar name: Resource name + :vartype name: str + :ivar type: Resource type + :vartype type: str + :param location: Required. Resource location + :type location: str + :param tags: Resource tags + :type tags: dict[str, str] + :ivar managed_by: Unused. Always Null. + :vartype managed_by: str + :param sku: + :type sku: ~azure.mgmt.compute.v2018_09_30.models.SnapshotSku + :ivar time_created: The time when the disk was created. + :vartype time_created: datetime + :param os_type: The Operating System type. Possible values include: + 'Windows', 'Linux' + :type os_type: str or + ~azure.mgmt.compute.v2018_09_30.models.OperatingSystemTypes + :param hyper_vgeneration: The hypervisor generation of the Virtual + Machine. Applicable to OS disks only. Possible values include: 'V1', 'V2' + :type hyper_vgeneration: str or + ~azure.mgmt.compute.v2018_09_30.models.HyperVGeneration + :param creation_data: Required. Disk source information. CreationData + information cannot be changed after the disk has been created. + :type creation_data: ~azure.mgmt.compute.v2018_09_30.models.CreationData + :param disk_size_gb: If creationData.createOption is Empty, this field is + mandatory and it indicates the size of the VHD to create. If this field is + present for updates or creation with other options, it indicates a resize. + Resizes are only allowed if the disk is not attached to a running VM, and + can only increase the disk's size. + :type disk_size_gb: int + :param encryption_settings_collection: Encryption settings collection used + be Azure Disk Encryption, can contain multiple encryption settings per + disk or snapshot. + :type encryption_settings_collection: + ~azure.mgmt.compute.v2018_09_30.models.EncryptionSettingsCollection + :ivar provisioning_state: The disk provisioning state. + :vartype provisioning_state: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + 'managed_by': {'readonly': True}, + 'time_created': {'readonly': True}, + 'creation_data': {'required': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'managed_by': {'key': 'managedBy', 'type': 'str'}, + 'sku': {'key': 'sku', 'type': 'SnapshotSku'}, + 'time_created': {'key': 'properties.timeCreated', 'type': 'iso-8601'}, + 'os_type': {'key': 'properties.osType', 'type': 'OperatingSystemTypes'}, + 'hyper_vgeneration': {'key': 'properties.hyperVGeneration', 'type': 'str'}, + 'creation_data': {'key': 'properties.creationData', 'type': 'CreationData'}, + 'disk_size_gb': {'key': 'properties.diskSizeGB', 'type': 'int'}, + 'encryption_settings_collection': {'key': 'properties.encryptionSettingsCollection', 'type': 'EncryptionSettingsCollection'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(Snapshot, self).__init__(**kwargs) + self.managed_by = None + self.sku = kwargs.get('sku', None) + self.time_created = None + self.os_type = kwargs.get('os_type', None) + self.hyper_vgeneration = kwargs.get('hyper_vgeneration', None) + self.creation_data = kwargs.get('creation_data', None) + self.disk_size_gb = kwargs.get('disk_size_gb', None) + self.encryption_settings_collection = kwargs.get('encryption_settings_collection', None) + self.provisioning_state = None + + +class SnapshotSku(Model): + """The snapshots sku name. Can be Standard_LRS, Premium_LRS, or Standard_ZRS. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :param name: The sku name. Possible values include: 'Standard_LRS', + 'Premium_LRS', 'Standard_ZRS' + :type name: str or + ~azure.mgmt.compute.v2018_09_30.models.SnapshotStorageAccountTypes + :ivar tier: The sku tier. Default value: "Standard" . + :vartype tier: str + """ + + _validation = { + 'tier': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'tier': {'key': 'tier', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(SnapshotSku, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.tier = None + + +class SnapshotUpdate(Model): + """Snapshot update resource. + + :param os_type: the Operating System type. Possible values include: + 'Windows', 'Linux' + :type os_type: str or + ~azure.mgmt.compute.v2018_09_30.models.OperatingSystemTypes + :param disk_size_gb: If creationData.createOption is Empty, this field is + mandatory and it indicates the size of the VHD to create. If this field is + present for updates or creation with other options, it indicates a resize. + Resizes are only allowed if the disk is not attached to a running VM, and + can only increase the disk's size. + :type disk_size_gb: int + :param encryption_settings_collection: Encryption settings collection used + be Azure Disk Encryption, can contain multiple encryption settings per + disk or snapshot. + :type encryption_settings_collection: + ~azure.mgmt.compute.v2018_09_30.models.EncryptionSettingsCollection + :param tags: Resource tags + :type tags: dict[str, str] + :param sku: + :type sku: ~azure.mgmt.compute.v2018_09_30.models.SnapshotSku + """ + + _attribute_map = { + 'os_type': {'key': 'properties.osType', 'type': 'OperatingSystemTypes'}, + 'disk_size_gb': {'key': 'properties.diskSizeGB', 'type': 'int'}, + 'encryption_settings_collection': {'key': 'properties.encryptionSettingsCollection', 'type': 'EncryptionSettingsCollection'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'sku': {'key': 'sku', 'type': 'SnapshotSku'}, + } + + def __init__(self, **kwargs): + super(SnapshotUpdate, self).__init__(**kwargs) + self.os_type = kwargs.get('os_type', None) + self.disk_size_gb = kwargs.get('disk_size_gb', None) + self.encryption_settings_collection = kwargs.get('encryption_settings_collection', None) + self.tags = kwargs.get('tags', None) + self.sku = kwargs.get('sku', None) + + +class SourceVault(Model): + """The vault id is an Azure Resource Manager Resource id in the form + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.KeyVault/vaults/{vaultName}. + + :param id: Resource Id + :type id: str + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(SourceVault, self).__init__(**kwargs) + self.id = kwargs.get('id', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_09_30/models/_models_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_09_30/models/_models_py3.py new file mode 100644 index 000000000000..05109ce34f5d --- /dev/null +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_09_30/models/_models_py3.py @@ -0,0 +1,681 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class AccessUri(Model): + """A disk access SAS uri. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar access_sas: A SAS uri for accessing a disk. + :vartype access_sas: str + """ + + _validation = { + 'access_sas': {'readonly': True}, + } + + _attribute_map = { + 'access_sas': {'key': 'accessSAS', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(AccessUri, self).__init__(**kwargs) + self.access_sas = None + + +class CloudError(Model): + """CloudError. + """ + + _attribute_map = { + } + + +class CreationData(Model): + """Data used when creating a disk. + + All required parameters must be populated in order to send to Azure. + + :param create_option: Required. This enumerates the possible sources of a + disk's creation. Possible values include: 'Empty', 'Attach', 'FromImage', + 'Import', 'Copy', 'Restore', 'Upload' + :type create_option: str or + ~azure.mgmt.compute.v2018_09_30.models.DiskCreateOption + :param storage_account_id: If createOption is Import, the Azure Resource + Manager identifier of the storage account containing the blob to import as + a disk. Required only if the blob is in a different subscription + :type storage_account_id: str + :param image_reference: Disk source information. + :type image_reference: + ~azure.mgmt.compute.v2018_09_30.models.ImageDiskReference + :param source_uri: If createOption is Import, this is the URI of a blob to + be imported into a managed disk. + :type source_uri: str + :param source_resource_id: If createOption is Copy, this is the ARM id of + the source snapshot or disk. + :type source_resource_id: str + """ + + _validation = { + 'create_option': {'required': True}, + } + + _attribute_map = { + 'create_option': {'key': 'createOption', 'type': 'str'}, + 'storage_account_id': {'key': 'storageAccountId', 'type': 'str'}, + 'image_reference': {'key': 'imageReference', 'type': 'ImageDiskReference'}, + 'source_uri': {'key': 'sourceUri', 'type': 'str'}, + 'source_resource_id': {'key': 'sourceResourceId', 'type': 'str'}, + } + + def __init__(self, *, create_option, storage_account_id: str=None, image_reference=None, source_uri: str=None, source_resource_id: str=None, **kwargs) -> None: + super(CreationData, self).__init__(**kwargs) + self.create_option = create_option + self.storage_account_id = storage_account_id + self.image_reference = image_reference + self.source_uri = source_uri + self.source_resource_id = source_resource_id + + +class Resource(Model): + """The Resource model definition. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource Id + :vartype id: str + :ivar name: Resource name + :vartype name: str + :ivar type: Resource type + :vartype type: str + :param location: Required. Resource location + :type location: str + :param tags: Resource tags + :type tags: dict[str, str] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__(self, *, location: str, tags=None, **kwargs) -> None: + super(Resource, self).__init__(**kwargs) + self.id = None + self.name = None + self.type = None + self.location = location + self.tags = tags + + +class Disk(Resource): + """Disk resource. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource Id + :vartype id: str + :ivar name: Resource name + :vartype name: str + :ivar type: Resource type + :vartype type: str + :param location: Required. Resource location + :type location: str + :param tags: Resource tags + :type tags: dict[str, str] + :ivar managed_by: A relative URI containing the ID of the VM that has the + disk attached. + :vartype managed_by: str + :param sku: + :type sku: ~azure.mgmt.compute.v2018_09_30.models.DiskSku + :param zones: The Logical zone list for Disk. + :type zones: list[str] + :ivar time_created: The time when the disk was created. + :vartype time_created: datetime + :param os_type: The Operating System type. Possible values include: + 'Windows', 'Linux' + :type os_type: str or + ~azure.mgmt.compute.v2018_09_30.models.OperatingSystemTypes + :param hyper_vgeneration: The hypervisor generation of the Virtual + Machine. Applicable to OS disks only. Possible values include: 'V1', 'V2' + :type hyper_vgeneration: str or + ~azure.mgmt.compute.v2018_09_30.models.HyperVGeneration + :param creation_data: Required. Disk source information. CreationData + information cannot be changed after the disk has been created. + :type creation_data: ~azure.mgmt.compute.v2018_09_30.models.CreationData + :param disk_size_gb: If creationData.createOption is Empty, this field is + mandatory and it indicates the size of the VHD to create. If this field is + present for updates or creation with other options, it indicates a resize. + Resizes are only allowed if the disk is not attached to a running VM, and + can only increase the disk's size. + :type disk_size_gb: int + :param encryption_settings_collection: Encryption settings collection used + for Azure Disk Encryption, can contain multiple encryption settings per + disk or snapshot. + :type encryption_settings_collection: + ~azure.mgmt.compute.v2018_09_30.models.EncryptionSettingsCollection + :ivar provisioning_state: The disk provisioning state. + :vartype provisioning_state: str + :param disk_iops_read_write: The number of IOPS allowed for this disk; + only settable for UltraSSD disks. One operation can transfer between 4k + and 256k bytes. + :type disk_iops_read_write: long + :param disk_mbps_read_write: The bandwidth allowed for this disk; only + settable for UltraSSD disks. MBps means millions of bytes per second - MB + here uses the ISO notation, of powers of 10. + :type disk_mbps_read_write: int + :ivar disk_state: The state of the disk. Possible values include: + 'Unattached', 'Attached', 'Reserved', 'ActiveSAS', 'ReadyToUpload', + 'ActiveUpload' + :vartype disk_state: str or + ~azure.mgmt.compute.v2018_09_30.models.DiskState + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + 'managed_by': {'readonly': True}, + 'time_created': {'readonly': True}, + 'creation_data': {'required': True}, + 'provisioning_state': {'readonly': True}, + 'disk_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'managed_by': {'key': 'managedBy', 'type': 'str'}, + 'sku': {'key': 'sku', 'type': 'DiskSku'}, + 'zones': {'key': 'zones', 'type': '[str]'}, + 'time_created': {'key': 'properties.timeCreated', 'type': 'iso-8601'}, + 'os_type': {'key': 'properties.osType', 'type': 'OperatingSystemTypes'}, + 'hyper_vgeneration': {'key': 'properties.hyperVGeneration', 'type': 'str'}, + 'creation_data': {'key': 'properties.creationData', 'type': 'CreationData'}, + 'disk_size_gb': {'key': 'properties.diskSizeGB', 'type': 'int'}, + 'encryption_settings_collection': {'key': 'properties.encryptionSettingsCollection', 'type': 'EncryptionSettingsCollection'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'disk_iops_read_write': {'key': 'properties.diskIOPSReadWrite', 'type': 'long'}, + 'disk_mbps_read_write': {'key': 'properties.diskMBpsReadWrite', 'type': 'int'}, + 'disk_state': {'key': 'properties.diskState', 'type': 'str'}, + } + + def __init__(self, *, location: str, creation_data, tags=None, sku=None, zones=None, os_type=None, hyper_vgeneration=None, disk_size_gb: int=None, encryption_settings_collection=None, disk_iops_read_write: int=None, disk_mbps_read_write: int=None, **kwargs) -> None: + super(Disk, self).__init__(location=location, tags=tags, **kwargs) + self.managed_by = None + self.sku = sku + self.zones = zones + self.time_created = None + self.os_type = os_type + self.hyper_vgeneration = hyper_vgeneration + self.creation_data = creation_data + self.disk_size_gb = disk_size_gb + self.encryption_settings_collection = encryption_settings_collection + self.provisioning_state = None + self.disk_iops_read_write = disk_iops_read_write + self.disk_mbps_read_write = disk_mbps_read_write + self.disk_state = None + + +class DiskSku(Model): + """The disks sku name. Can be Standard_LRS, Premium_LRS, StandardSSD_LRS, or + UltraSSD_LRS. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :param name: The sku name. Possible values include: 'Standard_LRS', + 'Premium_LRS', 'StandardSSD_LRS', 'UltraSSD_LRS' + :type name: str or + ~azure.mgmt.compute.v2018_09_30.models.DiskStorageAccountTypes + :ivar tier: The sku tier. Default value: "Standard" . + :vartype tier: str + """ + + _validation = { + 'tier': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'tier': {'key': 'tier', 'type': 'str'}, + } + + def __init__(self, *, name=None, **kwargs) -> None: + super(DiskSku, self).__init__(**kwargs) + self.name = name + self.tier = None + + +class DiskUpdate(Model): + """Disk update resource. + + :param os_type: the Operating System type. Possible values include: + 'Windows', 'Linux' + :type os_type: str or + ~azure.mgmt.compute.v2018_09_30.models.OperatingSystemTypes + :param disk_size_gb: If creationData.createOption is Empty, this field is + mandatory and it indicates the size of the VHD to create. If this field is + present for updates or creation with other options, it indicates a resize. + Resizes are only allowed if the disk is not attached to a running VM, and + can only increase the disk's size. + :type disk_size_gb: int + :param encryption_settings_collection: Encryption settings collection used + be Azure Disk Encryption, can contain multiple encryption settings per + disk or snapshot. + :type encryption_settings_collection: + ~azure.mgmt.compute.v2018_09_30.models.EncryptionSettingsCollection + :param disk_iops_read_write: The number of IOPS allowed for this disk; + only settable for UltraSSD disks. One operation can transfer between 4k + and 256k bytes. + :type disk_iops_read_write: long + :param disk_mbps_read_write: The bandwidth allowed for this disk; only + settable for UltraSSD disks. MBps means millions of bytes per second - MB + here uses the ISO notation, of powers of 10. + :type disk_mbps_read_write: int + :param tags: Resource tags + :type tags: dict[str, str] + :param sku: + :type sku: ~azure.mgmt.compute.v2018_09_30.models.DiskSku + """ + + _attribute_map = { + 'os_type': {'key': 'properties.osType', 'type': 'OperatingSystemTypes'}, + 'disk_size_gb': {'key': 'properties.diskSizeGB', 'type': 'int'}, + 'encryption_settings_collection': {'key': 'properties.encryptionSettingsCollection', 'type': 'EncryptionSettingsCollection'}, + 'disk_iops_read_write': {'key': 'properties.diskIOPSReadWrite', 'type': 'long'}, + 'disk_mbps_read_write': {'key': 'properties.diskMBpsReadWrite', 'type': 'int'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'sku': {'key': 'sku', 'type': 'DiskSku'}, + } + + def __init__(self, *, os_type=None, disk_size_gb: int=None, encryption_settings_collection=None, disk_iops_read_write: int=None, disk_mbps_read_write: int=None, tags=None, sku=None, **kwargs) -> None: + super(DiskUpdate, self).__init__(**kwargs) + self.os_type = os_type + self.disk_size_gb = disk_size_gb + self.encryption_settings_collection = encryption_settings_collection + self.disk_iops_read_write = disk_iops_read_write + self.disk_mbps_read_write = disk_mbps_read_write + self.tags = tags + self.sku = sku + + +class EncryptionSettingsCollection(Model): + """Encryption settings for disk or snapshot. + + All required parameters must be populated in order to send to Azure. + + :param enabled: Required. Set this flag to true and provide + DiskEncryptionKey and optional KeyEncryptionKey to enable encryption. Set + this flag to false and remove DiskEncryptionKey and KeyEncryptionKey to + disable encryption. If EncryptionSettings is null in the request object, + the existing settings remain unchanged. + :type enabled: bool + :param encryption_settings: A collection of encryption settings, one for + each disk volume. + :type encryption_settings: + list[~azure.mgmt.compute.v2018_09_30.models.EncryptionSettingsElement] + """ + + _validation = { + 'enabled': {'required': True}, + } + + _attribute_map = { + 'enabled': {'key': 'enabled', 'type': 'bool'}, + 'encryption_settings': {'key': 'encryptionSettings', 'type': '[EncryptionSettingsElement]'}, + } + + def __init__(self, *, enabled: bool, encryption_settings=None, **kwargs) -> None: + super(EncryptionSettingsCollection, self).__init__(**kwargs) + self.enabled = enabled + self.encryption_settings = encryption_settings + + +class EncryptionSettingsElement(Model): + """Encryption settings for one disk volume. + + :param disk_encryption_key: Key Vault Secret Url and vault id of the disk + encryption key + :type disk_encryption_key: + ~azure.mgmt.compute.v2018_09_30.models.KeyVaultAndSecretReference + :param key_encryption_key: Key Vault Key Url and vault id of the key + encryption key. KeyEncryptionKey is optional and when provided is used to + unwrap the disk encryption key. + :type key_encryption_key: + ~azure.mgmt.compute.v2018_09_30.models.KeyVaultAndKeyReference + """ + + _attribute_map = { + 'disk_encryption_key': {'key': 'diskEncryptionKey', 'type': 'KeyVaultAndSecretReference'}, + 'key_encryption_key': {'key': 'keyEncryptionKey', 'type': 'KeyVaultAndKeyReference'}, + } + + def __init__(self, *, disk_encryption_key=None, key_encryption_key=None, **kwargs) -> None: + super(EncryptionSettingsElement, self).__init__(**kwargs) + self.disk_encryption_key = disk_encryption_key + self.key_encryption_key = key_encryption_key + + +class GrantAccessData(Model): + """Data used for requesting a SAS. + + All required parameters must be populated in order to send to Azure. + + :param access: Required. Possible values include: 'None', 'Read', 'Write' + :type access: str or ~azure.mgmt.compute.v2018_09_30.models.AccessLevel + :param duration_in_seconds: Required. Time duration in seconds until the + SAS access expires. + :type duration_in_seconds: int + """ + + _validation = { + 'access': {'required': True}, + 'duration_in_seconds': {'required': True}, + } + + _attribute_map = { + 'access': {'key': 'access', 'type': 'str'}, + 'duration_in_seconds': {'key': 'durationInSeconds', 'type': 'int'}, + } + + def __init__(self, *, access, duration_in_seconds: int, **kwargs) -> None: + super(GrantAccessData, self).__init__(**kwargs) + self.access = access + self.duration_in_seconds = duration_in_seconds + + +class ImageDiskReference(Model): + """The source image used for creating the disk. + + All required parameters must be populated in order to send to Azure. + + :param id: Required. A relative uri containing either a Platform Image + Repository or user image reference. + :type id: str + :param lun: If the disk is created from an image's data disk, this is an + index that indicates which of the data disks in the image to use. For OS + disks, this field is null. + :type lun: int + """ + + _validation = { + 'id': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'lun': {'key': 'lun', 'type': 'int'}, + } + + def __init__(self, *, id: str, lun: int=None, **kwargs) -> None: + super(ImageDiskReference, self).__init__(**kwargs) + self.id = id + self.lun = lun + + +class KeyVaultAndKeyReference(Model): + """Key Vault Key Url and vault id of KeK, KeK is optional and when provided is + used to unwrap the encryptionKey. + + All required parameters must be populated in order to send to Azure. + + :param source_vault: Required. Resource id of the KeyVault containing the + key or secret + :type source_vault: ~azure.mgmt.compute.v2018_09_30.models.SourceVault + :param key_url: Required. Url pointing to a key or secret in KeyVault + :type key_url: str + """ + + _validation = { + 'source_vault': {'required': True}, + 'key_url': {'required': True}, + } + + _attribute_map = { + 'source_vault': {'key': 'sourceVault', 'type': 'SourceVault'}, + 'key_url': {'key': 'keyUrl', 'type': 'str'}, + } + + def __init__(self, *, source_vault, key_url: str, **kwargs) -> None: + super(KeyVaultAndKeyReference, self).__init__(**kwargs) + self.source_vault = source_vault + self.key_url = key_url + + +class KeyVaultAndSecretReference(Model): + """Key Vault Secret Url and vault id of the encryption key . + + All required parameters must be populated in order to send to Azure. + + :param source_vault: Required. Resource id of the KeyVault containing the + key or secret + :type source_vault: ~azure.mgmt.compute.v2018_09_30.models.SourceVault + :param secret_url: Required. Url pointing to a key or secret in KeyVault + :type secret_url: str + """ + + _validation = { + 'source_vault': {'required': True}, + 'secret_url': {'required': True}, + } + + _attribute_map = { + 'source_vault': {'key': 'sourceVault', 'type': 'SourceVault'}, + 'secret_url': {'key': 'secretUrl', 'type': 'str'}, + } + + def __init__(self, *, source_vault, secret_url: str, **kwargs) -> None: + super(KeyVaultAndSecretReference, self).__init__(**kwargs) + self.source_vault = source_vault + self.secret_url = secret_url + + +class Snapshot(Resource): + """Snapshot resource. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource Id + :vartype id: str + :ivar name: Resource name + :vartype name: str + :ivar type: Resource type + :vartype type: str + :param location: Required. Resource location + :type location: str + :param tags: Resource tags + :type tags: dict[str, str] + :ivar managed_by: Unused. Always Null. + :vartype managed_by: str + :param sku: + :type sku: ~azure.mgmt.compute.v2018_09_30.models.SnapshotSku + :ivar time_created: The time when the disk was created. + :vartype time_created: datetime + :param os_type: The Operating System type. Possible values include: + 'Windows', 'Linux' + :type os_type: str or + ~azure.mgmt.compute.v2018_09_30.models.OperatingSystemTypes + :param hyper_vgeneration: The hypervisor generation of the Virtual + Machine. Applicable to OS disks only. Possible values include: 'V1', 'V2' + :type hyper_vgeneration: str or + ~azure.mgmt.compute.v2018_09_30.models.HyperVGeneration + :param creation_data: Required. Disk source information. CreationData + information cannot be changed after the disk has been created. + :type creation_data: ~azure.mgmt.compute.v2018_09_30.models.CreationData + :param disk_size_gb: If creationData.createOption is Empty, this field is + mandatory and it indicates the size of the VHD to create. If this field is + present for updates or creation with other options, it indicates a resize. + Resizes are only allowed if the disk is not attached to a running VM, and + can only increase the disk's size. + :type disk_size_gb: int + :param encryption_settings_collection: Encryption settings collection used + be Azure Disk Encryption, can contain multiple encryption settings per + disk or snapshot. + :type encryption_settings_collection: + ~azure.mgmt.compute.v2018_09_30.models.EncryptionSettingsCollection + :ivar provisioning_state: The disk provisioning state. + :vartype provisioning_state: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + 'managed_by': {'readonly': True}, + 'time_created': {'readonly': True}, + 'creation_data': {'required': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'managed_by': {'key': 'managedBy', 'type': 'str'}, + 'sku': {'key': 'sku', 'type': 'SnapshotSku'}, + 'time_created': {'key': 'properties.timeCreated', 'type': 'iso-8601'}, + 'os_type': {'key': 'properties.osType', 'type': 'OperatingSystemTypes'}, + 'hyper_vgeneration': {'key': 'properties.hyperVGeneration', 'type': 'str'}, + 'creation_data': {'key': 'properties.creationData', 'type': 'CreationData'}, + 'disk_size_gb': {'key': 'properties.diskSizeGB', 'type': 'int'}, + 'encryption_settings_collection': {'key': 'properties.encryptionSettingsCollection', 'type': 'EncryptionSettingsCollection'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + } + + def __init__(self, *, location: str, creation_data, tags=None, sku=None, os_type=None, hyper_vgeneration=None, disk_size_gb: int=None, encryption_settings_collection=None, **kwargs) -> None: + super(Snapshot, self).__init__(location=location, tags=tags, **kwargs) + self.managed_by = None + self.sku = sku + self.time_created = None + self.os_type = os_type + self.hyper_vgeneration = hyper_vgeneration + self.creation_data = creation_data + self.disk_size_gb = disk_size_gb + self.encryption_settings_collection = encryption_settings_collection + self.provisioning_state = None + + +class SnapshotSku(Model): + """The snapshots sku name. Can be Standard_LRS, Premium_LRS, or Standard_ZRS. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :param name: The sku name. Possible values include: 'Standard_LRS', + 'Premium_LRS', 'Standard_ZRS' + :type name: str or + ~azure.mgmt.compute.v2018_09_30.models.SnapshotStorageAccountTypes + :ivar tier: The sku tier. Default value: "Standard" . + :vartype tier: str + """ + + _validation = { + 'tier': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'tier': {'key': 'tier', 'type': 'str'}, + } + + def __init__(self, *, name=None, **kwargs) -> None: + super(SnapshotSku, self).__init__(**kwargs) + self.name = name + self.tier = None + + +class SnapshotUpdate(Model): + """Snapshot update resource. + + :param os_type: the Operating System type. Possible values include: + 'Windows', 'Linux' + :type os_type: str or + ~azure.mgmt.compute.v2018_09_30.models.OperatingSystemTypes + :param disk_size_gb: If creationData.createOption is Empty, this field is + mandatory and it indicates the size of the VHD to create. If this field is + present for updates or creation with other options, it indicates a resize. + Resizes are only allowed if the disk is not attached to a running VM, and + can only increase the disk's size. + :type disk_size_gb: int + :param encryption_settings_collection: Encryption settings collection used + be Azure Disk Encryption, can contain multiple encryption settings per + disk or snapshot. + :type encryption_settings_collection: + ~azure.mgmt.compute.v2018_09_30.models.EncryptionSettingsCollection + :param tags: Resource tags + :type tags: dict[str, str] + :param sku: + :type sku: ~azure.mgmt.compute.v2018_09_30.models.SnapshotSku + """ + + _attribute_map = { + 'os_type': {'key': 'properties.osType', 'type': 'OperatingSystemTypes'}, + 'disk_size_gb': {'key': 'properties.diskSizeGB', 'type': 'int'}, + 'encryption_settings_collection': {'key': 'properties.encryptionSettingsCollection', 'type': 'EncryptionSettingsCollection'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'sku': {'key': 'sku', 'type': 'SnapshotSku'}, + } + + def __init__(self, *, os_type=None, disk_size_gb: int=None, encryption_settings_collection=None, tags=None, sku=None, **kwargs) -> None: + super(SnapshotUpdate, self).__init__(**kwargs) + self.os_type = os_type + self.disk_size_gb = disk_size_gb + self.encryption_settings_collection = encryption_settings_collection + self.tags = tags + self.sku = sku + + +class SourceVault(Model): + """The vault id is an Azure Resource Manager Resource id in the form + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.KeyVault/vaults/{vaultName}. + + :param id: Resource Id + :type id: str + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + } + + def __init__(self, *, id: str=None, **kwargs) -> None: + super(SourceVault, self).__init__(**kwargs) + self.id = id diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_09_30/models/_paged_models.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_09_30/models/_paged_models.py new file mode 100644 index 000000000000..c60b7a699b57 --- /dev/null +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_09_30/models/_paged_models.py @@ -0,0 +1,40 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.paging import Paged + + +class DiskPaged(Paged): + """ + A paging container for iterating over a list of :class:`Disk ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[Disk]'} + } + + def __init__(self, *args, **kwargs): + + super(DiskPaged, self).__init__(*args, **kwargs) +class SnapshotPaged(Paged): + """ + A paging container for iterating over a list of :class:`Snapshot ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[Snapshot]'} + } + + def __init__(self, *args, **kwargs): + + super(SnapshotPaged, self).__init__(*args, **kwargs) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_09_30/models/access_uri.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_09_30/models/access_uri.py deleted file mode 100644 index fec7ad1244ab..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_09_30/models/access_uri.py +++ /dev/null @@ -1,35 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class AccessUri(Model): - """A disk access SAS uri. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar access_sas: A SAS uri for accessing a disk. - :vartype access_sas: str - """ - - _validation = { - 'access_sas': {'readonly': True}, - } - - _attribute_map = { - 'access_sas': {'key': 'accessSAS', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(AccessUri, self).__init__(**kwargs) - self.access_sas = None diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_09_30/models/access_uri_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_09_30/models/access_uri_py3.py deleted file mode 100644 index c13208a20d8d..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_09_30/models/access_uri_py3.py +++ /dev/null @@ -1,35 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class AccessUri(Model): - """A disk access SAS uri. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar access_sas: A SAS uri for accessing a disk. - :vartype access_sas: str - """ - - _validation = { - 'access_sas': {'readonly': True}, - } - - _attribute_map = { - 'access_sas': {'key': 'accessSAS', 'type': 'str'}, - } - - def __init__(self, **kwargs) -> None: - super(AccessUri, self).__init__(**kwargs) - self.access_sas = None diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_09_30/models/creation_data.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_09_30/models/creation_data.py deleted file mode 100644 index 33634a51c521..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_09_30/models/creation_data.py +++ /dev/null @@ -1,58 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class CreationData(Model): - """Data used when creating a disk. - - All required parameters must be populated in order to send to Azure. - - :param create_option: Required. This enumerates the possible sources of a - disk's creation. Possible values include: 'Empty', 'Attach', 'FromImage', - 'Import', 'Copy', 'Restore', 'Upload' - :type create_option: str or - ~azure.mgmt.compute.v2018_09_30.models.DiskCreateOption - :param storage_account_id: If createOption is Import, the Azure Resource - Manager identifier of the storage account containing the blob to import as - a disk. Required only if the blob is in a different subscription - :type storage_account_id: str - :param image_reference: Disk source information. - :type image_reference: - ~azure.mgmt.compute.v2018_09_30.models.ImageDiskReference - :param source_uri: If createOption is Import, this is the URI of a blob to - be imported into a managed disk. - :type source_uri: str - :param source_resource_id: If createOption is Copy, this is the ARM id of - the source snapshot or disk. - :type source_resource_id: str - """ - - _validation = { - 'create_option': {'required': True}, - } - - _attribute_map = { - 'create_option': {'key': 'createOption', 'type': 'str'}, - 'storage_account_id': {'key': 'storageAccountId', 'type': 'str'}, - 'image_reference': {'key': 'imageReference', 'type': 'ImageDiskReference'}, - 'source_uri': {'key': 'sourceUri', 'type': 'str'}, - 'source_resource_id': {'key': 'sourceResourceId', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(CreationData, self).__init__(**kwargs) - self.create_option = kwargs.get('create_option', None) - self.storage_account_id = kwargs.get('storage_account_id', None) - self.image_reference = kwargs.get('image_reference', None) - self.source_uri = kwargs.get('source_uri', None) - self.source_resource_id = kwargs.get('source_resource_id', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_09_30/models/creation_data_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_09_30/models/creation_data_py3.py deleted file mode 100644 index 8c7f3fe34caa..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_09_30/models/creation_data_py3.py +++ /dev/null @@ -1,58 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class CreationData(Model): - """Data used when creating a disk. - - All required parameters must be populated in order to send to Azure. - - :param create_option: Required. This enumerates the possible sources of a - disk's creation. Possible values include: 'Empty', 'Attach', 'FromImage', - 'Import', 'Copy', 'Restore', 'Upload' - :type create_option: str or - ~azure.mgmt.compute.v2018_09_30.models.DiskCreateOption - :param storage_account_id: If createOption is Import, the Azure Resource - Manager identifier of the storage account containing the blob to import as - a disk. Required only if the blob is in a different subscription - :type storage_account_id: str - :param image_reference: Disk source information. - :type image_reference: - ~azure.mgmt.compute.v2018_09_30.models.ImageDiskReference - :param source_uri: If createOption is Import, this is the URI of a blob to - be imported into a managed disk. - :type source_uri: str - :param source_resource_id: If createOption is Copy, this is the ARM id of - the source snapshot or disk. - :type source_resource_id: str - """ - - _validation = { - 'create_option': {'required': True}, - } - - _attribute_map = { - 'create_option': {'key': 'createOption', 'type': 'str'}, - 'storage_account_id': {'key': 'storageAccountId', 'type': 'str'}, - 'image_reference': {'key': 'imageReference', 'type': 'ImageDiskReference'}, - 'source_uri': {'key': 'sourceUri', 'type': 'str'}, - 'source_resource_id': {'key': 'sourceResourceId', 'type': 'str'}, - } - - def __init__(self, *, create_option, storage_account_id: str=None, image_reference=None, source_uri: str=None, source_resource_id: str=None, **kwargs) -> None: - super(CreationData, self).__init__(**kwargs) - self.create_option = create_option - self.storage_account_id = storage_account_id - self.image_reference = image_reference - self.source_uri = source_uri - self.source_resource_id = source_resource_id diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_09_30/models/disk.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_09_30/models/disk.py deleted file mode 100644 index d81ee7f38408..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_09_30/models/disk.py +++ /dev/null @@ -1,128 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource import Resource - - -class Disk(Resource): - """Disk resource. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource Id - :vartype id: str - :ivar name: Resource name - :vartype name: str - :ivar type: Resource type - :vartype type: str - :param location: Required. Resource location - :type location: str - :param tags: Resource tags - :type tags: dict[str, str] - :ivar managed_by: A relative URI containing the ID of the VM that has the - disk attached. - :vartype managed_by: str - :param sku: - :type sku: ~azure.mgmt.compute.v2018_09_30.models.DiskSku - :param zones: The Logical zone list for Disk. - :type zones: list[str] - :ivar time_created: The time when the disk was created. - :vartype time_created: datetime - :param os_type: The Operating System type. Possible values include: - 'Windows', 'Linux' - :type os_type: str or - ~azure.mgmt.compute.v2018_09_30.models.OperatingSystemTypes - :param hyper_vgeneration: The hypervisor generation of the Virtual - Machine. Applicable to OS disks only. Possible values include: 'V1', 'V2' - :type hyper_vgeneration: str or - ~azure.mgmt.compute.v2018_09_30.models.HyperVGeneration - :param creation_data: Required. Disk source information. CreationData - information cannot be changed after the disk has been created. - :type creation_data: ~azure.mgmt.compute.v2018_09_30.models.CreationData - :param disk_size_gb: If creationData.createOption is Empty, this field is - mandatory and it indicates the size of the VHD to create. If this field is - present for updates or creation with other options, it indicates a resize. - Resizes are only allowed if the disk is not attached to a running VM, and - can only increase the disk's size. - :type disk_size_gb: int - :param encryption_settings_collection: Encryption settings collection used - for Azure Disk Encryption, can contain multiple encryption settings per - disk or snapshot. - :type encryption_settings_collection: - ~azure.mgmt.compute.v2018_09_30.models.EncryptionSettingsCollection - :ivar provisioning_state: The disk provisioning state. - :vartype provisioning_state: str - :param disk_iops_read_write: The number of IOPS allowed for this disk; - only settable for UltraSSD disks. One operation can transfer between 4k - and 256k bytes. - :type disk_iops_read_write: long - :param disk_mbps_read_write: The bandwidth allowed for this disk; only - settable for UltraSSD disks. MBps means millions of bytes per second - MB - here uses the ISO notation, of powers of 10. - :type disk_mbps_read_write: int - :ivar disk_state: The state of the disk. Possible values include: - 'Unattached', 'Attached', 'Reserved', 'ActiveSAS', 'ReadyToUpload', - 'ActiveUpload' - :vartype disk_state: str or - ~azure.mgmt.compute.v2018_09_30.models.DiskState - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - 'managed_by': {'readonly': True}, - 'time_created': {'readonly': True}, - 'creation_data': {'required': True}, - 'provisioning_state': {'readonly': True}, - 'disk_state': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'managed_by': {'key': 'managedBy', 'type': 'str'}, - 'sku': {'key': 'sku', 'type': 'DiskSku'}, - 'zones': {'key': 'zones', 'type': '[str]'}, - 'time_created': {'key': 'properties.timeCreated', 'type': 'iso-8601'}, - 'os_type': {'key': 'properties.osType', 'type': 'OperatingSystemTypes'}, - 'hyper_vgeneration': {'key': 'properties.hyperVGeneration', 'type': 'str'}, - 'creation_data': {'key': 'properties.creationData', 'type': 'CreationData'}, - 'disk_size_gb': {'key': 'properties.diskSizeGB', 'type': 'int'}, - 'encryption_settings_collection': {'key': 'properties.encryptionSettingsCollection', 'type': 'EncryptionSettingsCollection'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'disk_iops_read_write': {'key': 'properties.diskIOPSReadWrite', 'type': 'long'}, - 'disk_mbps_read_write': {'key': 'properties.diskMBpsReadWrite', 'type': 'int'}, - 'disk_state': {'key': 'properties.diskState', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(Disk, self).__init__(**kwargs) - self.managed_by = None - self.sku = kwargs.get('sku', None) - self.zones = kwargs.get('zones', None) - self.time_created = None - self.os_type = kwargs.get('os_type', None) - self.hyper_vgeneration = kwargs.get('hyper_vgeneration', None) - self.creation_data = kwargs.get('creation_data', None) - self.disk_size_gb = kwargs.get('disk_size_gb', None) - self.encryption_settings_collection = kwargs.get('encryption_settings_collection', None) - self.provisioning_state = None - self.disk_iops_read_write = kwargs.get('disk_iops_read_write', None) - self.disk_mbps_read_write = kwargs.get('disk_mbps_read_write', None) - self.disk_state = None diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_09_30/models/disk_paged.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_09_30/models/disk_paged.py deleted file mode 100644 index d05b36f4cf07..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_09_30/models/disk_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class DiskPaged(Paged): - """ - A paging container for iterating over a list of :class:`Disk ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[Disk]'} - } - - def __init__(self, *args, **kwargs): - - super(DiskPaged, self).__init__(*args, **kwargs) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_09_30/models/disk_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_09_30/models/disk_py3.py deleted file mode 100644 index faeea4e25eeb..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_09_30/models/disk_py3.py +++ /dev/null @@ -1,128 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource_py3 import Resource - - -class Disk(Resource): - """Disk resource. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource Id - :vartype id: str - :ivar name: Resource name - :vartype name: str - :ivar type: Resource type - :vartype type: str - :param location: Required. Resource location - :type location: str - :param tags: Resource tags - :type tags: dict[str, str] - :ivar managed_by: A relative URI containing the ID of the VM that has the - disk attached. - :vartype managed_by: str - :param sku: - :type sku: ~azure.mgmt.compute.v2018_09_30.models.DiskSku - :param zones: The Logical zone list for Disk. - :type zones: list[str] - :ivar time_created: The time when the disk was created. - :vartype time_created: datetime - :param os_type: The Operating System type. Possible values include: - 'Windows', 'Linux' - :type os_type: str or - ~azure.mgmt.compute.v2018_09_30.models.OperatingSystemTypes - :param hyper_vgeneration: The hypervisor generation of the Virtual - Machine. Applicable to OS disks only. Possible values include: 'V1', 'V2' - :type hyper_vgeneration: str or - ~azure.mgmt.compute.v2018_09_30.models.HyperVGeneration - :param creation_data: Required. Disk source information. CreationData - information cannot be changed after the disk has been created. - :type creation_data: ~azure.mgmt.compute.v2018_09_30.models.CreationData - :param disk_size_gb: If creationData.createOption is Empty, this field is - mandatory and it indicates the size of the VHD to create. If this field is - present for updates or creation with other options, it indicates a resize. - Resizes are only allowed if the disk is not attached to a running VM, and - can only increase the disk's size. - :type disk_size_gb: int - :param encryption_settings_collection: Encryption settings collection used - for Azure Disk Encryption, can contain multiple encryption settings per - disk or snapshot. - :type encryption_settings_collection: - ~azure.mgmt.compute.v2018_09_30.models.EncryptionSettingsCollection - :ivar provisioning_state: The disk provisioning state. - :vartype provisioning_state: str - :param disk_iops_read_write: The number of IOPS allowed for this disk; - only settable for UltraSSD disks. One operation can transfer between 4k - and 256k bytes. - :type disk_iops_read_write: long - :param disk_mbps_read_write: The bandwidth allowed for this disk; only - settable for UltraSSD disks. MBps means millions of bytes per second - MB - here uses the ISO notation, of powers of 10. - :type disk_mbps_read_write: int - :ivar disk_state: The state of the disk. Possible values include: - 'Unattached', 'Attached', 'Reserved', 'ActiveSAS', 'ReadyToUpload', - 'ActiveUpload' - :vartype disk_state: str or - ~azure.mgmt.compute.v2018_09_30.models.DiskState - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - 'managed_by': {'readonly': True}, - 'time_created': {'readonly': True}, - 'creation_data': {'required': True}, - 'provisioning_state': {'readonly': True}, - 'disk_state': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'managed_by': {'key': 'managedBy', 'type': 'str'}, - 'sku': {'key': 'sku', 'type': 'DiskSku'}, - 'zones': {'key': 'zones', 'type': '[str]'}, - 'time_created': {'key': 'properties.timeCreated', 'type': 'iso-8601'}, - 'os_type': {'key': 'properties.osType', 'type': 'OperatingSystemTypes'}, - 'hyper_vgeneration': {'key': 'properties.hyperVGeneration', 'type': 'str'}, - 'creation_data': {'key': 'properties.creationData', 'type': 'CreationData'}, - 'disk_size_gb': {'key': 'properties.diskSizeGB', 'type': 'int'}, - 'encryption_settings_collection': {'key': 'properties.encryptionSettingsCollection', 'type': 'EncryptionSettingsCollection'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'disk_iops_read_write': {'key': 'properties.diskIOPSReadWrite', 'type': 'long'}, - 'disk_mbps_read_write': {'key': 'properties.diskMBpsReadWrite', 'type': 'int'}, - 'disk_state': {'key': 'properties.diskState', 'type': 'str'}, - } - - def __init__(self, *, location: str, creation_data, tags=None, sku=None, zones=None, os_type=None, hyper_vgeneration=None, disk_size_gb: int=None, encryption_settings_collection=None, disk_iops_read_write: int=None, disk_mbps_read_write: int=None, **kwargs) -> None: - super(Disk, self).__init__(location=location, tags=tags, **kwargs) - self.managed_by = None - self.sku = sku - self.zones = zones - self.time_created = None - self.os_type = os_type - self.hyper_vgeneration = hyper_vgeneration - self.creation_data = creation_data - self.disk_size_gb = disk_size_gb - self.encryption_settings_collection = encryption_settings_collection - self.provisioning_state = None - self.disk_iops_read_write = disk_iops_read_write - self.disk_mbps_read_write = disk_mbps_read_write - self.disk_state = None diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_09_30/models/disk_sku.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_09_30/models/disk_sku.py deleted file mode 100644 index 824af5977079..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_09_30/models/disk_sku.py +++ /dev/null @@ -1,42 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class DiskSku(Model): - """The disks sku name. Can be Standard_LRS, Premium_LRS, StandardSSD_LRS, or - UltraSSD_LRS. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :param name: The sku name. Possible values include: 'Standard_LRS', - 'Premium_LRS', 'StandardSSD_LRS', 'UltraSSD_LRS' - :type name: str or - ~azure.mgmt.compute.v2018_09_30.models.DiskStorageAccountTypes - :ivar tier: The sku tier. Default value: "Standard" . - :vartype tier: str - """ - - _validation = { - 'tier': {'readonly': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'tier': {'key': 'tier', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(DiskSku, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.tier = None diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_09_30/models/disk_sku_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_09_30/models/disk_sku_py3.py deleted file mode 100644 index 0515aed691db..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_09_30/models/disk_sku_py3.py +++ /dev/null @@ -1,42 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class DiskSku(Model): - """The disks sku name. Can be Standard_LRS, Premium_LRS, StandardSSD_LRS, or - UltraSSD_LRS. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :param name: The sku name. Possible values include: 'Standard_LRS', - 'Premium_LRS', 'StandardSSD_LRS', 'UltraSSD_LRS' - :type name: str or - ~azure.mgmt.compute.v2018_09_30.models.DiskStorageAccountTypes - :ivar tier: The sku tier. Default value: "Standard" . - :vartype tier: str - """ - - _validation = { - 'tier': {'readonly': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'tier': {'key': 'tier', 'type': 'str'}, - } - - def __init__(self, *, name=None, **kwargs) -> None: - super(DiskSku, self).__init__(**kwargs) - self.name = name - self.tier = None diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_09_30/models/disk_update.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_09_30/models/disk_update.py deleted file mode 100644 index f9cb17aa1c48..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_09_30/models/disk_update.py +++ /dev/null @@ -1,65 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class DiskUpdate(Model): - """Disk update resource. - - :param os_type: the Operating System type. Possible values include: - 'Windows', 'Linux' - :type os_type: str or - ~azure.mgmt.compute.v2018_09_30.models.OperatingSystemTypes - :param disk_size_gb: If creationData.createOption is Empty, this field is - mandatory and it indicates the size of the VHD to create. If this field is - present for updates or creation with other options, it indicates a resize. - Resizes are only allowed if the disk is not attached to a running VM, and - can only increase the disk's size. - :type disk_size_gb: int - :param encryption_settings_collection: Encryption settings collection used - be Azure Disk Encryption, can contain multiple encryption settings per - disk or snapshot. - :type encryption_settings_collection: - ~azure.mgmt.compute.v2018_09_30.models.EncryptionSettingsCollection - :param disk_iops_read_write: The number of IOPS allowed for this disk; - only settable for UltraSSD disks. One operation can transfer between 4k - and 256k bytes. - :type disk_iops_read_write: long - :param disk_mbps_read_write: The bandwidth allowed for this disk; only - settable for UltraSSD disks. MBps means millions of bytes per second - MB - here uses the ISO notation, of powers of 10. - :type disk_mbps_read_write: int - :param tags: Resource tags - :type tags: dict[str, str] - :param sku: - :type sku: ~azure.mgmt.compute.v2018_09_30.models.DiskSku - """ - - _attribute_map = { - 'os_type': {'key': 'properties.osType', 'type': 'OperatingSystemTypes'}, - 'disk_size_gb': {'key': 'properties.diskSizeGB', 'type': 'int'}, - 'encryption_settings_collection': {'key': 'properties.encryptionSettingsCollection', 'type': 'EncryptionSettingsCollection'}, - 'disk_iops_read_write': {'key': 'properties.diskIOPSReadWrite', 'type': 'long'}, - 'disk_mbps_read_write': {'key': 'properties.diskMBpsReadWrite', 'type': 'int'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'sku': {'key': 'sku', 'type': 'DiskSku'}, - } - - def __init__(self, **kwargs): - super(DiskUpdate, self).__init__(**kwargs) - self.os_type = kwargs.get('os_type', None) - self.disk_size_gb = kwargs.get('disk_size_gb', None) - self.encryption_settings_collection = kwargs.get('encryption_settings_collection', None) - self.disk_iops_read_write = kwargs.get('disk_iops_read_write', None) - self.disk_mbps_read_write = kwargs.get('disk_mbps_read_write', None) - self.tags = kwargs.get('tags', None) - self.sku = kwargs.get('sku', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_09_30/models/disk_update_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_09_30/models/disk_update_py3.py deleted file mode 100644 index ec4a3fc902e8..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_09_30/models/disk_update_py3.py +++ /dev/null @@ -1,65 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class DiskUpdate(Model): - """Disk update resource. - - :param os_type: the Operating System type. Possible values include: - 'Windows', 'Linux' - :type os_type: str or - ~azure.mgmt.compute.v2018_09_30.models.OperatingSystemTypes - :param disk_size_gb: If creationData.createOption is Empty, this field is - mandatory and it indicates the size of the VHD to create. If this field is - present for updates or creation with other options, it indicates a resize. - Resizes are only allowed if the disk is not attached to a running VM, and - can only increase the disk's size. - :type disk_size_gb: int - :param encryption_settings_collection: Encryption settings collection used - be Azure Disk Encryption, can contain multiple encryption settings per - disk or snapshot. - :type encryption_settings_collection: - ~azure.mgmt.compute.v2018_09_30.models.EncryptionSettingsCollection - :param disk_iops_read_write: The number of IOPS allowed for this disk; - only settable for UltraSSD disks. One operation can transfer between 4k - and 256k bytes. - :type disk_iops_read_write: long - :param disk_mbps_read_write: The bandwidth allowed for this disk; only - settable for UltraSSD disks. MBps means millions of bytes per second - MB - here uses the ISO notation, of powers of 10. - :type disk_mbps_read_write: int - :param tags: Resource tags - :type tags: dict[str, str] - :param sku: - :type sku: ~azure.mgmt.compute.v2018_09_30.models.DiskSku - """ - - _attribute_map = { - 'os_type': {'key': 'properties.osType', 'type': 'OperatingSystemTypes'}, - 'disk_size_gb': {'key': 'properties.diskSizeGB', 'type': 'int'}, - 'encryption_settings_collection': {'key': 'properties.encryptionSettingsCollection', 'type': 'EncryptionSettingsCollection'}, - 'disk_iops_read_write': {'key': 'properties.diskIOPSReadWrite', 'type': 'long'}, - 'disk_mbps_read_write': {'key': 'properties.diskMBpsReadWrite', 'type': 'int'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'sku': {'key': 'sku', 'type': 'DiskSku'}, - } - - def __init__(self, *, os_type=None, disk_size_gb: int=None, encryption_settings_collection=None, disk_iops_read_write: int=None, disk_mbps_read_write: int=None, tags=None, sku=None, **kwargs) -> None: - super(DiskUpdate, self).__init__(**kwargs) - self.os_type = os_type - self.disk_size_gb = disk_size_gb - self.encryption_settings_collection = encryption_settings_collection - self.disk_iops_read_write = disk_iops_read_write - self.disk_mbps_read_write = disk_mbps_read_write - self.tags = tags - self.sku = sku diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_09_30/models/encryption_settings_collection.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_09_30/models/encryption_settings_collection.py deleted file mode 100644 index 921aa4219906..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_09_30/models/encryption_settings_collection.py +++ /dev/null @@ -1,44 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class EncryptionSettingsCollection(Model): - """Encryption settings for disk or snapshot. - - All required parameters must be populated in order to send to Azure. - - :param enabled: Required. Set this flag to true and provide - DiskEncryptionKey and optional KeyEncryptionKey to enable encryption. Set - this flag to false and remove DiskEncryptionKey and KeyEncryptionKey to - disable encryption. If EncryptionSettings is null in the request object, - the existing settings remain unchanged. - :type enabled: bool - :param encryption_settings: A collection of encryption settings, one for - each disk volume. - :type encryption_settings: - list[~azure.mgmt.compute.v2018_09_30.models.EncryptionSettingsElement] - """ - - _validation = { - 'enabled': {'required': True}, - } - - _attribute_map = { - 'enabled': {'key': 'enabled', 'type': 'bool'}, - 'encryption_settings': {'key': 'encryptionSettings', 'type': '[EncryptionSettingsElement]'}, - } - - def __init__(self, **kwargs): - super(EncryptionSettingsCollection, self).__init__(**kwargs) - self.enabled = kwargs.get('enabled', None) - self.encryption_settings = kwargs.get('encryption_settings', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_09_30/models/encryption_settings_collection_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_09_30/models/encryption_settings_collection_py3.py deleted file mode 100644 index 7e468536795c..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_09_30/models/encryption_settings_collection_py3.py +++ /dev/null @@ -1,44 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class EncryptionSettingsCollection(Model): - """Encryption settings for disk or snapshot. - - All required parameters must be populated in order to send to Azure. - - :param enabled: Required. Set this flag to true and provide - DiskEncryptionKey and optional KeyEncryptionKey to enable encryption. Set - this flag to false and remove DiskEncryptionKey and KeyEncryptionKey to - disable encryption. If EncryptionSettings is null in the request object, - the existing settings remain unchanged. - :type enabled: bool - :param encryption_settings: A collection of encryption settings, one for - each disk volume. - :type encryption_settings: - list[~azure.mgmt.compute.v2018_09_30.models.EncryptionSettingsElement] - """ - - _validation = { - 'enabled': {'required': True}, - } - - _attribute_map = { - 'enabled': {'key': 'enabled', 'type': 'bool'}, - 'encryption_settings': {'key': 'encryptionSettings', 'type': '[EncryptionSettingsElement]'}, - } - - def __init__(self, *, enabled: bool, encryption_settings=None, **kwargs) -> None: - super(EncryptionSettingsCollection, self).__init__(**kwargs) - self.enabled = enabled - self.encryption_settings = encryption_settings diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_09_30/models/encryption_settings_element.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_09_30/models/encryption_settings_element.py deleted file mode 100644 index 4ee8414c99e4..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_09_30/models/encryption_settings_element.py +++ /dev/null @@ -1,37 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class EncryptionSettingsElement(Model): - """Encryption settings for one disk volume. - - :param disk_encryption_key: Key Vault Secret Url and vault id of the disk - encryption key - :type disk_encryption_key: - ~azure.mgmt.compute.v2018_09_30.models.KeyVaultAndSecretReference - :param key_encryption_key: Key Vault Key Url and vault id of the key - encryption key. KeyEncryptionKey is optional and when provided is used to - unwrap the disk encryption key. - :type key_encryption_key: - ~azure.mgmt.compute.v2018_09_30.models.KeyVaultAndKeyReference - """ - - _attribute_map = { - 'disk_encryption_key': {'key': 'diskEncryptionKey', 'type': 'KeyVaultAndSecretReference'}, - 'key_encryption_key': {'key': 'keyEncryptionKey', 'type': 'KeyVaultAndKeyReference'}, - } - - def __init__(self, **kwargs): - super(EncryptionSettingsElement, self).__init__(**kwargs) - self.disk_encryption_key = kwargs.get('disk_encryption_key', None) - self.key_encryption_key = kwargs.get('key_encryption_key', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_09_30/models/encryption_settings_element_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_09_30/models/encryption_settings_element_py3.py deleted file mode 100644 index b8936df5f967..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_09_30/models/encryption_settings_element_py3.py +++ /dev/null @@ -1,37 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class EncryptionSettingsElement(Model): - """Encryption settings for one disk volume. - - :param disk_encryption_key: Key Vault Secret Url and vault id of the disk - encryption key - :type disk_encryption_key: - ~azure.mgmt.compute.v2018_09_30.models.KeyVaultAndSecretReference - :param key_encryption_key: Key Vault Key Url and vault id of the key - encryption key. KeyEncryptionKey is optional and when provided is used to - unwrap the disk encryption key. - :type key_encryption_key: - ~azure.mgmt.compute.v2018_09_30.models.KeyVaultAndKeyReference - """ - - _attribute_map = { - 'disk_encryption_key': {'key': 'diskEncryptionKey', 'type': 'KeyVaultAndSecretReference'}, - 'key_encryption_key': {'key': 'keyEncryptionKey', 'type': 'KeyVaultAndKeyReference'}, - } - - def __init__(self, *, disk_encryption_key=None, key_encryption_key=None, **kwargs) -> None: - super(EncryptionSettingsElement, self).__init__(**kwargs) - self.disk_encryption_key = disk_encryption_key - self.key_encryption_key = key_encryption_key diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_09_30/models/grant_access_data.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_09_30/models/grant_access_data.py deleted file mode 100644 index 525abe07e5d8..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_09_30/models/grant_access_data.py +++ /dev/null @@ -1,40 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class GrantAccessData(Model): - """Data used for requesting a SAS. - - All required parameters must be populated in order to send to Azure. - - :param access: Required. Possible values include: 'None', 'Read', 'Write' - :type access: str or ~azure.mgmt.compute.v2018_09_30.models.AccessLevel - :param duration_in_seconds: Required. Time duration in seconds until the - SAS access expires. - :type duration_in_seconds: int - """ - - _validation = { - 'access': {'required': True}, - 'duration_in_seconds': {'required': True}, - } - - _attribute_map = { - 'access': {'key': 'access', 'type': 'str'}, - 'duration_in_seconds': {'key': 'durationInSeconds', 'type': 'int'}, - } - - def __init__(self, **kwargs): - super(GrantAccessData, self).__init__(**kwargs) - self.access = kwargs.get('access', None) - self.duration_in_seconds = kwargs.get('duration_in_seconds', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_09_30/models/grant_access_data_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_09_30/models/grant_access_data_py3.py deleted file mode 100644 index 95d23d80e046..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_09_30/models/grant_access_data_py3.py +++ /dev/null @@ -1,40 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class GrantAccessData(Model): - """Data used for requesting a SAS. - - All required parameters must be populated in order to send to Azure. - - :param access: Required. Possible values include: 'None', 'Read', 'Write' - :type access: str or ~azure.mgmt.compute.v2018_09_30.models.AccessLevel - :param duration_in_seconds: Required. Time duration in seconds until the - SAS access expires. - :type duration_in_seconds: int - """ - - _validation = { - 'access': {'required': True}, - 'duration_in_seconds': {'required': True}, - } - - _attribute_map = { - 'access': {'key': 'access', 'type': 'str'}, - 'duration_in_seconds': {'key': 'durationInSeconds', 'type': 'int'}, - } - - def __init__(self, *, access, duration_in_seconds: int, **kwargs) -> None: - super(GrantAccessData, self).__init__(**kwargs) - self.access = access - self.duration_in_seconds = duration_in_seconds diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_09_30/models/image_disk_reference.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_09_30/models/image_disk_reference.py deleted file mode 100644 index b47ddd445024..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_09_30/models/image_disk_reference.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ImageDiskReference(Model): - """The source image used for creating the disk. - - All required parameters must be populated in order to send to Azure. - - :param id: Required. A relative uri containing either a Platform Image - Repository or user image reference. - :type id: str - :param lun: If the disk is created from an image's data disk, this is an - index that indicates which of the data disks in the image to use. For OS - disks, this field is null. - :type lun: int - """ - - _validation = { - 'id': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'lun': {'key': 'lun', 'type': 'int'}, - } - - def __init__(self, **kwargs): - super(ImageDiskReference, self).__init__(**kwargs) - self.id = kwargs.get('id', None) - self.lun = kwargs.get('lun', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_09_30/models/image_disk_reference_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_09_30/models/image_disk_reference_py3.py deleted file mode 100644 index 85bf966bc6e0..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_09_30/models/image_disk_reference_py3.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ImageDiskReference(Model): - """The source image used for creating the disk. - - All required parameters must be populated in order to send to Azure. - - :param id: Required. A relative uri containing either a Platform Image - Repository or user image reference. - :type id: str - :param lun: If the disk is created from an image's data disk, this is an - index that indicates which of the data disks in the image to use. For OS - disks, this field is null. - :type lun: int - """ - - _validation = { - 'id': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'lun': {'key': 'lun', 'type': 'int'}, - } - - def __init__(self, *, id: str, lun: int=None, **kwargs) -> None: - super(ImageDiskReference, self).__init__(**kwargs) - self.id = id - self.lun = lun diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_09_30/models/key_vault_and_key_reference.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_09_30/models/key_vault_and_key_reference.py deleted file mode 100644 index 2ee046d5c948..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_09_30/models/key_vault_and_key_reference.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class KeyVaultAndKeyReference(Model): - """Key Vault Key Url and vault id of KeK, KeK is optional and when provided is - used to unwrap the encryptionKey. - - All required parameters must be populated in order to send to Azure. - - :param source_vault: Required. Resource id of the KeyVault containing the - key or secret - :type source_vault: ~azure.mgmt.compute.v2018_09_30.models.SourceVault - :param key_url: Required. Url pointing to a key or secret in KeyVault - :type key_url: str - """ - - _validation = { - 'source_vault': {'required': True}, - 'key_url': {'required': True}, - } - - _attribute_map = { - 'source_vault': {'key': 'sourceVault', 'type': 'SourceVault'}, - 'key_url': {'key': 'keyUrl', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(KeyVaultAndKeyReference, self).__init__(**kwargs) - self.source_vault = kwargs.get('source_vault', None) - self.key_url = kwargs.get('key_url', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_09_30/models/key_vault_and_key_reference_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_09_30/models/key_vault_and_key_reference_py3.py deleted file mode 100644 index 5cc8a2bd6ec2..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_09_30/models/key_vault_and_key_reference_py3.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class KeyVaultAndKeyReference(Model): - """Key Vault Key Url and vault id of KeK, KeK is optional and when provided is - used to unwrap the encryptionKey. - - All required parameters must be populated in order to send to Azure. - - :param source_vault: Required. Resource id of the KeyVault containing the - key or secret - :type source_vault: ~azure.mgmt.compute.v2018_09_30.models.SourceVault - :param key_url: Required. Url pointing to a key or secret in KeyVault - :type key_url: str - """ - - _validation = { - 'source_vault': {'required': True}, - 'key_url': {'required': True}, - } - - _attribute_map = { - 'source_vault': {'key': 'sourceVault', 'type': 'SourceVault'}, - 'key_url': {'key': 'keyUrl', 'type': 'str'}, - } - - def __init__(self, *, source_vault, key_url: str, **kwargs) -> None: - super(KeyVaultAndKeyReference, self).__init__(**kwargs) - self.source_vault = source_vault - self.key_url = key_url diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_09_30/models/key_vault_and_secret_reference.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_09_30/models/key_vault_and_secret_reference.py deleted file mode 100644 index 82eb7fce34d7..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_09_30/models/key_vault_and_secret_reference.py +++ /dev/null @@ -1,40 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class KeyVaultAndSecretReference(Model): - """Key Vault Secret Url and vault id of the encryption key . - - All required parameters must be populated in order to send to Azure. - - :param source_vault: Required. Resource id of the KeyVault containing the - key or secret - :type source_vault: ~azure.mgmt.compute.v2018_09_30.models.SourceVault - :param secret_url: Required. Url pointing to a key or secret in KeyVault - :type secret_url: str - """ - - _validation = { - 'source_vault': {'required': True}, - 'secret_url': {'required': True}, - } - - _attribute_map = { - 'source_vault': {'key': 'sourceVault', 'type': 'SourceVault'}, - 'secret_url': {'key': 'secretUrl', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(KeyVaultAndSecretReference, self).__init__(**kwargs) - self.source_vault = kwargs.get('source_vault', None) - self.secret_url = kwargs.get('secret_url', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_09_30/models/key_vault_and_secret_reference_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_09_30/models/key_vault_and_secret_reference_py3.py deleted file mode 100644 index 8a67f8664c06..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_09_30/models/key_vault_and_secret_reference_py3.py +++ /dev/null @@ -1,40 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class KeyVaultAndSecretReference(Model): - """Key Vault Secret Url and vault id of the encryption key . - - All required parameters must be populated in order to send to Azure. - - :param source_vault: Required. Resource id of the KeyVault containing the - key or secret - :type source_vault: ~azure.mgmt.compute.v2018_09_30.models.SourceVault - :param secret_url: Required. Url pointing to a key or secret in KeyVault - :type secret_url: str - """ - - _validation = { - 'source_vault': {'required': True}, - 'secret_url': {'required': True}, - } - - _attribute_map = { - 'source_vault': {'key': 'sourceVault', 'type': 'SourceVault'}, - 'secret_url': {'key': 'secretUrl', 'type': 'str'}, - } - - def __init__(self, *, source_vault, secret_url: str, **kwargs) -> None: - super(KeyVaultAndSecretReference, self).__init__(**kwargs) - self.source_vault = source_vault - self.secret_url = secret_url diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_09_30/models/resource.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_09_30/models/resource.py deleted file mode 100644 index 5dd7d481c685..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_09_30/models/resource.py +++ /dev/null @@ -1,56 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class Resource(Model): - """The Resource model definition. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource Id - :vartype id: str - :ivar name: Resource name - :vartype name: str - :ivar type: Resource type - :vartype type: str - :param location: Required. Resource location - :type location: str - :param tags: Resource tags - :type tags: dict[str, str] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - } - - def __init__(self, **kwargs): - super(Resource, self).__init__(**kwargs) - self.id = None - self.name = None - self.type = None - self.location = kwargs.get('location', None) - self.tags = kwargs.get('tags', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_09_30/models/resource_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_09_30/models/resource_py3.py deleted file mode 100644 index 2f3702caf609..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_09_30/models/resource_py3.py +++ /dev/null @@ -1,56 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class Resource(Model): - """The Resource model definition. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource Id - :vartype id: str - :ivar name: Resource name - :vartype name: str - :ivar type: Resource type - :vartype type: str - :param location: Required. Resource location - :type location: str - :param tags: Resource tags - :type tags: dict[str, str] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - } - - def __init__(self, *, location: str, tags=None, **kwargs) -> None: - super(Resource, self).__init__(**kwargs) - self.id = None - self.name = None - self.type = None - self.location = location - self.tags = tags diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_09_30/models/snapshot.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_09_30/models/snapshot.py deleted file mode 100644 index 2e672b311400..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_09_30/models/snapshot.py +++ /dev/null @@ -1,103 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource import Resource - - -class Snapshot(Resource): - """Snapshot resource. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource Id - :vartype id: str - :ivar name: Resource name - :vartype name: str - :ivar type: Resource type - :vartype type: str - :param location: Required. Resource location - :type location: str - :param tags: Resource tags - :type tags: dict[str, str] - :ivar managed_by: Unused. Always Null. - :vartype managed_by: str - :param sku: - :type sku: ~azure.mgmt.compute.v2018_09_30.models.SnapshotSku - :ivar time_created: The time when the disk was created. - :vartype time_created: datetime - :param os_type: The Operating System type. Possible values include: - 'Windows', 'Linux' - :type os_type: str or - ~azure.mgmt.compute.v2018_09_30.models.OperatingSystemTypes - :param hyper_vgeneration: The hypervisor generation of the Virtual - Machine. Applicable to OS disks only. Possible values include: 'V1', 'V2' - :type hyper_vgeneration: str or - ~azure.mgmt.compute.v2018_09_30.models.HyperVGeneration - :param creation_data: Required. Disk source information. CreationData - information cannot be changed after the disk has been created. - :type creation_data: ~azure.mgmt.compute.v2018_09_30.models.CreationData - :param disk_size_gb: If creationData.createOption is Empty, this field is - mandatory and it indicates the size of the VHD to create. If this field is - present for updates or creation with other options, it indicates a resize. - Resizes are only allowed if the disk is not attached to a running VM, and - can only increase the disk's size. - :type disk_size_gb: int - :param encryption_settings_collection: Encryption settings collection used - be Azure Disk Encryption, can contain multiple encryption settings per - disk or snapshot. - :type encryption_settings_collection: - ~azure.mgmt.compute.v2018_09_30.models.EncryptionSettingsCollection - :ivar provisioning_state: The disk provisioning state. - :vartype provisioning_state: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - 'managed_by': {'readonly': True}, - 'time_created': {'readonly': True}, - 'creation_data': {'required': True}, - 'provisioning_state': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'managed_by': {'key': 'managedBy', 'type': 'str'}, - 'sku': {'key': 'sku', 'type': 'SnapshotSku'}, - 'time_created': {'key': 'properties.timeCreated', 'type': 'iso-8601'}, - 'os_type': {'key': 'properties.osType', 'type': 'OperatingSystemTypes'}, - 'hyper_vgeneration': {'key': 'properties.hyperVGeneration', 'type': 'str'}, - 'creation_data': {'key': 'properties.creationData', 'type': 'CreationData'}, - 'disk_size_gb': {'key': 'properties.diskSizeGB', 'type': 'int'}, - 'encryption_settings_collection': {'key': 'properties.encryptionSettingsCollection', 'type': 'EncryptionSettingsCollection'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(Snapshot, self).__init__(**kwargs) - self.managed_by = None - self.sku = kwargs.get('sku', None) - self.time_created = None - self.os_type = kwargs.get('os_type', None) - self.hyper_vgeneration = kwargs.get('hyper_vgeneration', None) - self.creation_data = kwargs.get('creation_data', None) - self.disk_size_gb = kwargs.get('disk_size_gb', None) - self.encryption_settings_collection = kwargs.get('encryption_settings_collection', None) - self.provisioning_state = None diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_09_30/models/snapshot_paged.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_09_30/models/snapshot_paged.py deleted file mode 100644 index 8c41bfee8ffb..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_09_30/models/snapshot_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class SnapshotPaged(Paged): - """ - A paging container for iterating over a list of :class:`Snapshot ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[Snapshot]'} - } - - def __init__(self, *args, **kwargs): - - super(SnapshotPaged, self).__init__(*args, **kwargs) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_09_30/models/snapshot_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_09_30/models/snapshot_py3.py deleted file mode 100644 index f34cbc34aca2..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_09_30/models/snapshot_py3.py +++ /dev/null @@ -1,103 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource_py3 import Resource - - -class Snapshot(Resource): - """Snapshot resource. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource Id - :vartype id: str - :ivar name: Resource name - :vartype name: str - :ivar type: Resource type - :vartype type: str - :param location: Required. Resource location - :type location: str - :param tags: Resource tags - :type tags: dict[str, str] - :ivar managed_by: Unused. Always Null. - :vartype managed_by: str - :param sku: - :type sku: ~azure.mgmt.compute.v2018_09_30.models.SnapshotSku - :ivar time_created: The time when the disk was created. - :vartype time_created: datetime - :param os_type: The Operating System type. Possible values include: - 'Windows', 'Linux' - :type os_type: str or - ~azure.mgmt.compute.v2018_09_30.models.OperatingSystemTypes - :param hyper_vgeneration: The hypervisor generation of the Virtual - Machine. Applicable to OS disks only. Possible values include: 'V1', 'V2' - :type hyper_vgeneration: str or - ~azure.mgmt.compute.v2018_09_30.models.HyperVGeneration - :param creation_data: Required. Disk source information. CreationData - information cannot be changed after the disk has been created. - :type creation_data: ~azure.mgmt.compute.v2018_09_30.models.CreationData - :param disk_size_gb: If creationData.createOption is Empty, this field is - mandatory and it indicates the size of the VHD to create. If this field is - present for updates or creation with other options, it indicates a resize. - Resizes are only allowed if the disk is not attached to a running VM, and - can only increase the disk's size. - :type disk_size_gb: int - :param encryption_settings_collection: Encryption settings collection used - be Azure Disk Encryption, can contain multiple encryption settings per - disk or snapshot. - :type encryption_settings_collection: - ~azure.mgmt.compute.v2018_09_30.models.EncryptionSettingsCollection - :ivar provisioning_state: The disk provisioning state. - :vartype provisioning_state: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - 'managed_by': {'readonly': True}, - 'time_created': {'readonly': True}, - 'creation_data': {'required': True}, - 'provisioning_state': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'managed_by': {'key': 'managedBy', 'type': 'str'}, - 'sku': {'key': 'sku', 'type': 'SnapshotSku'}, - 'time_created': {'key': 'properties.timeCreated', 'type': 'iso-8601'}, - 'os_type': {'key': 'properties.osType', 'type': 'OperatingSystemTypes'}, - 'hyper_vgeneration': {'key': 'properties.hyperVGeneration', 'type': 'str'}, - 'creation_data': {'key': 'properties.creationData', 'type': 'CreationData'}, - 'disk_size_gb': {'key': 'properties.diskSizeGB', 'type': 'int'}, - 'encryption_settings_collection': {'key': 'properties.encryptionSettingsCollection', 'type': 'EncryptionSettingsCollection'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - } - - def __init__(self, *, location: str, creation_data, tags=None, sku=None, os_type=None, hyper_vgeneration=None, disk_size_gb: int=None, encryption_settings_collection=None, **kwargs) -> None: - super(Snapshot, self).__init__(location=location, tags=tags, **kwargs) - self.managed_by = None - self.sku = sku - self.time_created = None - self.os_type = os_type - self.hyper_vgeneration = hyper_vgeneration - self.creation_data = creation_data - self.disk_size_gb = disk_size_gb - self.encryption_settings_collection = encryption_settings_collection - self.provisioning_state = None diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_09_30/models/snapshot_sku.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_09_30/models/snapshot_sku.py deleted file mode 100644 index cae1e7d71691..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_09_30/models/snapshot_sku.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class SnapshotSku(Model): - """The snapshots sku name. Can be Standard_LRS, Premium_LRS, or Standard_ZRS. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :param name: The sku name. Possible values include: 'Standard_LRS', - 'Premium_LRS', 'Standard_ZRS' - :type name: str or - ~azure.mgmt.compute.v2018_09_30.models.SnapshotStorageAccountTypes - :ivar tier: The sku tier. Default value: "Standard" . - :vartype tier: str - """ - - _validation = { - 'tier': {'readonly': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'tier': {'key': 'tier', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(SnapshotSku, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.tier = None diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_09_30/models/snapshot_sku_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_09_30/models/snapshot_sku_py3.py deleted file mode 100644 index 8cc23a192f58..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_09_30/models/snapshot_sku_py3.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class SnapshotSku(Model): - """The snapshots sku name. Can be Standard_LRS, Premium_LRS, or Standard_ZRS. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :param name: The sku name. Possible values include: 'Standard_LRS', - 'Premium_LRS', 'Standard_ZRS' - :type name: str or - ~azure.mgmt.compute.v2018_09_30.models.SnapshotStorageAccountTypes - :ivar tier: The sku tier. Default value: "Standard" . - :vartype tier: str - """ - - _validation = { - 'tier': {'readonly': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'tier': {'key': 'tier', 'type': 'str'}, - } - - def __init__(self, *, name=None, **kwargs) -> None: - super(SnapshotSku, self).__init__(**kwargs) - self.name = name - self.tier = None diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_09_30/models/snapshot_update.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_09_30/models/snapshot_update.py deleted file mode 100644 index 474c41c6252c..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_09_30/models/snapshot_update.py +++ /dev/null @@ -1,53 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class SnapshotUpdate(Model): - """Snapshot update resource. - - :param os_type: the Operating System type. Possible values include: - 'Windows', 'Linux' - :type os_type: str or - ~azure.mgmt.compute.v2018_09_30.models.OperatingSystemTypes - :param disk_size_gb: If creationData.createOption is Empty, this field is - mandatory and it indicates the size of the VHD to create. If this field is - present for updates or creation with other options, it indicates a resize. - Resizes are only allowed if the disk is not attached to a running VM, and - can only increase the disk's size. - :type disk_size_gb: int - :param encryption_settings_collection: Encryption settings collection used - be Azure Disk Encryption, can contain multiple encryption settings per - disk or snapshot. - :type encryption_settings_collection: - ~azure.mgmt.compute.v2018_09_30.models.EncryptionSettingsCollection - :param tags: Resource tags - :type tags: dict[str, str] - :param sku: - :type sku: ~azure.mgmt.compute.v2018_09_30.models.SnapshotSku - """ - - _attribute_map = { - 'os_type': {'key': 'properties.osType', 'type': 'OperatingSystemTypes'}, - 'disk_size_gb': {'key': 'properties.diskSizeGB', 'type': 'int'}, - 'encryption_settings_collection': {'key': 'properties.encryptionSettingsCollection', 'type': 'EncryptionSettingsCollection'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'sku': {'key': 'sku', 'type': 'SnapshotSku'}, - } - - def __init__(self, **kwargs): - super(SnapshotUpdate, self).__init__(**kwargs) - self.os_type = kwargs.get('os_type', None) - self.disk_size_gb = kwargs.get('disk_size_gb', None) - self.encryption_settings_collection = kwargs.get('encryption_settings_collection', None) - self.tags = kwargs.get('tags', None) - self.sku = kwargs.get('sku', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_09_30/models/snapshot_update_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_09_30/models/snapshot_update_py3.py deleted file mode 100644 index 0abcb5d2899c..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_09_30/models/snapshot_update_py3.py +++ /dev/null @@ -1,53 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class SnapshotUpdate(Model): - """Snapshot update resource. - - :param os_type: the Operating System type. Possible values include: - 'Windows', 'Linux' - :type os_type: str or - ~azure.mgmt.compute.v2018_09_30.models.OperatingSystemTypes - :param disk_size_gb: If creationData.createOption is Empty, this field is - mandatory and it indicates the size of the VHD to create. If this field is - present for updates or creation with other options, it indicates a resize. - Resizes are only allowed if the disk is not attached to a running VM, and - can only increase the disk's size. - :type disk_size_gb: int - :param encryption_settings_collection: Encryption settings collection used - be Azure Disk Encryption, can contain multiple encryption settings per - disk or snapshot. - :type encryption_settings_collection: - ~azure.mgmt.compute.v2018_09_30.models.EncryptionSettingsCollection - :param tags: Resource tags - :type tags: dict[str, str] - :param sku: - :type sku: ~azure.mgmt.compute.v2018_09_30.models.SnapshotSku - """ - - _attribute_map = { - 'os_type': {'key': 'properties.osType', 'type': 'OperatingSystemTypes'}, - 'disk_size_gb': {'key': 'properties.diskSizeGB', 'type': 'int'}, - 'encryption_settings_collection': {'key': 'properties.encryptionSettingsCollection', 'type': 'EncryptionSettingsCollection'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'sku': {'key': 'sku', 'type': 'SnapshotSku'}, - } - - def __init__(self, *, os_type=None, disk_size_gb: int=None, encryption_settings_collection=None, tags=None, sku=None, **kwargs) -> None: - super(SnapshotUpdate, self).__init__(**kwargs) - self.os_type = os_type - self.disk_size_gb = disk_size_gb - self.encryption_settings_collection = encryption_settings_collection - self.tags = tags - self.sku = sku diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_09_30/models/source_vault.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_09_30/models/source_vault.py deleted file mode 100644 index 88537f33905f..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_09_30/models/source_vault.py +++ /dev/null @@ -1,29 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class SourceVault(Model): - """The vault id is an Azure Resource Manager Resource id in the form - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.KeyVault/vaults/{vaultName}. - - :param id: Resource Id - :type id: str - """ - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(SourceVault, self).__init__(**kwargs) - self.id = kwargs.get('id', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_09_30/models/source_vault_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_09_30/models/source_vault_py3.py deleted file mode 100644 index 1cb922017c06..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_09_30/models/source_vault_py3.py +++ /dev/null @@ -1,29 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class SourceVault(Model): - """The vault id is an Azure Resource Manager Resource id in the form - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.KeyVault/vaults/{vaultName}. - - :param id: Resource Id - :type id: str - """ - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - } - - def __init__(self, *, id: str=None, **kwargs) -> None: - super(SourceVault, self).__init__(**kwargs) - self.id = id diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_09_30/operations/__init__.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_09_30/operations/__init__.py index aceddf83543c..17c650af444f 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_09_30/operations/__init__.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_09_30/operations/__init__.py @@ -9,8 +9,8 @@ # regenerated. # -------------------------------------------------------------------------- -from .disks_operations import DisksOperations -from .snapshots_operations import SnapshotsOperations +from ._disks_operations import DisksOperations +from ._snapshots_operations import SnapshotsOperations __all__ = [ 'DisksOperations', diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_09_30/operations/_disks_operations.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_09_30/operations/_disks_operations.py new file mode 100644 index 000000000000..62487e34fb38 --- /dev/null +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_09_30/operations/_disks_operations.py @@ -0,0 +1,727 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse +from msrestazure.azure_exceptions import CloudError +from msrest.polling import LROPoller, NoPolling +from msrestazure.polling.arm_polling import ARMPolling + +from .. import models + + +class DisksOperations(object): + """DisksOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: Client Api Version. Constant value: "2018-09-30". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2018-09-30" + + self.config = config + + + def _create_or_update_initial( + self, resource_group_name, disk_name, disk, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.create_or_update.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'diskName': self._serialize.url("disk_name", disk_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(disk, 'Disk') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('Disk', response) + if response.status_code == 202: + deserialized = self._deserialize('Disk', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def create_or_update( + self, resource_group_name, disk_name, disk, custom_headers=None, raw=False, polling=True, **operation_config): + """Creates or updates a disk. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param disk_name: The name of the managed disk that is being created. + The name can't be changed after the disk is created. Supported + characters for the name are a-z, A-Z, 0-9 and _. The maximum name + length is 80 characters. + :type disk_name: str + :param disk: Disk object supplied in the body of the Put disk + operation. + :type disk: ~azure.mgmt.compute.v2018_09_30.models.Disk + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns Disk or + ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2018_09_30.models.Disk] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2018_09_30.models.Disk]] + :raises: :class:`CloudError` + """ + raw_result = self._create_or_update_initial( + resource_group_name=resource_group_name, + disk_name=disk_name, + disk=disk, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('Disk', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/disks/{diskName}'} + + + def _update_initial( + self, resource_group_name, disk_name, disk, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.update.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'diskName': self._serialize.url("disk_name", disk_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(disk, 'DiskUpdate') + + # Construct and send request + request = self._client.patch(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('Disk', response) + if response.status_code == 202: + deserialized = self._deserialize('Disk', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def update( + self, resource_group_name, disk_name, disk, custom_headers=None, raw=False, polling=True, **operation_config): + """Updates (patches) a disk. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param disk_name: The name of the managed disk that is being created. + The name can't be changed after the disk is created. Supported + characters for the name are a-z, A-Z, 0-9 and _. The maximum name + length is 80 characters. + :type disk_name: str + :param disk: Disk object supplied in the body of the Patch disk + operation. + :type disk: ~azure.mgmt.compute.v2018_09_30.models.DiskUpdate + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns Disk or + ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2018_09_30.models.Disk] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2018_09_30.models.Disk]] + :raises: :class:`CloudError` + """ + raw_result = self._update_initial( + resource_group_name=resource_group_name, + disk_name=disk_name, + disk=disk, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('Disk', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/disks/{diskName}'} + + def get( + self, resource_group_name, disk_name, custom_headers=None, raw=False, **operation_config): + """Gets information about a disk. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param disk_name: The name of the managed disk that is being created. + The name can't be changed after the disk is created. Supported + characters for the name are a-z, A-Z, 0-9 and _. The maximum name + length is 80 characters. + :type disk_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: Disk or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.compute.v2018_09_30.models.Disk or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'diskName': self._serialize.url("disk_name", disk_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('Disk', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/disks/{diskName}'} + + + def _delete_initial( + self, resource_group_name, disk_name, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.delete.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'diskName': self._serialize.url("disk_name", disk_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202, 204]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + def delete( + self, resource_group_name, disk_name, custom_headers=None, raw=False, polling=True, **operation_config): + """Deletes a disk. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param disk_name: The name of the managed disk that is being created. + The name can't be changed after the disk is created. Supported + characters for the name are a-z, A-Z, 0-9 and _. The maximum name + length is 80 characters. + :type disk_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns None or + ClientRawResponse if raw==True + :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] + :raises: :class:`CloudError` + """ + raw_result = self._delete_initial( + resource_group_name=resource_group_name, + disk_name=disk_name, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/disks/{diskName}'} + + def list_by_resource_group( + self, resource_group_name, custom_headers=None, raw=False, **operation_config): + """Lists all the disks under a resource group. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of Disk + :rtype: + ~azure.mgmt.compute.v2018_09_30.models.DiskPaged[~azure.mgmt.compute.v2018_09_30.models.Disk] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_by_resource_group.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.DiskPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/disks'} + + def list( + self, custom_headers=None, raw=False, **operation_config): + """Lists all the disks under a subscription. + + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of Disk + :rtype: + ~azure.mgmt.compute.v2018_09_30.models.DiskPaged[~azure.mgmt.compute.v2018_09_30.models.Disk] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.DiskPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Compute/disks'} + + + def _grant_access_initial( + self, resource_group_name, disk_name, access, duration_in_seconds, custom_headers=None, raw=False, **operation_config): + grant_access_data = models.GrantAccessData(access=access, duration_in_seconds=duration_in_seconds) + + # Construct URL + url = self.grant_access.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'diskName': self._serialize.url("disk_name", disk_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(grant_access_data, 'GrantAccessData') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('AccessUri', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def grant_access( + self, resource_group_name, disk_name, access, duration_in_seconds, custom_headers=None, raw=False, polling=True, **operation_config): + """Grants access to a disk. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param disk_name: The name of the managed disk that is being created. + The name can't be changed after the disk is created. Supported + characters for the name are a-z, A-Z, 0-9 and _. The maximum name + length is 80 characters. + :type disk_name: str + :param access: Possible values include: 'None', 'Read', 'Write' + :type access: str or + ~azure.mgmt.compute.v2018_09_30.models.AccessLevel + :param duration_in_seconds: Time duration in seconds until the SAS + access expires. + :type duration_in_seconds: int + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns AccessUri or + ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2018_09_30.models.AccessUri] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2018_09_30.models.AccessUri]] + :raises: :class:`CloudError` + """ + raw_result = self._grant_access_initial( + resource_group_name=resource_group_name, + disk_name=disk_name, + access=access, + duration_in_seconds=duration_in_seconds, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('AccessUri', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + grant_access.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/disks/{diskName}/beginGetAccess'} + + + def _revoke_access_initial( + self, resource_group_name, disk_name, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.revoke_access.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'diskName': self._serialize.url("disk_name", disk_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + def revoke_access( + self, resource_group_name, disk_name, custom_headers=None, raw=False, polling=True, **operation_config): + """Revokes access to a disk. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param disk_name: The name of the managed disk that is being created. + The name can't be changed after the disk is created. Supported + characters for the name are a-z, A-Z, 0-9 and _. The maximum name + length is 80 characters. + :type disk_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns None or + ClientRawResponse if raw==True + :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] + :raises: :class:`CloudError` + """ + raw_result = self._revoke_access_initial( + resource_group_name=resource_group_name, + disk_name=disk_name, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + revoke_access.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/disks/{diskName}/endGetAccess'} diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_09_30/operations/_snapshots_operations.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_09_30/operations/_snapshots_operations.py new file mode 100644 index 000000000000..92a568e1504c --- /dev/null +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_09_30/operations/_snapshots_operations.py @@ -0,0 +1,727 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse +from msrestazure.azure_exceptions import CloudError +from msrest.polling import LROPoller, NoPolling +from msrestazure.polling.arm_polling import ARMPolling + +from .. import models + + +class SnapshotsOperations(object): + """SnapshotsOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: Client Api Version. Constant value: "2018-09-30". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2018-09-30" + + self.config = config + + + def _create_or_update_initial( + self, resource_group_name, snapshot_name, snapshot, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.create_or_update.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'snapshotName': self._serialize.url("snapshot_name", snapshot_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(snapshot, 'Snapshot') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('Snapshot', response) + if response.status_code == 202: + deserialized = self._deserialize('Snapshot', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def create_or_update( + self, resource_group_name, snapshot_name, snapshot, custom_headers=None, raw=False, polling=True, **operation_config): + """Creates or updates a snapshot. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param snapshot_name: The name of the snapshot that is being created. + The name can't be changed after the snapshot is created. Supported + characters for the name are a-z, A-Z, 0-9 and _. The max name length + is 80 characters. + :type snapshot_name: str + :param snapshot: Snapshot object supplied in the body of the Put disk + operation. + :type snapshot: ~azure.mgmt.compute.v2018_09_30.models.Snapshot + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns Snapshot or + ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2018_09_30.models.Snapshot] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2018_09_30.models.Snapshot]] + :raises: :class:`CloudError` + """ + raw_result = self._create_or_update_initial( + resource_group_name=resource_group_name, + snapshot_name=snapshot_name, + snapshot=snapshot, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('Snapshot', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/snapshots/{snapshotName}'} + + + def _update_initial( + self, resource_group_name, snapshot_name, snapshot, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.update.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'snapshotName': self._serialize.url("snapshot_name", snapshot_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(snapshot, 'SnapshotUpdate') + + # Construct and send request + request = self._client.patch(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('Snapshot', response) + if response.status_code == 202: + deserialized = self._deserialize('Snapshot', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def update( + self, resource_group_name, snapshot_name, snapshot, custom_headers=None, raw=False, polling=True, **operation_config): + """Updates (patches) a snapshot. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param snapshot_name: The name of the snapshot that is being created. + The name can't be changed after the snapshot is created. Supported + characters for the name are a-z, A-Z, 0-9 and _. The max name length + is 80 characters. + :type snapshot_name: str + :param snapshot: Snapshot object supplied in the body of the Patch + snapshot operation. + :type snapshot: ~azure.mgmt.compute.v2018_09_30.models.SnapshotUpdate + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns Snapshot or + ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2018_09_30.models.Snapshot] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2018_09_30.models.Snapshot]] + :raises: :class:`CloudError` + """ + raw_result = self._update_initial( + resource_group_name=resource_group_name, + snapshot_name=snapshot_name, + snapshot=snapshot, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('Snapshot', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/snapshots/{snapshotName}'} + + def get( + self, resource_group_name, snapshot_name, custom_headers=None, raw=False, **operation_config): + """Gets information about a snapshot. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param snapshot_name: The name of the snapshot that is being created. + The name can't be changed after the snapshot is created. Supported + characters for the name are a-z, A-Z, 0-9 and _. The max name length + is 80 characters. + :type snapshot_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: Snapshot or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.compute.v2018_09_30.models.Snapshot or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'snapshotName': self._serialize.url("snapshot_name", snapshot_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('Snapshot', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/snapshots/{snapshotName}'} + + + def _delete_initial( + self, resource_group_name, snapshot_name, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.delete.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'snapshotName': self._serialize.url("snapshot_name", snapshot_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202, 204]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + def delete( + self, resource_group_name, snapshot_name, custom_headers=None, raw=False, polling=True, **operation_config): + """Deletes a snapshot. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param snapshot_name: The name of the snapshot that is being created. + The name can't be changed after the snapshot is created. Supported + characters for the name are a-z, A-Z, 0-9 and _. The max name length + is 80 characters. + :type snapshot_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns None or + ClientRawResponse if raw==True + :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] + :raises: :class:`CloudError` + """ + raw_result = self._delete_initial( + resource_group_name=resource_group_name, + snapshot_name=snapshot_name, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/snapshots/{snapshotName}'} + + def list_by_resource_group( + self, resource_group_name, custom_headers=None, raw=False, **operation_config): + """Lists snapshots under a resource group. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of Snapshot + :rtype: + ~azure.mgmt.compute.v2018_09_30.models.SnapshotPaged[~azure.mgmt.compute.v2018_09_30.models.Snapshot] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_by_resource_group.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.SnapshotPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/snapshots'} + + def list( + self, custom_headers=None, raw=False, **operation_config): + """Lists snapshots under a subscription. + + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of Snapshot + :rtype: + ~azure.mgmt.compute.v2018_09_30.models.SnapshotPaged[~azure.mgmt.compute.v2018_09_30.models.Snapshot] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.SnapshotPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Compute/snapshots'} + + + def _grant_access_initial( + self, resource_group_name, snapshot_name, access, duration_in_seconds, custom_headers=None, raw=False, **operation_config): + grant_access_data = models.GrantAccessData(access=access, duration_in_seconds=duration_in_seconds) + + # Construct URL + url = self.grant_access.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'snapshotName': self._serialize.url("snapshot_name", snapshot_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(grant_access_data, 'GrantAccessData') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('AccessUri', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def grant_access( + self, resource_group_name, snapshot_name, access, duration_in_seconds, custom_headers=None, raw=False, polling=True, **operation_config): + """Grants access to a snapshot. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param snapshot_name: The name of the snapshot that is being created. + The name can't be changed after the snapshot is created. Supported + characters for the name are a-z, A-Z, 0-9 and _. The max name length + is 80 characters. + :type snapshot_name: str + :param access: Possible values include: 'None', 'Read', 'Write' + :type access: str or + ~azure.mgmt.compute.v2018_09_30.models.AccessLevel + :param duration_in_seconds: Time duration in seconds until the SAS + access expires. + :type duration_in_seconds: int + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns AccessUri or + ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2018_09_30.models.AccessUri] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2018_09_30.models.AccessUri]] + :raises: :class:`CloudError` + """ + raw_result = self._grant_access_initial( + resource_group_name=resource_group_name, + snapshot_name=snapshot_name, + access=access, + duration_in_seconds=duration_in_seconds, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('AccessUri', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + grant_access.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/snapshots/{snapshotName}/beginGetAccess'} + + + def _revoke_access_initial( + self, resource_group_name, snapshot_name, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.revoke_access.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'snapshotName': self._serialize.url("snapshot_name", snapshot_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + def revoke_access( + self, resource_group_name, snapshot_name, custom_headers=None, raw=False, polling=True, **operation_config): + """Revokes access to a snapshot. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param snapshot_name: The name of the snapshot that is being created. + The name can't be changed after the snapshot is created. Supported + characters for the name are a-z, A-Z, 0-9 and _. The max name length + is 80 characters. + :type snapshot_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns None or + ClientRawResponse if raw==True + :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] + :raises: :class:`CloudError` + """ + raw_result = self._revoke_access_initial( + resource_group_name=resource_group_name, + snapshot_name=snapshot_name, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + revoke_access.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/snapshots/{snapshotName}/endGetAccess'} diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_09_30/operations/disks_operations.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_09_30/operations/disks_operations.py deleted file mode 100644 index 52286ef4f8a4..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_09_30/operations/disks_operations.py +++ /dev/null @@ -1,722 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError -from msrest.polling import LROPoller, NoPolling -from msrestazure.polling.arm_polling import ARMPolling - -from .. import models - - -class DisksOperations(object): - """DisksOperations operations. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: Client Api Version. Constant value: "2018-09-30". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2018-09-30" - - self.config = config - - - def _create_or_update_initial( - self, resource_group_name, disk_name, disk, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.create_or_update.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'diskName': self._serialize.url("disk_name", disk_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(disk, 'Disk') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('Disk', response) - if response.status_code == 202: - deserialized = self._deserialize('Disk', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def create_or_update( - self, resource_group_name, disk_name, disk, custom_headers=None, raw=False, polling=True, **operation_config): - """Creates or updates a disk. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param disk_name: The name of the managed disk that is being created. - The name can't be changed after the disk is created. Supported - characters for the name are a-z, A-Z, 0-9 and _. The maximum name - length is 80 characters. - :type disk_name: str - :param disk: Disk object supplied in the body of the Put disk - operation. - :type disk: ~azure.mgmt.compute.v2018_09_30.models.Disk - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns Disk or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2018_09_30.models.Disk] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2018_09_30.models.Disk]] - :raises: :class:`CloudError` - """ - raw_result = self._create_or_update_initial( - resource_group_name=resource_group_name, - disk_name=disk_name, - disk=disk, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('Disk', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/disks/{diskName}'} - - - def _update_initial( - self, resource_group_name, disk_name, disk, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.update.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'diskName': self._serialize.url("disk_name", disk_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(disk, 'DiskUpdate') - - # Construct and send request - request = self._client.patch(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('Disk', response) - if response.status_code == 202: - deserialized = self._deserialize('Disk', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def update( - self, resource_group_name, disk_name, disk, custom_headers=None, raw=False, polling=True, **operation_config): - """Updates (patches) a disk. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param disk_name: The name of the managed disk that is being created. - The name can't be changed after the disk is created. Supported - characters for the name are a-z, A-Z, 0-9 and _. The maximum name - length is 80 characters. - :type disk_name: str - :param disk: Disk object supplied in the body of the Patch disk - operation. - :type disk: ~azure.mgmt.compute.v2018_09_30.models.DiskUpdate - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns Disk or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2018_09_30.models.Disk] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2018_09_30.models.Disk]] - :raises: :class:`CloudError` - """ - raw_result = self._update_initial( - resource_group_name=resource_group_name, - disk_name=disk_name, - disk=disk, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('Disk', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/disks/{diskName}'} - - def get( - self, resource_group_name, disk_name, custom_headers=None, raw=False, **operation_config): - """Gets information about a disk. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param disk_name: The name of the managed disk that is being created. - The name can't be changed after the disk is created. Supported - characters for the name are a-z, A-Z, 0-9 and _. The maximum name - length is 80 characters. - :type disk_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: Disk or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.compute.v2018_09_30.models.Disk or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'diskName': self._serialize.url("disk_name", disk_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('Disk', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/disks/{diskName}'} - - - def _delete_initial( - self, resource_group_name, disk_name, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.delete.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'diskName': self._serialize.url("disk_name", disk_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202, 204]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - def delete( - self, resource_group_name, disk_name, custom_headers=None, raw=False, polling=True, **operation_config): - """Deletes a disk. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param disk_name: The name of the managed disk that is being created. - The name can't be changed after the disk is created. Supported - characters for the name are a-z, A-Z, 0-9 and _. The maximum name - length is 80 characters. - :type disk_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns None or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] - :raises: :class:`CloudError` - """ - raw_result = self._delete_initial( - resource_group_name=resource_group_name, - disk_name=disk_name, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/disks/{diskName}'} - - def list_by_resource_group( - self, resource_group_name, custom_headers=None, raw=False, **operation_config): - """Lists all the disks under a resource group. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of Disk - :rtype: - ~azure.mgmt.compute.v2018_09_30.models.DiskPaged[~azure.mgmt.compute.v2018_09_30.models.Disk] - :raises: :class:`CloudError` - """ - def internal_paging(next_link=None, raw=False): - - if not next_link: - # Construct URL - url = self.list_by_resource_group.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - deserialized = models.DiskPaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.DiskPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/disks'} - - def list( - self, custom_headers=None, raw=False, **operation_config): - """Lists all the disks under a subscription. - - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of Disk - :rtype: - ~azure.mgmt.compute.v2018_09_30.models.DiskPaged[~azure.mgmt.compute.v2018_09_30.models.Disk] - :raises: :class:`CloudError` - """ - def internal_paging(next_link=None, raw=False): - - if not next_link: - # Construct URL - url = self.list.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - deserialized = models.DiskPaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.DiskPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Compute/disks'} - - - def _grant_access_initial( - self, resource_group_name, disk_name, access, duration_in_seconds, custom_headers=None, raw=False, **operation_config): - grant_access_data = models.GrantAccessData(access=access, duration_in_seconds=duration_in_seconds) - - # Construct URL - url = self.grant_access.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'diskName': self._serialize.url("disk_name", disk_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(grant_access_data, 'GrantAccessData') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('AccessUri', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def grant_access( - self, resource_group_name, disk_name, access, duration_in_seconds, custom_headers=None, raw=False, polling=True, **operation_config): - """Grants access to a disk. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param disk_name: The name of the managed disk that is being created. - The name can't be changed after the disk is created. Supported - characters for the name are a-z, A-Z, 0-9 and _. The maximum name - length is 80 characters. - :type disk_name: str - :param access: Possible values include: 'None', 'Read', 'Write' - :type access: str or - ~azure.mgmt.compute.v2018_09_30.models.AccessLevel - :param duration_in_seconds: Time duration in seconds until the SAS - access expires. - :type duration_in_seconds: int - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns AccessUri or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2018_09_30.models.AccessUri] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2018_09_30.models.AccessUri]] - :raises: :class:`CloudError` - """ - raw_result = self._grant_access_initial( - resource_group_name=resource_group_name, - disk_name=disk_name, - access=access, - duration_in_seconds=duration_in_seconds, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('AccessUri', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - grant_access.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/disks/{diskName}/beginGetAccess'} - - - def _revoke_access_initial( - self, resource_group_name, disk_name, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.revoke_access.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'diskName': self._serialize.url("disk_name", disk_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - def revoke_access( - self, resource_group_name, disk_name, custom_headers=None, raw=False, polling=True, **operation_config): - """Revokes access to a disk. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param disk_name: The name of the managed disk that is being created. - The name can't be changed after the disk is created. Supported - characters for the name are a-z, A-Z, 0-9 and _. The maximum name - length is 80 characters. - :type disk_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns None or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] - :raises: :class:`CloudError` - """ - raw_result = self._revoke_access_initial( - resource_group_name=resource_group_name, - disk_name=disk_name, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - revoke_access.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/disks/{diskName}/endGetAccess'} diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_09_30/operations/snapshots_operations.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_09_30/operations/snapshots_operations.py deleted file mode 100644 index cd3ac3351d99..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_09_30/operations/snapshots_operations.py +++ /dev/null @@ -1,722 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError -from msrest.polling import LROPoller, NoPolling -from msrestazure.polling.arm_polling import ARMPolling - -from .. import models - - -class SnapshotsOperations(object): - """SnapshotsOperations operations. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: Client Api Version. Constant value: "2018-09-30". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2018-09-30" - - self.config = config - - - def _create_or_update_initial( - self, resource_group_name, snapshot_name, snapshot, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.create_or_update.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'snapshotName': self._serialize.url("snapshot_name", snapshot_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(snapshot, 'Snapshot') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('Snapshot', response) - if response.status_code == 202: - deserialized = self._deserialize('Snapshot', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def create_or_update( - self, resource_group_name, snapshot_name, snapshot, custom_headers=None, raw=False, polling=True, **operation_config): - """Creates or updates a snapshot. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param snapshot_name: The name of the snapshot that is being created. - The name can't be changed after the snapshot is created. Supported - characters for the name are a-z, A-Z, 0-9 and _. The max name length - is 80 characters. - :type snapshot_name: str - :param snapshot: Snapshot object supplied in the body of the Put disk - operation. - :type snapshot: ~azure.mgmt.compute.v2018_09_30.models.Snapshot - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns Snapshot or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2018_09_30.models.Snapshot] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2018_09_30.models.Snapshot]] - :raises: :class:`CloudError` - """ - raw_result = self._create_or_update_initial( - resource_group_name=resource_group_name, - snapshot_name=snapshot_name, - snapshot=snapshot, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('Snapshot', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/snapshots/{snapshotName}'} - - - def _update_initial( - self, resource_group_name, snapshot_name, snapshot, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.update.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'snapshotName': self._serialize.url("snapshot_name", snapshot_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(snapshot, 'SnapshotUpdate') - - # Construct and send request - request = self._client.patch(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('Snapshot', response) - if response.status_code == 202: - deserialized = self._deserialize('Snapshot', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def update( - self, resource_group_name, snapshot_name, snapshot, custom_headers=None, raw=False, polling=True, **operation_config): - """Updates (patches) a snapshot. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param snapshot_name: The name of the snapshot that is being created. - The name can't be changed after the snapshot is created. Supported - characters for the name are a-z, A-Z, 0-9 and _. The max name length - is 80 characters. - :type snapshot_name: str - :param snapshot: Snapshot object supplied in the body of the Patch - snapshot operation. - :type snapshot: ~azure.mgmt.compute.v2018_09_30.models.SnapshotUpdate - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns Snapshot or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2018_09_30.models.Snapshot] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2018_09_30.models.Snapshot]] - :raises: :class:`CloudError` - """ - raw_result = self._update_initial( - resource_group_name=resource_group_name, - snapshot_name=snapshot_name, - snapshot=snapshot, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('Snapshot', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/snapshots/{snapshotName}'} - - def get( - self, resource_group_name, snapshot_name, custom_headers=None, raw=False, **operation_config): - """Gets information about a snapshot. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param snapshot_name: The name of the snapshot that is being created. - The name can't be changed after the snapshot is created. Supported - characters for the name are a-z, A-Z, 0-9 and _. The max name length - is 80 characters. - :type snapshot_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: Snapshot or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.compute.v2018_09_30.models.Snapshot or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'snapshotName': self._serialize.url("snapshot_name", snapshot_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('Snapshot', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/snapshots/{snapshotName}'} - - - def _delete_initial( - self, resource_group_name, snapshot_name, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.delete.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'snapshotName': self._serialize.url("snapshot_name", snapshot_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202, 204]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - def delete( - self, resource_group_name, snapshot_name, custom_headers=None, raw=False, polling=True, **operation_config): - """Deletes a snapshot. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param snapshot_name: The name of the snapshot that is being created. - The name can't be changed after the snapshot is created. Supported - characters for the name are a-z, A-Z, 0-9 and _. The max name length - is 80 characters. - :type snapshot_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns None or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] - :raises: :class:`CloudError` - """ - raw_result = self._delete_initial( - resource_group_name=resource_group_name, - snapshot_name=snapshot_name, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/snapshots/{snapshotName}'} - - def list_by_resource_group( - self, resource_group_name, custom_headers=None, raw=False, **operation_config): - """Lists snapshots under a resource group. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of Snapshot - :rtype: - ~azure.mgmt.compute.v2018_09_30.models.SnapshotPaged[~azure.mgmt.compute.v2018_09_30.models.Snapshot] - :raises: :class:`CloudError` - """ - def internal_paging(next_link=None, raw=False): - - if not next_link: - # Construct URL - url = self.list_by_resource_group.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - deserialized = models.SnapshotPaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.SnapshotPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/snapshots'} - - def list( - self, custom_headers=None, raw=False, **operation_config): - """Lists snapshots under a subscription. - - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of Snapshot - :rtype: - ~azure.mgmt.compute.v2018_09_30.models.SnapshotPaged[~azure.mgmt.compute.v2018_09_30.models.Snapshot] - :raises: :class:`CloudError` - """ - def internal_paging(next_link=None, raw=False): - - if not next_link: - # Construct URL - url = self.list.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - deserialized = models.SnapshotPaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.SnapshotPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Compute/snapshots'} - - - def _grant_access_initial( - self, resource_group_name, snapshot_name, access, duration_in_seconds, custom_headers=None, raw=False, **operation_config): - grant_access_data = models.GrantAccessData(access=access, duration_in_seconds=duration_in_seconds) - - # Construct URL - url = self.grant_access.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'snapshotName': self._serialize.url("snapshot_name", snapshot_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(grant_access_data, 'GrantAccessData') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('AccessUri', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def grant_access( - self, resource_group_name, snapshot_name, access, duration_in_seconds, custom_headers=None, raw=False, polling=True, **operation_config): - """Grants access to a snapshot. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param snapshot_name: The name of the snapshot that is being created. - The name can't be changed after the snapshot is created. Supported - characters for the name are a-z, A-Z, 0-9 and _. The max name length - is 80 characters. - :type snapshot_name: str - :param access: Possible values include: 'None', 'Read', 'Write' - :type access: str or - ~azure.mgmt.compute.v2018_09_30.models.AccessLevel - :param duration_in_seconds: Time duration in seconds until the SAS - access expires. - :type duration_in_seconds: int - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns AccessUri or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2018_09_30.models.AccessUri] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2018_09_30.models.AccessUri]] - :raises: :class:`CloudError` - """ - raw_result = self._grant_access_initial( - resource_group_name=resource_group_name, - snapshot_name=snapshot_name, - access=access, - duration_in_seconds=duration_in_seconds, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('AccessUri', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - grant_access.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/snapshots/{snapshotName}/beginGetAccess'} - - - def _revoke_access_initial( - self, resource_group_name, snapshot_name, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.revoke_access.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'snapshotName': self._serialize.url("snapshot_name", snapshot_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - def revoke_access( - self, resource_group_name, snapshot_name, custom_headers=None, raw=False, polling=True, **operation_config): - """Revokes access to a snapshot. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param snapshot_name: The name of the snapshot that is being created. - The name can't be changed after the snapshot is created. Supported - characters for the name are a-z, A-Z, 0-9 and _. The max name length - is 80 characters. - :type snapshot_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns None or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] - :raises: :class:`CloudError` - """ - raw_result = self._revoke_access_initial( - resource_group_name=resource_group_name, - snapshot_name=snapshot_name, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - revoke_access.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/snapshots/{snapshotName}/endGetAccess'} diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/__init__.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/__init__.py index 88ded2f640de..a7bc1ce68e37 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/__init__.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/__init__.py @@ -9,10 +9,11 @@ # regenerated. # -------------------------------------------------------------------------- -from .compute_management_client import ComputeManagementClient -from .version import VERSION +from ._configuration import ComputeManagementClientConfiguration +from ._compute_management_client import ComputeManagementClient +__all__ = ['ComputeManagementClient', 'ComputeManagementClientConfiguration'] -__all__ = ['ComputeManagementClient'] +from .version import VERSION __version__ = VERSION diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/_compute_management_client.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/_compute_management_client.py new file mode 100644 index 000000000000..602d4d98a2bf --- /dev/null +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/_compute_management_client.py @@ -0,0 +1,126 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.service_client import SDKClient +from msrest import Serializer, Deserializer + +from ._configuration import ComputeManagementClientConfiguration +from .operations import Operations +from .operations import AvailabilitySetsOperations +from .operations import ProximityPlacementGroupsOperations +from .operations import VirtualMachineExtensionImagesOperations +from .operations import VirtualMachineExtensionsOperations +from .operations import VirtualMachineImagesOperations +from .operations import UsageOperations +from .operations import VirtualMachinesOperations +from .operations import VirtualMachineSizesOperations +from .operations import ImagesOperations +from .operations import VirtualMachineScaleSetsOperations +from .operations import VirtualMachineScaleSetExtensionsOperations +from .operations import VirtualMachineScaleSetRollingUpgradesOperations +from .operations import VirtualMachineScaleSetVMsOperations +from .operations import LogAnalyticsOperations +from .operations import VirtualMachineRunCommandsOperations +from . import models + + +class ComputeManagementClient(SDKClient): + """Compute Client + + :ivar config: Configuration for client. + :vartype config: ComputeManagementClientConfiguration + + :ivar operations: Operations operations + :vartype operations: azure.mgmt.compute.v2018_10_01.operations.Operations + :ivar availability_sets: AvailabilitySets operations + :vartype availability_sets: azure.mgmt.compute.v2018_10_01.operations.AvailabilitySetsOperations + :ivar proximity_placement_groups: ProximityPlacementGroups operations + :vartype proximity_placement_groups: azure.mgmt.compute.v2018_10_01.operations.ProximityPlacementGroupsOperations + :ivar virtual_machine_extension_images: VirtualMachineExtensionImages operations + :vartype virtual_machine_extension_images: azure.mgmt.compute.v2018_10_01.operations.VirtualMachineExtensionImagesOperations + :ivar virtual_machine_extensions: VirtualMachineExtensions operations + :vartype virtual_machine_extensions: azure.mgmt.compute.v2018_10_01.operations.VirtualMachineExtensionsOperations + :ivar virtual_machine_images: VirtualMachineImages operations + :vartype virtual_machine_images: azure.mgmt.compute.v2018_10_01.operations.VirtualMachineImagesOperations + :ivar usage: Usage operations + :vartype usage: azure.mgmt.compute.v2018_10_01.operations.UsageOperations + :ivar virtual_machines: VirtualMachines operations + :vartype virtual_machines: azure.mgmt.compute.v2018_10_01.operations.VirtualMachinesOperations + :ivar virtual_machine_sizes: VirtualMachineSizes operations + :vartype virtual_machine_sizes: azure.mgmt.compute.v2018_10_01.operations.VirtualMachineSizesOperations + :ivar images: Images operations + :vartype images: azure.mgmt.compute.v2018_10_01.operations.ImagesOperations + :ivar virtual_machine_scale_sets: VirtualMachineScaleSets operations + :vartype virtual_machine_scale_sets: azure.mgmt.compute.v2018_10_01.operations.VirtualMachineScaleSetsOperations + :ivar virtual_machine_scale_set_extensions: VirtualMachineScaleSetExtensions operations + :vartype virtual_machine_scale_set_extensions: azure.mgmt.compute.v2018_10_01.operations.VirtualMachineScaleSetExtensionsOperations + :ivar virtual_machine_scale_set_rolling_upgrades: VirtualMachineScaleSetRollingUpgrades operations + :vartype virtual_machine_scale_set_rolling_upgrades: azure.mgmt.compute.v2018_10_01.operations.VirtualMachineScaleSetRollingUpgradesOperations + :ivar virtual_machine_scale_set_vms: VirtualMachineScaleSetVMs operations + :vartype virtual_machine_scale_set_vms: azure.mgmt.compute.v2018_10_01.operations.VirtualMachineScaleSetVMsOperations + :ivar log_analytics: LogAnalytics operations + :vartype log_analytics: azure.mgmt.compute.v2018_10_01.operations.LogAnalyticsOperations + :ivar virtual_machine_run_commands: VirtualMachineRunCommands operations + :vartype virtual_machine_run_commands: azure.mgmt.compute.v2018_10_01.operations.VirtualMachineRunCommandsOperations + + :param credentials: Credentials needed for the client to connect to Azure. + :type credentials: :mod:`A msrestazure Credentials + object` + :param subscription_id: Subscription credentials which uniquely identify + Microsoft Azure subscription. The subscription ID forms part of the URI + for every service call. + :type subscription_id: str + :param str base_url: Service URL + """ + + def __init__( + self, credentials, subscription_id, base_url=None): + + self.config = ComputeManagementClientConfiguration(credentials, subscription_id, base_url) + super(ComputeManagementClient, self).__init__(self.config.credentials, self.config) + + client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} + self.api_version = '2018-10-01' + self._serialize = Serializer(client_models) + self._deserialize = Deserializer(client_models) + + self.operations = Operations( + self._client, self.config, self._serialize, self._deserialize) + self.availability_sets = AvailabilitySetsOperations( + self._client, self.config, self._serialize, self._deserialize) + self.proximity_placement_groups = ProximityPlacementGroupsOperations( + self._client, self.config, self._serialize, self._deserialize) + self.virtual_machine_extension_images = VirtualMachineExtensionImagesOperations( + self._client, self.config, self._serialize, self._deserialize) + self.virtual_machine_extensions = VirtualMachineExtensionsOperations( + self._client, self.config, self._serialize, self._deserialize) + self.virtual_machine_images = VirtualMachineImagesOperations( + self._client, self.config, self._serialize, self._deserialize) + self.usage = UsageOperations( + self._client, self.config, self._serialize, self._deserialize) + self.virtual_machines = VirtualMachinesOperations( + self._client, self.config, self._serialize, self._deserialize) + self.virtual_machine_sizes = VirtualMachineSizesOperations( + self._client, self.config, self._serialize, self._deserialize) + self.images = ImagesOperations( + self._client, self.config, self._serialize, self._deserialize) + self.virtual_machine_scale_sets = VirtualMachineScaleSetsOperations( + self._client, self.config, self._serialize, self._deserialize) + self.virtual_machine_scale_set_extensions = VirtualMachineScaleSetExtensionsOperations( + self._client, self.config, self._serialize, self._deserialize) + self.virtual_machine_scale_set_rolling_upgrades = VirtualMachineScaleSetRollingUpgradesOperations( + self._client, self.config, self._serialize, self._deserialize) + self.virtual_machine_scale_set_vms = VirtualMachineScaleSetVMsOperations( + self._client, self.config, self._serialize, self._deserialize) + self.log_analytics = LogAnalyticsOperations( + self._client, self.config, self._serialize, self._deserialize) + self.virtual_machine_run_commands = VirtualMachineRunCommandsOperations( + self._client, self.config, self._serialize, self._deserialize) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/_configuration.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/_configuration.py new file mode 100644 index 000000000000..0fcf5984e2ca --- /dev/null +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/_configuration.py @@ -0,0 +1,50 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- +from msrestazure import AzureConfiguration + +from .version import VERSION + + +class ComputeManagementClientConfiguration(AzureConfiguration): + """Configuration for ComputeManagementClient + Note that all parameters used to create this instance are saved as instance + attributes. + + :param credentials: Credentials needed for the client to connect to Azure. + :type credentials: :mod:`A msrestazure Credentials + object` + :param subscription_id: Subscription credentials which uniquely identify + Microsoft Azure subscription. The subscription ID forms part of the URI + for every service call. + :type subscription_id: str + :param str base_url: Service URL + """ + + def __init__( + self, credentials, subscription_id, base_url=None): + + if credentials is None: + raise ValueError("Parameter 'credentials' must not be None.") + if subscription_id is None: + raise ValueError("Parameter 'subscription_id' must not be None.") + if not base_url: + base_url = 'https://management.azure.com' + + super(ComputeManagementClientConfiguration, self).__init__(base_url) + + # Starting Autorest.Python 4.0.64, make connection pool activated by default + self.keep_alive = True + + self.add_user_agent('azure-mgmt-compute/{}'.format(VERSION)) + self.add_user_agent('Azure-SDK-For-Python') + + self.credentials = credentials + self.subscription_id = subscription_id diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/compute_management_client.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/compute_management_client.py deleted file mode 100644 index d60cbf9d2dba..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/compute_management_client.py +++ /dev/null @@ -1,160 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.service_client import SDKClient -from msrest import Serializer, Deserializer -from msrestazure import AzureConfiguration -from .version import VERSION -from .operations.operations import Operations -from .operations.availability_sets_operations import AvailabilitySetsOperations -from .operations.proximity_placement_groups_operations import ProximityPlacementGroupsOperations -from .operations.virtual_machine_extension_images_operations import VirtualMachineExtensionImagesOperations -from .operations.virtual_machine_extensions_operations import VirtualMachineExtensionsOperations -from .operations.virtual_machine_images_operations import VirtualMachineImagesOperations -from .operations.usage_operations import UsageOperations -from .operations.virtual_machines_operations import VirtualMachinesOperations -from .operations.virtual_machine_sizes_operations import VirtualMachineSizesOperations -from .operations.images_operations import ImagesOperations -from .operations.virtual_machine_scale_sets_operations import VirtualMachineScaleSetsOperations -from .operations.virtual_machine_scale_set_extensions_operations import VirtualMachineScaleSetExtensionsOperations -from .operations.virtual_machine_scale_set_rolling_upgrades_operations import VirtualMachineScaleSetRollingUpgradesOperations -from .operations.virtual_machine_scale_set_vms_operations import VirtualMachineScaleSetVMsOperations -from .operations.log_analytics_operations import LogAnalyticsOperations -from .operations.virtual_machine_run_commands_operations import VirtualMachineRunCommandsOperations -from . import models - - -class ComputeManagementClientConfiguration(AzureConfiguration): - """Configuration for ComputeManagementClient - Note that all parameters used to create this instance are saved as instance - attributes. - - :param credentials: Credentials needed for the client to connect to Azure. - :type credentials: :mod:`A msrestazure Credentials - object` - :param subscription_id: Subscription credentials which uniquely identify - Microsoft Azure subscription. The subscription ID forms part of the URI - for every service call. - :type subscription_id: str - :param str base_url: Service URL - """ - - def __init__( - self, credentials, subscription_id, base_url=None): - - if credentials is None: - raise ValueError("Parameter 'credentials' must not be None.") - if subscription_id is None: - raise ValueError("Parameter 'subscription_id' must not be None.") - if not base_url: - base_url = 'https://management.azure.com' - - super(ComputeManagementClientConfiguration, self).__init__(base_url) - - self.add_user_agent('azure-mgmt-compute/{}'.format(VERSION)) - self.add_user_agent('Azure-SDK-For-Python') - - self.credentials = credentials - self.subscription_id = subscription_id - - -class ComputeManagementClient(SDKClient): - """Compute Client - - :ivar config: Configuration for client. - :vartype config: ComputeManagementClientConfiguration - - :ivar operations: Operations operations - :vartype operations: azure.mgmt.compute.v2018_10_01.operations.Operations - :ivar availability_sets: AvailabilitySets operations - :vartype availability_sets: azure.mgmt.compute.v2018_10_01.operations.AvailabilitySetsOperations - :ivar proximity_placement_groups: ProximityPlacementGroups operations - :vartype proximity_placement_groups: azure.mgmt.compute.v2018_10_01.operations.ProximityPlacementGroupsOperations - :ivar virtual_machine_extension_images: VirtualMachineExtensionImages operations - :vartype virtual_machine_extension_images: azure.mgmt.compute.v2018_10_01.operations.VirtualMachineExtensionImagesOperations - :ivar virtual_machine_extensions: VirtualMachineExtensions operations - :vartype virtual_machine_extensions: azure.mgmt.compute.v2018_10_01.operations.VirtualMachineExtensionsOperations - :ivar virtual_machine_images: VirtualMachineImages operations - :vartype virtual_machine_images: azure.mgmt.compute.v2018_10_01.operations.VirtualMachineImagesOperations - :ivar usage: Usage operations - :vartype usage: azure.mgmt.compute.v2018_10_01.operations.UsageOperations - :ivar virtual_machines: VirtualMachines operations - :vartype virtual_machines: azure.mgmt.compute.v2018_10_01.operations.VirtualMachinesOperations - :ivar virtual_machine_sizes: VirtualMachineSizes operations - :vartype virtual_machine_sizes: azure.mgmt.compute.v2018_10_01.operations.VirtualMachineSizesOperations - :ivar images: Images operations - :vartype images: azure.mgmt.compute.v2018_10_01.operations.ImagesOperations - :ivar virtual_machine_scale_sets: VirtualMachineScaleSets operations - :vartype virtual_machine_scale_sets: azure.mgmt.compute.v2018_10_01.operations.VirtualMachineScaleSetsOperations - :ivar virtual_machine_scale_set_extensions: VirtualMachineScaleSetExtensions operations - :vartype virtual_machine_scale_set_extensions: azure.mgmt.compute.v2018_10_01.operations.VirtualMachineScaleSetExtensionsOperations - :ivar virtual_machine_scale_set_rolling_upgrades: VirtualMachineScaleSetRollingUpgrades operations - :vartype virtual_machine_scale_set_rolling_upgrades: azure.mgmt.compute.v2018_10_01.operations.VirtualMachineScaleSetRollingUpgradesOperations - :ivar virtual_machine_scale_set_vms: VirtualMachineScaleSetVMs operations - :vartype virtual_machine_scale_set_vms: azure.mgmt.compute.v2018_10_01.operations.VirtualMachineScaleSetVMsOperations - :ivar log_analytics: LogAnalytics operations - :vartype log_analytics: azure.mgmt.compute.v2018_10_01.operations.LogAnalyticsOperations - :ivar virtual_machine_run_commands: VirtualMachineRunCommands operations - :vartype virtual_machine_run_commands: azure.mgmt.compute.v2018_10_01.operations.VirtualMachineRunCommandsOperations - - :param credentials: Credentials needed for the client to connect to Azure. - :type credentials: :mod:`A msrestazure Credentials - object` - :param subscription_id: Subscription credentials which uniquely identify - Microsoft Azure subscription. The subscription ID forms part of the URI - for every service call. - :type subscription_id: str - :param str base_url: Service URL - """ - - def __init__( - self, credentials, subscription_id, base_url=None): - - self.config = ComputeManagementClientConfiguration(credentials, subscription_id, base_url) - super(ComputeManagementClient, self).__init__(self.config.credentials, self.config) - - client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} - self.api_version = '2018-10-01' - self._serialize = Serializer(client_models) - self._deserialize = Deserializer(client_models) - - self.operations = Operations( - self._client, self.config, self._serialize, self._deserialize) - self.availability_sets = AvailabilitySetsOperations( - self._client, self.config, self._serialize, self._deserialize) - self.proximity_placement_groups = ProximityPlacementGroupsOperations( - self._client, self.config, self._serialize, self._deserialize) - self.virtual_machine_extension_images = VirtualMachineExtensionImagesOperations( - self._client, self.config, self._serialize, self._deserialize) - self.virtual_machine_extensions = VirtualMachineExtensionsOperations( - self._client, self.config, self._serialize, self._deserialize) - self.virtual_machine_images = VirtualMachineImagesOperations( - self._client, self.config, self._serialize, self._deserialize) - self.usage = UsageOperations( - self._client, self.config, self._serialize, self._deserialize) - self.virtual_machines = VirtualMachinesOperations( - self._client, self.config, self._serialize, self._deserialize) - self.virtual_machine_sizes = VirtualMachineSizesOperations( - self._client, self.config, self._serialize, self._deserialize) - self.images = ImagesOperations( - self._client, self.config, self._serialize, self._deserialize) - self.virtual_machine_scale_sets = VirtualMachineScaleSetsOperations( - self._client, self.config, self._serialize, self._deserialize) - self.virtual_machine_scale_set_extensions = VirtualMachineScaleSetExtensionsOperations( - self._client, self.config, self._serialize, self._deserialize) - self.virtual_machine_scale_set_rolling_upgrades = VirtualMachineScaleSetRollingUpgradesOperations( - self._client, self.config, self._serialize, self._deserialize) - self.virtual_machine_scale_set_vms = VirtualMachineScaleSetVMsOperations( - self._client, self.config, self._serialize, self._deserialize) - self.log_analytics = LogAnalyticsOperations( - self._client, self.config, self._serialize, self._deserialize) - self.virtual_machine_run_commands = VirtualMachineRunCommandsOperations( - self._client, self.config, self._serialize, self._deserialize) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/__init__.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/__init__.py index d72e960b4d23..bfa7928cb119 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/__init__.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/__init__.py @@ -10,293 +10,293 @@ # -------------------------------------------------------------------------- try: - from .compute_operation_value_py3 import ComputeOperationValue - from .instance_view_status_py3 import InstanceViewStatus - from .sub_resource_py3 import SubResource - from .sku_py3 import Sku - from .availability_set_py3 import AvailabilitySet - from .availability_set_update_py3 import AvailabilitySetUpdate - from .proximity_placement_group_py3 import ProximityPlacementGroup - from .proximity_placement_group_update_py3 import ProximityPlacementGroupUpdate - from .virtual_machine_size_py3 import VirtualMachineSize - from .virtual_machine_extension_image_py3 import VirtualMachineExtensionImage - from .virtual_machine_image_resource_py3 import VirtualMachineImageResource - from .virtual_machine_extension_instance_view_py3 import VirtualMachineExtensionInstanceView - from .virtual_machine_extension_py3 import VirtualMachineExtension - from .virtual_machine_extension_update_py3 import VirtualMachineExtensionUpdate - from .virtual_machine_extensions_list_result_py3 import VirtualMachineExtensionsListResult - from .purchase_plan_py3 import PurchasePlan - from .os_disk_image_py3 import OSDiskImage - from .data_disk_image_py3 import DataDiskImage - from .automatic_os_upgrade_properties_py3 import AutomaticOSUpgradeProperties - from .virtual_machine_image_py3 import VirtualMachineImage - from .usage_name_py3 import UsageName - from .usage_py3 import Usage - from .virtual_machine_reimage_parameters_py3 import VirtualMachineReimageParameters - from .virtual_machine_capture_parameters_py3 import VirtualMachineCaptureParameters - from .virtual_machine_capture_result_py3 import VirtualMachineCaptureResult - from .plan_py3 import Plan - from .hardware_profile_py3 import HardwareProfile - from .image_reference_py3 import ImageReference - from .key_vault_secret_reference_py3 import KeyVaultSecretReference - from .key_vault_key_reference_py3 import KeyVaultKeyReference - from .disk_encryption_settings_py3 import DiskEncryptionSettings - from .virtual_hard_disk_py3 import VirtualHardDisk - from .diff_disk_settings_py3 import DiffDiskSettings - from .managed_disk_parameters_py3 import ManagedDiskParameters - from .os_disk_py3 import OSDisk - from .data_disk_py3 import DataDisk - from .storage_profile_py3 import StorageProfile - from .additional_capabilities_py3 import AdditionalCapabilities - from .additional_unattend_content_py3 import AdditionalUnattendContent - from .win_rm_listener_py3 import WinRMListener - from .win_rm_configuration_py3 import WinRMConfiguration - from .windows_configuration_py3 import WindowsConfiguration - from .ssh_public_key_py3 import SshPublicKey - from .ssh_configuration_py3 import SshConfiguration - from .linux_configuration_py3 import LinuxConfiguration - from .vault_certificate_py3 import VaultCertificate - from .vault_secret_group_py3 import VaultSecretGroup - from .os_profile_py3 import OSProfile - from .network_interface_reference_py3 import NetworkInterfaceReference - from .network_profile_py3 import NetworkProfile - from .boot_diagnostics_py3 import BootDiagnostics - from .diagnostics_profile_py3 import DiagnosticsProfile - from .virtual_machine_extension_handler_instance_view_py3 import VirtualMachineExtensionHandlerInstanceView - from .virtual_machine_agent_instance_view_py3 import VirtualMachineAgentInstanceView - from .disk_instance_view_py3 import DiskInstanceView - from .boot_diagnostics_instance_view_py3 import BootDiagnosticsInstanceView - from .virtual_machine_identity_user_assigned_identities_value_py3 import VirtualMachineIdentityUserAssignedIdentitiesValue - from .virtual_machine_identity_py3 import VirtualMachineIdentity - from .maintenance_redeploy_status_py3 import MaintenanceRedeployStatus - from .virtual_machine_instance_view_py3 import VirtualMachineInstanceView - from .virtual_machine_py3 import VirtualMachine - from .virtual_machine_update_py3 import VirtualMachineUpdate - from .automatic_os_upgrade_policy_py3 import AutomaticOSUpgradePolicy - from .rolling_upgrade_policy_py3 import RollingUpgradePolicy - from .upgrade_policy_py3 import UpgradePolicy - from .image_os_disk_py3 import ImageOSDisk - from .image_data_disk_py3 import ImageDataDisk - from .image_storage_profile_py3 import ImageStorageProfile - from .image_py3 import Image - from .image_update_py3 import ImageUpdate - from .virtual_machine_scale_set_identity_user_assigned_identities_value_py3 import VirtualMachineScaleSetIdentityUserAssignedIdentitiesValue - from .virtual_machine_scale_set_identity_py3 import VirtualMachineScaleSetIdentity - from .virtual_machine_scale_set_os_profile_py3 import VirtualMachineScaleSetOSProfile - from .virtual_machine_scale_set_update_os_profile_py3 import VirtualMachineScaleSetUpdateOSProfile - from .virtual_machine_scale_set_managed_disk_parameters_py3 import VirtualMachineScaleSetManagedDiskParameters - from .virtual_machine_scale_set_os_disk_py3 import VirtualMachineScaleSetOSDisk - from .virtual_machine_scale_set_update_os_disk_py3 import VirtualMachineScaleSetUpdateOSDisk - from .virtual_machine_scale_set_data_disk_py3 import VirtualMachineScaleSetDataDisk - from .virtual_machine_scale_set_storage_profile_py3 import VirtualMachineScaleSetStorageProfile - from .virtual_machine_scale_set_update_storage_profile_py3 import VirtualMachineScaleSetUpdateStorageProfile - from .api_entity_reference_py3 import ApiEntityReference - from .virtual_machine_scale_set_public_ip_address_configuration_dns_settings_py3 import VirtualMachineScaleSetPublicIPAddressConfigurationDnsSettings - from .virtual_machine_scale_set_ip_tag_py3 import VirtualMachineScaleSetIpTag - from .virtual_machine_scale_set_public_ip_address_configuration_py3 import VirtualMachineScaleSetPublicIPAddressConfiguration - from .virtual_machine_scale_set_update_public_ip_address_configuration_py3 import VirtualMachineScaleSetUpdatePublicIPAddressConfiguration - from .virtual_machine_scale_set_ip_configuration_py3 import VirtualMachineScaleSetIPConfiguration - from .virtual_machine_scale_set_update_ip_configuration_py3 import VirtualMachineScaleSetUpdateIPConfiguration - from .virtual_machine_scale_set_network_configuration_dns_settings_py3 import VirtualMachineScaleSetNetworkConfigurationDnsSettings - from .virtual_machine_scale_set_network_configuration_py3 import VirtualMachineScaleSetNetworkConfiguration - from .virtual_machine_scale_set_update_network_configuration_py3 import VirtualMachineScaleSetUpdateNetworkConfiguration - from .virtual_machine_scale_set_network_profile_py3 import VirtualMachineScaleSetNetworkProfile - from .virtual_machine_scale_set_update_network_profile_py3 import VirtualMachineScaleSetUpdateNetworkProfile - from .virtual_machine_scale_set_extension_py3 import VirtualMachineScaleSetExtension - from .virtual_machine_scale_set_extension_profile_py3 import VirtualMachineScaleSetExtensionProfile - from .virtual_machine_scale_set_vm_profile_py3 import VirtualMachineScaleSetVMProfile - from .virtual_machine_scale_set_update_vm_profile_py3 import VirtualMachineScaleSetUpdateVMProfile - from .virtual_machine_scale_set_py3 import VirtualMachineScaleSet - from .virtual_machine_scale_set_vm_reimage_parameters_py3 import VirtualMachineScaleSetVMReimageParameters - from .virtual_machine_scale_set_reimage_parameters_py3 import VirtualMachineScaleSetReimageParameters - from .virtual_machine_scale_set_update_py3 import VirtualMachineScaleSetUpdate - from .virtual_machine_scale_set_vm_instance_ids_py3 import VirtualMachineScaleSetVMInstanceIDs - from .virtual_machine_scale_set_vm_instance_required_ids_py3 import VirtualMachineScaleSetVMInstanceRequiredIDs - from .virtual_machine_status_code_count_py3 import VirtualMachineStatusCodeCount - from .virtual_machine_scale_set_instance_view_statuses_summary_py3 import VirtualMachineScaleSetInstanceViewStatusesSummary - from .virtual_machine_scale_set_vm_extensions_summary_py3 import VirtualMachineScaleSetVMExtensionsSummary - from .virtual_machine_scale_set_instance_view_py3 import VirtualMachineScaleSetInstanceView - from .virtual_machine_scale_set_sku_capacity_py3 import VirtualMachineScaleSetSkuCapacity - from .virtual_machine_scale_set_sku_py3 import VirtualMachineScaleSetSku - from .api_error_base_py3 import ApiErrorBase - from .inner_error_py3 import InnerError - from .api_error_py3 import ApiError - from .rollback_status_info_py3 import RollbackStatusInfo - from .upgrade_operation_history_status_py3 import UpgradeOperationHistoryStatus - from .rolling_upgrade_progress_info_py3 import RollingUpgradeProgressInfo - from .upgrade_operation_historical_status_info_properties_py3 import UpgradeOperationHistoricalStatusInfoProperties - from .upgrade_operation_historical_status_info_py3 import UpgradeOperationHistoricalStatusInfo - from .virtual_machine_health_status_py3 import VirtualMachineHealthStatus - from .virtual_machine_scale_set_vm_instance_view_py3 import VirtualMachineScaleSetVMInstanceView - from .virtual_machine_scale_set_vm_py3 import VirtualMachineScaleSetVM - from .rolling_upgrade_running_status_py3 import RollingUpgradeRunningStatus - from .rolling_upgrade_status_info_py3 import RollingUpgradeStatusInfo - from .resource_py3 import Resource - from .update_resource_py3 import UpdateResource - from .sub_resource_read_only_py3 import SubResourceReadOnly - from .recovery_walk_response_py3 import RecoveryWalkResponse - from .request_rate_by_interval_input_py3 import RequestRateByIntervalInput - from .throttled_requests_input_py3 import ThrottledRequestsInput - from .log_analytics_input_base_py3 import LogAnalyticsInputBase - from .log_analytics_output_py3 import LogAnalyticsOutput - from .log_analytics_operation_result_py3 import LogAnalyticsOperationResult - from .run_command_input_parameter_py3 import RunCommandInputParameter - from .run_command_input_py3 import RunCommandInput - from .run_command_parameter_definition_py3 import RunCommandParameterDefinition - from .run_command_document_base_py3 import RunCommandDocumentBase - from .run_command_document_py3 import RunCommandDocument - from .run_command_result_py3 import RunCommandResult + from ._models_py3 import AdditionalCapabilities + from ._models_py3 import AdditionalUnattendContent + from ._models_py3 import ApiEntityReference + from ._models_py3 import ApiError + from ._models_py3 import ApiErrorBase + from ._models_py3 import AutomaticOSUpgradePolicy + from ._models_py3 import AutomaticOSUpgradeProperties + from ._models_py3 import AvailabilitySet + from ._models_py3 import AvailabilitySetUpdate + from ._models_py3 import BootDiagnostics + from ._models_py3 import BootDiagnosticsInstanceView + from ._models_py3 import ComputeOperationValue + from ._models_py3 import DataDisk + from ._models_py3 import DataDiskImage + from ._models_py3 import DiagnosticsProfile + from ._models_py3 import DiffDiskSettings + from ._models_py3 import DiskEncryptionSettings + from ._models_py3 import DiskInstanceView + from ._models_py3 import HardwareProfile + from ._models_py3 import Image + from ._models_py3 import ImageDataDisk + from ._models_py3 import ImageOSDisk + from ._models_py3 import ImageReference + from ._models_py3 import ImageStorageProfile + from ._models_py3 import ImageUpdate + from ._models_py3 import InnerError + from ._models_py3 import InstanceViewStatus + from ._models_py3 import KeyVaultKeyReference + from ._models_py3 import KeyVaultSecretReference + from ._models_py3 import LinuxConfiguration + from ._models_py3 import LogAnalyticsInputBase + from ._models_py3 import LogAnalyticsOperationResult + from ._models_py3 import LogAnalyticsOutput + from ._models_py3 import MaintenanceRedeployStatus + from ._models_py3 import ManagedDiskParameters + from ._models_py3 import NetworkInterfaceReference + from ._models_py3 import NetworkProfile + from ._models_py3 import OSDisk + from ._models_py3 import OSDiskImage + from ._models_py3 import OSProfile + from ._models_py3 import Plan + from ._models_py3 import ProximityPlacementGroup + from ._models_py3 import ProximityPlacementGroupUpdate + from ._models_py3 import PurchasePlan + from ._models_py3 import RecoveryWalkResponse + from ._models_py3 import RequestRateByIntervalInput + from ._models_py3 import Resource + from ._models_py3 import RollbackStatusInfo + from ._models_py3 import RollingUpgradePolicy + from ._models_py3 import RollingUpgradeProgressInfo + from ._models_py3 import RollingUpgradeRunningStatus + from ._models_py3 import RollingUpgradeStatusInfo + from ._models_py3 import RunCommandDocument + from ._models_py3 import RunCommandDocumentBase + from ._models_py3 import RunCommandInput + from ._models_py3 import RunCommandInputParameter + from ._models_py3 import RunCommandParameterDefinition + from ._models_py3 import RunCommandResult + from ._models_py3 import Sku + from ._models_py3 import SshConfiguration + from ._models_py3 import SshPublicKey + from ._models_py3 import StorageProfile + from ._models_py3 import SubResource + from ._models_py3 import SubResourceReadOnly + from ._models_py3 import ThrottledRequestsInput + from ._models_py3 import UpdateResource + from ._models_py3 import UpgradeOperationHistoricalStatusInfo + from ._models_py3 import UpgradeOperationHistoricalStatusInfoProperties + from ._models_py3 import UpgradeOperationHistoryStatus + from ._models_py3 import UpgradePolicy + from ._models_py3 import Usage + from ._models_py3 import UsageName + from ._models_py3 import VaultCertificate + from ._models_py3 import VaultSecretGroup + from ._models_py3 import VirtualHardDisk + from ._models_py3 import VirtualMachine + from ._models_py3 import VirtualMachineAgentInstanceView + from ._models_py3 import VirtualMachineCaptureParameters + from ._models_py3 import VirtualMachineCaptureResult + from ._models_py3 import VirtualMachineExtension + from ._models_py3 import VirtualMachineExtensionHandlerInstanceView + from ._models_py3 import VirtualMachineExtensionImage + from ._models_py3 import VirtualMachineExtensionInstanceView + from ._models_py3 import VirtualMachineExtensionsListResult + from ._models_py3 import VirtualMachineExtensionUpdate + from ._models_py3 import VirtualMachineHealthStatus + from ._models_py3 import VirtualMachineIdentity + from ._models_py3 import VirtualMachineIdentityUserAssignedIdentitiesValue + from ._models_py3 import VirtualMachineImage + from ._models_py3 import VirtualMachineImageResource + from ._models_py3 import VirtualMachineInstanceView + from ._models_py3 import VirtualMachineReimageParameters + from ._models_py3 import VirtualMachineScaleSet + from ._models_py3 import VirtualMachineScaleSetDataDisk + from ._models_py3 import VirtualMachineScaleSetExtension + from ._models_py3 import VirtualMachineScaleSetExtensionProfile + from ._models_py3 import VirtualMachineScaleSetIdentity + from ._models_py3 import VirtualMachineScaleSetIdentityUserAssignedIdentitiesValue + from ._models_py3 import VirtualMachineScaleSetInstanceView + from ._models_py3 import VirtualMachineScaleSetInstanceViewStatusesSummary + from ._models_py3 import VirtualMachineScaleSetIPConfiguration + from ._models_py3 import VirtualMachineScaleSetIpTag + from ._models_py3 import VirtualMachineScaleSetManagedDiskParameters + from ._models_py3 import VirtualMachineScaleSetNetworkConfiguration + from ._models_py3 import VirtualMachineScaleSetNetworkConfigurationDnsSettings + from ._models_py3 import VirtualMachineScaleSetNetworkProfile + from ._models_py3 import VirtualMachineScaleSetOSDisk + from ._models_py3 import VirtualMachineScaleSetOSProfile + from ._models_py3 import VirtualMachineScaleSetPublicIPAddressConfiguration + from ._models_py3 import VirtualMachineScaleSetPublicIPAddressConfigurationDnsSettings + from ._models_py3 import VirtualMachineScaleSetReimageParameters + from ._models_py3 import VirtualMachineScaleSetSku + from ._models_py3 import VirtualMachineScaleSetSkuCapacity + from ._models_py3 import VirtualMachineScaleSetStorageProfile + from ._models_py3 import VirtualMachineScaleSetUpdate + from ._models_py3 import VirtualMachineScaleSetUpdateIPConfiguration + from ._models_py3 import VirtualMachineScaleSetUpdateNetworkConfiguration + from ._models_py3 import VirtualMachineScaleSetUpdateNetworkProfile + from ._models_py3 import VirtualMachineScaleSetUpdateOSDisk + from ._models_py3 import VirtualMachineScaleSetUpdateOSProfile + from ._models_py3 import VirtualMachineScaleSetUpdatePublicIPAddressConfiguration + from ._models_py3 import VirtualMachineScaleSetUpdateStorageProfile + from ._models_py3 import VirtualMachineScaleSetUpdateVMProfile + from ._models_py3 import VirtualMachineScaleSetVM + from ._models_py3 import VirtualMachineScaleSetVMExtensionsSummary + from ._models_py3 import VirtualMachineScaleSetVMInstanceIDs + from ._models_py3 import VirtualMachineScaleSetVMInstanceRequiredIDs + from ._models_py3 import VirtualMachineScaleSetVMInstanceView + from ._models_py3 import VirtualMachineScaleSetVMProfile + from ._models_py3 import VirtualMachineScaleSetVMReimageParameters + from ._models_py3 import VirtualMachineSize + from ._models_py3 import VirtualMachineStatusCodeCount + from ._models_py3 import VirtualMachineUpdate + from ._models_py3 import WindowsConfiguration + from ._models_py3 import WinRMConfiguration + from ._models_py3 import WinRMListener except (SyntaxError, ImportError): - from .compute_operation_value import ComputeOperationValue - from .instance_view_status import InstanceViewStatus - from .sub_resource import SubResource - from .sku import Sku - from .availability_set import AvailabilitySet - from .availability_set_update import AvailabilitySetUpdate - from .proximity_placement_group import ProximityPlacementGroup - from .proximity_placement_group_update import ProximityPlacementGroupUpdate - from .virtual_machine_size import VirtualMachineSize - from .virtual_machine_extension_image import VirtualMachineExtensionImage - from .virtual_machine_image_resource import VirtualMachineImageResource - from .virtual_machine_extension_instance_view import VirtualMachineExtensionInstanceView - from .virtual_machine_extension import VirtualMachineExtension - from .virtual_machine_extension_update import VirtualMachineExtensionUpdate - from .virtual_machine_extensions_list_result import VirtualMachineExtensionsListResult - from .purchase_plan import PurchasePlan - from .os_disk_image import OSDiskImage - from .data_disk_image import DataDiskImage - from .automatic_os_upgrade_properties import AutomaticOSUpgradeProperties - from .virtual_machine_image import VirtualMachineImage - from .usage_name import UsageName - from .usage import Usage - from .virtual_machine_reimage_parameters import VirtualMachineReimageParameters - from .virtual_machine_capture_parameters import VirtualMachineCaptureParameters - from .virtual_machine_capture_result import VirtualMachineCaptureResult - from .plan import Plan - from .hardware_profile import HardwareProfile - from .image_reference import ImageReference - from .key_vault_secret_reference import KeyVaultSecretReference - from .key_vault_key_reference import KeyVaultKeyReference - from .disk_encryption_settings import DiskEncryptionSettings - from .virtual_hard_disk import VirtualHardDisk - from .diff_disk_settings import DiffDiskSettings - from .managed_disk_parameters import ManagedDiskParameters - from .os_disk import OSDisk - from .data_disk import DataDisk - from .storage_profile import StorageProfile - from .additional_capabilities import AdditionalCapabilities - from .additional_unattend_content import AdditionalUnattendContent - from .win_rm_listener import WinRMListener - from .win_rm_configuration import WinRMConfiguration - from .windows_configuration import WindowsConfiguration - from .ssh_public_key import SshPublicKey - from .ssh_configuration import SshConfiguration - from .linux_configuration import LinuxConfiguration - from .vault_certificate import VaultCertificate - from .vault_secret_group import VaultSecretGroup - from .os_profile import OSProfile - from .network_interface_reference import NetworkInterfaceReference - from .network_profile import NetworkProfile - from .boot_diagnostics import BootDiagnostics - from .diagnostics_profile import DiagnosticsProfile - from .virtual_machine_extension_handler_instance_view import VirtualMachineExtensionHandlerInstanceView - from .virtual_machine_agent_instance_view import VirtualMachineAgentInstanceView - from .disk_instance_view import DiskInstanceView - from .boot_diagnostics_instance_view import BootDiagnosticsInstanceView - from .virtual_machine_identity_user_assigned_identities_value import VirtualMachineIdentityUserAssignedIdentitiesValue - from .virtual_machine_identity import VirtualMachineIdentity - from .maintenance_redeploy_status import MaintenanceRedeployStatus - from .virtual_machine_instance_view import VirtualMachineInstanceView - from .virtual_machine import VirtualMachine - from .virtual_machine_update import VirtualMachineUpdate - from .automatic_os_upgrade_policy import AutomaticOSUpgradePolicy - from .rolling_upgrade_policy import RollingUpgradePolicy - from .upgrade_policy import UpgradePolicy - from .image_os_disk import ImageOSDisk - from .image_data_disk import ImageDataDisk - from .image_storage_profile import ImageStorageProfile - from .image import Image - from .image_update import ImageUpdate - from .virtual_machine_scale_set_identity_user_assigned_identities_value import VirtualMachineScaleSetIdentityUserAssignedIdentitiesValue - from .virtual_machine_scale_set_identity import VirtualMachineScaleSetIdentity - from .virtual_machine_scale_set_os_profile import VirtualMachineScaleSetOSProfile - from .virtual_machine_scale_set_update_os_profile import VirtualMachineScaleSetUpdateOSProfile - from .virtual_machine_scale_set_managed_disk_parameters import VirtualMachineScaleSetManagedDiskParameters - from .virtual_machine_scale_set_os_disk import VirtualMachineScaleSetOSDisk - from .virtual_machine_scale_set_update_os_disk import VirtualMachineScaleSetUpdateOSDisk - from .virtual_machine_scale_set_data_disk import VirtualMachineScaleSetDataDisk - from .virtual_machine_scale_set_storage_profile import VirtualMachineScaleSetStorageProfile - from .virtual_machine_scale_set_update_storage_profile import VirtualMachineScaleSetUpdateStorageProfile - from .api_entity_reference import ApiEntityReference - from .virtual_machine_scale_set_public_ip_address_configuration_dns_settings import VirtualMachineScaleSetPublicIPAddressConfigurationDnsSettings - from .virtual_machine_scale_set_ip_tag import VirtualMachineScaleSetIpTag - from .virtual_machine_scale_set_public_ip_address_configuration import VirtualMachineScaleSetPublicIPAddressConfiguration - from .virtual_machine_scale_set_update_public_ip_address_configuration import VirtualMachineScaleSetUpdatePublicIPAddressConfiguration - from .virtual_machine_scale_set_ip_configuration import VirtualMachineScaleSetIPConfiguration - from .virtual_machine_scale_set_update_ip_configuration import VirtualMachineScaleSetUpdateIPConfiguration - from .virtual_machine_scale_set_network_configuration_dns_settings import VirtualMachineScaleSetNetworkConfigurationDnsSettings - from .virtual_machine_scale_set_network_configuration import VirtualMachineScaleSetNetworkConfiguration - from .virtual_machine_scale_set_update_network_configuration import VirtualMachineScaleSetUpdateNetworkConfiguration - from .virtual_machine_scale_set_network_profile import VirtualMachineScaleSetNetworkProfile - from .virtual_machine_scale_set_update_network_profile import VirtualMachineScaleSetUpdateNetworkProfile - from .virtual_machine_scale_set_extension import VirtualMachineScaleSetExtension - from .virtual_machine_scale_set_extension_profile import VirtualMachineScaleSetExtensionProfile - from .virtual_machine_scale_set_vm_profile import VirtualMachineScaleSetVMProfile - from .virtual_machine_scale_set_update_vm_profile import VirtualMachineScaleSetUpdateVMProfile - from .virtual_machine_scale_set import VirtualMachineScaleSet - from .virtual_machine_scale_set_vm_reimage_parameters import VirtualMachineScaleSetVMReimageParameters - from .virtual_machine_scale_set_reimage_parameters import VirtualMachineScaleSetReimageParameters - from .virtual_machine_scale_set_update import VirtualMachineScaleSetUpdate - from .virtual_machine_scale_set_vm_instance_ids import VirtualMachineScaleSetVMInstanceIDs - from .virtual_machine_scale_set_vm_instance_required_ids import VirtualMachineScaleSetVMInstanceRequiredIDs - from .virtual_machine_status_code_count import VirtualMachineStatusCodeCount - from .virtual_machine_scale_set_instance_view_statuses_summary import VirtualMachineScaleSetInstanceViewStatusesSummary - from .virtual_machine_scale_set_vm_extensions_summary import VirtualMachineScaleSetVMExtensionsSummary - from .virtual_machine_scale_set_instance_view import VirtualMachineScaleSetInstanceView - from .virtual_machine_scale_set_sku_capacity import VirtualMachineScaleSetSkuCapacity - from .virtual_machine_scale_set_sku import VirtualMachineScaleSetSku - from .api_error_base import ApiErrorBase - from .inner_error import InnerError - from .api_error import ApiError - from .rollback_status_info import RollbackStatusInfo - from .upgrade_operation_history_status import UpgradeOperationHistoryStatus - from .rolling_upgrade_progress_info import RollingUpgradeProgressInfo - from .upgrade_operation_historical_status_info_properties import UpgradeOperationHistoricalStatusInfoProperties - from .upgrade_operation_historical_status_info import UpgradeOperationHistoricalStatusInfo - from .virtual_machine_health_status import VirtualMachineHealthStatus - from .virtual_machine_scale_set_vm_instance_view import VirtualMachineScaleSetVMInstanceView - from .virtual_machine_scale_set_vm import VirtualMachineScaleSetVM - from .rolling_upgrade_running_status import RollingUpgradeRunningStatus - from .rolling_upgrade_status_info import RollingUpgradeStatusInfo - from .resource import Resource - from .update_resource import UpdateResource - from .sub_resource_read_only import SubResourceReadOnly - from .recovery_walk_response import RecoveryWalkResponse - from .request_rate_by_interval_input import RequestRateByIntervalInput - from .throttled_requests_input import ThrottledRequestsInput - from .log_analytics_input_base import LogAnalyticsInputBase - from .log_analytics_output import LogAnalyticsOutput - from .log_analytics_operation_result import LogAnalyticsOperationResult - from .run_command_input_parameter import RunCommandInputParameter - from .run_command_input import RunCommandInput - from .run_command_parameter_definition import RunCommandParameterDefinition - from .run_command_document_base import RunCommandDocumentBase - from .run_command_document import RunCommandDocument - from .run_command_result import RunCommandResult -from .compute_operation_value_paged import ComputeOperationValuePaged -from .availability_set_paged import AvailabilitySetPaged -from .virtual_machine_size_paged import VirtualMachineSizePaged -from .proximity_placement_group_paged import ProximityPlacementGroupPaged -from .usage_paged import UsagePaged -from .virtual_machine_paged import VirtualMachinePaged -from .image_paged import ImagePaged -from .virtual_machine_scale_set_paged import VirtualMachineScaleSetPaged -from .virtual_machine_scale_set_sku_paged import VirtualMachineScaleSetSkuPaged -from .upgrade_operation_historical_status_info_paged import UpgradeOperationHistoricalStatusInfoPaged -from .virtual_machine_scale_set_extension_paged import VirtualMachineScaleSetExtensionPaged -from .virtual_machine_scale_set_vm_paged import VirtualMachineScaleSetVMPaged -from .run_command_document_base_paged import RunCommandDocumentBasePaged -from .compute_management_client_enums import ( + from ._models import AdditionalCapabilities + from ._models import AdditionalUnattendContent + from ._models import ApiEntityReference + from ._models import ApiError + from ._models import ApiErrorBase + from ._models import AutomaticOSUpgradePolicy + from ._models import AutomaticOSUpgradeProperties + from ._models import AvailabilitySet + from ._models import AvailabilitySetUpdate + from ._models import BootDiagnostics + from ._models import BootDiagnosticsInstanceView + from ._models import ComputeOperationValue + from ._models import DataDisk + from ._models import DataDiskImage + from ._models import DiagnosticsProfile + from ._models import DiffDiskSettings + from ._models import DiskEncryptionSettings + from ._models import DiskInstanceView + from ._models import HardwareProfile + from ._models import Image + from ._models import ImageDataDisk + from ._models import ImageOSDisk + from ._models import ImageReference + from ._models import ImageStorageProfile + from ._models import ImageUpdate + from ._models import InnerError + from ._models import InstanceViewStatus + from ._models import KeyVaultKeyReference + from ._models import KeyVaultSecretReference + from ._models import LinuxConfiguration + from ._models import LogAnalyticsInputBase + from ._models import LogAnalyticsOperationResult + from ._models import LogAnalyticsOutput + from ._models import MaintenanceRedeployStatus + from ._models import ManagedDiskParameters + from ._models import NetworkInterfaceReference + from ._models import NetworkProfile + from ._models import OSDisk + from ._models import OSDiskImage + from ._models import OSProfile + from ._models import Plan + from ._models import ProximityPlacementGroup + from ._models import ProximityPlacementGroupUpdate + from ._models import PurchasePlan + from ._models import RecoveryWalkResponse + from ._models import RequestRateByIntervalInput + from ._models import Resource + from ._models import RollbackStatusInfo + from ._models import RollingUpgradePolicy + from ._models import RollingUpgradeProgressInfo + from ._models import RollingUpgradeRunningStatus + from ._models import RollingUpgradeStatusInfo + from ._models import RunCommandDocument + from ._models import RunCommandDocumentBase + from ._models import RunCommandInput + from ._models import RunCommandInputParameter + from ._models import RunCommandParameterDefinition + from ._models import RunCommandResult + from ._models import Sku + from ._models import SshConfiguration + from ._models import SshPublicKey + from ._models import StorageProfile + from ._models import SubResource + from ._models import SubResourceReadOnly + from ._models import ThrottledRequestsInput + from ._models import UpdateResource + from ._models import UpgradeOperationHistoricalStatusInfo + from ._models import UpgradeOperationHistoricalStatusInfoProperties + from ._models import UpgradeOperationHistoryStatus + from ._models import UpgradePolicy + from ._models import Usage + from ._models import UsageName + from ._models import VaultCertificate + from ._models import VaultSecretGroup + from ._models import VirtualHardDisk + from ._models import VirtualMachine + from ._models import VirtualMachineAgentInstanceView + from ._models import VirtualMachineCaptureParameters + from ._models import VirtualMachineCaptureResult + from ._models import VirtualMachineExtension + from ._models import VirtualMachineExtensionHandlerInstanceView + from ._models import VirtualMachineExtensionImage + from ._models import VirtualMachineExtensionInstanceView + from ._models import VirtualMachineExtensionsListResult + from ._models import VirtualMachineExtensionUpdate + from ._models import VirtualMachineHealthStatus + from ._models import VirtualMachineIdentity + from ._models import VirtualMachineIdentityUserAssignedIdentitiesValue + from ._models import VirtualMachineImage + from ._models import VirtualMachineImageResource + from ._models import VirtualMachineInstanceView + from ._models import VirtualMachineReimageParameters + from ._models import VirtualMachineScaleSet + from ._models import VirtualMachineScaleSetDataDisk + from ._models import VirtualMachineScaleSetExtension + from ._models import VirtualMachineScaleSetExtensionProfile + from ._models import VirtualMachineScaleSetIdentity + from ._models import VirtualMachineScaleSetIdentityUserAssignedIdentitiesValue + from ._models import VirtualMachineScaleSetInstanceView + from ._models import VirtualMachineScaleSetInstanceViewStatusesSummary + from ._models import VirtualMachineScaleSetIPConfiguration + from ._models import VirtualMachineScaleSetIpTag + from ._models import VirtualMachineScaleSetManagedDiskParameters + from ._models import VirtualMachineScaleSetNetworkConfiguration + from ._models import VirtualMachineScaleSetNetworkConfigurationDnsSettings + from ._models import VirtualMachineScaleSetNetworkProfile + from ._models import VirtualMachineScaleSetOSDisk + from ._models import VirtualMachineScaleSetOSProfile + from ._models import VirtualMachineScaleSetPublicIPAddressConfiguration + from ._models import VirtualMachineScaleSetPublicIPAddressConfigurationDnsSettings + from ._models import VirtualMachineScaleSetReimageParameters + from ._models import VirtualMachineScaleSetSku + from ._models import VirtualMachineScaleSetSkuCapacity + from ._models import VirtualMachineScaleSetStorageProfile + from ._models import VirtualMachineScaleSetUpdate + from ._models import VirtualMachineScaleSetUpdateIPConfiguration + from ._models import VirtualMachineScaleSetUpdateNetworkConfiguration + from ._models import VirtualMachineScaleSetUpdateNetworkProfile + from ._models import VirtualMachineScaleSetUpdateOSDisk + from ._models import VirtualMachineScaleSetUpdateOSProfile + from ._models import VirtualMachineScaleSetUpdatePublicIPAddressConfiguration + from ._models import VirtualMachineScaleSetUpdateStorageProfile + from ._models import VirtualMachineScaleSetUpdateVMProfile + from ._models import VirtualMachineScaleSetVM + from ._models import VirtualMachineScaleSetVMExtensionsSummary + from ._models import VirtualMachineScaleSetVMInstanceIDs + from ._models import VirtualMachineScaleSetVMInstanceRequiredIDs + from ._models import VirtualMachineScaleSetVMInstanceView + from ._models import VirtualMachineScaleSetVMProfile + from ._models import VirtualMachineScaleSetVMReimageParameters + from ._models import VirtualMachineSize + from ._models import VirtualMachineStatusCodeCount + from ._models import VirtualMachineUpdate + from ._models import WindowsConfiguration + from ._models import WinRMConfiguration + from ._models import WinRMListener +from ._paged_models import AvailabilitySetPaged +from ._paged_models import ComputeOperationValuePaged +from ._paged_models import ImagePaged +from ._paged_models import ProximityPlacementGroupPaged +from ._paged_models import RunCommandDocumentBasePaged +from ._paged_models import UpgradeOperationHistoricalStatusInfoPaged +from ._paged_models import UsagePaged +from ._paged_models import VirtualMachinePaged +from ._paged_models import VirtualMachineScaleSetExtensionPaged +from ._paged_models import VirtualMachineScaleSetPaged +from ._paged_models import VirtualMachineScaleSetSkuPaged +from ._paged_models import VirtualMachineScaleSetVMPaged +from ._paged_models import VirtualMachineSizePaged +from ._compute_management_client_enums import ( StatusLevelTypes, AvailabilitySetSkuTypes, ProximityPlacementGroupType, @@ -327,142 +327,142 @@ ) __all__ = [ - 'ComputeOperationValue', - 'InstanceViewStatus', - 'SubResource', - 'Sku', + 'AdditionalCapabilities', + 'AdditionalUnattendContent', + 'ApiEntityReference', + 'ApiError', + 'ApiErrorBase', + 'AutomaticOSUpgradePolicy', + 'AutomaticOSUpgradeProperties', 'AvailabilitySet', 'AvailabilitySetUpdate', - 'ProximityPlacementGroup', - 'ProximityPlacementGroupUpdate', - 'VirtualMachineSize', - 'VirtualMachineExtensionImage', - 'VirtualMachineImageResource', - 'VirtualMachineExtensionInstanceView', - 'VirtualMachineExtension', - 'VirtualMachineExtensionUpdate', - 'VirtualMachineExtensionsListResult', - 'PurchasePlan', - 'OSDiskImage', + 'BootDiagnostics', + 'BootDiagnosticsInstanceView', + 'ComputeOperationValue', + 'DataDisk', 'DataDiskImage', - 'AutomaticOSUpgradeProperties', - 'VirtualMachineImage', - 'UsageName', - 'Usage', - 'VirtualMachineReimageParameters', - 'VirtualMachineCaptureParameters', - 'VirtualMachineCaptureResult', - 'Plan', + 'DiagnosticsProfile', + 'DiffDiskSettings', + 'DiskEncryptionSettings', + 'DiskInstanceView', 'HardwareProfile', + 'Image', + 'ImageDataDisk', + 'ImageOSDisk', 'ImageReference', - 'KeyVaultSecretReference', + 'ImageStorageProfile', + 'ImageUpdate', + 'InnerError', + 'InstanceViewStatus', 'KeyVaultKeyReference', - 'DiskEncryptionSettings', - 'VirtualHardDisk', - 'DiffDiskSettings', + 'KeyVaultSecretReference', + 'LinuxConfiguration', + 'LogAnalyticsInputBase', + 'LogAnalyticsOperationResult', + 'LogAnalyticsOutput', + 'MaintenanceRedeployStatus', 'ManagedDiskParameters', + 'NetworkInterfaceReference', + 'NetworkProfile', 'OSDisk', - 'DataDisk', - 'StorageProfile', - 'AdditionalCapabilities', - 'AdditionalUnattendContent', - 'WinRMListener', - 'WinRMConfiguration', - 'WindowsConfiguration', - 'SshPublicKey', + 'OSDiskImage', + 'OSProfile', + 'Plan', + 'ProximityPlacementGroup', + 'ProximityPlacementGroupUpdate', + 'PurchasePlan', + 'RecoveryWalkResponse', + 'RequestRateByIntervalInput', + 'Resource', + 'RollbackStatusInfo', + 'RollingUpgradePolicy', + 'RollingUpgradeProgressInfo', + 'RollingUpgradeRunningStatus', + 'RollingUpgradeStatusInfo', + 'RunCommandDocument', + 'RunCommandDocumentBase', + 'RunCommandInput', + 'RunCommandInputParameter', + 'RunCommandParameterDefinition', + 'RunCommandResult', + 'Sku', 'SshConfiguration', - 'LinuxConfiguration', + 'SshPublicKey', + 'StorageProfile', + 'SubResource', + 'SubResourceReadOnly', + 'ThrottledRequestsInput', + 'UpdateResource', + 'UpgradeOperationHistoricalStatusInfo', + 'UpgradeOperationHistoricalStatusInfoProperties', + 'UpgradeOperationHistoryStatus', + 'UpgradePolicy', + 'Usage', + 'UsageName', 'VaultCertificate', 'VaultSecretGroup', - 'OSProfile', - 'NetworkInterfaceReference', - 'NetworkProfile', - 'BootDiagnostics', - 'DiagnosticsProfile', - 'VirtualMachineExtensionHandlerInstanceView', + 'VirtualHardDisk', + 'VirtualMachine', 'VirtualMachineAgentInstanceView', - 'DiskInstanceView', - 'BootDiagnosticsInstanceView', - 'VirtualMachineIdentityUserAssignedIdentitiesValue', + 'VirtualMachineCaptureParameters', + 'VirtualMachineCaptureResult', + 'VirtualMachineExtension', + 'VirtualMachineExtensionHandlerInstanceView', + 'VirtualMachineExtensionImage', + 'VirtualMachineExtensionInstanceView', + 'VirtualMachineExtensionsListResult', + 'VirtualMachineExtensionUpdate', + 'VirtualMachineHealthStatus', 'VirtualMachineIdentity', - 'MaintenanceRedeployStatus', + 'VirtualMachineIdentityUserAssignedIdentitiesValue', + 'VirtualMachineImage', + 'VirtualMachineImageResource', 'VirtualMachineInstanceView', - 'VirtualMachine', - 'VirtualMachineUpdate', - 'AutomaticOSUpgradePolicy', - 'RollingUpgradePolicy', - 'UpgradePolicy', - 'ImageOSDisk', - 'ImageDataDisk', - 'ImageStorageProfile', - 'Image', - 'ImageUpdate', - 'VirtualMachineScaleSetIdentityUserAssignedIdentitiesValue', + 'VirtualMachineReimageParameters', + 'VirtualMachineScaleSet', + 'VirtualMachineScaleSetDataDisk', + 'VirtualMachineScaleSetExtension', + 'VirtualMachineScaleSetExtensionProfile', 'VirtualMachineScaleSetIdentity', - 'VirtualMachineScaleSetOSProfile', - 'VirtualMachineScaleSetUpdateOSProfile', + 'VirtualMachineScaleSetIdentityUserAssignedIdentitiesValue', + 'VirtualMachineScaleSetInstanceView', + 'VirtualMachineScaleSetInstanceViewStatusesSummary', + 'VirtualMachineScaleSetIPConfiguration', + 'VirtualMachineScaleSetIpTag', 'VirtualMachineScaleSetManagedDiskParameters', + 'VirtualMachineScaleSetNetworkConfiguration', + 'VirtualMachineScaleSetNetworkConfigurationDnsSettings', + 'VirtualMachineScaleSetNetworkProfile', 'VirtualMachineScaleSetOSDisk', - 'VirtualMachineScaleSetUpdateOSDisk', - 'VirtualMachineScaleSetDataDisk', - 'VirtualMachineScaleSetStorageProfile', - 'VirtualMachineScaleSetUpdateStorageProfile', - 'ApiEntityReference', - 'VirtualMachineScaleSetPublicIPAddressConfigurationDnsSettings', - 'VirtualMachineScaleSetIpTag', + 'VirtualMachineScaleSetOSProfile', 'VirtualMachineScaleSetPublicIPAddressConfiguration', - 'VirtualMachineScaleSetUpdatePublicIPAddressConfiguration', - 'VirtualMachineScaleSetIPConfiguration', + 'VirtualMachineScaleSetPublicIPAddressConfigurationDnsSettings', + 'VirtualMachineScaleSetReimageParameters', + 'VirtualMachineScaleSetSku', + 'VirtualMachineScaleSetSkuCapacity', + 'VirtualMachineScaleSetStorageProfile', + 'VirtualMachineScaleSetUpdate', 'VirtualMachineScaleSetUpdateIPConfiguration', - 'VirtualMachineScaleSetNetworkConfigurationDnsSettings', - 'VirtualMachineScaleSetNetworkConfiguration', 'VirtualMachineScaleSetUpdateNetworkConfiguration', - 'VirtualMachineScaleSetNetworkProfile', 'VirtualMachineScaleSetUpdateNetworkProfile', - 'VirtualMachineScaleSetExtension', - 'VirtualMachineScaleSetExtensionProfile', - 'VirtualMachineScaleSetVMProfile', + 'VirtualMachineScaleSetUpdateOSDisk', + 'VirtualMachineScaleSetUpdateOSProfile', + 'VirtualMachineScaleSetUpdatePublicIPAddressConfiguration', + 'VirtualMachineScaleSetUpdateStorageProfile', 'VirtualMachineScaleSetUpdateVMProfile', - 'VirtualMachineScaleSet', - 'VirtualMachineScaleSetVMReimageParameters', - 'VirtualMachineScaleSetReimageParameters', - 'VirtualMachineScaleSetUpdate', + 'VirtualMachineScaleSetVM', + 'VirtualMachineScaleSetVMExtensionsSummary', 'VirtualMachineScaleSetVMInstanceIDs', 'VirtualMachineScaleSetVMInstanceRequiredIDs', - 'VirtualMachineStatusCodeCount', - 'VirtualMachineScaleSetInstanceViewStatusesSummary', - 'VirtualMachineScaleSetVMExtensionsSummary', - 'VirtualMachineScaleSetInstanceView', - 'VirtualMachineScaleSetSkuCapacity', - 'VirtualMachineScaleSetSku', - 'ApiErrorBase', - 'InnerError', - 'ApiError', - 'RollbackStatusInfo', - 'UpgradeOperationHistoryStatus', - 'RollingUpgradeProgressInfo', - 'UpgradeOperationHistoricalStatusInfoProperties', - 'UpgradeOperationHistoricalStatusInfo', - 'VirtualMachineHealthStatus', 'VirtualMachineScaleSetVMInstanceView', - 'VirtualMachineScaleSetVM', - 'RollingUpgradeRunningStatus', - 'RollingUpgradeStatusInfo', - 'Resource', - 'UpdateResource', - 'SubResourceReadOnly', - 'RecoveryWalkResponse', - 'RequestRateByIntervalInput', - 'ThrottledRequestsInput', - 'LogAnalyticsInputBase', - 'LogAnalyticsOutput', - 'LogAnalyticsOperationResult', - 'RunCommandInputParameter', - 'RunCommandInput', - 'RunCommandParameterDefinition', - 'RunCommandDocumentBase', - 'RunCommandDocument', - 'RunCommandResult', + 'VirtualMachineScaleSetVMProfile', + 'VirtualMachineScaleSetVMReimageParameters', + 'VirtualMachineSize', + 'VirtualMachineStatusCodeCount', + 'VirtualMachineUpdate', + 'WindowsConfiguration', + 'WinRMConfiguration', + 'WinRMListener', 'ComputeOperationValuePaged', 'AvailabilitySetPaged', 'VirtualMachineSizePaged', diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/compute_management_client_enums.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/_compute_management_client_enums.py similarity index 100% rename from sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/compute_management_client_enums.py rename to sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/_compute_management_client_enums.py diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/_models.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/_models.py new file mode 100644 index 000000000000..30f4ae6bce2b --- /dev/null +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/_models.py @@ -0,0 +1,5613 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class AdditionalCapabilities(Model): + """Enables or disables a capability on the virtual machine or virtual machine + scale set. + + :param ultra_ssd_enabled: The flag that enables or disables a capability + to have one or more managed data disks with UltraSSD_LRS storage account + type on the VM or VMSS. Managed disks with storage account type + UltraSSD_LRS can be added to a virtual machine or virtual machine scale + set only if this property is enabled. + :type ultra_ssd_enabled: bool + """ + + _attribute_map = { + 'ultra_ssd_enabled': {'key': 'ultraSSDEnabled', 'type': 'bool'}, + } + + def __init__(self, **kwargs): + super(AdditionalCapabilities, self).__init__(**kwargs) + self.ultra_ssd_enabled = kwargs.get('ultra_ssd_enabled', None) + + +class AdditionalUnattendContent(Model): + """Specifies additional XML formatted information that can be included in the + Unattend.xml file, which is used by Windows Setup. Contents are defined by + setting name, component name, and the pass in which the content is applied. + + :param pass_name: The pass name. Currently, the only allowable value is + OobeSystem. Possible values include: 'OobeSystem' + :type pass_name: str or ~azure.mgmt.compute.v2018_10_01.models.PassNames + :param component_name: The component name. Currently, the only allowable + value is Microsoft-Windows-Shell-Setup. Possible values include: + 'Microsoft-Windows-Shell-Setup' + :type component_name: str or + ~azure.mgmt.compute.v2018_10_01.models.ComponentNames + :param setting_name: Specifies the name of the setting to which the + content applies. Possible values are: FirstLogonCommands and AutoLogon. + Possible values include: 'AutoLogon', 'FirstLogonCommands' + :type setting_name: str or + ~azure.mgmt.compute.v2018_10_01.models.SettingNames + :param content: Specifies the XML formatted content that is added to the + unattend.xml file for the specified path and component. The XML must be + less than 4KB and must include the root element for the setting or feature + that is being inserted. + :type content: str + """ + + _attribute_map = { + 'pass_name': {'key': 'passName', 'type': 'PassNames'}, + 'component_name': {'key': 'componentName', 'type': 'ComponentNames'}, + 'setting_name': {'key': 'settingName', 'type': 'SettingNames'}, + 'content': {'key': 'content', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(AdditionalUnattendContent, self).__init__(**kwargs) + self.pass_name = kwargs.get('pass_name', None) + self.component_name = kwargs.get('component_name', None) + self.setting_name = kwargs.get('setting_name', None) + self.content = kwargs.get('content', None) + + +class ApiEntityReference(Model): + """The API entity reference. + + :param id: The ARM resource id in the form of + /subscriptions/{SubscriptionId}/resourceGroups/{ResourceGroupName}/... + :type id: str + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ApiEntityReference, self).__init__(**kwargs) + self.id = kwargs.get('id', None) + + +class ApiError(Model): + """Api error. + + :param details: The Api error details + :type details: list[~azure.mgmt.compute.v2018_10_01.models.ApiErrorBase] + :param innererror: The Api inner error + :type innererror: ~azure.mgmt.compute.v2018_10_01.models.InnerError + :param code: The error code. + :type code: str + :param target: The target of the particular error. + :type target: str + :param message: The error message. + :type message: str + """ + + _attribute_map = { + 'details': {'key': 'details', 'type': '[ApiErrorBase]'}, + 'innererror': {'key': 'innererror', 'type': 'InnerError'}, + 'code': {'key': 'code', 'type': 'str'}, + 'target': {'key': 'target', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ApiError, self).__init__(**kwargs) + self.details = kwargs.get('details', None) + self.innererror = kwargs.get('innererror', None) + self.code = kwargs.get('code', None) + self.target = kwargs.get('target', None) + self.message = kwargs.get('message', None) + + +class ApiErrorBase(Model): + """Api error base. + + :param code: The error code. + :type code: str + :param target: The target of the particular error. + :type target: str + :param message: The error message. + :type message: str + """ + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + 'target': {'key': 'target', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ApiErrorBase, self).__init__(**kwargs) + self.code = kwargs.get('code', None) + self.target = kwargs.get('target', None) + self.message = kwargs.get('message', None) + + +class AutomaticOSUpgradePolicy(Model): + """The configuration parameters used for performing automatic OS upgrade. + + :param enable_automatic_os_upgrade: Indicates whether OS upgrades should + automatically be applied to scale set instances in a rolling fashion when + a newer version of the OS image becomes available. Default value is false. + If this is set to true for Windows based scale sets, recommendation is to + set + [enableAutomaticUpdates](https://docs.microsoft.com/dotnet/api/microsoft.azure.management.compute.models.windowsconfiguration.enableautomaticupdates?view=azure-dotnet) + to false. + :type enable_automatic_os_upgrade: bool + :param disable_automatic_rollback: Whether OS image rollback feature + should be disabled. Default value is false. + :type disable_automatic_rollback: bool + """ + + _attribute_map = { + 'enable_automatic_os_upgrade': {'key': 'enableAutomaticOSUpgrade', 'type': 'bool'}, + 'disable_automatic_rollback': {'key': 'disableAutomaticRollback', 'type': 'bool'}, + } + + def __init__(self, **kwargs): + super(AutomaticOSUpgradePolicy, self).__init__(**kwargs) + self.enable_automatic_os_upgrade = kwargs.get('enable_automatic_os_upgrade', None) + self.disable_automatic_rollback = kwargs.get('disable_automatic_rollback', None) + + +class AutomaticOSUpgradeProperties(Model): + """Describes automatic OS upgrade properties on the image. + + All required parameters must be populated in order to send to Azure. + + :param automatic_os_upgrade_supported: Required. Specifies whether + automatic OS upgrade is supported on the image. + :type automatic_os_upgrade_supported: bool + """ + + _validation = { + 'automatic_os_upgrade_supported': {'required': True}, + } + + _attribute_map = { + 'automatic_os_upgrade_supported': {'key': 'automaticOSUpgradeSupported', 'type': 'bool'}, + } + + def __init__(self, **kwargs): + super(AutomaticOSUpgradeProperties, self).__init__(**kwargs) + self.automatic_os_upgrade_supported = kwargs.get('automatic_os_upgrade_supported', None) + + +class Resource(Model): + """The Resource model definition. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource Id + :vartype id: str + :ivar name: Resource name + :vartype name: str + :ivar type: Resource type + :vartype type: str + :param location: Required. Resource location + :type location: str + :param tags: Resource tags + :type tags: dict[str, str] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__(self, **kwargs): + super(Resource, self).__init__(**kwargs) + self.id = None + self.name = None + self.type = None + self.location = kwargs.get('location', None) + self.tags = kwargs.get('tags', None) + + +class AvailabilitySet(Resource): + """Specifies information about the availability set that the virtual machine + should be assigned to. Virtual machines specified in the same availability + set are allocated to different nodes to maximize availability. For more + information about availability sets, see [Manage the availability of + virtual + machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-manage-availability?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). +

    For more information on Azure planned maintenance, see [Planned + maintenance for virtual machines in + Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-planned-maintenance?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json) +

    Currently, a VM can only be added to availability set at creation + time. An existing VM cannot be added to an availability set. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource Id + :vartype id: str + :ivar name: Resource name + :vartype name: str + :ivar type: Resource type + :vartype type: str + :param location: Required. Resource location + :type location: str + :param tags: Resource tags + :type tags: dict[str, str] + :param platform_update_domain_count: Update Domain count. + :type platform_update_domain_count: int + :param platform_fault_domain_count: Fault Domain count. + :type platform_fault_domain_count: int + :param virtual_machines: A list of references to all virtual machines in + the availability set. + :type virtual_machines: + list[~azure.mgmt.compute.v2018_10_01.models.SubResource] + :param proximity_placement_group: Specifies information about the + proximity placement group that the availability set should be assigned to. +

    Minimum api-version: 2018-04-01. + :type proximity_placement_group: + ~azure.mgmt.compute.v2018_10_01.models.SubResource + :ivar statuses: The resource status information. + :vartype statuses: + list[~azure.mgmt.compute.v2018_10_01.models.InstanceViewStatus] + :param sku: Sku of the availability set, only name is required to be set. + See AvailabilitySetSkuTypes for possible set of values. Use 'Aligned' for + virtual machines with managed disks and 'Classic' for virtual machines + with unmanaged disks. Default value is 'Classic'. + :type sku: ~azure.mgmt.compute.v2018_10_01.models.Sku + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + 'statuses': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'platform_update_domain_count': {'key': 'properties.platformUpdateDomainCount', 'type': 'int'}, + 'platform_fault_domain_count': {'key': 'properties.platformFaultDomainCount', 'type': 'int'}, + 'virtual_machines': {'key': 'properties.virtualMachines', 'type': '[SubResource]'}, + 'proximity_placement_group': {'key': 'properties.proximityPlacementGroup', 'type': 'SubResource'}, + 'statuses': {'key': 'properties.statuses', 'type': '[InstanceViewStatus]'}, + 'sku': {'key': 'sku', 'type': 'Sku'}, + } + + def __init__(self, **kwargs): + super(AvailabilitySet, self).__init__(**kwargs) + self.platform_update_domain_count = kwargs.get('platform_update_domain_count', None) + self.platform_fault_domain_count = kwargs.get('platform_fault_domain_count', None) + self.virtual_machines = kwargs.get('virtual_machines', None) + self.proximity_placement_group = kwargs.get('proximity_placement_group', None) + self.statuses = None + self.sku = kwargs.get('sku', None) + + +class UpdateResource(Model): + """The Update Resource model definition. + + :param tags: Resource tags + :type tags: dict[str, str] + """ + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__(self, **kwargs): + super(UpdateResource, self).__init__(**kwargs) + self.tags = kwargs.get('tags', None) + + +class AvailabilitySetUpdate(UpdateResource): + """Specifies information about the availability set that the virtual machine + should be assigned to. Only tags may be updated. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :param tags: Resource tags + :type tags: dict[str, str] + :param platform_update_domain_count: Update Domain count. + :type platform_update_domain_count: int + :param platform_fault_domain_count: Fault Domain count. + :type platform_fault_domain_count: int + :param virtual_machines: A list of references to all virtual machines in + the availability set. + :type virtual_machines: + list[~azure.mgmt.compute.v2018_10_01.models.SubResource] + :param proximity_placement_group: Specifies information about the + proximity placement group that the availability set should be assigned to. +

    Minimum api-version: 2018-04-01. + :type proximity_placement_group: + ~azure.mgmt.compute.v2018_10_01.models.SubResource + :ivar statuses: The resource status information. + :vartype statuses: + list[~azure.mgmt.compute.v2018_10_01.models.InstanceViewStatus] + :param sku: Sku of the availability set + :type sku: ~azure.mgmt.compute.v2018_10_01.models.Sku + """ + + _validation = { + 'statuses': {'readonly': True}, + } + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + 'platform_update_domain_count': {'key': 'properties.platformUpdateDomainCount', 'type': 'int'}, + 'platform_fault_domain_count': {'key': 'properties.platformFaultDomainCount', 'type': 'int'}, + 'virtual_machines': {'key': 'properties.virtualMachines', 'type': '[SubResource]'}, + 'proximity_placement_group': {'key': 'properties.proximityPlacementGroup', 'type': 'SubResource'}, + 'statuses': {'key': 'properties.statuses', 'type': '[InstanceViewStatus]'}, + 'sku': {'key': 'sku', 'type': 'Sku'}, + } + + def __init__(self, **kwargs): + super(AvailabilitySetUpdate, self).__init__(**kwargs) + self.platform_update_domain_count = kwargs.get('platform_update_domain_count', None) + self.platform_fault_domain_count = kwargs.get('platform_fault_domain_count', None) + self.virtual_machines = kwargs.get('virtual_machines', None) + self.proximity_placement_group = kwargs.get('proximity_placement_group', None) + self.statuses = None + self.sku = kwargs.get('sku', None) + + +class BootDiagnostics(Model): + """Boot Diagnostics is a debugging feature which allows you to view Console + Output and Screenshot to diagnose VM status.

    You can easily view + the output of your console log.

    Azure also enables you to see a + screenshot of the VM from the hypervisor. + + :param enabled: Whether boot diagnostics should be enabled on the Virtual + Machine. + :type enabled: bool + :param storage_uri: Uri of the storage account to use for placing the + console output and screenshot. + :type storage_uri: str + """ + + _attribute_map = { + 'enabled': {'key': 'enabled', 'type': 'bool'}, + 'storage_uri': {'key': 'storageUri', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(BootDiagnostics, self).__init__(**kwargs) + self.enabled = kwargs.get('enabled', None) + self.storage_uri = kwargs.get('storage_uri', None) + + +class BootDiagnosticsInstanceView(Model): + """The instance view of a virtual machine boot diagnostics. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar console_screenshot_blob_uri: The console screenshot blob URI. + :vartype console_screenshot_blob_uri: str + :ivar serial_console_log_blob_uri: The Linux serial console log blob Uri. + :vartype serial_console_log_blob_uri: str + :ivar status: The boot diagnostics status information for the VM.

    + NOTE: It will be set only if there are errors encountered in enabling boot + diagnostics. + :vartype status: ~azure.mgmt.compute.v2018_10_01.models.InstanceViewStatus + """ + + _validation = { + 'console_screenshot_blob_uri': {'readonly': True}, + 'serial_console_log_blob_uri': {'readonly': True}, + 'status': {'readonly': True}, + } + + _attribute_map = { + 'console_screenshot_blob_uri': {'key': 'consoleScreenshotBlobUri', 'type': 'str'}, + 'serial_console_log_blob_uri': {'key': 'serialConsoleLogBlobUri', 'type': 'str'}, + 'status': {'key': 'status', 'type': 'InstanceViewStatus'}, + } + + def __init__(self, **kwargs): + super(BootDiagnosticsInstanceView, self).__init__(**kwargs) + self.console_screenshot_blob_uri = None + self.serial_console_log_blob_uri = None + self.status = None + + +class CloudError(Model): + """CloudError. + """ + + _attribute_map = { + } + + +class ComputeOperationValue(Model): + """Describes the properties of a Compute Operation value. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar origin: The origin of the compute operation. + :vartype origin: str + :ivar name: The name of the compute operation. + :vartype name: str + :ivar operation: The display name of the compute operation. + :vartype operation: str + :ivar resource: The display name of the resource the operation applies to. + :vartype resource: str + :ivar description: The description of the operation. + :vartype description: str + :ivar provider: The resource provider for the operation. + :vartype provider: str + """ + + _validation = { + 'origin': {'readonly': True}, + 'name': {'readonly': True}, + 'operation': {'readonly': True}, + 'resource': {'readonly': True}, + 'description': {'readonly': True}, + 'provider': {'readonly': True}, + } + + _attribute_map = { + 'origin': {'key': 'origin', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'operation': {'key': 'display.operation', 'type': 'str'}, + 'resource': {'key': 'display.resource', 'type': 'str'}, + 'description': {'key': 'display.description', 'type': 'str'}, + 'provider': {'key': 'display.provider', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ComputeOperationValue, self).__init__(**kwargs) + self.origin = None + self.name = None + self.operation = None + self.resource = None + self.description = None + self.provider = None + + +class DataDisk(Model): + """Describes a data disk. + + All required parameters must be populated in order to send to Azure. + + :param lun: Required. Specifies the logical unit number of the data disk. + This value is used to identify data disks within the VM and therefore must + be unique for each data disk attached to a VM. + :type lun: int + :param name: The disk name. + :type name: str + :param vhd: The virtual hard disk. + :type vhd: ~azure.mgmt.compute.v2018_10_01.models.VirtualHardDisk + :param image: The source user image virtual hard disk. The virtual hard + disk will be copied before being attached to the virtual machine. If + SourceImage is provided, the destination virtual hard drive must not + exist. + :type image: ~azure.mgmt.compute.v2018_10_01.models.VirtualHardDisk + :param caching: Specifies the caching requirements.

    Possible + values are:

    **None**

    **ReadOnly**

    **ReadWrite** +

    Default: **None for Standard storage. ReadOnly for Premium + storage**. Possible values include: 'None', 'ReadOnly', 'ReadWrite' + :type caching: str or ~azure.mgmt.compute.v2018_10_01.models.CachingTypes + :param write_accelerator_enabled: Specifies whether writeAccelerator + should be enabled or disabled on the disk. + :type write_accelerator_enabled: bool + :param create_option: Required. Specifies how the virtual machine should + be created.

    Possible values are:

    **Attach** \\u2013 This + value is used when you are using a specialized disk to create the virtual + machine.

    **FromImage** \\u2013 This value is used when you are + using an image to create the virtual machine. If you are using a platform + image, you also use the imageReference element described above. If you are + using a marketplace image, you also use the plan element previously + described. Possible values include: 'FromImage', 'Empty', 'Attach' + :type create_option: str or + ~azure.mgmt.compute.v2018_10_01.models.DiskCreateOptionTypes + :param disk_size_gb: Specifies the size of an empty data disk in + gigabytes. This element can be used to overwrite the size of the disk in a + virtual machine image.

    This value cannot be larger than 1023 GB + :type disk_size_gb: int + :param managed_disk: The managed disk parameters. + :type managed_disk: + ~azure.mgmt.compute.v2018_10_01.models.ManagedDiskParameters + """ + + _validation = { + 'lun': {'required': True}, + 'create_option': {'required': True}, + } + + _attribute_map = { + 'lun': {'key': 'lun', 'type': 'int'}, + 'name': {'key': 'name', 'type': 'str'}, + 'vhd': {'key': 'vhd', 'type': 'VirtualHardDisk'}, + 'image': {'key': 'image', 'type': 'VirtualHardDisk'}, + 'caching': {'key': 'caching', 'type': 'CachingTypes'}, + 'write_accelerator_enabled': {'key': 'writeAcceleratorEnabled', 'type': 'bool'}, + 'create_option': {'key': 'createOption', 'type': 'str'}, + 'disk_size_gb': {'key': 'diskSizeGB', 'type': 'int'}, + 'managed_disk': {'key': 'managedDisk', 'type': 'ManagedDiskParameters'}, + } + + def __init__(self, **kwargs): + super(DataDisk, self).__init__(**kwargs) + self.lun = kwargs.get('lun', None) + self.name = kwargs.get('name', None) + self.vhd = kwargs.get('vhd', None) + self.image = kwargs.get('image', None) + self.caching = kwargs.get('caching', None) + self.write_accelerator_enabled = kwargs.get('write_accelerator_enabled', None) + self.create_option = kwargs.get('create_option', None) + self.disk_size_gb = kwargs.get('disk_size_gb', None) + self.managed_disk = kwargs.get('managed_disk', None) + + +class DataDiskImage(Model): + """Contains the data disk images information. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar lun: Specifies the logical unit number of the data disk. This value + is used to identify data disks within the VM and therefore must be unique + for each data disk attached to a VM. + :vartype lun: int + """ + + _validation = { + 'lun': {'readonly': True}, + } + + _attribute_map = { + 'lun': {'key': 'lun', 'type': 'int'}, + } + + def __init__(self, **kwargs): + super(DataDiskImage, self).__init__(**kwargs) + self.lun = None + + +class DiagnosticsProfile(Model): + """Specifies the boot diagnostic settings state.

    Minimum api-version: + 2015-06-15. + + :param boot_diagnostics: Boot Diagnostics is a debugging feature which + allows you to view Console Output and Screenshot to diagnose VM status. +

    You can easily view the output of your console log.

    + Azure also enables you to see a screenshot of the VM from the hypervisor. + :type boot_diagnostics: + ~azure.mgmt.compute.v2018_10_01.models.BootDiagnostics + """ + + _attribute_map = { + 'boot_diagnostics': {'key': 'bootDiagnostics', 'type': 'BootDiagnostics'}, + } + + def __init__(self, **kwargs): + super(DiagnosticsProfile, self).__init__(**kwargs) + self.boot_diagnostics = kwargs.get('boot_diagnostics', None) + + +class DiffDiskSettings(Model): + """Describes the parameters of ephemeral disk settings that can be specified + for operating system disk.

    NOTE: The ephemeral disk settings can + only be specified for managed disk. + + :param option: Specifies the ephemeral disk settings for operating system + disk. Possible values include: 'Local' + :type option: str or + ~azure.mgmt.compute.v2018_10_01.models.DiffDiskOptions + """ + + _attribute_map = { + 'option': {'key': 'option', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(DiffDiskSettings, self).__init__(**kwargs) + self.option = kwargs.get('option', None) + + +class DiskEncryptionSettings(Model): + """Describes a Encryption Settings for a Disk. + + :param disk_encryption_key: Specifies the location of the disk encryption + key, which is a Key Vault Secret. + :type disk_encryption_key: + ~azure.mgmt.compute.v2018_10_01.models.KeyVaultSecretReference + :param key_encryption_key: Specifies the location of the key encryption + key in Key Vault. + :type key_encryption_key: + ~azure.mgmt.compute.v2018_10_01.models.KeyVaultKeyReference + :param enabled: Specifies whether disk encryption should be enabled on the + virtual machine. + :type enabled: bool + """ + + _attribute_map = { + 'disk_encryption_key': {'key': 'diskEncryptionKey', 'type': 'KeyVaultSecretReference'}, + 'key_encryption_key': {'key': 'keyEncryptionKey', 'type': 'KeyVaultKeyReference'}, + 'enabled': {'key': 'enabled', 'type': 'bool'}, + } + + def __init__(self, **kwargs): + super(DiskEncryptionSettings, self).__init__(**kwargs) + self.disk_encryption_key = kwargs.get('disk_encryption_key', None) + self.key_encryption_key = kwargs.get('key_encryption_key', None) + self.enabled = kwargs.get('enabled', None) + + +class DiskInstanceView(Model): + """The instance view of the disk. + + :param name: The disk name. + :type name: str + :param encryption_settings: Specifies the encryption settings for the OS + Disk.

    Minimum api-version: 2015-06-15 + :type encryption_settings: + list[~azure.mgmt.compute.v2018_10_01.models.DiskEncryptionSettings] + :param statuses: The resource status information. + :type statuses: + list[~azure.mgmt.compute.v2018_10_01.models.InstanceViewStatus] + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'encryption_settings': {'key': 'encryptionSettings', 'type': '[DiskEncryptionSettings]'}, + 'statuses': {'key': 'statuses', 'type': '[InstanceViewStatus]'}, + } + + def __init__(self, **kwargs): + super(DiskInstanceView, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.encryption_settings = kwargs.get('encryption_settings', None) + self.statuses = kwargs.get('statuses', None) + + +class HardwareProfile(Model): + """Specifies the hardware settings for the virtual machine. + + :param vm_size: Specifies the size of the virtual machine. For more + information about virtual machine sizes, see [Sizes for virtual + machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-sizes?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). +

    The available VM sizes depend on region and availability set. For + a list of available sizes use these APIs:

    [List all available + virtual machine sizes in an availability + set](https://docs.microsoft.com/rest/api/compute/availabilitysets/listavailablesizes) +

    [List all available virtual machine sizes in a + region](https://docs.microsoft.com/rest/api/compute/virtualmachinesizes/list) +

    [List all available virtual machine sizes for + resizing](https://docs.microsoft.com/rest/api/compute/virtualmachines/listavailablesizes). + Possible values include: 'Basic_A0', 'Basic_A1', 'Basic_A2', 'Basic_A3', + 'Basic_A4', 'Standard_A0', 'Standard_A1', 'Standard_A2', 'Standard_A3', + 'Standard_A4', 'Standard_A5', 'Standard_A6', 'Standard_A7', 'Standard_A8', + 'Standard_A9', 'Standard_A10', 'Standard_A11', 'Standard_A1_v2', + 'Standard_A2_v2', 'Standard_A4_v2', 'Standard_A8_v2', 'Standard_A2m_v2', + 'Standard_A4m_v2', 'Standard_A8m_v2', 'Standard_B1s', 'Standard_B1ms', + 'Standard_B2s', 'Standard_B2ms', 'Standard_B4ms', 'Standard_B8ms', + 'Standard_D1', 'Standard_D2', 'Standard_D3', 'Standard_D4', + 'Standard_D11', 'Standard_D12', 'Standard_D13', 'Standard_D14', + 'Standard_D1_v2', 'Standard_D2_v2', 'Standard_D3_v2', 'Standard_D4_v2', + 'Standard_D5_v2', 'Standard_D2_v3', 'Standard_D4_v3', 'Standard_D8_v3', + 'Standard_D16_v3', 'Standard_D32_v3', 'Standard_D64_v3', + 'Standard_D2s_v3', 'Standard_D4s_v3', 'Standard_D8s_v3', + 'Standard_D16s_v3', 'Standard_D32s_v3', 'Standard_D64s_v3', + 'Standard_D11_v2', 'Standard_D12_v2', 'Standard_D13_v2', + 'Standard_D14_v2', 'Standard_D15_v2', 'Standard_DS1', 'Standard_DS2', + 'Standard_DS3', 'Standard_DS4', 'Standard_DS11', 'Standard_DS12', + 'Standard_DS13', 'Standard_DS14', 'Standard_DS1_v2', 'Standard_DS2_v2', + 'Standard_DS3_v2', 'Standard_DS4_v2', 'Standard_DS5_v2', + 'Standard_DS11_v2', 'Standard_DS12_v2', 'Standard_DS13_v2', + 'Standard_DS14_v2', 'Standard_DS15_v2', 'Standard_DS13-4_v2', + 'Standard_DS13-2_v2', 'Standard_DS14-8_v2', 'Standard_DS14-4_v2', + 'Standard_E2_v3', 'Standard_E4_v3', 'Standard_E8_v3', 'Standard_E16_v3', + 'Standard_E32_v3', 'Standard_E64_v3', 'Standard_E2s_v3', + 'Standard_E4s_v3', 'Standard_E8s_v3', 'Standard_E16s_v3', + 'Standard_E32s_v3', 'Standard_E64s_v3', 'Standard_E32-16_v3', + 'Standard_E32-8s_v3', 'Standard_E64-32s_v3', 'Standard_E64-16s_v3', + 'Standard_F1', 'Standard_F2', 'Standard_F4', 'Standard_F8', + 'Standard_F16', 'Standard_F1s', 'Standard_F2s', 'Standard_F4s', + 'Standard_F8s', 'Standard_F16s', 'Standard_F2s_v2', 'Standard_F4s_v2', + 'Standard_F8s_v2', 'Standard_F16s_v2', 'Standard_F32s_v2', + 'Standard_F64s_v2', 'Standard_F72s_v2', 'Standard_G1', 'Standard_G2', + 'Standard_G3', 'Standard_G4', 'Standard_G5', 'Standard_GS1', + 'Standard_GS2', 'Standard_GS3', 'Standard_GS4', 'Standard_GS5', + 'Standard_GS4-8', 'Standard_GS4-4', 'Standard_GS5-16', 'Standard_GS5-8', + 'Standard_H8', 'Standard_H16', 'Standard_H8m', 'Standard_H16m', + 'Standard_H16r', 'Standard_H16mr', 'Standard_L4s', 'Standard_L8s', + 'Standard_L16s', 'Standard_L32s', 'Standard_M64s', 'Standard_M64ms', + 'Standard_M128s', 'Standard_M128ms', 'Standard_M64-32ms', + 'Standard_M64-16ms', 'Standard_M128-64ms', 'Standard_M128-32ms', + 'Standard_NC6', 'Standard_NC12', 'Standard_NC24', 'Standard_NC24r', + 'Standard_NC6s_v2', 'Standard_NC12s_v2', 'Standard_NC24s_v2', + 'Standard_NC24rs_v2', 'Standard_NC6s_v3', 'Standard_NC12s_v3', + 'Standard_NC24s_v3', 'Standard_NC24rs_v3', 'Standard_ND6s', + 'Standard_ND12s', 'Standard_ND24s', 'Standard_ND24rs', 'Standard_NV6', + 'Standard_NV12', 'Standard_NV24' + :type vm_size: str or + ~azure.mgmt.compute.v2018_10_01.models.VirtualMachineSizeTypes + """ + + _attribute_map = { + 'vm_size': {'key': 'vmSize', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(HardwareProfile, self).__init__(**kwargs) + self.vm_size = kwargs.get('vm_size', None) + + +class Image(Resource): + """The source user image virtual hard disk. The virtual hard disk will be + copied before being attached to the virtual machine. If SourceImage is + provided, the destination virtual hard drive must not exist. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource Id + :vartype id: str + :ivar name: Resource name + :vartype name: str + :ivar type: Resource type + :vartype type: str + :param location: Required. Resource location + :type location: str + :param tags: Resource tags + :type tags: dict[str, str] + :param source_virtual_machine: The source virtual machine from which Image + is created. + :type source_virtual_machine: + ~azure.mgmt.compute.v2018_10_01.models.SubResource + :param storage_profile: Specifies the storage settings for the virtual + machine disks. + :type storage_profile: + ~azure.mgmt.compute.v2018_10_01.models.ImageStorageProfile + :ivar provisioning_state: The provisioning state. + :vartype provisioning_state: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'source_virtual_machine': {'key': 'properties.sourceVirtualMachine', 'type': 'SubResource'}, + 'storage_profile': {'key': 'properties.storageProfile', 'type': 'ImageStorageProfile'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(Image, self).__init__(**kwargs) + self.source_virtual_machine = kwargs.get('source_virtual_machine', None) + self.storage_profile = kwargs.get('storage_profile', None) + self.provisioning_state = None + + +class ImageDataDisk(Model): + """Describes a data disk. + + All required parameters must be populated in order to send to Azure. + + :param lun: Required. Specifies the logical unit number of the data disk. + This value is used to identify data disks within the VM and therefore must + be unique for each data disk attached to a VM. + :type lun: int + :param snapshot: The snapshot. + :type snapshot: ~azure.mgmt.compute.v2018_10_01.models.SubResource + :param managed_disk: The managedDisk. + :type managed_disk: ~azure.mgmt.compute.v2018_10_01.models.SubResource + :param blob_uri: The Virtual Hard Disk. + :type blob_uri: str + :param caching: Specifies the caching requirements.

    Possible + values are:

    **None**

    **ReadOnly**

    **ReadWrite** +

    Default: **None for Standard storage. ReadOnly for Premium + storage**. Possible values include: 'None', 'ReadOnly', 'ReadWrite' + :type caching: str or ~azure.mgmt.compute.v2018_10_01.models.CachingTypes + :param disk_size_gb: Specifies the size of empty data disks in gigabytes. + This element can be used to overwrite the name of the disk in a virtual + machine image.

    This value cannot be larger than 1023 GB + :type disk_size_gb: int + :param storage_account_type: Specifies the storage account type for the + managed disk. NOTE: UltraSSD_LRS can only be used with data disks, it + cannot be used with OS Disk. Possible values include: 'Standard_LRS', + 'Premium_LRS', 'StandardSSD_LRS', 'UltraSSD_LRS' + :type storage_account_type: str or + ~azure.mgmt.compute.v2018_10_01.models.StorageAccountTypes + """ + + _validation = { + 'lun': {'required': True}, + } + + _attribute_map = { + 'lun': {'key': 'lun', 'type': 'int'}, + 'snapshot': {'key': 'snapshot', 'type': 'SubResource'}, + 'managed_disk': {'key': 'managedDisk', 'type': 'SubResource'}, + 'blob_uri': {'key': 'blobUri', 'type': 'str'}, + 'caching': {'key': 'caching', 'type': 'CachingTypes'}, + 'disk_size_gb': {'key': 'diskSizeGB', 'type': 'int'}, + 'storage_account_type': {'key': 'storageAccountType', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ImageDataDisk, self).__init__(**kwargs) + self.lun = kwargs.get('lun', None) + self.snapshot = kwargs.get('snapshot', None) + self.managed_disk = kwargs.get('managed_disk', None) + self.blob_uri = kwargs.get('blob_uri', None) + self.caching = kwargs.get('caching', None) + self.disk_size_gb = kwargs.get('disk_size_gb', None) + self.storage_account_type = kwargs.get('storage_account_type', None) + + +class ImageOSDisk(Model): + """Describes an Operating System disk. + + All required parameters must be populated in order to send to Azure. + + :param os_type: Required. This property allows you to specify the type of + the OS that is included in the disk if creating a VM from a custom image. +

    Possible values are:

    **Windows**

    **Linux**. + Possible values include: 'Windows', 'Linux' + :type os_type: str or + ~azure.mgmt.compute.v2018_10_01.models.OperatingSystemTypes + :param os_state: Required. The OS State. Possible values include: + 'Generalized', 'Specialized' + :type os_state: str or + ~azure.mgmt.compute.v2018_10_01.models.OperatingSystemStateTypes + :param snapshot: The snapshot. + :type snapshot: ~azure.mgmt.compute.v2018_10_01.models.SubResource + :param managed_disk: The managedDisk. + :type managed_disk: ~azure.mgmt.compute.v2018_10_01.models.SubResource + :param blob_uri: The Virtual Hard Disk. + :type blob_uri: str + :param caching: Specifies the caching requirements.

    Possible + values are:

    **None**

    **ReadOnly**

    **ReadWrite** +

    Default: **None for Standard storage. ReadOnly for Premium + storage**. Possible values include: 'None', 'ReadOnly', 'ReadWrite' + :type caching: str or ~azure.mgmt.compute.v2018_10_01.models.CachingTypes + :param disk_size_gb: Specifies the size of empty data disks in gigabytes. + This element can be used to overwrite the name of the disk in a virtual + machine image.

    This value cannot be larger than 1023 GB + :type disk_size_gb: int + :param storage_account_type: Specifies the storage account type for the + managed disk. UltraSSD_LRS cannot be used with OS Disk. Possible values + include: 'Standard_LRS', 'Premium_LRS', 'StandardSSD_LRS', 'UltraSSD_LRS' + :type storage_account_type: str or + ~azure.mgmt.compute.v2018_10_01.models.StorageAccountTypes + """ + + _validation = { + 'os_type': {'required': True}, + 'os_state': {'required': True}, + } + + _attribute_map = { + 'os_type': {'key': 'osType', 'type': 'OperatingSystemTypes'}, + 'os_state': {'key': 'osState', 'type': 'OperatingSystemStateTypes'}, + 'snapshot': {'key': 'snapshot', 'type': 'SubResource'}, + 'managed_disk': {'key': 'managedDisk', 'type': 'SubResource'}, + 'blob_uri': {'key': 'blobUri', 'type': 'str'}, + 'caching': {'key': 'caching', 'type': 'CachingTypes'}, + 'disk_size_gb': {'key': 'diskSizeGB', 'type': 'int'}, + 'storage_account_type': {'key': 'storageAccountType', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ImageOSDisk, self).__init__(**kwargs) + self.os_type = kwargs.get('os_type', None) + self.os_state = kwargs.get('os_state', None) + self.snapshot = kwargs.get('snapshot', None) + self.managed_disk = kwargs.get('managed_disk', None) + self.blob_uri = kwargs.get('blob_uri', None) + self.caching = kwargs.get('caching', None) + self.disk_size_gb = kwargs.get('disk_size_gb', None) + self.storage_account_type = kwargs.get('storage_account_type', None) + + +class SubResource(Model): + """SubResource. + + :param id: Resource Id + :type id: str + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(SubResource, self).__init__(**kwargs) + self.id = kwargs.get('id', None) + + +class ImageReference(SubResource): + """Specifies information about the image to use. You can specify information + about platform images, marketplace images, or virtual machine images. This + element is required when you want to use a platform image, marketplace + image, or virtual machine image, but is not used in other creation + operations. + + :param id: Resource Id + :type id: str + :param publisher: The image publisher. + :type publisher: str + :param offer: Specifies the offer of the platform image or marketplace + image used to create the virtual machine. + :type offer: str + :param sku: The image SKU. + :type sku: str + :param version: Specifies the version of the platform image or marketplace + image used to create the virtual machine. The allowed formats are + Major.Minor.Build or 'latest'. Major, Minor, and Build are decimal + numbers. Specify 'latest' to use the latest version of an image available + at deploy time. Even if you use 'latest', the VM image will not + automatically update after deploy time even if a new version becomes + available. + :type version: str + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'publisher': {'key': 'publisher', 'type': 'str'}, + 'offer': {'key': 'offer', 'type': 'str'}, + 'sku': {'key': 'sku', 'type': 'str'}, + 'version': {'key': 'version', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ImageReference, self).__init__(**kwargs) + self.publisher = kwargs.get('publisher', None) + self.offer = kwargs.get('offer', None) + self.sku = kwargs.get('sku', None) + self.version = kwargs.get('version', None) + + +class ImageStorageProfile(Model): + """Describes a storage profile. + + :param os_disk: Specifies information about the operating system disk used + by the virtual machine.

    For more information about disks, see + [About disks and VHDs for Azure virtual + machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-about-disks-vhds?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). + :type os_disk: ~azure.mgmt.compute.v2018_10_01.models.ImageOSDisk + :param data_disks: Specifies the parameters that are used to add a data + disk to a virtual machine.

    For more information about disks, see + [About disks and VHDs for Azure virtual + machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-about-disks-vhds?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). + :type data_disks: + list[~azure.mgmt.compute.v2018_10_01.models.ImageDataDisk] + :param zone_resilient: Specifies whether an image is zone resilient or + not. Default is false. Zone resilient images can be created only in + regions that provide Zone Redundant Storage (ZRS). + :type zone_resilient: bool + """ + + _attribute_map = { + 'os_disk': {'key': 'osDisk', 'type': 'ImageOSDisk'}, + 'data_disks': {'key': 'dataDisks', 'type': '[ImageDataDisk]'}, + 'zone_resilient': {'key': 'zoneResilient', 'type': 'bool'}, + } + + def __init__(self, **kwargs): + super(ImageStorageProfile, self).__init__(**kwargs) + self.os_disk = kwargs.get('os_disk', None) + self.data_disks = kwargs.get('data_disks', None) + self.zone_resilient = kwargs.get('zone_resilient', None) + + +class ImageUpdate(UpdateResource): + """The source user image virtual hard disk. Only tags may be updated. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :param tags: Resource tags + :type tags: dict[str, str] + :param source_virtual_machine: The source virtual machine from which Image + is created. + :type source_virtual_machine: + ~azure.mgmt.compute.v2018_10_01.models.SubResource + :param storage_profile: Specifies the storage settings for the virtual + machine disks. + :type storage_profile: + ~azure.mgmt.compute.v2018_10_01.models.ImageStorageProfile + :ivar provisioning_state: The provisioning state. + :vartype provisioning_state: str + """ + + _validation = { + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + 'source_virtual_machine': {'key': 'properties.sourceVirtualMachine', 'type': 'SubResource'}, + 'storage_profile': {'key': 'properties.storageProfile', 'type': 'ImageStorageProfile'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ImageUpdate, self).__init__(**kwargs) + self.source_virtual_machine = kwargs.get('source_virtual_machine', None) + self.storage_profile = kwargs.get('storage_profile', None) + self.provisioning_state = None + + +class InnerError(Model): + """Inner error details. + + :param exceptiontype: The exception type. + :type exceptiontype: str + :param errordetail: The internal error message or exception dump. + :type errordetail: str + """ + + _attribute_map = { + 'exceptiontype': {'key': 'exceptiontype', 'type': 'str'}, + 'errordetail': {'key': 'errordetail', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(InnerError, self).__init__(**kwargs) + self.exceptiontype = kwargs.get('exceptiontype', None) + self.errordetail = kwargs.get('errordetail', None) + + +class InstanceViewStatus(Model): + """Instance view status. + + :param code: The status code. + :type code: str + :param level: The level code. Possible values include: 'Info', 'Warning', + 'Error' + :type level: str or + ~azure.mgmt.compute.v2018_10_01.models.StatusLevelTypes + :param display_status: The short localizable label for the status. + :type display_status: str + :param message: The detailed status message, including for alerts and + error messages. + :type message: str + :param time: The time of the status. + :type time: datetime + """ + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + 'level': {'key': 'level', 'type': 'StatusLevelTypes'}, + 'display_status': {'key': 'displayStatus', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + 'time': {'key': 'time', 'type': 'iso-8601'}, + } + + def __init__(self, **kwargs): + super(InstanceViewStatus, self).__init__(**kwargs) + self.code = kwargs.get('code', None) + self.level = kwargs.get('level', None) + self.display_status = kwargs.get('display_status', None) + self.message = kwargs.get('message', None) + self.time = kwargs.get('time', None) + + +class KeyVaultKeyReference(Model): + """Describes a reference to Key Vault Key. + + All required parameters must be populated in order to send to Azure. + + :param key_url: Required. The URL referencing a key encryption key in Key + Vault. + :type key_url: str + :param source_vault: Required. The relative URL of the Key Vault + containing the key. + :type source_vault: ~azure.mgmt.compute.v2018_10_01.models.SubResource + """ + + _validation = { + 'key_url': {'required': True}, + 'source_vault': {'required': True}, + } + + _attribute_map = { + 'key_url': {'key': 'keyUrl', 'type': 'str'}, + 'source_vault': {'key': 'sourceVault', 'type': 'SubResource'}, + } + + def __init__(self, **kwargs): + super(KeyVaultKeyReference, self).__init__(**kwargs) + self.key_url = kwargs.get('key_url', None) + self.source_vault = kwargs.get('source_vault', None) + + +class KeyVaultSecretReference(Model): + """Describes a reference to Key Vault Secret. + + All required parameters must be populated in order to send to Azure. + + :param secret_url: Required. The URL referencing a secret in a Key Vault. + :type secret_url: str + :param source_vault: Required. The relative URL of the Key Vault + containing the secret. + :type source_vault: ~azure.mgmt.compute.v2018_10_01.models.SubResource + """ + + _validation = { + 'secret_url': {'required': True}, + 'source_vault': {'required': True}, + } + + _attribute_map = { + 'secret_url': {'key': 'secretUrl', 'type': 'str'}, + 'source_vault': {'key': 'sourceVault', 'type': 'SubResource'}, + } + + def __init__(self, **kwargs): + super(KeyVaultSecretReference, self).__init__(**kwargs) + self.secret_url = kwargs.get('secret_url', None) + self.source_vault = kwargs.get('source_vault', None) + + +class LinuxConfiguration(Model): + """Specifies the Linux operating system settings on the virtual machine. +

    For a list of supported Linux distributions, see [Linux on + Azure-Endorsed + Distributions](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-endorsed-distros?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json) +

    For running non-endorsed distributions, see [Information for + Non-Endorsed + Distributions](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-create-upload-generic?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json). + + :param disable_password_authentication: Specifies whether password + authentication should be disabled. + :type disable_password_authentication: bool + :param ssh: Specifies the ssh key configuration for a Linux OS. + :type ssh: ~azure.mgmt.compute.v2018_10_01.models.SshConfiguration + :param provision_vm_agent: Indicates whether virtual machine agent should + be provisioned on the virtual machine.

    When this property is not + specified in the request body, default behavior is to set it to true. + This will ensure that VM Agent is installed on the VM so that extensions + can be added to the VM later. + :type provision_vm_agent: bool + """ + + _attribute_map = { + 'disable_password_authentication': {'key': 'disablePasswordAuthentication', 'type': 'bool'}, + 'ssh': {'key': 'ssh', 'type': 'SshConfiguration'}, + 'provision_vm_agent': {'key': 'provisionVMAgent', 'type': 'bool'}, + } + + def __init__(self, **kwargs): + super(LinuxConfiguration, self).__init__(**kwargs) + self.disable_password_authentication = kwargs.get('disable_password_authentication', None) + self.ssh = kwargs.get('ssh', None) + self.provision_vm_agent = kwargs.get('provision_vm_agent', None) + + +class LogAnalyticsInputBase(Model): + """Api input base class for LogAnalytics Api. + + All required parameters must be populated in order to send to Azure. + + :param blob_container_sas_uri: Required. SAS Uri of the logging blob + container to which LogAnalytics Api writes output logs to. + :type blob_container_sas_uri: str + :param from_time: Required. From time of the query + :type from_time: datetime + :param to_time: Required. To time of the query + :type to_time: datetime + :param group_by_throttle_policy: Group query result by Throttle Policy + applied. + :type group_by_throttle_policy: bool + :param group_by_operation_name: Group query result by Operation Name. + :type group_by_operation_name: bool + :param group_by_resource_name: Group query result by Resource Name. + :type group_by_resource_name: bool + """ + + _validation = { + 'blob_container_sas_uri': {'required': True}, + 'from_time': {'required': True}, + 'to_time': {'required': True}, + } + + _attribute_map = { + 'blob_container_sas_uri': {'key': 'blobContainerSasUri', 'type': 'str'}, + 'from_time': {'key': 'fromTime', 'type': 'iso-8601'}, + 'to_time': {'key': 'toTime', 'type': 'iso-8601'}, + 'group_by_throttle_policy': {'key': 'groupByThrottlePolicy', 'type': 'bool'}, + 'group_by_operation_name': {'key': 'groupByOperationName', 'type': 'bool'}, + 'group_by_resource_name': {'key': 'groupByResourceName', 'type': 'bool'}, + } + + def __init__(self, **kwargs): + super(LogAnalyticsInputBase, self).__init__(**kwargs) + self.blob_container_sas_uri = kwargs.get('blob_container_sas_uri', None) + self.from_time = kwargs.get('from_time', None) + self.to_time = kwargs.get('to_time', None) + self.group_by_throttle_policy = kwargs.get('group_by_throttle_policy', None) + self.group_by_operation_name = kwargs.get('group_by_operation_name', None) + self.group_by_resource_name = kwargs.get('group_by_resource_name', None) + + +class LogAnalyticsOperationResult(Model): + """LogAnalytics operation status response. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar properties: LogAnalyticsOutput + :vartype properties: + ~azure.mgmt.compute.v2018_10_01.models.LogAnalyticsOutput + """ + + _validation = { + 'properties': {'readonly': True}, + } + + _attribute_map = { + 'properties': {'key': 'properties', 'type': 'LogAnalyticsOutput'}, + } + + def __init__(self, **kwargs): + super(LogAnalyticsOperationResult, self).__init__(**kwargs) + self.properties = None + + +class LogAnalyticsOutput(Model): + """LogAnalytics output properties. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar output: Output file Uri path to blob container. + :vartype output: str + """ + + _validation = { + 'output': {'readonly': True}, + } + + _attribute_map = { + 'output': {'key': 'output', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(LogAnalyticsOutput, self).__init__(**kwargs) + self.output = None + + +class MaintenanceRedeployStatus(Model): + """Maintenance Operation Status. + + :param is_customer_initiated_maintenance_allowed: True, if customer is + allowed to perform Maintenance. + :type is_customer_initiated_maintenance_allowed: bool + :param pre_maintenance_window_start_time: Start Time for the Pre + Maintenance Window. + :type pre_maintenance_window_start_time: datetime + :param pre_maintenance_window_end_time: End Time for the Pre Maintenance + Window. + :type pre_maintenance_window_end_time: datetime + :param maintenance_window_start_time: Start Time for the Maintenance + Window. + :type maintenance_window_start_time: datetime + :param maintenance_window_end_time: End Time for the Maintenance Window. + :type maintenance_window_end_time: datetime + :param last_operation_result_code: The Last Maintenance Operation Result + Code. Possible values include: 'None', 'RetryLater', 'MaintenanceAborted', + 'MaintenanceCompleted' + :type last_operation_result_code: str or + ~azure.mgmt.compute.v2018_10_01.models.MaintenanceOperationResultCodeTypes + :param last_operation_message: Message returned for the last Maintenance + Operation. + :type last_operation_message: str + """ + + _attribute_map = { + 'is_customer_initiated_maintenance_allowed': {'key': 'isCustomerInitiatedMaintenanceAllowed', 'type': 'bool'}, + 'pre_maintenance_window_start_time': {'key': 'preMaintenanceWindowStartTime', 'type': 'iso-8601'}, + 'pre_maintenance_window_end_time': {'key': 'preMaintenanceWindowEndTime', 'type': 'iso-8601'}, + 'maintenance_window_start_time': {'key': 'maintenanceWindowStartTime', 'type': 'iso-8601'}, + 'maintenance_window_end_time': {'key': 'maintenanceWindowEndTime', 'type': 'iso-8601'}, + 'last_operation_result_code': {'key': 'lastOperationResultCode', 'type': 'MaintenanceOperationResultCodeTypes'}, + 'last_operation_message': {'key': 'lastOperationMessage', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(MaintenanceRedeployStatus, self).__init__(**kwargs) + self.is_customer_initiated_maintenance_allowed = kwargs.get('is_customer_initiated_maintenance_allowed', None) + self.pre_maintenance_window_start_time = kwargs.get('pre_maintenance_window_start_time', None) + self.pre_maintenance_window_end_time = kwargs.get('pre_maintenance_window_end_time', None) + self.maintenance_window_start_time = kwargs.get('maintenance_window_start_time', None) + self.maintenance_window_end_time = kwargs.get('maintenance_window_end_time', None) + self.last_operation_result_code = kwargs.get('last_operation_result_code', None) + self.last_operation_message = kwargs.get('last_operation_message', None) + + +class ManagedDiskParameters(SubResource): + """The parameters of a managed disk. + + :param id: Resource Id + :type id: str + :param storage_account_type: Specifies the storage account type for the + managed disk. NOTE: UltraSSD_LRS can only be used with data disks, it + cannot be used with OS Disk. Possible values include: 'Standard_LRS', + 'Premium_LRS', 'StandardSSD_LRS', 'UltraSSD_LRS' + :type storage_account_type: str or + ~azure.mgmt.compute.v2018_10_01.models.StorageAccountTypes + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'storage_account_type': {'key': 'storageAccountType', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ManagedDiskParameters, self).__init__(**kwargs) + self.storage_account_type = kwargs.get('storage_account_type', None) + + +class NetworkInterfaceReference(SubResource): + """Describes a network interface reference. + + :param id: Resource Id + :type id: str + :param primary: Specifies the primary network interface in case the + virtual machine has more than 1 network interface. + :type primary: bool + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'primary': {'key': 'properties.primary', 'type': 'bool'}, + } + + def __init__(self, **kwargs): + super(NetworkInterfaceReference, self).__init__(**kwargs) + self.primary = kwargs.get('primary', None) + + +class NetworkProfile(Model): + """Specifies the network interfaces of the virtual machine. + + :param network_interfaces: Specifies the list of resource Ids for the + network interfaces associated with the virtual machine. + :type network_interfaces: + list[~azure.mgmt.compute.v2018_10_01.models.NetworkInterfaceReference] + """ + + _attribute_map = { + 'network_interfaces': {'key': 'networkInterfaces', 'type': '[NetworkInterfaceReference]'}, + } + + def __init__(self, **kwargs): + super(NetworkProfile, self).__init__(**kwargs) + self.network_interfaces = kwargs.get('network_interfaces', None) + + +class OSDisk(Model): + """Specifies information about the operating system disk used by the virtual + machine.

    For more information about disks, see [About disks and + VHDs for Azure virtual + machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-about-disks-vhds?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). + + All required parameters must be populated in order to send to Azure. + + :param os_type: This property allows you to specify the type of the OS + that is included in the disk if creating a VM from user-image or a + specialized VHD.

    Possible values are:

    **Windows** +

    **Linux**. Possible values include: 'Windows', 'Linux' + :type os_type: str or + ~azure.mgmt.compute.v2018_10_01.models.OperatingSystemTypes + :param encryption_settings: Specifies the encryption settings for the OS + Disk.

    Minimum api-version: 2015-06-15 + :type encryption_settings: + ~azure.mgmt.compute.v2018_10_01.models.DiskEncryptionSettings + :param name: The disk name. + :type name: str + :param vhd: The virtual hard disk. + :type vhd: ~azure.mgmt.compute.v2018_10_01.models.VirtualHardDisk + :param image: The source user image virtual hard disk. The virtual hard + disk will be copied before being attached to the virtual machine. If + SourceImage is provided, the destination virtual hard drive must not + exist. + :type image: ~azure.mgmt.compute.v2018_10_01.models.VirtualHardDisk + :param caching: Specifies the caching requirements.

    Possible + values are:

    **None**

    **ReadOnly**

    **ReadWrite** +

    Default: **None for Standard storage. ReadOnly for Premium + storage**. Possible values include: 'None', 'ReadOnly', 'ReadWrite' + :type caching: str or ~azure.mgmt.compute.v2018_10_01.models.CachingTypes + :param write_accelerator_enabled: Specifies whether writeAccelerator + should be enabled or disabled on the disk. + :type write_accelerator_enabled: bool + :param diff_disk_settings: Specifies the ephemeral Disk Settings for the + operating system disk used by the virtual machine. + :type diff_disk_settings: + ~azure.mgmt.compute.v2018_10_01.models.DiffDiskSettings + :param create_option: Required. Specifies how the virtual machine should + be created.

    Possible values are:

    **Attach** \\u2013 This + value is used when you are using a specialized disk to create the virtual + machine.

    **FromImage** \\u2013 This value is used when you are + using an image to create the virtual machine. If you are using a platform + image, you also use the imageReference element described above. If you are + using a marketplace image, you also use the plan element previously + described. Possible values include: 'FromImage', 'Empty', 'Attach' + :type create_option: str or + ~azure.mgmt.compute.v2018_10_01.models.DiskCreateOptionTypes + :param disk_size_gb: Specifies the size of an empty data disk in + gigabytes. This element can be used to overwrite the size of the disk in a + virtual machine image.

    This value cannot be larger than 1023 GB + :type disk_size_gb: int + :param managed_disk: The managed disk parameters. + :type managed_disk: + ~azure.mgmt.compute.v2018_10_01.models.ManagedDiskParameters + """ + + _validation = { + 'create_option': {'required': True}, + } + + _attribute_map = { + 'os_type': {'key': 'osType', 'type': 'OperatingSystemTypes'}, + 'encryption_settings': {'key': 'encryptionSettings', 'type': 'DiskEncryptionSettings'}, + 'name': {'key': 'name', 'type': 'str'}, + 'vhd': {'key': 'vhd', 'type': 'VirtualHardDisk'}, + 'image': {'key': 'image', 'type': 'VirtualHardDisk'}, + 'caching': {'key': 'caching', 'type': 'CachingTypes'}, + 'write_accelerator_enabled': {'key': 'writeAcceleratorEnabled', 'type': 'bool'}, + 'diff_disk_settings': {'key': 'diffDiskSettings', 'type': 'DiffDiskSettings'}, + 'create_option': {'key': 'createOption', 'type': 'str'}, + 'disk_size_gb': {'key': 'diskSizeGB', 'type': 'int'}, + 'managed_disk': {'key': 'managedDisk', 'type': 'ManagedDiskParameters'}, + } + + def __init__(self, **kwargs): + super(OSDisk, self).__init__(**kwargs) + self.os_type = kwargs.get('os_type', None) + self.encryption_settings = kwargs.get('encryption_settings', None) + self.name = kwargs.get('name', None) + self.vhd = kwargs.get('vhd', None) + self.image = kwargs.get('image', None) + self.caching = kwargs.get('caching', None) + self.write_accelerator_enabled = kwargs.get('write_accelerator_enabled', None) + self.diff_disk_settings = kwargs.get('diff_disk_settings', None) + self.create_option = kwargs.get('create_option', None) + self.disk_size_gb = kwargs.get('disk_size_gb', None) + self.managed_disk = kwargs.get('managed_disk', None) + + +class OSDiskImage(Model): + """Contains the os disk image information. + + All required parameters must be populated in order to send to Azure. + + :param operating_system: Required. The operating system of the + osDiskImage. Possible values include: 'Windows', 'Linux' + :type operating_system: str or + ~azure.mgmt.compute.v2018_10_01.models.OperatingSystemTypes + """ + + _validation = { + 'operating_system': {'required': True}, + } + + _attribute_map = { + 'operating_system': {'key': 'operatingSystem', 'type': 'OperatingSystemTypes'}, + } + + def __init__(self, **kwargs): + super(OSDiskImage, self).__init__(**kwargs) + self.operating_system = kwargs.get('operating_system', None) + + +class OSProfile(Model): + """Specifies the operating system settings for the virtual machine. + + :param computer_name: Specifies the host OS name of the virtual machine. +

    This name cannot be updated after the VM is created.

    + **Max-length (Windows):** 15 characters

    **Max-length (Linux):** + 64 characters.

    For naming conventions and restrictions see [Azure + infrastructure services implementation + guidelines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-infrastructure-subscription-accounts-guidelines?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json#1-naming-conventions). + :type computer_name: str + :param admin_username: Specifies the name of the administrator account. +

    **Windows-only restriction:** Cannot end in "."

    + **Disallowed values:** "administrator", "admin", "user", "user1", "test", + "user2", "test1", "user3", "admin1", "1", "123", "a", "actuser", "adm", + "admin2", "aspnet", "backup", "console", "david", "guest", "john", + "owner", "root", "server", "sql", "support", "support_388945a0", "sys", + "test2", "test3", "user4", "user5".

    **Minimum-length (Linux):** 1 + character

    **Max-length (Linux):** 64 characters

    + **Max-length (Windows):** 20 characters

  • For root access to + the Linux VM, see [Using root privileges on Linux virtual machines in + Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-use-root-privileges?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json)
  • + For a list of built-in system users on Linux that should not be used in + this field, see [Selecting User Names for Linux on + Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-usernames?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json) + :type admin_username: str + :param admin_password: Specifies the password of the administrator + account.

    **Minimum-length (Windows):** 8 characters

    + **Minimum-length (Linux):** 6 characters

    **Max-length + (Windows):** 123 characters

    **Max-length (Linux):** 72 characters +

    **Complexity requirements:** 3 out of 4 conditions below need to + be fulfilled
    Has lower characters
    Has upper characters
    Has a + digit
    Has a special character (Regex match [\\W_])

    + **Disallowed values:** "abc@123", "P@$$w0rd", "P@ssw0rd", "P@ssword123", + "Pa$$word", "pass@word1", "Password!", "Password1", "Password22", + "iloveyou!"

    For resetting the password, see [How to reset the + Remote Desktop service or its login password in a Windows + VM](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-reset-rdp?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json) +

    For resetting root password, see [Manage users, SSH, and check or + repair disks on Azure Linux VMs using the VMAccess + Extension](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-using-vmaccess-extension?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json#reset-root-password) + :type admin_password: str + :param custom_data: Specifies a base-64 encoded string of custom data. The + base-64 encoded string is decoded to a binary array that is saved as a + file on the Virtual Machine. The maximum length of the binary array is + 65535 bytes.

    For using cloud-init for your VM, see [Using + cloud-init to customize a Linux VM during + creation](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-using-cloud-init?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json) + :type custom_data: str + :param windows_configuration: Specifies Windows operating system settings + on the virtual machine. + :type windows_configuration: + ~azure.mgmt.compute.v2018_10_01.models.WindowsConfiguration + :param linux_configuration: Specifies the Linux operating system settings + on the virtual machine.

    For a list of supported Linux + distributions, see [Linux on Azure-Endorsed + Distributions](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-endorsed-distros?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json) +

    For running non-endorsed distributions, see [Information for + Non-Endorsed + Distributions](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-create-upload-generic?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json). + :type linux_configuration: + ~azure.mgmt.compute.v2018_10_01.models.LinuxConfiguration + :param secrets: Specifies set of certificates that should be installed + onto the virtual machine. + :type secrets: + list[~azure.mgmt.compute.v2018_10_01.models.VaultSecretGroup] + :param allow_extension_operations: Specifies whether extension operations + should be allowed on the virtual machine.

    This may only be set to + False when no extensions are present on the virtual machine. + :type allow_extension_operations: bool + """ + + _attribute_map = { + 'computer_name': {'key': 'computerName', 'type': 'str'}, + 'admin_username': {'key': 'adminUsername', 'type': 'str'}, + 'admin_password': {'key': 'adminPassword', 'type': 'str'}, + 'custom_data': {'key': 'customData', 'type': 'str'}, + 'windows_configuration': {'key': 'windowsConfiguration', 'type': 'WindowsConfiguration'}, + 'linux_configuration': {'key': 'linuxConfiguration', 'type': 'LinuxConfiguration'}, + 'secrets': {'key': 'secrets', 'type': '[VaultSecretGroup]'}, + 'allow_extension_operations': {'key': 'allowExtensionOperations', 'type': 'bool'}, + } + + def __init__(self, **kwargs): + super(OSProfile, self).__init__(**kwargs) + self.computer_name = kwargs.get('computer_name', None) + self.admin_username = kwargs.get('admin_username', None) + self.admin_password = kwargs.get('admin_password', None) + self.custom_data = kwargs.get('custom_data', None) + self.windows_configuration = kwargs.get('windows_configuration', None) + self.linux_configuration = kwargs.get('linux_configuration', None) + self.secrets = kwargs.get('secrets', None) + self.allow_extension_operations = kwargs.get('allow_extension_operations', None) + + +class Plan(Model): + """Specifies information about the marketplace image used to create the + virtual machine. This element is only used for marketplace images. Before + you can use a marketplace image from an API, you must enable the image for + programmatic use. In the Azure portal, find the marketplace image that you + want to use and then click **Want to deploy programmatically, Get Started + ->**. Enter any required information and then click **Save**. + + :param name: The plan ID. + :type name: str + :param publisher: The publisher ID. + :type publisher: str + :param product: Specifies the product of the image from the marketplace. + This is the same value as Offer under the imageReference element. + :type product: str + :param promotion_code: The promotion code. + :type promotion_code: str + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'publisher': {'key': 'publisher', 'type': 'str'}, + 'product': {'key': 'product', 'type': 'str'}, + 'promotion_code': {'key': 'promotionCode', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(Plan, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.publisher = kwargs.get('publisher', None) + self.product = kwargs.get('product', None) + self.promotion_code = kwargs.get('promotion_code', None) + + +class ProximityPlacementGroup(Resource): + """Specifies information about the proximity placement group. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource Id + :vartype id: str + :ivar name: Resource name + :vartype name: str + :ivar type: Resource type + :vartype type: str + :param location: Required. Resource location + :type location: str + :param tags: Resource tags + :type tags: dict[str, str] + :param proximity_placement_group_type: Specifies the type of the proximity + placement group.

    Possible values are:

    **Standard** : + Co-locate resources within an Azure region or Availability Zone.

    + **Ultra** : For future use. Possible values include: 'Standard', 'Ultra' + :type proximity_placement_group_type: str or + ~azure.mgmt.compute.v2018_10_01.models.ProximityPlacementGroupType + :ivar virtual_machines: A list of references to all virtual machines in + the proximity placement group. + :vartype virtual_machines: + list[~azure.mgmt.compute.v2018_10_01.models.SubResource] + :ivar virtual_machine_scale_sets: A list of references to all virtual + machine scale sets in the proximity placement group. + :vartype virtual_machine_scale_sets: + list[~azure.mgmt.compute.v2018_10_01.models.SubResource] + :ivar availability_sets: A list of references to all availability sets in + the proximity placement group. + :vartype availability_sets: + list[~azure.mgmt.compute.v2018_10_01.models.SubResource] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + 'virtual_machines': {'readonly': True}, + 'virtual_machine_scale_sets': {'readonly': True}, + 'availability_sets': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'proximity_placement_group_type': {'key': 'properties.proximityPlacementGroupType', 'type': 'str'}, + 'virtual_machines': {'key': 'properties.virtualMachines', 'type': '[SubResource]'}, + 'virtual_machine_scale_sets': {'key': 'properties.virtualMachineScaleSets', 'type': '[SubResource]'}, + 'availability_sets': {'key': 'properties.availabilitySets', 'type': '[SubResource]'}, + } + + def __init__(self, **kwargs): + super(ProximityPlacementGroup, self).__init__(**kwargs) + self.proximity_placement_group_type = kwargs.get('proximity_placement_group_type', None) + self.virtual_machines = None + self.virtual_machine_scale_sets = None + self.availability_sets = None + + +class ProximityPlacementGroupUpdate(UpdateResource): + """Specifies information about the proximity placement group. + + :param tags: Resource tags + :type tags: dict[str, str] + """ + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__(self, **kwargs): + super(ProximityPlacementGroupUpdate, self).__init__(**kwargs) + + +class PurchasePlan(Model): + """Used for establishing the purchase context of any 3rd Party artifact + through MarketPlace. + + All required parameters must be populated in order to send to Azure. + + :param publisher: Required. The publisher ID. + :type publisher: str + :param name: Required. The plan ID. + :type name: str + :param product: Required. Specifies the product of the image from the + marketplace. This is the same value as Offer under the imageReference + element. + :type product: str + """ + + _validation = { + 'publisher': {'required': True}, + 'name': {'required': True}, + 'product': {'required': True}, + } + + _attribute_map = { + 'publisher': {'key': 'publisher', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'product': {'key': 'product', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(PurchasePlan, self).__init__(**kwargs) + self.publisher = kwargs.get('publisher', None) + self.name = kwargs.get('name', None) + self.product = kwargs.get('product', None) + + +class RecoveryWalkResponse(Model): + """Response after calling a manual recovery walk. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar walk_performed: Whether the recovery walk was performed + :vartype walk_performed: bool + :ivar next_platform_update_domain: The next update domain that needs to be + walked. Null means walk spanning all update domains has been completed + :vartype next_platform_update_domain: int + """ + + _validation = { + 'walk_performed': {'readonly': True}, + 'next_platform_update_domain': {'readonly': True}, + } + + _attribute_map = { + 'walk_performed': {'key': 'walkPerformed', 'type': 'bool'}, + 'next_platform_update_domain': {'key': 'nextPlatformUpdateDomain', 'type': 'int'}, + } + + def __init__(self, **kwargs): + super(RecoveryWalkResponse, self).__init__(**kwargs) + self.walk_performed = None + self.next_platform_update_domain = None + + +class RequestRateByIntervalInput(LogAnalyticsInputBase): + """Api request input for LogAnalytics getRequestRateByInterval Api. + + All required parameters must be populated in order to send to Azure. + + :param blob_container_sas_uri: Required. SAS Uri of the logging blob + container to which LogAnalytics Api writes output logs to. + :type blob_container_sas_uri: str + :param from_time: Required. From time of the query + :type from_time: datetime + :param to_time: Required. To time of the query + :type to_time: datetime + :param group_by_throttle_policy: Group query result by Throttle Policy + applied. + :type group_by_throttle_policy: bool + :param group_by_operation_name: Group query result by Operation Name. + :type group_by_operation_name: bool + :param group_by_resource_name: Group query result by Resource Name. + :type group_by_resource_name: bool + :param interval_length: Required. Interval value in minutes used to create + LogAnalytics call rate logs. Possible values include: 'ThreeMins', + 'FiveMins', 'ThirtyMins', 'SixtyMins' + :type interval_length: str or + ~azure.mgmt.compute.v2018_10_01.models.IntervalInMins + """ + + _validation = { + 'blob_container_sas_uri': {'required': True}, + 'from_time': {'required': True}, + 'to_time': {'required': True}, + 'interval_length': {'required': True}, + } + + _attribute_map = { + 'blob_container_sas_uri': {'key': 'blobContainerSasUri', 'type': 'str'}, + 'from_time': {'key': 'fromTime', 'type': 'iso-8601'}, + 'to_time': {'key': 'toTime', 'type': 'iso-8601'}, + 'group_by_throttle_policy': {'key': 'groupByThrottlePolicy', 'type': 'bool'}, + 'group_by_operation_name': {'key': 'groupByOperationName', 'type': 'bool'}, + 'group_by_resource_name': {'key': 'groupByResourceName', 'type': 'bool'}, + 'interval_length': {'key': 'intervalLength', 'type': 'IntervalInMins'}, + } + + def __init__(self, **kwargs): + super(RequestRateByIntervalInput, self).__init__(**kwargs) + self.interval_length = kwargs.get('interval_length', None) + + +class RollbackStatusInfo(Model): + """Information about rollback on failed VM instances after a OS Upgrade + operation. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar successfully_rolledback_instance_count: The number of instances + which have been successfully rolled back. + :vartype successfully_rolledback_instance_count: int + :ivar failed_rolledback_instance_count: The number of instances which + failed to rollback. + :vartype failed_rolledback_instance_count: int + :ivar rollback_error: Error details if OS rollback failed. + :vartype rollback_error: ~azure.mgmt.compute.v2018_10_01.models.ApiError + """ + + _validation = { + 'successfully_rolledback_instance_count': {'readonly': True}, + 'failed_rolledback_instance_count': {'readonly': True}, + 'rollback_error': {'readonly': True}, + } + + _attribute_map = { + 'successfully_rolledback_instance_count': {'key': 'successfullyRolledbackInstanceCount', 'type': 'int'}, + 'failed_rolledback_instance_count': {'key': 'failedRolledbackInstanceCount', 'type': 'int'}, + 'rollback_error': {'key': 'rollbackError', 'type': 'ApiError'}, + } + + def __init__(self, **kwargs): + super(RollbackStatusInfo, self).__init__(**kwargs) + self.successfully_rolledback_instance_count = None + self.failed_rolledback_instance_count = None + self.rollback_error = None + + +class RollingUpgradePolicy(Model): + """The configuration parameters used while performing a rolling upgrade. + + :param max_batch_instance_percent: The maximum percent of total virtual + machine instances that will be upgraded simultaneously by the rolling + upgrade in one batch. As this is a maximum, unhealthy instances in + previous or future batches can cause the percentage of instances in a + batch to decrease to ensure higher reliability. The default value for this + parameter is 20%. + :type max_batch_instance_percent: int + :param max_unhealthy_instance_percent: The maximum percentage of the total + virtual machine instances in the scale set that can be simultaneously + unhealthy, either as a result of being upgraded, or by being found in an + unhealthy state by the virtual machine health checks before the rolling + upgrade aborts. This constraint will be checked prior to starting any + batch. The default value for this parameter is 20%. + :type max_unhealthy_instance_percent: int + :param max_unhealthy_upgraded_instance_percent: The maximum percentage of + upgraded virtual machine instances that can be found to be in an unhealthy + state. This check will happen after each batch is upgraded. If this + percentage is ever exceeded, the rolling update aborts. The default value + for this parameter is 20%. + :type max_unhealthy_upgraded_instance_percent: int + :param pause_time_between_batches: The wait time between completing the + update for all virtual machines in one batch and starting the next batch. + The time duration should be specified in ISO 8601 format. The default + value is 0 seconds (PT0S). + :type pause_time_between_batches: str + """ + + _validation = { + 'max_batch_instance_percent': {'maximum': 100, 'minimum': 5}, + 'max_unhealthy_instance_percent': {'maximum': 100, 'minimum': 5}, + 'max_unhealthy_upgraded_instance_percent': {'maximum': 100, 'minimum': 0}, + } + + _attribute_map = { + 'max_batch_instance_percent': {'key': 'maxBatchInstancePercent', 'type': 'int'}, + 'max_unhealthy_instance_percent': {'key': 'maxUnhealthyInstancePercent', 'type': 'int'}, + 'max_unhealthy_upgraded_instance_percent': {'key': 'maxUnhealthyUpgradedInstancePercent', 'type': 'int'}, + 'pause_time_between_batches': {'key': 'pauseTimeBetweenBatches', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(RollingUpgradePolicy, self).__init__(**kwargs) + self.max_batch_instance_percent = kwargs.get('max_batch_instance_percent', None) + self.max_unhealthy_instance_percent = kwargs.get('max_unhealthy_instance_percent', None) + self.max_unhealthy_upgraded_instance_percent = kwargs.get('max_unhealthy_upgraded_instance_percent', None) + self.pause_time_between_batches = kwargs.get('pause_time_between_batches', None) + + +class RollingUpgradeProgressInfo(Model): + """Information about the number of virtual machine instances in each upgrade + state. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar successful_instance_count: The number of instances that have been + successfully upgraded. + :vartype successful_instance_count: int + :ivar failed_instance_count: The number of instances that have failed to + be upgraded successfully. + :vartype failed_instance_count: int + :ivar in_progress_instance_count: The number of instances that are + currently being upgraded. + :vartype in_progress_instance_count: int + :ivar pending_instance_count: The number of instances that have not yet + begun to be upgraded. + :vartype pending_instance_count: int + """ + + _validation = { + 'successful_instance_count': {'readonly': True}, + 'failed_instance_count': {'readonly': True}, + 'in_progress_instance_count': {'readonly': True}, + 'pending_instance_count': {'readonly': True}, + } + + _attribute_map = { + 'successful_instance_count': {'key': 'successfulInstanceCount', 'type': 'int'}, + 'failed_instance_count': {'key': 'failedInstanceCount', 'type': 'int'}, + 'in_progress_instance_count': {'key': 'inProgressInstanceCount', 'type': 'int'}, + 'pending_instance_count': {'key': 'pendingInstanceCount', 'type': 'int'}, + } + + def __init__(self, **kwargs): + super(RollingUpgradeProgressInfo, self).__init__(**kwargs) + self.successful_instance_count = None + self.failed_instance_count = None + self.in_progress_instance_count = None + self.pending_instance_count = None + + +class RollingUpgradeRunningStatus(Model): + """Information about the current running state of the overall upgrade. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar code: Code indicating the current status of the upgrade. Possible + values include: 'RollingForward', 'Cancelled', 'Completed', 'Faulted' + :vartype code: str or + ~azure.mgmt.compute.v2018_10_01.models.RollingUpgradeStatusCode + :ivar start_time: Start time of the upgrade. + :vartype start_time: datetime + :ivar last_action: The last action performed on the rolling upgrade. + Possible values include: 'Start', 'Cancel' + :vartype last_action: str or + ~azure.mgmt.compute.v2018_10_01.models.RollingUpgradeActionType + :ivar last_action_time: Last action time of the upgrade. + :vartype last_action_time: datetime + """ + + _validation = { + 'code': {'readonly': True}, + 'start_time': {'readonly': True}, + 'last_action': {'readonly': True}, + 'last_action_time': {'readonly': True}, + } + + _attribute_map = { + 'code': {'key': 'code', 'type': 'RollingUpgradeStatusCode'}, + 'start_time': {'key': 'startTime', 'type': 'iso-8601'}, + 'last_action': {'key': 'lastAction', 'type': 'RollingUpgradeActionType'}, + 'last_action_time': {'key': 'lastActionTime', 'type': 'iso-8601'}, + } + + def __init__(self, **kwargs): + super(RollingUpgradeRunningStatus, self).__init__(**kwargs) + self.code = None + self.start_time = None + self.last_action = None + self.last_action_time = None + + +class RollingUpgradeStatusInfo(Resource): + """The status of the latest virtual machine scale set rolling upgrade. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource Id + :vartype id: str + :ivar name: Resource name + :vartype name: str + :ivar type: Resource type + :vartype type: str + :param location: Required. Resource location + :type location: str + :param tags: Resource tags + :type tags: dict[str, str] + :ivar policy: The rolling upgrade policies applied for this upgrade. + :vartype policy: + ~azure.mgmt.compute.v2018_10_01.models.RollingUpgradePolicy + :ivar running_status: Information about the current running state of the + overall upgrade. + :vartype running_status: + ~azure.mgmt.compute.v2018_10_01.models.RollingUpgradeRunningStatus + :ivar progress: Information about the number of virtual machine instances + in each upgrade state. + :vartype progress: + ~azure.mgmt.compute.v2018_10_01.models.RollingUpgradeProgressInfo + :ivar error: Error details for this upgrade, if there are any. + :vartype error: ~azure.mgmt.compute.v2018_10_01.models.ApiError + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + 'policy': {'readonly': True}, + 'running_status': {'readonly': True}, + 'progress': {'readonly': True}, + 'error': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'policy': {'key': 'properties.policy', 'type': 'RollingUpgradePolicy'}, + 'running_status': {'key': 'properties.runningStatus', 'type': 'RollingUpgradeRunningStatus'}, + 'progress': {'key': 'properties.progress', 'type': 'RollingUpgradeProgressInfo'}, + 'error': {'key': 'properties.error', 'type': 'ApiError'}, + } + + def __init__(self, **kwargs): + super(RollingUpgradeStatusInfo, self).__init__(**kwargs) + self.policy = None + self.running_status = None + self.progress = None + self.error = None + + +class RunCommandDocumentBase(Model): + """Describes the properties of a Run Command metadata. + + All required parameters must be populated in order to send to Azure. + + :param schema: Required. The VM run command schema. + :type schema: str + :param id: Required. The VM run command id. + :type id: str + :param os_type: Required. The Operating System type. Possible values + include: 'Windows', 'Linux' + :type os_type: str or + ~azure.mgmt.compute.v2018_10_01.models.OperatingSystemTypes + :param label: Required. The VM run command label. + :type label: str + :param description: Required. The VM run command description. + :type description: str + """ + + _validation = { + 'schema': {'required': True}, + 'id': {'required': True}, + 'os_type': {'required': True}, + 'label': {'required': True}, + 'description': {'required': True}, + } + + _attribute_map = { + 'schema': {'key': '$schema', 'type': 'str'}, + 'id': {'key': 'id', 'type': 'str'}, + 'os_type': {'key': 'osType', 'type': 'OperatingSystemTypes'}, + 'label': {'key': 'label', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(RunCommandDocumentBase, self).__init__(**kwargs) + self.schema = kwargs.get('schema', None) + self.id = kwargs.get('id', None) + self.os_type = kwargs.get('os_type', None) + self.label = kwargs.get('label', None) + self.description = kwargs.get('description', None) + + +class RunCommandDocument(RunCommandDocumentBase): + """Describes the properties of a Run Command. + + All required parameters must be populated in order to send to Azure. + + :param schema: Required. The VM run command schema. + :type schema: str + :param id: Required. The VM run command id. + :type id: str + :param os_type: Required. The Operating System type. Possible values + include: 'Windows', 'Linux' + :type os_type: str or + ~azure.mgmt.compute.v2018_10_01.models.OperatingSystemTypes + :param label: Required. The VM run command label. + :type label: str + :param description: Required. The VM run command description. + :type description: str + :param script: Required. The script to be executed. + :type script: list[str] + :param parameters: The parameters used by the script. + :type parameters: + list[~azure.mgmt.compute.v2018_10_01.models.RunCommandParameterDefinition] + """ + + _validation = { + 'schema': {'required': True}, + 'id': {'required': True}, + 'os_type': {'required': True}, + 'label': {'required': True}, + 'description': {'required': True}, + 'script': {'required': True}, + } + + _attribute_map = { + 'schema': {'key': '$schema', 'type': 'str'}, + 'id': {'key': 'id', 'type': 'str'}, + 'os_type': {'key': 'osType', 'type': 'OperatingSystemTypes'}, + 'label': {'key': 'label', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + 'script': {'key': 'script', 'type': '[str]'}, + 'parameters': {'key': 'parameters', 'type': '[RunCommandParameterDefinition]'}, + } + + def __init__(self, **kwargs): + super(RunCommandDocument, self).__init__(**kwargs) + self.script = kwargs.get('script', None) + self.parameters = kwargs.get('parameters', None) + + +class RunCommandInput(Model): + """Capture Virtual Machine parameters. + + All required parameters must be populated in order to send to Azure. + + :param command_id: Required. The run command id. + :type command_id: str + :param script: Optional. The script to be executed. When this value is + given, the given script will override the default script of the command. + :type script: list[str] + :param parameters: The run command parameters. + :type parameters: + list[~azure.mgmt.compute.v2018_10_01.models.RunCommandInputParameter] + """ + + _validation = { + 'command_id': {'required': True}, + } + + _attribute_map = { + 'command_id': {'key': 'commandId', 'type': 'str'}, + 'script': {'key': 'script', 'type': '[str]'}, + 'parameters': {'key': 'parameters', 'type': '[RunCommandInputParameter]'}, + } + + def __init__(self, **kwargs): + super(RunCommandInput, self).__init__(**kwargs) + self.command_id = kwargs.get('command_id', None) + self.script = kwargs.get('script', None) + self.parameters = kwargs.get('parameters', None) + + +class RunCommandInputParameter(Model): + """Describes the properties of a run command parameter. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. The run command parameter name. + :type name: str + :param value: Required. The run command parameter value. + :type value: str + """ + + _validation = { + 'name': {'required': True}, + 'value': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'value': {'key': 'value', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(RunCommandInputParameter, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.value = kwargs.get('value', None) + + +class RunCommandParameterDefinition(Model): + """Describes the properties of a run command parameter. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. The run command parameter name. + :type name: str + :param type: Required. The run command parameter type. + :type type: str + :param default_value: The run command parameter default value. + :type default_value: str + :param required: The run command parameter required. Default value: False + . + :type required: bool + """ + + _validation = { + 'name': {'required': True}, + 'type': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'default_value': {'key': 'defaultValue', 'type': 'str'}, + 'required': {'key': 'required', 'type': 'bool'}, + } + + def __init__(self, **kwargs): + super(RunCommandParameterDefinition, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.type = kwargs.get('type', None) + self.default_value = kwargs.get('default_value', None) + self.required = kwargs.get('required', False) + + +class RunCommandResult(Model): + """RunCommandResult. + + :param value: Run command operation response. + :type value: + list[~azure.mgmt.compute.v2018_10_01.models.InstanceViewStatus] + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[InstanceViewStatus]'}, + } + + def __init__(self, **kwargs): + super(RunCommandResult, self).__init__(**kwargs) + self.value = kwargs.get('value', None) + + +class Sku(Model): + """Describes a virtual machine scale set sku. + + :param name: The sku name. + :type name: str + :param tier: Specifies the tier of virtual machines in a scale set.

    Possible Values:

    **Standard**

    **Basic** + :type tier: str + :param capacity: Specifies the number of virtual machines in the scale + set. + :type capacity: long + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'tier': {'key': 'tier', 'type': 'str'}, + 'capacity': {'key': 'capacity', 'type': 'long'}, + } + + def __init__(self, **kwargs): + super(Sku, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.tier = kwargs.get('tier', None) + self.capacity = kwargs.get('capacity', None) + + +class SshConfiguration(Model): + """SSH configuration for Linux based VMs running on Azure. + + :param public_keys: The list of SSH public keys used to authenticate with + linux based VMs. + :type public_keys: + list[~azure.mgmt.compute.v2018_10_01.models.SshPublicKey] + """ + + _attribute_map = { + 'public_keys': {'key': 'publicKeys', 'type': '[SshPublicKey]'}, + } + + def __init__(self, **kwargs): + super(SshConfiguration, self).__init__(**kwargs) + self.public_keys = kwargs.get('public_keys', None) + + +class SshPublicKey(Model): + """Contains information about SSH certificate public key and the path on the + Linux VM where the public key is placed. + + :param path: Specifies the full path on the created VM where ssh public + key is stored. If the file already exists, the specified key is appended + to the file. Example: /home/user/.ssh/authorized_keys + :type path: str + :param key_data: SSH public key certificate used to authenticate with the + VM through ssh. The key needs to be at least 2048-bit and in ssh-rsa + format.

    For creating ssh keys, see [Create SSH keys on Linux and + Mac for Linux VMs in + Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-mac-create-ssh-keys?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json). + :type key_data: str + """ + + _attribute_map = { + 'path': {'key': 'path', 'type': 'str'}, + 'key_data': {'key': 'keyData', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(SshPublicKey, self).__init__(**kwargs) + self.path = kwargs.get('path', None) + self.key_data = kwargs.get('key_data', None) + + +class StorageProfile(Model): + """Specifies the storage settings for the virtual machine disks. + + :param image_reference: Specifies information about the image to use. You + can specify information about platform images, marketplace images, or + virtual machine images. This element is required when you want to use a + platform image, marketplace image, or virtual machine image, but is not + used in other creation operations. + :type image_reference: + ~azure.mgmt.compute.v2018_10_01.models.ImageReference + :param os_disk: Specifies information about the operating system disk used + by the virtual machine.

    For more information about disks, see + [About disks and VHDs for Azure virtual + machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-about-disks-vhds?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). + :type os_disk: ~azure.mgmt.compute.v2018_10_01.models.OSDisk + :param data_disks: Specifies the parameters that are used to add a data + disk to a virtual machine.

    For more information about disks, see + [About disks and VHDs for Azure virtual + machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-about-disks-vhds?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). + :type data_disks: list[~azure.mgmt.compute.v2018_10_01.models.DataDisk] + """ + + _attribute_map = { + 'image_reference': {'key': 'imageReference', 'type': 'ImageReference'}, + 'os_disk': {'key': 'osDisk', 'type': 'OSDisk'}, + 'data_disks': {'key': 'dataDisks', 'type': '[DataDisk]'}, + } + + def __init__(self, **kwargs): + super(StorageProfile, self).__init__(**kwargs) + self.image_reference = kwargs.get('image_reference', None) + self.os_disk = kwargs.get('os_disk', None) + self.data_disks = kwargs.get('data_disks', None) + + +class SubResourceReadOnly(Model): + """SubResourceReadOnly. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource Id + :vartype id: str + """ + + _validation = { + 'id': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(SubResourceReadOnly, self).__init__(**kwargs) + self.id = None + + +class ThrottledRequestsInput(LogAnalyticsInputBase): + """Api request input for LogAnalytics getThrottledRequests Api. + + All required parameters must be populated in order to send to Azure. + + :param blob_container_sas_uri: Required. SAS Uri of the logging blob + container to which LogAnalytics Api writes output logs to. + :type blob_container_sas_uri: str + :param from_time: Required. From time of the query + :type from_time: datetime + :param to_time: Required. To time of the query + :type to_time: datetime + :param group_by_throttle_policy: Group query result by Throttle Policy + applied. + :type group_by_throttle_policy: bool + :param group_by_operation_name: Group query result by Operation Name. + :type group_by_operation_name: bool + :param group_by_resource_name: Group query result by Resource Name. + :type group_by_resource_name: bool + """ + + _validation = { + 'blob_container_sas_uri': {'required': True}, + 'from_time': {'required': True}, + 'to_time': {'required': True}, + } + + _attribute_map = { + 'blob_container_sas_uri': {'key': 'blobContainerSasUri', 'type': 'str'}, + 'from_time': {'key': 'fromTime', 'type': 'iso-8601'}, + 'to_time': {'key': 'toTime', 'type': 'iso-8601'}, + 'group_by_throttle_policy': {'key': 'groupByThrottlePolicy', 'type': 'bool'}, + 'group_by_operation_name': {'key': 'groupByOperationName', 'type': 'bool'}, + 'group_by_resource_name': {'key': 'groupByResourceName', 'type': 'bool'}, + } + + def __init__(self, **kwargs): + super(ThrottledRequestsInput, self).__init__(**kwargs) + + +class UpgradeOperationHistoricalStatusInfo(Model): + """Virtual Machine Scale Set OS Upgrade History operation response. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar properties: Information about the properties of the upgrade + operation. + :vartype properties: + ~azure.mgmt.compute.v2018_10_01.models.UpgradeOperationHistoricalStatusInfoProperties + :ivar type: Resource type + :vartype type: str + :ivar location: Resource location + :vartype location: str + """ + + _validation = { + 'properties': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'readonly': True}, + } + + _attribute_map = { + 'properties': {'key': 'properties', 'type': 'UpgradeOperationHistoricalStatusInfoProperties'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(UpgradeOperationHistoricalStatusInfo, self).__init__(**kwargs) + self.properties = None + self.type = None + self.location = None + + +class UpgradeOperationHistoricalStatusInfoProperties(Model): + """Describes each OS upgrade on the Virtual Machine Scale Set. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar running_status: Information about the overall status of the upgrade + operation. + :vartype running_status: + ~azure.mgmt.compute.v2018_10_01.models.UpgradeOperationHistoryStatus + :ivar progress: Counts of the VMs in each state. + :vartype progress: + ~azure.mgmt.compute.v2018_10_01.models.RollingUpgradeProgressInfo + :ivar error: Error Details for this upgrade if there are any. + :vartype error: ~azure.mgmt.compute.v2018_10_01.models.ApiError + :ivar started_by: Invoker of the Upgrade Operation. Possible values + include: 'Unknown', 'User', 'Platform' + :vartype started_by: str or + ~azure.mgmt.compute.v2018_10_01.models.UpgradeOperationInvoker + :ivar target_image_reference: Image Reference details + :vartype target_image_reference: + ~azure.mgmt.compute.v2018_10_01.models.ImageReference + :ivar rollback_info: Information about OS rollback if performed + :vartype rollback_info: + ~azure.mgmt.compute.v2018_10_01.models.RollbackStatusInfo + """ + + _validation = { + 'running_status': {'readonly': True}, + 'progress': {'readonly': True}, + 'error': {'readonly': True}, + 'started_by': {'readonly': True}, + 'target_image_reference': {'readonly': True}, + 'rollback_info': {'readonly': True}, + } + + _attribute_map = { + 'running_status': {'key': 'runningStatus', 'type': 'UpgradeOperationHistoryStatus'}, + 'progress': {'key': 'progress', 'type': 'RollingUpgradeProgressInfo'}, + 'error': {'key': 'error', 'type': 'ApiError'}, + 'started_by': {'key': 'startedBy', 'type': 'UpgradeOperationInvoker'}, + 'target_image_reference': {'key': 'targetImageReference', 'type': 'ImageReference'}, + 'rollback_info': {'key': 'rollbackInfo', 'type': 'RollbackStatusInfo'}, + } + + def __init__(self, **kwargs): + super(UpgradeOperationHistoricalStatusInfoProperties, self).__init__(**kwargs) + self.running_status = None + self.progress = None + self.error = None + self.started_by = None + self.target_image_reference = None + self.rollback_info = None + + +class UpgradeOperationHistoryStatus(Model): + """Information about the current running state of the overall upgrade. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar code: Code indicating the current status of the upgrade. Possible + values include: 'RollingForward', 'Cancelled', 'Completed', 'Faulted' + :vartype code: str or ~azure.mgmt.compute.v2018_10_01.models.UpgradeState + :ivar start_time: Start time of the upgrade. + :vartype start_time: datetime + :ivar end_time: End time of the upgrade. + :vartype end_time: datetime + """ + + _validation = { + 'code': {'readonly': True}, + 'start_time': {'readonly': True}, + 'end_time': {'readonly': True}, + } + + _attribute_map = { + 'code': {'key': 'code', 'type': 'UpgradeState'}, + 'start_time': {'key': 'startTime', 'type': 'iso-8601'}, + 'end_time': {'key': 'endTime', 'type': 'iso-8601'}, + } + + def __init__(self, **kwargs): + super(UpgradeOperationHistoryStatus, self).__init__(**kwargs) + self.code = None + self.start_time = None + self.end_time = None + + +class UpgradePolicy(Model): + """Describes an upgrade policy - automatic, manual, or rolling. + + :param mode: Specifies the mode of an upgrade to virtual machines in the + scale set.

    Possible values are:

    **Manual** - You + control the application of updates to virtual machines in the scale set. + You do this by using the manualUpgrade action.

    **Automatic** - + All virtual machines in the scale set are automatically updated at the + same time. Possible values include: 'Automatic', 'Manual', 'Rolling' + :type mode: str or ~azure.mgmt.compute.v2018_10_01.models.UpgradeMode + :param rolling_upgrade_policy: The configuration parameters used while + performing a rolling upgrade. + :type rolling_upgrade_policy: + ~azure.mgmt.compute.v2018_10_01.models.RollingUpgradePolicy + :param automatic_os_upgrade_policy: Configuration parameters used for + performing automatic OS Upgrade. + :type automatic_os_upgrade_policy: + ~azure.mgmt.compute.v2018_10_01.models.AutomaticOSUpgradePolicy + """ + + _attribute_map = { + 'mode': {'key': 'mode', 'type': 'UpgradeMode'}, + 'rolling_upgrade_policy': {'key': 'rollingUpgradePolicy', 'type': 'RollingUpgradePolicy'}, + 'automatic_os_upgrade_policy': {'key': 'automaticOSUpgradePolicy', 'type': 'AutomaticOSUpgradePolicy'}, + } + + def __init__(self, **kwargs): + super(UpgradePolicy, self).__init__(**kwargs) + self.mode = kwargs.get('mode', None) + self.rolling_upgrade_policy = kwargs.get('rolling_upgrade_policy', None) + self.automatic_os_upgrade_policy = kwargs.get('automatic_os_upgrade_policy', None) + + +class Usage(Model): + """Describes Compute Resource Usage. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar unit: Required. An enum describing the unit of usage measurement. + Default value: "Count" . + :vartype unit: str + :param current_value: Required. The current usage of the resource. + :type current_value: int + :param limit: Required. The maximum permitted usage of the resource. + :type limit: long + :param name: Required. The name of the type of usage. + :type name: ~azure.mgmt.compute.v2018_10_01.models.UsageName + """ + + _validation = { + 'unit': {'required': True, 'constant': True}, + 'current_value': {'required': True}, + 'limit': {'required': True}, + 'name': {'required': True}, + } + + _attribute_map = { + 'unit': {'key': 'unit', 'type': 'str'}, + 'current_value': {'key': 'currentValue', 'type': 'int'}, + 'limit': {'key': 'limit', 'type': 'long'}, + 'name': {'key': 'name', 'type': 'UsageName'}, + } + + unit = "Count" + + def __init__(self, **kwargs): + super(Usage, self).__init__(**kwargs) + self.current_value = kwargs.get('current_value', None) + self.limit = kwargs.get('limit', None) + self.name = kwargs.get('name', None) + + +class UsageName(Model): + """The Usage Names. + + :param value: The name of the resource. + :type value: str + :param localized_value: The localized name of the resource. + :type localized_value: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': 'str'}, + 'localized_value': {'key': 'localizedValue', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(UsageName, self).__init__(**kwargs) + self.value = kwargs.get('value', None) + self.localized_value = kwargs.get('localized_value', None) + + +class VaultCertificate(Model): + """Describes a single certificate reference in a Key Vault, and where the + certificate should reside on the VM. + + :param certificate_url: This is the URL of a certificate that has been + uploaded to Key Vault as a secret. For adding a secret to the Key Vault, + see [Add a key or secret to the key + vault](https://docs.microsoft.com/azure/key-vault/key-vault-get-started/#add). + In this case, your certificate needs to be It is the Base64 encoding of + the following JSON Object which is encoded in UTF-8:

    {
    + "data":"",
    "dataType":"pfx",
    + "password":""
    } + :type certificate_url: str + :param certificate_store: For Windows VMs, specifies the certificate store + on the Virtual Machine to which the certificate should be added. The + specified certificate store is implicitly in the LocalMachine account. +

    For Linux VMs, the certificate file is placed under the + /var/lib/waagent directory, with the file name + <UppercaseThumbprint>.crt for the X509 certificate file and + <UppercaseThumbprint>.prv for private key. Both of these files are + .pem formatted. + :type certificate_store: str + """ + + _attribute_map = { + 'certificate_url': {'key': 'certificateUrl', 'type': 'str'}, + 'certificate_store': {'key': 'certificateStore', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(VaultCertificate, self).__init__(**kwargs) + self.certificate_url = kwargs.get('certificate_url', None) + self.certificate_store = kwargs.get('certificate_store', None) + + +class VaultSecretGroup(Model): + """Describes a set of certificates which are all in the same Key Vault. + + :param source_vault: The relative URL of the Key Vault containing all of + the certificates in VaultCertificates. + :type source_vault: ~azure.mgmt.compute.v2018_10_01.models.SubResource + :param vault_certificates: The list of key vault references in SourceVault + which contain certificates. + :type vault_certificates: + list[~azure.mgmt.compute.v2018_10_01.models.VaultCertificate] + """ + + _attribute_map = { + 'source_vault': {'key': 'sourceVault', 'type': 'SubResource'}, + 'vault_certificates': {'key': 'vaultCertificates', 'type': '[VaultCertificate]'}, + } + + def __init__(self, **kwargs): + super(VaultSecretGroup, self).__init__(**kwargs) + self.source_vault = kwargs.get('source_vault', None) + self.vault_certificates = kwargs.get('vault_certificates', None) + + +class VirtualHardDisk(Model): + """Describes the uri of a disk. + + :param uri: Specifies the virtual hard disk's uri. + :type uri: str + """ + + _attribute_map = { + 'uri': {'key': 'uri', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(VirtualHardDisk, self).__init__(**kwargs) + self.uri = kwargs.get('uri', None) + + +class VirtualMachine(Resource): + """Describes a Virtual Machine. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource Id + :vartype id: str + :ivar name: Resource name + :vartype name: str + :ivar type: Resource type + :vartype type: str + :param location: Required. Resource location + :type location: str + :param tags: Resource tags + :type tags: dict[str, str] + :param plan: Specifies information about the marketplace image used to + create the virtual machine. This element is only used for marketplace + images. Before you can use a marketplace image from an API, you must + enable the image for programmatic use. In the Azure portal, find the + marketplace image that you want to use and then click **Want to deploy + programmatically, Get Started ->**. Enter any required information and + then click **Save**. + :type plan: ~azure.mgmt.compute.v2018_10_01.models.Plan + :param hardware_profile: Specifies the hardware settings for the virtual + machine. + :type hardware_profile: + ~azure.mgmt.compute.v2018_10_01.models.HardwareProfile + :param storage_profile: Specifies the storage settings for the virtual + machine disks. + :type storage_profile: + ~azure.mgmt.compute.v2018_10_01.models.StorageProfile + :param additional_capabilities: Specifies additional capabilities enabled + or disabled on the virtual machine. + :type additional_capabilities: + ~azure.mgmt.compute.v2018_10_01.models.AdditionalCapabilities + :param os_profile: Specifies the operating system settings for the virtual + machine. + :type os_profile: ~azure.mgmt.compute.v2018_10_01.models.OSProfile + :param network_profile: Specifies the network interfaces of the virtual + machine. + :type network_profile: + ~azure.mgmt.compute.v2018_10_01.models.NetworkProfile + :param diagnostics_profile: Specifies the boot diagnostic settings state. +

    Minimum api-version: 2015-06-15. + :type diagnostics_profile: + ~azure.mgmt.compute.v2018_10_01.models.DiagnosticsProfile + :param availability_set: Specifies information about the availability set + that the virtual machine should be assigned to. Virtual machines specified + in the same availability set are allocated to different nodes to maximize + availability. For more information about availability sets, see [Manage + the availability of virtual + machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-manage-availability?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). +

    For more information on Azure planned maintenance, see [Planned + maintenance for virtual machines in + Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-planned-maintenance?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json) +

    Currently, a VM can only be added to availability set at creation + time. An existing VM cannot be added to an availability set. + :type availability_set: ~azure.mgmt.compute.v2018_10_01.models.SubResource + :param proximity_placement_group: Specifies information about the + proximity placement group that the virtual machine should be assigned to. +

    Minimum api-version: 2018-04-01. + :type proximity_placement_group: + ~azure.mgmt.compute.v2018_10_01.models.SubResource + :ivar provisioning_state: The provisioning state, which only appears in + the response. + :vartype provisioning_state: str + :ivar instance_view: The virtual machine instance view. + :vartype instance_view: + ~azure.mgmt.compute.v2018_10_01.models.VirtualMachineInstanceView + :param license_type: Specifies that the image or disk that is being used + was licensed on-premises. This element is only used for images that + contain the Windows Server operating system.

    Possible values are: +

    Windows_Client

    Windows_Server

    If this element + is included in a request for an update, the value must match the initial + value. This value cannot be updated.

    For more information, see + [Azure Hybrid Use Benefit for Windows + Server](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-hybrid-use-benefit-licensing?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json) +

    Minimum api-version: 2015-06-15 + :type license_type: str + :ivar vm_id: Specifies the VM unique ID which is a 128-bits identifier + that is encoded and stored in all Azure IaaS VMs SMBIOS and can be read + using platform BIOS commands. + :vartype vm_id: str + :ivar resources: The virtual machine child extension resources. + :vartype resources: + list[~azure.mgmt.compute.v2018_10_01.models.VirtualMachineExtension] + :param identity: The identity of the virtual machine, if configured. + :type identity: + ~azure.mgmt.compute.v2018_10_01.models.VirtualMachineIdentity + :param zones: The virtual machine zones. + :type zones: list[str] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + 'provisioning_state': {'readonly': True}, + 'instance_view': {'readonly': True}, + 'vm_id': {'readonly': True}, + 'resources': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'plan': {'key': 'plan', 'type': 'Plan'}, + 'hardware_profile': {'key': 'properties.hardwareProfile', 'type': 'HardwareProfile'}, + 'storage_profile': {'key': 'properties.storageProfile', 'type': 'StorageProfile'}, + 'additional_capabilities': {'key': 'properties.additionalCapabilities', 'type': 'AdditionalCapabilities'}, + 'os_profile': {'key': 'properties.osProfile', 'type': 'OSProfile'}, + 'network_profile': {'key': 'properties.networkProfile', 'type': 'NetworkProfile'}, + 'diagnostics_profile': {'key': 'properties.diagnosticsProfile', 'type': 'DiagnosticsProfile'}, + 'availability_set': {'key': 'properties.availabilitySet', 'type': 'SubResource'}, + 'proximity_placement_group': {'key': 'properties.proximityPlacementGroup', 'type': 'SubResource'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'instance_view': {'key': 'properties.instanceView', 'type': 'VirtualMachineInstanceView'}, + 'license_type': {'key': 'properties.licenseType', 'type': 'str'}, + 'vm_id': {'key': 'properties.vmId', 'type': 'str'}, + 'resources': {'key': 'resources', 'type': '[VirtualMachineExtension]'}, + 'identity': {'key': 'identity', 'type': 'VirtualMachineIdentity'}, + 'zones': {'key': 'zones', 'type': '[str]'}, + } + + def __init__(self, **kwargs): + super(VirtualMachine, self).__init__(**kwargs) + self.plan = kwargs.get('plan', None) + self.hardware_profile = kwargs.get('hardware_profile', None) + self.storage_profile = kwargs.get('storage_profile', None) + self.additional_capabilities = kwargs.get('additional_capabilities', None) + self.os_profile = kwargs.get('os_profile', None) + self.network_profile = kwargs.get('network_profile', None) + self.diagnostics_profile = kwargs.get('diagnostics_profile', None) + self.availability_set = kwargs.get('availability_set', None) + self.proximity_placement_group = kwargs.get('proximity_placement_group', None) + self.provisioning_state = None + self.instance_view = None + self.license_type = kwargs.get('license_type', None) + self.vm_id = None + self.resources = None + self.identity = kwargs.get('identity', None) + self.zones = kwargs.get('zones', None) + + +class VirtualMachineAgentInstanceView(Model): + """The instance view of the VM Agent running on the virtual machine. + + :param vm_agent_version: The VM Agent full version. + :type vm_agent_version: str + :param extension_handlers: The virtual machine extension handler instance + view. + :type extension_handlers: + list[~azure.mgmt.compute.v2018_10_01.models.VirtualMachineExtensionHandlerInstanceView] + :param statuses: The resource status information. + :type statuses: + list[~azure.mgmt.compute.v2018_10_01.models.InstanceViewStatus] + """ + + _attribute_map = { + 'vm_agent_version': {'key': 'vmAgentVersion', 'type': 'str'}, + 'extension_handlers': {'key': 'extensionHandlers', 'type': '[VirtualMachineExtensionHandlerInstanceView]'}, + 'statuses': {'key': 'statuses', 'type': '[InstanceViewStatus]'}, + } + + def __init__(self, **kwargs): + super(VirtualMachineAgentInstanceView, self).__init__(**kwargs) + self.vm_agent_version = kwargs.get('vm_agent_version', None) + self.extension_handlers = kwargs.get('extension_handlers', None) + self.statuses = kwargs.get('statuses', None) + + +class VirtualMachineCaptureParameters(Model): + """Capture Virtual Machine parameters. + + All required parameters must be populated in order to send to Azure. + + :param vhd_prefix: Required. The captured virtual hard disk's name prefix. + :type vhd_prefix: str + :param destination_container_name: Required. The destination container + name. + :type destination_container_name: str + :param overwrite_vhds: Required. Specifies whether to overwrite the + destination virtual hard disk, in case of conflict. + :type overwrite_vhds: bool + """ + + _validation = { + 'vhd_prefix': {'required': True}, + 'destination_container_name': {'required': True}, + 'overwrite_vhds': {'required': True}, + } + + _attribute_map = { + 'vhd_prefix': {'key': 'vhdPrefix', 'type': 'str'}, + 'destination_container_name': {'key': 'destinationContainerName', 'type': 'str'}, + 'overwrite_vhds': {'key': 'overwriteVhds', 'type': 'bool'}, + } + + def __init__(self, **kwargs): + super(VirtualMachineCaptureParameters, self).__init__(**kwargs) + self.vhd_prefix = kwargs.get('vhd_prefix', None) + self.destination_container_name = kwargs.get('destination_container_name', None) + self.overwrite_vhds = kwargs.get('overwrite_vhds', None) + + +class VirtualMachineCaptureResult(SubResource): + """Output of virtual machine capture operation. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :param id: Resource Id + :type id: str + :ivar schema: the schema of the captured virtual machine + :vartype schema: str + :ivar content_version: the version of the content + :vartype content_version: str + :ivar parameters: parameters of the captured virtual machine + :vartype parameters: object + :ivar resources: a list of resource items of the captured virtual machine + :vartype resources: list[object] + """ + + _validation = { + 'schema': {'readonly': True}, + 'content_version': {'readonly': True}, + 'parameters': {'readonly': True}, + 'resources': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'schema': {'key': '$schema', 'type': 'str'}, + 'content_version': {'key': 'contentVersion', 'type': 'str'}, + 'parameters': {'key': 'parameters', 'type': 'object'}, + 'resources': {'key': 'resources', 'type': '[object]'}, + } + + def __init__(self, **kwargs): + super(VirtualMachineCaptureResult, self).__init__(**kwargs) + self.schema = None + self.content_version = None + self.parameters = None + self.resources = None + + +class VirtualMachineExtension(Resource): + """Describes a Virtual Machine Extension. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource Id + :vartype id: str + :ivar name: Resource name + :vartype name: str + :ivar type: Resource type + :vartype type: str + :param location: Required. Resource location + :type location: str + :param tags: Resource tags + :type tags: dict[str, str] + :param force_update_tag: How the extension handler should be forced to + update even if the extension configuration has not changed. + :type force_update_tag: str + :param publisher: The name of the extension handler publisher. + :type publisher: str + :param virtual_machine_extension_type: Specifies the type of the + extension; an example is "CustomScriptExtension". + :type virtual_machine_extension_type: str + :param type_handler_version: Specifies the version of the script handler. + :type type_handler_version: str + :param auto_upgrade_minor_version: Indicates whether the extension should + use a newer minor version if one is available at deployment time. Once + deployed, however, the extension will not upgrade minor versions unless + redeployed, even with this property set to true. + :type auto_upgrade_minor_version: bool + :param settings: Json formatted public settings for the extension. + :type settings: object + :param protected_settings: The extension can contain either + protectedSettings or protectedSettingsFromKeyVault or no protected + settings at all. + :type protected_settings: object + :ivar provisioning_state: The provisioning state, which only appears in + the response. + :vartype provisioning_state: str + :param instance_view: The virtual machine extension instance view. + :type instance_view: + ~azure.mgmt.compute.v2018_10_01.models.VirtualMachineExtensionInstanceView + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'force_update_tag': {'key': 'properties.forceUpdateTag', 'type': 'str'}, + 'publisher': {'key': 'properties.publisher', 'type': 'str'}, + 'virtual_machine_extension_type': {'key': 'properties.type', 'type': 'str'}, + 'type_handler_version': {'key': 'properties.typeHandlerVersion', 'type': 'str'}, + 'auto_upgrade_minor_version': {'key': 'properties.autoUpgradeMinorVersion', 'type': 'bool'}, + 'settings': {'key': 'properties.settings', 'type': 'object'}, + 'protected_settings': {'key': 'properties.protectedSettings', 'type': 'object'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'instance_view': {'key': 'properties.instanceView', 'type': 'VirtualMachineExtensionInstanceView'}, + } + + def __init__(self, **kwargs): + super(VirtualMachineExtension, self).__init__(**kwargs) + self.force_update_tag = kwargs.get('force_update_tag', None) + self.publisher = kwargs.get('publisher', None) + self.virtual_machine_extension_type = kwargs.get('virtual_machine_extension_type', None) + self.type_handler_version = kwargs.get('type_handler_version', None) + self.auto_upgrade_minor_version = kwargs.get('auto_upgrade_minor_version', None) + self.settings = kwargs.get('settings', None) + self.protected_settings = kwargs.get('protected_settings', None) + self.provisioning_state = None + self.instance_view = kwargs.get('instance_view', None) + + +class VirtualMachineExtensionHandlerInstanceView(Model): + """The instance view of a virtual machine extension handler. + + :param type: Specifies the type of the extension; an example is + "CustomScriptExtension". + :type type: str + :param type_handler_version: Specifies the version of the script handler. + :type type_handler_version: str + :param status: The extension handler status. + :type status: ~azure.mgmt.compute.v2018_10_01.models.InstanceViewStatus + """ + + _attribute_map = { + 'type': {'key': 'type', 'type': 'str'}, + 'type_handler_version': {'key': 'typeHandlerVersion', 'type': 'str'}, + 'status': {'key': 'status', 'type': 'InstanceViewStatus'}, + } + + def __init__(self, **kwargs): + super(VirtualMachineExtensionHandlerInstanceView, self).__init__(**kwargs) + self.type = kwargs.get('type', None) + self.type_handler_version = kwargs.get('type_handler_version', None) + self.status = kwargs.get('status', None) + + +class VirtualMachineExtensionImage(Resource): + """Describes a Virtual Machine Extension Image. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource Id + :vartype id: str + :ivar name: Resource name + :vartype name: str + :ivar type: Resource type + :vartype type: str + :param location: Required. Resource location + :type location: str + :param tags: Resource tags + :type tags: dict[str, str] + :param operating_system: Required. The operating system this extension + supports. + :type operating_system: str + :param compute_role: Required. The type of role (IaaS or PaaS) this + extension supports. + :type compute_role: str + :param handler_schema: Required. The schema defined by publisher, where + extension consumers should provide settings in a matching schema. + :type handler_schema: str + :param vm_scale_set_enabled: Whether the extension can be used on xRP + VMScaleSets. By default existing extensions are usable on scalesets, but + there might be cases where a publisher wants to explicitly indicate the + extension is only enabled for CRP VMs but not VMSS. + :type vm_scale_set_enabled: bool + :param supports_multiple_extensions: Whether the handler can support + multiple extensions. + :type supports_multiple_extensions: bool + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + 'operating_system': {'required': True}, + 'compute_role': {'required': True}, + 'handler_schema': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'operating_system': {'key': 'properties.operatingSystem', 'type': 'str'}, + 'compute_role': {'key': 'properties.computeRole', 'type': 'str'}, + 'handler_schema': {'key': 'properties.handlerSchema', 'type': 'str'}, + 'vm_scale_set_enabled': {'key': 'properties.vmScaleSetEnabled', 'type': 'bool'}, + 'supports_multiple_extensions': {'key': 'properties.supportsMultipleExtensions', 'type': 'bool'}, + } + + def __init__(self, **kwargs): + super(VirtualMachineExtensionImage, self).__init__(**kwargs) + self.operating_system = kwargs.get('operating_system', None) + self.compute_role = kwargs.get('compute_role', None) + self.handler_schema = kwargs.get('handler_schema', None) + self.vm_scale_set_enabled = kwargs.get('vm_scale_set_enabled', None) + self.supports_multiple_extensions = kwargs.get('supports_multiple_extensions', None) + + +class VirtualMachineExtensionInstanceView(Model): + """The instance view of a virtual machine extension. + + :param name: The virtual machine extension name. + :type name: str + :param type: Specifies the type of the extension; an example is + "CustomScriptExtension". + :type type: str + :param type_handler_version: Specifies the version of the script handler. + :type type_handler_version: str + :param substatuses: The resource status information. + :type substatuses: + list[~azure.mgmt.compute.v2018_10_01.models.InstanceViewStatus] + :param statuses: The resource status information. + :type statuses: + list[~azure.mgmt.compute.v2018_10_01.models.InstanceViewStatus] + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'type_handler_version': {'key': 'typeHandlerVersion', 'type': 'str'}, + 'substatuses': {'key': 'substatuses', 'type': '[InstanceViewStatus]'}, + 'statuses': {'key': 'statuses', 'type': '[InstanceViewStatus]'}, + } + + def __init__(self, **kwargs): + super(VirtualMachineExtensionInstanceView, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.type = kwargs.get('type', None) + self.type_handler_version = kwargs.get('type_handler_version', None) + self.substatuses = kwargs.get('substatuses', None) + self.statuses = kwargs.get('statuses', None) + + +class VirtualMachineExtensionsListResult(Model): + """The List Extension operation response. + + :param value: The list of extensions + :type value: + list[~azure.mgmt.compute.v2018_10_01.models.VirtualMachineExtension] + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[VirtualMachineExtension]'}, + } + + def __init__(self, **kwargs): + super(VirtualMachineExtensionsListResult, self).__init__(**kwargs) + self.value = kwargs.get('value', None) + + +class VirtualMachineExtensionUpdate(UpdateResource): + """Describes a Virtual Machine Extension. + + :param tags: Resource tags + :type tags: dict[str, str] + :param force_update_tag: How the extension handler should be forced to + update even if the extension configuration has not changed. + :type force_update_tag: str + :param publisher: The name of the extension handler publisher. + :type publisher: str + :param type: Specifies the type of the extension; an example is + "CustomScriptExtension". + :type type: str + :param type_handler_version: Specifies the version of the script handler. + :type type_handler_version: str + :param auto_upgrade_minor_version: Indicates whether the extension should + use a newer minor version if one is available at deployment time. Once + deployed, however, the extension will not upgrade minor versions unless + redeployed, even with this property set to true. + :type auto_upgrade_minor_version: bool + :param settings: Json formatted public settings for the extension. + :type settings: object + :param protected_settings: The extension can contain either + protectedSettings or protectedSettingsFromKeyVault or no protected + settings at all. + :type protected_settings: object + """ + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + 'force_update_tag': {'key': 'properties.forceUpdateTag', 'type': 'str'}, + 'publisher': {'key': 'properties.publisher', 'type': 'str'}, + 'type': {'key': 'properties.type', 'type': 'str'}, + 'type_handler_version': {'key': 'properties.typeHandlerVersion', 'type': 'str'}, + 'auto_upgrade_minor_version': {'key': 'properties.autoUpgradeMinorVersion', 'type': 'bool'}, + 'settings': {'key': 'properties.settings', 'type': 'object'}, + 'protected_settings': {'key': 'properties.protectedSettings', 'type': 'object'}, + } + + def __init__(self, **kwargs): + super(VirtualMachineExtensionUpdate, self).__init__(**kwargs) + self.force_update_tag = kwargs.get('force_update_tag', None) + self.publisher = kwargs.get('publisher', None) + self.type = kwargs.get('type', None) + self.type_handler_version = kwargs.get('type_handler_version', None) + self.auto_upgrade_minor_version = kwargs.get('auto_upgrade_minor_version', None) + self.settings = kwargs.get('settings', None) + self.protected_settings = kwargs.get('protected_settings', None) + + +class VirtualMachineHealthStatus(Model): + """The health status of the VM. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar status: The health status information for the VM. + :vartype status: ~azure.mgmt.compute.v2018_10_01.models.InstanceViewStatus + """ + + _validation = { + 'status': {'readonly': True}, + } + + _attribute_map = { + 'status': {'key': 'status', 'type': 'InstanceViewStatus'}, + } + + def __init__(self, **kwargs): + super(VirtualMachineHealthStatus, self).__init__(**kwargs) + self.status = None + + +class VirtualMachineIdentity(Model): + """Identity for the virtual machine. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar principal_id: The principal id of virtual machine identity. This + property will only be provided for a system assigned identity. + :vartype principal_id: str + :ivar tenant_id: The tenant id associated with the virtual machine. This + property will only be provided for a system assigned identity. + :vartype tenant_id: str + :param type: The type of identity used for the virtual machine. The type + 'SystemAssigned, UserAssigned' includes both an implicitly created + identity and a set of user assigned identities. The type 'None' will + remove any identities from the virtual machine. Possible values include: + 'SystemAssigned', 'UserAssigned', 'SystemAssigned, UserAssigned', 'None' + :type type: str or + ~azure.mgmt.compute.v2018_10_01.models.ResourceIdentityType + :param user_assigned_identities: The list of user identities associated + with the Virtual Machine. The user identity dictionary key references will + be ARM resource ids in the form: + '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'. + :type user_assigned_identities: dict[str, + ~azure.mgmt.compute.v2018_10_01.models.VirtualMachineIdentityUserAssignedIdentitiesValue] + """ + + _validation = { + 'principal_id': {'readonly': True}, + 'tenant_id': {'readonly': True}, + } + + _attribute_map = { + 'principal_id': {'key': 'principalId', 'type': 'str'}, + 'tenant_id': {'key': 'tenantId', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'ResourceIdentityType'}, + 'user_assigned_identities': {'key': 'userAssignedIdentities', 'type': '{VirtualMachineIdentityUserAssignedIdentitiesValue}'}, + } + + def __init__(self, **kwargs): + super(VirtualMachineIdentity, self).__init__(**kwargs) + self.principal_id = None + self.tenant_id = None + self.type = kwargs.get('type', None) + self.user_assigned_identities = kwargs.get('user_assigned_identities', None) + + +class VirtualMachineIdentityUserAssignedIdentitiesValue(Model): + """VirtualMachineIdentityUserAssignedIdentitiesValue. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar principal_id: The principal id of user assigned identity. + :vartype principal_id: str + :ivar client_id: The client id of user assigned identity. + :vartype client_id: str + """ + + _validation = { + 'principal_id': {'readonly': True}, + 'client_id': {'readonly': True}, + } + + _attribute_map = { + 'principal_id': {'key': 'principalId', 'type': 'str'}, + 'client_id': {'key': 'clientId', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(VirtualMachineIdentityUserAssignedIdentitiesValue, self).__init__(**kwargs) + self.principal_id = None + self.client_id = None + + +class VirtualMachineImageResource(SubResource): + """Virtual machine image resource information. + + All required parameters must be populated in order to send to Azure. + + :param id: Resource Id + :type id: str + :param name: Required. The name of the resource. + :type name: str + :param location: Required. The supported Azure location of the resource. + :type location: str + :param tags: Specifies the tags that are assigned to the virtual machine. + For more information about using tags, see [Using tags to organize your + Azure + resources](https://docs.microsoft.com/azure/azure-resource-manager/resource-group-using-tags.md). + :type tags: dict[str, str] + """ + + _validation = { + 'name': {'required': True}, + 'location': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__(self, **kwargs): + super(VirtualMachineImageResource, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.location = kwargs.get('location', None) + self.tags = kwargs.get('tags', None) + + +class VirtualMachineImage(VirtualMachineImageResource): + """Describes a Virtual Machine Image. + + All required parameters must be populated in order to send to Azure. + + :param id: Resource Id + :type id: str + :param name: Required. The name of the resource. + :type name: str + :param location: Required. The supported Azure location of the resource. + :type location: str + :param tags: Specifies the tags that are assigned to the virtual machine. + For more information about using tags, see [Using tags to organize your + Azure + resources](https://docs.microsoft.com/azure/azure-resource-manager/resource-group-using-tags.md). + :type tags: dict[str, str] + :param plan: + :type plan: ~azure.mgmt.compute.v2018_10_01.models.PurchasePlan + :param os_disk_image: + :type os_disk_image: ~azure.mgmt.compute.v2018_10_01.models.OSDiskImage + :param data_disk_images: + :type data_disk_images: + list[~azure.mgmt.compute.v2018_10_01.models.DataDiskImage] + :param automatic_os_upgrade_properties: + :type automatic_os_upgrade_properties: + ~azure.mgmt.compute.v2018_10_01.models.AutomaticOSUpgradeProperties + """ + + _validation = { + 'name': {'required': True}, + 'location': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'plan': {'key': 'properties.plan', 'type': 'PurchasePlan'}, + 'os_disk_image': {'key': 'properties.osDiskImage', 'type': 'OSDiskImage'}, + 'data_disk_images': {'key': 'properties.dataDiskImages', 'type': '[DataDiskImage]'}, + 'automatic_os_upgrade_properties': {'key': 'properties.automaticOSUpgradeProperties', 'type': 'AutomaticOSUpgradeProperties'}, + } + + def __init__(self, **kwargs): + super(VirtualMachineImage, self).__init__(**kwargs) + self.plan = kwargs.get('plan', None) + self.os_disk_image = kwargs.get('os_disk_image', None) + self.data_disk_images = kwargs.get('data_disk_images', None) + self.automatic_os_upgrade_properties = kwargs.get('automatic_os_upgrade_properties', None) + + +class VirtualMachineInstanceView(Model): + """The instance view of a virtual machine. + + :param platform_update_domain: Specifies the update domain of the virtual + machine. + :type platform_update_domain: int + :param platform_fault_domain: Specifies the fault domain of the virtual + machine. + :type platform_fault_domain: int + :param computer_name: The computer name assigned to the virtual machine. + :type computer_name: str + :param os_name: The Operating System running on the virtual machine. + :type os_name: str + :param os_version: The version of Operating System running on the virtual + machine. + :type os_version: str + :param rdp_thumb_print: The Remote desktop certificate thumbprint. + :type rdp_thumb_print: str + :param vm_agent: The VM Agent running on the virtual machine. + :type vm_agent: + ~azure.mgmt.compute.v2018_10_01.models.VirtualMachineAgentInstanceView + :param maintenance_redeploy_status: The Maintenance Operation status on + the virtual machine. + :type maintenance_redeploy_status: + ~azure.mgmt.compute.v2018_10_01.models.MaintenanceRedeployStatus + :param disks: The virtual machine disk information. + :type disks: list[~azure.mgmt.compute.v2018_10_01.models.DiskInstanceView] + :param extensions: The extensions information. + :type extensions: + list[~azure.mgmt.compute.v2018_10_01.models.VirtualMachineExtensionInstanceView] + :param boot_diagnostics: Boot Diagnostics is a debugging feature which + allows you to view Console Output and Screenshot to diagnose VM status. +

    You can easily view the output of your console log.

    + Azure also enables you to see a screenshot of the VM from the hypervisor. + :type boot_diagnostics: + ~azure.mgmt.compute.v2018_10_01.models.BootDiagnosticsInstanceView + :param statuses: The resource status information. + :type statuses: + list[~azure.mgmt.compute.v2018_10_01.models.InstanceViewStatus] + """ + + _attribute_map = { + 'platform_update_domain': {'key': 'platformUpdateDomain', 'type': 'int'}, + 'platform_fault_domain': {'key': 'platformFaultDomain', 'type': 'int'}, + 'computer_name': {'key': 'computerName', 'type': 'str'}, + 'os_name': {'key': 'osName', 'type': 'str'}, + 'os_version': {'key': 'osVersion', 'type': 'str'}, + 'rdp_thumb_print': {'key': 'rdpThumbPrint', 'type': 'str'}, + 'vm_agent': {'key': 'vmAgent', 'type': 'VirtualMachineAgentInstanceView'}, + 'maintenance_redeploy_status': {'key': 'maintenanceRedeployStatus', 'type': 'MaintenanceRedeployStatus'}, + 'disks': {'key': 'disks', 'type': '[DiskInstanceView]'}, + 'extensions': {'key': 'extensions', 'type': '[VirtualMachineExtensionInstanceView]'}, + 'boot_diagnostics': {'key': 'bootDiagnostics', 'type': 'BootDiagnosticsInstanceView'}, + 'statuses': {'key': 'statuses', 'type': '[InstanceViewStatus]'}, + } + + def __init__(self, **kwargs): + super(VirtualMachineInstanceView, self).__init__(**kwargs) + self.platform_update_domain = kwargs.get('platform_update_domain', None) + self.platform_fault_domain = kwargs.get('platform_fault_domain', None) + self.computer_name = kwargs.get('computer_name', None) + self.os_name = kwargs.get('os_name', None) + self.os_version = kwargs.get('os_version', None) + self.rdp_thumb_print = kwargs.get('rdp_thumb_print', None) + self.vm_agent = kwargs.get('vm_agent', None) + self.maintenance_redeploy_status = kwargs.get('maintenance_redeploy_status', None) + self.disks = kwargs.get('disks', None) + self.extensions = kwargs.get('extensions', None) + self.boot_diagnostics = kwargs.get('boot_diagnostics', None) + self.statuses = kwargs.get('statuses', None) + + +class VirtualMachineReimageParameters(Model): + """Parameters for Reimaging Virtual Machine. NOTE: Virtual Machine OS disk + will always be reimaged. + + :param temp_disk: Specifies whether to reimage temp disk. Default value: + false. Note: This temp disk reimage parameter is only supported for + VM/VMSS with Ephemeral OS disk. + :type temp_disk: bool + """ + + _attribute_map = { + 'temp_disk': {'key': 'tempDisk', 'type': 'bool'}, + } + + def __init__(self, **kwargs): + super(VirtualMachineReimageParameters, self).__init__(**kwargs) + self.temp_disk = kwargs.get('temp_disk', None) + + +class VirtualMachineScaleSet(Resource): + """Describes a Virtual Machine Scale Set. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource Id + :vartype id: str + :ivar name: Resource name + :vartype name: str + :ivar type: Resource type + :vartype type: str + :param location: Required. Resource location + :type location: str + :param tags: Resource tags + :type tags: dict[str, str] + :param sku: The virtual machine scale set sku. + :type sku: ~azure.mgmt.compute.v2018_10_01.models.Sku + :param plan: Specifies information about the marketplace image used to + create the virtual machine. This element is only used for marketplace + images. Before you can use a marketplace image from an API, you must + enable the image for programmatic use. In the Azure portal, find the + marketplace image that you want to use and then click **Want to deploy + programmatically, Get Started ->**. Enter any required information and + then click **Save**. + :type plan: ~azure.mgmt.compute.v2018_10_01.models.Plan + :param upgrade_policy: The upgrade policy. + :type upgrade_policy: ~azure.mgmt.compute.v2018_10_01.models.UpgradePolicy + :param virtual_machine_profile: The virtual machine profile. + :type virtual_machine_profile: + ~azure.mgmt.compute.v2018_10_01.models.VirtualMachineScaleSetVMProfile + :ivar provisioning_state: The provisioning state, which only appears in + the response. + :vartype provisioning_state: str + :param overprovision: Specifies whether the Virtual Machine Scale Set + should be overprovisioned. + :type overprovision: bool + :param do_not_run_extensions_on_overprovisioned_vms: When Overprovision is + enabled, extensions are launched only on the requested number of VMs which + are finally kept. This property will hence ensure that the extensions do + not run on the extra overprovisioned VMs. + :type do_not_run_extensions_on_overprovisioned_vms: bool + :ivar unique_id: Specifies the ID which uniquely identifies a Virtual + Machine Scale Set. + :vartype unique_id: str + :param single_placement_group: When true this limits the scale set to a + single placement group, of max size 100 virtual machines. + :type single_placement_group: bool + :param zone_balance: Whether to force strictly even Virtual Machine + distribution cross x-zones in case there is zone outage. + :type zone_balance: bool + :param platform_fault_domain_count: Fault Domain count for each placement + group. + :type platform_fault_domain_count: int + :param proximity_placement_group: Specifies information about the + proximity placement group that the virtual machine scale set should be + assigned to.

    Minimum api-version: 2018-04-01. + :type proximity_placement_group: + ~azure.mgmt.compute.v2018_10_01.models.SubResource + :param identity: The identity of the virtual machine scale set, if + configured. + :type identity: + ~azure.mgmt.compute.v2018_10_01.models.VirtualMachineScaleSetIdentity + :param zones: The virtual machine scale set zones. + :type zones: list[str] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + 'provisioning_state': {'readonly': True}, + 'unique_id': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'sku': {'key': 'sku', 'type': 'Sku'}, + 'plan': {'key': 'plan', 'type': 'Plan'}, + 'upgrade_policy': {'key': 'properties.upgradePolicy', 'type': 'UpgradePolicy'}, + 'virtual_machine_profile': {'key': 'properties.virtualMachineProfile', 'type': 'VirtualMachineScaleSetVMProfile'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'overprovision': {'key': 'properties.overprovision', 'type': 'bool'}, + 'do_not_run_extensions_on_overprovisioned_vms': {'key': 'properties.doNotRunExtensionsOnOverprovisionedVMs', 'type': 'bool'}, + 'unique_id': {'key': 'properties.uniqueId', 'type': 'str'}, + 'single_placement_group': {'key': 'properties.singlePlacementGroup', 'type': 'bool'}, + 'zone_balance': {'key': 'properties.zoneBalance', 'type': 'bool'}, + 'platform_fault_domain_count': {'key': 'properties.platformFaultDomainCount', 'type': 'int'}, + 'proximity_placement_group': {'key': 'properties.proximityPlacementGroup', 'type': 'SubResource'}, + 'identity': {'key': 'identity', 'type': 'VirtualMachineScaleSetIdentity'}, + 'zones': {'key': 'zones', 'type': '[str]'}, + } + + def __init__(self, **kwargs): + super(VirtualMachineScaleSet, self).__init__(**kwargs) + self.sku = kwargs.get('sku', None) + self.plan = kwargs.get('plan', None) + self.upgrade_policy = kwargs.get('upgrade_policy', None) + self.virtual_machine_profile = kwargs.get('virtual_machine_profile', None) + self.provisioning_state = None + self.overprovision = kwargs.get('overprovision', None) + self.do_not_run_extensions_on_overprovisioned_vms = kwargs.get('do_not_run_extensions_on_overprovisioned_vms', None) + self.unique_id = None + self.single_placement_group = kwargs.get('single_placement_group', None) + self.zone_balance = kwargs.get('zone_balance', None) + self.platform_fault_domain_count = kwargs.get('platform_fault_domain_count', None) + self.proximity_placement_group = kwargs.get('proximity_placement_group', None) + self.identity = kwargs.get('identity', None) + self.zones = kwargs.get('zones', None) + + +class VirtualMachineScaleSetDataDisk(Model): + """Describes a virtual machine scale set data disk. + + All required parameters must be populated in order to send to Azure. + + :param name: The disk name. + :type name: str + :param lun: Required. Specifies the logical unit number of the data disk. + This value is used to identify data disks within the VM and therefore must + be unique for each data disk attached to a VM. + :type lun: int + :param caching: Specifies the caching requirements.

    Possible + values are:

    **None**

    **ReadOnly**

    **ReadWrite** +

    Default: **None for Standard storage. ReadOnly for Premium + storage**. Possible values include: 'None', 'ReadOnly', 'ReadWrite' + :type caching: str or ~azure.mgmt.compute.v2018_10_01.models.CachingTypes + :param write_accelerator_enabled: Specifies whether writeAccelerator + should be enabled or disabled on the disk. + :type write_accelerator_enabled: bool + :param create_option: Required. The create option. Possible values + include: 'FromImage', 'Empty', 'Attach' + :type create_option: str or + ~azure.mgmt.compute.v2018_10_01.models.DiskCreateOptionTypes + :param disk_size_gb: Specifies the size of an empty data disk in + gigabytes. This element can be used to overwrite the size of the disk in a + virtual machine image.

    This value cannot be larger than 1023 GB + :type disk_size_gb: int + :param managed_disk: The managed disk parameters. + :type managed_disk: + ~azure.mgmt.compute.v2018_10_01.models.VirtualMachineScaleSetManagedDiskParameters + """ + + _validation = { + 'lun': {'required': True}, + 'create_option': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'lun': {'key': 'lun', 'type': 'int'}, + 'caching': {'key': 'caching', 'type': 'CachingTypes'}, + 'write_accelerator_enabled': {'key': 'writeAcceleratorEnabled', 'type': 'bool'}, + 'create_option': {'key': 'createOption', 'type': 'str'}, + 'disk_size_gb': {'key': 'diskSizeGB', 'type': 'int'}, + 'managed_disk': {'key': 'managedDisk', 'type': 'VirtualMachineScaleSetManagedDiskParameters'}, + } + + def __init__(self, **kwargs): + super(VirtualMachineScaleSetDataDisk, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.lun = kwargs.get('lun', None) + self.caching = kwargs.get('caching', None) + self.write_accelerator_enabled = kwargs.get('write_accelerator_enabled', None) + self.create_option = kwargs.get('create_option', None) + self.disk_size_gb = kwargs.get('disk_size_gb', None) + self.managed_disk = kwargs.get('managed_disk', None) + + +class VirtualMachineScaleSetExtension(SubResourceReadOnly): + """Describes a Virtual Machine Scale Set Extension. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource Id + :vartype id: str + :param name: The name of the extension. + :type name: str + :param force_update_tag: If a value is provided and is different from the + previous value, the extension handler will be forced to update even if the + extension configuration has not changed. + :type force_update_tag: str + :param publisher: The name of the extension handler publisher. + :type publisher: str + :param type: Specifies the type of the extension; an example is + "CustomScriptExtension". + :type type: str + :param type_handler_version: Specifies the version of the script handler. + :type type_handler_version: str + :param auto_upgrade_minor_version: Indicates whether the extension should + use a newer minor version if one is available at deployment time. Once + deployed, however, the extension will not upgrade minor versions unless + redeployed, even with this property set to true. + :type auto_upgrade_minor_version: bool + :param settings: Json formatted public settings for the extension. + :type settings: object + :param protected_settings: The extension can contain either + protectedSettings or protectedSettingsFromKeyVault or no protected + settings at all. + :type protected_settings: object + :ivar provisioning_state: The provisioning state, which only appears in + the response. + :vartype provisioning_state: str + :param provision_after_extensions: Collection of extension names after + which this extension needs to be provisioned. + :type provision_after_extensions: list[str] + """ + + _validation = { + 'id': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'force_update_tag': {'key': 'properties.forceUpdateTag', 'type': 'str'}, + 'publisher': {'key': 'properties.publisher', 'type': 'str'}, + 'type': {'key': 'properties.type', 'type': 'str'}, + 'type_handler_version': {'key': 'properties.typeHandlerVersion', 'type': 'str'}, + 'auto_upgrade_minor_version': {'key': 'properties.autoUpgradeMinorVersion', 'type': 'bool'}, + 'settings': {'key': 'properties.settings', 'type': 'object'}, + 'protected_settings': {'key': 'properties.protectedSettings', 'type': 'object'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'provision_after_extensions': {'key': 'properties.provisionAfterExtensions', 'type': '[str]'}, + } + + def __init__(self, **kwargs): + super(VirtualMachineScaleSetExtension, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.force_update_tag = kwargs.get('force_update_tag', None) + self.publisher = kwargs.get('publisher', None) + self.type = kwargs.get('type', None) + self.type_handler_version = kwargs.get('type_handler_version', None) + self.auto_upgrade_minor_version = kwargs.get('auto_upgrade_minor_version', None) + self.settings = kwargs.get('settings', None) + self.protected_settings = kwargs.get('protected_settings', None) + self.provisioning_state = None + self.provision_after_extensions = kwargs.get('provision_after_extensions', None) + + +class VirtualMachineScaleSetExtensionProfile(Model): + """Describes a virtual machine scale set extension profile. + + :param extensions: The virtual machine scale set child extension + resources. + :type extensions: + list[~azure.mgmt.compute.v2018_10_01.models.VirtualMachineScaleSetExtension] + """ + + _attribute_map = { + 'extensions': {'key': 'extensions', 'type': '[VirtualMachineScaleSetExtension]'}, + } + + def __init__(self, **kwargs): + super(VirtualMachineScaleSetExtensionProfile, self).__init__(**kwargs) + self.extensions = kwargs.get('extensions', None) + + +class VirtualMachineScaleSetIdentity(Model): + """Identity for the virtual machine scale set. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar principal_id: The principal id of virtual machine scale set + identity. This property will only be provided for a system assigned + identity. + :vartype principal_id: str + :ivar tenant_id: The tenant id associated with the virtual machine scale + set. This property will only be provided for a system assigned identity. + :vartype tenant_id: str + :param type: The type of identity used for the virtual machine scale set. + The type 'SystemAssigned, UserAssigned' includes both an implicitly + created identity and a set of user assigned identities. The type 'None' + will remove any identities from the virtual machine scale set. Possible + values include: 'SystemAssigned', 'UserAssigned', 'SystemAssigned, + UserAssigned', 'None' + :type type: str or + ~azure.mgmt.compute.v2018_10_01.models.ResourceIdentityType + :param user_assigned_identities: The list of user identities associated + with the virtual machine scale set. The user identity dictionary key + references will be ARM resource ids in the form: + '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'. + :type user_assigned_identities: dict[str, + ~azure.mgmt.compute.v2018_10_01.models.VirtualMachineScaleSetIdentityUserAssignedIdentitiesValue] + """ + + _validation = { + 'principal_id': {'readonly': True}, + 'tenant_id': {'readonly': True}, + } + + _attribute_map = { + 'principal_id': {'key': 'principalId', 'type': 'str'}, + 'tenant_id': {'key': 'tenantId', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'ResourceIdentityType'}, + 'user_assigned_identities': {'key': 'userAssignedIdentities', 'type': '{VirtualMachineScaleSetIdentityUserAssignedIdentitiesValue}'}, + } + + def __init__(self, **kwargs): + super(VirtualMachineScaleSetIdentity, self).__init__(**kwargs) + self.principal_id = None + self.tenant_id = None + self.type = kwargs.get('type', None) + self.user_assigned_identities = kwargs.get('user_assigned_identities', None) + + +class VirtualMachineScaleSetIdentityUserAssignedIdentitiesValue(Model): + """VirtualMachineScaleSetIdentityUserAssignedIdentitiesValue. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar principal_id: The principal id of user assigned identity. + :vartype principal_id: str + :ivar client_id: The client id of user assigned identity. + :vartype client_id: str + """ + + _validation = { + 'principal_id': {'readonly': True}, + 'client_id': {'readonly': True}, + } + + _attribute_map = { + 'principal_id': {'key': 'principalId', 'type': 'str'}, + 'client_id': {'key': 'clientId', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(VirtualMachineScaleSetIdentityUserAssignedIdentitiesValue, self).__init__(**kwargs) + self.principal_id = None + self.client_id = None + + +class VirtualMachineScaleSetInstanceView(Model): + """The instance view of a virtual machine scale set. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar virtual_machine: The instance view status summary for the virtual + machine scale set. + :vartype virtual_machine: + ~azure.mgmt.compute.v2018_10_01.models.VirtualMachineScaleSetInstanceViewStatusesSummary + :ivar extensions: The extensions information. + :vartype extensions: + list[~azure.mgmt.compute.v2018_10_01.models.VirtualMachineScaleSetVMExtensionsSummary] + :param statuses: The resource status information. + :type statuses: + list[~azure.mgmt.compute.v2018_10_01.models.InstanceViewStatus] + """ + + _validation = { + 'virtual_machine': {'readonly': True}, + 'extensions': {'readonly': True}, + } + + _attribute_map = { + 'virtual_machine': {'key': 'virtualMachine', 'type': 'VirtualMachineScaleSetInstanceViewStatusesSummary'}, + 'extensions': {'key': 'extensions', 'type': '[VirtualMachineScaleSetVMExtensionsSummary]'}, + 'statuses': {'key': 'statuses', 'type': '[InstanceViewStatus]'}, + } + + def __init__(self, **kwargs): + super(VirtualMachineScaleSetInstanceView, self).__init__(**kwargs) + self.virtual_machine = None + self.extensions = None + self.statuses = kwargs.get('statuses', None) + + +class VirtualMachineScaleSetInstanceViewStatusesSummary(Model): + """Instance view statuses summary for virtual machines of a virtual machine + scale set. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar statuses_summary: The extensions information. + :vartype statuses_summary: + list[~azure.mgmt.compute.v2018_10_01.models.VirtualMachineStatusCodeCount] + """ + + _validation = { + 'statuses_summary': {'readonly': True}, + } + + _attribute_map = { + 'statuses_summary': {'key': 'statusesSummary', 'type': '[VirtualMachineStatusCodeCount]'}, + } + + def __init__(self, **kwargs): + super(VirtualMachineScaleSetInstanceViewStatusesSummary, self).__init__(**kwargs) + self.statuses_summary = None + + +class VirtualMachineScaleSetIPConfiguration(SubResource): + """Describes a virtual machine scale set network profile's IP configuration. + + All required parameters must be populated in order to send to Azure. + + :param id: Resource Id + :type id: str + :param name: Required. The IP configuration name. + :type name: str + :param subnet: Specifies the identifier of the subnet. + :type subnet: ~azure.mgmt.compute.v2018_10_01.models.ApiEntityReference + :param primary: Specifies the primary network interface in case the + virtual machine has more than 1 network interface. + :type primary: bool + :param public_ip_address_configuration: The publicIPAddressConfiguration. + :type public_ip_address_configuration: + ~azure.mgmt.compute.v2018_10_01.models.VirtualMachineScaleSetPublicIPAddressConfiguration + :param private_ip_address_version: Available from Api-Version 2017-03-30 + onwards, it represents whether the specific ipconfiguration is IPv4 or + IPv6. Default is taken as IPv4. Possible values are: 'IPv4' and 'IPv6'. + Possible values include: 'IPv4', 'IPv6' + :type private_ip_address_version: str or + ~azure.mgmt.compute.v2018_10_01.models.IPVersion + :param application_gateway_backend_address_pools: Specifies an array of + references to backend address pools of application gateways. A scale set + can reference backend address pools of multiple application gateways. + Multiple scale sets cannot use the same application gateway. + :type application_gateway_backend_address_pools: + list[~azure.mgmt.compute.v2018_10_01.models.SubResource] + :param application_security_groups: Specifies an array of references to + application security group. + :type application_security_groups: + list[~azure.mgmt.compute.v2018_10_01.models.SubResource] + :param load_balancer_backend_address_pools: Specifies an array of + references to backend address pools of load balancers. A scale set can + reference backend address pools of one public and one internal load + balancer. Multiple scale sets cannot use the same load balancer. + :type load_balancer_backend_address_pools: + list[~azure.mgmt.compute.v2018_10_01.models.SubResource] + :param load_balancer_inbound_nat_pools: Specifies an array of references + to inbound Nat pools of the load balancers. A scale set can reference + inbound nat pools of one public and one internal load balancer. Multiple + scale sets cannot use the same load balancer + :type load_balancer_inbound_nat_pools: + list[~azure.mgmt.compute.v2018_10_01.models.SubResource] + """ + + _validation = { + 'name': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'subnet': {'key': 'properties.subnet', 'type': 'ApiEntityReference'}, + 'primary': {'key': 'properties.primary', 'type': 'bool'}, + 'public_ip_address_configuration': {'key': 'properties.publicIPAddressConfiguration', 'type': 'VirtualMachineScaleSetPublicIPAddressConfiguration'}, + 'private_ip_address_version': {'key': 'properties.privateIPAddressVersion', 'type': 'str'}, + 'application_gateway_backend_address_pools': {'key': 'properties.applicationGatewayBackendAddressPools', 'type': '[SubResource]'}, + 'application_security_groups': {'key': 'properties.applicationSecurityGroups', 'type': '[SubResource]'}, + 'load_balancer_backend_address_pools': {'key': 'properties.loadBalancerBackendAddressPools', 'type': '[SubResource]'}, + 'load_balancer_inbound_nat_pools': {'key': 'properties.loadBalancerInboundNatPools', 'type': '[SubResource]'}, + } + + def __init__(self, **kwargs): + super(VirtualMachineScaleSetIPConfiguration, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.subnet = kwargs.get('subnet', None) + self.primary = kwargs.get('primary', None) + self.public_ip_address_configuration = kwargs.get('public_ip_address_configuration', None) + self.private_ip_address_version = kwargs.get('private_ip_address_version', None) + self.application_gateway_backend_address_pools = kwargs.get('application_gateway_backend_address_pools', None) + self.application_security_groups = kwargs.get('application_security_groups', None) + self.load_balancer_backend_address_pools = kwargs.get('load_balancer_backend_address_pools', None) + self.load_balancer_inbound_nat_pools = kwargs.get('load_balancer_inbound_nat_pools', None) + + +class VirtualMachineScaleSetIpTag(Model): + """Contains the IP tag associated with the public IP address. + + :param ip_tag_type: IP tag type. Example: FirstPartyUsage. + :type ip_tag_type: str + :param tag: IP tag associated with the public IP. Example: SQL, Storage + etc. + :type tag: str + """ + + _attribute_map = { + 'ip_tag_type': {'key': 'ipTagType', 'type': 'str'}, + 'tag': {'key': 'tag', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(VirtualMachineScaleSetIpTag, self).__init__(**kwargs) + self.ip_tag_type = kwargs.get('ip_tag_type', None) + self.tag = kwargs.get('tag', None) + + +class VirtualMachineScaleSetManagedDiskParameters(Model): + """Describes the parameters of a ScaleSet managed disk. + + :param storage_account_type: Specifies the storage account type for the + managed disk. NOTE: UltraSSD_LRS can only be used with data disks, it + cannot be used with OS Disk. Possible values include: 'Standard_LRS', + 'Premium_LRS', 'StandardSSD_LRS', 'UltraSSD_LRS' + :type storage_account_type: str or + ~azure.mgmt.compute.v2018_10_01.models.StorageAccountTypes + """ + + _attribute_map = { + 'storage_account_type': {'key': 'storageAccountType', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(VirtualMachineScaleSetManagedDiskParameters, self).__init__(**kwargs) + self.storage_account_type = kwargs.get('storage_account_type', None) + + +class VirtualMachineScaleSetNetworkConfiguration(SubResource): + """Describes a virtual machine scale set network profile's network + configurations. + + All required parameters must be populated in order to send to Azure. + + :param id: Resource Id + :type id: str + :param name: Required. The network configuration name. + :type name: str + :param primary: Specifies the primary network interface in case the + virtual machine has more than 1 network interface. + :type primary: bool + :param enable_accelerated_networking: Specifies whether the network + interface is accelerated networking-enabled. + :type enable_accelerated_networking: bool + :param network_security_group: The network security group. + :type network_security_group: + ~azure.mgmt.compute.v2018_10_01.models.SubResource + :param dns_settings: The dns settings to be applied on the network + interfaces. + :type dns_settings: + ~azure.mgmt.compute.v2018_10_01.models.VirtualMachineScaleSetNetworkConfigurationDnsSettings + :param ip_configurations: Required. Specifies the IP configurations of the + network interface. + :type ip_configurations: + list[~azure.mgmt.compute.v2018_10_01.models.VirtualMachineScaleSetIPConfiguration] + :param enable_ip_forwarding: Whether IP forwarding enabled on this NIC. + :type enable_ip_forwarding: bool + """ + + _validation = { + 'name': {'required': True}, + 'ip_configurations': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'primary': {'key': 'properties.primary', 'type': 'bool'}, + 'enable_accelerated_networking': {'key': 'properties.enableAcceleratedNetworking', 'type': 'bool'}, + 'network_security_group': {'key': 'properties.networkSecurityGroup', 'type': 'SubResource'}, + 'dns_settings': {'key': 'properties.dnsSettings', 'type': 'VirtualMachineScaleSetNetworkConfigurationDnsSettings'}, + 'ip_configurations': {'key': 'properties.ipConfigurations', 'type': '[VirtualMachineScaleSetIPConfiguration]'}, + 'enable_ip_forwarding': {'key': 'properties.enableIPForwarding', 'type': 'bool'}, + } + + def __init__(self, **kwargs): + super(VirtualMachineScaleSetNetworkConfiguration, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.primary = kwargs.get('primary', None) + self.enable_accelerated_networking = kwargs.get('enable_accelerated_networking', None) + self.network_security_group = kwargs.get('network_security_group', None) + self.dns_settings = kwargs.get('dns_settings', None) + self.ip_configurations = kwargs.get('ip_configurations', None) + self.enable_ip_forwarding = kwargs.get('enable_ip_forwarding', None) + + +class VirtualMachineScaleSetNetworkConfigurationDnsSettings(Model): + """Describes a virtual machines scale sets network configuration's DNS + settings. + + :param dns_servers: List of DNS servers IP addresses + :type dns_servers: list[str] + """ + + _attribute_map = { + 'dns_servers': {'key': 'dnsServers', 'type': '[str]'}, + } + + def __init__(self, **kwargs): + super(VirtualMachineScaleSetNetworkConfigurationDnsSettings, self).__init__(**kwargs) + self.dns_servers = kwargs.get('dns_servers', None) + + +class VirtualMachineScaleSetNetworkProfile(Model): + """Describes a virtual machine scale set network profile. + + :param health_probe: A reference to a load balancer probe used to + determine the health of an instance in the virtual machine scale set. The + reference will be in the form: + '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/probes/{probeName}'. + :type health_probe: + ~azure.mgmt.compute.v2018_10_01.models.ApiEntityReference + :param network_interface_configurations: The list of network + configurations. + :type network_interface_configurations: + list[~azure.mgmt.compute.v2018_10_01.models.VirtualMachineScaleSetNetworkConfiguration] + """ + + _attribute_map = { + 'health_probe': {'key': 'healthProbe', 'type': 'ApiEntityReference'}, + 'network_interface_configurations': {'key': 'networkInterfaceConfigurations', 'type': '[VirtualMachineScaleSetNetworkConfiguration]'}, + } + + def __init__(self, **kwargs): + super(VirtualMachineScaleSetNetworkProfile, self).__init__(**kwargs) + self.health_probe = kwargs.get('health_probe', None) + self.network_interface_configurations = kwargs.get('network_interface_configurations', None) + + +class VirtualMachineScaleSetOSDisk(Model): + """Describes a virtual machine scale set operating system disk. + + All required parameters must be populated in order to send to Azure. + + :param name: The disk name. + :type name: str + :param caching: Specifies the caching requirements.

    Possible + values are:

    **None**

    **ReadOnly**

    **ReadWrite** +

    Default: **None for Standard storage. ReadOnly for Premium + storage**. Possible values include: 'None', 'ReadOnly', 'ReadWrite' + :type caching: str or ~azure.mgmt.compute.v2018_10_01.models.CachingTypes + :param write_accelerator_enabled: Specifies whether writeAccelerator + should be enabled or disabled on the disk. + :type write_accelerator_enabled: bool + :param create_option: Required. Specifies how the virtual machines in the + scale set should be created.

    The only allowed value is: + **FromImage** \\u2013 This value is used when you are using an image to + create the virtual machine. If you are using a platform image, you also + use the imageReference element described above. If you are using a + marketplace image, you also use the plan element previously described. + Possible values include: 'FromImage', 'Empty', 'Attach' + :type create_option: str or + ~azure.mgmt.compute.v2018_10_01.models.DiskCreateOptionTypes + :param diff_disk_settings: Specifies the ephemeral disk Settings for the + operating system disk used by the virtual machine scale set. + :type diff_disk_settings: + ~azure.mgmt.compute.v2018_10_01.models.DiffDiskSettings + :param disk_size_gb: Specifies the size of the operating system disk in + gigabytes. This element can be used to overwrite the size of the disk in a + virtual machine image.

    This value cannot be larger than 1023 GB + :type disk_size_gb: int + :param os_type: This property allows you to specify the type of the OS + that is included in the disk if creating a VM from user-image or a + specialized VHD.

    Possible values are:

    **Windows** +

    **Linux**. Possible values include: 'Windows', 'Linux' + :type os_type: str or + ~azure.mgmt.compute.v2018_10_01.models.OperatingSystemTypes + :param image: Specifies information about the unmanaged user image to base + the scale set on. + :type image: ~azure.mgmt.compute.v2018_10_01.models.VirtualHardDisk + :param vhd_containers: Specifies the container urls that are used to store + operating system disks for the scale set. + :type vhd_containers: list[str] + :param managed_disk: The managed disk parameters. + :type managed_disk: + ~azure.mgmt.compute.v2018_10_01.models.VirtualMachineScaleSetManagedDiskParameters + """ + + _validation = { + 'create_option': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'caching': {'key': 'caching', 'type': 'CachingTypes'}, + 'write_accelerator_enabled': {'key': 'writeAcceleratorEnabled', 'type': 'bool'}, + 'create_option': {'key': 'createOption', 'type': 'str'}, + 'diff_disk_settings': {'key': 'diffDiskSettings', 'type': 'DiffDiskSettings'}, + 'disk_size_gb': {'key': 'diskSizeGB', 'type': 'int'}, + 'os_type': {'key': 'osType', 'type': 'OperatingSystemTypes'}, + 'image': {'key': 'image', 'type': 'VirtualHardDisk'}, + 'vhd_containers': {'key': 'vhdContainers', 'type': '[str]'}, + 'managed_disk': {'key': 'managedDisk', 'type': 'VirtualMachineScaleSetManagedDiskParameters'}, + } + + def __init__(self, **kwargs): + super(VirtualMachineScaleSetOSDisk, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.caching = kwargs.get('caching', None) + self.write_accelerator_enabled = kwargs.get('write_accelerator_enabled', None) + self.create_option = kwargs.get('create_option', None) + self.diff_disk_settings = kwargs.get('diff_disk_settings', None) + self.disk_size_gb = kwargs.get('disk_size_gb', None) + self.os_type = kwargs.get('os_type', None) + self.image = kwargs.get('image', None) + self.vhd_containers = kwargs.get('vhd_containers', None) + self.managed_disk = kwargs.get('managed_disk', None) + + +class VirtualMachineScaleSetOSProfile(Model): + """Describes a virtual machine scale set OS profile. + + :param computer_name_prefix: Specifies the computer name prefix for all of + the virtual machines in the scale set. Computer name prefixes must be 1 to + 15 characters long. + :type computer_name_prefix: str + :param admin_username: Specifies the name of the administrator account. +

    **Windows-only restriction:** Cannot end in "."

    + **Disallowed values:** "administrator", "admin", "user", "user1", "test", + "user2", "test1", "user3", "admin1", "1", "123", "a", "actuser", "adm", + "admin2", "aspnet", "backup", "console", "david", "guest", "john", + "owner", "root", "server", "sql", "support", "support_388945a0", "sys", + "test2", "test3", "user4", "user5".

    **Minimum-length (Linux):** 1 + character

    **Max-length (Linux):** 64 characters

    + **Max-length (Windows):** 20 characters

  • For root access to + the Linux VM, see [Using root privileges on Linux virtual machines in + Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-use-root-privileges?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json)
  • + For a list of built-in system users on Linux that should not be used in + this field, see [Selecting User Names for Linux on + Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-usernames?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json) + :type admin_username: str + :param admin_password: Specifies the password of the administrator + account.

    **Minimum-length (Windows):** 8 characters

    + **Minimum-length (Linux):** 6 characters

    **Max-length + (Windows):** 123 characters

    **Max-length (Linux):** 72 characters +

    **Complexity requirements:** 3 out of 4 conditions below need to + be fulfilled
    Has lower characters
    Has upper characters
    Has a + digit
    Has a special character (Regex match [\\W_])

    + **Disallowed values:** "abc@123", "P@$$w0rd", "P@ssw0rd", "P@ssword123", + "Pa$$word", "pass@word1", "Password!", "Password1", "Password22", + "iloveyou!"

    For resetting the password, see [How to reset the + Remote Desktop service or its login password in a Windows + VM](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-reset-rdp?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json) +

    For resetting root password, see [Manage users, SSH, and check or + repair disks on Azure Linux VMs using the VMAccess + Extension](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-using-vmaccess-extension?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json#reset-root-password) + :type admin_password: str + :param custom_data: Specifies a base-64 encoded string of custom data. The + base-64 encoded string is decoded to a binary array that is saved as a + file on the Virtual Machine. The maximum length of the binary array is + 65535 bytes.

    For using cloud-init for your VM, see [Using + cloud-init to customize a Linux VM during + creation](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-using-cloud-init?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json) + :type custom_data: str + :param windows_configuration: Specifies Windows operating system settings + on the virtual machine. + :type windows_configuration: + ~azure.mgmt.compute.v2018_10_01.models.WindowsConfiguration + :param linux_configuration: Specifies the Linux operating system settings + on the virtual machine.

    For a list of supported Linux + distributions, see [Linux on Azure-Endorsed + Distributions](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-endorsed-distros?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json) +

    For running non-endorsed distributions, see [Information for + Non-Endorsed + Distributions](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-create-upload-generic?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json). + :type linux_configuration: + ~azure.mgmt.compute.v2018_10_01.models.LinuxConfiguration + :param secrets: Specifies set of certificates that should be installed + onto the virtual machines in the scale set. + :type secrets: + list[~azure.mgmt.compute.v2018_10_01.models.VaultSecretGroup] + """ + + _attribute_map = { + 'computer_name_prefix': {'key': 'computerNamePrefix', 'type': 'str'}, + 'admin_username': {'key': 'adminUsername', 'type': 'str'}, + 'admin_password': {'key': 'adminPassword', 'type': 'str'}, + 'custom_data': {'key': 'customData', 'type': 'str'}, + 'windows_configuration': {'key': 'windowsConfiguration', 'type': 'WindowsConfiguration'}, + 'linux_configuration': {'key': 'linuxConfiguration', 'type': 'LinuxConfiguration'}, + 'secrets': {'key': 'secrets', 'type': '[VaultSecretGroup]'}, + } + + def __init__(self, **kwargs): + super(VirtualMachineScaleSetOSProfile, self).__init__(**kwargs) + self.computer_name_prefix = kwargs.get('computer_name_prefix', None) + self.admin_username = kwargs.get('admin_username', None) + self.admin_password = kwargs.get('admin_password', None) + self.custom_data = kwargs.get('custom_data', None) + self.windows_configuration = kwargs.get('windows_configuration', None) + self.linux_configuration = kwargs.get('linux_configuration', None) + self.secrets = kwargs.get('secrets', None) + + +class VirtualMachineScaleSetPublicIPAddressConfiguration(Model): + """Describes a virtual machines scale set IP Configuration's PublicIPAddress + configuration. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. The publicIP address configuration name. + :type name: str + :param idle_timeout_in_minutes: The idle timeout of the public IP address. + :type idle_timeout_in_minutes: int + :param dns_settings: The dns settings to be applied on the publicIP + addresses . + :type dns_settings: + ~azure.mgmt.compute.v2018_10_01.models.VirtualMachineScaleSetPublicIPAddressConfigurationDnsSettings + :param ip_tags: The list of IP tags associated with the public IP address. + :type ip_tags: + list[~azure.mgmt.compute.v2018_10_01.models.VirtualMachineScaleSetIpTag] + :param public_ip_prefix: The PublicIPPrefix from which to allocate + publicIP addresses. + :type public_ip_prefix: ~azure.mgmt.compute.v2018_10_01.models.SubResource + """ + + _validation = { + 'name': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'idle_timeout_in_minutes': {'key': 'properties.idleTimeoutInMinutes', 'type': 'int'}, + 'dns_settings': {'key': 'properties.dnsSettings', 'type': 'VirtualMachineScaleSetPublicIPAddressConfigurationDnsSettings'}, + 'ip_tags': {'key': 'properties.ipTags', 'type': '[VirtualMachineScaleSetIpTag]'}, + 'public_ip_prefix': {'key': 'properties.publicIPPrefix', 'type': 'SubResource'}, + } + + def __init__(self, **kwargs): + super(VirtualMachineScaleSetPublicIPAddressConfiguration, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.idle_timeout_in_minutes = kwargs.get('idle_timeout_in_minutes', None) + self.dns_settings = kwargs.get('dns_settings', None) + self.ip_tags = kwargs.get('ip_tags', None) + self.public_ip_prefix = kwargs.get('public_ip_prefix', None) + + +class VirtualMachineScaleSetPublicIPAddressConfigurationDnsSettings(Model): + """Describes a virtual machines scale sets network configuration's DNS + settings. + + All required parameters must be populated in order to send to Azure. + + :param domain_name_label: Required. The Domain name label.The + concatenation of the domain name label and vm index will be the domain + name labels of the PublicIPAddress resources that will be created + :type domain_name_label: str + """ + + _validation = { + 'domain_name_label': {'required': True}, + } + + _attribute_map = { + 'domain_name_label': {'key': 'domainNameLabel', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(VirtualMachineScaleSetPublicIPAddressConfigurationDnsSettings, self).__init__(**kwargs) + self.domain_name_label = kwargs.get('domain_name_label', None) + + +class VirtualMachineScaleSetVMReimageParameters(VirtualMachineReimageParameters): + """Describes a Virtual Machine Scale Set VM Reimage Parameters. + + :param temp_disk: Specifies whether to reimage temp disk. Default value: + false. Note: This temp disk reimage parameter is only supported for + VM/VMSS with Ephemeral OS disk. + :type temp_disk: bool + """ + + _attribute_map = { + 'temp_disk': {'key': 'tempDisk', 'type': 'bool'}, + } + + def __init__(self, **kwargs): + super(VirtualMachineScaleSetVMReimageParameters, self).__init__(**kwargs) + + +class VirtualMachineScaleSetReimageParameters(VirtualMachineScaleSetVMReimageParameters): + """Describes a Virtual Machine Scale Set VM Reimage Parameters. + + :param temp_disk: Specifies whether to reimage temp disk. Default value: + false. Note: This temp disk reimage parameter is only supported for + VM/VMSS with Ephemeral OS disk. + :type temp_disk: bool + :param instance_ids: The virtual machine scale set instance ids. Omitting + the virtual machine scale set instance ids will result in the operation + being performed on all virtual machines in the virtual machine scale set. + :type instance_ids: list[str] + """ + + _attribute_map = { + 'temp_disk': {'key': 'tempDisk', 'type': 'bool'}, + 'instance_ids': {'key': 'instanceIds', 'type': '[str]'}, + } + + def __init__(self, **kwargs): + super(VirtualMachineScaleSetReimageParameters, self).__init__(**kwargs) + self.instance_ids = kwargs.get('instance_ids', None) + + +class VirtualMachineScaleSetSku(Model): + """Describes an available virtual machine scale set sku. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar resource_type: The type of resource the sku applies to. + :vartype resource_type: str + :ivar sku: The Sku. + :vartype sku: ~azure.mgmt.compute.v2018_10_01.models.Sku + :ivar capacity: Specifies the number of virtual machines in the scale set. + :vartype capacity: + ~azure.mgmt.compute.v2018_10_01.models.VirtualMachineScaleSetSkuCapacity + """ + + _validation = { + 'resource_type': {'readonly': True}, + 'sku': {'readonly': True}, + 'capacity': {'readonly': True}, + } + + _attribute_map = { + 'resource_type': {'key': 'resourceType', 'type': 'str'}, + 'sku': {'key': 'sku', 'type': 'Sku'}, + 'capacity': {'key': 'capacity', 'type': 'VirtualMachineScaleSetSkuCapacity'}, + } + + def __init__(self, **kwargs): + super(VirtualMachineScaleSetSku, self).__init__(**kwargs) + self.resource_type = None + self.sku = None + self.capacity = None + + +class VirtualMachineScaleSetSkuCapacity(Model): + """Describes scaling information of a sku. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar minimum: The minimum capacity. + :vartype minimum: long + :ivar maximum: The maximum capacity that can be set. + :vartype maximum: long + :ivar default_capacity: The default capacity. + :vartype default_capacity: long + :ivar scale_type: The scale type applicable to the sku. Possible values + include: 'Automatic', 'None' + :vartype scale_type: str or + ~azure.mgmt.compute.v2018_10_01.models.VirtualMachineScaleSetSkuScaleType + """ + + _validation = { + 'minimum': {'readonly': True}, + 'maximum': {'readonly': True}, + 'default_capacity': {'readonly': True}, + 'scale_type': {'readonly': True}, + } + + _attribute_map = { + 'minimum': {'key': 'minimum', 'type': 'long'}, + 'maximum': {'key': 'maximum', 'type': 'long'}, + 'default_capacity': {'key': 'defaultCapacity', 'type': 'long'}, + 'scale_type': {'key': 'scaleType', 'type': 'VirtualMachineScaleSetSkuScaleType'}, + } + + def __init__(self, **kwargs): + super(VirtualMachineScaleSetSkuCapacity, self).__init__(**kwargs) + self.minimum = None + self.maximum = None + self.default_capacity = None + self.scale_type = None + + +class VirtualMachineScaleSetStorageProfile(Model): + """Describes a virtual machine scale set storage profile. + + :param image_reference: Specifies information about the image to use. You + can specify information about platform images, marketplace images, or + virtual machine images. This element is required when you want to use a + platform image, marketplace image, or virtual machine image, but is not + used in other creation operations. + :type image_reference: + ~azure.mgmt.compute.v2018_10_01.models.ImageReference + :param os_disk: Specifies information about the operating system disk used + by the virtual machines in the scale set.

    For more information + about disks, see [About disks and VHDs for Azure virtual + machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-about-disks-vhds?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). + :type os_disk: + ~azure.mgmt.compute.v2018_10_01.models.VirtualMachineScaleSetOSDisk + :param data_disks: Specifies the parameters that are used to add data + disks to the virtual machines in the scale set.

    For more + information about disks, see [About disks and VHDs for Azure virtual + machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-about-disks-vhds?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). + :type data_disks: + list[~azure.mgmt.compute.v2018_10_01.models.VirtualMachineScaleSetDataDisk] + """ + + _attribute_map = { + 'image_reference': {'key': 'imageReference', 'type': 'ImageReference'}, + 'os_disk': {'key': 'osDisk', 'type': 'VirtualMachineScaleSetOSDisk'}, + 'data_disks': {'key': 'dataDisks', 'type': '[VirtualMachineScaleSetDataDisk]'}, + } + + def __init__(self, **kwargs): + super(VirtualMachineScaleSetStorageProfile, self).__init__(**kwargs) + self.image_reference = kwargs.get('image_reference', None) + self.os_disk = kwargs.get('os_disk', None) + self.data_disks = kwargs.get('data_disks', None) + + +class VirtualMachineScaleSetUpdate(UpdateResource): + """Describes a Virtual Machine Scale Set. + + :param tags: Resource tags + :type tags: dict[str, str] + :param sku: The virtual machine scale set sku. + :type sku: ~azure.mgmt.compute.v2018_10_01.models.Sku + :param plan: The purchase plan when deploying a virtual machine scale set + from VM Marketplace images. + :type plan: ~azure.mgmt.compute.v2018_10_01.models.Plan + :param upgrade_policy: The upgrade policy. + :type upgrade_policy: ~azure.mgmt.compute.v2018_10_01.models.UpgradePolicy + :param virtual_machine_profile: The virtual machine profile. + :type virtual_machine_profile: + ~azure.mgmt.compute.v2018_10_01.models.VirtualMachineScaleSetUpdateVMProfile + :param overprovision: Specifies whether the Virtual Machine Scale Set + should be overprovisioned. + :type overprovision: bool + :param single_placement_group: When true this limits the scale set to a + single placement group, of max size 100 virtual machines. + :type single_placement_group: bool + :param identity: The identity of the virtual machine scale set, if + configured. + :type identity: + ~azure.mgmt.compute.v2018_10_01.models.VirtualMachineScaleSetIdentity + """ + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + 'sku': {'key': 'sku', 'type': 'Sku'}, + 'plan': {'key': 'plan', 'type': 'Plan'}, + 'upgrade_policy': {'key': 'properties.upgradePolicy', 'type': 'UpgradePolicy'}, + 'virtual_machine_profile': {'key': 'properties.virtualMachineProfile', 'type': 'VirtualMachineScaleSetUpdateVMProfile'}, + 'overprovision': {'key': 'properties.overprovision', 'type': 'bool'}, + 'single_placement_group': {'key': 'properties.singlePlacementGroup', 'type': 'bool'}, + 'identity': {'key': 'identity', 'type': 'VirtualMachineScaleSetIdentity'}, + } + + def __init__(self, **kwargs): + super(VirtualMachineScaleSetUpdate, self).__init__(**kwargs) + self.sku = kwargs.get('sku', None) + self.plan = kwargs.get('plan', None) + self.upgrade_policy = kwargs.get('upgrade_policy', None) + self.virtual_machine_profile = kwargs.get('virtual_machine_profile', None) + self.overprovision = kwargs.get('overprovision', None) + self.single_placement_group = kwargs.get('single_placement_group', None) + self.identity = kwargs.get('identity', None) + + +class VirtualMachineScaleSetUpdateIPConfiguration(SubResource): + """Describes a virtual machine scale set network profile's IP configuration. + + :param id: Resource Id + :type id: str + :param name: The IP configuration name. + :type name: str + :param subnet: The subnet. + :type subnet: ~azure.mgmt.compute.v2018_10_01.models.ApiEntityReference + :param primary: Specifies the primary IP Configuration in case the network + interface has more than one IP Configuration. + :type primary: bool + :param public_ip_address_configuration: The publicIPAddressConfiguration. + :type public_ip_address_configuration: + ~azure.mgmt.compute.v2018_10_01.models.VirtualMachineScaleSetUpdatePublicIPAddressConfiguration + :param private_ip_address_version: Available from Api-Version 2017-03-30 + onwards, it represents whether the specific ipconfiguration is IPv4 or + IPv6. Default is taken as IPv4. Possible values are: 'IPv4' and 'IPv6'. + Possible values include: 'IPv4', 'IPv6' + :type private_ip_address_version: str or + ~azure.mgmt.compute.v2018_10_01.models.IPVersion + :param application_gateway_backend_address_pools: The application gateway + backend address pools. + :type application_gateway_backend_address_pools: + list[~azure.mgmt.compute.v2018_10_01.models.SubResource] + :param application_security_groups: Specifies an array of references to + application security group. + :type application_security_groups: + list[~azure.mgmt.compute.v2018_10_01.models.SubResource] + :param load_balancer_backend_address_pools: The load balancer backend + address pools. + :type load_balancer_backend_address_pools: + list[~azure.mgmt.compute.v2018_10_01.models.SubResource] + :param load_balancer_inbound_nat_pools: The load balancer inbound nat + pools. + :type load_balancer_inbound_nat_pools: + list[~azure.mgmt.compute.v2018_10_01.models.SubResource] + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'subnet': {'key': 'properties.subnet', 'type': 'ApiEntityReference'}, + 'primary': {'key': 'properties.primary', 'type': 'bool'}, + 'public_ip_address_configuration': {'key': 'properties.publicIPAddressConfiguration', 'type': 'VirtualMachineScaleSetUpdatePublicIPAddressConfiguration'}, + 'private_ip_address_version': {'key': 'properties.privateIPAddressVersion', 'type': 'str'}, + 'application_gateway_backend_address_pools': {'key': 'properties.applicationGatewayBackendAddressPools', 'type': '[SubResource]'}, + 'application_security_groups': {'key': 'properties.applicationSecurityGroups', 'type': '[SubResource]'}, + 'load_balancer_backend_address_pools': {'key': 'properties.loadBalancerBackendAddressPools', 'type': '[SubResource]'}, + 'load_balancer_inbound_nat_pools': {'key': 'properties.loadBalancerInboundNatPools', 'type': '[SubResource]'}, + } + + def __init__(self, **kwargs): + super(VirtualMachineScaleSetUpdateIPConfiguration, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.subnet = kwargs.get('subnet', None) + self.primary = kwargs.get('primary', None) + self.public_ip_address_configuration = kwargs.get('public_ip_address_configuration', None) + self.private_ip_address_version = kwargs.get('private_ip_address_version', None) + self.application_gateway_backend_address_pools = kwargs.get('application_gateway_backend_address_pools', None) + self.application_security_groups = kwargs.get('application_security_groups', None) + self.load_balancer_backend_address_pools = kwargs.get('load_balancer_backend_address_pools', None) + self.load_balancer_inbound_nat_pools = kwargs.get('load_balancer_inbound_nat_pools', None) + + +class VirtualMachineScaleSetUpdateNetworkConfiguration(SubResource): + """Describes a virtual machine scale set network profile's network + configurations. + + :param id: Resource Id + :type id: str + :param name: The network configuration name. + :type name: str + :param primary: Whether this is a primary NIC on a virtual machine. + :type primary: bool + :param enable_accelerated_networking: Specifies whether the network + interface is accelerated networking-enabled. + :type enable_accelerated_networking: bool + :param network_security_group: The network security group. + :type network_security_group: + ~azure.mgmt.compute.v2018_10_01.models.SubResource + :param dns_settings: The dns settings to be applied on the network + interfaces. + :type dns_settings: + ~azure.mgmt.compute.v2018_10_01.models.VirtualMachineScaleSetNetworkConfigurationDnsSettings + :param ip_configurations: The virtual machine scale set IP Configuration. + :type ip_configurations: + list[~azure.mgmt.compute.v2018_10_01.models.VirtualMachineScaleSetUpdateIPConfiguration] + :param enable_ip_forwarding: Whether IP forwarding enabled on this NIC. + :type enable_ip_forwarding: bool + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'primary': {'key': 'properties.primary', 'type': 'bool'}, + 'enable_accelerated_networking': {'key': 'properties.enableAcceleratedNetworking', 'type': 'bool'}, + 'network_security_group': {'key': 'properties.networkSecurityGroup', 'type': 'SubResource'}, + 'dns_settings': {'key': 'properties.dnsSettings', 'type': 'VirtualMachineScaleSetNetworkConfigurationDnsSettings'}, + 'ip_configurations': {'key': 'properties.ipConfigurations', 'type': '[VirtualMachineScaleSetUpdateIPConfiguration]'}, + 'enable_ip_forwarding': {'key': 'properties.enableIPForwarding', 'type': 'bool'}, + } + + def __init__(self, **kwargs): + super(VirtualMachineScaleSetUpdateNetworkConfiguration, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.primary = kwargs.get('primary', None) + self.enable_accelerated_networking = kwargs.get('enable_accelerated_networking', None) + self.network_security_group = kwargs.get('network_security_group', None) + self.dns_settings = kwargs.get('dns_settings', None) + self.ip_configurations = kwargs.get('ip_configurations', None) + self.enable_ip_forwarding = kwargs.get('enable_ip_forwarding', None) + + +class VirtualMachineScaleSetUpdateNetworkProfile(Model): + """Describes a virtual machine scale set network profile. + + :param network_interface_configurations: The list of network + configurations. + :type network_interface_configurations: + list[~azure.mgmt.compute.v2018_10_01.models.VirtualMachineScaleSetUpdateNetworkConfiguration] + """ + + _attribute_map = { + 'network_interface_configurations': {'key': 'networkInterfaceConfigurations', 'type': '[VirtualMachineScaleSetUpdateNetworkConfiguration]'}, + } + + def __init__(self, **kwargs): + super(VirtualMachineScaleSetUpdateNetworkProfile, self).__init__(**kwargs) + self.network_interface_configurations = kwargs.get('network_interface_configurations', None) + + +class VirtualMachineScaleSetUpdateOSDisk(Model): + """Describes virtual machine scale set operating system disk Update Object. + This should be used for Updating VMSS OS Disk. + + :param caching: The caching type. Possible values include: 'None', + 'ReadOnly', 'ReadWrite' + :type caching: str or ~azure.mgmt.compute.v2018_10_01.models.CachingTypes + :param write_accelerator_enabled: Specifies whether writeAccelerator + should be enabled or disabled on the disk. + :type write_accelerator_enabled: bool + :param disk_size_gb: Specifies the size of the operating system disk in + gigabytes. This element can be used to overwrite the size of the disk in a + virtual machine image.

    This value cannot be larger than 1023 GB + :type disk_size_gb: int + :param image: The Source User Image VirtualHardDisk. This VirtualHardDisk + will be copied before using it to attach to the Virtual Machine. If + SourceImage is provided, the destination VirtualHardDisk should not exist. + :type image: ~azure.mgmt.compute.v2018_10_01.models.VirtualHardDisk + :param vhd_containers: The list of virtual hard disk container uris. + :type vhd_containers: list[str] + :param managed_disk: The managed disk parameters. + :type managed_disk: + ~azure.mgmt.compute.v2018_10_01.models.VirtualMachineScaleSetManagedDiskParameters + """ + + _attribute_map = { + 'caching': {'key': 'caching', 'type': 'CachingTypes'}, + 'write_accelerator_enabled': {'key': 'writeAcceleratorEnabled', 'type': 'bool'}, + 'disk_size_gb': {'key': 'diskSizeGB', 'type': 'int'}, + 'image': {'key': 'image', 'type': 'VirtualHardDisk'}, + 'vhd_containers': {'key': 'vhdContainers', 'type': '[str]'}, + 'managed_disk': {'key': 'managedDisk', 'type': 'VirtualMachineScaleSetManagedDiskParameters'}, + } + + def __init__(self, **kwargs): + super(VirtualMachineScaleSetUpdateOSDisk, self).__init__(**kwargs) + self.caching = kwargs.get('caching', None) + self.write_accelerator_enabled = kwargs.get('write_accelerator_enabled', None) + self.disk_size_gb = kwargs.get('disk_size_gb', None) + self.image = kwargs.get('image', None) + self.vhd_containers = kwargs.get('vhd_containers', None) + self.managed_disk = kwargs.get('managed_disk', None) + + +class VirtualMachineScaleSetUpdateOSProfile(Model): + """Describes a virtual machine scale set OS profile. + + :param custom_data: A base-64 encoded string of custom data. + :type custom_data: str + :param windows_configuration: The Windows Configuration of the OS profile. + :type windows_configuration: + ~azure.mgmt.compute.v2018_10_01.models.WindowsConfiguration + :param linux_configuration: The Linux Configuration of the OS profile. + :type linux_configuration: + ~azure.mgmt.compute.v2018_10_01.models.LinuxConfiguration + :param secrets: The List of certificates for addition to the VM. + :type secrets: + list[~azure.mgmt.compute.v2018_10_01.models.VaultSecretGroup] + """ + + _attribute_map = { + 'custom_data': {'key': 'customData', 'type': 'str'}, + 'windows_configuration': {'key': 'windowsConfiguration', 'type': 'WindowsConfiguration'}, + 'linux_configuration': {'key': 'linuxConfiguration', 'type': 'LinuxConfiguration'}, + 'secrets': {'key': 'secrets', 'type': '[VaultSecretGroup]'}, + } + + def __init__(self, **kwargs): + super(VirtualMachineScaleSetUpdateOSProfile, self).__init__(**kwargs) + self.custom_data = kwargs.get('custom_data', None) + self.windows_configuration = kwargs.get('windows_configuration', None) + self.linux_configuration = kwargs.get('linux_configuration', None) + self.secrets = kwargs.get('secrets', None) + + +class VirtualMachineScaleSetUpdatePublicIPAddressConfiguration(Model): + """Describes a virtual machines scale set IP Configuration's PublicIPAddress + configuration. + + :param name: The publicIP address configuration name. + :type name: str + :param idle_timeout_in_minutes: The idle timeout of the public IP address. + :type idle_timeout_in_minutes: int + :param dns_settings: The dns settings to be applied on the publicIP + addresses . + :type dns_settings: + ~azure.mgmt.compute.v2018_10_01.models.VirtualMachineScaleSetPublicIPAddressConfigurationDnsSettings + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'idle_timeout_in_minutes': {'key': 'properties.idleTimeoutInMinutes', 'type': 'int'}, + 'dns_settings': {'key': 'properties.dnsSettings', 'type': 'VirtualMachineScaleSetPublicIPAddressConfigurationDnsSettings'}, + } + + def __init__(self, **kwargs): + super(VirtualMachineScaleSetUpdatePublicIPAddressConfiguration, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.idle_timeout_in_minutes = kwargs.get('idle_timeout_in_minutes', None) + self.dns_settings = kwargs.get('dns_settings', None) + + +class VirtualMachineScaleSetUpdateStorageProfile(Model): + """Describes a virtual machine scale set storage profile. + + :param image_reference: The image reference. + :type image_reference: + ~azure.mgmt.compute.v2018_10_01.models.ImageReference + :param os_disk: The OS disk. + :type os_disk: + ~azure.mgmt.compute.v2018_10_01.models.VirtualMachineScaleSetUpdateOSDisk + :param data_disks: The data disks. + :type data_disks: + list[~azure.mgmt.compute.v2018_10_01.models.VirtualMachineScaleSetDataDisk] + """ + + _attribute_map = { + 'image_reference': {'key': 'imageReference', 'type': 'ImageReference'}, + 'os_disk': {'key': 'osDisk', 'type': 'VirtualMachineScaleSetUpdateOSDisk'}, + 'data_disks': {'key': 'dataDisks', 'type': '[VirtualMachineScaleSetDataDisk]'}, + } + + def __init__(self, **kwargs): + super(VirtualMachineScaleSetUpdateStorageProfile, self).__init__(**kwargs) + self.image_reference = kwargs.get('image_reference', None) + self.os_disk = kwargs.get('os_disk', None) + self.data_disks = kwargs.get('data_disks', None) + + +class VirtualMachineScaleSetUpdateVMProfile(Model): + """Describes a virtual machine scale set virtual machine profile. + + :param os_profile: The virtual machine scale set OS profile. + :type os_profile: + ~azure.mgmt.compute.v2018_10_01.models.VirtualMachineScaleSetUpdateOSProfile + :param storage_profile: The virtual machine scale set storage profile. + :type storage_profile: + ~azure.mgmt.compute.v2018_10_01.models.VirtualMachineScaleSetUpdateStorageProfile + :param network_profile: The virtual machine scale set network profile. + :type network_profile: + ~azure.mgmt.compute.v2018_10_01.models.VirtualMachineScaleSetUpdateNetworkProfile + :param diagnostics_profile: The virtual machine scale set diagnostics + profile. + :type diagnostics_profile: + ~azure.mgmt.compute.v2018_10_01.models.DiagnosticsProfile + :param extension_profile: The virtual machine scale set extension profile. + :type extension_profile: + ~azure.mgmt.compute.v2018_10_01.models.VirtualMachineScaleSetExtensionProfile + :param license_type: The license type, which is for bring your own license + scenario. + :type license_type: str + """ + + _attribute_map = { + 'os_profile': {'key': 'osProfile', 'type': 'VirtualMachineScaleSetUpdateOSProfile'}, + 'storage_profile': {'key': 'storageProfile', 'type': 'VirtualMachineScaleSetUpdateStorageProfile'}, + 'network_profile': {'key': 'networkProfile', 'type': 'VirtualMachineScaleSetUpdateNetworkProfile'}, + 'diagnostics_profile': {'key': 'diagnosticsProfile', 'type': 'DiagnosticsProfile'}, + 'extension_profile': {'key': 'extensionProfile', 'type': 'VirtualMachineScaleSetExtensionProfile'}, + 'license_type': {'key': 'licenseType', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(VirtualMachineScaleSetUpdateVMProfile, self).__init__(**kwargs) + self.os_profile = kwargs.get('os_profile', None) + self.storage_profile = kwargs.get('storage_profile', None) + self.network_profile = kwargs.get('network_profile', None) + self.diagnostics_profile = kwargs.get('diagnostics_profile', None) + self.extension_profile = kwargs.get('extension_profile', None) + self.license_type = kwargs.get('license_type', None) + + +class VirtualMachineScaleSetVM(Resource): + """Describes a virtual machine scale set virtual machine. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource Id + :vartype id: str + :ivar name: Resource name + :vartype name: str + :ivar type: Resource type + :vartype type: str + :param location: Required. Resource location + :type location: str + :param tags: Resource tags + :type tags: dict[str, str] + :ivar instance_id: The virtual machine instance ID. + :vartype instance_id: str + :ivar sku: The virtual machine SKU. + :vartype sku: ~azure.mgmt.compute.v2018_10_01.models.Sku + :ivar latest_model_applied: Specifies whether the latest model has been + applied to the virtual machine. + :vartype latest_model_applied: bool + :ivar vm_id: Azure VM unique ID. + :vartype vm_id: str + :ivar instance_view: The virtual machine instance view. + :vartype instance_view: + ~azure.mgmt.compute.v2018_10_01.models.VirtualMachineScaleSetVMInstanceView + :param hardware_profile: Specifies the hardware settings for the virtual + machine. + :type hardware_profile: + ~azure.mgmt.compute.v2018_10_01.models.HardwareProfile + :param storage_profile: Specifies the storage settings for the virtual + machine disks. + :type storage_profile: + ~azure.mgmt.compute.v2018_10_01.models.StorageProfile + :param additional_capabilities: Specifies additional capabilities enabled + or disabled on the virtual machine in the scale set. For instance: whether + the virtual machine has the capability to support attaching managed data + disks with UltraSSD_LRS storage account type. + :type additional_capabilities: + ~azure.mgmt.compute.v2018_10_01.models.AdditionalCapabilities + :param os_profile: Specifies the operating system settings for the virtual + machine. + :type os_profile: ~azure.mgmt.compute.v2018_10_01.models.OSProfile + :param network_profile: Specifies the network interfaces of the virtual + machine. + :type network_profile: + ~azure.mgmt.compute.v2018_10_01.models.NetworkProfile + :param diagnostics_profile: Specifies the boot diagnostic settings state. +

    Minimum api-version: 2015-06-15. + :type diagnostics_profile: + ~azure.mgmt.compute.v2018_10_01.models.DiagnosticsProfile + :param availability_set: Specifies information about the availability set + that the virtual machine should be assigned to. Virtual machines specified + in the same availability set are allocated to different nodes to maximize + availability. For more information about availability sets, see [Manage + the availability of virtual + machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-manage-availability?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). +

    For more information on Azure planned maintenance, see [Planned + maintenance for virtual machines in + Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-planned-maintenance?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json) +

    Currently, a VM can only be added to availability set at creation + time. An existing VM cannot be added to an availability set. + :type availability_set: ~azure.mgmt.compute.v2018_10_01.models.SubResource + :ivar provisioning_state: The provisioning state, which only appears in + the response. + :vartype provisioning_state: str + :param license_type: Specifies that the image or disk that is being used + was licensed on-premises. This element is only used for images that + contain the Windows Server operating system.

    Possible values are: +

    Windows_Client

    Windows_Server

    If this element + is included in a request for an update, the value must match the initial + value. This value cannot be updated.

    For more information, see + [Azure Hybrid Use Benefit for Windows + Server](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-hybrid-use-benefit-licensing?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json) +

    Minimum api-version: 2015-06-15 + :type license_type: str + :param plan: Specifies information about the marketplace image used to + create the virtual machine. This element is only used for marketplace + images. Before you can use a marketplace image from an API, you must + enable the image for programmatic use. In the Azure portal, find the + marketplace image that you want to use and then click **Want to deploy + programmatically, Get Started ->**. Enter any required information and + then click **Save**. + :type plan: ~azure.mgmt.compute.v2018_10_01.models.Plan + :ivar resources: The virtual machine child extension resources. + :vartype resources: + list[~azure.mgmt.compute.v2018_10_01.models.VirtualMachineExtension] + :ivar zones: The virtual machine zones. + :vartype zones: list[str] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + 'instance_id': {'readonly': True}, + 'sku': {'readonly': True}, + 'latest_model_applied': {'readonly': True}, + 'vm_id': {'readonly': True}, + 'instance_view': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + 'resources': {'readonly': True}, + 'zones': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'instance_id': {'key': 'instanceId', 'type': 'str'}, + 'sku': {'key': 'sku', 'type': 'Sku'}, + 'latest_model_applied': {'key': 'properties.latestModelApplied', 'type': 'bool'}, + 'vm_id': {'key': 'properties.vmId', 'type': 'str'}, + 'instance_view': {'key': 'properties.instanceView', 'type': 'VirtualMachineScaleSetVMInstanceView'}, + 'hardware_profile': {'key': 'properties.hardwareProfile', 'type': 'HardwareProfile'}, + 'storage_profile': {'key': 'properties.storageProfile', 'type': 'StorageProfile'}, + 'additional_capabilities': {'key': 'properties.additionalCapabilities', 'type': 'AdditionalCapabilities'}, + 'os_profile': {'key': 'properties.osProfile', 'type': 'OSProfile'}, + 'network_profile': {'key': 'properties.networkProfile', 'type': 'NetworkProfile'}, + 'diagnostics_profile': {'key': 'properties.diagnosticsProfile', 'type': 'DiagnosticsProfile'}, + 'availability_set': {'key': 'properties.availabilitySet', 'type': 'SubResource'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'license_type': {'key': 'properties.licenseType', 'type': 'str'}, + 'plan': {'key': 'plan', 'type': 'Plan'}, + 'resources': {'key': 'resources', 'type': '[VirtualMachineExtension]'}, + 'zones': {'key': 'zones', 'type': '[str]'}, + } + + def __init__(self, **kwargs): + super(VirtualMachineScaleSetVM, self).__init__(**kwargs) + self.instance_id = None + self.sku = None + self.latest_model_applied = None + self.vm_id = None + self.instance_view = None + self.hardware_profile = kwargs.get('hardware_profile', None) + self.storage_profile = kwargs.get('storage_profile', None) + self.additional_capabilities = kwargs.get('additional_capabilities', None) + self.os_profile = kwargs.get('os_profile', None) + self.network_profile = kwargs.get('network_profile', None) + self.diagnostics_profile = kwargs.get('diagnostics_profile', None) + self.availability_set = kwargs.get('availability_set', None) + self.provisioning_state = None + self.license_type = kwargs.get('license_type', None) + self.plan = kwargs.get('plan', None) + self.resources = None + self.zones = None + + +class VirtualMachineScaleSetVMExtensionsSummary(Model): + """Extensions summary for virtual machines of a virtual machine scale set. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar name: The extension name. + :vartype name: str + :ivar statuses_summary: The extensions information. + :vartype statuses_summary: + list[~azure.mgmt.compute.v2018_10_01.models.VirtualMachineStatusCodeCount] + """ + + _validation = { + 'name': {'readonly': True}, + 'statuses_summary': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'statuses_summary': {'key': 'statusesSummary', 'type': '[VirtualMachineStatusCodeCount]'}, + } + + def __init__(self, **kwargs): + super(VirtualMachineScaleSetVMExtensionsSummary, self).__init__(**kwargs) + self.name = None + self.statuses_summary = None + + +class VirtualMachineScaleSetVMInstanceIDs(Model): + """Specifies a list of virtual machine instance IDs from the VM scale set. + + :param instance_ids: The virtual machine scale set instance ids. Omitting + the virtual machine scale set instance ids will result in the operation + being performed on all virtual machines in the virtual machine scale set. + :type instance_ids: list[str] + """ + + _attribute_map = { + 'instance_ids': {'key': 'instanceIds', 'type': '[str]'}, + } + + def __init__(self, **kwargs): + super(VirtualMachineScaleSetVMInstanceIDs, self).__init__(**kwargs) + self.instance_ids = kwargs.get('instance_ids', None) + + +class VirtualMachineScaleSetVMInstanceRequiredIDs(Model): + """Specifies a list of virtual machine instance IDs from the VM scale set. + + All required parameters must be populated in order to send to Azure. + + :param instance_ids: Required. The virtual machine scale set instance ids. + :type instance_ids: list[str] + """ + + _validation = { + 'instance_ids': {'required': True}, + } + + _attribute_map = { + 'instance_ids': {'key': 'instanceIds', 'type': '[str]'}, + } + + def __init__(self, **kwargs): + super(VirtualMachineScaleSetVMInstanceRequiredIDs, self).__init__(**kwargs) + self.instance_ids = kwargs.get('instance_ids', None) + + +class VirtualMachineScaleSetVMInstanceView(Model): + """The instance view of a virtual machine scale set VM. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :param platform_update_domain: The Update Domain count. + :type platform_update_domain: int + :param platform_fault_domain: The Fault Domain count. + :type platform_fault_domain: int + :param rdp_thumb_print: The Remote desktop certificate thumbprint. + :type rdp_thumb_print: str + :param vm_agent: The VM Agent running on the virtual machine. + :type vm_agent: + ~azure.mgmt.compute.v2018_10_01.models.VirtualMachineAgentInstanceView + :param maintenance_redeploy_status: The Maintenance Operation status on + the virtual machine. + :type maintenance_redeploy_status: + ~azure.mgmt.compute.v2018_10_01.models.MaintenanceRedeployStatus + :param disks: The disks information. + :type disks: list[~azure.mgmt.compute.v2018_10_01.models.DiskInstanceView] + :param extensions: The extensions information. + :type extensions: + list[~azure.mgmt.compute.v2018_10_01.models.VirtualMachineExtensionInstanceView] + :ivar vm_health: The health status for the VM. + :vartype vm_health: + ~azure.mgmt.compute.v2018_10_01.models.VirtualMachineHealthStatus + :param boot_diagnostics: Boot Diagnostics is a debugging feature which + allows you to view Console Output and Screenshot to diagnose VM status. +

    You can easily view the output of your console log.

    + Azure also enables you to see a screenshot of the VM from the hypervisor. + :type boot_diagnostics: + ~azure.mgmt.compute.v2018_10_01.models.BootDiagnosticsInstanceView + :param statuses: The resource status information. + :type statuses: + list[~azure.mgmt.compute.v2018_10_01.models.InstanceViewStatus] + :param placement_group_id: The placement group in which the VM is running. + If the VM is deallocated it will not have a placementGroupId. + :type placement_group_id: str + """ + + _validation = { + 'vm_health': {'readonly': True}, + } + + _attribute_map = { + 'platform_update_domain': {'key': 'platformUpdateDomain', 'type': 'int'}, + 'platform_fault_domain': {'key': 'platformFaultDomain', 'type': 'int'}, + 'rdp_thumb_print': {'key': 'rdpThumbPrint', 'type': 'str'}, + 'vm_agent': {'key': 'vmAgent', 'type': 'VirtualMachineAgentInstanceView'}, + 'maintenance_redeploy_status': {'key': 'maintenanceRedeployStatus', 'type': 'MaintenanceRedeployStatus'}, + 'disks': {'key': 'disks', 'type': '[DiskInstanceView]'}, + 'extensions': {'key': 'extensions', 'type': '[VirtualMachineExtensionInstanceView]'}, + 'vm_health': {'key': 'vmHealth', 'type': 'VirtualMachineHealthStatus'}, + 'boot_diagnostics': {'key': 'bootDiagnostics', 'type': 'BootDiagnosticsInstanceView'}, + 'statuses': {'key': 'statuses', 'type': '[InstanceViewStatus]'}, + 'placement_group_id': {'key': 'placementGroupId', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(VirtualMachineScaleSetVMInstanceView, self).__init__(**kwargs) + self.platform_update_domain = kwargs.get('platform_update_domain', None) + self.platform_fault_domain = kwargs.get('platform_fault_domain', None) + self.rdp_thumb_print = kwargs.get('rdp_thumb_print', None) + self.vm_agent = kwargs.get('vm_agent', None) + self.maintenance_redeploy_status = kwargs.get('maintenance_redeploy_status', None) + self.disks = kwargs.get('disks', None) + self.extensions = kwargs.get('extensions', None) + self.vm_health = None + self.boot_diagnostics = kwargs.get('boot_diagnostics', None) + self.statuses = kwargs.get('statuses', None) + self.placement_group_id = kwargs.get('placement_group_id', None) + + +class VirtualMachineScaleSetVMProfile(Model): + """Describes a virtual machine scale set virtual machine profile. + + :param os_profile: Specifies the operating system settings for the virtual + machines in the scale set. + :type os_profile: + ~azure.mgmt.compute.v2018_10_01.models.VirtualMachineScaleSetOSProfile + :param storage_profile: Specifies the storage settings for the virtual + machine disks. + :type storage_profile: + ~azure.mgmt.compute.v2018_10_01.models.VirtualMachineScaleSetStorageProfile + :param additional_capabilities: Specifies additional capabilities enabled + or disabled on the virtual machine in the scale set. For instance: whether + the virtual machine has the capability to support attaching managed data + disks with UltraSSD_LRS storage account type. + :type additional_capabilities: + ~azure.mgmt.compute.v2018_10_01.models.AdditionalCapabilities + :param network_profile: Specifies properties of the network interfaces of + the virtual machines in the scale set. + :type network_profile: + ~azure.mgmt.compute.v2018_10_01.models.VirtualMachineScaleSetNetworkProfile + :param diagnostics_profile: Specifies the boot diagnostic settings state. +

    Minimum api-version: 2015-06-15. + :type diagnostics_profile: + ~azure.mgmt.compute.v2018_10_01.models.DiagnosticsProfile + :param extension_profile: Specifies a collection of settings for + extensions installed on virtual machines in the scale set. + :type extension_profile: + ~azure.mgmt.compute.v2018_10_01.models.VirtualMachineScaleSetExtensionProfile + :param license_type: Specifies that the image or disk that is being used + was licensed on-premises. This element is only used for images that + contain the Windows Server operating system.

    Possible values are: +

    Windows_Client

    Windows_Server

    If this element + is included in a request for an update, the value must match the initial + value. This value cannot be updated.

    For more information, see + [Azure Hybrid Use Benefit for Windows + Server](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-hybrid-use-benefit-licensing?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json) +

    Minimum api-version: 2015-06-15 + :type license_type: str + :param priority: Specifies the priority for the virtual machines in the + scale set.

    Minimum api-version: 2017-10-30-preview. Possible + values include: 'Regular', 'Low' + :type priority: str or + ~azure.mgmt.compute.v2018_10_01.models.VirtualMachinePriorityTypes + :param eviction_policy: Specifies the eviction policy for virtual machines + in a low priority scale set.

    Minimum api-version: + 2017-10-30-preview. Possible values include: 'Deallocate', 'Delete' + :type eviction_policy: str or + ~azure.mgmt.compute.v2018_10_01.models.VirtualMachineEvictionPolicyTypes + """ + + _attribute_map = { + 'os_profile': {'key': 'osProfile', 'type': 'VirtualMachineScaleSetOSProfile'}, + 'storage_profile': {'key': 'storageProfile', 'type': 'VirtualMachineScaleSetStorageProfile'}, + 'additional_capabilities': {'key': 'additionalCapabilities', 'type': 'AdditionalCapabilities'}, + 'network_profile': {'key': 'networkProfile', 'type': 'VirtualMachineScaleSetNetworkProfile'}, + 'diagnostics_profile': {'key': 'diagnosticsProfile', 'type': 'DiagnosticsProfile'}, + 'extension_profile': {'key': 'extensionProfile', 'type': 'VirtualMachineScaleSetExtensionProfile'}, + 'license_type': {'key': 'licenseType', 'type': 'str'}, + 'priority': {'key': 'priority', 'type': 'str'}, + 'eviction_policy': {'key': 'evictionPolicy', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(VirtualMachineScaleSetVMProfile, self).__init__(**kwargs) + self.os_profile = kwargs.get('os_profile', None) + self.storage_profile = kwargs.get('storage_profile', None) + self.additional_capabilities = kwargs.get('additional_capabilities', None) + self.network_profile = kwargs.get('network_profile', None) + self.diagnostics_profile = kwargs.get('diagnostics_profile', None) + self.extension_profile = kwargs.get('extension_profile', None) + self.license_type = kwargs.get('license_type', None) + self.priority = kwargs.get('priority', None) + self.eviction_policy = kwargs.get('eviction_policy', None) + + +class VirtualMachineSize(Model): + """Describes the properties of a VM size. + + :param name: The name of the virtual machine size. + :type name: str + :param number_of_cores: The number of cores supported by the virtual + machine size. + :type number_of_cores: int + :param os_disk_size_in_mb: The OS disk size, in MB, allowed by the virtual + machine size. + :type os_disk_size_in_mb: int + :param resource_disk_size_in_mb: The resource disk size, in MB, allowed by + the virtual machine size. + :type resource_disk_size_in_mb: int + :param memory_in_mb: The amount of memory, in MB, supported by the virtual + machine size. + :type memory_in_mb: int + :param max_data_disk_count: The maximum number of data disks that can be + attached to the virtual machine size. + :type max_data_disk_count: int + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'number_of_cores': {'key': 'numberOfCores', 'type': 'int'}, + 'os_disk_size_in_mb': {'key': 'osDiskSizeInMB', 'type': 'int'}, + 'resource_disk_size_in_mb': {'key': 'resourceDiskSizeInMB', 'type': 'int'}, + 'memory_in_mb': {'key': 'memoryInMB', 'type': 'int'}, + 'max_data_disk_count': {'key': 'maxDataDiskCount', 'type': 'int'}, + } + + def __init__(self, **kwargs): + super(VirtualMachineSize, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.number_of_cores = kwargs.get('number_of_cores', None) + self.os_disk_size_in_mb = kwargs.get('os_disk_size_in_mb', None) + self.resource_disk_size_in_mb = kwargs.get('resource_disk_size_in_mb', None) + self.memory_in_mb = kwargs.get('memory_in_mb', None) + self.max_data_disk_count = kwargs.get('max_data_disk_count', None) + + +class VirtualMachineStatusCodeCount(Model): + """The status code and count of the virtual machine scale set instance view + status summary. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar code: The instance view status code. + :vartype code: str + :ivar count: The number of instances having a particular status code. + :vartype count: int + """ + + _validation = { + 'code': {'readonly': True}, + 'count': {'readonly': True}, + } + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + 'count': {'key': 'count', 'type': 'int'}, + } + + def __init__(self, **kwargs): + super(VirtualMachineStatusCodeCount, self).__init__(**kwargs) + self.code = None + self.count = None + + +class VirtualMachineUpdate(UpdateResource): + """Describes a Virtual Machine Update. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :param tags: Resource tags + :type tags: dict[str, str] + :param plan: Specifies information about the marketplace image used to + create the virtual machine. This element is only used for marketplace + images. Before you can use a marketplace image from an API, you must + enable the image for programmatic use. In the Azure portal, find the + marketplace image that you want to use and then click **Want to deploy + programmatically, Get Started ->**. Enter any required information and + then click **Save**. + :type plan: ~azure.mgmt.compute.v2018_10_01.models.Plan + :param hardware_profile: Specifies the hardware settings for the virtual + machine. + :type hardware_profile: + ~azure.mgmt.compute.v2018_10_01.models.HardwareProfile + :param storage_profile: Specifies the storage settings for the virtual + machine disks. + :type storage_profile: + ~azure.mgmt.compute.v2018_10_01.models.StorageProfile + :param additional_capabilities: Specifies additional capabilities enabled + or disabled on the virtual machine. + :type additional_capabilities: + ~azure.mgmt.compute.v2018_10_01.models.AdditionalCapabilities + :param os_profile: Specifies the operating system settings for the virtual + machine. + :type os_profile: ~azure.mgmt.compute.v2018_10_01.models.OSProfile + :param network_profile: Specifies the network interfaces of the virtual + machine. + :type network_profile: + ~azure.mgmt.compute.v2018_10_01.models.NetworkProfile + :param diagnostics_profile: Specifies the boot diagnostic settings state. +

    Minimum api-version: 2015-06-15. + :type diagnostics_profile: + ~azure.mgmt.compute.v2018_10_01.models.DiagnosticsProfile + :param availability_set: Specifies information about the availability set + that the virtual machine should be assigned to. Virtual machines specified + in the same availability set are allocated to different nodes to maximize + availability. For more information about availability sets, see [Manage + the availability of virtual + machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-manage-availability?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). +

    For more information on Azure planned maintenance, see [Planned + maintenance for virtual machines in + Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-planned-maintenance?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json) +

    Currently, a VM can only be added to availability set at creation + time. An existing VM cannot be added to an availability set. + :type availability_set: ~azure.mgmt.compute.v2018_10_01.models.SubResource + :param proximity_placement_group: Specifies information about the + proximity placement group that the virtual machine should be assigned to. +

    Minimum api-version: 2018-04-01. + :type proximity_placement_group: + ~azure.mgmt.compute.v2018_10_01.models.SubResource + :ivar provisioning_state: The provisioning state, which only appears in + the response. + :vartype provisioning_state: str + :ivar instance_view: The virtual machine instance view. + :vartype instance_view: + ~azure.mgmt.compute.v2018_10_01.models.VirtualMachineInstanceView + :param license_type: Specifies that the image or disk that is being used + was licensed on-premises. This element is only used for images that + contain the Windows Server operating system.

    Possible values are: +

    Windows_Client

    Windows_Server

    If this element + is included in a request for an update, the value must match the initial + value. This value cannot be updated.

    For more information, see + [Azure Hybrid Use Benefit for Windows + Server](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-hybrid-use-benefit-licensing?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json) +

    Minimum api-version: 2015-06-15 + :type license_type: str + :ivar vm_id: Specifies the VM unique ID which is a 128-bits identifier + that is encoded and stored in all Azure IaaS VMs SMBIOS and can be read + using platform BIOS commands. + :vartype vm_id: str + :param identity: The identity of the virtual machine, if configured. + :type identity: + ~azure.mgmt.compute.v2018_10_01.models.VirtualMachineIdentity + :param zones: The virtual machine zones. + :type zones: list[str] + """ + + _validation = { + 'provisioning_state': {'readonly': True}, + 'instance_view': {'readonly': True}, + 'vm_id': {'readonly': True}, + } + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + 'plan': {'key': 'plan', 'type': 'Plan'}, + 'hardware_profile': {'key': 'properties.hardwareProfile', 'type': 'HardwareProfile'}, + 'storage_profile': {'key': 'properties.storageProfile', 'type': 'StorageProfile'}, + 'additional_capabilities': {'key': 'properties.additionalCapabilities', 'type': 'AdditionalCapabilities'}, + 'os_profile': {'key': 'properties.osProfile', 'type': 'OSProfile'}, + 'network_profile': {'key': 'properties.networkProfile', 'type': 'NetworkProfile'}, + 'diagnostics_profile': {'key': 'properties.diagnosticsProfile', 'type': 'DiagnosticsProfile'}, + 'availability_set': {'key': 'properties.availabilitySet', 'type': 'SubResource'}, + 'proximity_placement_group': {'key': 'properties.proximityPlacementGroup', 'type': 'SubResource'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'instance_view': {'key': 'properties.instanceView', 'type': 'VirtualMachineInstanceView'}, + 'license_type': {'key': 'properties.licenseType', 'type': 'str'}, + 'vm_id': {'key': 'properties.vmId', 'type': 'str'}, + 'identity': {'key': 'identity', 'type': 'VirtualMachineIdentity'}, + 'zones': {'key': 'zones', 'type': '[str]'}, + } + + def __init__(self, **kwargs): + super(VirtualMachineUpdate, self).__init__(**kwargs) + self.plan = kwargs.get('plan', None) + self.hardware_profile = kwargs.get('hardware_profile', None) + self.storage_profile = kwargs.get('storage_profile', None) + self.additional_capabilities = kwargs.get('additional_capabilities', None) + self.os_profile = kwargs.get('os_profile', None) + self.network_profile = kwargs.get('network_profile', None) + self.diagnostics_profile = kwargs.get('diagnostics_profile', None) + self.availability_set = kwargs.get('availability_set', None) + self.proximity_placement_group = kwargs.get('proximity_placement_group', None) + self.provisioning_state = None + self.instance_view = None + self.license_type = kwargs.get('license_type', None) + self.vm_id = None + self.identity = kwargs.get('identity', None) + self.zones = kwargs.get('zones', None) + + +class WindowsConfiguration(Model): + """Specifies Windows operating system settings on the virtual machine. + + :param provision_vm_agent: Indicates whether virtual machine agent should + be provisioned on the virtual machine.

    When this property is not + specified in the request body, default behavior is to set it to true. + This will ensure that VM Agent is installed on the VM so that extensions + can be added to the VM later. + :type provision_vm_agent: bool + :param enable_automatic_updates: Indicates whether virtual machine is + enabled for automatic Windows updates. Default value is true.

    For + virtual machine scale sets, this property can be updated and updates will + take effect on OS reprovisioning. + :type enable_automatic_updates: bool + :param time_zone: Specifies the time zone of the virtual machine. e.g. + "Pacific Standard Time" + :type time_zone: str + :param additional_unattend_content: Specifies additional base-64 encoded + XML formatted information that can be included in the Unattend.xml file, + which is used by Windows Setup. + :type additional_unattend_content: + list[~azure.mgmt.compute.v2018_10_01.models.AdditionalUnattendContent] + :param win_rm: Specifies the Windows Remote Management listeners. This + enables remote Windows PowerShell. + :type win_rm: ~azure.mgmt.compute.v2018_10_01.models.WinRMConfiguration + """ + + _attribute_map = { + 'provision_vm_agent': {'key': 'provisionVMAgent', 'type': 'bool'}, + 'enable_automatic_updates': {'key': 'enableAutomaticUpdates', 'type': 'bool'}, + 'time_zone': {'key': 'timeZone', 'type': 'str'}, + 'additional_unattend_content': {'key': 'additionalUnattendContent', 'type': '[AdditionalUnattendContent]'}, + 'win_rm': {'key': 'winRM', 'type': 'WinRMConfiguration'}, + } + + def __init__(self, **kwargs): + super(WindowsConfiguration, self).__init__(**kwargs) + self.provision_vm_agent = kwargs.get('provision_vm_agent', None) + self.enable_automatic_updates = kwargs.get('enable_automatic_updates', None) + self.time_zone = kwargs.get('time_zone', None) + self.additional_unattend_content = kwargs.get('additional_unattend_content', None) + self.win_rm = kwargs.get('win_rm', None) + + +class WinRMConfiguration(Model): + """Describes Windows Remote Management configuration of the VM. + + :param listeners: The list of Windows Remote Management listeners + :type listeners: + list[~azure.mgmt.compute.v2018_10_01.models.WinRMListener] + """ + + _attribute_map = { + 'listeners': {'key': 'listeners', 'type': '[WinRMListener]'}, + } + + def __init__(self, **kwargs): + super(WinRMConfiguration, self).__init__(**kwargs) + self.listeners = kwargs.get('listeners', None) + + +class WinRMListener(Model): + """Describes Protocol and thumbprint of Windows Remote Management listener. + + :param protocol: Specifies the protocol of listener.

    Possible + values are:
    **http**

    **https**. Possible values include: + 'Http', 'Https' + :type protocol: str or + ~azure.mgmt.compute.v2018_10_01.models.ProtocolTypes + :param certificate_url: This is the URL of a certificate that has been + uploaded to Key Vault as a secret. For adding a secret to the Key Vault, + see [Add a key or secret to the key + vault](https://docs.microsoft.com/azure/key-vault/key-vault-get-started/#add). + In this case, your certificate needs to be It is the Base64 encoding of + the following JSON Object which is encoded in UTF-8:

    {
    + "data":"",
    "dataType":"pfx",
    + "password":""
    } + :type certificate_url: str + """ + + _attribute_map = { + 'protocol': {'key': 'protocol', 'type': 'ProtocolTypes'}, + 'certificate_url': {'key': 'certificateUrl', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(WinRMListener, self).__init__(**kwargs) + self.protocol = kwargs.get('protocol', None) + self.certificate_url = kwargs.get('certificate_url', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/_models_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/_models_py3.py new file mode 100644 index 000000000000..827e8c97d9b0 --- /dev/null +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/_models_py3.py @@ -0,0 +1,5613 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class AdditionalCapabilities(Model): + """Enables or disables a capability on the virtual machine or virtual machine + scale set. + + :param ultra_ssd_enabled: The flag that enables or disables a capability + to have one or more managed data disks with UltraSSD_LRS storage account + type on the VM or VMSS. Managed disks with storage account type + UltraSSD_LRS can be added to a virtual machine or virtual machine scale + set only if this property is enabled. + :type ultra_ssd_enabled: bool + """ + + _attribute_map = { + 'ultra_ssd_enabled': {'key': 'ultraSSDEnabled', 'type': 'bool'}, + } + + def __init__(self, *, ultra_ssd_enabled: bool=None, **kwargs) -> None: + super(AdditionalCapabilities, self).__init__(**kwargs) + self.ultra_ssd_enabled = ultra_ssd_enabled + + +class AdditionalUnattendContent(Model): + """Specifies additional XML formatted information that can be included in the + Unattend.xml file, which is used by Windows Setup. Contents are defined by + setting name, component name, and the pass in which the content is applied. + + :param pass_name: The pass name. Currently, the only allowable value is + OobeSystem. Possible values include: 'OobeSystem' + :type pass_name: str or ~azure.mgmt.compute.v2018_10_01.models.PassNames + :param component_name: The component name. Currently, the only allowable + value is Microsoft-Windows-Shell-Setup. Possible values include: + 'Microsoft-Windows-Shell-Setup' + :type component_name: str or + ~azure.mgmt.compute.v2018_10_01.models.ComponentNames + :param setting_name: Specifies the name of the setting to which the + content applies. Possible values are: FirstLogonCommands and AutoLogon. + Possible values include: 'AutoLogon', 'FirstLogonCommands' + :type setting_name: str or + ~azure.mgmt.compute.v2018_10_01.models.SettingNames + :param content: Specifies the XML formatted content that is added to the + unattend.xml file for the specified path and component. The XML must be + less than 4KB and must include the root element for the setting or feature + that is being inserted. + :type content: str + """ + + _attribute_map = { + 'pass_name': {'key': 'passName', 'type': 'PassNames'}, + 'component_name': {'key': 'componentName', 'type': 'ComponentNames'}, + 'setting_name': {'key': 'settingName', 'type': 'SettingNames'}, + 'content': {'key': 'content', 'type': 'str'}, + } + + def __init__(self, *, pass_name=None, component_name=None, setting_name=None, content: str=None, **kwargs) -> None: + super(AdditionalUnattendContent, self).__init__(**kwargs) + self.pass_name = pass_name + self.component_name = component_name + self.setting_name = setting_name + self.content = content + + +class ApiEntityReference(Model): + """The API entity reference. + + :param id: The ARM resource id in the form of + /subscriptions/{SubscriptionId}/resourceGroups/{ResourceGroupName}/... + :type id: str + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + } + + def __init__(self, *, id: str=None, **kwargs) -> None: + super(ApiEntityReference, self).__init__(**kwargs) + self.id = id + + +class ApiError(Model): + """Api error. + + :param details: The Api error details + :type details: list[~azure.mgmt.compute.v2018_10_01.models.ApiErrorBase] + :param innererror: The Api inner error + :type innererror: ~azure.mgmt.compute.v2018_10_01.models.InnerError + :param code: The error code. + :type code: str + :param target: The target of the particular error. + :type target: str + :param message: The error message. + :type message: str + """ + + _attribute_map = { + 'details': {'key': 'details', 'type': '[ApiErrorBase]'}, + 'innererror': {'key': 'innererror', 'type': 'InnerError'}, + 'code': {'key': 'code', 'type': 'str'}, + 'target': {'key': 'target', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + } + + def __init__(self, *, details=None, innererror=None, code: str=None, target: str=None, message: str=None, **kwargs) -> None: + super(ApiError, self).__init__(**kwargs) + self.details = details + self.innererror = innererror + self.code = code + self.target = target + self.message = message + + +class ApiErrorBase(Model): + """Api error base. + + :param code: The error code. + :type code: str + :param target: The target of the particular error. + :type target: str + :param message: The error message. + :type message: str + """ + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + 'target': {'key': 'target', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + } + + def __init__(self, *, code: str=None, target: str=None, message: str=None, **kwargs) -> None: + super(ApiErrorBase, self).__init__(**kwargs) + self.code = code + self.target = target + self.message = message + + +class AutomaticOSUpgradePolicy(Model): + """The configuration parameters used for performing automatic OS upgrade. + + :param enable_automatic_os_upgrade: Indicates whether OS upgrades should + automatically be applied to scale set instances in a rolling fashion when + a newer version of the OS image becomes available. Default value is false. + If this is set to true for Windows based scale sets, recommendation is to + set + [enableAutomaticUpdates](https://docs.microsoft.com/dotnet/api/microsoft.azure.management.compute.models.windowsconfiguration.enableautomaticupdates?view=azure-dotnet) + to false. + :type enable_automatic_os_upgrade: bool + :param disable_automatic_rollback: Whether OS image rollback feature + should be disabled. Default value is false. + :type disable_automatic_rollback: bool + """ + + _attribute_map = { + 'enable_automatic_os_upgrade': {'key': 'enableAutomaticOSUpgrade', 'type': 'bool'}, + 'disable_automatic_rollback': {'key': 'disableAutomaticRollback', 'type': 'bool'}, + } + + def __init__(self, *, enable_automatic_os_upgrade: bool=None, disable_automatic_rollback: bool=None, **kwargs) -> None: + super(AutomaticOSUpgradePolicy, self).__init__(**kwargs) + self.enable_automatic_os_upgrade = enable_automatic_os_upgrade + self.disable_automatic_rollback = disable_automatic_rollback + + +class AutomaticOSUpgradeProperties(Model): + """Describes automatic OS upgrade properties on the image. + + All required parameters must be populated in order to send to Azure. + + :param automatic_os_upgrade_supported: Required. Specifies whether + automatic OS upgrade is supported on the image. + :type automatic_os_upgrade_supported: bool + """ + + _validation = { + 'automatic_os_upgrade_supported': {'required': True}, + } + + _attribute_map = { + 'automatic_os_upgrade_supported': {'key': 'automaticOSUpgradeSupported', 'type': 'bool'}, + } + + def __init__(self, *, automatic_os_upgrade_supported: bool, **kwargs) -> None: + super(AutomaticOSUpgradeProperties, self).__init__(**kwargs) + self.automatic_os_upgrade_supported = automatic_os_upgrade_supported + + +class Resource(Model): + """The Resource model definition. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource Id + :vartype id: str + :ivar name: Resource name + :vartype name: str + :ivar type: Resource type + :vartype type: str + :param location: Required. Resource location + :type location: str + :param tags: Resource tags + :type tags: dict[str, str] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__(self, *, location: str, tags=None, **kwargs) -> None: + super(Resource, self).__init__(**kwargs) + self.id = None + self.name = None + self.type = None + self.location = location + self.tags = tags + + +class AvailabilitySet(Resource): + """Specifies information about the availability set that the virtual machine + should be assigned to. Virtual machines specified in the same availability + set are allocated to different nodes to maximize availability. For more + information about availability sets, see [Manage the availability of + virtual + machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-manage-availability?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). +

    For more information on Azure planned maintenance, see [Planned + maintenance for virtual machines in + Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-planned-maintenance?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json) +

    Currently, a VM can only be added to availability set at creation + time. An existing VM cannot be added to an availability set. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource Id + :vartype id: str + :ivar name: Resource name + :vartype name: str + :ivar type: Resource type + :vartype type: str + :param location: Required. Resource location + :type location: str + :param tags: Resource tags + :type tags: dict[str, str] + :param platform_update_domain_count: Update Domain count. + :type platform_update_domain_count: int + :param platform_fault_domain_count: Fault Domain count. + :type platform_fault_domain_count: int + :param virtual_machines: A list of references to all virtual machines in + the availability set. + :type virtual_machines: + list[~azure.mgmt.compute.v2018_10_01.models.SubResource] + :param proximity_placement_group: Specifies information about the + proximity placement group that the availability set should be assigned to. +

    Minimum api-version: 2018-04-01. + :type proximity_placement_group: + ~azure.mgmt.compute.v2018_10_01.models.SubResource + :ivar statuses: The resource status information. + :vartype statuses: + list[~azure.mgmt.compute.v2018_10_01.models.InstanceViewStatus] + :param sku: Sku of the availability set, only name is required to be set. + See AvailabilitySetSkuTypes for possible set of values. Use 'Aligned' for + virtual machines with managed disks and 'Classic' for virtual machines + with unmanaged disks. Default value is 'Classic'. + :type sku: ~azure.mgmt.compute.v2018_10_01.models.Sku + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + 'statuses': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'platform_update_domain_count': {'key': 'properties.platformUpdateDomainCount', 'type': 'int'}, + 'platform_fault_domain_count': {'key': 'properties.platformFaultDomainCount', 'type': 'int'}, + 'virtual_machines': {'key': 'properties.virtualMachines', 'type': '[SubResource]'}, + 'proximity_placement_group': {'key': 'properties.proximityPlacementGroup', 'type': 'SubResource'}, + 'statuses': {'key': 'properties.statuses', 'type': '[InstanceViewStatus]'}, + 'sku': {'key': 'sku', 'type': 'Sku'}, + } + + def __init__(self, *, location: str, tags=None, platform_update_domain_count: int=None, platform_fault_domain_count: int=None, virtual_machines=None, proximity_placement_group=None, sku=None, **kwargs) -> None: + super(AvailabilitySet, self).__init__(location=location, tags=tags, **kwargs) + self.platform_update_domain_count = platform_update_domain_count + self.platform_fault_domain_count = platform_fault_domain_count + self.virtual_machines = virtual_machines + self.proximity_placement_group = proximity_placement_group + self.statuses = None + self.sku = sku + + +class UpdateResource(Model): + """The Update Resource model definition. + + :param tags: Resource tags + :type tags: dict[str, str] + """ + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__(self, *, tags=None, **kwargs) -> None: + super(UpdateResource, self).__init__(**kwargs) + self.tags = tags + + +class AvailabilitySetUpdate(UpdateResource): + """Specifies information about the availability set that the virtual machine + should be assigned to. Only tags may be updated. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :param tags: Resource tags + :type tags: dict[str, str] + :param platform_update_domain_count: Update Domain count. + :type platform_update_domain_count: int + :param platform_fault_domain_count: Fault Domain count. + :type platform_fault_domain_count: int + :param virtual_machines: A list of references to all virtual machines in + the availability set. + :type virtual_machines: + list[~azure.mgmt.compute.v2018_10_01.models.SubResource] + :param proximity_placement_group: Specifies information about the + proximity placement group that the availability set should be assigned to. +

    Minimum api-version: 2018-04-01. + :type proximity_placement_group: + ~azure.mgmt.compute.v2018_10_01.models.SubResource + :ivar statuses: The resource status information. + :vartype statuses: + list[~azure.mgmt.compute.v2018_10_01.models.InstanceViewStatus] + :param sku: Sku of the availability set + :type sku: ~azure.mgmt.compute.v2018_10_01.models.Sku + """ + + _validation = { + 'statuses': {'readonly': True}, + } + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + 'platform_update_domain_count': {'key': 'properties.platformUpdateDomainCount', 'type': 'int'}, + 'platform_fault_domain_count': {'key': 'properties.platformFaultDomainCount', 'type': 'int'}, + 'virtual_machines': {'key': 'properties.virtualMachines', 'type': '[SubResource]'}, + 'proximity_placement_group': {'key': 'properties.proximityPlacementGroup', 'type': 'SubResource'}, + 'statuses': {'key': 'properties.statuses', 'type': '[InstanceViewStatus]'}, + 'sku': {'key': 'sku', 'type': 'Sku'}, + } + + def __init__(self, *, tags=None, platform_update_domain_count: int=None, platform_fault_domain_count: int=None, virtual_machines=None, proximity_placement_group=None, sku=None, **kwargs) -> None: + super(AvailabilitySetUpdate, self).__init__(tags=tags, **kwargs) + self.platform_update_domain_count = platform_update_domain_count + self.platform_fault_domain_count = platform_fault_domain_count + self.virtual_machines = virtual_machines + self.proximity_placement_group = proximity_placement_group + self.statuses = None + self.sku = sku + + +class BootDiagnostics(Model): + """Boot Diagnostics is a debugging feature which allows you to view Console + Output and Screenshot to diagnose VM status.

    You can easily view + the output of your console log.

    Azure also enables you to see a + screenshot of the VM from the hypervisor. + + :param enabled: Whether boot diagnostics should be enabled on the Virtual + Machine. + :type enabled: bool + :param storage_uri: Uri of the storage account to use for placing the + console output and screenshot. + :type storage_uri: str + """ + + _attribute_map = { + 'enabled': {'key': 'enabled', 'type': 'bool'}, + 'storage_uri': {'key': 'storageUri', 'type': 'str'}, + } + + def __init__(self, *, enabled: bool=None, storage_uri: str=None, **kwargs) -> None: + super(BootDiagnostics, self).__init__(**kwargs) + self.enabled = enabled + self.storage_uri = storage_uri + + +class BootDiagnosticsInstanceView(Model): + """The instance view of a virtual machine boot diagnostics. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar console_screenshot_blob_uri: The console screenshot blob URI. + :vartype console_screenshot_blob_uri: str + :ivar serial_console_log_blob_uri: The Linux serial console log blob Uri. + :vartype serial_console_log_blob_uri: str + :ivar status: The boot diagnostics status information for the VM.

    + NOTE: It will be set only if there are errors encountered in enabling boot + diagnostics. + :vartype status: ~azure.mgmt.compute.v2018_10_01.models.InstanceViewStatus + """ + + _validation = { + 'console_screenshot_blob_uri': {'readonly': True}, + 'serial_console_log_blob_uri': {'readonly': True}, + 'status': {'readonly': True}, + } + + _attribute_map = { + 'console_screenshot_blob_uri': {'key': 'consoleScreenshotBlobUri', 'type': 'str'}, + 'serial_console_log_blob_uri': {'key': 'serialConsoleLogBlobUri', 'type': 'str'}, + 'status': {'key': 'status', 'type': 'InstanceViewStatus'}, + } + + def __init__(self, **kwargs) -> None: + super(BootDiagnosticsInstanceView, self).__init__(**kwargs) + self.console_screenshot_blob_uri = None + self.serial_console_log_blob_uri = None + self.status = None + + +class CloudError(Model): + """CloudError. + """ + + _attribute_map = { + } + + +class ComputeOperationValue(Model): + """Describes the properties of a Compute Operation value. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar origin: The origin of the compute operation. + :vartype origin: str + :ivar name: The name of the compute operation. + :vartype name: str + :ivar operation: The display name of the compute operation. + :vartype operation: str + :ivar resource: The display name of the resource the operation applies to. + :vartype resource: str + :ivar description: The description of the operation. + :vartype description: str + :ivar provider: The resource provider for the operation. + :vartype provider: str + """ + + _validation = { + 'origin': {'readonly': True}, + 'name': {'readonly': True}, + 'operation': {'readonly': True}, + 'resource': {'readonly': True}, + 'description': {'readonly': True}, + 'provider': {'readonly': True}, + } + + _attribute_map = { + 'origin': {'key': 'origin', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'operation': {'key': 'display.operation', 'type': 'str'}, + 'resource': {'key': 'display.resource', 'type': 'str'}, + 'description': {'key': 'display.description', 'type': 'str'}, + 'provider': {'key': 'display.provider', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(ComputeOperationValue, self).__init__(**kwargs) + self.origin = None + self.name = None + self.operation = None + self.resource = None + self.description = None + self.provider = None + + +class DataDisk(Model): + """Describes a data disk. + + All required parameters must be populated in order to send to Azure. + + :param lun: Required. Specifies the logical unit number of the data disk. + This value is used to identify data disks within the VM and therefore must + be unique for each data disk attached to a VM. + :type lun: int + :param name: The disk name. + :type name: str + :param vhd: The virtual hard disk. + :type vhd: ~azure.mgmt.compute.v2018_10_01.models.VirtualHardDisk + :param image: The source user image virtual hard disk. The virtual hard + disk will be copied before being attached to the virtual machine. If + SourceImage is provided, the destination virtual hard drive must not + exist. + :type image: ~azure.mgmt.compute.v2018_10_01.models.VirtualHardDisk + :param caching: Specifies the caching requirements.

    Possible + values are:

    **None**

    **ReadOnly**

    **ReadWrite** +

    Default: **None for Standard storage. ReadOnly for Premium + storage**. Possible values include: 'None', 'ReadOnly', 'ReadWrite' + :type caching: str or ~azure.mgmt.compute.v2018_10_01.models.CachingTypes + :param write_accelerator_enabled: Specifies whether writeAccelerator + should be enabled or disabled on the disk. + :type write_accelerator_enabled: bool + :param create_option: Required. Specifies how the virtual machine should + be created.

    Possible values are:

    **Attach** \\u2013 This + value is used when you are using a specialized disk to create the virtual + machine.

    **FromImage** \\u2013 This value is used when you are + using an image to create the virtual machine. If you are using a platform + image, you also use the imageReference element described above. If you are + using a marketplace image, you also use the plan element previously + described. Possible values include: 'FromImage', 'Empty', 'Attach' + :type create_option: str or + ~azure.mgmt.compute.v2018_10_01.models.DiskCreateOptionTypes + :param disk_size_gb: Specifies the size of an empty data disk in + gigabytes. This element can be used to overwrite the size of the disk in a + virtual machine image.

    This value cannot be larger than 1023 GB + :type disk_size_gb: int + :param managed_disk: The managed disk parameters. + :type managed_disk: + ~azure.mgmt.compute.v2018_10_01.models.ManagedDiskParameters + """ + + _validation = { + 'lun': {'required': True}, + 'create_option': {'required': True}, + } + + _attribute_map = { + 'lun': {'key': 'lun', 'type': 'int'}, + 'name': {'key': 'name', 'type': 'str'}, + 'vhd': {'key': 'vhd', 'type': 'VirtualHardDisk'}, + 'image': {'key': 'image', 'type': 'VirtualHardDisk'}, + 'caching': {'key': 'caching', 'type': 'CachingTypes'}, + 'write_accelerator_enabled': {'key': 'writeAcceleratorEnabled', 'type': 'bool'}, + 'create_option': {'key': 'createOption', 'type': 'str'}, + 'disk_size_gb': {'key': 'diskSizeGB', 'type': 'int'}, + 'managed_disk': {'key': 'managedDisk', 'type': 'ManagedDiskParameters'}, + } + + def __init__(self, *, lun: int, create_option, name: str=None, vhd=None, image=None, caching=None, write_accelerator_enabled: bool=None, disk_size_gb: int=None, managed_disk=None, **kwargs) -> None: + super(DataDisk, self).__init__(**kwargs) + self.lun = lun + self.name = name + self.vhd = vhd + self.image = image + self.caching = caching + self.write_accelerator_enabled = write_accelerator_enabled + self.create_option = create_option + self.disk_size_gb = disk_size_gb + self.managed_disk = managed_disk + + +class DataDiskImage(Model): + """Contains the data disk images information. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar lun: Specifies the logical unit number of the data disk. This value + is used to identify data disks within the VM and therefore must be unique + for each data disk attached to a VM. + :vartype lun: int + """ + + _validation = { + 'lun': {'readonly': True}, + } + + _attribute_map = { + 'lun': {'key': 'lun', 'type': 'int'}, + } + + def __init__(self, **kwargs) -> None: + super(DataDiskImage, self).__init__(**kwargs) + self.lun = None + + +class DiagnosticsProfile(Model): + """Specifies the boot diagnostic settings state.

    Minimum api-version: + 2015-06-15. + + :param boot_diagnostics: Boot Diagnostics is a debugging feature which + allows you to view Console Output and Screenshot to diagnose VM status. +

    You can easily view the output of your console log.

    + Azure also enables you to see a screenshot of the VM from the hypervisor. + :type boot_diagnostics: + ~azure.mgmt.compute.v2018_10_01.models.BootDiagnostics + """ + + _attribute_map = { + 'boot_diagnostics': {'key': 'bootDiagnostics', 'type': 'BootDiagnostics'}, + } + + def __init__(self, *, boot_diagnostics=None, **kwargs) -> None: + super(DiagnosticsProfile, self).__init__(**kwargs) + self.boot_diagnostics = boot_diagnostics + + +class DiffDiskSettings(Model): + """Describes the parameters of ephemeral disk settings that can be specified + for operating system disk.

    NOTE: The ephemeral disk settings can + only be specified for managed disk. + + :param option: Specifies the ephemeral disk settings for operating system + disk. Possible values include: 'Local' + :type option: str or + ~azure.mgmt.compute.v2018_10_01.models.DiffDiskOptions + """ + + _attribute_map = { + 'option': {'key': 'option', 'type': 'str'}, + } + + def __init__(self, *, option=None, **kwargs) -> None: + super(DiffDiskSettings, self).__init__(**kwargs) + self.option = option + + +class DiskEncryptionSettings(Model): + """Describes a Encryption Settings for a Disk. + + :param disk_encryption_key: Specifies the location of the disk encryption + key, which is a Key Vault Secret. + :type disk_encryption_key: + ~azure.mgmt.compute.v2018_10_01.models.KeyVaultSecretReference + :param key_encryption_key: Specifies the location of the key encryption + key in Key Vault. + :type key_encryption_key: + ~azure.mgmt.compute.v2018_10_01.models.KeyVaultKeyReference + :param enabled: Specifies whether disk encryption should be enabled on the + virtual machine. + :type enabled: bool + """ + + _attribute_map = { + 'disk_encryption_key': {'key': 'diskEncryptionKey', 'type': 'KeyVaultSecretReference'}, + 'key_encryption_key': {'key': 'keyEncryptionKey', 'type': 'KeyVaultKeyReference'}, + 'enabled': {'key': 'enabled', 'type': 'bool'}, + } + + def __init__(self, *, disk_encryption_key=None, key_encryption_key=None, enabled: bool=None, **kwargs) -> None: + super(DiskEncryptionSettings, self).__init__(**kwargs) + self.disk_encryption_key = disk_encryption_key + self.key_encryption_key = key_encryption_key + self.enabled = enabled + + +class DiskInstanceView(Model): + """The instance view of the disk. + + :param name: The disk name. + :type name: str + :param encryption_settings: Specifies the encryption settings for the OS + Disk.

    Minimum api-version: 2015-06-15 + :type encryption_settings: + list[~azure.mgmt.compute.v2018_10_01.models.DiskEncryptionSettings] + :param statuses: The resource status information. + :type statuses: + list[~azure.mgmt.compute.v2018_10_01.models.InstanceViewStatus] + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'encryption_settings': {'key': 'encryptionSettings', 'type': '[DiskEncryptionSettings]'}, + 'statuses': {'key': 'statuses', 'type': '[InstanceViewStatus]'}, + } + + def __init__(self, *, name: str=None, encryption_settings=None, statuses=None, **kwargs) -> None: + super(DiskInstanceView, self).__init__(**kwargs) + self.name = name + self.encryption_settings = encryption_settings + self.statuses = statuses + + +class HardwareProfile(Model): + """Specifies the hardware settings for the virtual machine. + + :param vm_size: Specifies the size of the virtual machine. For more + information about virtual machine sizes, see [Sizes for virtual + machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-sizes?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). +

    The available VM sizes depend on region and availability set. For + a list of available sizes use these APIs:

    [List all available + virtual machine sizes in an availability + set](https://docs.microsoft.com/rest/api/compute/availabilitysets/listavailablesizes) +

    [List all available virtual machine sizes in a + region](https://docs.microsoft.com/rest/api/compute/virtualmachinesizes/list) +

    [List all available virtual machine sizes for + resizing](https://docs.microsoft.com/rest/api/compute/virtualmachines/listavailablesizes). + Possible values include: 'Basic_A0', 'Basic_A1', 'Basic_A2', 'Basic_A3', + 'Basic_A4', 'Standard_A0', 'Standard_A1', 'Standard_A2', 'Standard_A3', + 'Standard_A4', 'Standard_A5', 'Standard_A6', 'Standard_A7', 'Standard_A8', + 'Standard_A9', 'Standard_A10', 'Standard_A11', 'Standard_A1_v2', + 'Standard_A2_v2', 'Standard_A4_v2', 'Standard_A8_v2', 'Standard_A2m_v2', + 'Standard_A4m_v2', 'Standard_A8m_v2', 'Standard_B1s', 'Standard_B1ms', + 'Standard_B2s', 'Standard_B2ms', 'Standard_B4ms', 'Standard_B8ms', + 'Standard_D1', 'Standard_D2', 'Standard_D3', 'Standard_D4', + 'Standard_D11', 'Standard_D12', 'Standard_D13', 'Standard_D14', + 'Standard_D1_v2', 'Standard_D2_v2', 'Standard_D3_v2', 'Standard_D4_v2', + 'Standard_D5_v2', 'Standard_D2_v3', 'Standard_D4_v3', 'Standard_D8_v3', + 'Standard_D16_v3', 'Standard_D32_v3', 'Standard_D64_v3', + 'Standard_D2s_v3', 'Standard_D4s_v3', 'Standard_D8s_v3', + 'Standard_D16s_v3', 'Standard_D32s_v3', 'Standard_D64s_v3', + 'Standard_D11_v2', 'Standard_D12_v2', 'Standard_D13_v2', + 'Standard_D14_v2', 'Standard_D15_v2', 'Standard_DS1', 'Standard_DS2', + 'Standard_DS3', 'Standard_DS4', 'Standard_DS11', 'Standard_DS12', + 'Standard_DS13', 'Standard_DS14', 'Standard_DS1_v2', 'Standard_DS2_v2', + 'Standard_DS3_v2', 'Standard_DS4_v2', 'Standard_DS5_v2', + 'Standard_DS11_v2', 'Standard_DS12_v2', 'Standard_DS13_v2', + 'Standard_DS14_v2', 'Standard_DS15_v2', 'Standard_DS13-4_v2', + 'Standard_DS13-2_v2', 'Standard_DS14-8_v2', 'Standard_DS14-4_v2', + 'Standard_E2_v3', 'Standard_E4_v3', 'Standard_E8_v3', 'Standard_E16_v3', + 'Standard_E32_v3', 'Standard_E64_v3', 'Standard_E2s_v3', + 'Standard_E4s_v3', 'Standard_E8s_v3', 'Standard_E16s_v3', + 'Standard_E32s_v3', 'Standard_E64s_v3', 'Standard_E32-16_v3', + 'Standard_E32-8s_v3', 'Standard_E64-32s_v3', 'Standard_E64-16s_v3', + 'Standard_F1', 'Standard_F2', 'Standard_F4', 'Standard_F8', + 'Standard_F16', 'Standard_F1s', 'Standard_F2s', 'Standard_F4s', + 'Standard_F8s', 'Standard_F16s', 'Standard_F2s_v2', 'Standard_F4s_v2', + 'Standard_F8s_v2', 'Standard_F16s_v2', 'Standard_F32s_v2', + 'Standard_F64s_v2', 'Standard_F72s_v2', 'Standard_G1', 'Standard_G2', + 'Standard_G3', 'Standard_G4', 'Standard_G5', 'Standard_GS1', + 'Standard_GS2', 'Standard_GS3', 'Standard_GS4', 'Standard_GS5', + 'Standard_GS4-8', 'Standard_GS4-4', 'Standard_GS5-16', 'Standard_GS5-8', + 'Standard_H8', 'Standard_H16', 'Standard_H8m', 'Standard_H16m', + 'Standard_H16r', 'Standard_H16mr', 'Standard_L4s', 'Standard_L8s', + 'Standard_L16s', 'Standard_L32s', 'Standard_M64s', 'Standard_M64ms', + 'Standard_M128s', 'Standard_M128ms', 'Standard_M64-32ms', + 'Standard_M64-16ms', 'Standard_M128-64ms', 'Standard_M128-32ms', + 'Standard_NC6', 'Standard_NC12', 'Standard_NC24', 'Standard_NC24r', + 'Standard_NC6s_v2', 'Standard_NC12s_v2', 'Standard_NC24s_v2', + 'Standard_NC24rs_v2', 'Standard_NC6s_v3', 'Standard_NC12s_v3', + 'Standard_NC24s_v3', 'Standard_NC24rs_v3', 'Standard_ND6s', + 'Standard_ND12s', 'Standard_ND24s', 'Standard_ND24rs', 'Standard_NV6', + 'Standard_NV12', 'Standard_NV24' + :type vm_size: str or + ~azure.mgmt.compute.v2018_10_01.models.VirtualMachineSizeTypes + """ + + _attribute_map = { + 'vm_size': {'key': 'vmSize', 'type': 'str'}, + } + + def __init__(self, *, vm_size=None, **kwargs) -> None: + super(HardwareProfile, self).__init__(**kwargs) + self.vm_size = vm_size + + +class Image(Resource): + """The source user image virtual hard disk. The virtual hard disk will be + copied before being attached to the virtual machine. If SourceImage is + provided, the destination virtual hard drive must not exist. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource Id + :vartype id: str + :ivar name: Resource name + :vartype name: str + :ivar type: Resource type + :vartype type: str + :param location: Required. Resource location + :type location: str + :param tags: Resource tags + :type tags: dict[str, str] + :param source_virtual_machine: The source virtual machine from which Image + is created. + :type source_virtual_machine: + ~azure.mgmt.compute.v2018_10_01.models.SubResource + :param storage_profile: Specifies the storage settings for the virtual + machine disks. + :type storage_profile: + ~azure.mgmt.compute.v2018_10_01.models.ImageStorageProfile + :ivar provisioning_state: The provisioning state. + :vartype provisioning_state: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'source_virtual_machine': {'key': 'properties.sourceVirtualMachine', 'type': 'SubResource'}, + 'storage_profile': {'key': 'properties.storageProfile', 'type': 'ImageStorageProfile'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + } + + def __init__(self, *, location: str, tags=None, source_virtual_machine=None, storage_profile=None, **kwargs) -> None: + super(Image, self).__init__(location=location, tags=tags, **kwargs) + self.source_virtual_machine = source_virtual_machine + self.storage_profile = storage_profile + self.provisioning_state = None + + +class ImageDataDisk(Model): + """Describes a data disk. + + All required parameters must be populated in order to send to Azure. + + :param lun: Required. Specifies the logical unit number of the data disk. + This value is used to identify data disks within the VM and therefore must + be unique for each data disk attached to a VM. + :type lun: int + :param snapshot: The snapshot. + :type snapshot: ~azure.mgmt.compute.v2018_10_01.models.SubResource + :param managed_disk: The managedDisk. + :type managed_disk: ~azure.mgmt.compute.v2018_10_01.models.SubResource + :param blob_uri: The Virtual Hard Disk. + :type blob_uri: str + :param caching: Specifies the caching requirements.

    Possible + values are:

    **None**

    **ReadOnly**

    **ReadWrite** +

    Default: **None for Standard storage. ReadOnly for Premium + storage**. Possible values include: 'None', 'ReadOnly', 'ReadWrite' + :type caching: str or ~azure.mgmt.compute.v2018_10_01.models.CachingTypes + :param disk_size_gb: Specifies the size of empty data disks in gigabytes. + This element can be used to overwrite the name of the disk in a virtual + machine image.

    This value cannot be larger than 1023 GB + :type disk_size_gb: int + :param storage_account_type: Specifies the storage account type for the + managed disk. NOTE: UltraSSD_LRS can only be used with data disks, it + cannot be used with OS Disk. Possible values include: 'Standard_LRS', + 'Premium_LRS', 'StandardSSD_LRS', 'UltraSSD_LRS' + :type storage_account_type: str or + ~azure.mgmt.compute.v2018_10_01.models.StorageAccountTypes + """ + + _validation = { + 'lun': {'required': True}, + } + + _attribute_map = { + 'lun': {'key': 'lun', 'type': 'int'}, + 'snapshot': {'key': 'snapshot', 'type': 'SubResource'}, + 'managed_disk': {'key': 'managedDisk', 'type': 'SubResource'}, + 'blob_uri': {'key': 'blobUri', 'type': 'str'}, + 'caching': {'key': 'caching', 'type': 'CachingTypes'}, + 'disk_size_gb': {'key': 'diskSizeGB', 'type': 'int'}, + 'storage_account_type': {'key': 'storageAccountType', 'type': 'str'}, + } + + def __init__(self, *, lun: int, snapshot=None, managed_disk=None, blob_uri: str=None, caching=None, disk_size_gb: int=None, storage_account_type=None, **kwargs) -> None: + super(ImageDataDisk, self).__init__(**kwargs) + self.lun = lun + self.snapshot = snapshot + self.managed_disk = managed_disk + self.blob_uri = blob_uri + self.caching = caching + self.disk_size_gb = disk_size_gb + self.storage_account_type = storage_account_type + + +class ImageOSDisk(Model): + """Describes an Operating System disk. + + All required parameters must be populated in order to send to Azure. + + :param os_type: Required. This property allows you to specify the type of + the OS that is included in the disk if creating a VM from a custom image. +

    Possible values are:

    **Windows**

    **Linux**. + Possible values include: 'Windows', 'Linux' + :type os_type: str or + ~azure.mgmt.compute.v2018_10_01.models.OperatingSystemTypes + :param os_state: Required. The OS State. Possible values include: + 'Generalized', 'Specialized' + :type os_state: str or + ~azure.mgmt.compute.v2018_10_01.models.OperatingSystemStateTypes + :param snapshot: The snapshot. + :type snapshot: ~azure.mgmt.compute.v2018_10_01.models.SubResource + :param managed_disk: The managedDisk. + :type managed_disk: ~azure.mgmt.compute.v2018_10_01.models.SubResource + :param blob_uri: The Virtual Hard Disk. + :type blob_uri: str + :param caching: Specifies the caching requirements.

    Possible + values are:

    **None**

    **ReadOnly**

    **ReadWrite** +

    Default: **None for Standard storage. ReadOnly for Premium + storage**. Possible values include: 'None', 'ReadOnly', 'ReadWrite' + :type caching: str or ~azure.mgmt.compute.v2018_10_01.models.CachingTypes + :param disk_size_gb: Specifies the size of empty data disks in gigabytes. + This element can be used to overwrite the name of the disk in a virtual + machine image.

    This value cannot be larger than 1023 GB + :type disk_size_gb: int + :param storage_account_type: Specifies the storage account type for the + managed disk. UltraSSD_LRS cannot be used with OS Disk. Possible values + include: 'Standard_LRS', 'Premium_LRS', 'StandardSSD_LRS', 'UltraSSD_LRS' + :type storage_account_type: str or + ~azure.mgmt.compute.v2018_10_01.models.StorageAccountTypes + """ + + _validation = { + 'os_type': {'required': True}, + 'os_state': {'required': True}, + } + + _attribute_map = { + 'os_type': {'key': 'osType', 'type': 'OperatingSystemTypes'}, + 'os_state': {'key': 'osState', 'type': 'OperatingSystemStateTypes'}, + 'snapshot': {'key': 'snapshot', 'type': 'SubResource'}, + 'managed_disk': {'key': 'managedDisk', 'type': 'SubResource'}, + 'blob_uri': {'key': 'blobUri', 'type': 'str'}, + 'caching': {'key': 'caching', 'type': 'CachingTypes'}, + 'disk_size_gb': {'key': 'diskSizeGB', 'type': 'int'}, + 'storage_account_type': {'key': 'storageAccountType', 'type': 'str'}, + } + + def __init__(self, *, os_type, os_state, snapshot=None, managed_disk=None, blob_uri: str=None, caching=None, disk_size_gb: int=None, storage_account_type=None, **kwargs) -> None: + super(ImageOSDisk, self).__init__(**kwargs) + self.os_type = os_type + self.os_state = os_state + self.snapshot = snapshot + self.managed_disk = managed_disk + self.blob_uri = blob_uri + self.caching = caching + self.disk_size_gb = disk_size_gb + self.storage_account_type = storage_account_type + + +class SubResource(Model): + """SubResource. + + :param id: Resource Id + :type id: str + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + } + + def __init__(self, *, id: str=None, **kwargs) -> None: + super(SubResource, self).__init__(**kwargs) + self.id = id + + +class ImageReference(SubResource): + """Specifies information about the image to use. You can specify information + about platform images, marketplace images, or virtual machine images. This + element is required when you want to use a platform image, marketplace + image, or virtual machine image, but is not used in other creation + operations. + + :param id: Resource Id + :type id: str + :param publisher: The image publisher. + :type publisher: str + :param offer: Specifies the offer of the platform image or marketplace + image used to create the virtual machine. + :type offer: str + :param sku: The image SKU. + :type sku: str + :param version: Specifies the version of the platform image or marketplace + image used to create the virtual machine. The allowed formats are + Major.Minor.Build or 'latest'. Major, Minor, and Build are decimal + numbers. Specify 'latest' to use the latest version of an image available + at deploy time. Even if you use 'latest', the VM image will not + automatically update after deploy time even if a new version becomes + available. + :type version: str + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'publisher': {'key': 'publisher', 'type': 'str'}, + 'offer': {'key': 'offer', 'type': 'str'}, + 'sku': {'key': 'sku', 'type': 'str'}, + 'version': {'key': 'version', 'type': 'str'}, + } + + def __init__(self, *, id: str=None, publisher: str=None, offer: str=None, sku: str=None, version: str=None, **kwargs) -> None: + super(ImageReference, self).__init__(id=id, **kwargs) + self.publisher = publisher + self.offer = offer + self.sku = sku + self.version = version + + +class ImageStorageProfile(Model): + """Describes a storage profile. + + :param os_disk: Specifies information about the operating system disk used + by the virtual machine.

    For more information about disks, see + [About disks and VHDs for Azure virtual + machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-about-disks-vhds?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). + :type os_disk: ~azure.mgmt.compute.v2018_10_01.models.ImageOSDisk + :param data_disks: Specifies the parameters that are used to add a data + disk to a virtual machine.

    For more information about disks, see + [About disks and VHDs for Azure virtual + machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-about-disks-vhds?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). + :type data_disks: + list[~azure.mgmt.compute.v2018_10_01.models.ImageDataDisk] + :param zone_resilient: Specifies whether an image is zone resilient or + not. Default is false. Zone resilient images can be created only in + regions that provide Zone Redundant Storage (ZRS). + :type zone_resilient: bool + """ + + _attribute_map = { + 'os_disk': {'key': 'osDisk', 'type': 'ImageOSDisk'}, + 'data_disks': {'key': 'dataDisks', 'type': '[ImageDataDisk]'}, + 'zone_resilient': {'key': 'zoneResilient', 'type': 'bool'}, + } + + def __init__(self, *, os_disk=None, data_disks=None, zone_resilient: bool=None, **kwargs) -> None: + super(ImageStorageProfile, self).__init__(**kwargs) + self.os_disk = os_disk + self.data_disks = data_disks + self.zone_resilient = zone_resilient + + +class ImageUpdate(UpdateResource): + """The source user image virtual hard disk. Only tags may be updated. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :param tags: Resource tags + :type tags: dict[str, str] + :param source_virtual_machine: The source virtual machine from which Image + is created. + :type source_virtual_machine: + ~azure.mgmt.compute.v2018_10_01.models.SubResource + :param storage_profile: Specifies the storage settings for the virtual + machine disks. + :type storage_profile: + ~azure.mgmt.compute.v2018_10_01.models.ImageStorageProfile + :ivar provisioning_state: The provisioning state. + :vartype provisioning_state: str + """ + + _validation = { + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + 'source_virtual_machine': {'key': 'properties.sourceVirtualMachine', 'type': 'SubResource'}, + 'storage_profile': {'key': 'properties.storageProfile', 'type': 'ImageStorageProfile'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + } + + def __init__(self, *, tags=None, source_virtual_machine=None, storage_profile=None, **kwargs) -> None: + super(ImageUpdate, self).__init__(tags=tags, **kwargs) + self.source_virtual_machine = source_virtual_machine + self.storage_profile = storage_profile + self.provisioning_state = None + + +class InnerError(Model): + """Inner error details. + + :param exceptiontype: The exception type. + :type exceptiontype: str + :param errordetail: The internal error message or exception dump. + :type errordetail: str + """ + + _attribute_map = { + 'exceptiontype': {'key': 'exceptiontype', 'type': 'str'}, + 'errordetail': {'key': 'errordetail', 'type': 'str'}, + } + + def __init__(self, *, exceptiontype: str=None, errordetail: str=None, **kwargs) -> None: + super(InnerError, self).__init__(**kwargs) + self.exceptiontype = exceptiontype + self.errordetail = errordetail + + +class InstanceViewStatus(Model): + """Instance view status. + + :param code: The status code. + :type code: str + :param level: The level code. Possible values include: 'Info', 'Warning', + 'Error' + :type level: str or + ~azure.mgmt.compute.v2018_10_01.models.StatusLevelTypes + :param display_status: The short localizable label for the status. + :type display_status: str + :param message: The detailed status message, including for alerts and + error messages. + :type message: str + :param time: The time of the status. + :type time: datetime + """ + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + 'level': {'key': 'level', 'type': 'StatusLevelTypes'}, + 'display_status': {'key': 'displayStatus', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + 'time': {'key': 'time', 'type': 'iso-8601'}, + } + + def __init__(self, *, code: str=None, level=None, display_status: str=None, message: str=None, time=None, **kwargs) -> None: + super(InstanceViewStatus, self).__init__(**kwargs) + self.code = code + self.level = level + self.display_status = display_status + self.message = message + self.time = time + + +class KeyVaultKeyReference(Model): + """Describes a reference to Key Vault Key. + + All required parameters must be populated in order to send to Azure. + + :param key_url: Required. The URL referencing a key encryption key in Key + Vault. + :type key_url: str + :param source_vault: Required. The relative URL of the Key Vault + containing the key. + :type source_vault: ~azure.mgmt.compute.v2018_10_01.models.SubResource + """ + + _validation = { + 'key_url': {'required': True}, + 'source_vault': {'required': True}, + } + + _attribute_map = { + 'key_url': {'key': 'keyUrl', 'type': 'str'}, + 'source_vault': {'key': 'sourceVault', 'type': 'SubResource'}, + } + + def __init__(self, *, key_url: str, source_vault, **kwargs) -> None: + super(KeyVaultKeyReference, self).__init__(**kwargs) + self.key_url = key_url + self.source_vault = source_vault + + +class KeyVaultSecretReference(Model): + """Describes a reference to Key Vault Secret. + + All required parameters must be populated in order to send to Azure. + + :param secret_url: Required. The URL referencing a secret in a Key Vault. + :type secret_url: str + :param source_vault: Required. The relative URL of the Key Vault + containing the secret. + :type source_vault: ~azure.mgmt.compute.v2018_10_01.models.SubResource + """ + + _validation = { + 'secret_url': {'required': True}, + 'source_vault': {'required': True}, + } + + _attribute_map = { + 'secret_url': {'key': 'secretUrl', 'type': 'str'}, + 'source_vault': {'key': 'sourceVault', 'type': 'SubResource'}, + } + + def __init__(self, *, secret_url: str, source_vault, **kwargs) -> None: + super(KeyVaultSecretReference, self).__init__(**kwargs) + self.secret_url = secret_url + self.source_vault = source_vault + + +class LinuxConfiguration(Model): + """Specifies the Linux operating system settings on the virtual machine. +

    For a list of supported Linux distributions, see [Linux on + Azure-Endorsed + Distributions](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-endorsed-distros?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json) +

    For running non-endorsed distributions, see [Information for + Non-Endorsed + Distributions](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-create-upload-generic?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json). + + :param disable_password_authentication: Specifies whether password + authentication should be disabled. + :type disable_password_authentication: bool + :param ssh: Specifies the ssh key configuration for a Linux OS. + :type ssh: ~azure.mgmt.compute.v2018_10_01.models.SshConfiguration + :param provision_vm_agent: Indicates whether virtual machine agent should + be provisioned on the virtual machine.

    When this property is not + specified in the request body, default behavior is to set it to true. + This will ensure that VM Agent is installed on the VM so that extensions + can be added to the VM later. + :type provision_vm_agent: bool + """ + + _attribute_map = { + 'disable_password_authentication': {'key': 'disablePasswordAuthentication', 'type': 'bool'}, + 'ssh': {'key': 'ssh', 'type': 'SshConfiguration'}, + 'provision_vm_agent': {'key': 'provisionVMAgent', 'type': 'bool'}, + } + + def __init__(self, *, disable_password_authentication: bool=None, ssh=None, provision_vm_agent: bool=None, **kwargs) -> None: + super(LinuxConfiguration, self).__init__(**kwargs) + self.disable_password_authentication = disable_password_authentication + self.ssh = ssh + self.provision_vm_agent = provision_vm_agent + + +class LogAnalyticsInputBase(Model): + """Api input base class for LogAnalytics Api. + + All required parameters must be populated in order to send to Azure. + + :param blob_container_sas_uri: Required. SAS Uri of the logging blob + container to which LogAnalytics Api writes output logs to. + :type blob_container_sas_uri: str + :param from_time: Required. From time of the query + :type from_time: datetime + :param to_time: Required. To time of the query + :type to_time: datetime + :param group_by_throttle_policy: Group query result by Throttle Policy + applied. + :type group_by_throttle_policy: bool + :param group_by_operation_name: Group query result by Operation Name. + :type group_by_operation_name: bool + :param group_by_resource_name: Group query result by Resource Name. + :type group_by_resource_name: bool + """ + + _validation = { + 'blob_container_sas_uri': {'required': True}, + 'from_time': {'required': True}, + 'to_time': {'required': True}, + } + + _attribute_map = { + 'blob_container_sas_uri': {'key': 'blobContainerSasUri', 'type': 'str'}, + 'from_time': {'key': 'fromTime', 'type': 'iso-8601'}, + 'to_time': {'key': 'toTime', 'type': 'iso-8601'}, + 'group_by_throttle_policy': {'key': 'groupByThrottlePolicy', 'type': 'bool'}, + 'group_by_operation_name': {'key': 'groupByOperationName', 'type': 'bool'}, + 'group_by_resource_name': {'key': 'groupByResourceName', 'type': 'bool'}, + } + + def __init__(self, *, blob_container_sas_uri: str, from_time, to_time, group_by_throttle_policy: bool=None, group_by_operation_name: bool=None, group_by_resource_name: bool=None, **kwargs) -> None: + super(LogAnalyticsInputBase, self).__init__(**kwargs) + self.blob_container_sas_uri = blob_container_sas_uri + self.from_time = from_time + self.to_time = to_time + self.group_by_throttle_policy = group_by_throttle_policy + self.group_by_operation_name = group_by_operation_name + self.group_by_resource_name = group_by_resource_name + + +class LogAnalyticsOperationResult(Model): + """LogAnalytics operation status response. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar properties: LogAnalyticsOutput + :vartype properties: + ~azure.mgmt.compute.v2018_10_01.models.LogAnalyticsOutput + """ + + _validation = { + 'properties': {'readonly': True}, + } + + _attribute_map = { + 'properties': {'key': 'properties', 'type': 'LogAnalyticsOutput'}, + } + + def __init__(self, **kwargs) -> None: + super(LogAnalyticsOperationResult, self).__init__(**kwargs) + self.properties = None + + +class LogAnalyticsOutput(Model): + """LogAnalytics output properties. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar output: Output file Uri path to blob container. + :vartype output: str + """ + + _validation = { + 'output': {'readonly': True}, + } + + _attribute_map = { + 'output': {'key': 'output', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(LogAnalyticsOutput, self).__init__(**kwargs) + self.output = None + + +class MaintenanceRedeployStatus(Model): + """Maintenance Operation Status. + + :param is_customer_initiated_maintenance_allowed: True, if customer is + allowed to perform Maintenance. + :type is_customer_initiated_maintenance_allowed: bool + :param pre_maintenance_window_start_time: Start Time for the Pre + Maintenance Window. + :type pre_maintenance_window_start_time: datetime + :param pre_maintenance_window_end_time: End Time for the Pre Maintenance + Window. + :type pre_maintenance_window_end_time: datetime + :param maintenance_window_start_time: Start Time for the Maintenance + Window. + :type maintenance_window_start_time: datetime + :param maintenance_window_end_time: End Time for the Maintenance Window. + :type maintenance_window_end_time: datetime + :param last_operation_result_code: The Last Maintenance Operation Result + Code. Possible values include: 'None', 'RetryLater', 'MaintenanceAborted', + 'MaintenanceCompleted' + :type last_operation_result_code: str or + ~azure.mgmt.compute.v2018_10_01.models.MaintenanceOperationResultCodeTypes + :param last_operation_message: Message returned for the last Maintenance + Operation. + :type last_operation_message: str + """ + + _attribute_map = { + 'is_customer_initiated_maintenance_allowed': {'key': 'isCustomerInitiatedMaintenanceAllowed', 'type': 'bool'}, + 'pre_maintenance_window_start_time': {'key': 'preMaintenanceWindowStartTime', 'type': 'iso-8601'}, + 'pre_maintenance_window_end_time': {'key': 'preMaintenanceWindowEndTime', 'type': 'iso-8601'}, + 'maintenance_window_start_time': {'key': 'maintenanceWindowStartTime', 'type': 'iso-8601'}, + 'maintenance_window_end_time': {'key': 'maintenanceWindowEndTime', 'type': 'iso-8601'}, + 'last_operation_result_code': {'key': 'lastOperationResultCode', 'type': 'MaintenanceOperationResultCodeTypes'}, + 'last_operation_message': {'key': 'lastOperationMessage', 'type': 'str'}, + } + + def __init__(self, *, is_customer_initiated_maintenance_allowed: bool=None, pre_maintenance_window_start_time=None, pre_maintenance_window_end_time=None, maintenance_window_start_time=None, maintenance_window_end_time=None, last_operation_result_code=None, last_operation_message: str=None, **kwargs) -> None: + super(MaintenanceRedeployStatus, self).__init__(**kwargs) + self.is_customer_initiated_maintenance_allowed = is_customer_initiated_maintenance_allowed + self.pre_maintenance_window_start_time = pre_maintenance_window_start_time + self.pre_maintenance_window_end_time = pre_maintenance_window_end_time + self.maintenance_window_start_time = maintenance_window_start_time + self.maintenance_window_end_time = maintenance_window_end_time + self.last_operation_result_code = last_operation_result_code + self.last_operation_message = last_operation_message + + +class ManagedDiskParameters(SubResource): + """The parameters of a managed disk. + + :param id: Resource Id + :type id: str + :param storage_account_type: Specifies the storage account type for the + managed disk. NOTE: UltraSSD_LRS can only be used with data disks, it + cannot be used with OS Disk. Possible values include: 'Standard_LRS', + 'Premium_LRS', 'StandardSSD_LRS', 'UltraSSD_LRS' + :type storage_account_type: str or + ~azure.mgmt.compute.v2018_10_01.models.StorageAccountTypes + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'storage_account_type': {'key': 'storageAccountType', 'type': 'str'}, + } + + def __init__(self, *, id: str=None, storage_account_type=None, **kwargs) -> None: + super(ManagedDiskParameters, self).__init__(id=id, **kwargs) + self.storage_account_type = storage_account_type + + +class NetworkInterfaceReference(SubResource): + """Describes a network interface reference. + + :param id: Resource Id + :type id: str + :param primary: Specifies the primary network interface in case the + virtual machine has more than 1 network interface. + :type primary: bool + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'primary': {'key': 'properties.primary', 'type': 'bool'}, + } + + def __init__(self, *, id: str=None, primary: bool=None, **kwargs) -> None: + super(NetworkInterfaceReference, self).__init__(id=id, **kwargs) + self.primary = primary + + +class NetworkProfile(Model): + """Specifies the network interfaces of the virtual machine. + + :param network_interfaces: Specifies the list of resource Ids for the + network interfaces associated with the virtual machine. + :type network_interfaces: + list[~azure.mgmt.compute.v2018_10_01.models.NetworkInterfaceReference] + """ + + _attribute_map = { + 'network_interfaces': {'key': 'networkInterfaces', 'type': '[NetworkInterfaceReference]'}, + } + + def __init__(self, *, network_interfaces=None, **kwargs) -> None: + super(NetworkProfile, self).__init__(**kwargs) + self.network_interfaces = network_interfaces + + +class OSDisk(Model): + """Specifies information about the operating system disk used by the virtual + machine.

    For more information about disks, see [About disks and + VHDs for Azure virtual + machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-about-disks-vhds?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). + + All required parameters must be populated in order to send to Azure. + + :param os_type: This property allows you to specify the type of the OS + that is included in the disk if creating a VM from user-image or a + specialized VHD.

    Possible values are:

    **Windows** +

    **Linux**. Possible values include: 'Windows', 'Linux' + :type os_type: str or + ~azure.mgmt.compute.v2018_10_01.models.OperatingSystemTypes + :param encryption_settings: Specifies the encryption settings for the OS + Disk.

    Minimum api-version: 2015-06-15 + :type encryption_settings: + ~azure.mgmt.compute.v2018_10_01.models.DiskEncryptionSettings + :param name: The disk name. + :type name: str + :param vhd: The virtual hard disk. + :type vhd: ~azure.mgmt.compute.v2018_10_01.models.VirtualHardDisk + :param image: The source user image virtual hard disk. The virtual hard + disk will be copied before being attached to the virtual machine. If + SourceImage is provided, the destination virtual hard drive must not + exist. + :type image: ~azure.mgmt.compute.v2018_10_01.models.VirtualHardDisk + :param caching: Specifies the caching requirements.

    Possible + values are:

    **None**

    **ReadOnly**

    **ReadWrite** +

    Default: **None for Standard storage. ReadOnly for Premium + storage**. Possible values include: 'None', 'ReadOnly', 'ReadWrite' + :type caching: str or ~azure.mgmt.compute.v2018_10_01.models.CachingTypes + :param write_accelerator_enabled: Specifies whether writeAccelerator + should be enabled or disabled on the disk. + :type write_accelerator_enabled: bool + :param diff_disk_settings: Specifies the ephemeral Disk Settings for the + operating system disk used by the virtual machine. + :type diff_disk_settings: + ~azure.mgmt.compute.v2018_10_01.models.DiffDiskSettings + :param create_option: Required. Specifies how the virtual machine should + be created.

    Possible values are:

    **Attach** \\u2013 This + value is used when you are using a specialized disk to create the virtual + machine.

    **FromImage** \\u2013 This value is used when you are + using an image to create the virtual machine. If you are using a platform + image, you also use the imageReference element described above. If you are + using a marketplace image, you also use the plan element previously + described. Possible values include: 'FromImage', 'Empty', 'Attach' + :type create_option: str or + ~azure.mgmt.compute.v2018_10_01.models.DiskCreateOptionTypes + :param disk_size_gb: Specifies the size of an empty data disk in + gigabytes. This element can be used to overwrite the size of the disk in a + virtual machine image.

    This value cannot be larger than 1023 GB + :type disk_size_gb: int + :param managed_disk: The managed disk parameters. + :type managed_disk: + ~azure.mgmt.compute.v2018_10_01.models.ManagedDiskParameters + """ + + _validation = { + 'create_option': {'required': True}, + } + + _attribute_map = { + 'os_type': {'key': 'osType', 'type': 'OperatingSystemTypes'}, + 'encryption_settings': {'key': 'encryptionSettings', 'type': 'DiskEncryptionSettings'}, + 'name': {'key': 'name', 'type': 'str'}, + 'vhd': {'key': 'vhd', 'type': 'VirtualHardDisk'}, + 'image': {'key': 'image', 'type': 'VirtualHardDisk'}, + 'caching': {'key': 'caching', 'type': 'CachingTypes'}, + 'write_accelerator_enabled': {'key': 'writeAcceleratorEnabled', 'type': 'bool'}, + 'diff_disk_settings': {'key': 'diffDiskSettings', 'type': 'DiffDiskSettings'}, + 'create_option': {'key': 'createOption', 'type': 'str'}, + 'disk_size_gb': {'key': 'diskSizeGB', 'type': 'int'}, + 'managed_disk': {'key': 'managedDisk', 'type': 'ManagedDiskParameters'}, + } + + def __init__(self, *, create_option, os_type=None, encryption_settings=None, name: str=None, vhd=None, image=None, caching=None, write_accelerator_enabled: bool=None, diff_disk_settings=None, disk_size_gb: int=None, managed_disk=None, **kwargs) -> None: + super(OSDisk, self).__init__(**kwargs) + self.os_type = os_type + self.encryption_settings = encryption_settings + self.name = name + self.vhd = vhd + self.image = image + self.caching = caching + self.write_accelerator_enabled = write_accelerator_enabled + self.diff_disk_settings = diff_disk_settings + self.create_option = create_option + self.disk_size_gb = disk_size_gb + self.managed_disk = managed_disk + + +class OSDiskImage(Model): + """Contains the os disk image information. + + All required parameters must be populated in order to send to Azure. + + :param operating_system: Required. The operating system of the + osDiskImage. Possible values include: 'Windows', 'Linux' + :type operating_system: str or + ~azure.mgmt.compute.v2018_10_01.models.OperatingSystemTypes + """ + + _validation = { + 'operating_system': {'required': True}, + } + + _attribute_map = { + 'operating_system': {'key': 'operatingSystem', 'type': 'OperatingSystemTypes'}, + } + + def __init__(self, *, operating_system, **kwargs) -> None: + super(OSDiskImage, self).__init__(**kwargs) + self.operating_system = operating_system + + +class OSProfile(Model): + """Specifies the operating system settings for the virtual machine. + + :param computer_name: Specifies the host OS name of the virtual machine. +

    This name cannot be updated after the VM is created.

    + **Max-length (Windows):** 15 characters

    **Max-length (Linux):** + 64 characters.

    For naming conventions and restrictions see [Azure + infrastructure services implementation + guidelines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-infrastructure-subscription-accounts-guidelines?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json#1-naming-conventions). + :type computer_name: str + :param admin_username: Specifies the name of the administrator account. +

    **Windows-only restriction:** Cannot end in "."

    + **Disallowed values:** "administrator", "admin", "user", "user1", "test", + "user2", "test1", "user3", "admin1", "1", "123", "a", "actuser", "adm", + "admin2", "aspnet", "backup", "console", "david", "guest", "john", + "owner", "root", "server", "sql", "support", "support_388945a0", "sys", + "test2", "test3", "user4", "user5".

    **Minimum-length (Linux):** 1 + character

    **Max-length (Linux):** 64 characters

    + **Max-length (Windows):** 20 characters

  • For root access to + the Linux VM, see [Using root privileges on Linux virtual machines in + Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-use-root-privileges?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json)
  • + For a list of built-in system users on Linux that should not be used in + this field, see [Selecting User Names for Linux on + Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-usernames?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json) + :type admin_username: str + :param admin_password: Specifies the password of the administrator + account.

    **Minimum-length (Windows):** 8 characters

    + **Minimum-length (Linux):** 6 characters

    **Max-length + (Windows):** 123 characters

    **Max-length (Linux):** 72 characters +

    **Complexity requirements:** 3 out of 4 conditions below need to + be fulfilled
    Has lower characters
    Has upper characters
    Has a + digit
    Has a special character (Regex match [\\W_])

    + **Disallowed values:** "abc@123", "P@$$w0rd", "P@ssw0rd", "P@ssword123", + "Pa$$word", "pass@word1", "Password!", "Password1", "Password22", + "iloveyou!"

    For resetting the password, see [How to reset the + Remote Desktop service or its login password in a Windows + VM](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-reset-rdp?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json) +

    For resetting root password, see [Manage users, SSH, and check or + repair disks on Azure Linux VMs using the VMAccess + Extension](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-using-vmaccess-extension?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json#reset-root-password) + :type admin_password: str + :param custom_data: Specifies a base-64 encoded string of custom data. The + base-64 encoded string is decoded to a binary array that is saved as a + file on the Virtual Machine. The maximum length of the binary array is + 65535 bytes.

    For using cloud-init for your VM, see [Using + cloud-init to customize a Linux VM during + creation](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-using-cloud-init?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json) + :type custom_data: str + :param windows_configuration: Specifies Windows operating system settings + on the virtual machine. + :type windows_configuration: + ~azure.mgmt.compute.v2018_10_01.models.WindowsConfiguration + :param linux_configuration: Specifies the Linux operating system settings + on the virtual machine.

    For a list of supported Linux + distributions, see [Linux on Azure-Endorsed + Distributions](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-endorsed-distros?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json) +

    For running non-endorsed distributions, see [Information for + Non-Endorsed + Distributions](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-create-upload-generic?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json). + :type linux_configuration: + ~azure.mgmt.compute.v2018_10_01.models.LinuxConfiguration + :param secrets: Specifies set of certificates that should be installed + onto the virtual machine. + :type secrets: + list[~azure.mgmt.compute.v2018_10_01.models.VaultSecretGroup] + :param allow_extension_operations: Specifies whether extension operations + should be allowed on the virtual machine.

    This may only be set to + False when no extensions are present on the virtual machine. + :type allow_extension_operations: bool + """ + + _attribute_map = { + 'computer_name': {'key': 'computerName', 'type': 'str'}, + 'admin_username': {'key': 'adminUsername', 'type': 'str'}, + 'admin_password': {'key': 'adminPassword', 'type': 'str'}, + 'custom_data': {'key': 'customData', 'type': 'str'}, + 'windows_configuration': {'key': 'windowsConfiguration', 'type': 'WindowsConfiguration'}, + 'linux_configuration': {'key': 'linuxConfiguration', 'type': 'LinuxConfiguration'}, + 'secrets': {'key': 'secrets', 'type': '[VaultSecretGroup]'}, + 'allow_extension_operations': {'key': 'allowExtensionOperations', 'type': 'bool'}, + } + + def __init__(self, *, computer_name: str=None, admin_username: str=None, admin_password: str=None, custom_data: str=None, windows_configuration=None, linux_configuration=None, secrets=None, allow_extension_operations: bool=None, **kwargs) -> None: + super(OSProfile, self).__init__(**kwargs) + self.computer_name = computer_name + self.admin_username = admin_username + self.admin_password = admin_password + self.custom_data = custom_data + self.windows_configuration = windows_configuration + self.linux_configuration = linux_configuration + self.secrets = secrets + self.allow_extension_operations = allow_extension_operations + + +class Plan(Model): + """Specifies information about the marketplace image used to create the + virtual machine. This element is only used for marketplace images. Before + you can use a marketplace image from an API, you must enable the image for + programmatic use. In the Azure portal, find the marketplace image that you + want to use and then click **Want to deploy programmatically, Get Started + ->**. Enter any required information and then click **Save**. + + :param name: The plan ID. + :type name: str + :param publisher: The publisher ID. + :type publisher: str + :param product: Specifies the product of the image from the marketplace. + This is the same value as Offer under the imageReference element. + :type product: str + :param promotion_code: The promotion code. + :type promotion_code: str + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'publisher': {'key': 'publisher', 'type': 'str'}, + 'product': {'key': 'product', 'type': 'str'}, + 'promotion_code': {'key': 'promotionCode', 'type': 'str'}, + } + + def __init__(self, *, name: str=None, publisher: str=None, product: str=None, promotion_code: str=None, **kwargs) -> None: + super(Plan, self).__init__(**kwargs) + self.name = name + self.publisher = publisher + self.product = product + self.promotion_code = promotion_code + + +class ProximityPlacementGroup(Resource): + """Specifies information about the proximity placement group. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource Id + :vartype id: str + :ivar name: Resource name + :vartype name: str + :ivar type: Resource type + :vartype type: str + :param location: Required. Resource location + :type location: str + :param tags: Resource tags + :type tags: dict[str, str] + :param proximity_placement_group_type: Specifies the type of the proximity + placement group.

    Possible values are:

    **Standard** : + Co-locate resources within an Azure region or Availability Zone.

    + **Ultra** : For future use. Possible values include: 'Standard', 'Ultra' + :type proximity_placement_group_type: str or + ~azure.mgmt.compute.v2018_10_01.models.ProximityPlacementGroupType + :ivar virtual_machines: A list of references to all virtual machines in + the proximity placement group. + :vartype virtual_machines: + list[~azure.mgmt.compute.v2018_10_01.models.SubResource] + :ivar virtual_machine_scale_sets: A list of references to all virtual + machine scale sets in the proximity placement group. + :vartype virtual_machine_scale_sets: + list[~azure.mgmt.compute.v2018_10_01.models.SubResource] + :ivar availability_sets: A list of references to all availability sets in + the proximity placement group. + :vartype availability_sets: + list[~azure.mgmt.compute.v2018_10_01.models.SubResource] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + 'virtual_machines': {'readonly': True}, + 'virtual_machine_scale_sets': {'readonly': True}, + 'availability_sets': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'proximity_placement_group_type': {'key': 'properties.proximityPlacementGroupType', 'type': 'str'}, + 'virtual_machines': {'key': 'properties.virtualMachines', 'type': '[SubResource]'}, + 'virtual_machine_scale_sets': {'key': 'properties.virtualMachineScaleSets', 'type': '[SubResource]'}, + 'availability_sets': {'key': 'properties.availabilitySets', 'type': '[SubResource]'}, + } + + def __init__(self, *, location: str, tags=None, proximity_placement_group_type=None, **kwargs) -> None: + super(ProximityPlacementGroup, self).__init__(location=location, tags=tags, **kwargs) + self.proximity_placement_group_type = proximity_placement_group_type + self.virtual_machines = None + self.virtual_machine_scale_sets = None + self.availability_sets = None + + +class ProximityPlacementGroupUpdate(UpdateResource): + """Specifies information about the proximity placement group. + + :param tags: Resource tags + :type tags: dict[str, str] + """ + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__(self, *, tags=None, **kwargs) -> None: + super(ProximityPlacementGroupUpdate, self).__init__(tags=tags, **kwargs) + + +class PurchasePlan(Model): + """Used for establishing the purchase context of any 3rd Party artifact + through MarketPlace. + + All required parameters must be populated in order to send to Azure. + + :param publisher: Required. The publisher ID. + :type publisher: str + :param name: Required. The plan ID. + :type name: str + :param product: Required. Specifies the product of the image from the + marketplace. This is the same value as Offer under the imageReference + element. + :type product: str + """ + + _validation = { + 'publisher': {'required': True}, + 'name': {'required': True}, + 'product': {'required': True}, + } + + _attribute_map = { + 'publisher': {'key': 'publisher', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'product': {'key': 'product', 'type': 'str'}, + } + + def __init__(self, *, publisher: str, name: str, product: str, **kwargs) -> None: + super(PurchasePlan, self).__init__(**kwargs) + self.publisher = publisher + self.name = name + self.product = product + + +class RecoveryWalkResponse(Model): + """Response after calling a manual recovery walk. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar walk_performed: Whether the recovery walk was performed + :vartype walk_performed: bool + :ivar next_platform_update_domain: The next update domain that needs to be + walked. Null means walk spanning all update domains has been completed + :vartype next_platform_update_domain: int + """ + + _validation = { + 'walk_performed': {'readonly': True}, + 'next_platform_update_domain': {'readonly': True}, + } + + _attribute_map = { + 'walk_performed': {'key': 'walkPerformed', 'type': 'bool'}, + 'next_platform_update_domain': {'key': 'nextPlatformUpdateDomain', 'type': 'int'}, + } + + def __init__(self, **kwargs) -> None: + super(RecoveryWalkResponse, self).__init__(**kwargs) + self.walk_performed = None + self.next_platform_update_domain = None + + +class RequestRateByIntervalInput(LogAnalyticsInputBase): + """Api request input for LogAnalytics getRequestRateByInterval Api. + + All required parameters must be populated in order to send to Azure. + + :param blob_container_sas_uri: Required. SAS Uri of the logging blob + container to which LogAnalytics Api writes output logs to. + :type blob_container_sas_uri: str + :param from_time: Required. From time of the query + :type from_time: datetime + :param to_time: Required. To time of the query + :type to_time: datetime + :param group_by_throttle_policy: Group query result by Throttle Policy + applied. + :type group_by_throttle_policy: bool + :param group_by_operation_name: Group query result by Operation Name. + :type group_by_operation_name: bool + :param group_by_resource_name: Group query result by Resource Name. + :type group_by_resource_name: bool + :param interval_length: Required. Interval value in minutes used to create + LogAnalytics call rate logs. Possible values include: 'ThreeMins', + 'FiveMins', 'ThirtyMins', 'SixtyMins' + :type interval_length: str or + ~azure.mgmt.compute.v2018_10_01.models.IntervalInMins + """ + + _validation = { + 'blob_container_sas_uri': {'required': True}, + 'from_time': {'required': True}, + 'to_time': {'required': True}, + 'interval_length': {'required': True}, + } + + _attribute_map = { + 'blob_container_sas_uri': {'key': 'blobContainerSasUri', 'type': 'str'}, + 'from_time': {'key': 'fromTime', 'type': 'iso-8601'}, + 'to_time': {'key': 'toTime', 'type': 'iso-8601'}, + 'group_by_throttle_policy': {'key': 'groupByThrottlePolicy', 'type': 'bool'}, + 'group_by_operation_name': {'key': 'groupByOperationName', 'type': 'bool'}, + 'group_by_resource_name': {'key': 'groupByResourceName', 'type': 'bool'}, + 'interval_length': {'key': 'intervalLength', 'type': 'IntervalInMins'}, + } + + def __init__(self, *, blob_container_sas_uri: str, from_time, to_time, interval_length, group_by_throttle_policy: bool=None, group_by_operation_name: bool=None, group_by_resource_name: bool=None, **kwargs) -> None: + super(RequestRateByIntervalInput, self).__init__(blob_container_sas_uri=blob_container_sas_uri, from_time=from_time, to_time=to_time, group_by_throttle_policy=group_by_throttle_policy, group_by_operation_name=group_by_operation_name, group_by_resource_name=group_by_resource_name, **kwargs) + self.interval_length = interval_length + + +class RollbackStatusInfo(Model): + """Information about rollback on failed VM instances after a OS Upgrade + operation. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar successfully_rolledback_instance_count: The number of instances + which have been successfully rolled back. + :vartype successfully_rolledback_instance_count: int + :ivar failed_rolledback_instance_count: The number of instances which + failed to rollback. + :vartype failed_rolledback_instance_count: int + :ivar rollback_error: Error details if OS rollback failed. + :vartype rollback_error: ~azure.mgmt.compute.v2018_10_01.models.ApiError + """ + + _validation = { + 'successfully_rolledback_instance_count': {'readonly': True}, + 'failed_rolledback_instance_count': {'readonly': True}, + 'rollback_error': {'readonly': True}, + } + + _attribute_map = { + 'successfully_rolledback_instance_count': {'key': 'successfullyRolledbackInstanceCount', 'type': 'int'}, + 'failed_rolledback_instance_count': {'key': 'failedRolledbackInstanceCount', 'type': 'int'}, + 'rollback_error': {'key': 'rollbackError', 'type': 'ApiError'}, + } + + def __init__(self, **kwargs) -> None: + super(RollbackStatusInfo, self).__init__(**kwargs) + self.successfully_rolledback_instance_count = None + self.failed_rolledback_instance_count = None + self.rollback_error = None + + +class RollingUpgradePolicy(Model): + """The configuration parameters used while performing a rolling upgrade. + + :param max_batch_instance_percent: The maximum percent of total virtual + machine instances that will be upgraded simultaneously by the rolling + upgrade in one batch. As this is a maximum, unhealthy instances in + previous or future batches can cause the percentage of instances in a + batch to decrease to ensure higher reliability. The default value for this + parameter is 20%. + :type max_batch_instance_percent: int + :param max_unhealthy_instance_percent: The maximum percentage of the total + virtual machine instances in the scale set that can be simultaneously + unhealthy, either as a result of being upgraded, or by being found in an + unhealthy state by the virtual machine health checks before the rolling + upgrade aborts. This constraint will be checked prior to starting any + batch. The default value for this parameter is 20%. + :type max_unhealthy_instance_percent: int + :param max_unhealthy_upgraded_instance_percent: The maximum percentage of + upgraded virtual machine instances that can be found to be in an unhealthy + state. This check will happen after each batch is upgraded. If this + percentage is ever exceeded, the rolling update aborts. The default value + for this parameter is 20%. + :type max_unhealthy_upgraded_instance_percent: int + :param pause_time_between_batches: The wait time between completing the + update for all virtual machines in one batch and starting the next batch. + The time duration should be specified in ISO 8601 format. The default + value is 0 seconds (PT0S). + :type pause_time_between_batches: str + """ + + _validation = { + 'max_batch_instance_percent': {'maximum': 100, 'minimum': 5}, + 'max_unhealthy_instance_percent': {'maximum': 100, 'minimum': 5}, + 'max_unhealthy_upgraded_instance_percent': {'maximum': 100, 'minimum': 0}, + } + + _attribute_map = { + 'max_batch_instance_percent': {'key': 'maxBatchInstancePercent', 'type': 'int'}, + 'max_unhealthy_instance_percent': {'key': 'maxUnhealthyInstancePercent', 'type': 'int'}, + 'max_unhealthy_upgraded_instance_percent': {'key': 'maxUnhealthyUpgradedInstancePercent', 'type': 'int'}, + 'pause_time_between_batches': {'key': 'pauseTimeBetweenBatches', 'type': 'str'}, + } + + def __init__(self, *, max_batch_instance_percent: int=None, max_unhealthy_instance_percent: int=None, max_unhealthy_upgraded_instance_percent: int=None, pause_time_between_batches: str=None, **kwargs) -> None: + super(RollingUpgradePolicy, self).__init__(**kwargs) + self.max_batch_instance_percent = max_batch_instance_percent + self.max_unhealthy_instance_percent = max_unhealthy_instance_percent + self.max_unhealthy_upgraded_instance_percent = max_unhealthy_upgraded_instance_percent + self.pause_time_between_batches = pause_time_between_batches + + +class RollingUpgradeProgressInfo(Model): + """Information about the number of virtual machine instances in each upgrade + state. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar successful_instance_count: The number of instances that have been + successfully upgraded. + :vartype successful_instance_count: int + :ivar failed_instance_count: The number of instances that have failed to + be upgraded successfully. + :vartype failed_instance_count: int + :ivar in_progress_instance_count: The number of instances that are + currently being upgraded. + :vartype in_progress_instance_count: int + :ivar pending_instance_count: The number of instances that have not yet + begun to be upgraded. + :vartype pending_instance_count: int + """ + + _validation = { + 'successful_instance_count': {'readonly': True}, + 'failed_instance_count': {'readonly': True}, + 'in_progress_instance_count': {'readonly': True}, + 'pending_instance_count': {'readonly': True}, + } + + _attribute_map = { + 'successful_instance_count': {'key': 'successfulInstanceCount', 'type': 'int'}, + 'failed_instance_count': {'key': 'failedInstanceCount', 'type': 'int'}, + 'in_progress_instance_count': {'key': 'inProgressInstanceCount', 'type': 'int'}, + 'pending_instance_count': {'key': 'pendingInstanceCount', 'type': 'int'}, + } + + def __init__(self, **kwargs) -> None: + super(RollingUpgradeProgressInfo, self).__init__(**kwargs) + self.successful_instance_count = None + self.failed_instance_count = None + self.in_progress_instance_count = None + self.pending_instance_count = None + + +class RollingUpgradeRunningStatus(Model): + """Information about the current running state of the overall upgrade. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar code: Code indicating the current status of the upgrade. Possible + values include: 'RollingForward', 'Cancelled', 'Completed', 'Faulted' + :vartype code: str or + ~azure.mgmt.compute.v2018_10_01.models.RollingUpgradeStatusCode + :ivar start_time: Start time of the upgrade. + :vartype start_time: datetime + :ivar last_action: The last action performed on the rolling upgrade. + Possible values include: 'Start', 'Cancel' + :vartype last_action: str or + ~azure.mgmt.compute.v2018_10_01.models.RollingUpgradeActionType + :ivar last_action_time: Last action time of the upgrade. + :vartype last_action_time: datetime + """ + + _validation = { + 'code': {'readonly': True}, + 'start_time': {'readonly': True}, + 'last_action': {'readonly': True}, + 'last_action_time': {'readonly': True}, + } + + _attribute_map = { + 'code': {'key': 'code', 'type': 'RollingUpgradeStatusCode'}, + 'start_time': {'key': 'startTime', 'type': 'iso-8601'}, + 'last_action': {'key': 'lastAction', 'type': 'RollingUpgradeActionType'}, + 'last_action_time': {'key': 'lastActionTime', 'type': 'iso-8601'}, + } + + def __init__(self, **kwargs) -> None: + super(RollingUpgradeRunningStatus, self).__init__(**kwargs) + self.code = None + self.start_time = None + self.last_action = None + self.last_action_time = None + + +class RollingUpgradeStatusInfo(Resource): + """The status of the latest virtual machine scale set rolling upgrade. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource Id + :vartype id: str + :ivar name: Resource name + :vartype name: str + :ivar type: Resource type + :vartype type: str + :param location: Required. Resource location + :type location: str + :param tags: Resource tags + :type tags: dict[str, str] + :ivar policy: The rolling upgrade policies applied for this upgrade. + :vartype policy: + ~azure.mgmt.compute.v2018_10_01.models.RollingUpgradePolicy + :ivar running_status: Information about the current running state of the + overall upgrade. + :vartype running_status: + ~azure.mgmt.compute.v2018_10_01.models.RollingUpgradeRunningStatus + :ivar progress: Information about the number of virtual machine instances + in each upgrade state. + :vartype progress: + ~azure.mgmt.compute.v2018_10_01.models.RollingUpgradeProgressInfo + :ivar error: Error details for this upgrade, if there are any. + :vartype error: ~azure.mgmt.compute.v2018_10_01.models.ApiError + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + 'policy': {'readonly': True}, + 'running_status': {'readonly': True}, + 'progress': {'readonly': True}, + 'error': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'policy': {'key': 'properties.policy', 'type': 'RollingUpgradePolicy'}, + 'running_status': {'key': 'properties.runningStatus', 'type': 'RollingUpgradeRunningStatus'}, + 'progress': {'key': 'properties.progress', 'type': 'RollingUpgradeProgressInfo'}, + 'error': {'key': 'properties.error', 'type': 'ApiError'}, + } + + def __init__(self, *, location: str, tags=None, **kwargs) -> None: + super(RollingUpgradeStatusInfo, self).__init__(location=location, tags=tags, **kwargs) + self.policy = None + self.running_status = None + self.progress = None + self.error = None + + +class RunCommandDocumentBase(Model): + """Describes the properties of a Run Command metadata. + + All required parameters must be populated in order to send to Azure. + + :param schema: Required. The VM run command schema. + :type schema: str + :param id: Required. The VM run command id. + :type id: str + :param os_type: Required. The Operating System type. Possible values + include: 'Windows', 'Linux' + :type os_type: str or + ~azure.mgmt.compute.v2018_10_01.models.OperatingSystemTypes + :param label: Required. The VM run command label. + :type label: str + :param description: Required. The VM run command description. + :type description: str + """ + + _validation = { + 'schema': {'required': True}, + 'id': {'required': True}, + 'os_type': {'required': True}, + 'label': {'required': True}, + 'description': {'required': True}, + } + + _attribute_map = { + 'schema': {'key': '$schema', 'type': 'str'}, + 'id': {'key': 'id', 'type': 'str'}, + 'os_type': {'key': 'osType', 'type': 'OperatingSystemTypes'}, + 'label': {'key': 'label', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + } + + def __init__(self, *, schema: str, id: str, os_type, label: str, description: str, **kwargs) -> None: + super(RunCommandDocumentBase, self).__init__(**kwargs) + self.schema = schema + self.id = id + self.os_type = os_type + self.label = label + self.description = description + + +class RunCommandDocument(RunCommandDocumentBase): + """Describes the properties of a Run Command. + + All required parameters must be populated in order to send to Azure. + + :param schema: Required. The VM run command schema. + :type schema: str + :param id: Required. The VM run command id. + :type id: str + :param os_type: Required. The Operating System type. Possible values + include: 'Windows', 'Linux' + :type os_type: str or + ~azure.mgmt.compute.v2018_10_01.models.OperatingSystemTypes + :param label: Required. The VM run command label. + :type label: str + :param description: Required. The VM run command description. + :type description: str + :param script: Required. The script to be executed. + :type script: list[str] + :param parameters: The parameters used by the script. + :type parameters: + list[~azure.mgmt.compute.v2018_10_01.models.RunCommandParameterDefinition] + """ + + _validation = { + 'schema': {'required': True}, + 'id': {'required': True}, + 'os_type': {'required': True}, + 'label': {'required': True}, + 'description': {'required': True}, + 'script': {'required': True}, + } + + _attribute_map = { + 'schema': {'key': '$schema', 'type': 'str'}, + 'id': {'key': 'id', 'type': 'str'}, + 'os_type': {'key': 'osType', 'type': 'OperatingSystemTypes'}, + 'label': {'key': 'label', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + 'script': {'key': 'script', 'type': '[str]'}, + 'parameters': {'key': 'parameters', 'type': '[RunCommandParameterDefinition]'}, + } + + def __init__(self, *, schema: str, id: str, os_type, label: str, description: str, script, parameters=None, **kwargs) -> None: + super(RunCommandDocument, self).__init__(schema=schema, id=id, os_type=os_type, label=label, description=description, **kwargs) + self.script = script + self.parameters = parameters + + +class RunCommandInput(Model): + """Capture Virtual Machine parameters. + + All required parameters must be populated in order to send to Azure. + + :param command_id: Required. The run command id. + :type command_id: str + :param script: Optional. The script to be executed. When this value is + given, the given script will override the default script of the command. + :type script: list[str] + :param parameters: The run command parameters. + :type parameters: + list[~azure.mgmt.compute.v2018_10_01.models.RunCommandInputParameter] + """ + + _validation = { + 'command_id': {'required': True}, + } + + _attribute_map = { + 'command_id': {'key': 'commandId', 'type': 'str'}, + 'script': {'key': 'script', 'type': '[str]'}, + 'parameters': {'key': 'parameters', 'type': '[RunCommandInputParameter]'}, + } + + def __init__(self, *, command_id: str, script=None, parameters=None, **kwargs) -> None: + super(RunCommandInput, self).__init__(**kwargs) + self.command_id = command_id + self.script = script + self.parameters = parameters + + +class RunCommandInputParameter(Model): + """Describes the properties of a run command parameter. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. The run command parameter name. + :type name: str + :param value: Required. The run command parameter value. + :type value: str + """ + + _validation = { + 'name': {'required': True}, + 'value': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'value': {'key': 'value', 'type': 'str'}, + } + + def __init__(self, *, name: str, value: str, **kwargs) -> None: + super(RunCommandInputParameter, self).__init__(**kwargs) + self.name = name + self.value = value + + +class RunCommandParameterDefinition(Model): + """Describes the properties of a run command parameter. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. The run command parameter name. + :type name: str + :param type: Required. The run command parameter type. + :type type: str + :param default_value: The run command parameter default value. + :type default_value: str + :param required: The run command parameter required. Default value: False + . + :type required: bool + """ + + _validation = { + 'name': {'required': True}, + 'type': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'default_value': {'key': 'defaultValue', 'type': 'str'}, + 'required': {'key': 'required', 'type': 'bool'}, + } + + def __init__(self, *, name: str, type: str, default_value: str=None, required: bool=False, **kwargs) -> None: + super(RunCommandParameterDefinition, self).__init__(**kwargs) + self.name = name + self.type = type + self.default_value = default_value + self.required = required + + +class RunCommandResult(Model): + """RunCommandResult. + + :param value: Run command operation response. + :type value: + list[~azure.mgmt.compute.v2018_10_01.models.InstanceViewStatus] + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[InstanceViewStatus]'}, + } + + def __init__(self, *, value=None, **kwargs) -> None: + super(RunCommandResult, self).__init__(**kwargs) + self.value = value + + +class Sku(Model): + """Describes a virtual machine scale set sku. + + :param name: The sku name. + :type name: str + :param tier: Specifies the tier of virtual machines in a scale set.

    Possible Values:

    **Standard**

    **Basic** + :type tier: str + :param capacity: Specifies the number of virtual machines in the scale + set. + :type capacity: long + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'tier': {'key': 'tier', 'type': 'str'}, + 'capacity': {'key': 'capacity', 'type': 'long'}, + } + + def __init__(self, *, name: str=None, tier: str=None, capacity: int=None, **kwargs) -> None: + super(Sku, self).__init__(**kwargs) + self.name = name + self.tier = tier + self.capacity = capacity + + +class SshConfiguration(Model): + """SSH configuration for Linux based VMs running on Azure. + + :param public_keys: The list of SSH public keys used to authenticate with + linux based VMs. + :type public_keys: + list[~azure.mgmt.compute.v2018_10_01.models.SshPublicKey] + """ + + _attribute_map = { + 'public_keys': {'key': 'publicKeys', 'type': '[SshPublicKey]'}, + } + + def __init__(self, *, public_keys=None, **kwargs) -> None: + super(SshConfiguration, self).__init__(**kwargs) + self.public_keys = public_keys + + +class SshPublicKey(Model): + """Contains information about SSH certificate public key and the path on the + Linux VM where the public key is placed. + + :param path: Specifies the full path on the created VM where ssh public + key is stored. If the file already exists, the specified key is appended + to the file. Example: /home/user/.ssh/authorized_keys + :type path: str + :param key_data: SSH public key certificate used to authenticate with the + VM through ssh. The key needs to be at least 2048-bit and in ssh-rsa + format.

    For creating ssh keys, see [Create SSH keys on Linux and + Mac for Linux VMs in + Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-mac-create-ssh-keys?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json). + :type key_data: str + """ + + _attribute_map = { + 'path': {'key': 'path', 'type': 'str'}, + 'key_data': {'key': 'keyData', 'type': 'str'}, + } + + def __init__(self, *, path: str=None, key_data: str=None, **kwargs) -> None: + super(SshPublicKey, self).__init__(**kwargs) + self.path = path + self.key_data = key_data + + +class StorageProfile(Model): + """Specifies the storage settings for the virtual machine disks. + + :param image_reference: Specifies information about the image to use. You + can specify information about platform images, marketplace images, or + virtual machine images. This element is required when you want to use a + platform image, marketplace image, or virtual machine image, but is not + used in other creation operations. + :type image_reference: + ~azure.mgmt.compute.v2018_10_01.models.ImageReference + :param os_disk: Specifies information about the operating system disk used + by the virtual machine.

    For more information about disks, see + [About disks and VHDs for Azure virtual + machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-about-disks-vhds?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). + :type os_disk: ~azure.mgmt.compute.v2018_10_01.models.OSDisk + :param data_disks: Specifies the parameters that are used to add a data + disk to a virtual machine.

    For more information about disks, see + [About disks and VHDs for Azure virtual + machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-about-disks-vhds?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). + :type data_disks: list[~azure.mgmt.compute.v2018_10_01.models.DataDisk] + """ + + _attribute_map = { + 'image_reference': {'key': 'imageReference', 'type': 'ImageReference'}, + 'os_disk': {'key': 'osDisk', 'type': 'OSDisk'}, + 'data_disks': {'key': 'dataDisks', 'type': '[DataDisk]'}, + } + + def __init__(self, *, image_reference=None, os_disk=None, data_disks=None, **kwargs) -> None: + super(StorageProfile, self).__init__(**kwargs) + self.image_reference = image_reference + self.os_disk = os_disk + self.data_disks = data_disks + + +class SubResourceReadOnly(Model): + """SubResourceReadOnly. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource Id + :vartype id: str + """ + + _validation = { + 'id': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(SubResourceReadOnly, self).__init__(**kwargs) + self.id = None + + +class ThrottledRequestsInput(LogAnalyticsInputBase): + """Api request input for LogAnalytics getThrottledRequests Api. + + All required parameters must be populated in order to send to Azure. + + :param blob_container_sas_uri: Required. SAS Uri of the logging blob + container to which LogAnalytics Api writes output logs to. + :type blob_container_sas_uri: str + :param from_time: Required. From time of the query + :type from_time: datetime + :param to_time: Required. To time of the query + :type to_time: datetime + :param group_by_throttle_policy: Group query result by Throttle Policy + applied. + :type group_by_throttle_policy: bool + :param group_by_operation_name: Group query result by Operation Name. + :type group_by_operation_name: bool + :param group_by_resource_name: Group query result by Resource Name. + :type group_by_resource_name: bool + """ + + _validation = { + 'blob_container_sas_uri': {'required': True}, + 'from_time': {'required': True}, + 'to_time': {'required': True}, + } + + _attribute_map = { + 'blob_container_sas_uri': {'key': 'blobContainerSasUri', 'type': 'str'}, + 'from_time': {'key': 'fromTime', 'type': 'iso-8601'}, + 'to_time': {'key': 'toTime', 'type': 'iso-8601'}, + 'group_by_throttle_policy': {'key': 'groupByThrottlePolicy', 'type': 'bool'}, + 'group_by_operation_name': {'key': 'groupByOperationName', 'type': 'bool'}, + 'group_by_resource_name': {'key': 'groupByResourceName', 'type': 'bool'}, + } + + def __init__(self, *, blob_container_sas_uri: str, from_time, to_time, group_by_throttle_policy: bool=None, group_by_operation_name: bool=None, group_by_resource_name: bool=None, **kwargs) -> None: + super(ThrottledRequestsInput, self).__init__(blob_container_sas_uri=blob_container_sas_uri, from_time=from_time, to_time=to_time, group_by_throttle_policy=group_by_throttle_policy, group_by_operation_name=group_by_operation_name, group_by_resource_name=group_by_resource_name, **kwargs) + + +class UpgradeOperationHistoricalStatusInfo(Model): + """Virtual Machine Scale Set OS Upgrade History operation response. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar properties: Information about the properties of the upgrade + operation. + :vartype properties: + ~azure.mgmt.compute.v2018_10_01.models.UpgradeOperationHistoricalStatusInfoProperties + :ivar type: Resource type + :vartype type: str + :ivar location: Resource location + :vartype location: str + """ + + _validation = { + 'properties': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'readonly': True}, + } + + _attribute_map = { + 'properties': {'key': 'properties', 'type': 'UpgradeOperationHistoricalStatusInfoProperties'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(UpgradeOperationHistoricalStatusInfo, self).__init__(**kwargs) + self.properties = None + self.type = None + self.location = None + + +class UpgradeOperationHistoricalStatusInfoProperties(Model): + """Describes each OS upgrade on the Virtual Machine Scale Set. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar running_status: Information about the overall status of the upgrade + operation. + :vartype running_status: + ~azure.mgmt.compute.v2018_10_01.models.UpgradeOperationHistoryStatus + :ivar progress: Counts of the VMs in each state. + :vartype progress: + ~azure.mgmt.compute.v2018_10_01.models.RollingUpgradeProgressInfo + :ivar error: Error Details for this upgrade if there are any. + :vartype error: ~azure.mgmt.compute.v2018_10_01.models.ApiError + :ivar started_by: Invoker of the Upgrade Operation. Possible values + include: 'Unknown', 'User', 'Platform' + :vartype started_by: str or + ~azure.mgmt.compute.v2018_10_01.models.UpgradeOperationInvoker + :ivar target_image_reference: Image Reference details + :vartype target_image_reference: + ~azure.mgmt.compute.v2018_10_01.models.ImageReference + :ivar rollback_info: Information about OS rollback if performed + :vartype rollback_info: + ~azure.mgmt.compute.v2018_10_01.models.RollbackStatusInfo + """ + + _validation = { + 'running_status': {'readonly': True}, + 'progress': {'readonly': True}, + 'error': {'readonly': True}, + 'started_by': {'readonly': True}, + 'target_image_reference': {'readonly': True}, + 'rollback_info': {'readonly': True}, + } + + _attribute_map = { + 'running_status': {'key': 'runningStatus', 'type': 'UpgradeOperationHistoryStatus'}, + 'progress': {'key': 'progress', 'type': 'RollingUpgradeProgressInfo'}, + 'error': {'key': 'error', 'type': 'ApiError'}, + 'started_by': {'key': 'startedBy', 'type': 'UpgradeOperationInvoker'}, + 'target_image_reference': {'key': 'targetImageReference', 'type': 'ImageReference'}, + 'rollback_info': {'key': 'rollbackInfo', 'type': 'RollbackStatusInfo'}, + } + + def __init__(self, **kwargs) -> None: + super(UpgradeOperationHistoricalStatusInfoProperties, self).__init__(**kwargs) + self.running_status = None + self.progress = None + self.error = None + self.started_by = None + self.target_image_reference = None + self.rollback_info = None + + +class UpgradeOperationHistoryStatus(Model): + """Information about the current running state of the overall upgrade. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar code: Code indicating the current status of the upgrade. Possible + values include: 'RollingForward', 'Cancelled', 'Completed', 'Faulted' + :vartype code: str or ~azure.mgmt.compute.v2018_10_01.models.UpgradeState + :ivar start_time: Start time of the upgrade. + :vartype start_time: datetime + :ivar end_time: End time of the upgrade. + :vartype end_time: datetime + """ + + _validation = { + 'code': {'readonly': True}, + 'start_time': {'readonly': True}, + 'end_time': {'readonly': True}, + } + + _attribute_map = { + 'code': {'key': 'code', 'type': 'UpgradeState'}, + 'start_time': {'key': 'startTime', 'type': 'iso-8601'}, + 'end_time': {'key': 'endTime', 'type': 'iso-8601'}, + } + + def __init__(self, **kwargs) -> None: + super(UpgradeOperationHistoryStatus, self).__init__(**kwargs) + self.code = None + self.start_time = None + self.end_time = None + + +class UpgradePolicy(Model): + """Describes an upgrade policy - automatic, manual, or rolling. + + :param mode: Specifies the mode of an upgrade to virtual machines in the + scale set.

    Possible values are:

    **Manual** - You + control the application of updates to virtual machines in the scale set. + You do this by using the manualUpgrade action.

    **Automatic** - + All virtual machines in the scale set are automatically updated at the + same time. Possible values include: 'Automatic', 'Manual', 'Rolling' + :type mode: str or ~azure.mgmt.compute.v2018_10_01.models.UpgradeMode + :param rolling_upgrade_policy: The configuration parameters used while + performing a rolling upgrade. + :type rolling_upgrade_policy: + ~azure.mgmt.compute.v2018_10_01.models.RollingUpgradePolicy + :param automatic_os_upgrade_policy: Configuration parameters used for + performing automatic OS Upgrade. + :type automatic_os_upgrade_policy: + ~azure.mgmt.compute.v2018_10_01.models.AutomaticOSUpgradePolicy + """ + + _attribute_map = { + 'mode': {'key': 'mode', 'type': 'UpgradeMode'}, + 'rolling_upgrade_policy': {'key': 'rollingUpgradePolicy', 'type': 'RollingUpgradePolicy'}, + 'automatic_os_upgrade_policy': {'key': 'automaticOSUpgradePolicy', 'type': 'AutomaticOSUpgradePolicy'}, + } + + def __init__(self, *, mode=None, rolling_upgrade_policy=None, automatic_os_upgrade_policy=None, **kwargs) -> None: + super(UpgradePolicy, self).__init__(**kwargs) + self.mode = mode + self.rolling_upgrade_policy = rolling_upgrade_policy + self.automatic_os_upgrade_policy = automatic_os_upgrade_policy + + +class Usage(Model): + """Describes Compute Resource Usage. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar unit: Required. An enum describing the unit of usage measurement. + Default value: "Count" . + :vartype unit: str + :param current_value: Required. The current usage of the resource. + :type current_value: int + :param limit: Required. The maximum permitted usage of the resource. + :type limit: long + :param name: Required. The name of the type of usage. + :type name: ~azure.mgmt.compute.v2018_10_01.models.UsageName + """ + + _validation = { + 'unit': {'required': True, 'constant': True}, + 'current_value': {'required': True}, + 'limit': {'required': True}, + 'name': {'required': True}, + } + + _attribute_map = { + 'unit': {'key': 'unit', 'type': 'str'}, + 'current_value': {'key': 'currentValue', 'type': 'int'}, + 'limit': {'key': 'limit', 'type': 'long'}, + 'name': {'key': 'name', 'type': 'UsageName'}, + } + + unit = "Count" + + def __init__(self, *, current_value: int, limit: int, name, **kwargs) -> None: + super(Usage, self).__init__(**kwargs) + self.current_value = current_value + self.limit = limit + self.name = name + + +class UsageName(Model): + """The Usage Names. + + :param value: The name of the resource. + :type value: str + :param localized_value: The localized name of the resource. + :type localized_value: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': 'str'}, + 'localized_value': {'key': 'localizedValue', 'type': 'str'}, + } + + def __init__(self, *, value: str=None, localized_value: str=None, **kwargs) -> None: + super(UsageName, self).__init__(**kwargs) + self.value = value + self.localized_value = localized_value + + +class VaultCertificate(Model): + """Describes a single certificate reference in a Key Vault, and where the + certificate should reside on the VM. + + :param certificate_url: This is the URL of a certificate that has been + uploaded to Key Vault as a secret. For adding a secret to the Key Vault, + see [Add a key or secret to the key + vault](https://docs.microsoft.com/azure/key-vault/key-vault-get-started/#add). + In this case, your certificate needs to be It is the Base64 encoding of + the following JSON Object which is encoded in UTF-8:

    {
    + "data":"",
    "dataType":"pfx",
    + "password":""
    } + :type certificate_url: str + :param certificate_store: For Windows VMs, specifies the certificate store + on the Virtual Machine to which the certificate should be added. The + specified certificate store is implicitly in the LocalMachine account. +

    For Linux VMs, the certificate file is placed under the + /var/lib/waagent directory, with the file name + <UppercaseThumbprint>.crt for the X509 certificate file and + <UppercaseThumbprint>.prv for private key. Both of these files are + .pem formatted. + :type certificate_store: str + """ + + _attribute_map = { + 'certificate_url': {'key': 'certificateUrl', 'type': 'str'}, + 'certificate_store': {'key': 'certificateStore', 'type': 'str'}, + } + + def __init__(self, *, certificate_url: str=None, certificate_store: str=None, **kwargs) -> None: + super(VaultCertificate, self).__init__(**kwargs) + self.certificate_url = certificate_url + self.certificate_store = certificate_store + + +class VaultSecretGroup(Model): + """Describes a set of certificates which are all in the same Key Vault. + + :param source_vault: The relative URL of the Key Vault containing all of + the certificates in VaultCertificates. + :type source_vault: ~azure.mgmt.compute.v2018_10_01.models.SubResource + :param vault_certificates: The list of key vault references in SourceVault + which contain certificates. + :type vault_certificates: + list[~azure.mgmt.compute.v2018_10_01.models.VaultCertificate] + """ + + _attribute_map = { + 'source_vault': {'key': 'sourceVault', 'type': 'SubResource'}, + 'vault_certificates': {'key': 'vaultCertificates', 'type': '[VaultCertificate]'}, + } + + def __init__(self, *, source_vault=None, vault_certificates=None, **kwargs) -> None: + super(VaultSecretGroup, self).__init__(**kwargs) + self.source_vault = source_vault + self.vault_certificates = vault_certificates + + +class VirtualHardDisk(Model): + """Describes the uri of a disk. + + :param uri: Specifies the virtual hard disk's uri. + :type uri: str + """ + + _attribute_map = { + 'uri': {'key': 'uri', 'type': 'str'}, + } + + def __init__(self, *, uri: str=None, **kwargs) -> None: + super(VirtualHardDisk, self).__init__(**kwargs) + self.uri = uri + + +class VirtualMachine(Resource): + """Describes a Virtual Machine. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource Id + :vartype id: str + :ivar name: Resource name + :vartype name: str + :ivar type: Resource type + :vartype type: str + :param location: Required. Resource location + :type location: str + :param tags: Resource tags + :type tags: dict[str, str] + :param plan: Specifies information about the marketplace image used to + create the virtual machine. This element is only used for marketplace + images. Before you can use a marketplace image from an API, you must + enable the image for programmatic use. In the Azure portal, find the + marketplace image that you want to use and then click **Want to deploy + programmatically, Get Started ->**. Enter any required information and + then click **Save**. + :type plan: ~azure.mgmt.compute.v2018_10_01.models.Plan + :param hardware_profile: Specifies the hardware settings for the virtual + machine. + :type hardware_profile: + ~azure.mgmt.compute.v2018_10_01.models.HardwareProfile + :param storage_profile: Specifies the storage settings for the virtual + machine disks. + :type storage_profile: + ~azure.mgmt.compute.v2018_10_01.models.StorageProfile + :param additional_capabilities: Specifies additional capabilities enabled + or disabled on the virtual machine. + :type additional_capabilities: + ~azure.mgmt.compute.v2018_10_01.models.AdditionalCapabilities + :param os_profile: Specifies the operating system settings for the virtual + machine. + :type os_profile: ~azure.mgmt.compute.v2018_10_01.models.OSProfile + :param network_profile: Specifies the network interfaces of the virtual + machine. + :type network_profile: + ~azure.mgmt.compute.v2018_10_01.models.NetworkProfile + :param diagnostics_profile: Specifies the boot diagnostic settings state. +

    Minimum api-version: 2015-06-15. + :type diagnostics_profile: + ~azure.mgmt.compute.v2018_10_01.models.DiagnosticsProfile + :param availability_set: Specifies information about the availability set + that the virtual machine should be assigned to. Virtual machines specified + in the same availability set are allocated to different nodes to maximize + availability. For more information about availability sets, see [Manage + the availability of virtual + machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-manage-availability?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). +

    For more information on Azure planned maintenance, see [Planned + maintenance for virtual machines in + Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-planned-maintenance?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json) +

    Currently, a VM can only be added to availability set at creation + time. An existing VM cannot be added to an availability set. + :type availability_set: ~azure.mgmt.compute.v2018_10_01.models.SubResource + :param proximity_placement_group: Specifies information about the + proximity placement group that the virtual machine should be assigned to. +

    Minimum api-version: 2018-04-01. + :type proximity_placement_group: + ~azure.mgmt.compute.v2018_10_01.models.SubResource + :ivar provisioning_state: The provisioning state, which only appears in + the response. + :vartype provisioning_state: str + :ivar instance_view: The virtual machine instance view. + :vartype instance_view: + ~azure.mgmt.compute.v2018_10_01.models.VirtualMachineInstanceView + :param license_type: Specifies that the image or disk that is being used + was licensed on-premises. This element is only used for images that + contain the Windows Server operating system.

    Possible values are: +

    Windows_Client

    Windows_Server

    If this element + is included in a request for an update, the value must match the initial + value. This value cannot be updated.

    For more information, see + [Azure Hybrid Use Benefit for Windows + Server](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-hybrid-use-benefit-licensing?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json) +

    Minimum api-version: 2015-06-15 + :type license_type: str + :ivar vm_id: Specifies the VM unique ID which is a 128-bits identifier + that is encoded and stored in all Azure IaaS VMs SMBIOS and can be read + using platform BIOS commands. + :vartype vm_id: str + :ivar resources: The virtual machine child extension resources. + :vartype resources: + list[~azure.mgmt.compute.v2018_10_01.models.VirtualMachineExtension] + :param identity: The identity of the virtual machine, if configured. + :type identity: + ~azure.mgmt.compute.v2018_10_01.models.VirtualMachineIdentity + :param zones: The virtual machine zones. + :type zones: list[str] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + 'provisioning_state': {'readonly': True}, + 'instance_view': {'readonly': True}, + 'vm_id': {'readonly': True}, + 'resources': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'plan': {'key': 'plan', 'type': 'Plan'}, + 'hardware_profile': {'key': 'properties.hardwareProfile', 'type': 'HardwareProfile'}, + 'storage_profile': {'key': 'properties.storageProfile', 'type': 'StorageProfile'}, + 'additional_capabilities': {'key': 'properties.additionalCapabilities', 'type': 'AdditionalCapabilities'}, + 'os_profile': {'key': 'properties.osProfile', 'type': 'OSProfile'}, + 'network_profile': {'key': 'properties.networkProfile', 'type': 'NetworkProfile'}, + 'diagnostics_profile': {'key': 'properties.diagnosticsProfile', 'type': 'DiagnosticsProfile'}, + 'availability_set': {'key': 'properties.availabilitySet', 'type': 'SubResource'}, + 'proximity_placement_group': {'key': 'properties.proximityPlacementGroup', 'type': 'SubResource'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'instance_view': {'key': 'properties.instanceView', 'type': 'VirtualMachineInstanceView'}, + 'license_type': {'key': 'properties.licenseType', 'type': 'str'}, + 'vm_id': {'key': 'properties.vmId', 'type': 'str'}, + 'resources': {'key': 'resources', 'type': '[VirtualMachineExtension]'}, + 'identity': {'key': 'identity', 'type': 'VirtualMachineIdentity'}, + 'zones': {'key': 'zones', 'type': '[str]'}, + } + + def __init__(self, *, location: str, tags=None, plan=None, hardware_profile=None, storage_profile=None, additional_capabilities=None, os_profile=None, network_profile=None, diagnostics_profile=None, availability_set=None, proximity_placement_group=None, license_type: str=None, identity=None, zones=None, **kwargs) -> None: + super(VirtualMachine, self).__init__(location=location, tags=tags, **kwargs) + self.plan = plan + self.hardware_profile = hardware_profile + self.storage_profile = storage_profile + self.additional_capabilities = additional_capabilities + self.os_profile = os_profile + self.network_profile = network_profile + self.diagnostics_profile = diagnostics_profile + self.availability_set = availability_set + self.proximity_placement_group = proximity_placement_group + self.provisioning_state = None + self.instance_view = None + self.license_type = license_type + self.vm_id = None + self.resources = None + self.identity = identity + self.zones = zones + + +class VirtualMachineAgentInstanceView(Model): + """The instance view of the VM Agent running on the virtual machine. + + :param vm_agent_version: The VM Agent full version. + :type vm_agent_version: str + :param extension_handlers: The virtual machine extension handler instance + view. + :type extension_handlers: + list[~azure.mgmt.compute.v2018_10_01.models.VirtualMachineExtensionHandlerInstanceView] + :param statuses: The resource status information. + :type statuses: + list[~azure.mgmt.compute.v2018_10_01.models.InstanceViewStatus] + """ + + _attribute_map = { + 'vm_agent_version': {'key': 'vmAgentVersion', 'type': 'str'}, + 'extension_handlers': {'key': 'extensionHandlers', 'type': '[VirtualMachineExtensionHandlerInstanceView]'}, + 'statuses': {'key': 'statuses', 'type': '[InstanceViewStatus]'}, + } + + def __init__(self, *, vm_agent_version: str=None, extension_handlers=None, statuses=None, **kwargs) -> None: + super(VirtualMachineAgentInstanceView, self).__init__(**kwargs) + self.vm_agent_version = vm_agent_version + self.extension_handlers = extension_handlers + self.statuses = statuses + + +class VirtualMachineCaptureParameters(Model): + """Capture Virtual Machine parameters. + + All required parameters must be populated in order to send to Azure. + + :param vhd_prefix: Required. The captured virtual hard disk's name prefix. + :type vhd_prefix: str + :param destination_container_name: Required. The destination container + name. + :type destination_container_name: str + :param overwrite_vhds: Required. Specifies whether to overwrite the + destination virtual hard disk, in case of conflict. + :type overwrite_vhds: bool + """ + + _validation = { + 'vhd_prefix': {'required': True}, + 'destination_container_name': {'required': True}, + 'overwrite_vhds': {'required': True}, + } + + _attribute_map = { + 'vhd_prefix': {'key': 'vhdPrefix', 'type': 'str'}, + 'destination_container_name': {'key': 'destinationContainerName', 'type': 'str'}, + 'overwrite_vhds': {'key': 'overwriteVhds', 'type': 'bool'}, + } + + def __init__(self, *, vhd_prefix: str, destination_container_name: str, overwrite_vhds: bool, **kwargs) -> None: + super(VirtualMachineCaptureParameters, self).__init__(**kwargs) + self.vhd_prefix = vhd_prefix + self.destination_container_name = destination_container_name + self.overwrite_vhds = overwrite_vhds + + +class VirtualMachineCaptureResult(SubResource): + """Output of virtual machine capture operation. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :param id: Resource Id + :type id: str + :ivar schema: the schema of the captured virtual machine + :vartype schema: str + :ivar content_version: the version of the content + :vartype content_version: str + :ivar parameters: parameters of the captured virtual machine + :vartype parameters: object + :ivar resources: a list of resource items of the captured virtual machine + :vartype resources: list[object] + """ + + _validation = { + 'schema': {'readonly': True}, + 'content_version': {'readonly': True}, + 'parameters': {'readonly': True}, + 'resources': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'schema': {'key': '$schema', 'type': 'str'}, + 'content_version': {'key': 'contentVersion', 'type': 'str'}, + 'parameters': {'key': 'parameters', 'type': 'object'}, + 'resources': {'key': 'resources', 'type': '[object]'}, + } + + def __init__(self, *, id: str=None, **kwargs) -> None: + super(VirtualMachineCaptureResult, self).__init__(id=id, **kwargs) + self.schema = None + self.content_version = None + self.parameters = None + self.resources = None + + +class VirtualMachineExtension(Resource): + """Describes a Virtual Machine Extension. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource Id + :vartype id: str + :ivar name: Resource name + :vartype name: str + :ivar type: Resource type + :vartype type: str + :param location: Required. Resource location + :type location: str + :param tags: Resource tags + :type tags: dict[str, str] + :param force_update_tag: How the extension handler should be forced to + update even if the extension configuration has not changed. + :type force_update_tag: str + :param publisher: The name of the extension handler publisher. + :type publisher: str + :param virtual_machine_extension_type: Specifies the type of the + extension; an example is "CustomScriptExtension". + :type virtual_machine_extension_type: str + :param type_handler_version: Specifies the version of the script handler. + :type type_handler_version: str + :param auto_upgrade_minor_version: Indicates whether the extension should + use a newer minor version if one is available at deployment time. Once + deployed, however, the extension will not upgrade minor versions unless + redeployed, even with this property set to true. + :type auto_upgrade_minor_version: bool + :param settings: Json formatted public settings for the extension. + :type settings: object + :param protected_settings: The extension can contain either + protectedSettings or protectedSettingsFromKeyVault or no protected + settings at all. + :type protected_settings: object + :ivar provisioning_state: The provisioning state, which only appears in + the response. + :vartype provisioning_state: str + :param instance_view: The virtual machine extension instance view. + :type instance_view: + ~azure.mgmt.compute.v2018_10_01.models.VirtualMachineExtensionInstanceView + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'force_update_tag': {'key': 'properties.forceUpdateTag', 'type': 'str'}, + 'publisher': {'key': 'properties.publisher', 'type': 'str'}, + 'virtual_machine_extension_type': {'key': 'properties.type', 'type': 'str'}, + 'type_handler_version': {'key': 'properties.typeHandlerVersion', 'type': 'str'}, + 'auto_upgrade_minor_version': {'key': 'properties.autoUpgradeMinorVersion', 'type': 'bool'}, + 'settings': {'key': 'properties.settings', 'type': 'object'}, + 'protected_settings': {'key': 'properties.protectedSettings', 'type': 'object'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'instance_view': {'key': 'properties.instanceView', 'type': 'VirtualMachineExtensionInstanceView'}, + } + + def __init__(self, *, location: str, tags=None, force_update_tag: str=None, publisher: str=None, virtual_machine_extension_type: str=None, type_handler_version: str=None, auto_upgrade_minor_version: bool=None, settings=None, protected_settings=None, instance_view=None, **kwargs) -> None: + super(VirtualMachineExtension, self).__init__(location=location, tags=tags, **kwargs) + self.force_update_tag = force_update_tag + self.publisher = publisher + self.virtual_machine_extension_type = virtual_machine_extension_type + self.type_handler_version = type_handler_version + self.auto_upgrade_minor_version = auto_upgrade_minor_version + self.settings = settings + self.protected_settings = protected_settings + self.provisioning_state = None + self.instance_view = instance_view + + +class VirtualMachineExtensionHandlerInstanceView(Model): + """The instance view of a virtual machine extension handler. + + :param type: Specifies the type of the extension; an example is + "CustomScriptExtension". + :type type: str + :param type_handler_version: Specifies the version of the script handler. + :type type_handler_version: str + :param status: The extension handler status. + :type status: ~azure.mgmt.compute.v2018_10_01.models.InstanceViewStatus + """ + + _attribute_map = { + 'type': {'key': 'type', 'type': 'str'}, + 'type_handler_version': {'key': 'typeHandlerVersion', 'type': 'str'}, + 'status': {'key': 'status', 'type': 'InstanceViewStatus'}, + } + + def __init__(self, *, type: str=None, type_handler_version: str=None, status=None, **kwargs) -> None: + super(VirtualMachineExtensionHandlerInstanceView, self).__init__(**kwargs) + self.type = type + self.type_handler_version = type_handler_version + self.status = status + + +class VirtualMachineExtensionImage(Resource): + """Describes a Virtual Machine Extension Image. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource Id + :vartype id: str + :ivar name: Resource name + :vartype name: str + :ivar type: Resource type + :vartype type: str + :param location: Required. Resource location + :type location: str + :param tags: Resource tags + :type tags: dict[str, str] + :param operating_system: Required. The operating system this extension + supports. + :type operating_system: str + :param compute_role: Required. The type of role (IaaS or PaaS) this + extension supports. + :type compute_role: str + :param handler_schema: Required. The schema defined by publisher, where + extension consumers should provide settings in a matching schema. + :type handler_schema: str + :param vm_scale_set_enabled: Whether the extension can be used on xRP + VMScaleSets. By default existing extensions are usable on scalesets, but + there might be cases where a publisher wants to explicitly indicate the + extension is only enabled for CRP VMs but not VMSS. + :type vm_scale_set_enabled: bool + :param supports_multiple_extensions: Whether the handler can support + multiple extensions. + :type supports_multiple_extensions: bool + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + 'operating_system': {'required': True}, + 'compute_role': {'required': True}, + 'handler_schema': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'operating_system': {'key': 'properties.operatingSystem', 'type': 'str'}, + 'compute_role': {'key': 'properties.computeRole', 'type': 'str'}, + 'handler_schema': {'key': 'properties.handlerSchema', 'type': 'str'}, + 'vm_scale_set_enabled': {'key': 'properties.vmScaleSetEnabled', 'type': 'bool'}, + 'supports_multiple_extensions': {'key': 'properties.supportsMultipleExtensions', 'type': 'bool'}, + } + + def __init__(self, *, location: str, operating_system: str, compute_role: str, handler_schema: str, tags=None, vm_scale_set_enabled: bool=None, supports_multiple_extensions: bool=None, **kwargs) -> None: + super(VirtualMachineExtensionImage, self).__init__(location=location, tags=tags, **kwargs) + self.operating_system = operating_system + self.compute_role = compute_role + self.handler_schema = handler_schema + self.vm_scale_set_enabled = vm_scale_set_enabled + self.supports_multiple_extensions = supports_multiple_extensions + + +class VirtualMachineExtensionInstanceView(Model): + """The instance view of a virtual machine extension. + + :param name: The virtual machine extension name. + :type name: str + :param type: Specifies the type of the extension; an example is + "CustomScriptExtension". + :type type: str + :param type_handler_version: Specifies the version of the script handler. + :type type_handler_version: str + :param substatuses: The resource status information. + :type substatuses: + list[~azure.mgmt.compute.v2018_10_01.models.InstanceViewStatus] + :param statuses: The resource status information. + :type statuses: + list[~azure.mgmt.compute.v2018_10_01.models.InstanceViewStatus] + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'type_handler_version': {'key': 'typeHandlerVersion', 'type': 'str'}, + 'substatuses': {'key': 'substatuses', 'type': '[InstanceViewStatus]'}, + 'statuses': {'key': 'statuses', 'type': '[InstanceViewStatus]'}, + } + + def __init__(self, *, name: str=None, type: str=None, type_handler_version: str=None, substatuses=None, statuses=None, **kwargs) -> None: + super(VirtualMachineExtensionInstanceView, self).__init__(**kwargs) + self.name = name + self.type = type + self.type_handler_version = type_handler_version + self.substatuses = substatuses + self.statuses = statuses + + +class VirtualMachineExtensionsListResult(Model): + """The List Extension operation response. + + :param value: The list of extensions + :type value: + list[~azure.mgmt.compute.v2018_10_01.models.VirtualMachineExtension] + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[VirtualMachineExtension]'}, + } + + def __init__(self, *, value=None, **kwargs) -> None: + super(VirtualMachineExtensionsListResult, self).__init__(**kwargs) + self.value = value + + +class VirtualMachineExtensionUpdate(UpdateResource): + """Describes a Virtual Machine Extension. + + :param tags: Resource tags + :type tags: dict[str, str] + :param force_update_tag: How the extension handler should be forced to + update even if the extension configuration has not changed. + :type force_update_tag: str + :param publisher: The name of the extension handler publisher. + :type publisher: str + :param type: Specifies the type of the extension; an example is + "CustomScriptExtension". + :type type: str + :param type_handler_version: Specifies the version of the script handler. + :type type_handler_version: str + :param auto_upgrade_minor_version: Indicates whether the extension should + use a newer minor version if one is available at deployment time. Once + deployed, however, the extension will not upgrade minor versions unless + redeployed, even with this property set to true. + :type auto_upgrade_minor_version: bool + :param settings: Json formatted public settings for the extension. + :type settings: object + :param protected_settings: The extension can contain either + protectedSettings or protectedSettingsFromKeyVault or no protected + settings at all. + :type protected_settings: object + """ + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + 'force_update_tag': {'key': 'properties.forceUpdateTag', 'type': 'str'}, + 'publisher': {'key': 'properties.publisher', 'type': 'str'}, + 'type': {'key': 'properties.type', 'type': 'str'}, + 'type_handler_version': {'key': 'properties.typeHandlerVersion', 'type': 'str'}, + 'auto_upgrade_minor_version': {'key': 'properties.autoUpgradeMinorVersion', 'type': 'bool'}, + 'settings': {'key': 'properties.settings', 'type': 'object'}, + 'protected_settings': {'key': 'properties.protectedSettings', 'type': 'object'}, + } + + def __init__(self, *, tags=None, force_update_tag: str=None, publisher: str=None, type: str=None, type_handler_version: str=None, auto_upgrade_minor_version: bool=None, settings=None, protected_settings=None, **kwargs) -> None: + super(VirtualMachineExtensionUpdate, self).__init__(tags=tags, **kwargs) + self.force_update_tag = force_update_tag + self.publisher = publisher + self.type = type + self.type_handler_version = type_handler_version + self.auto_upgrade_minor_version = auto_upgrade_minor_version + self.settings = settings + self.protected_settings = protected_settings + + +class VirtualMachineHealthStatus(Model): + """The health status of the VM. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar status: The health status information for the VM. + :vartype status: ~azure.mgmt.compute.v2018_10_01.models.InstanceViewStatus + """ + + _validation = { + 'status': {'readonly': True}, + } + + _attribute_map = { + 'status': {'key': 'status', 'type': 'InstanceViewStatus'}, + } + + def __init__(self, **kwargs) -> None: + super(VirtualMachineHealthStatus, self).__init__(**kwargs) + self.status = None + + +class VirtualMachineIdentity(Model): + """Identity for the virtual machine. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar principal_id: The principal id of virtual machine identity. This + property will only be provided for a system assigned identity. + :vartype principal_id: str + :ivar tenant_id: The tenant id associated with the virtual machine. This + property will only be provided for a system assigned identity. + :vartype tenant_id: str + :param type: The type of identity used for the virtual machine. The type + 'SystemAssigned, UserAssigned' includes both an implicitly created + identity and a set of user assigned identities. The type 'None' will + remove any identities from the virtual machine. Possible values include: + 'SystemAssigned', 'UserAssigned', 'SystemAssigned, UserAssigned', 'None' + :type type: str or + ~azure.mgmt.compute.v2018_10_01.models.ResourceIdentityType + :param user_assigned_identities: The list of user identities associated + with the Virtual Machine. The user identity dictionary key references will + be ARM resource ids in the form: + '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'. + :type user_assigned_identities: dict[str, + ~azure.mgmt.compute.v2018_10_01.models.VirtualMachineIdentityUserAssignedIdentitiesValue] + """ + + _validation = { + 'principal_id': {'readonly': True}, + 'tenant_id': {'readonly': True}, + } + + _attribute_map = { + 'principal_id': {'key': 'principalId', 'type': 'str'}, + 'tenant_id': {'key': 'tenantId', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'ResourceIdentityType'}, + 'user_assigned_identities': {'key': 'userAssignedIdentities', 'type': '{VirtualMachineIdentityUserAssignedIdentitiesValue}'}, + } + + def __init__(self, *, type=None, user_assigned_identities=None, **kwargs) -> None: + super(VirtualMachineIdentity, self).__init__(**kwargs) + self.principal_id = None + self.tenant_id = None + self.type = type + self.user_assigned_identities = user_assigned_identities + + +class VirtualMachineIdentityUserAssignedIdentitiesValue(Model): + """VirtualMachineIdentityUserAssignedIdentitiesValue. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar principal_id: The principal id of user assigned identity. + :vartype principal_id: str + :ivar client_id: The client id of user assigned identity. + :vartype client_id: str + """ + + _validation = { + 'principal_id': {'readonly': True}, + 'client_id': {'readonly': True}, + } + + _attribute_map = { + 'principal_id': {'key': 'principalId', 'type': 'str'}, + 'client_id': {'key': 'clientId', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(VirtualMachineIdentityUserAssignedIdentitiesValue, self).__init__(**kwargs) + self.principal_id = None + self.client_id = None + + +class VirtualMachineImageResource(SubResource): + """Virtual machine image resource information. + + All required parameters must be populated in order to send to Azure. + + :param id: Resource Id + :type id: str + :param name: Required. The name of the resource. + :type name: str + :param location: Required. The supported Azure location of the resource. + :type location: str + :param tags: Specifies the tags that are assigned to the virtual machine. + For more information about using tags, see [Using tags to organize your + Azure + resources](https://docs.microsoft.com/azure/azure-resource-manager/resource-group-using-tags.md). + :type tags: dict[str, str] + """ + + _validation = { + 'name': {'required': True}, + 'location': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__(self, *, name: str, location: str, id: str=None, tags=None, **kwargs) -> None: + super(VirtualMachineImageResource, self).__init__(id=id, **kwargs) + self.name = name + self.location = location + self.tags = tags + + +class VirtualMachineImage(VirtualMachineImageResource): + """Describes a Virtual Machine Image. + + All required parameters must be populated in order to send to Azure. + + :param id: Resource Id + :type id: str + :param name: Required. The name of the resource. + :type name: str + :param location: Required. The supported Azure location of the resource. + :type location: str + :param tags: Specifies the tags that are assigned to the virtual machine. + For more information about using tags, see [Using tags to organize your + Azure + resources](https://docs.microsoft.com/azure/azure-resource-manager/resource-group-using-tags.md). + :type tags: dict[str, str] + :param plan: + :type plan: ~azure.mgmt.compute.v2018_10_01.models.PurchasePlan + :param os_disk_image: + :type os_disk_image: ~azure.mgmt.compute.v2018_10_01.models.OSDiskImage + :param data_disk_images: + :type data_disk_images: + list[~azure.mgmt.compute.v2018_10_01.models.DataDiskImage] + :param automatic_os_upgrade_properties: + :type automatic_os_upgrade_properties: + ~azure.mgmt.compute.v2018_10_01.models.AutomaticOSUpgradeProperties + """ + + _validation = { + 'name': {'required': True}, + 'location': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'plan': {'key': 'properties.plan', 'type': 'PurchasePlan'}, + 'os_disk_image': {'key': 'properties.osDiskImage', 'type': 'OSDiskImage'}, + 'data_disk_images': {'key': 'properties.dataDiskImages', 'type': '[DataDiskImage]'}, + 'automatic_os_upgrade_properties': {'key': 'properties.automaticOSUpgradeProperties', 'type': 'AutomaticOSUpgradeProperties'}, + } + + def __init__(self, *, name: str, location: str, id: str=None, tags=None, plan=None, os_disk_image=None, data_disk_images=None, automatic_os_upgrade_properties=None, **kwargs) -> None: + super(VirtualMachineImage, self).__init__(id=id, name=name, location=location, tags=tags, **kwargs) + self.plan = plan + self.os_disk_image = os_disk_image + self.data_disk_images = data_disk_images + self.automatic_os_upgrade_properties = automatic_os_upgrade_properties + + +class VirtualMachineInstanceView(Model): + """The instance view of a virtual machine. + + :param platform_update_domain: Specifies the update domain of the virtual + machine. + :type platform_update_domain: int + :param platform_fault_domain: Specifies the fault domain of the virtual + machine. + :type platform_fault_domain: int + :param computer_name: The computer name assigned to the virtual machine. + :type computer_name: str + :param os_name: The Operating System running on the virtual machine. + :type os_name: str + :param os_version: The version of Operating System running on the virtual + machine. + :type os_version: str + :param rdp_thumb_print: The Remote desktop certificate thumbprint. + :type rdp_thumb_print: str + :param vm_agent: The VM Agent running on the virtual machine. + :type vm_agent: + ~azure.mgmt.compute.v2018_10_01.models.VirtualMachineAgentInstanceView + :param maintenance_redeploy_status: The Maintenance Operation status on + the virtual machine. + :type maintenance_redeploy_status: + ~azure.mgmt.compute.v2018_10_01.models.MaintenanceRedeployStatus + :param disks: The virtual machine disk information. + :type disks: list[~azure.mgmt.compute.v2018_10_01.models.DiskInstanceView] + :param extensions: The extensions information. + :type extensions: + list[~azure.mgmt.compute.v2018_10_01.models.VirtualMachineExtensionInstanceView] + :param boot_diagnostics: Boot Diagnostics is a debugging feature which + allows you to view Console Output and Screenshot to diagnose VM status. +

    You can easily view the output of your console log.

    + Azure also enables you to see a screenshot of the VM from the hypervisor. + :type boot_diagnostics: + ~azure.mgmt.compute.v2018_10_01.models.BootDiagnosticsInstanceView + :param statuses: The resource status information. + :type statuses: + list[~azure.mgmt.compute.v2018_10_01.models.InstanceViewStatus] + """ + + _attribute_map = { + 'platform_update_domain': {'key': 'platformUpdateDomain', 'type': 'int'}, + 'platform_fault_domain': {'key': 'platformFaultDomain', 'type': 'int'}, + 'computer_name': {'key': 'computerName', 'type': 'str'}, + 'os_name': {'key': 'osName', 'type': 'str'}, + 'os_version': {'key': 'osVersion', 'type': 'str'}, + 'rdp_thumb_print': {'key': 'rdpThumbPrint', 'type': 'str'}, + 'vm_agent': {'key': 'vmAgent', 'type': 'VirtualMachineAgentInstanceView'}, + 'maintenance_redeploy_status': {'key': 'maintenanceRedeployStatus', 'type': 'MaintenanceRedeployStatus'}, + 'disks': {'key': 'disks', 'type': '[DiskInstanceView]'}, + 'extensions': {'key': 'extensions', 'type': '[VirtualMachineExtensionInstanceView]'}, + 'boot_diagnostics': {'key': 'bootDiagnostics', 'type': 'BootDiagnosticsInstanceView'}, + 'statuses': {'key': 'statuses', 'type': '[InstanceViewStatus]'}, + } + + def __init__(self, *, platform_update_domain: int=None, platform_fault_domain: int=None, computer_name: str=None, os_name: str=None, os_version: str=None, rdp_thumb_print: str=None, vm_agent=None, maintenance_redeploy_status=None, disks=None, extensions=None, boot_diagnostics=None, statuses=None, **kwargs) -> None: + super(VirtualMachineInstanceView, self).__init__(**kwargs) + self.platform_update_domain = platform_update_domain + self.platform_fault_domain = platform_fault_domain + self.computer_name = computer_name + self.os_name = os_name + self.os_version = os_version + self.rdp_thumb_print = rdp_thumb_print + self.vm_agent = vm_agent + self.maintenance_redeploy_status = maintenance_redeploy_status + self.disks = disks + self.extensions = extensions + self.boot_diagnostics = boot_diagnostics + self.statuses = statuses + + +class VirtualMachineReimageParameters(Model): + """Parameters for Reimaging Virtual Machine. NOTE: Virtual Machine OS disk + will always be reimaged. + + :param temp_disk: Specifies whether to reimage temp disk. Default value: + false. Note: This temp disk reimage parameter is only supported for + VM/VMSS with Ephemeral OS disk. + :type temp_disk: bool + """ + + _attribute_map = { + 'temp_disk': {'key': 'tempDisk', 'type': 'bool'}, + } + + def __init__(self, *, temp_disk: bool=None, **kwargs) -> None: + super(VirtualMachineReimageParameters, self).__init__(**kwargs) + self.temp_disk = temp_disk + + +class VirtualMachineScaleSet(Resource): + """Describes a Virtual Machine Scale Set. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource Id + :vartype id: str + :ivar name: Resource name + :vartype name: str + :ivar type: Resource type + :vartype type: str + :param location: Required. Resource location + :type location: str + :param tags: Resource tags + :type tags: dict[str, str] + :param sku: The virtual machine scale set sku. + :type sku: ~azure.mgmt.compute.v2018_10_01.models.Sku + :param plan: Specifies information about the marketplace image used to + create the virtual machine. This element is only used for marketplace + images. Before you can use a marketplace image from an API, you must + enable the image for programmatic use. In the Azure portal, find the + marketplace image that you want to use and then click **Want to deploy + programmatically, Get Started ->**. Enter any required information and + then click **Save**. + :type plan: ~azure.mgmt.compute.v2018_10_01.models.Plan + :param upgrade_policy: The upgrade policy. + :type upgrade_policy: ~azure.mgmt.compute.v2018_10_01.models.UpgradePolicy + :param virtual_machine_profile: The virtual machine profile. + :type virtual_machine_profile: + ~azure.mgmt.compute.v2018_10_01.models.VirtualMachineScaleSetVMProfile + :ivar provisioning_state: The provisioning state, which only appears in + the response. + :vartype provisioning_state: str + :param overprovision: Specifies whether the Virtual Machine Scale Set + should be overprovisioned. + :type overprovision: bool + :param do_not_run_extensions_on_overprovisioned_vms: When Overprovision is + enabled, extensions are launched only on the requested number of VMs which + are finally kept. This property will hence ensure that the extensions do + not run on the extra overprovisioned VMs. + :type do_not_run_extensions_on_overprovisioned_vms: bool + :ivar unique_id: Specifies the ID which uniquely identifies a Virtual + Machine Scale Set. + :vartype unique_id: str + :param single_placement_group: When true this limits the scale set to a + single placement group, of max size 100 virtual machines. + :type single_placement_group: bool + :param zone_balance: Whether to force strictly even Virtual Machine + distribution cross x-zones in case there is zone outage. + :type zone_balance: bool + :param platform_fault_domain_count: Fault Domain count for each placement + group. + :type platform_fault_domain_count: int + :param proximity_placement_group: Specifies information about the + proximity placement group that the virtual machine scale set should be + assigned to.

    Minimum api-version: 2018-04-01. + :type proximity_placement_group: + ~azure.mgmt.compute.v2018_10_01.models.SubResource + :param identity: The identity of the virtual machine scale set, if + configured. + :type identity: + ~azure.mgmt.compute.v2018_10_01.models.VirtualMachineScaleSetIdentity + :param zones: The virtual machine scale set zones. + :type zones: list[str] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + 'provisioning_state': {'readonly': True}, + 'unique_id': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'sku': {'key': 'sku', 'type': 'Sku'}, + 'plan': {'key': 'plan', 'type': 'Plan'}, + 'upgrade_policy': {'key': 'properties.upgradePolicy', 'type': 'UpgradePolicy'}, + 'virtual_machine_profile': {'key': 'properties.virtualMachineProfile', 'type': 'VirtualMachineScaleSetVMProfile'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'overprovision': {'key': 'properties.overprovision', 'type': 'bool'}, + 'do_not_run_extensions_on_overprovisioned_vms': {'key': 'properties.doNotRunExtensionsOnOverprovisionedVMs', 'type': 'bool'}, + 'unique_id': {'key': 'properties.uniqueId', 'type': 'str'}, + 'single_placement_group': {'key': 'properties.singlePlacementGroup', 'type': 'bool'}, + 'zone_balance': {'key': 'properties.zoneBalance', 'type': 'bool'}, + 'platform_fault_domain_count': {'key': 'properties.platformFaultDomainCount', 'type': 'int'}, + 'proximity_placement_group': {'key': 'properties.proximityPlacementGroup', 'type': 'SubResource'}, + 'identity': {'key': 'identity', 'type': 'VirtualMachineScaleSetIdentity'}, + 'zones': {'key': 'zones', 'type': '[str]'}, + } + + def __init__(self, *, location: str, tags=None, sku=None, plan=None, upgrade_policy=None, virtual_machine_profile=None, overprovision: bool=None, do_not_run_extensions_on_overprovisioned_vms: bool=None, single_placement_group: bool=None, zone_balance: bool=None, platform_fault_domain_count: int=None, proximity_placement_group=None, identity=None, zones=None, **kwargs) -> None: + super(VirtualMachineScaleSet, self).__init__(location=location, tags=tags, **kwargs) + self.sku = sku + self.plan = plan + self.upgrade_policy = upgrade_policy + self.virtual_machine_profile = virtual_machine_profile + self.provisioning_state = None + self.overprovision = overprovision + self.do_not_run_extensions_on_overprovisioned_vms = do_not_run_extensions_on_overprovisioned_vms + self.unique_id = None + self.single_placement_group = single_placement_group + self.zone_balance = zone_balance + self.platform_fault_domain_count = platform_fault_domain_count + self.proximity_placement_group = proximity_placement_group + self.identity = identity + self.zones = zones + + +class VirtualMachineScaleSetDataDisk(Model): + """Describes a virtual machine scale set data disk. + + All required parameters must be populated in order to send to Azure. + + :param name: The disk name. + :type name: str + :param lun: Required. Specifies the logical unit number of the data disk. + This value is used to identify data disks within the VM and therefore must + be unique for each data disk attached to a VM. + :type lun: int + :param caching: Specifies the caching requirements.

    Possible + values are:

    **None**

    **ReadOnly**

    **ReadWrite** +

    Default: **None for Standard storage. ReadOnly for Premium + storage**. Possible values include: 'None', 'ReadOnly', 'ReadWrite' + :type caching: str or ~azure.mgmt.compute.v2018_10_01.models.CachingTypes + :param write_accelerator_enabled: Specifies whether writeAccelerator + should be enabled or disabled on the disk. + :type write_accelerator_enabled: bool + :param create_option: Required. The create option. Possible values + include: 'FromImage', 'Empty', 'Attach' + :type create_option: str or + ~azure.mgmt.compute.v2018_10_01.models.DiskCreateOptionTypes + :param disk_size_gb: Specifies the size of an empty data disk in + gigabytes. This element can be used to overwrite the size of the disk in a + virtual machine image.

    This value cannot be larger than 1023 GB + :type disk_size_gb: int + :param managed_disk: The managed disk parameters. + :type managed_disk: + ~azure.mgmt.compute.v2018_10_01.models.VirtualMachineScaleSetManagedDiskParameters + """ + + _validation = { + 'lun': {'required': True}, + 'create_option': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'lun': {'key': 'lun', 'type': 'int'}, + 'caching': {'key': 'caching', 'type': 'CachingTypes'}, + 'write_accelerator_enabled': {'key': 'writeAcceleratorEnabled', 'type': 'bool'}, + 'create_option': {'key': 'createOption', 'type': 'str'}, + 'disk_size_gb': {'key': 'diskSizeGB', 'type': 'int'}, + 'managed_disk': {'key': 'managedDisk', 'type': 'VirtualMachineScaleSetManagedDiskParameters'}, + } + + def __init__(self, *, lun: int, create_option, name: str=None, caching=None, write_accelerator_enabled: bool=None, disk_size_gb: int=None, managed_disk=None, **kwargs) -> None: + super(VirtualMachineScaleSetDataDisk, self).__init__(**kwargs) + self.name = name + self.lun = lun + self.caching = caching + self.write_accelerator_enabled = write_accelerator_enabled + self.create_option = create_option + self.disk_size_gb = disk_size_gb + self.managed_disk = managed_disk + + +class VirtualMachineScaleSetExtension(SubResourceReadOnly): + """Describes a Virtual Machine Scale Set Extension. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource Id + :vartype id: str + :param name: The name of the extension. + :type name: str + :param force_update_tag: If a value is provided and is different from the + previous value, the extension handler will be forced to update even if the + extension configuration has not changed. + :type force_update_tag: str + :param publisher: The name of the extension handler publisher. + :type publisher: str + :param type: Specifies the type of the extension; an example is + "CustomScriptExtension". + :type type: str + :param type_handler_version: Specifies the version of the script handler. + :type type_handler_version: str + :param auto_upgrade_minor_version: Indicates whether the extension should + use a newer minor version if one is available at deployment time. Once + deployed, however, the extension will not upgrade minor versions unless + redeployed, even with this property set to true. + :type auto_upgrade_minor_version: bool + :param settings: Json formatted public settings for the extension. + :type settings: object + :param protected_settings: The extension can contain either + protectedSettings or protectedSettingsFromKeyVault or no protected + settings at all. + :type protected_settings: object + :ivar provisioning_state: The provisioning state, which only appears in + the response. + :vartype provisioning_state: str + :param provision_after_extensions: Collection of extension names after + which this extension needs to be provisioned. + :type provision_after_extensions: list[str] + """ + + _validation = { + 'id': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'force_update_tag': {'key': 'properties.forceUpdateTag', 'type': 'str'}, + 'publisher': {'key': 'properties.publisher', 'type': 'str'}, + 'type': {'key': 'properties.type', 'type': 'str'}, + 'type_handler_version': {'key': 'properties.typeHandlerVersion', 'type': 'str'}, + 'auto_upgrade_minor_version': {'key': 'properties.autoUpgradeMinorVersion', 'type': 'bool'}, + 'settings': {'key': 'properties.settings', 'type': 'object'}, + 'protected_settings': {'key': 'properties.protectedSettings', 'type': 'object'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'provision_after_extensions': {'key': 'properties.provisionAfterExtensions', 'type': '[str]'}, + } + + def __init__(self, *, name: str=None, force_update_tag: str=None, publisher: str=None, type: str=None, type_handler_version: str=None, auto_upgrade_minor_version: bool=None, settings=None, protected_settings=None, provision_after_extensions=None, **kwargs) -> None: + super(VirtualMachineScaleSetExtension, self).__init__(**kwargs) + self.name = name + self.force_update_tag = force_update_tag + self.publisher = publisher + self.type = type + self.type_handler_version = type_handler_version + self.auto_upgrade_minor_version = auto_upgrade_minor_version + self.settings = settings + self.protected_settings = protected_settings + self.provisioning_state = None + self.provision_after_extensions = provision_after_extensions + + +class VirtualMachineScaleSetExtensionProfile(Model): + """Describes a virtual machine scale set extension profile. + + :param extensions: The virtual machine scale set child extension + resources. + :type extensions: + list[~azure.mgmt.compute.v2018_10_01.models.VirtualMachineScaleSetExtension] + """ + + _attribute_map = { + 'extensions': {'key': 'extensions', 'type': '[VirtualMachineScaleSetExtension]'}, + } + + def __init__(self, *, extensions=None, **kwargs) -> None: + super(VirtualMachineScaleSetExtensionProfile, self).__init__(**kwargs) + self.extensions = extensions + + +class VirtualMachineScaleSetIdentity(Model): + """Identity for the virtual machine scale set. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar principal_id: The principal id of virtual machine scale set + identity. This property will only be provided for a system assigned + identity. + :vartype principal_id: str + :ivar tenant_id: The tenant id associated with the virtual machine scale + set. This property will only be provided for a system assigned identity. + :vartype tenant_id: str + :param type: The type of identity used for the virtual machine scale set. + The type 'SystemAssigned, UserAssigned' includes both an implicitly + created identity and a set of user assigned identities. The type 'None' + will remove any identities from the virtual machine scale set. Possible + values include: 'SystemAssigned', 'UserAssigned', 'SystemAssigned, + UserAssigned', 'None' + :type type: str or + ~azure.mgmt.compute.v2018_10_01.models.ResourceIdentityType + :param user_assigned_identities: The list of user identities associated + with the virtual machine scale set. The user identity dictionary key + references will be ARM resource ids in the form: + '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'. + :type user_assigned_identities: dict[str, + ~azure.mgmt.compute.v2018_10_01.models.VirtualMachineScaleSetIdentityUserAssignedIdentitiesValue] + """ + + _validation = { + 'principal_id': {'readonly': True}, + 'tenant_id': {'readonly': True}, + } + + _attribute_map = { + 'principal_id': {'key': 'principalId', 'type': 'str'}, + 'tenant_id': {'key': 'tenantId', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'ResourceIdentityType'}, + 'user_assigned_identities': {'key': 'userAssignedIdentities', 'type': '{VirtualMachineScaleSetIdentityUserAssignedIdentitiesValue}'}, + } + + def __init__(self, *, type=None, user_assigned_identities=None, **kwargs) -> None: + super(VirtualMachineScaleSetIdentity, self).__init__(**kwargs) + self.principal_id = None + self.tenant_id = None + self.type = type + self.user_assigned_identities = user_assigned_identities + + +class VirtualMachineScaleSetIdentityUserAssignedIdentitiesValue(Model): + """VirtualMachineScaleSetIdentityUserAssignedIdentitiesValue. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar principal_id: The principal id of user assigned identity. + :vartype principal_id: str + :ivar client_id: The client id of user assigned identity. + :vartype client_id: str + """ + + _validation = { + 'principal_id': {'readonly': True}, + 'client_id': {'readonly': True}, + } + + _attribute_map = { + 'principal_id': {'key': 'principalId', 'type': 'str'}, + 'client_id': {'key': 'clientId', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(VirtualMachineScaleSetIdentityUserAssignedIdentitiesValue, self).__init__(**kwargs) + self.principal_id = None + self.client_id = None + + +class VirtualMachineScaleSetInstanceView(Model): + """The instance view of a virtual machine scale set. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar virtual_machine: The instance view status summary for the virtual + machine scale set. + :vartype virtual_machine: + ~azure.mgmt.compute.v2018_10_01.models.VirtualMachineScaleSetInstanceViewStatusesSummary + :ivar extensions: The extensions information. + :vartype extensions: + list[~azure.mgmt.compute.v2018_10_01.models.VirtualMachineScaleSetVMExtensionsSummary] + :param statuses: The resource status information. + :type statuses: + list[~azure.mgmt.compute.v2018_10_01.models.InstanceViewStatus] + """ + + _validation = { + 'virtual_machine': {'readonly': True}, + 'extensions': {'readonly': True}, + } + + _attribute_map = { + 'virtual_machine': {'key': 'virtualMachine', 'type': 'VirtualMachineScaleSetInstanceViewStatusesSummary'}, + 'extensions': {'key': 'extensions', 'type': '[VirtualMachineScaleSetVMExtensionsSummary]'}, + 'statuses': {'key': 'statuses', 'type': '[InstanceViewStatus]'}, + } + + def __init__(self, *, statuses=None, **kwargs) -> None: + super(VirtualMachineScaleSetInstanceView, self).__init__(**kwargs) + self.virtual_machine = None + self.extensions = None + self.statuses = statuses + + +class VirtualMachineScaleSetInstanceViewStatusesSummary(Model): + """Instance view statuses summary for virtual machines of a virtual machine + scale set. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar statuses_summary: The extensions information. + :vartype statuses_summary: + list[~azure.mgmt.compute.v2018_10_01.models.VirtualMachineStatusCodeCount] + """ + + _validation = { + 'statuses_summary': {'readonly': True}, + } + + _attribute_map = { + 'statuses_summary': {'key': 'statusesSummary', 'type': '[VirtualMachineStatusCodeCount]'}, + } + + def __init__(self, **kwargs) -> None: + super(VirtualMachineScaleSetInstanceViewStatusesSummary, self).__init__(**kwargs) + self.statuses_summary = None + + +class VirtualMachineScaleSetIPConfiguration(SubResource): + """Describes a virtual machine scale set network profile's IP configuration. + + All required parameters must be populated in order to send to Azure. + + :param id: Resource Id + :type id: str + :param name: Required. The IP configuration name. + :type name: str + :param subnet: Specifies the identifier of the subnet. + :type subnet: ~azure.mgmt.compute.v2018_10_01.models.ApiEntityReference + :param primary: Specifies the primary network interface in case the + virtual machine has more than 1 network interface. + :type primary: bool + :param public_ip_address_configuration: The publicIPAddressConfiguration. + :type public_ip_address_configuration: + ~azure.mgmt.compute.v2018_10_01.models.VirtualMachineScaleSetPublicIPAddressConfiguration + :param private_ip_address_version: Available from Api-Version 2017-03-30 + onwards, it represents whether the specific ipconfiguration is IPv4 or + IPv6. Default is taken as IPv4. Possible values are: 'IPv4' and 'IPv6'. + Possible values include: 'IPv4', 'IPv6' + :type private_ip_address_version: str or + ~azure.mgmt.compute.v2018_10_01.models.IPVersion + :param application_gateway_backend_address_pools: Specifies an array of + references to backend address pools of application gateways. A scale set + can reference backend address pools of multiple application gateways. + Multiple scale sets cannot use the same application gateway. + :type application_gateway_backend_address_pools: + list[~azure.mgmt.compute.v2018_10_01.models.SubResource] + :param application_security_groups: Specifies an array of references to + application security group. + :type application_security_groups: + list[~azure.mgmt.compute.v2018_10_01.models.SubResource] + :param load_balancer_backend_address_pools: Specifies an array of + references to backend address pools of load balancers. A scale set can + reference backend address pools of one public and one internal load + balancer. Multiple scale sets cannot use the same load balancer. + :type load_balancer_backend_address_pools: + list[~azure.mgmt.compute.v2018_10_01.models.SubResource] + :param load_balancer_inbound_nat_pools: Specifies an array of references + to inbound Nat pools of the load balancers. A scale set can reference + inbound nat pools of one public and one internal load balancer. Multiple + scale sets cannot use the same load balancer + :type load_balancer_inbound_nat_pools: + list[~azure.mgmt.compute.v2018_10_01.models.SubResource] + """ + + _validation = { + 'name': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'subnet': {'key': 'properties.subnet', 'type': 'ApiEntityReference'}, + 'primary': {'key': 'properties.primary', 'type': 'bool'}, + 'public_ip_address_configuration': {'key': 'properties.publicIPAddressConfiguration', 'type': 'VirtualMachineScaleSetPublicIPAddressConfiguration'}, + 'private_ip_address_version': {'key': 'properties.privateIPAddressVersion', 'type': 'str'}, + 'application_gateway_backend_address_pools': {'key': 'properties.applicationGatewayBackendAddressPools', 'type': '[SubResource]'}, + 'application_security_groups': {'key': 'properties.applicationSecurityGroups', 'type': '[SubResource]'}, + 'load_balancer_backend_address_pools': {'key': 'properties.loadBalancerBackendAddressPools', 'type': '[SubResource]'}, + 'load_balancer_inbound_nat_pools': {'key': 'properties.loadBalancerInboundNatPools', 'type': '[SubResource]'}, + } + + def __init__(self, *, name: str, id: str=None, subnet=None, primary: bool=None, public_ip_address_configuration=None, private_ip_address_version=None, application_gateway_backend_address_pools=None, application_security_groups=None, load_balancer_backend_address_pools=None, load_balancer_inbound_nat_pools=None, **kwargs) -> None: + super(VirtualMachineScaleSetIPConfiguration, self).__init__(id=id, **kwargs) + self.name = name + self.subnet = subnet + self.primary = primary + self.public_ip_address_configuration = public_ip_address_configuration + self.private_ip_address_version = private_ip_address_version + self.application_gateway_backend_address_pools = application_gateway_backend_address_pools + self.application_security_groups = application_security_groups + self.load_balancer_backend_address_pools = load_balancer_backend_address_pools + self.load_balancer_inbound_nat_pools = load_balancer_inbound_nat_pools + + +class VirtualMachineScaleSetIpTag(Model): + """Contains the IP tag associated with the public IP address. + + :param ip_tag_type: IP tag type. Example: FirstPartyUsage. + :type ip_tag_type: str + :param tag: IP tag associated with the public IP. Example: SQL, Storage + etc. + :type tag: str + """ + + _attribute_map = { + 'ip_tag_type': {'key': 'ipTagType', 'type': 'str'}, + 'tag': {'key': 'tag', 'type': 'str'}, + } + + def __init__(self, *, ip_tag_type: str=None, tag: str=None, **kwargs) -> None: + super(VirtualMachineScaleSetIpTag, self).__init__(**kwargs) + self.ip_tag_type = ip_tag_type + self.tag = tag + + +class VirtualMachineScaleSetManagedDiskParameters(Model): + """Describes the parameters of a ScaleSet managed disk. + + :param storage_account_type: Specifies the storage account type for the + managed disk. NOTE: UltraSSD_LRS can only be used with data disks, it + cannot be used with OS Disk. Possible values include: 'Standard_LRS', + 'Premium_LRS', 'StandardSSD_LRS', 'UltraSSD_LRS' + :type storage_account_type: str or + ~azure.mgmt.compute.v2018_10_01.models.StorageAccountTypes + """ + + _attribute_map = { + 'storage_account_type': {'key': 'storageAccountType', 'type': 'str'}, + } + + def __init__(self, *, storage_account_type=None, **kwargs) -> None: + super(VirtualMachineScaleSetManagedDiskParameters, self).__init__(**kwargs) + self.storage_account_type = storage_account_type + + +class VirtualMachineScaleSetNetworkConfiguration(SubResource): + """Describes a virtual machine scale set network profile's network + configurations. + + All required parameters must be populated in order to send to Azure. + + :param id: Resource Id + :type id: str + :param name: Required. The network configuration name. + :type name: str + :param primary: Specifies the primary network interface in case the + virtual machine has more than 1 network interface. + :type primary: bool + :param enable_accelerated_networking: Specifies whether the network + interface is accelerated networking-enabled. + :type enable_accelerated_networking: bool + :param network_security_group: The network security group. + :type network_security_group: + ~azure.mgmt.compute.v2018_10_01.models.SubResource + :param dns_settings: The dns settings to be applied on the network + interfaces. + :type dns_settings: + ~azure.mgmt.compute.v2018_10_01.models.VirtualMachineScaleSetNetworkConfigurationDnsSettings + :param ip_configurations: Required. Specifies the IP configurations of the + network interface. + :type ip_configurations: + list[~azure.mgmt.compute.v2018_10_01.models.VirtualMachineScaleSetIPConfiguration] + :param enable_ip_forwarding: Whether IP forwarding enabled on this NIC. + :type enable_ip_forwarding: bool + """ + + _validation = { + 'name': {'required': True}, + 'ip_configurations': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'primary': {'key': 'properties.primary', 'type': 'bool'}, + 'enable_accelerated_networking': {'key': 'properties.enableAcceleratedNetworking', 'type': 'bool'}, + 'network_security_group': {'key': 'properties.networkSecurityGroup', 'type': 'SubResource'}, + 'dns_settings': {'key': 'properties.dnsSettings', 'type': 'VirtualMachineScaleSetNetworkConfigurationDnsSettings'}, + 'ip_configurations': {'key': 'properties.ipConfigurations', 'type': '[VirtualMachineScaleSetIPConfiguration]'}, + 'enable_ip_forwarding': {'key': 'properties.enableIPForwarding', 'type': 'bool'}, + } + + def __init__(self, *, name: str, ip_configurations, id: str=None, primary: bool=None, enable_accelerated_networking: bool=None, network_security_group=None, dns_settings=None, enable_ip_forwarding: bool=None, **kwargs) -> None: + super(VirtualMachineScaleSetNetworkConfiguration, self).__init__(id=id, **kwargs) + self.name = name + self.primary = primary + self.enable_accelerated_networking = enable_accelerated_networking + self.network_security_group = network_security_group + self.dns_settings = dns_settings + self.ip_configurations = ip_configurations + self.enable_ip_forwarding = enable_ip_forwarding + + +class VirtualMachineScaleSetNetworkConfigurationDnsSettings(Model): + """Describes a virtual machines scale sets network configuration's DNS + settings. + + :param dns_servers: List of DNS servers IP addresses + :type dns_servers: list[str] + """ + + _attribute_map = { + 'dns_servers': {'key': 'dnsServers', 'type': '[str]'}, + } + + def __init__(self, *, dns_servers=None, **kwargs) -> None: + super(VirtualMachineScaleSetNetworkConfigurationDnsSettings, self).__init__(**kwargs) + self.dns_servers = dns_servers + + +class VirtualMachineScaleSetNetworkProfile(Model): + """Describes a virtual machine scale set network profile. + + :param health_probe: A reference to a load balancer probe used to + determine the health of an instance in the virtual machine scale set. The + reference will be in the form: + '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/probes/{probeName}'. + :type health_probe: + ~azure.mgmt.compute.v2018_10_01.models.ApiEntityReference + :param network_interface_configurations: The list of network + configurations. + :type network_interface_configurations: + list[~azure.mgmt.compute.v2018_10_01.models.VirtualMachineScaleSetNetworkConfiguration] + """ + + _attribute_map = { + 'health_probe': {'key': 'healthProbe', 'type': 'ApiEntityReference'}, + 'network_interface_configurations': {'key': 'networkInterfaceConfigurations', 'type': '[VirtualMachineScaleSetNetworkConfiguration]'}, + } + + def __init__(self, *, health_probe=None, network_interface_configurations=None, **kwargs) -> None: + super(VirtualMachineScaleSetNetworkProfile, self).__init__(**kwargs) + self.health_probe = health_probe + self.network_interface_configurations = network_interface_configurations + + +class VirtualMachineScaleSetOSDisk(Model): + """Describes a virtual machine scale set operating system disk. + + All required parameters must be populated in order to send to Azure. + + :param name: The disk name. + :type name: str + :param caching: Specifies the caching requirements.

    Possible + values are:

    **None**

    **ReadOnly**

    **ReadWrite** +

    Default: **None for Standard storage. ReadOnly for Premium + storage**. Possible values include: 'None', 'ReadOnly', 'ReadWrite' + :type caching: str or ~azure.mgmt.compute.v2018_10_01.models.CachingTypes + :param write_accelerator_enabled: Specifies whether writeAccelerator + should be enabled or disabled on the disk. + :type write_accelerator_enabled: bool + :param create_option: Required. Specifies how the virtual machines in the + scale set should be created.

    The only allowed value is: + **FromImage** \\u2013 This value is used when you are using an image to + create the virtual machine. If you are using a platform image, you also + use the imageReference element described above. If you are using a + marketplace image, you also use the plan element previously described. + Possible values include: 'FromImage', 'Empty', 'Attach' + :type create_option: str or + ~azure.mgmt.compute.v2018_10_01.models.DiskCreateOptionTypes + :param diff_disk_settings: Specifies the ephemeral disk Settings for the + operating system disk used by the virtual machine scale set. + :type diff_disk_settings: + ~azure.mgmt.compute.v2018_10_01.models.DiffDiskSettings + :param disk_size_gb: Specifies the size of the operating system disk in + gigabytes. This element can be used to overwrite the size of the disk in a + virtual machine image.

    This value cannot be larger than 1023 GB + :type disk_size_gb: int + :param os_type: This property allows you to specify the type of the OS + that is included in the disk if creating a VM from user-image or a + specialized VHD.

    Possible values are:

    **Windows** +

    **Linux**. Possible values include: 'Windows', 'Linux' + :type os_type: str or + ~azure.mgmt.compute.v2018_10_01.models.OperatingSystemTypes + :param image: Specifies information about the unmanaged user image to base + the scale set on. + :type image: ~azure.mgmt.compute.v2018_10_01.models.VirtualHardDisk + :param vhd_containers: Specifies the container urls that are used to store + operating system disks for the scale set. + :type vhd_containers: list[str] + :param managed_disk: The managed disk parameters. + :type managed_disk: + ~azure.mgmt.compute.v2018_10_01.models.VirtualMachineScaleSetManagedDiskParameters + """ + + _validation = { + 'create_option': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'caching': {'key': 'caching', 'type': 'CachingTypes'}, + 'write_accelerator_enabled': {'key': 'writeAcceleratorEnabled', 'type': 'bool'}, + 'create_option': {'key': 'createOption', 'type': 'str'}, + 'diff_disk_settings': {'key': 'diffDiskSettings', 'type': 'DiffDiskSettings'}, + 'disk_size_gb': {'key': 'diskSizeGB', 'type': 'int'}, + 'os_type': {'key': 'osType', 'type': 'OperatingSystemTypes'}, + 'image': {'key': 'image', 'type': 'VirtualHardDisk'}, + 'vhd_containers': {'key': 'vhdContainers', 'type': '[str]'}, + 'managed_disk': {'key': 'managedDisk', 'type': 'VirtualMachineScaleSetManagedDiskParameters'}, + } + + def __init__(self, *, create_option, name: str=None, caching=None, write_accelerator_enabled: bool=None, diff_disk_settings=None, disk_size_gb: int=None, os_type=None, image=None, vhd_containers=None, managed_disk=None, **kwargs) -> None: + super(VirtualMachineScaleSetOSDisk, self).__init__(**kwargs) + self.name = name + self.caching = caching + self.write_accelerator_enabled = write_accelerator_enabled + self.create_option = create_option + self.diff_disk_settings = diff_disk_settings + self.disk_size_gb = disk_size_gb + self.os_type = os_type + self.image = image + self.vhd_containers = vhd_containers + self.managed_disk = managed_disk + + +class VirtualMachineScaleSetOSProfile(Model): + """Describes a virtual machine scale set OS profile. + + :param computer_name_prefix: Specifies the computer name prefix for all of + the virtual machines in the scale set. Computer name prefixes must be 1 to + 15 characters long. + :type computer_name_prefix: str + :param admin_username: Specifies the name of the administrator account. +

    **Windows-only restriction:** Cannot end in "."

    + **Disallowed values:** "administrator", "admin", "user", "user1", "test", + "user2", "test1", "user3", "admin1", "1", "123", "a", "actuser", "adm", + "admin2", "aspnet", "backup", "console", "david", "guest", "john", + "owner", "root", "server", "sql", "support", "support_388945a0", "sys", + "test2", "test3", "user4", "user5".

    **Minimum-length (Linux):** 1 + character

    **Max-length (Linux):** 64 characters

    + **Max-length (Windows):** 20 characters

  • For root access to + the Linux VM, see [Using root privileges on Linux virtual machines in + Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-use-root-privileges?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json)
  • + For a list of built-in system users on Linux that should not be used in + this field, see [Selecting User Names for Linux on + Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-usernames?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json) + :type admin_username: str + :param admin_password: Specifies the password of the administrator + account.

    **Minimum-length (Windows):** 8 characters

    + **Minimum-length (Linux):** 6 characters

    **Max-length + (Windows):** 123 characters

    **Max-length (Linux):** 72 characters +

    **Complexity requirements:** 3 out of 4 conditions below need to + be fulfilled
    Has lower characters
    Has upper characters
    Has a + digit
    Has a special character (Regex match [\\W_])

    + **Disallowed values:** "abc@123", "P@$$w0rd", "P@ssw0rd", "P@ssword123", + "Pa$$word", "pass@word1", "Password!", "Password1", "Password22", + "iloveyou!"

    For resetting the password, see [How to reset the + Remote Desktop service or its login password in a Windows + VM](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-reset-rdp?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json) +

    For resetting root password, see [Manage users, SSH, and check or + repair disks on Azure Linux VMs using the VMAccess + Extension](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-using-vmaccess-extension?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json#reset-root-password) + :type admin_password: str + :param custom_data: Specifies a base-64 encoded string of custom data. The + base-64 encoded string is decoded to a binary array that is saved as a + file on the Virtual Machine. The maximum length of the binary array is + 65535 bytes.

    For using cloud-init for your VM, see [Using + cloud-init to customize a Linux VM during + creation](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-using-cloud-init?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json) + :type custom_data: str + :param windows_configuration: Specifies Windows operating system settings + on the virtual machine. + :type windows_configuration: + ~azure.mgmt.compute.v2018_10_01.models.WindowsConfiguration + :param linux_configuration: Specifies the Linux operating system settings + on the virtual machine.

    For a list of supported Linux + distributions, see [Linux on Azure-Endorsed + Distributions](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-endorsed-distros?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json) +

    For running non-endorsed distributions, see [Information for + Non-Endorsed + Distributions](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-create-upload-generic?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json). + :type linux_configuration: + ~azure.mgmt.compute.v2018_10_01.models.LinuxConfiguration + :param secrets: Specifies set of certificates that should be installed + onto the virtual machines in the scale set. + :type secrets: + list[~azure.mgmt.compute.v2018_10_01.models.VaultSecretGroup] + """ + + _attribute_map = { + 'computer_name_prefix': {'key': 'computerNamePrefix', 'type': 'str'}, + 'admin_username': {'key': 'adminUsername', 'type': 'str'}, + 'admin_password': {'key': 'adminPassword', 'type': 'str'}, + 'custom_data': {'key': 'customData', 'type': 'str'}, + 'windows_configuration': {'key': 'windowsConfiguration', 'type': 'WindowsConfiguration'}, + 'linux_configuration': {'key': 'linuxConfiguration', 'type': 'LinuxConfiguration'}, + 'secrets': {'key': 'secrets', 'type': '[VaultSecretGroup]'}, + } + + def __init__(self, *, computer_name_prefix: str=None, admin_username: str=None, admin_password: str=None, custom_data: str=None, windows_configuration=None, linux_configuration=None, secrets=None, **kwargs) -> None: + super(VirtualMachineScaleSetOSProfile, self).__init__(**kwargs) + self.computer_name_prefix = computer_name_prefix + self.admin_username = admin_username + self.admin_password = admin_password + self.custom_data = custom_data + self.windows_configuration = windows_configuration + self.linux_configuration = linux_configuration + self.secrets = secrets + + +class VirtualMachineScaleSetPublicIPAddressConfiguration(Model): + """Describes a virtual machines scale set IP Configuration's PublicIPAddress + configuration. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. The publicIP address configuration name. + :type name: str + :param idle_timeout_in_minutes: The idle timeout of the public IP address. + :type idle_timeout_in_minutes: int + :param dns_settings: The dns settings to be applied on the publicIP + addresses . + :type dns_settings: + ~azure.mgmt.compute.v2018_10_01.models.VirtualMachineScaleSetPublicIPAddressConfigurationDnsSettings + :param ip_tags: The list of IP tags associated with the public IP address. + :type ip_tags: + list[~azure.mgmt.compute.v2018_10_01.models.VirtualMachineScaleSetIpTag] + :param public_ip_prefix: The PublicIPPrefix from which to allocate + publicIP addresses. + :type public_ip_prefix: ~azure.mgmt.compute.v2018_10_01.models.SubResource + """ + + _validation = { + 'name': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'idle_timeout_in_minutes': {'key': 'properties.idleTimeoutInMinutes', 'type': 'int'}, + 'dns_settings': {'key': 'properties.dnsSettings', 'type': 'VirtualMachineScaleSetPublicIPAddressConfigurationDnsSettings'}, + 'ip_tags': {'key': 'properties.ipTags', 'type': '[VirtualMachineScaleSetIpTag]'}, + 'public_ip_prefix': {'key': 'properties.publicIPPrefix', 'type': 'SubResource'}, + } + + def __init__(self, *, name: str, idle_timeout_in_minutes: int=None, dns_settings=None, ip_tags=None, public_ip_prefix=None, **kwargs) -> None: + super(VirtualMachineScaleSetPublicIPAddressConfiguration, self).__init__(**kwargs) + self.name = name + self.idle_timeout_in_minutes = idle_timeout_in_minutes + self.dns_settings = dns_settings + self.ip_tags = ip_tags + self.public_ip_prefix = public_ip_prefix + + +class VirtualMachineScaleSetPublicIPAddressConfigurationDnsSettings(Model): + """Describes a virtual machines scale sets network configuration's DNS + settings. + + All required parameters must be populated in order to send to Azure. + + :param domain_name_label: Required. The Domain name label.The + concatenation of the domain name label and vm index will be the domain + name labels of the PublicIPAddress resources that will be created + :type domain_name_label: str + """ + + _validation = { + 'domain_name_label': {'required': True}, + } + + _attribute_map = { + 'domain_name_label': {'key': 'domainNameLabel', 'type': 'str'}, + } + + def __init__(self, *, domain_name_label: str, **kwargs) -> None: + super(VirtualMachineScaleSetPublicIPAddressConfigurationDnsSettings, self).__init__(**kwargs) + self.domain_name_label = domain_name_label + + +class VirtualMachineScaleSetVMReimageParameters(VirtualMachineReimageParameters): + """Describes a Virtual Machine Scale Set VM Reimage Parameters. + + :param temp_disk: Specifies whether to reimage temp disk. Default value: + false. Note: This temp disk reimage parameter is only supported for + VM/VMSS with Ephemeral OS disk. + :type temp_disk: bool + """ + + _attribute_map = { + 'temp_disk': {'key': 'tempDisk', 'type': 'bool'}, + } + + def __init__(self, *, temp_disk: bool=None, **kwargs) -> None: + super(VirtualMachineScaleSetVMReimageParameters, self).__init__(temp_disk=temp_disk, **kwargs) + + +class VirtualMachineScaleSetReimageParameters(VirtualMachineScaleSetVMReimageParameters): + """Describes a Virtual Machine Scale Set VM Reimage Parameters. + + :param temp_disk: Specifies whether to reimage temp disk. Default value: + false. Note: This temp disk reimage parameter is only supported for + VM/VMSS with Ephemeral OS disk. + :type temp_disk: bool + :param instance_ids: The virtual machine scale set instance ids. Omitting + the virtual machine scale set instance ids will result in the operation + being performed on all virtual machines in the virtual machine scale set. + :type instance_ids: list[str] + """ + + _attribute_map = { + 'temp_disk': {'key': 'tempDisk', 'type': 'bool'}, + 'instance_ids': {'key': 'instanceIds', 'type': '[str]'}, + } + + def __init__(self, *, temp_disk: bool=None, instance_ids=None, **kwargs) -> None: + super(VirtualMachineScaleSetReimageParameters, self).__init__(temp_disk=temp_disk, **kwargs) + self.instance_ids = instance_ids + + +class VirtualMachineScaleSetSku(Model): + """Describes an available virtual machine scale set sku. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar resource_type: The type of resource the sku applies to. + :vartype resource_type: str + :ivar sku: The Sku. + :vartype sku: ~azure.mgmt.compute.v2018_10_01.models.Sku + :ivar capacity: Specifies the number of virtual machines in the scale set. + :vartype capacity: + ~azure.mgmt.compute.v2018_10_01.models.VirtualMachineScaleSetSkuCapacity + """ + + _validation = { + 'resource_type': {'readonly': True}, + 'sku': {'readonly': True}, + 'capacity': {'readonly': True}, + } + + _attribute_map = { + 'resource_type': {'key': 'resourceType', 'type': 'str'}, + 'sku': {'key': 'sku', 'type': 'Sku'}, + 'capacity': {'key': 'capacity', 'type': 'VirtualMachineScaleSetSkuCapacity'}, + } + + def __init__(self, **kwargs) -> None: + super(VirtualMachineScaleSetSku, self).__init__(**kwargs) + self.resource_type = None + self.sku = None + self.capacity = None + + +class VirtualMachineScaleSetSkuCapacity(Model): + """Describes scaling information of a sku. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar minimum: The minimum capacity. + :vartype minimum: long + :ivar maximum: The maximum capacity that can be set. + :vartype maximum: long + :ivar default_capacity: The default capacity. + :vartype default_capacity: long + :ivar scale_type: The scale type applicable to the sku. Possible values + include: 'Automatic', 'None' + :vartype scale_type: str or + ~azure.mgmt.compute.v2018_10_01.models.VirtualMachineScaleSetSkuScaleType + """ + + _validation = { + 'minimum': {'readonly': True}, + 'maximum': {'readonly': True}, + 'default_capacity': {'readonly': True}, + 'scale_type': {'readonly': True}, + } + + _attribute_map = { + 'minimum': {'key': 'minimum', 'type': 'long'}, + 'maximum': {'key': 'maximum', 'type': 'long'}, + 'default_capacity': {'key': 'defaultCapacity', 'type': 'long'}, + 'scale_type': {'key': 'scaleType', 'type': 'VirtualMachineScaleSetSkuScaleType'}, + } + + def __init__(self, **kwargs) -> None: + super(VirtualMachineScaleSetSkuCapacity, self).__init__(**kwargs) + self.minimum = None + self.maximum = None + self.default_capacity = None + self.scale_type = None + + +class VirtualMachineScaleSetStorageProfile(Model): + """Describes a virtual machine scale set storage profile. + + :param image_reference: Specifies information about the image to use. You + can specify information about platform images, marketplace images, or + virtual machine images. This element is required when you want to use a + platform image, marketplace image, or virtual machine image, but is not + used in other creation operations. + :type image_reference: + ~azure.mgmt.compute.v2018_10_01.models.ImageReference + :param os_disk: Specifies information about the operating system disk used + by the virtual machines in the scale set.

    For more information + about disks, see [About disks and VHDs for Azure virtual + machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-about-disks-vhds?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). + :type os_disk: + ~azure.mgmt.compute.v2018_10_01.models.VirtualMachineScaleSetOSDisk + :param data_disks: Specifies the parameters that are used to add data + disks to the virtual machines in the scale set.

    For more + information about disks, see [About disks and VHDs for Azure virtual + machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-about-disks-vhds?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). + :type data_disks: + list[~azure.mgmt.compute.v2018_10_01.models.VirtualMachineScaleSetDataDisk] + """ + + _attribute_map = { + 'image_reference': {'key': 'imageReference', 'type': 'ImageReference'}, + 'os_disk': {'key': 'osDisk', 'type': 'VirtualMachineScaleSetOSDisk'}, + 'data_disks': {'key': 'dataDisks', 'type': '[VirtualMachineScaleSetDataDisk]'}, + } + + def __init__(self, *, image_reference=None, os_disk=None, data_disks=None, **kwargs) -> None: + super(VirtualMachineScaleSetStorageProfile, self).__init__(**kwargs) + self.image_reference = image_reference + self.os_disk = os_disk + self.data_disks = data_disks + + +class VirtualMachineScaleSetUpdate(UpdateResource): + """Describes a Virtual Machine Scale Set. + + :param tags: Resource tags + :type tags: dict[str, str] + :param sku: The virtual machine scale set sku. + :type sku: ~azure.mgmt.compute.v2018_10_01.models.Sku + :param plan: The purchase plan when deploying a virtual machine scale set + from VM Marketplace images. + :type plan: ~azure.mgmt.compute.v2018_10_01.models.Plan + :param upgrade_policy: The upgrade policy. + :type upgrade_policy: ~azure.mgmt.compute.v2018_10_01.models.UpgradePolicy + :param virtual_machine_profile: The virtual machine profile. + :type virtual_machine_profile: + ~azure.mgmt.compute.v2018_10_01.models.VirtualMachineScaleSetUpdateVMProfile + :param overprovision: Specifies whether the Virtual Machine Scale Set + should be overprovisioned. + :type overprovision: bool + :param single_placement_group: When true this limits the scale set to a + single placement group, of max size 100 virtual machines. + :type single_placement_group: bool + :param identity: The identity of the virtual machine scale set, if + configured. + :type identity: + ~azure.mgmt.compute.v2018_10_01.models.VirtualMachineScaleSetIdentity + """ + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + 'sku': {'key': 'sku', 'type': 'Sku'}, + 'plan': {'key': 'plan', 'type': 'Plan'}, + 'upgrade_policy': {'key': 'properties.upgradePolicy', 'type': 'UpgradePolicy'}, + 'virtual_machine_profile': {'key': 'properties.virtualMachineProfile', 'type': 'VirtualMachineScaleSetUpdateVMProfile'}, + 'overprovision': {'key': 'properties.overprovision', 'type': 'bool'}, + 'single_placement_group': {'key': 'properties.singlePlacementGroup', 'type': 'bool'}, + 'identity': {'key': 'identity', 'type': 'VirtualMachineScaleSetIdentity'}, + } + + def __init__(self, *, tags=None, sku=None, plan=None, upgrade_policy=None, virtual_machine_profile=None, overprovision: bool=None, single_placement_group: bool=None, identity=None, **kwargs) -> None: + super(VirtualMachineScaleSetUpdate, self).__init__(tags=tags, **kwargs) + self.sku = sku + self.plan = plan + self.upgrade_policy = upgrade_policy + self.virtual_machine_profile = virtual_machine_profile + self.overprovision = overprovision + self.single_placement_group = single_placement_group + self.identity = identity + + +class VirtualMachineScaleSetUpdateIPConfiguration(SubResource): + """Describes a virtual machine scale set network profile's IP configuration. + + :param id: Resource Id + :type id: str + :param name: The IP configuration name. + :type name: str + :param subnet: The subnet. + :type subnet: ~azure.mgmt.compute.v2018_10_01.models.ApiEntityReference + :param primary: Specifies the primary IP Configuration in case the network + interface has more than one IP Configuration. + :type primary: bool + :param public_ip_address_configuration: The publicIPAddressConfiguration. + :type public_ip_address_configuration: + ~azure.mgmt.compute.v2018_10_01.models.VirtualMachineScaleSetUpdatePublicIPAddressConfiguration + :param private_ip_address_version: Available from Api-Version 2017-03-30 + onwards, it represents whether the specific ipconfiguration is IPv4 or + IPv6. Default is taken as IPv4. Possible values are: 'IPv4' and 'IPv6'. + Possible values include: 'IPv4', 'IPv6' + :type private_ip_address_version: str or + ~azure.mgmt.compute.v2018_10_01.models.IPVersion + :param application_gateway_backend_address_pools: The application gateway + backend address pools. + :type application_gateway_backend_address_pools: + list[~azure.mgmt.compute.v2018_10_01.models.SubResource] + :param application_security_groups: Specifies an array of references to + application security group. + :type application_security_groups: + list[~azure.mgmt.compute.v2018_10_01.models.SubResource] + :param load_balancer_backend_address_pools: The load balancer backend + address pools. + :type load_balancer_backend_address_pools: + list[~azure.mgmt.compute.v2018_10_01.models.SubResource] + :param load_balancer_inbound_nat_pools: The load balancer inbound nat + pools. + :type load_balancer_inbound_nat_pools: + list[~azure.mgmt.compute.v2018_10_01.models.SubResource] + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'subnet': {'key': 'properties.subnet', 'type': 'ApiEntityReference'}, + 'primary': {'key': 'properties.primary', 'type': 'bool'}, + 'public_ip_address_configuration': {'key': 'properties.publicIPAddressConfiguration', 'type': 'VirtualMachineScaleSetUpdatePublicIPAddressConfiguration'}, + 'private_ip_address_version': {'key': 'properties.privateIPAddressVersion', 'type': 'str'}, + 'application_gateway_backend_address_pools': {'key': 'properties.applicationGatewayBackendAddressPools', 'type': '[SubResource]'}, + 'application_security_groups': {'key': 'properties.applicationSecurityGroups', 'type': '[SubResource]'}, + 'load_balancer_backend_address_pools': {'key': 'properties.loadBalancerBackendAddressPools', 'type': '[SubResource]'}, + 'load_balancer_inbound_nat_pools': {'key': 'properties.loadBalancerInboundNatPools', 'type': '[SubResource]'}, + } + + def __init__(self, *, id: str=None, name: str=None, subnet=None, primary: bool=None, public_ip_address_configuration=None, private_ip_address_version=None, application_gateway_backend_address_pools=None, application_security_groups=None, load_balancer_backend_address_pools=None, load_balancer_inbound_nat_pools=None, **kwargs) -> None: + super(VirtualMachineScaleSetUpdateIPConfiguration, self).__init__(id=id, **kwargs) + self.name = name + self.subnet = subnet + self.primary = primary + self.public_ip_address_configuration = public_ip_address_configuration + self.private_ip_address_version = private_ip_address_version + self.application_gateway_backend_address_pools = application_gateway_backend_address_pools + self.application_security_groups = application_security_groups + self.load_balancer_backend_address_pools = load_balancer_backend_address_pools + self.load_balancer_inbound_nat_pools = load_balancer_inbound_nat_pools + + +class VirtualMachineScaleSetUpdateNetworkConfiguration(SubResource): + """Describes a virtual machine scale set network profile's network + configurations. + + :param id: Resource Id + :type id: str + :param name: The network configuration name. + :type name: str + :param primary: Whether this is a primary NIC on a virtual machine. + :type primary: bool + :param enable_accelerated_networking: Specifies whether the network + interface is accelerated networking-enabled. + :type enable_accelerated_networking: bool + :param network_security_group: The network security group. + :type network_security_group: + ~azure.mgmt.compute.v2018_10_01.models.SubResource + :param dns_settings: The dns settings to be applied on the network + interfaces. + :type dns_settings: + ~azure.mgmt.compute.v2018_10_01.models.VirtualMachineScaleSetNetworkConfigurationDnsSettings + :param ip_configurations: The virtual machine scale set IP Configuration. + :type ip_configurations: + list[~azure.mgmt.compute.v2018_10_01.models.VirtualMachineScaleSetUpdateIPConfiguration] + :param enable_ip_forwarding: Whether IP forwarding enabled on this NIC. + :type enable_ip_forwarding: bool + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'primary': {'key': 'properties.primary', 'type': 'bool'}, + 'enable_accelerated_networking': {'key': 'properties.enableAcceleratedNetworking', 'type': 'bool'}, + 'network_security_group': {'key': 'properties.networkSecurityGroup', 'type': 'SubResource'}, + 'dns_settings': {'key': 'properties.dnsSettings', 'type': 'VirtualMachineScaleSetNetworkConfigurationDnsSettings'}, + 'ip_configurations': {'key': 'properties.ipConfigurations', 'type': '[VirtualMachineScaleSetUpdateIPConfiguration]'}, + 'enable_ip_forwarding': {'key': 'properties.enableIPForwarding', 'type': 'bool'}, + } + + def __init__(self, *, id: str=None, name: str=None, primary: bool=None, enable_accelerated_networking: bool=None, network_security_group=None, dns_settings=None, ip_configurations=None, enable_ip_forwarding: bool=None, **kwargs) -> None: + super(VirtualMachineScaleSetUpdateNetworkConfiguration, self).__init__(id=id, **kwargs) + self.name = name + self.primary = primary + self.enable_accelerated_networking = enable_accelerated_networking + self.network_security_group = network_security_group + self.dns_settings = dns_settings + self.ip_configurations = ip_configurations + self.enable_ip_forwarding = enable_ip_forwarding + + +class VirtualMachineScaleSetUpdateNetworkProfile(Model): + """Describes a virtual machine scale set network profile. + + :param network_interface_configurations: The list of network + configurations. + :type network_interface_configurations: + list[~azure.mgmt.compute.v2018_10_01.models.VirtualMachineScaleSetUpdateNetworkConfiguration] + """ + + _attribute_map = { + 'network_interface_configurations': {'key': 'networkInterfaceConfigurations', 'type': '[VirtualMachineScaleSetUpdateNetworkConfiguration]'}, + } + + def __init__(self, *, network_interface_configurations=None, **kwargs) -> None: + super(VirtualMachineScaleSetUpdateNetworkProfile, self).__init__(**kwargs) + self.network_interface_configurations = network_interface_configurations + + +class VirtualMachineScaleSetUpdateOSDisk(Model): + """Describes virtual machine scale set operating system disk Update Object. + This should be used for Updating VMSS OS Disk. + + :param caching: The caching type. Possible values include: 'None', + 'ReadOnly', 'ReadWrite' + :type caching: str or ~azure.mgmt.compute.v2018_10_01.models.CachingTypes + :param write_accelerator_enabled: Specifies whether writeAccelerator + should be enabled or disabled on the disk. + :type write_accelerator_enabled: bool + :param disk_size_gb: Specifies the size of the operating system disk in + gigabytes. This element can be used to overwrite the size of the disk in a + virtual machine image.

    This value cannot be larger than 1023 GB + :type disk_size_gb: int + :param image: The Source User Image VirtualHardDisk. This VirtualHardDisk + will be copied before using it to attach to the Virtual Machine. If + SourceImage is provided, the destination VirtualHardDisk should not exist. + :type image: ~azure.mgmt.compute.v2018_10_01.models.VirtualHardDisk + :param vhd_containers: The list of virtual hard disk container uris. + :type vhd_containers: list[str] + :param managed_disk: The managed disk parameters. + :type managed_disk: + ~azure.mgmt.compute.v2018_10_01.models.VirtualMachineScaleSetManagedDiskParameters + """ + + _attribute_map = { + 'caching': {'key': 'caching', 'type': 'CachingTypes'}, + 'write_accelerator_enabled': {'key': 'writeAcceleratorEnabled', 'type': 'bool'}, + 'disk_size_gb': {'key': 'diskSizeGB', 'type': 'int'}, + 'image': {'key': 'image', 'type': 'VirtualHardDisk'}, + 'vhd_containers': {'key': 'vhdContainers', 'type': '[str]'}, + 'managed_disk': {'key': 'managedDisk', 'type': 'VirtualMachineScaleSetManagedDiskParameters'}, + } + + def __init__(self, *, caching=None, write_accelerator_enabled: bool=None, disk_size_gb: int=None, image=None, vhd_containers=None, managed_disk=None, **kwargs) -> None: + super(VirtualMachineScaleSetUpdateOSDisk, self).__init__(**kwargs) + self.caching = caching + self.write_accelerator_enabled = write_accelerator_enabled + self.disk_size_gb = disk_size_gb + self.image = image + self.vhd_containers = vhd_containers + self.managed_disk = managed_disk + + +class VirtualMachineScaleSetUpdateOSProfile(Model): + """Describes a virtual machine scale set OS profile. + + :param custom_data: A base-64 encoded string of custom data. + :type custom_data: str + :param windows_configuration: The Windows Configuration of the OS profile. + :type windows_configuration: + ~azure.mgmt.compute.v2018_10_01.models.WindowsConfiguration + :param linux_configuration: The Linux Configuration of the OS profile. + :type linux_configuration: + ~azure.mgmt.compute.v2018_10_01.models.LinuxConfiguration + :param secrets: The List of certificates for addition to the VM. + :type secrets: + list[~azure.mgmt.compute.v2018_10_01.models.VaultSecretGroup] + """ + + _attribute_map = { + 'custom_data': {'key': 'customData', 'type': 'str'}, + 'windows_configuration': {'key': 'windowsConfiguration', 'type': 'WindowsConfiguration'}, + 'linux_configuration': {'key': 'linuxConfiguration', 'type': 'LinuxConfiguration'}, + 'secrets': {'key': 'secrets', 'type': '[VaultSecretGroup]'}, + } + + def __init__(self, *, custom_data: str=None, windows_configuration=None, linux_configuration=None, secrets=None, **kwargs) -> None: + super(VirtualMachineScaleSetUpdateOSProfile, self).__init__(**kwargs) + self.custom_data = custom_data + self.windows_configuration = windows_configuration + self.linux_configuration = linux_configuration + self.secrets = secrets + + +class VirtualMachineScaleSetUpdatePublicIPAddressConfiguration(Model): + """Describes a virtual machines scale set IP Configuration's PublicIPAddress + configuration. + + :param name: The publicIP address configuration name. + :type name: str + :param idle_timeout_in_minutes: The idle timeout of the public IP address. + :type idle_timeout_in_minutes: int + :param dns_settings: The dns settings to be applied on the publicIP + addresses . + :type dns_settings: + ~azure.mgmt.compute.v2018_10_01.models.VirtualMachineScaleSetPublicIPAddressConfigurationDnsSettings + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'idle_timeout_in_minutes': {'key': 'properties.idleTimeoutInMinutes', 'type': 'int'}, + 'dns_settings': {'key': 'properties.dnsSettings', 'type': 'VirtualMachineScaleSetPublicIPAddressConfigurationDnsSettings'}, + } + + def __init__(self, *, name: str=None, idle_timeout_in_minutes: int=None, dns_settings=None, **kwargs) -> None: + super(VirtualMachineScaleSetUpdatePublicIPAddressConfiguration, self).__init__(**kwargs) + self.name = name + self.idle_timeout_in_minutes = idle_timeout_in_minutes + self.dns_settings = dns_settings + + +class VirtualMachineScaleSetUpdateStorageProfile(Model): + """Describes a virtual machine scale set storage profile. + + :param image_reference: The image reference. + :type image_reference: + ~azure.mgmt.compute.v2018_10_01.models.ImageReference + :param os_disk: The OS disk. + :type os_disk: + ~azure.mgmt.compute.v2018_10_01.models.VirtualMachineScaleSetUpdateOSDisk + :param data_disks: The data disks. + :type data_disks: + list[~azure.mgmt.compute.v2018_10_01.models.VirtualMachineScaleSetDataDisk] + """ + + _attribute_map = { + 'image_reference': {'key': 'imageReference', 'type': 'ImageReference'}, + 'os_disk': {'key': 'osDisk', 'type': 'VirtualMachineScaleSetUpdateOSDisk'}, + 'data_disks': {'key': 'dataDisks', 'type': '[VirtualMachineScaleSetDataDisk]'}, + } + + def __init__(self, *, image_reference=None, os_disk=None, data_disks=None, **kwargs) -> None: + super(VirtualMachineScaleSetUpdateStorageProfile, self).__init__(**kwargs) + self.image_reference = image_reference + self.os_disk = os_disk + self.data_disks = data_disks + + +class VirtualMachineScaleSetUpdateVMProfile(Model): + """Describes a virtual machine scale set virtual machine profile. + + :param os_profile: The virtual machine scale set OS profile. + :type os_profile: + ~azure.mgmt.compute.v2018_10_01.models.VirtualMachineScaleSetUpdateOSProfile + :param storage_profile: The virtual machine scale set storage profile. + :type storage_profile: + ~azure.mgmt.compute.v2018_10_01.models.VirtualMachineScaleSetUpdateStorageProfile + :param network_profile: The virtual machine scale set network profile. + :type network_profile: + ~azure.mgmt.compute.v2018_10_01.models.VirtualMachineScaleSetUpdateNetworkProfile + :param diagnostics_profile: The virtual machine scale set diagnostics + profile. + :type diagnostics_profile: + ~azure.mgmt.compute.v2018_10_01.models.DiagnosticsProfile + :param extension_profile: The virtual machine scale set extension profile. + :type extension_profile: + ~azure.mgmt.compute.v2018_10_01.models.VirtualMachineScaleSetExtensionProfile + :param license_type: The license type, which is for bring your own license + scenario. + :type license_type: str + """ + + _attribute_map = { + 'os_profile': {'key': 'osProfile', 'type': 'VirtualMachineScaleSetUpdateOSProfile'}, + 'storage_profile': {'key': 'storageProfile', 'type': 'VirtualMachineScaleSetUpdateStorageProfile'}, + 'network_profile': {'key': 'networkProfile', 'type': 'VirtualMachineScaleSetUpdateNetworkProfile'}, + 'diagnostics_profile': {'key': 'diagnosticsProfile', 'type': 'DiagnosticsProfile'}, + 'extension_profile': {'key': 'extensionProfile', 'type': 'VirtualMachineScaleSetExtensionProfile'}, + 'license_type': {'key': 'licenseType', 'type': 'str'}, + } + + def __init__(self, *, os_profile=None, storage_profile=None, network_profile=None, diagnostics_profile=None, extension_profile=None, license_type: str=None, **kwargs) -> None: + super(VirtualMachineScaleSetUpdateVMProfile, self).__init__(**kwargs) + self.os_profile = os_profile + self.storage_profile = storage_profile + self.network_profile = network_profile + self.diagnostics_profile = diagnostics_profile + self.extension_profile = extension_profile + self.license_type = license_type + + +class VirtualMachineScaleSetVM(Resource): + """Describes a virtual machine scale set virtual machine. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource Id + :vartype id: str + :ivar name: Resource name + :vartype name: str + :ivar type: Resource type + :vartype type: str + :param location: Required. Resource location + :type location: str + :param tags: Resource tags + :type tags: dict[str, str] + :ivar instance_id: The virtual machine instance ID. + :vartype instance_id: str + :ivar sku: The virtual machine SKU. + :vartype sku: ~azure.mgmt.compute.v2018_10_01.models.Sku + :ivar latest_model_applied: Specifies whether the latest model has been + applied to the virtual machine. + :vartype latest_model_applied: bool + :ivar vm_id: Azure VM unique ID. + :vartype vm_id: str + :ivar instance_view: The virtual machine instance view. + :vartype instance_view: + ~azure.mgmt.compute.v2018_10_01.models.VirtualMachineScaleSetVMInstanceView + :param hardware_profile: Specifies the hardware settings for the virtual + machine. + :type hardware_profile: + ~azure.mgmt.compute.v2018_10_01.models.HardwareProfile + :param storage_profile: Specifies the storage settings for the virtual + machine disks. + :type storage_profile: + ~azure.mgmt.compute.v2018_10_01.models.StorageProfile + :param additional_capabilities: Specifies additional capabilities enabled + or disabled on the virtual machine in the scale set. For instance: whether + the virtual machine has the capability to support attaching managed data + disks with UltraSSD_LRS storage account type. + :type additional_capabilities: + ~azure.mgmt.compute.v2018_10_01.models.AdditionalCapabilities + :param os_profile: Specifies the operating system settings for the virtual + machine. + :type os_profile: ~azure.mgmt.compute.v2018_10_01.models.OSProfile + :param network_profile: Specifies the network interfaces of the virtual + machine. + :type network_profile: + ~azure.mgmt.compute.v2018_10_01.models.NetworkProfile + :param diagnostics_profile: Specifies the boot diagnostic settings state. +

    Minimum api-version: 2015-06-15. + :type diagnostics_profile: + ~azure.mgmt.compute.v2018_10_01.models.DiagnosticsProfile + :param availability_set: Specifies information about the availability set + that the virtual machine should be assigned to. Virtual machines specified + in the same availability set are allocated to different nodes to maximize + availability. For more information about availability sets, see [Manage + the availability of virtual + machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-manage-availability?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). +

    For more information on Azure planned maintenance, see [Planned + maintenance for virtual machines in + Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-planned-maintenance?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json) +

    Currently, a VM can only be added to availability set at creation + time. An existing VM cannot be added to an availability set. + :type availability_set: ~azure.mgmt.compute.v2018_10_01.models.SubResource + :ivar provisioning_state: The provisioning state, which only appears in + the response. + :vartype provisioning_state: str + :param license_type: Specifies that the image or disk that is being used + was licensed on-premises. This element is only used for images that + contain the Windows Server operating system.

    Possible values are: +

    Windows_Client

    Windows_Server

    If this element + is included in a request for an update, the value must match the initial + value. This value cannot be updated.

    For more information, see + [Azure Hybrid Use Benefit for Windows + Server](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-hybrid-use-benefit-licensing?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json) +

    Minimum api-version: 2015-06-15 + :type license_type: str + :param plan: Specifies information about the marketplace image used to + create the virtual machine. This element is only used for marketplace + images. Before you can use a marketplace image from an API, you must + enable the image for programmatic use. In the Azure portal, find the + marketplace image that you want to use and then click **Want to deploy + programmatically, Get Started ->**. Enter any required information and + then click **Save**. + :type plan: ~azure.mgmt.compute.v2018_10_01.models.Plan + :ivar resources: The virtual machine child extension resources. + :vartype resources: + list[~azure.mgmt.compute.v2018_10_01.models.VirtualMachineExtension] + :ivar zones: The virtual machine zones. + :vartype zones: list[str] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + 'instance_id': {'readonly': True}, + 'sku': {'readonly': True}, + 'latest_model_applied': {'readonly': True}, + 'vm_id': {'readonly': True}, + 'instance_view': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + 'resources': {'readonly': True}, + 'zones': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'instance_id': {'key': 'instanceId', 'type': 'str'}, + 'sku': {'key': 'sku', 'type': 'Sku'}, + 'latest_model_applied': {'key': 'properties.latestModelApplied', 'type': 'bool'}, + 'vm_id': {'key': 'properties.vmId', 'type': 'str'}, + 'instance_view': {'key': 'properties.instanceView', 'type': 'VirtualMachineScaleSetVMInstanceView'}, + 'hardware_profile': {'key': 'properties.hardwareProfile', 'type': 'HardwareProfile'}, + 'storage_profile': {'key': 'properties.storageProfile', 'type': 'StorageProfile'}, + 'additional_capabilities': {'key': 'properties.additionalCapabilities', 'type': 'AdditionalCapabilities'}, + 'os_profile': {'key': 'properties.osProfile', 'type': 'OSProfile'}, + 'network_profile': {'key': 'properties.networkProfile', 'type': 'NetworkProfile'}, + 'diagnostics_profile': {'key': 'properties.diagnosticsProfile', 'type': 'DiagnosticsProfile'}, + 'availability_set': {'key': 'properties.availabilitySet', 'type': 'SubResource'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'license_type': {'key': 'properties.licenseType', 'type': 'str'}, + 'plan': {'key': 'plan', 'type': 'Plan'}, + 'resources': {'key': 'resources', 'type': '[VirtualMachineExtension]'}, + 'zones': {'key': 'zones', 'type': '[str]'}, + } + + def __init__(self, *, location: str, tags=None, hardware_profile=None, storage_profile=None, additional_capabilities=None, os_profile=None, network_profile=None, diagnostics_profile=None, availability_set=None, license_type: str=None, plan=None, **kwargs) -> None: + super(VirtualMachineScaleSetVM, self).__init__(location=location, tags=tags, **kwargs) + self.instance_id = None + self.sku = None + self.latest_model_applied = None + self.vm_id = None + self.instance_view = None + self.hardware_profile = hardware_profile + self.storage_profile = storage_profile + self.additional_capabilities = additional_capabilities + self.os_profile = os_profile + self.network_profile = network_profile + self.diagnostics_profile = diagnostics_profile + self.availability_set = availability_set + self.provisioning_state = None + self.license_type = license_type + self.plan = plan + self.resources = None + self.zones = None + + +class VirtualMachineScaleSetVMExtensionsSummary(Model): + """Extensions summary for virtual machines of a virtual machine scale set. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar name: The extension name. + :vartype name: str + :ivar statuses_summary: The extensions information. + :vartype statuses_summary: + list[~azure.mgmt.compute.v2018_10_01.models.VirtualMachineStatusCodeCount] + """ + + _validation = { + 'name': {'readonly': True}, + 'statuses_summary': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'statuses_summary': {'key': 'statusesSummary', 'type': '[VirtualMachineStatusCodeCount]'}, + } + + def __init__(self, **kwargs) -> None: + super(VirtualMachineScaleSetVMExtensionsSummary, self).__init__(**kwargs) + self.name = None + self.statuses_summary = None + + +class VirtualMachineScaleSetVMInstanceIDs(Model): + """Specifies a list of virtual machine instance IDs from the VM scale set. + + :param instance_ids: The virtual machine scale set instance ids. Omitting + the virtual machine scale set instance ids will result in the operation + being performed on all virtual machines in the virtual machine scale set. + :type instance_ids: list[str] + """ + + _attribute_map = { + 'instance_ids': {'key': 'instanceIds', 'type': '[str]'}, + } + + def __init__(self, *, instance_ids=None, **kwargs) -> None: + super(VirtualMachineScaleSetVMInstanceIDs, self).__init__(**kwargs) + self.instance_ids = instance_ids + + +class VirtualMachineScaleSetVMInstanceRequiredIDs(Model): + """Specifies a list of virtual machine instance IDs from the VM scale set. + + All required parameters must be populated in order to send to Azure. + + :param instance_ids: Required. The virtual machine scale set instance ids. + :type instance_ids: list[str] + """ + + _validation = { + 'instance_ids': {'required': True}, + } + + _attribute_map = { + 'instance_ids': {'key': 'instanceIds', 'type': '[str]'}, + } + + def __init__(self, *, instance_ids, **kwargs) -> None: + super(VirtualMachineScaleSetVMInstanceRequiredIDs, self).__init__(**kwargs) + self.instance_ids = instance_ids + + +class VirtualMachineScaleSetVMInstanceView(Model): + """The instance view of a virtual machine scale set VM. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :param platform_update_domain: The Update Domain count. + :type platform_update_domain: int + :param platform_fault_domain: The Fault Domain count. + :type platform_fault_domain: int + :param rdp_thumb_print: The Remote desktop certificate thumbprint. + :type rdp_thumb_print: str + :param vm_agent: The VM Agent running on the virtual machine. + :type vm_agent: + ~azure.mgmt.compute.v2018_10_01.models.VirtualMachineAgentInstanceView + :param maintenance_redeploy_status: The Maintenance Operation status on + the virtual machine. + :type maintenance_redeploy_status: + ~azure.mgmt.compute.v2018_10_01.models.MaintenanceRedeployStatus + :param disks: The disks information. + :type disks: list[~azure.mgmt.compute.v2018_10_01.models.DiskInstanceView] + :param extensions: The extensions information. + :type extensions: + list[~azure.mgmt.compute.v2018_10_01.models.VirtualMachineExtensionInstanceView] + :ivar vm_health: The health status for the VM. + :vartype vm_health: + ~azure.mgmt.compute.v2018_10_01.models.VirtualMachineHealthStatus + :param boot_diagnostics: Boot Diagnostics is a debugging feature which + allows you to view Console Output and Screenshot to diagnose VM status. +

    You can easily view the output of your console log.

    + Azure also enables you to see a screenshot of the VM from the hypervisor. + :type boot_diagnostics: + ~azure.mgmt.compute.v2018_10_01.models.BootDiagnosticsInstanceView + :param statuses: The resource status information. + :type statuses: + list[~azure.mgmt.compute.v2018_10_01.models.InstanceViewStatus] + :param placement_group_id: The placement group in which the VM is running. + If the VM is deallocated it will not have a placementGroupId. + :type placement_group_id: str + """ + + _validation = { + 'vm_health': {'readonly': True}, + } + + _attribute_map = { + 'platform_update_domain': {'key': 'platformUpdateDomain', 'type': 'int'}, + 'platform_fault_domain': {'key': 'platformFaultDomain', 'type': 'int'}, + 'rdp_thumb_print': {'key': 'rdpThumbPrint', 'type': 'str'}, + 'vm_agent': {'key': 'vmAgent', 'type': 'VirtualMachineAgentInstanceView'}, + 'maintenance_redeploy_status': {'key': 'maintenanceRedeployStatus', 'type': 'MaintenanceRedeployStatus'}, + 'disks': {'key': 'disks', 'type': '[DiskInstanceView]'}, + 'extensions': {'key': 'extensions', 'type': '[VirtualMachineExtensionInstanceView]'}, + 'vm_health': {'key': 'vmHealth', 'type': 'VirtualMachineHealthStatus'}, + 'boot_diagnostics': {'key': 'bootDiagnostics', 'type': 'BootDiagnosticsInstanceView'}, + 'statuses': {'key': 'statuses', 'type': '[InstanceViewStatus]'}, + 'placement_group_id': {'key': 'placementGroupId', 'type': 'str'}, + } + + def __init__(self, *, platform_update_domain: int=None, platform_fault_domain: int=None, rdp_thumb_print: str=None, vm_agent=None, maintenance_redeploy_status=None, disks=None, extensions=None, boot_diagnostics=None, statuses=None, placement_group_id: str=None, **kwargs) -> None: + super(VirtualMachineScaleSetVMInstanceView, self).__init__(**kwargs) + self.platform_update_domain = platform_update_domain + self.platform_fault_domain = platform_fault_domain + self.rdp_thumb_print = rdp_thumb_print + self.vm_agent = vm_agent + self.maintenance_redeploy_status = maintenance_redeploy_status + self.disks = disks + self.extensions = extensions + self.vm_health = None + self.boot_diagnostics = boot_diagnostics + self.statuses = statuses + self.placement_group_id = placement_group_id + + +class VirtualMachineScaleSetVMProfile(Model): + """Describes a virtual machine scale set virtual machine profile. + + :param os_profile: Specifies the operating system settings for the virtual + machines in the scale set. + :type os_profile: + ~azure.mgmt.compute.v2018_10_01.models.VirtualMachineScaleSetOSProfile + :param storage_profile: Specifies the storage settings for the virtual + machine disks. + :type storage_profile: + ~azure.mgmt.compute.v2018_10_01.models.VirtualMachineScaleSetStorageProfile + :param additional_capabilities: Specifies additional capabilities enabled + or disabled on the virtual machine in the scale set. For instance: whether + the virtual machine has the capability to support attaching managed data + disks with UltraSSD_LRS storage account type. + :type additional_capabilities: + ~azure.mgmt.compute.v2018_10_01.models.AdditionalCapabilities + :param network_profile: Specifies properties of the network interfaces of + the virtual machines in the scale set. + :type network_profile: + ~azure.mgmt.compute.v2018_10_01.models.VirtualMachineScaleSetNetworkProfile + :param diagnostics_profile: Specifies the boot diagnostic settings state. +

    Minimum api-version: 2015-06-15. + :type diagnostics_profile: + ~azure.mgmt.compute.v2018_10_01.models.DiagnosticsProfile + :param extension_profile: Specifies a collection of settings for + extensions installed on virtual machines in the scale set. + :type extension_profile: + ~azure.mgmt.compute.v2018_10_01.models.VirtualMachineScaleSetExtensionProfile + :param license_type: Specifies that the image or disk that is being used + was licensed on-premises. This element is only used for images that + contain the Windows Server operating system.

    Possible values are: +

    Windows_Client

    Windows_Server

    If this element + is included in a request for an update, the value must match the initial + value. This value cannot be updated.

    For more information, see + [Azure Hybrid Use Benefit for Windows + Server](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-hybrid-use-benefit-licensing?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json) +

    Minimum api-version: 2015-06-15 + :type license_type: str + :param priority: Specifies the priority for the virtual machines in the + scale set.

    Minimum api-version: 2017-10-30-preview. Possible + values include: 'Regular', 'Low' + :type priority: str or + ~azure.mgmt.compute.v2018_10_01.models.VirtualMachinePriorityTypes + :param eviction_policy: Specifies the eviction policy for virtual machines + in a low priority scale set.

    Minimum api-version: + 2017-10-30-preview. Possible values include: 'Deallocate', 'Delete' + :type eviction_policy: str or + ~azure.mgmt.compute.v2018_10_01.models.VirtualMachineEvictionPolicyTypes + """ + + _attribute_map = { + 'os_profile': {'key': 'osProfile', 'type': 'VirtualMachineScaleSetOSProfile'}, + 'storage_profile': {'key': 'storageProfile', 'type': 'VirtualMachineScaleSetStorageProfile'}, + 'additional_capabilities': {'key': 'additionalCapabilities', 'type': 'AdditionalCapabilities'}, + 'network_profile': {'key': 'networkProfile', 'type': 'VirtualMachineScaleSetNetworkProfile'}, + 'diagnostics_profile': {'key': 'diagnosticsProfile', 'type': 'DiagnosticsProfile'}, + 'extension_profile': {'key': 'extensionProfile', 'type': 'VirtualMachineScaleSetExtensionProfile'}, + 'license_type': {'key': 'licenseType', 'type': 'str'}, + 'priority': {'key': 'priority', 'type': 'str'}, + 'eviction_policy': {'key': 'evictionPolicy', 'type': 'str'}, + } + + def __init__(self, *, os_profile=None, storage_profile=None, additional_capabilities=None, network_profile=None, diagnostics_profile=None, extension_profile=None, license_type: str=None, priority=None, eviction_policy=None, **kwargs) -> None: + super(VirtualMachineScaleSetVMProfile, self).__init__(**kwargs) + self.os_profile = os_profile + self.storage_profile = storage_profile + self.additional_capabilities = additional_capabilities + self.network_profile = network_profile + self.diagnostics_profile = diagnostics_profile + self.extension_profile = extension_profile + self.license_type = license_type + self.priority = priority + self.eviction_policy = eviction_policy + + +class VirtualMachineSize(Model): + """Describes the properties of a VM size. + + :param name: The name of the virtual machine size. + :type name: str + :param number_of_cores: The number of cores supported by the virtual + machine size. + :type number_of_cores: int + :param os_disk_size_in_mb: The OS disk size, in MB, allowed by the virtual + machine size. + :type os_disk_size_in_mb: int + :param resource_disk_size_in_mb: The resource disk size, in MB, allowed by + the virtual machine size. + :type resource_disk_size_in_mb: int + :param memory_in_mb: The amount of memory, in MB, supported by the virtual + machine size. + :type memory_in_mb: int + :param max_data_disk_count: The maximum number of data disks that can be + attached to the virtual machine size. + :type max_data_disk_count: int + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'number_of_cores': {'key': 'numberOfCores', 'type': 'int'}, + 'os_disk_size_in_mb': {'key': 'osDiskSizeInMB', 'type': 'int'}, + 'resource_disk_size_in_mb': {'key': 'resourceDiskSizeInMB', 'type': 'int'}, + 'memory_in_mb': {'key': 'memoryInMB', 'type': 'int'}, + 'max_data_disk_count': {'key': 'maxDataDiskCount', 'type': 'int'}, + } + + def __init__(self, *, name: str=None, number_of_cores: int=None, os_disk_size_in_mb: int=None, resource_disk_size_in_mb: int=None, memory_in_mb: int=None, max_data_disk_count: int=None, **kwargs) -> None: + super(VirtualMachineSize, self).__init__(**kwargs) + self.name = name + self.number_of_cores = number_of_cores + self.os_disk_size_in_mb = os_disk_size_in_mb + self.resource_disk_size_in_mb = resource_disk_size_in_mb + self.memory_in_mb = memory_in_mb + self.max_data_disk_count = max_data_disk_count + + +class VirtualMachineStatusCodeCount(Model): + """The status code and count of the virtual machine scale set instance view + status summary. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar code: The instance view status code. + :vartype code: str + :ivar count: The number of instances having a particular status code. + :vartype count: int + """ + + _validation = { + 'code': {'readonly': True}, + 'count': {'readonly': True}, + } + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + 'count': {'key': 'count', 'type': 'int'}, + } + + def __init__(self, **kwargs) -> None: + super(VirtualMachineStatusCodeCount, self).__init__(**kwargs) + self.code = None + self.count = None + + +class VirtualMachineUpdate(UpdateResource): + """Describes a Virtual Machine Update. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :param tags: Resource tags + :type tags: dict[str, str] + :param plan: Specifies information about the marketplace image used to + create the virtual machine. This element is only used for marketplace + images. Before you can use a marketplace image from an API, you must + enable the image for programmatic use. In the Azure portal, find the + marketplace image that you want to use and then click **Want to deploy + programmatically, Get Started ->**. Enter any required information and + then click **Save**. + :type plan: ~azure.mgmt.compute.v2018_10_01.models.Plan + :param hardware_profile: Specifies the hardware settings for the virtual + machine. + :type hardware_profile: + ~azure.mgmt.compute.v2018_10_01.models.HardwareProfile + :param storage_profile: Specifies the storage settings for the virtual + machine disks. + :type storage_profile: + ~azure.mgmt.compute.v2018_10_01.models.StorageProfile + :param additional_capabilities: Specifies additional capabilities enabled + or disabled on the virtual machine. + :type additional_capabilities: + ~azure.mgmt.compute.v2018_10_01.models.AdditionalCapabilities + :param os_profile: Specifies the operating system settings for the virtual + machine. + :type os_profile: ~azure.mgmt.compute.v2018_10_01.models.OSProfile + :param network_profile: Specifies the network interfaces of the virtual + machine. + :type network_profile: + ~azure.mgmt.compute.v2018_10_01.models.NetworkProfile + :param diagnostics_profile: Specifies the boot diagnostic settings state. +

    Minimum api-version: 2015-06-15. + :type diagnostics_profile: + ~azure.mgmt.compute.v2018_10_01.models.DiagnosticsProfile + :param availability_set: Specifies information about the availability set + that the virtual machine should be assigned to. Virtual machines specified + in the same availability set are allocated to different nodes to maximize + availability. For more information about availability sets, see [Manage + the availability of virtual + machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-manage-availability?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). +

    For more information on Azure planned maintenance, see [Planned + maintenance for virtual machines in + Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-planned-maintenance?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json) +

    Currently, a VM can only be added to availability set at creation + time. An existing VM cannot be added to an availability set. + :type availability_set: ~azure.mgmt.compute.v2018_10_01.models.SubResource + :param proximity_placement_group: Specifies information about the + proximity placement group that the virtual machine should be assigned to. +

    Minimum api-version: 2018-04-01. + :type proximity_placement_group: + ~azure.mgmt.compute.v2018_10_01.models.SubResource + :ivar provisioning_state: The provisioning state, which only appears in + the response. + :vartype provisioning_state: str + :ivar instance_view: The virtual machine instance view. + :vartype instance_view: + ~azure.mgmt.compute.v2018_10_01.models.VirtualMachineInstanceView + :param license_type: Specifies that the image or disk that is being used + was licensed on-premises. This element is only used for images that + contain the Windows Server operating system.

    Possible values are: +

    Windows_Client

    Windows_Server

    If this element + is included in a request for an update, the value must match the initial + value. This value cannot be updated.

    For more information, see + [Azure Hybrid Use Benefit for Windows + Server](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-hybrid-use-benefit-licensing?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json) +

    Minimum api-version: 2015-06-15 + :type license_type: str + :ivar vm_id: Specifies the VM unique ID which is a 128-bits identifier + that is encoded and stored in all Azure IaaS VMs SMBIOS and can be read + using platform BIOS commands. + :vartype vm_id: str + :param identity: The identity of the virtual machine, if configured. + :type identity: + ~azure.mgmt.compute.v2018_10_01.models.VirtualMachineIdentity + :param zones: The virtual machine zones. + :type zones: list[str] + """ + + _validation = { + 'provisioning_state': {'readonly': True}, + 'instance_view': {'readonly': True}, + 'vm_id': {'readonly': True}, + } + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + 'plan': {'key': 'plan', 'type': 'Plan'}, + 'hardware_profile': {'key': 'properties.hardwareProfile', 'type': 'HardwareProfile'}, + 'storage_profile': {'key': 'properties.storageProfile', 'type': 'StorageProfile'}, + 'additional_capabilities': {'key': 'properties.additionalCapabilities', 'type': 'AdditionalCapabilities'}, + 'os_profile': {'key': 'properties.osProfile', 'type': 'OSProfile'}, + 'network_profile': {'key': 'properties.networkProfile', 'type': 'NetworkProfile'}, + 'diagnostics_profile': {'key': 'properties.diagnosticsProfile', 'type': 'DiagnosticsProfile'}, + 'availability_set': {'key': 'properties.availabilitySet', 'type': 'SubResource'}, + 'proximity_placement_group': {'key': 'properties.proximityPlacementGroup', 'type': 'SubResource'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'instance_view': {'key': 'properties.instanceView', 'type': 'VirtualMachineInstanceView'}, + 'license_type': {'key': 'properties.licenseType', 'type': 'str'}, + 'vm_id': {'key': 'properties.vmId', 'type': 'str'}, + 'identity': {'key': 'identity', 'type': 'VirtualMachineIdentity'}, + 'zones': {'key': 'zones', 'type': '[str]'}, + } + + def __init__(self, *, tags=None, plan=None, hardware_profile=None, storage_profile=None, additional_capabilities=None, os_profile=None, network_profile=None, diagnostics_profile=None, availability_set=None, proximity_placement_group=None, license_type: str=None, identity=None, zones=None, **kwargs) -> None: + super(VirtualMachineUpdate, self).__init__(tags=tags, **kwargs) + self.plan = plan + self.hardware_profile = hardware_profile + self.storage_profile = storage_profile + self.additional_capabilities = additional_capabilities + self.os_profile = os_profile + self.network_profile = network_profile + self.diagnostics_profile = diagnostics_profile + self.availability_set = availability_set + self.proximity_placement_group = proximity_placement_group + self.provisioning_state = None + self.instance_view = None + self.license_type = license_type + self.vm_id = None + self.identity = identity + self.zones = zones + + +class WindowsConfiguration(Model): + """Specifies Windows operating system settings on the virtual machine. + + :param provision_vm_agent: Indicates whether virtual machine agent should + be provisioned on the virtual machine.

    When this property is not + specified in the request body, default behavior is to set it to true. + This will ensure that VM Agent is installed on the VM so that extensions + can be added to the VM later. + :type provision_vm_agent: bool + :param enable_automatic_updates: Indicates whether virtual machine is + enabled for automatic Windows updates. Default value is true.

    For + virtual machine scale sets, this property can be updated and updates will + take effect on OS reprovisioning. + :type enable_automatic_updates: bool + :param time_zone: Specifies the time zone of the virtual machine. e.g. + "Pacific Standard Time" + :type time_zone: str + :param additional_unattend_content: Specifies additional base-64 encoded + XML formatted information that can be included in the Unattend.xml file, + which is used by Windows Setup. + :type additional_unattend_content: + list[~azure.mgmt.compute.v2018_10_01.models.AdditionalUnattendContent] + :param win_rm: Specifies the Windows Remote Management listeners. This + enables remote Windows PowerShell. + :type win_rm: ~azure.mgmt.compute.v2018_10_01.models.WinRMConfiguration + """ + + _attribute_map = { + 'provision_vm_agent': {'key': 'provisionVMAgent', 'type': 'bool'}, + 'enable_automatic_updates': {'key': 'enableAutomaticUpdates', 'type': 'bool'}, + 'time_zone': {'key': 'timeZone', 'type': 'str'}, + 'additional_unattend_content': {'key': 'additionalUnattendContent', 'type': '[AdditionalUnattendContent]'}, + 'win_rm': {'key': 'winRM', 'type': 'WinRMConfiguration'}, + } + + def __init__(self, *, provision_vm_agent: bool=None, enable_automatic_updates: bool=None, time_zone: str=None, additional_unattend_content=None, win_rm=None, **kwargs) -> None: + super(WindowsConfiguration, self).__init__(**kwargs) + self.provision_vm_agent = provision_vm_agent + self.enable_automatic_updates = enable_automatic_updates + self.time_zone = time_zone + self.additional_unattend_content = additional_unattend_content + self.win_rm = win_rm + + +class WinRMConfiguration(Model): + """Describes Windows Remote Management configuration of the VM. + + :param listeners: The list of Windows Remote Management listeners + :type listeners: + list[~azure.mgmt.compute.v2018_10_01.models.WinRMListener] + """ + + _attribute_map = { + 'listeners': {'key': 'listeners', 'type': '[WinRMListener]'}, + } + + def __init__(self, *, listeners=None, **kwargs) -> None: + super(WinRMConfiguration, self).__init__(**kwargs) + self.listeners = listeners + + +class WinRMListener(Model): + """Describes Protocol and thumbprint of Windows Remote Management listener. + + :param protocol: Specifies the protocol of listener.

    Possible + values are:
    **http**

    **https**. Possible values include: + 'Http', 'Https' + :type protocol: str or + ~azure.mgmt.compute.v2018_10_01.models.ProtocolTypes + :param certificate_url: This is the URL of a certificate that has been + uploaded to Key Vault as a secret. For adding a secret to the Key Vault, + see [Add a key or secret to the key + vault](https://docs.microsoft.com/azure/key-vault/key-vault-get-started/#add). + In this case, your certificate needs to be It is the Base64 encoding of + the following JSON Object which is encoded in UTF-8:

    {
    + "data":"",
    "dataType":"pfx",
    + "password":""
    } + :type certificate_url: str + """ + + _attribute_map = { + 'protocol': {'key': 'protocol', 'type': 'ProtocolTypes'}, + 'certificate_url': {'key': 'certificateUrl', 'type': 'str'}, + } + + def __init__(self, *, protocol=None, certificate_url: str=None, **kwargs) -> None: + super(WinRMListener, self).__init__(**kwargs) + self.protocol = protocol + self.certificate_url = certificate_url diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/_paged_models.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/_paged_models.py new file mode 100644 index 000000000000..8552b1add918 --- /dev/null +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/_paged_models.py @@ -0,0 +1,183 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.paging import Paged + + +class ComputeOperationValuePaged(Paged): + """ + A paging container for iterating over a list of :class:`ComputeOperationValue ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[ComputeOperationValue]'} + } + + def __init__(self, *args, **kwargs): + + super(ComputeOperationValuePaged, self).__init__(*args, **kwargs) +class AvailabilitySetPaged(Paged): + """ + A paging container for iterating over a list of :class:`AvailabilitySet ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[AvailabilitySet]'} + } + + def __init__(self, *args, **kwargs): + + super(AvailabilitySetPaged, self).__init__(*args, **kwargs) +class VirtualMachineSizePaged(Paged): + """ + A paging container for iterating over a list of :class:`VirtualMachineSize ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[VirtualMachineSize]'} + } + + def __init__(self, *args, **kwargs): + + super(VirtualMachineSizePaged, self).__init__(*args, **kwargs) +class ProximityPlacementGroupPaged(Paged): + """ + A paging container for iterating over a list of :class:`ProximityPlacementGroup ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[ProximityPlacementGroup]'} + } + + def __init__(self, *args, **kwargs): + + super(ProximityPlacementGroupPaged, self).__init__(*args, **kwargs) +class UsagePaged(Paged): + """ + A paging container for iterating over a list of :class:`Usage ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[Usage]'} + } + + def __init__(self, *args, **kwargs): + + super(UsagePaged, self).__init__(*args, **kwargs) +class VirtualMachinePaged(Paged): + """ + A paging container for iterating over a list of :class:`VirtualMachine ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[VirtualMachine]'} + } + + def __init__(self, *args, **kwargs): + + super(VirtualMachinePaged, self).__init__(*args, **kwargs) +class ImagePaged(Paged): + """ + A paging container for iterating over a list of :class:`Image ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[Image]'} + } + + def __init__(self, *args, **kwargs): + + super(ImagePaged, self).__init__(*args, **kwargs) +class VirtualMachineScaleSetPaged(Paged): + """ + A paging container for iterating over a list of :class:`VirtualMachineScaleSet ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[VirtualMachineScaleSet]'} + } + + def __init__(self, *args, **kwargs): + + super(VirtualMachineScaleSetPaged, self).__init__(*args, **kwargs) +class VirtualMachineScaleSetSkuPaged(Paged): + """ + A paging container for iterating over a list of :class:`VirtualMachineScaleSetSku ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[VirtualMachineScaleSetSku]'} + } + + def __init__(self, *args, **kwargs): + + super(VirtualMachineScaleSetSkuPaged, self).__init__(*args, **kwargs) +class UpgradeOperationHistoricalStatusInfoPaged(Paged): + """ + A paging container for iterating over a list of :class:`UpgradeOperationHistoricalStatusInfo ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[UpgradeOperationHistoricalStatusInfo]'} + } + + def __init__(self, *args, **kwargs): + + super(UpgradeOperationHistoricalStatusInfoPaged, self).__init__(*args, **kwargs) +class VirtualMachineScaleSetExtensionPaged(Paged): + """ + A paging container for iterating over a list of :class:`VirtualMachineScaleSetExtension ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[VirtualMachineScaleSetExtension]'} + } + + def __init__(self, *args, **kwargs): + + super(VirtualMachineScaleSetExtensionPaged, self).__init__(*args, **kwargs) +class VirtualMachineScaleSetVMPaged(Paged): + """ + A paging container for iterating over a list of :class:`VirtualMachineScaleSetVM ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[VirtualMachineScaleSetVM]'} + } + + def __init__(self, *args, **kwargs): + + super(VirtualMachineScaleSetVMPaged, self).__init__(*args, **kwargs) +class RunCommandDocumentBasePaged(Paged): + """ + A paging container for iterating over a list of :class:`RunCommandDocumentBase ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[RunCommandDocumentBase]'} + } + + def __init__(self, *args, **kwargs): + + super(RunCommandDocumentBasePaged, self).__init__(*args, **kwargs) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/additional_capabilities.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/additional_capabilities.py deleted file mode 100644 index 18ff109310c8..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/additional_capabilities.py +++ /dev/null @@ -1,33 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class AdditionalCapabilities(Model): - """Enables or disables a capability on the virtual machine or virtual machine - scale set. - - :param ultra_ssd_enabled: The flag that enables or disables a capability - to have one or more managed data disks with UltraSSD_LRS storage account - type on the VM or VMSS. Managed disks with storage account type - UltraSSD_LRS can be added to a virtual machine or virtual machine scale - set only if this property is enabled. - :type ultra_ssd_enabled: bool - """ - - _attribute_map = { - 'ultra_ssd_enabled': {'key': 'ultraSSDEnabled', 'type': 'bool'}, - } - - def __init__(self, **kwargs): - super(AdditionalCapabilities, self).__init__(**kwargs) - self.ultra_ssd_enabled = kwargs.get('ultra_ssd_enabled', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/additional_capabilities_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/additional_capabilities_py3.py deleted file mode 100644 index db83a0a4eacb..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/additional_capabilities_py3.py +++ /dev/null @@ -1,33 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class AdditionalCapabilities(Model): - """Enables or disables a capability on the virtual machine or virtual machine - scale set. - - :param ultra_ssd_enabled: The flag that enables or disables a capability - to have one or more managed data disks with UltraSSD_LRS storage account - type on the VM or VMSS. Managed disks with storage account type - UltraSSD_LRS can be added to a virtual machine or virtual machine scale - set only if this property is enabled. - :type ultra_ssd_enabled: bool - """ - - _attribute_map = { - 'ultra_ssd_enabled': {'key': 'ultraSSDEnabled', 'type': 'bool'}, - } - - def __init__(self, *, ultra_ssd_enabled: bool=None, **kwargs) -> None: - super(AdditionalCapabilities, self).__init__(**kwargs) - self.ultra_ssd_enabled = ultra_ssd_enabled diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/additional_unattend_content.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/additional_unattend_content.py deleted file mode 100644 index 46f7944d0f4a..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/additional_unattend_content.py +++ /dev/null @@ -1,52 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class AdditionalUnattendContent(Model): - """Specifies additional XML formatted information that can be included in the - Unattend.xml file, which is used by Windows Setup. Contents are defined by - setting name, component name, and the pass in which the content is applied. - - :param pass_name: The pass name. Currently, the only allowable value is - OobeSystem. Possible values include: 'OobeSystem' - :type pass_name: str or ~azure.mgmt.compute.v2018_10_01.models.PassNames - :param component_name: The component name. Currently, the only allowable - value is Microsoft-Windows-Shell-Setup. Possible values include: - 'Microsoft-Windows-Shell-Setup' - :type component_name: str or - ~azure.mgmt.compute.v2018_10_01.models.ComponentNames - :param setting_name: Specifies the name of the setting to which the - content applies. Possible values are: FirstLogonCommands and AutoLogon. - Possible values include: 'AutoLogon', 'FirstLogonCommands' - :type setting_name: str or - ~azure.mgmt.compute.v2018_10_01.models.SettingNames - :param content: Specifies the XML formatted content that is added to the - unattend.xml file for the specified path and component. The XML must be - less than 4KB and must include the root element for the setting or feature - that is being inserted. - :type content: str - """ - - _attribute_map = { - 'pass_name': {'key': 'passName', 'type': 'PassNames'}, - 'component_name': {'key': 'componentName', 'type': 'ComponentNames'}, - 'setting_name': {'key': 'settingName', 'type': 'SettingNames'}, - 'content': {'key': 'content', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(AdditionalUnattendContent, self).__init__(**kwargs) - self.pass_name = kwargs.get('pass_name', None) - self.component_name = kwargs.get('component_name', None) - self.setting_name = kwargs.get('setting_name', None) - self.content = kwargs.get('content', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/additional_unattend_content_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/additional_unattend_content_py3.py deleted file mode 100644 index 69bf6281a50a..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/additional_unattend_content_py3.py +++ /dev/null @@ -1,52 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class AdditionalUnattendContent(Model): - """Specifies additional XML formatted information that can be included in the - Unattend.xml file, which is used by Windows Setup. Contents are defined by - setting name, component name, and the pass in which the content is applied. - - :param pass_name: The pass name. Currently, the only allowable value is - OobeSystem. Possible values include: 'OobeSystem' - :type pass_name: str or ~azure.mgmt.compute.v2018_10_01.models.PassNames - :param component_name: The component name. Currently, the only allowable - value is Microsoft-Windows-Shell-Setup. Possible values include: - 'Microsoft-Windows-Shell-Setup' - :type component_name: str or - ~azure.mgmt.compute.v2018_10_01.models.ComponentNames - :param setting_name: Specifies the name of the setting to which the - content applies. Possible values are: FirstLogonCommands and AutoLogon. - Possible values include: 'AutoLogon', 'FirstLogonCommands' - :type setting_name: str or - ~azure.mgmt.compute.v2018_10_01.models.SettingNames - :param content: Specifies the XML formatted content that is added to the - unattend.xml file for the specified path and component. The XML must be - less than 4KB and must include the root element for the setting or feature - that is being inserted. - :type content: str - """ - - _attribute_map = { - 'pass_name': {'key': 'passName', 'type': 'PassNames'}, - 'component_name': {'key': 'componentName', 'type': 'ComponentNames'}, - 'setting_name': {'key': 'settingName', 'type': 'SettingNames'}, - 'content': {'key': 'content', 'type': 'str'}, - } - - def __init__(self, *, pass_name=None, component_name=None, setting_name=None, content: str=None, **kwargs) -> None: - super(AdditionalUnattendContent, self).__init__(**kwargs) - self.pass_name = pass_name - self.component_name = component_name - self.setting_name = setting_name - self.content = content diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/api_entity_reference.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/api_entity_reference.py deleted file mode 100644 index d43730af3659..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/api_entity_reference.py +++ /dev/null @@ -1,29 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ApiEntityReference(Model): - """The API entity reference. - - :param id: The ARM resource id in the form of - /subscriptions/{SubscriptionId}/resourceGroups/{ResourceGroupName}/... - :type id: str - """ - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ApiEntityReference, self).__init__(**kwargs) - self.id = kwargs.get('id', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/api_entity_reference_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/api_entity_reference_py3.py deleted file mode 100644 index d42dfb1a5fd0..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/api_entity_reference_py3.py +++ /dev/null @@ -1,29 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ApiEntityReference(Model): - """The API entity reference. - - :param id: The ARM resource id in the form of - /subscriptions/{SubscriptionId}/resourceGroups/{ResourceGroupName}/... - :type id: str - """ - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - } - - def __init__(self, *, id: str=None, **kwargs) -> None: - super(ApiEntityReference, self).__init__(**kwargs) - self.id = id diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/api_error.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/api_error.py deleted file mode 100644 index a5871f03ef08..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/api_error.py +++ /dev/null @@ -1,44 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ApiError(Model): - """Api error. - - :param details: The Api error details - :type details: list[~azure.mgmt.compute.v2018_10_01.models.ApiErrorBase] - :param innererror: The Api inner error - :type innererror: ~azure.mgmt.compute.v2018_10_01.models.InnerError - :param code: The error code. - :type code: str - :param target: The target of the particular error. - :type target: str - :param message: The error message. - :type message: str - """ - - _attribute_map = { - 'details': {'key': 'details', 'type': '[ApiErrorBase]'}, - 'innererror': {'key': 'innererror', 'type': 'InnerError'}, - 'code': {'key': 'code', 'type': 'str'}, - 'target': {'key': 'target', 'type': 'str'}, - 'message': {'key': 'message', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ApiError, self).__init__(**kwargs) - self.details = kwargs.get('details', None) - self.innererror = kwargs.get('innererror', None) - self.code = kwargs.get('code', None) - self.target = kwargs.get('target', None) - self.message = kwargs.get('message', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/api_error_base.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/api_error_base.py deleted file mode 100644 index 655c08638905..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/api_error_base.py +++ /dev/null @@ -1,36 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ApiErrorBase(Model): - """Api error base. - - :param code: The error code. - :type code: str - :param target: The target of the particular error. - :type target: str - :param message: The error message. - :type message: str - """ - - _attribute_map = { - 'code': {'key': 'code', 'type': 'str'}, - 'target': {'key': 'target', 'type': 'str'}, - 'message': {'key': 'message', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ApiErrorBase, self).__init__(**kwargs) - self.code = kwargs.get('code', None) - self.target = kwargs.get('target', None) - self.message = kwargs.get('message', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/api_error_base_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/api_error_base_py3.py deleted file mode 100644 index 5ba95aa0283e..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/api_error_base_py3.py +++ /dev/null @@ -1,36 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ApiErrorBase(Model): - """Api error base. - - :param code: The error code. - :type code: str - :param target: The target of the particular error. - :type target: str - :param message: The error message. - :type message: str - """ - - _attribute_map = { - 'code': {'key': 'code', 'type': 'str'}, - 'target': {'key': 'target', 'type': 'str'}, - 'message': {'key': 'message', 'type': 'str'}, - } - - def __init__(self, *, code: str=None, target: str=None, message: str=None, **kwargs) -> None: - super(ApiErrorBase, self).__init__(**kwargs) - self.code = code - self.target = target - self.message = message diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/api_error_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/api_error_py3.py deleted file mode 100644 index 09198f85879b..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/api_error_py3.py +++ /dev/null @@ -1,44 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ApiError(Model): - """Api error. - - :param details: The Api error details - :type details: list[~azure.mgmt.compute.v2018_10_01.models.ApiErrorBase] - :param innererror: The Api inner error - :type innererror: ~azure.mgmt.compute.v2018_10_01.models.InnerError - :param code: The error code. - :type code: str - :param target: The target of the particular error. - :type target: str - :param message: The error message. - :type message: str - """ - - _attribute_map = { - 'details': {'key': 'details', 'type': '[ApiErrorBase]'}, - 'innererror': {'key': 'innererror', 'type': 'InnerError'}, - 'code': {'key': 'code', 'type': 'str'}, - 'target': {'key': 'target', 'type': 'str'}, - 'message': {'key': 'message', 'type': 'str'}, - } - - def __init__(self, *, details=None, innererror=None, code: str=None, target: str=None, message: str=None, **kwargs) -> None: - super(ApiError, self).__init__(**kwargs) - self.details = details - self.innererror = innererror - self.code = code - self.target = target - self.message = message diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/automatic_os_upgrade_policy.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/automatic_os_upgrade_policy.py deleted file mode 100644 index 20bcc8dce1ed..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/automatic_os_upgrade_policy.py +++ /dev/null @@ -1,39 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class AutomaticOSUpgradePolicy(Model): - """The configuration parameters used for performing automatic OS upgrade. - - :param enable_automatic_os_upgrade: Indicates whether OS upgrades should - automatically be applied to scale set instances in a rolling fashion when - a newer version of the OS image becomes available. Default value is false. - If this is set to true for Windows based scale sets, recommendation is to - set - [enableAutomaticUpdates](https://docs.microsoft.com/dotnet/api/microsoft.azure.management.compute.models.windowsconfiguration.enableautomaticupdates?view=azure-dotnet) - to false. - :type enable_automatic_os_upgrade: bool - :param disable_automatic_rollback: Whether OS image rollback feature - should be disabled. Default value is false. - :type disable_automatic_rollback: bool - """ - - _attribute_map = { - 'enable_automatic_os_upgrade': {'key': 'enableAutomaticOSUpgrade', 'type': 'bool'}, - 'disable_automatic_rollback': {'key': 'disableAutomaticRollback', 'type': 'bool'}, - } - - def __init__(self, **kwargs): - super(AutomaticOSUpgradePolicy, self).__init__(**kwargs) - self.enable_automatic_os_upgrade = kwargs.get('enable_automatic_os_upgrade', None) - self.disable_automatic_rollback = kwargs.get('disable_automatic_rollback', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/automatic_os_upgrade_policy_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/automatic_os_upgrade_policy_py3.py deleted file mode 100644 index 968e560a3c94..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/automatic_os_upgrade_policy_py3.py +++ /dev/null @@ -1,39 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class AutomaticOSUpgradePolicy(Model): - """The configuration parameters used for performing automatic OS upgrade. - - :param enable_automatic_os_upgrade: Indicates whether OS upgrades should - automatically be applied to scale set instances in a rolling fashion when - a newer version of the OS image becomes available. Default value is false. - If this is set to true for Windows based scale sets, recommendation is to - set - [enableAutomaticUpdates](https://docs.microsoft.com/dotnet/api/microsoft.azure.management.compute.models.windowsconfiguration.enableautomaticupdates?view=azure-dotnet) - to false. - :type enable_automatic_os_upgrade: bool - :param disable_automatic_rollback: Whether OS image rollback feature - should be disabled. Default value is false. - :type disable_automatic_rollback: bool - """ - - _attribute_map = { - 'enable_automatic_os_upgrade': {'key': 'enableAutomaticOSUpgrade', 'type': 'bool'}, - 'disable_automatic_rollback': {'key': 'disableAutomaticRollback', 'type': 'bool'}, - } - - def __init__(self, *, enable_automatic_os_upgrade: bool=None, disable_automatic_rollback: bool=None, **kwargs) -> None: - super(AutomaticOSUpgradePolicy, self).__init__(**kwargs) - self.enable_automatic_os_upgrade = enable_automatic_os_upgrade - self.disable_automatic_rollback = disable_automatic_rollback diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/automatic_os_upgrade_properties.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/automatic_os_upgrade_properties.py deleted file mode 100644 index b0a11290b7d3..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/automatic_os_upgrade_properties.py +++ /dev/null @@ -1,35 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class AutomaticOSUpgradeProperties(Model): - """Describes automatic OS upgrade properties on the image. - - All required parameters must be populated in order to send to Azure. - - :param automatic_os_upgrade_supported: Required. Specifies whether - automatic OS upgrade is supported on the image. - :type automatic_os_upgrade_supported: bool - """ - - _validation = { - 'automatic_os_upgrade_supported': {'required': True}, - } - - _attribute_map = { - 'automatic_os_upgrade_supported': {'key': 'automaticOSUpgradeSupported', 'type': 'bool'}, - } - - def __init__(self, **kwargs): - super(AutomaticOSUpgradeProperties, self).__init__(**kwargs) - self.automatic_os_upgrade_supported = kwargs.get('automatic_os_upgrade_supported', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/automatic_os_upgrade_properties_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/automatic_os_upgrade_properties_py3.py deleted file mode 100644 index 0bf3f1f57628..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/automatic_os_upgrade_properties_py3.py +++ /dev/null @@ -1,35 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class AutomaticOSUpgradeProperties(Model): - """Describes automatic OS upgrade properties on the image. - - All required parameters must be populated in order to send to Azure. - - :param automatic_os_upgrade_supported: Required. Specifies whether - automatic OS upgrade is supported on the image. - :type automatic_os_upgrade_supported: bool - """ - - _validation = { - 'automatic_os_upgrade_supported': {'required': True}, - } - - _attribute_map = { - 'automatic_os_upgrade_supported': {'key': 'automaticOSUpgradeSupported', 'type': 'bool'}, - } - - def __init__(self, *, automatic_os_upgrade_supported: bool, **kwargs) -> None: - super(AutomaticOSUpgradeProperties, self).__init__(**kwargs) - self.automatic_os_upgrade_supported = automatic_os_upgrade_supported diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/availability_set.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/availability_set.py deleted file mode 100644 index db8fd5ddca76..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/availability_set.py +++ /dev/null @@ -1,95 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource import Resource - - -class AvailabilitySet(Resource): - """Specifies information about the availability set that the virtual machine - should be assigned to. Virtual machines specified in the same availability - set are allocated to different nodes to maximize availability. For more - information about availability sets, see [Manage the availability of - virtual - machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-manage-availability?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). -

    For more information on Azure planned maintenance, see [Planned - maintenance for virtual machines in - Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-planned-maintenance?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json) -

    Currently, a VM can only be added to availability set at creation - time. An existing VM cannot be added to an availability set. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource Id - :vartype id: str - :ivar name: Resource name - :vartype name: str - :ivar type: Resource type - :vartype type: str - :param location: Required. Resource location - :type location: str - :param tags: Resource tags - :type tags: dict[str, str] - :param platform_update_domain_count: Update Domain count. - :type platform_update_domain_count: int - :param platform_fault_domain_count: Fault Domain count. - :type platform_fault_domain_count: int - :param virtual_machines: A list of references to all virtual machines in - the availability set. - :type virtual_machines: - list[~azure.mgmt.compute.v2018_10_01.models.SubResource] - :param proximity_placement_group: Specifies information about the - proximity placement group that the availability set should be assigned to. -

    Minimum api-version: 2018-04-01. - :type proximity_placement_group: - ~azure.mgmt.compute.v2018_10_01.models.SubResource - :ivar statuses: The resource status information. - :vartype statuses: - list[~azure.mgmt.compute.v2018_10_01.models.InstanceViewStatus] - :param sku: Sku of the availability set, only name is required to be set. - See AvailabilitySetSkuTypes for possible set of values. Use 'Aligned' for - virtual machines with managed disks and 'Classic' for virtual machines - with unmanaged disks. Default value is 'Classic'. - :type sku: ~azure.mgmt.compute.v2018_10_01.models.Sku - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - 'statuses': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'platform_update_domain_count': {'key': 'properties.platformUpdateDomainCount', 'type': 'int'}, - 'platform_fault_domain_count': {'key': 'properties.platformFaultDomainCount', 'type': 'int'}, - 'virtual_machines': {'key': 'properties.virtualMachines', 'type': '[SubResource]'}, - 'proximity_placement_group': {'key': 'properties.proximityPlacementGroup', 'type': 'SubResource'}, - 'statuses': {'key': 'properties.statuses', 'type': '[InstanceViewStatus]'}, - 'sku': {'key': 'sku', 'type': 'Sku'}, - } - - def __init__(self, **kwargs): - super(AvailabilitySet, self).__init__(**kwargs) - self.platform_update_domain_count = kwargs.get('platform_update_domain_count', None) - self.platform_fault_domain_count = kwargs.get('platform_fault_domain_count', None) - self.virtual_machines = kwargs.get('virtual_machines', None) - self.proximity_placement_group = kwargs.get('proximity_placement_group', None) - self.statuses = None - self.sku = kwargs.get('sku', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/availability_set_paged.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/availability_set_paged.py deleted file mode 100644 index 179ffb77166d..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/availability_set_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class AvailabilitySetPaged(Paged): - """ - A paging container for iterating over a list of :class:`AvailabilitySet ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[AvailabilitySet]'} - } - - def __init__(self, *args, **kwargs): - - super(AvailabilitySetPaged, self).__init__(*args, **kwargs) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/availability_set_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/availability_set_py3.py deleted file mode 100644 index b938172430c1..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/availability_set_py3.py +++ /dev/null @@ -1,95 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource_py3 import Resource - - -class AvailabilitySet(Resource): - """Specifies information about the availability set that the virtual machine - should be assigned to. Virtual machines specified in the same availability - set are allocated to different nodes to maximize availability. For more - information about availability sets, see [Manage the availability of - virtual - machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-manage-availability?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). -

    For more information on Azure planned maintenance, see [Planned - maintenance for virtual machines in - Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-planned-maintenance?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json) -

    Currently, a VM can only be added to availability set at creation - time. An existing VM cannot be added to an availability set. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource Id - :vartype id: str - :ivar name: Resource name - :vartype name: str - :ivar type: Resource type - :vartype type: str - :param location: Required. Resource location - :type location: str - :param tags: Resource tags - :type tags: dict[str, str] - :param platform_update_domain_count: Update Domain count. - :type platform_update_domain_count: int - :param platform_fault_domain_count: Fault Domain count. - :type platform_fault_domain_count: int - :param virtual_machines: A list of references to all virtual machines in - the availability set. - :type virtual_machines: - list[~azure.mgmt.compute.v2018_10_01.models.SubResource] - :param proximity_placement_group: Specifies information about the - proximity placement group that the availability set should be assigned to. -

    Minimum api-version: 2018-04-01. - :type proximity_placement_group: - ~azure.mgmt.compute.v2018_10_01.models.SubResource - :ivar statuses: The resource status information. - :vartype statuses: - list[~azure.mgmt.compute.v2018_10_01.models.InstanceViewStatus] - :param sku: Sku of the availability set, only name is required to be set. - See AvailabilitySetSkuTypes for possible set of values. Use 'Aligned' for - virtual machines with managed disks and 'Classic' for virtual machines - with unmanaged disks. Default value is 'Classic'. - :type sku: ~azure.mgmt.compute.v2018_10_01.models.Sku - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - 'statuses': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'platform_update_domain_count': {'key': 'properties.platformUpdateDomainCount', 'type': 'int'}, - 'platform_fault_domain_count': {'key': 'properties.platformFaultDomainCount', 'type': 'int'}, - 'virtual_machines': {'key': 'properties.virtualMachines', 'type': '[SubResource]'}, - 'proximity_placement_group': {'key': 'properties.proximityPlacementGroup', 'type': 'SubResource'}, - 'statuses': {'key': 'properties.statuses', 'type': '[InstanceViewStatus]'}, - 'sku': {'key': 'sku', 'type': 'Sku'}, - } - - def __init__(self, *, location: str, tags=None, platform_update_domain_count: int=None, platform_fault_domain_count: int=None, virtual_machines=None, proximity_placement_group=None, sku=None, **kwargs) -> None: - super(AvailabilitySet, self).__init__(location=location, tags=tags, **kwargs) - self.platform_update_domain_count = platform_update_domain_count - self.platform_fault_domain_count = platform_fault_domain_count - self.virtual_machines = virtual_machines - self.proximity_placement_group = proximity_placement_group - self.statuses = None - self.sku = sku diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/availability_set_update.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/availability_set_update.py deleted file mode 100644 index 3605ea02498d..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/availability_set_update.py +++ /dev/null @@ -1,65 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .update_resource import UpdateResource - - -class AvailabilitySetUpdate(UpdateResource): - """Specifies information about the availability set that the virtual machine - should be assigned to. Only tags may be updated. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :param tags: Resource tags - :type tags: dict[str, str] - :param platform_update_domain_count: Update Domain count. - :type platform_update_domain_count: int - :param platform_fault_domain_count: Fault Domain count. - :type platform_fault_domain_count: int - :param virtual_machines: A list of references to all virtual machines in - the availability set. - :type virtual_machines: - list[~azure.mgmt.compute.v2018_10_01.models.SubResource] - :param proximity_placement_group: Specifies information about the - proximity placement group that the availability set should be assigned to. -

    Minimum api-version: 2018-04-01. - :type proximity_placement_group: - ~azure.mgmt.compute.v2018_10_01.models.SubResource - :ivar statuses: The resource status information. - :vartype statuses: - list[~azure.mgmt.compute.v2018_10_01.models.InstanceViewStatus] - :param sku: Sku of the availability set - :type sku: ~azure.mgmt.compute.v2018_10_01.models.Sku - """ - - _validation = { - 'statuses': {'readonly': True}, - } - - _attribute_map = { - 'tags': {'key': 'tags', 'type': '{str}'}, - 'platform_update_domain_count': {'key': 'properties.platformUpdateDomainCount', 'type': 'int'}, - 'platform_fault_domain_count': {'key': 'properties.platformFaultDomainCount', 'type': 'int'}, - 'virtual_machines': {'key': 'properties.virtualMachines', 'type': '[SubResource]'}, - 'proximity_placement_group': {'key': 'properties.proximityPlacementGroup', 'type': 'SubResource'}, - 'statuses': {'key': 'properties.statuses', 'type': '[InstanceViewStatus]'}, - 'sku': {'key': 'sku', 'type': 'Sku'}, - } - - def __init__(self, **kwargs): - super(AvailabilitySetUpdate, self).__init__(**kwargs) - self.platform_update_domain_count = kwargs.get('platform_update_domain_count', None) - self.platform_fault_domain_count = kwargs.get('platform_fault_domain_count', None) - self.virtual_machines = kwargs.get('virtual_machines', None) - self.proximity_placement_group = kwargs.get('proximity_placement_group', None) - self.statuses = None - self.sku = kwargs.get('sku', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/availability_set_update_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/availability_set_update_py3.py deleted file mode 100644 index 6ee01d363c00..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/availability_set_update_py3.py +++ /dev/null @@ -1,65 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .update_resource_py3 import UpdateResource - - -class AvailabilitySetUpdate(UpdateResource): - """Specifies information about the availability set that the virtual machine - should be assigned to. Only tags may be updated. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :param tags: Resource tags - :type tags: dict[str, str] - :param platform_update_domain_count: Update Domain count. - :type platform_update_domain_count: int - :param platform_fault_domain_count: Fault Domain count. - :type platform_fault_domain_count: int - :param virtual_machines: A list of references to all virtual machines in - the availability set. - :type virtual_machines: - list[~azure.mgmt.compute.v2018_10_01.models.SubResource] - :param proximity_placement_group: Specifies information about the - proximity placement group that the availability set should be assigned to. -

    Minimum api-version: 2018-04-01. - :type proximity_placement_group: - ~azure.mgmt.compute.v2018_10_01.models.SubResource - :ivar statuses: The resource status information. - :vartype statuses: - list[~azure.mgmt.compute.v2018_10_01.models.InstanceViewStatus] - :param sku: Sku of the availability set - :type sku: ~azure.mgmt.compute.v2018_10_01.models.Sku - """ - - _validation = { - 'statuses': {'readonly': True}, - } - - _attribute_map = { - 'tags': {'key': 'tags', 'type': '{str}'}, - 'platform_update_domain_count': {'key': 'properties.platformUpdateDomainCount', 'type': 'int'}, - 'platform_fault_domain_count': {'key': 'properties.platformFaultDomainCount', 'type': 'int'}, - 'virtual_machines': {'key': 'properties.virtualMachines', 'type': '[SubResource]'}, - 'proximity_placement_group': {'key': 'properties.proximityPlacementGroup', 'type': 'SubResource'}, - 'statuses': {'key': 'properties.statuses', 'type': '[InstanceViewStatus]'}, - 'sku': {'key': 'sku', 'type': 'Sku'}, - } - - def __init__(self, *, tags=None, platform_update_domain_count: int=None, platform_fault_domain_count: int=None, virtual_machines=None, proximity_placement_group=None, sku=None, **kwargs) -> None: - super(AvailabilitySetUpdate, self).__init__(tags=tags, **kwargs) - self.platform_update_domain_count = platform_update_domain_count - self.platform_fault_domain_count = platform_fault_domain_count - self.virtual_machines = virtual_machines - self.proximity_placement_group = proximity_placement_group - self.statuses = None - self.sku = sku diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/boot_diagnostics.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/boot_diagnostics.py deleted file mode 100644 index 4a1f77c4d7d0..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/boot_diagnostics.py +++ /dev/null @@ -1,37 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class BootDiagnostics(Model): - """Boot Diagnostics is a debugging feature which allows you to view Console - Output and Screenshot to diagnose VM status.

    You can easily view - the output of your console log.

    Azure also enables you to see a - screenshot of the VM from the hypervisor. - - :param enabled: Whether boot diagnostics should be enabled on the Virtual - Machine. - :type enabled: bool - :param storage_uri: Uri of the storage account to use for placing the - console output and screenshot. - :type storage_uri: str - """ - - _attribute_map = { - 'enabled': {'key': 'enabled', 'type': 'bool'}, - 'storage_uri': {'key': 'storageUri', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(BootDiagnostics, self).__init__(**kwargs) - self.enabled = kwargs.get('enabled', None) - self.storage_uri = kwargs.get('storage_uri', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/boot_diagnostics_instance_view.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/boot_diagnostics_instance_view.py deleted file mode 100644 index fcfbf63fd379..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/boot_diagnostics_instance_view.py +++ /dev/null @@ -1,47 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class BootDiagnosticsInstanceView(Model): - """The instance view of a virtual machine boot diagnostics. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar console_screenshot_blob_uri: The console screenshot blob URI. - :vartype console_screenshot_blob_uri: str - :ivar serial_console_log_blob_uri: The Linux serial console log blob Uri. - :vartype serial_console_log_blob_uri: str - :ivar status: The boot diagnostics status information for the VM.

    - NOTE: It will be set only if there are errors encountered in enabling boot - diagnostics. - :vartype status: ~azure.mgmt.compute.v2018_10_01.models.InstanceViewStatus - """ - - _validation = { - 'console_screenshot_blob_uri': {'readonly': True}, - 'serial_console_log_blob_uri': {'readonly': True}, - 'status': {'readonly': True}, - } - - _attribute_map = { - 'console_screenshot_blob_uri': {'key': 'consoleScreenshotBlobUri', 'type': 'str'}, - 'serial_console_log_blob_uri': {'key': 'serialConsoleLogBlobUri', 'type': 'str'}, - 'status': {'key': 'status', 'type': 'InstanceViewStatus'}, - } - - def __init__(self, **kwargs): - super(BootDiagnosticsInstanceView, self).__init__(**kwargs) - self.console_screenshot_blob_uri = None - self.serial_console_log_blob_uri = None - self.status = None diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/boot_diagnostics_instance_view_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/boot_diagnostics_instance_view_py3.py deleted file mode 100644 index 19856f1c10c7..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/boot_diagnostics_instance_view_py3.py +++ /dev/null @@ -1,47 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class BootDiagnosticsInstanceView(Model): - """The instance view of a virtual machine boot diagnostics. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar console_screenshot_blob_uri: The console screenshot blob URI. - :vartype console_screenshot_blob_uri: str - :ivar serial_console_log_blob_uri: The Linux serial console log blob Uri. - :vartype serial_console_log_blob_uri: str - :ivar status: The boot diagnostics status information for the VM.

    - NOTE: It will be set only if there are errors encountered in enabling boot - diagnostics. - :vartype status: ~azure.mgmt.compute.v2018_10_01.models.InstanceViewStatus - """ - - _validation = { - 'console_screenshot_blob_uri': {'readonly': True}, - 'serial_console_log_blob_uri': {'readonly': True}, - 'status': {'readonly': True}, - } - - _attribute_map = { - 'console_screenshot_blob_uri': {'key': 'consoleScreenshotBlobUri', 'type': 'str'}, - 'serial_console_log_blob_uri': {'key': 'serialConsoleLogBlobUri', 'type': 'str'}, - 'status': {'key': 'status', 'type': 'InstanceViewStatus'}, - } - - def __init__(self, **kwargs) -> None: - super(BootDiagnosticsInstanceView, self).__init__(**kwargs) - self.console_screenshot_blob_uri = None - self.serial_console_log_blob_uri = None - self.status = None diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/boot_diagnostics_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/boot_diagnostics_py3.py deleted file mode 100644 index b64ae5b4adde..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/boot_diagnostics_py3.py +++ /dev/null @@ -1,37 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class BootDiagnostics(Model): - """Boot Diagnostics is a debugging feature which allows you to view Console - Output and Screenshot to diagnose VM status.

    You can easily view - the output of your console log.

    Azure also enables you to see a - screenshot of the VM from the hypervisor. - - :param enabled: Whether boot diagnostics should be enabled on the Virtual - Machine. - :type enabled: bool - :param storage_uri: Uri of the storage account to use for placing the - console output and screenshot. - :type storage_uri: str - """ - - _attribute_map = { - 'enabled': {'key': 'enabled', 'type': 'bool'}, - 'storage_uri': {'key': 'storageUri', 'type': 'str'}, - } - - def __init__(self, *, enabled: bool=None, storage_uri: str=None, **kwargs) -> None: - super(BootDiagnostics, self).__init__(**kwargs) - self.enabled = enabled - self.storage_uri = storage_uri diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/compute_operation_value.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/compute_operation_value.py deleted file mode 100644 index 525ef3bbb69a..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/compute_operation_value.py +++ /dev/null @@ -1,60 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ComputeOperationValue(Model): - """Describes the properties of a Compute Operation value. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar origin: The origin of the compute operation. - :vartype origin: str - :ivar name: The name of the compute operation. - :vartype name: str - :ivar operation: The display name of the compute operation. - :vartype operation: str - :ivar resource: The display name of the resource the operation applies to. - :vartype resource: str - :ivar description: The description of the operation. - :vartype description: str - :ivar provider: The resource provider for the operation. - :vartype provider: str - """ - - _validation = { - 'origin': {'readonly': True}, - 'name': {'readonly': True}, - 'operation': {'readonly': True}, - 'resource': {'readonly': True}, - 'description': {'readonly': True}, - 'provider': {'readonly': True}, - } - - _attribute_map = { - 'origin': {'key': 'origin', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'operation': {'key': 'display.operation', 'type': 'str'}, - 'resource': {'key': 'display.resource', 'type': 'str'}, - 'description': {'key': 'display.description', 'type': 'str'}, - 'provider': {'key': 'display.provider', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ComputeOperationValue, self).__init__(**kwargs) - self.origin = None - self.name = None - self.operation = None - self.resource = None - self.description = None - self.provider = None diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/compute_operation_value_paged.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/compute_operation_value_paged.py deleted file mode 100644 index 7b802139f000..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/compute_operation_value_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class ComputeOperationValuePaged(Paged): - """ - A paging container for iterating over a list of :class:`ComputeOperationValue ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[ComputeOperationValue]'} - } - - def __init__(self, *args, **kwargs): - - super(ComputeOperationValuePaged, self).__init__(*args, **kwargs) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/compute_operation_value_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/compute_operation_value_py3.py deleted file mode 100644 index 3c4388f312b9..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/compute_operation_value_py3.py +++ /dev/null @@ -1,60 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ComputeOperationValue(Model): - """Describes the properties of a Compute Operation value. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar origin: The origin of the compute operation. - :vartype origin: str - :ivar name: The name of the compute operation. - :vartype name: str - :ivar operation: The display name of the compute operation. - :vartype operation: str - :ivar resource: The display name of the resource the operation applies to. - :vartype resource: str - :ivar description: The description of the operation. - :vartype description: str - :ivar provider: The resource provider for the operation. - :vartype provider: str - """ - - _validation = { - 'origin': {'readonly': True}, - 'name': {'readonly': True}, - 'operation': {'readonly': True}, - 'resource': {'readonly': True}, - 'description': {'readonly': True}, - 'provider': {'readonly': True}, - } - - _attribute_map = { - 'origin': {'key': 'origin', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'operation': {'key': 'display.operation', 'type': 'str'}, - 'resource': {'key': 'display.resource', 'type': 'str'}, - 'description': {'key': 'display.description', 'type': 'str'}, - 'provider': {'key': 'display.provider', 'type': 'str'}, - } - - def __init__(self, **kwargs) -> None: - super(ComputeOperationValue, self).__init__(**kwargs) - self.origin = None - self.name = None - self.operation = None - self.resource = None - self.description = None - self.provider = None diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/data_disk.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/data_disk.py deleted file mode 100644 index be9739d3e8a9..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/data_disk.py +++ /dev/null @@ -1,87 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class DataDisk(Model): - """Describes a data disk. - - All required parameters must be populated in order to send to Azure. - - :param lun: Required. Specifies the logical unit number of the data disk. - This value is used to identify data disks within the VM and therefore must - be unique for each data disk attached to a VM. - :type lun: int - :param name: The disk name. - :type name: str - :param vhd: The virtual hard disk. - :type vhd: ~azure.mgmt.compute.v2018_10_01.models.VirtualHardDisk - :param image: The source user image virtual hard disk. The virtual hard - disk will be copied before being attached to the virtual machine. If - SourceImage is provided, the destination virtual hard drive must not - exist. - :type image: ~azure.mgmt.compute.v2018_10_01.models.VirtualHardDisk - :param caching: Specifies the caching requirements.

    Possible - values are:

    **None**

    **ReadOnly**

    **ReadWrite** -

    Default: **None for Standard storage. ReadOnly for Premium - storage**. Possible values include: 'None', 'ReadOnly', 'ReadWrite' - :type caching: str or ~azure.mgmt.compute.v2018_10_01.models.CachingTypes - :param write_accelerator_enabled: Specifies whether writeAccelerator - should be enabled or disabled on the disk. - :type write_accelerator_enabled: bool - :param create_option: Required. Specifies how the virtual machine should - be created.

    Possible values are:

    **Attach** \\u2013 This - value is used when you are using a specialized disk to create the virtual - machine.

    **FromImage** \\u2013 This value is used when you are - using an image to create the virtual machine. If you are using a platform - image, you also use the imageReference element described above. If you are - using a marketplace image, you also use the plan element previously - described. Possible values include: 'FromImage', 'Empty', 'Attach' - :type create_option: str or - ~azure.mgmt.compute.v2018_10_01.models.DiskCreateOptionTypes - :param disk_size_gb: Specifies the size of an empty data disk in - gigabytes. This element can be used to overwrite the size of the disk in a - virtual machine image.

    This value cannot be larger than 1023 GB - :type disk_size_gb: int - :param managed_disk: The managed disk parameters. - :type managed_disk: - ~azure.mgmt.compute.v2018_10_01.models.ManagedDiskParameters - """ - - _validation = { - 'lun': {'required': True}, - 'create_option': {'required': True}, - } - - _attribute_map = { - 'lun': {'key': 'lun', 'type': 'int'}, - 'name': {'key': 'name', 'type': 'str'}, - 'vhd': {'key': 'vhd', 'type': 'VirtualHardDisk'}, - 'image': {'key': 'image', 'type': 'VirtualHardDisk'}, - 'caching': {'key': 'caching', 'type': 'CachingTypes'}, - 'write_accelerator_enabled': {'key': 'writeAcceleratorEnabled', 'type': 'bool'}, - 'create_option': {'key': 'createOption', 'type': 'str'}, - 'disk_size_gb': {'key': 'diskSizeGB', 'type': 'int'}, - 'managed_disk': {'key': 'managedDisk', 'type': 'ManagedDiskParameters'}, - } - - def __init__(self, **kwargs): - super(DataDisk, self).__init__(**kwargs) - self.lun = kwargs.get('lun', None) - self.name = kwargs.get('name', None) - self.vhd = kwargs.get('vhd', None) - self.image = kwargs.get('image', None) - self.caching = kwargs.get('caching', None) - self.write_accelerator_enabled = kwargs.get('write_accelerator_enabled', None) - self.create_option = kwargs.get('create_option', None) - self.disk_size_gb = kwargs.get('disk_size_gb', None) - self.managed_disk = kwargs.get('managed_disk', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/data_disk_image.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/data_disk_image.py deleted file mode 100644 index b5dbfcefb472..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/data_disk_image.py +++ /dev/null @@ -1,37 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class DataDiskImage(Model): - """Contains the data disk images information. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar lun: Specifies the logical unit number of the data disk. This value - is used to identify data disks within the VM and therefore must be unique - for each data disk attached to a VM. - :vartype lun: int - """ - - _validation = { - 'lun': {'readonly': True}, - } - - _attribute_map = { - 'lun': {'key': 'lun', 'type': 'int'}, - } - - def __init__(self, **kwargs): - super(DataDiskImage, self).__init__(**kwargs) - self.lun = None diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/data_disk_image_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/data_disk_image_py3.py deleted file mode 100644 index 8431a3988502..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/data_disk_image_py3.py +++ /dev/null @@ -1,37 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class DataDiskImage(Model): - """Contains the data disk images information. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar lun: Specifies the logical unit number of the data disk. This value - is used to identify data disks within the VM and therefore must be unique - for each data disk attached to a VM. - :vartype lun: int - """ - - _validation = { - 'lun': {'readonly': True}, - } - - _attribute_map = { - 'lun': {'key': 'lun', 'type': 'int'}, - } - - def __init__(self, **kwargs) -> None: - super(DataDiskImage, self).__init__(**kwargs) - self.lun = None diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/data_disk_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/data_disk_py3.py deleted file mode 100644 index 637bb1715329..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/data_disk_py3.py +++ /dev/null @@ -1,87 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class DataDisk(Model): - """Describes a data disk. - - All required parameters must be populated in order to send to Azure. - - :param lun: Required. Specifies the logical unit number of the data disk. - This value is used to identify data disks within the VM and therefore must - be unique for each data disk attached to a VM. - :type lun: int - :param name: The disk name. - :type name: str - :param vhd: The virtual hard disk. - :type vhd: ~azure.mgmt.compute.v2018_10_01.models.VirtualHardDisk - :param image: The source user image virtual hard disk. The virtual hard - disk will be copied before being attached to the virtual machine. If - SourceImage is provided, the destination virtual hard drive must not - exist. - :type image: ~azure.mgmt.compute.v2018_10_01.models.VirtualHardDisk - :param caching: Specifies the caching requirements.

    Possible - values are:

    **None**

    **ReadOnly**

    **ReadWrite** -

    Default: **None for Standard storage. ReadOnly for Premium - storage**. Possible values include: 'None', 'ReadOnly', 'ReadWrite' - :type caching: str or ~azure.mgmt.compute.v2018_10_01.models.CachingTypes - :param write_accelerator_enabled: Specifies whether writeAccelerator - should be enabled or disabled on the disk. - :type write_accelerator_enabled: bool - :param create_option: Required. Specifies how the virtual machine should - be created.

    Possible values are:

    **Attach** \\u2013 This - value is used when you are using a specialized disk to create the virtual - machine.

    **FromImage** \\u2013 This value is used when you are - using an image to create the virtual machine. If you are using a platform - image, you also use the imageReference element described above. If you are - using a marketplace image, you also use the plan element previously - described. Possible values include: 'FromImage', 'Empty', 'Attach' - :type create_option: str or - ~azure.mgmt.compute.v2018_10_01.models.DiskCreateOptionTypes - :param disk_size_gb: Specifies the size of an empty data disk in - gigabytes. This element can be used to overwrite the size of the disk in a - virtual machine image.

    This value cannot be larger than 1023 GB - :type disk_size_gb: int - :param managed_disk: The managed disk parameters. - :type managed_disk: - ~azure.mgmt.compute.v2018_10_01.models.ManagedDiskParameters - """ - - _validation = { - 'lun': {'required': True}, - 'create_option': {'required': True}, - } - - _attribute_map = { - 'lun': {'key': 'lun', 'type': 'int'}, - 'name': {'key': 'name', 'type': 'str'}, - 'vhd': {'key': 'vhd', 'type': 'VirtualHardDisk'}, - 'image': {'key': 'image', 'type': 'VirtualHardDisk'}, - 'caching': {'key': 'caching', 'type': 'CachingTypes'}, - 'write_accelerator_enabled': {'key': 'writeAcceleratorEnabled', 'type': 'bool'}, - 'create_option': {'key': 'createOption', 'type': 'str'}, - 'disk_size_gb': {'key': 'diskSizeGB', 'type': 'int'}, - 'managed_disk': {'key': 'managedDisk', 'type': 'ManagedDiskParameters'}, - } - - def __init__(self, *, lun: int, create_option, name: str=None, vhd=None, image=None, caching=None, write_accelerator_enabled: bool=None, disk_size_gb: int=None, managed_disk=None, **kwargs) -> None: - super(DataDisk, self).__init__(**kwargs) - self.lun = lun - self.name = name - self.vhd = vhd - self.image = image - self.caching = caching - self.write_accelerator_enabled = write_accelerator_enabled - self.create_option = create_option - self.disk_size_gb = disk_size_gb - self.managed_disk = managed_disk diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/diagnostics_profile.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/diagnostics_profile.py deleted file mode 100644 index d1db1b00d086..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/diagnostics_profile.py +++ /dev/null @@ -1,33 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class DiagnosticsProfile(Model): - """Specifies the boot diagnostic settings state.

    Minimum api-version: - 2015-06-15. - - :param boot_diagnostics: Boot Diagnostics is a debugging feature which - allows you to view Console Output and Screenshot to diagnose VM status. -

    You can easily view the output of your console log.

    - Azure also enables you to see a screenshot of the VM from the hypervisor. - :type boot_diagnostics: - ~azure.mgmt.compute.v2018_10_01.models.BootDiagnostics - """ - - _attribute_map = { - 'boot_diagnostics': {'key': 'bootDiagnostics', 'type': 'BootDiagnostics'}, - } - - def __init__(self, **kwargs): - super(DiagnosticsProfile, self).__init__(**kwargs) - self.boot_diagnostics = kwargs.get('boot_diagnostics', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/diagnostics_profile_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/diagnostics_profile_py3.py deleted file mode 100644 index 88736f6d39e8..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/diagnostics_profile_py3.py +++ /dev/null @@ -1,33 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class DiagnosticsProfile(Model): - """Specifies the boot diagnostic settings state.

    Minimum api-version: - 2015-06-15. - - :param boot_diagnostics: Boot Diagnostics is a debugging feature which - allows you to view Console Output and Screenshot to diagnose VM status. -

    You can easily view the output of your console log.

    - Azure also enables you to see a screenshot of the VM from the hypervisor. - :type boot_diagnostics: - ~azure.mgmt.compute.v2018_10_01.models.BootDiagnostics - """ - - _attribute_map = { - 'boot_diagnostics': {'key': 'bootDiagnostics', 'type': 'BootDiagnostics'}, - } - - def __init__(self, *, boot_diagnostics=None, **kwargs) -> None: - super(DiagnosticsProfile, self).__init__(**kwargs) - self.boot_diagnostics = boot_diagnostics diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/diff_disk_settings.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/diff_disk_settings.py deleted file mode 100644 index ac0d894264c9..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/diff_disk_settings.py +++ /dev/null @@ -1,32 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class DiffDiskSettings(Model): - """Describes the parameters of ephemeral disk settings that can be specified - for operating system disk.

    NOTE: The ephemeral disk settings can - only be specified for managed disk. - - :param option: Specifies the ephemeral disk settings for operating system - disk. Possible values include: 'Local' - :type option: str or - ~azure.mgmt.compute.v2018_10_01.models.DiffDiskOptions - """ - - _attribute_map = { - 'option': {'key': 'option', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(DiffDiskSettings, self).__init__(**kwargs) - self.option = kwargs.get('option', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/diff_disk_settings_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/diff_disk_settings_py3.py deleted file mode 100644 index d4d5b4712159..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/diff_disk_settings_py3.py +++ /dev/null @@ -1,32 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class DiffDiskSettings(Model): - """Describes the parameters of ephemeral disk settings that can be specified - for operating system disk.

    NOTE: The ephemeral disk settings can - only be specified for managed disk. - - :param option: Specifies the ephemeral disk settings for operating system - disk. Possible values include: 'Local' - :type option: str or - ~azure.mgmt.compute.v2018_10_01.models.DiffDiskOptions - """ - - _attribute_map = { - 'option': {'key': 'option', 'type': 'str'}, - } - - def __init__(self, *, option=None, **kwargs) -> None: - super(DiffDiskSettings, self).__init__(**kwargs) - self.option = option diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/disk_encryption_settings.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/disk_encryption_settings.py deleted file mode 100644 index ab72449543a3..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/disk_encryption_settings.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class DiskEncryptionSettings(Model): - """Describes a Encryption Settings for a Disk. - - :param disk_encryption_key: Specifies the location of the disk encryption - key, which is a Key Vault Secret. - :type disk_encryption_key: - ~azure.mgmt.compute.v2018_10_01.models.KeyVaultSecretReference - :param key_encryption_key: Specifies the location of the key encryption - key in Key Vault. - :type key_encryption_key: - ~azure.mgmt.compute.v2018_10_01.models.KeyVaultKeyReference - :param enabled: Specifies whether disk encryption should be enabled on the - virtual machine. - :type enabled: bool - """ - - _attribute_map = { - 'disk_encryption_key': {'key': 'diskEncryptionKey', 'type': 'KeyVaultSecretReference'}, - 'key_encryption_key': {'key': 'keyEncryptionKey', 'type': 'KeyVaultKeyReference'}, - 'enabled': {'key': 'enabled', 'type': 'bool'}, - } - - def __init__(self, **kwargs): - super(DiskEncryptionSettings, self).__init__(**kwargs) - self.disk_encryption_key = kwargs.get('disk_encryption_key', None) - self.key_encryption_key = kwargs.get('key_encryption_key', None) - self.enabled = kwargs.get('enabled', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/disk_encryption_settings_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/disk_encryption_settings_py3.py deleted file mode 100644 index b83ad0bd55b5..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/disk_encryption_settings_py3.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class DiskEncryptionSettings(Model): - """Describes a Encryption Settings for a Disk. - - :param disk_encryption_key: Specifies the location of the disk encryption - key, which is a Key Vault Secret. - :type disk_encryption_key: - ~azure.mgmt.compute.v2018_10_01.models.KeyVaultSecretReference - :param key_encryption_key: Specifies the location of the key encryption - key in Key Vault. - :type key_encryption_key: - ~azure.mgmt.compute.v2018_10_01.models.KeyVaultKeyReference - :param enabled: Specifies whether disk encryption should be enabled on the - virtual machine. - :type enabled: bool - """ - - _attribute_map = { - 'disk_encryption_key': {'key': 'diskEncryptionKey', 'type': 'KeyVaultSecretReference'}, - 'key_encryption_key': {'key': 'keyEncryptionKey', 'type': 'KeyVaultKeyReference'}, - 'enabled': {'key': 'enabled', 'type': 'bool'}, - } - - def __init__(self, *, disk_encryption_key=None, key_encryption_key=None, enabled: bool=None, **kwargs) -> None: - super(DiskEncryptionSettings, self).__init__(**kwargs) - self.disk_encryption_key = disk_encryption_key - self.key_encryption_key = key_encryption_key - self.enabled = enabled diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/disk_instance_view.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/disk_instance_view.py deleted file mode 100644 index c92baaa065b5..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/disk_instance_view.py +++ /dev/null @@ -1,39 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class DiskInstanceView(Model): - """The instance view of the disk. - - :param name: The disk name. - :type name: str - :param encryption_settings: Specifies the encryption settings for the OS - Disk.

    Minimum api-version: 2015-06-15 - :type encryption_settings: - list[~azure.mgmt.compute.v2018_10_01.models.DiskEncryptionSettings] - :param statuses: The resource status information. - :type statuses: - list[~azure.mgmt.compute.v2018_10_01.models.InstanceViewStatus] - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'encryption_settings': {'key': 'encryptionSettings', 'type': '[DiskEncryptionSettings]'}, - 'statuses': {'key': 'statuses', 'type': '[InstanceViewStatus]'}, - } - - def __init__(self, **kwargs): - super(DiskInstanceView, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.encryption_settings = kwargs.get('encryption_settings', None) - self.statuses = kwargs.get('statuses', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/disk_instance_view_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/disk_instance_view_py3.py deleted file mode 100644 index 957f6f523588..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/disk_instance_view_py3.py +++ /dev/null @@ -1,39 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class DiskInstanceView(Model): - """The instance view of the disk. - - :param name: The disk name. - :type name: str - :param encryption_settings: Specifies the encryption settings for the OS - Disk.

    Minimum api-version: 2015-06-15 - :type encryption_settings: - list[~azure.mgmt.compute.v2018_10_01.models.DiskEncryptionSettings] - :param statuses: The resource status information. - :type statuses: - list[~azure.mgmt.compute.v2018_10_01.models.InstanceViewStatus] - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'encryption_settings': {'key': 'encryptionSettings', 'type': '[DiskEncryptionSettings]'}, - 'statuses': {'key': 'statuses', 'type': '[InstanceViewStatus]'}, - } - - def __init__(self, *, name: str=None, encryption_settings=None, statuses=None, **kwargs) -> None: - super(DiskInstanceView, self).__init__(**kwargs) - self.name = name - self.encryption_settings = encryption_settings - self.statuses = statuses diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/hardware_profile.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/hardware_profile.py deleted file mode 100644 index fca8e6a1903d..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/hardware_profile.py +++ /dev/null @@ -1,85 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class HardwareProfile(Model): - """Specifies the hardware settings for the virtual machine. - - :param vm_size: Specifies the size of the virtual machine. For more - information about virtual machine sizes, see [Sizes for virtual - machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-sizes?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). -

    The available VM sizes depend on region and availability set. For - a list of available sizes use these APIs:

    [List all available - virtual machine sizes in an availability - set](https://docs.microsoft.com/rest/api/compute/availabilitysets/listavailablesizes) -

    [List all available virtual machine sizes in a - region](https://docs.microsoft.com/rest/api/compute/virtualmachinesizes/list) -

    [List all available virtual machine sizes for - resizing](https://docs.microsoft.com/rest/api/compute/virtualmachines/listavailablesizes). - Possible values include: 'Basic_A0', 'Basic_A1', 'Basic_A2', 'Basic_A3', - 'Basic_A4', 'Standard_A0', 'Standard_A1', 'Standard_A2', 'Standard_A3', - 'Standard_A4', 'Standard_A5', 'Standard_A6', 'Standard_A7', 'Standard_A8', - 'Standard_A9', 'Standard_A10', 'Standard_A11', 'Standard_A1_v2', - 'Standard_A2_v2', 'Standard_A4_v2', 'Standard_A8_v2', 'Standard_A2m_v2', - 'Standard_A4m_v2', 'Standard_A8m_v2', 'Standard_B1s', 'Standard_B1ms', - 'Standard_B2s', 'Standard_B2ms', 'Standard_B4ms', 'Standard_B8ms', - 'Standard_D1', 'Standard_D2', 'Standard_D3', 'Standard_D4', - 'Standard_D11', 'Standard_D12', 'Standard_D13', 'Standard_D14', - 'Standard_D1_v2', 'Standard_D2_v2', 'Standard_D3_v2', 'Standard_D4_v2', - 'Standard_D5_v2', 'Standard_D2_v3', 'Standard_D4_v3', 'Standard_D8_v3', - 'Standard_D16_v3', 'Standard_D32_v3', 'Standard_D64_v3', - 'Standard_D2s_v3', 'Standard_D4s_v3', 'Standard_D8s_v3', - 'Standard_D16s_v3', 'Standard_D32s_v3', 'Standard_D64s_v3', - 'Standard_D11_v2', 'Standard_D12_v2', 'Standard_D13_v2', - 'Standard_D14_v2', 'Standard_D15_v2', 'Standard_DS1', 'Standard_DS2', - 'Standard_DS3', 'Standard_DS4', 'Standard_DS11', 'Standard_DS12', - 'Standard_DS13', 'Standard_DS14', 'Standard_DS1_v2', 'Standard_DS2_v2', - 'Standard_DS3_v2', 'Standard_DS4_v2', 'Standard_DS5_v2', - 'Standard_DS11_v2', 'Standard_DS12_v2', 'Standard_DS13_v2', - 'Standard_DS14_v2', 'Standard_DS15_v2', 'Standard_DS13-4_v2', - 'Standard_DS13-2_v2', 'Standard_DS14-8_v2', 'Standard_DS14-4_v2', - 'Standard_E2_v3', 'Standard_E4_v3', 'Standard_E8_v3', 'Standard_E16_v3', - 'Standard_E32_v3', 'Standard_E64_v3', 'Standard_E2s_v3', - 'Standard_E4s_v3', 'Standard_E8s_v3', 'Standard_E16s_v3', - 'Standard_E32s_v3', 'Standard_E64s_v3', 'Standard_E32-16_v3', - 'Standard_E32-8s_v3', 'Standard_E64-32s_v3', 'Standard_E64-16s_v3', - 'Standard_F1', 'Standard_F2', 'Standard_F4', 'Standard_F8', - 'Standard_F16', 'Standard_F1s', 'Standard_F2s', 'Standard_F4s', - 'Standard_F8s', 'Standard_F16s', 'Standard_F2s_v2', 'Standard_F4s_v2', - 'Standard_F8s_v2', 'Standard_F16s_v2', 'Standard_F32s_v2', - 'Standard_F64s_v2', 'Standard_F72s_v2', 'Standard_G1', 'Standard_G2', - 'Standard_G3', 'Standard_G4', 'Standard_G5', 'Standard_GS1', - 'Standard_GS2', 'Standard_GS3', 'Standard_GS4', 'Standard_GS5', - 'Standard_GS4-8', 'Standard_GS4-4', 'Standard_GS5-16', 'Standard_GS5-8', - 'Standard_H8', 'Standard_H16', 'Standard_H8m', 'Standard_H16m', - 'Standard_H16r', 'Standard_H16mr', 'Standard_L4s', 'Standard_L8s', - 'Standard_L16s', 'Standard_L32s', 'Standard_M64s', 'Standard_M64ms', - 'Standard_M128s', 'Standard_M128ms', 'Standard_M64-32ms', - 'Standard_M64-16ms', 'Standard_M128-64ms', 'Standard_M128-32ms', - 'Standard_NC6', 'Standard_NC12', 'Standard_NC24', 'Standard_NC24r', - 'Standard_NC6s_v2', 'Standard_NC12s_v2', 'Standard_NC24s_v2', - 'Standard_NC24rs_v2', 'Standard_NC6s_v3', 'Standard_NC12s_v3', - 'Standard_NC24s_v3', 'Standard_NC24rs_v3', 'Standard_ND6s', - 'Standard_ND12s', 'Standard_ND24s', 'Standard_ND24rs', 'Standard_NV6', - 'Standard_NV12', 'Standard_NV24' - :type vm_size: str or - ~azure.mgmt.compute.v2018_10_01.models.VirtualMachineSizeTypes - """ - - _attribute_map = { - 'vm_size': {'key': 'vmSize', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(HardwareProfile, self).__init__(**kwargs) - self.vm_size = kwargs.get('vm_size', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/hardware_profile_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/hardware_profile_py3.py deleted file mode 100644 index cbf5d7ad221e..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/hardware_profile_py3.py +++ /dev/null @@ -1,85 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class HardwareProfile(Model): - """Specifies the hardware settings for the virtual machine. - - :param vm_size: Specifies the size of the virtual machine. For more - information about virtual machine sizes, see [Sizes for virtual - machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-sizes?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). -

    The available VM sizes depend on region and availability set. For - a list of available sizes use these APIs:

    [List all available - virtual machine sizes in an availability - set](https://docs.microsoft.com/rest/api/compute/availabilitysets/listavailablesizes) -

    [List all available virtual machine sizes in a - region](https://docs.microsoft.com/rest/api/compute/virtualmachinesizes/list) -

    [List all available virtual machine sizes for - resizing](https://docs.microsoft.com/rest/api/compute/virtualmachines/listavailablesizes). - Possible values include: 'Basic_A0', 'Basic_A1', 'Basic_A2', 'Basic_A3', - 'Basic_A4', 'Standard_A0', 'Standard_A1', 'Standard_A2', 'Standard_A3', - 'Standard_A4', 'Standard_A5', 'Standard_A6', 'Standard_A7', 'Standard_A8', - 'Standard_A9', 'Standard_A10', 'Standard_A11', 'Standard_A1_v2', - 'Standard_A2_v2', 'Standard_A4_v2', 'Standard_A8_v2', 'Standard_A2m_v2', - 'Standard_A4m_v2', 'Standard_A8m_v2', 'Standard_B1s', 'Standard_B1ms', - 'Standard_B2s', 'Standard_B2ms', 'Standard_B4ms', 'Standard_B8ms', - 'Standard_D1', 'Standard_D2', 'Standard_D3', 'Standard_D4', - 'Standard_D11', 'Standard_D12', 'Standard_D13', 'Standard_D14', - 'Standard_D1_v2', 'Standard_D2_v2', 'Standard_D3_v2', 'Standard_D4_v2', - 'Standard_D5_v2', 'Standard_D2_v3', 'Standard_D4_v3', 'Standard_D8_v3', - 'Standard_D16_v3', 'Standard_D32_v3', 'Standard_D64_v3', - 'Standard_D2s_v3', 'Standard_D4s_v3', 'Standard_D8s_v3', - 'Standard_D16s_v3', 'Standard_D32s_v3', 'Standard_D64s_v3', - 'Standard_D11_v2', 'Standard_D12_v2', 'Standard_D13_v2', - 'Standard_D14_v2', 'Standard_D15_v2', 'Standard_DS1', 'Standard_DS2', - 'Standard_DS3', 'Standard_DS4', 'Standard_DS11', 'Standard_DS12', - 'Standard_DS13', 'Standard_DS14', 'Standard_DS1_v2', 'Standard_DS2_v2', - 'Standard_DS3_v2', 'Standard_DS4_v2', 'Standard_DS5_v2', - 'Standard_DS11_v2', 'Standard_DS12_v2', 'Standard_DS13_v2', - 'Standard_DS14_v2', 'Standard_DS15_v2', 'Standard_DS13-4_v2', - 'Standard_DS13-2_v2', 'Standard_DS14-8_v2', 'Standard_DS14-4_v2', - 'Standard_E2_v3', 'Standard_E4_v3', 'Standard_E8_v3', 'Standard_E16_v3', - 'Standard_E32_v3', 'Standard_E64_v3', 'Standard_E2s_v3', - 'Standard_E4s_v3', 'Standard_E8s_v3', 'Standard_E16s_v3', - 'Standard_E32s_v3', 'Standard_E64s_v3', 'Standard_E32-16_v3', - 'Standard_E32-8s_v3', 'Standard_E64-32s_v3', 'Standard_E64-16s_v3', - 'Standard_F1', 'Standard_F2', 'Standard_F4', 'Standard_F8', - 'Standard_F16', 'Standard_F1s', 'Standard_F2s', 'Standard_F4s', - 'Standard_F8s', 'Standard_F16s', 'Standard_F2s_v2', 'Standard_F4s_v2', - 'Standard_F8s_v2', 'Standard_F16s_v2', 'Standard_F32s_v2', - 'Standard_F64s_v2', 'Standard_F72s_v2', 'Standard_G1', 'Standard_G2', - 'Standard_G3', 'Standard_G4', 'Standard_G5', 'Standard_GS1', - 'Standard_GS2', 'Standard_GS3', 'Standard_GS4', 'Standard_GS5', - 'Standard_GS4-8', 'Standard_GS4-4', 'Standard_GS5-16', 'Standard_GS5-8', - 'Standard_H8', 'Standard_H16', 'Standard_H8m', 'Standard_H16m', - 'Standard_H16r', 'Standard_H16mr', 'Standard_L4s', 'Standard_L8s', - 'Standard_L16s', 'Standard_L32s', 'Standard_M64s', 'Standard_M64ms', - 'Standard_M128s', 'Standard_M128ms', 'Standard_M64-32ms', - 'Standard_M64-16ms', 'Standard_M128-64ms', 'Standard_M128-32ms', - 'Standard_NC6', 'Standard_NC12', 'Standard_NC24', 'Standard_NC24r', - 'Standard_NC6s_v2', 'Standard_NC12s_v2', 'Standard_NC24s_v2', - 'Standard_NC24rs_v2', 'Standard_NC6s_v3', 'Standard_NC12s_v3', - 'Standard_NC24s_v3', 'Standard_NC24rs_v3', 'Standard_ND6s', - 'Standard_ND12s', 'Standard_ND24s', 'Standard_ND24rs', 'Standard_NV6', - 'Standard_NV12', 'Standard_NV24' - :type vm_size: str or - ~azure.mgmt.compute.v2018_10_01.models.VirtualMachineSizeTypes - """ - - _attribute_map = { - 'vm_size': {'key': 'vmSize', 'type': 'str'}, - } - - def __init__(self, *, vm_size=None, **kwargs) -> None: - super(HardwareProfile, self).__init__(**kwargs) - self.vm_size = vm_size diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/image.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/image.py deleted file mode 100644 index 1638dc9bb3d2..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/image.py +++ /dev/null @@ -1,70 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource import Resource - - -class Image(Resource): - """The source user image virtual hard disk. The virtual hard disk will be - copied before being attached to the virtual machine. If SourceImage is - provided, the destination virtual hard drive must not exist. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource Id - :vartype id: str - :ivar name: Resource name - :vartype name: str - :ivar type: Resource type - :vartype type: str - :param location: Required. Resource location - :type location: str - :param tags: Resource tags - :type tags: dict[str, str] - :param source_virtual_machine: The source virtual machine from which Image - is created. - :type source_virtual_machine: - ~azure.mgmt.compute.v2018_10_01.models.SubResource - :param storage_profile: Specifies the storage settings for the virtual - machine disks. - :type storage_profile: - ~azure.mgmt.compute.v2018_10_01.models.ImageStorageProfile - :ivar provisioning_state: The provisioning state. - :vartype provisioning_state: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - 'provisioning_state': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'source_virtual_machine': {'key': 'properties.sourceVirtualMachine', 'type': 'SubResource'}, - 'storage_profile': {'key': 'properties.storageProfile', 'type': 'ImageStorageProfile'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(Image, self).__init__(**kwargs) - self.source_virtual_machine = kwargs.get('source_virtual_machine', None) - self.storage_profile = kwargs.get('storage_profile', None) - self.provisioning_state = None diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/image_data_disk.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/image_data_disk.py deleted file mode 100644 index 356dbb2e4744..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/image_data_disk.py +++ /dev/null @@ -1,69 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ImageDataDisk(Model): - """Describes a data disk. - - All required parameters must be populated in order to send to Azure. - - :param lun: Required. Specifies the logical unit number of the data disk. - This value is used to identify data disks within the VM and therefore must - be unique for each data disk attached to a VM. - :type lun: int - :param snapshot: The snapshot. - :type snapshot: ~azure.mgmt.compute.v2018_10_01.models.SubResource - :param managed_disk: The managedDisk. - :type managed_disk: ~azure.mgmt.compute.v2018_10_01.models.SubResource - :param blob_uri: The Virtual Hard Disk. - :type blob_uri: str - :param caching: Specifies the caching requirements.

    Possible - values are:

    **None**

    **ReadOnly**

    **ReadWrite** -

    Default: **None for Standard storage. ReadOnly for Premium - storage**. Possible values include: 'None', 'ReadOnly', 'ReadWrite' - :type caching: str or ~azure.mgmt.compute.v2018_10_01.models.CachingTypes - :param disk_size_gb: Specifies the size of empty data disks in gigabytes. - This element can be used to overwrite the name of the disk in a virtual - machine image.

    This value cannot be larger than 1023 GB - :type disk_size_gb: int - :param storage_account_type: Specifies the storage account type for the - managed disk. NOTE: UltraSSD_LRS can only be used with data disks, it - cannot be used with OS Disk. Possible values include: 'Standard_LRS', - 'Premium_LRS', 'StandardSSD_LRS', 'UltraSSD_LRS' - :type storage_account_type: str or - ~azure.mgmt.compute.v2018_10_01.models.StorageAccountTypes - """ - - _validation = { - 'lun': {'required': True}, - } - - _attribute_map = { - 'lun': {'key': 'lun', 'type': 'int'}, - 'snapshot': {'key': 'snapshot', 'type': 'SubResource'}, - 'managed_disk': {'key': 'managedDisk', 'type': 'SubResource'}, - 'blob_uri': {'key': 'blobUri', 'type': 'str'}, - 'caching': {'key': 'caching', 'type': 'CachingTypes'}, - 'disk_size_gb': {'key': 'diskSizeGB', 'type': 'int'}, - 'storage_account_type': {'key': 'storageAccountType', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ImageDataDisk, self).__init__(**kwargs) - self.lun = kwargs.get('lun', None) - self.snapshot = kwargs.get('snapshot', None) - self.managed_disk = kwargs.get('managed_disk', None) - self.blob_uri = kwargs.get('blob_uri', None) - self.caching = kwargs.get('caching', None) - self.disk_size_gb = kwargs.get('disk_size_gb', None) - self.storage_account_type = kwargs.get('storage_account_type', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/image_data_disk_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/image_data_disk_py3.py deleted file mode 100644 index 12804047ac55..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/image_data_disk_py3.py +++ /dev/null @@ -1,69 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ImageDataDisk(Model): - """Describes a data disk. - - All required parameters must be populated in order to send to Azure. - - :param lun: Required. Specifies the logical unit number of the data disk. - This value is used to identify data disks within the VM and therefore must - be unique for each data disk attached to a VM. - :type lun: int - :param snapshot: The snapshot. - :type snapshot: ~azure.mgmt.compute.v2018_10_01.models.SubResource - :param managed_disk: The managedDisk. - :type managed_disk: ~azure.mgmt.compute.v2018_10_01.models.SubResource - :param blob_uri: The Virtual Hard Disk. - :type blob_uri: str - :param caching: Specifies the caching requirements.

    Possible - values are:

    **None**

    **ReadOnly**

    **ReadWrite** -

    Default: **None for Standard storage. ReadOnly for Premium - storage**. Possible values include: 'None', 'ReadOnly', 'ReadWrite' - :type caching: str or ~azure.mgmt.compute.v2018_10_01.models.CachingTypes - :param disk_size_gb: Specifies the size of empty data disks in gigabytes. - This element can be used to overwrite the name of the disk in a virtual - machine image.

    This value cannot be larger than 1023 GB - :type disk_size_gb: int - :param storage_account_type: Specifies the storage account type for the - managed disk. NOTE: UltraSSD_LRS can only be used with data disks, it - cannot be used with OS Disk. Possible values include: 'Standard_LRS', - 'Premium_LRS', 'StandardSSD_LRS', 'UltraSSD_LRS' - :type storage_account_type: str or - ~azure.mgmt.compute.v2018_10_01.models.StorageAccountTypes - """ - - _validation = { - 'lun': {'required': True}, - } - - _attribute_map = { - 'lun': {'key': 'lun', 'type': 'int'}, - 'snapshot': {'key': 'snapshot', 'type': 'SubResource'}, - 'managed_disk': {'key': 'managedDisk', 'type': 'SubResource'}, - 'blob_uri': {'key': 'blobUri', 'type': 'str'}, - 'caching': {'key': 'caching', 'type': 'CachingTypes'}, - 'disk_size_gb': {'key': 'diskSizeGB', 'type': 'int'}, - 'storage_account_type': {'key': 'storageAccountType', 'type': 'str'}, - } - - def __init__(self, *, lun: int, snapshot=None, managed_disk=None, blob_uri: str=None, caching=None, disk_size_gb: int=None, storage_account_type=None, **kwargs) -> None: - super(ImageDataDisk, self).__init__(**kwargs) - self.lun = lun - self.snapshot = snapshot - self.managed_disk = managed_disk - self.blob_uri = blob_uri - self.caching = caching - self.disk_size_gb = disk_size_gb - self.storage_account_type = storage_account_type diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/image_os_disk.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/image_os_disk.py deleted file mode 100644 index 77d90b3235cc..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/image_os_disk.py +++ /dev/null @@ -1,77 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ImageOSDisk(Model): - """Describes an Operating System disk. - - All required parameters must be populated in order to send to Azure. - - :param os_type: Required. This property allows you to specify the type of - the OS that is included in the disk if creating a VM from a custom image. -

    Possible values are:

    **Windows**

    **Linux**. - Possible values include: 'Windows', 'Linux' - :type os_type: str or - ~azure.mgmt.compute.v2018_10_01.models.OperatingSystemTypes - :param os_state: Required. The OS State. Possible values include: - 'Generalized', 'Specialized' - :type os_state: str or - ~azure.mgmt.compute.v2018_10_01.models.OperatingSystemStateTypes - :param snapshot: The snapshot. - :type snapshot: ~azure.mgmt.compute.v2018_10_01.models.SubResource - :param managed_disk: The managedDisk. - :type managed_disk: ~azure.mgmt.compute.v2018_10_01.models.SubResource - :param blob_uri: The Virtual Hard Disk. - :type blob_uri: str - :param caching: Specifies the caching requirements.

    Possible - values are:

    **None**

    **ReadOnly**

    **ReadWrite** -

    Default: **None for Standard storage. ReadOnly for Premium - storage**. Possible values include: 'None', 'ReadOnly', 'ReadWrite' - :type caching: str or ~azure.mgmt.compute.v2018_10_01.models.CachingTypes - :param disk_size_gb: Specifies the size of empty data disks in gigabytes. - This element can be used to overwrite the name of the disk in a virtual - machine image.

    This value cannot be larger than 1023 GB - :type disk_size_gb: int - :param storage_account_type: Specifies the storage account type for the - managed disk. UltraSSD_LRS cannot be used with OS Disk. Possible values - include: 'Standard_LRS', 'Premium_LRS', 'StandardSSD_LRS', 'UltraSSD_LRS' - :type storage_account_type: str or - ~azure.mgmt.compute.v2018_10_01.models.StorageAccountTypes - """ - - _validation = { - 'os_type': {'required': True}, - 'os_state': {'required': True}, - } - - _attribute_map = { - 'os_type': {'key': 'osType', 'type': 'OperatingSystemTypes'}, - 'os_state': {'key': 'osState', 'type': 'OperatingSystemStateTypes'}, - 'snapshot': {'key': 'snapshot', 'type': 'SubResource'}, - 'managed_disk': {'key': 'managedDisk', 'type': 'SubResource'}, - 'blob_uri': {'key': 'blobUri', 'type': 'str'}, - 'caching': {'key': 'caching', 'type': 'CachingTypes'}, - 'disk_size_gb': {'key': 'diskSizeGB', 'type': 'int'}, - 'storage_account_type': {'key': 'storageAccountType', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ImageOSDisk, self).__init__(**kwargs) - self.os_type = kwargs.get('os_type', None) - self.os_state = kwargs.get('os_state', None) - self.snapshot = kwargs.get('snapshot', None) - self.managed_disk = kwargs.get('managed_disk', None) - self.blob_uri = kwargs.get('blob_uri', None) - self.caching = kwargs.get('caching', None) - self.disk_size_gb = kwargs.get('disk_size_gb', None) - self.storage_account_type = kwargs.get('storage_account_type', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/image_os_disk_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/image_os_disk_py3.py deleted file mode 100644 index 8e0895fbe37c..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/image_os_disk_py3.py +++ /dev/null @@ -1,77 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ImageOSDisk(Model): - """Describes an Operating System disk. - - All required parameters must be populated in order to send to Azure. - - :param os_type: Required. This property allows you to specify the type of - the OS that is included in the disk if creating a VM from a custom image. -

    Possible values are:

    **Windows**

    **Linux**. - Possible values include: 'Windows', 'Linux' - :type os_type: str or - ~azure.mgmt.compute.v2018_10_01.models.OperatingSystemTypes - :param os_state: Required. The OS State. Possible values include: - 'Generalized', 'Specialized' - :type os_state: str or - ~azure.mgmt.compute.v2018_10_01.models.OperatingSystemStateTypes - :param snapshot: The snapshot. - :type snapshot: ~azure.mgmt.compute.v2018_10_01.models.SubResource - :param managed_disk: The managedDisk. - :type managed_disk: ~azure.mgmt.compute.v2018_10_01.models.SubResource - :param blob_uri: The Virtual Hard Disk. - :type blob_uri: str - :param caching: Specifies the caching requirements.

    Possible - values are:

    **None**

    **ReadOnly**

    **ReadWrite** -

    Default: **None for Standard storage. ReadOnly for Premium - storage**. Possible values include: 'None', 'ReadOnly', 'ReadWrite' - :type caching: str or ~azure.mgmt.compute.v2018_10_01.models.CachingTypes - :param disk_size_gb: Specifies the size of empty data disks in gigabytes. - This element can be used to overwrite the name of the disk in a virtual - machine image.

    This value cannot be larger than 1023 GB - :type disk_size_gb: int - :param storage_account_type: Specifies the storage account type for the - managed disk. UltraSSD_LRS cannot be used with OS Disk. Possible values - include: 'Standard_LRS', 'Premium_LRS', 'StandardSSD_LRS', 'UltraSSD_LRS' - :type storage_account_type: str or - ~azure.mgmt.compute.v2018_10_01.models.StorageAccountTypes - """ - - _validation = { - 'os_type': {'required': True}, - 'os_state': {'required': True}, - } - - _attribute_map = { - 'os_type': {'key': 'osType', 'type': 'OperatingSystemTypes'}, - 'os_state': {'key': 'osState', 'type': 'OperatingSystemStateTypes'}, - 'snapshot': {'key': 'snapshot', 'type': 'SubResource'}, - 'managed_disk': {'key': 'managedDisk', 'type': 'SubResource'}, - 'blob_uri': {'key': 'blobUri', 'type': 'str'}, - 'caching': {'key': 'caching', 'type': 'CachingTypes'}, - 'disk_size_gb': {'key': 'diskSizeGB', 'type': 'int'}, - 'storage_account_type': {'key': 'storageAccountType', 'type': 'str'}, - } - - def __init__(self, *, os_type, os_state, snapshot=None, managed_disk=None, blob_uri: str=None, caching=None, disk_size_gb: int=None, storage_account_type=None, **kwargs) -> None: - super(ImageOSDisk, self).__init__(**kwargs) - self.os_type = os_type - self.os_state = os_state - self.snapshot = snapshot - self.managed_disk = managed_disk - self.blob_uri = blob_uri - self.caching = caching - self.disk_size_gb = disk_size_gb - self.storage_account_type = storage_account_type diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/image_paged.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/image_paged.py deleted file mode 100644 index e3c90bd5037d..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/image_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class ImagePaged(Paged): - """ - A paging container for iterating over a list of :class:`Image ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[Image]'} - } - - def __init__(self, *args, **kwargs): - - super(ImagePaged, self).__init__(*args, **kwargs) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/image_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/image_py3.py deleted file mode 100644 index 072d36c732c5..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/image_py3.py +++ /dev/null @@ -1,70 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource_py3 import Resource - - -class Image(Resource): - """The source user image virtual hard disk. The virtual hard disk will be - copied before being attached to the virtual machine. If SourceImage is - provided, the destination virtual hard drive must not exist. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource Id - :vartype id: str - :ivar name: Resource name - :vartype name: str - :ivar type: Resource type - :vartype type: str - :param location: Required. Resource location - :type location: str - :param tags: Resource tags - :type tags: dict[str, str] - :param source_virtual_machine: The source virtual machine from which Image - is created. - :type source_virtual_machine: - ~azure.mgmt.compute.v2018_10_01.models.SubResource - :param storage_profile: Specifies the storage settings for the virtual - machine disks. - :type storage_profile: - ~azure.mgmt.compute.v2018_10_01.models.ImageStorageProfile - :ivar provisioning_state: The provisioning state. - :vartype provisioning_state: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - 'provisioning_state': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'source_virtual_machine': {'key': 'properties.sourceVirtualMachine', 'type': 'SubResource'}, - 'storage_profile': {'key': 'properties.storageProfile', 'type': 'ImageStorageProfile'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - } - - def __init__(self, *, location: str, tags=None, source_virtual_machine=None, storage_profile=None, **kwargs) -> None: - super(Image, self).__init__(location=location, tags=tags, **kwargs) - self.source_virtual_machine = source_virtual_machine - self.storage_profile = storage_profile - self.provisioning_state = None diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/image_reference.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/image_reference.py deleted file mode 100644 index b8f929f4ad70..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/image_reference.py +++ /dev/null @@ -1,54 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .sub_resource import SubResource - - -class ImageReference(SubResource): - """Specifies information about the image to use. You can specify information - about platform images, marketplace images, or virtual machine images. This - element is required when you want to use a platform image, marketplace - image, or virtual machine image, but is not used in other creation - operations. - - :param id: Resource Id - :type id: str - :param publisher: The image publisher. - :type publisher: str - :param offer: Specifies the offer of the platform image or marketplace - image used to create the virtual machine. - :type offer: str - :param sku: The image SKU. - :type sku: str - :param version: Specifies the version of the platform image or marketplace - image used to create the virtual machine. The allowed formats are - Major.Minor.Build or 'latest'. Major, Minor, and Build are decimal - numbers. Specify 'latest' to use the latest version of an image available - at deploy time. Even if you use 'latest', the VM image will not - automatically update after deploy time even if a new version becomes - available. - :type version: str - """ - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'publisher': {'key': 'publisher', 'type': 'str'}, - 'offer': {'key': 'offer', 'type': 'str'}, - 'sku': {'key': 'sku', 'type': 'str'}, - 'version': {'key': 'version', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ImageReference, self).__init__(**kwargs) - self.publisher = kwargs.get('publisher', None) - self.offer = kwargs.get('offer', None) - self.sku = kwargs.get('sku', None) - self.version = kwargs.get('version', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/image_reference_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/image_reference_py3.py deleted file mode 100644 index 1d7eefe5ac65..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/image_reference_py3.py +++ /dev/null @@ -1,54 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .sub_resource_py3 import SubResource - - -class ImageReference(SubResource): - """Specifies information about the image to use. You can specify information - about platform images, marketplace images, or virtual machine images. This - element is required when you want to use a platform image, marketplace - image, or virtual machine image, but is not used in other creation - operations. - - :param id: Resource Id - :type id: str - :param publisher: The image publisher. - :type publisher: str - :param offer: Specifies the offer of the platform image or marketplace - image used to create the virtual machine. - :type offer: str - :param sku: The image SKU. - :type sku: str - :param version: Specifies the version of the platform image or marketplace - image used to create the virtual machine. The allowed formats are - Major.Minor.Build or 'latest'. Major, Minor, and Build are decimal - numbers. Specify 'latest' to use the latest version of an image available - at deploy time. Even if you use 'latest', the VM image will not - automatically update after deploy time even if a new version becomes - available. - :type version: str - """ - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'publisher': {'key': 'publisher', 'type': 'str'}, - 'offer': {'key': 'offer', 'type': 'str'}, - 'sku': {'key': 'sku', 'type': 'str'}, - 'version': {'key': 'version', 'type': 'str'}, - } - - def __init__(self, *, id: str=None, publisher: str=None, offer: str=None, sku: str=None, version: str=None, **kwargs) -> None: - super(ImageReference, self).__init__(id=id, **kwargs) - self.publisher = publisher - self.offer = offer - self.sku = sku - self.version = version diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/image_storage_profile.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/image_storage_profile.py deleted file mode 100644 index 57c1375376ef..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/image_storage_profile.py +++ /dev/null @@ -1,45 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ImageStorageProfile(Model): - """Describes a storage profile. - - :param os_disk: Specifies information about the operating system disk used - by the virtual machine.

    For more information about disks, see - [About disks and VHDs for Azure virtual - machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-about-disks-vhds?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). - :type os_disk: ~azure.mgmt.compute.v2018_10_01.models.ImageOSDisk - :param data_disks: Specifies the parameters that are used to add a data - disk to a virtual machine.

    For more information about disks, see - [About disks and VHDs for Azure virtual - machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-about-disks-vhds?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). - :type data_disks: - list[~azure.mgmt.compute.v2018_10_01.models.ImageDataDisk] - :param zone_resilient: Specifies whether an image is zone resilient or - not. Default is false. Zone resilient images can be created only in - regions that provide Zone Redundant Storage (ZRS). - :type zone_resilient: bool - """ - - _attribute_map = { - 'os_disk': {'key': 'osDisk', 'type': 'ImageOSDisk'}, - 'data_disks': {'key': 'dataDisks', 'type': '[ImageDataDisk]'}, - 'zone_resilient': {'key': 'zoneResilient', 'type': 'bool'}, - } - - def __init__(self, **kwargs): - super(ImageStorageProfile, self).__init__(**kwargs) - self.os_disk = kwargs.get('os_disk', None) - self.data_disks = kwargs.get('data_disks', None) - self.zone_resilient = kwargs.get('zone_resilient', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/image_storage_profile_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/image_storage_profile_py3.py deleted file mode 100644 index dfe0f937a3c1..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/image_storage_profile_py3.py +++ /dev/null @@ -1,45 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ImageStorageProfile(Model): - """Describes a storage profile. - - :param os_disk: Specifies information about the operating system disk used - by the virtual machine.

    For more information about disks, see - [About disks and VHDs for Azure virtual - machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-about-disks-vhds?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). - :type os_disk: ~azure.mgmt.compute.v2018_10_01.models.ImageOSDisk - :param data_disks: Specifies the parameters that are used to add a data - disk to a virtual machine.

    For more information about disks, see - [About disks and VHDs for Azure virtual - machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-about-disks-vhds?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). - :type data_disks: - list[~azure.mgmt.compute.v2018_10_01.models.ImageDataDisk] - :param zone_resilient: Specifies whether an image is zone resilient or - not. Default is false. Zone resilient images can be created only in - regions that provide Zone Redundant Storage (ZRS). - :type zone_resilient: bool - """ - - _attribute_map = { - 'os_disk': {'key': 'osDisk', 'type': 'ImageOSDisk'}, - 'data_disks': {'key': 'dataDisks', 'type': '[ImageDataDisk]'}, - 'zone_resilient': {'key': 'zoneResilient', 'type': 'bool'}, - } - - def __init__(self, *, os_disk=None, data_disks=None, zone_resilient: bool=None, **kwargs) -> None: - super(ImageStorageProfile, self).__init__(**kwargs) - self.os_disk = os_disk - self.data_disks = data_disks - self.zone_resilient = zone_resilient diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/image_update.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/image_update.py deleted file mode 100644 index 985cbe380240..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/image_update.py +++ /dev/null @@ -1,50 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .update_resource import UpdateResource - - -class ImageUpdate(UpdateResource): - """The source user image virtual hard disk. Only tags may be updated. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :param tags: Resource tags - :type tags: dict[str, str] - :param source_virtual_machine: The source virtual machine from which Image - is created. - :type source_virtual_machine: - ~azure.mgmt.compute.v2018_10_01.models.SubResource - :param storage_profile: Specifies the storage settings for the virtual - machine disks. - :type storage_profile: - ~azure.mgmt.compute.v2018_10_01.models.ImageStorageProfile - :ivar provisioning_state: The provisioning state. - :vartype provisioning_state: str - """ - - _validation = { - 'provisioning_state': {'readonly': True}, - } - - _attribute_map = { - 'tags': {'key': 'tags', 'type': '{str}'}, - 'source_virtual_machine': {'key': 'properties.sourceVirtualMachine', 'type': 'SubResource'}, - 'storage_profile': {'key': 'properties.storageProfile', 'type': 'ImageStorageProfile'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ImageUpdate, self).__init__(**kwargs) - self.source_virtual_machine = kwargs.get('source_virtual_machine', None) - self.storage_profile = kwargs.get('storage_profile', None) - self.provisioning_state = None diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/image_update_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/image_update_py3.py deleted file mode 100644 index e1c19f487ae3..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/image_update_py3.py +++ /dev/null @@ -1,50 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .update_resource_py3 import UpdateResource - - -class ImageUpdate(UpdateResource): - """The source user image virtual hard disk. Only tags may be updated. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :param tags: Resource tags - :type tags: dict[str, str] - :param source_virtual_machine: The source virtual machine from which Image - is created. - :type source_virtual_machine: - ~azure.mgmt.compute.v2018_10_01.models.SubResource - :param storage_profile: Specifies the storage settings for the virtual - machine disks. - :type storage_profile: - ~azure.mgmt.compute.v2018_10_01.models.ImageStorageProfile - :ivar provisioning_state: The provisioning state. - :vartype provisioning_state: str - """ - - _validation = { - 'provisioning_state': {'readonly': True}, - } - - _attribute_map = { - 'tags': {'key': 'tags', 'type': '{str}'}, - 'source_virtual_machine': {'key': 'properties.sourceVirtualMachine', 'type': 'SubResource'}, - 'storage_profile': {'key': 'properties.storageProfile', 'type': 'ImageStorageProfile'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - } - - def __init__(self, *, tags=None, source_virtual_machine=None, storage_profile=None, **kwargs) -> None: - super(ImageUpdate, self).__init__(tags=tags, **kwargs) - self.source_virtual_machine = source_virtual_machine - self.storage_profile = storage_profile - self.provisioning_state = None diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/inner_error.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/inner_error.py deleted file mode 100644 index 6324249d7c19..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/inner_error.py +++ /dev/null @@ -1,32 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class InnerError(Model): - """Inner error details. - - :param exceptiontype: The exception type. - :type exceptiontype: str - :param errordetail: The internal error message or exception dump. - :type errordetail: str - """ - - _attribute_map = { - 'exceptiontype': {'key': 'exceptiontype', 'type': 'str'}, - 'errordetail': {'key': 'errordetail', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(InnerError, self).__init__(**kwargs) - self.exceptiontype = kwargs.get('exceptiontype', None) - self.errordetail = kwargs.get('errordetail', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/inner_error_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/inner_error_py3.py deleted file mode 100644 index ccec30d7b53f..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/inner_error_py3.py +++ /dev/null @@ -1,32 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class InnerError(Model): - """Inner error details. - - :param exceptiontype: The exception type. - :type exceptiontype: str - :param errordetail: The internal error message or exception dump. - :type errordetail: str - """ - - _attribute_map = { - 'exceptiontype': {'key': 'exceptiontype', 'type': 'str'}, - 'errordetail': {'key': 'errordetail', 'type': 'str'}, - } - - def __init__(self, *, exceptiontype: str=None, errordetail: str=None, **kwargs) -> None: - super(InnerError, self).__init__(**kwargs) - self.exceptiontype = exceptiontype - self.errordetail = errordetail diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/instance_view_status.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/instance_view_status.py deleted file mode 100644 index 3498610092fc..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/instance_view_status.py +++ /dev/null @@ -1,47 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class InstanceViewStatus(Model): - """Instance view status. - - :param code: The status code. - :type code: str - :param level: The level code. Possible values include: 'Info', 'Warning', - 'Error' - :type level: str or - ~azure.mgmt.compute.v2018_10_01.models.StatusLevelTypes - :param display_status: The short localizable label for the status. - :type display_status: str - :param message: The detailed status message, including for alerts and - error messages. - :type message: str - :param time: The time of the status. - :type time: datetime - """ - - _attribute_map = { - 'code': {'key': 'code', 'type': 'str'}, - 'level': {'key': 'level', 'type': 'StatusLevelTypes'}, - 'display_status': {'key': 'displayStatus', 'type': 'str'}, - 'message': {'key': 'message', 'type': 'str'}, - 'time': {'key': 'time', 'type': 'iso-8601'}, - } - - def __init__(self, **kwargs): - super(InstanceViewStatus, self).__init__(**kwargs) - self.code = kwargs.get('code', None) - self.level = kwargs.get('level', None) - self.display_status = kwargs.get('display_status', None) - self.message = kwargs.get('message', None) - self.time = kwargs.get('time', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/instance_view_status_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/instance_view_status_py3.py deleted file mode 100644 index 7ff50d8e85d2..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/instance_view_status_py3.py +++ /dev/null @@ -1,47 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class InstanceViewStatus(Model): - """Instance view status. - - :param code: The status code. - :type code: str - :param level: The level code. Possible values include: 'Info', 'Warning', - 'Error' - :type level: str or - ~azure.mgmt.compute.v2018_10_01.models.StatusLevelTypes - :param display_status: The short localizable label for the status. - :type display_status: str - :param message: The detailed status message, including for alerts and - error messages. - :type message: str - :param time: The time of the status. - :type time: datetime - """ - - _attribute_map = { - 'code': {'key': 'code', 'type': 'str'}, - 'level': {'key': 'level', 'type': 'StatusLevelTypes'}, - 'display_status': {'key': 'displayStatus', 'type': 'str'}, - 'message': {'key': 'message', 'type': 'str'}, - 'time': {'key': 'time', 'type': 'iso-8601'}, - } - - def __init__(self, *, code: str=None, level=None, display_status: str=None, message: str=None, time=None, **kwargs) -> None: - super(InstanceViewStatus, self).__init__(**kwargs) - self.code = code - self.level = level - self.display_status = display_status - self.message = message - self.time = time diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/key_vault_key_reference.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/key_vault_key_reference.py deleted file mode 100644 index 45187a0738f7..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/key_vault_key_reference.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class KeyVaultKeyReference(Model): - """Describes a reference to Key Vault Key. - - All required parameters must be populated in order to send to Azure. - - :param key_url: Required. The URL referencing a key encryption key in Key - Vault. - :type key_url: str - :param source_vault: Required. The relative URL of the Key Vault - containing the key. - :type source_vault: ~azure.mgmt.compute.v2018_10_01.models.SubResource - """ - - _validation = { - 'key_url': {'required': True}, - 'source_vault': {'required': True}, - } - - _attribute_map = { - 'key_url': {'key': 'keyUrl', 'type': 'str'}, - 'source_vault': {'key': 'sourceVault', 'type': 'SubResource'}, - } - - def __init__(self, **kwargs): - super(KeyVaultKeyReference, self).__init__(**kwargs) - self.key_url = kwargs.get('key_url', None) - self.source_vault = kwargs.get('source_vault', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/key_vault_key_reference_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/key_vault_key_reference_py3.py deleted file mode 100644 index ec9783b91054..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/key_vault_key_reference_py3.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class KeyVaultKeyReference(Model): - """Describes a reference to Key Vault Key. - - All required parameters must be populated in order to send to Azure. - - :param key_url: Required. The URL referencing a key encryption key in Key - Vault. - :type key_url: str - :param source_vault: Required. The relative URL of the Key Vault - containing the key. - :type source_vault: ~azure.mgmt.compute.v2018_10_01.models.SubResource - """ - - _validation = { - 'key_url': {'required': True}, - 'source_vault': {'required': True}, - } - - _attribute_map = { - 'key_url': {'key': 'keyUrl', 'type': 'str'}, - 'source_vault': {'key': 'sourceVault', 'type': 'SubResource'}, - } - - def __init__(self, *, key_url: str, source_vault, **kwargs) -> None: - super(KeyVaultKeyReference, self).__init__(**kwargs) - self.key_url = key_url - self.source_vault = source_vault diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/key_vault_secret_reference.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/key_vault_secret_reference.py deleted file mode 100644 index 6b6c69432141..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/key_vault_secret_reference.py +++ /dev/null @@ -1,40 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class KeyVaultSecretReference(Model): - """Describes a reference to Key Vault Secret. - - All required parameters must be populated in order to send to Azure. - - :param secret_url: Required. The URL referencing a secret in a Key Vault. - :type secret_url: str - :param source_vault: Required. The relative URL of the Key Vault - containing the secret. - :type source_vault: ~azure.mgmt.compute.v2018_10_01.models.SubResource - """ - - _validation = { - 'secret_url': {'required': True}, - 'source_vault': {'required': True}, - } - - _attribute_map = { - 'secret_url': {'key': 'secretUrl', 'type': 'str'}, - 'source_vault': {'key': 'sourceVault', 'type': 'SubResource'}, - } - - def __init__(self, **kwargs): - super(KeyVaultSecretReference, self).__init__(**kwargs) - self.secret_url = kwargs.get('secret_url', None) - self.source_vault = kwargs.get('source_vault', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/key_vault_secret_reference_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/key_vault_secret_reference_py3.py deleted file mode 100644 index fdd35e0c980e..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/key_vault_secret_reference_py3.py +++ /dev/null @@ -1,40 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class KeyVaultSecretReference(Model): - """Describes a reference to Key Vault Secret. - - All required parameters must be populated in order to send to Azure. - - :param secret_url: Required. The URL referencing a secret in a Key Vault. - :type secret_url: str - :param source_vault: Required. The relative URL of the Key Vault - containing the secret. - :type source_vault: ~azure.mgmt.compute.v2018_10_01.models.SubResource - """ - - _validation = { - 'secret_url': {'required': True}, - 'source_vault': {'required': True}, - } - - _attribute_map = { - 'secret_url': {'key': 'secretUrl', 'type': 'str'}, - 'source_vault': {'key': 'sourceVault', 'type': 'SubResource'}, - } - - def __init__(self, *, secret_url: str, source_vault, **kwargs) -> None: - super(KeyVaultSecretReference, self).__init__(**kwargs) - self.secret_url = secret_url - self.source_vault = source_vault diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/linux_configuration.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/linux_configuration.py deleted file mode 100644 index 5ab938d7eab9..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/linux_configuration.py +++ /dev/null @@ -1,47 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class LinuxConfiguration(Model): - """Specifies the Linux operating system settings on the virtual machine. -

    For a list of supported Linux distributions, see [Linux on - Azure-Endorsed - Distributions](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-endorsed-distros?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json) -

    For running non-endorsed distributions, see [Information for - Non-Endorsed - Distributions](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-create-upload-generic?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json). - - :param disable_password_authentication: Specifies whether password - authentication should be disabled. - :type disable_password_authentication: bool - :param ssh: Specifies the ssh key configuration for a Linux OS. - :type ssh: ~azure.mgmt.compute.v2018_10_01.models.SshConfiguration - :param provision_vm_agent: Indicates whether virtual machine agent should - be provisioned on the virtual machine.

    When this property is not - specified in the request body, default behavior is to set it to true. - This will ensure that VM Agent is installed on the VM so that extensions - can be added to the VM later. - :type provision_vm_agent: bool - """ - - _attribute_map = { - 'disable_password_authentication': {'key': 'disablePasswordAuthentication', 'type': 'bool'}, - 'ssh': {'key': 'ssh', 'type': 'SshConfiguration'}, - 'provision_vm_agent': {'key': 'provisionVMAgent', 'type': 'bool'}, - } - - def __init__(self, **kwargs): - super(LinuxConfiguration, self).__init__(**kwargs) - self.disable_password_authentication = kwargs.get('disable_password_authentication', None) - self.ssh = kwargs.get('ssh', None) - self.provision_vm_agent = kwargs.get('provision_vm_agent', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/linux_configuration_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/linux_configuration_py3.py deleted file mode 100644 index ccc388729085..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/linux_configuration_py3.py +++ /dev/null @@ -1,47 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class LinuxConfiguration(Model): - """Specifies the Linux operating system settings on the virtual machine. -

    For a list of supported Linux distributions, see [Linux on - Azure-Endorsed - Distributions](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-endorsed-distros?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json) -

    For running non-endorsed distributions, see [Information for - Non-Endorsed - Distributions](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-create-upload-generic?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json). - - :param disable_password_authentication: Specifies whether password - authentication should be disabled. - :type disable_password_authentication: bool - :param ssh: Specifies the ssh key configuration for a Linux OS. - :type ssh: ~azure.mgmt.compute.v2018_10_01.models.SshConfiguration - :param provision_vm_agent: Indicates whether virtual machine agent should - be provisioned on the virtual machine.

    When this property is not - specified in the request body, default behavior is to set it to true. - This will ensure that VM Agent is installed on the VM so that extensions - can be added to the VM later. - :type provision_vm_agent: bool - """ - - _attribute_map = { - 'disable_password_authentication': {'key': 'disablePasswordAuthentication', 'type': 'bool'}, - 'ssh': {'key': 'ssh', 'type': 'SshConfiguration'}, - 'provision_vm_agent': {'key': 'provisionVMAgent', 'type': 'bool'}, - } - - def __init__(self, *, disable_password_authentication: bool=None, ssh=None, provision_vm_agent: bool=None, **kwargs) -> None: - super(LinuxConfiguration, self).__init__(**kwargs) - self.disable_password_authentication = disable_password_authentication - self.ssh = ssh - self.provision_vm_agent = provision_vm_agent diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/log_analytics_input_base.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/log_analytics_input_base.py deleted file mode 100644 index 46bbc4f44411..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/log_analytics_input_base.py +++ /dev/null @@ -1,58 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class LogAnalyticsInputBase(Model): - """Api input base class for LogAnalytics Api. - - All required parameters must be populated in order to send to Azure. - - :param blob_container_sas_uri: Required. SAS Uri of the logging blob - container to which LogAnalytics Api writes output logs to. - :type blob_container_sas_uri: str - :param from_time: Required. From time of the query - :type from_time: datetime - :param to_time: Required. To time of the query - :type to_time: datetime - :param group_by_throttle_policy: Group query result by Throttle Policy - applied. - :type group_by_throttle_policy: bool - :param group_by_operation_name: Group query result by Operation Name. - :type group_by_operation_name: bool - :param group_by_resource_name: Group query result by Resource Name. - :type group_by_resource_name: bool - """ - - _validation = { - 'blob_container_sas_uri': {'required': True}, - 'from_time': {'required': True}, - 'to_time': {'required': True}, - } - - _attribute_map = { - 'blob_container_sas_uri': {'key': 'blobContainerSasUri', 'type': 'str'}, - 'from_time': {'key': 'fromTime', 'type': 'iso-8601'}, - 'to_time': {'key': 'toTime', 'type': 'iso-8601'}, - 'group_by_throttle_policy': {'key': 'groupByThrottlePolicy', 'type': 'bool'}, - 'group_by_operation_name': {'key': 'groupByOperationName', 'type': 'bool'}, - 'group_by_resource_name': {'key': 'groupByResourceName', 'type': 'bool'}, - } - - def __init__(self, **kwargs): - super(LogAnalyticsInputBase, self).__init__(**kwargs) - self.blob_container_sas_uri = kwargs.get('blob_container_sas_uri', None) - self.from_time = kwargs.get('from_time', None) - self.to_time = kwargs.get('to_time', None) - self.group_by_throttle_policy = kwargs.get('group_by_throttle_policy', None) - self.group_by_operation_name = kwargs.get('group_by_operation_name', None) - self.group_by_resource_name = kwargs.get('group_by_resource_name', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/log_analytics_input_base_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/log_analytics_input_base_py3.py deleted file mode 100644 index f713c2cb0629..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/log_analytics_input_base_py3.py +++ /dev/null @@ -1,58 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class LogAnalyticsInputBase(Model): - """Api input base class for LogAnalytics Api. - - All required parameters must be populated in order to send to Azure. - - :param blob_container_sas_uri: Required. SAS Uri of the logging blob - container to which LogAnalytics Api writes output logs to. - :type blob_container_sas_uri: str - :param from_time: Required. From time of the query - :type from_time: datetime - :param to_time: Required. To time of the query - :type to_time: datetime - :param group_by_throttle_policy: Group query result by Throttle Policy - applied. - :type group_by_throttle_policy: bool - :param group_by_operation_name: Group query result by Operation Name. - :type group_by_operation_name: bool - :param group_by_resource_name: Group query result by Resource Name. - :type group_by_resource_name: bool - """ - - _validation = { - 'blob_container_sas_uri': {'required': True}, - 'from_time': {'required': True}, - 'to_time': {'required': True}, - } - - _attribute_map = { - 'blob_container_sas_uri': {'key': 'blobContainerSasUri', 'type': 'str'}, - 'from_time': {'key': 'fromTime', 'type': 'iso-8601'}, - 'to_time': {'key': 'toTime', 'type': 'iso-8601'}, - 'group_by_throttle_policy': {'key': 'groupByThrottlePolicy', 'type': 'bool'}, - 'group_by_operation_name': {'key': 'groupByOperationName', 'type': 'bool'}, - 'group_by_resource_name': {'key': 'groupByResourceName', 'type': 'bool'}, - } - - def __init__(self, *, blob_container_sas_uri: str, from_time, to_time, group_by_throttle_policy: bool=None, group_by_operation_name: bool=None, group_by_resource_name: bool=None, **kwargs) -> None: - super(LogAnalyticsInputBase, self).__init__(**kwargs) - self.blob_container_sas_uri = blob_container_sas_uri - self.from_time = from_time - self.to_time = to_time - self.group_by_throttle_policy = group_by_throttle_policy - self.group_by_operation_name = group_by_operation_name - self.group_by_resource_name = group_by_resource_name diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/log_analytics_operation_result.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/log_analytics_operation_result.py deleted file mode 100644 index 4e51d6b1965b..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/log_analytics_operation_result.py +++ /dev/null @@ -1,36 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class LogAnalyticsOperationResult(Model): - """LogAnalytics operation status response. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar properties: LogAnalyticsOutput - :vartype properties: - ~azure.mgmt.compute.v2018_10_01.models.LogAnalyticsOutput - """ - - _validation = { - 'properties': {'readonly': True}, - } - - _attribute_map = { - 'properties': {'key': 'properties', 'type': 'LogAnalyticsOutput'}, - } - - def __init__(self, **kwargs): - super(LogAnalyticsOperationResult, self).__init__(**kwargs) - self.properties = None diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/log_analytics_operation_result_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/log_analytics_operation_result_py3.py deleted file mode 100644 index 8413e0c15bf4..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/log_analytics_operation_result_py3.py +++ /dev/null @@ -1,36 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class LogAnalyticsOperationResult(Model): - """LogAnalytics operation status response. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar properties: LogAnalyticsOutput - :vartype properties: - ~azure.mgmt.compute.v2018_10_01.models.LogAnalyticsOutput - """ - - _validation = { - 'properties': {'readonly': True}, - } - - _attribute_map = { - 'properties': {'key': 'properties', 'type': 'LogAnalyticsOutput'}, - } - - def __init__(self, **kwargs) -> None: - super(LogAnalyticsOperationResult, self).__init__(**kwargs) - self.properties = None diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/log_analytics_output.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/log_analytics_output.py deleted file mode 100644 index 5ea1615011c3..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/log_analytics_output.py +++ /dev/null @@ -1,35 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class LogAnalyticsOutput(Model): - """LogAnalytics output properties. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar output: Output file Uri path to blob container. - :vartype output: str - """ - - _validation = { - 'output': {'readonly': True}, - } - - _attribute_map = { - 'output': {'key': 'output', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(LogAnalyticsOutput, self).__init__(**kwargs) - self.output = None diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/log_analytics_output_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/log_analytics_output_py3.py deleted file mode 100644 index 71a428a8e49a..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/log_analytics_output_py3.py +++ /dev/null @@ -1,35 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class LogAnalyticsOutput(Model): - """LogAnalytics output properties. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar output: Output file Uri path to blob container. - :vartype output: str - """ - - _validation = { - 'output': {'readonly': True}, - } - - _attribute_map = { - 'output': {'key': 'output', 'type': 'str'}, - } - - def __init__(self, **kwargs) -> None: - super(LogAnalyticsOutput, self).__init__(**kwargs) - self.output = None diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/maintenance_redeploy_status.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/maintenance_redeploy_status.py deleted file mode 100644 index 74ee05ce94d5..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/maintenance_redeploy_status.py +++ /dev/null @@ -1,60 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class MaintenanceRedeployStatus(Model): - """Maintenance Operation Status. - - :param is_customer_initiated_maintenance_allowed: True, if customer is - allowed to perform Maintenance. - :type is_customer_initiated_maintenance_allowed: bool - :param pre_maintenance_window_start_time: Start Time for the Pre - Maintenance Window. - :type pre_maintenance_window_start_time: datetime - :param pre_maintenance_window_end_time: End Time for the Pre Maintenance - Window. - :type pre_maintenance_window_end_time: datetime - :param maintenance_window_start_time: Start Time for the Maintenance - Window. - :type maintenance_window_start_time: datetime - :param maintenance_window_end_time: End Time for the Maintenance Window. - :type maintenance_window_end_time: datetime - :param last_operation_result_code: The Last Maintenance Operation Result - Code. Possible values include: 'None', 'RetryLater', 'MaintenanceAborted', - 'MaintenanceCompleted' - :type last_operation_result_code: str or - ~azure.mgmt.compute.v2018_10_01.models.MaintenanceOperationResultCodeTypes - :param last_operation_message: Message returned for the last Maintenance - Operation. - :type last_operation_message: str - """ - - _attribute_map = { - 'is_customer_initiated_maintenance_allowed': {'key': 'isCustomerInitiatedMaintenanceAllowed', 'type': 'bool'}, - 'pre_maintenance_window_start_time': {'key': 'preMaintenanceWindowStartTime', 'type': 'iso-8601'}, - 'pre_maintenance_window_end_time': {'key': 'preMaintenanceWindowEndTime', 'type': 'iso-8601'}, - 'maintenance_window_start_time': {'key': 'maintenanceWindowStartTime', 'type': 'iso-8601'}, - 'maintenance_window_end_time': {'key': 'maintenanceWindowEndTime', 'type': 'iso-8601'}, - 'last_operation_result_code': {'key': 'lastOperationResultCode', 'type': 'MaintenanceOperationResultCodeTypes'}, - 'last_operation_message': {'key': 'lastOperationMessage', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(MaintenanceRedeployStatus, self).__init__(**kwargs) - self.is_customer_initiated_maintenance_allowed = kwargs.get('is_customer_initiated_maintenance_allowed', None) - self.pre_maintenance_window_start_time = kwargs.get('pre_maintenance_window_start_time', None) - self.pre_maintenance_window_end_time = kwargs.get('pre_maintenance_window_end_time', None) - self.maintenance_window_start_time = kwargs.get('maintenance_window_start_time', None) - self.maintenance_window_end_time = kwargs.get('maintenance_window_end_time', None) - self.last_operation_result_code = kwargs.get('last_operation_result_code', None) - self.last_operation_message = kwargs.get('last_operation_message', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/maintenance_redeploy_status_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/maintenance_redeploy_status_py3.py deleted file mode 100644 index 97264ca9b7f4..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/maintenance_redeploy_status_py3.py +++ /dev/null @@ -1,60 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class MaintenanceRedeployStatus(Model): - """Maintenance Operation Status. - - :param is_customer_initiated_maintenance_allowed: True, if customer is - allowed to perform Maintenance. - :type is_customer_initiated_maintenance_allowed: bool - :param pre_maintenance_window_start_time: Start Time for the Pre - Maintenance Window. - :type pre_maintenance_window_start_time: datetime - :param pre_maintenance_window_end_time: End Time for the Pre Maintenance - Window. - :type pre_maintenance_window_end_time: datetime - :param maintenance_window_start_time: Start Time for the Maintenance - Window. - :type maintenance_window_start_time: datetime - :param maintenance_window_end_time: End Time for the Maintenance Window. - :type maintenance_window_end_time: datetime - :param last_operation_result_code: The Last Maintenance Operation Result - Code. Possible values include: 'None', 'RetryLater', 'MaintenanceAborted', - 'MaintenanceCompleted' - :type last_operation_result_code: str or - ~azure.mgmt.compute.v2018_10_01.models.MaintenanceOperationResultCodeTypes - :param last_operation_message: Message returned for the last Maintenance - Operation. - :type last_operation_message: str - """ - - _attribute_map = { - 'is_customer_initiated_maintenance_allowed': {'key': 'isCustomerInitiatedMaintenanceAllowed', 'type': 'bool'}, - 'pre_maintenance_window_start_time': {'key': 'preMaintenanceWindowStartTime', 'type': 'iso-8601'}, - 'pre_maintenance_window_end_time': {'key': 'preMaintenanceWindowEndTime', 'type': 'iso-8601'}, - 'maintenance_window_start_time': {'key': 'maintenanceWindowStartTime', 'type': 'iso-8601'}, - 'maintenance_window_end_time': {'key': 'maintenanceWindowEndTime', 'type': 'iso-8601'}, - 'last_operation_result_code': {'key': 'lastOperationResultCode', 'type': 'MaintenanceOperationResultCodeTypes'}, - 'last_operation_message': {'key': 'lastOperationMessage', 'type': 'str'}, - } - - def __init__(self, *, is_customer_initiated_maintenance_allowed: bool=None, pre_maintenance_window_start_time=None, pre_maintenance_window_end_time=None, maintenance_window_start_time=None, maintenance_window_end_time=None, last_operation_result_code=None, last_operation_message: str=None, **kwargs) -> None: - super(MaintenanceRedeployStatus, self).__init__(**kwargs) - self.is_customer_initiated_maintenance_allowed = is_customer_initiated_maintenance_allowed - self.pre_maintenance_window_start_time = pre_maintenance_window_start_time - self.pre_maintenance_window_end_time = pre_maintenance_window_end_time - self.maintenance_window_start_time = maintenance_window_start_time - self.maintenance_window_end_time = maintenance_window_end_time - self.last_operation_result_code = last_operation_result_code - self.last_operation_message = last_operation_message diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/managed_disk_parameters.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/managed_disk_parameters.py deleted file mode 100644 index dc7f70b78e74..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/managed_disk_parameters.py +++ /dev/null @@ -1,35 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .sub_resource import SubResource - - -class ManagedDiskParameters(SubResource): - """The parameters of a managed disk. - - :param id: Resource Id - :type id: str - :param storage_account_type: Specifies the storage account type for the - managed disk. NOTE: UltraSSD_LRS can only be used with data disks, it - cannot be used with OS Disk. Possible values include: 'Standard_LRS', - 'Premium_LRS', 'StandardSSD_LRS', 'UltraSSD_LRS' - :type storage_account_type: str or - ~azure.mgmt.compute.v2018_10_01.models.StorageAccountTypes - """ - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'storage_account_type': {'key': 'storageAccountType', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ManagedDiskParameters, self).__init__(**kwargs) - self.storage_account_type = kwargs.get('storage_account_type', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/managed_disk_parameters_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/managed_disk_parameters_py3.py deleted file mode 100644 index 94e2f26b2750..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/managed_disk_parameters_py3.py +++ /dev/null @@ -1,35 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .sub_resource_py3 import SubResource - - -class ManagedDiskParameters(SubResource): - """The parameters of a managed disk. - - :param id: Resource Id - :type id: str - :param storage_account_type: Specifies the storage account type for the - managed disk. NOTE: UltraSSD_LRS can only be used with data disks, it - cannot be used with OS Disk. Possible values include: 'Standard_LRS', - 'Premium_LRS', 'StandardSSD_LRS', 'UltraSSD_LRS' - :type storage_account_type: str or - ~azure.mgmt.compute.v2018_10_01.models.StorageAccountTypes - """ - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'storage_account_type': {'key': 'storageAccountType', 'type': 'str'}, - } - - def __init__(self, *, id: str=None, storage_account_type=None, **kwargs) -> None: - super(ManagedDiskParameters, self).__init__(id=id, **kwargs) - self.storage_account_type = storage_account_type diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/network_interface_reference.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/network_interface_reference.py deleted file mode 100644 index b86e305e3f74..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/network_interface_reference.py +++ /dev/null @@ -1,32 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .sub_resource import SubResource - - -class NetworkInterfaceReference(SubResource): - """Describes a network interface reference. - - :param id: Resource Id - :type id: str - :param primary: Specifies the primary network interface in case the - virtual machine has more than 1 network interface. - :type primary: bool - """ - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'primary': {'key': 'properties.primary', 'type': 'bool'}, - } - - def __init__(self, **kwargs): - super(NetworkInterfaceReference, self).__init__(**kwargs) - self.primary = kwargs.get('primary', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/network_interface_reference_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/network_interface_reference_py3.py deleted file mode 100644 index 47da29278832..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/network_interface_reference_py3.py +++ /dev/null @@ -1,32 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .sub_resource_py3 import SubResource - - -class NetworkInterfaceReference(SubResource): - """Describes a network interface reference. - - :param id: Resource Id - :type id: str - :param primary: Specifies the primary network interface in case the - virtual machine has more than 1 network interface. - :type primary: bool - """ - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'primary': {'key': 'properties.primary', 'type': 'bool'}, - } - - def __init__(self, *, id: str=None, primary: bool=None, **kwargs) -> None: - super(NetworkInterfaceReference, self).__init__(id=id, **kwargs) - self.primary = primary diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/network_profile.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/network_profile.py deleted file mode 100644 index 0431a7df1c0e..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/network_profile.py +++ /dev/null @@ -1,30 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class NetworkProfile(Model): - """Specifies the network interfaces of the virtual machine. - - :param network_interfaces: Specifies the list of resource Ids for the - network interfaces associated with the virtual machine. - :type network_interfaces: - list[~azure.mgmt.compute.v2018_10_01.models.NetworkInterfaceReference] - """ - - _attribute_map = { - 'network_interfaces': {'key': 'networkInterfaces', 'type': '[NetworkInterfaceReference]'}, - } - - def __init__(self, **kwargs): - super(NetworkProfile, self).__init__(**kwargs) - self.network_interfaces = kwargs.get('network_interfaces', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/network_profile_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/network_profile_py3.py deleted file mode 100644 index bcd509f21769..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/network_profile_py3.py +++ /dev/null @@ -1,30 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class NetworkProfile(Model): - """Specifies the network interfaces of the virtual machine. - - :param network_interfaces: Specifies the list of resource Ids for the - network interfaces associated with the virtual machine. - :type network_interfaces: - list[~azure.mgmt.compute.v2018_10_01.models.NetworkInterfaceReference] - """ - - _attribute_map = { - 'network_interfaces': {'key': 'networkInterfaces', 'type': '[NetworkInterfaceReference]'}, - } - - def __init__(self, *, network_interfaces=None, **kwargs) -> None: - super(NetworkProfile, self).__init__(**kwargs) - self.network_interfaces = network_interfaces diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/os_disk.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/os_disk.py deleted file mode 100644 index 821828ee235e..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/os_disk.py +++ /dev/null @@ -1,103 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class OSDisk(Model): - """Specifies information about the operating system disk used by the virtual - machine.

    For more information about disks, see [About disks and - VHDs for Azure virtual - machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-about-disks-vhds?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). - - All required parameters must be populated in order to send to Azure. - - :param os_type: This property allows you to specify the type of the OS - that is included in the disk if creating a VM from user-image or a - specialized VHD.

    Possible values are:

    **Windows** -

    **Linux**. Possible values include: 'Windows', 'Linux' - :type os_type: str or - ~azure.mgmt.compute.v2018_10_01.models.OperatingSystemTypes - :param encryption_settings: Specifies the encryption settings for the OS - Disk.

    Minimum api-version: 2015-06-15 - :type encryption_settings: - ~azure.mgmt.compute.v2018_10_01.models.DiskEncryptionSettings - :param name: The disk name. - :type name: str - :param vhd: The virtual hard disk. - :type vhd: ~azure.mgmt.compute.v2018_10_01.models.VirtualHardDisk - :param image: The source user image virtual hard disk. The virtual hard - disk will be copied before being attached to the virtual machine. If - SourceImage is provided, the destination virtual hard drive must not - exist. - :type image: ~azure.mgmt.compute.v2018_10_01.models.VirtualHardDisk - :param caching: Specifies the caching requirements.

    Possible - values are:

    **None**

    **ReadOnly**

    **ReadWrite** -

    Default: **None for Standard storage. ReadOnly for Premium - storage**. Possible values include: 'None', 'ReadOnly', 'ReadWrite' - :type caching: str or ~azure.mgmt.compute.v2018_10_01.models.CachingTypes - :param write_accelerator_enabled: Specifies whether writeAccelerator - should be enabled or disabled on the disk. - :type write_accelerator_enabled: bool - :param diff_disk_settings: Specifies the ephemeral Disk Settings for the - operating system disk used by the virtual machine. - :type diff_disk_settings: - ~azure.mgmt.compute.v2018_10_01.models.DiffDiskSettings - :param create_option: Required. Specifies how the virtual machine should - be created.

    Possible values are:

    **Attach** \\u2013 This - value is used when you are using a specialized disk to create the virtual - machine.

    **FromImage** \\u2013 This value is used when you are - using an image to create the virtual machine. If you are using a platform - image, you also use the imageReference element described above. If you are - using a marketplace image, you also use the plan element previously - described. Possible values include: 'FromImage', 'Empty', 'Attach' - :type create_option: str or - ~azure.mgmt.compute.v2018_10_01.models.DiskCreateOptionTypes - :param disk_size_gb: Specifies the size of an empty data disk in - gigabytes. This element can be used to overwrite the size of the disk in a - virtual machine image.

    This value cannot be larger than 1023 GB - :type disk_size_gb: int - :param managed_disk: The managed disk parameters. - :type managed_disk: - ~azure.mgmt.compute.v2018_10_01.models.ManagedDiskParameters - """ - - _validation = { - 'create_option': {'required': True}, - } - - _attribute_map = { - 'os_type': {'key': 'osType', 'type': 'OperatingSystemTypes'}, - 'encryption_settings': {'key': 'encryptionSettings', 'type': 'DiskEncryptionSettings'}, - 'name': {'key': 'name', 'type': 'str'}, - 'vhd': {'key': 'vhd', 'type': 'VirtualHardDisk'}, - 'image': {'key': 'image', 'type': 'VirtualHardDisk'}, - 'caching': {'key': 'caching', 'type': 'CachingTypes'}, - 'write_accelerator_enabled': {'key': 'writeAcceleratorEnabled', 'type': 'bool'}, - 'diff_disk_settings': {'key': 'diffDiskSettings', 'type': 'DiffDiskSettings'}, - 'create_option': {'key': 'createOption', 'type': 'str'}, - 'disk_size_gb': {'key': 'diskSizeGB', 'type': 'int'}, - 'managed_disk': {'key': 'managedDisk', 'type': 'ManagedDiskParameters'}, - } - - def __init__(self, **kwargs): - super(OSDisk, self).__init__(**kwargs) - self.os_type = kwargs.get('os_type', None) - self.encryption_settings = kwargs.get('encryption_settings', None) - self.name = kwargs.get('name', None) - self.vhd = kwargs.get('vhd', None) - self.image = kwargs.get('image', None) - self.caching = kwargs.get('caching', None) - self.write_accelerator_enabled = kwargs.get('write_accelerator_enabled', None) - self.diff_disk_settings = kwargs.get('diff_disk_settings', None) - self.create_option = kwargs.get('create_option', None) - self.disk_size_gb = kwargs.get('disk_size_gb', None) - self.managed_disk = kwargs.get('managed_disk', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/os_disk_image.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/os_disk_image.py deleted file mode 100644 index 07173c618203..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/os_disk_image.py +++ /dev/null @@ -1,36 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class OSDiskImage(Model): - """Contains the os disk image information. - - All required parameters must be populated in order to send to Azure. - - :param operating_system: Required. The operating system of the - osDiskImage. Possible values include: 'Windows', 'Linux' - :type operating_system: str or - ~azure.mgmt.compute.v2018_10_01.models.OperatingSystemTypes - """ - - _validation = { - 'operating_system': {'required': True}, - } - - _attribute_map = { - 'operating_system': {'key': 'operatingSystem', 'type': 'OperatingSystemTypes'}, - } - - def __init__(self, **kwargs): - super(OSDiskImage, self).__init__(**kwargs) - self.operating_system = kwargs.get('operating_system', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/os_disk_image_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/os_disk_image_py3.py deleted file mode 100644 index ba5cf0c5b95f..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/os_disk_image_py3.py +++ /dev/null @@ -1,36 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class OSDiskImage(Model): - """Contains the os disk image information. - - All required parameters must be populated in order to send to Azure. - - :param operating_system: Required. The operating system of the - osDiskImage. Possible values include: 'Windows', 'Linux' - :type operating_system: str or - ~azure.mgmt.compute.v2018_10_01.models.OperatingSystemTypes - """ - - _validation = { - 'operating_system': {'required': True}, - } - - _attribute_map = { - 'operating_system': {'key': 'operatingSystem', 'type': 'OperatingSystemTypes'}, - } - - def __init__(self, *, operating_system, **kwargs) -> None: - super(OSDiskImage, self).__init__(**kwargs) - self.operating_system = operating_system diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/os_disk_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/os_disk_py3.py deleted file mode 100644 index 33341cff1d9b..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/os_disk_py3.py +++ /dev/null @@ -1,103 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class OSDisk(Model): - """Specifies information about the operating system disk used by the virtual - machine.

    For more information about disks, see [About disks and - VHDs for Azure virtual - machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-about-disks-vhds?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). - - All required parameters must be populated in order to send to Azure. - - :param os_type: This property allows you to specify the type of the OS - that is included in the disk if creating a VM from user-image or a - specialized VHD.

    Possible values are:

    **Windows** -

    **Linux**. Possible values include: 'Windows', 'Linux' - :type os_type: str or - ~azure.mgmt.compute.v2018_10_01.models.OperatingSystemTypes - :param encryption_settings: Specifies the encryption settings for the OS - Disk.

    Minimum api-version: 2015-06-15 - :type encryption_settings: - ~azure.mgmt.compute.v2018_10_01.models.DiskEncryptionSettings - :param name: The disk name. - :type name: str - :param vhd: The virtual hard disk. - :type vhd: ~azure.mgmt.compute.v2018_10_01.models.VirtualHardDisk - :param image: The source user image virtual hard disk. The virtual hard - disk will be copied before being attached to the virtual machine. If - SourceImage is provided, the destination virtual hard drive must not - exist. - :type image: ~azure.mgmt.compute.v2018_10_01.models.VirtualHardDisk - :param caching: Specifies the caching requirements.

    Possible - values are:

    **None**

    **ReadOnly**

    **ReadWrite** -

    Default: **None for Standard storage. ReadOnly for Premium - storage**. Possible values include: 'None', 'ReadOnly', 'ReadWrite' - :type caching: str or ~azure.mgmt.compute.v2018_10_01.models.CachingTypes - :param write_accelerator_enabled: Specifies whether writeAccelerator - should be enabled or disabled on the disk. - :type write_accelerator_enabled: bool - :param diff_disk_settings: Specifies the ephemeral Disk Settings for the - operating system disk used by the virtual machine. - :type diff_disk_settings: - ~azure.mgmt.compute.v2018_10_01.models.DiffDiskSettings - :param create_option: Required. Specifies how the virtual machine should - be created.

    Possible values are:

    **Attach** \\u2013 This - value is used when you are using a specialized disk to create the virtual - machine.

    **FromImage** \\u2013 This value is used when you are - using an image to create the virtual machine. If you are using a platform - image, you also use the imageReference element described above. If you are - using a marketplace image, you also use the plan element previously - described. Possible values include: 'FromImage', 'Empty', 'Attach' - :type create_option: str or - ~azure.mgmt.compute.v2018_10_01.models.DiskCreateOptionTypes - :param disk_size_gb: Specifies the size of an empty data disk in - gigabytes. This element can be used to overwrite the size of the disk in a - virtual machine image.

    This value cannot be larger than 1023 GB - :type disk_size_gb: int - :param managed_disk: The managed disk parameters. - :type managed_disk: - ~azure.mgmt.compute.v2018_10_01.models.ManagedDiskParameters - """ - - _validation = { - 'create_option': {'required': True}, - } - - _attribute_map = { - 'os_type': {'key': 'osType', 'type': 'OperatingSystemTypes'}, - 'encryption_settings': {'key': 'encryptionSettings', 'type': 'DiskEncryptionSettings'}, - 'name': {'key': 'name', 'type': 'str'}, - 'vhd': {'key': 'vhd', 'type': 'VirtualHardDisk'}, - 'image': {'key': 'image', 'type': 'VirtualHardDisk'}, - 'caching': {'key': 'caching', 'type': 'CachingTypes'}, - 'write_accelerator_enabled': {'key': 'writeAcceleratorEnabled', 'type': 'bool'}, - 'diff_disk_settings': {'key': 'diffDiskSettings', 'type': 'DiffDiskSettings'}, - 'create_option': {'key': 'createOption', 'type': 'str'}, - 'disk_size_gb': {'key': 'diskSizeGB', 'type': 'int'}, - 'managed_disk': {'key': 'managedDisk', 'type': 'ManagedDiskParameters'}, - } - - def __init__(self, *, create_option, os_type=None, encryption_settings=None, name: str=None, vhd=None, image=None, caching=None, write_accelerator_enabled: bool=None, diff_disk_settings=None, disk_size_gb: int=None, managed_disk=None, **kwargs) -> None: - super(OSDisk, self).__init__(**kwargs) - self.os_type = os_type - self.encryption_settings = encryption_settings - self.name = name - self.vhd = vhd - self.image = image - self.caching = caching - self.write_accelerator_enabled = write_accelerator_enabled - self.diff_disk_settings = diff_disk_settings - self.create_option = create_option - self.disk_size_gb = disk_size_gb - self.managed_disk = managed_disk diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/os_profile.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/os_profile.py deleted file mode 100644 index bb69067f2e62..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/os_profile.py +++ /dev/null @@ -1,106 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class OSProfile(Model): - """Specifies the operating system settings for the virtual machine. - - :param computer_name: Specifies the host OS name of the virtual machine. -

    This name cannot be updated after the VM is created.

    - **Max-length (Windows):** 15 characters

    **Max-length (Linux):** - 64 characters.

    For naming conventions and restrictions see [Azure - infrastructure services implementation - guidelines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-infrastructure-subscription-accounts-guidelines?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json#1-naming-conventions). - :type computer_name: str - :param admin_username: Specifies the name of the administrator account. -

    **Windows-only restriction:** Cannot end in "."

    - **Disallowed values:** "administrator", "admin", "user", "user1", "test", - "user2", "test1", "user3", "admin1", "1", "123", "a", "actuser", "adm", - "admin2", "aspnet", "backup", "console", "david", "guest", "john", - "owner", "root", "server", "sql", "support", "support_388945a0", "sys", - "test2", "test3", "user4", "user5".

    **Minimum-length (Linux):** 1 - character

    **Max-length (Linux):** 64 characters

    - **Max-length (Windows):** 20 characters

  • For root access to - the Linux VM, see [Using root privileges on Linux virtual machines in - Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-use-root-privileges?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json)
  • - For a list of built-in system users on Linux that should not be used in - this field, see [Selecting User Names for Linux on - Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-usernames?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json) - :type admin_username: str - :param admin_password: Specifies the password of the administrator - account.

    **Minimum-length (Windows):** 8 characters

    - **Minimum-length (Linux):** 6 characters

    **Max-length - (Windows):** 123 characters

    **Max-length (Linux):** 72 characters -

    **Complexity requirements:** 3 out of 4 conditions below need to - be fulfilled
    Has lower characters
    Has upper characters
    Has a - digit
    Has a special character (Regex match [\\W_])

    - **Disallowed values:** "abc@123", "P@$$w0rd", "P@ssw0rd", "P@ssword123", - "Pa$$word", "pass@word1", "Password!", "Password1", "Password22", - "iloveyou!"

    For resetting the password, see [How to reset the - Remote Desktop service or its login password in a Windows - VM](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-reset-rdp?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json) -

    For resetting root password, see [Manage users, SSH, and check or - repair disks on Azure Linux VMs using the VMAccess - Extension](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-using-vmaccess-extension?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json#reset-root-password) - :type admin_password: str - :param custom_data: Specifies a base-64 encoded string of custom data. The - base-64 encoded string is decoded to a binary array that is saved as a - file on the Virtual Machine. The maximum length of the binary array is - 65535 bytes.

    For using cloud-init for your VM, see [Using - cloud-init to customize a Linux VM during - creation](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-using-cloud-init?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json) - :type custom_data: str - :param windows_configuration: Specifies Windows operating system settings - on the virtual machine. - :type windows_configuration: - ~azure.mgmt.compute.v2018_10_01.models.WindowsConfiguration - :param linux_configuration: Specifies the Linux operating system settings - on the virtual machine.

    For a list of supported Linux - distributions, see [Linux on Azure-Endorsed - Distributions](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-endorsed-distros?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json) -

    For running non-endorsed distributions, see [Information for - Non-Endorsed - Distributions](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-create-upload-generic?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json). - :type linux_configuration: - ~azure.mgmt.compute.v2018_10_01.models.LinuxConfiguration - :param secrets: Specifies set of certificates that should be installed - onto the virtual machine. - :type secrets: - list[~azure.mgmt.compute.v2018_10_01.models.VaultSecretGroup] - :param allow_extension_operations: Specifies whether extension operations - should be allowed on the virtual machine.

    This may only be set to - False when no extensions are present on the virtual machine. - :type allow_extension_operations: bool - """ - - _attribute_map = { - 'computer_name': {'key': 'computerName', 'type': 'str'}, - 'admin_username': {'key': 'adminUsername', 'type': 'str'}, - 'admin_password': {'key': 'adminPassword', 'type': 'str'}, - 'custom_data': {'key': 'customData', 'type': 'str'}, - 'windows_configuration': {'key': 'windowsConfiguration', 'type': 'WindowsConfiguration'}, - 'linux_configuration': {'key': 'linuxConfiguration', 'type': 'LinuxConfiguration'}, - 'secrets': {'key': 'secrets', 'type': '[VaultSecretGroup]'}, - 'allow_extension_operations': {'key': 'allowExtensionOperations', 'type': 'bool'}, - } - - def __init__(self, **kwargs): - super(OSProfile, self).__init__(**kwargs) - self.computer_name = kwargs.get('computer_name', None) - self.admin_username = kwargs.get('admin_username', None) - self.admin_password = kwargs.get('admin_password', None) - self.custom_data = kwargs.get('custom_data', None) - self.windows_configuration = kwargs.get('windows_configuration', None) - self.linux_configuration = kwargs.get('linux_configuration', None) - self.secrets = kwargs.get('secrets', None) - self.allow_extension_operations = kwargs.get('allow_extension_operations', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/os_profile_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/os_profile_py3.py deleted file mode 100644 index af1611873f55..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/os_profile_py3.py +++ /dev/null @@ -1,106 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class OSProfile(Model): - """Specifies the operating system settings for the virtual machine. - - :param computer_name: Specifies the host OS name of the virtual machine. -

    This name cannot be updated after the VM is created.

    - **Max-length (Windows):** 15 characters

    **Max-length (Linux):** - 64 characters.

    For naming conventions and restrictions see [Azure - infrastructure services implementation - guidelines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-infrastructure-subscription-accounts-guidelines?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json#1-naming-conventions). - :type computer_name: str - :param admin_username: Specifies the name of the administrator account. -

    **Windows-only restriction:** Cannot end in "."

    - **Disallowed values:** "administrator", "admin", "user", "user1", "test", - "user2", "test1", "user3", "admin1", "1", "123", "a", "actuser", "adm", - "admin2", "aspnet", "backup", "console", "david", "guest", "john", - "owner", "root", "server", "sql", "support", "support_388945a0", "sys", - "test2", "test3", "user4", "user5".

    **Minimum-length (Linux):** 1 - character

    **Max-length (Linux):** 64 characters

    - **Max-length (Windows):** 20 characters

  • For root access to - the Linux VM, see [Using root privileges on Linux virtual machines in - Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-use-root-privileges?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json)
  • - For a list of built-in system users on Linux that should not be used in - this field, see [Selecting User Names for Linux on - Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-usernames?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json) - :type admin_username: str - :param admin_password: Specifies the password of the administrator - account.

    **Minimum-length (Windows):** 8 characters

    - **Minimum-length (Linux):** 6 characters

    **Max-length - (Windows):** 123 characters

    **Max-length (Linux):** 72 characters -

    **Complexity requirements:** 3 out of 4 conditions below need to - be fulfilled
    Has lower characters
    Has upper characters
    Has a - digit
    Has a special character (Regex match [\\W_])

    - **Disallowed values:** "abc@123", "P@$$w0rd", "P@ssw0rd", "P@ssword123", - "Pa$$word", "pass@word1", "Password!", "Password1", "Password22", - "iloveyou!"

    For resetting the password, see [How to reset the - Remote Desktop service or its login password in a Windows - VM](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-reset-rdp?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json) -

    For resetting root password, see [Manage users, SSH, and check or - repair disks on Azure Linux VMs using the VMAccess - Extension](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-using-vmaccess-extension?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json#reset-root-password) - :type admin_password: str - :param custom_data: Specifies a base-64 encoded string of custom data. The - base-64 encoded string is decoded to a binary array that is saved as a - file on the Virtual Machine. The maximum length of the binary array is - 65535 bytes.

    For using cloud-init for your VM, see [Using - cloud-init to customize a Linux VM during - creation](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-using-cloud-init?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json) - :type custom_data: str - :param windows_configuration: Specifies Windows operating system settings - on the virtual machine. - :type windows_configuration: - ~azure.mgmt.compute.v2018_10_01.models.WindowsConfiguration - :param linux_configuration: Specifies the Linux operating system settings - on the virtual machine.

    For a list of supported Linux - distributions, see [Linux on Azure-Endorsed - Distributions](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-endorsed-distros?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json) -

    For running non-endorsed distributions, see [Information for - Non-Endorsed - Distributions](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-create-upload-generic?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json). - :type linux_configuration: - ~azure.mgmt.compute.v2018_10_01.models.LinuxConfiguration - :param secrets: Specifies set of certificates that should be installed - onto the virtual machine. - :type secrets: - list[~azure.mgmt.compute.v2018_10_01.models.VaultSecretGroup] - :param allow_extension_operations: Specifies whether extension operations - should be allowed on the virtual machine.

    This may only be set to - False when no extensions are present on the virtual machine. - :type allow_extension_operations: bool - """ - - _attribute_map = { - 'computer_name': {'key': 'computerName', 'type': 'str'}, - 'admin_username': {'key': 'adminUsername', 'type': 'str'}, - 'admin_password': {'key': 'adminPassword', 'type': 'str'}, - 'custom_data': {'key': 'customData', 'type': 'str'}, - 'windows_configuration': {'key': 'windowsConfiguration', 'type': 'WindowsConfiguration'}, - 'linux_configuration': {'key': 'linuxConfiguration', 'type': 'LinuxConfiguration'}, - 'secrets': {'key': 'secrets', 'type': '[VaultSecretGroup]'}, - 'allow_extension_operations': {'key': 'allowExtensionOperations', 'type': 'bool'}, - } - - def __init__(self, *, computer_name: str=None, admin_username: str=None, admin_password: str=None, custom_data: str=None, windows_configuration=None, linux_configuration=None, secrets=None, allow_extension_operations: bool=None, **kwargs) -> None: - super(OSProfile, self).__init__(**kwargs) - self.computer_name = computer_name - self.admin_username = admin_username - self.admin_password = admin_password - self.custom_data = custom_data - self.windows_configuration = windows_configuration - self.linux_configuration = linux_configuration - self.secrets = secrets - self.allow_extension_operations = allow_extension_operations diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/plan.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/plan.py deleted file mode 100644 index d42b6b32cfac..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/plan.py +++ /dev/null @@ -1,46 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class Plan(Model): - """Specifies information about the marketplace image used to create the - virtual machine. This element is only used for marketplace images. Before - you can use a marketplace image from an API, you must enable the image for - programmatic use. In the Azure portal, find the marketplace image that you - want to use and then click **Want to deploy programmatically, Get Started - ->**. Enter any required information and then click **Save**. - - :param name: The plan ID. - :type name: str - :param publisher: The publisher ID. - :type publisher: str - :param product: Specifies the product of the image from the marketplace. - This is the same value as Offer under the imageReference element. - :type product: str - :param promotion_code: The promotion code. - :type promotion_code: str - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'publisher': {'key': 'publisher', 'type': 'str'}, - 'product': {'key': 'product', 'type': 'str'}, - 'promotion_code': {'key': 'promotionCode', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(Plan, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.publisher = kwargs.get('publisher', None) - self.product = kwargs.get('product', None) - self.promotion_code = kwargs.get('promotion_code', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/plan_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/plan_py3.py deleted file mode 100644 index 9cca2c78a123..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/plan_py3.py +++ /dev/null @@ -1,46 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class Plan(Model): - """Specifies information about the marketplace image used to create the - virtual machine. This element is only used for marketplace images. Before - you can use a marketplace image from an API, you must enable the image for - programmatic use. In the Azure portal, find the marketplace image that you - want to use and then click **Want to deploy programmatically, Get Started - ->**. Enter any required information and then click **Save**. - - :param name: The plan ID. - :type name: str - :param publisher: The publisher ID. - :type publisher: str - :param product: Specifies the product of the image from the marketplace. - This is the same value as Offer under the imageReference element. - :type product: str - :param promotion_code: The promotion code. - :type promotion_code: str - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'publisher': {'key': 'publisher', 'type': 'str'}, - 'product': {'key': 'product', 'type': 'str'}, - 'promotion_code': {'key': 'promotionCode', 'type': 'str'}, - } - - def __init__(self, *, name: str=None, publisher: str=None, product: str=None, promotion_code: str=None, **kwargs) -> None: - super(Plan, self).__init__(**kwargs) - self.name = name - self.publisher = publisher - self.product = product - self.promotion_code = promotion_code diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/proximity_placement_group.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/proximity_placement_group.py deleted file mode 100644 index 64675064aab0..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/proximity_placement_group.py +++ /dev/null @@ -1,79 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource import Resource - - -class ProximityPlacementGroup(Resource): - """Specifies information about the proximity placement group. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource Id - :vartype id: str - :ivar name: Resource name - :vartype name: str - :ivar type: Resource type - :vartype type: str - :param location: Required. Resource location - :type location: str - :param tags: Resource tags - :type tags: dict[str, str] - :param proximity_placement_group_type: Specifies the type of the proximity - placement group.

    Possible values are:

    **Standard** -

    **Ultra**. Possible values include: 'Standard', 'Ultra' - :type proximity_placement_group_type: str or - ~azure.mgmt.compute.v2018_10_01.models.ProximityPlacementGroupType - :ivar virtual_machines: A list of references to all virtual machines in - the proximity placement group. - :vartype virtual_machines: - list[~azure.mgmt.compute.v2018_10_01.models.SubResource] - :ivar virtual_machine_scale_sets: A list of references to all virtual - machine scale sets in the proximity placement group. - :vartype virtual_machine_scale_sets: - list[~azure.mgmt.compute.v2018_10_01.models.SubResource] - :ivar availability_sets: A list of references to all availability sets in - the proximity placement group. - :vartype availability_sets: - list[~azure.mgmt.compute.v2018_10_01.models.SubResource] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - 'virtual_machines': {'readonly': True}, - 'virtual_machine_scale_sets': {'readonly': True}, - 'availability_sets': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'proximity_placement_group_type': {'key': 'properties.proximityPlacementGroupType', 'type': 'str'}, - 'virtual_machines': {'key': 'properties.virtualMachines', 'type': '[SubResource]'}, - 'virtual_machine_scale_sets': {'key': 'properties.virtualMachineScaleSets', 'type': '[SubResource]'}, - 'availability_sets': {'key': 'properties.availabilitySets', 'type': '[SubResource]'}, - } - - def __init__(self, **kwargs): - super(ProximityPlacementGroup, self).__init__(**kwargs) - self.proximity_placement_group_type = kwargs.get('proximity_placement_group_type', None) - self.virtual_machines = None - self.virtual_machine_scale_sets = None - self.availability_sets = None diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/proximity_placement_group_paged.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/proximity_placement_group_paged.py deleted file mode 100644 index ddb7eba1034d..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/proximity_placement_group_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class ProximityPlacementGroupPaged(Paged): - """ - A paging container for iterating over a list of :class:`ProximityPlacementGroup ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[ProximityPlacementGroup]'} - } - - def __init__(self, *args, **kwargs): - - super(ProximityPlacementGroupPaged, self).__init__(*args, **kwargs) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/proximity_placement_group_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/proximity_placement_group_py3.py deleted file mode 100644 index 553d79816b5c..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/proximity_placement_group_py3.py +++ /dev/null @@ -1,79 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource_py3 import Resource - - -class ProximityPlacementGroup(Resource): - """Specifies information about the proximity placement group. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource Id - :vartype id: str - :ivar name: Resource name - :vartype name: str - :ivar type: Resource type - :vartype type: str - :param location: Required. Resource location - :type location: str - :param tags: Resource tags - :type tags: dict[str, str] - :param proximity_placement_group_type: Specifies the type of the proximity - placement group.

    Possible values are:

    **Standard** -

    **Ultra**. Possible values include: 'Standard', 'Ultra' - :type proximity_placement_group_type: str or - ~azure.mgmt.compute.v2018_10_01.models.ProximityPlacementGroupType - :ivar virtual_machines: A list of references to all virtual machines in - the proximity placement group. - :vartype virtual_machines: - list[~azure.mgmt.compute.v2018_10_01.models.SubResource] - :ivar virtual_machine_scale_sets: A list of references to all virtual - machine scale sets in the proximity placement group. - :vartype virtual_machine_scale_sets: - list[~azure.mgmt.compute.v2018_10_01.models.SubResource] - :ivar availability_sets: A list of references to all availability sets in - the proximity placement group. - :vartype availability_sets: - list[~azure.mgmt.compute.v2018_10_01.models.SubResource] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - 'virtual_machines': {'readonly': True}, - 'virtual_machine_scale_sets': {'readonly': True}, - 'availability_sets': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'proximity_placement_group_type': {'key': 'properties.proximityPlacementGroupType', 'type': 'str'}, - 'virtual_machines': {'key': 'properties.virtualMachines', 'type': '[SubResource]'}, - 'virtual_machine_scale_sets': {'key': 'properties.virtualMachineScaleSets', 'type': '[SubResource]'}, - 'availability_sets': {'key': 'properties.availabilitySets', 'type': '[SubResource]'}, - } - - def __init__(self, *, location: str, tags=None, proximity_placement_group_type=None, **kwargs) -> None: - super(ProximityPlacementGroup, self).__init__(location=location, tags=tags, **kwargs) - self.proximity_placement_group_type = proximity_placement_group_type - self.virtual_machines = None - self.virtual_machine_scale_sets = None - self.availability_sets = None diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/proximity_placement_group_update.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/proximity_placement_group_update.py deleted file mode 100644 index cf795d53b0c1..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/proximity_placement_group_update.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .update_resource import UpdateResource - - -class ProximityPlacementGroupUpdate(UpdateResource): - """Specifies information about the proximity placement group. - - :param tags: Resource tags - :type tags: dict[str, str] - """ - - _attribute_map = { - 'tags': {'key': 'tags', 'type': '{str}'}, - } - - def __init__(self, **kwargs): - super(ProximityPlacementGroupUpdate, self).__init__(**kwargs) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/proximity_placement_group_update_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/proximity_placement_group_update_py3.py deleted file mode 100644 index 9d60be7ba9ed..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/proximity_placement_group_update_py3.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .update_resource_py3 import UpdateResource - - -class ProximityPlacementGroupUpdate(UpdateResource): - """Specifies information about the proximity placement group. - - :param tags: Resource tags - :type tags: dict[str, str] - """ - - _attribute_map = { - 'tags': {'key': 'tags', 'type': '{str}'}, - } - - def __init__(self, *, tags=None, **kwargs) -> None: - super(ProximityPlacementGroupUpdate, self).__init__(tags=tags, **kwargs) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/purchase_plan.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/purchase_plan.py deleted file mode 100644 index 2e1509addca6..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/purchase_plan.py +++ /dev/null @@ -1,47 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class PurchasePlan(Model): - """Used for establishing the purchase context of any 3rd Party artifact - through MarketPlace. - - All required parameters must be populated in order to send to Azure. - - :param publisher: Required. The publisher ID. - :type publisher: str - :param name: Required. The plan ID. - :type name: str - :param product: Required. Specifies the product of the image from the - marketplace. This is the same value as Offer under the imageReference - element. - :type product: str - """ - - _validation = { - 'publisher': {'required': True}, - 'name': {'required': True}, - 'product': {'required': True}, - } - - _attribute_map = { - 'publisher': {'key': 'publisher', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'product': {'key': 'product', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(PurchasePlan, self).__init__(**kwargs) - self.publisher = kwargs.get('publisher', None) - self.name = kwargs.get('name', None) - self.product = kwargs.get('product', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/purchase_plan_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/purchase_plan_py3.py deleted file mode 100644 index 26f7996f1633..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/purchase_plan_py3.py +++ /dev/null @@ -1,47 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class PurchasePlan(Model): - """Used for establishing the purchase context of any 3rd Party artifact - through MarketPlace. - - All required parameters must be populated in order to send to Azure. - - :param publisher: Required. The publisher ID. - :type publisher: str - :param name: Required. The plan ID. - :type name: str - :param product: Required. Specifies the product of the image from the - marketplace. This is the same value as Offer under the imageReference - element. - :type product: str - """ - - _validation = { - 'publisher': {'required': True}, - 'name': {'required': True}, - 'product': {'required': True}, - } - - _attribute_map = { - 'publisher': {'key': 'publisher', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'product': {'key': 'product', 'type': 'str'}, - } - - def __init__(self, *, publisher: str, name: str, product: str, **kwargs) -> None: - super(PurchasePlan, self).__init__(**kwargs) - self.publisher = publisher - self.name = name - self.product = product diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/recovery_walk_response.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/recovery_walk_response.py deleted file mode 100644 index 8dcbca604c7e..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/recovery_walk_response.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class RecoveryWalkResponse(Model): - """Response after calling a manual recovery walk. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar walk_performed: Whether the recovery walk was performed - :vartype walk_performed: bool - :ivar next_platform_update_domain: The next update domain that needs to be - walked. Null means walk spanning all update domains has been completed - :vartype next_platform_update_domain: int - """ - - _validation = { - 'walk_performed': {'readonly': True}, - 'next_platform_update_domain': {'readonly': True}, - } - - _attribute_map = { - 'walk_performed': {'key': 'walkPerformed', 'type': 'bool'}, - 'next_platform_update_domain': {'key': 'nextPlatformUpdateDomain', 'type': 'int'}, - } - - def __init__(self, **kwargs): - super(RecoveryWalkResponse, self).__init__(**kwargs) - self.walk_performed = None - self.next_platform_update_domain = None diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/recovery_walk_response_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/recovery_walk_response_py3.py deleted file mode 100644 index 5b24a0ed9b7a..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/recovery_walk_response_py3.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class RecoveryWalkResponse(Model): - """Response after calling a manual recovery walk. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar walk_performed: Whether the recovery walk was performed - :vartype walk_performed: bool - :ivar next_platform_update_domain: The next update domain that needs to be - walked. Null means walk spanning all update domains has been completed - :vartype next_platform_update_domain: int - """ - - _validation = { - 'walk_performed': {'readonly': True}, - 'next_platform_update_domain': {'readonly': True}, - } - - _attribute_map = { - 'walk_performed': {'key': 'walkPerformed', 'type': 'bool'}, - 'next_platform_update_domain': {'key': 'nextPlatformUpdateDomain', 'type': 'int'}, - } - - def __init__(self, **kwargs) -> None: - super(RecoveryWalkResponse, self).__init__(**kwargs) - self.walk_performed = None - self.next_platform_update_domain = None diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/request_rate_by_interval_input.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/request_rate_by_interval_input.py deleted file mode 100644 index d94a6ade9c87..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/request_rate_by_interval_input.py +++ /dev/null @@ -1,60 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .log_analytics_input_base import LogAnalyticsInputBase - - -class RequestRateByIntervalInput(LogAnalyticsInputBase): - """Api request input for LogAnalytics getRequestRateByInterval Api. - - All required parameters must be populated in order to send to Azure. - - :param blob_container_sas_uri: Required. SAS Uri of the logging blob - container to which LogAnalytics Api writes output logs to. - :type blob_container_sas_uri: str - :param from_time: Required. From time of the query - :type from_time: datetime - :param to_time: Required. To time of the query - :type to_time: datetime - :param group_by_throttle_policy: Group query result by Throttle Policy - applied. - :type group_by_throttle_policy: bool - :param group_by_operation_name: Group query result by Operation Name. - :type group_by_operation_name: bool - :param group_by_resource_name: Group query result by Resource Name. - :type group_by_resource_name: bool - :param interval_length: Required. Interval value in minutes used to create - LogAnalytics call rate logs. Possible values include: 'ThreeMins', - 'FiveMins', 'ThirtyMins', 'SixtyMins' - :type interval_length: str or - ~azure.mgmt.compute.v2018_10_01.models.IntervalInMins - """ - - _validation = { - 'blob_container_sas_uri': {'required': True}, - 'from_time': {'required': True}, - 'to_time': {'required': True}, - 'interval_length': {'required': True}, - } - - _attribute_map = { - 'blob_container_sas_uri': {'key': 'blobContainerSasUri', 'type': 'str'}, - 'from_time': {'key': 'fromTime', 'type': 'iso-8601'}, - 'to_time': {'key': 'toTime', 'type': 'iso-8601'}, - 'group_by_throttle_policy': {'key': 'groupByThrottlePolicy', 'type': 'bool'}, - 'group_by_operation_name': {'key': 'groupByOperationName', 'type': 'bool'}, - 'group_by_resource_name': {'key': 'groupByResourceName', 'type': 'bool'}, - 'interval_length': {'key': 'intervalLength', 'type': 'IntervalInMins'}, - } - - def __init__(self, **kwargs): - super(RequestRateByIntervalInput, self).__init__(**kwargs) - self.interval_length = kwargs.get('interval_length', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/request_rate_by_interval_input_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/request_rate_by_interval_input_py3.py deleted file mode 100644 index f5e639327ead..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/request_rate_by_interval_input_py3.py +++ /dev/null @@ -1,60 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .log_analytics_input_base_py3 import LogAnalyticsInputBase - - -class RequestRateByIntervalInput(LogAnalyticsInputBase): - """Api request input for LogAnalytics getRequestRateByInterval Api. - - All required parameters must be populated in order to send to Azure. - - :param blob_container_sas_uri: Required. SAS Uri of the logging blob - container to which LogAnalytics Api writes output logs to. - :type blob_container_sas_uri: str - :param from_time: Required. From time of the query - :type from_time: datetime - :param to_time: Required. To time of the query - :type to_time: datetime - :param group_by_throttle_policy: Group query result by Throttle Policy - applied. - :type group_by_throttle_policy: bool - :param group_by_operation_name: Group query result by Operation Name. - :type group_by_operation_name: bool - :param group_by_resource_name: Group query result by Resource Name. - :type group_by_resource_name: bool - :param interval_length: Required. Interval value in minutes used to create - LogAnalytics call rate logs. Possible values include: 'ThreeMins', - 'FiveMins', 'ThirtyMins', 'SixtyMins' - :type interval_length: str or - ~azure.mgmt.compute.v2018_10_01.models.IntervalInMins - """ - - _validation = { - 'blob_container_sas_uri': {'required': True}, - 'from_time': {'required': True}, - 'to_time': {'required': True}, - 'interval_length': {'required': True}, - } - - _attribute_map = { - 'blob_container_sas_uri': {'key': 'blobContainerSasUri', 'type': 'str'}, - 'from_time': {'key': 'fromTime', 'type': 'iso-8601'}, - 'to_time': {'key': 'toTime', 'type': 'iso-8601'}, - 'group_by_throttle_policy': {'key': 'groupByThrottlePolicy', 'type': 'bool'}, - 'group_by_operation_name': {'key': 'groupByOperationName', 'type': 'bool'}, - 'group_by_resource_name': {'key': 'groupByResourceName', 'type': 'bool'}, - 'interval_length': {'key': 'intervalLength', 'type': 'IntervalInMins'}, - } - - def __init__(self, *, blob_container_sas_uri: str, from_time, to_time, interval_length, group_by_throttle_policy: bool=None, group_by_operation_name: bool=None, group_by_resource_name: bool=None, **kwargs) -> None: - super(RequestRateByIntervalInput, self).__init__(blob_container_sas_uri=blob_container_sas_uri, from_time=from_time, to_time=to_time, group_by_throttle_policy=group_by_throttle_policy, group_by_operation_name=group_by_operation_name, group_by_resource_name=group_by_resource_name, **kwargs) - self.interval_length = interval_length diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/resource.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/resource.py deleted file mode 100644 index 5dd7d481c685..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/resource.py +++ /dev/null @@ -1,56 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class Resource(Model): - """The Resource model definition. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource Id - :vartype id: str - :ivar name: Resource name - :vartype name: str - :ivar type: Resource type - :vartype type: str - :param location: Required. Resource location - :type location: str - :param tags: Resource tags - :type tags: dict[str, str] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - } - - def __init__(self, **kwargs): - super(Resource, self).__init__(**kwargs) - self.id = None - self.name = None - self.type = None - self.location = kwargs.get('location', None) - self.tags = kwargs.get('tags', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/resource_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/resource_py3.py deleted file mode 100644 index 2f3702caf609..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/resource_py3.py +++ /dev/null @@ -1,56 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class Resource(Model): - """The Resource model definition. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource Id - :vartype id: str - :ivar name: Resource name - :vartype name: str - :ivar type: Resource type - :vartype type: str - :param location: Required. Resource location - :type location: str - :param tags: Resource tags - :type tags: dict[str, str] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - } - - def __init__(self, *, location: str, tags=None, **kwargs) -> None: - super(Resource, self).__init__(**kwargs) - self.id = None - self.name = None - self.type = None - self.location = location - self.tags = tags diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/rollback_status_info.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/rollback_status_info.py deleted file mode 100644 index eeb450eb3c45..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/rollback_status_info.py +++ /dev/null @@ -1,48 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class RollbackStatusInfo(Model): - """Information about rollback on failed VM instances after a OS Upgrade - operation. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar successfully_rolledback_instance_count: The number of instances - which have been successfully rolled back. - :vartype successfully_rolledback_instance_count: int - :ivar failed_rolledback_instance_count: The number of instances which - failed to rollback. - :vartype failed_rolledback_instance_count: int - :ivar rollback_error: Error details if OS rollback failed. - :vartype rollback_error: ~azure.mgmt.compute.v2018_10_01.models.ApiError - """ - - _validation = { - 'successfully_rolledback_instance_count': {'readonly': True}, - 'failed_rolledback_instance_count': {'readonly': True}, - 'rollback_error': {'readonly': True}, - } - - _attribute_map = { - 'successfully_rolledback_instance_count': {'key': 'successfullyRolledbackInstanceCount', 'type': 'int'}, - 'failed_rolledback_instance_count': {'key': 'failedRolledbackInstanceCount', 'type': 'int'}, - 'rollback_error': {'key': 'rollbackError', 'type': 'ApiError'}, - } - - def __init__(self, **kwargs): - super(RollbackStatusInfo, self).__init__(**kwargs) - self.successfully_rolledback_instance_count = None - self.failed_rolledback_instance_count = None - self.rollback_error = None diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/rollback_status_info_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/rollback_status_info_py3.py deleted file mode 100644 index df2ff74aec66..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/rollback_status_info_py3.py +++ /dev/null @@ -1,48 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class RollbackStatusInfo(Model): - """Information about rollback on failed VM instances after a OS Upgrade - operation. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar successfully_rolledback_instance_count: The number of instances - which have been successfully rolled back. - :vartype successfully_rolledback_instance_count: int - :ivar failed_rolledback_instance_count: The number of instances which - failed to rollback. - :vartype failed_rolledback_instance_count: int - :ivar rollback_error: Error details if OS rollback failed. - :vartype rollback_error: ~azure.mgmt.compute.v2018_10_01.models.ApiError - """ - - _validation = { - 'successfully_rolledback_instance_count': {'readonly': True}, - 'failed_rolledback_instance_count': {'readonly': True}, - 'rollback_error': {'readonly': True}, - } - - _attribute_map = { - 'successfully_rolledback_instance_count': {'key': 'successfullyRolledbackInstanceCount', 'type': 'int'}, - 'failed_rolledback_instance_count': {'key': 'failedRolledbackInstanceCount', 'type': 'int'}, - 'rollback_error': {'key': 'rollbackError', 'type': 'ApiError'}, - } - - def __init__(self, **kwargs) -> None: - super(RollbackStatusInfo, self).__init__(**kwargs) - self.successfully_rolledback_instance_count = None - self.failed_rolledback_instance_count = None - self.rollback_error = None diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/rolling_upgrade_policy.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/rolling_upgrade_policy.py deleted file mode 100644 index 1eecaa5e2e65..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/rolling_upgrade_policy.py +++ /dev/null @@ -1,63 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class RollingUpgradePolicy(Model): - """The configuration parameters used while performing a rolling upgrade. - - :param max_batch_instance_percent: The maximum percent of total virtual - machine instances that will be upgraded simultaneously by the rolling - upgrade in one batch. As this is a maximum, unhealthy instances in - previous or future batches can cause the percentage of instances in a - batch to decrease to ensure higher reliability. The default value for this - parameter is 20%. - :type max_batch_instance_percent: int - :param max_unhealthy_instance_percent: The maximum percentage of the total - virtual machine instances in the scale set that can be simultaneously - unhealthy, either as a result of being upgraded, or by being found in an - unhealthy state by the virtual machine health checks before the rolling - upgrade aborts. This constraint will be checked prior to starting any - batch. The default value for this parameter is 20%. - :type max_unhealthy_instance_percent: int - :param max_unhealthy_upgraded_instance_percent: The maximum percentage of - upgraded virtual machine instances that can be found to be in an unhealthy - state. This check will happen after each batch is upgraded. If this - percentage is ever exceeded, the rolling update aborts. The default value - for this parameter is 20%. - :type max_unhealthy_upgraded_instance_percent: int - :param pause_time_between_batches: The wait time between completing the - update for all virtual machines in one batch and starting the next batch. - The time duration should be specified in ISO 8601 format. The default - value is 0 seconds (PT0S). - :type pause_time_between_batches: str - """ - - _validation = { - 'max_batch_instance_percent': {'maximum': 100, 'minimum': 5}, - 'max_unhealthy_instance_percent': {'maximum': 100, 'minimum': 5}, - 'max_unhealthy_upgraded_instance_percent': {'maximum': 100, 'minimum': 0}, - } - - _attribute_map = { - 'max_batch_instance_percent': {'key': 'maxBatchInstancePercent', 'type': 'int'}, - 'max_unhealthy_instance_percent': {'key': 'maxUnhealthyInstancePercent', 'type': 'int'}, - 'max_unhealthy_upgraded_instance_percent': {'key': 'maxUnhealthyUpgradedInstancePercent', 'type': 'int'}, - 'pause_time_between_batches': {'key': 'pauseTimeBetweenBatches', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(RollingUpgradePolicy, self).__init__(**kwargs) - self.max_batch_instance_percent = kwargs.get('max_batch_instance_percent', None) - self.max_unhealthy_instance_percent = kwargs.get('max_unhealthy_instance_percent', None) - self.max_unhealthy_upgraded_instance_percent = kwargs.get('max_unhealthy_upgraded_instance_percent', None) - self.pause_time_between_batches = kwargs.get('pause_time_between_batches', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/rolling_upgrade_policy_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/rolling_upgrade_policy_py3.py deleted file mode 100644 index e698a382f112..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/rolling_upgrade_policy_py3.py +++ /dev/null @@ -1,63 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class RollingUpgradePolicy(Model): - """The configuration parameters used while performing a rolling upgrade. - - :param max_batch_instance_percent: The maximum percent of total virtual - machine instances that will be upgraded simultaneously by the rolling - upgrade in one batch. As this is a maximum, unhealthy instances in - previous or future batches can cause the percentage of instances in a - batch to decrease to ensure higher reliability. The default value for this - parameter is 20%. - :type max_batch_instance_percent: int - :param max_unhealthy_instance_percent: The maximum percentage of the total - virtual machine instances in the scale set that can be simultaneously - unhealthy, either as a result of being upgraded, or by being found in an - unhealthy state by the virtual machine health checks before the rolling - upgrade aborts. This constraint will be checked prior to starting any - batch. The default value for this parameter is 20%. - :type max_unhealthy_instance_percent: int - :param max_unhealthy_upgraded_instance_percent: The maximum percentage of - upgraded virtual machine instances that can be found to be in an unhealthy - state. This check will happen after each batch is upgraded. If this - percentage is ever exceeded, the rolling update aborts. The default value - for this parameter is 20%. - :type max_unhealthy_upgraded_instance_percent: int - :param pause_time_between_batches: The wait time between completing the - update for all virtual machines in one batch and starting the next batch. - The time duration should be specified in ISO 8601 format. The default - value is 0 seconds (PT0S). - :type pause_time_between_batches: str - """ - - _validation = { - 'max_batch_instance_percent': {'maximum': 100, 'minimum': 5}, - 'max_unhealthy_instance_percent': {'maximum': 100, 'minimum': 5}, - 'max_unhealthy_upgraded_instance_percent': {'maximum': 100, 'minimum': 0}, - } - - _attribute_map = { - 'max_batch_instance_percent': {'key': 'maxBatchInstancePercent', 'type': 'int'}, - 'max_unhealthy_instance_percent': {'key': 'maxUnhealthyInstancePercent', 'type': 'int'}, - 'max_unhealthy_upgraded_instance_percent': {'key': 'maxUnhealthyUpgradedInstancePercent', 'type': 'int'}, - 'pause_time_between_batches': {'key': 'pauseTimeBetweenBatches', 'type': 'str'}, - } - - def __init__(self, *, max_batch_instance_percent: int=None, max_unhealthy_instance_percent: int=None, max_unhealthy_upgraded_instance_percent: int=None, pause_time_between_batches: str=None, **kwargs) -> None: - super(RollingUpgradePolicy, self).__init__(**kwargs) - self.max_batch_instance_percent = max_batch_instance_percent - self.max_unhealthy_instance_percent = max_unhealthy_instance_percent - self.max_unhealthy_upgraded_instance_percent = max_unhealthy_upgraded_instance_percent - self.pause_time_between_batches = pause_time_between_batches diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/rolling_upgrade_progress_info.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/rolling_upgrade_progress_info.py deleted file mode 100644 index 87e40590e275..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/rolling_upgrade_progress_info.py +++ /dev/null @@ -1,55 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class RollingUpgradeProgressInfo(Model): - """Information about the number of virtual machine instances in each upgrade - state. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar successful_instance_count: The number of instances that have been - successfully upgraded. - :vartype successful_instance_count: int - :ivar failed_instance_count: The number of instances that have failed to - be upgraded successfully. - :vartype failed_instance_count: int - :ivar in_progress_instance_count: The number of instances that are - currently being upgraded. - :vartype in_progress_instance_count: int - :ivar pending_instance_count: The number of instances that have not yet - begun to be upgraded. - :vartype pending_instance_count: int - """ - - _validation = { - 'successful_instance_count': {'readonly': True}, - 'failed_instance_count': {'readonly': True}, - 'in_progress_instance_count': {'readonly': True}, - 'pending_instance_count': {'readonly': True}, - } - - _attribute_map = { - 'successful_instance_count': {'key': 'successfulInstanceCount', 'type': 'int'}, - 'failed_instance_count': {'key': 'failedInstanceCount', 'type': 'int'}, - 'in_progress_instance_count': {'key': 'inProgressInstanceCount', 'type': 'int'}, - 'pending_instance_count': {'key': 'pendingInstanceCount', 'type': 'int'}, - } - - def __init__(self, **kwargs): - super(RollingUpgradeProgressInfo, self).__init__(**kwargs) - self.successful_instance_count = None - self.failed_instance_count = None - self.in_progress_instance_count = None - self.pending_instance_count = None diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/rolling_upgrade_progress_info_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/rolling_upgrade_progress_info_py3.py deleted file mode 100644 index 060abc3063b4..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/rolling_upgrade_progress_info_py3.py +++ /dev/null @@ -1,55 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class RollingUpgradeProgressInfo(Model): - """Information about the number of virtual machine instances in each upgrade - state. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar successful_instance_count: The number of instances that have been - successfully upgraded. - :vartype successful_instance_count: int - :ivar failed_instance_count: The number of instances that have failed to - be upgraded successfully. - :vartype failed_instance_count: int - :ivar in_progress_instance_count: The number of instances that are - currently being upgraded. - :vartype in_progress_instance_count: int - :ivar pending_instance_count: The number of instances that have not yet - begun to be upgraded. - :vartype pending_instance_count: int - """ - - _validation = { - 'successful_instance_count': {'readonly': True}, - 'failed_instance_count': {'readonly': True}, - 'in_progress_instance_count': {'readonly': True}, - 'pending_instance_count': {'readonly': True}, - } - - _attribute_map = { - 'successful_instance_count': {'key': 'successfulInstanceCount', 'type': 'int'}, - 'failed_instance_count': {'key': 'failedInstanceCount', 'type': 'int'}, - 'in_progress_instance_count': {'key': 'inProgressInstanceCount', 'type': 'int'}, - 'pending_instance_count': {'key': 'pendingInstanceCount', 'type': 'int'}, - } - - def __init__(self, **kwargs) -> None: - super(RollingUpgradeProgressInfo, self).__init__(**kwargs) - self.successful_instance_count = None - self.failed_instance_count = None - self.in_progress_instance_count = None - self.pending_instance_count = None diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/rolling_upgrade_running_status.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/rolling_upgrade_running_status.py deleted file mode 100644 index 3421e9bad3f5..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/rolling_upgrade_running_status.py +++ /dev/null @@ -1,54 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class RollingUpgradeRunningStatus(Model): - """Information about the current running state of the overall upgrade. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar code: Code indicating the current status of the upgrade. Possible - values include: 'RollingForward', 'Cancelled', 'Completed', 'Faulted' - :vartype code: str or - ~azure.mgmt.compute.v2018_10_01.models.RollingUpgradeStatusCode - :ivar start_time: Start time of the upgrade. - :vartype start_time: datetime - :ivar last_action: The last action performed on the rolling upgrade. - Possible values include: 'Start', 'Cancel' - :vartype last_action: str or - ~azure.mgmt.compute.v2018_10_01.models.RollingUpgradeActionType - :ivar last_action_time: Last action time of the upgrade. - :vartype last_action_time: datetime - """ - - _validation = { - 'code': {'readonly': True}, - 'start_time': {'readonly': True}, - 'last_action': {'readonly': True}, - 'last_action_time': {'readonly': True}, - } - - _attribute_map = { - 'code': {'key': 'code', 'type': 'RollingUpgradeStatusCode'}, - 'start_time': {'key': 'startTime', 'type': 'iso-8601'}, - 'last_action': {'key': 'lastAction', 'type': 'RollingUpgradeActionType'}, - 'last_action_time': {'key': 'lastActionTime', 'type': 'iso-8601'}, - } - - def __init__(self, **kwargs): - super(RollingUpgradeRunningStatus, self).__init__(**kwargs) - self.code = None - self.start_time = None - self.last_action = None - self.last_action_time = None diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/rolling_upgrade_running_status_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/rolling_upgrade_running_status_py3.py deleted file mode 100644 index 20fad17e69e8..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/rolling_upgrade_running_status_py3.py +++ /dev/null @@ -1,54 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class RollingUpgradeRunningStatus(Model): - """Information about the current running state of the overall upgrade. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar code: Code indicating the current status of the upgrade. Possible - values include: 'RollingForward', 'Cancelled', 'Completed', 'Faulted' - :vartype code: str or - ~azure.mgmt.compute.v2018_10_01.models.RollingUpgradeStatusCode - :ivar start_time: Start time of the upgrade. - :vartype start_time: datetime - :ivar last_action: The last action performed on the rolling upgrade. - Possible values include: 'Start', 'Cancel' - :vartype last_action: str or - ~azure.mgmt.compute.v2018_10_01.models.RollingUpgradeActionType - :ivar last_action_time: Last action time of the upgrade. - :vartype last_action_time: datetime - """ - - _validation = { - 'code': {'readonly': True}, - 'start_time': {'readonly': True}, - 'last_action': {'readonly': True}, - 'last_action_time': {'readonly': True}, - } - - _attribute_map = { - 'code': {'key': 'code', 'type': 'RollingUpgradeStatusCode'}, - 'start_time': {'key': 'startTime', 'type': 'iso-8601'}, - 'last_action': {'key': 'lastAction', 'type': 'RollingUpgradeActionType'}, - 'last_action_time': {'key': 'lastActionTime', 'type': 'iso-8601'}, - } - - def __init__(self, **kwargs) -> None: - super(RollingUpgradeRunningStatus, self).__init__(**kwargs) - self.code = None - self.start_time = None - self.last_action = None - self.last_action_time = None diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/rolling_upgrade_status_info.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/rolling_upgrade_status_info.py deleted file mode 100644 index e4f4c08df0a7..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/rolling_upgrade_status_info.py +++ /dev/null @@ -1,76 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource import Resource - - -class RollingUpgradeStatusInfo(Resource): - """The status of the latest virtual machine scale set rolling upgrade. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource Id - :vartype id: str - :ivar name: Resource name - :vartype name: str - :ivar type: Resource type - :vartype type: str - :param location: Required. Resource location - :type location: str - :param tags: Resource tags - :type tags: dict[str, str] - :ivar policy: The rolling upgrade policies applied for this upgrade. - :vartype policy: - ~azure.mgmt.compute.v2018_10_01.models.RollingUpgradePolicy - :ivar running_status: Information about the current running state of the - overall upgrade. - :vartype running_status: - ~azure.mgmt.compute.v2018_10_01.models.RollingUpgradeRunningStatus - :ivar progress: Information about the number of virtual machine instances - in each upgrade state. - :vartype progress: - ~azure.mgmt.compute.v2018_10_01.models.RollingUpgradeProgressInfo - :ivar error: Error details for this upgrade, if there are any. - :vartype error: ~azure.mgmt.compute.v2018_10_01.models.ApiError - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - 'policy': {'readonly': True}, - 'running_status': {'readonly': True}, - 'progress': {'readonly': True}, - 'error': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'policy': {'key': 'properties.policy', 'type': 'RollingUpgradePolicy'}, - 'running_status': {'key': 'properties.runningStatus', 'type': 'RollingUpgradeRunningStatus'}, - 'progress': {'key': 'properties.progress', 'type': 'RollingUpgradeProgressInfo'}, - 'error': {'key': 'properties.error', 'type': 'ApiError'}, - } - - def __init__(self, **kwargs): - super(RollingUpgradeStatusInfo, self).__init__(**kwargs) - self.policy = None - self.running_status = None - self.progress = None - self.error = None diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/rolling_upgrade_status_info_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/rolling_upgrade_status_info_py3.py deleted file mode 100644 index 3ef830980bd0..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/rolling_upgrade_status_info_py3.py +++ /dev/null @@ -1,76 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource_py3 import Resource - - -class RollingUpgradeStatusInfo(Resource): - """The status of the latest virtual machine scale set rolling upgrade. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource Id - :vartype id: str - :ivar name: Resource name - :vartype name: str - :ivar type: Resource type - :vartype type: str - :param location: Required. Resource location - :type location: str - :param tags: Resource tags - :type tags: dict[str, str] - :ivar policy: The rolling upgrade policies applied for this upgrade. - :vartype policy: - ~azure.mgmt.compute.v2018_10_01.models.RollingUpgradePolicy - :ivar running_status: Information about the current running state of the - overall upgrade. - :vartype running_status: - ~azure.mgmt.compute.v2018_10_01.models.RollingUpgradeRunningStatus - :ivar progress: Information about the number of virtual machine instances - in each upgrade state. - :vartype progress: - ~azure.mgmt.compute.v2018_10_01.models.RollingUpgradeProgressInfo - :ivar error: Error details for this upgrade, if there are any. - :vartype error: ~azure.mgmt.compute.v2018_10_01.models.ApiError - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - 'policy': {'readonly': True}, - 'running_status': {'readonly': True}, - 'progress': {'readonly': True}, - 'error': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'policy': {'key': 'properties.policy', 'type': 'RollingUpgradePolicy'}, - 'running_status': {'key': 'properties.runningStatus', 'type': 'RollingUpgradeRunningStatus'}, - 'progress': {'key': 'properties.progress', 'type': 'RollingUpgradeProgressInfo'}, - 'error': {'key': 'properties.error', 'type': 'ApiError'}, - } - - def __init__(self, *, location: str, tags=None, **kwargs) -> None: - super(RollingUpgradeStatusInfo, self).__init__(location=location, tags=tags, **kwargs) - self.policy = None - self.running_status = None - self.progress = None - self.error = None diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/run_command_document.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/run_command_document.py deleted file mode 100644 index 9acf4c9f1065..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/run_command_document.py +++ /dev/null @@ -1,61 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .run_command_document_base import RunCommandDocumentBase - - -class RunCommandDocument(RunCommandDocumentBase): - """Describes the properties of a Run Command. - - All required parameters must be populated in order to send to Azure. - - :param schema: Required. The VM run command schema. - :type schema: str - :param id: Required. The VM run command id. - :type id: str - :param os_type: Required. The Operating System type. Possible values - include: 'Windows', 'Linux' - :type os_type: str or - ~azure.mgmt.compute.v2018_10_01.models.OperatingSystemTypes - :param label: Required. The VM run command label. - :type label: str - :param description: Required. The VM run command description. - :type description: str - :param script: Required. The script to be executed. - :type script: list[str] - :param parameters: The parameters used by the script. - :type parameters: - list[~azure.mgmt.compute.v2018_10_01.models.RunCommandParameterDefinition] - """ - - _validation = { - 'schema': {'required': True}, - 'id': {'required': True}, - 'os_type': {'required': True}, - 'label': {'required': True}, - 'description': {'required': True}, - 'script': {'required': True}, - } - - _attribute_map = { - 'schema': {'key': '$schema', 'type': 'str'}, - 'id': {'key': 'id', 'type': 'str'}, - 'os_type': {'key': 'osType', 'type': 'OperatingSystemTypes'}, - 'label': {'key': 'label', 'type': 'str'}, - 'description': {'key': 'description', 'type': 'str'}, - 'script': {'key': 'script', 'type': '[str]'}, - 'parameters': {'key': 'parameters', 'type': '[RunCommandParameterDefinition]'}, - } - - def __init__(self, **kwargs): - super(RunCommandDocument, self).__init__(**kwargs) - self.script = kwargs.get('script', None) - self.parameters = kwargs.get('parameters', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/run_command_document_base.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/run_command_document_base.py deleted file mode 100644 index 10850d805bdb..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/run_command_document_base.py +++ /dev/null @@ -1,56 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class RunCommandDocumentBase(Model): - """Describes the properties of a Run Command metadata. - - All required parameters must be populated in order to send to Azure. - - :param schema: Required. The VM run command schema. - :type schema: str - :param id: Required. The VM run command id. - :type id: str - :param os_type: Required. The Operating System type. Possible values - include: 'Windows', 'Linux' - :type os_type: str or - ~azure.mgmt.compute.v2018_10_01.models.OperatingSystemTypes - :param label: Required. The VM run command label. - :type label: str - :param description: Required. The VM run command description. - :type description: str - """ - - _validation = { - 'schema': {'required': True}, - 'id': {'required': True}, - 'os_type': {'required': True}, - 'label': {'required': True}, - 'description': {'required': True}, - } - - _attribute_map = { - 'schema': {'key': '$schema', 'type': 'str'}, - 'id': {'key': 'id', 'type': 'str'}, - 'os_type': {'key': 'osType', 'type': 'OperatingSystemTypes'}, - 'label': {'key': 'label', 'type': 'str'}, - 'description': {'key': 'description', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(RunCommandDocumentBase, self).__init__(**kwargs) - self.schema = kwargs.get('schema', None) - self.id = kwargs.get('id', None) - self.os_type = kwargs.get('os_type', None) - self.label = kwargs.get('label', None) - self.description = kwargs.get('description', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/run_command_document_base_paged.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/run_command_document_base_paged.py deleted file mode 100644 index e7326920a725..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/run_command_document_base_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class RunCommandDocumentBasePaged(Paged): - """ - A paging container for iterating over a list of :class:`RunCommandDocumentBase ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[RunCommandDocumentBase]'} - } - - def __init__(self, *args, **kwargs): - - super(RunCommandDocumentBasePaged, self).__init__(*args, **kwargs) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/run_command_document_base_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/run_command_document_base_py3.py deleted file mode 100644 index 5ebfc4b1047d..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/run_command_document_base_py3.py +++ /dev/null @@ -1,56 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class RunCommandDocumentBase(Model): - """Describes the properties of a Run Command metadata. - - All required parameters must be populated in order to send to Azure. - - :param schema: Required. The VM run command schema. - :type schema: str - :param id: Required. The VM run command id. - :type id: str - :param os_type: Required. The Operating System type. Possible values - include: 'Windows', 'Linux' - :type os_type: str or - ~azure.mgmt.compute.v2018_10_01.models.OperatingSystemTypes - :param label: Required. The VM run command label. - :type label: str - :param description: Required. The VM run command description. - :type description: str - """ - - _validation = { - 'schema': {'required': True}, - 'id': {'required': True}, - 'os_type': {'required': True}, - 'label': {'required': True}, - 'description': {'required': True}, - } - - _attribute_map = { - 'schema': {'key': '$schema', 'type': 'str'}, - 'id': {'key': 'id', 'type': 'str'}, - 'os_type': {'key': 'osType', 'type': 'OperatingSystemTypes'}, - 'label': {'key': 'label', 'type': 'str'}, - 'description': {'key': 'description', 'type': 'str'}, - } - - def __init__(self, *, schema: str, id: str, os_type, label: str, description: str, **kwargs) -> None: - super(RunCommandDocumentBase, self).__init__(**kwargs) - self.schema = schema - self.id = id - self.os_type = os_type - self.label = label - self.description = description diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/run_command_document_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/run_command_document_py3.py deleted file mode 100644 index 542fe68b0822..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/run_command_document_py3.py +++ /dev/null @@ -1,61 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .run_command_document_base_py3 import RunCommandDocumentBase - - -class RunCommandDocument(RunCommandDocumentBase): - """Describes the properties of a Run Command. - - All required parameters must be populated in order to send to Azure. - - :param schema: Required. The VM run command schema. - :type schema: str - :param id: Required. The VM run command id. - :type id: str - :param os_type: Required. The Operating System type. Possible values - include: 'Windows', 'Linux' - :type os_type: str or - ~azure.mgmt.compute.v2018_10_01.models.OperatingSystemTypes - :param label: Required. The VM run command label. - :type label: str - :param description: Required. The VM run command description. - :type description: str - :param script: Required. The script to be executed. - :type script: list[str] - :param parameters: The parameters used by the script. - :type parameters: - list[~azure.mgmt.compute.v2018_10_01.models.RunCommandParameterDefinition] - """ - - _validation = { - 'schema': {'required': True}, - 'id': {'required': True}, - 'os_type': {'required': True}, - 'label': {'required': True}, - 'description': {'required': True}, - 'script': {'required': True}, - } - - _attribute_map = { - 'schema': {'key': '$schema', 'type': 'str'}, - 'id': {'key': 'id', 'type': 'str'}, - 'os_type': {'key': 'osType', 'type': 'OperatingSystemTypes'}, - 'label': {'key': 'label', 'type': 'str'}, - 'description': {'key': 'description', 'type': 'str'}, - 'script': {'key': 'script', 'type': '[str]'}, - 'parameters': {'key': 'parameters', 'type': '[RunCommandParameterDefinition]'}, - } - - def __init__(self, *, schema: str, id: str, os_type, label: str, description: str, script, parameters=None, **kwargs) -> None: - super(RunCommandDocument, self).__init__(schema=schema, id=id, os_type=os_type, label=label, description=description, **kwargs) - self.script = script - self.parameters = parameters diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/run_command_input.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/run_command_input.py deleted file mode 100644 index 046e30e1c051..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/run_command_input.py +++ /dev/null @@ -1,44 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class RunCommandInput(Model): - """Capture Virtual Machine parameters. - - All required parameters must be populated in order to send to Azure. - - :param command_id: Required. The run command id. - :type command_id: str - :param script: Optional. The script to be executed. When this value is - given, the given script will override the default script of the command. - :type script: list[str] - :param parameters: The run command parameters. - :type parameters: - list[~azure.mgmt.compute.v2018_10_01.models.RunCommandInputParameter] - """ - - _validation = { - 'command_id': {'required': True}, - } - - _attribute_map = { - 'command_id': {'key': 'commandId', 'type': 'str'}, - 'script': {'key': 'script', 'type': '[str]'}, - 'parameters': {'key': 'parameters', 'type': '[RunCommandInputParameter]'}, - } - - def __init__(self, **kwargs): - super(RunCommandInput, self).__init__(**kwargs) - self.command_id = kwargs.get('command_id', None) - self.script = kwargs.get('script', None) - self.parameters = kwargs.get('parameters', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/run_command_input_parameter.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/run_command_input_parameter.py deleted file mode 100644 index cd76ad81bfa2..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/run_command_input_parameter.py +++ /dev/null @@ -1,39 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class RunCommandInputParameter(Model): - """Describes the properties of a run command parameter. - - All required parameters must be populated in order to send to Azure. - - :param name: Required. The run command parameter name. - :type name: str - :param value: Required. The run command parameter value. - :type value: str - """ - - _validation = { - 'name': {'required': True}, - 'value': {'required': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'value': {'key': 'value', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(RunCommandInputParameter, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.value = kwargs.get('value', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/run_command_input_parameter_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/run_command_input_parameter_py3.py deleted file mode 100644 index 6013f038a1c3..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/run_command_input_parameter_py3.py +++ /dev/null @@ -1,39 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class RunCommandInputParameter(Model): - """Describes the properties of a run command parameter. - - All required parameters must be populated in order to send to Azure. - - :param name: Required. The run command parameter name. - :type name: str - :param value: Required. The run command parameter value. - :type value: str - """ - - _validation = { - 'name': {'required': True}, - 'value': {'required': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'value': {'key': 'value', 'type': 'str'}, - } - - def __init__(self, *, name: str, value: str, **kwargs) -> None: - super(RunCommandInputParameter, self).__init__(**kwargs) - self.name = name - self.value = value diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/run_command_input_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/run_command_input_py3.py deleted file mode 100644 index 6de9afe96dab..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/run_command_input_py3.py +++ /dev/null @@ -1,44 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class RunCommandInput(Model): - """Capture Virtual Machine parameters. - - All required parameters must be populated in order to send to Azure. - - :param command_id: Required. The run command id. - :type command_id: str - :param script: Optional. The script to be executed. When this value is - given, the given script will override the default script of the command. - :type script: list[str] - :param parameters: The run command parameters. - :type parameters: - list[~azure.mgmt.compute.v2018_10_01.models.RunCommandInputParameter] - """ - - _validation = { - 'command_id': {'required': True}, - } - - _attribute_map = { - 'command_id': {'key': 'commandId', 'type': 'str'}, - 'script': {'key': 'script', 'type': '[str]'}, - 'parameters': {'key': 'parameters', 'type': '[RunCommandInputParameter]'}, - } - - def __init__(self, *, command_id: str, script=None, parameters=None, **kwargs) -> None: - super(RunCommandInput, self).__init__(**kwargs) - self.command_id = command_id - self.script = script - self.parameters = parameters diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/run_command_parameter_definition.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/run_command_parameter_definition.py deleted file mode 100644 index e09f774d8241..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/run_command_parameter_definition.py +++ /dev/null @@ -1,48 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class RunCommandParameterDefinition(Model): - """Describes the properties of a run command parameter. - - All required parameters must be populated in order to send to Azure. - - :param name: Required. The run command parameter name. - :type name: str - :param type: Required. The run command parameter type. - :type type: str - :param default_value: The run command parameter default value. - :type default_value: str - :param required: The run command parameter required. Default value: False - . - :type required: bool - """ - - _validation = { - 'name': {'required': True}, - 'type': {'required': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'default_value': {'key': 'defaultValue', 'type': 'str'}, - 'required': {'key': 'required', 'type': 'bool'}, - } - - def __init__(self, **kwargs): - super(RunCommandParameterDefinition, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.type = kwargs.get('type', None) - self.default_value = kwargs.get('default_value', None) - self.required = kwargs.get('required', False) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/run_command_parameter_definition_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/run_command_parameter_definition_py3.py deleted file mode 100644 index e5fbc708f965..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/run_command_parameter_definition_py3.py +++ /dev/null @@ -1,48 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class RunCommandParameterDefinition(Model): - """Describes the properties of a run command parameter. - - All required parameters must be populated in order to send to Azure. - - :param name: Required. The run command parameter name. - :type name: str - :param type: Required. The run command parameter type. - :type type: str - :param default_value: The run command parameter default value. - :type default_value: str - :param required: The run command parameter required. Default value: False - . - :type required: bool - """ - - _validation = { - 'name': {'required': True}, - 'type': {'required': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'default_value': {'key': 'defaultValue', 'type': 'str'}, - 'required': {'key': 'required', 'type': 'bool'}, - } - - def __init__(self, *, name: str, type: str, default_value: str=None, required: bool=False, **kwargs) -> None: - super(RunCommandParameterDefinition, self).__init__(**kwargs) - self.name = name - self.type = type - self.default_value = default_value - self.required = required diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/run_command_result.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/run_command_result.py deleted file mode 100644 index 7fe68e1ee376..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/run_command_result.py +++ /dev/null @@ -1,29 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class RunCommandResult(Model): - """RunCommandResult. - - :param value: Run command operation response. - :type value: - list[~azure.mgmt.compute.v2018_10_01.models.InstanceViewStatus] - """ - - _attribute_map = { - 'value': {'key': 'value', 'type': '[InstanceViewStatus]'}, - } - - def __init__(self, **kwargs): - super(RunCommandResult, self).__init__(**kwargs) - self.value = kwargs.get('value', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/run_command_result_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/run_command_result_py3.py deleted file mode 100644 index 4bf16cadc70e..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/run_command_result_py3.py +++ /dev/null @@ -1,29 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class RunCommandResult(Model): - """RunCommandResult. - - :param value: Run command operation response. - :type value: - list[~azure.mgmt.compute.v2018_10_01.models.InstanceViewStatus] - """ - - _attribute_map = { - 'value': {'key': 'value', 'type': '[InstanceViewStatus]'}, - } - - def __init__(self, *, value=None, **kwargs) -> None: - super(RunCommandResult, self).__init__(**kwargs) - self.value = value diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/sku.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/sku.py deleted file mode 100644 index 5c07709435e0..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/sku.py +++ /dev/null @@ -1,38 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class Sku(Model): - """Describes a virtual machine scale set sku. - - :param name: The sku name. - :type name: str - :param tier: Specifies the tier of virtual machines in a scale set.

    Possible Values:

    **Standard**

    **Basic** - :type tier: str - :param capacity: Specifies the number of virtual machines in the scale - set. - :type capacity: long - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'tier': {'key': 'tier', 'type': 'str'}, - 'capacity': {'key': 'capacity', 'type': 'long'}, - } - - def __init__(self, **kwargs): - super(Sku, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.tier = kwargs.get('tier', None) - self.capacity = kwargs.get('capacity', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/sku_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/sku_py3.py deleted file mode 100644 index f6bc74afaadc..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/sku_py3.py +++ /dev/null @@ -1,38 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class Sku(Model): - """Describes a virtual machine scale set sku. - - :param name: The sku name. - :type name: str - :param tier: Specifies the tier of virtual machines in a scale set.

    Possible Values:

    **Standard**

    **Basic** - :type tier: str - :param capacity: Specifies the number of virtual machines in the scale - set. - :type capacity: long - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'tier': {'key': 'tier', 'type': 'str'}, - 'capacity': {'key': 'capacity', 'type': 'long'}, - } - - def __init__(self, *, name: str=None, tier: str=None, capacity: int=None, **kwargs) -> None: - super(Sku, self).__init__(**kwargs) - self.name = name - self.tier = tier - self.capacity = capacity diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/ssh_configuration.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/ssh_configuration.py deleted file mode 100644 index e7bae86b788f..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/ssh_configuration.py +++ /dev/null @@ -1,30 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class SshConfiguration(Model): - """SSH configuration for Linux based VMs running on Azure. - - :param public_keys: The list of SSH public keys used to authenticate with - linux based VMs. - :type public_keys: - list[~azure.mgmt.compute.v2018_10_01.models.SshPublicKey] - """ - - _attribute_map = { - 'public_keys': {'key': 'publicKeys', 'type': '[SshPublicKey]'}, - } - - def __init__(self, **kwargs): - super(SshConfiguration, self).__init__(**kwargs) - self.public_keys = kwargs.get('public_keys', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/ssh_configuration_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/ssh_configuration_py3.py deleted file mode 100644 index 111c3078a072..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/ssh_configuration_py3.py +++ /dev/null @@ -1,30 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class SshConfiguration(Model): - """SSH configuration for Linux based VMs running on Azure. - - :param public_keys: The list of SSH public keys used to authenticate with - linux based VMs. - :type public_keys: - list[~azure.mgmt.compute.v2018_10_01.models.SshPublicKey] - """ - - _attribute_map = { - 'public_keys': {'key': 'publicKeys', 'type': '[SshPublicKey]'}, - } - - def __init__(self, *, public_keys=None, **kwargs) -> None: - super(SshConfiguration, self).__init__(**kwargs) - self.public_keys = public_keys diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/ssh_public_key.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/ssh_public_key.py deleted file mode 100644 index 122e0d3b9fdd..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/ssh_public_key.py +++ /dev/null @@ -1,39 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class SshPublicKey(Model): - """Contains information about SSH certificate public key and the path on the - Linux VM where the public key is placed. - - :param path: Specifies the full path on the created VM where ssh public - key is stored. If the file already exists, the specified key is appended - to the file. Example: /home/user/.ssh/authorized_keys - :type path: str - :param key_data: SSH public key certificate used to authenticate with the - VM through ssh. The key needs to be at least 2048-bit and in ssh-rsa - format.

    For creating ssh keys, see [Create SSH keys on Linux and - Mac for Linux VMs in - Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-mac-create-ssh-keys?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json). - :type key_data: str - """ - - _attribute_map = { - 'path': {'key': 'path', 'type': 'str'}, - 'key_data': {'key': 'keyData', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(SshPublicKey, self).__init__(**kwargs) - self.path = kwargs.get('path', None) - self.key_data = kwargs.get('key_data', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/ssh_public_key_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/ssh_public_key_py3.py deleted file mode 100644 index b16ee085b36b..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/ssh_public_key_py3.py +++ /dev/null @@ -1,39 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class SshPublicKey(Model): - """Contains information about SSH certificate public key and the path on the - Linux VM where the public key is placed. - - :param path: Specifies the full path on the created VM where ssh public - key is stored. If the file already exists, the specified key is appended - to the file. Example: /home/user/.ssh/authorized_keys - :type path: str - :param key_data: SSH public key certificate used to authenticate with the - VM through ssh. The key needs to be at least 2048-bit and in ssh-rsa - format.

    For creating ssh keys, see [Create SSH keys on Linux and - Mac for Linux VMs in - Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-mac-create-ssh-keys?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json). - :type key_data: str - """ - - _attribute_map = { - 'path': {'key': 'path', 'type': 'str'}, - 'key_data': {'key': 'keyData', 'type': 'str'}, - } - - def __init__(self, *, path: str=None, key_data: str=None, **kwargs) -> None: - super(SshPublicKey, self).__init__(**kwargs) - self.path = path - self.key_data = key_data diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/storage_profile.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/storage_profile.py deleted file mode 100644 index f0597c929ed8..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/storage_profile.py +++ /dev/null @@ -1,47 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class StorageProfile(Model): - """Specifies the storage settings for the virtual machine disks. - - :param image_reference: Specifies information about the image to use. You - can specify information about platform images, marketplace images, or - virtual machine images. This element is required when you want to use a - platform image, marketplace image, or virtual machine image, but is not - used in other creation operations. - :type image_reference: - ~azure.mgmt.compute.v2018_10_01.models.ImageReference - :param os_disk: Specifies information about the operating system disk used - by the virtual machine.

    For more information about disks, see - [About disks and VHDs for Azure virtual - machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-about-disks-vhds?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). - :type os_disk: ~azure.mgmt.compute.v2018_10_01.models.OSDisk - :param data_disks: Specifies the parameters that are used to add a data - disk to a virtual machine.

    For more information about disks, see - [About disks and VHDs for Azure virtual - machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-about-disks-vhds?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). - :type data_disks: list[~azure.mgmt.compute.v2018_10_01.models.DataDisk] - """ - - _attribute_map = { - 'image_reference': {'key': 'imageReference', 'type': 'ImageReference'}, - 'os_disk': {'key': 'osDisk', 'type': 'OSDisk'}, - 'data_disks': {'key': 'dataDisks', 'type': '[DataDisk]'}, - } - - def __init__(self, **kwargs): - super(StorageProfile, self).__init__(**kwargs) - self.image_reference = kwargs.get('image_reference', None) - self.os_disk = kwargs.get('os_disk', None) - self.data_disks = kwargs.get('data_disks', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/storage_profile_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/storage_profile_py3.py deleted file mode 100644 index e3b5222965bb..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/storage_profile_py3.py +++ /dev/null @@ -1,47 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class StorageProfile(Model): - """Specifies the storage settings for the virtual machine disks. - - :param image_reference: Specifies information about the image to use. You - can specify information about platform images, marketplace images, or - virtual machine images. This element is required when you want to use a - platform image, marketplace image, or virtual machine image, but is not - used in other creation operations. - :type image_reference: - ~azure.mgmt.compute.v2018_10_01.models.ImageReference - :param os_disk: Specifies information about the operating system disk used - by the virtual machine.

    For more information about disks, see - [About disks and VHDs for Azure virtual - machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-about-disks-vhds?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). - :type os_disk: ~azure.mgmt.compute.v2018_10_01.models.OSDisk - :param data_disks: Specifies the parameters that are used to add a data - disk to a virtual machine.

    For more information about disks, see - [About disks and VHDs for Azure virtual - machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-about-disks-vhds?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). - :type data_disks: list[~azure.mgmt.compute.v2018_10_01.models.DataDisk] - """ - - _attribute_map = { - 'image_reference': {'key': 'imageReference', 'type': 'ImageReference'}, - 'os_disk': {'key': 'osDisk', 'type': 'OSDisk'}, - 'data_disks': {'key': 'dataDisks', 'type': '[DataDisk]'}, - } - - def __init__(self, *, image_reference=None, os_disk=None, data_disks=None, **kwargs) -> None: - super(StorageProfile, self).__init__(**kwargs) - self.image_reference = image_reference - self.os_disk = os_disk - self.data_disks = data_disks diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/sub_resource.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/sub_resource.py deleted file mode 100644 index 11e092cc6ff5..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/sub_resource.py +++ /dev/null @@ -1,28 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class SubResource(Model): - """SubResource. - - :param id: Resource Id - :type id: str - """ - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(SubResource, self).__init__(**kwargs) - self.id = kwargs.get('id', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/sub_resource_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/sub_resource_py3.py deleted file mode 100644 index 29e5afee38f9..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/sub_resource_py3.py +++ /dev/null @@ -1,28 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class SubResource(Model): - """SubResource. - - :param id: Resource Id - :type id: str - """ - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - } - - def __init__(self, *, id: str=None, **kwargs) -> None: - super(SubResource, self).__init__(**kwargs) - self.id = id diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/sub_resource_read_only.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/sub_resource_read_only.py deleted file mode 100644 index 4a0ec466c0d4..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/sub_resource_read_only.py +++ /dev/null @@ -1,35 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class SubResourceReadOnly(Model): - """SubResourceReadOnly. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource Id - :vartype id: str - """ - - _validation = { - 'id': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(SubResourceReadOnly, self).__init__(**kwargs) - self.id = None diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/sub_resource_read_only_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/sub_resource_read_only_py3.py deleted file mode 100644 index cb918e9a2ac6..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/sub_resource_read_only_py3.py +++ /dev/null @@ -1,35 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class SubResourceReadOnly(Model): - """SubResourceReadOnly. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource Id - :vartype id: str - """ - - _validation = { - 'id': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - } - - def __init__(self, **kwargs) -> None: - super(SubResourceReadOnly, self).__init__(**kwargs) - self.id = None diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/throttled_requests_input.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/throttled_requests_input.py deleted file mode 100644 index 502e7be62e68..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/throttled_requests_input.py +++ /dev/null @@ -1,52 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .log_analytics_input_base import LogAnalyticsInputBase - - -class ThrottledRequestsInput(LogAnalyticsInputBase): - """Api request input for LogAnalytics getThrottledRequests Api. - - All required parameters must be populated in order to send to Azure. - - :param blob_container_sas_uri: Required. SAS Uri of the logging blob - container to which LogAnalytics Api writes output logs to. - :type blob_container_sas_uri: str - :param from_time: Required. From time of the query - :type from_time: datetime - :param to_time: Required. To time of the query - :type to_time: datetime - :param group_by_throttle_policy: Group query result by Throttle Policy - applied. - :type group_by_throttle_policy: bool - :param group_by_operation_name: Group query result by Operation Name. - :type group_by_operation_name: bool - :param group_by_resource_name: Group query result by Resource Name. - :type group_by_resource_name: bool - """ - - _validation = { - 'blob_container_sas_uri': {'required': True}, - 'from_time': {'required': True}, - 'to_time': {'required': True}, - } - - _attribute_map = { - 'blob_container_sas_uri': {'key': 'blobContainerSasUri', 'type': 'str'}, - 'from_time': {'key': 'fromTime', 'type': 'iso-8601'}, - 'to_time': {'key': 'toTime', 'type': 'iso-8601'}, - 'group_by_throttle_policy': {'key': 'groupByThrottlePolicy', 'type': 'bool'}, - 'group_by_operation_name': {'key': 'groupByOperationName', 'type': 'bool'}, - 'group_by_resource_name': {'key': 'groupByResourceName', 'type': 'bool'}, - } - - def __init__(self, **kwargs): - super(ThrottledRequestsInput, self).__init__(**kwargs) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/throttled_requests_input_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/throttled_requests_input_py3.py deleted file mode 100644 index a4239a5115de..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/throttled_requests_input_py3.py +++ /dev/null @@ -1,52 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .log_analytics_input_base_py3 import LogAnalyticsInputBase - - -class ThrottledRequestsInput(LogAnalyticsInputBase): - """Api request input for LogAnalytics getThrottledRequests Api. - - All required parameters must be populated in order to send to Azure. - - :param blob_container_sas_uri: Required. SAS Uri of the logging blob - container to which LogAnalytics Api writes output logs to. - :type blob_container_sas_uri: str - :param from_time: Required. From time of the query - :type from_time: datetime - :param to_time: Required. To time of the query - :type to_time: datetime - :param group_by_throttle_policy: Group query result by Throttle Policy - applied. - :type group_by_throttle_policy: bool - :param group_by_operation_name: Group query result by Operation Name. - :type group_by_operation_name: bool - :param group_by_resource_name: Group query result by Resource Name. - :type group_by_resource_name: bool - """ - - _validation = { - 'blob_container_sas_uri': {'required': True}, - 'from_time': {'required': True}, - 'to_time': {'required': True}, - } - - _attribute_map = { - 'blob_container_sas_uri': {'key': 'blobContainerSasUri', 'type': 'str'}, - 'from_time': {'key': 'fromTime', 'type': 'iso-8601'}, - 'to_time': {'key': 'toTime', 'type': 'iso-8601'}, - 'group_by_throttle_policy': {'key': 'groupByThrottlePolicy', 'type': 'bool'}, - 'group_by_operation_name': {'key': 'groupByOperationName', 'type': 'bool'}, - 'group_by_resource_name': {'key': 'groupByResourceName', 'type': 'bool'}, - } - - def __init__(self, *, blob_container_sas_uri: str, from_time, to_time, group_by_throttle_policy: bool=None, group_by_operation_name: bool=None, group_by_resource_name: bool=None, **kwargs) -> None: - super(ThrottledRequestsInput, self).__init__(blob_container_sas_uri=blob_container_sas_uri, from_time=from_time, to_time=to_time, group_by_throttle_policy=group_by_throttle_policy, group_by_operation_name=group_by_operation_name, group_by_resource_name=group_by_resource_name, **kwargs) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/update_resource.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/update_resource.py deleted file mode 100644 index b1d2898ff082..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/update_resource.py +++ /dev/null @@ -1,28 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class UpdateResource(Model): - """The Update Resource model definition. - - :param tags: Resource tags - :type tags: dict[str, str] - """ - - _attribute_map = { - 'tags': {'key': 'tags', 'type': '{str}'}, - } - - def __init__(self, **kwargs): - super(UpdateResource, self).__init__(**kwargs) - self.tags = kwargs.get('tags', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/update_resource_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/update_resource_py3.py deleted file mode 100644 index c06c17c124d9..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/update_resource_py3.py +++ /dev/null @@ -1,28 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class UpdateResource(Model): - """The Update Resource model definition. - - :param tags: Resource tags - :type tags: dict[str, str] - """ - - _attribute_map = { - 'tags': {'key': 'tags', 'type': '{str}'}, - } - - def __init__(self, *, tags=None, **kwargs) -> None: - super(UpdateResource, self).__init__(**kwargs) - self.tags = tags diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/upgrade_operation_historical_status_info.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/upgrade_operation_historical_status_info.py deleted file mode 100644 index 1e74afabeca6..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/upgrade_operation_historical_status_info.py +++ /dev/null @@ -1,47 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class UpgradeOperationHistoricalStatusInfo(Model): - """Virtual Machine Scale Set OS Upgrade History operation response. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar properties: Information about the properties of the upgrade - operation. - :vartype properties: - ~azure.mgmt.compute.v2018_10_01.models.UpgradeOperationHistoricalStatusInfoProperties - :ivar type: Resource type - :vartype type: str - :ivar location: Resource location - :vartype location: str - """ - - _validation = { - 'properties': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'readonly': True}, - } - - _attribute_map = { - 'properties': {'key': 'properties', 'type': 'UpgradeOperationHistoricalStatusInfoProperties'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(UpgradeOperationHistoricalStatusInfo, self).__init__(**kwargs) - self.properties = None - self.type = None - self.location = None diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/upgrade_operation_historical_status_info_paged.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/upgrade_operation_historical_status_info_paged.py deleted file mode 100644 index 20f29bb6d2e5..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/upgrade_operation_historical_status_info_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class UpgradeOperationHistoricalStatusInfoPaged(Paged): - """ - A paging container for iterating over a list of :class:`UpgradeOperationHistoricalStatusInfo ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[UpgradeOperationHistoricalStatusInfo]'} - } - - def __init__(self, *args, **kwargs): - - super(UpgradeOperationHistoricalStatusInfoPaged, self).__init__(*args, **kwargs) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/upgrade_operation_historical_status_info_properties.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/upgrade_operation_historical_status_info_properties.py deleted file mode 100644 index 4ff1ae7c1cae..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/upgrade_operation_historical_status_info_properties.py +++ /dev/null @@ -1,67 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class UpgradeOperationHistoricalStatusInfoProperties(Model): - """Describes each OS upgrade on the Virtual Machine Scale Set. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar running_status: Information about the overall status of the upgrade - operation. - :vartype running_status: - ~azure.mgmt.compute.v2018_10_01.models.UpgradeOperationHistoryStatus - :ivar progress: Counts of the VMs in each state. - :vartype progress: - ~azure.mgmt.compute.v2018_10_01.models.RollingUpgradeProgressInfo - :ivar error: Error Details for this upgrade if there are any. - :vartype error: ~azure.mgmt.compute.v2018_10_01.models.ApiError - :ivar started_by: Invoker of the Upgrade Operation. Possible values - include: 'Unknown', 'User', 'Platform' - :vartype started_by: str or - ~azure.mgmt.compute.v2018_10_01.models.UpgradeOperationInvoker - :ivar target_image_reference: Image Reference details - :vartype target_image_reference: - ~azure.mgmt.compute.v2018_10_01.models.ImageReference - :ivar rollback_info: Information about OS rollback if performed - :vartype rollback_info: - ~azure.mgmt.compute.v2018_10_01.models.RollbackStatusInfo - """ - - _validation = { - 'running_status': {'readonly': True}, - 'progress': {'readonly': True}, - 'error': {'readonly': True}, - 'started_by': {'readonly': True}, - 'target_image_reference': {'readonly': True}, - 'rollback_info': {'readonly': True}, - } - - _attribute_map = { - 'running_status': {'key': 'runningStatus', 'type': 'UpgradeOperationHistoryStatus'}, - 'progress': {'key': 'progress', 'type': 'RollingUpgradeProgressInfo'}, - 'error': {'key': 'error', 'type': 'ApiError'}, - 'started_by': {'key': 'startedBy', 'type': 'UpgradeOperationInvoker'}, - 'target_image_reference': {'key': 'targetImageReference', 'type': 'ImageReference'}, - 'rollback_info': {'key': 'rollbackInfo', 'type': 'RollbackStatusInfo'}, - } - - def __init__(self, **kwargs): - super(UpgradeOperationHistoricalStatusInfoProperties, self).__init__(**kwargs) - self.running_status = None - self.progress = None - self.error = None - self.started_by = None - self.target_image_reference = None - self.rollback_info = None diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/upgrade_operation_historical_status_info_properties_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/upgrade_operation_historical_status_info_properties_py3.py deleted file mode 100644 index bddcae19e6b5..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/upgrade_operation_historical_status_info_properties_py3.py +++ /dev/null @@ -1,67 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class UpgradeOperationHistoricalStatusInfoProperties(Model): - """Describes each OS upgrade on the Virtual Machine Scale Set. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar running_status: Information about the overall status of the upgrade - operation. - :vartype running_status: - ~azure.mgmt.compute.v2018_10_01.models.UpgradeOperationHistoryStatus - :ivar progress: Counts of the VMs in each state. - :vartype progress: - ~azure.mgmt.compute.v2018_10_01.models.RollingUpgradeProgressInfo - :ivar error: Error Details for this upgrade if there are any. - :vartype error: ~azure.mgmt.compute.v2018_10_01.models.ApiError - :ivar started_by: Invoker of the Upgrade Operation. Possible values - include: 'Unknown', 'User', 'Platform' - :vartype started_by: str or - ~azure.mgmt.compute.v2018_10_01.models.UpgradeOperationInvoker - :ivar target_image_reference: Image Reference details - :vartype target_image_reference: - ~azure.mgmt.compute.v2018_10_01.models.ImageReference - :ivar rollback_info: Information about OS rollback if performed - :vartype rollback_info: - ~azure.mgmt.compute.v2018_10_01.models.RollbackStatusInfo - """ - - _validation = { - 'running_status': {'readonly': True}, - 'progress': {'readonly': True}, - 'error': {'readonly': True}, - 'started_by': {'readonly': True}, - 'target_image_reference': {'readonly': True}, - 'rollback_info': {'readonly': True}, - } - - _attribute_map = { - 'running_status': {'key': 'runningStatus', 'type': 'UpgradeOperationHistoryStatus'}, - 'progress': {'key': 'progress', 'type': 'RollingUpgradeProgressInfo'}, - 'error': {'key': 'error', 'type': 'ApiError'}, - 'started_by': {'key': 'startedBy', 'type': 'UpgradeOperationInvoker'}, - 'target_image_reference': {'key': 'targetImageReference', 'type': 'ImageReference'}, - 'rollback_info': {'key': 'rollbackInfo', 'type': 'RollbackStatusInfo'}, - } - - def __init__(self, **kwargs) -> None: - super(UpgradeOperationHistoricalStatusInfoProperties, self).__init__(**kwargs) - self.running_status = None - self.progress = None - self.error = None - self.started_by = None - self.target_image_reference = None - self.rollback_info = None diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/upgrade_operation_historical_status_info_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/upgrade_operation_historical_status_info_py3.py deleted file mode 100644 index a2c412671913..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/upgrade_operation_historical_status_info_py3.py +++ /dev/null @@ -1,47 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class UpgradeOperationHistoricalStatusInfo(Model): - """Virtual Machine Scale Set OS Upgrade History operation response. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar properties: Information about the properties of the upgrade - operation. - :vartype properties: - ~azure.mgmt.compute.v2018_10_01.models.UpgradeOperationHistoricalStatusInfoProperties - :ivar type: Resource type - :vartype type: str - :ivar location: Resource location - :vartype location: str - """ - - _validation = { - 'properties': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'readonly': True}, - } - - _attribute_map = { - 'properties': {'key': 'properties', 'type': 'UpgradeOperationHistoricalStatusInfoProperties'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - } - - def __init__(self, **kwargs) -> None: - super(UpgradeOperationHistoricalStatusInfo, self).__init__(**kwargs) - self.properties = None - self.type = None - self.location = None diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/upgrade_operation_history_status.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/upgrade_operation_history_status.py deleted file mode 100644 index e1692f63e1ec..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/upgrade_operation_history_status.py +++ /dev/null @@ -1,46 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class UpgradeOperationHistoryStatus(Model): - """Information about the current running state of the overall upgrade. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar code: Code indicating the current status of the upgrade. Possible - values include: 'RollingForward', 'Cancelled', 'Completed', 'Faulted' - :vartype code: str or ~azure.mgmt.compute.v2018_10_01.models.UpgradeState - :ivar start_time: Start time of the upgrade. - :vartype start_time: datetime - :ivar end_time: End time of the upgrade. - :vartype end_time: datetime - """ - - _validation = { - 'code': {'readonly': True}, - 'start_time': {'readonly': True}, - 'end_time': {'readonly': True}, - } - - _attribute_map = { - 'code': {'key': 'code', 'type': 'UpgradeState'}, - 'start_time': {'key': 'startTime', 'type': 'iso-8601'}, - 'end_time': {'key': 'endTime', 'type': 'iso-8601'}, - } - - def __init__(self, **kwargs): - super(UpgradeOperationHistoryStatus, self).__init__(**kwargs) - self.code = None - self.start_time = None - self.end_time = None diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/upgrade_operation_history_status_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/upgrade_operation_history_status_py3.py deleted file mode 100644 index a485654a7f07..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/upgrade_operation_history_status_py3.py +++ /dev/null @@ -1,46 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class UpgradeOperationHistoryStatus(Model): - """Information about the current running state of the overall upgrade. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar code: Code indicating the current status of the upgrade. Possible - values include: 'RollingForward', 'Cancelled', 'Completed', 'Faulted' - :vartype code: str or ~azure.mgmt.compute.v2018_10_01.models.UpgradeState - :ivar start_time: Start time of the upgrade. - :vartype start_time: datetime - :ivar end_time: End time of the upgrade. - :vartype end_time: datetime - """ - - _validation = { - 'code': {'readonly': True}, - 'start_time': {'readonly': True}, - 'end_time': {'readonly': True}, - } - - _attribute_map = { - 'code': {'key': 'code', 'type': 'UpgradeState'}, - 'start_time': {'key': 'startTime', 'type': 'iso-8601'}, - 'end_time': {'key': 'endTime', 'type': 'iso-8601'}, - } - - def __init__(self, **kwargs) -> None: - super(UpgradeOperationHistoryStatus, self).__init__(**kwargs) - self.code = None - self.start_time = None - self.end_time = None diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/upgrade_policy.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/upgrade_policy.py deleted file mode 100644 index 2b344fc92000..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/upgrade_policy.py +++ /dev/null @@ -1,45 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class UpgradePolicy(Model): - """Describes an upgrade policy - automatic, manual, or rolling. - - :param mode: Specifies the mode of an upgrade to virtual machines in the - scale set.

    Possible values are:

    **Manual** - You - control the application of updates to virtual machines in the scale set. - You do this by using the manualUpgrade action.

    **Automatic** - - All virtual machines in the scale set are automatically updated at the - same time. Possible values include: 'Automatic', 'Manual', 'Rolling' - :type mode: str or ~azure.mgmt.compute.v2018_10_01.models.UpgradeMode - :param rolling_upgrade_policy: The configuration parameters used while - performing a rolling upgrade. - :type rolling_upgrade_policy: - ~azure.mgmt.compute.v2018_10_01.models.RollingUpgradePolicy - :param automatic_os_upgrade_policy: Configuration parameters used for - performing automatic OS Upgrade. - :type automatic_os_upgrade_policy: - ~azure.mgmt.compute.v2018_10_01.models.AutomaticOSUpgradePolicy - """ - - _attribute_map = { - 'mode': {'key': 'mode', 'type': 'UpgradeMode'}, - 'rolling_upgrade_policy': {'key': 'rollingUpgradePolicy', 'type': 'RollingUpgradePolicy'}, - 'automatic_os_upgrade_policy': {'key': 'automaticOSUpgradePolicy', 'type': 'AutomaticOSUpgradePolicy'}, - } - - def __init__(self, **kwargs): - super(UpgradePolicy, self).__init__(**kwargs) - self.mode = kwargs.get('mode', None) - self.rolling_upgrade_policy = kwargs.get('rolling_upgrade_policy', None) - self.automatic_os_upgrade_policy = kwargs.get('automatic_os_upgrade_policy', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/upgrade_policy_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/upgrade_policy_py3.py deleted file mode 100644 index dfb0346874f5..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/upgrade_policy_py3.py +++ /dev/null @@ -1,45 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class UpgradePolicy(Model): - """Describes an upgrade policy - automatic, manual, or rolling. - - :param mode: Specifies the mode of an upgrade to virtual machines in the - scale set.

    Possible values are:

    **Manual** - You - control the application of updates to virtual machines in the scale set. - You do this by using the manualUpgrade action.

    **Automatic** - - All virtual machines in the scale set are automatically updated at the - same time. Possible values include: 'Automatic', 'Manual', 'Rolling' - :type mode: str or ~azure.mgmt.compute.v2018_10_01.models.UpgradeMode - :param rolling_upgrade_policy: The configuration parameters used while - performing a rolling upgrade. - :type rolling_upgrade_policy: - ~azure.mgmt.compute.v2018_10_01.models.RollingUpgradePolicy - :param automatic_os_upgrade_policy: Configuration parameters used for - performing automatic OS Upgrade. - :type automatic_os_upgrade_policy: - ~azure.mgmt.compute.v2018_10_01.models.AutomaticOSUpgradePolicy - """ - - _attribute_map = { - 'mode': {'key': 'mode', 'type': 'UpgradeMode'}, - 'rolling_upgrade_policy': {'key': 'rollingUpgradePolicy', 'type': 'RollingUpgradePolicy'}, - 'automatic_os_upgrade_policy': {'key': 'automaticOSUpgradePolicy', 'type': 'AutomaticOSUpgradePolicy'}, - } - - def __init__(self, *, mode=None, rolling_upgrade_policy=None, automatic_os_upgrade_policy=None, **kwargs) -> None: - super(UpgradePolicy, self).__init__(**kwargs) - self.mode = mode - self.rolling_upgrade_policy = rolling_upgrade_policy - self.automatic_os_upgrade_policy = automatic_os_upgrade_policy diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/usage.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/usage.py deleted file mode 100644 index 1eb2b4100c20..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/usage.py +++ /dev/null @@ -1,54 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class Usage(Model): - """Describes Compute Resource Usage. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar unit: Required. An enum describing the unit of usage measurement. - Default value: "Count" . - :vartype unit: str - :param current_value: Required. The current usage of the resource. - :type current_value: int - :param limit: Required. The maximum permitted usage of the resource. - :type limit: long - :param name: Required. The name of the type of usage. - :type name: ~azure.mgmt.compute.v2018_10_01.models.UsageName - """ - - _validation = { - 'unit': {'required': True, 'constant': True}, - 'current_value': {'required': True}, - 'limit': {'required': True}, - 'name': {'required': True}, - } - - _attribute_map = { - 'unit': {'key': 'unit', 'type': 'str'}, - 'current_value': {'key': 'currentValue', 'type': 'int'}, - 'limit': {'key': 'limit', 'type': 'long'}, - 'name': {'key': 'name', 'type': 'UsageName'}, - } - - unit = "Count" - - def __init__(self, **kwargs): - super(Usage, self).__init__(**kwargs) - self.current_value = kwargs.get('current_value', None) - self.limit = kwargs.get('limit', None) - self.name = kwargs.get('name', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/usage_name.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/usage_name.py deleted file mode 100644 index e2560936493e..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/usage_name.py +++ /dev/null @@ -1,32 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class UsageName(Model): - """The Usage Names. - - :param value: The name of the resource. - :type value: str - :param localized_value: The localized name of the resource. - :type localized_value: str - """ - - _attribute_map = { - 'value': {'key': 'value', 'type': 'str'}, - 'localized_value': {'key': 'localizedValue', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(UsageName, self).__init__(**kwargs) - self.value = kwargs.get('value', None) - self.localized_value = kwargs.get('localized_value', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/usage_name_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/usage_name_py3.py deleted file mode 100644 index ad0b77459f75..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/usage_name_py3.py +++ /dev/null @@ -1,32 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class UsageName(Model): - """The Usage Names. - - :param value: The name of the resource. - :type value: str - :param localized_value: The localized name of the resource. - :type localized_value: str - """ - - _attribute_map = { - 'value': {'key': 'value', 'type': 'str'}, - 'localized_value': {'key': 'localizedValue', 'type': 'str'}, - } - - def __init__(self, *, value: str=None, localized_value: str=None, **kwargs) -> None: - super(UsageName, self).__init__(**kwargs) - self.value = value - self.localized_value = localized_value diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/usage_paged.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/usage_paged.py deleted file mode 100644 index 9fd8883e112e..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/usage_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class UsagePaged(Paged): - """ - A paging container for iterating over a list of :class:`Usage ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[Usage]'} - } - - def __init__(self, *args, **kwargs): - - super(UsagePaged, self).__init__(*args, **kwargs) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/usage_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/usage_py3.py deleted file mode 100644 index bfb4b0ea9c78..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/usage_py3.py +++ /dev/null @@ -1,54 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class Usage(Model): - """Describes Compute Resource Usage. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar unit: Required. An enum describing the unit of usage measurement. - Default value: "Count" . - :vartype unit: str - :param current_value: Required. The current usage of the resource. - :type current_value: int - :param limit: Required. The maximum permitted usage of the resource. - :type limit: long - :param name: Required. The name of the type of usage. - :type name: ~azure.mgmt.compute.v2018_10_01.models.UsageName - """ - - _validation = { - 'unit': {'required': True, 'constant': True}, - 'current_value': {'required': True}, - 'limit': {'required': True}, - 'name': {'required': True}, - } - - _attribute_map = { - 'unit': {'key': 'unit', 'type': 'str'}, - 'current_value': {'key': 'currentValue', 'type': 'int'}, - 'limit': {'key': 'limit', 'type': 'long'}, - 'name': {'key': 'name', 'type': 'UsageName'}, - } - - unit = "Count" - - def __init__(self, *, current_value: int, limit: int, name, **kwargs) -> None: - super(Usage, self).__init__(**kwargs) - self.current_value = current_value - self.limit = limit - self.name = name diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/vault_certificate.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/vault_certificate.py deleted file mode 100644 index 2dd179480e76..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/vault_certificate.py +++ /dev/null @@ -1,47 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VaultCertificate(Model): - """Describes a single certificate reference in a Key Vault, and where the - certificate should reside on the VM. - - :param certificate_url: This is the URL of a certificate that has been - uploaded to Key Vault as a secret. For adding a secret to the Key Vault, - see [Add a key or secret to the key - vault](https://docs.microsoft.com/azure/key-vault/key-vault-get-started/#add). - In this case, your certificate needs to be It is the Base64 encoding of - the following JSON Object which is encoded in UTF-8:

    {
    - "data":"",
    "dataType":"pfx",
    - "password":""
    } - :type certificate_url: str - :param certificate_store: For Windows VMs, specifies the certificate store - on the Virtual Machine to which the certificate should be added. The - specified certificate store is implicitly in the LocalMachine account. -

    For Linux VMs, the certificate file is placed under the - /var/lib/waagent directory, with the file name - <UppercaseThumbprint>.crt for the X509 certificate file and - <UppercaseThumbprint>.prv for private key. Both of these files are - .pem formatted. - :type certificate_store: str - """ - - _attribute_map = { - 'certificate_url': {'key': 'certificateUrl', 'type': 'str'}, - 'certificate_store': {'key': 'certificateStore', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(VaultCertificate, self).__init__(**kwargs) - self.certificate_url = kwargs.get('certificate_url', None) - self.certificate_store = kwargs.get('certificate_store', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/vault_certificate_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/vault_certificate_py3.py deleted file mode 100644 index 23ecc8101793..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/vault_certificate_py3.py +++ /dev/null @@ -1,47 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VaultCertificate(Model): - """Describes a single certificate reference in a Key Vault, and where the - certificate should reside on the VM. - - :param certificate_url: This is the URL of a certificate that has been - uploaded to Key Vault as a secret. For adding a secret to the Key Vault, - see [Add a key or secret to the key - vault](https://docs.microsoft.com/azure/key-vault/key-vault-get-started/#add). - In this case, your certificate needs to be It is the Base64 encoding of - the following JSON Object which is encoded in UTF-8:

    {
    - "data":"",
    "dataType":"pfx",
    - "password":""
    } - :type certificate_url: str - :param certificate_store: For Windows VMs, specifies the certificate store - on the Virtual Machine to which the certificate should be added. The - specified certificate store is implicitly in the LocalMachine account. -

    For Linux VMs, the certificate file is placed under the - /var/lib/waagent directory, with the file name - <UppercaseThumbprint>.crt for the X509 certificate file and - <UppercaseThumbprint>.prv for private key. Both of these files are - .pem formatted. - :type certificate_store: str - """ - - _attribute_map = { - 'certificate_url': {'key': 'certificateUrl', 'type': 'str'}, - 'certificate_store': {'key': 'certificateStore', 'type': 'str'}, - } - - def __init__(self, *, certificate_url: str=None, certificate_store: str=None, **kwargs) -> None: - super(VaultCertificate, self).__init__(**kwargs) - self.certificate_url = certificate_url - self.certificate_store = certificate_store diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/vault_secret_group.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/vault_secret_group.py deleted file mode 100644 index 430e51fd04c6..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/vault_secret_group.py +++ /dev/null @@ -1,35 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VaultSecretGroup(Model): - """Describes a set of certificates which are all in the same Key Vault. - - :param source_vault: The relative URL of the Key Vault containing all of - the certificates in VaultCertificates. - :type source_vault: ~azure.mgmt.compute.v2018_10_01.models.SubResource - :param vault_certificates: The list of key vault references in SourceVault - which contain certificates. - :type vault_certificates: - list[~azure.mgmt.compute.v2018_10_01.models.VaultCertificate] - """ - - _attribute_map = { - 'source_vault': {'key': 'sourceVault', 'type': 'SubResource'}, - 'vault_certificates': {'key': 'vaultCertificates', 'type': '[VaultCertificate]'}, - } - - def __init__(self, **kwargs): - super(VaultSecretGroup, self).__init__(**kwargs) - self.source_vault = kwargs.get('source_vault', None) - self.vault_certificates = kwargs.get('vault_certificates', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/vault_secret_group_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/vault_secret_group_py3.py deleted file mode 100644 index 915235165c12..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/vault_secret_group_py3.py +++ /dev/null @@ -1,35 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VaultSecretGroup(Model): - """Describes a set of certificates which are all in the same Key Vault. - - :param source_vault: The relative URL of the Key Vault containing all of - the certificates in VaultCertificates. - :type source_vault: ~azure.mgmt.compute.v2018_10_01.models.SubResource - :param vault_certificates: The list of key vault references in SourceVault - which contain certificates. - :type vault_certificates: - list[~azure.mgmt.compute.v2018_10_01.models.VaultCertificate] - """ - - _attribute_map = { - 'source_vault': {'key': 'sourceVault', 'type': 'SubResource'}, - 'vault_certificates': {'key': 'vaultCertificates', 'type': '[VaultCertificate]'}, - } - - def __init__(self, *, source_vault=None, vault_certificates=None, **kwargs) -> None: - super(VaultSecretGroup, self).__init__(**kwargs) - self.source_vault = source_vault - self.vault_certificates = vault_certificates diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_hard_disk.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_hard_disk.py deleted file mode 100644 index 5e3ad9dea7d4..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_hard_disk.py +++ /dev/null @@ -1,28 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualHardDisk(Model): - """Describes the uri of a disk. - - :param uri: Specifies the virtual hard disk's uri. - :type uri: str - """ - - _attribute_map = { - 'uri': {'key': 'uri', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(VirtualHardDisk, self).__init__(**kwargs) - self.uri = kwargs.get('uri', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_hard_disk_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_hard_disk_py3.py deleted file mode 100644 index 9c069b95f084..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_hard_disk_py3.py +++ /dev/null @@ -1,28 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualHardDisk(Model): - """Describes the uri of a disk. - - :param uri: Specifies the virtual hard disk's uri. - :type uri: str - """ - - _attribute_map = { - 'uri': {'key': 'uri', 'type': 'str'}, - } - - def __init__(self, *, uri: str=None, **kwargs) -> None: - super(VirtualHardDisk, self).__init__(**kwargs) - self.uri = uri diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine.py deleted file mode 100644 index 22f2f1cb804b..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine.py +++ /dev/null @@ -1,163 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource import Resource - - -class VirtualMachine(Resource): - """Describes a Virtual Machine. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource Id - :vartype id: str - :ivar name: Resource name - :vartype name: str - :ivar type: Resource type - :vartype type: str - :param location: Required. Resource location - :type location: str - :param tags: Resource tags - :type tags: dict[str, str] - :param plan: Specifies information about the marketplace image used to - create the virtual machine. This element is only used for marketplace - images. Before you can use a marketplace image from an API, you must - enable the image for programmatic use. In the Azure portal, find the - marketplace image that you want to use and then click **Want to deploy - programmatically, Get Started ->**. Enter any required information and - then click **Save**. - :type plan: ~azure.mgmt.compute.v2018_10_01.models.Plan - :param hardware_profile: Specifies the hardware settings for the virtual - machine. - :type hardware_profile: - ~azure.mgmt.compute.v2018_10_01.models.HardwareProfile - :param storage_profile: Specifies the storage settings for the virtual - machine disks. - :type storage_profile: - ~azure.mgmt.compute.v2018_10_01.models.StorageProfile - :param additional_capabilities: Specifies additional capabilities enabled - or disabled on the virtual machine. - :type additional_capabilities: - ~azure.mgmt.compute.v2018_10_01.models.AdditionalCapabilities - :param os_profile: Specifies the operating system settings for the virtual - machine. - :type os_profile: ~azure.mgmt.compute.v2018_10_01.models.OSProfile - :param network_profile: Specifies the network interfaces of the virtual - machine. - :type network_profile: - ~azure.mgmt.compute.v2018_10_01.models.NetworkProfile - :param diagnostics_profile: Specifies the boot diagnostic settings state. -

    Minimum api-version: 2015-06-15. - :type diagnostics_profile: - ~azure.mgmt.compute.v2018_10_01.models.DiagnosticsProfile - :param availability_set: Specifies information about the availability set - that the virtual machine should be assigned to. Virtual machines specified - in the same availability set are allocated to different nodes to maximize - availability. For more information about availability sets, see [Manage - the availability of virtual - machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-manage-availability?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). -

    For more information on Azure planned maintenance, see [Planned - maintenance for virtual machines in - Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-planned-maintenance?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json) -

    Currently, a VM can only be added to availability set at creation - time. An existing VM cannot be added to an availability set. - :type availability_set: ~azure.mgmt.compute.v2018_10_01.models.SubResource - :param proximity_placement_group: Specifies information about the - proximity placement group that the virtual machine should be assigned to. -

    Minimum api-version: 2018-04-01. - :type proximity_placement_group: - ~azure.mgmt.compute.v2018_10_01.models.SubResource - :ivar provisioning_state: The provisioning state, which only appears in - the response. - :vartype provisioning_state: str - :ivar instance_view: The virtual machine instance view. - :vartype instance_view: - ~azure.mgmt.compute.v2018_10_01.models.VirtualMachineInstanceView - :param license_type: Specifies that the image or disk that is being used - was licensed on-premises. This element is only used for images that - contain the Windows Server operating system.

    Possible values are: -

    Windows_Client

    Windows_Server

    If this element - is included in a request for an update, the value must match the initial - value. This value cannot be updated.

    For more information, see - [Azure Hybrid Use Benefit for Windows - Server](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-hybrid-use-benefit-licensing?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json) -

    Minimum api-version: 2015-06-15 - :type license_type: str - :ivar vm_id: Specifies the VM unique ID which is a 128-bits identifier - that is encoded and stored in all Azure IaaS VMs SMBIOS and can be read - using platform BIOS commands. - :vartype vm_id: str - :ivar resources: The virtual machine child extension resources. - :vartype resources: - list[~azure.mgmt.compute.v2018_10_01.models.VirtualMachineExtension] - :param identity: The identity of the virtual machine, if configured. - :type identity: - ~azure.mgmt.compute.v2018_10_01.models.VirtualMachineIdentity - :param zones: The virtual machine zones. - :type zones: list[str] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - 'provisioning_state': {'readonly': True}, - 'instance_view': {'readonly': True}, - 'vm_id': {'readonly': True}, - 'resources': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'plan': {'key': 'plan', 'type': 'Plan'}, - 'hardware_profile': {'key': 'properties.hardwareProfile', 'type': 'HardwareProfile'}, - 'storage_profile': {'key': 'properties.storageProfile', 'type': 'StorageProfile'}, - 'additional_capabilities': {'key': 'properties.additionalCapabilities', 'type': 'AdditionalCapabilities'}, - 'os_profile': {'key': 'properties.osProfile', 'type': 'OSProfile'}, - 'network_profile': {'key': 'properties.networkProfile', 'type': 'NetworkProfile'}, - 'diagnostics_profile': {'key': 'properties.diagnosticsProfile', 'type': 'DiagnosticsProfile'}, - 'availability_set': {'key': 'properties.availabilitySet', 'type': 'SubResource'}, - 'proximity_placement_group': {'key': 'properties.proximityPlacementGroup', 'type': 'SubResource'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'instance_view': {'key': 'properties.instanceView', 'type': 'VirtualMachineInstanceView'}, - 'license_type': {'key': 'properties.licenseType', 'type': 'str'}, - 'vm_id': {'key': 'properties.vmId', 'type': 'str'}, - 'resources': {'key': 'resources', 'type': '[VirtualMachineExtension]'}, - 'identity': {'key': 'identity', 'type': 'VirtualMachineIdentity'}, - 'zones': {'key': 'zones', 'type': '[str]'}, - } - - def __init__(self, **kwargs): - super(VirtualMachine, self).__init__(**kwargs) - self.plan = kwargs.get('plan', None) - self.hardware_profile = kwargs.get('hardware_profile', None) - self.storage_profile = kwargs.get('storage_profile', None) - self.additional_capabilities = kwargs.get('additional_capabilities', None) - self.os_profile = kwargs.get('os_profile', None) - self.network_profile = kwargs.get('network_profile', None) - self.diagnostics_profile = kwargs.get('diagnostics_profile', None) - self.availability_set = kwargs.get('availability_set', None) - self.proximity_placement_group = kwargs.get('proximity_placement_group', None) - self.provisioning_state = None - self.instance_view = None - self.license_type = kwargs.get('license_type', None) - self.vm_id = None - self.resources = None - self.identity = kwargs.get('identity', None) - self.zones = kwargs.get('zones', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_agent_instance_view.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_agent_instance_view.py deleted file mode 100644 index 5f34d8af1c1a..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_agent_instance_view.py +++ /dev/null @@ -1,39 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineAgentInstanceView(Model): - """The instance view of the VM Agent running on the virtual machine. - - :param vm_agent_version: The VM Agent full version. - :type vm_agent_version: str - :param extension_handlers: The virtual machine extension handler instance - view. - :type extension_handlers: - list[~azure.mgmt.compute.v2018_10_01.models.VirtualMachineExtensionHandlerInstanceView] - :param statuses: The resource status information. - :type statuses: - list[~azure.mgmt.compute.v2018_10_01.models.InstanceViewStatus] - """ - - _attribute_map = { - 'vm_agent_version': {'key': 'vmAgentVersion', 'type': 'str'}, - 'extension_handlers': {'key': 'extensionHandlers', 'type': '[VirtualMachineExtensionHandlerInstanceView]'}, - 'statuses': {'key': 'statuses', 'type': '[InstanceViewStatus]'}, - } - - def __init__(self, **kwargs): - super(VirtualMachineAgentInstanceView, self).__init__(**kwargs) - self.vm_agent_version = kwargs.get('vm_agent_version', None) - self.extension_handlers = kwargs.get('extension_handlers', None) - self.statuses = kwargs.get('statuses', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_agent_instance_view_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_agent_instance_view_py3.py deleted file mode 100644 index 24f44c45521e..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_agent_instance_view_py3.py +++ /dev/null @@ -1,39 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineAgentInstanceView(Model): - """The instance view of the VM Agent running on the virtual machine. - - :param vm_agent_version: The VM Agent full version. - :type vm_agent_version: str - :param extension_handlers: The virtual machine extension handler instance - view. - :type extension_handlers: - list[~azure.mgmt.compute.v2018_10_01.models.VirtualMachineExtensionHandlerInstanceView] - :param statuses: The resource status information. - :type statuses: - list[~azure.mgmt.compute.v2018_10_01.models.InstanceViewStatus] - """ - - _attribute_map = { - 'vm_agent_version': {'key': 'vmAgentVersion', 'type': 'str'}, - 'extension_handlers': {'key': 'extensionHandlers', 'type': '[VirtualMachineExtensionHandlerInstanceView]'}, - 'statuses': {'key': 'statuses', 'type': '[InstanceViewStatus]'}, - } - - def __init__(self, *, vm_agent_version: str=None, extension_handlers=None, statuses=None, **kwargs) -> None: - super(VirtualMachineAgentInstanceView, self).__init__(**kwargs) - self.vm_agent_version = vm_agent_version - self.extension_handlers = extension_handlers - self.statuses = statuses diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_capture_parameters.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_capture_parameters.py deleted file mode 100644 index 4e6ffbea7a4f..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_capture_parameters.py +++ /dev/null @@ -1,46 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineCaptureParameters(Model): - """Capture Virtual Machine parameters. - - All required parameters must be populated in order to send to Azure. - - :param vhd_prefix: Required. The captured virtual hard disk's name prefix. - :type vhd_prefix: str - :param destination_container_name: Required. The destination container - name. - :type destination_container_name: str - :param overwrite_vhds: Required. Specifies whether to overwrite the - destination virtual hard disk, in case of conflict. - :type overwrite_vhds: bool - """ - - _validation = { - 'vhd_prefix': {'required': True}, - 'destination_container_name': {'required': True}, - 'overwrite_vhds': {'required': True}, - } - - _attribute_map = { - 'vhd_prefix': {'key': 'vhdPrefix', 'type': 'str'}, - 'destination_container_name': {'key': 'destinationContainerName', 'type': 'str'}, - 'overwrite_vhds': {'key': 'overwriteVhds', 'type': 'bool'}, - } - - def __init__(self, **kwargs): - super(VirtualMachineCaptureParameters, self).__init__(**kwargs) - self.vhd_prefix = kwargs.get('vhd_prefix', None) - self.destination_container_name = kwargs.get('destination_container_name', None) - self.overwrite_vhds = kwargs.get('overwrite_vhds', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_capture_parameters_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_capture_parameters_py3.py deleted file mode 100644 index 1866cdc23300..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_capture_parameters_py3.py +++ /dev/null @@ -1,46 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineCaptureParameters(Model): - """Capture Virtual Machine parameters. - - All required parameters must be populated in order to send to Azure. - - :param vhd_prefix: Required. The captured virtual hard disk's name prefix. - :type vhd_prefix: str - :param destination_container_name: Required. The destination container - name. - :type destination_container_name: str - :param overwrite_vhds: Required. Specifies whether to overwrite the - destination virtual hard disk, in case of conflict. - :type overwrite_vhds: bool - """ - - _validation = { - 'vhd_prefix': {'required': True}, - 'destination_container_name': {'required': True}, - 'overwrite_vhds': {'required': True}, - } - - _attribute_map = { - 'vhd_prefix': {'key': 'vhdPrefix', 'type': 'str'}, - 'destination_container_name': {'key': 'destinationContainerName', 'type': 'str'}, - 'overwrite_vhds': {'key': 'overwriteVhds', 'type': 'bool'}, - } - - def __init__(self, *, vhd_prefix: str, destination_container_name: str, overwrite_vhds: bool, **kwargs) -> None: - super(VirtualMachineCaptureParameters, self).__init__(**kwargs) - self.vhd_prefix = vhd_prefix - self.destination_container_name = destination_container_name - self.overwrite_vhds = overwrite_vhds diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_capture_result.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_capture_result.py deleted file mode 100644 index 2972e1f2fcda..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_capture_result.py +++ /dev/null @@ -1,53 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .sub_resource import SubResource - - -class VirtualMachineCaptureResult(SubResource): - """Output of virtual machine capture operation. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :param id: Resource Id - :type id: str - :ivar schema: the schema of the captured virtual machine - :vartype schema: str - :ivar content_version: the version of the content - :vartype content_version: str - :ivar parameters: parameters of the captured virtual machine - :vartype parameters: object - :ivar resources: a list of resource items of the captured virtual machine - :vartype resources: list[object] - """ - - _validation = { - 'schema': {'readonly': True}, - 'content_version': {'readonly': True}, - 'parameters': {'readonly': True}, - 'resources': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'schema': {'key': '$schema', 'type': 'str'}, - 'content_version': {'key': 'contentVersion', 'type': 'str'}, - 'parameters': {'key': 'parameters', 'type': 'object'}, - 'resources': {'key': 'resources', 'type': '[object]'}, - } - - def __init__(self, **kwargs): - super(VirtualMachineCaptureResult, self).__init__(**kwargs) - self.schema = None - self.content_version = None - self.parameters = None - self.resources = None diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_capture_result_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_capture_result_py3.py deleted file mode 100644 index 09e8afde1591..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_capture_result_py3.py +++ /dev/null @@ -1,53 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .sub_resource_py3 import SubResource - - -class VirtualMachineCaptureResult(SubResource): - """Output of virtual machine capture operation. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :param id: Resource Id - :type id: str - :ivar schema: the schema of the captured virtual machine - :vartype schema: str - :ivar content_version: the version of the content - :vartype content_version: str - :ivar parameters: parameters of the captured virtual machine - :vartype parameters: object - :ivar resources: a list of resource items of the captured virtual machine - :vartype resources: list[object] - """ - - _validation = { - 'schema': {'readonly': True}, - 'content_version': {'readonly': True}, - 'parameters': {'readonly': True}, - 'resources': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'schema': {'key': '$schema', 'type': 'str'}, - 'content_version': {'key': 'contentVersion', 'type': 'str'}, - 'parameters': {'key': 'parameters', 'type': 'object'}, - 'resources': {'key': 'resources', 'type': '[object]'}, - } - - def __init__(self, *, id: str=None, **kwargs) -> None: - super(VirtualMachineCaptureResult, self).__init__(id=id, **kwargs) - self.schema = None - self.content_version = None - self.parameters = None - self.resources = None diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_extension.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_extension.py deleted file mode 100644 index 894a684f8e55..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_extension.py +++ /dev/null @@ -1,97 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource import Resource - - -class VirtualMachineExtension(Resource): - """Describes a Virtual Machine Extension. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource Id - :vartype id: str - :ivar name: Resource name - :vartype name: str - :ivar type: Resource type - :vartype type: str - :param location: Required. Resource location - :type location: str - :param tags: Resource tags - :type tags: dict[str, str] - :param force_update_tag: How the extension handler should be forced to - update even if the extension configuration has not changed. - :type force_update_tag: str - :param publisher: The name of the extension handler publisher. - :type publisher: str - :param virtual_machine_extension_type: Specifies the type of the - extension; an example is "CustomScriptExtension". - :type virtual_machine_extension_type: str - :param type_handler_version: Specifies the version of the script handler. - :type type_handler_version: str - :param auto_upgrade_minor_version: Indicates whether the extension should - use a newer minor version if one is available at deployment time. Once - deployed, however, the extension will not upgrade minor versions unless - redeployed, even with this property set to true. - :type auto_upgrade_minor_version: bool - :param settings: Json formatted public settings for the extension. - :type settings: object - :param protected_settings: The extension can contain either - protectedSettings or protectedSettingsFromKeyVault or no protected - settings at all. - :type protected_settings: object - :ivar provisioning_state: The provisioning state, which only appears in - the response. - :vartype provisioning_state: str - :param instance_view: The virtual machine extension instance view. - :type instance_view: - ~azure.mgmt.compute.v2018_10_01.models.VirtualMachineExtensionInstanceView - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - 'provisioning_state': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'force_update_tag': {'key': 'properties.forceUpdateTag', 'type': 'str'}, - 'publisher': {'key': 'properties.publisher', 'type': 'str'}, - 'virtual_machine_extension_type': {'key': 'properties.type', 'type': 'str'}, - 'type_handler_version': {'key': 'properties.typeHandlerVersion', 'type': 'str'}, - 'auto_upgrade_minor_version': {'key': 'properties.autoUpgradeMinorVersion', 'type': 'bool'}, - 'settings': {'key': 'properties.settings', 'type': 'object'}, - 'protected_settings': {'key': 'properties.protectedSettings', 'type': 'object'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'instance_view': {'key': 'properties.instanceView', 'type': 'VirtualMachineExtensionInstanceView'}, - } - - def __init__(self, **kwargs): - super(VirtualMachineExtension, self).__init__(**kwargs) - self.force_update_tag = kwargs.get('force_update_tag', None) - self.publisher = kwargs.get('publisher', None) - self.virtual_machine_extension_type = kwargs.get('virtual_machine_extension_type', None) - self.type_handler_version = kwargs.get('type_handler_version', None) - self.auto_upgrade_minor_version = kwargs.get('auto_upgrade_minor_version', None) - self.settings = kwargs.get('settings', None) - self.protected_settings = kwargs.get('protected_settings', None) - self.provisioning_state = None - self.instance_view = kwargs.get('instance_view', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_extension_handler_instance_view.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_extension_handler_instance_view.py deleted file mode 100644 index e13a614f560b..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_extension_handler_instance_view.py +++ /dev/null @@ -1,37 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineExtensionHandlerInstanceView(Model): - """The instance view of a virtual machine extension handler. - - :param type: Specifies the type of the extension; an example is - "CustomScriptExtension". - :type type: str - :param type_handler_version: Specifies the version of the script handler. - :type type_handler_version: str - :param status: The extension handler status. - :type status: ~azure.mgmt.compute.v2018_10_01.models.InstanceViewStatus - """ - - _attribute_map = { - 'type': {'key': 'type', 'type': 'str'}, - 'type_handler_version': {'key': 'typeHandlerVersion', 'type': 'str'}, - 'status': {'key': 'status', 'type': 'InstanceViewStatus'}, - } - - def __init__(self, **kwargs): - super(VirtualMachineExtensionHandlerInstanceView, self).__init__(**kwargs) - self.type = kwargs.get('type', None) - self.type_handler_version = kwargs.get('type_handler_version', None) - self.status = kwargs.get('status', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_extension_handler_instance_view_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_extension_handler_instance_view_py3.py deleted file mode 100644 index 71211067b4e9..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_extension_handler_instance_view_py3.py +++ /dev/null @@ -1,37 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineExtensionHandlerInstanceView(Model): - """The instance view of a virtual machine extension handler. - - :param type: Specifies the type of the extension; an example is - "CustomScriptExtension". - :type type: str - :param type_handler_version: Specifies the version of the script handler. - :type type_handler_version: str - :param status: The extension handler status. - :type status: ~azure.mgmt.compute.v2018_10_01.models.InstanceViewStatus - """ - - _attribute_map = { - 'type': {'key': 'type', 'type': 'str'}, - 'type_handler_version': {'key': 'typeHandlerVersion', 'type': 'str'}, - 'status': {'key': 'status', 'type': 'InstanceViewStatus'}, - } - - def __init__(self, *, type: str=None, type_handler_version: str=None, status=None, **kwargs) -> None: - super(VirtualMachineExtensionHandlerInstanceView, self).__init__(**kwargs) - self.type = type - self.type_handler_version = type_handler_version - self.status = status diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_extension_image.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_extension_image.py deleted file mode 100644 index 7273e2b84754..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_extension_image.py +++ /dev/null @@ -1,81 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource import Resource - - -class VirtualMachineExtensionImage(Resource): - """Describes a Virtual Machine Extension Image. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource Id - :vartype id: str - :ivar name: Resource name - :vartype name: str - :ivar type: Resource type - :vartype type: str - :param location: Required. Resource location - :type location: str - :param tags: Resource tags - :type tags: dict[str, str] - :param operating_system: Required. The operating system this extension - supports. - :type operating_system: str - :param compute_role: Required. The type of role (IaaS or PaaS) this - extension supports. - :type compute_role: str - :param handler_schema: Required. The schema defined by publisher, where - extension consumers should provide settings in a matching schema. - :type handler_schema: str - :param vm_scale_set_enabled: Whether the extension can be used on xRP - VMScaleSets. By default existing extensions are usable on scalesets, but - there might be cases where a publisher wants to explicitly indicate the - extension is only enabled for CRP VMs but not VMSS. - :type vm_scale_set_enabled: bool - :param supports_multiple_extensions: Whether the handler can support - multiple extensions. - :type supports_multiple_extensions: bool - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - 'operating_system': {'required': True}, - 'compute_role': {'required': True}, - 'handler_schema': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'operating_system': {'key': 'properties.operatingSystem', 'type': 'str'}, - 'compute_role': {'key': 'properties.computeRole', 'type': 'str'}, - 'handler_schema': {'key': 'properties.handlerSchema', 'type': 'str'}, - 'vm_scale_set_enabled': {'key': 'properties.vmScaleSetEnabled', 'type': 'bool'}, - 'supports_multiple_extensions': {'key': 'properties.supportsMultipleExtensions', 'type': 'bool'}, - } - - def __init__(self, **kwargs): - super(VirtualMachineExtensionImage, self).__init__(**kwargs) - self.operating_system = kwargs.get('operating_system', None) - self.compute_role = kwargs.get('compute_role', None) - self.handler_schema = kwargs.get('handler_schema', None) - self.vm_scale_set_enabled = kwargs.get('vm_scale_set_enabled', None) - self.supports_multiple_extensions = kwargs.get('supports_multiple_extensions', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_extension_image_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_extension_image_py3.py deleted file mode 100644 index 3d48c3a87fb0..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_extension_image_py3.py +++ /dev/null @@ -1,81 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource_py3 import Resource - - -class VirtualMachineExtensionImage(Resource): - """Describes a Virtual Machine Extension Image. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource Id - :vartype id: str - :ivar name: Resource name - :vartype name: str - :ivar type: Resource type - :vartype type: str - :param location: Required. Resource location - :type location: str - :param tags: Resource tags - :type tags: dict[str, str] - :param operating_system: Required. The operating system this extension - supports. - :type operating_system: str - :param compute_role: Required. The type of role (IaaS or PaaS) this - extension supports. - :type compute_role: str - :param handler_schema: Required. The schema defined by publisher, where - extension consumers should provide settings in a matching schema. - :type handler_schema: str - :param vm_scale_set_enabled: Whether the extension can be used on xRP - VMScaleSets. By default existing extensions are usable on scalesets, but - there might be cases where a publisher wants to explicitly indicate the - extension is only enabled for CRP VMs but not VMSS. - :type vm_scale_set_enabled: bool - :param supports_multiple_extensions: Whether the handler can support - multiple extensions. - :type supports_multiple_extensions: bool - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - 'operating_system': {'required': True}, - 'compute_role': {'required': True}, - 'handler_schema': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'operating_system': {'key': 'properties.operatingSystem', 'type': 'str'}, - 'compute_role': {'key': 'properties.computeRole', 'type': 'str'}, - 'handler_schema': {'key': 'properties.handlerSchema', 'type': 'str'}, - 'vm_scale_set_enabled': {'key': 'properties.vmScaleSetEnabled', 'type': 'bool'}, - 'supports_multiple_extensions': {'key': 'properties.supportsMultipleExtensions', 'type': 'bool'}, - } - - def __init__(self, *, location: str, operating_system: str, compute_role: str, handler_schema: str, tags=None, vm_scale_set_enabled: bool=None, supports_multiple_extensions: bool=None, **kwargs) -> None: - super(VirtualMachineExtensionImage, self).__init__(location=location, tags=tags, **kwargs) - self.operating_system = operating_system - self.compute_role = compute_role - self.handler_schema = handler_schema - self.vm_scale_set_enabled = vm_scale_set_enabled - self.supports_multiple_extensions = supports_multiple_extensions diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_extension_instance_view.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_extension_instance_view.py deleted file mode 100644 index f53500a5dcbe..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_extension_instance_view.py +++ /dev/null @@ -1,47 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineExtensionInstanceView(Model): - """The instance view of a virtual machine extension. - - :param name: The virtual machine extension name. - :type name: str - :param type: Specifies the type of the extension; an example is - "CustomScriptExtension". - :type type: str - :param type_handler_version: Specifies the version of the script handler. - :type type_handler_version: str - :param substatuses: The resource status information. - :type substatuses: - list[~azure.mgmt.compute.v2018_10_01.models.InstanceViewStatus] - :param statuses: The resource status information. - :type statuses: - list[~azure.mgmt.compute.v2018_10_01.models.InstanceViewStatus] - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'type_handler_version': {'key': 'typeHandlerVersion', 'type': 'str'}, - 'substatuses': {'key': 'substatuses', 'type': '[InstanceViewStatus]'}, - 'statuses': {'key': 'statuses', 'type': '[InstanceViewStatus]'}, - } - - def __init__(self, **kwargs): - super(VirtualMachineExtensionInstanceView, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.type = kwargs.get('type', None) - self.type_handler_version = kwargs.get('type_handler_version', None) - self.substatuses = kwargs.get('substatuses', None) - self.statuses = kwargs.get('statuses', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_extension_instance_view_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_extension_instance_view_py3.py deleted file mode 100644 index 3c5896ce831d..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_extension_instance_view_py3.py +++ /dev/null @@ -1,47 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineExtensionInstanceView(Model): - """The instance view of a virtual machine extension. - - :param name: The virtual machine extension name. - :type name: str - :param type: Specifies the type of the extension; an example is - "CustomScriptExtension". - :type type: str - :param type_handler_version: Specifies the version of the script handler. - :type type_handler_version: str - :param substatuses: The resource status information. - :type substatuses: - list[~azure.mgmt.compute.v2018_10_01.models.InstanceViewStatus] - :param statuses: The resource status information. - :type statuses: - list[~azure.mgmt.compute.v2018_10_01.models.InstanceViewStatus] - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'type_handler_version': {'key': 'typeHandlerVersion', 'type': 'str'}, - 'substatuses': {'key': 'substatuses', 'type': '[InstanceViewStatus]'}, - 'statuses': {'key': 'statuses', 'type': '[InstanceViewStatus]'}, - } - - def __init__(self, *, name: str=None, type: str=None, type_handler_version: str=None, substatuses=None, statuses=None, **kwargs) -> None: - super(VirtualMachineExtensionInstanceView, self).__init__(**kwargs) - self.name = name - self.type = type - self.type_handler_version = type_handler_version - self.substatuses = substatuses - self.statuses = statuses diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_extension_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_extension_py3.py deleted file mode 100644 index 48b6a1773a3b..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_extension_py3.py +++ /dev/null @@ -1,97 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource_py3 import Resource - - -class VirtualMachineExtension(Resource): - """Describes a Virtual Machine Extension. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource Id - :vartype id: str - :ivar name: Resource name - :vartype name: str - :ivar type: Resource type - :vartype type: str - :param location: Required. Resource location - :type location: str - :param tags: Resource tags - :type tags: dict[str, str] - :param force_update_tag: How the extension handler should be forced to - update even if the extension configuration has not changed. - :type force_update_tag: str - :param publisher: The name of the extension handler publisher. - :type publisher: str - :param virtual_machine_extension_type: Specifies the type of the - extension; an example is "CustomScriptExtension". - :type virtual_machine_extension_type: str - :param type_handler_version: Specifies the version of the script handler. - :type type_handler_version: str - :param auto_upgrade_minor_version: Indicates whether the extension should - use a newer minor version if one is available at deployment time. Once - deployed, however, the extension will not upgrade minor versions unless - redeployed, even with this property set to true. - :type auto_upgrade_minor_version: bool - :param settings: Json formatted public settings for the extension. - :type settings: object - :param protected_settings: The extension can contain either - protectedSettings or protectedSettingsFromKeyVault or no protected - settings at all. - :type protected_settings: object - :ivar provisioning_state: The provisioning state, which only appears in - the response. - :vartype provisioning_state: str - :param instance_view: The virtual machine extension instance view. - :type instance_view: - ~azure.mgmt.compute.v2018_10_01.models.VirtualMachineExtensionInstanceView - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - 'provisioning_state': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'force_update_tag': {'key': 'properties.forceUpdateTag', 'type': 'str'}, - 'publisher': {'key': 'properties.publisher', 'type': 'str'}, - 'virtual_machine_extension_type': {'key': 'properties.type', 'type': 'str'}, - 'type_handler_version': {'key': 'properties.typeHandlerVersion', 'type': 'str'}, - 'auto_upgrade_minor_version': {'key': 'properties.autoUpgradeMinorVersion', 'type': 'bool'}, - 'settings': {'key': 'properties.settings', 'type': 'object'}, - 'protected_settings': {'key': 'properties.protectedSettings', 'type': 'object'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'instance_view': {'key': 'properties.instanceView', 'type': 'VirtualMachineExtensionInstanceView'}, - } - - def __init__(self, *, location: str, tags=None, force_update_tag: str=None, publisher: str=None, virtual_machine_extension_type: str=None, type_handler_version: str=None, auto_upgrade_minor_version: bool=None, settings=None, protected_settings=None, instance_view=None, **kwargs) -> None: - super(VirtualMachineExtension, self).__init__(location=location, tags=tags, **kwargs) - self.force_update_tag = force_update_tag - self.publisher = publisher - self.virtual_machine_extension_type = virtual_machine_extension_type - self.type_handler_version = type_handler_version - self.auto_upgrade_minor_version = auto_upgrade_minor_version - self.settings = settings - self.protected_settings = protected_settings - self.provisioning_state = None - self.instance_view = instance_view diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_extension_update.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_extension_update.py deleted file mode 100644 index b920ff57ff96..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_extension_update.py +++ /dev/null @@ -1,62 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .update_resource import UpdateResource - - -class VirtualMachineExtensionUpdate(UpdateResource): - """Describes a Virtual Machine Extension. - - :param tags: Resource tags - :type tags: dict[str, str] - :param force_update_tag: How the extension handler should be forced to - update even if the extension configuration has not changed. - :type force_update_tag: str - :param publisher: The name of the extension handler publisher. - :type publisher: str - :param type: Specifies the type of the extension; an example is - "CustomScriptExtension". - :type type: str - :param type_handler_version: Specifies the version of the script handler. - :type type_handler_version: str - :param auto_upgrade_minor_version: Indicates whether the extension should - use a newer minor version if one is available at deployment time. Once - deployed, however, the extension will not upgrade minor versions unless - redeployed, even with this property set to true. - :type auto_upgrade_minor_version: bool - :param settings: Json formatted public settings for the extension. - :type settings: object - :param protected_settings: The extension can contain either - protectedSettings or protectedSettingsFromKeyVault or no protected - settings at all. - :type protected_settings: object - """ - - _attribute_map = { - 'tags': {'key': 'tags', 'type': '{str}'}, - 'force_update_tag': {'key': 'properties.forceUpdateTag', 'type': 'str'}, - 'publisher': {'key': 'properties.publisher', 'type': 'str'}, - 'type': {'key': 'properties.type', 'type': 'str'}, - 'type_handler_version': {'key': 'properties.typeHandlerVersion', 'type': 'str'}, - 'auto_upgrade_minor_version': {'key': 'properties.autoUpgradeMinorVersion', 'type': 'bool'}, - 'settings': {'key': 'properties.settings', 'type': 'object'}, - 'protected_settings': {'key': 'properties.protectedSettings', 'type': 'object'}, - } - - def __init__(self, **kwargs): - super(VirtualMachineExtensionUpdate, self).__init__(**kwargs) - self.force_update_tag = kwargs.get('force_update_tag', None) - self.publisher = kwargs.get('publisher', None) - self.type = kwargs.get('type', None) - self.type_handler_version = kwargs.get('type_handler_version', None) - self.auto_upgrade_minor_version = kwargs.get('auto_upgrade_minor_version', None) - self.settings = kwargs.get('settings', None) - self.protected_settings = kwargs.get('protected_settings', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_extension_update_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_extension_update_py3.py deleted file mode 100644 index c32c18d32759..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_extension_update_py3.py +++ /dev/null @@ -1,62 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .update_resource_py3 import UpdateResource - - -class VirtualMachineExtensionUpdate(UpdateResource): - """Describes a Virtual Machine Extension. - - :param tags: Resource tags - :type tags: dict[str, str] - :param force_update_tag: How the extension handler should be forced to - update even if the extension configuration has not changed. - :type force_update_tag: str - :param publisher: The name of the extension handler publisher. - :type publisher: str - :param type: Specifies the type of the extension; an example is - "CustomScriptExtension". - :type type: str - :param type_handler_version: Specifies the version of the script handler. - :type type_handler_version: str - :param auto_upgrade_minor_version: Indicates whether the extension should - use a newer minor version if one is available at deployment time. Once - deployed, however, the extension will not upgrade minor versions unless - redeployed, even with this property set to true. - :type auto_upgrade_minor_version: bool - :param settings: Json formatted public settings for the extension. - :type settings: object - :param protected_settings: The extension can contain either - protectedSettings or protectedSettingsFromKeyVault or no protected - settings at all. - :type protected_settings: object - """ - - _attribute_map = { - 'tags': {'key': 'tags', 'type': '{str}'}, - 'force_update_tag': {'key': 'properties.forceUpdateTag', 'type': 'str'}, - 'publisher': {'key': 'properties.publisher', 'type': 'str'}, - 'type': {'key': 'properties.type', 'type': 'str'}, - 'type_handler_version': {'key': 'properties.typeHandlerVersion', 'type': 'str'}, - 'auto_upgrade_minor_version': {'key': 'properties.autoUpgradeMinorVersion', 'type': 'bool'}, - 'settings': {'key': 'properties.settings', 'type': 'object'}, - 'protected_settings': {'key': 'properties.protectedSettings', 'type': 'object'}, - } - - def __init__(self, *, tags=None, force_update_tag: str=None, publisher: str=None, type: str=None, type_handler_version: str=None, auto_upgrade_minor_version: bool=None, settings=None, protected_settings=None, **kwargs) -> None: - super(VirtualMachineExtensionUpdate, self).__init__(tags=tags, **kwargs) - self.force_update_tag = force_update_tag - self.publisher = publisher - self.type = type - self.type_handler_version = type_handler_version - self.auto_upgrade_minor_version = auto_upgrade_minor_version - self.settings = settings - self.protected_settings = protected_settings diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_extensions_list_result.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_extensions_list_result.py deleted file mode 100644 index 6a6546732af0..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_extensions_list_result.py +++ /dev/null @@ -1,29 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineExtensionsListResult(Model): - """The List Extension operation response. - - :param value: The list of extensions - :type value: - list[~azure.mgmt.compute.v2018_10_01.models.VirtualMachineExtension] - """ - - _attribute_map = { - 'value': {'key': 'value', 'type': '[VirtualMachineExtension]'}, - } - - def __init__(self, **kwargs): - super(VirtualMachineExtensionsListResult, self).__init__(**kwargs) - self.value = kwargs.get('value', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_extensions_list_result_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_extensions_list_result_py3.py deleted file mode 100644 index a58776dab0cd..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_extensions_list_result_py3.py +++ /dev/null @@ -1,29 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineExtensionsListResult(Model): - """The List Extension operation response. - - :param value: The list of extensions - :type value: - list[~azure.mgmt.compute.v2018_10_01.models.VirtualMachineExtension] - """ - - _attribute_map = { - 'value': {'key': 'value', 'type': '[VirtualMachineExtension]'}, - } - - def __init__(self, *, value=None, **kwargs) -> None: - super(VirtualMachineExtensionsListResult, self).__init__(**kwargs) - self.value = value diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_health_status.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_health_status.py deleted file mode 100644 index ea6a76ff400a..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_health_status.py +++ /dev/null @@ -1,35 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineHealthStatus(Model): - """The health status of the VM. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar status: The health status information for the VM. - :vartype status: ~azure.mgmt.compute.v2018_10_01.models.InstanceViewStatus - """ - - _validation = { - 'status': {'readonly': True}, - } - - _attribute_map = { - 'status': {'key': 'status', 'type': 'InstanceViewStatus'}, - } - - def __init__(self, **kwargs): - super(VirtualMachineHealthStatus, self).__init__(**kwargs) - self.status = None diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_health_status_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_health_status_py3.py deleted file mode 100644 index 0f5c003506aa..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_health_status_py3.py +++ /dev/null @@ -1,35 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineHealthStatus(Model): - """The health status of the VM. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar status: The health status information for the VM. - :vartype status: ~azure.mgmt.compute.v2018_10_01.models.InstanceViewStatus - """ - - _validation = { - 'status': {'readonly': True}, - } - - _attribute_map = { - 'status': {'key': 'status', 'type': 'InstanceViewStatus'}, - } - - def __init__(self, **kwargs) -> None: - super(VirtualMachineHealthStatus, self).__init__(**kwargs) - self.status = None diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_identity.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_identity.py deleted file mode 100644 index 57ac63292cef..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_identity.py +++ /dev/null @@ -1,59 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineIdentity(Model): - """Identity for the virtual machine. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar principal_id: The principal id of virtual machine identity. This - property will only be provided for a system assigned identity. - :vartype principal_id: str - :ivar tenant_id: The tenant id associated with the virtual machine. This - property will only be provided for a system assigned identity. - :vartype tenant_id: str - :param type: The type of identity used for the virtual machine. The type - 'SystemAssigned, UserAssigned' includes both an implicitly created - identity and a set of user assigned identities. The type 'None' will - remove any identities from the virtual machine. Possible values include: - 'SystemAssigned', 'UserAssigned', 'SystemAssigned, UserAssigned', 'None' - :type type: str or - ~azure.mgmt.compute.v2018_10_01.models.ResourceIdentityType - :param user_assigned_identities: The list of user identities associated - with the Virtual Machine. The user identity dictionary key references will - be ARM resource ids in the form: - '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'. - :type user_assigned_identities: dict[str, - ~azure.mgmt.compute.v2018_10_01.models.VirtualMachineIdentityUserAssignedIdentitiesValue] - """ - - _validation = { - 'principal_id': {'readonly': True}, - 'tenant_id': {'readonly': True}, - } - - _attribute_map = { - 'principal_id': {'key': 'principalId', 'type': 'str'}, - 'tenant_id': {'key': 'tenantId', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'ResourceIdentityType'}, - 'user_assigned_identities': {'key': 'userAssignedIdentities', 'type': '{VirtualMachineIdentityUserAssignedIdentitiesValue}'}, - } - - def __init__(self, **kwargs): - super(VirtualMachineIdentity, self).__init__(**kwargs) - self.principal_id = None - self.tenant_id = None - self.type = kwargs.get('type', None) - self.user_assigned_identities = kwargs.get('user_assigned_identities', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_identity_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_identity_py3.py deleted file mode 100644 index b66f9dc5e4e1..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_identity_py3.py +++ /dev/null @@ -1,59 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineIdentity(Model): - """Identity for the virtual machine. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar principal_id: The principal id of virtual machine identity. This - property will only be provided for a system assigned identity. - :vartype principal_id: str - :ivar tenant_id: The tenant id associated with the virtual machine. This - property will only be provided for a system assigned identity. - :vartype tenant_id: str - :param type: The type of identity used for the virtual machine. The type - 'SystemAssigned, UserAssigned' includes both an implicitly created - identity and a set of user assigned identities. The type 'None' will - remove any identities from the virtual machine. Possible values include: - 'SystemAssigned', 'UserAssigned', 'SystemAssigned, UserAssigned', 'None' - :type type: str or - ~azure.mgmt.compute.v2018_10_01.models.ResourceIdentityType - :param user_assigned_identities: The list of user identities associated - with the Virtual Machine. The user identity dictionary key references will - be ARM resource ids in the form: - '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'. - :type user_assigned_identities: dict[str, - ~azure.mgmt.compute.v2018_10_01.models.VirtualMachineIdentityUserAssignedIdentitiesValue] - """ - - _validation = { - 'principal_id': {'readonly': True}, - 'tenant_id': {'readonly': True}, - } - - _attribute_map = { - 'principal_id': {'key': 'principalId', 'type': 'str'}, - 'tenant_id': {'key': 'tenantId', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'ResourceIdentityType'}, - 'user_assigned_identities': {'key': 'userAssignedIdentities', 'type': '{VirtualMachineIdentityUserAssignedIdentitiesValue}'}, - } - - def __init__(self, *, type=None, user_assigned_identities=None, **kwargs) -> None: - super(VirtualMachineIdentity, self).__init__(**kwargs) - self.principal_id = None - self.tenant_id = None - self.type = type - self.user_assigned_identities = user_assigned_identities diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_identity_user_assigned_identities_value.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_identity_user_assigned_identities_value.py deleted file mode 100644 index 8df9f5c86f49..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_identity_user_assigned_identities_value.py +++ /dev/null @@ -1,40 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineIdentityUserAssignedIdentitiesValue(Model): - """VirtualMachineIdentityUserAssignedIdentitiesValue. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar principal_id: The principal id of user assigned identity. - :vartype principal_id: str - :ivar client_id: The client id of user assigned identity. - :vartype client_id: str - """ - - _validation = { - 'principal_id': {'readonly': True}, - 'client_id': {'readonly': True}, - } - - _attribute_map = { - 'principal_id': {'key': 'principalId', 'type': 'str'}, - 'client_id': {'key': 'clientId', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(VirtualMachineIdentityUserAssignedIdentitiesValue, self).__init__(**kwargs) - self.principal_id = None - self.client_id = None diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_identity_user_assigned_identities_value_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_identity_user_assigned_identities_value_py3.py deleted file mode 100644 index 0921bb643ccf..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_identity_user_assigned_identities_value_py3.py +++ /dev/null @@ -1,40 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineIdentityUserAssignedIdentitiesValue(Model): - """VirtualMachineIdentityUserAssignedIdentitiesValue. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar principal_id: The principal id of user assigned identity. - :vartype principal_id: str - :ivar client_id: The client id of user assigned identity. - :vartype client_id: str - """ - - _validation = { - 'principal_id': {'readonly': True}, - 'client_id': {'readonly': True}, - } - - _attribute_map = { - 'principal_id': {'key': 'principalId', 'type': 'str'}, - 'client_id': {'key': 'clientId', 'type': 'str'}, - } - - def __init__(self, **kwargs) -> None: - super(VirtualMachineIdentityUserAssignedIdentitiesValue, self).__init__(**kwargs) - self.principal_id = None - self.client_id = None diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_image.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_image.py deleted file mode 100644 index 9fba8ad6bd3b..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_image.py +++ /dev/null @@ -1,64 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .virtual_machine_image_resource import VirtualMachineImageResource - - -class VirtualMachineImage(VirtualMachineImageResource): - """Describes a Virtual Machine Image. - - All required parameters must be populated in order to send to Azure. - - :param id: Resource Id - :type id: str - :param name: Required. The name of the resource. - :type name: str - :param location: Required. The supported Azure location of the resource. - :type location: str - :param tags: Specifies the tags that are assigned to the virtual machine. - For more information about using tags, see [Using tags to organize your - Azure - resources](https://docs.microsoft.com/azure/azure-resource-manager/resource-group-using-tags.md). - :type tags: dict[str, str] - :param plan: - :type plan: ~azure.mgmt.compute.v2018_10_01.models.PurchasePlan - :param os_disk_image: - :type os_disk_image: ~azure.mgmt.compute.v2018_10_01.models.OSDiskImage - :param data_disk_images: - :type data_disk_images: - list[~azure.mgmt.compute.v2018_10_01.models.DataDiskImage] - :param automatic_os_upgrade_properties: - :type automatic_os_upgrade_properties: - ~azure.mgmt.compute.v2018_10_01.models.AutomaticOSUpgradeProperties - """ - - _validation = { - 'name': {'required': True}, - 'location': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'plan': {'key': 'properties.plan', 'type': 'PurchasePlan'}, - 'os_disk_image': {'key': 'properties.osDiskImage', 'type': 'OSDiskImage'}, - 'data_disk_images': {'key': 'properties.dataDiskImages', 'type': '[DataDiskImage]'}, - 'automatic_os_upgrade_properties': {'key': 'properties.automaticOSUpgradeProperties', 'type': 'AutomaticOSUpgradeProperties'}, - } - - def __init__(self, **kwargs): - super(VirtualMachineImage, self).__init__(**kwargs) - self.plan = kwargs.get('plan', None) - self.os_disk_image = kwargs.get('os_disk_image', None) - self.data_disk_images = kwargs.get('data_disk_images', None) - self.automatic_os_upgrade_properties = kwargs.get('automatic_os_upgrade_properties', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_image_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_image_py3.py deleted file mode 100644 index 8a6bf2baea0e..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_image_py3.py +++ /dev/null @@ -1,64 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .virtual_machine_image_resource_py3 import VirtualMachineImageResource - - -class VirtualMachineImage(VirtualMachineImageResource): - """Describes a Virtual Machine Image. - - All required parameters must be populated in order to send to Azure. - - :param id: Resource Id - :type id: str - :param name: Required. The name of the resource. - :type name: str - :param location: Required. The supported Azure location of the resource. - :type location: str - :param tags: Specifies the tags that are assigned to the virtual machine. - For more information about using tags, see [Using tags to organize your - Azure - resources](https://docs.microsoft.com/azure/azure-resource-manager/resource-group-using-tags.md). - :type tags: dict[str, str] - :param plan: - :type plan: ~azure.mgmt.compute.v2018_10_01.models.PurchasePlan - :param os_disk_image: - :type os_disk_image: ~azure.mgmt.compute.v2018_10_01.models.OSDiskImage - :param data_disk_images: - :type data_disk_images: - list[~azure.mgmt.compute.v2018_10_01.models.DataDiskImage] - :param automatic_os_upgrade_properties: - :type automatic_os_upgrade_properties: - ~azure.mgmt.compute.v2018_10_01.models.AutomaticOSUpgradeProperties - """ - - _validation = { - 'name': {'required': True}, - 'location': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'plan': {'key': 'properties.plan', 'type': 'PurchasePlan'}, - 'os_disk_image': {'key': 'properties.osDiskImage', 'type': 'OSDiskImage'}, - 'data_disk_images': {'key': 'properties.dataDiskImages', 'type': '[DataDiskImage]'}, - 'automatic_os_upgrade_properties': {'key': 'properties.automaticOSUpgradeProperties', 'type': 'AutomaticOSUpgradeProperties'}, - } - - def __init__(self, *, name: str, location: str, id: str=None, tags=None, plan=None, os_disk_image=None, data_disk_images=None, automatic_os_upgrade_properties=None, **kwargs) -> None: - super(VirtualMachineImage, self).__init__(id=id, name=name, location=location, tags=tags, **kwargs) - self.plan = plan - self.os_disk_image = os_disk_image - self.data_disk_images = data_disk_images - self.automatic_os_upgrade_properties = automatic_os_upgrade_properties diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_image_resource.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_image_resource.py deleted file mode 100644 index 8807cc8f391b..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_image_resource.py +++ /dev/null @@ -1,49 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .sub_resource import SubResource - - -class VirtualMachineImageResource(SubResource): - """Virtual machine image resource information. - - All required parameters must be populated in order to send to Azure. - - :param id: Resource Id - :type id: str - :param name: Required. The name of the resource. - :type name: str - :param location: Required. The supported Azure location of the resource. - :type location: str - :param tags: Specifies the tags that are assigned to the virtual machine. - For more information about using tags, see [Using tags to organize your - Azure - resources](https://docs.microsoft.com/azure/azure-resource-manager/resource-group-using-tags.md). - :type tags: dict[str, str] - """ - - _validation = { - 'name': {'required': True}, - 'location': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - } - - def __init__(self, **kwargs): - super(VirtualMachineImageResource, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.location = kwargs.get('location', None) - self.tags = kwargs.get('tags', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_image_resource_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_image_resource_py3.py deleted file mode 100644 index b9d63a8bc9e0..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_image_resource_py3.py +++ /dev/null @@ -1,49 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .sub_resource_py3 import SubResource - - -class VirtualMachineImageResource(SubResource): - """Virtual machine image resource information. - - All required parameters must be populated in order to send to Azure. - - :param id: Resource Id - :type id: str - :param name: Required. The name of the resource. - :type name: str - :param location: Required. The supported Azure location of the resource. - :type location: str - :param tags: Specifies the tags that are assigned to the virtual machine. - For more information about using tags, see [Using tags to organize your - Azure - resources](https://docs.microsoft.com/azure/azure-resource-manager/resource-group-using-tags.md). - :type tags: dict[str, str] - """ - - _validation = { - 'name': {'required': True}, - 'location': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - } - - def __init__(self, *, name: str, location: str, id: str=None, tags=None, **kwargs) -> None: - super(VirtualMachineImageResource, self).__init__(id=id, **kwargs) - self.name = name - self.location = location - self.tags = tags diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_instance_view.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_instance_view.py deleted file mode 100644 index e7607023c6a8..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_instance_view.py +++ /dev/null @@ -1,84 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineInstanceView(Model): - """The instance view of a virtual machine. - - :param platform_update_domain: Specifies the update domain of the virtual - machine. - :type platform_update_domain: int - :param platform_fault_domain: Specifies the fault domain of the virtual - machine. - :type platform_fault_domain: int - :param computer_name: The computer name assigned to the virtual machine. - :type computer_name: str - :param os_name: The Operating System running on the virtual machine. - :type os_name: str - :param os_version: The version of Operating System running on the virtual - machine. - :type os_version: str - :param rdp_thumb_print: The Remote desktop certificate thumbprint. - :type rdp_thumb_print: str - :param vm_agent: The VM Agent running on the virtual machine. - :type vm_agent: - ~azure.mgmt.compute.v2018_10_01.models.VirtualMachineAgentInstanceView - :param maintenance_redeploy_status: The Maintenance Operation status on - the virtual machine. - :type maintenance_redeploy_status: - ~azure.mgmt.compute.v2018_10_01.models.MaintenanceRedeployStatus - :param disks: The virtual machine disk information. - :type disks: list[~azure.mgmt.compute.v2018_10_01.models.DiskInstanceView] - :param extensions: The extensions information. - :type extensions: - list[~azure.mgmt.compute.v2018_10_01.models.VirtualMachineExtensionInstanceView] - :param boot_diagnostics: Boot Diagnostics is a debugging feature which - allows you to view Console Output and Screenshot to diagnose VM status. -

    You can easily view the output of your console log.

    - Azure also enables you to see a screenshot of the VM from the hypervisor. - :type boot_diagnostics: - ~azure.mgmt.compute.v2018_10_01.models.BootDiagnosticsInstanceView - :param statuses: The resource status information. - :type statuses: - list[~azure.mgmt.compute.v2018_10_01.models.InstanceViewStatus] - """ - - _attribute_map = { - 'platform_update_domain': {'key': 'platformUpdateDomain', 'type': 'int'}, - 'platform_fault_domain': {'key': 'platformFaultDomain', 'type': 'int'}, - 'computer_name': {'key': 'computerName', 'type': 'str'}, - 'os_name': {'key': 'osName', 'type': 'str'}, - 'os_version': {'key': 'osVersion', 'type': 'str'}, - 'rdp_thumb_print': {'key': 'rdpThumbPrint', 'type': 'str'}, - 'vm_agent': {'key': 'vmAgent', 'type': 'VirtualMachineAgentInstanceView'}, - 'maintenance_redeploy_status': {'key': 'maintenanceRedeployStatus', 'type': 'MaintenanceRedeployStatus'}, - 'disks': {'key': 'disks', 'type': '[DiskInstanceView]'}, - 'extensions': {'key': 'extensions', 'type': '[VirtualMachineExtensionInstanceView]'}, - 'boot_diagnostics': {'key': 'bootDiagnostics', 'type': 'BootDiagnosticsInstanceView'}, - 'statuses': {'key': 'statuses', 'type': '[InstanceViewStatus]'}, - } - - def __init__(self, **kwargs): - super(VirtualMachineInstanceView, self).__init__(**kwargs) - self.platform_update_domain = kwargs.get('platform_update_domain', None) - self.platform_fault_domain = kwargs.get('platform_fault_domain', None) - self.computer_name = kwargs.get('computer_name', None) - self.os_name = kwargs.get('os_name', None) - self.os_version = kwargs.get('os_version', None) - self.rdp_thumb_print = kwargs.get('rdp_thumb_print', None) - self.vm_agent = kwargs.get('vm_agent', None) - self.maintenance_redeploy_status = kwargs.get('maintenance_redeploy_status', None) - self.disks = kwargs.get('disks', None) - self.extensions = kwargs.get('extensions', None) - self.boot_diagnostics = kwargs.get('boot_diagnostics', None) - self.statuses = kwargs.get('statuses', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_instance_view_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_instance_view_py3.py deleted file mode 100644 index 5d08ff052a7e..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_instance_view_py3.py +++ /dev/null @@ -1,84 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineInstanceView(Model): - """The instance view of a virtual machine. - - :param platform_update_domain: Specifies the update domain of the virtual - machine. - :type platform_update_domain: int - :param platform_fault_domain: Specifies the fault domain of the virtual - machine. - :type platform_fault_domain: int - :param computer_name: The computer name assigned to the virtual machine. - :type computer_name: str - :param os_name: The Operating System running on the virtual machine. - :type os_name: str - :param os_version: The version of Operating System running on the virtual - machine. - :type os_version: str - :param rdp_thumb_print: The Remote desktop certificate thumbprint. - :type rdp_thumb_print: str - :param vm_agent: The VM Agent running on the virtual machine. - :type vm_agent: - ~azure.mgmt.compute.v2018_10_01.models.VirtualMachineAgentInstanceView - :param maintenance_redeploy_status: The Maintenance Operation status on - the virtual machine. - :type maintenance_redeploy_status: - ~azure.mgmt.compute.v2018_10_01.models.MaintenanceRedeployStatus - :param disks: The virtual machine disk information. - :type disks: list[~azure.mgmt.compute.v2018_10_01.models.DiskInstanceView] - :param extensions: The extensions information. - :type extensions: - list[~azure.mgmt.compute.v2018_10_01.models.VirtualMachineExtensionInstanceView] - :param boot_diagnostics: Boot Diagnostics is a debugging feature which - allows you to view Console Output and Screenshot to diagnose VM status. -

    You can easily view the output of your console log.

    - Azure also enables you to see a screenshot of the VM from the hypervisor. - :type boot_diagnostics: - ~azure.mgmt.compute.v2018_10_01.models.BootDiagnosticsInstanceView - :param statuses: The resource status information. - :type statuses: - list[~azure.mgmt.compute.v2018_10_01.models.InstanceViewStatus] - """ - - _attribute_map = { - 'platform_update_domain': {'key': 'platformUpdateDomain', 'type': 'int'}, - 'platform_fault_domain': {'key': 'platformFaultDomain', 'type': 'int'}, - 'computer_name': {'key': 'computerName', 'type': 'str'}, - 'os_name': {'key': 'osName', 'type': 'str'}, - 'os_version': {'key': 'osVersion', 'type': 'str'}, - 'rdp_thumb_print': {'key': 'rdpThumbPrint', 'type': 'str'}, - 'vm_agent': {'key': 'vmAgent', 'type': 'VirtualMachineAgentInstanceView'}, - 'maintenance_redeploy_status': {'key': 'maintenanceRedeployStatus', 'type': 'MaintenanceRedeployStatus'}, - 'disks': {'key': 'disks', 'type': '[DiskInstanceView]'}, - 'extensions': {'key': 'extensions', 'type': '[VirtualMachineExtensionInstanceView]'}, - 'boot_diagnostics': {'key': 'bootDiagnostics', 'type': 'BootDiagnosticsInstanceView'}, - 'statuses': {'key': 'statuses', 'type': '[InstanceViewStatus]'}, - } - - def __init__(self, *, platform_update_domain: int=None, platform_fault_domain: int=None, computer_name: str=None, os_name: str=None, os_version: str=None, rdp_thumb_print: str=None, vm_agent=None, maintenance_redeploy_status=None, disks=None, extensions=None, boot_diagnostics=None, statuses=None, **kwargs) -> None: - super(VirtualMachineInstanceView, self).__init__(**kwargs) - self.platform_update_domain = platform_update_domain - self.platform_fault_domain = platform_fault_domain - self.computer_name = computer_name - self.os_name = os_name - self.os_version = os_version - self.rdp_thumb_print = rdp_thumb_print - self.vm_agent = vm_agent - self.maintenance_redeploy_status = maintenance_redeploy_status - self.disks = disks - self.extensions = extensions - self.boot_diagnostics = boot_diagnostics - self.statuses = statuses diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_paged.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_paged.py deleted file mode 100644 index d18284dc47df..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class VirtualMachinePaged(Paged): - """ - A paging container for iterating over a list of :class:`VirtualMachine ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[VirtualMachine]'} - } - - def __init__(self, *args, **kwargs): - - super(VirtualMachinePaged, self).__init__(*args, **kwargs) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_py3.py deleted file mode 100644 index b056f2170b0b..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_py3.py +++ /dev/null @@ -1,163 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource_py3 import Resource - - -class VirtualMachine(Resource): - """Describes a Virtual Machine. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource Id - :vartype id: str - :ivar name: Resource name - :vartype name: str - :ivar type: Resource type - :vartype type: str - :param location: Required. Resource location - :type location: str - :param tags: Resource tags - :type tags: dict[str, str] - :param plan: Specifies information about the marketplace image used to - create the virtual machine. This element is only used for marketplace - images. Before you can use a marketplace image from an API, you must - enable the image for programmatic use. In the Azure portal, find the - marketplace image that you want to use and then click **Want to deploy - programmatically, Get Started ->**. Enter any required information and - then click **Save**. - :type plan: ~azure.mgmt.compute.v2018_10_01.models.Plan - :param hardware_profile: Specifies the hardware settings for the virtual - machine. - :type hardware_profile: - ~azure.mgmt.compute.v2018_10_01.models.HardwareProfile - :param storage_profile: Specifies the storage settings for the virtual - machine disks. - :type storage_profile: - ~azure.mgmt.compute.v2018_10_01.models.StorageProfile - :param additional_capabilities: Specifies additional capabilities enabled - or disabled on the virtual machine. - :type additional_capabilities: - ~azure.mgmt.compute.v2018_10_01.models.AdditionalCapabilities - :param os_profile: Specifies the operating system settings for the virtual - machine. - :type os_profile: ~azure.mgmt.compute.v2018_10_01.models.OSProfile - :param network_profile: Specifies the network interfaces of the virtual - machine. - :type network_profile: - ~azure.mgmt.compute.v2018_10_01.models.NetworkProfile - :param diagnostics_profile: Specifies the boot diagnostic settings state. -

    Minimum api-version: 2015-06-15. - :type diagnostics_profile: - ~azure.mgmt.compute.v2018_10_01.models.DiagnosticsProfile - :param availability_set: Specifies information about the availability set - that the virtual machine should be assigned to. Virtual machines specified - in the same availability set are allocated to different nodes to maximize - availability. For more information about availability sets, see [Manage - the availability of virtual - machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-manage-availability?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). -

    For more information on Azure planned maintenance, see [Planned - maintenance for virtual machines in - Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-planned-maintenance?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json) -

    Currently, a VM can only be added to availability set at creation - time. An existing VM cannot be added to an availability set. - :type availability_set: ~azure.mgmt.compute.v2018_10_01.models.SubResource - :param proximity_placement_group: Specifies information about the - proximity placement group that the virtual machine should be assigned to. -

    Minimum api-version: 2018-04-01. - :type proximity_placement_group: - ~azure.mgmt.compute.v2018_10_01.models.SubResource - :ivar provisioning_state: The provisioning state, which only appears in - the response. - :vartype provisioning_state: str - :ivar instance_view: The virtual machine instance view. - :vartype instance_view: - ~azure.mgmt.compute.v2018_10_01.models.VirtualMachineInstanceView - :param license_type: Specifies that the image or disk that is being used - was licensed on-premises. This element is only used for images that - contain the Windows Server operating system.

    Possible values are: -

    Windows_Client

    Windows_Server

    If this element - is included in a request for an update, the value must match the initial - value. This value cannot be updated.

    For more information, see - [Azure Hybrid Use Benefit for Windows - Server](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-hybrid-use-benefit-licensing?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json) -

    Minimum api-version: 2015-06-15 - :type license_type: str - :ivar vm_id: Specifies the VM unique ID which is a 128-bits identifier - that is encoded and stored in all Azure IaaS VMs SMBIOS and can be read - using platform BIOS commands. - :vartype vm_id: str - :ivar resources: The virtual machine child extension resources. - :vartype resources: - list[~azure.mgmt.compute.v2018_10_01.models.VirtualMachineExtension] - :param identity: The identity of the virtual machine, if configured. - :type identity: - ~azure.mgmt.compute.v2018_10_01.models.VirtualMachineIdentity - :param zones: The virtual machine zones. - :type zones: list[str] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - 'provisioning_state': {'readonly': True}, - 'instance_view': {'readonly': True}, - 'vm_id': {'readonly': True}, - 'resources': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'plan': {'key': 'plan', 'type': 'Plan'}, - 'hardware_profile': {'key': 'properties.hardwareProfile', 'type': 'HardwareProfile'}, - 'storage_profile': {'key': 'properties.storageProfile', 'type': 'StorageProfile'}, - 'additional_capabilities': {'key': 'properties.additionalCapabilities', 'type': 'AdditionalCapabilities'}, - 'os_profile': {'key': 'properties.osProfile', 'type': 'OSProfile'}, - 'network_profile': {'key': 'properties.networkProfile', 'type': 'NetworkProfile'}, - 'diagnostics_profile': {'key': 'properties.diagnosticsProfile', 'type': 'DiagnosticsProfile'}, - 'availability_set': {'key': 'properties.availabilitySet', 'type': 'SubResource'}, - 'proximity_placement_group': {'key': 'properties.proximityPlacementGroup', 'type': 'SubResource'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'instance_view': {'key': 'properties.instanceView', 'type': 'VirtualMachineInstanceView'}, - 'license_type': {'key': 'properties.licenseType', 'type': 'str'}, - 'vm_id': {'key': 'properties.vmId', 'type': 'str'}, - 'resources': {'key': 'resources', 'type': '[VirtualMachineExtension]'}, - 'identity': {'key': 'identity', 'type': 'VirtualMachineIdentity'}, - 'zones': {'key': 'zones', 'type': '[str]'}, - } - - def __init__(self, *, location: str, tags=None, plan=None, hardware_profile=None, storage_profile=None, additional_capabilities=None, os_profile=None, network_profile=None, diagnostics_profile=None, availability_set=None, proximity_placement_group=None, license_type: str=None, identity=None, zones=None, **kwargs) -> None: - super(VirtualMachine, self).__init__(location=location, tags=tags, **kwargs) - self.plan = plan - self.hardware_profile = hardware_profile - self.storage_profile = storage_profile - self.additional_capabilities = additional_capabilities - self.os_profile = os_profile - self.network_profile = network_profile - self.diagnostics_profile = diagnostics_profile - self.availability_set = availability_set - self.proximity_placement_group = proximity_placement_group - self.provisioning_state = None - self.instance_view = None - self.license_type = license_type - self.vm_id = None - self.resources = None - self.identity = identity - self.zones = zones diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_reimage_parameters.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_reimage_parameters.py deleted file mode 100644 index bfc329724f61..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_reimage_parameters.py +++ /dev/null @@ -1,30 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineReimageParameters(Model): - """Parameters for Reimaging Virtual Machine. NOTE: Virtual Machine OS disk - will always be reimaged. - - :param temp_disk: Specifies whether to reimage temp disk. Default value: - false. - :type temp_disk: bool - """ - - _attribute_map = { - 'temp_disk': {'key': 'tempDisk', 'type': 'bool'}, - } - - def __init__(self, **kwargs): - super(VirtualMachineReimageParameters, self).__init__(**kwargs) - self.temp_disk = kwargs.get('temp_disk', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_reimage_parameters_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_reimage_parameters_py3.py deleted file mode 100644 index f1e8bf91ce2a..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_reimage_parameters_py3.py +++ /dev/null @@ -1,30 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineReimageParameters(Model): - """Parameters for Reimaging Virtual Machine. NOTE: Virtual Machine OS disk - will always be reimaged. - - :param temp_disk: Specifies whether to reimage temp disk. Default value: - false. - :type temp_disk: bool - """ - - _attribute_map = { - 'temp_disk': {'key': 'tempDisk', 'type': 'bool'}, - } - - def __init__(self, *, temp_disk: bool=None, **kwargs) -> None: - super(VirtualMachineReimageParameters, self).__init__(**kwargs) - self.temp_disk = temp_disk diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_scale_set.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_scale_set.py deleted file mode 100644 index 760a285aae12..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_scale_set.py +++ /dev/null @@ -1,130 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource import Resource - - -class VirtualMachineScaleSet(Resource): - """Describes a Virtual Machine Scale Set. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource Id - :vartype id: str - :ivar name: Resource name - :vartype name: str - :ivar type: Resource type - :vartype type: str - :param location: Required. Resource location - :type location: str - :param tags: Resource tags - :type tags: dict[str, str] - :param sku: The virtual machine scale set sku. - :type sku: ~azure.mgmt.compute.v2018_10_01.models.Sku - :param plan: Specifies information about the marketplace image used to - create the virtual machine. This element is only used for marketplace - images. Before you can use a marketplace image from an API, you must - enable the image for programmatic use. In the Azure portal, find the - marketplace image that you want to use and then click **Want to deploy - programmatically, Get Started ->**. Enter any required information and - then click **Save**. - :type plan: ~azure.mgmt.compute.v2018_10_01.models.Plan - :param upgrade_policy: The upgrade policy. - :type upgrade_policy: ~azure.mgmt.compute.v2018_10_01.models.UpgradePolicy - :param virtual_machine_profile: The virtual machine profile. - :type virtual_machine_profile: - ~azure.mgmt.compute.v2018_10_01.models.VirtualMachineScaleSetVMProfile - :ivar provisioning_state: The provisioning state, which only appears in - the response. - :vartype provisioning_state: str - :param overprovision: Specifies whether the Virtual Machine Scale Set - should be overprovisioned. - :type overprovision: bool - :param do_not_run_extensions_on_overprovisioned_vms: When Overprovision is - enabled, extensions are launched only on the requested number of VMs which - are finally kept. This property will hence ensure that the extensions do - not run on the extra overprovisioned VMs. - :type do_not_run_extensions_on_overprovisioned_vms: bool - :ivar unique_id: Specifies the ID which uniquely identifies a Virtual - Machine Scale Set. - :vartype unique_id: str - :param single_placement_group: When true this limits the scale set to a - single placement group, of max size 100 virtual machines. - :type single_placement_group: bool - :param zone_balance: Whether to force strictly even Virtual Machine - distribution cross x-zones in case there is zone outage. - :type zone_balance: bool - :param platform_fault_domain_count: Fault Domain count for each placement - group. - :type platform_fault_domain_count: int - :param proximity_placement_group: Specifies information about the - proximity placement group that the virtual machine scale set should be - assigned to.

    Minimum api-version: 2018-04-01. - :type proximity_placement_group: - ~azure.mgmt.compute.v2018_10_01.models.SubResource - :param identity: The identity of the virtual machine scale set, if - configured. - :type identity: - ~azure.mgmt.compute.v2018_10_01.models.VirtualMachineScaleSetIdentity - :param zones: The virtual machine scale set zones. - :type zones: list[str] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - 'provisioning_state': {'readonly': True}, - 'unique_id': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'sku': {'key': 'sku', 'type': 'Sku'}, - 'plan': {'key': 'plan', 'type': 'Plan'}, - 'upgrade_policy': {'key': 'properties.upgradePolicy', 'type': 'UpgradePolicy'}, - 'virtual_machine_profile': {'key': 'properties.virtualMachineProfile', 'type': 'VirtualMachineScaleSetVMProfile'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'overprovision': {'key': 'properties.overprovision', 'type': 'bool'}, - 'do_not_run_extensions_on_overprovisioned_vms': {'key': 'properties.doNotRunExtensionsOnOverprovisionedVMs', 'type': 'bool'}, - 'unique_id': {'key': 'properties.uniqueId', 'type': 'str'}, - 'single_placement_group': {'key': 'properties.singlePlacementGroup', 'type': 'bool'}, - 'zone_balance': {'key': 'properties.zoneBalance', 'type': 'bool'}, - 'platform_fault_domain_count': {'key': 'properties.platformFaultDomainCount', 'type': 'int'}, - 'proximity_placement_group': {'key': 'properties.proximityPlacementGroup', 'type': 'SubResource'}, - 'identity': {'key': 'identity', 'type': 'VirtualMachineScaleSetIdentity'}, - 'zones': {'key': 'zones', 'type': '[str]'}, - } - - def __init__(self, **kwargs): - super(VirtualMachineScaleSet, self).__init__(**kwargs) - self.sku = kwargs.get('sku', None) - self.plan = kwargs.get('plan', None) - self.upgrade_policy = kwargs.get('upgrade_policy', None) - self.virtual_machine_profile = kwargs.get('virtual_machine_profile', None) - self.provisioning_state = None - self.overprovision = kwargs.get('overprovision', None) - self.do_not_run_extensions_on_overprovisioned_vms = kwargs.get('do_not_run_extensions_on_overprovisioned_vms', None) - self.unique_id = None - self.single_placement_group = kwargs.get('single_placement_group', None) - self.zone_balance = kwargs.get('zone_balance', None) - self.platform_fault_domain_count = kwargs.get('platform_fault_domain_count', None) - self.proximity_placement_group = kwargs.get('proximity_placement_group', None) - self.identity = kwargs.get('identity', None) - self.zones = kwargs.get('zones', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_scale_set_data_disk.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_scale_set_data_disk.py deleted file mode 100644 index 6cbb2a72dc8a..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_scale_set_data_disk.py +++ /dev/null @@ -1,70 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineScaleSetDataDisk(Model): - """Describes a virtual machine scale set data disk. - - All required parameters must be populated in order to send to Azure. - - :param name: The disk name. - :type name: str - :param lun: Required. Specifies the logical unit number of the data disk. - This value is used to identify data disks within the VM and therefore must - be unique for each data disk attached to a VM. - :type lun: int - :param caching: Specifies the caching requirements.

    Possible - values are:

    **None**

    **ReadOnly**

    **ReadWrite** -

    Default: **None for Standard storage. ReadOnly for Premium - storage**. Possible values include: 'None', 'ReadOnly', 'ReadWrite' - :type caching: str or ~azure.mgmt.compute.v2018_10_01.models.CachingTypes - :param write_accelerator_enabled: Specifies whether writeAccelerator - should be enabled or disabled on the disk. - :type write_accelerator_enabled: bool - :param create_option: Required. The create option. Possible values - include: 'FromImage', 'Empty', 'Attach' - :type create_option: str or - ~azure.mgmt.compute.v2018_10_01.models.DiskCreateOptionTypes - :param disk_size_gb: Specifies the size of an empty data disk in - gigabytes. This element can be used to overwrite the size of the disk in a - virtual machine image.

    This value cannot be larger than 1023 GB - :type disk_size_gb: int - :param managed_disk: The managed disk parameters. - :type managed_disk: - ~azure.mgmt.compute.v2018_10_01.models.VirtualMachineScaleSetManagedDiskParameters - """ - - _validation = { - 'lun': {'required': True}, - 'create_option': {'required': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'lun': {'key': 'lun', 'type': 'int'}, - 'caching': {'key': 'caching', 'type': 'CachingTypes'}, - 'write_accelerator_enabled': {'key': 'writeAcceleratorEnabled', 'type': 'bool'}, - 'create_option': {'key': 'createOption', 'type': 'str'}, - 'disk_size_gb': {'key': 'diskSizeGB', 'type': 'int'}, - 'managed_disk': {'key': 'managedDisk', 'type': 'VirtualMachineScaleSetManagedDiskParameters'}, - } - - def __init__(self, **kwargs): - super(VirtualMachineScaleSetDataDisk, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.lun = kwargs.get('lun', None) - self.caching = kwargs.get('caching', None) - self.write_accelerator_enabled = kwargs.get('write_accelerator_enabled', None) - self.create_option = kwargs.get('create_option', None) - self.disk_size_gb = kwargs.get('disk_size_gb', None) - self.managed_disk = kwargs.get('managed_disk', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_scale_set_data_disk_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_scale_set_data_disk_py3.py deleted file mode 100644 index 0c630fa79251..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_scale_set_data_disk_py3.py +++ /dev/null @@ -1,70 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineScaleSetDataDisk(Model): - """Describes a virtual machine scale set data disk. - - All required parameters must be populated in order to send to Azure. - - :param name: The disk name. - :type name: str - :param lun: Required. Specifies the logical unit number of the data disk. - This value is used to identify data disks within the VM and therefore must - be unique for each data disk attached to a VM. - :type lun: int - :param caching: Specifies the caching requirements.

    Possible - values are:

    **None**

    **ReadOnly**

    **ReadWrite** -

    Default: **None for Standard storage. ReadOnly for Premium - storage**. Possible values include: 'None', 'ReadOnly', 'ReadWrite' - :type caching: str or ~azure.mgmt.compute.v2018_10_01.models.CachingTypes - :param write_accelerator_enabled: Specifies whether writeAccelerator - should be enabled or disabled on the disk. - :type write_accelerator_enabled: bool - :param create_option: Required. The create option. Possible values - include: 'FromImage', 'Empty', 'Attach' - :type create_option: str or - ~azure.mgmt.compute.v2018_10_01.models.DiskCreateOptionTypes - :param disk_size_gb: Specifies the size of an empty data disk in - gigabytes. This element can be used to overwrite the size of the disk in a - virtual machine image.

    This value cannot be larger than 1023 GB - :type disk_size_gb: int - :param managed_disk: The managed disk parameters. - :type managed_disk: - ~azure.mgmt.compute.v2018_10_01.models.VirtualMachineScaleSetManagedDiskParameters - """ - - _validation = { - 'lun': {'required': True}, - 'create_option': {'required': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'lun': {'key': 'lun', 'type': 'int'}, - 'caching': {'key': 'caching', 'type': 'CachingTypes'}, - 'write_accelerator_enabled': {'key': 'writeAcceleratorEnabled', 'type': 'bool'}, - 'create_option': {'key': 'createOption', 'type': 'str'}, - 'disk_size_gb': {'key': 'diskSizeGB', 'type': 'int'}, - 'managed_disk': {'key': 'managedDisk', 'type': 'VirtualMachineScaleSetManagedDiskParameters'}, - } - - def __init__(self, *, lun: int, create_option, name: str=None, caching=None, write_accelerator_enabled: bool=None, disk_size_gb: int=None, managed_disk=None, **kwargs) -> None: - super(VirtualMachineScaleSetDataDisk, self).__init__(**kwargs) - self.name = name - self.lun = lun - self.caching = caching - self.write_accelerator_enabled = write_accelerator_enabled - self.create_option = create_option - self.disk_size_gb = disk_size_gb - self.managed_disk = managed_disk diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_scale_set_extension.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_scale_set_extension.py deleted file mode 100644 index 206e7a851351..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_scale_set_extension.py +++ /dev/null @@ -1,85 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .sub_resource_read_only import SubResourceReadOnly - - -class VirtualMachineScaleSetExtension(SubResourceReadOnly): - """Describes a Virtual Machine Scale Set Extension. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource Id - :vartype id: str - :param name: The name of the extension. - :type name: str - :param force_update_tag: If a value is provided and is different from the - previous value, the extension handler will be forced to update even if the - extension configuration has not changed. - :type force_update_tag: str - :param publisher: The name of the extension handler publisher. - :type publisher: str - :param type: Specifies the type of the extension; an example is - "CustomScriptExtension". - :type type: str - :param type_handler_version: Specifies the version of the script handler. - :type type_handler_version: str - :param auto_upgrade_minor_version: Indicates whether the extension should - use a newer minor version if one is available at deployment time. Once - deployed, however, the extension will not upgrade minor versions unless - redeployed, even with this property set to true. - :type auto_upgrade_minor_version: bool - :param settings: Json formatted public settings for the extension. - :type settings: object - :param protected_settings: The extension can contain either - protectedSettings or protectedSettingsFromKeyVault or no protected - settings at all. - :type protected_settings: object - :ivar provisioning_state: The provisioning state, which only appears in - the response. - :vartype provisioning_state: str - :param provision_after_extensions: Collection of extension names after - which this extension needs to be provisioned. - :type provision_after_extensions: list[str] - """ - - _validation = { - 'id': {'readonly': True}, - 'provisioning_state': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'force_update_tag': {'key': 'properties.forceUpdateTag', 'type': 'str'}, - 'publisher': {'key': 'properties.publisher', 'type': 'str'}, - 'type': {'key': 'properties.type', 'type': 'str'}, - 'type_handler_version': {'key': 'properties.typeHandlerVersion', 'type': 'str'}, - 'auto_upgrade_minor_version': {'key': 'properties.autoUpgradeMinorVersion', 'type': 'bool'}, - 'settings': {'key': 'properties.settings', 'type': 'object'}, - 'protected_settings': {'key': 'properties.protectedSettings', 'type': 'object'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'provision_after_extensions': {'key': 'properties.provisionAfterExtensions', 'type': '[str]'}, - } - - def __init__(self, **kwargs): - super(VirtualMachineScaleSetExtension, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.force_update_tag = kwargs.get('force_update_tag', None) - self.publisher = kwargs.get('publisher', None) - self.type = kwargs.get('type', None) - self.type_handler_version = kwargs.get('type_handler_version', None) - self.auto_upgrade_minor_version = kwargs.get('auto_upgrade_minor_version', None) - self.settings = kwargs.get('settings', None) - self.protected_settings = kwargs.get('protected_settings', None) - self.provisioning_state = None - self.provision_after_extensions = kwargs.get('provision_after_extensions', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_scale_set_extension_paged.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_scale_set_extension_paged.py deleted file mode 100644 index 247e13f74c21..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_scale_set_extension_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class VirtualMachineScaleSetExtensionPaged(Paged): - """ - A paging container for iterating over a list of :class:`VirtualMachineScaleSetExtension ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[VirtualMachineScaleSetExtension]'} - } - - def __init__(self, *args, **kwargs): - - super(VirtualMachineScaleSetExtensionPaged, self).__init__(*args, **kwargs) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_scale_set_extension_profile.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_scale_set_extension_profile.py deleted file mode 100644 index 611016ad56a3..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_scale_set_extension_profile.py +++ /dev/null @@ -1,30 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineScaleSetExtensionProfile(Model): - """Describes a virtual machine scale set extension profile. - - :param extensions: The virtual machine scale set child extension - resources. - :type extensions: - list[~azure.mgmt.compute.v2018_10_01.models.VirtualMachineScaleSetExtension] - """ - - _attribute_map = { - 'extensions': {'key': 'extensions', 'type': '[VirtualMachineScaleSetExtension]'}, - } - - def __init__(self, **kwargs): - super(VirtualMachineScaleSetExtensionProfile, self).__init__(**kwargs) - self.extensions = kwargs.get('extensions', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_scale_set_extension_profile_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_scale_set_extension_profile_py3.py deleted file mode 100644 index 967b0d6657ce..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_scale_set_extension_profile_py3.py +++ /dev/null @@ -1,30 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineScaleSetExtensionProfile(Model): - """Describes a virtual machine scale set extension profile. - - :param extensions: The virtual machine scale set child extension - resources. - :type extensions: - list[~azure.mgmt.compute.v2018_10_01.models.VirtualMachineScaleSetExtension] - """ - - _attribute_map = { - 'extensions': {'key': 'extensions', 'type': '[VirtualMachineScaleSetExtension]'}, - } - - def __init__(self, *, extensions=None, **kwargs) -> None: - super(VirtualMachineScaleSetExtensionProfile, self).__init__(**kwargs) - self.extensions = extensions diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_scale_set_extension_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_scale_set_extension_py3.py deleted file mode 100644 index 895641055c44..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_scale_set_extension_py3.py +++ /dev/null @@ -1,85 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .sub_resource_read_only_py3 import SubResourceReadOnly - - -class VirtualMachineScaleSetExtension(SubResourceReadOnly): - """Describes a Virtual Machine Scale Set Extension. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource Id - :vartype id: str - :param name: The name of the extension. - :type name: str - :param force_update_tag: If a value is provided and is different from the - previous value, the extension handler will be forced to update even if the - extension configuration has not changed. - :type force_update_tag: str - :param publisher: The name of the extension handler publisher. - :type publisher: str - :param type: Specifies the type of the extension; an example is - "CustomScriptExtension". - :type type: str - :param type_handler_version: Specifies the version of the script handler. - :type type_handler_version: str - :param auto_upgrade_minor_version: Indicates whether the extension should - use a newer minor version if one is available at deployment time. Once - deployed, however, the extension will not upgrade minor versions unless - redeployed, even with this property set to true. - :type auto_upgrade_minor_version: bool - :param settings: Json formatted public settings for the extension. - :type settings: object - :param protected_settings: The extension can contain either - protectedSettings or protectedSettingsFromKeyVault or no protected - settings at all. - :type protected_settings: object - :ivar provisioning_state: The provisioning state, which only appears in - the response. - :vartype provisioning_state: str - :param provision_after_extensions: Collection of extension names after - which this extension needs to be provisioned. - :type provision_after_extensions: list[str] - """ - - _validation = { - 'id': {'readonly': True}, - 'provisioning_state': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'force_update_tag': {'key': 'properties.forceUpdateTag', 'type': 'str'}, - 'publisher': {'key': 'properties.publisher', 'type': 'str'}, - 'type': {'key': 'properties.type', 'type': 'str'}, - 'type_handler_version': {'key': 'properties.typeHandlerVersion', 'type': 'str'}, - 'auto_upgrade_minor_version': {'key': 'properties.autoUpgradeMinorVersion', 'type': 'bool'}, - 'settings': {'key': 'properties.settings', 'type': 'object'}, - 'protected_settings': {'key': 'properties.protectedSettings', 'type': 'object'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'provision_after_extensions': {'key': 'properties.provisionAfterExtensions', 'type': '[str]'}, - } - - def __init__(self, *, name: str=None, force_update_tag: str=None, publisher: str=None, type: str=None, type_handler_version: str=None, auto_upgrade_minor_version: bool=None, settings=None, protected_settings=None, provision_after_extensions=None, **kwargs) -> None: - super(VirtualMachineScaleSetExtension, self).__init__(**kwargs) - self.name = name - self.force_update_tag = force_update_tag - self.publisher = publisher - self.type = type - self.type_handler_version = type_handler_version - self.auto_upgrade_minor_version = auto_upgrade_minor_version - self.settings = settings - self.protected_settings = protected_settings - self.provisioning_state = None - self.provision_after_extensions = provision_after_extensions diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_scale_set_identity.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_scale_set_identity.py deleted file mode 100644 index 18f709698a79..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_scale_set_identity.py +++ /dev/null @@ -1,61 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineScaleSetIdentity(Model): - """Identity for the virtual machine scale set. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar principal_id: The principal id of virtual machine scale set - identity. This property will only be provided for a system assigned - identity. - :vartype principal_id: str - :ivar tenant_id: The tenant id associated with the virtual machine scale - set. This property will only be provided for a system assigned identity. - :vartype tenant_id: str - :param type: The type of identity used for the virtual machine scale set. - The type 'SystemAssigned, UserAssigned' includes both an implicitly - created identity and a set of user assigned identities. The type 'None' - will remove any identities from the virtual machine scale set. Possible - values include: 'SystemAssigned', 'UserAssigned', 'SystemAssigned, - UserAssigned', 'None' - :type type: str or - ~azure.mgmt.compute.v2018_10_01.models.ResourceIdentityType - :param user_assigned_identities: The list of user identities associated - with the virtual machine scale set. The user identity dictionary key - references will be ARM resource ids in the form: - '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'. - :type user_assigned_identities: dict[str, - ~azure.mgmt.compute.v2018_10_01.models.VirtualMachineScaleSetIdentityUserAssignedIdentitiesValue] - """ - - _validation = { - 'principal_id': {'readonly': True}, - 'tenant_id': {'readonly': True}, - } - - _attribute_map = { - 'principal_id': {'key': 'principalId', 'type': 'str'}, - 'tenant_id': {'key': 'tenantId', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'ResourceIdentityType'}, - 'user_assigned_identities': {'key': 'userAssignedIdentities', 'type': '{VirtualMachineScaleSetIdentityUserAssignedIdentitiesValue}'}, - } - - def __init__(self, **kwargs): - super(VirtualMachineScaleSetIdentity, self).__init__(**kwargs) - self.principal_id = None - self.tenant_id = None - self.type = kwargs.get('type', None) - self.user_assigned_identities = kwargs.get('user_assigned_identities', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_scale_set_identity_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_scale_set_identity_py3.py deleted file mode 100644 index e390dce4feb3..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_scale_set_identity_py3.py +++ /dev/null @@ -1,61 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineScaleSetIdentity(Model): - """Identity for the virtual machine scale set. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar principal_id: The principal id of virtual machine scale set - identity. This property will only be provided for a system assigned - identity. - :vartype principal_id: str - :ivar tenant_id: The tenant id associated with the virtual machine scale - set. This property will only be provided for a system assigned identity. - :vartype tenant_id: str - :param type: The type of identity used for the virtual machine scale set. - The type 'SystemAssigned, UserAssigned' includes both an implicitly - created identity and a set of user assigned identities. The type 'None' - will remove any identities from the virtual machine scale set. Possible - values include: 'SystemAssigned', 'UserAssigned', 'SystemAssigned, - UserAssigned', 'None' - :type type: str or - ~azure.mgmt.compute.v2018_10_01.models.ResourceIdentityType - :param user_assigned_identities: The list of user identities associated - with the virtual machine scale set. The user identity dictionary key - references will be ARM resource ids in the form: - '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'. - :type user_assigned_identities: dict[str, - ~azure.mgmt.compute.v2018_10_01.models.VirtualMachineScaleSetIdentityUserAssignedIdentitiesValue] - """ - - _validation = { - 'principal_id': {'readonly': True}, - 'tenant_id': {'readonly': True}, - } - - _attribute_map = { - 'principal_id': {'key': 'principalId', 'type': 'str'}, - 'tenant_id': {'key': 'tenantId', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'ResourceIdentityType'}, - 'user_assigned_identities': {'key': 'userAssignedIdentities', 'type': '{VirtualMachineScaleSetIdentityUserAssignedIdentitiesValue}'}, - } - - def __init__(self, *, type=None, user_assigned_identities=None, **kwargs) -> None: - super(VirtualMachineScaleSetIdentity, self).__init__(**kwargs) - self.principal_id = None - self.tenant_id = None - self.type = type - self.user_assigned_identities = user_assigned_identities diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_scale_set_identity_user_assigned_identities_value.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_scale_set_identity_user_assigned_identities_value.py deleted file mode 100644 index e362323ac96e..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_scale_set_identity_user_assigned_identities_value.py +++ /dev/null @@ -1,40 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineScaleSetIdentityUserAssignedIdentitiesValue(Model): - """VirtualMachineScaleSetIdentityUserAssignedIdentitiesValue. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar principal_id: The principal id of user assigned identity. - :vartype principal_id: str - :ivar client_id: The client id of user assigned identity. - :vartype client_id: str - """ - - _validation = { - 'principal_id': {'readonly': True}, - 'client_id': {'readonly': True}, - } - - _attribute_map = { - 'principal_id': {'key': 'principalId', 'type': 'str'}, - 'client_id': {'key': 'clientId', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(VirtualMachineScaleSetIdentityUserAssignedIdentitiesValue, self).__init__(**kwargs) - self.principal_id = None - self.client_id = None diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_scale_set_identity_user_assigned_identities_value_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_scale_set_identity_user_assigned_identities_value_py3.py deleted file mode 100644 index 2839c26040cc..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_scale_set_identity_user_assigned_identities_value_py3.py +++ /dev/null @@ -1,40 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineScaleSetIdentityUserAssignedIdentitiesValue(Model): - """VirtualMachineScaleSetIdentityUserAssignedIdentitiesValue. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar principal_id: The principal id of user assigned identity. - :vartype principal_id: str - :ivar client_id: The client id of user assigned identity. - :vartype client_id: str - """ - - _validation = { - 'principal_id': {'readonly': True}, - 'client_id': {'readonly': True}, - } - - _attribute_map = { - 'principal_id': {'key': 'principalId', 'type': 'str'}, - 'client_id': {'key': 'clientId', 'type': 'str'}, - } - - def __init__(self, **kwargs) -> None: - super(VirtualMachineScaleSetIdentityUserAssignedIdentitiesValue, self).__init__(**kwargs) - self.principal_id = None - self.client_id = None diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_scale_set_instance_view.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_scale_set_instance_view.py deleted file mode 100644 index 2c0af6103a77..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_scale_set_instance_view.py +++ /dev/null @@ -1,48 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineScaleSetInstanceView(Model): - """The instance view of a virtual machine scale set. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar virtual_machine: The instance view status summary for the virtual - machine scale set. - :vartype virtual_machine: - ~azure.mgmt.compute.v2018_10_01.models.VirtualMachineScaleSetInstanceViewStatusesSummary - :ivar extensions: The extensions information. - :vartype extensions: - list[~azure.mgmt.compute.v2018_10_01.models.VirtualMachineScaleSetVMExtensionsSummary] - :param statuses: The resource status information. - :type statuses: - list[~azure.mgmt.compute.v2018_10_01.models.InstanceViewStatus] - """ - - _validation = { - 'virtual_machine': {'readonly': True}, - 'extensions': {'readonly': True}, - } - - _attribute_map = { - 'virtual_machine': {'key': 'virtualMachine', 'type': 'VirtualMachineScaleSetInstanceViewStatusesSummary'}, - 'extensions': {'key': 'extensions', 'type': '[VirtualMachineScaleSetVMExtensionsSummary]'}, - 'statuses': {'key': 'statuses', 'type': '[InstanceViewStatus]'}, - } - - def __init__(self, **kwargs): - super(VirtualMachineScaleSetInstanceView, self).__init__(**kwargs) - self.virtual_machine = None - self.extensions = None - self.statuses = kwargs.get('statuses', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_scale_set_instance_view_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_scale_set_instance_view_py3.py deleted file mode 100644 index 6e22ddcdb86d..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_scale_set_instance_view_py3.py +++ /dev/null @@ -1,48 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineScaleSetInstanceView(Model): - """The instance view of a virtual machine scale set. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar virtual_machine: The instance view status summary for the virtual - machine scale set. - :vartype virtual_machine: - ~azure.mgmt.compute.v2018_10_01.models.VirtualMachineScaleSetInstanceViewStatusesSummary - :ivar extensions: The extensions information. - :vartype extensions: - list[~azure.mgmt.compute.v2018_10_01.models.VirtualMachineScaleSetVMExtensionsSummary] - :param statuses: The resource status information. - :type statuses: - list[~azure.mgmt.compute.v2018_10_01.models.InstanceViewStatus] - """ - - _validation = { - 'virtual_machine': {'readonly': True}, - 'extensions': {'readonly': True}, - } - - _attribute_map = { - 'virtual_machine': {'key': 'virtualMachine', 'type': 'VirtualMachineScaleSetInstanceViewStatusesSummary'}, - 'extensions': {'key': 'extensions', 'type': '[VirtualMachineScaleSetVMExtensionsSummary]'}, - 'statuses': {'key': 'statuses', 'type': '[InstanceViewStatus]'}, - } - - def __init__(self, *, statuses=None, **kwargs) -> None: - super(VirtualMachineScaleSetInstanceView, self).__init__(**kwargs) - self.virtual_machine = None - self.extensions = None - self.statuses = statuses diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_scale_set_instance_view_statuses_summary.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_scale_set_instance_view_statuses_summary.py deleted file mode 100644 index 164d1d6ca8b6..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_scale_set_instance_view_statuses_summary.py +++ /dev/null @@ -1,37 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineScaleSetInstanceViewStatusesSummary(Model): - """Instance view statuses summary for virtual machines of a virtual machine - scale set. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar statuses_summary: The extensions information. - :vartype statuses_summary: - list[~azure.mgmt.compute.v2018_10_01.models.VirtualMachineStatusCodeCount] - """ - - _validation = { - 'statuses_summary': {'readonly': True}, - } - - _attribute_map = { - 'statuses_summary': {'key': 'statusesSummary', 'type': '[VirtualMachineStatusCodeCount]'}, - } - - def __init__(self, **kwargs): - super(VirtualMachineScaleSetInstanceViewStatusesSummary, self).__init__(**kwargs) - self.statuses_summary = None diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_scale_set_instance_view_statuses_summary_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_scale_set_instance_view_statuses_summary_py3.py deleted file mode 100644 index 47ed18bff23b..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_scale_set_instance_view_statuses_summary_py3.py +++ /dev/null @@ -1,37 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineScaleSetInstanceViewStatusesSummary(Model): - """Instance view statuses summary for virtual machines of a virtual machine - scale set. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar statuses_summary: The extensions information. - :vartype statuses_summary: - list[~azure.mgmt.compute.v2018_10_01.models.VirtualMachineStatusCodeCount] - """ - - _validation = { - 'statuses_summary': {'readonly': True}, - } - - _attribute_map = { - 'statuses_summary': {'key': 'statusesSummary', 'type': '[VirtualMachineStatusCodeCount]'}, - } - - def __init__(self, **kwargs) -> None: - super(VirtualMachineScaleSetInstanceViewStatusesSummary, self).__init__(**kwargs) - self.statuses_summary = None diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_scale_set_ip_configuration.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_scale_set_ip_configuration.py deleted file mode 100644 index 758f5aa49d89..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_scale_set_ip_configuration.py +++ /dev/null @@ -1,89 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .sub_resource import SubResource - - -class VirtualMachineScaleSetIPConfiguration(SubResource): - """Describes a virtual machine scale set network profile's IP configuration. - - All required parameters must be populated in order to send to Azure. - - :param id: Resource Id - :type id: str - :param name: Required. The IP configuration name. - :type name: str - :param subnet: Specifies the identifier of the subnet. - :type subnet: ~azure.mgmt.compute.v2018_10_01.models.ApiEntityReference - :param primary: Specifies the primary network interface in case the - virtual machine has more than 1 network interface. - :type primary: bool - :param public_ip_address_configuration: The publicIPAddressConfiguration. - :type public_ip_address_configuration: - ~azure.mgmt.compute.v2018_10_01.models.VirtualMachineScaleSetPublicIPAddressConfiguration - :param private_ip_address_version: Available from Api-Version 2017-03-30 - onwards, it represents whether the specific ipconfiguration is IPv4 or - IPv6. Default is taken as IPv4. Possible values are: 'IPv4' and 'IPv6'. - Possible values include: 'IPv4', 'IPv6' - :type private_ip_address_version: str or - ~azure.mgmt.compute.v2018_10_01.models.IPVersion - :param application_gateway_backend_address_pools: Specifies an array of - references to backend address pools of application gateways. A scale set - can reference backend address pools of multiple application gateways. - Multiple scale sets cannot use the same application gateway. - :type application_gateway_backend_address_pools: - list[~azure.mgmt.compute.v2018_10_01.models.SubResource] - :param application_security_groups: Specifies an array of references to - application security group. - :type application_security_groups: - list[~azure.mgmt.compute.v2018_10_01.models.SubResource] - :param load_balancer_backend_address_pools: Specifies an array of - references to backend address pools of load balancers. A scale set can - reference backend address pools of one public and one internal load - balancer. Multiple scale sets cannot use the same load balancer. - :type load_balancer_backend_address_pools: - list[~azure.mgmt.compute.v2018_10_01.models.SubResource] - :param load_balancer_inbound_nat_pools: Specifies an array of references - to inbound Nat pools of the load balancers. A scale set can reference - inbound nat pools of one public and one internal load balancer. Multiple - scale sets cannot use the same load balancer - :type load_balancer_inbound_nat_pools: - list[~azure.mgmt.compute.v2018_10_01.models.SubResource] - """ - - _validation = { - 'name': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'subnet': {'key': 'properties.subnet', 'type': 'ApiEntityReference'}, - 'primary': {'key': 'properties.primary', 'type': 'bool'}, - 'public_ip_address_configuration': {'key': 'properties.publicIPAddressConfiguration', 'type': 'VirtualMachineScaleSetPublicIPAddressConfiguration'}, - 'private_ip_address_version': {'key': 'properties.privateIPAddressVersion', 'type': 'str'}, - 'application_gateway_backend_address_pools': {'key': 'properties.applicationGatewayBackendAddressPools', 'type': '[SubResource]'}, - 'application_security_groups': {'key': 'properties.applicationSecurityGroups', 'type': '[SubResource]'}, - 'load_balancer_backend_address_pools': {'key': 'properties.loadBalancerBackendAddressPools', 'type': '[SubResource]'}, - 'load_balancer_inbound_nat_pools': {'key': 'properties.loadBalancerInboundNatPools', 'type': '[SubResource]'}, - } - - def __init__(self, **kwargs): - super(VirtualMachineScaleSetIPConfiguration, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.subnet = kwargs.get('subnet', None) - self.primary = kwargs.get('primary', None) - self.public_ip_address_configuration = kwargs.get('public_ip_address_configuration', None) - self.private_ip_address_version = kwargs.get('private_ip_address_version', None) - self.application_gateway_backend_address_pools = kwargs.get('application_gateway_backend_address_pools', None) - self.application_security_groups = kwargs.get('application_security_groups', None) - self.load_balancer_backend_address_pools = kwargs.get('load_balancer_backend_address_pools', None) - self.load_balancer_inbound_nat_pools = kwargs.get('load_balancer_inbound_nat_pools', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_scale_set_ip_configuration_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_scale_set_ip_configuration_py3.py deleted file mode 100644 index 7108bfece974..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_scale_set_ip_configuration_py3.py +++ /dev/null @@ -1,89 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .sub_resource_py3 import SubResource - - -class VirtualMachineScaleSetIPConfiguration(SubResource): - """Describes a virtual machine scale set network profile's IP configuration. - - All required parameters must be populated in order to send to Azure. - - :param id: Resource Id - :type id: str - :param name: Required. The IP configuration name. - :type name: str - :param subnet: Specifies the identifier of the subnet. - :type subnet: ~azure.mgmt.compute.v2018_10_01.models.ApiEntityReference - :param primary: Specifies the primary network interface in case the - virtual machine has more than 1 network interface. - :type primary: bool - :param public_ip_address_configuration: The publicIPAddressConfiguration. - :type public_ip_address_configuration: - ~azure.mgmt.compute.v2018_10_01.models.VirtualMachineScaleSetPublicIPAddressConfiguration - :param private_ip_address_version: Available from Api-Version 2017-03-30 - onwards, it represents whether the specific ipconfiguration is IPv4 or - IPv6. Default is taken as IPv4. Possible values are: 'IPv4' and 'IPv6'. - Possible values include: 'IPv4', 'IPv6' - :type private_ip_address_version: str or - ~azure.mgmt.compute.v2018_10_01.models.IPVersion - :param application_gateway_backend_address_pools: Specifies an array of - references to backend address pools of application gateways. A scale set - can reference backend address pools of multiple application gateways. - Multiple scale sets cannot use the same application gateway. - :type application_gateway_backend_address_pools: - list[~azure.mgmt.compute.v2018_10_01.models.SubResource] - :param application_security_groups: Specifies an array of references to - application security group. - :type application_security_groups: - list[~azure.mgmt.compute.v2018_10_01.models.SubResource] - :param load_balancer_backend_address_pools: Specifies an array of - references to backend address pools of load balancers. A scale set can - reference backend address pools of one public and one internal load - balancer. Multiple scale sets cannot use the same load balancer. - :type load_balancer_backend_address_pools: - list[~azure.mgmt.compute.v2018_10_01.models.SubResource] - :param load_balancer_inbound_nat_pools: Specifies an array of references - to inbound Nat pools of the load balancers. A scale set can reference - inbound nat pools of one public and one internal load balancer. Multiple - scale sets cannot use the same load balancer - :type load_balancer_inbound_nat_pools: - list[~azure.mgmt.compute.v2018_10_01.models.SubResource] - """ - - _validation = { - 'name': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'subnet': {'key': 'properties.subnet', 'type': 'ApiEntityReference'}, - 'primary': {'key': 'properties.primary', 'type': 'bool'}, - 'public_ip_address_configuration': {'key': 'properties.publicIPAddressConfiguration', 'type': 'VirtualMachineScaleSetPublicIPAddressConfiguration'}, - 'private_ip_address_version': {'key': 'properties.privateIPAddressVersion', 'type': 'str'}, - 'application_gateway_backend_address_pools': {'key': 'properties.applicationGatewayBackendAddressPools', 'type': '[SubResource]'}, - 'application_security_groups': {'key': 'properties.applicationSecurityGroups', 'type': '[SubResource]'}, - 'load_balancer_backend_address_pools': {'key': 'properties.loadBalancerBackendAddressPools', 'type': '[SubResource]'}, - 'load_balancer_inbound_nat_pools': {'key': 'properties.loadBalancerInboundNatPools', 'type': '[SubResource]'}, - } - - def __init__(self, *, name: str, id: str=None, subnet=None, primary: bool=None, public_ip_address_configuration=None, private_ip_address_version=None, application_gateway_backend_address_pools=None, application_security_groups=None, load_balancer_backend_address_pools=None, load_balancer_inbound_nat_pools=None, **kwargs) -> None: - super(VirtualMachineScaleSetIPConfiguration, self).__init__(id=id, **kwargs) - self.name = name - self.subnet = subnet - self.primary = primary - self.public_ip_address_configuration = public_ip_address_configuration - self.private_ip_address_version = private_ip_address_version - self.application_gateway_backend_address_pools = application_gateway_backend_address_pools - self.application_security_groups = application_security_groups - self.load_balancer_backend_address_pools = load_balancer_backend_address_pools - self.load_balancer_inbound_nat_pools = load_balancer_inbound_nat_pools diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_scale_set_ip_tag.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_scale_set_ip_tag.py deleted file mode 100644 index 36b70260d646..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_scale_set_ip_tag.py +++ /dev/null @@ -1,33 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineScaleSetIpTag(Model): - """Contains the IP tag associated with the public IP address. - - :param ip_tag_type: IP tag type. Example: FirstPartyUsage. - :type ip_tag_type: str - :param tag: IP tag associated with the public IP. Example: SQL, Storage - etc. - :type tag: str - """ - - _attribute_map = { - 'ip_tag_type': {'key': 'ipTagType', 'type': 'str'}, - 'tag': {'key': 'tag', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(VirtualMachineScaleSetIpTag, self).__init__(**kwargs) - self.ip_tag_type = kwargs.get('ip_tag_type', None) - self.tag = kwargs.get('tag', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_scale_set_ip_tag_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_scale_set_ip_tag_py3.py deleted file mode 100644 index aaf788c9d772..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_scale_set_ip_tag_py3.py +++ /dev/null @@ -1,33 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineScaleSetIpTag(Model): - """Contains the IP tag associated with the public IP address. - - :param ip_tag_type: IP tag type. Example: FirstPartyUsage. - :type ip_tag_type: str - :param tag: IP tag associated with the public IP. Example: SQL, Storage - etc. - :type tag: str - """ - - _attribute_map = { - 'ip_tag_type': {'key': 'ipTagType', 'type': 'str'}, - 'tag': {'key': 'tag', 'type': 'str'}, - } - - def __init__(self, *, ip_tag_type: str=None, tag: str=None, **kwargs) -> None: - super(VirtualMachineScaleSetIpTag, self).__init__(**kwargs) - self.ip_tag_type = ip_tag_type - self.tag = tag diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_scale_set_managed_disk_parameters.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_scale_set_managed_disk_parameters.py deleted file mode 100644 index 328a08a19b7c..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_scale_set_managed_disk_parameters.py +++ /dev/null @@ -1,32 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineScaleSetManagedDiskParameters(Model): - """Describes the parameters of a ScaleSet managed disk. - - :param storage_account_type: Specifies the storage account type for the - managed disk. NOTE: UltraSSD_LRS can only be used with data disks, it - cannot be used with OS Disk. Possible values include: 'Standard_LRS', - 'Premium_LRS', 'StandardSSD_LRS', 'UltraSSD_LRS' - :type storage_account_type: str or - ~azure.mgmt.compute.v2018_10_01.models.StorageAccountTypes - """ - - _attribute_map = { - 'storage_account_type': {'key': 'storageAccountType', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(VirtualMachineScaleSetManagedDiskParameters, self).__init__(**kwargs) - self.storage_account_type = kwargs.get('storage_account_type', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_scale_set_managed_disk_parameters_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_scale_set_managed_disk_parameters_py3.py deleted file mode 100644 index d6ef426e05f9..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_scale_set_managed_disk_parameters_py3.py +++ /dev/null @@ -1,32 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineScaleSetManagedDiskParameters(Model): - """Describes the parameters of a ScaleSet managed disk. - - :param storage_account_type: Specifies the storage account type for the - managed disk. NOTE: UltraSSD_LRS can only be used with data disks, it - cannot be used with OS Disk. Possible values include: 'Standard_LRS', - 'Premium_LRS', 'StandardSSD_LRS', 'UltraSSD_LRS' - :type storage_account_type: str or - ~azure.mgmt.compute.v2018_10_01.models.StorageAccountTypes - """ - - _attribute_map = { - 'storage_account_type': {'key': 'storageAccountType', 'type': 'str'}, - } - - def __init__(self, *, storage_account_type=None, **kwargs) -> None: - super(VirtualMachineScaleSetManagedDiskParameters, self).__init__(**kwargs) - self.storage_account_type = storage_account_type diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_scale_set_network_configuration.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_scale_set_network_configuration.py deleted file mode 100644 index 8ce739305c35..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_scale_set_network_configuration.py +++ /dev/null @@ -1,70 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .sub_resource import SubResource - - -class VirtualMachineScaleSetNetworkConfiguration(SubResource): - """Describes a virtual machine scale set network profile's network - configurations. - - All required parameters must be populated in order to send to Azure. - - :param id: Resource Id - :type id: str - :param name: Required. The network configuration name. - :type name: str - :param primary: Specifies the primary network interface in case the - virtual machine has more than 1 network interface. - :type primary: bool - :param enable_accelerated_networking: Specifies whether the network - interface is accelerated networking-enabled. - :type enable_accelerated_networking: bool - :param network_security_group: The network security group. - :type network_security_group: - ~azure.mgmt.compute.v2018_10_01.models.SubResource - :param dns_settings: The dns settings to be applied on the network - interfaces. - :type dns_settings: - ~azure.mgmt.compute.v2018_10_01.models.VirtualMachineScaleSetNetworkConfigurationDnsSettings - :param ip_configurations: Required. Specifies the IP configurations of the - network interface. - :type ip_configurations: - list[~azure.mgmt.compute.v2018_10_01.models.VirtualMachineScaleSetIPConfiguration] - :param enable_ip_forwarding: Whether IP forwarding enabled on this NIC. - :type enable_ip_forwarding: bool - """ - - _validation = { - 'name': {'required': True}, - 'ip_configurations': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'primary': {'key': 'properties.primary', 'type': 'bool'}, - 'enable_accelerated_networking': {'key': 'properties.enableAcceleratedNetworking', 'type': 'bool'}, - 'network_security_group': {'key': 'properties.networkSecurityGroup', 'type': 'SubResource'}, - 'dns_settings': {'key': 'properties.dnsSettings', 'type': 'VirtualMachineScaleSetNetworkConfigurationDnsSettings'}, - 'ip_configurations': {'key': 'properties.ipConfigurations', 'type': '[VirtualMachineScaleSetIPConfiguration]'}, - 'enable_ip_forwarding': {'key': 'properties.enableIPForwarding', 'type': 'bool'}, - } - - def __init__(self, **kwargs): - super(VirtualMachineScaleSetNetworkConfiguration, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.primary = kwargs.get('primary', None) - self.enable_accelerated_networking = kwargs.get('enable_accelerated_networking', None) - self.network_security_group = kwargs.get('network_security_group', None) - self.dns_settings = kwargs.get('dns_settings', None) - self.ip_configurations = kwargs.get('ip_configurations', None) - self.enable_ip_forwarding = kwargs.get('enable_ip_forwarding', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_scale_set_network_configuration_dns_settings.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_scale_set_network_configuration_dns_settings.py deleted file mode 100644 index 04e1c619383f..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_scale_set_network_configuration_dns_settings.py +++ /dev/null @@ -1,29 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineScaleSetNetworkConfigurationDnsSettings(Model): - """Describes a virtual machines scale sets network configuration's DNS - settings. - - :param dns_servers: List of DNS servers IP addresses - :type dns_servers: list[str] - """ - - _attribute_map = { - 'dns_servers': {'key': 'dnsServers', 'type': '[str]'}, - } - - def __init__(self, **kwargs): - super(VirtualMachineScaleSetNetworkConfigurationDnsSettings, self).__init__(**kwargs) - self.dns_servers = kwargs.get('dns_servers', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_scale_set_network_configuration_dns_settings_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_scale_set_network_configuration_dns_settings_py3.py deleted file mode 100644 index 5607f74d3c6a..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_scale_set_network_configuration_dns_settings_py3.py +++ /dev/null @@ -1,29 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineScaleSetNetworkConfigurationDnsSettings(Model): - """Describes a virtual machines scale sets network configuration's DNS - settings. - - :param dns_servers: List of DNS servers IP addresses - :type dns_servers: list[str] - """ - - _attribute_map = { - 'dns_servers': {'key': 'dnsServers', 'type': '[str]'}, - } - - def __init__(self, *, dns_servers=None, **kwargs) -> None: - super(VirtualMachineScaleSetNetworkConfigurationDnsSettings, self).__init__(**kwargs) - self.dns_servers = dns_servers diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_scale_set_network_configuration_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_scale_set_network_configuration_py3.py deleted file mode 100644 index ffc2b196eb68..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_scale_set_network_configuration_py3.py +++ /dev/null @@ -1,70 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .sub_resource_py3 import SubResource - - -class VirtualMachineScaleSetNetworkConfiguration(SubResource): - """Describes a virtual machine scale set network profile's network - configurations. - - All required parameters must be populated in order to send to Azure. - - :param id: Resource Id - :type id: str - :param name: Required. The network configuration name. - :type name: str - :param primary: Specifies the primary network interface in case the - virtual machine has more than 1 network interface. - :type primary: bool - :param enable_accelerated_networking: Specifies whether the network - interface is accelerated networking-enabled. - :type enable_accelerated_networking: bool - :param network_security_group: The network security group. - :type network_security_group: - ~azure.mgmt.compute.v2018_10_01.models.SubResource - :param dns_settings: The dns settings to be applied on the network - interfaces. - :type dns_settings: - ~azure.mgmt.compute.v2018_10_01.models.VirtualMachineScaleSetNetworkConfigurationDnsSettings - :param ip_configurations: Required. Specifies the IP configurations of the - network interface. - :type ip_configurations: - list[~azure.mgmt.compute.v2018_10_01.models.VirtualMachineScaleSetIPConfiguration] - :param enable_ip_forwarding: Whether IP forwarding enabled on this NIC. - :type enable_ip_forwarding: bool - """ - - _validation = { - 'name': {'required': True}, - 'ip_configurations': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'primary': {'key': 'properties.primary', 'type': 'bool'}, - 'enable_accelerated_networking': {'key': 'properties.enableAcceleratedNetworking', 'type': 'bool'}, - 'network_security_group': {'key': 'properties.networkSecurityGroup', 'type': 'SubResource'}, - 'dns_settings': {'key': 'properties.dnsSettings', 'type': 'VirtualMachineScaleSetNetworkConfigurationDnsSettings'}, - 'ip_configurations': {'key': 'properties.ipConfigurations', 'type': '[VirtualMachineScaleSetIPConfiguration]'}, - 'enable_ip_forwarding': {'key': 'properties.enableIPForwarding', 'type': 'bool'}, - } - - def __init__(self, *, name: str, ip_configurations, id: str=None, primary: bool=None, enable_accelerated_networking: bool=None, network_security_group=None, dns_settings=None, enable_ip_forwarding: bool=None, **kwargs) -> None: - super(VirtualMachineScaleSetNetworkConfiguration, self).__init__(id=id, **kwargs) - self.name = name - self.primary = primary - self.enable_accelerated_networking = enable_accelerated_networking - self.network_security_group = network_security_group - self.dns_settings = dns_settings - self.ip_configurations = ip_configurations - self.enable_ip_forwarding = enable_ip_forwarding diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_scale_set_network_profile.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_scale_set_network_profile.py deleted file mode 100644 index cbfade34bb3c..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_scale_set_network_profile.py +++ /dev/null @@ -1,38 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineScaleSetNetworkProfile(Model): - """Describes a virtual machine scale set network profile. - - :param health_probe: A reference to a load balancer probe used to - determine the health of an instance in the virtual machine scale set. The - reference will be in the form: - '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/probes/{probeName}'. - :type health_probe: - ~azure.mgmt.compute.v2018_10_01.models.ApiEntityReference - :param network_interface_configurations: The list of network - configurations. - :type network_interface_configurations: - list[~azure.mgmt.compute.v2018_10_01.models.VirtualMachineScaleSetNetworkConfiguration] - """ - - _attribute_map = { - 'health_probe': {'key': 'healthProbe', 'type': 'ApiEntityReference'}, - 'network_interface_configurations': {'key': 'networkInterfaceConfigurations', 'type': '[VirtualMachineScaleSetNetworkConfiguration]'}, - } - - def __init__(self, **kwargs): - super(VirtualMachineScaleSetNetworkProfile, self).__init__(**kwargs) - self.health_probe = kwargs.get('health_probe', None) - self.network_interface_configurations = kwargs.get('network_interface_configurations', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_scale_set_network_profile_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_scale_set_network_profile_py3.py deleted file mode 100644 index 521872c86f5a..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_scale_set_network_profile_py3.py +++ /dev/null @@ -1,38 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineScaleSetNetworkProfile(Model): - """Describes a virtual machine scale set network profile. - - :param health_probe: A reference to a load balancer probe used to - determine the health of an instance in the virtual machine scale set. The - reference will be in the form: - '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/probes/{probeName}'. - :type health_probe: - ~azure.mgmt.compute.v2018_10_01.models.ApiEntityReference - :param network_interface_configurations: The list of network - configurations. - :type network_interface_configurations: - list[~azure.mgmt.compute.v2018_10_01.models.VirtualMachineScaleSetNetworkConfiguration] - """ - - _attribute_map = { - 'health_probe': {'key': 'healthProbe', 'type': 'ApiEntityReference'}, - 'network_interface_configurations': {'key': 'networkInterfaceConfigurations', 'type': '[VirtualMachineScaleSetNetworkConfiguration]'}, - } - - def __init__(self, *, health_probe=None, network_interface_configurations=None, **kwargs) -> None: - super(VirtualMachineScaleSetNetworkProfile, self).__init__(**kwargs) - self.health_probe = health_probe - self.network_interface_configurations = network_interface_configurations diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_scale_set_os_disk.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_scale_set_os_disk.py deleted file mode 100644 index b52f2ad2019f..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_scale_set_os_disk.py +++ /dev/null @@ -1,92 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineScaleSetOSDisk(Model): - """Describes a virtual machine scale set operating system disk. - - All required parameters must be populated in order to send to Azure. - - :param name: The disk name. - :type name: str - :param caching: Specifies the caching requirements.

    Possible - values are:

    **None**

    **ReadOnly**

    **ReadWrite** -

    Default: **None for Standard storage. ReadOnly for Premium - storage**. Possible values include: 'None', 'ReadOnly', 'ReadWrite' - :type caching: str or ~azure.mgmt.compute.v2018_10_01.models.CachingTypes - :param write_accelerator_enabled: Specifies whether writeAccelerator - should be enabled or disabled on the disk. - :type write_accelerator_enabled: bool - :param create_option: Required. Specifies how the virtual machines in the - scale set should be created.

    The only allowed value is: - **FromImage** \\u2013 This value is used when you are using an image to - create the virtual machine. If you are using a platform image, you also - use the imageReference element described above. If you are using a - marketplace image, you also use the plan element previously described. - Possible values include: 'FromImage', 'Empty', 'Attach' - :type create_option: str or - ~azure.mgmt.compute.v2018_10_01.models.DiskCreateOptionTypes - :param diff_disk_settings: Specifies the ephemeral disk Settings for the - operating system disk used by the virtual machine scale set. - :type diff_disk_settings: - ~azure.mgmt.compute.v2018_10_01.models.DiffDiskSettings - :param disk_size_gb: Specifies the size of the operating system disk in - gigabytes. This element can be used to overwrite the size of the disk in a - virtual machine image.

    This value cannot be larger than 1023 GB - :type disk_size_gb: int - :param os_type: This property allows you to specify the type of the OS - that is included in the disk if creating a VM from user-image or a - specialized VHD.

    Possible values are:

    **Windows** -

    **Linux**. Possible values include: 'Windows', 'Linux' - :type os_type: str or - ~azure.mgmt.compute.v2018_10_01.models.OperatingSystemTypes - :param image: Specifies information about the unmanaged user image to base - the scale set on. - :type image: ~azure.mgmt.compute.v2018_10_01.models.VirtualHardDisk - :param vhd_containers: Specifies the container urls that are used to store - operating system disks for the scale set. - :type vhd_containers: list[str] - :param managed_disk: The managed disk parameters. - :type managed_disk: - ~azure.mgmt.compute.v2018_10_01.models.VirtualMachineScaleSetManagedDiskParameters - """ - - _validation = { - 'create_option': {'required': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'caching': {'key': 'caching', 'type': 'CachingTypes'}, - 'write_accelerator_enabled': {'key': 'writeAcceleratorEnabled', 'type': 'bool'}, - 'create_option': {'key': 'createOption', 'type': 'str'}, - 'diff_disk_settings': {'key': 'diffDiskSettings', 'type': 'DiffDiskSettings'}, - 'disk_size_gb': {'key': 'diskSizeGB', 'type': 'int'}, - 'os_type': {'key': 'osType', 'type': 'OperatingSystemTypes'}, - 'image': {'key': 'image', 'type': 'VirtualHardDisk'}, - 'vhd_containers': {'key': 'vhdContainers', 'type': '[str]'}, - 'managed_disk': {'key': 'managedDisk', 'type': 'VirtualMachineScaleSetManagedDiskParameters'}, - } - - def __init__(self, **kwargs): - super(VirtualMachineScaleSetOSDisk, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.caching = kwargs.get('caching', None) - self.write_accelerator_enabled = kwargs.get('write_accelerator_enabled', None) - self.create_option = kwargs.get('create_option', None) - self.diff_disk_settings = kwargs.get('diff_disk_settings', None) - self.disk_size_gb = kwargs.get('disk_size_gb', None) - self.os_type = kwargs.get('os_type', None) - self.image = kwargs.get('image', None) - self.vhd_containers = kwargs.get('vhd_containers', None) - self.managed_disk = kwargs.get('managed_disk', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_scale_set_os_disk_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_scale_set_os_disk_py3.py deleted file mode 100644 index 58b10d609673..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_scale_set_os_disk_py3.py +++ /dev/null @@ -1,92 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineScaleSetOSDisk(Model): - """Describes a virtual machine scale set operating system disk. - - All required parameters must be populated in order to send to Azure. - - :param name: The disk name. - :type name: str - :param caching: Specifies the caching requirements.

    Possible - values are:

    **None**

    **ReadOnly**

    **ReadWrite** -

    Default: **None for Standard storage. ReadOnly for Premium - storage**. Possible values include: 'None', 'ReadOnly', 'ReadWrite' - :type caching: str or ~azure.mgmt.compute.v2018_10_01.models.CachingTypes - :param write_accelerator_enabled: Specifies whether writeAccelerator - should be enabled or disabled on the disk. - :type write_accelerator_enabled: bool - :param create_option: Required. Specifies how the virtual machines in the - scale set should be created.

    The only allowed value is: - **FromImage** \\u2013 This value is used when you are using an image to - create the virtual machine. If you are using a platform image, you also - use the imageReference element described above. If you are using a - marketplace image, you also use the plan element previously described. - Possible values include: 'FromImage', 'Empty', 'Attach' - :type create_option: str or - ~azure.mgmt.compute.v2018_10_01.models.DiskCreateOptionTypes - :param diff_disk_settings: Specifies the ephemeral disk Settings for the - operating system disk used by the virtual machine scale set. - :type diff_disk_settings: - ~azure.mgmt.compute.v2018_10_01.models.DiffDiskSettings - :param disk_size_gb: Specifies the size of the operating system disk in - gigabytes. This element can be used to overwrite the size of the disk in a - virtual machine image.

    This value cannot be larger than 1023 GB - :type disk_size_gb: int - :param os_type: This property allows you to specify the type of the OS - that is included in the disk if creating a VM from user-image or a - specialized VHD.

    Possible values are:

    **Windows** -

    **Linux**. Possible values include: 'Windows', 'Linux' - :type os_type: str or - ~azure.mgmt.compute.v2018_10_01.models.OperatingSystemTypes - :param image: Specifies information about the unmanaged user image to base - the scale set on. - :type image: ~azure.mgmt.compute.v2018_10_01.models.VirtualHardDisk - :param vhd_containers: Specifies the container urls that are used to store - operating system disks for the scale set. - :type vhd_containers: list[str] - :param managed_disk: The managed disk parameters. - :type managed_disk: - ~azure.mgmt.compute.v2018_10_01.models.VirtualMachineScaleSetManagedDiskParameters - """ - - _validation = { - 'create_option': {'required': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'caching': {'key': 'caching', 'type': 'CachingTypes'}, - 'write_accelerator_enabled': {'key': 'writeAcceleratorEnabled', 'type': 'bool'}, - 'create_option': {'key': 'createOption', 'type': 'str'}, - 'diff_disk_settings': {'key': 'diffDiskSettings', 'type': 'DiffDiskSettings'}, - 'disk_size_gb': {'key': 'diskSizeGB', 'type': 'int'}, - 'os_type': {'key': 'osType', 'type': 'OperatingSystemTypes'}, - 'image': {'key': 'image', 'type': 'VirtualHardDisk'}, - 'vhd_containers': {'key': 'vhdContainers', 'type': '[str]'}, - 'managed_disk': {'key': 'managedDisk', 'type': 'VirtualMachineScaleSetManagedDiskParameters'}, - } - - def __init__(self, *, create_option, name: str=None, caching=None, write_accelerator_enabled: bool=None, diff_disk_settings=None, disk_size_gb: int=None, os_type=None, image=None, vhd_containers=None, managed_disk=None, **kwargs) -> None: - super(VirtualMachineScaleSetOSDisk, self).__init__(**kwargs) - self.name = name - self.caching = caching - self.write_accelerator_enabled = write_accelerator_enabled - self.create_option = create_option - self.diff_disk_settings = diff_disk_settings - self.disk_size_gb = disk_size_gb - self.os_type = os_type - self.image = image - self.vhd_containers = vhd_containers - self.managed_disk = managed_disk diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_scale_set_os_profile.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_scale_set_os_profile.py deleted file mode 100644 index f1682daccc25..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_scale_set_os_profile.py +++ /dev/null @@ -1,97 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineScaleSetOSProfile(Model): - """Describes a virtual machine scale set OS profile. - - :param computer_name_prefix: Specifies the computer name prefix for all of - the virtual machines in the scale set. Computer name prefixes must be 1 to - 15 characters long. - :type computer_name_prefix: str - :param admin_username: Specifies the name of the administrator account. -

    **Windows-only restriction:** Cannot end in "."

    - **Disallowed values:** "administrator", "admin", "user", "user1", "test", - "user2", "test1", "user3", "admin1", "1", "123", "a", "actuser", "adm", - "admin2", "aspnet", "backup", "console", "david", "guest", "john", - "owner", "root", "server", "sql", "support", "support_388945a0", "sys", - "test2", "test3", "user4", "user5".

    **Minimum-length (Linux):** 1 - character

    **Max-length (Linux):** 64 characters

    - **Max-length (Windows):** 20 characters

  • For root access to - the Linux VM, see [Using root privileges on Linux virtual machines in - Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-use-root-privileges?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json)
  • - For a list of built-in system users on Linux that should not be used in - this field, see [Selecting User Names for Linux on - Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-usernames?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json) - :type admin_username: str - :param admin_password: Specifies the password of the administrator - account.

    **Minimum-length (Windows):** 8 characters

    - **Minimum-length (Linux):** 6 characters

    **Max-length - (Windows):** 123 characters

    **Max-length (Linux):** 72 characters -

    **Complexity requirements:** 3 out of 4 conditions below need to - be fulfilled
    Has lower characters
    Has upper characters
    Has a - digit
    Has a special character (Regex match [\\W_])

    - **Disallowed values:** "abc@123", "P@$$w0rd", "P@ssw0rd", "P@ssword123", - "Pa$$word", "pass@word1", "Password!", "Password1", "Password22", - "iloveyou!"

    For resetting the password, see [How to reset the - Remote Desktop service or its login password in a Windows - VM](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-reset-rdp?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json) -

    For resetting root password, see [Manage users, SSH, and check or - repair disks on Azure Linux VMs using the VMAccess - Extension](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-using-vmaccess-extension?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json#reset-root-password) - :type admin_password: str - :param custom_data: Specifies a base-64 encoded string of custom data. The - base-64 encoded string is decoded to a binary array that is saved as a - file on the Virtual Machine. The maximum length of the binary array is - 65535 bytes.

    For using cloud-init for your VM, see [Using - cloud-init to customize a Linux VM during - creation](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-using-cloud-init?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json) - :type custom_data: str - :param windows_configuration: Specifies Windows operating system settings - on the virtual machine. - :type windows_configuration: - ~azure.mgmt.compute.v2018_10_01.models.WindowsConfiguration - :param linux_configuration: Specifies the Linux operating system settings - on the virtual machine.

    For a list of supported Linux - distributions, see [Linux on Azure-Endorsed - Distributions](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-endorsed-distros?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json) -

    For running non-endorsed distributions, see [Information for - Non-Endorsed - Distributions](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-create-upload-generic?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json). - :type linux_configuration: - ~azure.mgmt.compute.v2018_10_01.models.LinuxConfiguration - :param secrets: Specifies set of certificates that should be installed - onto the virtual machines in the scale set. - :type secrets: - list[~azure.mgmt.compute.v2018_10_01.models.VaultSecretGroup] - """ - - _attribute_map = { - 'computer_name_prefix': {'key': 'computerNamePrefix', 'type': 'str'}, - 'admin_username': {'key': 'adminUsername', 'type': 'str'}, - 'admin_password': {'key': 'adminPassword', 'type': 'str'}, - 'custom_data': {'key': 'customData', 'type': 'str'}, - 'windows_configuration': {'key': 'windowsConfiguration', 'type': 'WindowsConfiguration'}, - 'linux_configuration': {'key': 'linuxConfiguration', 'type': 'LinuxConfiguration'}, - 'secrets': {'key': 'secrets', 'type': '[VaultSecretGroup]'}, - } - - def __init__(self, **kwargs): - super(VirtualMachineScaleSetOSProfile, self).__init__(**kwargs) - self.computer_name_prefix = kwargs.get('computer_name_prefix', None) - self.admin_username = kwargs.get('admin_username', None) - self.admin_password = kwargs.get('admin_password', None) - self.custom_data = kwargs.get('custom_data', None) - self.windows_configuration = kwargs.get('windows_configuration', None) - self.linux_configuration = kwargs.get('linux_configuration', None) - self.secrets = kwargs.get('secrets', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_scale_set_os_profile_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_scale_set_os_profile_py3.py deleted file mode 100644 index d60486034c60..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_scale_set_os_profile_py3.py +++ /dev/null @@ -1,97 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineScaleSetOSProfile(Model): - """Describes a virtual machine scale set OS profile. - - :param computer_name_prefix: Specifies the computer name prefix for all of - the virtual machines in the scale set. Computer name prefixes must be 1 to - 15 characters long. - :type computer_name_prefix: str - :param admin_username: Specifies the name of the administrator account. -

    **Windows-only restriction:** Cannot end in "."

    - **Disallowed values:** "administrator", "admin", "user", "user1", "test", - "user2", "test1", "user3", "admin1", "1", "123", "a", "actuser", "adm", - "admin2", "aspnet", "backup", "console", "david", "guest", "john", - "owner", "root", "server", "sql", "support", "support_388945a0", "sys", - "test2", "test3", "user4", "user5".

    **Minimum-length (Linux):** 1 - character

    **Max-length (Linux):** 64 characters

    - **Max-length (Windows):** 20 characters

  • For root access to - the Linux VM, see [Using root privileges on Linux virtual machines in - Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-use-root-privileges?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json)
  • - For a list of built-in system users on Linux that should not be used in - this field, see [Selecting User Names for Linux on - Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-usernames?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json) - :type admin_username: str - :param admin_password: Specifies the password of the administrator - account.

    **Minimum-length (Windows):** 8 characters

    - **Minimum-length (Linux):** 6 characters

    **Max-length - (Windows):** 123 characters

    **Max-length (Linux):** 72 characters -

    **Complexity requirements:** 3 out of 4 conditions below need to - be fulfilled
    Has lower characters
    Has upper characters
    Has a - digit
    Has a special character (Regex match [\\W_])

    - **Disallowed values:** "abc@123", "P@$$w0rd", "P@ssw0rd", "P@ssword123", - "Pa$$word", "pass@word1", "Password!", "Password1", "Password22", - "iloveyou!"

    For resetting the password, see [How to reset the - Remote Desktop service or its login password in a Windows - VM](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-reset-rdp?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json) -

    For resetting root password, see [Manage users, SSH, and check or - repair disks on Azure Linux VMs using the VMAccess - Extension](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-using-vmaccess-extension?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json#reset-root-password) - :type admin_password: str - :param custom_data: Specifies a base-64 encoded string of custom data. The - base-64 encoded string is decoded to a binary array that is saved as a - file on the Virtual Machine. The maximum length of the binary array is - 65535 bytes.

    For using cloud-init for your VM, see [Using - cloud-init to customize a Linux VM during - creation](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-using-cloud-init?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json) - :type custom_data: str - :param windows_configuration: Specifies Windows operating system settings - on the virtual machine. - :type windows_configuration: - ~azure.mgmt.compute.v2018_10_01.models.WindowsConfiguration - :param linux_configuration: Specifies the Linux operating system settings - on the virtual machine.

    For a list of supported Linux - distributions, see [Linux on Azure-Endorsed - Distributions](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-endorsed-distros?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json) -

    For running non-endorsed distributions, see [Information for - Non-Endorsed - Distributions](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-create-upload-generic?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json). - :type linux_configuration: - ~azure.mgmt.compute.v2018_10_01.models.LinuxConfiguration - :param secrets: Specifies set of certificates that should be installed - onto the virtual machines in the scale set. - :type secrets: - list[~azure.mgmt.compute.v2018_10_01.models.VaultSecretGroup] - """ - - _attribute_map = { - 'computer_name_prefix': {'key': 'computerNamePrefix', 'type': 'str'}, - 'admin_username': {'key': 'adminUsername', 'type': 'str'}, - 'admin_password': {'key': 'adminPassword', 'type': 'str'}, - 'custom_data': {'key': 'customData', 'type': 'str'}, - 'windows_configuration': {'key': 'windowsConfiguration', 'type': 'WindowsConfiguration'}, - 'linux_configuration': {'key': 'linuxConfiguration', 'type': 'LinuxConfiguration'}, - 'secrets': {'key': 'secrets', 'type': '[VaultSecretGroup]'}, - } - - def __init__(self, *, computer_name_prefix: str=None, admin_username: str=None, admin_password: str=None, custom_data: str=None, windows_configuration=None, linux_configuration=None, secrets=None, **kwargs) -> None: - super(VirtualMachineScaleSetOSProfile, self).__init__(**kwargs) - self.computer_name_prefix = computer_name_prefix - self.admin_username = admin_username - self.admin_password = admin_password - self.custom_data = custom_data - self.windows_configuration = windows_configuration - self.linux_configuration = linux_configuration - self.secrets = secrets diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_scale_set_paged.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_scale_set_paged.py deleted file mode 100644 index b4193df0b191..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_scale_set_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class VirtualMachineScaleSetPaged(Paged): - """ - A paging container for iterating over a list of :class:`VirtualMachineScaleSet ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[VirtualMachineScaleSet]'} - } - - def __init__(self, *args, **kwargs): - - super(VirtualMachineScaleSetPaged, self).__init__(*args, **kwargs) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_scale_set_public_ip_address_configuration.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_scale_set_public_ip_address_configuration.py deleted file mode 100644 index f7a13f10c6dc..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_scale_set_public_ip_address_configuration.py +++ /dev/null @@ -1,55 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineScaleSetPublicIPAddressConfiguration(Model): - """Describes a virtual machines scale set IP Configuration's PublicIPAddress - configuration. - - All required parameters must be populated in order to send to Azure. - - :param name: Required. The publicIP address configuration name. - :type name: str - :param idle_timeout_in_minutes: The idle timeout of the public IP address. - :type idle_timeout_in_minutes: int - :param dns_settings: The dns settings to be applied on the publicIP - addresses . - :type dns_settings: - ~azure.mgmt.compute.v2018_10_01.models.VirtualMachineScaleSetPublicIPAddressConfigurationDnsSettings - :param ip_tags: The list of IP tags associated with the public IP address. - :type ip_tags: - list[~azure.mgmt.compute.v2018_10_01.models.VirtualMachineScaleSetIpTag] - :param public_ip_prefix: The PublicIPPrefix from which to allocate - publicIP addresses. - :type public_ip_prefix: ~azure.mgmt.compute.v2018_10_01.models.SubResource - """ - - _validation = { - 'name': {'required': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'idle_timeout_in_minutes': {'key': 'properties.idleTimeoutInMinutes', 'type': 'int'}, - 'dns_settings': {'key': 'properties.dnsSettings', 'type': 'VirtualMachineScaleSetPublicIPAddressConfigurationDnsSettings'}, - 'ip_tags': {'key': 'properties.ipTags', 'type': '[VirtualMachineScaleSetIpTag]'}, - 'public_ip_prefix': {'key': 'properties.publicIPPrefix', 'type': 'SubResource'}, - } - - def __init__(self, **kwargs): - super(VirtualMachineScaleSetPublicIPAddressConfiguration, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.idle_timeout_in_minutes = kwargs.get('idle_timeout_in_minutes', None) - self.dns_settings = kwargs.get('dns_settings', None) - self.ip_tags = kwargs.get('ip_tags', None) - self.public_ip_prefix = kwargs.get('public_ip_prefix', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_scale_set_public_ip_address_configuration_dns_settings.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_scale_set_public_ip_address_configuration_dns_settings.py deleted file mode 100644 index 2fe562244372..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_scale_set_public_ip_address_configuration_dns_settings.py +++ /dev/null @@ -1,37 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineScaleSetPublicIPAddressConfigurationDnsSettings(Model): - """Describes a virtual machines scale sets network configuration's DNS - settings. - - All required parameters must be populated in order to send to Azure. - - :param domain_name_label: Required. The Domain name label.The - concatenation of the domain name label and vm index will be the domain - name labels of the PublicIPAddress resources that will be created - :type domain_name_label: str - """ - - _validation = { - 'domain_name_label': {'required': True}, - } - - _attribute_map = { - 'domain_name_label': {'key': 'domainNameLabel', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(VirtualMachineScaleSetPublicIPAddressConfigurationDnsSettings, self).__init__(**kwargs) - self.domain_name_label = kwargs.get('domain_name_label', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_scale_set_public_ip_address_configuration_dns_settings_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_scale_set_public_ip_address_configuration_dns_settings_py3.py deleted file mode 100644 index 326a36708ff4..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_scale_set_public_ip_address_configuration_dns_settings_py3.py +++ /dev/null @@ -1,37 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineScaleSetPublicIPAddressConfigurationDnsSettings(Model): - """Describes a virtual machines scale sets network configuration's DNS - settings. - - All required parameters must be populated in order to send to Azure. - - :param domain_name_label: Required. The Domain name label.The - concatenation of the domain name label and vm index will be the domain - name labels of the PublicIPAddress resources that will be created - :type domain_name_label: str - """ - - _validation = { - 'domain_name_label': {'required': True}, - } - - _attribute_map = { - 'domain_name_label': {'key': 'domainNameLabel', 'type': 'str'}, - } - - def __init__(self, *, domain_name_label: str, **kwargs) -> None: - super(VirtualMachineScaleSetPublicIPAddressConfigurationDnsSettings, self).__init__(**kwargs) - self.domain_name_label = domain_name_label diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_scale_set_public_ip_address_configuration_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_scale_set_public_ip_address_configuration_py3.py deleted file mode 100644 index 23a034d99222..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_scale_set_public_ip_address_configuration_py3.py +++ /dev/null @@ -1,55 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineScaleSetPublicIPAddressConfiguration(Model): - """Describes a virtual machines scale set IP Configuration's PublicIPAddress - configuration. - - All required parameters must be populated in order to send to Azure. - - :param name: Required. The publicIP address configuration name. - :type name: str - :param idle_timeout_in_minutes: The idle timeout of the public IP address. - :type idle_timeout_in_minutes: int - :param dns_settings: The dns settings to be applied on the publicIP - addresses . - :type dns_settings: - ~azure.mgmt.compute.v2018_10_01.models.VirtualMachineScaleSetPublicIPAddressConfigurationDnsSettings - :param ip_tags: The list of IP tags associated with the public IP address. - :type ip_tags: - list[~azure.mgmt.compute.v2018_10_01.models.VirtualMachineScaleSetIpTag] - :param public_ip_prefix: The PublicIPPrefix from which to allocate - publicIP addresses. - :type public_ip_prefix: ~azure.mgmt.compute.v2018_10_01.models.SubResource - """ - - _validation = { - 'name': {'required': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'idle_timeout_in_minutes': {'key': 'properties.idleTimeoutInMinutes', 'type': 'int'}, - 'dns_settings': {'key': 'properties.dnsSettings', 'type': 'VirtualMachineScaleSetPublicIPAddressConfigurationDnsSettings'}, - 'ip_tags': {'key': 'properties.ipTags', 'type': '[VirtualMachineScaleSetIpTag]'}, - 'public_ip_prefix': {'key': 'properties.publicIPPrefix', 'type': 'SubResource'}, - } - - def __init__(self, *, name: str, idle_timeout_in_minutes: int=None, dns_settings=None, ip_tags=None, public_ip_prefix=None, **kwargs) -> None: - super(VirtualMachineScaleSetPublicIPAddressConfiguration, self).__init__(**kwargs) - self.name = name - self.idle_timeout_in_minutes = idle_timeout_in_minutes - self.dns_settings = dns_settings - self.ip_tags = ip_tags - self.public_ip_prefix = public_ip_prefix diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_scale_set_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_scale_set_py3.py deleted file mode 100644 index 88e869c3b24b..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_scale_set_py3.py +++ /dev/null @@ -1,130 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource_py3 import Resource - - -class VirtualMachineScaleSet(Resource): - """Describes a Virtual Machine Scale Set. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource Id - :vartype id: str - :ivar name: Resource name - :vartype name: str - :ivar type: Resource type - :vartype type: str - :param location: Required. Resource location - :type location: str - :param tags: Resource tags - :type tags: dict[str, str] - :param sku: The virtual machine scale set sku. - :type sku: ~azure.mgmt.compute.v2018_10_01.models.Sku - :param plan: Specifies information about the marketplace image used to - create the virtual machine. This element is only used for marketplace - images. Before you can use a marketplace image from an API, you must - enable the image for programmatic use. In the Azure portal, find the - marketplace image that you want to use and then click **Want to deploy - programmatically, Get Started ->**. Enter any required information and - then click **Save**. - :type plan: ~azure.mgmt.compute.v2018_10_01.models.Plan - :param upgrade_policy: The upgrade policy. - :type upgrade_policy: ~azure.mgmt.compute.v2018_10_01.models.UpgradePolicy - :param virtual_machine_profile: The virtual machine profile. - :type virtual_machine_profile: - ~azure.mgmt.compute.v2018_10_01.models.VirtualMachineScaleSetVMProfile - :ivar provisioning_state: The provisioning state, which only appears in - the response. - :vartype provisioning_state: str - :param overprovision: Specifies whether the Virtual Machine Scale Set - should be overprovisioned. - :type overprovision: bool - :param do_not_run_extensions_on_overprovisioned_vms: When Overprovision is - enabled, extensions are launched only on the requested number of VMs which - are finally kept. This property will hence ensure that the extensions do - not run on the extra overprovisioned VMs. - :type do_not_run_extensions_on_overprovisioned_vms: bool - :ivar unique_id: Specifies the ID which uniquely identifies a Virtual - Machine Scale Set. - :vartype unique_id: str - :param single_placement_group: When true this limits the scale set to a - single placement group, of max size 100 virtual machines. - :type single_placement_group: bool - :param zone_balance: Whether to force strictly even Virtual Machine - distribution cross x-zones in case there is zone outage. - :type zone_balance: bool - :param platform_fault_domain_count: Fault Domain count for each placement - group. - :type platform_fault_domain_count: int - :param proximity_placement_group: Specifies information about the - proximity placement group that the virtual machine scale set should be - assigned to.

    Minimum api-version: 2018-04-01. - :type proximity_placement_group: - ~azure.mgmt.compute.v2018_10_01.models.SubResource - :param identity: The identity of the virtual machine scale set, if - configured. - :type identity: - ~azure.mgmt.compute.v2018_10_01.models.VirtualMachineScaleSetIdentity - :param zones: The virtual machine scale set zones. - :type zones: list[str] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - 'provisioning_state': {'readonly': True}, - 'unique_id': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'sku': {'key': 'sku', 'type': 'Sku'}, - 'plan': {'key': 'plan', 'type': 'Plan'}, - 'upgrade_policy': {'key': 'properties.upgradePolicy', 'type': 'UpgradePolicy'}, - 'virtual_machine_profile': {'key': 'properties.virtualMachineProfile', 'type': 'VirtualMachineScaleSetVMProfile'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'overprovision': {'key': 'properties.overprovision', 'type': 'bool'}, - 'do_not_run_extensions_on_overprovisioned_vms': {'key': 'properties.doNotRunExtensionsOnOverprovisionedVMs', 'type': 'bool'}, - 'unique_id': {'key': 'properties.uniqueId', 'type': 'str'}, - 'single_placement_group': {'key': 'properties.singlePlacementGroup', 'type': 'bool'}, - 'zone_balance': {'key': 'properties.zoneBalance', 'type': 'bool'}, - 'platform_fault_domain_count': {'key': 'properties.platformFaultDomainCount', 'type': 'int'}, - 'proximity_placement_group': {'key': 'properties.proximityPlacementGroup', 'type': 'SubResource'}, - 'identity': {'key': 'identity', 'type': 'VirtualMachineScaleSetIdentity'}, - 'zones': {'key': 'zones', 'type': '[str]'}, - } - - def __init__(self, *, location: str, tags=None, sku=None, plan=None, upgrade_policy=None, virtual_machine_profile=None, overprovision: bool=None, do_not_run_extensions_on_overprovisioned_vms: bool=None, single_placement_group: bool=None, zone_balance: bool=None, platform_fault_domain_count: int=None, proximity_placement_group=None, identity=None, zones=None, **kwargs) -> None: - super(VirtualMachineScaleSet, self).__init__(location=location, tags=tags, **kwargs) - self.sku = sku - self.plan = plan - self.upgrade_policy = upgrade_policy - self.virtual_machine_profile = virtual_machine_profile - self.provisioning_state = None - self.overprovision = overprovision - self.do_not_run_extensions_on_overprovisioned_vms = do_not_run_extensions_on_overprovisioned_vms - self.unique_id = None - self.single_placement_group = single_placement_group - self.zone_balance = zone_balance - self.platform_fault_domain_count = platform_fault_domain_count - self.proximity_placement_group = proximity_placement_group - self.identity = identity - self.zones = zones diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_scale_set_reimage_parameters.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_scale_set_reimage_parameters.py deleted file mode 100644 index d1c583c6ca1b..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_scale_set_reimage_parameters.py +++ /dev/null @@ -1,34 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .virtual_machine_scale_set_vm_reimage_parameters import VirtualMachineScaleSetVMReimageParameters - - -class VirtualMachineScaleSetReimageParameters(VirtualMachineScaleSetVMReimageParameters): - """Describes a Virtual Machine Scale Set VM Reimage Parameters. - - :param temp_disk: Specifies whether to reimage temp disk. Default value: - false. - :type temp_disk: bool - :param instance_ids: The virtual machine scale set instance ids. Omitting - the virtual machine scale set instance ids will result in the operation - being performed on all virtual machines in the virtual machine scale set. - :type instance_ids: list[str] - """ - - _attribute_map = { - 'temp_disk': {'key': 'tempDisk', 'type': 'bool'}, - 'instance_ids': {'key': 'instanceIds', 'type': '[str]'}, - } - - def __init__(self, **kwargs): - super(VirtualMachineScaleSetReimageParameters, self).__init__(**kwargs) - self.instance_ids = kwargs.get('instance_ids', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_scale_set_reimage_parameters_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_scale_set_reimage_parameters_py3.py deleted file mode 100644 index 0c3b6962d17e..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_scale_set_reimage_parameters_py3.py +++ /dev/null @@ -1,34 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .virtual_machine_scale_set_vm_reimage_parameters_py3 import VirtualMachineScaleSetVMReimageParameters - - -class VirtualMachineScaleSetReimageParameters(VirtualMachineScaleSetVMReimageParameters): - """Describes a Virtual Machine Scale Set VM Reimage Parameters. - - :param temp_disk: Specifies whether to reimage temp disk. Default value: - false. - :type temp_disk: bool - :param instance_ids: The virtual machine scale set instance ids. Omitting - the virtual machine scale set instance ids will result in the operation - being performed on all virtual machines in the virtual machine scale set. - :type instance_ids: list[str] - """ - - _attribute_map = { - 'temp_disk': {'key': 'tempDisk', 'type': 'bool'}, - 'instance_ids': {'key': 'instanceIds', 'type': '[str]'}, - } - - def __init__(self, *, temp_disk: bool=None, instance_ids=None, **kwargs) -> None: - super(VirtualMachineScaleSetReimageParameters, self).__init__(temp_disk=temp_disk, **kwargs) - self.instance_ids = instance_ids diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_scale_set_sku.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_scale_set_sku.py deleted file mode 100644 index 6c34f548e1b2..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_scale_set_sku.py +++ /dev/null @@ -1,46 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineScaleSetSku(Model): - """Describes an available virtual machine scale set sku. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar resource_type: The type of resource the sku applies to. - :vartype resource_type: str - :ivar sku: The Sku. - :vartype sku: ~azure.mgmt.compute.v2018_10_01.models.Sku - :ivar capacity: Specifies the number of virtual machines in the scale set. - :vartype capacity: - ~azure.mgmt.compute.v2018_10_01.models.VirtualMachineScaleSetSkuCapacity - """ - - _validation = { - 'resource_type': {'readonly': True}, - 'sku': {'readonly': True}, - 'capacity': {'readonly': True}, - } - - _attribute_map = { - 'resource_type': {'key': 'resourceType', 'type': 'str'}, - 'sku': {'key': 'sku', 'type': 'Sku'}, - 'capacity': {'key': 'capacity', 'type': 'VirtualMachineScaleSetSkuCapacity'}, - } - - def __init__(self, **kwargs): - super(VirtualMachineScaleSetSku, self).__init__(**kwargs) - self.resource_type = None - self.sku = None - self.capacity = None diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_scale_set_sku_capacity.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_scale_set_sku_capacity.py deleted file mode 100644 index beff389a7661..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_scale_set_sku_capacity.py +++ /dev/null @@ -1,52 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineScaleSetSkuCapacity(Model): - """Describes scaling information of a sku. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar minimum: The minimum capacity. - :vartype minimum: long - :ivar maximum: The maximum capacity that can be set. - :vartype maximum: long - :ivar default_capacity: The default capacity. - :vartype default_capacity: long - :ivar scale_type: The scale type applicable to the sku. Possible values - include: 'Automatic', 'None' - :vartype scale_type: str or - ~azure.mgmt.compute.v2018_10_01.models.VirtualMachineScaleSetSkuScaleType - """ - - _validation = { - 'minimum': {'readonly': True}, - 'maximum': {'readonly': True}, - 'default_capacity': {'readonly': True}, - 'scale_type': {'readonly': True}, - } - - _attribute_map = { - 'minimum': {'key': 'minimum', 'type': 'long'}, - 'maximum': {'key': 'maximum', 'type': 'long'}, - 'default_capacity': {'key': 'defaultCapacity', 'type': 'long'}, - 'scale_type': {'key': 'scaleType', 'type': 'VirtualMachineScaleSetSkuScaleType'}, - } - - def __init__(self, **kwargs): - super(VirtualMachineScaleSetSkuCapacity, self).__init__(**kwargs) - self.minimum = None - self.maximum = None - self.default_capacity = None - self.scale_type = None diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_scale_set_sku_capacity_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_scale_set_sku_capacity_py3.py deleted file mode 100644 index 73d117928751..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_scale_set_sku_capacity_py3.py +++ /dev/null @@ -1,52 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineScaleSetSkuCapacity(Model): - """Describes scaling information of a sku. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar minimum: The minimum capacity. - :vartype minimum: long - :ivar maximum: The maximum capacity that can be set. - :vartype maximum: long - :ivar default_capacity: The default capacity. - :vartype default_capacity: long - :ivar scale_type: The scale type applicable to the sku. Possible values - include: 'Automatic', 'None' - :vartype scale_type: str or - ~azure.mgmt.compute.v2018_10_01.models.VirtualMachineScaleSetSkuScaleType - """ - - _validation = { - 'minimum': {'readonly': True}, - 'maximum': {'readonly': True}, - 'default_capacity': {'readonly': True}, - 'scale_type': {'readonly': True}, - } - - _attribute_map = { - 'minimum': {'key': 'minimum', 'type': 'long'}, - 'maximum': {'key': 'maximum', 'type': 'long'}, - 'default_capacity': {'key': 'defaultCapacity', 'type': 'long'}, - 'scale_type': {'key': 'scaleType', 'type': 'VirtualMachineScaleSetSkuScaleType'}, - } - - def __init__(self, **kwargs) -> None: - super(VirtualMachineScaleSetSkuCapacity, self).__init__(**kwargs) - self.minimum = None - self.maximum = None - self.default_capacity = None - self.scale_type = None diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_scale_set_sku_paged.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_scale_set_sku_paged.py deleted file mode 100644 index 33c53d2a8b04..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_scale_set_sku_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class VirtualMachineScaleSetSkuPaged(Paged): - """ - A paging container for iterating over a list of :class:`VirtualMachineScaleSetSku ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[VirtualMachineScaleSetSku]'} - } - - def __init__(self, *args, **kwargs): - - super(VirtualMachineScaleSetSkuPaged, self).__init__(*args, **kwargs) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_scale_set_sku_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_scale_set_sku_py3.py deleted file mode 100644 index be42b347d30a..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_scale_set_sku_py3.py +++ /dev/null @@ -1,46 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineScaleSetSku(Model): - """Describes an available virtual machine scale set sku. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar resource_type: The type of resource the sku applies to. - :vartype resource_type: str - :ivar sku: The Sku. - :vartype sku: ~azure.mgmt.compute.v2018_10_01.models.Sku - :ivar capacity: Specifies the number of virtual machines in the scale set. - :vartype capacity: - ~azure.mgmt.compute.v2018_10_01.models.VirtualMachineScaleSetSkuCapacity - """ - - _validation = { - 'resource_type': {'readonly': True}, - 'sku': {'readonly': True}, - 'capacity': {'readonly': True}, - } - - _attribute_map = { - 'resource_type': {'key': 'resourceType', 'type': 'str'}, - 'sku': {'key': 'sku', 'type': 'Sku'}, - 'capacity': {'key': 'capacity', 'type': 'VirtualMachineScaleSetSkuCapacity'}, - } - - def __init__(self, **kwargs) -> None: - super(VirtualMachineScaleSetSku, self).__init__(**kwargs) - self.resource_type = None - self.sku = None - self.capacity = None diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_scale_set_storage_profile.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_scale_set_storage_profile.py deleted file mode 100644 index ea246c181c1a..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_scale_set_storage_profile.py +++ /dev/null @@ -1,49 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineScaleSetStorageProfile(Model): - """Describes a virtual machine scale set storage profile. - - :param image_reference: Specifies information about the image to use. You - can specify information about platform images, marketplace images, or - virtual machine images. This element is required when you want to use a - platform image, marketplace image, or virtual machine image, but is not - used in other creation operations. - :type image_reference: - ~azure.mgmt.compute.v2018_10_01.models.ImageReference - :param os_disk: Specifies information about the operating system disk used - by the virtual machines in the scale set.

    For more information - about disks, see [About disks and VHDs for Azure virtual - machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-about-disks-vhds?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). - :type os_disk: - ~azure.mgmt.compute.v2018_10_01.models.VirtualMachineScaleSetOSDisk - :param data_disks: Specifies the parameters that are used to add data - disks to the virtual machines in the scale set.

    For more - information about disks, see [About disks and VHDs for Azure virtual - machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-about-disks-vhds?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). - :type data_disks: - list[~azure.mgmt.compute.v2018_10_01.models.VirtualMachineScaleSetDataDisk] - """ - - _attribute_map = { - 'image_reference': {'key': 'imageReference', 'type': 'ImageReference'}, - 'os_disk': {'key': 'osDisk', 'type': 'VirtualMachineScaleSetOSDisk'}, - 'data_disks': {'key': 'dataDisks', 'type': '[VirtualMachineScaleSetDataDisk]'}, - } - - def __init__(self, **kwargs): - super(VirtualMachineScaleSetStorageProfile, self).__init__(**kwargs) - self.image_reference = kwargs.get('image_reference', None) - self.os_disk = kwargs.get('os_disk', None) - self.data_disks = kwargs.get('data_disks', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_scale_set_storage_profile_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_scale_set_storage_profile_py3.py deleted file mode 100644 index cacd54634f88..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_scale_set_storage_profile_py3.py +++ /dev/null @@ -1,49 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineScaleSetStorageProfile(Model): - """Describes a virtual machine scale set storage profile. - - :param image_reference: Specifies information about the image to use. You - can specify information about platform images, marketplace images, or - virtual machine images. This element is required when you want to use a - platform image, marketplace image, or virtual machine image, but is not - used in other creation operations. - :type image_reference: - ~azure.mgmt.compute.v2018_10_01.models.ImageReference - :param os_disk: Specifies information about the operating system disk used - by the virtual machines in the scale set.

    For more information - about disks, see [About disks and VHDs for Azure virtual - machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-about-disks-vhds?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). - :type os_disk: - ~azure.mgmt.compute.v2018_10_01.models.VirtualMachineScaleSetOSDisk - :param data_disks: Specifies the parameters that are used to add data - disks to the virtual machines in the scale set.

    For more - information about disks, see [About disks and VHDs for Azure virtual - machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-about-disks-vhds?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). - :type data_disks: - list[~azure.mgmt.compute.v2018_10_01.models.VirtualMachineScaleSetDataDisk] - """ - - _attribute_map = { - 'image_reference': {'key': 'imageReference', 'type': 'ImageReference'}, - 'os_disk': {'key': 'osDisk', 'type': 'VirtualMachineScaleSetOSDisk'}, - 'data_disks': {'key': 'dataDisks', 'type': '[VirtualMachineScaleSetDataDisk]'}, - } - - def __init__(self, *, image_reference=None, os_disk=None, data_disks=None, **kwargs) -> None: - super(VirtualMachineScaleSetStorageProfile, self).__init__(**kwargs) - self.image_reference = image_reference - self.os_disk = os_disk - self.data_disks = data_disks diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_scale_set_update.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_scale_set_update.py deleted file mode 100644 index 8478dbfd9e7e..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_scale_set_update.py +++ /dev/null @@ -1,61 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .update_resource import UpdateResource - - -class VirtualMachineScaleSetUpdate(UpdateResource): - """Describes a Virtual Machine Scale Set. - - :param tags: Resource tags - :type tags: dict[str, str] - :param sku: The virtual machine scale set sku. - :type sku: ~azure.mgmt.compute.v2018_10_01.models.Sku - :param plan: The purchase plan when deploying a virtual machine scale set - from VM Marketplace images. - :type plan: ~azure.mgmt.compute.v2018_10_01.models.Plan - :param upgrade_policy: The upgrade policy. - :type upgrade_policy: ~azure.mgmt.compute.v2018_10_01.models.UpgradePolicy - :param virtual_machine_profile: The virtual machine profile. - :type virtual_machine_profile: - ~azure.mgmt.compute.v2018_10_01.models.VirtualMachineScaleSetUpdateVMProfile - :param overprovision: Specifies whether the Virtual Machine Scale Set - should be overprovisioned. - :type overprovision: bool - :param single_placement_group: When true this limits the scale set to a - single placement group, of max size 100 virtual machines. - :type single_placement_group: bool - :param identity: The identity of the virtual machine scale set, if - configured. - :type identity: - ~azure.mgmt.compute.v2018_10_01.models.VirtualMachineScaleSetIdentity - """ - - _attribute_map = { - 'tags': {'key': 'tags', 'type': '{str}'}, - 'sku': {'key': 'sku', 'type': 'Sku'}, - 'plan': {'key': 'plan', 'type': 'Plan'}, - 'upgrade_policy': {'key': 'properties.upgradePolicy', 'type': 'UpgradePolicy'}, - 'virtual_machine_profile': {'key': 'properties.virtualMachineProfile', 'type': 'VirtualMachineScaleSetUpdateVMProfile'}, - 'overprovision': {'key': 'properties.overprovision', 'type': 'bool'}, - 'single_placement_group': {'key': 'properties.singlePlacementGroup', 'type': 'bool'}, - 'identity': {'key': 'identity', 'type': 'VirtualMachineScaleSetIdentity'}, - } - - def __init__(self, **kwargs): - super(VirtualMachineScaleSetUpdate, self).__init__(**kwargs) - self.sku = kwargs.get('sku', None) - self.plan = kwargs.get('plan', None) - self.upgrade_policy = kwargs.get('upgrade_policy', None) - self.virtual_machine_profile = kwargs.get('virtual_machine_profile', None) - self.overprovision = kwargs.get('overprovision', None) - self.single_placement_group = kwargs.get('single_placement_group', None) - self.identity = kwargs.get('identity', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_scale_set_update_ip_configuration.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_scale_set_update_ip_configuration.py deleted file mode 100644 index 8f58b50c381e..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_scale_set_update_ip_configuration.py +++ /dev/null @@ -1,77 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .sub_resource import SubResource - - -class VirtualMachineScaleSetUpdateIPConfiguration(SubResource): - """Describes a virtual machine scale set network profile's IP configuration. - - :param id: Resource Id - :type id: str - :param name: The IP configuration name. - :type name: str - :param subnet: The subnet. - :type subnet: ~azure.mgmt.compute.v2018_10_01.models.ApiEntityReference - :param primary: Specifies the primary IP Configuration in case the network - interface has more than one IP Configuration. - :type primary: bool - :param public_ip_address_configuration: The publicIPAddressConfiguration. - :type public_ip_address_configuration: - ~azure.mgmt.compute.v2018_10_01.models.VirtualMachineScaleSetUpdatePublicIPAddressConfiguration - :param private_ip_address_version: Available from Api-Version 2017-03-30 - onwards, it represents whether the specific ipconfiguration is IPv4 or - IPv6. Default is taken as IPv4. Possible values are: 'IPv4' and 'IPv6'. - Possible values include: 'IPv4', 'IPv6' - :type private_ip_address_version: str or - ~azure.mgmt.compute.v2018_10_01.models.IPVersion - :param application_gateway_backend_address_pools: The application gateway - backend address pools. - :type application_gateway_backend_address_pools: - list[~azure.mgmt.compute.v2018_10_01.models.SubResource] - :param application_security_groups: Specifies an array of references to - application security group. - :type application_security_groups: - list[~azure.mgmt.compute.v2018_10_01.models.SubResource] - :param load_balancer_backend_address_pools: The load balancer backend - address pools. - :type load_balancer_backend_address_pools: - list[~azure.mgmt.compute.v2018_10_01.models.SubResource] - :param load_balancer_inbound_nat_pools: The load balancer inbound nat - pools. - :type load_balancer_inbound_nat_pools: - list[~azure.mgmt.compute.v2018_10_01.models.SubResource] - """ - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'subnet': {'key': 'properties.subnet', 'type': 'ApiEntityReference'}, - 'primary': {'key': 'properties.primary', 'type': 'bool'}, - 'public_ip_address_configuration': {'key': 'properties.publicIPAddressConfiguration', 'type': 'VirtualMachineScaleSetUpdatePublicIPAddressConfiguration'}, - 'private_ip_address_version': {'key': 'properties.privateIPAddressVersion', 'type': 'str'}, - 'application_gateway_backend_address_pools': {'key': 'properties.applicationGatewayBackendAddressPools', 'type': '[SubResource]'}, - 'application_security_groups': {'key': 'properties.applicationSecurityGroups', 'type': '[SubResource]'}, - 'load_balancer_backend_address_pools': {'key': 'properties.loadBalancerBackendAddressPools', 'type': '[SubResource]'}, - 'load_balancer_inbound_nat_pools': {'key': 'properties.loadBalancerInboundNatPools', 'type': '[SubResource]'}, - } - - def __init__(self, **kwargs): - super(VirtualMachineScaleSetUpdateIPConfiguration, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.subnet = kwargs.get('subnet', None) - self.primary = kwargs.get('primary', None) - self.public_ip_address_configuration = kwargs.get('public_ip_address_configuration', None) - self.private_ip_address_version = kwargs.get('private_ip_address_version', None) - self.application_gateway_backend_address_pools = kwargs.get('application_gateway_backend_address_pools', None) - self.application_security_groups = kwargs.get('application_security_groups', None) - self.load_balancer_backend_address_pools = kwargs.get('load_balancer_backend_address_pools', None) - self.load_balancer_inbound_nat_pools = kwargs.get('load_balancer_inbound_nat_pools', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_scale_set_update_ip_configuration_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_scale_set_update_ip_configuration_py3.py deleted file mode 100644 index c3afa2576eb8..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_scale_set_update_ip_configuration_py3.py +++ /dev/null @@ -1,77 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .sub_resource_py3 import SubResource - - -class VirtualMachineScaleSetUpdateIPConfiguration(SubResource): - """Describes a virtual machine scale set network profile's IP configuration. - - :param id: Resource Id - :type id: str - :param name: The IP configuration name. - :type name: str - :param subnet: The subnet. - :type subnet: ~azure.mgmt.compute.v2018_10_01.models.ApiEntityReference - :param primary: Specifies the primary IP Configuration in case the network - interface has more than one IP Configuration. - :type primary: bool - :param public_ip_address_configuration: The publicIPAddressConfiguration. - :type public_ip_address_configuration: - ~azure.mgmt.compute.v2018_10_01.models.VirtualMachineScaleSetUpdatePublicIPAddressConfiguration - :param private_ip_address_version: Available from Api-Version 2017-03-30 - onwards, it represents whether the specific ipconfiguration is IPv4 or - IPv6. Default is taken as IPv4. Possible values are: 'IPv4' and 'IPv6'. - Possible values include: 'IPv4', 'IPv6' - :type private_ip_address_version: str or - ~azure.mgmt.compute.v2018_10_01.models.IPVersion - :param application_gateway_backend_address_pools: The application gateway - backend address pools. - :type application_gateway_backend_address_pools: - list[~azure.mgmt.compute.v2018_10_01.models.SubResource] - :param application_security_groups: Specifies an array of references to - application security group. - :type application_security_groups: - list[~azure.mgmt.compute.v2018_10_01.models.SubResource] - :param load_balancer_backend_address_pools: The load balancer backend - address pools. - :type load_balancer_backend_address_pools: - list[~azure.mgmt.compute.v2018_10_01.models.SubResource] - :param load_balancer_inbound_nat_pools: The load balancer inbound nat - pools. - :type load_balancer_inbound_nat_pools: - list[~azure.mgmt.compute.v2018_10_01.models.SubResource] - """ - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'subnet': {'key': 'properties.subnet', 'type': 'ApiEntityReference'}, - 'primary': {'key': 'properties.primary', 'type': 'bool'}, - 'public_ip_address_configuration': {'key': 'properties.publicIPAddressConfiguration', 'type': 'VirtualMachineScaleSetUpdatePublicIPAddressConfiguration'}, - 'private_ip_address_version': {'key': 'properties.privateIPAddressVersion', 'type': 'str'}, - 'application_gateway_backend_address_pools': {'key': 'properties.applicationGatewayBackendAddressPools', 'type': '[SubResource]'}, - 'application_security_groups': {'key': 'properties.applicationSecurityGroups', 'type': '[SubResource]'}, - 'load_balancer_backend_address_pools': {'key': 'properties.loadBalancerBackendAddressPools', 'type': '[SubResource]'}, - 'load_balancer_inbound_nat_pools': {'key': 'properties.loadBalancerInboundNatPools', 'type': '[SubResource]'}, - } - - def __init__(self, *, id: str=None, name: str=None, subnet=None, primary: bool=None, public_ip_address_configuration=None, private_ip_address_version=None, application_gateway_backend_address_pools=None, application_security_groups=None, load_balancer_backend_address_pools=None, load_balancer_inbound_nat_pools=None, **kwargs) -> None: - super(VirtualMachineScaleSetUpdateIPConfiguration, self).__init__(id=id, **kwargs) - self.name = name - self.subnet = subnet - self.primary = primary - self.public_ip_address_configuration = public_ip_address_configuration - self.private_ip_address_version = private_ip_address_version - self.application_gateway_backend_address_pools = application_gateway_backend_address_pools - self.application_security_groups = application_security_groups - self.load_balancer_backend_address_pools = load_balancer_backend_address_pools - self.load_balancer_inbound_nat_pools = load_balancer_inbound_nat_pools diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_scale_set_update_network_configuration.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_scale_set_update_network_configuration.py deleted file mode 100644 index 21b8d35411da..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_scale_set_update_network_configuration.py +++ /dev/null @@ -1,61 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .sub_resource import SubResource - - -class VirtualMachineScaleSetUpdateNetworkConfiguration(SubResource): - """Describes a virtual machine scale set network profile's network - configurations. - - :param id: Resource Id - :type id: str - :param name: The network configuration name. - :type name: str - :param primary: Whether this is a primary NIC on a virtual machine. - :type primary: bool - :param enable_accelerated_networking: Specifies whether the network - interface is accelerated networking-enabled. - :type enable_accelerated_networking: bool - :param network_security_group: The network security group. - :type network_security_group: - ~azure.mgmt.compute.v2018_10_01.models.SubResource - :param dns_settings: The dns settings to be applied on the network - interfaces. - :type dns_settings: - ~azure.mgmt.compute.v2018_10_01.models.VirtualMachineScaleSetNetworkConfigurationDnsSettings - :param ip_configurations: The virtual machine scale set IP Configuration. - :type ip_configurations: - list[~azure.mgmt.compute.v2018_10_01.models.VirtualMachineScaleSetUpdateIPConfiguration] - :param enable_ip_forwarding: Whether IP forwarding enabled on this NIC. - :type enable_ip_forwarding: bool - """ - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'primary': {'key': 'properties.primary', 'type': 'bool'}, - 'enable_accelerated_networking': {'key': 'properties.enableAcceleratedNetworking', 'type': 'bool'}, - 'network_security_group': {'key': 'properties.networkSecurityGroup', 'type': 'SubResource'}, - 'dns_settings': {'key': 'properties.dnsSettings', 'type': 'VirtualMachineScaleSetNetworkConfigurationDnsSettings'}, - 'ip_configurations': {'key': 'properties.ipConfigurations', 'type': '[VirtualMachineScaleSetUpdateIPConfiguration]'}, - 'enable_ip_forwarding': {'key': 'properties.enableIPForwarding', 'type': 'bool'}, - } - - def __init__(self, **kwargs): - super(VirtualMachineScaleSetUpdateNetworkConfiguration, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.primary = kwargs.get('primary', None) - self.enable_accelerated_networking = kwargs.get('enable_accelerated_networking', None) - self.network_security_group = kwargs.get('network_security_group', None) - self.dns_settings = kwargs.get('dns_settings', None) - self.ip_configurations = kwargs.get('ip_configurations', None) - self.enable_ip_forwarding = kwargs.get('enable_ip_forwarding', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_scale_set_update_network_configuration_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_scale_set_update_network_configuration_py3.py deleted file mode 100644 index 0c829e7f5862..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_scale_set_update_network_configuration_py3.py +++ /dev/null @@ -1,61 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .sub_resource_py3 import SubResource - - -class VirtualMachineScaleSetUpdateNetworkConfiguration(SubResource): - """Describes a virtual machine scale set network profile's network - configurations. - - :param id: Resource Id - :type id: str - :param name: The network configuration name. - :type name: str - :param primary: Whether this is a primary NIC on a virtual machine. - :type primary: bool - :param enable_accelerated_networking: Specifies whether the network - interface is accelerated networking-enabled. - :type enable_accelerated_networking: bool - :param network_security_group: The network security group. - :type network_security_group: - ~azure.mgmt.compute.v2018_10_01.models.SubResource - :param dns_settings: The dns settings to be applied on the network - interfaces. - :type dns_settings: - ~azure.mgmt.compute.v2018_10_01.models.VirtualMachineScaleSetNetworkConfigurationDnsSettings - :param ip_configurations: The virtual machine scale set IP Configuration. - :type ip_configurations: - list[~azure.mgmt.compute.v2018_10_01.models.VirtualMachineScaleSetUpdateIPConfiguration] - :param enable_ip_forwarding: Whether IP forwarding enabled on this NIC. - :type enable_ip_forwarding: bool - """ - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'primary': {'key': 'properties.primary', 'type': 'bool'}, - 'enable_accelerated_networking': {'key': 'properties.enableAcceleratedNetworking', 'type': 'bool'}, - 'network_security_group': {'key': 'properties.networkSecurityGroup', 'type': 'SubResource'}, - 'dns_settings': {'key': 'properties.dnsSettings', 'type': 'VirtualMachineScaleSetNetworkConfigurationDnsSettings'}, - 'ip_configurations': {'key': 'properties.ipConfigurations', 'type': '[VirtualMachineScaleSetUpdateIPConfiguration]'}, - 'enable_ip_forwarding': {'key': 'properties.enableIPForwarding', 'type': 'bool'}, - } - - def __init__(self, *, id: str=None, name: str=None, primary: bool=None, enable_accelerated_networking: bool=None, network_security_group=None, dns_settings=None, ip_configurations=None, enable_ip_forwarding: bool=None, **kwargs) -> None: - super(VirtualMachineScaleSetUpdateNetworkConfiguration, self).__init__(id=id, **kwargs) - self.name = name - self.primary = primary - self.enable_accelerated_networking = enable_accelerated_networking - self.network_security_group = network_security_group - self.dns_settings = dns_settings - self.ip_configurations = ip_configurations - self.enable_ip_forwarding = enable_ip_forwarding diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_scale_set_update_network_profile.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_scale_set_update_network_profile.py deleted file mode 100644 index 0a501bd3bd66..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_scale_set_update_network_profile.py +++ /dev/null @@ -1,30 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineScaleSetUpdateNetworkProfile(Model): - """Describes a virtual machine scale set network profile. - - :param network_interface_configurations: The list of network - configurations. - :type network_interface_configurations: - list[~azure.mgmt.compute.v2018_10_01.models.VirtualMachineScaleSetUpdateNetworkConfiguration] - """ - - _attribute_map = { - 'network_interface_configurations': {'key': 'networkInterfaceConfigurations', 'type': '[VirtualMachineScaleSetUpdateNetworkConfiguration]'}, - } - - def __init__(self, **kwargs): - super(VirtualMachineScaleSetUpdateNetworkProfile, self).__init__(**kwargs) - self.network_interface_configurations = kwargs.get('network_interface_configurations', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_scale_set_update_network_profile_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_scale_set_update_network_profile_py3.py deleted file mode 100644 index f07f067eca34..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_scale_set_update_network_profile_py3.py +++ /dev/null @@ -1,30 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineScaleSetUpdateNetworkProfile(Model): - """Describes a virtual machine scale set network profile. - - :param network_interface_configurations: The list of network - configurations. - :type network_interface_configurations: - list[~azure.mgmt.compute.v2018_10_01.models.VirtualMachineScaleSetUpdateNetworkConfiguration] - """ - - _attribute_map = { - 'network_interface_configurations': {'key': 'networkInterfaceConfigurations', 'type': '[VirtualMachineScaleSetUpdateNetworkConfiguration]'}, - } - - def __init__(self, *, network_interface_configurations=None, **kwargs) -> None: - super(VirtualMachineScaleSetUpdateNetworkProfile, self).__init__(**kwargs) - self.network_interface_configurations = network_interface_configurations diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_scale_set_update_os_disk.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_scale_set_update_os_disk.py deleted file mode 100644 index 72edd81b4cab..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_scale_set_update_os_disk.py +++ /dev/null @@ -1,56 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineScaleSetUpdateOSDisk(Model): - """Describes virtual machine scale set operating system disk Update Object. - This should be used for Updating VMSS OS Disk. - - :param caching: The caching type. Possible values include: 'None', - 'ReadOnly', 'ReadWrite' - :type caching: str or ~azure.mgmt.compute.v2018_10_01.models.CachingTypes - :param write_accelerator_enabled: Specifies whether writeAccelerator - should be enabled or disabled on the disk. - :type write_accelerator_enabled: bool - :param disk_size_gb: Specifies the size of the operating system disk in - gigabytes. This element can be used to overwrite the size of the disk in a - virtual machine image.

    This value cannot be larger than 1023 GB - :type disk_size_gb: int - :param image: The Source User Image VirtualHardDisk. This VirtualHardDisk - will be copied before using it to attach to the Virtual Machine. If - SourceImage is provided, the destination VirtualHardDisk should not exist. - :type image: ~azure.mgmt.compute.v2018_10_01.models.VirtualHardDisk - :param vhd_containers: The list of virtual hard disk container uris. - :type vhd_containers: list[str] - :param managed_disk: The managed disk parameters. - :type managed_disk: - ~azure.mgmt.compute.v2018_10_01.models.VirtualMachineScaleSetManagedDiskParameters - """ - - _attribute_map = { - 'caching': {'key': 'caching', 'type': 'CachingTypes'}, - 'write_accelerator_enabled': {'key': 'writeAcceleratorEnabled', 'type': 'bool'}, - 'disk_size_gb': {'key': 'diskSizeGB', 'type': 'int'}, - 'image': {'key': 'image', 'type': 'VirtualHardDisk'}, - 'vhd_containers': {'key': 'vhdContainers', 'type': '[str]'}, - 'managed_disk': {'key': 'managedDisk', 'type': 'VirtualMachineScaleSetManagedDiskParameters'}, - } - - def __init__(self, **kwargs): - super(VirtualMachineScaleSetUpdateOSDisk, self).__init__(**kwargs) - self.caching = kwargs.get('caching', None) - self.write_accelerator_enabled = kwargs.get('write_accelerator_enabled', None) - self.disk_size_gb = kwargs.get('disk_size_gb', None) - self.image = kwargs.get('image', None) - self.vhd_containers = kwargs.get('vhd_containers', None) - self.managed_disk = kwargs.get('managed_disk', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_scale_set_update_os_disk_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_scale_set_update_os_disk_py3.py deleted file mode 100644 index 580aa65b9d5d..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_scale_set_update_os_disk_py3.py +++ /dev/null @@ -1,56 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineScaleSetUpdateOSDisk(Model): - """Describes virtual machine scale set operating system disk Update Object. - This should be used for Updating VMSS OS Disk. - - :param caching: The caching type. Possible values include: 'None', - 'ReadOnly', 'ReadWrite' - :type caching: str or ~azure.mgmt.compute.v2018_10_01.models.CachingTypes - :param write_accelerator_enabled: Specifies whether writeAccelerator - should be enabled or disabled on the disk. - :type write_accelerator_enabled: bool - :param disk_size_gb: Specifies the size of the operating system disk in - gigabytes. This element can be used to overwrite the size of the disk in a - virtual machine image.

    This value cannot be larger than 1023 GB - :type disk_size_gb: int - :param image: The Source User Image VirtualHardDisk. This VirtualHardDisk - will be copied before using it to attach to the Virtual Machine. If - SourceImage is provided, the destination VirtualHardDisk should not exist. - :type image: ~azure.mgmt.compute.v2018_10_01.models.VirtualHardDisk - :param vhd_containers: The list of virtual hard disk container uris. - :type vhd_containers: list[str] - :param managed_disk: The managed disk parameters. - :type managed_disk: - ~azure.mgmt.compute.v2018_10_01.models.VirtualMachineScaleSetManagedDiskParameters - """ - - _attribute_map = { - 'caching': {'key': 'caching', 'type': 'CachingTypes'}, - 'write_accelerator_enabled': {'key': 'writeAcceleratorEnabled', 'type': 'bool'}, - 'disk_size_gb': {'key': 'diskSizeGB', 'type': 'int'}, - 'image': {'key': 'image', 'type': 'VirtualHardDisk'}, - 'vhd_containers': {'key': 'vhdContainers', 'type': '[str]'}, - 'managed_disk': {'key': 'managedDisk', 'type': 'VirtualMachineScaleSetManagedDiskParameters'}, - } - - def __init__(self, *, caching=None, write_accelerator_enabled: bool=None, disk_size_gb: int=None, image=None, vhd_containers=None, managed_disk=None, **kwargs) -> None: - super(VirtualMachineScaleSetUpdateOSDisk, self).__init__(**kwargs) - self.caching = caching - self.write_accelerator_enabled = write_accelerator_enabled - self.disk_size_gb = disk_size_gb - self.image = image - self.vhd_containers = vhd_containers - self.managed_disk = managed_disk diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_scale_set_update_os_profile.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_scale_set_update_os_profile.py deleted file mode 100644 index 64c4844a9e47..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_scale_set_update_os_profile.py +++ /dev/null @@ -1,43 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineScaleSetUpdateOSProfile(Model): - """Describes a virtual machine scale set OS profile. - - :param custom_data: A base-64 encoded string of custom data. - :type custom_data: str - :param windows_configuration: The Windows Configuration of the OS profile. - :type windows_configuration: - ~azure.mgmt.compute.v2018_10_01.models.WindowsConfiguration - :param linux_configuration: The Linux Configuration of the OS profile. - :type linux_configuration: - ~azure.mgmt.compute.v2018_10_01.models.LinuxConfiguration - :param secrets: The List of certificates for addition to the VM. - :type secrets: - list[~azure.mgmt.compute.v2018_10_01.models.VaultSecretGroup] - """ - - _attribute_map = { - 'custom_data': {'key': 'customData', 'type': 'str'}, - 'windows_configuration': {'key': 'windowsConfiguration', 'type': 'WindowsConfiguration'}, - 'linux_configuration': {'key': 'linuxConfiguration', 'type': 'LinuxConfiguration'}, - 'secrets': {'key': 'secrets', 'type': '[VaultSecretGroup]'}, - } - - def __init__(self, **kwargs): - super(VirtualMachineScaleSetUpdateOSProfile, self).__init__(**kwargs) - self.custom_data = kwargs.get('custom_data', None) - self.windows_configuration = kwargs.get('windows_configuration', None) - self.linux_configuration = kwargs.get('linux_configuration', None) - self.secrets = kwargs.get('secrets', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_scale_set_update_os_profile_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_scale_set_update_os_profile_py3.py deleted file mode 100644 index feba5c831a3d..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_scale_set_update_os_profile_py3.py +++ /dev/null @@ -1,43 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineScaleSetUpdateOSProfile(Model): - """Describes a virtual machine scale set OS profile. - - :param custom_data: A base-64 encoded string of custom data. - :type custom_data: str - :param windows_configuration: The Windows Configuration of the OS profile. - :type windows_configuration: - ~azure.mgmt.compute.v2018_10_01.models.WindowsConfiguration - :param linux_configuration: The Linux Configuration of the OS profile. - :type linux_configuration: - ~azure.mgmt.compute.v2018_10_01.models.LinuxConfiguration - :param secrets: The List of certificates for addition to the VM. - :type secrets: - list[~azure.mgmt.compute.v2018_10_01.models.VaultSecretGroup] - """ - - _attribute_map = { - 'custom_data': {'key': 'customData', 'type': 'str'}, - 'windows_configuration': {'key': 'windowsConfiguration', 'type': 'WindowsConfiguration'}, - 'linux_configuration': {'key': 'linuxConfiguration', 'type': 'LinuxConfiguration'}, - 'secrets': {'key': 'secrets', 'type': '[VaultSecretGroup]'}, - } - - def __init__(self, *, custom_data: str=None, windows_configuration=None, linux_configuration=None, secrets=None, **kwargs) -> None: - super(VirtualMachineScaleSetUpdateOSProfile, self).__init__(**kwargs) - self.custom_data = custom_data - self.windows_configuration = windows_configuration - self.linux_configuration = linux_configuration - self.secrets = secrets diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_scale_set_update_public_ip_address_configuration.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_scale_set_update_public_ip_address_configuration.py deleted file mode 100644 index 8a8da382c4ba..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_scale_set_update_public_ip_address_configuration.py +++ /dev/null @@ -1,39 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineScaleSetUpdatePublicIPAddressConfiguration(Model): - """Describes a virtual machines scale set IP Configuration's PublicIPAddress - configuration. - - :param name: The publicIP address configuration name. - :type name: str - :param idle_timeout_in_minutes: The idle timeout of the public IP address. - :type idle_timeout_in_minutes: int - :param dns_settings: The dns settings to be applied on the publicIP - addresses . - :type dns_settings: - ~azure.mgmt.compute.v2018_10_01.models.VirtualMachineScaleSetPublicIPAddressConfigurationDnsSettings - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'idle_timeout_in_minutes': {'key': 'properties.idleTimeoutInMinutes', 'type': 'int'}, - 'dns_settings': {'key': 'properties.dnsSettings', 'type': 'VirtualMachineScaleSetPublicIPAddressConfigurationDnsSettings'}, - } - - def __init__(self, **kwargs): - super(VirtualMachineScaleSetUpdatePublicIPAddressConfiguration, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.idle_timeout_in_minutes = kwargs.get('idle_timeout_in_minutes', None) - self.dns_settings = kwargs.get('dns_settings', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_scale_set_update_public_ip_address_configuration_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_scale_set_update_public_ip_address_configuration_py3.py deleted file mode 100644 index b48f6adae4da..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_scale_set_update_public_ip_address_configuration_py3.py +++ /dev/null @@ -1,39 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineScaleSetUpdatePublicIPAddressConfiguration(Model): - """Describes a virtual machines scale set IP Configuration's PublicIPAddress - configuration. - - :param name: The publicIP address configuration name. - :type name: str - :param idle_timeout_in_minutes: The idle timeout of the public IP address. - :type idle_timeout_in_minutes: int - :param dns_settings: The dns settings to be applied on the publicIP - addresses . - :type dns_settings: - ~azure.mgmt.compute.v2018_10_01.models.VirtualMachineScaleSetPublicIPAddressConfigurationDnsSettings - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'idle_timeout_in_minutes': {'key': 'properties.idleTimeoutInMinutes', 'type': 'int'}, - 'dns_settings': {'key': 'properties.dnsSettings', 'type': 'VirtualMachineScaleSetPublicIPAddressConfigurationDnsSettings'}, - } - - def __init__(self, *, name: str=None, idle_timeout_in_minutes: int=None, dns_settings=None, **kwargs) -> None: - super(VirtualMachineScaleSetUpdatePublicIPAddressConfiguration, self).__init__(**kwargs) - self.name = name - self.idle_timeout_in_minutes = idle_timeout_in_minutes - self.dns_settings = dns_settings diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_scale_set_update_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_scale_set_update_py3.py deleted file mode 100644 index 0e4ae72fbf76..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_scale_set_update_py3.py +++ /dev/null @@ -1,61 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .update_resource_py3 import UpdateResource - - -class VirtualMachineScaleSetUpdate(UpdateResource): - """Describes a Virtual Machine Scale Set. - - :param tags: Resource tags - :type tags: dict[str, str] - :param sku: The virtual machine scale set sku. - :type sku: ~azure.mgmt.compute.v2018_10_01.models.Sku - :param plan: The purchase plan when deploying a virtual machine scale set - from VM Marketplace images. - :type plan: ~azure.mgmt.compute.v2018_10_01.models.Plan - :param upgrade_policy: The upgrade policy. - :type upgrade_policy: ~azure.mgmt.compute.v2018_10_01.models.UpgradePolicy - :param virtual_machine_profile: The virtual machine profile. - :type virtual_machine_profile: - ~azure.mgmt.compute.v2018_10_01.models.VirtualMachineScaleSetUpdateVMProfile - :param overprovision: Specifies whether the Virtual Machine Scale Set - should be overprovisioned. - :type overprovision: bool - :param single_placement_group: When true this limits the scale set to a - single placement group, of max size 100 virtual machines. - :type single_placement_group: bool - :param identity: The identity of the virtual machine scale set, if - configured. - :type identity: - ~azure.mgmt.compute.v2018_10_01.models.VirtualMachineScaleSetIdentity - """ - - _attribute_map = { - 'tags': {'key': 'tags', 'type': '{str}'}, - 'sku': {'key': 'sku', 'type': 'Sku'}, - 'plan': {'key': 'plan', 'type': 'Plan'}, - 'upgrade_policy': {'key': 'properties.upgradePolicy', 'type': 'UpgradePolicy'}, - 'virtual_machine_profile': {'key': 'properties.virtualMachineProfile', 'type': 'VirtualMachineScaleSetUpdateVMProfile'}, - 'overprovision': {'key': 'properties.overprovision', 'type': 'bool'}, - 'single_placement_group': {'key': 'properties.singlePlacementGroup', 'type': 'bool'}, - 'identity': {'key': 'identity', 'type': 'VirtualMachineScaleSetIdentity'}, - } - - def __init__(self, *, tags=None, sku=None, plan=None, upgrade_policy=None, virtual_machine_profile=None, overprovision: bool=None, single_placement_group: bool=None, identity=None, **kwargs) -> None: - super(VirtualMachineScaleSetUpdate, self).__init__(tags=tags, **kwargs) - self.sku = sku - self.plan = plan - self.upgrade_policy = upgrade_policy - self.virtual_machine_profile = virtual_machine_profile - self.overprovision = overprovision - self.single_placement_group = single_placement_group - self.identity = identity diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_scale_set_update_storage_profile.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_scale_set_update_storage_profile.py deleted file mode 100644 index d7f23cbadc74..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_scale_set_update_storage_profile.py +++ /dev/null @@ -1,39 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineScaleSetUpdateStorageProfile(Model): - """Describes a virtual machine scale set storage profile. - - :param image_reference: The image reference. - :type image_reference: - ~azure.mgmt.compute.v2018_10_01.models.ImageReference - :param os_disk: The OS disk. - :type os_disk: - ~azure.mgmt.compute.v2018_10_01.models.VirtualMachineScaleSetUpdateOSDisk - :param data_disks: The data disks. - :type data_disks: - list[~azure.mgmt.compute.v2018_10_01.models.VirtualMachineScaleSetDataDisk] - """ - - _attribute_map = { - 'image_reference': {'key': 'imageReference', 'type': 'ImageReference'}, - 'os_disk': {'key': 'osDisk', 'type': 'VirtualMachineScaleSetUpdateOSDisk'}, - 'data_disks': {'key': 'dataDisks', 'type': '[VirtualMachineScaleSetDataDisk]'}, - } - - def __init__(self, **kwargs): - super(VirtualMachineScaleSetUpdateStorageProfile, self).__init__(**kwargs) - self.image_reference = kwargs.get('image_reference', None) - self.os_disk = kwargs.get('os_disk', None) - self.data_disks = kwargs.get('data_disks', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_scale_set_update_storage_profile_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_scale_set_update_storage_profile_py3.py deleted file mode 100644 index eec6f04a730e..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_scale_set_update_storage_profile_py3.py +++ /dev/null @@ -1,39 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineScaleSetUpdateStorageProfile(Model): - """Describes a virtual machine scale set storage profile. - - :param image_reference: The image reference. - :type image_reference: - ~azure.mgmt.compute.v2018_10_01.models.ImageReference - :param os_disk: The OS disk. - :type os_disk: - ~azure.mgmt.compute.v2018_10_01.models.VirtualMachineScaleSetUpdateOSDisk - :param data_disks: The data disks. - :type data_disks: - list[~azure.mgmt.compute.v2018_10_01.models.VirtualMachineScaleSetDataDisk] - """ - - _attribute_map = { - 'image_reference': {'key': 'imageReference', 'type': 'ImageReference'}, - 'os_disk': {'key': 'osDisk', 'type': 'VirtualMachineScaleSetUpdateOSDisk'}, - 'data_disks': {'key': 'dataDisks', 'type': '[VirtualMachineScaleSetDataDisk]'}, - } - - def __init__(self, *, image_reference=None, os_disk=None, data_disks=None, **kwargs) -> None: - super(VirtualMachineScaleSetUpdateStorageProfile, self).__init__(**kwargs) - self.image_reference = image_reference - self.os_disk = os_disk - self.data_disks = data_disks diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_scale_set_update_vm_profile.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_scale_set_update_vm_profile.py deleted file mode 100644 index 7a8bd8cd4ff9..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_scale_set_update_vm_profile.py +++ /dev/null @@ -1,55 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineScaleSetUpdateVMProfile(Model): - """Describes a virtual machine scale set virtual machine profile. - - :param os_profile: The virtual machine scale set OS profile. - :type os_profile: - ~azure.mgmt.compute.v2018_10_01.models.VirtualMachineScaleSetUpdateOSProfile - :param storage_profile: The virtual machine scale set storage profile. - :type storage_profile: - ~azure.mgmt.compute.v2018_10_01.models.VirtualMachineScaleSetUpdateStorageProfile - :param network_profile: The virtual machine scale set network profile. - :type network_profile: - ~azure.mgmt.compute.v2018_10_01.models.VirtualMachineScaleSetUpdateNetworkProfile - :param diagnostics_profile: The virtual machine scale set diagnostics - profile. - :type diagnostics_profile: - ~azure.mgmt.compute.v2018_10_01.models.DiagnosticsProfile - :param extension_profile: The virtual machine scale set extension profile. - :type extension_profile: - ~azure.mgmt.compute.v2018_10_01.models.VirtualMachineScaleSetExtensionProfile - :param license_type: The license type, which is for bring your own license - scenario. - :type license_type: str - """ - - _attribute_map = { - 'os_profile': {'key': 'osProfile', 'type': 'VirtualMachineScaleSetUpdateOSProfile'}, - 'storage_profile': {'key': 'storageProfile', 'type': 'VirtualMachineScaleSetUpdateStorageProfile'}, - 'network_profile': {'key': 'networkProfile', 'type': 'VirtualMachineScaleSetUpdateNetworkProfile'}, - 'diagnostics_profile': {'key': 'diagnosticsProfile', 'type': 'DiagnosticsProfile'}, - 'extension_profile': {'key': 'extensionProfile', 'type': 'VirtualMachineScaleSetExtensionProfile'}, - 'license_type': {'key': 'licenseType', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(VirtualMachineScaleSetUpdateVMProfile, self).__init__(**kwargs) - self.os_profile = kwargs.get('os_profile', None) - self.storage_profile = kwargs.get('storage_profile', None) - self.network_profile = kwargs.get('network_profile', None) - self.diagnostics_profile = kwargs.get('diagnostics_profile', None) - self.extension_profile = kwargs.get('extension_profile', None) - self.license_type = kwargs.get('license_type', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_scale_set_update_vm_profile_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_scale_set_update_vm_profile_py3.py deleted file mode 100644 index 474a3738141f..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_scale_set_update_vm_profile_py3.py +++ /dev/null @@ -1,55 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineScaleSetUpdateVMProfile(Model): - """Describes a virtual machine scale set virtual machine profile. - - :param os_profile: The virtual machine scale set OS profile. - :type os_profile: - ~azure.mgmt.compute.v2018_10_01.models.VirtualMachineScaleSetUpdateOSProfile - :param storage_profile: The virtual machine scale set storage profile. - :type storage_profile: - ~azure.mgmt.compute.v2018_10_01.models.VirtualMachineScaleSetUpdateStorageProfile - :param network_profile: The virtual machine scale set network profile. - :type network_profile: - ~azure.mgmt.compute.v2018_10_01.models.VirtualMachineScaleSetUpdateNetworkProfile - :param diagnostics_profile: The virtual machine scale set diagnostics - profile. - :type diagnostics_profile: - ~azure.mgmt.compute.v2018_10_01.models.DiagnosticsProfile - :param extension_profile: The virtual machine scale set extension profile. - :type extension_profile: - ~azure.mgmt.compute.v2018_10_01.models.VirtualMachineScaleSetExtensionProfile - :param license_type: The license type, which is for bring your own license - scenario. - :type license_type: str - """ - - _attribute_map = { - 'os_profile': {'key': 'osProfile', 'type': 'VirtualMachineScaleSetUpdateOSProfile'}, - 'storage_profile': {'key': 'storageProfile', 'type': 'VirtualMachineScaleSetUpdateStorageProfile'}, - 'network_profile': {'key': 'networkProfile', 'type': 'VirtualMachineScaleSetUpdateNetworkProfile'}, - 'diagnostics_profile': {'key': 'diagnosticsProfile', 'type': 'DiagnosticsProfile'}, - 'extension_profile': {'key': 'extensionProfile', 'type': 'VirtualMachineScaleSetExtensionProfile'}, - 'license_type': {'key': 'licenseType', 'type': 'str'}, - } - - def __init__(self, *, os_profile=None, storage_profile=None, network_profile=None, diagnostics_profile=None, extension_profile=None, license_type: str=None, **kwargs) -> None: - super(VirtualMachineScaleSetUpdateVMProfile, self).__init__(**kwargs) - self.os_profile = os_profile - self.storage_profile = storage_profile - self.network_profile = network_profile - self.diagnostics_profile = diagnostics_profile - self.extension_profile = extension_profile - self.license_type = license_type diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_scale_set_vm.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_scale_set_vm.py deleted file mode 100644 index 7b1c2434c5e8..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_scale_set_vm.py +++ /dev/null @@ -1,168 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource import Resource - - -class VirtualMachineScaleSetVM(Resource): - """Describes a virtual machine scale set virtual machine. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource Id - :vartype id: str - :ivar name: Resource name - :vartype name: str - :ivar type: Resource type - :vartype type: str - :param location: Required. Resource location - :type location: str - :param tags: Resource tags - :type tags: dict[str, str] - :ivar instance_id: The virtual machine instance ID. - :vartype instance_id: str - :ivar sku: The virtual machine SKU. - :vartype sku: ~azure.mgmt.compute.v2018_10_01.models.Sku - :ivar latest_model_applied: Specifies whether the latest model has been - applied to the virtual machine. - :vartype latest_model_applied: bool - :ivar vm_id: Azure VM unique ID. - :vartype vm_id: str - :ivar instance_view: The virtual machine instance view. - :vartype instance_view: - ~azure.mgmt.compute.v2018_10_01.models.VirtualMachineScaleSetVMInstanceView - :param hardware_profile: Specifies the hardware settings for the virtual - machine. - :type hardware_profile: - ~azure.mgmt.compute.v2018_10_01.models.HardwareProfile - :param storage_profile: Specifies the storage settings for the virtual - machine disks. - :type storage_profile: - ~azure.mgmt.compute.v2018_10_01.models.StorageProfile - :param additional_capabilities: Specifies additional capabilities enabled - or disabled on the virtual machine in the scale set. For instance: whether - the virtual machine has the capability to support attaching managed data - disks with UltraSSD_LRS storage account type. - :type additional_capabilities: - ~azure.mgmt.compute.v2018_10_01.models.AdditionalCapabilities - :param os_profile: Specifies the operating system settings for the virtual - machine. - :type os_profile: ~azure.mgmt.compute.v2018_10_01.models.OSProfile - :param network_profile: Specifies the network interfaces of the virtual - machine. - :type network_profile: - ~azure.mgmt.compute.v2018_10_01.models.NetworkProfile - :param diagnostics_profile: Specifies the boot diagnostic settings state. -

    Minimum api-version: 2015-06-15. - :type diagnostics_profile: - ~azure.mgmt.compute.v2018_10_01.models.DiagnosticsProfile - :param availability_set: Specifies information about the availability set - that the virtual machine should be assigned to. Virtual machines specified - in the same availability set are allocated to different nodes to maximize - availability. For more information about availability sets, see [Manage - the availability of virtual - machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-manage-availability?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). -

    For more information on Azure planned maintenance, see [Planned - maintenance for virtual machines in - Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-planned-maintenance?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json) -

    Currently, a VM can only be added to availability set at creation - time. An existing VM cannot be added to an availability set. - :type availability_set: ~azure.mgmt.compute.v2018_10_01.models.SubResource - :ivar provisioning_state: The provisioning state, which only appears in - the response. - :vartype provisioning_state: str - :param license_type: Specifies that the image or disk that is being used - was licensed on-premises. This element is only used for images that - contain the Windows Server operating system.

    Possible values are: -

    Windows_Client

    Windows_Server

    If this element - is included in a request for an update, the value must match the initial - value. This value cannot be updated.

    For more information, see - [Azure Hybrid Use Benefit for Windows - Server](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-hybrid-use-benefit-licensing?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json) -

    Minimum api-version: 2015-06-15 - :type license_type: str - :param plan: Specifies information about the marketplace image used to - create the virtual machine. This element is only used for marketplace - images. Before you can use a marketplace image from an API, you must - enable the image for programmatic use. In the Azure portal, find the - marketplace image that you want to use and then click **Want to deploy - programmatically, Get Started ->**. Enter any required information and - then click **Save**. - :type plan: ~azure.mgmt.compute.v2018_10_01.models.Plan - :ivar resources: The virtual machine child extension resources. - :vartype resources: - list[~azure.mgmt.compute.v2018_10_01.models.VirtualMachineExtension] - :ivar zones: The virtual machine zones. - :vartype zones: list[str] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - 'instance_id': {'readonly': True}, - 'sku': {'readonly': True}, - 'latest_model_applied': {'readonly': True}, - 'vm_id': {'readonly': True}, - 'instance_view': {'readonly': True}, - 'provisioning_state': {'readonly': True}, - 'resources': {'readonly': True}, - 'zones': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'instance_id': {'key': 'instanceId', 'type': 'str'}, - 'sku': {'key': 'sku', 'type': 'Sku'}, - 'latest_model_applied': {'key': 'properties.latestModelApplied', 'type': 'bool'}, - 'vm_id': {'key': 'properties.vmId', 'type': 'str'}, - 'instance_view': {'key': 'properties.instanceView', 'type': 'VirtualMachineScaleSetVMInstanceView'}, - 'hardware_profile': {'key': 'properties.hardwareProfile', 'type': 'HardwareProfile'}, - 'storage_profile': {'key': 'properties.storageProfile', 'type': 'StorageProfile'}, - 'additional_capabilities': {'key': 'properties.additionalCapabilities', 'type': 'AdditionalCapabilities'}, - 'os_profile': {'key': 'properties.osProfile', 'type': 'OSProfile'}, - 'network_profile': {'key': 'properties.networkProfile', 'type': 'NetworkProfile'}, - 'diagnostics_profile': {'key': 'properties.diagnosticsProfile', 'type': 'DiagnosticsProfile'}, - 'availability_set': {'key': 'properties.availabilitySet', 'type': 'SubResource'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'license_type': {'key': 'properties.licenseType', 'type': 'str'}, - 'plan': {'key': 'plan', 'type': 'Plan'}, - 'resources': {'key': 'resources', 'type': '[VirtualMachineExtension]'}, - 'zones': {'key': 'zones', 'type': '[str]'}, - } - - def __init__(self, **kwargs): - super(VirtualMachineScaleSetVM, self).__init__(**kwargs) - self.instance_id = None - self.sku = None - self.latest_model_applied = None - self.vm_id = None - self.instance_view = None - self.hardware_profile = kwargs.get('hardware_profile', None) - self.storage_profile = kwargs.get('storage_profile', None) - self.additional_capabilities = kwargs.get('additional_capabilities', None) - self.os_profile = kwargs.get('os_profile', None) - self.network_profile = kwargs.get('network_profile', None) - self.diagnostics_profile = kwargs.get('diagnostics_profile', None) - self.availability_set = kwargs.get('availability_set', None) - self.provisioning_state = None - self.license_type = kwargs.get('license_type', None) - self.plan = kwargs.get('plan', None) - self.resources = None - self.zones = None diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_scale_set_vm_extensions_summary.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_scale_set_vm_extensions_summary.py deleted file mode 100644 index aa15752c3e96..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_scale_set_vm_extensions_summary.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineScaleSetVMExtensionsSummary(Model): - """Extensions summary for virtual machines of a virtual machine scale set. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar name: The extension name. - :vartype name: str - :ivar statuses_summary: The extensions information. - :vartype statuses_summary: - list[~azure.mgmt.compute.v2018_10_01.models.VirtualMachineStatusCodeCount] - """ - - _validation = { - 'name': {'readonly': True}, - 'statuses_summary': {'readonly': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'statuses_summary': {'key': 'statusesSummary', 'type': '[VirtualMachineStatusCodeCount]'}, - } - - def __init__(self, **kwargs): - super(VirtualMachineScaleSetVMExtensionsSummary, self).__init__(**kwargs) - self.name = None - self.statuses_summary = None diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_scale_set_vm_extensions_summary_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_scale_set_vm_extensions_summary_py3.py deleted file mode 100644 index 35fd5aeefda9..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_scale_set_vm_extensions_summary_py3.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineScaleSetVMExtensionsSummary(Model): - """Extensions summary for virtual machines of a virtual machine scale set. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar name: The extension name. - :vartype name: str - :ivar statuses_summary: The extensions information. - :vartype statuses_summary: - list[~azure.mgmt.compute.v2018_10_01.models.VirtualMachineStatusCodeCount] - """ - - _validation = { - 'name': {'readonly': True}, - 'statuses_summary': {'readonly': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'statuses_summary': {'key': 'statusesSummary', 'type': '[VirtualMachineStatusCodeCount]'}, - } - - def __init__(self, **kwargs) -> None: - super(VirtualMachineScaleSetVMExtensionsSummary, self).__init__(**kwargs) - self.name = None - self.statuses_summary = None diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_scale_set_vm_instance_ids.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_scale_set_vm_instance_ids.py deleted file mode 100644 index 772c66dad326..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_scale_set_vm_instance_ids.py +++ /dev/null @@ -1,30 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineScaleSetVMInstanceIDs(Model): - """Specifies a list of virtual machine instance IDs from the VM scale set. - - :param instance_ids: The virtual machine scale set instance ids. Omitting - the virtual machine scale set instance ids will result in the operation - being performed on all virtual machines in the virtual machine scale set. - :type instance_ids: list[str] - """ - - _attribute_map = { - 'instance_ids': {'key': 'instanceIds', 'type': '[str]'}, - } - - def __init__(self, **kwargs): - super(VirtualMachineScaleSetVMInstanceIDs, self).__init__(**kwargs) - self.instance_ids = kwargs.get('instance_ids', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_scale_set_vm_instance_ids_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_scale_set_vm_instance_ids_py3.py deleted file mode 100644 index 658a8ccb87d5..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_scale_set_vm_instance_ids_py3.py +++ /dev/null @@ -1,30 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineScaleSetVMInstanceIDs(Model): - """Specifies a list of virtual machine instance IDs from the VM scale set. - - :param instance_ids: The virtual machine scale set instance ids. Omitting - the virtual machine scale set instance ids will result in the operation - being performed on all virtual machines in the virtual machine scale set. - :type instance_ids: list[str] - """ - - _attribute_map = { - 'instance_ids': {'key': 'instanceIds', 'type': '[str]'}, - } - - def __init__(self, *, instance_ids=None, **kwargs) -> None: - super(VirtualMachineScaleSetVMInstanceIDs, self).__init__(**kwargs) - self.instance_ids = instance_ids diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_scale_set_vm_instance_required_ids.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_scale_set_vm_instance_required_ids.py deleted file mode 100644 index ece250dd4fd4..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_scale_set_vm_instance_required_ids.py +++ /dev/null @@ -1,34 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineScaleSetVMInstanceRequiredIDs(Model): - """Specifies a list of virtual machine instance IDs from the VM scale set. - - All required parameters must be populated in order to send to Azure. - - :param instance_ids: Required. The virtual machine scale set instance ids. - :type instance_ids: list[str] - """ - - _validation = { - 'instance_ids': {'required': True}, - } - - _attribute_map = { - 'instance_ids': {'key': 'instanceIds', 'type': '[str]'}, - } - - def __init__(self, **kwargs): - super(VirtualMachineScaleSetVMInstanceRequiredIDs, self).__init__(**kwargs) - self.instance_ids = kwargs.get('instance_ids', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_scale_set_vm_instance_required_ids_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_scale_set_vm_instance_required_ids_py3.py deleted file mode 100644 index f32c6181467d..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_scale_set_vm_instance_required_ids_py3.py +++ /dev/null @@ -1,34 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineScaleSetVMInstanceRequiredIDs(Model): - """Specifies a list of virtual machine instance IDs from the VM scale set. - - All required parameters must be populated in order to send to Azure. - - :param instance_ids: Required. The virtual machine scale set instance ids. - :type instance_ids: list[str] - """ - - _validation = { - 'instance_ids': {'required': True}, - } - - _attribute_map = { - 'instance_ids': {'key': 'instanceIds', 'type': '[str]'}, - } - - def __init__(self, *, instance_ids, **kwargs) -> None: - super(VirtualMachineScaleSetVMInstanceRequiredIDs, self).__init__(**kwargs) - self.instance_ids = instance_ids diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_scale_set_vm_instance_view.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_scale_set_vm_instance_view.py deleted file mode 100644 index e285f498ac59..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_scale_set_vm_instance_view.py +++ /dev/null @@ -1,86 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineScaleSetVMInstanceView(Model): - """The instance view of a virtual machine scale set VM. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :param platform_update_domain: The Update Domain count. - :type platform_update_domain: int - :param platform_fault_domain: The Fault Domain count. - :type platform_fault_domain: int - :param rdp_thumb_print: The Remote desktop certificate thumbprint. - :type rdp_thumb_print: str - :param vm_agent: The VM Agent running on the virtual machine. - :type vm_agent: - ~azure.mgmt.compute.v2018_10_01.models.VirtualMachineAgentInstanceView - :param maintenance_redeploy_status: The Maintenance Operation status on - the virtual machine. - :type maintenance_redeploy_status: - ~azure.mgmt.compute.v2018_10_01.models.MaintenanceRedeployStatus - :param disks: The disks information. - :type disks: list[~azure.mgmt.compute.v2018_10_01.models.DiskInstanceView] - :param extensions: The extensions information. - :type extensions: - list[~azure.mgmt.compute.v2018_10_01.models.VirtualMachineExtensionInstanceView] - :ivar vm_health: The health status for the VM. - :vartype vm_health: - ~azure.mgmt.compute.v2018_10_01.models.VirtualMachineHealthStatus - :param boot_diagnostics: Boot Diagnostics is a debugging feature which - allows you to view Console Output and Screenshot to diagnose VM status. -

    You can easily view the output of your console log.

    - Azure also enables you to see a screenshot of the VM from the hypervisor. - :type boot_diagnostics: - ~azure.mgmt.compute.v2018_10_01.models.BootDiagnosticsInstanceView - :param statuses: The resource status information. - :type statuses: - list[~azure.mgmt.compute.v2018_10_01.models.InstanceViewStatus] - :param placement_group_id: The placement group in which the VM is running. - If the VM is deallocated it will not have a placementGroupId. - :type placement_group_id: str - """ - - _validation = { - 'vm_health': {'readonly': True}, - } - - _attribute_map = { - 'platform_update_domain': {'key': 'platformUpdateDomain', 'type': 'int'}, - 'platform_fault_domain': {'key': 'platformFaultDomain', 'type': 'int'}, - 'rdp_thumb_print': {'key': 'rdpThumbPrint', 'type': 'str'}, - 'vm_agent': {'key': 'vmAgent', 'type': 'VirtualMachineAgentInstanceView'}, - 'maintenance_redeploy_status': {'key': 'maintenanceRedeployStatus', 'type': 'MaintenanceRedeployStatus'}, - 'disks': {'key': 'disks', 'type': '[DiskInstanceView]'}, - 'extensions': {'key': 'extensions', 'type': '[VirtualMachineExtensionInstanceView]'}, - 'vm_health': {'key': 'vmHealth', 'type': 'VirtualMachineHealthStatus'}, - 'boot_diagnostics': {'key': 'bootDiagnostics', 'type': 'BootDiagnosticsInstanceView'}, - 'statuses': {'key': 'statuses', 'type': '[InstanceViewStatus]'}, - 'placement_group_id': {'key': 'placementGroupId', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(VirtualMachineScaleSetVMInstanceView, self).__init__(**kwargs) - self.platform_update_domain = kwargs.get('platform_update_domain', None) - self.platform_fault_domain = kwargs.get('platform_fault_domain', None) - self.rdp_thumb_print = kwargs.get('rdp_thumb_print', None) - self.vm_agent = kwargs.get('vm_agent', None) - self.maintenance_redeploy_status = kwargs.get('maintenance_redeploy_status', None) - self.disks = kwargs.get('disks', None) - self.extensions = kwargs.get('extensions', None) - self.vm_health = None - self.boot_diagnostics = kwargs.get('boot_diagnostics', None) - self.statuses = kwargs.get('statuses', None) - self.placement_group_id = kwargs.get('placement_group_id', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_scale_set_vm_instance_view_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_scale_set_vm_instance_view_py3.py deleted file mode 100644 index 0eb4b0c95ebb..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_scale_set_vm_instance_view_py3.py +++ /dev/null @@ -1,86 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineScaleSetVMInstanceView(Model): - """The instance view of a virtual machine scale set VM. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :param platform_update_domain: The Update Domain count. - :type platform_update_domain: int - :param platform_fault_domain: The Fault Domain count. - :type platform_fault_domain: int - :param rdp_thumb_print: The Remote desktop certificate thumbprint. - :type rdp_thumb_print: str - :param vm_agent: The VM Agent running on the virtual machine. - :type vm_agent: - ~azure.mgmt.compute.v2018_10_01.models.VirtualMachineAgentInstanceView - :param maintenance_redeploy_status: The Maintenance Operation status on - the virtual machine. - :type maintenance_redeploy_status: - ~azure.mgmt.compute.v2018_10_01.models.MaintenanceRedeployStatus - :param disks: The disks information. - :type disks: list[~azure.mgmt.compute.v2018_10_01.models.DiskInstanceView] - :param extensions: The extensions information. - :type extensions: - list[~azure.mgmt.compute.v2018_10_01.models.VirtualMachineExtensionInstanceView] - :ivar vm_health: The health status for the VM. - :vartype vm_health: - ~azure.mgmt.compute.v2018_10_01.models.VirtualMachineHealthStatus - :param boot_diagnostics: Boot Diagnostics is a debugging feature which - allows you to view Console Output and Screenshot to diagnose VM status. -

    You can easily view the output of your console log.

    - Azure also enables you to see a screenshot of the VM from the hypervisor. - :type boot_diagnostics: - ~azure.mgmt.compute.v2018_10_01.models.BootDiagnosticsInstanceView - :param statuses: The resource status information. - :type statuses: - list[~azure.mgmt.compute.v2018_10_01.models.InstanceViewStatus] - :param placement_group_id: The placement group in which the VM is running. - If the VM is deallocated it will not have a placementGroupId. - :type placement_group_id: str - """ - - _validation = { - 'vm_health': {'readonly': True}, - } - - _attribute_map = { - 'platform_update_domain': {'key': 'platformUpdateDomain', 'type': 'int'}, - 'platform_fault_domain': {'key': 'platformFaultDomain', 'type': 'int'}, - 'rdp_thumb_print': {'key': 'rdpThumbPrint', 'type': 'str'}, - 'vm_agent': {'key': 'vmAgent', 'type': 'VirtualMachineAgentInstanceView'}, - 'maintenance_redeploy_status': {'key': 'maintenanceRedeployStatus', 'type': 'MaintenanceRedeployStatus'}, - 'disks': {'key': 'disks', 'type': '[DiskInstanceView]'}, - 'extensions': {'key': 'extensions', 'type': '[VirtualMachineExtensionInstanceView]'}, - 'vm_health': {'key': 'vmHealth', 'type': 'VirtualMachineHealthStatus'}, - 'boot_diagnostics': {'key': 'bootDiagnostics', 'type': 'BootDiagnosticsInstanceView'}, - 'statuses': {'key': 'statuses', 'type': '[InstanceViewStatus]'}, - 'placement_group_id': {'key': 'placementGroupId', 'type': 'str'}, - } - - def __init__(self, *, platform_update_domain: int=None, platform_fault_domain: int=None, rdp_thumb_print: str=None, vm_agent=None, maintenance_redeploy_status=None, disks=None, extensions=None, boot_diagnostics=None, statuses=None, placement_group_id: str=None, **kwargs) -> None: - super(VirtualMachineScaleSetVMInstanceView, self).__init__(**kwargs) - self.platform_update_domain = platform_update_domain - self.platform_fault_domain = platform_fault_domain - self.rdp_thumb_print = rdp_thumb_print - self.vm_agent = vm_agent - self.maintenance_redeploy_status = maintenance_redeploy_status - self.disks = disks - self.extensions = extensions - self.vm_health = None - self.boot_diagnostics = boot_diagnostics - self.statuses = statuses - self.placement_group_id = placement_group_id diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_scale_set_vm_paged.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_scale_set_vm_paged.py deleted file mode 100644 index e1f19a79375e..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_scale_set_vm_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class VirtualMachineScaleSetVMPaged(Paged): - """ - A paging container for iterating over a list of :class:`VirtualMachineScaleSetVM ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[VirtualMachineScaleSetVM]'} - } - - def __init__(self, *args, **kwargs): - - super(VirtualMachineScaleSetVMPaged, self).__init__(*args, **kwargs) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_scale_set_vm_profile.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_scale_set_vm_profile.py deleted file mode 100644 index 53a6384c704f..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_scale_set_vm_profile.py +++ /dev/null @@ -1,88 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineScaleSetVMProfile(Model): - """Describes a virtual machine scale set virtual machine profile. - - :param os_profile: Specifies the operating system settings for the virtual - machines in the scale set. - :type os_profile: - ~azure.mgmt.compute.v2018_10_01.models.VirtualMachineScaleSetOSProfile - :param storage_profile: Specifies the storage settings for the virtual - machine disks. - :type storage_profile: - ~azure.mgmt.compute.v2018_10_01.models.VirtualMachineScaleSetStorageProfile - :param additional_capabilities: Specifies additional capabilities enabled - or disabled on the virtual machine in the scale set. For instance: whether - the virtual machine has the capability to support attaching managed data - disks with UltraSSD_LRS storage account type. - :type additional_capabilities: - ~azure.mgmt.compute.v2018_10_01.models.AdditionalCapabilities - :param network_profile: Specifies properties of the network interfaces of - the virtual machines in the scale set. - :type network_profile: - ~azure.mgmt.compute.v2018_10_01.models.VirtualMachineScaleSetNetworkProfile - :param diagnostics_profile: Specifies the boot diagnostic settings state. -

    Minimum api-version: 2015-06-15. - :type diagnostics_profile: - ~azure.mgmt.compute.v2018_10_01.models.DiagnosticsProfile - :param extension_profile: Specifies a collection of settings for - extensions installed on virtual machines in the scale set. - :type extension_profile: - ~azure.mgmt.compute.v2018_10_01.models.VirtualMachineScaleSetExtensionProfile - :param license_type: Specifies that the image or disk that is being used - was licensed on-premises. This element is only used for images that - contain the Windows Server operating system.

    Possible values are: -

    Windows_Client

    Windows_Server

    If this element - is included in a request for an update, the value must match the initial - value. This value cannot be updated.

    For more information, see - [Azure Hybrid Use Benefit for Windows - Server](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-hybrid-use-benefit-licensing?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json) -

    Minimum api-version: 2015-06-15 - :type license_type: str - :param priority: Specifies the priority for the virtual machines in the - scale set.

    Minimum api-version: 2017-10-30-preview. Possible - values include: 'Regular', 'Low' - :type priority: str or - ~azure.mgmt.compute.v2018_10_01.models.VirtualMachinePriorityTypes - :param eviction_policy: Specifies the eviction policy for virtual machines - in a low priority scale set.

    Minimum api-version: - 2017-10-30-preview. Possible values include: 'Deallocate', 'Delete' - :type eviction_policy: str or - ~azure.mgmt.compute.v2018_10_01.models.VirtualMachineEvictionPolicyTypes - """ - - _attribute_map = { - 'os_profile': {'key': 'osProfile', 'type': 'VirtualMachineScaleSetOSProfile'}, - 'storage_profile': {'key': 'storageProfile', 'type': 'VirtualMachineScaleSetStorageProfile'}, - 'additional_capabilities': {'key': 'additionalCapabilities', 'type': 'AdditionalCapabilities'}, - 'network_profile': {'key': 'networkProfile', 'type': 'VirtualMachineScaleSetNetworkProfile'}, - 'diagnostics_profile': {'key': 'diagnosticsProfile', 'type': 'DiagnosticsProfile'}, - 'extension_profile': {'key': 'extensionProfile', 'type': 'VirtualMachineScaleSetExtensionProfile'}, - 'license_type': {'key': 'licenseType', 'type': 'str'}, - 'priority': {'key': 'priority', 'type': 'str'}, - 'eviction_policy': {'key': 'evictionPolicy', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(VirtualMachineScaleSetVMProfile, self).__init__(**kwargs) - self.os_profile = kwargs.get('os_profile', None) - self.storage_profile = kwargs.get('storage_profile', None) - self.additional_capabilities = kwargs.get('additional_capabilities', None) - self.network_profile = kwargs.get('network_profile', None) - self.diagnostics_profile = kwargs.get('diagnostics_profile', None) - self.extension_profile = kwargs.get('extension_profile', None) - self.license_type = kwargs.get('license_type', None) - self.priority = kwargs.get('priority', None) - self.eviction_policy = kwargs.get('eviction_policy', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_scale_set_vm_profile_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_scale_set_vm_profile_py3.py deleted file mode 100644 index f1d9ddca44cd..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_scale_set_vm_profile_py3.py +++ /dev/null @@ -1,88 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineScaleSetVMProfile(Model): - """Describes a virtual machine scale set virtual machine profile. - - :param os_profile: Specifies the operating system settings for the virtual - machines in the scale set. - :type os_profile: - ~azure.mgmt.compute.v2018_10_01.models.VirtualMachineScaleSetOSProfile - :param storage_profile: Specifies the storage settings for the virtual - machine disks. - :type storage_profile: - ~azure.mgmt.compute.v2018_10_01.models.VirtualMachineScaleSetStorageProfile - :param additional_capabilities: Specifies additional capabilities enabled - or disabled on the virtual machine in the scale set. For instance: whether - the virtual machine has the capability to support attaching managed data - disks with UltraSSD_LRS storage account type. - :type additional_capabilities: - ~azure.mgmt.compute.v2018_10_01.models.AdditionalCapabilities - :param network_profile: Specifies properties of the network interfaces of - the virtual machines in the scale set. - :type network_profile: - ~azure.mgmt.compute.v2018_10_01.models.VirtualMachineScaleSetNetworkProfile - :param diagnostics_profile: Specifies the boot diagnostic settings state. -

    Minimum api-version: 2015-06-15. - :type diagnostics_profile: - ~azure.mgmt.compute.v2018_10_01.models.DiagnosticsProfile - :param extension_profile: Specifies a collection of settings for - extensions installed on virtual machines in the scale set. - :type extension_profile: - ~azure.mgmt.compute.v2018_10_01.models.VirtualMachineScaleSetExtensionProfile - :param license_type: Specifies that the image or disk that is being used - was licensed on-premises. This element is only used for images that - contain the Windows Server operating system.

    Possible values are: -

    Windows_Client

    Windows_Server

    If this element - is included in a request for an update, the value must match the initial - value. This value cannot be updated.

    For more information, see - [Azure Hybrid Use Benefit for Windows - Server](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-hybrid-use-benefit-licensing?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json) -

    Minimum api-version: 2015-06-15 - :type license_type: str - :param priority: Specifies the priority for the virtual machines in the - scale set.

    Minimum api-version: 2017-10-30-preview. Possible - values include: 'Regular', 'Low' - :type priority: str or - ~azure.mgmt.compute.v2018_10_01.models.VirtualMachinePriorityTypes - :param eviction_policy: Specifies the eviction policy for virtual machines - in a low priority scale set.

    Minimum api-version: - 2017-10-30-preview. Possible values include: 'Deallocate', 'Delete' - :type eviction_policy: str or - ~azure.mgmt.compute.v2018_10_01.models.VirtualMachineEvictionPolicyTypes - """ - - _attribute_map = { - 'os_profile': {'key': 'osProfile', 'type': 'VirtualMachineScaleSetOSProfile'}, - 'storage_profile': {'key': 'storageProfile', 'type': 'VirtualMachineScaleSetStorageProfile'}, - 'additional_capabilities': {'key': 'additionalCapabilities', 'type': 'AdditionalCapabilities'}, - 'network_profile': {'key': 'networkProfile', 'type': 'VirtualMachineScaleSetNetworkProfile'}, - 'diagnostics_profile': {'key': 'diagnosticsProfile', 'type': 'DiagnosticsProfile'}, - 'extension_profile': {'key': 'extensionProfile', 'type': 'VirtualMachineScaleSetExtensionProfile'}, - 'license_type': {'key': 'licenseType', 'type': 'str'}, - 'priority': {'key': 'priority', 'type': 'str'}, - 'eviction_policy': {'key': 'evictionPolicy', 'type': 'str'}, - } - - def __init__(self, *, os_profile=None, storage_profile=None, additional_capabilities=None, network_profile=None, diagnostics_profile=None, extension_profile=None, license_type: str=None, priority=None, eviction_policy=None, **kwargs) -> None: - super(VirtualMachineScaleSetVMProfile, self).__init__(**kwargs) - self.os_profile = os_profile - self.storage_profile = storage_profile - self.additional_capabilities = additional_capabilities - self.network_profile = network_profile - self.diagnostics_profile = diagnostics_profile - self.extension_profile = extension_profile - self.license_type = license_type - self.priority = priority - self.eviction_policy = eviction_policy diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_scale_set_vm_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_scale_set_vm_py3.py deleted file mode 100644 index 764bb7aa75f0..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_scale_set_vm_py3.py +++ /dev/null @@ -1,168 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource_py3 import Resource - - -class VirtualMachineScaleSetVM(Resource): - """Describes a virtual machine scale set virtual machine. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource Id - :vartype id: str - :ivar name: Resource name - :vartype name: str - :ivar type: Resource type - :vartype type: str - :param location: Required. Resource location - :type location: str - :param tags: Resource tags - :type tags: dict[str, str] - :ivar instance_id: The virtual machine instance ID. - :vartype instance_id: str - :ivar sku: The virtual machine SKU. - :vartype sku: ~azure.mgmt.compute.v2018_10_01.models.Sku - :ivar latest_model_applied: Specifies whether the latest model has been - applied to the virtual machine. - :vartype latest_model_applied: bool - :ivar vm_id: Azure VM unique ID. - :vartype vm_id: str - :ivar instance_view: The virtual machine instance view. - :vartype instance_view: - ~azure.mgmt.compute.v2018_10_01.models.VirtualMachineScaleSetVMInstanceView - :param hardware_profile: Specifies the hardware settings for the virtual - machine. - :type hardware_profile: - ~azure.mgmt.compute.v2018_10_01.models.HardwareProfile - :param storage_profile: Specifies the storage settings for the virtual - machine disks. - :type storage_profile: - ~azure.mgmt.compute.v2018_10_01.models.StorageProfile - :param additional_capabilities: Specifies additional capabilities enabled - or disabled on the virtual machine in the scale set. For instance: whether - the virtual machine has the capability to support attaching managed data - disks with UltraSSD_LRS storage account type. - :type additional_capabilities: - ~azure.mgmt.compute.v2018_10_01.models.AdditionalCapabilities - :param os_profile: Specifies the operating system settings for the virtual - machine. - :type os_profile: ~azure.mgmt.compute.v2018_10_01.models.OSProfile - :param network_profile: Specifies the network interfaces of the virtual - machine. - :type network_profile: - ~azure.mgmt.compute.v2018_10_01.models.NetworkProfile - :param diagnostics_profile: Specifies the boot diagnostic settings state. -

    Minimum api-version: 2015-06-15. - :type diagnostics_profile: - ~azure.mgmt.compute.v2018_10_01.models.DiagnosticsProfile - :param availability_set: Specifies information about the availability set - that the virtual machine should be assigned to. Virtual machines specified - in the same availability set are allocated to different nodes to maximize - availability. For more information about availability sets, see [Manage - the availability of virtual - machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-manage-availability?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). -

    For more information on Azure planned maintenance, see [Planned - maintenance for virtual machines in - Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-planned-maintenance?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json) -

    Currently, a VM can only be added to availability set at creation - time. An existing VM cannot be added to an availability set. - :type availability_set: ~azure.mgmt.compute.v2018_10_01.models.SubResource - :ivar provisioning_state: The provisioning state, which only appears in - the response. - :vartype provisioning_state: str - :param license_type: Specifies that the image or disk that is being used - was licensed on-premises. This element is only used for images that - contain the Windows Server operating system.

    Possible values are: -

    Windows_Client

    Windows_Server

    If this element - is included in a request for an update, the value must match the initial - value. This value cannot be updated.

    For more information, see - [Azure Hybrid Use Benefit for Windows - Server](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-hybrid-use-benefit-licensing?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json) -

    Minimum api-version: 2015-06-15 - :type license_type: str - :param plan: Specifies information about the marketplace image used to - create the virtual machine. This element is only used for marketplace - images. Before you can use a marketplace image from an API, you must - enable the image for programmatic use. In the Azure portal, find the - marketplace image that you want to use and then click **Want to deploy - programmatically, Get Started ->**. Enter any required information and - then click **Save**. - :type plan: ~azure.mgmt.compute.v2018_10_01.models.Plan - :ivar resources: The virtual machine child extension resources. - :vartype resources: - list[~azure.mgmt.compute.v2018_10_01.models.VirtualMachineExtension] - :ivar zones: The virtual machine zones. - :vartype zones: list[str] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - 'instance_id': {'readonly': True}, - 'sku': {'readonly': True}, - 'latest_model_applied': {'readonly': True}, - 'vm_id': {'readonly': True}, - 'instance_view': {'readonly': True}, - 'provisioning_state': {'readonly': True}, - 'resources': {'readonly': True}, - 'zones': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'instance_id': {'key': 'instanceId', 'type': 'str'}, - 'sku': {'key': 'sku', 'type': 'Sku'}, - 'latest_model_applied': {'key': 'properties.latestModelApplied', 'type': 'bool'}, - 'vm_id': {'key': 'properties.vmId', 'type': 'str'}, - 'instance_view': {'key': 'properties.instanceView', 'type': 'VirtualMachineScaleSetVMInstanceView'}, - 'hardware_profile': {'key': 'properties.hardwareProfile', 'type': 'HardwareProfile'}, - 'storage_profile': {'key': 'properties.storageProfile', 'type': 'StorageProfile'}, - 'additional_capabilities': {'key': 'properties.additionalCapabilities', 'type': 'AdditionalCapabilities'}, - 'os_profile': {'key': 'properties.osProfile', 'type': 'OSProfile'}, - 'network_profile': {'key': 'properties.networkProfile', 'type': 'NetworkProfile'}, - 'diagnostics_profile': {'key': 'properties.diagnosticsProfile', 'type': 'DiagnosticsProfile'}, - 'availability_set': {'key': 'properties.availabilitySet', 'type': 'SubResource'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'license_type': {'key': 'properties.licenseType', 'type': 'str'}, - 'plan': {'key': 'plan', 'type': 'Plan'}, - 'resources': {'key': 'resources', 'type': '[VirtualMachineExtension]'}, - 'zones': {'key': 'zones', 'type': '[str]'}, - } - - def __init__(self, *, location: str, tags=None, hardware_profile=None, storage_profile=None, additional_capabilities=None, os_profile=None, network_profile=None, diagnostics_profile=None, availability_set=None, license_type: str=None, plan=None, **kwargs) -> None: - super(VirtualMachineScaleSetVM, self).__init__(location=location, tags=tags, **kwargs) - self.instance_id = None - self.sku = None - self.latest_model_applied = None - self.vm_id = None - self.instance_view = None - self.hardware_profile = hardware_profile - self.storage_profile = storage_profile - self.additional_capabilities = additional_capabilities - self.os_profile = os_profile - self.network_profile = network_profile - self.diagnostics_profile = diagnostics_profile - self.availability_set = availability_set - self.provisioning_state = None - self.license_type = license_type - self.plan = plan - self.resources = None - self.zones = None diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_scale_set_vm_reimage_parameters.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_scale_set_vm_reimage_parameters.py deleted file mode 100644 index 811a1427369e..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_scale_set_vm_reimage_parameters.py +++ /dev/null @@ -1,28 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .virtual_machine_reimage_parameters import VirtualMachineReimageParameters - - -class VirtualMachineScaleSetVMReimageParameters(VirtualMachineReimageParameters): - """Describes a Virtual Machine Scale Set VM Reimage Parameters. - - :param temp_disk: Specifies whether to reimage temp disk. Default value: - false. - :type temp_disk: bool - """ - - _attribute_map = { - 'temp_disk': {'key': 'tempDisk', 'type': 'bool'}, - } - - def __init__(self, **kwargs): - super(VirtualMachineScaleSetVMReimageParameters, self).__init__(**kwargs) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_scale_set_vm_reimage_parameters_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_scale_set_vm_reimage_parameters_py3.py deleted file mode 100644 index d30d5fd8fa86..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_scale_set_vm_reimage_parameters_py3.py +++ /dev/null @@ -1,28 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .virtual_machine_reimage_parameters_py3 import VirtualMachineReimageParameters - - -class VirtualMachineScaleSetVMReimageParameters(VirtualMachineReimageParameters): - """Describes a Virtual Machine Scale Set VM Reimage Parameters. - - :param temp_disk: Specifies whether to reimage temp disk. Default value: - false. - :type temp_disk: bool - """ - - _attribute_map = { - 'temp_disk': {'key': 'tempDisk', 'type': 'bool'}, - } - - def __init__(self, *, temp_disk: bool=None, **kwargs) -> None: - super(VirtualMachineScaleSetVMReimageParameters, self).__init__(temp_disk=temp_disk, **kwargs) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_size.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_size.py deleted file mode 100644 index 0fef3efd6c8e..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_size.py +++ /dev/null @@ -1,53 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineSize(Model): - """Describes the properties of a VM size. - - :param name: The name of the virtual machine size. - :type name: str - :param number_of_cores: The number of cores supported by the virtual - machine size. - :type number_of_cores: int - :param os_disk_size_in_mb: The OS disk size, in MB, allowed by the virtual - machine size. - :type os_disk_size_in_mb: int - :param resource_disk_size_in_mb: The resource disk size, in MB, allowed by - the virtual machine size. - :type resource_disk_size_in_mb: int - :param memory_in_mb: The amount of memory, in MB, supported by the virtual - machine size. - :type memory_in_mb: int - :param max_data_disk_count: The maximum number of data disks that can be - attached to the virtual machine size. - :type max_data_disk_count: int - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'number_of_cores': {'key': 'numberOfCores', 'type': 'int'}, - 'os_disk_size_in_mb': {'key': 'osDiskSizeInMB', 'type': 'int'}, - 'resource_disk_size_in_mb': {'key': 'resourceDiskSizeInMB', 'type': 'int'}, - 'memory_in_mb': {'key': 'memoryInMB', 'type': 'int'}, - 'max_data_disk_count': {'key': 'maxDataDiskCount', 'type': 'int'}, - } - - def __init__(self, **kwargs): - super(VirtualMachineSize, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.number_of_cores = kwargs.get('number_of_cores', None) - self.os_disk_size_in_mb = kwargs.get('os_disk_size_in_mb', None) - self.resource_disk_size_in_mb = kwargs.get('resource_disk_size_in_mb', None) - self.memory_in_mb = kwargs.get('memory_in_mb', None) - self.max_data_disk_count = kwargs.get('max_data_disk_count', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_size_paged.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_size_paged.py deleted file mode 100644 index d991dc65cd02..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_size_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class VirtualMachineSizePaged(Paged): - """ - A paging container for iterating over a list of :class:`VirtualMachineSize ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[VirtualMachineSize]'} - } - - def __init__(self, *args, **kwargs): - - super(VirtualMachineSizePaged, self).__init__(*args, **kwargs) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_size_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_size_py3.py deleted file mode 100644 index 9f99ba20ce42..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_size_py3.py +++ /dev/null @@ -1,53 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineSize(Model): - """Describes the properties of a VM size. - - :param name: The name of the virtual machine size. - :type name: str - :param number_of_cores: The number of cores supported by the virtual - machine size. - :type number_of_cores: int - :param os_disk_size_in_mb: The OS disk size, in MB, allowed by the virtual - machine size. - :type os_disk_size_in_mb: int - :param resource_disk_size_in_mb: The resource disk size, in MB, allowed by - the virtual machine size. - :type resource_disk_size_in_mb: int - :param memory_in_mb: The amount of memory, in MB, supported by the virtual - machine size. - :type memory_in_mb: int - :param max_data_disk_count: The maximum number of data disks that can be - attached to the virtual machine size. - :type max_data_disk_count: int - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'number_of_cores': {'key': 'numberOfCores', 'type': 'int'}, - 'os_disk_size_in_mb': {'key': 'osDiskSizeInMB', 'type': 'int'}, - 'resource_disk_size_in_mb': {'key': 'resourceDiskSizeInMB', 'type': 'int'}, - 'memory_in_mb': {'key': 'memoryInMB', 'type': 'int'}, - 'max_data_disk_count': {'key': 'maxDataDiskCount', 'type': 'int'}, - } - - def __init__(self, *, name: str=None, number_of_cores: int=None, os_disk_size_in_mb: int=None, resource_disk_size_in_mb: int=None, memory_in_mb: int=None, max_data_disk_count: int=None, **kwargs) -> None: - super(VirtualMachineSize, self).__init__(**kwargs) - self.name = name - self.number_of_cores = number_of_cores - self.os_disk_size_in_mb = os_disk_size_in_mb - self.resource_disk_size_in_mb = resource_disk_size_in_mb - self.memory_in_mb = memory_in_mb - self.max_data_disk_count = max_data_disk_count diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_status_code_count.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_status_code_count.py deleted file mode 100644 index 7df7b702acd7..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_status_code_count.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineStatusCodeCount(Model): - """The status code and count of the virtual machine scale set instance view - status summary. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar code: The instance view status code. - :vartype code: str - :ivar count: The number of instances having a particular status code. - :vartype count: int - """ - - _validation = { - 'code': {'readonly': True}, - 'count': {'readonly': True}, - } - - _attribute_map = { - 'code': {'key': 'code', 'type': 'str'}, - 'count': {'key': 'count', 'type': 'int'}, - } - - def __init__(self, **kwargs): - super(VirtualMachineStatusCodeCount, self).__init__(**kwargs) - self.code = None - self.count = None diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_status_code_count_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_status_code_count_py3.py deleted file mode 100644 index c38800073a95..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_status_code_count_py3.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineStatusCodeCount(Model): - """The status code and count of the virtual machine scale set instance view - status summary. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar code: The instance view status code. - :vartype code: str - :ivar count: The number of instances having a particular status code. - :vartype count: int - """ - - _validation = { - 'code': {'readonly': True}, - 'count': {'readonly': True}, - } - - _attribute_map = { - 'code': {'key': 'code', 'type': 'str'}, - 'count': {'key': 'count', 'type': 'int'}, - } - - def __init__(self, **kwargs) -> None: - super(VirtualMachineStatusCodeCount, self).__init__(**kwargs) - self.code = None - self.count = None diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_update.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_update.py deleted file mode 100644 index 25dbe3a6c8ae..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_update.py +++ /dev/null @@ -1,139 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .update_resource import UpdateResource - - -class VirtualMachineUpdate(UpdateResource): - """Describes a Virtual Machine Update. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :param tags: Resource tags - :type tags: dict[str, str] - :param plan: Specifies information about the marketplace image used to - create the virtual machine. This element is only used for marketplace - images. Before you can use a marketplace image from an API, you must - enable the image for programmatic use. In the Azure portal, find the - marketplace image that you want to use and then click **Want to deploy - programmatically, Get Started ->**. Enter any required information and - then click **Save**. - :type plan: ~azure.mgmt.compute.v2018_10_01.models.Plan - :param hardware_profile: Specifies the hardware settings for the virtual - machine. - :type hardware_profile: - ~azure.mgmt.compute.v2018_10_01.models.HardwareProfile - :param storage_profile: Specifies the storage settings for the virtual - machine disks. - :type storage_profile: - ~azure.mgmt.compute.v2018_10_01.models.StorageProfile - :param additional_capabilities: Specifies additional capabilities enabled - or disabled on the virtual machine. - :type additional_capabilities: - ~azure.mgmt.compute.v2018_10_01.models.AdditionalCapabilities - :param os_profile: Specifies the operating system settings for the virtual - machine. - :type os_profile: ~azure.mgmt.compute.v2018_10_01.models.OSProfile - :param network_profile: Specifies the network interfaces of the virtual - machine. - :type network_profile: - ~azure.mgmt.compute.v2018_10_01.models.NetworkProfile - :param diagnostics_profile: Specifies the boot diagnostic settings state. -

    Minimum api-version: 2015-06-15. - :type diagnostics_profile: - ~azure.mgmt.compute.v2018_10_01.models.DiagnosticsProfile - :param availability_set: Specifies information about the availability set - that the virtual machine should be assigned to. Virtual machines specified - in the same availability set are allocated to different nodes to maximize - availability. For more information about availability sets, see [Manage - the availability of virtual - machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-manage-availability?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). -

    For more information on Azure planned maintenance, see [Planned - maintenance for virtual machines in - Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-planned-maintenance?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json) -

    Currently, a VM can only be added to availability set at creation - time. An existing VM cannot be added to an availability set. - :type availability_set: ~azure.mgmt.compute.v2018_10_01.models.SubResource - :param proximity_placement_group: Specifies information about the - proximity placement group that the virtual machine should be assigned to. -

    Minimum api-version: 2018-04-01. - :type proximity_placement_group: - ~azure.mgmt.compute.v2018_10_01.models.SubResource - :ivar provisioning_state: The provisioning state, which only appears in - the response. - :vartype provisioning_state: str - :ivar instance_view: The virtual machine instance view. - :vartype instance_view: - ~azure.mgmt.compute.v2018_10_01.models.VirtualMachineInstanceView - :param license_type: Specifies that the image or disk that is being used - was licensed on-premises. This element is only used for images that - contain the Windows Server operating system.

    Possible values are: -

    Windows_Client

    Windows_Server

    If this element - is included in a request for an update, the value must match the initial - value. This value cannot be updated.

    For more information, see - [Azure Hybrid Use Benefit for Windows - Server](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-hybrid-use-benefit-licensing?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json) -

    Minimum api-version: 2015-06-15 - :type license_type: str - :ivar vm_id: Specifies the VM unique ID which is a 128-bits identifier - that is encoded and stored in all Azure IaaS VMs SMBIOS and can be read - using platform BIOS commands. - :vartype vm_id: str - :param identity: The identity of the virtual machine, if configured. - :type identity: - ~azure.mgmt.compute.v2018_10_01.models.VirtualMachineIdentity - :param zones: The virtual machine zones. - :type zones: list[str] - """ - - _validation = { - 'provisioning_state': {'readonly': True}, - 'instance_view': {'readonly': True}, - 'vm_id': {'readonly': True}, - } - - _attribute_map = { - 'tags': {'key': 'tags', 'type': '{str}'}, - 'plan': {'key': 'plan', 'type': 'Plan'}, - 'hardware_profile': {'key': 'properties.hardwareProfile', 'type': 'HardwareProfile'}, - 'storage_profile': {'key': 'properties.storageProfile', 'type': 'StorageProfile'}, - 'additional_capabilities': {'key': 'properties.additionalCapabilities', 'type': 'AdditionalCapabilities'}, - 'os_profile': {'key': 'properties.osProfile', 'type': 'OSProfile'}, - 'network_profile': {'key': 'properties.networkProfile', 'type': 'NetworkProfile'}, - 'diagnostics_profile': {'key': 'properties.diagnosticsProfile', 'type': 'DiagnosticsProfile'}, - 'availability_set': {'key': 'properties.availabilitySet', 'type': 'SubResource'}, - 'proximity_placement_group': {'key': 'properties.proximityPlacementGroup', 'type': 'SubResource'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'instance_view': {'key': 'properties.instanceView', 'type': 'VirtualMachineInstanceView'}, - 'license_type': {'key': 'properties.licenseType', 'type': 'str'}, - 'vm_id': {'key': 'properties.vmId', 'type': 'str'}, - 'identity': {'key': 'identity', 'type': 'VirtualMachineIdentity'}, - 'zones': {'key': 'zones', 'type': '[str]'}, - } - - def __init__(self, **kwargs): - super(VirtualMachineUpdate, self).__init__(**kwargs) - self.plan = kwargs.get('plan', None) - self.hardware_profile = kwargs.get('hardware_profile', None) - self.storage_profile = kwargs.get('storage_profile', None) - self.additional_capabilities = kwargs.get('additional_capabilities', None) - self.os_profile = kwargs.get('os_profile', None) - self.network_profile = kwargs.get('network_profile', None) - self.diagnostics_profile = kwargs.get('diagnostics_profile', None) - self.availability_set = kwargs.get('availability_set', None) - self.proximity_placement_group = kwargs.get('proximity_placement_group', None) - self.provisioning_state = None - self.instance_view = None - self.license_type = kwargs.get('license_type', None) - self.vm_id = None - self.identity = kwargs.get('identity', None) - self.zones = kwargs.get('zones', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_update_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_update_py3.py deleted file mode 100644 index 0b8c77b96995..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/virtual_machine_update_py3.py +++ /dev/null @@ -1,139 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .update_resource_py3 import UpdateResource - - -class VirtualMachineUpdate(UpdateResource): - """Describes a Virtual Machine Update. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :param tags: Resource tags - :type tags: dict[str, str] - :param plan: Specifies information about the marketplace image used to - create the virtual machine. This element is only used for marketplace - images. Before you can use a marketplace image from an API, you must - enable the image for programmatic use. In the Azure portal, find the - marketplace image that you want to use and then click **Want to deploy - programmatically, Get Started ->**. Enter any required information and - then click **Save**. - :type plan: ~azure.mgmt.compute.v2018_10_01.models.Plan - :param hardware_profile: Specifies the hardware settings for the virtual - machine. - :type hardware_profile: - ~azure.mgmt.compute.v2018_10_01.models.HardwareProfile - :param storage_profile: Specifies the storage settings for the virtual - machine disks. - :type storage_profile: - ~azure.mgmt.compute.v2018_10_01.models.StorageProfile - :param additional_capabilities: Specifies additional capabilities enabled - or disabled on the virtual machine. - :type additional_capabilities: - ~azure.mgmt.compute.v2018_10_01.models.AdditionalCapabilities - :param os_profile: Specifies the operating system settings for the virtual - machine. - :type os_profile: ~azure.mgmt.compute.v2018_10_01.models.OSProfile - :param network_profile: Specifies the network interfaces of the virtual - machine. - :type network_profile: - ~azure.mgmt.compute.v2018_10_01.models.NetworkProfile - :param diagnostics_profile: Specifies the boot diagnostic settings state. -

    Minimum api-version: 2015-06-15. - :type diagnostics_profile: - ~azure.mgmt.compute.v2018_10_01.models.DiagnosticsProfile - :param availability_set: Specifies information about the availability set - that the virtual machine should be assigned to. Virtual machines specified - in the same availability set are allocated to different nodes to maximize - availability. For more information about availability sets, see [Manage - the availability of virtual - machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-manage-availability?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). -

    For more information on Azure planned maintenance, see [Planned - maintenance for virtual machines in - Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-planned-maintenance?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json) -

    Currently, a VM can only be added to availability set at creation - time. An existing VM cannot be added to an availability set. - :type availability_set: ~azure.mgmt.compute.v2018_10_01.models.SubResource - :param proximity_placement_group: Specifies information about the - proximity placement group that the virtual machine should be assigned to. -

    Minimum api-version: 2018-04-01. - :type proximity_placement_group: - ~azure.mgmt.compute.v2018_10_01.models.SubResource - :ivar provisioning_state: The provisioning state, which only appears in - the response. - :vartype provisioning_state: str - :ivar instance_view: The virtual machine instance view. - :vartype instance_view: - ~azure.mgmt.compute.v2018_10_01.models.VirtualMachineInstanceView - :param license_type: Specifies that the image or disk that is being used - was licensed on-premises. This element is only used for images that - contain the Windows Server operating system.

    Possible values are: -

    Windows_Client

    Windows_Server

    If this element - is included in a request for an update, the value must match the initial - value. This value cannot be updated.

    For more information, see - [Azure Hybrid Use Benefit for Windows - Server](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-hybrid-use-benefit-licensing?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json) -

    Minimum api-version: 2015-06-15 - :type license_type: str - :ivar vm_id: Specifies the VM unique ID which is a 128-bits identifier - that is encoded and stored in all Azure IaaS VMs SMBIOS and can be read - using platform BIOS commands. - :vartype vm_id: str - :param identity: The identity of the virtual machine, if configured. - :type identity: - ~azure.mgmt.compute.v2018_10_01.models.VirtualMachineIdentity - :param zones: The virtual machine zones. - :type zones: list[str] - """ - - _validation = { - 'provisioning_state': {'readonly': True}, - 'instance_view': {'readonly': True}, - 'vm_id': {'readonly': True}, - } - - _attribute_map = { - 'tags': {'key': 'tags', 'type': '{str}'}, - 'plan': {'key': 'plan', 'type': 'Plan'}, - 'hardware_profile': {'key': 'properties.hardwareProfile', 'type': 'HardwareProfile'}, - 'storage_profile': {'key': 'properties.storageProfile', 'type': 'StorageProfile'}, - 'additional_capabilities': {'key': 'properties.additionalCapabilities', 'type': 'AdditionalCapabilities'}, - 'os_profile': {'key': 'properties.osProfile', 'type': 'OSProfile'}, - 'network_profile': {'key': 'properties.networkProfile', 'type': 'NetworkProfile'}, - 'diagnostics_profile': {'key': 'properties.diagnosticsProfile', 'type': 'DiagnosticsProfile'}, - 'availability_set': {'key': 'properties.availabilitySet', 'type': 'SubResource'}, - 'proximity_placement_group': {'key': 'properties.proximityPlacementGroup', 'type': 'SubResource'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'instance_view': {'key': 'properties.instanceView', 'type': 'VirtualMachineInstanceView'}, - 'license_type': {'key': 'properties.licenseType', 'type': 'str'}, - 'vm_id': {'key': 'properties.vmId', 'type': 'str'}, - 'identity': {'key': 'identity', 'type': 'VirtualMachineIdentity'}, - 'zones': {'key': 'zones', 'type': '[str]'}, - } - - def __init__(self, *, tags=None, plan=None, hardware_profile=None, storage_profile=None, additional_capabilities=None, os_profile=None, network_profile=None, diagnostics_profile=None, availability_set=None, proximity_placement_group=None, license_type: str=None, identity=None, zones=None, **kwargs) -> None: - super(VirtualMachineUpdate, self).__init__(tags=tags, **kwargs) - self.plan = plan - self.hardware_profile = hardware_profile - self.storage_profile = storage_profile - self.additional_capabilities = additional_capabilities - self.os_profile = os_profile - self.network_profile = network_profile - self.diagnostics_profile = diagnostics_profile - self.availability_set = availability_set - self.proximity_placement_group = proximity_placement_group - self.provisioning_state = None - self.instance_view = None - self.license_type = license_type - self.vm_id = None - self.identity = identity - self.zones = zones diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/win_rm_configuration.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/win_rm_configuration.py deleted file mode 100644 index b72210839859..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/win_rm_configuration.py +++ /dev/null @@ -1,29 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class WinRMConfiguration(Model): - """Describes Windows Remote Management configuration of the VM. - - :param listeners: The list of Windows Remote Management listeners - :type listeners: - list[~azure.mgmt.compute.v2018_10_01.models.WinRMListener] - """ - - _attribute_map = { - 'listeners': {'key': 'listeners', 'type': '[WinRMListener]'}, - } - - def __init__(self, **kwargs): - super(WinRMConfiguration, self).__init__(**kwargs) - self.listeners = kwargs.get('listeners', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/win_rm_configuration_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/win_rm_configuration_py3.py deleted file mode 100644 index 7ee36d3a256e..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/win_rm_configuration_py3.py +++ /dev/null @@ -1,29 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class WinRMConfiguration(Model): - """Describes Windows Remote Management configuration of the VM. - - :param listeners: The list of Windows Remote Management listeners - :type listeners: - list[~azure.mgmt.compute.v2018_10_01.models.WinRMListener] - """ - - _attribute_map = { - 'listeners': {'key': 'listeners', 'type': '[WinRMListener]'}, - } - - def __init__(self, *, listeners=None, **kwargs) -> None: - super(WinRMConfiguration, self).__init__(**kwargs) - self.listeners = listeners diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/win_rm_listener.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/win_rm_listener.py deleted file mode 100644 index b70455d84f62..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/win_rm_listener.py +++ /dev/null @@ -1,42 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class WinRMListener(Model): - """Describes Protocol and thumbprint of Windows Remote Management listener. - - :param protocol: Specifies the protocol of listener.

    Possible - values are:
    **http**

    **https**. Possible values include: - 'Http', 'Https' - :type protocol: str or - ~azure.mgmt.compute.v2018_10_01.models.ProtocolTypes - :param certificate_url: This is the URL of a certificate that has been - uploaded to Key Vault as a secret. For adding a secret to the Key Vault, - see [Add a key or secret to the key - vault](https://docs.microsoft.com/azure/key-vault/key-vault-get-started/#add). - In this case, your certificate needs to be It is the Base64 encoding of - the following JSON Object which is encoded in UTF-8:

    {
    - "data":"",
    "dataType":"pfx",
    - "password":""
    } - :type certificate_url: str - """ - - _attribute_map = { - 'protocol': {'key': 'protocol', 'type': 'ProtocolTypes'}, - 'certificate_url': {'key': 'certificateUrl', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(WinRMListener, self).__init__(**kwargs) - self.protocol = kwargs.get('protocol', None) - self.certificate_url = kwargs.get('certificate_url', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/win_rm_listener_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/win_rm_listener_py3.py deleted file mode 100644 index 6f788d7a46c3..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/win_rm_listener_py3.py +++ /dev/null @@ -1,42 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class WinRMListener(Model): - """Describes Protocol and thumbprint of Windows Remote Management listener. - - :param protocol: Specifies the protocol of listener.

    Possible - values are:
    **http**

    **https**. Possible values include: - 'Http', 'Https' - :type protocol: str or - ~azure.mgmt.compute.v2018_10_01.models.ProtocolTypes - :param certificate_url: This is the URL of a certificate that has been - uploaded to Key Vault as a secret. For adding a secret to the Key Vault, - see [Add a key or secret to the key - vault](https://docs.microsoft.com/azure/key-vault/key-vault-get-started/#add). - In this case, your certificate needs to be It is the Base64 encoding of - the following JSON Object which is encoded in UTF-8:

    {
    - "data":"",
    "dataType":"pfx",
    - "password":""
    } - :type certificate_url: str - """ - - _attribute_map = { - 'protocol': {'key': 'protocol', 'type': 'ProtocolTypes'}, - 'certificate_url': {'key': 'certificateUrl', 'type': 'str'}, - } - - def __init__(self, *, protocol=None, certificate_url: str=None, **kwargs) -> None: - super(WinRMListener, self).__init__(**kwargs) - self.protocol = protocol - self.certificate_url = certificate_url diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/windows_configuration.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/windows_configuration.py deleted file mode 100644 index e3a7db36613d..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/windows_configuration.py +++ /dev/null @@ -1,56 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class WindowsConfiguration(Model): - """Specifies Windows operating system settings on the virtual machine. - - :param provision_vm_agent: Indicates whether virtual machine agent should - be provisioned on the virtual machine.

    When this property is not - specified in the request body, default behavior is to set it to true. - This will ensure that VM Agent is installed on the VM so that extensions - can be added to the VM later. - :type provision_vm_agent: bool - :param enable_automatic_updates: Indicates whether virtual machine is - enabled for automatic Windows updates. Default value is true.

    For - virtual machine scale sets, this property can be updated and updates will - take effect on OS reprovisioning. - :type enable_automatic_updates: bool - :param time_zone: Specifies the time zone of the virtual machine. e.g. - "Pacific Standard Time" - :type time_zone: str - :param additional_unattend_content: Specifies additional base-64 encoded - XML formatted information that can be included in the Unattend.xml file, - which is used by Windows Setup. - :type additional_unattend_content: - list[~azure.mgmt.compute.v2018_10_01.models.AdditionalUnattendContent] - :param win_rm: Specifies the Windows Remote Management listeners. This - enables remote Windows PowerShell. - :type win_rm: ~azure.mgmt.compute.v2018_10_01.models.WinRMConfiguration - """ - - _attribute_map = { - 'provision_vm_agent': {'key': 'provisionVMAgent', 'type': 'bool'}, - 'enable_automatic_updates': {'key': 'enableAutomaticUpdates', 'type': 'bool'}, - 'time_zone': {'key': 'timeZone', 'type': 'str'}, - 'additional_unattend_content': {'key': 'additionalUnattendContent', 'type': '[AdditionalUnattendContent]'}, - 'win_rm': {'key': 'winRM', 'type': 'WinRMConfiguration'}, - } - - def __init__(self, **kwargs): - super(WindowsConfiguration, self).__init__(**kwargs) - self.provision_vm_agent = kwargs.get('provision_vm_agent', None) - self.enable_automatic_updates = kwargs.get('enable_automatic_updates', None) - self.time_zone = kwargs.get('time_zone', None) - self.additional_unattend_content = kwargs.get('additional_unattend_content', None) - self.win_rm = kwargs.get('win_rm', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/windows_configuration_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/windows_configuration_py3.py deleted file mode 100644 index 35599fc81a78..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/windows_configuration_py3.py +++ /dev/null @@ -1,56 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class WindowsConfiguration(Model): - """Specifies Windows operating system settings on the virtual machine. - - :param provision_vm_agent: Indicates whether virtual machine agent should - be provisioned on the virtual machine.

    When this property is not - specified in the request body, default behavior is to set it to true. - This will ensure that VM Agent is installed on the VM so that extensions - can be added to the VM later. - :type provision_vm_agent: bool - :param enable_automatic_updates: Indicates whether virtual machine is - enabled for automatic Windows updates. Default value is true.

    For - virtual machine scale sets, this property can be updated and updates will - take effect on OS reprovisioning. - :type enable_automatic_updates: bool - :param time_zone: Specifies the time zone of the virtual machine. e.g. - "Pacific Standard Time" - :type time_zone: str - :param additional_unattend_content: Specifies additional base-64 encoded - XML formatted information that can be included in the Unattend.xml file, - which is used by Windows Setup. - :type additional_unattend_content: - list[~azure.mgmt.compute.v2018_10_01.models.AdditionalUnattendContent] - :param win_rm: Specifies the Windows Remote Management listeners. This - enables remote Windows PowerShell. - :type win_rm: ~azure.mgmt.compute.v2018_10_01.models.WinRMConfiguration - """ - - _attribute_map = { - 'provision_vm_agent': {'key': 'provisionVMAgent', 'type': 'bool'}, - 'enable_automatic_updates': {'key': 'enableAutomaticUpdates', 'type': 'bool'}, - 'time_zone': {'key': 'timeZone', 'type': 'str'}, - 'additional_unattend_content': {'key': 'additionalUnattendContent', 'type': '[AdditionalUnattendContent]'}, - 'win_rm': {'key': 'winRM', 'type': 'WinRMConfiguration'}, - } - - def __init__(self, *, provision_vm_agent: bool=None, enable_automatic_updates: bool=None, time_zone: str=None, additional_unattend_content=None, win_rm=None, **kwargs) -> None: - super(WindowsConfiguration, self).__init__(**kwargs) - self.provision_vm_agent = provision_vm_agent - self.enable_automatic_updates = enable_automatic_updates - self.time_zone = time_zone - self.additional_unattend_content = additional_unattend_content - self.win_rm = win_rm diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/operations/__init__.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/operations/__init__.py index a618af62bd03..0201ea702f9e 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/operations/__init__.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/operations/__init__.py @@ -9,22 +9,22 @@ # regenerated. # -------------------------------------------------------------------------- -from .operations import Operations -from .availability_sets_operations import AvailabilitySetsOperations -from .proximity_placement_groups_operations import ProximityPlacementGroupsOperations -from .virtual_machine_extension_images_operations import VirtualMachineExtensionImagesOperations -from .virtual_machine_extensions_operations import VirtualMachineExtensionsOperations -from .virtual_machine_images_operations import VirtualMachineImagesOperations -from .usage_operations import UsageOperations -from .virtual_machines_operations import VirtualMachinesOperations -from .virtual_machine_sizes_operations import VirtualMachineSizesOperations -from .images_operations import ImagesOperations -from .virtual_machine_scale_sets_operations import VirtualMachineScaleSetsOperations -from .virtual_machine_scale_set_extensions_operations import VirtualMachineScaleSetExtensionsOperations -from .virtual_machine_scale_set_rolling_upgrades_operations import VirtualMachineScaleSetRollingUpgradesOperations -from .virtual_machine_scale_set_vms_operations import VirtualMachineScaleSetVMsOperations -from .log_analytics_operations import LogAnalyticsOperations -from .virtual_machine_run_commands_operations import VirtualMachineRunCommandsOperations +from ._operations import Operations +from ._availability_sets_operations import AvailabilitySetsOperations +from ._proximity_placement_groups_operations import ProximityPlacementGroupsOperations +from ._virtual_machine_extension_images_operations import VirtualMachineExtensionImagesOperations +from ._virtual_machine_extensions_operations import VirtualMachineExtensionsOperations +from ._virtual_machine_images_operations import VirtualMachineImagesOperations +from ._usage_operations import UsageOperations +from ._virtual_machines_operations import VirtualMachinesOperations +from ._virtual_machine_sizes_operations import VirtualMachineSizesOperations +from ._images_operations import ImagesOperations +from ._virtual_machine_scale_sets_operations import VirtualMachineScaleSetsOperations +from ._virtual_machine_scale_set_extensions_operations import VirtualMachineScaleSetExtensionsOperations +from ._virtual_machine_scale_set_rolling_upgrades_operations import VirtualMachineScaleSetRollingUpgradesOperations +from ._virtual_machine_scale_set_vms_operations import VirtualMachineScaleSetVMsOperations +from ._log_analytics_operations import LogAnalyticsOperations +from ._virtual_machine_run_commands_operations import VirtualMachineRunCommandsOperations __all__ = [ 'Operations', diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/operations/_availability_sets_operations.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/operations/_availability_sets_operations.py new file mode 100644 index 000000000000..7ac69c1838e5 --- /dev/null +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/operations/_availability_sets_operations.py @@ -0,0 +1,500 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse +from msrestazure.azure_exceptions import CloudError + +from .. import models + + +class AvailabilitySetsOperations(object): + """AvailabilitySetsOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: Client Api Version. Constant value: "2018-10-01". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2018-10-01" + + self.config = config + + def create_or_update( + self, resource_group_name, availability_set_name, parameters, custom_headers=None, raw=False, **operation_config): + """Create or update an availability set. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param availability_set_name: The name of the availability set. + :type availability_set_name: str + :param parameters: Parameters supplied to the Create Availability Set + operation. + :type parameters: + ~azure.mgmt.compute.v2018_10_01.models.AvailabilitySet + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: AvailabilitySet or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.compute.v2018_10_01.models.AvailabilitySet or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.create_or_update.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'availabilitySetName': self._serialize.url("availability_set_name", availability_set_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(parameters, 'AvailabilitySet') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('AvailabilitySet', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}'} + + def update( + self, resource_group_name, availability_set_name, parameters, custom_headers=None, raw=False, **operation_config): + """Update an availability set. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param availability_set_name: The name of the availability set. + :type availability_set_name: str + :param parameters: Parameters supplied to the Update Availability Set + operation. + :type parameters: + ~azure.mgmt.compute.v2018_10_01.models.AvailabilitySetUpdate + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: AvailabilitySet or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.compute.v2018_10_01.models.AvailabilitySet or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.update.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'availabilitySetName': self._serialize.url("availability_set_name", availability_set_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(parameters, 'AvailabilitySetUpdate') + + # Construct and send request + request = self._client.patch(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('AvailabilitySet', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}'} + + def delete( + self, resource_group_name, availability_set_name, custom_headers=None, raw=False, **operation_config): + """Delete an availability set. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param availability_set_name: The name of the availability set. + :type availability_set_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.delete.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'availabilitySetName': self._serialize.url("availability_set_name", availability_set_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 204]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}'} + + def get( + self, resource_group_name, availability_set_name, custom_headers=None, raw=False, **operation_config): + """Retrieves information about an availability set. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param availability_set_name: The name of the availability set. + :type availability_set_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: AvailabilitySet or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.compute.v2018_10_01.models.AvailabilitySet or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'availabilitySetName': self._serialize.url("availability_set_name", availability_set_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('AvailabilitySet', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}'} + + def list_by_subscription( + self, custom_headers=None, raw=False, **operation_config): + """Lists all availability sets in a subscription. + + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of AvailabilitySet + :rtype: + ~azure.mgmt.compute.v2018_10_01.models.AvailabilitySetPaged[~azure.mgmt.compute.v2018_10_01.models.AvailabilitySet] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_by_subscription.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.AvailabilitySetPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_by_subscription.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Compute/availabilitySets'} + + def list( + self, resource_group_name, custom_headers=None, raw=False, **operation_config): + """Lists all availability sets in a resource group. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of AvailabilitySet + :rtype: + ~azure.mgmt.compute.v2018_10_01.models.AvailabilitySetPaged[~azure.mgmt.compute.v2018_10_01.models.AvailabilitySet] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.AvailabilitySetPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets'} + + def list_available_sizes( + self, resource_group_name, availability_set_name, custom_headers=None, raw=False, **operation_config): + """Lists all available virtual machine sizes that can be used to create a + new virtual machine in an existing availability set. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param availability_set_name: The name of the availability set. + :type availability_set_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of VirtualMachineSize + :rtype: + ~azure.mgmt.compute.v2018_10_01.models.VirtualMachineSizePaged[~azure.mgmt.compute.v2018_10_01.models.VirtualMachineSize] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_available_sizes.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'availabilitySetName': self._serialize.url("availability_set_name", availability_set_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.VirtualMachineSizePaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_available_sizes.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}/vmSizes'} diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/operations/_images_operations.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/operations/_images_operations.py new file mode 100644 index 000000000000..de7c62b886fd --- /dev/null +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/operations/_images_operations.py @@ -0,0 +1,527 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse +from msrestazure.azure_exceptions import CloudError +from msrest.polling import LROPoller, NoPolling +from msrestazure.polling.arm_polling import ARMPolling + +from .. import models + + +class ImagesOperations(object): + """ImagesOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: Client Api Version. Constant value: "2018-10-01". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2018-10-01" + + self.config = config + + + def _create_or_update_initial( + self, resource_group_name, image_name, parameters, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.create_or_update.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'imageName': self._serialize.url("image_name", image_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(parameters, 'Image') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 201]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('Image', response) + if response.status_code == 201: + deserialized = self._deserialize('Image', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def create_or_update( + self, resource_group_name, image_name, parameters, custom_headers=None, raw=False, polling=True, **operation_config): + """Create or update an image. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param image_name: The name of the image. + :type image_name: str + :param parameters: Parameters supplied to the Create Image operation. + :type parameters: ~azure.mgmt.compute.v2018_10_01.models.Image + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns Image or + ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2018_10_01.models.Image] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2018_10_01.models.Image]] + :raises: :class:`CloudError` + """ + raw_result = self._create_or_update_initial( + resource_group_name=resource_group_name, + image_name=image_name, + parameters=parameters, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('Image', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/images/{imageName}'} + + + def _update_initial( + self, resource_group_name, image_name, parameters, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.update.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'imageName': self._serialize.url("image_name", image_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(parameters, 'ImageUpdate') + + # Construct and send request + request = self._client.patch(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 201]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('Image', response) + if response.status_code == 201: + deserialized = self._deserialize('Image', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def update( + self, resource_group_name, image_name, parameters, custom_headers=None, raw=False, polling=True, **operation_config): + """Update an image. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param image_name: The name of the image. + :type image_name: str + :param parameters: Parameters supplied to the Update Image operation. + :type parameters: ~azure.mgmt.compute.v2018_10_01.models.ImageUpdate + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns Image or + ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2018_10_01.models.Image] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2018_10_01.models.Image]] + :raises: :class:`CloudError` + """ + raw_result = self._update_initial( + resource_group_name=resource_group_name, + image_name=image_name, + parameters=parameters, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('Image', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/images/{imageName}'} + + + def _delete_initial( + self, resource_group_name, image_name, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.delete.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'imageName': self._serialize.url("image_name", image_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202, 204]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + def delete( + self, resource_group_name, image_name, custom_headers=None, raw=False, polling=True, **operation_config): + """Deletes an Image. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param image_name: The name of the image. + :type image_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns None or + ClientRawResponse if raw==True + :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] + :raises: :class:`CloudError` + """ + raw_result = self._delete_initial( + resource_group_name=resource_group_name, + image_name=image_name, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/images/{imageName}'} + + def get( + self, resource_group_name, image_name, expand=None, custom_headers=None, raw=False, **operation_config): + """Gets an image. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param image_name: The name of the image. + :type image_name: str + :param expand: The expand expression to apply on the operation. + :type expand: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: Image or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.compute.v2018_10_01.models.Image or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'imageName': self._serialize.url("image_name", image_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + if expand is not None: + query_parameters['$expand'] = self._serialize.query("expand", expand, 'str') + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('Image', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/images/{imageName}'} + + def list_by_resource_group( + self, resource_group_name, custom_headers=None, raw=False, **operation_config): + """Gets the list of images under a resource group. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of Image + :rtype: + ~azure.mgmt.compute.v2018_10_01.models.ImagePaged[~azure.mgmt.compute.v2018_10_01.models.Image] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_by_resource_group.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.ImagePaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/images'} + + def list( + self, custom_headers=None, raw=False, **operation_config): + """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. + + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of Image + :rtype: + ~azure.mgmt.compute.v2018_10_01.models.ImagePaged[~azure.mgmt.compute.v2018_10_01.models.Image] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.ImagePaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Compute/images'} diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/operations/_log_analytics_operations.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/operations/_log_analytics_operations.py new file mode 100644 index 000000000000..b4577c1f1772 --- /dev/null +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/operations/_log_analytics_operations.py @@ -0,0 +1,244 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse +from msrestazure.azure_exceptions import CloudError +from msrest.polling import LROPoller, NoPolling +from msrestazure.polling.arm_polling import ARMPolling + +from .. import models + + +class LogAnalyticsOperations(object): + """LogAnalyticsOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: Client Api Version. Constant value: "2018-10-01". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2018-10-01" + + self.config = config + + + def _export_request_rate_by_interval_initial( + self, parameters, location, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.export_request_rate_by_interval.metadata['url'] + path_format_arguments = { + 'location': self._serialize.url("location", location, 'str', pattern=r'^[-\w\._]+$'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(parameters, 'RequestRateByIntervalInput') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('LogAnalyticsOperationResult', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def export_request_rate_by_interval( + self, parameters, location, custom_headers=None, raw=False, polling=True, **operation_config): + """Export logs that show Api requests made by this subscription in the + given time window to show throttling activities. + + :param parameters: Parameters supplied to the LogAnalytics + getRequestRateByInterval Api. + :type parameters: + ~azure.mgmt.compute.v2018_10_01.models.RequestRateByIntervalInput + :param location: The location upon which virtual-machine-sizes is + queried. + :type location: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns + LogAnalyticsOperationResult or + ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2018_10_01.models.LogAnalyticsOperationResult] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2018_10_01.models.LogAnalyticsOperationResult]] + :raises: :class:`CloudError` + """ + raw_result = self._export_request_rate_by_interval_initial( + parameters=parameters, + location=location, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('LogAnalyticsOperationResult', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + export_request_rate_by_interval.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/logAnalytics/apiAccess/getRequestRateByInterval'} + + + def _export_throttled_requests_initial( + self, parameters, location, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.export_throttled_requests.metadata['url'] + path_format_arguments = { + 'location': self._serialize.url("location", location, 'str', pattern=r'^[-\w\._]+$'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(parameters, 'ThrottledRequestsInput') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('LogAnalyticsOperationResult', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def export_throttled_requests( + self, parameters, location, custom_headers=None, raw=False, polling=True, **operation_config): + """Export logs that show total throttled Api requests for this + subscription in the given time window. + + :param parameters: Parameters supplied to the LogAnalytics + getThrottledRequests Api. + :type parameters: + ~azure.mgmt.compute.v2018_10_01.models.ThrottledRequestsInput + :param location: The location upon which virtual-machine-sizes is + queried. + :type location: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns + LogAnalyticsOperationResult or + ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2018_10_01.models.LogAnalyticsOperationResult] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2018_10_01.models.LogAnalyticsOperationResult]] + :raises: :class:`CloudError` + """ + raw_result = self._export_throttled_requests_initial( + parameters=parameters, + location=location, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('LogAnalyticsOperationResult', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + export_throttled_requests.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/logAnalytics/apiAccess/getThrottledRequests'} diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/operations/_operations.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/operations/_operations.py new file mode 100644 index 000000000000..2fddec8ce825 --- /dev/null +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/operations/_operations.py @@ -0,0 +1,102 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse +from msrestazure.azure_exceptions import CloudError + +from .. import models + + +class Operations(object): + """Operations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: Client Api Version. Constant value: "2018-10-01". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2018-10-01" + + self.config = config + + def list( + self, custom_headers=None, raw=False, **operation_config): + """Gets a list of compute operations. + + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of ComputeOperationValue + :rtype: + ~azure.mgmt.compute.v2018_10_01.models.ComputeOperationValuePaged[~azure.mgmt.compute.v2018_10_01.models.ComputeOperationValue] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list.metadata['url'] + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.ComputeOperationValuePaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list.metadata = {'url': '/providers/Microsoft.Compute/operations'} diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/operations/_proximity_placement_groups_operations.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/operations/_proximity_placement_groups_operations.py new file mode 100644 index 000000000000..a4262ca4fd20 --- /dev/null +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/operations/_proximity_placement_groups_operations.py @@ -0,0 +1,433 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse +from msrestazure.azure_exceptions import CloudError + +from .. import models + + +class ProximityPlacementGroupsOperations(object): + """ProximityPlacementGroupsOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: Client Api Version. Constant value: "2018-10-01". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2018-10-01" + + self.config = config + + def create_or_update( + self, resource_group_name, proximity_placement_group_name, parameters, custom_headers=None, raw=False, **operation_config): + """Create or update a proximity placement group. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param proximity_placement_group_name: The name of the proximity + placement group. + :type proximity_placement_group_name: str + :param parameters: Parameters supplied to the Create Proximity + Placement Group operation. + :type parameters: + ~azure.mgmt.compute.v2018_10_01.models.ProximityPlacementGroup + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: ProximityPlacementGroup or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.compute.v2018_10_01.models.ProximityPlacementGroup + or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.create_or_update.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'proximityPlacementGroupName': self._serialize.url("proximity_placement_group_name", proximity_placement_group_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(parameters, 'ProximityPlacementGroup') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 201]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('ProximityPlacementGroup', response) + if response.status_code == 201: + deserialized = self._deserialize('ProximityPlacementGroup', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/proximityPlacementGroups/{proximityPlacementGroupName}'} + + def update( + self, resource_group_name, proximity_placement_group_name, tags=None, custom_headers=None, raw=False, **operation_config): + """Update a proximity placement group. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param proximity_placement_group_name: The name of the proximity + placement group. + :type proximity_placement_group_name: str + :param tags: Resource tags + :type tags: dict[str, str] + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: ProximityPlacementGroup or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.compute.v2018_10_01.models.ProximityPlacementGroup + or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + parameters = models.ProximityPlacementGroupUpdate(tags=tags) + + # Construct URL + url = self.update.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'proximityPlacementGroupName': self._serialize.url("proximity_placement_group_name", proximity_placement_group_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(parameters, 'ProximityPlacementGroupUpdate') + + # Construct and send request + request = self._client.patch(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('ProximityPlacementGroup', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/proximityPlacementGroups/{proximityPlacementGroupName}'} + + def delete( + self, resource_group_name, proximity_placement_group_name, custom_headers=None, raw=False, **operation_config): + """Delete a proximity placement group. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param proximity_placement_group_name: The name of the proximity + placement group. + :type proximity_placement_group_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.delete.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'proximityPlacementGroupName': self._serialize.url("proximity_placement_group_name", proximity_placement_group_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/proximityPlacementGroups/{proximityPlacementGroupName}'} + + def get( + self, resource_group_name, proximity_placement_group_name, custom_headers=None, raw=False, **operation_config): + """Retrieves information about a proximity placement group . + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param proximity_placement_group_name: The name of the proximity + placement group. + :type proximity_placement_group_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: ProximityPlacementGroup or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.compute.v2018_10_01.models.ProximityPlacementGroup + or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'proximityPlacementGroupName': self._serialize.url("proximity_placement_group_name", proximity_placement_group_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('ProximityPlacementGroup', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/proximityPlacementGroups/{proximityPlacementGroupName}'} + + def list_by_subscription( + self, custom_headers=None, raw=False, **operation_config): + """Lists all proximity placement groups in a subscription. + + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of ProximityPlacementGroup + :rtype: + ~azure.mgmt.compute.v2018_10_01.models.ProximityPlacementGroupPaged[~azure.mgmt.compute.v2018_10_01.models.ProximityPlacementGroup] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_by_subscription.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.ProximityPlacementGroupPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_by_subscription.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Compute/proximityPlacementGroups'} + + def list_by_resource_group( + self, resource_group_name, custom_headers=None, raw=False, **operation_config): + """Lists all proximity placement groups in a resource group. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of ProximityPlacementGroup + :rtype: + ~azure.mgmt.compute.v2018_10_01.models.ProximityPlacementGroupPaged[~azure.mgmt.compute.v2018_10_01.models.ProximityPlacementGroup] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_by_resource_group.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.ProximityPlacementGroupPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/proximityPlacementGroups'} diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/operations/_usage_operations.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/operations/_usage_operations.py new file mode 100644 index 000000000000..8b26c50522fb --- /dev/null +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/operations/_usage_operations.py @@ -0,0 +1,111 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse +from msrestazure.azure_exceptions import CloudError + +from .. import models + + +class UsageOperations(object): + """UsageOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: Client Api Version. Constant value: "2018-10-01". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2018-10-01" + + self.config = config + + def list( + self, location, custom_headers=None, raw=False, **operation_config): + """Gets, for the specified location, the current compute resource usage + information as well as the limits for compute resources under the + subscription. + + :param location: The location for which resource usage is queried. + :type location: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of Usage + :rtype: + ~azure.mgmt.compute.v2018_10_01.models.UsagePaged[~azure.mgmt.compute.v2018_10_01.models.Usage] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list.metadata['url'] + path_format_arguments = { + 'location': self._serialize.url("location", location, 'str', pattern=r'^[-\w\._]+$'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.UsagePaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/usages'} diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/operations/_virtual_machine_extension_images_operations.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/operations/_virtual_machine_extension_images_operations.py new file mode 100644 index 000000000000..430fb26e121c --- /dev/null +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/operations/_virtual_machine_extension_images_operations.py @@ -0,0 +1,247 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse +from msrestazure.azure_exceptions import CloudError + +from .. import models + + +class VirtualMachineExtensionImagesOperations(object): + """VirtualMachineExtensionImagesOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: Client Api Version. Constant value: "2018-10-01". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2018-10-01" + + self.config = config + + def get( + self, location, publisher_name, type, version, custom_headers=None, raw=False, **operation_config): + """Gets a virtual machine extension image. + + :param location: The name of a supported Azure region. + :type location: str + :param publisher_name: + :type publisher_name: str + :param type: + :type type: str + :param version: + :type version: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: VirtualMachineExtensionImage or ClientRawResponse if raw=true + :rtype: + ~azure.mgmt.compute.v2018_10_01.models.VirtualMachineExtensionImage or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'location': self._serialize.url("location", location, 'str'), + 'publisherName': self._serialize.url("publisher_name", publisher_name, 'str'), + 'type': self._serialize.url("type", type, 'str'), + 'version': self._serialize.url("version", version, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('VirtualMachineExtensionImage', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/publishers/{publisherName}/artifacttypes/vmextension/types/{type}/versions/{version}'} + + def list_types( + self, location, publisher_name, custom_headers=None, raw=False, **operation_config): + """Gets a list of virtual machine extension image types. + + :param location: The name of a supported Azure region. + :type location: str + :param publisher_name: + :type publisher_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: list or ClientRawResponse if raw=true + :rtype: + list[~azure.mgmt.compute.v2018_10_01.models.VirtualMachineExtensionImage] + or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.list_types.metadata['url'] + path_format_arguments = { + 'location': self._serialize.url("location", location, 'str'), + 'publisherName': self._serialize.url("publisher_name", publisher_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('[VirtualMachineExtensionImage]', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + list_types.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/publishers/{publisherName}/artifacttypes/vmextension/types'} + + def list_versions( + self, location, publisher_name, type, filter=None, top=None, orderby=None, custom_headers=None, raw=False, **operation_config): + """Gets a list of virtual machine extension image versions. + + :param location: The name of a supported Azure region. + :type location: str + :param publisher_name: + :type publisher_name: str + :param type: + :type type: str + :param filter: The filter to apply on the operation. + :type filter: str + :param top: + :type top: int + :param orderby: + :type orderby: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: list or ClientRawResponse if raw=true + :rtype: + list[~azure.mgmt.compute.v2018_10_01.models.VirtualMachineExtensionImage] + or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.list_versions.metadata['url'] + path_format_arguments = { + 'location': self._serialize.url("location", location, 'str'), + 'publisherName': self._serialize.url("publisher_name", publisher_name, 'str'), + 'type': self._serialize.url("type", type, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + if filter is not None: + query_parameters['$filter'] = self._serialize.query("filter", filter, 'str') + if top is not None: + query_parameters['$top'] = self._serialize.query("top", top, 'int') + if orderby is not None: + query_parameters['$orderby'] = self._serialize.query("orderby", orderby, 'str') + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('[VirtualMachineExtensionImage]', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + list_versions.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/publishers/{publisherName}/artifacttypes/vmextension/types/{type}/versions'} diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/operations/_virtual_machine_extensions_operations.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/operations/_virtual_machine_extensions_operations.py new file mode 100644 index 000000000000..5d4c8c4f445f --- /dev/null +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/operations/_virtual_machine_extensions_operations.py @@ -0,0 +1,479 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse +from msrestazure.azure_exceptions import CloudError +from msrest.polling import LROPoller, NoPolling +from msrestazure.polling.arm_polling import ARMPolling + +from .. import models + + +class VirtualMachineExtensionsOperations(object): + """VirtualMachineExtensionsOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: Client Api Version. Constant value: "2018-10-01". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2018-10-01" + + self.config = config + + + def _create_or_update_initial( + self, resource_group_name, vm_name, vm_extension_name, extension_parameters, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.create_or_update.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vmName': self._serialize.url("vm_name", vm_name, 'str'), + 'vmExtensionName': self._serialize.url("vm_extension_name", vm_extension_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(extension_parameters, 'VirtualMachineExtension') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 201]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('VirtualMachineExtension', response) + if response.status_code == 201: + deserialized = self._deserialize('VirtualMachineExtension', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def create_or_update( + self, resource_group_name, vm_name, vm_extension_name, extension_parameters, custom_headers=None, raw=False, polling=True, **operation_config): + """The operation to create or update the extension. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param vm_name: The name of the virtual machine where the extension + should be created or updated. + :type vm_name: str + :param vm_extension_name: The name of the virtual machine extension. + :type vm_extension_name: str + :param extension_parameters: Parameters supplied to the Create Virtual + Machine Extension operation. + :type extension_parameters: + ~azure.mgmt.compute.v2018_10_01.models.VirtualMachineExtension + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns VirtualMachineExtension + or ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2018_10_01.models.VirtualMachineExtension] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2018_10_01.models.VirtualMachineExtension]] + :raises: :class:`CloudError` + """ + raw_result = self._create_or_update_initial( + resource_group_name=resource_group_name, + vm_name=vm_name, + vm_extension_name=vm_extension_name, + extension_parameters=extension_parameters, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('VirtualMachineExtension', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/extensions/{vmExtensionName}'} + + + def _update_initial( + self, resource_group_name, vm_name, vm_extension_name, extension_parameters, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.update.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vmName': self._serialize.url("vm_name", vm_name, 'str'), + 'vmExtensionName': self._serialize.url("vm_extension_name", vm_extension_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(extension_parameters, 'VirtualMachineExtensionUpdate') + + # Construct and send request + request = self._client.patch(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('VirtualMachineExtension', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def update( + self, resource_group_name, vm_name, vm_extension_name, extension_parameters, custom_headers=None, raw=False, polling=True, **operation_config): + """The operation to update the extension. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param vm_name: The name of the virtual machine where the extension + should be updated. + :type vm_name: str + :param vm_extension_name: The name of the virtual machine extension. + :type vm_extension_name: str + :param extension_parameters: Parameters supplied to the Update Virtual + Machine Extension operation. + :type extension_parameters: + ~azure.mgmt.compute.v2018_10_01.models.VirtualMachineExtensionUpdate + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns VirtualMachineExtension + or ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2018_10_01.models.VirtualMachineExtension] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2018_10_01.models.VirtualMachineExtension]] + :raises: :class:`CloudError` + """ + raw_result = self._update_initial( + resource_group_name=resource_group_name, + vm_name=vm_name, + vm_extension_name=vm_extension_name, + extension_parameters=extension_parameters, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('VirtualMachineExtension', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/extensions/{vmExtensionName}'} + + + def _delete_initial( + self, resource_group_name, vm_name, vm_extension_name, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.delete.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vmName': self._serialize.url("vm_name", vm_name, 'str'), + 'vmExtensionName': self._serialize.url("vm_extension_name", vm_extension_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202, 204]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + def delete( + self, resource_group_name, vm_name, vm_extension_name, custom_headers=None, raw=False, polling=True, **operation_config): + """The operation to delete the extension. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param vm_name: The name of the virtual machine where the extension + should be deleted. + :type vm_name: str + :param vm_extension_name: The name of the virtual machine extension. + :type vm_extension_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns None or + ClientRawResponse if raw==True + :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] + :raises: :class:`CloudError` + """ + raw_result = self._delete_initial( + resource_group_name=resource_group_name, + vm_name=vm_name, + vm_extension_name=vm_extension_name, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/extensions/{vmExtensionName}'} + + def get( + self, resource_group_name, vm_name, vm_extension_name, expand=None, custom_headers=None, raw=False, **operation_config): + """The operation to get the extension. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param vm_name: The name of the virtual machine containing the + extension. + :type vm_name: str + :param vm_extension_name: The name of the virtual machine extension. + :type vm_extension_name: str + :param expand: The expand expression to apply on the operation. + :type expand: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: VirtualMachineExtension or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.compute.v2018_10_01.models.VirtualMachineExtension + or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vmName': self._serialize.url("vm_name", vm_name, 'str'), + 'vmExtensionName': self._serialize.url("vm_extension_name", vm_extension_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + if expand is not None: + query_parameters['$expand'] = self._serialize.query("expand", expand, 'str') + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('VirtualMachineExtension', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/extensions/{vmExtensionName}'} + + def list( + self, resource_group_name, vm_name, expand=None, custom_headers=None, raw=False, **operation_config): + """The operation to get all extensions of a Virtual Machine. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param vm_name: The name of the virtual machine containing the + extension. + :type vm_name: str + :param expand: The expand expression to apply on the operation. + :type expand: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: VirtualMachineExtensionsListResult or ClientRawResponse if + raw=true + :rtype: + ~azure.mgmt.compute.v2018_10_01.models.VirtualMachineExtensionsListResult + or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.list.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vmName': self._serialize.url("vm_name", vm_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + if expand is not None: + query_parameters['$expand'] = self._serialize.query("expand", expand, 'str') + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('VirtualMachineExtensionsListResult', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/extensions'} diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/operations/_virtual_machine_images_operations.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/operations/_virtual_machine_images_operations.py new file mode 100644 index 000000000000..299c8d324e16 --- /dev/null +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/operations/_virtual_machine_images_operations.py @@ -0,0 +1,380 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse +from msrestazure.azure_exceptions import CloudError + +from .. import models + + +class VirtualMachineImagesOperations(object): + """VirtualMachineImagesOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: Client Api Version. Constant value: "2018-10-01". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2018-10-01" + + self.config = config + + def get( + self, location, publisher_name, offer, skus, version, custom_headers=None, raw=False, **operation_config): + """Gets a virtual machine image. + + :param location: The name of a supported Azure region. + :type location: str + :param publisher_name: A valid image publisher. + :type publisher_name: str + :param offer: A valid image publisher offer. + :type offer: str + :param skus: A valid image SKU. + :type skus: str + :param version: A valid image SKU version. + :type version: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: VirtualMachineImage or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.compute.v2018_10_01.models.VirtualMachineImage or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'location': self._serialize.url("location", location, 'str'), + 'publisherName': self._serialize.url("publisher_name", publisher_name, 'str'), + 'offer': self._serialize.url("offer", offer, 'str'), + 'skus': self._serialize.url("skus", skus, 'str'), + 'version': self._serialize.url("version", version, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('VirtualMachineImage', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/publishers/{publisherName}/artifacttypes/vmimage/offers/{offer}/skus/{skus}/versions/{version}'} + + def list( + self, location, publisher_name, offer, skus, filter=None, top=None, orderby=None, custom_headers=None, raw=False, **operation_config): + """Gets a list of all virtual machine image versions for the specified + location, publisher, offer, and SKU. + + :param location: The name of a supported Azure region. + :type location: str + :param publisher_name: A valid image publisher. + :type publisher_name: str + :param offer: A valid image publisher offer. + :type offer: str + :param skus: A valid image SKU. + :type skus: str + :param filter: The filter to apply on the operation. + :type filter: str + :param top: + :type top: int + :param orderby: + :type orderby: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: list or ClientRawResponse if raw=true + :rtype: + list[~azure.mgmt.compute.v2018_10_01.models.VirtualMachineImageResource] + or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.list.metadata['url'] + path_format_arguments = { + 'location': self._serialize.url("location", location, 'str'), + 'publisherName': self._serialize.url("publisher_name", publisher_name, 'str'), + 'offer': self._serialize.url("offer", offer, 'str'), + 'skus': self._serialize.url("skus", skus, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + if filter is not None: + query_parameters['$filter'] = self._serialize.query("filter", filter, 'str') + if top is not None: + query_parameters['$top'] = self._serialize.query("top", top, 'int') + if orderby is not None: + query_parameters['$orderby'] = self._serialize.query("orderby", orderby, 'str') + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('[VirtualMachineImageResource]', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/publishers/{publisherName}/artifacttypes/vmimage/offers/{offer}/skus/{skus}/versions'} + + def list_offers( + self, location, publisher_name, custom_headers=None, raw=False, **operation_config): + """Gets a list of virtual machine image offers for the specified location + and publisher. + + :param location: The name of a supported Azure region. + :type location: str + :param publisher_name: A valid image publisher. + :type publisher_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: list or ClientRawResponse if raw=true + :rtype: + list[~azure.mgmt.compute.v2018_10_01.models.VirtualMachineImageResource] + or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.list_offers.metadata['url'] + path_format_arguments = { + 'location': self._serialize.url("location", location, 'str'), + 'publisherName': self._serialize.url("publisher_name", publisher_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('[VirtualMachineImageResource]', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + list_offers.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/publishers/{publisherName}/artifacttypes/vmimage/offers'} + + def list_publishers( + self, location, custom_headers=None, raw=False, **operation_config): + """Gets a list of virtual machine image publishers for the specified Azure + location. + + :param location: The name of a supported Azure region. + :type location: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: list or ClientRawResponse if raw=true + :rtype: + list[~azure.mgmt.compute.v2018_10_01.models.VirtualMachineImageResource] + or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.list_publishers.metadata['url'] + path_format_arguments = { + 'location': self._serialize.url("location", location, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('[VirtualMachineImageResource]', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + list_publishers.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/publishers'} + + def list_skus( + self, location, publisher_name, offer, custom_headers=None, raw=False, **operation_config): + """Gets a list of virtual machine image SKUs for the specified location, + publisher, and offer. + + :param location: The name of a supported Azure region. + :type location: str + :param publisher_name: A valid image publisher. + :type publisher_name: str + :param offer: A valid image publisher offer. + :type offer: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: list or ClientRawResponse if raw=true + :rtype: + list[~azure.mgmt.compute.v2018_10_01.models.VirtualMachineImageResource] + or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.list_skus.metadata['url'] + path_format_arguments = { + 'location': self._serialize.url("location", location, 'str'), + 'publisherName': self._serialize.url("publisher_name", publisher_name, 'str'), + 'offer': self._serialize.url("offer", offer, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('[VirtualMachineImageResource]', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + list_skus.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/publishers/{publisherName}/artifacttypes/vmimage/offers/{offer}/skus'} diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/operations/_virtual_machine_run_commands_operations.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/operations/_virtual_machine_run_commands_operations.py new file mode 100644 index 000000000000..727600b16da8 --- /dev/null +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/operations/_virtual_machine_run_commands_operations.py @@ -0,0 +1,170 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse +from msrestazure.azure_exceptions import CloudError + +from .. import models + + +class VirtualMachineRunCommandsOperations(object): + """VirtualMachineRunCommandsOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: Client Api Version. Constant value: "2018-10-01". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2018-10-01" + + self.config = config + + def list( + self, location, custom_headers=None, raw=False, **operation_config): + """Lists all available run commands for a subscription in a location. + + :param location: The location upon which run commands is queried. + :type location: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of RunCommandDocumentBase + :rtype: + ~azure.mgmt.compute.v2018_10_01.models.RunCommandDocumentBasePaged[~azure.mgmt.compute.v2018_10_01.models.RunCommandDocumentBase] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list.metadata['url'] + path_format_arguments = { + 'location': self._serialize.url("location", location, 'str', pattern=r'^[-\w\._]+$'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.RunCommandDocumentBasePaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/runCommands'} + + def get( + self, location, command_id, custom_headers=None, raw=False, **operation_config): + """Gets specific run command for a subscription in a location. + + :param location: The location upon which run commands is queried. + :type location: str + :param command_id: The command id. + :type command_id: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: RunCommandDocument or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.compute.v2018_10_01.models.RunCommandDocument or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'location': self._serialize.url("location", location, 'str', pattern=r'^[-\w\._]+$'), + 'commandId': self._serialize.url("command_id", command_id, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('RunCommandDocument', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/runCommands/{commandId}'} diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/operations/_virtual_machine_scale_set_extensions_operations.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/operations/_virtual_machine_scale_set_extensions_operations.py new file mode 100644 index 000000000000..94432c27d71d --- /dev/null +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/operations/_virtual_machine_scale_set_extensions_operations.py @@ -0,0 +1,380 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse +from msrestazure.azure_exceptions import CloudError +from msrest.polling import LROPoller, NoPolling +from msrestazure.polling.arm_polling import ARMPolling + +from .. import models + + +class VirtualMachineScaleSetExtensionsOperations(object): + """VirtualMachineScaleSetExtensionsOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: Client Api Version. Constant value: "2018-10-01". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2018-10-01" + + self.config = config + + + def _create_or_update_initial( + self, resource_group_name, vm_scale_set_name, vmss_extension_name, extension_parameters, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.create_or_update.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), + 'vmssExtensionName': self._serialize.url("vmss_extension_name", vmss_extension_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(extension_parameters, 'VirtualMachineScaleSetExtension') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 201]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('VirtualMachineScaleSetExtension', response) + if response.status_code == 201: + deserialized = self._deserialize('VirtualMachineScaleSetExtension', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def create_or_update( + self, resource_group_name, vm_scale_set_name, vmss_extension_name, extension_parameters, custom_headers=None, raw=False, polling=True, **operation_config): + """The operation to create or update an extension. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param vm_scale_set_name: The name of the VM scale set where the + extension should be create or updated. + :type vm_scale_set_name: str + :param vmss_extension_name: The name of the VM scale set extension. + :type vmss_extension_name: str + :param extension_parameters: Parameters supplied to the Create VM + scale set Extension operation. + :type extension_parameters: + ~azure.mgmt.compute.v2018_10_01.models.VirtualMachineScaleSetExtension + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns + VirtualMachineScaleSetExtension or + ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2018_10_01.models.VirtualMachineScaleSetExtension] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2018_10_01.models.VirtualMachineScaleSetExtension]] + :raises: :class:`CloudError` + """ + raw_result = self._create_or_update_initial( + resource_group_name=resource_group_name, + vm_scale_set_name=vm_scale_set_name, + vmss_extension_name=vmss_extension_name, + extension_parameters=extension_parameters, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('VirtualMachineScaleSetExtension', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/extensions/{vmssExtensionName}'} + + + def _delete_initial( + self, resource_group_name, vm_scale_set_name, vmss_extension_name, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.delete.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), + 'vmssExtensionName': self._serialize.url("vmss_extension_name", vmss_extension_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202, 204]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + def delete( + self, resource_group_name, vm_scale_set_name, vmss_extension_name, custom_headers=None, raw=False, polling=True, **operation_config): + """The operation to delete the extension. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param vm_scale_set_name: The name of the VM scale set where the + extension should be deleted. + :type vm_scale_set_name: str + :param vmss_extension_name: The name of the VM scale set extension. + :type vmss_extension_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns None or + ClientRawResponse if raw==True + :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] + :raises: :class:`CloudError` + """ + raw_result = self._delete_initial( + resource_group_name=resource_group_name, + vm_scale_set_name=vm_scale_set_name, + vmss_extension_name=vmss_extension_name, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/extensions/{vmssExtensionName}'} + + def get( + self, resource_group_name, vm_scale_set_name, vmss_extension_name, expand=None, custom_headers=None, raw=False, **operation_config): + """The operation to get the extension. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param vm_scale_set_name: The name of the VM scale set containing the + extension. + :type vm_scale_set_name: str + :param vmss_extension_name: The name of the VM scale set extension. + :type vmss_extension_name: str + :param expand: The expand expression to apply on the operation. + :type expand: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: VirtualMachineScaleSetExtension or ClientRawResponse if + raw=true + :rtype: + ~azure.mgmt.compute.v2018_10_01.models.VirtualMachineScaleSetExtension + or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), + 'vmssExtensionName': self._serialize.url("vmss_extension_name", vmss_extension_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + if expand is not None: + query_parameters['$expand'] = self._serialize.query("expand", expand, 'str') + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('VirtualMachineScaleSetExtension', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/extensions/{vmssExtensionName}'} + + def list( + self, resource_group_name, vm_scale_set_name, custom_headers=None, raw=False, **operation_config): + """Gets a list of all extensions in a VM scale set. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param vm_scale_set_name: The name of the VM scale set containing the + extension. + :type vm_scale_set_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of VirtualMachineScaleSetExtension + :rtype: + ~azure.mgmt.compute.v2018_10_01.models.VirtualMachineScaleSetExtensionPaged[~azure.mgmt.compute.v2018_10_01.models.VirtualMachineScaleSetExtension] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.VirtualMachineScaleSetExtensionPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/extensions'} diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/operations/_virtual_machine_scale_set_rolling_upgrades_operations.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/operations/_virtual_machine_scale_set_rolling_upgrades_operations.py new file mode 100644 index 000000000000..adc932ef4380 --- /dev/null +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/operations/_virtual_machine_scale_set_rolling_upgrades_operations.py @@ -0,0 +1,348 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse +from msrestazure.azure_exceptions import CloudError +from msrest.polling import LROPoller, NoPolling +from msrestazure.polling.arm_polling import ARMPolling + +from .. import models + + +class VirtualMachineScaleSetRollingUpgradesOperations(object): + """VirtualMachineScaleSetRollingUpgradesOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: Client Api Version. Constant value: "2018-10-01". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2018-10-01" + + self.config = config + + + def _cancel_initial( + self, resource_group_name, vm_scale_set_name, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.cancel.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + def cancel( + self, resource_group_name, vm_scale_set_name, custom_headers=None, raw=False, polling=True, **operation_config): + """Cancels the current virtual machine scale set rolling upgrade. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param vm_scale_set_name: The name of the VM scale set. + :type vm_scale_set_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns None or + ClientRawResponse if raw==True + :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] + :raises: :class:`CloudError` + """ + raw_result = self._cancel_initial( + resource_group_name=resource_group_name, + vm_scale_set_name=vm_scale_set_name, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + cancel.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/rollingUpgrades/cancel'} + + + def _start_os_upgrade_initial( + self, resource_group_name, vm_scale_set_name, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.start_os_upgrade.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + def start_os_upgrade( + self, resource_group_name, vm_scale_set_name, custom_headers=None, raw=False, polling=True, **operation_config): + """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. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param vm_scale_set_name: The name of the VM scale set. + :type vm_scale_set_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns None or + ClientRawResponse if raw==True + :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] + :raises: :class:`CloudError` + """ + raw_result = self._start_os_upgrade_initial( + resource_group_name=resource_group_name, + vm_scale_set_name=vm_scale_set_name, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + start_os_upgrade.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/osRollingUpgrade'} + + + def _start_extension_upgrade_initial( + self, resource_group_name, vm_scale_set_name, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.start_extension_upgrade.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + def start_extension_upgrade( + self, resource_group_name, vm_scale_set_name, custom_headers=None, raw=False, polling=True, **operation_config): + """Starts a rolling upgrade to move all extensions for all virtual machine + scale set instances to the latest available extension version. + Instances which are already running the latest extension versions are + not affected. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param vm_scale_set_name: The name of the VM scale set. + :type vm_scale_set_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns None or + ClientRawResponse if raw==True + :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] + :raises: :class:`CloudError` + """ + raw_result = self._start_extension_upgrade_initial( + resource_group_name=resource_group_name, + vm_scale_set_name=vm_scale_set_name, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + start_extension_upgrade.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/extensionRollingUpgrade'} + + def get_latest( + self, resource_group_name, vm_scale_set_name, custom_headers=None, raw=False, **operation_config): + """Gets the status of the latest virtual machine scale set rolling + upgrade. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param vm_scale_set_name: The name of the VM scale set. + :type vm_scale_set_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: RollingUpgradeStatusInfo or ClientRawResponse if raw=true + :rtype: + ~azure.mgmt.compute.v2018_10_01.models.RollingUpgradeStatusInfo or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get_latest.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('RollingUpgradeStatusInfo', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_latest.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/rollingUpgrades/latest'} diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/operations/_virtual_machine_scale_set_vms_operations.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/operations/_virtual_machine_scale_set_vms_operations.py new file mode 100644 index 000000000000..ee9eebf1aaa8 --- /dev/null +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/operations/_virtual_machine_scale_set_vms_operations.py @@ -0,0 +1,1244 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse +from msrestazure.azure_exceptions import CloudError +from msrest.polling import LROPoller, NoPolling +from msrestazure.polling.arm_polling import ARMPolling + +from .. import models + + +class VirtualMachineScaleSetVMsOperations(object): + """VirtualMachineScaleSetVMsOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: Client Api Version. Constant value: "2018-10-01". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2018-10-01" + + self.config = config + + + def _reimage_initial( + self, resource_group_name, vm_scale_set_name, instance_id, temp_disk=None, custom_headers=None, raw=False, **operation_config): + vm_scale_set_vm_reimage_input = None + if temp_disk is not None: + vm_scale_set_vm_reimage_input = models.VirtualMachineScaleSetVMReimageParameters(temp_disk=temp_disk) + + # Construct URL + url = self.reimage.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), + 'instanceId': self._serialize.url("instance_id", instance_id, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + if vm_scale_set_vm_reimage_input is not None: + body_content = self._serialize.body(vm_scale_set_vm_reimage_input, 'VirtualMachineScaleSetVMReimageParameters') + else: + body_content = None + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + def reimage( + self, resource_group_name, vm_scale_set_name, instance_id, temp_disk=None, custom_headers=None, raw=False, polling=True, **operation_config): + """Reimages (upgrade the operating system) a specific virtual machine in a + VM scale set. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param vm_scale_set_name: The name of the VM scale set. + :type vm_scale_set_name: str + :param instance_id: The instance ID of the virtual machine. + :type instance_id: str + :param temp_disk: Specifies whether to reimage temp disk. Default + value: false. Note: This temp disk reimage parameter is only supported + for VM/VMSS with Ephemeral OS disk. + :type temp_disk: bool + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns None or + ClientRawResponse if raw==True + :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] + :raises: :class:`CloudError` + """ + raw_result = self._reimage_initial( + resource_group_name=resource_group_name, + vm_scale_set_name=vm_scale_set_name, + instance_id=instance_id, + temp_disk=temp_disk, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + reimage.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/virtualmachines/{instanceId}/reimage'} + + + def _reimage_all_initial( + self, resource_group_name, vm_scale_set_name, instance_id, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.reimage_all.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), + 'instanceId': self._serialize.url("instance_id", instance_id, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + def reimage_all( + self, resource_group_name, vm_scale_set_name, instance_id, custom_headers=None, raw=False, polling=True, **operation_config): + """Allows you to re-image all the disks ( including data disks ) in the a + VM scale set instance. This operation is only supported for managed + disks. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param vm_scale_set_name: The name of the VM scale set. + :type vm_scale_set_name: str + :param instance_id: The instance ID of the virtual machine. + :type instance_id: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns None or + ClientRawResponse if raw==True + :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] + :raises: :class:`CloudError` + """ + raw_result = self._reimage_all_initial( + resource_group_name=resource_group_name, + vm_scale_set_name=vm_scale_set_name, + instance_id=instance_id, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + reimage_all.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/virtualmachines/{instanceId}/reimageall'} + + + def _deallocate_initial( + self, resource_group_name, vm_scale_set_name, instance_id, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.deallocate.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), + 'instanceId': self._serialize.url("instance_id", instance_id, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + def deallocate( + self, resource_group_name, vm_scale_set_name, instance_id, custom_headers=None, raw=False, polling=True, **operation_config): + """Deallocates a specific virtual machine in a VM scale set. Shuts down + the virtual machine and releases the compute resources it uses. You are + not billed for the compute resources of this virtual machine once it is + deallocated. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param vm_scale_set_name: The name of the VM scale set. + :type vm_scale_set_name: str + :param instance_id: The instance ID of the virtual machine. + :type instance_id: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns None or + ClientRawResponse if raw==True + :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] + :raises: :class:`CloudError` + """ + raw_result = self._deallocate_initial( + resource_group_name=resource_group_name, + vm_scale_set_name=vm_scale_set_name, + instance_id=instance_id, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + deallocate.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/virtualmachines/{instanceId}/deallocate'} + + + def _update_initial( + self, resource_group_name, vm_scale_set_name, instance_id, parameters, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.update.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), + 'instanceId': self._serialize.url("instance_id", instance_id, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(parameters, 'VirtualMachineScaleSetVM') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('VirtualMachineScaleSetVM', response) + if response.status_code == 202: + deserialized = self._deserialize('VirtualMachineScaleSetVM', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def update( + self, resource_group_name, vm_scale_set_name, instance_id, parameters, custom_headers=None, raw=False, polling=True, **operation_config): + """Updates a virtual machine of a VM scale set. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param vm_scale_set_name: The name of the VM scale set where the + extension should be create or updated. + :type vm_scale_set_name: str + :param instance_id: The instance ID of the virtual machine. + :type instance_id: str + :param parameters: Parameters supplied to the Update Virtual Machine + Scale Sets VM operation. + :type parameters: + ~azure.mgmt.compute.v2018_10_01.models.VirtualMachineScaleSetVM + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns + VirtualMachineScaleSetVM or + ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2018_10_01.models.VirtualMachineScaleSetVM] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2018_10_01.models.VirtualMachineScaleSetVM]] + :raises: :class:`CloudError` + """ + raw_result = self._update_initial( + resource_group_name=resource_group_name, + vm_scale_set_name=vm_scale_set_name, + instance_id=instance_id, + parameters=parameters, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('VirtualMachineScaleSetVM', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/virtualmachines/{instanceId}'} + + + def _delete_initial( + self, resource_group_name, vm_scale_set_name, instance_id, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.delete.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), + 'instanceId': self._serialize.url("instance_id", instance_id, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202, 204]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + def delete( + self, resource_group_name, vm_scale_set_name, instance_id, custom_headers=None, raw=False, polling=True, **operation_config): + """Deletes a virtual machine from a VM scale set. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param vm_scale_set_name: The name of the VM scale set. + :type vm_scale_set_name: str + :param instance_id: The instance ID of the virtual machine. + :type instance_id: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns None or + ClientRawResponse if raw==True + :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] + :raises: :class:`CloudError` + """ + raw_result = self._delete_initial( + resource_group_name=resource_group_name, + vm_scale_set_name=vm_scale_set_name, + instance_id=instance_id, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/virtualmachines/{instanceId}'} + + def get( + self, resource_group_name, vm_scale_set_name, instance_id, custom_headers=None, raw=False, **operation_config): + """Gets a virtual machine from a VM scale set. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param vm_scale_set_name: The name of the VM scale set. + :type vm_scale_set_name: str + :param instance_id: The instance ID of the virtual machine. + :type instance_id: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: VirtualMachineScaleSetVM or ClientRawResponse if raw=true + :rtype: + ~azure.mgmt.compute.v2018_10_01.models.VirtualMachineScaleSetVM or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), + 'instanceId': self._serialize.url("instance_id", instance_id, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('VirtualMachineScaleSetVM', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/virtualmachines/{instanceId}'} + + def get_instance_view( + self, resource_group_name, vm_scale_set_name, instance_id, custom_headers=None, raw=False, **operation_config): + """Gets the status of a virtual machine from a VM scale set. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param vm_scale_set_name: The name of the VM scale set. + :type vm_scale_set_name: str + :param instance_id: The instance ID of the virtual machine. + :type instance_id: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: VirtualMachineScaleSetVMInstanceView or ClientRawResponse if + raw=true + :rtype: + ~azure.mgmt.compute.v2018_10_01.models.VirtualMachineScaleSetVMInstanceView + or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get_instance_view.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), + 'instanceId': self._serialize.url("instance_id", instance_id, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('VirtualMachineScaleSetVMInstanceView', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_instance_view.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/virtualmachines/{instanceId}/instanceView'} + + def list( + self, resource_group_name, virtual_machine_scale_set_name, filter=None, select=None, expand=None, custom_headers=None, raw=False, **operation_config): + """Gets a list of all virtual machines in a VM scale sets. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param virtual_machine_scale_set_name: The name of the VM scale set. + :type virtual_machine_scale_set_name: str + :param filter: The filter to apply to the operation. + :type filter: str + :param select: The list parameters. + :type select: str + :param expand: The expand expression to apply to the operation. + :type expand: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of VirtualMachineScaleSetVM + :rtype: + ~azure.mgmt.compute.v2018_10_01.models.VirtualMachineScaleSetVMPaged[~azure.mgmt.compute.v2018_10_01.models.VirtualMachineScaleSetVM] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'virtualMachineScaleSetName': self._serialize.url("virtual_machine_scale_set_name", virtual_machine_scale_set_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + if filter is not None: + query_parameters['$filter'] = self._serialize.query("filter", filter, 'str') + if select is not None: + query_parameters['$select'] = self._serialize.query("select", select, 'str') + if expand is not None: + query_parameters['$expand'] = self._serialize.query("expand", expand, 'str') + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.VirtualMachineScaleSetVMPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{virtualMachineScaleSetName}/virtualMachines'} + + + def _power_off_initial( + self, resource_group_name, vm_scale_set_name, instance_id, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.power_off.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), + 'instanceId': self._serialize.url("instance_id", instance_id, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + def power_off( + self, resource_group_name, vm_scale_set_name, instance_id, custom_headers=None, raw=False, polling=True, **operation_config): + """Power off (stop) a virtual machine in a VM scale set. Note that + resources are still attached and you are getting charged for the + resources. Instead, use deallocate to release resources and avoid + charges. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param vm_scale_set_name: The name of the VM scale set. + :type vm_scale_set_name: str + :param instance_id: The instance ID of the virtual machine. + :type instance_id: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns None or + ClientRawResponse if raw==True + :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] + :raises: :class:`CloudError` + """ + raw_result = self._power_off_initial( + resource_group_name=resource_group_name, + vm_scale_set_name=vm_scale_set_name, + instance_id=instance_id, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + power_off.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/virtualmachines/{instanceId}/poweroff'} + + + def _restart_initial( + self, resource_group_name, vm_scale_set_name, instance_id, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.restart.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), + 'instanceId': self._serialize.url("instance_id", instance_id, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + def restart( + self, resource_group_name, vm_scale_set_name, instance_id, custom_headers=None, raw=False, polling=True, **operation_config): + """Restarts a virtual machine in a VM scale set. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param vm_scale_set_name: The name of the VM scale set. + :type vm_scale_set_name: str + :param instance_id: The instance ID of the virtual machine. + :type instance_id: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns None or + ClientRawResponse if raw==True + :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] + :raises: :class:`CloudError` + """ + raw_result = self._restart_initial( + resource_group_name=resource_group_name, + vm_scale_set_name=vm_scale_set_name, + instance_id=instance_id, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + restart.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/virtualmachines/{instanceId}/restart'} + + + def _start_initial( + self, resource_group_name, vm_scale_set_name, instance_id, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.start.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), + 'instanceId': self._serialize.url("instance_id", instance_id, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + def start( + self, resource_group_name, vm_scale_set_name, instance_id, custom_headers=None, raw=False, polling=True, **operation_config): + """Starts a virtual machine in a VM scale set. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param vm_scale_set_name: The name of the VM scale set. + :type vm_scale_set_name: str + :param instance_id: The instance ID of the virtual machine. + :type instance_id: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns None or + ClientRawResponse if raw==True + :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] + :raises: :class:`CloudError` + """ + raw_result = self._start_initial( + resource_group_name=resource_group_name, + vm_scale_set_name=vm_scale_set_name, + instance_id=instance_id, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + start.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/virtualmachines/{instanceId}/start'} + + + def _redeploy_initial( + self, resource_group_name, vm_scale_set_name, instance_id, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.redeploy.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), + 'instanceId': self._serialize.url("instance_id", instance_id, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + def redeploy( + self, resource_group_name, vm_scale_set_name, instance_id, custom_headers=None, raw=False, polling=True, **operation_config): + """Redeploys a virtual machine in a VM scale set. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param vm_scale_set_name: The name of the VM scale set. + :type vm_scale_set_name: str + :param instance_id: The instance ID of the virtual machine. + :type instance_id: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns None or + ClientRawResponse if raw==True + :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] + :raises: :class:`CloudError` + """ + raw_result = self._redeploy_initial( + resource_group_name=resource_group_name, + vm_scale_set_name=vm_scale_set_name, + instance_id=instance_id, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + redeploy.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/virtualmachines/{instanceId}/redeploy'} + + + def _perform_maintenance_initial( + self, resource_group_name, vm_scale_set_name, instance_id, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.perform_maintenance.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), + 'instanceId': self._serialize.url("instance_id", instance_id, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + def perform_maintenance( + self, resource_group_name, vm_scale_set_name, instance_id, custom_headers=None, raw=False, polling=True, **operation_config): + """Performs maintenance on a virtual machine in a VM scale set. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param vm_scale_set_name: The name of the VM scale set. + :type vm_scale_set_name: str + :param instance_id: The instance ID of the virtual machine. + :type instance_id: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns None or + ClientRawResponse if raw==True + :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] + :raises: :class:`CloudError` + """ + raw_result = self._perform_maintenance_initial( + resource_group_name=resource_group_name, + vm_scale_set_name=vm_scale_set_name, + instance_id=instance_id, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + perform_maintenance.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/virtualmachines/{instanceId}/performMaintenance'} + + + def _run_command_initial( + self, resource_group_name, vm_scale_set_name, instance_id, parameters, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.run_command.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), + 'instanceId': self._serialize.url("instance_id", instance_id, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(parameters, 'RunCommandInput') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('RunCommandResult', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def run_command( + self, resource_group_name, vm_scale_set_name, instance_id, parameters, custom_headers=None, raw=False, polling=True, **operation_config): + """Run command on a virtual machine in a VM scale set. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param vm_scale_set_name: The name of the VM scale set. + :type vm_scale_set_name: str + :param instance_id: The instance ID of the virtual machine. + :type instance_id: str + :param parameters: Parameters supplied to the Run command operation. + :type parameters: + ~azure.mgmt.compute.v2018_10_01.models.RunCommandInput + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns RunCommandResult or + ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2018_10_01.models.RunCommandResult] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2018_10_01.models.RunCommandResult]] + :raises: :class:`CloudError` + """ + raw_result = self._run_command_initial( + resource_group_name=resource_group_name, + vm_scale_set_name=vm_scale_set_name, + instance_id=instance_id, + parameters=parameters, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('RunCommandResult', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + run_command.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/virtualmachines/{instanceId}/runCommand'} diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/operations/_virtual_machine_scale_sets_operations.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/operations/_virtual_machine_scale_sets_operations.py new file mode 100644 index 000000000000..7b8fb99c3707 --- /dev/null +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/operations/_virtual_machine_scale_sets_operations.py @@ -0,0 +1,1764 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse +from msrestazure.azure_exceptions import CloudError +from msrest.polling import LROPoller, NoPolling +from msrestazure.polling.arm_polling import ARMPolling + +from .. import models + + +class VirtualMachineScaleSetsOperations(object): + """VirtualMachineScaleSetsOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: Client Api Version. Constant value: "2018-10-01". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2018-10-01" + + self.config = config + + + def _create_or_update_initial( + self, resource_group_name, vm_scale_set_name, parameters, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.create_or_update.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(parameters, 'VirtualMachineScaleSet') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 201]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('VirtualMachineScaleSet', response) + if response.status_code == 201: + deserialized = self._deserialize('VirtualMachineScaleSet', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def create_or_update( + self, resource_group_name, vm_scale_set_name, parameters, custom_headers=None, raw=False, polling=True, **operation_config): + """Create or update a VM scale set. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param vm_scale_set_name: The name of the VM scale set to create or + update. + :type vm_scale_set_name: str + :param parameters: The scale set object. + :type parameters: + ~azure.mgmt.compute.v2018_10_01.models.VirtualMachineScaleSet + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns VirtualMachineScaleSet + or ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2018_10_01.models.VirtualMachineScaleSet] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2018_10_01.models.VirtualMachineScaleSet]] + :raises: :class:`CloudError` + """ + raw_result = self._create_or_update_initial( + resource_group_name=resource_group_name, + vm_scale_set_name=vm_scale_set_name, + parameters=parameters, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('VirtualMachineScaleSet', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}'} + + + def _update_initial( + self, resource_group_name, vm_scale_set_name, parameters, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.update.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(parameters, 'VirtualMachineScaleSetUpdate') + + # Construct and send request + request = self._client.patch(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('VirtualMachineScaleSet', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def update( + self, resource_group_name, vm_scale_set_name, parameters, custom_headers=None, raw=False, polling=True, **operation_config): + """Update a VM scale set. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param vm_scale_set_name: The name of the VM scale set to create or + update. + :type vm_scale_set_name: str + :param parameters: The scale set object. + :type parameters: + ~azure.mgmt.compute.v2018_10_01.models.VirtualMachineScaleSetUpdate + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns VirtualMachineScaleSet + or ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2018_10_01.models.VirtualMachineScaleSet] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2018_10_01.models.VirtualMachineScaleSet]] + :raises: :class:`CloudError` + """ + raw_result = self._update_initial( + resource_group_name=resource_group_name, + vm_scale_set_name=vm_scale_set_name, + parameters=parameters, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('VirtualMachineScaleSet', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}'} + + + def _delete_initial( + self, resource_group_name, vm_scale_set_name, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.delete.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202, 204]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + def delete( + self, resource_group_name, vm_scale_set_name, custom_headers=None, raw=False, polling=True, **operation_config): + """Deletes a VM scale set. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param vm_scale_set_name: The name of the VM scale set. + :type vm_scale_set_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns None or + ClientRawResponse if raw==True + :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] + :raises: :class:`CloudError` + """ + raw_result = self._delete_initial( + resource_group_name=resource_group_name, + vm_scale_set_name=vm_scale_set_name, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}'} + + def get( + self, resource_group_name, vm_scale_set_name, custom_headers=None, raw=False, **operation_config): + """Display information about a virtual machine scale set. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param vm_scale_set_name: The name of the VM scale set. + :type vm_scale_set_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: VirtualMachineScaleSet or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.compute.v2018_10_01.models.VirtualMachineScaleSet + or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('VirtualMachineScaleSet', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}'} + + + def _deallocate_initial( + self, resource_group_name, vm_scale_set_name, instance_ids=None, custom_headers=None, raw=False, **operation_config): + vm_instance_ids = None + if instance_ids is not None: + vm_instance_ids = models.VirtualMachineScaleSetVMInstanceIDs(instance_ids=instance_ids) + + # Construct URL + url = self.deallocate.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + if vm_instance_ids is not None: + body_content = self._serialize.body(vm_instance_ids, 'VirtualMachineScaleSetVMInstanceIDs') + else: + body_content = None + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + def deallocate( + self, resource_group_name, vm_scale_set_name, instance_ids=None, custom_headers=None, raw=False, polling=True, **operation_config): + """Deallocates specific virtual machines in a VM scale set. Shuts down the + virtual machines and releases the compute resources. You are not billed + for the compute resources that this virtual machine scale set + deallocates. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param vm_scale_set_name: The name of the VM scale set. + :type vm_scale_set_name: str + :param instance_ids: The virtual machine scale set instance ids. + Omitting the virtual machine scale set instance ids will result in the + operation being performed on all virtual machines in the virtual + machine scale set. + :type instance_ids: list[str] + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns None or + ClientRawResponse if raw==True + :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] + :raises: :class:`CloudError` + """ + raw_result = self._deallocate_initial( + resource_group_name=resource_group_name, + vm_scale_set_name=vm_scale_set_name, + instance_ids=instance_ids, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + deallocate.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/deallocate'} + + + def _delete_instances_initial( + self, resource_group_name, vm_scale_set_name, instance_ids, custom_headers=None, raw=False, **operation_config): + vm_instance_ids = models.VirtualMachineScaleSetVMInstanceRequiredIDs(instance_ids=instance_ids) + + # Construct URL + url = self.delete_instances.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(vm_instance_ids, 'VirtualMachineScaleSetVMInstanceRequiredIDs') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + def delete_instances( + self, resource_group_name, vm_scale_set_name, instance_ids, custom_headers=None, raw=False, polling=True, **operation_config): + """Deletes virtual machines in a VM scale set. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param vm_scale_set_name: The name of the VM scale set. + :type vm_scale_set_name: str + :param instance_ids: The virtual machine scale set instance ids. + :type instance_ids: list[str] + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns None or + ClientRawResponse if raw==True + :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] + :raises: :class:`CloudError` + """ + raw_result = self._delete_instances_initial( + resource_group_name=resource_group_name, + vm_scale_set_name=vm_scale_set_name, + instance_ids=instance_ids, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + delete_instances.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/delete'} + + def get_instance_view( + self, resource_group_name, vm_scale_set_name, custom_headers=None, raw=False, **operation_config): + """Gets the status of a VM scale set instance. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param vm_scale_set_name: The name of the VM scale set. + :type vm_scale_set_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: VirtualMachineScaleSetInstanceView or ClientRawResponse if + raw=true + :rtype: + ~azure.mgmt.compute.v2018_10_01.models.VirtualMachineScaleSetInstanceView + or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get_instance_view.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('VirtualMachineScaleSetInstanceView', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_instance_view.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/instanceView'} + + def list( + self, resource_group_name, custom_headers=None, raw=False, **operation_config): + """Gets a list of all VM scale sets under a resource group. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of VirtualMachineScaleSet + :rtype: + ~azure.mgmt.compute.v2018_10_01.models.VirtualMachineScaleSetPaged[~azure.mgmt.compute.v2018_10_01.models.VirtualMachineScaleSet] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.VirtualMachineScaleSetPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets'} + + def list_all( + self, custom_headers=None, raw=False, **operation_config): + """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. + + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of VirtualMachineScaleSet + :rtype: + ~azure.mgmt.compute.v2018_10_01.models.VirtualMachineScaleSetPaged[~azure.mgmt.compute.v2018_10_01.models.VirtualMachineScaleSet] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_all.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.VirtualMachineScaleSetPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_all.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Compute/virtualMachineScaleSets'} + + def list_skus( + self, resource_group_name, vm_scale_set_name, custom_headers=None, raw=False, **operation_config): + """Gets a list of SKUs available for your VM scale set, including the + minimum and maximum VM instances allowed for each SKU. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param vm_scale_set_name: The name of the VM scale set. + :type vm_scale_set_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of VirtualMachineScaleSetSku + :rtype: + ~azure.mgmt.compute.v2018_10_01.models.VirtualMachineScaleSetSkuPaged[~azure.mgmt.compute.v2018_10_01.models.VirtualMachineScaleSetSku] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_skus.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.VirtualMachineScaleSetSkuPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_skus.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/skus'} + + def get_os_upgrade_history( + self, resource_group_name, vm_scale_set_name, custom_headers=None, raw=False, **operation_config): + """Gets list of OS upgrades on a VM scale set instance. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param vm_scale_set_name: The name of the VM scale set. + :type vm_scale_set_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of + UpgradeOperationHistoricalStatusInfo + :rtype: + ~azure.mgmt.compute.v2018_10_01.models.UpgradeOperationHistoricalStatusInfoPaged[~azure.mgmt.compute.v2018_10_01.models.UpgradeOperationHistoricalStatusInfo] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.get_os_upgrade_history.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.UpgradeOperationHistoricalStatusInfoPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + get_os_upgrade_history.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/osUpgradeHistory'} + + + def _power_off_initial( + self, resource_group_name, vm_scale_set_name, instance_ids=None, custom_headers=None, raw=False, **operation_config): + vm_instance_ids = None + if instance_ids is not None: + vm_instance_ids = models.VirtualMachineScaleSetVMInstanceIDs(instance_ids=instance_ids) + + # Construct URL + url = self.power_off.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + if vm_instance_ids is not None: + body_content = self._serialize.body(vm_instance_ids, 'VirtualMachineScaleSetVMInstanceIDs') + else: + body_content = None + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + def power_off( + self, resource_group_name, vm_scale_set_name, instance_ids=None, custom_headers=None, raw=False, polling=True, **operation_config): + """Power off (stop) one or more virtual machines in a VM scale set. Note + that resources are still attached and you are getting charged for the + resources. Instead, use deallocate to release resources and avoid + charges. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param vm_scale_set_name: The name of the VM scale set. + :type vm_scale_set_name: str + :param instance_ids: The virtual machine scale set instance ids. + Omitting the virtual machine scale set instance ids will result in the + operation being performed on all virtual machines in the virtual + machine scale set. + :type instance_ids: list[str] + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns None or + ClientRawResponse if raw==True + :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] + :raises: :class:`CloudError` + """ + raw_result = self._power_off_initial( + resource_group_name=resource_group_name, + vm_scale_set_name=vm_scale_set_name, + instance_ids=instance_ids, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + power_off.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/poweroff'} + + + def _restart_initial( + self, resource_group_name, vm_scale_set_name, instance_ids=None, custom_headers=None, raw=False, **operation_config): + vm_instance_ids = None + if instance_ids is not None: + vm_instance_ids = models.VirtualMachineScaleSetVMInstanceIDs(instance_ids=instance_ids) + + # Construct URL + url = self.restart.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + if vm_instance_ids is not None: + body_content = self._serialize.body(vm_instance_ids, 'VirtualMachineScaleSetVMInstanceIDs') + else: + body_content = None + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + def restart( + self, resource_group_name, vm_scale_set_name, instance_ids=None, custom_headers=None, raw=False, polling=True, **operation_config): + """Restarts one or more virtual machines in a VM scale set. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param vm_scale_set_name: The name of the VM scale set. + :type vm_scale_set_name: str + :param instance_ids: The virtual machine scale set instance ids. + Omitting the virtual machine scale set instance ids will result in the + operation being performed on all virtual machines in the virtual + machine scale set. + :type instance_ids: list[str] + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns None or + ClientRawResponse if raw==True + :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] + :raises: :class:`CloudError` + """ + raw_result = self._restart_initial( + resource_group_name=resource_group_name, + vm_scale_set_name=vm_scale_set_name, + instance_ids=instance_ids, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + restart.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/restart'} + + + def _start_initial( + self, resource_group_name, vm_scale_set_name, instance_ids=None, custom_headers=None, raw=False, **operation_config): + vm_instance_ids = None + if instance_ids is not None: + vm_instance_ids = models.VirtualMachineScaleSetVMInstanceIDs(instance_ids=instance_ids) + + # Construct URL + url = self.start.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + if vm_instance_ids is not None: + body_content = self._serialize.body(vm_instance_ids, 'VirtualMachineScaleSetVMInstanceIDs') + else: + body_content = None + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + def start( + self, resource_group_name, vm_scale_set_name, instance_ids=None, custom_headers=None, raw=False, polling=True, **operation_config): + """Starts one or more virtual machines in a VM scale set. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param vm_scale_set_name: The name of the VM scale set. + :type vm_scale_set_name: str + :param instance_ids: The virtual machine scale set instance ids. + Omitting the virtual machine scale set instance ids will result in the + operation being performed on all virtual machines in the virtual + machine scale set. + :type instance_ids: list[str] + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns None or + ClientRawResponse if raw==True + :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] + :raises: :class:`CloudError` + """ + raw_result = self._start_initial( + resource_group_name=resource_group_name, + vm_scale_set_name=vm_scale_set_name, + instance_ids=instance_ids, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + start.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/start'} + + + def _redeploy_initial( + self, resource_group_name, vm_scale_set_name, instance_ids=None, custom_headers=None, raw=False, **operation_config): + vm_instance_ids = None + if instance_ids is not None: + vm_instance_ids = models.VirtualMachineScaleSetVMInstanceIDs(instance_ids=instance_ids) + + # Construct URL + url = self.redeploy.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + if vm_instance_ids is not None: + body_content = self._serialize.body(vm_instance_ids, 'VirtualMachineScaleSetVMInstanceIDs') + else: + body_content = None + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + def redeploy( + self, resource_group_name, vm_scale_set_name, instance_ids=None, custom_headers=None, raw=False, polling=True, **operation_config): + """Redeploy one or more virtual machines in a VM scale set. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param vm_scale_set_name: The name of the VM scale set. + :type vm_scale_set_name: str + :param instance_ids: The virtual machine scale set instance ids. + Omitting the virtual machine scale set instance ids will result in the + operation being performed on all virtual machines in the virtual + machine scale set. + :type instance_ids: list[str] + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns None or + ClientRawResponse if raw==True + :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] + :raises: :class:`CloudError` + """ + raw_result = self._redeploy_initial( + resource_group_name=resource_group_name, + vm_scale_set_name=vm_scale_set_name, + instance_ids=instance_ids, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + redeploy.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/redeploy'} + + + def _perform_maintenance_initial( + self, resource_group_name, vm_scale_set_name, instance_ids=None, custom_headers=None, raw=False, **operation_config): + vm_instance_ids = None + if instance_ids is not None: + vm_instance_ids = models.VirtualMachineScaleSetVMInstanceIDs(instance_ids=instance_ids) + + # Construct URL + url = self.perform_maintenance.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + if vm_instance_ids is not None: + body_content = self._serialize.body(vm_instance_ids, 'VirtualMachineScaleSetVMInstanceIDs') + else: + body_content = None + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + def perform_maintenance( + self, resource_group_name, vm_scale_set_name, instance_ids=None, custom_headers=None, raw=False, polling=True, **operation_config): + """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. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param vm_scale_set_name: The name of the VM scale set. + :type vm_scale_set_name: str + :param instance_ids: The virtual machine scale set instance ids. + Omitting the virtual machine scale set instance ids will result in the + operation being performed on all virtual machines in the virtual + machine scale set. + :type instance_ids: list[str] + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns None or + ClientRawResponse if raw==True + :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] + :raises: :class:`CloudError` + """ + raw_result = self._perform_maintenance_initial( + resource_group_name=resource_group_name, + vm_scale_set_name=vm_scale_set_name, + instance_ids=instance_ids, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + perform_maintenance.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/performMaintenance'} + + + def _update_instances_initial( + self, resource_group_name, vm_scale_set_name, instance_ids, custom_headers=None, raw=False, **operation_config): + vm_instance_ids = models.VirtualMachineScaleSetVMInstanceRequiredIDs(instance_ids=instance_ids) + + # Construct URL + url = self.update_instances.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(vm_instance_ids, 'VirtualMachineScaleSetVMInstanceRequiredIDs') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + def update_instances( + self, resource_group_name, vm_scale_set_name, instance_ids, custom_headers=None, raw=False, polling=True, **operation_config): + """Upgrades one or more virtual machines to the latest SKU set in the VM + scale set model. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param vm_scale_set_name: The name of the VM scale set. + :type vm_scale_set_name: str + :param instance_ids: The virtual machine scale set instance ids. + :type instance_ids: list[str] + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns None or + ClientRawResponse if raw==True + :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] + :raises: :class:`CloudError` + """ + raw_result = self._update_instances_initial( + resource_group_name=resource_group_name, + vm_scale_set_name=vm_scale_set_name, + instance_ids=instance_ids, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + update_instances.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/manualupgrade'} + + + def _reimage_initial( + self, resource_group_name, vm_scale_set_name, temp_disk=None, instance_ids=None, custom_headers=None, raw=False, **operation_config): + vm_scale_set_reimage_input = None + if temp_disk is not None or instance_ids is not None: + vm_scale_set_reimage_input = models.VirtualMachineScaleSetReimageParameters(temp_disk=temp_disk, instance_ids=instance_ids) + + # Construct URL + url = self.reimage.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + if vm_scale_set_reimage_input is not None: + body_content = self._serialize.body(vm_scale_set_reimage_input, 'VirtualMachineScaleSetReimageParameters') + else: + body_content = None + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + def reimage( + self, resource_group_name, vm_scale_set_name, temp_disk=None, instance_ids=None, custom_headers=None, raw=False, polling=True, **operation_config): + """Reimages (upgrade the operating system) one or more virtual machines in + a VM scale set which don't have a ephemeral OS disk, for virtual + machines who have a ephemeral OS disk the virtual machine is reset to + initial state. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param vm_scale_set_name: The name of the VM scale set. + :type vm_scale_set_name: str + :param temp_disk: Specifies whether to reimage temp disk. Default + value: false. Note: This temp disk reimage parameter is only supported + for VM/VMSS with Ephemeral OS disk. + :type temp_disk: bool + :param instance_ids: The virtual machine scale set instance ids. + Omitting the virtual machine scale set instance ids will result in the + operation being performed on all virtual machines in the virtual + machine scale set. + :type instance_ids: list[str] + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns None or + ClientRawResponse if raw==True + :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] + :raises: :class:`CloudError` + """ + raw_result = self._reimage_initial( + resource_group_name=resource_group_name, + vm_scale_set_name=vm_scale_set_name, + temp_disk=temp_disk, + instance_ids=instance_ids, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + reimage.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/reimage'} + + + def _reimage_all_initial( + self, resource_group_name, vm_scale_set_name, instance_ids=None, custom_headers=None, raw=False, **operation_config): + vm_instance_ids = None + if instance_ids is not None: + vm_instance_ids = models.VirtualMachineScaleSetVMInstanceIDs(instance_ids=instance_ids) + + # Construct URL + url = self.reimage_all.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + if vm_instance_ids is not None: + body_content = self._serialize.body(vm_instance_ids, 'VirtualMachineScaleSetVMInstanceIDs') + else: + body_content = None + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + def reimage_all( + self, resource_group_name, vm_scale_set_name, instance_ids=None, custom_headers=None, raw=False, polling=True, **operation_config): + """Reimages all the disks ( including data disks ) in the virtual machines + in a VM scale set. This operation is only supported for managed disks. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param vm_scale_set_name: The name of the VM scale set. + :type vm_scale_set_name: str + :param instance_ids: The virtual machine scale set instance ids. + Omitting the virtual machine scale set instance ids will result in the + operation being performed on all virtual machines in the virtual + machine scale set. + :type instance_ids: list[str] + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns None or + ClientRawResponse if raw==True + :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] + :raises: :class:`CloudError` + """ + raw_result = self._reimage_all_initial( + resource_group_name=resource_group_name, + vm_scale_set_name=vm_scale_set_name, + instance_ids=instance_ids, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + reimage_all.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/reimageall'} + + def force_recovery_service_fabric_platform_update_domain_walk( + self, resource_group_name, vm_scale_set_name, platform_update_domain, custom_headers=None, raw=False, **operation_config): + """Manual platform update domain walk to update virtual machines in a + service fabric virtual machine scale set. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param vm_scale_set_name: The name of the VM scale set. + :type vm_scale_set_name: str + :param platform_update_domain: The platform update domain for which a + manual recovery walk is requested + :type platform_update_domain: int + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: RecoveryWalkResponse or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.compute.v2018_10_01.models.RecoveryWalkResponse or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.force_recovery_service_fabric_platform_update_domain_walk.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + query_parameters['platformUpdateDomain'] = self._serialize.query("platform_update_domain", platform_update_domain, 'int') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('RecoveryWalkResponse', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + force_recovery_service_fabric_platform_update_domain_walk.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/forceRecoveryServiceFabricPlatformUpdateDomainWalk'} diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/operations/_virtual_machine_sizes_operations.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/operations/_virtual_machine_sizes_operations.py new file mode 100644 index 000000000000..f2c311d72c6c --- /dev/null +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/operations/_virtual_machine_sizes_operations.py @@ -0,0 +1,111 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse +from msrestazure.azure_exceptions import CloudError + +from .. import models + + +class VirtualMachineSizesOperations(object): + """VirtualMachineSizesOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: Client Api Version. Constant value: "2018-10-01". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2018-10-01" + + self.config = config + + def list( + self, location, custom_headers=None, raw=False, **operation_config): + """This API is deprecated. Use [Resources + Skus](https://docs.microsoft.com/en-us/rest/api/compute/resourceskus/list). + + :param location: The location upon which virtual-machine-sizes is + queried. + :type location: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of VirtualMachineSize + :rtype: + ~azure.mgmt.compute.v2018_10_01.models.VirtualMachineSizePaged[~azure.mgmt.compute.v2018_10_01.models.VirtualMachineSize] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list.metadata['url'] + path_format_arguments = { + 'location': self._serialize.url("location", location, 'str', pattern=r'^[-\w\._]+$'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.VirtualMachineSizePaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/vmSizes'} diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/operations/_virtual_machines_operations.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/operations/_virtual_machines_operations.py new file mode 100644 index 000000000000..06cf68b35055 --- /dev/null +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/operations/_virtual_machines_operations.py @@ -0,0 +1,1655 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse +from msrestazure.azure_exceptions import CloudError +from msrest.polling import LROPoller, NoPolling +from msrestazure.polling.arm_polling import ARMPolling + +from .. import models + + +class VirtualMachinesOperations(object): + """VirtualMachinesOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: Client Api Version. Constant value: "2018-10-01". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2018-10-01" + + self.config = config + + def list_by_location( + self, location, custom_headers=None, raw=False, **operation_config): + """Gets all the virtual machines under the specified subscription for the + specified location. + + :param location: The location for which virtual machines under the + subscription are queried. + :type location: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of VirtualMachine + :rtype: + ~azure.mgmt.compute.v2018_10_01.models.VirtualMachinePaged[~azure.mgmt.compute.v2018_10_01.models.VirtualMachine] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_by_location.metadata['url'] + path_format_arguments = { + 'location': self._serialize.url("location", location, 'str', pattern=r'^[-\w\._]+$'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.VirtualMachinePaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_by_location.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/virtualMachines'} + + + def _capture_initial( + self, resource_group_name, vm_name, parameters, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.capture.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vmName': self._serialize.url("vm_name", vm_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(parameters, 'VirtualMachineCaptureParameters') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('VirtualMachineCaptureResult', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def capture( + self, resource_group_name, vm_name, parameters, custom_headers=None, raw=False, polling=True, **operation_config): + """Captures the VM by copying virtual hard disks of the VM and outputs a + template that can be used to create similar VMs. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param vm_name: The name of the virtual machine. + :type vm_name: str + :param parameters: Parameters supplied to the Capture Virtual Machine + operation. + :type parameters: + ~azure.mgmt.compute.v2018_10_01.models.VirtualMachineCaptureParameters + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns + VirtualMachineCaptureResult or + ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2018_10_01.models.VirtualMachineCaptureResult] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2018_10_01.models.VirtualMachineCaptureResult]] + :raises: :class:`CloudError` + """ + raw_result = self._capture_initial( + resource_group_name=resource_group_name, + vm_name=vm_name, + parameters=parameters, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('VirtualMachineCaptureResult', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + capture.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/capture'} + + + def _create_or_update_initial( + self, resource_group_name, vm_name, parameters, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.create_or_update.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vmName': self._serialize.url("vm_name", vm_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(parameters, 'VirtualMachine') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 201]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('VirtualMachine', response) + if response.status_code == 201: + deserialized = self._deserialize('VirtualMachine', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def create_or_update( + self, resource_group_name, vm_name, parameters, custom_headers=None, raw=False, polling=True, **operation_config): + """The operation to create or update a virtual machine. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param vm_name: The name of the virtual machine. + :type vm_name: str + :param parameters: Parameters supplied to the Create Virtual Machine + operation. + :type parameters: + ~azure.mgmt.compute.v2018_10_01.models.VirtualMachine + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns VirtualMachine or + ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2018_10_01.models.VirtualMachine] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2018_10_01.models.VirtualMachine]] + :raises: :class:`CloudError` + """ + raw_result = self._create_or_update_initial( + resource_group_name=resource_group_name, + vm_name=vm_name, + parameters=parameters, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('VirtualMachine', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}'} + + + def _update_initial( + self, resource_group_name, vm_name, parameters, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.update.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vmName': self._serialize.url("vm_name", vm_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(parameters, 'VirtualMachineUpdate') + + # Construct and send request + request = self._client.patch(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 201]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('VirtualMachine', response) + if response.status_code == 201: + deserialized = self._deserialize('VirtualMachine', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def update( + self, resource_group_name, vm_name, parameters, custom_headers=None, raw=False, polling=True, **operation_config): + """The operation to update a virtual machine. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param vm_name: The name of the virtual machine. + :type vm_name: str + :param parameters: Parameters supplied to the Update Virtual Machine + operation. + :type parameters: + ~azure.mgmt.compute.v2018_10_01.models.VirtualMachineUpdate + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns VirtualMachine or + ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2018_10_01.models.VirtualMachine] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2018_10_01.models.VirtualMachine]] + :raises: :class:`CloudError` + """ + raw_result = self._update_initial( + resource_group_name=resource_group_name, + vm_name=vm_name, + parameters=parameters, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('VirtualMachine', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}'} + + + def _delete_initial( + self, resource_group_name, vm_name, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.delete.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vmName': self._serialize.url("vm_name", vm_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202, 204]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + def delete( + self, resource_group_name, vm_name, custom_headers=None, raw=False, polling=True, **operation_config): + """The operation to delete a virtual machine. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param vm_name: The name of the virtual machine. + :type vm_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns None or + ClientRawResponse if raw==True + :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] + :raises: :class:`CloudError` + """ + raw_result = self._delete_initial( + resource_group_name=resource_group_name, + vm_name=vm_name, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}'} + + def get( + self, resource_group_name, vm_name, expand=None, custom_headers=None, raw=False, **operation_config): + """Retrieves information about the model view or the instance view of a + virtual machine. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param vm_name: The name of the virtual machine. + :type vm_name: str + :param expand: The expand expression to apply on the operation. + Possible values include: 'instanceView' + :type expand: str or + ~azure.mgmt.compute.v2018_10_01.models.InstanceViewTypes + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: VirtualMachine or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.compute.v2018_10_01.models.VirtualMachine or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vmName': self._serialize.url("vm_name", vm_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + if expand is not None: + query_parameters['$expand'] = self._serialize.query("expand", expand, 'InstanceViewTypes') + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('VirtualMachine', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}'} + + def instance_view( + self, resource_group_name, vm_name, custom_headers=None, raw=False, **operation_config): + """Retrieves information about the run-time state of a virtual machine. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param vm_name: The name of the virtual machine. + :type vm_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: VirtualMachineInstanceView or ClientRawResponse if raw=true + :rtype: + ~azure.mgmt.compute.v2018_10_01.models.VirtualMachineInstanceView or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.instance_view.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vmName': self._serialize.url("vm_name", vm_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('VirtualMachineInstanceView', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + instance_view.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/instanceView'} + + + def _convert_to_managed_disks_initial( + self, resource_group_name, vm_name, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.convert_to_managed_disks.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vmName': self._serialize.url("vm_name", vm_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + def convert_to_managed_disks( + self, resource_group_name, vm_name, custom_headers=None, raw=False, polling=True, **operation_config): + """Converts virtual machine disks from blob-based to managed disks. + Virtual machine must be stop-deallocated before invoking this + operation. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param vm_name: The name of the virtual machine. + :type vm_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns None or + ClientRawResponse if raw==True + :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] + :raises: :class:`CloudError` + """ + raw_result = self._convert_to_managed_disks_initial( + resource_group_name=resource_group_name, + vm_name=vm_name, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + convert_to_managed_disks.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/convertToManagedDisks'} + + + def _deallocate_initial( + self, resource_group_name, vm_name, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.deallocate.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vmName': self._serialize.url("vm_name", vm_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + def deallocate( + self, resource_group_name, vm_name, custom_headers=None, raw=False, polling=True, **operation_config): + """Shuts down the virtual machine and releases the compute resources. You + are not billed for the compute resources that this virtual machine + uses. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param vm_name: The name of the virtual machine. + :type vm_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns None or + ClientRawResponse if raw==True + :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] + :raises: :class:`CloudError` + """ + raw_result = self._deallocate_initial( + resource_group_name=resource_group_name, + vm_name=vm_name, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + deallocate.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/deallocate'} + + def generalize( + self, resource_group_name, vm_name, custom_headers=None, raw=False, **operation_config): + """Sets the state of the virtual machine to generalized. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param vm_name: The name of the virtual machine. + :type vm_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.generalize.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vmName': self._serialize.url("vm_name", vm_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + generalize.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/generalize'} + + def list( + self, resource_group_name, custom_headers=None, raw=False, **operation_config): + """Lists all of the virtual machines in the specified resource group. Use + the nextLink property in the response to get the next page of virtual + machines. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of VirtualMachine + :rtype: + ~azure.mgmt.compute.v2018_10_01.models.VirtualMachinePaged[~azure.mgmt.compute.v2018_10_01.models.VirtualMachine] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.VirtualMachinePaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines'} + + def list_all( + self, custom_headers=None, raw=False, **operation_config): + """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. + + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of VirtualMachine + :rtype: + ~azure.mgmt.compute.v2018_10_01.models.VirtualMachinePaged[~azure.mgmt.compute.v2018_10_01.models.VirtualMachine] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_all.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.VirtualMachinePaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_all.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Compute/virtualMachines'} + + def list_available_sizes( + self, resource_group_name, vm_name, custom_headers=None, raw=False, **operation_config): + """Lists all available virtual machine sizes to which the specified + virtual machine can be resized. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param vm_name: The name of the virtual machine. + :type vm_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of VirtualMachineSize + :rtype: + ~azure.mgmt.compute.v2018_10_01.models.VirtualMachineSizePaged[~azure.mgmt.compute.v2018_10_01.models.VirtualMachineSize] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_available_sizes.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vmName': self._serialize.url("vm_name", vm_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.VirtualMachineSizePaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_available_sizes.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/vmSizes'} + + + def _power_off_initial( + self, resource_group_name, vm_name, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.power_off.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vmName': self._serialize.url("vm_name", vm_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + def power_off( + self, resource_group_name, vm_name, custom_headers=None, raw=False, polling=True, **operation_config): + """The operation to power off (stop) a virtual machine. The virtual + machine can be restarted with the same provisioned resources. You are + still charged for this virtual machine. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param vm_name: The name of the virtual machine. + :type vm_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns None or + ClientRawResponse if raw==True + :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] + :raises: :class:`CloudError` + """ + raw_result = self._power_off_initial( + resource_group_name=resource_group_name, + vm_name=vm_name, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + power_off.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/powerOff'} + + + def _restart_initial( + self, resource_group_name, vm_name, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.restart.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vmName': self._serialize.url("vm_name", vm_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + def restart( + self, resource_group_name, vm_name, custom_headers=None, raw=False, polling=True, **operation_config): + """The operation to restart a virtual machine. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param vm_name: The name of the virtual machine. + :type vm_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns None or + ClientRawResponse if raw==True + :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] + :raises: :class:`CloudError` + """ + raw_result = self._restart_initial( + resource_group_name=resource_group_name, + vm_name=vm_name, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + restart.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/restart'} + + + def _start_initial( + self, resource_group_name, vm_name, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.start.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vmName': self._serialize.url("vm_name", vm_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + def start( + self, resource_group_name, vm_name, custom_headers=None, raw=False, polling=True, **operation_config): + """The operation to start a virtual machine. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param vm_name: The name of the virtual machine. + :type vm_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns None or + ClientRawResponse if raw==True + :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] + :raises: :class:`CloudError` + """ + raw_result = self._start_initial( + resource_group_name=resource_group_name, + vm_name=vm_name, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + start.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/start'} + + + def _redeploy_initial( + self, resource_group_name, vm_name, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.redeploy.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vmName': self._serialize.url("vm_name", vm_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + def redeploy( + self, resource_group_name, vm_name, custom_headers=None, raw=False, polling=True, **operation_config): + """The operation to redeploy a virtual machine. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param vm_name: The name of the virtual machine. + :type vm_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns None or + ClientRawResponse if raw==True + :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] + :raises: :class:`CloudError` + """ + raw_result = self._redeploy_initial( + resource_group_name=resource_group_name, + vm_name=vm_name, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + redeploy.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/redeploy'} + + + def _reimage_initial( + self, resource_group_name, vm_name, temp_disk=None, custom_headers=None, raw=False, **operation_config): + parameters = None + if temp_disk is not None: + parameters = models.VirtualMachineReimageParameters(temp_disk=temp_disk) + + # Construct URL + url = self.reimage.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vmName': self._serialize.url("vm_name", vm_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + if parameters is not None: + body_content = self._serialize.body(parameters, 'VirtualMachineReimageParameters') + else: + body_content = None + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + def reimage( + self, resource_group_name, vm_name, temp_disk=None, custom_headers=None, raw=False, polling=True, **operation_config): + """Reimages the virtual machine which has an ephemeral OS disk back to its + initial state. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param vm_name: The name of the virtual machine. + :type vm_name: str + :param temp_disk: Specifies whether to reimage temp disk. Default + value: false. Note: This temp disk reimage parameter is only supported + for VM/VMSS with Ephemeral OS disk. + :type temp_disk: bool + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns None or + ClientRawResponse if raw==True + :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] + :raises: :class:`CloudError` + """ + raw_result = self._reimage_initial( + resource_group_name=resource_group_name, + vm_name=vm_name, + temp_disk=temp_disk, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + reimage.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/reimage'} + + + def _perform_maintenance_initial( + self, resource_group_name, vm_name, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.perform_maintenance.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vmName': self._serialize.url("vm_name", vm_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + def perform_maintenance( + self, resource_group_name, vm_name, custom_headers=None, raw=False, polling=True, **operation_config): + """The operation to perform maintenance on a virtual machine. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param vm_name: The name of the virtual machine. + :type vm_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns None or + ClientRawResponse if raw==True + :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] + :raises: :class:`CloudError` + """ + raw_result = self._perform_maintenance_initial( + resource_group_name=resource_group_name, + vm_name=vm_name, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + perform_maintenance.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/performMaintenance'} + + + def _run_command_initial( + self, resource_group_name, vm_name, parameters, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.run_command.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vmName': self._serialize.url("vm_name", vm_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(parameters, 'RunCommandInput') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('RunCommandResult', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def run_command( + self, resource_group_name, vm_name, parameters, custom_headers=None, raw=False, polling=True, **operation_config): + """Run command on the VM. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param vm_name: The name of the virtual machine. + :type vm_name: str + :param parameters: Parameters supplied to the Run command operation. + :type parameters: + ~azure.mgmt.compute.v2018_10_01.models.RunCommandInput + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns RunCommandResult or + ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2018_10_01.models.RunCommandResult] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2018_10_01.models.RunCommandResult]] + :raises: :class:`CloudError` + """ + raw_result = self._run_command_initial( + resource_group_name=resource_group_name, + vm_name=vm_name, + parameters=parameters, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('RunCommandResult', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + run_command.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/runCommand'} diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/operations/availability_sets_operations.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/operations/availability_sets_operations.py deleted file mode 100644 index 3617327b05fa..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/operations/availability_sets_operations.py +++ /dev/null @@ -1,495 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError - -from .. import models - - -class AvailabilitySetsOperations(object): - """AvailabilitySetsOperations operations. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: Client Api Version. Constant value: "2018-10-01". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2018-10-01" - - self.config = config - - def create_or_update( - self, resource_group_name, availability_set_name, parameters, custom_headers=None, raw=False, **operation_config): - """Create or update an availability set. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param availability_set_name: The name of the availability set. - :type availability_set_name: str - :param parameters: Parameters supplied to the Create Availability Set - operation. - :type parameters: - ~azure.mgmt.compute.v2018_10_01.models.AvailabilitySet - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: AvailabilitySet or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.compute.v2018_10_01.models.AvailabilitySet or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.create_or_update.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'availabilitySetName': self._serialize.url("availability_set_name", availability_set_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(parameters, 'AvailabilitySet') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('AvailabilitySet', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}'} - - def update( - self, resource_group_name, availability_set_name, parameters, custom_headers=None, raw=False, **operation_config): - """Update an availability set. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param availability_set_name: The name of the availability set. - :type availability_set_name: str - :param parameters: Parameters supplied to the Update Availability Set - operation. - :type parameters: - ~azure.mgmt.compute.v2018_10_01.models.AvailabilitySetUpdate - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: AvailabilitySet or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.compute.v2018_10_01.models.AvailabilitySet or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.update.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'availabilitySetName': self._serialize.url("availability_set_name", availability_set_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(parameters, 'AvailabilitySetUpdate') - - # Construct and send request - request = self._client.patch(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('AvailabilitySet', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}'} - - def delete( - self, resource_group_name, availability_set_name, custom_headers=None, raw=False, **operation_config): - """Delete an availability set. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param availability_set_name: The name of the availability set. - :type availability_set_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.delete.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'availabilitySetName': self._serialize.url("availability_set_name", availability_set_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 204]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}'} - - def get( - self, resource_group_name, availability_set_name, custom_headers=None, raw=False, **operation_config): - """Retrieves information about an availability set. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param availability_set_name: The name of the availability set. - :type availability_set_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: AvailabilitySet or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.compute.v2018_10_01.models.AvailabilitySet or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'availabilitySetName': self._serialize.url("availability_set_name", availability_set_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('AvailabilitySet', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}'} - - def list_by_subscription( - self, custom_headers=None, raw=False, **operation_config): - """Lists all availability sets in a subscription. - - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of AvailabilitySet - :rtype: - ~azure.mgmt.compute.v2018_10_01.models.AvailabilitySetPaged[~azure.mgmt.compute.v2018_10_01.models.AvailabilitySet] - :raises: :class:`CloudError` - """ - def internal_paging(next_link=None, raw=False): - - if not next_link: - # Construct URL - url = self.list_by_subscription.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - deserialized = models.AvailabilitySetPaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.AvailabilitySetPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - list_by_subscription.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Compute/availabilitySets'} - - def list( - self, resource_group_name, custom_headers=None, raw=False, **operation_config): - """Lists all availability sets in a resource group. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of AvailabilitySet - :rtype: - ~azure.mgmt.compute.v2018_10_01.models.AvailabilitySetPaged[~azure.mgmt.compute.v2018_10_01.models.AvailabilitySet] - :raises: :class:`CloudError` - """ - def internal_paging(next_link=None, raw=False): - - if not next_link: - # Construct URL - url = self.list.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - deserialized = models.AvailabilitySetPaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.AvailabilitySetPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets'} - - def list_available_sizes( - self, resource_group_name, availability_set_name, custom_headers=None, raw=False, **operation_config): - """Lists all available virtual machine sizes that can be used to create a - new virtual machine in an existing availability set. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param availability_set_name: The name of the availability set. - :type availability_set_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of VirtualMachineSize - :rtype: - ~azure.mgmt.compute.v2018_10_01.models.VirtualMachineSizePaged[~azure.mgmt.compute.v2018_10_01.models.VirtualMachineSize] - :raises: :class:`CloudError` - """ - def internal_paging(next_link=None, raw=False): - - if not next_link: - # Construct URL - url = self.list_available_sizes.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'availabilitySetName': self._serialize.url("availability_set_name", availability_set_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - deserialized = models.VirtualMachineSizePaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.VirtualMachineSizePaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - list_available_sizes.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}/vmSizes'} diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/operations/images_operations.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/operations/images_operations.py deleted file mode 100644 index b9741edb48bd..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/operations/images_operations.py +++ /dev/null @@ -1,522 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError -from msrest.polling import LROPoller, NoPolling -from msrestazure.polling.arm_polling import ARMPolling - -from .. import models - - -class ImagesOperations(object): - """ImagesOperations operations. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: Client Api Version. Constant value: "2018-10-01". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2018-10-01" - - self.config = config - - - def _create_or_update_initial( - self, resource_group_name, image_name, parameters, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.create_or_update.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'imageName': self._serialize.url("image_name", image_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(parameters, 'Image') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 201]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('Image', response) - if response.status_code == 201: - deserialized = self._deserialize('Image', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def create_or_update( - self, resource_group_name, image_name, parameters, custom_headers=None, raw=False, polling=True, **operation_config): - """Create or update an image. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param image_name: The name of the image. - :type image_name: str - :param parameters: Parameters supplied to the Create Image operation. - :type parameters: ~azure.mgmt.compute.v2018_10_01.models.Image - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns Image or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2018_10_01.models.Image] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2018_10_01.models.Image]] - :raises: :class:`CloudError` - """ - raw_result = self._create_or_update_initial( - resource_group_name=resource_group_name, - image_name=image_name, - parameters=parameters, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('Image', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/images/{imageName}'} - - - def _update_initial( - self, resource_group_name, image_name, parameters, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.update.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'imageName': self._serialize.url("image_name", image_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(parameters, 'ImageUpdate') - - # Construct and send request - request = self._client.patch(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 201]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('Image', response) - if response.status_code == 201: - deserialized = self._deserialize('Image', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def update( - self, resource_group_name, image_name, parameters, custom_headers=None, raw=False, polling=True, **operation_config): - """Update an image. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param image_name: The name of the image. - :type image_name: str - :param parameters: Parameters supplied to the Update Image operation. - :type parameters: ~azure.mgmt.compute.v2018_10_01.models.ImageUpdate - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns Image or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2018_10_01.models.Image] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2018_10_01.models.Image]] - :raises: :class:`CloudError` - """ - raw_result = self._update_initial( - resource_group_name=resource_group_name, - image_name=image_name, - parameters=parameters, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('Image', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/images/{imageName}'} - - - def _delete_initial( - self, resource_group_name, image_name, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.delete.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'imageName': self._serialize.url("image_name", image_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202, 204]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - def delete( - self, resource_group_name, image_name, custom_headers=None, raw=False, polling=True, **operation_config): - """Deletes an Image. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param image_name: The name of the image. - :type image_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns None or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] - :raises: :class:`CloudError` - """ - raw_result = self._delete_initial( - resource_group_name=resource_group_name, - image_name=image_name, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/images/{imageName}'} - - def get( - self, resource_group_name, image_name, expand=None, custom_headers=None, raw=False, **operation_config): - """Gets an image. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param image_name: The name of the image. - :type image_name: str - :param expand: The expand expression to apply on the operation. - :type expand: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: Image or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.compute.v2018_10_01.models.Image or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'imageName': self._serialize.url("image_name", image_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - if expand is not None: - query_parameters['$expand'] = self._serialize.query("expand", expand, 'str') - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('Image', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/images/{imageName}'} - - def list_by_resource_group( - self, resource_group_name, custom_headers=None, raw=False, **operation_config): - """Gets the list of images under a resource group. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of Image - :rtype: - ~azure.mgmt.compute.v2018_10_01.models.ImagePaged[~azure.mgmt.compute.v2018_10_01.models.Image] - :raises: :class:`CloudError` - """ - def internal_paging(next_link=None, raw=False): - - if not next_link: - # Construct URL - url = self.list_by_resource_group.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - deserialized = models.ImagePaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.ImagePaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/images'} - - def list( - self, custom_headers=None, raw=False, **operation_config): - """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. - - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of Image - :rtype: - ~azure.mgmt.compute.v2018_10_01.models.ImagePaged[~azure.mgmt.compute.v2018_10_01.models.Image] - :raises: :class:`CloudError` - """ - def internal_paging(next_link=None, raw=False): - - if not next_link: - # Construct URL - url = self.list.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - deserialized = models.ImagePaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.ImagePaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Compute/images'} diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/operations/log_analytics_operations.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/operations/log_analytics_operations.py deleted file mode 100644 index f9a6ce85c0a9..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/operations/log_analytics_operations.py +++ /dev/null @@ -1,242 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError -from msrest.polling import LROPoller, NoPolling -from msrestazure.polling.arm_polling import ARMPolling - -from .. import models - - -class LogAnalyticsOperations(object): - """LogAnalyticsOperations operations. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: Client Api Version. Constant value: "2018-10-01". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2018-10-01" - - self.config = config - - - def _export_request_rate_by_interval_initial( - self, parameters, location, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.export_request_rate_by_interval.metadata['url'] - path_format_arguments = { - 'location': self._serialize.url("location", location, 'str', pattern=r'^[-\w\._]+$'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(parameters, 'RequestRateByIntervalInput') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('LogAnalyticsOperationResult', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def export_request_rate_by_interval( - self, parameters, location, custom_headers=None, raw=False, polling=True, **operation_config): - """Export logs that show Api requests made by this subscription in the - given time window to show throttling activities. - - :param parameters: Parameters supplied to the LogAnalytics - getRequestRateByInterval Api. - :type parameters: - ~azure.mgmt.compute.v2018_10_01.models.RequestRateByIntervalInput - :param location: The location upon which virtual-machine-sizes is - queried. - :type location: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns - LogAnalyticsOperationResult or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2018_10_01.models.LogAnalyticsOperationResult] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2018_10_01.models.LogAnalyticsOperationResult]] - :raises: :class:`CloudError` - """ - raw_result = self._export_request_rate_by_interval_initial( - parameters=parameters, - location=location, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('LogAnalyticsOperationResult', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - export_request_rate_by_interval.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/logAnalytics/apiAccess/getRequestRateByInterval'} - - - def _export_throttled_requests_initial( - self, parameters, location, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.export_throttled_requests.metadata['url'] - path_format_arguments = { - 'location': self._serialize.url("location", location, 'str', pattern=r'^[-\w\._]+$'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(parameters, 'ThrottledRequestsInput') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('LogAnalyticsOperationResult', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def export_throttled_requests( - self, parameters, location, custom_headers=None, raw=False, polling=True, **operation_config): - """Export logs that show total throttled Api requests for this - subscription in the given time window. - - :param parameters: Parameters supplied to the LogAnalytics - getThrottledRequests Api. - :type parameters: - ~azure.mgmt.compute.v2018_10_01.models.ThrottledRequestsInput - :param location: The location upon which virtual-machine-sizes is - queried. - :type location: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns - LogAnalyticsOperationResult or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2018_10_01.models.LogAnalyticsOperationResult] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2018_10_01.models.LogAnalyticsOperationResult]] - :raises: :class:`CloudError` - """ - raw_result = self._export_throttled_requests_initial( - parameters=parameters, - location=location, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('LogAnalyticsOperationResult', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - export_throttled_requests.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/logAnalytics/apiAccess/getThrottledRequests'} diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/operations/operations.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/operations/operations.py deleted file mode 100644 index 221365ebd88b..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/operations/operations.py +++ /dev/null @@ -1,98 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError - -from .. import models - - -class Operations(object): - """Operations operations. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: Client Api Version. Constant value: "2018-10-01". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2018-10-01" - - self.config = config - - def list( - self, custom_headers=None, raw=False, **operation_config): - """Gets a list of compute operations. - - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of ComputeOperationValue - :rtype: - ~azure.mgmt.compute.v2018_10_01.models.ComputeOperationValuePaged[~azure.mgmt.compute.v2018_10_01.models.ComputeOperationValue] - :raises: :class:`CloudError` - """ - def internal_paging(next_link=None, raw=False): - - if not next_link: - # Construct URL - url = self.list.metadata['url'] - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - deserialized = models.ComputeOperationValuePaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.ComputeOperationValuePaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - list.metadata = {'url': '/providers/Microsoft.Compute/operations'} diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/operations/proximity_placement_groups_operations.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/operations/proximity_placement_groups_operations.py deleted file mode 100644 index f114d7a0b2ba..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/operations/proximity_placement_groups_operations.py +++ /dev/null @@ -1,430 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError - -from .. import models - - -class ProximityPlacementGroupsOperations(object): - """ProximityPlacementGroupsOperations operations. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: Client Api Version. Constant value: "2018-10-01". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2018-10-01" - - self.config = config - - def create_or_update( - self, resource_group_name, proximity_placement_group_name, parameters, custom_headers=None, raw=False, **operation_config): - """Create or update a proximity placement group. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param proximity_placement_group_name: The name of the proximity - placement group. - :type proximity_placement_group_name: str - :param parameters: Parameters supplied to the Create Proximity - Placement Group operation. - :type parameters: - ~azure.mgmt.compute.v2018_10_01.models.ProximityPlacementGroup - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: ProximityPlacementGroup or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.compute.v2018_10_01.models.ProximityPlacementGroup - or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.create_or_update.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'proximityPlacementGroupName': self._serialize.url("proximity_placement_group_name", proximity_placement_group_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(parameters, 'ProximityPlacementGroup') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 201]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('ProximityPlacementGroup', response) - if response.status_code == 201: - deserialized = self._deserialize('ProximityPlacementGroup', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/proximityPlacementGroups/{proximityPlacementGroupName}'} - - def update( - self, resource_group_name, proximity_placement_group_name, tags=None, custom_headers=None, raw=False, **operation_config): - """Update a proximity placement group. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param proximity_placement_group_name: The name of the proximity - placement group. - :type proximity_placement_group_name: str - :param tags: Resource tags - :type tags: dict[str, str] - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: ProximityPlacementGroup or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.compute.v2018_10_01.models.ProximityPlacementGroup - or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - parameters = models.ProximityPlacementGroupUpdate(tags=tags) - - # Construct URL - url = self.update.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'proximityPlacementGroupName': self._serialize.url("proximity_placement_group_name", proximity_placement_group_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(parameters, 'ProximityPlacementGroupUpdate') - - # Construct and send request - request = self._client.patch(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('ProximityPlacementGroup', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/proximityPlacementGroups/{proximityPlacementGroupName}'} - - def delete( - self, resource_group_name, proximity_placement_group_name, custom_headers=None, raw=False, **operation_config): - """Delete a proximity placement group. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param proximity_placement_group_name: The name of the proximity - placement group. - :type proximity_placement_group_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.delete.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'proximityPlacementGroupName': self._serialize.url("proximity_placement_group_name", proximity_placement_group_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/proximityPlacementGroups/{proximityPlacementGroupName}'} - - def get( - self, resource_group_name, proximity_placement_group_name, custom_headers=None, raw=False, **operation_config): - """Retrieves information about a proximity placement group . - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param proximity_placement_group_name: The name of the proximity - placement group. - :type proximity_placement_group_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: ProximityPlacementGroup or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.compute.v2018_10_01.models.ProximityPlacementGroup - or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'proximityPlacementGroupName': self._serialize.url("proximity_placement_group_name", proximity_placement_group_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('ProximityPlacementGroup', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/proximityPlacementGroups/{proximityPlacementGroupName}'} - - def list_by_subscription( - self, custom_headers=None, raw=False, **operation_config): - """Lists all proximity placement groups in a subscription. - - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of ProximityPlacementGroup - :rtype: - ~azure.mgmt.compute.v2018_10_01.models.ProximityPlacementGroupPaged[~azure.mgmt.compute.v2018_10_01.models.ProximityPlacementGroup] - :raises: :class:`CloudError` - """ - def internal_paging(next_link=None, raw=False): - - if not next_link: - # Construct URL - url = self.list_by_subscription.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - deserialized = models.ProximityPlacementGroupPaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.ProximityPlacementGroupPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - list_by_subscription.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Compute/proximityPlacementGroups'} - - def list_by_resource_group( - self, resource_group_name, custom_headers=None, raw=False, **operation_config): - """Lists all proximity placement groups in a resource group. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of ProximityPlacementGroup - :rtype: - ~azure.mgmt.compute.v2018_10_01.models.ProximityPlacementGroupPaged[~azure.mgmt.compute.v2018_10_01.models.ProximityPlacementGroup] - :raises: :class:`CloudError` - """ - def internal_paging(next_link=None, raw=False): - - if not next_link: - # Construct URL - url = self.list_by_resource_group.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - deserialized = models.ProximityPlacementGroupPaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.ProximityPlacementGroupPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/proximityPlacementGroups'} diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/operations/usage_operations.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/operations/usage_operations.py deleted file mode 100644 index 6be160e988ba..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/operations/usage_operations.py +++ /dev/null @@ -1,107 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError - -from .. import models - - -class UsageOperations(object): - """UsageOperations operations. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: Client Api Version. Constant value: "2018-10-01". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2018-10-01" - - self.config = config - - def list( - self, location, custom_headers=None, raw=False, **operation_config): - """Gets, for the specified location, the current compute resource usage - information as well as the limits for compute resources under the - subscription. - - :param location: The location for which resource usage is queried. - :type location: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of Usage - :rtype: - ~azure.mgmt.compute.v2018_10_01.models.UsagePaged[~azure.mgmt.compute.v2018_10_01.models.Usage] - :raises: :class:`CloudError` - """ - def internal_paging(next_link=None, raw=False): - - if not next_link: - # Construct URL - url = self.list.metadata['url'] - path_format_arguments = { - 'location': self._serialize.url("location", location, 'str', pattern=r'^[-\w\._]+$'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - deserialized = models.UsagePaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.UsagePaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/usages'} diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/operations/virtual_machine_extension_images_operations.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/operations/virtual_machine_extension_images_operations.py deleted file mode 100644 index 6f64e21be833..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/operations/virtual_machine_extension_images_operations.py +++ /dev/null @@ -1,248 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError - -from .. import models - - -class VirtualMachineExtensionImagesOperations(object): - """VirtualMachineExtensionImagesOperations operations. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: Client Api Version. Constant value: "2018-10-01". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2018-10-01" - - self.config = config - - def get( - self, location, publisher_name, type, version, custom_headers=None, raw=False, **operation_config): - """Gets a virtual machine extension image. - - :param location: The name of a supported Azure region. - :type location: str - :param publisher_name: - :type publisher_name: str - :param type: - :type type: str - :param version: - :type version: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: VirtualMachineExtensionImage or ClientRawResponse if raw=true - :rtype: - ~azure.mgmt.compute.v2018_10_01.models.VirtualMachineExtensionImage or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get.metadata['url'] - path_format_arguments = { - 'location': self._serialize.url("location", location, 'str'), - 'publisherName': self._serialize.url("publisher_name", publisher_name, 'str'), - 'type': self._serialize.url("type", type, 'str'), - 'version': self._serialize.url("version", version, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('VirtualMachineExtensionImage', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/publishers/{publisherName}/artifacttypes/vmextension/types/{type}/versions/{version}'} - - def list_types( - self, location, publisher_name, custom_headers=None, raw=False, **operation_config): - """Gets a list of virtual machine extension image types. - - :param location: The name of a supported Azure region. - :type location: str - :param publisher_name: - :type publisher_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: list or ClientRawResponse if raw=true - :rtype: - list[~azure.mgmt.compute.v2018_10_01.models.VirtualMachineExtensionImage] - or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.list_types.metadata['url'] - path_format_arguments = { - 'location': self._serialize.url("location", location, 'str'), - 'publisherName': self._serialize.url("publisher_name", publisher_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('[VirtualMachineExtensionImage]', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - list_types.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/publishers/{publisherName}/artifacttypes/vmextension/types'} - - def list_versions( - self, location, publisher_name, type, filter=None, top=None, orderby=None, custom_headers=None, raw=False, **operation_config): - """Gets a list of virtual machine extension image versions. - - :param location: The name of a supported Azure region. - :type location: str - :param publisher_name: - :type publisher_name: str - :param type: - :type type: str - :param filter: The filter to apply on the operation. - :type filter: str - :param top: - :type top: int - :param orderby: - :type orderby: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: list or ClientRawResponse if raw=true - :rtype: - list[~azure.mgmt.compute.v2018_10_01.models.VirtualMachineExtensionImage] - or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.list_versions.metadata['url'] - path_format_arguments = { - 'location': self._serialize.url("location", location, 'str'), - 'publisherName': self._serialize.url("publisher_name", publisher_name, 'str'), - 'type': self._serialize.url("type", type, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - if filter is not None: - query_parameters['$filter'] = self._serialize.query("filter", filter, 'str') - if top is not None: - query_parameters['$top'] = self._serialize.query("top", top, 'int') - if orderby is not None: - query_parameters['$orderby'] = self._serialize.query("orderby", orderby, 'str') - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('[VirtualMachineExtensionImage]', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - list_versions.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/publishers/{publisherName}/artifacttypes/vmextension/types/{type}/versions'} diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/operations/virtual_machine_extensions_operations.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/operations/virtual_machine_extensions_operations.py deleted file mode 100644 index 79399d26fe53..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/operations/virtual_machine_extensions_operations.py +++ /dev/null @@ -1,479 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError -from msrest.polling import LROPoller, NoPolling -from msrestazure.polling.arm_polling import ARMPolling - -from .. import models - - -class VirtualMachineExtensionsOperations(object): - """VirtualMachineExtensionsOperations operations. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: Client Api Version. Constant value: "2018-10-01". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2018-10-01" - - self.config = config - - - def _create_or_update_initial( - self, resource_group_name, vm_name, vm_extension_name, extension_parameters, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.create_or_update.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'vmName': self._serialize.url("vm_name", vm_name, 'str'), - 'vmExtensionName': self._serialize.url("vm_extension_name", vm_extension_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(extension_parameters, 'VirtualMachineExtension') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 201]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('VirtualMachineExtension', response) - if response.status_code == 201: - deserialized = self._deserialize('VirtualMachineExtension', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def create_or_update( - self, resource_group_name, vm_name, vm_extension_name, extension_parameters, custom_headers=None, raw=False, polling=True, **operation_config): - """The operation to create or update the extension. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param vm_name: The name of the virtual machine where the extension - should be created or updated. - :type vm_name: str - :param vm_extension_name: The name of the virtual machine extension. - :type vm_extension_name: str - :param extension_parameters: Parameters supplied to the Create Virtual - Machine Extension operation. - :type extension_parameters: - ~azure.mgmt.compute.v2018_10_01.models.VirtualMachineExtension - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns VirtualMachineExtension - or ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2018_10_01.models.VirtualMachineExtension] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2018_10_01.models.VirtualMachineExtension]] - :raises: :class:`CloudError` - """ - raw_result = self._create_or_update_initial( - resource_group_name=resource_group_name, - vm_name=vm_name, - vm_extension_name=vm_extension_name, - extension_parameters=extension_parameters, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('VirtualMachineExtension', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/extensions/{vmExtensionName}'} - - - def _update_initial( - self, resource_group_name, vm_name, vm_extension_name, extension_parameters, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.update.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'vmName': self._serialize.url("vm_name", vm_name, 'str'), - 'vmExtensionName': self._serialize.url("vm_extension_name", vm_extension_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(extension_parameters, 'VirtualMachineExtensionUpdate') - - # Construct and send request - request = self._client.patch(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('VirtualMachineExtension', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def update( - self, resource_group_name, vm_name, vm_extension_name, extension_parameters, custom_headers=None, raw=False, polling=True, **operation_config): - """The operation to update the extension. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param vm_name: The name of the virtual machine where the extension - should be updated. - :type vm_name: str - :param vm_extension_name: The name of the virtual machine extension. - :type vm_extension_name: str - :param extension_parameters: Parameters supplied to the Update Virtual - Machine Extension operation. - :type extension_parameters: - ~azure.mgmt.compute.v2018_10_01.models.VirtualMachineExtensionUpdate - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns VirtualMachineExtension - or ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2018_10_01.models.VirtualMachineExtension] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2018_10_01.models.VirtualMachineExtension]] - :raises: :class:`CloudError` - """ - raw_result = self._update_initial( - resource_group_name=resource_group_name, - vm_name=vm_name, - vm_extension_name=vm_extension_name, - extension_parameters=extension_parameters, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('VirtualMachineExtension', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/extensions/{vmExtensionName}'} - - - def _delete_initial( - self, resource_group_name, vm_name, vm_extension_name, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.delete.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'vmName': self._serialize.url("vm_name", vm_name, 'str'), - 'vmExtensionName': self._serialize.url("vm_extension_name", vm_extension_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202, 204]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - def delete( - self, resource_group_name, vm_name, vm_extension_name, custom_headers=None, raw=False, polling=True, **operation_config): - """The operation to delete the extension. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param vm_name: The name of the virtual machine where the extension - should be deleted. - :type vm_name: str - :param vm_extension_name: The name of the virtual machine extension. - :type vm_extension_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns None or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] - :raises: :class:`CloudError` - """ - raw_result = self._delete_initial( - resource_group_name=resource_group_name, - vm_name=vm_name, - vm_extension_name=vm_extension_name, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/extensions/{vmExtensionName}'} - - def get( - self, resource_group_name, vm_name, vm_extension_name, expand=None, custom_headers=None, raw=False, **operation_config): - """The operation to get the extension. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param vm_name: The name of the virtual machine containing the - extension. - :type vm_name: str - :param vm_extension_name: The name of the virtual machine extension. - :type vm_extension_name: str - :param expand: The expand expression to apply on the operation. - :type expand: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: VirtualMachineExtension or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.compute.v2018_10_01.models.VirtualMachineExtension - or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'vmName': self._serialize.url("vm_name", vm_name, 'str'), - 'vmExtensionName': self._serialize.url("vm_extension_name", vm_extension_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - if expand is not None: - query_parameters['$expand'] = self._serialize.query("expand", expand, 'str') - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('VirtualMachineExtension', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/extensions/{vmExtensionName}'} - - def list( - self, resource_group_name, vm_name, expand=None, custom_headers=None, raw=False, **operation_config): - """The operation to get all extensions of a Virtual Machine. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param vm_name: The name of the virtual machine containing the - extension. - :type vm_name: str - :param expand: The expand expression to apply on the operation. - :type expand: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: VirtualMachineExtensionsListResult or ClientRawResponse if - raw=true - :rtype: - ~azure.mgmt.compute.v2018_10_01.models.VirtualMachineExtensionsListResult - or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.list.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'vmName': self._serialize.url("vm_name", vm_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - if expand is not None: - query_parameters['$expand'] = self._serialize.query("expand", expand, 'str') - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('VirtualMachineExtensionsListResult', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/extensions'} diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/operations/virtual_machine_images_operations.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/operations/virtual_machine_images_operations.py deleted file mode 100644 index 5e79b774c90e..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/operations/virtual_machine_images_operations.py +++ /dev/null @@ -1,383 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError - -from .. import models - - -class VirtualMachineImagesOperations(object): - """VirtualMachineImagesOperations operations. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: Client Api Version. Constant value: "2018-10-01". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2018-10-01" - - self.config = config - - def get( - self, location, publisher_name, offer, skus, version, custom_headers=None, raw=False, **operation_config): - """Gets a virtual machine image. - - :param location: The name of a supported Azure region. - :type location: str - :param publisher_name: A valid image publisher. - :type publisher_name: str - :param offer: A valid image publisher offer. - :type offer: str - :param skus: A valid image SKU. - :type skus: str - :param version: A valid image SKU version. - :type version: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: VirtualMachineImage or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.compute.v2018_10_01.models.VirtualMachineImage or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get.metadata['url'] - path_format_arguments = { - 'location': self._serialize.url("location", location, 'str'), - 'publisherName': self._serialize.url("publisher_name", publisher_name, 'str'), - 'offer': self._serialize.url("offer", offer, 'str'), - 'skus': self._serialize.url("skus", skus, 'str'), - 'version': self._serialize.url("version", version, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('VirtualMachineImage', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/publishers/{publisherName}/artifacttypes/vmimage/offers/{offer}/skus/{skus}/versions/{version}'} - - def list( - self, location, publisher_name, offer, skus, filter=None, top=None, orderby=None, custom_headers=None, raw=False, **operation_config): - """Gets a list of all virtual machine image versions for the specified - location, publisher, offer, and SKU. - - :param location: The name of a supported Azure region. - :type location: str - :param publisher_name: A valid image publisher. - :type publisher_name: str - :param offer: A valid image publisher offer. - :type offer: str - :param skus: A valid image SKU. - :type skus: str - :param filter: The filter to apply on the operation. - :type filter: str - :param top: - :type top: int - :param orderby: - :type orderby: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: list or ClientRawResponse if raw=true - :rtype: - list[~azure.mgmt.compute.v2018_10_01.models.VirtualMachineImageResource] - or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.list.metadata['url'] - path_format_arguments = { - 'location': self._serialize.url("location", location, 'str'), - 'publisherName': self._serialize.url("publisher_name", publisher_name, 'str'), - 'offer': self._serialize.url("offer", offer, 'str'), - 'skus': self._serialize.url("skus", skus, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - if filter is not None: - query_parameters['$filter'] = self._serialize.query("filter", filter, 'str') - if top is not None: - query_parameters['$top'] = self._serialize.query("top", top, 'int') - if orderby is not None: - query_parameters['$orderby'] = self._serialize.query("orderby", orderby, 'str') - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('[VirtualMachineImageResource]', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/publishers/{publisherName}/artifacttypes/vmimage/offers/{offer}/skus/{skus}/versions'} - - def list_offers( - self, location, publisher_name, custom_headers=None, raw=False, **operation_config): - """Gets a list of virtual machine image offers for the specified location - and publisher. - - :param location: The name of a supported Azure region. - :type location: str - :param publisher_name: A valid image publisher. - :type publisher_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: list or ClientRawResponse if raw=true - :rtype: - list[~azure.mgmt.compute.v2018_10_01.models.VirtualMachineImageResource] - or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.list_offers.metadata['url'] - path_format_arguments = { - 'location': self._serialize.url("location", location, 'str'), - 'publisherName': self._serialize.url("publisher_name", publisher_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('[VirtualMachineImageResource]', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - list_offers.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/publishers/{publisherName}/artifacttypes/vmimage/offers'} - - def list_publishers( - self, location, custom_headers=None, raw=False, **operation_config): - """Gets a list of virtual machine image publishers for the specified Azure - location. - - :param location: The name of a supported Azure region. - :type location: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: list or ClientRawResponse if raw=true - :rtype: - list[~azure.mgmt.compute.v2018_10_01.models.VirtualMachineImageResource] - or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.list_publishers.metadata['url'] - path_format_arguments = { - 'location': self._serialize.url("location", location, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('[VirtualMachineImageResource]', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - list_publishers.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/publishers'} - - def list_skus( - self, location, publisher_name, offer, custom_headers=None, raw=False, **operation_config): - """Gets a list of virtual machine image SKUs for the specified location, - publisher, and offer. - - :param location: The name of a supported Azure region. - :type location: str - :param publisher_name: A valid image publisher. - :type publisher_name: str - :param offer: A valid image publisher offer. - :type offer: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: list or ClientRawResponse if raw=true - :rtype: - list[~azure.mgmt.compute.v2018_10_01.models.VirtualMachineImageResource] - or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.list_skus.metadata['url'] - path_format_arguments = { - 'location': self._serialize.url("location", location, 'str'), - 'publisherName': self._serialize.url("publisher_name", publisher_name, 'str'), - 'offer': self._serialize.url("offer", offer, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('[VirtualMachineImageResource]', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - list_skus.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/publishers/{publisherName}/artifacttypes/vmimage/offers/{offer}/skus'} diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/operations/virtual_machine_run_commands_operations.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/operations/virtual_machine_run_commands_operations.py deleted file mode 100644 index 506264ff88d9..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/operations/virtual_machine_run_commands_operations.py +++ /dev/null @@ -1,167 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError - -from .. import models - - -class VirtualMachineRunCommandsOperations(object): - """VirtualMachineRunCommandsOperations operations. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: Client Api Version. Constant value: "2018-10-01". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2018-10-01" - - self.config = config - - def list( - self, location, custom_headers=None, raw=False, **operation_config): - """Lists all available run commands for a subscription in a location. - - :param location: The location upon which run commands is queried. - :type location: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of RunCommandDocumentBase - :rtype: - ~azure.mgmt.compute.v2018_10_01.models.RunCommandDocumentBasePaged[~azure.mgmt.compute.v2018_10_01.models.RunCommandDocumentBase] - :raises: :class:`CloudError` - """ - def internal_paging(next_link=None, raw=False): - - if not next_link: - # Construct URL - url = self.list.metadata['url'] - path_format_arguments = { - 'location': self._serialize.url("location", location, 'str', pattern=r'^[-\w\._]+$'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - deserialized = models.RunCommandDocumentBasePaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.RunCommandDocumentBasePaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/runCommands'} - - def get( - self, location, command_id, custom_headers=None, raw=False, **operation_config): - """Gets specific run command for a subscription in a location. - - :param location: The location upon which run commands is queried. - :type location: str - :param command_id: The command id. - :type command_id: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: RunCommandDocument or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.compute.v2018_10_01.models.RunCommandDocument or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get.metadata['url'] - path_format_arguments = { - 'location': self._serialize.url("location", location, 'str', pattern=r'^[-\w\._]+$'), - 'commandId': self._serialize.url("command_id", command_id, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('RunCommandDocument', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/runCommands/{commandId}'} diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/operations/virtual_machine_scale_set_extensions_operations.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/operations/virtual_machine_scale_set_extensions_operations.py deleted file mode 100644 index 421713e2d4c5..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/operations/virtual_machine_scale_set_extensions_operations.py +++ /dev/null @@ -1,377 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError -from msrest.polling import LROPoller, NoPolling -from msrestazure.polling.arm_polling import ARMPolling - -from .. import models - - -class VirtualMachineScaleSetExtensionsOperations(object): - """VirtualMachineScaleSetExtensionsOperations operations. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: Client Api Version. Constant value: "2018-10-01". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2018-10-01" - - self.config = config - - - def _create_or_update_initial( - self, resource_group_name, vm_scale_set_name, vmss_extension_name, extension_parameters, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.create_or_update.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), - 'vmssExtensionName': self._serialize.url("vmss_extension_name", vmss_extension_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(extension_parameters, 'VirtualMachineScaleSetExtension') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 201]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('VirtualMachineScaleSetExtension', response) - if response.status_code == 201: - deserialized = self._deserialize('VirtualMachineScaleSetExtension', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def create_or_update( - self, resource_group_name, vm_scale_set_name, vmss_extension_name, extension_parameters, custom_headers=None, raw=False, polling=True, **operation_config): - """The operation to create or update an extension. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param vm_scale_set_name: The name of the VM scale set where the - extension should be create or updated. - :type vm_scale_set_name: str - :param vmss_extension_name: The name of the VM scale set extension. - :type vmss_extension_name: str - :param extension_parameters: Parameters supplied to the Create VM - scale set Extension operation. - :type extension_parameters: - ~azure.mgmt.compute.v2018_10_01.models.VirtualMachineScaleSetExtension - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns - VirtualMachineScaleSetExtension or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2018_10_01.models.VirtualMachineScaleSetExtension] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2018_10_01.models.VirtualMachineScaleSetExtension]] - :raises: :class:`CloudError` - """ - raw_result = self._create_or_update_initial( - resource_group_name=resource_group_name, - vm_scale_set_name=vm_scale_set_name, - vmss_extension_name=vmss_extension_name, - extension_parameters=extension_parameters, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('VirtualMachineScaleSetExtension', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/extensions/{vmssExtensionName}'} - - - def _delete_initial( - self, resource_group_name, vm_scale_set_name, vmss_extension_name, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.delete.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), - 'vmssExtensionName': self._serialize.url("vmss_extension_name", vmss_extension_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202, 204]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - def delete( - self, resource_group_name, vm_scale_set_name, vmss_extension_name, custom_headers=None, raw=False, polling=True, **operation_config): - """The operation to delete the extension. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param vm_scale_set_name: The name of the VM scale set where the - extension should be deleted. - :type vm_scale_set_name: str - :param vmss_extension_name: The name of the VM scale set extension. - :type vmss_extension_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns None or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] - :raises: :class:`CloudError` - """ - raw_result = self._delete_initial( - resource_group_name=resource_group_name, - vm_scale_set_name=vm_scale_set_name, - vmss_extension_name=vmss_extension_name, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/extensions/{vmssExtensionName}'} - - def get( - self, resource_group_name, vm_scale_set_name, vmss_extension_name, expand=None, custom_headers=None, raw=False, **operation_config): - """The operation to get the extension. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param vm_scale_set_name: The name of the VM scale set containing the - extension. - :type vm_scale_set_name: str - :param vmss_extension_name: The name of the VM scale set extension. - :type vmss_extension_name: str - :param expand: The expand expression to apply on the operation. - :type expand: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: VirtualMachineScaleSetExtension or ClientRawResponse if - raw=true - :rtype: - ~azure.mgmt.compute.v2018_10_01.models.VirtualMachineScaleSetExtension - or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), - 'vmssExtensionName': self._serialize.url("vmss_extension_name", vmss_extension_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - if expand is not None: - query_parameters['$expand'] = self._serialize.query("expand", expand, 'str') - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('VirtualMachineScaleSetExtension', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/extensions/{vmssExtensionName}'} - - def list( - self, resource_group_name, vm_scale_set_name, custom_headers=None, raw=False, **operation_config): - """Gets a list of all extensions in a VM scale set. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param vm_scale_set_name: The name of the VM scale set containing the - extension. - :type vm_scale_set_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of VirtualMachineScaleSetExtension - :rtype: - ~azure.mgmt.compute.v2018_10_01.models.VirtualMachineScaleSetExtensionPaged[~azure.mgmt.compute.v2018_10_01.models.VirtualMachineScaleSetExtension] - :raises: :class:`CloudError` - """ - def internal_paging(next_link=None, raw=False): - - if not next_link: - # Construct URL - url = self.list.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - deserialized = models.VirtualMachineScaleSetExtensionPaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.VirtualMachineScaleSetExtensionPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/extensions'} diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/operations/virtual_machine_scale_set_rolling_upgrades_operations.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/operations/virtual_machine_scale_set_rolling_upgrades_operations.py deleted file mode 100644 index 9f7d82a51d23..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/operations/virtual_machine_scale_set_rolling_upgrades_operations.py +++ /dev/null @@ -1,347 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError -from msrest.polling import LROPoller, NoPolling -from msrestazure.polling.arm_polling import ARMPolling - -from .. import models - - -class VirtualMachineScaleSetRollingUpgradesOperations(object): - """VirtualMachineScaleSetRollingUpgradesOperations operations. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: Client Api Version. Constant value: "2018-10-01". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2018-10-01" - - self.config = config - - - def _cancel_initial( - self, resource_group_name, vm_scale_set_name, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.cancel.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - def cancel( - self, resource_group_name, vm_scale_set_name, custom_headers=None, raw=False, polling=True, **operation_config): - """Cancels the current virtual machine scale set rolling upgrade. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param vm_scale_set_name: The name of the VM scale set. - :type vm_scale_set_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns None or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] - :raises: :class:`CloudError` - """ - raw_result = self._cancel_initial( - resource_group_name=resource_group_name, - vm_scale_set_name=vm_scale_set_name, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - cancel.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/rollingUpgrades/cancel'} - - - def _start_os_upgrade_initial( - self, resource_group_name, vm_scale_set_name, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.start_os_upgrade.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - def start_os_upgrade( - self, resource_group_name, vm_scale_set_name, custom_headers=None, raw=False, polling=True, **operation_config): - """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. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param vm_scale_set_name: The name of the VM scale set. - :type vm_scale_set_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns None or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] - :raises: :class:`CloudError` - """ - raw_result = self._start_os_upgrade_initial( - resource_group_name=resource_group_name, - vm_scale_set_name=vm_scale_set_name, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - start_os_upgrade.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/osRollingUpgrade'} - - - def _start_extension_upgrade_initial( - self, resource_group_name, vm_scale_set_name, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.start_extension_upgrade.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - def start_extension_upgrade( - self, resource_group_name, vm_scale_set_name, custom_headers=None, raw=False, polling=True, **operation_config): - """Starts a rolling upgrade to move all extensions for all virtual machine - scale set instances to the latest available extension version. - Instances which are already running the latest extension versions are - not affected. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param vm_scale_set_name: The name of the VM scale set. - :type vm_scale_set_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns None or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] - :raises: :class:`CloudError` - """ - raw_result = self._start_extension_upgrade_initial( - resource_group_name=resource_group_name, - vm_scale_set_name=vm_scale_set_name, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - start_extension_upgrade.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/extensionRollingUpgrade'} - - def get_latest( - self, resource_group_name, vm_scale_set_name, custom_headers=None, raw=False, **operation_config): - """Gets the status of the latest virtual machine scale set rolling - upgrade. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param vm_scale_set_name: The name of the VM scale set. - :type vm_scale_set_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: RollingUpgradeStatusInfo or ClientRawResponse if raw=true - :rtype: - ~azure.mgmt.compute.v2018_10_01.models.RollingUpgradeStatusInfo or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get_latest.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('RollingUpgradeStatusInfo', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_latest.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/rollingUpgrades/latest'} diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/operations/virtual_machine_scale_set_vms_operations.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/operations/virtual_machine_scale_set_vms_operations.py deleted file mode 100644 index 82f402aa71fa..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/operations/virtual_machine_scale_set_vms_operations.py +++ /dev/null @@ -1,1241 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError -from msrest.polling import LROPoller, NoPolling -from msrestazure.polling.arm_polling import ARMPolling - -from .. import models - - -class VirtualMachineScaleSetVMsOperations(object): - """VirtualMachineScaleSetVMsOperations operations. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: Client Api Version. Constant value: "2018-10-01". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2018-10-01" - - self.config = config - - - def _reimage_initial( - self, resource_group_name, vm_scale_set_name, instance_id, temp_disk=None, custom_headers=None, raw=False, **operation_config): - vm_scale_set_vm_reimage_input = None - if temp_disk is not None: - vm_scale_set_vm_reimage_input = models.VirtualMachineScaleSetVMReimageParameters(temp_disk=temp_disk) - - # Construct URL - url = self.reimage.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), - 'instanceId': self._serialize.url("instance_id", instance_id, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - if vm_scale_set_vm_reimage_input is not None: - body_content = self._serialize.body(vm_scale_set_vm_reimage_input, 'VirtualMachineScaleSetVMReimageParameters') - else: - body_content = None - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - def reimage( - self, resource_group_name, vm_scale_set_name, instance_id, temp_disk=None, custom_headers=None, raw=False, polling=True, **operation_config): - """Reimages (upgrade the operating system) a specific virtual machine in a - VM scale set. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param vm_scale_set_name: The name of the VM scale set. - :type vm_scale_set_name: str - :param instance_id: The instance ID of the virtual machine. - :type instance_id: str - :param temp_disk: Specifies whether to reimage temp disk. Default - value: false. - :type temp_disk: bool - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns None or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] - :raises: :class:`CloudError` - """ - raw_result = self._reimage_initial( - resource_group_name=resource_group_name, - vm_scale_set_name=vm_scale_set_name, - instance_id=instance_id, - temp_disk=temp_disk, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - reimage.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/virtualmachines/{instanceId}/reimage'} - - - def _reimage_all_initial( - self, resource_group_name, vm_scale_set_name, instance_id, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.reimage_all.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), - 'instanceId': self._serialize.url("instance_id", instance_id, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - def reimage_all( - self, resource_group_name, vm_scale_set_name, instance_id, custom_headers=None, raw=False, polling=True, **operation_config): - """Allows you to re-image all the disks ( including data disks ) in the a - VM scale set instance. This operation is only supported for managed - disks. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param vm_scale_set_name: The name of the VM scale set. - :type vm_scale_set_name: str - :param instance_id: The instance ID of the virtual machine. - :type instance_id: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns None or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] - :raises: :class:`CloudError` - """ - raw_result = self._reimage_all_initial( - resource_group_name=resource_group_name, - vm_scale_set_name=vm_scale_set_name, - instance_id=instance_id, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - reimage_all.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/virtualmachines/{instanceId}/reimageall'} - - - def _deallocate_initial( - self, resource_group_name, vm_scale_set_name, instance_id, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.deallocate.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), - 'instanceId': self._serialize.url("instance_id", instance_id, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - def deallocate( - self, resource_group_name, vm_scale_set_name, instance_id, custom_headers=None, raw=False, polling=True, **operation_config): - """Deallocates a specific virtual machine in a VM scale set. Shuts down - the virtual machine and releases the compute resources it uses. You are - not billed for the compute resources of this virtual machine once it is - deallocated. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param vm_scale_set_name: The name of the VM scale set. - :type vm_scale_set_name: str - :param instance_id: The instance ID of the virtual machine. - :type instance_id: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns None or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] - :raises: :class:`CloudError` - """ - raw_result = self._deallocate_initial( - resource_group_name=resource_group_name, - vm_scale_set_name=vm_scale_set_name, - instance_id=instance_id, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - deallocate.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/virtualmachines/{instanceId}/deallocate'} - - - def _update_initial( - self, resource_group_name, vm_scale_set_name, instance_id, parameters, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.update.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), - 'instanceId': self._serialize.url("instance_id", instance_id, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(parameters, 'VirtualMachineScaleSetVM') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('VirtualMachineScaleSetVM', response) - if response.status_code == 202: - deserialized = self._deserialize('VirtualMachineScaleSetVM', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def update( - self, resource_group_name, vm_scale_set_name, instance_id, parameters, custom_headers=None, raw=False, polling=True, **operation_config): - """Updates a virtual machine of a VM scale set. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param vm_scale_set_name: The name of the VM scale set where the - extension should be create or updated. - :type vm_scale_set_name: str - :param instance_id: The instance ID of the virtual machine. - :type instance_id: str - :param parameters: Parameters supplied to the Update Virtual Machine - Scale Sets VM operation. - :type parameters: - ~azure.mgmt.compute.v2018_10_01.models.VirtualMachineScaleSetVM - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns - VirtualMachineScaleSetVM or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2018_10_01.models.VirtualMachineScaleSetVM] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2018_10_01.models.VirtualMachineScaleSetVM]] - :raises: :class:`CloudError` - """ - raw_result = self._update_initial( - resource_group_name=resource_group_name, - vm_scale_set_name=vm_scale_set_name, - instance_id=instance_id, - parameters=parameters, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('VirtualMachineScaleSetVM', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/virtualmachines/{instanceId}'} - - - def _delete_initial( - self, resource_group_name, vm_scale_set_name, instance_id, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.delete.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), - 'instanceId': self._serialize.url("instance_id", instance_id, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202, 204]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - def delete( - self, resource_group_name, vm_scale_set_name, instance_id, custom_headers=None, raw=False, polling=True, **operation_config): - """Deletes a virtual machine from a VM scale set. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param vm_scale_set_name: The name of the VM scale set. - :type vm_scale_set_name: str - :param instance_id: The instance ID of the virtual machine. - :type instance_id: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns None or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] - :raises: :class:`CloudError` - """ - raw_result = self._delete_initial( - resource_group_name=resource_group_name, - vm_scale_set_name=vm_scale_set_name, - instance_id=instance_id, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/virtualmachines/{instanceId}'} - - def get( - self, resource_group_name, vm_scale_set_name, instance_id, custom_headers=None, raw=False, **operation_config): - """Gets a virtual machine from a VM scale set. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param vm_scale_set_name: The name of the VM scale set. - :type vm_scale_set_name: str - :param instance_id: The instance ID of the virtual machine. - :type instance_id: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: VirtualMachineScaleSetVM or ClientRawResponse if raw=true - :rtype: - ~azure.mgmt.compute.v2018_10_01.models.VirtualMachineScaleSetVM or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), - 'instanceId': self._serialize.url("instance_id", instance_id, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('VirtualMachineScaleSetVM', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/virtualmachines/{instanceId}'} - - def get_instance_view( - self, resource_group_name, vm_scale_set_name, instance_id, custom_headers=None, raw=False, **operation_config): - """Gets the status of a virtual machine from a VM scale set. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param vm_scale_set_name: The name of the VM scale set. - :type vm_scale_set_name: str - :param instance_id: The instance ID of the virtual machine. - :type instance_id: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: VirtualMachineScaleSetVMInstanceView or ClientRawResponse if - raw=true - :rtype: - ~azure.mgmt.compute.v2018_10_01.models.VirtualMachineScaleSetVMInstanceView - or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get_instance_view.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), - 'instanceId': self._serialize.url("instance_id", instance_id, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('VirtualMachineScaleSetVMInstanceView', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_instance_view.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/virtualmachines/{instanceId}/instanceView'} - - def list( - self, resource_group_name, virtual_machine_scale_set_name, filter=None, select=None, expand=None, custom_headers=None, raw=False, **operation_config): - """Gets a list of all virtual machines in a VM scale sets. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param virtual_machine_scale_set_name: The name of the VM scale set. - :type virtual_machine_scale_set_name: str - :param filter: The filter to apply to the operation. - :type filter: str - :param select: The list parameters. - :type select: str - :param expand: The expand expression to apply to the operation. - :type expand: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of VirtualMachineScaleSetVM - :rtype: - ~azure.mgmt.compute.v2018_10_01.models.VirtualMachineScaleSetVMPaged[~azure.mgmt.compute.v2018_10_01.models.VirtualMachineScaleSetVM] - :raises: :class:`CloudError` - """ - def internal_paging(next_link=None, raw=False): - - if not next_link: - # Construct URL - url = self.list.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'virtualMachineScaleSetName': self._serialize.url("virtual_machine_scale_set_name", virtual_machine_scale_set_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - if filter is not None: - query_parameters['$filter'] = self._serialize.query("filter", filter, 'str') - if select is not None: - query_parameters['$select'] = self._serialize.query("select", select, 'str') - if expand is not None: - query_parameters['$expand'] = self._serialize.query("expand", expand, 'str') - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - deserialized = models.VirtualMachineScaleSetVMPaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.VirtualMachineScaleSetVMPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{virtualMachineScaleSetName}/virtualMachines'} - - - def _power_off_initial( - self, resource_group_name, vm_scale_set_name, instance_id, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.power_off.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), - 'instanceId': self._serialize.url("instance_id", instance_id, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - def power_off( - self, resource_group_name, vm_scale_set_name, instance_id, custom_headers=None, raw=False, polling=True, **operation_config): - """Power off (stop) a virtual machine in a VM scale set. Note that - resources are still attached and you are getting charged for the - resources. Instead, use deallocate to release resources and avoid - charges. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param vm_scale_set_name: The name of the VM scale set. - :type vm_scale_set_name: str - :param instance_id: The instance ID of the virtual machine. - :type instance_id: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns None or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] - :raises: :class:`CloudError` - """ - raw_result = self._power_off_initial( - resource_group_name=resource_group_name, - vm_scale_set_name=vm_scale_set_name, - instance_id=instance_id, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - power_off.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/virtualmachines/{instanceId}/poweroff'} - - - def _restart_initial( - self, resource_group_name, vm_scale_set_name, instance_id, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.restart.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), - 'instanceId': self._serialize.url("instance_id", instance_id, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - def restart( - self, resource_group_name, vm_scale_set_name, instance_id, custom_headers=None, raw=False, polling=True, **operation_config): - """Restarts a virtual machine in a VM scale set. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param vm_scale_set_name: The name of the VM scale set. - :type vm_scale_set_name: str - :param instance_id: The instance ID of the virtual machine. - :type instance_id: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns None or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] - :raises: :class:`CloudError` - """ - raw_result = self._restart_initial( - resource_group_name=resource_group_name, - vm_scale_set_name=vm_scale_set_name, - instance_id=instance_id, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - restart.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/virtualmachines/{instanceId}/restart'} - - - def _start_initial( - self, resource_group_name, vm_scale_set_name, instance_id, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.start.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), - 'instanceId': self._serialize.url("instance_id", instance_id, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - def start( - self, resource_group_name, vm_scale_set_name, instance_id, custom_headers=None, raw=False, polling=True, **operation_config): - """Starts a virtual machine in a VM scale set. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param vm_scale_set_name: The name of the VM scale set. - :type vm_scale_set_name: str - :param instance_id: The instance ID of the virtual machine. - :type instance_id: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns None or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] - :raises: :class:`CloudError` - """ - raw_result = self._start_initial( - resource_group_name=resource_group_name, - vm_scale_set_name=vm_scale_set_name, - instance_id=instance_id, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - start.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/virtualmachines/{instanceId}/start'} - - - def _redeploy_initial( - self, resource_group_name, vm_scale_set_name, instance_id, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.redeploy.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), - 'instanceId': self._serialize.url("instance_id", instance_id, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - def redeploy( - self, resource_group_name, vm_scale_set_name, instance_id, custom_headers=None, raw=False, polling=True, **operation_config): - """Redeploys a virtual machine in a VM scale set. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param vm_scale_set_name: The name of the VM scale set. - :type vm_scale_set_name: str - :param instance_id: The instance ID of the virtual machine. - :type instance_id: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns None or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] - :raises: :class:`CloudError` - """ - raw_result = self._redeploy_initial( - resource_group_name=resource_group_name, - vm_scale_set_name=vm_scale_set_name, - instance_id=instance_id, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - redeploy.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/virtualmachines/{instanceId}/redeploy'} - - - def _perform_maintenance_initial( - self, resource_group_name, vm_scale_set_name, instance_id, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.perform_maintenance.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), - 'instanceId': self._serialize.url("instance_id", instance_id, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - def perform_maintenance( - self, resource_group_name, vm_scale_set_name, instance_id, custom_headers=None, raw=False, polling=True, **operation_config): - """Performs maintenance on a virtual machine in a VM scale set. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param vm_scale_set_name: The name of the VM scale set. - :type vm_scale_set_name: str - :param instance_id: The instance ID of the virtual machine. - :type instance_id: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns None or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] - :raises: :class:`CloudError` - """ - raw_result = self._perform_maintenance_initial( - resource_group_name=resource_group_name, - vm_scale_set_name=vm_scale_set_name, - instance_id=instance_id, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - perform_maintenance.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/virtualmachines/{instanceId}/performMaintenance'} - - - def _run_command_initial( - self, resource_group_name, vm_scale_set_name, instance_id, parameters, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.run_command.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), - 'instanceId': self._serialize.url("instance_id", instance_id, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(parameters, 'RunCommandInput') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('RunCommandResult', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def run_command( - self, resource_group_name, vm_scale_set_name, instance_id, parameters, custom_headers=None, raw=False, polling=True, **operation_config): - """Run command on a virtual machine in a VM scale set. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param vm_scale_set_name: The name of the VM scale set. - :type vm_scale_set_name: str - :param instance_id: The instance ID of the virtual machine. - :type instance_id: str - :param parameters: Parameters supplied to the Run command operation. - :type parameters: - ~azure.mgmt.compute.v2018_10_01.models.RunCommandInput - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns RunCommandResult or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2018_10_01.models.RunCommandResult] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2018_10_01.models.RunCommandResult]] - :raises: :class:`CloudError` - """ - raw_result = self._run_command_initial( - resource_group_name=resource_group_name, - vm_scale_set_name=vm_scale_set_name, - instance_id=instance_id, - parameters=parameters, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('RunCommandResult', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - run_command.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/virtualmachines/{instanceId}/runCommand'} diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/operations/virtual_machine_scale_sets_operations.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/operations/virtual_machine_scale_sets_operations.py deleted file mode 100644 index 09b132b374f7..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/operations/virtual_machine_scale_sets_operations.py +++ /dev/null @@ -1,1756 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError -from msrest.polling import LROPoller, NoPolling -from msrestazure.polling.arm_polling import ARMPolling - -from .. import models - - -class VirtualMachineScaleSetsOperations(object): - """VirtualMachineScaleSetsOperations operations. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: Client Api Version. Constant value: "2018-10-01". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2018-10-01" - - self.config = config - - - def _create_or_update_initial( - self, resource_group_name, vm_scale_set_name, parameters, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.create_or_update.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(parameters, 'VirtualMachineScaleSet') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 201]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('VirtualMachineScaleSet', response) - if response.status_code == 201: - deserialized = self._deserialize('VirtualMachineScaleSet', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def create_or_update( - self, resource_group_name, vm_scale_set_name, parameters, custom_headers=None, raw=False, polling=True, **operation_config): - """Create or update a VM scale set. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param vm_scale_set_name: The name of the VM scale set to create or - update. - :type vm_scale_set_name: str - :param parameters: The scale set object. - :type parameters: - ~azure.mgmt.compute.v2018_10_01.models.VirtualMachineScaleSet - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns VirtualMachineScaleSet - or ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2018_10_01.models.VirtualMachineScaleSet] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2018_10_01.models.VirtualMachineScaleSet]] - :raises: :class:`CloudError` - """ - raw_result = self._create_or_update_initial( - resource_group_name=resource_group_name, - vm_scale_set_name=vm_scale_set_name, - parameters=parameters, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('VirtualMachineScaleSet', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}'} - - - def _update_initial( - self, resource_group_name, vm_scale_set_name, parameters, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.update.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(parameters, 'VirtualMachineScaleSetUpdate') - - # Construct and send request - request = self._client.patch(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('VirtualMachineScaleSet', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def update( - self, resource_group_name, vm_scale_set_name, parameters, custom_headers=None, raw=False, polling=True, **operation_config): - """Update a VM scale set. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param vm_scale_set_name: The name of the VM scale set to create or - update. - :type vm_scale_set_name: str - :param parameters: The scale set object. - :type parameters: - ~azure.mgmt.compute.v2018_10_01.models.VirtualMachineScaleSetUpdate - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns VirtualMachineScaleSet - or ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2018_10_01.models.VirtualMachineScaleSet] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2018_10_01.models.VirtualMachineScaleSet]] - :raises: :class:`CloudError` - """ - raw_result = self._update_initial( - resource_group_name=resource_group_name, - vm_scale_set_name=vm_scale_set_name, - parameters=parameters, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('VirtualMachineScaleSet', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}'} - - - def _delete_initial( - self, resource_group_name, vm_scale_set_name, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.delete.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202, 204]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - def delete( - self, resource_group_name, vm_scale_set_name, custom_headers=None, raw=False, polling=True, **operation_config): - """Deletes a VM scale set. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param vm_scale_set_name: The name of the VM scale set. - :type vm_scale_set_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns None or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] - :raises: :class:`CloudError` - """ - raw_result = self._delete_initial( - resource_group_name=resource_group_name, - vm_scale_set_name=vm_scale_set_name, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}'} - - def get( - self, resource_group_name, vm_scale_set_name, custom_headers=None, raw=False, **operation_config): - """Display information about a virtual machine scale set. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param vm_scale_set_name: The name of the VM scale set. - :type vm_scale_set_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: VirtualMachineScaleSet or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.compute.v2018_10_01.models.VirtualMachineScaleSet - or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('VirtualMachineScaleSet', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}'} - - - def _deallocate_initial( - self, resource_group_name, vm_scale_set_name, instance_ids=None, custom_headers=None, raw=False, **operation_config): - vm_instance_ids = None - if instance_ids is not None: - vm_instance_ids = models.VirtualMachineScaleSetVMInstanceIDs(instance_ids=instance_ids) - - # Construct URL - url = self.deallocate.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - if vm_instance_ids is not None: - body_content = self._serialize.body(vm_instance_ids, 'VirtualMachineScaleSetVMInstanceIDs') - else: - body_content = None - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - def deallocate( - self, resource_group_name, vm_scale_set_name, instance_ids=None, custom_headers=None, raw=False, polling=True, **operation_config): - """Deallocates specific virtual machines in a VM scale set. Shuts down the - virtual machines and releases the compute resources. You are not billed - for the compute resources that this virtual machine scale set - deallocates. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param vm_scale_set_name: The name of the VM scale set. - :type vm_scale_set_name: str - :param instance_ids: The virtual machine scale set instance ids. - Omitting the virtual machine scale set instance ids will result in the - operation being performed on all virtual machines in the virtual - machine scale set. - :type instance_ids: list[str] - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns None or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] - :raises: :class:`CloudError` - """ - raw_result = self._deallocate_initial( - resource_group_name=resource_group_name, - vm_scale_set_name=vm_scale_set_name, - instance_ids=instance_ids, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - deallocate.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/deallocate'} - - - def _delete_instances_initial( - self, resource_group_name, vm_scale_set_name, instance_ids, custom_headers=None, raw=False, **operation_config): - vm_instance_ids = models.VirtualMachineScaleSetVMInstanceRequiredIDs(instance_ids=instance_ids) - - # Construct URL - url = self.delete_instances.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(vm_instance_ids, 'VirtualMachineScaleSetVMInstanceRequiredIDs') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - def delete_instances( - self, resource_group_name, vm_scale_set_name, instance_ids, custom_headers=None, raw=False, polling=True, **operation_config): - """Deletes virtual machines in a VM scale set. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param vm_scale_set_name: The name of the VM scale set. - :type vm_scale_set_name: str - :param instance_ids: The virtual machine scale set instance ids. - :type instance_ids: list[str] - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns None or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] - :raises: :class:`CloudError` - """ - raw_result = self._delete_instances_initial( - resource_group_name=resource_group_name, - vm_scale_set_name=vm_scale_set_name, - instance_ids=instance_ids, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - delete_instances.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/delete'} - - def get_instance_view( - self, resource_group_name, vm_scale_set_name, custom_headers=None, raw=False, **operation_config): - """Gets the status of a VM scale set instance. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param vm_scale_set_name: The name of the VM scale set. - :type vm_scale_set_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: VirtualMachineScaleSetInstanceView or ClientRawResponse if - raw=true - :rtype: - ~azure.mgmt.compute.v2018_10_01.models.VirtualMachineScaleSetInstanceView - or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get_instance_view.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('VirtualMachineScaleSetInstanceView', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_instance_view.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/instanceView'} - - def list( - self, resource_group_name, custom_headers=None, raw=False, **operation_config): - """Gets a list of all VM scale sets under a resource group. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of VirtualMachineScaleSet - :rtype: - ~azure.mgmt.compute.v2018_10_01.models.VirtualMachineScaleSetPaged[~azure.mgmt.compute.v2018_10_01.models.VirtualMachineScaleSet] - :raises: :class:`CloudError` - """ - def internal_paging(next_link=None, raw=False): - - if not next_link: - # Construct URL - url = self.list.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - deserialized = models.VirtualMachineScaleSetPaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.VirtualMachineScaleSetPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets'} - - def list_all( - self, custom_headers=None, raw=False, **operation_config): - """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. - - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of VirtualMachineScaleSet - :rtype: - ~azure.mgmt.compute.v2018_10_01.models.VirtualMachineScaleSetPaged[~azure.mgmt.compute.v2018_10_01.models.VirtualMachineScaleSet] - :raises: :class:`CloudError` - """ - def internal_paging(next_link=None, raw=False): - - if not next_link: - # Construct URL - url = self.list_all.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - deserialized = models.VirtualMachineScaleSetPaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.VirtualMachineScaleSetPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - list_all.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Compute/virtualMachineScaleSets'} - - def list_skus( - self, resource_group_name, vm_scale_set_name, custom_headers=None, raw=False, **operation_config): - """Gets a list of SKUs available for your VM scale set, including the - minimum and maximum VM instances allowed for each SKU. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param vm_scale_set_name: The name of the VM scale set. - :type vm_scale_set_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of VirtualMachineScaleSetSku - :rtype: - ~azure.mgmt.compute.v2018_10_01.models.VirtualMachineScaleSetSkuPaged[~azure.mgmt.compute.v2018_10_01.models.VirtualMachineScaleSetSku] - :raises: :class:`CloudError` - """ - def internal_paging(next_link=None, raw=False): - - if not next_link: - # Construct URL - url = self.list_skus.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - deserialized = models.VirtualMachineScaleSetSkuPaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.VirtualMachineScaleSetSkuPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - list_skus.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/skus'} - - def get_os_upgrade_history( - self, resource_group_name, vm_scale_set_name, custom_headers=None, raw=False, **operation_config): - """Gets list of OS upgrades on a VM scale set instance. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param vm_scale_set_name: The name of the VM scale set. - :type vm_scale_set_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of - UpgradeOperationHistoricalStatusInfo - :rtype: - ~azure.mgmt.compute.v2018_10_01.models.UpgradeOperationHistoricalStatusInfoPaged[~azure.mgmt.compute.v2018_10_01.models.UpgradeOperationHistoricalStatusInfo] - :raises: :class:`CloudError` - """ - def internal_paging(next_link=None, raw=False): - - if not next_link: - # Construct URL - url = self.get_os_upgrade_history.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - deserialized = models.UpgradeOperationHistoricalStatusInfoPaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.UpgradeOperationHistoricalStatusInfoPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - get_os_upgrade_history.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/osUpgradeHistory'} - - - def _power_off_initial( - self, resource_group_name, vm_scale_set_name, instance_ids=None, custom_headers=None, raw=False, **operation_config): - vm_instance_ids = None - if instance_ids is not None: - vm_instance_ids = models.VirtualMachineScaleSetVMInstanceIDs(instance_ids=instance_ids) - - # Construct URL - url = self.power_off.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - if vm_instance_ids is not None: - body_content = self._serialize.body(vm_instance_ids, 'VirtualMachineScaleSetVMInstanceIDs') - else: - body_content = None - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - def power_off( - self, resource_group_name, vm_scale_set_name, instance_ids=None, custom_headers=None, raw=False, polling=True, **operation_config): - """Power off (stop) one or more virtual machines in a VM scale set. Note - that resources are still attached and you are getting charged for the - resources. Instead, use deallocate to release resources and avoid - charges. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param vm_scale_set_name: The name of the VM scale set. - :type vm_scale_set_name: str - :param instance_ids: The virtual machine scale set instance ids. - Omitting the virtual machine scale set instance ids will result in the - operation being performed on all virtual machines in the virtual - machine scale set. - :type instance_ids: list[str] - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns None or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] - :raises: :class:`CloudError` - """ - raw_result = self._power_off_initial( - resource_group_name=resource_group_name, - vm_scale_set_name=vm_scale_set_name, - instance_ids=instance_ids, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - power_off.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/poweroff'} - - - def _restart_initial( - self, resource_group_name, vm_scale_set_name, instance_ids=None, custom_headers=None, raw=False, **operation_config): - vm_instance_ids = None - if instance_ids is not None: - vm_instance_ids = models.VirtualMachineScaleSetVMInstanceIDs(instance_ids=instance_ids) - - # Construct URL - url = self.restart.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - if vm_instance_ids is not None: - body_content = self._serialize.body(vm_instance_ids, 'VirtualMachineScaleSetVMInstanceIDs') - else: - body_content = None - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - def restart( - self, resource_group_name, vm_scale_set_name, instance_ids=None, custom_headers=None, raw=False, polling=True, **operation_config): - """Restarts one or more virtual machines in a VM scale set. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param vm_scale_set_name: The name of the VM scale set. - :type vm_scale_set_name: str - :param instance_ids: The virtual machine scale set instance ids. - Omitting the virtual machine scale set instance ids will result in the - operation being performed on all virtual machines in the virtual - machine scale set. - :type instance_ids: list[str] - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns None or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] - :raises: :class:`CloudError` - """ - raw_result = self._restart_initial( - resource_group_name=resource_group_name, - vm_scale_set_name=vm_scale_set_name, - instance_ids=instance_ids, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - restart.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/restart'} - - - def _start_initial( - self, resource_group_name, vm_scale_set_name, instance_ids=None, custom_headers=None, raw=False, **operation_config): - vm_instance_ids = None - if instance_ids is not None: - vm_instance_ids = models.VirtualMachineScaleSetVMInstanceIDs(instance_ids=instance_ids) - - # Construct URL - url = self.start.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - if vm_instance_ids is not None: - body_content = self._serialize.body(vm_instance_ids, 'VirtualMachineScaleSetVMInstanceIDs') - else: - body_content = None - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - def start( - self, resource_group_name, vm_scale_set_name, instance_ids=None, custom_headers=None, raw=False, polling=True, **operation_config): - """Starts one or more virtual machines in a VM scale set. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param vm_scale_set_name: The name of the VM scale set. - :type vm_scale_set_name: str - :param instance_ids: The virtual machine scale set instance ids. - Omitting the virtual machine scale set instance ids will result in the - operation being performed on all virtual machines in the virtual - machine scale set. - :type instance_ids: list[str] - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns None or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] - :raises: :class:`CloudError` - """ - raw_result = self._start_initial( - resource_group_name=resource_group_name, - vm_scale_set_name=vm_scale_set_name, - instance_ids=instance_ids, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - start.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/start'} - - - def _redeploy_initial( - self, resource_group_name, vm_scale_set_name, instance_ids=None, custom_headers=None, raw=False, **operation_config): - vm_instance_ids = None - if instance_ids is not None: - vm_instance_ids = models.VirtualMachineScaleSetVMInstanceIDs(instance_ids=instance_ids) - - # Construct URL - url = self.redeploy.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - if vm_instance_ids is not None: - body_content = self._serialize.body(vm_instance_ids, 'VirtualMachineScaleSetVMInstanceIDs') - else: - body_content = None - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - def redeploy( - self, resource_group_name, vm_scale_set_name, instance_ids=None, custom_headers=None, raw=False, polling=True, **operation_config): - """Redeploy one or more virtual machines in a VM scale set. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param vm_scale_set_name: The name of the VM scale set. - :type vm_scale_set_name: str - :param instance_ids: The virtual machine scale set instance ids. - Omitting the virtual machine scale set instance ids will result in the - operation being performed on all virtual machines in the virtual - machine scale set. - :type instance_ids: list[str] - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns None or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] - :raises: :class:`CloudError` - """ - raw_result = self._redeploy_initial( - resource_group_name=resource_group_name, - vm_scale_set_name=vm_scale_set_name, - instance_ids=instance_ids, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - redeploy.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/redeploy'} - - - def _perform_maintenance_initial( - self, resource_group_name, vm_scale_set_name, instance_ids=None, custom_headers=None, raw=False, **operation_config): - vm_instance_ids = None - if instance_ids is not None: - vm_instance_ids = models.VirtualMachineScaleSetVMInstanceIDs(instance_ids=instance_ids) - - # Construct URL - url = self.perform_maintenance.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - if vm_instance_ids is not None: - body_content = self._serialize.body(vm_instance_ids, 'VirtualMachineScaleSetVMInstanceIDs') - else: - body_content = None - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - def perform_maintenance( - self, resource_group_name, vm_scale_set_name, instance_ids=None, custom_headers=None, raw=False, polling=True, **operation_config): - """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. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param vm_scale_set_name: The name of the VM scale set. - :type vm_scale_set_name: str - :param instance_ids: The virtual machine scale set instance ids. - Omitting the virtual machine scale set instance ids will result in the - operation being performed on all virtual machines in the virtual - machine scale set. - :type instance_ids: list[str] - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns None or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] - :raises: :class:`CloudError` - """ - raw_result = self._perform_maintenance_initial( - resource_group_name=resource_group_name, - vm_scale_set_name=vm_scale_set_name, - instance_ids=instance_ids, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - perform_maintenance.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/performMaintenance'} - - - def _update_instances_initial( - self, resource_group_name, vm_scale_set_name, instance_ids, custom_headers=None, raw=False, **operation_config): - vm_instance_ids = models.VirtualMachineScaleSetVMInstanceRequiredIDs(instance_ids=instance_ids) - - # Construct URL - url = self.update_instances.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(vm_instance_ids, 'VirtualMachineScaleSetVMInstanceRequiredIDs') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - def update_instances( - self, resource_group_name, vm_scale_set_name, instance_ids, custom_headers=None, raw=False, polling=True, **operation_config): - """Upgrades one or more virtual machines to the latest SKU set in the VM - scale set model. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param vm_scale_set_name: The name of the VM scale set. - :type vm_scale_set_name: str - :param instance_ids: The virtual machine scale set instance ids. - :type instance_ids: list[str] - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns None or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] - :raises: :class:`CloudError` - """ - raw_result = self._update_instances_initial( - resource_group_name=resource_group_name, - vm_scale_set_name=vm_scale_set_name, - instance_ids=instance_ids, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - update_instances.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/manualupgrade'} - - - def _reimage_initial( - self, resource_group_name, vm_scale_set_name, temp_disk=None, instance_ids=None, custom_headers=None, raw=False, **operation_config): - vm_scale_set_reimage_input = None - if temp_disk is not None or instance_ids is not None: - vm_scale_set_reimage_input = models.VirtualMachineScaleSetReimageParameters(temp_disk=temp_disk, instance_ids=instance_ids) - - # Construct URL - url = self.reimage.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - if vm_scale_set_reimage_input is not None: - body_content = self._serialize.body(vm_scale_set_reimage_input, 'VirtualMachineScaleSetReimageParameters') - else: - body_content = None - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - def reimage( - self, resource_group_name, vm_scale_set_name, temp_disk=None, instance_ids=None, custom_headers=None, raw=False, polling=True, **operation_config): - """Reimages (upgrade the operating system) one or more virtual machines in - a VM scale set which don't have a ephemeral OS disk, for virtual - machines who have a ephemeral OS disk the virtual machine is reset to - initial state. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param vm_scale_set_name: The name of the VM scale set. - :type vm_scale_set_name: str - :param temp_disk: Specifies whether to reimage temp disk. Default - value: false. - :type temp_disk: bool - :param instance_ids: The virtual machine scale set instance ids. - Omitting the virtual machine scale set instance ids will result in the - operation being performed on all virtual machines in the virtual - machine scale set. - :type instance_ids: list[str] - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns None or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] - :raises: :class:`CloudError` - """ - raw_result = self._reimage_initial( - resource_group_name=resource_group_name, - vm_scale_set_name=vm_scale_set_name, - temp_disk=temp_disk, - instance_ids=instance_ids, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - reimage.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/reimage'} - - - def _reimage_all_initial( - self, resource_group_name, vm_scale_set_name, instance_ids=None, custom_headers=None, raw=False, **operation_config): - vm_instance_ids = None - if instance_ids is not None: - vm_instance_ids = models.VirtualMachineScaleSetVMInstanceIDs(instance_ids=instance_ids) - - # Construct URL - url = self.reimage_all.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - if vm_instance_ids is not None: - body_content = self._serialize.body(vm_instance_ids, 'VirtualMachineScaleSetVMInstanceIDs') - else: - body_content = None - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - def reimage_all( - self, resource_group_name, vm_scale_set_name, instance_ids=None, custom_headers=None, raw=False, polling=True, **operation_config): - """Reimages all the disks ( including data disks ) in the virtual machines - in a VM scale set. This operation is only supported for managed disks. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param vm_scale_set_name: The name of the VM scale set. - :type vm_scale_set_name: str - :param instance_ids: The virtual machine scale set instance ids. - Omitting the virtual machine scale set instance ids will result in the - operation being performed on all virtual machines in the virtual - machine scale set. - :type instance_ids: list[str] - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns None or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] - :raises: :class:`CloudError` - """ - raw_result = self._reimage_all_initial( - resource_group_name=resource_group_name, - vm_scale_set_name=vm_scale_set_name, - instance_ids=instance_ids, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - reimage_all.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/reimageall'} - - def force_recovery_service_fabric_platform_update_domain_walk( - self, resource_group_name, vm_scale_set_name, platform_update_domain, custom_headers=None, raw=False, **operation_config): - """Manual platform update domain walk to update virtual machines in a - service fabric virtual machine scale set. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param vm_scale_set_name: The name of the VM scale set. - :type vm_scale_set_name: str - :param platform_update_domain: The platform update domain for which a - manual recovery walk is requested - :type platform_update_domain: int - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: RecoveryWalkResponse or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.compute.v2018_10_01.models.RecoveryWalkResponse or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.force_recovery_service_fabric_platform_update_domain_walk.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - query_parameters['platformUpdateDomain'] = self._serialize.query("platform_update_domain", platform_update_domain, 'int') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('RecoveryWalkResponse', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - force_recovery_service_fabric_platform_update_domain_walk.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/forceRecoveryServiceFabricPlatformUpdateDomainWalk'} diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/operations/virtual_machine_sizes_operations.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/operations/virtual_machine_sizes_operations.py deleted file mode 100644 index 9c8970331776..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/operations/virtual_machine_sizes_operations.py +++ /dev/null @@ -1,107 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError - -from .. import models - - -class VirtualMachineSizesOperations(object): - """VirtualMachineSizesOperations operations. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: Client Api Version. Constant value: "2018-10-01". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2018-10-01" - - self.config = config - - def list( - self, location, custom_headers=None, raw=False, **operation_config): - """This API is deprecated. Use [Resources - Skus](https://docs.microsoft.com/en-us/rest/api/compute/resourceskus/list). - - :param location: The location upon which virtual-machine-sizes is - queried. - :type location: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of VirtualMachineSize - :rtype: - ~azure.mgmt.compute.v2018_10_01.models.VirtualMachineSizePaged[~azure.mgmt.compute.v2018_10_01.models.VirtualMachineSize] - :raises: :class:`CloudError` - """ - def internal_paging(next_link=None, raw=False): - - if not next_link: - # Construct URL - url = self.list.metadata['url'] - path_format_arguments = { - 'location': self._serialize.url("location", location, 'str', pattern=r'^[-\w\._]+$'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - deserialized = models.VirtualMachineSizePaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.VirtualMachineSizePaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/vmSizes'} diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/operations/virtual_machines_operations.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/operations/virtual_machines_operations.py deleted file mode 100644 index 90d4c2fc4429..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/operations/virtual_machines_operations.py +++ /dev/null @@ -1,1646 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError -from msrest.polling import LROPoller, NoPolling -from msrestazure.polling.arm_polling import ARMPolling - -from .. import models - - -class VirtualMachinesOperations(object): - """VirtualMachinesOperations operations. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: Client Api Version. Constant value: "2018-10-01". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2018-10-01" - - self.config = config - - def list_by_location( - self, location, custom_headers=None, raw=False, **operation_config): - """Gets all the virtual machines under the specified subscription for the - specified location. - - :param location: The location for which virtual machines under the - subscription are queried. - :type location: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of VirtualMachine - :rtype: - ~azure.mgmt.compute.v2018_10_01.models.VirtualMachinePaged[~azure.mgmt.compute.v2018_10_01.models.VirtualMachine] - :raises: :class:`CloudError` - """ - def internal_paging(next_link=None, raw=False): - - if not next_link: - # Construct URL - url = self.list_by_location.metadata['url'] - path_format_arguments = { - 'location': self._serialize.url("location", location, 'str', pattern=r'^[-\w\._]+$'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - deserialized = models.VirtualMachinePaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.VirtualMachinePaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - list_by_location.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/virtualMachines'} - - - def _capture_initial( - self, resource_group_name, vm_name, parameters, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.capture.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'vmName': self._serialize.url("vm_name", vm_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(parameters, 'VirtualMachineCaptureParameters') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('VirtualMachineCaptureResult', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def capture( - self, resource_group_name, vm_name, parameters, custom_headers=None, raw=False, polling=True, **operation_config): - """Captures the VM by copying virtual hard disks of the VM and outputs a - template that can be used to create similar VMs. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param vm_name: The name of the virtual machine. - :type vm_name: str - :param parameters: Parameters supplied to the Capture Virtual Machine - operation. - :type parameters: - ~azure.mgmt.compute.v2018_10_01.models.VirtualMachineCaptureParameters - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns - VirtualMachineCaptureResult or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2018_10_01.models.VirtualMachineCaptureResult] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2018_10_01.models.VirtualMachineCaptureResult]] - :raises: :class:`CloudError` - """ - raw_result = self._capture_initial( - resource_group_name=resource_group_name, - vm_name=vm_name, - parameters=parameters, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('VirtualMachineCaptureResult', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - capture.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/capture'} - - - def _create_or_update_initial( - self, resource_group_name, vm_name, parameters, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.create_or_update.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'vmName': self._serialize.url("vm_name", vm_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(parameters, 'VirtualMachine') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 201]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('VirtualMachine', response) - if response.status_code == 201: - deserialized = self._deserialize('VirtualMachine', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def create_or_update( - self, resource_group_name, vm_name, parameters, custom_headers=None, raw=False, polling=True, **operation_config): - """The operation to create or update a virtual machine. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param vm_name: The name of the virtual machine. - :type vm_name: str - :param parameters: Parameters supplied to the Create Virtual Machine - operation. - :type parameters: - ~azure.mgmt.compute.v2018_10_01.models.VirtualMachine - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns VirtualMachine or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2018_10_01.models.VirtualMachine] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2018_10_01.models.VirtualMachine]] - :raises: :class:`CloudError` - """ - raw_result = self._create_or_update_initial( - resource_group_name=resource_group_name, - vm_name=vm_name, - parameters=parameters, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('VirtualMachine', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}'} - - - def _update_initial( - self, resource_group_name, vm_name, parameters, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.update.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'vmName': self._serialize.url("vm_name", vm_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(parameters, 'VirtualMachineUpdate') - - # Construct and send request - request = self._client.patch(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 201]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('VirtualMachine', response) - if response.status_code == 201: - deserialized = self._deserialize('VirtualMachine', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def update( - self, resource_group_name, vm_name, parameters, custom_headers=None, raw=False, polling=True, **operation_config): - """The operation to update a virtual machine. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param vm_name: The name of the virtual machine. - :type vm_name: str - :param parameters: Parameters supplied to the Update Virtual Machine - operation. - :type parameters: - ~azure.mgmt.compute.v2018_10_01.models.VirtualMachineUpdate - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns VirtualMachine or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2018_10_01.models.VirtualMachine] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2018_10_01.models.VirtualMachine]] - :raises: :class:`CloudError` - """ - raw_result = self._update_initial( - resource_group_name=resource_group_name, - vm_name=vm_name, - parameters=parameters, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('VirtualMachine', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}'} - - - def _delete_initial( - self, resource_group_name, vm_name, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.delete.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'vmName': self._serialize.url("vm_name", vm_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202, 204]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - def delete( - self, resource_group_name, vm_name, custom_headers=None, raw=False, polling=True, **operation_config): - """The operation to delete a virtual machine. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param vm_name: The name of the virtual machine. - :type vm_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns None or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] - :raises: :class:`CloudError` - """ - raw_result = self._delete_initial( - resource_group_name=resource_group_name, - vm_name=vm_name, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}'} - - def get( - self, resource_group_name, vm_name, expand=None, custom_headers=None, raw=False, **operation_config): - """Retrieves information about the model view or the instance view of a - virtual machine. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param vm_name: The name of the virtual machine. - :type vm_name: str - :param expand: The expand expression to apply on the operation. - Possible values include: 'instanceView' - :type expand: str or - ~azure.mgmt.compute.v2018_10_01.models.InstanceViewTypes - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: VirtualMachine or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.compute.v2018_10_01.models.VirtualMachine or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'vmName': self._serialize.url("vm_name", vm_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - if expand is not None: - query_parameters['$expand'] = self._serialize.query("expand", expand, 'InstanceViewTypes') - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('VirtualMachine', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}'} - - def instance_view( - self, resource_group_name, vm_name, custom_headers=None, raw=False, **operation_config): - """Retrieves information about the run-time state of a virtual machine. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param vm_name: The name of the virtual machine. - :type vm_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: VirtualMachineInstanceView or ClientRawResponse if raw=true - :rtype: - ~azure.mgmt.compute.v2018_10_01.models.VirtualMachineInstanceView or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.instance_view.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'vmName': self._serialize.url("vm_name", vm_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('VirtualMachineInstanceView', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - instance_view.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/instanceView'} - - - def _convert_to_managed_disks_initial( - self, resource_group_name, vm_name, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.convert_to_managed_disks.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'vmName': self._serialize.url("vm_name", vm_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - def convert_to_managed_disks( - self, resource_group_name, vm_name, custom_headers=None, raw=False, polling=True, **operation_config): - """Converts virtual machine disks from blob-based to managed disks. - Virtual machine must be stop-deallocated before invoking this - operation. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param vm_name: The name of the virtual machine. - :type vm_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns None or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] - :raises: :class:`CloudError` - """ - raw_result = self._convert_to_managed_disks_initial( - resource_group_name=resource_group_name, - vm_name=vm_name, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - convert_to_managed_disks.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/convertToManagedDisks'} - - - def _deallocate_initial( - self, resource_group_name, vm_name, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.deallocate.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'vmName': self._serialize.url("vm_name", vm_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - def deallocate( - self, resource_group_name, vm_name, custom_headers=None, raw=False, polling=True, **operation_config): - """Shuts down the virtual machine and releases the compute resources. You - are not billed for the compute resources that this virtual machine - uses. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param vm_name: The name of the virtual machine. - :type vm_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns None or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] - :raises: :class:`CloudError` - """ - raw_result = self._deallocate_initial( - resource_group_name=resource_group_name, - vm_name=vm_name, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - deallocate.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/deallocate'} - - def generalize( - self, resource_group_name, vm_name, custom_headers=None, raw=False, **operation_config): - """Sets the state of the virtual machine to generalized. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param vm_name: The name of the virtual machine. - :type vm_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.generalize.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'vmName': self._serialize.url("vm_name", vm_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - generalize.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/generalize'} - - def list( - self, resource_group_name, custom_headers=None, raw=False, **operation_config): - """Lists all of the virtual machines in the specified resource group. Use - the nextLink property in the response to get the next page of virtual - machines. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of VirtualMachine - :rtype: - ~azure.mgmt.compute.v2018_10_01.models.VirtualMachinePaged[~azure.mgmt.compute.v2018_10_01.models.VirtualMachine] - :raises: :class:`CloudError` - """ - def internal_paging(next_link=None, raw=False): - - if not next_link: - # Construct URL - url = self.list.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - deserialized = models.VirtualMachinePaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.VirtualMachinePaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines'} - - def list_all( - self, custom_headers=None, raw=False, **operation_config): - """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. - - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of VirtualMachine - :rtype: - ~azure.mgmt.compute.v2018_10_01.models.VirtualMachinePaged[~azure.mgmt.compute.v2018_10_01.models.VirtualMachine] - :raises: :class:`CloudError` - """ - def internal_paging(next_link=None, raw=False): - - if not next_link: - # Construct URL - url = self.list_all.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - deserialized = models.VirtualMachinePaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.VirtualMachinePaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - list_all.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Compute/virtualMachines'} - - def list_available_sizes( - self, resource_group_name, vm_name, custom_headers=None, raw=False, **operation_config): - """Lists all available virtual machine sizes to which the specified - virtual machine can be resized. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param vm_name: The name of the virtual machine. - :type vm_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of VirtualMachineSize - :rtype: - ~azure.mgmt.compute.v2018_10_01.models.VirtualMachineSizePaged[~azure.mgmt.compute.v2018_10_01.models.VirtualMachineSize] - :raises: :class:`CloudError` - """ - def internal_paging(next_link=None, raw=False): - - if not next_link: - # Construct URL - url = self.list_available_sizes.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'vmName': self._serialize.url("vm_name", vm_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - deserialized = models.VirtualMachineSizePaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.VirtualMachineSizePaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - list_available_sizes.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/vmSizes'} - - - def _power_off_initial( - self, resource_group_name, vm_name, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.power_off.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'vmName': self._serialize.url("vm_name", vm_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - def power_off( - self, resource_group_name, vm_name, custom_headers=None, raw=False, polling=True, **operation_config): - """The operation to power off (stop) a virtual machine. The virtual - machine can be restarted with the same provisioned resources. You are - still charged for this virtual machine. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param vm_name: The name of the virtual machine. - :type vm_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns None or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] - :raises: :class:`CloudError` - """ - raw_result = self._power_off_initial( - resource_group_name=resource_group_name, - vm_name=vm_name, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - power_off.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/powerOff'} - - - def _restart_initial( - self, resource_group_name, vm_name, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.restart.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'vmName': self._serialize.url("vm_name", vm_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - def restart( - self, resource_group_name, vm_name, custom_headers=None, raw=False, polling=True, **operation_config): - """The operation to restart a virtual machine. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param vm_name: The name of the virtual machine. - :type vm_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns None or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] - :raises: :class:`CloudError` - """ - raw_result = self._restart_initial( - resource_group_name=resource_group_name, - vm_name=vm_name, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - restart.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/restart'} - - - def _start_initial( - self, resource_group_name, vm_name, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.start.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'vmName': self._serialize.url("vm_name", vm_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - def start( - self, resource_group_name, vm_name, custom_headers=None, raw=False, polling=True, **operation_config): - """The operation to start a virtual machine. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param vm_name: The name of the virtual machine. - :type vm_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns None or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] - :raises: :class:`CloudError` - """ - raw_result = self._start_initial( - resource_group_name=resource_group_name, - vm_name=vm_name, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - start.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/start'} - - - def _redeploy_initial( - self, resource_group_name, vm_name, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.redeploy.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'vmName': self._serialize.url("vm_name", vm_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - def redeploy( - self, resource_group_name, vm_name, custom_headers=None, raw=False, polling=True, **operation_config): - """The operation to redeploy a virtual machine. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param vm_name: The name of the virtual machine. - :type vm_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns None or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] - :raises: :class:`CloudError` - """ - raw_result = self._redeploy_initial( - resource_group_name=resource_group_name, - vm_name=vm_name, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - redeploy.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/redeploy'} - - - def _reimage_initial( - self, resource_group_name, vm_name, temp_disk=None, custom_headers=None, raw=False, **operation_config): - parameters = None - if temp_disk is not None: - parameters = models.VirtualMachineReimageParameters(temp_disk=temp_disk) - - # Construct URL - url = self.reimage.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'vmName': self._serialize.url("vm_name", vm_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - if parameters is not None: - body_content = self._serialize.body(parameters, 'VirtualMachineReimageParameters') - else: - body_content = None - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - def reimage( - self, resource_group_name, vm_name, temp_disk=None, custom_headers=None, raw=False, polling=True, **operation_config): - """Reimages the virtual machine which has an ephemeral OS disk back to its - initial state. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param vm_name: The name of the virtual machine. - :type vm_name: str - :param temp_disk: Specifies whether to reimage temp disk. Default - value: false. - :type temp_disk: bool - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns None or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] - :raises: :class:`CloudError` - """ - raw_result = self._reimage_initial( - resource_group_name=resource_group_name, - vm_name=vm_name, - temp_disk=temp_disk, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - reimage.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/reimage'} - - - def _perform_maintenance_initial( - self, resource_group_name, vm_name, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.perform_maintenance.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'vmName': self._serialize.url("vm_name", vm_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - def perform_maintenance( - self, resource_group_name, vm_name, custom_headers=None, raw=False, polling=True, **operation_config): - """The operation to perform maintenance on a virtual machine. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param vm_name: The name of the virtual machine. - :type vm_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns None or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] - :raises: :class:`CloudError` - """ - raw_result = self._perform_maintenance_initial( - resource_group_name=resource_group_name, - vm_name=vm_name, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - perform_maintenance.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/performMaintenance'} - - - def _run_command_initial( - self, resource_group_name, vm_name, parameters, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.run_command.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'vmName': self._serialize.url("vm_name", vm_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(parameters, 'RunCommandInput') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('RunCommandResult', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def run_command( - self, resource_group_name, vm_name, parameters, custom_headers=None, raw=False, polling=True, **operation_config): - """Run command on the VM. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param vm_name: The name of the virtual machine. - :type vm_name: str - :param parameters: Parameters supplied to the Run command operation. - :type parameters: - ~azure.mgmt.compute.v2018_10_01.models.RunCommandInput - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns RunCommandResult or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2018_10_01.models.RunCommandResult] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2018_10_01.models.RunCommandResult]] - :raises: :class:`CloudError` - """ - raw_result = self._run_command_initial( - resource_group_name=resource_group_name, - vm_name=vm_name, - parameters=parameters, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('RunCommandResult', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - run_command.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/runCommand'} diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/__init__.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/__init__.py index 88ded2f640de..a7bc1ce68e37 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/__init__.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/__init__.py @@ -9,10 +9,11 @@ # regenerated. # -------------------------------------------------------------------------- -from .compute_management_client import ComputeManagementClient -from .version import VERSION +from ._configuration import ComputeManagementClientConfiguration +from ._compute_management_client import ComputeManagementClient +__all__ = ['ComputeManagementClient', 'ComputeManagementClientConfiguration'] -__all__ = ['ComputeManagementClient'] +from .version import VERSION __version__ = VERSION diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/_compute_management_client.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/_compute_management_client.py new file mode 100644 index 000000000000..ebbe6a2aeeab --- /dev/null +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/_compute_management_client.py @@ -0,0 +1,161 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.service_client import SDKClient +from msrest import Serializer, Deserializer + +from ._configuration import ComputeManagementClientConfiguration +from .operations import Operations +from .operations import AvailabilitySetsOperations +from .operations import ProximityPlacementGroupsOperations +from .operations import DedicatedHostGroupsOperations +from .operations import DedicatedHostsOperations +from .operations import VirtualMachineExtensionImagesOperations +from .operations import VirtualMachineExtensionsOperations +from .operations import VirtualMachineImagesOperations +from .operations import UsageOperations +from .operations import VirtualMachinesOperations +from .operations import VirtualMachineSizesOperations +from .operations import ImagesOperations +from .operations import VirtualMachineScaleSetsOperations +from .operations import VirtualMachineScaleSetExtensionsOperations +from .operations import VirtualMachineScaleSetRollingUpgradesOperations +from .operations import VirtualMachineScaleSetVMsOperations +from .operations import LogAnalyticsOperations +from .operations import VirtualMachineRunCommandsOperations +from .operations import GalleriesOperations +from .operations import GalleryImagesOperations +from .operations import GalleryImageVersionsOperations +from .operations import GalleryApplicationsOperations +from .operations import GalleryApplicationVersionsOperations +from . import models + + +class ComputeManagementClient(SDKClient): + """Compute Client + + :ivar config: Configuration for client. + :vartype config: ComputeManagementClientConfiguration + + :ivar operations: Operations operations + :vartype operations: azure.mgmt.compute.v2019_03_01.operations.Operations + :ivar availability_sets: AvailabilitySets operations + :vartype availability_sets: azure.mgmt.compute.v2019_03_01.operations.AvailabilitySetsOperations + :ivar proximity_placement_groups: ProximityPlacementGroups operations + :vartype proximity_placement_groups: azure.mgmt.compute.v2019_03_01.operations.ProximityPlacementGroupsOperations + :ivar dedicated_host_groups: DedicatedHostGroups operations + :vartype dedicated_host_groups: azure.mgmt.compute.v2019_03_01.operations.DedicatedHostGroupsOperations + :ivar dedicated_hosts: DedicatedHosts operations + :vartype dedicated_hosts: azure.mgmt.compute.v2019_03_01.operations.DedicatedHostsOperations + :ivar virtual_machine_extension_images: VirtualMachineExtensionImages operations + :vartype virtual_machine_extension_images: azure.mgmt.compute.v2019_03_01.operations.VirtualMachineExtensionImagesOperations + :ivar virtual_machine_extensions: VirtualMachineExtensions operations + :vartype virtual_machine_extensions: azure.mgmt.compute.v2019_03_01.operations.VirtualMachineExtensionsOperations + :ivar virtual_machine_images: VirtualMachineImages operations + :vartype virtual_machine_images: azure.mgmt.compute.v2019_03_01.operations.VirtualMachineImagesOperations + :ivar usage: Usage operations + :vartype usage: azure.mgmt.compute.v2019_03_01.operations.UsageOperations + :ivar virtual_machines: VirtualMachines operations + :vartype virtual_machines: azure.mgmt.compute.v2019_03_01.operations.VirtualMachinesOperations + :ivar virtual_machine_sizes: VirtualMachineSizes operations + :vartype virtual_machine_sizes: azure.mgmt.compute.v2019_03_01.operations.VirtualMachineSizesOperations + :ivar images: Images operations + :vartype images: azure.mgmt.compute.v2019_03_01.operations.ImagesOperations + :ivar virtual_machine_scale_sets: VirtualMachineScaleSets operations + :vartype virtual_machine_scale_sets: azure.mgmt.compute.v2019_03_01.operations.VirtualMachineScaleSetsOperations + :ivar virtual_machine_scale_set_extensions: VirtualMachineScaleSetExtensions operations + :vartype virtual_machine_scale_set_extensions: azure.mgmt.compute.v2019_03_01.operations.VirtualMachineScaleSetExtensionsOperations + :ivar virtual_machine_scale_set_rolling_upgrades: VirtualMachineScaleSetRollingUpgrades operations + :vartype virtual_machine_scale_set_rolling_upgrades: azure.mgmt.compute.v2019_03_01.operations.VirtualMachineScaleSetRollingUpgradesOperations + :ivar virtual_machine_scale_set_vms: VirtualMachineScaleSetVMs operations + :vartype virtual_machine_scale_set_vms: azure.mgmt.compute.v2019_03_01.operations.VirtualMachineScaleSetVMsOperations + :ivar log_analytics: LogAnalytics operations + :vartype log_analytics: azure.mgmt.compute.v2019_03_01.operations.LogAnalyticsOperations + :ivar virtual_machine_run_commands: VirtualMachineRunCommands operations + :vartype virtual_machine_run_commands: azure.mgmt.compute.v2019_03_01.operations.VirtualMachineRunCommandsOperations + :ivar galleries: Galleries operations + :vartype galleries: azure.mgmt.compute.v2019_03_01.operations.GalleriesOperations + :ivar gallery_images: GalleryImages operations + :vartype gallery_images: azure.mgmt.compute.v2019_03_01.operations.GalleryImagesOperations + :ivar gallery_image_versions: GalleryImageVersions operations + :vartype gallery_image_versions: azure.mgmt.compute.v2019_03_01.operations.GalleryImageVersionsOperations + :ivar gallery_applications: GalleryApplications operations + :vartype gallery_applications: azure.mgmt.compute.v2019_03_01.operations.GalleryApplicationsOperations + :ivar gallery_application_versions: GalleryApplicationVersions operations + :vartype gallery_application_versions: azure.mgmt.compute.v2019_03_01.operations.GalleryApplicationVersionsOperations + + :param credentials: Credentials needed for the client to connect to Azure. + :type credentials: :mod:`A msrestazure Credentials + object` + :param subscription_id: Subscription credentials which uniquely identify + Microsoft Azure subscription. The subscription ID forms part of the URI + for every service call. + :type subscription_id: str + :param str base_url: Service URL + """ + + def __init__( + self, credentials, subscription_id, base_url=None): + + self.config = ComputeManagementClientConfiguration(credentials, subscription_id, base_url) + super(ComputeManagementClient, self).__init__(self.config.credentials, self.config) + + client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} + self.api_version = '2019-03-01' + self._serialize = Serializer(client_models) + self._deserialize = Deserializer(client_models) + + self.operations = Operations( + self._client, self.config, self._serialize, self._deserialize) + self.availability_sets = AvailabilitySetsOperations( + self._client, self.config, self._serialize, self._deserialize) + self.proximity_placement_groups = ProximityPlacementGroupsOperations( + self._client, self.config, self._serialize, self._deserialize) + self.dedicated_host_groups = DedicatedHostGroupsOperations( + self._client, self.config, self._serialize, self._deserialize) + self.dedicated_hosts = DedicatedHostsOperations( + self._client, self.config, self._serialize, self._deserialize) + self.virtual_machine_extension_images = VirtualMachineExtensionImagesOperations( + self._client, self.config, self._serialize, self._deserialize) + self.virtual_machine_extensions = VirtualMachineExtensionsOperations( + self._client, self.config, self._serialize, self._deserialize) + self.virtual_machine_images = VirtualMachineImagesOperations( + self._client, self.config, self._serialize, self._deserialize) + self.usage = UsageOperations( + self._client, self.config, self._serialize, self._deserialize) + self.virtual_machines = VirtualMachinesOperations( + self._client, self.config, self._serialize, self._deserialize) + self.virtual_machine_sizes = VirtualMachineSizesOperations( + self._client, self.config, self._serialize, self._deserialize) + self.images = ImagesOperations( + self._client, self.config, self._serialize, self._deserialize) + self.virtual_machine_scale_sets = VirtualMachineScaleSetsOperations( + self._client, self.config, self._serialize, self._deserialize) + self.virtual_machine_scale_set_extensions = VirtualMachineScaleSetExtensionsOperations( + self._client, self.config, self._serialize, self._deserialize) + self.virtual_machine_scale_set_rolling_upgrades = VirtualMachineScaleSetRollingUpgradesOperations( + self._client, self.config, self._serialize, self._deserialize) + self.virtual_machine_scale_set_vms = VirtualMachineScaleSetVMsOperations( + self._client, self.config, self._serialize, self._deserialize) + self.log_analytics = LogAnalyticsOperations( + self._client, self.config, self._serialize, self._deserialize) + self.virtual_machine_run_commands = VirtualMachineRunCommandsOperations( + self._client, self.config, self._serialize, self._deserialize) + self.galleries = GalleriesOperations( + self._client, self.config, self._serialize, self._deserialize) + self.gallery_images = GalleryImagesOperations( + self._client, self.config, self._serialize, self._deserialize) + self.gallery_image_versions = GalleryImageVersionsOperations( + self._client, self.config, self._serialize, self._deserialize) + self.gallery_applications = GalleryApplicationsOperations( + self._client, self.config, self._serialize, self._deserialize) + self.gallery_application_versions = GalleryApplicationVersionsOperations( + self._client, self.config, self._serialize, self._deserialize) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/_configuration.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/_configuration.py new file mode 100644 index 000000000000..0fcf5984e2ca --- /dev/null +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/_configuration.py @@ -0,0 +1,50 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- +from msrestazure import AzureConfiguration + +from .version import VERSION + + +class ComputeManagementClientConfiguration(AzureConfiguration): + """Configuration for ComputeManagementClient + Note that all parameters used to create this instance are saved as instance + attributes. + + :param credentials: Credentials needed for the client to connect to Azure. + :type credentials: :mod:`A msrestazure Credentials + object` + :param subscription_id: Subscription credentials which uniquely identify + Microsoft Azure subscription. The subscription ID forms part of the URI + for every service call. + :type subscription_id: str + :param str base_url: Service URL + """ + + def __init__( + self, credentials, subscription_id, base_url=None): + + if credentials is None: + raise ValueError("Parameter 'credentials' must not be None.") + if subscription_id is None: + raise ValueError("Parameter 'subscription_id' must not be None.") + if not base_url: + base_url = 'https://management.azure.com' + + super(ComputeManagementClientConfiguration, self).__init__(base_url) + + # Starting Autorest.Python 4.0.64, make connection pool activated by default + self.keep_alive = True + + self.add_user_agent('azure-mgmt-compute/{}'.format(VERSION)) + self.add_user_agent('Azure-SDK-For-Python') + + self.credentials = credentials + self.subscription_id = subscription_id diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/compute_management_client.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/compute_management_client.py deleted file mode 100644 index f0573fcd0b13..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/compute_management_client.py +++ /dev/null @@ -1,175 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.service_client import SDKClient -from msrest import Serializer, Deserializer -from msrestazure import AzureConfiguration -from .version import VERSION -from .operations.operations import Operations -from .operations.availability_sets_operations import AvailabilitySetsOperations -from .operations.proximity_placement_groups_operations import ProximityPlacementGroupsOperations -from .operations.virtual_machine_extension_images_operations import VirtualMachineExtensionImagesOperations -from .operations.virtual_machine_extensions_operations import VirtualMachineExtensionsOperations -from .operations.virtual_machine_images_operations import VirtualMachineImagesOperations -from .operations.usage_operations import UsageOperations -from .operations.virtual_machines_operations import VirtualMachinesOperations -from .operations.virtual_machine_sizes_operations import VirtualMachineSizesOperations -from .operations.images_operations import ImagesOperations -from .operations.virtual_machine_scale_sets_operations import VirtualMachineScaleSetsOperations -from .operations.virtual_machine_scale_set_extensions_operations import VirtualMachineScaleSetExtensionsOperations -from .operations.virtual_machine_scale_set_rolling_upgrades_operations import VirtualMachineScaleSetRollingUpgradesOperations -from .operations.virtual_machine_scale_set_vms_operations import VirtualMachineScaleSetVMsOperations -from .operations.log_analytics_operations import LogAnalyticsOperations -from .operations.virtual_machine_run_commands_operations import VirtualMachineRunCommandsOperations -from .operations.galleries_operations import GalleriesOperations -from .operations.gallery_images_operations import GalleryImagesOperations -from .operations.gallery_image_versions_operations import GalleryImageVersionsOperations -from . import models - - -class ComputeManagementClientConfiguration(AzureConfiguration): - """Configuration for ComputeManagementClient - Note that all parameters used to create this instance are saved as instance - attributes. - - :param credentials: Credentials needed for the client to connect to Azure. - :type credentials: :mod:`A msrestazure Credentials - object` - :param subscription_id: Subscription credentials which uniquely identify - Microsoft Azure subscription. The subscription ID forms part of the URI - for every service call. - :type subscription_id: str - :param str base_url: Service URL - """ - - def __init__( - self, credentials, subscription_id, base_url=None): - - if credentials is None: - raise ValueError("Parameter 'credentials' must not be None.") - if subscription_id is None: - raise ValueError("Parameter 'subscription_id' must not be None.") - if not base_url: - base_url = 'https://management.azure.com' - - super(ComputeManagementClientConfiguration, self).__init__(base_url) - - self.add_user_agent('azure-mgmt-compute/{}'.format(VERSION)) - self.add_user_agent('Azure-SDK-For-Python') - - self.credentials = credentials - self.subscription_id = subscription_id - - -class ComputeManagementClient(SDKClient): - """Compute Client - - :ivar config: Configuration for client. - :vartype config: ComputeManagementClientConfiguration - - :ivar operations: Operations operations - :vartype operations: azure.mgmt.compute.v2019_03_01.operations.Operations - :ivar availability_sets: AvailabilitySets operations - :vartype availability_sets: azure.mgmt.compute.v2019_03_01.operations.AvailabilitySetsOperations - :ivar proximity_placement_groups: ProximityPlacementGroups operations - :vartype proximity_placement_groups: azure.mgmt.compute.v2019_03_01.operations.ProximityPlacementGroupsOperations - :ivar virtual_machine_extension_images: VirtualMachineExtensionImages operations - :vartype virtual_machine_extension_images: azure.mgmt.compute.v2019_03_01.operations.VirtualMachineExtensionImagesOperations - :ivar virtual_machine_extensions: VirtualMachineExtensions operations - :vartype virtual_machine_extensions: azure.mgmt.compute.v2019_03_01.operations.VirtualMachineExtensionsOperations - :ivar virtual_machine_images: VirtualMachineImages operations - :vartype virtual_machine_images: azure.mgmt.compute.v2019_03_01.operations.VirtualMachineImagesOperations - :ivar usage: Usage operations - :vartype usage: azure.mgmt.compute.v2019_03_01.operations.UsageOperations - :ivar virtual_machines: VirtualMachines operations - :vartype virtual_machines: azure.mgmt.compute.v2019_03_01.operations.VirtualMachinesOperations - :ivar virtual_machine_sizes: VirtualMachineSizes operations - :vartype virtual_machine_sizes: azure.mgmt.compute.v2019_03_01.operations.VirtualMachineSizesOperations - :ivar images: Images operations - :vartype images: azure.mgmt.compute.v2019_03_01.operations.ImagesOperations - :ivar virtual_machine_scale_sets: VirtualMachineScaleSets operations - :vartype virtual_machine_scale_sets: azure.mgmt.compute.v2019_03_01.operations.VirtualMachineScaleSetsOperations - :ivar virtual_machine_scale_set_extensions: VirtualMachineScaleSetExtensions operations - :vartype virtual_machine_scale_set_extensions: azure.mgmt.compute.v2019_03_01.operations.VirtualMachineScaleSetExtensionsOperations - :ivar virtual_machine_scale_set_rolling_upgrades: VirtualMachineScaleSetRollingUpgrades operations - :vartype virtual_machine_scale_set_rolling_upgrades: azure.mgmt.compute.v2019_03_01.operations.VirtualMachineScaleSetRollingUpgradesOperations - :ivar virtual_machine_scale_set_vms: VirtualMachineScaleSetVMs operations - :vartype virtual_machine_scale_set_vms: azure.mgmt.compute.v2019_03_01.operations.VirtualMachineScaleSetVMsOperations - :ivar log_analytics: LogAnalytics operations - :vartype log_analytics: azure.mgmt.compute.v2019_03_01.operations.LogAnalyticsOperations - :ivar virtual_machine_run_commands: VirtualMachineRunCommands operations - :vartype virtual_machine_run_commands: azure.mgmt.compute.v2019_03_01.operations.VirtualMachineRunCommandsOperations - :ivar galleries: Galleries operations - :vartype galleries: azure.mgmt.compute.v2019_03_01.operations.GalleriesOperations - :ivar gallery_images: GalleryImages operations - :vartype gallery_images: azure.mgmt.compute.v2019_03_01.operations.GalleryImagesOperations - :ivar gallery_image_versions: GalleryImageVersions operations - :vartype gallery_image_versions: azure.mgmt.compute.v2019_03_01.operations.GalleryImageVersionsOperations - - :param credentials: Credentials needed for the client to connect to Azure. - :type credentials: :mod:`A msrestazure Credentials - object` - :param subscription_id: Subscription credentials which uniquely identify - Microsoft Azure subscription. The subscription ID forms part of the URI - for every service call. - :type subscription_id: str - :param str base_url: Service URL - """ - - def __init__( - self, credentials, subscription_id, base_url=None): - - self.config = ComputeManagementClientConfiguration(credentials, subscription_id, base_url) - super(ComputeManagementClient, self).__init__(self.config.credentials, self.config) - - client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} - self.api_version = '2019-03-01' - self._serialize = Serializer(client_models) - self._deserialize = Deserializer(client_models) - - self.operations = Operations( - self._client, self.config, self._serialize, self._deserialize) - self.availability_sets = AvailabilitySetsOperations( - self._client, self.config, self._serialize, self._deserialize) - self.proximity_placement_groups = ProximityPlacementGroupsOperations( - self._client, self.config, self._serialize, self._deserialize) - self.virtual_machine_extension_images = VirtualMachineExtensionImagesOperations( - self._client, self.config, self._serialize, self._deserialize) - self.virtual_machine_extensions = VirtualMachineExtensionsOperations( - self._client, self.config, self._serialize, self._deserialize) - self.virtual_machine_images = VirtualMachineImagesOperations( - self._client, self.config, self._serialize, self._deserialize) - self.usage = UsageOperations( - self._client, self.config, self._serialize, self._deserialize) - self.virtual_machines = VirtualMachinesOperations( - self._client, self.config, self._serialize, self._deserialize) - self.virtual_machine_sizes = VirtualMachineSizesOperations( - self._client, self.config, self._serialize, self._deserialize) - self.images = ImagesOperations( - self._client, self.config, self._serialize, self._deserialize) - self.virtual_machine_scale_sets = VirtualMachineScaleSetsOperations( - self._client, self.config, self._serialize, self._deserialize) - self.virtual_machine_scale_set_extensions = VirtualMachineScaleSetExtensionsOperations( - self._client, self.config, self._serialize, self._deserialize) - self.virtual_machine_scale_set_rolling_upgrades = VirtualMachineScaleSetRollingUpgradesOperations( - self._client, self.config, self._serialize, self._deserialize) - self.virtual_machine_scale_set_vms = VirtualMachineScaleSetVMsOperations( - self._client, self.config, self._serialize, self._deserialize) - self.log_analytics = LogAnalyticsOperations( - self._client, self.config, self._serialize, self._deserialize) - self.virtual_machine_run_commands = VirtualMachineRunCommandsOperations( - self._client, self.config, self._serialize, self._deserialize) - self.galleries = GalleriesOperations( - self._client, self.config, self._serialize, self._deserialize) - self.gallery_images = GalleryImagesOperations( - self._client, self.config, self._serialize, self._deserialize) - self.gallery_image_versions = GalleryImageVersionsOperations( - self._client, self.config, self._serialize, self._deserialize) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/__init__.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/__init__.py index 40ff2aa1da50..f12266d5ba5e 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/__init__.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/__init__.py @@ -10,346 +10,373 @@ # -------------------------------------------------------------------------- try: - from .compute_operation_value_py3 import ComputeOperationValue - from .instance_view_status_py3 import InstanceViewStatus - from .sub_resource_py3 import SubResource - from .sku_py3 import Sku - from .availability_set_py3 import AvailabilitySet - from .availability_set_update_py3 import AvailabilitySetUpdate - from .proximity_placement_group_py3 import ProximityPlacementGroup - from .proximity_placement_group_update_py3 import ProximityPlacementGroupUpdate - from .virtual_machine_size_py3 import VirtualMachineSize - from .virtual_machine_extension_image_py3 import VirtualMachineExtensionImage - from .virtual_machine_image_resource_py3 import VirtualMachineImageResource - from .virtual_machine_extension_instance_view_py3 import VirtualMachineExtensionInstanceView - from .virtual_machine_extension_py3 import VirtualMachineExtension - from .virtual_machine_extension_update_py3 import VirtualMachineExtensionUpdate - from .virtual_machine_extensions_list_result_py3 import VirtualMachineExtensionsListResult - from .purchase_plan_py3 import PurchasePlan - from .os_disk_image_py3 import OSDiskImage - from .data_disk_image_py3 import DataDiskImage - from .automatic_os_upgrade_properties_py3 import AutomaticOSUpgradeProperties - from .virtual_machine_image_py3 import VirtualMachineImage - from .usage_name_py3 import UsageName - from .usage_py3 import Usage - from .virtual_machine_reimage_parameters_py3 import VirtualMachineReimageParameters - from .virtual_machine_capture_parameters_py3 import VirtualMachineCaptureParameters - from .virtual_machine_capture_result_py3 import VirtualMachineCaptureResult - from .plan_py3 import Plan - from .hardware_profile_py3 import HardwareProfile - from .image_reference_py3 import ImageReference - from .key_vault_secret_reference_py3 import KeyVaultSecretReference - from .key_vault_key_reference_py3 import KeyVaultKeyReference - from .disk_encryption_settings_py3 import DiskEncryptionSettings - from .virtual_hard_disk_py3 import VirtualHardDisk - from .diff_disk_settings_py3 import DiffDiskSettings - from .managed_disk_parameters_py3 import ManagedDiskParameters - from .os_disk_py3 import OSDisk - from .data_disk_py3 import DataDisk - from .storage_profile_py3 import StorageProfile - from .additional_capabilities_py3 import AdditionalCapabilities - from .additional_unattend_content_py3 import AdditionalUnattendContent - from .win_rm_listener_py3 import WinRMListener - from .win_rm_configuration_py3 import WinRMConfiguration - from .windows_configuration_py3 import WindowsConfiguration - from .ssh_public_key_py3 import SshPublicKey - from .ssh_configuration_py3 import SshConfiguration - from .linux_configuration_py3 import LinuxConfiguration - from .vault_certificate_py3 import VaultCertificate - from .vault_secret_group_py3 import VaultSecretGroup - from .os_profile_py3 import OSProfile - from .network_interface_reference_py3 import NetworkInterfaceReference - from .network_profile_py3 import NetworkProfile - from .boot_diagnostics_py3 import BootDiagnostics - from .diagnostics_profile_py3 import DiagnosticsProfile - from .virtual_machine_extension_handler_instance_view_py3 import VirtualMachineExtensionHandlerInstanceView - from .virtual_machine_agent_instance_view_py3 import VirtualMachineAgentInstanceView - from .disk_instance_view_py3 import DiskInstanceView - from .boot_diagnostics_instance_view_py3 import BootDiagnosticsInstanceView - from .virtual_machine_identity_user_assigned_identities_value_py3 import VirtualMachineIdentityUserAssignedIdentitiesValue - from .virtual_machine_identity_py3 import VirtualMachineIdentity - from .maintenance_redeploy_status_py3 import MaintenanceRedeployStatus - from .virtual_machine_instance_view_py3 import VirtualMachineInstanceView - from .virtual_machine_py3 import VirtualMachine - from .virtual_machine_update_py3 import VirtualMachineUpdate - from .automatic_os_upgrade_policy_py3 import AutomaticOSUpgradePolicy - from .rolling_upgrade_policy_py3 import RollingUpgradePolicy - from .upgrade_policy_py3 import UpgradePolicy - from .image_os_disk_py3 import ImageOSDisk - from .image_data_disk_py3 import ImageDataDisk - from .image_storage_profile_py3 import ImageStorageProfile - from .image_py3 import Image - from .image_update_py3 import ImageUpdate - from .virtual_machine_scale_set_identity_user_assigned_identities_value_py3 import VirtualMachineScaleSetIdentityUserAssignedIdentitiesValue - from .virtual_machine_scale_set_identity_py3 import VirtualMachineScaleSetIdentity - from .virtual_machine_scale_set_os_profile_py3 import VirtualMachineScaleSetOSProfile - from .virtual_machine_scale_set_update_os_profile_py3 import VirtualMachineScaleSetUpdateOSProfile - from .virtual_machine_scale_set_managed_disk_parameters_py3 import VirtualMachineScaleSetManagedDiskParameters - from .virtual_machine_scale_set_os_disk_py3 import VirtualMachineScaleSetOSDisk - from .virtual_machine_scale_set_update_os_disk_py3 import VirtualMachineScaleSetUpdateOSDisk - from .virtual_machine_scale_set_data_disk_py3 import VirtualMachineScaleSetDataDisk - from .virtual_machine_scale_set_storage_profile_py3 import VirtualMachineScaleSetStorageProfile - from .virtual_machine_scale_set_update_storage_profile_py3 import VirtualMachineScaleSetUpdateStorageProfile - from .api_entity_reference_py3 import ApiEntityReference - from .virtual_machine_scale_set_public_ip_address_configuration_dns_settings_py3 import VirtualMachineScaleSetPublicIPAddressConfigurationDnsSettings - from .virtual_machine_scale_set_ip_tag_py3 import VirtualMachineScaleSetIpTag - from .virtual_machine_scale_set_public_ip_address_configuration_py3 import VirtualMachineScaleSetPublicIPAddressConfiguration - from .virtual_machine_scale_set_update_public_ip_address_configuration_py3 import VirtualMachineScaleSetUpdatePublicIPAddressConfiguration - from .virtual_machine_scale_set_ip_configuration_py3 import VirtualMachineScaleSetIPConfiguration - from .virtual_machine_scale_set_update_ip_configuration_py3 import VirtualMachineScaleSetUpdateIPConfiguration - from .virtual_machine_scale_set_network_configuration_dns_settings_py3 import VirtualMachineScaleSetNetworkConfigurationDnsSettings - from .virtual_machine_scale_set_network_configuration_py3 import VirtualMachineScaleSetNetworkConfiguration - from .virtual_machine_scale_set_update_network_configuration_py3 import VirtualMachineScaleSetUpdateNetworkConfiguration - from .virtual_machine_scale_set_network_profile_py3 import VirtualMachineScaleSetNetworkProfile - from .virtual_machine_scale_set_update_network_profile_py3 import VirtualMachineScaleSetUpdateNetworkProfile - from .virtual_machine_scale_set_extension_py3 import VirtualMachineScaleSetExtension - from .virtual_machine_scale_set_extension_profile_py3 import VirtualMachineScaleSetExtensionProfile - from .virtual_machine_scale_set_vm_profile_py3 import VirtualMachineScaleSetVMProfile - from .virtual_machine_scale_set_update_vm_profile_py3 import VirtualMachineScaleSetUpdateVMProfile - from .virtual_machine_scale_set_py3 import VirtualMachineScaleSet - from .virtual_machine_scale_set_vm_reimage_parameters_py3 import VirtualMachineScaleSetVMReimageParameters - from .virtual_machine_scale_set_reimage_parameters_py3 import VirtualMachineScaleSetReimageParameters - from .virtual_machine_scale_set_update_py3 import VirtualMachineScaleSetUpdate - from .virtual_machine_scale_set_vm_instance_ids_py3 import VirtualMachineScaleSetVMInstanceIDs - from .virtual_machine_scale_set_vm_instance_required_ids_py3 import VirtualMachineScaleSetVMInstanceRequiredIDs - from .virtual_machine_status_code_count_py3 import VirtualMachineStatusCodeCount - from .virtual_machine_scale_set_instance_view_statuses_summary_py3 import VirtualMachineScaleSetInstanceViewStatusesSummary - from .virtual_machine_scale_set_vm_extensions_summary_py3 import VirtualMachineScaleSetVMExtensionsSummary - from .virtual_machine_scale_set_instance_view_py3 import VirtualMachineScaleSetInstanceView - from .virtual_machine_scale_set_sku_capacity_py3 import VirtualMachineScaleSetSkuCapacity - from .virtual_machine_scale_set_sku_py3 import VirtualMachineScaleSetSku - from .api_error_base_py3 import ApiErrorBase - from .inner_error_py3 import InnerError - from .api_error_py3 import ApiError - from .rollback_status_info_py3 import RollbackStatusInfo - from .upgrade_operation_history_status_py3 import UpgradeOperationHistoryStatus - from .rolling_upgrade_progress_info_py3 import RollingUpgradeProgressInfo - from .upgrade_operation_historical_status_info_properties_py3 import UpgradeOperationHistoricalStatusInfoProperties - from .upgrade_operation_historical_status_info_py3 import UpgradeOperationHistoricalStatusInfo - from .virtual_machine_health_status_py3 import VirtualMachineHealthStatus - from .virtual_machine_scale_set_vm_instance_view_py3 import VirtualMachineScaleSetVMInstanceView - from .virtual_machine_scale_set_vm_network_profile_configuration_py3 import VirtualMachineScaleSetVMNetworkProfileConfiguration - from .virtual_machine_scale_set_vm_protection_policy_py3 import VirtualMachineScaleSetVMProtectionPolicy - from .virtual_machine_scale_set_vm_py3 import VirtualMachineScaleSetVM - from .rolling_upgrade_running_status_py3 import RollingUpgradeRunningStatus - from .rolling_upgrade_status_info_py3 import RollingUpgradeStatusInfo - from .resource_py3 import Resource - from .update_resource_py3 import UpdateResource - from .sub_resource_read_only_py3 import SubResourceReadOnly - from .recovery_walk_response_py3 import RecoveryWalkResponse - from .request_rate_by_interval_input_py3 import RequestRateByIntervalInput - from .throttled_requests_input_py3 import ThrottledRequestsInput - from .log_analytics_input_base_py3 import LogAnalyticsInputBase - from .log_analytics_output_py3 import LogAnalyticsOutput - from .log_analytics_operation_result_py3 import LogAnalyticsOperationResult - from .vm_scale_set_convert_to_single_placement_group_input_py3 import VMScaleSetConvertToSinglePlacementGroupInput - from .run_command_input_parameter_py3 import RunCommandInputParameter - from .run_command_input_py3 import RunCommandInput - from .run_command_parameter_definition_py3 import RunCommandParameterDefinition - from .run_command_document_base_py3 import RunCommandDocumentBase - from .run_command_document_py3 import RunCommandDocument - from .run_command_result_py3 import RunCommandResult - from .gallery_identifier_py3 import GalleryIdentifier - from .gallery_py3 import Gallery - from .gallery_image_identifier_py3 import GalleryImageIdentifier - from .resource_range_py3 import ResourceRange - from .recommended_machine_configuration_py3 import RecommendedMachineConfiguration - from .disallowed_py3 import Disallowed - from .image_purchase_plan_py3 import ImagePurchasePlan - from .gallery_image_py3 import GalleryImage - from .gallery_image_version_publishing_profile_py3 import GalleryImageVersionPublishingProfile - from .gallery_os_disk_image_py3 import GalleryOSDiskImage - from .gallery_data_disk_image_py3 import GalleryDataDiskImage - from .gallery_image_version_storage_profile_py3 import GalleryImageVersionStorageProfile - from .regional_replication_status_py3 import RegionalReplicationStatus - from .replication_status_py3 import ReplicationStatus - from .gallery_image_version_py3 import GalleryImageVersion - from .target_region_py3 import TargetRegion - from .managed_artifact_py3 import ManagedArtifact - from .gallery_artifact_source_py3 import GalleryArtifactSource - from .gallery_artifact_publishing_profile_base_py3 import GalleryArtifactPublishingProfileBase - from .gallery_disk_image_py3 import GalleryDiskImage + from ._models_py3 import AdditionalCapabilities + from ._models_py3 import AdditionalUnattendContent + from ._models_py3 import ApiEntityReference + from ._models_py3 import ApiError + from ._models_py3 import ApiErrorBase + from ._models_py3 import AutomaticOSUpgradePolicy + from ._models_py3 import AutomaticOSUpgradeProperties + from ._models_py3 import AvailabilitySet + from ._models_py3 import AvailabilitySetUpdate + from ._models_py3 import BootDiagnostics + from ._models_py3 import BootDiagnosticsInstanceView + from ._models_py3 import ComputeOperationValue + from ._models_py3 import DataDisk + from ._models_py3 import DataDiskImage + from ._models_py3 import DedicatedHost + from ._models_py3 import DedicatedHostAllocatableVM + from ._models_py3 import DedicatedHostAvailableCapacity + from ._models_py3 import DedicatedHostGroup + from ._models_py3 import DedicatedHostGroupUpdate + from ._models_py3 import DedicatedHostInstanceView + from ._models_py3 import DedicatedHostUpdate + from ._models_py3 import DiagnosticsProfile + from ._models_py3 import DiffDiskSettings + from ._models_py3 import Disallowed + from ._models_py3 import DiskEncryptionSettings + from ._models_py3 import DiskInstanceView + from ._models_py3 import Gallery + from ._models_py3 import GalleryApplication + from ._models_py3 import GalleryApplicationVersion + from ._models_py3 import GalleryApplicationVersionPublishingProfile + from ._models_py3 import GalleryArtifactPublishingProfileBase + from ._models_py3 import GalleryArtifactSource + from ._models_py3 import GalleryDataDiskImage + from ._models_py3 import GalleryDiskImage + from ._models_py3 import GalleryIdentifier + from ._models_py3 import GalleryImage + from ._models_py3 import GalleryImageIdentifier + from ._models_py3 import GalleryImageVersion + from ._models_py3 import GalleryImageVersionPublishingProfile + from ._models_py3 import GalleryImageVersionStorageProfile + from ._models_py3 import GalleryOSDiskImage + from ._models_py3 import HardwareProfile + from ._models_py3 import Image + from ._models_py3 import ImageDataDisk + from ._models_py3 import ImageOSDisk + from ._models_py3 import ImagePurchasePlan + from ._models_py3 import ImageReference + from ._models_py3 import ImageStorageProfile + from ._models_py3 import ImageUpdate + from ._models_py3 import InnerError + from ._models_py3 import InstanceViewStatus + from ._models_py3 import KeyVaultKeyReference + from ._models_py3 import KeyVaultSecretReference + from ._models_py3 import LinuxConfiguration + from ._models_py3 import LogAnalyticsInputBase + from ._models_py3 import LogAnalyticsOperationResult + from ._models_py3 import LogAnalyticsOutput + from ._models_py3 import MaintenanceRedeployStatus + from ._models_py3 import ManagedArtifact + from ._models_py3 import ManagedDiskParameters + from ._models_py3 import NetworkInterfaceReference + from ._models_py3 import NetworkProfile + from ._models_py3 import OSDisk + from ._models_py3 import OSDiskImage + from ._models_py3 import OSProfile + from ._models_py3 import Plan + from ._models_py3 import ProximityPlacementGroup + from ._models_py3 import ProximityPlacementGroupUpdate + from ._models_py3 import PurchasePlan + from ._models_py3 import RecommendedMachineConfiguration + from ._models_py3 import RecoveryWalkResponse + from ._models_py3 import RegionalReplicationStatus + from ._models_py3 import ReplicationStatus + from ._models_py3 import RequestRateByIntervalInput + from ._models_py3 import Resource + from ._models_py3 import ResourceRange + from ._models_py3 import RollbackStatusInfo + from ._models_py3 import RollingUpgradePolicy + from ._models_py3 import RollingUpgradeProgressInfo + from ._models_py3 import RollingUpgradeRunningStatus + from ._models_py3 import RollingUpgradeStatusInfo + from ._models_py3 import RunCommandDocument + from ._models_py3 import RunCommandDocumentBase + from ._models_py3 import RunCommandInput + from ._models_py3 import RunCommandInputParameter + from ._models_py3 import RunCommandParameterDefinition + from ._models_py3 import RunCommandResult + from ._models_py3 import Sku + from ._models_py3 import SshConfiguration + from ._models_py3 import SshPublicKey + from ._models_py3 import StorageProfile + from ._models_py3 import SubResource + from ._models_py3 import SubResourceReadOnly + from ._models_py3 import TargetRegion + from ._models_py3 import ThrottledRequestsInput + from ._models_py3 import UpdateResource + from ._models_py3 import UpgradeOperationHistoricalStatusInfo + from ._models_py3 import UpgradeOperationHistoricalStatusInfoProperties + from ._models_py3 import UpgradeOperationHistoryStatus + from ._models_py3 import UpgradePolicy + from ._models_py3 import Usage + from ._models_py3 import UsageName + from ._models_py3 import UserArtifactSource + from ._models_py3 import VaultCertificate + from ._models_py3 import VaultSecretGroup + from ._models_py3 import VirtualHardDisk + from ._models_py3 import VirtualMachine + from ._models_py3 import VirtualMachineAgentInstanceView + from ._models_py3 import VirtualMachineCaptureParameters + from ._models_py3 import VirtualMachineCaptureResult + from ._models_py3 import VirtualMachineExtension + from ._models_py3 import VirtualMachineExtensionHandlerInstanceView + from ._models_py3 import VirtualMachineExtensionImage + from ._models_py3 import VirtualMachineExtensionInstanceView + from ._models_py3 import VirtualMachineExtensionsListResult + from ._models_py3 import VirtualMachineExtensionUpdate + from ._models_py3 import VirtualMachineHealthStatus + from ._models_py3 import VirtualMachineIdentity + from ._models_py3 import VirtualMachineIdentityUserAssignedIdentitiesValue + from ._models_py3 import VirtualMachineImage + from ._models_py3 import VirtualMachineImageResource + from ._models_py3 import VirtualMachineInstanceView + from ._models_py3 import VirtualMachineReimageParameters + from ._models_py3 import VirtualMachineScaleSet + from ._models_py3 import VirtualMachineScaleSetDataDisk + from ._models_py3 import VirtualMachineScaleSetExtension + from ._models_py3 import VirtualMachineScaleSetExtensionProfile + from ._models_py3 import VirtualMachineScaleSetIdentity + from ._models_py3 import VirtualMachineScaleSetIdentityUserAssignedIdentitiesValue + from ._models_py3 import VirtualMachineScaleSetInstanceView + from ._models_py3 import VirtualMachineScaleSetInstanceViewStatusesSummary + from ._models_py3 import VirtualMachineScaleSetIPConfiguration + from ._models_py3 import VirtualMachineScaleSetIpTag + from ._models_py3 import VirtualMachineScaleSetManagedDiskParameters + from ._models_py3 import VirtualMachineScaleSetNetworkConfiguration + from ._models_py3 import VirtualMachineScaleSetNetworkConfigurationDnsSettings + from ._models_py3 import VirtualMachineScaleSetNetworkProfile + from ._models_py3 import VirtualMachineScaleSetOSDisk + from ._models_py3 import VirtualMachineScaleSetOSProfile + from ._models_py3 import VirtualMachineScaleSetPublicIPAddressConfiguration + from ._models_py3 import VirtualMachineScaleSetPublicIPAddressConfigurationDnsSettings + from ._models_py3 import VirtualMachineScaleSetReimageParameters + from ._models_py3 import VirtualMachineScaleSetSku + from ._models_py3 import VirtualMachineScaleSetSkuCapacity + from ._models_py3 import VirtualMachineScaleSetStorageProfile + from ._models_py3 import VirtualMachineScaleSetUpdate + from ._models_py3 import VirtualMachineScaleSetUpdateIPConfiguration + from ._models_py3 import VirtualMachineScaleSetUpdateNetworkConfiguration + from ._models_py3 import VirtualMachineScaleSetUpdateNetworkProfile + from ._models_py3 import VirtualMachineScaleSetUpdateOSDisk + from ._models_py3 import VirtualMachineScaleSetUpdateOSProfile + from ._models_py3 import VirtualMachineScaleSetUpdatePublicIPAddressConfiguration + from ._models_py3 import VirtualMachineScaleSetUpdateStorageProfile + from ._models_py3 import VirtualMachineScaleSetUpdateVMProfile + from ._models_py3 import VirtualMachineScaleSetVM + from ._models_py3 import VirtualMachineScaleSetVMExtensionsSummary + from ._models_py3 import VirtualMachineScaleSetVMInstanceIDs + from ._models_py3 import VirtualMachineScaleSetVMInstanceRequiredIDs + from ._models_py3 import VirtualMachineScaleSetVMInstanceView + from ._models_py3 import VirtualMachineScaleSetVMNetworkProfileConfiguration + from ._models_py3 import VirtualMachineScaleSetVMProfile + from ._models_py3 import VirtualMachineScaleSetVMProtectionPolicy + from ._models_py3 import VirtualMachineScaleSetVMReimageParameters + from ._models_py3 import VirtualMachineSize + from ._models_py3 import VirtualMachineStatusCodeCount + from ._models_py3 import VirtualMachineUpdate + from ._models_py3 import VMScaleSetConvertToSinglePlacementGroupInput + from ._models_py3 import WindowsConfiguration + from ._models_py3 import WinRMConfiguration + from ._models_py3 import WinRMListener except (SyntaxError, ImportError): - from .compute_operation_value import ComputeOperationValue - from .instance_view_status import InstanceViewStatus - from .sub_resource import SubResource - from .sku import Sku - from .availability_set import AvailabilitySet - from .availability_set_update import AvailabilitySetUpdate - from .proximity_placement_group import ProximityPlacementGroup - from .proximity_placement_group_update import ProximityPlacementGroupUpdate - from .virtual_machine_size import VirtualMachineSize - from .virtual_machine_extension_image import VirtualMachineExtensionImage - from .virtual_machine_image_resource import VirtualMachineImageResource - from .virtual_machine_extension_instance_view import VirtualMachineExtensionInstanceView - from .virtual_machine_extension import VirtualMachineExtension - from .virtual_machine_extension_update import VirtualMachineExtensionUpdate - from .virtual_machine_extensions_list_result import VirtualMachineExtensionsListResult - from .purchase_plan import PurchasePlan - from .os_disk_image import OSDiskImage - from .data_disk_image import DataDiskImage - from .automatic_os_upgrade_properties import AutomaticOSUpgradeProperties - from .virtual_machine_image import VirtualMachineImage - from .usage_name import UsageName - from .usage import Usage - from .virtual_machine_reimage_parameters import VirtualMachineReimageParameters - from .virtual_machine_capture_parameters import VirtualMachineCaptureParameters - from .virtual_machine_capture_result import VirtualMachineCaptureResult - from .plan import Plan - from .hardware_profile import HardwareProfile - from .image_reference import ImageReference - from .key_vault_secret_reference import KeyVaultSecretReference - from .key_vault_key_reference import KeyVaultKeyReference - from .disk_encryption_settings import DiskEncryptionSettings - from .virtual_hard_disk import VirtualHardDisk - from .diff_disk_settings import DiffDiskSettings - from .managed_disk_parameters import ManagedDiskParameters - from .os_disk import OSDisk - from .data_disk import DataDisk - from .storage_profile import StorageProfile - from .additional_capabilities import AdditionalCapabilities - from .additional_unattend_content import AdditionalUnattendContent - from .win_rm_listener import WinRMListener - from .win_rm_configuration import WinRMConfiguration - from .windows_configuration import WindowsConfiguration - from .ssh_public_key import SshPublicKey - from .ssh_configuration import SshConfiguration - from .linux_configuration import LinuxConfiguration - from .vault_certificate import VaultCertificate - from .vault_secret_group import VaultSecretGroup - from .os_profile import OSProfile - from .network_interface_reference import NetworkInterfaceReference - from .network_profile import NetworkProfile - from .boot_diagnostics import BootDiagnostics - from .diagnostics_profile import DiagnosticsProfile - from .virtual_machine_extension_handler_instance_view import VirtualMachineExtensionHandlerInstanceView - from .virtual_machine_agent_instance_view import VirtualMachineAgentInstanceView - from .disk_instance_view import DiskInstanceView - from .boot_diagnostics_instance_view import BootDiagnosticsInstanceView - from .virtual_machine_identity_user_assigned_identities_value import VirtualMachineIdentityUserAssignedIdentitiesValue - from .virtual_machine_identity import VirtualMachineIdentity - from .maintenance_redeploy_status import MaintenanceRedeployStatus - from .virtual_machine_instance_view import VirtualMachineInstanceView - from .virtual_machine import VirtualMachine - from .virtual_machine_update import VirtualMachineUpdate - from .automatic_os_upgrade_policy import AutomaticOSUpgradePolicy - from .rolling_upgrade_policy import RollingUpgradePolicy - from .upgrade_policy import UpgradePolicy - from .image_os_disk import ImageOSDisk - from .image_data_disk import ImageDataDisk - from .image_storage_profile import ImageStorageProfile - from .image import Image - from .image_update import ImageUpdate - from .virtual_machine_scale_set_identity_user_assigned_identities_value import VirtualMachineScaleSetIdentityUserAssignedIdentitiesValue - from .virtual_machine_scale_set_identity import VirtualMachineScaleSetIdentity - from .virtual_machine_scale_set_os_profile import VirtualMachineScaleSetOSProfile - from .virtual_machine_scale_set_update_os_profile import VirtualMachineScaleSetUpdateOSProfile - from .virtual_machine_scale_set_managed_disk_parameters import VirtualMachineScaleSetManagedDiskParameters - from .virtual_machine_scale_set_os_disk import VirtualMachineScaleSetOSDisk - from .virtual_machine_scale_set_update_os_disk import VirtualMachineScaleSetUpdateOSDisk - from .virtual_machine_scale_set_data_disk import VirtualMachineScaleSetDataDisk - from .virtual_machine_scale_set_storage_profile import VirtualMachineScaleSetStorageProfile - from .virtual_machine_scale_set_update_storage_profile import VirtualMachineScaleSetUpdateStorageProfile - from .api_entity_reference import ApiEntityReference - from .virtual_machine_scale_set_public_ip_address_configuration_dns_settings import VirtualMachineScaleSetPublicIPAddressConfigurationDnsSettings - from .virtual_machine_scale_set_ip_tag import VirtualMachineScaleSetIpTag - from .virtual_machine_scale_set_public_ip_address_configuration import VirtualMachineScaleSetPublicIPAddressConfiguration - from .virtual_machine_scale_set_update_public_ip_address_configuration import VirtualMachineScaleSetUpdatePublicIPAddressConfiguration - from .virtual_machine_scale_set_ip_configuration import VirtualMachineScaleSetIPConfiguration - from .virtual_machine_scale_set_update_ip_configuration import VirtualMachineScaleSetUpdateIPConfiguration - from .virtual_machine_scale_set_network_configuration_dns_settings import VirtualMachineScaleSetNetworkConfigurationDnsSettings - from .virtual_machine_scale_set_network_configuration import VirtualMachineScaleSetNetworkConfiguration - from .virtual_machine_scale_set_update_network_configuration import VirtualMachineScaleSetUpdateNetworkConfiguration - from .virtual_machine_scale_set_network_profile import VirtualMachineScaleSetNetworkProfile - from .virtual_machine_scale_set_update_network_profile import VirtualMachineScaleSetUpdateNetworkProfile - from .virtual_machine_scale_set_extension import VirtualMachineScaleSetExtension - from .virtual_machine_scale_set_extension_profile import VirtualMachineScaleSetExtensionProfile - from .virtual_machine_scale_set_vm_profile import VirtualMachineScaleSetVMProfile - from .virtual_machine_scale_set_update_vm_profile import VirtualMachineScaleSetUpdateVMProfile - from .virtual_machine_scale_set import VirtualMachineScaleSet - from .virtual_machine_scale_set_vm_reimage_parameters import VirtualMachineScaleSetVMReimageParameters - from .virtual_machine_scale_set_reimage_parameters import VirtualMachineScaleSetReimageParameters - from .virtual_machine_scale_set_update import VirtualMachineScaleSetUpdate - from .virtual_machine_scale_set_vm_instance_ids import VirtualMachineScaleSetVMInstanceIDs - from .virtual_machine_scale_set_vm_instance_required_ids import VirtualMachineScaleSetVMInstanceRequiredIDs - from .virtual_machine_status_code_count import VirtualMachineStatusCodeCount - from .virtual_machine_scale_set_instance_view_statuses_summary import VirtualMachineScaleSetInstanceViewStatusesSummary - from .virtual_machine_scale_set_vm_extensions_summary import VirtualMachineScaleSetVMExtensionsSummary - from .virtual_machine_scale_set_instance_view import VirtualMachineScaleSetInstanceView - from .virtual_machine_scale_set_sku_capacity import VirtualMachineScaleSetSkuCapacity - from .virtual_machine_scale_set_sku import VirtualMachineScaleSetSku - from .api_error_base import ApiErrorBase - from .inner_error import InnerError - from .api_error import ApiError - from .rollback_status_info import RollbackStatusInfo - from .upgrade_operation_history_status import UpgradeOperationHistoryStatus - from .rolling_upgrade_progress_info import RollingUpgradeProgressInfo - from .upgrade_operation_historical_status_info_properties import UpgradeOperationHistoricalStatusInfoProperties - from .upgrade_operation_historical_status_info import UpgradeOperationHistoricalStatusInfo - from .virtual_machine_health_status import VirtualMachineHealthStatus - from .virtual_machine_scale_set_vm_instance_view import VirtualMachineScaleSetVMInstanceView - from .virtual_machine_scale_set_vm_network_profile_configuration import VirtualMachineScaleSetVMNetworkProfileConfiguration - from .virtual_machine_scale_set_vm_protection_policy import VirtualMachineScaleSetVMProtectionPolicy - from .virtual_machine_scale_set_vm import VirtualMachineScaleSetVM - from .rolling_upgrade_running_status import RollingUpgradeRunningStatus - from .rolling_upgrade_status_info import RollingUpgradeStatusInfo - from .resource import Resource - from .update_resource import UpdateResource - from .sub_resource_read_only import SubResourceReadOnly - from .recovery_walk_response import RecoveryWalkResponse - from .request_rate_by_interval_input import RequestRateByIntervalInput - from .throttled_requests_input import ThrottledRequestsInput - from .log_analytics_input_base import LogAnalyticsInputBase - from .log_analytics_output import LogAnalyticsOutput - from .log_analytics_operation_result import LogAnalyticsOperationResult - from .vm_scale_set_convert_to_single_placement_group_input import VMScaleSetConvertToSinglePlacementGroupInput - from .run_command_input_parameter import RunCommandInputParameter - from .run_command_input import RunCommandInput - from .run_command_parameter_definition import RunCommandParameterDefinition - from .run_command_document_base import RunCommandDocumentBase - from .run_command_document import RunCommandDocument - from .run_command_result import RunCommandResult - from .gallery_identifier import GalleryIdentifier - from .gallery import Gallery - from .gallery_image_identifier import GalleryImageIdentifier - from .resource_range import ResourceRange - from .recommended_machine_configuration import RecommendedMachineConfiguration - from .disallowed import Disallowed - from .image_purchase_plan import ImagePurchasePlan - from .gallery_image import GalleryImage - from .gallery_image_version_publishing_profile import GalleryImageVersionPublishingProfile - from .gallery_os_disk_image import GalleryOSDiskImage - from .gallery_data_disk_image import GalleryDataDiskImage - from .gallery_image_version_storage_profile import GalleryImageVersionStorageProfile - from .regional_replication_status import RegionalReplicationStatus - from .replication_status import ReplicationStatus - from .gallery_image_version import GalleryImageVersion - from .target_region import TargetRegion - from .managed_artifact import ManagedArtifact - from .gallery_artifact_source import GalleryArtifactSource - from .gallery_artifact_publishing_profile_base import GalleryArtifactPublishingProfileBase - from .gallery_disk_image import GalleryDiskImage -from .compute_operation_value_paged import ComputeOperationValuePaged -from .availability_set_paged import AvailabilitySetPaged -from .virtual_machine_size_paged import VirtualMachineSizePaged -from .proximity_placement_group_paged import ProximityPlacementGroupPaged -from .usage_paged import UsagePaged -from .virtual_machine_paged import VirtualMachinePaged -from .image_paged import ImagePaged -from .virtual_machine_scale_set_paged import VirtualMachineScaleSetPaged -from .virtual_machine_scale_set_sku_paged import VirtualMachineScaleSetSkuPaged -from .upgrade_operation_historical_status_info_paged import UpgradeOperationHistoricalStatusInfoPaged -from .virtual_machine_scale_set_extension_paged import VirtualMachineScaleSetExtensionPaged -from .virtual_machine_scale_set_vm_paged import VirtualMachineScaleSetVMPaged -from .run_command_document_base_paged import RunCommandDocumentBasePaged -from .gallery_paged import GalleryPaged -from .gallery_image_paged import GalleryImagePaged -from .gallery_image_version_paged import GalleryImageVersionPaged -from .compute_management_client_enums import ( + from ._models import AdditionalCapabilities + from ._models import AdditionalUnattendContent + from ._models import ApiEntityReference + from ._models import ApiError + from ._models import ApiErrorBase + from ._models import AutomaticOSUpgradePolicy + from ._models import AutomaticOSUpgradeProperties + from ._models import AvailabilitySet + from ._models import AvailabilitySetUpdate + from ._models import BootDiagnostics + from ._models import BootDiagnosticsInstanceView + from ._models import ComputeOperationValue + from ._models import DataDisk + from ._models import DataDiskImage + from ._models import DedicatedHost + from ._models import DedicatedHostAllocatableVM + from ._models import DedicatedHostAvailableCapacity + from ._models import DedicatedHostGroup + from ._models import DedicatedHostGroupUpdate + from ._models import DedicatedHostInstanceView + from ._models import DedicatedHostUpdate + from ._models import DiagnosticsProfile + from ._models import DiffDiskSettings + from ._models import Disallowed + from ._models import DiskEncryptionSettings + from ._models import DiskInstanceView + from ._models import Gallery + from ._models import GalleryApplication + from ._models import GalleryApplicationVersion + from ._models import GalleryApplicationVersionPublishingProfile + from ._models import GalleryArtifactPublishingProfileBase + from ._models import GalleryArtifactSource + from ._models import GalleryDataDiskImage + from ._models import GalleryDiskImage + from ._models import GalleryIdentifier + from ._models import GalleryImage + from ._models import GalleryImageIdentifier + from ._models import GalleryImageVersion + from ._models import GalleryImageVersionPublishingProfile + from ._models import GalleryImageVersionStorageProfile + from ._models import GalleryOSDiskImage + from ._models import HardwareProfile + from ._models import Image + from ._models import ImageDataDisk + from ._models import ImageOSDisk + from ._models import ImagePurchasePlan + from ._models import ImageReference + from ._models import ImageStorageProfile + from ._models import ImageUpdate + from ._models import InnerError + from ._models import InstanceViewStatus + from ._models import KeyVaultKeyReference + from ._models import KeyVaultSecretReference + from ._models import LinuxConfiguration + from ._models import LogAnalyticsInputBase + from ._models import LogAnalyticsOperationResult + from ._models import LogAnalyticsOutput + from ._models import MaintenanceRedeployStatus + from ._models import ManagedArtifact + from ._models import ManagedDiskParameters + from ._models import NetworkInterfaceReference + from ._models import NetworkProfile + from ._models import OSDisk + from ._models import OSDiskImage + from ._models import OSProfile + from ._models import Plan + from ._models import ProximityPlacementGroup + from ._models import ProximityPlacementGroupUpdate + from ._models import PurchasePlan + from ._models import RecommendedMachineConfiguration + from ._models import RecoveryWalkResponse + from ._models import RegionalReplicationStatus + from ._models import ReplicationStatus + from ._models import RequestRateByIntervalInput + from ._models import Resource + from ._models import ResourceRange + from ._models import RollbackStatusInfo + from ._models import RollingUpgradePolicy + from ._models import RollingUpgradeProgressInfo + from ._models import RollingUpgradeRunningStatus + from ._models import RollingUpgradeStatusInfo + from ._models import RunCommandDocument + from ._models import RunCommandDocumentBase + from ._models import RunCommandInput + from ._models import RunCommandInputParameter + from ._models import RunCommandParameterDefinition + from ._models import RunCommandResult + from ._models import Sku + from ._models import SshConfiguration + from ._models import SshPublicKey + from ._models import StorageProfile + from ._models import SubResource + from ._models import SubResourceReadOnly + from ._models import TargetRegion + from ._models import ThrottledRequestsInput + from ._models import UpdateResource + from ._models import UpgradeOperationHistoricalStatusInfo + from ._models import UpgradeOperationHistoricalStatusInfoProperties + from ._models import UpgradeOperationHistoryStatus + from ._models import UpgradePolicy + from ._models import Usage + from ._models import UsageName + from ._models import UserArtifactSource + from ._models import VaultCertificate + from ._models import VaultSecretGroup + from ._models import VirtualHardDisk + from ._models import VirtualMachine + from ._models import VirtualMachineAgentInstanceView + from ._models import VirtualMachineCaptureParameters + from ._models import VirtualMachineCaptureResult + from ._models import VirtualMachineExtension + from ._models import VirtualMachineExtensionHandlerInstanceView + from ._models import VirtualMachineExtensionImage + from ._models import VirtualMachineExtensionInstanceView + from ._models import VirtualMachineExtensionsListResult + from ._models import VirtualMachineExtensionUpdate + from ._models import VirtualMachineHealthStatus + from ._models import VirtualMachineIdentity + from ._models import VirtualMachineIdentityUserAssignedIdentitiesValue + from ._models import VirtualMachineImage + from ._models import VirtualMachineImageResource + from ._models import VirtualMachineInstanceView + from ._models import VirtualMachineReimageParameters + from ._models import VirtualMachineScaleSet + from ._models import VirtualMachineScaleSetDataDisk + from ._models import VirtualMachineScaleSetExtension + from ._models import VirtualMachineScaleSetExtensionProfile + from ._models import VirtualMachineScaleSetIdentity + from ._models import VirtualMachineScaleSetIdentityUserAssignedIdentitiesValue + from ._models import VirtualMachineScaleSetInstanceView + from ._models import VirtualMachineScaleSetInstanceViewStatusesSummary + from ._models import VirtualMachineScaleSetIPConfiguration + from ._models import VirtualMachineScaleSetIpTag + from ._models import VirtualMachineScaleSetManagedDiskParameters + from ._models import VirtualMachineScaleSetNetworkConfiguration + from ._models import VirtualMachineScaleSetNetworkConfigurationDnsSettings + from ._models import VirtualMachineScaleSetNetworkProfile + from ._models import VirtualMachineScaleSetOSDisk + from ._models import VirtualMachineScaleSetOSProfile + from ._models import VirtualMachineScaleSetPublicIPAddressConfiguration + from ._models import VirtualMachineScaleSetPublicIPAddressConfigurationDnsSettings + from ._models import VirtualMachineScaleSetReimageParameters + from ._models import VirtualMachineScaleSetSku + from ._models import VirtualMachineScaleSetSkuCapacity + from ._models import VirtualMachineScaleSetStorageProfile + from ._models import VirtualMachineScaleSetUpdate + from ._models import VirtualMachineScaleSetUpdateIPConfiguration + from ._models import VirtualMachineScaleSetUpdateNetworkConfiguration + from ._models import VirtualMachineScaleSetUpdateNetworkProfile + from ._models import VirtualMachineScaleSetUpdateOSDisk + from ._models import VirtualMachineScaleSetUpdateOSProfile + from ._models import VirtualMachineScaleSetUpdatePublicIPAddressConfiguration + from ._models import VirtualMachineScaleSetUpdateStorageProfile + from ._models import VirtualMachineScaleSetUpdateVMProfile + from ._models import VirtualMachineScaleSetVM + from ._models import VirtualMachineScaleSetVMExtensionsSummary + from ._models import VirtualMachineScaleSetVMInstanceIDs + from ._models import VirtualMachineScaleSetVMInstanceRequiredIDs + from ._models import VirtualMachineScaleSetVMInstanceView + from ._models import VirtualMachineScaleSetVMNetworkProfileConfiguration + from ._models import VirtualMachineScaleSetVMProfile + from ._models import VirtualMachineScaleSetVMProtectionPolicy + from ._models import VirtualMachineScaleSetVMReimageParameters + from ._models import VirtualMachineSize + from ._models import VirtualMachineStatusCodeCount + from ._models import VirtualMachineUpdate + from ._models import VMScaleSetConvertToSinglePlacementGroupInput + from ._models import WindowsConfiguration + from ._models import WinRMConfiguration + from ._models import WinRMListener +from ._paged_models import AvailabilitySetPaged +from ._paged_models import ComputeOperationValuePaged +from ._paged_models import DedicatedHostGroupPaged +from ._paged_models import DedicatedHostPaged +from ._paged_models import GalleryApplicationPaged +from ._paged_models import GalleryApplicationVersionPaged +from ._paged_models import GalleryImagePaged +from ._paged_models import GalleryImageVersionPaged +from ._paged_models import GalleryPaged +from ._paged_models import ImagePaged +from ._paged_models import ProximityPlacementGroupPaged +from ._paged_models import RunCommandDocumentBasePaged +from ._paged_models import UpgradeOperationHistoricalStatusInfoPaged +from ._paged_models import UsagePaged +from ._paged_models import VirtualMachinePaged +from ._paged_models import VirtualMachineScaleSetExtensionPaged +from ._paged_models import VirtualMachineScaleSetPaged +from ._paged_models import VirtualMachineScaleSetSkuPaged +from ._paged_models import VirtualMachineScaleSetVMPaged +from ._paged_models import VirtualMachineSizePaged +from ._compute_management_client_enums import ( HyperVGenerationTypes, StatusLevelTypes, AvailabilitySetSkuTypes, ProximityPlacementGroupType, + DedicatedHostLicenseTypes, OperatingSystemTypes, VirtualMachineSizeTypes, CachingTypes, @@ -362,6 +389,7 @@ ProtocolTypes, ResourceIdentityType, MaintenanceOperationResultCodeTypes, + HyperVGenerationType, UpgradeMode, OperatingSystemStateTypes, IPVersion, @@ -373,178 +401,191 @@ RollingUpgradeStatusCode, RollingUpgradeActionType, IntervalInMins, - StorageAccountType, AggregatedReplicationState, ReplicationState, + StorageAccountType, HostCaching, InstanceViewTypes, ReplicationStatusTypes, ) __all__ = [ - 'ComputeOperationValue', - 'InstanceViewStatus', - 'SubResource', - 'Sku', + 'AdditionalCapabilities', + 'AdditionalUnattendContent', + 'ApiEntityReference', + 'ApiError', + 'ApiErrorBase', + 'AutomaticOSUpgradePolicy', + 'AutomaticOSUpgradeProperties', 'AvailabilitySet', 'AvailabilitySetUpdate', - 'ProximityPlacementGroup', - 'ProximityPlacementGroupUpdate', - 'VirtualMachineSize', - 'VirtualMachineExtensionImage', - 'VirtualMachineImageResource', - 'VirtualMachineExtensionInstanceView', - 'VirtualMachineExtension', - 'VirtualMachineExtensionUpdate', - 'VirtualMachineExtensionsListResult', - 'PurchasePlan', - 'OSDiskImage', + 'BootDiagnostics', + 'BootDiagnosticsInstanceView', + 'ComputeOperationValue', + 'DataDisk', 'DataDiskImage', - 'AutomaticOSUpgradeProperties', - 'VirtualMachineImage', - 'UsageName', - 'Usage', - 'VirtualMachineReimageParameters', - 'VirtualMachineCaptureParameters', - 'VirtualMachineCaptureResult', - 'Plan', + 'DedicatedHost', + 'DedicatedHostAllocatableVM', + 'DedicatedHostAvailableCapacity', + 'DedicatedHostGroup', + 'DedicatedHostGroupUpdate', + 'DedicatedHostInstanceView', + 'DedicatedHostUpdate', + 'DiagnosticsProfile', + 'DiffDiskSettings', + 'Disallowed', + 'DiskEncryptionSettings', + 'DiskInstanceView', + 'Gallery', + 'GalleryApplication', + 'GalleryApplicationVersion', + 'GalleryApplicationVersionPublishingProfile', + 'GalleryArtifactPublishingProfileBase', + 'GalleryArtifactSource', + 'GalleryDataDiskImage', + 'GalleryDiskImage', + 'GalleryIdentifier', + 'GalleryImage', + 'GalleryImageIdentifier', + 'GalleryImageVersion', + 'GalleryImageVersionPublishingProfile', + 'GalleryImageVersionStorageProfile', + 'GalleryOSDiskImage', 'HardwareProfile', + 'Image', + 'ImageDataDisk', + 'ImageOSDisk', + 'ImagePurchasePlan', 'ImageReference', - 'KeyVaultSecretReference', + 'ImageStorageProfile', + 'ImageUpdate', + 'InnerError', + 'InstanceViewStatus', 'KeyVaultKeyReference', - 'DiskEncryptionSettings', - 'VirtualHardDisk', - 'DiffDiskSettings', + 'KeyVaultSecretReference', + 'LinuxConfiguration', + 'LogAnalyticsInputBase', + 'LogAnalyticsOperationResult', + 'LogAnalyticsOutput', + 'MaintenanceRedeployStatus', + 'ManagedArtifact', 'ManagedDiskParameters', + 'NetworkInterfaceReference', + 'NetworkProfile', 'OSDisk', - 'DataDisk', - 'StorageProfile', - 'AdditionalCapabilities', - 'AdditionalUnattendContent', - 'WinRMListener', - 'WinRMConfiguration', - 'WindowsConfiguration', - 'SshPublicKey', + 'OSDiskImage', + 'OSProfile', + 'Plan', + 'ProximityPlacementGroup', + 'ProximityPlacementGroupUpdate', + 'PurchasePlan', + 'RecommendedMachineConfiguration', + 'RecoveryWalkResponse', + 'RegionalReplicationStatus', + 'ReplicationStatus', + 'RequestRateByIntervalInput', + 'Resource', + 'ResourceRange', + 'RollbackStatusInfo', + 'RollingUpgradePolicy', + 'RollingUpgradeProgressInfo', + 'RollingUpgradeRunningStatus', + 'RollingUpgradeStatusInfo', + 'RunCommandDocument', + 'RunCommandDocumentBase', + 'RunCommandInput', + 'RunCommandInputParameter', + 'RunCommandParameterDefinition', + 'RunCommandResult', + 'Sku', 'SshConfiguration', - 'LinuxConfiguration', + 'SshPublicKey', + 'StorageProfile', + 'SubResource', + 'SubResourceReadOnly', + 'TargetRegion', + 'ThrottledRequestsInput', + 'UpdateResource', + 'UpgradeOperationHistoricalStatusInfo', + 'UpgradeOperationHistoricalStatusInfoProperties', + 'UpgradeOperationHistoryStatus', + 'UpgradePolicy', + 'Usage', + 'UsageName', + 'UserArtifactSource', 'VaultCertificate', 'VaultSecretGroup', - 'OSProfile', - 'NetworkInterfaceReference', - 'NetworkProfile', - 'BootDiagnostics', - 'DiagnosticsProfile', - 'VirtualMachineExtensionHandlerInstanceView', + 'VirtualHardDisk', + 'VirtualMachine', 'VirtualMachineAgentInstanceView', - 'DiskInstanceView', - 'BootDiagnosticsInstanceView', - 'VirtualMachineIdentityUserAssignedIdentitiesValue', + 'VirtualMachineCaptureParameters', + 'VirtualMachineCaptureResult', + 'VirtualMachineExtension', + 'VirtualMachineExtensionHandlerInstanceView', + 'VirtualMachineExtensionImage', + 'VirtualMachineExtensionInstanceView', + 'VirtualMachineExtensionsListResult', + 'VirtualMachineExtensionUpdate', + 'VirtualMachineHealthStatus', 'VirtualMachineIdentity', - 'MaintenanceRedeployStatus', + 'VirtualMachineIdentityUserAssignedIdentitiesValue', + 'VirtualMachineImage', + 'VirtualMachineImageResource', 'VirtualMachineInstanceView', - 'VirtualMachine', - 'VirtualMachineUpdate', - 'AutomaticOSUpgradePolicy', - 'RollingUpgradePolicy', - 'UpgradePolicy', - 'ImageOSDisk', - 'ImageDataDisk', - 'ImageStorageProfile', - 'Image', - 'ImageUpdate', - 'VirtualMachineScaleSetIdentityUserAssignedIdentitiesValue', + 'VirtualMachineReimageParameters', + 'VirtualMachineScaleSet', + 'VirtualMachineScaleSetDataDisk', + 'VirtualMachineScaleSetExtension', + 'VirtualMachineScaleSetExtensionProfile', 'VirtualMachineScaleSetIdentity', - 'VirtualMachineScaleSetOSProfile', - 'VirtualMachineScaleSetUpdateOSProfile', + 'VirtualMachineScaleSetIdentityUserAssignedIdentitiesValue', + 'VirtualMachineScaleSetInstanceView', + 'VirtualMachineScaleSetInstanceViewStatusesSummary', + 'VirtualMachineScaleSetIPConfiguration', + 'VirtualMachineScaleSetIpTag', 'VirtualMachineScaleSetManagedDiskParameters', + 'VirtualMachineScaleSetNetworkConfiguration', + 'VirtualMachineScaleSetNetworkConfigurationDnsSettings', + 'VirtualMachineScaleSetNetworkProfile', 'VirtualMachineScaleSetOSDisk', - 'VirtualMachineScaleSetUpdateOSDisk', - 'VirtualMachineScaleSetDataDisk', - 'VirtualMachineScaleSetStorageProfile', - 'VirtualMachineScaleSetUpdateStorageProfile', - 'ApiEntityReference', - 'VirtualMachineScaleSetPublicIPAddressConfigurationDnsSettings', - 'VirtualMachineScaleSetIpTag', + 'VirtualMachineScaleSetOSProfile', 'VirtualMachineScaleSetPublicIPAddressConfiguration', - 'VirtualMachineScaleSetUpdatePublicIPAddressConfiguration', - 'VirtualMachineScaleSetIPConfiguration', + 'VirtualMachineScaleSetPublicIPAddressConfigurationDnsSettings', + 'VirtualMachineScaleSetReimageParameters', + 'VirtualMachineScaleSetSku', + 'VirtualMachineScaleSetSkuCapacity', + 'VirtualMachineScaleSetStorageProfile', + 'VirtualMachineScaleSetUpdate', 'VirtualMachineScaleSetUpdateIPConfiguration', - 'VirtualMachineScaleSetNetworkConfigurationDnsSettings', - 'VirtualMachineScaleSetNetworkConfiguration', 'VirtualMachineScaleSetUpdateNetworkConfiguration', - 'VirtualMachineScaleSetNetworkProfile', 'VirtualMachineScaleSetUpdateNetworkProfile', - 'VirtualMachineScaleSetExtension', - 'VirtualMachineScaleSetExtensionProfile', - 'VirtualMachineScaleSetVMProfile', + 'VirtualMachineScaleSetUpdateOSDisk', + 'VirtualMachineScaleSetUpdateOSProfile', + 'VirtualMachineScaleSetUpdatePublicIPAddressConfiguration', + 'VirtualMachineScaleSetUpdateStorageProfile', 'VirtualMachineScaleSetUpdateVMProfile', - 'VirtualMachineScaleSet', - 'VirtualMachineScaleSetVMReimageParameters', - 'VirtualMachineScaleSetReimageParameters', - 'VirtualMachineScaleSetUpdate', + 'VirtualMachineScaleSetVM', + 'VirtualMachineScaleSetVMExtensionsSummary', 'VirtualMachineScaleSetVMInstanceIDs', 'VirtualMachineScaleSetVMInstanceRequiredIDs', - 'VirtualMachineStatusCodeCount', - 'VirtualMachineScaleSetInstanceViewStatusesSummary', - 'VirtualMachineScaleSetVMExtensionsSummary', - 'VirtualMachineScaleSetInstanceView', - 'VirtualMachineScaleSetSkuCapacity', - 'VirtualMachineScaleSetSku', - 'ApiErrorBase', - 'InnerError', - 'ApiError', - 'RollbackStatusInfo', - 'UpgradeOperationHistoryStatus', - 'RollingUpgradeProgressInfo', - 'UpgradeOperationHistoricalStatusInfoProperties', - 'UpgradeOperationHistoricalStatusInfo', - 'VirtualMachineHealthStatus', 'VirtualMachineScaleSetVMInstanceView', 'VirtualMachineScaleSetVMNetworkProfileConfiguration', + 'VirtualMachineScaleSetVMProfile', 'VirtualMachineScaleSetVMProtectionPolicy', - 'VirtualMachineScaleSetVM', - 'RollingUpgradeRunningStatus', - 'RollingUpgradeStatusInfo', - 'Resource', - 'UpdateResource', - 'SubResourceReadOnly', - 'RecoveryWalkResponse', - 'RequestRateByIntervalInput', - 'ThrottledRequestsInput', - 'LogAnalyticsInputBase', - 'LogAnalyticsOutput', - 'LogAnalyticsOperationResult', + 'VirtualMachineScaleSetVMReimageParameters', + 'VirtualMachineSize', + 'VirtualMachineStatusCodeCount', + 'VirtualMachineUpdate', 'VMScaleSetConvertToSinglePlacementGroupInput', - 'RunCommandInputParameter', - 'RunCommandInput', - 'RunCommandParameterDefinition', - 'RunCommandDocumentBase', - 'RunCommandDocument', - 'RunCommandResult', - 'GalleryIdentifier', - 'Gallery', - 'GalleryImageIdentifier', - 'ResourceRange', - 'RecommendedMachineConfiguration', - 'Disallowed', - 'ImagePurchasePlan', - 'GalleryImage', - 'GalleryImageVersionPublishingProfile', - 'GalleryOSDiskImage', - 'GalleryDataDiskImage', - 'GalleryImageVersionStorageProfile', - 'RegionalReplicationStatus', - 'ReplicationStatus', - 'GalleryImageVersion', - 'TargetRegion', - 'ManagedArtifact', - 'GalleryArtifactSource', - 'GalleryArtifactPublishingProfileBase', - 'GalleryDiskImage', + 'WindowsConfiguration', + 'WinRMConfiguration', + 'WinRMListener', 'ComputeOperationValuePaged', 'AvailabilitySetPaged', 'VirtualMachineSizePaged', 'ProximityPlacementGroupPaged', + 'DedicatedHostGroupPaged', + 'DedicatedHostPaged', 'UsagePaged', 'VirtualMachinePaged', 'ImagePaged', @@ -557,10 +598,13 @@ 'GalleryPaged', 'GalleryImagePaged', 'GalleryImageVersionPaged', + 'GalleryApplicationPaged', + 'GalleryApplicationVersionPaged', 'HyperVGenerationTypes', 'StatusLevelTypes', 'AvailabilitySetSkuTypes', 'ProximityPlacementGroupType', + 'DedicatedHostLicenseTypes', 'OperatingSystemTypes', 'VirtualMachineSizeTypes', 'CachingTypes', @@ -573,6 +617,7 @@ 'ProtocolTypes', 'ResourceIdentityType', 'MaintenanceOperationResultCodeTypes', + 'HyperVGenerationType', 'UpgradeMode', 'OperatingSystemStateTypes', 'IPVersion', @@ -584,9 +629,9 @@ 'RollingUpgradeStatusCode', 'RollingUpgradeActionType', 'IntervalInMins', - 'StorageAccountType', 'AggregatedReplicationState', 'ReplicationState', + 'StorageAccountType', 'HostCaching', 'InstanceViewTypes', 'ReplicationStatusTypes', diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/_compute_management_client_enums.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/_compute_management_client_enums.py new file mode 100644 index 000000000000..37b80e93be0f --- /dev/null +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/_compute_management_client_enums.py @@ -0,0 +1,404 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from enum import Enum + + +class HyperVGenerationTypes(str, Enum): + + v1 = "V1" + v2 = "V2" + + +class StatusLevelTypes(str, Enum): + + info = "Info" + warning = "Warning" + error = "Error" + + +class AvailabilitySetSkuTypes(str, Enum): + + classic = "Classic" + aligned = "Aligned" + + +class ProximityPlacementGroupType(str, Enum): + + standard = "Standard" + ultra = "Ultra" + + +class DedicatedHostLicenseTypes(str, Enum): + + none = "None" + windows_server_hybrid = "Windows_Server_Hybrid" + windows_server_perpetual = "Windows_Server_Perpetual" + + +class OperatingSystemTypes(str, Enum): + + windows = "Windows" + linux = "Linux" + + +class VirtualMachineSizeTypes(str, Enum): + + basic_a0 = "Basic_A0" + basic_a1 = "Basic_A1" + basic_a2 = "Basic_A2" + basic_a3 = "Basic_A3" + basic_a4 = "Basic_A4" + standard_a0 = "Standard_A0" + standard_a1 = "Standard_A1" + standard_a2 = "Standard_A2" + standard_a3 = "Standard_A3" + standard_a4 = "Standard_A4" + standard_a5 = "Standard_A5" + standard_a6 = "Standard_A6" + standard_a7 = "Standard_A7" + standard_a8 = "Standard_A8" + standard_a9 = "Standard_A9" + standard_a10 = "Standard_A10" + standard_a11 = "Standard_A11" + standard_a1_v2 = "Standard_A1_v2" + standard_a2_v2 = "Standard_A2_v2" + standard_a4_v2 = "Standard_A4_v2" + standard_a8_v2 = "Standard_A8_v2" + standard_a2m_v2 = "Standard_A2m_v2" + standard_a4m_v2 = "Standard_A4m_v2" + standard_a8m_v2 = "Standard_A8m_v2" + standard_b1s = "Standard_B1s" + standard_b1ms = "Standard_B1ms" + standard_b2s = "Standard_B2s" + standard_b2ms = "Standard_B2ms" + standard_b4ms = "Standard_B4ms" + standard_b8ms = "Standard_B8ms" + standard_d1 = "Standard_D1" + standard_d2 = "Standard_D2" + standard_d3 = "Standard_D3" + standard_d4 = "Standard_D4" + standard_d11 = "Standard_D11" + standard_d12 = "Standard_D12" + standard_d13 = "Standard_D13" + standard_d14 = "Standard_D14" + standard_d1_v2 = "Standard_D1_v2" + standard_d2_v2 = "Standard_D2_v2" + standard_d3_v2 = "Standard_D3_v2" + standard_d4_v2 = "Standard_D4_v2" + standard_d5_v2 = "Standard_D5_v2" + standard_d2_v3 = "Standard_D2_v3" + standard_d4_v3 = "Standard_D4_v3" + standard_d8_v3 = "Standard_D8_v3" + standard_d16_v3 = "Standard_D16_v3" + standard_d32_v3 = "Standard_D32_v3" + standard_d64_v3 = "Standard_D64_v3" + standard_d2s_v3 = "Standard_D2s_v3" + standard_d4s_v3 = "Standard_D4s_v3" + standard_d8s_v3 = "Standard_D8s_v3" + standard_d16s_v3 = "Standard_D16s_v3" + standard_d32s_v3 = "Standard_D32s_v3" + standard_d64s_v3 = "Standard_D64s_v3" + standard_d11_v2 = "Standard_D11_v2" + standard_d12_v2 = "Standard_D12_v2" + standard_d13_v2 = "Standard_D13_v2" + standard_d14_v2 = "Standard_D14_v2" + standard_d15_v2 = "Standard_D15_v2" + standard_ds1 = "Standard_DS1" + standard_ds2 = "Standard_DS2" + standard_ds3 = "Standard_DS3" + standard_ds4 = "Standard_DS4" + standard_ds11 = "Standard_DS11" + standard_ds12 = "Standard_DS12" + standard_ds13 = "Standard_DS13" + standard_ds14 = "Standard_DS14" + standard_ds1_v2 = "Standard_DS1_v2" + standard_ds2_v2 = "Standard_DS2_v2" + standard_ds3_v2 = "Standard_DS3_v2" + standard_ds4_v2 = "Standard_DS4_v2" + standard_ds5_v2 = "Standard_DS5_v2" + standard_ds11_v2 = "Standard_DS11_v2" + standard_ds12_v2 = "Standard_DS12_v2" + standard_ds13_v2 = "Standard_DS13_v2" + standard_ds14_v2 = "Standard_DS14_v2" + standard_ds15_v2 = "Standard_DS15_v2" + standard_ds13_4_v2 = "Standard_DS13-4_v2" + standard_ds13_2_v2 = "Standard_DS13-2_v2" + standard_ds14_8_v2 = "Standard_DS14-8_v2" + standard_ds14_4_v2 = "Standard_DS14-4_v2" + standard_e2_v3 = "Standard_E2_v3" + standard_e4_v3 = "Standard_E4_v3" + standard_e8_v3 = "Standard_E8_v3" + standard_e16_v3 = "Standard_E16_v3" + standard_e32_v3 = "Standard_E32_v3" + standard_e64_v3 = "Standard_E64_v3" + standard_e2s_v3 = "Standard_E2s_v3" + standard_e4s_v3 = "Standard_E4s_v3" + standard_e8s_v3 = "Standard_E8s_v3" + standard_e16s_v3 = "Standard_E16s_v3" + standard_e32s_v3 = "Standard_E32s_v3" + standard_e64s_v3 = "Standard_E64s_v3" + standard_e32_16_v3 = "Standard_E32-16_v3" + standard_e32_8s_v3 = "Standard_E32-8s_v3" + standard_e64_32s_v3 = "Standard_E64-32s_v3" + standard_e64_16s_v3 = "Standard_E64-16s_v3" + standard_f1 = "Standard_F1" + standard_f2 = "Standard_F2" + standard_f4 = "Standard_F4" + standard_f8 = "Standard_F8" + standard_f16 = "Standard_F16" + standard_f1s = "Standard_F1s" + standard_f2s = "Standard_F2s" + standard_f4s = "Standard_F4s" + standard_f8s = "Standard_F8s" + standard_f16s = "Standard_F16s" + standard_f2s_v2 = "Standard_F2s_v2" + standard_f4s_v2 = "Standard_F4s_v2" + standard_f8s_v2 = "Standard_F8s_v2" + standard_f16s_v2 = "Standard_F16s_v2" + standard_f32s_v2 = "Standard_F32s_v2" + standard_f64s_v2 = "Standard_F64s_v2" + standard_f72s_v2 = "Standard_F72s_v2" + standard_g1 = "Standard_G1" + standard_g2 = "Standard_G2" + standard_g3 = "Standard_G3" + standard_g4 = "Standard_G4" + standard_g5 = "Standard_G5" + standard_gs1 = "Standard_GS1" + standard_gs2 = "Standard_GS2" + standard_gs3 = "Standard_GS3" + standard_gs4 = "Standard_GS4" + standard_gs5 = "Standard_GS5" + standard_gs4_8 = "Standard_GS4-8" + standard_gs4_4 = "Standard_GS4-4" + standard_gs5_16 = "Standard_GS5-16" + standard_gs5_8 = "Standard_GS5-8" + standard_h8 = "Standard_H8" + standard_h16 = "Standard_H16" + standard_h8m = "Standard_H8m" + standard_h16m = "Standard_H16m" + standard_h16r = "Standard_H16r" + standard_h16mr = "Standard_H16mr" + standard_l4s = "Standard_L4s" + standard_l8s = "Standard_L8s" + standard_l16s = "Standard_L16s" + standard_l32s = "Standard_L32s" + standard_m64s = "Standard_M64s" + standard_m64ms = "Standard_M64ms" + standard_m128s = "Standard_M128s" + standard_m128ms = "Standard_M128ms" + standard_m64_32ms = "Standard_M64-32ms" + standard_m64_16ms = "Standard_M64-16ms" + standard_m128_64ms = "Standard_M128-64ms" + standard_m128_32ms = "Standard_M128-32ms" + standard_nc6 = "Standard_NC6" + standard_nc12 = "Standard_NC12" + standard_nc24 = "Standard_NC24" + standard_nc24r = "Standard_NC24r" + standard_nc6s_v2 = "Standard_NC6s_v2" + standard_nc12s_v2 = "Standard_NC12s_v2" + standard_nc24s_v2 = "Standard_NC24s_v2" + standard_nc24rs_v2 = "Standard_NC24rs_v2" + standard_nc6s_v3 = "Standard_NC6s_v3" + standard_nc12s_v3 = "Standard_NC12s_v3" + standard_nc24s_v3 = "Standard_NC24s_v3" + standard_nc24rs_v3 = "Standard_NC24rs_v3" + standard_nd6s = "Standard_ND6s" + standard_nd12s = "Standard_ND12s" + standard_nd24s = "Standard_ND24s" + standard_nd24rs = "Standard_ND24rs" + standard_nv6 = "Standard_NV6" + standard_nv12 = "Standard_NV12" + standard_nv24 = "Standard_NV24" + + +class CachingTypes(str, Enum): + + none = "None" + read_only = "ReadOnly" + read_write = "ReadWrite" + + +class DiskCreateOptionTypes(str, Enum): + + from_image = "FromImage" + empty = "Empty" + attach = "Attach" + + +class StorageAccountTypes(str, Enum): + + standard_lrs = "Standard_LRS" + premium_lrs = "Premium_LRS" + standard_ssd_lrs = "StandardSSD_LRS" + ultra_ssd_lrs = "UltraSSD_LRS" + + +class DiffDiskOptions(str, Enum): + + local = "Local" + + +class PassNames(str, Enum): + + oobe_system = "OobeSystem" + + +class ComponentNames(str, Enum): + + microsoft_windows_shell_setup = "Microsoft-Windows-Shell-Setup" + + +class SettingNames(str, Enum): + + auto_logon = "AutoLogon" + first_logon_commands = "FirstLogonCommands" + + +class ProtocolTypes(str, Enum): + + http = "Http" + https = "Https" + + +class ResourceIdentityType(str, Enum): + + system_assigned = "SystemAssigned" + user_assigned = "UserAssigned" + system_assigned_user_assigned = "SystemAssigned, UserAssigned" + none = "None" + + +class MaintenanceOperationResultCodeTypes(str, Enum): + + none = "None" + retry_later = "RetryLater" + maintenance_aborted = "MaintenanceAborted" + maintenance_completed = "MaintenanceCompleted" + + +class HyperVGenerationType(str, Enum): + + v1 = "V1" + v2 = "V2" + + +class UpgradeMode(str, Enum): + + automatic = "Automatic" + manual = "Manual" + rolling = "Rolling" + + +class OperatingSystemStateTypes(str, Enum): + + generalized = "Generalized" + specialized = "Specialized" + + +class IPVersion(str, Enum): + + ipv4 = "IPv4" + ipv6 = "IPv6" + + +class VirtualMachinePriorityTypes(str, Enum): + + regular = "Regular" + low = "Low" + + +class VirtualMachineEvictionPolicyTypes(str, Enum): + + deallocate = "Deallocate" + delete = "Delete" + + +class VirtualMachineScaleSetSkuScaleType(str, Enum): + + automatic = "Automatic" + none = "None" + + +class UpgradeState(str, Enum): + + rolling_forward = "RollingForward" + cancelled = "Cancelled" + completed = "Completed" + faulted = "Faulted" + + +class UpgradeOperationInvoker(str, Enum): + + unknown = "Unknown" + user = "User" + platform = "Platform" + + +class RollingUpgradeStatusCode(str, Enum): + + rolling_forward = "RollingForward" + cancelled = "Cancelled" + completed = "Completed" + faulted = "Faulted" + + +class RollingUpgradeActionType(str, Enum): + + start = "Start" + cancel = "Cancel" + + +class IntervalInMins(str, Enum): + + three_mins = "ThreeMins" + five_mins = "FiveMins" + thirty_mins = "ThirtyMins" + sixty_mins = "SixtyMins" + + +class AggregatedReplicationState(str, Enum): + + unknown = "Unknown" + in_progress = "InProgress" + completed = "Completed" + failed = "Failed" + + +class ReplicationState(str, Enum): + + unknown = "Unknown" + replicating = "Replicating" + completed = "Completed" + failed = "Failed" + + +class StorageAccountType(str, Enum): + + standard_lrs = "Standard_LRS" + standard_zrs = "Standard_ZRS" + + +class HostCaching(str, Enum): + + none = "None" + read_only = "ReadOnly" + read_write = "ReadWrite" + + +class InstanceViewTypes(str, Enum): + + instance_view = "instanceView" + + +class ReplicationStatusTypes(str, Enum): + + replication_status = "ReplicationStatus" diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/_models.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/_models.py new file mode 100644 index 000000000000..96dc4655ae34 --- /dev/null +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/_models.py @@ -0,0 +1,7097 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model +from msrest.exceptions import HttpOperationError + + +class AdditionalCapabilities(Model): + """Enables or disables a capability on the virtual machine or virtual machine + scale set. + + :param ultra_ssd_enabled: The flag that enables or disables a capability + to have one or more managed data disks with UltraSSD_LRS storage account + type on the VM or VMSS. Managed disks with storage account type + UltraSSD_LRS can be added to a virtual machine or virtual machine scale + set only if this property is enabled. + :type ultra_ssd_enabled: bool + """ + + _attribute_map = { + 'ultra_ssd_enabled': {'key': 'ultraSSDEnabled', 'type': 'bool'}, + } + + def __init__(self, **kwargs): + super(AdditionalCapabilities, self).__init__(**kwargs) + self.ultra_ssd_enabled = kwargs.get('ultra_ssd_enabled', None) + + +class AdditionalUnattendContent(Model): + """Specifies additional XML formatted information that can be included in the + Unattend.xml file, which is used by Windows Setup. Contents are defined by + setting name, component name, and the pass in which the content is applied. + + :param pass_name: The pass name. Currently, the only allowable value is + OobeSystem. Possible values include: 'OobeSystem' + :type pass_name: str or ~azure.mgmt.compute.v2019_03_01.models.PassNames + :param component_name: The component name. Currently, the only allowable + value is Microsoft-Windows-Shell-Setup. Possible values include: + 'Microsoft-Windows-Shell-Setup' + :type component_name: str or + ~azure.mgmt.compute.v2019_03_01.models.ComponentNames + :param setting_name: Specifies the name of the setting to which the + content applies. Possible values are: FirstLogonCommands and AutoLogon. + Possible values include: 'AutoLogon', 'FirstLogonCommands' + :type setting_name: str or + ~azure.mgmt.compute.v2019_03_01.models.SettingNames + :param content: Specifies the XML formatted content that is added to the + unattend.xml file for the specified path and component. The XML must be + less than 4KB and must include the root element for the setting or feature + that is being inserted. + :type content: str + """ + + _attribute_map = { + 'pass_name': {'key': 'passName', 'type': 'PassNames'}, + 'component_name': {'key': 'componentName', 'type': 'ComponentNames'}, + 'setting_name': {'key': 'settingName', 'type': 'SettingNames'}, + 'content': {'key': 'content', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(AdditionalUnattendContent, self).__init__(**kwargs) + self.pass_name = kwargs.get('pass_name', None) + self.component_name = kwargs.get('component_name', None) + self.setting_name = kwargs.get('setting_name', None) + self.content = kwargs.get('content', None) + + +class ApiEntityReference(Model): + """The API entity reference. + + :param id: The ARM resource id in the form of + /subscriptions/{SubscriptionId}/resourceGroups/{ResourceGroupName}/... + :type id: str + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ApiEntityReference, self).__init__(**kwargs) + self.id = kwargs.get('id', None) + + +class ApiError(Model): + """Api error. + + :param details: The Api error details + :type details: list[~azure.mgmt.compute.v2019_03_01.models.ApiErrorBase] + :param innererror: The Api inner error + :type innererror: ~azure.mgmt.compute.v2019_03_01.models.InnerError + :param code: The error code. + :type code: str + :param target: The target of the particular error. + :type target: str + :param message: The error message. + :type message: str + """ + + _attribute_map = { + 'details': {'key': 'details', 'type': '[ApiErrorBase]'}, + 'innererror': {'key': 'innererror', 'type': 'InnerError'}, + 'code': {'key': 'code', 'type': 'str'}, + 'target': {'key': 'target', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ApiError, self).__init__(**kwargs) + self.details = kwargs.get('details', None) + self.innererror = kwargs.get('innererror', None) + self.code = kwargs.get('code', None) + self.target = kwargs.get('target', None) + self.message = kwargs.get('message', None) + + +class ApiErrorBase(Model): + """Api error base. + + :param code: The error code. + :type code: str + :param target: The target of the particular error. + :type target: str + :param message: The error message. + :type message: str + """ + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + 'target': {'key': 'target', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ApiErrorBase, self).__init__(**kwargs) + self.code = kwargs.get('code', None) + self.target = kwargs.get('target', None) + self.message = kwargs.get('message', None) + + +class AutomaticOSUpgradePolicy(Model): + """The configuration parameters used for performing automatic OS upgrade. + + :param enable_automatic_os_upgrade: Indicates whether OS upgrades should + automatically be applied to scale set instances in a rolling fashion when + a newer version of the OS image becomes available. Default value is false. +

    If this is set to true for Windows based scale sets, + [enableAutomaticUpdates](https://docs.microsoft.com/dotnet/api/microsoft.azure.management.compute.models.windowsconfiguration.enableautomaticupdates?view=azure-dotnet) + is automatically set to false and cannot be set to true. + :type enable_automatic_os_upgrade: bool + :param disable_automatic_rollback: Whether OS image rollback feature + should be disabled. Default value is false. + :type disable_automatic_rollback: bool + """ + + _attribute_map = { + 'enable_automatic_os_upgrade': {'key': 'enableAutomaticOSUpgrade', 'type': 'bool'}, + 'disable_automatic_rollback': {'key': 'disableAutomaticRollback', 'type': 'bool'}, + } + + def __init__(self, **kwargs): + super(AutomaticOSUpgradePolicy, self).__init__(**kwargs) + self.enable_automatic_os_upgrade = kwargs.get('enable_automatic_os_upgrade', None) + self.disable_automatic_rollback = kwargs.get('disable_automatic_rollback', None) + + +class AutomaticOSUpgradeProperties(Model): + """Describes automatic OS upgrade properties on the image. + + All required parameters must be populated in order to send to Azure. + + :param automatic_os_upgrade_supported: Required. Specifies whether + automatic OS upgrade is supported on the image. + :type automatic_os_upgrade_supported: bool + """ + + _validation = { + 'automatic_os_upgrade_supported': {'required': True}, + } + + _attribute_map = { + 'automatic_os_upgrade_supported': {'key': 'automaticOSUpgradeSupported', 'type': 'bool'}, + } + + def __init__(self, **kwargs): + super(AutomaticOSUpgradeProperties, self).__init__(**kwargs) + self.automatic_os_upgrade_supported = kwargs.get('automatic_os_upgrade_supported', None) + + +class Resource(Model): + """The Resource model definition. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource Id + :vartype id: str + :ivar name: Resource name + :vartype name: str + :ivar type: Resource type + :vartype type: str + :param location: Required. Resource location + :type location: str + :param tags: Resource tags + :type tags: dict[str, str] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__(self, **kwargs): + super(Resource, self).__init__(**kwargs) + self.id = None + self.name = None + self.type = None + self.location = kwargs.get('location', None) + self.tags = kwargs.get('tags', None) + + +class AvailabilitySet(Resource): + """Specifies information about the availability set that the virtual machine + should be assigned to. Virtual machines specified in the same availability + set are allocated to different nodes to maximize availability. For more + information about availability sets, see [Manage the availability of + virtual + machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-manage-availability?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). +

    For more information on Azure planned maintenance, see [Planned + maintenance for virtual machines in + Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-planned-maintenance?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json) +

    Currently, a VM can only be added to availability set at creation + time. An existing VM cannot be added to an availability set. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource Id + :vartype id: str + :ivar name: Resource name + :vartype name: str + :ivar type: Resource type + :vartype type: str + :param location: Required. Resource location + :type location: str + :param tags: Resource tags + :type tags: dict[str, str] + :param platform_update_domain_count: Update Domain count. + :type platform_update_domain_count: int + :param platform_fault_domain_count: Fault Domain count. + :type platform_fault_domain_count: int + :param virtual_machines: A list of references to all virtual machines in + the availability set. + :type virtual_machines: + list[~azure.mgmt.compute.v2019_03_01.models.SubResource] + :param proximity_placement_group: Specifies information about the + proximity placement group that the availability set should be assigned to. +

    Minimum api-version: 2018-04-01. + :type proximity_placement_group: + ~azure.mgmt.compute.v2019_03_01.models.SubResource + :ivar statuses: The resource status information. + :vartype statuses: + list[~azure.mgmt.compute.v2019_03_01.models.InstanceViewStatus] + :param sku: Sku of the availability set, only name is required to be set. + See AvailabilitySetSkuTypes for possible set of values. Use 'Aligned' for + virtual machines with managed disks and 'Classic' for virtual machines + with unmanaged disks. Default value is 'Classic'. + :type sku: ~azure.mgmt.compute.v2019_03_01.models.Sku + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + 'statuses': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'platform_update_domain_count': {'key': 'properties.platformUpdateDomainCount', 'type': 'int'}, + 'platform_fault_domain_count': {'key': 'properties.platformFaultDomainCount', 'type': 'int'}, + 'virtual_machines': {'key': 'properties.virtualMachines', 'type': '[SubResource]'}, + 'proximity_placement_group': {'key': 'properties.proximityPlacementGroup', 'type': 'SubResource'}, + 'statuses': {'key': 'properties.statuses', 'type': '[InstanceViewStatus]'}, + 'sku': {'key': 'sku', 'type': 'Sku'}, + } + + def __init__(self, **kwargs): + super(AvailabilitySet, self).__init__(**kwargs) + self.platform_update_domain_count = kwargs.get('platform_update_domain_count', None) + self.platform_fault_domain_count = kwargs.get('platform_fault_domain_count', None) + self.virtual_machines = kwargs.get('virtual_machines', None) + self.proximity_placement_group = kwargs.get('proximity_placement_group', None) + self.statuses = None + self.sku = kwargs.get('sku', None) + + +class UpdateResource(Model): + """The Update Resource model definition. + + :param tags: Resource tags + :type tags: dict[str, str] + """ + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__(self, **kwargs): + super(UpdateResource, self).__init__(**kwargs) + self.tags = kwargs.get('tags', None) + + +class AvailabilitySetUpdate(UpdateResource): + """Specifies information about the availability set that the virtual machine + should be assigned to. Only tags may be updated. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :param tags: Resource tags + :type tags: dict[str, str] + :param platform_update_domain_count: Update Domain count. + :type platform_update_domain_count: int + :param platform_fault_domain_count: Fault Domain count. + :type platform_fault_domain_count: int + :param virtual_machines: A list of references to all virtual machines in + the availability set. + :type virtual_machines: + list[~azure.mgmt.compute.v2019_03_01.models.SubResource] + :param proximity_placement_group: Specifies information about the + proximity placement group that the availability set should be assigned to. +

    Minimum api-version: 2018-04-01. + :type proximity_placement_group: + ~azure.mgmt.compute.v2019_03_01.models.SubResource + :ivar statuses: The resource status information. + :vartype statuses: + list[~azure.mgmt.compute.v2019_03_01.models.InstanceViewStatus] + :param sku: Sku of the availability set + :type sku: ~azure.mgmt.compute.v2019_03_01.models.Sku + """ + + _validation = { + 'statuses': {'readonly': True}, + } + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + 'platform_update_domain_count': {'key': 'properties.platformUpdateDomainCount', 'type': 'int'}, + 'platform_fault_domain_count': {'key': 'properties.platformFaultDomainCount', 'type': 'int'}, + 'virtual_machines': {'key': 'properties.virtualMachines', 'type': '[SubResource]'}, + 'proximity_placement_group': {'key': 'properties.proximityPlacementGroup', 'type': 'SubResource'}, + 'statuses': {'key': 'properties.statuses', 'type': '[InstanceViewStatus]'}, + 'sku': {'key': 'sku', 'type': 'Sku'}, + } + + def __init__(self, **kwargs): + super(AvailabilitySetUpdate, self).__init__(**kwargs) + self.platform_update_domain_count = kwargs.get('platform_update_domain_count', None) + self.platform_fault_domain_count = kwargs.get('platform_fault_domain_count', None) + self.virtual_machines = kwargs.get('virtual_machines', None) + self.proximity_placement_group = kwargs.get('proximity_placement_group', None) + self.statuses = None + self.sku = kwargs.get('sku', None) + + +class BootDiagnostics(Model): + """Boot Diagnostics is a debugging feature which allows you to view Console + Output and Screenshot to diagnose VM status.

    You can easily view + the output of your console log.

    Azure also enables you to see a + screenshot of the VM from the hypervisor. + + :param enabled: Whether boot diagnostics should be enabled on the Virtual + Machine. + :type enabled: bool + :param storage_uri: Uri of the storage account to use for placing the + console output and screenshot. + :type storage_uri: str + """ + + _attribute_map = { + 'enabled': {'key': 'enabled', 'type': 'bool'}, + 'storage_uri': {'key': 'storageUri', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(BootDiagnostics, self).__init__(**kwargs) + self.enabled = kwargs.get('enabled', None) + self.storage_uri = kwargs.get('storage_uri', None) + + +class BootDiagnosticsInstanceView(Model): + """The instance view of a virtual machine boot diagnostics. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar console_screenshot_blob_uri: The console screenshot blob URI. + :vartype console_screenshot_blob_uri: str + :ivar serial_console_log_blob_uri: The Linux serial console log blob Uri. + :vartype serial_console_log_blob_uri: str + :ivar status: The boot diagnostics status information for the VM.

    + NOTE: It will be set only if there are errors encountered in enabling boot + diagnostics. + :vartype status: ~azure.mgmt.compute.v2019_03_01.models.InstanceViewStatus + """ + + _validation = { + 'console_screenshot_blob_uri': {'readonly': True}, + 'serial_console_log_blob_uri': {'readonly': True}, + 'status': {'readonly': True}, + } + + _attribute_map = { + 'console_screenshot_blob_uri': {'key': 'consoleScreenshotBlobUri', 'type': 'str'}, + 'serial_console_log_blob_uri': {'key': 'serialConsoleLogBlobUri', 'type': 'str'}, + 'status': {'key': 'status', 'type': 'InstanceViewStatus'}, + } + + def __init__(self, **kwargs): + super(BootDiagnosticsInstanceView, self).__init__(**kwargs) + self.console_screenshot_blob_uri = None + self.serial_console_log_blob_uri = None + self.status = None + + +class CloudError(Model): + """An error response from the Gallery service. + + :param error: + :type error: ~azure.mgmt.compute.v2019_03_01.models.ApiError + """ + + _attribute_map = { + 'error': {'key': 'error', 'type': 'ApiError'}, + } + + def __init__(self, **kwargs): + super(CloudError, self).__init__(**kwargs) + self.error = kwargs.get('error', None) + + +class CloudErrorException(HttpOperationError): + """Server responsed with exception of type: 'CloudError'. + + :param deserialize: A deserializer + :param response: Server response to be deserialized. + """ + + def __init__(self, deserialize, response, *args): + + super(CloudErrorException, self).__init__(deserialize, response, 'CloudError', *args) + + +class ComputeOperationValue(Model): + """Describes the properties of a Compute Operation value. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar origin: The origin of the compute operation. + :vartype origin: str + :ivar name: The name of the compute operation. + :vartype name: str + :ivar operation: The display name of the compute operation. + :vartype operation: str + :ivar resource: The display name of the resource the operation applies to. + :vartype resource: str + :ivar description: The description of the operation. + :vartype description: str + :ivar provider: The resource provider for the operation. + :vartype provider: str + """ + + _validation = { + 'origin': {'readonly': True}, + 'name': {'readonly': True}, + 'operation': {'readonly': True}, + 'resource': {'readonly': True}, + 'description': {'readonly': True}, + 'provider': {'readonly': True}, + } + + _attribute_map = { + 'origin': {'key': 'origin', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'operation': {'key': 'display.operation', 'type': 'str'}, + 'resource': {'key': 'display.resource', 'type': 'str'}, + 'description': {'key': 'display.description', 'type': 'str'}, + 'provider': {'key': 'display.provider', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ComputeOperationValue, self).__init__(**kwargs) + self.origin = None + self.name = None + self.operation = None + self.resource = None + self.description = None + self.provider = None + + +class DataDisk(Model): + """Describes a data disk. + + All required parameters must be populated in order to send to Azure. + + :param lun: Required. Specifies the logical unit number of the data disk. + This value is used to identify data disks within the VM and therefore must + be unique for each data disk attached to a VM. + :type lun: int + :param name: The disk name. + :type name: str + :param vhd: The virtual hard disk. + :type vhd: ~azure.mgmt.compute.v2019_03_01.models.VirtualHardDisk + :param image: The source user image virtual hard disk. The virtual hard + disk will be copied before being attached to the virtual machine. If + SourceImage is provided, the destination virtual hard drive must not + exist. + :type image: ~azure.mgmt.compute.v2019_03_01.models.VirtualHardDisk + :param caching: Specifies the caching requirements.

    Possible + values are:

    **None**

    **ReadOnly**

    **ReadWrite** +

    Default: **None for Standard storage. ReadOnly for Premium + storage**. Possible values include: 'None', 'ReadOnly', 'ReadWrite' + :type caching: str or ~azure.mgmt.compute.v2019_03_01.models.CachingTypes + :param write_accelerator_enabled: Specifies whether writeAccelerator + should be enabled or disabled on the disk. + :type write_accelerator_enabled: bool + :param create_option: Required. Specifies how the virtual machine should + be created.

    Possible values are:

    **Attach** \\u2013 This + value is used when you are using a specialized disk to create the virtual + machine.

    **FromImage** \\u2013 This value is used when you are + using an image to create the virtual machine. If you are using a platform + image, you also use the imageReference element described above. If you are + using a marketplace image, you also use the plan element previously + described. Possible values include: 'FromImage', 'Empty', 'Attach' + :type create_option: str or + ~azure.mgmt.compute.v2019_03_01.models.DiskCreateOptionTypes + :param disk_size_gb: Specifies the size of an empty data disk in + gigabytes. This element can be used to overwrite the size of the disk in a + virtual machine image.

    This value cannot be larger than 1023 GB + :type disk_size_gb: int + :param managed_disk: The managed disk parameters. + :type managed_disk: + ~azure.mgmt.compute.v2019_03_01.models.ManagedDiskParameters + :param to_be_detached: Specifies whether the data disk is in process of + detachment from the VirtualMachine/VirtualMachineScaleset + :type to_be_detached: bool + """ + + _validation = { + 'lun': {'required': True}, + 'create_option': {'required': True}, + } + + _attribute_map = { + 'lun': {'key': 'lun', 'type': 'int'}, + 'name': {'key': 'name', 'type': 'str'}, + 'vhd': {'key': 'vhd', 'type': 'VirtualHardDisk'}, + 'image': {'key': 'image', 'type': 'VirtualHardDisk'}, + 'caching': {'key': 'caching', 'type': 'CachingTypes'}, + 'write_accelerator_enabled': {'key': 'writeAcceleratorEnabled', 'type': 'bool'}, + 'create_option': {'key': 'createOption', 'type': 'str'}, + 'disk_size_gb': {'key': 'diskSizeGB', 'type': 'int'}, + 'managed_disk': {'key': 'managedDisk', 'type': 'ManagedDiskParameters'}, + 'to_be_detached': {'key': 'toBeDetached', 'type': 'bool'}, + } + + def __init__(self, **kwargs): + super(DataDisk, self).__init__(**kwargs) + self.lun = kwargs.get('lun', None) + self.name = kwargs.get('name', None) + self.vhd = kwargs.get('vhd', None) + self.image = kwargs.get('image', None) + self.caching = kwargs.get('caching', None) + self.write_accelerator_enabled = kwargs.get('write_accelerator_enabled', None) + self.create_option = kwargs.get('create_option', None) + self.disk_size_gb = kwargs.get('disk_size_gb', None) + self.managed_disk = kwargs.get('managed_disk', None) + self.to_be_detached = kwargs.get('to_be_detached', None) + + +class DataDiskImage(Model): + """Contains the data disk images information. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar lun: Specifies the logical unit number of the data disk. This value + is used to identify data disks within the VM and therefore must be unique + for each data disk attached to a VM. + :vartype lun: int + """ + + _validation = { + 'lun': {'readonly': True}, + } + + _attribute_map = { + 'lun': {'key': 'lun', 'type': 'int'}, + } + + def __init__(self, **kwargs): + super(DataDiskImage, self).__init__(**kwargs) + self.lun = None + + +class DedicatedHost(Resource): + """Specifies information about the Dedicated host. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource Id + :vartype id: str + :ivar name: Resource name + :vartype name: str + :ivar type: Resource type + :vartype type: str + :param location: Required. Resource location + :type location: str + :param tags: Resource tags + :type tags: dict[str, str] + :param platform_fault_domain: Fault domain of the dedicated host within a + dedicated host group. + :type platform_fault_domain: int + :param auto_replace_on_failure: Specifies whether the dedicated host + should be replaced automatically in case of a failure. The value is + defaulted to 'true' when not provided. + :type auto_replace_on_failure: bool + :ivar host_id: A unique id generated and assigned to the dedicated host by + the platform.

    Does not change throughout the lifetime of the + host. + :vartype host_id: str + :ivar virtual_machines: A list of references to all virtual machines in + the Dedicated Host. + :vartype virtual_machines: + list[~azure.mgmt.compute.v2019_03_01.models.SubResourceReadOnly] + :param license_type: Specifies the software license type that will be + applied to the VMs deployed on the dedicated host.

    Possible + values are:

    **None**

    **Windows_Server_Hybrid**

    + **Windows_Server_Perpetual**

    Default: **None**. Possible values + include: 'None', 'Windows_Server_Hybrid', 'Windows_Server_Perpetual' + :type license_type: str or + ~azure.mgmt.compute.v2019_03_01.models.DedicatedHostLicenseTypes + :ivar provisioning_time: The date when the host was first provisioned. + :vartype provisioning_time: datetime + :ivar provisioning_state: The provisioning state, which only appears in + the response. + :vartype provisioning_state: str + :ivar instance_view: The dedicated host instance view. + :vartype instance_view: + ~azure.mgmt.compute.v2019_03_01.models.DedicatedHostInstanceView + :param sku: Required. SKU of the dedicated host for Hardware Generation + and VM family. Only name is required to be set. List Microsoft.Compute + SKUs for a list of possible values. + :type sku: ~azure.mgmt.compute.v2019_03_01.models.Sku + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + 'platform_fault_domain': {'maximum': 2, 'minimum': 0}, + 'host_id': {'readonly': True}, + 'virtual_machines': {'readonly': True}, + 'provisioning_time': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + 'instance_view': {'readonly': True}, + 'sku': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'platform_fault_domain': {'key': 'properties.platformFaultDomain', 'type': 'int'}, + 'auto_replace_on_failure': {'key': 'properties.autoReplaceOnFailure', 'type': 'bool'}, + 'host_id': {'key': 'properties.hostId', 'type': 'str'}, + 'virtual_machines': {'key': 'properties.virtualMachines', 'type': '[SubResourceReadOnly]'}, + 'license_type': {'key': 'properties.licenseType', 'type': 'DedicatedHostLicenseTypes'}, + 'provisioning_time': {'key': 'properties.provisioningTime', 'type': 'iso-8601'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'instance_view': {'key': 'properties.instanceView', 'type': 'DedicatedHostInstanceView'}, + 'sku': {'key': 'sku', 'type': 'Sku'}, + } + + def __init__(self, **kwargs): + super(DedicatedHost, self).__init__(**kwargs) + self.platform_fault_domain = kwargs.get('platform_fault_domain', None) + self.auto_replace_on_failure = kwargs.get('auto_replace_on_failure', None) + self.host_id = None + self.virtual_machines = None + self.license_type = kwargs.get('license_type', None) + self.provisioning_time = None + self.provisioning_state = None + self.instance_view = None + self.sku = kwargs.get('sku', None) + + +class DedicatedHostAllocatableVM(Model): + """Represents the dedicated host unutilized capacity in terms of a specific VM + size. + + :param vm_size: VM size in terms of which the unutilized capacity is + represented. + :type vm_size: str + :param count: Maximum number of VMs of size vmSize that can fit in the + dedicated host's remaining capacity. + :type count: float + """ + + _attribute_map = { + 'vm_size': {'key': 'vmSize', 'type': 'str'}, + 'count': {'key': 'count', 'type': 'float'}, + } + + def __init__(self, **kwargs): + super(DedicatedHostAllocatableVM, self).__init__(**kwargs) + self.vm_size = kwargs.get('vm_size', None) + self.count = kwargs.get('count', None) + + +class DedicatedHostAvailableCapacity(Model): + """Dedicated host unutilized capacity. + + :param allocatable_vms: The unutilized capacity of the dedicated host + represented in terms of each VM size that is allowed to be deployed to the + dedicated host. + :type allocatable_vms: + list[~azure.mgmt.compute.v2019_03_01.models.DedicatedHostAllocatableVM] + """ + + _attribute_map = { + 'allocatable_vms': {'key': 'allocatableVMs', 'type': '[DedicatedHostAllocatableVM]'}, + } + + def __init__(self, **kwargs): + super(DedicatedHostAvailableCapacity, self).__init__(**kwargs) + self.allocatable_vms = kwargs.get('allocatable_vms', None) + + +class DedicatedHostGroup(Resource): + """Specifies information about the dedicated host group that the dedicated + hosts should be assigned to.

    Currently, a dedicated host can only + be added to a dedicated host group at creation time. An existing dedicated + host cannot be added to another dedicated host group. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource Id + :vartype id: str + :ivar name: Resource name + :vartype name: str + :ivar type: Resource type + :vartype type: str + :param location: Required. Resource location + :type location: str + :param tags: Resource tags + :type tags: dict[str, str] + :param platform_fault_domain_count: Required. Number of fault domains that + the host group can span. + :type platform_fault_domain_count: int + :ivar hosts: A list of references to all dedicated hosts in the dedicated + host group. + :vartype hosts: + list[~azure.mgmt.compute.v2019_03_01.models.SubResourceReadOnly] + :param zones: Availability Zone to use for this host group � only single + zone is supported. The zone can be assigned only during creation. If not + provided, the group supports all zones in the region. If provided, + enforces each host in the group to be in the same zone. + :type zones: list[str] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + 'platform_fault_domain_count': {'required': True, 'maximum': 3, 'minimum': 1}, + 'hosts': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'platform_fault_domain_count': {'key': 'properties.platformFaultDomainCount', 'type': 'int'}, + 'hosts': {'key': 'properties.hosts', 'type': '[SubResourceReadOnly]'}, + 'zones': {'key': 'zones', 'type': '[str]'}, + } + + def __init__(self, **kwargs): + super(DedicatedHostGroup, self).__init__(**kwargs) + self.platform_fault_domain_count = kwargs.get('platform_fault_domain_count', None) + self.hosts = None + self.zones = kwargs.get('zones', None) + + +class DedicatedHostGroupUpdate(UpdateResource): + """Specifies information about the dedicated host group that the dedicated + host should be assigned to. Only tags may be updated. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :param tags: Resource tags + :type tags: dict[str, str] + :param platform_fault_domain_count: Required. Number of fault domains that + the host group can span. + :type platform_fault_domain_count: int + :ivar hosts: A list of references to all dedicated hosts in the dedicated + host group. + :vartype hosts: + list[~azure.mgmt.compute.v2019_03_01.models.SubResourceReadOnly] + :param zones: Availability Zone to use for this host group � only single + zone is supported. The zone can be assigned only during creation. If not + provided, the group supports all zones in the region. If provided, + enforces each host in the group to be in the same zone. + :type zones: list[str] + """ + + _validation = { + 'platform_fault_domain_count': {'required': True, 'maximum': 3, 'minimum': 1}, + 'hosts': {'readonly': True}, + } + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + 'platform_fault_domain_count': {'key': 'properties.platformFaultDomainCount', 'type': 'int'}, + 'hosts': {'key': 'properties.hosts', 'type': '[SubResourceReadOnly]'}, + 'zones': {'key': 'zones', 'type': '[str]'}, + } + + def __init__(self, **kwargs): + super(DedicatedHostGroupUpdate, self).__init__(**kwargs) + self.platform_fault_domain_count = kwargs.get('platform_fault_domain_count', None) + self.hosts = None + self.zones = kwargs.get('zones', None) + + +class DedicatedHostInstanceView(Model): + """The instance view of a dedicated host. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar asset_id: Specifies the unique id of the dedicated physical machine + on which the dedicated host resides. + :vartype asset_id: str + :param available_capacity: Unutilized capacity of the dedicated host. + :type available_capacity: + ~azure.mgmt.compute.v2019_03_01.models.DedicatedHostAvailableCapacity + :param statuses: The resource status information. + :type statuses: + list[~azure.mgmt.compute.v2019_03_01.models.InstanceViewStatus] + """ + + _validation = { + 'asset_id': {'readonly': True}, + } + + _attribute_map = { + 'asset_id': {'key': 'assetId', 'type': 'str'}, + 'available_capacity': {'key': 'availableCapacity', 'type': 'DedicatedHostAvailableCapacity'}, + 'statuses': {'key': 'statuses', 'type': '[InstanceViewStatus]'}, + } + + def __init__(self, **kwargs): + super(DedicatedHostInstanceView, self).__init__(**kwargs) + self.asset_id = None + self.available_capacity = kwargs.get('available_capacity', None) + self.statuses = kwargs.get('statuses', None) + + +class DedicatedHostUpdate(UpdateResource): + """Specifies information about the dedicated host. Only tags, + autoReplaceOnFailure and licenseType may be updated. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :param tags: Resource tags + :type tags: dict[str, str] + :param platform_fault_domain: Fault domain of the dedicated host within a + dedicated host group. + :type platform_fault_domain: int + :param auto_replace_on_failure: Specifies whether the dedicated host + should be replaced automatically in case of a failure. The value is + defaulted to 'true' when not provided. + :type auto_replace_on_failure: bool + :ivar host_id: A unique id generated and assigned to the dedicated host by + the platform.

    Does not change throughout the lifetime of the + host. + :vartype host_id: str + :ivar virtual_machines: A list of references to all virtual machines in + the Dedicated Host. + :vartype virtual_machines: + list[~azure.mgmt.compute.v2019_03_01.models.SubResourceReadOnly] + :param license_type: Specifies the software license type that will be + applied to the VMs deployed on the dedicated host.

    Possible + values are:

    **None**

    **Windows_Server_Hybrid**

    + **Windows_Server_Perpetual**

    Default: **None**. Possible values + include: 'None', 'Windows_Server_Hybrid', 'Windows_Server_Perpetual' + :type license_type: str or + ~azure.mgmt.compute.v2019_03_01.models.DedicatedHostLicenseTypes + :ivar provisioning_time: The date when the host was first provisioned. + :vartype provisioning_time: datetime + :ivar provisioning_state: The provisioning state, which only appears in + the response. + :vartype provisioning_state: str + :ivar instance_view: The dedicated host instance view. + :vartype instance_view: + ~azure.mgmt.compute.v2019_03_01.models.DedicatedHostInstanceView + """ + + _validation = { + 'platform_fault_domain': {'maximum': 2, 'minimum': 0}, + 'host_id': {'readonly': True}, + 'virtual_machines': {'readonly': True}, + 'provisioning_time': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + 'instance_view': {'readonly': True}, + } + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + 'platform_fault_domain': {'key': 'properties.platformFaultDomain', 'type': 'int'}, + 'auto_replace_on_failure': {'key': 'properties.autoReplaceOnFailure', 'type': 'bool'}, + 'host_id': {'key': 'properties.hostId', 'type': 'str'}, + 'virtual_machines': {'key': 'properties.virtualMachines', 'type': '[SubResourceReadOnly]'}, + 'license_type': {'key': 'properties.licenseType', 'type': 'DedicatedHostLicenseTypes'}, + 'provisioning_time': {'key': 'properties.provisioningTime', 'type': 'iso-8601'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'instance_view': {'key': 'properties.instanceView', 'type': 'DedicatedHostInstanceView'}, + } + + def __init__(self, **kwargs): + super(DedicatedHostUpdate, self).__init__(**kwargs) + self.platform_fault_domain = kwargs.get('platform_fault_domain', None) + self.auto_replace_on_failure = kwargs.get('auto_replace_on_failure', None) + self.host_id = None + self.virtual_machines = None + self.license_type = kwargs.get('license_type', None) + self.provisioning_time = None + self.provisioning_state = None + self.instance_view = None + + +class DiagnosticsProfile(Model): + """Specifies the boot diagnostic settings state.

    Minimum api-version: + 2015-06-15. + + :param boot_diagnostics: Boot Diagnostics is a debugging feature which + allows you to view Console Output and Screenshot to diagnose VM status. +

    You can easily view the output of your console log.

    + Azure also enables you to see a screenshot of the VM from the hypervisor. + :type boot_diagnostics: + ~azure.mgmt.compute.v2019_03_01.models.BootDiagnostics + """ + + _attribute_map = { + 'boot_diagnostics': {'key': 'bootDiagnostics', 'type': 'BootDiagnostics'}, + } + + def __init__(self, **kwargs): + super(DiagnosticsProfile, self).__init__(**kwargs) + self.boot_diagnostics = kwargs.get('boot_diagnostics', None) + + +class DiffDiskSettings(Model): + """Describes the parameters of ephemeral disk settings that can be specified + for operating system disk.

    NOTE: The ephemeral disk settings can + only be specified for managed disk. + + :param option: Specifies the ephemeral disk settings for operating system + disk. Possible values include: 'Local' + :type option: str or + ~azure.mgmt.compute.v2019_03_01.models.DiffDiskOptions + """ + + _attribute_map = { + 'option': {'key': 'option', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(DiffDiskSettings, self).__init__(**kwargs) + self.option = kwargs.get('option', None) + + +class Disallowed(Model): + """Describes the disallowed disk types. + + :param disk_types: A list of disk types. + :type disk_types: list[str] + """ + + _attribute_map = { + 'disk_types': {'key': 'diskTypes', 'type': '[str]'}, + } + + def __init__(self, **kwargs): + super(Disallowed, self).__init__(**kwargs) + self.disk_types = kwargs.get('disk_types', None) + + +class DiskEncryptionSettings(Model): + """Describes a Encryption Settings for a Disk. + + :param disk_encryption_key: Specifies the location of the disk encryption + key, which is a Key Vault Secret. + :type disk_encryption_key: + ~azure.mgmt.compute.v2019_03_01.models.KeyVaultSecretReference + :param key_encryption_key: Specifies the location of the key encryption + key in Key Vault. + :type key_encryption_key: + ~azure.mgmt.compute.v2019_03_01.models.KeyVaultKeyReference + :param enabled: Specifies whether disk encryption should be enabled on the + virtual machine. + :type enabled: bool + """ + + _attribute_map = { + 'disk_encryption_key': {'key': 'diskEncryptionKey', 'type': 'KeyVaultSecretReference'}, + 'key_encryption_key': {'key': 'keyEncryptionKey', 'type': 'KeyVaultKeyReference'}, + 'enabled': {'key': 'enabled', 'type': 'bool'}, + } + + def __init__(self, **kwargs): + super(DiskEncryptionSettings, self).__init__(**kwargs) + self.disk_encryption_key = kwargs.get('disk_encryption_key', None) + self.key_encryption_key = kwargs.get('key_encryption_key', None) + self.enabled = kwargs.get('enabled', None) + + +class DiskInstanceView(Model): + """The instance view of the disk. + + :param name: The disk name. + :type name: str + :param encryption_settings: Specifies the encryption settings for the OS + Disk.

    Minimum api-version: 2015-06-15 + :type encryption_settings: + list[~azure.mgmt.compute.v2019_03_01.models.DiskEncryptionSettings] + :param statuses: The resource status information. + :type statuses: + list[~azure.mgmt.compute.v2019_03_01.models.InstanceViewStatus] + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'encryption_settings': {'key': 'encryptionSettings', 'type': '[DiskEncryptionSettings]'}, + 'statuses': {'key': 'statuses', 'type': '[InstanceViewStatus]'}, + } + + def __init__(self, **kwargs): + super(DiskInstanceView, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.encryption_settings = kwargs.get('encryption_settings', None) + self.statuses = kwargs.get('statuses', None) + + +class Gallery(Resource): + """Specifies information about the Shared Image Gallery that you want to + create or update. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource Id + :vartype id: str + :ivar name: Resource name + :vartype name: str + :ivar type: Resource type + :vartype type: str + :param location: Required. Resource location + :type location: str + :param tags: Resource tags + :type tags: dict[str, str] + :param description: The description of this Shared Image Gallery resource. + This property is updatable. + :type description: str + :param identifier: + :type identifier: ~azure.mgmt.compute.v2019_03_01.models.GalleryIdentifier + :ivar provisioning_state: The current state of the gallery. The + provisioning state, which only appears in the response. Possible values + include: 'Creating', 'Updating', 'Failed', 'Succeeded', 'Deleting', + 'Migrating' + :vartype provisioning_state: str or + ~azure.mgmt.compute.v2019_03_01.models.enum + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'identifier': {'key': 'properties.identifier', 'type': 'GalleryIdentifier'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(Gallery, self).__init__(**kwargs) + self.description = kwargs.get('description', None) + self.identifier = kwargs.get('identifier', None) + self.provisioning_state = None + + +class GalleryApplication(Resource): + """Specifies information about the gallery Application Definition that you + want to create or update. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource Id + :vartype id: str + :ivar name: Resource name + :vartype name: str + :ivar type: Resource type + :vartype type: str + :param location: Required. Resource location + :type location: str + :param tags: Resource tags + :type tags: dict[str, str] + :param description: The description of this gallery Application Definition + resource. This property is updatable. + :type description: str + :param eula: The Eula agreement for the gallery Application Definition. + :type eula: str + :param privacy_statement_uri: The privacy statement uri. + :type privacy_statement_uri: str + :param release_note_uri: The release note uri. + :type release_note_uri: str + :param end_of_life_date: The end of life date of the gallery Application + Definition. This property can be used for decommissioning purposes. This + property is updatable. + :type end_of_life_date: datetime + :param supported_os_type: Required. This property allows you to specify + the supported type of the OS that application is built for.

    + Possible values are:

    **Windows**

    **Linux**. Possible + values include: 'Windows', 'Linux' + :type supported_os_type: str or + ~azure.mgmt.compute.v2019_03_01.models.OperatingSystemTypes + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + 'supported_os_type': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'eula': {'key': 'properties.eula', 'type': 'str'}, + 'privacy_statement_uri': {'key': 'properties.privacyStatementUri', 'type': 'str'}, + 'release_note_uri': {'key': 'properties.releaseNoteUri', 'type': 'str'}, + 'end_of_life_date': {'key': 'properties.endOfLifeDate', 'type': 'iso-8601'}, + 'supported_os_type': {'key': 'properties.supportedOSType', 'type': 'OperatingSystemTypes'}, + } + + def __init__(self, **kwargs): + super(GalleryApplication, self).__init__(**kwargs) + self.description = kwargs.get('description', None) + self.eula = kwargs.get('eula', None) + self.privacy_statement_uri = kwargs.get('privacy_statement_uri', None) + self.release_note_uri = kwargs.get('release_note_uri', None) + self.end_of_life_date = kwargs.get('end_of_life_date', None) + self.supported_os_type = kwargs.get('supported_os_type', None) + + +class GalleryApplicationVersion(Resource): + """Specifies information about the gallery Application Version that you want + to create or update. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource Id + :vartype id: str + :ivar name: Resource name + :vartype name: str + :ivar type: Resource type + :vartype type: str + :param location: Required. Resource location + :type location: str + :param tags: Resource tags + :type tags: dict[str, str] + :param publishing_profile: Required. + :type publishing_profile: + ~azure.mgmt.compute.v2019_03_01.models.GalleryApplicationVersionPublishingProfile + :ivar provisioning_state: The current state of the gallery Application + Version. The provisioning state, which only appears in the response. + Possible values include: 'Creating', 'Updating', 'Failed', 'Succeeded', + 'Deleting', 'Migrating' + :vartype provisioning_state: str or + ~azure.mgmt.compute.v2019_03_01.models.enum + :ivar replication_status: + :vartype replication_status: + ~azure.mgmt.compute.v2019_03_01.models.ReplicationStatus + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + 'publishing_profile': {'required': True}, + 'provisioning_state': {'readonly': True}, + 'replication_status': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'publishing_profile': {'key': 'properties.publishingProfile', 'type': 'GalleryApplicationVersionPublishingProfile'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'replication_status': {'key': 'properties.replicationStatus', 'type': 'ReplicationStatus'}, + } + + def __init__(self, **kwargs): + super(GalleryApplicationVersion, self).__init__(**kwargs) + self.publishing_profile = kwargs.get('publishing_profile', None) + self.provisioning_state = None + self.replication_status = None + + +class GalleryArtifactPublishingProfileBase(Model): + """Describes the basic gallery artifact publishing profile. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :param target_regions: The target regions where the Image Version is going + to be replicated to. This property is updatable. + :type target_regions: + list[~azure.mgmt.compute.v2019_03_01.models.TargetRegion] + :param replica_count: The number of replicas of the Image Version to be + created per region. This property would take effect for a region when + regionalReplicaCount is not specified. This property is updatable. + :type replica_count: int + :param exclude_from_latest: If set to true, Virtual Machines deployed from + the latest version of the Image Definition won't use this Image Version. + :type exclude_from_latest: bool + :ivar published_date: The timestamp for when the gallery Image Version is + published. + :vartype published_date: datetime + :param end_of_life_date: The end of life date of the gallery Image + Version. This property can be used for decommissioning purposes. This + property is updatable. + :type end_of_life_date: datetime + :param storage_account_type: Specifies the storage account type to be used + to store the image. This property is not updatable. Possible values + include: 'Standard_LRS', 'Standard_ZRS' + :type storage_account_type: str or + ~azure.mgmt.compute.v2019_03_01.models.StorageAccountType + """ + + _validation = { + 'published_date': {'readonly': True}, + } + + _attribute_map = { + 'target_regions': {'key': 'targetRegions', 'type': '[TargetRegion]'}, + 'replica_count': {'key': 'replicaCount', 'type': 'int'}, + 'exclude_from_latest': {'key': 'excludeFromLatest', 'type': 'bool'}, + 'published_date': {'key': 'publishedDate', 'type': 'iso-8601'}, + 'end_of_life_date': {'key': 'endOfLifeDate', 'type': 'iso-8601'}, + 'storage_account_type': {'key': 'storageAccountType', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(GalleryArtifactPublishingProfileBase, self).__init__(**kwargs) + self.target_regions = kwargs.get('target_regions', None) + self.replica_count = kwargs.get('replica_count', None) + self.exclude_from_latest = kwargs.get('exclude_from_latest', None) + self.published_date = None + self.end_of_life_date = kwargs.get('end_of_life_date', None) + self.storage_account_type = kwargs.get('storage_account_type', None) + + +class GalleryApplicationVersionPublishingProfile(GalleryArtifactPublishingProfileBase): + """The publishing profile of a gallery Image Version. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :param target_regions: The target regions where the Image Version is going + to be replicated to. This property is updatable. + :type target_regions: + list[~azure.mgmt.compute.v2019_03_01.models.TargetRegion] + :param replica_count: The number of replicas of the Image Version to be + created per region. This property would take effect for a region when + regionalReplicaCount is not specified. This property is updatable. + :type replica_count: int + :param exclude_from_latest: If set to true, Virtual Machines deployed from + the latest version of the Image Definition won't use this Image Version. + :type exclude_from_latest: bool + :ivar published_date: The timestamp for when the gallery Image Version is + published. + :vartype published_date: datetime + :param end_of_life_date: The end of life date of the gallery Image + Version. This property can be used for decommissioning purposes. This + property is updatable. + :type end_of_life_date: datetime + :param storage_account_type: Specifies the storage account type to be used + to store the image. This property is not updatable. Possible values + include: 'Standard_LRS', 'Standard_ZRS' + :type storage_account_type: str or + ~azure.mgmt.compute.v2019_03_01.models.StorageAccountType + :param source: Required. + :type source: ~azure.mgmt.compute.v2019_03_01.models.UserArtifactSource + :param content_type: Optional. May be used to help process this file. The + type of file contained in the source, e.g. zip, json, etc. + :type content_type: str + :param enable_health_check: Optional. Whether or not this application + reports health. + :type enable_health_check: bool + """ + + _validation = { + 'published_date': {'readonly': True}, + 'source': {'required': True}, + } + + _attribute_map = { + 'target_regions': {'key': 'targetRegions', 'type': '[TargetRegion]'}, + 'replica_count': {'key': 'replicaCount', 'type': 'int'}, + 'exclude_from_latest': {'key': 'excludeFromLatest', 'type': 'bool'}, + 'published_date': {'key': 'publishedDate', 'type': 'iso-8601'}, + 'end_of_life_date': {'key': 'endOfLifeDate', 'type': 'iso-8601'}, + 'storage_account_type': {'key': 'storageAccountType', 'type': 'str'}, + 'source': {'key': 'source', 'type': 'UserArtifactSource'}, + 'content_type': {'key': 'contentType', 'type': 'str'}, + 'enable_health_check': {'key': 'enableHealthCheck', 'type': 'bool'}, + } + + def __init__(self, **kwargs): + super(GalleryApplicationVersionPublishingProfile, self).__init__(**kwargs) + self.source = kwargs.get('source', None) + self.content_type = kwargs.get('content_type', None) + self.enable_health_check = kwargs.get('enable_health_check', None) + + +class GalleryArtifactSource(Model): + """The source image from which the Image Version is going to be created. + + All required parameters must be populated in order to send to Azure. + + :param managed_image: Required. + :type managed_image: + ~azure.mgmt.compute.v2019_03_01.models.ManagedArtifact + """ + + _validation = { + 'managed_image': {'required': True}, + } + + _attribute_map = { + 'managed_image': {'key': 'managedImage', 'type': 'ManagedArtifact'}, + } + + def __init__(self, **kwargs): + super(GalleryArtifactSource, self).__init__(**kwargs) + self.managed_image = kwargs.get('managed_image', None) + + +class GalleryDiskImage(Model): + """This is the disk image base class. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar size_in_gb: This property indicates the size of the VHD to be + created. + :vartype size_in_gb: int + :ivar host_caching: The host caching of the disk. Valid values are 'None', + 'ReadOnly', and 'ReadWrite'. Possible values include: 'None', 'ReadOnly', + 'ReadWrite' + :vartype host_caching: str or + ~azure.mgmt.compute.v2019_03_01.models.HostCaching + """ + + _validation = { + 'size_in_gb': {'readonly': True}, + 'host_caching': {'readonly': True}, + } + + _attribute_map = { + 'size_in_gb': {'key': 'sizeInGB', 'type': 'int'}, + 'host_caching': {'key': 'hostCaching', 'type': 'HostCaching'}, + } + + def __init__(self, **kwargs): + super(GalleryDiskImage, self).__init__(**kwargs) + self.size_in_gb = None + self.host_caching = None + + +class GalleryDataDiskImage(GalleryDiskImage): + """This is the data disk image. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar size_in_gb: This property indicates the size of the VHD to be + created. + :vartype size_in_gb: int + :ivar host_caching: The host caching of the disk. Valid values are 'None', + 'ReadOnly', and 'ReadWrite'. Possible values include: 'None', 'ReadOnly', + 'ReadWrite' + :vartype host_caching: str or + ~azure.mgmt.compute.v2019_03_01.models.HostCaching + :ivar lun: This property specifies the logical unit number of the data + disk. This value is used to identify data disks within the Virtual Machine + and therefore must be unique for each data disk attached to the Virtual + Machine. + :vartype lun: int + """ + + _validation = { + 'size_in_gb': {'readonly': True}, + 'host_caching': {'readonly': True}, + 'lun': {'readonly': True}, + } + + _attribute_map = { + 'size_in_gb': {'key': 'sizeInGB', 'type': 'int'}, + 'host_caching': {'key': 'hostCaching', 'type': 'HostCaching'}, + 'lun': {'key': 'lun', 'type': 'int'}, + } + + def __init__(self, **kwargs): + super(GalleryDataDiskImage, self).__init__(**kwargs) + self.lun = None + + +class GalleryIdentifier(Model): + """Describes the gallery unique name. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar unique_name: The unique name of the Shared Image Gallery. This name + is generated automatically by Azure. + :vartype unique_name: str + """ + + _validation = { + 'unique_name': {'readonly': True}, + } + + _attribute_map = { + 'unique_name': {'key': 'uniqueName', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(GalleryIdentifier, self).__init__(**kwargs) + self.unique_name = None + + +class GalleryImage(Resource): + """Specifies information about the gallery Image Definition that you want to + create or update. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource Id + :vartype id: str + :ivar name: Resource name + :vartype name: str + :ivar type: Resource type + :vartype type: str + :param location: Required. Resource location + :type location: str + :param tags: Resource tags + :type tags: dict[str, str] + :param description: The description of this gallery Image Definition + resource. This property is updatable. + :type description: str + :param eula: The Eula agreement for the gallery Image Definition. + :type eula: str + :param privacy_statement_uri: The privacy statement uri. + :type privacy_statement_uri: str + :param release_note_uri: The release note uri. + :type release_note_uri: str + :param os_type: Required. This property allows you to specify the type of + the OS that is included in the disk when creating a VM from a managed + image.

    Possible values are:

    **Windows**

    + **Linux**. Possible values include: 'Windows', 'Linux' + :type os_type: str or + ~azure.mgmt.compute.v2019_03_01.models.OperatingSystemTypes + :param os_state: Required. The allowed values for OS State are + 'Generalized'. Possible values include: 'Generalized', 'Specialized' + :type os_state: str or + ~azure.mgmt.compute.v2019_03_01.models.OperatingSystemStateTypes + :param end_of_life_date: The end of life date of the gallery Image + Definition. This property can be used for decommissioning purposes. This + property is updatable. + :type end_of_life_date: datetime + :param identifier: Required. + :type identifier: + ~azure.mgmt.compute.v2019_03_01.models.GalleryImageIdentifier + :param recommended: + :type recommended: + ~azure.mgmt.compute.v2019_03_01.models.RecommendedMachineConfiguration + :param disallowed: + :type disallowed: ~azure.mgmt.compute.v2019_03_01.models.Disallowed + :param purchase_plan: + :type purchase_plan: + ~azure.mgmt.compute.v2019_03_01.models.ImagePurchasePlan + :ivar provisioning_state: The current state of the gallery Image + Definition. The provisioning state, which only appears in the response. + Possible values include: 'Creating', 'Updating', 'Failed', 'Succeeded', + 'Deleting', 'Migrating' + :vartype provisioning_state: str or + ~azure.mgmt.compute.v2019_03_01.models.enum + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + 'os_type': {'required': True}, + 'os_state': {'required': True}, + 'identifier': {'required': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'eula': {'key': 'properties.eula', 'type': 'str'}, + 'privacy_statement_uri': {'key': 'properties.privacyStatementUri', 'type': 'str'}, + 'release_note_uri': {'key': 'properties.releaseNoteUri', 'type': 'str'}, + 'os_type': {'key': 'properties.osType', 'type': 'OperatingSystemTypes'}, + 'os_state': {'key': 'properties.osState', 'type': 'OperatingSystemStateTypes'}, + 'end_of_life_date': {'key': 'properties.endOfLifeDate', 'type': 'iso-8601'}, + 'identifier': {'key': 'properties.identifier', 'type': 'GalleryImageIdentifier'}, + 'recommended': {'key': 'properties.recommended', 'type': 'RecommendedMachineConfiguration'}, + 'disallowed': {'key': 'properties.disallowed', 'type': 'Disallowed'}, + 'purchase_plan': {'key': 'properties.purchasePlan', 'type': 'ImagePurchasePlan'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(GalleryImage, self).__init__(**kwargs) + self.description = kwargs.get('description', None) + self.eula = kwargs.get('eula', None) + self.privacy_statement_uri = kwargs.get('privacy_statement_uri', None) + self.release_note_uri = kwargs.get('release_note_uri', None) + self.os_type = kwargs.get('os_type', None) + self.os_state = kwargs.get('os_state', None) + self.end_of_life_date = kwargs.get('end_of_life_date', None) + self.identifier = kwargs.get('identifier', None) + self.recommended = kwargs.get('recommended', None) + self.disallowed = kwargs.get('disallowed', None) + self.purchase_plan = kwargs.get('purchase_plan', None) + self.provisioning_state = None + + +class GalleryImageIdentifier(Model): + """This is the gallery Image Definition identifier. + + All required parameters must be populated in order to send to Azure. + + :param publisher: Required. The name of the gallery Image Definition + publisher. + :type publisher: str + :param offer: Required. The name of the gallery Image Definition offer. + :type offer: str + :param sku: Required. The name of the gallery Image Definition SKU. + :type sku: str + """ + + _validation = { + 'publisher': {'required': True}, + 'offer': {'required': True}, + 'sku': {'required': True}, + } + + _attribute_map = { + 'publisher': {'key': 'publisher', 'type': 'str'}, + 'offer': {'key': 'offer', 'type': 'str'}, + 'sku': {'key': 'sku', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(GalleryImageIdentifier, self).__init__(**kwargs) + self.publisher = kwargs.get('publisher', None) + self.offer = kwargs.get('offer', None) + self.sku = kwargs.get('sku', None) + + +class GalleryImageVersion(Resource): + """Specifies information about the gallery Image Version that you want to + create or update. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource Id + :vartype id: str + :ivar name: Resource name + :vartype name: str + :ivar type: Resource type + :vartype type: str + :param location: Required. Resource location + :type location: str + :param tags: Resource tags + :type tags: dict[str, str] + :param publishing_profile: Required. + :type publishing_profile: + ~azure.mgmt.compute.v2019_03_01.models.GalleryImageVersionPublishingProfile + :ivar provisioning_state: The current state of the gallery Image Version. + The provisioning state, which only appears in the response. Possible + values include: 'Creating', 'Updating', 'Failed', 'Succeeded', 'Deleting', + 'Migrating' + :vartype provisioning_state: str or + ~azure.mgmt.compute.v2019_03_01.models.enum + :ivar storage_profile: + :vartype storage_profile: + ~azure.mgmt.compute.v2019_03_01.models.GalleryImageVersionStorageProfile + :ivar replication_status: + :vartype replication_status: + ~azure.mgmt.compute.v2019_03_01.models.ReplicationStatus + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + 'publishing_profile': {'required': True}, + 'provisioning_state': {'readonly': True}, + 'storage_profile': {'readonly': True}, + 'replication_status': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'publishing_profile': {'key': 'properties.publishingProfile', 'type': 'GalleryImageVersionPublishingProfile'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'storage_profile': {'key': 'properties.storageProfile', 'type': 'GalleryImageVersionStorageProfile'}, + 'replication_status': {'key': 'properties.replicationStatus', 'type': 'ReplicationStatus'}, + } + + def __init__(self, **kwargs): + super(GalleryImageVersion, self).__init__(**kwargs) + self.publishing_profile = kwargs.get('publishing_profile', None) + self.provisioning_state = None + self.storage_profile = None + self.replication_status = None + + +class GalleryImageVersionPublishingProfile(GalleryArtifactPublishingProfileBase): + """The publishing profile of a gallery Image Version. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :param target_regions: The target regions where the Image Version is going + to be replicated to. This property is updatable. + :type target_regions: + list[~azure.mgmt.compute.v2019_03_01.models.TargetRegion] + :param replica_count: The number of replicas of the Image Version to be + created per region. This property would take effect for a region when + regionalReplicaCount is not specified. This property is updatable. + :type replica_count: int + :param exclude_from_latest: If set to true, Virtual Machines deployed from + the latest version of the Image Definition won't use this Image Version. + :type exclude_from_latest: bool + :ivar published_date: The timestamp for when the gallery Image Version is + published. + :vartype published_date: datetime + :param end_of_life_date: The end of life date of the gallery Image + Version. This property can be used for decommissioning purposes. This + property is updatable. + :type end_of_life_date: datetime + :param storage_account_type: Specifies the storage account type to be used + to store the image. This property is not updatable. Possible values + include: 'Standard_LRS', 'Standard_ZRS' + :type storage_account_type: str or + ~azure.mgmt.compute.v2019_03_01.models.StorageAccountType + :param source: Required. + :type source: ~azure.mgmt.compute.v2019_03_01.models.GalleryArtifactSource + """ + + _validation = { + 'published_date': {'readonly': True}, + 'source': {'required': True}, + } + + _attribute_map = { + 'target_regions': {'key': 'targetRegions', 'type': '[TargetRegion]'}, + 'replica_count': {'key': 'replicaCount', 'type': 'int'}, + 'exclude_from_latest': {'key': 'excludeFromLatest', 'type': 'bool'}, + 'published_date': {'key': 'publishedDate', 'type': 'iso-8601'}, + 'end_of_life_date': {'key': 'endOfLifeDate', 'type': 'iso-8601'}, + 'storage_account_type': {'key': 'storageAccountType', 'type': 'str'}, + 'source': {'key': 'source', 'type': 'GalleryArtifactSource'}, + } + + def __init__(self, **kwargs): + super(GalleryImageVersionPublishingProfile, self).__init__(**kwargs) + self.source = kwargs.get('source', None) + + +class GalleryImageVersionStorageProfile(Model): + """This is the storage profile of a gallery Image Version. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar os_disk_image: + :vartype os_disk_image: + ~azure.mgmt.compute.v2019_03_01.models.GalleryOSDiskImage + :ivar data_disk_images: A list of data disk images. + :vartype data_disk_images: + list[~azure.mgmt.compute.v2019_03_01.models.GalleryDataDiskImage] + """ + + _validation = { + 'os_disk_image': {'readonly': True}, + 'data_disk_images': {'readonly': True}, + } + + _attribute_map = { + 'os_disk_image': {'key': 'osDiskImage', 'type': 'GalleryOSDiskImage'}, + 'data_disk_images': {'key': 'dataDiskImages', 'type': '[GalleryDataDiskImage]'}, + } + + def __init__(self, **kwargs): + super(GalleryImageVersionStorageProfile, self).__init__(**kwargs) + self.os_disk_image = None + self.data_disk_images = None + + +class GalleryOSDiskImage(GalleryDiskImage): + """This is the OS disk image. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar size_in_gb: This property indicates the size of the VHD to be + created. + :vartype size_in_gb: int + :ivar host_caching: The host caching of the disk. Valid values are 'None', + 'ReadOnly', and 'ReadWrite'. Possible values include: 'None', 'ReadOnly', + 'ReadWrite' + :vartype host_caching: str or + ~azure.mgmt.compute.v2019_03_01.models.HostCaching + """ + + _validation = { + 'size_in_gb': {'readonly': True}, + 'host_caching': {'readonly': True}, + } + + _attribute_map = { + 'size_in_gb': {'key': 'sizeInGB', 'type': 'int'}, + 'host_caching': {'key': 'hostCaching', 'type': 'HostCaching'}, + } + + def __init__(self, **kwargs): + super(GalleryOSDiskImage, self).__init__(**kwargs) + + +class HardwareProfile(Model): + """Specifies the hardware settings for the virtual machine. + + :param vm_size: Specifies the size of the virtual machine. For more + information about virtual machine sizes, see [Sizes for virtual + machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-sizes?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). +

    The available VM sizes depend on region and availability set. For + a list of available sizes use these APIs:

    [List all available + virtual machine sizes in an availability + set](https://docs.microsoft.com/rest/api/compute/availabilitysets/listavailablesizes) +

    [List all available virtual machine sizes in a + region](https://docs.microsoft.com/rest/api/compute/virtualmachinesizes/list) +

    [List all available virtual machine sizes for + resizing](https://docs.microsoft.com/rest/api/compute/virtualmachines/listavailablesizes). + Possible values include: 'Basic_A0', 'Basic_A1', 'Basic_A2', 'Basic_A3', + 'Basic_A4', 'Standard_A0', 'Standard_A1', 'Standard_A2', 'Standard_A3', + 'Standard_A4', 'Standard_A5', 'Standard_A6', 'Standard_A7', 'Standard_A8', + 'Standard_A9', 'Standard_A10', 'Standard_A11', 'Standard_A1_v2', + 'Standard_A2_v2', 'Standard_A4_v2', 'Standard_A8_v2', 'Standard_A2m_v2', + 'Standard_A4m_v2', 'Standard_A8m_v2', 'Standard_B1s', 'Standard_B1ms', + 'Standard_B2s', 'Standard_B2ms', 'Standard_B4ms', 'Standard_B8ms', + 'Standard_D1', 'Standard_D2', 'Standard_D3', 'Standard_D4', + 'Standard_D11', 'Standard_D12', 'Standard_D13', 'Standard_D14', + 'Standard_D1_v2', 'Standard_D2_v2', 'Standard_D3_v2', 'Standard_D4_v2', + 'Standard_D5_v2', 'Standard_D2_v3', 'Standard_D4_v3', 'Standard_D8_v3', + 'Standard_D16_v3', 'Standard_D32_v3', 'Standard_D64_v3', + 'Standard_D2s_v3', 'Standard_D4s_v3', 'Standard_D8s_v3', + 'Standard_D16s_v3', 'Standard_D32s_v3', 'Standard_D64s_v3', + 'Standard_D11_v2', 'Standard_D12_v2', 'Standard_D13_v2', + 'Standard_D14_v2', 'Standard_D15_v2', 'Standard_DS1', 'Standard_DS2', + 'Standard_DS3', 'Standard_DS4', 'Standard_DS11', 'Standard_DS12', + 'Standard_DS13', 'Standard_DS14', 'Standard_DS1_v2', 'Standard_DS2_v2', + 'Standard_DS3_v2', 'Standard_DS4_v2', 'Standard_DS5_v2', + 'Standard_DS11_v2', 'Standard_DS12_v2', 'Standard_DS13_v2', + 'Standard_DS14_v2', 'Standard_DS15_v2', 'Standard_DS13-4_v2', + 'Standard_DS13-2_v2', 'Standard_DS14-8_v2', 'Standard_DS14-4_v2', + 'Standard_E2_v3', 'Standard_E4_v3', 'Standard_E8_v3', 'Standard_E16_v3', + 'Standard_E32_v3', 'Standard_E64_v3', 'Standard_E2s_v3', + 'Standard_E4s_v3', 'Standard_E8s_v3', 'Standard_E16s_v3', + 'Standard_E32s_v3', 'Standard_E64s_v3', 'Standard_E32-16_v3', + 'Standard_E32-8s_v3', 'Standard_E64-32s_v3', 'Standard_E64-16s_v3', + 'Standard_F1', 'Standard_F2', 'Standard_F4', 'Standard_F8', + 'Standard_F16', 'Standard_F1s', 'Standard_F2s', 'Standard_F4s', + 'Standard_F8s', 'Standard_F16s', 'Standard_F2s_v2', 'Standard_F4s_v2', + 'Standard_F8s_v2', 'Standard_F16s_v2', 'Standard_F32s_v2', + 'Standard_F64s_v2', 'Standard_F72s_v2', 'Standard_G1', 'Standard_G2', + 'Standard_G3', 'Standard_G4', 'Standard_G5', 'Standard_GS1', + 'Standard_GS2', 'Standard_GS3', 'Standard_GS4', 'Standard_GS5', + 'Standard_GS4-8', 'Standard_GS4-4', 'Standard_GS5-16', 'Standard_GS5-8', + 'Standard_H8', 'Standard_H16', 'Standard_H8m', 'Standard_H16m', + 'Standard_H16r', 'Standard_H16mr', 'Standard_L4s', 'Standard_L8s', + 'Standard_L16s', 'Standard_L32s', 'Standard_M64s', 'Standard_M64ms', + 'Standard_M128s', 'Standard_M128ms', 'Standard_M64-32ms', + 'Standard_M64-16ms', 'Standard_M128-64ms', 'Standard_M128-32ms', + 'Standard_NC6', 'Standard_NC12', 'Standard_NC24', 'Standard_NC24r', + 'Standard_NC6s_v2', 'Standard_NC12s_v2', 'Standard_NC24s_v2', + 'Standard_NC24rs_v2', 'Standard_NC6s_v3', 'Standard_NC12s_v3', + 'Standard_NC24s_v3', 'Standard_NC24rs_v3', 'Standard_ND6s', + 'Standard_ND12s', 'Standard_ND24s', 'Standard_ND24rs', 'Standard_NV6', + 'Standard_NV12', 'Standard_NV24' + :type vm_size: str or + ~azure.mgmt.compute.v2019_03_01.models.VirtualMachineSizeTypes + """ + + _attribute_map = { + 'vm_size': {'key': 'vmSize', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(HardwareProfile, self).__init__(**kwargs) + self.vm_size = kwargs.get('vm_size', None) + + +class Image(Resource): + """The source user image virtual hard disk. The virtual hard disk will be + copied before being attached to the virtual machine. If SourceImage is + provided, the destination virtual hard drive must not exist. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource Id + :vartype id: str + :ivar name: Resource name + :vartype name: str + :ivar type: Resource type + :vartype type: str + :param location: Required. Resource location + :type location: str + :param tags: Resource tags + :type tags: dict[str, str] + :param source_virtual_machine: The source virtual machine from which Image + is created. + :type source_virtual_machine: + ~azure.mgmt.compute.v2019_03_01.models.SubResource + :param storage_profile: Specifies the storage settings for the virtual + machine disks. + :type storage_profile: + ~azure.mgmt.compute.v2019_03_01.models.ImageStorageProfile + :ivar provisioning_state: The provisioning state. + :vartype provisioning_state: str + :param hyper_vgeneration: Gets the HyperVGenerationType of the + VirtualMachine created from the image. Possible values include: 'V1', 'V2' + :type hyper_vgeneration: str or + ~azure.mgmt.compute.v2019_03_01.models.HyperVGenerationTypes + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'source_virtual_machine': {'key': 'properties.sourceVirtualMachine', 'type': 'SubResource'}, + 'storage_profile': {'key': 'properties.storageProfile', 'type': 'ImageStorageProfile'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'hyper_vgeneration': {'key': 'properties.hyperVGeneration', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(Image, self).__init__(**kwargs) + self.source_virtual_machine = kwargs.get('source_virtual_machine', None) + self.storage_profile = kwargs.get('storage_profile', None) + self.provisioning_state = None + self.hyper_vgeneration = kwargs.get('hyper_vgeneration', None) + + +class ImageDataDisk(Model): + """Describes a data disk. + + All required parameters must be populated in order to send to Azure. + + :param lun: Required. Specifies the logical unit number of the data disk. + This value is used to identify data disks within the VM and therefore must + be unique for each data disk attached to a VM. + :type lun: int + :param snapshot: The snapshot. + :type snapshot: ~azure.mgmt.compute.v2019_03_01.models.SubResource + :param managed_disk: The managedDisk. + :type managed_disk: ~azure.mgmt.compute.v2019_03_01.models.SubResource + :param blob_uri: The Virtual Hard Disk. + :type blob_uri: str + :param caching: Specifies the caching requirements.

    Possible + values are:

    **None**

    **ReadOnly**

    **ReadWrite** +

    Default: **None for Standard storage. ReadOnly for Premium + storage**. Possible values include: 'None', 'ReadOnly', 'ReadWrite' + :type caching: str or ~azure.mgmt.compute.v2019_03_01.models.CachingTypes + :param disk_size_gb: Specifies the size of empty data disks in gigabytes. + This element can be used to overwrite the name of the disk in a virtual + machine image.

    This value cannot be larger than 1023 GB + :type disk_size_gb: int + :param storage_account_type: Specifies the storage account type for the + managed disk. NOTE: UltraSSD_LRS can only be used with data disks, it + cannot be used with OS Disk. Possible values include: 'Standard_LRS', + 'Premium_LRS', 'StandardSSD_LRS', 'UltraSSD_LRS' + :type storage_account_type: str or + ~azure.mgmt.compute.v2019_03_01.models.StorageAccountTypes + """ + + _validation = { + 'lun': {'required': True}, + } + + _attribute_map = { + 'lun': {'key': 'lun', 'type': 'int'}, + 'snapshot': {'key': 'snapshot', 'type': 'SubResource'}, + 'managed_disk': {'key': 'managedDisk', 'type': 'SubResource'}, + 'blob_uri': {'key': 'blobUri', 'type': 'str'}, + 'caching': {'key': 'caching', 'type': 'CachingTypes'}, + 'disk_size_gb': {'key': 'diskSizeGB', 'type': 'int'}, + 'storage_account_type': {'key': 'storageAccountType', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ImageDataDisk, self).__init__(**kwargs) + self.lun = kwargs.get('lun', None) + self.snapshot = kwargs.get('snapshot', None) + self.managed_disk = kwargs.get('managed_disk', None) + self.blob_uri = kwargs.get('blob_uri', None) + self.caching = kwargs.get('caching', None) + self.disk_size_gb = kwargs.get('disk_size_gb', None) + self.storage_account_type = kwargs.get('storage_account_type', None) + + +class ImageOSDisk(Model): + """Describes an Operating System disk. + + All required parameters must be populated in order to send to Azure. + + :param os_type: Required. This property allows you to specify the type of + the OS that is included in the disk if creating a VM from a custom image. +

    Possible values are:

    **Windows**

    **Linux**. + Possible values include: 'Windows', 'Linux' + :type os_type: str or + ~azure.mgmt.compute.v2019_03_01.models.OperatingSystemTypes + :param os_state: Required. The OS State. Possible values include: + 'Generalized', 'Specialized' + :type os_state: str or + ~azure.mgmt.compute.v2019_03_01.models.OperatingSystemStateTypes + :param snapshot: The snapshot. + :type snapshot: ~azure.mgmt.compute.v2019_03_01.models.SubResource + :param managed_disk: The managedDisk. + :type managed_disk: ~azure.mgmt.compute.v2019_03_01.models.SubResource + :param blob_uri: The Virtual Hard Disk. + :type blob_uri: str + :param caching: Specifies the caching requirements.

    Possible + values are:

    **None**

    **ReadOnly**

    **ReadWrite** +

    Default: **None for Standard storage. ReadOnly for Premium + storage**. Possible values include: 'None', 'ReadOnly', 'ReadWrite' + :type caching: str or ~azure.mgmt.compute.v2019_03_01.models.CachingTypes + :param disk_size_gb: Specifies the size of empty data disks in gigabytes. + This element can be used to overwrite the name of the disk in a virtual + machine image.

    This value cannot be larger than 1023 GB + :type disk_size_gb: int + :param storage_account_type: Specifies the storage account type for the + managed disk. UltraSSD_LRS cannot be used with OS Disk. Possible values + include: 'Standard_LRS', 'Premium_LRS', 'StandardSSD_LRS', 'UltraSSD_LRS' + :type storage_account_type: str or + ~azure.mgmt.compute.v2019_03_01.models.StorageAccountTypes + """ + + _validation = { + 'os_type': {'required': True}, + 'os_state': {'required': True}, + } + + _attribute_map = { + 'os_type': {'key': 'osType', 'type': 'OperatingSystemTypes'}, + 'os_state': {'key': 'osState', 'type': 'OperatingSystemStateTypes'}, + 'snapshot': {'key': 'snapshot', 'type': 'SubResource'}, + 'managed_disk': {'key': 'managedDisk', 'type': 'SubResource'}, + 'blob_uri': {'key': 'blobUri', 'type': 'str'}, + 'caching': {'key': 'caching', 'type': 'CachingTypes'}, + 'disk_size_gb': {'key': 'diskSizeGB', 'type': 'int'}, + 'storage_account_type': {'key': 'storageAccountType', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ImageOSDisk, self).__init__(**kwargs) + self.os_type = kwargs.get('os_type', None) + self.os_state = kwargs.get('os_state', None) + self.snapshot = kwargs.get('snapshot', None) + self.managed_disk = kwargs.get('managed_disk', None) + self.blob_uri = kwargs.get('blob_uri', None) + self.caching = kwargs.get('caching', None) + self.disk_size_gb = kwargs.get('disk_size_gb', None) + self.storage_account_type = kwargs.get('storage_account_type', None) + + +class ImagePurchasePlan(Model): + """Describes the gallery Image Definition purchase plan. This is used by + marketplace images. + + :param name: The plan ID. + :type name: str + :param publisher: The publisher ID. + :type publisher: str + :param product: The product ID. + :type product: str + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'publisher': {'key': 'publisher', 'type': 'str'}, + 'product': {'key': 'product', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ImagePurchasePlan, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.publisher = kwargs.get('publisher', None) + self.product = kwargs.get('product', None) + + +class SubResource(Model): + """SubResource. + + :param id: Resource Id + :type id: str + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(SubResource, self).__init__(**kwargs) + self.id = kwargs.get('id', None) + + +class ImageReference(SubResource): + """Specifies information about the image to use. You can specify information + about platform images, marketplace images, or virtual machine images. This + element is required when you want to use a platform image, marketplace + image, or virtual machine image, but is not used in other creation + operations. + + :param id: Resource Id + :type id: str + :param publisher: The image publisher. + :type publisher: str + :param offer: Specifies the offer of the platform image or marketplace + image used to create the virtual machine. + :type offer: str + :param sku: The image SKU. + :type sku: str + :param version: Specifies the version of the platform image or marketplace + image used to create the virtual machine. The allowed formats are + Major.Minor.Build or 'latest'. Major, Minor, and Build are decimal + numbers. Specify 'latest' to use the latest version of an image available + at deploy time. Even if you use 'latest', the VM image will not + automatically update after deploy time even if a new version becomes + available. + :type version: str + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'publisher': {'key': 'publisher', 'type': 'str'}, + 'offer': {'key': 'offer', 'type': 'str'}, + 'sku': {'key': 'sku', 'type': 'str'}, + 'version': {'key': 'version', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ImageReference, self).__init__(**kwargs) + self.publisher = kwargs.get('publisher', None) + self.offer = kwargs.get('offer', None) + self.sku = kwargs.get('sku', None) + self.version = kwargs.get('version', None) + + +class ImageStorageProfile(Model): + """Describes a storage profile. + + :param os_disk: Specifies information about the operating system disk used + by the virtual machine.

    For more information about disks, see + [About disks and VHDs for Azure virtual + machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-about-disks-vhds?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). + :type os_disk: ~azure.mgmt.compute.v2019_03_01.models.ImageOSDisk + :param data_disks: Specifies the parameters that are used to add a data + disk to a virtual machine.

    For more information about disks, see + [About disks and VHDs for Azure virtual + machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-about-disks-vhds?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). + :type data_disks: + list[~azure.mgmt.compute.v2019_03_01.models.ImageDataDisk] + :param zone_resilient: Specifies whether an image is zone resilient or + not. Default is false. Zone resilient images can be created only in + regions that provide Zone Redundant Storage (ZRS). + :type zone_resilient: bool + """ + + _attribute_map = { + 'os_disk': {'key': 'osDisk', 'type': 'ImageOSDisk'}, + 'data_disks': {'key': 'dataDisks', 'type': '[ImageDataDisk]'}, + 'zone_resilient': {'key': 'zoneResilient', 'type': 'bool'}, + } + + def __init__(self, **kwargs): + super(ImageStorageProfile, self).__init__(**kwargs) + self.os_disk = kwargs.get('os_disk', None) + self.data_disks = kwargs.get('data_disks', None) + self.zone_resilient = kwargs.get('zone_resilient', None) + + +class ImageUpdate(UpdateResource): + """The source user image virtual hard disk. Only tags may be updated. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :param tags: Resource tags + :type tags: dict[str, str] + :param source_virtual_machine: The source virtual machine from which Image + is created. + :type source_virtual_machine: + ~azure.mgmt.compute.v2019_03_01.models.SubResource + :param storage_profile: Specifies the storage settings for the virtual + machine disks. + :type storage_profile: + ~azure.mgmt.compute.v2019_03_01.models.ImageStorageProfile + :ivar provisioning_state: The provisioning state. + :vartype provisioning_state: str + :param hyper_vgeneration: Gets the HyperVGenerationType of the + VirtualMachine created from the image. Possible values include: 'V1', 'V2' + :type hyper_vgeneration: str or + ~azure.mgmt.compute.v2019_03_01.models.HyperVGenerationTypes + """ + + _validation = { + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + 'source_virtual_machine': {'key': 'properties.sourceVirtualMachine', 'type': 'SubResource'}, + 'storage_profile': {'key': 'properties.storageProfile', 'type': 'ImageStorageProfile'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'hyper_vgeneration': {'key': 'properties.hyperVGeneration', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ImageUpdate, self).__init__(**kwargs) + self.source_virtual_machine = kwargs.get('source_virtual_machine', None) + self.storage_profile = kwargs.get('storage_profile', None) + self.provisioning_state = None + self.hyper_vgeneration = kwargs.get('hyper_vgeneration', None) + + +class InnerError(Model): + """Inner error details. + + :param exceptiontype: The exception type. + :type exceptiontype: str + :param errordetail: The internal error message or exception dump. + :type errordetail: str + """ + + _attribute_map = { + 'exceptiontype': {'key': 'exceptiontype', 'type': 'str'}, + 'errordetail': {'key': 'errordetail', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(InnerError, self).__init__(**kwargs) + self.exceptiontype = kwargs.get('exceptiontype', None) + self.errordetail = kwargs.get('errordetail', None) + + +class InstanceViewStatus(Model): + """Instance view status. + + :param code: The status code. + :type code: str + :param level: The level code. Possible values include: 'Info', 'Warning', + 'Error' + :type level: str or + ~azure.mgmt.compute.v2019_03_01.models.StatusLevelTypes + :param display_status: The short localizable label for the status. + :type display_status: str + :param message: The detailed status message, including for alerts and + error messages. + :type message: str + :param time: The time of the status. + :type time: datetime + """ + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + 'level': {'key': 'level', 'type': 'StatusLevelTypes'}, + 'display_status': {'key': 'displayStatus', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + 'time': {'key': 'time', 'type': 'iso-8601'}, + } + + def __init__(self, **kwargs): + super(InstanceViewStatus, self).__init__(**kwargs) + self.code = kwargs.get('code', None) + self.level = kwargs.get('level', None) + self.display_status = kwargs.get('display_status', None) + self.message = kwargs.get('message', None) + self.time = kwargs.get('time', None) + + +class KeyVaultKeyReference(Model): + """Describes a reference to Key Vault Key. + + All required parameters must be populated in order to send to Azure. + + :param key_url: Required. The URL referencing a key encryption key in Key + Vault. + :type key_url: str + :param source_vault: Required. The relative URL of the Key Vault + containing the key. + :type source_vault: ~azure.mgmt.compute.v2019_03_01.models.SubResource + """ + + _validation = { + 'key_url': {'required': True}, + 'source_vault': {'required': True}, + } + + _attribute_map = { + 'key_url': {'key': 'keyUrl', 'type': 'str'}, + 'source_vault': {'key': 'sourceVault', 'type': 'SubResource'}, + } + + def __init__(self, **kwargs): + super(KeyVaultKeyReference, self).__init__(**kwargs) + self.key_url = kwargs.get('key_url', None) + self.source_vault = kwargs.get('source_vault', None) + + +class KeyVaultSecretReference(Model): + """Describes a reference to Key Vault Secret. + + All required parameters must be populated in order to send to Azure. + + :param secret_url: Required. The URL referencing a secret in a Key Vault. + :type secret_url: str + :param source_vault: Required. The relative URL of the Key Vault + containing the secret. + :type source_vault: ~azure.mgmt.compute.v2019_03_01.models.SubResource + """ + + _validation = { + 'secret_url': {'required': True}, + 'source_vault': {'required': True}, + } + + _attribute_map = { + 'secret_url': {'key': 'secretUrl', 'type': 'str'}, + 'source_vault': {'key': 'sourceVault', 'type': 'SubResource'}, + } + + def __init__(self, **kwargs): + super(KeyVaultSecretReference, self).__init__(**kwargs) + self.secret_url = kwargs.get('secret_url', None) + self.source_vault = kwargs.get('source_vault', None) + + +class LinuxConfiguration(Model): + """Specifies the Linux operating system settings on the virtual machine. +

    For a list of supported Linux distributions, see [Linux on + Azure-Endorsed + Distributions](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-endorsed-distros?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json) +

    For running non-endorsed distributions, see [Information for + Non-Endorsed + Distributions](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-create-upload-generic?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json). + + :param disable_password_authentication: Specifies whether password + authentication should be disabled. + :type disable_password_authentication: bool + :param ssh: Specifies the ssh key configuration for a Linux OS. + :type ssh: ~azure.mgmt.compute.v2019_03_01.models.SshConfiguration + :param provision_vm_agent: Indicates whether virtual machine agent should + be provisioned on the virtual machine.

    When this property is not + specified in the request body, default behavior is to set it to true. + This will ensure that VM Agent is installed on the VM so that extensions + can be added to the VM later. + :type provision_vm_agent: bool + """ + + _attribute_map = { + 'disable_password_authentication': {'key': 'disablePasswordAuthentication', 'type': 'bool'}, + 'ssh': {'key': 'ssh', 'type': 'SshConfiguration'}, + 'provision_vm_agent': {'key': 'provisionVMAgent', 'type': 'bool'}, + } + + def __init__(self, **kwargs): + super(LinuxConfiguration, self).__init__(**kwargs) + self.disable_password_authentication = kwargs.get('disable_password_authentication', None) + self.ssh = kwargs.get('ssh', None) + self.provision_vm_agent = kwargs.get('provision_vm_agent', None) + + +class LogAnalyticsInputBase(Model): + """Api input base class for LogAnalytics Api. + + All required parameters must be populated in order to send to Azure. + + :param blob_container_sas_uri: Required. SAS Uri of the logging blob + container to which LogAnalytics Api writes output logs to. + :type blob_container_sas_uri: str + :param from_time: Required. From time of the query + :type from_time: datetime + :param to_time: Required. To time of the query + :type to_time: datetime + :param group_by_throttle_policy: Group query result by Throttle Policy + applied. + :type group_by_throttle_policy: bool + :param group_by_operation_name: Group query result by Operation Name. + :type group_by_operation_name: bool + :param group_by_resource_name: Group query result by Resource Name. + :type group_by_resource_name: bool + """ + + _validation = { + 'blob_container_sas_uri': {'required': True}, + 'from_time': {'required': True}, + 'to_time': {'required': True}, + } + + _attribute_map = { + 'blob_container_sas_uri': {'key': 'blobContainerSasUri', 'type': 'str'}, + 'from_time': {'key': 'fromTime', 'type': 'iso-8601'}, + 'to_time': {'key': 'toTime', 'type': 'iso-8601'}, + 'group_by_throttle_policy': {'key': 'groupByThrottlePolicy', 'type': 'bool'}, + 'group_by_operation_name': {'key': 'groupByOperationName', 'type': 'bool'}, + 'group_by_resource_name': {'key': 'groupByResourceName', 'type': 'bool'}, + } + + def __init__(self, **kwargs): + super(LogAnalyticsInputBase, self).__init__(**kwargs) + self.blob_container_sas_uri = kwargs.get('blob_container_sas_uri', None) + self.from_time = kwargs.get('from_time', None) + self.to_time = kwargs.get('to_time', None) + self.group_by_throttle_policy = kwargs.get('group_by_throttle_policy', None) + self.group_by_operation_name = kwargs.get('group_by_operation_name', None) + self.group_by_resource_name = kwargs.get('group_by_resource_name', None) + + +class LogAnalyticsOperationResult(Model): + """LogAnalytics operation status response. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar properties: LogAnalyticsOutput + :vartype properties: + ~azure.mgmt.compute.v2019_03_01.models.LogAnalyticsOutput + """ + + _validation = { + 'properties': {'readonly': True}, + } + + _attribute_map = { + 'properties': {'key': 'properties', 'type': 'LogAnalyticsOutput'}, + } + + def __init__(self, **kwargs): + super(LogAnalyticsOperationResult, self).__init__(**kwargs) + self.properties = None + + +class LogAnalyticsOutput(Model): + """LogAnalytics output properties. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar output: Output file Uri path to blob container. + :vartype output: str + """ + + _validation = { + 'output': {'readonly': True}, + } + + _attribute_map = { + 'output': {'key': 'output', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(LogAnalyticsOutput, self).__init__(**kwargs) + self.output = None + + +class MaintenanceRedeployStatus(Model): + """Maintenance Operation Status. + + :param is_customer_initiated_maintenance_allowed: True, if customer is + allowed to perform Maintenance. + :type is_customer_initiated_maintenance_allowed: bool + :param pre_maintenance_window_start_time: Start Time for the Pre + Maintenance Window. + :type pre_maintenance_window_start_time: datetime + :param pre_maintenance_window_end_time: End Time for the Pre Maintenance + Window. + :type pre_maintenance_window_end_time: datetime + :param maintenance_window_start_time: Start Time for the Maintenance + Window. + :type maintenance_window_start_time: datetime + :param maintenance_window_end_time: End Time for the Maintenance Window. + :type maintenance_window_end_time: datetime + :param last_operation_result_code: The Last Maintenance Operation Result + Code. Possible values include: 'None', 'RetryLater', 'MaintenanceAborted', + 'MaintenanceCompleted' + :type last_operation_result_code: str or + ~azure.mgmt.compute.v2019_03_01.models.MaintenanceOperationResultCodeTypes + :param last_operation_message: Message returned for the last Maintenance + Operation. + :type last_operation_message: str + """ + + _attribute_map = { + 'is_customer_initiated_maintenance_allowed': {'key': 'isCustomerInitiatedMaintenanceAllowed', 'type': 'bool'}, + 'pre_maintenance_window_start_time': {'key': 'preMaintenanceWindowStartTime', 'type': 'iso-8601'}, + 'pre_maintenance_window_end_time': {'key': 'preMaintenanceWindowEndTime', 'type': 'iso-8601'}, + 'maintenance_window_start_time': {'key': 'maintenanceWindowStartTime', 'type': 'iso-8601'}, + 'maintenance_window_end_time': {'key': 'maintenanceWindowEndTime', 'type': 'iso-8601'}, + 'last_operation_result_code': {'key': 'lastOperationResultCode', 'type': 'MaintenanceOperationResultCodeTypes'}, + 'last_operation_message': {'key': 'lastOperationMessage', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(MaintenanceRedeployStatus, self).__init__(**kwargs) + self.is_customer_initiated_maintenance_allowed = kwargs.get('is_customer_initiated_maintenance_allowed', None) + self.pre_maintenance_window_start_time = kwargs.get('pre_maintenance_window_start_time', None) + self.pre_maintenance_window_end_time = kwargs.get('pre_maintenance_window_end_time', None) + self.maintenance_window_start_time = kwargs.get('maintenance_window_start_time', None) + self.maintenance_window_end_time = kwargs.get('maintenance_window_end_time', None) + self.last_operation_result_code = kwargs.get('last_operation_result_code', None) + self.last_operation_message = kwargs.get('last_operation_message', None) + + +class ManagedArtifact(Model): + """The managed artifact. + + All required parameters must be populated in order to send to Azure. + + :param id: Required. The managed artifact id. + :type id: str + """ + + _validation = { + 'id': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ManagedArtifact, self).__init__(**kwargs) + self.id = kwargs.get('id', None) + + +class ManagedDiskParameters(SubResource): + """The parameters of a managed disk. + + :param id: Resource Id + :type id: str + :param storage_account_type: Specifies the storage account type for the + managed disk. NOTE: UltraSSD_LRS can only be used with data disks, it + cannot be used with OS Disk. Possible values include: 'Standard_LRS', + 'Premium_LRS', 'StandardSSD_LRS', 'UltraSSD_LRS' + :type storage_account_type: str or + ~azure.mgmt.compute.v2019_03_01.models.StorageAccountTypes + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'storage_account_type': {'key': 'storageAccountType', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ManagedDiskParameters, self).__init__(**kwargs) + self.storage_account_type = kwargs.get('storage_account_type', None) + + +class NetworkInterfaceReference(SubResource): + """Describes a network interface reference. + + :param id: Resource Id + :type id: str + :param primary: Specifies the primary network interface in case the + virtual machine has more than 1 network interface. + :type primary: bool + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'primary': {'key': 'properties.primary', 'type': 'bool'}, + } + + def __init__(self, **kwargs): + super(NetworkInterfaceReference, self).__init__(**kwargs) + self.primary = kwargs.get('primary', None) + + +class NetworkProfile(Model): + """Specifies the network interfaces of the virtual machine. + + :param network_interfaces: Specifies the list of resource Ids for the + network interfaces associated with the virtual machine. + :type network_interfaces: + list[~azure.mgmt.compute.v2019_03_01.models.NetworkInterfaceReference] + """ + + _attribute_map = { + 'network_interfaces': {'key': 'networkInterfaces', 'type': '[NetworkInterfaceReference]'}, + } + + def __init__(self, **kwargs): + super(NetworkProfile, self).__init__(**kwargs) + self.network_interfaces = kwargs.get('network_interfaces', None) + + +class OSDisk(Model): + """Specifies information about the operating system disk used by the virtual + machine.

    For more information about disks, see [About disks and + VHDs for Azure virtual + machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-about-disks-vhds?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). + + All required parameters must be populated in order to send to Azure. + + :param os_type: This property allows you to specify the type of the OS + that is included in the disk if creating a VM from user-image or a + specialized VHD.

    Possible values are:

    **Windows** +

    **Linux**. Possible values include: 'Windows', 'Linux' + :type os_type: str or + ~azure.mgmt.compute.v2019_03_01.models.OperatingSystemTypes + :param encryption_settings: Specifies the encryption settings for the OS + Disk.

    Minimum api-version: 2015-06-15 + :type encryption_settings: + ~azure.mgmt.compute.v2019_03_01.models.DiskEncryptionSettings + :param name: The disk name. + :type name: str + :param vhd: The virtual hard disk. + :type vhd: ~azure.mgmt.compute.v2019_03_01.models.VirtualHardDisk + :param image: The source user image virtual hard disk. The virtual hard + disk will be copied before being attached to the virtual machine. If + SourceImage is provided, the destination virtual hard drive must not + exist. + :type image: ~azure.mgmt.compute.v2019_03_01.models.VirtualHardDisk + :param caching: Specifies the caching requirements.

    Possible + values are:

    **None**

    **ReadOnly**

    **ReadWrite** +

    Default: **None for Standard storage. ReadOnly for Premium + storage**. Possible values include: 'None', 'ReadOnly', 'ReadWrite' + :type caching: str or ~azure.mgmt.compute.v2019_03_01.models.CachingTypes + :param write_accelerator_enabled: Specifies whether writeAccelerator + should be enabled or disabled on the disk. + :type write_accelerator_enabled: bool + :param diff_disk_settings: Specifies the ephemeral Disk Settings for the + operating system disk used by the virtual machine. + :type diff_disk_settings: + ~azure.mgmt.compute.v2019_03_01.models.DiffDiskSettings + :param create_option: Required. Specifies how the virtual machine should + be created.

    Possible values are:

    **Attach** \\u2013 This + value is used when you are using a specialized disk to create the virtual + machine.

    **FromImage** \\u2013 This value is used when you are + using an image to create the virtual machine. If you are using a platform + image, you also use the imageReference element described above. If you are + using a marketplace image, you also use the plan element previously + described. Possible values include: 'FromImage', 'Empty', 'Attach' + :type create_option: str or + ~azure.mgmt.compute.v2019_03_01.models.DiskCreateOptionTypes + :param disk_size_gb: Specifies the size of an empty data disk in + gigabytes. This element can be used to overwrite the size of the disk in a + virtual machine image.

    This value cannot be larger than 1023 GB + :type disk_size_gb: int + :param managed_disk: The managed disk parameters. + :type managed_disk: + ~azure.mgmt.compute.v2019_03_01.models.ManagedDiskParameters + """ + + _validation = { + 'create_option': {'required': True}, + } + + _attribute_map = { + 'os_type': {'key': 'osType', 'type': 'OperatingSystemTypes'}, + 'encryption_settings': {'key': 'encryptionSettings', 'type': 'DiskEncryptionSettings'}, + 'name': {'key': 'name', 'type': 'str'}, + 'vhd': {'key': 'vhd', 'type': 'VirtualHardDisk'}, + 'image': {'key': 'image', 'type': 'VirtualHardDisk'}, + 'caching': {'key': 'caching', 'type': 'CachingTypes'}, + 'write_accelerator_enabled': {'key': 'writeAcceleratorEnabled', 'type': 'bool'}, + 'diff_disk_settings': {'key': 'diffDiskSettings', 'type': 'DiffDiskSettings'}, + 'create_option': {'key': 'createOption', 'type': 'str'}, + 'disk_size_gb': {'key': 'diskSizeGB', 'type': 'int'}, + 'managed_disk': {'key': 'managedDisk', 'type': 'ManagedDiskParameters'}, + } + + def __init__(self, **kwargs): + super(OSDisk, self).__init__(**kwargs) + self.os_type = kwargs.get('os_type', None) + self.encryption_settings = kwargs.get('encryption_settings', None) + self.name = kwargs.get('name', None) + self.vhd = kwargs.get('vhd', None) + self.image = kwargs.get('image', None) + self.caching = kwargs.get('caching', None) + self.write_accelerator_enabled = kwargs.get('write_accelerator_enabled', None) + self.diff_disk_settings = kwargs.get('diff_disk_settings', None) + self.create_option = kwargs.get('create_option', None) + self.disk_size_gb = kwargs.get('disk_size_gb', None) + self.managed_disk = kwargs.get('managed_disk', None) + + +class OSDiskImage(Model): + """Contains the os disk image information. + + All required parameters must be populated in order to send to Azure. + + :param operating_system: Required. The operating system of the + osDiskImage. Possible values include: 'Windows', 'Linux' + :type operating_system: str or + ~azure.mgmt.compute.v2019_03_01.models.OperatingSystemTypes + """ + + _validation = { + 'operating_system': {'required': True}, + } + + _attribute_map = { + 'operating_system': {'key': 'operatingSystem', 'type': 'OperatingSystemTypes'}, + } + + def __init__(self, **kwargs): + super(OSDiskImage, self).__init__(**kwargs) + self.operating_system = kwargs.get('operating_system', None) + + +class OSProfile(Model): + """Specifies the operating system settings for the virtual machine. + + :param computer_name: Specifies the host OS name of the virtual machine. +

    This name cannot be updated after the VM is created.

    + **Max-length (Windows):** 15 characters

    **Max-length (Linux):** + 64 characters.

    For naming conventions and restrictions see [Azure + infrastructure services implementation + guidelines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-infrastructure-subscription-accounts-guidelines?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json#1-naming-conventions). + :type computer_name: str + :param admin_username: Specifies the name of the administrator account. +

    **Windows-only restriction:** Cannot end in "."

    + **Disallowed values:** "administrator", "admin", "user", "user1", "test", + "user2", "test1", "user3", "admin1", "1", "123", "a", "actuser", "adm", + "admin2", "aspnet", "backup", "console", "david", "guest", "john", + "owner", "root", "server", "sql", "support", "support_388945a0", "sys", + "test2", "test3", "user4", "user5".

    **Minimum-length (Linux):** 1 + character

    **Max-length (Linux):** 64 characters

    + **Max-length (Windows):** 20 characters

  • For root access to + the Linux VM, see [Using root privileges on Linux virtual machines in + Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-use-root-privileges?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json)
  • + For a list of built-in system users on Linux that should not be used in + this field, see [Selecting User Names for Linux on + Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-usernames?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json) + :type admin_username: str + :param admin_password: Specifies the password of the administrator + account.

    **Minimum-length (Windows):** 8 characters

    + **Minimum-length (Linux):** 6 characters

    **Max-length + (Windows):** 123 characters

    **Max-length (Linux):** 72 characters +

    **Complexity requirements:** 3 out of 4 conditions below need to + be fulfilled
    Has lower characters
    Has upper characters
    Has a + digit
    Has a special character (Regex match [\\W_])

    + **Disallowed values:** "abc@123", "P@$$w0rd", "P@ssw0rd", "P@ssword123", + "Pa$$word", "pass@word1", "Password!", "Password1", "Password22", + "iloveyou!"

    For resetting the password, see [How to reset the + Remote Desktop service or its login password in a Windows + VM](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-reset-rdp?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json) +

    For resetting root password, see [Manage users, SSH, and check or + repair disks on Azure Linux VMs using the VMAccess + Extension](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-using-vmaccess-extension?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json#reset-root-password) + :type admin_password: str + :param custom_data: Specifies a base-64 encoded string of custom data. The + base-64 encoded string is decoded to a binary array that is saved as a + file on the Virtual Machine. The maximum length of the binary array is + 65535 bytes.

    For using cloud-init for your VM, see [Using + cloud-init to customize a Linux VM during + creation](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-using-cloud-init?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json) + :type custom_data: str + :param windows_configuration: Specifies Windows operating system settings + on the virtual machine. + :type windows_configuration: + ~azure.mgmt.compute.v2019_03_01.models.WindowsConfiguration + :param linux_configuration: Specifies the Linux operating system settings + on the virtual machine.

    For a list of supported Linux + distributions, see [Linux on Azure-Endorsed + Distributions](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-endorsed-distros?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json) +

    For running non-endorsed distributions, see [Information for + Non-Endorsed + Distributions](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-create-upload-generic?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json). + :type linux_configuration: + ~azure.mgmt.compute.v2019_03_01.models.LinuxConfiguration + :param secrets: Specifies set of certificates that should be installed + onto the virtual machine. + :type secrets: + list[~azure.mgmt.compute.v2019_03_01.models.VaultSecretGroup] + :param allow_extension_operations: Specifies whether extension operations + should be allowed on the virtual machine.

    This may only be set to + False when no extensions are present on the virtual machine. + :type allow_extension_operations: bool + """ + + _attribute_map = { + 'computer_name': {'key': 'computerName', 'type': 'str'}, + 'admin_username': {'key': 'adminUsername', 'type': 'str'}, + 'admin_password': {'key': 'adminPassword', 'type': 'str'}, + 'custom_data': {'key': 'customData', 'type': 'str'}, + 'windows_configuration': {'key': 'windowsConfiguration', 'type': 'WindowsConfiguration'}, + 'linux_configuration': {'key': 'linuxConfiguration', 'type': 'LinuxConfiguration'}, + 'secrets': {'key': 'secrets', 'type': '[VaultSecretGroup]'}, + 'allow_extension_operations': {'key': 'allowExtensionOperations', 'type': 'bool'}, + } + + def __init__(self, **kwargs): + super(OSProfile, self).__init__(**kwargs) + self.computer_name = kwargs.get('computer_name', None) + self.admin_username = kwargs.get('admin_username', None) + self.admin_password = kwargs.get('admin_password', None) + self.custom_data = kwargs.get('custom_data', None) + self.windows_configuration = kwargs.get('windows_configuration', None) + self.linux_configuration = kwargs.get('linux_configuration', None) + self.secrets = kwargs.get('secrets', None) + self.allow_extension_operations = kwargs.get('allow_extension_operations', None) + + +class Plan(Model): + """Specifies information about the marketplace image used to create the + virtual machine. This element is only used for marketplace images. Before + you can use a marketplace image from an API, you must enable the image for + programmatic use. In the Azure portal, find the marketplace image that you + want to use and then click **Want to deploy programmatically, Get Started + ->**. Enter any required information and then click **Save**. + + :param name: The plan ID. + :type name: str + :param publisher: The publisher ID. + :type publisher: str + :param product: Specifies the product of the image from the marketplace. + This is the same value as Offer under the imageReference element. + :type product: str + :param promotion_code: The promotion code. + :type promotion_code: str + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'publisher': {'key': 'publisher', 'type': 'str'}, + 'product': {'key': 'product', 'type': 'str'}, + 'promotion_code': {'key': 'promotionCode', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(Plan, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.publisher = kwargs.get('publisher', None) + self.product = kwargs.get('product', None) + self.promotion_code = kwargs.get('promotion_code', None) + + +class ProximityPlacementGroup(Resource): + """Specifies information about the proximity placement group. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource Id + :vartype id: str + :ivar name: Resource name + :vartype name: str + :ivar type: Resource type + :vartype type: str + :param location: Required. Resource location + :type location: str + :param tags: Resource tags + :type tags: dict[str, str] + :param proximity_placement_group_type: Specifies the type of the proximity + placement group.

    Possible values are:

    **Standard** : + Co-locate resources within an Azure region or Availability Zone.

    + **Ultra** : For future use. Possible values include: 'Standard', 'Ultra' + :type proximity_placement_group_type: str or + ~azure.mgmt.compute.v2019_03_01.models.ProximityPlacementGroupType + :ivar virtual_machines: A list of references to all virtual machines in + the proximity placement group. + :vartype virtual_machines: + list[~azure.mgmt.compute.v2019_03_01.models.SubResource] + :ivar virtual_machine_scale_sets: A list of references to all virtual + machine scale sets in the proximity placement group. + :vartype virtual_machine_scale_sets: + list[~azure.mgmt.compute.v2019_03_01.models.SubResource] + :ivar availability_sets: A list of references to all availability sets in + the proximity placement group. + :vartype availability_sets: + list[~azure.mgmt.compute.v2019_03_01.models.SubResource] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + 'virtual_machines': {'readonly': True}, + 'virtual_machine_scale_sets': {'readonly': True}, + 'availability_sets': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'proximity_placement_group_type': {'key': 'properties.proximityPlacementGroupType', 'type': 'str'}, + 'virtual_machines': {'key': 'properties.virtualMachines', 'type': '[SubResource]'}, + 'virtual_machine_scale_sets': {'key': 'properties.virtualMachineScaleSets', 'type': '[SubResource]'}, + 'availability_sets': {'key': 'properties.availabilitySets', 'type': '[SubResource]'}, + } + + def __init__(self, **kwargs): + super(ProximityPlacementGroup, self).__init__(**kwargs) + self.proximity_placement_group_type = kwargs.get('proximity_placement_group_type', None) + self.virtual_machines = None + self.virtual_machine_scale_sets = None + self.availability_sets = None + + +class ProximityPlacementGroupUpdate(UpdateResource): + """Specifies information about the proximity placement group. + + :param tags: Resource tags + :type tags: dict[str, str] + """ + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__(self, **kwargs): + super(ProximityPlacementGroupUpdate, self).__init__(**kwargs) + + +class PurchasePlan(Model): + """Used for establishing the purchase context of any 3rd Party artifact + through MarketPlace. + + All required parameters must be populated in order to send to Azure. + + :param publisher: Required. The publisher ID. + :type publisher: str + :param name: Required. The plan ID. + :type name: str + :param product: Required. Specifies the product of the image from the + marketplace. This is the same value as Offer under the imageReference + element. + :type product: str + """ + + _validation = { + 'publisher': {'required': True}, + 'name': {'required': True}, + 'product': {'required': True}, + } + + _attribute_map = { + 'publisher': {'key': 'publisher', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'product': {'key': 'product', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(PurchasePlan, self).__init__(**kwargs) + self.publisher = kwargs.get('publisher', None) + self.name = kwargs.get('name', None) + self.product = kwargs.get('product', None) + + +class RecommendedMachineConfiguration(Model): + """The properties describe the recommended machine configuration for this + Image Definition. These properties are updatable. + + :param v_cp_us: + :type v_cp_us: ~azure.mgmt.compute.v2019_03_01.models.ResourceRange + :param memory: + :type memory: ~azure.mgmt.compute.v2019_03_01.models.ResourceRange + """ + + _attribute_map = { + 'v_cp_us': {'key': 'vCPUs', 'type': 'ResourceRange'}, + 'memory': {'key': 'memory', 'type': 'ResourceRange'}, + } + + def __init__(self, **kwargs): + super(RecommendedMachineConfiguration, self).__init__(**kwargs) + self.v_cp_us = kwargs.get('v_cp_us', None) + self.memory = kwargs.get('memory', None) + + +class RecoveryWalkResponse(Model): + """Response after calling a manual recovery walk. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar walk_performed: Whether the recovery walk was performed + :vartype walk_performed: bool + :ivar next_platform_update_domain: The next update domain that needs to be + walked. Null means walk spanning all update domains has been completed + :vartype next_platform_update_domain: int + """ + + _validation = { + 'walk_performed': {'readonly': True}, + 'next_platform_update_domain': {'readonly': True}, + } + + _attribute_map = { + 'walk_performed': {'key': 'walkPerformed', 'type': 'bool'}, + 'next_platform_update_domain': {'key': 'nextPlatformUpdateDomain', 'type': 'int'}, + } + + def __init__(self, **kwargs): + super(RecoveryWalkResponse, self).__init__(**kwargs) + self.walk_performed = None + self.next_platform_update_domain = None + + +class RegionalReplicationStatus(Model): + """This is the regional replication status. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar region: The region to which the gallery Image Version is being + replicated to. + :vartype region: str + :ivar state: This is the regional replication state. Possible values + include: 'Unknown', 'Replicating', 'Completed', 'Failed' + :vartype state: str or + ~azure.mgmt.compute.v2019_03_01.models.ReplicationState + :ivar details: The details of the replication status. + :vartype details: str + :ivar progress: It indicates progress of the replication job. + :vartype progress: int + """ + + _validation = { + 'region': {'readonly': True}, + 'state': {'readonly': True}, + 'details': {'readonly': True}, + 'progress': {'readonly': True}, + } + + _attribute_map = { + 'region': {'key': 'region', 'type': 'str'}, + 'state': {'key': 'state', 'type': 'str'}, + 'details': {'key': 'details', 'type': 'str'}, + 'progress': {'key': 'progress', 'type': 'int'}, + } + + def __init__(self, **kwargs): + super(RegionalReplicationStatus, self).__init__(**kwargs) + self.region = None + self.state = None + self.details = None + self.progress = None + + +class ReplicationStatus(Model): + """This is the replication status of the gallery Image Version. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar aggregated_state: This is the aggregated replication status based on + all the regional replication status flags. Possible values include: + 'Unknown', 'InProgress', 'Completed', 'Failed' + :vartype aggregated_state: str or + ~azure.mgmt.compute.v2019_03_01.models.AggregatedReplicationState + :ivar summary: This is a summary of replication status for each region. + :vartype summary: + list[~azure.mgmt.compute.v2019_03_01.models.RegionalReplicationStatus] + """ + + _validation = { + 'aggregated_state': {'readonly': True}, + 'summary': {'readonly': True}, + } + + _attribute_map = { + 'aggregated_state': {'key': 'aggregatedState', 'type': 'str'}, + 'summary': {'key': 'summary', 'type': '[RegionalReplicationStatus]'}, + } + + def __init__(self, **kwargs): + super(ReplicationStatus, self).__init__(**kwargs) + self.aggregated_state = None + self.summary = None + + +class RequestRateByIntervalInput(LogAnalyticsInputBase): + """Api request input for LogAnalytics getRequestRateByInterval Api. + + All required parameters must be populated in order to send to Azure. + + :param blob_container_sas_uri: Required. SAS Uri of the logging blob + container to which LogAnalytics Api writes output logs to. + :type blob_container_sas_uri: str + :param from_time: Required. From time of the query + :type from_time: datetime + :param to_time: Required. To time of the query + :type to_time: datetime + :param group_by_throttle_policy: Group query result by Throttle Policy + applied. + :type group_by_throttle_policy: bool + :param group_by_operation_name: Group query result by Operation Name. + :type group_by_operation_name: bool + :param group_by_resource_name: Group query result by Resource Name. + :type group_by_resource_name: bool + :param interval_length: Required. Interval value in minutes used to create + LogAnalytics call rate logs. Possible values include: 'ThreeMins', + 'FiveMins', 'ThirtyMins', 'SixtyMins' + :type interval_length: str or + ~azure.mgmt.compute.v2019_03_01.models.IntervalInMins + """ + + _validation = { + 'blob_container_sas_uri': {'required': True}, + 'from_time': {'required': True}, + 'to_time': {'required': True}, + 'interval_length': {'required': True}, + } + + _attribute_map = { + 'blob_container_sas_uri': {'key': 'blobContainerSasUri', 'type': 'str'}, + 'from_time': {'key': 'fromTime', 'type': 'iso-8601'}, + 'to_time': {'key': 'toTime', 'type': 'iso-8601'}, + 'group_by_throttle_policy': {'key': 'groupByThrottlePolicy', 'type': 'bool'}, + 'group_by_operation_name': {'key': 'groupByOperationName', 'type': 'bool'}, + 'group_by_resource_name': {'key': 'groupByResourceName', 'type': 'bool'}, + 'interval_length': {'key': 'intervalLength', 'type': 'IntervalInMins'}, + } + + def __init__(self, **kwargs): + super(RequestRateByIntervalInput, self).__init__(**kwargs) + self.interval_length = kwargs.get('interval_length', None) + + +class ResourceRange(Model): + """Describes the resource range. + + :param min: The minimum number of the resource. + :type min: int + :param max: The maximum number of the resource. + :type max: int + """ + + _attribute_map = { + 'min': {'key': 'min', 'type': 'int'}, + 'max': {'key': 'max', 'type': 'int'}, + } + + def __init__(self, **kwargs): + super(ResourceRange, self).__init__(**kwargs) + self.min = kwargs.get('min', None) + self.max = kwargs.get('max', None) + + +class RollbackStatusInfo(Model): + """Information about rollback on failed VM instances after a OS Upgrade + operation. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar successfully_rolledback_instance_count: The number of instances + which have been successfully rolled back. + :vartype successfully_rolledback_instance_count: int + :ivar failed_rolledback_instance_count: The number of instances which + failed to rollback. + :vartype failed_rolledback_instance_count: int + :ivar rollback_error: Error details if OS rollback failed. + :vartype rollback_error: ~azure.mgmt.compute.v2019_03_01.models.ApiError + """ + + _validation = { + 'successfully_rolledback_instance_count': {'readonly': True}, + 'failed_rolledback_instance_count': {'readonly': True}, + 'rollback_error': {'readonly': True}, + } + + _attribute_map = { + 'successfully_rolledback_instance_count': {'key': 'successfullyRolledbackInstanceCount', 'type': 'int'}, + 'failed_rolledback_instance_count': {'key': 'failedRolledbackInstanceCount', 'type': 'int'}, + 'rollback_error': {'key': 'rollbackError', 'type': 'ApiError'}, + } + + def __init__(self, **kwargs): + super(RollbackStatusInfo, self).__init__(**kwargs) + self.successfully_rolledback_instance_count = None + self.failed_rolledback_instance_count = None + self.rollback_error = None + + +class RollingUpgradePolicy(Model): + """The configuration parameters used while performing a rolling upgrade. + + :param max_batch_instance_percent: The maximum percent of total virtual + machine instances that will be upgraded simultaneously by the rolling + upgrade in one batch. As this is a maximum, unhealthy instances in + previous or future batches can cause the percentage of instances in a + batch to decrease to ensure higher reliability. The default value for this + parameter is 20%. + :type max_batch_instance_percent: int + :param max_unhealthy_instance_percent: The maximum percentage of the total + virtual machine instances in the scale set that can be simultaneously + unhealthy, either as a result of being upgraded, or by being found in an + unhealthy state by the virtual machine health checks before the rolling + upgrade aborts. This constraint will be checked prior to starting any + batch. The default value for this parameter is 20%. + :type max_unhealthy_instance_percent: int + :param max_unhealthy_upgraded_instance_percent: The maximum percentage of + upgraded virtual machine instances that can be found to be in an unhealthy + state. This check will happen after each batch is upgraded. If this + percentage is ever exceeded, the rolling update aborts. The default value + for this parameter is 20%. + :type max_unhealthy_upgraded_instance_percent: int + :param pause_time_between_batches: The wait time between completing the + update for all virtual machines in one batch and starting the next batch. + The time duration should be specified in ISO 8601 format. The default + value is 0 seconds (PT0S). + :type pause_time_between_batches: str + """ + + _validation = { + 'max_batch_instance_percent': {'maximum': 100, 'minimum': 5}, + 'max_unhealthy_instance_percent': {'maximum': 100, 'minimum': 5}, + 'max_unhealthy_upgraded_instance_percent': {'maximum': 100, 'minimum': 0}, + } + + _attribute_map = { + 'max_batch_instance_percent': {'key': 'maxBatchInstancePercent', 'type': 'int'}, + 'max_unhealthy_instance_percent': {'key': 'maxUnhealthyInstancePercent', 'type': 'int'}, + 'max_unhealthy_upgraded_instance_percent': {'key': 'maxUnhealthyUpgradedInstancePercent', 'type': 'int'}, + 'pause_time_between_batches': {'key': 'pauseTimeBetweenBatches', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(RollingUpgradePolicy, self).__init__(**kwargs) + self.max_batch_instance_percent = kwargs.get('max_batch_instance_percent', None) + self.max_unhealthy_instance_percent = kwargs.get('max_unhealthy_instance_percent', None) + self.max_unhealthy_upgraded_instance_percent = kwargs.get('max_unhealthy_upgraded_instance_percent', None) + self.pause_time_between_batches = kwargs.get('pause_time_between_batches', None) + + +class RollingUpgradeProgressInfo(Model): + """Information about the number of virtual machine instances in each upgrade + state. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar successful_instance_count: The number of instances that have been + successfully upgraded. + :vartype successful_instance_count: int + :ivar failed_instance_count: The number of instances that have failed to + be upgraded successfully. + :vartype failed_instance_count: int + :ivar in_progress_instance_count: The number of instances that are + currently being upgraded. + :vartype in_progress_instance_count: int + :ivar pending_instance_count: The number of instances that have not yet + begun to be upgraded. + :vartype pending_instance_count: int + """ + + _validation = { + 'successful_instance_count': {'readonly': True}, + 'failed_instance_count': {'readonly': True}, + 'in_progress_instance_count': {'readonly': True}, + 'pending_instance_count': {'readonly': True}, + } + + _attribute_map = { + 'successful_instance_count': {'key': 'successfulInstanceCount', 'type': 'int'}, + 'failed_instance_count': {'key': 'failedInstanceCount', 'type': 'int'}, + 'in_progress_instance_count': {'key': 'inProgressInstanceCount', 'type': 'int'}, + 'pending_instance_count': {'key': 'pendingInstanceCount', 'type': 'int'}, + } + + def __init__(self, **kwargs): + super(RollingUpgradeProgressInfo, self).__init__(**kwargs) + self.successful_instance_count = None + self.failed_instance_count = None + self.in_progress_instance_count = None + self.pending_instance_count = None + + +class RollingUpgradeRunningStatus(Model): + """Information about the current running state of the overall upgrade. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar code: Code indicating the current status of the upgrade. Possible + values include: 'RollingForward', 'Cancelled', 'Completed', 'Faulted' + :vartype code: str or + ~azure.mgmt.compute.v2019_03_01.models.RollingUpgradeStatusCode + :ivar start_time: Start time of the upgrade. + :vartype start_time: datetime + :ivar last_action: The last action performed on the rolling upgrade. + Possible values include: 'Start', 'Cancel' + :vartype last_action: str or + ~azure.mgmt.compute.v2019_03_01.models.RollingUpgradeActionType + :ivar last_action_time: Last action time of the upgrade. + :vartype last_action_time: datetime + """ + + _validation = { + 'code': {'readonly': True}, + 'start_time': {'readonly': True}, + 'last_action': {'readonly': True}, + 'last_action_time': {'readonly': True}, + } + + _attribute_map = { + 'code': {'key': 'code', 'type': 'RollingUpgradeStatusCode'}, + 'start_time': {'key': 'startTime', 'type': 'iso-8601'}, + 'last_action': {'key': 'lastAction', 'type': 'RollingUpgradeActionType'}, + 'last_action_time': {'key': 'lastActionTime', 'type': 'iso-8601'}, + } + + def __init__(self, **kwargs): + super(RollingUpgradeRunningStatus, self).__init__(**kwargs) + self.code = None + self.start_time = None + self.last_action = None + self.last_action_time = None + + +class RollingUpgradeStatusInfo(Resource): + """The status of the latest virtual machine scale set rolling upgrade. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource Id + :vartype id: str + :ivar name: Resource name + :vartype name: str + :ivar type: Resource type + :vartype type: str + :param location: Required. Resource location + :type location: str + :param tags: Resource tags + :type tags: dict[str, str] + :ivar policy: The rolling upgrade policies applied for this upgrade. + :vartype policy: + ~azure.mgmt.compute.v2019_03_01.models.RollingUpgradePolicy + :ivar running_status: Information about the current running state of the + overall upgrade. + :vartype running_status: + ~azure.mgmt.compute.v2019_03_01.models.RollingUpgradeRunningStatus + :ivar progress: Information about the number of virtual machine instances + in each upgrade state. + :vartype progress: + ~azure.mgmt.compute.v2019_03_01.models.RollingUpgradeProgressInfo + :ivar error: Error details for this upgrade, if there are any. + :vartype error: ~azure.mgmt.compute.v2019_03_01.models.ApiError + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + 'policy': {'readonly': True}, + 'running_status': {'readonly': True}, + 'progress': {'readonly': True}, + 'error': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'policy': {'key': 'properties.policy', 'type': 'RollingUpgradePolicy'}, + 'running_status': {'key': 'properties.runningStatus', 'type': 'RollingUpgradeRunningStatus'}, + 'progress': {'key': 'properties.progress', 'type': 'RollingUpgradeProgressInfo'}, + 'error': {'key': 'properties.error', 'type': 'ApiError'}, + } + + def __init__(self, **kwargs): + super(RollingUpgradeStatusInfo, self).__init__(**kwargs) + self.policy = None + self.running_status = None + self.progress = None + self.error = None + + +class RunCommandDocumentBase(Model): + """Describes the properties of a Run Command metadata. + + All required parameters must be populated in order to send to Azure. + + :param schema: Required. The VM run command schema. + :type schema: str + :param id: Required. The VM run command id. + :type id: str + :param os_type: Required. The Operating System type. Possible values + include: 'Windows', 'Linux' + :type os_type: str or + ~azure.mgmt.compute.v2019_03_01.models.OperatingSystemTypes + :param label: Required. The VM run command label. + :type label: str + :param description: Required. The VM run command description. + :type description: str + """ + + _validation = { + 'schema': {'required': True}, + 'id': {'required': True}, + 'os_type': {'required': True}, + 'label': {'required': True}, + 'description': {'required': True}, + } + + _attribute_map = { + 'schema': {'key': '$schema', 'type': 'str'}, + 'id': {'key': 'id', 'type': 'str'}, + 'os_type': {'key': 'osType', 'type': 'OperatingSystemTypes'}, + 'label': {'key': 'label', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(RunCommandDocumentBase, self).__init__(**kwargs) + self.schema = kwargs.get('schema', None) + self.id = kwargs.get('id', None) + self.os_type = kwargs.get('os_type', None) + self.label = kwargs.get('label', None) + self.description = kwargs.get('description', None) + + +class RunCommandDocument(RunCommandDocumentBase): + """Describes the properties of a Run Command. + + All required parameters must be populated in order to send to Azure. + + :param schema: Required. The VM run command schema. + :type schema: str + :param id: Required. The VM run command id. + :type id: str + :param os_type: Required. The Operating System type. Possible values + include: 'Windows', 'Linux' + :type os_type: str or + ~azure.mgmt.compute.v2019_03_01.models.OperatingSystemTypes + :param label: Required. The VM run command label. + :type label: str + :param description: Required. The VM run command description. + :type description: str + :param script: Required. The script to be executed. + :type script: list[str] + :param parameters: The parameters used by the script. + :type parameters: + list[~azure.mgmt.compute.v2019_03_01.models.RunCommandParameterDefinition] + """ + + _validation = { + 'schema': {'required': True}, + 'id': {'required': True}, + 'os_type': {'required': True}, + 'label': {'required': True}, + 'description': {'required': True}, + 'script': {'required': True}, + } + + _attribute_map = { + 'schema': {'key': '$schema', 'type': 'str'}, + 'id': {'key': 'id', 'type': 'str'}, + 'os_type': {'key': 'osType', 'type': 'OperatingSystemTypes'}, + 'label': {'key': 'label', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + 'script': {'key': 'script', 'type': '[str]'}, + 'parameters': {'key': 'parameters', 'type': '[RunCommandParameterDefinition]'}, + } + + def __init__(self, **kwargs): + super(RunCommandDocument, self).__init__(**kwargs) + self.script = kwargs.get('script', None) + self.parameters = kwargs.get('parameters', None) + + +class RunCommandInput(Model): + """Capture Virtual Machine parameters. + + All required parameters must be populated in order to send to Azure. + + :param command_id: Required. The run command id. + :type command_id: str + :param script: Optional. The script to be executed. When this value is + given, the given script will override the default script of the command. + :type script: list[str] + :param parameters: The run command parameters. + :type parameters: + list[~azure.mgmt.compute.v2019_03_01.models.RunCommandInputParameter] + """ + + _validation = { + 'command_id': {'required': True}, + } + + _attribute_map = { + 'command_id': {'key': 'commandId', 'type': 'str'}, + 'script': {'key': 'script', 'type': '[str]'}, + 'parameters': {'key': 'parameters', 'type': '[RunCommandInputParameter]'}, + } + + def __init__(self, **kwargs): + super(RunCommandInput, self).__init__(**kwargs) + self.command_id = kwargs.get('command_id', None) + self.script = kwargs.get('script', None) + self.parameters = kwargs.get('parameters', None) + + +class RunCommandInputParameter(Model): + """Describes the properties of a run command parameter. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. The run command parameter name. + :type name: str + :param value: Required. The run command parameter value. + :type value: str + """ + + _validation = { + 'name': {'required': True}, + 'value': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'value': {'key': 'value', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(RunCommandInputParameter, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.value = kwargs.get('value', None) + + +class RunCommandParameterDefinition(Model): + """Describes the properties of a run command parameter. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. The run command parameter name. + :type name: str + :param type: Required. The run command parameter type. + :type type: str + :param default_value: The run command parameter default value. + :type default_value: str + :param required: The run command parameter required. Default value: False + . + :type required: bool + """ + + _validation = { + 'name': {'required': True}, + 'type': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'default_value': {'key': 'defaultValue', 'type': 'str'}, + 'required': {'key': 'required', 'type': 'bool'}, + } + + def __init__(self, **kwargs): + super(RunCommandParameterDefinition, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.type = kwargs.get('type', None) + self.default_value = kwargs.get('default_value', None) + self.required = kwargs.get('required', False) + + +class RunCommandResult(Model): + """RunCommandResult. + + :param value: Run command operation response. + :type value: + list[~azure.mgmt.compute.v2019_03_01.models.InstanceViewStatus] + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[InstanceViewStatus]'}, + } + + def __init__(self, **kwargs): + super(RunCommandResult, self).__init__(**kwargs) + self.value = kwargs.get('value', None) + + +class Sku(Model): + """Describes a virtual machine scale set sku. + + :param name: The sku name. + :type name: str + :param tier: Specifies the tier of virtual machines in a scale set.

    Possible Values:

    **Standard**

    **Basic** + :type tier: str + :param capacity: Specifies the number of virtual machines in the scale + set. + :type capacity: long + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'tier': {'key': 'tier', 'type': 'str'}, + 'capacity': {'key': 'capacity', 'type': 'long'}, + } + + def __init__(self, **kwargs): + super(Sku, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.tier = kwargs.get('tier', None) + self.capacity = kwargs.get('capacity', None) + + +class SshConfiguration(Model): + """SSH configuration for Linux based VMs running on Azure. + + :param public_keys: The list of SSH public keys used to authenticate with + linux based VMs. + :type public_keys: + list[~azure.mgmt.compute.v2019_03_01.models.SshPublicKey] + """ + + _attribute_map = { + 'public_keys': {'key': 'publicKeys', 'type': '[SshPublicKey]'}, + } + + def __init__(self, **kwargs): + super(SshConfiguration, self).__init__(**kwargs) + self.public_keys = kwargs.get('public_keys', None) + + +class SshPublicKey(Model): + """Contains information about SSH certificate public key and the path on the + Linux VM where the public key is placed. + + :param path: Specifies the full path on the created VM where ssh public + key is stored. If the file already exists, the specified key is appended + to the file. Example: /home/user/.ssh/authorized_keys + :type path: str + :param key_data: SSH public key certificate used to authenticate with the + VM through ssh. The key needs to be at least 2048-bit and in ssh-rsa + format.

    For creating ssh keys, see [Create SSH keys on Linux and + Mac for Linux VMs in + Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-mac-create-ssh-keys?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json). + :type key_data: str + """ + + _attribute_map = { + 'path': {'key': 'path', 'type': 'str'}, + 'key_data': {'key': 'keyData', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(SshPublicKey, self).__init__(**kwargs) + self.path = kwargs.get('path', None) + self.key_data = kwargs.get('key_data', None) + + +class StorageProfile(Model): + """Specifies the storage settings for the virtual machine disks. + + :param image_reference: Specifies information about the image to use. You + can specify information about platform images, marketplace images, or + virtual machine images. This element is required when you want to use a + platform image, marketplace image, or virtual machine image, but is not + used in other creation operations. + :type image_reference: + ~azure.mgmt.compute.v2019_03_01.models.ImageReference + :param os_disk: Specifies information about the operating system disk used + by the virtual machine.

    For more information about disks, see + [About disks and VHDs for Azure virtual + machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-about-disks-vhds?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). + :type os_disk: ~azure.mgmt.compute.v2019_03_01.models.OSDisk + :param data_disks: Specifies the parameters that are used to add a data + disk to a virtual machine.

    For more information about disks, see + [About disks and VHDs for Azure virtual + machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-about-disks-vhds?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). + :type data_disks: list[~azure.mgmt.compute.v2019_03_01.models.DataDisk] + """ + + _attribute_map = { + 'image_reference': {'key': 'imageReference', 'type': 'ImageReference'}, + 'os_disk': {'key': 'osDisk', 'type': 'OSDisk'}, + 'data_disks': {'key': 'dataDisks', 'type': '[DataDisk]'}, + } + + def __init__(self, **kwargs): + super(StorageProfile, self).__init__(**kwargs) + self.image_reference = kwargs.get('image_reference', None) + self.os_disk = kwargs.get('os_disk', None) + self.data_disks = kwargs.get('data_disks', None) + + +class SubResourceReadOnly(Model): + """SubResourceReadOnly. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource Id + :vartype id: str + """ + + _validation = { + 'id': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(SubResourceReadOnly, self).__init__(**kwargs) + self.id = None + + +class TargetRegion(Model): + """Describes the target region information. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. The name of the region. + :type name: str + :param regional_replica_count: The number of replicas of the Image Version + to be created per region. This property is updatable. + :type regional_replica_count: int + :param storage_account_type: Specifies the storage account type to be used + to store the image. This property is not updatable. Possible values + include: 'Standard_LRS', 'Standard_ZRS' + :type storage_account_type: str or + ~azure.mgmt.compute.v2019_03_01.models.StorageAccountType + """ + + _validation = { + 'name': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'regional_replica_count': {'key': 'regionalReplicaCount', 'type': 'int'}, + 'storage_account_type': {'key': 'storageAccountType', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(TargetRegion, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.regional_replica_count = kwargs.get('regional_replica_count', None) + self.storage_account_type = kwargs.get('storage_account_type', None) + + +class ThrottledRequestsInput(LogAnalyticsInputBase): + """Api request input for LogAnalytics getThrottledRequests Api. + + All required parameters must be populated in order to send to Azure. + + :param blob_container_sas_uri: Required. SAS Uri of the logging blob + container to which LogAnalytics Api writes output logs to. + :type blob_container_sas_uri: str + :param from_time: Required. From time of the query + :type from_time: datetime + :param to_time: Required. To time of the query + :type to_time: datetime + :param group_by_throttle_policy: Group query result by Throttle Policy + applied. + :type group_by_throttle_policy: bool + :param group_by_operation_name: Group query result by Operation Name. + :type group_by_operation_name: bool + :param group_by_resource_name: Group query result by Resource Name. + :type group_by_resource_name: bool + """ + + _validation = { + 'blob_container_sas_uri': {'required': True}, + 'from_time': {'required': True}, + 'to_time': {'required': True}, + } + + _attribute_map = { + 'blob_container_sas_uri': {'key': 'blobContainerSasUri', 'type': 'str'}, + 'from_time': {'key': 'fromTime', 'type': 'iso-8601'}, + 'to_time': {'key': 'toTime', 'type': 'iso-8601'}, + 'group_by_throttle_policy': {'key': 'groupByThrottlePolicy', 'type': 'bool'}, + 'group_by_operation_name': {'key': 'groupByOperationName', 'type': 'bool'}, + 'group_by_resource_name': {'key': 'groupByResourceName', 'type': 'bool'}, + } + + def __init__(self, **kwargs): + super(ThrottledRequestsInput, self).__init__(**kwargs) + + +class UpgradeOperationHistoricalStatusInfo(Model): + """Virtual Machine Scale Set OS Upgrade History operation response. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar properties: Information about the properties of the upgrade + operation. + :vartype properties: + ~azure.mgmt.compute.v2019_03_01.models.UpgradeOperationHistoricalStatusInfoProperties + :ivar type: Resource type + :vartype type: str + :ivar location: Resource location + :vartype location: str + """ + + _validation = { + 'properties': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'readonly': True}, + } + + _attribute_map = { + 'properties': {'key': 'properties', 'type': 'UpgradeOperationHistoricalStatusInfoProperties'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(UpgradeOperationHistoricalStatusInfo, self).__init__(**kwargs) + self.properties = None + self.type = None + self.location = None + + +class UpgradeOperationHistoricalStatusInfoProperties(Model): + """Describes each OS upgrade on the Virtual Machine Scale Set. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar running_status: Information about the overall status of the upgrade + operation. + :vartype running_status: + ~azure.mgmt.compute.v2019_03_01.models.UpgradeOperationHistoryStatus + :ivar progress: Counts of the VMs in each state. + :vartype progress: + ~azure.mgmt.compute.v2019_03_01.models.RollingUpgradeProgressInfo + :ivar error: Error Details for this upgrade if there are any. + :vartype error: ~azure.mgmt.compute.v2019_03_01.models.ApiError + :ivar started_by: Invoker of the Upgrade Operation. Possible values + include: 'Unknown', 'User', 'Platform' + :vartype started_by: str or + ~azure.mgmt.compute.v2019_03_01.models.UpgradeOperationInvoker + :ivar target_image_reference: Image Reference details + :vartype target_image_reference: + ~azure.mgmt.compute.v2019_03_01.models.ImageReference + :ivar rollback_info: Information about OS rollback if performed + :vartype rollback_info: + ~azure.mgmt.compute.v2019_03_01.models.RollbackStatusInfo + """ + + _validation = { + 'running_status': {'readonly': True}, + 'progress': {'readonly': True}, + 'error': {'readonly': True}, + 'started_by': {'readonly': True}, + 'target_image_reference': {'readonly': True}, + 'rollback_info': {'readonly': True}, + } + + _attribute_map = { + 'running_status': {'key': 'runningStatus', 'type': 'UpgradeOperationHistoryStatus'}, + 'progress': {'key': 'progress', 'type': 'RollingUpgradeProgressInfo'}, + 'error': {'key': 'error', 'type': 'ApiError'}, + 'started_by': {'key': 'startedBy', 'type': 'UpgradeOperationInvoker'}, + 'target_image_reference': {'key': 'targetImageReference', 'type': 'ImageReference'}, + 'rollback_info': {'key': 'rollbackInfo', 'type': 'RollbackStatusInfo'}, + } + + def __init__(self, **kwargs): + super(UpgradeOperationHistoricalStatusInfoProperties, self).__init__(**kwargs) + self.running_status = None + self.progress = None + self.error = None + self.started_by = None + self.target_image_reference = None + self.rollback_info = None + + +class UpgradeOperationHistoryStatus(Model): + """Information about the current running state of the overall upgrade. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar code: Code indicating the current status of the upgrade. Possible + values include: 'RollingForward', 'Cancelled', 'Completed', 'Faulted' + :vartype code: str or ~azure.mgmt.compute.v2019_03_01.models.UpgradeState + :ivar start_time: Start time of the upgrade. + :vartype start_time: datetime + :ivar end_time: End time of the upgrade. + :vartype end_time: datetime + """ + + _validation = { + 'code': {'readonly': True}, + 'start_time': {'readonly': True}, + 'end_time': {'readonly': True}, + } + + _attribute_map = { + 'code': {'key': 'code', 'type': 'UpgradeState'}, + 'start_time': {'key': 'startTime', 'type': 'iso-8601'}, + 'end_time': {'key': 'endTime', 'type': 'iso-8601'}, + } + + def __init__(self, **kwargs): + super(UpgradeOperationHistoryStatus, self).__init__(**kwargs) + self.code = None + self.start_time = None + self.end_time = None + + +class UpgradePolicy(Model): + """Describes an upgrade policy - automatic, manual, or rolling. + + :param mode: Specifies the mode of an upgrade to virtual machines in the + scale set.

    Possible values are:

    **Manual** - You + control the application of updates to virtual machines in the scale set. + You do this by using the manualUpgrade action.

    **Automatic** - + All virtual machines in the scale set are automatically updated at the + same time. Possible values include: 'Automatic', 'Manual', 'Rolling' + :type mode: str or ~azure.mgmt.compute.v2019_03_01.models.UpgradeMode + :param rolling_upgrade_policy: The configuration parameters used while + performing a rolling upgrade. + :type rolling_upgrade_policy: + ~azure.mgmt.compute.v2019_03_01.models.RollingUpgradePolicy + :param automatic_os_upgrade_policy: Configuration parameters used for + performing automatic OS Upgrade. + :type automatic_os_upgrade_policy: + ~azure.mgmt.compute.v2019_03_01.models.AutomaticOSUpgradePolicy + """ + + _attribute_map = { + 'mode': {'key': 'mode', 'type': 'UpgradeMode'}, + 'rolling_upgrade_policy': {'key': 'rollingUpgradePolicy', 'type': 'RollingUpgradePolicy'}, + 'automatic_os_upgrade_policy': {'key': 'automaticOSUpgradePolicy', 'type': 'AutomaticOSUpgradePolicy'}, + } + + def __init__(self, **kwargs): + super(UpgradePolicy, self).__init__(**kwargs) + self.mode = kwargs.get('mode', None) + self.rolling_upgrade_policy = kwargs.get('rolling_upgrade_policy', None) + self.automatic_os_upgrade_policy = kwargs.get('automatic_os_upgrade_policy', None) + + +class Usage(Model): + """Describes Compute Resource Usage. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar unit: Required. An enum describing the unit of usage measurement. + Default value: "Count" . + :vartype unit: str + :param current_value: Required. The current usage of the resource. + :type current_value: int + :param limit: Required. The maximum permitted usage of the resource. + :type limit: long + :param name: Required. The name of the type of usage. + :type name: ~azure.mgmt.compute.v2019_03_01.models.UsageName + """ + + _validation = { + 'unit': {'required': True, 'constant': True}, + 'current_value': {'required': True}, + 'limit': {'required': True}, + 'name': {'required': True}, + } + + _attribute_map = { + 'unit': {'key': 'unit', 'type': 'str'}, + 'current_value': {'key': 'currentValue', 'type': 'int'}, + 'limit': {'key': 'limit', 'type': 'long'}, + 'name': {'key': 'name', 'type': 'UsageName'}, + } + + unit = "Count" + + def __init__(self, **kwargs): + super(Usage, self).__init__(**kwargs) + self.current_value = kwargs.get('current_value', None) + self.limit = kwargs.get('limit', None) + self.name = kwargs.get('name', None) + + +class UsageName(Model): + """The Usage Names. + + :param value: The name of the resource. + :type value: str + :param localized_value: The localized name of the resource. + :type localized_value: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': 'str'}, + 'localized_value': {'key': 'localizedValue', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(UsageName, self).__init__(**kwargs) + self.value = kwargs.get('value', None) + self.localized_value = kwargs.get('localized_value', None) + + +class UserArtifactSource(Model): + """The source image from which the Image Version is going to be created. + + All required parameters must be populated in order to send to Azure. + + :param file_name: Required. Required. The fileName of the artifact. + :type file_name: str + :param media_link: Required. Required. The mediaLink of the artifact, must + be a readable storage blob. + :type media_link: str + """ + + _validation = { + 'file_name': {'required': True}, + 'media_link': {'required': True}, + } + + _attribute_map = { + 'file_name': {'key': 'fileName', 'type': 'str'}, + 'media_link': {'key': 'mediaLink', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(UserArtifactSource, self).__init__(**kwargs) + self.file_name = kwargs.get('file_name', None) + self.media_link = kwargs.get('media_link', None) + + +class VaultCertificate(Model): + """Describes a single certificate reference in a Key Vault, and where the + certificate should reside on the VM. + + :param certificate_url: This is the URL of a certificate that has been + uploaded to Key Vault as a secret. For adding a secret to the Key Vault, + see [Add a key or secret to the key + vault](https://docs.microsoft.com/azure/key-vault/key-vault-get-started/#add). + In this case, your certificate needs to be It is the Base64 encoding of + the following JSON Object which is encoded in UTF-8:

    {
    + "data":"",
    "dataType":"pfx",
    + "password":""
    } + :type certificate_url: str + :param certificate_store: For Windows VMs, specifies the certificate store + on the Virtual Machine to which the certificate should be added. The + specified certificate store is implicitly in the LocalMachine account. +

    For Linux VMs, the certificate file is placed under the + /var/lib/waagent directory, with the file name + <UppercaseThumbprint>.crt for the X509 certificate file and + <UppercaseThumbprint>.prv for private key. Both of these files are + .pem formatted. + :type certificate_store: str + """ + + _attribute_map = { + 'certificate_url': {'key': 'certificateUrl', 'type': 'str'}, + 'certificate_store': {'key': 'certificateStore', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(VaultCertificate, self).__init__(**kwargs) + self.certificate_url = kwargs.get('certificate_url', None) + self.certificate_store = kwargs.get('certificate_store', None) + + +class VaultSecretGroup(Model): + """Describes a set of certificates which are all in the same Key Vault. + + :param source_vault: The relative URL of the Key Vault containing all of + the certificates in VaultCertificates. + :type source_vault: ~azure.mgmt.compute.v2019_03_01.models.SubResource + :param vault_certificates: The list of key vault references in SourceVault + which contain certificates. + :type vault_certificates: + list[~azure.mgmt.compute.v2019_03_01.models.VaultCertificate] + """ + + _attribute_map = { + 'source_vault': {'key': 'sourceVault', 'type': 'SubResource'}, + 'vault_certificates': {'key': 'vaultCertificates', 'type': '[VaultCertificate]'}, + } + + def __init__(self, **kwargs): + super(VaultSecretGroup, self).__init__(**kwargs) + self.source_vault = kwargs.get('source_vault', None) + self.vault_certificates = kwargs.get('vault_certificates', None) + + +class VirtualHardDisk(Model): + """Describes the uri of a disk. + + :param uri: Specifies the virtual hard disk's uri. + :type uri: str + """ + + _attribute_map = { + 'uri': {'key': 'uri', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(VirtualHardDisk, self).__init__(**kwargs) + self.uri = kwargs.get('uri', None) + + +class VirtualMachine(Resource): + """Describes a Virtual Machine. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource Id + :vartype id: str + :ivar name: Resource name + :vartype name: str + :ivar type: Resource type + :vartype type: str + :param location: Required. Resource location + :type location: str + :param tags: Resource tags + :type tags: dict[str, str] + :param plan: Specifies information about the marketplace image used to + create the virtual machine. This element is only used for marketplace + images. Before you can use a marketplace image from an API, you must + enable the image for programmatic use. In the Azure portal, find the + marketplace image that you want to use and then click **Want to deploy + programmatically, Get Started ->**. Enter any required information and + then click **Save**. + :type plan: ~azure.mgmt.compute.v2019_03_01.models.Plan + :param hardware_profile: Specifies the hardware settings for the virtual + machine. + :type hardware_profile: + ~azure.mgmt.compute.v2019_03_01.models.HardwareProfile + :param storage_profile: Specifies the storage settings for the virtual + machine disks. + :type storage_profile: + ~azure.mgmt.compute.v2019_03_01.models.StorageProfile + :param additional_capabilities: Specifies additional capabilities enabled + or disabled on the virtual machine. + :type additional_capabilities: + ~azure.mgmt.compute.v2019_03_01.models.AdditionalCapabilities + :param os_profile: Specifies the operating system settings for the virtual + machine. + :type os_profile: ~azure.mgmt.compute.v2019_03_01.models.OSProfile + :param network_profile: Specifies the network interfaces of the virtual + machine. + :type network_profile: + ~azure.mgmt.compute.v2019_03_01.models.NetworkProfile + :param diagnostics_profile: Specifies the boot diagnostic settings state. +

    Minimum api-version: 2015-06-15. + :type diagnostics_profile: + ~azure.mgmt.compute.v2019_03_01.models.DiagnosticsProfile + :param availability_set: Specifies information about the availability set + that the virtual machine should be assigned to. Virtual machines specified + in the same availability set are allocated to different nodes to maximize + availability. For more information about availability sets, see [Manage + the availability of virtual + machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-manage-availability?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). +

    For more information on Azure planned maintenance, see [Planned + maintenance for virtual machines in + Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-planned-maintenance?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json) +

    Currently, a VM can only be added to availability set at creation + time. An existing VM cannot be added to an availability set. + :type availability_set: ~azure.mgmt.compute.v2019_03_01.models.SubResource + :param proximity_placement_group: Specifies information about the + proximity placement group that the virtual machine should be assigned to. +

    Minimum api-version: 2018-04-01. + :type proximity_placement_group: + ~azure.mgmt.compute.v2019_03_01.models.SubResource + :param host: Specifies information about the dedicated host that the + virtual machine resides in.

    Minimum api-version: 2018-10-01. + :type host: ~azure.mgmt.compute.v2019_03_01.models.SubResource + :ivar provisioning_state: The provisioning state, which only appears in + the response. + :vartype provisioning_state: str + :ivar instance_view: The virtual machine instance view. + :vartype instance_view: + ~azure.mgmt.compute.v2019_03_01.models.VirtualMachineInstanceView + :param license_type: Specifies that the image or disk that is being used + was licensed on-premises. This element is only used for images that + contain the Windows Server operating system.

    Possible values are: +

    Windows_Client

    Windows_Server

    If this element + is included in a request for an update, the value must match the initial + value. This value cannot be updated.

    For more information, see + [Azure Hybrid Use Benefit for Windows + Server](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-hybrid-use-benefit-licensing?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json) +

    Minimum api-version: 2015-06-15 + :type license_type: str + :ivar vm_id: Specifies the VM unique ID which is a 128-bits identifier + that is encoded and stored in all Azure IaaS VMs SMBIOS and can be read + using platform BIOS commands. + :vartype vm_id: str + :ivar resources: The virtual machine child extension resources. + :vartype resources: + list[~azure.mgmt.compute.v2019_03_01.models.VirtualMachineExtension] + :param identity: The identity of the virtual machine, if configured. + :type identity: + ~azure.mgmt.compute.v2019_03_01.models.VirtualMachineIdentity + :param zones: The virtual machine zones. + :type zones: list[str] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + 'provisioning_state': {'readonly': True}, + 'instance_view': {'readonly': True}, + 'vm_id': {'readonly': True}, + 'resources': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'plan': {'key': 'plan', 'type': 'Plan'}, + 'hardware_profile': {'key': 'properties.hardwareProfile', 'type': 'HardwareProfile'}, + 'storage_profile': {'key': 'properties.storageProfile', 'type': 'StorageProfile'}, + 'additional_capabilities': {'key': 'properties.additionalCapabilities', 'type': 'AdditionalCapabilities'}, + 'os_profile': {'key': 'properties.osProfile', 'type': 'OSProfile'}, + 'network_profile': {'key': 'properties.networkProfile', 'type': 'NetworkProfile'}, + 'diagnostics_profile': {'key': 'properties.diagnosticsProfile', 'type': 'DiagnosticsProfile'}, + 'availability_set': {'key': 'properties.availabilitySet', 'type': 'SubResource'}, + 'proximity_placement_group': {'key': 'properties.proximityPlacementGroup', 'type': 'SubResource'}, + 'host': {'key': 'properties.host', 'type': 'SubResource'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'instance_view': {'key': 'properties.instanceView', 'type': 'VirtualMachineInstanceView'}, + 'license_type': {'key': 'properties.licenseType', 'type': 'str'}, + 'vm_id': {'key': 'properties.vmId', 'type': 'str'}, + 'resources': {'key': 'resources', 'type': '[VirtualMachineExtension]'}, + 'identity': {'key': 'identity', 'type': 'VirtualMachineIdentity'}, + 'zones': {'key': 'zones', 'type': '[str]'}, + } + + def __init__(self, **kwargs): + super(VirtualMachine, self).__init__(**kwargs) + self.plan = kwargs.get('plan', None) + self.hardware_profile = kwargs.get('hardware_profile', None) + self.storage_profile = kwargs.get('storage_profile', None) + self.additional_capabilities = kwargs.get('additional_capabilities', None) + self.os_profile = kwargs.get('os_profile', None) + self.network_profile = kwargs.get('network_profile', None) + self.diagnostics_profile = kwargs.get('diagnostics_profile', None) + self.availability_set = kwargs.get('availability_set', None) + self.proximity_placement_group = kwargs.get('proximity_placement_group', None) + self.host = kwargs.get('host', None) + self.provisioning_state = None + self.instance_view = None + self.license_type = kwargs.get('license_type', None) + self.vm_id = None + self.resources = None + self.identity = kwargs.get('identity', None) + self.zones = kwargs.get('zones', None) + + +class VirtualMachineAgentInstanceView(Model): + """The instance view of the VM Agent running on the virtual machine. + + :param vm_agent_version: The VM Agent full version. + :type vm_agent_version: str + :param extension_handlers: The virtual machine extension handler instance + view. + :type extension_handlers: + list[~azure.mgmt.compute.v2019_03_01.models.VirtualMachineExtensionHandlerInstanceView] + :param statuses: The resource status information. + :type statuses: + list[~azure.mgmt.compute.v2019_03_01.models.InstanceViewStatus] + """ + + _attribute_map = { + 'vm_agent_version': {'key': 'vmAgentVersion', 'type': 'str'}, + 'extension_handlers': {'key': 'extensionHandlers', 'type': '[VirtualMachineExtensionHandlerInstanceView]'}, + 'statuses': {'key': 'statuses', 'type': '[InstanceViewStatus]'}, + } + + def __init__(self, **kwargs): + super(VirtualMachineAgentInstanceView, self).__init__(**kwargs) + self.vm_agent_version = kwargs.get('vm_agent_version', None) + self.extension_handlers = kwargs.get('extension_handlers', None) + self.statuses = kwargs.get('statuses', None) + + +class VirtualMachineCaptureParameters(Model): + """Capture Virtual Machine parameters. + + All required parameters must be populated in order to send to Azure. + + :param vhd_prefix: Required. The captured virtual hard disk's name prefix. + :type vhd_prefix: str + :param destination_container_name: Required. The destination container + name. + :type destination_container_name: str + :param overwrite_vhds: Required. Specifies whether to overwrite the + destination virtual hard disk, in case of conflict. + :type overwrite_vhds: bool + """ + + _validation = { + 'vhd_prefix': {'required': True}, + 'destination_container_name': {'required': True}, + 'overwrite_vhds': {'required': True}, + } + + _attribute_map = { + 'vhd_prefix': {'key': 'vhdPrefix', 'type': 'str'}, + 'destination_container_name': {'key': 'destinationContainerName', 'type': 'str'}, + 'overwrite_vhds': {'key': 'overwriteVhds', 'type': 'bool'}, + } + + def __init__(self, **kwargs): + super(VirtualMachineCaptureParameters, self).__init__(**kwargs) + self.vhd_prefix = kwargs.get('vhd_prefix', None) + self.destination_container_name = kwargs.get('destination_container_name', None) + self.overwrite_vhds = kwargs.get('overwrite_vhds', None) + + +class VirtualMachineCaptureResult(SubResource): + """Output of virtual machine capture operation. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :param id: Resource Id + :type id: str + :ivar schema: the schema of the captured virtual machine + :vartype schema: str + :ivar content_version: the version of the content + :vartype content_version: str + :ivar parameters: parameters of the captured virtual machine + :vartype parameters: object + :ivar resources: a list of resource items of the captured virtual machine + :vartype resources: list[object] + """ + + _validation = { + 'schema': {'readonly': True}, + 'content_version': {'readonly': True}, + 'parameters': {'readonly': True}, + 'resources': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'schema': {'key': '$schema', 'type': 'str'}, + 'content_version': {'key': 'contentVersion', 'type': 'str'}, + 'parameters': {'key': 'parameters', 'type': 'object'}, + 'resources': {'key': 'resources', 'type': '[object]'}, + } + + def __init__(self, **kwargs): + super(VirtualMachineCaptureResult, self).__init__(**kwargs) + self.schema = None + self.content_version = None + self.parameters = None + self.resources = None + + +class VirtualMachineExtension(Resource): + """Describes a Virtual Machine Extension. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource Id + :vartype id: str + :ivar name: Resource name + :vartype name: str + :ivar type: Resource type + :vartype type: str + :param location: Required. Resource location + :type location: str + :param tags: Resource tags + :type tags: dict[str, str] + :param force_update_tag: How the extension handler should be forced to + update even if the extension configuration has not changed. + :type force_update_tag: str + :param publisher: The name of the extension handler publisher. + :type publisher: str + :param virtual_machine_extension_type: Specifies the type of the + extension; an example is "CustomScriptExtension". + :type virtual_machine_extension_type: str + :param type_handler_version: Specifies the version of the script handler. + :type type_handler_version: str + :param auto_upgrade_minor_version: Indicates whether the extension should + use a newer minor version if one is available at deployment time. Once + deployed, however, the extension will not upgrade minor versions unless + redeployed, even with this property set to true. + :type auto_upgrade_minor_version: bool + :param settings: Json formatted public settings for the extension. + :type settings: object + :param protected_settings: The extension can contain either + protectedSettings or protectedSettingsFromKeyVault or no protected + settings at all. + :type protected_settings: object + :ivar provisioning_state: The provisioning state, which only appears in + the response. + :vartype provisioning_state: str + :param instance_view: The virtual machine extension instance view. + :type instance_view: + ~azure.mgmt.compute.v2019_03_01.models.VirtualMachineExtensionInstanceView + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'force_update_tag': {'key': 'properties.forceUpdateTag', 'type': 'str'}, + 'publisher': {'key': 'properties.publisher', 'type': 'str'}, + 'virtual_machine_extension_type': {'key': 'properties.type', 'type': 'str'}, + 'type_handler_version': {'key': 'properties.typeHandlerVersion', 'type': 'str'}, + 'auto_upgrade_minor_version': {'key': 'properties.autoUpgradeMinorVersion', 'type': 'bool'}, + 'settings': {'key': 'properties.settings', 'type': 'object'}, + 'protected_settings': {'key': 'properties.protectedSettings', 'type': 'object'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'instance_view': {'key': 'properties.instanceView', 'type': 'VirtualMachineExtensionInstanceView'}, + } + + def __init__(self, **kwargs): + super(VirtualMachineExtension, self).__init__(**kwargs) + self.force_update_tag = kwargs.get('force_update_tag', None) + self.publisher = kwargs.get('publisher', None) + self.virtual_machine_extension_type = kwargs.get('virtual_machine_extension_type', None) + self.type_handler_version = kwargs.get('type_handler_version', None) + self.auto_upgrade_minor_version = kwargs.get('auto_upgrade_minor_version', None) + self.settings = kwargs.get('settings', None) + self.protected_settings = kwargs.get('protected_settings', None) + self.provisioning_state = None + self.instance_view = kwargs.get('instance_view', None) + + +class VirtualMachineExtensionHandlerInstanceView(Model): + """The instance view of a virtual machine extension handler. + + :param type: Specifies the type of the extension; an example is + "CustomScriptExtension". + :type type: str + :param type_handler_version: Specifies the version of the script handler. + :type type_handler_version: str + :param status: The extension handler status. + :type status: ~azure.mgmt.compute.v2019_03_01.models.InstanceViewStatus + """ + + _attribute_map = { + 'type': {'key': 'type', 'type': 'str'}, + 'type_handler_version': {'key': 'typeHandlerVersion', 'type': 'str'}, + 'status': {'key': 'status', 'type': 'InstanceViewStatus'}, + } + + def __init__(self, **kwargs): + super(VirtualMachineExtensionHandlerInstanceView, self).__init__(**kwargs) + self.type = kwargs.get('type', None) + self.type_handler_version = kwargs.get('type_handler_version', None) + self.status = kwargs.get('status', None) + + +class VirtualMachineExtensionImage(Resource): + """Describes a Virtual Machine Extension Image. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource Id + :vartype id: str + :ivar name: Resource name + :vartype name: str + :ivar type: Resource type + :vartype type: str + :param location: Required. Resource location + :type location: str + :param tags: Resource tags + :type tags: dict[str, str] + :param operating_system: Required. The operating system this extension + supports. + :type operating_system: str + :param compute_role: Required. The type of role (IaaS or PaaS) this + extension supports. + :type compute_role: str + :param handler_schema: Required. The schema defined by publisher, where + extension consumers should provide settings in a matching schema. + :type handler_schema: str + :param vm_scale_set_enabled: Whether the extension can be used on xRP + VMScaleSets. By default existing extensions are usable on scalesets, but + there might be cases where a publisher wants to explicitly indicate the + extension is only enabled for CRP VMs but not VMSS. + :type vm_scale_set_enabled: bool + :param supports_multiple_extensions: Whether the handler can support + multiple extensions. + :type supports_multiple_extensions: bool + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + 'operating_system': {'required': True}, + 'compute_role': {'required': True}, + 'handler_schema': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'operating_system': {'key': 'properties.operatingSystem', 'type': 'str'}, + 'compute_role': {'key': 'properties.computeRole', 'type': 'str'}, + 'handler_schema': {'key': 'properties.handlerSchema', 'type': 'str'}, + 'vm_scale_set_enabled': {'key': 'properties.vmScaleSetEnabled', 'type': 'bool'}, + 'supports_multiple_extensions': {'key': 'properties.supportsMultipleExtensions', 'type': 'bool'}, + } + + def __init__(self, **kwargs): + super(VirtualMachineExtensionImage, self).__init__(**kwargs) + self.operating_system = kwargs.get('operating_system', None) + self.compute_role = kwargs.get('compute_role', None) + self.handler_schema = kwargs.get('handler_schema', None) + self.vm_scale_set_enabled = kwargs.get('vm_scale_set_enabled', None) + self.supports_multiple_extensions = kwargs.get('supports_multiple_extensions', None) + + +class VirtualMachineExtensionInstanceView(Model): + """The instance view of a virtual machine extension. + + :param name: The virtual machine extension name. + :type name: str + :param type: Specifies the type of the extension; an example is + "CustomScriptExtension". + :type type: str + :param type_handler_version: Specifies the version of the script handler. + :type type_handler_version: str + :param substatuses: The resource status information. + :type substatuses: + list[~azure.mgmt.compute.v2019_03_01.models.InstanceViewStatus] + :param statuses: The resource status information. + :type statuses: + list[~azure.mgmt.compute.v2019_03_01.models.InstanceViewStatus] + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'type_handler_version': {'key': 'typeHandlerVersion', 'type': 'str'}, + 'substatuses': {'key': 'substatuses', 'type': '[InstanceViewStatus]'}, + 'statuses': {'key': 'statuses', 'type': '[InstanceViewStatus]'}, + } + + def __init__(self, **kwargs): + super(VirtualMachineExtensionInstanceView, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.type = kwargs.get('type', None) + self.type_handler_version = kwargs.get('type_handler_version', None) + self.substatuses = kwargs.get('substatuses', None) + self.statuses = kwargs.get('statuses', None) + + +class VirtualMachineExtensionsListResult(Model): + """The List Extension operation response. + + :param value: The list of extensions + :type value: + list[~azure.mgmt.compute.v2019_03_01.models.VirtualMachineExtension] + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[VirtualMachineExtension]'}, + } + + def __init__(self, **kwargs): + super(VirtualMachineExtensionsListResult, self).__init__(**kwargs) + self.value = kwargs.get('value', None) + + +class VirtualMachineExtensionUpdate(UpdateResource): + """Describes a Virtual Machine Extension. + + :param tags: Resource tags + :type tags: dict[str, str] + :param force_update_tag: How the extension handler should be forced to + update even if the extension configuration has not changed. + :type force_update_tag: str + :param publisher: The name of the extension handler publisher. + :type publisher: str + :param type: Specifies the type of the extension; an example is + "CustomScriptExtension". + :type type: str + :param type_handler_version: Specifies the version of the script handler. + :type type_handler_version: str + :param auto_upgrade_minor_version: Indicates whether the extension should + use a newer minor version if one is available at deployment time. Once + deployed, however, the extension will not upgrade minor versions unless + redeployed, even with this property set to true. + :type auto_upgrade_minor_version: bool + :param settings: Json formatted public settings for the extension. + :type settings: object + :param protected_settings: The extension can contain either + protectedSettings or protectedSettingsFromKeyVault or no protected + settings at all. + :type protected_settings: object + """ + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + 'force_update_tag': {'key': 'properties.forceUpdateTag', 'type': 'str'}, + 'publisher': {'key': 'properties.publisher', 'type': 'str'}, + 'type': {'key': 'properties.type', 'type': 'str'}, + 'type_handler_version': {'key': 'properties.typeHandlerVersion', 'type': 'str'}, + 'auto_upgrade_minor_version': {'key': 'properties.autoUpgradeMinorVersion', 'type': 'bool'}, + 'settings': {'key': 'properties.settings', 'type': 'object'}, + 'protected_settings': {'key': 'properties.protectedSettings', 'type': 'object'}, + } + + def __init__(self, **kwargs): + super(VirtualMachineExtensionUpdate, self).__init__(**kwargs) + self.force_update_tag = kwargs.get('force_update_tag', None) + self.publisher = kwargs.get('publisher', None) + self.type = kwargs.get('type', None) + self.type_handler_version = kwargs.get('type_handler_version', None) + self.auto_upgrade_minor_version = kwargs.get('auto_upgrade_minor_version', None) + self.settings = kwargs.get('settings', None) + self.protected_settings = kwargs.get('protected_settings', None) + + +class VirtualMachineHealthStatus(Model): + """The health status of the VM. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar status: The health status information for the VM. + :vartype status: ~azure.mgmt.compute.v2019_03_01.models.InstanceViewStatus + """ + + _validation = { + 'status': {'readonly': True}, + } + + _attribute_map = { + 'status': {'key': 'status', 'type': 'InstanceViewStatus'}, + } + + def __init__(self, **kwargs): + super(VirtualMachineHealthStatus, self).__init__(**kwargs) + self.status = None + + +class VirtualMachineIdentity(Model): + """Identity for the virtual machine. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar principal_id: The principal id of virtual machine identity. This + property will only be provided for a system assigned identity. + :vartype principal_id: str + :ivar tenant_id: The tenant id associated with the virtual machine. This + property will only be provided for a system assigned identity. + :vartype tenant_id: str + :param type: The type of identity used for the virtual machine. The type + 'SystemAssigned, UserAssigned' includes both an implicitly created + identity and a set of user assigned identities. The type 'None' will + remove any identities from the virtual machine. Possible values include: + 'SystemAssigned', 'UserAssigned', 'SystemAssigned, UserAssigned', 'None' + :type type: str or + ~azure.mgmt.compute.v2019_03_01.models.ResourceIdentityType + :param user_assigned_identities: The list of user identities associated + with the Virtual Machine. The user identity dictionary key references will + be ARM resource ids in the form: + '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'. + :type user_assigned_identities: dict[str, + ~azure.mgmt.compute.v2019_03_01.models.VirtualMachineIdentityUserAssignedIdentitiesValue] + """ + + _validation = { + 'principal_id': {'readonly': True}, + 'tenant_id': {'readonly': True}, + } + + _attribute_map = { + 'principal_id': {'key': 'principalId', 'type': 'str'}, + 'tenant_id': {'key': 'tenantId', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'ResourceIdentityType'}, + 'user_assigned_identities': {'key': 'userAssignedIdentities', 'type': '{VirtualMachineIdentityUserAssignedIdentitiesValue}'}, + } + + def __init__(self, **kwargs): + super(VirtualMachineIdentity, self).__init__(**kwargs) + self.principal_id = None + self.tenant_id = None + self.type = kwargs.get('type', None) + self.user_assigned_identities = kwargs.get('user_assigned_identities', None) + + +class VirtualMachineIdentityUserAssignedIdentitiesValue(Model): + """VirtualMachineIdentityUserAssignedIdentitiesValue. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar principal_id: The principal id of user assigned identity. + :vartype principal_id: str + :ivar client_id: The client id of user assigned identity. + :vartype client_id: str + """ + + _validation = { + 'principal_id': {'readonly': True}, + 'client_id': {'readonly': True}, + } + + _attribute_map = { + 'principal_id': {'key': 'principalId', 'type': 'str'}, + 'client_id': {'key': 'clientId', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(VirtualMachineIdentityUserAssignedIdentitiesValue, self).__init__(**kwargs) + self.principal_id = None + self.client_id = None + + +class VirtualMachineImageResource(SubResource): + """Virtual machine image resource information. + + All required parameters must be populated in order to send to Azure. + + :param id: Resource Id + :type id: str + :param name: Required. The name of the resource. + :type name: str + :param location: Required. The supported Azure location of the resource. + :type location: str + :param tags: Specifies the tags that are assigned to the virtual machine. + For more information about using tags, see [Using tags to organize your + Azure + resources](https://docs.microsoft.com/azure/azure-resource-manager/resource-group-using-tags.md). + :type tags: dict[str, str] + """ + + _validation = { + 'name': {'required': True}, + 'location': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__(self, **kwargs): + super(VirtualMachineImageResource, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.location = kwargs.get('location', None) + self.tags = kwargs.get('tags', None) + + +class VirtualMachineImage(VirtualMachineImageResource): + """Describes a Virtual Machine Image. + + All required parameters must be populated in order to send to Azure. + + :param id: Resource Id + :type id: str + :param name: Required. The name of the resource. + :type name: str + :param location: Required. The supported Azure location of the resource. + :type location: str + :param tags: Specifies the tags that are assigned to the virtual machine. + For more information about using tags, see [Using tags to organize your + Azure + resources](https://docs.microsoft.com/azure/azure-resource-manager/resource-group-using-tags.md). + :type tags: dict[str, str] + :param plan: + :type plan: ~azure.mgmt.compute.v2019_03_01.models.PurchasePlan + :param os_disk_image: + :type os_disk_image: ~azure.mgmt.compute.v2019_03_01.models.OSDiskImage + :param data_disk_images: + :type data_disk_images: + list[~azure.mgmt.compute.v2019_03_01.models.DataDiskImage] + :param automatic_os_upgrade_properties: + :type automatic_os_upgrade_properties: + ~azure.mgmt.compute.v2019_03_01.models.AutomaticOSUpgradeProperties + """ + + _validation = { + 'name': {'required': True}, + 'location': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'plan': {'key': 'properties.plan', 'type': 'PurchasePlan'}, + 'os_disk_image': {'key': 'properties.osDiskImage', 'type': 'OSDiskImage'}, + 'data_disk_images': {'key': 'properties.dataDiskImages', 'type': '[DataDiskImage]'}, + 'automatic_os_upgrade_properties': {'key': 'properties.automaticOSUpgradeProperties', 'type': 'AutomaticOSUpgradeProperties'}, + } + + def __init__(self, **kwargs): + super(VirtualMachineImage, self).__init__(**kwargs) + self.plan = kwargs.get('plan', None) + self.os_disk_image = kwargs.get('os_disk_image', None) + self.data_disk_images = kwargs.get('data_disk_images', None) + self.automatic_os_upgrade_properties = kwargs.get('automatic_os_upgrade_properties', None) + + +class VirtualMachineInstanceView(Model): + """The instance view of a virtual machine. + + :param platform_update_domain: Specifies the update domain of the virtual + machine. + :type platform_update_domain: int + :param platform_fault_domain: Specifies the fault domain of the virtual + machine. + :type platform_fault_domain: int + :param computer_name: The computer name assigned to the virtual machine. + :type computer_name: str + :param os_name: The Operating System running on the virtual machine. + :type os_name: str + :param os_version: The version of Operating System running on the virtual + machine. + :type os_version: str + :param hyper_vgeneration: Specifies the HyperVGeneration Type associated + with a resource. Possible values include: 'V1', 'V2' + :type hyper_vgeneration: str or + ~azure.mgmt.compute.v2019_03_01.models.HyperVGenerationType + :param rdp_thumb_print: The Remote desktop certificate thumbprint. + :type rdp_thumb_print: str + :param vm_agent: The VM Agent running on the virtual machine. + :type vm_agent: + ~azure.mgmt.compute.v2019_03_01.models.VirtualMachineAgentInstanceView + :param maintenance_redeploy_status: The Maintenance Operation status on + the virtual machine. + :type maintenance_redeploy_status: + ~azure.mgmt.compute.v2019_03_01.models.MaintenanceRedeployStatus + :param disks: The virtual machine disk information. + :type disks: list[~azure.mgmt.compute.v2019_03_01.models.DiskInstanceView] + :param extensions: The extensions information. + :type extensions: + list[~azure.mgmt.compute.v2019_03_01.models.VirtualMachineExtensionInstanceView] + :param boot_diagnostics: Boot Diagnostics is a debugging feature which + allows you to view Console Output and Screenshot to diagnose VM status. +

    You can easily view the output of your console log.

    + Azure also enables you to see a screenshot of the VM from the hypervisor. + :type boot_diagnostics: + ~azure.mgmt.compute.v2019_03_01.models.BootDiagnosticsInstanceView + :param statuses: The resource status information. + :type statuses: + list[~azure.mgmt.compute.v2019_03_01.models.InstanceViewStatus] + """ + + _attribute_map = { + 'platform_update_domain': {'key': 'platformUpdateDomain', 'type': 'int'}, + 'platform_fault_domain': {'key': 'platformFaultDomain', 'type': 'int'}, + 'computer_name': {'key': 'computerName', 'type': 'str'}, + 'os_name': {'key': 'osName', 'type': 'str'}, + 'os_version': {'key': 'osVersion', 'type': 'str'}, + 'hyper_vgeneration': {'key': 'hyperVGeneration', 'type': 'str'}, + 'rdp_thumb_print': {'key': 'rdpThumbPrint', 'type': 'str'}, + 'vm_agent': {'key': 'vmAgent', 'type': 'VirtualMachineAgentInstanceView'}, + 'maintenance_redeploy_status': {'key': 'maintenanceRedeployStatus', 'type': 'MaintenanceRedeployStatus'}, + 'disks': {'key': 'disks', 'type': '[DiskInstanceView]'}, + 'extensions': {'key': 'extensions', 'type': '[VirtualMachineExtensionInstanceView]'}, + 'boot_diagnostics': {'key': 'bootDiagnostics', 'type': 'BootDiagnosticsInstanceView'}, + 'statuses': {'key': 'statuses', 'type': '[InstanceViewStatus]'}, + } + + def __init__(self, **kwargs): + super(VirtualMachineInstanceView, self).__init__(**kwargs) + self.platform_update_domain = kwargs.get('platform_update_domain', None) + self.platform_fault_domain = kwargs.get('platform_fault_domain', None) + self.computer_name = kwargs.get('computer_name', None) + self.os_name = kwargs.get('os_name', None) + self.os_version = kwargs.get('os_version', None) + self.hyper_vgeneration = kwargs.get('hyper_vgeneration', None) + self.rdp_thumb_print = kwargs.get('rdp_thumb_print', None) + self.vm_agent = kwargs.get('vm_agent', None) + self.maintenance_redeploy_status = kwargs.get('maintenance_redeploy_status', None) + self.disks = kwargs.get('disks', None) + self.extensions = kwargs.get('extensions', None) + self.boot_diagnostics = kwargs.get('boot_diagnostics', None) + self.statuses = kwargs.get('statuses', None) + + +class VirtualMachineReimageParameters(Model): + """Parameters for Reimaging Virtual Machine. NOTE: Virtual Machine OS disk + will always be reimaged. + + :param temp_disk: Specifies whether to reimage temp disk. Default value: + false. Note: This temp disk reimage parameter is only supported for + VM/VMSS with Ephemeral OS disk. + :type temp_disk: bool + """ + + _attribute_map = { + 'temp_disk': {'key': 'tempDisk', 'type': 'bool'}, + } + + def __init__(self, **kwargs): + super(VirtualMachineReimageParameters, self).__init__(**kwargs) + self.temp_disk = kwargs.get('temp_disk', None) + + +class VirtualMachineScaleSet(Resource): + """Describes a Virtual Machine Scale Set. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource Id + :vartype id: str + :ivar name: Resource name + :vartype name: str + :ivar type: Resource type + :vartype type: str + :param location: Required. Resource location + :type location: str + :param tags: Resource tags + :type tags: dict[str, str] + :param sku: The virtual machine scale set sku. + :type sku: ~azure.mgmt.compute.v2019_03_01.models.Sku + :param plan: Specifies information about the marketplace image used to + create the virtual machine. This element is only used for marketplace + images. Before you can use a marketplace image from an API, you must + enable the image for programmatic use. In the Azure portal, find the + marketplace image that you want to use and then click **Want to deploy + programmatically, Get Started ->**. Enter any required information and + then click **Save**. + :type plan: ~azure.mgmt.compute.v2019_03_01.models.Plan + :param upgrade_policy: The upgrade policy. + :type upgrade_policy: ~azure.mgmt.compute.v2019_03_01.models.UpgradePolicy + :param virtual_machine_profile: The virtual machine profile. + :type virtual_machine_profile: + ~azure.mgmt.compute.v2019_03_01.models.VirtualMachineScaleSetVMProfile + :ivar provisioning_state: The provisioning state, which only appears in + the response. + :vartype provisioning_state: str + :param overprovision: Specifies whether the Virtual Machine Scale Set + should be overprovisioned. + :type overprovision: bool + :param do_not_run_extensions_on_overprovisioned_vms: When Overprovision is + enabled, extensions are launched only on the requested number of VMs which + are finally kept. This property will hence ensure that the extensions do + not run on the extra overprovisioned VMs. + :type do_not_run_extensions_on_overprovisioned_vms: bool + :ivar unique_id: Specifies the ID which uniquely identifies a Virtual + Machine Scale Set. + :vartype unique_id: str + :param single_placement_group: When true this limits the scale set to a + single placement group, of max size 100 virtual machines. + :type single_placement_group: bool + :param zone_balance: Whether to force strictly even Virtual Machine + distribution cross x-zones in case there is zone outage. + :type zone_balance: bool + :param platform_fault_domain_count: Fault Domain count for each placement + group. + :type platform_fault_domain_count: int + :param proximity_placement_group: Specifies information about the + proximity placement group that the virtual machine scale set should be + assigned to.

    Minimum api-version: 2018-04-01. + :type proximity_placement_group: + ~azure.mgmt.compute.v2019_03_01.models.SubResource + :param additional_capabilities: Specifies additional capabilities enabled + or disabled on the Virtual Machines in the Virtual Machine Scale Set. For + instance: whether the Virtual Machines have the capability to support + attaching managed data disks with UltraSSD_LRS storage account type. + :type additional_capabilities: + ~azure.mgmt.compute.v2019_03_01.models.AdditionalCapabilities + :param identity: The identity of the virtual machine scale set, if + configured. + :type identity: + ~azure.mgmt.compute.v2019_03_01.models.VirtualMachineScaleSetIdentity + :param zones: The virtual machine scale set zones. + :type zones: list[str] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + 'provisioning_state': {'readonly': True}, + 'unique_id': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'sku': {'key': 'sku', 'type': 'Sku'}, + 'plan': {'key': 'plan', 'type': 'Plan'}, + 'upgrade_policy': {'key': 'properties.upgradePolicy', 'type': 'UpgradePolicy'}, + 'virtual_machine_profile': {'key': 'properties.virtualMachineProfile', 'type': 'VirtualMachineScaleSetVMProfile'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'overprovision': {'key': 'properties.overprovision', 'type': 'bool'}, + 'do_not_run_extensions_on_overprovisioned_vms': {'key': 'properties.doNotRunExtensionsOnOverprovisionedVMs', 'type': 'bool'}, + 'unique_id': {'key': 'properties.uniqueId', 'type': 'str'}, + 'single_placement_group': {'key': 'properties.singlePlacementGroup', 'type': 'bool'}, + 'zone_balance': {'key': 'properties.zoneBalance', 'type': 'bool'}, + 'platform_fault_domain_count': {'key': 'properties.platformFaultDomainCount', 'type': 'int'}, + 'proximity_placement_group': {'key': 'properties.proximityPlacementGroup', 'type': 'SubResource'}, + 'additional_capabilities': {'key': 'properties.additionalCapabilities', 'type': 'AdditionalCapabilities'}, + 'identity': {'key': 'identity', 'type': 'VirtualMachineScaleSetIdentity'}, + 'zones': {'key': 'zones', 'type': '[str]'}, + } + + def __init__(self, **kwargs): + super(VirtualMachineScaleSet, self).__init__(**kwargs) + self.sku = kwargs.get('sku', None) + self.plan = kwargs.get('plan', None) + self.upgrade_policy = kwargs.get('upgrade_policy', None) + self.virtual_machine_profile = kwargs.get('virtual_machine_profile', None) + self.provisioning_state = None + self.overprovision = kwargs.get('overprovision', None) + self.do_not_run_extensions_on_overprovisioned_vms = kwargs.get('do_not_run_extensions_on_overprovisioned_vms', None) + self.unique_id = None + self.single_placement_group = kwargs.get('single_placement_group', None) + self.zone_balance = kwargs.get('zone_balance', None) + self.platform_fault_domain_count = kwargs.get('platform_fault_domain_count', None) + self.proximity_placement_group = kwargs.get('proximity_placement_group', None) + self.additional_capabilities = kwargs.get('additional_capabilities', None) + self.identity = kwargs.get('identity', None) + self.zones = kwargs.get('zones', None) + + +class VirtualMachineScaleSetDataDisk(Model): + """Describes a virtual machine scale set data disk. + + All required parameters must be populated in order to send to Azure. + + :param name: The disk name. + :type name: str + :param lun: Required. Specifies the logical unit number of the data disk. + This value is used to identify data disks within the VM and therefore must + be unique for each data disk attached to a VM. + :type lun: int + :param caching: Specifies the caching requirements.

    Possible + values are:

    **None**

    **ReadOnly**

    **ReadWrite** +

    Default: **None for Standard storage. ReadOnly for Premium + storage**. Possible values include: 'None', 'ReadOnly', 'ReadWrite' + :type caching: str or ~azure.mgmt.compute.v2019_03_01.models.CachingTypes + :param write_accelerator_enabled: Specifies whether writeAccelerator + should be enabled or disabled on the disk. + :type write_accelerator_enabled: bool + :param create_option: Required. The create option. Possible values + include: 'FromImage', 'Empty', 'Attach' + :type create_option: str or + ~azure.mgmt.compute.v2019_03_01.models.DiskCreateOptionTypes + :param disk_size_gb: Specifies the size of an empty data disk in + gigabytes. This element can be used to overwrite the size of the disk in a + virtual machine image.

    This value cannot be larger than 1023 GB + :type disk_size_gb: int + :param managed_disk: The managed disk parameters. + :type managed_disk: + ~azure.mgmt.compute.v2019_03_01.models.VirtualMachineScaleSetManagedDiskParameters + """ + + _validation = { + 'lun': {'required': True}, + 'create_option': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'lun': {'key': 'lun', 'type': 'int'}, + 'caching': {'key': 'caching', 'type': 'CachingTypes'}, + 'write_accelerator_enabled': {'key': 'writeAcceleratorEnabled', 'type': 'bool'}, + 'create_option': {'key': 'createOption', 'type': 'str'}, + 'disk_size_gb': {'key': 'diskSizeGB', 'type': 'int'}, + 'managed_disk': {'key': 'managedDisk', 'type': 'VirtualMachineScaleSetManagedDiskParameters'}, + } + + def __init__(self, **kwargs): + super(VirtualMachineScaleSetDataDisk, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.lun = kwargs.get('lun', None) + self.caching = kwargs.get('caching', None) + self.write_accelerator_enabled = kwargs.get('write_accelerator_enabled', None) + self.create_option = kwargs.get('create_option', None) + self.disk_size_gb = kwargs.get('disk_size_gb', None) + self.managed_disk = kwargs.get('managed_disk', None) + + +class VirtualMachineScaleSetExtension(SubResourceReadOnly): + """Describes a Virtual Machine Scale Set Extension. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource Id + :vartype id: str + :param name: The name of the extension. + :type name: str + :param force_update_tag: If a value is provided and is different from the + previous value, the extension handler will be forced to update even if the + extension configuration has not changed. + :type force_update_tag: str + :param publisher: The name of the extension handler publisher. + :type publisher: str + :param type: Specifies the type of the extension; an example is + "CustomScriptExtension". + :type type: str + :param type_handler_version: Specifies the version of the script handler. + :type type_handler_version: str + :param auto_upgrade_minor_version: Indicates whether the extension should + use a newer minor version if one is available at deployment time. Once + deployed, however, the extension will not upgrade minor versions unless + redeployed, even with this property set to true. + :type auto_upgrade_minor_version: bool + :param settings: Json formatted public settings for the extension. + :type settings: object + :param protected_settings: The extension can contain either + protectedSettings or protectedSettingsFromKeyVault or no protected + settings at all. + :type protected_settings: object + :ivar provisioning_state: The provisioning state, which only appears in + the response. + :vartype provisioning_state: str + :param provision_after_extensions: Collection of extension names after + which this extension needs to be provisioned. + :type provision_after_extensions: list[str] + """ + + _validation = { + 'id': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'force_update_tag': {'key': 'properties.forceUpdateTag', 'type': 'str'}, + 'publisher': {'key': 'properties.publisher', 'type': 'str'}, + 'type': {'key': 'properties.type', 'type': 'str'}, + 'type_handler_version': {'key': 'properties.typeHandlerVersion', 'type': 'str'}, + 'auto_upgrade_minor_version': {'key': 'properties.autoUpgradeMinorVersion', 'type': 'bool'}, + 'settings': {'key': 'properties.settings', 'type': 'object'}, + 'protected_settings': {'key': 'properties.protectedSettings', 'type': 'object'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'provision_after_extensions': {'key': 'properties.provisionAfterExtensions', 'type': '[str]'}, + } + + def __init__(self, **kwargs): + super(VirtualMachineScaleSetExtension, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.force_update_tag = kwargs.get('force_update_tag', None) + self.publisher = kwargs.get('publisher', None) + self.type = kwargs.get('type', None) + self.type_handler_version = kwargs.get('type_handler_version', None) + self.auto_upgrade_minor_version = kwargs.get('auto_upgrade_minor_version', None) + self.settings = kwargs.get('settings', None) + self.protected_settings = kwargs.get('protected_settings', None) + self.provisioning_state = None + self.provision_after_extensions = kwargs.get('provision_after_extensions', None) + + +class VirtualMachineScaleSetExtensionProfile(Model): + """Describes a virtual machine scale set extension profile. + + :param extensions: The virtual machine scale set child extension + resources. + :type extensions: + list[~azure.mgmt.compute.v2019_03_01.models.VirtualMachineScaleSetExtension] + """ + + _attribute_map = { + 'extensions': {'key': 'extensions', 'type': '[VirtualMachineScaleSetExtension]'}, + } + + def __init__(self, **kwargs): + super(VirtualMachineScaleSetExtensionProfile, self).__init__(**kwargs) + self.extensions = kwargs.get('extensions', None) + + +class VirtualMachineScaleSetIdentity(Model): + """Identity for the virtual machine scale set. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar principal_id: The principal id of virtual machine scale set + identity. This property will only be provided for a system assigned + identity. + :vartype principal_id: str + :ivar tenant_id: The tenant id associated with the virtual machine scale + set. This property will only be provided for a system assigned identity. + :vartype tenant_id: str + :param type: The type of identity used for the virtual machine scale set. + The type 'SystemAssigned, UserAssigned' includes both an implicitly + created identity and a set of user assigned identities. The type 'None' + will remove any identities from the virtual machine scale set. Possible + values include: 'SystemAssigned', 'UserAssigned', 'SystemAssigned, + UserAssigned', 'None' + :type type: str or + ~azure.mgmt.compute.v2019_03_01.models.ResourceIdentityType + :param user_assigned_identities: The list of user identities associated + with the virtual machine scale set. The user identity dictionary key + references will be ARM resource ids in the form: + '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'. + :type user_assigned_identities: dict[str, + ~azure.mgmt.compute.v2019_03_01.models.VirtualMachineScaleSetIdentityUserAssignedIdentitiesValue] + """ + + _validation = { + 'principal_id': {'readonly': True}, + 'tenant_id': {'readonly': True}, + } + + _attribute_map = { + 'principal_id': {'key': 'principalId', 'type': 'str'}, + 'tenant_id': {'key': 'tenantId', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'ResourceIdentityType'}, + 'user_assigned_identities': {'key': 'userAssignedIdentities', 'type': '{VirtualMachineScaleSetIdentityUserAssignedIdentitiesValue}'}, + } + + def __init__(self, **kwargs): + super(VirtualMachineScaleSetIdentity, self).__init__(**kwargs) + self.principal_id = None + self.tenant_id = None + self.type = kwargs.get('type', None) + self.user_assigned_identities = kwargs.get('user_assigned_identities', None) + + +class VirtualMachineScaleSetIdentityUserAssignedIdentitiesValue(Model): + """VirtualMachineScaleSetIdentityUserAssignedIdentitiesValue. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar principal_id: The principal id of user assigned identity. + :vartype principal_id: str + :ivar client_id: The client id of user assigned identity. + :vartype client_id: str + """ + + _validation = { + 'principal_id': {'readonly': True}, + 'client_id': {'readonly': True}, + } + + _attribute_map = { + 'principal_id': {'key': 'principalId', 'type': 'str'}, + 'client_id': {'key': 'clientId', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(VirtualMachineScaleSetIdentityUserAssignedIdentitiesValue, self).__init__(**kwargs) + self.principal_id = None + self.client_id = None + + +class VirtualMachineScaleSetInstanceView(Model): + """The instance view of a virtual machine scale set. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar virtual_machine: The instance view status summary for the virtual + machine scale set. + :vartype virtual_machine: + ~azure.mgmt.compute.v2019_03_01.models.VirtualMachineScaleSetInstanceViewStatusesSummary + :ivar extensions: The extensions information. + :vartype extensions: + list[~azure.mgmt.compute.v2019_03_01.models.VirtualMachineScaleSetVMExtensionsSummary] + :param statuses: The resource status information. + :type statuses: + list[~azure.mgmt.compute.v2019_03_01.models.InstanceViewStatus] + """ + + _validation = { + 'virtual_machine': {'readonly': True}, + 'extensions': {'readonly': True}, + } + + _attribute_map = { + 'virtual_machine': {'key': 'virtualMachine', 'type': 'VirtualMachineScaleSetInstanceViewStatusesSummary'}, + 'extensions': {'key': 'extensions', 'type': '[VirtualMachineScaleSetVMExtensionsSummary]'}, + 'statuses': {'key': 'statuses', 'type': '[InstanceViewStatus]'}, + } + + def __init__(self, **kwargs): + super(VirtualMachineScaleSetInstanceView, self).__init__(**kwargs) + self.virtual_machine = None + self.extensions = None + self.statuses = kwargs.get('statuses', None) + + +class VirtualMachineScaleSetInstanceViewStatusesSummary(Model): + """Instance view statuses summary for virtual machines of a virtual machine + scale set. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar statuses_summary: The extensions information. + :vartype statuses_summary: + list[~azure.mgmt.compute.v2019_03_01.models.VirtualMachineStatusCodeCount] + """ + + _validation = { + 'statuses_summary': {'readonly': True}, + } + + _attribute_map = { + 'statuses_summary': {'key': 'statusesSummary', 'type': '[VirtualMachineStatusCodeCount]'}, + } + + def __init__(self, **kwargs): + super(VirtualMachineScaleSetInstanceViewStatusesSummary, self).__init__(**kwargs) + self.statuses_summary = None + + +class VirtualMachineScaleSetIPConfiguration(SubResource): + """Describes a virtual machine scale set network profile's IP configuration. + + All required parameters must be populated in order to send to Azure. + + :param id: Resource Id + :type id: str + :param name: Required. The IP configuration name. + :type name: str + :param subnet: Specifies the identifier of the subnet. + :type subnet: ~azure.mgmt.compute.v2019_03_01.models.ApiEntityReference + :param primary: Specifies the primary network interface in case the + virtual machine has more than 1 network interface. + :type primary: bool + :param public_ip_address_configuration: The publicIPAddressConfiguration. + :type public_ip_address_configuration: + ~azure.mgmt.compute.v2019_03_01.models.VirtualMachineScaleSetPublicIPAddressConfiguration + :param private_ip_address_version: Available from Api-Version 2017-03-30 + onwards, it represents whether the specific ipconfiguration is IPv4 or + IPv6. Default is taken as IPv4. Possible values are: 'IPv4' and 'IPv6'. + Possible values include: 'IPv4', 'IPv6' + :type private_ip_address_version: str or + ~azure.mgmt.compute.v2019_03_01.models.IPVersion + :param application_gateway_backend_address_pools: Specifies an array of + references to backend address pools of application gateways. A scale set + can reference backend address pools of multiple application gateways. + Multiple scale sets cannot use the same application gateway. + :type application_gateway_backend_address_pools: + list[~azure.mgmt.compute.v2019_03_01.models.SubResource] + :param application_security_groups: Specifies an array of references to + application security group. + :type application_security_groups: + list[~azure.mgmt.compute.v2019_03_01.models.SubResource] + :param load_balancer_backend_address_pools: Specifies an array of + references to backend address pools of load balancers. A scale set can + reference backend address pools of one public and one internal load + balancer. Multiple scale sets cannot use the same load balancer. + :type load_balancer_backend_address_pools: + list[~azure.mgmt.compute.v2019_03_01.models.SubResource] + :param load_balancer_inbound_nat_pools: Specifies an array of references + to inbound Nat pools of the load balancers. A scale set can reference + inbound nat pools of one public and one internal load balancer. Multiple + scale sets cannot use the same load balancer + :type load_balancer_inbound_nat_pools: + list[~azure.mgmt.compute.v2019_03_01.models.SubResource] + """ + + _validation = { + 'name': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'subnet': {'key': 'properties.subnet', 'type': 'ApiEntityReference'}, + 'primary': {'key': 'properties.primary', 'type': 'bool'}, + 'public_ip_address_configuration': {'key': 'properties.publicIPAddressConfiguration', 'type': 'VirtualMachineScaleSetPublicIPAddressConfiguration'}, + 'private_ip_address_version': {'key': 'properties.privateIPAddressVersion', 'type': 'str'}, + 'application_gateway_backend_address_pools': {'key': 'properties.applicationGatewayBackendAddressPools', 'type': '[SubResource]'}, + 'application_security_groups': {'key': 'properties.applicationSecurityGroups', 'type': '[SubResource]'}, + 'load_balancer_backend_address_pools': {'key': 'properties.loadBalancerBackendAddressPools', 'type': '[SubResource]'}, + 'load_balancer_inbound_nat_pools': {'key': 'properties.loadBalancerInboundNatPools', 'type': '[SubResource]'}, + } + + def __init__(self, **kwargs): + super(VirtualMachineScaleSetIPConfiguration, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.subnet = kwargs.get('subnet', None) + self.primary = kwargs.get('primary', None) + self.public_ip_address_configuration = kwargs.get('public_ip_address_configuration', None) + self.private_ip_address_version = kwargs.get('private_ip_address_version', None) + self.application_gateway_backend_address_pools = kwargs.get('application_gateway_backend_address_pools', None) + self.application_security_groups = kwargs.get('application_security_groups', None) + self.load_balancer_backend_address_pools = kwargs.get('load_balancer_backend_address_pools', None) + self.load_balancer_inbound_nat_pools = kwargs.get('load_balancer_inbound_nat_pools', None) + + +class VirtualMachineScaleSetIpTag(Model): + """Contains the IP tag associated with the public IP address. + + :param ip_tag_type: IP tag type. Example: FirstPartyUsage. + :type ip_tag_type: str + :param tag: IP tag associated with the public IP. Example: SQL, Storage + etc. + :type tag: str + """ + + _attribute_map = { + 'ip_tag_type': {'key': 'ipTagType', 'type': 'str'}, + 'tag': {'key': 'tag', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(VirtualMachineScaleSetIpTag, self).__init__(**kwargs) + self.ip_tag_type = kwargs.get('ip_tag_type', None) + self.tag = kwargs.get('tag', None) + + +class VirtualMachineScaleSetManagedDiskParameters(Model): + """Describes the parameters of a ScaleSet managed disk. + + :param storage_account_type: Specifies the storage account type for the + managed disk. NOTE: UltraSSD_LRS can only be used with data disks, it + cannot be used with OS Disk. Possible values include: 'Standard_LRS', + 'Premium_LRS', 'StandardSSD_LRS', 'UltraSSD_LRS' + :type storage_account_type: str or + ~azure.mgmt.compute.v2019_03_01.models.StorageAccountTypes + """ + + _attribute_map = { + 'storage_account_type': {'key': 'storageAccountType', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(VirtualMachineScaleSetManagedDiskParameters, self).__init__(**kwargs) + self.storage_account_type = kwargs.get('storage_account_type', None) + + +class VirtualMachineScaleSetNetworkConfiguration(SubResource): + """Describes a virtual machine scale set network profile's network + configurations. + + All required parameters must be populated in order to send to Azure. + + :param id: Resource Id + :type id: str + :param name: Required. The network configuration name. + :type name: str + :param primary: Specifies the primary network interface in case the + virtual machine has more than 1 network interface. + :type primary: bool + :param enable_accelerated_networking: Specifies whether the network + interface is accelerated networking-enabled. + :type enable_accelerated_networking: bool + :param network_security_group: The network security group. + :type network_security_group: + ~azure.mgmt.compute.v2019_03_01.models.SubResource + :param dns_settings: The dns settings to be applied on the network + interfaces. + :type dns_settings: + ~azure.mgmt.compute.v2019_03_01.models.VirtualMachineScaleSetNetworkConfigurationDnsSettings + :param ip_configurations: Required. Specifies the IP configurations of the + network interface. + :type ip_configurations: + list[~azure.mgmt.compute.v2019_03_01.models.VirtualMachineScaleSetIPConfiguration] + :param enable_ip_forwarding: Whether IP forwarding enabled on this NIC. + :type enable_ip_forwarding: bool + """ + + _validation = { + 'name': {'required': True}, + 'ip_configurations': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'primary': {'key': 'properties.primary', 'type': 'bool'}, + 'enable_accelerated_networking': {'key': 'properties.enableAcceleratedNetworking', 'type': 'bool'}, + 'network_security_group': {'key': 'properties.networkSecurityGroup', 'type': 'SubResource'}, + 'dns_settings': {'key': 'properties.dnsSettings', 'type': 'VirtualMachineScaleSetNetworkConfigurationDnsSettings'}, + 'ip_configurations': {'key': 'properties.ipConfigurations', 'type': '[VirtualMachineScaleSetIPConfiguration]'}, + 'enable_ip_forwarding': {'key': 'properties.enableIPForwarding', 'type': 'bool'}, + } + + def __init__(self, **kwargs): + super(VirtualMachineScaleSetNetworkConfiguration, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.primary = kwargs.get('primary', None) + self.enable_accelerated_networking = kwargs.get('enable_accelerated_networking', None) + self.network_security_group = kwargs.get('network_security_group', None) + self.dns_settings = kwargs.get('dns_settings', None) + self.ip_configurations = kwargs.get('ip_configurations', None) + self.enable_ip_forwarding = kwargs.get('enable_ip_forwarding', None) + + +class VirtualMachineScaleSetNetworkConfigurationDnsSettings(Model): + """Describes a virtual machines scale sets network configuration's DNS + settings. + + :param dns_servers: List of DNS servers IP addresses + :type dns_servers: list[str] + """ + + _attribute_map = { + 'dns_servers': {'key': 'dnsServers', 'type': '[str]'}, + } + + def __init__(self, **kwargs): + super(VirtualMachineScaleSetNetworkConfigurationDnsSettings, self).__init__(**kwargs) + self.dns_servers = kwargs.get('dns_servers', None) + + +class VirtualMachineScaleSetNetworkProfile(Model): + """Describes a virtual machine scale set network profile. + + :param health_probe: A reference to a load balancer probe used to + determine the health of an instance in the virtual machine scale set. The + reference will be in the form: + '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/probes/{probeName}'. + :type health_probe: + ~azure.mgmt.compute.v2019_03_01.models.ApiEntityReference + :param network_interface_configurations: The list of network + configurations. + :type network_interface_configurations: + list[~azure.mgmt.compute.v2019_03_01.models.VirtualMachineScaleSetNetworkConfiguration] + """ + + _attribute_map = { + 'health_probe': {'key': 'healthProbe', 'type': 'ApiEntityReference'}, + 'network_interface_configurations': {'key': 'networkInterfaceConfigurations', 'type': '[VirtualMachineScaleSetNetworkConfiguration]'}, + } + + def __init__(self, **kwargs): + super(VirtualMachineScaleSetNetworkProfile, self).__init__(**kwargs) + self.health_probe = kwargs.get('health_probe', None) + self.network_interface_configurations = kwargs.get('network_interface_configurations', None) + + +class VirtualMachineScaleSetOSDisk(Model): + """Describes a virtual machine scale set operating system disk. + + All required parameters must be populated in order to send to Azure. + + :param name: The disk name. + :type name: str + :param caching: Specifies the caching requirements.

    Possible + values are:

    **None**

    **ReadOnly**

    **ReadWrite** +

    Default: **None for Standard storage. ReadOnly for Premium + storage**. Possible values include: 'None', 'ReadOnly', 'ReadWrite' + :type caching: str or ~azure.mgmt.compute.v2019_03_01.models.CachingTypes + :param write_accelerator_enabled: Specifies whether writeAccelerator + should be enabled or disabled on the disk. + :type write_accelerator_enabled: bool + :param create_option: Required. Specifies how the virtual machines in the + scale set should be created.

    The only allowed value is: + **FromImage** \\u2013 This value is used when you are using an image to + create the virtual machine. If you are using a platform image, you also + use the imageReference element described above. If you are using a + marketplace image, you also use the plan element previously described. + Possible values include: 'FromImage', 'Empty', 'Attach' + :type create_option: str or + ~azure.mgmt.compute.v2019_03_01.models.DiskCreateOptionTypes + :param diff_disk_settings: Specifies the ephemeral disk Settings for the + operating system disk used by the virtual machine scale set. + :type diff_disk_settings: + ~azure.mgmt.compute.v2019_03_01.models.DiffDiskSettings + :param disk_size_gb: Specifies the size of the operating system disk in + gigabytes. This element can be used to overwrite the size of the disk in a + virtual machine image.

    This value cannot be larger than 1023 GB + :type disk_size_gb: int + :param os_type: This property allows you to specify the type of the OS + that is included in the disk if creating a VM from user-image or a + specialized VHD.

    Possible values are:

    **Windows** +

    **Linux**. Possible values include: 'Windows', 'Linux' + :type os_type: str or + ~azure.mgmt.compute.v2019_03_01.models.OperatingSystemTypes + :param image: Specifies information about the unmanaged user image to base + the scale set on. + :type image: ~azure.mgmt.compute.v2019_03_01.models.VirtualHardDisk + :param vhd_containers: Specifies the container urls that are used to store + operating system disks for the scale set. + :type vhd_containers: list[str] + :param managed_disk: The managed disk parameters. + :type managed_disk: + ~azure.mgmt.compute.v2019_03_01.models.VirtualMachineScaleSetManagedDiskParameters + """ + + _validation = { + 'create_option': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'caching': {'key': 'caching', 'type': 'CachingTypes'}, + 'write_accelerator_enabled': {'key': 'writeAcceleratorEnabled', 'type': 'bool'}, + 'create_option': {'key': 'createOption', 'type': 'str'}, + 'diff_disk_settings': {'key': 'diffDiskSettings', 'type': 'DiffDiskSettings'}, + 'disk_size_gb': {'key': 'diskSizeGB', 'type': 'int'}, + 'os_type': {'key': 'osType', 'type': 'OperatingSystemTypes'}, + 'image': {'key': 'image', 'type': 'VirtualHardDisk'}, + 'vhd_containers': {'key': 'vhdContainers', 'type': '[str]'}, + 'managed_disk': {'key': 'managedDisk', 'type': 'VirtualMachineScaleSetManagedDiskParameters'}, + } + + def __init__(self, **kwargs): + super(VirtualMachineScaleSetOSDisk, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.caching = kwargs.get('caching', None) + self.write_accelerator_enabled = kwargs.get('write_accelerator_enabled', None) + self.create_option = kwargs.get('create_option', None) + self.diff_disk_settings = kwargs.get('diff_disk_settings', None) + self.disk_size_gb = kwargs.get('disk_size_gb', None) + self.os_type = kwargs.get('os_type', None) + self.image = kwargs.get('image', None) + self.vhd_containers = kwargs.get('vhd_containers', None) + self.managed_disk = kwargs.get('managed_disk', None) + + +class VirtualMachineScaleSetOSProfile(Model): + """Describes a virtual machine scale set OS profile. + + :param computer_name_prefix: Specifies the computer name prefix for all of + the virtual machines in the scale set. Computer name prefixes must be 1 to + 15 characters long. + :type computer_name_prefix: str + :param admin_username: Specifies the name of the administrator account. +

    **Windows-only restriction:** Cannot end in "."

    + **Disallowed values:** "administrator", "admin", "user", "user1", "test", + "user2", "test1", "user3", "admin1", "1", "123", "a", "actuser", "adm", + "admin2", "aspnet", "backup", "console", "david", "guest", "john", + "owner", "root", "server", "sql", "support", "support_388945a0", "sys", + "test2", "test3", "user4", "user5".

    **Minimum-length (Linux):** 1 + character

    **Max-length (Linux):** 64 characters

    + **Max-length (Windows):** 20 characters

  • For root access to + the Linux VM, see [Using root privileges on Linux virtual machines in + Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-use-root-privileges?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json)
  • + For a list of built-in system users on Linux that should not be used in + this field, see [Selecting User Names for Linux on + Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-usernames?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json) + :type admin_username: str + :param admin_password: Specifies the password of the administrator + account.

    **Minimum-length (Windows):** 8 characters

    + **Minimum-length (Linux):** 6 characters

    **Max-length + (Windows):** 123 characters

    **Max-length (Linux):** 72 characters +

    **Complexity requirements:** 3 out of 4 conditions below need to + be fulfilled
    Has lower characters
    Has upper characters
    Has a + digit
    Has a special character (Regex match [\\W_])

    + **Disallowed values:** "abc@123", "P@$$w0rd", "P@ssw0rd", "P@ssword123", + "Pa$$word", "pass@word1", "Password!", "Password1", "Password22", + "iloveyou!"

    For resetting the password, see [How to reset the + Remote Desktop service or its login password in a Windows + VM](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-reset-rdp?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json) +

    For resetting root password, see [Manage users, SSH, and check or + repair disks on Azure Linux VMs using the VMAccess + Extension](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-using-vmaccess-extension?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json#reset-root-password) + :type admin_password: str + :param custom_data: Specifies a base-64 encoded string of custom data. The + base-64 encoded string is decoded to a binary array that is saved as a + file on the Virtual Machine. The maximum length of the binary array is + 65535 bytes.

    For using cloud-init for your VM, see [Using + cloud-init to customize a Linux VM during + creation](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-using-cloud-init?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json) + :type custom_data: str + :param windows_configuration: Specifies Windows operating system settings + on the virtual machine. + :type windows_configuration: + ~azure.mgmt.compute.v2019_03_01.models.WindowsConfiguration + :param linux_configuration: Specifies the Linux operating system settings + on the virtual machine.

    For a list of supported Linux + distributions, see [Linux on Azure-Endorsed + Distributions](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-endorsed-distros?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json) +

    For running non-endorsed distributions, see [Information for + Non-Endorsed + Distributions](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-create-upload-generic?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json). + :type linux_configuration: + ~azure.mgmt.compute.v2019_03_01.models.LinuxConfiguration + :param secrets: Specifies set of certificates that should be installed + onto the virtual machines in the scale set. + :type secrets: + list[~azure.mgmt.compute.v2019_03_01.models.VaultSecretGroup] + """ + + _attribute_map = { + 'computer_name_prefix': {'key': 'computerNamePrefix', 'type': 'str'}, + 'admin_username': {'key': 'adminUsername', 'type': 'str'}, + 'admin_password': {'key': 'adminPassword', 'type': 'str'}, + 'custom_data': {'key': 'customData', 'type': 'str'}, + 'windows_configuration': {'key': 'windowsConfiguration', 'type': 'WindowsConfiguration'}, + 'linux_configuration': {'key': 'linuxConfiguration', 'type': 'LinuxConfiguration'}, + 'secrets': {'key': 'secrets', 'type': '[VaultSecretGroup]'}, + } + + def __init__(self, **kwargs): + super(VirtualMachineScaleSetOSProfile, self).__init__(**kwargs) + self.computer_name_prefix = kwargs.get('computer_name_prefix', None) + self.admin_username = kwargs.get('admin_username', None) + self.admin_password = kwargs.get('admin_password', None) + self.custom_data = kwargs.get('custom_data', None) + self.windows_configuration = kwargs.get('windows_configuration', None) + self.linux_configuration = kwargs.get('linux_configuration', None) + self.secrets = kwargs.get('secrets', None) + + +class VirtualMachineScaleSetPublicIPAddressConfiguration(Model): + """Describes a virtual machines scale set IP Configuration's PublicIPAddress + configuration. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. The publicIP address configuration name. + :type name: str + :param idle_timeout_in_minutes: The idle timeout of the public IP address. + :type idle_timeout_in_minutes: int + :param dns_settings: The dns settings to be applied on the publicIP + addresses . + :type dns_settings: + ~azure.mgmt.compute.v2019_03_01.models.VirtualMachineScaleSetPublicIPAddressConfigurationDnsSettings + :param ip_tags: The list of IP tags associated with the public IP address. + :type ip_tags: + list[~azure.mgmt.compute.v2019_03_01.models.VirtualMachineScaleSetIpTag] + :param public_ip_prefix: The PublicIPPrefix from which to allocate + publicIP addresses. + :type public_ip_prefix: ~azure.mgmt.compute.v2019_03_01.models.SubResource + """ + + _validation = { + 'name': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'idle_timeout_in_minutes': {'key': 'properties.idleTimeoutInMinutes', 'type': 'int'}, + 'dns_settings': {'key': 'properties.dnsSettings', 'type': 'VirtualMachineScaleSetPublicIPAddressConfigurationDnsSettings'}, + 'ip_tags': {'key': 'properties.ipTags', 'type': '[VirtualMachineScaleSetIpTag]'}, + 'public_ip_prefix': {'key': 'properties.publicIPPrefix', 'type': 'SubResource'}, + } + + def __init__(self, **kwargs): + super(VirtualMachineScaleSetPublicIPAddressConfiguration, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.idle_timeout_in_minutes = kwargs.get('idle_timeout_in_minutes', None) + self.dns_settings = kwargs.get('dns_settings', None) + self.ip_tags = kwargs.get('ip_tags', None) + self.public_ip_prefix = kwargs.get('public_ip_prefix', None) + + +class VirtualMachineScaleSetPublicIPAddressConfigurationDnsSettings(Model): + """Describes a virtual machines scale sets network configuration's DNS + settings. + + All required parameters must be populated in order to send to Azure. + + :param domain_name_label: Required. The Domain name label.The + concatenation of the domain name label and vm index will be the domain + name labels of the PublicIPAddress resources that will be created + :type domain_name_label: str + """ + + _validation = { + 'domain_name_label': {'required': True}, + } + + _attribute_map = { + 'domain_name_label': {'key': 'domainNameLabel', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(VirtualMachineScaleSetPublicIPAddressConfigurationDnsSettings, self).__init__(**kwargs) + self.domain_name_label = kwargs.get('domain_name_label', None) + + +class VirtualMachineScaleSetVMReimageParameters(VirtualMachineReimageParameters): + """Describes a Virtual Machine Scale Set VM Reimage Parameters. + + :param temp_disk: Specifies whether to reimage temp disk. Default value: + false. Note: This temp disk reimage parameter is only supported for + VM/VMSS with Ephemeral OS disk. + :type temp_disk: bool + """ + + _attribute_map = { + 'temp_disk': {'key': 'tempDisk', 'type': 'bool'}, + } + + def __init__(self, **kwargs): + super(VirtualMachineScaleSetVMReimageParameters, self).__init__(**kwargs) + + +class VirtualMachineScaleSetReimageParameters(VirtualMachineScaleSetVMReimageParameters): + """Describes a Virtual Machine Scale Set VM Reimage Parameters. + + :param temp_disk: Specifies whether to reimage temp disk. Default value: + false. Note: This temp disk reimage parameter is only supported for + VM/VMSS with Ephemeral OS disk. + :type temp_disk: bool + :param instance_ids: The virtual machine scale set instance ids. Omitting + the virtual machine scale set instance ids will result in the operation + being performed on all virtual machines in the virtual machine scale set. + :type instance_ids: list[str] + """ + + _attribute_map = { + 'temp_disk': {'key': 'tempDisk', 'type': 'bool'}, + 'instance_ids': {'key': 'instanceIds', 'type': '[str]'}, + } + + def __init__(self, **kwargs): + super(VirtualMachineScaleSetReimageParameters, self).__init__(**kwargs) + self.instance_ids = kwargs.get('instance_ids', None) + + +class VirtualMachineScaleSetSku(Model): + """Describes an available virtual machine scale set sku. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar resource_type: The type of resource the sku applies to. + :vartype resource_type: str + :ivar sku: The Sku. + :vartype sku: ~azure.mgmt.compute.v2019_03_01.models.Sku + :ivar capacity: Specifies the number of virtual machines in the scale set. + :vartype capacity: + ~azure.mgmt.compute.v2019_03_01.models.VirtualMachineScaleSetSkuCapacity + """ + + _validation = { + 'resource_type': {'readonly': True}, + 'sku': {'readonly': True}, + 'capacity': {'readonly': True}, + } + + _attribute_map = { + 'resource_type': {'key': 'resourceType', 'type': 'str'}, + 'sku': {'key': 'sku', 'type': 'Sku'}, + 'capacity': {'key': 'capacity', 'type': 'VirtualMachineScaleSetSkuCapacity'}, + } + + def __init__(self, **kwargs): + super(VirtualMachineScaleSetSku, self).__init__(**kwargs) + self.resource_type = None + self.sku = None + self.capacity = None + + +class VirtualMachineScaleSetSkuCapacity(Model): + """Describes scaling information of a sku. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar minimum: The minimum capacity. + :vartype minimum: long + :ivar maximum: The maximum capacity that can be set. + :vartype maximum: long + :ivar default_capacity: The default capacity. + :vartype default_capacity: long + :ivar scale_type: The scale type applicable to the sku. Possible values + include: 'Automatic', 'None' + :vartype scale_type: str or + ~azure.mgmt.compute.v2019_03_01.models.VirtualMachineScaleSetSkuScaleType + """ + + _validation = { + 'minimum': {'readonly': True}, + 'maximum': {'readonly': True}, + 'default_capacity': {'readonly': True}, + 'scale_type': {'readonly': True}, + } + + _attribute_map = { + 'minimum': {'key': 'minimum', 'type': 'long'}, + 'maximum': {'key': 'maximum', 'type': 'long'}, + 'default_capacity': {'key': 'defaultCapacity', 'type': 'long'}, + 'scale_type': {'key': 'scaleType', 'type': 'VirtualMachineScaleSetSkuScaleType'}, + } + + def __init__(self, **kwargs): + super(VirtualMachineScaleSetSkuCapacity, self).__init__(**kwargs) + self.minimum = None + self.maximum = None + self.default_capacity = None + self.scale_type = None + + +class VirtualMachineScaleSetStorageProfile(Model): + """Describes a virtual machine scale set storage profile. + + :param image_reference: Specifies information about the image to use. You + can specify information about platform images, marketplace images, or + virtual machine images. This element is required when you want to use a + platform image, marketplace image, or virtual machine image, but is not + used in other creation operations. + :type image_reference: + ~azure.mgmt.compute.v2019_03_01.models.ImageReference + :param os_disk: Specifies information about the operating system disk used + by the virtual machines in the scale set.

    For more information + about disks, see [About disks and VHDs for Azure virtual + machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-about-disks-vhds?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). + :type os_disk: + ~azure.mgmt.compute.v2019_03_01.models.VirtualMachineScaleSetOSDisk + :param data_disks: Specifies the parameters that are used to add data + disks to the virtual machines in the scale set.

    For more + information about disks, see [About disks and VHDs for Azure virtual + machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-about-disks-vhds?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). + :type data_disks: + list[~azure.mgmt.compute.v2019_03_01.models.VirtualMachineScaleSetDataDisk] + """ + + _attribute_map = { + 'image_reference': {'key': 'imageReference', 'type': 'ImageReference'}, + 'os_disk': {'key': 'osDisk', 'type': 'VirtualMachineScaleSetOSDisk'}, + 'data_disks': {'key': 'dataDisks', 'type': '[VirtualMachineScaleSetDataDisk]'}, + } + + def __init__(self, **kwargs): + super(VirtualMachineScaleSetStorageProfile, self).__init__(**kwargs) + self.image_reference = kwargs.get('image_reference', None) + self.os_disk = kwargs.get('os_disk', None) + self.data_disks = kwargs.get('data_disks', None) + + +class VirtualMachineScaleSetUpdate(UpdateResource): + """Describes a Virtual Machine Scale Set. + + :param tags: Resource tags + :type tags: dict[str, str] + :param sku: The virtual machine scale set sku. + :type sku: ~azure.mgmt.compute.v2019_03_01.models.Sku + :param plan: The purchase plan when deploying a virtual machine scale set + from VM Marketplace images. + :type plan: ~azure.mgmt.compute.v2019_03_01.models.Plan + :param upgrade_policy: The upgrade policy. + :type upgrade_policy: ~azure.mgmt.compute.v2019_03_01.models.UpgradePolicy + :param virtual_machine_profile: The virtual machine profile. + :type virtual_machine_profile: + ~azure.mgmt.compute.v2019_03_01.models.VirtualMachineScaleSetUpdateVMProfile + :param overprovision: Specifies whether the Virtual Machine Scale Set + should be overprovisioned. + :type overprovision: bool + :param single_placement_group: When true this limits the scale set to a + single placement group, of max size 100 virtual machines. + :type single_placement_group: bool + :param additional_capabilities: Specifies additional capabilities enabled + or disabled on the Virtual Machines in the Virtual Machine Scale Set. For + instance: whether the Virtual Machines have the capability to support + attaching managed data disks with UltraSSD_LRS storage account type. + :type additional_capabilities: + ~azure.mgmt.compute.v2019_03_01.models.AdditionalCapabilities + :param identity: The identity of the virtual machine scale set, if + configured. + :type identity: + ~azure.mgmt.compute.v2019_03_01.models.VirtualMachineScaleSetIdentity + """ + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + 'sku': {'key': 'sku', 'type': 'Sku'}, + 'plan': {'key': 'plan', 'type': 'Plan'}, + 'upgrade_policy': {'key': 'properties.upgradePolicy', 'type': 'UpgradePolicy'}, + 'virtual_machine_profile': {'key': 'properties.virtualMachineProfile', 'type': 'VirtualMachineScaleSetUpdateVMProfile'}, + 'overprovision': {'key': 'properties.overprovision', 'type': 'bool'}, + 'single_placement_group': {'key': 'properties.singlePlacementGroup', 'type': 'bool'}, + 'additional_capabilities': {'key': 'properties.additionalCapabilities', 'type': 'AdditionalCapabilities'}, + 'identity': {'key': 'identity', 'type': 'VirtualMachineScaleSetIdentity'}, + } + + def __init__(self, **kwargs): + super(VirtualMachineScaleSetUpdate, self).__init__(**kwargs) + self.sku = kwargs.get('sku', None) + self.plan = kwargs.get('plan', None) + self.upgrade_policy = kwargs.get('upgrade_policy', None) + self.virtual_machine_profile = kwargs.get('virtual_machine_profile', None) + self.overprovision = kwargs.get('overprovision', None) + self.single_placement_group = kwargs.get('single_placement_group', None) + self.additional_capabilities = kwargs.get('additional_capabilities', None) + self.identity = kwargs.get('identity', None) + + +class VirtualMachineScaleSetUpdateIPConfiguration(SubResource): + """Describes a virtual machine scale set network profile's IP configuration. + + :param id: Resource Id + :type id: str + :param name: The IP configuration name. + :type name: str + :param subnet: The subnet. + :type subnet: ~azure.mgmt.compute.v2019_03_01.models.ApiEntityReference + :param primary: Specifies the primary IP Configuration in case the network + interface has more than one IP Configuration. + :type primary: bool + :param public_ip_address_configuration: The publicIPAddressConfiguration. + :type public_ip_address_configuration: + ~azure.mgmt.compute.v2019_03_01.models.VirtualMachineScaleSetUpdatePublicIPAddressConfiguration + :param private_ip_address_version: Available from Api-Version 2017-03-30 + onwards, it represents whether the specific ipconfiguration is IPv4 or + IPv6. Default is taken as IPv4. Possible values are: 'IPv4' and 'IPv6'. + Possible values include: 'IPv4', 'IPv6' + :type private_ip_address_version: str or + ~azure.mgmt.compute.v2019_03_01.models.IPVersion + :param application_gateway_backend_address_pools: The application gateway + backend address pools. + :type application_gateway_backend_address_pools: + list[~azure.mgmt.compute.v2019_03_01.models.SubResource] + :param application_security_groups: Specifies an array of references to + application security group. + :type application_security_groups: + list[~azure.mgmt.compute.v2019_03_01.models.SubResource] + :param load_balancer_backend_address_pools: The load balancer backend + address pools. + :type load_balancer_backend_address_pools: + list[~azure.mgmt.compute.v2019_03_01.models.SubResource] + :param load_balancer_inbound_nat_pools: The load balancer inbound nat + pools. + :type load_balancer_inbound_nat_pools: + list[~azure.mgmt.compute.v2019_03_01.models.SubResource] + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'subnet': {'key': 'properties.subnet', 'type': 'ApiEntityReference'}, + 'primary': {'key': 'properties.primary', 'type': 'bool'}, + 'public_ip_address_configuration': {'key': 'properties.publicIPAddressConfiguration', 'type': 'VirtualMachineScaleSetUpdatePublicIPAddressConfiguration'}, + 'private_ip_address_version': {'key': 'properties.privateIPAddressVersion', 'type': 'str'}, + 'application_gateway_backend_address_pools': {'key': 'properties.applicationGatewayBackendAddressPools', 'type': '[SubResource]'}, + 'application_security_groups': {'key': 'properties.applicationSecurityGroups', 'type': '[SubResource]'}, + 'load_balancer_backend_address_pools': {'key': 'properties.loadBalancerBackendAddressPools', 'type': '[SubResource]'}, + 'load_balancer_inbound_nat_pools': {'key': 'properties.loadBalancerInboundNatPools', 'type': '[SubResource]'}, + } + + def __init__(self, **kwargs): + super(VirtualMachineScaleSetUpdateIPConfiguration, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.subnet = kwargs.get('subnet', None) + self.primary = kwargs.get('primary', None) + self.public_ip_address_configuration = kwargs.get('public_ip_address_configuration', None) + self.private_ip_address_version = kwargs.get('private_ip_address_version', None) + self.application_gateway_backend_address_pools = kwargs.get('application_gateway_backend_address_pools', None) + self.application_security_groups = kwargs.get('application_security_groups', None) + self.load_balancer_backend_address_pools = kwargs.get('load_balancer_backend_address_pools', None) + self.load_balancer_inbound_nat_pools = kwargs.get('load_balancer_inbound_nat_pools', None) + + +class VirtualMachineScaleSetUpdateNetworkConfiguration(SubResource): + """Describes a virtual machine scale set network profile's network + configurations. + + :param id: Resource Id + :type id: str + :param name: The network configuration name. + :type name: str + :param primary: Whether this is a primary NIC on a virtual machine. + :type primary: bool + :param enable_accelerated_networking: Specifies whether the network + interface is accelerated networking-enabled. + :type enable_accelerated_networking: bool + :param network_security_group: The network security group. + :type network_security_group: + ~azure.mgmt.compute.v2019_03_01.models.SubResource + :param dns_settings: The dns settings to be applied on the network + interfaces. + :type dns_settings: + ~azure.mgmt.compute.v2019_03_01.models.VirtualMachineScaleSetNetworkConfigurationDnsSettings + :param ip_configurations: The virtual machine scale set IP Configuration. + :type ip_configurations: + list[~azure.mgmt.compute.v2019_03_01.models.VirtualMachineScaleSetUpdateIPConfiguration] + :param enable_ip_forwarding: Whether IP forwarding enabled on this NIC. + :type enable_ip_forwarding: bool + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'primary': {'key': 'properties.primary', 'type': 'bool'}, + 'enable_accelerated_networking': {'key': 'properties.enableAcceleratedNetworking', 'type': 'bool'}, + 'network_security_group': {'key': 'properties.networkSecurityGroup', 'type': 'SubResource'}, + 'dns_settings': {'key': 'properties.dnsSettings', 'type': 'VirtualMachineScaleSetNetworkConfigurationDnsSettings'}, + 'ip_configurations': {'key': 'properties.ipConfigurations', 'type': '[VirtualMachineScaleSetUpdateIPConfiguration]'}, + 'enable_ip_forwarding': {'key': 'properties.enableIPForwarding', 'type': 'bool'}, + } + + def __init__(self, **kwargs): + super(VirtualMachineScaleSetUpdateNetworkConfiguration, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.primary = kwargs.get('primary', None) + self.enable_accelerated_networking = kwargs.get('enable_accelerated_networking', None) + self.network_security_group = kwargs.get('network_security_group', None) + self.dns_settings = kwargs.get('dns_settings', None) + self.ip_configurations = kwargs.get('ip_configurations', None) + self.enable_ip_forwarding = kwargs.get('enable_ip_forwarding', None) + + +class VirtualMachineScaleSetUpdateNetworkProfile(Model): + """Describes a virtual machine scale set network profile. + + :param network_interface_configurations: The list of network + configurations. + :type network_interface_configurations: + list[~azure.mgmt.compute.v2019_03_01.models.VirtualMachineScaleSetUpdateNetworkConfiguration] + """ + + _attribute_map = { + 'network_interface_configurations': {'key': 'networkInterfaceConfigurations', 'type': '[VirtualMachineScaleSetUpdateNetworkConfiguration]'}, + } + + def __init__(self, **kwargs): + super(VirtualMachineScaleSetUpdateNetworkProfile, self).__init__(**kwargs) + self.network_interface_configurations = kwargs.get('network_interface_configurations', None) + + +class VirtualMachineScaleSetUpdateOSDisk(Model): + """Describes virtual machine scale set operating system disk Update Object. + This should be used for Updating VMSS OS Disk. + + :param caching: The caching type. Possible values include: 'None', + 'ReadOnly', 'ReadWrite' + :type caching: str or ~azure.mgmt.compute.v2019_03_01.models.CachingTypes + :param write_accelerator_enabled: Specifies whether writeAccelerator + should be enabled or disabled on the disk. + :type write_accelerator_enabled: bool + :param disk_size_gb: Specifies the size of the operating system disk in + gigabytes. This element can be used to overwrite the size of the disk in a + virtual machine image.

    This value cannot be larger than 1023 GB + :type disk_size_gb: int + :param image: The Source User Image VirtualHardDisk. This VirtualHardDisk + will be copied before using it to attach to the Virtual Machine. If + SourceImage is provided, the destination VirtualHardDisk should not exist. + :type image: ~azure.mgmt.compute.v2019_03_01.models.VirtualHardDisk + :param vhd_containers: The list of virtual hard disk container uris. + :type vhd_containers: list[str] + :param managed_disk: The managed disk parameters. + :type managed_disk: + ~azure.mgmt.compute.v2019_03_01.models.VirtualMachineScaleSetManagedDiskParameters + """ + + _attribute_map = { + 'caching': {'key': 'caching', 'type': 'CachingTypes'}, + 'write_accelerator_enabled': {'key': 'writeAcceleratorEnabled', 'type': 'bool'}, + 'disk_size_gb': {'key': 'diskSizeGB', 'type': 'int'}, + 'image': {'key': 'image', 'type': 'VirtualHardDisk'}, + 'vhd_containers': {'key': 'vhdContainers', 'type': '[str]'}, + 'managed_disk': {'key': 'managedDisk', 'type': 'VirtualMachineScaleSetManagedDiskParameters'}, + } + + def __init__(self, **kwargs): + super(VirtualMachineScaleSetUpdateOSDisk, self).__init__(**kwargs) + self.caching = kwargs.get('caching', None) + self.write_accelerator_enabled = kwargs.get('write_accelerator_enabled', None) + self.disk_size_gb = kwargs.get('disk_size_gb', None) + self.image = kwargs.get('image', None) + self.vhd_containers = kwargs.get('vhd_containers', None) + self.managed_disk = kwargs.get('managed_disk', None) + + +class VirtualMachineScaleSetUpdateOSProfile(Model): + """Describes a virtual machine scale set OS profile. + + :param custom_data: A base-64 encoded string of custom data. + :type custom_data: str + :param windows_configuration: The Windows Configuration of the OS profile. + :type windows_configuration: + ~azure.mgmt.compute.v2019_03_01.models.WindowsConfiguration + :param linux_configuration: The Linux Configuration of the OS profile. + :type linux_configuration: + ~azure.mgmt.compute.v2019_03_01.models.LinuxConfiguration + :param secrets: The List of certificates for addition to the VM. + :type secrets: + list[~azure.mgmt.compute.v2019_03_01.models.VaultSecretGroup] + """ + + _attribute_map = { + 'custom_data': {'key': 'customData', 'type': 'str'}, + 'windows_configuration': {'key': 'windowsConfiguration', 'type': 'WindowsConfiguration'}, + 'linux_configuration': {'key': 'linuxConfiguration', 'type': 'LinuxConfiguration'}, + 'secrets': {'key': 'secrets', 'type': '[VaultSecretGroup]'}, + } + + def __init__(self, **kwargs): + super(VirtualMachineScaleSetUpdateOSProfile, self).__init__(**kwargs) + self.custom_data = kwargs.get('custom_data', None) + self.windows_configuration = kwargs.get('windows_configuration', None) + self.linux_configuration = kwargs.get('linux_configuration', None) + self.secrets = kwargs.get('secrets', None) + + +class VirtualMachineScaleSetUpdatePublicIPAddressConfiguration(Model): + """Describes a virtual machines scale set IP Configuration's PublicIPAddress + configuration. + + :param name: The publicIP address configuration name. + :type name: str + :param idle_timeout_in_minutes: The idle timeout of the public IP address. + :type idle_timeout_in_minutes: int + :param dns_settings: The dns settings to be applied on the publicIP + addresses . + :type dns_settings: + ~azure.mgmt.compute.v2019_03_01.models.VirtualMachineScaleSetPublicIPAddressConfigurationDnsSettings + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'idle_timeout_in_minutes': {'key': 'properties.idleTimeoutInMinutes', 'type': 'int'}, + 'dns_settings': {'key': 'properties.dnsSettings', 'type': 'VirtualMachineScaleSetPublicIPAddressConfigurationDnsSettings'}, + } + + def __init__(self, **kwargs): + super(VirtualMachineScaleSetUpdatePublicIPAddressConfiguration, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.idle_timeout_in_minutes = kwargs.get('idle_timeout_in_minutes', None) + self.dns_settings = kwargs.get('dns_settings', None) + + +class VirtualMachineScaleSetUpdateStorageProfile(Model): + """Describes a virtual machine scale set storage profile. + + :param image_reference: The image reference. + :type image_reference: + ~azure.mgmt.compute.v2019_03_01.models.ImageReference + :param os_disk: The OS disk. + :type os_disk: + ~azure.mgmt.compute.v2019_03_01.models.VirtualMachineScaleSetUpdateOSDisk + :param data_disks: The data disks. + :type data_disks: + list[~azure.mgmt.compute.v2019_03_01.models.VirtualMachineScaleSetDataDisk] + """ + + _attribute_map = { + 'image_reference': {'key': 'imageReference', 'type': 'ImageReference'}, + 'os_disk': {'key': 'osDisk', 'type': 'VirtualMachineScaleSetUpdateOSDisk'}, + 'data_disks': {'key': 'dataDisks', 'type': '[VirtualMachineScaleSetDataDisk]'}, + } + + def __init__(self, **kwargs): + super(VirtualMachineScaleSetUpdateStorageProfile, self).__init__(**kwargs) + self.image_reference = kwargs.get('image_reference', None) + self.os_disk = kwargs.get('os_disk', None) + self.data_disks = kwargs.get('data_disks', None) + + +class VirtualMachineScaleSetUpdateVMProfile(Model): + """Describes a virtual machine scale set virtual machine profile. + + :param os_profile: The virtual machine scale set OS profile. + :type os_profile: + ~azure.mgmt.compute.v2019_03_01.models.VirtualMachineScaleSetUpdateOSProfile + :param storage_profile: The virtual machine scale set storage profile. + :type storage_profile: + ~azure.mgmt.compute.v2019_03_01.models.VirtualMachineScaleSetUpdateStorageProfile + :param network_profile: The virtual machine scale set network profile. + :type network_profile: + ~azure.mgmt.compute.v2019_03_01.models.VirtualMachineScaleSetUpdateNetworkProfile + :param diagnostics_profile: The virtual machine scale set diagnostics + profile. + :type diagnostics_profile: + ~azure.mgmt.compute.v2019_03_01.models.DiagnosticsProfile + :param extension_profile: The virtual machine scale set extension profile. + :type extension_profile: + ~azure.mgmt.compute.v2019_03_01.models.VirtualMachineScaleSetExtensionProfile + :param license_type: The license type, which is for bring your own license + scenario. + :type license_type: str + """ + + _attribute_map = { + 'os_profile': {'key': 'osProfile', 'type': 'VirtualMachineScaleSetUpdateOSProfile'}, + 'storage_profile': {'key': 'storageProfile', 'type': 'VirtualMachineScaleSetUpdateStorageProfile'}, + 'network_profile': {'key': 'networkProfile', 'type': 'VirtualMachineScaleSetUpdateNetworkProfile'}, + 'diagnostics_profile': {'key': 'diagnosticsProfile', 'type': 'DiagnosticsProfile'}, + 'extension_profile': {'key': 'extensionProfile', 'type': 'VirtualMachineScaleSetExtensionProfile'}, + 'license_type': {'key': 'licenseType', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(VirtualMachineScaleSetUpdateVMProfile, self).__init__(**kwargs) + self.os_profile = kwargs.get('os_profile', None) + self.storage_profile = kwargs.get('storage_profile', None) + self.network_profile = kwargs.get('network_profile', None) + self.diagnostics_profile = kwargs.get('diagnostics_profile', None) + self.extension_profile = kwargs.get('extension_profile', None) + self.license_type = kwargs.get('license_type', None) + + +class VirtualMachineScaleSetVM(Resource): + """Describes a virtual machine scale set virtual machine. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource Id + :vartype id: str + :ivar name: Resource name + :vartype name: str + :ivar type: Resource type + :vartype type: str + :param location: Required. Resource location + :type location: str + :param tags: Resource tags + :type tags: dict[str, str] + :ivar instance_id: The virtual machine instance ID. + :vartype instance_id: str + :ivar sku: The virtual machine SKU. + :vartype sku: ~azure.mgmt.compute.v2019_03_01.models.Sku + :ivar latest_model_applied: Specifies whether the latest model has been + applied to the virtual machine. + :vartype latest_model_applied: bool + :ivar vm_id: Azure VM unique ID. + :vartype vm_id: str + :ivar instance_view: The virtual machine instance view. + :vartype instance_view: + ~azure.mgmt.compute.v2019_03_01.models.VirtualMachineScaleSetVMInstanceView + :param hardware_profile: Specifies the hardware settings for the virtual + machine. + :type hardware_profile: + ~azure.mgmt.compute.v2019_03_01.models.HardwareProfile + :param storage_profile: Specifies the storage settings for the virtual + machine disks. + :type storage_profile: + ~azure.mgmt.compute.v2019_03_01.models.StorageProfile + :param additional_capabilities: Specifies additional capabilities enabled + or disabled on the virtual machine in the scale set. For instance: whether + the virtual machine has the capability to support attaching managed data + disks with UltraSSD_LRS storage account type. + :type additional_capabilities: + ~azure.mgmt.compute.v2019_03_01.models.AdditionalCapabilities + :param os_profile: Specifies the operating system settings for the virtual + machine. + :type os_profile: ~azure.mgmt.compute.v2019_03_01.models.OSProfile + :param network_profile: Specifies the network interfaces of the virtual + machine. + :type network_profile: + ~azure.mgmt.compute.v2019_03_01.models.NetworkProfile + :param network_profile_configuration: Specifies the network profile + configuration of the virtual machine. + :type network_profile_configuration: + ~azure.mgmt.compute.v2019_03_01.models.VirtualMachineScaleSetVMNetworkProfileConfiguration + :param diagnostics_profile: Specifies the boot diagnostic settings state. +

    Minimum api-version: 2015-06-15. + :type diagnostics_profile: + ~azure.mgmt.compute.v2019_03_01.models.DiagnosticsProfile + :param availability_set: Specifies information about the availability set + that the virtual machine should be assigned to. Virtual machines specified + in the same availability set are allocated to different nodes to maximize + availability. For more information about availability sets, see [Manage + the availability of virtual + machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-manage-availability?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). +

    For more information on Azure planned maintenance, see [Planned + maintenance for virtual machines in + Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-planned-maintenance?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json) +

    Currently, a VM can only be added to availability set at creation + time. An existing VM cannot be added to an availability set. + :type availability_set: ~azure.mgmt.compute.v2019_03_01.models.SubResource + :ivar provisioning_state: The provisioning state, which only appears in + the response. + :vartype provisioning_state: str + :param license_type: Specifies that the image or disk that is being used + was licensed on-premises. This element is only used for images that + contain the Windows Server operating system.

    Possible values are: +

    Windows_Client

    Windows_Server

    If this element + is included in a request for an update, the value must match the initial + value. This value cannot be updated.

    For more information, see + [Azure Hybrid Use Benefit for Windows + Server](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-hybrid-use-benefit-licensing?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json) +

    Minimum api-version: 2015-06-15 + :type license_type: str + :ivar model_definition_applied: Specifies whether the model applied to the + virtual machine is the model of the virtual machine scale set or the + customized model for the virtual machine. + :vartype model_definition_applied: str + :param protection_policy: Specifies the protection policy of the virtual + machine. + :type protection_policy: + ~azure.mgmt.compute.v2019_03_01.models.VirtualMachineScaleSetVMProtectionPolicy + :param plan: Specifies information about the marketplace image used to + create the virtual machine. This element is only used for marketplace + images. Before you can use a marketplace image from an API, you must + enable the image for programmatic use. In the Azure portal, find the + marketplace image that you want to use and then click **Want to deploy + programmatically, Get Started ->**. Enter any required information and + then click **Save**. + :type plan: ~azure.mgmt.compute.v2019_03_01.models.Plan + :ivar resources: The virtual machine child extension resources. + :vartype resources: + list[~azure.mgmt.compute.v2019_03_01.models.VirtualMachineExtension] + :ivar zones: The virtual machine zones. + :vartype zones: list[str] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + 'instance_id': {'readonly': True}, + 'sku': {'readonly': True}, + 'latest_model_applied': {'readonly': True}, + 'vm_id': {'readonly': True}, + 'instance_view': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + 'model_definition_applied': {'readonly': True}, + 'resources': {'readonly': True}, + 'zones': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'instance_id': {'key': 'instanceId', 'type': 'str'}, + 'sku': {'key': 'sku', 'type': 'Sku'}, + 'latest_model_applied': {'key': 'properties.latestModelApplied', 'type': 'bool'}, + 'vm_id': {'key': 'properties.vmId', 'type': 'str'}, + 'instance_view': {'key': 'properties.instanceView', 'type': 'VirtualMachineScaleSetVMInstanceView'}, + 'hardware_profile': {'key': 'properties.hardwareProfile', 'type': 'HardwareProfile'}, + 'storage_profile': {'key': 'properties.storageProfile', 'type': 'StorageProfile'}, + 'additional_capabilities': {'key': 'properties.additionalCapabilities', 'type': 'AdditionalCapabilities'}, + 'os_profile': {'key': 'properties.osProfile', 'type': 'OSProfile'}, + 'network_profile': {'key': 'properties.networkProfile', 'type': 'NetworkProfile'}, + 'network_profile_configuration': {'key': 'properties.networkProfileConfiguration', 'type': 'VirtualMachineScaleSetVMNetworkProfileConfiguration'}, + 'diagnostics_profile': {'key': 'properties.diagnosticsProfile', 'type': 'DiagnosticsProfile'}, + 'availability_set': {'key': 'properties.availabilitySet', 'type': 'SubResource'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'license_type': {'key': 'properties.licenseType', 'type': 'str'}, + 'model_definition_applied': {'key': 'properties.modelDefinitionApplied', 'type': 'str'}, + 'protection_policy': {'key': 'properties.protectionPolicy', 'type': 'VirtualMachineScaleSetVMProtectionPolicy'}, + 'plan': {'key': 'plan', 'type': 'Plan'}, + 'resources': {'key': 'resources', 'type': '[VirtualMachineExtension]'}, + 'zones': {'key': 'zones', 'type': '[str]'}, + } + + def __init__(self, **kwargs): + super(VirtualMachineScaleSetVM, self).__init__(**kwargs) + self.instance_id = None + self.sku = None + self.latest_model_applied = None + self.vm_id = None + self.instance_view = None + self.hardware_profile = kwargs.get('hardware_profile', None) + self.storage_profile = kwargs.get('storage_profile', None) + self.additional_capabilities = kwargs.get('additional_capabilities', None) + self.os_profile = kwargs.get('os_profile', None) + self.network_profile = kwargs.get('network_profile', None) + self.network_profile_configuration = kwargs.get('network_profile_configuration', None) + self.diagnostics_profile = kwargs.get('diagnostics_profile', None) + self.availability_set = kwargs.get('availability_set', None) + self.provisioning_state = None + self.license_type = kwargs.get('license_type', None) + self.model_definition_applied = None + self.protection_policy = kwargs.get('protection_policy', None) + self.plan = kwargs.get('plan', None) + self.resources = None + self.zones = None + + +class VirtualMachineScaleSetVMExtensionsSummary(Model): + """Extensions summary for virtual machines of a virtual machine scale set. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar name: The extension name. + :vartype name: str + :ivar statuses_summary: The extensions information. + :vartype statuses_summary: + list[~azure.mgmt.compute.v2019_03_01.models.VirtualMachineStatusCodeCount] + """ + + _validation = { + 'name': {'readonly': True}, + 'statuses_summary': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'statuses_summary': {'key': 'statusesSummary', 'type': '[VirtualMachineStatusCodeCount]'}, + } + + def __init__(self, **kwargs): + super(VirtualMachineScaleSetVMExtensionsSummary, self).__init__(**kwargs) + self.name = None + self.statuses_summary = None + + +class VirtualMachineScaleSetVMInstanceIDs(Model): + """Specifies a list of virtual machine instance IDs from the VM scale set. + + :param instance_ids: The virtual machine scale set instance ids. Omitting + the virtual machine scale set instance ids will result in the operation + being performed on all virtual machines in the virtual machine scale set. + :type instance_ids: list[str] + """ + + _attribute_map = { + 'instance_ids': {'key': 'instanceIds', 'type': '[str]'}, + } + + def __init__(self, **kwargs): + super(VirtualMachineScaleSetVMInstanceIDs, self).__init__(**kwargs) + self.instance_ids = kwargs.get('instance_ids', None) + + +class VirtualMachineScaleSetVMInstanceRequiredIDs(Model): + """Specifies a list of virtual machine instance IDs from the VM scale set. + + All required parameters must be populated in order to send to Azure. + + :param instance_ids: Required. The virtual machine scale set instance ids. + :type instance_ids: list[str] + """ + + _validation = { + 'instance_ids': {'required': True}, + } + + _attribute_map = { + 'instance_ids': {'key': 'instanceIds', 'type': '[str]'}, + } + + def __init__(self, **kwargs): + super(VirtualMachineScaleSetVMInstanceRequiredIDs, self).__init__(**kwargs) + self.instance_ids = kwargs.get('instance_ids', None) + + +class VirtualMachineScaleSetVMInstanceView(Model): + """The instance view of a virtual machine scale set VM. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :param platform_update_domain: The Update Domain count. + :type platform_update_domain: int + :param platform_fault_domain: The Fault Domain count. + :type platform_fault_domain: int + :param rdp_thumb_print: The Remote desktop certificate thumbprint. + :type rdp_thumb_print: str + :param vm_agent: The VM Agent running on the virtual machine. + :type vm_agent: + ~azure.mgmt.compute.v2019_03_01.models.VirtualMachineAgentInstanceView + :param maintenance_redeploy_status: The Maintenance Operation status on + the virtual machine. + :type maintenance_redeploy_status: + ~azure.mgmt.compute.v2019_03_01.models.MaintenanceRedeployStatus + :param disks: The disks information. + :type disks: list[~azure.mgmt.compute.v2019_03_01.models.DiskInstanceView] + :param extensions: The extensions information. + :type extensions: + list[~azure.mgmt.compute.v2019_03_01.models.VirtualMachineExtensionInstanceView] + :ivar vm_health: The health status for the VM. + :vartype vm_health: + ~azure.mgmt.compute.v2019_03_01.models.VirtualMachineHealthStatus + :param boot_diagnostics: Boot Diagnostics is a debugging feature which + allows you to view Console Output and Screenshot to diagnose VM status. +

    You can easily view the output of your console log.

    + Azure also enables you to see a screenshot of the VM from the hypervisor. + :type boot_diagnostics: + ~azure.mgmt.compute.v2019_03_01.models.BootDiagnosticsInstanceView + :param statuses: The resource status information. + :type statuses: + list[~azure.mgmt.compute.v2019_03_01.models.InstanceViewStatus] + :param placement_group_id: The placement group in which the VM is running. + If the VM is deallocated it will not have a placementGroupId. + :type placement_group_id: str + """ + + _validation = { + 'vm_health': {'readonly': True}, + } + + _attribute_map = { + 'platform_update_domain': {'key': 'platformUpdateDomain', 'type': 'int'}, + 'platform_fault_domain': {'key': 'platformFaultDomain', 'type': 'int'}, + 'rdp_thumb_print': {'key': 'rdpThumbPrint', 'type': 'str'}, + 'vm_agent': {'key': 'vmAgent', 'type': 'VirtualMachineAgentInstanceView'}, + 'maintenance_redeploy_status': {'key': 'maintenanceRedeployStatus', 'type': 'MaintenanceRedeployStatus'}, + 'disks': {'key': 'disks', 'type': '[DiskInstanceView]'}, + 'extensions': {'key': 'extensions', 'type': '[VirtualMachineExtensionInstanceView]'}, + 'vm_health': {'key': 'vmHealth', 'type': 'VirtualMachineHealthStatus'}, + 'boot_diagnostics': {'key': 'bootDiagnostics', 'type': 'BootDiagnosticsInstanceView'}, + 'statuses': {'key': 'statuses', 'type': '[InstanceViewStatus]'}, + 'placement_group_id': {'key': 'placementGroupId', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(VirtualMachineScaleSetVMInstanceView, self).__init__(**kwargs) + self.platform_update_domain = kwargs.get('platform_update_domain', None) + self.platform_fault_domain = kwargs.get('platform_fault_domain', None) + self.rdp_thumb_print = kwargs.get('rdp_thumb_print', None) + self.vm_agent = kwargs.get('vm_agent', None) + self.maintenance_redeploy_status = kwargs.get('maintenance_redeploy_status', None) + self.disks = kwargs.get('disks', None) + self.extensions = kwargs.get('extensions', None) + self.vm_health = None + self.boot_diagnostics = kwargs.get('boot_diagnostics', None) + self.statuses = kwargs.get('statuses', None) + self.placement_group_id = kwargs.get('placement_group_id', None) + + +class VirtualMachineScaleSetVMNetworkProfileConfiguration(Model): + """Describes a virtual machine scale set VM network profile. + + :param network_interface_configurations: The list of network + configurations. + :type network_interface_configurations: + list[~azure.mgmt.compute.v2019_03_01.models.VirtualMachineScaleSetNetworkConfiguration] + """ + + _attribute_map = { + 'network_interface_configurations': {'key': 'networkInterfaceConfigurations', 'type': '[VirtualMachineScaleSetNetworkConfiguration]'}, + } + + def __init__(self, **kwargs): + super(VirtualMachineScaleSetVMNetworkProfileConfiguration, self).__init__(**kwargs) + self.network_interface_configurations = kwargs.get('network_interface_configurations', None) + + +class VirtualMachineScaleSetVMProfile(Model): + """Describes a virtual machine scale set virtual machine profile. + + :param os_profile: Specifies the operating system settings for the virtual + machines in the scale set. + :type os_profile: + ~azure.mgmt.compute.v2019_03_01.models.VirtualMachineScaleSetOSProfile + :param storage_profile: Specifies the storage settings for the virtual + machine disks. + :type storage_profile: + ~azure.mgmt.compute.v2019_03_01.models.VirtualMachineScaleSetStorageProfile + :param network_profile: Specifies properties of the network interfaces of + the virtual machines in the scale set. + :type network_profile: + ~azure.mgmt.compute.v2019_03_01.models.VirtualMachineScaleSetNetworkProfile + :param diagnostics_profile: Specifies the boot diagnostic settings state. +

    Minimum api-version: 2015-06-15. + :type diagnostics_profile: + ~azure.mgmt.compute.v2019_03_01.models.DiagnosticsProfile + :param extension_profile: Specifies a collection of settings for + extensions installed on virtual machines in the scale set. + :type extension_profile: + ~azure.mgmt.compute.v2019_03_01.models.VirtualMachineScaleSetExtensionProfile + :param license_type: Specifies that the image or disk that is being used + was licensed on-premises. This element is only used for images that + contain the Windows Server operating system.

    Possible values are: +

    Windows_Client

    Windows_Server

    If this element + is included in a request for an update, the value must match the initial + value. This value cannot be updated.

    For more information, see + [Azure Hybrid Use Benefit for Windows + Server](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-hybrid-use-benefit-licensing?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json) +

    Minimum api-version: 2015-06-15 + :type license_type: str + :param priority: Specifies the priority for the virtual machines in the + scale set.

    Minimum api-version: 2017-10-30-preview. Possible + values include: 'Regular', 'Low' + :type priority: str or + ~azure.mgmt.compute.v2019_03_01.models.VirtualMachinePriorityTypes + :param eviction_policy: Specifies the eviction policy for virtual machines + in a low priority scale set.

    Minimum api-version: + 2017-10-30-preview. Possible values include: 'Deallocate', 'Delete' + :type eviction_policy: str or + ~azure.mgmt.compute.v2019_03_01.models.VirtualMachineEvictionPolicyTypes + """ + + _attribute_map = { + 'os_profile': {'key': 'osProfile', 'type': 'VirtualMachineScaleSetOSProfile'}, + 'storage_profile': {'key': 'storageProfile', 'type': 'VirtualMachineScaleSetStorageProfile'}, + 'network_profile': {'key': 'networkProfile', 'type': 'VirtualMachineScaleSetNetworkProfile'}, + 'diagnostics_profile': {'key': 'diagnosticsProfile', 'type': 'DiagnosticsProfile'}, + 'extension_profile': {'key': 'extensionProfile', 'type': 'VirtualMachineScaleSetExtensionProfile'}, + 'license_type': {'key': 'licenseType', 'type': 'str'}, + 'priority': {'key': 'priority', 'type': 'str'}, + 'eviction_policy': {'key': 'evictionPolicy', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(VirtualMachineScaleSetVMProfile, self).__init__(**kwargs) + self.os_profile = kwargs.get('os_profile', None) + self.storage_profile = kwargs.get('storage_profile', None) + self.network_profile = kwargs.get('network_profile', None) + self.diagnostics_profile = kwargs.get('diagnostics_profile', None) + self.extension_profile = kwargs.get('extension_profile', None) + self.license_type = kwargs.get('license_type', None) + self.priority = kwargs.get('priority', None) + self.eviction_policy = kwargs.get('eviction_policy', None) + + +class VirtualMachineScaleSetVMProtectionPolicy(Model): + """The protection policy of a virtual machine scale set VM. + + :param protect_from_scale_in: Indicates that the virtual machine scale set + VM shouldn't be considered for deletion during a scale-in operation. + :type protect_from_scale_in: bool + :param protect_from_scale_set_actions: Indicates that model updates or + actions (including scale-in) initiated on the virtual machine scale set + should not be applied to the virtual machine scale set VM. + :type protect_from_scale_set_actions: bool + """ + + _attribute_map = { + 'protect_from_scale_in': {'key': 'protectFromScaleIn', 'type': 'bool'}, + 'protect_from_scale_set_actions': {'key': 'protectFromScaleSetActions', 'type': 'bool'}, + } + + def __init__(self, **kwargs): + super(VirtualMachineScaleSetVMProtectionPolicy, self).__init__(**kwargs) + self.protect_from_scale_in = kwargs.get('protect_from_scale_in', None) + self.protect_from_scale_set_actions = kwargs.get('protect_from_scale_set_actions', None) + + +class VirtualMachineSize(Model): + """Describes the properties of a VM size. + + :param name: The name of the virtual machine size. + :type name: str + :param number_of_cores: The number of cores supported by the virtual + machine size. + :type number_of_cores: int + :param os_disk_size_in_mb: The OS disk size, in MB, allowed by the virtual + machine size. + :type os_disk_size_in_mb: int + :param resource_disk_size_in_mb: The resource disk size, in MB, allowed by + the virtual machine size. + :type resource_disk_size_in_mb: int + :param memory_in_mb: The amount of memory, in MB, supported by the virtual + machine size. + :type memory_in_mb: int + :param max_data_disk_count: The maximum number of data disks that can be + attached to the virtual machine size. + :type max_data_disk_count: int + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'number_of_cores': {'key': 'numberOfCores', 'type': 'int'}, + 'os_disk_size_in_mb': {'key': 'osDiskSizeInMB', 'type': 'int'}, + 'resource_disk_size_in_mb': {'key': 'resourceDiskSizeInMB', 'type': 'int'}, + 'memory_in_mb': {'key': 'memoryInMB', 'type': 'int'}, + 'max_data_disk_count': {'key': 'maxDataDiskCount', 'type': 'int'}, + } + + def __init__(self, **kwargs): + super(VirtualMachineSize, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.number_of_cores = kwargs.get('number_of_cores', None) + self.os_disk_size_in_mb = kwargs.get('os_disk_size_in_mb', None) + self.resource_disk_size_in_mb = kwargs.get('resource_disk_size_in_mb', None) + self.memory_in_mb = kwargs.get('memory_in_mb', None) + self.max_data_disk_count = kwargs.get('max_data_disk_count', None) + + +class VirtualMachineStatusCodeCount(Model): + """The status code and count of the virtual machine scale set instance view + status summary. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar code: The instance view status code. + :vartype code: str + :ivar count: The number of instances having a particular status code. + :vartype count: int + """ + + _validation = { + 'code': {'readonly': True}, + 'count': {'readonly': True}, + } + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + 'count': {'key': 'count', 'type': 'int'}, + } + + def __init__(self, **kwargs): + super(VirtualMachineStatusCodeCount, self).__init__(**kwargs) + self.code = None + self.count = None + + +class VirtualMachineUpdate(UpdateResource): + """Describes a Virtual Machine Update. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :param tags: Resource tags + :type tags: dict[str, str] + :param plan: Specifies information about the marketplace image used to + create the virtual machine. This element is only used for marketplace + images. Before you can use a marketplace image from an API, you must + enable the image for programmatic use. In the Azure portal, find the + marketplace image that you want to use and then click **Want to deploy + programmatically, Get Started ->**. Enter any required information and + then click **Save**. + :type plan: ~azure.mgmt.compute.v2019_03_01.models.Plan + :param hardware_profile: Specifies the hardware settings for the virtual + machine. + :type hardware_profile: + ~azure.mgmt.compute.v2019_03_01.models.HardwareProfile + :param storage_profile: Specifies the storage settings for the virtual + machine disks. + :type storage_profile: + ~azure.mgmt.compute.v2019_03_01.models.StorageProfile + :param additional_capabilities: Specifies additional capabilities enabled + or disabled on the virtual machine. + :type additional_capabilities: + ~azure.mgmt.compute.v2019_03_01.models.AdditionalCapabilities + :param os_profile: Specifies the operating system settings for the virtual + machine. + :type os_profile: ~azure.mgmt.compute.v2019_03_01.models.OSProfile + :param network_profile: Specifies the network interfaces of the virtual + machine. + :type network_profile: + ~azure.mgmt.compute.v2019_03_01.models.NetworkProfile + :param diagnostics_profile: Specifies the boot diagnostic settings state. +

    Minimum api-version: 2015-06-15. + :type diagnostics_profile: + ~azure.mgmt.compute.v2019_03_01.models.DiagnosticsProfile + :param availability_set: Specifies information about the availability set + that the virtual machine should be assigned to. Virtual machines specified + in the same availability set are allocated to different nodes to maximize + availability. For more information about availability sets, see [Manage + the availability of virtual + machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-manage-availability?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). +

    For more information on Azure planned maintenance, see [Planned + maintenance for virtual machines in + Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-planned-maintenance?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json) +

    Currently, a VM can only be added to availability set at creation + time. An existing VM cannot be added to an availability set. + :type availability_set: ~azure.mgmt.compute.v2019_03_01.models.SubResource + :param proximity_placement_group: Specifies information about the + proximity placement group that the virtual machine should be assigned to. +

    Minimum api-version: 2018-04-01. + :type proximity_placement_group: + ~azure.mgmt.compute.v2019_03_01.models.SubResource + :param host: Specifies information about the dedicated host that the + virtual machine resides in.

    Minimum api-version: 2018-10-01. + :type host: ~azure.mgmt.compute.v2019_03_01.models.SubResource + :ivar provisioning_state: The provisioning state, which only appears in + the response. + :vartype provisioning_state: str + :ivar instance_view: The virtual machine instance view. + :vartype instance_view: + ~azure.mgmt.compute.v2019_03_01.models.VirtualMachineInstanceView + :param license_type: Specifies that the image or disk that is being used + was licensed on-premises. This element is only used for images that + contain the Windows Server operating system.

    Possible values are: +

    Windows_Client

    Windows_Server

    If this element + is included in a request for an update, the value must match the initial + value. This value cannot be updated.

    For more information, see + [Azure Hybrid Use Benefit for Windows + Server](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-hybrid-use-benefit-licensing?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json) +

    Minimum api-version: 2015-06-15 + :type license_type: str + :ivar vm_id: Specifies the VM unique ID which is a 128-bits identifier + that is encoded and stored in all Azure IaaS VMs SMBIOS and can be read + using platform BIOS commands. + :vartype vm_id: str + :param identity: The identity of the virtual machine, if configured. + :type identity: + ~azure.mgmt.compute.v2019_03_01.models.VirtualMachineIdentity + :param zones: The virtual machine zones. + :type zones: list[str] + """ + + _validation = { + 'provisioning_state': {'readonly': True}, + 'instance_view': {'readonly': True}, + 'vm_id': {'readonly': True}, + } + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + 'plan': {'key': 'plan', 'type': 'Plan'}, + 'hardware_profile': {'key': 'properties.hardwareProfile', 'type': 'HardwareProfile'}, + 'storage_profile': {'key': 'properties.storageProfile', 'type': 'StorageProfile'}, + 'additional_capabilities': {'key': 'properties.additionalCapabilities', 'type': 'AdditionalCapabilities'}, + 'os_profile': {'key': 'properties.osProfile', 'type': 'OSProfile'}, + 'network_profile': {'key': 'properties.networkProfile', 'type': 'NetworkProfile'}, + 'diagnostics_profile': {'key': 'properties.diagnosticsProfile', 'type': 'DiagnosticsProfile'}, + 'availability_set': {'key': 'properties.availabilitySet', 'type': 'SubResource'}, + 'proximity_placement_group': {'key': 'properties.proximityPlacementGroup', 'type': 'SubResource'}, + 'host': {'key': 'properties.host', 'type': 'SubResource'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'instance_view': {'key': 'properties.instanceView', 'type': 'VirtualMachineInstanceView'}, + 'license_type': {'key': 'properties.licenseType', 'type': 'str'}, + 'vm_id': {'key': 'properties.vmId', 'type': 'str'}, + 'identity': {'key': 'identity', 'type': 'VirtualMachineIdentity'}, + 'zones': {'key': 'zones', 'type': '[str]'}, + } + + def __init__(self, **kwargs): + super(VirtualMachineUpdate, self).__init__(**kwargs) + self.plan = kwargs.get('plan', None) + self.hardware_profile = kwargs.get('hardware_profile', None) + self.storage_profile = kwargs.get('storage_profile', None) + self.additional_capabilities = kwargs.get('additional_capabilities', None) + self.os_profile = kwargs.get('os_profile', None) + self.network_profile = kwargs.get('network_profile', None) + self.diagnostics_profile = kwargs.get('diagnostics_profile', None) + self.availability_set = kwargs.get('availability_set', None) + self.proximity_placement_group = kwargs.get('proximity_placement_group', None) + self.host = kwargs.get('host', None) + self.provisioning_state = None + self.instance_view = None + self.license_type = kwargs.get('license_type', None) + self.vm_id = None + self.identity = kwargs.get('identity', None) + self.zones = kwargs.get('zones', None) + + +class VMScaleSetConvertToSinglePlacementGroupInput(Model): + """VMScaleSetConvertToSinglePlacementGroupInput. + + :param active_placement_group_id: Id of the placement group in which you + want future virtual machine instances to be placed. To query placement + group Id, please use Virtual Machine Scale Set VMs - Get API. If not + provided, the platform will choose one with maximum number of virtual + machine instances. + :type active_placement_group_id: str + """ + + _attribute_map = { + 'active_placement_group_id': {'key': 'activePlacementGroupId', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(VMScaleSetConvertToSinglePlacementGroupInput, self).__init__(**kwargs) + self.active_placement_group_id = kwargs.get('active_placement_group_id', None) + + +class WindowsConfiguration(Model): + """Specifies Windows operating system settings on the virtual machine. + + :param provision_vm_agent: Indicates whether virtual machine agent should + be provisioned on the virtual machine.

    When this property is not + specified in the request body, default behavior is to set it to true. + This will ensure that VM Agent is installed on the VM so that extensions + can be added to the VM later. + :type provision_vm_agent: bool + :param enable_automatic_updates: Indicates whether Automatic Updates is + enabled for the Windows virtual machine. Default value is true.

    + For virtual machine scale sets, this property can be updated and updates + will take effect on OS reprovisioning. + :type enable_automatic_updates: bool + :param time_zone: Specifies the time zone of the virtual machine. e.g. + "Pacific Standard Time" + :type time_zone: str + :param additional_unattend_content: Specifies additional base-64 encoded + XML formatted information that can be included in the Unattend.xml file, + which is used by Windows Setup. + :type additional_unattend_content: + list[~azure.mgmt.compute.v2019_03_01.models.AdditionalUnattendContent] + :param win_rm: Specifies the Windows Remote Management listeners. This + enables remote Windows PowerShell. + :type win_rm: ~azure.mgmt.compute.v2019_03_01.models.WinRMConfiguration + """ + + _attribute_map = { + 'provision_vm_agent': {'key': 'provisionVMAgent', 'type': 'bool'}, + 'enable_automatic_updates': {'key': 'enableAutomaticUpdates', 'type': 'bool'}, + 'time_zone': {'key': 'timeZone', 'type': 'str'}, + 'additional_unattend_content': {'key': 'additionalUnattendContent', 'type': '[AdditionalUnattendContent]'}, + 'win_rm': {'key': 'winRM', 'type': 'WinRMConfiguration'}, + } + + def __init__(self, **kwargs): + super(WindowsConfiguration, self).__init__(**kwargs) + self.provision_vm_agent = kwargs.get('provision_vm_agent', None) + self.enable_automatic_updates = kwargs.get('enable_automatic_updates', None) + self.time_zone = kwargs.get('time_zone', None) + self.additional_unattend_content = kwargs.get('additional_unattend_content', None) + self.win_rm = kwargs.get('win_rm', None) + + +class WinRMConfiguration(Model): + """Describes Windows Remote Management configuration of the VM. + + :param listeners: The list of Windows Remote Management listeners + :type listeners: + list[~azure.mgmt.compute.v2019_03_01.models.WinRMListener] + """ + + _attribute_map = { + 'listeners': {'key': 'listeners', 'type': '[WinRMListener]'}, + } + + def __init__(self, **kwargs): + super(WinRMConfiguration, self).__init__(**kwargs) + self.listeners = kwargs.get('listeners', None) + + +class WinRMListener(Model): + """Describes Protocol and thumbprint of Windows Remote Management listener. + + :param protocol: Specifies the protocol of listener.

    Possible + values are:
    **http**

    **https**. Possible values include: + 'Http', 'Https' + :type protocol: str or + ~azure.mgmt.compute.v2019_03_01.models.ProtocolTypes + :param certificate_url: This is the URL of a certificate that has been + uploaded to Key Vault as a secret. For adding a secret to the Key Vault, + see [Add a key or secret to the key + vault](https://docs.microsoft.com/azure/key-vault/key-vault-get-started/#add). + In this case, your certificate needs to be It is the Base64 encoding of + the following JSON Object which is encoded in UTF-8:

    {
    + "data":"",
    "dataType":"pfx",
    + "password":""
    } + :type certificate_url: str + """ + + _attribute_map = { + 'protocol': {'key': 'protocol', 'type': 'ProtocolTypes'}, + 'certificate_url': {'key': 'certificateUrl', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(WinRMListener, self).__init__(**kwargs) + self.protocol = kwargs.get('protocol', None) + self.certificate_url = kwargs.get('certificate_url', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/_models_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/_models_py3.py new file mode 100644 index 000000000000..8a6625117983 --- /dev/null +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/_models_py3.py @@ -0,0 +1,7097 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model +from msrest.exceptions import HttpOperationError + + +class AdditionalCapabilities(Model): + """Enables or disables a capability on the virtual machine or virtual machine + scale set. + + :param ultra_ssd_enabled: The flag that enables or disables a capability + to have one or more managed data disks with UltraSSD_LRS storage account + type on the VM or VMSS. Managed disks with storage account type + UltraSSD_LRS can be added to a virtual machine or virtual machine scale + set only if this property is enabled. + :type ultra_ssd_enabled: bool + """ + + _attribute_map = { + 'ultra_ssd_enabled': {'key': 'ultraSSDEnabled', 'type': 'bool'}, + } + + def __init__(self, *, ultra_ssd_enabled: bool=None, **kwargs) -> None: + super(AdditionalCapabilities, self).__init__(**kwargs) + self.ultra_ssd_enabled = ultra_ssd_enabled + + +class AdditionalUnattendContent(Model): + """Specifies additional XML formatted information that can be included in the + Unattend.xml file, which is used by Windows Setup. Contents are defined by + setting name, component name, and the pass in which the content is applied. + + :param pass_name: The pass name. Currently, the only allowable value is + OobeSystem. Possible values include: 'OobeSystem' + :type pass_name: str or ~azure.mgmt.compute.v2019_03_01.models.PassNames + :param component_name: The component name. Currently, the only allowable + value is Microsoft-Windows-Shell-Setup. Possible values include: + 'Microsoft-Windows-Shell-Setup' + :type component_name: str or + ~azure.mgmt.compute.v2019_03_01.models.ComponentNames + :param setting_name: Specifies the name of the setting to which the + content applies. Possible values are: FirstLogonCommands and AutoLogon. + Possible values include: 'AutoLogon', 'FirstLogonCommands' + :type setting_name: str or + ~azure.mgmt.compute.v2019_03_01.models.SettingNames + :param content: Specifies the XML formatted content that is added to the + unattend.xml file for the specified path and component. The XML must be + less than 4KB and must include the root element for the setting or feature + that is being inserted. + :type content: str + """ + + _attribute_map = { + 'pass_name': {'key': 'passName', 'type': 'PassNames'}, + 'component_name': {'key': 'componentName', 'type': 'ComponentNames'}, + 'setting_name': {'key': 'settingName', 'type': 'SettingNames'}, + 'content': {'key': 'content', 'type': 'str'}, + } + + def __init__(self, *, pass_name=None, component_name=None, setting_name=None, content: str=None, **kwargs) -> None: + super(AdditionalUnattendContent, self).__init__(**kwargs) + self.pass_name = pass_name + self.component_name = component_name + self.setting_name = setting_name + self.content = content + + +class ApiEntityReference(Model): + """The API entity reference. + + :param id: The ARM resource id in the form of + /subscriptions/{SubscriptionId}/resourceGroups/{ResourceGroupName}/... + :type id: str + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + } + + def __init__(self, *, id: str=None, **kwargs) -> None: + super(ApiEntityReference, self).__init__(**kwargs) + self.id = id + + +class ApiError(Model): + """Api error. + + :param details: The Api error details + :type details: list[~azure.mgmt.compute.v2019_03_01.models.ApiErrorBase] + :param innererror: The Api inner error + :type innererror: ~azure.mgmt.compute.v2019_03_01.models.InnerError + :param code: The error code. + :type code: str + :param target: The target of the particular error. + :type target: str + :param message: The error message. + :type message: str + """ + + _attribute_map = { + 'details': {'key': 'details', 'type': '[ApiErrorBase]'}, + 'innererror': {'key': 'innererror', 'type': 'InnerError'}, + 'code': {'key': 'code', 'type': 'str'}, + 'target': {'key': 'target', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + } + + def __init__(self, *, details=None, innererror=None, code: str=None, target: str=None, message: str=None, **kwargs) -> None: + super(ApiError, self).__init__(**kwargs) + self.details = details + self.innererror = innererror + self.code = code + self.target = target + self.message = message + + +class ApiErrorBase(Model): + """Api error base. + + :param code: The error code. + :type code: str + :param target: The target of the particular error. + :type target: str + :param message: The error message. + :type message: str + """ + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + 'target': {'key': 'target', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + } + + def __init__(self, *, code: str=None, target: str=None, message: str=None, **kwargs) -> None: + super(ApiErrorBase, self).__init__(**kwargs) + self.code = code + self.target = target + self.message = message + + +class AutomaticOSUpgradePolicy(Model): + """The configuration parameters used for performing automatic OS upgrade. + + :param enable_automatic_os_upgrade: Indicates whether OS upgrades should + automatically be applied to scale set instances in a rolling fashion when + a newer version of the OS image becomes available. Default value is false. +

    If this is set to true for Windows based scale sets, + [enableAutomaticUpdates](https://docs.microsoft.com/dotnet/api/microsoft.azure.management.compute.models.windowsconfiguration.enableautomaticupdates?view=azure-dotnet) + is automatically set to false and cannot be set to true. + :type enable_automatic_os_upgrade: bool + :param disable_automatic_rollback: Whether OS image rollback feature + should be disabled. Default value is false. + :type disable_automatic_rollback: bool + """ + + _attribute_map = { + 'enable_automatic_os_upgrade': {'key': 'enableAutomaticOSUpgrade', 'type': 'bool'}, + 'disable_automatic_rollback': {'key': 'disableAutomaticRollback', 'type': 'bool'}, + } + + def __init__(self, *, enable_automatic_os_upgrade: bool=None, disable_automatic_rollback: bool=None, **kwargs) -> None: + super(AutomaticOSUpgradePolicy, self).__init__(**kwargs) + self.enable_automatic_os_upgrade = enable_automatic_os_upgrade + self.disable_automatic_rollback = disable_automatic_rollback + + +class AutomaticOSUpgradeProperties(Model): + """Describes automatic OS upgrade properties on the image. + + All required parameters must be populated in order to send to Azure. + + :param automatic_os_upgrade_supported: Required. Specifies whether + automatic OS upgrade is supported on the image. + :type automatic_os_upgrade_supported: bool + """ + + _validation = { + 'automatic_os_upgrade_supported': {'required': True}, + } + + _attribute_map = { + 'automatic_os_upgrade_supported': {'key': 'automaticOSUpgradeSupported', 'type': 'bool'}, + } + + def __init__(self, *, automatic_os_upgrade_supported: bool, **kwargs) -> None: + super(AutomaticOSUpgradeProperties, self).__init__(**kwargs) + self.automatic_os_upgrade_supported = automatic_os_upgrade_supported + + +class Resource(Model): + """The Resource model definition. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource Id + :vartype id: str + :ivar name: Resource name + :vartype name: str + :ivar type: Resource type + :vartype type: str + :param location: Required. Resource location + :type location: str + :param tags: Resource tags + :type tags: dict[str, str] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__(self, *, location: str, tags=None, **kwargs) -> None: + super(Resource, self).__init__(**kwargs) + self.id = None + self.name = None + self.type = None + self.location = location + self.tags = tags + + +class AvailabilitySet(Resource): + """Specifies information about the availability set that the virtual machine + should be assigned to. Virtual machines specified in the same availability + set are allocated to different nodes to maximize availability. For more + information about availability sets, see [Manage the availability of + virtual + machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-manage-availability?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). +

    For more information on Azure planned maintenance, see [Planned + maintenance for virtual machines in + Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-planned-maintenance?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json) +

    Currently, a VM can only be added to availability set at creation + time. An existing VM cannot be added to an availability set. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource Id + :vartype id: str + :ivar name: Resource name + :vartype name: str + :ivar type: Resource type + :vartype type: str + :param location: Required. Resource location + :type location: str + :param tags: Resource tags + :type tags: dict[str, str] + :param platform_update_domain_count: Update Domain count. + :type platform_update_domain_count: int + :param platform_fault_domain_count: Fault Domain count. + :type platform_fault_domain_count: int + :param virtual_machines: A list of references to all virtual machines in + the availability set. + :type virtual_machines: + list[~azure.mgmt.compute.v2019_03_01.models.SubResource] + :param proximity_placement_group: Specifies information about the + proximity placement group that the availability set should be assigned to. +

    Minimum api-version: 2018-04-01. + :type proximity_placement_group: + ~azure.mgmt.compute.v2019_03_01.models.SubResource + :ivar statuses: The resource status information. + :vartype statuses: + list[~azure.mgmt.compute.v2019_03_01.models.InstanceViewStatus] + :param sku: Sku of the availability set, only name is required to be set. + See AvailabilitySetSkuTypes for possible set of values. Use 'Aligned' for + virtual machines with managed disks and 'Classic' for virtual machines + with unmanaged disks. Default value is 'Classic'. + :type sku: ~azure.mgmt.compute.v2019_03_01.models.Sku + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + 'statuses': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'platform_update_domain_count': {'key': 'properties.platformUpdateDomainCount', 'type': 'int'}, + 'platform_fault_domain_count': {'key': 'properties.platformFaultDomainCount', 'type': 'int'}, + 'virtual_machines': {'key': 'properties.virtualMachines', 'type': '[SubResource]'}, + 'proximity_placement_group': {'key': 'properties.proximityPlacementGroup', 'type': 'SubResource'}, + 'statuses': {'key': 'properties.statuses', 'type': '[InstanceViewStatus]'}, + 'sku': {'key': 'sku', 'type': 'Sku'}, + } + + def __init__(self, *, location: str, tags=None, platform_update_domain_count: int=None, platform_fault_domain_count: int=None, virtual_machines=None, proximity_placement_group=None, sku=None, **kwargs) -> None: + super(AvailabilitySet, self).__init__(location=location, tags=tags, **kwargs) + self.platform_update_domain_count = platform_update_domain_count + self.platform_fault_domain_count = platform_fault_domain_count + self.virtual_machines = virtual_machines + self.proximity_placement_group = proximity_placement_group + self.statuses = None + self.sku = sku + + +class UpdateResource(Model): + """The Update Resource model definition. + + :param tags: Resource tags + :type tags: dict[str, str] + """ + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__(self, *, tags=None, **kwargs) -> None: + super(UpdateResource, self).__init__(**kwargs) + self.tags = tags + + +class AvailabilitySetUpdate(UpdateResource): + """Specifies information about the availability set that the virtual machine + should be assigned to. Only tags may be updated. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :param tags: Resource tags + :type tags: dict[str, str] + :param platform_update_domain_count: Update Domain count. + :type platform_update_domain_count: int + :param platform_fault_domain_count: Fault Domain count. + :type platform_fault_domain_count: int + :param virtual_machines: A list of references to all virtual machines in + the availability set. + :type virtual_machines: + list[~azure.mgmt.compute.v2019_03_01.models.SubResource] + :param proximity_placement_group: Specifies information about the + proximity placement group that the availability set should be assigned to. +

    Minimum api-version: 2018-04-01. + :type proximity_placement_group: + ~azure.mgmt.compute.v2019_03_01.models.SubResource + :ivar statuses: The resource status information. + :vartype statuses: + list[~azure.mgmt.compute.v2019_03_01.models.InstanceViewStatus] + :param sku: Sku of the availability set + :type sku: ~azure.mgmt.compute.v2019_03_01.models.Sku + """ + + _validation = { + 'statuses': {'readonly': True}, + } + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + 'platform_update_domain_count': {'key': 'properties.platformUpdateDomainCount', 'type': 'int'}, + 'platform_fault_domain_count': {'key': 'properties.platformFaultDomainCount', 'type': 'int'}, + 'virtual_machines': {'key': 'properties.virtualMachines', 'type': '[SubResource]'}, + 'proximity_placement_group': {'key': 'properties.proximityPlacementGroup', 'type': 'SubResource'}, + 'statuses': {'key': 'properties.statuses', 'type': '[InstanceViewStatus]'}, + 'sku': {'key': 'sku', 'type': 'Sku'}, + } + + def __init__(self, *, tags=None, platform_update_domain_count: int=None, platform_fault_domain_count: int=None, virtual_machines=None, proximity_placement_group=None, sku=None, **kwargs) -> None: + super(AvailabilitySetUpdate, self).__init__(tags=tags, **kwargs) + self.platform_update_domain_count = platform_update_domain_count + self.platform_fault_domain_count = platform_fault_domain_count + self.virtual_machines = virtual_machines + self.proximity_placement_group = proximity_placement_group + self.statuses = None + self.sku = sku + + +class BootDiagnostics(Model): + """Boot Diagnostics is a debugging feature which allows you to view Console + Output and Screenshot to diagnose VM status.

    You can easily view + the output of your console log.

    Azure also enables you to see a + screenshot of the VM from the hypervisor. + + :param enabled: Whether boot diagnostics should be enabled on the Virtual + Machine. + :type enabled: bool + :param storage_uri: Uri of the storage account to use for placing the + console output and screenshot. + :type storage_uri: str + """ + + _attribute_map = { + 'enabled': {'key': 'enabled', 'type': 'bool'}, + 'storage_uri': {'key': 'storageUri', 'type': 'str'}, + } + + def __init__(self, *, enabled: bool=None, storage_uri: str=None, **kwargs) -> None: + super(BootDiagnostics, self).__init__(**kwargs) + self.enabled = enabled + self.storage_uri = storage_uri + + +class BootDiagnosticsInstanceView(Model): + """The instance view of a virtual machine boot diagnostics. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar console_screenshot_blob_uri: The console screenshot blob URI. + :vartype console_screenshot_blob_uri: str + :ivar serial_console_log_blob_uri: The Linux serial console log blob Uri. + :vartype serial_console_log_blob_uri: str + :ivar status: The boot diagnostics status information for the VM.

    + NOTE: It will be set only if there are errors encountered in enabling boot + diagnostics. + :vartype status: ~azure.mgmt.compute.v2019_03_01.models.InstanceViewStatus + """ + + _validation = { + 'console_screenshot_blob_uri': {'readonly': True}, + 'serial_console_log_blob_uri': {'readonly': True}, + 'status': {'readonly': True}, + } + + _attribute_map = { + 'console_screenshot_blob_uri': {'key': 'consoleScreenshotBlobUri', 'type': 'str'}, + 'serial_console_log_blob_uri': {'key': 'serialConsoleLogBlobUri', 'type': 'str'}, + 'status': {'key': 'status', 'type': 'InstanceViewStatus'}, + } + + def __init__(self, **kwargs) -> None: + super(BootDiagnosticsInstanceView, self).__init__(**kwargs) + self.console_screenshot_blob_uri = None + self.serial_console_log_blob_uri = None + self.status = None + + +class CloudError(Model): + """An error response from the Gallery service. + + :param error: + :type error: ~azure.mgmt.compute.v2019_03_01.models.ApiError + """ + + _attribute_map = { + 'error': {'key': 'error', 'type': 'ApiError'}, + } + + def __init__(self, *, error=None, **kwargs) -> None: + super(CloudError, self).__init__(**kwargs) + self.error = error + + +class CloudErrorException(HttpOperationError): + """Server responsed with exception of type: 'CloudError'. + + :param deserialize: A deserializer + :param response: Server response to be deserialized. + """ + + def __init__(self, deserialize, response, *args): + + super(CloudErrorException, self).__init__(deserialize, response, 'CloudError', *args) + + +class ComputeOperationValue(Model): + """Describes the properties of a Compute Operation value. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar origin: The origin of the compute operation. + :vartype origin: str + :ivar name: The name of the compute operation. + :vartype name: str + :ivar operation: The display name of the compute operation. + :vartype operation: str + :ivar resource: The display name of the resource the operation applies to. + :vartype resource: str + :ivar description: The description of the operation. + :vartype description: str + :ivar provider: The resource provider for the operation. + :vartype provider: str + """ + + _validation = { + 'origin': {'readonly': True}, + 'name': {'readonly': True}, + 'operation': {'readonly': True}, + 'resource': {'readonly': True}, + 'description': {'readonly': True}, + 'provider': {'readonly': True}, + } + + _attribute_map = { + 'origin': {'key': 'origin', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'operation': {'key': 'display.operation', 'type': 'str'}, + 'resource': {'key': 'display.resource', 'type': 'str'}, + 'description': {'key': 'display.description', 'type': 'str'}, + 'provider': {'key': 'display.provider', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(ComputeOperationValue, self).__init__(**kwargs) + self.origin = None + self.name = None + self.operation = None + self.resource = None + self.description = None + self.provider = None + + +class DataDisk(Model): + """Describes a data disk. + + All required parameters must be populated in order to send to Azure. + + :param lun: Required. Specifies the logical unit number of the data disk. + This value is used to identify data disks within the VM and therefore must + be unique for each data disk attached to a VM. + :type lun: int + :param name: The disk name. + :type name: str + :param vhd: The virtual hard disk. + :type vhd: ~azure.mgmt.compute.v2019_03_01.models.VirtualHardDisk + :param image: The source user image virtual hard disk. The virtual hard + disk will be copied before being attached to the virtual machine. If + SourceImage is provided, the destination virtual hard drive must not + exist. + :type image: ~azure.mgmt.compute.v2019_03_01.models.VirtualHardDisk + :param caching: Specifies the caching requirements.

    Possible + values are:

    **None**

    **ReadOnly**

    **ReadWrite** +

    Default: **None for Standard storage. ReadOnly for Premium + storage**. Possible values include: 'None', 'ReadOnly', 'ReadWrite' + :type caching: str or ~azure.mgmt.compute.v2019_03_01.models.CachingTypes + :param write_accelerator_enabled: Specifies whether writeAccelerator + should be enabled or disabled on the disk. + :type write_accelerator_enabled: bool + :param create_option: Required. Specifies how the virtual machine should + be created.

    Possible values are:

    **Attach** \\u2013 This + value is used when you are using a specialized disk to create the virtual + machine.

    **FromImage** \\u2013 This value is used when you are + using an image to create the virtual machine. If you are using a platform + image, you also use the imageReference element described above. If you are + using a marketplace image, you also use the plan element previously + described. Possible values include: 'FromImage', 'Empty', 'Attach' + :type create_option: str or + ~azure.mgmt.compute.v2019_03_01.models.DiskCreateOptionTypes + :param disk_size_gb: Specifies the size of an empty data disk in + gigabytes. This element can be used to overwrite the size of the disk in a + virtual machine image.

    This value cannot be larger than 1023 GB + :type disk_size_gb: int + :param managed_disk: The managed disk parameters. + :type managed_disk: + ~azure.mgmt.compute.v2019_03_01.models.ManagedDiskParameters + :param to_be_detached: Specifies whether the data disk is in process of + detachment from the VirtualMachine/VirtualMachineScaleset + :type to_be_detached: bool + """ + + _validation = { + 'lun': {'required': True}, + 'create_option': {'required': True}, + } + + _attribute_map = { + 'lun': {'key': 'lun', 'type': 'int'}, + 'name': {'key': 'name', 'type': 'str'}, + 'vhd': {'key': 'vhd', 'type': 'VirtualHardDisk'}, + 'image': {'key': 'image', 'type': 'VirtualHardDisk'}, + 'caching': {'key': 'caching', 'type': 'CachingTypes'}, + 'write_accelerator_enabled': {'key': 'writeAcceleratorEnabled', 'type': 'bool'}, + 'create_option': {'key': 'createOption', 'type': 'str'}, + 'disk_size_gb': {'key': 'diskSizeGB', 'type': 'int'}, + 'managed_disk': {'key': 'managedDisk', 'type': 'ManagedDiskParameters'}, + 'to_be_detached': {'key': 'toBeDetached', 'type': 'bool'}, + } + + def __init__(self, *, lun: int, create_option, name: str=None, vhd=None, image=None, caching=None, write_accelerator_enabled: bool=None, disk_size_gb: int=None, managed_disk=None, to_be_detached: bool=None, **kwargs) -> None: + super(DataDisk, self).__init__(**kwargs) + self.lun = lun + self.name = name + self.vhd = vhd + self.image = image + self.caching = caching + self.write_accelerator_enabled = write_accelerator_enabled + self.create_option = create_option + self.disk_size_gb = disk_size_gb + self.managed_disk = managed_disk + self.to_be_detached = to_be_detached + + +class DataDiskImage(Model): + """Contains the data disk images information. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar lun: Specifies the logical unit number of the data disk. This value + is used to identify data disks within the VM and therefore must be unique + for each data disk attached to a VM. + :vartype lun: int + """ + + _validation = { + 'lun': {'readonly': True}, + } + + _attribute_map = { + 'lun': {'key': 'lun', 'type': 'int'}, + } + + def __init__(self, **kwargs) -> None: + super(DataDiskImage, self).__init__(**kwargs) + self.lun = None + + +class DedicatedHost(Resource): + """Specifies information about the Dedicated host. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource Id + :vartype id: str + :ivar name: Resource name + :vartype name: str + :ivar type: Resource type + :vartype type: str + :param location: Required. Resource location + :type location: str + :param tags: Resource tags + :type tags: dict[str, str] + :param platform_fault_domain: Fault domain of the dedicated host within a + dedicated host group. + :type platform_fault_domain: int + :param auto_replace_on_failure: Specifies whether the dedicated host + should be replaced automatically in case of a failure. The value is + defaulted to 'true' when not provided. + :type auto_replace_on_failure: bool + :ivar host_id: A unique id generated and assigned to the dedicated host by + the platform.

    Does not change throughout the lifetime of the + host. + :vartype host_id: str + :ivar virtual_machines: A list of references to all virtual machines in + the Dedicated Host. + :vartype virtual_machines: + list[~azure.mgmt.compute.v2019_03_01.models.SubResourceReadOnly] + :param license_type: Specifies the software license type that will be + applied to the VMs deployed on the dedicated host.

    Possible + values are:

    **None**

    **Windows_Server_Hybrid**

    + **Windows_Server_Perpetual**

    Default: **None**. Possible values + include: 'None', 'Windows_Server_Hybrid', 'Windows_Server_Perpetual' + :type license_type: str or + ~azure.mgmt.compute.v2019_03_01.models.DedicatedHostLicenseTypes + :ivar provisioning_time: The date when the host was first provisioned. + :vartype provisioning_time: datetime + :ivar provisioning_state: The provisioning state, which only appears in + the response. + :vartype provisioning_state: str + :ivar instance_view: The dedicated host instance view. + :vartype instance_view: + ~azure.mgmt.compute.v2019_03_01.models.DedicatedHostInstanceView + :param sku: Required. SKU of the dedicated host for Hardware Generation + and VM family. Only name is required to be set. List Microsoft.Compute + SKUs for a list of possible values. + :type sku: ~azure.mgmt.compute.v2019_03_01.models.Sku + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + 'platform_fault_domain': {'maximum': 2, 'minimum': 0}, + 'host_id': {'readonly': True}, + 'virtual_machines': {'readonly': True}, + 'provisioning_time': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + 'instance_view': {'readonly': True}, + 'sku': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'platform_fault_domain': {'key': 'properties.platformFaultDomain', 'type': 'int'}, + 'auto_replace_on_failure': {'key': 'properties.autoReplaceOnFailure', 'type': 'bool'}, + 'host_id': {'key': 'properties.hostId', 'type': 'str'}, + 'virtual_machines': {'key': 'properties.virtualMachines', 'type': '[SubResourceReadOnly]'}, + 'license_type': {'key': 'properties.licenseType', 'type': 'DedicatedHostLicenseTypes'}, + 'provisioning_time': {'key': 'properties.provisioningTime', 'type': 'iso-8601'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'instance_view': {'key': 'properties.instanceView', 'type': 'DedicatedHostInstanceView'}, + 'sku': {'key': 'sku', 'type': 'Sku'}, + } + + def __init__(self, *, location: str, sku, tags=None, platform_fault_domain: int=None, auto_replace_on_failure: bool=None, license_type=None, **kwargs) -> None: + super(DedicatedHost, self).__init__(location=location, tags=tags, **kwargs) + self.platform_fault_domain = platform_fault_domain + self.auto_replace_on_failure = auto_replace_on_failure + self.host_id = None + self.virtual_machines = None + self.license_type = license_type + self.provisioning_time = None + self.provisioning_state = None + self.instance_view = None + self.sku = sku + + +class DedicatedHostAllocatableVM(Model): + """Represents the dedicated host unutilized capacity in terms of a specific VM + size. + + :param vm_size: VM size in terms of which the unutilized capacity is + represented. + :type vm_size: str + :param count: Maximum number of VMs of size vmSize that can fit in the + dedicated host's remaining capacity. + :type count: float + """ + + _attribute_map = { + 'vm_size': {'key': 'vmSize', 'type': 'str'}, + 'count': {'key': 'count', 'type': 'float'}, + } + + def __init__(self, *, vm_size: str=None, count: float=None, **kwargs) -> None: + super(DedicatedHostAllocatableVM, self).__init__(**kwargs) + self.vm_size = vm_size + self.count = count + + +class DedicatedHostAvailableCapacity(Model): + """Dedicated host unutilized capacity. + + :param allocatable_vms: The unutilized capacity of the dedicated host + represented in terms of each VM size that is allowed to be deployed to the + dedicated host. + :type allocatable_vms: + list[~azure.mgmt.compute.v2019_03_01.models.DedicatedHostAllocatableVM] + """ + + _attribute_map = { + 'allocatable_vms': {'key': 'allocatableVMs', 'type': '[DedicatedHostAllocatableVM]'}, + } + + def __init__(self, *, allocatable_vms=None, **kwargs) -> None: + super(DedicatedHostAvailableCapacity, self).__init__(**kwargs) + self.allocatable_vms = allocatable_vms + + +class DedicatedHostGroup(Resource): + """Specifies information about the dedicated host group that the dedicated + hosts should be assigned to.

    Currently, a dedicated host can only + be added to a dedicated host group at creation time. An existing dedicated + host cannot be added to another dedicated host group. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource Id + :vartype id: str + :ivar name: Resource name + :vartype name: str + :ivar type: Resource type + :vartype type: str + :param location: Required. Resource location + :type location: str + :param tags: Resource tags + :type tags: dict[str, str] + :param platform_fault_domain_count: Required. Number of fault domains that + the host group can span. + :type platform_fault_domain_count: int + :ivar hosts: A list of references to all dedicated hosts in the dedicated + host group. + :vartype hosts: + list[~azure.mgmt.compute.v2019_03_01.models.SubResourceReadOnly] + :param zones: Availability Zone to use for this host group � only single + zone is supported. The zone can be assigned only during creation. If not + provided, the group supports all zones in the region. If provided, + enforces each host in the group to be in the same zone. + :type zones: list[str] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + 'platform_fault_domain_count': {'required': True, 'maximum': 3, 'minimum': 1}, + 'hosts': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'platform_fault_domain_count': {'key': 'properties.platformFaultDomainCount', 'type': 'int'}, + 'hosts': {'key': 'properties.hosts', 'type': '[SubResourceReadOnly]'}, + 'zones': {'key': 'zones', 'type': '[str]'}, + } + + def __init__(self, *, location: str, platform_fault_domain_count: int, tags=None, zones=None, **kwargs) -> None: + super(DedicatedHostGroup, self).__init__(location=location, tags=tags, **kwargs) + self.platform_fault_domain_count = platform_fault_domain_count + self.hosts = None + self.zones = zones + + +class DedicatedHostGroupUpdate(UpdateResource): + """Specifies information about the dedicated host group that the dedicated + host should be assigned to. Only tags may be updated. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :param tags: Resource tags + :type tags: dict[str, str] + :param platform_fault_domain_count: Required. Number of fault domains that + the host group can span. + :type platform_fault_domain_count: int + :ivar hosts: A list of references to all dedicated hosts in the dedicated + host group. + :vartype hosts: + list[~azure.mgmt.compute.v2019_03_01.models.SubResourceReadOnly] + :param zones: Availability Zone to use for this host group � only single + zone is supported. The zone can be assigned only during creation. If not + provided, the group supports all zones in the region. If provided, + enforces each host in the group to be in the same zone. + :type zones: list[str] + """ + + _validation = { + 'platform_fault_domain_count': {'required': True, 'maximum': 3, 'minimum': 1}, + 'hosts': {'readonly': True}, + } + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + 'platform_fault_domain_count': {'key': 'properties.platformFaultDomainCount', 'type': 'int'}, + 'hosts': {'key': 'properties.hosts', 'type': '[SubResourceReadOnly]'}, + 'zones': {'key': 'zones', 'type': '[str]'}, + } + + def __init__(self, *, platform_fault_domain_count: int, tags=None, zones=None, **kwargs) -> None: + super(DedicatedHostGroupUpdate, self).__init__(tags=tags, **kwargs) + self.platform_fault_domain_count = platform_fault_domain_count + self.hosts = None + self.zones = zones + + +class DedicatedHostInstanceView(Model): + """The instance view of a dedicated host. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar asset_id: Specifies the unique id of the dedicated physical machine + on which the dedicated host resides. + :vartype asset_id: str + :param available_capacity: Unutilized capacity of the dedicated host. + :type available_capacity: + ~azure.mgmt.compute.v2019_03_01.models.DedicatedHostAvailableCapacity + :param statuses: The resource status information. + :type statuses: + list[~azure.mgmt.compute.v2019_03_01.models.InstanceViewStatus] + """ + + _validation = { + 'asset_id': {'readonly': True}, + } + + _attribute_map = { + 'asset_id': {'key': 'assetId', 'type': 'str'}, + 'available_capacity': {'key': 'availableCapacity', 'type': 'DedicatedHostAvailableCapacity'}, + 'statuses': {'key': 'statuses', 'type': '[InstanceViewStatus]'}, + } + + def __init__(self, *, available_capacity=None, statuses=None, **kwargs) -> None: + super(DedicatedHostInstanceView, self).__init__(**kwargs) + self.asset_id = None + self.available_capacity = available_capacity + self.statuses = statuses + + +class DedicatedHostUpdate(UpdateResource): + """Specifies information about the dedicated host. Only tags, + autoReplaceOnFailure and licenseType may be updated. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :param tags: Resource tags + :type tags: dict[str, str] + :param platform_fault_domain: Fault domain of the dedicated host within a + dedicated host group. + :type platform_fault_domain: int + :param auto_replace_on_failure: Specifies whether the dedicated host + should be replaced automatically in case of a failure. The value is + defaulted to 'true' when not provided. + :type auto_replace_on_failure: bool + :ivar host_id: A unique id generated and assigned to the dedicated host by + the platform.

    Does not change throughout the lifetime of the + host. + :vartype host_id: str + :ivar virtual_machines: A list of references to all virtual machines in + the Dedicated Host. + :vartype virtual_machines: + list[~azure.mgmt.compute.v2019_03_01.models.SubResourceReadOnly] + :param license_type: Specifies the software license type that will be + applied to the VMs deployed on the dedicated host.

    Possible + values are:

    **None**

    **Windows_Server_Hybrid**

    + **Windows_Server_Perpetual**

    Default: **None**. Possible values + include: 'None', 'Windows_Server_Hybrid', 'Windows_Server_Perpetual' + :type license_type: str or + ~azure.mgmt.compute.v2019_03_01.models.DedicatedHostLicenseTypes + :ivar provisioning_time: The date when the host was first provisioned. + :vartype provisioning_time: datetime + :ivar provisioning_state: The provisioning state, which only appears in + the response. + :vartype provisioning_state: str + :ivar instance_view: The dedicated host instance view. + :vartype instance_view: + ~azure.mgmt.compute.v2019_03_01.models.DedicatedHostInstanceView + """ + + _validation = { + 'platform_fault_domain': {'maximum': 2, 'minimum': 0}, + 'host_id': {'readonly': True}, + 'virtual_machines': {'readonly': True}, + 'provisioning_time': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + 'instance_view': {'readonly': True}, + } + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + 'platform_fault_domain': {'key': 'properties.platformFaultDomain', 'type': 'int'}, + 'auto_replace_on_failure': {'key': 'properties.autoReplaceOnFailure', 'type': 'bool'}, + 'host_id': {'key': 'properties.hostId', 'type': 'str'}, + 'virtual_machines': {'key': 'properties.virtualMachines', 'type': '[SubResourceReadOnly]'}, + 'license_type': {'key': 'properties.licenseType', 'type': 'DedicatedHostLicenseTypes'}, + 'provisioning_time': {'key': 'properties.provisioningTime', 'type': 'iso-8601'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'instance_view': {'key': 'properties.instanceView', 'type': 'DedicatedHostInstanceView'}, + } + + def __init__(self, *, tags=None, platform_fault_domain: int=None, auto_replace_on_failure: bool=None, license_type=None, **kwargs) -> None: + super(DedicatedHostUpdate, self).__init__(tags=tags, **kwargs) + self.platform_fault_domain = platform_fault_domain + self.auto_replace_on_failure = auto_replace_on_failure + self.host_id = None + self.virtual_machines = None + self.license_type = license_type + self.provisioning_time = None + self.provisioning_state = None + self.instance_view = None + + +class DiagnosticsProfile(Model): + """Specifies the boot diagnostic settings state.

    Minimum api-version: + 2015-06-15. + + :param boot_diagnostics: Boot Diagnostics is a debugging feature which + allows you to view Console Output and Screenshot to diagnose VM status. +

    You can easily view the output of your console log.

    + Azure also enables you to see a screenshot of the VM from the hypervisor. + :type boot_diagnostics: + ~azure.mgmt.compute.v2019_03_01.models.BootDiagnostics + """ + + _attribute_map = { + 'boot_diagnostics': {'key': 'bootDiagnostics', 'type': 'BootDiagnostics'}, + } + + def __init__(self, *, boot_diagnostics=None, **kwargs) -> None: + super(DiagnosticsProfile, self).__init__(**kwargs) + self.boot_diagnostics = boot_diagnostics + + +class DiffDiskSettings(Model): + """Describes the parameters of ephemeral disk settings that can be specified + for operating system disk.

    NOTE: The ephemeral disk settings can + only be specified for managed disk. + + :param option: Specifies the ephemeral disk settings for operating system + disk. Possible values include: 'Local' + :type option: str or + ~azure.mgmt.compute.v2019_03_01.models.DiffDiskOptions + """ + + _attribute_map = { + 'option': {'key': 'option', 'type': 'str'}, + } + + def __init__(self, *, option=None, **kwargs) -> None: + super(DiffDiskSettings, self).__init__(**kwargs) + self.option = option + + +class Disallowed(Model): + """Describes the disallowed disk types. + + :param disk_types: A list of disk types. + :type disk_types: list[str] + """ + + _attribute_map = { + 'disk_types': {'key': 'diskTypes', 'type': '[str]'}, + } + + def __init__(self, *, disk_types=None, **kwargs) -> None: + super(Disallowed, self).__init__(**kwargs) + self.disk_types = disk_types + + +class DiskEncryptionSettings(Model): + """Describes a Encryption Settings for a Disk. + + :param disk_encryption_key: Specifies the location of the disk encryption + key, which is a Key Vault Secret. + :type disk_encryption_key: + ~azure.mgmt.compute.v2019_03_01.models.KeyVaultSecretReference + :param key_encryption_key: Specifies the location of the key encryption + key in Key Vault. + :type key_encryption_key: + ~azure.mgmt.compute.v2019_03_01.models.KeyVaultKeyReference + :param enabled: Specifies whether disk encryption should be enabled on the + virtual machine. + :type enabled: bool + """ + + _attribute_map = { + 'disk_encryption_key': {'key': 'diskEncryptionKey', 'type': 'KeyVaultSecretReference'}, + 'key_encryption_key': {'key': 'keyEncryptionKey', 'type': 'KeyVaultKeyReference'}, + 'enabled': {'key': 'enabled', 'type': 'bool'}, + } + + def __init__(self, *, disk_encryption_key=None, key_encryption_key=None, enabled: bool=None, **kwargs) -> None: + super(DiskEncryptionSettings, self).__init__(**kwargs) + self.disk_encryption_key = disk_encryption_key + self.key_encryption_key = key_encryption_key + self.enabled = enabled + + +class DiskInstanceView(Model): + """The instance view of the disk. + + :param name: The disk name. + :type name: str + :param encryption_settings: Specifies the encryption settings for the OS + Disk.

    Minimum api-version: 2015-06-15 + :type encryption_settings: + list[~azure.mgmt.compute.v2019_03_01.models.DiskEncryptionSettings] + :param statuses: The resource status information. + :type statuses: + list[~azure.mgmt.compute.v2019_03_01.models.InstanceViewStatus] + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'encryption_settings': {'key': 'encryptionSettings', 'type': '[DiskEncryptionSettings]'}, + 'statuses': {'key': 'statuses', 'type': '[InstanceViewStatus]'}, + } + + def __init__(self, *, name: str=None, encryption_settings=None, statuses=None, **kwargs) -> None: + super(DiskInstanceView, self).__init__(**kwargs) + self.name = name + self.encryption_settings = encryption_settings + self.statuses = statuses + + +class Gallery(Resource): + """Specifies information about the Shared Image Gallery that you want to + create or update. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource Id + :vartype id: str + :ivar name: Resource name + :vartype name: str + :ivar type: Resource type + :vartype type: str + :param location: Required. Resource location + :type location: str + :param tags: Resource tags + :type tags: dict[str, str] + :param description: The description of this Shared Image Gallery resource. + This property is updatable. + :type description: str + :param identifier: + :type identifier: ~azure.mgmt.compute.v2019_03_01.models.GalleryIdentifier + :ivar provisioning_state: The current state of the gallery. The + provisioning state, which only appears in the response. Possible values + include: 'Creating', 'Updating', 'Failed', 'Succeeded', 'Deleting', + 'Migrating' + :vartype provisioning_state: str or + ~azure.mgmt.compute.v2019_03_01.models.enum + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'identifier': {'key': 'properties.identifier', 'type': 'GalleryIdentifier'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + } + + def __init__(self, *, location: str, tags=None, description: str=None, identifier=None, **kwargs) -> None: + super(Gallery, self).__init__(location=location, tags=tags, **kwargs) + self.description = description + self.identifier = identifier + self.provisioning_state = None + + +class GalleryApplication(Resource): + """Specifies information about the gallery Application Definition that you + want to create or update. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource Id + :vartype id: str + :ivar name: Resource name + :vartype name: str + :ivar type: Resource type + :vartype type: str + :param location: Required. Resource location + :type location: str + :param tags: Resource tags + :type tags: dict[str, str] + :param description: The description of this gallery Application Definition + resource. This property is updatable. + :type description: str + :param eula: The Eula agreement for the gallery Application Definition. + :type eula: str + :param privacy_statement_uri: The privacy statement uri. + :type privacy_statement_uri: str + :param release_note_uri: The release note uri. + :type release_note_uri: str + :param end_of_life_date: The end of life date of the gallery Application + Definition. This property can be used for decommissioning purposes. This + property is updatable. + :type end_of_life_date: datetime + :param supported_os_type: Required. This property allows you to specify + the supported type of the OS that application is built for.

    + Possible values are:

    **Windows**

    **Linux**. Possible + values include: 'Windows', 'Linux' + :type supported_os_type: str or + ~azure.mgmt.compute.v2019_03_01.models.OperatingSystemTypes + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + 'supported_os_type': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'eula': {'key': 'properties.eula', 'type': 'str'}, + 'privacy_statement_uri': {'key': 'properties.privacyStatementUri', 'type': 'str'}, + 'release_note_uri': {'key': 'properties.releaseNoteUri', 'type': 'str'}, + 'end_of_life_date': {'key': 'properties.endOfLifeDate', 'type': 'iso-8601'}, + 'supported_os_type': {'key': 'properties.supportedOSType', 'type': 'OperatingSystemTypes'}, + } + + def __init__(self, *, location: str, supported_os_type, tags=None, description: str=None, eula: str=None, privacy_statement_uri: str=None, release_note_uri: str=None, end_of_life_date=None, **kwargs) -> None: + super(GalleryApplication, self).__init__(location=location, tags=tags, **kwargs) + self.description = description + self.eula = eula + self.privacy_statement_uri = privacy_statement_uri + self.release_note_uri = release_note_uri + self.end_of_life_date = end_of_life_date + self.supported_os_type = supported_os_type + + +class GalleryApplicationVersion(Resource): + """Specifies information about the gallery Application Version that you want + to create or update. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource Id + :vartype id: str + :ivar name: Resource name + :vartype name: str + :ivar type: Resource type + :vartype type: str + :param location: Required. Resource location + :type location: str + :param tags: Resource tags + :type tags: dict[str, str] + :param publishing_profile: Required. + :type publishing_profile: + ~azure.mgmt.compute.v2019_03_01.models.GalleryApplicationVersionPublishingProfile + :ivar provisioning_state: The current state of the gallery Application + Version. The provisioning state, which only appears in the response. + Possible values include: 'Creating', 'Updating', 'Failed', 'Succeeded', + 'Deleting', 'Migrating' + :vartype provisioning_state: str or + ~azure.mgmt.compute.v2019_03_01.models.enum + :ivar replication_status: + :vartype replication_status: + ~azure.mgmt.compute.v2019_03_01.models.ReplicationStatus + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + 'publishing_profile': {'required': True}, + 'provisioning_state': {'readonly': True}, + 'replication_status': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'publishing_profile': {'key': 'properties.publishingProfile', 'type': 'GalleryApplicationVersionPublishingProfile'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'replication_status': {'key': 'properties.replicationStatus', 'type': 'ReplicationStatus'}, + } + + def __init__(self, *, location: str, publishing_profile, tags=None, **kwargs) -> None: + super(GalleryApplicationVersion, self).__init__(location=location, tags=tags, **kwargs) + self.publishing_profile = publishing_profile + self.provisioning_state = None + self.replication_status = None + + +class GalleryArtifactPublishingProfileBase(Model): + """Describes the basic gallery artifact publishing profile. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :param target_regions: The target regions where the Image Version is going + to be replicated to. This property is updatable. + :type target_regions: + list[~azure.mgmt.compute.v2019_03_01.models.TargetRegion] + :param replica_count: The number of replicas of the Image Version to be + created per region. This property would take effect for a region when + regionalReplicaCount is not specified. This property is updatable. + :type replica_count: int + :param exclude_from_latest: If set to true, Virtual Machines deployed from + the latest version of the Image Definition won't use this Image Version. + :type exclude_from_latest: bool + :ivar published_date: The timestamp for when the gallery Image Version is + published. + :vartype published_date: datetime + :param end_of_life_date: The end of life date of the gallery Image + Version. This property can be used for decommissioning purposes. This + property is updatable. + :type end_of_life_date: datetime + :param storage_account_type: Specifies the storage account type to be used + to store the image. This property is not updatable. Possible values + include: 'Standard_LRS', 'Standard_ZRS' + :type storage_account_type: str or + ~azure.mgmt.compute.v2019_03_01.models.StorageAccountType + """ + + _validation = { + 'published_date': {'readonly': True}, + } + + _attribute_map = { + 'target_regions': {'key': 'targetRegions', 'type': '[TargetRegion]'}, + 'replica_count': {'key': 'replicaCount', 'type': 'int'}, + 'exclude_from_latest': {'key': 'excludeFromLatest', 'type': 'bool'}, + 'published_date': {'key': 'publishedDate', 'type': 'iso-8601'}, + 'end_of_life_date': {'key': 'endOfLifeDate', 'type': 'iso-8601'}, + 'storage_account_type': {'key': 'storageAccountType', 'type': 'str'}, + } + + def __init__(self, *, target_regions=None, replica_count: int=None, exclude_from_latest: bool=None, end_of_life_date=None, storage_account_type=None, **kwargs) -> None: + super(GalleryArtifactPublishingProfileBase, self).__init__(**kwargs) + self.target_regions = target_regions + self.replica_count = replica_count + self.exclude_from_latest = exclude_from_latest + self.published_date = None + self.end_of_life_date = end_of_life_date + self.storage_account_type = storage_account_type + + +class GalleryApplicationVersionPublishingProfile(GalleryArtifactPublishingProfileBase): + """The publishing profile of a gallery Image Version. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :param target_regions: The target regions where the Image Version is going + to be replicated to. This property is updatable. + :type target_regions: + list[~azure.mgmt.compute.v2019_03_01.models.TargetRegion] + :param replica_count: The number of replicas of the Image Version to be + created per region. This property would take effect for a region when + regionalReplicaCount is not specified. This property is updatable. + :type replica_count: int + :param exclude_from_latest: If set to true, Virtual Machines deployed from + the latest version of the Image Definition won't use this Image Version. + :type exclude_from_latest: bool + :ivar published_date: The timestamp for when the gallery Image Version is + published. + :vartype published_date: datetime + :param end_of_life_date: The end of life date of the gallery Image + Version. This property can be used for decommissioning purposes. This + property is updatable. + :type end_of_life_date: datetime + :param storage_account_type: Specifies the storage account type to be used + to store the image. This property is not updatable. Possible values + include: 'Standard_LRS', 'Standard_ZRS' + :type storage_account_type: str or + ~azure.mgmt.compute.v2019_03_01.models.StorageAccountType + :param source: Required. + :type source: ~azure.mgmt.compute.v2019_03_01.models.UserArtifactSource + :param content_type: Optional. May be used to help process this file. The + type of file contained in the source, e.g. zip, json, etc. + :type content_type: str + :param enable_health_check: Optional. Whether or not this application + reports health. + :type enable_health_check: bool + """ + + _validation = { + 'published_date': {'readonly': True}, + 'source': {'required': True}, + } + + _attribute_map = { + 'target_regions': {'key': 'targetRegions', 'type': '[TargetRegion]'}, + 'replica_count': {'key': 'replicaCount', 'type': 'int'}, + 'exclude_from_latest': {'key': 'excludeFromLatest', 'type': 'bool'}, + 'published_date': {'key': 'publishedDate', 'type': 'iso-8601'}, + 'end_of_life_date': {'key': 'endOfLifeDate', 'type': 'iso-8601'}, + 'storage_account_type': {'key': 'storageAccountType', 'type': 'str'}, + 'source': {'key': 'source', 'type': 'UserArtifactSource'}, + 'content_type': {'key': 'contentType', 'type': 'str'}, + 'enable_health_check': {'key': 'enableHealthCheck', 'type': 'bool'}, + } + + def __init__(self, *, source, target_regions=None, replica_count: int=None, exclude_from_latest: bool=None, end_of_life_date=None, storage_account_type=None, content_type: str=None, enable_health_check: bool=None, **kwargs) -> None: + super(GalleryApplicationVersionPublishingProfile, self).__init__(target_regions=target_regions, replica_count=replica_count, exclude_from_latest=exclude_from_latest, end_of_life_date=end_of_life_date, storage_account_type=storage_account_type, **kwargs) + self.source = source + self.content_type = content_type + self.enable_health_check = enable_health_check + + +class GalleryArtifactSource(Model): + """The source image from which the Image Version is going to be created. + + All required parameters must be populated in order to send to Azure. + + :param managed_image: Required. + :type managed_image: + ~azure.mgmt.compute.v2019_03_01.models.ManagedArtifact + """ + + _validation = { + 'managed_image': {'required': True}, + } + + _attribute_map = { + 'managed_image': {'key': 'managedImage', 'type': 'ManagedArtifact'}, + } + + def __init__(self, *, managed_image, **kwargs) -> None: + super(GalleryArtifactSource, self).__init__(**kwargs) + self.managed_image = managed_image + + +class GalleryDiskImage(Model): + """This is the disk image base class. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar size_in_gb: This property indicates the size of the VHD to be + created. + :vartype size_in_gb: int + :ivar host_caching: The host caching of the disk. Valid values are 'None', + 'ReadOnly', and 'ReadWrite'. Possible values include: 'None', 'ReadOnly', + 'ReadWrite' + :vartype host_caching: str or + ~azure.mgmt.compute.v2019_03_01.models.HostCaching + """ + + _validation = { + 'size_in_gb': {'readonly': True}, + 'host_caching': {'readonly': True}, + } + + _attribute_map = { + 'size_in_gb': {'key': 'sizeInGB', 'type': 'int'}, + 'host_caching': {'key': 'hostCaching', 'type': 'HostCaching'}, + } + + def __init__(self, **kwargs) -> None: + super(GalleryDiskImage, self).__init__(**kwargs) + self.size_in_gb = None + self.host_caching = None + + +class GalleryDataDiskImage(GalleryDiskImage): + """This is the data disk image. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar size_in_gb: This property indicates the size of the VHD to be + created. + :vartype size_in_gb: int + :ivar host_caching: The host caching of the disk. Valid values are 'None', + 'ReadOnly', and 'ReadWrite'. Possible values include: 'None', 'ReadOnly', + 'ReadWrite' + :vartype host_caching: str or + ~azure.mgmt.compute.v2019_03_01.models.HostCaching + :ivar lun: This property specifies the logical unit number of the data + disk. This value is used to identify data disks within the Virtual Machine + and therefore must be unique for each data disk attached to the Virtual + Machine. + :vartype lun: int + """ + + _validation = { + 'size_in_gb': {'readonly': True}, + 'host_caching': {'readonly': True}, + 'lun': {'readonly': True}, + } + + _attribute_map = { + 'size_in_gb': {'key': 'sizeInGB', 'type': 'int'}, + 'host_caching': {'key': 'hostCaching', 'type': 'HostCaching'}, + 'lun': {'key': 'lun', 'type': 'int'}, + } + + def __init__(self, **kwargs) -> None: + super(GalleryDataDiskImage, self).__init__(**kwargs) + self.lun = None + + +class GalleryIdentifier(Model): + """Describes the gallery unique name. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar unique_name: The unique name of the Shared Image Gallery. This name + is generated automatically by Azure. + :vartype unique_name: str + """ + + _validation = { + 'unique_name': {'readonly': True}, + } + + _attribute_map = { + 'unique_name': {'key': 'uniqueName', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(GalleryIdentifier, self).__init__(**kwargs) + self.unique_name = None + + +class GalleryImage(Resource): + """Specifies information about the gallery Image Definition that you want to + create or update. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource Id + :vartype id: str + :ivar name: Resource name + :vartype name: str + :ivar type: Resource type + :vartype type: str + :param location: Required. Resource location + :type location: str + :param tags: Resource tags + :type tags: dict[str, str] + :param description: The description of this gallery Image Definition + resource. This property is updatable. + :type description: str + :param eula: The Eula agreement for the gallery Image Definition. + :type eula: str + :param privacy_statement_uri: The privacy statement uri. + :type privacy_statement_uri: str + :param release_note_uri: The release note uri. + :type release_note_uri: str + :param os_type: Required. This property allows you to specify the type of + the OS that is included in the disk when creating a VM from a managed + image.

    Possible values are:

    **Windows**

    + **Linux**. Possible values include: 'Windows', 'Linux' + :type os_type: str or + ~azure.mgmt.compute.v2019_03_01.models.OperatingSystemTypes + :param os_state: Required. The allowed values for OS State are + 'Generalized'. Possible values include: 'Generalized', 'Specialized' + :type os_state: str or + ~azure.mgmt.compute.v2019_03_01.models.OperatingSystemStateTypes + :param end_of_life_date: The end of life date of the gallery Image + Definition. This property can be used for decommissioning purposes. This + property is updatable. + :type end_of_life_date: datetime + :param identifier: Required. + :type identifier: + ~azure.mgmt.compute.v2019_03_01.models.GalleryImageIdentifier + :param recommended: + :type recommended: + ~azure.mgmt.compute.v2019_03_01.models.RecommendedMachineConfiguration + :param disallowed: + :type disallowed: ~azure.mgmt.compute.v2019_03_01.models.Disallowed + :param purchase_plan: + :type purchase_plan: + ~azure.mgmt.compute.v2019_03_01.models.ImagePurchasePlan + :ivar provisioning_state: The current state of the gallery Image + Definition. The provisioning state, which only appears in the response. + Possible values include: 'Creating', 'Updating', 'Failed', 'Succeeded', + 'Deleting', 'Migrating' + :vartype provisioning_state: str or + ~azure.mgmt.compute.v2019_03_01.models.enum + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + 'os_type': {'required': True}, + 'os_state': {'required': True}, + 'identifier': {'required': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'eula': {'key': 'properties.eula', 'type': 'str'}, + 'privacy_statement_uri': {'key': 'properties.privacyStatementUri', 'type': 'str'}, + 'release_note_uri': {'key': 'properties.releaseNoteUri', 'type': 'str'}, + 'os_type': {'key': 'properties.osType', 'type': 'OperatingSystemTypes'}, + 'os_state': {'key': 'properties.osState', 'type': 'OperatingSystemStateTypes'}, + 'end_of_life_date': {'key': 'properties.endOfLifeDate', 'type': 'iso-8601'}, + 'identifier': {'key': 'properties.identifier', 'type': 'GalleryImageIdentifier'}, + 'recommended': {'key': 'properties.recommended', 'type': 'RecommendedMachineConfiguration'}, + 'disallowed': {'key': 'properties.disallowed', 'type': 'Disallowed'}, + 'purchase_plan': {'key': 'properties.purchasePlan', 'type': 'ImagePurchasePlan'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + } + + def __init__(self, *, location: str, os_type, os_state, identifier, tags=None, description: str=None, eula: str=None, privacy_statement_uri: str=None, release_note_uri: str=None, end_of_life_date=None, recommended=None, disallowed=None, purchase_plan=None, **kwargs) -> None: + super(GalleryImage, self).__init__(location=location, tags=tags, **kwargs) + self.description = description + self.eula = eula + self.privacy_statement_uri = privacy_statement_uri + self.release_note_uri = release_note_uri + self.os_type = os_type + self.os_state = os_state + self.end_of_life_date = end_of_life_date + self.identifier = identifier + self.recommended = recommended + self.disallowed = disallowed + self.purchase_plan = purchase_plan + self.provisioning_state = None + + +class GalleryImageIdentifier(Model): + """This is the gallery Image Definition identifier. + + All required parameters must be populated in order to send to Azure. + + :param publisher: Required. The name of the gallery Image Definition + publisher. + :type publisher: str + :param offer: Required. The name of the gallery Image Definition offer. + :type offer: str + :param sku: Required. The name of the gallery Image Definition SKU. + :type sku: str + """ + + _validation = { + 'publisher': {'required': True}, + 'offer': {'required': True}, + 'sku': {'required': True}, + } + + _attribute_map = { + 'publisher': {'key': 'publisher', 'type': 'str'}, + 'offer': {'key': 'offer', 'type': 'str'}, + 'sku': {'key': 'sku', 'type': 'str'}, + } + + def __init__(self, *, publisher: str, offer: str, sku: str, **kwargs) -> None: + super(GalleryImageIdentifier, self).__init__(**kwargs) + self.publisher = publisher + self.offer = offer + self.sku = sku + + +class GalleryImageVersion(Resource): + """Specifies information about the gallery Image Version that you want to + create or update. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource Id + :vartype id: str + :ivar name: Resource name + :vartype name: str + :ivar type: Resource type + :vartype type: str + :param location: Required. Resource location + :type location: str + :param tags: Resource tags + :type tags: dict[str, str] + :param publishing_profile: Required. + :type publishing_profile: + ~azure.mgmt.compute.v2019_03_01.models.GalleryImageVersionPublishingProfile + :ivar provisioning_state: The current state of the gallery Image Version. + The provisioning state, which only appears in the response. Possible + values include: 'Creating', 'Updating', 'Failed', 'Succeeded', 'Deleting', + 'Migrating' + :vartype provisioning_state: str or + ~azure.mgmt.compute.v2019_03_01.models.enum + :ivar storage_profile: + :vartype storage_profile: + ~azure.mgmt.compute.v2019_03_01.models.GalleryImageVersionStorageProfile + :ivar replication_status: + :vartype replication_status: + ~azure.mgmt.compute.v2019_03_01.models.ReplicationStatus + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + 'publishing_profile': {'required': True}, + 'provisioning_state': {'readonly': True}, + 'storage_profile': {'readonly': True}, + 'replication_status': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'publishing_profile': {'key': 'properties.publishingProfile', 'type': 'GalleryImageVersionPublishingProfile'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'storage_profile': {'key': 'properties.storageProfile', 'type': 'GalleryImageVersionStorageProfile'}, + 'replication_status': {'key': 'properties.replicationStatus', 'type': 'ReplicationStatus'}, + } + + def __init__(self, *, location: str, publishing_profile, tags=None, **kwargs) -> None: + super(GalleryImageVersion, self).__init__(location=location, tags=tags, **kwargs) + self.publishing_profile = publishing_profile + self.provisioning_state = None + self.storage_profile = None + self.replication_status = None + + +class GalleryImageVersionPublishingProfile(GalleryArtifactPublishingProfileBase): + """The publishing profile of a gallery Image Version. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :param target_regions: The target regions where the Image Version is going + to be replicated to. This property is updatable. + :type target_regions: + list[~azure.mgmt.compute.v2019_03_01.models.TargetRegion] + :param replica_count: The number of replicas of the Image Version to be + created per region. This property would take effect for a region when + regionalReplicaCount is not specified. This property is updatable. + :type replica_count: int + :param exclude_from_latest: If set to true, Virtual Machines deployed from + the latest version of the Image Definition won't use this Image Version. + :type exclude_from_latest: bool + :ivar published_date: The timestamp for when the gallery Image Version is + published. + :vartype published_date: datetime + :param end_of_life_date: The end of life date of the gallery Image + Version. This property can be used for decommissioning purposes. This + property is updatable. + :type end_of_life_date: datetime + :param storage_account_type: Specifies the storage account type to be used + to store the image. This property is not updatable. Possible values + include: 'Standard_LRS', 'Standard_ZRS' + :type storage_account_type: str or + ~azure.mgmt.compute.v2019_03_01.models.StorageAccountType + :param source: Required. + :type source: ~azure.mgmt.compute.v2019_03_01.models.GalleryArtifactSource + """ + + _validation = { + 'published_date': {'readonly': True}, + 'source': {'required': True}, + } + + _attribute_map = { + 'target_regions': {'key': 'targetRegions', 'type': '[TargetRegion]'}, + 'replica_count': {'key': 'replicaCount', 'type': 'int'}, + 'exclude_from_latest': {'key': 'excludeFromLatest', 'type': 'bool'}, + 'published_date': {'key': 'publishedDate', 'type': 'iso-8601'}, + 'end_of_life_date': {'key': 'endOfLifeDate', 'type': 'iso-8601'}, + 'storage_account_type': {'key': 'storageAccountType', 'type': 'str'}, + 'source': {'key': 'source', 'type': 'GalleryArtifactSource'}, + } + + def __init__(self, *, source, target_regions=None, replica_count: int=None, exclude_from_latest: bool=None, end_of_life_date=None, storage_account_type=None, **kwargs) -> None: + super(GalleryImageVersionPublishingProfile, self).__init__(target_regions=target_regions, replica_count=replica_count, exclude_from_latest=exclude_from_latest, end_of_life_date=end_of_life_date, storage_account_type=storage_account_type, **kwargs) + self.source = source + + +class GalleryImageVersionStorageProfile(Model): + """This is the storage profile of a gallery Image Version. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar os_disk_image: + :vartype os_disk_image: + ~azure.mgmt.compute.v2019_03_01.models.GalleryOSDiskImage + :ivar data_disk_images: A list of data disk images. + :vartype data_disk_images: + list[~azure.mgmt.compute.v2019_03_01.models.GalleryDataDiskImage] + """ + + _validation = { + 'os_disk_image': {'readonly': True}, + 'data_disk_images': {'readonly': True}, + } + + _attribute_map = { + 'os_disk_image': {'key': 'osDiskImage', 'type': 'GalleryOSDiskImage'}, + 'data_disk_images': {'key': 'dataDiskImages', 'type': '[GalleryDataDiskImage]'}, + } + + def __init__(self, **kwargs) -> None: + super(GalleryImageVersionStorageProfile, self).__init__(**kwargs) + self.os_disk_image = None + self.data_disk_images = None + + +class GalleryOSDiskImage(GalleryDiskImage): + """This is the OS disk image. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar size_in_gb: This property indicates the size of the VHD to be + created. + :vartype size_in_gb: int + :ivar host_caching: The host caching of the disk. Valid values are 'None', + 'ReadOnly', and 'ReadWrite'. Possible values include: 'None', 'ReadOnly', + 'ReadWrite' + :vartype host_caching: str or + ~azure.mgmt.compute.v2019_03_01.models.HostCaching + """ + + _validation = { + 'size_in_gb': {'readonly': True}, + 'host_caching': {'readonly': True}, + } + + _attribute_map = { + 'size_in_gb': {'key': 'sizeInGB', 'type': 'int'}, + 'host_caching': {'key': 'hostCaching', 'type': 'HostCaching'}, + } + + def __init__(self, **kwargs) -> None: + super(GalleryOSDiskImage, self).__init__(**kwargs) + + +class HardwareProfile(Model): + """Specifies the hardware settings for the virtual machine. + + :param vm_size: Specifies the size of the virtual machine. For more + information about virtual machine sizes, see [Sizes for virtual + machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-sizes?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). +

    The available VM sizes depend on region and availability set. For + a list of available sizes use these APIs:

    [List all available + virtual machine sizes in an availability + set](https://docs.microsoft.com/rest/api/compute/availabilitysets/listavailablesizes) +

    [List all available virtual machine sizes in a + region](https://docs.microsoft.com/rest/api/compute/virtualmachinesizes/list) +

    [List all available virtual machine sizes for + resizing](https://docs.microsoft.com/rest/api/compute/virtualmachines/listavailablesizes). + Possible values include: 'Basic_A0', 'Basic_A1', 'Basic_A2', 'Basic_A3', + 'Basic_A4', 'Standard_A0', 'Standard_A1', 'Standard_A2', 'Standard_A3', + 'Standard_A4', 'Standard_A5', 'Standard_A6', 'Standard_A7', 'Standard_A8', + 'Standard_A9', 'Standard_A10', 'Standard_A11', 'Standard_A1_v2', + 'Standard_A2_v2', 'Standard_A4_v2', 'Standard_A8_v2', 'Standard_A2m_v2', + 'Standard_A4m_v2', 'Standard_A8m_v2', 'Standard_B1s', 'Standard_B1ms', + 'Standard_B2s', 'Standard_B2ms', 'Standard_B4ms', 'Standard_B8ms', + 'Standard_D1', 'Standard_D2', 'Standard_D3', 'Standard_D4', + 'Standard_D11', 'Standard_D12', 'Standard_D13', 'Standard_D14', + 'Standard_D1_v2', 'Standard_D2_v2', 'Standard_D3_v2', 'Standard_D4_v2', + 'Standard_D5_v2', 'Standard_D2_v3', 'Standard_D4_v3', 'Standard_D8_v3', + 'Standard_D16_v3', 'Standard_D32_v3', 'Standard_D64_v3', + 'Standard_D2s_v3', 'Standard_D4s_v3', 'Standard_D8s_v3', + 'Standard_D16s_v3', 'Standard_D32s_v3', 'Standard_D64s_v3', + 'Standard_D11_v2', 'Standard_D12_v2', 'Standard_D13_v2', + 'Standard_D14_v2', 'Standard_D15_v2', 'Standard_DS1', 'Standard_DS2', + 'Standard_DS3', 'Standard_DS4', 'Standard_DS11', 'Standard_DS12', + 'Standard_DS13', 'Standard_DS14', 'Standard_DS1_v2', 'Standard_DS2_v2', + 'Standard_DS3_v2', 'Standard_DS4_v2', 'Standard_DS5_v2', + 'Standard_DS11_v2', 'Standard_DS12_v2', 'Standard_DS13_v2', + 'Standard_DS14_v2', 'Standard_DS15_v2', 'Standard_DS13-4_v2', + 'Standard_DS13-2_v2', 'Standard_DS14-8_v2', 'Standard_DS14-4_v2', + 'Standard_E2_v3', 'Standard_E4_v3', 'Standard_E8_v3', 'Standard_E16_v3', + 'Standard_E32_v3', 'Standard_E64_v3', 'Standard_E2s_v3', + 'Standard_E4s_v3', 'Standard_E8s_v3', 'Standard_E16s_v3', + 'Standard_E32s_v3', 'Standard_E64s_v3', 'Standard_E32-16_v3', + 'Standard_E32-8s_v3', 'Standard_E64-32s_v3', 'Standard_E64-16s_v3', + 'Standard_F1', 'Standard_F2', 'Standard_F4', 'Standard_F8', + 'Standard_F16', 'Standard_F1s', 'Standard_F2s', 'Standard_F4s', + 'Standard_F8s', 'Standard_F16s', 'Standard_F2s_v2', 'Standard_F4s_v2', + 'Standard_F8s_v2', 'Standard_F16s_v2', 'Standard_F32s_v2', + 'Standard_F64s_v2', 'Standard_F72s_v2', 'Standard_G1', 'Standard_G2', + 'Standard_G3', 'Standard_G4', 'Standard_G5', 'Standard_GS1', + 'Standard_GS2', 'Standard_GS3', 'Standard_GS4', 'Standard_GS5', + 'Standard_GS4-8', 'Standard_GS4-4', 'Standard_GS5-16', 'Standard_GS5-8', + 'Standard_H8', 'Standard_H16', 'Standard_H8m', 'Standard_H16m', + 'Standard_H16r', 'Standard_H16mr', 'Standard_L4s', 'Standard_L8s', + 'Standard_L16s', 'Standard_L32s', 'Standard_M64s', 'Standard_M64ms', + 'Standard_M128s', 'Standard_M128ms', 'Standard_M64-32ms', + 'Standard_M64-16ms', 'Standard_M128-64ms', 'Standard_M128-32ms', + 'Standard_NC6', 'Standard_NC12', 'Standard_NC24', 'Standard_NC24r', + 'Standard_NC6s_v2', 'Standard_NC12s_v2', 'Standard_NC24s_v2', + 'Standard_NC24rs_v2', 'Standard_NC6s_v3', 'Standard_NC12s_v3', + 'Standard_NC24s_v3', 'Standard_NC24rs_v3', 'Standard_ND6s', + 'Standard_ND12s', 'Standard_ND24s', 'Standard_ND24rs', 'Standard_NV6', + 'Standard_NV12', 'Standard_NV24' + :type vm_size: str or + ~azure.mgmt.compute.v2019_03_01.models.VirtualMachineSizeTypes + """ + + _attribute_map = { + 'vm_size': {'key': 'vmSize', 'type': 'str'}, + } + + def __init__(self, *, vm_size=None, **kwargs) -> None: + super(HardwareProfile, self).__init__(**kwargs) + self.vm_size = vm_size + + +class Image(Resource): + """The source user image virtual hard disk. The virtual hard disk will be + copied before being attached to the virtual machine. If SourceImage is + provided, the destination virtual hard drive must not exist. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource Id + :vartype id: str + :ivar name: Resource name + :vartype name: str + :ivar type: Resource type + :vartype type: str + :param location: Required. Resource location + :type location: str + :param tags: Resource tags + :type tags: dict[str, str] + :param source_virtual_machine: The source virtual machine from which Image + is created. + :type source_virtual_machine: + ~azure.mgmt.compute.v2019_03_01.models.SubResource + :param storage_profile: Specifies the storage settings for the virtual + machine disks. + :type storage_profile: + ~azure.mgmt.compute.v2019_03_01.models.ImageStorageProfile + :ivar provisioning_state: The provisioning state. + :vartype provisioning_state: str + :param hyper_vgeneration: Gets the HyperVGenerationType of the + VirtualMachine created from the image. Possible values include: 'V1', 'V2' + :type hyper_vgeneration: str or + ~azure.mgmt.compute.v2019_03_01.models.HyperVGenerationTypes + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'source_virtual_machine': {'key': 'properties.sourceVirtualMachine', 'type': 'SubResource'}, + 'storage_profile': {'key': 'properties.storageProfile', 'type': 'ImageStorageProfile'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'hyper_vgeneration': {'key': 'properties.hyperVGeneration', 'type': 'str'}, + } + + def __init__(self, *, location: str, tags=None, source_virtual_machine=None, storage_profile=None, hyper_vgeneration=None, **kwargs) -> None: + super(Image, self).__init__(location=location, tags=tags, **kwargs) + self.source_virtual_machine = source_virtual_machine + self.storage_profile = storage_profile + self.provisioning_state = None + self.hyper_vgeneration = hyper_vgeneration + + +class ImageDataDisk(Model): + """Describes a data disk. + + All required parameters must be populated in order to send to Azure. + + :param lun: Required. Specifies the logical unit number of the data disk. + This value is used to identify data disks within the VM and therefore must + be unique for each data disk attached to a VM. + :type lun: int + :param snapshot: The snapshot. + :type snapshot: ~azure.mgmt.compute.v2019_03_01.models.SubResource + :param managed_disk: The managedDisk. + :type managed_disk: ~azure.mgmt.compute.v2019_03_01.models.SubResource + :param blob_uri: The Virtual Hard Disk. + :type blob_uri: str + :param caching: Specifies the caching requirements.

    Possible + values are:

    **None**

    **ReadOnly**

    **ReadWrite** +

    Default: **None for Standard storage. ReadOnly for Premium + storage**. Possible values include: 'None', 'ReadOnly', 'ReadWrite' + :type caching: str or ~azure.mgmt.compute.v2019_03_01.models.CachingTypes + :param disk_size_gb: Specifies the size of empty data disks in gigabytes. + This element can be used to overwrite the name of the disk in a virtual + machine image.

    This value cannot be larger than 1023 GB + :type disk_size_gb: int + :param storage_account_type: Specifies the storage account type for the + managed disk. NOTE: UltraSSD_LRS can only be used with data disks, it + cannot be used with OS Disk. Possible values include: 'Standard_LRS', + 'Premium_LRS', 'StandardSSD_LRS', 'UltraSSD_LRS' + :type storage_account_type: str or + ~azure.mgmt.compute.v2019_03_01.models.StorageAccountTypes + """ + + _validation = { + 'lun': {'required': True}, + } + + _attribute_map = { + 'lun': {'key': 'lun', 'type': 'int'}, + 'snapshot': {'key': 'snapshot', 'type': 'SubResource'}, + 'managed_disk': {'key': 'managedDisk', 'type': 'SubResource'}, + 'blob_uri': {'key': 'blobUri', 'type': 'str'}, + 'caching': {'key': 'caching', 'type': 'CachingTypes'}, + 'disk_size_gb': {'key': 'diskSizeGB', 'type': 'int'}, + 'storage_account_type': {'key': 'storageAccountType', 'type': 'str'}, + } + + def __init__(self, *, lun: int, snapshot=None, managed_disk=None, blob_uri: str=None, caching=None, disk_size_gb: int=None, storage_account_type=None, **kwargs) -> None: + super(ImageDataDisk, self).__init__(**kwargs) + self.lun = lun + self.snapshot = snapshot + self.managed_disk = managed_disk + self.blob_uri = blob_uri + self.caching = caching + self.disk_size_gb = disk_size_gb + self.storage_account_type = storage_account_type + + +class ImageOSDisk(Model): + """Describes an Operating System disk. + + All required parameters must be populated in order to send to Azure. + + :param os_type: Required. This property allows you to specify the type of + the OS that is included in the disk if creating a VM from a custom image. +

    Possible values are:

    **Windows**

    **Linux**. + Possible values include: 'Windows', 'Linux' + :type os_type: str or + ~azure.mgmt.compute.v2019_03_01.models.OperatingSystemTypes + :param os_state: Required. The OS State. Possible values include: + 'Generalized', 'Specialized' + :type os_state: str or + ~azure.mgmt.compute.v2019_03_01.models.OperatingSystemStateTypes + :param snapshot: The snapshot. + :type snapshot: ~azure.mgmt.compute.v2019_03_01.models.SubResource + :param managed_disk: The managedDisk. + :type managed_disk: ~azure.mgmt.compute.v2019_03_01.models.SubResource + :param blob_uri: The Virtual Hard Disk. + :type blob_uri: str + :param caching: Specifies the caching requirements.

    Possible + values are:

    **None**

    **ReadOnly**

    **ReadWrite** +

    Default: **None for Standard storage. ReadOnly for Premium + storage**. Possible values include: 'None', 'ReadOnly', 'ReadWrite' + :type caching: str or ~azure.mgmt.compute.v2019_03_01.models.CachingTypes + :param disk_size_gb: Specifies the size of empty data disks in gigabytes. + This element can be used to overwrite the name of the disk in a virtual + machine image.

    This value cannot be larger than 1023 GB + :type disk_size_gb: int + :param storage_account_type: Specifies the storage account type for the + managed disk. UltraSSD_LRS cannot be used with OS Disk. Possible values + include: 'Standard_LRS', 'Premium_LRS', 'StandardSSD_LRS', 'UltraSSD_LRS' + :type storage_account_type: str or + ~azure.mgmt.compute.v2019_03_01.models.StorageAccountTypes + """ + + _validation = { + 'os_type': {'required': True}, + 'os_state': {'required': True}, + } + + _attribute_map = { + 'os_type': {'key': 'osType', 'type': 'OperatingSystemTypes'}, + 'os_state': {'key': 'osState', 'type': 'OperatingSystemStateTypes'}, + 'snapshot': {'key': 'snapshot', 'type': 'SubResource'}, + 'managed_disk': {'key': 'managedDisk', 'type': 'SubResource'}, + 'blob_uri': {'key': 'blobUri', 'type': 'str'}, + 'caching': {'key': 'caching', 'type': 'CachingTypes'}, + 'disk_size_gb': {'key': 'diskSizeGB', 'type': 'int'}, + 'storage_account_type': {'key': 'storageAccountType', 'type': 'str'}, + } + + def __init__(self, *, os_type, os_state, snapshot=None, managed_disk=None, blob_uri: str=None, caching=None, disk_size_gb: int=None, storage_account_type=None, **kwargs) -> None: + super(ImageOSDisk, self).__init__(**kwargs) + self.os_type = os_type + self.os_state = os_state + self.snapshot = snapshot + self.managed_disk = managed_disk + self.blob_uri = blob_uri + self.caching = caching + self.disk_size_gb = disk_size_gb + self.storage_account_type = storage_account_type + + +class ImagePurchasePlan(Model): + """Describes the gallery Image Definition purchase plan. This is used by + marketplace images. + + :param name: The plan ID. + :type name: str + :param publisher: The publisher ID. + :type publisher: str + :param product: The product ID. + :type product: str + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'publisher': {'key': 'publisher', 'type': 'str'}, + 'product': {'key': 'product', 'type': 'str'}, + } + + def __init__(self, *, name: str=None, publisher: str=None, product: str=None, **kwargs) -> None: + super(ImagePurchasePlan, self).__init__(**kwargs) + self.name = name + self.publisher = publisher + self.product = product + + +class SubResource(Model): + """SubResource. + + :param id: Resource Id + :type id: str + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + } + + def __init__(self, *, id: str=None, **kwargs) -> None: + super(SubResource, self).__init__(**kwargs) + self.id = id + + +class ImageReference(SubResource): + """Specifies information about the image to use. You can specify information + about platform images, marketplace images, or virtual machine images. This + element is required when you want to use a platform image, marketplace + image, or virtual machine image, but is not used in other creation + operations. + + :param id: Resource Id + :type id: str + :param publisher: The image publisher. + :type publisher: str + :param offer: Specifies the offer of the platform image or marketplace + image used to create the virtual machine. + :type offer: str + :param sku: The image SKU. + :type sku: str + :param version: Specifies the version of the platform image or marketplace + image used to create the virtual machine. The allowed formats are + Major.Minor.Build or 'latest'. Major, Minor, and Build are decimal + numbers. Specify 'latest' to use the latest version of an image available + at deploy time. Even if you use 'latest', the VM image will not + automatically update after deploy time even if a new version becomes + available. + :type version: str + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'publisher': {'key': 'publisher', 'type': 'str'}, + 'offer': {'key': 'offer', 'type': 'str'}, + 'sku': {'key': 'sku', 'type': 'str'}, + 'version': {'key': 'version', 'type': 'str'}, + } + + def __init__(self, *, id: str=None, publisher: str=None, offer: str=None, sku: str=None, version: str=None, **kwargs) -> None: + super(ImageReference, self).__init__(id=id, **kwargs) + self.publisher = publisher + self.offer = offer + self.sku = sku + self.version = version + + +class ImageStorageProfile(Model): + """Describes a storage profile. + + :param os_disk: Specifies information about the operating system disk used + by the virtual machine.

    For more information about disks, see + [About disks and VHDs for Azure virtual + machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-about-disks-vhds?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). + :type os_disk: ~azure.mgmt.compute.v2019_03_01.models.ImageOSDisk + :param data_disks: Specifies the parameters that are used to add a data + disk to a virtual machine.

    For more information about disks, see + [About disks and VHDs for Azure virtual + machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-about-disks-vhds?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). + :type data_disks: + list[~azure.mgmt.compute.v2019_03_01.models.ImageDataDisk] + :param zone_resilient: Specifies whether an image is zone resilient or + not. Default is false. Zone resilient images can be created only in + regions that provide Zone Redundant Storage (ZRS). + :type zone_resilient: bool + """ + + _attribute_map = { + 'os_disk': {'key': 'osDisk', 'type': 'ImageOSDisk'}, + 'data_disks': {'key': 'dataDisks', 'type': '[ImageDataDisk]'}, + 'zone_resilient': {'key': 'zoneResilient', 'type': 'bool'}, + } + + def __init__(self, *, os_disk=None, data_disks=None, zone_resilient: bool=None, **kwargs) -> None: + super(ImageStorageProfile, self).__init__(**kwargs) + self.os_disk = os_disk + self.data_disks = data_disks + self.zone_resilient = zone_resilient + + +class ImageUpdate(UpdateResource): + """The source user image virtual hard disk. Only tags may be updated. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :param tags: Resource tags + :type tags: dict[str, str] + :param source_virtual_machine: The source virtual machine from which Image + is created. + :type source_virtual_machine: + ~azure.mgmt.compute.v2019_03_01.models.SubResource + :param storage_profile: Specifies the storage settings for the virtual + machine disks. + :type storage_profile: + ~azure.mgmt.compute.v2019_03_01.models.ImageStorageProfile + :ivar provisioning_state: The provisioning state. + :vartype provisioning_state: str + :param hyper_vgeneration: Gets the HyperVGenerationType of the + VirtualMachine created from the image. Possible values include: 'V1', 'V2' + :type hyper_vgeneration: str or + ~azure.mgmt.compute.v2019_03_01.models.HyperVGenerationTypes + """ + + _validation = { + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + 'source_virtual_machine': {'key': 'properties.sourceVirtualMachine', 'type': 'SubResource'}, + 'storage_profile': {'key': 'properties.storageProfile', 'type': 'ImageStorageProfile'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'hyper_vgeneration': {'key': 'properties.hyperVGeneration', 'type': 'str'}, + } + + def __init__(self, *, tags=None, source_virtual_machine=None, storage_profile=None, hyper_vgeneration=None, **kwargs) -> None: + super(ImageUpdate, self).__init__(tags=tags, **kwargs) + self.source_virtual_machine = source_virtual_machine + self.storage_profile = storage_profile + self.provisioning_state = None + self.hyper_vgeneration = hyper_vgeneration + + +class InnerError(Model): + """Inner error details. + + :param exceptiontype: The exception type. + :type exceptiontype: str + :param errordetail: The internal error message or exception dump. + :type errordetail: str + """ + + _attribute_map = { + 'exceptiontype': {'key': 'exceptiontype', 'type': 'str'}, + 'errordetail': {'key': 'errordetail', 'type': 'str'}, + } + + def __init__(self, *, exceptiontype: str=None, errordetail: str=None, **kwargs) -> None: + super(InnerError, self).__init__(**kwargs) + self.exceptiontype = exceptiontype + self.errordetail = errordetail + + +class InstanceViewStatus(Model): + """Instance view status. + + :param code: The status code. + :type code: str + :param level: The level code. Possible values include: 'Info', 'Warning', + 'Error' + :type level: str or + ~azure.mgmt.compute.v2019_03_01.models.StatusLevelTypes + :param display_status: The short localizable label for the status. + :type display_status: str + :param message: The detailed status message, including for alerts and + error messages. + :type message: str + :param time: The time of the status. + :type time: datetime + """ + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + 'level': {'key': 'level', 'type': 'StatusLevelTypes'}, + 'display_status': {'key': 'displayStatus', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + 'time': {'key': 'time', 'type': 'iso-8601'}, + } + + def __init__(self, *, code: str=None, level=None, display_status: str=None, message: str=None, time=None, **kwargs) -> None: + super(InstanceViewStatus, self).__init__(**kwargs) + self.code = code + self.level = level + self.display_status = display_status + self.message = message + self.time = time + + +class KeyVaultKeyReference(Model): + """Describes a reference to Key Vault Key. + + All required parameters must be populated in order to send to Azure. + + :param key_url: Required. The URL referencing a key encryption key in Key + Vault. + :type key_url: str + :param source_vault: Required. The relative URL of the Key Vault + containing the key. + :type source_vault: ~azure.mgmt.compute.v2019_03_01.models.SubResource + """ + + _validation = { + 'key_url': {'required': True}, + 'source_vault': {'required': True}, + } + + _attribute_map = { + 'key_url': {'key': 'keyUrl', 'type': 'str'}, + 'source_vault': {'key': 'sourceVault', 'type': 'SubResource'}, + } + + def __init__(self, *, key_url: str, source_vault, **kwargs) -> None: + super(KeyVaultKeyReference, self).__init__(**kwargs) + self.key_url = key_url + self.source_vault = source_vault + + +class KeyVaultSecretReference(Model): + """Describes a reference to Key Vault Secret. + + All required parameters must be populated in order to send to Azure. + + :param secret_url: Required. The URL referencing a secret in a Key Vault. + :type secret_url: str + :param source_vault: Required. The relative URL of the Key Vault + containing the secret. + :type source_vault: ~azure.mgmt.compute.v2019_03_01.models.SubResource + """ + + _validation = { + 'secret_url': {'required': True}, + 'source_vault': {'required': True}, + } + + _attribute_map = { + 'secret_url': {'key': 'secretUrl', 'type': 'str'}, + 'source_vault': {'key': 'sourceVault', 'type': 'SubResource'}, + } + + def __init__(self, *, secret_url: str, source_vault, **kwargs) -> None: + super(KeyVaultSecretReference, self).__init__(**kwargs) + self.secret_url = secret_url + self.source_vault = source_vault + + +class LinuxConfiguration(Model): + """Specifies the Linux operating system settings on the virtual machine. +

    For a list of supported Linux distributions, see [Linux on + Azure-Endorsed + Distributions](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-endorsed-distros?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json) +

    For running non-endorsed distributions, see [Information for + Non-Endorsed + Distributions](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-create-upload-generic?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json). + + :param disable_password_authentication: Specifies whether password + authentication should be disabled. + :type disable_password_authentication: bool + :param ssh: Specifies the ssh key configuration for a Linux OS. + :type ssh: ~azure.mgmt.compute.v2019_03_01.models.SshConfiguration + :param provision_vm_agent: Indicates whether virtual machine agent should + be provisioned on the virtual machine.

    When this property is not + specified in the request body, default behavior is to set it to true. + This will ensure that VM Agent is installed on the VM so that extensions + can be added to the VM later. + :type provision_vm_agent: bool + """ + + _attribute_map = { + 'disable_password_authentication': {'key': 'disablePasswordAuthentication', 'type': 'bool'}, + 'ssh': {'key': 'ssh', 'type': 'SshConfiguration'}, + 'provision_vm_agent': {'key': 'provisionVMAgent', 'type': 'bool'}, + } + + def __init__(self, *, disable_password_authentication: bool=None, ssh=None, provision_vm_agent: bool=None, **kwargs) -> None: + super(LinuxConfiguration, self).__init__(**kwargs) + self.disable_password_authentication = disable_password_authentication + self.ssh = ssh + self.provision_vm_agent = provision_vm_agent + + +class LogAnalyticsInputBase(Model): + """Api input base class for LogAnalytics Api. + + All required parameters must be populated in order to send to Azure. + + :param blob_container_sas_uri: Required. SAS Uri of the logging blob + container to which LogAnalytics Api writes output logs to. + :type blob_container_sas_uri: str + :param from_time: Required. From time of the query + :type from_time: datetime + :param to_time: Required. To time of the query + :type to_time: datetime + :param group_by_throttle_policy: Group query result by Throttle Policy + applied. + :type group_by_throttle_policy: bool + :param group_by_operation_name: Group query result by Operation Name. + :type group_by_operation_name: bool + :param group_by_resource_name: Group query result by Resource Name. + :type group_by_resource_name: bool + """ + + _validation = { + 'blob_container_sas_uri': {'required': True}, + 'from_time': {'required': True}, + 'to_time': {'required': True}, + } + + _attribute_map = { + 'blob_container_sas_uri': {'key': 'blobContainerSasUri', 'type': 'str'}, + 'from_time': {'key': 'fromTime', 'type': 'iso-8601'}, + 'to_time': {'key': 'toTime', 'type': 'iso-8601'}, + 'group_by_throttle_policy': {'key': 'groupByThrottlePolicy', 'type': 'bool'}, + 'group_by_operation_name': {'key': 'groupByOperationName', 'type': 'bool'}, + 'group_by_resource_name': {'key': 'groupByResourceName', 'type': 'bool'}, + } + + def __init__(self, *, blob_container_sas_uri: str, from_time, to_time, group_by_throttle_policy: bool=None, group_by_operation_name: bool=None, group_by_resource_name: bool=None, **kwargs) -> None: + super(LogAnalyticsInputBase, self).__init__(**kwargs) + self.blob_container_sas_uri = blob_container_sas_uri + self.from_time = from_time + self.to_time = to_time + self.group_by_throttle_policy = group_by_throttle_policy + self.group_by_operation_name = group_by_operation_name + self.group_by_resource_name = group_by_resource_name + + +class LogAnalyticsOperationResult(Model): + """LogAnalytics operation status response. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar properties: LogAnalyticsOutput + :vartype properties: + ~azure.mgmt.compute.v2019_03_01.models.LogAnalyticsOutput + """ + + _validation = { + 'properties': {'readonly': True}, + } + + _attribute_map = { + 'properties': {'key': 'properties', 'type': 'LogAnalyticsOutput'}, + } + + def __init__(self, **kwargs) -> None: + super(LogAnalyticsOperationResult, self).__init__(**kwargs) + self.properties = None + + +class LogAnalyticsOutput(Model): + """LogAnalytics output properties. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar output: Output file Uri path to blob container. + :vartype output: str + """ + + _validation = { + 'output': {'readonly': True}, + } + + _attribute_map = { + 'output': {'key': 'output', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(LogAnalyticsOutput, self).__init__(**kwargs) + self.output = None + + +class MaintenanceRedeployStatus(Model): + """Maintenance Operation Status. + + :param is_customer_initiated_maintenance_allowed: True, if customer is + allowed to perform Maintenance. + :type is_customer_initiated_maintenance_allowed: bool + :param pre_maintenance_window_start_time: Start Time for the Pre + Maintenance Window. + :type pre_maintenance_window_start_time: datetime + :param pre_maintenance_window_end_time: End Time for the Pre Maintenance + Window. + :type pre_maintenance_window_end_time: datetime + :param maintenance_window_start_time: Start Time for the Maintenance + Window. + :type maintenance_window_start_time: datetime + :param maintenance_window_end_time: End Time for the Maintenance Window. + :type maintenance_window_end_time: datetime + :param last_operation_result_code: The Last Maintenance Operation Result + Code. Possible values include: 'None', 'RetryLater', 'MaintenanceAborted', + 'MaintenanceCompleted' + :type last_operation_result_code: str or + ~azure.mgmt.compute.v2019_03_01.models.MaintenanceOperationResultCodeTypes + :param last_operation_message: Message returned for the last Maintenance + Operation. + :type last_operation_message: str + """ + + _attribute_map = { + 'is_customer_initiated_maintenance_allowed': {'key': 'isCustomerInitiatedMaintenanceAllowed', 'type': 'bool'}, + 'pre_maintenance_window_start_time': {'key': 'preMaintenanceWindowStartTime', 'type': 'iso-8601'}, + 'pre_maintenance_window_end_time': {'key': 'preMaintenanceWindowEndTime', 'type': 'iso-8601'}, + 'maintenance_window_start_time': {'key': 'maintenanceWindowStartTime', 'type': 'iso-8601'}, + 'maintenance_window_end_time': {'key': 'maintenanceWindowEndTime', 'type': 'iso-8601'}, + 'last_operation_result_code': {'key': 'lastOperationResultCode', 'type': 'MaintenanceOperationResultCodeTypes'}, + 'last_operation_message': {'key': 'lastOperationMessage', 'type': 'str'}, + } + + def __init__(self, *, is_customer_initiated_maintenance_allowed: bool=None, pre_maintenance_window_start_time=None, pre_maintenance_window_end_time=None, maintenance_window_start_time=None, maintenance_window_end_time=None, last_operation_result_code=None, last_operation_message: str=None, **kwargs) -> None: + super(MaintenanceRedeployStatus, self).__init__(**kwargs) + self.is_customer_initiated_maintenance_allowed = is_customer_initiated_maintenance_allowed + self.pre_maintenance_window_start_time = pre_maintenance_window_start_time + self.pre_maintenance_window_end_time = pre_maintenance_window_end_time + self.maintenance_window_start_time = maintenance_window_start_time + self.maintenance_window_end_time = maintenance_window_end_time + self.last_operation_result_code = last_operation_result_code + self.last_operation_message = last_operation_message + + +class ManagedArtifact(Model): + """The managed artifact. + + All required parameters must be populated in order to send to Azure. + + :param id: Required. The managed artifact id. + :type id: str + """ + + _validation = { + 'id': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + } + + def __init__(self, *, id: str, **kwargs) -> None: + super(ManagedArtifact, self).__init__(**kwargs) + self.id = id + + +class ManagedDiskParameters(SubResource): + """The parameters of a managed disk. + + :param id: Resource Id + :type id: str + :param storage_account_type: Specifies the storage account type for the + managed disk. NOTE: UltraSSD_LRS can only be used with data disks, it + cannot be used with OS Disk. Possible values include: 'Standard_LRS', + 'Premium_LRS', 'StandardSSD_LRS', 'UltraSSD_LRS' + :type storage_account_type: str or + ~azure.mgmt.compute.v2019_03_01.models.StorageAccountTypes + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'storage_account_type': {'key': 'storageAccountType', 'type': 'str'}, + } + + def __init__(self, *, id: str=None, storage_account_type=None, **kwargs) -> None: + super(ManagedDiskParameters, self).__init__(id=id, **kwargs) + self.storage_account_type = storage_account_type + + +class NetworkInterfaceReference(SubResource): + """Describes a network interface reference. + + :param id: Resource Id + :type id: str + :param primary: Specifies the primary network interface in case the + virtual machine has more than 1 network interface. + :type primary: bool + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'primary': {'key': 'properties.primary', 'type': 'bool'}, + } + + def __init__(self, *, id: str=None, primary: bool=None, **kwargs) -> None: + super(NetworkInterfaceReference, self).__init__(id=id, **kwargs) + self.primary = primary + + +class NetworkProfile(Model): + """Specifies the network interfaces of the virtual machine. + + :param network_interfaces: Specifies the list of resource Ids for the + network interfaces associated with the virtual machine. + :type network_interfaces: + list[~azure.mgmt.compute.v2019_03_01.models.NetworkInterfaceReference] + """ + + _attribute_map = { + 'network_interfaces': {'key': 'networkInterfaces', 'type': '[NetworkInterfaceReference]'}, + } + + def __init__(self, *, network_interfaces=None, **kwargs) -> None: + super(NetworkProfile, self).__init__(**kwargs) + self.network_interfaces = network_interfaces + + +class OSDisk(Model): + """Specifies information about the operating system disk used by the virtual + machine.

    For more information about disks, see [About disks and + VHDs for Azure virtual + machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-about-disks-vhds?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). + + All required parameters must be populated in order to send to Azure. + + :param os_type: This property allows you to specify the type of the OS + that is included in the disk if creating a VM from user-image or a + specialized VHD.

    Possible values are:

    **Windows** +

    **Linux**. Possible values include: 'Windows', 'Linux' + :type os_type: str or + ~azure.mgmt.compute.v2019_03_01.models.OperatingSystemTypes + :param encryption_settings: Specifies the encryption settings for the OS + Disk.

    Minimum api-version: 2015-06-15 + :type encryption_settings: + ~azure.mgmt.compute.v2019_03_01.models.DiskEncryptionSettings + :param name: The disk name. + :type name: str + :param vhd: The virtual hard disk. + :type vhd: ~azure.mgmt.compute.v2019_03_01.models.VirtualHardDisk + :param image: The source user image virtual hard disk. The virtual hard + disk will be copied before being attached to the virtual machine. If + SourceImage is provided, the destination virtual hard drive must not + exist. + :type image: ~azure.mgmt.compute.v2019_03_01.models.VirtualHardDisk + :param caching: Specifies the caching requirements.

    Possible + values are:

    **None**

    **ReadOnly**

    **ReadWrite** +

    Default: **None for Standard storage. ReadOnly for Premium + storage**. Possible values include: 'None', 'ReadOnly', 'ReadWrite' + :type caching: str or ~azure.mgmt.compute.v2019_03_01.models.CachingTypes + :param write_accelerator_enabled: Specifies whether writeAccelerator + should be enabled or disabled on the disk. + :type write_accelerator_enabled: bool + :param diff_disk_settings: Specifies the ephemeral Disk Settings for the + operating system disk used by the virtual machine. + :type diff_disk_settings: + ~azure.mgmt.compute.v2019_03_01.models.DiffDiskSettings + :param create_option: Required. Specifies how the virtual machine should + be created.

    Possible values are:

    **Attach** \\u2013 This + value is used when you are using a specialized disk to create the virtual + machine.

    **FromImage** \\u2013 This value is used when you are + using an image to create the virtual machine. If you are using a platform + image, you also use the imageReference element described above. If you are + using a marketplace image, you also use the plan element previously + described. Possible values include: 'FromImage', 'Empty', 'Attach' + :type create_option: str or + ~azure.mgmt.compute.v2019_03_01.models.DiskCreateOptionTypes + :param disk_size_gb: Specifies the size of an empty data disk in + gigabytes. This element can be used to overwrite the size of the disk in a + virtual machine image.

    This value cannot be larger than 1023 GB + :type disk_size_gb: int + :param managed_disk: The managed disk parameters. + :type managed_disk: + ~azure.mgmt.compute.v2019_03_01.models.ManagedDiskParameters + """ + + _validation = { + 'create_option': {'required': True}, + } + + _attribute_map = { + 'os_type': {'key': 'osType', 'type': 'OperatingSystemTypes'}, + 'encryption_settings': {'key': 'encryptionSettings', 'type': 'DiskEncryptionSettings'}, + 'name': {'key': 'name', 'type': 'str'}, + 'vhd': {'key': 'vhd', 'type': 'VirtualHardDisk'}, + 'image': {'key': 'image', 'type': 'VirtualHardDisk'}, + 'caching': {'key': 'caching', 'type': 'CachingTypes'}, + 'write_accelerator_enabled': {'key': 'writeAcceleratorEnabled', 'type': 'bool'}, + 'diff_disk_settings': {'key': 'diffDiskSettings', 'type': 'DiffDiskSettings'}, + 'create_option': {'key': 'createOption', 'type': 'str'}, + 'disk_size_gb': {'key': 'diskSizeGB', 'type': 'int'}, + 'managed_disk': {'key': 'managedDisk', 'type': 'ManagedDiskParameters'}, + } + + def __init__(self, *, create_option, os_type=None, encryption_settings=None, name: str=None, vhd=None, image=None, caching=None, write_accelerator_enabled: bool=None, diff_disk_settings=None, disk_size_gb: int=None, managed_disk=None, **kwargs) -> None: + super(OSDisk, self).__init__(**kwargs) + self.os_type = os_type + self.encryption_settings = encryption_settings + self.name = name + self.vhd = vhd + self.image = image + self.caching = caching + self.write_accelerator_enabled = write_accelerator_enabled + self.diff_disk_settings = diff_disk_settings + self.create_option = create_option + self.disk_size_gb = disk_size_gb + self.managed_disk = managed_disk + + +class OSDiskImage(Model): + """Contains the os disk image information. + + All required parameters must be populated in order to send to Azure. + + :param operating_system: Required. The operating system of the + osDiskImage. Possible values include: 'Windows', 'Linux' + :type operating_system: str or + ~azure.mgmt.compute.v2019_03_01.models.OperatingSystemTypes + """ + + _validation = { + 'operating_system': {'required': True}, + } + + _attribute_map = { + 'operating_system': {'key': 'operatingSystem', 'type': 'OperatingSystemTypes'}, + } + + def __init__(self, *, operating_system, **kwargs) -> None: + super(OSDiskImage, self).__init__(**kwargs) + self.operating_system = operating_system + + +class OSProfile(Model): + """Specifies the operating system settings for the virtual machine. + + :param computer_name: Specifies the host OS name of the virtual machine. +

    This name cannot be updated after the VM is created.

    + **Max-length (Windows):** 15 characters

    **Max-length (Linux):** + 64 characters.

    For naming conventions and restrictions see [Azure + infrastructure services implementation + guidelines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-infrastructure-subscription-accounts-guidelines?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json#1-naming-conventions). + :type computer_name: str + :param admin_username: Specifies the name of the administrator account. +

    **Windows-only restriction:** Cannot end in "."

    + **Disallowed values:** "administrator", "admin", "user", "user1", "test", + "user2", "test1", "user3", "admin1", "1", "123", "a", "actuser", "adm", + "admin2", "aspnet", "backup", "console", "david", "guest", "john", + "owner", "root", "server", "sql", "support", "support_388945a0", "sys", + "test2", "test3", "user4", "user5".

    **Minimum-length (Linux):** 1 + character

    **Max-length (Linux):** 64 characters

    + **Max-length (Windows):** 20 characters

  • For root access to + the Linux VM, see [Using root privileges on Linux virtual machines in + Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-use-root-privileges?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json)
  • + For a list of built-in system users on Linux that should not be used in + this field, see [Selecting User Names for Linux on + Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-usernames?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json) + :type admin_username: str + :param admin_password: Specifies the password of the administrator + account.

    **Minimum-length (Windows):** 8 characters

    + **Minimum-length (Linux):** 6 characters

    **Max-length + (Windows):** 123 characters

    **Max-length (Linux):** 72 characters +

    **Complexity requirements:** 3 out of 4 conditions below need to + be fulfilled
    Has lower characters
    Has upper characters
    Has a + digit
    Has a special character (Regex match [\\W_])

    + **Disallowed values:** "abc@123", "P@$$w0rd", "P@ssw0rd", "P@ssword123", + "Pa$$word", "pass@word1", "Password!", "Password1", "Password22", + "iloveyou!"

    For resetting the password, see [How to reset the + Remote Desktop service or its login password in a Windows + VM](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-reset-rdp?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json) +

    For resetting root password, see [Manage users, SSH, and check or + repair disks on Azure Linux VMs using the VMAccess + Extension](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-using-vmaccess-extension?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json#reset-root-password) + :type admin_password: str + :param custom_data: Specifies a base-64 encoded string of custom data. The + base-64 encoded string is decoded to a binary array that is saved as a + file on the Virtual Machine. The maximum length of the binary array is + 65535 bytes.

    For using cloud-init for your VM, see [Using + cloud-init to customize a Linux VM during + creation](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-using-cloud-init?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json) + :type custom_data: str + :param windows_configuration: Specifies Windows operating system settings + on the virtual machine. + :type windows_configuration: + ~azure.mgmt.compute.v2019_03_01.models.WindowsConfiguration + :param linux_configuration: Specifies the Linux operating system settings + on the virtual machine.

    For a list of supported Linux + distributions, see [Linux on Azure-Endorsed + Distributions](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-endorsed-distros?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json) +

    For running non-endorsed distributions, see [Information for + Non-Endorsed + Distributions](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-create-upload-generic?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json). + :type linux_configuration: + ~azure.mgmt.compute.v2019_03_01.models.LinuxConfiguration + :param secrets: Specifies set of certificates that should be installed + onto the virtual machine. + :type secrets: + list[~azure.mgmt.compute.v2019_03_01.models.VaultSecretGroup] + :param allow_extension_operations: Specifies whether extension operations + should be allowed on the virtual machine.

    This may only be set to + False when no extensions are present on the virtual machine. + :type allow_extension_operations: bool + """ + + _attribute_map = { + 'computer_name': {'key': 'computerName', 'type': 'str'}, + 'admin_username': {'key': 'adminUsername', 'type': 'str'}, + 'admin_password': {'key': 'adminPassword', 'type': 'str'}, + 'custom_data': {'key': 'customData', 'type': 'str'}, + 'windows_configuration': {'key': 'windowsConfiguration', 'type': 'WindowsConfiguration'}, + 'linux_configuration': {'key': 'linuxConfiguration', 'type': 'LinuxConfiguration'}, + 'secrets': {'key': 'secrets', 'type': '[VaultSecretGroup]'}, + 'allow_extension_operations': {'key': 'allowExtensionOperations', 'type': 'bool'}, + } + + def __init__(self, *, computer_name: str=None, admin_username: str=None, admin_password: str=None, custom_data: str=None, windows_configuration=None, linux_configuration=None, secrets=None, allow_extension_operations: bool=None, **kwargs) -> None: + super(OSProfile, self).__init__(**kwargs) + self.computer_name = computer_name + self.admin_username = admin_username + self.admin_password = admin_password + self.custom_data = custom_data + self.windows_configuration = windows_configuration + self.linux_configuration = linux_configuration + self.secrets = secrets + self.allow_extension_operations = allow_extension_operations + + +class Plan(Model): + """Specifies information about the marketplace image used to create the + virtual machine. This element is only used for marketplace images. Before + you can use a marketplace image from an API, you must enable the image for + programmatic use. In the Azure portal, find the marketplace image that you + want to use and then click **Want to deploy programmatically, Get Started + ->**. Enter any required information and then click **Save**. + + :param name: The plan ID. + :type name: str + :param publisher: The publisher ID. + :type publisher: str + :param product: Specifies the product of the image from the marketplace. + This is the same value as Offer under the imageReference element. + :type product: str + :param promotion_code: The promotion code. + :type promotion_code: str + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'publisher': {'key': 'publisher', 'type': 'str'}, + 'product': {'key': 'product', 'type': 'str'}, + 'promotion_code': {'key': 'promotionCode', 'type': 'str'}, + } + + def __init__(self, *, name: str=None, publisher: str=None, product: str=None, promotion_code: str=None, **kwargs) -> None: + super(Plan, self).__init__(**kwargs) + self.name = name + self.publisher = publisher + self.product = product + self.promotion_code = promotion_code + + +class ProximityPlacementGroup(Resource): + """Specifies information about the proximity placement group. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource Id + :vartype id: str + :ivar name: Resource name + :vartype name: str + :ivar type: Resource type + :vartype type: str + :param location: Required. Resource location + :type location: str + :param tags: Resource tags + :type tags: dict[str, str] + :param proximity_placement_group_type: Specifies the type of the proximity + placement group.

    Possible values are:

    **Standard** : + Co-locate resources within an Azure region or Availability Zone.

    + **Ultra** : For future use. Possible values include: 'Standard', 'Ultra' + :type proximity_placement_group_type: str or + ~azure.mgmt.compute.v2019_03_01.models.ProximityPlacementGroupType + :ivar virtual_machines: A list of references to all virtual machines in + the proximity placement group. + :vartype virtual_machines: + list[~azure.mgmt.compute.v2019_03_01.models.SubResource] + :ivar virtual_machine_scale_sets: A list of references to all virtual + machine scale sets in the proximity placement group. + :vartype virtual_machine_scale_sets: + list[~azure.mgmt.compute.v2019_03_01.models.SubResource] + :ivar availability_sets: A list of references to all availability sets in + the proximity placement group. + :vartype availability_sets: + list[~azure.mgmt.compute.v2019_03_01.models.SubResource] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + 'virtual_machines': {'readonly': True}, + 'virtual_machine_scale_sets': {'readonly': True}, + 'availability_sets': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'proximity_placement_group_type': {'key': 'properties.proximityPlacementGroupType', 'type': 'str'}, + 'virtual_machines': {'key': 'properties.virtualMachines', 'type': '[SubResource]'}, + 'virtual_machine_scale_sets': {'key': 'properties.virtualMachineScaleSets', 'type': '[SubResource]'}, + 'availability_sets': {'key': 'properties.availabilitySets', 'type': '[SubResource]'}, + } + + def __init__(self, *, location: str, tags=None, proximity_placement_group_type=None, **kwargs) -> None: + super(ProximityPlacementGroup, self).__init__(location=location, tags=tags, **kwargs) + self.proximity_placement_group_type = proximity_placement_group_type + self.virtual_machines = None + self.virtual_machine_scale_sets = None + self.availability_sets = None + + +class ProximityPlacementGroupUpdate(UpdateResource): + """Specifies information about the proximity placement group. + + :param tags: Resource tags + :type tags: dict[str, str] + """ + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__(self, *, tags=None, **kwargs) -> None: + super(ProximityPlacementGroupUpdate, self).__init__(tags=tags, **kwargs) + + +class PurchasePlan(Model): + """Used for establishing the purchase context of any 3rd Party artifact + through MarketPlace. + + All required parameters must be populated in order to send to Azure. + + :param publisher: Required. The publisher ID. + :type publisher: str + :param name: Required. The plan ID. + :type name: str + :param product: Required. Specifies the product of the image from the + marketplace. This is the same value as Offer under the imageReference + element. + :type product: str + """ + + _validation = { + 'publisher': {'required': True}, + 'name': {'required': True}, + 'product': {'required': True}, + } + + _attribute_map = { + 'publisher': {'key': 'publisher', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'product': {'key': 'product', 'type': 'str'}, + } + + def __init__(self, *, publisher: str, name: str, product: str, **kwargs) -> None: + super(PurchasePlan, self).__init__(**kwargs) + self.publisher = publisher + self.name = name + self.product = product + + +class RecommendedMachineConfiguration(Model): + """The properties describe the recommended machine configuration for this + Image Definition. These properties are updatable. + + :param v_cp_us: + :type v_cp_us: ~azure.mgmt.compute.v2019_03_01.models.ResourceRange + :param memory: + :type memory: ~azure.mgmt.compute.v2019_03_01.models.ResourceRange + """ + + _attribute_map = { + 'v_cp_us': {'key': 'vCPUs', 'type': 'ResourceRange'}, + 'memory': {'key': 'memory', 'type': 'ResourceRange'}, + } + + def __init__(self, *, v_cp_us=None, memory=None, **kwargs) -> None: + super(RecommendedMachineConfiguration, self).__init__(**kwargs) + self.v_cp_us = v_cp_us + self.memory = memory + + +class RecoveryWalkResponse(Model): + """Response after calling a manual recovery walk. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar walk_performed: Whether the recovery walk was performed + :vartype walk_performed: bool + :ivar next_platform_update_domain: The next update domain that needs to be + walked. Null means walk spanning all update domains has been completed + :vartype next_platform_update_domain: int + """ + + _validation = { + 'walk_performed': {'readonly': True}, + 'next_platform_update_domain': {'readonly': True}, + } + + _attribute_map = { + 'walk_performed': {'key': 'walkPerformed', 'type': 'bool'}, + 'next_platform_update_domain': {'key': 'nextPlatformUpdateDomain', 'type': 'int'}, + } + + def __init__(self, **kwargs) -> None: + super(RecoveryWalkResponse, self).__init__(**kwargs) + self.walk_performed = None + self.next_platform_update_domain = None + + +class RegionalReplicationStatus(Model): + """This is the regional replication status. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar region: The region to which the gallery Image Version is being + replicated to. + :vartype region: str + :ivar state: This is the regional replication state. Possible values + include: 'Unknown', 'Replicating', 'Completed', 'Failed' + :vartype state: str or + ~azure.mgmt.compute.v2019_03_01.models.ReplicationState + :ivar details: The details of the replication status. + :vartype details: str + :ivar progress: It indicates progress of the replication job. + :vartype progress: int + """ + + _validation = { + 'region': {'readonly': True}, + 'state': {'readonly': True}, + 'details': {'readonly': True}, + 'progress': {'readonly': True}, + } + + _attribute_map = { + 'region': {'key': 'region', 'type': 'str'}, + 'state': {'key': 'state', 'type': 'str'}, + 'details': {'key': 'details', 'type': 'str'}, + 'progress': {'key': 'progress', 'type': 'int'}, + } + + def __init__(self, **kwargs) -> None: + super(RegionalReplicationStatus, self).__init__(**kwargs) + self.region = None + self.state = None + self.details = None + self.progress = None + + +class ReplicationStatus(Model): + """This is the replication status of the gallery Image Version. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar aggregated_state: This is the aggregated replication status based on + all the regional replication status flags. Possible values include: + 'Unknown', 'InProgress', 'Completed', 'Failed' + :vartype aggregated_state: str or + ~azure.mgmt.compute.v2019_03_01.models.AggregatedReplicationState + :ivar summary: This is a summary of replication status for each region. + :vartype summary: + list[~azure.mgmt.compute.v2019_03_01.models.RegionalReplicationStatus] + """ + + _validation = { + 'aggregated_state': {'readonly': True}, + 'summary': {'readonly': True}, + } + + _attribute_map = { + 'aggregated_state': {'key': 'aggregatedState', 'type': 'str'}, + 'summary': {'key': 'summary', 'type': '[RegionalReplicationStatus]'}, + } + + def __init__(self, **kwargs) -> None: + super(ReplicationStatus, self).__init__(**kwargs) + self.aggregated_state = None + self.summary = None + + +class RequestRateByIntervalInput(LogAnalyticsInputBase): + """Api request input for LogAnalytics getRequestRateByInterval Api. + + All required parameters must be populated in order to send to Azure. + + :param blob_container_sas_uri: Required. SAS Uri of the logging blob + container to which LogAnalytics Api writes output logs to. + :type blob_container_sas_uri: str + :param from_time: Required. From time of the query + :type from_time: datetime + :param to_time: Required. To time of the query + :type to_time: datetime + :param group_by_throttle_policy: Group query result by Throttle Policy + applied. + :type group_by_throttle_policy: bool + :param group_by_operation_name: Group query result by Operation Name. + :type group_by_operation_name: bool + :param group_by_resource_name: Group query result by Resource Name. + :type group_by_resource_name: bool + :param interval_length: Required. Interval value in minutes used to create + LogAnalytics call rate logs. Possible values include: 'ThreeMins', + 'FiveMins', 'ThirtyMins', 'SixtyMins' + :type interval_length: str or + ~azure.mgmt.compute.v2019_03_01.models.IntervalInMins + """ + + _validation = { + 'blob_container_sas_uri': {'required': True}, + 'from_time': {'required': True}, + 'to_time': {'required': True}, + 'interval_length': {'required': True}, + } + + _attribute_map = { + 'blob_container_sas_uri': {'key': 'blobContainerSasUri', 'type': 'str'}, + 'from_time': {'key': 'fromTime', 'type': 'iso-8601'}, + 'to_time': {'key': 'toTime', 'type': 'iso-8601'}, + 'group_by_throttle_policy': {'key': 'groupByThrottlePolicy', 'type': 'bool'}, + 'group_by_operation_name': {'key': 'groupByOperationName', 'type': 'bool'}, + 'group_by_resource_name': {'key': 'groupByResourceName', 'type': 'bool'}, + 'interval_length': {'key': 'intervalLength', 'type': 'IntervalInMins'}, + } + + def __init__(self, *, blob_container_sas_uri: str, from_time, to_time, interval_length, group_by_throttle_policy: bool=None, group_by_operation_name: bool=None, group_by_resource_name: bool=None, **kwargs) -> None: + super(RequestRateByIntervalInput, self).__init__(blob_container_sas_uri=blob_container_sas_uri, from_time=from_time, to_time=to_time, group_by_throttle_policy=group_by_throttle_policy, group_by_operation_name=group_by_operation_name, group_by_resource_name=group_by_resource_name, **kwargs) + self.interval_length = interval_length + + +class ResourceRange(Model): + """Describes the resource range. + + :param min: The minimum number of the resource. + :type min: int + :param max: The maximum number of the resource. + :type max: int + """ + + _attribute_map = { + 'min': {'key': 'min', 'type': 'int'}, + 'max': {'key': 'max', 'type': 'int'}, + } + + def __init__(self, *, min: int=None, max: int=None, **kwargs) -> None: + super(ResourceRange, self).__init__(**kwargs) + self.min = min + self.max = max + + +class RollbackStatusInfo(Model): + """Information about rollback on failed VM instances after a OS Upgrade + operation. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar successfully_rolledback_instance_count: The number of instances + which have been successfully rolled back. + :vartype successfully_rolledback_instance_count: int + :ivar failed_rolledback_instance_count: The number of instances which + failed to rollback. + :vartype failed_rolledback_instance_count: int + :ivar rollback_error: Error details if OS rollback failed. + :vartype rollback_error: ~azure.mgmt.compute.v2019_03_01.models.ApiError + """ + + _validation = { + 'successfully_rolledback_instance_count': {'readonly': True}, + 'failed_rolledback_instance_count': {'readonly': True}, + 'rollback_error': {'readonly': True}, + } + + _attribute_map = { + 'successfully_rolledback_instance_count': {'key': 'successfullyRolledbackInstanceCount', 'type': 'int'}, + 'failed_rolledback_instance_count': {'key': 'failedRolledbackInstanceCount', 'type': 'int'}, + 'rollback_error': {'key': 'rollbackError', 'type': 'ApiError'}, + } + + def __init__(self, **kwargs) -> None: + super(RollbackStatusInfo, self).__init__(**kwargs) + self.successfully_rolledback_instance_count = None + self.failed_rolledback_instance_count = None + self.rollback_error = None + + +class RollingUpgradePolicy(Model): + """The configuration parameters used while performing a rolling upgrade. + + :param max_batch_instance_percent: The maximum percent of total virtual + machine instances that will be upgraded simultaneously by the rolling + upgrade in one batch. As this is a maximum, unhealthy instances in + previous or future batches can cause the percentage of instances in a + batch to decrease to ensure higher reliability. The default value for this + parameter is 20%. + :type max_batch_instance_percent: int + :param max_unhealthy_instance_percent: The maximum percentage of the total + virtual machine instances in the scale set that can be simultaneously + unhealthy, either as a result of being upgraded, or by being found in an + unhealthy state by the virtual machine health checks before the rolling + upgrade aborts. This constraint will be checked prior to starting any + batch. The default value for this parameter is 20%. + :type max_unhealthy_instance_percent: int + :param max_unhealthy_upgraded_instance_percent: The maximum percentage of + upgraded virtual machine instances that can be found to be in an unhealthy + state. This check will happen after each batch is upgraded. If this + percentage is ever exceeded, the rolling update aborts. The default value + for this parameter is 20%. + :type max_unhealthy_upgraded_instance_percent: int + :param pause_time_between_batches: The wait time between completing the + update for all virtual machines in one batch and starting the next batch. + The time duration should be specified in ISO 8601 format. The default + value is 0 seconds (PT0S). + :type pause_time_between_batches: str + """ + + _validation = { + 'max_batch_instance_percent': {'maximum': 100, 'minimum': 5}, + 'max_unhealthy_instance_percent': {'maximum': 100, 'minimum': 5}, + 'max_unhealthy_upgraded_instance_percent': {'maximum': 100, 'minimum': 0}, + } + + _attribute_map = { + 'max_batch_instance_percent': {'key': 'maxBatchInstancePercent', 'type': 'int'}, + 'max_unhealthy_instance_percent': {'key': 'maxUnhealthyInstancePercent', 'type': 'int'}, + 'max_unhealthy_upgraded_instance_percent': {'key': 'maxUnhealthyUpgradedInstancePercent', 'type': 'int'}, + 'pause_time_between_batches': {'key': 'pauseTimeBetweenBatches', 'type': 'str'}, + } + + def __init__(self, *, max_batch_instance_percent: int=None, max_unhealthy_instance_percent: int=None, max_unhealthy_upgraded_instance_percent: int=None, pause_time_between_batches: str=None, **kwargs) -> None: + super(RollingUpgradePolicy, self).__init__(**kwargs) + self.max_batch_instance_percent = max_batch_instance_percent + self.max_unhealthy_instance_percent = max_unhealthy_instance_percent + self.max_unhealthy_upgraded_instance_percent = max_unhealthy_upgraded_instance_percent + self.pause_time_between_batches = pause_time_between_batches + + +class RollingUpgradeProgressInfo(Model): + """Information about the number of virtual machine instances in each upgrade + state. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar successful_instance_count: The number of instances that have been + successfully upgraded. + :vartype successful_instance_count: int + :ivar failed_instance_count: The number of instances that have failed to + be upgraded successfully. + :vartype failed_instance_count: int + :ivar in_progress_instance_count: The number of instances that are + currently being upgraded. + :vartype in_progress_instance_count: int + :ivar pending_instance_count: The number of instances that have not yet + begun to be upgraded. + :vartype pending_instance_count: int + """ + + _validation = { + 'successful_instance_count': {'readonly': True}, + 'failed_instance_count': {'readonly': True}, + 'in_progress_instance_count': {'readonly': True}, + 'pending_instance_count': {'readonly': True}, + } + + _attribute_map = { + 'successful_instance_count': {'key': 'successfulInstanceCount', 'type': 'int'}, + 'failed_instance_count': {'key': 'failedInstanceCount', 'type': 'int'}, + 'in_progress_instance_count': {'key': 'inProgressInstanceCount', 'type': 'int'}, + 'pending_instance_count': {'key': 'pendingInstanceCount', 'type': 'int'}, + } + + def __init__(self, **kwargs) -> None: + super(RollingUpgradeProgressInfo, self).__init__(**kwargs) + self.successful_instance_count = None + self.failed_instance_count = None + self.in_progress_instance_count = None + self.pending_instance_count = None + + +class RollingUpgradeRunningStatus(Model): + """Information about the current running state of the overall upgrade. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar code: Code indicating the current status of the upgrade. Possible + values include: 'RollingForward', 'Cancelled', 'Completed', 'Faulted' + :vartype code: str or + ~azure.mgmt.compute.v2019_03_01.models.RollingUpgradeStatusCode + :ivar start_time: Start time of the upgrade. + :vartype start_time: datetime + :ivar last_action: The last action performed on the rolling upgrade. + Possible values include: 'Start', 'Cancel' + :vartype last_action: str or + ~azure.mgmt.compute.v2019_03_01.models.RollingUpgradeActionType + :ivar last_action_time: Last action time of the upgrade. + :vartype last_action_time: datetime + """ + + _validation = { + 'code': {'readonly': True}, + 'start_time': {'readonly': True}, + 'last_action': {'readonly': True}, + 'last_action_time': {'readonly': True}, + } + + _attribute_map = { + 'code': {'key': 'code', 'type': 'RollingUpgradeStatusCode'}, + 'start_time': {'key': 'startTime', 'type': 'iso-8601'}, + 'last_action': {'key': 'lastAction', 'type': 'RollingUpgradeActionType'}, + 'last_action_time': {'key': 'lastActionTime', 'type': 'iso-8601'}, + } + + def __init__(self, **kwargs) -> None: + super(RollingUpgradeRunningStatus, self).__init__(**kwargs) + self.code = None + self.start_time = None + self.last_action = None + self.last_action_time = None + + +class RollingUpgradeStatusInfo(Resource): + """The status of the latest virtual machine scale set rolling upgrade. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource Id + :vartype id: str + :ivar name: Resource name + :vartype name: str + :ivar type: Resource type + :vartype type: str + :param location: Required. Resource location + :type location: str + :param tags: Resource tags + :type tags: dict[str, str] + :ivar policy: The rolling upgrade policies applied for this upgrade. + :vartype policy: + ~azure.mgmt.compute.v2019_03_01.models.RollingUpgradePolicy + :ivar running_status: Information about the current running state of the + overall upgrade. + :vartype running_status: + ~azure.mgmt.compute.v2019_03_01.models.RollingUpgradeRunningStatus + :ivar progress: Information about the number of virtual machine instances + in each upgrade state. + :vartype progress: + ~azure.mgmt.compute.v2019_03_01.models.RollingUpgradeProgressInfo + :ivar error: Error details for this upgrade, if there are any. + :vartype error: ~azure.mgmt.compute.v2019_03_01.models.ApiError + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + 'policy': {'readonly': True}, + 'running_status': {'readonly': True}, + 'progress': {'readonly': True}, + 'error': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'policy': {'key': 'properties.policy', 'type': 'RollingUpgradePolicy'}, + 'running_status': {'key': 'properties.runningStatus', 'type': 'RollingUpgradeRunningStatus'}, + 'progress': {'key': 'properties.progress', 'type': 'RollingUpgradeProgressInfo'}, + 'error': {'key': 'properties.error', 'type': 'ApiError'}, + } + + def __init__(self, *, location: str, tags=None, **kwargs) -> None: + super(RollingUpgradeStatusInfo, self).__init__(location=location, tags=tags, **kwargs) + self.policy = None + self.running_status = None + self.progress = None + self.error = None + + +class RunCommandDocumentBase(Model): + """Describes the properties of a Run Command metadata. + + All required parameters must be populated in order to send to Azure. + + :param schema: Required. The VM run command schema. + :type schema: str + :param id: Required. The VM run command id. + :type id: str + :param os_type: Required. The Operating System type. Possible values + include: 'Windows', 'Linux' + :type os_type: str or + ~azure.mgmt.compute.v2019_03_01.models.OperatingSystemTypes + :param label: Required. The VM run command label. + :type label: str + :param description: Required. The VM run command description. + :type description: str + """ + + _validation = { + 'schema': {'required': True}, + 'id': {'required': True}, + 'os_type': {'required': True}, + 'label': {'required': True}, + 'description': {'required': True}, + } + + _attribute_map = { + 'schema': {'key': '$schema', 'type': 'str'}, + 'id': {'key': 'id', 'type': 'str'}, + 'os_type': {'key': 'osType', 'type': 'OperatingSystemTypes'}, + 'label': {'key': 'label', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + } + + def __init__(self, *, schema: str, id: str, os_type, label: str, description: str, **kwargs) -> None: + super(RunCommandDocumentBase, self).__init__(**kwargs) + self.schema = schema + self.id = id + self.os_type = os_type + self.label = label + self.description = description + + +class RunCommandDocument(RunCommandDocumentBase): + """Describes the properties of a Run Command. + + All required parameters must be populated in order to send to Azure. + + :param schema: Required. The VM run command schema. + :type schema: str + :param id: Required. The VM run command id. + :type id: str + :param os_type: Required. The Operating System type. Possible values + include: 'Windows', 'Linux' + :type os_type: str or + ~azure.mgmt.compute.v2019_03_01.models.OperatingSystemTypes + :param label: Required. The VM run command label. + :type label: str + :param description: Required. The VM run command description. + :type description: str + :param script: Required. The script to be executed. + :type script: list[str] + :param parameters: The parameters used by the script. + :type parameters: + list[~azure.mgmt.compute.v2019_03_01.models.RunCommandParameterDefinition] + """ + + _validation = { + 'schema': {'required': True}, + 'id': {'required': True}, + 'os_type': {'required': True}, + 'label': {'required': True}, + 'description': {'required': True}, + 'script': {'required': True}, + } + + _attribute_map = { + 'schema': {'key': '$schema', 'type': 'str'}, + 'id': {'key': 'id', 'type': 'str'}, + 'os_type': {'key': 'osType', 'type': 'OperatingSystemTypes'}, + 'label': {'key': 'label', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + 'script': {'key': 'script', 'type': '[str]'}, + 'parameters': {'key': 'parameters', 'type': '[RunCommandParameterDefinition]'}, + } + + def __init__(self, *, schema: str, id: str, os_type, label: str, description: str, script, parameters=None, **kwargs) -> None: + super(RunCommandDocument, self).__init__(schema=schema, id=id, os_type=os_type, label=label, description=description, **kwargs) + self.script = script + self.parameters = parameters + + +class RunCommandInput(Model): + """Capture Virtual Machine parameters. + + All required parameters must be populated in order to send to Azure. + + :param command_id: Required. The run command id. + :type command_id: str + :param script: Optional. The script to be executed. When this value is + given, the given script will override the default script of the command. + :type script: list[str] + :param parameters: The run command parameters. + :type parameters: + list[~azure.mgmt.compute.v2019_03_01.models.RunCommandInputParameter] + """ + + _validation = { + 'command_id': {'required': True}, + } + + _attribute_map = { + 'command_id': {'key': 'commandId', 'type': 'str'}, + 'script': {'key': 'script', 'type': '[str]'}, + 'parameters': {'key': 'parameters', 'type': '[RunCommandInputParameter]'}, + } + + def __init__(self, *, command_id: str, script=None, parameters=None, **kwargs) -> None: + super(RunCommandInput, self).__init__(**kwargs) + self.command_id = command_id + self.script = script + self.parameters = parameters + + +class RunCommandInputParameter(Model): + """Describes the properties of a run command parameter. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. The run command parameter name. + :type name: str + :param value: Required. The run command parameter value. + :type value: str + """ + + _validation = { + 'name': {'required': True}, + 'value': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'value': {'key': 'value', 'type': 'str'}, + } + + def __init__(self, *, name: str, value: str, **kwargs) -> None: + super(RunCommandInputParameter, self).__init__(**kwargs) + self.name = name + self.value = value + + +class RunCommandParameterDefinition(Model): + """Describes the properties of a run command parameter. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. The run command parameter name. + :type name: str + :param type: Required. The run command parameter type. + :type type: str + :param default_value: The run command parameter default value. + :type default_value: str + :param required: The run command parameter required. Default value: False + . + :type required: bool + """ + + _validation = { + 'name': {'required': True}, + 'type': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'default_value': {'key': 'defaultValue', 'type': 'str'}, + 'required': {'key': 'required', 'type': 'bool'}, + } + + def __init__(self, *, name: str, type: str, default_value: str=None, required: bool=False, **kwargs) -> None: + super(RunCommandParameterDefinition, self).__init__(**kwargs) + self.name = name + self.type = type + self.default_value = default_value + self.required = required + + +class RunCommandResult(Model): + """RunCommandResult. + + :param value: Run command operation response. + :type value: + list[~azure.mgmt.compute.v2019_03_01.models.InstanceViewStatus] + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[InstanceViewStatus]'}, + } + + def __init__(self, *, value=None, **kwargs) -> None: + super(RunCommandResult, self).__init__(**kwargs) + self.value = value + + +class Sku(Model): + """Describes a virtual machine scale set sku. + + :param name: The sku name. + :type name: str + :param tier: Specifies the tier of virtual machines in a scale set.

    Possible Values:

    **Standard**

    **Basic** + :type tier: str + :param capacity: Specifies the number of virtual machines in the scale + set. + :type capacity: long + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'tier': {'key': 'tier', 'type': 'str'}, + 'capacity': {'key': 'capacity', 'type': 'long'}, + } + + def __init__(self, *, name: str=None, tier: str=None, capacity: int=None, **kwargs) -> None: + super(Sku, self).__init__(**kwargs) + self.name = name + self.tier = tier + self.capacity = capacity + + +class SshConfiguration(Model): + """SSH configuration for Linux based VMs running on Azure. + + :param public_keys: The list of SSH public keys used to authenticate with + linux based VMs. + :type public_keys: + list[~azure.mgmt.compute.v2019_03_01.models.SshPublicKey] + """ + + _attribute_map = { + 'public_keys': {'key': 'publicKeys', 'type': '[SshPublicKey]'}, + } + + def __init__(self, *, public_keys=None, **kwargs) -> None: + super(SshConfiguration, self).__init__(**kwargs) + self.public_keys = public_keys + + +class SshPublicKey(Model): + """Contains information about SSH certificate public key and the path on the + Linux VM where the public key is placed. + + :param path: Specifies the full path on the created VM where ssh public + key is stored. If the file already exists, the specified key is appended + to the file. Example: /home/user/.ssh/authorized_keys + :type path: str + :param key_data: SSH public key certificate used to authenticate with the + VM through ssh. The key needs to be at least 2048-bit and in ssh-rsa + format.

    For creating ssh keys, see [Create SSH keys on Linux and + Mac for Linux VMs in + Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-mac-create-ssh-keys?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json). + :type key_data: str + """ + + _attribute_map = { + 'path': {'key': 'path', 'type': 'str'}, + 'key_data': {'key': 'keyData', 'type': 'str'}, + } + + def __init__(self, *, path: str=None, key_data: str=None, **kwargs) -> None: + super(SshPublicKey, self).__init__(**kwargs) + self.path = path + self.key_data = key_data + + +class StorageProfile(Model): + """Specifies the storage settings for the virtual machine disks. + + :param image_reference: Specifies information about the image to use. You + can specify information about platform images, marketplace images, or + virtual machine images. This element is required when you want to use a + platform image, marketplace image, or virtual machine image, but is not + used in other creation operations. + :type image_reference: + ~azure.mgmt.compute.v2019_03_01.models.ImageReference + :param os_disk: Specifies information about the operating system disk used + by the virtual machine.

    For more information about disks, see + [About disks and VHDs for Azure virtual + machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-about-disks-vhds?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). + :type os_disk: ~azure.mgmt.compute.v2019_03_01.models.OSDisk + :param data_disks: Specifies the parameters that are used to add a data + disk to a virtual machine.

    For more information about disks, see + [About disks and VHDs for Azure virtual + machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-about-disks-vhds?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). + :type data_disks: list[~azure.mgmt.compute.v2019_03_01.models.DataDisk] + """ + + _attribute_map = { + 'image_reference': {'key': 'imageReference', 'type': 'ImageReference'}, + 'os_disk': {'key': 'osDisk', 'type': 'OSDisk'}, + 'data_disks': {'key': 'dataDisks', 'type': '[DataDisk]'}, + } + + def __init__(self, *, image_reference=None, os_disk=None, data_disks=None, **kwargs) -> None: + super(StorageProfile, self).__init__(**kwargs) + self.image_reference = image_reference + self.os_disk = os_disk + self.data_disks = data_disks + + +class SubResourceReadOnly(Model): + """SubResourceReadOnly. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource Id + :vartype id: str + """ + + _validation = { + 'id': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(SubResourceReadOnly, self).__init__(**kwargs) + self.id = None + + +class TargetRegion(Model): + """Describes the target region information. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. The name of the region. + :type name: str + :param regional_replica_count: The number of replicas of the Image Version + to be created per region. This property is updatable. + :type regional_replica_count: int + :param storage_account_type: Specifies the storage account type to be used + to store the image. This property is not updatable. Possible values + include: 'Standard_LRS', 'Standard_ZRS' + :type storage_account_type: str or + ~azure.mgmt.compute.v2019_03_01.models.StorageAccountType + """ + + _validation = { + 'name': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'regional_replica_count': {'key': 'regionalReplicaCount', 'type': 'int'}, + 'storage_account_type': {'key': 'storageAccountType', 'type': 'str'}, + } + + def __init__(self, *, name: str, regional_replica_count: int=None, storage_account_type=None, **kwargs) -> None: + super(TargetRegion, self).__init__(**kwargs) + self.name = name + self.regional_replica_count = regional_replica_count + self.storage_account_type = storage_account_type + + +class ThrottledRequestsInput(LogAnalyticsInputBase): + """Api request input for LogAnalytics getThrottledRequests Api. + + All required parameters must be populated in order to send to Azure. + + :param blob_container_sas_uri: Required. SAS Uri of the logging blob + container to which LogAnalytics Api writes output logs to. + :type blob_container_sas_uri: str + :param from_time: Required. From time of the query + :type from_time: datetime + :param to_time: Required. To time of the query + :type to_time: datetime + :param group_by_throttle_policy: Group query result by Throttle Policy + applied. + :type group_by_throttle_policy: bool + :param group_by_operation_name: Group query result by Operation Name. + :type group_by_operation_name: bool + :param group_by_resource_name: Group query result by Resource Name. + :type group_by_resource_name: bool + """ + + _validation = { + 'blob_container_sas_uri': {'required': True}, + 'from_time': {'required': True}, + 'to_time': {'required': True}, + } + + _attribute_map = { + 'blob_container_sas_uri': {'key': 'blobContainerSasUri', 'type': 'str'}, + 'from_time': {'key': 'fromTime', 'type': 'iso-8601'}, + 'to_time': {'key': 'toTime', 'type': 'iso-8601'}, + 'group_by_throttle_policy': {'key': 'groupByThrottlePolicy', 'type': 'bool'}, + 'group_by_operation_name': {'key': 'groupByOperationName', 'type': 'bool'}, + 'group_by_resource_name': {'key': 'groupByResourceName', 'type': 'bool'}, + } + + def __init__(self, *, blob_container_sas_uri: str, from_time, to_time, group_by_throttle_policy: bool=None, group_by_operation_name: bool=None, group_by_resource_name: bool=None, **kwargs) -> None: + super(ThrottledRequestsInput, self).__init__(blob_container_sas_uri=blob_container_sas_uri, from_time=from_time, to_time=to_time, group_by_throttle_policy=group_by_throttle_policy, group_by_operation_name=group_by_operation_name, group_by_resource_name=group_by_resource_name, **kwargs) + + +class UpgradeOperationHistoricalStatusInfo(Model): + """Virtual Machine Scale Set OS Upgrade History operation response. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar properties: Information about the properties of the upgrade + operation. + :vartype properties: + ~azure.mgmt.compute.v2019_03_01.models.UpgradeOperationHistoricalStatusInfoProperties + :ivar type: Resource type + :vartype type: str + :ivar location: Resource location + :vartype location: str + """ + + _validation = { + 'properties': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'readonly': True}, + } + + _attribute_map = { + 'properties': {'key': 'properties', 'type': 'UpgradeOperationHistoricalStatusInfoProperties'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(UpgradeOperationHistoricalStatusInfo, self).__init__(**kwargs) + self.properties = None + self.type = None + self.location = None + + +class UpgradeOperationHistoricalStatusInfoProperties(Model): + """Describes each OS upgrade on the Virtual Machine Scale Set. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar running_status: Information about the overall status of the upgrade + operation. + :vartype running_status: + ~azure.mgmt.compute.v2019_03_01.models.UpgradeOperationHistoryStatus + :ivar progress: Counts of the VMs in each state. + :vartype progress: + ~azure.mgmt.compute.v2019_03_01.models.RollingUpgradeProgressInfo + :ivar error: Error Details for this upgrade if there are any. + :vartype error: ~azure.mgmt.compute.v2019_03_01.models.ApiError + :ivar started_by: Invoker of the Upgrade Operation. Possible values + include: 'Unknown', 'User', 'Platform' + :vartype started_by: str or + ~azure.mgmt.compute.v2019_03_01.models.UpgradeOperationInvoker + :ivar target_image_reference: Image Reference details + :vartype target_image_reference: + ~azure.mgmt.compute.v2019_03_01.models.ImageReference + :ivar rollback_info: Information about OS rollback if performed + :vartype rollback_info: + ~azure.mgmt.compute.v2019_03_01.models.RollbackStatusInfo + """ + + _validation = { + 'running_status': {'readonly': True}, + 'progress': {'readonly': True}, + 'error': {'readonly': True}, + 'started_by': {'readonly': True}, + 'target_image_reference': {'readonly': True}, + 'rollback_info': {'readonly': True}, + } + + _attribute_map = { + 'running_status': {'key': 'runningStatus', 'type': 'UpgradeOperationHistoryStatus'}, + 'progress': {'key': 'progress', 'type': 'RollingUpgradeProgressInfo'}, + 'error': {'key': 'error', 'type': 'ApiError'}, + 'started_by': {'key': 'startedBy', 'type': 'UpgradeOperationInvoker'}, + 'target_image_reference': {'key': 'targetImageReference', 'type': 'ImageReference'}, + 'rollback_info': {'key': 'rollbackInfo', 'type': 'RollbackStatusInfo'}, + } + + def __init__(self, **kwargs) -> None: + super(UpgradeOperationHistoricalStatusInfoProperties, self).__init__(**kwargs) + self.running_status = None + self.progress = None + self.error = None + self.started_by = None + self.target_image_reference = None + self.rollback_info = None + + +class UpgradeOperationHistoryStatus(Model): + """Information about the current running state of the overall upgrade. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar code: Code indicating the current status of the upgrade. Possible + values include: 'RollingForward', 'Cancelled', 'Completed', 'Faulted' + :vartype code: str or ~azure.mgmt.compute.v2019_03_01.models.UpgradeState + :ivar start_time: Start time of the upgrade. + :vartype start_time: datetime + :ivar end_time: End time of the upgrade. + :vartype end_time: datetime + """ + + _validation = { + 'code': {'readonly': True}, + 'start_time': {'readonly': True}, + 'end_time': {'readonly': True}, + } + + _attribute_map = { + 'code': {'key': 'code', 'type': 'UpgradeState'}, + 'start_time': {'key': 'startTime', 'type': 'iso-8601'}, + 'end_time': {'key': 'endTime', 'type': 'iso-8601'}, + } + + def __init__(self, **kwargs) -> None: + super(UpgradeOperationHistoryStatus, self).__init__(**kwargs) + self.code = None + self.start_time = None + self.end_time = None + + +class UpgradePolicy(Model): + """Describes an upgrade policy - automatic, manual, or rolling. + + :param mode: Specifies the mode of an upgrade to virtual machines in the + scale set.

    Possible values are:

    **Manual** - You + control the application of updates to virtual machines in the scale set. + You do this by using the manualUpgrade action.

    **Automatic** - + All virtual machines in the scale set are automatically updated at the + same time. Possible values include: 'Automatic', 'Manual', 'Rolling' + :type mode: str or ~azure.mgmt.compute.v2019_03_01.models.UpgradeMode + :param rolling_upgrade_policy: The configuration parameters used while + performing a rolling upgrade. + :type rolling_upgrade_policy: + ~azure.mgmt.compute.v2019_03_01.models.RollingUpgradePolicy + :param automatic_os_upgrade_policy: Configuration parameters used for + performing automatic OS Upgrade. + :type automatic_os_upgrade_policy: + ~azure.mgmt.compute.v2019_03_01.models.AutomaticOSUpgradePolicy + """ + + _attribute_map = { + 'mode': {'key': 'mode', 'type': 'UpgradeMode'}, + 'rolling_upgrade_policy': {'key': 'rollingUpgradePolicy', 'type': 'RollingUpgradePolicy'}, + 'automatic_os_upgrade_policy': {'key': 'automaticOSUpgradePolicy', 'type': 'AutomaticOSUpgradePolicy'}, + } + + def __init__(self, *, mode=None, rolling_upgrade_policy=None, automatic_os_upgrade_policy=None, **kwargs) -> None: + super(UpgradePolicy, self).__init__(**kwargs) + self.mode = mode + self.rolling_upgrade_policy = rolling_upgrade_policy + self.automatic_os_upgrade_policy = automatic_os_upgrade_policy + + +class Usage(Model): + """Describes Compute Resource Usage. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar unit: Required. An enum describing the unit of usage measurement. + Default value: "Count" . + :vartype unit: str + :param current_value: Required. The current usage of the resource. + :type current_value: int + :param limit: Required. The maximum permitted usage of the resource. + :type limit: long + :param name: Required. The name of the type of usage. + :type name: ~azure.mgmt.compute.v2019_03_01.models.UsageName + """ + + _validation = { + 'unit': {'required': True, 'constant': True}, + 'current_value': {'required': True}, + 'limit': {'required': True}, + 'name': {'required': True}, + } + + _attribute_map = { + 'unit': {'key': 'unit', 'type': 'str'}, + 'current_value': {'key': 'currentValue', 'type': 'int'}, + 'limit': {'key': 'limit', 'type': 'long'}, + 'name': {'key': 'name', 'type': 'UsageName'}, + } + + unit = "Count" + + def __init__(self, *, current_value: int, limit: int, name, **kwargs) -> None: + super(Usage, self).__init__(**kwargs) + self.current_value = current_value + self.limit = limit + self.name = name + + +class UsageName(Model): + """The Usage Names. + + :param value: The name of the resource. + :type value: str + :param localized_value: The localized name of the resource. + :type localized_value: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': 'str'}, + 'localized_value': {'key': 'localizedValue', 'type': 'str'}, + } + + def __init__(self, *, value: str=None, localized_value: str=None, **kwargs) -> None: + super(UsageName, self).__init__(**kwargs) + self.value = value + self.localized_value = localized_value + + +class UserArtifactSource(Model): + """The source image from which the Image Version is going to be created. + + All required parameters must be populated in order to send to Azure. + + :param file_name: Required. Required. The fileName of the artifact. + :type file_name: str + :param media_link: Required. Required. The mediaLink of the artifact, must + be a readable storage blob. + :type media_link: str + """ + + _validation = { + 'file_name': {'required': True}, + 'media_link': {'required': True}, + } + + _attribute_map = { + 'file_name': {'key': 'fileName', 'type': 'str'}, + 'media_link': {'key': 'mediaLink', 'type': 'str'}, + } + + def __init__(self, *, file_name: str, media_link: str, **kwargs) -> None: + super(UserArtifactSource, self).__init__(**kwargs) + self.file_name = file_name + self.media_link = media_link + + +class VaultCertificate(Model): + """Describes a single certificate reference in a Key Vault, and where the + certificate should reside on the VM. + + :param certificate_url: This is the URL of a certificate that has been + uploaded to Key Vault as a secret. For adding a secret to the Key Vault, + see [Add a key or secret to the key + vault](https://docs.microsoft.com/azure/key-vault/key-vault-get-started/#add). + In this case, your certificate needs to be It is the Base64 encoding of + the following JSON Object which is encoded in UTF-8:

    {
    + "data":"",
    "dataType":"pfx",
    + "password":""
    } + :type certificate_url: str + :param certificate_store: For Windows VMs, specifies the certificate store + on the Virtual Machine to which the certificate should be added. The + specified certificate store is implicitly in the LocalMachine account. +

    For Linux VMs, the certificate file is placed under the + /var/lib/waagent directory, with the file name + <UppercaseThumbprint>.crt for the X509 certificate file and + <UppercaseThumbprint>.prv for private key. Both of these files are + .pem formatted. + :type certificate_store: str + """ + + _attribute_map = { + 'certificate_url': {'key': 'certificateUrl', 'type': 'str'}, + 'certificate_store': {'key': 'certificateStore', 'type': 'str'}, + } + + def __init__(self, *, certificate_url: str=None, certificate_store: str=None, **kwargs) -> None: + super(VaultCertificate, self).__init__(**kwargs) + self.certificate_url = certificate_url + self.certificate_store = certificate_store + + +class VaultSecretGroup(Model): + """Describes a set of certificates which are all in the same Key Vault. + + :param source_vault: The relative URL of the Key Vault containing all of + the certificates in VaultCertificates. + :type source_vault: ~azure.mgmt.compute.v2019_03_01.models.SubResource + :param vault_certificates: The list of key vault references in SourceVault + which contain certificates. + :type vault_certificates: + list[~azure.mgmt.compute.v2019_03_01.models.VaultCertificate] + """ + + _attribute_map = { + 'source_vault': {'key': 'sourceVault', 'type': 'SubResource'}, + 'vault_certificates': {'key': 'vaultCertificates', 'type': '[VaultCertificate]'}, + } + + def __init__(self, *, source_vault=None, vault_certificates=None, **kwargs) -> None: + super(VaultSecretGroup, self).__init__(**kwargs) + self.source_vault = source_vault + self.vault_certificates = vault_certificates + + +class VirtualHardDisk(Model): + """Describes the uri of a disk. + + :param uri: Specifies the virtual hard disk's uri. + :type uri: str + """ + + _attribute_map = { + 'uri': {'key': 'uri', 'type': 'str'}, + } + + def __init__(self, *, uri: str=None, **kwargs) -> None: + super(VirtualHardDisk, self).__init__(**kwargs) + self.uri = uri + + +class VirtualMachine(Resource): + """Describes a Virtual Machine. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource Id + :vartype id: str + :ivar name: Resource name + :vartype name: str + :ivar type: Resource type + :vartype type: str + :param location: Required. Resource location + :type location: str + :param tags: Resource tags + :type tags: dict[str, str] + :param plan: Specifies information about the marketplace image used to + create the virtual machine. This element is only used for marketplace + images. Before you can use a marketplace image from an API, you must + enable the image for programmatic use. In the Azure portal, find the + marketplace image that you want to use and then click **Want to deploy + programmatically, Get Started ->**. Enter any required information and + then click **Save**. + :type plan: ~azure.mgmt.compute.v2019_03_01.models.Plan + :param hardware_profile: Specifies the hardware settings for the virtual + machine. + :type hardware_profile: + ~azure.mgmt.compute.v2019_03_01.models.HardwareProfile + :param storage_profile: Specifies the storage settings for the virtual + machine disks. + :type storage_profile: + ~azure.mgmt.compute.v2019_03_01.models.StorageProfile + :param additional_capabilities: Specifies additional capabilities enabled + or disabled on the virtual machine. + :type additional_capabilities: + ~azure.mgmt.compute.v2019_03_01.models.AdditionalCapabilities + :param os_profile: Specifies the operating system settings for the virtual + machine. + :type os_profile: ~azure.mgmt.compute.v2019_03_01.models.OSProfile + :param network_profile: Specifies the network interfaces of the virtual + machine. + :type network_profile: + ~azure.mgmt.compute.v2019_03_01.models.NetworkProfile + :param diagnostics_profile: Specifies the boot diagnostic settings state. +

    Minimum api-version: 2015-06-15. + :type diagnostics_profile: + ~azure.mgmt.compute.v2019_03_01.models.DiagnosticsProfile + :param availability_set: Specifies information about the availability set + that the virtual machine should be assigned to. Virtual machines specified + in the same availability set are allocated to different nodes to maximize + availability. For more information about availability sets, see [Manage + the availability of virtual + machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-manage-availability?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). +

    For more information on Azure planned maintenance, see [Planned + maintenance for virtual machines in + Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-planned-maintenance?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json) +

    Currently, a VM can only be added to availability set at creation + time. An existing VM cannot be added to an availability set. + :type availability_set: ~azure.mgmt.compute.v2019_03_01.models.SubResource + :param proximity_placement_group: Specifies information about the + proximity placement group that the virtual machine should be assigned to. +

    Minimum api-version: 2018-04-01. + :type proximity_placement_group: + ~azure.mgmt.compute.v2019_03_01.models.SubResource + :param host: Specifies information about the dedicated host that the + virtual machine resides in.

    Minimum api-version: 2018-10-01. + :type host: ~azure.mgmt.compute.v2019_03_01.models.SubResource + :ivar provisioning_state: The provisioning state, which only appears in + the response. + :vartype provisioning_state: str + :ivar instance_view: The virtual machine instance view. + :vartype instance_view: + ~azure.mgmt.compute.v2019_03_01.models.VirtualMachineInstanceView + :param license_type: Specifies that the image or disk that is being used + was licensed on-premises. This element is only used for images that + contain the Windows Server operating system.

    Possible values are: +

    Windows_Client

    Windows_Server

    If this element + is included in a request for an update, the value must match the initial + value. This value cannot be updated.

    For more information, see + [Azure Hybrid Use Benefit for Windows + Server](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-hybrid-use-benefit-licensing?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json) +

    Minimum api-version: 2015-06-15 + :type license_type: str + :ivar vm_id: Specifies the VM unique ID which is a 128-bits identifier + that is encoded and stored in all Azure IaaS VMs SMBIOS and can be read + using platform BIOS commands. + :vartype vm_id: str + :ivar resources: The virtual machine child extension resources. + :vartype resources: + list[~azure.mgmt.compute.v2019_03_01.models.VirtualMachineExtension] + :param identity: The identity of the virtual machine, if configured. + :type identity: + ~azure.mgmt.compute.v2019_03_01.models.VirtualMachineIdentity + :param zones: The virtual machine zones. + :type zones: list[str] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + 'provisioning_state': {'readonly': True}, + 'instance_view': {'readonly': True}, + 'vm_id': {'readonly': True}, + 'resources': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'plan': {'key': 'plan', 'type': 'Plan'}, + 'hardware_profile': {'key': 'properties.hardwareProfile', 'type': 'HardwareProfile'}, + 'storage_profile': {'key': 'properties.storageProfile', 'type': 'StorageProfile'}, + 'additional_capabilities': {'key': 'properties.additionalCapabilities', 'type': 'AdditionalCapabilities'}, + 'os_profile': {'key': 'properties.osProfile', 'type': 'OSProfile'}, + 'network_profile': {'key': 'properties.networkProfile', 'type': 'NetworkProfile'}, + 'diagnostics_profile': {'key': 'properties.diagnosticsProfile', 'type': 'DiagnosticsProfile'}, + 'availability_set': {'key': 'properties.availabilitySet', 'type': 'SubResource'}, + 'proximity_placement_group': {'key': 'properties.proximityPlacementGroup', 'type': 'SubResource'}, + 'host': {'key': 'properties.host', 'type': 'SubResource'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'instance_view': {'key': 'properties.instanceView', 'type': 'VirtualMachineInstanceView'}, + 'license_type': {'key': 'properties.licenseType', 'type': 'str'}, + 'vm_id': {'key': 'properties.vmId', 'type': 'str'}, + 'resources': {'key': 'resources', 'type': '[VirtualMachineExtension]'}, + 'identity': {'key': 'identity', 'type': 'VirtualMachineIdentity'}, + 'zones': {'key': 'zones', 'type': '[str]'}, + } + + def __init__(self, *, location: str, tags=None, plan=None, hardware_profile=None, storage_profile=None, additional_capabilities=None, os_profile=None, network_profile=None, diagnostics_profile=None, availability_set=None, proximity_placement_group=None, host=None, license_type: str=None, identity=None, zones=None, **kwargs) -> None: + super(VirtualMachine, self).__init__(location=location, tags=tags, **kwargs) + self.plan = plan + self.hardware_profile = hardware_profile + self.storage_profile = storage_profile + self.additional_capabilities = additional_capabilities + self.os_profile = os_profile + self.network_profile = network_profile + self.diagnostics_profile = diagnostics_profile + self.availability_set = availability_set + self.proximity_placement_group = proximity_placement_group + self.host = host + self.provisioning_state = None + self.instance_view = None + self.license_type = license_type + self.vm_id = None + self.resources = None + self.identity = identity + self.zones = zones + + +class VirtualMachineAgentInstanceView(Model): + """The instance view of the VM Agent running on the virtual machine. + + :param vm_agent_version: The VM Agent full version. + :type vm_agent_version: str + :param extension_handlers: The virtual machine extension handler instance + view. + :type extension_handlers: + list[~azure.mgmt.compute.v2019_03_01.models.VirtualMachineExtensionHandlerInstanceView] + :param statuses: The resource status information. + :type statuses: + list[~azure.mgmt.compute.v2019_03_01.models.InstanceViewStatus] + """ + + _attribute_map = { + 'vm_agent_version': {'key': 'vmAgentVersion', 'type': 'str'}, + 'extension_handlers': {'key': 'extensionHandlers', 'type': '[VirtualMachineExtensionHandlerInstanceView]'}, + 'statuses': {'key': 'statuses', 'type': '[InstanceViewStatus]'}, + } + + def __init__(self, *, vm_agent_version: str=None, extension_handlers=None, statuses=None, **kwargs) -> None: + super(VirtualMachineAgentInstanceView, self).__init__(**kwargs) + self.vm_agent_version = vm_agent_version + self.extension_handlers = extension_handlers + self.statuses = statuses + + +class VirtualMachineCaptureParameters(Model): + """Capture Virtual Machine parameters. + + All required parameters must be populated in order to send to Azure. + + :param vhd_prefix: Required. The captured virtual hard disk's name prefix. + :type vhd_prefix: str + :param destination_container_name: Required. The destination container + name. + :type destination_container_name: str + :param overwrite_vhds: Required. Specifies whether to overwrite the + destination virtual hard disk, in case of conflict. + :type overwrite_vhds: bool + """ + + _validation = { + 'vhd_prefix': {'required': True}, + 'destination_container_name': {'required': True}, + 'overwrite_vhds': {'required': True}, + } + + _attribute_map = { + 'vhd_prefix': {'key': 'vhdPrefix', 'type': 'str'}, + 'destination_container_name': {'key': 'destinationContainerName', 'type': 'str'}, + 'overwrite_vhds': {'key': 'overwriteVhds', 'type': 'bool'}, + } + + def __init__(self, *, vhd_prefix: str, destination_container_name: str, overwrite_vhds: bool, **kwargs) -> None: + super(VirtualMachineCaptureParameters, self).__init__(**kwargs) + self.vhd_prefix = vhd_prefix + self.destination_container_name = destination_container_name + self.overwrite_vhds = overwrite_vhds + + +class VirtualMachineCaptureResult(SubResource): + """Output of virtual machine capture operation. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :param id: Resource Id + :type id: str + :ivar schema: the schema of the captured virtual machine + :vartype schema: str + :ivar content_version: the version of the content + :vartype content_version: str + :ivar parameters: parameters of the captured virtual machine + :vartype parameters: object + :ivar resources: a list of resource items of the captured virtual machine + :vartype resources: list[object] + """ + + _validation = { + 'schema': {'readonly': True}, + 'content_version': {'readonly': True}, + 'parameters': {'readonly': True}, + 'resources': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'schema': {'key': '$schema', 'type': 'str'}, + 'content_version': {'key': 'contentVersion', 'type': 'str'}, + 'parameters': {'key': 'parameters', 'type': 'object'}, + 'resources': {'key': 'resources', 'type': '[object]'}, + } + + def __init__(self, *, id: str=None, **kwargs) -> None: + super(VirtualMachineCaptureResult, self).__init__(id=id, **kwargs) + self.schema = None + self.content_version = None + self.parameters = None + self.resources = None + + +class VirtualMachineExtension(Resource): + """Describes a Virtual Machine Extension. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource Id + :vartype id: str + :ivar name: Resource name + :vartype name: str + :ivar type: Resource type + :vartype type: str + :param location: Required. Resource location + :type location: str + :param tags: Resource tags + :type tags: dict[str, str] + :param force_update_tag: How the extension handler should be forced to + update even if the extension configuration has not changed. + :type force_update_tag: str + :param publisher: The name of the extension handler publisher. + :type publisher: str + :param virtual_machine_extension_type: Specifies the type of the + extension; an example is "CustomScriptExtension". + :type virtual_machine_extension_type: str + :param type_handler_version: Specifies the version of the script handler. + :type type_handler_version: str + :param auto_upgrade_minor_version: Indicates whether the extension should + use a newer minor version if one is available at deployment time. Once + deployed, however, the extension will not upgrade minor versions unless + redeployed, even with this property set to true. + :type auto_upgrade_minor_version: bool + :param settings: Json formatted public settings for the extension. + :type settings: object + :param protected_settings: The extension can contain either + protectedSettings or protectedSettingsFromKeyVault or no protected + settings at all. + :type protected_settings: object + :ivar provisioning_state: The provisioning state, which only appears in + the response. + :vartype provisioning_state: str + :param instance_view: The virtual machine extension instance view. + :type instance_view: + ~azure.mgmt.compute.v2019_03_01.models.VirtualMachineExtensionInstanceView + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'force_update_tag': {'key': 'properties.forceUpdateTag', 'type': 'str'}, + 'publisher': {'key': 'properties.publisher', 'type': 'str'}, + 'virtual_machine_extension_type': {'key': 'properties.type', 'type': 'str'}, + 'type_handler_version': {'key': 'properties.typeHandlerVersion', 'type': 'str'}, + 'auto_upgrade_minor_version': {'key': 'properties.autoUpgradeMinorVersion', 'type': 'bool'}, + 'settings': {'key': 'properties.settings', 'type': 'object'}, + 'protected_settings': {'key': 'properties.protectedSettings', 'type': 'object'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'instance_view': {'key': 'properties.instanceView', 'type': 'VirtualMachineExtensionInstanceView'}, + } + + def __init__(self, *, location: str, tags=None, force_update_tag: str=None, publisher: str=None, virtual_machine_extension_type: str=None, type_handler_version: str=None, auto_upgrade_minor_version: bool=None, settings=None, protected_settings=None, instance_view=None, **kwargs) -> None: + super(VirtualMachineExtension, self).__init__(location=location, tags=tags, **kwargs) + self.force_update_tag = force_update_tag + self.publisher = publisher + self.virtual_machine_extension_type = virtual_machine_extension_type + self.type_handler_version = type_handler_version + self.auto_upgrade_minor_version = auto_upgrade_minor_version + self.settings = settings + self.protected_settings = protected_settings + self.provisioning_state = None + self.instance_view = instance_view + + +class VirtualMachineExtensionHandlerInstanceView(Model): + """The instance view of a virtual machine extension handler. + + :param type: Specifies the type of the extension; an example is + "CustomScriptExtension". + :type type: str + :param type_handler_version: Specifies the version of the script handler. + :type type_handler_version: str + :param status: The extension handler status. + :type status: ~azure.mgmt.compute.v2019_03_01.models.InstanceViewStatus + """ + + _attribute_map = { + 'type': {'key': 'type', 'type': 'str'}, + 'type_handler_version': {'key': 'typeHandlerVersion', 'type': 'str'}, + 'status': {'key': 'status', 'type': 'InstanceViewStatus'}, + } + + def __init__(self, *, type: str=None, type_handler_version: str=None, status=None, **kwargs) -> None: + super(VirtualMachineExtensionHandlerInstanceView, self).__init__(**kwargs) + self.type = type + self.type_handler_version = type_handler_version + self.status = status + + +class VirtualMachineExtensionImage(Resource): + """Describes a Virtual Machine Extension Image. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource Id + :vartype id: str + :ivar name: Resource name + :vartype name: str + :ivar type: Resource type + :vartype type: str + :param location: Required. Resource location + :type location: str + :param tags: Resource tags + :type tags: dict[str, str] + :param operating_system: Required. The operating system this extension + supports. + :type operating_system: str + :param compute_role: Required. The type of role (IaaS or PaaS) this + extension supports. + :type compute_role: str + :param handler_schema: Required. The schema defined by publisher, where + extension consumers should provide settings in a matching schema. + :type handler_schema: str + :param vm_scale_set_enabled: Whether the extension can be used on xRP + VMScaleSets. By default existing extensions are usable on scalesets, but + there might be cases where a publisher wants to explicitly indicate the + extension is only enabled for CRP VMs but not VMSS. + :type vm_scale_set_enabled: bool + :param supports_multiple_extensions: Whether the handler can support + multiple extensions. + :type supports_multiple_extensions: bool + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + 'operating_system': {'required': True}, + 'compute_role': {'required': True}, + 'handler_schema': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'operating_system': {'key': 'properties.operatingSystem', 'type': 'str'}, + 'compute_role': {'key': 'properties.computeRole', 'type': 'str'}, + 'handler_schema': {'key': 'properties.handlerSchema', 'type': 'str'}, + 'vm_scale_set_enabled': {'key': 'properties.vmScaleSetEnabled', 'type': 'bool'}, + 'supports_multiple_extensions': {'key': 'properties.supportsMultipleExtensions', 'type': 'bool'}, + } + + def __init__(self, *, location: str, operating_system: str, compute_role: str, handler_schema: str, tags=None, vm_scale_set_enabled: bool=None, supports_multiple_extensions: bool=None, **kwargs) -> None: + super(VirtualMachineExtensionImage, self).__init__(location=location, tags=tags, **kwargs) + self.operating_system = operating_system + self.compute_role = compute_role + self.handler_schema = handler_schema + self.vm_scale_set_enabled = vm_scale_set_enabled + self.supports_multiple_extensions = supports_multiple_extensions + + +class VirtualMachineExtensionInstanceView(Model): + """The instance view of a virtual machine extension. + + :param name: The virtual machine extension name. + :type name: str + :param type: Specifies the type of the extension; an example is + "CustomScriptExtension". + :type type: str + :param type_handler_version: Specifies the version of the script handler. + :type type_handler_version: str + :param substatuses: The resource status information. + :type substatuses: + list[~azure.mgmt.compute.v2019_03_01.models.InstanceViewStatus] + :param statuses: The resource status information. + :type statuses: + list[~azure.mgmt.compute.v2019_03_01.models.InstanceViewStatus] + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'type_handler_version': {'key': 'typeHandlerVersion', 'type': 'str'}, + 'substatuses': {'key': 'substatuses', 'type': '[InstanceViewStatus]'}, + 'statuses': {'key': 'statuses', 'type': '[InstanceViewStatus]'}, + } + + def __init__(self, *, name: str=None, type: str=None, type_handler_version: str=None, substatuses=None, statuses=None, **kwargs) -> None: + super(VirtualMachineExtensionInstanceView, self).__init__(**kwargs) + self.name = name + self.type = type + self.type_handler_version = type_handler_version + self.substatuses = substatuses + self.statuses = statuses + + +class VirtualMachineExtensionsListResult(Model): + """The List Extension operation response. + + :param value: The list of extensions + :type value: + list[~azure.mgmt.compute.v2019_03_01.models.VirtualMachineExtension] + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[VirtualMachineExtension]'}, + } + + def __init__(self, *, value=None, **kwargs) -> None: + super(VirtualMachineExtensionsListResult, self).__init__(**kwargs) + self.value = value + + +class VirtualMachineExtensionUpdate(UpdateResource): + """Describes a Virtual Machine Extension. + + :param tags: Resource tags + :type tags: dict[str, str] + :param force_update_tag: How the extension handler should be forced to + update even if the extension configuration has not changed. + :type force_update_tag: str + :param publisher: The name of the extension handler publisher. + :type publisher: str + :param type: Specifies the type of the extension; an example is + "CustomScriptExtension". + :type type: str + :param type_handler_version: Specifies the version of the script handler. + :type type_handler_version: str + :param auto_upgrade_minor_version: Indicates whether the extension should + use a newer minor version if one is available at deployment time. Once + deployed, however, the extension will not upgrade minor versions unless + redeployed, even with this property set to true. + :type auto_upgrade_minor_version: bool + :param settings: Json formatted public settings for the extension. + :type settings: object + :param protected_settings: The extension can contain either + protectedSettings or protectedSettingsFromKeyVault or no protected + settings at all. + :type protected_settings: object + """ + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + 'force_update_tag': {'key': 'properties.forceUpdateTag', 'type': 'str'}, + 'publisher': {'key': 'properties.publisher', 'type': 'str'}, + 'type': {'key': 'properties.type', 'type': 'str'}, + 'type_handler_version': {'key': 'properties.typeHandlerVersion', 'type': 'str'}, + 'auto_upgrade_minor_version': {'key': 'properties.autoUpgradeMinorVersion', 'type': 'bool'}, + 'settings': {'key': 'properties.settings', 'type': 'object'}, + 'protected_settings': {'key': 'properties.protectedSettings', 'type': 'object'}, + } + + def __init__(self, *, tags=None, force_update_tag: str=None, publisher: str=None, type: str=None, type_handler_version: str=None, auto_upgrade_minor_version: bool=None, settings=None, protected_settings=None, **kwargs) -> None: + super(VirtualMachineExtensionUpdate, self).__init__(tags=tags, **kwargs) + self.force_update_tag = force_update_tag + self.publisher = publisher + self.type = type + self.type_handler_version = type_handler_version + self.auto_upgrade_minor_version = auto_upgrade_minor_version + self.settings = settings + self.protected_settings = protected_settings + + +class VirtualMachineHealthStatus(Model): + """The health status of the VM. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar status: The health status information for the VM. + :vartype status: ~azure.mgmt.compute.v2019_03_01.models.InstanceViewStatus + """ + + _validation = { + 'status': {'readonly': True}, + } + + _attribute_map = { + 'status': {'key': 'status', 'type': 'InstanceViewStatus'}, + } + + def __init__(self, **kwargs) -> None: + super(VirtualMachineHealthStatus, self).__init__(**kwargs) + self.status = None + + +class VirtualMachineIdentity(Model): + """Identity for the virtual machine. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar principal_id: The principal id of virtual machine identity. This + property will only be provided for a system assigned identity. + :vartype principal_id: str + :ivar tenant_id: The tenant id associated with the virtual machine. This + property will only be provided for a system assigned identity. + :vartype tenant_id: str + :param type: The type of identity used for the virtual machine. The type + 'SystemAssigned, UserAssigned' includes both an implicitly created + identity and a set of user assigned identities. The type 'None' will + remove any identities from the virtual machine. Possible values include: + 'SystemAssigned', 'UserAssigned', 'SystemAssigned, UserAssigned', 'None' + :type type: str or + ~azure.mgmt.compute.v2019_03_01.models.ResourceIdentityType + :param user_assigned_identities: The list of user identities associated + with the Virtual Machine. The user identity dictionary key references will + be ARM resource ids in the form: + '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'. + :type user_assigned_identities: dict[str, + ~azure.mgmt.compute.v2019_03_01.models.VirtualMachineIdentityUserAssignedIdentitiesValue] + """ + + _validation = { + 'principal_id': {'readonly': True}, + 'tenant_id': {'readonly': True}, + } + + _attribute_map = { + 'principal_id': {'key': 'principalId', 'type': 'str'}, + 'tenant_id': {'key': 'tenantId', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'ResourceIdentityType'}, + 'user_assigned_identities': {'key': 'userAssignedIdentities', 'type': '{VirtualMachineIdentityUserAssignedIdentitiesValue}'}, + } + + def __init__(self, *, type=None, user_assigned_identities=None, **kwargs) -> None: + super(VirtualMachineIdentity, self).__init__(**kwargs) + self.principal_id = None + self.tenant_id = None + self.type = type + self.user_assigned_identities = user_assigned_identities + + +class VirtualMachineIdentityUserAssignedIdentitiesValue(Model): + """VirtualMachineIdentityUserAssignedIdentitiesValue. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar principal_id: The principal id of user assigned identity. + :vartype principal_id: str + :ivar client_id: The client id of user assigned identity. + :vartype client_id: str + """ + + _validation = { + 'principal_id': {'readonly': True}, + 'client_id': {'readonly': True}, + } + + _attribute_map = { + 'principal_id': {'key': 'principalId', 'type': 'str'}, + 'client_id': {'key': 'clientId', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(VirtualMachineIdentityUserAssignedIdentitiesValue, self).__init__(**kwargs) + self.principal_id = None + self.client_id = None + + +class VirtualMachineImageResource(SubResource): + """Virtual machine image resource information. + + All required parameters must be populated in order to send to Azure. + + :param id: Resource Id + :type id: str + :param name: Required. The name of the resource. + :type name: str + :param location: Required. The supported Azure location of the resource. + :type location: str + :param tags: Specifies the tags that are assigned to the virtual machine. + For more information about using tags, see [Using tags to organize your + Azure + resources](https://docs.microsoft.com/azure/azure-resource-manager/resource-group-using-tags.md). + :type tags: dict[str, str] + """ + + _validation = { + 'name': {'required': True}, + 'location': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__(self, *, name: str, location: str, id: str=None, tags=None, **kwargs) -> None: + super(VirtualMachineImageResource, self).__init__(id=id, **kwargs) + self.name = name + self.location = location + self.tags = tags + + +class VirtualMachineImage(VirtualMachineImageResource): + """Describes a Virtual Machine Image. + + All required parameters must be populated in order to send to Azure. + + :param id: Resource Id + :type id: str + :param name: Required. The name of the resource. + :type name: str + :param location: Required. The supported Azure location of the resource. + :type location: str + :param tags: Specifies the tags that are assigned to the virtual machine. + For more information about using tags, see [Using tags to organize your + Azure + resources](https://docs.microsoft.com/azure/azure-resource-manager/resource-group-using-tags.md). + :type tags: dict[str, str] + :param plan: + :type plan: ~azure.mgmt.compute.v2019_03_01.models.PurchasePlan + :param os_disk_image: + :type os_disk_image: ~azure.mgmt.compute.v2019_03_01.models.OSDiskImage + :param data_disk_images: + :type data_disk_images: + list[~azure.mgmt.compute.v2019_03_01.models.DataDiskImage] + :param automatic_os_upgrade_properties: + :type automatic_os_upgrade_properties: + ~azure.mgmt.compute.v2019_03_01.models.AutomaticOSUpgradeProperties + """ + + _validation = { + 'name': {'required': True}, + 'location': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'plan': {'key': 'properties.plan', 'type': 'PurchasePlan'}, + 'os_disk_image': {'key': 'properties.osDiskImage', 'type': 'OSDiskImage'}, + 'data_disk_images': {'key': 'properties.dataDiskImages', 'type': '[DataDiskImage]'}, + 'automatic_os_upgrade_properties': {'key': 'properties.automaticOSUpgradeProperties', 'type': 'AutomaticOSUpgradeProperties'}, + } + + def __init__(self, *, name: str, location: str, id: str=None, tags=None, plan=None, os_disk_image=None, data_disk_images=None, automatic_os_upgrade_properties=None, **kwargs) -> None: + super(VirtualMachineImage, self).__init__(id=id, name=name, location=location, tags=tags, **kwargs) + self.plan = plan + self.os_disk_image = os_disk_image + self.data_disk_images = data_disk_images + self.automatic_os_upgrade_properties = automatic_os_upgrade_properties + + +class VirtualMachineInstanceView(Model): + """The instance view of a virtual machine. + + :param platform_update_domain: Specifies the update domain of the virtual + machine. + :type platform_update_domain: int + :param platform_fault_domain: Specifies the fault domain of the virtual + machine. + :type platform_fault_domain: int + :param computer_name: The computer name assigned to the virtual machine. + :type computer_name: str + :param os_name: The Operating System running on the virtual machine. + :type os_name: str + :param os_version: The version of Operating System running on the virtual + machine. + :type os_version: str + :param hyper_vgeneration: Specifies the HyperVGeneration Type associated + with a resource. Possible values include: 'V1', 'V2' + :type hyper_vgeneration: str or + ~azure.mgmt.compute.v2019_03_01.models.HyperVGenerationType + :param rdp_thumb_print: The Remote desktop certificate thumbprint. + :type rdp_thumb_print: str + :param vm_agent: The VM Agent running on the virtual machine. + :type vm_agent: + ~azure.mgmt.compute.v2019_03_01.models.VirtualMachineAgentInstanceView + :param maintenance_redeploy_status: The Maintenance Operation status on + the virtual machine. + :type maintenance_redeploy_status: + ~azure.mgmt.compute.v2019_03_01.models.MaintenanceRedeployStatus + :param disks: The virtual machine disk information. + :type disks: list[~azure.mgmt.compute.v2019_03_01.models.DiskInstanceView] + :param extensions: The extensions information. + :type extensions: + list[~azure.mgmt.compute.v2019_03_01.models.VirtualMachineExtensionInstanceView] + :param boot_diagnostics: Boot Diagnostics is a debugging feature which + allows you to view Console Output and Screenshot to diagnose VM status. +

    You can easily view the output of your console log.

    + Azure also enables you to see a screenshot of the VM from the hypervisor. + :type boot_diagnostics: + ~azure.mgmt.compute.v2019_03_01.models.BootDiagnosticsInstanceView + :param statuses: The resource status information. + :type statuses: + list[~azure.mgmt.compute.v2019_03_01.models.InstanceViewStatus] + """ + + _attribute_map = { + 'platform_update_domain': {'key': 'platformUpdateDomain', 'type': 'int'}, + 'platform_fault_domain': {'key': 'platformFaultDomain', 'type': 'int'}, + 'computer_name': {'key': 'computerName', 'type': 'str'}, + 'os_name': {'key': 'osName', 'type': 'str'}, + 'os_version': {'key': 'osVersion', 'type': 'str'}, + 'hyper_vgeneration': {'key': 'hyperVGeneration', 'type': 'str'}, + 'rdp_thumb_print': {'key': 'rdpThumbPrint', 'type': 'str'}, + 'vm_agent': {'key': 'vmAgent', 'type': 'VirtualMachineAgentInstanceView'}, + 'maintenance_redeploy_status': {'key': 'maintenanceRedeployStatus', 'type': 'MaintenanceRedeployStatus'}, + 'disks': {'key': 'disks', 'type': '[DiskInstanceView]'}, + 'extensions': {'key': 'extensions', 'type': '[VirtualMachineExtensionInstanceView]'}, + 'boot_diagnostics': {'key': 'bootDiagnostics', 'type': 'BootDiagnosticsInstanceView'}, + 'statuses': {'key': 'statuses', 'type': '[InstanceViewStatus]'}, + } + + def __init__(self, *, platform_update_domain: int=None, platform_fault_domain: int=None, computer_name: str=None, os_name: str=None, os_version: str=None, hyper_vgeneration=None, rdp_thumb_print: str=None, vm_agent=None, maintenance_redeploy_status=None, disks=None, extensions=None, boot_diagnostics=None, statuses=None, **kwargs) -> None: + super(VirtualMachineInstanceView, self).__init__(**kwargs) + self.platform_update_domain = platform_update_domain + self.platform_fault_domain = platform_fault_domain + self.computer_name = computer_name + self.os_name = os_name + self.os_version = os_version + self.hyper_vgeneration = hyper_vgeneration + self.rdp_thumb_print = rdp_thumb_print + self.vm_agent = vm_agent + self.maintenance_redeploy_status = maintenance_redeploy_status + self.disks = disks + self.extensions = extensions + self.boot_diagnostics = boot_diagnostics + self.statuses = statuses + + +class VirtualMachineReimageParameters(Model): + """Parameters for Reimaging Virtual Machine. NOTE: Virtual Machine OS disk + will always be reimaged. + + :param temp_disk: Specifies whether to reimage temp disk. Default value: + false. Note: This temp disk reimage parameter is only supported for + VM/VMSS with Ephemeral OS disk. + :type temp_disk: bool + """ + + _attribute_map = { + 'temp_disk': {'key': 'tempDisk', 'type': 'bool'}, + } + + def __init__(self, *, temp_disk: bool=None, **kwargs) -> None: + super(VirtualMachineReimageParameters, self).__init__(**kwargs) + self.temp_disk = temp_disk + + +class VirtualMachineScaleSet(Resource): + """Describes a Virtual Machine Scale Set. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource Id + :vartype id: str + :ivar name: Resource name + :vartype name: str + :ivar type: Resource type + :vartype type: str + :param location: Required. Resource location + :type location: str + :param tags: Resource tags + :type tags: dict[str, str] + :param sku: The virtual machine scale set sku. + :type sku: ~azure.mgmt.compute.v2019_03_01.models.Sku + :param plan: Specifies information about the marketplace image used to + create the virtual machine. This element is only used for marketplace + images. Before you can use a marketplace image from an API, you must + enable the image for programmatic use. In the Azure portal, find the + marketplace image that you want to use and then click **Want to deploy + programmatically, Get Started ->**. Enter any required information and + then click **Save**. + :type plan: ~azure.mgmt.compute.v2019_03_01.models.Plan + :param upgrade_policy: The upgrade policy. + :type upgrade_policy: ~azure.mgmt.compute.v2019_03_01.models.UpgradePolicy + :param virtual_machine_profile: The virtual machine profile. + :type virtual_machine_profile: + ~azure.mgmt.compute.v2019_03_01.models.VirtualMachineScaleSetVMProfile + :ivar provisioning_state: The provisioning state, which only appears in + the response. + :vartype provisioning_state: str + :param overprovision: Specifies whether the Virtual Machine Scale Set + should be overprovisioned. + :type overprovision: bool + :param do_not_run_extensions_on_overprovisioned_vms: When Overprovision is + enabled, extensions are launched only on the requested number of VMs which + are finally kept. This property will hence ensure that the extensions do + not run on the extra overprovisioned VMs. + :type do_not_run_extensions_on_overprovisioned_vms: bool + :ivar unique_id: Specifies the ID which uniquely identifies a Virtual + Machine Scale Set. + :vartype unique_id: str + :param single_placement_group: When true this limits the scale set to a + single placement group, of max size 100 virtual machines. + :type single_placement_group: bool + :param zone_balance: Whether to force strictly even Virtual Machine + distribution cross x-zones in case there is zone outage. + :type zone_balance: bool + :param platform_fault_domain_count: Fault Domain count for each placement + group. + :type platform_fault_domain_count: int + :param proximity_placement_group: Specifies information about the + proximity placement group that the virtual machine scale set should be + assigned to.

    Minimum api-version: 2018-04-01. + :type proximity_placement_group: + ~azure.mgmt.compute.v2019_03_01.models.SubResource + :param additional_capabilities: Specifies additional capabilities enabled + or disabled on the Virtual Machines in the Virtual Machine Scale Set. For + instance: whether the Virtual Machines have the capability to support + attaching managed data disks with UltraSSD_LRS storage account type. + :type additional_capabilities: + ~azure.mgmt.compute.v2019_03_01.models.AdditionalCapabilities + :param identity: The identity of the virtual machine scale set, if + configured. + :type identity: + ~azure.mgmt.compute.v2019_03_01.models.VirtualMachineScaleSetIdentity + :param zones: The virtual machine scale set zones. + :type zones: list[str] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + 'provisioning_state': {'readonly': True}, + 'unique_id': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'sku': {'key': 'sku', 'type': 'Sku'}, + 'plan': {'key': 'plan', 'type': 'Plan'}, + 'upgrade_policy': {'key': 'properties.upgradePolicy', 'type': 'UpgradePolicy'}, + 'virtual_machine_profile': {'key': 'properties.virtualMachineProfile', 'type': 'VirtualMachineScaleSetVMProfile'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'overprovision': {'key': 'properties.overprovision', 'type': 'bool'}, + 'do_not_run_extensions_on_overprovisioned_vms': {'key': 'properties.doNotRunExtensionsOnOverprovisionedVMs', 'type': 'bool'}, + 'unique_id': {'key': 'properties.uniqueId', 'type': 'str'}, + 'single_placement_group': {'key': 'properties.singlePlacementGroup', 'type': 'bool'}, + 'zone_balance': {'key': 'properties.zoneBalance', 'type': 'bool'}, + 'platform_fault_domain_count': {'key': 'properties.platformFaultDomainCount', 'type': 'int'}, + 'proximity_placement_group': {'key': 'properties.proximityPlacementGroup', 'type': 'SubResource'}, + 'additional_capabilities': {'key': 'properties.additionalCapabilities', 'type': 'AdditionalCapabilities'}, + 'identity': {'key': 'identity', 'type': 'VirtualMachineScaleSetIdentity'}, + 'zones': {'key': 'zones', 'type': '[str]'}, + } + + def __init__(self, *, location: str, tags=None, sku=None, plan=None, upgrade_policy=None, virtual_machine_profile=None, overprovision: bool=None, do_not_run_extensions_on_overprovisioned_vms: bool=None, single_placement_group: bool=None, zone_balance: bool=None, platform_fault_domain_count: int=None, proximity_placement_group=None, additional_capabilities=None, identity=None, zones=None, **kwargs) -> None: + super(VirtualMachineScaleSet, self).__init__(location=location, tags=tags, **kwargs) + self.sku = sku + self.plan = plan + self.upgrade_policy = upgrade_policy + self.virtual_machine_profile = virtual_machine_profile + self.provisioning_state = None + self.overprovision = overprovision + self.do_not_run_extensions_on_overprovisioned_vms = do_not_run_extensions_on_overprovisioned_vms + self.unique_id = None + self.single_placement_group = single_placement_group + self.zone_balance = zone_balance + self.platform_fault_domain_count = platform_fault_domain_count + self.proximity_placement_group = proximity_placement_group + self.additional_capabilities = additional_capabilities + self.identity = identity + self.zones = zones + + +class VirtualMachineScaleSetDataDisk(Model): + """Describes a virtual machine scale set data disk. + + All required parameters must be populated in order to send to Azure. + + :param name: The disk name. + :type name: str + :param lun: Required. Specifies the logical unit number of the data disk. + This value is used to identify data disks within the VM and therefore must + be unique for each data disk attached to a VM. + :type lun: int + :param caching: Specifies the caching requirements.

    Possible + values are:

    **None**

    **ReadOnly**

    **ReadWrite** +

    Default: **None for Standard storage. ReadOnly for Premium + storage**. Possible values include: 'None', 'ReadOnly', 'ReadWrite' + :type caching: str or ~azure.mgmt.compute.v2019_03_01.models.CachingTypes + :param write_accelerator_enabled: Specifies whether writeAccelerator + should be enabled or disabled on the disk. + :type write_accelerator_enabled: bool + :param create_option: Required. The create option. Possible values + include: 'FromImage', 'Empty', 'Attach' + :type create_option: str or + ~azure.mgmt.compute.v2019_03_01.models.DiskCreateOptionTypes + :param disk_size_gb: Specifies the size of an empty data disk in + gigabytes. This element can be used to overwrite the size of the disk in a + virtual machine image.

    This value cannot be larger than 1023 GB + :type disk_size_gb: int + :param managed_disk: The managed disk parameters. + :type managed_disk: + ~azure.mgmt.compute.v2019_03_01.models.VirtualMachineScaleSetManagedDiskParameters + """ + + _validation = { + 'lun': {'required': True}, + 'create_option': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'lun': {'key': 'lun', 'type': 'int'}, + 'caching': {'key': 'caching', 'type': 'CachingTypes'}, + 'write_accelerator_enabled': {'key': 'writeAcceleratorEnabled', 'type': 'bool'}, + 'create_option': {'key': 'createOption', 'type': 'str'}, + 'disk_size_gb': {'key': 'diskSizeGB', 'type': 'int'}, + 'managed_disk': {'key': 'managedDisk', 'type': 'VirtualMachineScaleSetManagedDiskParameters'}, + } + + def __init__(self, *, lun: int, create_option, name: str=None, caching=None, write_accelerator_enabled: bool=None, disk_size_gb: int=None, managed_disk=None, **kwargs) -> None: + super(VirtualMachineScaleSetDataDisk, self).__init__(**kwargs) + self.name = name + self.lun = lun + self.caching = caching + self.write_accelerator_enabled = write_accelerator_enabled + self.create_option = create_option + self.disk_size_gb = disk_size_gb + self.managed_disk = managed_disk + + +class VirtualMachineScaleSetExtension(SubResourceReadOnly): + """Describes a Virtual Machine Scale Set Extension. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource Id + :vartype id: str + :param name: The name of the extension. + :type name: str + :param force_update_tag: If a value is provided and is different from the + previous value, the extension handler will be forced to update even if the + extension configuration has not changed. + :type force_update_tag: str + :param publisher: The name of the extension handler publisher. + :type publisher: str + :param type: Specifies the type of the extension; an example is + "CustomScriptExtension". + :type type: str + :param type_handler_version: Specifies the version of the script handler. + :type type_handler_version: str + :param auto_upgrade_minor_version: Indicates whether the extension should + use a newer minor version if one is available at deployment time. Once + deployed, however, the extension will not upgrade minor versions unless + redeployed, even with this property set to true. + :type auto_upgrade_minor_version: bool + :param settings: Json formatted public settings for the extension. + :type settings: object + :param protected_settings: The extension can contain either + protectedSettings or protectedSettingsFromKeyVault or no protected + settings at all. + :type protected_settings: object + :ivar provisioning_state: The provisioning state, which only appears in + the response. + :vartype provisioning_state: str + :param provision_after_extensions: Collection of extension names after + which this extension needs to be provisioned. + :type provision_after_extensions: list[str] + """ + + _validation = { + 'id': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'force_update_tag': {'key': 'properties.forceUpdateTag', 'type': 'str'}, + 'publisher': {'key': 'properties.publisher', 'type': 'str'}, + 'type': {'key': 'properties.type', 'type': 'str'}, + 'type_handler_version': {'key': 'properties.typeHandlerVersion', 'type': 'str'}, + 'auto_upgrade_minor_version': {'key': 'properties.autoUpgradeMinorVersion', 'type': 'bool'}, + 'settings': {'key': 'properties.settings', 'type': 'object'}, + 'protected_settings': {'key': 'properties.protectedSettings', 'type': 'object'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'provision_after_extensions': {'key': 'properties.provisionAfterExtensions', 'type': '[str]'}, + } + + def __init__(self, *, name: str=None, force_update_tag: str=None, publisher: str=None, type: str=None, type_handler_version: str=None, auto_upgrade_minor_version: bool=None, settings=None, protected_settings=None, provision_after_extensions=None, **kwargs) -> None: + super(VirtualMachineScaleSetExtension, self).__init__(**kwargs) + self.name = name + self.force_update_tag = force_update_tag + self.publisher = publisher + self.type = type + self.type_handler_version = type_handler_version + self.auto_upgrade_minor_version = auto_upgrade_minor_version + self.settings = settings + self.protected_settings = protected_settings + self.provisioning_state = None + self.provision_after_extensions = provision_after_extensions + + +class VirtualMachineScaleSetExtensionProfile(Model): + """Describes a virtual machine scale set extension profile. + + :param extensions: The virtual machine scale set child extension + resources. + :type extensions: + list[~azure.mgmt.compute.v2019_03_01.models.VirtualMachineScaleSetExtension] + """ + + _attribute_map = { + 'extensions': {'key': 'extensions', 'type': '[VirtualMachineScaleSetExtension]'}, + } + + def __init__(self, *, extensions=None, **kwargs) -> None: + super(VirtualMachineScaleSetExtensionProfile, self).__init__(**kwargs) + self.extensions = extensions + + +class VirtualMachineScaleSetIdentity(Model): + """Identity for the virtual machine scale set. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar principal_id: The principal id of virtual machine scale set + identity. This property will only be provided for a system assigned + identity. + :vartype principal_id: str + :ivar tenant_id: The tenant id associated with the virtual machine scale + set. This property will only be provided for a system assigned identity. + :vartype tenant_id: str + :param type: The type of identity used for the virtual machine scale set. + The type 'SystemAssigned, UserAssigned' includes both an implicitly + created identity and a set of user assigned identities. The type 'None' + will remove any identities from the virtual machine scale set. Possible + values include: 'SystemAssigned', 'UserAssigned', 'SystemAssigned, + UserAssigned', 'None' + :type type: str or + ~azure.mgmt.compute.v2019_03_01.models.ResourceIdentityType + :param user_assigned_identities: The list of user identities associated + with the virtual machine scale set. The user identity dictionary key + references will be ARM resource ids in the form: + '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'. + :type user_assigned_identities: dict[str, + ~azure.mgmt.compute.v2019_03_01.models.VirtualMachineScaleSetIdentityUserAssignedIdentitiesValue] + """ + + _validation = { + 'principal_id': {'readonly': True}, + 'tenant_id': {'readonly': True}, + } + + _attribute_map = { + 'principal_id': {'key': 'principalId', 'type': 'str'}, + 'tenant_id': {'key': 'tenantId', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'ResourceIdentityType'}, + 'user_assigned_identities': {'key': 'userAssignedIdentities', 'type': '{VirtualMachineScaleSetIdentityUserAssignedIdentitiesValue}'}, + } + + def __init__(self, *, type=None, user_assigned_identities=None, **kwargs) -> None: + super(VirtualMachineScaleSetIdentity, self).__init__(**kwargs) + self.principal_id = None + self.tenant_id = None + self.type = type + self.user_assigned_identities = user_assigned_identities + + +class VirtualMachineScaleSetIdentityUserAssignedIdentitiesValue(Model): + """VirtualMachineScaleSetIdentityUserAssignedIdentitiesValue. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar principal_id: The principal id of user assigned identity. + :vartype principal_id: str + :ivar client_id: The client id of user assigned identity. + :vartype client_id: str + """ + + _validation = { + 'principal_id': {'readonly': True}, + 'client_id': {'readonly': True}, + } + + _attribute_map = { + 'principal_id': {'key': 'principalId', 'type': 'str'}, + 'client_id': {'key': 'clientId', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(VirtualMachineScaleSetIdentityUserAssignedIdentitiesValue, self).__init__(**kwargs) + self.principal_id = None + self.client_id = None + + +class VirtualMachineScaleSetInstanceView(Model): + """The instance view of a virtual machine scale set. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar virtual_machine: The instance view status summary for the virtual + machine scale set. + :vartype virtual_machine: + ~azure.mgmt.compute.v2019_03_01.models.VirtualMachineScaleSetInstanceViewStatusesSummary + :ivar extensions: The extensions information. + :vartype extensions: + list[~azure.mgmt.compute.v2019_03_01.models.VirtualMachineScaleSetVMExtensionsSummary] + :param statuses: The resource status information. + :type statuses: + list[~azure.mgmt.compute.v2019_03_01.models.InstanceViewStatus] + """ + + _validation = { + 'virtual_machine': {'readonly': True}, + 'extensions': {'readonly': True}, + } + + _attribute_map = { + 'virtual_machine': {'key': 'virtualMachine', 'type': 'VirtualMachineScaleSetInstanceViewStatusesSummary'}, + 'extensions': {'key': 'extensions', 'type': '[VirtualMachineScaleSetVMExtensionsSummary]'}, + 'statuses': {'key': 'statuses', 'type': '[InstanceViewStatus]'}, + } + + def __init__(self, *, statuses=None, **kwargs) -> None: + super(VirtualMachineScaleSetInstanceView, self).__init__(**kwargs) + self.virtual_machine = None + self.extensions = None + self.statuses = statuses + + +class VirtualMachineScaleSetInstanceViewStatusesSummary(Model): + """Instance view statuses summary for virtual machines of a virtual machine + scale set. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar statuses_summary: The extensions information. + :vartype statuses_summary: + list[~azure.mgmt.compute.v2019_03_01.models.VirtualMachineStatusCodeCount] + """ + + _validation = { + 'statuses_summary': {'readonly': True}, + } + + _attribute_map = { + 'statuses_summary': {'key': 'statusesSummary', 'type': '[VirtualMachineStatusCodeCount]'}, + } + + def __init__(self, **kwargs) -> None: + super(VirtualMachineScaleSetInstanceViewStatusesSummary, self).__init__(**kwargs) + self.statuses_summary = None + + +class VirtualMachineScaleSetIPConfiguration(SubResource): + """Describes a virtual machine scale set network profile's IP configuration. + + All required parameters must be populated in order to send to Azure. + + :param id: Resource Id + :type id: str + :param name: Required. The IP configuration name. + :type name: str + :param subnet: Specifies the identifier of the subnet. + :type subnet: ~azure.mgmt.compute.v2019_03_01.models.ApiEntityReference + :param primary: Specifies the primary network interface in case the + virtual machine has more than 1 network interface. + :type primary: bool + :param public_ip_address_configuration: The publicIPAddressConfiguration. + :type public_ip_address_configuration: + ~azure.mgmt.compute.v2019_03_01.models.VirtualMachineScaleSetPublicIPAddressConfiguration + :param private_ip_address_version: Available from Api-Version 2017-03-30 + onwards, it represents whether the specific ipconfiguration is IPv4 or + IPv6. Default is taken as IPv4. Possible values are: 'IPv4' and 'IPv6'. + Possible values include: 'IPv4', 'IPv6' + :type private_ip_address_version: str or + ~azure.mgmt.compute.v2019_03_01.models.IPVersion + :param application_gateway_backend_address_pools: Specifies an array of + references to backend address pools of application gateways. A scale set + can reference backend address pools of multiple application gateways. + Multiple scale sets cannot use the same application gateway. + :type application_gateway_backend_address_pools: + list[~azure.mgmt.compute.v2019_03_01.models.SubResource] + :param application_security_groups: Specifies an array of references to + application security group. + :type application_security_groups: + list[~azure.mgmt.compute.v2019_03_01.models.SubResource] + :param load_balancer_backend_address_pools: Specifies an array of + references to backend address pools of load balancers. A scale set can + reference backend address pools of one public and one internal load + balancer. Multiple scale sets cannot use the same load balancer. + :type load_balancer_backend_address_pools: + list[~azure.mgmt.compute.v2019_03_01.models.SubResource] + :param load_balancer_inbound_nat_pools: Specifies an array of references + to inbound Nat pools of the load balancers. A scale set can reference + inbound nat pools of one public and one internal load balancer. Multiple + scale sets cannot use the same load balancer + :type load_balancer_inbound_nat_pools: + list[~azure.mgmt.compute.v2019_03_01.models.SubResource] + """ + + _validation = { + 'name': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'subnet': {'key': 'properties.subnet', 'type': 'ApiEntityReference'}, + 'primary': {'key': 'properties.primary', 'type': 'bool'}, + 'public_ip_address_configuration': {'key': 'properties.publicIPAddressConfiguration', 'type': 'VirtualMachineScaleSetPublicIPAddressConfiguration'}, + 'private_ip_address_version': {'key': 'properties.privateIPAddressVersion', 'type': 'str'}, + 'application_gateway_backend_address_pools': {'key': 'properties.applicationGatewayBackendAddressPools', 'type': '[SubResource]'}, + 'application_security_groups': {'key': 'properties.applicationSecurityGroups', 'type': '[SubResource]'}, + 'load_balancer_backend_address_pools': {'key': 'properties.loadBalancerBackendAddressPools', 'type': '[SubResource]'}, + 'load_balancer_inbound_nat_pools': {'key': 'properties.loadBalancerInboundNatPools', 'type': '[SubResource]'}, + } + + def __init__(self, *, name: str, id: str=None, subnet=None, primary: bool=None, public_ip_address_configuration=None, private_ip_address_version=None, application_gateway_backend_address_pools=None, application_security_groups=None, load_balancer_backend_address_pools=None, load_balancer_inbound_nat_pools=None, **kwargs) -> None: + super(VirtualMachineScaleSetIPConfiguration, self).__init__(id=id, **kwargs) + self.name = name + self.subnet = subnet + self.primary = primary + self.public_ip_address_configuration = public_ip_address_configuration + self.private_ip_address_version = private_ip_address_version + self.application_gateway_backend_address_pools = application_gateway_backend_address_pools + self.application_security_groups = application_security_groups + self.load_balancer_backend_address_pools = load_balancer_backend_address_pools + self.load_balancer_inbound_nat_pools = load_balancer_inbound_nat_pools + + +class VirtualMachineScaleSetIpTag(Model): + """Contains the IP tag associated with the public IP address. + + :param ip_tag_type: IP tag type. Example: FirstPartyUsage. + :type ip_tag_type: str + :param tag: IP tag associated with the public IP. Example: SQL, Storage + etc. + :type tag: str + """ + + _attribute_map = { + 'ip_tag_type': {'key': 'ipTagType', 'type': 'str'}, + 'tag': {'key': 'tag', 'type': 'str'}, + } + + def __init__(self, *, ip_tag_type: str=None, tag: str=None, **kwargs) -> None: + super(VirtualMachineScaleSetIpTag, self).__init__(**kwargs) + self.ip_tag_type = ip_tag_type + self.tag = tag + + +class VirtualMachineScaleSetManagedDiskParameters(Model): + """Describes the parameters of a ScaleSet managed disk. + + :param storage_account_type: Specifies the storage account type for the + managed disk. NOTE: UltraSSD_LRS can only be used with data disks, it + cannot be used with OS Disk. Possible values include: 'Standard_LRS', + 'Premium_LRS', 'StandardSSD_LRS', 'UltraSSD_LRS' + :type storage_account_type: str or + ~azure.mgmt.compute.v2019_03_01.models.StorageAccountTypes + """ + + _attribute_map = { + 'storage_account_type': {'key': 'storageAccountType', 'type': 'str'}, + } + + def __init__(self, *, storage_account_type=None, **kwargs) -> None: + super(VirtualMachineScaleSetManagedDiskParameters, self).__init__(**kwargs) + self.storage_account_type = storage_account_type + + +class VirtualMachineScaleSetNetworkConfiguration(SubResource): + """Describes a virtual machine scale set network profile's network + configurations. + + All required parameters must be populated in order to send to Azure. + + :param id: Resource Id + :type id: str + :param name: Required. The network configuration name. + :type name: str + :param primary: Specifies the primary network interface in case the + virtual machine has more than 1 network interface. + :type primary: bool + :param enable_accelerated_networking: Specifies whether the network + interface is accelerated networking-enabled. + :type enable_accelerated_networking: bool + :param network_security_group: The network security group. + :type network_security_group: + ~azure.mgmt.compute.v2019_03_01.models.SubResource + :param dns_settings: The dns settings to be applied on the network + interfaces. + :type dns_settings: + ~azure.mgmt.compute.v2019_03_01.models.VirtualMachineScaleSetNetworkConfigurationDnsSettings + :param ip_configurations: Required. Specifies the IP configurations of the + network interface. + :type ip_configurations: + list[~azure.mgmt.compute.v2019_03_01.models.VirtualMachineScaleSetIPConfiguration] + :param enable_ip_forwarding: Whether IP forwarding enabled on this NIC. + :type enable_ip_forwarding: bool + """ + + _validation = { + 'name': {'required': True}, + 'ip_configurations': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'primary': {'key': 'properties.primary', 'type': 'bool'}, + 'enable_accelerated_networking': {'key': 'properties.enableAcceleratedNetworking', 'type': 'bool'}, + 'network_security_group': {'key': 'properties.networkSecurityGroup', 'type': 'SubResource'}, + 'dns_settings': {'key': 'properties.dnsSettings', 'type': 'VirtualMachineScaleSetNetworkConfigurationDnsSettings'}, + 'ip_configurations': {'key': 'properties.ipConfigurations', 'type': '[VirtualMachineScaleSetIPConfiguration]'}, + 'enable_ip_forwarding': {'key': 'properties.enableIPForwarding', 'type': 'bool'}, + } + + def __init__(self, *, name: str, ip_configurations, id: str=None, primary: bool=None, enable_accelerated_networking: bool=None, network_security_group=None, dns_settings=None, enable_ip_forwarding: bool=None, **kwargs) -> None: + super(VirtualMachineScaleSetNetworkConfiguration, self).__init__(id=id, **kwargs) + self.name = name + self.primary = primary + self.enable_accelerated_networking = enable_accelerated_networking + self.network_security_group = network_security_group + self.dns_settings = dns_settings + self.ip_configurations = ip_configurations + self.enable_ip_forwarding = enable_ip_forwarding + + +class VirtualMachineScaleSetNetworkConfigurationDnsSettings(Model): + """Describes a virtual machines scale sets network configuration's DNS + settings. + + :param dns_servers: List of DNS servers IP addresses + :type dns_servers: list[str] + """ + + _attribute_map = { + 'dns_servers': {'key': 'dnsServers', 'type': '[str]'}, + } + + def __init__(self, *, dns_servers=None, **kwargs) -> None: + super(VirtualMachineScaleSetNetworkConfigurationDnsSettings, self).__init__(**kwargs) + self.dns_servers = dns_servers + + +class VirtualMachineScaleSetNetworkProfile(Model): + """Describes a virtual machine scale set network profile. + + :param health_probe: A reference to a load balancer probe used to + determine the health of an instance in the virtual machine scale set. The + reference will be in the form: + '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/probes/{probeName}'. + :type health_probe: + ~azure.mgmt.compute.v2019_03_01.models.ApiEntityReference + :param network_interface_configurations: The list of network + configurations. + :type network_interface_configurations: + list[~azure.mgmt.compute.v2019_03_01.models.VirtualMachineScaleSetNetworkConfiguration] + """ + + _attribute_map = { + 'health_probe': {'key': 'healthProbe', 'type': 'ApiEntityReference'}, + 'network_interface_configurations': {'key': 'networkInterfaceConfigurations', 'type': '[VirtualMachineScaleSetNetworkConfiguration]'}, + } + + def __init__(self, *, health_probe=None, network_interface_configurations=None, **kwargs) -> None: + super(VirtualMachineScaleSetNetworkProfile, self).__init__(**kwargs) + self.health_probe = health_probe + self.network_interface_configurations = network_interface_configurations + + +class VirtualMachineScaleSetOSDisk(Model): + """Describes a virtual machine scale set operating system disk. + + All required parameters must be populated in order to send to Azure. + + :param name: The disk name. + :type name: str + :param caching: Specifies the caching requirements.

    Possible + values are:

    **None**

    **ReadOnly**

    **ReadWrite** +

    Default: **None for Standard storage. ReadOnly for Premium + storage**. Possible values include: 'None', 'ReadOnly', 'ReadWrite' + :type caching: str or ~azure.mgmt.compute.v2019_03_01.models.CachingTypes + :param write_accelerator_enabled: Specifies whether writeAccelerator + should be enabled or disabled on the disk. + :type write_accelerator_enabled: bool + :param create_option: Required. Specifies how the virtual machines in the + scale set should be created.

    The only allowed value is: + **FromImage** \\u2013 This value is used when you are using an image to + create the virtual machine. If you are using a platform image, you also + use the imageReference element described above. If you are using a + marketplace image, you also use the plan element previously described. + Possible values include: 'FromImage', 'Empty', 'Attach' + :type create_option: str or + ~azure.mgmt.compute.v2019_03_01.models.DiskCreateOptionTypes + :param diff_disk_settings: Specifies the ephemeral disk Settings for the + operating system disk used by the virtual machine scale set. + :type diff_disk_settings: + ~azure.mgmt.compute.v2019_03_01.models.DiffDiskSettings + :param disk_size_gb: Specifies the size of the operating system disk in + gigabytes. This element can be used to overwrite the size of the disk in a + virtual machine image.

    This value cannot be larger than 1023 GB + :type disk_size_gb: int + :param os_type: This property allows you to specify the type of the OS + that is included in the disk if creating a VM from user-image or a + specialized VHD.

    Possible values are:

    **Windows** +

    **Linux**. Possible values include: 'Windows', 'Linux' + :type os_type: str or + ~azure.mgmt.compute.v2019_03_01.models.OperatingSystemTypes + :param image: Specifies information about the unmanaged user image to base + the scale set on. + :type image: ~azure.mgmt.compute.v2019_03_01.models.VirtualHardDisk + :param vhd_containers: Specifies the container urls that are used to store + operating system disks for the scale set. + :type vhd_containers: list[str] + :param managed_disk: The managed disk parameters. + :type managed_disk: + ~azure.mgmt.compute.v2019_03_01.models.VirtualMachineScaleSetManagedDiskParameters + """ + + _validation = { + 'create_option': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'caching': {'key': 'caching', 'type': 'CachingTypes'}, + 'write_accelerator_enabled': {'key': 'writeAcceleratorEnabled', 'type': 'bool'}, + 'create_option': {'key': 'createOption', 'type': 'str'}, + 'diff_disk_settings': {'key': 'diffDiskSettings', 'type': 'DiffDiskSettings'}, + 'disk_size_gb': {'key': 'diskSizeGB', 'type': 'int'}, + 'os_type': {'key': 'osType', 'type': 'OperatingSystemTypes'}, + 'image': {'key': 'image', 'type': 'VirtualHardDisk'}, + 'vhd_containers': {'key': 'vhdContainers', 'type': '[str]'}, + 'managed_disk': {'key': 'managedDisk', 'type': 'VirtualMachineScaleSetManagedDiskParameters'}, + } + + def __init__(self, *, create_option, name: str=None, caching=None, write_accelerator_enabled: bool=None, diff_disk_settings=None, disk_size_gb: int=None, os_type=None, image=None, vhd_containers=None, managed_disk=None, **kwargs) -> None: + super(VirtualMachineScaleSetOSDisk, self).__init__(**kwargs) + self.name = name + self.caching = caching + self.write_accelerator_enabled = write_accelerator_enabled + self.create_option = create_option + self.diff_disk_settings = diff_disk_settings + self.disk_size_gb = disk_size_gb + self.os_type = os_type + self.image = image + self.vhd_containers = vhd_containers + self.managed_disk = managed_disk + + +class VirtualMachineScaleSetOSProfile(Model): + """Describes a virtual machine scale set OS profile. + + :param computer_name_prefix: Specifies the computer name prefix for all of + the virtual machines in the scale set. Computer name prefixes must be 1 to + 15 characters long. + :type computer_name_prefix: str + :param admin_username: Specifies the name of the administrator account. +

    **Windows-only restriction:** Cannot end in "."

    + **Disallowed values:** "administrator", "admin", "user", "user1", "test", + "user2", "test1", "user3", "admin1", "1", "123", "a", "actuser", "adm", + "admin2", "aspnet", "backup", "console", "david", "guest", "john", + "owner", "root", "server", "sql", "support", "support_388945a0", "sys", + "test2", "test3", "user4", "user5".

    **Minimum-length (Linux):** 1 + character

    **Max-length (Linux):** 64 characters

    + **Max-length (Windows):** 20 characters

  • For root access to + the Linux VM, see [Using root privileges on Linux virtual machines in + Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-use-root-privileges?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json)
  • + For a list of built-in system users on Linux that should not be used in + this field, see [Selecting User Names for Linux on + Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-usernames?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json) + :type admin_username: str + :param admin_password: Specifies the password of the administrator + account.

    **Minimum-length (Windows):** 8 characters

    + **Minimum-length (Linux):** 6 characters

    **Max-length + (Windows):** 123 characters

    **Max-length (Linux):** 72 characters +

    **Complexity requirements:** 3 out of 4 conditions below need to + be fulfilled
    Has lower characters
    Has upper characters
    Has a + digit
    Has a special character (Regex match [\\W_])

    + **Disallowed values:** "abc@123", "P@$$w0rd", "P@ssw0rd", "P@ssword123", + "Pa$$word", "pass@word1", "Password!", "Password1", "Password22", + "iloveyou!"

    For resetting the password, see [How to reset the + Remote Desktop service or its login password in a Windows + VM](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-reset-rdp?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json) +

    For resetting root password, see [Manage users, SSH, and check or + repair disks on Azure Linux VMs using the VMAccess + Extension](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-using-vmaccess-extension?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json#reset-root-password) + :type admin_password: str + :param custom_data: Specifies a base-64 encoded string of custom data. The + base-64 encoded string is decoded to a binary array that is saved as a + file on the Virtual Machine. The maximum length of the binary array is + 65535 bytes.

    For using cloud-init for your VM, see [Using + cloud-init to customize a Linux VM during + creation](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-using-cloud-init?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json) + :type custom_data: str + :param windows_configuration: Specifies Windows operating system settings + on the virtual machine. + :type windows_configuration: + ~azure.mgmt.compute.v2019_03_01.models.WindowsConfiguration + :param linux_configuration: Specifies the Linux operating system settings + on the virtual machine.

    For a list of supported Linux + distributions, see [Linux on Azure-Endorsed + Distributions](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-endorsed-distros?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json) +

    For running non-endorsed distributions, see [Information for + Non-Endorsed + Distributions](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-create-upload-generic?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json). + :type linux_configuration: + ~azure.mgmt.compute.v2019_03_01.models.LinuxConfiguration + :param secrets: Specifies set of certificates that should be installed + onto the virtual machines in the scale set. + :type secrets: + list[~azure.mgmt.compute.v2019_03_01.models.VaultSecretGroup] + """ + + _attribute_map = { + 'computer_name_prefix': {'key': 'computerNamePrefix', 'type': 'str'}, + 'admin_username': {'key': 'adminUsername', 'type': 'str'}, + 'admin_password': {'key': 'adminPassword', 'type': 'str'}, + 'custom_data': {'key': 'customData', 'type': 'str'}, + 'windows_configuration': {'key': 'windowsConfiguration', 'type': 'WindowsConfiguration'}, + 'linux_configuration': {'key': 'linuxConfiguration', 'type': 'LinuxConfiguration'}, + 'secrets': {'key': 'secrets', 'type': '[VaultSecretGroup]'}, + } + + def __init__(self, *, computer_name_prefix: str=None, admin_username: str=None, admin_password: str=None, custom_data: str=None, windows_configuration=None, linux_configuration=None, secrets=None, **kwargs) -> None: + super(VirtualMachineScaleSetOSProfile, self).__init__(**kwargs) + self.computer_name_prefix = computer_name_prefix + self.admin_username = admin_username + self.admin_password = admin_password + self.custom_data = custom_data + self.windows_configuration = windows_configuration + self.linux_configuration = linux_configuration + self.secrets = secrets + + +class VirtualMachineScaleSetPublicIPAddressConfiguration(Model): + """Describes a virtual machines scale set IP Configuration's PublicIPAddress + configuration. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. The publicIP address configuration name. + :type name: str + :param idle_timeout_in_minutes: The idle timeout of the public IP address. + :type idle_timeout_in_minutes: int + :param dns_settings: The dns settings to be applied on the publicIP + addresses . + :type dns_settings: + ~azure.mgmt.compute.v2019_03_01.models.VirtualMachineScaleSetPublicIPAddressConfigurationDnsSettings + :param ip_tags: The list of IP tags associated with the public IP address. + :type ip_tags: + list[~azure.mgmt.compute.v2019_03_01.models.VirtualMachineScaleSetIpTag] + :param public_ip_prefix: The PublicIPPrefix from which to allocate + publicIP addresses. + :type public_ip_prefix: ~azure.mgmt.compute.v2019_03_01.models.SubResource + """ + + _validation = { + 'name': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'idle_timeout_in_minutes': {'key': 'properties.idleTimeoutInMinutes', 'type': 'int'}, + 'dns_settings': {'key': 'properties.dnsSettings', 'type': 'VirtualMachineScaleSetPublicIPAddressConfigurationDnsSettings'}, + 'ip_tags': {'key': 'properties.ipTags', 'type': '[VirtualMachineScaleSetIpTag]'}, + 'public_ip_prefix': {'key': 'properties.publicIPPrefix', 'type': 'SubResource'}, + } + + def __init__(self, *, name: str, idle_timeout_in_minutes: int=None, dns_settings=None, ip_tags=None, public_ip_prefix=None, **kwargs) -> None: + super(VirtualMachineScaleSetPublicIPAddressConfiguration, self).__init__(**kwargs) + self.name = name + self.idle_timeout_in_minutes = idle_timeout_in_minutes + self.dns_settings = dns_settings + self.ip_tags = ip_tags + self.public_ip_prefix = public_ip_prefix + + +class VirtualMachineScaleSetPublicIPAddressConfigurationDnsSettings(Model): + """Describes a virtual machines scale sets network configuration's DNS + settings. + + All required parameters must be populated in order to send to Azure. + + :param domain_name_label: Required. The Domain name label.The + concatenation of the domain name label and vm index will be the domain + name labels of the PublicIPAddress resources that will be created + :type domain_name_label: str + """ + + _validation = { + 'domain_name_label': {'required': True}, + } + + _attribute_map = { + 'domain_name_label': {'key': 'domainNameLabel', 'type': 'str'}, + } + + def __init__(self, *, domain_name_label: str, **kwargs) -> None: + super(VirtualMachineScaleSetPublicIPAddressConfigurationDnsSettings, self).__init__(**kwargs) + self.domain_name_label = domain_name_label + + +class VirtualMachineScaleSetVMReimageParameters(VirtualMachineReimageParameters): + """Describes a Virtual Machine Scale Set VM Reimage Parameters. + + :param temp_disk: Specifies whether to reimage temp disk. Default value: + false. Note: This temp disk reimage parameter is only supported for + VM/VMSS with Ephemeral OS disk. + :type temp_disk: bool + """ + + _attribute_map = { + 'temp_disk': {'key': 'tempDisk', 'type': 'bool'}, + } + + def __init__(self, *, temp_disk: bool=None, **kwargs) -> None: + super(VirtualMachineScaleSetVMReimageParameters, self).__init__(temp_disk=temp_disk, **kwargs) + + +class VirtualMachineScaleSetReimageParameters(VirtualMachineScaleSetVMReimageParameters): + """Describes a Virtual Machine Scale Set VM Reimage Parameters. + + :param temp_disk: Specifies whether to reimage temp disk. Default value: + false. Note: This temp disk reimage parameter is only supported for + VM/VMSS with Ephemeral OS disk. + :type temp_disk: bool + :param instance_ids: The virtual machine scale set instance ids. Omitting + the virtual machine scale set instance ids will result in the operation + being performed on all virtual machines in the virtual machine scale set. + :type instance_ids: list[str] + """ + + _attribute_map = { + 'temp_disk': {'key': 'tempDisk', 'type': 'bool'}, + 'instance_ids': {'key': 'instanceIds', 'type': '[str]'}, + } + + def __init__(self, *, temp_disk: bool=None, instance_ids=None, **kwargs) -> None: + super(VirtualMachineScaleSetReimageParameters, self).__init__(temp_disk=temp_disk, **kwargs) + self.instance_ids = instance_ids + + +class VirtualMachineScaleSetSku(Model): + """Describes an available virtual machine scale set sku. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar resource_type: The type of resource the sku applies to. + :vartype resource_type: str + :ivar sku: The Sku. + :vartype sku: ~azure.mgmt.compute.v2019_03_01.models.Sku + :ivar capacity: Specifies the number of virtual machines in the scale set. + :vartype capacity: + ~azure.mgmt.compute.v2019_03_01.models.VirtualMachineScaleSetSkuCapacity + """ + + _validation = { + 'resource_type': {'readonly': True}, + 'sku': {'readonly': True}, + 'capacity': {'readonly': True}, + } + + _attribute_map = { + 'resource_type': {'key': 'resourceType', 'type': 'str'}, + 'sku': {'key': 'sku', 'type': 'Sku'}, + 'capacity': {'key': 'capacity', 'type': 'VirtualMachineScaleSetSkuCapacity'}, + } + + def __init__(self, **kwargs) -> None: + super(VirtualMachineScaleSetSku, self).__init__(**kwargs) + self.resource_type = None + self.sku = None + self.capacity = None + + +class VirtualMachineScaleSetSkuCapacity(Model): + """Describes scaling information of a sku. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar minimum: The minimum capacity. + :vartype minimum: long + :ivar maximum: The maximum capacity that can be set. + :vartype maximum: long + :ivar default_capacity: The default capacity. + :vartype default_capacity: long + :ivar scale_type: The scale type applicable to the sku. Possible values + include: 'Automatic', 'None' + :vartype scale_type: str or + ~azure.mgmt.compute.v2019_03_01.models.VirtualMachineScaleSetSkuScaleType + """ + + _validation = { + 'minimum': {'readonly': True}, + 'maximum': {'readonly': True}, + 'default_capacity': {'readonly': True}, + 'scale_type': {'readonly': True}, + } + + _attribute_map = { + 'minimum': {'key': 'minimum', 'type': 'long'}, + 'maximum': {'key': 'maximum', 'type': 'long'}, + 'default_capacity': {'key': 'defaultCapacity', 'type': 'long'}, + 'scale_type': {'key': 'scaleType', 'type': 'VirtualMachineScaleSetSkuScaleType'}, + } + + def __init__(self, **kwargs) -> None: + super(VirtualMachineScaleSetSkuCapacity, self).__init__(**kwargs) + self.minimum = None + self.maximum = None + self.default_capacity = None + self.scale_type = None + + +class VirtualMachineScaleSetStorageProfile(Model): + """Describes a virtual machine scale set storage profile. + + :param image_reference: Specifies information about the image to use. You + can specify information about platform images, marketplace images, or + virtual machine images. This element is required when you want to use a + platform image, marketplace image, or virtual machine image, but is not + used in other creation operations. + :type image_reference: + ~azure.mgmt.compute.v2019_03_01.models.ImageReference + :param os_disk: Specifies information about the operating system disk used + by the virtual machines in the scale set.

    For more information + about disks, see [About disks and VHDs for Azure virtual + machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-about-disks-vhds?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). + :type os_disk: + ~azure.mgmt.compute.v2019_03_01.models.VirtualMachineScaleSetOSDisk + :param data_disks: Specifies the parameters that are used to add data + disks to the virtual machines in the scale set.

    For more + information about disks, see [About disks and VHDs for Azure virtual + machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-about-disks-vhds?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). + :type data_disks: + list[~azure.mgmt.compute.v2019_03_01.models.VirtualMachineScaleSetDataDisk] + """ + + _attribute_map = { + 'image_reference': {'key': 'imageReference', 'type': 'ImageReference'}, + 'os_disk': {'key': 'osDisk', 'type': 'VirtualMachineScaleSetOSDisk'}, + 'data_disks': {'key': 'dataDisks', 'type': '[VirtualMachineScaleSetDataDisk]'}, + } + + def __init__(self, *, image_reference=None, os_disk=None, data_disks=None, **kwargs) -> None: + super(VirtualMachineScaleSetStorageProfile, self).__init__(**kwargs) + self.image_reference = image_reference + self.os_disk = os_disk + self.data_disks = data_disks + + +class VirtualMachineScaleSetUpdate(UpdateResource): + """Describes a Virtual Machine Scale Set. + + :param tags: Resource tags + :type tags: dict[str, str] + :param sku: The virtual machine scale set sku. + :type sku: ~azure.mgmt.compute.v2019_03_01.models.Sku + :param plan: The purchase plan when deploying a virtual machine scale set + from VM Marketplace images. + :type plan: ~azure.mgmt.compute.v2019_03_01.models.Plan + :param upgrade_policy: The upgrade policy. + :type upgrade_policy: ~azure.mgmt.compute.v2019_03_01.models.UpgradePolicy + :param virtual_machine_profile: The virtual machine profile. + :type virtual_machine_profile: + ~azure.mgmt.compute.v2019_03_01.models.VirtualMachineScaleSetUpdateVMProfile + :param overprovision: Specifies whether the Virtual Machine Scale Set + should be overprovisioned. + :type overprovision: bool + :param single_placement_group: When true this limits the scale set to a + single placement group, of max size 100 virtual machines. + :type single_placement_group: bool + :param additional_capabilities: Specifies additional capabilities enabled + or disabled on the Virtual Machines in the Virtual Machine Scale Set. For + instance: whether the Virtual Machines have the capability to support + attaching managed data disks with UltraSSD_LRS storage account type. + :type additional_capabilities: + ~azure.mgmt.compute.v2019_03_01.models.AdditionalCapabilities + :param identity: The identity of the virtual machine scale set, if + configured. + :type identity: + ~azure.mgmt.compute.v2019_03_01.models.VirtualMachineScaleSetIdentity + """ + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + 'sku': {'key': 'sku', 'type': 'Sku'}, + 'plan': {'key': 'plan', 'type': 'Plan'}, + 'upgrade_policy': {'key': 'properties.upgradePolicy', 'type': 'UpgradePolicy'}, + 'virtual_machine_profile': {'key': 'properties.virtualMachineProfile', 'type': 'VirtualMachineScaleSetUpdateVMProfile'}, + 'overprovision': {'key': 'properties.overprovision', 'type': 'bool'}, + 'single_placement_group': {'key': 'properties.singlePlacementGroup', 'type': 'bool'}, + 'additional_capabilities': {'key': 'properties.additionalCapabilities', 'type': 'AdditionalCapabilities'}, + 'identity': {'key': 'identity', 'type': 'VirtualMachineScaleSetIdentity'}, + } + + def __init__(self, *, tags=None, sku=None, plan=None, upgrade_policy=None, virtual_machine_profile=None, overprovision: bool=None, single_placement_group: bool=None, additional_capabilities=None, identity=None, **kwargs) -> None: + super(VirtualMachineScaleSetUpdate, self).__init__(tags=tags, **kwargs) + self.sku = sku + self.plan = plan + self.upgrade_policy = upgrade_policy + self.virtual_machine_profile = virtual_machine_profile + self.overprovision = overprovision + self.single_placement_group = single_placement_group + self.additional_capabilities = additional_capabilities + self.identity = identity + + +class VirtualMachineScaleSetUpdateIPConfiguration(SubResource): + """Describes a virtual machine scale set network profile's IP configuration. + + :param id: Resource Id + :type id: str + :param name: The IP configuration name. + :type name: str + :param subnet: The subnet. + :type subnet: ~azure.mgmt.compute.v2019_03_01.models.ApiEntityReference + :param primary: Specifies the primary IP Configuration in case the network + interface has more than one IP Configuration. + :type primary: bool + :param public_ip_address_configuration: The publicIPAddressConfiguration. + :type public_ip_address_configuration: + ~azure.mgmt.compute.v2019_03_01.models.VirtualMachineScaleSetUpdatePublicIPAddressConfiguration + :param private_ip_address_version: Available from Api-Version 2017-03-30 + onwards, it represents whether the specific ipconfiguration is IPv4 or + IPv6. Default is taken as IPv4. Possible values are: 'IPv4' and 'IPv6'. + Possible values include: 'IPv4', 'IPv6' + :type private_ip_address_version: str or + ~azure.mgmt.compute.v2019_03_01.models.IPVersion + :param application_gateway_backend_address_pools: The application gateway + backend address pools. + :type application_gateway_backend_address_pools: + list[~azure.mgmt.compute.v2019_03_01.models.SubResource] + :param application_security_groups: Specifies an array of references to + application security group. + :type application_security_groups: + list[~azure.mgmt.compute.v2019_03_01.models.SubResource] + :param load_balancer_backend_address_pools: The load balancer backend + address pools. + :type load_balancer_backend_address_pools: + list[~azure.mgmt.compute.v2019_03_01.models.SubResource] + :param load_balancer_inbound_nat_pools: The load balancer inbound nat + pools. + :type load_balancer_inbound_nat_pools: + list[~azure.mgmt.compute.v2019_03_01.models.SubResource] + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'subnet': {'key': 'properties.subnet', 'type': 'ApiEntityReference'}, + 'primary': {'key': 'properties.primary', 'type': 'bool'}, + 'public_ip_address_configuration': {'key': 'properties.publicIPAddressConfiguration', 'type': 'VirtualMachineScaleSetUpdatePublicIPAddressConfiguration'}, + 'private_ip_address_version': {'key': 'properties.privateIPAddressVersion', 'type': 'str'}, + 'application_gateway_backend_address_pools': {'key': 'properties.applicationGatewayBackendAddressPools', 'type': '[SubResource]'}, + 'application_security_groups': {'key': 'properties.applicationSecurityGroups', 'type': '[SubResource]'}, + 'load_balancer_backend_address_pools': {'key': 'properties.loadBalancerBackendAddressPools', 'type': '[SubResource]'}, + 'load_balancer_inbound_nat_pools': {'key': 'properties.loadBalancerInboundNatPools', 'type': '[SubResource]'}, + } + + def __init__(self, *, id: str=None, name: str=None, subnet=None, primary: bool=None, public_ip_address_configuration=None, private_ip_address_version=None, application_gateway_backend_address_pools=None, application_security_groups=None, load_balancer_backend_address_pools=None, load_balancer_inbound_nat_pools=None, **kwargs) -> None: + super(VirtualMachineScaleSetUpdateIPConfiguration, self).__init__(id=id, **kwargs) + self.name = name + self.subnet = subnet + self.primary = primary + self.public_ip_address_configuration = public_ip_address_configuration + self.private_ip_address_version = private_ip_address_version + self.application_gateway_backend_address_pools = application_gateway_backend_address_pools + self.application_security_groups = application_security_groups + self.load_balancer_backend_address_pools = load_balancer_backend_address_pools + self.load_balancer_inbound_nat_pools = load_balancer_inbound_nat_pools + + +class VirtualMachineScaleSetUpdateNetworkConfiguration(SubResource): + """Describes a virtual machine scale set network profile's network + configurations. + + :param id: Resource Id + :type id: str + :param name: The network configuration name. + :type name: str + :param primary: Whether this is a primary NIC on a virtual machine. + :type primary: bool + :param enable_accelerated_networking: Specifies whether the network + interface is accelerated networking-enabled. + :type enable_accelerated_networking: bool + :param network_security_group: The network security group. + :type network_security_group: + ~azure.mgmt.compute.v2019_03_01.models.SubResource + :param dns_settings: The dns settings to be applied on the network + interfaces. + :type dns_settings: + ~azure.mgmt.compute.v2019_03_01.models.VirtualMachineScaleSetNetworkConfigurationDnsSettings + :param ip_configurations: The virtual machine scale set IP Configuration. + :type ip_configurations: + list[~azure.mgmt.compute.v2019_03_01.models.VirtualMachineScaleSetUpdateIPConfiguration] + :param enable_ip_forwarding: Whether IP forwarding enabled on this NIC. + :type enable_ip_forwarding: bool + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'primary': {'key': 'properties.primary', 'type': 'bool'}, + 'enable_accelerated_networking': {'key': 'properties.enableAcceleratedNetworking', 'type': 'bool'}, + 'network_security_group': {'key': 'properties.networkSecurityGroup', 'type': 'SubResource'}, + 'dns_settings': {'key': 'properties.dnsSettings', 'type': 'VirtualMachineScaleSetNetworkConfigurationDnsSettings'}, + 'ip_configurations': {'key': 'properties.ipConfigurations', 'type': '[VirtualMachineScaleSetUpdateIPConfiguration]'}, + 'enable_ip_forwarding': {'key': 'properties.enableIPForwarding', 'type': 'bool'}, + } + + def __init__(self, *, id: str=None, name: str=None, primary: bool=None, enable_accelerated_networking: bool=None, network_security_group=None, dns_settings=None, ip_configurations=None, enable_ip_forwarding: bool=None, **kwargs) -> None: + super(VirtualMachineScaleSetUpdateNetworkConfiguration, self).__init__(id=id, **kwargs) + self.name = name + self.primary = primary + self.enable_accelerated_networking = enable_accelerated_networking + self.network_security_group = network_security_group + self.dns_settings = dns_settings + self.ip_configurations = ip_configurations + self.enable_ip_forwarding = enable_ip_forwarding + + +class VirtualMachineScaleSetUpdateNetworkProfile(Model): + """Describes a virtual machine scale set network profile. + + :param network_interface_configurations: The list of network + configurations. + :type network_interface_configurations: + list[~azure.mgmt.compute.v2019_03_01.models.VirtualMachineScaleSetUpdateNetworkConfiguration] + """ + + _attribute_map = { + 'network_interface_configurations': {'key': 'networkInterfaceConfigurations', 'type': '[VirtualMachineScaleSetUpdateNetworkConfiguration]'}, + } + + def __init__(self, *, network_interface_configurations=None, **kwargs) -> None: + super(VirtualMachineScaleSetUpdateNetworkProfile, self).__init__(**kwargs) + self.network_interface_configurations = network_interface_configurations + + +class VirtualMachineScaleSetUpdateOSDisk(Model): + """Describes virtual machine scale set operating system disk Update Object. + This should be used for Updating VMSS OS Disk. + + :param caching: The caching type. Possible values include: 'None', + 'ReadOnly', 'ReadWrite' + :type caching: str or ~azure.mgmt.compute.v2019_03_01.models.CachingTypes + :param write_accelerator_enabled: Specifies whether writeAccelerator + should be enabled or disabled on the disk. + :type write_accelerator_enabled: bool + :param disk_size_gb: Specifies the size of the operating system disk in + gigabytes. This element can be used to overwrite the size of the disk in a + virtual machine image.

    This value cannot be larger than 1023 GB + :type disk_size_gb: int + :param image: The Source User Image VirtualHardDisk. This VirtualHardDisk + will be copied before using it to attach to the Virtual Machine. If + SourceImage is provided, the destination VirtualHardDisk should not exist. + :type image: ~azure.mgmt.compute.v2019_03_01.models.VirtualHardDisk + :param vhd_containers: The list of virtual hard disk container uris. + :type vhd_containers: list[str] + :param managed_disk: The managed disk parameters. + :type managed_disk: + ~azure.mgmt.compute.v2019_03_01.models.VirtualMachineScaleSetManagedDiskParameters + """ + + _attribute_map = { + 'caching': {'key': 'caching', 'type': 'CachingTypes'}, + 'write_accelerator_enabled': {'key': 'writeAcceleratorEnabled', 'type': 'bool'}, + 'disk_size_gb': {'key': 'diskSizeGB', 'type': 'int'}, + 'image': {'key': 'image', 'type': 'VirtualHardDisk'}, + 'vhd_containers': {'key': 'vhdContainers', 'type': '[str]'}, + 'managed_disk': {'key': 'managedDisk', 'type': 'VirtualMachineScaleSetManagedDiskParameters'}, + } + + def __init__(self, *, caching=None, write_accelerator_enabled: bool=None, disk_size_gb: int=None, image=None, vhd_containers=None, managed_disk=None, **kwargs) -> None: + super(VirtualMachineScaleSetUpdateOSDisk, self).__init__(**kwargs) + self.caching = caching + self.write_accelerator_enabled = write_accelerator_enabled + self.disk_size_gb = disk_size_gb + self.image = image + self.vhd_containers = vhd_containers + self.managed_disk = managed_disk + + +class VirtualMachineScaleSetUpdateOSProfile(Model): + """Describes a virtual machine scale set OS profile. + + :param custom_data: A base-64 encoded string of custom data. + :type custom_data: str + :param windows_configuration: The Windows Configuration of the OS profile. + :type windows_configuration: + ~azure.mgmt.compute.v2019_03_01.models.WindowsConfiguration + :param linux_configuration: The Linux Configuration of the OS profile. + :type linux_configuration: + ~azure.mgmt.compute.v2019_03_01.models.LinuxConfiguration + :param secrets: The List of certificates for addition to the VM. + :type secrets: + list[~azure.mgmt.compute.v2019_03_01.models.VaultSecretGroup] + """ + + _attribute_map = { + 'custom_data': {'key': 'customData', 'type': 'str'}, + 'windows_configuration': {'key': 'windowsConfiguration', 'type': 'WindowsConfiguration'}, + 'linux_configuration': {'key': 'linuxConfiguration', 'type': 'LinuxConfiguration'}, + 'secrets': {'key': 'secrets', 'type': '[VaultSecretGroup]'}, + } + + def __init__(self, *, custom_data: str=None, windows_configuration=None, linux_configuration=None, secrets=None, **kwargs) -> None: + super(VirtualMachineScaleSetUpdateOSProfile, self).__init__(**kwargs) + self.custom_data = custom_data + self.windows_configuration = windows_configuration + self.linux_configuration = linux_configuration + self.secrets = secrets + + +class VirtualMachineScaleSetUpdatePublicIPAddressConfiguration(Model): + """Describes a virtual machines scale set IP Configuration's PublicIPAddress + configuration. + + :param name: The publicIP address configuration name. + :type name: str + :param idle_timeout_in_minutes: The idle timeout of the public IP address. + :type idle_timeout_in_minutes: int + :param dns_settings: The dns settings to be applied on the publicIP + addresses . + :type dns_settings: + ~azure.mgmt.compute.v2019_03_01.models.VirtualMachineScaleSetPublicIPAddressConfigurationDnsSettings + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'idle_timeout_in_minutes': {'key': 'properties.idleTimeoutInMinutes', 'type': 'int'}, + 'dns_settings': {'key': 'properties.dnsSettings', 'type': 'VirtualMachineScaleSetPublicIPAddressConfigurationDnsSettings'}, + } + + def __init__(self, *, name: str=None, idle_timeout_in_minutes: int=None, dns_settings=None, **kwargs) -> None: + super(VirtualMachineScaleSetUpdatePublicIPAddressConfiguration, self).__init__(**kwargs) + self.name = name + self.idle_timeout_in_minutes = idle_timeout_in_minutes + self.dns_settings = dns_settings + + +class VirtualMachineScaleSetUpdateStorageProfile(Model): + """Describes a virtual machine scale set storage profile. + + :param image_reference: The image reference. + :type image_reference: + ~azure.mgmt.compute.v2019_03_01.models.ImageReference + :param os_disk: The OS disk. + :type os_disk: + ~azure.mgmt.compute.v2019_03_01.models.VirtualMachineScaleSetUpdateOSDisk + :param data_disks: The data disks. + :type data_disks: + list[~azure.mgmt.compute.v2019_03_01.models.VirtualMachineScaleSetDataDisk] + """ + + _attribute_map = { + 'image_reference': {'key': 'imageReference', 'type': 'ImageReference'}, + 'os_disk': {'key': 'osDisk', 'type': 'VirtualMachineScaleSetUpdateOSDisk'}, + 'data_disks': {'key': 'dataDisks', 'type': '[VirtualMachineScaleSetDataDisk]'}, + } + + def __init__(self, *, image_reference=None, os_disk=None, data_disks=None, **kwargs) -> None: + super(VirtualMachineScaleSetUpdateStorageProfile, self).__init__(**kwargs) + self.image_reference = image_reference + self.os_disk = os_disk + self.data_disks = data_disks + + +class VirtualMachineScaleSetUpdateVMProfile(Model): + """Describes a virtual machine scale set virtual machine profile. + + :param os_profile: The virtual machine scale set OS profile. + :type os_profile: + ~azure.mgmt.compute.v2019_03_01.models.VirtualMachineScaleSetUpdateOSProfile + :param storage_profile: The virtual machine scale set storage profile. + :type storage_profile: + ~azure.mgmt.compute.v2019_03_01.models.VirtualMachineScaleSetUpdateStorageProfile + :param network_profile: The virtual machine scale set network profile. + :type network_profile: + ~azure.mgmt.compute.v2019_03_01.models.VirtualMachineScaleSetUpdateNetworkProfile + :param diagnostics_profile: The virtual machine scale set diagnostics + profile. + :type diagnostics_profile: + ~azure.mgmt.compute.v2019_03_01.models.DiagnosticsProfile + :param extension_profile: The virtual machine scale set extension profile. + :type extension_profile: + ~azure.mgmt.compute.v2019_03_01.models.VirtualMachineScaleSetExtensionProfile + :param license_type: The license type, which is for bring your own license + scenario. + :type license_type: str + """ + + _attribute_map = { + 'os_profile': {'key': 'osProfile', 'type': 'VirtualMachineScaleSetUpdateOSProfile'}, + 'storage_profile': {'key': 'storageProfile', 'type': 'VirtualMachineScaleSetUpdateStorageProfile'}, + 'network_profile': {'key': 'networkProfile', 'type': 'VirtualMachineScaleSetUpdateNetworkProfile'}, + 'diagnostics_profile': {'key': 'diagnosticsProfile', 'type': 'DiagnosticsProfile'}, + 'extension_profile': {'key': 'extensionProfile', 'type': 'VirtualMachineScaleSetExtensionProfile'}, + 'license_type': {'key': 'licenseType', 'type': 'str'}, + } + + def __init__(self, *, os_profile=None, storage_profile=None, network_profile=None, diagnostics_profile=None, extension_profile=None, license_type: str=None, **kwargs) -> None: + super(VirtualMachineScaleSetUpdateVMProfile, self).__init__(**kwargs) + self.os_profile = os_profile + self.storage_profile = storage_profile + self.network_profile = network_profile + self.diagnostics_profile = diagnostics_profile + self.extension_profile = extension_profile + self.license_type = license_type + + +class VirtualMachineScaleSetVM(Resource): + """Describes a virtual machine scale set virtual machine. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource Id + :vartype id: str + :ivar name: Resource name + :vartype name: str + :ivar type: Resource type + :vartype type: str + :param location: Required. Resource location + :type location: str + :param tags: Resource tags + :type tags: dict[str, str] + :ivar instance_id: The virtual machine instance ID. + :vartype instance_id: str + :ivar sku: The virtual machine SKU. + :vartype sku: ~azure.mgmt.compute.v2019_03_01.models.Sku + :ivar latest_model_applied: Specifies whether the latest model has been + applied to the virtual machine. + :vartype latest_model_applied: bool + :ivar vm_id: Azure VM unique ID. + :vartype vm_id: str + :ivar instance_view: The virtual machine instance view. + :vartype instance_view: + ~azure.mgmt.compute.v2019_03_01.models.VirtualMachineScaleSetVMInstanceView + :param hardware_profile: Specifies the hardware settings for the virtual + machine. + :type hardware_profile: + ~azure.mgmt.compute.v2019_03_01.models.HardwareProfile + :param storage_profile: Specifies the storage settings for the virtual + machine disks. + :type storage_profile: + ~azure.mgmt.compute.v2019_03_01.models.StorageProfile + :param additional_capabilities: Specifies additional capabilities enabled + or disabled on the virtual machine in the scale set. For instance: whether + the virtual machine has the capability to support attaching managed data + disks with UltraSSD_LRS storage account type. + :type additional_capabilities: + ~azure.mgmt.compute.v2019_03_01.models.AdditionalCapabilities + :param os_profile: Specifies the operating system settings for the virtual + machine. + :type os_profile: ~azure.mgmt.compute.v2019_03_01.models.OSProfile + :param network_profile: Specifies the network interfaces of the virtual + machine. + :type network_profile: + ~azure.mgmt.compute.v2019_03_01.models.NetworkProfile + :param network_profile_configuration: Specifies the network profile + configuration of the virtual machine. + :type network_profile_configuration: + ~azure.mgmt.compute.v2019_03_01.models.VirtualMachineScaleSetVMNetworkProfileConfiguration + :param diagnostics_profile: Specifies the boot diagnostic settings state. +

    Minimum api-version: 2015-06-15. + :type diagnostics_profile: + ~azure.mgmt.compute.v2019_03_01.models.DiagnosticsProfile + :param availability_set: Specifies information about the availability set + that the virtual machine should be assigned to. Virtual machines specified + in the same availability set are allocated to different nodes to maximize + availability. For more information about availability sets, see [Manage + the availability of virtual + machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-manage-availability?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). +

    For more information on Azure planned maintenance, see [Planned + maintenance for virtual machines in + Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-planned-maintenance?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json) +

    Currently, a VM can only be added to availability set at creation + time. An existing VM cannot be added to an availability set. + :type availability_set: ~azure.mgmt.compute.v2019_03_01.models.SubResource + :ivar provisioning_state: The provisioning state, which only appears in + the response. + :vartype provisioning_state: str + :param license_type: Specifies that the image or disk that is being used + was licensed on-premises. This element is only used for images that + contain the Windows Server operating system.

    Possible values are: +

    Windows_Client

    Windows_Server

    If this element + is included in a request for an update, the value must match the initial + value. This value cannot be updated.

    For more information, see + [Azure Hybrid Use Benefit for Windows + Server](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-hybrid-use-benefit-licensing?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json) +

    Minimum api-version: 2015-06-15 + :type license_type: str + :ivar model_definition_applied: Specifies whether the model applied to the + virtual machine is the model of the virtual machine scale set or the + customized model for the virtual machine. + :vartype model_definition_applied: str + :param protection_policy: Specifies the protection policy of the virtual + machine. + :type protection_policy: + ~azure.mgmt.compute.v2019_03_01.models.VirtualMachineScaleSetVMProtectionPolicy + :param plan: Specifies information about the marketplace image used to + create the virtual machine. This element is only used for marketplace + images. Before you can use a marketplace image from an API, you must + enable the image for programmatic use. In the Azure portal, find the + marketplace image that you want to use and then click **Want to deploy + programmatically, Get Started ->**. Enter any required information and + then click **Save**. + :type plan: ~azure.mgmt.compute.v2019_03_01.models.Plan + :ivar resources: The virtual machine child extension resources. + :vartype resources: + list[~azure.mgmt.compute.v2019_03_01.models.VirtualMachineExtension] + :ivar zones: The virtual machine zones. + :vartype zones: list[str] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + 'instance_id': {'readonly': True}, + 'sku': {'readonly': True}, + 'latest_model_applied': {'readonly': True}, + 'vm_id': {'readonly': True}, + 'instance_view': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + 'model_definition_applied': {'readonly': True}, + 'resources': {'readonly': True}, + 'zones': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'instance_id': {'key': 'instanceId', 'type': 'str'}, + 'sku': {'key': 'sku', 'type': 'Sku'}, + 'latest_model_applied': {'key': 'properties.latestModelApplied', 'type': 'bool'}, + 'vm_id': {'key': 'properties.vmId', 'type': 'str'}, + 'instance_view': {'key': 'properties.instanceView', 'type': 'VirtualMachineScaleSetVMInstanceView'}, + 'hardware_profile': {'key': 'properties.hardwareProfile', 'type': 'HardwareProfile'}, + 'storage_profile': {'key': 'properties.storageProfile', 'type': 'StorageProfile'}, + 'additional_capabilities': {'key': 'properties.additionalCapabilities', 'type': 'AdditionalCapabilities'}, + 'os_profile': {'key': 'properties.osProfile', 'type': 'OSProfile'}, + 'network_profile': {'key': 'properties.networkProfile', 'type': 'NetworkProfile'}, + 'network_profile_configuration': {'key': 'properties.networkProfileConfiguration', 'type': 'VirtualMachineScaleSetVMNetworkProfileConfiguration'}, + 'diagnostics_profile': {'key': 'properties.diagnosticsProfile', 'type': 'DiagnosticsProfile'}, + 'availability_set': {'key': 'properties.availabilitySet', 'type': 'SubResource'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'license_type': {'key': 'properties.licenseType', 'type': 'str'}, + 'model_definition_applied': {'key': 'properties.modelDefinitionApplied', 'type': 'str'}, + 'protection_policy': {'key': 'properties.protectionPolicy', 'type': 'VirtualMachineScaleSetVMProtectionPolicy'}, + 'plan': {'key': 'plan', 'type': 'Plan'}, + 'resources': {'key': 'resources', 'type': '[VirtualMachineExtension]'}, + 'zones': {'key': 'zones', 'type': '[str]'}, + } + + def __init__(self, *, location: str, tags=None, hardware_profile=None, storage_profile=None, additional_capabilities=None, os_profile=None, network_profile=None, network_profile_configuration=None, diagnostics_profile=None, availability_set=None, license_type: str=None, protection_policy=None, plan=None, **kwargs) -> None: + super(VirtualMachineScaleSetVM, self).__init__(location=location, tags=tags, **kwargs) + self.instance_id = None + self.sku = None + self.latest_model_applied = None + self.vm_id = None + self.instance_view = None + self.hardware_profile = hardware_profile + self.storage_profile = storage_profile + self.additional_capabilities = additional_capabilities + self.os_profile = os_profile + self.network_profile = network_profile + self.network_profile_configuration = network_profile_configuration + self.diagnostics_profile = diagnostics_profile + self.availability_set = availability_set + self.provisioning_state = None + self.license_type = license_type + self.model_definition_applied = None + self.protection_policy = protection_policy + self.plan = plan + self.resources = None + self.zones = None + + +class VirtualMachineScaleSetVMExtensionsSummary(Model): + """Extensions summary for virtual machines of a virtual machine scale set. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar name: The extension name. + :vartype name: str + :ivar statuses_summary: The extensions information. + :vartype statuses_summary: + list[~azure.mgmt.compute.v2019_03_01.models.VirtualMachineStatusCodeCount] + """ + + _validation = { + 'name': {'readonly': True}, + 'statuses_summary': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'statuses_summary': {'key': 'statusesSummary', 'type': '[VirtualMachineStatusCodeCount]'}, + } + + def __init__(self, **kwargs) -> None: + super(VirtualMachineScaleSetVMExtensionsSummary, self).__init__(**kwargs) + self.name = None + self.statuses_summary = None + + +class VirtualMachineScaleSetVMInstanceIDs(Model): + """Specifies a list of virtual machine instance IDs from the VM scale set. + + :param instance_ids: The virtual machine scale set instance ids. Omitting + the virtual machine scale set instance ids will result in the operation + being performed on all virtual machines in the virtual machine scale set. + :type instance_ids: list[str] + """ + + _attribute_map = { + 'instance_ids': {'key': 'instanceIds', 'type': '[str]'}, + } + + def __init__(self, *, instance_ids=None, **kwargs) -> None: + super(VirtualMachineScaleSetVMInstanceIDs, self).__init__(**kwargs) + self.instance_ids = instance_ids + + +class VirtualMachineScaleSetVMInstanceRequiredIDs(Model): + """Specifies a list of virtual machine instance IDs from the VM scale set. + + All required parameters must be populated in order to send to Azure. + + :param instance_ids: Required. The virtual machine scale set instance ids. + :type instance_ids: list[str] + """ + + _validation = { + 'instance_ids': {'required': True}, + } + + _attribute_map = { + 'instance_ids': {'key': 'instanceIds', 'type': '[str]'}, + } + + def __init__(self, *, instance_ids, **kwargs) -> None: + super(VirtualMachineScaleSetVMInstanceRequiredIDs, self).__init__(**kwargs) + self.instance_ids = instance_ids + + +class VirtualMachineScaleSetVMInstanceView(Model): + """The instance view of a virtual machine scale set VM. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :param platform_update_domain: The Update Domain count. + :type platform_update_domain: int + :param platform_fault_domain: The Fault Domain count. + :type platform_fault_domain: int + :param rdp_thumb_print: The Remote desktop certificate thumbprint. + :type rdp_thumb_print: str + :param vm_agent: The VM Agent running on the virtual machine. + :type vm_agent: + ~azure.mgmt.compute.v2019_03_01.models.VirtualMachineAgentInstanceView + :param maintenance_redeploy_status: The Maintenance Operation status on + the virtual machine. + :type maintenance_redeploy_status: + ~azure.mgmt.compute.v2019_03_01.models.MaintenanceRedeployStatus + :param disks: The disks information. + :type disks: list[~azure.mgmt.compute.v2019_03_01.models.DiskInstanceView] + :param extensions: The extensions information. + :type extensions: + list[~azure.mgmt.compute.v2019_03_01.models.VirtualMachineExtensionInstanceView] + :ivar vm_health: The health status for the VM. + :vartype vm_health: + ~azure.mgmt.compute.v2019_03_01.models.VirtualMachineHealthStatus + :param boot_diagnostics: Boot Diagnostics is a debugging feature which + allows you to view Console Output and Screenshot to diagnose VM status. +

    You can easily view the output of your console log.

    + Azure also enables you to see a screenshot of the VM from the hypervisor. + :type boot_diagnostics: + ~azure.mgmt.compute.v2019_03_01.models.BootDiagnosticsInstanceView + :param statuses: The resource status information. + :type statuses: + list[~azure.mgmt.compute.v2019_03_01.models.InstanceViewStatus] + :param placement_group_id: The placement group in which the VM is running. + If the VM is deallocated it will not have a placementGroupId. + :type placement_group_id: str + """ + + _validation = { + 'vm_health': {'readonly': True}, + } + + _attribute_map = { + 'platform_update_domain': {'key': 'platformUpdateDomain', 'type': 'int'}, + 'platform_fault_domain': {'key': 'platformFaultDomain', 'type': 'int'}, + 'rdp_thumb_print': {'key': 'rdpThumbPrint', 'type': 'str'}, + 'vm_agent': {'key': 'vmAgent', 'type': 'VirtualMachineAgentInstanceView'}, + 'maintenance_redeploy_status': {'key': 'maintenanceRedeployStatus', 'type': 'MaintenanceRedeployStatus'}, + 'disks': {'key': 'disks', 'type': '[DiskInstanceView]'}, + 'extensions': {'key': 'extensions', 'type': '[VirtualMachineExtensionInstanceView]'}, + 'vm_health': {'key': 'vmHealth', 'type': 'VirtualMachineHealthStatus'}, + 'boot_diagnostics': {'key': 'bootDiagnostics', 'type': 'BootDiagnosticsInstanceView'}, + 'statuses': {'key': 'statuses', 'type': '[InstanceViewStatus]'}, + 'placement_group_id': {'key': 'placementGroupId', 'type': 'str'}, + } + + def __init__(self, *, platform_update_domain: int=None, platform_fault_domain: int=None, rdp_thumb_print: str=None, vm_agent=None, maintenance_redeploy_status=None, disks=None, extensions=None, boot_diagnostics=None, statuses=None, placement_group_id: str=None, **kwargs) -> None: + super(VirtualMachineScaleSetVMInstanceView, self).__init__(**kwargs) + self.platform_update_domain = platform_update_domain + self.platform_fault_domain = platform_fault_domain + self.rdp_thumb_print = rdp_thumb_print + self.vm_agent = vm_agent + self.maintenance_redeploy_status = maintenance_redeploy_status + self.disks = disks + self.extensions = extensions + self.vm_health = None + self.boot_diagnostics = boot_diagnostics + self.statuses = statuses + self.placement_group_id = placement_group_id + + +class VirtualMachineScaleSetVMNetworkProfileConfiguration(Model): + """Describes a virtual machine scale set VM network profile. + + :param network_interface_configurations: The list of network + configurations. + :type network_interface_configurations: + list[~azure.mgmt.compute.v2019_03_01.models.VirtualMachineScaleSetNetworkConfiguration] + """ + + _attribute_map = { + 'network_interface_configurations': {'key': 'networkInterfaceConfigurations', 'type': '[VirtualMachineScaleSetNetworkConfiguration]'}, + } + + def __init__(self, *, network_interface_configurations=None, **kwargs) -> None: + super(VirtualMachineScaleSetVMNetworkProfileConfiguration, self).__init__(**kwargs) + self.network_interface_configurations = network_interface_configurations + + +class VirtualMachineScaleSetVMProfile(Model): + """Describes a virtual machine scale set virtual machine profile. + + :param os_profile: Specifies the operating system settings for the virtual + machines in the scale set. + :type os_profile: + ~azure.mgmt.compute.v2019_03_01.models.VirtualMachineScaleSetOSProfile + :param storage_profile: Specifies the storage settings for the virtual + machine disks. + :type storage_profile: + ~azure.mgmt.compute.v2019_03_01.models.VirtualMachineScaleSetStorageProfile + :param network_profile: Specifies properties of the network interfaces of + the virtual machines in the scale set. + :type network_profile: + ~azure.mgmt.compute.v2019_03_01.models.VirtualMachineScaleSetNetworkProfile + :param diagnostics_profile: Specifies the boot diagnostic settings state. +

    Minimum api-version: 2015-06-15. + :type diagnostics_profile: + ~azure.mgmt.compute.v2019_03_01.models.DiagnosticsProfile + :param extension_profile: Specifies a collection of settings for + extensions installed on virtual machines in the scale set. + :type extension_profile: + ~azure.mgmt.compute.v2019_03_01.models.VirtualMachineScaleSetExtensionProfile + :param license_type: Specifies that the image or disk that is being used + was licensed on-premises. This element is only used for images that + contain the Windows Server operating system.

    Possible values are: +

    Windows_Client

    Windows_Server

    If this element + is included in a request for an update, the value must match the initial + value. This value cannot be updated.

    For more information, see + [Azure Hybrid Use Benefit for Windows + Server](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-hybrid-use-benefit-licensing?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json) +

    Minimum api-version: 2015-06-15 + :type license_type: str + :param priority: Specifies the priority for the virtual machines in the + scale set.

    Minimum api-version: 2017-10-30-preview. Possible + values include: 'Regular', 'Low' + :type priority: str or + ~azure.mgmt.compute.v2019_03_01.models.VirtualMachinePriorityTypes + :param eviction_policy: Specifies the eviction policy for virtual machines + in a low priority scale set.

    Minimum api-version: + 2017-10-30-preview. Possible values include: 'Deallocate', 'Delete' + :type eviction_policy: str or + ~azure.mgmt.compute.v2019_03_01.models.VirtualMachineEvictionPolicyTypes + """ + + _attribute_map = { + 'os_profile': {'key': 'osProfile', 'type': 'VirtualMachineScaleSetOSProfile'}, + 'storage_profile': {'key': 'storageProfile', 'type': 'VirtualMachineScaleSetStorageProfile'}, + 'network_profile': {'key': 'networkProfile', 'type': 'VirtualMachineScaleSetNetworkProfile'}, + 'diagnostics_profile': {'key': 'diagnosticsProfile', 'type': 'DiagnosticsProfile'}, + 'extension_profile': {'key': 'extensionProfile', 'type': 'VirtualMachineScaleSetExtensionProfile'}, + 'license_type': {'key': 'licenseType', 'type': 'str'}, + 'priority': {'key': 'priority', 'type': 'str'}, + 'eviction_policy': {'key': 'evictionPolicy', 'type': 'str'}, + } + + def __init__(self, *, os_profile=None, storage_profile=None, network_profile=None, diagnostics_profile=None, extension_profile=None, license_type: str=None, priority=None, eviction_policy=None, **kwargs) -> None: + super(VirtualMachineScaleSetVMProfile, self).__init__(**kwargs) + self.os_profile = os_profile + self.storage_profile = storage_profile + self.network_profile = network_profile + self.diagnostics_profile = diagnostics_profile + self.extension_profile = extension_profile + self.license_type = license_type + self.priority = priority + self.eviction_policy = eviction_policy + + +class VirtualMachineScaleSetVMProtectionPolicy(Model): + """The protection policy of a virtual machine scale set VM. + + :param protect_from_scale_in: Indicates that the virtual machine scale set + VM shouldn't be considered for deletion during a scale-in operation. + :type protect_from_scale_in: bool + :param protect_from_scale_set_actions: Indicates that model updates or + actions (including scale-in) initiated on the virtual machine scale set + should not be applied to the virtual machine scale set VM. + :type protect_from_scale_set_actions: bool + """ + + _attribute_map = { + 'protect_from_scale_in': {'key': 'protectFromScaleIn', 'type': 'bool'}, + 'protect_from_scale_set_actions': {'key': 'protectFromScaleSetActions', 'type': 'bool'}, + } + + def __init__(self, *, protect_from_scale_in: bool=None, protect_from_scale_set_actions: bool=None, **kwargs) -> None: + super(VirtualMachineScaleSetVMProtectionPolicy, self).__init__(**kwargs) + self.protect_from_scale_in = protect_from_scale_in + self.protect_from_scale_set_actions = protect_from_scale_set_actions + + +class VirtualMachineSize(Model): + """Describes the properties of a VM size. + + :param name: The name of the virtual machine size. + :type name: str + :param number_of_cores: The number of cores supported by the virtual + machine size. + :type number_of_cores: int + :param os_disk_size_in_mb: The OS disk size, in MB, allowed by the virtual + machine size. + :type os_disk_size_in_mb: int + :param resource_disk_size_in_mb: The resource disk size, in MB, allowed by + the virtual machine size. + :type resource_disk_size_in_mb: int + :param memory_in_mb: The amount of memory, in MB, supported by the virtual + machine size. + :type memory_in_mb: int + :param max_data_disk_count: The maximum number of data disks that can be + attached to the virtual machine size. + :type max_data_disk_count: int + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'number_of_cores': {'key': 'numberOfCores', 'type': 'int'}, + 'os_disk_size_in_mb': {'key': 'osDiskSizeInMB', 'type': 'int'}, + 'resource_disk_size_in_mb': {'key': 'resourceDiskSizeInMB', 'type': 'int'}, + 'memory_in_mb': {'key': 'memoryInMB', 'type': 'int'}, + 'max_data_disk_count': {'key': 'maxDataDiskCount', 'type': 'int'}, + } + + def __init__(self, *, name: str=None, number_of_cores: int=None, os_disk_size_in_mb: int=None, resource_disk_size_in_mb: int=None, memory_in_mb: int=None, max_data_disk_count: int=None, **kwargs) -> None: + super(VirtualMachineSize, self).__init__(**kwargs) + self.name = name + self.number_of_cores = number_of_cores + self.os_disk_size_in_mb = os_disk_size_in_mb + self.resource_disk_size_in_mb = resource_disk_size_in_mb + self.memory_in_mb = memory_in_mb + self.max_data_disk_count = max_data_disk_count + + +class VirtualMachineStatusCodeCount(Model): + """The status code and count of the virtual machine scale set instance view + status summary. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar code: The instance view status code. + :vartype code: str + :ivar count: The number of instances having a particular status code. + :vartype count: int + """ + + _validation = { + 'code': {'readonly': True}, + 'count': {'readonly': True}, + } + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + 'count': {'key': 'count', 'type': 'int'}, + } + + def __init__(self, **kwargs) -> None: + super(VirtualMachineStatusCodeCount, self).__init__(**kwargs) + self.code = None + self.count = None + + +class VirtualMachineUpdate(UpdateResource): + """Describes a Virtual Machine Update. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :param tags: Resource tags + :type tags: dict[str, str] + :param plan: Specifies information about the marketplace image used to + create the virtual machine. This element is only used for marketplace + images. Before you can use a marketplace image from an API, you must + enable the image for programmatic use. In the Azure portal, find the + marketplace image that you want to use and then click **Want to deploy + programmatically, Get Started ->**. Enter any required information and + then click **Save**. + :type plan: ~azure.mgmt.compute.v2019_03_01.models.Plan + :param hardware_profile: Specifies the hardware settings for the virtual + machine. + :type hardware_profile: + ~azure.mgmt.compute.v2019_03_01.models.HardwareProfile + :param storage_profile: Specifies the storage settings for the virtual + machine disks. + :type storage_profile: + ~azure.mgmt.compute.v2019_03_01.models.StorageProfile + :param additional_capabilities: Specifies additional capabilities enabled + or disabled on the virtual machine. + :type additional_capabilities: + ~azure.mgmt.compute.v2019_03_01.models.AdditionalCapabilities + :param os_profile: Specifies the operating system settings for the virtual + machine. + :type os_profile: ~azure.mgmt.compute.v2019_03_01.models.OSProfile + :param network_profile: Specifies the network interfaces of the virtual + machine. + :type network_profile: + ~azure.mgmt.compute.v2019_03_01.models.NetworkProfile + :param diagnostics_profile: Specifies the boot diagnostic settings state. +

    Minimum api-version: 2015-06-15. + :type diagnostics_profile: + ~azure.mgmt.compute.v2019_03_01.models.DiagnosticsProfile + :param availability_set: Specifies information about the availability set + that the virtual machine should be assigned to. Virtual machines specified + in the same availability set are allocated to different nodes to maximize + availability. For more information about availability sets, see [Manage + the availability of virtual + machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-manage-availability?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). +

    For more information on Azure planned maintenance, see [Planned + maintenance for virtual machines in + Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-planned-maintenance?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json) +

    Currently, a VM can only be added to availability set at creation + time. An existing VM cannot be added to an availability set. + :type availability_set: ~azure.mgmt.compute.v2019_03_01.models.SubResource + :param proximity_placement_group: Specifies information about the + proximity placement group that the virtual machine should be assigned to. +

    Minimum api-version: 2018-04-01. + :type proximity_placement_group: + ~azure.mgmt.compute.v2019_03_01.models.SubResource + :param host: Specifies information about the dedicated host that the + virtual machine resides in.

    Minimum api-version: 2018-10-01. + :type host: ~azure.mgmt.compute.v2019_03_01.models.SubResource + :ivar provisioning_state: The provisioning state, which only appears in + the response. + :vartype provisioning_state: str + :ivar instance_view: The virtual machine instance view. + :vartype instance_view: + ~azure.mgmt.compute.v2019_03_01.models.VirtualMachineInstanceView + :param license_type: Specifies that the image or disk that is being used + was licensed on-premises. This element is only used for images that + contain the Windows Server operating system.

    Possible values are: +

    Windows_Client

    Windows_Server

    If this element + is included in a request for an update, the value must match the initial + value. This value cannot be updated.

    For more information, see + [Azure Hybrid Use Benefit for Windows + Server](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-hybrid-use-benefit-licensing?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json) +

    Minimum api-version: 2015-06-15 + :type license_type: str + :ivar vm_id: Specifies the VM unique ID which is a 128-bits identifier + that is encoded and stored in all Azure IaaS VMs SMBIOS and can be read + using platform BIOS commands. + :vartype vm_id: str + :param identity: The identity of the virtual machine, if configured. + :type identity: + ~azure.mgmt.compute.v2019_03_01.models.VirtualMachineIdentity + :param zones: The virtual machine zones. + :type zones: list[str] + """ + + _validation = { + 'provisioning_state': {'readonly': True}, + 'instance_view': {'readonly': True}, + 'vm_id': {'readonly': True}, + } + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + 'plan': {'key': 'plan', 'type': 'Plan'}, + 'hardware_profile': {'key': 'properties.hardwareProfile', 'type': 'HardwareProfile'}, + 'storage_profile': {'key': 'properties.storageProfile', 'type': 'StorageProfile'}, + 'additional_capabilities': {'key': 'properties.additionalCapabilities', 'type': 'AdditionalCapabilities'}, + 'os_profile': {'key': 'properties.osProfile', 'type': 'OSProfile'}, + 'network_profile': {'key': 'properties.networkProfile', 'type': 'NetworkProfile'}, + 'diagnostics_profile': {'key': 'properties.diagnosticsProfile', 'type': 'DiagnosticsProfile'}, + 'availability_set': {'key': 'properties.availabilitySet', 'type': 'SubResource'}, + 'proximity_placement_group': {'key': 'properties.proximityPlacementGroup', 'type': 'SubResource'}, + 'host': {'key': 'properties.host', 'type': 'SubResource'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'instance_view': {'key': 'properties.instanceView', 'type': 'VirtualMachineInstanceView'}, + 'license_type': {'key': 'properties.licenseType', 'type': 'str'}, + 'vm_id': {'key': 'properties.vmId', 'type': 'str'}, + 'identity': {'key': 'identity', 'type': 'VirtualMachineIdentity'}, + 'zones': {'key': 'zones', 'type': '[str]'}, + } + + def __init__(self, *, tags=None, plan=None, hardware_profile=None, storage_profile=None, additional_capabilities=None, os_profile=None, network_profile=None, diagnostics_profile=None, availability_set=None, proximity_placement_group=None, host=None, license_type: str=None, identity=None, zones=None, **kwargs) -> None: + super(VirtualMachineUpdate, self).__init__(tags=tags, **kwargs) + self.plan = plan + self.hardware_profile = hardware_profile + self.storage_profile = storage_profile + self.additional_capabilities = additional_capabilities + self.os_profile = os_profile + self.network_profile = network_profile + self.diagnostics_profile = diagnostics_profile + self.availability_set = availability_set + self.proximity_placement_group = proximity_placement_group + self.host = host + self.provisioning_state = None + self.instance_view = None + self.license_type = license_type + self.vm_id = None + self.identity = identity + self.zones = zones + + +class VMScaleSetConvertToSinglePlacementGroupInput(Model): + """VMScaleSetConvertToSinglePlacementGroupInput. + + :param active_placement_group_id: Id of the placement group in which you + want future virtual machine instances to be placed. To query placement + group Id, please use Virtual Machine Scale Set VMs - Get API. If not + provided, the platform will choose one with maximum number of virtual + machine instances. + :type active_placement_group_id: str + """ + + _attribute_map = { + 'active_placement_group_id': {'key': 'activePlacementGroupId', 'type': 'str'}, + } + + def __init__(self, *, active_placement_group_id: str=None, **kwargs) -> None: + super(VMScaleSetConvertToSinglePlacementGroupInput, self).__init__(**kwargs) + self.active_placement_group_id = active_placement_group_id + + +class WindowsConfiguration(Model): + """Specifies Windows operating system settings on the virtual machine. + + :param provision_vm_agent: Indicates whether virtual machine agent should + be provisioned on the virtual machine.

    When this property is not + specified in the request body, default behavior is to set it to true. + This will ensure that VM Agent is installed on the VM so that extensions + can be added to the VM later. + :type provision_vm_agent: bool + :param enable_automatic_updates: Indicates whether Automatic Updates is + enabled for the Windows virtual machine. Default value is true.

    + For virtual machine scale sets, this property can be updated and updates + will take effect on OS reprovisioning. + :type enable_automatic_updates: bool + :param time_zone: Specifies the time zone of the virtual machine. e.g. + "Pacific Standard Time" + :type time_zone: str + :param additional_unattend_content: Specifies additional base-64 encoded + XML formatted information that can be included in the Unattend.xml file, + which is used by Windows Setup. + :type additional_unattend_content: + list[~azure.mgmt.compute.v2019_03_01.models.AdditionalUnattendContent] + :param win_rm: Specifies the Windows Remote Management listeners. This + enables remote Windows PowerShell. + :type win_rm: ~azure.mgmt.compute.v2019_03_01.models.WinRMConfiguration + """ + + _attribute_map = { + 'provision_vm_agent': {'key': 'provisionVMAgent', 'type': 'bool'}, + 'enable_automatic_updates': {'key': 'enableAutomaticUpdates', 'type': 'bool'}, + 'time_zone': {'key': 'timeZone', 'type': 'str'}, + 'additional_unattend_content': {'key': 'additionalUnattendContent', 'type': '[AdditionalUnattendContent]'}, + 'win_rm': {'key': 'winRM', 'type': 'WinRMConfiguration'}, + } + + def __init__(self, *, provision_vm_agent: bool=None, enable_automatic_updates: bool=None, time_zone: str=None, additional_unattend_content=None, win_rm=None, **kwargs) -> None: + super(WindowsConfiguration, self).__init__(**kwargs) + self.provision_vm_agent = provision_vm_agent + self.enable_automatic_updates = enable_automatic_updates + self.time_zone = time_zone + self.additional_unattend_content = additional_unattend_content + self.win_rm = win_rm + + +class WinRMConfiguration(Model): + """Describes Windows Remote Management configuration of the VM. + + :param listeners: The list of Windows Remote Management listeners + :type listeners: + list[~azure.mgmt.compute.v2019_03_01.models.WinRMListener] + """ + + _attribute_map = { + 'listeners': {'key': 'listeners', 'type': '[WinRMListener]'}, + } + + def __init__(self, *, listeners=None, **kwargs) -> None: + super(WinRMConfiguration, self).__init__(**kwargs) + self.listeners = listeners + + +class WinRMListener(Model): + """Describes Protocol and thumbprint of Windows Remote Management listener. + + :param protocol: Specifies the protocol of listener.

    Possible + values are:
    **http**

    **https**. Possible values include: + 'Http', 'Https' + :type protocol: str or + ~azure.mgmt.compute.v2019_03_01.models.ProtocolTypes + :param certificate_url: This is the URL of a certificate that has been + uploaded to Key Vault as a secret. For adding a secret to the Key Vault, + see [Add a key or secret to the key + vault](https://docs.microsoft.com/azure/key-vault/key-vault-get-started/#add). + In this case, your certificate needs to be It is the Base64 encoding of + the following JSON Object which is encoded in UTF-8:

    {
    + "data":"",
    "dataType":"pfx",
    + "password":""
    } + :type certificate_url: str + """ + + _attribute_map = { + 'protocol': {'key': 'protocol', 'type': 'ProtocolTypes'}, + 'certificate_url': {'key': 'certificateUrl', 'type': 'str'}, + } + + def __init__(self, *, protocol=None, certificate_url: str=None, **kwargs) -> None: + super(WinRMListener, self).__init__(**kwargs) + self.protocol = protocol + self.certificate_url = certificate_url diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/_paged_models.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/_paged_models.py new file mode 100644 index 000000000000..b02dee87e189 --- /dev/null +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/_paged_models.py @@ -0,0 +1,274 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.paging import Paged + + +class ComputeOperationValuePaged(Paged): + """ + A paging container for iterating over a list of :class:`ComputeOperationValue ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[ComputeOperationValue]'} + } + + def __init__(self, *args, **kwargs): + + super(ComputeOperationValuePaged, self).__init__(*args, **kwargs) +class AvailabilitySetPaged(Paged): + """ + A paging container for iterating over a list of :class:`AvailabilitySet ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[AvailabilitySet]'} + } + + def __init__(self, *args, **kwargs): + + super(AvailabilitySetPaged, self).__init__(*args, **kwargs) +class VirtualMachineSizePaged(Paged): + """ + A paging container for iterating over a list of :class:`VirtualMachineSize ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[VirtualMachineSize]'} + } + + def __init__(self, *args, **kwargs): + + super(VirtualMachineSizePaged, self).__init__(*args, **kwargs) +class ProximityPlacementGroupPaged(Paged): + """ + A paging container for iterating over a list of :class:`ProximityPlacementGroup ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[ProximityPlacementGroup]'} + } + + def __init__(self, *args, **kwargs): + + super(ProximityPlacementGroupPaged, self).__init__(*args, **kwargs) +class DedicatedHostGroupPaged(Paged): + """ + A paging container for iterating over a list of :class:`DedicatedHostGroup ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[DedicatedHostGroup]'} + } + + def __init__(self, *args, **kwargs): + + super(DedicatedHostGroupPaged, self).__init__(*args, **kwargs) +class DedicatedHostPaged(Paged): + """ + A paging container for iterating over a list of :class:`DedicatedHost ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[DedicatedHost]'} + } + + def __init__(self, *args, **kwargs): + + super(DedicatedHostPaged, self).__init__(*args, **kwargs) +class UsagePaged(Paged): + """ + A paging container for iterating over a list of :class:`Usage ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[Usage]'} + } + + def __init__(self, *args, **kwargs): + + super(UsagePaged, self).__init__(*args, **kwargs) +class VirtualMachinePaged(Paged): + """ + A paging container for iterating over a list of :class:`VirtualMachine ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[VirtualMachine]'} + } + + def __init__(self, *args, **kwargs): + + super(VirtualMachinePaged, self).__init__(*args, **kwargs) +class ImagePaged(Paged): + """ + A paging container for iterating over a list of :class:`Image ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[Image]'} + } + + def __init__(self, *args, **kwargs): + + super(ImagePaged, self).__init__(*args, **kwargs) +class VirtualMachineScaleSetPaged(Paged): + """ + A paging container for iterating over a list of :class:`VirtualMachineScaleSet ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[VirtualMachineScaleSet]'} + } + + def __init__(self, *args, **kwargs): + + super(VirtualMachineScaleSetPaged, self).__init__(*args, **kwargs) +class VirtualMachineScaleSetSkuPaged(Paged): + """ + A paging container for iterating over a list of :class:`VirtualMachineScaleSetSku ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[VirtualMachineScaleSetSku]'} + } + + def __init__(self, *args, **kwargs): + + super(VirtualMachineScaleSetSkuPaged, self).__init__(*args, **kwargs) +class UpgradeOperationHistoricalStatusInfoPaged(Paged): + """ + A paging container for iterating over a list of :class:`UpgradeOperationHistoricalStatusInfo ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[UpgradeOperationHistoricalStatusInfo]'} + } + + def __init__(self, *args, **kwargs): + + super(UpgradeOperationHistoricalStatusInfoPaged, self).__init__(*args, **kwargs) +class VirtualMachineScaleSetExtensionPaged(Paged): + """ + A paging container for iterating over a list of :class:`VirtualMachineScaleSetExtension ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[VirtualMachineScaleSetExtension]'} + } + + def __init__(self, *args, **kwargs): + + super(VirtualMachineScaleSetExtensionPaged, self).__init__(*args, **kwargs) +class VirtualMachineScaleSetVMPaged(Paged): + """ + A paging container for iterating over a list of :class:`VirtualMachineScaleSetVM ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[VirtualMachineScaleSetVM]'} + } + + def __init__(self, *args, **kwargs): + + super(VirtualMachineScaleSetVMPaged, self).__init__(*args, **kwargs) +class RunCommandDocumentBasePaged(Paged): + """ + A paging container for iterating over a list of :class:`RunCommandDocumentBase ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[RunCommandDocumentBase]'} + } + + def __init__(self, *args, **kwargs): + + super(RunCommandDocumentBasePaged, self).__init__(*args, **kwargs) +class GalleryPaged(Paged): + """ + A paging container for iterating over a list of :class:`Gallery ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[Gallery]'} + } + + def __init__(self, *args, **kwargs): + + super(GalleryPaged, self).__init__(*args, **kwargs) +class GalleryImagePaged(Paged): + """ + A paging container for iterating over a list of :class:`GalleryImage ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[GalleryImage]'} + } + + def __init__(self, *args, **kwargs): + + super(GalleryImagePaged, self).__init__(*args, **kwargs) +class GalleryImageVersionPaged(Paged): + """ + A paging container for iterating over a list of :class:`GalleryImageVersion ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[GalleryImageVersion]'} + } + + def __init__(self, *args, **kwargs): + + super(GalleryImageVersionPaged, self).__init__(*args, **kwargs) +class GalleryApplicationPaged(Paged): + """ + A paging container for iterating over a list of :class:`GalleryApplication ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[GalleryApplication]'} + } + + def __init__(self, *args, **kwargs): + + super(GalleryApplicationPaged, self).__init__(*args, **kwargs) +class GalleryApplicationVersionPaged(Paged): + """ + A paging container for iterating over a list of :class:`GalleryApplicationVersion ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[GalleryApplicationVersion]'} + } + + def __init__(self, *args, **kwargs): + + super(GalleryApplicationVersionPaged, self).__init__(*args, **kwargs) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/additional_capabilities.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/additional_capabilities.py deleted file mode 100644 index 18ff109310c8..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/additional_capabilities.py +++ /dev/null @@ -1,33 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class AdditionalCapabilities(Model): - """Enables or disables a capability on the virtual machine or virtual machine - scale set. - - :param ultra_ssd_enabled: The flag that enables or disables a capability - to have one or more managed data disks with UltraSSD_LRS storage account - type on the VM or VMSS. Managed disks with storage account type - UltraSSD_LRS can be added to a virtual machine or virtual machine scale - set only if this property is enabled. - :type ultra_ssd_enabled: bool - """ - - _attribute_map = { - 'ultra_ssd_enabled': {'key': 'ultraSSDEnabled', 'type': 'bool'}, - } - - def __init__(self, **kwargs): - super(AdditionalCapabilities, self).__init__(**kwargs) - self.ultra_ssd_enabled = kwargs.get('ultra_ssd_enabled', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/additional_capabilities_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/additional_capabilities_py3.py deleted file mode 100644 index db83a0a4eacb..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/additional_capabilities_py3.py +++ /dev/null @@ -1,33 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class AdditionalCapabilities(Model): - """Enables or disables a capability on the virtual machine or virtual machine - scale set. - - :param ultra_ssd_enabled: The flag that enables or disables a capability - to have one or more managed data disks with UltraSSD_LRS storage account - type on the VM or VMSS. Managed disks with storage account type - UltraSSD_LRS can be added to a virtual machine or virtual machine scale - set only if this property is enabled. - :type ultra_ssd_enabled: bool - """ - - _attribute_map = { - 'ultra_ssd_enabled': {'key': 'ultraSSDEnabled', 'type': 'bool'}, - } - - def __init__(self, *, ultra_ssd_enabled: bool=None, **kwargs) -> None: - super(AdditionalCapabilities, self).__init__(**kwargs) - self.ultra_ssd_enabled = ultra_ssd_enabled diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/additional_unattend_content.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/additional_unattend_content.py deleted file mode 100644 index 2d9763eb49c4..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/additional_unattend_content.py +++ /dev/null @@ -1,52 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class AdditionalUnattendContent(Model): - """Specifies additional XML formatted information that can be included in the - Unattend.xml file, which is used by Windows Setup. Contents are defined by - setting name, component name, and the pass in which the content is applied. - - :param pass_name: The pass name. Currently, the only allowable value is - OobeSystem. Possible values include: 'OobeSystem' - :type pass_name: str or ~azure.mgmt.compute.v2019_03_01.models.PassNames - :param component_name: The component name. Currently, the only allowable - value is Microsoft-Windows-Shell-Setup. Possible values include: - 'Microsoft-Windows-Shell-Setup' - :type component_name: str or - ~azure.mgmt.compute.v2019_03_01.models.ComponentNames - :param setting_name: Specifies the name of the setting to which the - content applies. Possible values are: FirstLogonCommands and AutoLogon. - Possible values include: 'AutoLogon', 'FirstLogonCommands' - :type setting_name: str or - ~azure.mgmt.compute.v2019_03_01.models.SettingNames - :param content: Specifies the XML formatted content that is added to the - unattend.xml file for the specified path and component. The XML must be - less than 4KB and must include the root element for the setting or feature - that is being inserted. - :type content: str - """ - - _attribute_map = { - 'pass_name': {'key': 'passName', 'type': 'PassNames'}, - 'component_name': {'key': 'componentName', 'type': 'ComponentNames'}, - 'setting_name': {'key': 'settingName', 'type': 'SettingNames'}, - 'content': {'key': 'content', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(AdditionalUnattendContent, self).__init__(**kwargs) - self.pass_name = kwargs.get('pass_name', None) - self.component_name = kwargs.get('component_name', None) - self.setting_name = kwargs.get('setting_name', None) - self.content = kwargs.get('content', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/additional_unattend_content_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/additional_unattend_content_py3.py deleted file mode 100644 index 0a9b86860e01..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/additional_unattend_content_py3.py +++ /dev/null @@ -1,52 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class AdditionalUnattendContent(Model): - """Specifies additional XML formatted information that can be included in the - Unattend.xml file, which is used by Windows Setup. Contents are defined by - setting name, component name, and the pass in which the content is applied. - - :param pass_name: The pass name. Currently, the only allowable value is - OobeSystem. Possible values include: 'OobeSystem' - :type pass_name: str or ~azure.mgmt.compute.v2019_03_01.models.PassNames - :param component_name: The component name. Currently, the only allowable - value is Microsoft-Windows-Shell-Setup. Possible values include: - 'Microsoft-Windows-Shell-Setup' - :type component_name: str or - ~azure.mgmt.compute.v2019_03_01.models.ComponentNames - :param setting_name: Specifies the name of the setting to which the - content applies. Possible values are: FirstLogonCommands and AutoLogon. - Possible values include: 'AutoLogon', 'FirstLogonCommands' - :type setting_name: str or - ~azure.mgmt.compute.v2019_03_01.models.SettingNames - :param content: Specifies the XML formatted content that is added to the - unattend.xml file for the specified path and component. The XML must be - less than 4KB and must include the root element for the setting or feature - that is being inserted. - :type content: str - """ - - _attribute_map = { - 'pass_name': {'key': 'passName', 'type': 'PassNames'}, - 'component_name': {'key': 'componentName', 'type': 'ComponentNames'}, - 'setting_name': {'key': 'settingName', 'type': 'SettingNames'}, - 'content': {'key': 'content', 'type': 'str'}, - } - - def __init__(self, *, pass_name=None, component_name=None, setting_name=None, content: str=None, **kwargs) -> None: - super(AdditionalUnattendContent, self).__init__(**kwargs) - self.pass_name = pass_name - self.component_name = component_name - self.setting_name = setting_name - self.content = content diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/api_entity_reference.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/api_entity_reference.py deleted file mode 100644 index d43730af3659..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/api_entity_reference.py +++ /dev/null @@ -1,29 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ApiEntityReference(Model): - """The API entity reference. - - :param id: The ARM resource id in the form of - /subscriptions/{SubscriptionId}/resourceGroups/{ResourceGroupName}/... - :type id: str - """ - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ApiEntityReference, self).__init__(**kwargs) - self.id = kwargs.get('id', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/api_entity_reference_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/api_entity_reference_py3.py deleted file mode 100644 index d42dfb1a5fd0..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/api_entity_reference_py3.py +++ /dev/null @@ -1,29 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ApiEntityReference(Model): - """The API entity reference. - - :param id: The ARM resource id in the form of - /subscriptions/{SubscriptionId}/resourceGroups/{ResourceGroupName}/... - :type id: str - """ - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - } - - def __init__(self, *, id: str=None, **kwargs) -> None: - super(ApiEntityReference, self).__init__(**kwargs) - self.id = id diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/api_error.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/api_error.py deleted file mode 100644 index 6c53d66a3539..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/api_error.py +++ /dev/null @@ -1,44 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ApiError(Model): - """Api error. - - :param details: The Api error details - :type details: list[~azure.mgmt.compute.v2019_03_01.models.ApiErrorBase] - :param innererror: The Api inner error - :type innererror: ~azure.mgmt.compute.v2019_03_01.models.InnerError - :param code: The error code. - :type code: str - :param target: The target of the particular error. - :type target: str - :param message: The error message. - :type message: str - """ - - _attribute_map = { - 'details': {'key': 'details', 'type': '[ApiErrorBase]'}, - 'innererror': {'key': 'innererror', 'type': 'InnerError'}, - 'code': {'key': 'code', 'type': 'str'}, - 'target': {'key': 'target', 'type': 'str'}, - 'message': {'key': 'message', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ApiError, self).__init__(**kwargs) - self.details = kwargs.get('details', None) - self.innererror = kwargs.get('innererror', None) - self.code = kwargs.get('code', None) - self.target = kwargs.get('target', None) - self.message = kwargs.get('message', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/api_error_base.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/api_error_base.py deleted file mode 100644 index 655c08638905..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/api_error_base.py +++ /dev/null @@ -1,36 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ApiErrorBase(Model): - """Api error base. - - :param code: The error code. - :type code: str - :param target: The target of the particular error. - :type target: str - :param message: The error message. - :type message: str - """ - - _attribute_map = { - 'code': {'key': 'code', 'type': 'str'}, - 'target': {'key': 'target', 'type': 'str'}, - 'message': {'key': 'message', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ApiErrorBase, self).__init__(**kwargs) - self.code = kwargs.get('code', None) - self.target = kwargs.get('target', None) - self.message = kwargs.get('message', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/api_error_base_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/api_error_base_py3.py deleted file mode 100644 index 5ba95aa0283e..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/api_error_base_py3.py +++ /dev/null @@ -1,36 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ApiErrorBase(Model): - """Api error base. - - :param code: The error code. - :type code: str - :param target: The target of the particular error. - :type target: str - :param message: The error message. - :type message: str - """ - - _attribute_map = { - 'code': {'key': 'code', 'type': 'str'}, - 'target': {'key': 'target', 'type': 'str'}, - 'message': {'key': 'message', 'type': 'str'}, - } - - def __init__(self, *, code: str=None, target: str=None, message: str=None, **kwargs) -> None: - super(ApiErrorBase, self).__init__(**kwargs) - self.code = code - self.target = target - self.message = message diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/api_error_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/api_error_py3.py deleted file mode 100644 index b24a100148af..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/api_error_py3.py +++ /dev/null @@ -1,44 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ApiError(Model): - """Api error. - - :param details: The Api error details - :type details: list[~azure.mgmt.compute.v2019_03_01.models.ApiErrorBase] - :param innererror: The Api inner error - :type innererror: ~azure.mgmt.compute.v2019_03_01.models.InnerError - :param code: The error code. - :type code: str - :param target: The target of the particular error. - :type target: str - :param message: The error message. - :type message: str - """ - - _attribute_map = { - 'details': {'key': 'details', 'type': '[ApiErrorBase]'}, - 'innererror': {'key': 'innererror', 'type': 'InnerError'}, - 'code': {'key': 'code', 'type': 'str'}, - 'target': {'key': 'target', 'type': 'str'}, - 'message': {'key': 'message', 'type': 'str'}, - } - - def __init__(self, *, details=None, innererror=None, code: str=None, target: str=None, message: str=None, **kwargs) -> None: - super(ApiError, self).__init__(**kwargs) - self.details = details - self.innererror = innererror - self.code = code - self.target = target - self.message = message diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/automatic_os_upgrade_policy.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/automatic_os_upgrade_policy.py deleted file mode 100644 index 20bcc8dce1ed..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/automatic_os_upgrade_policy.py +++ /dev/null @@ -1,39 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class AutomaticOSUpgradePolicy(Model): - """The configuration parameters used for performing automatic OS upgrade. - - :param enable_automatic_os_upgrade: Indicates whether OS upgrades should - automatically be applied to scale set instances in a rolling fashion when - a newer version of the OS image becomes available. Default value is false. - If this is set to true for Windows based scale sets, recommendation is to - set - [enableAutomaticUpdates](https://docs.microsoft.com/dotnet/api/microsoft.azure.management.compute.models.windowsconfiguration.enableautomaticupdates?view=azure-dotnet) - to false. - :type enable_automatic_os_upgrade: bool - :param disable_automatic_rollback: Whether OS image rollback feature - should be disabled. Default value is false. - :type disable_automatic_rollback: bool - """ - - _attribute_map = { - 'enable_automatic_os_upgrade': {'key': 'enableAutomaticOSUpgrade', 'type': 'bool'}, - 'disable_automatic_rollback': {'key': 'disableAutomaticRollback', 'type': 'bool'}, - } - - def __init__(self, **kwargs): - super(AutomaticOSUpgradePolicy, self).__init__(**kwargs) - self.enable_automatic_os_upgrade = kwargs.get('enable_automatic_os_upgrade', None) - self.disable_automatic_rollback = kwargs.get('disable_automatic_rollback', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/automatic_os_upgrade_policy_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/automatic_os_upgrade_policy_py3.py deleted file mode 100644 index 968e560a3c94..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/automatic_os_upgrade_policy_py3.py +++ /dev/null @@ -1,39 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class AutomaticOSUpgradePolicy(Model): - """The configuration parameters used for performing automatic OS upgrade. - - :param enable_automatic_os_upgrade: Indicates whether OS upgrades should - automatically be applied to scale set instances in a rolling fashion when - a newer version of the OS image becomes available. Default value is false. - If this is set to true for Windows based scale sets, recommendation is to - set - [enableAutomaticUpdates](https://docs.microsoft.com/dotnet/api/microsoft.azure.management.compute.models.windowsconfiguration.enableautomaticupdates?view=azure-dotnet) - to false. - :type enable_automatic_os_upgrade: bool - :param disable_automatic_rollback: Whether OS image rollback feature - should be disabled. Default value is false. - :type disable_automatic_rollback: bool - """ - - _attribute_map = { - 'enable_automatic_os_upgrade': {'key': 'enableAutomaticOSUpgrade', 'type': 'bool'}, - 'disable_automatic_rollback': {'key': 'disableAutomaticRollback', 'type': 'bool'}, - } - - def __init__(self, *, enable_automatic_os_upgrade: bool=None, disable_automatic_rollback: bool=None, **kwargs) -> None: - super(AutomaticOSUpgradePolicy, self).__init__(**kwargs) - self.enable_automatic_os_upgrade = enable_automatic_os_upgrade - self.disable_automatic_rollback = disable_automatic_rollback diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/automatic_os_upgrade_properties.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/automatic_os_upgrade_properties.py deleted file mode 100644 index b0a11290b7d3..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/automatic_os_upgrade_properties.py +++ /dev/null @@ -1,35 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class AutomaticOSUpgradeProperties(Model): - """Describes automatic OS upgrade properties on the image. - - All required parameters must be populated in order to send to Azure. - - :param automatic_os_upgrade_supported: Required. Specifies whether - automatic OS upgrade is supported on the image. - :type automatic_os_upgrade_supported: bool - """ - - _validation = { - 'automatic_os_upgrade_supported': {'required': True}, - } - - _attribute_map = { - 'automatic_os_upgrade_supported': {'key': 'automaticOSUpgradeSupported', 'type': 'bool'}, - } - - def __init__(self, **kwargs): - super(AutomaticOSUpgradeProperties, self).__init__(**kwargs) - self.automatic_os_upgrade_supported = kwargs.get('automatic_os_upgrade_supported', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/automatic_os_upgrade_properties_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/automatic_os_upgrade_properties_py3.py deleted file mode 100644 index 0bf3f1f57628..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/automatic_os_upgrade_properties_py3.py +++ /dev/null @@ -1,35 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class AutomaticOSUpgradeProperties(Model): - """Describes automatic OS upgrade properties on the image. - - All required parameters must be populated in order to send to Azure. - - :param automatic_os_upgrade_supported: Required. Specifies whether - automatic OS upgrade is supported on the image. - :type automatic_os_upgrade_supported: bool - """ - - _validation = { - 'automatic_os_upgrade_supported': {'required': True}, - } - - _attribute_map = { - 'automatic_os_upgrade_supported': {'key': 'automaticOSUpgradeSupported', 'type': 'bool'}, - } - - def __init__(self, *, automatic_os_upgrade_supported: bool, **kwargs) -> None: - super(AutomaticOSUpgradeProperties, self).__init__(**kwargs) - self.automatic_os_upgrade_supported = automatic_os_upgrade_supported diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/availability_set.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/availability_set.py deleted file mode 100644 index 7e3970fc130f..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/availability_set.py +++ /dev/null @@ -1,95 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource import Resource - - -class AvailabilitySet(Resource): - """Specifies information about the availability set that the virtual machine - should be assigned to. Virtual machines specified in the same availability - set are allocated to different nodes to maximize availability. For more - information about availability sets, see [Manage the availability of - virtual - machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-manage-availability?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). -

    For more information on Azure planned maintenance, see [Planned - maintenance for virtual machines in - Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-planned-maintenance?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json) -

    Currently, a VM can only be added to availability set at creation - time. An existing VM cannot be added to an availability set. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource Id - :vartype id: str - :ivar name: Resource name - :vartype name: str - :ivar type: Resource type - :vartype type: str - :param location: Required. Resource location - :type location: str - :param tags: Resource tags - :type tags: dict[str, str] - :param platform_update_domain_count: Update Domain count. - :type platform_update_domain_count: int - :param platform_fault_domain_count: Fault Domain count. - :type platform_fault_domain_count: int - :param virtual_machines: A list of references to all virtual machines in - the availability set. - :type virtual_machines: - list[~azure.mgmt.compute.v2019_03_01.models.SubResource] - :param proximity_placement_group: Specifies information about the - proximity placement group that the availability set should be assigned to. -

    Minimum api-version: 2018-04-01. - :type proximity_placement_group: - ~azure.mgmt.compute.v2019_03_01.models.SubResource - :ivar statuses: The resource status information. - :vartype statuses: - list[~azure.mgmt.compute.v2019_03_01.models.InstanceViewStatus] - :param sku: Sku of the availability set, only name is required to be set. - See AvailabilitySetSkuTypes for possible set of values. Use 'Aligned' for - virtual machines with managed disks and 'Classic' for virtual machines - with unmanaged disks. Default value is 'Classic'. - :type sku: ~azure.mgmt.compute.v2019_03_01.models.Sku - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - 'statuses': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'platform_update_domain_count': {'key': 'properties.platformUpdateDomainCount', 'type': 'int'}, - 'platform_fault_domain_count': {'key': 'properties.platformFaultDomainCount', 'type': 'int'}, - 'virtual_machines': {'key': 'properties.virtualMachines', 'type': '[SubResource]'}, - 'proximity_placement_group': {'key': 'properties.proximityPlacementGroup', 'type': 'SubResource'}, - 'statuses': {'key': 'properties.statuses', 'type': '[InstanceViewStatus]'}, - 'sku': {'key': 'sku', 'type': 'Sku'}, - } - - def __init__(self, **kwargs): - super(AvailabilitySet, self).__init__(**kwargs) - self.platform_update_domain_count = kwargs.get('platform_update_domain_count', None) - self.platform_fault_domain_count = kwargs.get('platform_fault_domain_count', None) - self.virtual_machines = kwargs.get('virtual_machines', None) - self.proximity_placement_group = kwargs.get('proximity_placement_group', None) - self.statuses = None - self.sku = kwargs.get('sku', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/availability_set_paged.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/availability_set_paged.py deleted file mode 100644 index b8ff90bd71c3..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/availability_set_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class AvailabilitySetPaged(Paged): - """ - A paging container for iterating over a list of :class:`AvailabilitySet ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[AvailabilitySet]'} - } - - def __init__(self, *args, **kwargs): - - super(AvailabilitySetPaged, self).__init__(*args, **kwargs) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/availability_set_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/availability_set_py3.py deleted file mode 100644 index cd941cfb2480..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/availability_set_py3.py +++ /dev/null @@ -1,95 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource_py3 import Resource - - -class AvailabilitySet(Resource): - """Specifies information about the availability set that the virtual machine - should be assigned to. Virtual machines specified in the same availability - set are allocated to different nodes to maximize availability. For more - information about availability sets, see [Manage the availability of - virtual - machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-manage-availability?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). -

    For more information on Azure planned maintenance, see [Planned - maintenance for virtual machines in - Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-planned-maintenance?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json) -

    Currently, a VM can only be added to availability set at creation - time. An existing VM cannot be added to an availability set. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource Id - :vartype id: str - :ivar name: Resource name - :vartype name: str - :ivar type: Resource type - :vartype type: str - :param location: Required. Resource location - :type location: str - :param tags: Resource tags - :type tags: dict[str, str] - :param platform_update_domain_count: Update Domain count. - :type platform_update_domain_count: int - :param platform_fault_domain_count: Fault Domain count. - :type platform_fault_domain_count: int - :param virtual_machines: A list of references to all virtual machines in - the availability set. - :type virtual_machines: - list[~azure.mgmt.compute.v2019_03_01.models.SubResource] - :param proximity_placement_group: Specifies information about the - proximity placement group that the availability set should be assigned to. -

    Minimum api-version: 2018-04-01. - :type proximity_placement_group: - ~azure.mgmt.compute.v2019_03_01.models.SubResource - :ivar statuses: The resource status information. - :vartype statuses: - list[~azure.mgmt.compute.v2019_03_01.models.InstanceViewStatus] - :param sku: Sku of the availability set, only name is required to be set. - See AvailabilitySetSkuTypes for possible set of values. Use 'Aligned' for - virtual machines with managed disks and 'Classic' for virtual machines - with unmanaged disks. Default value is 'Classic'. - :type sku: ~azure.mgmt.compute.v2019_03_01.models.Sku - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - 'statuses': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'platform_update_domain_count': {'key': 'properties.platformUpdateDomainCount', 'type': 'int'}, - 'platform_fault_domain_count': {'key': 'properties.platformFaultDomainCount', 'type': 'int'}, - 'virtual_machines': {'key': 'properties.virtualMachines', 'type': '[SubResource]'}, - 'proximity_placement_group': {'key': 'properties.proximityPlacementGroup', 'type': 'SubResource'}, - 'statuses': {'key': 'properties.statuses', 'type': '[InstanceViewStatus]'}, - 'sku': {'key': 'sku', 'type': 'Sku'}, - } - - def __init__(self, *, location: str, tags=None, platform_update_domain_count: int=None, platform_fault_domain_count: int=None, virtual_machines=None, proximity_placement_group=None, sku=None, **kwargs) -> None: - super(AvailabilitySet, self).__init__(location=location, tags=tags, **kwargs) - self.platform_update_domain_count = platform_update_domain_count - self.platform_fault_domain_count = platform_fault_domain_count - self.virtual_machines = virtual_machines - self.proximity_placement_group = proximity_placement_group - self.statuses = None - self.sku = sku diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/availability_set_update.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/availability_set_update.py deleted file mode 100644 index 13ff09b9a953..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/availability_set_update.py +++ /dev/null @@ -1,65 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .update_resource import UpdateResource - - -class AvailabilitySetUpdate(UpdateResource): - """Specifies information about the availability set that the virtual machine - should be assigned to. Only tags may be updated. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :param tags: Resource tags - :type tags: dict[str, str] - :param platform_update_domain_count: Update Domain count. - :type platform_update_domain_count: int - :param platform_fault_domain_count: Fault Domain count. - :type platform_fault_domain_count: int - :param virtual_machines: A list of references to all virtual machines in - the availability set. - :type virtual_machines: - list[~azure.mgmt.compute.v2019_03_01.models.SubResource] - :param proximity_placement_group: Specifies information about the - proximity placement group that the availability set should be assigned to. -

    Minimum api-version: 2018-04-01. - :type proximity_placement_group: - ~azure.mgmt.compute.v2019_03_01.models.SubResource - :ivar statuses: The resource status information. - :vartype statuses: - list[~azure.mgmt.compute.v2019_03_01.models.InstanceViewStatus] - :param sku: Sku of the availability set - :type sku: ~azure.mgmt.compute.v2019_03_01.models.Sku - """ - - _validation = { - 'statuses': {'readonly': True}, - } - - _attribute_map = { - 'tags': {'key': 'tags', 'type': '{str}'}, - 'platform_update_domain_count': {'key': 'properties.platformUpdateDomainCount', 'type': 'int'}, - 'platform_fault_domain_count': {'key': 'properties.platformFaultDomainCount', 'type': 'int'}, - 'virtual_machines': {'key': 'properties.virtualMachines', 'type': '[SubResource]'}, - 'proximity_placement_group': {'key': 'properties.proximityPlacementGroup', 'type': 'SubResource'}, - 'statuses': {'key': 'properties.statuses', 'type': '[InstanceViewStatus]'}, - 'sku': {'key': 'sku', 'type': 'Sku'}, - } - - def __init__(self, **kwargs): - super(AvailabilitySetUpdate, self).__init__(**kwargs) - self.platform_update_domain_count = kwargs.get('platform_update_domain_count', None) - self.platform_fault_domain_count = kwargs.get('platform_fault_domain_count', None) - self.virtual_machines = kwargs.get('virtual_machines', None) - self.proximity_placement_group = kwargs.get('proximity_placement_group', None) - self.statuses = None - self.sku = kwargs.get('sku', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/availability_set_update_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/availability_set_update_py3.py deleted file mode 100644 index ef2a0c1558b9..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/availability_set_update_py3.py +++ /dev/null @@ -1,65 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .update_resource_py3 import UpdateResource - - -class AvailabilitySetUpdate(UpdateResource): - """Specifies information about the availability set that the virtual machine - should be assigned to. Only tags may be updated. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :param tags: Resource tags - :type tags: dict[str, str] - :param platform_update_domain_count: Update Domain count. - :type platform_update_domain_count: int - :param platform_fault_domain_count: Fault Domain count. - :type platform_fault_domain_count: int - :param virtual_machines: A list of references to all virtual machines in - the availability set. - :type virtual_machines: - list[~azure.mgmt.compute.v2019_03_01.models.SubResource] - :param proximity_placement_group: Specifies information about the - proximity placement group that the availability set should be assigned to. -

    Minimum api-version: 2018-04-01. - :type proximity_placement_group: - ~azure.mgmt.compute.v2019_03_01.models.SubResource - :ivar statuses: The resource status information. - :vartype statuses: - list[~azure.mgmt.compute.v2019_03_01.models.InstanceViewStatus] - :param sku: Sku of the availability set - :type sku: ~azure.mgmt.compute.v2019_03_01.models.Sku - """ - - _validation = { - 'statuses': {'readonly': True}, - } - - _attribute_map = { - 'tags': {'key': 'tags', 'type': '{str}'}, - 'platform_update_domain_count': {'key': 'properties.platformUpdateDomainCount', 'type': 'int'}, - 'platform_fault_domain_count': {'key': 'properties.platformFaultDomainCount', 'type': 'int'}, - 'virtual_machines': {'key': 'properties.virtualMachines', 'type': '[SubResource]'}, - 'proximity_placement_group': {'key': 'properties.proximityPlacementGroup', 'type': 'SubResource'}, - 'statuses': {'key': 'properties.statuses', 'type': '[InstanceViewStatus]'}, - 'sku': {'key': 'sku', 'type': 'Sku'}, - } - - def __init__(self, *, tags=None, platform_update_domain_count: int=None, platform_fault_domain_count: int=None, virtual_machines=None, proximity_placement_group=None, sku=None, **kwargs) -> None: - super(AvailabilitySetUpdate, self).__init__(tags=tags, **kwargs) - self.platform_update_domain_count = platform_update_domain_count - self.platform_fault_domain_count = platform_fault_domain_count - self.virtual_machines = virtual_machines - self.proximity_placement_group = proximity_placement_group - self.statuses = None - self.sku = sku diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/boot_diagnostics.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/boot_diagnostics.py deleted file mode 100644 index 4a1f77c4d7d0..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/boot_diagnostics.py +++ /dev/null @@ -1,37 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class BootDiagnostics(Model): - """Boot Diagnostics is a debugging feature which allows you to view Console - Output and Screenshot to diagnose VM status.

    You can easily view - the output of your console log.

    Azure also enables you to see a - screenshot of the VM from the hypervisor. - - :param enabled: Whether boot diagnostics should be enabled on the Virtual - Machine. - :type enabled: bool - :param storage_uri: Uri of the storage account to use for placing the - console output and screenshot. - :type storage_uri: str - """ - - _attribute_map = { - 'enabled': {'key': 'enabled', 'type': 'bool'}, - 'storage_uri': {'key': 'storageUri', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(BootDiagnostics, self).__init__(**kwargs) - self.enabled = kwargs.get('enabled', None) - self.storage_uri = kwargs.get('storage_uri', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/boot_diagnostics_instance_view.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/boot_diagnostics_instance_view.py deleted file mode 100644 index ea669444295f..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/boot_diagnostics_instance_view.py +++ /dev/null @@ -1,47 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class BootDiagnosticsInstanceView(Model): - """The instance view of a virtual machine boot diagnostics. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar console_screenshot_blob_uri: The console screenshot blob URI. - :vartype console_screenshot_blob_uri: str - :ivar serial_console_log_blob_uri: The Linux serial console log blob Uri. - :vartype serial_console_log_blob_uri: str - :ivar status: The boot diagnostics status information for the VM.

    - NOTE: It will be set only if there are errors encountered in enabling boot - diagnostics. - :vartype status: ~azure.mgmt.compute.v2019_03_01.models.InstanceViewStatus - """ - - _validation = { - 'console_screenshot_blob_uri': {'readonly': True}, - 'serial_console_log_blob_uri': {'readonly': True}, - 'status': {'readonly': True}, - } - - _attribute_map = { - 'console_screenshot_blob_uri': {'key': 'consoleScreenshotBlobUri', 'type': 'str'}, - 'serial_console_log_blob_uri': {'key': 'serialConsoleLogBlobUri', 'type': 'str'}, - 'status': {'key': 'status', 'type': 'InstanceViewStatus'}, - } - - def __init__(self, **kwargs): - super(BootDiagnosticsInstanceView, self).__init__(**kwargs) - self.console_screenshot_blob_uri = None - self.serial_console_log_blob_uri = None - self.status = None diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/boot_diagnostics_instance_view_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/boot_diagnostics_instance_view_py3.py deleted file mode 100644 index 1b94b4a122c1..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/boot_diagnostics_instance_view_py3.py +++ /dev/null @@ -1,47 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class BootDiagnosticsInstanceView(Model): - """The instance view of a virtual machine boot diagnostics. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar console_screenshot_blob_uri: The console screenshot blob URI. - :vartype console_screenshot_blob_uri: str - :ivar serial_console_log_blob_uri: The Linux serial console log blob Uri. - :vartype serial_console_log_blob_uri: str - :ivar status: The boot diagnostics status information for the VM.

    - NOTE: It will be set only if there are errors encountered in enabling boot - diagnostics. - :vartype status: ~azure.mgmt.compute.v2019_03_01.models.InstanceViewStatus - """ - - _validation = { - 'console_screenshot_blob_uri': {'readonly': True}, - 'serial_console_log_blob_uri': {'readonly': True}, - 'status': {'readonly': True}, - } - - _attribute_map = { - 'console_screenshot_blob_uri': {'key': 'consoleScreenshotBlobUri', 'type': 'str'}, - 'serial_console_log_blob_uri': {'key': 'serialConsoleLogBlobUri', 'type': 'str'}, - 'status': {'key': 'status', 'type': 'InstanceViewStatus'}, - } - - def __init__(self, **kwargs) -> None: - super(BootDiagnosticsInstanceView, self).__init__(**kwargs) - self.console_screenshot_blob_uri = None - self.serial_console_log_blob_uri = None - self.status = None diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/boot_diagnostics_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/boot_diagnostics_py3.py deleted file mode 100644 index b64ae5b4adde..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/boot_diagnostics_py3.py +++ /dev/null @@ -1,37 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class BootDiagnostics(Model): - """Boot Diagnostics is a debugging feature which allows you to view Console - Output and Screenshot to diagnose VM status.

    You can easily view - the output of your console log.

    Azure also enables you to see a - screenshot of the VM from the hypervisor. - - :param enabled: Whether boot diagnostics should be enabled on the Virtual - Machine. - :type enabled: bool - :param storage_uri: Uri of the storage account to use for placing the - console output and screenshot. - :type storage_uri: str - """ - - _attribute_map = { - 'enabled': {'key': 'enabled', 'type': 'bool'}, - 'storage_uri': {'key': 'storageUri', 'type': 'str'}, - } - - def __init__(self, *, enabled: bool=None, storage_uri: str=None, **kwargs) -> None: - super(BootDiagnostics, self).__init__(**kwargs) - self.enabled = enabled - self.storage_uri = storage_uri diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/compute_management_client_enums.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/compute_management_client_enums.py deleted file mode 100644 index af2f9041fbbd..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/compute_management_client_enums.py +++ /dev/null @@ -1,391 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from enum import Enum - - -class HyperVGenerationTypes(str, Enum): - - v1 = "V1" - v2 = "V2" - - -class StatusLevelTypes(str, Enum): - - info = "Info" - warning = "Warning" - error = "Error" - - -class AvailabilitySetSkuTypes(str, Enum): - - classic = "Classic" - aligned = "Aligned" - - -class ProximityPlacementGroupType(str, Enum): - - standard = "Standard" - ultra = "Ultra" - - -class OperatingSystemTypes(str, Enum): - - windows = "Windows" - linux = "Linux" - - -class VirtualMachineSizeTypes(str, Enum): - - basic_a0 = "Basic_A0" - basic_a1 = "Basic_A1" - basic_a2 = "Basic_A2" - basic_a3 = "Basic_A3" - basic_a4 = "Basic_A4" - standard_a0 = "Standard_A0" - standard_a1 = "Standard_A1" - standard_a2 = "Standard_A2" - standard_a3 = "Standard_A3" - standard_a4 = "Standard_A4" - standard_a5 = "Standard_A5" - standard_a6 = "Standard_A6" - standard_a7 = "Standard_A7" - standard_a8 = "Standard_A8" - standard_a9 = "Standard_A9" - standard_a10 = "Standard_A10" - standard_a11 = "Standard_A11" - standard_a1_v2 = "Standard_A1_v2" - standard_a2_v2 = "Standard_A2_v2" - standard_a4_v2 = "Standard_A4_v2" - standard_a8_v2 = "Standard_A8_v2" - standard_a2m_v2 = "Standard_A2m_v2" - standard_a4m_v2 = "Standard_A4m_v2" - standard_a8m_v2 = "Standard_A8m_v2" - standard_b1s = "Standard_B1s" - standard_b1ms = "Standard_B1ms" - standard_b2s = "Standard_B2s" - standard_b2ms = "Standard_B2ms" - standard_b4ms = "Standard_B4ms" - standard_b8ms = "Standard_B8ms" - standard_d1 = "Standard_D1" - standard_d2 = "Standard_D2" - standard_d3 = "Standard_D3" - standard_d4 = "Standard_D4" - standard_d11 = "Standard_D11" - standard_d12 = "Standard_D12" - standard_d13 = "Standard_D13" - standard_d14 = "Standard_D14" - standard_d1_v2 = "Standard_D1_v2" - standard_d2_v2 = "Standard_D2_v2" - standard_d3_v2 = "Standard_D3_v2" - standard_d4_v2 = "Standard_D4_v2" - standard_d5_v2 = "Standard_D5_v2" - standard_d2_v3 = "Standard_D2_v3" - standard_d4_v3 = "Standard_D4_v3" - standard_d8_v3 = "Standard_D8_v3" - standard_d16_v3 = "Standard_D16_v3" - standard_d32_v3 = "Standard_D32_v3" - standard_d64_v3 = "Standard_D64_v3" - standard_d2s_v3 = "Standard_D2s_v3" - standard_d4s_v3 = "Standard_D4s_v3" - standard_d8s_v3 = "Standard_D8s_v3" - standard_d16s_v3 = "Standard_D16s_v3" - standard_d32s_v3 = "Standard_D32s_v3" - standard_d64s_v3 = "Standard_D64s_v3" - standard_d11_v2 = "Standard_D11_v2" - standard_d12_v2 = "Standard_D12_v2" - standard_d13_v2 = "Standard_D13_v2" - standard_d14_v2 = "Standard_D14_v2" - standard_d15_v2 = "Standard_D15_v2" - standard_ds1 = "Standard_DS1" - standard_ds2 = "Standard_DS2" - standard_ds3 = "Standard_DS3" - standard_ds4 = "Standard_DS4" - standard_ds11 = "Standard_DS11" - standard_ds12 = "Standard_DS12" - standard_ds13 = "Standard_DS13" - standard_ds14 = "Standard_DS14" - standard_ds1_v2 = "Standard_DS1_v2" - standard_ds2_v2 = "Standard_DS2_v2" - standard_ds3_v2 = "Standard_DS3_v2" - standard_ds4_v2 = "Standard_DS4_v2" - standard_ds5_v2 = "Standard_DS5_v2" - standard_ds11_v2 = "Standard_DS11_v2" - standard_ds12_v2 = "Standard_DS12_v2" - standard_ds13_v2 = "Standard_DS13_v2" - standard_ds14_v2 = "Standard_DS14_v2" - standard_ds15_v2 = "Standard_DS15_v2" - standard_ds13_4_v2 = "Standard_DS13-4_v2" - standard_ds13_2_v2 = "Standard_DS13-2_v2" - standard_ds14_8_v2 = "Standard_DS14-8_v2" - standard_ds14_4_v2 = "Standard_DS14-4_v2" - standard_e2_v3 = "Standard_E2_v3" - standard_e4_v3 = "Standard_E4_v3" - standard_e8_v3 = "Standard_E8_v3" - standard_e16_v3 = "Standard_E16_v3" - standard_e32_v3 = "Standard_E32_v3" - standard_e64_v3 = "Standard_E64_v3" - standard_e2s_v3 = "Standard_E2s_v3" - standard_e4s_v3 = "Standard_E4s_v3" - standard_e8s_v3 = "Standard_E8s_v3" - standard_e16s_v3 = "Standard_E16s_v3" - standard_e32s_v3 = "Standard_E32s_v3" - standard_e64s_v3 = "Standard_E64s_v3" - standard_e32_16_v3 = "Standard_E32-16_v3" - standard_e32_8s_v3 = "Standard_E32-8s_v3" - standard_e64_32s_v3 = "Standard_E64-32s_v3" - standard_e64_16s_v3 = "Standard_E64-16s_v3" - standard_f1 = "Standard_F1" - standard_f2 = "Standard_F2" - standard_f4 = "Standard_F4" - standard_f8 = "Standard_F8" - standard_f16 = "Standard_F16" - standard_f1s = "Standard_F1s" - standard_f2s = "Standard_F2s" - standard_f4s = "Standard_F4s" - standard_f8s = "Standard_F8s" - standard_f16s = "Standard_F16s" - standard_f2s_v2 = "Standard_F2s_v2" - standard_f4s_v2 = "Standard_F4s_v2" - standard_f8s_v2 = "Standard_F8s_v2" - standard_f16s_v2 = "Standard_F16s_v2" - standard_f32s_v2 = "Standard_F32s_v2" - standard_f64s_v2 = "Standard_F64s_v2" - standard_f72s_v2 = "Standard_F72s_v2" - standard_g1 = "Standard_G1" - standard_g2 = "Standard_G2" - standard_g3 = "Standard_G3" - standard_g4 = "Standard_G4" - standard_g5 = "Standard_G5" - standard_gs1 = "Standard_GS1" - standard_gs2 = "Standard_GS2" - standard_gs3 = "Standard_GS3" - standard_gs4 = "Standard_GS4" - standard_gs5 = "Standard_GS5" - standard_gs4_8 = "Standard_GS4-8" - standard_gs4_4 = "Standard_GS4-4" - standard_gs5_16 = "Standard_GS5-16" - standard_gs5_8 = "Standard_GS5-8" - standard_h8 = "Standard_H8" - standard_h16 = "Standard_H16" - standard_h8m = "Standard_H8m" - standard_h16m = "Standard_H16m" - standard_h16r = "Standard_H16r" - standard_h16mr = "Standard_H16mr" - standard_l4s = "Standard_L4s" - standard_l8s = "Standard_L8s" - standard_l16s = "Standard_L16s" - standard_l32s = "Standard_L32s" - standard_m64s = "Standard_M64s" - standard_m64ms = "Standard_M64ms" - standard_m128s = "Standard_M128s" - standard_m128ms = "Standard_M128ms" - standard_m64_32ms = "Standard_M64-32ms" - standard_m64_16ms = "Standard_M64-16ms" - standard_m128_64ms = "Standard_M128-64ms" - standard_m128_32ms = "Standard_M128-32ms" - standard_nc6 = "Standard_NC6" - standard_nc12 = "Standard_NC12" - standard_nc24 = "Standard_NC24" - standard_nc24r = "Standard_NC24r" - standard_nc6s_v2 = "Standard_NC6s_v2" - standard_nc12s_v2 = "Standard_NC12s_v2" - standard_nc24s_v2 = "Standard_NC24s_v2" - standard_nc24rs_v2 = "Standard_NC24rs_v2" - standard_nc6s_v3 = "Standard_NC6s_v3" - standard_nc12s_v3 = "Standard_NC12s_v3" - standard_nc24s_v3 = "Standard_NC24s_v3" - standard_nc24rs_v3 = "Standard_NC24rs_v3" - standard_nd6s = "Standard_ND6s" - standard_nd12s = "Standard_ND12s" - standard_nd24s = "Standard_ND24s" - standard_nd24rs = "Standard_ND24rs" - standard_nv6 = "Standard_NV6" - standard_nv12 = "Standard_NV12" - standard_nv24 = "Standard_NV24" - - -class CachingTypes(str, Enum): - - none = "None" - read_only = "ReadOnly" - read_write = "ReadWrite" - - -class DiskCreateOptionTypes(str, Enum): - - from_image = "FromImage" - empty = "Empty" - attach = "Attach" - - -class StorageAccountTypes(str, Enum): - - standard_lrs = "Standard_LRS" - premium_lrs = "Premium_LRS" - standard_ssd_lrs = "StandardSSD_LRS" - ultra_ssd_lrs = "UltraSSD_LRS" - - -class DiffDiskOptions(str, Enum): - - local = "Local" - - -class PassNames(str, Enum): - - oobe_system = "OobeSystem" - - -class ComponentNames(str, Enum): - - microsoft_windows_shell_setup = "Microsoft-Windows-Shell-Setup" - - -class SettingNames(str, Enum): - - auto_logon = "AutoLogon" - first_logon_commands = "FirstLogonCommands" - - -class ProtocolTypes(str, Enum): - - http = "Http" - https = "Https" - - -class ResourceIdentityType(str, Enum): - - system_assigned = "SystemAssigned" - user_assigned = "UserAssigned" - system_assigned_user_assigned = "SystemAssigned, UserAssigned" - none = "None" - - -class MaintenanceOperationResultCodeTypes(str, Enum): - - none = "None" - retry_later = "RetryLater" - maintenance_aborted = "MaintenanceAborted" - maintenance_completed = "MaintenanceCompleted" - - -class UpgradeMode(str, Enum): - - automatic = "Automatic" - manual = "Manual" - rolling = "Rolling" - - -class OperatingSystemStateTypes(str, Enum): - - generalized = "Generalized" - specialized = "Specialized" - - -class IPVersion(str, Enum): - - ipv4 = "IPv4" - ipv6 = "IPv6" - - -class VirtualMachinePriorityTypes(str, Enum): - - regular = "Regular" - low = "Low" - - -class VirtualMachineEvictionPolicyTypes(str, Enum): - - deallocate = "Deallocate" - delete = "Delete" - - -class VirtualMachineScaleSetSkuScaleType(str, Enum): - - automatic = "Automatic" - none = "None" - - -class UpgradeState(str, Enum): - - rolling_forward = "RollingForward" - cancelled = "Cancelled" - completed = "Completed" - faulted = "Faulted" - - -class UpgradeOperationInvoker(str, Enum): - - unknown = "Unknown" - user = "User" - platform = "Platform" - - -class RollingUpgradeStatusCode(str, Enum): - - rolling_forward = "RollingForward" - cancelled = "Cancelled" - completed = "Completed" - faulted = "Faulted" - - -class RollingUpgradeActionType(str, Enum): - - start = "Start" - cancel = "Cancel" - - -class IntervalInMins(str, Enum): - - three_mins = "ThreeMins" - five_mins = "FiveMins" - thirty_mins = "ThirtyMins" - sixty_mins = "SixtyMins" - - -class StorageAccountType(str, Enum): - - standard_lrs = "Standard_LRS" - standard_zrs = "Standard_ZRS" - - -class AggregatedReplicationState(str, Enum): - - unknown = "Unknown" - in_progress = "InProgress" - completed = "Completed" - failed = "Failed" - - -class ReplicationState(str, Enum): - - unknown = "Unknown" - replicating = "Replicating" - completed = "Completed" - failed = "Failed" - - -class HostCaching(str, Enum): - - none = "None" - read_only = "ReadOnly" - read_write = "ReadWrite" - - -class InstanceViewTypes(str, Enum): - - instance_view = "instanceView" - - -class ReplicationStatusTypes(str, Enum): - - replication_status = "ReplicationStatus" diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/compute_operation_value.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/compute_operation_value.py deleted file mode 100644 index 525ef3bbb69a..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/compute_operation_value.py +++ /dev/null @@ -1,60 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ComputeOperationValue(Model): - """Describes the properties of a Compute Operation value. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar origin: The origin of the compute operation. - :vartype origin: str - :ivar name: The name of the compute operation. - :vartype name: str - :ivar operation: The display name of the compute operation. - :vartype operation: str - :ivar resource: The display name of the resource the operation applies to. - :vartype resource: str - :ivar description: The description of the operation. - :vartype description: str - :ivar provider: The resource provider for the operation. - :vartype provider: str - """ - - _validation = { - 'origin': {'readonly': True}, - 'name': {'readonly': True}, - 'operation': {'readonly': True}, - 'resource': {'readonly': True}, - 'description': {'readonly': True}, - 'provider': {'readonly': True}, - } - - _attribute_map = { - 'origin': {'key': 'origin', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'operation': {'key': 'display.operation', 'type': 'str'}, - 'resource': {'key': 'display.resource', 'type': 'str'}, - 'description': {'key': 'display.description', 'type': 'str'}, - 'provider': {'key': 'display.provider', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ComputeOperationValue, self).__init__(**kwargs) - self.origin = None - self.name = None - self.operation = None - self.resource = None - self.description = None - self.provider = None diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/compute_operation_value_paged.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/compute_operation_value_paged.py deleted file mode 100644 index 06165ad1a504..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/compute_operation_value_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class ComputeOperationValuePaged(Paged): - """ - A paging container for iterating over a list of :class:`ComputeOperationValue ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[ComputeOperationValue]'} - } - - def __init__(self, *args, **kwargs): - - super(ComputeOperationValuePaged, self).__init__(*args, **kwargs) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/compute_operation_value_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/compute_operation_value_py3.py deleted file mode 100644 index 3c4388f312b9..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/compute_operation_value_py3.py +++ /dev/null @@ -1,60 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ComputeOperationValue(Model): - """Describes the properties of a Compute Operation value. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar origin: The origin of the compute operation. - :vartype origin: str - :ivar name: The name of the compute operation. - :vartype name: str - :ivar operation: The display name of the compute operation. - :vartype operation: str - :ivar resource: The display name of the resource the operation applies to. - :vartype resource: str - :ivar description: The description of the operation. - :vartype description: str - :ivar provider: The resource provider for the operation. - :vartype provider: str - """ - - _validation = { - 'origin': {'readonly': True}, - 'name': {'readonly': True}, - 'operation': {'readonly': True}, - 'resource': {'readonly': True}, - 'description': {'readonly': True}, - 'provider': {'readonly': True}, - } - - _attribute_map = { - 'origin': {'key': 'origin', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'operation': {'key': 'display.operation', 'type': 'str'}, - 'resource': {'key': 'display.resource', 'type': 'str'}, - 'description': {'key': 'display.description', 'type': 'str'}, - 'provider': {'key': 'display.provider', 'type': 'str'}, - } - - def __init__(self, **kwargs) -> None: - super(ComputeOperationValue, self).__init__(**kwargs) - self.origin = None - self.name = None - self.operation = None - self.resource = None - self.description = None - self.provider = None diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/data_disk.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/data_disk.py deleted file mode 100644 index f4adb441716c..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/data_disk.py +++ /dev/null @@ -1,92 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class DataDisk(Model): - """Describes a data disk. - - All required parameters must be populated in order to send to Azure. - - :param lun: Required. Specifies the logical unit number of the data disk. - This value is used to identify data disks within the VM and therefore must - be unique for each data disk attached to a VM. - :type lun: int - :param name: The disk name. - :type name: str - :param vhd: The virtual hard disk. - :type vhd: ~azure.mgmt.compute.v2019_03_01.models.VirtualHardDisk - :param image: The source user image virtual hard disk. The virtual hard - disk will be copied before being attached to the virtual machine. If - SourceImage is provided, the destination virtual hard drive must not - exist. - :type image: ~azure.mgmt.compute.v2019_03_01.models.VirtualHardDisk - :param caching: Specifies the caching requirements.

    Possible - values are:

    **None**

    **ReadOnly**

    **ReadWrite** -

    Default: **None for Standard storage. ReadOnly for Premium - storage**. Possible values include: 'None', 'ReadOnly', 'ReadWrite' - :type caching: str or ~azure.mgmt.compute.v2019_03_01.models.CachingTypes - :param write_accelerator_enabled: Specifies whether writeAccelerator - should be enabled or disabled on the disk. - :type write_accelerator_enabled: bool - :param create_option: Required. Specifies how the virtual machine should - be created.

    Possible values are:

    **Attach** \\u2013 This - value is used when you are using a specialized disk to create the virtual - machine.

    **FromImage** \\u2013 This value is used when you are - using an image to create the virtual machine. If you are using a platform - image, you also use the imageReference element described above. If you are - using a marketplace image, you also use the plan element previously - described. Possible values include: 'FromImage', 'Empty', 'Attach' - :type create_option: str or - ~azure.mgmt.compute.v2019_03_01.models.DiskCreateOptionTypes - :param disk_size_gb: Specifies the size of an empty data disk in - gigabytes. This element can be used to overwrite the size of the disk in a - virtual machine image.

    This value cannot be larger than 1023 GB - :type disk_size_gb: int - :param managed_disk: The managed disk parameters. - :type managed_disk: - ~azure.mgmt.compute.v2019_03_01.models.ManagedDiskParameters - :param to_be_detached: Specifies whether the datadisk is in process of - detachment from the VirtualMachine/VirtualMachineScaleset - :type to_be_detached: bool - """ - - _validation = { - 'lun': {'required': True}, - 'create_option': {'required': True}, - } - - _attribute_map = { - 'lun': {'key': 'lun', 'type': 'int'}, - 'name': {'key': 'name', 'type': 'str'}, - 'vhd': {'key': 'vhd', 'type': 'VirtualHardDisk'}, - 'image': {'key': 'image', 'type': 'VirtualHardDisk'}, - 'caching': {'key': 'caching', 'type': 'CachingTypes'}, - 'write_accelerator_enabled': {'key': 'writeAcceleratorEnabled', 'type': 'bool'}, - 'create_option': {'key': 'createOption', 'type': 'str'}, - 'disk_size_gb': {'key': 'diskSizeGB', 'type': 'int'}, - 'managed_disk': {'key': 'managedDisk', 'type': 'ManagedDiskParameters'}, - 'to_be_detached': {'key': 'toBeDetached', 'type': 'bool'}, - } - - def __init__(self, **kwargs): - super(DataDisk, self).__init__(**kwargs) - self.lun = kwargs.get('lun', None) - self.name = kwargs.get('name', None) - self.vhd = kwargs.get('vhd', None) - self.image = kwargs.get('image', None) - self.caching = kwargs.get('caching', None) - self.write_accelerator_enabled = kwargs.get('write_accelerator_enabled', None) - self.create_option = kwargs.get('create_option', None) - self.disk_size_gb = kwargs.get('disk_size_gb', None) - self.managed_disk = kwargs.get('managed_disk', None) - self.to_be_detached = kwargs.get('to_be_detached', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/data_disk_image.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/data_disk_image.py deleted file mode 100644 index b5dbfcefb472..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/data_disk_image.py +++ /dev/null @@ -1,37 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class DataDiskImage(Model): - """Contains the data disk images information. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar lun: Specifies the logical unit number of the data disk. This value - is used to identify data disks within the VM and therefore must be unique - for each data disk attached to a VM. - :vartype lun: int - """ - - _validation = { - 'lun': {'readonly': True}, - } - - _attribute_map = { - 'lun': {'key': 'lun', 'type': 'int'}, - } - - def __init__(self, **kwargs): - super(DataDiskImage, self).__init__(**kwargs) - self.lun = None diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/data_disk_image_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/data_disk_image_py3.py deleted file mode 100644 index 8431a3988502..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/data_disk_image_py3.py +++ /dev/null @@ -1,37 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class DataDiskImage(Model): - """Contains the data disk images information. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar lun: Specifies the logical unit number of the data disk. This value - is used to identify data disks within the VM and therefore must be unique - for each data disk attached to a VM. - :vartype lun: int - """ - - _validation = { - 'lun': {'readonly': True}, - } - - _attribute_map = { - 'lun': {'key': 'lun', 'type': 'int'}, - } - - def __init__(self, **kwargs) -> None: - super(DataDiskImage, self).__init__(**kwargs) - self.lun = None diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/data_disk_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/data_disk_py3.py deleted file mode 100644 index d431f3a9c08f..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/data_disk_py3.py +++ /dev/null @@ -1,92 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class DataDisk(Model): - """Describes a data disk. - - All required parameters must be populated in order to send to Azure. - - :param lun: Required. Specifies the logical unit number of the data disk. - This value is used to identify data disks within the VM and therefore must - be unique for each data disk attached to a VM. - :type lun: int - :param name: The disk name. - :type name: str - :param vhd: The virtual hard disk. - :type vhd: ~azure.mgmt.compute.v2019_03_01.models.VirtualHardDisk - :param image: The source user image virtual hard disk. The virtual hard - disk will be copied before being attached to the virtual machine. If - SourceImage is provided, the destination virtual hard drive must not - exist. - :type image: ~azure.mgmt.compute.v2019_03_01.models.VirtualHardDisk - :param caching: Specifies the caching requirements.

    Possible - values are:

    **None**

    **ReadOnly**

    **ReadWrite** -

    Default: **None for Standard storage. ReadOnly for Premium - storage**. Possible values include: 'None', 'ReadOnly', 'ReadWrite' - :type caching: str or ~azure.mgmt.compute.v2019_03_01.models.CachingTypes - :param write_accelerator_enabled: Specifies whether writeAccelerator - should be enabled or disabled on the disk. - :type write_accelerator_enabled: bool - :param create_option: Required. Specifies how the virtual machine should - be created.

    Possible values are:

    **Attach** \\u2013 This - value is used when you are using a specialized disk to create the virtual - machine.

    **FromImage** \\u2013 This value is used when you are - using an image to create the virtual machine. If you are using a platform - image, you also use the imageReference element described above. If you are - using a marketplace image, you also use the plan element previously - described. Possible values include: 'FromImage', 'Empty', 'Attach' - :type create_option: str or - ~azure.mgmt.compute.v2019_03_01.models.DiskCreateOptionTypes - :param disk_size_gb: Specifies the size of an empty data disk in - gigabytes. This element can be used to overwrite the size of the disk in a - virtual machine image.

    This value cannot be larger than 1023 GB - :type disk_size_gb: int - :param managed_disk: The managed disk parameters. - :type managed_disk: - ~azure.mgmt.compute.v2019_03_01.models.ManagedDiskParameters - :param to_be_detached: Specifies whether the datadisk is in process of - detachment from the VirtualMachine/VirtualMachineScaleset - :type to_be_detached: bool - """ - - _validation = { - 'lun': {'required': True}, - 'create_option': {'required': True}, - } - - _attribute_map = { - 'lun': {'key': 'lun', 'type': 'int'}, - 'name': {'key': 'name', 'type': 'str'}, - 'vhd': {'key': 'vhd', 'type': 'VirtualHardDisk'}, - 'image': {'key': 'image', 'type': 'VirtualHardDisk'}, - 'caching': {'key': 'caching', 'type': 'CachingTypes'}, - 'write_accelerator_enabled': {'key': 'writeAcceleratorEnabled', 'type': 'bool'}, - 'create_option': {'key': 'createOption', 'type': 'str'}, - 'disk_size_gb': {'key': 'diskSizeGB', 'type': 'int'}, - 'managed_disk': {'key': 'managedDisk', 'type': 'ManagedDiskParameters'}, - 'to_be_detached': {'key': 'toBeDetached', 'type': 'bool'}, - } - - def __init__(self, *, lun: int, create_option, name: str=None, vhd=None, image=None, caching=None, write_accelerator_enabled: bool=None, disk_size_gb: int=None, managed_disk=None, to_be_detached: bool=None, **kwargs) -> None: - super(DataDisk, self).__init__(**kwargs) - self.lun = lun - self.name = name - self.vhd = vhd - self.image = image - self.caching = caching - self.write_accelerator_enabled = write_accelerator_enabled - self.create_option = create_option - self.disk_size_gb = disk_size_gb - self.managed_disk = managed_disk - self.to_be_detached = to_be_detached diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/diagnostics_profile.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/diagnostics_profile.py deleted file mode 100644 index e470af14a6b1..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/diagnostics_profile.py +++ /dev/null @@ -1,33 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class DiagnosticsProfile(Model): - """Specifies the boot diagnostic settings state.

    Minimum api-version: - 2015-06-15. - - :param boot_diagnostics: Boot Diagnostics is a debugging feature which - allows you to view Console Output and Screenshot to diagnose VM status. -

    You can easily view the output of your console log.

    - Azure also enables you to see a screenshot of the VM from the hypervisor. - :type boot_diagnostics: - ~azure.mgmt.compute.v2019_03_01.models.BootDiagnostics - """ - - _attribute_map = { - 'boot_diagnostics': {'key': 'bootDiagnostics', 'type': 'BootDiagnostics'}, - } - - def __init__(self, **kwargs): - super(DiagnosticsProfile, self).__init__(**kwargs) - self.boot_diagnostics = kwargs.get('boot_diagnostics', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/diagnostics_profile_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/diagnostics_profile_py3.py deleted file mode 100644 index 076477d11f14..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/diagnostics_profile_py3.py +++ /dev/null @@ -1,33 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class DiagnosticsProfile(Model): - """Specifies the boot diagnostic settings state.

    Minimum api-version: - 2015-06-15. - - :param boot_diagnostics: Boot Diagnostics is a debugging feature which - allows you to view Console Output and Screenshot to diagnose VM status. -

    You can easily view the output of your console log.

    - Azure also enables you to see a screenshot of the VM from the hypervisor. - :type boot_diagnostics: - ~azure.mgmt.compute.v2019_03_01.models.BootDiagnostics - """ - - _attribute_map = { - 'boot_diagnostics': {'key': 'bootDiagnostics', 'type': 'BootDiagnostics'}, - } - - def __init__(self, *, boot_diagnostics=None, **kwargs) -> None: - super(DiagnosticsProfile, self).__init__(**kwargs) - self.boot_diagnostics = boot_diagnostics diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/diff_disk_settings.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/diff_disk_settings.py deleted file mode 100644 index 35903cff5af4..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/diff_disk_settings.py +++ /dev/null @@ -1,32 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class DiffDiskSettings(Model): - """Describes the parameters of ephemeral disk settings that can be specified - for operating system disk.

    NOTE: The ephemeral disk settings can - only be specified for managed disk. - - :param option: Specifies the ephemeral disk settings for operating system - disk. Possible values include: 'Local' - :type option: str or - ~azure.mgmt.compute.v2019_03_01.models.DiffDiskOptions - """ - - _attribute_map = { - 'option': {'key': 'option', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(DiffDiskSettings, self).__init__(**kwargs) - self.option = kwargs.get('option', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/diff_disk_settings_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/diff_disk_settings_py3.py deleted file mode 100644 index fa26a9006bb9..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/diff_disk_settings_py3.py +++ /dev/null @@ -1,32 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class DiffDiskSettings(Model): - """Describes the parameters of ephemeral disk settings that can be specified - for operating system disk.

    NOTE: The ephemeral disk settings can - only be specified for managed disk. - - :param option: Specifies the ephemeral disk settings for operating system - disk. Possible values include: 'Local' - :type option: str or - ~azure.mgmt.compute.v2019_03_01.models.DiffDiskOptions - """ - - _attribute_map = { - 'option': {'key': 'option', 'type': 'str'}, - } - - def __init__(self, *, option=None, **kwargs) -> None: - super(DiffDiskSettings, self).__init__(**kwargs) - self.option = option diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/disallowed.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/disallowed.py deleted file mode 100644 index 4269dd604e66..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/disallowed.py +++ /dev/null @@ -1,28 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class Disallowed(Model): - """Describes the disallowed disk types. - - :param disk_types: A list of disk types. - :type disk_types: list[str] - """ - - _attribute_map = { - 'disk_types': {'key': 'diskTypes', 'type': '[str]'}, - } - - def __init__(self, **kwargs): - super(Disallowed, self).__init__(**kwargs) - self.disk_types = kwargs.get('disk_types', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/disallowed_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/disallowed_py3.py deleted file mode 100644 index 95e07d7a7533..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/disallowed_py3.py +++ /dev/null @@ -1,28 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class Disallowed(Model): - """Describes the disallowed disk types. - - :param disk_types: A list of disk types. - :type disk_types: list[str] - """ - - _attribute_map = { - 'disk_types': {'key': 'diskTypes', 'type': '[str]'}, - } - - def __init__(self, *, disk_types=None, **kwargs) -> None: - super(Disallowed, self).__init__(**kwargs) - self.disk_types = disk_types diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/disk_encryption_settings.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/disk_encryption_settings.py deleted file mode 100644 index 50f60ab54713..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/disk_encryption_settings.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class DiskEncryptionSettings(Model): - """Describes a Encryption Settings for a Disk. - - :param disk_encryption_key: Specifies the location of the disk encryption - key, which is a Key Vault Secret. - :type disk_encryption_key: - ~azure.mgmt.compute.v2019_03_01.models.KeyVaultSecretReference - :param key_encryption_key: Specifies the location of the key encryption - key in Key Vault. - :type key_encryption_key: - ~azure.mgmt.compute.v2019_03_01.models.KeyVaultKeyReference - :param enabled: Specifies whether disk encryption should be enabled on the - virtual machine. - :type enabled: bool - """ - - _attribute_map = { - 'disk_encryption_key': {'key': 'diskEncryptionKey', 'type': 'KeyVaultSecretReference'}, - 'key_encryption_key': {'key': 'keyEncryptionKey', 'type': 'KeyVaultKeyReference'}, - 'enabled': {'key': 'enabled', 'type': 'bool'}, - } - - def __init__(self, **kwargs): - super(DiskEncryptionSettings, self).__init__(**kwargs) - self.disk_encryption_key = kwargs.get('disk_encryption_key', None) - self.key_encryption_key = kwargs.get('key_encryption_key', None) - self.enabled = kwargs.get('enabled', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/disk_encryption_settings_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/disk_encryption_settings_py3.py deleted file mode 100644 index c041bd58e5d1..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/disk_encryption_settings_py3.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class DiskEncryptionSettings(Model): - """Describes a Encryption Settings for a Disk. - - :param disk_encryption_key: Specifies the location of the disk encryption - key, which is a Key Vault Secret. - :type disk_encryption_key: - ~azure.mgmt.compute.v2019_03_01.models.KeyVaultSecretReference - :param key_encryption_key: Specifies the location of the key encryption - key in Key Vault. - :type key_encryption_key: - ~azure.mgmt.compute.v2019_03_01.models.KeyVaultKeyReference - :param enabled: Specifies whether disk encryption should be enabled on the - virtual machine. - :type enabled: bool - """ - - _attribute_map = { - 'disk_encryption_key': {'key': 'diskEncryptionKey', 'type': 'KeyVaultSecretReference'}, - 'key_encryption_key': {'key': 'keyEncryptionKey', 'type': 'KeyVaultKeyReference'}, - 'enabled': {'key': 'enabled', 'type': 'bool'}, - } - - def __init__(self, *, disk_encryption_key=None, key_encryption_key=None, enabled: bool=None, **kwargs) -> None: - super(DiskEncryptionSettings, self).__init__(**kwargs) - self.disk_encryption_key = disk_encryption_key - self.key_encryption_key = key_encryption_key - self.enabled = enabled diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/disk_instance_view.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/disk_instance_view.py deleted file mode 100644 index ef4c8f83f827..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/disk_instance_view.py +++ /dev/null @@ -1,39 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class DiskInstanceView(Model): - """The instance view of the disk. - - :param name: The disk name. - :type name: str - :param encryption_settings: Specifies the encryption settings for the OS - Disk.

    Minimum api-version: 2015-06-15 - :type encryption_settings: - list[~azure.mgmt.compute.v2019_03_01.models.DiskEncryptionSettings] - :param statuses: The resource status information. - :type statuses: - list[~azure.mgmt.compute.v2019_03_01.models.InstanceViewStatus] - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'encryption_settings': {'key': 'encryptionSettings', 'type': '[DiskEncryptionSettings]'}, - 'statuses': {'key': 'statuses', 'type': '[InstanceViewStatus]'}, - } - - def __init__(self, **kwargs): - super(DiskInstanceView, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.encryption_settings = kwargs.get('encryption_settings', None) - self.statuses = kwargs.get('statuses', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/disk_instance_view_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/disk_instance_view_py3.py deleted file mode 100644 index a8db593cd84c..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/disk_instance_view_py3.py +++ /dev/null @@ -1,39 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class DiskInstanceView(Model): - """The instance view of the disk. - - :param name: The disk name. - :type name: str - :param encryption_settings: Specifies the encryption settings for the OS - Disk.

    Minimum api-version: 2015-06-15 - :type encryption_settings: - list[~azure.mgmt.compute.v2019_03_01.models.DiskEncryptionSettings] - :param statuses: The resource status information. - :type statuses: - list[~azure.mgmt.compute.v2019_03_01.models.InstanceViewStatus] - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'encryption_settings': {'key': 'encryptionSettings', 'type': '[DiskEncryptionSettings]'}, - 'statuses': {'key': 'statuses', 'type': '[InstanceViewStatus]'}, - } - - def __init__(self, *, name: str=None, encryption_settings=None, statuses=None, **kwargs) -> None: - super(DiskInstanceView, self).__init__(**kwargs) - self.name = name - self.encryption_settings = encryption_settings - self.statuses = statuses diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/gallery.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/gallery.py deleted file mode 100644 index 54a10bdf8794..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/gallery.py +++ /dev/null @@ -1,70 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource import Resource - - -class Gallery(Resource): - """Specifies information about the Shared Image Gallery that you want to - create or update. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource Id - :vartype id: str - :ivar name: Resource name - :vartype name: str - :ivar type: Resource type - :vartype type: str - :param location: Required. Resource location - :type location: str - :param tags: Resource tags - :type tags: dict[str, str] - :param description: The description of this Shared Image Gallery resource. - This property is updatable. - :type description: str - :param identifier: - :type identifier: ~azure.mgmt.compute.v2019_03_01.models.GalleryIdentifier - :ivar provisioning_state: The current state of the gallery. The - provisioning state, which only appears in the response. Possible values - include: 'Creating', 'Updating', 'Failed', 'Succeeded', 'Deleting', - 'Migrating' - :vartype provisioning_state: str or - ~azure.mgmt.compute.v2019_03_01.models.enum - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - 'provisioning_state': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'description': {'key': 'properties.description', 'type': 'str'}, - 'identifier': {'key': 'properties.identifier', 'type': 'GalleryIdentifier'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(Gallery, self).__init__(**kwargs) - self.description = kwargs.get('description', None) - self.identifier = kwargs.get('identifier', None) - self.provisioning_state = None diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/gallery_artifact_publishing_profile_base.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/gallery_artifact_publishing_profile_base.py deleted file mode 100644 index 484c73f36052..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/gallery_artifact_publishing_profile_base.py +++ /dev/null @@ -1,40 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class GalleryArtifactPublishingProfileBase(Model): - """Describes the basic gallery artifact publishing profile. - - All required parameters must be populated in order to send to Azure. - - :param target_regions: The target regions where the Image Version is going - to be replicated to. This property is updatable. - :type target_regions: - list[~azure.mgmt.compute.v2019_03_01.models.TargetRegion] - :param source: Required. - :type source: ~azure.mgmt.compute.v2019_03_01.models.GalleryArtifactSource - """ - - _validation = { - 'source': {'required': True}, - } - - _attribute_map = { - 'target_regions': {'key': 'targetRegions', 'type': '[TargetRegion]'}, - 'source': {'key': 'source', 'type': 'GalleryArtifactSource'}, - } - - def __init__(self, **kwargs): - super(GalleryArtifactPublishingProfileBase, self).__init__(**kwargs) - self.target_regions = kwargs.get('target_regions', None) - self.source = kwargs.get('source', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/gallery_artifact_publishing_profile_base_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/gallery_artifact_publishing_profile_base_py3.py deleted file mode 100644 index 747e08d4cccd..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/gallery_artifact_publishing_profile_base_py3.py +++ /dev/null @@ -1,40 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class GalleryArtifactPublishingProfileBase(Model): - """Describes the basic gallery artifact publishing profile. - - All required parameters must be populated in order to send to Azure. - - :param target_regions: The target regions where the Image Version is going - to be replicated to. This property is updatable. - :type target_regions: - list[~azure.mgmt.compute.v2019_03_01.models.TargetRegion] - :param source: Required. - :type source: ~azure.mgmt.compute.v2019_03_01.models.GalleryArtifactSource - """ - - _validation = { - 'source': {'required': True}, - } - - _attribute_map = { - 'target_regions': {'key': 'targetRegions', 'type': '[TargetRegion]'}, - 'source': {'key': 'source', 'type': 'GalleryArtifactSource'}, - } - - def __init__(self, *, source, target_regions=None, **kwargs) -> None: - super(GalleryArtifactPublishingProfileBase, self).__init__(**kwargs) - self.target_regions = target_regions - self.source = source diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/gallery_artifact_source.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/gallery_artifact_source.py deleted file mode 100644 index 9928a51a1069..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/gallery_artifact_source.py +++ /dev/null @@ -1,35 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class GalleryArtifactSource(Model): - """The source image from which the Image Version is going to be created. - - All required parameters must be populated in order to send to Azure. - - :param managed_image: Required. - :type managed_image: - ~azure.mgmt.compute.v2019_03_01.models.ManagedArtifact - """ - - _validation = { - 'managed_image': {'required': True}, - } - - _attribute_map = { - 'managed_image': {'key': 'managedImage', 'type': 'ManagedArtifact'}, - } - - def __init__(self, **kwargs): - super(GalleryArtifactSource, self).__init__(**kwargs) - self.managed_image = kwargs.get('managed_image', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/gallery_artifact_source_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/gallery_artifact_source_py3.py deleted file mode 100644 index 34fe86d9cbb8..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/gallery_artifact_source_py3.py +++ /dev/null @@ -1,35 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class GalleryArtifactSource(Model): - """The source image from which the Image Version is going to be created. - - All required parameters must be populated in order to send to Azure. - - :param managed_image: Required. - :type managed_image: - ~azure.mgmt.compute.v2019_03_01.models.ManagedArtifact - """ - - _validation = { - 'managed_image': {'required': True}, - } - - _attribute_map = { - 'managed_image': {'key': 'managedImage', 'type': 'ManagedArtifact'}, - } - - def __init__(self, *, managed_image, **kwargs) -> None: - super(GalleryArtifactSource, self).__init__(**kwargs) - self.managed_image = managed_image diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/gallery_data_disk_image.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/gallery_data_disk_image.py deleted file mode 100644 index efcbedbad490..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/gallery_data_disk_image.py +++ /dev/null @@ -1,50 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .gallery_disk_image import GalleryDiskImage - - -class GalleryDataDiskImage(GalleryDiskImage): - """This is the data disk image. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar size_in_gb: This property indicates the size of the VHD to be - created. - :vartype size_in_gb: int - :ivar host_caching: The host caching of the disk. Valid values are 'None', - 'ReadOnly', and 'ReadWrite'. Possible values include: 'None', 'ReadOnly', - 'ReadWrite' - :vartype host_caching: str or - ~azure.mgmt.compute.v2019_03_01.models.HostCaching - :ivar lun: This property specifies the logical unit number of the data - disk. This value is used to identify data disks within the Virtual Machine - and therefore must be unique for each data disk attached to the Virtual - Machine. - :vartype lun: int - """ - - _validation = { - 'size_in_gb': {'readonly': True}, - 'host_caching': {'readonly': True}, - 'lun': {'readonly': True}, - } - - _attribute_map = { - 'size_in_gb': {'key': 'sizeInGB', 'type': 'int'}, - 'host_caching': {'key': 'hostCaching', 'type': 'HostCaching'}, - 'lun': {'key': 'lun', 'type': 'int'}, - } - - def __init__(self, **kwargs): - super(GalleryDataDiskImage, self).__init__(**kwargs) - self.lun = None diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/gallery_data_disk_image_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/gallery_data_disk_image_py3.py deleted file mode 100644 index d5a6550c6bc4..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/gallery_data_disk_image_py3.py +++ /dev/null @@ -1,50 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .gallery_disk_image_py3 import GalleryDiskImage - - -class GalleryDataDiskImage(GalleryDiskImage): - """This is the data disk image. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar size_in_gb: This property indicates the size of the VHD to be - created. - :vartype size_in_gb: int - :ivar host_caching: The host caching of the disk. Valid values are 'None', - 'ReadOnly', and 'ReadWrite'. Possible values include: 'None', 'ReadOnly', - 'ReadWrite' - :vartype host_caching: str or - ~azure.mgmt.compute.v2019_03_01.models.HostCaching - :ivar lun: This property specifies the logical unit number of the data - disk. This value is used to identify data disks within the Virtual Machine - and therefore must be unique for each data disk attached to the Virtual - Machine. - :vartype lun: int - """ - - _validation = { - 'size_in_gb': {'readonly': True}, - 'host_caching': {'readonly': True}, - 'lun': {'readonly': True}, - } - - _attribute_map = { - 'size_in_gb': {'key': 'sizeInGB', 'type': 'int'}, - 'host_caching': {'key': 'hostCaching', 'type': 'HostCaching'}, - 'lun': {'key': 'lun', 'type': 'int'}, - } - - def __init__(self, **kwargs) -> None: - super(GalleryDataDiskImage, self).__init__(**kwargs) - self.lun = None diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/gallery_disk_image.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/gallery_disk_image.py deleted file mode 100644 index c612a25ad6a2..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/gallery_disk_image.py +++ /dev/null @@ -1,44 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class GalleryDiskImage(Model): - """This is the disk image base class. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar size_in_gb: This property indicates the size of the VHD to be - created. - :vartype size_in_gb: int - :ivar host_caching: The host caching of the disk. Valid values are 'None', - 'ReadOnly', and 'ReadWrite'. Possible values include: 'None', 'ReadOnly', - 'ReadWrite' - :vartype host_caching: str or - ~azure.mgmt.compute.v2019_03_01.models.HostCaching - """ - - _validation = { - 'size_in_gb': {'readonly': True}, - 'host_caching': {'readonly': True}, - } - - _attribute_map = { - 'size_in_gb': {'key': 'sizeInGB', 'type': 'int'}, - 'host_caching': {'key': 'hostCaching', 'type': 'HostCaching'}, - } - - def __init__(self, **kwargs): - super(GalleryDiskImage, self).__init__(**kwargs) - self.size_in_gb = None - self.host_caching = None diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/gallery_disk_image_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/gallery_disk_image_py3.py deleted file mode 100644 index aed1330d4cf3..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/gallery_disk_image_py3.py +++ /dev/null @@ -1,44 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class GalleryDiskImage(Model): - """This is the disk image base class. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar size_in_gb: This property indicates the size of the VHD to be - created. - :vartype size_in_gb: int - :ivar host_caching: The host caching of the disk. Valid values are 'None', - 'ReadOnly', and 'ReadWrite'. Possible values include: 'None', 'ReadOnly', - 'ReadWrite' - :vartype host_caching: str or - ~azure.mgmt.compute.v2019_03_01.models.HostCaching - """ - - _validation = { - 'size_in_gb': {'readonly': True}, - 'host_caching': {'readonly': True}, - } - - _attribute_map = { - 'size_in_gb': {'key': 'sizeInGB', 'type': 'int'}, - 'host_caching': {'key': 'hostCaching', 'type': 'HostCaching'}, - } - - def __init__(self, **kwargs) -> None: - super(GalleryDiskImage, self).__init__(**kwargs) - self.size_in_gb = None - self.host_caching = None diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/gallery_identifier.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/gallery_identifier.py deleted file mode 100644 index 324d20c34cfd..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/gallery_identifier.py +++ /dev/null @@ -1,36 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class GalleryIdentifier(Model): - """Describes the gallery unique name. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar unique_name: The unique name of the Shared Image Gallery. This name - is generated automatically by Azure. - :vartype unique_name: str - """ - - _validation = { - 'unique_name': {'readonly': True}, - } - - _attribute_map = { - 'unique_name': {'key': 'uniqueName', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(GalleryIdentifier, self).__init__(**kwargs) - self.unique_name = None diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/gallery_identifier_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/gallery_identifier_py3.py deleted file mode 100644 index d7279159b636..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/gallery_identifier_py3.py +++ /dev/null @@ -1,36 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class GalleryIdentifier(Model): - """Describes the gallery unique name. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar unique_name: The unique name of the Shared Image Gallery. This name - is generated automatically by Azure. - :vartype unique_name: str - """ - - _validation = { - 'unique_name': {'readonly': True}, - } - - _attribute_map = { - 'unique_name': {'key': 'uniqueName', 'type': 'str'}, - } - - def __init__(self, **kwargs) -> None: - super(GalleryIdentifier, self).__init__(**kwargs) - self.unique_name = None diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/gallery_image.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/gallery_image.py deleted file mode 100644 index 1ece2e629da5..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/gallery_image.py +++ /dev/null @@ -1,120 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource import Resource - - -class GalleryImage(Resource): - """Specifies information about the gallery Image Definition that you want to - create or update. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource Id - :vartype id: str - :ivar name: Resource name - :vartype name: str - :ivar type: Resource type - :vartype type: str - :param location: Required. Resource location - :type location: str - :param tags: Resource tags - :type tags: dict[str, str] - :param description: The description of this gallery Image Definition - resource. This property is updatable. - :type description: str - :param eula: The Eula agreement for the gallery Image Definition. - :type eula: str - :param privacy_statement_uri: The privacy statement uri. - :type privacy_statement_uri: str - :param release_note_uri: The release note uri. - :type release_note_uri: str - :param os_type: Required. This property allows you to specify the type of - the OS that is included in the disk when creating a VM from a managed - image.

    Possible values are:

    **Windows**

    - **Linux**. Possible values include: 'Windows', 'Linux' - :type os_type: str or - ~azure.mgmt.compute.v2019_03_01.models.OperatingSystemTypes - :param os_state: Required. The allowed values for OS State are - 'Generalized'. Possible values include: 'Generalized', 'Specialized' - :type os_state: str or - ~azure.mgmt.compute.v2019_03_01.models.OperatingSystemStateTypes - :param end_of_life_date: The end of life date of the gallery Image - Definition. This property can be used for decommissioning purposes. This - property is updatable. - :type end_of_life_date: datetime - :param identifier: Required. - :type identifier: - ~azure.mgmt.compute.v2019_03_01.models.GalleryImageIdentifier - :param recommended: - :type recommended: - ~azure.mgmt.compute.v2019_03_01.models.RecommendedMachineConfiguration - :param disallowed: - :type disallowed: ~azure.mgmt.compute.v2019_03_01.models.Disallowed - :param purchase_plan: - :type purchase_plan: - ~azure.mgmt.compute.v2019_03_01.models.ImagePurchasePlan - :ivar provisioning_state: The current state of the gallery Image - Definition. The provisioning state, which only appears in the response. - Possible values include: 'Creating', 'Updating', 'Failed', 'Succeeded', - 'Deleting', 'Migrating' - :vartype provisioning_state: str or - ~azure.mgmt.compute.v2019_03_01.models.enum - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - 'os_type': {'required': True}, - 'os_state': {'required': True}, - 'identifier': {'required': True}, - 'provisioning_state': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'description': {'key': 'properties.description', 'type': 'str'}, - 'eula': {'key': 'properties.eula', 'type': 'str'}, - 'privacy_statement_uri': {'key': 'properties.privacyStatementUri', 'type': 'str'}, - 'release_note_uri': {'key': 'properties.releaseNoteUri', 'type': 'str'}, - 'os_type': {'key': 'properties.osType', 'type': 'OperatingSystemTypes'}, - 'os_state': {'key': 'properties.osState', 'type': 'OperatingSystemStateTypes'}, - 'end_of_life_date': {'key': 'properties.endOfLifeDate', 'type': 'iso-8601'}, - 'identifier': {'key': 'properties.identifier', 'type': 'GalleryImageIdentifier'}, - 'recommended': {'key': 'properties.recommended', 'type': 'RecommendedMachineConfiguration'}, - 'disallowed': {'key': 'properties.disallowed', 'type': 'Disallowed'}, - 'purchase_plan': {'key': 'properties.purchasePlan', 'type': 'ImagePurchasePlan'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(GalleryImage, self).__init__(**kwargs) - self.description = kwargs.get('description', None) - self.eula = kwargs.get('eula', None) - self.privacy_statement_uri = kwargs.get('privacy_statement_uri', None) - self.release_note_uri = kwargs.get('release_note_uri', None) - self.os_type = kwargs.get('os_type', None) - self.os_state = kwargs.get('os_state', None) - self.end_of_life_date = kwargs.get('end_of_life_date', None) - self.identifier = kwargs.get('identifier', None) - self.recommended = kwargs.get('recommended', None) - self.disallowed = kwargs.get('disallowed', None) - self.purchase_plan = kwargs.get('purchase_plan', None) - self.provisioning_state = None diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/gallery_image_identifier.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/gallery_image_identifier.py deleted file mode 100644 index 15699690de5e..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/gallery_image_identifier.py +++ /dev/null @@ -1,45 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class GalleryImageIdentifier(Model): - """This is the gallery Image Definition identifier. - - All required parameters must be populated in order to send to Azure. - - :param publisher: Required. The name of the gallery Image Definition - publisher. - :type publisher: str - :param offer: Required. The name of the gallery Image Definition offer. - :type offer: str - :param sku: Required. The name of the gallery Image Definition SKU. - :type sku: str - """ - - _validation = { - 'publisher': {'required': True}, - 'offer': {'required': True}, - 'sku': {'required': True}, - } - - _attribute_map = { - 'publisher': {'key': 'publisher', 'type': 'str'}, - 'offer': {'key': 'offer', 'type': 'str'}, - 'sku': {'key': 'sku', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(GalleryImageIdentifier, self).__init__(**kwargs) - self.publisher = kwargs.get('publisher', None) - self.offer = kwargs.get('offer', None) - self.sku = kwargs.get('sku', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/gallery_image_identifier_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/gallery_image_identifier_py3.py deleted file mode 100644 index 3876526cebe4..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/gallery_image_identifier_py3.py +++ /dev/null @@ -1,45 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class GalleryImageIdentifier(Model): - """This is the gallery Image Definition identifier. - - All required parameters must be populated in order to send to Azure. - - :param publisher: Required. The name of the gallery Image Definition - publisher. - :type publisher: str - :param offer: Required. The name of the gallery Image Definition offer. - :type offer: str - :param sku: Required. The name of the gallery Image Definition SKU. - :type sku: str - """ - - _validation = { - 'publisher': {'required': True}, - 'offer': {'required': True}, - 'sku': {'required': True}, - } - - _attribute_map = { - 'publisher': {'key': 'publisher', 'type': 'str'}, - 'offer': {'key': 'offer', 'type': 'str'}, - 'sku': {'key': 'sku', 'type': 'str'}, - } - - def __init__(self, *, publisher: str, offer: str, sku: str, **kwargs) -> None: - super(GalleryImageIdentifier, self).__init__(**kwargs) - self.publisher = publisher - self.offer = offer - self.sku = sku diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/gallery_image_paged.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/gallery_image_paged.py deleted file mode 100644 index 42ad22aec642..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/gallery_image_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class GalleryImagePaged(Paged): - """ - A paging container for iterating over a list of :class:`GalleryImage ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[GalleryImage]'} - } - - def __init__(self, *args, **kwargs): - - super(GalleryImagePaged, self).__init__(*args, **kwargs) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/gallery_image_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/gallery_image_py3.py deleted file mode 100644 index e2ef1f1b981f..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/gallery_image_py3.py +++ /dev/null @@ -1,120 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource_py3 import Resource - - -class GalleryImage(Resource): - """Specifies information about the gallery Image Definition that you want to - create or update. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource Id - :vartype id: str - :ivar name: Resource name - :vartype name: str - :ivar type: Resource type - :vartype type: str - :param location: Required. Resource location - :type location: str - :param tags: Resource tags - :type tags: dict[str, str] - :param description: The description of this gallery Image Definition - resource. This property is updatable. - :type description: str - :param eula: The Eula agreement for the gallery Image Definition. - :type eula: str - :param privacy_statement_uri: The privacy statement uri. - :type privacy_statement_uri: str - :param release_note_uri: The release note uri. - :type release_note_uri: str - :param os_type: Required. This property allows you to specify the type of - the OS that is included in the disk when creating a VM from a managed - image.

    Possible values are:

    **Windows**

    - **Linux**. Possible values include: 'Windows', 'Linux' - :type os_type: str or - ~azure.mgmt.compute.v2019_03_01.models.OperatingSystemTypes - :param os_state: Required. The allowed values for OS State are - 'Generalized'. Possible values include: 'Generalized', 'Specialized' - :type os_state: str or - ~azure.mgmt.compute.v2019_03_01.models.OperatingSystemStateTypes - :param end_of_life_date: The end of life date of the gallery Image - Definition. This property can be used for decommissioning purposes. This - property is updatable. - :type end_of_life_date: datetime - :param identifier: Required. - :type identifier: - ~azure.mgmt.compute.v2019_03_01.models.GalleryImageIdentifier - :param recommended: - :type recommended: - ~azure.mgmt.compute.v2019_03_01.models.RecommendedMachineConfiguration - :param disallowed: - :type disallowed: ~azure.mgmt.compute.v2019_03_01.models.Disallowed - :param purchase_plan: - :type purchase_plan: - ~azure.mgmt.compute.v2019_03_01.models.ImagePurchasePlan - :ivar provisioning_state: The current state of the gallery Image - Definition. The provisioning state, which only appears in the response. - Possible values include: 'Creating', 'Updating', 'Failed', 'Succeeded', - 'Deleting', 'Migrating' - :vartype provisioning_state: str or - ~azure.mgmt.compute.v2019_03_01.models.enum - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - 'os_type': {'required': True}, - 'os_state': {'required': True}, - 'identifier': {'required': True}, - 'provisioning_state': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'description': {'key': 'properties.description', 'type': 'str'}, - 'eula': {'key': 'properties.eula', 'type': 'str'}, - 'privacy_statement_uri': {'key': 'properties.privacyStatementUri', 'type': 'str'}, - 'release_note_uri': {'key': 'properties.releaseNoteUri', 'type': 'str'}, - 'os_type': {'key': 'properties.osType', 'type': 'OperatingSystemTypes'}, - 'os_state': {'key': 'properties.osState', 'type': 'OperatingSystemStateTypes'}, - 'end_of_life_date': {'key': 'properties.endOfLifeDate', 'type': 'iso-8601'}, - 'identifier': {'key': 'properties.identifier', 'type': 'GalleryImageIdentifier'}, - 'recommended': {'key': 'properties.recommended', 'type': 'RecommendedMachineConfiguration'}, - 'disallowed': {'key': 'properties.disallowed', 'type': 'Disallowed'}, - 'purchase_plan': {'key': 'properties.purchasePlan', 'type': 'ImagePurchasePlan'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - } - - def __init__(self, *, location: str, os_type, os_state, identifier, tags=None, description: str=None, eula: str=None, privacy_statement_uri: str=None, release_note_uri: str=None, end_of_life_date=None, recommended=None, disallowed=None, purchase_plan=None, **kwargs) -> None: - super(GalleryImage, self).__init__(location=location, tags=tags, **kwargs) - self.description = description - self.eula = eula - self.privacy_statement_uri = privacy_statement_uri - self.release_note_uri = release_note_uri - self.os_type = os_type - self.os_state = os_state - self.end_of_life_date = end_of_life_date - self.identifier = identifier - self.recommended = recommended - self.disallowed = disallowed - self.purchase_plan = purchase_plan - self.provisioning_state = None diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/gallery_image_version.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/gallery_image_version.py deleted file mode 100644 index 46be6cfe6266..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/gallery_image_version.py +++ /dev/null @@ -1,79 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource import Resource - - -class GalleryImageVersion(Resource): - """Specifies information about the gallery Image Version that you want to - create or update. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource Id - :vartype id: str - :ivar name: Resource name - :vartype name: str - :ivar type: Resource type - :vartype type: str - :param location: Required. Resource location - :type location: str - :param tags: Resource tags - :type tags: dict[str, str] - :param publishing_profile: Required. - :type publishing_profile: - ~azure.mgmt.compute.v2019_03_01.models.GalleryImageVersionPublishingProfile - :ivar provisioning_state: The current state of the gallery Image Version. - The provisioning state, which only appears in the response. Possible - values include: 'Creating', 'Updating', 'Failed', 'Succeeded', 'Deleting', - 'Migrating' - :vartype provisioning_state: str or - ~azure.mgmt.compute.v2019_03_01.models.enum - :ivar storage_profile: - :vartype storage_profile: - ~azure.mgmt.compute.v2019_03_01.models.GalleryImageVersionStorageProfile - :ivar replication_status: - :vartype replication_status: - ~azure.mgmt.compute.v2019_03_01.models.ReplicationStatus - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - 'publishing_profile': {'required': True}, - 'provisioning_state': {'readonly': True}, - 'storage_profile': {'readonly': True}, - 'replication_status': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'publishing_profile': {'key': 'properties.publishingProfile', 'type': 'GalleryImageVersionPublishingProfile'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'storage_profile': {'key': 'properties.storageProfile', 'type': 'GalleryImageVersionStorageProfile'}, - 'replication_status': {'key': 'properties.replicationStatus', 'type': 'ReplicationStatus'}, - } - - def __init__(self, **kwargs): - super(GalleryImageVersion, self).__init__(**kwargs) - self.publishing_profile = kwargs.get('publishing_profile', None) - self.provisioning_state = None - self.storage_profile = None - self.replication_status = None diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/gallery_image_version_paged.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/gallery_image_version_paged.py deleted file mode 100644 index acabc2688a2d..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/gallery_image_version_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class GalleryImageVersionPaged(Paged): - """ - A paging container for iterating over a list of :class:`GalleryImageVersion ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[GalleryImageVersion]'} - } - - def __init__(self, *args, **kwargs): - - super(GalleryImageVersionPaged, self).__init__(*args, **kwargs) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/gallery_image_version_publishing_profile.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/gallery_image_version_publishing_profile.py deleted file mode 100644 index 7d86977eca85..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/gallery_image_version_publishing_profile.py +++ /dev/null @@ -1,71 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .gallery_artifact_publishing_profile_base import GalleryArtifactPublishingProfileBase - - -class GalleryImageVersionPublishingProfile(GalleryArtifactPublishingProfileBase): - """The publishing profile of a gallery Image Version. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :param target_regions: The target regions where the Image Version is going - to be replicated to. This property is updatable. - :type target_regions: - list[~azure.mgmt.compute.v2019_03_01.models.TargetRegion] - :param source: Required. - :type source: ~azure.mgmt.compute.v2019_03_01.models.GalleryArtifactSource - :param replica_count: The number of replicas of the Image Version to be - created per region. This property would take effect for a region when - regionalReplicaCount is not specified. This property is updatable. - :type replica_count: int - :param exclude_from_latest: If set to true, Virtual Machines deployed from - the latest version of the Image Definition won't use this Image Version. - :type exclude_from_latest: bool - :ivar published_date: The timestamp for when the gallery Image Version is - published. - :vartype published_date: datetime - :param end_of_life_date: The end of life date of the gallery Image - Version. This property can be used for decommissioning purposes. This - property is updatable. - :type end_of_life_date: datetime - :param storage_account_type: Specifies the storage account type to be used - to store the image. This property is not updatable. Possible values - include: 'Standard_LRS', 'Standard_ZRS' - :type storage_account_type: str or - ~azure.mgmt.compute.v2019_03_01.models.StorageAccountType - """ - - _validation = { - 'source': {'required': True}, - 'published_date': {'readonly': True}, - } - - _attribute_map = { - 'target_regions': {'key': 'targetRegions', 'type': '[TargetRegion]'}, - 'source': {'key': 'source', 'type': 'GalleryArtifactSource'}, - 'replica_count': {'key': 'replicaCount', 'type': 'int'}, - 'exclude_from_latest': {'key': 'excludeFromLatest', 'type': 'bool'}, - 'published_date': {'key': 'publishedDate', 'type': 'iso-8601'}, - 'end_of_life_date': {'key': 'endOfLifeDate', 'type': 'iso-8601'}, - 'storage_account_type': {'key': 'storageAccountType', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(GalleryImageVersionPublishingProfile, self).__init__(**kwargs) - self.replica_count = kwargs.get('replica_count', None) - self.exclude_from_latest = kwargs.get('exclude_from_latest', None) - self.published_date = None - self.end_of_life_date = kwargs.get('end_of_life_date', None) - self.storage_account_type = kwargs.get('storage_account_type', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/gallery_image_version_publishing_profile_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/gallery_image_version_publishing_profile_py3.py deleted file mode 100644 index 26e6f560a34a..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/gallery_image_version_publishing_profile_py3.py +++ /dev/null @@ -1,71 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .gallery_artifact_publishing_profile_base_py3 import GalleryArtifactPublishingProfileBase - - -class GalleryImageVersionPublishingProfile(GalleryArtifactPublishingProfileBase): - """The publishing profile of a gallery Image Version. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :param target_regions: The target regions where the Image Version is going - to be replicated to. This property is updatable. - :type target_regions: - list[~azure.mgmt.compute.v2019_03_01.models.TargetRegion] - :param source: Required. - :type source: ~azure.mgmt.compute.v2019_03_01.models.GalleryArtifactSource - :param replica_count: The number of replicas of the Image Version to be - created per region. This property would take effect for a region when - regionalReplicaCount is not specified. This property is updatable. - :type replica_count: int - :param exclude_from_latest: If set to true, Virtual Machines deployed from - the latest version of the Image Definition won't use this Image Version. - :type exclude_from_latest: bool - :ivar published_date: The timestamp for when the gallery Image Version is - published. - :vartype published_date: datetime - :param end_of_life_date: The end of life date of the gallery Image - Version. This property can be used for decommissioning purposes. This - property is updatable. - :type end_of_life_date: datetime - :param storage_account_type: Specifies the storage account type to be used - to store the image. This property is not updatable. Possible values - include: 'Standard_LRS', 'Standard_ZRS' - :type storage_account_type: str or - ~azure.mgmt.compute.v2019_03_01.models.StorageAccountType - """ - - _validation = { - 'source': {'required': True}, - 'published_date': {'readonly': True}, - } - - _attribute_map = { - 'target_regions': {'key': 'targetRegions', 'type': '[TargetRegion]'}, - 'source': {'key': 'source', 'type': 'GalleryArtifactSource'}, - 'replica_count': {'key': 'replicaCount', 'type': 'int'}, - 'exclude_from_latest': {'key': 'excludeFromLatest', 'type': 'bool'}, - 'published_date': {'key': 'publishedDate', 'type': 'iso-8601'}, - 'end_of_life_date': {'key': 'endOfLifeDate', 'type': 'iso-8601'}, - 'storage_account_type': {'key': 'storageAccountType', 'type': 'str'}, - } - - def __init__(self, *, source, target_regions=None, replica_count: int=None, exclude_from_latest: bool=None, end_of_life_date=None, storage_account_type=None, **kwargs) -> None: - super(GalleryImageVersionPublishingProfile, self).__init__(target_regions=target_regions, source=source, **kwargs) - self.replica_count = replica_count - self.exclude_from_latest = exclude_from_latest - self.published_date = None - self.end_of_life_date = end_of_life_date - self.storage_account_type = storage_account_type diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/gallery_image_version_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/gallery_image_version_py3.py deleted file mode 100644 index 1a80a733212d..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/gallery_image_version_py3.py +++ /dev/null @@ -1,79 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource_py3 import Resource - - -class GalleryImageVersion(Resource): - """Specifies information about the gallery Image Version that you want to - create or update. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource Id - :vartype id: str - :ivar name: Resource name - :vartype name: str - :ivar type: Resource type - :vartype type: str - :param location: Required. Resource location - :type location: str - :param tags: Resource tags - :type tags: dict[str, str] - :param publishing_profile: Required. - :type publishing_profile: - ~azure.mgmt.compute.v2019_03_01.models.GalleryImageVersionPublishingProfile - :ivar provisioning_state: The current state of the gallery Image Version. - The provisioning state, which only appears in the response. Possible - values include: 'Creating', 'Updating', 'Failed', 'Succeeded', 'Deleting', - 'Migrating' - :vartype provisioning_state: str or - ~azure.mgmt.compute.v2019_03_01.models.enum - :ivar storage_profile: - :vartype storage_profile: - ~azure.mgmt.compute.v2019_03_01.models.GalleryImageVersionStorageProfile - :ivar replication_status: - :vartype replication_status: - ~azure.mgmt.compute.v2019_03_01.models.ReplicationStatus - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - 'publishing_profile': {'required': True}, - 'provisioning_state': {'readonly': True}, - 'storage_profile': {'readonly': True}, - 'replication_status': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'publishing_profile': {'key': 'properties.publishingProfile', 'type': 'GalleryImageVersionPublishingProfile'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'storage_profile': {'key': 'properties.storageProfile', 'type': 'GalleryImageVersionStorageProfile'}, - 'replication_status': {'key': 'properties.replicationStatus', 'type': 'ReplicationStatus'}, - } - - def __init__(self, *, location: str, publishing_profile, tags=None, **kwargs) -> None: - super(GalleryImageVersion, self).__init__(location=location, tags=tags, **kwargs) - self.publishing_profile = publishing_profile - self.provisioning_state = None - self.storage_profile = None - self.replication_status = None diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/gallery_image_version_storage_profile.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/gallery_image_version_storage_profile.py deleted file mode 100644 index 726a40bf83a5..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/gallery_image_version_storage_profile.py +++ /dev/null @@ -1,42 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class GalleryImageVersionStorageProfile(Model): - """This is the storage profile of a gallery Image Version. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar os_disk_image: - :vartype os_disk_image: - ~azure.mgmt.compute.v2019_03_01.models.GalleryOSDiskImage - :ivar data_disk_images: A list of data disk images. - :vartype data_disk_images: - list[~azure.mgmt.compute.v2019_03_01.models.GalleryDataDiskImage] - """ - - _validation = { - 'os_disk_image': {'readonly': True}, - 'data_disk_images': {'readonly': True}, - } - - _attribute_map = { - 'os_disk_image': {'key': 'osDiskImage', 'type': 'GalleryOSDiskImage'}, - 'data_disk_images': {'key': 'dataDiskImages', 'type': '[GalleryDataDiskImage]'}, - } - - def __init__(self, **kwargs): - super(GalleryImageVersionStorageProfile, self).__init__(**kwargs) - self.os_disk_image = None - self.data_disk_images = None diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/gallery_image_version_storage_profile_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/gallery_image_version_storage_profile_py3.py deleted file mode 100644 index 07e43b470962..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/gallery_image_version_storage_profile_py3.py +++ /dev/null @@ -1,42 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class GalleryImageVersionStorageProfile(Model): - """This is the storage profile of a gallery Image Version. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar os_disk_image: - :vartype os_disk_image: - ~azure.mgmt.compute.v2019_03_01.models.GalleryOSDiskImage - :ivar data_disk_images: A list of data disk images. - :vartype data_disk_images: - list[~azure.mgmt.compute.v2019_03_01.models.GalleryDataDiskImage] - """ - - _validation = { - 'os_disk_image': {'readonly': True}, - 'data_disk_images': {'readonly': True}, - } - - _attribute_map = { - 'os_disk_image': {'key': 'osDiskImage', 'type': 'GalleryOSDiskImage'}, - 'data_disk_images': {'key': 'dataDiskImages', 'type': '[GalleryDataDiskImage]'}, - } - - def __init__(self, **kwargs) -> None: - super(GalleryImageVersionStorageProfile, self).__init__(**kwargs) - self.os_disk_image = None - self.data_disk_images = None diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/gallery_os_disk_image.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/gallery_os_disk_image.py deleted file mode 100644 index 4cc871ead67e..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/gallery_os_disk_image.py +++ /dev/null @@ -1,42 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .gallery_disk_image import GalleryDiskImage - - -class GalleryOSDiskImage(GalleryDiskImage): - """This is the OS disk image. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar size_in_gb: This property indicates the size of the VHD to be - created. - :vartype size_in_gb: int - :ivar host_caching: The host caching of the disk. Valid values are 'None', - 'ReadOnly', and 'ReadWrite'. Possible values include: 'None', 'ReadOnly', - 'ReadWrite' - :vartype host_caching: str or - ~azure.mgmt.compute.v2019_03_01.models.HostCaching - """ - - _validation = { - 'size_in_gb': {'readonly': True}, - 'host_caching': {'readonly': True}, - } - - _attribute_map = { - 'size_in_gb': {'key': 'sizeInGB', 'type': 'int'}, - 'host_caching': {'key': 'hostCaching', 'type': 'HostCaching'}, - } - - def __init__(self, **kwargs): - super(GalleryOSDiskImage, self).__init__(**kwargs) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/gallery_os_disk_image_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/gallery_os_disk_image_py3.py deleted file mode 100644 index 477c79fff870..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/gallery_os_disk_image_py3.py +++ /dev/null @@ -1,42 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .gallery_disk_image_py3 import GalleryDiskImage - - -class GalleryOSDiskImage(GalleryDiskImage): - """This is the OS disk image. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar size_in_gb: This property indicates the size of the VHD to be - created. - :vartype size_in_gb: int - :ivar host_caching: The host caching of the disk. Valid values are 'None', - 'ReadOnly', and 'ReadWrite'. Possible values include: 'None', 'ReadOnly', - 'ReadWrite' - :vartype host_caching: str or - ~azure.mgmt.compute.v2019_03_01.models.HostCaching - """ - - _validation = { - 'size_in_gb': {'readonly': True}, - 'host_caching': {'readonly': True}, - } - - _attribute_map = { - 'size_in_gb': {'key': 'sizeInGB', 'type': 'int'}, - 'host_caching': {'key': 'hostCaching', 'type': 'HostCaching'}, - } - - def __init__(self, **kwargs) -> None: - super(GalleryOSDiskImage, self).__init__(**kwargs) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/gallery_paged.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/gallery_paged.py deleted file mode 100644 index 4f6dbb343d5b..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/gallery_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class GalleryPaged(Paged): - """ - A paging container for iterating over a list of :class:`Gallery ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[Gallery]'} - } - - def __init__(self, *args, **kwargs): - - super(GalleryPaged, self).__init__(*args, **kwargs) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/gallery_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/gallery_py3.py deleted file mode 100644 index 4e5b58e84097..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/gallery_py3.py +++ /dev/null @@ -1,70 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource_py3 import Resource - - -class Gallery(Resource): - """Specifies information about the Shared Image Gallery that you want to - create or update. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource Id - :vartype id: str - :ivar name: Resource name - :vartype name: str - :ivar type: Resource type - :vartype type: str - :param location: Required. Resource location - :type location: str - :param tags: Resource tags - :type tags: dict[str, str] - :param description: The description of this Shared Image Gallery resource. - This property is updatable. - :type description: str - :param identifier: - :type identifier: ~azure.mgmt.compute.v2019_03_01.models.GalleryIdentifier - :ivar provisioning_state: The current state of the gallery. The - provisioning state, which only appears in the response. Possible values - include: 'Creating', 'Updating', 'Failed', 'Succeeded', 'Deleting', - 'Migrating' - :vartype provisioning_state: str or - ~azure.mgmt.compute.v2019_03_01.models.enum - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - 'provisioning_state': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'description': {'key': 'properties.description', 'type': 'str'}, - 'identifier': {'key': 'properties.identifier', 'type': 'GalleryIdentifier'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - } - - def __init__(self, *, location: str, tags=None, description: str=None, identifier=None, **kwargs) -> None: - super(Gallery, self).__init__(location=location, tags=tags, **kwargs) - self.description = description - self.identifier = identifier - self.provisioning_state = None diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/hardware_profile.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/hardware_profile.py deleted file mode 100644 index 1ffcc5029add..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/hardware_profile.py +++ /dev/null @@ -1,85 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class HardwareProfile(Model): - """Specifies the hardware settings for the virtual machine. - - :param vm_size: Specifies the size of the virtual machine. For more - information about virtual machine sizes, see [Sizes for virtual - machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-sizes?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). -

    The available VM sizes depend on region and availability set. For - a list of available sizes use these APIs:

    [List all available - virtual machine sizes in an availability - set](https://docs.microsoft.com/rest/api/compute/availabilitysets/listavailablesizes) -

    [List all available virtual machine sizes in a - region](https://docs.microsoft.com/rest/api/compute/virtualmachinesizes/list) -

    [List all available virtual machine sizes for - resizing](https://docs.microsoft.com/rest/api/compute/virtualmachines/listavailablesizes). - Possible values include: 'Basic_A0', 'Basic_A1', 'Basic_A2', 'Basic_A3', - 'Basic_A4', 'Standard_A0', 'Standard_A1', 'Standard_A2', 'Standard_A3', - 'Standard_A4', 'Standard_A5', 'Standard_A6', 'Standard_A7', 'Standard_A8', - 'Standard_A9', 'Standard_A10', 'Standard_A11', 'Standard_A1_v2', - 'Standard_A2_v2', 'Standard_A4_v2', 'Standard_A8_v2', 'Standard_A2m_v2', - 'Standard_A4m_v2', 'Standard_A8m_v2', 'Standard_B1s', 'Standard_B1ms', - 'Standard_B2s', 'Standard_B2ms', 'Standard_B4ms', 'Standard_B8ms', - 'Standard_D1', 'Standard_D2', 'Standard_D3', 'Standard_D4', - 'Standard_D11', 'Standard_D12', 'Standard_D13', 'Standard_D14', - 'Standard_D1_v2', 'Standard_D2_v2', 'Standard_D3_v2', 'Standard_D4_v2', - 'Standard_D5_v2', 'Standard_D2_v3', 'Standard_D4_v3', 'Standard_D8_v3', - 'Standard_D16_v3', 'Standard_D32_v3', 'Standard_D64_v3', - 'Standard_D2s_v3', 'Standard_D4s_v3', 'Standard_D8s_v3', - 'Standard_D16s_v3', 'Standard_D32s_v3', 'Standard_D64s_v3', - 'Standard_D11_v2', 'Standard_D12_v2', 'Standard_D13_v2', - 'Standard_D14_v2', 'Standard_D15_v2', 'Standard_DS1', 'Standard_DS2', - 'Standard_DS3', 'Standard_DS4', 'Standard_DS11', 'Standard_DS12', - 'Standard_DS13', 'Standard_DS14', 'Standard_DS1_v2', 'Standard_DS2_v2', - 'Standard_DS3_v2', 'Standard_DS4_v2', 'Standard_DS5_v2', - 'Standard_DS11_v2', 'Standard_DS12_v2', 'Standard_DS13_v2', - 'Standard_DS14_v2', 'Standard_DS15_v2', 'Standard_DS13-4_v2', - 'Standard_DS13-2_v2', 'Standard_DS14-8_v2', 'Standard_DS14-4_v2', - 'Standard_E2_v3', 'Standard_E4_v3', 'Standard_E8_v3', 'Standard_E16_v3', - 'Standard_E32_v3', 'Standard_E64_v3', 'Standard_E2s_v3', - 'Standard_E4s_v3', 'Standard_E8s_v3', 'Standard_E16s_v3', - 'Standard_E32s_v3', 'Standard_E64s_v3', 'Standard_E32-16_v3', - 'Standard_E32-8s_v3', 'Standard_E64-32s_v3', 'Standard_E64-16s_v3', - 'Standard_F1', 'Standard_F2', 'Standard_F4', 'Standard_F8', - 'Standard_F16', 'Standard_F1s', 'Standard_F2s', 'Standard_F4s', - 'Standard_F8s', 'Standard_F16s', 'Standard_F2s_v2', 'Standard_F4s_v2', - 'Standard_F8s_v2', 'Standard_F16s_v2', 'Standard_F32s_v2', - 'Standard_F64s_v2', 'Standard_F72s_v2', 'Standard_G1', 'Standard_G2', - 'Standard_G3', 'Standard_G4', 'Standard_G5', 'Standard_GS1', - 'Standard_GS2', 'Standard_GS3', 'Standard_GS4', 'Standard_GS5', - 'Standard_GS4-8', 'Standard_GS4-4', 'Standard_GS5-16', 'Standard_GS5-8', - 'Standard_H8', 'Standard_H16', 'Standard_H8m', 'Standard_H16m', - 'Standard_H16r', 'Standard_H16mr', 'Standard_L4s', 'Standard_L8s', - 'Standard_L16s', 'Standard_L32s', 'Standard_M64s', 'Standard_M64ms', - 'Standard_M128s', 'Standard_M128ms', 'Standard_M64-32ms', - 'Standard_M64-16ms', 'Standard_M128-64ms', 'Standard_M128-32ms', - 'Standard_NC6', 'Standard_NC12', 'Standard_NC24', 'Standard_NC24r', - 'Standard_NC6s_v2', 'Standard_NC12s_v2', 'Standard_NC24s_v2', - 'Standard_NC24rs_v2', 'Standard_NC6s_v3', 'Standard_NC12s_v3', - 'Standard_NC24s_v3', 'Standard_NC24rs_v3', 'Standard_ND6s', - 'Standard_ND12s', 'Standard_ND24s', 'Standard_ND24rs', 'Standard_NV6', - 'Standard_NV12', 'Standard_NV24' - :type vm_size: str or - ~azure.mgmt.compute.v2019_03_01.models.VirtualMachineSizeTypes - """ - - _attribute_map = { - 'vm_size': {'key': 'vmSize', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(HardwareProfile, self).__init__(**kwargs) - self.vm_size = kwargs.get('vm_size', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/hardware_profile_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/hardware_profile_py3.py deleted file mode 100644 index 7a66436a25d2..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/hardware_profile_py3.py +++ /dev/null @@ -1,85 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class HardwareProfile(Model): - """Specifies the hardware settings for the virtual machine. - - :param vm_size: Specifies the size of the virtual machine. For more - information about virtual machine sizes, see [Sizes for virtual - machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-sizes?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). -

    The available VM sizes depend on region and availability set. For - a list of available sizes use these APIs:

    [List all available - virtual machine sizes in an availability - set](https://docs.microsoft.com/rest/api/compute/availabilitysets/listavailablesizes) -

    [List all available virtual machine sizes in a - region](https://docs.microsoft.com/rest/api/compute/virtualmachinesizes/list) -

    [List all available virtual machine sizes for - resizing](https://docs.microsoft.com/rest/api/compute/virtualmachines/listavailablesizes). - Possible values include: 'Basic_A0', 'Basic_A1', 'Basic_A2', 'Basic_A3', - 'Basic_A4', 'Standard_A0', 'Standard_A1', 'Standard_A2', 'Standard_A3', - 'Standard_A4', 'Standard_A5', 'Standard_A6', 'Standard_A7', 'Standard_A8', - 'Standard_A9', 'Standard_A10', 'Standard_A11', 'Standard_A1_v2', - 'Standard_A2_v2', 'Standard_A4_v2', 'Standard_A8_v2', 'Standard_A2m_v2', - 'Standard_A4m_v2', 'Standard_A8m_v2', 'Standard_B1s', 'Standard_B1ms', - 'Standard_B2s', 'Standard_B2ms', 'Standard_B4ms', 'Standard_B8ms', - 'Standard_D1', 'Standard_D2', 'Standard_D3', 'Standard_D4', - 'Standard_D11', 'Standard_D12', 'Standard_D13', 'Standard_D14', - 'Standard_D1_v2', 'Standard_D2_v2', 'Standard_D3_v2', 'Standard_D4_v2', - 'Standard_D5_v2', 'Standard_D2_v3', 'Standard_D4_v3', 'Standard_D8_v3', - 'Standard_D16_v3', 'Standard_D32_v3', 'Standard_D64_v3', - 'Standard_D2s_v3', 'Standard_D4s_v3', 'Standard_D8s_v3', - 'Standard_D16s_v3', 'Standard_D32s_v3', 'Standard_D64s_v3', - 'Standard_D11_v2', 'Standard_D12_v2', 'Standard_D13_v2', - 'Standard_D14_v2', 'Standard_D15_v2', 'Standard_DS1', 'Standard_DS2', - 'Standard_DS3', 'Standard_DS4', 'Standard_DS11', 'Standard_DS12', - 'Standard_DS13', 'Standard_DS14', 'Standard_DS1_v2', 'Standard_DS2_v2', - 'Standard_DS3_v2', 'Standard_DS4_v2', 'Standard_DS5_v2', - 'Standard_DS11_v2', 'Standard_DS12_v2', 'Standard_DS13_v2', - 'Standard_DS14_v2', 'Standard_DS15_v2', 'Standard_DS13-4_v2', - 'Standard_DS13-2_v2', 'Standard_DS14-8_v2', 'Standard_DS14-4_v2', - 'Standard_E2_v3', 'Standard_E4_v3', 'Standard_E8_v3', 'Standard_E16_v3', - 'Standard_E32_v3', 'Standard_E64_v3', 'Standard_E2s_v3', - 'Standard_E4s_v3', 'Standard_E8s_v3', 'Standard_E16s_v3', - 'Standard_E32s_v3', 'Standard_E64s_v3', 'Standard_E32-16_v3', - 'Standard_E32-8s_v3', 'Standard_E64-32s_v3', 'Standard_E64-16s_v3', - 'Standard_F1', 'Standard_F2', 'Standard_F4', 'Standard_F8', - 'Standard_F16', 'Standard_F1s', 'Standard_F2s', 'Standard_F4s', - 'Standard_F8s', 'Standard_F16s', 'Standard_F2s_v2', 'Standard_F4s_v2', - 'Standard_F8s_v2', 'Standard_F16s_v2', 'Standard_F32s_v2', - 'Standard_F64s_v2', 'Standard_F72s_v2', 'Standard_G1', 'Standard_G2', - 'Standard_G3', 'Standard_G4', 'Standard_G5', 'Standard_GS1', - 'Standard_GS2', 'Standard_GS3', 'Standard_GS4', 'Standard_GS5', - 'Standard_GS4-8', 'Standard_GS4-4', 'Standard_GS5-16', 'Standard_GS5-8', - 'Standard_H8', 'Standard_H16', 'Standard_H8m', 'Standard_H16m', - 'Standard_H16r', 'Standard_H16mr', 'Standard_L4s', 'Standard_L8s', - 'Standard_L16s', 'Standard_L32s', 'Standard_M64s', 'Standard_M64ms', - 'Standard_M128s', 'Standard_M128ms', 'Standard_M64-32ms', - 'Standard_M64-16ms', 'Standard_M128-64ms', 'Standard_M128-32ms', - 'Standard_NC6', 'Standard_NC12', 'Standard_NC24', 'Standard_NC24r', - 'Standard_NC6s_v2', 'Standard_NC12s_v2', 'Standard_NC24s_v2', - 'Standard_NC24rs_v2', 'Standard_NC6s_v3', 'Standard_NC12s_v3', - 'Standard_NC24s_v3', 'Standard_NC24rs_v3', 'Standard_ND6s', - 'Standard_ND12s', 'Standard_ND24s', 'Standard_ND24rs', 'Standard_NV6', - 'Standard_NV12', 'Standard_NV24' - :type vm_size: str or - ~azure.mgmt.compute.v2019_03_01.models.VirtualMachineSizeTypes - """ - - _attribute_map = { - 'vm_size': {'key': 'vmSize', 'type': 'str'}, - } - - def __init__(self, *, vm_size=None, **kwargs) -> None: - super(HardwareProfile, self).__init__(**kwargs) - self.vm_size = vm_size diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/image.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/image.py deleted file mode 100644 index e1caa1be07f3..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/image.py +++ /dev/null @@ -1,76 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource import Resource - - -class Image(Resource): - """The source user image virtual hard disk. The virtual hard disk will be - copied before being attached to the virtual machine. If SourceImage is - provided, the destination virtual hard drive must not exist. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource Id - :vartype id: str - :ivar name: Resource name - :vartype name: str - :ivar type: Resource type - :vartype type: str - :param location: Required. Resource location - :type location: str - :param tags: Resource tags - :type tags: dict[str, str] - :param source_virtual_machine: The source virtual machine from which Image - is created. - :type source_virtual_machine: - ~azure.mgmt.compute.v2019_03_01.models.SubResource - :param storage_profile: Specifies the storage settings for the virtual - machine disks. - :type storage_profile: - ~azure.mgmt.compute.v2019_03_01.models.ImageStorageProfile - :ivar provisioning_state: The provisioning state. - :vartype provisioning_state: str - :param hyper_vgeneration: Gets the HyperVGenerationType of the - VirtualMachine created from the image. Possible values include: 'V1', 'V2' - :type hyper_vgeneration: str or - ~azure.mgmt.compute.v2019_03_01.models.HyperVGenerationTypes - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - 'provisioning_state': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'source_virtual_machine': {'key': 'properties.sourceVirtualMachine', 'type': 'SubResource'}, - 'storage_profile': {'key': 'properties.storageProfile', 'type': 'ImageStorageProfile'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'hyper_vgeneration': {'key': 'properties.hyperVGeneration', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(Image, self).__init__(**kwargs) - self.source_virtual_machine = kwargs.get('source_virtual_machine', None) - self.storage_profile = kwargs.get('storage_profile', None) - self.provisioning_state = None - self.hyper_vgeneration = kwargs.get('hyper_vgeneration', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/image_data_disk.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/image_data_disk.py deleted file mode 100644 index c8085e5cc360..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/image_data_disk.py +++ /dev/null @@ -1,69 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ImageDataDisk(Model): - """Describes a data disk. - - All required parameters must be populated in order to send to Azure. - - :param lun: Required. Specifies the logical unit number of the data disk. - This value is used to identify data disks within the VM and therefore must - be unique for each data disk attached to a VM. - :type lun: int - :param snapshot: The snapshot. - :type snapshot: ~azure.mgmt.compute.v2019_03_01.models.SubResource - :param managed_disk: The managedDisk. - :type managed_disk: ~azure.mgmt.compute.v2019_03_01.models.SubResource - :param blob_uri: The Virtual Hard Disk. - :type blob_uri: str - :param caching: Specifies the caching requirements.

    Possible - values are:

    **None**

    **ReadOnly**

    **ReadWrite** -

    Default: **None for Standard storage. ReadOnly for Premium - storage**. Possible values include: 'None', 'ReadOnly', 'ReadWrite' - :type caching: str or ~azure.mgmt.compute.v2019_03_01.models.CachingTypes - :param disk_size_gb: Specifies the size of empty data disks in gigabytes. - This element can be used to overwrite the name of the disk in a virtual - machine image.

    This value cannot be larger than 1023 GB - :type disk_size_gb: int - :param storage_account_type: Specifies the storage account type for the - managed disk. NOTE: UltraSSD_LRS can only be used with data disks, it - cannot be used with OS Disk. Possible values include: 'Standard_LRS', - 'Premium_LRS', 'StandardSSD_LRS', 'UltraSSD_LRS' - :type storage_account_type: str or - ~azure.mgmt.compute.v2019_03_01.models.StorageAccountTypes - """ - - _validation = { - 'lun': {'required': True}, - } - - _attribute_map = { - 'lun': {'key': 'lun', 'type': 'int'}, - 'snapshot': {'key': 'snapshot', 'type': 'SubResource'}, - 'managed_disk': {'key': 'managedDisk', 'type': 'SubResource'}, - 'blob_uri': {'key': 'blobUri', 'type': 'str'}, - 'caching': {'key': 'caching', 'type': 'CachingTypes'}, - 'disk_size_gb': {'key': 'diskSizeGB', 'type': 'int'}, - 'storage_account_type': {'key': 'storageAccountType', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ImageDataDisk, self).__init__(**kwargs) - self.lun = kwargs.get('lun', None) - self.snapshot = kwargs.get('snapshot', None) - self.managed_disk = kwargs.get('managed_disk', None) - self.blob_uri = kwargs.get('blob_uri', None) - self.caching = kwargs.get('caching', None) - self.disk_size_gb = kwargs.get('disk_size_gb', None) - self.storage_account_type = kwargs.get('storage_account_type', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/image_data_disk_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/image_data_disk_py3.py deleted file mode 100644 index 60e7971adf95..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/image_data_disk_py3.py +++ /dev/null @@ -1,69 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ImageDataDisk(Model): - """Describes a data disk. - - All required parameters must be populated in order to send to Azure. - - :param lun: Required. Specifies the logical unit number of the data disk. - This value is used to identify data disks within the VM and therefore must - be unique for each data disk attached to a VM. - :type lun: int - :param snapshot: The snapshot. - :type snapshot: ~azure.mgmt.compute.v2019_03_01.models.SubResource - :param managed_disk: The managedDisk. - :type managed_disk: ~azure.mgmt.compute.v2019_03_01.models.SubResource - :param blob_uri: The Virtual Hard Disk. - :type blob_uri: str - :param caching: Specifies the caching requirements.

    Possible - values are:

    **None**

    **ReadOnly**

    **ReadWrite** -

    Default: **None for Standard storage. ReadOnly for Premium - storage**. Possible values include: 'None', 'ReadOnly', 'ReadWrite' - :type caching: str or ~azure.mgmt.compute.v2019_03_01.models.CachingTypes - :param disk_size_gb: Specifies the size of empty data disks in gigabytes. - This element can be used to overwrite the name of the disk in a virtual - machine image.

    This value cannot be larger than 1023 GB - :type disk_size_gb: int - :param storage_account_type: Specifies the storage account type for the - managed disk. NOTE: UltraSSD_LRS can only be used with data disks, it - cannot be used with OS Disk. Possible values include: 'Standard_LRS', - 'Premium_LRS', 'StandardSSD_LRS', 'UltraSSD_LRS' - :type storage_account_type: str or - ~azure.mgmt.compute.v2019_03_01.models.StorageAccountTypes - """ - - _validation = { - 'lun': {'required': True}, - } - - _attribute_map = { - 'lun': {'key': 'lun', 'type': 'int'}, - 'snapshot': {'key': 'snapshot', 'type': 'SubResource'}, - 'managed_disk': {'key': 'managedDisk', 'type': 'SubResource'}, - 'blob_uri': {'key': 'blobUri', 'type': 'str'}, - 'caching': {'key': 'caching', 'type': 'CachingTypes'}, - 'disk_size_gb': {'key': 'diskSizeGB', 'type': 'int'}, - 'storage_account_type': {'key': 'storageAccountType', 'type': 'str'}, - } - - def __init__(self, *, lun: int, snapshot=None, managed_disk=None, blob_uri: str=None, caching=None, disk_size_gb: int=None, storage_account_type=None, **kwargs) -> None: - super(ImageDataDisk, self).__init__(**kwargs) - self.lun = lun - self.snapshot = snapshot - self.managed_disk = managed_disk - self.blob_uri = blob_uri - self.caching = caching - self.disk_size_gb = disk_size_gb - self.storage_account_type = storage_account_type diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/image_os_disk.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/image_os_disk.py deleted file mode 100644 index b445e07bbfc4..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/image_os_disk.py +++ /dev/null @@ -1,77 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ImageOSDisk(Model): - """Describes an Operating System disk. - - All required parameters must be populated in order to send to Azure. - - :param os_type: Required. This property allows you to specify the type of - the OS that is included in the disk if creating a VM from a custom image. -

    Possible values are:

    **Windows**

    **Linux**. - Possible values include: 'Windows', 'Linux' - :type os_type: str or - ~azure.mgmt.compute.v2019_03_01.models.OperatingSystemTypes - :param os_state: Required. The OS State. Possible values include: - 'Generalized', 'Specialized' - :type os_state: str or - ~azure.mgmt.compute.v2019_03_01.models.OperatingSystemStateTypes - :param snapshot: The snapshot. - :type snapshot: ~azure.mgmt.compute.v2019_03_01.models.SubResource - :param managed_disk: The managedDisk. - :type managed_disk: ~azure.mgmt.compute.v2019_03_01.models.SubResource - :param blob_uri: The Virtual Hard Disk. - :type blob_uri: str - :param caching: Specifies the caching requirements.

    Possible - values are:

    **None**

    **ReadOnly**

    **ReadWrite** -

    Default: **None for Standard storage. ReadOnly for Premium - storage**. Possible values include: 'None', 'ReadOnly', 'ReadWrite' - :type caching: str or ~azure.mgmt.compute.v2019_03_01.models.CachingTypes - :param disk_size_gb: Specifies the size of empty data disks in gigabytes. - This element can be used to overwrite the name of the disk in a virtual - machine image.

    This value cannot be larger than 1023 GB - :type disk_size_gb: int - :param storage_account_type: Specifies the storage account type for the - managed disk. UltraSSD_LRS cannot be used with OS Disk. Possible values - include: 'Standard_LRS', 'Premium_LRS', 'StandardSSD_LRS', 'UltraSSD_LRS' - :type storage_account_type: str or - ~azure.mgmt.compute.v2019_03_01.models.StorageAccountTypes - """ - - _validation = { - 'os_type': {'required': True}, - 'os_state': {'required': True}, - } - - _attribute_map = { - 'os_type': {'key': 'osType', 'type': 'OperatingSystemTypes'}, - 'os_state': {'key': 'osState', 'type': 'OperatingSystemStateTypes'}, - 'snapshot': {'key': 'snapshot', 'type': 'SubResource'}, - 'managed_disk': {'key': 'managedDisk', 'type': 'SubResource'}, - 'blob_uri': {'key': 'blobUri', 'type': 'str'}, - 'caching': {'key': 'caching', 'type': 'CachingTypes'}, - 'disk_size_gb': {'key': 'diskSizeGB', 'type': 'int'}, - 'storage_account_type': {'key': 'storageAccountType', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ImageOSDisk, self).__init__(**kwargs) - self.os_type = kwargs.get('os_type', None) - self.os_state = kwargs.get('os_state', None) - self.snapshot = kwargs.get('snapshot', None) - self.managed_disk = kwargs.get('managed_disk', None) - self.blob_uri = kwargs.get('blob_uri', None) - self.caching = kwargs.get('caching', None) - self.disk_size_gb = kwargs.get('disk_size_gb', None) - self.storage_account_type = kwargs.get('storage_account_type', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/image_os_disk_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/image_os_disk_py3.py deleted file mode 100644 index f531c97d80f4..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/image_os_disk_py3.py +++ /dev/null @@ -1,77 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ImageOSDisk(Model): - """Describes an Operating System disk. - - All required parameters must be populated in order to send to Azure. - - :param os_type: Required. This property allows you to specify the type of - the OS that is included in the disk if creating a VM from a custom image. -

    Possible values are:

    **Windows**

    **Linux**. - Possible values include: 'Windows', 'Linux' - :type os_type: str or - ~azure.mgmt.compute.v2019_03_01.models.OperatingSystemTypes - :param os_state: Required. The OS State. Possible values include: - 'Generalized', 'Specialized' - :type os_state: str or - ~azure.mgmt.compute.v2019_03_01.models.OperatingSystemStateTypes - :param snapshot: The snapshot. - :type snapshot: ~azure.mgmt.compute.v2019_03_01.models.SubResource - :param managed_disk: The managedDisk. - :type managed_disk: ~azure.mgmt.compute.v2019_03_01.models.SubResource - :param blob_uri: The Virtual Hard Disk. - :type blob_uri: str - :param caching: Specifies the caching requirements.

    Possible - values are:

    **None**

    **ReadOnly**

    **ReadWrite** -

    Default: **None for Standard storage. ReadOnly for Premium - storage**. Possible values include: 'None', 'ReadOnly', 'ReadWrite' - :type caching: str or ~azure.mgmt.compute.v2019_03_01.models.CachingTypes - :param disk_size_gb: Specifies the size of empty data disks in gigabytes. - This element can be used to overwrite the name of the disk in a virtual - machine image.

    This value cannot be larger than 1023 GB - :type disk_size_gb: int - :param storage_account_type: Specifies the storage account type for the - managed disk. UltraSSD_LRS cannot be used with OS Disk. Possible values - include: 'Standard_LRS', 'Premium_LRS', 'StandardSSD_LRS', 'UltraSSD_LRS' - :type storage_account_type: str or - ~azure.mgmt.compute.v2019_03_01.models.StorageAccountTypes - """ - - _validation = { - 'os_type': {'required': True}, - 'os_state': {'required': True}, - } - - _attribute_map = { - 'os_type': {'key': 'osType', 'type': 'OperatingSystemTypes'}, - 'os_state': {'key': 'osState', 'type': 'OperatingSystemStateTypes'}, - 'snapshot': {'key': 'snapshot', 'type': 'SubResource'}, - 'managed_disk': {'key': 'managedDisk', 'type': 'SubResource'}, - 'blob_uri': {'key': 'blobUri', 'type': 'str'}, - 'caching': {'key': 'caching', 'type': 'CachingTypes'}, - 'disk_size_gb': {'key': 'diskSizeGB', 'type': 'int'}, - 'storage_account_type': {'key': 'storageAccountType', 'type': 'str'}, - } - - def __init__(self, *, os_type, os_state, snapshot=None, managed_disk=None, blob_uri: str=None, caching=None, disk_size_gb: int=None, storage_account_type=None, **kwargs) -> None: - super(ImageOSDisk, self).__init__(**kwargs) - self.os_type = os_type - self.os_state = os_state - self.snapshot = snapshot - self.managed_disk = managed_disk - self.blob_uri = blob_uri - self.caching = caching - self.disk_size_gb = disk_size_gb - self.storage_account_type = storage_account_type diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/image_paged.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/image_paged.py deleted file mode 100644 index cd580b51bb8e..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/image_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class ImagePaged(Paged): - """ - A paging container for iterating over a list of :class:`Image ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[Image]'} - } - - def __init__(self, *args, **kwargs): - - super(ImagePaged, self).__init__(*args, **kwargs) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/image_purchase_plan.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/image_purchase_plan.py deleted file mode 100644 index 5e0f4cbfe7ac..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/image_purchase_plan.py +++ /dev/null @@ -1,37 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ImagePurchasePlan(Model): - """Describes the gallery Image Definition purchase plan. This is used by - marketplace images. - - :param name: The plan ID. - :type name: str - :param publisher: The publisher ID. - :type publisher: str - :param product: The product ID. - :type product: str - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'publisher': {'key': 'publisher', 'type': 'str'}, - 'product': {'key': 'product', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ImagePurchasePlan, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.publisher = kwargs.get('publisher', None) - self.product = kwargs.get('product', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/image_purchase_plan_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/image_purchase_plan_py3.py deleted file mode 100644 index 7f9596924d7d..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/image_purchase_plan_py3.py +++ /dev/null @@ -1,37 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ImagePurchasePlan(Model): - """Describes the gallery Image Definition purchase plan. This is used by - marketplace images. - - :param name: The plan ID. - :type name: str - :param publisher: The publisher ID. - :type publisher: str - :param product: The product ID. - :type product: str - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'publisher': {'key': 'publisher', 'type': 'str'}, - 'product': {'key': 'product', 'type': 'str'}, - } - - def __init__(self, *, name: str=None, publisher: str=None, product: str=None, **kwargs) -> None: - super(ImagePurchasePlan, self).__init__(**kwargs) - self.name = name - self.publisher = publisher - self.product = product diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/image_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/image_py3.py deleted file mode 100644 index 565a3d46de64..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/image_py3.py +++ /dev/null @@ -1,76 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource_py3 import Resource - - -class Image(Resource): - """The source user image virtual hard disk. The virtual hard disk will be - copied before being attached to the virtual machine. If SourceImage is - provided, the destination virtual hard drive must not exist. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource Id - :vartype id: str - :ivar name: Resource name - :vartype name: str - :ivar type: Resource type - :vartype type: str - :param location: Required. Resource location - :type location: str - :param tags: Resource tags - :type tags: dict[str, str] - :param source_virtual_machine: The source virtual machine from which Image - is created. - :type source_virtual_machine: - ~azure.mgmt.compute.v2019_03_01.models.SubResource - :param storage_profile: Specifies the storage settings for the virtual - machine disks. - :type storage_profile: - ~azure.mgmt.compute.v2019_03_01.models.ImageStorageProfile - :ivar provisioning_state: The provisioning state. - :vartype provisioning_state: str - :param hyper_vgeneration: Gets the HyperVGenerationType of the - VirtualMachine created from the image. Possible values include: 'V1', 'V2' - :type hyper_vgeneration: str or - ~azure.mgmt.compute.v2019_03_01.models.HyperVGenerationTypes - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - 'provisioning_state': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'source_virtual_machine': {'key': 'properties.sourceVirtualMachine', 'type': 'SubResource'}, - 'storage_profile': {'key': 'properties.storageProfile', 'type': 'ImageStorageProfile'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'hyper_vgeneration': {'key': 'properties.hyperVGeneration', 'type': 'str'}, - } - - def __init__(self, *, location: str, tags=None, source_virtual_machine=None, storage_profile=None, hyper_vgeneration=None, **kwargs) -> None: - super(Image, self).__init__(location=location, tags=tags, **kwargs) - self.source_virtual_machine = source_virtual_machine - self.storage_profile = storage_profile - self.provisioning_state = None - self.hyper_vgeneration = hyper_vgeneration diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/image_reference.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/image_reference.py deleted file mode 100644 index b8f929f4ad70..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/image_reference.py +++ /dev/null @@ -1,54 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .sub_resource import SubResource - - -class ImageReference(SubResource): - """Specifies information about the image to use. You can specify information - about platform images, marketplace images, or virtual machine images. This - element is required when you want to use a platform image, marketplace - image, or virtual machine image, but is not used in other creation - operations. - - :param id: Resource Id - :type id: str - :param publisher: The image publisher. - :type publisher: str - :param offer: Specifies the offer of the platform image or marketplace - image used to create the virtual machine. - :type offer: str - :param sku: The image SKU. - :type sku: str - :param version: Specifies the version of the platform image or marketplace - image used to create the virtual machine. The allowed formats are - Major.Minor.Build or 'latest'. Major, Minor, and Build are decimal - numbers. Specify 'latest' to use the latest version of an image available - at deploy time. Even if you use 'latest', the VM image will not - automatically update after deploy time even if a new version becomes - available. - :type version: str - """ - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'publisher': {'key': 'publisher', 'type': 'str'}, - 'offer': {'key': 'offer', 'type': 'str'}, - 'sku': {'key': 'sku', 'type': 'str'}, - 'version': {'key': 'version', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ImageReference, self).__init__(**kwargs) - self.publisher = kwargs.get('publisher', None) - self.offer = kwargs.get('offer', None) - self.sku = kwargs.get('sku', None) - self.version = kwargs.get('version', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/image_reference_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/image_reference_py3.py deleted file mode 100644 index 1d7eefe5ac65..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/image_reference_py3.py +++ /dev/null @@ -1,54 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .sub_resource_py3 import SubResource - - -class ImageReference(SubResource): - """Specifies information about the image to use. You can specify information - about platform images, marketplace images, or virtual machine images. This - element is required when you want to use a platform image, marketplace - image, or virtual machine image, but is not used in other creation - operations. - - :param id: Resource Id - :type id: str - :param publisher: The image publisher. - :type publisher: str - :param offer: Specifies the offer of the platform image or marketplace - image used to create the virtual machine. - :type offer: str - :param sku: The image SKU. - :type sku: str - :param version: Specifies the version of the platform image or marketplace - image used to create the virtual machine. The allowed formats are - Major.Minor.Build or 'latest'. Major, Minor, and Build are decimal - numbers. Specify 'latest' to use the latest version of an image available - at deploy time. Even if you use 'latest', the VM image will not - automatically update after deploy time even if a new version becomes - available. - :type version: str - """ - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'publisher': {'key': 'publisher', 'type': 'str'}, - 'offer': {'key': 'offer', 'type': 'str'}, - 'sku': {'key': 'sku', 'type': 'str'}, - 'version': {'key': 'version', 'type': 'str'}, - } - - def __init__(self, *, id: str=None, publisher: str=None, offer: str=None, sku: str=None, version: str=None, **kwargs) -> None: - super(ImageReference, self).__init__(id=id, **kwargs) - self.publisher = publisher - self.offer = offer - self.sku = sku - self.version = version diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/image_storage_profile.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/image_storage_profile.py deleted file mode 100644 index 8241f260d2a8..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/image_storage_profile.py +++ /dev/null @@ -1,45 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ImageStorageProfile(Model): - """Describes a storage profile. - - :param os_disk: Specifies information about the operating system disk used - by the virtual machine.

    For more information about disks, see - [About disks and VHDs for Azure virtual - machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-about-disks-vhds?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). - :type os_disk: ~azure.mgmt.compute.v2019_03_01.models.ImageOSDisk - :param data_disks: Specifies the parameters that are used to add a data - disk to a virtual machine.

    For more information about disks, see - [About disks and VHDs for Azure virtual - machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-about-disks-vhds?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). - :type data_disks: - list[~azure.mgmt.compute.v2019_03_01.models.ImageDataDisk] - :param zone_resilient: Specifies whether an image is zone resilient or - not. Default is false. Zone resilient images can be created only in - regions that provide Zone Redundant Storage (ZRS). - :type zone_resilient: bool - """ - - _attribute_map = { - 'os_disk': {'key': 'osDisk', 'type': 'ImageOSDisk'}, - 'data_disks': {'key': 'dataDisks', 'type': '[ImageDataDisk]'}, - 'zone_resilient': {'key': 'zoneResilient', 'type': 'bool'}, - } - - def __init__(self, **kwargs): - super(ImageStorageProfile, self).__init__(**kwargs) - self.os_disk = kwargs.get('os_disk', None) - self.data_disks = kwargs.get('data_disks', None) - self.zone_resilient = kwargs.get('zone_resilient', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/image_storage_profile_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/image_storage_profile_py3.py deleted file mode 100644 index 6ca4b0fd528c..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/image_storage_profile_py3.py +++ /dev/null @@ -1,45 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ImageStorageProfile(Model): - """Describes a storage profile. - - :param os_disk: Specifies information about the operating system disk used - by the virtual machine.

    For more information about disks, see - [About disks and VHDs for Azure virtual - machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-about-disks-vhds?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). - :type os_disk: ~azure.mgmt.compute.v2019_03_01.models.ImageOSDisk - :param data_disks: Specifies the parameters that are used to add a data - disk to a virtual machine.

    For more information about disks, see - [About disks and VHDs for Azure virtual - machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-about-disks-vhds?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). - :type data_disks: - list[~azure.mgmt.compute.v2019_03_01.models.ImageDataDisk] - :param zone_resilient: Specifies whether an image is zone resilient or - not. Default is false. Zone resilient images can be created only in - regions that provide Zone Redundant Storage (ZRS). - :type zone_resilient: bool - """ - - _attribute_map = { - 'os_disk': {'key': 'osDisk', 'type': 'ImageOSDisk'}, - 'data_disks': {'key': 'dataDisks', 'type': '[ImageDataDisk]'}, - 'zone_resilient': {'key': 'zoneResilient', 'type': 'bool'}, - } - - def __init__(self, *, os_disk=None, data_disks=None, zone_resilient: bool=None, **kwargs) -> None: - super(ImageStorageProfile, self).__init__(**kwargs) - self.os_disk = os_disk - self.data_disks = data_disks - self.zone_resilient = zone_resilient diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/image_update.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/image_update.py deleted file mode 100644 index 9d2a9047f962..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/image_update.py +++ /dev/null @@ -1,56 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .update_resource import UpdateResource - - -class ImageUpdate(UpdateResource): - """The source user image virtual hard disk. Only tags may be updated. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :param tags: Resource tags - :type tags: dict[str, str] - :param source_virtual_machine: The source virtual machine from which Image - is created. - :type source_virtual_machine: - ~azure.mgmt.compute.v2019_03_01.models.SubResource - :param storage_profile: Specifies the storage settings for the virtual - machine disks. - :type storage_profile: - ~azure.mgmt.compute.v2019_03_01.models.ImageStorageProfile - :ivar provisioning_state: The provisioning state. - :vartype provisioning_state: str - :param hyper_vgeneration: Gets the HyperVGenerationType of the - VirtualMachine created from the image. Possible values include: 'V1', 'V2' - :type hyper_vgeneration: str or - ~azure.mgmt.compute.v2019_03_01.models.HyperVGenerationTypes - """ - - _validation = { - 'provisioning_state': {'readonly': True}, - } - - _attribute_map = { - 'tags': {'key': 'tags', 'type': '{str}'}, - 'source_virtual_machine': {'key': 'properties.sourceVirtualMachine', 'type': 'SubResource'}, - 'storage_profile': {'key': 'properties.storageProfile', 'type': 'ImageStorageProfile'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'hyper_vgeneration': {'key': 'properties.hyperVGeneration', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ImageUpdate, self).__init__(**kwargs) - self.source_virtual_machine = kwargs.get('source_virtual_machine', None) - self.storage_profile = kwargs.get('storage_profile', None) - self.provisioning_state = None - self.hyper_vgeneration = kwargs.get('hyper_vgeneration', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/image_update_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/image_update_py3.py deleted file mode 100644 index fedac7c13c1e..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/image_update_py3.py +++ /dev/null @@ -1,56 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .update_resource_py3 import UpdateResource - - -class ImageUpdate(UpdateResource): - """The source user image virtual hard disk. Only tags may be updated. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :param tags: Resource tags - :type tags: dict[str, str] - :param source_virtual_machine: The source virtual machine from which Image - is created. - :type source_virtual_machine: - ~azure.mgmt.compute.v2019_03_01.models.SubResource - :param storage_profile: Specifies the storage settings for the virtual - machine disks. - :type storage_profile: - ~azure.mgmt.compute.v2019_03_01.models.ImageStorageProfile - :ivar provisioning_state: The provisioning state. - :vartype provisioning_state: str - :param hyper_vgeneration: Gets the HyperVGenerationType of the - VirtualMachine created from the image. Possible values include: 'V1', 'V2' - :type hyper_vgeneration: str or - ~azure.mgmt.compute.v2019_03_01.models.HyperVGenerationTypes - """ - - _validation = { - 'provisioning_state': {'readonly': True}, - } - - _attribute_map = { - 'tags': {'key': 'tags', 'type': '{str}'}, - 'source_virtual_machine': {'key': 'properties.sourceVirtualMachine', 'type': 'SubResource'}, - 'storage_profile': {'key': 'properties.storageProfile', 'type': 'ImageStorageProfile'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'hyper_vgeneration': {'key': 'properties.hyperVGeneration', 'type': 'str'}, - } - - def __init__(self, *, tags=None, source_virtual_machine=None, storage_profile=None, hyper_vgeneration=None, **kwargs) -> None: - super(ImageUpdate, self).__init__(tags=tags, **kwargs) - self.source_virtual_machine = source_virtual_machine - self.storage_profile = storage_profile - self.provisioning_state = None - self.hyper_vgeneration = hyper_vgeneration diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/inner_error.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/inner_error.py deleted file mode 100644 index 6324249d7c19..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/inner_error.py +++ /dev/null @@ -1,32 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class InnerError(Model): - """Inner error details. - - :param exceptiontype: The exception type. - :type exceptiontype: str - :param errordetail: The internal error message or exception dump. - :type errordetail: str - """ - - _attribute_map = { - 'exceptiontype': {'key': 'exceptiontype', 'type': 'str'}, - 'errordetail': {'key': 'errordetail', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(InnerError, self).__init__(**kwargs) - self.exceptiontype = kwargs.get('exceptiontype', None) - self.errordetail = kwargs.get('errordetail', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/inner_error_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/inner_error_py3.py deleted file mode 100644 index ccec30d7b53f..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/inner_error_py3.py +++ /dev/null @@ -1,32 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class InnerError(Model): - """Inner error details. - - :param exceptiontype: The exception type. - :type exceptiontype: str - :param errordetail: The internal error message or exception dump. - :type errordetail: str - """ - - _attribute_map = { - 'exceptiontype': {'key': 'exceptiontype', 'type': 'str'}, - 'errordetail': {'key': 'errordetail', 'type': 'str'}, - } - - def __init__(self, *, exceptiontype: str=None, errordetail: str=None, **kwargs) -> None: - super(InnerError, self).__init__(**kwargs) - self.exceptiontype = exceptiontype - self.errordetail = errordetail diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/instance_view_status.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/instance_view_status.py deleted file mode 100644 index f1c9cafc8622..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/instance_view_status.py +++ /dev/null @@ -1,47 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class InstanceViewStatus(Model): - """Instance view status. - - :param code: The status code. - :type code: str - :param level: The level code. Possible values include: 'Info', 'Warning', - 'Error' - :type level: str or - ~azure.mgmt.compute.v2019_03_01.models.StatusLevelTypes - :param display_status: The short localizable label for the status. - :type display_status: str - :param message: The detailed status message, including for alerts and - error messages. - :type message: str - :param time: The time of the status. - :type time: datetime - """ - - _attribute_map = { - 'code': {'key': 'code', 'type': 'str'}, - 'level': {'key': 'level', 'type': 'StatusLevelTypes'}, - 'display_status': {'key': 'displayStatus', 'type': 'str'}, - 'message': {'key': 'message', 'type': 'str'}, - 'time': {'key': 'time', 'type': 'iso-8601'}, - } - - def __init__(self, **kwargs): - super(InstanceViewStatus, self).__init__(**kwargs) - self.code = kwargs.get('code', None) - self.level = kwargs.get('level', None) - self.display_status = kwargs.get('display_status', None) - self.message = kwargs.get('message', None) - self.time = kwargs.get('time', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/instance_view_status_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/instance_view_status_py3.py deleted file mode 100644 index 8123765f8d54..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/instance_view_status_py3.py +++ /dev/null @@ -1,47 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class InstanceViewStatus(Model): - """Instance view status. - - :param code: The status code. - :type code: str - :param level: The level code. Possible values include: 'Info', 'Warning', - 'Error' - :type level: str or - ~azure.mgmt.compute.v2019_03_01.models.StatusLevelTypes - :param display_status: The short localizable label for the status. - :type display_status: str - :param message: The detailed status message, including for alerts and - error messages. - :type message: str - :param time: The time of the status. - :type time: datetime - """ - - _attribute_map = { - 'code': {'key': 'code', 'type': 'str'}, - 'level': {'key': 'level', 'type': 'StatusLevelTypes'}, - 'display_status': {'key': 'displayStatus', 'type': 'str'}, - 'message': {'key': 'message', 'type': 'str'}, - 'time': {'key': 'time', 'type': 'iso-8601'}, - } - - def __init__(self, *, code: str=None, level=None, display_status: str=None, message: str=None, time=None, **kwargs) -> None: - super(InstanceViewStatus, self).__init__(**kwargs) - self.code = code - self.level = level - self.display_status = display_status - self.message = message - self.time = time diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/key_vault_key_reference.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/key_vault_key_reference.py deleted file mode 100644 index e243fe24ff49..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/key_vault_key_reference.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class KeyVaultKeyReference(Model): - """Describes a reference to Key Vault Key. - - All required parameters must be populated in order to send to Azure. - - :param key_url: Required. The URL referencing a key encryption key in Key - Vault. - :type key_url: str - :param source_vault: Required. The relative URL of the Key Vault - containing the key. - :type source_vault: ~azure.mgmt.compute.v2019_03_01.models.SubResource - """ - - _validation = { - 'key_url': {'required': True}, - 'source_vault': {'required': True}, - } - - _attribute_map = { - 'key_url': {'key': 'keyUrl', 'type': 'str'}, - 'source_vault': {'key': 'sourceVault', 'type': 'SubResource'}, - } - - def __init__(self, **kwargs): - super(KeyVaultKeyReference, self).__init__(**kwargs) - self.key_url = kwargs.get('key_url', None) - self.source_vault = kwargs.get('source_vault', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/key_vault_key_reference_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/key_vault_key_reference_py3.py deleted file mode 100644 index ebf6fe513501..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/key_vault_key_reference_py3.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class KeyVaultKeyReference(Model): - """Describes a reference to Key Vault Key. - - All required parameters must be populated in order to send to Azure. - - :param key_url: Required. The URL referencing a key encryption key in Key - Vault. - :type key_url: str - :param source_vault: Required. The relative URL of the Key Vault - containing the key. - :type source_vault: ~azure.mgmt.compute.v2019_03_01.models.SubResource - """ - - _validation = { - 'key_url': {'required': True}, - 'source_vault': {'required': True}, - } - - _attribute_map = { - 'key_url': {'key': 'keyUrl', 'type': 'str'}, - 'source_vault': {'key': 'sourceVault', 'type': 'SubResource'}, - } - - def __init__(self, *, key_url: str, source_vault, **kwargs) -> None: - super(KeyVaultKeyReference, self).__init__(**kwargs) - self.key_url = key_url - self.source_vault = source_vault diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/key_vault_secret_reference.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/key_vault_secret_reference.py deleted file mode 100644 index a1efc73f55d2..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/key_vault_secret_reference.py +++ /dev/null @@ -1,40 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class KeyVaultSecretReference(Model): - """Describes a reference to Key Vault Secret. - - All required parameters must be populated in order to send to Azure. - - :param secret_url: Required. The URL referencing a secret in a Key Vault. - :type secret_url: str - :param source_vault: Required. The relative URL of the Key Vault - containing the secret. - :type source_vault: ~azure.mgmt.compute.v2019_03_01.models.SubResource - """ - - _validation = { - 'secret_url': {'required': True}, - 'source_vault': {'required': True}, - } - - _attribute_map = { - 'secret_url': {'key': 'secretUrl', 'type': 'str'}, - 'source_vault': {'key': 'sourceVault', 'type': 'SubResource'}, - } - - def __init__(self, **kwargs): - super(KeyVaultSecretReference, self).__init__(**kwargs) - self.secret_url = kwargs.get('secret_url', None) - self.source_vault = kwargs.get('source_vault', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/key_vault_secret_reference_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/key_vault_secret_reference_py3.py deleted file mode 100644 index 0c97e21fc4ad..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/key_vault_secret_reference_py3.py +++ /dev/null @@ -1,40 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class KeyVaultSecretReference(Model): - """Describes a reference to Key Vault Secret. - - All required parameters must be populated in order to send to Azure. - - :param secret_url: Required. The URL referencing a secret in a Key Vault. - :type secret_url: str - :param source_vault: Required. The relative URL of the Key Vault - containing the secret. - :type source_vault: ~azure.mgmt.compute.v2019_03_01.models.SubResource - """ - - _validation = { - 'secret_url': {'required': True}, - 'source_vault': {'required': True}, - } - - _attribute_map = { - 'secret_url': {'key': 'secretUrl', 'type': 'str'}, - 'source_vault': {'key': 'sourceVault', 'type': 'SubResource'}, - } - - def __init__(self, *, secret_url: str, source_vault, **kwargs) -> None: - super(KeyVaultSecretReference, self).__init__(**kwargs) - self.secret_url = secret_url - self.source_vault = source_vault diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/linux_configuration.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/linux_configuration.py deleted file mode 100644 index de218ac6bd37..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/linux_configuration.py +++ /dev/null @@ -1,47 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class LinuxConfiguration(Model): - """Specifies the Linux operating system settings on the virtual machine. -

    For a list of supported Linux distributions, see [Linux on - Azure-Endorsed - Distributions](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-endorsed-distros?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json) -

    For running non-endorsed distributions, see [Information for - Non-Endorsed - Distributions](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-create-upload-generic?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json). - - :param disable_password_authentication: Specifies whether password - authentication should be disabled. - :type disable_password_authentication: bool - :param ssh: Specifies the ssh key configuration for a Linux OS. - :type ssh: ~azure.mgmt.compute.v2019_03_01.models.SshConfiguration - :param provision_vm_agent: Indicates whether virtual machine agent should - be provisioned on the virtual machine.

    When this property is not - specified in the request body, default behavior is to set it to true. - This will ensure that VM Agent is installed on the VM so that extensions - can be added to the VM later. - :type provision_vm_agent: bool - """ - - _attribute_map = { - 'disable_password_authentication': {'key': 'disablePasswordAuthentication', 'type': 'bool'}, - 'ssh': {'key': 'ssh', 'type': 'SshConfiguration'}, - 'provision_vm_agent': {'key': 'provisionVMAgent', 'type': 'bool'}, - } - - def __init__(self, **kwargs): - super(LinuxConfiguration, self).__init__(**kwargs) - self.disable_password_authentication = kwargs.get('disable_password_authentication', None) - self.ssh = kwargs.get('ssh', None) - self.provision_vm_agent = kwargs.get('provision_vm_agent', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/linux_configuration_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/linux_configuration_py3.py deleted file mode 100644 index 39bb8e63793f..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/linux_configuration_py3.py +++ /dev/null @@ -1,47 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class LinuxConfiguration(Model): - """Specifies the Linux operating system settings on the virtual machine. -

    For a list of supported Linux distributions, see [Linux on - Azure-Endorsed - Distributions](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-endorsed-distros?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json) -

    For running non-endorsed distributions, see [Information for - Non-Endorsed - Distributions](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-create-upload-generic?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json). - - :param disable_password_authentication: Specifies whether password - authentication should be disabled. - :type disable_password_authentication: bool - :param ssh: Specifies the ssh key configuration for a Linux OS. - :type ssh: ~azure.mgmt.compute.v2019_03_01.models.SshConfiguration - :param provision_vm_agent: Indicates whether virtual machine agent should - be provisioned on the virtual machine.

    When this property is not - specified in the request body, default behavior is to set it to true. - This will ensure that VM Agent is installed on the VM so that extensions - can be added to the VM later. - :type provision_vm_agent: bool - """ - - _attribute_map = { - 'disable_password_authentication': {'key': 'disablePasswordAuthentication', 'type': 'bool'}, - 'ssh': {'key': 'ssh', 'type': 'SshConfiguration'}, - 'provision_vm_agent': {'key': 'provisionVMAgent', 'type': 'bool'}, - } - - def __init__(self, *, disable_password_authentication: bool=None, ssh=None, provision_vm_agent: bool=None, **kwargs) -> None: - super(LinuxConfiguration, self).__init__(**kwargs) - self.disable_password_authentication = disable_password_authentication - self.ssh = ssh - self.provision_vm_agent = provision_vm_agent diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/log_analytics_input_base.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/log_analytics_input_base.py deleted file mode 100644 index 46bbc4f44411..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/log_analytics_input_base.py +++ /dev/null @@ -1,58 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class LogAnalyticsInputBase(Model): - """Api input base class for LogAnalytics Api. - - All required parameters must be populated in order to send to Azure. - - :param blob_container_sas_uri: Required. SAS Uri of the logging blob - container to which LogAnalytics Api writes output logs to. - :type blob_container_sas_uri: str - :param from_time: Required. From time of the query - :type from_time: datetime - :param to_time: Required. To time of the query - :type to_time: datetime - :param group_by_throttle_policy: Group query result by Throttle Policy - applied. - :type group_by_throttle_policy: bool - :param group_by_operation_name: Group query result by Operation Name. - :type group_by_operation_name: bool - :param group_by_resource_name: Group query result by Resource Name. - :type group_by_resource_name: bool - """ - - _validation = { - 'blob_container_sas_uri': {'required': True}, - 'from_time': {'required': True}, - 'to_time': {'required': True}, - } - - _attribute_map = { - 'blob_container_sas_uri': {'key': 'blobContainerSasUri', 'type': 'str'}, - 'from_time': {'key': 'fromTime', 'type': 'iso-8601'}, - 'to_time': {'key': 'toTime', 'type': 'iso-8601'}, - 'group_by_throttle_policy': {'key': 'groupByThrottlePolicy', 'type': 'bool'}, - 'group_by_operation_name': {'key': 'groupByOperationName', 'type': 'bool'}, - 'group_by_resource_name': {'key': 'groupByResourceName', 'type': 'bool'}, - } - - def __init__(self, **kwargs): - super(LogAnalyticsInputBase, self).__init__(**kwargs) - self.blob_container_sas_uri = kwargs.get('blob_container_sas_uri', None) - self.from_time = kwargs.get('from_time', None) - self.to_time = kwargs.get('to_time', None) - self.group_by_throttle_policy = kwargs.get('group_by_throttle_policy', None) - self.group_by_operation_name = kwargs.get('group_by_operation_name', None) - self.group_by_resource_name = kwargs.get('group_by_resource_name', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/log_analytics_input_base_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/log_analytics_input_base_py3.py deleted file mode 100644 index f713c2cb0629..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/log_analytics_input_base_py3.py +++ /dev/null @@ -1,58 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class LogAnalyticsInputBase(Model): - """Api input base class for LogAnalytics Api. - - All required parameters must be populated in order to send to Azure. - - :param blob_container_sas_uri: Required. SAS Uri of the logging blob - container to which LogAnalytics Api writes output logs to. - :type blob_container_sas_uri: str - :param from_time: Required. From time of the query - :type from_time: datetime - :param to_time: Required. To time of the query - :type to_time: datetime - :param group_by_throttle_policy: Group query result by Throttle Policy - applied. - :type group_by_throttle_policy: bool - :param group_by_operation_name: Group query result by Operation Name. - :type group_by_operation_name: bool - :param group_by_resource_name: Group query result by Resource Name. - :type group_by_resource_name: bool - """ - - _validation = { - 'blob_container_sas_uri': {'required': True}, - 'from_time': {'required': True}, - 'to_time': {'required': True}, - } - - _attribute_map = { - 'blob_container_sas_uri': {'key': 'blobContainerSasUri', 'type': 'str'}, - 'from_time': {'key': 'fromTime', 'type': 'iso-8601'}, - 'to_time': {'key': 'toTime', 'type': 'iso-8601'}, - 'group_by_throttle_policy': {'key': 'groupByThrottlePolicy', 'type': 'bool'}, - 'group_by_operation_name': {'key': 'groupByOperationName', 'type': 'bool'}, - 'group_by_resource_name': {'key': 'groupByResourceName', 'type': 'bool'}, - } - - def __init__(self, *, blob_container_sas_uri: str, from_time, to_time, group_by_throttle_policy: bool=None, group_by_operation_name: bool=None, group_by_resource_name: bool=None, **kwargs) -> None: - super(LogAnalyticsInputBase, self).__init__(**kwargs) - self.blob_container_sas_uri = blob_container_sas_uri - self.from_time = from_time - self.to_time = to_time - self.group_by_throttle_policy = group_by_throttle_policy - self.group_by_operation_name = group_by_operation_name - self.group_by_resource_name = group_by_resource_name diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/log_analytics_operation_result.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/log_analytics_operation_result.py deleted file mode 100644 index 758e12242a85..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/log_analytics_operation_result.py +++ /dev/null @@ -1,36 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class LogAnalyticsOperationResult(Model): - """LogAnalytics operation status response. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar properties: LogAnalyticsOutput - :vartype properties: - ~azure.mgmt.compute.v2019_03_01.models.LogAnalyticsOutput - """ - - _validation = { - 'properties': {'readonly': True}, - } - - _attribute_map = { - 'properties': {'key': 'properties', 'type': 'LogAnalyticsOutput'}, - } - - def __init__(self, **kwargs): - super(LogAnalyticsOperationResult, self).__init__(**kwargs) - self.properties = None diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/log_analytics_operation_result_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/log_analytics_operation_result_py3.py deleted file mode 100644 index 1e869ce790f5..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/log_analytics_operation_result_py3.py +++ /dev/null @@ -1,36 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class LogAnalyticsOperationResult(Model): - """LogAnalytics operation status response. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar properties: LogAnalyticsOutput - :vartype properties: - ~azure.mgmt.compute.v2019_03_01.models.LogAnalyticsOutput - """ - - _validation = { - 'properties': {'readonly': True}, - } - - _attribute_map = { - 'properties': {'key': 'properties', 'type': 'LogAnalyticsOutput'}, - } - - def __init__(self, **kwargs) -> None: - super(LogAnalyticsOperationResult, self).__init__(**kwargs) - self.properties = None diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/log_analytics_output.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/log_analytics_output.py deleted file mode 100644 index 5ea1615011c3..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/log_analytics_output.py +++ /dev/null @@ -1,35 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class LogAnalyticsOutput(Model): - """LogAnalytics output properties. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar output: Output file Uri path to blob container. - :vartype output: str - """ - - _validation = { - 'output': {'readonly': True}, - } - - _attribute_map = { - 'output': {'key': 'output', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(LogAnalyticsOutput, self).__init__(**kwargs) - self.output = None diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/log_analytics_output_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/log_analytics_output_py3.py deleted file mode 100644 index 71a428a8e49a..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/log_analytics_output_py3.py +++ /dev/null @@ -1,35 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class LogAnalyticsOutput(Model): - """LogAnalytics output properties. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar output: Output file Uri path to blob container. - :vartype output: str - """ - - _validation = { - 'output': {'readonly': True}, - } - - _attribute_map = { - 'output': {'key': 'output', 'type': 'str'}, - } - - def __init__(self, **kwargs) -> None: - super(LogAnalyticsOutput, self).__init__(**kwargs) - self.output = None diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/maintenance_redeploy_status.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/maintenance_redeploy_status.py deleted file mode 100644 index 466fe0012da7..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/maintenance_redeploy_status.py +++ /dev/null @@ -1,60 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class MaintenanceRedeployStatus(Model): - """Maintenance Operation Status. - - :param is_customer_initiated_maintenance_allowed: True, if customer is - allowed to perform Maintenance. - :type is_customer_initiated_maintenance_allowed: bool - :param pre_maintenance_window_start_time: Start Time for the Pre - Maintenance Window. - :type pre_maintenance_window_start_time: datetime - :param pre_maintenance_window_end_time: End Time for the Pre Maintenance - Window. - :type pre_maintenance_window_end_time: datetime - :param maintenance_window_start_time: Start Time for the Maintenance - Window. - :type maintenance_window_start_time: datetime - :param maintenance_window_end_time: End Time for the Maintenance Window. - :type maintenance_window_end_time: datetime - :param last_operation_result_code: The Last Maintenance Operation Result - Code. Possible values include: 'None', 'RetryLater', 'MaintenanceAborted', - 'MaintenanceCompleted' - :type last_operation_result_code: str or - ~azure.mgmt.compute.v2019_03_01.models.MaintenanceOperationResultCodeTypes - :param last_operation_message: Message returned for the last Maintenance - Operation. - :type last_operation_message: str - """ - - _attribute_map = { - 'is_customer_initiated_maintenance_allowed': {'key': 'isCustomerInitiatedMaintenanceAllowed', 'type': 'bool'}, - 'pre_maintenance_window_start_time': {'key': 'preMaintenanceWindowStartTime', 'type': 'iso-8601'}, - 'pre_maintenance_window_end_time': {'key': 'preMaintenanceWindowEndTime', 'type': 'iso-8601'}, - 'maintenance_window_start_time': {'key': 'maintenanceWindowStartTime', 'type': 'iso-8601'}, - 'maintenance_window_end_time': {'key': 'maintenanceWindowEndTime', 'type': 'iso-8601'}, - 'last_operation_result_code': {'key': 'lastOperationResultCode', 'type': 'MaintenanceOperationResultCodeTypes'}, - 'last_operation_message': {'key': 'lastOperationMessage', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(MaintenanceRedeployStatus, self).__init__(**kwargs) - self.is_customer_initiated_maintenance_allowed = kwargs.get('is_customer_initiated_maintenance_allowed', None) - self.pre_maintenance_window_start_time = kwargs.get('pre_maintenance_window_start_time', None) - self.pre_maintenance_window_end_time = kwargs.get('pre_maintenance_window_end_time', None) - self.maintenance_window_start_time = kwargs.get('maintenance_window_start_time', None) - self.maintenance_window_end_time = kwargs.get('maintenance_window_end_time', None) - self.last_operation_result_code = kwargs.get('last_operation_result_code', None) - self.last_operation_message = kwargs.get('last_operation_message', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/maintenance_redeploy_status_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/maintenance_redeploy_status_py3.py deleted file mode 100644 index 73f888b5a238..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/maintenance_redeploy_status_py3.py +++ /dev/null @@ -1,60 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class MaintenanceRedeployStatus(Model): - """Maintenance Operation Status. - - :param is_customer_initiated_maintenance_allowed: True, if customer is - allowed to perform Maintenance. - :type is_customer_initiated_maintenance_allowed: bool - :param pre_maintenance_window_start_time: Start Time for the Pre - Maintenance Window. - :type pre_maintenance_window_start_time: datetime - :param pre_maintenance_window_end_time: End Time for the Pre Maintenance - Window. - :type pre_maintenance_window_end_time: datetime - :param maintenance_window_start_time: Start Time for the Maintenance - Window. - :type maintenance_window_start_time: datetime - :param maintenance_window_end_time: End Time for the Maintenance Window. - :type maintenance_window_end_time: datetime - :param last_operation_result_code: The Last Maintenance Operation Result - Code. Possible values include: 'None', 'RetryLater', 'MaintenanceAborted', - 'MaintenanceCompleted' - :type last_operation_result_code: str or - ~azure.mgmt.compute.v2019_03_01.models.MaintenanceOperationResultCodeTypes - :param last_operation_message: Message returned for the last Maintenance - Operation. - :type last_operation_message: str - """ - - _attribute_map = { - 'is_customer_initiated_maintenance_allowed': {'key': 'isCustomerInitiatedMaintenanceAllowed', 'type': 'bool'}, - 'pre_maintenance_window_start_time': {'key': 'preMaintenanceWindowStartTime', 'type': 'iso-8601'}, - 'pre_maintenance_window_end_time': {'key': 'preMaintenanceWindowEndTime', 'type': 'iso-8601'}, - 'maintenance_window_start_time': {'key': 'maintenanceWindowStartTime', 'type': 'iso-8601'}, - 'maintenance_window_end_time': {'key': 'maintenanceWindowEndTime', 'type': 'iso-8601'}, - 'last_operation_result_code': {'key': 'lastOperationResultCode', 'type': 'MaintenanceOperationResultCodeTypes'}, - 'last_operation_message': {'key': 'lastOperationMessage', 'type': 'str'}, - } - - def __init__(self, *, is_customer_initiated_maintenance_allowed: bool=None, pre_maintenance_window_start_time=None, pre_maintenance_window_end_time=None, maintenance_window_start_time=None, maintenance_window_end_time=None, last_operation_result_code=None, last_operation_message: str=None, **kwargs) -> None: - super(MaintenanceRedeployStatus, self).__init__(**kwargs) - self.is_customer_initiated_maintenance_allowed = is_customer_initiated_maintenance_allowed - self.pre_maintenance_window_start_time = pre_maintenance_window_start_time - self.pre_maintenance_window_end_time = pre_maintenance_window_end_time - self.maintenance_window_start_time = maintenance_window_start_time - self.maintenance_window_end_time = maintenance_window_end_time - self.last_operation_result_code = last_operation_result_code - self.last_operation_message = last_operation_message diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/managed_artifact.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/managed_artifact.py deleted file mode 100644 index 753e9704d755..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/managed_artifact.py +++ /dev/null @@ -1,34 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ManagedArtifact(Model): - """The managed artifact. - - All required parameters must be populated in order to send to Azure. - - :param id: Required. The managed artifact id. - :type id: str - """ - - _validation = { - 'id': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ManagedArtifact, self).__init__(**kwargs) - self.id = kwargs.get('id', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/managed_artifact_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/managed_artifact_py3.py deleted file mode 100644 index 0e8a6b2bfa40..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/managed_artifact_py3.py +++ /dev/null @@ -1,34 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ManagedArtifact(Model): - """The managed artifact. - - All required parameters must be populated in order to send to Azure. - - :param id: Required. The managed artifact id. - :type id: str - """ - - _validation = { - 'id': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - } - - def __init__(self, *, id: str, **kwargs) -> None: - super(ManagedArtifact, self).__init__(**kwargs) - self.id = id diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/managed_disk_parameters.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/managed_disk_parameters.py deleted file mode 100644 index a561b67d07b8..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/managed_disk_parameters.py +++ /dev/null @@ -1,35 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .sub_resource import SubResource - - -class ManagedDiskParameters(SubResource): - """The parameters of a managed disk. - - :param id: Resource Id - :type id: str - :param storage_account_type: Specifies the storage account type for the - managed disk. NOTE: UltraSSD_LRS can only be used with data disks, it - cannot be used with OS Disk. Possible values include: 'Standard_LRS', - 'Premium_LRS', 'StandardSSD_LRS', 'UltraSSD_LRS' - :type storage_account_type: str or - ~azure.mgmt.compute.v2019_03_01.models.StorageAccountTypes - """ - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'storage_account_type': {'key': 'storageAccountType', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ManagedDiskParameters, self).__init__(**kwargs) - self.storage_account_type = kwargs.get('storage_account_type', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/managed_disk_parameters_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/managed_disk_parameters_py3.py deleted file mode 100644 index 4f3442a0ec4c..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/managed_disk_parameters_py3.py +++ /dev/null @@ -1,35 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .sub_resource_py3 import SubResource - - -class ManagedDiskParameters(SubResource): - """The parameters of a managed disk. - - :param id: Resource Id - :type id: str - :param storage_account_type: Specifies the storage account type for the - managed disk. NOTE: UltraSSD_LRS can only be used with data disks, it - cannot be used with OS Disk. Possible values include: 'Standard_LRS', - 'Premium_LRS', 'StandardSSD_LRS', 'UltraSSD_LRS' - :type storage_account_type: str or - ~azure.mgmt.compute.v2019_03_01.models.StorageAccountTypes - """ - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'storage_account_type': {'key': 'storageAccountType', 'type': 'str'}, - } - - def __init__(self, *, id: str=None, storage_account_type=None, **kwargs) -> None: - super(ManagedDiskParameters, self).__init__(id=id, **kwargs) - self.storage_account_type = storage_account_type diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/network_interface_reference.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/network_interface_reference.py deleted file mode 100644 index b86e305e3f74..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/network_interface_reference.py +++ /dev/null @@ -1,32 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .sub_resource import SubResource - - -class NetworkInterfaceReference(SubResource): - """Describes a network interface reference. - - :param id: Resource Id - :type id: str - :param primary: Specifies the primary network interface in case the - virtual machine has more than 1 network interface. - :type primary: bool - """ - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'primary': {'key': 'properties.primary', 'type': 'bool'}, - } - - def __init__(self, **kwargs): - super(NetworkInterfaceReference, self).__init__(**kwargs) - self.primary = kwargs.get('primary', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/network_interface_reference_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/network_interface_reference_py3.py deleted file mode 100644 index 47da29278832..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/network_interface_reference_py3.py +++ /dev/null @@ -1,32 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .sub_resource_py3 import SubResource - - -class NetworkInterfaceReference(SubResource): - """Describes a network interface reference. - - :param id: Resource Id - :type id: str - :param primary: Specifies the primary network interface in case the - virtual machine has more than 1 network interface. - :type primary: bool - """ - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'primary': {'key': 'properties.primary', 'type': 'bool'}, - } - - def __init__(self, *, id: str=None, primary: bool=None, **kwargs) -> None: - super(NetworkInterfaceReference, self).__init__(id=id, **kwargs) - self.primary = primary diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/network_profile.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/network_profile.py deleted file mode 100644 index 35ace4c94b21..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/network_profile.py +++ /dev/null @@ -1,30 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class NetworkProfile(Model): - """Specifies the network interfaces of the virtual machine. - - :param network_interfaces: Specifies the list of resource Ids for the - network interfaces associated with the virtual machine. - :type network_interfaces: - list[~azure.mgmt.compute.v2019_03_01.models.NetworkInterfaceReference] - """ - - _attribute_map = { - 'network_interfaces': {'key': 'networkInterfaces', 'type': '[NetworkInterfaceReference]'}, - } - - def __init__(self, **kwargs): - super(NetworkProfile, self).__init__(**kwargs) - self.network_interfaces = kwargs.get('network_interfaces', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/network_profile_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/network_profile_py3.py deleted file mode 100644 index 370c5e565cc4..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/network_profile_py3.py +++ /dev/null @@ -1,30 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class NetworkProfile(Model): - """Specifies the network interfaces of the virtual machine. - - :param network_interfaces: Specifies the list of resource Ids for the - network interfaces associated with the virtual machine. - :type network_interfaces: - list[~azure.mgmt.compute.v2019_03_01.models.NetworkInterfaceReference] - """ - - _attribute_map = { - 'network_interfaces': {'key': 'networkInterfaces', 'type': '[NetworkInterfaceReference]'}, - } - - def __init__(self, *, network_interfaces=None, **kwargs) -> None: - super(NetworkProfile, self).__init__(**kwargs) - self.network_interfaces = network_interfaces diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/os_disk.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/os_disk.py deleted file mode 100644 index 87ec06112531..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/os_disk.py +++ /dev/null @@ -1,103 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class OSDisk(Model): - """Specifies information about the operating system disk used by the virtual - machine.

    For more information about disks, see [About disks and - VHDs for Azure virtual - machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-about-disks-vhds?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). - - All required parameters must be populated in order to send to Azure. - - :param os_type: This property allows you to specify the type of the OS - that is included in the disk if creating a VM from user-image or a - specialized VHD.

    Possible values are:

    **Windows** -

    **Linux**. Possible values include: 'Windows', 'Linux' - :type os_type: str or - ~azure.mgmt.compute.v2019_03_01.models.OperatingSystemTypes - :param encryption_settings: Specifies the encryption settings for the OS - Disk.

    Minimum api-version: 2015-06-15 - :type encryption_settings: - ~azure.mgmt.compute.v2019_03_01.models.DiskEncryptionSettings - :param name: The disk name. - :type name: str - :param vhd: The virtual hard disk. - :type vhd: ~azure.mgmt.compute.v2019_03_01.models.VirtualHardDisk - :param image: The source user image virtual hard disk. The virtual hard - disk will be copied before being attached to the virtual machine. If - SourceImage is provided, the destination virtual hard drive must not - exist. - :type image: ~azure.mgmt.compute.v2019_03_01.models.VirtualHardDisk - :param caching: Specifies the caching requirements.

    Possible - values are:

    **None**

    **ReadOnly**

    **ReadWrite** -

    Default: **None for Standard storage. ReadOnly for Premium - storage**. Possible values include: 'None', 'ReadOnly', 'ReadWrite' - :type caching: str or ~azure.mgmt.compute.v2019_03_01.models.CachingTypes - :param write_accelerator_enabled: Specifies whether writeAccelerator - should be enabled or disabled on the disk. - :type write_accelerator_enabled: bool - :param diff_disk_settings: Specifies the ephemeral Disk Settings for the - operating system disk used by the virtual machine. - :type diff_disk_settings: - ~azure.mgmt.compute.v2019_03_01.models.DiffDiskSettings - :param create_option: Required. Specifies how the virtual machine should - be created.

    Possible values are:

    **Attach** \\u2013 This - value is used when you are using a specialized disk to create the virtual - machine.

    **FromImage** \\u2013 This value is used when you are - using an image to create the virtual machine. If you are using a platform - image, you also use the imageReference element described above. If you are - using a marketplace image, you also use the plan element previously - described. Possible values include: 'FromImage', 'Empty', 'Attach' - :type create_option: str or - ~azure.mgmt.compute.v2019_03_01.models.DiskCreateOptionTypes - :param disk_size_gb: Specifies the size of an empty data disk in - gigabytes. This element can be used to overwrite the size of the disk in a - virtual machine image.

    This value cannot be larger than 1023 GB - :type disk_size_gb: int - :param managed_disk: The managed disk parameters. - :type managed_disk: - ~azure.mgmt.compute.v2019_03_01.models.ManagedDiskParameters - """ - - _validation = { - 'create_option': {'required': True}, - } - - _attribute_map = { - 'os_type': {'key': 'osType', 'type': 'OperatingSystemTypes'}, - 'encryption_settings': {'key': 'encryptionSettings', 'type': 'DiskEncryptionSettings'}, - 'name': {'key': 'name', 'type': 'str'}, - 'vhd': {'key': 'vhd', 'type': 'VirtualHardDisk'}, - 'image': {'key': 'image', 'type': 'VirtualHardDisk'}, - 'caching': {'key': 'caching', 'type': 'CachingTypes'}, - 'write_accelerator_enabled': {'key': 'writeAcceleratorEnabled', 'type': 'bool'}, - 'diff_disk_settings': {'key': 'diffDiskSettings', 'type': 'DiffDiskSettings'}, - 'create_option': {'key': 'createOption', 'type': 'str'}, - 'disk_size_gb': {'key': 'diskSizeGB', 'type': 'int'}, - 'managed_disk': {'key': 'managedDisk', 'type': 'ManagedDiskParameters'}, - } - - def __init__(self, **kwargs): - super(OSDisk, self).__init__(**kwargs) - self.os_type = kwargs.get('os_type', None) - self.encryption_settings = kwargs.get('encryption_settings', None) - self.name = kwargs.get('name', None) - self.vhd = kwargs.get('vhd', None) - self.image = kwargs.get('image', None) - self.caching = kwargs.get('caching', None) - self.write_accelerator_enabled = kwargs.get('write_accelerator_enabled', None) - self.diff_disk_settings = kwargs.get('diff_disk_settings', None) - self.create_option = kwargs.get('create_option', None) - self.disk_size_gb = kwargs.get('disk_size_gb', None) - self.managed_disk = kwargs.get('managed_disk', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/os_disk_image.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/os_disk_image.py deleted file mode 100644 index 38f05942c4b3..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/os_disk_image.py +++ /dev/null @@ -1,36 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class OSDiskImage(Model): - """Contains the os disk image information. - - All required parameters must be populated in order to send to Azure. - - :param operating_system: Required. The operating system of the - osDiskImage. Possible values include: 'Windows', 'Linux' - :type operating_system: str or - ~azure.mgmt.compute.v2019_03_01.models.OperatingSystemTypes - """ - - _validation = { - 'operating_system': {'required': True}, - } - - _attribute_map = { - 'operating_system': {'key': 'operatingSystem', 'type': 'OperatingSystemTypes'}, - } - - def __init__(self, **kwargs): - super(OSDiskImage, self).__init__(**kwargs) - self.operating_system = kwargs.get('operating_system', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/os_disk_image_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/os_disk_image_py3.py deleted file mode 100644 index 0ddb5152196d..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/os_disk_image_py3.py +++ /dev/null @@ -1,36 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class OSDiskImage(Model): - """Contains the os disk image information. - - All required parameters must be populated in order to send to Azure. - - :param operating_system: Required. The operating system of the - osDiskImage. Possible values include: 'Windows', 'Linux' - :type operating_system: str or - ~azure.mgmt.compute.v2019_03_01.models.OperatingSystemTypes - """ - - _validation = { - 'operating_system': {'required': True}, - } - - _attribute_map = { - 'operating_system': {'key': 'operatingSystem', 'type': 'OperatingSystemTypes'}, - } - - def __init__(self, *, operating_system, **kwargs) -> None: - super(OSDiskImage, self).__init__(**kwargs) - self.operating_system = operating_system diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/os_disk_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/os_disk_py3.py deleted file mode 100644 index 1c5cb9a871b8..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/os_disk_py3.py +++ /dev/null @@ -1,103 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class OSDisk(Model): - """Specifies information about the operating system disk used by the virtual - machine.

    For more information about disks, see [About disks and - VHDs for Azure virtual - machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-about-disks-vhds?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). - - All required parameters must be populated in order to send to Azure. - - :param os_type: This property allows you to specify the type of the OS - that is included in the disk if creating a VM from user-image or a - specialized VHD.

    Possible values are:

    **Windows** -

    **Linux**. Possible values include: 'Windows', 'Linux' - :type os_type: str or - ~azure.mgmt.compute.v2019_03_01.models.OperatingSystemTypes - :param encryption_settings: Specifies the encryption settings for the OS - Disk.

    Minimum api-version: 2015-06-15 - :type encryption_settings: - ~azure.mgmt.compute.v2019_03_01.models.DiskEncryptionSettings - :param name: The disk name. - :type name: str - :param vhd: The virtual hard disk. - :type vhd: ~azure.mgmt.compute.v2019_03_01.models.VirtualHardDisk - :param image: The source user image virtual hard disk. The virtual hard - disk will be copied before being attached to the virtual machine. If - SourceImage is provided, the destination virtual hard drive must not - exist. - :type image: ~azure.mgmt.compute.v2019_03_01.models.VirtualHardDisk - :param caching: Specifies the caching requirements.

    Possible - values are:

    **None**

    **ReadOnly**

    **ReadWrite** -

    Default: **None for Standard storage. ReadOnly for Premium - storage**. Possible values include: 'None', 'ReadOnly', 'ReadWrite' - :type caching: str or ~azure.mgmt.compute.v2019_03_01.models.CachingTypes - :param write_accelerator_enabled: Specifies whether writeAccelerator - should be enabled or disabled on the disk. - :type write_accelerator_enabled: bool - :param diff_disk_settings: Specifies the ephemeral Disk Settings for the - operating system disk used by the virtual machine. - :type diff_disk_settings: - ~azure.mgmt.compute.v2019_03_01.models.DiffDiskSettings - :param create_option: Required. Specifies how the virtual machine should - be created.

    Possible values are:

    **Attach** \\u2013 This - value is used when you are using a specialized disk to create the virtual - machine.

    **FromImage** \\u2013 This value is used when you are - using an image to create the virtual machine. If you are using a platform - image, you also use the imageReference element described above. If you are - using a marketplace image, you also use the plan element previously - described. Possible values include: 'FromImage', 'Empty', 'Attach' - :type create_option: str or - ~azure.mgmt.compute.v2019_03_01.models.DiskCreateOptionTypes - :param disk_size_gb: Specifies the size of an empty data disk in - gigabytes. This element can be used to overwrite the size of the disk in a - virtual machine image.

    This value cannot be larger than 1023 GB - :type disk_size_gb: int - :param managed_disk: The managed disk parameters. - :type managed_disk: - ~azure.mgmt.compute.v2019_03_01.models.ManagedDiskParameters - """ - - _validation = { - 'create_option': {'required': True}, - } - - _attribute_map = { - 'os_type': {'key': 'osType', 'type': 'OperatingSystemTypes'}, - 'encryption_settings': {'key': 'encryptionSettings', 'type': 'DiskEncryptionSettings'}, - 'name': {'key': 'name', 'type': 'str'}, - 'vhd': {'key': 'vhd', 'type': 'VirtualHardDisk'}, - 'image': {'key': 'image', 'type': 'VirtualHardDisk'}, - 'caching': {'key': 'caching', 'type': 'CachingTypes'}, - 'write_accelerator_enabled': {'key': 'writeAcceleratorEnabled', 'type': 'bool'}, - 'diff_disk_settings': {'key': 'diffDiskSettings', 'type': 'DiffDiskSettings'}, - 'create_option': {'key': 'createOption', 'type': 'str'}, - 'disk_size_gb': {'key': 'diskSizeGB', 'type': 'int'}, - 'managed_disk': {'key': 'managedDisk', 'type': 'ManagedDiskParameters'}, - } - - def __init__(self, *, create_option, os_type=None, encryption_settings=None, name: str=None, vhd=None, image=None, caching=None, write_accelerator_enabled: bool=None, diff_disk_settings=None, disk_size_gb: int=None, managed_disk=None, **kwargs) -> None: - super(OSDisk, self).__init__(**kwargs) - self.os_type = os_type - self.encryption_settings = encryption_settings - self.name = name - self.vhd = vhd - self.image = image - self.caching = caching - self.write_accelerator_enabled = write_accelerator_enabled - self.diff_disk_settings = diff_disk_settings - self.create_option = create_option - self.disk_size_gb = disk_size_gb - self.managed_disk = managed_disk diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/os_profile.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/os_profile.py deleted file mode 100644 index b9eac4fd8551..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/os_profile.py +++ /dev/null @@ -1,106 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class OSProfile(Model): - """Specifies the operating system settings for the virtual machine. - - :param computer_name: Specifies the host OS name of the virtual machine. -

    This name cannot be updated after the VM is created.

    - **Max-length (Windows):** 15 characters

    **Max-length (Linux):** - 64 characters.

    For naming conventions and restrictions see [Azure - infrastructure services implementation - guidelines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-infrastructure-subscription-accounts-guidelines?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json#1-naming-conventions). - :type computer_name: str - :param admin_username: Specifies the name of the administrator account. -

    **Windows-only restriction:** Cannot end in "."

    - **Disallowed values:** "administrator", "admin", "user", "user1", "test", - "user2", "test1", "user3", "admin1", "1", "123", "a", "actuser", "adm", - "admin2", "aspnet", "backup", "console", "david", "guest", "john", - "owner", "root", "server", "sql", "support", "support_388945a0", "sys", - "test2", "test3", "user4", "user5".

    **Minimum-length (Linux):** 1 - character

    **Max-length (Linux):** 64 characters

    - **Max-length (Windows):** 20 characters

  • For root access to - the Linux VM, see [Using root privileges on Linux virtual machines in - Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-use-root-privileges?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json)
  • - For a list of built-in system users on Linux that should not be used in - this field, see [Selecting User Names for Linux on - Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-usernames?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json) - :type admin_username: str - :param admin_password: Specifies the password of the administrator - account.

    **Minimum-length (Windows):** 8 characters

    - **Minimum-length (Linux):** 6 characters

    **Max-length - (Windows):** 123 characters

    **Max-length (Linux):** 72 characters -

    **Complexity requirements:** 3 out of 4 conditions below need to - be fulfilled
    Has lower characters
    Has upper characters
    Has a - digit
    Has a special character (Regex match [\\W_])

    - **Disallowed values:** "abc@123", "P@$$w0rd", "P@ssw0rd", "P@ssword123", - "Pa$$word", "pass@word1", "Password!", "Password1", "Password22", - "iloveyou!"

    For resetting the password, see [How to reset the - Remote Desktop service or its login password in a Windows - VM](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-reset-rdp?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json) -

    For resetting root password, see [Manage users, SSH, and check or - repair disks on Azure Linux VMs using the VMAccess - Extension](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-using-vmaccess-extension?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json#reset-root-password) - :type admin_password: str - :param custom_data: Specifies a base-64 encoded string of custom data. The - base-64 encoded string is decoded to a binary array that is saved as a - file on the Virtual Machine. The maximum length of the binary array is - 65535 bytes.

    For using cloud-init for your VM, see [Using - cloud-init to customize a Linux VM during - creation](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-using-cloud-init?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json) - :type custom_data: str - :param windows_configuration: Specifies Windows operating system settings - on the virtual machine. - :type windows_configuration: - ~azure.mgmt.compute.v2019_03_01.models.WindowsConfiguration - :param linux_configuration: Specifies the Linux operating system settings - on the virtual machine.

    For a list of supported Linux - distributions, see [Linux on Azure-Endorsed - Distributions](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-endorsed-distros?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json) -

    For running non-endorsed distributions, see [Information for - Non-Endorsed - Distributions](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-create-upload-generic?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json). - :type linux_configuration: - ~azure.mgmt.compute.v2019_03_01.models.LinuxConfiguration - :param secrets: Specifies set of certificates that should be installed - onto the virtual machine. - :type secrets: - list[~azure.mgmt.compute.v2019_03_01.models.VaultSecretGroup] - :param allow_extension_operations: Specifies whether extension operations - should be allowed on the virtual machine.

    This may only be set to - False when no extensions are present on the virtual machine. - :type allow_extension_operations: bool - """ - - _attribute_map = { - 'computer_name': {'key': 'computerName', 'type': 'str'}, - 'admin_username': {'key': 'adminUsername', 'type': 'str'}, - 'admin_password': {'key': 'adminPassword', 'type': 'str'}, - 'custom_data': {'key': 'customData', 'type': 'str'}, - 'windows_configuration': {'key': 'windowsConfiguration', 'type': 'WindowsConfiguration'}, - 'linux_configuration': {'key': 'linuxConfiguration', 'type': 'LinuxConfiguration'}, - 'secrets': {'key': 'secrets', 'type': '[VaultSecretGroup]'}, - 'allow_extension_operations': {'key': 'allowExtensionOperations', 'type': 'bool'}, - } - - def __init__(self, **kwargs): - super(OSProfile, self).__init__(**kwargs) - self.computer_name = kwargs.get('computer_name', None) - self.admin_username = kwargs.get('admin_username', None) - self.admin_password = kwargs.get('admin_password', None) - self.custom_data = kwargs.get('custom_data', None) - self.windows_configuration = kwargs.get('windows_configuration', None) - self.linux_configuration = kwargs.get('linux_configuration', None) - self.secrets = kwargs.get('secrets', None) - self.allow_extension_operations = kwargs.get('allow_extension_operations', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/os_profile_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/os_profile_py3.py deleted file mode 100644 index 266e4824213e..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/os_profile_py3.py +++ /dev/null @@ -1,106 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class OSProfile(Model): - """Specifies the operating system settings for the virtual machine. - - :param computer_name: Specifies the host OS name of the virtual machine. -

    This name cannot be updated after the VM is created.

    - **Max-length (Windows):** 15 characters

    **Max-length (Linux):** - 64 characters.

    For naming conventions and restrictions see [Azure - infrastructure services implementation - guidelines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-infrastructure-subscription-accounts-guidelines?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json#1-naming-conventions). - :type computer_name: str - :param admin_username: Specifies the name of the administrator account. -

    **Windows-only restriction:** Cannot end in "."

    - **Disallowed values:** "administrator", "admin", "user", "user1", "test", - "user2", "test1", "user3", "admin1", "1", "123", "a", "actuser", "adm", - "admin2", "aspnet", "backup", "console", "david", "guest", "john", - "owner", "root", "server", "sql", "support", "support_388945a0", "sys", - "test2", "test3", "user4", "user5".

    **Minimum-length (Linux):** 1 - character

    **Max-length (Linux):** 64 characters

    - **Max-length (Windows):** 20 characters

  • For root access to - the Linux VM, see [Using root privileges on Linux virtual machines in - Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-use-root-privileges?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json)
  • - For a list of built-in system users on Linux that should not be used in - this field, see [Selecting User Names for Linux on - Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-usernames?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json) - :type admin_username: str - :param admin_password: Specifies the password of the administrator - account.

    **Minimum-length (Windows):** 8 characters

    - **Minimum-length (Linux):** 6 characters

    **Max-length - (Windows):** 123 characters

    **Max-length (Linux):** 72 characters -

    **Complexity requirements:** 3 out of 4 conditions below need to - be fulfilled
    Has lower characters
    Has upper characters
    Has a - digit
    Has a special character (Regex match [\\W_])

    - **Disallowed values:** "abc@123", "P@$$w0rd", "P@ssw0rd", "P@ssword123", - "Pa$$word", "pass@word1", "Password!", "Password1", "Password22", - "iloveyou!"

    For resetting the password, see [How to reset the - Remote Desktop service or its login password in a Windows - VM](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-reset-rdp?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json) -

    For resetting root password, see [Manage users, SSH, and check or - repair disks on Azure Linux VMs using the VMAccess - Extension](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-using-vmaccess-extension?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json#reset-root-password) - :type admin_password: str - :param custom_data: Specifies a base-64 encoded string of custom data. The - base-64 encoded string is decoded to a binary array that is saved as a - file on the Virtual Machine. The maximum length of the binary array is - 65535 bytes.

    For using cloud-init for your VM, see [Using - cloud-init to customize a Linux VM during - creation](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-using-cloud-init?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json) - :type custom_data: str - :param windows_configuration: Specifies Windows operating system settings - on the virtual machine. - :type windows_configuration: - ~azure.mgmt.compute.v2019_03_01.models.WindowsConfiguration - :param linux_configuration: Specifies the Linux operating system settings - on the virtual machine.

    For a list of supported Linux - distributions, see [Linux on Azure-Endorsed - Distributions](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-endorsed-distros?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json) -

    For running non-endorsed distributions, see [Information for - Non-Endorsed - Distributions](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-create-upload-generic?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json). - :type linux_configuration: - ~azure.mgmt.compute.v2019_03_01.models.LinuxConfiguration - :param secrets: Specifies set of certificates that should be installed - onto the virtual machine. - :type secrets: - list[~azure.mgmt.compute.v2019_03_01.models.VaultSecretGroup] - :param allow_extension_operations: Specifies whether extension operations - should be allowed on the virtual machine.

    This may only be set to - False when no extensions are present on the virtual machine. - :type allow_extension_operations: bool - """ - - _attribute_map = { - 'computer_name': {'key': 'computerName', 'type': 'str'}, - 'admin_username': {'key': 'adminUsername', 'type': 'str'}, - 'admin_password': {'key': 'adminPassword', 'type': 'str'}, - 'custom_data': {'key': 'customData', 'type': 'str'}, - 'windows_configuration': {'key': 'windowsConfiguration', 'type': 'WindowsConfiguration'}, - 'linux_configuration': {'key': 'linuxConfiguration', 'type': 'LinuxConfiguration'}, - 'secrets': {'key': 'secrets', 'type': '[VaultSecretGroup]'}, - 'allow_extension_operations': {'key': 'allowExtensionOperations', 'type': 'bool'}, - } - - def __init__(self, *, computer_name: str=None, admin_username: str=None, admin_password: str=None, custom_data: str=None, windows_configuration=None, linux_configuration=None, secrets=None, allow_extension_operations: bool=None, **kwargs) -> None: - super(OSProfile, self).__init__(**kwargs) - self.computer_name = computer_name - self.admin_username = admin_username - self.admin_password = admin_password - self.custom_data = custom_data - self.windows_configuration = windows_configuration - self.linux_configuration = linux_configuration - self.secrets = secrets - self.allow_extension_operations = allow_extension_operations diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/plan.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/plan.py deleted file mode 100644 index d42b6b32cfac..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/plan.py +++ /dev/null @@ -1,46 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class Plan(Model): - """Specifies information about the marketplace image used to create the - virtual machine. This element is only used for marketplace images. Before - you can use a marketplace image from an API, you must enable the image for - programmatic use. In the Azure portal, find the marketplace image that you - want to use and then click **Want to deploy programmatically, Get Started - ->**. Enter any required information and then click **Save**. - - :param name: The plan ID. - :type name: str - :param publisher: The publisher ID. - :type publisher: str - :param product: Specifies the product of the image from the marketplace. - This is the same value as Offer under the imageReference element. - :type product: str - :param promotion_code: The promotion code. - :type promotion_code: str - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'publisher': {'key': 'publisher', 'type': 'str'}, - 'product': {'key': 'product', 'type': 'str'}, - 'promotion_code': {'key': 'promotionCode', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(Plan, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.publisher = kwargs.get('publisher', None) - self.product = kwargs.get('product', None) - self.promotion_code = kwargs.get('promotion_code', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/plan_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/plan_py3.py deleted file mode 100644 index 9cca2c78a123..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/plan_py3.py +++ /dev/null @@ -1,46 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class Plan(Model): - """Specifies information about the marketplace image used to create the - virtual machine. This element is only used for marketplace images. Before - you can use a marketplace image from an API, you must enable the image for - programmatic use. In the Azure portal, find the marketplace image that you - want to use and then click **Want to deploy programmatically, Get Started - ->**. Enter any required information and then click **Save**. - - :param name: The plan ID. - :type name: str - :param publisher: The publisher ID. - :type publisher: str - :param product: Specifies the product of the image from the marketplace. - This is the same value as Offer under the imageReference element. - :type product: str - :param promotion_code: The promotion code. - :type promotion_code: str - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'publisher': {'key': 'publisher', 'type': 'str'}, - 'product': {'key': 'product', 'type': 'str'}, - 'promotion_code': {'key': 'promotionCode', 'type': 'str'}, - } - - def __init__(self, *, name: str=None, publisher: str=None, product: str=None, promotion_code: str=None, **kwargs) -> None: - super(Plan, self).__init__(**kwargs) - self.name = name - self.publisher = publisher - self.product = product - self.promotion_code = promotion_code diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/proximity_placement_group.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/proximity_placement_group.py deleted file mode 100644 index ead044ed120e..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/proximity_placement_group.py +++ /dev/null @@ -1,79 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource import Resource - - -class ProximityPlacementGroup(Resource): - """Specifies information about the proximity placement group. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource Id - :vartype id: str - :ivar name: Resource name - :vartype name: str - :ivar type: Resource type - :vartype type: str - :param location: Required. Resource location - :type location: str - :param tags: Resource tags - :type tags: dict[str, str] - :param proximity_placement_group_type: Specifies the type of the proximity - placement group.

    Possible values are:

    **Standard** -

    **Ultra**. Possible values include: 'Standard', 'Ultra' - :type proximity_placement_group_type: str or - ~azure.mgmt.compute.v2019_03_01.models.ProximityPlacementGroupType - :ivar virtual_machines: A list of references to all virtual machines in - the proximity placement group. - :vartype virtual_machines: - list[~azure.mgmt.compute.v2019_03_01.models.SubResource] - :ivar virtual_machine_scale_sets: A list of references to all virtual - machine scale sets in the proximity placement group. - :vartype virtual_machine_scale_sets: - list[~azure.mgmt.compute.v2019_03_01.models.SubResource] - :ivar availability_sets: A list of references to all availability sets in - the proximity placement group. - :vartype availability_sets: - list[~azure.mgmt.compute.v2019_03_01.models.SubResource] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - 'virtual_machines': {'readonly': True}, - 'virtual_machine_scale_sets': {'readonly': True}, - 'availability_sets': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'proximity_placement_group_type': {'key': 'properties.proximityPlacementGroupType', 'type': 'str'}, - 'virtual_machines': {'key': 'properties.virtualMachines', 'type': '[SubResource]'}, - 'virtual_machine_scale_sets': {'key': 'properties.virtualMachineScaleSets', 'type': '[SubResource]'}, - 'availability_sets': {'key': 'properties.availabilitySets', 'type': '[SubResource]'}, - } - - def __init__(self, **kwargs): - super(ProximityPlacementGroup, self).__init__(**kwargs) - self.proximity_placement_group_type = kwargs.get('proximity_placement_group_type', None) - self.virtual_machines = None - self.virtual_machine_scale_sets = None - self.availability_sets = None diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/proximity_placement_group_paged.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/proximity_placement_group_paged.py deleted file mode 100644 index e8f58305138a..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/proximity_placement_group_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class ProximityPlacementGroupPaged(Paged): - """ - A paging container for iterating over a list of :class:`ProximityPlacementGroup ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[ProximityPlacementGroup]'} - } - - def __init__(self, *args, **kwargs): - - super(ProximityPlacementGroupPaged, self).__init__(*args, **kwargs) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/proximity_placement_group_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/proximity_placement_group_py3.py deleted file mode 100644 index d46cf8d279af..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/proximity_placement_group_py3.py +++ /dev/null @@ -1,79 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource_py3 import Resource - - -class ProximityPlacementGroup(Resource): - """Specifies information about the proximity placement group. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource Id - :vartype id: str - :ivar name: Resource name - :vartype name: str - :ivar type: Resource type - :vartype type: str - :param location: Required. Resource location - :type location: str - :param tags: Resource tags - :type tags: dict[str, str] - :param proximity_placement_group_type: Specifies the type of the proximity - placement group.

    Possible values are:

    **Standard** -

    **Ultra**. Possible values include: 'Standard', 'Ultra' - :type proximity_placement_group_type: str or - ~azure.mgmt.compute.v2019_03_01.models.ProximityPlacementGroupType - :ivar virtual_machines: A list of references to all virtual machines in - the proximity placement group. - :vartype virtual_machines: - list[~azure.mgmt.compute.v2019_03_01.models.SubResource] - :ivar virtual_machine_scale_sets: A list of references to all virtual - machine scale sets in the proximity placement group. - :vartype virtual_machine_scale_sets: - list[~azure.mgmt.compute.v2019_03_01.models.SubResource] - :ivar availability_sets: A list of references to all availability sets in - the proximity placement group. - :vartype availability_sets: - list[~azure.mgmt.compute.v2019_03_01.models.SubResource] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - 'virtual_machines': {'readonly': True}, - 'virtual_machine_scale_sets': {'readonly': True}, - 'availability_sets': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'proximity_placement_group_type': {'key': 'properties.proximityPlacementGroupType', 'type': 'str'}, - 'virtual_machines': {'key': 'properties.virtualMachines', 'type': '[SubResource]'}, - 'virtual_machine_scale_sets': {'key': 'properties.virtualMachineScaleSets', 'type': '[SubResource]'}, - 'availability_sets': {'key': 'properties.availabilitySets', 'type': '[SubResource]'}, - } - - def __init__(self, *, location: str, tags=None, proximity_placement_group_type=None, **kwargs) -> None: - super(ProximityPlacementGroup, self).__init__(location=location, tags=tags, **kwargs) - self.proximity_placement_group_type = proximity_placement_group_type - self.virtual_machines = None - self.virtual_machine_scale_sets = None - self.availability_sets = None diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/proximity_placement_group_update.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/proximity_placement_group_update.py deleted file mode 100644 index cf795d53b0c1..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/proximity_placement_group_update.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .update_resource import UpdateResource - - -class ProximityPlacementGroupUpdate(UpdateResource): - """Specifies information about the proximity placement group. - - :param tags: Resource tags - :type tags: dict[str, str] - """ - - _attribute_map = { - 'tags': {'key': 'tags', 'type': '{str}'}, - } - - def __init__(self, **kwargs): - super(ProximityPlacementGroupUpdate, self).__init__(**kwargs) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/proximity_placement_group_update_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/proximity_placement_group_update_py3.py deleted file mode 100644 index 9d60be7ba9ed..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/proximity_placement_group_update_py3.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .update_resource_py3 import UpdateResource - - -class ProximityPlacementGroupUpdate(UpdateResource): - """Specifies information about the proximity placement group. - - :param tags: Resource tags - :type tags: dict[str, str] - """ - - _attribute_map = { - 'tags': {'key': 'tags', 'type': '{str}'}, - } - - def __init__(self, *, tags=None, **kwargs) -> None: - super(ProximityPlacementGroupUpdate, self).__init__(tags=tags, **kwargs) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/purchase_plan.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/purchase_plan.py deleted file mode 100644 index 2e1509addca6..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/purchase_plan.py +++ /dev/null @@ -1,47 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class PurchasePlan(Model): - """Used for establishing the purchase context of any 3rd Party artifact - through MarketPlace. - - All required parameters must be populated in order to send to Azure. - - :param publisher: Required. The publisher ID. - :type publisher: str - :param name: Required. The plan ID. - :type name: str - :param product: Required. Specifies the product of the image from the - marketplace. This is the same value as Offer under the imageReference - element. - :type product: str - """ - - _validation = { - 'publisher': {'required': True}, - 'name': {'required': True}, - 'product': {'required': True}, - } - - _attribute_map = { - 'publisher': {'key': 'publisher', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'product': {'key': 'product', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(PurchasePlan, self).__init__(**kwargs) - self.publisher = kwargs.get('publisher', None) - self.name = kwargs.get('name', None) - self.product = kwargs.get('product', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/purchase_plan_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/purchase_plan_py3.py deleted file mode 100644 index 26f7996f1633..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/purchase_plan_py3.py +++ /dev/null @@ -1,47 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class PurchasePlan(Model): - """Used for establishing the purchase context of any 3rd Party artifact - through MarketPlace. - - All required parameters must be populated in order to send to Azure. - - :param publisher: Required. The publisher ID. - :type publisher: str - :param name: Required. The plan ID. - :type name: str - :param product: Required. Specifies the product of the image from the - marketplace. This is the same value as Offer under the imageReference - element. - :type product: str - """ - - _validation = { - 'publisher': {'required': True}, - 'name': {'required': True}, - 'product': {'required': True}, - } - - _attribute_map = { - 'publisher': {'key': 'publisher', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'product': {'key': 'product', 'type': 'str'}, - } - - def __init__(self, *, publisher: str, name: str, product: str, **kwargs) -> None: - super(PurchasePlan, self).__init__(**kwargs) - self.publisher = publisher - self.name = name - self.product = product diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/recommended_machine_configuration.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/recommended_machine_configuration.py deleted file mode 100644 index 3034f6cb426c..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/recommended_machine_configuration.py +++ /dev/null @@ -1,33 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class RecommendedMachineConfiguration(Model): - """The properties describe the recommended machine configuration for this - Image Definition. These properties are updatable. - - :param v_cp_us: - :type v_cp_us: ~azure.mgmt.compute.v2019_03_01.models.ResourceRange - :param memory: - :type memory: ~azure.mgmt.compute.v2019_03_01.models.ResourceRange - """ - - _attribute_map = { - 'v_cp_us': {'key': 'vCPUs', 'type': 'ResourceRange'}, - 'memory': {'key': 'memory', 'type': 'ResourceRange'}, - } - - def __init__(self, **kwargs): - super(RecommendedMachineConfiguration, self).__init__(**kwargs) - self.v_cp_us = kwargs.get('v_cp_us', None) - self.memory = kwargs.get('memory', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/recommended_machine_configuration_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/recommended_machine_configuration_py3.py deleted file mode 100644 index 4b1776eda37e..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/recommended_machine_configuration_py3.py +++ /dev/null @@ -1,33 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class RecommendedMachineConfiguration(Model): - """The properties describe the recommended machine configuration for this - Image Definition. These properties are updatable. - - :param v_cp_us: - :type v_cp_us: ~azure.mgmt.compute.v2019_03_01.models.ResourceRange - :param memory: - :type memory: ~azure.mgmt.compute.v2019_03_01.models.ResourceRange - """ - - _attribute_map = { - 'v_cp_us': {'key': 'vCPUs', 'type': 'ResourceRange'}, - 'memory': {'key': 'memory', 'type': 'ResourceRange'}, - } - - def __init__(self, *, v_cp_us=None, memory=None, **kwargs) -> None: - super(RecommendedMachineConfiguration, self).__init__(**kwargs) - self.v_cp_us = v_cp_us - self.memory = memory diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/recovery_walk_response.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/recovery_walk_response.py deleted file mode 100644 index 8dcbca604c7e..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/recovery_walk_response.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class RecoveryWalkResponse(Model): - """Response after calling a manual recovery walk. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar walk_performed: Whether the recovery walk was performed - :vartype walk_performed: bool - :ivar next_platform_update_domain: The next update domain that needs to be - walked. Null means walk spanning all update domains has been completed - :vartype next_platform_update_domain: int - """ - - _validation = { - 'walk_performed': {'readonly': True}, - 'next_platform_update_domain': {'readonly': True}, - } - - _attribute_map = { - 'walk_performed': {'key': 'walkPerformed', 'type': 'bool'}, - 'next_platform_update_domain': {'key': 'nextPlatformUpdateDomain', 'type': 'int'}, - } - - def __init__(self, **kwargs): - super(RecoveryWalkResponse, self).__init__(**kwargs) - self.walk_performed = None - self.next_platform_update_domain = None diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/recovery_walk_response_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/recovery_walk_response_py3.py deleted file mode 100644 index 5b24a0ed9b7a..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/recovery_walk_response_py3.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class RecoveryWalkResponse(Model): - """Response after calling a manual recovery walk. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar walk_performed: Whether the recovery walk was performed - :vartype walk_performed: bool - :ivar next_platform_update_domain: The next update domain that needs to be - walked. Null means walk spanning all update domains has been completed - :vartype next_platform_update_domain: int - """ - - _validation = { - 'walk_performed': {'readonly': True}, - 'next_platform_update_domain': {'readonly': True}, - } - - _attribute_map = { - 'walk_performed': {'key': 'walkPerformed', 'type': 'bool'}, - 'next_platform_update_domain': {'key': 'nextPlatformUpdateDomain', 'type': 'int'}, - } - - def __init__(self, **kwargs) -> None: - super(RecoveryWalkResponse, self).__init__(**kwargs) - self.walk_performed = None - self.next_platform_update_domain = None diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/regional_replication_status.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/regional_replication_status.py deleted file mode 100644 index 535f74b7b7b0..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/regional_replication_status.py +++ /dev/null @@ -1,53 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class RegionalReplicationStatus(Model): - """This is the regional replication status. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar region: The region to which the gallery Image Version is being - replicated to. - :vartype region: str - :ivar state: This is the regional replication state. Possible values - include: 'Unknown', 'Replicating', 'Completed', 'Failed' - :vartype state: str or - ~azure.mgmt.compute.v2019_03_01.models.ReplicationState - :ivar details: The details of the replication status. - :vartype details: str - :ivar progress: It indicates progress of the replication job. - :vartype progress: int - """ - - _validation = { - 'region': {'readonly': True}, - 'state': {'readonly': True}, - 'details': {'readonly': True}, - 'progress': {'readonly': True}, - } - - _attribute_map = { - 'region': {'key': 'region', 'type': 'str'}, - 'state': {'key': 'state', 'type': 'str'}, - 'details': {'key': 'details', 'type': 'str'}, - 'progress': {'key': 'progress', 'type': 'int'}, - } - - def __init__(self, **kwargs): - super(RegionalReplicationStatus, self).__init__(**kwargs) - self.region = None - self.state = None - self.details = None - self.progress = None diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/regional_replication_status_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/regional_replication_status_py3.py deleted file mode 100644 index 769441ba8a61..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/regional_replication_status_py3.py +++ /dev/null @@ -1,53 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class RegionalReplicationStatus(Model): - """This is the regional replication status. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar region: The region to which the gallery Image Version is being - replicated to. - :vartype region: str - :ivar state: This is the regional replication state. Possible values - include: 'Unknown', 'Replicating', 'Completed', 'Failed' - :vartype state: str or - ~azure.mgmt.compute.v2019_03_01.models.ReplicationState - :ivar details: The details of the replication status. - :vartype details: str - :ivar progress: It indicates progress of the replication job. - :vartype progress: int - """ - - _validation = { - 'region': {'readonly': True}, - 'state': {'readonly': True}, - 'details': {'readonly': True}, - 'progress': {'readonly': True}, - } - - _attribute_map = { - 'region': {'key': 'region', 'type': 'str'}, - 'state': {'key': 'state', 'type': 'str'}, - 'details': {'key': 'details', 'type': 'str'}, - 'progress': {'key': 'progress', 'type': 'int'}, - } - - def __init__(self, **kwargs) -> None: - super(RegionalReplicationStatus, self).__init__(**kwargs) - self.region = None - self.state = None - self.details = None - self.progress = None diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/replication_status.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/replication_status.py deleted file mode 100644 index e68cbc3b8a59..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/replication_status.py +++ /dev/null @@ -1,44 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ReplicationStatus(Model): - """This is the replication status of the gallery Image Version. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar aggregated_state: This is the aggregated replication status based on - all the regional replication status flags. Possible values include: - 'Unknown', 'InProgress', 'Completed', 'Failed' - :vartype aggregated_state: str or - ~azure.mgmt.compute.v2019_03_01.models.AggregatedReplicationState - :ivar summary: This is a summary of replication status for each region. - :vartype summary: - list[~azure.mgmt.compute.v2019_03_01.models.RegionalReplicationStatus] - """ - - _validation = { - 'aggregated_state': {'readonly': True}, - 'summary': {'readonly': True}, - } - - _attribute_map = { - 'aggregated_state': {'key': 'aggregatedState', 'type': 'str'}, - 'summary': {'key': 'summary', 'type': '[RegionalReplicationStatus]'}, - } - - def __init__(self, **kwargs): - super(ReplicationStatus, self).__init__(**kwargs) - self.aggregated_state = None - self.summary = None diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/replication_status_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/replication_status_py3.py deleted file mode 100644 index da66b206e47d..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/replication_status_py3.py +++ /dev/null @@ -1,44 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ReplicationStatus(Model): - """This is the replication status of the gallery Image Version. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar aggregated_state: This is the aggregated replication status based on - all the regional replication status flags. Possible values include: - 'Unknown', 'InProgress', 'Completed', 'Failed' - :vartype aggregated_state: str or - ~azure.mgmt.compute.v2019_03_01.models.AggregatedReplicationState - :ivar summary: This is a summary of replication status for each region. - :vartype summary: - list[~azure.mgmt.compute.v2019_03_01.models.RegionalReplicationStatus] - """ - - _validation = { - 'aggregated_state': {'readonly': True}, - 'summary': {'readonly': True}, - } - - _attribute_map = { - 'aggregated_state': {'key': 'aggregatedState', 'type': 'str'}, - 'summary': {'key': 'summary', 'type': '[RegionalReplicationStatus]'}, - } - - def __init__(self, **kwargs) -> None: - super(ReplicationStatus, self).__init__(**kwargs) - self.aggregated_state = None - self.summary = None diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/request_rate_by_interval_input.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/request_rate_by_interval_input.py deleted file mode 100644 index 2418a8f8ead0..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/request_rate_by_interval_input.py +++ /dev/null @@ -1,60 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .log_analytics_input_base import LogAnalyticsInputBase - - -class RequestRateByIntervalInput(LogAnalyticsInputBase): - """Api request input for LogAnalytics getRequestRateByInterval Api. - - All required parameters must be populated in order to send to Azure. - - :param blob_container_sas_uri: Required. SAS Uri of the logging blob - container to which LogAnalytics Api writes output logs to. - :type blob_container_sas_uri: str - :param from_time: Required. From time of the query - :type from_time: datetime - :param to_time: Required. To time of the query - :type to_time: datetime - :param group_by_throttle_policy: Group query result by Throttle Policy - applied. - :type group_by_throttle_policy: bool - :param group_by_operation_name: Group query result by Operation Name. - :type group_by_operation_name: bool - :param group_by_resource_name: Group query result by Resource Name. - :type group_by_resource_name: bool - :param interval_length: Required. Interval value in minutes used to create - LogAnalytics call rate logs. Possible values include: 'ThreeMins', - 'FiveMins', 'ThirtyMins', 'SixtyMins' - :type interval_length: str or - ~azure.mgmt.compute.v2019_03_01.models.IntervalInMins - """ - - _validation = { - 'blob_container_sas_uri': {'required': True}, - 'from_time': {'required': True}, - 'to_time': {'required': True}, - 'interval_length': {'required': True}, - } - - _attribute_map = { - 'blob_container_sas_uri': {'key': 'blobContainerSasUri', 'type': 'str'}, - 'from_time': {'key': 'fromTime', 'type': 'iso-8601'}, - 'to_time': {'key': 'toTime', 'type': 'iso-8601'}, - 'group_by_throttle_policy': {'key': 'groupByThrottlePolicy', 'type': 'bool'}, - 'group_by_operation_name': {'key': 'groupByOperationName', 'type': 'bool'}, - 'group_by_resource_name': {'key': 'groupByResourceName', 'type': 'bool'}, - 'interval_length': {'key': 'intervalLength', 'type': 'IntervalInMins'}, - } - - def __init__(self, **kwargs): - super(RequestRateByIntervalInput, self).__init__(**kwargs) - self.interval_length = kwargs.get('interval_length', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/request_rate_by_interval_input_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/request_rate_by_interval_input_py3.py deleted file mode 100644 index 441d490983fe..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/request_rate_by_interval_input_py3.py +++ /dev/null @@ -1,60 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .log_analytics_input_base_py3 import LogAnalyticsInputBase - - -class RequestRateByIntervalInput(LogAnalyticsInputBase): - """Api request input for LogAnalytics getRequestRateByInterval Api. - - All required parameters must be populated in order to send to Azure. - - :param blob_container_sas_uri: Required. SAS Uri of the logging blob - container to which LogAnalytics Api writes output logs to. - :type blob_container_sas_uri: str - :param from_time: Required. From time of the query - :type from_time: datetime - :param to_time: Required. To time of the query - :type to_time: datetime - :param group_by_throttle_policy: Group query result by Throttle Policy - applied. - :type group_by_throttle_policy: bool - :param group_by_operation_name: Group query result by Operation Name. - :type group_by_operation_name: bool - :param group_by_resource_name: Group query result by Resource Name. - :type group_by_resource_name: bool - :param interval_length: Required. Interval value in minutes used to create - LogAnalytics call rate logs. Possible values include: 'ThreeMins', - 'FiveMins', 'ThirtyMins', 'SixtyMins' - :type interval_length: str or - ~azure.mgmt.compute.v2019_03_01.models.IntervalInMins - """ - - _validation = { - 'blob_container_sas_uri': {'required': True}, - 'from_time': {'required': True}, - 'to_time': {'required': True}, - 'interval_length': {'required': True}, - } - - _attribute_map = { - 'blob_container_sas_uri': {'key': 'blobContainerSasUri', 'type': 'str'}, - 'from_time': {'key': 'fromTime', 'type': 'iso-8601'}, - 'to_time': {'key': 'toTime', 'type': 'iso-8601'}, - 'group_by_throttle_policy': {'key': 'groupByThrottlePolicy', 'type': 'bool'}, - 'group_by_operation_name': {'key': 'groupByOperationName', 'type': 'bool'}, - 'group_by_resource_name': {'key': 'groupByResourceName', 'type': 'bool'}, - 'interval_length': {'key': 'intervalLength', 'type': 'IntervalInMins'}, - } - - def __init__(self, *, blob_container_sas_uri: str, from_time, to_time, interval_length, group_by_throttle_policy: bool=None, group_by_operation_name: bool=None, group_by_resource_name: bool=None, **kwargs) -> None: - super(RequestRateByIntervalInput, self).__init__(blob_container_sas_uri=blob_container_sas_uri, from_time=from_time, to_time=to_time, group_by_throttle_policy=group_by_throttle_policy, group_by_operation_name=group_by_operation_name, group_by_resource_name=group_by_resource_name, **kwargs) - self.interval_length = interval_length diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/resource.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/resource.py deleted file mode 100644 index 5dd7d481c685..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/resource.py +++ /dev/null @@ -1,56 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class Resource(Model): - """The Resource model definition. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource Id - :vartype id: str - :ivar name: Resource name - :vartype name: str - :ivar type: Resource type - :vartype type: str - :param location: Required. Resource location - :type location: str - :param tags: Resource tags - :type tags: dict[str, str] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - } - - def __init__(self, **kwargs): - super(Resource, self).__init__(**kwargs) - self.id = None - self.name = None - self.type = None - self.location = kwargs.get('location', None) - self.tags = kwargs.get('tags', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/resource_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/resource_py3.py deleted file mode 100644 index 2f3702caf609..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/resource_py3.py +++ /dev/null @@ -1,56 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class Resource(Model): - """The Resource model definition. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource Id - :vartype id: str - :ivar name: Resource name - :vartype name: str - :ivar type: Resource type - :vartype type: str - :param location: Required. Resource location - :type location: str - :param tags: Resource tags - :type tags: dict[str, str] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - } - - def __init__(self, *, location: str, tags=None, **kwargs) -> None: - super(Resource, self).__init__(**kwargs) - self.id = None - self.name = None - self.type = None - self.location = location - self.tags = tags diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/resource_range.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/resource_range.py deleted file mode 100644 index 6ebd52ac68d6..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/resource_range.py +++ /dev/null @@ -1,32 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ResourceRange(Model): - """Describes the resource range. - - :param min: The minimum number of the resource. - :type min: int - :param max: The maximum number of the resource. - :type max: int - """ - - _attribute_map = { - 'min': {'key': 'min', 'type': 'int'}, - 'max': {'key': 'max', 'type': 'int'}, - } - - def __init__(self, **kwargs): - super(ResourceRange, self).__init__(**kwargs) - self.min = kwargs.get('min', None) - self.max = kwargs.get('max', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/resource_range_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/resource_range_py3.py deleted file mode 100644 index 8ce42edfcc6d..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/resource_range_py3.py +++ /dev/null @@ -1,32 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ResourceRange(Model): - """Describes the resource range. - - :param min: The minimum number of the resource. - :type min: int - :param max: The maximum number of the resource. - :type max: int - """ - - _attribute_map = { - 'min': {'key': 'min', 'type': 'int'}, - 'max': {'key': 'max', 'type': 'int'}, - } - - def __init__(self, *, min: int=None, max: int=None, **kwargs) -> None: - super(ResourceRange, self).__init__(**kwargs) - self.min = min - self.max = max diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/rollback_status_info.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/rollback_status_info.py deleted file mode 100644 index 8cec1e715e8f..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/rollback_status_info.py +++ /dev/null @@ -1,48 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class RollbackStatusInfo(Model): - """Information about rollback on failed VM instances after a OS Upgrade - operation. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar successfully_rolledback_instance_count: The number of instances - which have been successfully rolled back. - :vartype successfully_rolledback_instance_count: int - :ivar failed_rolledback_instance_count: The number of instances which - failed to rollback. - :vartype failed_rolledback_instance_count: int - :ivar rollback_error: Error details if OS rollback failed. - :vartype rollback_error: ~azure.mgmt.compute.v2019_03_01.models.ApiError - """ - - _validation = { - 'successfully_rolledback_instance_count': {'readonly': True}, - 'failed_rolledback_instance_count': {'readonly': True}, - 'rollback_error': {'readonly': True}, - } - - _attribute_map = { - 'successfully_rolledback_instance_count': {'key': 'successfullyRolledbackInstanceCount', 'type': 'int'}, - 'failed_rolledback_instance_count': {'key': 'failedRolledbackInstanceCount', 'type': 'int'}, - 'rollback_error': {'key': 'rollbackError', 'type': 'ApiError'}, - } - - def __init__(self, **kwargs): - super(RollbackStatusInfo, self).__init__(**kwargs) - self.successfully_rolledback_instance_count = None - self.failed_rolledback_instance_count = None - self.rollback_error = None diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/rollback_status_info_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/rollback_status_info_py3.py deleted file mode 100644 index cc8f105e39b6..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/rollback_status_info_py3.py +++ /dev/null @@ -1,48 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class RollbackStatusInfo(Model): - """Information about rollback on failed VM instances after a OS Upgrade - operation. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar successfully_rolledback_instance_count: The number of instances - which have been successfully rolled back. - :vartype successfully_rolledback_instance_count: int - :ivar failed_rolledback_instance_count: The number of instances which - failed to rollback. - :vartype failed_rolledback_instance_count: int - :ivar rollback_error: Error details if OS rollback failed. - :vartype rollback_error: ~azure.mgmt.compute.v2019_03_01.models.ApiError - """ - - _validation = { - 'successfully_rolledback_instance_count': {'readonly': True}, - 'failed_rolledback_instance_count': {'readonly': True}, - 'rollback_error': {'readonly': True}, - } - - _attribute_map = { - 'successfully_rolledback_instance_count': {'key': 'successfullyRolledbackInstanceCount', 'type': 'int'}, - 'failed_rolledback_instance_count': {'key': 'failedRolledbackInstanceCount', 'type': 'int'}, - 'rollback_error': {'key': 'rollbackError', 'type': 'ApiError'}, - } - - def __init__(self, **kwargs) -> None: - super(RollbackStatusInfo, self).__init__(**kwargs) - self.successfully_rolledback_instance_count = None - self.failed_rolledback_instance_count = None - self.rollback_error = None diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/rolling_upgrade_policy.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/rolling_upgrade_policy.py deleted file mode 100644 index 1eecaa5e2e65..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/rolling_upgrade_policy.py +++ /dev/null @@ -1,63 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class RollingUpgradePolicy(Model): - """The configuration parameters used while performing a rolling upgrade. - - :param max_batch_instance_percent: The maximum percent of total virtual - machine instances that will be upgraded simultaneously by the rolling - upgrade in one batch. As this is a maximum, unhealthy instances in - previous or future batches can cause the percentage of instances in a - batch to decrease to ensure higher reliability. The default value for this - parameter is 20%. - :type max_batch_instance_percent: int - :param max_unhealthy_instance_percent: The maximum percentage of the total - virtual machine instances in the scale set that can be simultaneously - unhealthy, either as a result of being upgraded, or by being found in an - unhealthy state by the virtual machine health checks before the rolling - upgrade aborts. This constraint will be checked prior to starting any - batch. The default value for this parameter is 20%. - :type max_unhealthy_instance_percent: int - :param max_unhealthy_upgraded_instance_percent: The maximum percentage of - upgraded virtual machine instances that can be found to be in an unhealthy - state. This check will happen after each batch is upgraded. If this - percentage is ever exceeded, the rolling update aborts. The default value - for this parameter is 20%. - :type max_unhealthy_upgraded_instance_percent: int - :param pause_time_between_batches: The wait time between completing the - update for all virtual machines in one batch and starting the next batch. - The time duration should be specified in ISO 8601 format. The default - value is 0 seconds (PT0S). - :type pause_time_between_batches: str - """ - - _validation = { - 'max_batch_instance_percent': {'maximum': 100, 'minimum': 5}, - 'max_unhealthy_instance_percent': {'maximum': 100, 'minimum': 5}, - 'max_unhealthy_upgraded_instance_percent': {'maximum': 100, 'minimum': 0}, - } - - _attribute_map = { - 'max_batch_instance_percent': {'key': 'maxBatchInstancePercent', 'type': 'int'}, - 'max_unhealthy_instance_percent': {'key': 'maxUnhealthyInstancePercent', 'type': 'int'}, - 'max_unhealthy_upgraded_instance_percent': {'key': 'maxUnhealthyUpgradedInstancePercent', 'type': 'int'}, - 'pause_time_between_batches': {'key': 'pauseTimeBetweenBatches', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(RollingUpgradePolicy, self).__init__(**kwargs) - self.max_batch_instance_percent = kwargs.get('max_batch_instance_percent', None) - self.max_unhealthy_instance_percent = kwargs.get('max_unhealthy_instance_percent', None) - self.max_unhealthy_upgraded_instance_percent = kwargs.get('max_unhealthy_upgraded_instance_percent', None) - self.pause_time_between_batches = kwargs.get('pause_time_between_batches', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/rolling_upgrade_policy_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/rolling_upgrade_policy_py3.py deleted file mode 100644 index e698a382f112..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/rolling_upgrade_policy_py3.py +++ /dev/null @@ -1,63 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class RollingUpgradePolicy(Model): - """The configuration parameters used while performing a rolling upgrade. - - :param max_batch_instance_percent: The maximum percent of total virtual - machine instances that will be upgraded simultaneously by the rolling - upgrade in one batch. As this is a maximum, unhealthy instances in - previous or future batches can cause the percentage of instances in a - batch to decrease to ensure higher reliability. The default value for this - parameter is 20%. - :type max_batch_instance_percent: int - :param max_unhealthy_instance_percent: The maximum percentage of the total - virtual machine instances in the scale set that can be simultaneously - unhealthy, either as a result of being upgraded, or by being found in an - unhealthy state by the virtual machine health checks before the rolling - upgrade aborts. This constraint will be checked prior to starting any - batch. The default value for this parameter is 20%. - :type max_unhealthy_instance_percent: int - :param max_unhealthy_upgraded_instance_percent: The maximum percentage of - upgraded virtual machine instances that can be found to be in an unhealthy - state. This check will happen after each batch is upgraded. If this - percentage is ever exceeded, the rolling update aborts. The default value - for this parameter is 20%. - :type max_unhealthy_upgraded_instance_percent: int - :param pause_time_between_batches: The wait time between completing the - update for all virtual machines in one batch and starting the next batch. - The time duration should be specified in ISO 8601 format. The default - value is 0 seconds (PT0S). - :type pause_time_between_batches: str - """ - - _validation = { - 'max_batch_instance_percent': {'maximum': 100, 'minimum': 5}, - 'max_unhealthy_instance_percent': {'maximum': 100, 'minimum': 5}, - 'max_unhealthy_upgraded_instance_percent': {'maximum': 100, 'minimum': 0}, - } - - _attribute_map = { - 'max_batch_instance_percent': {'key': 'maxBatchInstancePercent', 'type': 'int'}, - 'max_unhealthy_instance_percent': {'key': 'maxUnhealthyInstancePercent', 'type': 'int'}, - 'max_unhealthy_upgraded_instance_percent': {'key': 'maxUnhealthyUpgradedInstancePercent', 'type': 'int'}, - 'pause_time_between_batches': {'key': 'pauseTimeBetweenBatches', 'type': 'str'}, - } - - def __init__(self, *, max_batch_instance_percent: int=None, max_unhealthy_instance_percent: int=None, max_unhealthy_upgraded_instance_percent: int=None, pause_time_between_batches: str=None, **kwargs) -> None: - super(RollingUpgradePolicy, self).__init__(**kwargs) - self.max_batch_instance_percent = max_batch_instance_percent - self.max_unhealthy_instance_percent = max_unhealthy_instance_percent - self.max_unhealthy_upgraded_instance_percent = max_unhealthy_upgraded_instance_percent - self.pause_time_between_batches = pause_time_between_batches diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/rolling_upgrade_progress_info.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/rolling_upgrade_progress_info.py deleted file mode 100644 index 87e40590e275..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/rolling_upgrade_progress_info.py +++ /dev/null @@ -1,55 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class RollingUpgradeProgressInfo(Model): - """Information about the number of virtual machine instances in each upgrade - state. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar successful_instance_count: The number of instances that have been - successfully upgraded. - :vartype successful_instance_count: int - :ivar failed_instance_count: The number of instances that have failed to - be upgraded successfully. - :vartype failed_instance_count: int - :ivar in_progress_instance_count: The number of instances that are - currently being upgraded. - :vartype in_progress_instance_count: int - :ivar pending_instance_count: The number of instances that have not yet - begun to be upgraded. - :vartype pending_instance_count: int - """ - - _validation = { - 'successful_instance_count': {'readonly': True}, - 'failed_instance_count': {'readonly': True}, - 'in_progress_instance_count': {'readonly': True}, - 'pending_instance_count': {'readonly': True}, - } - - _attribute_map = { - 'successful_instance_count': {'key': 'successfulInstanceCount', 'type': 'int'}, - 'failed_instance_count': {'key': 'failedInstanceCount', 'type': 'int'}, - 'in_progress_instance_count': {'key': 'inProgressInstanceCount', 'type': 'int'}, - 'pending_instance_count': {'key': 'pendingInstanceCount', 'type': 'int'}, - } - - def __init__(self, **kwargs): - super(RollingUpgradeProgressInfo, self).__init__(**kwargs) - self.successful_instance_count = None - self.failed_instance_count = None - self.in_progress_instance_count = None - self.pending_instance_count = None diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/rolling_upgrade_progress_info_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/rolling_upgrade_progress_info_py3.py deleted file mode 100644 index 060abc3063b4..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/rolling_upgrade_progress_info_py3.py +++ /dev/null @@ -1,55 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class RollingUpgradeProgressInfo(Model): - """Information about the number of virtual machine instances in each upgrade - state. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar successful_instance_count: The number of instances that have been - successfully upgraded. - :vartype successful_instance_count: int - :ivar failed_instance_count: The number of instances that have failed to - be upgraded successfully. - :vartype failed_instance_count: int - :ivar in_progress_instance_count: The number of instances that are - currently being upgraded. - :vartype in_progress_instance_count: int - :ivar pending_instance_count: The number of instances that have not yet - begun to be upgraded. - :vartype pending_instance_count: int - """ - - _validation = { - 'successful_instance_count': {'readonly': True}, - 'failed_instance_count': {'readonly': True}, - 'in_progress_instance_count': {'readonly': True}, - 'pending_instance_count': {'readonly': True}, - } - - _attribute_map = { - 'successful_instance_count': {'key': 'successfulInstanceCount', 'type': 'int'}, - 'failed_instance_count': {'key': 'failedInstanceCount', 'type': 'int'}, - 'in_progress_instance_count': {'key': 'inProgressInstanceCount', 'type': 'int'}, - 'pending_instance_count': {'key': 'pendingInstanceCount', 'type': 'int'}, - } - - def __init__(self, **kwargs) -> None: - super(RollingUpgradeProgressInfo, self).__init__(**kwargs) - self.successful_instance_count = None - self.failed_instance_count = None - self.in_progress_instance_count = None - self.pending_instance_count = None diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/rolling_upgrade_running_status.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/rolling_upgrade_running_status.py deleted file mode 100644 index aea61b13e715..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/rolling_upgrade_running_status.py +++ /dev/null @@ -1,54 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class RollingUpgradeRunningStatus(Model): - """Information about the current running state of the overall upgrade. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar code: Code indicating the current status of the upgrade. Possible - values include: 'RollingForward', 'Cancelled', 'Completed', 'Faulted' - :vartype code: str or - ~azure.mgmt.compute.v2019_03_01.models.RollingUpgradeStatusCode - :ivar start_time: Start time of the upgrade. - :vartype start_time: datetime - :ivar last_action: The last action performed on the rolling upgrade. - Possible values include: 'Start', 'Cancel' - :vartype last_action: str or - ~azure.mgmt.compute.v2019_03_01.models.RollingUpgradeActionType - :ivar last_action_time: Last action time of the upgrade. - :vartype last_action_time: datetime - """ - - _validation = { - 'code': {'readonly': True}, - 'start_time': {'readonly': True}, - 'last_action': {'readonly': True}, - 'last_action_time': {'readonly': True}, - } - - _attribute_map = { - 'code': {'key': 'code', 'type': 'RollingUpgradeStatusCode'}, - 'start_time': {'key': 'startTime', 'type': 'iso-8601'}, - 'last_action': {'key': 'lastAction', 'type': 'RollingUpgradeActionType'}, - 'last_action_time': {'key': 'lastActionTime', 'type': 'iso-8601'}, - } - - def __init__(self, **kwargs): - super(RollingUpgradeRunningStatus, self).__init__(**kwargs) - self.code = None - self.start_time = None - self.last_action = None - self.last_action_time = None diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/rolling_upgrade_running_status_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/rolling_upgrade_running_status_py3.py deleted file mode 100644 index dc5299dba672..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/rolling_upgrade_running_status_py3.py +++ /dev/null @@ -1,54 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class RollingUpgradeRunningStatus(Model): - """Information about the current running state of the overall upgrade. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar code: Code indicating the current status of the upgrade. Possible - values include: 'RollingForward', 'Cancelled', 'Completed', 'Faulted' - :vartype code: str or - ~azure.mgmt.compute.v2019_03_01.models.RollingUpgradeStatusCode - :ivar start_time: Start time of the upgrade. - :vartype start_time: datetime - :ivar last_action: The last action performed on the rolling upgrade. - Possible values include: 'Start', 'Cancel' - :vartype last_action: str or - ~azure.mgmt.compute.v2019_03_01.models.RollingUpgradeActionType - :ivar last_action_time: Last action time of the upgrade. - :vartype last_action_time: datetime - """ - - _validation = { - 'code': {'readonly': True}, - 'start_time': {'readonly': True}, - 'last_action': {'readonly': True}, - 'last_action_time': {'readonly': True}, - } - - _attribute_map = { - 'code': {'key': 'code', 'type': 'RollingUpgradeStatusCode'}, - 'start_time': {'key': 'startTime', 'type': 'iso-8601'}, - 'last_action': {'key': 'lastAction', 'type': 'RollingUpgradeActionType'}, - 'last_action_time': {'key': 'lastActionTime', 'type': 'iso-8601'}, - } - - def __init__(self, **kwargs) -> None: - super(RollingUpgradeRunningStatus, self).__init__(**kwargs) - self.code = None - self.start_time = None - self.last_action = None - self.last_action_time = None diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/rolling_upgrade_status_info.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/rolling_upgrade_status_info.py deleted file mode 100644 index ca9565870e62..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/rolling_upgrade_status_info.py +++ /dev/null @@ -1,76 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource import Resource - - -class RollingUpgradeStatusInfo(Resource): - """The status of the latest virtual machine scale set rolling upgrade. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource Id - :vartype id: str - :ivar name: Resource name - :vartype name: str - :ivar type: Resource type - :vartype type: str - :param location: Required. Resource location - :type location: str - :param tags: Resource tags - :type tags: dict[str, str] - :ivar policy: The rolling upgrade policies applied for this upgrade. - :vartype policy: - ~azure.mgmt.compute.v2019_03_01.models.RollingUpgradePolicy - :ivar running_status: Information about the current running state of the - overall upgrade. - :vartype running_status: - ~azure.mgmt.compute.v2019_03_01.models.RollingUpgradeRunningStatus - :ivar progress: Information about the number of virtual machine instances - in each upgrade state. - :vartype progress: - ~azure.mgmt.compute.v2019_03_01.models.RollingUpgradeProgressInfo - :ivar error: Error details for this upgrade, if there are any. - :vartype error: ~azure.mgmt.compute.v2019_03_01.models.ApiError - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - 'policy': {'readonly': True}, - 'running_status': {'readonly': True}, - 'progress': {'readonly': True}, - 'error': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'policy': {'key': 'properties.policy', 'type': 'RollingUpgradePolicy'}, - 'running_status': {'key': 'properties.runningStatus', 'type': 'RollingUpgradeRunningStatus'}, - 'progress': {'key': 'properties.progress', 'type': 'RollingUpgradeProgressInfo'}, - 'error': {'key': 'properties.error', 'type': 'ApiError'}, - } - - def __init__(self, **kwargs): - super(RollingUpgradeStatusInfo, self).__init__(**kwargs) - self.policy = None - self.running_status = None - self.progress = None - self.error = None diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/rolling_upgrade_status_info_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/rolling_upgrade_status_info_py3.py deleted file mode 100644 index 6b8cebeda9ae..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/rolling_upgrade_status_info_py3.py +++ /dev/null @@ -1,76 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource_py3 import Resource - - -class RollingUpgradeStatusInfo(Resource): - """The status of the latest virtual machine scale set rolling upgrade. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource Id - :vartype id: str - :ivar name: Resource name - :vartype name: str - :ivar type: Resource type - :vartype type: str - :param location: Required. Resource location - :type location: str - :param tags: Resource tags - :type tags: dict[str, str] - :ivar policy: The rolling upgrade policies applied for this upgrade. - :vartype policy: - ~azure.mgmt.compute.v2019_03_01.models.RollingUpgradePolicy - :ivar running_status: Information about the current running state of the - overall upgrade. - :vartype running_status: - ~azure.mgmt.compute.v2019_03_01.models.RollingUpgradeRunningStatus - :ivar progress: Information about the number of virtual machine instances - in each upgrade state. - :vartype progress: - ~azure.mgmt.compute.v2019_03_01.models.RollingUpgradeProgressInfo - :ivar error: Error details for this upgrade, if there are any. - :vartype error: ~azure.mgmt.compute.v2019_03_01.models.ApiError - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - 'policy': {'readonly': True}, - 'running_status': {'readonly': True}, - 'progress': {'readonly': True}, - 'error': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'policy': {'key': 'properties.policy', 'type': 'RollingUpgradePolicy'}, - 'running_status': {'key': 'properties.runningStatus', 'type': 'RollingUpgradeRunningStatus'}, - 'progress': {'key': 'properties.progress', 'type': 'RollingUpgradeProgressInfo'}, - 'error': {'key': 'properties.error', 'type': 'ApiError'}, - } - - def __init__(self, *, location: str, tags=None, **kwargs) -> None: - super(RollingUpgradeStatusInfo, self).__init__(location=location, tags=tags, **kwargs) - self.policy = None - self.running_status = None - self.progress = None - self.error = None diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/run_command_document.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/run_command_document.py deleted file mode 100644 index 9383e18b2ec3..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/run_command_document.py +++ /dev/null @@ -1,61 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .run_command_document_base import RunCommandDocumentBase - - -class RunCommandDocument(RunCommandDocumentBase): - """Describes the properties of a Run Command. - - All required parameters must be populated in order to send to Azure. - - :param schema: Required. The VM run command schema. - :type schema: str - :param id: Required. The VM run command id. - :type id: str - :param os_type: Required. The Operating System type. Possible values - include: 'Windows', 'Linux' - :type os_type: str or - ~azure.mgmt.compute.v2019_03_01.models.OperatingSystemTypes - :param label: Required. The VM run command label. - :type label: str - :param description: Required. The VM run command description. - :type description: str - :param script: Required. The script to be executed. - :type script: list[str] - :param parameters: The parameters used by the script. - :type parameters: - list[~azure.mgmt.compute.v2019_03_01.models.RunCommandParameterDefinition] - """ - - _validation = { - 'schema': {'required': True}, - 'id': {'required': True}, - 'os_type': {'required': True}, - 'label': {'required': True}, - 'description': {'required': True}, - 'script': {'required': True}, - } - - _attribute_map = { - 'schema': {'key': '$schema', 'type': 'str'}, - 'id': {'key': 'id', 'type': 'str'}, - 'os_type': {'key': 'osType', 'type': 'OperatingSystemTypes'}, - 'label': {'key': 'label', 'type': 'str'}, - 'description': {'key': 'description', 'type': 'str'}, - 'script': {'key': 'script', 'type': '[str]'}, - 'parameters': {'key': 'parameters', 'type': '[RunCommandParameterDefinition]'}, - } - - def __init__(self, **kwargs): - super(RunCommandDocument, self).__init__(**kwargs) - self.script = kwargs.get('script', None) - self.parameters = kwargs.get('parameters', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/run_command_document_base.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/run_command_document_base.py deleted file mode 100644 index 7a6ca51f13ed..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/run_command_document_base.py +++ /dev/null @@ -1,56 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class RunCommandDocumentBase(Model): - """Describes the properties of a Run Command metadata. - - All required parameters must be populated in order to send to Azure. - - :param schema: Required. The VM run command schema. - :type schema: str - :param id: Required. The VM run command id. - :type id: str - :param os_type: Required. The Operating System type. Possible values - include: 'Windows', 'Linux' - :type os_type: str or - ~azure.mgmt.compute.v2019_03_01.models.OperatingSystemTypes - :param label: Required. The VM run command label. - :type label: str - :param description: Required. The VM run command description. - :type description: str - """ - - _validation = { - 'schema': {'required': True}, - 'id': {'required': True}, - 'os_type': {'required': True}, - 'label': {'required': True}, - 'description': {'required': True}, - } - - _attribute_map = { - 'schema': {'key': '$schema', 'type': 'str'}, - 'id': {'key': 'id', 'type': 'str'}, - 'os_type': {'key': 'osType', 'type': 'OperatingSystemTypes'}, - 'label': {'key': 'label', 'type': 'str'}, - 'description': {'key': 'description', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(RunCommandDocumentBase, self).__init__(**kwargs) - self.schema = kwargs.get('schema', None) - self.id = kwargs.get('id', None) - self.os_type = kwargs.get('os_type', None) - self.label = kwargs.get('label', None) - self.description = kwargs.get('description', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/run_command_document_base_paged.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/run_command_document_base_paged.py deleted file mode 100644 index 445a418cd44b..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/run_command_document_base_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class RunCommandDocumentBasePaged(Paged): - """ - A paging container for iterating over a list of :class:`RunCommandDocumentBase ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[RunCommandDocumentBase]'} - } - - def __init__(self, *args, **kwargs): - - super(RunCommandDocumentBasePaged, self).__init__(*args, **kwargs) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/run_command_document_base_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/run_command_document_base_py3.py deleted file mode 100644 index 004210f90c23..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/run_command_document_base_py3.py +++ /dev/null @@ -1,56 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class RunCommandDocumentBase(Model): - """Describes the properties of a Run Command metadata. - - All required parameters must be populated in order to send to Azure. - - :param schema: Required. The VM run command schema. - :type schema: str - :param id: Required. The VM run command id. - :type id: str - :param os_type: Required. The Operating System type. Possible values - include: 'Windows', 'Linux' - :type os_type: str or - ~azure.mgmt.compute.v2019_03_01.models.OperatingSystemTypes - :param label: Required. The VM run command label. - :type label: str - :param description: Required. The VM run command description. - :type description: str - """ - - _validation = { - 'schema': {'required': True}, - 'id': {'required': True}, - 'os_type': {'required': True}, - 'label': {'required': True}, - 'description': {'required': True}, - } - - _attribute_map = { - 'schema': {'key': '$schema', 'type': 'str'}, - 'id': {'key': 'id', 'type': 'str'}, - 'os_type': {'key': 'osType', 'type': 'OperatingSystemTypes'}, - 'label': {'key': 'label', 'type': 'str'}, - 'description': {'key': 'description', 'type': 'str'}, - } - - def __init__(self, *, schema: str, id: str, os_type, label: str, description: str, **kwargs) -> None: - super(RunCommandDocumentBase, self).__init__(**kwargs) - self.schema = schema - self.id = id - self.os_type = os_type - self.label = label - self.description = description diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/run_command_document_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/run_command_document_py3.py deleted file mode 100644 index 830a7dcd727b..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/run_command_document_py3.py +++ /dev/null @@ -1,61 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .run_command_document_base_py3 import RunCommandDocumentBase - - -class RunCommandDocument(RunCommandDocumentBase): - """Describes the properties of a Run Command. - - All required parameters must be populated in order to send to Azure. - - :param schema: Required. The VM run command schema. - :type schema: str - :param id: Required. The VM run command id. - :type id: str - :param os_type: Required. The Operating System type. Possible values - include: 'Windows', 'Linux' - :type os_type: str or - ~azure.mgmt.compute.v2019_03_01.models.OperatingSystemTypes - :param label: Required. The VM run command label. - :type label: str - :param description: Required. The VM run command description. - :type description: str - :param script: Required. The script to be executed. - :type script: list[str] - :param parameters: The parameters used by the script. - :type parameters: - list[~azure.mgmt.compute.v2019_03_01.models.RunCommandParameterDefinition] - """ - - _validation = { - 'schema': {'required': True}, - 'id': {'required': True}, - 'os_type': {'required': True}, - 'label': {'required': True}, - 'description': {'required': True}, - 'script': {'required': True}, - } - - _attribute_map = { - 'schema': {'key': '$schema', 'type': 'str'}, - 'id': {'key': 'id', 'type': 'str'}, - 'os_type': {'key': 'osType', 'type': 'OperatingSystemTypes'}, - 'label': {'key': 'label', 'type': 'str'}, - 'description': {'key': 'description', 'type': 'str'}, - 'script': {'key': 'script', 'type': '[str]'}, - 'parameters': {'key': 'parameters', 'type': '[RunCommandParameterDefinition]'}, - } - - def __init__(self, *, schema: str, id: str, os_type, label: str, description: str, script, parameters=None, **kwargs) -> None: - super(RunCommandDocument, self).__init__(schema=schema, id=id, os_type=os_type, label=label, description=description, **kwargs) - self.script = script - self.parameters = parameters diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/run_command_input.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/run_command_input.py deleted file mode 100644 index a522b1bd6399..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/run_command_input.py +++ /dev/null @@ -1,44 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class RunCommandInput(Model): - """Capture Virtual Machine parameters. - - All required parameters must be populated in order to send to Azure. - - :param command_id: Required. The run command id. - :type command_id: str - :param script: Optional. The script to be executed. When this value is - given, the given script will override the default script of the command. - :type script: list[str] - :param parameters: The run command parameters. - :type parameters: - list[~azure.mgmt.compute.v2019_03_01.models.RunCommandInputParameter] - """ - - _validation = { - 'command_id': {'required': True}, - } - - _attribute_map = { - 'command_id': {'key': 'commandId', 'type': 'str'}, - 'script': {'key': 'script', 'type': '[str]'}, - 'parameters': {'key': 'parameters', 'type': '[RunCommandInputParameter]'}, - } - - def __init__(self, **kwargs): - super(RunCommandInput, self).__init__(**kwargs) - self.command_id = kwargs.get('command_id', None) - self.script = kwargs.get('script', None) - self.parameters = kwargs.get('parameters', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/run_command_input_parameter.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/run_command_input_parameter.py deleted file mode 100644 index cd76ad81bfa2..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/run_command_input_parameter.py +++ /dev/null @@ -1,39 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class RunCommandInputParameter(Model): - """Describes the properties of a run command parameter. - - All required parameters must be populated in order to send to Azure. - - :param name: Required. The run command parameter name. - :type name: str - :param value: Required. The run command parameter value. - :type value: str - """ - - _validation = { - 'name': {'required': True}, - 'value': {'required': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'value': {'key': 'value', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(RunCommandInputParameter, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.value = kwargs.get('value', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/run_command_input_parameter_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/run_command_input_parameter_py3.py deleted file mode 100644 index 6013f038a1c3..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/run_command_input_parameter_py3.py +++ /dev/null @@ -1,39 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class RunCommandInputParameter(Model): - """Describes the properties of a run command parameter. - - All required parameters must be populated in order to send to Azure. - - :param name: Required. The run command parameter name. - :type name: str - :param value: Required. The run command parameter value. - :type value: str - """ - - _validation = { - 'name': {'required': True}, - 'value': {'required': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'value': {'key': 'value', 'type': 'str'}, - } - - def __init__(self, *, name: str, value: str, **kwargs) -> None: - super(RunCommandInputParameter, self).__init__(**kwargs) - self.name = name - self.value = value diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/run_command_input_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/run_command_input_py3.py deleted file mode 100644 index baacf80442ef..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/run_command_input_py3.py +++ /dev/null @@ -1,44 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class RunCommandInput(Model): - """Capture Virtual Machine parameters. - - All required parameters must be populated in order to send to Azure. - - :param command_id: Required. The run command id. - :type command_id: str - :param script: Optional. The script to be executed. When this value is - given, the given script will override the default script of the command. - :type script: list[str] - :param parameters: The run command parameters. - :type parameters: - list[~azure.mgmt.compute.v2019_03_01.models.RunCommandInputParameter] - """ - - _validation = { - 'command_id': {'required': True}, - } - - _attribute_map = { - 'command_id': {'key': 'commandId', 'type': 'str'}, - 'script': {'key': 'script', 'type': '[str]'}, - 'parameters': {'key': 'parameters', 'type': '[RunCommandInputParameter]'}, - } - - def __init__(self, *, command_id: str, script=None, parameters=None, **kwargs) -> None: - super(RunCommandInput, self).__init__(**kwargs) - self.command_id = command_id - self.script = script - self.parameters = parameters diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/run_command_parameter_definition.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/run_command_parameter_definition.py deleted file mode 100644 index e09f774d8241..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/run_command_parameter_definition.py +++ /dev/null @@ -1,48 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class RunCommandParameterDefinition(Model): - """Describes the properties of a run command parameter. - - All required parameters must be populated in order to send to Azure. - - :param name: Required. The run command parameter name. - :type name: str - :param type: Required. The run command parameter type. - :type type: str - :param default_value: The run command parameter default value. - :type default_value: str - :param required: The run command parameter required. Default value: False - . - :type required: bool - """ - - _validation = { - 'name': {'required': True}, - 'type': {'required': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'default_value': {'key': 'defaultValue', 'type': 'str'}, - 'required': {'key': 'required', 'type': 'bool'}, - } - - def __init__(self, **kwargs): - super(RunCommandParameterDefinition, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.type = kwargs.get('type', None) - self.default_value = kwargs.get('default_value', None) - self.required = kwargs.get('required', False) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/run_command_parameter_definition_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/run_command_parameter_definition_py3.py deleted file mode 100644 index e5fbc708f965..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/run_command_parameter_definition_py3.py +++ /dev/null @@ -1,48 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class RunCommandParameterDefinition(Model): - """Describes the properties of a run command parameter. - - All required parameters must be populated in order to send to Azure. - - :param name: Required. The run command parameter name. - :type name: str - :param type: Required. The run command parameter type. - :type type: str - :param default_value: The run command parameter default value. - :type default_value: str - :param required: The run command parameter required. Default value: False - . - :type required: bool - """ - - _validation = { - 'name': {'required': True}, - 'type': {'required': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'default_value': {'key': 'defaultValue', 'type': 'str'}, - 'required': {'key': 'required', 'type': 'bool'}, - } - - def __init__(self, *, name: str, type: str, default_value: str=None, required: bool=False, **kwargs) -> None: - super(RunCommandParameterDefinition, self).__init__(**kwargs) - self.name = name - self.type = type - self.default_value = default_value - self.required = required diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/run_command_result.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/run_command_result.py deleted file mode 100644 index 241871575876..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/run_command_result.py +++ /dev/null @@ -1,29 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class RunCommandResult(Model): - """RunCommandResult. - - :param value: Run command operation response. - :type value: - list[~azure.mgmt.compute.v2019_03_01.models.InstanceViewStatus] - """ - - _attribute_map = { - 'value': {'key': 'value', 'type': '[InstanceViewStatus]'}, - } - - def __init__(self, **kwargs): - super(RunCommandResult, self).__init__(**kwargs) - self.value = kwargs.get('value', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/run_command_result_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/run_command_result_py3.py deleted file mode 100644 index 06f7c68bd649..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/run_command_result_py3.py +++ /dev/null @@ -1,29 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class RunCommandResult(Model): - """RunCommandResult. - - :param value: Run command operation response. - :type value: - list[~azure.mgmt.compute.v2019_03_01.models.InstanceViewStatus] - """ - - _attribute_map = { - 'value': {'key': 'value', 'type': '[InstanceViewStatus]'}, - } - - def __init__(self, *, value=None, **kwargs) -> None: - super(RunCommandResult, self).__init__(**kwargs) - self.value = value diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/sku.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/sku.py deleted file mode 100644 index 5c07709435e0..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/sku.py +++ /dev/null @@ -1,38 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class Sku(Model): - """Describes a virtual machine scale set sku. - - :param name: The sku name. - :type name: str - :param tier: Specifies the tier of virtual machines in a scale set.

    Possible Values:

    **Standard**

    **Basic** - :type tier: str - :param capacity: Specifies the number of virtual machines in the scale - set. - :type capacity: long - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'tier': {'key': 'tier', 'type': 'str'}, - 'capacity': {'key': 'capacity', 'type': 'long'}, - } - - def __init__(self, **kwargs): - super(Sku, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.tier = kwargs.get('tier', None) - self.capacity = kwargs.get('capacity', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/sku_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/sku_py3.py deleted file mode 100644 index f6bc74afaadc..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/sku_py3.py +++ /dev/null @@ -1,38 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class Sku(Model): - """Describes a virtual machine scale set sku. - - :param name: The sku name. - :type name: str - :param tier: Specifies the tier of virtual machines in a scale set.

    Possible Values:

    **Standard**

    **Basic** - :type tier: str - :param capacity: Specifies the number of virtual machines in the scale - set. - :type capacity: long - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'tier': {'key': 'tier', 'type': 'str'}, - 'capacity': {'key': 'capacity', 'type': 'long'}, - } - - def __init__(self, *, name: str=None, tier: str=None, capacity: int=None, **kwargs) -> None: - super(Sku, self).__init__(**kwargs) - self.name = name - self.tier = tier - self.capacity = capacity diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/ssh_configuration.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/ssh_configuration.py deleted file mode 100644 index 5d160d3a1125..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/ssh_configuration.py +++ /dev/null @@ -1,30 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class SshConfiguration(Model): - """SSH configuration for Linux based VMs running on Azure. - - :param public_keys: The list of SSH public keys used to authenticate with - linux based VMs. - :type public_keys: - list[~azure.mgmt.compute.v2019_03_01.models.SshPublicKey] - """ - - _attribute_map = { - 'public_keys': {'key': 'publicKeys', 'type': '[SshPublicKey]'}, - } - - def __init__(self, **kwargs): - super(SshConfiguration, self).__init__(**kwargs) - self.public_keys = kwargs.get('public_keys', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/ssh_configuration_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/ssh_configuration_py3.py deleted file mode 100644 index 175463ed5514..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/ssh_configuration_py3.py +++ /dev/null @@ -1,30 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class SshConfiguration(Model): - """SSH configuration for Linux based VMs running on Azure. - - :param public_keys: The list of SSH public keys used to authenticate with - linux based VMs. - :type public_keys: - list[~azure.mgmt.compute.v2019_03_01.models.SshPublicKey] - """ - - _attribute_map = { - 'public_keys': {'key': 'publicKeys', 'type': '[SshPublicKey]'}, - } - - def __init__(self, *, public_keys=None, **kwargs) -> None: - super(SshConfiguration, self).__init__(**kwargs) - self.public_keys = public_keys diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/ssh_public_key.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/ssh_public_key.py deleted file mode 100644 index 122e0d3b9fdd..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/ssh_public_key.py +++ /dev/null @@ -1,39 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class SshPublicKey(Model): - """Contains information about SSH certificate public key and the path on the - Linux VM where the public key is placed. - - :param path: Specifies the full path on the created VM where ssh public - key is stored. If the file already exists, the specified key is appended - to the file. Example: /home/user/.ssh/authorized_keys - :type path: str - :param key_data: SSH public key certificate used to authenticate with the - VM through ssh. The key needs to be at least 2048-bit and in ssh-rsa - format.

    For creating ssh keys, see [Create SSH keys on Linux and - Mac for Linux VMs in - Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-mac-create-ssh-keys?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json). - :type key_data: str - """ - - _attribute_map = { - 'path': {'key': 'path', 'type': 'str'}, - 'key_data': {'key': 'keyData', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(SshPublicKey, self).__init__(**kwargs) - self.path = kwargs.get('path', None) - self.key_data = kwargs.get('key_data', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/ssh_public_key_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/ssh_public_key_py3.py deleted file mode 100644 index b16ee085b36b..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/ssh_public_key_py3.py +++ /dev/null @@ -1,39 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class SshPublicKey(Model): - """Contains information about SSH certificate public key and the path on the - Linux VM where the public key is placed. - - :param path: Specifies the full path on the created VM where ssh public - key is stored. If the file already exists, the specified key is appended - to the file. Example: /home/user/.ssh/authorized_keys - :type path: str - :param key_data: SSH public key certificate used to authenticate with the - VM through ssh. The key needs to be at least 2048-bit and in ssh-rsa - format.

    For creating ssh keys, see [Create SSH keys on Linux and - Mac for Linux VMs in - Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-mac-create-ssh-keys?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json). - :type key_data: str - """ - - _attribute_map = { - 'path': {'key': 'path', 'type': 'str'}, - 'key_data': {'key': 'keyData', 'type': 'str'}, - } - - def __init__(self, *, path: str=None, key_data: str=None, **kwargs) -> None: - super(SshPublicKey, self).__init__(**kwargs) - self.path = path - self.key_data = key_data diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/storage_profile.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/storage_profile.py deleted file mode 100644 index 14febf80aefc..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/storage_profile.py +++ /dev/null @@ -1,47 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class StorageProfile(Model): - """Specifies the storage settings for the virtual machine disks. - - :param image_reference: Specifies information about the image to use. You - can specify information about platform images, marketplace images, or - virtual machine images. This element is required when you want to use a - platform image, marketplace image, or virtual machine image, but is not - used in other creation operations. - :type image_reference: - ~azure.mgmt.compute.v2019_03_01.models.ImageReference - :param os_disk: Specifies information about the operating system disk used - by the virtual machine.

    For more information about disks, see - [About disks and VHDs for Azure virtual - machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-about-disks-vhds?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). - :type os_disk: ~azure.mgmt.compute.v2019_03_01.models.OSDisk - :param data_disks: Specifies the parameters that are used to add a data - disk to a virtual machine.

    For more information about disks, see - [About disks and VHDs for Azure virtual - machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-about-disks-vhds?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). - :type data_disks: list[~azure.mgmt.compute.v2019_03_01.models.DataDisk] - """ - - _attribute_map = { - 'image_reference': {'key': 'imageReference', 'type': 'ImageReference'}, - 'os_disk': {'key': 'osDisk', 'type': 'OSDisk'}, - 'data_disks': {'key': 'dataDisks', 'type': '[DataDisk]'}, - } - - def __init__(self, **kwargs): - super(StorageProfile, self).__init__(**kwargs) - self.image_reference = kwargs.get('image_reference', None) - self.os_disk = kwargs.get('os_disk', None) - self.data_disks = kwargs.get('data_disks', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/storage_profile_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/storage_profile_py3.py deleted file mode 100644 index 8de0d7695d9c..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/storage_profile_py3.py +++ /dev/null @@ -1,47 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class StorageProfile(Model): - """Specifies the storage settings for the virtual machine disks. - - :param image_reference: Specifies information about the image to use. You - can specify information about platform images, marketplace images, or - virtual machine images. This element is required when you want to use a - platform image, marketplace image, or virtual machine image, but is not - used in other creation operations. - :type image_reference: - ~azure.mgmt.compute.v2019_03_01.models.ImageReference - :param os_disk: Specifies information about the operating system disk used - by the virtual machine.

    For more information about disks, see - [About disks and VHDs for Azure virtual - machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-about-disks-vhds?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). - :type os_disk: ~azure.mgmt.compute.v2019_03_01.models.OSDisk - :param data_disks: Specifies the parameters that are used to add a data - disk to a virtual machine.

    For more information about disks, see - [About disks and VHDs for Azure virtual - machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-about-disks-vhds?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). - :type data_disks: list[~azure.mgmt.compute.v2019_03_01.models.DataDisk] - """ - - _attribute_map = { - 'image_reference': {'key': 'imageReference', 'type': 'ImageReference'}, - 'os_disk': {'key': 'osDisk', 'type': 'OSDisk'}, - 'data_disks': {'key': 'dataDisks', 'type': '[DataDisk]'}, - } - - def __init__(self, *, image_reference=None, os_disk=None, data_disks=None, **kwargs) -> None: - super(StorageProfile, self).__init__(**kwargs) - self.image_reference = image_reference - self.os_disk = os_disk - self.data_disks = data_disks diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/sub_resource.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/sub_resource.py deleted file mode 100644 index 11e092cc6ff5..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/sub_resource.py +++ /dev/null @@ -1,28 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class SubResource(Model): - """SubResource. - - :param id: Resource Id - :type id: str - """ - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(SubResource, self).__init__(**kwargs) - self.id = kwargs.get('id', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/sub_resource_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/sub_resource_py3.py deleted file mode 100644 index 29e5afee38f9..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/sub_resource_py3.py +++ /dev/null @@ -1,28 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class SubResource(Model): - """SubResource. - - :param id: Resource Id - :type id: str - """ - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - } - - def __init__(self, *, id: str=None, **kwargs) -> None: - super(SubResource, self).__init__(**kwargs) - self.id = id diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/sub_resource_read_only.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/sub_resource_read_only.py deleted file mode 100644 index 4a0ec466c0d4..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/sub_resource_read_only.py +++ /dev/null @@ -1,35 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class SubResourceReadOnly(Model): - """SubResourceReadOnly. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource Id - :vartype id: str - """ - - _validation = { - 'id': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(SubResourceReadOnly, self).__init__(**kwargs) - self.id = None diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/sub_resource_read_only_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/sub_resource_read_only_py3.py deleted file mode 100644 index cb918e9a2ac6..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/sub_resource_read_only_py3.py +++ /dev/null @@ -1,35 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class SubResourceReadOnly(Model): - """SubResourceReadOnly. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource Id - :vartype id: str - """ - - _validation = { - 'id': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - } - - def __init__(self, **kwargs) -> None: - super(SubResourceReadOnly, self).__init__(**kwargs) - self.id = None diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/target_region.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/target_region.py deleted file mode 100644 index b3395259ed16..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/target_region.py +++ /dev/null @@ -1,46 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class TargetRegion(Model): - """Describes the target region information. - - All required parameters must be populated in order to send to Azure. - - :param name: Required. The name of the region. - :type name: str - :param regional_replica_count: The number of replicas of the Image Version - to be created per region. This property is updatable. - :type regional_replica_count: int - :param storage_account_type: Specifies the storage account type to be used - to store the image. This property is not updatable. Possible values - include: 'Standard_LRS', 'Standard_ZRS' - :type storage_account_type: str or - ~azure.mgmt.compute.v2019_03_01.models.StorageAccountType - """ - - _validation = { - 'name': {'required': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'regional_replica_count': {'key': 'regionalReplicaCount', 'type': 'int'}, - 'storage_account_type': {'key': 'storageAccountType', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(TargetRegion, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.regional_replica_count = kwargs.get('regional_replica_count', None) - self.storage_account_type = kwargs.get('storage_account_type', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/target_region_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/target_region_py3.py deleted file mode 100644 index b45d7b6f2ca3..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/target_region_py3.py +++ /dev/null @@ -1,46 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class TargetRegion(Model): - """Describes the target region information. - - All required parameters must be populated in order to send to Azure. - - :param name: Required. The name of the region. - :type name: str - :param regional_replica_count: The number of replicas of the Image Version - to be created per region. This property is updatable. - :type regional_replica_count: int - :param storage_account_type: Specifies the storage account type to be used - to store the image. This property is not updatable. Possible values - include: 'Standard_LRS', 'Standard_ZRS' - :type storage_account_type: str or - ~azure.mgmt.compute.v2019_03_01.models.StorageAccountType - """ - - _validation = { - 'name': {'required': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'regional_replica_count': {'key': 'regionalReplicaCount', 'type': 'int'}, - 'storage_account_type': {'key': 'storageAccountType', 'type': 'str'}, - } - - def __init__(self, *, name: str, regional_replica_count: int=None, storage_account_type=None, **kwargs) -> None: - super(TargetRegion, self).__init__(**kwargs) - self.name = name - self.regional_replica_count = regional_replica_count - self.storage_account_type = storage_account_type diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/throttled_requests_input.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/throttled_requests_input.py deleted file mode 100644 index 502e7be62e68..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/throttled_requests_input.py +++ /dev/null @@ -1,52 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .log_analytics_input_base import LogAnalyticsInputBase - - -class ThrottledRequestsInput(LogAnalyticsInputBase): - """Api request input for LogAnalytics getThrottledRequests Api. - - All required parameters must be populated in order to send to Azure. - - :param blob_container_sas_uri: Required. SAS Uri of the logging blob - container to which LogAnalytics Api writes output logs to. - :type blob_container_sas_uri: str - :param from_time: Required. From time of the query - :type from_time: datetime - :param to_time: Required. To time of the query - :type to_time: datetime - :param group_by_throttle_policy: Group query result by Throttle Policy - applied. - :type group_by_throttle_policy: bool - :param group_by_operation_name: Group query result by Operation Name. - :type group_by_operation_name: bool - :param group_by_resource_name: Group query result by Resource Name. - :type group_by_resource_name: bool - """ - - _validation = { - 'blob_container_sas_uri': {'required': True}, - 'from_time': {'required': True}, - 'to_time': {'required': True}, - } - - _attribute_map = { - 'blob_container_sas_uri': {'key': 'blobContainerSasUri', 'type': 'str'}, - 'from_time': {'key': 'fromTime', 'type': 'iso-8601'}, - 'to_time': {'key': 'toTime', 'type': 'iso-8601'}, - 'group_by_throttle_policy': {'key': 'groupByThrottlePolicy', 'type': 'bool'}, - 'group_by_operation_name': {'key': 'groupByOperationName', 'type': 'bool'}, - 'group_by_resource_name': {'key': 'groupByResourceName', 'type': 'bool'}, - } - - def __init__(self, **kwargs): - super(ThrottledRequestsInput, self).__init__(**kwargs) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/throttled_requests_input_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/throttled_requests_input_py3.py deleted file mode 100644 index a4239a5115de..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/throttled_requests_input_py3.py +++ /dev/null @@ -1,52 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .log_analytics_input_base_py3 import LogAnalyticsInputBase - - -class ThrottledRequestsInput(LogAnalyticsInputBase): - """Api request input for LogAnalytics getThrottledRequests Api. - - All required parameters must be populated in order to send to Azure. - - :param blob_container_sas_uri: Required. SAS Uri of the logging blob - container to which LogAnalytics Api writes output logs to. - :type blob_container_sas_uri: str - :param from_time: Required. From time of the query - :type from_time: datetime - :param to_time: Required. To time of the query - :type to_time: datetime - :param group_by_throttle_policy: Group query result by Throttle Policy - applied. - :type group_by_throttle_policy: bool - :param group_by_operation_name: Group query result by Operation Name. - :type group_by_operation_name: bool - :param group_by_resource_name: Group query result by Resource Name. - :type group_by_resource_name: bool - """ - - _validation = { - 'blob_container_sas_uri': {'required': True}, - 'from_time': {'required': True}, - 'to_time': {'required': True}, - } - - _attribute_map = { - 'blob_container_sas_uri': {'key': 'blobContainerSasUri', 'type': 'str'}, - 'from_time': {'key': 'fromTime', 'type': 'iso-8601'}, - 'to_time': {'key': 'toTime', 'type': 'iso-8601'}, - 'group_by_throttle_policy': {'key': 'groupByThrottlePolicy', 'type': 'bool'}, - 'group_by_operation_name': {'key': 'groupByOperationName', 'type': 'bool'}, - 'group_by_resource_name': {'key': 'groupByResourceName', 'type': 'bool'}, - } - - def __init__(self, *, blob_container_sas_uri: str, from_time, to_time, group_by_throttle_policy: bool=None, group_by_operation_name: bool=None, group_by_resource_name: bool=None, **kwargs) -> None: - super(ThrottledRequestsInput, self).__init__(blob_container_sas_uri=blob_container_sas_uri, from_time=from_time, to_time=to_time, group_by_throttle_policy=group_by_throttle_policy, group_by_operation_name=group_by_operation_name, group_by_resource_name=group_by_resource_name, **kwargs) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/update_resource.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/update_resource.py deleted file mode 100644 index b1d2898ff082..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/update_resource.py +++ /dev/null @@ -1,28 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class UpdateResource(Model): - """The Update Resource model definition. - - :param tags: Resource tags - :type tags: dict[str, str] - """ - - _attribute_map = { - 'tags': {'key': 'tags', 'type': '{str}'}, - } - - def __init__(self, **kwargs): - super(UpdateResource, self).__init__(**kwargs) - self.tags = kwargs.get('tags', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/update_resource_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/update_resource_py3.py deleted file mode 100644 index c06c17c124d9..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/update_resource_py3.py +++ /dev/null @@ -1,28 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class UpdateResource(Model): - """The Update Resource model definition. - - :param tags: Resource tags - :type tags: dict[str, str] - """ - - _attribute_map = { - 'tags': {'key': 'tags', 'type': '{str}'}, - } - - def __init__(self, *, tags=None, **kwargs) -> None: - super(UpdateResource, self).__init__(**kwargs) - self.tags = tags diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/upgrade_operation_historical_status_info.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/upgrade_operation_historical_status_info.py deleted file mode 100644 index 66d54a3a2182..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/upgrade_operation_historical_status_info.py +++ /dev/null @@ -1,47 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class UpgradeOperationHistoricalStatusInfo(Model): - """Virtual Machine Scale Set OS Upgrade History operation response. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar properties: Information about the properties of the upgrade - operation. - :vartype properties: - ~azure.mgmt.compute.v2019_03_01.models.UpgradeOperationHistoricalStatusInfoProperties - :ivar type: Resource type - :vartype type: str - :ivar location: Resource location - :vartype location: str - """ - - _validation = { - 'properties': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'readonly': True}, - } - - _attribute_map = { - 'properties': {'key': 'properties', 'type': 'UpgradeOperationHistoricalStatusInfoProperties'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(UpgradeOperationHistoricalStatusInfo, self).__init__(**kwargs) - self.properties = None - self.type = None - self.location = None diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/upgrade_operation_historical_status_info_paged.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/upgrade_operation_historical_status_info_paged.py deleted file mode 100644 index 5ca4c59eb279..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/upgrade_operation_historical_status_info_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class UpgradeOperationHistoricalStatusInfoPaged(Paged): - """ - A paging container for iterating over a list of :class:`UpgradeOperationHistoricalStatusInfo ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[UpgradeOperationHistoricalStatusInfo]'} - } - - def __init__(self, *args, **kwargs): - - super(UpgradeOperationHistoricalStatusInfoPaged, self).__init__(*args, **kwargs) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/upgrade_operation_historical_status_info_properties.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/upgrade_operation_historical_status_info_properties.py deleted file mode 100644 index 6d54c42fe994..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/upgrade_operation_historical_status_info_properties.py +++ /dev/null @@ -1,67 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class UpgradeOperationHistoricalStatusInfoProperties(Model): - """Describes each OS upgrade on the Virtual Machine Scale Set. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar running_status: Information about the overall status of the upgrade - operation. - :vartype running_status: - ~azure.mgmt.compute.v2019_03_01.models.UpgradeOperationHistoryStatus - :ivar progress: Counts of the VMs in each state. - :vartype progress: - ~azure.mgmt.compute.v2019_03_01.models.RollingUpgradeProgressInfo - :ivar error: Error Details for this upgrade if there are any. - :vartype error: ~azure.mgmt.compute.v2019_03_01.models.ApiError - :ivar started_by: Invoker of the Upgrade Operation. Possible values - include: 'Unknown', 'User', 'Platform' - :vartype started_by: str or - ~azure.mgmt.compute.v2019_03_01.models.UpgradeOperationInvoker - :ivar target_image_reference: Image Reference details - :vartype target_image_reference: - ~azure.mgmt.compute.v2019_03_01.models.ImageReference - :ivar rollback_info: Information about OS rollback if performed - :vartype rollback_info: - ~azure.mgmt.compute.v2019_03_01.models.RollbackStatusInfo - """ - - _validation = { - 'running_status': {'readonly': True}, - 'progress': {'readonly': True}, - 'error': {'readonly': True}, - 'started_by': {'readonly': True}, - 'target_image_reference': {'readonly': True}, - 'rollback_info': {'readonly': True}, - } - - _attribute_map = { - 'running_status': {'key': 'runningStatus', 'type': 'UpgradeOperationHistoryStatus'}, - 'progress': {'key': 'progress', 'type': 'RollingUpgradeProgressInfo'}, - 'error': {'key': 'error', 'type': 'ApiError'}, - 'started_by': {'key': 'startedBy', 'type': 'UpgradeOperationInvoker'}, - 'target_image_reference': {'key': 'targetImageReference', 'type': 'ImageReference'}, - 'rollback_info': {'key': 'rollbackInfo', 'type': 'RollbackStatusInfo'}, - } - - def __init__(self, **kwargs): - super(UpgradeOperationHistoricalStatusInfoProperties, self).__init__(**kwargs) - self.running_status = None - self.progress = None - self.error = None - self.started_by = None - self.target_image_reference = None - self.rollback_info = None diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/upgrade_operation_historical_status_info_properties_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/upgrade_operation_historical_status_info_properties_py3.py deleted file mode 100644 index 45bc35b25f6b..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/upgrade_operation_historical_status_info_properties_py3.py +++ /dev/null @@ -1,67 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class UpgradeOperationHistoricalStatusInfoProperties(Model): - """Describes each OS upgrade on the Virtual Machine Scale Set. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar running_status: Information about the overall status of the upgrade - operation. - :vartype running_status: - ~azure.mgmt.compute.v2019_03_01.models.UpgradeOperationHistoryStatus - :ivar progress: Counts of the VMs in each state. - :vartype progress: - ~azure.mgmt.compute.v2019_03_01.models.RollingUpgradeProgressInfo - :ivar error: Error Details for this upgrade if there are any. - :vartype error: ~azure.mgmt.compute.v2019_03_01.models.ApiError - :ivar started_by: Invoker of the Upgrade Operation. Possible values - include: 'Unknown', 'User', 'Platform' - :vartype started_by: str or - ~azure.mgmt.compute.v2019_03_01.models.UpgradeOperationInvoker - :ivar target_image_reference: Image Reference details - :vartype target_image_reference: - ~azure.mgmt.compute.v2019_03_01.models.ImageReference - :ivar rollback_info: Information about OS rollback if performed - :vartype rollback_info: - ~azure.mgmt.compute.v2019_03_01.models.RollbackStatusInfo - """ - - _validation = { - 'running_status': {'readonly': True}, - 'progress': {'readonly': True}, - 'error': {'readonly': True}, - 'started_by': {'readonly': True}, - 'target_image_reference': {'readonly': True}, - 'rollback_info': {'readonly': True}, - } - - _attribute_map = { - 'running_status': {'key': 'runningStatus', 'type': 'UpgradeOperationHistoryStatus'}, - 'progress': {'key': 'progress', 'type': 'RollingUpgradeProgressInfo'}, - 'error': {'key': 'error', 'type': 'ApiError'}, - 'started_by': {'key': 'startedBy', 'type': 'UpgradeOperationInvoker'}, - 'target_image_reference': {'key': 'targetImageReference', 'type': 'ImageReference'}, - 'rollback_info': {'key': 'rollbackInfo', 'type': 'RollbackStatusInfo'}, - } - - def __init__(self, **kwargs) -> None: - super(UpgradeOperationHistoricalStatusInfoProperties, self).__init__(**kwargs) - self.running_status = None - self.progress = None - self.error = None - self.started_by = None - self.target_image_reference = None - self.rollback_info = None diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/upgrade_operation_historical_status_info_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/upgrade_operation_historical_status_info_py3.py deleted file mode 100644 index 20000dc62e60..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/upgrade_operation_historical_status_info_py3.py +++ /dev/null @@ -1,47 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class UpgradeOperationHistoricalStatusInfo(Model): - """Virtual Machine Scale Set OS Upgrade History operation response. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar properties: Information about the properties of the upgrade - operation. - :vartype properties: - ~azure.mgmt.compute.v2019_03_01.models.UpgradeOperationHistoricalStatusInfoProperties - :ivar type: Resource type - :vartype type: str - :ivar location: Resource location - :vartype location: str - """ - - _validation = { - 'properties': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'readonly': True}, - } - - _attribute_map = { - 'properties': {'key': 'properties', 'type': 'UpgradeOperationHistoricalStatusInfoProperties'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - } - - def __init__(self, **kwargs) -> None: - super(UpgradeOperationHistoricalStatusInfo, self).__init__(**kwargs) - self.properties = None - self.type = None - self.location = None diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/upgrade_operation_history_status.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/upgrade_operation_history_status.py deleted file mode 100644 index 5b4ddde733e7..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/upgrade_operation_history_status.py +++ /dev/null @@ -1,46 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class UpgradeOperationHistoryStatus(Model): - """Information about the current running state of the overall upgrade. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar code: Code indicating the current status of the upgrade. Possible - values include: 'RollingForward', 'Cancelled', 'Completed', 'Faulted' - :vartype code: str or ~azure.mgmt.compute.v2019_03_01.models.UpgradeState - :ivar start_time: Start time of the upgrade. - :vartype start_time: datetime - :ivar end_time: End time of the upgrade. - :vartype end_time: datetime - """ - - _validation = { - 'code': {'readonly': True}, - 'start_time': {'readonly': True}, - 'end_time': {'readonly': True}, - } - - _attribute_map = { - 'code': {'key': 'code', 'type': 'UpgradeState'}, - 'start_time': {'key': 'startTime', 'type': 'iso-8601'}, - 'end_time': {'key': 'endTime', 'type': 'iso-8601'}, - } - - def __init__(self, **kwargs): - super(UpgradeOperationHistoryStatus, self).__init__(**kwargs) - self.code = None - self.start_time = None - self.end_time = None diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/upgrade_operation_history_status_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/upgrade_operation_history_status_py3.py deleted file mode 100644 index ec6ffffd5d78..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/upgrade_operation_history_status_py3.py +++ /dev/null @@ -1,46 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class UpgradeOperationHistoryStatus(Model): - """Information about the current running state of the overall upgrade. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar code: Code indicating the current status of the upgrade. Possible - values include: 'RollingForward', 'Cancelled', 'Completed', 'Faulted' - :vartype code: str or ~azure.mgmt.compute.v2019_03_01.models.UpgradeState - :ivar start_time: Start time of the upgrade. - :vartype start_time: datetime - :ivar end_time: End time of the upgrade. - :vartype end_time: datetime - """ - - _validation = { - 'code': {'readonly': True}, - 'start_time': {'readonly': True}, - 'end_time': {'readonly': True}, - } - - _attribute_map = { - 'code': {'key': 'code', 'type': 'UpgradeState'}, - 'start_time': {'key': 'startTime', 'type': 'iso-8601'}, - 'end_time': {'key': 'endTime', 'type': 'iso-8601'}, - } - - def __init__(self, **kwargs) -> None: - super(UpgradeOperationHistoryStatus, self).__init__(**kwargs) - self.code = None - self.start_time = None - self.end_time = None diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/upgrade_policy.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/upgrade_policy.py deleted file mode 100644 index bcacc23fd9ed..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/upgrade_policy.py +++ /dev/null @@ -1,45 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class UpgradePolicy(Model): - """Describes an upgrade policy - automatic, manual, or rolling. - - :param mode: Specifies the mode of an upgrade to virtual machines in the - scale set.

    Possible values are:

    **Manual** - You - control the application of updates to virtual machines in the scale set. - You do this by using the manualUpgrade action.

    **Automatic** - - All virtual machines in the scale set are automatically updated at the - same time. Possible values include: 'Automatic', 'Manual', 'Rolling' - :type mode: str or ~azure.mgmt.compute.v2019_03_01.models.UpgradeMode - :param rolling_upgrade_policy: The configuration parameters used while - performing a rolling upgrade. - :type rolling_upgrade_policy: - ~azure.mgmt.compute.v2019_03_01.models.RollingUpgradePolicy - :param automatic_os_upgrade_policy: Configuration parameters used for - performing automatic OS Upgrade. - :type automatic_os_upgrade_policy: - ~azure.mgmt.compute.v2019_03_01.models.AutomaticOSUpgradePolicy - """ - - _attribute_map = { - 'mode': {'key': 'mode', 'type': 'UpgradeMode'}, - 'rolling_upgrade_policy': {'key': 'rollingUpgradePolicy', 'type': 'RollingUpgradePolicy'}, - 'automatic_os_upgrade_policy': {'key': 'automaticOSUpgradePolicy', 'type': 'AutomaticOSUpgradePolicy'}, - } - - def __init__(self, **kwargs): - super(UpgradePolicy, self).__init__(**kwargs) - self.mode = kwargs.get('mode', None) - self.rolling_upgrade_policy = kwargs.get('rolling_upgrade_policy', None) - self.automatic_os_upgrade_policy = kwargs.get('automatic_os_upgrade_policy', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/upgrade_policy_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/upgrade_policy_py3.py deleted file mode 100644 index bb87a543ae5a..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/upgrade_policy_py3.py +++ /dev/null @@ -1,45 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class UpgradePolicy(Model): - """Describes an upgrade policy - automatic, manual, or rolling. - - :param mode: Specifies the mode of an upgrade to virtual machines in the - scale set.

    Possible values are:

    **Manual** - You - control the application of updates to virtual machines in the scale set. - You do this by using the manualUpgrade action.

    **Automatic** - - All virtual machines in the scale set are automatically updated at the - same time. Possible values include: 'Automatic', 'Manual', 'Rolling' - :type mode: str or ~azure.mgmt.compute.v2019_03_01.models.UpgradeMode - :param rolling_upgrade_policy: The configuration parameters used while - performing a rolling upgrade. - :type rolling_upgrade_policy: - ~azure.mgmt.compute.v2019_03_01.models.RollingUpgradePolicy - :param automatic_os_upgrade_policy: Configuration parameters used for - performing automatic OS Upgrade. - :type automatic_os_upgrade_policy: - ~azure.mgmt.compute.v2019_03_01.models.AutomaticOSUpgradePolicy - """ - - _attribute_map = { - 'mode': {'key': 'mode', 'type': 'UpgradeMode'}, - 'rolling_upgrade_policy': {'key': 'rollingUpgradePolicy', 'type': 'RollingUpgradePolicy'}, - 'automatic_os_upgrade_policy': {'key': 'automaticOSUpgradePolicy', 'type': 'AutomaticOSUpgradePolicy'}, - } - - def __init__(self, *, mode=None, rolling_upgrade_policy=None, automatic_os_upgrade_policy=None, **kwargs) -> None: - super(UpgradePolicy, self).__init__(**kwargs) - self.mode = mode - self.rolling_upgrade_policy = rolling_upgrade_policy - self.automatic_os_upgrade_policy = automatic_os_upgrade_policy diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/usage.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/usage.py deleted file mode 100644 index 9ad9e6e45237..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/usage.py +++ /dev/null @@ -1,54 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class Usage(Model): - """Describes Compute Resource Usage. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar unit: Required. An enum describing the unit of usage measurement. - Default value: "Count" . - :vartype unit: str - :param current_value: Required. The current usage of the resource. - :type current_value: int - :param limit: Required. The maximum permitted usage of the resource. - :type limit: long - :param name: Required. The name of the type of usage. - :type name: ~azure.mgmt.compute.v2019_03_01.models.UsageName - """ - - _validation = { - 'unit': {'required': True, 'constant': True}, - 'current_value': {'required': True}, - 'limit': {'required': True}, - 'name': {'required': True}, - } - - _attribute_map = { - 'unit': {'key': 'unit', 'type': 'str'}, - 'current_value': {'key': 'currentValue', 'type': 'int'}, - 'limit': {'key': 'limit', 'type': 'long'}, - 'name': {'key': 'name', 'type': 'UsageName'}, - } - - unit = "Count" - - def __init__(self, **kwargs): - super(Usage, self).__init__(**kwargs) - self.current_value = kwargs.get('current_value', None) - self.limit = kwargs.get('limit', None) - self.name = kwargs.get('name', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/usage_name.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/usage_name.py deleted file mode 100644 index e2560936493e..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/usage_name.py +++ /dev/null @@ -1,32 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class UsageName(Model): - """The Usage Names. - - :param value: The name of the resource. - :type value: str - :param localized_value: The localized name of the resource. - :type localized_value: str - """ - - _attribute_map = { - 'value': {'key': 'value', 'type': 'str'}, - 'localized_value': {'key': 'localizedValue', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(UsageName, self).__init__(**kwargs) - self.value = kwargs.get('value', None) - self.localized_value = kwargs.get('localized_value', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/usage_name_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/usage_name_py3.py deleted file mode 100644 index ad0b77459f75..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/usage_name_py3.py +++ /dev/null @@ -1,32 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class UsageName(Model): - """The Usage Names. - - :param value: The name of the resource. - :type value: str - :param localized_value: The localized name of the resource. - :type localized_value: str - """ - - _attribute_map = { - 'value': {'key': 'value', 'type': 'str'}, - 'localized_value': {'key': 'localizedValue', 'type': 'str'}, - } - - def __init__(self, *, value: str=None, localized_value: str=None, **kwargs) -> None: - super(UsageName, self).__init__(**kwargs) - self.value = value - self.localized_value = localized_value diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/usage_paged.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/usage_paged.py deleted file mode 100644 index ac030c6b0799..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/usage_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class UsagePaged(Paged): - """ - A paging container for iterating over a list of :class:`Usage ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[Usage]'} - } - - def __init__(self, *args, **kwargs): - - super(UsagePaged, self).__init__(*args, **kwargs) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/usage_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/usage_py3.py deleted file mode 100644 index 6c29e2ff3c30..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/usage_py3.py +++ /dev/null @@ -1,54 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class Usage(Model): - """Describes Compute Resource Usage. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar unit: Required. An enum describing the unit of usage measurement. - Default value: "Count" . - :vartype unit: str - :param current_value: Required. The current usage of the resource. - :type current_value: int - :param limit: Required. The maximum permitted usage of the resource. - :type limit: long - :param name: Required. The name of the type of usage. - :type name: ~azure.mgmt.compute.v2019_03_01.models.UsageName - """ - - _validation = { - 'unit': {'required': True, 'constant': True}, - 'current_value': {'required': True}, - 'limit': {'required': True}, - 'name': {'required': True}, - } - - _attribute_map = { - 'unit': {'key': 'unit', 'type': 'str'}, - 'current_value': {'key': 'currentValue', 'type': 'int'}, - 'limit': {'key': 'limit', 'type': 'long'}, - 'name': {'key': 'name', 'type': 'UsageName'}, - } - - unit = "Count" - - def __init__(self, *, current_value: int, limit: int, name, **kwargs) -> None: - super(Usage, self).__init__(**kwargs) - self.current_value = current_value - self.limit = limit - self.name = name diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/vault_certificate.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/vault_certificate.py deleted file mode 100644 index 2dd179480e76..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/vault_certificate.py +++ /dev/null @@ -1,47 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VaultCertificate(Model): - """Describes a single certificate reference in a Key Vault, and where the - certificate should reside on the VM. - - :param certificate_url: This is the URL of a certificate that has been - uploaded to Key Vault as a secret. For adding a secret to the Key Vault, - see [Add a key or secret to the key - vault](https://docs.microsoft.com/azure/key-vault/key-vault-get-started/#add). - In this case, your certificate needs to be It is the Base64 encoding of - the following JSON Object which is encoded in UTF-8:

    {
    - "data":"",
    "dataType":"pfx",
    - "password":""
    } - :type certificate_url: str - :param certificate_store: For Windows VMs, specifies the certificate store - on the Virtual Machine to which the certificate should be added. The - specified certificate store is implicitly in the LocalMachine account. -

    For Linux VMs, the certificate file is placed under the - /var/lib/waagent directory, with the file name - <UppercaseThumbprint>.crt for the X509 certificate file and - <UppercaseThumbprint>.prv for private key. Both of these files are - .pem formatted. - :type certificate_store: str - """ - - _attribute_map = { - 'certificate_url': {'key': 'certificateUrl', 'type': 'str'}, - 'certificate_store': {'key': 'certificateStore', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(VaultCertificate, self).__init__(**kwargs) - self.certificate_url = kwargs.get('certificate_url', None) - self.certificate_store = kwargs.get('certificate_store', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/vault_certificate_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/vault_certificate_py3.py deleted file mode 100644 index 23ecc8101793..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/vault_certificate_py3.py +++ /dev/null @@ -1,47 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VaultCertificate(Model): - """Describes a single certificate reference in a Key Vault, and where the - certificate should reside on the VM. - - :param certificate_url: This is the URL of a certificate that has been - uploaded to Key Vault as a secret. For adding a secret to the Key Vault, - see [Add a key or secret to the key - vault](https://docs.microsoft.com/azure/key-vault/key-vault-get-started/#add). - In this case, your certificate needs to be It is the Base64 encoding of - the following JSON Object which is encoded in UTF-8:

    {
    - "data":"",
    "dataType":"pfx",
    - "password":""
    } - :type certificate_url: str - :param certificate_store: For Windows VMs, specifies the certificate store - on the Virtual Machine to which the certificate should be added. The - specified certificate store is implicitly in the LocalMachine account. -

    For Linux VMs, the certificate file is placed under the - /var/lib/waagent directory, with the file name - <UppercaseThumbprint>.crt for the X509 certificate file and - <UppercaseThumbprint>.prv for private key. Both of these files are - .pem formatted. - :type certificate_store: str - """ - - _attribute_map = { - 'certificate_url': {'key': 'certificateUrl', 'type': 'str'}, - 'certificate_store': {'key': 'certificateStore', 'type': 'str'}, - } - - def __init__(self, *, certificate_url: str=None, certificate_store: str=None, **kwargs) -> None: - super(VaultCertificate, self).__init__(**kwargs) - self.certificate_url = certificate_url - self.certificate_store = certificate_store diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/vault_secret_group.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/vault_secret_group.py deleted file mode 100644 index 89c5477ef947..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/vault_secret_group.py +++ /dev/null @@ -1,35 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VaultSecretGroup(Model): - """Describes a set of certificates which are all in the same Key Vault. - - :param source_vault: The relative URL of the Key Vault containing all of - the certificates in VaultCertificates. - :type source_vault: ~azure.mgmt.compute.v2019_03_01.models.SubResource - :param vault_certificates: The list of key vault references in SourceVault - which contain certificates. - :type vault_certificates: - list[~azure.mgmt.compute.v2019_03_01.models.VaultCertificate] - """ - - _attribute_map = { - 'source_vault': {'key': 'sourceVault', 'type': 'SubResource'}, - 'vault_certificates': {'key': 'vaultCertificates', 'type': '[VaultCertificate]'}, - } - - def __init__(self, **kwargs): - super(VaultSecretGroup, self).__init__(**kwargs) - self.source_vault = kwargs.get('source_vault', None) - self.vault_certificates = kwargs.get('vault_certificates', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/vault_secret_group_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/vault_secret_group_py3.py deleted file mode 100644 index 6ca6655101d7..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/vault_secret_group_py3.py +++ /dev/null @@ -1,35 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VaultSecretGroup(Model): - """Describes a set of certificates which are all in the same Key Vault. - - :param source_vault: The relative URL of the Key Vault containing all of - the certificates in VaultCertificates. - :type source_vault: ~azure.mgmt.compute.v2019_03_01.models.SubResource - :param vault_certificates: The list of key vault references in SourceVault - which contain certificates. - :type vault_certificates: - list[~azure.mgmt.compute.v2019_03_01.models.VaultCertificate] - """ - - _attribute_map = { - 'source_vault': {'key': 'sourceVault', 'type': 'SubResource'}, - 'vault_certificates': {'key': 'vaultCertificates', 'type': '[VaultCertificate]'}, - } - - def __init__(self, *, source_vault=None, vault_certificates=None, **kwargs) -> None: - super(VaultSecretGroup, self).__init__(**kwargs) - self.source_vault = source_vault - self.vault_certificates = vault_certificates diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/virtual_hard_disk.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/virtual_hard_disk.py deleted file mode 100644 index 5e3ad9dea7d4..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/virtual_hard_disk.py +++ /dev/null @@ -1,28 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualHardDisk(Model): - """Describes the uri of a disk. - - :param uri: Specifies the virtual hard disk's uri. - :type uri: str - """ - - _attribute_map = { - 'uri': {'key': 'uri', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(VirtualHardDisk, self).__init__(**kwargs) - self.uri = kwargs.get('uri', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/virtual_hard_disk_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/virtual_hard_disk_py3.py deleted file mode 100644 index 9c069b95f084..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/virtual_hard_disk_py3.py +++ /dev/null @@ -1,28 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualHardDisk(Model): - """Describes the uri of a disk. - - :param uri: Specifies the virtual hard disk's uri. - :type uri: str - """ - - _attribute_map = { - 'uri': {'key': 'uri', 'type': 'str'}, - } - - def __init__(self, *, uri: str=None, **kwargs) -> None: - super(VirtualHardDisk, self).__init__(**kwargs) - self.uri = uri diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/virtual_machine.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/virtual_machine.py deleted file mode 100644 index 5b31426289ff..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/virtual_machine.py +++ /dev/null @@ -1,163 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource import Resource - - -class VirtualMachine(Resource): - """Describes a Virtual Machine. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource Id - :vartype id: str - :ivar name: Resource name - :vartype name: str - :ivar type: Resource type - :vartype type: str - :param location: Required. Resource location - :type location: str - :param tags: Resource tags - :type tags: dict[str, str] - :param plan: Specifies information about the marketplace image used to - create the virtual machine. This element is only used for marketplace - images. Before you can use a marketplace image from an API, you must - enable the image for programmatic use. In the Azure portal, find the - marketplace image that you want to use and then click **Want to deploy - programmatically, Get Started ->**. Enter any required information and - then click **Save**. - :type plan: ~azure.mgmt.compute.v2019_03_01.models.Plan - :param hardware_profile: Specifies the hardware settings for the virtual - machine. - :type hardware_profile: - ~azure.mgmt.compute.v2019_03_01.models.HardwareProfile - :param storage_profile: Specifies the storage settings for the virtual - machine disks. - :type storage_profile: - ~azure.mgmt.compute.v2019_03_01.models.StorageProfile - :param additional_capabilities: Specifies additional capabilities enabled - or disabled on the virtual machine. - :type additional_capabilities: - ~azure.mgmt.compute.v2019_03_01.models.AdditionalCapabilities - :param os_profile: Specifies the operating system settings for the virtual - machine. - :type os_profile: ~azure.mgmt.compute.v2019_03_01.models.OSProfile - :param network_profile: Specifies the network interfaces of the virtual - machine. - :type network_profile: - ~azure.mgmt.compute.v2019_03_01.models.NetworkProfile - :param diagnostics_profile: Specifies the boot diagnostic settings state. -

    Minimum api-version: 2015-06-15. - :type diagnostics_profile: - ~azure.mgmt.compute.v2019_03_01.models.DiagnosticsProfile - :param availability_set: Specifies information about the availability set - that the virtual machine should be assigned to. Virtual machines specified - in the same availability set are allocated to different nodes to maximize - availability. For more information about availability sets, see [Manage - the availability of virtual - machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-manage-availability?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). -

    For more information on Azure planned maintenance, see [Planned - maintenance for virtual machines in - Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-planned-maintenance?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json) -

    Currently, a VM can only be added to availability set at creation - time. An existing VM cannot be added to an availability set. - :type availability_set: ~azure.mgmt.compute.v2019_03_01.models.SubResource - :param proximity_placement_group: Specifies information about the - proximity placement group that the virtual machine should be assigned to. -

    Minimum api-version: 2018-04-01. - :type proximity_placement_group: - ~azure.mgmt.compute.v2019_03_01.models.SubResource - :ivar provisioning_state: The provisioning state, which only appears in - the response. - :vartype provisioning_state: str - :ivar instance_view: The virtual machine instance view. - :vartype instance_view: - ~azure.mgmt.compute.v2019_03_01.models.VirtualMachineInstanceView - :param license_type: Specifies that the image or disk that is being used - was licensed on-premises. This element is only used for images that - contain the Windows Server operating system.

    Possible values are: -

    Windows_Client

    Windows_Server

    If this element - is included in a request for an update, the value must match the initial - value. This value cannot be updated.

    For more information, see - [Azure Hybrid Use Benefit for Windows - Server](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-hybrid-use-benefit-licensing?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json) -

    Minimum api-version: 2015-06-15 - :type license_type: str - :ivar vm_id: Specifies the VM unique ID which is a 128-bits identifier - that is encoded and stored in all Azure IaaS VMs SMBIOS and can be read - using platform BIOS commands. - :vartype vm_id: str - :ivar resources: The virtual machine child extension resources. - :vartype resources: - list[~azure.mgmt.compute.v2019_03_01.models.VirtualMachineExtension] - :param identity: The identity of the virtual machine, if configured. - :type identity: - ~azure.mgmt.compute.v2019_03_01.models.VirtualMachineIdentity - :param zones: The virtual machine zones. - :type zones: list[str] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - 'provisioning_state': {'readonly': True}, - 'instance_view': {'readonly': True}, - 'vm_id': {'readonly': True}, - 'resources': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'plan': {'key': 'plan', 'type': 'Plan'}, - 'hardware_profile': {'key': 'properties.hardwareProfile', 'type': 'HardwareProfile'}, - 'storage_profile': {'key': 'properties.storageProfile', 'type': 'StorageProfile'}, - 'additional_capabilities': {'key': 'properties.additionalCapabilities', 'type': 'AdditionalCapabilities'}, - 'os_profile': {'key': 'properties.osProfile', 'type': 'OSProfile'}, - 'network_profile': {'key': 'properties.networkProfile', 'type': 'NetworkProfile'}, - 'diagnostics_profile': {'key': 'properties.diagnosticsProfile', 'type': 'DiagnosticsProfile'}, - 'availability_set': {'key': 'properties.availabilitySet', 'type': 'SubResource'}, - 'proximity_placement_group': {'key': 'properties.proximityPlacementGroup', 'type': 'SubResource'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'instance_view': {'key': 'properties.instanceView', 'type': 'VirtualMachineInstanceView'}, - 'license_type': {'key': 'properties.licenseType', 'type': 'str'}, - 'vm_id': {'key': 'properties.vmId', 'type': 'str'}, - 'resources': {'key': 'resources', 'type': '[VirtualMachineExtension]'}, - 'identity': {'key': 'identity', 'type': 'VirtualMachineIdentity'}, - 'zones': {'key': 'zones', 'type': '[str]'}, - } - - def __init__(self, **kwargs): - super(VirtualMachine, self).__init__(**kwargs) - self.plan = kwargs.get('plan', None) - self.hardware_profile = kwargs.get('hardware_profile', None) - self.storage_profile = kwargs.get('storage_profile', None) - self.additional_capabilities = kwargs.get('additional_capabilities', None) - self.os_profile = kwargs.get('os_profile', None) - self.network_profile = kwargs.get('network_profile', None) - self.diagnostics_profile = kwargs.get('diagnostics_profile', None) - self.availability_set = kwargs.get('availability_set', None) - self.proximity_placement_group = kwargs.get('proximity_placement_group', None) - self.provisioning_state = None - self.instance_view = None - self.license_type = kwargs.get('license_type', None) - self.vm_id = None - self.resources = None - self.identity = kwargs.get('identity', None) - self.zones = kwargs.get('zones', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/virtual_machine_agent_instance_view.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/virtual_machine_agent_instance_view.py deleted file mode 100644 index cca8682988cc..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/virtual_machine_agent_instance_view.py +++ /dev/null @@ -1,39 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineAgentInstanceView(Model): - """The instance view of the VM Agent running on the virtual machine. - - :param vm_agent_version: The VM Agent full version. - :type vm_agent_version: str - :param extension_handlers: The virtual machine extension handler instance - view. - :type extension_handlers: - list[~azure.mgmt.compute.v2019_03_01.models.VirtualMachineExtensionHandlerInstanceView] - :param statuses: The resource status information. - :type statuses: - list[~azure.mgmt.compute.v2019_03_01.models.InstanceViewStatus] - """ - - _attribute_map = { - 'vm_agent_version': {'key': 'vmAgentVersion', 'type': 'str'}, - 'extension_handlers': {'key': 'extensionHandlers', 'type': '[VirtualMachineExtensionHandlerInstanceView]'}, - 'statuses': {'key': 'statuses', 'type': '[InstanceViewStatus]'}, - } - - def __init__(self, **kwargs): - super(VirtualMachineAgentInstanceView, self).__init__(**kwargs) - self.vm_agent_version = kwargs.get('vm_agent_version', None) - self.extension_handlers = kwargs.get('extension_handlers', None) - self.statuses = kwargs.get('statuses', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/virtual_machine_agent_instance_view_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/virtual_machine_agent_instance_view_py3.py deleted file mode 100644 index 47687bf52a3d..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/virtual_machine_agent_instance_view_py3.py +++ /dev/null @@ -1,39 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineAgentInstanceView(Model): - """The instance view of the VM Agent running on the virtual machine. - - :param vm_agent_version: The VM Agent full version. - :type vm_agent_version: str - :param extension_handlers: The virtual machine extension handler instance - view. - :type extension_handlers: - list[~azure.mgmt.compute.v2019_03_01.models.VirtualMachineExtensionHandlerInstanceView] - :param statuses: The resource status information. - :type statuses: - list[~azure.mgmt.compute.v2019_03_01.models.InstanceViewStatus] - """ - - _attribute_map = { - 'vm_agent_version': {'key': 'vmAgentVersion', 'type': 'str'}, - 'extension_handlers': {'key': 'extensionHandlers', 'type': '[VirtualMachineExtensionHandlerInstanceView]'}, - 'statuses': {'key': 'statuses', 'type': '[InstanceViewStatus]'}, - } - - def __init__(self, *, vm_agent_version: str=None, extension_handlers=None, statuses=None, **kwargs) -> None: - super(VirtualMachineAgentInstanceView, self).__init__(**kwargs) - self.vm_agent_version = vm_agent_version - self.extension_handlers = extension_handlers - self.statuses = statuses diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/virtual_machine_capture_parameters.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/virtual_machine_capture_parameters.py deleted file mode 100644 index 4e6ffbea7a4f..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/virtual_machine_capture_parameters.py +++ /dev/null @@ -1,46 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineCaptureParameters(Model): - """Capture Virtual Machine parameters. - - All required parameters must be populated in order to send to Azure. - - :param vhd_prefix: Required. The captured virtual hard disk's name prefix. - :type vhd_prefix: str - :param destination_container_name: Required. The destination container - name. - :type destination_container_name: str - :param overwrite_vhds: Required. Specifies whether to overwrite the - destination virtual hard disk, in case of conflict. - :type overwrite_vhds: bool - """ - - _validation = { - 'vhd_prefix': {'required': True}, - 'destination_container_name': {'required': True}, - 'overwrite_vhds': {'required': True}, - } - - _attribute_map = { - 'vhd_prefix': {'key': 'vhdPrefix', 'type': 'str'}, - 'destination_container_name': {'key': 'destinationContainerName', 'type': 'str'}, - 'overwrite_vhds': {'key': 'overwriteVhds', 'type': 'bool'}, - } - - def __init__(self, **kwargs): - super(VirtualMachineCaptureParameters, self).__init__(**kwargs) - self.vhd_prefix = kwargs.get('vhd_prefix', None) - self.destination_container_name = kwargs.get('destination_container_name', None) - self.overwrite_vhds = kwargs.get('overwrite_vhds', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/virtual_machine_capture_parameters_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/virtual_machine_capture_parameters_py3.py deleted file mode 100644 index 1866cdc23300..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/virtual_machine_capture_parameters_py3.py +++ /dev/null @@ -1,46 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineCaptureParameters(Model): - """Capture Virtual Machine parameters. - - All required parameters must be populated in order to send to Azure. - - :param vhd_prefix: Required. The captured virtual hard disk's name prefix. - :type vhd_prefix: str - :param destination_container_name: Required. The destination container - name. - :type destination_container_name: str - :param overwrite_vhds: Required. Specifies whether to overwrite the - destination virtual hard disk, in case of conflict. - :type overwrite_vhds: bool - """ - - _validation = { - 'vhd_prefix': {'required': True}, - 'destination_container_name': {'required': True}, - 'overwrite_vhds': {'required': True}, - } - - _attribute_map = { - 'vhd_prefix': {'key': 'vhdPrefix', 'type': 'str'}, - 'destination_container_name': {'key': 'destinationContainerName', 'type': 'str'}, - 'overwrite_vhds': {'key': 'overwriteVhds', 'type': 'bool'}, - } - - def __init__(self, *, vhd_prefix: str, destination_container_name: str, overwrite_vhds: bool, **kwargs) -> None: - super(VirtualMachineCaptureParameters, self).__init__(**kwargs) - self.vhd_prefix = vhd_prefix - self.destination_container_name = destination_container_name - self.overwrite_vhds = overwrite_vhds diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/virtual_machine_capture_result.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/virtual_machine_capture_result.py deleted file mode 100644 index 2972e1f2fcda..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/virtual_machine_capture_result.py +++ /dev/null @@ -1,53 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .sub_resource import SubResource - - -class VirtualMachineCaptureResult(SubResource): - """Output of virtual machine capture operation. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :param id: Resource Id - :type id: str - :ivar schema: the schema of the captured virtual machine - :vartype schema: str - :ivar content_version: the version of the content - :vartype content_version: str - :ivar parameters: parameters of the captured virtual machine - :vartype parameters: object - :ivar resources: a list of resource items of the captured virtual machine - :vartype resources: list[object] - """ - - _validation = { - 'schema': {'readonly': True}, - 'content_version': {'readonly': True}, - 'parameters': {'readonly': True}, - 'resources': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'schema': {'key': '$schema', 'type': 'str'}, - 'content_version': {'key': 'contentVersion', 'type': 'str'}, - 'parameters': {'key': 'parameters', 'type': 'object'}, - 'resources': {'key': 'resources', 'type': '[object]'}, - } - - def __init__(self, **kwargs): - super(VirtualMachineCaptureResult, self).__init__(**kwargs) - self.schema = None - self.content_version = None - self.parameters = None - self.resources = None diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/virtual_machine_capture_result_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/virtual_machine_capture_result_py3.py deleted file mode 100644 index 09e8afde1591..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/virtual_machine_capture_result_py3.py +++ /dev/null @@ -1,53 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .sub_resource_py3 import SubResource - - -class VirtualMachineCaptureResult(SubResource): - """Output of virtual machine capture operation. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :param id: Resource Id - :type id: str - :ivar schema: the schema of the captured virtual machine - :vartype schema: str - :ivar content_version: the version of the content - :vartype content_version: str - :ivar parameters: parameters of the captured virtual machine - :vartype parameters: object - :ivar resources: a list of resource items of the captured virtual machine - :vartype resources: list[object] - """ - - _validation = { - 'schema': {'readonly': True}, - 'content_version': {'readonly': True}, - 'parameters': {'readonly': True}, - 'resources': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'schema': {'key': '$schema', 'type': 'str'}, - 'content_version': {'key': 'contentVersion', 'type': 'str'}, - 'parameters': {'key': 'parameters', 'type': 'object'}, - 'resources': {'key': 'resources', 'type': '[object]'}, - } - - def __init__(self, *, id: str=None, **kwargs) -> None: - super(VirtualMachineCaptureResult, self).__init__(id=id, **kwargs) - self.schema = None - self.content_version = None - self.parameters = None - self.resources = None diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/virtual_machine_extension.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/virtual_machine_extension.py deleted file mode 100644 index 8fbd1a1d3103..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/virtual_machine_extension.py +++ /dev/null @@ -1,97 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource import Resource - - -class VirtualMachineExtension(Resource): - """Describes a Virtual Machine Extension. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource Id - :vartype id: str - :ivar name: Resource name - :vartype name: str - :ivar type: Resource type - :vartype type: str - :param location: Required. Resource location - :type location: str - :param tags: Resource tags - :type tags: dict[str, str] - :param force_update_tag: How the extension handler should be forced to - update even if the extension configuration has not changed. - :type force_update_tag: str - :param publisher: The name of the extension handler publisher. - :type publisher: str - :param virtual_machine_extension_type: Specifies the type of the - extension; an example is "CustomScriptExtension". - :type virtual_machine_extension_type: str - :param type_handler_version: Specifies the version of the script handler. - :type type_handler_version: str - :param auto_upgrade_minor_version: Indicates whether the extension should - use a newer minor version if one is available at deployment time. Once - deployed, however, the extension will not upgrade minor versions unless - redeployed, even with this property set to true. - :type auto_upgrade_minor_version: bool - :param settings: Json formatted public settings for the extension. - :type settings: object - :param protected_settings: The extension can contain either - protectedSettings or protectedSettingsFromKeyVault or no protected - settings at all. - :type protected_settings: object - :ivar provisioning_state: The provisioning state, which only appears in - the response. - :vartype provisioning_state: str - :param instance_view: The virtual machine extension instance view. - :type instance_view: - ~azure.mgmt.compute.v2019_03_01.models.VirtualMachineExtensionInstanceView - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - 'provisioning_state': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'force_update_tag': {'key': 'properties.forceUpdateTag', 'type': 'str'}, - 'publisher': {'key': 'properties.publisher', 'type': 'str'}, - 'virtual_machine_extension_type': {'key': 'properties.type', 'type': 'str'}, - 'type_handler_version': {'key': 'properties.typeHandlerVersion', 'type': 'str'}, - 'auto_upgrade_minor_version': {'key': 'properties.autoUpgradeMinorVersion', 'type': 'bool'}, - 'settings': {'key': 'properties.settings', 'type': 'object'}, - 'protected_settings': {'key': 'properties.protectedSettings', 'type': 'object'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'instance_view': {'key': 'properties.instanceView', 'type': 'VirtualMachineExtensionInstanceView'}, - } - - def __init__(self, **kwargs): - super(VirtualMachineExtension, self).__init__(**kwargs) - self.force_update_tag = kwargs.get('force_update_tag', None) - self.publisher = kwargs.get('publisher', None) - self.virtual_machine_extension_type = kwargs.get('virtual_machine_extension_type', None) - self.type_handler_version = kwargs.get('type_handler_version', None) - self.auto_upgrade_minor_version = kwargs.get('auto_upgrade_minor_version', None) - self.settings = kwargs.get('settings', None) - self.protected_settings = kwargs.get('protected_settings', None) - self.provisioning_state = None - self.instance_view = kwargs.get('instance_view', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/virtual_machine_extension_handler_instance_view.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/virtual_machine_extension_handler_instance_view.py deleted file mode 100644 index 9453298ad6a3..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/virtual_machine_extension_handler_instance_view.py +++ /dev/null @@ -1,37 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineExtensionHandlerInstanceView(Model): - """The instance view of a virtual machine extension handler. - - :param type: Specifies the type of the extension; an example is - "CustomScriptExtension". - :type type: str - :param type_handler_version: Specifies the version of the script handler. - :type type_handler_version: str - :param status: The extension handler status. - :type status: ~azure.mgmt.compute.v2019_03_01.models.InstanceViewStatus - """ - - _attribute_map = { - 'type': {'key': 'type', 'type': 'str'}, - 'type_handler_version': {'key': 'typeHandlerVersion', 'type': 'str'}, - 'status': {'key': 'status', 'type': 'InstanceViewStatus'}, - } - - def __init__(self, **kwargs): - super(VirtualMachineExtensionHandlerInstanceView, self).__init__(**kwargs) - self.type = kwargs.get('type', None) - self.type_handler_version = kwargs.get('type_handler_version', None) - self.status = kwargs.get('status', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/virtual_machine_extension_handler_instance_view_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/virtual_machine_extension_handler_instance_view_py3.py deleted file mode 100644 index f018bf1fbed0..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/virtual_machine_extension_handler_instance_view_py3.py +++ /dev/null @@ -1,37 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineExtensionHandlerInstanceView(Model): - """The instance view of a virtual machine extension handler. - - :param type: Specifies the type of the extension; an example is - "CustomScriptExtension". - :type type: str - :param type_handler_version: Specifies the version of the script handler. - :type type_handler_version: str - :param status: The extension handler status. - :type status: ~azure.mgmt.compute.v2019_03_01.models.InstanceViewStatus - """ - - _attribute_map = { - 'type': {'key': 'type', 'type': 'str'}, - 'type_handler_version': {'key': 'typeHandlerVersion', 'type': 'str'}, - 'status': {'key': 'status', 'type': 'InstanceViewStatus'}, - } - - def __init__(self, *, type: str=None, type_handler_version: str=None, status=None, **kwargs) -> None: - super(VirtualMachineExtensionHandlerInstanceView, self).__init__(**kwargs) - self.type = type - self.type_handler_version = type_handler_version - self.status = status diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/virtual_machine_extension_image.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/virtual_machine_extension_image.py deleted file mode 100644 index 7273e2b84754..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/virtual_machine_extension_image.py +++ /dev/null @@ -1,81 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource import Resource - - -class VirtualMachineExtensionImage(Resource): - """Describes a Virtual Machine Extension Image. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource Id - :vartype id: str - :ivar name: Resource name - :vartype name: str - :ivar type: Resource type - :vartype type: str - :param location: Required. Resource location - :type location: str - :param tags: Resource tags - :type tags: dict[str, str] - :param operating_system: Required. The operating system this extension - supports. - :type operating_system: str - :param compute_role: Required. The type of role (IaaS or PaaS) this - extension supports. - :type compute_role: str - :param handler_schema: Required. The schema defined by publisher, where - extension consumers should provide settings in a matching schema. - :type handler_schema: str - :param vm_scale_set_enabled: Whether the extension can be used on xRP - VMScaleSets. By default existing extensions are usable on scalesets, but - there might be cases where a publisher wants to explicitly indicate the - extension is only enabled for CRP VMs but not VMSS. - :type vm_scale_set_enabled: bool - :param supports_multiple_extensions: Whether the handler can support - multiple extensions. - :type supports_multiple_extensions: bool - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - 'operating_system': {'required': True}, - 'compute_role': {'required': True}, - 'handler_schema': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'operating_system': {'key': 'properties.operatingSystem', 'type': 'str'}, - 'compute_role': {'key': 'properties.computeRole', 'type': 'str'}, - 'handler_schema': {'key': 'properties.handlerSchema', 'type': 'str'}, - 'vm_scale_set_enabled': {'key': 'properties.vmScaleSetEnabled', 'type': 'bool'}, - 'supports_multiple_extensions': {'key': 'properties.supportsMultipleExtensions', 'type': 'bool'}, - } - - def __init__(self, **kwargs): - super(VirtualMachineExtensionImage, self).__init__(**kwargs) - self.operating_system = kwargs.get('operating_system', None) - self.compute_role = kwargs.get('compute_role', None) - self.handler_schema = kwargs.get('handler_schema', None) - self.vm_scale_set_enabled = kwargs.get('vm_scale_set_enabled', None) - self.supports_multiple_extensions = kwargs.get('supports_multiple_extensions', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/virtual_machine_extension_image_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/virtual_machine_extension_image_py3.py deleted file mode 100644 index 3d48c3a87fb0..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/virtual_machine_extension_image_py3.py +++ /dev/null @@ -1,81 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource_py3 import Resource - - -class VirtualMachineExtensionImage(Resource): - """Describes a Virtual Machine Extension Image. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource Id - :vartype id: str - :ivar name: Resource name - :vartype name: str - :ivar type: Resource type - :vartype type: str - :param location: Required. Resource location - :type location: str - :param tags: Resource tags - :type tags: dict[str, str] - :param operating_system: Required. The operating system this extension - supports. - :type operating_system: str - :param compute_role: Required. The type of role (IaaS or PaaS) this - extension supports. - :type compute_role: str - :param handler_schema: Required. The schema defined by publisher, where - extension consumers should provide settings in a matching schema. - :type handler_schema: str - :param vm_scale_set_enabled: Whether the extension can be used on xRP - VMScaleSets. By default existing extensions are usable on scalesets, but - there might be cases where a publisher wants to explicitly indicate the - extension is only enabled for CRP VMs but not VMSS. - :type vm_scale_set_enabled: bool - :param supports_multiple_extensions: Whether the handler can support - multiple extensions. - :type supports_multiple_extensions: bool - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - 'operating_system': {'required': True}, - 'compute_role': {'required': True}, - 'handler_schema': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'operating_system': {'key': 'properties.operatingSystem', 'type': 'str'}, - 'compute_role': {'key': 'properties.computeRole', 'type': 'str'}, - 'handler_schema': {'key': 'properties.handlerSchema', 'type': 'str'}, - 'vm_scale_set_enabled': {'key': 'properties.vmScaleSetEnabled', 'type': 'bool'}, - 'supports_multiple_extensions': {'key': 'properties.supportsMultipleExtensions', 'type': 'bool'}, - } - - def __init__(self, *, location: str, operating_system: str, compute_role: str, handler_schema: str, tags=None, vm_scale_set_enabled: bool=None, supports_multiple_extensions: bool=None, **kwargs) -> None: - super(VirtualMachineExtensionImage, self).__init__(location=location, tags=tags, **kwargs) - self.operating_system = operating_system - self.compute_role = compute_role - self.handler_schema = handler_schema - self.vm_scale_set_enabled = vm_scale_set_enabled - self.supports_multiple_extensions = supports_multiple_extensions diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/virtual_machine_extension_instance_view.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/virtual_machine_extension_instance_view.py deleted file mode 100644 index 3618aced6e30..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/virtual_machine_extension_instance_view.py +++ /dev/null @@ -1,47 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineExtensionInstanceView(Model): - """The instance view of a virtual machine extension. - - :param name: The virtual machine extension name. - :type name: str - :param type: Specifies the type of the extension; an example is - "CustomScriptExtension". - :type type: str - :param type_handler_version: Specifies the version of the script handler. - :type type_handler_version: str - :param substatuses: The resource status information. - :type substatuses: - list[~azure.mgmt.compute.v2019_03_01.models.InstanceViewStatus] - :param statuses: The resource status information. - :type statuses: - list[~azure.mgmt.compute.v2019_03_01.models.InstanceViewStatus] - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'type_handler_version': {'key': 'typeHandlerVersion', 'type': 'str'}, - 'substatuses': {'key': 'substatuses', 'type': '[InstanceViewStatus]'}, - 'statuses': {'key': 'statuses', 'type': '[InstanceViewStatus]'}, - } - - def __init__(self, **kwargs): - super(VirtualMachineExtensionInstanceView, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.type = kwargs.get('type', None) - self.type_handler_version = kwargs.get('type_handler_version', None) - self.substatuses = kwargs.get('substatuses', None) - self.statuses = kwargs.get('statuses', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/virtual_machine_extension_instance_view_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/virtual_machine_extension_instance_view_py3.py deleted file mode 100644 index 8c15e3b05730..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/virtual_machine_extension_instance_view_py3.py +++ /dev/null @@ -1,47 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineExtensionInstanceView(Model): - """The instance view of a virtual machine extension. - - :param name: The virtual machine extension name. - :type name: str - :param type: Specifies the type of the extension; an example is - "CustomScriptExtension". - :type type: str - :param type_handler_version: Specifies the version of the script handler. - :type type_handler_version: str - :param substatuses: The resource status information. - :type substatuses: - list[~azure.mgmt.compute.v2019_03_01.models.InstanceViewStatus] - :param statuses: The resource status information. - :type statuses: - list[~azure.mgmt.compute.v2019_03_01.models.InstanceViewStatus] - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'type_handler_version': {'key': 'typeHandlerVersion', 'type': 'str'}, - 'substatuses': {'key': 'substatuses', 'type': '[InstanceViewStatus]'}, - 'statuses': {'key': 'statuses', 'type': '[InstanceViewStatus]'}, - } - - def __init__(self, *, name: str=None, type: str=None, type_handler_version: str=None, substatuses=None, statuses=None, **kwargs) -> None: - super(VirtualMachineExtensionInstanceView, self).__init__(**kwargs) - self.name = name - self.type = type - self.type_handler_version = type_handler_version - self.substatuses = substatuses - self.statuses = statuses diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/virtual_machine_extension_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/virtual_machine_extension_py3.py deleted file mode 100644 index c410db0a68ed..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/virtual_machine_extension_py3.py +++ /dev/null @@ -1,97 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource_py3 import Resource - - -class VirtualMachineExtension(Resource): - """Describes a Virtual Machine Extension. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource Id - :vartype id: str - :ivar name: Resource name - :vartype name: str - :ivar type: Resource type - :vartype type: str - :param location: Required. Resource location - :type location: str - :param tags: Resource tags - :type tags: dict[str, str] - :param force_update_tag: How the extension handler should be forced to - update even if the extension configuration has not changed. - :type force_update_tag: str - :param publisher: The name of the extension handler publisher. - :type publisher: str - :param virtual_machine_extension_type: Specifies the type of the - extension; an example is "CustomScriptExtension". - :type virtual_machine_extension_type: str - :param type_handler_version: Specifies the version of the script handler. - :type type_handler_version: str - :param auto_upgrade_minor_version: Indicates whether the extension should - use a newer minor version if one is available at deployment time. Once - deployed, however, the extension will not upgrade minor versions unless - redeployed, even with this property set to true. - :type auto_upgrade_minor_version: bool - :param settings: Json formatted public settings for the extension. - :type settings: object - :param protected_settings: The extension can contain either - protectedSettings or protectedSettingsFromKeyVault or no protected - settings at all. - :type protected_settings: object - :ivar provisioning_state: The provisioning state, which only appears in - the response. - :vartype provisioning_state: str - :param instance_view: The virtual machine extension instance view. - :type instance_view: - ~azure.mgmt.compute.v2019_03_01.models.VirtualMachineExtensionInstanceView - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - 'provisioning_state': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'force_update_tag': {'key': 'properties.forceUpdateTag', 'type': 'str'}, - 'publisher': {'key': 'properties.publisher', 'type': 'str'}, - 'virtual_machine_extension_type': {'key': 'properties.type', 'type': 'str'}, - 'type_handler_version': {'key': 'properties.typeHandlerVersion', 'type': 'str'}, - 'auto_upgrade_minor_version': {'key': 'properties.autoUpgradeMinorVersion', 'type': 'bool'}, - 'settings': {'key': 'properties.settings', 'type': 'object'}, - 'protected_settings': {'key': 'properties.protectedSettings', 'type': 'object'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'instance_view': {'key': 'properties.instanceView', 'type': 'VirtualMachineExtensionInstanceView'}, - } - - def __init__(self, *, location: str, tags=None, force_update_tag: str=None, publisher: str=None, virtual_machine_extension_type: str=None, type_handler_version: str=None, auto_upgrade_minor_version: bool=None, settings=None, protected_settings=None, instance_view=None, **kwargs) -> None: - super(VirtualMachineExtension, self).__init__(location=location, tags=tags, **kwargs) - self.force_update_tag = force_update_tag - self.publisher = publisher - self.virtual_machine_extension_type = virtual_machine_extension_type - self.type_handler_version = type_handler_version - self.auto_upgrade_minor_version = auto_upgrade_minor_version - self.settings = settings - self.protected_settings = protected_settings - self.provisioning_state = None - self.instance_view = instance_view diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/virtual_machine_extension_update.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/virtual_machine_extension_update.py deleted file mode 100644 index b920ff57ff96..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/virtual_machine_extension_update.py +++ /dev/null @@ -1,62 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .update_resource import UpdateResource - - -class VirtualMachineExtensionUpdate(UpdateResource): - """Describes a Virtual Machine Extension. - - :param tags: Resource tags - :type tags: dict[str, str] - :param force_update_tag: How the extension handler should be forced to - update even if the extension configuration has not changed. - :type force_update_tag: str - :param publisher: The name of the extension handler publisher. - :type publisher: str - :param type: Specifies the type of the extension; an example is - "CustomScriptExtension". - :type type: str - :param type_handler_version: Specifies the version of the script handler. - :type type_handler_version: str - :param auto_upgrade_minor_version: Indicates whether the extension should - use a newer minor version if one is available at deployment time. Once - deployed, however, the extension will not upgrade minor versions unless - redeployed, even with this property set to true. - :type auto_upgrade_minor_version: bool - :param settings: Json formatted public settings for the extension. - :type settings: object - :param protected_settings: The extension can contain either - protectedSettings or protectedSettingsFromKeyVault or no protected - settings at all. - :type protected_settings: object - """ - - _attribute_map = { - 'tags': {'key': 'tags', 'type': '{str}'}, - 'force_update_tag': {'key': 'properties.forceUpdateTag', 'type': 'str'}, - 'publisher': {'key': 'properties.publisher', 'type': 'str'}, - 'type': {'key': 'properties.type', 'type': 'str'}, - 'type_handler_version': {'key': 'properties.typeHandlerVersion', 'type': 'str'}, - 'auto_upgrade_minor_version': {'key': 'properties.autoUpgradeMinorVersion', 'type': 'bool'}, - 'settings': {'key': 'properties.settings', 'type': 'object'}, - 'protected_settings': {'key': 'properties.protectedSettings', 'type': 'object'}, - } - - def __init__(self, **kwargs): - super(VirtualMachineExtensionUpdate, self).__init__(**kwargs) - self.force_update_tag = kwargs.get('force_update_tag', None) - self.publisher = kwargs.get('publisher', None) - self.type = kwargs.get('type', None) - self.type_handler_version = kwargs.get('type_handler_version', None) - self.auto_upgrade_minor_version = kwargs.get('auto_upgrade_minor_version', None) - self.settings = kwargs.get('settings', None) - self.protected_settings = kwargs.get('protected_settings', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/virtual_machine_extension_update_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/virtual_machine_extension_update_py3.py deleted file mode 100644 index c32c18d32759..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/virtual_machine_extension_update_py3.py +++ /dev/null @@ -1,62 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .update_resource_py3 import UpdateResource - - -class VirtualMachineExtensionUpdate(UpdateResource): - """Describes a Virtual Machine Extension. - - :param tags: Resource tags - :type tags: dict[str, str] - :param force_update_tag: How the extension handler should be forced to - update even if the extension configuration has not changed. - :type force_update_tag: str - :param publisher: The name of the extension handler publisher. - :type publisher: str - :param type: Specifies the type of the extension; an example is - "CustomScriptExtension". - :type type: str - :param type_handler_version: Specifies the version of the script handler. - :type type_handler_version: str - :param auto_upgrade_minor_version: Indicates whether the extension should - use a newer minor version if one is available at deployment time. Once - deployed, however, the extension will not upgrade minor versions unless - redeployed, even with this property set to true. - :type auto_upgrade_minor_version: bool - :param settings: Json formatted public settings for the extension. - :type settings: object - :param protected_settings: The extension can contain either - protectedSettings or protectedSettingsFromKeyVault or no protected - settings at all. - :type protected_settings: object - """ - - _attribute_map = { - 'tags': {'key': 'tags', 'type': '{str}'}, - 'force_update_tag': {'key': 'properties.forceUpdateTag', 'type': 'str'}, - 'publisher': {'key': 'properties.publisher', 'type': 'str'}, - 'type': {'key': 'properties.type', 'type': 'str'}, - 'type_handler_version': {'key': 'properties.typeHandlerVersion', 'type': 'str'}, - 'auto_upgrade_minor_version': {'key': 'properties.autoUpgradeMinorVersion', 'type': 'bool'}, - 'settings': {'key': 'properties.settings', 'type': 'object'}, - 'protected_settings': {'key': 'properties.protectedSettings', 'type': 'object'}, - } - - def __init__(self, *, tags=None, force_update_tag: str=None, publisher: str=None, type: str=None, type_handler_version: str=None, auto_upgrade_minor_version: bool=None, settings=None, protected_settings=None, **kwargs) -> None: - super(VirtualMachineExtensionUpdate, self).__init__(tags=tags, **kwargs) - self.force_update_tag = force_update_tag - self.publisher = publisher - self.type = type - self.type_handler_version = type_handler_version - self.auto_upgrade_minor_version = auto_upgrade_minor_version - self.settings = settings - self.protected_settings = protected_settings diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/virtual_machine_extensions_list_result.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/virtual_machine_extensions_list_result.py deleted file mode 100644 index cbae4c70b410..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/virtual_machine_extensions_list_result.py +++ /dev/null @@ -1,29 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineExtensionsListResult(Model): - """The List Extension operation response. - - :param value: The list of extensions - :type value: - list[~azure.mgmt.compute.v2019_03_01.models.VirtualMachineExtension] - """ - - _attribute_map = { - 'value': {'key': 'value', 'type': '[VirtualMachineExtension]'}, - } - - def __init__(self, **kwargs): - super(VirtualMachineExtensionsListResult, self).__init__(**kwargs) - self.value = kwargs.get('value', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/virtual_machine_extensions_list_result_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/virtual_machine_extensions_list_result_py3.py deleted file mode 100644 index 604674a4f2b1..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/virtual_machine_extensions_list_result_py3.py +++ /dev/null @@ -1,29 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineExtensionsListResult(Model): - """The List Extension operation response. - - :param value: The list of extensions - :type value: - list[~azure.mgmt.compute.v2019_03_01.models.VirtualMachineExtension] - """ - - _attribute_map = { - 'value': {'key': 'value', 'type': '[VirtualMachineExtension]'}, - } - - def __init__(self, *, value=None, **kwargs) -> None: - super(VirtualMachineExtensionsListResult, self).__init__(**kwargs) - self.value = value diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/virtual_machine_health_status.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/virtual_machine_health_status.py deleted file mode 100644 index 8f0225557f5f..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/virtual_machine_health_status.py +++ /dev/null @@ -1,35 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineHealthStatus(Model): - """The health status of the VM. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar status: The health status information for the VM. - :vartype status: ~azure.mgmt.compute.v2019_03_01.models.InstanceViewStatus - """ - - _validation = { - 'status': {'readonly': True}, - } - - _attribute_map = { - 'status': {'key': 'status', 'type': 'InstanceViewStatus'}, - } - - def __init__(self, **kwargs): - super(VirtualMachineHealthStatus, self).__init__(**kwargs) - self.status = None diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/virtual_machine_health_status_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/virtual_machine_health_status_py3.py deleted file mode 100644 index 0ecf99c4a5b6..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/virtual_machine_health_status_py3.py +++ /dev/null @@ -1,35 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineHealthStatus(Model): - """The health status of the VM. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar status: The health status information for the VM. - :vartype status: ~azure.mgmt.compute.v2019_03_01.models.InstanceViewStatus - """ - - _validation = { - 'status': {'readonly': True}, - } - - _attribute_map = { - 'status': {'key': 'status', 'type': 'InstanceViewStatus'}, - } - - def __init__(self, **kwargs) -> None: - super(VirtualMachineHealthStatus, self).__init__(**kwargs) - self.status = None diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/virtual_machine_identity.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/virtual_machine_identity.py deleted file mode 100644 index 0f7e6de1af35..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/virtual_machine_identity.py +++ /dev/null @@ -1,59 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineIdentity(Model): - """Identity for the virtual machine. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar principal_id: The principal id of virtual machine identity. This - property will only be provided for a system assigned identity. - :vartype principal_id: str - :ivar tenant_id: The tenant id associated with the virtual machine. This - property will only be provided for a system assigned identity. - :vartype tenant_id: str - :param type: The type of identity used for the virtual machine. The type - 'SystemAssigned, UserAssigned' includes both an implicitly created - identity and a set of user assigned identities. The type 'None' will - remove any identities from the virtual machine. Possible values include: - 'SystemAssigned', 'UserAssigned', 'SystemAssigned, UserAssigned', 'None' - :type type: str or - ~azure.mgmt.compute.v2019_03_01.models.ResourceIdentityType - :param user_assigned_identities: The list of user identities associated - with the Virtual Machine. The user identity dictionary key references will - be ARM resource ids in the form: - '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'. - :type user_assigned_identities: dict[str, - ~azure.mgmt.compute.v2019_03_01.models.VirtualMachineIdentityUserAssignedIdentitiesValue] - """ - - _validation = { - 'principal_id': {'readonly': True}, - 'tenant_id': {'readonly': True}, - } - - _attribute_map = { - 'principal_id': {'key': 'principalId', 'type': 'str'}, - 'tenant_id': {'key': 'tenantId', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'ResourceIdentityType'}, - 'user_assigned_identities': {'key': 'userAssignedIdentities', 'type': '{VirtualMachineIdentityUserAssignedIdentitiesValue}'}, - } - - def __init__(self, **kwargs): - super(VirtualMachineIdentity, self).__init__(**kwargs) - self.principal_id = None - self.tenant_id = None - self.type = kwargs.get('type', None) - self.user_assigned_identities = kwargs.get('user_assigned_identities', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/virtual_machine_identity_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/virtual_machine_identity_py3.py deleted file mode 100644 index 4473c7d88c04..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/virtual_machine_identity_py3.py +++ /dev/null @@ -1,59 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineIdentity(Model): - """Identity for the virtual machine. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar principal_id: The principal id of virtual machine identity. This - property will only be provided for a system assigned identity. - :vartype principal_id: str - :ivar tenant_id: The tenant id associated with the virtual machine. This - property will only be provided for a system assigned identity. - :vartype tenant_id: str - :param type: The type of identity used for the virtual machine. The type - 'SystemAssigned, UserAssigned' includes both an implicitly created - identity and a set of user assigned identities. The type 'None' will - remove any identities from the virtual machine. Possible values include: - 'SystemAssigned', 'UserAssigned', 'SystemAssigned, UserAssigned', 'None' - :type type: str or - ~azure.mgmt.compute.v2019_03_01.models.ResourceIdentityType - :param user_assigned_identities: The list of user identities associated - with the Virtual Machine. The user identity dictionary key references will - be ARM resource ids in the form: - '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'. - :type user_assigned_identities: dict[str, - ~azure.mgmt.compute.v2019_03_01.models.VirtualMachineIdentityUserAssignedIdentitiesValue] - """ - - _validation = { - 'principal_id': {'readonly': True}, - 'tenant_id': {'readonly': True}, - } - - _attribute_map = { - 'principal_id': {'key': 'principalId', 'type': 'str'}, - 'tenant_id': {'key': 'tenantId', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'ResourceIdentityType'}, - 'user_assigned_identities': {'key': 'userAssignedIdentities', 'type': '{VirtualMachineIdentityUserAssignedIdentitiesValue}'}, - } - - def __init__(self, *, type=None, user_assigned_identities=None, **kwargs) -> None: - super(VirtualMachineIdentity, self).__init__(**kwargs) - self.principal_id = None - self.tenant_id = None - self.type = type - self.user_assigned_identities = user_assigned_identities diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/virtual_machine_identity_user_assigned_identities_value.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/virtual_machine_identity_user_assigned_identities_value.py deleted file mode 100644 index 8df9f5c86f49..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/virtual_machine_identity_user_assigned_identities_value.py +++ /dev/null @@ -1,40 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineIdentityUserAssignedIdentitiesValue(Model): - """VirtualMachineIdentityUserAssignedIdentitiesValue. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar principal_id: The principal id of user assigned identity. - :vartype principal_id: str - :ivar client_id: The client id of user assigned identity. - :vartype client_id: str - """ - - _validation = { - 'principal_id': {'readonly': True}, - 'client_id': {'readonly': True}, - } - - _attribute_map = { - 'principal_id': {'key': 'principalId', 'type': 'str'}, - 'client_id': {'key': 'clientId', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(VirtualMachineIdentityUserAssignedIdentitiesValue, self).__init__(**kwargs) - self.principal_id = None - self.client_id = None diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/virtual_machine_identity_user_assigned_identities_value_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/virtual_machine_identity_user_assigned_identities_value_py3.py deleted file mode 100644 index 0921bb643ccf..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/virtual_machine_identity_user_assigned_identities_value_py3.py +++ /dev/null @@ -1,40 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineIdentityUserAssignedIdentitiesValue(Model): - """VirtualMachineIdentityUserAssignedIdentitiesValue. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar principal_id: The principal id of user assigned identity. - :vartype principal_id: str - :ivar client_id: The client id of user assigned identity. - :vartype client_id: str - """ - - _validation = { - 'principal_id': {'readonly': True}, - 'client_id': {'readonly': True}, - } - - _attribute_map = { - 'principal_id': {'key': 'principalId', 'type': 'str'}, - 'client_id': {'key': 'clientId', 'type': 'str'}, - } - - def __init__(self, **kwargs) -> None: - super(VirtualMachineIdentityUserAssignedIdentitiesValue, self).__init__(**kwargs) - self.principal_id = None - self.client_id = None diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/virtual_machine_image.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/virtual_machine_image.py deleted file mode 100644 index 0b512cf32d78..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/virtual_machine_image.py +++ /dev/null @@ -1,64 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .virtual_machine_image_resource import VirtualMachineImageResource - - -class VirtualMachineImage(VirtualMachineImageResource): - """Describes a Virtual Machine Image. - - All required parameters must be populated in order to send to Azure. - - :param id: Resource Id - :type id: str - :param name: Required. The name of the resource. - :type name: str - :param location: Required. The supported Azure location of the resource. - :type location: str - :param tags: Specifies the tags that are assigned to the virtual machine. - For more information about using tags, see [Using tags to organize your - Azure - resources](https://docs.microsoft.com/azure/azure-resource-manager/resource-group-using-tags.md). - :type tags: dict[str, str] - :param plan: - :type plan: ~azure.mgmt.compute.v2019_03_01.models.PurchasePlan - :param os_disk_image: - :type os_disk_image: ~azure.mgmt.compute.v2019_03_01.models.OSDiskImage - :param data_disk_images: - :type data_disk_images: - list[~azure.mgmt.compute.v2019_03_01.models.DataDiskImage] - :param automatic_os_upgrade_properties: - :type automatic_os_upgrade_properties: - ~azure.mgmt.compute.v2019_03_01.models.AutomaticOSUpgradeProperties - """ - - _validation = { - 'name': {'required': True}, - 'location': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'plan': {'key': 'properties.plan', 'type': 'PurchasePlan'}, - 'os_disk_image': {'key': 'properties.osDiskImage', 'type': 'OSDiskImage'}, - 'data_disk_images': {'key': 'properties.dataDiskImages', 'type': '[DataDiskImage]'}, - 'automatic_os_upgrade_properties': {'key': 'properties.automaticOSUpgradeProperties', 'type': 'AutomaticOSUpgradeProperties'}, - } - - def __init__(self, **kwargs): - super(VirtualMachineImage, self).__init__(**kwargs) - self.plan = kwargs.get('plan', None) - self.os_disk_image = kwargs.get('os_disk_image', None) - self.data_disk_images = kwargs.get('data_disk_images', None) - self.automatic_os_upgrade_properties = kwargs.get('automatic_os_upgrade_properties', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/virtual_machine_image_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/virtual_machine_image_py3.py deleted file mode 100644 index 61450444d3ef..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/virtual_machine_image_py3.py +++ /dev/null @@ -1,64 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .virtual_machine_image_resource_py3 import VirtualMachineImageResource - - -class VirtualMachineImage(VirtualMachineImageResource): - """Describes a Virtual Machine Image. - - All required parameters must be populated in order to send to Azure. - - :param id: Resource Id - :type id: str - :param name: Required. The name of the resource. - :type name: str - :param location: Required. The supported Azure location of the resource. - :type location: str - :param tags: Specifies the tags that are assigned to the virtual machine. - For more information about using tags, see [Using tags to organize your - Azure - resources](https://docs.microsoft.com/azure/azure-resource-manager/resource-group-using-tags.md). - :type tags: dict[str, str] - :param plan: - :type plan: ~azure.mgmt.compute.v2019_03_01.models.PurchasePlan - :param os_disk_image: - :type os_disk_image: ~azure.mgmt.compute.v2019_03_01.models.OSDiskImage - :param data_disk_images: - :type data_disk_images: - list[~azure.mgmt.compute.v2019_03_01.models.DataDiskImage] - :param automatic_os_upgrade_properties: - :type automatic_os_upgrade_properties: - ~azure.mgmt.compute.v2019_03_01.models.AutomaticOSUpgradeProperties - """ - - _validation = { - 'name': {'required': True}, - 'location': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'plan': {'key': 'properties.plan', 'type': 'PurchasePlan'}, - 'os_disk_image': {'key': 'properties.osDiskImage', 'type': 'OSDiskImage'}, - 'data_disk_images': {'key': 'properties.dataDiskImages', 'type': '[DataDiskImage]'}, - 'automatic_os_upgrade_properties': {'key': 'properties.automaticOSUpgradeProperties', 'type': 'AutomaticOSUpgradeProperties'}, - } - - def __init__(self, *, name: str, location: str, id: str=None, tags=None, plan=None, os_disk_image=None, data_disk_images=None, automatic_os_upgrade_properties=None, **kwargs) -> None: - super(VirtualMachineImage, self).__init__(id=id, name=name, location=location, tags=tags, **kwargs) - self.plan = plan - self.os_disk_image = os_disk_image - self.data_disk_images = data_disk_images - self.automatic_os_upgrade_properties = automatic_os_upgrade_properties diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/virtual_machine_image_resource.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/virtual_machine_image_resource.py deleted file mode 100644 index 8807cc8f391b..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/virtual_machine_image_resource.py +++ /dev/null @@ -1,49 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .sub_resource import SubResource - - -class VirtualMachineImageResource(SubResource): - """Virtual machine image resource information. - - All required parameters must be populated in order to send to Azure. - - :param id: Resource Id - :type id: str - :param name: Required. The name of the resource. - :type name: str - :param location: Required. The supported Azure location of the resource. - :type location: str - :param tags: Specifies the tags that are assigned to the virtual machine. - For more information about using tags, see [Using tags to organize your - Azure - resources](https://docs.microsoft.com/azure/azure-resource-manager/resource-group-using-tags.md). - :type tags: dict[str, str] - """ - - _validation = { - 'name': {'required': True}, - 'location': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - } - - def __init__(self, **kwargs): - super(VirtualMachineImageResource, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.location = kwargs.get('location', None) - self.tags = kwargs.get('tags', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/virtual_machine_image_resource_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/virtual_machine_image_resource_py3.py deleted file mode 100644 index b9d63a8bc9e0..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/virtual_machine_image_resource_py3.py +++ /dev/null @@ -1,49 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .sub_resource_py3 import SubResource - - -class VirtualMachineImageResource(SubResource): - """Virtual machine image resource information. - - All required parameters must be populated in order to send to Azure. - - :param id: Resource Id - :type id: str - :param name: Required. The name of the resource. - :type name: str - :param location: Required. The supported Azure location of the resource. - :type location: str - :param tags: Specifies the tags that are assigned to the virtual machine. - For more information about using tags, see [Using tags to organize your - Azure - resources](https://docs.microsoft.com/azure/azure-resource-manager/resource-group-using-tags.md). - :type tags: dict[str, str] - """ - - _validation = { - 'name': {'required': True}, - 'location': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - } - - def __init__(self, *, name: str, location: str, id: str=None, tags=None, **kwargs) -> None: - super(VirtualMachineImageResource, self).__init__(id=id, **kwargs) - self.name = name - self.location = location - self.tags = tags diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/virtual_machine_instance_view.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/virtual_machine_instance_view.py deleted file mode 100644 index 9617b3479368..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/virtual_machine_instance_view.py +++ /dev/null @@ -1,84 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineInstanceView(Model): - """The instance view of a virtual machine. - - :param platform_update_domain: Specifies the update domain of the virtual - machine. - :type platform_update_domain: int - :param platform_fault_domain: Specifies the fault domain of the virtual - machine. - :type platform_fault_domain: int - :param computer_name: The computer name assigned to the virtual machine. - :type computer_name: str - :param os_name: The Operating System running on the virtual machine. - :type os_name: str - :param os_version: The version of Operating System running on the virtual - machine. - :type os_version: str - :param rdp_thumb_print: The Remote desktop certificate thumbprint. - :type rdp_thumb_print: str - :param vm_agent: The VM Agent running on the virtual machine. - :type vm_agent: - ~azure.mgmt.compute.v2019_03_01.models.VirtualMachineAgentInstanceView - :param maintenance_redeploy_status: The Maintenance Operation status on - the virtual machine. - :type maintenance_redeploy_status: - ~azure.mgmt.compute.v2019_03_01.models.MaintenanceRedeployStatus - :param disks: The virtual machine disk information. - :type disks: list[~azure.mgmt.compute.v2019_03_01.models.DiskInstanceView] - :param extensions: The extensions information. - :type extensions: - list[~azure.mgmt.compute.v2019_03_01.models.VirtualMachineExtensionInstanceView] - :param boot_diagnostics: Boot Diagnostics is a debugging feature which - allows you to view Console Output and Screenshot to diagnose VM status. -

    You can easily view the output of your console log.

    - Azure also enables you to see a screenshot of the VM from the hypervisor. - :type boot_diagnostics: - ~azure.mgmt.compute.v2019_03_01.models.BootDiagnosticsInstanceView - :param statuses: The resource status information. - :type statuses: - list[~azure.mgmt.compute.v2019_03_01.models.InstanceViewStatus] - """ - - _attribute_map = { - 'platform_update_domain': {'key': 'platformUpdateDomain', 'type': 'int'}, - 'platform_fault_domain': {'key': 'platformFaultDomain', 'type': 'int'}, - 'computer_name': {'key': 'computerName', 'type': 'str'}, - 'os_name': {'key': 'osName', 'type': 'str'}, - 'os_version': {'key': 'osVersion', 'type': 'str'}, - 'rdp_thumb_print': {'key': 'rdpThumbPrint', 'type': 'str'}, - 'vm_agent': {'key': 'vmAgent', 'type': 'VirtualMachineAgentInstanceView'}, - 'maintenance_redeploy_status': {'key': 'maintenanceRedeployStatus', 'type': 'MaintenanceRedeployStatus'}, - 'disks': {'key': 'disks', 'type': '[DiskInstanceView]'}, - 'extensions': {'key': 'extensions', 'type': '[VirtualMachineExtensionInstanceView]'}, - 'boot_diagnostics': {'key': 'bootDiagnostics', 'type': 'BootDiagnosticsInstanceView'}, - 'statuses': {'key': 'statuses', 'type': '[InstanceViewStatus]'}, - } - - def __init__(self, **kwargs): - super(VirtualMachineInstanceView, self).__init__(**kwargs) - self.platform_update_domain = kwargs.get('platform_update_domain', None) - self.platform_fault_domain = kwargs.get('platform_fault_domain', None) - self.computer_name = kwargs.get('computer_name', None) - self.os_name = kwargs.get('os_name', None) - self.os_version = kwargs.get('os_version', None) - self.rdp_thumb_print = kwargs.get('rdp_thumb_print', None) - self.vm_agent = kwargs.get('vm_agent', None) - self.maintenance_redeploy_status = kwargs.get('maintenance_redeploy_status', None) - self.disks = kwargs.get('disks', None) - self.extensions = kwargs.get('extensions', None) - self.boot_diagnostics = kwargs.get('boot_diagnostics', None) - self.statuses = kwargs.get('statuses', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/virtual_machine_instance_view_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/virtual_machine_instance_view_py3.py deleted file mode 100644 index 5341df3481c6..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/virtual_machine_instance_view_py3.py +++ /dev/null @@ -1,84 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineInstanceView(Model): - """The instance view of a virtual machine. - - :param platform_update_domain: Specifies the update domain of the virtual - machine. - :type platform_update_domain: int - :param platform_fault_domain: Specifies the fault domain of the virtual - machine. - :type platform_fault_domain: int - :param computer_name: The computer name assigned to the virtual machine. - :type computer_name: str - :param os_name: The Operating System running on the virtual machine. - :type os_name: str - :param os_version: The version of Operating System running on the virtual - machine. - :type os_version: str - :param rdp_thumb_print: The Remote desktop certificate thumbprint. - :type rdp_thumb_print: str - :param vm_agent: The VM Agent running on the virtual machine. - :type vm_agent: - ~azure.mgmt.compute.v2019_03_01.models.VirtualMachineAgentInstanceView - :param maintenance_redeploy_status: The Maintenance Operation status on - the virtual machine. - :type maintenance_redeploy_status: - ~azure.mgmt.compute.v2019_03_01.models.MaintenanceRedeployStatus - :param disks: The virtual machine disk information. - :type disks: list[~azure.mgmt.compute.v2019_03_01.models.DiskInstanceView] - :param extensions: The extensions information. - :type extensions: - list[~azure.mgmt.compute.v2019_03_01.models.VirtualMachineExtensionInstanceView] - :param boot_diagnostics: Boot Diagnostics is a debugging feature which - allows you to view Console Output and Screenshot to diagnose VM status. -

    You can easily view the output of your console log.

    - Azure also enables you to see a screenshot of the VM from the hypervisor. - :type boot_diagnostics: - ~azure.mgmt.compute.v2019_03_01.models.BootDiagnosticsInstanceView - :param statuses: The resource status information. - :type statuses: - list[~azure.mgmt.compute.v2019_03_01.models.InstanceViewStatus] - """ - - _attribute_map = { - 'platform_update_domain': {'key': 'platformUpdateDomain', 'type': 'int'}, - 'platform_fault_domain': {'key': 'platformFaultDomain', 'type': 'int'}, - 'computer_name': {'key': 'computerName', 'type': 'str'}, - 'os_name': {'key': 'osName', 'type': 'str'}, - 'os_version': {'key': 'osVersion', 'type': 'str'}, - 'rdp_thumb_print': {'key': 'rdpThumbPrint', 'type': 'str'}, - 'vm_agent': {'key': 'vmAgent', 'type': 'VirtualMachineAgentInstanceView'}, - 'maintenance_redeploy_status': {'key': 'maintenanceRedeployStatus', 'type': 'MaintenanceRedeployStatus'}, - 'disks': {'key': 'disks', 'type': '[DiskInstanceView]'}, - 'extensions': {'key': 'extensions', 'type': '[VirtualMachineExtensionInstanceView]'}, - 'boot_diagnostics': {'key': 'bootDiagnostics', 'type': 'BootDiagnosticsInstanceView'}, - 'statuses': {'key': 'statuses', 'type': '[InstanceViewStatus]'}, - } - - def __init__(self, *, platform_update_domain: int=None, platform_fault_domain: int=None, computer_name: str=None, os_name: str=None, os_version: str=None, rdp_thumb_print: str=None, vm_agent=None, maintenance_redeploy_status=None, disks=None, extensions=None, boot_diagnostics=None, statuses=None, **kwargs) -> None: - super(VirtualMachineInstanceView, self).__init__(**kwargs) - self.platform_update_domain = platform_update_domain - self.platform_fault_domain = platform_fault_domain - self.computer_name = computer_name - self.os_name = os_name - self.os_version = os_version - self.rdp_thumb_print = rdp_thumb_print - self.vm_agent = vm_agent - self.maintenance_redeploy_status = maintenance_redeploy_status - self.disks = disks - self.extensions = extensions - self.boot_diagnostics = boot_diagnostics - self.statuses = statuses diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/virtual_machine_paged.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/virtual_machine_paged.py deleted file mode 100644 index 8dffd86edefe..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/virtual_machine_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class VirtualMachinePaged(Paged): - """ - A paging container for iterating over a list of :class:`VirtualMachine ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[VirtualMachine]'} - } - - def __init__(self, *args, **kwargs): - - super(VirtualMachinePaged, self).__init__(*args, **kwargs) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/virtual_machine_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/virtual_machine_py3.py deleted file mode 100644 index c9f5bad89e8c..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/virtual_machine_py3.py +++ /dev/null @@ -1,163 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource_py3 import Resource - - -class VirtualMachine(Resource): - """Describes a Virtual Machine. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource Id - :vartype id: str - :ivar name: Resource name - :vartype name: str - :ivar type: Resource type - :vartype type: str - :param location: Required. Resource location - :type location: str - :param tags: Resource tags - :type tags: dict[str, str] - :param plan: Specifies information about the marketplace image used to - create the virtual machine. This element is only used for marketplace - images. Before you can use a marketplace image from an API, you must - enable the image for programmatic use. In the Azure portal, find the - marketplace image that you want to use and then click **Want to deploy - programmatically, Get Started ->**. Enter any required information and - then click **Save**. - :type plan: ~azure.mgmt.compute.v2019_03_01.models.Plan - :param hardware_profile: Specifies the hardware settings for the virtual - machine. - :type hardware_profile: - ~azure.mgmt.compute.v2019_03_01.models.HardwareProfile - :param storage_profile: Specifies the storage settings for the virtual - machine disks. - :type storage_profile: - ~azure.mgmt.compute.v2019_03_01.models.StorageProfile - :param additional_capabilities: Specifies additional capabilities enabled - or disabled on the virtual machine. - :type additional_capabilities: - ~azure.mgmt.compute.v2019_03_01.models.AdditionalCapabilities - :param os_profile: Specifies the operating system settings for the virtual - machine. - :type os_profile: ~azure.mgmt.compute.v2019_03_01.models.OSProfile - :param network_profile: Specifies the network interfaces of the virtual - machine. - :type network_profile: - ~azure.mgmt.compute.v2019_03_01.models.NetworkProfile - :param diagnostics_profile: Specifies the boot diagnostic settings state. -

    Minimum api-version: 2015-06-15. - :type diagnostics_profile: - ~azure.mgmt.compute.v2019_03_01.models.DiagnosticsProfile - :param availability_set: Specifies information about the availability set - that the virtual machine should be assigned to. Virtual machines specified - in the same availability set are allocated to different nodes to maximize - availability. For more information about availability sets, see [Manage - the availability of virtual - machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-manage-availability?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). -

    For more information on Azure planned maintenance, see [Planned - maintenance for virtual machines in - Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-planned-maintenance?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json) -

    Currently, a VM can only be added to availability set at creation - time. An existing VM cannot be added to an availability set. - :type availability_set: ~azure.mgmt.compute.v2019_03_01.models.SubResource - :param proximity_placement_group: Specifies information about the - proximity placement group that the virtual machine should be assigned to. -

    Minimum api-version: 2018-04-01. - :type proximity_placement_group: - ~azure.mgmt.compute.v2019_03_01.models.SubResource - :ivar provisioning_state: The provisioning state, which only appears in - the response. - :vartype provisioning_state: str - :ivar instance_view: The virtual machine instance view. - :vartype instance_view: - ~azure.mgmt.compute.v2019_03_01.models.VirtualMachineInstanceView - :param license_type: Specifies that the image or disk that is being used - was licensed on-premises. This element is only used for images that - contain the Windows Server operating system.

    Possible values are: -

    Windows_Client

    Windows_Server

    If this element - is included in a request for an update, the value must match the initial - value. This value cannot be updated.

    For more information, see - [Azure Hybrid Use Benefit for Windows - Server](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-hybrid-use-benefit-licensing?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json) -

    Minimum api-version: 2015-06-15 - :type license_type: str - :ivar vm_id: Specifies the VM unique ID which is a 128-bits identifier - that is encoded and stored in all Azure IaaS VMs SMBIOS and can be read - using platform BIOS commands. - :vartype vm_id: str - :ivar resources: The virtual machine child extension resources. - :vartype resources: - list[~azure.mgmt.compute.v2019_03_01.models.VirtualMachineExtension] - :param identity: The identity of the virtual machine, if configured. - :type identity: - ~azure.mgmt.compute.v2019_03_01.models.VirtualMachineIdentity - :param zones: The virtual machine zones. - :type zones: list[str] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - 'provisioning_state': {'readonly': True}, - 'instance_view': {'readonly': True}, - 'vm_id': {'readonly': True}, - 'resources': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'plan': {'key': 'plan', 'type': 'Plan'}, - 'hardware_profile': {'key': 'properties.hardwareProfile', 'type': 'HardwareProfile'}, - 'storage_profile': {'key': 'properties.storageProfile', 'type': 'StorageProfile'}, - 'additional_capabilities': {'key': 'properties.additionalCapabilities', 'type': 'AdditionalCapabilities'}, - 'os_profile': {'key': 'properties.osProfile', 'type': 'OSProfile'}, - 'network_profile': {'key': 'properties.networkProfile', 'type': 'NetworkProfile'}, - 'diagnostics_profile': {'key': 'properties.diagnosticsProfile', 'type': 'DiagnosticsProfile'}, - 'availability_set': {'key': 'properties.availabilitySet', 'type': 'SubResource'}, - 'proximity_placement_group': {'key': 'properties.proximityPlacementGroup', 'type': 'SubResource'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'instance_view': {'key': 'properties.instanceView', 'type': 'VirtualMachineInstanceView'}, - 'license_type': {'key': 'properties.licenseType', 'type': 'str'}, - 'vm_id': {'key': 'properties.vmId', 'type': 'str'}, - 'resources': {'key': 'resources', 'type': '[VirtualMachineExtension]'}, - 'identity': {'key': 'identity', 'type': 'VirtualMachineIdentity'}, - 'zones': {'key': 'zones', 'type': '[str]'}, - } - - def __init__(self, *, location: str, tags=None, plan=None, hardware_profile=None, storage_profile=None, additional_capabilities=None, os_profile=None, network_profile=None, diagnostics_profile=None, availability_set=None, proximity_placement_group=None, license_type: str=None, identity=None, zones=None, **kwargs) -> None: - super(VirtualMachine, self).__init__(location=location, tags=tags, **kwargs) - self.plan = plan - self.hardware_profile = hardware_profile - self.storage_profile = storage_profile - self.additional_capabilities = additional_capabilities - self.os_profile = os_profile - self.network_profile = network_profile - self.diagnostics_profile = diagnostics_profile - self.availability_set = availability_set - self.proximity_placement_group = proximity_placement_group - self.provisioning_state = None - self.instance_view = None - self.license_type = license_type - self.vm_id = None - self.resources = None - self.identity = identity - self.zones = zones diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/virtual_machine_reimage_parameters.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/virtual_machine_reimage_parameters.py deleted file mode 100644 index bfc329724f61..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/virtual_machine_reimage_parameters.py +++ /dev/null @@ -1,30 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineReimageParameters(Model): - """Parameters for Reimaging Virtual Machine. NOTE: Virtual Machine OS disk - will always be reimaged. - - :param temp_disk: Specifies whether to reimage temp disk. Default value: - false. - :type temp_disk: bool - """ - - _attribute_map = { - 'temp_disk': {'key': 'tempDisk', 'type': 'bool'}, - } - - def __init__(self, **kwargs): - super(VirtualMachineReimageParameters, self).__init__(**kwargs) - self.temp_disk = kwargs.get('temp_disk', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/virtual_machine_reimage_parameters_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/virtual_machine_reimage_parameters_py3.py deleted file mode 100644 index f1e8bf91ce2a..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/virtual_machine_reimage_parameters_py3.py +++ /dev/null @@ -1,30 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineReimageParameters(Model): - """Parameters for Reimaging Virtual Machine. NOTE: Virtual Machine OS disk - will always be reimaged. - - :param temp_disk: Specifies whether to reimage temp disk. Default value: - false. - :type temp_disk: bool - """ - - _attribute_map = { - 'temp_disk': {'key': 'tempDisk', 'type': 'bool'}, - } - - def __init__(self, *, temp_disk: bool=None, **kwargs) -> None: - super(VirtualMachineReimageParameters, self).__init__(**kwargs) - self.temp_disk = temp_disk diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/virtual_machine_scale_set.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/virtual_machine_scale_set.py deleted file mode 100644 index 3d64a68bc22a..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/virtual_machine_scale_set.py +++ /dev/null @@ -1,138 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource import Resource - - -class VirtualMachineScaleSet(Resource): - """Describes a Virtual Machine Scale Set. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource Id - :vartype id: str - :ivar name: Resource name - :vartype name: str - :ivar type: Resource type - :vartype type: str - :param location: Required. Resource location - :type location: str - :param tags: Resource tags - :type tags: dict[str, str] - :param sku: The virtual machine scale set sku. - :type sku: ~azure.mgmt.compute.v2019_03_01.models.Sku - :param plan: Specifies information about the marketplace image used to - create the virtual machine. This element is only used for marketplace - images. Before you can use a marketplace image from an API, you must - enable the image for programmatic use. In the Azure portal, find the - marketplace image that you want to use and then click **Want to deploy - programmatically, Get Started ->**. Enter any required information and - then click **Save**. - :type plan: ~azure.mgmt.compute.v2019_03_01.models.Plan - :param upgrade_policy: The upgrade policy. - :type upgrade_policy: ~azure.mgmt.compute.v2019_03_01.models.UpgradePolicy - :param virtual_machine_profile: The virtual machine profile. - :type virtual_machine_profile: - ~azure.mgmt.compute.v2019_03_01.models.VirtualMachineScaleSetVMProfile - :ivar provisioning_state: The provisioning state, which only appears in - the response. - :vartype provisioning_state: str - :param overprovision: Specifies whether the Virtual Machine Scale Set - should be overprovisioned. - :type overprovision: bool - :param do_not_run_extensions_on_overprovisioned_vms: When Overprovision is - enabled, extensions are launched only on the requested number of VMs which - are finally kept. This property will hence ensure that the extensions do - not run on the extra overprovisioned VMs. - :type do_not_run_extensions_on_overprovisioned_vms: bool - :ivar unique_id: Specifies the ID which uniquely identifies a Virtual - Machine Scale Set. - :vartype unique_id: str - :param single_placement_group: When true this limits the scale set to a - single placement group, of max size 100 virtual machines. - :type single_placement_group: bool - :param zone_balance: Whether to force strictly even Virtual Machine - distribution cross x-zones in case there is zone outage. - :type zone_balance: bool - :param platform_fault_domain_count: Fault Domain count for each placement - group. - :type platform_fault_domain_count: int - :param proximity_placement_group: Specifies information about the - proximity placement group that the virtual machine scale set should be - assigned to.

    Minimum api-version: 2018-04-01. - :type proximity_placement_group: - ~azure.mgmt.compute.v2019_03_01.models.SubResource - :param additional_capabilities: Specifies additional capabilities enabled - or disabled on the Virtual Machines in the Virtual Machine Scale Set. For - instance: whether the Virtual Machines have the capability to support - attaching managed data disks with UltraSSD_LRS storage account type. - :type additional_capabilities: - ~azure.mgmt.compute.v2019_03_01.models.AdditionalCapabilities - :param identity: The identity of the virtual machine scale set, if - configured. - :type identity: - ~azure.mgmt.compute.v2019_03_01.models.VirtualMachineScaleSetIdentity - :param zones: The virtual machine scale set zones. - :type zones: list[str] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - 'provisioning_state': {'readonly': True}, - 'unique_id': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'sku': {'key': 'sku', 'type': 'Sku'}, - 'plan': {'key': 'plan', 'type': 'Plan'}, - 'upgrade_policy': {'key': 'properties.upgradePolicy', 'type': 'UpgradePolicy'}, - 'virtual_machine_profile': {'key': 'properties.virtualMachineProfile', 'type': 'VirtualMachineScaleSetVMProfile'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'overprovision': {'key': 'properties.overprovision', 'type': 'bool'}, - 'do_not_run_extensions_on_overprovisioned_vms': {'key': 'properties.doNotRunExtensionsOnOverprovisionedVMs', 'type': 'bool'}, - 'unique_id': {'key': 'properties.uniqueId', 'type': 'str'}, - 'single_placement_group': {'key': 'properties.singlePlacementGroup', 'type': 'bool'}, - 'zone_balance': {'key': 'properties.zoneBalance', 'type': 'bool'}, - 'platform_fault_domain_count': {'key': 'properties.platformFaultDomainCount', 'type': 'int'}, - 'proximity_placement_group': {'key': 'properties.proximityPlacementGroup', 'type': 'SubResource'}, - 'additional_capabilities': {'key': 'properties.additionalCapabilities', 'type': 'AdditionalCapabilities'}, - 'identity': {'key': 'identity', 'type': 'VirtualMachineScaleSetIdentity'}, - 'zones': {'key': 'zones', 'type': '[str]'}, - } - - def __init__(self, **kwargs): - super(VirtualMachineScaleSet, self).__init__(**kwargs) - self.sku = kwargs.get('sku', None) - self.plan = kwargs.get('plan', None) - self.upgrade_policy = kwargs.get('upgrade_policy', None) - self.virtual_machine_profile = kwargs.get('virtual_machine_profile', None) - self.provisioning_state = None - self.overprovision = kwargs.get('overprovision', None) - self.do_not_run_extensions_on_overprovisioned_vms = kwargs.get('do_not_run_extensions_on_overprovisioned_vms', None) - self.unique_id = None - self.single_placement_group = kwargs.get('single_placement_group', None) - self.zone_balance = kwargs.get('zone_balance', None) - self.platform_fault_domain_count = kwargs.get('platform_fault_domain_count', None) - self.proximity_placement_group = kwargs.get('proximity_placement_group', None) - self.additional_capabilities = kwargs.get('additional_capabilities', None) - self.identity = kwargs.get('identity', None) - self.zones = kwargs.get('zones', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/virtual_machine_scale_set_data_disk.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/virtual_machine_scale_set_data_disk.py deleted file mode 100644 index ce5784e47d3a..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/virtual_machine_scale_set_data_disk.py +++ /dev/null @@ -1,70 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineScaleSetDataDisk(Model): - """Describes a virtual machine scale set data disk. - - All required parameters must be populated in order to send to Azure. - - :param name: The disk name. - :type name: str - :param lun: Required. Specifies the logical unit number of the data disk. - This value is used to identify data disks within the VM and therefore must - be unique for each data disk attached to a VM. - :type lun: int - :param caching: Specifies the caching requirements.

    Possible - values are:

    **None**

    **ReadOnly**

    **ReadWrite** -

    Default: **None for Standard storage. ReadOnly for Premium - storage**. Possible values include: 'None', 'ReadOnly', 'ReadWrite' - :type caching: str or ~azure.mgmt.compute.v2019_03_01.models.CachingTypes - :param write_accelerator_enabled: Specifies whether writeAccelerator - should be enabled or disabled on the disk. - :type write_accelerator_enabled: bool - :param create_option: Required. The create option. Possible values - include: 'FromImage', 'Empty', 'Attach' - :type create_option: str or - ~azure.mgmt.compute.v2019_03_01.models.DiskCreateOptionTypes - :param disk_size_gb: Specifies the size of an empty data disk in - gigabytes. This element can be used to overwrite the size of the disk in a - virtual machine image.

    This value cannot be larger than 1023 GB - :type disk_size_gb: int - :param managed_disk: The managed disk parameters. - :type managed_disk: - ~azure.mgmt.compute.v2019_03_01.models.VirtualMachineScaleSetManagedDiskParameters - """ - - _validation = { - 'lun': {'required': True}, - 'create_option': {'required': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'lun': {'key': 'lun', 'type': 'int'}, - 'caching': {'key': 'caching', 'type': 'CachingTypes'}, - 'write_accelerator_enabled': {'key': 'writeAcceleratorEnabled', 'type': 'bool'}, - 'create_option': {'key': 'createOption', 'type': 'str'}, - 'disk_size_gb': {'key': 'diskSizeGB', 'type': 'int'}, - 'managed_disk': {'key': 'managedDisk', 'type': 'VirtualMachineScaleSetManagedDiskParameters'}, - } - - def __init__(self, **kwargs): - super(VirtualMachineScaleSetDataDisk, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.lun = kwargs.get('lun', None) - self.caching = kwargs.get('caching', None) - self.write_accelerator_enabled = kwargs.get('write_accelerator_enabled', None) - self.create_option = kwargs.get('create_option', None) - self.disk_size_gb = kwargs.get('disk_size_gb', None) - self.managed_disk = kwargs.get('managed_disk', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/virtual_machine_scale_set_data_disk_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/virtual_machine_scale_set_data_disk_py3.py deleted file mode 100644 index 75ad385bf8b1..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/virtual_machine_scale_set_data_disk_py3.py +++ /dev/null @@ -1,70 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineScaleSetDataDisk(Model): - """Describes a virtual machine scale set data disk. - - All required parameters must be populated in order to send to Azure. - - :param name: The disk name. - :type name: str - :param lun: Required. Specifies the logical unit number of the data disk. - This value is used to identify data disks within the VM and therefore must - be unique for each data disk attached to a VM. - :type lun: int - :param caching: Specifies the caching requirements.

    Possible - values are:

    **None**

    **ReadOnly**

    **ReadWrite** -

    Default: **None for Standard storage. ReadOnly for Premium - storage**. Possible values include: 'None', 'ReadOnly', 'ReadWrite' - :type caching: str or ~azure.mgmt.compute.v2019_03_01.models.CachingTypes - :param write_accelerator_enabled: Specifies whether writeAccelerator - should be enabled or disabled on the disk. - :type write_accelerator_enabled: bool - :param create_option: Required. The create option. Possible values - include: 'FromImage', 'Empty', 'Attach' - :type create_option: str or - ~azure.mgmt.compute.v2019_03_01.models.DiskCreateOptionTypes - :param disk_size_gb: Specifies the size of an empty data disk in - gigabytes. This element can be used to overwrite the size of the disk in a - virtual machine image.

    This value cannot be larger than 1023 GB - :type disk_size_gb: int - :param managed_disk: The managed disk parameters. - :type managed_disk: - ~azure.mgmt.compute.v2019_03_01.models.VirtualMachineScaleSetManagedDiskParameters - """ - - _validation = { - 'lun': {'required': True}, - 'create_option': {'required': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'lun': {'key': 'lun', 'type': 'int'}, - 'caching': {'key': 'caching', 'type': 'CachingTypes'}, - 'write_accelerator_enabled': {'key': 'writeAcceleratorEnabled', 'type': 'bool'}, - 'create_option': {'key': 'createOption', 'type': 'str'}, - 'disk_size_gb': {'key': 'diskSizeGB', 'type': 'int'}, - 'managed_disk': {'key': 'managedDisk', 'type': 'VirtualMachineScaleSetManagedDiskParameters'}, - } - - def __init__(self, *, lun: int, create_option, name: str=None, caching=None, write_accelerator_enabled: bool=None, disk_size_gb: int=None, managed_disk=None, **kwargs) -> None: - super(VirtualMachineScaleSetDataDisk, self).__init__(**kwargs) - self.name = name - self.lun = lun - self.caching = caching - self.write_accelerator_enabled = write_accelerator_enabled - self.create_option = create_option - self.disk_size_gb = disk_size_gb - self.managed_disk = managed_disk diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/virtual_machine_scale_set_extension.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/virtual_machine_scale_set_extension.py deleted file mode 100644 index 206e7a851351..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/virtual_machine_scale_set_extension.py +++ /dev/null @@ -1,85 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .sub_resource_read_only import SubResourceReadOnly - - -class VirtualMachineScaleSetExtension(SubResourceReadOnly): - """Describes a Virtual Machine Scale Set Extension. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource Id - :vartype id: str - :param name: The name of the extension. - :type name: str - :param force_update_tag: If a value is provided and is different from the - previous value, the extension handler will be forced to update even if the - extension configuration has not changed. - :type force_update_tag: str - :param publisher: The name of the extension handler publisher. - :type publisher: str - :param type: Specifies the type of the extension; an example is - "CustomScriptExtension". - :type type: str - :param type_handler_version: Specifies the version of the script handler. - :type type_handler_version: str - :param auto_upgrade_minor_version: Indicates whether the extension should - use a newer minor version if one is available at deployment time. Once - deployed, however, the extension will not upgrade minor versions unless - redeployed, even with this property set to true. - :type auto_upgrade_minor_version: bool - :param settings: Json formatted public settings for the extension. - :type settings: object - :param protected_settings: The extension can contain either - protectedSettings or protectedSettingsFromKeyVault or no protected - settings at all. - :type protected_settings: object - :ivar provisioning_state: The provisioning state, which only appears in - the response. - :vartype provisioning_state: str - :param provision_after_extensions: Collection of extension names after - which this extension needs to be provisioned. - :type provision_after_extensions: list[str] - """ - - _validation = { - 'id': {'readonly': True}, - 'provisioning_state': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'force_update_tag': {'key': 'properties.forceUpdateTag', 'type': 'str'}, - 'publisher': {'key': 'properties.publisher', 'type': 'str'}, - 'type': {'key': 'properties.type', 'type': 'str'}, - 'type_handler_version': {'key': 'properties.typeHandlerVersion', 'type': 'str'}, - 'auto_upgrade_minor_version': {'key': 'properties.autoUpgradeMinorVersion', 'type': 'bool'}, - 'settings': {'key': 'properties.settings', 'type': 'object'}, - 'protected_settings': {'key': 'properties.protectedSettings', 'type': 'object'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'provision_after_extensions': {'key': 'properties.provisionAfterExtensions', 'type': '[str]'}, - } - - def __init__(self, **kwargs): - super(VirtualMachineScaleSetExtension, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.force_update_tag = kwargs.get('force_update_tag', None) - self.publisher = kwargs.get('publisher', None) - self.type = kwargs.get('type', None) - self.type_handler_version = kwargs.get('type_handler_version', None) - self.auto_upgrade_minor_version = kwargs.get('auto_upgrade_minor_version', None) - self.settings = kwargs.get('settings', None) - self.protected_settings = kwargs.get('protected_settings', None) - self.provisioning_state = None - self.provision_after_extensions = kwargs.get('provision_after_extensions', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/virtual_machine_scale_set_extension_paged.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/virtual_machine_scale_set_extension_paged.py deleted file mode 100644 index 120c40bffd47..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/virtual_machine_scale_set_extension_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class VirtualMachineScaleSetExtensionPaged(Paged): - """ - A paging container for iterating over a list of :class:`VirtualMachineScaleSetExtension ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[VirtualMachineScaleSetExtension]'} - } - - def __init__(self, *args, **kwargs): - - super(VirtualMachineScaleSetExtensionPaged, self).__init__(*args, **kwargs) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/virtual_machine_scale_set_extension_profile.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/virtual_machine_scale_set_extension_profile.py deleted file mode 100644 index 1899b2289970..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/virtual_machine_scale_set_extension_profile.py +++ /dev/null @@ -1,30 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineScaleSetExtensionProfile(Model): - """Describes a virtual machine scale set extension profile. - - :param extensions: The virtual machine scale set child extension - resources. - :type extensions: - list[~azure.mgmt.compute.v2019_03_01.models.VirtualMachineScaleSetExtension] - """ - - _attribute_map = { - 'extensions': {'key': 'extensions', 'type': '[VirtualMachineScaleSetExtension]'}, - } - - def __init__(self, **kwargs): - super(VirtualMachineScaleSetExtensionProfile, self).__init__(**kwargs) - self.extensions = kwargs.get('extensions', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/virtual_machine_scale_set_extension_profile_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/virtual_machine_scale_set_extension_profile_py3.py deleted file mode 100644 index f7a690d83c1b..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/virtual_machine_scale_set_extension_profile_py3.py +++ /dev/null @@ -1,30 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineScaleSetExtensionProfile(Model): - """Describes a virtual machine scale set extension profile. - - :param extensions: The virtual machine scale set child extension - resources. - :type extensions: - list[~azure.mgmt.compute.v2019_03_01.models.VirtualMachineScaleSetExtension] - """ - - _attribute_map = { - 'extensions': {'key': 'extensions', 'type': '[VirtualMachineScaleSetExtension]'}, - } - - def __init__(self, *, extensions=None, **kwargs) -> None: - super(VirtualMachineScaleSetExtensionProfile, self).__init__(**kwargs) - self.extensions = extensions diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/virtual_machine_scale_set_extension_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/virtual_machine_scale_set_extension_py3.py deleted file mode 100644 index 895641055c44..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/virtual_machine_scale_set_extension_py3.py +++ /dev/null @@ -1,85 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .sub_resource_read_only_py3 import SubResourceReadOnly - - -class VirtualMachineScaleSetExtension(SubResourceReadOnly): - """Describes a Virtual Machine Scale Set Extension. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource Id - :vartype id: str - :param name: The name of the extension. - :type name: str - :param force_update_tag: If a value is provided and is different from the - previous value, the extension handler will be forced to update even if the - extension configuration has not changed. - :type force_update_tag: str - :param publisher: The name of the extension handler publisher. - :type publisher: str - :param type: Specifies the type of the extension; an example is - "CustomScriptExtension". - :type type: str - :param type_handler_version: Specifies the version of the script handler. - :type type_handler_version: str - :param auto_upgrade_minor_version: Indicates whether the extension should - use a newer minor version if one is available at deployment time. Once - deployed, however, the extension will not upgrade minor versions unless - redeployed, even with this property set to true. - :type auto_upgrade_minor_version: bool - :param settings: Json formatted public settings for the extension. - :type settings: object - :param protected_settings: The extension can contain either - protectedSettings or protectedSettingsFromKeyVault or no protected - settings at all. - :type protected_settings: object - :ivar provisioning_state: The provisioning state, which only appears in - the response. - :vartype provisioning_state: str - :param provision_after_extensions: Collection of extension names after - which this extension needs to be provisioned. - :type provision_after_extensions: list[str] - """ - - _validation = { - 'id': {'readonly': True}, - 'provisioning_state': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'force_update_tag': {'key': 'properties.forceUpdateTag', 'type': 'str'}, - 'publisher': {'key': 'properties.publisher', 'type': 'str'}, - 'type': {'key': 'properties.type', 'type': 'str'}, - 'type_handler_version': {'key': 'properties.typeHandlerVersion', 'type': 'str'}, - 'auto_upgrade_minor_version': {'key': 'properties.autoUpgradeMinorVersion', 'type': 'bool'}, - 'settings': {'key': 'properties.settings', 'type': 'object'}, - 'protected_settings': {'key': 'properties.protectedSettings', 'type': 'object'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'provision_after_extensions': {'key': 'properties.provisionAfterExtensions', 'type': '[str]'}, - } - - def __init__(self, *, name: str=None, force_update_tag: str=None, publisher: str=None, type: str=None, type_handler_version: str=None, auto_upgrade_minor_version: bool=None, settings=None, protected_settings=None, provision_after_extensions=None, **kwargs) -> None: - super(VirtualMachineScaleSetExtension, self).__init__(**kwargs) - self.name = name - self.force_update_tag = force_update_tag - self.publisher = publisher - self.type = type - self.type_handler_version = type_handler_version - self.auto_upgrade_minor_version = auto_upgrade_minor_version - self.settings = settings - self.protected_settings = protected_settings - self.provisioning_state = None - self.provision_after_extensions = provision_after_extensions diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/virtual_machine_scale_set_identity.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/virtual_machine_scale_set_identity.py deleted file mode 100644 index c6ae8be89dc8..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/virtual_machine_scale_set_identity.py +++ /dev/null @@ -1,61 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineScaleSetIdentity(Model): - """Identity for the virtual machine scale set. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar principal_id: The principal id of virtual machine scale set - identity. This property will only be provided for a system assigned - identity. - :vartype principal_id: str - :ivar tenant_id: The tenant id associated with the virtual machine scale - set. This property will only be provided for a system assigned identity. - :vartype tenant_id: str - :param type: The type of identity used for the virtual machine scale set. - The type 'SystemAssigned, UserAssigned' includes both an implicitly - created identity and a set of user assigned identities. The type 'None' - will remove any identities from the virtual machine scale set. Possible - values include: 'SystemAssigned', 'UserAssigned', 'SystemAssigned, - UserAssigned', 'None' - :type type: str or - ~azure.mgmt.compute.v2019_03_01.models.ResourceIdentityType - :param user_assigned_identities: The list of user identities associated - with the virtual machine scale set. The user identity dictionary key - references will be ARM resource ids in the form: - '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'. - :type user_assigned_identities: dict[str, - ~azure.mgmt.compute.v2019_03_01.models.VirtualMachineScaleSetIdentityUserAssignedIdentitiesValue] - """ - - _validation = { - 'principal_id': {'readonly': True}, - 'tenant_id': {'readonly': True}, - } - - _attribute_map = { - 'principal_id': {'key': 'principalId', 'type': 'str'}, - 'tenant_id': {'key': 'tenantId', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'ResourceIdentityType'}, - 'user_assigned_identities': {'key': 'userAssignedIdentities', 'type': '{VirtualMachineScaleSetIdentityUserAssignedIdentitiesValue}'}, - } - - def __init__(self, **kwargs): - super(VirtualMachineScaleSetIdentity, self).__init__(**kwargs) - self.principal_id = None - self.tenant_id = None - self.type = kwargs.get('type', None) - self.user_assigned_identities = kwargs.get('user_assigned_identities', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/virtual_machine_scale_set_identity_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/virtual_machine_scale_set_identity_py3.py deleted file mode 100644 index 594180fa6051..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/virtual_machine_scale_set_identity_py3.py +++ /dev/null @@ -1,61 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineScaleSetIdentity(Model): - """Identity for the virtual machine scale set. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar principal_id: The principal id of virtual machine scale set - identity. This property will only be provided for a system assigned - identity. - :vartype principal_id: str - :ivar tenant_id: The tenant id associated with the virtual machine scale - set. This property will only be provided for a system assigned identity. - :vartype tenant_id: str - :param type: The type of identity used for the virtual machine scale set. - The type 'SystemAssigned, UserAssigned' includes both an implicitly - created identity and a set of user assigned identities. The type 'None' - will remove any identities from the virtual machine scale set. Possible - values include: 'SystemAssigned', 'UserAssigned', 'SystemAssigned, - UserAssigned', 'None' - :type type: str or - ~azure.mgmt.compute.v2019_03_01.models.ResourceIdentityType - :param user_assigned_identities: The list of user identities associated - with the virtual machine scale set. The user identity dictionary key - references will be ARM resource ids in the form: - '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'. - :type user_assigned_identities: dict[str, - ~azure.mgmt.compute.v2019_03_01.models.VirtualMachineScaleSetIdentityUserAssignedIdentitiesValue] - """ - - _validation = { - 'principal_id': {'readonly': True}, - 'tenant_id': {'readonly': True}, - } - - _attribute_map = { - 'principal_id': {'key': 'principalId', 'type': 'str'}, - 'tenant_id': {'key': 'tenantId', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'ResourceIdentityType'}, - 'user_assigned_identities': {'key': 'userAssignedIdentities', 'type': '{VirtualMachineScaleSetIdentityUserAssignedIdentitiesValue}'}, - } - - def __init__(self, *, type=None, user_assigned_identities=None, **kwargs) -> None: - super(VirtualMachineScaleSetIdentity, self).__init__(**kwargs) - self.principal_id = None - self.tenant_id = None - self.type = type - self.user_assigned_identities = user_assigned_identities diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/virtual_machine_scale_set_identity_user_assigned_identities_value.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/virtual_machine_scale_set_identity_user_assigned_identities_value.py deleted file mode 100644 index e362323ac96e..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/virtual_machine_scale_set_identity_user_assigned_identities_value.py +++ /dev/null @@ -1,40 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineScaleSetIdentityUserAssignedIdentitiesValue(Model): - """VirtualMachineScaleSetIdentityUserAssignedIdentitiesValue. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar principal_id: The principal id of user assigned identity. - :vartype principal_id: str - :ivar client_id: The client id of user assigned identity. - :vartype client_id: str - """ - - _validation = { - 'principal_id': {'readonly': True}, - 'client_id': {'readonly': True}, - } - - _attribute_map = { - 'principal_id': {'key': 'principalId', 'type': 'str'}, - 'client_id': {'key': 'clientId', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(VirtualMachineScaleSetIdentityUserAssignedIdentitiesValue, self).__init__(**kwargs) - self.principal_id = None - self.client_id = None diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/virtual_machine_scale_set_identity_user_assigned_identities_value_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/virtual_machine_scale_set_identity_user_assigned_identities_value_py3.py deleted file mode 100644 index 2839c26040cc..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/virtual_machine_scale_set_identity_user_assigned_identities_value_py3.py +++ /dev/null @@ -1,40 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineScaleSetIdentityUserAssignedIdentitiesValue(Model): - """VirtualMachineScaleSetIdentityUserAssignedIdentitiesValue. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar principal_id: The principal id of user assigned identity. - :vartype principal_id: str - :ivar client_id: The client id of user assigned identity. - :vartype client_id: str - """ - - _validation = { - 'principal_id': {'readonly': True}, - 'client_id': {'readonly': True}, - } - - _attribute_map = { - 'principal_id': {'key': 'principalId', 'type': 'str'}, - 'client_id': {'key': 'clientId', 'type': 'str'}, - } - - def __init__(self, **kwargs) -> None: - super(VirtualMachineScaleSetIdentityUserAssignedIdentitiesValue, self).__init__(**kwargs) - self.principal_id = None - self.client_id = None diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/virtual_machine_scale_set_instance_view.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/virtual_machine_scale_set_instance_view.py deleted file mode 100644 index 2ee86c515f40..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/virtual_machine_scale_set_instance_view.py +++ /dev/null @@ -1,48 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineScaleSetInstanceView(Model): - """The instance view of a virtual machine scale set. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar virtual_machine: The instance view status summary for the virtual - machine scale set. - :vartype virtual_machine: - ~azure.mgmt.compute.v2019_03_01.models.VirtualMachineScaleSetInstanceViewStatusesSummary - :ivar extensions: The extensions information. - :vartype extensions: - list[~azure.mgmt.compute.v2019_03_01.models.VirtualMachineScaleSetVMExtensionsSummary] - :param statuses: The resource status information. - :type statuses: - list[~azure.mgmt.compute.v2019_03_01.models.InstanceViewStatus] - """ - - _validation = { - 'virtual_machine': {'readonly': True}, - 'extensions': {'readonly': True}, - } - - _attribute_map = { - 'virtual_machine': {'key': 'virtualMachine', 'type': 'VirtualMachineScaleSetInstanceViewStatusesSummary'}, - 'extensions': {'key': 'extensions', 'type': '[VirtualMachineScaleSetVMExtensionsSummary]'}, - 'statuses': {'key': 'statuses', 'type': '[InstanceViewStatus]'}, - } - - def __init__(self, **kwargs): - super(VirtualMachineScaleSetInstanceView, self).__init__(**kwargs) - self.virtual_machine = None - self.extensions = None - self.statuses = kwargs.get('statuses', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/virtual_machine_scale_set_instance_view_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/virtual_machine_scale_set_instance_view_py3.py deleted file mode 100644 index 8190e62b18ba..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/virtual_machine_scale_set_instance_view_py3.py +++ /dev/null @@ -1,48 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineScaleSetInstanceView(Model): - """The instance view of a virtual machine scale set. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar virtual_machine: The instance view status summary for the virtual - machine scale set. - :vartype virtual_machine: - ~azure.mgmt.compute.v2019_03_01.models.VirtualMachineScaleSetInstanceViewStatusesSummary - :ivar extensions: The extensions information. - :vartype extensions: - list[~azure.mgmt.compute.v2019_03_01.models.VirtualMachineScaleSetVMExtensionsSummary] - :param statuses: The resource status information. - :type statuses: - list[~azure.mgmt.compute.v2019_03_01.models.InstanceViewStatus] - """ - - _validation = { - 'virtual_machine': {'readonly': True}, - 'extensions': {'readonly': True}, - } - - _attribute_map = { - 'virtual_machine': {'key': 'virtualMachine', 'type': 'VirtualMachineScaleSetInstanceViewStatusesSummary'}, - 'extensions': {'key': 'extensions', 'type': '[VirtualMachineScaleSetVMExtensionsSummary]'}, - 'statuses': {'key': 'statuses', 'type': '[InstanceViewStatus]'}, - } - - def __init__(self, *, statuses=None, **kwargs) -> None: - super(VirtualMachineScaleSetInstanceView, self).__init__(**kwargs) - self.virtual_machine = None - self.extensions = None - self.statuses = statuses diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/virtual_machine_scale_set_instance_view_statuses_summary.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/virtual_machine_scale_set_instance_view_statuses_summary.py deleted file mode 100644 index d6372dcce96b..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/virtual_machine_scale_set_instance_view_statuses_summary.py +++ /dev/null @@ -1,37 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineScaleSetInstanceViewStatusesSummary(Model): - """Instance view statuses summary for virtual machines of a virtual machine - scale set. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar statuses_summary: The extensions information. - :vartype statuses_summary: - list[~azure.mgmt.compute.v2019_03_01.models.VirtualMachineStatusCodeCount] - """ - - _validation = { - 'statuses_summary': {'readonly': True}, - } - - _attribute_map = { - 'statuses_summary': {'key': 'statusesSummary', 'type': '[VirtualMachineStatusCodeCount]'}, - } - - def __init__(self, **kwargs): - super(VirtualMachineScaleSetInstanceViewStatusesSummary, self).__init__(**kwargs) - self.statuses_summary = None diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/virtual_machine_scale_set_instance_view_statuses_summary_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/virtual_machine_scale_set_instance_view_statuses_summary_py3.py deleted file mode 100644 index f0b231dcd6ee..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/virtual_machine_scale_set_instance_view_statuses_summary_py3.py +++ /dev/null @@ -1,37 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineScaleSetInstanceViewStatusesSummary(Model): - """Instance view statuses summary for virtual machines of a virtual machine - scale set. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar statuses_summary: The extensions information. - :vartype statuses_summary: - list[~azure.mgmt.compute.v2019_03_01.models.VirtualMachineStatusCodeCount] - """ - - _validation = { - 'statuses_summary': {'readonly': True}, - } - - _attribute_map = { - 'statuses_summary': {'key': 'statusesSummary', 'type': '[VirtualMachineStatusCodeCount]'}, - } - - def __init__(self, **kwargs) -> None: - super(VirtualMachineScaleSetInstanceViewStatusesSummary, self).__init__(**kwargs) - self.statuses_summary = None diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/virtual_machine_scale_set_ip_configuration.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/virtual_machine_scale_set_ip_configuration.py deleted file mode 100644 index 03edcb3d3d0d..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/virtual_machine_scale_set_ip_configuration.py +++ /dev/null @@ -1,89 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .sub_resource import SubResource - - -class VirtualMachineScaleSetIPConfiguration(SubResource): - """Describes a virtual machine scale set network profile's IP configuration. - - All required parameters must be populated in order to send to Azure. - - :param id: Resource Id - :type id: str - :param name: Required. The IP configuration name. - :type name: str - :param subnet: Specifies the identifier of the subnet. - :type subnet: ~azure.mgmt.compute.v2019_03_01.models.ApiEntityReference - :param primary: Specifies the primary network interface in case the - virtual machine has more than 1 network interface. - :type primary: bool - :param public_ip_address_configuration: The publicIPAddressConfiguration. - :type public_ip_address_configuration: - ~azure.mgmt.compute.v2019_03_01.models.VirtualMachineScaleSetPublicIPAddressConfiguration - :param private_ip_address_version: Available from Api-Version 2017-03-30 - onwards, it represents whether the specific ipconfiguration is IPv4 or - IPv6. Default is taken as IPv4. Possible values are: 'IPv4' and 'IPv6'. - Possible values include: 'IPv4', 'IPv6' - :type private_ip_address_version: str or - ~azure.mgmt.compute.v2019_03_01.models.IPVersion - :param application_gateway_backend_address_pools: Specifies an array of - references to backend address pools of application gateways. A scale set - can reference backend address pools of multiple application gateways. - Multiple scale sets cannot use the same application gateway. - :type application_gateway_backend_address_pools: - list[~azure.mgmt.compute.v2019_03_01.models.SubResource] - :param application_security_groups: Specifies an array of references to - application security group. - :type application_security_groups: - list[~azure.mgmt.compute.v2019_03_01.models.SubResource] - :param load_balancer_backend_address_pools: Specifies an array of - references to backend address pools of load balancers. A scale set can - reference backend address pools of one public and one internal load - balancer. Multiple scale sets cannot use the same load balancer. - :type load_balancer_backend_address_pools: - list[~azure.mgmt.compute.v2019_03_01.models.SubResource] - :param load_balancer_inbound_nat_pools: Specifies an array of references - to inbound Nat pools of the load balancers. A scale set can reference - inbound nat pools of one public and one internal load balancer. Multiple - scale sets cannot use the same load balancer - :type load_balancer_inbound_nat_pools: - list[~azure.mgmt.compute.v2019_03_01.models.SubResource] - """ - - _validation = { - 'name': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'subnet': {'key': 'properties.subnet', 'type': 'ApiEntityReference'}, - 'primary': {'key': 'properties.primary', 'type': 'bool'}, - 'public_ip_address_configuration': {'key': 'properties.publicIPAddressConfiguration', 'type': 'VirtualMachineScaleSetPublicIPAddressConfiguration'}, - 'private_ip_address_version': {'key': 'properties.privateIPAddressVersion', 'type': 'str'}, - 'application_gateway_backend_address_pools': {'key': 'properties.applicationGatewayBackendAddressPools', 'type': '[SubResource]'}, - 'application_security_groups': {'key': 'properties.applicationSecurityGroups', 'type': '[SubResource]'}, - 'load_balancer_backend_address_pools': {'key': 'properties.loadBalancerBackendAddressPools', 'type': '[SubResource]'}, - 'load_balancer_inbound_nat_pools': {'key': 'properties.loadBalancerInboundNatPools', 'type': '[SubResource]'}, - } - - def __init__(self, **kwargs): - super(VirtualMachineScaleSetIPConfiguration, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.subnet = kwargs.get('subnet', None) - self.primary = kwargs.get('primary', None) - self.public_ip_address_configuration = kwargs.get('public_ip_address_configuration', None) - self.private_ip_address_version = kwargs.get('private_ip_address_version', None) - self.application_gateway_backend_address_pools = kwargs.get('application_gateway_backend_address_pools', None) - self.application_security_groups = kwargs.get('application_security_groups', None) - self.load_balancer_backend_address_pools = kwargs.get('load_balancer_backend_address_pools', None) - self.load_balancer_inbound_nat_pools = kwargs.get('load_balancer_inbound_nat_pools', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/virtual_machine_scale_set_ip_configuration_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/virtual_machine_scale_set_ip_configuration_py3.py deleted file mode 100644 index ba661906eab2..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/virtual_machine_scale_set_ip_configuration_py3.py +++ /dev/null @@ -1,89 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .sub_resource_py3 import SubResource - - -class VirtualMachineScaleSetIPConfiguration(SubResource): - """Describes a virtual machine scale set network profile's IP configuration. - - All required parameters must be populated in order to send to Azure. - - :param id: Resource Id - :type id: str - :param name: Required. The IP configuration name. - :type name: str - :param subnet: Specifies the identifier of the subnet. - :type subnet: ~azure.mgmt.compute.v2019_03_01.models.ApiEntityReference - :param primary: Specifies the primary network interface in case the - virtual machine has more than 1 network interface. - :type primary: bool - :param public_ip_address_configuration: The publicIPAddressConfiguration. - :type public_ip_address_configuration: - ~azure.mgmt.compute.v2019_03_01.models.VirtualMachineScaleSetPublicIPAddressConfiguration - :param private_ip_address_version: Available from Api-Version 2017-03-30 - onwards, it represents whether the specific ipconfiguration is IPv4 or - IPv6. Default is taken as IPv4. Possible values are: 'IPv4' and 'IPv6'. - Possible values include: 'IPv4', 'IPv6' - :type private_ip_address_version: str or - ~azure.mgmt.compute.v2019_03_01.models.IPVersion - :param application_gateway_backend_address_pools: Specifies an array of - references to backend address pools of application gateways. A scale set - can reference backend address pools of multiple application gateways. - Multiple scale sets cannot use the same application gateway. - :type application_gateway_backend_address_pools: - list[~azure.mgmt.compute.v2019_03_01.models.SubResource] - :param application_security_groups: Specifies an array of references to - application security group. - :type application_security_groups: - list[~azure.mgmt.compute.v2019_03_01.models.SubResource] - :param load_balancer_backend_address_pools: Specifies an array of - references to backend address pools of load balancers. A scale set can - reference backend address pools of one public and one internal load - balancer. Multiple scale sets cannot use the same load balancer. - :type load_balancer_backend_address_pools: - list[~azure.mgmt.compute.v2019_03_01.models.SubResource] - :param load_balancer_inbound_nat_pools: Specifies an array of references - to inbound Nat pools of the load balancers. A scale set can reference - inbound nat pools of one public and one internal load balancer. Multiple - scale sets cannot use the same load balancer - :type load_balancer_inbound_nat_pools: - list[~azure.mgmt.compute.v2019_03_01.models.SubResource] - """ - - _validation = { - 'name': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'subnet': {'key': 'properties.subnet', 'type': 'ApiEntityReference'}, - 'primary': {'key': 'properties.primary', 'type': 'bool'}, - 'public_ip_address_configuration': {'key': 'properties.publicIPAddressConfiguration', 'type': 'VirtualMachineScaleSetPublicIPAddressConfiguration'}, - 'private_ip_address_version': {'key': 'properties.privateIPAddressVersion', 'type': 'str'}, - 'application_gateway_backend_address_pools': {'key': 'properties.applicationGatewayBackendAddressPools', 'type': '[SubResource]'}, - 'application_security_groups': {'key': 'properties.applicationSecurityGroups', 'type': '[SubResource]'}, - 'load_balancer_backend_address_pools': {'key': 'properties.loadBalancerBackendAddressPools', 'type': '[SubResource]'}, - 'load_balancer_inbound_nat_pools': {'key': 'properties.loadBalancerInboundNatPools', 'type': '[SubResource]'}, - } - - def __init__(self, *, name: str, id: str=None, subnet=None, primary: bool=None, public_ip_address_configuration=None, private_ip_address_version=None, application_gateway_backend_address_pools=None, application_security_groups=None, load_balancer_backend_address_pools=None, load_balancer_inbound_nat_pools=None, **kwargs) -> None: - super(VirtualMachineScaleSetIPConfiguration, self).__init__(id=id, **kwargs) - self.name = name - self.subnet = subnet - self.primary = primary - self.public_ip_address_configuration = public_ip_address_configuration - self.private_ip_address_version = private_ip_address_version - self.application_gateway_backend_address_pools = application_gateway_backend_address_pools - self.application_security_groups = application_security_groups - self.load_balancer_backend_address_pools = load_balancer_backend_address_pools - self.load_balancer_inbound_nat_pools = load_balancer_inbound_nat_pools diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/virtual_machine_scale_set_ip_tag.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/virtual_machine_scale_set_ip_tag.py deleted file mode 100644 index 36b70260d646..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/virtual_machine_scale_set_ip_tag.py +++ /dev/null @@ -1,33 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineScaleSetIpTag(Model): - """Contains the IP tag associated with the public IP address. - - :param ip_tag_type: IP tag type. Example: FirstPartyUsage. - :type ip_tag_type: str - :param tag: IP tag associated with the public IP. Example: SQL, Storage - etc. - :type tag: str - """ - - _attribute_map = { - 'ip_tag_type': {'key': 'ipTagType', 'type': 'str'}, - 'tag': {'key': 'tag', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(VirtualMachineScaleSetIpTag, self).__init__(**kwargs) - self.ip_tag_type = kwargs.get('ip_tag_type', None) - self.tag = kwargs.get('tag', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/virtual_machine_scale_set_ip_tag_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/virtual_machine_scale_set_ip_tag_py3.py deleted file mode 100644 index aaf788c9d772..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/virtual_machine_scale_set_ip_tag_py3.py +++ /dev/null @@ -1,33 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineScaleSetIpTag(Model): - """Contains the IP tag associated with the public IP address. - - :param ip_tag_type: IP tag type. Example: FirstPartyUsage. - :type ip_tag_type: str - :param tag: IP tag associated with the public IP. Example: SQL, Storage - etc. - :type tag: str - """ - - _attribute_map = { - 'ip_tag_type': {'key': 'ipTagType', 'type': 'str'}, - 'tag': {'key': 'tag', 'type': 'str'}, - } - - def __init__(self, *, ip_tag_type: str=None, tag: str=None, **kwargs) -> None: - super(VirtualMachineScaleSetIpTag, self).__init__(**kwargs) - self.ip_tag_type = ip_tag_type - self.tag = tag diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/virtual_machine_scale_set_managed_disk_parameters.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/virtual_machine_scale_set_managed_disk_parameters.py deleted file mode 100644 index 5409e7078b34..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/virtual_machine_scale_set_managed_disk_parameters.py +++ /dev/null @@ -1,32 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineScaleSetManagedDiskParameters(Model): - """Describes the parameters of a ScaleSet managed disk. - - :param storage_account_type: Specifies the storage account type for the - managed disk. NOTE: UltraSSD_LRS can only be used with data disks, it - cannot be used with OS Disk. Possible values include: 'Standard_LRS', - 'Premium_LRS', 'StandardSSD_LRS', 'UltraSSD_LRS' - :type storage_account_type: str or - ~azure.mgmt.compute.v2019_03_01.models.StorageAccountTypes - """ - - _attribute_map = { - 'storage_account_type': {'key': 'storageAccountType', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(VirtualMachineScaleSetManagedDiskParameters, self).__init__(**kwargs) - self.storage_account_type = kwargs.get('storage_account_type', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/virtual_machine_scale_set_managed_disk_parameters_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/virtual_machine_scale_set_managed_disk_parameters_py3.py deleted file mode 100644 index 0564244c4480..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/virtual_machine_scale_set_managed_disk_parameters_py3.py +++ /dev/null @@ -1,32 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineScaleSetManagedDiskParameters(Model): - """Describes the parameters of a ScaleSet managed disk. - - :param storage_account_type: Specifies the storage account type for the - managed disk. NOTE: UltraSSD_LRS can only be used with data disks, it - cannot be used with OS Disk. Possible values include: 'Standard_LRS', - 'Premium_LRS', 'StandardSSD_LRS', 'UltraSSD_LRS' - :type storage_account_type: str or - ~azure.mgmt.compute.v2019_03_01.models.StorageAccountTypes - """ - - _attribute_map = { - 'storage_account_type': {'key': 'storageAccountType', 'type': 'str'}, - } - - def __init__(self, *, storage_account_type=None, **kwargs) -> None: - super(VirtualMachineScaleSetManagedDiskParameters, self).__init__(**kwargs) - self.storage_account_type = storage_account_type diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/virtual_machine_scale_set_network_configuration.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/virtual_machine_scale_set_network_configuration.py deleted file mode 100644 index 58c05048b293..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/virtual_machine_scale_set_network_configuration.py +++ /dev/null @@ -1,70 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .sub_resource import SubResource - - -class VirtualMachineScaleSetNetworkConfiguration(SubResource): - """Describes a virtual machine scale set network profile's network - configurations. - - All required parameters must be populated in order to send to Azure. - - :param id: Resource Id - :type id: str - :param name: Required. The network configuration name. - :type name: str - :param primary: Specifies the primary network interface in case the - virtual machine has more than 1 network interface. - :type primary: bool - :param enable_accelerated_networking: Specifies whether the network - interface is accelerated networking-enabled. - :type enable_accelerated_networking: bool - :param network_security_group: The network security group. - :type network_security_group: - ~azure.mgmt.compute.v2019_03_01.models.SubResource - :param dns_settings: The dns settings to be applied on the network - interfaces. - :type dns_settings: - ~azure.mgmt.compute.v2019_03_01.models.VirtualMachineScaleSetNetworkConfigurationDnsSettings - :param ip_configurations: Required. Specifies the IP configurations of the - network interface. - :type ip_configurations: - list[~azure.mgmt.compute.v2019_03_01.models.VirtualMachineScaleSetIPConfiguration] - :param enable_ip_forwarding: Whether IP forwarding enabled on this NIC. - :type enable_ip_forwarding: bool - """ - - _validation = { - 'name': {'required': True}, - 'ip_configurations': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'primary': {'key': 'properties.primary', 'type': 'bool'}, - 'enable_accelerated_networking': {'key': 'properties.enableAcceleratedNetworking', 'type': 'bool'}, - 'network_security_group': {'key': 'properties.networkSecurityGroup', 'type': 'SubResource'}, - 'dns_settings': {'key': 'properties.dnsSettings', 'type': 'VirtualMachineScaleSetNetworkConfigurationDnsSettings'}, - 'ip_configurations': {'key': 'properties.ipConfigurations', 'type': '[VirtualMachineScaleSetIPConfiguration]'}, - 'enable_ip_forwarding': {'key': 'properties.enableIPForwarding', 'type': 'bool'}, - } - - def __init__(self, **kwargs): - super(VirtualMachineScaleSetNetworkConfiguration, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.primary = kwargs.get('primary', None) - self.enable_accelerated_networking = kwargs.get('enable_accelerated_networking', None) - self.network_security_group = kwargs.get('network_security_group', None) - self.dns_settings = kwargs.get('dns_settings', None) - self.ip_configurations = kwargs.get('ip_configurations', None) - self.enable_ip_forwarding = kwargs.get('enable_ip_forwarding', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/virtual_machine_scale_set_network_configuration_dns_settings.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/virtual_machine_scale_set_network_configuration_dns_settings.py deleted file mode 100644 index 04e1c619383f..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/virtual_machine_scale_set_network_configuration_dns_settings.py +++ /dev/null @@ -1,29 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineScaleSetNetworkConfigurationDnsSettings(Model): - """Describes a virtual machines scale sets network configuration's DNS - settings. - - :param dns_servers: List of DNS servers IP addresses - :type dns_servers: list[str] - """ - - _attribute_map = { - 'dns_servers': {'key': 'dnsServers', 'type': '[str]'}, - } - - def __init__(self, **kwargs): - super(VirtualMachineScaleSetNetworkConfigurationDnsSettings, self).__init__(**kwargs) - self.dns_servers = kwargs.get('dns_servers', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/virtual_machine_scale_set_network_configuration_dns_settings_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/virtual_machine_scale_set_network_configuration_dns_settings_py3.py deleted file mode 100644 index 5607f74d3c6a..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/virtual_machine_scale_set_network_configuration_dns_settings_py3.py +++ /dev/null @@ -1,29 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineScaleSetNetworkConfigurationDnsSettings(Model): - """Describes a virtual machines scale sets network configuration's DNS - settings. - - :param dns_servers: List of DNS servers IP addresses - :type dns_servers: list[str] - """ - - _attribute_map = { - 'dns_servers': {'key': 'dnsServers', 'type': '[str]'}, - } - - def __init__(self, *, dns_servers=None, **kwargs) -> None: - super(VirtualMachineScaleSetNetworkConfigurationDnsSettings, self).__init__(**kwargs) - self.dns_servers = dns_servers diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/virtual_machine_scale_set_network_configuration_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/virtual_machine_scale_set_network_configuration_py3.py deleted file mode 100644 index df655cb2ba3a..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/virtual_machine_scale_set_network_configuration_py3.py +++ /dev/null @@ -1,70 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .sub_resource_py3 import SubResource - - -class VirtualMachineScaleSetNetworkConfiguration(SubResource): - """Describes a virtual machine scale set network profile's network - configurations. - - All required parameters must be populated in order to send to Azure. - - :param id: Resource Id - :type id: str - :param name: Required. The network configuration name. - :type name: str - :param primary: Specifies the primary network interface in case the - virtual machine has more than 1 network interface. - :type primary: bool - :param enable_accelerated_networking: Specifies whether the network - interface is accelerated networking-enabled. - :type enable_accelerated_networking: bool - :param network_security_group: The network security group. - :type network_security_group: - ~azure.mgmt.compute.v2019_03_01.models.SubResource - :param dns_settings: The dns settings to be applied on the network - interfaces. - :type dns_settings: - ~azure.mgmt.compute.v2019_03_01.models.VirtualMachineScaleSetNetworkConfigurationDnsSettings - :param ip_configurations: Required. Specifies the IP configurations of the - network interface. - :type ip_configurations: - list[~azure.mgmt.compute.v2019_03_01.models.VirtualMachineScaleSetIPConfiguration] - :param enable_ip_forwarding: Whether IP forwarding enabled on this NIC. - :type enable_ip_forwarding: bool - """ - - _validation = { - 'name': {'required': True}, - 'ip_configurations': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'primary': {'key': 'properties.primary', 'type': 'bool'}, - 'enable_accelerated_networking': {'key': 'properties.enableAcceleratedNetworking', 'type': 'bool'}, - 'network_security_group': {'key': 'properties.networkSecurityGroup', 'type': 'SubResource'}, - 'dns_settings': {'key': 'properties.dnsSettings', 'type': 'VirtualMachineScaleSetNetworkConfigurationDnsSettings'}, - 'ip_configurations': {'key': 'properties.ipConfigurations', 'type': '[VirtualMachineScaleSetIPConfiguration]'}, - 'enable_ip_forwarding': {'key': 'properties.enableIPForwarding', 'type': 'bool'}, - } - - def __init__(self, *, name: str, ip_configurations, id: str=None, primary: bool=None, enable_accelerated_networking: bool=None, network_security_group=None, dns_settings=None, enable_ip_forwarding: bool=None, **kwargs) -> None: - super(VirtualMachineScaleSetNetworkConfiguration, self).__init__(id=id, **kwargs) - self.name = name - self.primary = primary - self.enable_accelerated_networking = enable_accelerated_networking - self.network_security_group = network_security_group - self.dns_settings = dns_settings - self.ip_configurations = ip_configurations - self.enable_ip_forwarding = enable_ip_forwarding diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/virtual_machine_scale_set_network_profile.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/virtual_machine_scale_set_network_profile.py deleted file mode 100644 index 07aa2c95f9d5..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/virtual_machine_scale_set_network_profile.py +++ /dev/null @@ -1,38 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineScaleSetNetworkProfile(Model): - """Describes a virtual machine scale set network profile. - - :param health_probe: A reference to a load balancer probe used to - determine the health of an instance in the virtual machine scale set. The - reference will be in the form: - '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/probes/{probeName}'. - :type health_probe: - ~azure.mgmt.compute.v2019_03_01.models.ApiEntityReference - :param network_interface_configurations: The list of network - configurations. - :type network_interface_configurations: - list[~azure.mgmt.compute.v2019_03_01.models.VirtualMachineScaleSetNetworkConfiguration] - """ - - _attribute_map = { - 'health_probe': {'key': 'healthProbe', 'type': 'ApiEntityReference'}, - 'network_interface_configurations': {'key': 'networkInterfaceConfigurations', 'type': '[VirtualMachineScaleSetNetworkConfiguration]'}, - } - - def __init__(self, **kwargs): - super(VirtualMachineScaleSetNetworkProfile, self).__init__(**kwargs) - self.health_probe = kwargs.get('health_probe', None) - self.network_interface_configurations = kwargs.get('network_interface_configurations', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/virtual_machine_scale_set_network_profile_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/virtual_machine_scale_set_network_profile_py3.py deleted file mode 100644 index 407af21830e8..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/virtual_machine_scale_set_network_profile_py3.py +++ /dev/null @@ -1,38 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineScaleSetNetworkProfile(Model): - """Describes a virtual machine scale set network profile. - - :param health_probe: A reference to a load balancer probe used to - determine the health of an instance in the virtual machine scale set. The - reference will be in the form: - '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/probes/{probeName}'. - :type health_probe: - ~azure.mgmt.compute.v2019_03_01.models.ApiEntityReference - :param network_interface_configurations: The list of network - configurations. - :type network_interface_configurations: - list[~azure.mgmt.compute.v2019_03_01.models.VirtualMachineScaleSetNetworkConfiguration] - """ - - _attribute_map = { - 'health_probe': {'key': 'healthProbe', 'type': 'ApiEntityReference'}, - 'network_interface_configurations': {'key': 'networkInterfaceConfigurations', 'type': '[VirtualMachineScaleSetNetworkConfiguration]'}, - } - - def __init__(self, *, health_probe=None, network_interface_configurations=None, **kwargs) -> None: - super(VirtualMachineScaleSetNetworkProfile, self).__init__(**kwargs) - self.health_probe = health_probe - self.network_interface_configurations = network_interface_configurations diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/virtual_machine_scale_set_os_disk.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/virtual_machine_scale_set_os_disk.py deleted file mode 100644 index bf4773f8d995..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/virtual_machine_scale_set_os_disk.py +++ /dev/null @@ -1,92 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineScaleSetOSDisk(Model): - """Describes a virtual machine scale set operating system disk. - - All required parameters must be populated in order to send to Azure. - - :param name: The disk name. - :type name: str - :param caching: Specifies the caching requirements.

    Possible - values are:

    **None**

    **ReadOnly**

    **ReadWrite** -

    Default: **None for Standard storage. ReadOnly for Premium - storage**. Possible values include: 'None', 'ReadOnly', 'ReadWrite' - :type caching: str or ~azure.mgmt.compute.v2019_03_01.models.CachingTypes - :param write_accelerator_enabled: Specifies whether writeAccelerator - should be enabled or disabled on the disk. - :type write_accelerator_enabled: bool - :param create_option: Required. Specifies how the virtual machines in the - scale set should be created.

    The only allowed value is: - **FromImage** \\u2013 This value is used when you are using an image to - create the virtual machine. If you are using a platform image, you also - use the imageReference element described above. If you are using a - marketplace image, you also use the plan element previously described. - Possible values include: 'FromImage', 'Empty', 'Attach' - :type create_option: str or - ~azure.mgmt.compute.v2019_03_01.models.DiskCreateOptionTypes - :param diff_disk_settings: Specifies the ephemeral disk Settings for the - operating system disk used by the virtual machine scale set. - :type diff_disk_settings: - ~azure.mgmt.compute.v2019_03_01.models.DiffDiskSettings - :param disk_size_gb: Specifies the size of the operating system disk in - gigabytes. This element can be used to overwrite the size of the disk in a - virtual machine image.

    This value cannot be larger than 1023 GB - :type disk_size_gb: int - :param os_type: This property allows you to specify the type of the OS - that is included in the disk if creating a VM from user-image or a - specialized VHD.

    Possible values are:

    **Windows** -

    **Linux**. Possible values include: 'Windows', 'Linux' - :type os_type: str or - ~azure.mgmt.compute.v2019_03_01.models.OperatingSystemTypes - :param image: Specifies information about the unmanaged user image to base - the scale set on. - :type image: ~azure.mgmt.compute.v2019_03_01.models.VirtualHardDisk - :param vhd_containers: Specifies the container urls that are used to store - operating system disks for the scale set. - :type vhd_containers: list[str] - :param managed_disk: The managed disk parameters. - :type managed_disk: - ~azure.mgmt.compute.v2019_03_01.models.VirtualMachineScaleSetManagedDiskParameters - """ - - _validation = { - 'create_option': {'required': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'caching': {'key': 'caching', 'type': 'CachingTypes'}, - 'write_accelerator_enabled': {'key': 'writeAcceleratorEnabled', 'type': 'bool'}, - 'create_option': {'key': 'createOption', 'type': 'str'}, - 'diff_disk_settings': {'key': 'diffDiskSettings', 'type': 'DiffDiskSettings'}, - 'disk_size_gb': {'key': 'diskSizeGB', 'type': 'int'}, - 'os_type': {'key': 'osType', 'type': 'OperatingSystemTypes'}, - 'image': {'key': 'image', 'type': 'VirtualHardDisk'}, - 'vhd_containers': {'key': 'vhdContainers', 'type': '[str]'}, - 'managed_disk': {'key': 'managedDisk', 'type': 'VirtualMachineScaleSetManagedDiskParameters'}, - } - - def __init__(self, **kwargs): - super(VirtualMachineScaleSetOSDisk, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.caching = kwargs.get('caching', None) - self.write_accelerator_enabled = kwargs.get('write_accelerator_enabled', None) - self.create_option = kwargs.get('create_option', None) - self.diff_disk_settings = kwargs.get('diff_disk_settings', None) - self.disk_size_gb = kwargs.get('disk_size_gb', None) - self.os_type = kwargs.get('os_type', None) - self.image = kwargs.get('image', None) - self.vhd_containers = kwargs.get('vhd_containers', None) - self.managed_disk = kwargs.get('managed_disk', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/virtual_machine_scale_set_os_disk_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/virtual_machine_scale_set_os_disk_py3.py deleted file mode 100644 index 11ed4e9d9b8b..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/virtual_machine_scale_set_os_disk_py3.py +++ /dev/null @@ -1,92 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineScaleSetOSDisk(Model): - """Describes a virtual machine scale set operating system disk. - - All required parameters must be populated in order to send to Azure. - - :param name: The disk name. - :type name: str - :param caching: Specifies the caching requirements.

    Possible - values are:

    **None**

    **ReadOnly**

    **ReadWrite** -

    Default: **None for Standard storage. ReadOnly for Premium - storage**. Possible values include: 'None', 'ReadOnly', 'ReadWrite' - :type caching: str or ~azure.mgmt.compute.v2019_03_01.models.CachingTypes - :param write_accelerator_enabled: Specifies whether writeAccelerator - should be enabled or disabled on the disk. - :type write_accelerator_enabled: bool - :param create_option: Required. Specifies how the virtual machines in the - scale set should be created.

    The only allowed value is: - **FromImage** \\u2013 This value is used when you are using an image to - create the virtual machine. If you are using a platform image, you also - use the imageReference element described above. If you are using a - marketplace image, you also use the plan element previously described. - Possible values include: 'FromImage', 'Empty', 'Attach' - :type create_option: str or - ~azure.mgmt.compute.v2019_03_01.models.DiskCreateOptionTypes - :param diff_disk_settings: Specifies the ephemeral disk Settings for the - operating system disk used by the virtual machine scale set. - :type diff_disk_settings: - ~azure.mgmt.compute.v2019_03_01.models.DiffDiskSettings - :param disk_size_gb: Specifies the size of the operating system disk in - gigabytes. This element can be used to overwrite the size of the disk in a - virtual machine image.

    This value cannot be larger than 1023 GB - :type disk_size_gb: int - :param os_type: This property allows you to specify the type of the OS - that is included in the disk if creating a VM from user-image or a - specialized VHD.

    Possible values are:

    **Windows** -

    **Linux**. Possible values include: 'Windows', 'Linux' - :type os_type: str or - ~azure.mgmt.compute.v2019_03_01.models.OperatingSystemTypes - :param image: Specifies information about the unmanaged user image to base - the scale set on. - :type image: ~azure.mgmt.compute.v2019_03_01.models.VirtualHardDisk - :param vhd_containers: Specifies the container urls that are used to store - operating system disks for the scale set. - :type vhd_containers: list[str] - :param managed_disk: The managed disk parameters. - :type managed_disk: - ~azure.mgmt.compute.v2019_03_01.models.VirtualMachineScaleSetManagedDiskParameters - """ - - _validation = { - 'create_option': {'required': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'caching': {'key': 'caching', 'type': 'CachingTypes'}, - 'write_accelerator_enabled': {'key': 'writeAcceleratorEnabled', 'type': 'bool'}, - 'create_option': {'key': 'createOption', 'type': 'str'}, - 'diff_disk_settings': {'key': 'diffDiskSettings', 'type': 'DiffDiskSettings'}, - 'disk_size_gb': {'key': 'diskSizeGB', 'type': 'int'}, - 'os_type': {'key': 'osType', 'type': 'OperatingSystemTypes'}, - 'image': {'key': 'image', 'type': 'VirtualHardDisk'}, - 'vhd_containers': {'key': 'vhdContainers', 'type': '[str]'}, - 'managed_disk': {'key': 'managedDisk', 'type': 'VirtualMachineScaleSetManagedDiskParameters'}, - } - - def __init__(self, *, create_option, name: str=None, caching=None, write_accelerator_enabled: bool=None, diff_disk_settings=None, disk_size_gb: int=None, os_type=None, image=None, vhd_containers=None, managed_disk=None, **kwargs) -> None: - super(VirtualMachineScaleSetOSDisk, self).__init__(**kwargs) - self.name = name - self.caching = caching - self.write_accelerator_enabled = write_accelerator_enabled - self.create_option = create_option - self.diff_disk_settings = diff_disk_settings - self.disk_size_gb = disk_size_gb - self.os_type = os_type - self.image = image - self.vhd_containers = vhd_containers - self.managed_disk = managed_disk diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/virtual_machine_scale_set_os_profile.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/virtual_machine_scale_set_os_profile.py deleted file mode 100644 index 30a4508cfc12..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/virtual_machine_scale_set_os_profile.py +++ /dev/null @@ -1,97 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineScaleSetOSProfile(Model): - """Describes a virtual machine scale set OS profile. - - :param computer_name_prefix: Specifies the computer name prefix for all of - the virtual machines in the scale set. Computer name prefixes must be 1 to - 15 characters long. - :type computer_name_prefix: str - :param admin_username: Specifies the name of the administrator account. -

    **Windows-only restriction:** Cannot end in "."

    - **Disallowed values:** "administrator", "admin", "user", "user1", "test", - "user2", "test1", "user3", "admin1", "1", "123", "a", "actuser", "adm", - "admin2", "aspnet", "backup", "console", "david", "guest", "john", - "owner", "root", "server", "sql", "support", "support_388945a0", "sys", - "test2", "test3", "user4", "user5".

    **Minimum-length (Linux):** 1 - character

    **Max-length (Linux):** 64 characters

    - **Max-length (Windows):** 20 characters

  • For root access to - the Linux VM, see [Using root privileges on Linux virtual machines in - Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-use-root-privileges?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json)
  • - For a list of built-in system users on Linux that should not be used in - this field, see [Selecting User Names for Linux on - Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-usernames?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json) - :type admin_username: str - :param admin_password: Specifies the password of the administrator - account.

    **Minimum-length (Windows):** 8 characters

    - **Minimum-length (Linux):** 6 characters

    **Max-length - (Windows):** 123 characters

    **Max-length (Linux):** 72 characters -

    **Complexity requirements:** 3 out of 4 conditions below need to - be fulfilled
    Has lower characters
    Has upper characters
    Has a - digit
    Has a special character (Regex match [\\W_])

    - **Disallowed values:** "abc@123", "P@$$w0rd", "P@ssw0rd", "P@ssword123", - "Pa$$word", "pass@word1", "Password!", "Password1", "Password22", - "iloveyou!"

    For resetting the password, see [How to reset the - Remote Desktop service or its login password in a Windows - VM](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-reset-rdp?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json) -

    For resetting root password, see [Manage users, SSH, and check or - repair disks on Azure Linux VMs using the VMAccess - Extension](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-using-vmaccess-extension?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json#reset-root-password) - :type admin_password: str - :param custom_data: Specifies a base-64 encoded string of custom data. The - base-64 encoded string is decoded to a binary array that is saved as a - file on the Virtual Machine. The maximum length of the binary array is - 65535 bytes.

    For using cloud-init for your VM, see [Using - cloud-init to customize a Linux VM during - creation](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-using-cloud-init?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json) - :type custom_data: str - :param windows_configuration: Specifies Windows operating system settings - on the virtual machine. - :type windows_configuration: - ~azure.mgmt.compute.v2019_03_01.models.WindowsConfiguration - :param linux_configuration: Specifies the Linux operating system settings - on the virtual machine.

    For a list of supported Linux - distributions, see [Linux on Azure-Endorsed - Distributions](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-endorsed-distros?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json) -

    For running non-endorsed distributions, see [Information for - Non-Endorsed - Distributions](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-create-upload-generic?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json). - :type linux_configuration: - ~azure.mgmt.compute.v2019_03_01.models.LinuxConfiguration - :param secrets: Specifies set of certificates that should be installed - onto the virtual machines in the scale set. - :type secrets: - list[~azure.mgmt.compute.v2019_03_01.models.VaultSecretGroup] - """ - - _attribute_map = { - 'computer_name_prefix': {'key': 'computerNamePrefix', 'type': 'str'}, - 'admin_username': {'key': 'adminUsername', 'type': 'str'}, - 'admin_password': {'key': 'adminPassword', 'type': 'str'}, - 'custom_data': {'key': 'customData', 'type': 'str'}, - 'windows_configuration': {'key': 'windowsConfiguration', 'type': 'WindowsConfiguration'}, - 'linux_configuration': {'key': 'linuxConfiguration', 'type': 'LinuxConfiguration'}, - 'secrets': {'key': 'secrets', 'type': '[VaultSecretGroup]'}, - } - - def __init__(self, **kwargs): - super(VirtualMachineScaleSetOSProfile, self).__init__(**kwargs) - self.computer_name_prefix = kwargs.get('computer_name_prefix', None) - self.admin_username = kwargs.get('admin_username', None) - self.admin_password = kwargs.get('admin_password', None) - self.custom_data = kwargs.get('custom_data', None) - self.windows_configuration = kwargs.get('windows_configuration', None) - self.linux_configuration = kwargs.get('linux_configuration', None) - self.secrets = kwargs.get('secrets', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/virtual_machine_scale_set_os_profile_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/virtual_machine_scale_set_os_profile_py3.py deleted file mode 100644 index ded7aef360b8..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/virtual_machine_scale_set_os_profile_py3.py +++ /dev/null @@ -1,97 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineScaleSetOSProfile(Model): - """Describes a virtual machine scale set OS profile. - - :param computer_name_prefix: Specifies the computer name prefix for all of - the virtual machines in the scale set. Computer name prefixes must be 1 to - 15 characters long. - :type computer_name_prefix: str - :param admin_username: Specifies the name of the administrator account. -

    **Windows-only restriction:** Cannot end in "."

    - **Disallowed values:** "administrator", "admin", "user", "user1", "test", - "user2", "test1", "user3", "admin1", "1", "123", "a", "actuser", "adm", - "admin2", "aspnet", "backup", "console", "david", "guest", "john", - "owner", "root", "server", "sql", "support", "support_388945a0", "sys", - "test2", "test3", "user4", "user5".

    **Minimum-length (Linux):** 1 - character

    **Max-length (Linux):** 64 characters

    - **Max-length (Windows):** 20 characters

  • For root access to - the Linux VM, see [Using root privileges on Linux virtual machines in - Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-use-root-privileges?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json)
  • - For a list of built-in system users on Linux that should not be used in - this field, see [Selecting User Names for Linux on - Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-usernames?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json) - :type admin_username: str - :param admin_password: Specifies the password of the administrator - account.

    **Minimum-length (Windows):** 8 characters

    - **Minimum-length (Linux):** 6 characters

    **Max-length - (Windows):** 123 characters

    **Max-length (Linux):** 72 characters -

    **Complexity requirements:** 3 out of 4 conditions below need to - be fulfilled
    Has lower characters
    Has upper characters
    Has a - digit
    Has a special character (Regex match [\\W_])

    - **Disallowed values:** "abc@123", "P@$$w0rd", "P@ssw0rd", "P@ssword123", - "Pa$$word", "pass@word1", "Password!", "Password1", "Password22", - "iloveyou!"

    For resetting the password, see [How to reset the - Remote Desktop service or its login password in a Windows - VM](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-reset-rdp?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json) -

    For resetting root password, see [Manage users, SSH, and check or - repair disks on Azure Linux VMs using the VMAccess - Extension](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-using-vmaccess-extension?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json#reset-root-password) - :type admin_password: str - :param custom_data: Specifies a base-64 encoded string of custom data. The - base-64 encoded string is decoded to a binary array that is saved as a - file on the Virtual Machine. The maximum length of the binary array is - 65535 bytes.

    For using cloud-init for your VM, see [Using - cloud-init to customize a Linux VM during - creation](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-using-cloud-init?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json) - :type custom_data: str - :param windows_configuration: Specifies Windows operating system settings - on the virtual machine. - :type windows_configuration: - ~azure.mgmt.compute.v2019_03_01.models.WindowsConfiguration - :param linux_configuration: Specifies the Linux operating system settings - on the virtual machine.

    For a list of supported Linux - distributions, see [Linux on Azure-Endorsed - Distributions](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-endorsed-distros?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json) -

    For running non-endorsed distributions, see [Information for - Non-Endorsed - Distributions](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-create-upload-generic?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json). - :type linux_configuration: - ~azure.mgmt.compute.v2019_03_01.models.LinuxConfiguration - :param secrets: Specifies set of certificates that should be installed - onto the virtual machines in the scale set. - :type secrets: - list[~azure.mgmt.compute.v2019_03_01.models.VaultSecretGroup] - """ - - _attribute_map = { - 'computer_name_prefix': {'key': 'computerNamePrefix', 'type': 'str'}, - 'admin_username': {'key': 'adminUsername', 'type': 'str'}, - 'admin_password': {'key': 'adminPassword', 'type': 'str'}, - 'custom_data': {'key': 'customData', 'type': 'str'}, - 'windows_configuration': {'key': 'windowsConfiguration', 'type': 'WindowsConfiguration'}, - 'linux_configuration': {'key': 'linuxConfiguration', 'type': 'LinuxConfiguration'}, - 'secrets': {'key': 'secrets', 'type': '[VaultSecretGroup]'}, - } - - def __init__(self, *, computer_name_prefix: str=None, admin_username: str=None, admin_password: str=None, custom_data: str=None, windows_configuration=None, linux_configuration=None, secrets=None, **kwargs) -> None: - super(VirtualMachineScaleSetOSProfile, self).__init__(**kwargs) - self.computer_name_prefix = computer_name_prefix - self.admin_username = admin_username - self.admin_password = admin_password - self.custom_data = custom_data - self.windows_configuration = windows_configuration - self.linux_configuration = linux_configuration - self.secrets = secrets diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/virtual_machine_scale_set_paged.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/virtual_machine_scale_set_paged.py deleted file mode 100644 index 017e4b76873a..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/virtual_machine_scale_set_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class VirtualMachineScaleSetPaged(Paged): - """ - A paging container for iterating over a list of :class:`VirtualMachineScaleSet ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[VirtualMachineScaleSet]'} - } - - def __init__(self, *args, **kwargs): - - super(VirtualMachineScaleSetPaged, self).__init__(*args, **kwargs) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/virtual_machine_scale_set_public_ip_address_configuration.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/virtual_machine_scale_set_public_ip_address_configuration.py deleted file mode 100644 index 44b0e2587bee..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/virtual_machine_scale_set_public_ip_address_configuration.py +++ /dev/null @@ -1,55 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineScaleSetPublicIPAddressConfiguration(Model): - """Describes a virtual machines scale set IP Configuration's PublicIPAddress - configuration. - - All required parameters must be populated in order to send to Azure. - - :param name: Required. The publicIP address configuration name. - :type name: str - :param idle_timeout_in_minutes: The idle timeout of the public IP address. - :type idle_timeout_in_minutes: int - :param dns_settings: The dns settings to be applied on the publicIP - addresses . - :type dns_settings: - ~azure.mgmt.compute.v2019_03_01.models.VirtualMachineScaleSetPublicIPAddressConfigurationDnsSettings - :param ip_tags: The list of IP tags associated with the public IP address. - :type ip_tags: - list[~azure.mgmt.compute.v2019_03_01.models.VirtualMachineScaleSetIpTag] - :param public_ip_prefix: The PublicIPPrefix from which to allocate - publicIP addresses. - :type public_ip_prefix: ~azure.mgmt.compute.v2019_03_01.models.SubResource - """ - - _validation = { - 'name': {'required': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'idle_timeout_in_minutes': {'key': 'properties.idleTimeoutInMinutes', 'type': 'int'}, - 'dns_settings': {'key': 'properties.dnsSettings', 'type': 'VirtualMachineScaleSetPublicIPAddressConfigurationDnsSettings'}, - 'ip_tags': {'key': 'properties.ipTags', 'type': '[VirtualMachineScaleSetIpTag]'}, - 'public_ip_prefix': {'key': 'properties.publicIPPrefix', 'type': 'SubResource'}, - } - - def __init__(self, **kwargs): - super(VirtualMachineScaleSetPublicIPAddressConfiguration, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.idle_timeout_in_minutes = kwargs.get('idle_timeout_in_minutes', None) - self.dns_settings = kwargs.get('dns_settings', None) - self.ip_tags = kwargs.get('ip_tags', None) - self.public_ip_prefix = kwargs.get('public_ip_prefix', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/virtual_machine_scale_set_public_ip_address_configuration_dns_settings.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/virtual_machine_scale_set_public_ip_address_configuration_dns_settings.py deleted file mode 100644 index 2fe562244372..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/virtual_machine_scale_set_public_ip_address_configuration_dns_settings.py +++ /dev/null @@ -1,37 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineScaleSetPublicIPAddressConfigurationDnsSettings(Model): - """Describes a virtual machines scale sets network configuration's DNS - settings. - - All required parameters must be populated in order to send to Azure. - - :param domain_name_label: Required. The Domain name label.The - concatenation of the domain name label and vm index will be the domain - name labels of the PublicIPAddress resources that will be created - :type domain_name_label: str - """ - - _validation = { - 'domain_name_label': {'required': True}, - } - - _attribute_map = { - 'domain_name_label': {'key': 'domainNameLabel', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(VirtualMachineScaleSetPublicIPAddressConfigurationDnsSettings, self).__init__(**kwargs) - self.domain_name_label = kwargs.get('domain_name_label', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/virtual_machine_scale_set_public_ip_address_configuration_dns_settings_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/virtual_machine_scale_set_public_ip_address_configuration_dns_settings_py3.py deleted file mode 100644 index 326a36708ff4..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/virtual_machine_scale_set_public_ip_address_configuration_dns_settings_py3.py +++ /dev/null @@ -1,37 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineScaleSetPublicIPAddressConfigurationDnsSettings(Model): - """Describes a virtual machines scale sets network configuration's DNS - settings. - - All required parameters must be populated in order to send to Azure. - - :param domain_name_label: Required. The Domain name label.The - concatenation of the domain name label and vm index will be the domain - name labels of the PublicIPAddress resources that will be created - :type domain_name_label: str - """ - - _validation = { - 'domain_name_label': {'required': True}, - } - - _attribute_map = { - 'domain_name_label': {'key': 'domainNameLabel', 'type': 'str'}, - } - - def __init__(self, *, domain_name_label: str, **kwargs) -> None: - super(VirtualMachineScaleSetPublicIPAddressConfigurationDnsSettings, self).__init__(**kwargs) - self.domain_name_label = domain_name_label diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/virtual_machine_scale_set_public_ip_address_configuration_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/virtual_machine_scale_set_public_ip_address_configuration_py3.py deleted file mode 100644 index 81ff6cfc6452..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/virtual_machine_scale_set_public_ip_address_configuration_py3.py +++ /dev/null @@ -1,55 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineScaleSetPublicIPAddressConfiguration(Model): - """Describes a virtual machines scale set IP Configuration's PublicIPAddress - configuration. - - All required parameters must be populated in order to send to Azure. - - :param name: Required. The publicIP address configuration name. - :type name: str - :param idle_timeout_in_minutes: The idle timeout of the public IP address. - :type idle_timeout_in_minutes: int - :param dns_settings: The dns settings to be applied on the publicIP - addresses . - :type dns_settings: - ~azure.mgmt.compute.v2019_03_01.models.VirtualMachineScaleSetPublicIPAddressConfigurationDnsSettings - :param ip_tags: The list of IP tags associated with the public IP address. - :type ip_tags: - list[~azure.mgmt.compute.v2019_03_01.models.VirtualMachineScaleSetIpTag] - :param public_ip_prefix: The PublicIPPrefix from which to allocate - publicIP addresses. - :type public_ip_prefix: ~azure.mgmt.compute.v2019_03_01.models.SubResource - """ - - _validation = { - 'name': {'required': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'idle_timeout_in_minutes': {'key': 'properties.idleTimeoutInMinutes', 'type': 'int'}, - 'dns_settings': {'key': 'properties.dnsSettings', 'type': 'VirtualMachineScaleSetPublicIPAddressConfigurationDnsSettings'}, - 'ip_tags': {'key': 'properties.ipTags', 'type': '[VirtualMachineScaleSetIpTag]'}, - 'public_ip_prefix': {'key': 'properties.publicIPPrefix', 'type': 'SubResource'}, - } - - def __init__(self, *, name: str, idle_timeout_in_minutes: int=None, dns_settings=None, ip_tags=None, public_ip_prefix=None, **kwargs) -> None: - super(VirtualMachineScaleSetPublicIPAddressConfiguration, self).__init__(**kwargs) - self.name = name - self.idle_timeout_in_minutes = idle_timeout_in_minutes - self.dns_settings = dns_settings - self.ip_tags = ip_tags - self.public_ip_prefix = public_ip_prefix diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/virtual_machine_scale_set_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/virtual_machine_scale_set_py3.py deleted file mode 100644 index 9fd4d2b8a8bf..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/virtual_machine_scale_set_py3.py +++ /dev/null @@ -1,138 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource_py3 import Resource - - -class VirtualMachineScaleSet(Resource): - """Describes a Virtual Machine Scale Set. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource Id - :vartype id: str - :ivar name: Resource name - :vartype name: str - :ivar type: Resource type - :vartype type: str - :param location: Required. Resource location - :type location: str - :param tags: Resource tags - :type tags: dict[str, str] - :param sku: The virtual machine scale set sku. - :type sku: ~azure.mgmt.compute.v2019_03_01.models.Sku - :param plan: Specifies information about the marketplace image used to - create the virtual machine. This element is only used for marketplace - images. Before you can use a marketplace image from an API, you must - enable the image for programmatic use. In the Azure portal, find the - marketplace image that you want to use and then click **Want to deploy - programmatically, Get Started ->**. Enter any required information and - then click **Save**. - :type plan: ~azure.mgmt.compute.v2019_03_01.models.Plan - :param upgrade_policy: The upgrade policy. - :type upgrade_policy: ~azure.mgmt.compute.v2019_03_01.models.UpgradePolicy - :param virtual_machine_profile: The virtual machine profile. - :type virtual_machine_profile: - ~azure.mgmt.compute.v2019_03_01.models.VirtualMachineScaleSetVMProfile - :ivar provisioning_state: The provisioning state, which only appears in - the response. - :vartype provisioning_state: str - :param overprovision: Specifies whether the Virtual Machine Scale Set - should be overprovisioned. - :type overprovision: bool - :param do_not_run_extensions_on_overprovisioned_vms: When Overprovision is - enabled, extensions are launched only on the requested number of VMs which - are finally kept. This property will hence ensure that the extensions do - not run on the extra overprovisioned VMs. - :type do_not_run_extensions_on_overprovisioned_vms: bool - :ivar unique_id: Specifies the ID which uniquely identifies a Virtual - Machine Scale Set. - :vartype unique_id: str - :param single_placement_group: When true this limits the scale set to a - single placement group, of max size 100 virtual machines. - :type single_placement_group: bool - :param zone_balance: Whether to force strictly even Virtual Machine - distribution cross x-zones in case there is zone outage. - :type zone_balance: bool - :param platform_fault_domain_count: Fault Domain count for each placement - group. - :type platform_fault_domain_count: int - :param proximity_placement_group: Specifies information about the - proximity placement group that the virtual machine scale set should be - assigned to.

    Minimum api-version: 2018-04-01. - :type proximity_placement_group: - ~azure.mgmt.compute.v2019_03_01.models.SubResource - :param additional_capabilities: Specifies additional capabilities enabled - or disabled on the Virtual Machines in the Virtual Machine Scale Set. For - instance: whether the Virtual Machines have the capability to support - attaching managed data disks with UltraSSD_LRS storage account type. - :type additional_capabilities: - ~azure.mgmt.compute.v2019_03_01.models.AdditionalCapabilities - :param identity: The identity of the virtual machine scale set, if - configured. - :type identity: - ~azure.mgmt.compute.v2019_03_01.models.VirtualMachineScaleSetIdentity - :param zones: The virtual machine scale set zones. - :type zones: list[str] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - 'provisioning_state': {'readonly': True}, - 'unique_id': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'sku': {'key': 'sku', 'type': 'Sku'}, - 'plan': {'key': 'plan', 'type': 'Plan'}, - 'upgrade_policy': {'key': 'properties.upgradePolicy', 'type': 'UpgradePolicy'}, - 'virtual_machine_profile': {'key': 'properties.virtualMachineProfile', 'type': 'VirtualMachineScaleSetVMProfile'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'overprovision': {'key': 'properties.overprovision', 'type': 'bool'}, - 'do_not_run_extensions_on_overprovisioned_vms': {'key': 'properties.doNotRunExtensionsOnOverprovisionedVMs', 'type': 'bool'}, - 'unique_id': {'key': 'properties.uniqueId', 'type': 'str'}, - 'single_placement_group': {'key': 'properties.singlePlacementGroup', 'type': 'bool'}, - 'zone_balance': {'key': 'properties.zoneBalance', 'type': 'bool'}, - 'platform_fault_domain_count': {'key': 'properties.platformFaultDomainCount', 'type': 'int'}, - 'proximity_placement_group': {'key': 'properties.proximityPlacementGroup', 'type': 'SubResource'}, - 'additional_capabilities': {'key': 'properties.additionalCapabilities', 'type': 'AdditionalCapabilities'}, - 'identity': {'key': 'identity', 'type': 'VirtualMachineScaleSetIdentity'}, - 'zones': {'key': 'zones', 'type': '[str]'}, - } - - def __init__(self, *, location: str, tags=None, sku=None, plan=None, upgrade_policy=None, virtual_machine_profile=None, overprovision: bool=None, do_not_run_extensions_on_overprovisioned_vms: bool=None, single_placement_group: bool=None, zone_balance: bool=None, platform_fault_domain_count: int=None, proximity_placement_group=None, additional_capabilities=None, identity=None, zones=None, **kwargs) -> None: - super(VirtualMachineScaleSet, self).__init__(location=location, tags=tags, **kwargs) - self.sku = sku - self.plan = plan - self.upgrade_policy = upgrade_policy - self.virtual_machine_profile = virtual_machine_profile - self.provisioning_state = None - self.overprovision = overprovision - self.do_not_run_extensions_on_overprovisioned_vms = do_not_run_extensions_on_overprovisioned_vms - self.unique_id = None - self.single_placement_group = single_placement_group - self.zone_balance = zone_balance - self.platform_fault_domain_count = platform_fault_domain_count - self.proximity_placement_group = proximity_placement_group - self.additional_capabilities = additional_capabilities - self.identity = identity - self.zones = zones diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/virtual_machine_scale_set_reimage_parameters.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/virtual_machine_scale_set_reimage_parameters.py deleted file mode 100644 index d1c583c6ca1b..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/virtual_machine_scale_set_reimage_parameters.py +++ /dev/null @@ -1,34 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .virtual_machine_scale_set_vm_reimage_parameters import VirtualMachineScaleSetVMReimageParameters - - -class VirtualMachineScaleSetReimageParameters(VirtualMachineScaleSetVMReimageParameters): - """Describes a Virtual Machine Scale Set VM Reimage Parameters. - - :param temp_disk: Specifies whether to reimage temp disk. Default value: - false. - :type temp_disk: bool - :param instance_ids: The virtual machine scale set instance ids. Omitting - the virtual machine scale set instance ids will result in the operation - being performed on all virtual machines in the virtual machine scale set. - :type instance_ids: list[str] - """ - - _attribute_map = { - 'temp_disk': {'key': 'tempDisk', 'type': 'bool'}, - 'instance_ids': {'key': 'instanceIds', 'type': '[str]'}, - } - - def __init__(self, **kwargs): - super(VirtualMachineScaleSetReimageParameters, self).__init__(**kwargs) - self.instance_ids = kwargs.get('instance_ids', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/virtual_machine_scale_set_reimage_parameters_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/virtual_machine_scale_set_reimage_parameters_py3.py deleted file mode 100644 index 0c3b6962d17e..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/virtual_machine_scale_set_reimage_parameters_py3.py +++ /dev/null @@ -1,34 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .virtual_machine_scale_set_vm_reimage_parameters_py3 import VirtualMachineScaleSetVMReimageParameters - - -class VirtualMachineScaleSetReimageParameters(VirtualMachineScaleSetVMReimageParameters): - """Describes a Virtual Machine Scale Set VM Reimage Parameters. - - :param temp_disk: Specifies whether to reimage temp disk. Default value: - false. - :type temp_disk: bool - :param instance_ids: The virtual machine scale set instance ids. Omitting - the virtual machine scale set instance ids will result in the operation - being performed on all virtual machines in the virtual machine scale set. - :type instance_ids: list[str] - """ - - _attribute_map = { - 'temp_disk': {'key': 'tempDisk', 'type': 'bool'}, - 'instance_ids': {'key': 'instanceIds', 'type': '[str]'}, - } - - def __init__(self, *, temp_disk: bool=None, instance_ids=None, **kwargs) -> None: - super(VirtualMachineScaleSetReimageParameters, self).__init__(temp_disk=temp_disk, **kwargs) - self.instance_ids = instance_ids diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/virtual_machine_scale_set_sku.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/virtual_machine_scale_set_sku.py deleted file mode 100644 index 99f69e8134df..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/virtual_machine_scale_set_sku.py +++ /dev/null @@ -1,46 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineScaleSetSku(Model): - """Describes an available virtual machine scale set sku. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar resource_type: The type of resource the sku applies to. - :vartype resource_type: str - :ivar sku: The Sku. - :vartype sku: ~azure.mgmt.compute.v2019_03_01.models.Sku - :ivar capacity: Specifies the number of virtual machines in the scale set. - :vartype capacity: - ~azure.mgmt.compute.v2019_03_01.models.VirtualMachineScaleSetSkuCapacity - """ - - _validation = { - 'resource_type': {'readonly': True}, - 'sku': {'readonly': True}, - 'capacity': {'readonly': True}, - } - - _attribute_map = { - 'resource_type': {'key': 'resourceType', 'type': 'str'}, - 'sku': {'key': 'sku', 'type': 'Sku'}, - 'capacity': {'key': 'capacity', 'type': 'VirtualMachineScaleSetSkuCapacity'}, - } - - def __init__(self, **kwargs): - super(VirtualMachineScaleSetSku, self).__init__(**kwargs) - self.resource_type = None - self.sku = None - self.capacity = None diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/virtual_machine_scale_set_sku_capacity.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/virtual_machine_scale_set_sku_capacity.py deleted file mode 100644 index 0fd2a9351b49..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/virtual_machine_scale_set_sku_capacity.py +++ /dev/null @@ -1,52 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineScaleSetSkuCapacity(Model): - """Describes scaling information of a sku. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar minimum: The minimum capacity. - :vartype minimum: long - :ivar maximum: The maximum capacity that can be set. - :vartype maximum: long - :ivar default_capacity: The default capacity. - :vartype default_capacity: long - :ivar scale_type: The scale type applicable to the sku. Possible values - include: 'Automatic', 'None' - :vartype scale_type: str or - ~azure.mgmt.compute.v2019_03_01.models.VirtualMachineScaleSetSkuScaleType - """ - - _validation = { - 'minimum': {'readonly': True}, - 'maximum': {'readonly': True}, - 'default_capacity': {'readonly': True}, - 'scale_type': {'readonly': True}, - } - - _attribute_map = { - 'minimum': {'key': 'minimum', 'type': 'long'}, - 'maximum': {'key': 'maximum', 'type': 'long'}, - 'default_capacity': {'key': 'defaultCapacity', 'type': 'long'}, - 'scale_type': {'key': 'scaleType', 'type': 'VirtualMachineScaleSetSkuScaleType'}, - } - - def __init__(self, **kwargs): - super(VirtualMachineScaleSetSkuCapacity, self).__init__(**kwargs) - self.minimum = None - self.maximum = None - self.default_capacity = None - self.scale_type = None diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/virtual_machine_scale_set_sku_capacity_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/virtual_machine_scale_set_sku_capacity_py3.py deleted file mode 100644 index 748be719bdb0..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/virtual_machine_scale_set_sku_capacity_py3.py +++ /dev/null @@ -1,52 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineScaleSetSkuCapacity(Model): - """Describes scaling information of a sku. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar minimum: The minimum capacity. - :vartype minimum: long - :ivar maximum: The maximum capacity that can be set. - :vartype maximum: long - :ivar default_capacity: The default capacity. - :vartype default_capacity: long - :ivar scale_type: The scale type applicable to the sku. Possible values - include: 'Automatic', 'None' - :vartype scale_type: str or - ~azure.mgmt.compute.v2019_03_01.models.VirtualMachineScaleSetSkuScaleType - """ - - _validation = { - 'minimum': {'readonly': True}, - 'maximum': {'readonly': True}, - 'default_capacity': {'readonly': True}, - 'scale_type': {'readonly': True}, - } - - _attribute_map = { - 'minimum': {'key': 'minimum', 'type': 'long'}, - 'maximum': {'key': 'maximum', 'type': 'long'}, - 'default_capacity': {'key': 'defaultCapacity', 'type': 'long'}, - 'scale_type': {'key': 'scaleType', 'type': 'VirtualMachineScaleSetSkuScaleType'}, - } - - def __init__(self, **kwargs) -> None: - super(VirtualMachineScaleSetSkuCapacity, self).__init__(**kwargs) - self.minimum = None - self.maximum = None - self.default_capacity = None - self.scale_type = None diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/virtual_machine_scale_set_sku_paged.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/virtual_machine_scale_set_sku_paged.py deleted file mode 100644 index 7982291c17e8..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/virtual_machine_scale_set_sku_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class VirtualMachineScaleSetSkuPaged(Paged): - """ - A paging container for iterating over a list of :class:`VirtualMachineScaleSetSku ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[VirtualMachineScaleSetSku]'} - } - - def __init__(self, *args, **kwargs): - - super(VirtualMachineScaleSetSkuPaged, self).__init__(*args, **kwargs) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/virtual_machine_scale_set_sku_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/virtual_machine_scale_set_sku_py3.py deleted file mode 100644 index 2a0e2dbc633e..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/virtual_machine_scale_set_sku_py3.py +++ /dev/null @@ -1,46 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineScaleSetSku(Model): - """Describes an available virtual machine scale set sku. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar resource_type: The type of resource the sku applies to. - :vartype resource_type: str - :ivar sku: The Sku. - :vartype sku: ~azure.mgmt.compute.v2019_03_01.models.Sku - :ivar capacity: Specifies the number of virtual machines in the scale set. - :vartype capacity: - ~azure.mgmt.compute.v2019_03_01.models.VirtualMachineScaleSetSkuCapacity - """ - - _validation = { - 'resource_type': {'readonly': True}, - 'sku': {'readonly': True}, - 'capacity': {'readonly': True}, - } - - _attribute_map = { - 'resource_type': {'key': 'resourceType', 'type': 'str'}, - 'sku': {'key': 'sku', 'type': 'Sku'}, - 'capacity': {'key': 'capacity', 'type': 'VirtualMachineScaleSetSkuCapacity'}, - } - - def __init__(self, **kwargs) -> None: - super(VirtualMachineScaleSetSku, self).__init__(**kwargs) - self.resource_type = None - self.sku = None - self.capacity = None diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/virtual_machine_scale_set_storage_profile.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/virtual_machine_scale_set_storage_profile.py deleted file mode 100644 index 38423ab9572d..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/virtual_machine_scale_set_storage_profile.py +++ /dev/null @@ -1,49 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineScaleSetStorageProfile(Model): - """Describes a virtual machine scale set storage profile. - - :param image_reference: Specifies information about the image to use. You - can specify information about platform images, marketplace images, or - virtual machine images. This element is required when you want to use a - platform image, marketplace image, or virtual machine image, but is not - used in other creation operations. - :type image_reference: - ~azure.mgmt.compute.v2019_03_01.models.ImageReference - :param os_disk: Specifies information about the operating system disk used - by the virtual machines in the scale set.

    For more information - about disks, see [About disks and VHDs for Azure virtual - machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-about-disks-vhds?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). - :type os_disk: - ~azure.mgmt.compute.v2019_03_01.models.VirtualMachineScaleSetOSDisk - :param data_disks: Specifies the parameters that are used to add data - disks to the virtual machines in the scale set.

    For more - information about disks, see [About disks and VHDs for Azure virtual - machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-about-disks-vhds?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). - :type data_disks: - list[~azure.mgmt.compute.v2019_03_01.models.VirtualMachineScaleSetDataDisk] - """ - - _attribute_map = { - 'image_reference': {'key': 'imageReference', 'type': 'ImageReference'}, - 'os_disk': {'key': 'osDisk', 'type': 'VirtualMachineScaleSetOSDisk'}, - 'data_disks': {'key': 'dataDisks', 'type': '[VirtualMachineScaleSetDataDisk]'}, - } - - def __init__(self, **kwargs): - super(VirtualMachineScaleSetStorageProfile, self).__init__(**kwargs) - self.image_reference = kwargs.get('image_reference', None) - self.os_disk = kwargs.get('os_disk', None) - self.data_disks = kwargs.get('data_disks', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/virtual_machine_scale_set_storage_profile_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/virtual_machine_scale_set_storage_profile_py3.py deleted file mode 100644 index 099b24af479c..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/virtual_machine_scale_set_storage_profile_py3.py +++ /dev/null @@ -1,49 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineScaleSetStorageProfile(Model): - """Describes a virtual machine scale set storage profile. - - :param image_reference: Specifies information about the image to use. You - can specify information about platform images, marketplace images, or - virtual machine images. This element is required when you want to use a - platform image, marketplace image, or virtual machine image, but is not - used in other creation operations. - :type image_reference: - ~azure.mgmt.compute.v2019_03_01.models.ImageReference - :param os_disk: Specifies information about the operating system disk used - by the virtual machines in the scale set.

    For more information - about disks, see [About disks and VHDs for Azure virtual - machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-about-disks-vhds?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). - :type os_disk: - ~azure.mgmt.compute.v2019_03_01.models.VirtualMachineScaleSetOSDisk - :param data_disks: Specifies the parameters that are used to add data - disks to the virtual machines in the scale set.

    For more - information about disks, see [About disks and VHDs for Azure virtual - machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-about-disks-vhds?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). - :type data_disks: - list[~azure.mgmt.compute.v2019_03_01.models.VirtualMachineScaleSetDataDisk] - """ - - _attribute_map = { - 'image_reference': {'key': 'imageReference', 'type': 'ImageReference'}, - 'os_disk': {'key': 'osDisk', 'type': 'VirtualMachineScaleSetOSDisk'}, - 'data_disks': {'key': 'dataDisks', 'type': '[VirtualMachineScaleSetDataDisk]'}, - } - - def __init__(self, *, image_reference=None, os_disk=None, data_disks=None, **kwargs) -> None: - super(VirtualMachineScaleSetStorageProfile, self).__init__(**kwargs) - self.image_reference = image_reference - self.os_disk = os_disk - self.data_disks = data_disks diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/virtual_machine_scale_set_update.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/virtual_machine_scale_set_update.py deleted file mode 100644 index fc8c6ef96d9c..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/virtual_machine_scale_set_update.py +++ /dev/null @@ -1,69 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .update_resource import UpdateResource - - -class VirtualMachineScaleSetUpdate(UpdateResource): - """Describes a Virtual Machine Scale Set. - - :param tags: Resource tags - :type tags: dict[str, str] - :param sku: The virtual machine scale set sku. - :type sku: ~azure.mgmt.compute.v2019_03_01.models.Sku - :param plan: The purchase plan when deploying a virtual machine scale set - from VM Marketplace images. - :type plan: ~azure.mgmt.compute.v2019_03_01.models.Plan - :param upgrade_policy: The upgrade policy. - :type upgrade_policy: ~azure.mgmt.compute.v2019_03_01.models.UpgradePolicy - :param virtual_machine_profile: The virtual machine profile. - :type virtual_machine_profile: - ~azure.mgmt.compute.v2019_03_01.models.VirtualMachineScaleSetUpdateVMProfile - :param overprovision: Specifies whether the Virtual Machine Scale Set - should be overprovisioned. - :type overprovision: bool - :param single_placement_group: When true this limits the scale set to a - single placement group, of max size 100 virtual machines. - :type single_placement_group: bool - :param additional_capabilities: Specifies additional capabilities enabled - or disabled on the Virtual Machines in the Virtual Machine Scale Set. For - instance: whether the Virtual Machines have the capability to support - attaching managed data disks with UltraSSD_LRS storage account type. - :type additional_capabilities: - ~azure.mgmt.compute.v2019_03_01.models.AdditionalCapabilities - :param identity: The identity of the virtual machine scale set, if - configured. - :type identity: - ~azure.mgmt.compute.v2019_03_01.models.VirtualMachineScaleSetIdentity - """ - - _attribute_map = { - 'tags': {'key': 'tags', 'type': '{str}'}, - 'sku': {'key': 'sku', 'type': 'Sku'}, - 'plan': {'key': 'plan', 'type': 'Plan'}, - 'upgrade_policy': {'key': 'properties.upgradePolicy', 'type': 'UpgradePolicy'}, - 'virtual_machine_profile': {'key': 'properties.virtualMachineProfile', 'type': 'VirtualMachineScaleSetUpdateVMProfile'}, - 'overprovision': {'key': 'properties.overprovision', 'type': 'bool'}, - 'single_placement_group': {'key': 'properties.singlePlacementGroup', 'type': 'bool'}, - 'additional_capabilities': {'key': 'properties.additionalCapabilities', 'type': 'AdditionalCapabilities'}, - 'identity': {'key': 'identity', 'type': 'VirtualMachineScaleSetIdentity'}, - } - - def __init__(self, **kwargs): - super(VirtualMachineScaleSetUpdate, self).__init__(**kwargs) - self.sku = kwargs.get('sku', None) - self.plan = kwargs.get('plan', None) - self.upgrade_policy = kwargs.get('upgrade_policy', None) - self.virtual_machine_profile = kwargs.get('virtual_machine_profile', None) - self.overprovision = kwargs.get('overprovision', None) - self.single_placement_group = kwargs.get('single_placement_group', None) - self.additional_capabilities = kwargs.get('additional_capabilities', None) - self.identity = kwargs.get('identity', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/virtual_machine_scale_set_update_ip_configuration.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/virtual_machine_scale_set_update_ip_configuration.py deleted file mode 100644 index a37e2dd0eaf8..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/virtual_machine_scale_set_update_ip_configuration.py +++ /dev/null @@ -1,77 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .sub_resource import SubResource - - -class VirtualMachineScaleSetUpdateIPConfiguration(SubResource): - """Describes a virtual machine scale set network profile's IP configuration. - - :param id: Resource Id - :type id: str - :param name: The IP configuration name. - :type name: str - :param subnet: The subnet. - :type subnet: ~azure.mgmt.compute.v2019_03_01.models.ApiEntityReference - :param primary: Specifies the primary IP Configuration in case the network - interface has more than one IP Configuration. - :type primary: bool - :param public_ip_address_configuration: The publicIPAddressConfiguration. - :type public_ip_address_configuration: - ~azure.mgmt.compute.v2019_03_01.models.VirtualMachineScaleSetUpdatePublicIPAddressConfiguration - :param private_ip_address_version: Available from Api-Version 2017-03-30 - onwards, it represents whether the specific ipconfiguration is IPv4 or - IPv6. Default is taken as IPv4. Possible values are: 'IPv4' and 'IPv6'. - Possible values include: 'IPv4', 'IPv6' - :type private_ip_address_version: str or - ~azure.mgmt.compute.v2019_03_01.models.IPVersion - :param application_gateway_backend_address_pools: The application gateway - backend address pools. - :type application_gateway_backend_address_pools: - list[~azure.mgmt.compute.v2019_03_01.models.SubResource] - :param application_security_groups: Specifies an array of references to - application security group. - :type application_security_groups: - list[~azure.mgmt.compute.v2019_03_01.models.SubResource] - :param load_balancer_backend_address_pools: The load balancer backend - address pools. - :type load_balancer_backend_address_pools: - list[~azure.mgmt.compute.v2019_03_01.models.SubResource] - :param load_balancer_inbound_nat_pools: The load balancer inbound nat - pools. - :type load_balancer_inbound_nat_pools: - list[~azure.mgmt.compute.v2019_03_01.models.SubResource] - """ - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'subnet': {'key': 'properties.subnet', 'type': 'ApiEntityReference'}, - 'primary': {'key': 'properties.primary', 'type': 'bool'}, - 'public_ip_address_configuration': {'key': 'properties.publicIPAddressConfiguration', 'type': 'VirtualMachineScaleSetUpdatePublicIPAddressConfiguration'}, - 'private_ip_address_version': {'key': 'properties.privateIPAddressVersion', 'type': 'str'}, - 'application_gateway_backend_address_pools': {'key': 'properties.applicationGatewayBackendAddressPools', 'type': '[SubResource]'}, - 'application_security_groups': {'key': 'properties.applicationSecurityGroups', 'type': '[SubResource]'}, - 'load_balancer_backend_address_pools': {'key': 'properties.loadBalancerBackendAddressPools', 'type': '[SubResource]'}, - 'load_balancer_inbound_nat_pools': {'key': 'properties.loadBalancerInboundNatPools', 'type': '[SubResource]'}, - } - - def __init__(self, **kwargs): - super(VirtualMachineScaleSetUpdateIPConfiguration, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.subnet = kwargs.get('subnet', None) - self.primary = kwargs.get('primary', None) - self.public_ip_address_configuration = kwargs.get('public_ip_address_configuration', None) - self.private_ip_address_version = kwargs.get('private_ip_address_version', None) - self.application_gateway_backend_address_pools = kwargs.get('application_gateway_backend_address_pools', None) - self.application_security_groups = kwargs.get('application_security_groups', None) - self.load_balancer_backend_address_pools = kwargs.get('load_balancer_backend_address_pools', None) - self.load_balancer_inbound_nat_pools = kwargs.get('load_balancer_inbound_nat_pools', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/virtual_machine_scale_set_update_ip_configuration_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/virtual_machine_scale_set_update_ip_configuration_py3.py deleted file mode 100644 index 6c9f272e5cca..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/virtual_machine_scale_set_update_ip_configuration_py3.py +++ /dev/null @@ -1,77 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .sub_resource_py3 import SubResource - - -class VirtualMachineScaleSetUpdateIPConfiguration(SubResource): - """Describes a virtual machine scale set network profile's IP configuration. - - :param id: Resource Id - :type id: str - :param name: The IP configuration name. - :type name: str - :param subnet: The subnet. - :type subnet: ~azure.mgmt.compute.v2019_03_01.models.ApiEntityReference - :param primary: Specifies the primary IP Configuration in case the network - interface has more than one IP Configuration. - :type primary: bool - :param public_ip_address_configuration: The publicIPAddressConfiguration. - :type public_ip_address_configuration: - ~azure.mgmt.compute.v2019_03_01.models.VirtualMachineScaleSetUpdatePublicIPAddressConfiguration - :param private_ip_address_version: Available from Api-Version 2017-03-30 - onwards, it represents whether the specific ipconfiguration is IPv4 or - IPv6. Default is taken as IPv4. Possible values are: 'IPv4' and 'IPv6'. - Possible values include: 'IPv4', 'IPv6' - :type private_ip_address_version: str or - ~azure.mgmt.compute.v2019_03_01.models.IPVersion - :param application_gateway_backend_address_pools: The application gateway - backend address pools. - :type application_gateway_backend_address_pools: - list[~azure.mgmt.compute.v2019_03_01.models.SubResource] - :param application_security_groups: Specifies an array of references to - application security group. - :type application_security_groups: - list[~azure.mgmt.compute.v2019_03_01.models.SubResource] - :param load_balancer_backend_address_pools: The load balancer backend - address pools. - :type load_balancer_backend_address_pools: - list[~azure.mgmt.compute.v2019_03_01.models.SubResource] - :param load_balancer_inbound_nat_pools: The load balancer inbound nat - pools. - :type load_balancer_inbound_nat_pools: - list[~azure.mgmt.compute.v2019_03_01.models.SubResource] - """ - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'subnet': {'key': 'properties.subnet', 'type': 'ApiEntityReference'}, - 'primary': {'key': 'properties.primary', 'type': 'bool'}, - 'public_ip_address_configuration': {'key': 'properties.publicIPAddressConfiguration', 'type': 'VirtualMachineScaleSetUpdatePublicIPAddressConfiguration'}, - 'private_ip_address_version': {'key': 'properties.privateIPAddressVersion', 'type': 'str'}, - 'application_gateway_backend_address_pools': {'key': 'properties.applicationGatewayBackendAddressPools', 'type': '[SubResource]'}, - 'application_security_groups': {'key': 'properties.applicationSecurityGroups', 'type': '[SubResource]'}, - 'load_balancer_backend_address_pools': {'key': 'properties.loadBalancerBackendAddressPools', 'type': '[SubResource]'}, - 'load_balancer_inbound_nat_pools': {'key': 'properties.loadBalancerInboundNatPools', 'type': '[SubResource]'}, - } - - def __init__(self, *, id: str=None, name: str=None, subnet=None, primary: bool=None, public_ip_address_configuration=None, private_ip_address_version=None, application_gateway_backend_address_pools=None, application_security_groups=None, load_balancer_backend_address_pools=None, load_balancer_inbound_nat_pools=None, **kwargs) -> None: - super(VirtualMachineScaleSetUpdateIPConfiguration, self).__init__(id=id, **kwargs) - self.name = name - self.subnet = subnet - self.primary = primary - self.public_ip_address_configuration = public_ip_address_configuration - self.private_ip_address_version = private_ip_address_version - self.application_gateway_backend_address_pools = application_gateway_backend_address_pools - self.application_security_groups = application_security_groups - self.load_balancer_backend_address_pools = load_balancer_backend_address_pools - self.load_balancer_inbound_nat_pools = load_balancer_inbound_nat_pools diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/virtual_machine_scale_set_update_network_configuration.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/virtual_machine_scale_set_update_network_configuration.py deleted file mode 100644 index 9336d4e9695d..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/virtual_machine_scale_set_update_network_configuration.py +++ /dev/null @@ -1,61 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .sub_resource import SubResource - - -class VirtualMachineScaleSetUpdateNetworkConfiguration(SubResource): - """Describes a virtual machine scale set network profile's network - configurations. - - :param id: Resource Id - :type id: str - :param name: The network configuration name. - :type name: str - :param primary: Whether this is a primary NIC on a virtual machine. - :type primary: bool - :param enable_accelerated_networking: Specifies whether the network - interface is accelerated networking-enabled. - :type enable_accelerated_networking: bool - :param network_security_group: The network security group. - :type network_security_group: - ~azure.mgmt.compute.v2019_03_01.models.SubResource - :param dns_settings: The dns settings to be applied on the network - interfaces. - :type dns_settings: - ~azure.mgmt.compute.v2019_03_01.models.VirtualMachineScaleSetNetworkConfigurationDnsSettings - :param ip_configurations: The virtual machine scale set IP Configuration. - :type ip_configurations: - list[~azure.mgmt.compute.v2019_03_01.models.VirtualMachineScaleSetUpdateIPConfiguration] - :param enable_ip_forwarding: Whether IP forwarding enabled on this NIC. - :type enable_ip_forwarding: bool - """ - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'primary': {'key': 'properties.primary', 'type': 'bool'}, - 'enable_accelerated_networking': {'key': 'properties.enableAcceleratedNetworking', 'type': 'bool'}, - 'network_security_group': {'key': 'properties.networkSecurityGroup', 'type': 'SubResource'}, - 'dns_settings': {'key': 'properties.dnsSettings', 'type': 'VirtualMachineScaleSetNetworkConfigurationDnsSettings'}, - 'ip_configurations': {'key': 'properties.ipConfigurations', 'type': '[VirtualMachineScaleSetUpdateIPConfiguration]'}, - 'enable_ip_forwarding': {'key': 'properties.enableIPForwarding', 'type': 'bool'}, - } - - def __init__(self, **kwargs): - super(VirtualMachineScaleSetUpdateNetworkConfiguration, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.primary = kwargs.get('primary', None) - self.enable_accelerated_networking = kwargs.get('enable_accelerated_networking', None) - self.network_security_group = kwargs.get('network_security_group', None) - self.dns_settings = kwargs.get('dns_settings', None) - self.ip_configurations = kwargs.get('ip_configurations', None) - self.enable_ip_forwarding = kwargs.get('enable_ip_forwarding', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/virtual_machine_scale_set_update_network_configuration_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/virtual_machine_scale_set_update_network_configuration_py3.py deleted file mode 100644 index 42ecd8c4a473..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/virtual_machine_scale_set_update_network_configuration_py3.py +++ /dev/null @@ -1,61 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .sub_resource_py3 import SubResource - - -class VirtualMachineScaleSetUpdateNetworkConfiguration(SubResource): - """Describes a virtual machine scale set network profile's network - configurations. - - :param id: Resource Id - :type id: str - :param name: The network configuration name. - :type name: str - :param primary: Whether this is a primary NIC on a virtual machine. - :type primary: bool - :param enable_accelerated_networking: Specifies whether the network - interface is accelerated networking-enabled. - :type enable_accelerated_networking: bool - :param network_security_group: The network security group. - :type network_security_group: - ~azure.mgmt.compute.v2019_03_01.models.SubResource - :param dns_settings: The dns settings to be applied on the network - interfaces. - :type dns_settings: - ~azure.mgmt.compute.v2019_03_01.models.VirtualMachineScaleSetNetworkConfigurationDnsSettings - :param ip_configurations: The virtual machine scale set IP Configuration. - :type ip_configurations: - list[~azure.mgmt.compute.v2019_03_01.models.VirtualMachineScaleSetUpdateIPConfiguration] - :param enable_ip_forwarding: Whether IP forwarding enabled on this NIC. - :type enable_ip_forwarding: bool - """ - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'primary': {'key': 'properties.primary', 'type': 'bool'}, - 'enable_accelerated_networking': {'key': 'properties.enableAcceleratedNetworking', 'type': 'bool'}, - 'network_security_group': {'key': 'properties.networkSecurityGroup', 'type': 'SubResource'}, - 'dns_settings': {'key': 'properties.dnsSettings', 'type': 'VirtualMachineScaleSetNetworkConfigurationDnsSettings'}, - 'ip_configurations': {'key': 'properties.ipConfigurations', 'type': '[VirtualMachineScaleSetUpdateIPConfiguration]'}, - 'enable_ip_forwarding': {'key': 'properties.enableIPForwarding', 'type': 'bool'}, - } - - def __init__(self, *, id: str=None, name: str=None, primary: bool=None, enable_accelerated_networking: bool=None, network_security_group=None, dns_settings=None, ip_configurations=None, enable_ip_forwarding: bool=None, **kwargs) -> None: - super(VirtualMachineScaleSetUpdateNetworkConfiguration, self).__init__(id=id, **kwargs) - self.name = name - self.primary = primary - self.enable_accelerated_networking = enable_accelerated_networking - self.network_security_group = network_security_group - self.dns_settings = dns_settings - self.ip_configurations = ip_configurations - self.enable_ip_forwarding = enable_ip_forwarding diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/virtual_machine_scale_set_update_network_profile.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/virtual_machine_scale_set_update_network_profile.py deleted file mode 100644 index b876d57956d9..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/virtual_machine_scale_set_update_network_profile.py +++ /dev/null @@ -1,30 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineScaleSetUpdateNetworkProfile(Model): - """Describes a virtual machine scale set network profile. - - :param network_interface_configurations: The list of network - configurations. - :type network_interface_configurations: - list[~azure.mgmt.compute.v2019_03_01.models.VirtualMachineScaleSetUpdateNetworkConfiguration] - """ - - _attribute_map = { - 'network_interface_configurations': {'key': 'networkInterfaceConfigurations', 'type': '[VirtualMachineScaleSetUpdateNetworkConfiguration]'}, - } - - def __init__(self, **kwargs): - super(VirtualMachineScaleSetUpdateNetworkProfile, self).__init__(**kwargs) - self.network_interface_configurations = kwargs.get('network_interface_configurations', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/virtual_machine_scale_set_update_network_profile_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/virtual_machine_scale_set_update_network_profile_py3.py deleted file mode 100644 index 314a9dd8baf7..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/virtual_machine_scale_set_update_network_profile_py3.py +++ /dev/null @@ -1,30 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineScaleSetUpdateNetworkProfile(Model): - """Describes a virtual machine scale set network profile. - - :param network_interface_configurations: The list of network - configurations. - :type network_interface_configurations: - list[~azure.mgmt.compute.v2019_03_01.models.VirtualMachineScaleSetUpdateNetworkConfiguration] - """ - - _attribute_map = { - 'network_interface_configurations': {'key': 'networkInterfaceConfigurations', 'type': '[VirtualMachineScaleSetUpdateNetworkConfiguration]'}, - } - - def __init__(self, *, network_interface_configurations=None, **kwargs) -> None: - super(VirtualMachineScaleSetUpdateNetworkProfile, self).__init__(**kwargs) - self.network_interface_configurations = network_interface_configurations diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/virtual_machine_scale_set_update_os_disk.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/virtual_machine_scale_set_update_os_disk.py deleted file mode 100644 index 7fee381cabec..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/virtual_machine_scale_set_update_os_disk.py +++ /dev/null @@ -1,56 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineScaleSetUpdateOSDisk(Model): - """Describes virtual machine scale set operating system disk Update Object. - This should be used for Updating VMSS OS Disk. - - :param caching: The caching type. Possible values include: 'None', - 'ReadOnly', 'ReadWrite' - :type caching: str or ~azure.mgmt.compute.v2019_03_01.models.CachingTypes - :param write_accelerator_enabled: Specifies whether writeAccelerator - should be enabled or disabled on the disk. - :type write_accelerator_enabled: bool - :param disk_size_gb: Specifies the size of the operating system disk in - gigabytes. This element can be used to overwrite the size of the disk in a - virtual machine image.

    This value cannot be larger than 1023 GB - :type disk_size_gb: int - :param image: The Source User Image VirtualHardDisk. This VirtualHardDisk - will be copied before using it to attach to the Virtual Machine. If - SourceImage is provided, the destination VirtualHardDisk should not exist. - :type image: ~azure.mgmt.compute.v2019_03_01.models.VirtualHardDisk - :param vhd_containers: The list of virtual hard disk container uris. - :type vhd_containers: list[str] - :param managed_disk: The managed disk parameters. - :type managed_disk: - ~azure.mgmt.compute.v2019_03_01.models.VirtualMachineScaleSetManagedDiskParameters - """ - - _attribute_map = { - 'caching': {'key': 'caching', 'type': 'CachingTypes'}, - 'write_accelerator_enabled': {'key': 'writeAcceleratorEnabled', 'type': 'bool'}, - 'disk_size_gb': {'key': 'diskSizeGB', 'type': 'int'}, - 'image': {'key': 'image', 'type': 'VirtualHardDisk'}, - 'vhd_containers': {'key': 'vhdContainers', 'type': '[str]'}, - 'managed_disk': {'key': 'managedDisk', 'type': 'VirtualMachineScaleSetManagedDiskParameters'}, - } - - def __init__(self, **kwargs): - super(VirtualMachineScaleSetUpdateOSDisk, self).__init__(**kwargs) - self.caching = kwargs.get('caching', None) - self.write_accelerator_enabled = kwargs.get('write_accelerator_enabled', None) - self.disk_size_gb = kwargs.get('disk_size_gb', None) - self.image = kwargs.get('image', None) - self.vhd_containers = kwargs.get('vhd_containers', None) - self.managed_disk = kwargs.get('managed_disk', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/virtual_machine_scale_set_update_os_disk_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/virtual_machine_scale_set_update_os_disk_py3.py deleted file mode 100644 index d2126d4c2134..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/virtual_machine_scale_set_update_os_disk_py3.py +++ /dev/null @@ -1,56 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineScaleSetUpdateOSDisk(Model): - """Describes virtual machine scale set operating system disk Update Object. - This should be used for Updating VMSS OS Disk. - - :param caching: The caching type. Possible values include: 'None', - 'ReadOnly', 'ReadWrite' - :type caching: str or ~azure.mgmt.compute.v2019_03_01.models.CachingTypes - :param write_accelerator_enabled: Specifies whether writeAccelerator - should be enabled or disabled on the disk. - :type write_accelerator_enabled: bool - :param disk_size_gb: Specifies the size of the operating system disk in - gigabytes. This element can be used to overwrite the size of the disk in a - virtual machine image.

    This value cannot be larger than 1023 GB - :type disk_size_gb: int - :param image: The Source User Image VirtualHardDisk. This VirtualHardDisk - will be copied before using it to attach to the Virtual Machine. If - SourceImage is provided, the destination VirtualHardDisk should not exist. - :type image: ~azure.mgmt.compute.v2019_03_01.models.VirtualHardDisk - :param vhd_containers: The list of virtual hard disk container uris. - :type vhd_containers: list[str] - :param managed_disk: The managed disk parameters. - :type managed_disk: - ~azure.mgmt.compute.v2019_03_01.models.VirtualMachineScaleSetManagedDiskParameters - """ - - _attribute_map = { - 'caching': {'key': 'caching', 'type': 'CachingTypes'}, - 'write_accelerator_enabled': {'key': 'writeAcceleratorEnabled', 'type': 'bool'}, - 'disk_size_gb': {'key': 'diskSizeGB', 'type': 'int'}, - 'image': {'key': 'image', 'type': 'VirtualHardDisk'}, - 'vhd_containers': {'key': 'vhdContainers', 'type': '[str]'}, - 'managed_disk': {'key': 'managedDisk', 'type': 'VirtualMachineScaleSetManagedDiskParameters'}, - } - - def __init__(self, *, caching=None, write_accelerator_enabled: bool=None, disk_size_gb: int=None, image=None, vhd_containers=None, managed_disk=None, **kwargs) -> None: - super(VirtualMachineScaleSetUpdateOSDisk, self).__init__(**kwargs) - self.caching = caching - self.write_accelerator_enabled = write_accelerator_enabled - self.disk_size_gb = disk_size_gb - self.image = image - self.vhd_containers = vhd_containers - self.managed_disk = managed_disk diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/virtual_machine_scale_set_update_os_profile.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/virtual_machine_scale_set_update_os_profile.py deleted file mode 100644 index 8c2a8f463be0..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/virtual_machine_scale_set_update_os_profile.py +++ /dev/null @@ -1,43 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineScaleSetUpdateOSProfile(Model): - """Describes a virtual machine scale set OS profile. - - :param custom_data: A base-64 encoded string of custom data. - :type custom_data: str - :param windows_configuration: The Windows Configuration of the OS profile. - :type windows_configuration: - ~azure.mgmt.compute.v2019_03_01.models.WindowsConfiguration - :param linux_configuration: The Linux Configuration of the OS profile. - :type linux_configuration: - ~azure.mgmt.compute.v2019_03_01.models.LinuxConfiguration - :param secrets: The List of certificates for addition to the VM. - :type secrets: - list[~azure.mgmt.compute.v2019_03_01.models.VaultSecretGroup] - """ - - _attribute_map = { - 'custom_data': {'key': 'customData', 'type': 'str'}, - 'windows_configuration': {'key': 'windowsConfiguration', 'type': 'WindowsConfiguration'}, - 'linux_configuration': {'key': 'linuxConfiguration', 'type': 'LinuxConfiguration'}, - 'secrets': {'key': 'secrets', 'type': '[VaultSecretGroup]'}, - } - - def __init__(self, **kwargs): - super(VirtualMachineScaleSetUpdateOSProfile, self).__init__(**kwargs) - self.custom_data = kwargs.get('custom_data', None) - self.windows_configuration = kwargs.get('windows_configuration', None) - self.linux_configuration = kwargs.get('linux_configuration', None) - self.secrets = kwargs.get('secrets', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/virtual_machine_scale_set_update_os_profile_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/virtual_machine_scale_set_update_os_profile_py3.py deleted file mode 100644 index bc82bf469a07..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/virtual_machine_scale_set_update_os_profile_py3.py +++ /dev/null @@ -1,43 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineScaleSetUpdateOSProfile(Model): - """Describes a virtual machine scale set OS profile. - - :param custom_data: A base-64 encoded string of custom data. - :type custom_data: str - :param windows_configuration: The Windows Configuration of the OS profile. - :type windows_configuration: - ~azure.mgmt.compute.v2019_03_01.models.WindowsConfiguration - :param linux_configuration: The Linux Configuration of the OS profile. - :type linux_configuration: - ~azure.mgmt.compute.v2019_03_01.models.LinuxConfiguration - :param secrets: The List of certificates for addition to the VM. - :type secrets: - list[~azure.mgmt.compute.v2019_03_01.models.VaultSecretGroup] - """ - - _attribute_map = { - 'custom_data': {'key': 'customData', 'type': 'str'}, - 'windows_configuration': {'key': 'windowsConfiguration', 'type': 'WindowsConfiguration'}, - 'linux_configuration': {'key': 'linuxConfiguration', 'type': 'LinuxConfiguration'}, - 'secrets': {'key': 'secrets', 'type': '[VaultSecretGroup]'}, - } - - def __init__(self, *, custom_data: str=None, windows_configuration=None, linux_configuration=None, secrets=None, **kwargs) -> None: - super(VirtualMachineScaleSetUpdateOSProfile, self).__init__(**kwargs) - self.custom_data = custom_data - self.windows_configuration = windows_configuration - self.linux_configuration = linux_configuration - self.secrets = secrets diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/virtual_machine_scale_set_update_public_ip_address_configuration.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/virtual_machine_scale_set_update_public_ip_address_configuration.py deleted file mode 100644 index d19f074ff92b..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/virtual_machine_scale_set_update_public_ip_address_configuration.py +++ /dev/null @@ -1,39 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineScaleSetUpdatePublicIPAddressConfiguration(Model): - """Describes a virtual machines scale set IP Configuration's PublicIPAddress - configuration. - - :param name: The publicIP address configuration name. - :type name: str - :param idle_timeout_in_minutes: The idle timeout of the public IP address. - :type idle_timeout_in_minutes: int - :param dns_settings: The dns settings to be applied on the publicIP - addresses . - :type dns_settings: - ~azure.mgmt.compute.v2019_03_01.models.VirtualMachineScaleSetPublicIPAddressConfigurationDnsSettings - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'idle_timeout_in_minutes': {'key': 'properties.idleTimeoutInMinutes', 'type': 'int'}, - 'dns_settings': {'key': 'properties.dnsSettings', 'type': 'VirtualMachineScaleSetPublicIPAddressConfigurationDnsSettings'}, - } - - def __init__(self, **kwargs): - super(VirtualMachineScaleSetUpdatePublicIPAddressConfiguration, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.idle_timeout_in_minutes = kwargs.get('idle_timeout_in_minutes', None) - self.dns_settings = kwargs.get('dns_settings', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/virtual_machine_scale_set_update_public_ip_address_configuration_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/virtual_machine_scale_set_update_public_ip_address_configuration_py3.py deleted file mode 100644 index c3b0cdaee234..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/virtual_machine_scale_set_update_public_ip_address_configuration_py3.py +++ /dev/null @@ -1,39 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineScaleSetUpdatePublicIPAddressConfiguration(Model): - """Describes a virtual machines scale set IP Configuration's PublicIPAddress - configuration. - - :param name: The publicIP address configuration name. - :type name: str - :param idle_timeout_in_minutes: The idle timeout of the public IP address. - :type idle_timeout_in_minutes: int - :param dns_settings: The dns settings to be applied on the publicIP - addresses . - :type dns_settings: - ~azure.mgmt.compute.v2019_03_01.models.VirtualMachineScaleSetPublicIPAddressConfigurationDnsSettings - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'idle_timeout_in_minutes': {'key': 'properties.idleTimeoutInMinutes', 'type': 'int'}, - 'dns_settings': {'key': 'properties.dnsSettings', 'type': 'VirtualMachineScaleSetPublicIPAddressConfigurationDnsSettings'}, - } - - def __init__(self, *, name: str=None, idle_timeout_in_minutes: int=None, dns_settings=None, **kwargs) -> None: - super(VirtualMachineScaleSetUpdatePublicIPAddressConfiguration, self).__init__(**kwargs) - self.name = name - self.idle_timeout_in_minutes = idle_timeout_in_minutes - self.dns_settings = dns_settings diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/virtual_machine_scale_set_update_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/virtual_machine_scale_set_update_py3.py deleted file mode 100644 index 25c3abb0ba58..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/virtual_machine_scale_set_update_py3.py +++ /dev/null @@ -1,69 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .update_resource_py3 import UpdateResource - - -class VirtualMachineScaleSetUpdate(UpdateResource): - """Describes a Virtual Machine Scale Set. - - :param tags: Resource tags - :type tags: dict[str, str] - :param sku: The virtual machine scale set sku. - :type sku: ~azure.mgmt.compute.v2019_03_01.models.Sku - :param plan: The purchase plan when deploying a virtual machine scale set - from VM Marketplace images. - :type plan: ~azure.mgmt.compute.v2019_03_01.models.Plan - :param upgrade_policy: The upgrade policy. - :type upgrade_policy: ~azure.mgmt.compute.v2019_03_01.models.UpgradePolicy - :param virtual_machine_profile: The virtual machine profile. - :type virtual_machine_profile: - ~azure.mgmt.compute.v2019_03_01.models.VirtualMachineScaleSetUpdateVMProfile - :param overprovision: Specifies whether the Virtual Machine Scale Set - should be overprovisioned. - :type overprovision: bool - :param single_placement_group: When true this limits the scale set to a - single placement group, of max size 100 virtual machines. - :type single_placement_group: bool - :param additional_capabilities: Specifies additional capabilities enabled - or disabled on the Virtual Machines in the Virtual Machine Scale Set. For - instance: whether the Virtual Machines have the capability to support - attaching managed data disks with UltraSSD_LRS storage account type. - :type additional_capabilities: - ~azure.mgmt.compute.v2019_03_01.models.AdditionalCapabilities - :param identity: The identity of the virtual machine scale set, if - configured. - :type identity: - ~azure.mgmt.compute.v2019_03_01.models.VirtualMachineScaleSetIdentity - """ - - _attribute_map = { - 'tags': {'key': 'tags', 'type': '{str}'}, - 'sku': {'key': 'sku', 'type': 'Sku'}, - 'plan': {'key': 'plan', 'type': 'Plan'}, - 'upgrade_policy': {'key': 'properties.upgradePolicy', 'type': 'UpgradePolicy'}, - 'virtual_machine_profile': {'key': 'properties.virtualMachineProfile', 'type': 'VirtualMachineScaleSetUpdateVMProfile'}, - 'overprovision': {'key': 'properties.overprovision', 'type': 'bool'}, - 'single_placement_group': {'key': 'properties.singlePlacementGroup', 'type': 'bool'}, - 'additional_capabilities': {'key': 'properties.additionalCapabilities', 'type': 'AdditionalCapabilities'}, - 'identity': {'key': 'identity', 'type': 'VirtualMachineScaleSetIdentity'}, - } - - def __init__(self, *, tags=None, sku=None, plan=None, upgrade_policy=None, virtual_machine_profile=None, overprovision: bool=None, single_placement_group: bool=None, additional_capabilities=None, identity=None, **kwargs) -> None: - super(VirtualMachineScaleSetUpdate, self).__init__(tags=tags, **kwargs) - self.sku = sku - self.plan = plan - self.upgrade_policy = upgrade_policy - self.virtual_machine_profile = virtual_machine_profile - self.overprovision = overprovision - self.single_placement_group = single_placement_group - self.additional_capabilities = additional_capabilities - self.identity = identity diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/virtual_machine_scale_set_update_storage_profile.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/virtual_machine_scale_set_update_storage_profile.py deleted file mode 100644 index 3415e28641ee..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/virtual_machine_scale_set_update_storage_profile.py +++ /dev/null @@ -1,39 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineScaleSetUpdateStorageProfile(Model): - """Describes a virtual machine scale set storage profile. - - :param image_reference: The image reference. - :type image_reference: - ~azure.mgmt.compute.v2019_03_01.models.ImageReference - :param os_disk: The OS disk. - :type os_disk: - ~azure.mgmt.compute.v2019_03_01.models.VirtualMachineScaleSetUpdateOSDisk - :param data_disks: The data disks. - :type data_disks: - list[~azure.mgmt.compute.v2019_03_01.models.VirtualMachineScaleSetDataDisk] - """ - - _attribute_map = { - 'image_reference': {'key': 'imageReference', 'type': 'ImageReference'}, - 'os_disk': {'key': 'osDisk', 'type': 'VirtualMachineScaleSetUpdateOSDisk'}, - 'data_disks': {'key': 'dataDisks', 'type': '[VirtualMachineScaleSetDataDisk]'}, - } - - def __init__(self, **kwargs): - super(VirtualMachineScaleSetUpdateStorageProfile, self).__init__(**kwargs) - self.image_reference = kwargs.get('image_reference', None) - self.os_disk = kwargs.get('os_disk', None) - self.data_disks = kwargs.get('data_disks', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/virtual_machine_scale_set_update_storage_profile_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/virtual_machine_scale_set_update_storage_profile_py3.py deleted file mode 100644 index 804517485d9e..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/virtual_machine_scale_set_update_storage_profile_py3.py +++ /dev/null @@ -1,39 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineScaleSetUpdateStorageProfile(Model): - """Describes a virtual machine scale set storage profile. - - :param image_reference: The image reference. - :type image_reference: - ~azure.mgmt.compute.v2019_03_01.models.ImageReference - :param os_disk: The OS disk. - :type os_disk: - ~azure.mgmt.compute.v2019_03_01.models.VirtualMachineScaleSetUpdateOSDisk - :param data_disks: The data disks. - :type data_disks: - list[~azure.mgmt.compute.v2019_03_01.models.VirtualMachineScaleSetDataDisk] - """ - - _attribute_map = { - 'image_reference': {'key': 'imageReference', 'type': 'ImageReference'}, - 'os_disk': {'key': 'osDisk', 'type': 'VirtualMachineScaleSetUpdateOSDisk'}, - 'data_disks': {'key': 'dataDisks', 'type': '[VirtualMachineScaleSetDataDisk]'}, - } - - def __init__(self, *, image_reference=None, os_disk=None, data_disks=None, **kwargs) -> None: - super(VirtualMachineScaleSetUpdateStorageProfile, self).__init__(**kwargs) - self.image_reference = image_reference - self.os_disk = os_disk - self.data_disks = data_disks diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/virtual_machine_scale_set_update_vm_profile.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/virtual_machine_scale_set_update_vm_profile.py deleted file mode 100644 index 1413397e5a29..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/virtual_machine_scale_set_update_vm_profile.py +++ /dev/null @@ -1,55 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineScaleSetUpdateVMProfile(Model): - """Describes a virtual machine scale set virtual machine profile. - - :param os_profile: The virtual machine scale set OS profile. - :type os_profile: - ~azure.mgmt.compute.v2019_03_01.models.VirtualMachineScaleSetUpdateOSProfile - :param storage_profile: The virtual machine scale set storage profile. - :type storage_profile: - ~azure.mgmt.compute.v2019_03_01.models.VirtualMachineScaleSetUpdateStorageProfile - :param network_profile: The virtual machine scale set network profile. - :type network_profile: - ~azure.mgmt.compute.v2019_03_01.models.VirtualMachineScaleSetUpdateNetworkProfile - :param diagnostics_profile: The virtual machine scale set diagnostics - profile. - :type diagnostics_profile: - ~azure.mgmt.compute.v2019_03_01.models.DiagnosticsProfile - :param extension_profile: The virtual machine scale set extension profile. - :type extension_profile: - ~azure.mgmt.compute.v2019_03_01.models.VirtualMachineScaleSetExtensionProfile - :param license_type: The license type, which is for bring your own license - scenario. - :type license_type: str - """ - - _attribute_map = { - 'os_profile': {'key': 'osProfile', 'type': 'VirtualMachineScaleSetUpdateOSProfile'}, - 'storage_profile': {'key': 'storageProfile', 'type': 'VirtualMachineScaleSetUpdateStorageProfile'}, - 'network_profile': {'key': 'networkProfile', 'type': 'VirtualMachineScaleSetUpdateNetworkProfile'}, - 'diagnostics_profile': {'key': 'diagnosticsProfile', 'type': 'DiagnosticsProfile'}, - 'extension_profile': {'key': 'extensionProfile', 'type': 'VirtualMachineScaleSetExtensionProfile'}, - 'license_type': {'key': 'licenseType', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(VirtualMachineScaleSetUpdateVMProfile, self).__init__(**kwargs) - self.os_profile = kwargs.get('os_profile', None) - self.storage_profile = kwargs.get('storage_profile', None) - self.network_profile = kwargs.get('network_profile', None) - self.diagnostics_profile = kwargs.get('diagnostics_profile', None) - self.extension_profile = kwargs.get('extension_profile', None) - self.license_type = kwargs.get('license_type', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/virtual_machine_scale_set_update_vm_profile_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/virtual_machine_scale_set_update_vm_profile_py3.py deleted file mode 100644 index 46586f29dd0c..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/virtual_machine_scale_set_update_vm_profile_py3.py +++ /dev/null @@ -1,55 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineScaleSetUpdateVMProfile(Model): - """Describes a virtual machine scale set virtual machine profile. - - :param os_profile: The virtual machine scale set OS profile. - :type os_profile: - ~azure.mgmt.compute.v2019_03_01.models.VirtualMachineScaleSetUpdateOSProfile - :param storage_profile: The virtual machine scale set storage profile. - :type storage_profile: - ~azure.mgmt.compute.v2019_03_01.models.VirtualMachineScaleSetUpdateStorageProfile - :param network_profile: The virtual machine scale set network profile. - :type network_profile: - ~azure.mgmt.compute.v2019_03_01.models.VirtualMachineScaleSetUpdateNetworkProfile - :param diagnostics_profile: The virtual machine scale set diagnostics - profile. - :type diagnostics_profile: - ~azure.mgmt.compute.v2019_03_01.models.DiagnosticsProfile - :param extension_profile: The virtual machine scale set extension profile. - :type extension_profile: - ~azure.mgmt.compute.v2019_03_01.models.VirtualMachineScaleSetExtensionProfile - :param license_type: The license type, which is for bring your own license - scenario. - :type license_type: str - """ - - _attribute_map = { - 'os_profile': {'key': 'osProfile', 'type': 'VirtualMachineScaleSetUpdateOSProfile'}, - 'storage_profile': {'key': 'storageProfile', 'type': 'VirtualMachineScaleSetUpdateStorageProfile'}, - 'network_profile': {'key': 'networkProfile', 'type': 'VirtualMachineScaleSetUpdateNetworkProfile'}, - 'diagnostics_profile': {'key': 'diagnosticsProfile', 'type': 'DiagnosticsProfile'}, - 'extension_profile': {'key': 'extensionProfile', 'type': 'VirtualMachineScaleSetExtensionProfile'}, - 'license_type': {'key': 'licenseType', 'type': 'str'}, - } - - def __init__(self, *, os_profile=None, storage_profile=None, network_profile=None, diagnostics_profile=None, extension_profile=None, license_type: str=None, **kwargs) -> None: - super(VirtualMachineScaleSetUpdateVMProfile, self).__init__(**kwargs) - self.os_profile = os_profile - self.storage_profile = storage_profile - self.network_profile = network_profile - self.diagnostics_profile = diagnostics_profile - self.extension_profile = extension_profile - self.license_type = license_type diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/virtual_machine_scale_set_vm.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/virtual_machine_scale_set_vm.py deleted file mode 100644 index 8304595956c6..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/virtual_machine_scale_set_vm.py +++ /dev/null @@ -1,187 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource import Resource - - -class VirtualMachineScaleSetVM(Resource): - """Describes a virtual machine scale set virtual machine. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource Id - :vartype id: str - :ivar name: Resource name - :vartype name: str - :ivar type: Resource type - :vartype type: str - :param location: Required. Resource location - :type location: str - :param tags: Resource tags - :type tags: dict[str, str] - :ivar instance_id: The virtual machine instance ID. - :vartype instance_id: str - :ivar sku: The virtual machine SKU. - :vartype sku: ~azure.mgmt.compute.v2019_03_01.models.Sku - :ivar latest_model_applied: Specifies whether the latest model has been - applied to the virtual machine. - :vartype latest_model_applied: bool - :ivar vm_id: Azure VM unique ID. - :vartype vm_id: str - :ivar instance_view: The virtual machine instance view. - :vartype instance_view: - ~azure.mgmt.compute.v2019_03_01.models.VirtualMachineScaleSetVMInstanceView - :param hardware_profile: Specifies the hardware settings for the virtual - machine. - :type hardware_profile: - ~azure.mgmt.compute.v2019_03_01.models.HardwareProfile - :param storage_profile: Specifies the storage settings for the virtual - machine disks. - :type storage_profile: - ~azure.mgmt.compute.v2019_03_01.models.StorageProfile - :param additional_capabilities: Specifies additional capabilities enabled - or disabled on the virtual machine in the scale set. For instance: whether - the virtual machine has the capability to support attaching managed data - disks with UltraSSD_LRS storage account type. - :type additional_capabilities: - ~azure.mgmt.compute.v2019_03_01.models.AdditionalCapabilities - :param os_profile: Specifies the operating system settings for the virtual - machine. - :type os_profile: ~azure.mgmt.compute.v2019_03_01.models.OSProfile - :param network_profile: Specifies the network interfaces of the virtual - machine. - :type network_profile: - ~azure.mgmt.compute.v2019_03_01.models.NetworkProfile - :param network_profile_configuration: Specifies the network profile - configuration of the virtual machine. - :type network_profile_configuration: - ~azure.mgmt.compute.v2019_03_01.models.VirtualMachineScaleSetVMNetworkProfileConfiguration - :param diagnostics_profile: Specifies the boot diagnostic settings state. -

    Minimum api-version: 2015-06-15. - :type diagnostics_profile: - ~azure.mgmt.compute.v2019_03_01.models.DiagnosticsProfile - :param availability_set: Specifies information about the availability set - that the virtual machine should be assigned to. Virtual machines specified - in the same availability set are allocated to different nodes to maximize - availability. For more information about availability sets, see [Manage - the availability of virtual - machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-manage-availability?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). -

    For more information on Azure planned maintenance, see [Planned - maintenance for virtual machines in - Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-planned-maintenance?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json) -

    Currently, a VM can only be added to availability set at creation - time. An existing VM cannot be added to an availability set. - :type availability_set: ~azure.mgmt.compute.v2019_03_01.models.SubResource - :ivar provisioning_state: The provisioning state, which only appears in - the response. - :vartype provisioning_state: str - :param license_type: Specifies that the image or disk that is being used - was licensed on-premises. This element is only used for images that - contain the Windows Server operating system.

    Possible values are: -

    Windows_Client

    Windows_Server

    If this element - is included in a request for an update, the value must match the initial - value. This value cannot be updated.

    For more information, see - [Azure Hybrid Use Benefit for Windows - Server](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-hybrid-use-benefit-licensing?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json) -

    Minimum api-version: 2015-06-15 - :type license_type: str - :ivar model_definition_applied: Specifies whether the model applied to the - virtual machine is the model of the virtual machine scale set or the - customized model for the virtual machine. - :vartype model_definition_applied: str - :param protection_policy: Specifies the protection policy of the virtual - machine. - :type protection_policy: - ~azure.mgmt.compute.v2019_03_01.models.VirtualMachineScaleSetVMProtectionPolicy - :param plan: Specifies information about the marketplace image used to - create the virtual machine. This element is only used for marketplace - images. Before you can use a marketplace image from an API, you must - enable the image for programmatic use. In the Azure portal, find the - marketplace image that you want to use and then click **Want to deploy - programmatically, Get Started ->**. Enter any required information and - then click **Save**. - :type plan: ~azure.mgmt.compute.v2019_03_01.models.Plan - :ivar resources: The virtual machine child extension resources. - :vartype resources: - list[~azure.mgmt.compute.v2019_03_01.models.VirtualMachineExtension] - :ivar zones: The virtual machine zones. - :vartype zones: list[str] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - 'instance_id': {'readonly': True}, - 'sku': {'readonly': True}, - 'latest_model_applied': {'readonly': True}, - 'vm_id': {'readonly': True}, - 'instance_view': {'readonly': True}, - 'provisioning_state': {'readonly': True}, - 'model_definition_applied': {'readonly': True}, - 'resources': {'readonly': True}, - 'zones': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'instance_id': {'key': 'instanceId', 'type': 'str'}, - 'sku': {'key': 'sku', 'type': 'Sku'}, - 'latest_model_applied': {'key': 'properties.latestModelApplied', 'type': 'bool'}, - 'vm_id': {'key': 'properties.vmId', 'type': 'str'}, - 'instance_view': {'key': 'properties.instanceView', 'type': 'VirtualMachineScaleSetVMInstanceView'}, - 'hardware_profile': {'key': 'properties.hardwareProfile', 'type': 'HardwareProfile'}, - 'storage_profile': {'key': 'properties.storageProfile', 'type': 'StorageProfile'}, - 'additional_capabilities': {'key': 'properties.additionalCapabilities', 'type': 'AdditionalCapabilities'}, - 'os_profile': {'key': 'properties.osProfile', 'type': 'OSProfile'}, - 'network_profile': {'key': 'properties.networkProfile', 'type': 'NetworkProfile'}, - 'network_profile_configuration': {'key': 'properties.networkProfileConfiguration', 'type': 'VirtualMachineScaleSetVMNetworkProfileConfiguration'}, - 'diagnostics_profile': {'key': 'properties.diagnosticsProfile', 'type': 'DiagnosticsProfile'}, - 'availability_set': {'key': 'properties.availabilitySet', 'type': 'SubResource'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'license_type': {'key': 'properties.licenseType', 'type': 'str'}, - 'model_definition_applied': {'key': 'properties.modelDefinitionApplied', 'type': 'str'}, - 'protection_policy': {'key': 'properties.protectionPolicy', 'type': 'VirtualMachineScaleSetVMProtectionPolicy'}, - 'plan': {'key': 'plan', 'type': 'Plan'}, - 'resources': {'key': 'resources', 'type': '[VirtualMachineExtension]'}, - 'zones': {'key': 'zones', 'type': '[str]'}, - } - - def __init__(self, **kwargs): - super(VirtualMachineScaleSetVM, self).__init__(**kwargs) - self.instance_id = None - self.sku = None - self.latest_model_applied = None - self.vm_id = None - self.instance_view = None - self.hardware_profile = kwargs.get('hardware_profile', None) - self.storage_profile = kwargs.get('storage_profile', None) - self.additional_capabilities = kwargs.get('additional_capabilities', None) - self.os_profile = kwargs.get('os_profile', None) - self.network_profile = kwargs.get('network_profile', None) - self.network_profile_configuration = kwargs.get('network_profile_configuration', None) - self.diagnostics_profile = kwargs.get('diagnostics_profile', None) - self.availability_set = kwargs.get('availability_set', None) - self.provisioning_state = None - self.license_type = kwargs.get('license_type', None) - self.model_definition_applied = None - self.protection_policy = kwargs.get('protection_policy', None) - self.plan = kwargs.get('plan', None) - self.resources = None - self.zones = None diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/virtual_machine_scale_set_vm_extensions_summary.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/virtual_machine_scale_set_vm_extensions_summary.py deleted file mode 100644 index d2ffb63327c1..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/virtual_machine_scale_set_vm_extensions_summary.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineScaleSetVMExtensionsSummary(Model): - """Extensions summary for virtual machines of a virtual machine scale set. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar name: The extension name. - :vartype name: str - :ivar statuses_summary: The extensions information. - :vartype statuses_summary: - list[~azure.mgmt.compute.v2019_03_01.models.VirtualMachineStatusCodeCount] - """ - - _validation = { - 'name': {'readonly': True}, - 'statuses_summary': {'readonly': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'statuses_summary': {'key': 'statusesSummary', 'type': '[VirtualMachineStatusCodeCount]'}, - } - - def __init__(self, **kwargs): - super(VirtualMachineScaleSetVMExtensionsSummary, self).__init__(**kwargs) - self.name = None - self.statuses_summary = None diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/virtual_machine_scale_set_vm_extensions_summary_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/virtual_machine_scale_set_vm_extensions_summary_py3.py deleted file mode 100644 index 5fc37a0342db..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/virtual_machine_scale_set_vm_extensions_summary_py3.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineScaleSetVMExtensionsSummary(Model): - """Extensions summary for virtual machines of a virtual machine scale set. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar name: The extension name. - :vartype name: str - :ivar statuses_summary: The extensions information. - :vartype statuses_summary: - list[~azure.mgmt.compute.v2019_03_01.models.VirtualMachineStatusCodeCount] - """ - - _validation = { - 'name': {'readonly': True}, - 'statuses_summary': {'readonly': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'statuses_summary': {'key': 'statusesSummary', 'type': '[VirtualMachineStatusCodeCount]'}, - } - - def __init__(self, **kwargs) -> None: - super(VirtualMachineScaleSetVMExtensionsSummary, self).__init__(**kwargs) - self.name = None - self.statuses_summary = None diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/virtual_machine_scale_set_vm_instance_ids.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/virtual_machine_scale_set_vm_instance_ids.py deleted file mode 100644 index 772c66dad326..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/virtual_machine_scale_set_vm_instance_ids.py +++ /dev/null @@ -1,30 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineScaleSetVMInstanceIDs(Model): - """Specifies a list of virtual machine instance IDs from the VM scale set. - - :param instance_ids: The virtual machine scale set instance ids. Omitting - the virtual machine scale set instance ids will result in the operation - being performed on all virtual machines in the virtual machine scale set. - :type instance_ids: list[str] - """ - - _attribute_map = { - 'instance_ids': {'key': 'instanceIds', 'type': '[str]'}, - } - - def __init__(self, **kwargs): - super(VirtualMachineScaleSetVMInstanceIDs, self).__init__(**kwargs) - self.instance_ids = kwargs.get('instance_ids', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/virtual_machine_scale_set_vm_instance_ids_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/virtual_machine_scale_set_vm_instance_ids_py3.py deleted file mode 100644 index 658a8ccb87d5..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/virtual_machine_scale_set_vm_instance_ids_py3.py +++ /dev/null @@ -1,30 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineScaleSetVMInstanceIDs(Model): - """Specifies a list of virtual machine instance IDs from the VM scale set. - - :param instance_ids: The virtual machine scale set instance ids. Omitting - the virtual machine scale set instance ids will result in the operation - being performed on all virtual machines in the virtual machine scale set. - :type instance_ids: list[str] - """ - - _attribute_map = { - 'instance_ids': {'key': 'instanceIds', 'type': '[str]'}, - } - - def __init__(self, *, instance_ids=None, **kwargs) -> None: - super(VirtualMachineScaleSetVMInstanceIDs, self).__init__(**kwargs) - self.instance_ids = instance_ids diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/virtual_machine_scale_set_vm_instance_required_ids.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/virtual_machine_scale_set_vm_instance_required_ids.py deleted file mode 100644 index ece250dd4fd4..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/virtual_machine_scale_set_vm_instance_required_ids.py +++ /dev/null @@ -1,34 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineScaleSetVMInstanceRequiredIDs(Model): - """Specifies a list of virtual machine instance IDs from the VM scale set. - - All required parameters must be populated in order to send to Azure. - - :param instance_ids: Required. The virtual machine scale set instance ids. - :type instance_ids: list[str] - """ - - _validation = { - 'instance_ids': {'required': True}, - } - - _attribute_map = { - 'instance_ids': {'key': 'instanceIds', 'type': '[str]'}, - } - - def __init__(self, **kwargs): - super(VirtualMachineScaleSetVMInstanceRequiredIDs, self).__init__(**kwargs) - self.instance_ids = kwargs.get('instance_ids', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/virtual_machine_scale_set_vm_instance_required_ids_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/virtual_machine_scale_set_vm_instance_required_ids_py3.py deleted file mode 100644 index f32c6181467d..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/virtual_machine_scale_set_vm_instance_required_ids_py3.py +++ /dev/null @@ -1,34 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineScaleSetVMInstanceRequiredIDs(Model): - """Specifies a list of virtual machine instance IDs from the VM scale set. - - All required parameters must be populated in order to send to Azure. - - :param instance_ids: Required. The virtual machine scale set instance ids. - :type instance_ids: list[str] - """ - - _validation = { - 'instance_ids': {'required': True}, - } - - _attribute_map = { - 'instance_ids': {'key': 'instanceIds', 'type': '[str]'}, - } - - def __init__(self, *, instance_ids, **kwargs) -> None: - super(VirtualMachineScaleSetVMInstanceRequiredIDs, self).__init__(**kwargs) - self.instance_ids = instance_ids diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/virtual_machine_scale_set_vm_instance_view.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/virtual_machine_scale_set_vm_instance_view.py deleted file mode 100644 index e93fefade04b..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/virtual_machine_scale_set_vm_instance_view.py +++ /dev/null @@ -1,86 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineScaleSetVMInstanceView(Model): - """The instance view of a virtual machine scale set VM. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :param platform_update_domain: The Update Domain count. - :type platform_update_domain: int - :param platform_fault_domain: The Fault Domain count. - :type platform_fault_domain: int - :param rdp_thumb_print: The Remote desktop certificate thumbprint. - :type rdp_thumb_print: str - :param vm_agent: The VM Agent running on the virtual machine. - :type vm_agent: - ~azure.mgmt.compute.v2019_03_01.models.VirtualMachineAgentInstanceView - :param maintenance_redeploy_status: The Maintenance Operation status on - the virtual machine. - :type maintenance_redeploy_status: - ~azure.mgmt.compute.v2019_03_01.models.MaintenanceRedeployStatus - :param disks: The disks information. - :type disks: list[~azure.mgmt.compute.v2019_03_01.models.DiskInstanceView] - :param extensions: The extensions information. - :type extensions: - list[~azure.mgmt.compute.v2019_03_01.models.VirtualMachineExtensionInstanceView] - :ivar vm_health: The health status for the VM. - :vartype vm_health: - ~azure.mgmt.compute.v2019_03_01.models.VirtualMachineHealthStatus - :param boot_diagnostics: Boot Diagnostics is a debugging feature which - allows you to view Console Output and Screenshot to diagnose VM status. -

    You can easily view the output of your console log.

    - Azure also enables you to see a screenshot of the VM from the hypervisor. - :type boot_diagnostics: - ~azure.mgmt.compute.v2019_03_01.models.BootDiagnosticsInstanceView - :param statuses: The resource status information. - :type statuses: - list[~azure.mgmt.compute.v2019_03_01.models.InstanceViewStatus] - :param placement_group_id: The placement group in which the VM is running. - If the VM is deallocated it will not have a placementGroupId. - :type placement_group_id: str - """ - - _validation = { - 'vm_health': {'readonly': True}, - } - - _attribute_map = { - 'platform_update_domain': {'key': 'platformUpdateDomain', 'type': 'int'}, - 'platform_fault_domain': {'key': 'platformFaultDomain', 'type': 'int'}, - 'rdp_thumb_print': {'key': 'rdpThumbPrint', 'type': 'str'}, - 'vm_agent': {'key': 'vmAgent', 'type': 'VirtualMachineAgentInstanceView'}, - 'maintenance_redeploy_status': {'key': 'maintenanceRedeployStatus', 'type': 'MaintenanceRedeployStatus'}, - 'disks': {'key': 'disks', 'type': '[DiskInstanceView]'}, - 'extensions': {'key': 'extensions', 'type': '[VirtualMachineExtensionInstanceView]'}, - 'vm_health': {'key': 'vmHealth', 'type': 'VirtualMachineHealthStatus'}, - 'boot_diagnostics': {'key': 'bootDiagnostics', 'type': 'BootDiagnosticsInstanceView'}, - 'statuses': {'key': 'statuses', 'type': '[InstanceViewStatus]'}, - 'placement_group_id': {'key': 'placementGroupId', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(VirtualMachineScaleSetVMInstanceView, self).__init__(**kwargs) - self.platform_update_domain = kwargs.get('platform_update_domain', None) - self.platform_fault_domain = kwargs.get('platform_fault_domain', None) - self.rdp_thumb_print = kwargs.get('rdp_thumb_print', None) - self.vm_agent = kwargs.get('vm_agent', None) - self.maintenance_redeploy_status = kwargs.get('maintenance_redeploy_status', None) - self.disks = kwargs.get('disks', None) - self.extensions = kwargs.get('extensions', None) - self.vm_health = None - self.boot_diagnostics = kwargs.get('boot_diagnostics', None) - self.statuses = kwargs.get('statuses', None) - self.placement_group_id = kwargs.get('placement_group_id', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/virtual_machine_scale_set_vm_instance_view_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/virtual_machine_scale_set_vm_instance_view_py3.py deleted file mode 100644 index 6078bef1f950..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/virtual_machine_scale_set_vm_instance_view_py3.py +++ /dev/null @@ -1,86 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineScaleSetVMInstanceView(Model): - """The instance view of a virtual machine scale set VM. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :param platform_update_domain: The Update Domain count. - :type platform_update_domain: int - :param platform_fault_domain: The Fault Domain count. - :type platform_fault_domain: int - :param rdp_thumb_print: The Remote desktop certificate thumbprint. - :type rdp_thumb_print: str - :param vm_agent: The VM Agent running on the virtual machine. - :type vm_agent: - ~azure.mgmt.compute.v2019_03_01.models.VirtualMachineAgentInstanceView - :param maintenance_redeploy_status: The Maintenance Operation status on - the virtual machine. - :type maintenance_redeploy_status: - ~azure.mgmt.compute.v2019_03_01.models.MaintenanceRedeployStatus - :param disks: The disks information. - :type disks: list[~azure.mgmt.compute.v2019_03_01.models.DiskInstanceView] - :param extensions: The extensions information. - :type extensions: - list[~azure.mgmt.compute.v2019_03_01.models.VirtualMachineExtensionInstanceView] - :ivar vm_health: The health status for the VM. - :vartype vm_health: - ~azure.mgmt.compute.v2019_03_01.models.VirtualMachineHealthStatus - :param boot_diagnostics: Boot Diagnostics is a debugging feature which - allows you to view Console Output and Screenshot to diagnose VM status. -

    You can easily view the output of your console log.

    - Azure also enables you to see a screenshot of the VM from the hypervisor. - :type boot_diagnostics: - ~azure.mgmt.compute.v2019_03_01.models.BootDiagnosticsInstanceView - :param statuses: The resource status information. - :type statuses: - list[~azure.mgmt.compute.v2019_03_01.models.InstanceViewStatus] - :param placement_group_id: The placement group in which the VM is running. - If the VM is deallocated it will not have a placementGroupId. - :type placement_group_id: str - """ - - _validation = { - 'vm_health': {'readonly': True}, - } - - _attribute_map = { - 'platform_update_domain': {'key': 'platformUpdateDomain', 'type': 'int'}, - 'platform_fault_domain': {'key': 'platformFaultDomain', 'type': 'int'}, - 'rdp_thumb_print': {'key': 'rdpThumbPrint', 'type': 'str'}, - 'vm_agent': {'key': 'vmAgent', 'type': 'VirtualMachineAgentInstanceView'}, - 'maintenance_redeploy_status': {'key': 'maintenanceRedeployStatus', 'type': 'MaintenanceRedeployStatus'}, - 'disks': {'key': 'disks', 'type': '[DiskInstanceView]'}, - 'extensions': {'key': 'extensions', 'type': '[VirtualMachineExtensionInstanceView]'}, - 'vm_health': {'key': 'vmHealth', 'type': 'VirtualMachineHealthStatus'}, - 'boot_diagnostics': {'key': 'bootDiagnostics', 'type': 'BootDiagnosticsInstanceView'}, - 'statuses': {'key': 'statuses', 'type': '[InstanceViewStatus]'}, - 'placement_group_id': {'key': 'placementGroupId', 'type': 'str'}, - } - - def __init__(self, *, platform_update_domain: int=None, platform_fault_domain: int=None, rdp_thumb_print: str=None, vm_agent=None, maintenance_redeploy_status=None, disks=None, extensions=None, boot_diagnostics=None, statuses=None, placement_group_id: str=None, **kwargs) -> None: - super(VirtualMachineScaleSetVMInstanceView, self).__init__(**kwargs) - self.platform_update_domain = platform_update_domain - self.platform_fault_domain = platform_fault_domain - self.rdp_thumb_print = rdp_thumb_print - self.vm_agent = vm_agent - self.maintenance_redeploy_status = maintenance_redeploy_status - self.disks = disks - self.extensions = extensions - self.vm_health = None - self.boot_diagnostics = boot_diagnostics - self.statuses = statuses - self.placement_group_id = placement_group_id diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/virtual_machine_scale_set_vm_network_profile_configuration.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/virtual_machine_scale_set_vm_network_profile_configuration.py deleted file mode 100644 index be47c71d981a..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/virtual_machine_scale_set_vm_network_profile_configuration.py +++ /dev/null @@ -1,30 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineScaleSetVMNetworkProfileConfiguration(Model): - """Describes a virtual machine scale set VM network profile. - - :param network_interface_configurations: The list of network - configurations. - :type network_interface_configurations: - list[~azure.mgmt.compute.v2019_03_01.models.VirtualMachineScaleSetNetworkConfiguration] - """ - - _attribute_map = { - 'network_interface_configurations': {'key': 'networkInterfaceConfigurations', 'type': '[VirtualMachineScaleSetNetworkConfiguration]'}, - } - - def __init__(self, **kwargs): - super(VirtualMachineScaleSetVMNetworkProfileConfiguration, self).__init__(**kwargs) - self.network_interface_configurations = kwargs.get('network_interface_configurations', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/virtual_machine_scale_set_vm_network_profile_configuration_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/virtual_machine_scale_set_vm_network_profile_configuration_py3.py deleted file mode 100644 index 07ff25762424..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/virtual_machine_scale_set_vm_network_profile_configuration_py3.py +++ /dev/null @@ -1,30 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineScaleSetVMNetworkProfileConfiguration(Model): - """Describes a virtual machine scale set VM network profile. - - :param network_interface_configurations: The list of network - configurations. - :type network_interface_configurations: - list[~azure.mgmt.compute.v2019_03_01.models.VirtualMachineScaleSetNetworkConfiguration] - """ - - _attribute_map = { - 'network_interface_configurations': {'key': 'networkInterfaceConfigurations', 'type': '[VirtualMachineScaleSetNetworkConfiguration]'}, - } - - def __init__(self, *, network_interface_configurations=None, **kwargs) -> None: - super(VirtualMachineScaleSetVMNetworkProfileConfiguration, self).__init__(**kwargs) - self.network_interface_configurations = network_interface_configurations diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/virtual_machine_scale_set_vm_paged.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/virtual_machine_scale_set_vm_paged.py deleted file mode 100644 index 233688875606..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/virtual_machine_scale_set_vm_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class VirtualMachineScaleSetVMPaged(Paged): - """ - A paging container for iterating over a list of :class:`VirtualMachineScaleSetVM ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[VirtualMachineScaleSetVM]'} - } - - def __init__(self, *args, **kwargs): - - super(VirtualMachineScaleSetVMPaged, self).__init__(*args, **kwargs) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/virtual_machine_scale_set_vm_profile.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/virtual_machine_scale_set_vm_profile.py deleted file mode 100644 index 1c3ad27979f8..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/virtual_machine_scale_set_vm_profile.py +++ /dev/null @@ -1,80 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineScaleSetVMProfile(Model): - """Describes a virtual machine scale set virtual machine profile. - - :param os_profile: Specifies the operating system settings for the virtual - machines in the scale set. - :type os_profile: - ~azure.mgmt.compute.v2019_03_01.models.VirtualMachineScaleSetOSProfile - :param storage_profile: Specifies the storage settings for the virtual - machine disks. - :type storage_profile: - ~azure.mgmt.compute.v2019_03_01.models.VirtualMachineScaleSetStorageProfile - :param network_profile: Specifies properties of the network interfaces of - the virtual machines in the scale set. - :type network_profile: - ~azure.mgmt.compute.v2019_03_01.models.VirtualMachineScaleSetNetworkProfile - :param diagnostics_profile: Specifies the boot diagnostic settings state. -

    Minimum api-version: 2015-06-15. - :type diagnostics_profile: - ~azure.mgmt.compute.v2019_03_01.models.DiagnosticsProfile - :param extension_profile: Specifies a collection of settings for - extensions installed on virtual machines in the scale set. - :type extension_profile: - ~azure.mgmt.compute.v2019_03_01.models.VirtualMachineScaleSetExtensionProfile - :param license_type: Specifies that the image or disk that is being used - was licensed on-premises. This element is only used for images that - contain the Windows Server operating system.

    Possible values are: -

    Windows_Client

    Windows_Server

    If this element - is included in a request for an update, the value must match the initial - value. This value cannot be updated.

    For more information, see - [Azure Hybrid Use Benefit for Windows - Server](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-hybrid-use-benefit-licensing?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json) -

    Minimum api-version: 2015-06-15 - :type license_type: str - :param priority: Specifies the priority for the virtual machines in the - scale set.

    Minimum api-version: 2017-10-30-preview. Possible - values include: 'Regular', 'Low' - :type priority: str or - ~azure.mgmt.compute.v2019_03_01.models.VirtualMachinePriorityTypes - :param eviction_policy: Specifies the eviction policy for virtual machines - in a low priority scale set.

    Minimum api-version: - 2017-10-30-preview. Possible values include: 'Deallocate', 'Delete' - :type eviction_policy: str or - ~azure.mgmt.compute.v2019_03_01.models.VirtualMachineEvictionPolicyTypes - """ - - _attribute_map = { - 'os_profile': {'key': 'osProfile', 'type': 'VirtualMachineScaleSetOSProfile'}, - 'storage_profile': {'key': 'storageProfile', 'type': 'VirtualMachineScaleSetStorageProfile'}, - 'network_profile': {'key': 'networkProfile', 'type': 'VirtualMachineScaleSetNetworkProfile'}, - 'diagnostics_profile': {'key': 'diagnosticsProfile', 'type': 'DiagnosticsProfile'}, - 'extension_profile': {'key': 'extensionProfile', 'type': 'VirtualMachineScaleSetExtensionProfile'}, - 'license_type': {'key': 'licenseType', 'type': 'str'}, - 'priority': {'key': 'priority', 'type': 'str'}, - 'eviction_policy': {'key': 'evictionPolicy', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(VirtualMachineScaleSetVMProfile, self).__init__(**kwargs) - self.os_profile = kwargs.get('os_profile', None) - self.storage_profile = kwargs.get('storage_profile', None) - self.network_profile = kwargs.get('network_profile', None) - self.diagnostics_profile = kwargs.get('diagnostics_profile', None) - self.extension_profile = kwargs.get('extension_profile', None) - self.license_type = kwargs.get('license_type', None) - self.priority = kwargs.get('priority', None) - self.eviction_policy = kwargs.get('eviction_policy', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/virtual_machine_scale_set_vm_profile_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/virtual_machine_scale_set_vm_profile_py3.py deleted file mode 100644 index 095f012b83fd..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/virtual_machine_scale_set_vm_profile_py3.py +++ /dev/null @@ -1,80 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineScaleSetVMProfile(Model): - """Describes a virtual machine scale set virtual machine profile. - - :param os_profile: Specifies the operating system settings for the virtual - machines in the scale set. - :type os_profile: - ~azure.mgmt.compute.v2019_03_01.models.VirtualMachineScaleSetOSProfile - :param storage_profile: Specifies the storage settings for the virtual - machine disks. - :type storage_profile: - ~azure.mgmt.compute.v2019_03_01.models.VirtualMachineScaleSetStorageProfile - :param network_profile: Specifies properties of the network interfaces of - the virtual machines in the scale set. - :type network_profile: - ~azure.mgmt.compute.v2019_03_01.models.VirtualMachineScaleSetNetworkProfile - :param diagnostics_profile: Specifies the boot diagnostic settings state. -

    Minimum api-version: 2015-06-15. - :type diagnostics_profile: - ~azure.mgmt.compute.v2019_03_01.models.DiagnosticsProfile - :param extension_profile: Specifies a collection of settings for - extensions installed on virtual machines in the scale set. - :type extension_profile: - ~azure.mgmt.compute.v2019_03_01.models.VirtualMachineScaleSetExtensionProfile - :param license_type: Specifies that the image or disk that is being used - was licensed on-premises. This element is only used for images that - contain the Windows Server operating system.

    Possible values are: -

    Windows_Client

    Windows_Server

    If this element - is included in a request for an update, the value must match the initial - value. This value cannot be updated.

    For more information, see - [Azure Hybrid Use Benefit for Windows - Server](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-hybrid-use-benefit-licensing?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json) -

    Minimum api-version: 2015-06-15 - :type license_type: str - :param priority: Specifies the priority for the virtual machines in the - scale set.

    Minimum api-version: 2017-10-30-preview. Possible - values include: 'Regular', 'Low' - :type priority: str or - ~azure.mgmt.compute.v2019_03_01.models.VirtualMachinePriorityTypes - :param eviction_policy: Specifies the eviction policy for virtual machines - in a low priority scale set.

    Minimum api-version: - 2017-10-30-preview. Possible values include: 'Deallocate', 'Delete' - :type eviction_policy: str or - ~azure.mgmt.compute.v2019_03_01.models.VirtualMachineEvictionPolicyTypes - """ - - _attribute_map = { - 'os_profile': {'key': 'osProfile', 'type': 'VirtualMachineScaleSetOSProfile'}, - 'storage_profile': {'key': 'storageProfile', 'type': 'VirtualMachineScaleSetStorageProfile'}, - 'network_profile': {'key': 'networkProfile', 'type': 'VirtualMachineScaleSetNetworkProfile'}, - 'diagnostics_profile': {'key': 'diagnosticsProfile', 'type': 'DiagnosticsProfile'}, - 'extension_profile': {'key': 'extensionProfile', 'type': 'VirtualMachineScaleSetExtensionProfile'}, - 'license_type': {'key': 'licenseType', 'type': 'str'}, - 'priority': {'key': 'priority', 'type': 'str'}, - 'eviction_policy': {'key': 'evictionPolicy', 'type': 'str'}, - } - - def __init__(self, *, os_profile=None, storage_profile=None, network_profile=None, diagnostics_profile=None, extension_profile=None, license_type: str=None, priority=None, eviction_policy=None, **kwargs) -> None: - super(VirtualMachineScaleSetVMProfile, self).__init__(**kwargs) - self.os_profile = os_profile - self.storage_profile = storage_profile - self.network_profile = network_profile - self.diagnostics_profile = diagnostics_profile - self.extension_profile = extension_profile - self.license_type = license_type - self.priority = priority - self.eviction_policy = eviction_policy diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/virtual_machine_scale_set_vm_protection_policy.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/virtual_machine_scale_set_vm_protection_policy.py deleted file mode 100644 index b19b42eb3168..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/virtual_machine_scale_set_vm_protection_policy.py +++ /dev/null @@ -1,35 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineScaleSetVMProtectionPolicy(Model): - """The protection policy of a virtual machine scale set VM. - - :param protect_from_scale_in: Indicates that the virtual machine scale set - VM shouldn't be considered for deletion during a scale-in operation. - :type protect_from_scale_in: bool - :param protect_from_scale_set_actions: Indicates that model updates or - actions (including scale-in) initiated on the virtual machine scale set - should not be applied to the virtual machine scale set VM. - :type protect_from_scale_set_actions: bool - """ - - _attribute_map = { - 'protect_from_scale_in': {'key': 'protectFromScaleIn', 'type': 'bool'}, - 'protect_from_scale_set_actions': {'key': 'protectFromScaleSetActions', 'type': 'bool'}, - } - - def __init__(self, **kwargs): - super(VirtualMachineScaleSetVMProtectionPolicy, self).__init__(**kwargs) - self.protect_from_scale_in = kwargs.get('protect_from_scale_in', None) - self.protect_from_scale_set_actions = kwargs.get('protect_from_scale_set_actions', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/virtual_machine_scale_set_vm_protection_policy_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/virtual_machine_scale_set_vm_protection_policy_py3.py deleted file mode 100644 index 33b92f0a0ff3..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/virtual_machine_scale_set_vm_protection_policy_py3.py +++ /dev/null @@ -1,35 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineScaleSetVMProtectionPolicy(Model): - """The protection policy of a virtual machine scale set VM. - - :param protect_from_scale_in: Indicates that the virtual machine scale set - VM shouldn't be considered for deletion during a scale-in operation. - :type protect_from_scale_in: bool - :param protect_from_scale_set_actions: Indicates that model updates or - actions (including scale-in) initiated on the virtual machine scale set - should not be applied to the virtual machine scale set VM. - :type protect_from_scale_set_actions: bool - """ - - _attribute_map = { - 'protect_from_scale_in': {'key': 'protectFromScaleIn', 'type': 'bool'}, - 'protect_from_scale_set_actions': {'key': 'protectFromScaleSetActions', 'type': 'bool'}, - } - - def __init__(self, *, protect_from_scale_in: bool=None, protect_from_scale_set_actions: bool=None, **kwargs) -> None: - super(VirtualMachineScaleSetVMProtectionPolicy, self).__init__(**kwargs) - self.protect_from_scale_in = protect_from_scale_in - self.protect_from_scale_set_actions = protect_from_scale_set_actions diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/virtual_machine_scale_set_vm_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/virtual_machine_scale_set_vm_py3.py deleted file mode 100644 index cbab53b3d34f..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/virtual_machine_scale_set_vm_py3.py +++ /dev/null @@ -1,187 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource_py3 import Resource - - -class VirtualMachineScaleSetVM(Resource): - """Describes a virtual machine scale set virtual machine. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource Id - :vartype id: str - :ivar name: Resource name - :vartype name: str - :ivar type: Resource type - :vartype type: str - :param location: Required. Resource location - :type location: str - :param tags: Resource tags - :type tags: dict[str, str] - :ivar instance_id: The virtual machine instance ID. - :vartype instance_id: str - :ivar sku: The virtual machine SKU. - :vartype sku: ~azure.mgmt.compute.v2019_03_01.models.Sku - :ivar latest_model_applied: Specifies whether the latest model has been - applied to the virtual machine. - :vartype latest_model_applied: bool - :ivar vm_id: Azure VM unique ID. - :vartype vm_id: str - :ivar instance_view: The virtual machine instance view. - :vartype instance_view: - ~azure.mgmt.compute.v2019_03_01.models.VirtualMachineScaleSetVMInstanceView - :param hardware_profile: Specifies the hardware settings for the virtual - machine. - :type hardware_profile: - ~azure.mgmt.compute.v2019_03_01.models.HardwareProfile - :param storage_profile: Specifies the storage settings for the virtual - machine disks. - :type storage_profile: - ~azure.mgmt.compute.v2019_03_01.models.StorageProfile - :param additional_capabilities: Specifies additional capabilities enabled - or disabled on the virtual machine in the scale set. For instance: whether - the virtual machine has the capability to support attaching managed data - disks with UltraSSD_LRS storage account type. - :type additional_capabilities: - ~azure.mgmt.compute.v2019_03_01.models.AdditionalCapabilities - :param os_profile: Specifies the operating system settings for the virtual - machine. - :type os_profile: ~azure.mgmt.compute.v2019_03_01.models.OSProfile - :param network_profile: Specifies the network interfaces of the virtual - machine. - :type network_profile: - ~azure.mgmt.compute.v2019_03_01.models.NetworkProfile - :param network_profile_configuration: Specifies the network profile - configuration of the virtual machine. - :type network_profile_configuration: - ~azure.mgmt.compute.v2019_03_01.models.VirtualMachineScaleSetVMNetworkProfileConfiguration - :param diagnostics_profile: Specifies the boot diagnostic settings state. -

    Minimum api-version: 2015-06-15. - :type diagnostics_profile: - ~azure.mgmt.compute.v2019_03_01.models.DiagnosticsProfile - :param availability_set: Specifies information about the availability set - that the virtual machine should be assigned to. Virtual machines specified - in the same availability set are allocated to different nodes to maximize - availability. For more information about availability sets, see [Manage - the availability of virtual - machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-manage-availability?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). -

    For more information on Azure planned maintenance, see [Planned - maintenance for virtual machines in - Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-planned-maintenance?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json) -

    Currently, a VM can only be added to availability set at creation - time. An existing VM cannot be added to an availability set. - :type availability_set: ~azure.mgmt.compute.v2019_03_01.models.SubResource - :ivar provisioning_state: The provisioning state, which only appears in - the response. - :vartype provisioning_state: str - :param license_type: Specifies that the image or disk that is being used - was licensed on-premises. This element is only used for images that - contain the Windows Server operating system.

    Possible values are: -

    Windows_Client

    Windows_Server

    If this element - is included in a request for an update, the value must match the initial - value. This value cannot be updated.

    For more information, see - [Azure Hybrid Use Benefit for Windows - Server](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-hybrid-use-benefit-licensing?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json) -

    Minimum api-version: 2015-06-15 - :type license_type: str - :ivar model_definition_applied: Specifies whether the model applied to the - virtual machine is the model of the virtual machine scale set or the - customized model for the virtual machine. - :vartype model_definition_applied: str - :param protection_policy: Specifies the protection policy of the virtual - machine. - :type protection_policy: - ~azure.mgmt.compute.v2019_03_01.models.VirtualMachineScaleSetVMProtectionPolicy - :param plan: Specifies information about the marketplace image used to - create the virtual machine. This element is only used for marketplace - images. Before you can use a marketplace image from an API, you must - enable the image for programmatic use. In the Azure portal, find the - marketplace image that you want to use and then click **Want to deploy - programmatically, Get Started ->**. Enter any required information and - then click **Save**. - :type plan: ~azure.mgmt.compute.v2019_03_01.models.Plan - :ivar resources: The virtual machine child extension resources. - :vartype resources: - list[~azure.mgmt.compute.v2019_03_01.models.VirtualMachineExtension] - :ivar zones: The virtual machine zones. - :vartype zones: list[str] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - 'instance_id': {'readonly': True}, - 'sku': {'readonly': True}, - 'latest_model_applied': {'readonly': True}, - 'vm_id': {'readonly': True}, - 'instance_view': {'readonly': True}, - 'provisioning_state': {'readonly': True}, - 'model_definition_applied': {'readonly': True}, - 'resources': {'readonly': True}, - 'zones': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'instance_id': {'key': 'instanceId', 'type': 'str'}, - 'sku': {'key': 'sku', 'type': 'Sku'}, - 'latest_model_applied': {'key': 'properties.latestModelApplied', 'type': 'bool'}, - 'vm_id': {'key': 'properties.vmId', 'type': 'str'}, - 'instance_view': {'key': 'properties.instanceView', 'type': 'VirtualMachineScaleSetVMInstanceView'}, - 'hardware_profile': {'key': 'properties.hardwareProfile', 'type': 'HardwareProfile'}, - 'storage_profile': {'key': 'properties.storageProfile', 'type': 'StorageProfile'}, - 'additional_capabilities': {'key': 'properties.additionalCapabilities', 'type': 'AdditionalCapabilities'}, - 'os_profile': {'key': 'properties.osProfile', 'type': 'OSProfile'}, - 'network_profile': {'key': 'properties.networkProfile', 'type': 'NetworkProfile'}, - 'network_profile_configuration': {'key': 'properties.networkProfileConfiguration', 'type': 'VirtualMachineScaleSetVMNetworkProfileConfiguration'}, - 'diagnostics_profile': {'key': 'properties.diagnosticsProfile', 'type': 'DiagnosticsProfile'}, - 'availability_set': {'key': 'properties.availabilitySet', 'type': 'SubResource'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'license_type': {'key': 'properties.licenseType', 'type': 'str'}, - 'model_definition_applied': {'key': 'properties.modelDefinitionApplied', 'type': 'str'}, - 'protection_policy': {'key': 'properties.protectionPolicy', 'type': 'VirtualMachineScaleSetVMProtectionPolicy'}, - 'plan': {'key': 'plan', 'type': 'Plan'}, - 'resources': {'key': 'resources', 'type': '[VirtualMachineExtension]'}, - 'zones': {'key': 'zones', 'type': '[str]'}, - } - - def __init__(self, *, location: str, tags=None, hardware_profile=None, storage_profile=None, additional_capabilities=None, os_profile=None, network_profile=None, network_profile_configuration=None, diagnostics_profile=None, availability_set=None, license_type: str=None, protection_policy=None, plan=None, **kwargs) -> None: - super(VirtualMachineScaleSetVM, self).__init__(location=location, tags=tags, **kwargs) - self.instance_id = None - self.sku = None - self.latest_model_applied = None - self.vm_id = None - self.instance_view = None - self.hardware_profile = hardware_profile - self.storage_profile = storage_profile - self.additional_capabilities = additional_capabilities - self.os_profile = os_profile - self.network_profile = network_profile - self.network_profile_configuration = network_profile_configuration - self.diagnostics_profile = diagnostics_profile - self.availability_set = availability_set - self.provisioning_state = None - self.license_type = license_type - self.model_definition_applied = None - self.protection_policy = protection_policy - self.plan = plan - self.resources = None - self.zones = None diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/virtual_machine_scale_set_vm_reimage_parameters.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/virtual_machine_scale_set_vm_reimage_parameters.py deleted file mode 100644 index 811a1427369e..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/virtual_machine_scale_set_vm_reimage_parameters.py +++ /dev/null @@ -1,28 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .virtual_machine_reimage_parameters import VirtualMachineReimageParameters - - -class VirtualMachineScaleSetVMReimageParameters(VirtualMachineReimageParameters): - """Describes a Virtual Machine Scale Set VM Reimage Parameters. - - :param temp_disk: Specifies whether to reimage temp disk. Default value: - false. - :type temp_disk: bool - """ - - _attribute_map = { - 'temp_disk': {'key': 'tempDisk', 'type': 'bool'}, - } - - def __init__(self, **kwargs): - super(VirtualMachineScaleSetVMReimageParameters, self).__init__(**kwargs) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/virtual_machine_scale_set_vm_reimage_parameters_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/virtual_machine_scale_set_vm_reimage_parameters_py3.py deleted file mode 100644 index d30d5fd8fa86..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/virtual_machine_scale_set_vm_reimage_parameters_py3.py +++ /dev/null @@ -1,28 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .virtual_machine_reimage_parameters_py3 import VirtualMachineReimageParameters - - -class VirtualMachineScaleSetVMReimageParameters(VirtualMachineReimageParameters): - """Describes a Virtual Machine Scale Set VM Reimage Parameters. - - :param temp_disk: Specifies whether to reimage temp disk. Default value: - false. - :type temp_disk: bool - """ - - _attribute_map = { - 'temp_disk': {'key': 'tempDisk', 'type': 'bool'}, - } - - def __init__(self, *, temp_disk: bool=None, **kwargs) -> None: - super(VirtualMachineScaleSetVMReimageParameters, self).__init__(temp_disk=temp_disk, **kwargs) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/virtual_machine_size.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/virtual_machine_size.py deleted file mode 100644 index 0fef3efd6c8e..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/virtual_machine_size.py +++ /dev/null @@ -1,53 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineSize(Model): - """Describes the properties of a VM size. - - :param name: The name of the virtual machine size. - :type name: str - :param number_of_cores: The number of cores supported by the virtual - machine size. - :type number_of_cores: int - :param os_disk_size_in_mb: The OS disk size, in MB, allowed by the virtual - machine size. - :type os_disk_size_in_mb: int - :param resource_disk_size_in_mb: The resource disk size, in MB, allowed by - the virtual machine size. - :type resource_disk_size_in_mb: int - :param memory_in_mb: The amount of memory, in MB, supported by the virtual - machine size. - :type memory_in_mb: int - :param max_data_disk_count: The maximum number of data disks that can be - attached to the virtual machine size. - :type max_data_disk_count: int - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'number_of_cores': {'key': 'numberOfCores', 'type': 'int'}, - 'os_disk_size_in_mb': {'key': 'osDiskSizeInMB', 'type': 'int'}, - 'resource_disk_size_in_mb': {'key': 'resourceDiskSizeInMB', 'type': 'int'}, - 'memory_in_mb': {'key': 'memoryInMB', 'type': 'int'}, - 'max_data_disk_count': {'key': 'maxDataDiskCount', 'type': 'int'}, - } - - def __init__(self, **kwargs): - super(VirtualMachineSize, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.number_of_cores = kwargs.get('number_of_cores', None) - self.os_disk_size_in_mb = kwargs.get('os_disk_size_in_mb', None) - self.resource_disk_size_in_mb = kwargs.get('resource_disk_size_in_mb', None) - self.memory_in_mb = kwargs.get('memory_in_mb', None) - self.max_data_disk_count = kwargs.get('max_data_disk_count', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/virtual_machine_size_paged.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/virtual_machine_size_paged.py deleted file mode 100644 index bec5927bed6a..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/virtual_machine_size_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class VirtualMachineSizePaged(Paged): - """ - A paging container for iterating over a list of :class:`VirtualMachineSize ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[VirtualMachineSize]'} - } - - def __init__(self, *args, **kwargs): - - super(VirtualMachineSizePaged, self).__init__(*args, **kwargs) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/virtual_machine_size_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/virtual_machine_size_py3.py deleted file mode 100644 index 9f99ba20ce42..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/virtual_machine_size_py3.py +++ /dev/null @@ -1,53 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineSize(Model): - """Describes the properties of a VM size. - - :param name: The name of the virtual machine size. - :type name: str - :param number_of_cores: The number of cores supported by the virtual - machine size. - :type number_of_cores: int - :param os_disk_size_in_mb: The OS disk size, in MB, allowed by the virtual - machine size. - :type os_disk_size_in_mb: int - :param resource_disk_size_in_mb: The resource disk size, in MB, allowed by - the virtual machine size. - :type resource_disk_size_in_mb: int - :param memory_in_mb: The amount of memory, in MB, supported by the virtual - machine size. - :type memory_in_mb: int - :param max_data_disk_count: The maximum number of data disks that can be - attached to the virtual machine size. - :type max_data_disk_count: int - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'number_of_cores': {'key': 'numberOfCores', 'type': 'int'}, - 'os_disk_size_in_mb': {'key': 'osDiskSizeInMB', 'type': 'int'}, - 'resource_disk_size_in_mb': {'key': 'resourceDiskSizeInMB', 'type': 'int'}, - 'memory_in_mb': {'key': 'memoryInMB', 'type': 'int'}, - 'max_data_disk_count': {'key': 'maxDataDiskCount', 'type': 'int'}, - } - - def __init__(self, *, name: str=None, number_of_cores: int=None, os_disk_size_in_mb: int=None, resource_disk_size_in_mb: int=None, memory_in_mb: int=None, max_data_disk_count: int=None, **kwargs) -> None: - super(VirtualMachineSize, self).__init__(**kwargs) - self.name = name - self.number_of_cores = number_of_cores - self.os_disk_size_in_mb = os_disk_size_in_mb - self.resource_disk_size_in_mb = resource_disk_size_in_mb - self.memory_in_mb = memory_in_mb - self.max_data_disk_count = max_data_disk_count diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/virtual_machine_status_code_count.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/virtual_machine_status_code_count.py deleted file mode 100644 index 7df7b702acd7..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/virtual_machine_status_code_count.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineStatusCodeCount(Model): - """The status code and count of the virtual machine scale set instance view - status summary. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar code: The instance view status code. - :vartype code: str - :ivar count: The number of instances having a particular status code. - :vartype count: int - """ - - _validation = { - 'code': {'readonly': True}, - 'count': {'readonly': True}, - } - - _attribute_map = { - 'code': {'key': 'code', 'type': 'str'}, - 'count': {'key': 'count', 'type': 'int'}, - } - - def __init__(self, **kwargs): - super(VirtualMachineStatusCodeCount, self).__init__(**kwargs) - self.code = None - self.count = None diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/virtual_machine_status_code_count_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/virtual_machine_status_code_count_py3.py deleted file mode 100644 index c38800073a95..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/virtual_machine_status_code_count_py3.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualMachineStatusCodeCount(Model): - """The status code and count of the virtual machine scale set instance view - status summary. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar code: The instance view status code. - :vartype code: str - :ivar count: The number of instances having a particular status code. - :vartype count: int - """ - - _validation = { - 'code': {'readonly': True}, - 'count': {'readonly': True}, - } - - _attribute_map = { - 'code': {'key': 'code', 'type': 'str'}, - 'count': {'key': 'count', 'type': 'int'}, - } - - def __init__(self, **kwargs) -> None: - super(VirtualMachineStatusCodeCount, self).__init__(**kwargs) - self.code = None - self.count = None diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/virtual_machine_update.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/virtual_machine_update.py deleted file mode 100644 index a47cb35ff29d..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/virtual_machine_update.py +++ /dev/null @@ -1,139 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .update_resource import UpdateResource - - -class VirtualMachineUpdate(UpdateResource): - """Describes a Virtual Machine Update. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :param tags: Resource tags - :type tags: dict[str, str] - :param plan: Specifies information about the marketplace image used to - create the virtual machine. This element is only used for marketplace - images. Before you can use a marketplace image from an API, you must - enable the image for programmatic use. In the Azure portal, find the - marketplace image that you want to use and then click **Want to deploy - programmatically, Get Started ->**. Enter any required information and - then click **Save**. - :type plan: ~azure.mgmt.compute.v2019_03_01.models.Plan - :param hardware_profile: Specifies the hardware settings for the virtual - machine. - :type hardware_profile: - ~azure.mgmt.compute.v2019_03_01.models.HardwareProfile - :param storage_profile: Specifies the storage settings for the virtual - machine disks. - :type storage_profile: - ~azure.mgmt.compute.v2019_03_01.models.StorageProfile - :param additional_capabilities: Specifies additional capabilities enabled - or disabled on the virtual machine. - :type additional_capabilities: - ~azure.mgmt.compute.v2019_03_01.models.AdditionalCapabilities - :param os_profile: Specifies the operating system settings for the virtual - machine. - :type os_profile: ~azure.mgmt.compute.v2019_03_01.models.OSProfile - :param network_profile: Specifies the network interfaces of the virtual - machine. - :type network_profile: - ~azure.mgmt.compute.v2019_03_01.models.NetworkProfile - :param diagnostics_profile: Specifies the boot diagnostic settings state. -

    Minimum api-version: 2015-06-15. - :type diagnostics_profile: - ~azure.mgmt.compute.v2019_03_01.models.DiagnosticsProfile - :param availability_set: Specifies information about the availability set - that the virtual machine should be assigned to. Virtual machines specified - in the same availability set are allocated to different nodes to maximize - availability. For more information about availability sets, see [Manage - the availability of virtual - machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-manage-availability?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). -

    For more information on Azure planned maintenance, see [Planned - maintenance for virtual machines in - Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-planned-maintenance?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json) -

    Currently, a VM can only be added to availability set at creation - time. An existing VM cannot be added to an availability set. - :type availability_set: ~azure.mgmt.compute.v2019_03_01.models.SubResource - :param proximity_placement_group: Specifies information about the - proximity placement group that the virtual machine should be assigned to. -

    Minimum api-version: 2018-04-01. - :type proximity_placement_group: - ~azure.mgmt.compute.v2019_03_01.models.SubResource - :ivar provisioning_state: The provisioning state, which only appears in - the response. - :vartype provisioning_state: str - :ivar instance_view: The virtual machine instance view. - :vartype instance_view: - ~azure.mgmt.compute.v2019_03_01.models.VirtualMachineInstanceView - :param license_type: Specifies that the image or disk that is being used - was licensed on-premises. This element is only used for images that - contain the Windows Server operating system.

    Possible values are: -

    Windows_Client

    Windows_Server

    If this element - is included in a request for an update, the value must match the initial - value. This value cannot be updated.

    For more information, see - [Azure Hybrid Use Benefit for Windows - Server](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-hybrid-use-benefit-licensing?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json) -

    Minimum api-version: 2015-06-15 - :type license_type: str - :ivar vm_id: Specifies the VM unique ID which is a 128-bits identifier - that is encoded and stored in all Azure IaaS VMs SMBIOS and can be read - using platform BIOS commands. - :vartype vm_id: str - :param identity: The identity of the virtual machine, if configured. - :type identity: - ~azure.mgmt.compute.v2019_03_01.models.VirtualMachineIdentity - :param zones: The virtual machine zones. - :type zones: list[str] - """ - - _validation = { - 'provisioning_state': {'readonly': True}, - 'instance_view': {'readonly': True}, - 'vm_id': {'readonly': True}, - } - - _attribute_map = { - 'tags': {'key': 'tags', 'type': '{str}'}, - 'plan': {'key': 'plan', 'type': 'Plan'}, - 'hardware_profile': {'key': 'properties.hardwareProfile', 'type': 'HardwareProfile'}, - 'storage_profile': {'key': 'properties.storageProfile', 'type': 'StorageProfile'}, - 'additional_capabilities': {'key': 'properties.additionalCapabilities', 'type': 'AdditionalCapabilities'}, - 'os_profile': {'key': 'properties.osProfile', 'type': 'OSProfile'}, - 'network_profile': {'key': 'properties.networkProfile', 'type': 'NetworkProfile'}, - 'diagnostics_profile': {'key': 'properties.diagnosticsProfile', 'type': 'DiagnosticsProfile'}, - 'availability_set': {'key': 'properties.availabilitySet', 'type': 'SubResource'}, - 'proximity_placement_group': {'key': 'properties.proximityPlacementGroup', 'type': 'SubResource'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'instance_view': {'key': 'properties.instanceView', 'type': 'VirtualMachineInstanceView'}, - 'license_type': {'key': 'properties.licenseType', 'type': 'str'}, - 'vm_id': {'key': 'properties.vmId', 'type': 'str'}, - 'identity': {'key': 'identity', 'type': 'VirtualMachineIdentity'}, - 'zones': {'key': 'zones', 'type': '[str]'}, - } - - def __init__(self, **kwargs): - super(VirtualMachineUpdate, self).__init__(**kwargs) - self.plan = kwargs.get('plan', None) - self.hardware_profile = kwargs.get('hardware_profile', None) - self.storage_profile = kwargs.get('storage_profile', None) - self.additional_capabilities = kwargs.get('additional_capabilities', None) - self.os_profile = kwargs.get('os_profile', None) - self.network_profile = kwargs.get('network_profile', None) - self.diagnostics_profile = kwargs.get('diagnostics_profile', None) - self.availability_set = kwargs.get('availability_set', None) - self.proximity_placement_group = kwargs.get('proximity_placement_group', None) - self.provisioning_state = None - self.instance_view = None - self.license_type = kwargs.get('license_type', None) - self.vm_id = None - self.identity = kwargs.get('identity', None) - self.zones = kwargs.get('zones', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/virtual_machine_update_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/virtual_machine_update_py3.py deleted file mode 100644 index 96cbe2fc923b..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/virtual_machine_update_py3.py +++ /dev/null @@ -1,139 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .update_resource_py3 import UpdateResource - - -class VirtualMachineUpdate(UpdateResource): - """Describes a Virtual Machine Update. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :param tags: Resource tags - :type tags: dict[str, str] - :param plan: Specifies information about the marketplace image used to - create the virtual machine. This element is only used for marketplace - images. Before you can use a marketplace image from an API, you must - enable the image for programmatic use. In the Azure portal, find the - marketplace image that you want to use and then click **Want to deploy - programmatically, Get Started ->**. Enter any required information and - then click **Save**. - :type plan: ~azure.mgmt.compute.v2019_03_01.models.Plan - :param hardware_profile: Specifies the hardware settings for the virtual - machine. - :type hardware_profile: - ~azure.mgmt.compute.v2019_03_01.models.HardwareProfile - :param storage_profile: Specifies the storage settings for the virtual - machine disks. - :type storage_profile: - ~azure.mgmt.compute.v2019_03_01.models.StorageProfile - :param additional_capabilities: Specifies additional capabilities enabled - or disabled on the virtual machine. - :type additional_capabilities: - ~azure.mgmt.compute.v2019_03_01.models.AdditionalCapabilities - :param os_profile: Specifies the operating system settings for the virtual - machine. - :type os_profile: ~azure.mgmt.compute.v2019_03_01.models.OSProfile - :param network_profile: Specifies the network interfaces of the virtual - machine. - :type network_profile: - ~azure.mgmt.compute.v2019_03_01.models.NetworkProfile - :param diagnostics_profile: Specifies the boot diagnostic settings state. -

    Minimum api-version: 2015-06-15. - :type diagnostics_profile: - ~azure.mgmt.compute.v2019_03_01.models.DiagnosticsProfile - :param availability_set: Specifies information about the availability set - that the virtual machine should be assigned to. Virtual machines specified - in the same availability set are allocated to different nodes to maximize - availability. For more information about availability sets, see [Manage - the availability of virtual - machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-manage-availability?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). -

    For more information on Azure planned maintenance, see [Planned - maintenance for virtual machines in - Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-planned-maintenance?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json) -

    Currently, a VM can only be added to availability set at creation - time. An existing VM cannot be added to an availability set. - :type availability_set: ~azure.mgmt.compute.v2019_03_01.models.SubResource - :param proximity_placement_group: Specifies information about the - proximity placement group that the virtual machine should be assigned to. -

    Minimum api-version: 2018-04-01. - :type proximity_placement_group: - ~azure.mgmt.compute.v2019_03_01.models.SubResource - :ivar provisioning_state: The provisioning state, which only appears in - the response. - :vartype provisioning_state: str - :ivar instance_view: The virtual machine instance view. - :vartype instance_view: - ~azure.mgmt.compute.v2019_03_01.models.VirtualMachineInstanceView - :param license_type: Specifies that the image or disk that is being used - was licensed on-premises. This element is only used for images that - contain the Windows Server operating system.

    Possible values are: -

    Windows_Client

    Windows_Server

    If this element - is included in a request for an update, the value must match the initial - value. This value cannot be updated.

    For more information, see - [Azure Hybrid Use Benefit for Windows - Server](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-hybrid-use-benefit-licensing?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json) -

    Minimum api-version: 2015-06-15 - :type license_type: str - :ivar vm_id: Specifies the VM unique ID which is a 128-bits identifier - that is encoded and stored in all Azure IaaS VMs SMBIOS and can be read - using platform BIOS commands. - :vartype vm_id: str - :param identity: The identity of the virtual machine, if configured. - :type identity: - ~azure.mgmt.compute.v2019_03_01.models.VirtualMachineIdentity - :param zones: The virtual machine zones. - :type zones: list[str] - """ - - _validation = { - 'provisioning_state': {'readonly': True}, - 'instance_view': {'readonly': True}, - 'vm_id': {'readonly': True}, - } - - _attribute_map = { - 'tags': {'key': 'tags', 'type': '{str}'}, - 'plan': {'key': 'plan', 'type': 'Plan'}, - 'hardware_profile': {'key': 'properties.hardwareProfile', 'type': 'HardwareProfile'}, - 'storage_profile': {'key': 'properties.storageProfile', 'type': 'StorageProfile'}, - 'additional_capabilities': {'key': 'properties.additionalCapabilities', 'type': 'AdditionalCapabilities'}, - 'os_profile': {'key': 'properties.osProfile', 'type': 'OSProfile'}, - 'network_profile': {'key': 'properties.networkProfile', 'type': 'NetworkProfile'}, - 'diagnostics_profile': {'key': 'properties.diagnosticsProfile', 'type': 'DiagnosticsProfile'}, - 'availability_set': {'key': 'properties.availabilitySet', 'type': 'SubResource'}, - 'proximity_placement_group': {'key': 'properties.proximityPlacementGroup', 'type': 'SubResource'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'instance_view': {'key': 'properties.instanceView', 'type': 'VirtualMachineInstanceView'}, - 'license_type': {'key': 'properties.licenseType', 'type': 'str'}, - 'vm_id': {'key': 'properties.vmId', 'type': 'str'}, - 'identity': {'key': 'identity', 'type': 'VirtualMachineIdentity'}, - 'zones': {'key': 'zones', 'type': '[str]'}, - } - - def __init__(self, *, tags=None, plan=None, hardware_profile=None, storage_profile=None, additional_capabilities=None, os_profile=None, network_profile=None, diagnostics_profile=None, availability_set=None, proximity_placement_group=None, license_type: str=None, identity=None, zones=None, **kwargs) -> None: - super(VirtualMachineUpdate, self).__init__(tags=tags, **kwargs) - self.plan = plan - self.hardware_profile = hardware_profile - self.storage_profile = storage_profile - self.additional_capabilities = additional_capabilities - self.os_profile = os_profile - self.network_profile = network_profile - self.diagnostics_profile = diagnostics_profile - self.availability_set = availability_set - self.proximity_placement_group = proximity_placement_group - self.provisioning_state = None - self.instance_view = None - self.license_type = license_type - self.vm_id = None - self.identity = identity - self.zones = zones diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/vm_scale_set_convert_to_single_placement_group_input.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/vm_scale_set_convert_to_single_placement_group_input.py deleted file mode 100644 index c5cb6c3cdc8e..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/vm_scale_set_convert_to_single_placement_group_input.py +++ /dev/null @@ -1,32 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VMScaleSetConvertToSinglePlacementGroupInput(Model): - """VMScaleSetConvertToSinglePlacementGroupInput. - - :param active_placement_group_id: Id of the placement group in which you - want future virtual machine instances to be placed. To query placement - group Id, please use Virtual Machine Scale Set VMs - Get API. If not - provided, the platform will choose one with maximum number of virtual - machine instances. - :type active_placement_group_id: str - """ - - _attribute_map = { - 'active_placement_group_id': {'key': 'activePlacementGroupId', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(VMScaleSetConvertToSinglePlacementGroupInput, self).__init__(**kwargs) - self.active_placement_group_id = kwargs.get('active_placement_group_id', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/vm_scale_set_convert_to_single_placement_group_input_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/vm_scale_set_convert_to_single_placement_group_input_py3.py deleted file mode 100644 index 29d887e8016a..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/vm_scale_set_convert_to_single_placement_group_input_py3.py +++ /dev/null @@ -1,32 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VMScaleSetConvertToSinglePlacementGroupInput(Model): - """VMScaleSetConvertToSinglePlacementGroupInput. - - :param active_placement_group_id: Id of the placement group in which you - want future virtual machine instances to be placed. To query placement - group Id, please use Virtual Machine Scale Set VMs - Get API. If not - provided, the platform will choose one with maximum number of virtual - machine instances. - :type active_placement_group_id: str - """ - - _attribute_map = { - 'active_placement_group_id': {'key': 'activePlacementGroupId', 'type': 'str'}, - } - - def __init__(self, *, active_placement_group_id: str=None, **kwargs) -> None: - super(VMScaleSetConvertToSinglePlacementGroupInput, self).__init__(**kwargs) - self.active_placement_group_id = active_placement_group_id diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/win_rm_configuration.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/win_rm_configuration.py deleted file mode 100644 index af902125013a..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/win_rm_configuration.py +++ /dev/null @@ -1,29 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class WinRMConfiguration(Model): - """Describes Windows Remote Management configuration of the VM. - - :param listeners: The list of Windows Remote Management listeners - :type listeners: - list[~azure.mgmt.compute.v2019_03_01.models.WinRMListener] - """ - - _attribute_map = { - 'listeners': {'key': 'listeners', 'type': '[WinRMListener]'}, - } - - def __init__(self, **kwargs): - super(WinRMConfiguration, self).__init__(**kwargs) - self.listeners = kwargs.get('listeners', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/win_rm_configuration_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/win_rm_configuration_py3.py deleted file mode 100644 index 6f977e223a1f..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/win_rm_configuration_py3.py +++ /dev/null @@ -1,29 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class WinRMConfiguration(Model): - """Describes Windows Remote Management configuration of the VM. - - :param listeners: The list of Windows Remote Management listeners - :type listeners: - list[~azure.mgmt.compute.v2019_03_01.models.WinRMListener] - """ - - _attribute_map = { - 'listeners': {'key': 'listeners', 'type': '[WinRMListener]'}, - } - - def __init__(self, *, listeners=None, **kwargs) -> None: - super(WinRMConfiguration, self).__init__(**kwargs) - self.listeners = listeners diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/win_rm_listener.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/win_rm_listener.py deleted file mode 100644 index 95aa196dac83..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/win_rm_listener.py +++ /dev/null @@ -1,42 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class WinRMListener(Model): - """Describes Protocol and thumbprint of Windows Remote Management listener. - - :param protocol: Specifies the protocol of listener.

    Possible - values are:
    **http**

    **https**. Possible values include: - 'Http', 'Https' - :type protocol: str or - ~azure.mgmt.compute.v2019_03_01.models.ProtocolTypes - :param certificate_url: This is the URL of a certificate that has been - uploaded to Key Vault as a secret. For adding a secret to the Key Vault, - see [Add a key or secret to the key - vault](https://docs.microsoft.com/azure/key-vault/key-vault-get-started/#add). - In this case, your certificate needs to be It is the Base64 encoding of - the following JSON Object which is encoded in UTF-8:

    {
    - "data":"",
    "dataType":"pfx",
    - "password":""
    } - :type certificate_url: str - """ - - _attribute_map = { - 'protocol': {'key': 'protocol', 'type': 'ProtocolTypes'}, - 'certificate_url': {'key': 'certificateUrl', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(WinRMListener, self).__init__(**kwargs) - self.protocol = kwargs.get('protocol', None) - self.certificate_url = kwargs.get('certificate_url', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/win_rm_listener_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/win_rm_listener_py3.py deleted file mode 100644 index 05de54f286bd..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/win_rm_listener_py3.py +++ /dev/null @@ -1,42 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class WinRMListener(Model): - """Describes Protocol and thumbprint of Windows Remote Management listener. - - :param protocol: Specifies the protocol of listener.

    Possible - values are:
    **http**

    **https**. Possible values include: - 'Http', 'Https' - :type protocol: str or - ~azure.mgmt.compute.v2019_03_01.models.ProtocolTypes - :param certificate_url: This is the URL of a certificate that has been - uploaded to Key Vault as a secret. For adding a secret to the Key Vault, - see [Add a key or secret to the key - vault](https://docs.microsoft.com/azure/key-vault/key-vault-get-started/#add). - In this case, your certificate needs to be It is the Base64 encoding of - the following JSON Object which is encoded in UTF-8:

    {
    - "data":"",
    "dataType":"pfx",
    - "password":""
    } - :type certificate_url: str - """ - - _attribute_map = { - 'protocol': {'key': 'protocol', 'type': 'ProtocolTypes'}, - 'certificate_url': {'key': 'certificateUrl', 'type': 'str'}, - } - - def __init__(self, *, protocol=None, certificate_url: str=None, **kwargs) -> None: - super(WinRMListener, self).__init__(**kwargs) - self.protocol = protocol - self.certificate_url = certificate_url diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/windows_configuration.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/windows_configuration.py deleted file mode 100644 index 8b612b81a4fe..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/windows_configuration.py +++ /dev/null @@ -1,56 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class WindowsConfiguration(Model): - """Specifies Windows operating system settings on the virtual machine. - - :param provision_vm_agent: Indicates whether virtual machine agent should - be provisioned on the virtual machine.

    When this property is not - specified in the request body, default behavior is to set it to true. - This will ensure that VM Agent is installed on the VM so that extensions - can be added to the VM later. - :type provision_vm_agent: bool - :param enable_automatic_updates: Indicates whether virtual machine is - enabled for automatic Windows updates. Default value is true.

    For - virtual machine scale sets, this property can be updated and updates will - take effect on OS reprovisioning. - :type enable_automatic_updates: bool - :param time_zone: Specifies the time zone of the virtual machine. e.g. - "Pacific Standard Time" - :type time_zone: str - :param additional_unattend_content: Specifies additional base-64 encoded - XML formatted information that can be included in the Unattend.xml file, - which is used by Windows Setup. - :type additional_unattend_content: - list[~azure.mgmt.compute.v2019_03_01.models.AdditionalUnattendContent] - :param win_rm: Specifies the Windows Remote Management listeners. This - enables remote Windows PowerShell. - :type win_rm: ~azure.mgmt.compute.v2019_03_01.models.WinRMConfiguration - """ - - _attribute_map = { - 'provision_vm_agent': {'key': 'provisionVMAgent', 'type': 'bool'}, - 'enable_automatic_updates': {'key': 'enableAutomaticUpdates', 'type': 'bool'}, - 'time_zone': {'key': 'timeZone', 'type': 'str'}, - 'additional_unattend_content': {'key': 'additionalUnattendContent', 'type': '[AdditionalUnattendContent]'}, - 'win_rm': {'key': 'winRM', 'type': 'WinRMConfiguration'}, - } - - def __init__(self, **kwargs): - super(WindowsConfiguration, self).__init__(**kwargs) - self.provision_vm_agent = kwargs.get('provision_vm_agent', None) - self.enable_automatic_updates = kwargs.get('enable_automatic_updates', None) - self.time_zone = kwargs.get('time_zone', None) - self.additional_unattend_content = kwargs.get('additional_unattend_content', None) - self.win_rm = kwargs.get('win_rm', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/windows_configuration_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/windows_configuration_py3.py deleted file mode 100644 index a5e9db624acd..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/windows_configuration_py3.py +++ /dev/null @@ -1,56 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class WindowsConfiguration(Model): - """Specifies Windows operating system settings on the virtual machine. - - :param provision_vm_agent: Indicates whether virtual machine agent should - be provisioned on the virtual machine.

    When this property is not - specified in the request body, default behavior is to set it to true. - This will ensure that VM Agent is installed on the VM so that extensions - can be added to the VM later. - :type provision_vm_agent: bool - :param enable_automatic_updates: Indicates whether virtual machine is - enabled for automatic Windows updates. Default value is true.

    For - virtual machine scale sets, this property can be updated and updates will - take effect on OS reprovisioning. - :type enable_automatic_updates: bool - :param time_zone: Specifies the time zone of the virtual machine. e.g. - "Pacific Standard Time" - :type time_zone: str - :param additional_unattend_content: Specifies additional base-64 encoded - XML formatted information that can be included in the Unattend.xml file, - which is used by Windows Setup. - :type additional_unattend_content: - list[~azure.mgmt.compute.v2019_03_01.models.AdditionalUnattendContent] - :param win_rm: Specifies the Windows Remote Management listeners. This - enables remote Windows PowerShell. - :type win_rm: ~azure.mgmt.compute.v2019_03_01.models.WinRMConfiguration - """ - - _attribute_map = { - 'provision_vm_agent': {'key': 'provisionVMAgent', 'type': 'bool'}, - 'enable_automatic_updates': {'key': 'enableAutomaticUpdates', 'type': 'bool'}, - 'time_zone': {'key': 'timeZone', 'type': 'str'}, - 'additional_unattend_content': {'key': 'additionalUnattendContent', 'type': '[AdditionalUnattendContent]'}, - 'win_rm': {'key': 'winRM', 'type': 'WinRMConfiguration'}, - } - - def __init__(self, *, provision_vm_agent: bool=None, enable_automatic_updates: bool=None, time_zone: str=None, additional_unattend_content=None, win_rm=None, **kwargs) -> None: - super(WindowsConfiguration, self).__init__(**kwargs) - self.provision_vm_agent = provision_vm_agent - self.enable_automatic_updates = enable_automatic_updates - self.time_zone = time_zone - self.additional_unattend_content = additional_unattend_content - self.win_rm = win_rm diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/operations/__init__.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/operations/__init__.py index f07e4b2e8c43..11fed6cb8382 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/operations/__init__.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/operations/__init__.py @@ -9,30 +9,36 @@ # regenerated. # -------------------------------------------------------------------------- -from .operations import Operations -from .availability_sets_operations import AvailabilitySetsOperations -from .proximity_placement_groups_operations import ProximityPlacementGroupsOperations -from .virtual_machine_extension_images_operations import VirtualMachineExtensionImagesOperations -from .virtual_machine_extensions_operations import VirtualMachineExtensionsOperations -from .virtual_machine_images_operations import VirtualMachineImagesOperations -from .usage_operations import UsageOperations -from .virtual_machines_operations import VirtualMachinesOperations -from .virtual_machine_sizes_operations import VirtualMachineSizesOperations -from .images_operations import ImagesOperations -from .virtual_machine_scale_sets_operations import VirtualMachineScaleSetsOperations -from .virtual_machine_scale_set_extensions_operations import VirtualMachineScaleSetExtensionsOperations -from .virtual_machine_scale_set_rolling_upgrades_operations import VirtualMachineScaleSetRollingUpgradesOperations -from .virtual_machine_scale_set_vms_operations import VirtualMachineScaleSetVMsOperations -from .log_analytics_operations import LogAnalyticsOperations -from .virtual_machine_run_commands_operations import VirtualMachineRunCommandsOperations -from .galleries_operations import GalleriesOperations -from .gallery_images_operations import GalleryImagesOperations -from .gallery_image_versions_operations import GalleryImageVersionsOperations +from ._operations import Operations +from ._availability_sets_operations import AvailabilitySetsOperations +from ._proximity_placement_groups_operations import ProximityPlacementGroupsOperations +from ._dedicated_host_groups_operations import DedicatedHostGroupsOperations +from ._dedicated_hosts_operations import DedicatedHostsOperations +from ._virtual_machine_extension_images_operations import VirtualMachineExtensionImagesOperations +from ._virtual_machine_extensions_operations import VirtualMachineExtensionsOperations +from ._virtual_machine_images_operations import VirtualMachineImagesOperations +from ._usage_operations import UsageOperations +from ._virtual_machines_operations import VirtualMachinesOperations +from ._virtual_machine_sizes_operations import VirtualMachineSizesOperations +from ._images_operations import ImagesOperations +from ._virtual_machine_scale_sets_operations import VirtualMachineScaleSetsOperations +from ._virtual_machine_scale_set_extensions_operations import VirtualMachineScaleSetExtensionsOperations +from ._virtual_machine_scale_set_rolling_upgrades_operations import VirtualMachineScaleSetRollingUpgradesOperations +from ._virtual_machine_scale_set_vms_operations import VirtualMachineScaleSetVMsOperations +from ._log_analytics_operations import LogAnalyticsOperations +from ._virtual_machine_run_commands_operations import VirtualMachineRunCommandsOperations +from ._galleries_operations import GalleriesOperations +from ._gallery_images_operations import GalleryImagesOperations +from ._gallery_image_versions_operations import GalleryImageVersionsOperations +from ._gallery_applications_operations import GalleryApplicationsOperations +from ._gallery_application_versions_operations import GalleryApplicationVersionsOperations __all__ = [ 'Operations', 'AvailabilitySetsOperations', 'ProximityPlacementGroupsOperations', + 'DedicatedHostGroupsOperations', + 'DedicatedHostsOperations', 'VirtualMachineExtensionImagesOperations', 'VirtualMachineExtensionsOperations', 'VirtualMachineImagesOperations', @@ -49,4 +55,6 @@ 'GalleriesOperations', 'GalleryImagesOperations', 'GalleryImageVersionsOperations', + 'GalleryApplicationsOperations', + 'GalleryApplicationVersionsOperations', ] diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/operations/_availability_sets_operations.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/operations/_availability_sets_operations.py new file mode 100644 index 000000000000..51da1bb90dbf --- /dev/null +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/operations/_availability_sets_operations.py @@ -0,0 +1,500 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse +from msrestazure.azure_exceptions import CloudError + +from .. import models + + +class AvailabilitySetsOperations(object): + """AvailabilitySetsOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: Client Api Version. Constant value: "2019-03-01". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2019-03-01" + + self.config = config + + def create_or_update( + self, resource_group_name, availability_set_name, parameters, custom_headers=None, raw=False, **operation_config): + """Create or update an availability set. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param availability_set_name: The name of the availability set. + :type availability_set_name: str + :param parameters: Parameters supplied to the Create Availability Set + operation. + :type parameters: + ~azure.mgmt.compute.v2019_03_01.models.AvailabilitySet + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: AvailabilitySet or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.compute.v2019_03_01.models.AvailabilitySet or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.create_or_update.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'availabilitySetName': self._serialize.url("availability_set_name", availability_set_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(parameters, 'AvailabilitySet') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('AvailabilitySet', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}'} + + def update( + self, resource_group_name, availability_set_name, parameters, custom_headers=None, raw=False, **operation_config): + """Update an availability set. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param availability_set_name: The name of the availability set. + :type availability_set_name: str + :param parameters: Parameters supplied to the Update Availability Set + operation. + :type parameters: + ~azure.mgmt.compute.v2019_03_01.models.AvailabilitySetUpdate + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: AvailabilitySet or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.compute.v2019_03_01.models.AvailabilitySet or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.update.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'availabilitySetName': self._serialize.url("availability_set_name", availability_set_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(parameters, 'AvailabilitySetUpdate') + + # Construct and send request + request = self._client.patch(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('AvailabilitySet', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}'} + + def delete( + self, resource_group_name, availability_set_name, custom_headers=None, raw=False, **operation_config): + """Delete an availability set. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param availability_set_name: The name of the availability set. + :type availability_set_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.delete.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'availabilitySetName': self._serialize.url("availability_set_name", availability_set_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 204]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}'} + + def get( + self, resource_group_name, availability_set_name, custom_headers=None, raw=False, **operation_config): + """Retrieves information about an availability set. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param availability_set_name: The name of the availability set. + :type availability_set_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: AvailabilitySet or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.compute.v2019_03_01.models.AvailabilitySet or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'availabilitySetName': self._serialize.url("availability_set_name", availability_set_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('AvailabilitySet', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}'} + + def list_by_subscription( + self, custom_headers=None, raw=False, **operation_config): + """Lists all availability sets in a subscription. + + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of AvailabilitySet + :rtype: + ~azure.mgmt.compute.v2019_03_01.models.AvailabilitySetPaged[~azure.mgmt.compute.v2019_03_01.models.AvailabilitySet] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_by_subscription.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.AvailabilitySetPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_by_subscription.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Compute/availabilitySets'} + + def list( + self, resource_group_name, custom_headers=None, raw=False, **operation_config): + """Lists all availability sets in a resource group. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of AvailabilitySet + :rtype: + ~azure.mgmt.compute.v2019_03_01.models.AvailabilitySetPaged[~azure.mgmt.compute.v2019_03_01.models.AvailabilitySet] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.AvailabilitySetPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets'} + + def list_available_sizes( + self, resource_group_name, availability_set_name, custom_headers=None, raw=False, **operation_config): + """Lists all available virtual machine sizes that can be used to create a + new virtual machine in an existing availability set. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param availability_set_name: The name of the availability set. + :type availability_set_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of VirtualMachineSize + :rtype: + ~azure.mgmt.compute.v2019_03_01.models.VirtualMachineSizePaged[~azure.mgmt.compute.v2019_03_01.models.VirtualMachineSize] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_available_sizes.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'availabilitySetName': self._serialize.url("availability_set_name", availability_set_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.VirtualMachineSizePaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_available_sizes.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}/vmSizes'} diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/operations/_dedicated_host_groups_operations.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/operations/_dedicated_host_groups_operations.py new file mode 100644 index 000000000000..397b09d872e3 --- /dev/null +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/operations/_dedicated_host_groups_operations.py @@ -0,0 +1,435 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse +from msrestazure.azure_exceptions import CloudError + +from .. import models + + +class DedicatedHostGroupsOperations(object): + """DedicatedHostGroupsOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: Client Api Version. Constant value: "2019-03-01". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2019-03-01" + + self.config = config + + def create_or_update( + self, resource_group_name, host_group_name, parameters, custom_headers=None, raw=False, **operation_config): + """Create or update a dedicated host group. For details of Dedicated Host + and Dedicated Host Groups please see [Dedicated Host Documentation] + (https://go.microsoft.com/fwlink/?linkid=2082596). + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param host_group_name: The name of the dedicated host group. + :type host_group_name: str + :param parameters: Parameters supplied to the Create Dedicated Host + Group. + :type parameters: + ~azure.mgmt.compute.v2019_03_01.models.DedicatedHostGroup + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: DedicatedHostGroup or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.compute.v2019_03_01.models.DedicatedHostGroup or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.create_or_update.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'hostGroupName': self._serialize.url("host_group_name", host_group_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(parameters, 'DedicatedHostGroup') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 201]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('DedicatedHostGroup', response) + if response.status_code == 201: + deserialized = self._deserialize('DedicatedHostGroup', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/hostGroups/{hostGroupName}'} + + def update( + self, resource_group_name, host_group_name, parameters, custom_headers=None, raw=False, **operation_config): + """Update an dedicated host group. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param host_group_name: The name of the dedicated host group. + :type host_group_name: str + :param parameters: Parameters supplied to the Update Dedicated Host + Group operation. + :type parameters: + ~azure.mgmt.compute.v2019_03_01.models.DedicatedHostGroupUpdate + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: DedicatedHostGroup or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.compute.v2019_03_01.models.DedicatedHostGroup or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.update.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'hostGroupName': self._serialize.url("host_group_name", host_group_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(parameters, 'DedicatedHostGroupUpdate') + + # Construct and send request + request = self._client.patch(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('DedicatedHostGroup', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/hostGroups/{hostGroupName}'} + + def delete( + self, resource_group_name, host_group_name, custom_headers=None, raw=False, **operation_config): + """Delete a dedicated host group. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param host_group_name: The name of the dedicated host group. + :type host_group_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.delete.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'hostGroupName': self._serialize.url("host_group_name", host_group_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 204]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/hostGroups/{hostGroupName}'} + + def get( + self, resource_group_name, host_group_name, custom_headers=None, raw=False, **operation_config): + """Retrieves information about a dedicated host group. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param host_group_name: The name of the dedicated host group. + :type host_group_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: DedicatedHostGroup or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.compute.v2019_03_01.models.DedicatedHostGroup or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'hostGroupName': self._serialize.url("host_group_name", host_group_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('DedicatedHostGroup', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/hostGroups/{hostGroupName}'} + + def list_by_resource_group( + self, resource_group_name, custom_headers=None, raw=False, **operation_config): + """Lists all of the dedicated host groups in the specified resource group. + Use the nextLink property in the response to get the next page of + dedicated host groups. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of DedicatedHostGroup + :rtype: + ~azure.mgmt.compute.v2019_03_01.models.DedicatedHostGroupPaged[~azure.mgmt.compute.v2019_03_01.models.DedicatedHostGroup] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_by_resource_group.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.DedicatedHostGroupPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/hostGroups'} + + def list_by_subscription( + self, custom_headers=None, raw=False, **operation_config): + """Lists all of the dedicated host groups in the subscription. Use the + nextLink property in the response to get the next page of dedicated + host groups. + + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of DedicatedHostGroup + :rtype: + ~azure.mgmt.compute.v2019_03_01.models.DedicatedHostGroupPaged[~azure.mgmt.compute.v2019_03_01.models.DedicatedHostGroup] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_by_subscription.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.DedicatedHostGroupPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_by_subscription.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Compute/hostGroups'} diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/operations/_dedicated_hosts_operations.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/operations/_dedicated_hosts_operations.py new file mode 100644 index 000000000000..5321620b0af8 --- /dev/null +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/operations/_dedicated_hosts_operations.py @@ -0,0 +1,481 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse +from msrestazure.azure_exceptions import CloudError +from msrest.polling import LROPoller, NoPolling +from msrestazure.polling.arm_polling import ARMPolling + +from .. import models + + +class DedicatedHostsOperations(object): + """DedicatedHostsOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: Client Api Version. Constant value: "2019-03-01". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2019-03-01" + + self.config = config + + + def _create_or_update_initial( + self, resource_group_name, host_group_name, host_name, parameters, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.create_or_update.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'hostGroupName': self._serialize.url("host_group_name", host_group_name, 'str'), + 'hostName': self._serialize.url("host_name", host_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(parameters, 'DedicatedHost') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 201]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('DedicatedHost', response) + if response.status_code == 201: + deserialized = self._deserialize('DedicatedHost', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def create_or_update( + self, resource_group_name, host_group_name, host_name, parameters, custom_headers=None, raw=False, polling=True, **operation_config): + """Create or update a dedicated host . + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param host_group_name: The name of the dedicated host group. + :type host_group_name: str + :param host_name: The name of the dedicated host . + :type host_name: str + :param parameters: Parameters supplied to the Create Dedicated Host. + :type parameters: ~azure.mgmt.compute.v2019_03_01.models.DedicatedHost + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns DedicatedHost or + ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2019_03_01.models.DedicatedHost] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2019_03_01.models.DedicatedHost]] + :raises: :class:`CloudError` + """ + raw_result = self._create_or_update_initial( + resource_group_name=resource_group_name, + host_group_name=host_group_name, + host_name=host_name, + parameters=parameters, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('DedicatedHost', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/hostGroups/{hostGroupName}/hosts/{hostName}'} + + + def _update_initial( + self, resource_group_name, host_group_name, host_name, parameters, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.update.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'hostGroupName': self._serialize.url("host_group_name", host_group_name, 'str'), + 'hostName': self._serialize.url("host_name", host_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(parameters, 'DedicatedHostUpdate') + + # Construct and send request + request = self._client.patch(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('DedicatedHost', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def update( + self, resource_group_name, host_group_name, host_name, parameters, custom_headers=None, raw=False, polling=True, **operation_config): + """Update an dedicated host . + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param host_group_name: The name of the dedicated host group. + :type host_group_name: str + :param host_name: The name of the dedicated host . + :type host_name: str + :param parameters: Parameters supplied to the Update Dedicated Host + operation. + :type parameters: + ~azure.mgmt.compute.v2019_03_01.models.DedicatedHostUpdate + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns DedicatedHost or + ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2019_03_01.models.DedicatedHost] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2019_03_01.models.DedicatedHost]] + :raises: :class:`CloudError` + """ + raw_result = self._update_initial( + resource_group_name=resource_group_name, + host_group_name=host_group_name, + host_name=host_name, + parameters=parameters, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('DedicatedHost', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/hostGroups/{hostGroupName}/hosts/{hostName}'} + + + def _delete_initial( + self, resource_group_name, host_group_name, host_name, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.delete.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'hostGroupName': self._serialize.url("host_group_name", host_group_name, 'str'), + 'hostName': self._serialize.url("host_name", host_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202, 204]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + def delete( + self, resource_group_name, host_group_name, host_name, custom_headers=None, raw=False, polling=True, **operation_config): + """Delete a dedicated host. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param host_group_name: The name of the dedicated host group. + :type host_group_name: str + :param host_name: The name of the dedicated host. + :type host_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns None or + ClientRawResponse if raw==True + :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] + :raises: :class:`CloudError` + """ + raw_result = self._delete_initial( + resource_group_name=resource_group_name, + host_group_name=host_group_name, + host_name=host_name, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/hostGroups/{hostGroupName}/hosts/{hostName}'} + + def get( + self, resource_group_name, host_group_name, host_name, expand=None, custom_headers=None, raw=False, **operation_config): + """Retrieves information about a dedicated host. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param host_group_name: The name of the dedicated host group. + :type host_group_name: str + :param host_name: The name of the dedicated host. + :type host_name: str + :param expand: The expand expression to apply on the operation. + Possible values include: 'instanceView' + :type expand: str or + ~azure.mgmt.compute.v2019_03_01.models.InstanceViewTypes + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: DedicatedHost or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.compute.v2019_03_01.models.DedicatedHost or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'hostGroupName': self._serialize.url("host_group_name", host_group_name, 'str'), + 'hostName': self._serialize.url("host_name", host_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + if expand is not None: + query_parameters['$expand'] = self._serialize.query("expand", expand, 'InstanceViewTypes') + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('DedicatedHost', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/hostGroups/{hostGroupName}/hosts/{hostName}'} + + def list_by_host_group( + self, resource_group_name, host_group_name, custom_headers=None, raw=False, **operation_config): + """Lists all of the dedicated hosts in the specified dedicated host group. + Use the nextLink property in the response to get the next page of + dedicated hosts. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param host_group_name: The name of the dedicated host group. + :type host_group_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of DedicatedHost + :rtype: + ~azure.mgmt.compute.v2019_03_01.models.DedicatedHostPaged[~azure.mgmt.compute.v2019_03_01.models.DedicatedHost] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_by_host_group.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'hostGroupName': self._serialize.url("host_group_name", host_group_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.DedicatedHostPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_by_host_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/hostGroups/{hostGroupName}/hosts'} diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/operations/_galleries_operations.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/operations/_galleries_operations.py new file mode 100644 index 000000000000..8c0043428b7c --- /dev/null +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/operations/_galleries_operations.py @@ -0,0 +1,425 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse +from msrestazure.azure_exceptions import CloudError +from msrest.polling import LROPoller, NoPolling +from msrestazure.polling.arm_polling import ARMPolling + +from .. import models + + +class GalleriesOperations(object): + """GalleriesOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: Client Api Version. Constant value: "2019-03-01". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2019-03-01" + + self.config = config + + + def _create_or_update_initial( + self, resource_group_name, gallery_name, gallery, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.create_or_update.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'galleryName': self._serialize.url("gallery_name", gallery_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(gallery, 'Gallery') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 201, 202]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('Gallery', response) + if response.status_code == 201: + deserialized = self._deserialize('Gallery', response) + if response.status_code == 202: + deserialized = self._deserialize('Gallery', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def create_or_update( + self, resource_group_name, gallery_name, gallery, custom_headers=None, raw=False, polling=True, **operation_config): + """Create or update a Shared Image Gallery. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param gallery_name: The name of the Shared Image Gallery. The allowed + characters are alphabets and numbers with dots and periods allowed in + the middle. The maximum length is 80 characters. + :type gallery_name: str + :param gallery: Parameters supplied to the create or update Shared + Image Gallery operation. + :type gallery: ~azure.mgmt.compute.v2019_03_01.models.Gallery + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns Gallery or + ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2019_03_01.models.Gallery] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2019_03_01.models.Gallery]] + :raises: :class:`CloudError` + """ + raw_result = self._create_or_update_initial( + resource_group_name=resource_group_name, + gallery_name=gallery_name, + gallery=gallery, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('Gallery', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}'} + + def get( + self, resource_group_name, gallery_name, custom_headers=None, raw=False, **operation_config): + """Retrieves information about a Shared Image Gallery. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param gallery_name: The name of the Shared Image Gallery. + :type gallery_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: Gallery or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.compute.v2019_03_01.models.Gallery or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'galleryName': self._serialize.url("gallery_name", gallery_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('Gallery', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}'} + + + def _delete_initial( + self, resource_group_name, gallery_name, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.delete.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'galleryName': self._serialize.url("gallery_name", gallery_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202, 204]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + def delete( + self, resource_group_name, gallery_name, custom_headers=None, raw=False, polling=True, **operation_config): + """Delete a Shared Image Gallery. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param gallery_name: The name of the Shared Image Gallery to be + deleted. + :type gallery_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns None or + ClientRawResponse if raw==True + :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] + :raises: :class:`CloudError` + """ + raw_result = self._delete_initial( + resource_group_name=resource_group_name, + gallery_name=gallery_name, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}'} + + def list_by_resource_group( + self, resource_group_name, custom_headers=None, raw=False, **operation_config): + """List galleries under a resource group. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of Gallery + :rtype: + ~azure.mgmt.compute.v2019_03_01.models.GalleryPaged[~azure.mgmt.compute.v2019_03_01.models.Gallery] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_by_resource_group.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.GalleryPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries'} + + def list( + self, custom_headers=None, raw=False, **operation_config): + """List galleries under a subscription. + + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of Gallery + :rtype: + ~azure.mgmt.compute.v2019_03_01.models.GalleryPaged[~azure.mgmt.compute.v2019_03_01.models.Gallery] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.GalleryPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Compute/galleries'} diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/operations/_gallery_application_versions_operations.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/operations/_gallery_application_versions_operations.py new file mode 100644 index 000000000000..ec615df20fb8 --- /dev/null +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/operations/_gallery_application_versions_operations.py @@ -0,0 +1,408 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse +from msrestazure.azure_exceptions import CloudError +from msrest.polling import LROPoller, NoPolling +from msrestazure.polling.arm_polling import ARMPolling + +from .. import models + + +class GalleryApplicationVersionsOperations(object): + """GalleryApplicationVersionsOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: Client Api Version. Constant value: "2019-03-01". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2019-03-01" + + self.config = config + + + def _create_or_update_initial( + self, resource_group_name, gallery_name, gallery_application_name, gallery_application_version_name, gallery_application_version, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.create_or_update.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'galleryName': self._serialize.url("gallery_name", gallery_name, 'str'), + 'galleryApplicationName': self._serialize.url("gallery_application_name", gallery_application_name, 'str'), + 'galleryApplicationVersionName': self._serialize.url("gallery_application_version_name", gallery_application_version_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(gallery_application_version, 'GalleryApplicationVersion') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 201, 202]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('GalleryApplicationVersion', response) + if response.status_code == 201: + deserialized = self._deserialize('GalleryApplicationVersion', response) + if response.status_code == 202: + deserialized = self._deserialize('GalleryApplicationVersion', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def create_or_update( + self, resource_group_name, gallery_name, gallery_application_name, gallery_application_version_name, gallery_application_version, custom_headers=None, raw=False, polling=True, **operation_config): + """Create or update a gallery Application Version. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param gallery_name: The name of the Shared Application Gallery in + which the Application Definition resides. + :type gallery_name: str + :param gallery_application_name: The name of the gallery Application + Definition in which the Application Version is to be created. + :type gallery_application_name: str + :param gallery_application_version_name: The name of the gallery + Application Version to be created. Needs to follow semantic version + name pattern: The allowed characters are digit and period. Digits must + be within the range of a 32-bit integer. Format: + .. + :type gallery_application_version_name: str + :param gallery_application_version: Parameters supplied to the create + or update gallery Application Version operation. + :type gallery_application_version: + ~azure.mgmt.compute.v2019_03_01.models.GalleryApplicationVersion + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns + GalleryApplicationVersion or + ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2019_03_01.models.GalleryApplicationVersion] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2019_03_01.models.GalleryApplicationVersion]] + :raises: :class:`CloudError` + """ + raw_result = self._create_or_update_initial( + resource_group_name=resource_group_name, + gallery_name=gallery_name, + gallery_application_name=gallery_application_name, + gallery_application_version_name=gallery_application_version_name, + gallery_application_version=gallery_application_version, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('GalleryApplicationVersion', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/applications/{galleryApplicationName}/versions/{galleryApplicationVersionName}'} + + def get( + self, resource_group_name, gallery_name, gallery_application_name, gallery_application_version_name, expand=None, custom_headers=None, raw=False, **operation_config): + """Retrieves information about a gallery Application Version. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param gallery_name: The name of the Shared Application Gallery in + which the Application Definition resides. + :type gallery_name: str + :param gallery_application_name: The name of the gallery Application + Definition in which the Application Version resides. + :type gallery_application_name: str + :param gallery_application_version_name: The name of the gallery + Application Version to be retrieved. + :type gallery_application_version_name: str + :param expand: The expand expression to apply on the operation. + Possible values include: 'ReplicationStatus' + :type expand: str or + ~azure.mgmt.compute.v2019_03_01.models.ReplicationStatusTypes + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: GalleryApplicationVersion or ClientRawResponse if raw=true + :rtype: + ~azure.mgmt.compute.v2019_03_01.models.GalleryApplicationVersion or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'galleryName': self._serialize.url("gallery_name", gallery_name, 'str'), + 'galleryApplicationName': self._serialize.url("gallery_application_name", gallery_application_name, 'str'), + 'galleryApplicationVersionName': self._serialize.url("gallery_application_version_name", gallery_application_version_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + if expand is not None: + query_parameters['$expand'] = self._serialize.query("expand", expand, 'str') + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('GalleryApplicationVersion', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/applications/{galleryApplicationName}/versions/{galleryApplicationVersionName}'} + + + def _delete_initial( + self, resource_group_name, gallery_name, gallery_application_name, gallery_application_version_name, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.delete.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'galleryName': self._serialize.url("gallery_name", gallery_name, 'str'), + 'galleryApplicationName': self._serialize.url("gallery_application_name", gallery_application_name, 'str'), + 'galleryApplicationVersionName': self._serialize.url("gallery_application_version_name", gallery_application_version_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202, 204]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + def delete( + self, resource_group_name, gallery_name, gallery_application_name, gallery_application_version_name, custom_headers=None, raw=False, polling=True, **operation_config): + """Delete a gallery Application Version. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param gallery_name: The name of the Shared Application Gallery in + which the Application Definition resides. + :type gallery_name: str + :param gallery_application_name: The name of the gallery Application + Definition in which the Application Version resides. + :type gallery_application_name: str + :param gallery_application_version_name: The name of the gallery + Application Version to be deleted. + :type gallery_application_version_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns None or + ClientRawResponse if raw==True + :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] + :raises: :class:`CloudError` + """ + raw_result = self._delete_initial( + resource_group_name=resource_group_name, + gallery_name=gallery_name, + gallery_application_name=gallery_application_name, + gallery_application_version_name=gallery_application_version_name, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/applications/{galleryApplicationName}/versions/{galleryApplicationVersionName}'} + + def list_by_gallery_application( + self, resource_group_name, gallery_name, gallery_application_name, custom_headers=None, raw=False, **operation_config): + """List gallery Application Versions in a gallery Application Definition. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param gallery_name: The name of the Shared Application Gallery in + which the Application Definition resides. + :type gallery_name: str + :param gallery_application_name: The name of the Shared Application + Gallery Application Definition from which the Application Versions are + to be listed. + :type gallery_application_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of GalleryApplicationVersion + :rtype: + ~azure.mgmt.compute.v2019_03_01.models.GalleryApplicationVersionPaged[~azure.mgmt.compute.v2019_03_01.models.GalleryApplicationVersion] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_by_gallery_application.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'galleryName': self._serialize.url("gallery_name", gallery_name, 'str'), + 'galleryApplicationName': self._serialize.url("gallery_application_name", gallery_application_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.GalleryApplicationVersionPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_by_gallery_application.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/applications/{galleryApplicationName}/versions'} diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/operations/_gallery_applications_operations.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/operations/_gallery_applications_operations.py new file mode 100644 index 000000000000..c161ea1bc997 --- /dev/null +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/operations/_gallery_applications_operations.py @@ -0,0 +1,380 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse +from msrestazure.azure_exceptions import CloudError +from msrest.polling import LROPoller, NoPolling +from msrestazure.polling.arm_polling import ARMPolling + +from .. import models + + +class GalleryApplicationsOperations(object): + """GalleryApplicationsOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: Client Api Version. Constant value: "2019-03-01". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2019-03-01" + + self.config = config + + + def _create_or_update_initial( + self, resource_group_name, gallery_name, gallery_application_name, gallery_application, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.create_or_update.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'galleryName': self._serialize.url("gallery_name", gallery_name, 'str'), + 'galleryApplicationName': self._serialize.url("gallery_application_name", gallery_application_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(gallery_application, 'GalleryApplication') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 201, 202]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('GalleryApplication', response) + if response.status_code == 201: + deserialized = self._deserialize('GalleryApplication', response) + if response.status_code == 202: + deserialized = self._deserialize('GalleryApplication', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def create_or_update( + self, resource_group_name, gallery_name, gallery_application_name, gallery_application, custom_headers=None, raw=False, polling=True, **operation_config): + """Create or update a gallery Application Definition. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param gallery_name: The name of the Shared Application Gallery in + which the Application Definition is to be created. + :type gallery_name: str + :param gallery_application_name: The name of the gallery Application + Definition to be created or updated. The allowed characters are + alphabets and numbers with dots, dashes, and periods allowed in the + middle. The maximum length is 80 characters. + :type gallery_application_name: str + :param gallery_application: Parameters supplied to the create or + update gallery Application operation. + :type gallery_application: + ~azure.mgmt.compute.v2019_03_01.models.GalleryApplication + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns GalleryApplication or + ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2019_03_01.models.GalleryApplication] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2019_03_01.models.GalleryApplication]] + :raises: :class:`CloudError` + """ + raw_result = self._create_or_update_initial( + resource_group_name=resource_group_name, + gallery_name=gallery_name, + gallery_application_name=gallery_application_name, + gallery_application=gallery_application, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('GalleryApplication', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/applications/{galleryApplicationName}'} + + def get( + self, resource_group_name, gallery_name, gallery_application_name, custom_headers=None, raw=False, **operation_config): + """Retrieves information about a gallery Application Definition. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param gallery_name: The name of the Shared Application Gallery from + which the Application Definitions are to be retrieved. + :type gallery_name: str + :param gallery_application_name: The name of the gallery Application + Definition to be retrieved. + :type gallery_application_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: GalleryApplication or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.compute.v2019_03_01.models.GalleryApplication or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'galleryName': self._serialize.url("gallery_name", gallery_name, 'str'), + 'galleryApplicationName': self._serialize.url("gallery_application_name", gallery_application_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('GalleryApplication', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/applications/{galleryApplicationName}'} + + + def _delete_initial( + self, resource_group_name, gallery_name, gallery_application_name, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.delete.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'galleryName': self._serialize.url("gallery_name", gallery_name, 'str'), + 'galleryApplicationName': self._serialize.url("gallery_application_name", gallery_application_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202, 204]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + def delete( + self, resource_group_name, gallery_name, gallery_application_name, custom_headers=None, raw=False, polling=True, **operation_config): + """Delete a gallery Application. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param gallery_name: The name of the Shared Application Gallery in + which the Application Definition is to be deleted. + :type gallery_name: str + :param gallery_application_name: The name of the gallery Application + Definition to be deleted. + :type gallery_application_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns None or + ClientRawResponse if raw==True + :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] + :raises: :class:`CloudError` + """ + raw_result = self._delete_initial( + resource_group_name=resource_group_name, + gallery_name=gallery_name, + gallery_application_name=gallery_application_name, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/applications/{galleryApplicationName}'} + + def list_by_gallery( + self, resource_group_name, gallery_name, custom_headers=None, raw=False, **operation_config): + """List gallery Application Definitions in a gallery. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param gallery_name: The name of the Shared Application Gallery from + which Application Definitions are to be listed. + :type gallery_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of GalleryApplication + :rtype: + ~azure.mgmt.compute.v2019_03_01.models.GalleryApplicationPaged[~azure.mgmt.compute.v2019_03_01.models.GalleryApplication] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_by_gallery.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'galleryName': self._serialize.url("gallery_name", gallery_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.GalleryApplicationPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_by_gallery.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/applications'} diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/operations/_gallery_image_versions_operations.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/operations/_gallery_image_versions_operations.py new file mode 100644 index 000000000000..c588e1f9c728 --- /dev/null +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/operations/_gallery_image_versions_operations.py @@ -0,0 +1,405 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse +from msrestazure.azure_exceptions import CloudError +from msrest.polling import LROPoller, NoPolling +from msrestazure.polling.arm_polling import ARMPolling + +from .. import models + + +class GalleryImageVersionsOperations(object): + """GalleryImageVersionsOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: Client Api Version. Constant value: "2019-03-01". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2019-03-01" + + self.config = config + + + def _create_or_update_initial( + self, resource_group_name, gallery_name, gallery_image_name, gallery_image_version_name, gallery_image_version, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.create_or_update.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'galleryName': self._serialize.url("gallery_name", gallery_name, 'str'), + 'galleryImageName': self._serialize.url("gallery_image_name", gallery_image_name, 'str'), + 'galleryImageVersionName': self._serialize.url("gallery_image_version_name", gallery_image_version_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(gallery_image_version, 'GalleryImageVersion') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 201, 202]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('GalleryImageVersion', response) + if response.status_code == 201: + deserialized = self._deserialize('GalleryImageVersion', response) + if response.status_code == 202: + deserialized = self._deserialize('GalleryImageVersion', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def create_or_update( + self, resource_group_name, gallery_name, gallery_image_name, gallery_image_version_name, gallery_image_version, custom_headers=None, raw=False, polling=True, **operation_config): + """Create or update a gallery Image Version. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param gallery_name: The name of the Shared Image Gallery in which the + Image Definition resides. + :type gallery_name: str + :param gallery_image_name: The name of the gallery Image Definition in + which the Image Version is to be created. + :type gallery_image_name: str + :param gallery_image_version_name: The name of the gallery Image + Version to be created. Needs to follow semantic version name pattern: + The allowed characters are digit and period. Digits must be within the + range of a 32-bit integer. Format: + .. + :type gallery_image_version_name: str + :param gallery_image_version: Parameters supplied to the create or + update gallery Image Version operation. + :type gallery_image_version: + ~azure.mgmt.compute.v2019_03_01.models.GalleryImageVersion + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns GalleryImageVersion or + ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2019_03_01.models.GalleryImageVersion] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2019_03_01.models.GalleryImageVersion]] + :raises: :class:`CloudError` + """ + raw_result = self._create_or_update_initial( + resource_group_name=resource_group_name, + gallery_name=gallery_name, + gallery_image_name=gallery_image_name, + gallery_image_version_name=gallery_image_version_name, + gallery_image_version=gallery_image_version, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('GalleryImageVersion', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/images/{galleryImageName}/versions/{galleryImageVersionName}'} + + def get( + self, resource_group_name, gallery_name, gallery_image_name, gallery_image_version_name, expand=None, custom_headers=None, raw=False, **operation_config): + """Retrieves information about a gallery Image Version. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param gallery_name: The name of the Shared Image Gallery in which the + Image Definition resides. + :type gallery_name: str + :param gallery_image_name: The name of the gallery Image Definition in + which the Image Version resides. + :type gallery_image_name: str + :param gallery_image_version_name: The name of the gallery Image + Version to be retrieved. + :type gallery_image_version_name: str + :param expand: The expand expression to apply on the operation. + Possible values include: 'ReplicationStatus' + :type expand: str or + ~azure.mgmt.compute.v2019_03_01.models.ReplicationStatusTypes + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: GalleryImageVersion or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.compute.v2019_03_01.models.GalleryImageVersion or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'galleryName': self._serialize.url("gallery_name", gallery_name, 'str'), + 'galleryImageName': self._serialize.url("gallery_image_name", gallery_image_name, 'str'), + 'galleryImageVersionName': self._serialize.url("gallery_image_version_name", gallery_image_version_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + if expand is not None: + query_parameters['$expand'] = self._serialize.query("expand", expand, 'str') + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('GalleryImageVersion', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/images/{galleryImageName}/versions/{galleryImageVersionName}'} + + + def _delete_initial( + self, resource_group_name, gallery_name, gallery_image_name, gallery_image_version_name, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.delete.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'galleryName': self._serialize.url("gallery_name", gallery_name, 'str'), + 'galleryImageName': self._serialize.url("gallery_image_name", gallery_image_name, 'str'), + 'galleryImageVersionName': self._serialize.url("gallery_image_version_name", gallery_image_version_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202, 204]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + def delete( + self, resource_group_name, gallery_name, gallery_image_name, gallery_image_version_name, custom_headers=None, raw=False, polling=True, **operation_config): + """Delete a gallery Image Version. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param gallery_name: The name of the Shared Image Gallery in which the + Image Definition resides. + :type gallery_name: str + :param gallery_image_name: The name of the gallery Image Definition in + which the Image Version resides. + :type gallery_image_name: str + :param gallery_image_version_name: The name of the gallery Image + Version to be deleted. + :type gallery_image_version_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns None or + ClientRawResponse if raw==True + :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] + :raises: :class:`CloudError` + """ + raw_result = self._delete_initial( + resource_group_name=resource_group_name, + gallery_name=gallery_name, + gallery_image_name=gallery_image_name, + gallery_image_version_name=gallery_image_version_name, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/images/{galleryImageName}/versions/{galleryImageVersionName}'} + + def list_by_gallery_image( + self, resource_group_name, gallery_name, gallery_image_name, custom_headers=None, raw=False, **operation_config): + """List gallery Image Versions in a gallery Image Definition. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param gallery_name: The name of the Shared Image Gallery in which the + Image Definition resides. + :type gallery_name: str + :param gallery_image_name: The name of the Shared Image Gallery Image + Definition from which the Image Versions are to be listed. + :type gallery_image_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of GalleryImageVersion + :rtype: + ~azure.mgmt.compute.v2019_03_01.models.GalleryImageVersionPaged[~azure.mgmt.compute.v2019_03_01.models.GalleryImageVersion] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_by_gallery_image.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'galleryName': self._serialize.url("gallery_name", gallery_name, 'str'), + 'galleryImageName': self._serialize.url("gallery_image_name", gallery_image_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.GalleryImageVersionPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_by_gallery_image.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/images/{galleryImageName}/versions'} diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/operations/_gallery_images_operations.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/operations/_gallery_images_operations.py new file mode 100644 index 000000000000..1ff3cbf30990 --- /dev/null +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/operations/_gallery_images_operations.py @@ -0,0 +1,380 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse +from msrestazure.azure_exceptions import CloudError +from msrest.polling import LROPoller, NoPolling +from msrestazure.polling.arm_polling import ARMPolling + +from .. import models + + +class GalleryImagesOperations(object): + """GalleryImagesOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: Client Api Version. Constant value: "2019-03-01". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2019-03-01" + + self.config = config + + + def _create_or_update_initial( + self, resource_group_name, gallery_name, gallery_image_name, gallery_image, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.create_or_update.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'galleryName': self._serialize.url("gallery_name", gallery_name, 'str'), + 'galleryImageName': self._serialize.url("gallery_image_name", gallery_image_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(gallery_image, 'GalleryImage') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 201, 202]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('GalleryImage', response) + if response.status_code == 201: + deserialized = self._deserialize('GalleryImage', response) + if response.status_code == 202: + deserialized = self._deserialize('GalleryImage', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def create_or_update( + self, resource_group_name, gallery_name, gallery_image_name, gallery_image, custom_headers=None, raw=False, polling=True, **operation_config): + """Create or update a gallery Image Definition. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param gallery_name: The name of the Shared Image Gallery in which the + Image Definition is to be created. + :type gallery_name: str + :param gallery_image_name: The name of the gallery Image Definition to + be created or updated. The allowed characters are alphabets and + numbers with dots, dashes, and periods allowed in the middle. The + maximum length is 80 characters. + :type gallery_image_name: str + :param gallery_image: Parameters supplied to the create or update + gallery image operation. + :type gallery_image: + ~azure.mgmt.compute.v2019_03_01.models.GalleryImage + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns GalleryImage or + ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2019_03_01.models.GalleryImage] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2019_03_01.models.GalleryImage]] + :raises: :class:`CloudError` + """ + raw_result = self._create_or_update_initial( + resource_group_name=resource_group_name, + gallery_name=gallery_name, + gallery_image_name=gallery_image_name, + gallery_image=gallery_image, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('GalleryImage', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/images/{galleryImageName}'} + + def get( + self, resource_group_name, gallery_name, gallery_image_name, custom_headers=None, raw=False, **operation_config): + """Retrieves information about a gallery Image Definition. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param gallery_name: The name of the Shared Image Gallery from which + the Image Definitions are to be retrieved. + :type gallery_name: str + :param gallery_image_name: The name of the gallery Image Definition to + be retrieved. + :type gallery_image_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: GalleryImage or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.compute.v2019_03_01.models.GalleryImage or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'galleryName': self._serialize.url("gallery_name", gallery_name, 'str'), + 'galleryImageName': self._serialize.url("gallery_image_name", gallery_image_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('GalleryImage', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/images/{galleryImageName}'} + + + def _delete_initial( + self, resource_group_name, gallery_name, gallery_image_name, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.delete.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'galleryName': self._serialize.url("gallery_name", gallery_name, 'str'), + 'galleryImageName': self._serialize.url("gallery_image_name", gallery_image_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202, 204]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + def delete( + self, resource_group_name, gallery_name, gallery_image_name, custom_headers=None, raw=False, polling=True, **operation_config): + """Delete a gallery image. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param gallery_name: The name of the Shared Image Gallery in which the + Image Definition is to be deleted. + :type gallery_name: str + :param gallery_image_name: The name of the gallery Image Definition to + be deleted. + :type gallery_image_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns None or + ClientRawResponse if raw==True + :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] + :raises: :class:`CloudError` + """ + raw_result = self._delete_initial( + resource_group_name=resource_group_name, + gallery_name=gallery_name, + gallery_image_name=gallery_image_name, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/images/{galleryImageName}'} + + def list_by_gallery( + self, resource_group_name, gallery_name, custom_headers=None, raw=False, **operation_config): + """List gallery Image Definitions in a gallery. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param gallery_name: The name of the Shared Image Gallery from which + Image Definitions are to be listed. + :type gallery_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of GalleryImage + :rtype: + ~azure.mgmt.compute.v2019_03_01.models.GalleryImagePaged[~azure.mgmt.compute.v2019_03_01.models.GalleryImage] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_by_gallery.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'galleryName': self._serialize.url("gallery_name", gallery_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.GalleryImagePaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_by_gallery.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/images'} diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/operations/_images_operations.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/operations/_images_operations.py new file mode 100644 index 000000000000..e3fbcfc73418 --- /dev/null +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/operations/_images_operations.py @@ -0,0 +1,527 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse +from msrestazure.azure_exceptions import CloudError +from msrest.polling import LROPoller, NoPolling +from msrestazure.polling.arm_polling import ARMPolling + +from .. import models + + +class ImagesOperations(object): + """ImagesOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: Client Api Version. Constant value: "2019-03-01". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2019-03-01" + + self.config = config + + + def _create_or_update_initial( + self, resource_group_name, image_name, parameters, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.create_or_update.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'imageName': self._serialize.url("image_name", image_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(parameters, 'Image') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 201]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('Image', response) + if response.status_code == 201: + deserialized = self._deserialize('Image', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def create_or_update( + self, resource_group_name, image_name, parameters, custom_headers=None, raw=False, polling=True, **operation_config): + """Create or update an image. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param image_name: The name of the image. + :type image_name: str + :param parameters: Parameters supplied to the Create Image operation. + :type parameters: ~azure.mgmt.compute.v2019_03_01.models.Image + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns Image or + ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2019_03_01.models.Image] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2019_03_01.models.Image]] + :raises: :class:`CloudError` + """ + raw_result = self._create_or_update_initial( + resource_group_name=resource_group_name, + image_name=image_name, + parameters=parameters, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('Image', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/images/{imageName}'} + + + def _update_initial( + self, resource_group_name, image_name, parameters, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.update.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'imageName': self._serialize.url("image_name", image_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(parameters, 'ImageUpdate') + + # Construct and send request + request = self._client.patch(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 201]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('Image', response) + if response.status_code == 201: + deserialized = self._deserialize('Image', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def update( + self, resource_group_name, image_name, parameters, custom_headers=None, raw=False, polling=True, **operation_config): + """Update an image. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param image_name: The name of the image. + :type image_name: str + :param parameters: Parameters supplied to the Update Image operation. + :type parameters: ~azure.mgmt.compute.v2019_03_01.models.ImageUpdate + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns Image or + ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2019_03_01.models.Image] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2019_03_01.models.Image]] + :raises: :class:`CloudError` + """ + raw_result = self._update_initial( + resource_group_name=resource_group_name, + image_name=image_name, + parameters=parameters, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('Image', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/images/{imageName}'} + + + def _delete_initial( + self, resource_group_name, image_name, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.delete.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'imageName': self._serialize.url("image_name", image_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202, 204]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + def delete( + self, resource_group_name, image_name, custom_headers=None, raw=False, polling=True, **operation_config): + """Deletes an Image. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param image_name: The name of the image. + :type image_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns None or + ClientRawResponse if raw==True + :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] + :raises: :class:`CloudError` + """ + raw_result = self._delete_initial( + resource_group_name=resource_group_name, + image_name=image_name, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/images/{imageName}'} + + def get( + self, resource_group_name, image_name, expand=None, custom_headers=None, raw=False, **operation_config): + """Gets an image. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param image_name: The name of the image. + :type image_name: str + :param expand: The expand expression to apply on the operation. + :type expand: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: Image or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.compute.v2019_03_01.models.Image or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'imageName': self._serialize.url("image_name", image_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + if expand is not None: + query_parameters['$expand'] = self._serialize.query("expand", expand, 'str') + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('Image', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/images/{imageName}'} + + def list_by_resource_group( + self, resource_group_name, custom_headers=None, raw=False, **operation_config): + """Gets the list of images under a resource group. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of Image + :rtype: + ~azure.mgmt.compute.v2019_03_01.models.ImagePaged[~azure.mgmt.compute.v2019_03_01.models.Image] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_by_resource_group.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.ImagePaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/images'} + + def list( + self, custom_headers=None, raw=False, **operation_config): + """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. + + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of Image + :rtype: + ~azure.mgmt.compute.v2019_03_01.models.ImagePaged[~azure.mgmt.compute.v2019_03_01.models.Image] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.ImagePaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Compute/images'} diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/operations/_log_analytics_operations.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/operations/_log_analytics_operations.py new file mode 100644 index 000000000000..a9b95027f50f --- /dev/null +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/operations/_log_analytics_operations.py @@ -0,0 +1,244 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse +from msrestazure.azure_exceptions import CloudError +from msrest.polling import LROPoller, NoPolling +from msrestazure.polling.arm_polling import ARMPolling + +from .. import models + + +class LogAnalyticsOperations(object): + """LogAnalyticsOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: Client Api Version. Constant value: "2019-03-01". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2019-03-01" + + self.config = config + + + def _export_request_rate_by_interval_initial( + self, parameters, location, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.export_request_rate_by_interval.metadata['url'] + path_format_arguments = { + 'location': self._serialize.url("location", location, 'str', pattern=r'^[-\w\._]+$'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(parameters, 'RequestRateByIntervalInput') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('LogAnalyticsOperationResult', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def export_request_rate_by_interval( + self, parameters, location, custom_headers=None, raw=False, polling=True, **operation_config): + """Export logs that show Api requests made by this subscription in the + given time window to show throttling activities. + + :param parameters: Parameters supplied to the LogAnalytics + getRequestRateByInterval Api. + :type parameters: + ~azure.mgmt.compute.v2019_03_01.models.RequestRateByIntervalInput + :param location: The location upon which virtual-machine-sizes is + queried. + :type location: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns + LogAnalyticsOperationResult or + ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2019_03_01.models.LogAnalyticsOperationResult] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2019_03_01.models.LogAnalyticsOperationResult]] + :raises: :class:`CloudError` + """ + raw_result = self._export_request_rate_by_interval_initial( + parameters=parameters, + location=location, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('LogAnalyticsOperationResult', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + export_request_rate_by_interval.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/logAnalytics/apiAccess/getRequestRateByInterval'} + + + def _export_throttled_requests_initial( + self, parameters, location, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.export_throttled_requests.metadata['url'] + path_format_arguments = { + 'location': self._serialize.url("location", location, 'str', pattern=r'^[-\w\._]+$'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(parameters, 'ThrottledRequestsInput') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('LogAnalyticsOperationResult', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def export_throttled_requests( + self, parameters, location, custom_headers=None, raw=False, polling=True, **operation_config): + """Export logs that show total throttled Api requests for this + subscription in the given time window. + + :param parameters: Parameters supplied to the LogAnalytics + getThrottledRequests Api. + :type parameters: + ~azure.mgmt.compute.v2019_03_01.models.ThrottledRequestsInput + :param location: The location upon which virtual-machine-sizes is + queried. + :type location: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns + LogAnalyticsOperationResult or + ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2019_03_01.models.LogAnalyticsOperationResult] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2019_03_01.models.LogAnalyticsOperationResult]] + :raises: :class:`CloudError` + """ + raw_result = self._export_throttled_requests_initial( + parameters=parameters, + location=location, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('LogAnalyticsOperationResult', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + export_throttled_requests.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/logAnalytics/apiAccess/getThrottledRequests'} diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/operations/_operations.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/operations/_operations.py new file mode 100644 index 000000000000..7390229f105d --- /dev/null +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/operations/_operations.py @@ -0,0 +1,102 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse +from msrestazure.azure_exceptions import CloudError + +from .. import models + + +class Operations(object): + """Operations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: Client Api Version. Constant value: "2019-03-01". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2019-03-01" + + self.config = config + + def list( + self, custom_headers=None, raw=False, **operation_config): + """Gets a list of compute operations. + + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of ComputeOperationValue + :rtype: + ~azure.mgmt.compute.v2019_03_01.models.ComputeOperationValuePaged[~azure.mgmt.compute.v2019_03_01.models.ComputeOperationValue] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list.metadata['url'] + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.ComputeOperationValuePaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list.metadata = {'url': '/providers/Microsoft.Compute/operations'} diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/operations/_proximity_placement_groups_operations.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/operations/_proximity_placement_groups_operations.py new file mode 100644 index 000000000000..6d74db724a1e --- /dev/null +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/operations/_proximity_placement_groups_operations.py @@ -0,0 +1,433 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse +from msrestazure.azure_exceptions import CloudError + +from .. import models + + +class ProximityPlacementGroupsOperations(object): + """ProximityPlacementGroupsOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: Client Api Version. Constant value: "2019-03-01". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2019-03-01" + + self.config = config + + def create_or_update( + self, resource_group_name, proximity_placement_group_name, parameters, custom_headers=None, raw=False, **operation_config): + """Create or update a proximity placement group. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param proximity_placement_group_name: The name of the proximity + placement group. + :type proximity_placement_group_name: str + :param parameters: Parameters supplied to the Create Proximity + Placement Group operation. + :type parameters: + ~azure.mgmt.compute.v2019_03_01.models.ProximityPlacementGroup + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: ProximityPlacementGroup or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.compute.v2019_03_01.models.ProximityPlacementGroup + or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.create_or_update.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'proximityPlacementGroupName': self._serialize.url("proximity_placement_group_name", proximity_placement_group_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(parameters, 'ProximityPlacementGroup') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 201]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('ProximityPlacementGroup', response) + if response.status_code == 201: + deserialized = self._deserialize('ProximityPlacementGroup', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/proximityPlacementGroups/{proximityPlacementGroupName}'} + + def update( + self, resource_group_name, proximity_placement_group_name, tags=None, custom_headers=None, raw=False, **operation_config): + """Update a proximity placement group. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param proximity_placement_group_name: The name of the proximity + placement group. + :type proximity_placement_group_name: str + :param tags: Resource tags + :type tags: dict[str, str] + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: ProximityPlacementGroup or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.compute.v2019_03_01.models.ProximityPlacementGroup + or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + parameters = models.ProximityPlacementGroupUpdate(tags=tags) + + # Construct URL + url = self.update.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'proximityPlacementGroupName': self._serialize.url("proximity_placement_group_name", proximity_placement_group_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(parameters, 'ProximityPlacementGroupUpdate') + + # Construct and send request + request = self._client.patch(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('ProximityPlacementGroup', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/proximityPlacementGroups/{proximityPlacementGroupName}'} + + def delete( + self, resource_group_name, proximity_placement_group_name, custom_headers=None, raw=False, **operation_config): + """Delete a proximity placement group. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param proximity_placement_group_name: The name of the proximity + placement group. + :type proximity_placement_group_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.delete.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'proximityPlacementGroupName': self._serialize.url("proximity_placement_group_name", proximity_placement_group_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/proximityPlacementGroups/{proximityPlacementGroupName}'} + + def get( + self, resource_group_name, proximity_placement_group_name, custom_headers=None, raw=False, **operation_config): + """Retrieves information about a proximity placement group . + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param proximity_placement_group_name: The name of the proximity + placement group. + :type proximity_placement_group_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: ProximityPlacementGroup or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.compute.v2019_03_01.models.ProximityPlacementGroup + or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'proximityPlacementGroupName': self._serialize.url("proximity_placement_group_name", proximity_placement_group_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('ProximityPlacementGroup', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/proximityPlacementGroups/{proximityPlacementGroupName}'} + + def list_by_subscription( + self, custom_headers=None, raw=False, **operation_config): + """Lists all proximity placement groups in a subscription. + + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of ProximityPlacementGroup + :rtype: + ~azure.mgmt.compute.v2019_03_01.models.ProximityPlacementGroupPaged[~azure.mgmt.compute.v2019_03_01.models.ProximityPlacementGroup] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_by_subscription.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.ProximityPlacementGroupPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_by_subscription.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Compute/proximityPlacementGroups'} + + def list_by_resource_group( + self, resource_group_name, custom_headers=None, raw=False, **operation_config): + """Lists all proximity placement groups in a resource group. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of ProximityPlacementGroup + :rtype: + ~azure.mgmt.compute.v2019_03_01.models.ProximityPlacementGroupPaged[~azure.mgmt.compute.v2019_03_01.models.ProximityPlacementGroup] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_by_resource_group.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.ProximityPlacementGroupPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/proximityPlacementGroups'} diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/operations/_usage_operations.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/operations/_usage_operations.py new file mode 100644 index 000000000000..f91a094706fd --- /dev/null +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/operations/_usage_operations.py @@ -0,0 +1,111 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse +from msrestazure.azure_exceptions import CloudError + +from .. import models + + +class UsageOperations(object): + """UsageOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: Client Api Version. Constant value: "2019-03-01". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2019-03-01" + + self.config = config + + def list( + self, location, custom_headers=None, raw=False, **operation_config): + """Gets, for the specified location, the current compute resource usage + information as well as the limits for compute resources under the + subscription. + + :param location: The location for which resource usage is queried. + :type location: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of Usage + :rtype: + ~azure.mgmt.compute.v2019_03_01.models.UsagePaged[~azure.mgmt.compute.v2019_03_01.models.Usage] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list.metadata['url'] + path_format_arguments = { + 'location': self._serialize.url("location", location, 'str', pattern=r'^[-\w\._]+$'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.UsagePaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/usages'} diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/operations/_virtual_machine_extension_images_operations.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/operations/_virtual_machine_extension_images_operations.py new file mode 100644 index 000000000000..04962a7f62b2 --- /dev/null +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/operations/_virtual_machine_extension_images_operations.py @@ -0,0 +1,247 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse +from msrestazure.azure_exceptions import CloudError + +from .. import models + + +class VirtualMachineExtensionImagesOperations(object): + """VirtualMachineExtensionImagesOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: Client Api Version. Constant value: "2019-03-01". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2019-03-01" + + self.config = config + + def get( + self, location, publisher_name, type, version, custom_headers=None, raw=False, **operation_config): + """Gets a virtual machine extension image. + + :param location: The name of a supported Azure region. + :type location: str + :param publisher_name: + :type publisher_name: str + :param type: + :type type: str + :param version: + :type version: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: VirtualMachineExtensionImage or ClientRawResponse if raw=true + :rtype: + ~azure.mgmt.compute.v2019_03_01.models.VirtualMachineExtensionImage or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'location': self._serialize.url("location", location, 'str'), + 'publisherName': self._serialize.url("publisher_name", publisher_name, 'str'), + 'type': self._serialize.url("type", type, 'str'), + 'version': self._serialize.url("version", version, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('VirtualMachineExtensionImage', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/publishers/{publisherName}/artifacttypes/vmextension/types/{type}/versions/{version}'} + + def list_types( + self, location, publisher_name, custom_headers=None, raw=False, **operation_config): + """Gets a list of virtual machine extension image types. + + :param location: The name of a supported Azure region. + :type location: str + :param publisher_name: + :type publisher_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: list or ClientRawResponse if raw=true + :rtype: + list[~azure.mgmt.compute.v2019_03_01.models.VirtualMachineExtensionImage] + or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.list_types.metadata['url'] + path_format_arguments = { + 'location': self._serialize.url("location", location, 'str'), + 'publisherName': self._serialize.url("publisher_name", publisher_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('[VirtualMachineExtensionImage]', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + list_types.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/publishers/{publisherName}/artifacttypes/vmextension/types'} + + def list_versions( + self, location, publisher_name, type, filter=None, top=None, orderby=None, custom_headers=None, raw=False, **operation_config): + """Gets a list of virtual machine extension image versions. + + :param location: The name of a supported Azure region. + :type location: str + :param publisher_name: + :type publisher_name: str + :param type: + :type type: str + :param filter: The filter to apply on the operation. + :type filter: str + :param top: + :type top: int + :param orderby: + :type orderby: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: list or ClientRawResponse if raw=true + :rtype: + list[~azure.mgmt.compute.v2019_03_01.models.VirtualMachineExtensionImage] + or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.list_versions.metadata['url'] + path_format_arguments = { + 'location': self._serialize.url("location", location, 'str'), + 'publisherName': self._serialize.url("publisher_name", publisher_name, 'str'), + 'type': self._serialize.url("type", type, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + if filter is not None: + query_parameters['$filter'] = self._serialize.query("filter", filter, 'str') + if top is not None: + query_parameters['$top'] = self._serialize.query("top", top, 'int') + if orderby is not None: + query_parameters['$orderby'] = self._serialize.query("orderby", orderby, 'str') + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('[VirtualMachineExtensionImage]', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + list_versions.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/publishers/{publisherName}/artifacttypes/vmextension/types/{type}/versions'} diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/operations/_virtual_machine_extensions_operations.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/operations/_virtual_machine_extensions_operations.py new file mode 100644 index 000000000000..7891dda6634c --- /dev/null +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/operations/_virtual_machine_extensions_operations.py @@ -0,0 +1,479 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse +from msrestazure.azure_exceptions import CloudError +from msrest.polling import LROPoller, NoPolling +from msrestazure.polling.arm_polling import ARMPolling + +from .. import models + + +class VirtualMachineExtensionsOperations(object): + """VirtualMachineExtensionsOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: Client Api Version. Constant value: "2019-03-01". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2019-03-01" + + self.config = config + + + def _create_or_update_initial( + self, resource_group_name, vm_name, vm_extension_name, extension_parameters, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.create_or_update.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vmName': self._serialize.url("vm_name", vm_name, 'str'), + 'vmExtensionName': self._serialize.url("vm_extension_name", vm_extension_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(extension_parameters, 'VirtualMachineExtension') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 201]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('VirtualMachineExtension', response) + if response.status_code == 201: + deserialized = self._deserialize('VirtualMachineExtension', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def create_or_update( + self, resource_group_name, vm_name, vm_extension_name, extension_parameters, custom_headers=None, raw=False, polling=True, **operation_config): + """The operation to create or update the extension. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param vm_name: The name of the virtual machine where the extension + should be created or updated. + :type vm_name: str + :param vm_extension_name: The name of the virtual machine extension. + :type vm_extension_name: str + :param extension_parameters: Parameters supplied to the Create Virtual + Machine Extension operation. + :type extension_parameters: + ~azure.mgmt.compute.v2019_03_01.models.VirtualMachineExtension + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns VirtualMachineExtension + or ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2019_03_01.models.VirtualMachineExtension] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2019_03_01.models.VirtualMachineExtension]] + :raises: :class:`CloudError` + """ + raw_result = self._create_or_update_initial( + resource_group_name=resource_group_name, + vm_name=vm_name, + vm_extension_name=vm_extension_name, + extension_parameters=extension_parameters, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('VirtualMachineExtension', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/extensions/{vmExtensionName}'} + + + def _update_initial( + self, resource_group_name, vm_name, vm_extension_name, extension_parameters, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.update.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vmName': self._serialize.url("vm_name", vm_name, 'str'), + 'vmExtensionName': self._serialize.url("vm_extension_name", vm_extension_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(extension_parameters, 'VirtualMachineExtensionUpdate') + + # Construct and send request + request = self._client.patch(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('VirtualMachineExtension', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def update( + self, resource_group_name, vm_name, vm_extension_name, extension_parameters, custom_headers=None, raw=False, polling=True, **operation_config): + """The operation to update the extension. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param vm_name: The name of the virtual machine where the extension + should be updated. + :type vm_name: str + :param vm_extension_name: The name of the virtual machine extension. + :type vm_extension_name: str + :param extension_parameters: Parameters supplied to the Update Virtual + Machine Extension operation. + :type extension_parameters: + ~azure.mgmt.compute.v2019_03_01.models.VirtualMachineExtensionUpdate + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns VirtualMachineExtension + or ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2019_03_01.models.VirtualMachineExtension] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2019_03_01.models.VirtualMachineExtension]] + :raises: :class:`CloudError` + """ + raw_result = self._update_initial( + resource_group_name=resource_group_name, + vm_name=vm_name, + vm_extension_name=vm_extension_name, + extension_parameters=extension_parameters, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('VirtualMachineExtension', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/extensions/{vmExtensionName}'} + + + def _delete_initial( + self, resource_group_name, vm_name, vm_extension_name, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.delete.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vmName': self._serialize.url("vm_name", vm_name, 'str'), + 'vmExtensionName': self._serialize.url("vm_extension_name", vm_extension_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202, 204]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + def delete( + self, resource_group_name, vm_name, vm_extension_name, custom_headers=None, raw=False, polling=True, **operation_config): + """The operation to delete the extension. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param vm_name: The name of the virtual machine where the extension + should be deleted. + :type vm_name: str + :param vm_extension_name: The name of the virtual machine extension. + :type vm_extension_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns None or + ClientRawResponse if raw==True + :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] + :raises: :class:`CloudError` + """ + raw_result = self._delete_initial( + resource_group_name=resource_group_name, + vm_name=vm_name, + vm_extension_name=vm_extension_name, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/extensions/{vmExtensionName}'} + + def get( + self, resource_group_name, vm_name, vm_extension_name, expand=None, custom_headers=None, raw=False, **operation_config): + """The operation to get the extension. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param vm_name: The name of the virtual machine containing the + extension. + :type vm_name: str + :param vm_extension_name: The name of the virtual machine extension. + :type vm_extension_name: str + :param expand: The expand expression to apply on the operation. + :type expand: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: VirtualMachineExtension or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.compute.v2019_03_01.models.VirtualMachineExtension + or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vmName': self._serialize.url("vm_name", vm_name, 'str'), + 'vmExtensionName': self._serialize.url("vm_extension_name", vm_extension_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + if expand is not None: + query_parameters['$expand'] = self._serialize.query("expand", expand, 'str') + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('VirtualMachineExtension', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/extensions/{vmExtensionName}'} + + def list( + self, resource_group_name, vm_name, expand=None, custom_headers=None, raw=False, **operation_config): + """The operation to get all extensions of a Virtual Machine. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param vm_name: The name of the virtual machine containing the + extension. + :type vm_name: str + :param expand: The expand expression to apply on the operation. + :type expand: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: VirtualMachineExtensionsListResult or ClientRawResponse if + raw=true + :rtype: + ~azure.mgmt.compute.v2019_03_01.models.VirtualMachineExtensionsListResult + or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.list.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vmName': self._serialize.url("vm_name", vm_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + if expand is not None: + query_parameters['$expand'] = self._serialize.query("expand", expand, 'str') + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('VirtualMachineExtensionsListResult', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/extensions'} diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/operations/_virtual_machine_images_operations.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/operations/_virtual_machine_images_operations.py new file mode 100644 index 000000000000..ee9133a1af9a --- /dev/null +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/operations/_virtual_machine_images_operations.py @@ -0,0 +1,380 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse +from msrestazure.azure_exceptions import CloudError + +from .. import models + + +class VirtualMachineImagesOperations(object): + """VirtualMachineImagesOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: Client Api Version. Constant value: "2019-03-01". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2019-03-01" + + self.config = config + + def get( + self, location, publisher_name, offer, skus, version, custom_headers=None, raw=False, **operation_config): + """Gets a virtual machine image. + + :param location: The name of a supported Azure region. + :type location: str + :param publisher_name: A valid image publisher. + :type publisher_name: str + :param offer: A valid image publisher offer. + :type offer: str + :param skus: A valid image SKU. + :type skus: str + :param version: A valid image SKU version. + :type version: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: VirtualMachineImage or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.compute.v2019_03_01.models.VirtualMachineImage or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'location': self._serialize.url("location", location, 'str'), + 'publisherName': self._serialize.url("publisher_name", publisher_name, 'str'), + 'offer': self._serialize.url("offer", offer, 'str'), + 'skus': self._serialize.url("skus", skus, 'str'), + 'version': self._serialize.url("version", version, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('VirtualMachineImage', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/publishers/{publisherName}/artifacttypes/vmimage/offers/{offer}/skus/{skus}/versions/{version}'} + + def list( + self, location, publisher_name, offer, skus, filter=None, top=None, orderby=None, custom_headers=None, raw=False, **operation_config): + """Gets a list of all virtual machine image versions for the specified + location, publisher, offer, and SKU. + + :param location: The name of a supported Azure region. + :type location: str + :param publisher_name: A valid image publisher. + :type publisher_name: str + :param offer: A valid image publisher offer. + :type offer: str + :param skus: A valid image SKU. + :type skus: str + :param filter: The filter to apply on the operation. + :type filter: str + :param top: + :type top: int + :param orderby: + :type orderby: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: list or ClientRawResponse if raw=true + :rtype: + list[~azure.mgmt.compute.v2019_03_01.models.VirtualMachineImageResource] + or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.list.metadata['url'] + path_format_arguments = { + 'location': self._serialize.url("location", location, 'str'), + 'publisherName': self._serialize.url("publisher_name", publisher_name, 'str'), + 'offer': self._serialize.url("offer", offer, 'str'), + 'skus': self._serialize.url("skus", skus, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + if filter is not None: + query_parameters['$filter'] = self._serialize.query("filter", filter, 'str') + if top is not None: + query_parameters['$top'] = self._serialize.query("top", top, 'int') + if orderby is not None: + query_parameters['$orderby'] = self._serialize.query("orderby", orderby, 'str') + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('[VirtualMachineImageResource]', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/publishers/{publisherName}/artifacttypes/vmimage/offers/{offer}/skus/{skus}/versions'} + + def list_offers( + self, location, publisher_name, custom_headers=None, raw=False, **operation_config): + """Gets a list of virtual machine image offers for the specified location + and publisher. + + :param location: The name of a supported Azure region. + :type location: str + :param publisher_name: A valid image publisher. + :type publisher_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: list or ClientRawResponse if raw=true + :rtype: + list[~azure.mgmt.compute.v2019_03_01.models.VirtualMachineImageResource] + or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.list_offers.metadata['url'] + path_format_arguments = { + 'location': self._serialize.url("location", location, 'str'), + 'publisherName': self._serialize.url("publisher_name", publisher_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('[VirtualMachineImageResource]', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + list_offers.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/publishers/{publisherName}/artifacttypes/vmimage/offers'} + + def list_publishers( + self, location, custom_headers=None, raw=False, **operation_config): + """Gets a list of virtual machine image publishers for the specified Azure + location. + + :param location: The name of a supported Azure region. + :type location: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: list or ClientRawResponse if raw=true + :rtype: + list[~azure.mgmt.compute.v2019_03_01.models.VirtualMachineImageResource] + or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.list_publishers.metadata['url'] + path_format_arguments = { + 'location': self._serialize.url("location", location, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('[VirtualMachineImageResource]', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + list_publishers.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/publishers'} + + def list_skus( + self, location, publisher_name, offer, custom_headers=None, raw=False, **operation_config): + """Gets a list of virtual machine image SKUs for the specified location, + publisher, and offer. + + :param location: The name of a supported Azure region. + :type location: str + :param publisher_name: A valid image publisher. + :type publisher_name: str + :param offer: A valid image publisher offer. + :type offer: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: list or ClientRawResponse if raw=true + :rtype: + list[~azure.mgmt.compute.v2019_03_01.models.VirtualMachineImageResource] + or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.list_skus.metadata['url'] + path_format_arguments = { + 'location': self._serialize.url("location", location, 'str'), + 'publisherName': self._serialize.url("publisher_name", publisher_name, 'str'), + 'offer': self._serialize.url("offer", offer, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('[VirtualMachineImageResource]', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + list_skus.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/publishers/{publisherName}/artifacttypes/vmimage/offers/{offer}/skus'} diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/operations/_virtual_machine_run_commands_operations.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/operations/_virtual_machine_run_commands_operations.py new file mode 100644 index 000000000000..b4929fdd18a0 --- /dev/null +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/operations/_virtual_machine_run_commands_operations.py @@ -0,0 +1,170 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse +from msrestazure.azure_exceptions import CloudError + +from .. import models + + +class VirtualMachineRunCommandsOperations(object): + """VirtualMachineRunCommandsOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: Client Api Version. Constant value: "2019-03-01". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2019-03-01" + + self.config = config + + def list( + self, location, custom_headers=None, raw=False, **operation_config): + """Lists all available run commands for a subscription in a location. + + :param location: The location upon which run commands is queried. + :type location: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of RunCommandDocumentBase + :rtype: + ~azure.mgmt.compute.v2019_03_01.models.RunCommandDocumentBasePaged[~azure.mgmt.compute.v2019_03_01.models.RunCommandDocumentBase] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list.metadata['url'] + path_format_arguments = { + 'location': self._serialize.url("location", location, 'str', pattern=r'^[-\w\._]+$'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.RunCommandDocumentBasePaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/runCommands'} + + def get( + self, location, command_id, custom_headers=None, raw=False, **operation_config): + """Gets specific run command for a subscription in a location. + + :param location: The location upon which run commands is queried. + :type location: str + :param command_id: The command id. + :type command_id: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: RunCommandDocument or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.compute.v2019_03_01.models.RunCommandDocument or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'location': self._serialize.url("location", location, 'str', pattern=r'^[-\w\._]+$'), + 'commandId': self._serialize.url("command_id", command_id, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('RunCommandDocument', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/runCommands/{commandId}'} diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/operations/_virtual_machine_scale_set_extensions_operations.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/operations/_virtual_machine_scale_set_extensions_operations.py new file mode 100644 index 000000000000..110acbc660f9 --- /dev/null +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/operations/_virtual_machine_scale_set_extensions_operations.py @@ -0,0 +1,380 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse +from msrestazure.azure_exceptions import CloudError +from msrest.polling import LROPoller, NoPolling +from msrestazure.polling.arm_polling import ARMPolling + +from .. import models + + +class VirtualMachineScaleSetExtensionsOperations(object): + """VirtualMachineScaleSetExtensionsOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: Client Api Version. Constant value: "2019-03-01". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2019-03-01" + + self.config = config + + + def _create_or_update_initial( + self, resource_group_name, vm_scale_set_name, vmss_extension_name, extension_parameters, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.create_or_update.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), + 'vmssExtensionName': self._serialize.url("vmss_extension_name", vmss_extension_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(extension_parameters, 'VirtualMachineScaleSetExtension') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 201]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('VirtualMachineScaleSetExtension', response) + if response.status_code == 201: + deserialized = self._deserialize('VirtualMachineScaleSetExtension', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def create_or_update( + self, resource_group_name, vm_scale_set_name, vmss_extension_name, extension_parameters, custom_headers=None, raw=False, polling=True, **operation_config): + """The operation to create or update an extension. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param vm_scale_set_name: The name of the VM scale set where the + extension should be create or updated. + :type vm_scale_set_name: str + :param vmss_extension_name: The name of the VM scale set extension. + :type vmss_extension_name: str + :param extension_parameters: Parameters supplied to the Create VM + scale set Extension operation. + :type extension_parameters: + ~azure.mgmt.compute.v2019_03_01.models.VirtualMachineScaleSetExtension + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns + VirtualMachineScaleSetExtension or + ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2019_03_01.models.VirtualMachineScaleSetExtension] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2019_03_01.models.VirtualMachineScaleSetExtension]] + :raises: :class:`CloudError` + """ + raw_result = self._create_or_update_initial( + resource_group_name=resource_group_name, + vm_scale_set_name=vm_scale_set_name, + vmss_extension_name=vmss_extension_name, + extension_parameters=extension_parameters, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('VirtualMachineScaleSetExtension', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/extensions/{vmssExtensionName}'} + + + def _delete_initial( + self, resource_group_name, vm_scale_set_name, vmss_extension_name, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.delete.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), + 'vmssExtensionName': self._serialize.url("vmss_extension_name", vmss_extension_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202, 204]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + def delete( + self, resource_group_name, vm_scale_set_name, vmss_extension_name, custom_headers=None, raw=False, polling=True, **operation_config): + """The operation to delete the extension. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param vm_scale_set_name: The name of the VM scale set where the + extension should be deleted. + :type vm_scale_set_name: str + :param vmss_extension_name: The name of the VM scale set extension. + :type vmss_extension_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns None or + ClientRawResponse if raw==True + :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] + :raises: :class:`CloudError` + """ + raw_result = self._delete_initial( + resource_group_name=resource_group_name, + vm_scale_set_name=vm_scale_set_name, + vmss_extension_name=vmss_extension_name, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/extensions/{vmssExtensionName}'} + + def get( + self, resource_group_name, vm_scale_set_name, vmss_extension_name, expand=None, custom_headers=None, raw=False, **operation_config): + """The operation to get the extension. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param vm_scale_set_name: The name of the VM scale set containing the + extension. + :type vm_scale_set_name: str + :param vmss_extension_name: The name of the VM scale set extension. + :type vmss_extension_name: str + :param expand: The expand expression to apply on the operation. + :type expand: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: VirtualMachineScaleSetExtension or ClientRawResponse if + raw=true + :rtype: + ~azure.mgmt.compute.v2019_03_01.models.VirtualMachineScaleSetExtension + or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), + 'vmssExtensionName': self._serialize.url("vmss_extension_name", vmss_extension_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + if expand is not None: + query_parameters['$expand'] = self._serialize.query("expand", expand, 'str') + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('VirtualMachineScaleSetExtension', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/extensions/{vmssExtensionName}'} + + def list( + self, resource_group_name, vm_scale_set_name, custom_headers=None, raw=False, **operation_config): + """Gets a list of all extensions in a VM scale set. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param vm_scale_set_name: The name of the VM scale set containing the + extension. + :type vm_scale_set_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of VirtualMachineScaleSetExtension + :rtype: + ~azure.mgmt.compute.v2019_03_01.models.VirtualMachineScaleSetExtensionPaged[~azure.mgmt.compute.v2019_03_01.models.VirtualMachineScaleSetExtension] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.VirtualMachineScaleSetExtensionPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/extensions'} diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/operations/_virtual_machine_scale_set_rolling_upgrades_operations.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/operations/_virtual_machine_scale_set_rolling_upgrades_operations.py new file mode 100644 index 000000000000..84f89d9c14e9 --- /dev/null +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/operations/_virtual_machine_scale_set_rolling_upgrades_operations.py @@ -0,0 +1,348 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse +from msrestazure.azure_exceptions import CloudError +from msrest.polling import LROPoller, NoPolling +from msrestazure.polling.arm_polling import ARMPolling + +from .. import models + + +class VirtualMachineScaleSetRollingUpgradesOperations(object): + """VirtualMachineScaleSetRollingUpgradesOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: Client Api Version. Constant value: "2019-03-01". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2019-03-01" + + self.config = config + + + def _cancel_initial( + self, resource_group_name, vm_scale_set_name, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.cancel.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + def cancel( + self, resource_group_name, vm_scale_set_name, custom_headers=None, raw=False, polling=True, **operation_config): + """Cancels the current virtual machine scale set rolling upgrade. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param vm_scale_set_name: The name of the VM scale set. + :type vm_scale_set_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns None or + ClientRawResponse if raw==True + :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] + :raises: :class:`CloudError` + """ + raw_result = self._cancel_initial( + resource_group_name=resource_group_name, + vm_scale_set_name=vm_scale_set_name, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + cancel.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/rollingUpgrades/cancel'} + + + def _start_os_upgrade_initial( + self, resource_group_name, vm_scale_set_name, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.start_os_upgrade.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + def start_os_upgrade( + self, resource_group_name, vm_scale_set_name, custom_headers=None, raw=False, polling=True, **operation_config): + """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. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param vm_scale_set_name: The name of the VM scale set. + :type vm_scale_set_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns None or + ClientRawResponse if raw==True + :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] + :raises: :class:`CloudError` + """ + raw_result = self._start_os_upgrade_initial( + resource_group_name=resource_group_name, + vm_scale_set_name=vm_scale_set_name, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + start_os_upgrade.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/osRollingUpgrade'} + + + def _start_extension_upgrade_initial( + self, resource_group_name, vm_scale_set_name, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.start_extension_upgrade.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + def start_extension_upgrade( + self, resource_group_name, vm_scale_set_name, custom_headers=None, raw=False, polling=True, **operation_config): + """Starts a rolling upgrade to move all extensions for all virtual machine + scale set instances to the latest available extension version. + Instances which are already running the latest extension versions are + not affected. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param vm_scale_set_name: The name of the VM scale set. + :type vm_scale_set_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns None or + ClientRawResponse if raw==True + :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] + :raises: :class:`CloudError` + """ + raw_result = self._start_extension_upgrade_initial( + resource_group_name=resource_group_name, + vm_scale_set_name=vm_scale_set_name, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + start_extension_upgrade.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/extensionRollingUpgrade'} + + def get_latest( + self, resource_group_name, vm_scale_set_name, custom_headers=None, raw=False, **operation_config): + """Gets the status of the latest virtual machine scale set rolling + upgrade. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param vm_scale_set_name: The name of the VM scale set. + :type vm_scale_set_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: RollingUpgradeStatusInfo or ClientRawResponse if raw=true + :rtype: + ~azure.mgmt.compute.v2019_03_01.models.RollingUpgradeStatusInfo or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get_latest.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('RollingUpgradeStatusInfo', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_latest.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/rollingUpgrades/latest'} diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/operations/_virtual_machine_scale_set_vms_operations.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/operations/_virtual_machine_scale_set_vms_operations.py new file mode 100644 index 000000000000..f995fbbb042e --- /dev/null +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/operations/_virtual_machine_scale_set_vms_operations.py @@ -0,0 +1,1252 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse +from msrestazure.azure_exceptions import CloudError +from msrest.polling import LROPoller, NoPolling +from msrestazure.polling.arm_polling import ARMPolling + +from .. import models + + +class VirtualMachineScaleSetVMsOperations(object): + """VirtualMachineScaleSetVMsOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: Client Api Version. Constant value: "2019-03-01". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2019-03-01" + + self.config = config + + + def _reimage_initial( + self, resource_group_name, vm_scale_set_name, instance_id, temp_disk=None, custom_headers=None, raw=False, **operation_config): + vm_scale_set_vm_reimage_input = None + if temp_disk is not None: + vm_scale_set_vm_reimage_input = models.VirtualMachineScaleSetVMReimageParameters(temp_disk=temp_disk) + + # Construct URL + url = self.reimage.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), + 'instanceId': self._serialize.url("instance_id", instance_id, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + if vm_scale_set_vm_reimage_input is not None: + body_content = self._serialize.body(vm_scale_set_vm_reimage_input, 'VirtualMachineScaleSetVMReimageParameters') + else: + body_content = None + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + def reimage( + self, resource_group_name, vm_scale_set_name, instance_id, temp_disk=None, custom_headers=None, raw=False, polling=True, **operation_config): + """Reimages (upgrade the operating system) a specific virtual machine in a + VM scale set. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param vm_scale_set_name: The name of the VM scale set. + :type vm_scale_set_name: str + :param instance_id: The instance ID of the virtual machine. + :type instance_id: str + :param temp_disk: Specifies whether to reimage temp disk. Default + value: false. Note: This temp disk reimage parameter is only supported + for VM/VMSS with Ephemeral OS disk. + :type temp_disk: bool + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns None or + ClientRawResponse if raw==True + :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] + :raises: :class:`CloudError` + """ + raw_result = self._reimage_initial( + resource_group_name=resource_group_name, + vm_scale_set_name=vm_scale_set_name, + instance_id=instance_id, + temp_disk=temp_disk, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + reimage.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/virtualmachines/{instanceId}/reimage'} + + + def _reimage_all_initial( + self, resource_group_name, vm_scale_set_name, instance_id, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.reimage_all.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), + 'instanceId': self._serialize.url("instance_id", instance_id, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + def reimage_all( + self, resource_group_name, vm_scale_set_name, instance_id, custom_headers=None, raw=False, polling=True, **operation_config): + """Allows you to re-image all the disks ( including data disks ) in the a + VM scale set instance. This operation is only supported for managed + disks. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param vm_scale_set_name: The name of the VM scale set. + :type vm_scale_set_name: str + :param instance_id: The instance ID of the virtual machine. + :type instance_id: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns None or + ClientRawResponse if raw==True + :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] + :raises: :class:`CloudError` + """ + raw_result = self._reimage_all_initial( + resource_group_name=resource_group_name, + vm_scale_set_name=vm_scale_set_name, + instance_id=instance_id, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + reimage_all.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/virtualmachines/{instanceId}/reimageall'} + + + def _deallocate_initial( + self, resource_group_name, vm_scale_set_name, instance_id, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.deallocate.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), + 'instanceId': self._serialize.url("instance_id", instance_id, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + def deallocate( + self, resource_group_name, vm_scale_set_name, instance_id, custom_headers=None, raw=False, polling=True, **operation_config): + """Deallocates a specific virtual machine in a VM scale set. Shuts down + the virtual machine and releases the compute resources it uses. You are + not billed for the compute resources of this virtual machine once it is + deallocated. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param vm_scale_set_name: The name of the VM scale set. + :type vm_scale_set_name: str + :param instance_id: The instance ID of the virtual machine. + :type instance_id: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns None or + ClientRawResponse if raw==True + :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] + :raises: :class:`CloudError` + """ + raw_result = self._deallocate_initial( + resource_group_name=resource_group_name, + vm_scale_set_name=vm_scale_set_name, + instance_id=instance_id, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + deallocate.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/virtualmachines/{instanceId}/deallocate'} + + + def _update_initial( + self, resource_group_name, vm_scale_set_name, instance_id, parameters, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.update.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), + 'instanceId': self._serialize.url("instance_id", instance_id, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(parameters, 'VirtualMachineScaleSetVM') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('VirtualMachineScaleSetVM', response) + if response.status_code == 202: + deserialized = self._deserialize('VirtualMachineScaleSetVM', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def update( + self, resource_group_name, vm_scale_set_name, instance_id, parameters, custom_headers=None, raw=False, polling=True, **operation_config): + """Updates a virtual machine of a VM scale set. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param vm_scale_set_name: The name of the VM scale set where the + extension should be create or updated. + :type vm_scale_set_name: str + :param instance_id: The instance ID of the virtual machine. + :type instance_id: str + :param parameters: Parameters supplied to the Update Virtual Machine + Scale Sets VM operation. + :type parameters: + ~azure.mgmt.compute.v2019_03_01.models.VirtualMachineScaleSetVM + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns + VirtualMachineScaleSetVM or + ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2019_03_01.models.VirtualMachineScaleSetVM] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2019_03_01.models.VirtualMachineScaleSetVM]] + :raises: :class:`CloudError` + """ + raw_result = self._update_initial( + resource_group_name=resource_group_name, + vm_scale_set_name=vm_scale_set_name, + instance_id=instance_id, + parameters=parameters, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('VirtualMachineScaleSetVM', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/virtualmachines/{instanceId}'} + + + def _delete_initial( + self, resource_group_name, vm_scale_set_name, instance_id, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.delete.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), + 'instanceId': self._serialize.url("instance_id", instance_id, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202, 204]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + def delete( + self, resource_group_name, vm_scale_set_name, instance_id, custom_headers=None, raw=False, polling=True, **operation_config): + """Deletes a virtual machine from a VM scale set. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param vm_scale_set_name: The name of the VM scale set. + :type vm_scale_set_name: str + :param instance_id: The instance ID of the virtual machine. + :type instance_id: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns None or + ClientRawResponse if raw==True + :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] + :raises: :class:`CloudError` + """ + raw_result = self._delete_initial( + resource_group_name=resource_group_name, + vm_scale_set_name=vm_scale_set_name, + instance_id=instance_id, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/virtualmachines/{instanceId}'} + + def get( + self, resource_group_name, vm_scale_set_name, instance_id, custom_headers=None, raw=False, **operation_config): + """Gets a virtual machine from a VM scale set. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param vm_scale_set_name: The name of the VM scale set. + :type vm_scale_set_name: str + :param instance_id: The instance ID of the virtual machine. + :type instance_id: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: VirtualMachineScaleSetVM or ClientRawResponse if raw=true + :rtype: + ~azure.mgmt.compute.v2019_03_01.models.VirtualMachineScaleSetVM or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), + 'instanceId': self._serialize.url("instance_id", instance_id, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('VirtualMachineScaleSetVM', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/virtualmachines/{instanceId}'} + + def get_instance_view( + self, resource_group_name, vm_scale_set_name, instance_id, custom_headers=None, raw=False, **operation_config): + """Gets the status of a virtual machine from a VM scale set. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param vm_scale_set_name: The name of the VM scale set. + :type vm_scale_set_name: str + :param instance_id: The instance ID of the virtual machine. + :type instance_id: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: VirtualMachineScaleSetVMInstanceView or ClientRawResponse if + raw=true + :rtype: + ~azure.mgmt.compute.v2019_03_01.models.VirtualMachineScaleSetVMInstanceView + or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get_instance_view.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), + 'instanceId': self._serialize.url("instance_id", instance_id, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('VirtualMachineScaleSetVMInstanceView', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_instance_view.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/virtualmachines/{instanceId}/instanceView'} + + def list( + self, resource_group_name, virtual_machine_scale_set_name, filter=None, select=None, expand=None, custom_headers=None, raw=False, **operation_config): + """Gets a list of all virtual machines in a VM scale sets. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param virtual_machine_scale_set_name: The name of the VM scale set. + :type virtual_machine_scale_set_name: str + :param filter: The filter to apply to the operation. + :type filter: str + :param select: The list parameters. + :type select: str + :param expand: The expand expression to apply to the operation. + :type expand: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of VirtualMachineScaleSetVM + :rtype: + ~azure.mgmt.compute.v2019_03_01.models.VirtualMachineScaleSetVMPaged[~azure.mgmt.compute.v2019_03_01.models.VirtualMachineScaleSetVM] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'virtualMachineScaleSetName': self._serialize.url("virtual_machine_scale_set_name", virtual_machine_scale_set_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + if filter is not None: + query_parameters['$filter'] = self._serialize.query("filter", filter, 'str') + if select is not None: + query_parameters['$select'] = self._serialize.query("select", select, 'str') + if expand is not None: + query_parameters['$expand'] = self._serialize.query("expand", expand, 'str') + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.VirtualMachineScaleSetVMPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{virtualMachineScaleSetName}/virtualMachines'} + + + def _power_off_initial( + self, resource_group_name, vm_scale_set_name, instance_id, skip_shutdown=False, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.power_off.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), + 'instanceId': self._serialize.url("instance_id", instance_id, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + if skip_shutdown is not None: + query_parameters['skipShutdown'] = self._serialize.query("skip_shutdown", skip_shutdown, 'bool') + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + def power_off( + self, resource_group_name, vm_scale_set_name, instance_id, skip_shutdown=False, custom_headers=None, raw=False, polling=True, **operation_config): + """Power off (stop) a virtual machine in a VM scale set. Note that + resources are still attached and you are getting charged for the + resources. Instead, use deallocate to release resources and avoid + charges. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param vm_scale_set_name: The name of the VM scale set. + :type vm_scale_set_name: str + :param instance_id: The instance ID of the virtual machine. + :type instance_id: str + :param skip_shutdown: The parameter to request non-graceful VM + shutdown. True value for this flag indicates non-graceful shutdown + whereas false indicates otherwise. Default value for this flag is + false if not specified + :type skip_shutdown: bool + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns None or + ClientRawResponse if raw==True + :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] + :raises: :class:`CloudError` + """ + raw_result = self._power_off_initial( + resource_group_name=resource_group_name, + vm_scale_set_name=vm_scale_set_name, + instance_id=instance_id, + skip_shutdown=skip_shutdown, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + power_off.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/virtualmachines/{instanceId}/poweroff'} + + + def _restart_initial( + self, resource_group_name, vm_scale_set_name, instance_id, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.restart.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), + 'instanceId': self._serialize.url("instance_id", instance_id, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + def restart( + self, resource_group_name, vm_scale_set_name, instance_id, custom_headers=None, raw=False, polling=True, **operation_config): + """Restarts a virtual machine in a VM scale set. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param vm_scale_set_name: The name of the VM scale set. + :type vm_scale_set_name: str + :param instance_id: The instance ID of the virtual machine. + :type instance_id: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns None or + ClientRawResponse if raw==True + :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] + :raises: :class:`CloudError` + """ + raw_result = self._restart_initial( + resource_group_name=resource_group_name, + vm_scale_set_name=vm_scale_set_name, + instance_id=instance_id, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + restart.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/virtualmachines/{instanceId}/restart'} + + + def _start_initial( + self, resource_group_name, vm_scale_set_name, instance_id, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.start.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), + 'instanceId': self._serialize.url("instance_id", instance_id, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + def start( + self, resource_group_name, vm_scale_set_name, instance_id, custom_headers=None, raw=False, polling=True, **operation_config): + """Starts a virtual machine in a VM scale set. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param vm_scale_set_name: The name of the VM scale set. + :type vm_scale_set_name: str + :param instance_id: The instance ID of the virtual machine. + :type instance_id: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns None or + ClientRawResponse if raw==True + :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] + :raises: :class:`CloudError` + """ + raw_result = self._start_initial( + resource_group_name=resource_group_name, + vm_scale_set_name=vm_scale_set_name, + instance_id=instance_id, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + start.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/virtualmachines/{instanceId}/start'} + + + def _redeploy_initial( + self, resource_group_name, vm_scale_set_name, instance_id, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.redeploy.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), + 'instanceId': self._serialize.url("instance_id", instance_id, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + def redeploy( + self, resource_group_name, vm_scale_set_name, instance_id, custom_headers=None, raw=False, polling=True, **operation_config): + """Redeploys a virtual machine in a VM scale set. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param vm_scale_set_name: The name of the VM scale set. + :type vm_scale_set_name: str + :param instance_id: The instance ID of the virtual machine. + :type instance_id: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns None or + ClientRawResponse if raw==True + :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] + :raises: :class:`CloudError` + """ + raw_result = self._redeploy_initial( + resource_group_name=resource_group_name, + vm_scale_set_name=vm_scale_set_name, + instance_id=instance_id, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + redeploy.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/virtualmachines/{instanceId}/redeploy'} + + + def _perform_maintenance_initial( + self, resource_group_name, vm_scale_set_name, instance_id, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.perform_maintenance.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), + 'instanceId': self._serialize.url("instance_id", instance_id, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + def perform_maintenance( + self, resource_group_name, vm_scale_set_name, instance_id, custom_headers=None, raw=False, polling=True, **operation_config): + """Performs maintenance on a virtual machine in a VM scale set. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param vm_scale_set_name: The name of the VM scale set. + :type vm_scale_set_name: str + :param instance_id: The instance ID of the virtual machine. + :type instance_id: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns None or + ClientRawResponse if raw==True + :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] + :raises: :class:`CloudError` + """ + raw_result = self._perform_maintenance_initial( + resource_group_name=resource_group_name, + vm_scale_set_name=vm_scale_set_name, + instance_id=instance_id, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + perform_maintenance.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/virtualmachines/{instanceId}/performMaintenance'} + + + def _run_command_initial( + self, resource_group_name, vm_scale_set_name, instance_id, parameters, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.run_command.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), + 'instanceId': self._serialize.url("instance_id", instance_id, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(parameters, 'RunCommandInput') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('RunCommandResult', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def run_command( + self, resource_group_name, vm_scale_set_name, instance_id, parameters, custom_headers=None, raw=False, polling=True, **operation_config): + """Run command on a virtual machine in a VM scale set. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param vm_scale_set_name: The name of the VM scale set. + :type vm_scale_set_name: str + :param instance_id: The instance ID of the virtual machine. + :type instance_id: str + :param parameters: Parameters supplied to the Run command operation. + :type parameters: + ~azure.mgmt.compute.v2019_03_01.models.RunCommandInput + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns RunCommandResult or + ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2019_03_01.models.RunCommandResult] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2019_03_01.models.RunCommandResult]] + :raises: :class:`CloudError` + """ + raw_result = self._run_command_initial( + resource_group_name=resource_group_name, + vm_scale_set_name=vm_scale_set_name, + instance_id=instance_id, + parameters=parameters, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('RunCommandResult', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + run_command.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/virtualmachines/{instanceId}/runCommand'} diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/operations/_virtual_machine_scale_sets_operations.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/operations/_virtual_machine_scale_sets_operations.py new file mode 100644 index 000000000000..ea155be18cac --- /dev/null +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/operations/_virtual_machine_scale_sets_operations.py @@ -0,0 +1,1838 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse +from msrestazure.azure_exceptions import CloudError +from msrest.polling import LROPoller, NoPolling +from msrestazure.polling.arm_polling import ARMPolling + +from .. import models + + +class VirtualMachineScaleSetsOperations(object): + """VirtualMachineScaleSetsOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: Client Api Version. Constant value: "2019-03-01". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2019-03-01" + + self.config = config + + + def _create_or_update_initial( + self, resource_group_name, vm_scale_set_name, parameters, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.create_or_update.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(parameters, 'VirtualMachineScaleSet') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 201]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('VirtualMachineScaleSet', response) + if response.status_code == 201: + deserialized = self._deserialize('VirtualMachineScaleSet', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def create_or_update( + self, resource_group_name, vm_scale_set_name, parameters, custom_headers=None, raw=False, polling=True, **operation_config): + """Create or update a VM scale set. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param vm_scale_set_name: The name of the VM scale set to create or + update. + :type vm_scale_set_name: str + :param parameters: The scale set object. + :type parameters: + ~azure.mgmt.compute.v2019_03_01.models.VirtualMachineScaleSet + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns VirtualMachineScaleSet + or ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2019_03_01.models.VirtualMachineScaleSet] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2019_03_01.models.VirtualMachineScaleSet]] + :raises: :class:`CloudError` + """ + raw_result = self._create_or_update_initial( + resource_group_name=resource_group_name, + vm_scale_set_name=vm_scale_set_name, + parameters=parameters, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('VirtualMachineScaleSet', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}'} + + + def _update_initial( + self, resource_group_name, vm_scale_set_name, parameters, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.update.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(parameters, 'VirtualMachineScaleSetUpdate') + + # Construct and send request + request = self._client.patch(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('VirtualMachineScaleSet', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def update( + self, resource_group_name, vm_scale_set_name, parameters, custom_headers=None, raw=False, polling=True, **operation_config): + """Update a VM scale set. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param vm_scale_set_name: The name of the VM scale set to create or + update. + :type vm_scale_set_name: str + :param parameters: The scale set object. + :type parameters: + ~azure.mgmt.compute.v2019_03_01.models.VirtualMachineScaleSetUpdate + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns VirtualMachineScaleSet + or ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2019_03_01.models.VirtualMachineScaleSet] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2019_03_01.models.VirtualMachineScaleSet]] + :raises: :class:`CloudError` + """ + raw_result = self._update_initial( + resource_group_name=resource_group_name, + vm_scale_set_name=vm_scale_set_name, + parameters=parameters, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('VirtualMachineScaleSet', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}'} + + + def _delete_initial( + self, resource_group_name, vm_scale_set_name, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.delete.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202, 204]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + def delete( + self, resource_group_name, vm_scale_set_name, custom_headers=None, raw=False, polling=True, **operation_config): + """Deletes a VM scale set. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param vm_scale_set_name: The name of the VM scale set. + :type vm_scale_set_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns None or + ClientRawResponse if raw==True + :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] + :raises: :class:`CloudError` + """ + raw_result = self._delete_initial( + resource_group_name=resource_group_name, + vm_scale_set_name=vm_scale_set_name, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}'} + + def get( + self, resource_group_name, vm_scale_set_name, custom_headers=None, raw=False, **operation_config): + """Display information about a virtual machine scale set. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param vm_scale_set_name: The name of the VM scale set. + :type vm_scale_set_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: VirtualMachineScaleSet or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.compute.v2019_03_01.models.VirtualMachineScaleSet + or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('VirtualMachineScaleSet', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}'} + + + def _deallocate_initial( + self, resource_group_name, vm_scale_set_name, instance_ids=None, custom_headers=None, raw=False, **operation_config): + vm_instance_ids = None + if instance_ids is not None: + vm_instance_ids = models.VirtualMachineScaleSetVMInstanceIDs(instance_ids=instance_ids) + + # Construct URL + url = self.deallocate.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + if vm_instance_ids is not None: + body_content = self._serialize.body(vm_instance_ids, 'VirtualMachineScaleSetVMInstanceIDs') + else: + body_content = None + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + def deallocate( + self, resource_group_name, vm_scale_set_name, instance_ids=None, custom_headers=None, raw=False, polling=True, **operation_config): + """Deallocates specific virtual machines in a VM scale set. Shuts down the + virtual machines and releases the compute resources. You are not billed + for the compute resources that this virtual machine scale set + deallocates. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param vm_scale_set_name: The name of the VM scale set. + :type vm_scale_set_name: str + :param instance_ids: The virtual machine scale set instance ids. + Omitting the virtual machine scale set instance ids will result in the + operation being performed on all virtual machines in the virtual + machine scale set. + :type instance_ids: list[str] + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns None or + ClientRawResponse if raw==True + :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] + :raises: :class:`CloudError` + """ + raw_result = self._deallocate_initial( + resource_group_name=resource_group_name, + vm_scale_set_name=vm_scale_set_name, + instance_ids=instance_ids, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + deallocate.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/deallocate'} + + + def _delete_instances_initial( + self, resource_group_name, vm_scale_set_name, instance_ids, custom_headers=None, raw=False, **operation_config): + vm_instance_ids = models.VirtualMachineScaleSetVMInstanceRequiredIDs(instance_ids=instance_ids) + + # Construct URL + url = self.delete_instances.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(vm_instance_ids, 'VirtualMachineScaleSetVMInstanceRequiredIDs') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + def delete_instances( + self, resource_group_name, vm_scale_set_name, instance_ids, custom_headers=None, raw=False, polling=True, **operation_config): + """Deletes virtual machines in a VM scale set. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param vm_scale_set_name: The name of the VM scale set. + :type vm_scale_set_name: str + :param instance_ids: The virtual machine scale set instance ids. + :type instance_ids: list[str] + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns None or + ClientRawResponse if raw==True + :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] + :raises: :class:`CloudError` + """ + raw_result = self._delete_instances_initial( + resource_group_name=resource_group_name, + vm_scale_set_name=vm_scale_set_name, + instance_ids=instance_ids, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + delete_instances.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/delete'} + + def get_instance_view( + self, resource_group_name, vm_scale_set_name, custom_headers=None, raw=False, **operation_config): + """Gets the status of a VM scale set instance. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param vm_scale_set_name: The name of the VM scale set. + :type vm_scale_set_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: VirtualMachineScaleSetInstanceView or ClientRawResponse if + raw=true + :rtype: + ~azure.mgmt.compute.v2019_03_01.models.VirtualMachineScaleSetInstanceView + or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get_instance_view.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('VirtualMachineScaleSetInstanceView', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_instance_view.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/instanceView'} + + def list( + self, resource_group_name, custom_headers=None, raw=False, **operation_config): + """Gets a list of all VM scale sets under a resource group. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of VirtualMachineScaleSet + :rtype: + ~azure.mgmt.compute.v2019_03_01.models.VirtualMachineScaleSetPaged[~azure.mgmt.compute.v2019_03_01.models.VirtualMachineScaleSet] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.VirtualMachineScaleSetPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets'} + + def list_all( + self, custom_headers=None, raw=False, **operation_config): + """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. + + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of VirtualMachineScaleSet + :rtype: + ~azure.mgmt.compute.v2019_03_01.models.VirtualMachineScaleSetPaged[~azure.mgmt.compute.v2019_03_01.models.VirtualMachineScaleSet] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_all.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.VirtualMachineScaleSetPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_all.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Compute/virtualMachineScaleSets'} + + def list_skus( + self, resource_group_name, vm_scale_set_name, custom_headers=None, raw=False, **operation_config): + """Gets a list of SKUs available for your VM scale set, including the + minimum and maximum VM instances allowed for each SKU. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param vm_scale_set_name: The name of the VM scale set. + :type vm_scale_set_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of VirtualMachineScaleSetSku + :rtype: + ~azure.mgmt.compute.v2019_03_01.models.VirtualMachineScaleSetSkuPaged[~azure.mgmt.compute.v2019_03_01.models.VirtualMachineScaleSetSku] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_skus.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.VirtualMachineScaleSetSkuPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_skus.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/skus'} + + def get_os_upgrade_history( + self, resource_group_name, vm_scale_set_name, custom_headers=None, raw=False, **operation_config): + """Gets list of OS upgrades on a VM scale set instance. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param vm_scale_set_name: The name of the VM scale set. + :type vm_scale_set_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of + UpgradeOperationHistoricalStatusInfo + :rtype: + ~azure.mgmt.compute.v2019_03_01.models.UpgradeOperationHistoricalStatusInfoPaged[~azure.mgmt.compute.v2019_03_01.models.UpgradeOperationHistoricalStatusInfo] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.get_os_upgrade_history.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.UpgradeOperationHistoricalStatusInfoPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + get_os_upgrade_history.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/osUpgradeHistory'} + + + def _power_off_initial( + self, resource_group_name, vm_scale_set_name, skip_shutdown=False, instance_ids=None, custom_headers=None, raw=False, **operation_config): + vm_instance_ids = None + if instance_ids is not None: + vm_instance_ids = models.VirtualMachineScaleSetVMInstanceIDs(instance_ids=instance_ids) + + # Construct URL + url = self.power_off.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + if skip_shutdown is not None: + query_parameters['skipShutdown'] = self._serialize.query("skip_shutdown", skip_shutdown, 'bool') + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + if vm_instance_ids is not None: + body_content = self._serialize.body(vm_instance_ids, 'VirtualMachineScaleSetVMInstanceIDs') + else: + body_content = None + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + def power_off( + self, resource_group_name, vm_scale_set_name, skip_shutdown=False, instance_ids=None, custom_headers=None, raw=False, polling=True, **operation_config): + """Power off (stop) one or more virtual machines in a VM scale set. Note + that resources are still attached and you are getting charged for the + resources. Instead, use deallocate to release resources and avoid + charges. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param vm_scale_set_name: The name of the VM scale set. + :type vm_scale_set_name: str + :param skip_shutdown: The parameter to request non-graceful VM + shutdown. True value for this flag indicates non-graceful shutdown + whereas false indicates otherwise. Default value for this flag is + false if not specified + :type skip_shutdown: bool + :param instance_ids: The virtual machine scale set instance ids. + Omitting the virtual machine scale set instance ids will result in the + operation being performed on all virtual machines in the virtual + machine scale set. + :type instance_ids: list[str] + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns None or + ClientRawResponse if raw==True + :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] + :raises: :class:`CloudError` + """ + raw_result = self._power_off_initial( + resource_group_name=resource_group_name, + vm_scale_set_name=vm_scale_set_name, + skip_shutdown=skip_shutdown, + instance_ids=instance_ids, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + power_off.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/poweroff'} + + + def _restart_initial( + self, resource_group_name, vm_scale_set_name, instance_ids=None, custom_headers=None, raw=False, **operation_config): + vm_instance_ids = None + if instance_ids is not None: + vm_instance_ids = models.VirtualMachineScaleSetVMInstanceIDs(instance_ids=instance_ids) + + # Construct URL + url = self.restart.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + if vm_instance_ids is not None: + body_content = self._serialize.body(vm_instance_ids, 'VirtualMachineScaleSetVMInstanceIDs') + else: + body_content = None + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + def restart( + self, resource_group_name, vm_scale_set_name, instance_ids=None, custom_headers=None, raw=False, polling=True, **operation_config): + """Restarts one or more virtual machines in a VM scale set. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param vm_scale_set_name: The name of the VM scale set. + :type vm_scale_set_name: str + :param instance_ids: The virtual machine scale set instance ids. + Omitting the virtual machine scale set instance ids will result in the + operation being performed on all virtual machines in the virtual + machine scale set. + :type instance_ids: list[str] + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns None or + ClientRawResponse if raw==True + :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] + :raises: :class:`CloudError` + """ + raw_result = self._restart_initial( + resource_group_name=resource_group_name, + vm_scale_set_name=vm_scale_set_name, + instance_ids=instance_ids, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + restart.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/restart'} + + + def _start_initial( + self, resource_group_name, vm_scale_set_name, instance_ids=None, custom_headers=None, raw=False, **operation_config): + vm_instance_ids = None + if instance_ids is not None: + vm_instance_ids = models.VirtualMachineScaleSetVMInstanceIDs(instance_ids=instance_ids) + + # Construct URL + url = self.start.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + if vm_instance_ids is not None: + body_content = self._serialize.body(vm_instance_ids, 'VirtualMachineScaleSetVMInstanceIDs') + else: + body_content = None + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + def start( + self, resource_group_name, vm_scale_set_name, instance_ids=None, custom_headers=None, raw=False, polling=True, **operation_config): + """Starts one or more virtual machines in a VM scale set. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param vm_scale_set_name: The name of the VM scale set. + :type vm_scale_set_name: str + :param instance_ids: The virtual machine scale set instance ids. + Omitting the virtual machine scale set instance ids will result in the + operation being performed on all virtual machines in the virtual + machine scale set. + :type instance_ids: list[str] + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns None or + ClientRawResponse if raw==True + :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] + :raises: :class:`CloudError` + """ + raw_result = self._start_initial( + resource_group_name=resource_group_name, + vm_scale_set_name=vm_scale_set_name, + instance_ids=instance_ids, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + start.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/start'} + + + def _redeploy_initial( + self, resource_group_name, vm_scale_set_name, instance_ids=None, custom_headers=None, raw=False, **operation_config): + vm_instance_ids = None + if instance_ids is not None: + vm_instance_ids = models.VirtualMachineScaleSetVMInstanceIDs(instance_ids=instance_ids) + + # Construct URL + url = self.redeploy.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + if vm_instance_ids is not None: + body_content = self._serialize.body(vm_instance_ids, 'VirtualMachineScaleSetVMInstanceIDs') + else: + body_content = None + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + def redeploy( + self, resource_group_name, vm_scale_set_name, instance_ids=None, custom_headers=None, raw=False, polling=True, **operation_config): + """Redeploy one or more virtual machines in a VM scale set. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param vm_scale_set_name: The name of the VM scale set. + :type vm_scale_set_name: str + :param instance_ids: The virtual machine scale set instance ids. + Omitting the virtual machine scale set instance ids will result in the + operation being performed on all virtual machines in the virtual + machine scale set. + :type instance_ids: list[str] + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns None or + ClientRawResponse if raw==True + :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] + :raises: :class:`CloudError` + """ + raw_result = self._redeploy_initial( + resource_group_name=resource_group_name, + vm_scale_set_name=vm_scale_set_name, + instance_ids=instance_ids, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + redeploy.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/redeploy'} + + + def _perform_maintenance_initial( + self, resource_group_name, vm_scale_set_name, instance_ids=None, custom_headers=None, raw=False, **operation_config): + vm_instance_ids = None + if instance_ids is not None: + vm_instance_ids = models.VirtualMachineScaleSetVMInstanceIDs(instance_ids=instance_ids) + + # Construct URL + url = self.perform_maintenance.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + if vm_instance_ids is not None: + body_content = self._serialize.body(vm_instance_ids, 'VirtualMachineScaleSetVMInstanceIDs') + else: + body_content = None + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + def perform_maintenance( + self, resource_group_name, vm_scale_set_name, instance_ids=None, custom_headers=None, raw=False, polling=True, **operation_config): + """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. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param vm_scale_set_name: The name of the VM scale set. + :type vm_scale_set_name: str + :param instance_ids: The virtual machine scale set instance ids. + Omitting the virtual machine scale set instance ids will result in the + operation being performed on all virtual machines in the virtual + machine scale set. + :type instance_ids: list[str] + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns None or + ClientRawResponse if raw==True + :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] + :raises: :class:`CloudError` + """ + raw_result = self._perform_maintenance_initial( + resource_group_name=resource_group_name, + vm_scale_set_name=vm_scale_set_name, + instance_ids=instance_ids, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + perform_maintenance.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/performMaintenance'} + + + def _update_instances_initial( + self, resource_group_name, vm_scale_set_name, instance_ids, custom_headers=None, raw=False, **operation_config): + vm_instance_ids = models.VirtualMachineScaleSetVMInstanceRequiredIDs(instance_ids=instance_ids) + + # Construct URL + url = self.update_instances.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(vm_instance_ids, 'VirtualMachineScaleSetVMInstanceRequiredIDs') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + def update_instances( + self, resource_group_name, vm_scale_set_name, instance_ids, custom_headers=None, raw=False, polling=True, **operation_config): + """Upgrades one or more virtual machines to the latest SKU set in the VM + scale set model. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param vm_scale_set_name: The name of the VM scale set. + :type vm_scale_set_name: str + :param instance_ids: The virtual machine scale set instance ids. + :type instance_ids: list[str] + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns None or + ClientRawResponse if raw==True + :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] + :raises: :class:`CloudError` + """ + raw_result = self._update_instances_initial( + resource_group_name=resource_group_name, + vm_scale_set_name=vm_scale_set_name, + instance_ids=instance_ids, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + update_instances.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/manualupgrade'} + + + def _reimage_initial( + self, resource_group_name, vm_scale_set_name, temp_disk=None, instance_ids=None, custom_headers=None, raw=False, **operation_config): + vm_scale_set_reimage_input = None + if temp_disk is not None or instance_ids is not None: + vm_scale_set_reimage_input = models.VirtualMachineScaleSetReimageParameters(temp_disk=temp_disk, instance_ids=instance_ids) + + # Construct URL + url = self.reimage.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + if vm_scale_set_reimage_input is not None: + body_content = self._serialize.body(vm_scale_set_reimage_input, 'VirtualMachineScaleSetReimageParameters') + else: + body_content = None + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + def reimage( + self, resource_group_name, vm_scale_set_name, temp_disk=None, instance_ids=None, custom_headers=None, raw=False, polling=True, **operation_config): + """Reimages (upgrade the operating system) one or more virtual machines in + a VM scale set which don't have a ephemeral OS disk, for virtual + machines who have a ephemeral OS disk the virtual machine is reset to + initial state. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param vm_scale_set_name: The name of the VM scale set. + :type vm_scale_set_name: str + :param temp_disk: Specifies whether to reimage temp disk. Default + value: false. Note: This temp disk reimage parameter is only supported + for VM/VMSS with Ephemeral OS disk. + :type temp_disk: bool + :param instance_ids: The virtual machine scale set instance ids. + Omitting the virtual machine scale set instance ids will result in the + operation being performed on all virtual machines in the virtual + machine scale set. + :type instance_ids: list[str] + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns None or + ClientRawResponse if raw==True + :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] + :raises: :class:`CloudError` + """ + raw_result = self._reimage_initial( + resource_group_name=resource_group_name, + vm_scale_set_name=vm_scale_set_name, + temp_disk=temp_disk, + instance_ids=instance_ids, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + reimage.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/reimage'} + + + def _reimage_all_initial( + self, resource_group_name, vm_scale_set_name, instance_ids=None, custom_headers=None, raw=False, **operation_config): + vm_instance_ids = None + if instance_ids is not None: + vm_instance_ids = models.VirtualMachineScaleSetVMInstanceIDs(instance_ids=instance_ids) + + # Construct URL + url = self.reimage_all.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + if vm_instance_ids is not None: + body_content = self._serialize.body(vm_instance_ids, 'VirtualMachineScaleSetVMInstanceIDs') + else: + body_content = None + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + def reimage_all( + self, resource_group_name, vm_scale_set_name, instance_ids=None, custom_headers=None, raw=False, polling=True, **operation_config): + """Reimages all the disks ( including data disks ) in the virtual machines + in a VM scale set. This operation is only supported for managed disks. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param vm_scale_set_name: The name of the VM scale set. + :type vm_scale_set_name: str + :param instance_ids: The virtual machine scale set instance ids. + Omitting the virtual machine scale set instance ids will result in the + operation being performed on all virtual machines in the virtual + machine scale set. + :type instance_ids: list[str] + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns None or + ClientRawResponse if raw==True + :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] + :raises: :class:`CloudError` + """ + raw_result = self._reimage_all_initial( + resource_group_name=resource_group_name, + vm_scale_set_name=vm_scale_set_name, + instance_ids=instance_ids, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + reimage_all.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/reimageall'} + + def force_recovery_service_fabric_platform_update_domain_walk( + self, resource_group_name, vm_scale_set_name, platform_update_domain, custom_headers=None, raw=False, **operation_config): + """Manual platform update domain walk to update virtual machines in a + service fabric virtual machine scale set. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param vm_scale_set_name: The name of the VM scale set. + :type vm_scale_set_name: str + :param platform_update_domain: The platform update domain for which a + manual recovery walk is requested + :type platform_update_domain: int + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: RecoveryWalkResponse or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.compute.v2019_03_01.models.RecoveryWalkResponse or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.force_recovery_service_fabric_platform_update_domain_walk.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + query_parameters['platformUpdateDomain'] = self._serialize.query("platform_update_domain", platform_update_domain, 'int') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('RecoveryWalkResponse', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + force_recovery_service_fabric_platform_update_domain_walk.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/forceRecoveryServiceFabricPlatformUpdateDomainWalk'} + + def convert_to_single_placement_group( + self, resource_group_name, vm_scale_set_name, active_placement_group_id=None, custom_headers=None, raw=False, **operation_config): + """Converts SinglePlacementGroup property to false for a existing virtual + machine scale set. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param vm_scale_set_name: The name of the virtual machine scale set to + create or update. + :type vm_scale_set_name: str + :param active_placement_group_id: Id of the placement group in which + you want future virtual machine instances to be placed. To query + placement group Id, please use Virtual Machine Scale Set VMs - Get + API. If not provided, the platform will choose one with maximum number + of virtual machine instances. + :type active_placement_group_id: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + parameters = models.VMScaleSetConvertToSinglePlacementGroupInput(active_placement_group_id=active_placement_group_id) + + # Construct URL + url = self.convert_to_single_placement_group.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(parameters, 'VMScaleSetConvertToSinglePlacementGroupInput') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + convert_to_single_placement_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/convertToSinglePlacementGroup'} diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/operations/_virtual_machine_sizes_operations.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/operations/_virtual_machine_sizes_operations.py new file mode 100644 index 000000000000..f32469efa8b7 --- /dev/null +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/operations/_virtual_machine_sizes_operations.py @@ -0,0 +1,111 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse +from msrestazure.azure_exceptions import CloudError + +from .. import models + + +class VirtualMachineSizesOperations(object): + """VirtualMachineSizesOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: Client Api Version. Constant value: "2019-03-01". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2019-03-01" + + self.config = config + + def list( + self, location, custom_headers=None, raw=False, **operation_config): + """This API is deprecated. Use [Resources + Skus](https://docs.microsoft.com/en-us/rest/api/compute/resourceskus/list). + + :param location: The location upon which virtual-machine-sizes is + queried. + :type location: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of VirtualMachineSize + :rtype: + ~azure.mgmt.compute.v2019_03_01.models.VirtualMachineSizePaged[~azure.mgmt.compute.v2019_03_01.models.VirtualMachineSize] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list.metadata['url'] + path_format_arguments = { + 'location': self._serialize.url("location", location, 'str', pattern=r'^[-\w\._]+$'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.VirtualMachineSizePaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/vmSizes'} diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/operations/_virtual_machines_operations.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/operations/_virtual_machines_operations.py new file mode 100644 index 000000000000..da3d502ad8e2 --- /dev/null +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/operations/_virtual_machines_operations.py @@ -0,0 +1,1663 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse +from msrestazure.azure_exceptions import CloudError +from msrest.polling import LROPoller, NoPolling +from msrestazure.polling.arm_polling import ARMPolling + +from .. import models + + +class VirtualMachinesOperations(object): + """VirtualMachinesOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: Client Api Version. Constant value: "2019-03-01". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2019-03-01" + + self.config = config + + def list_by_location( + self, location, custom_headers=None, raw=False, **operation_config): + """Gets all the virtual machines under the specified subscription for the + specified location. + + :param location: The location for which virtual machines under the + subscription are queried. + :type location: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of VirtualMachine + :rtype: + ~azure.mgmt.compute.v2019_03_01.models.VirtualMachinePaged[~azure.mgmt.compute.v2019_03_01.models.VirtualMachine] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_by_location.metadata['url'] + path_format_arguments = { + 'location': self._serialize.url("location", location, 'str', pattern=r'^[-\w\._]+$'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.VirtualMachinePaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_by_location.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/virtualMachines'} + + + def _capture_initial( + self, resource_group_name, vm_name, parameters, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.capture.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vmName': self._serialize.url("vm_name", vm_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(parameters, 'VirtualMachineCaptureParameters') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('VirtualMachineCaptureResult', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def capture( + self, resource_group_name, vm_name, parameters, custom_headers=None, raw=False, polling=True, **operation_config): + """Captures the VM by copying virtual hard disks of the VM and outputs a + template that can be used to create similar VMs. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param vm_name: The name of the virtual machine. + :type vm_name: str + :param parameters: Parameters supplied to the Capture Virtual Machine + operation. + :type parameters: + ~azure.mgmt.compute.v2019_03_01.models.VirtualMachineCaptureParameters + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns + VirtualMachineCaptureResult or + ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2019_03_01.models.VirtualMachineCaptureResult] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2019_03_01.models.VirtualMachineCaptureResult]] + :raises: :class:`CloudError` + """ + raw_result = self._capture_initial( + resource_group_name=resource_group_name, + vm_name=vm_name, + parameters=parameters, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('VirtualMachineCaptureResult', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + capture.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/capture'} + + + def _create_or_update_initial( + self, resource_group_name, vm_name, parameters, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.create_or_update.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vmName': self._serialize.url("vm_name", vm_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(parameters, 'VirtualMachine') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 201]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('VirtualMachine', response) + if response.status_code == 201: + deserialized = self._deserialize('VirtualMachine', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def create_or_update( + self, resource_group_name, vm_name, parameters, custom_headers=None, raw=False, polling=True, **operation_config): + """The operation to create or update a virtual machine. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param vm_name: The name of the virtual machine. + :type vm_name: str + :param parameters: Parameters supplied to the Create Virtual Machine + operation. + :type parameters: + ~azure.mgmt.compute.v2019_03_01.models.VirtualMachine + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns VirtualMachine or + ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2019_03_01.models.VirtualMachine] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2019_03_01.models.VirtualMachine]] + :raises: :class:`CloudError` + """ + raw_result = self._create_or_update_initial( + resource_group_name=resource_group_name, + vm_name=vm_name, + parameters=parameters, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('VirtualMachine', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}'} + + + def _update_initial( + self, resource_group_name, vm_name, parameters, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.update.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vmName': self._serialize.url("vm_name", vm_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(parameters, 'VirtualMachineUpdate') + + # Construct and send request + request = self._client.patch(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 201]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('VirtualMachine', response) + if response.status_code == 201: + deserialized = self._deserialize('VirtualMachine', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def update( + self, resource_group_name, vm_name, parameters, custom_headers=None, raw=False, polling=True, **operation_config): + """The operation to update a virtual machine. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param vm_name: The name of the virtual machine. + :type vm_name: str + :param parameters: Parameters supplied to the Update Virtual Machine + operation. + :type parameters: + ~azure.mgmt.compute.v2019_03_01.models.VirtualMachineUpdate + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns VirtualMachine or + ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2019_03_01.models.VirtualMachine] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2019_03_01.models.VirtualMachine]] + :raises: :class:`CloudError` + """ + raw_result = self._update_initial( + resource_group_name=resource_group_name, + vm_name=vm_name, + parameters=parameters, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('VirtualMachine', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}'} + + + def _delete_initial( + self, resource_group_name, vm_name, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.delete.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vmName': self._serialize.url("vm_name", vm_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202, 204]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + def delete( + self, resource_group_name, vm_name, custom_headers=None, raw=False, polling=True, **operation_config): + """The operation to delete a virtual machine. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param vm_name: The name of the virtual machine. + :type vm_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns None or + ClientRawResponse if raw==True + :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] + :raises: :class:`CloudError` + """ + raw_result = self._delete_initial( + resource_group_name=resource_group_name, + vm_name=vm_name, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}'} + + def get( + self, resource_group_name, vm_name, expand=None, custom_headers=None, raw=False, **operation_config): + """Retrieves information about the model view or the instance view of a + virtual machine. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param vm_name: The name of the virtual machine. + :type vm_name: str + :param expand: The expand expression to apply on the operation. + Possible values include: 'instanceView' + :type expand: str or + ~azure.mgmt.compute.v2019_03_01.models.InstanceViewTypes + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: VirtualMachine or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.compute.v2019_03_01.models.VirtualMachine or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vmName': self._serialize.url("vm_name", vm_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + if expand is not None: + query_parameters['$expand'] = self._serialize.query("expand", expand, 'InstanceViewTypes') + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('VirtualMachine', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}'} + + def instance_view( + self, resource_group_name, vm_name, custom_headers=None, raw=False, **operation_config): + """Retrieves information about the run-time state of a virtual machine. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param vm_name: The name of the virtual machine. + :type vm_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: VirtualMachineInstanceView or ClientRawResponse if raw=true + :rtype: + ~azure.mgmt.compute.v2019_03_01.models.VirtualMachineInstanceView or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.instance_view.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vmName': self._serialize.url("vm_name", vm_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('VirtualMachineInstanceView', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + instance_view.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/instanceView'} + + + def _convert_to_managed_disks_initial( + self, resource_group_name, vm_name, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.convert_to_managed_disks.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vmName': self._serialize.url("vm_name", vm_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + def convert_to_managed_disks( + self, resource_group_name, vm_name, custom_headers=None, raw=False, polling=True, **operation_config): + """Converts virtual machine disks from blob-based to managed disks. + Virtual machine must be stop-deallocated before invoking this + operation. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param vm_name: The name of the virtual machine. + :type vm_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns None or + ClientRawResponse if raw==True + :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] + :raises: :class:`CloudError` + """ + raw_result = self._convert_to_managed_disks_initial( + resource_group_name=resource_group_name, + vm_name=vm_name, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + convert_to_managed_disks.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/convertToManagedDisks'} + + + def _deallocate_initial( + self, resource_group_name, vm_name, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.deallocate.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vmName': self._serialize.url("vm_name", vm_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + def deallocate( + self, resource_group_name, vm_name, custom_headers=None, raw=False, polling=True, **operation_config): + """Shuts down the virtual machine and releases the compute resources. You + are not billed for the compute resources that this virtual machine + uses. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param vm_name: The name of the virtual machine. + :type vm_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns None or + ClientRawResponse if raw==True + :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] + :raises: :class:`CloudError` + """ + raw_result = self._deallocate_initial( + resource_group_name=resource_group_name, + vm_name=vm_name, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + deallocate.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/deallocate'} + + def generalize( + self, resource_group_name, vm_name, custom_headers=None, raw=False, **operation_config): + """Sets the state of the virtual machine to generalized. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param vm_name: The name of the virtual machine. + :type vm_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.generalize.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vmName': self._serialize.url("vm_name", vm_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + generalize.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/generalize'} + + def list( + self, resource_group_name, custom_headers=None, raw=False, **operation_config): + """Lists all of the virtual machines in the specified resource group. Use + the nextLink property in the response to get the next page of virtual + machines. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of VirtualMachine + :rtype: + ~azure.mgmt.compute.v2019_03_01.models.VirtualMachinePaged[~azure.mgmt.compute.v2019_03_01.models.VirtualMachine] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.VirtualMachinePaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines'} + + def list_all( + self, custom_headers=None, raw=False, **operation_config): + """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. + + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of VirtualMachine + :rtype: + ~azure.mgmt.compute.v2019_03_01.models.VirtualMachinePaged[~azure.mgmt.compute.v2019_03_01.models.VirtualMachine] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_all.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.VirtualMachinePaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_all.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Compute/virtualMachines'} + + def list_available_sizes( + self, resource_group_name, vm_name, custom_headers=None, raw=False, **operation_config): + """Lists all available virtual machine sizes to which the specified + virtual machine can be resized. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param vm_name: The name of the virtual machine. + :type vm_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of VirtualMachineSize + :rtype: + ~azure.mgmt.compute.v2019_03_01.models.VirtualMachineSizePaged[~azure.mgmt.compute.v2019_03_01.models.VirtualMachineSize] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_available_sizes.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vmName': self._serialize.url("vm_name", vm_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.VirtualMachineSizePaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_available_sizes.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/vmSizes'} + + + def _power_off_initial( + self, resource_group_name, vm_name, skip_shutdown=False, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.power_off.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vmName': self._serialize.url("vm_name", vm_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + if skip_shutdown is not None: + query_parameters['skipShutdown'] = self._serialize.query("skip_shutdown", skip_shutdown, 'bool') + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + def power_off( + self, resource_group_name, vm_name, skip_shutdown=False, custom_headers=None, raw=False, polling=True, **operation_config): + """The operation to power off (stop) a virtual machine. The virtual + machine can be restarted with the same provisioned resources. You are + still charged for this virtual machine. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param vm_name: The name of the virtual machine. + :type vm_name: str + :param skip_shutdown: The parameter to request non-graceful VM + shutdown. True value for this flag indicates non-graceful shutdown + whereas false indicates otherwise. Default value for this flag is + false if not specified + :type skip_shutdown: bool + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns None or + ClientRawResponse if raw==True + :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] + :raises: :class:`CloudError` + """ + raw_result = self._power_off_initial( + resource_group_name=resource_group_name, + vm_name=vm_name, + skip_shutdown=skip_shutdown, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + power_off.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/powerOff'} + + + def _restart_initial( + self, resource_group_name, vm_name, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.restart.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vmName': self._serialize.url("vm_name", vm_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + def restart( + self, resource_group_name, vm_name, custom_headers=None, raw=False, polling=True, **operation_config): + """The operation to restart a virtual machine. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param vm_name: The name of the virtual machine. + :type vm_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns None or + ClientRawResponse if raw==True + :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] + :raises: :class:`CloudError` + """ + raw_result = self._restart_initial( + resource_group_name=resource_group_name, + vm_name=vm_name, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + restart.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/restart'} + + + def _start_initial( + self, resource_group_name, vm_name, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.start.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vmName': self._serialize.url("vm_name", vm_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + def start( + self, resource_group_name, vm_name, custom_headers=None, raw=False, polling=True, **operation_config): + """The operation to start a virtual machine. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param vm_name: The name of the virtual machine. + :type vm_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns None or + ClientRawResponse if raw==True + :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] + :raises: :class:`CloudError` + """ + raw_result = self._start_initial( + resource_group_name=resource_group_name, + vm_name=vm_name, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + start.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/start'} + + + def _redeploy_initial( + self, resource_group_name, vm_name, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.redeploy.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vmName': self._serialize.url("vm_name", vm_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + def redeploy( + self, resource_group_name, vm_name, custom_headers=None, raw=False, polling=True, **operation_config): + """The operation to redeploy a virtual machine. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param vm_name: The name of the virtual machine. + :type vm_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns None or + ClientRawResponse if raw==True + :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] + :raises: :class:`CloudError` + """ + raw_result = self._redeploy_initial( + resource_group_name=resource_group_name, + vm_name=vm_name, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + redeploy.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/redeploy'} + + + def _reimage_initial( + self, resource_group_name, vm_name, temp_disk=None, custom_headers=None, raw=False, **operation_config): + parameters = None + if temp_disk is not None: + parameters = models.VirtualMachineReimageParameters(temp_disk=temp_disk) + + # Construct URL + url = self.reimage.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vmName': self._serialize.url("vm_name", vm_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + if parameters is not None: + body_content = self._serialize.body(parameters, 'VirtualMachineReimageParameters') + else: + body_content = None + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + def reimage( + self, resource_group_name, vm_name, temp_disk=None, custom_headers=None, raw=False, polling=True, **operation_config): + """Reimages the virtual machine which has an ephemeral OS disk back to its + initial state. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param vm_name: The name of the virtual machine. + :type vm_name: str + :param temp_disk: Specifies whether to reimage temp disk. Default + value: false. Note: This temp disk reimage parameter is only supported + for VM/VMSS with Ephemeral OS disk. + :type temp_disk: bool + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns None or + ClientRawResponse if raw==True + :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] + :raises: :class:`CloudError` + """ + raw_result = self._reimage_initial( + resource_group_name=resource_group_name, + vm_name=vm_name, + temp_disk=temp_disk, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + reimage.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/reimage'} + + + def _perform_maintenance_initial( + self, resource_group_name, vm_name, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.perform_maintenance.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vmName': self._serialize.url("vm_name", vm_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + def perform_maintenance( + self, resource_group_name, vm_name, custom_headers=None, raw=False, polling=True, **operation_config): + """The operation to perform maintenance on a virtual machine. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param vm_name: The name of the virtual machine. + :type vm_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns None or + ClientRawResponse if raw==True + :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] + :raises: :class:`CloudError` + """ + raw_result = self._perform_maintenance_initial( + resource_group_name=resource_group_name, + vm_name=vm_name, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + perform_maintenance.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/performMaintenance'} + + + def _run_command_initial( + self, resource_group_name, vm_name, parameters, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.run_command.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vmName': self._serialize.url("vm_name", vm_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(parameters, 'RunCommandInput') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('RunCommandResult', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def run_command( + self, resource_group_name, vm_name, parameters, custom_headers=None, raw=False, polling=True, **operation_config): + """Run command on the VM. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param vm_name: The name of the virtual machine. + :type vm_name: str + :param parameters: Parameters supplied to the Run command operation. + :type parameters: + ~azure.mgmt.compute.v2019_03_01.models.RunCommandInput + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns RunCommandResult or + ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2019_03_01.models.RunCommandResult] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2019_03_01.models.RunCommandResult]] + :raises: :class:`CloudError` + """ + raw_result = self._run_command_initial( + resource_group_name=resource_group_name, + vm_name=vm_name, + parameters=parameters, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('RunCommandResult', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + run_command.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/runCommand'} diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/operations/availability_sets_operations.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/operations/availability_sets_operations.py deleted file mode 100644 index 7e09d153713d..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/operations/availability_sets_operations.py +++ /dev/null @@ -1,495 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError - -from .. import models - - -class AvailabilitySetsOperations(object): - """AvailabilitySetsOperations operations. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: Client Api Version. Constant value: "2019-03-01". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2019-03-01" - - self.config = config - - def create_or_update( - self, resource_group_name, availability_set_name, parameters, custom_headers=None, raw=False, **operation_config): - """Create or update an availability set. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param availability_set_name: The name of the availability set. - :type availability_set_name: str - :param parameters: Parameters supplied to the Create Availability Set - operation. - :type parameters: - ~azure.mgmt.compute.v2019_03_01.models.AvailabilitySet - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: AvailabilitySet or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.compute.v2019_03_01.models.AvailabilitySet or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.create_or_update.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'availabilitySetName': self._serialize.url("availability_set_name", availability_set_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(parameters, 'AvailabilitySet') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('AvailabilitySet', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}'} - - def update( - self, resource_group_name, availability_set_name, parameters, custom_headers=None, raw=False, **operation_config): - """Update an availability set. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param availability_set_name: The name of the availability set. - :type availability_set_name: str - :param parameters: Parameters supplied to the Update Availability Set - operation. - :type parameters: - ~azure.mgmt.compute.v2019_03_01.models.AvailabilitySetUpdate - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: AvailabilitySet or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.compute.v2019_03_01.models.AvailabilitySet or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.update.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'availabilitySetName': self._serialize.url("availability_set_name", availability_set_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(parameters, 'AvailabilitySetUpdate') - - # Construct and send request - request = self._client.patch(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('AvailabilitySet', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}'} - - def delete( - self, resource_group_name, availability_set_name, custom_headers=None, raw=False, **operation_config): - """Delete an availability set. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param availability_set_name: The name of the availability set. - :type availability_set_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.delete.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'availabilitySetName': self._serialize.url("availability_set_name", availability_set_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 204]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}'} - - def get( - self, resource_group_name, availability_set_name, custom_headers=None, raw=False, **operation_config): - """Retrieves information about an availability set. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param availability_set_name: The name of the availability set. - :type availability_set_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: AvailabilitySet or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.compute.v2019_03_01.models.AvailabilitySet or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'availabilitySetName': self._serialize.url("availability_set_name", availability_set_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('AvailabilitySet', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}'} - - def list_by_subscription( - self, custom_headers=None, raw=False, **operation_config): - """Lists all availability sets in a subscription. - - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of AvailabilitySet - :rtype: - ~azure.mgmt.compute.v2019_03_01.models.AvailabilitySetPaged[~azure.mgmt.compute.v2019_03_01.models.AvailabilitySet] - :raises: :class:`CloudError` - """ - def internal_paging(next_link=None, raw=False): - - if not next_link: - # Construct URL - url = self.list_by_subscription.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - deserialized = models.AvailabilitySetPaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.AvailabilitySetPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - list_by_subscription.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Compute/availabilitySets'} - - def list( - self, resource_group_name, custom_headers=None, raw=False, **operation_config): - """Lists all availability sets in a resource group. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of AvailabilitySet - :rtype: - ~azure.mgmt.compute.v2019_03_01.models.AvailabilitySetPaged[~azure.mgmt.compute.v2019_03_01.models.AvailabilitySet] - :raises: :class:`CloudError` - """ - def internal_paging(next_link=None, raw=False): - - if not next_link: - # Construct URL - url = self.list.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - deserialized = models.AvailabilitySetPaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.AvailabilitySetPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets'} - - def list_available_sizes( - self, resource_group_name, availability_set_name, custom_headers=None, raw=False, **operation_config): - """Lists all available virtual machine sizes that can be used to create a - new virtual machine in an existing availability set. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param availability_set_name: The name of the availability set. - :type availability_set_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of VirtualMachineSize - :rtype: - ~azure.mgmt.compute.v2019_03_01.models.VirtualMachineSizePaged[~azure.mgmt.compute.v2019_03_01.models.VirtualMachineSize] - :raises: :class:`CloudError` - """ - def internal_paging(next_link=None, raw=False): - - if not next_link: - # Construct URL - url = self.list_available_sizes.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'availabilitySetName': self._serialize.url("availability_set_name", availability_set_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - deserialized = models.VirtualMachineSizePaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.VirtualMachineSizePaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - list_available_sizes.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}/vmSizes'} diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/operations/galleries_operations.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/operations/galleries_operations.py deleted file mode 100644 index dbe8879d2c92..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/operations/galleries_operations.py +++ /dev/null @@ -1,420 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError -from msrest.polling import LROPoller, NoPolling -from msrestazure.polling.arm_polling import ARMPolling - -from .. import models - - -class GalleriesOperations(object): - """GalleriesOperations operations. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: Client Api Version. Constant value: "2019-03-01". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2019-03-01" - - self.config = config - - - def _create_or_update_initial( - self, resource_group_name, gallery_name, gallery, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.create_or_update.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'galleryName': self._serialize.url("gallery_name", gallery_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(gallery, 'Gallery') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 201, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('Gallery', response) - if response.status_code == 201: - deserialized = self._deserialize('Gallery', response) - if response.status_code == 202: - deserialized = self._deserialize('Gallery', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def create_or_update( - self, resource_group_name, gallery_name, gallery, custom_headers=None, raw=False, polling=True, **operation_config): - """Create or update a Shared Image Gallery. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param gallery_name: The name of the Shared Image Gallery. The allowed - characters are alphabets and numbers with dots and periods allowed in - the middle. The maximum length is 80 characters. - :type gallery_name: str - :param gallery: Parameters supplied to the create or update Shared - Image Gallery operation. - :type gallery: ~azure.mgmt.compute.v2019_03_01.models.Gallery - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns Gallery or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2019_03_01.models.Gallery] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2019_03_01.models.Gallery]] - :raises: :class:`CloudError` - """ - raw_result = self._create_or_update_initial( - resource_group_name=resource_group_name, - gallery_name=gallery_name, - gallery=gallery, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('Gallery', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}'} - - def get( - self, resource_group_name, gallery_name, custom_headers=None, raw=False, **operation_config): - """Retrieves information about a Shared Image Gallery. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param gallery_name: The name of the Shared Image Gallery. - :type gallery_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: Gallery or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.compute.v2019_03_01.models.Gallery or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'galleryName': self._serialize.url("gallery_name", gallery_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('Gallery', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}'} - - - def _delete_initial( - self, resource_group_name, gallery_name, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.delete.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'galleryName': self._serialize.url("gallery_name", gallery_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202, 204]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - def delete( - self, resource_group_name, gallery_name, custom_headers=None, raw=False, polling=True, **operation_config): - """Delete a Shared Image Gallery. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param gallery_name: The name of the Shared Image Gallery to be - deleted. - :type gallery_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns None or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] - :raises: :class:`CloudError` - """ - raw_result = self._delete_initial( - resource_group_name=resource_group_name, - gallery_name=gallery_name, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}'} - - def list_by_resource_group( - self, resource_group_name, custom_headers=None, raw=False, **operation_config): - """List galleries under a resource group. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of Gallery - :rtype: - ~azure.mgmt.compute.v2019_03_01.models.GalleryPaged[~azure.mgmt.compute.v2019_03_01.models.Gallery] - :raises: :class:`CloudError` - """ - def internal_paging(next_link=None, raw=False): - - if not next_link: - # Construct URL - url = self.list_by_resource_group.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - deserialized = models.GalleryPaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.GalleryPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries'} - - def list( - self, custom_headers=None, raw=False, **operation_config): - """List galleries under a subscription. - - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of Gallery - :rtype: - ~azure.mgmt.compute.v2019_03_01.models.GalleryPaged[~azure.mgmt.compute.v2019_03_01.models.Gallery] - :raises: :class:`CloudError` - """ - def internal_paging(next_link=None, raw=False): - - if not next_link: - # Construct URL - url = self.list.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - deserialized = models.GalleryPaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.GalleryPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Compute/galleries'} diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/operations/gallery_image_versions_operations.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/operations/gallery_image_versions_operations.py deleted file mode 100644 index 810b12881210..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/operations/gallery_image_versions_operations.py +++ /dev/null @@ -1,402 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError -from msrest.polling import LROPoller, NoPolling -from msrestazure.polling.arm_polling import ARMPolling - -from .. import models - - -class GalleryImageVersionsOperations(object): - """GalleryImageVersionsOperations operations. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: Client Api Version. Constant value: "2019-03-01". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2019-03-01" - - self.config = config - - - def _create_or_update_initial( - self, resource_group_name, gallery_name, gallery_image_name, gallery_image_version_name, gallery_image_version, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.create_or_update.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'galleryName': self._serialize.url("gallery_name", gallery_name, 'str'), - 'galleryImageName': self._serialize.url("gallery_image_name", gallery_image_name, 'str'), - 'galleryImageVersionName': self._serialize.url("gallery_image_version_name", gallery_image_version_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(gallery_image_version, 'GalleryImageVersion') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 201, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('GalleryImageVersion', response) - if response.status_code == 201: - deserialized = self._deserialize('GalleryImageVersion', response) - if response.status_code == 202: - deserialized = self._deserialize('GalleryImageVersion', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def create_or_update( - self, resource_group_name, gallery_name, gallery_image_name, gallery_image_version_name, gallery_image_version, custom_headers=None, raw=False, polling=True, **operation_config): - """Create or update a gallery Image Version. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param gallery_name: The name of the Shared Image Gallery in which the - Image Definition resides. - :type gallery_name: str - :param gallery_image_name: The name of the gallery Image Definition in - which the Image Version is to be created. - :type gallery_image_name: str - :param gallery_image_version_name: The name of the gallery Image - Version to be created. Needs to follow semantic version name pattern: - The allowed characters are digit and period. Digits must be within the - range of a 32-bit integer. Format: - .. - :type gallery_image_version_name: str - :param gallery_image_version: Parameters supplied to the create or - update gallery Image Version operation. - :type gallery_image_version: - ~azure.mgmt.compute.v2019_03_01.models.GalleryImageVersion - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns GalleryImageVersion or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2019_03_01.models.GalleryImageVersion] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2019_03_01.models.GalleryImageVersion]] - :raises: :class:`CloudError` - """ - raw_result = self._create_or_update_initial( - resource_group_name=resource_group_name, - gallery_name=gallery_name, - gallery_image_name=gallery_image_name, - gallery_image_version_name=gallery_image_version_name, - gallery_image_version=gallery_image_version, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('GalleryImageVersion', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/images/{galleryImageName}/versions/{galleryImageVersionName}'} - - def get( - self, resource_group_name, gallery_name, gallery_image_name, gallery_image_version_name, expand=None, custom_headers=None, raw=False, **operation_config): - """Retrieves information about a gallery Image Version. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param gallery_name: The name of the Shared Image Gallery in which the - Image Definition resides. - :type gallery_name: str - :param gallery_image_name: The name of the gallery Image Definition in - which the Image Version resides. - :type gallery_image_name: str - :param gallery_image_version_name: The name of the gallery Image - Version to be retrieved. - :type gallery_image_version_name: str - :param expand: The expand expression to apply on the operation. - Possible values include: 'ReplicationStatus' - :type expand: str or - ~azure.mgmt.compute.v2019_03_01.models.ReplicationStatusTypes - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: GalleryImageVersion or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.compute.v2019_03_01.models.GalleryImageVersion or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'galleryName': self._serialize.url("gallery_name", gallery_name, 'str'), - 'galleryImageName': self._serialize.url("gallery_image_name", gallery_image_name, 'str'), - 'galleryImageVersionName': self._serialize.url("gallery_image_version_name", gallery_image_version_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - if expand is not None: - query_parameters['$expand'] = self._serialize.query("expand", expand, 'str') - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('GalleryImageVersion', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/images/{galleryImageName}/versions/{galleryImageVersionName}'} - - - def _delete_initial( - self, resource_group_name, gallery_name, gallery_image_name, gallery_image_version_name, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.delete.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'galleryName': self._serialize.url("gallery_name", gallery_name, 'str'), - 'galleryImageName': self._serialize.url("gallery_image_name", gallery_image_name, 'str'), - 'galleryImageVersionName': self._serialize.url("gallery_image_version_name", gallery_image_version_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202, 204]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - def delete( - self, resource_group_name, gallery_name, gallery_image_name, gallery_image_version_name, custom_headers=None, raw=False, polling=True, **operation_config): - """Delete a gallery Image Version. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param gallery_name: The name of the Shared Image Gallery in which the - Image Definition resides. - :type gallery_name: str - :param gallery_image_name: The name of the gallery Image Definition in - which the Image Version resides. - :type gallery_image_name: str - :param gallery_image_version_name: The name of the gallery Image - Version to be deleted. - :type gallery_image_version_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns None or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] - :raises: :class:`CloudError` - """ - raw_result = self._delete_initial( - resource_group_name=resource_group_name, - gallery_name=gallery_name, - gallery_image_name=gallery_image_name, - gallery_image_version_name=gallery_image_version_name, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/images/{galleryImageName}/versions/{galleryImageVersionName}'} - - def list_by_gallery_image( - self, resource_group_name, gallery_name, gallery_image_name, custom_headers=None, raw=False, **operation_config): - """List gallery Image Versions in a gallery Image Definition. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param gallery_name: The name of the Shared Image Gallery in which the - Image Definition resides. - :type gallery_name: str - :param gallery_image_name: The name of the Shared Image Gallery Image - Definition from which the Image Versions are to be listed. - :type gallery_image_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of GalleryImageVersion - :rtype: - ~azure.mgmt.compute.v2019_03_01.models.GalleryImageVersionPaged[~azure.mgmt.compute.v2019_03_01.models.GalleryImageVersion] - :raises: :class:`CloudError` - """ - def internal_paging(next_link=None, raw=False): - - if not next_link: - # Construct URL - url = self.list_by_gallery_image.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'galleryName': self._serialize.url("gallery_name", gallery_name, 'str'), - 'galleryImageName': self._serialize.url("gallery_image_name", gallery_image_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - deserialized = models.GalleryImageVersionPaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.GalleryImageVersionPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - list_by_gallery_image.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/images/{galleryImageName}/versions'} diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/operations/gallery_images_operations.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/operations/gallery_images_operations.py deleted file mode 100644 index 02fc7c89306a..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/operations/gallery_images_operations.py +++ /dev/null @@ -1,377 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError -from msrest.polling import LROPoller, NoPolling -from msrestazure.polling.arm_polling import ARMPolling - -from .. import models - - -class GalleryImagesOperations(object): - """GalleryImagesOperations operations. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: Client Api Version. Constant value: "2019-03-01". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2019-03-01" - - self.config = config - - - def _create_or_update_initial( - self, resource_group_name, gallery_name, gallery_image_name, gallery_image, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.create_or_update.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'galleryName': self._serialize.url("gallery_name", gallery_name, 'str'), - 'galleryImageName': self._serialize.url("gallery_image_name", gallery_image_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(gallery_image, 'GalleryImage') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 201, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('GalleryImage', response) - if response.status_code == 201: - deserialized = self._deserialize('GalleryImage', response) - if response.status_code == 202: - deserialized = self._deserialize('GalleryImage', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def create_or_update( - self, resource_group_name, gallery_name, gallery_image_name, gallery_image, custom_headers=None, raw=False, polling=True, **operation_config): - """Create or update a gallery Image Definition. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param gallery_name: The name of the Shared Image Gallery in which the - Image Definition is to be created. - :type gallery_name: str - :param gallery_image_name: The name of the gallery Image Definition to - be created or updated. The allowed characters are alphabets and - numbers with dots, dashes, and periods allowed in the middle. The - maximum length is 80 characters. - :type gallery_image_name: str - :param gallery_image: Parameters supplied to the create or update - gallery image operation. - :type gallery_image: - ~azure.mgmt.compute.v2019_03_01.models.GalleryImage - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns GalleryImage or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2019_03_01.models.GalleryImage] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2019_03_01.models.GalleryImage]] - :raises: :class:`CloudError` - """ - raw_result = self._create_or_update_initial( - resource_group_name=resource_group_name, - gallery_name=gallery_name, - gallery_image_name=gallery_image_name, - gallery_image=gallery_image, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('GalleryImage', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/images/{galleryImageName}'} - - def get( - self, resource_group_name, gallery_name, gallery_image_name, custom_headers=None, raw=False, **operation_config): - """Retrieves information about a gallery Image Definition. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param gallery_name: The name of the Shared Image Gallery from which - the Image Definitions are to be retrieved. - :type gallery_name: str - :param gallery_image_name: The name of the gallery Image Definition to - be retrieved. - :type gallery_image_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: GalleryImage or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.compute.v2019_03_01.models.GalleryImage or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'galleryName': self._serialize.url("gallery_name", gallery_name, 'str'), - 'galleryImageName': self._serialize.url("gallery_image_name", gallery_image_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('GalleryImage', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/images/{galleryImageName}'} - - - def _delete_initial( - self, resource_group_name, gallery_name, gallery_image_name, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.delete.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'galleryName': self._serialize.url("gallery_name", gallery_name, 'str'), - 'galleryImageName': self._serialize.url("gallery_image_name", gallery_image_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202, 204]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - def delete( - self, resource_group_name, gallery_name, gallery_image_name, custom_headers=None, raw=False, polling=True, **operation_config): - """Delete a gallery image. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param gallery_name: The name of the Shared Image Gallery in which the - Image Definition is to be deleted. - :type gallery_name: str - :param gallery_image_name: The name of the gallery Image Definition to - be deleted. - :type gallery_image_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns None or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] - :raises: :class:`CloudError` - """ - raw_result = self._delete_initial( - resource_group_name=resource_group_name, - gallery_name=gallery_name, - gallery_image_name=gallery_image_name, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/images/{galleryImageName}'} - - def list_by_gallery( - self, resource_group_name, gallery_name, custom_headers=None, raw=False, **operation_config): - """List gallery Image Definitions in a gallery. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param gallery_name: The name of the Shared Image Gallery from which - Image Definitions are to be listed. - :type gallery_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of GalleryImage - :rtype: - ~azure.mgmt.compute.v2019_03_01.models.GalleryImagePaged[~azure.mgmt.compute.v2019_03_01.models.GalleryImage] - :raises: :class:`CloudError` - """ - def internal_paging(next_link=None, raw=False): - - if not next_link: - # Construct URL - url = self.list_by_gallery.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'galleryName': self._serialize.url("gallery_name", gallery_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - deserialized = models.GalleryImagePaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.GalleryImagePaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - list_by_gallery.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/images'} diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/operations/images_operations.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/operations/images_operations.py deleted file mode 100644 index 0450adffe9fc..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/operations/images_operations.py +++ /dev/null @@ -1,522 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError -from msrest.polling import LROPoller, NoPolling -from msrestazure.polling.arm_polling import ARMPolling - -from .. import models - - -class ImagesOperations(object): - """ImagesOperations operations. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: Client Api Version. Constant value: "2019-03-01". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2019-03-01" - - self.config = config - - - def _create_or_update_initial( - self, resource_group_name, image_name, parameters, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.create_or_update.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'imageName': self._serialize.url("image_name", image_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(parameters, 'Image') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 201]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('Image', response) - if response.status_code == 201: - deserialized = self._deserialize('Image', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def create_or_update( - self, resource_group_name, image_name, parameters, custom_headers=None, raw=False, polling=True, **operation_config): - """Create or update an image. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param image_name: The name of the image. - :type image_name: str - :param parameters: Parameters supplied to the Create Image operation. - :type parameters: ~azure.mgmt.compute.v2019_03_01.models.Image - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns Image or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2019_03_01.models.Image] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2019_03_01.models.Image]] - :raises: :class:`CloudError` - """ - raw_result = self._create_or_update_initial( - resource_group_name=resource_group_name, - image_name=image_name, - parameters=parameters, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('Image', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/images/{imageName}'} - - - def _update_initial( - self, resource_group_name, image_name, parameters, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.update.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'imageName': self._serialize.url("image_name", image_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(parameters, 'ImageUpdate') - - # Construct and send request - request = self._client.patch(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 201]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('Image', response) - if response.status_code == 201: - deserialized = self._deserialize('Image', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def update( - self, resource_group_name, image_name, parameters, custom_headers=None, raw=False, polling=True, **operation_config): - """Update an image. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param image_name: The name of the image. - :type image_name: str - :param parameters: Parameters supplied to the Update Image operation. - :type parameters: ~azure.mgmt.compute.v2019_03_01.models.ImageUpdate - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns Image or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2019_03_01.models.Image] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2019_03_01.models.Image]] - :raises: :class:`CloudError` - """ - raw_result = self._update_initial( - resource_group_name=resource_group_name, - image_name=image_name, - parameters=parameters, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('Image', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/images/{imageName}'} - - - def _delete_initial( - self, resource_group_name, image_name, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.delete.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'imageName': self._serialize.url("image_name", image_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202, 204]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - def delete( - self, resource_group_name, image_name, custom_headers=None, raw=False, polling=True, **operation_config): - """Deletes an Image. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param image_name: The name of the image. - :type image_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns None or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] - :raises: :class:`CloudError` - """ - raw_result = self._delete_initial( - resource_group_name=resource_group_name, - image_name=image_name, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/images/{imageName}'} - - def get( - self, resource_group_name, image_name, expand=None, custom_headers=None, raw=False, **operation_config): - """Gets an image. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param image_name: The name of the image. - :type image_name: str - :param expand: The expand expression to apply on the operation. - :type expand: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: Image or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.compute.v2019_03_01.models.Image or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'imageName': self._serialize.url("image_name", image_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - if expand is not None: - query_parameters['$expand'] = self._serialize.query("expand", expand, 'str') - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('Image', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/images/{imageName}'} - - def list_by_resource_group( - self, resource_group_name, custom_headers=None, raw=False, **operation_config): - """Gets the list of images under a resource group. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of Image - :rtype: - ~azure.mgmt.compute.v2019_03_01.models.ImagePaged[~azure.mgmt.compute.v2019_03_01.models.Image] - :raises: :class:`CloudError` - """ - def internal_paging(next_link=None, raw=False): - - if not next_link: - # Construct URL - url = self.list_by_resource_group.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - deserialized = models.ImagePaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.ImagePaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/images'} - - def list( - self, custom_headers=None, raw=False, **operation_config): - """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. - - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of Image - :rtype: - ~azure.mgmt.compute.v2019_03_01.models.ImagePaged[~azure.mgmt.compute.v2019_03_01.models.Image] - :raises: :class:`CloudError` - """ - def internal_paging(next_link=None, raw=False): - - if not next_link: - # Construct URL - url = self.list.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - deserialized = models.ImagePaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.ImagePaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Compute/images'} diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/operations/log_analytics_operations.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/operations/log_analytics_operations.py deleted file mode 100644 index 512536499dc1..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/operations/log_analytics_operations.py +++ /dev/null @@ -1,242 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError -from msrest.polling import LROPoller, NoPolling -from msrestazure.polling.arm_polling import ARMPolling - -from .. import models - - -class LogAnalyticsOperations(object): - """LogAnalyticsOperations operations. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: Client Api Version. Constant value: "2019-03-01". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2019-03-01" - - self.config = config - - - def _export_request_rate_by_interval_initial( - self, parameters, location, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.export_request_rate_by_interval.metadata['url'] - path_format_arguments = { - 'location': self._serialize.url("location", location, 'str', pattern=r'^[-\w\._]+$'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(parameters, 'RequestRateByIntervalInput') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('LogAnalyticsOperationResult', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def export_request_rate_by_interval( - self, parameters, location, custom_headers=None, raw=False, polling=True, **operation_config): - """Export logs that show Api requests made by this subscription in the - given time window to show throttling activities. - - :param parameters: Parameters supplied to the LogAnalytics - getRequestRateByInterval Api. - :type parameters: - ~azure.mgmt.compute.v2019_03_01.models.RequestRateByIntervalInput - :param location: The location upon which virtual-machine-sizes is - queried. - :type location: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns - LogAnalyticsOperationResult or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2019_03_01.models.LogAnalyticsOperationResult] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2019_03_01.models.LogAnalyticsOperationResult]] - :raises: :class:`CloudError` - """ - raw_result = self._export_request_rate_by_interval_initial( - parameters=parameters, - location=location, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('LogAnalyticsOperationResult', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - export_request_rate_by_interval.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/logAnalytics/apiAccess/getRequestRateByInterval'} - - - def _export_throttled_requests_initial( - self, parameters, location, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.export_throttled_requests.metadata['url'] - path_format_arguments = { - 'location': self._serialize.url("location", location, 'str', pattern=r'^[-\w\._]+$'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(parameters, 'ThrottledRequestsInput') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('LogAnalyticsOperationResult', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def export_throttled_requests( - self, parameters, location, custom_headers=None, raw=False, polling=True, **operation_config): - """Export logs that show total throttled Api requests for this - subscription in the given time window. - - :param parameters: Parameters supplied to the LogAnalytics - getThrottledRequests Api. - :type parameters: - ~azure.mgmt.compute.v2019_03_01.models.ThrottledRequestsInput - :param location: The location upon which virtual-machine-sizes is - queried. - :type location: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns - LogAnalyticsOperationResult or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2019_03_01.models.LogAnalyticsOperationResult] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2019_03_01.models.LogAnalyticsOperationResult]] - :raises: :class:`CloudError` - """ - raw_result = self._export_throttled_requests_initial( - parameters=parameters, - location=location, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('LogAnalyticsOperationResult', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - export_throttled_requests.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/logAnalytics/apiAccess/getThrottledRequests'} diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/operations/operations.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/operations/operations.py deleted file mode 100644 index 206b6b2a4409..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/operations/operations.py +++ /dev/null @@ -1,98 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError - -from .. import models - - -class Operations(object): - """Operations operations. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: Client Api Version. Constant value: "2019-03-01". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2019-03-01" - - self.config = config - - def list( - self, custom_headers=None, raw=False, **operation_config): - """Gets a list of compute operations. - - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of ComputeOperationValue - :rtype: - ~azure.mgmt.compute.v2019_03_01.models.ComputeOperationValuePaged[~azure.mgmt.compute.v2019_03_01.models.ComputeOperationValue] - :raises: :class:`CloudError` - """ - def internal_paging(next_link=None, raw=False): - - if not next_link: - # Construct URL - url = self.list.metadata['url'] - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - deserialized = models.ComputeOperationValuePaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.ComputeOperationValuePaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - list.metadata = {'url': '/providers/Microsoft.Compute/operations'} diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/operations/proximity_placement_groups_operations.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/operations/proximity_placement_groups_operations.py deleted file mode 100644 index a42c4e11f4c7..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/operations/proximity_placement_groups_operations.py +++ /dev/null @@ -1,430 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError - -from .. import models - - -class ProximityPlacementGroupsOperations(object): - """ProximityPlacementGroupsOperations operations. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: Client Api Version. Constant value: "2019-03-01". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2019-03-01" - - self.config = config - - def create_or_update( - self, resource_group_name, proximity_placement_group_name, parameters, custom_headers=None, raw=False, **operation_config): - """Create or update a proximity placement group. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param proximity_placement_group_name: The name of the proximity - placement group. - :type proximity_placement_group_name: str - :param parameters: Parameters supplied to the Create Proximity - Placement Group operation. - :type parameters: - ~azure.mgmt.compute.v2019_03_01.models.ProximityPlacementGroup - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: ProximityPlacementGroup or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.compute.v2019_03_01.models.ProximityPlacementGroup - or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.create_or_update.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'proximityPlacementGroupName': self._serialize.url("proximity_placement_group_name", proximity_placement_group_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(parameters, 'ProximityPlacementGroup') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 201]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('ProximityPlacementGroup', response) - if response.status_code == 201: - deserialized = self._deserialize('ProximityPlacementGroup', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/proximityPlacementGroups/{proximityPlacementGroupName}'} - - def update( - self, resource_group_name, proximity_placement_group_name, tags=None, custom_headers=None, raw=False, **operation_config): - """Update a proximity placement group. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param proximity_placement_group_name: The name of the proximity - placement group. - :type proximity_placement_group_name: str - :param tags: Resource tags - :type tags: dict[str, str] - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: ProximityPlacementGroup or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.compute.v2019_03_01.models.ProximityPlacementGroup - or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - parameters = models.ProximityPlacementGroupUpdate(tags=tags) - - # Construct URL - url = self.update.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'proximityPlacementGroupName': self._serialize.url("proximity_placement_group_name", proximity_placement_group_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(parameters, 'ProximityPlacementGroupUpdate') - - # Construct and send request - request = self._client.patch(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('ProximityPlacementGroup', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/proximityPlacementGroups/{proximityPlacementGroupName}'} - - def delete( - self, resource_group_name, proximity_placement_group_name, custom_headers=None, raw=False, **operation_config): - """Delete a proximity placement group. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param proximity_placement_group_name: The name of the proximity - placement group. - :type proximity_placement_group_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.delete.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'proximityPlacementGroupName': self._serialize.url("proximity_placement_group_name", proximity_placement_group_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/proximityPlacementGroups/{proximityPlacementGroupName}'} - - def get( - self, resource_group_name, proximity_placement_group_name, custom_headers=None, raw=False, **operation_config): - """Retrieves information about a proximity placement group . - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param proximity_placement_group_name: The name of the proximity - placement group. - :type proximity_placement_group_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: ProximityPlacementGroup or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.compute.v2019_03_01.models.ProximityPlacementGroup - or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'proximityPlacementGroupName': self._serialize.url("proximity_placement_group_name", proximity_placement_group_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('ProximityPlacementGroup', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/proximityPlacementGroups/{proximityPlacementGroupName}'} - - def list_by_subscription( - self, custom_headers=None, raw=False, **operation_config): - """Lists all proximity placement groups in a subscription. - - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of ProximityPlacementGroup - :rtype: - ~azure.mgmt.compute.v2019_03_01.models.ProximityPlacementGroupPaged[~azure.mgmt.compute.v2019_03_01.models.ProximityPlacementGroup] - :raises: :class:`CloudError` - """ - def internal_paging(next_link=None, raw=False): - - if not next_link: - # Construct URL - url = self.list_by_subscription.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - deserialized = models.ProximityPlacementGroupPaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.ProximityPlacementGroupPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - list_by_subscription.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Compute/proximityPlacementGroups'} - - def list_by_resource_group( - self, resource_group_name, custom_headers=None, raw=False, **operation_config): - """Lists all proximity placement groups in a resource group. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of ProximityPlacementGroup - :rtype: - ~azure.mgmt.compute.v2019_03_01.models.ProximityPlacementGroupPaged[~azure.mgmt.compute.v2019_03_01.models.ProximityPlacementGroup] - :raises: :class:`CloudError` - """ - def internal_paging(next_link=None, raw=False): - - if not next_link: - # Construct URL - url = self.list_by_resource_group.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - deserialized = models.ProximityPlacementGroupPaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.ProximityPlacementGroupPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/proximityPlacementGroups'} diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/operations/usage_operations.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/operations/usage_operations.py deleted file mode 100644 index 783a64fe6ea9..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/operations/usage_operations.py +++ /dev/null @@ -1,107 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError - -from .. import models - - -class UsageOperations(object): - """UsageOperations operations. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: Client Api Version. Constant value: "2019-03-01". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2019-03-01" - - self.config = config - - def list( - self, location, custom_headers=None, raw=False, **operation_config): - """Gets, for the specified location, the current compute resource usage - information as well as the limits for compute resources under the - subscription. - - :param location: The location for which resource usage is queried. - :type location: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of Usage - :rtype: - ~azure.mgmt.compute.v2019_03_01.models.UsagePaged[~azure.mgmt.compute.v2019_03_01.models.Usage] - :raises: :class:`CloudError` - """ - def internal_paging(next_link=None, raw=False): - - if not next_link: - # Construct URL - url = self.list.metadata['url'] - path_format_arguments = { - 'location': self._serialize.url("location", location, 'str', pattern=r'^[-\w\._]+$'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - deserialized = models.UsagePaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.UsagePaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/usages'} diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/operations/virtual_machine_extension_images_operations.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/operations/virtual_machine_extension_images_operations.py deleted file mode 100644 index a6844770bb35..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/operations/virtual_machine_extension_images_operations.py +++ /dev/null @@ -1,248 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError - -from .. import models - - -class VirtualMachineExtensionImagesOperations(object): - """VirtualMachineExtensionImagesOperations operations. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: Client Api Version. Constant value: "2019-03-01". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2019-03-01" - - self.config = config - - def get( - self, location, publisher_name, type, version, custom_headers=None, raw=False, **operation_config): - """Gets a virtual machine extension image. - - :param location: The name of a supported Azure region. - :type location: str - :param publisher_name: - :type publisher_name: str - :param type: - :type type: str - :param version: - :type version: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: VirtualMachineExtensionImage or ClientRawResponse if raw=true - :rtype: - ~azure.mgmt.compute.v2019_03_01.models.VirtualMachineExtensionImage or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get.metadata['url'] - path_format_arguments = { - 'location': self._serialize.url("location", location, 'str'), - 'publisherName': self._serialize.url("publisher_name", publisher_name, 'str'), - 'type': self._serialize.url("type", type, 'str'), - 'version': self._serialize.url("version", version, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('VirtualMachineExtensionImage', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/publishers/{publisherName}/artifacttypes/vmextension/types/{type}/versions/{version}'} - - def list_types( - self, location, publisher_name, custom_headers=None, raw=False, **operation_config): - """Gets a list of virtual machine extension image types. - - :param location: The name of a supported Azure region. - :type location: str - :param publisher_name: - :type publisher_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: list or ClientRawResponse if raw=true - :rtype: - list[~azure.mgmt.compute.v2019_03_01.models.VirtualMachineExtensionImage] - or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.list_types.metadata['url'] - path_format_arguments = { - 'location': self._serialize.url("location", location, 'str'), - 'publisherName': self._serialize.url("publisher_name", publisher_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('[VirtualMachineExtensionImage]', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - list_types.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/publishers/{publisherName}/artifacttypes/vmextension/types'} - - def list_versions( - self, location, publisher_name, type, filter=None, top=None, orderby=None, custom_headers=None, raw=False, **operation_config): - """Gets a list of virtual machine extension image versions. - - :param location: The name of a supported Azure region. - :type location: str - :param publisher_name: - :type publisher_name: str - :param type: - :type type: str - :param filter: The filter to apply on the operation. - :type filter: str - :param top: - :type top: int - :param orderby: - :type orderby: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: list or ClientRawResponse if raw=true - :rtype: - list[~azure.mgmt.compute.v2019_03_01.models.VirtualMachineExtensionImage] - or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.list_versions.metadata['url'] - path_format_arguments = { - 'location': self._serialize.url("location", location, 'str'), - 'publisherName': self._serialize.url("publisher_name", publisher_name, 'str'), - 'type': self._serialize.url("type", type, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - if filter is not None: - query_parameters['$filter'] = self._serialize.query("filter", filter, 'str') - if top is not None: - query_parameters['$top'] = self._serialize.query("top", top, 'int') - if orderby is not None: - query_parameters['$orderby'] = self._serialize.query("orderby", orderby, 'str') - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('[VirtualMachineExtensionImage]', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - list_versions.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/publishers/{publisherName}/artifacttypes/vmextension/types/{type}/versions'} diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/operations/virtual_machine_extensions_operations.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/operations/virtual_machine_extensions_operations.py deleted file mode 100644 index 623336c60649..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/operations/virtual_machine_extensions_operations.py +++ /dev/null @@ -1,479 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError -from msrest.polling import LROPoller, NoPolling -from msrestazure.polling.arm_polling import ARMPolling - -from .. import models - - -class VirtualMachineExtensionsOperations(object): - """VirtualMachineExtensionsOperations operations. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: Client Api Version. Constant value: "2019-03-01". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2019-03-01" - - self.config = config - - - def _create_or_update_initial( - self, resource_group_name, vm_name, vm_extension_name, extension_parameters, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.create_or_update.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'vmName': self._serialize.url("vm_name", vm_name, 'str'), - 'vmExtensionName': self._serialize.url("vm_extension_name", vm_extension_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(extension_parameters, 'VirtualMachineExtension') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 201]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('VirtualMachineExtension', response) - if response.status_code == 201: - deserialized = self._deserialize('VirtualMachineExtension', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def create_or_update( - self, resource_group_name, vm_name, vm_extension_name, extension_parameters, custom_headers=None, raw=False, polling=True, **operation_config): - """The operation to create or update the extension. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param vm_name: The name of the virtual machine where the extension - should be created or updated. - :type vm_name: str - :param vm_extension_name: The name of the virtual machine extension. - :type vm_extension_name: str - :param extension_parameters: Parameters supplied to the Create Virtual - Machine Extension operation. - :type extension_parameters: - ~azure.mgmt.compute.v2019_03_01.models.VirtualMachineExtension - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns VirtualMachineExtension - or ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2019_03_01.models.VirtualMachineExtension] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2019_03_01.models.VirtualMachineExtension]] - :raises: :class:`CloudError` - """ - raw_result = self._create_or_update_initial( - resource_group_name=resource_group_name, - vm_name=vm_name, - vm_extension_name=vm_extension_name, - extension_parameters=extension_parameters, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('VirtualMachineExtension', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/extensions/{vmExtensionName}'} - - - def _update_initial( - self, resource_group_name, vm_name, vm_extension_name, extension_parameters, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.update.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'vmName': self._serialize.url("vm_name", vm_name, 'str'), - 'vmExtensionName': self._serialize.url("vm_extension_name", vm_extension_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(extension_parameters, 'VirtualMachineExtensionUpdate') - - # Construct and send request - request = self._client.patch(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('VirtualMachineExtension', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def update( - self, resource_group_name, vm_name, vm_extension_name, extension_parameters, custom_headers=None, raw=False, polling=True, **operation_config): - """The operation to update the extension. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param vm_name: The name of the virtual machine where the extension - should be updated. - :type vm_name: str - :param vm_extension_name: The name of the virtual machine extension. - :type vm_extension_name: str - :param extension_parameters: Parameters supplied to the Update Virtual - Machine Extension operation. - :type extension_parameters: - ~azure.mgmt.compute.v2019_03_01.models.VirtualMachineExtensionUpdate - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns VirtualMachineExtension - or ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2019_03_01.models.VirtualMachineExtension] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2019_03_01.models.VirtualMachineExtension]] - :raises: :class:`CloudError` - """ - raw_result = self._update_initial( - resource_group_name=resource_group_name, - vm_name=vm_name, - vm_extension_name=vm_extension_name, - extension_parameters=extension_parameters, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('VirtualMachineExtension', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/extensions/{vmExtensionName}'} - - - def _delete_initial( - self, resource_group_name, vm_name, vm_extension_name, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.delete.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'vmName': self._serialize.url("vm_name", vm_name, 'str'), - 'vmExtensionName': self._serialize.url("vm_extension_name", vm_extension_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202, 204]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - def delete( - self, resource_group_name, vm_name, vm_extension_name, custom_headers=None, raw=False, polling=True, **operation_config): - """The operation to delete the extension. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param vm_name: The name of the virtual machine where the extension - should be deleted. - :type vm_name: str - :param vm_extension_name: The name of the virtual machine extension. - :type vm_extension_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns None or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] - :raises: :class:`CloudError` - """ - raw_result = self._delete_initial( - resource_group_name=resource_group_name, - vm_name=vm_name, - vm_extension_name=vm_extension_name, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/extensions/{vmExtensionName}'} - - def get( - self, resource_group_name, vm_name, vm_extension_name, expand=None, custom_headers=None, raw=False, **operation_config): - """The operation to get the extension. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param vm_name: The name of the virtual machine containing the - extension. - :type vm_name: str - :param vm_extension_name: The name of the virtual machine extension. - :type vm_extension_name: str - :param expand: The expand expression to apply on the operation. - :type expand: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: VirtualMachineExtension or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.compute.v2019_03_01.models.VirtualMachineExtension - or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'vmName': self._serialize.url("vm_name", vm_name, 'str'), - 'vmExtensionName': self._serialize.url("vm_extension_name", vm_extension_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - if expand is not None: - query_parameters['$expand'] = self._serialize.query("expand", expand, 'str') - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('VirtualMachineExtension', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/extensions/{vmExtensionName}'} - - def list( - self, resource_group_name, vm_name, expand=None, custom_headers=None, raw=False, **operation_config): - """The operation to get all extensions of a Virtual Machine. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param vm_name: The name of the virtual machine containing the - extension. - :type vm_name: str - :param expand: The expand expression to apply on the operation. - :type expand: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: VirtualMachineExtensionsListResult or ClientRawResponse if - raw=true - :rtype: - ~azure.mgmt.compute.v2019_03_01.models.VirtualMachineExtensionsListResult - or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.list.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'vmName': self._serialize.url("vm_name", vm_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - if expand is not None: - query_parameters['$expand'] = self._serialize.query("expand", expand, 'str') - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('VirtualMachineExtensionsListResult', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/extensions'} diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/operations/virtual_machine_images_operations.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/operations/virtual_machine_images_operations.py deleted file mode 100644 index 5267dd183cd1..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/operations/virtual_machine_images_operations.py +++ /dev/null @@ -1,383 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError - -from .. import models - - -class VirtualMachineImagesOperations(object): - """VirtualMachineImagesOperations operations. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: Client Api Version. Constant value: "2019-03-01". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2019-03-01" - - self.config = config - - def get( - self, location, publisher_name, offer, skus, version, custom_headers=None, raw=False, **operation_config): - """Gets a virtual machine image. - - :param location: The name of a supported Azure region. - :type location: str - :param publisher_name: A valid image publisher. - :type publisher_name: str - :param offer: A valid image publisher offer. - :type offer: str - :param skus: A valid image SKU. - :type skus: str - :param version: A valid image SKU version. - :type version: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: VirtualMachineImage or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.compute.v2019_03_01.models.VirtualMachineImage or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get.metadata['url'] - path_format_arguments = { - 'location': self._serialize.url("location", location, 'str'), - 'publisherName': self._serialize.url("publisher_name", publisher_name, 'str'), - 'offer': self._serialize.url("offer", offer, 'str'), - 'skus': self._serialize.url("skus", skus, 'str'), - 'version': self._serialize.url("version", version, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('VirtualMachineImage', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/publishers/{publisherName}/artifacttypes/vmimage/offers/{offer}/skus/{skus}/versions/{version}'} - - def list( - self, location, publisher_name, offer, skus, filter=None, top=None, orderby=None, custom_headers=None, raw=False, **operation_config): - """Gets a list of all virtual machine image versions for the specified - location, publisher, offer, and SKU. - - :param location: The name of a supported Azure region. - :type location: str - :param publisher_name: A valid image publisher. - :type publisher_name: str - :param offer: A valid image publisher offer. - :type offer: str - :param skus: A valid image SKU. - :type skus: str - :param filter: The filter to apply on the operation. - :type filter: str - :param top: - :type top: int - :param orderby: - :type orderby: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: list or ClientRawResponse if raw=true - :rtype: - list[~azure.mgmt.compute.v2019_03_01.models.VirtualMachineImageResource] - or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.list.metadata['url'] - path_format_arguments = { - 'location': self._serialize.url("location", location, 'str'), - 'publisherName': self._serialize.url("publisher_name", publisher_name, 'str'), - 'offer': self._serialize.url("offer", offer, 'str'), - 'skus': self._serialize.url("skus", skus, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - if filter is not None: - query_parameters['$filter'] = self._serialize.query("filter", filter, 'str') - if top is not None: - query_parameters['$top'] = self._serialize.query("top", top, 'int') - if orderby is not None: - query_parameters['$orderby'] = self._serialize.query("orderby", orderby, 'str') - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('[VirtualMachineImageResource]', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/publishers/{publisherName}/artifacttypes/vmimage/offers/{offer}/skus/{skus}/versions'} - - def list_offers( - self, location, publisher_name, custom_headers=None, raw=False, **operation_config): - """Gets a list of virtual machine image offers for the specified location - and publisher. - - :param location: The name of a supported Azure region. - :type location: str - :param publisher_name: A valid image publisher. - :type publisher_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: list or ClientRawResponse if raw=true - :rtype: - list[~azure.mgmt.compute.v2019_03_01.models.VirtualMachineImageResource] - or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.list_offers.metadata['url'] - path_format_arguments = { - 'location': self._serialize.url("location", location, 'str'), - 'publisherName': self._serialize.url("publisher_name", publisher_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('[VirtualMachineImageResource]', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - list_offers.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/publishers/{publisherName}/artifacttypes/vmimage/offers'} - - def list_publishers( - self, location, custom_headers=None, raw=False, **operation_config): - """Gets a list of virtual machine image publishers for the specified Azure - location. - - :param location: The name of a supported Azure region. - :type location: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: list or ClientRawResponse if raw=true - :rtype: - list[~azure.mgmt.compute.v2019_03_01.models.VirtualMachineImageResource] - or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.list_publishers.metadata['url'] - path_format_arguments = { - 'location': self._serialize.url("location", location, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('[VirtualMachineImageResource]', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - list_publishers.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/publishers'} - - def list_skus( - self, location, publisher_name, offer, custom_headers=None, raw=False, **operation_config): - """Gets a list of virtual machine image SKUs for the specified location, - publisher, and offer. - - :param location: The name of a supported Azure region. - :type location: str - :param publisher_name: A valid image publisher. - :type publisher_name: str - :param offer: A valid image publisher offer. - :type offer: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: list or ClientRawResponse if raw=true - :rtype: - list[~azure.mgmt.compute.v2019_03_01.models.VirtualMachineImageResource] - or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.list_skus.metadata['url'] - path_format_arguments = { - 'location': self._serialize.url("location", location, 'str'), - 'publisherName': self._serialize.url("publisher_name", publisher_name, 'str'), - 'offer': self._serialize.url("offer", offer, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('[VirtualMachineImageResource]', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - list_skus.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/publishers/{publisherName}/artifacttypes/vmimage/offers/{offer}/skus'} diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/operations/virtual_machine_run_commands_operations.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/operations/virtual_machine_run_commands_operations.py deleted file mode 100644 index 34d5603a1ad4..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/operations/virtual_machine_run_commands_operations.py +++ /dev/null @@ -1,167 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError - -from .. import models - - -class VirtualMachineRunCommandsOperations(object): - """VirtualMachineRunCommandsOperations operations. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: Client Api Version. Constant value: "2019-03-01". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2019-03-01" - - self.config = config - - def list( - self, location, custom_headers=None, raw=False, **operation_config): - """Lists all available run commands for a subscription in a location. - - :param location: The location upon which run commands is queried. - :type location: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of RunCommandDocumentBase - :rtype: - ~azure.mgmt.compute.v2019_03_01.models.RunCommandDocumentBasePaged[~azure.mgmt.compute.v2019_03_01.models.RunCommandDocumentBase] - :raises: :class:`CloudError` - """ - def internal_paging(next_link=None, raw=False): - - if not next_link: - # Construct URL - url = self.list.metadata['url'] - path_format_arguments = { - 'location': self._serialize.url("location", location, 'str', pattern=r'^[-\w\._]+$'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - deserialized = models.RunCommandDocumentBasePaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.RunCommandDocumentBasePaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/runCommands'} - - def get( - self, location, command_id, custom_headers=None, raw=False, **operation_config): - """Gets specific run command for a subscription in a location. - - :param location: The location upon which run commands is queried. - :type location: str - :param command_id: The command id. - :type command_id: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: RunCommandDocument or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.compute.v2019_03_01.models.RunCommandDocument or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get.metadata['url'] - path_format_arguments = { - 'location': self._serialize.url("location", location, 'str', pattern=r'^[-\w\._]+$'), - 'commandId': self._serialize.url("command_id", command_id, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('RunCommandDocument', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/runCommands/{commandId}'} diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/operations/virtual_machine_scale_set_extensions_operations.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/operations/virtual_machine_scale_set_extensions_operations.py deleted file mode 100644 index 08e241da0e96..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/operations/virtual_machine_scale_set_extensions_operations.py +++ /dev/null @@ -1,377 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError -from msrest.polling import LROPoller, NoPolling -from msrestazure.polling.arm_polling import ARMPolling - -from .. import models - - -class VirtualMachineScaleSetExtensionsOperations(object): - """VirtualMachineScaleSetExtensionsOperations operations. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: Client Api Version. Constant value: "2019-03-01". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2019-03-01" - - self.config = config - - - def _create_or_update_initial( - self, resource_group_name, vm_scale_set_name, vmss_extension_name, extension_parameters, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.create_or_update.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), - 'vmssExtensionName': self._serialize.url("vmss_extension_name", vmss_extension_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(extension_parameters, 'VirtualMachineScaleSetExtension') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 201]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('VirtualMachineScaleSetExtension', response) - if response.status_code == 201: - deserialized = self._deserialize('VirtualMachineScaleSetExtension', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def create_or_update( - self, resource_group_name, vm_scale_set_name, vmss_extension_name, extension_parameters, custom_headers=None, raw=False, polling=True, **operation_config): - """The operation to create or update an extension. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param vm_scale_set_name: The name of the VM scale set where the - extension should be create or updated. - :type vm_scale_set_name: str - :param vmss_extension_name: The name of the VM scale set extension. - :type vmss_extension_name: str - :param extension_parameters: Parameters supplied to the Create VM - scale set Extension operation. - :type extension_parameters: - ~azure.mgmt.compute.v2019_03_01.models.VirtualMachineScaleSetExtension - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns - VirtualMachineScaleSetExtension or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2019_03_01.models.VirtualMachineScaleSetExtension] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2019_03_01.models.VirtualMachineScaleSetExtension]] - :raises: :class:`CloudError` - """ - raw_result = self._create_or_update_initial( - resource_group_name=resource_group_name, - vm_scale_set_name=vm_scale_set_name, - vmss_extension_name=vmss_extension_name, - extension_parameters=extension_parameters, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('VirtualMachineScaleSetExtension', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/extensions/{vmssExtensionName}'} - - - def _delete_initial( - self, resource_group_name, vm_scale_set_name, vmss_extension_name, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.delete.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), - 'vmssExtensionName': self._serialize.url("vmss_extension_name", vmss_extension_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202, 204]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - def delete( - self, resource_group_name, vm_scale_set_name, vmss_extension_name, custom_headers=None, raw=False, polling=True, **operation_config): - """The operation to delete the extension. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param vm_scale_set_name: The name of the VM scale set where the - extension should be deleted. - :type vm_scale_set_name: str - :param vmss_extension_name: The name of the VM scale set extension. - :type vmss_extension_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns None or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] - :raises: :class:`CloudError` - """ - raw_result = self._delete_initial( - resource_group_name=resource_group_name, - vm_scale_set_name=vm_scale_set_name, - vmss_extension_name=vmss_extension_name, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/extensions/{vmssExtensionName}'} - - def get( - self, resource_group_name, vm_scale_set_name, vmss_extension_name, expand=None, custom_headers=None, raw=False, **operation_config): - """The operation to get the extension. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param vm_scale_set_name: The name of the VM scale set containing the - extension. - :type vm_scale_set_name: str - :param vmss_extension_name: The name of the VM scale set extension. - :type vmss_extension_name: str - :param expand: The expand expression to apply on the operation. - :type expand: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: VirtualMachineScaleSetExtension or ClientRawResponse if - raw=true - :rtype: - ~azure.mgmt.compute.v2019_03_01.models.VirtualMachineScaleSetExtension - or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), - 'vmssExtensionName': self._serialize.url("vmss_extension_name", vmss_extension_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - if expand is not None: - query_parameters['$expand'] = self._serialize.query("expand", expand, 'str') - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('VirtualMachineScaleSetExtension', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/extensions/{vmssExtensionName}'} - - def list( - self, resource_group_name, vm_scale_set_name, custom_headers=None, raw=False, **operation_config): - """Gets a list of all extensions in a VM scale set. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param vm_scale_set_name: The name of the VM scale set containing the - extension. - :type vm_scale_set_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of VirtualMachineScaleSetExtension - :rtype: - ~azure.mgmt.compute.v2019_03_01.models.VirtualMachineScaleSetExtensionPaged[~azure.mgmt.compute.v2019_03_01.models.VirtualMachineScaleSetExtension] - :raises: :class:`CloudError` - """ - def internal_paging(next_link=None, raw=False): - - if not next_link: - # Construct URL - url = self.list.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - deserialized = models.VirtualMachineScaleSetExtensionPaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.VirtualMachineScaleSetExtensionPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/extensions'} diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/operations/virtual_machine_scale_set_rolling_upgrades_operations.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/operations/virtual_machine_scale_set_rolling_upgrades_operations.py deleted file mode 100644 index c9c6d3ea99f6..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/operations/virtual_machine_scale_set_rolling_upgrades_operations.py +++ /dev/null @@ -1,347 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError -from msrest.polling import LROPoller, NoPolling -from msrestazure.polling.arm_polling import ARMPolling - -from .. import models - - -class VirtualMachineScaleSetRollingUpgradesOperations(object): - """VirtualMachineScaleSetRollingUpgradesOperations operations. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: Client Api Version. Constant value: "2019-03-01". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2019-03-01" - - self.config = config - - - def _cancel_initial( - self, resource_group_name, vm_scale_set_name, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.cancel.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - def cancel( - self, resource_group_name, vm_scale_set_name, custom_headers=None, raw=False, polling=True, **operation_config): - """Cancels the current virtual machine scale set rolling upgrade. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param vm_scale_set_name: The name of the VM scale set. - :type vm_scale_set_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns None or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] - :raises: :class:`CloudError` - """ - raw_result = self._cancel_initial( - resource_group_name=resource_group_name, - vm_scale_set_name=vm_scale_set_name, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - cancel.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/rollingUpgrades/cancel'} - - - def _start_os_upgrade_initial( - self, resource_group_name, vm_scale_set_name, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.start_os_upgrade.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - def start_os_upgrade( - self, resource_group_name, vm_scale_set_name, custom_headers=None, raw=False, polling=True, **operation_config): - """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. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param vm_scale_set_name: The name of the VM scale set. - :type vm_scale_set_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns None or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] - :raises: :class:`CloudError` - """ - raw_result = self._start_os_upgrade_initial( - resource_group_name=resource_group_name, - vm_scale_set_name=vm_scale_set_name, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - start_os_upgrade.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/osRollingUpgrade'} - - - def _start_extension_upgrade_initial( - self, resource_group_name, vm_scale_set_name, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.start_extension_upgrade.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - def start_extension_upgrade( - self, resource_group_name, vm_scale_set_name, custom_headers=None, raw=False, polling=True, **operation_config): - """Starts a rolling upgrade to move all extensions for all virtual machine - scale set instances to the latest available extension version. - Instances which are already running the latest extension versions are - not affected. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param vm_scale_set_name: The name of the VM scale set. - :type vm_scale_set_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns None or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] - :raises: :class:`CloudError` - """ - raw_result = self._start_extension_upgrade_initial( - resource_group_name=resource_group_name, - vm_scale_set_name=vm_scale_set_name, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - start_extension_upgrade.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/extensionRollingUpgrade'} - - def get_latest( - self, resource_group_name, vm_scale_set_name, custom_headers=None, raw=False, **operation_config): - """Gets the status of the latest virtual machine scale set rolling - upgrade. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param vm_scale_set_name: The name of the VM scale set. - :type vm_scale_set_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: RollingUpgradeStatusInfo or ClientRawResponse if raw=true - :rtype: - ~azure.mgmt.compute.v2019_03_01.models.RollingUpgradeStatusInfo or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get_latest.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('RollingUpgradeStatusInfo', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_latest.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/rollingUpgrades/latest'} diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/operations/virtual_machine_scale_set_vms_operations.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/operations/virtual_machine_scale_set_vms_operations.py deleted file mode 100644 index ef05fe99ce04..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/operations/virtual_machine_scale_set_vms_operations.py +++ /dev/null @@ -1,1249 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError -from msrest.polling import LROPoller, NoPolling -from msrestazure.polling.arm_polling import ARMPolling - -from .. import models - - -class VirtualMachineScaleSetVMsOperations(object): - """VirtualMachineScaleSetVMsOperations operations. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: Client Api Version. Constant value: "2019-03-01". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2019-03-01" - - self.config = config - - - def _reimage_initial( - self, resource_group_name, vm_scale_set_name, instance_id, temp_disk=None, custom_headers=None, raw=False, **operation_config): - vm_scale_set_vm_reimage_input = None - if temp_disk is not None: - vm_scale_set_vm_reimage_input = models.VirtualMachineScaleSetVMReimageParameters(temp_disk=temp_disk) - - # Construct URL - url = self.reimage.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), - 'instanceId': self._serialize.url("instance_id", instance_id, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - if vm_scale_set_vm_reimage_input is not None: - body_content = self._serialize.body(vm_scale_set_vm_reimage_input, 'VirtualMachineScaleSetVMReimageParameters') - else: - body_content = None - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - def reimage( - self, resource_group_name, vm_scale_set_name, instance_id, temp_disk=None, custom_headers=None, raw=False, polling=True, **operation_config): - """Reimages (upgrade the operating system) a specific virtual machine in a - VM scale set. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param vm_scale_set_name: The name of the VM scale set. - :type vm_scale_set_name: str - :param instance_id: The instance ID of the virtual machine. - :type instance_id: str - :param temp_disk: Specifies whether to reimage temp disk. Default - value: false. - :type temp_disk: bool - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns None or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] - :raises: :class:`CloudError` - """ - raw_result = self._reimage_initial( - resource_group_name=resource_group_name, - vm_scale_set_name=vm_scale_set_name, - instance_id=instance_id, - temp_disk=temp_disk, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - reimage.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/virtualmachines/{instanceId}/reimage'} - - - def _reimage_all_initial( - self, resource_group_name, vm_scale_set_name, instance_id, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.reimage_all.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), - 'instanceId': self._serialize.url("instance_id", instance_id, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - def reimage_all( - self, resource_group_name, vm_scale_set_name, instance_id, custom_headers=None, raw=False, polling=True, **operation_config): - """Allows you to re-image all the disks ( including data disks ) in the a - VM scale set instance. This operation is only supported for managed - disks. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param vm_scale_set_name: The name of the VM scale set. - :type vm_scale_set_name: str - :param instance_id: The instance ID of the virtual machine. - :type instance_id: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns None or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] - :raises: :class:`CloudError` - """ - raw_result = self._reimage_all_initial( - resource_group_name=resource_group_name, - vm_scale_set_name=vm_scale_set_name, - instance_id=instance_id, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - reimage_all.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/virtualmachines/{instanceId}/reimageall'} - - - def _deallocate_initial( - self, resource_group_name, vm_scale_set_name, instance_id, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.deallocate.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), - 'instanceId': self._serialize.url("instance_id", instance_id, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - def deallocate( - self, resource_group_name, vm_scale_set_name, instance_id, custom_headers=None, raw=False, polling=True, **operation_config): - """Deallocates a specific virtual machine in a VM scale set. Shuts down - the virtual machine and releases the compute resources it uses. You are - not billed for the compute resources of this virtual machine once it is - deallocated. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param vm_scale_set_name: The name of the VM scale set. - :type vm_scale_set_name: str - :param instance_id: The instance ID of the virtual machine. - :type instance_id: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns None or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] - :raises: :class:`CloudError` - """ - raw_result = self._deallocate_initial( - resource_group_name=resource_group_name, - vm_scale_set_name=vm_scale_set_name, - instance_id=instance_id, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - deallocate.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/virtualmachines/{instanceId}/deallocate'} - - - def _update_initial( - self, resource_group_name, vm_scale_set_name, instance_id, parameters, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.update.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), - 'instanceId': self._serialize.url("instance_id", instance_id, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(parameters, 'VirtualMachineScaleSetVM') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('VirtualMachineScaleSetVM', response) - if response.status_code == 202: - deserialized = self._deserialize('VirtualMachineScaleSetVM', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def update( - self, resource_group_name, vm_scale_set_name, instance_id, parameters, custom_headers=None, raw=False, polling=True, **operation_config): - """Updates a virtual machine of a VM scale set. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param vm_scale_set_name: The name of the VM scale set where the - extension should be create or updated. - :type vm_scale_set_name: str - :param instance_id: The instance ID of the virtual machine. - :type instance_id: str - :param parameters: Parameters supplied to the Update Virtual Machine - Scale Sets VM operation. - :type parameters: - ~azure.mgmt.compute.v2019_03_01.models.VirtualMachineScaleSetVM - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns - VirtualMachineScaleSetVM or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2019_03_01.models.VirtualMachineScaleSetVM] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2019_03_01.models.VirtualMachineScaleSetVM]] - :raises: :class:`CloudError` - """ - raw_result = self._update_initial( - resource_group_name=resource_group_name, - vm_scale_set_name=vm_scale_set_name, - instance_id=instance_id, - parameters=parameters, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('VirtualMachineScaleSetVM', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/virtualmachines/{instanceId}'} - - - def _delete_initial( - self, resource_group_name, vm_scale_set_name, instance_id, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.delete.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), - 'instanceId': self._serialize.url("instance_id", instance_id, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202, 204]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - def delete( - self, resource_group_name, vm_scale_set_name, instance_id, custom_headers=None, raw=False, polling=True, **operation_config): - """Deletes a virtual machine from a VM scale set. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param vm_scale_set_name: The name of the VM scale set. - :type vm_scale_set_name: str - :param instance_id: The instance ID of the virtual machine. - :type instance_id: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns None or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] - :raises: :class:`CloudError` - """ - raw_result = self._delete_initial( - resource_group_name=resource_group_name, - vm_scale_set_name=vm_scale_set_name, - instance_id=instance_id, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/virtualmachines/{instanceId}'} - - def get( - self, resource_group_name, vm_scale_set_name, instance_id, custom_headers=None, raw=False, **operation_config): - """Gets a virtual machine from a VM scale set. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param vm_scale_set_name: The name of the VM scale set. - :type vm_scale_set_name: str - :param instance_id: The instance ID of the virtual machine. - :type instance_id: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: VirtualMachineScaleSetVM or ClientRawResponse if raw=true - :rtype: - ~azure.mgmt.compute.v2019_03_01.models.VirtualMachineScaleSetVM or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), - 'instanceId': self._serialize.url("instance_id", instance_id, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('VirtualMachineScaleSetVM', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/virtualmachines/{instanceId}'} - - def get_instance_view( - self, resource_group_name, vm_scale_set_name, instance_id, custom_headers=None, raw=False, **operation_config): - """Gets the status of a virtual machine from a VM scale set. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param vm_scale_set_name: The name of the VM scale set. - :type vm_scale_set_name: str - :param instance_id: The instance ID of the virtual machine. - :type instance_id: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: VirtualMachineScaleSetVMInstanceView or ClientRawResponse if - raw=true - :rtype: - ~azure.mgmt.compute.v2019_03_01.models.VirtualMachineScaleSetVMInstanceView - or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get_instance_view.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), - 'instanceId': self._serialize.url("instance_id", instance_id, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('VirtualMachineScaleSetVMInstanceView', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_instance_view.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/virtualmachines/{instanceId}/instanceView'} - - def list( - self, resource_group_name, virtual_machine_scale_set_name, filter=None, select=None, expand=None, custom_headers=None, raw=False, **operation_config): - """Gets a list of all virtual machines in a VM scale sets. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param virtual_machine_scale_set_name: The name of the VM scale set. - :type virtual_machine_scale_set_name: str - :param filter: The filter to apply to the operation. - :type filter: str - :param select: The list parameters. - :type select: str - :param expand: The expand expression to apply to the operation. - :type expand: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of VirtualMachineScaleSetVM - :rtype: - ~azure.mgmt.compute.v2019_03_01.models.VirtualMachineScaleSetVMPaged[~azure.mgmt.compute.v2019_03_01.models.VirtualMachineScaleSetVM] - :raises: :class:`CloudError` - """ - def internal_paging(next_link=None, raw=False): - - if not next_link: - # Construct URL - url = self.list.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'virtualMachineScaleSetName': self._serialize.url("virtual_machine_scale_set_name", virtual_machine_scale_set_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - if filter is not None: - query_parameters['$filter'] = self._serialize.query("filter", filter, 'str') - if select is not None: - query_parameters['$select'] = self._serialize.query("select", select, 'str') - if expand is not None: - query_parameters['$expand'] = self._serialize.query("expand", expand, 'str') - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - deserialized = models.VirtualMachineScaleSetVMPaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.VirtualMachineScaleSetVMPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{virtualMachineScaleSetName}/virtualMachines'} - - - def _power_off_initial( - self, resource_group_name, vm_scale_set_name, instance_id, skip_shutdown=False, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.power_off.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), - 'instanceId': self._serialize.url("instance_id", instance_id, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - if skip_shutdown is not None: - query_parameters['skipShutdown'] = self._serialize.query("skip_shutdown", skip_shutdown, 'bool') - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - def power_off( - self, resource_group_name, vm_scale_set_name, instance_id, skip_shutdown=False, custom_headers=None, raw=False, polling=True, **operation_config): - """Power off (stop) a virtual machine in a VM scale set. Note that - resources are still attached and you are getting charged for the - resources. Instead, use deallocate to release resources and avoid - charges. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param vm_scale_set_name: The name of the VM scale set. - :type vm_scale_set_name: str - :param instance_id: The instance ID of the virtual machine. - :type instance_id: str - :param skip_shutdown: The parameter to request non-graceful VM - shutdown. True value for this flag indicates non-graceful shutdown - whereas false indicates otherwise. Default value for this flag is - false if not specified - :type skip_shutdown: bool - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns None or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] - :raises: :class:`CloudError` - """ - raw_result = self._power_off_initial( - resource_group_name=resource_group_name, - vm_scale_set_name=vm_scale_set_name, - instance_id=instance_id, - skip_shutdown=skip_shutdown, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - power_off.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/virtualmachines/{instanceId}/poweroff'} - - - def _restart_initial( - self, resource_group_name, vm_scale_set_name, instance_id, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.restart.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), - 'instanceId': self._serialize.url("instance_id", instance_id, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - def restart( - self, resource_group_name, vm_scale_set_name, instance_id, custom_headers=None, raw=False, polling=True, **operation_config): - """Restarts a virtual machine in a VM scale set. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param vm_scale_set_name: The name of the VM scale set. - :type vm_scale_set_name: str - :param instance_id: The instance ID of the virtual machine. - :type instance_id: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns None or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] - :raises: :class:`CloudError` - """ - raw_result = self._restart_initial( - resource_group_name=resource_group_name, - vm_scale_set_name=vm_scale_set_name, - instance_id=instance_id, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - restart.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/virtualmachines/{instanceId}/restart'} - - - def _start_initial( - self, resource_group_name, vm_scale_set_name, instance_id, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.start.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), - 'instanceId': self._serialize.url("instance_id", instance_id, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - def start( - self, resource_group_name, vm_scale_set_name, instance_id, custom_headers=None, raw=False, polling=True, **operation_config): - """Starts a virtual machine in a VM scale set. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param vm_scale_set_name: The name of the VM scale set. - :type vm_scale_set_name: str - :param instance_id: The instance ID of the virtual machine. - :type instance_id: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns None or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] - :raises: :class:`CloudError` - """ - raw_result = self._start_initial( - resource_group_name=resource_group_name, - vm_scale_set_name=vm_scale_set_name, - instance_id=instance_id, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - start.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/virtualmachines/{instanceId}/start'} - - - def _redeploy_initial( - self, resource_group_name, vm_scale_set_name, instance_id, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.redeploy.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), - 'instanceId': self._serialize.url("instance_id", instance_id, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - def redeploy( - self, resource_group_name, vm_scale_set_name, instance_id, custom_headers=None, raw=False, polling=True, **operation_config): - """Redeploys a virtual machine in a VM scale set. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param vm_scale_set_name: The name of the VM scale set. - :type vm_scale_set_name: str - :param instance_id: The instance ID of the virtual machine. - :type instance_id: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns None or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] - :raises: :class:`CloudError` - """ - raw_result = self._redeploy_initial( - resource_group_name=resource_group_name, - vm_scale_set_name=vm_scale_set_name, - instance_id=instance_id, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - redeploy.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/virtualmachines/{instanceId}/redeploy'} - - - def _perform_maintenance_initial( - self, resource_group_name, vm_scale_set_name, instance_id, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.perform_maintenance.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), - 'instanceId': self._serialize.url("instance_id", instance_id, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - def perform_maintenance( - self, resource_group_name, vm_scale_set_name, instance_id, custom_headers=None, raw=False, polling=True, **operation_config): - """Performs maintenance on a virtual machine in a VM scale set. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param vm_scale_set_name: The name of the VM scale set. - :type vm_scale_set_name: str - :param instance_id: The instance ID of the virtual machine. - :type instance_id: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns None or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] - :raises: :class:`CloudError` - """ - raw_result = self._perform_maintenance_initial( - resource_group_name=resource_group_name, - vm_scale_set_name=vm_scale_set_name, - instance_id=instance_id, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - perform_maintenance.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/virtualmachines/{instanceId}/performMaintenance'} - - - def _run_command_initial( - self, resource_group_name, vm_scale_set_name, instance_id, parameters, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.run_command.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), - 'instanceId': self._serialize.url("instance_id", instance_id, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(parameters, 'RunCommandInput') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('RunCommandResult', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def run_command( - self, resource_group_name, vm_scale_set_name, instance_id, parameters, custom_headers=None, raw=False, polling=True, **operation_config): - """Run command on a virtual machine in a VM scale set. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param vm_scale_set_name: The name of the VM scale set. - :type vm_scale_set_name: str - :param instance_id: The instance ID of the virtual machine. - :type instance_id: str - :param parameters: Parameters supplied to the Run command operation. - :type parameters: - ~azure.mgmt.compute.v2019_03_01.models.RunCommandInput - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns RunCommandResult or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2019_03_01.models.RunCommandResult] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2019_03_01.models.RunCommandResult]] - :raises: :class:`CloudError` - """ - raw_result = self._run_command_initial( - resource_group_name=resource_group_name, - vm_scale_set_name=vm_scale_set_name, - instance_id=instance_id, - parameters=parameters, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('RunCommandResult', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - run_command.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/virtualmachines/{instanceId}/runCommand'} diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/operations/virtual_machine_scale_sets_operations.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/operations/virtual_machine_scale_sets_operations.py deleted file mode 100644 index b3806d0b44fd..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/operations/virtual_machine_scale_sets_operations.py +++ /dev/null @@ -1,1830 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError -from msrest.polling import LROPoller, NoPolling -from msrestazure.polling.arm_polling import ARMPolling - -from .. import models - - -class VirtualMachineScaleSetsOperations(object): - """VirtualMachineScaleSetsOperations operations. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: Client Api Version. Constant value: "2019-03-01". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2019-03-01" - - self.config = config - - - def _create_or_update_initial( - self, resource_group_name, vm_scale_set_name, parameters, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.create_or_update.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(parameters, 'VirtualMachineScaleSet') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 201]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('VirtualMachineScaleSet', response) - if response.status_code == 201: - deserialized = self._deserialize('VirtualMachineScaleSet', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def create_or_update( - self, resource_group_name, vm_scale_set_name, parameters, custom_headers=None, raw=False, polling=True, **operation_config): - """Create or update a VM scale set. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param vm_scale_set_name: The name of the VM scale set to create or - update. - :type vm_scale_set_name: str - :param parameters: The scale set object. - :type parameters: - ~azure.mgmt.compute.v2019_03_01.models.VirtualMachineScaleSet - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns VirtualMachineScaleSet - or ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2019_03_01.models.VirtualMachineScaleSet] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2019_03_01.models.VirtualMachineScaleSet]] - :raises: :class:`CloudError` - """ - raw_result = self._create_or_update_initial( - resource_group_name=resource_group_name, - vm_scale_set_name=vm_scale_set_name, - parameters=parameters, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('VirtualMachineScaleSet', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}'} - - - def _update_initial( - self, resource_group_name, vm_scale_set_name, parameters, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.update.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(parameters, 'VirtualMachineScaleSetUpdate') - - # Construct and send request - request = self._client.patch(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('VirtualMachineScaleSet', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def update( - self, resource_group_name, vm_scale_set_name, parameters, custom_headers=None, raw=False, polling=True, **operation_config): - """Update a VM scale set. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param vm_scale_set_name: The name of the VM scale set to create or - update. - :type vm_scale_set_name: str - :param parameters: The scale set object. - :type parameters: - ~azure.mgmt.compute.v2019_03_01.models.VirtualMachineScaleSetUpdate - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns VirtualMachineScaleSet - or ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2019_03_01.models.VirtualMachineScaleSet] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2019_03_01.models.VirtualMachineScaleSet]] - :raises: :class:`CloudError` - """ - raw_result = self._update_initial( - resource_group_name=resource_group_name, - vm_scale_set_name=vm_scale_set_name, - parameters=parameters, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('VirtualMachineScaleSet', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}'} - - - def _delete_initial( - self, resource_group_name, vm_scale_set_name, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.delete.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202, 204]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - def delete( - self, resource_group_name, vm_scale_set_name, custom_headers=None, raw=False, polling=True, **operation_config): - """Deletes a VM scale set. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param vm_scale_set_name: The name of the VM scale set. - :type vm_scale_set_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns None or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] - :raises: :class:`CloudError` - """ - raw_result = self._delete_initial( - resource_group_name=resource_group_name, - vm_scale_set_name=vm_scale_set_name, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}'} - - def get( - self, resource_group_name, vm_scale_set_name, custom_headers=None, raw=False, **operation_config): - """Display information about a virtual machine scale set. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param vm_scale_set_name: The name of the VM scale set. - :type vm_scale_set_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: VirtualMachineScaleSet or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.compute.v2019_03_01.models.VirtualMachineScaleSet - or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('VirtualMachineScaleSet', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}'} - - - def _deallocate_initial( - self, resource_group_name, vm_scale_set_name, instance_ids=None, custom_headers=None, raw=False, **operation_config): - vm_instance_ids = None - if instance_ids is not None: - vm_instance_ids = models.VirtualMachineScaleSetVMInstanceIDs(instance_ids=instance_ids) - - # Construct URL - url = self.deallocate.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - if vm_instance_ids is not None: - body_content = self._serialize.body(vm_instance_ids, 'VirtualMachineScaleSetVMInstanceIDs') - else: - body_content = None - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - def deallocate( - self, resource_group_name, vm_scale_set_name, instance_ids=None, custom_headers=None, raw=False, polling=True, **operation_config): - """Deallocates specific virtual machines in a VM scale set. Shuts down the - virtual machines and releases the compute resources. You are not billed - for the compute resources that this virtual machine scale set - deallocates. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param vm_scale_set_name: The name of the VM scale set. - :type vm_scale_set_name: str - :param instance_ids: The virtual machine scale set instance ids. - Omitting the virtual machine scale set instance ids will result in the - operation being performed on all virtual machines in the virtual - machine scale set. - :type instance_ids: list[str] - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns None or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] - :raises: :class:`CloudError` - """ - raw_result = self._deallocate_initial( - resource_group_name=resource_group_name, - vm_scale_set_name=vm_scale_set_name, - instance_ids=instance_ids, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - deallocate.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/deallocate'} - - - def _delete_instances_initial( - self, resource_group_name, vm_scale_set_name, instance_ids, custom_headers=None, raw=False, **operation_config): - vm_instance_ids = models.VirtualMachineScaleSetVMInstanceRequiredIDs(instance_ids=instance_ids) - - # Construct URL - url = self.delete_instances.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(vm_instance_ids, 'VirtualMachineScaleSetVMInstanceRequiredIDs') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - def delete_instances( - self, resource_group_name, vm_scale_set_name, instance_ids, custom_headers=None, raw=False, polling=True, **operation_config): - """Deletes virtual machines in a VM scale set. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param vm_scale_set_name: The name of the VM scale set. - :type vm_scale_set_name: str - :param instance_ids: The virtual machine scale set instance ids. - :type instance_ids: list[str] - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns None or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] - :raises: :class:`CloudError` - """ - raw_result = self._delete_instances_initial( - resource_group_name=resource_group_name, - vm_scale_set_name=vm_scale_set_name, - instance_ids=instance_ids, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - delete_instances.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/delete'} - - def get_instance_view( - self, resource_group_name, vm_scale_set_name, custom_headers=None, raw=False, **operation_config): - """Gets the status of a VM scale set instance. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param vm_scale_set_name: The name of the VM scale set. - :type vm_scale_set_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: VirtualMachineScaleSetInstanceView or ClientRawResponse if - raw=true - :rtype: - ~azure.mgmt.compute.v2019_03_01.models.VirtualMachineScaleSetInstanceView - or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get_instance_view.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('VirtualMachineScaleSetInstanceView', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_instance_view.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/instanceView'} - - def list( - self, resource_group_name, custom_headers=None, raw=False, **operation_config): - """Gets a list of all VM scale sets under a resource group. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of VirtualMachineScaleSet - :rtype: - ~azure.mgmt.compute.v2019_03_01.models.VirtualMachineScaleSetPaged[~azure.mgmt.compute.v2019_03_01.models.VirtualMachineScaleSet] - :raises: :class:`CloudError` - """ - def internal_paging(next_link=None, raw=False): - - if not next_link: - # Construct URL - url = self.list.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - deserialized = models.VirtualMachineScaleSetPaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.VirtualMachineScaleSetPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets'} - - def list_all( - self, custom_headers=None, raw=False, **operation_config): - """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. - - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of VirtualMachineScaleSet - :rtype: - ~azure.mgmt.compute.v2019_03_01.models.VirtualMachineScaleSetPaged[~azure.mgmt.compute.v2019_03_01.models.VirtualMachineScaleSet] - :raises: :class:`CloudError` - """ - def internal_paging(next_link=None, raw=False): - - if not next_link: - # Construct URL - url = self.list_all.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - deserialized = models.VirtualMachineScaleSetPaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.VirtualMachineScaleSetPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - list_all.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Compute/virtualMachineScaleSets'} - - def list_skus( - self, resource_group_name, vm_scale_set_name, custom_headers=None, raw=False, **operation_config): - """Gets a list of SKUs available for your VM scale set, including the - minimum and maximum VM instances allowed for each SKU. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param vm_scale_set_name: The name of the VM scale set. - :type vm_scale_set_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of VirtualMachineScaleSetSku - :rtype: - ~azure.mgmt.compute.v2019_03_01.models.VirtualMachineScaleSetSkuPaged[~azure.mgmt.compute.v2019_03_01.models.VirtualMachineScaleSetSku] - :raises: :class:`CloudError` - """ - def internal_paging(next_link=None, raw=False): - - if not next_link: - # Construct URL - url = self.list_skus.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - deserialized = models.VirtualMachineScaleSetSkuPaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.VirtualMachineScaleSetSkuPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - list_skus.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/skus'} - - def get_os_upgrade_history( - self, resource_group_name, vm_scale_set_name, custom_headers=None, raw=False, **operation_config): - """Gets list of OS upgrades on a VM scale set instance. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param vm_scale_set_name: The name of the VM scale set. - :type vm_scale_set_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of - UpgradeOperationHistoricalStatusInfo - :rtype: - ~azure.mgmt.compute.v2019_03_01.models.UpgradeOperationHistoricalStatusInfoPaged[~azure.mgmt.compute.v2019_03_01.models.UpgradeOperationHistoricalStatusInfo] - :raises: :class:`CloudError` - """ - def internal_paging(next_link=None, raw=False): - - if not next_link: - # Construct URL - url = self.get_os_upgrade_history.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - deserialized = models.UpgradeOperationHistoricalStatusInfoPaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.UpgradeOperationHistoricalStatusInfoPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - get_os_upgrade_history.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/osUpgradeHistory'} - - - def _power_off_initial( - self, resource_group_name, vm_scale_set_name, skip_shutdown=False, instance_ids=None, custom_headers=None, raw=False, **operation_config): - vm_instance_ids = None - if instance_ids is not None: - vm_instance_ids = models.VirtualMachineScaleSetVMInstanceIDs(instance_ids=instance_ids) - - # Construct URL - url = self.power_off.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - if skip_shutdown is not None: - query_parameters['skipShutdown'] = self._serialize.query("skip_shutdown", skip_shutdown, 'bool') - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - if vm_instance_ids is not None: - body_content = self._serialize.body(vm_instance_ids, 'VirtualMachineScaleSetVMInstanceIDs') - else: - body_content = None - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - def power_off( - self, resource_group_name, vm_scale_set_name, skip_shutdown=False, instance_ids=None, custom_headers=None, raw=False, polling=True, **operation_config): - """Power off (stop) one or more virtual machines in a VM scale set. Note - that resources are still attached and you are getting charged for the - resources. Instead, use deallocate to release resources and avoid - charges. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param vm_scale_set_name: The name of the VM scale set. - :type vm_scale_set_name: str - :param skip_shutdown: The parameter to request non-graceful VM - shutdown. True value for this flag indicates non-graceful shutdown - whereas false indicates otherwise. Default value for this flag is - false if not specified - :type skip_shutdown: bool - :param instance_ids: The virtual machine scale set instance ids. - Omitting the virtual machine scale set instance ids will result in the - operation being performed on all virtual machines in the virtual - machine scale set. - :type instance_ids: list[str] - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns None or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] - :raises: :class:`CloudError` - """ - raw_result = self._power_off_initial( - resource_group_name=resource_group_name, - vm_scale_set_name=vm_scale_set_name, - skip_shutdown=skip_shutdown, - instance_ids=instance_ids, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - power_off.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/poweroff'} - - - def _restart_initial( - self, resource_group_name, vm_scale_set_name, instance_ids=None, custom_headers=None, raw=False, **operation_config): - vm_instance_ids = None - if instance_ids is not None: - vm_instance_ids = models.VirtualMachineScaleSetVMInstanceIDs(instance_ids=instance_ids) - - # Construct URL - url = self.restart.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - if vm_instance_ids is not None: - body_content = self._serialize.body(vm_instance_ids, 'VirtualMachineScaleSetVMInstanceIDs') - else: - body_content = None - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - def restart( - self, resource_group_name, vm_scale_set_name, instance_ids=None, custom_headers=None, raw=False, polling=True, **operation_config): - """Restarts one or more virtual machines in a VM scale set. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param vm_scale_set_name: The name of the VM scale set. - :type vm_scale_set_name: str - :param instance_ids: The virtual machine scale set instance ids. - Omitting the virtual machine scale set instance ids will result in the - operation being performed on all virtual machines in the virtual - machine scale set. - :type instance_ids: list[str] - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns None or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] - :raises: :class:`CloudError` - """ - raw_result = self._restart_initial( - resource_group_name=resource_group_name, - vm_scale_set_name=vm_scale_set_name, - instance_ids=instance_ids, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - restart.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/restart'} - - - def _start_initial( - self, resource_group_name, vm_scale_set_name, instance_ids=None, custom_headers=None, raw=False, **operation_config): - vm_instance_ids = None - if instance_ids is not None: - vm_instance_ids = models.VirtualMachineScaleSetVMInstanceIDs(instance_ids=instance_ids) - - # Construct URL - url = self.start.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - if vm_instance_ids is not None: - body_content = self._serialize.body(vm_instance_ids, 'VirtualMachineScaleSetVMInstanceIDs') - else: - body_content = None - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - def start( - self, resource_group_name, vm_scale_set_name, instance_ids=None, custom_headers=None, raw=False, polling=True, **operation_config): - """Starts one or more virtual machines in a VM scale set. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param vm_scale_set_name: The name of the VM scale set. - :type vm_scale_set_name: str - :param instance_ids: The virtual machine scale set instance ids. - Omitting the virtual machine scale set instance ids will result in the - operation being performed on all virtual machines in the virtual - machine scale set. - :type instance_ids: list[str] - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns None or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] - :raises: :class:`CloudError` - """ - raw_result = self._start_initial( - resource_group_name=resource_group_name, - vm_scale_set_name=vm_scale_set_name, - instance_ids=instance_ids, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - start.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/start'} - - - def _redeploy_initial( - self, resource_group_name, vm_scale_set_name, instance_ids=None, custom_headers=None, raw=False, **operation_config): - vm_instance_ids = None - if instance_ids is not None: - vm_instance_ids = models.VirtualMachineScaleSetVMInstanceIDs(instance_ids=instance_ids) - - # Construct URL - url = self.redeploy.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - if vm_instance_ids is not None: - body_content = self._serialize.body(vm_instance_ids, 'VirtualMachineScaleSetVMInstanceIDs') - else: - body_content = None - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - def redeploy( - self, resource_group_name, vm_scale_set_name, instance_ids=None, custom_headers=None, raw=False, polling=True, **operation_config): - """Redeploy one or more virtual machines in a VM scale set. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param vm_scale_set_name: The name of the VM scale set. - :type vm_scale_set_name: str - :param instance_ids: The virtual machine scale set instance ids. - Omitting the virtual machine scale set instance ids will result in the - operation being performed on all virtual machines in the virtual - machine scale set. - :type instance_ids: list[str] - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns None or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] - :raises: :class:`CloudError` - """ - raw_result = self._redeploy_initial( - resource_group_name=resource_group_name, - vm_scale_set_name=vm_scale_set_name, - instance_ids=instance_ids, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - redeploy.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/redeploy'} - - - def _perform_maintenance_initial( - self, resource_group_name, vm_scale_set_name, instance_ids=None, custom_headers=None, raw=False, **operation_config): - vm_instance_ids = None - if instance_ids is not None: - vm_instance_ids = models.VirtualMachineScaleSetVMInstanceIDs(instance_ids=instance_ids) - - # Construct URL - url = self.perform_maintenance.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - if vm_instance_ids is not None: - body_content = self._serialize.body(vm_instance_ids, 'VirtualMachineScaleSetVMInstanceIDs') - else: - body_content = None - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - def perform_maintenance( - self, resource_group_name, vm_scale_set_name, instance_ids=None, custom_headers=None, raw=False, polling=True, **operation_config): - """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. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param vm_scale_set_name: The name of the VM scale set. - :type vm_scale_set_name: str - :param instance_ids: The virtual machine scale set instance ids. - Omitting the virtual machine scale set instance ids will result in the - operation being performed on all virtual machines in the virtual - machine scale set. - :type instance_ids: list[str] - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns None or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] - :raises: :class:`CloudError` - """ - raw_result = self._perform_maintenance_initial( - resource_group_name=resource_group_name, - vm_scale_set_name=vm_scale_set_name, - instance_ids=instance_ids, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - perform_maintenance.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/performMaintenance'} - - - def _update_instances_initial( - self, resource_group_name, vm_scale_set_name, instance_ids, custom_headers=None, raw=False, **operation_config): - vm_instance_ids = models.VirtualMachineScaleSetVMInstanceRequiredIDs(instance_ids=instance_ids) - - # Construct URL - url = self.update_instances.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(vm_instance_ids, 'VirtualMachineScaleSetVMInstanceRequiredIDs') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - def update_instances( - self, resource_group_name, vm_scale_set_name, instance_ids, custom_headers=None, raw=False, polling=True, **operation_config): - """Upgrades one or more virtual machines to the latest SKU set in the VM - scale set model. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param vm_scale_set_name: The name of the VM scale set. - :type vm_scale_set_name: str - :param instance_ids: The virtual machine scale set instance ids. - :type instance_ids: list[str] - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns None or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] - :raises: :class:`CloudError` - """ - raw_result = self._update_instances_initial( - resource_group_name=resource_group_name, - vm_scale_set_name=vm_scale_set_name, - instance_ids=instance_ids, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - update_instances.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/manualupgrade'} - - - def _reimage_initial( - self, resource_group_name, vm_scale_set_name, temp_disk=None, instance_ids=None, custom_headers=None, raw=False, **operation_config): - vm_scale_set_reimage_input = None - if temp_disk is not None or instance_ids is not None: - vm_scale_set_reimage_input = models.VirtualMachineScaleSetReimageParameters(temp_disk=temp_disk, instance_ids=instance_ids) - - # Construct URL - url = self.reimage.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - if vm_scale_set_reimage_input is not None: - body_content = self._serialize.body(vm_scale_set_reimage_input, 'VirtualMachineScaleSetReimageParameters') - else: - body_content = None - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - def reimage( - self, resource_group_name, vm_scale_set_name, temp_disk=None, instance_ids=None, custom_headers=None, raw=False, polling=True, **operation_config): - """Reimages (upgrade the operating system) one or more virtual machines in - a VM scale set which don't have a ephemeral OS disk, for virtual - machines who have a ephemeral OS disk the virtual machine is reset to - initial state. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param vm_scale_set_name: The name of the VM scale set. - :type vm_scale_set_name: str - :param temp_disk: Specifies whether to reimage temp disk. Default - value: false. - :type temp_disk: bool - :param instance_ids: The virtual machine scale set instance ids. - Omitting the virtual machine scale set instance ids will result in the - operation being performed on all virtual machines in the virtual - machine scale set. - :type instance_ids: list[str] - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns None or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] - :raises: :class:`CloudError` - """ - raw_result = self._reimage_initial( - resource_group_name=resource_group_name, - vm_scale_set_name=vm_scale_set_name, - temp_disk=temp_disk, - instance_ids=instance_ids, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - reimage.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/reimage'} - - - def _reimage_all_initial( - self, resource_group_name, vm_scale_set_name, instance_ids=None, custom_headers=None, raw=False, **operation_config): - vm_instance_ids = None - if instance_ids is not None: - vm_instance_ids = models.VirtualMachineScaleSetVMInstanceIDs(instance_ids=instance_ids) - - # Construct URL - url = self.reimage_all.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - if vm_instance_ids is not None: - body_content = self._serialize.body(vm_instance_ids, 'VirtualMachineScaleSetVMInstanceIDs') - else: - body_content = None - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - def reimage_all( - self, resource_group_name, vm_scale_set_name, instance_ids=None, custom_headers=None, raw=False, polling=True, **operation_config): - """Reimages all the disks ( including data disks ) in the virtual machines - in a VM scale set. This operation is only supported for managed disks. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param vm_scale_set_name: The name of the VM scale set. - :type vm_scale_set_name: str - :param instance_ids: The virtual machine scale set instance ids. - Omitting the virtual machine scale set instance ids will result in the - operation being performed on all virtual machines in the virtual - machine scale set. - :type instance_ids: list[str] - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns None or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] - :raises: :class:`CloudError` - """ - raw_result = self._reimage_all_initial( - resource_group_name=resource_group_name, - vm_scale_set_name=vm_scale_set_name, - instance_ids=instance_ids, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - reimage_all.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/reimageall'} - - def force_recovery_service_fabric_platform_update_domain_walk( - self, resource_group_name, vm_scale_set_name, platform_update_domain, custom_headers=None, raw=False, **operation_config): - """Manual platform update domain walk to update virtual machines in a - service fabric virtual machine scale set. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param vm_scale_set_name: The name of the VM scale set. - :type vm_scale_set_name: str - :param platform_update_domain: The platform update domain for which a - manual recovery walk is requested - :type platform_update_domain: int - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: RecoveryWalkResponse or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.compute.v2019_03_01.models.RecoveryWalkResponse or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.force_recovery_service_fabric_platform_update_domain_walk.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - query_parameters['platformUpdateDomain'] = self._serialize.query("platform_update_domain", platform_update_domain, 'int') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('RecoveryWalkResponse', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - force_recovery_service_fabric_platform_update_domain_walk.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/forceRecoveryServiceFabricPlatformUpdateDomainWalk'} - - def convert_to_single_placement_group( - self, resource_group_name, vm_scale_set_name, active_placement_group_id=None, custom_headers=None, raw=False, **operation_config): - """Converts SinglePlacementGroup property to false for a existing virtual - machine scale set. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param vm_scale_set_name: The name of the virtual machine scale set to - create or update. - :type vm_scale_set_name: str - :param active_placement_group_id: Id of the placement group in which - you want future virtual machine instances to be placed. To query - placement group Id, please use Virtual Machine Scale Set VMs - Get - API. If not provided, the platform will choose one with maximum number - of virtual machine instances. - :type active_placement_group_id: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - parameters = models.VMScaleSetConvertToSinglePlacementGroupInput(active_placement_group_id=active_placement_group_id) - - # Construct URL - url = self.convert_to_single_placement_group.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(parameters, 'VMScaleSetConvertToSinglePlacementGroupInput') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - convert_to_single_placement_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/convertToSinglePlacementGroup'} diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/operations/virtual_machine_sizes_operations.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/operations/virtual_machine_sizes_operations.py deleted file mode 100644 index c3b8c3c3a95f..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/operations/virtual_machine_sizes_operations.py +++ /dev/null @@ -1,107 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError - -from .. import models - - -class VirtualMachineSizesOperations(object): - """VirtualMachineSizesOperations operations. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: Client Api Version. Constant value: "2019-03-01". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2019-03-01" - - self.config = config - - def list( - self, location, custom_headers=None, raw=False, **operation_config): - """This API is deprecated. Use [Resources - Skus](https://docs.microsoft.com/en-us/rest/api/compute/resourceskus/list). - - :param location: The location upon which virtual-machine-sizes is - queried. - :type location: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of VirtualMachineSize - :rtype: - ~azure.mgmt.compute.v2019_03_01.models.VirtualMachineSizePaged[~azure.mgmt.compute.v2019_03_01.models.VirtualMachineSize] - :raises: :class:`CloudError` - """ - def internal_paging(next_link=None, raw=False): - - if not next_link: - # Construct URL - url = self.list.metadata['url'] - path_format_arguments = { - 'location': self._serialize.url("location", location, 'str', pattern=r'^[-\w\._]+$'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - deserialized = models.VirtualMachineSizePaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.VirtualMachineSizePaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/vmSizes'} diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/operations/virtual_machines_operations.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/operations/virtual_machines_operations.py deleted file mode 100644 index 610344d62ce0..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/operations/virtual_machines_operations.py +++ /dev/null @@ -1,1654 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError -from msrest.polling import LROPoller, NoPolling -from msrestazure.polling.arm_polling import ARMPolling - -from .. import models - - -class VirtualMachinesOperations(object): - """VirtualMachinesOperations operations. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: Client Api Version. Constant value: "2019-03-01". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2019-03-01" - - self.config = config - - def list_by_location( - self, location, custom_headers=None, raw=False, **operation_config): - """Gets all the virtual machines under the specified subscription for the - specified location. - - :param location: The location for which virtual machines under the - subscription are queried. - :type location: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of VirtualMachine - :rtype: - ~azure.mgmt.compute.v2019_03_01.models.VirtualMachinePaged[~azure.mgmt.compute.v2019_03_01.models.VirtualMachine] - :raises: :class:`CloudError` - """ - def internal_paging(next_link=None, raw=False): - - if not next_link: - # Construct URL - url = self.list_by_location.metadata['url'] - path_format_arguments = { - 'location': self._serialize.url("location", location, 'str', pattern=r'^[-\w\._]+$'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - deserialized = models.VirtualMachinePaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.VirtualMachinePaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - list_by_location.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/virtualMachines'} - - - def _capture_initial( - self, resource_group_name, vm_name, parameters, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.capture.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'vmName': self._serialize.url("vm_name", vm_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(parameters, 'VirtualMachineCaptureParameters') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('VirtualMachineCaptureResult', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def capture( - self, resource_group_name, vm_name, parameters, custom_headers=None, raw=False, polling=True, **operation_config): - """Captures the VM by copying virtual hard disks of the VM and outputs a - template that can be used to create similar VMs. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param vm_name: The name of the virtual machine. - :type vm_name: str - :param parameters: Parameters supplied to the Capture Virtual Machine - operation. - :type parameters: - ~azure.mgmt.compute.v2019_03_01.models.VirtualMachineCaptureParameters - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns - VirtualMachineCaptureResult or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2019_03_01.models.VirtualMachineCaptureResult] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2019_03_01.models.VirtualMachineCaptureResult]] - :raises: :class:`CloudError` - """ - raw_result = self._capture_initial( - resource_group_name=resource_group_name, - vm_name=vm_name, - parameters=parameters, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('VirtualMachineCaptureResult', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - capture.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/capture'} - - - def _create_or_update_initial( - self, resource_group_name, vm_name, parameters, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.create_or_update.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'vmName': self._serialize.url("vm_name", vm_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(parameters, 'VirtualMachine') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 201]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('VirtualMachine', response) - if response.status_code == 201: - deserialized = self._deserialize('VirtualMachine', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def create_or_update( - self, resource_group_name, vm_name, parameters, custom_headers=None, raw=False, polling=True, **operation_config): - """The operation to create or update a virtual machine. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param vm_name: The name of the virtual machine. - :type vm_name: str - :param parameters: Parameters supplied to the Create Virtual Machine - operation. - :type parameters: - ~azure.mgmt.compute.v2019_03_01.models.VirtualMachine - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns VirtualMachine or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2019_03_01.models.VirtualMachine] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2019_03_01.models.VirtualMachine]] - :raises: :class:`CloudError` - """ - raw_result = self._create_or_update_initial( - resource_group_name=resource_group_name, - vm_name=vm_name, - parameters=parameters, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('VirtualMachine', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}'} - - - def _update_initial( - self, resource_group_name, vm_name, parameters, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.update.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'vmName': self._serialize.url("vm_name", vm_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(parameters, 'VirtualMachineUpdate') - - # Construct and send request - request = self._client.patch(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 201]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('VirtualMachine', response) - if response.status_code == 201: - deserialized = self._deserialize('VirtualMachine', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def update( - self, resource_group_name, vm_name, parameters, custom_headers=None, raw=False, polling=True, **operation_config): - """The operation to update a virtual machine. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param vm_name: The name of the virtual machine. - :type vm_name: str - :param parameters: Parameters supplied to the Update Virtual Machine - operation. - :type parameters: - ~azure.mgmt.compute.v2019_03_01.models.VirtualMachineUpdate - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns VirtualMachine or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2019_03_01.models.VirtualMachine] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2019_03_01.models.VirtualMachine]] - :raises: :class:`CloudError` - """ - raw_result = self._update_initial( - resource_group_name=resource_group_name, - vm_name=vm_name, - parameters=parameters, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('VirtualMachine', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}'} - - - def _delete_initial( - self, resource_group_name, vm_name, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.delete.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'vmName': self._serialize.url("vm_name", vm_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202, 204]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - def delete( - self, resource_group_name, vm_name, custom_headers=None, raw=False, polling=True, **operation_config): - """The operation to delete a virtual machine. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param vm_name: The name of the virtual machine. - :type vm_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns None or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] - :raises: :class:`CloudError` - """ - raw_result = self._delete_initial( - resource_group_name=resource_group_name, - vm_name=vm_name, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}'} - - def get( - self, resource_group_name, vm_name, expand=None, custom_headers=None, raw=False, **operation_config): - """Retrieves information about the model view or the instance view of a - virtual machine. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param vm_name: The name of the virtual machine. - :type vm_name: str - :param expand: The expand expression to apply on the operation. - Possible values include: 'instanceView' - :type expand: str or - ~azure.mgmt.compute.v2019_03_01.models.InstanceViewTypes - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: VirtualMachine or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.compute.v2019_03_01.models.VirtualMachine or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'vmName': self._serialize.url("vm_name", vm_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - if expand is not None: - query_parameters['$expand'] = self._serialize.query("expand", expand, 'InstanceViewTypes') - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('VirtualMachine', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}'} - - def instance_view( - self, resource_group_name, vm_name, custom_headers=None, raw=False, **operation_config): - """Retrieves information about the run-time state of a virtual machine. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param vm_name: The name of the virtual machine. - :type vm_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: VirtualMachineInstanceView or ClientRawResponse if raw=true - :rtype: - ~azure.mgmt.compute.v2019_03_01.models.VirtualMachineInstanceView or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.instance_view.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'vmName': self._serialize.url("vm_name", vm_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('VirtualMachineInstanceView', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - instance_view.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/instanceView'} - - - def _convert_to_managed_disks_initial( - self, resource_group_name, vm_name, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.convert_to_managed_disks.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'vmName': self._serialize.url("vm_name", vm_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - def convert_to_managed_disks( - self, resource_group_name, vm_name, custom_headers=None, raw=False, polling=True, **operation_config): - """Converts virtual machine disks from blob-based to managed disks. - Virtual machine must be stop-deallocated before invoking this - operation. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param vm_name: The name of the virtual machine. - :type vm_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns None or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] - :raises: :class:`CloudError` - """ - raw_result = self._convert_to_managed_disks_initial( - resource_group_name=resource_group_name, - vm_name=vm_name, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - convert_to_managed_disks.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/convertToManagedDisks'} - - - def _deallocate_initial( - self, resource_group_name, vm_name, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.deallocate.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'vmName': self._serialize.url("vm_name", vm_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - def deallocate( - self, resource_group_name, vm_name, custom_headers=None, raw=False, polling=True, **operation_config): - """Shuts down the virtual machine and releases the compute resources. You - are not billed for the compute resources that this virtual machine - uses. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param vm_name: The name of the virtual machine. - :type vm_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns None or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] - :raises: :class:`CloudError` - """ - raw_result = self._deallocate_initial( - resource_group_name=resource_group_name, - vm_name=vm_name, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - deallocate.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/deallocate'} - - def generalize( - self, resource_group_name, vm_name, custom_headers=None, raw=False, **operation_config): - """Sets the state of the virtual machine to generalized. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param vm_name: The name of the virtual machine. - :type vm_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.generalize.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'vmName': self._serialize.url("vm_name", vm_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - generalize.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/generalize'} - - def list( - self, resource_group_name, custom_headers=None, raw=False, **operation_config): - """Lists all of the virtual machines in the specified resource group. Use - the nextLink property in the response to get the next page of virtual - machines. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of VirtualMachine - :rtype: - ~azure.mgmt.compute.v2019_03_01.models.VirtualMachinePaged[~azure.mgmt.compute.v2019_03_01.models.VirtualMachine] - :raises: :class:`CloudError` - """ - def internal_paging(next_link=None, raw=False): - - if not next_link: - # Construct URL - url = self.list.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - deserialized = models.VirtualMachinePaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.VirtualMachinePaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines'} - - def list_all( - self, custom_headers=None, raw=False, **operation_config): - """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. - - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of VirtualMachine - :rtype: - ~azure.mgmt.compute.v2019_03_01.models.VirtualMachinePaged[~azure.mgmt.compute.v2019_03_01.models.VirtualMachine] - :raises: :class:`CloudError` - """ - def internal_paging(next_link=None, raw=False): - - if not next_link: - # Construct URL - url = self.list_all.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - deserialized = models.VirtualMachinePaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.VirtualMachinePaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - list_all.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Compute/virtualMachines'} - - def list_available_sizes( - self, resource_group_name, vm_name, custom_headers=None, raw=False, **operation_config): - """Lists all available virtual machine sizes to which the specified - virtual machine can be resized. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param vm_name: The name of the virtual machine. - :type vm_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of VirtualMachineSize - :rtype: - ~azure.mgmt.compute.v2019_03_01.models.VirtualMachineSizePaged[~azure.mgmt.compute.v2019_03_01.models.VirtualMachineSize] - :raises: :class:`CloudError` - """ - def internal_paging(next_link=None, raw=False): - - if not next_link: - # Construct URL - url = self.list_available_sizes.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'vmName': self._serialize.url("vm_name", vm_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - deserialized = models.VirtualMachineSizePaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.VirtualMachineSizePaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - list_available_sizes.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/vmSizes'} - - - def _power_off_initial( - self, resource_group_name, vm_name, skip_shutdown=False, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.power_off.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'vmName': self._serialize.url("vm_name", vm_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - if skip_shutdown is not None: - query_parameters['skipShutdown'] = self._serialize.query("skip_shutdown", skip_shutdown, 'bool') - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - def power_off( - self, resource_group_name, vm_name, skip_shutdown=False, custom_headers=None, raw=False, polling=True, **operation_config): - """The operation to power off (stop) a virtual machine. The virtual - machine can be restarted with the same provisioned resources. You are - still charged for this virtual machine. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param vm_name: The name of the virtual machine. - :type vm_name: str - :param skip_shutdown: The parameter to request non-graceful VM - shutdown. True value for this flag indicates non-graceful shutdown - whereas false indicates otherwise. Default value for this flag is - false if not specified - :type skip_shutdown: bool - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns None or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] - :raises: :class:`CloudError` - """ - raw_result = self._power_off_initial( - resource_group_name=resource_group_name, - vm_name=vm_name, - skip_shutdown=skip_shutdown, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - power_off.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/powerOff'} - - - def _restart_initial( - self, resource_group_name, vm_name, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.restart.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'vmName': self._serialize.url("vm_name", vm_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - def restart( - self, resource_group_name, vm_name, custom_headers=None, raw=False, polling=True, **operation_config): - """The operation to restart a virtual machine. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param vm_name: The name of the virtual machine. - :type vm_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns None or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] - :raises: :class:`CloudError` - """ - raw_result = self._restart_initial( - resource_group_name=resource_group_name, - vm_name=vm_name, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - restart.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/restart'} - - - def _start_initial( - self, resource_group_name, vm_name, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.start.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'vmName': self._serialize.url("vm_name", vm_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - def start( - self, resource_group_name, vm_name, custom_headers=None, raw=False, polling=True, **operation_config): - """The operation to start a virtual machine. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param vm_name: The name of the virtual machine. - :type vm_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns None or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] - :raises: :class:`CloudError` - """ - raw_result = self._start_initial( - resource_group_name=resource_group_name, - vm_name=vm_name, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - start.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/start'} - - - def _redeploy_initial( - self, resource_group_name, vm_name, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.redeploy.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'vmName': self._serialize.url("vm_name", vm_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - def redeploy( - self, resource_group_name, vm_name, custom_headers=None, raw=False, polling=True, **operation_config): - """The operation to redeploy a virtual machine. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param vm_name: The name of the virtual machine. - :type vm_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns None or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] - :raises: :class:`CloudError` - """ - raw_result = self._redeploy_initial( - resource_group_name=resource_group_name, - vm_name=vm_name, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - redeploy.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/redeploy'} - - - def _reimage_initial( - self, resource_group_name, vm_name, temp_disk=None, custom_headers=None, raw=False, **operation_config): - parameters = None - if temp_disk is not None: - parameters = models.VirtualMachineReimageParameters(temp_disk=temp_disk) - - # Construct URL - url = self.reimage.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'vmName': self._serialize.url("vm_name", vm_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - if parameters is not None: - body_content = self._serialize.body(parameters, 'VirtualMachineReimageParameters') - else: - body_content = None - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - def reimage( - self, resource_group_name, vm_name, temp_disk=None, custom_headers=None, raw=False, polling=True, **operation_config): - """Reimages the virtual machine which has an ephemeral OS disk back to its - initial state. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param vm_name: The name of the virtual machine. - :type vm_name: str - :param temp_disk: Specifies whether to reimage temp disk. Default - value: false. - :type temp_disk: bool - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns None or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] - :raises: :class:`CloudError` - """ - raw_result = self._reimage_initial( - resource_group_name=resource_group_name, - vm_name=vm_name, - temp_disk=temp_disk, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - reimage.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/reimage'} - - - def _perform_maintenance_initial( - self, resource_group_name, vm_name, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.perform_maintenance.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'vmName': self._serialize.url("vm_name", vm_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - def perform_maintenance( - self, resource_group_name, vm_name, custom_headers=None, raw=False, polling=True, **operation_config): - """The operation to perform maintenance on a virtual machine. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param vm_name: The name of the virtual machine. - :type vm_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns None or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] - :raises: :class:`CloudError` - """ - raw_result = self._perform_maintenance_initial( - resource_group_name=resource_group_name, - vm_name=vm_name, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - perform_maintenance.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/performMaintenance'} - - - def _run_command_initial( - self, resource_group_name, vm_name, parameters, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.run_command.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'vmName': self._serialize.url("vm_name", vm_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(parameters, 'RunCommandInput') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('RunCommandResult', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def run_command( - self, resource_group_name, vm_name, parameters, custom_headers=None, raw=False, polling=True, **operation_config): - """Run command on the VM. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param vm_name: The name of the virtual machine. - :type vm_name: str - :param parameters: Parameters supplied to the Run command operation. - :type parameters: - ~azure.mgmt.compute.v2019_03_01.models.RunCommandInput - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns RunCommandResult or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2019_03_01.models.RunCommandResult] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2019_03_01.models.RunCommandResult]] - :raises: :class:`CloudError` - """ - raw_result = self._run_command_initial( - resource_group_name=resource_group_name, - vm_name=vm_name, - parameters=parameters, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('RunCommandResult', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - run_command.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/runCommand'} diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_04_01/__init__.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_04_01/__init__.py index 88ded2f640de..a7bc1ce68e37 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_04_01/__init__.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_04_01/__init__.py @@ -9,10 +9,11 @@ # regenerated. # -------------------------------------------------------------------------- -from .compute_management_client import ComputeManagementClient -from .version import VERSION +from ._configuration import ComputeManagementClientConfiguration +from ._compute_management_client import ComputeManagementClient +__all__ = ['ComputeManagementClient', 'ComputeManagementClientConfiguration'] -__all__ = ['ComputeManagementClient'] +from .version import VERSION __version__ = VERSION diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_04_01/_compute_management_client.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_04_01/_compute_management_client.py new file mode 100644 index 000000000000..77ed3c743e40 --- /dev/null +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_04_01/_compute_management_client.py @@ -0,0 +1,51 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.service_client import SDKClient +from msrest import Serializer, Deserializer + +from ._configuration import ComputeManagementClientConfiguration +from .operations import ResourceSkusOperations +from . import models + + +class ComputeManagementClient(SDKClient): + """Compute Client + + :ivar config: Configuration for client. + :vartype config: ComputeManagementClientConfiguration + + :ivar resource_skus: ResourceSkus operations + :vartype resource_skus: azure.mgmt.compute.v2019_04_01.operations.ResourceSkusOperations + + :param credentials: Credentials needed for the client to connect to Azure. + :type credentials: :mod:`A msrestazure Credentials + object` + :param subscription_id: Subscription credentials which uniquely identify + Microsoft Azure subscription. The subscription ID forms part of the URI + for every service call. + :type subscription_id: str + :param str base_url: Service URL + """ + + def __init__( + self, credentials, subscription_id, base_url=None): + + self.config = ComputeManagementClientConfiguration(credentials, subscription_id, base_url) + super(ComputeManagementClient, self).__init__(self.config.credentials, self.config) + + client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} + self.api_version = '2019-04-01' + self._serialize = Serializer(client_models) + self._deserialize = Deserializer(client_models) + + self.resource_skus = ResourceSkusOperations( + self._client, self.config, self._serialize, self._deserialize) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_04_01/_configuration.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_04_01/_configuration.py new file mode 100644 index 000000000000..0fcf5984e2ca --- /dev/null +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_04_01/_configuration.py @@ -0,0 +1,50 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- +from msrestazure import AzureConfiguration + +from .version import VERSION + + +class ComputeManagementClientConfiguration(AzureConfiguration): + """Configuration for ComputeManagementClient + Note that all parameters used to create this instance are saved as instance + attributes. + + :param credentials: Credentials needed for the client to connect to Azure. + :type credentials: :mod:`A msrestazure Credentials + object` + :param subscription_id: Subscription credentials which uniquely identify + Microsoft Azure subscription. The subscription ID forms part of the URI + for every service call. + :type subscription_id: str + :param str base_url: Service URL + """ + + def __init__( + self, credentials, subscription_id, base_url=None): + + if credentials is None: + raise ValueError("Parameter 'credentials' must not be None.") + if subscription_id is None: + raise ValueError("Parameter 'subscription_id' must not be None.") + if not base_url: + base_url = 'https://management.azure.com' + + super(ComputeManagementClientConfiguration, self).__init__(base_url) + + # Starting Autorest.Python 4.0.64, make connection pool activated by default + self.keep_alive = True + + self.add_user_agent('azure-mgmt-compute/{}'.format(VERSION)) + self.add_user_agent('Azure-SDK-For-Python') + + self.credentials = credentials + self.subscription_id = subscription_id diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_04_01/compute_management_client.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_04_01/compute_management_client.py deleted file mode 100644 index 3de156b35292..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_04_01/compute_management_client.py +++ /dev/null @@ -1,85 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.service_client import SDKClient -from msrest import Serializer, Deserializer -from msrestazure import AzureConfiguration -from .version import VERSION -from .operations.resource_skus_operations import ResourceSkusOperations -from . import models - - -class ComputeManagementClientConfiguration(AzureConfiguration): - """Configuration for ComputeManagementClient - Note that all parameters used to create this instance are saved as instance - attributes. - - :param credentials: Credentials needed for the client to connect to Azure. - :type credentials: :mod:`A msrestazure Credentials - object` - :param subscription_id: Subscription credentials which uniquely identify - Microsoft Azure subscription. The subscription ID forms part of the URI - for every service call. - :type subscription_id: str - :param str base_url: Service URL - """ - - def __init__( - self, credentials, subscription_id, base_url=None): - - if credentials is None: - raise ValueError("Parameter 'credentials' must not be None.") - if subscription_id is None: - raise ValueError("Parameter 'subscription_id' must not be None.") - if not base_url: - base_url = 'https://management.azure.com' - - super(ComputeManagementClientConfiguration, self).__init__(base_url) - - self.add_user_agent('azure-mgmt-compute/{}'.format(VERSION)) - self.add_user_agent('Azure-SDK-For-Python') - - self.credentials = credentials - self.subscription_id = subscription_id - - -class ComputeManagementClient(SDKClient): - """Compute Client - - :ivar config: Configuration for client. - :vartype config: ComputeManagementClientConfiguration - - :ivar resource_skus: ResourceSkus operations - :vartype resource_skus: azure.mgmt.compute.v2019_04_01.operations.ResourceSkusOperations - - :param credentials: Credentials needed for the client to connect to Azure. - :type credentials: :mod:`A msrestazure Credentials - object` - :param subscription_id: Subscription credentials which uniquely identify - Microsoft Azure subscription. The subscription ID forms part of the URI - for every service call. - :type subscription_id: str - :param str base_url: Service URL - """ - - def __init__( - self, credentials, subscription_id, base_url=None): - - self.config = ComputeManagementClientConfiguration(credentials, subscription_id, base_url) - super(ComputeManagementClient, self).__init__(self.config.credentials, self.config) - - client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} - self.api_version = '2019-04-01' - self._serialize = Serializer(client_models) - self._deserialize = Deserializer(client_models) - - self.resource_skus = ResourceSkusOperations( - self._client, self.config, self._serialize, self._deserialize) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_04_01/models/__init__.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_04_01/models/__init__.py index f38c3f941ded..6b68a69f0f26 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_04_01/models/__init__.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_04_01/models/__init__.py @@ -10,39 +10,39 @@ # -------------------------------------------------------------------------- try: - from .resource_sku_capacity_py3 import ResourceSkuCapacity - from .resource_sku_costs_py3 import ResourceSkuCosts - from .resource_sku_capabilities_py3 import ResourceSkuCapabilities - from .resource_sku_zone_details_py3 import ResourceSkuZoneDetails - from .resource_sku_restriction_info_py3 import ResourceSkuRestrictionInfo - from .resource_sku_restrictions_py3 import ResourceSkuRestrictions - from .resource_sku_location_info_py3 import ResourceSkuLocationInfo - from .resource_sku_py3 import ResourceSku + from ._models_py3 import ResourceSku + from ._models_py3 import ResourceSkuCapabilities + from ._models_py3 import ResourceSkuCapacity + from ._models_py3 import ResourceSkuCosts + from ._models_py3 import ResourceSkuLocationInfo + from ._models_py3 import ResourceSkuRestrictionInfo + from ._models_py3 import ResourceSkuRestrictions + from ._models_py3 import ResourceSkuZoneDetails except (SyntaxError, ImportError): - from .resource_sku_capacity import ResourceSkuCapacity - from .resource_sku_costs import ResourceSkuCosts - from .resource_sku_capabilities import ResourceSkuCapabilities - from .resource_sku_zone_details import ResourceSkuZoneDetails - from .resource_sku_restriction_info import ResourceSkuRestrictionInfo - from .resource_sku_restrictions import ResourceSkuRestrictions - from .resource_sku_location_info import ResourceSkuLocationInfo - from .resource_sku import ResourceSku -from .resource_sku_paged import ResourceSkuPaged -from .compute_management_client_enums import ( + from ._models import ResourceSku + from ._models import ResourceSkuCapabilities + from ._models import ResourceSkuCapacity + from ._models import ResourceSkuCosts + from ._models import ResourceSkuLocationInfo + from ._models import ResourceSkuRestrictionInfo + from ._models import ResourceSkuRestrictions + from ._models import ResourceSkuZoneDetails +from ._paged_models import ResourceSkuPaged +from ._compute_management_client_enums import ( ResourceSkuCapacityScaleType, ResourceSkuRestrictionsType, ResourceSkuRestrictionsReasonCode, ) __all__ = [ + 'ResourceSku', + 'ResourceSkuCapabilities', 'ResourceSkuCapacity', 'ResourceSkuCosts', - 'ResourceSkuCapabilities', - 'ResourceSkuZoneDetails', + 'ResourceSkuLocationInfo', 'ResourceSkuRestrictionInfo', 'ResourceSkuRestrictions', - 'ResourceSkuLocationInfo', - 'ResourceSku', + 'ResourceSkuZoneDetails', 'ResourceSkuPaged', 'ResourceSkuCapacityScaleType', 'ResourceSkuRestrictionsType', diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_04_01/models/compute_management_client_enums.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_04_01/models/_compute_management_client_enums.py similarity index 100% rename from sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_04_01/models/compute_management_client_enums.py rename to sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_04_01/models/_compute_management_client_enums.py diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_04_01/models/_models.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_04_01/models/_models.py new file mode 100644 index 000000000000..eb3db8b6bb31 --- /dev/null +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_04_01/models/_models.py @@ -0,0 +1,351 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class CloudError(Model): + """CloudError. + """ + + _attribute_map = { + } + + +class ResourceSku(Model): + """Describes an available Compute SKU. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar resource_type: The type of resource the SKU applies to. + :vartype resource_type: str + :ivar name: The name of SKU. + :vartype name: str + :ivar tier: Specifies the tier of virtual machines in a scale set.

    Possible Values:

    **Standard**

    **Basic** + :vartype tier: str + :ivar size: The Size of the SKU. + :vartype size: str + :ivar family: The Family of this particular SKU. + :vartype family: str + :ivar kind: The Kind of resources that are supported in this SKU. + :vartype kind: str + :ivar capacity: Specifies the number of virtual machines in the scale set. + :vartype capacity: + ~azure.mgmt.compute.v2019_04_01.models.ResourceSkuCapacity + :ivar locations: The set of locations that the SKU is available. + :vartype locations: list[str] + :ivar location_info: A list of locations and availability zones in those + locations where the SKU is available. + :vartype location_info: + list[~azure.mgmt.compute.v2019_04_01.models.ResourceSkuLocationInfo] + :ivar api_versions: The api versions that support this SKU. + :vartype api_versions: list[str] + :ivar costs: Metadata for retrieving price info. + :vartype costs: + list[~azure.mgmt.compute.v2019_04_01.models.ResourceSkuCosts] + :ivar capabilities: A name value pair to describe the capability. + :vartype capabilities: + list[~azure.mgmt.compute.v2019_04_01.models.ResourceSkuCapabilities] + :ivar restrictions: The restrictions because of which SKU cannot be used. + This is empty if there are no restrictions. + :vartype restrictions: + list[~azure.mgmt.compute.v2019_04_01.models.ResourceSkuRestrictions] + """ + + _validation = { + 'resource_type': {'readonly': True}, + 'name': {'readonly': True}, + 'tier': {'readonly': True}, + 'size': {'readonly': True}, + 'family': {'readonly': True}, + 'kind': {'readonly': True}, + 'capacity': {'readonly': True}, + 'locations': {'readonly': True}, + 'location_info': {'readonly': True}, + 'api_versions': {'readonly': True}, + 'costs': {'readonly': True}, + 'capabilities': {'readonly': True}, + 'restrictions': {'readonly': True}, + } + + _attribute_map = { + 'resource_type': {'key': 'resourceType', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'tier': {'key': 'tier', 'type': 'str'}, + 'size': {'key': 'size', 'type': 'str'}, + 'family': {'key': 'family', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'capacity': {'key': 'capacity', 'type': 'ResourceSkuCapacity'}, + 'locations': {'key': 'locations', 'type': '[str]'}, + 'location_info': {'key': 'locationInfo', 'type': '[ResourceSkuLocationInfo]'}, + 'api_versions': {'key': 'apiVersions', 'type': '[str]'}, + 'costs': {'key': 'costs', 'type': '[ResourceSkuCosts]'}, + 'capabilities': {'key': 'capabilities', 'type': '[ResourceSkuCapabilities]'}, + 'restrictions': {'key': 'restrictions', 'type': '[ResourceSkuRestrictions]'}, + } + + def __init__(self, **kwargs): + super(ResourceSku, self).__init__(**kwargs) + self.resource_type = None + self.name = None + self.tier = None + self.size = None + self.family = None + self.kind = None + self.capacity = None + self.locations = None + self.location_info = None + self.api_versions = None + self.costs = None + self.capabilities = None + self.restrictions = None + + +class ResourceSkuCapabilities(Model): + """Describes The SKU capabilities object. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar name: An invariant to describe the feature. + :vartype name: str + :ivar value: An invariant if the feature is measured by quantity. + :vartype value: str + """ + + _validation = { + 'name': {'readonly': True}, + 'value': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'value': {'key': 'value', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ResourceSkuCapabilities, self).__init__(**kwargs) + self.name = None + self.value = None + + +class ResourceSkuCapacity(Model): + """Describes scaling information of a SKU. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar minimum: The minimum capacity. + :vartype minimum: long + :ivar maximum: The maximum capacity that can be set. + :vartype maximum: long + :ivar default: The default capacity. + :vartype default: long + :ivar scale_type: The scale type applicable to the sku. Possible values + include: 'Automatic', 'Manual', 'None' + :vartype scale_type: str or + ~azure.mgmt.compute.v2019_04_01.models.ResourceSkuCapacityScaleType + """ + + _validation = { + 'minimum': {'readonly': True}, + 'maximum': {'readonly': True}, + 'default': {'readonly': True}, + 'scale_type': {'readonly': True}, + } + + _attribute_map = { + 'minimum': {'key': 'minimum', 'type': 'long'}, + 'maximum': {'key': 'maximum', 'type': 'long'}, + 'default': {'key': 'default', 'type': 'long'}, + 'scale_type': {'key': 'scaleType', 'type': 'ResourceSkuCapacityScaleType'}, + } + + def __init__(self, **kwargs): + super(ResourceSkuCapacity, self).__init__(**kwargs) + self.minimum = None + self.maximum = None + self.default = None + self.scale_type = None + + +class ResourceSkuCosts(Model): + """Describes metadata for retrieving price info. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar meter_id: Used for querying price from commerce. + :vartype meter_id: str + :ivar quantity: The multiplier is needed to extend the base metered cost. + :vartype quantity: long + :ivar extended_unit: An invariant to show the extended unit. + :vartype extended_unit: str + """ + + _validation = { + 'meter_id': {'readonly': True}, + 'quantity': {'readonly': True}, + 'extended_unit': {'readonly': True}, + } + + _attribute_map = { + 'meter_id': {'key': 'meterID', 'type': 'str'}, + 'quantity': {'key': 'quantity', 'type': 'long'}, + 'extended_unit': {'key': 'extendedUnit', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ResourceSkuCosts, self).__init__(**kwargs) + self.meter_id = None + self.quantity = None + self.extended_unit = None + + +class ResourceSkuLocationInfo(Model): + """ResourceSkuLocationInfo. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar location: Location of the SKU + :vartype location: str + :ivar zones: List of availability zones where the SKU is supported. + :vartype zones: list[str] + :ivar zone_details: Details of capabilities available to a SKU in specific + zones. + :vartype zone_details: + list[~azure.mgmt.compute.v2019_04_01.models.ResourceSkuZoneDetails] + """ + + _validation = { + 'location': {'readonly': True}, + 'zones': {'readonly': True}, + 'zone_details': {'readonly': True}, + } + + _attribute_map = { + 'location': {'key': 'location', 'type': 'str'}, + 'zones': {'key': 'zones', 'type': '[str]'}, + 'zone_details': {'key': 'zoneDetails', 'type': '[ResourceSkuZoneDetails]'}, + } + + def __init__(self, **kwargs): + super(ResourceSkuLocationInfo, self).__init__(**kwargs) + self.location = None + self.zones = None + self.zone_details = None + + +class ResourceSkuRestrictionInfo(Model): + """ResourceSkuRestrictionInfo. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar locations: Locations where the SKU is restricted + :vartype locations: list[str] + :ivar zones: List of availability zones where the SKU is restricted. + :vartype zones: list[str] + """ + + _validation = { + 'locations': {'readonly': True}, + 'zones': {'readonly': True}, + } + + _attribute_map = { + 'locations': {'key': 'locations', 'type': '[str]'}, + 'zones': {'key': 'zones', 'type': '[str]'}, + } + + def __init__(self, **kwargs): + super(ResourceSkuRestrictionInfo, self).__init__(**kwargs) + self.locations = None + self.zones = None + + +class ResourceSkuRestrictions(Model): + """Describes scaling information of a SKU. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar type: The type of restrictions. Possible values include: 'Location', + 'Zone' + :vartype type: str or + ~azure.mgmt.compute.v2019_04_01.models.ResourceSkuRestrictionsType + :ivar values: The value of restrictions. If the restriction type is set to + location. This would be different locations where the SKU is restricted. + :vartype values: list[str] + :ivar restriction_info: The information about the restriction where the + SKU cannot be used. + :vartype restriction_info: + ~azure.mgmt.compute.v2019_04_01.models.ResourceSkuRestrictionInfo + :ivar reason_code: The reason for restriction. Possible values include: + 'QuotaId', 'NotAvailableForSubscription' + :vartype reason_code: str or + ~azure.mgmt.compute.v2019_04_01.models.ResourceSkuRestrictionsReasonCode + """ + + _validation = { + 'type': {'readonly': True}, + 'values': {'readonly': True}, + 'restriction_info': {'readonly': True}, + 'reason_code': {'readonly': True}, + } + + _attribute_map = { + 'type': {'key': 'type', 'type': 'ResourceSkuRestrictionsType'}, + 'values': {'key': 'values', 'type': '[str]'}, + 'restriction_info': {'key': 'restrictionInfo', 'type': 'ResourceSkuRestrictionInfo'}, + 'reason_code': {'key': 'reasonCode', 'type': 'ResourceSkuRestrictionsReasonCode'}, + } + + def __init__(self, **kwargs): + super(ResourceSkuRestrictions, self).__init__(**kwargs) + self.type = None + self.values = None + self.restriction_info = None + self.reason_code = None + + +class ResourceSkuZoneDetails(Model): + """Describes The zonal capabilities of a SKU. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar name: The set of zones that the SKU is available in with the + specified capabilities. + :vartype name: list[str] + :ivar capabilities: A list of capabilities that are available for the SKU + in the specified list of zones. + :vartype capabilities: + list[~azure.mgmt.compute.v2019_04_01.models.ResourceSkuCapabilities] + """ + + _validation = { + 'name': {'readonly': True}, + 'capabilities': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': '[str]'}, + 'capabilities': {'key': 'capabilities', 'type': '[ResourceSkuCapabilities]'}, + } + + def __init__(self, **kwargs): + super(ResourceSkuZoneDetails, self).__init__(**kwargs) + self.name = None + self.capabilities = None diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_04_01/models/_models_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_04_01/models/_models_py3.py new file mode 100644 index 000000000000..fde427ebf63b --- /dev/null +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_04_01/models/_models_py3.py @@ -0,0 +1,351 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class CloudError(Model): + """CloudError. + """ + + _attribute_map = { + } + + +class ResourceSku(Model): + """Describes an available Compute SKU. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar resource_type: The type of resource the SKU applies to. + :vartype resource_type: str + :ivar name: The name of SKU. + :vartype name: str + :ivar tier: Specifies the tier of virtual machines in a scale set.

    Possible Values:

    **Standard**

    **Basic** + :vartype tier: str + :ivar size: The Size of the SKU. + :vartype size: str + :ivar family: The Family of this particular SKU. + :vartype family: str + :ivar kind: The Kind of resources that are supported in this SKU. + :vartype kind: str + :ivar capacity: Specifies the number of virtual machines in the scale set. + :vartype capacity: + ~azure.mgmt.compute.v2019_04_01.models.ResourceSkuCapacity + :ivar locations: The set of locations that the SKU is available. + :vartype locations: list[str] + :ivar location_info: A list of locations and availability zones in those + locations where the SKU is available. + :vartype location_info: + list[~azure.mgmt.compute.v2019_04_01.models.ResourceSkuLocationInfo] + :ivar api_versions: The api versions that support this SKU. + :vartype api_versions: list[str] + :ivar costs: Metadata for retrieving price info. + :vartype costs: + list[~azure.mgmt.compute.v2019_04_01.models.ResourceSkuCosts] + :ivar capabilities: A name value pair to describe the capability. + :vartype capabilities: + list[~azure.mgmt.compute.v2019_04_01.models.ResourceSkuCapabilities] + :ivar restrictions: The restrictions because of which SKU cannot be used. + This is empty if there are no restrictions. + :vartype restrictions: + list[~azure.mgmt.compute.v2019_04_01.models.ResourceSkuRestrictions] + """ + + _validation = { + 'resource_type': {'readonly': True}, + 'name': {'readonly': True}, + 'tier': {'readonly': True}, + 'size': {'readonly': True}, + 'family': {'readonly': True}, + 'kind': {'readonly': True}, + 'capacity': {'readonly': True}, + 'locations': {'readonly': True}, + 'location_info': {'readonly': True}, + 'api_versions': {'readonly': True}, + 'costs': {'readonly': True}, + 'capabilities': {'readonly': True}, + 'restrictions': {'readonly': True}, + } + + _attribute_map = { + 'resource_type': {'key': 'resourceType', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'tier': {'key': 'tier', 'type': 'str'}, + 'size': {'key': 'size', 'type': 'str'}, + 'family': {'key': 'family', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'capacity': {'key': 'capacity', 'type': 'ResourceSkuCapacity'}, + 'locations': {'key': 'locations', 'type': '[str]'}, + 'location_info': {'key': 'locationInfo', 'type': '[ResourceSkuLocationInfo]'}, + 'api_versions': {'key': 'apiVersions', 'type': '[str]'}, + 'costs': {'key': 'costs', 'type': '[ResourceSkuCosts]'}, + 'capabilities': {'key': 'capabilities', 'type': '[ResourceSkuCapabilities]'}, + 'restrictions': {'key': 'restrictions', 'type': '[ResourceSkuRestrictions]'}, + } + + def __init__(self, **kwargs) -> None: + super(ResourceSku, self).__init__(**kwargs) + self.resource_type = None + self.name = None + self.tier = None + self.size = None + self.family = None + self.kind = None + self.capacity = None + self.locations = None + self.location_info = None + self.api_versions = None + self.costs = None + self.capabilities = None + self.restrictions = None + + +class ResourceSkuCapabilities(Model): + """Describes The SKU capabilities object. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar name: An invariant to describe the feature. + :vartype name: str + :ivar value: An invariant if the feature is measured by quantity. + :vartype value: str + """ + + _validation = { + 'name': {'readonly': True}, + 'value': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'value': {'key': 'value', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(ResourceSkuCapabilities, self).__init__(**kwargs) + self.name = None + self.value = None + + +class ResourceSkuCapacity(Model): + """Describes scaling information of a SKU. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar minimum: The minimum capacity. + :vartype minimum: long + :ivar maximum: The maximum capacity that can be set. + :vartype maximum: long + :ivar default: The default capacity. + :vartype default: long + :ivar scale_type: The scale type applicable to the sku. Possible values + include: 'Automatic', 'Manual', 'None' + :vartype scale_type: str or + ~azure.mgmt.compute.v2019_04_01.models.ResourceSkuCapacityScaleType + """ + + _validation = { + 'minimum': {'readonly': True}, + 'maximum': {'readonly': True}, + 'default': {'readonly': True}, + 'scale_type': {'readonly': True}, + } + + _attribute_map = { + 'minimum': {'key': 'minimum', 'type': 'long'}, + 'maximum': {'key': 'maximum', 'type': 'long'}, + 'default': {'key': 'default', 'type': 'long'}, + 'scale_type': {'key': 'scaleType', 'type': 'ResourceSkuCapacityScaleType'}, + } + + def __init__(self, **kwargs) -> None: + super(ResourceSkuCapacity, self).__init__(**kwargs) + self.minimum = None + self.maximum = None + self.default = None + self.scale_type = None + + +class ResourceSkuCosts(Model): + """Describes metadata for retrieving price info. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar meter_id: Used for querying price from commerce. + :vartype meter_id: str + :ivar quantity: The multiplier is needed to extend the base metered cost. + :vartype quantity: long + :ivar extended_unit: An invariant to show the extended unit. + :vartype extended_unit: str + """ + + _validation = { + 'meter_id': {'readonly': True}, + 'quantity': {'readonly': True}, + 'extended_unit': {'readonly': True}, + } + + _attribute_map = { + 'meter_id': {'key': 'meterID', 'type': 'str'}, + 'quantity': {'key': 'quantity', 'type': 'long'}, + 'extended_unit': {'key': 'extendedUnit', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(ResourceSkuCosts, self).__init__(**kwargs) + self.meter_id = None + self.quantity = None + self.extended_unit = None + + +class ResourceSkuLocationInfo(Model): + """ResourceSkuLocationInfo. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar location: Location of the SKU + :vartype location: str + :ivar zones: List of availability zones where the SKU is supported. + :vartype zones: list[str] + :ivar zone_details: Details of capabilities available to a SKU in specific + zones. + :vartype zone_details: + list[~azure.mgmt.compute.v2019_04_01.models.ResourceSkuZoneDetails] + """ + + _validation = { + 'location': {'readonly': True}, + 'zones': {'readonly': True}, + 'zone_details': {'readonly': True}, + } + + _attribute_map = { + 'location': {'key': 'location', 'type': 'str'}, + 'zones': {'key': 'zones', 'type': '[str]'}, + 'zone_details': {'key': 'zoneDetails', 'type': '[ResourceSkuZoneDetails]'}, + } + + def __init__(self, **kwargs) -> None: + super(ResourceSkuLocationInfo, self).__init__(**kwargs) + self.location = None + self.zones = None + self.zone_details = None + + +class ResourceSkuRestrictionInfo(Model): + """ResourceSkuRestrictionInfo. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar locations: Locations where the SKU is restricted + :vartype locations: list[str] + :ivar zones: List of availability zones where the SKU is restricted. + :vartype zones: list[str] + """ + + _validation = { + 'locations': {'readonly': True}, + 'zones': {'readonly': True}, + } + + _attribute_map = { + 'locations': {'key': 'locations', 'type': '[str]'}, + 'zones': {'key': 'zones', 'type': '[str]'}, + } + + def __init__(self, **kwargs) -> None: + super(ResourceSkuRestrictionInfo, self).__init__(**kwargs) + self.locations = None + self.zones = None + + +class ResourceSkuRestrictions(Model): + """Describes scaling information of a SKU. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar type: The type of restrictions. Possible values include: 'Location', + 'Zone' + :vartype type: str or + ~azure.mgmt.compute.v2019_04_01.models.ResourceSkuRestrictionsType + :ivar values: The value of restrictions. If the restriction type is set to + location. This would be different locations where the SKU is restricted. + :vartype values: list[str] + :ivar restriction_info: The information about the restriction where the + SKU cannot be used. + :vartype restriction_info: + ~azure.mgmt.compute.v2019_04_01.models.ResourceSkuRestrictionInfo + :ivar reason_code: The reason for restriction. Possible values include: + 'QuotaId', 'NotAvailableForSubscription' + :vartype reason_code: str or + ~azure.mgmt.compute.v2019_04_01.models.ResourceSkuRestrictionsReasonCode + """ + + _validation = { + 'type': {'readonly': True}, + 'values': {'readonly': True}, + 'restriction_info': {'readonly': True}, + 'reason_code': {'readonly': True}, + } + + _attribute_map = { + 'type': {'key': 'type', 'type': 'ResourceSkuRestrictionsType'}, + 'values': {'key': 'values', 'type': '[str]'}, + 'restriction_info': {'key': 'restrictionInfo', 'type': 'ResourceSkuRestrictionInfo'}, + 'reason_code': {'key': 'reasonCode', 'type': 'ResourceSkuRestrictionsReasonCode'}, + } + + def __init__(self, **kwargs) -> None: + super(ResourceSkuRestrictions, self).__init__(**kwargs) + self.type = None + self.values = None + self.restriction_info = None + self.reason_code = None + + +class ResourceSkuZoneDetails(Model): + """Describes The zonal capabilities of a SKU. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar name: The set of zones that the SKU is available in with the + specified capabilities. + :vartype name: list[str] + :ivar capabilities: A list of capabilities that are available for the SKU + in the specified list of zones. + :vartype capabilities: + list[~azure.mgmt.compute.v2019_04_01.models.ResourceSkuCapabilities] + """ + + _validation = { + 'name': {'readonly': True}, + 'capabilities': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': '[str]'}, + 'capabilities': {'key': 'capabilities', 'type': '[ResourceSkuCapabilities]'}, + } + + def __init__(self, **kwargs) -> None: + super(ResourceSkuZoneDetails, self).__init__(**kwargs) + self.name = None + self.capabilities = None diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_04_01/models/resource_sku_paged.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_04_01/models/_paged_models.py similarity index 100% rename from sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_04_01/models/resource_sku_paged.py rename to sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_04_01/models/_paged_models.py diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_04_01/models/resource_sku.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_04_01/models/resource_sku.py deleted file mode 100644 index f8559f2a1b3f..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_04_01/models/resource_sku.py +++ /dev/null @@ -1,103 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ResourceSku(Model): - """Describes an available Compute SKU. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar resource_type: The type of resource the SKU applies to. - :vartype resource_type: str - :ivar name: The name of SKU. - :vartype name: str - :ivar tier: Specifies the tier of virtual machines in a scale set.

    Possible Values:

    **Standard**

    **Basic** - :vartype tier: str - :ivar size: The Size of the SKU. - :vartype size: str - :ivar family: The Family of this particular SKU. - :vartype family: str - :ivar kind: The Kind of resources that are supported in this SKU. - :vartype kind: str - :ivar capacity: Specifies the number of virtual machines in the scale set. - :vartype capacity: - ~azure.mgmt.compute.v2019_04_01.models.ResourceSkuCapacity - :ivar locations: The set of locations that the SKU is available. - :vartype locations: list[str] - :ivar location_info: A list of locations and availability zones in those - locations where the SKU is available. - :vartype location_info: - list[~azure.mgmt.compute.v2019_04_01.models.ResourceSkuLocationInfo] - :ivar api_versions: The api versions that support this SKU. - :vartype api_versions: list[str] - :ivar costs: Metadata for retrieving price info. - :vartype costs: - list[~azure.mgmt.compute.v2019_04_01.models.ResourceSkuCosts] - :ivar capabilities: A name value pair to describe the capability. - :vartype capabilities: - list[~azure.mgmt.compute.v2019_04_01.models.ResourceSkuCapabilities] - :ivar restrictions: The restrictions because of which SKU cannot be used. - This is empty if there are no restrictions. - :vartype restrictions: - list[~azure.mgmt.compute.v2019_04_01.models.ResourceSkuRestrictions] - """ - - _validation = { - 'resource_type': {'readonly': True}, - 'name': {'readonly': True}, - 'tier': {'readonly': True}, - 'size': {'readonly': True}, - 'family': {'readonly': True}, - 'kind': {'readonly': True}, - 'capacity': {'readonly': True}, - 'locations': {'readonly': True}, - 'location_info': {'readonly': True}, - 'api_versions': {'readonly': True}, - 'costs': {'readonly': True}, - 'capabilities': {'readonly': True}, - 'restrictions': {'readonly': True}, - } - - _attribute_map = { - 'resource_type': {'key': 'resourceType', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'tier': {'key': 'tier', 'type': 'str'}, - 'size': {'key': 'size', 'type': 'str'}, - 'family': {'key': 'family', 'type': 'str'}, - 'kind': {'key': 'kind', 'type': 'str'}, - 'capacity': {'key': 'capacity', 'type': 'ResourceSkuCapacity'}, - 'locations': {'key': 'locations', 'type': '[str]'}, - 'location_info': {'key': 'locationInfo', 'type': '[ResourceSkuLocationInfo]'}, - 'api_versions': {'key': 'apiVersions', 'type': '[str]'}, - 'costs': {'key': 'costs', 'type': '[ResourceSkuCosts]'}, - 'capabilities': {'key': 'capabilities', 'type': '[ResourceSkuCapabilities]'}, - 'restrictions': {'key': 'restrictions', 'type': '[ResourceSkuRestrictions]'}, - } - - def __init__(self, **kwargs): - super(ResourceSku, self).__init__(**kwargs) - self.resource_type = None - self.name = None - self.tier = None - self.size = None - self.family = None - self.kind = None - self.capacity = None - self.locations = None - self.location_info = None - self.api_versions = None - self.costs = None - self.capabilities = None - self.restrictions = None diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_04_01/models/resource_sku_capabilities.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_04_01/models/resource_sku_capabilities.py deleted file mode 100644 index 658167afc6d4..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_04_01/models/resource_sku_capabilities.py +++ /dev/null @@ -1,40 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ResourceSkuCapabilities(Model): - """Describes The SKU capabilities object. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar name: An invariant to describe the feature. - :vartype name: str - :ivar value: An invariant if the feature is measured by quantity. - :vartype value: str - """ - - _validation = { - 'name': {'readonly': True}, - 'value': {'readonly': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'value': {'key': 'value', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ResourceSkuCapabilities, self).__init__(**kwargs) - self.name = None - self.value = None diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_04_01/models/resource_sku_capabilities_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_04_01/models/resource_sku_capabilities_py3.py deleted file mode 100644 index 73a2631fc0aa..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_04_01/models/resource_sku_capabilities_py3.py +++ /dev/null @@ -1,40 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ResourceSkuCapabilities(Model): - """Describes The SKU capabilities object. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar name: An invariant to describe the feature. - :vartype name: str - :ivar value: An invariant if the feature is measured by quantity. - :vartype value: str - """ - - _validation = { - 'name': {'readonly': True}, - 'value': {'readonly': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'value': {'key': 'value', 'type': 'str'}, - } - - def __init__(self, **kwargs) -> None: - super(ResourceSkuCapabilities, self).__init__(**kwargs) - self.name = None - self.value = None diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_04_01/models/resource_sku_capacity.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_04_01/models/resource_sku_capacity.py deleted file mode 100644 index 8a7db313f578..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_04_01/models/resource_sku_capacity.py +++ /dev/null @@ -1,52 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ResourceSkuCapacity(Model): - """Describes scaling information of a SKU. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar minimum: The minimum capacity. - :vartype minimum: long - :ivar maximum: The maximum capacity that can be set. - :vartype maximum: long - :ivar default: The default capacity. - :vartype default: long - :ivar scale_type: The scale type applicable to the sku. Possible values - include: 'Automatic', 'Manual', 'None' - :vartype scale_type: str or - ~azure.mgmt.compute.v2019_04_01.models.ResourceSkuCapacityScaleType - """ - - _validation = { - 'minimum': {'readonly': True}, - 'maximum': {'readonly': True}, - 'default': {'readonly': True}, - 'scale_type': {'readonly': True}, - } - - _attribute_map = { - 'minimum': {'key': 'minimum', 'type': 'long'}, - 'maximum': {'key': 'maximum', 'type': 'long'}, - 'default': {'key': 'default', 'type': 'long'}, - 'scale_type': {'key': 'scaleType', 'type': 'ResourceSkuCapacityScaleType'}, - } - - def __init__(self, **kwargs): - super(ResourceSkuCapacity, self).__init__(**kwargs) - self.minimum = None - self.maximum = None - self.default = None - self.scale_type = None diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_04_01/models/resource_sku_capacity_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_04_01/models/resource_sku_capacity_py3.py deleted file mode 100644 index 94d28f12b4e7..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_04_01/models/resource_sku_capacity_py3.py +++ /dev/null @@ -1,52 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ResourceSkuCapacity(Model): - """Describes scaling information of a SKU. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar minimum: The minimum capacity. - :vartype minimum: long - :ivar maximum: The maximum capacity that can be set. - :vartype maximum: long - :ivar default: The default capacity. - :vartype default: long - :ivar scale_type: The scale type applicable to the sku. Possible values - include: 'Automatic', 'Manual', 'None' - :vartype scale_type: str or - ~azure.mgmt.compute.v2019_04_01.models.ResourceSkuCapacityScaleType - """ - - _validation = { - 'minimum': {'readonly': True}, - 'maximum': {'readonly': True}, - 'default': {'readonly': True}, - 'scale_type': {'readonly': True}, - } - - _attribute_map = { - 'minimum': {'key': 'minimum', 'type': 'long'}, - 'maximum': {'key': 'maximum', 'type': 'long'}, - 'default': {'key': 'default', 'type': 'long'}, - 'scale_type': {'key': 'scaleType', 'type': 'ResourceSkuCapacityScaleType'}, - } - - def __init__(self, **kwargs) -> None: - super(ResourceSkuCapacity, self).__init__(**kwargs) - self.minimum = None - self.maximum = None - self.default = None - self.scale_type = None diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_04_01/models/resource_sku_costs.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_04_01/models/resource_sku_costs.py deleted file mode 100644 index 293adaf0962c..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_04_01/models/resource_sku_costs.py +++ /dev/null @@ -1,45 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ResourceSkuCosts(Model): - """Describes metadata for retrieving price info. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar meter_id: Used for querying price from commerce. - :vartype meter_id: str - :ivar quantity: The multiplier is needed to extend the base metered cost. - :vartype quantity: long - :ivar extended_unit: An invariant to show the extended unit. - :vartype extended_unit: str - """ - - _validation = { - 'meter_id': {'readonly': True}, - 'quantity': {'readonly': True}, - 'extended_unit': {'readonly': True}, - } - - _attribute_map = { - 'meter_id': {'key': 'meterID', 'type': 'str'}, - 'quantity': {'key': 'quantity', 'type': 'long'}, - 'extended_unit': {'key': 'extendedUnit', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ResourceSkuCosts, self).__init__(**kwargs) - self.meter_id = None - self.quantity = None - self.extended_unit = None diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_04_01/models/resource_sku_costs_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_04_01/models/resource_sku_costs_py3.py deleted file mode 100644 index 59e7036807d6..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_04_01/models/resource_sku_costs_py3.py +++ /dev/null @@ -1,45 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ResourceSkuCosts(Model): - """Describes metadata for retrieving price info. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar meter_id: Used for querying price from commerce. - :vartype meter_id: str - :ivar quantity: The multiplier is needed to extend the base metered cost. - :vartype quantity: long - :ivar extended_unit: An invariant to show the extended unit. - :vartype extended_unit: str - """ - - _validation = { - 'meter_id': {'readonly': True}, - 'quantity': {'readonly': True}, - 'extended_unit': {'readonly': True}, - } - - _attribute_map = { - 'meter_id': {'key': 'meterID', 'type': 'str'}, - 'quantity': {'key': 'quantity', 'type': 'long'}, - 'extended_unit': {'key': 'extendedUnit', 'type': 'str'}, - } - - def __init__(self, **kwargs) -> None: - super(ResourceSkuCosts, self).__init__(**kwargs) - self.meter_id = None - self.quantity = None - self.extended_unit = None diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_04_01/models/resource_sku_location_info.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_04_01/models/resource_sku_location_info.py deleted file mode 100644 index 7ec4620aabcb..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_04_01/models/resource_sku_location_info.py +++ /dev/null @@ -1,47 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ResourceSkuLocationInfo(Model): - """ResourceSkuLocationInfo. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar location: Location of the SKU - :vartype location: str - :ivar zones: List of availability zones where the SKU is supported. - :vartype zones: list[str] - :ivar zone_details: Details of capabilities available to a SKU in specific - zones. - :vartype zone_details: - list[~azure.mgmt.compute.v2019_04_01.models.ResourceSkuZoneDetails] - """ - - _validation = { - 'location': {'readonly': True}, - 'zones': {'readonly': True}, - 'zone_details': {'readonly': True}, - } - - _attribute_map = { - 'location': {'key': 'location', 'type': 'str'}, - 'zones': {'key': 'zones', 'type': '[str]'}, - 'zone_details': {'key': 'zoneDetails', 'type': '[ResourceSkuZoneDetails]'}, - } - - def __init__(self, **kwargs): - super(ResourceSkuLocationInfo, self).__init__(**kwargs) - self.location = None - self.zones = None - self.zone_details = None diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_04_01/models/resource_sku_location_info_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_04_01/models/resource_sku_location_info_py3.py deleted file mode 100644 index f2f048971f65..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_04_01/models/resource_sku_location_info_py3.py +++ /dev/null @@ -1,47 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ResourceSkuLocationInfo(Model): - """ResourceSkuLocationInfo. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar location: Location of the SKU - :vartype location: str - :ivar zones: List of availability zones where the SKU is supported. - :vartype zones: list[str] - :ivar zone_details: Details of capabilities available to a SKU in specific - zones. - :vartype zone_details: - list[~azure.mgmt.compute.v2019_04_01.models.ResourceSkuZoneDetails] - """ - - _validation = { - 'location': {'readonly': True}, - 'zones': {'readonly': True}, - 'zone_details': {'readonly': True}, - } - - _attribute_map = { - 'location': {'key': 'location', 'type': 'str'}, - 'zones': {'key': 'zones', 'type': '[str]'}, - 'zone_details': {'key': 'zoneDetails', 'type': '[ResourceSkuZoneDetails]'}, - } - - def __init__(self, **kwargs) -> None: - super(ResourceSkuLocationInfo, self).__init__(**kwargs) - self.location = None - self.zones = None - self.zone_details = None diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_04_01/models/resource_sku_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_04_01/models/resource_sku_py3.py deleted file mode 100644 index db0e4ccf5a1c..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_04_01/models/resource_sku_py3.py +++ /dev/null @@ -1,103 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ResourceSku(Model): - """Describes an available Compute SKU. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar resource_type: The type of resource the SKU applies to. - :vartype resource_type: str - :ivar name: The name of SKU. - :vartype name: str - :ivar tier: Specifies the tier of virtual machines in a scale set.

    Possible Values:

    **Standard**

    **Basic** - :vartype tier: str - :ivar size: The Size of the SKU. - :vartype size: str - :ivar family: The Family of this particular SKU. - :vartype family: str - :ivar kind: The Kind of resources that are supported in this SKU. - :vartype kind: str - :ivar capacity: Specifies the number of virtual machines in the scale set. - :vartype capacity: - ~azure.mgmt.compute.v2019_04_01.models.ResourceSkuCapacity - :ivar locations: The set of locations that the SKU is available. - :vartype locations: list[str] - :ivar location_info: A list of locations and availability zones in those - locations where the SKU is available. - :vartype location_info: - list[~azure.mgmt.compute.v2019_04_01.models.ResourceSkuLocationInfo] - :ivar api_versions: The api versions that support this SKU. - :vartype api_versions: list[str] - :ivar costs: Metadata for retrieving price info. - :vartype costs: - list[~azure.mgmt.compute.v2019_04_01.models.ResourceSkuCosts] - :ivar capabilities: A name value pair to describe the capability. - :vartype capabilities: - list[~azure.mgmt.compute.v2019_04_01.models.ResourceSkuCapabilities] - :ivar restrictions: The restrictions because of which SKU cannot be used. - This is empty if there are no restrictions. - :vartype restrictions: - list[~azure.mgmt.compute.v2019_04_01.models.ResourceSkuRestrictions] - """ - - _validation = { - 'resource_type': {'readonly': True}, - 'name': {'readonly': True}, - 'tier': {'readonly': True}, - 'size': {'readonly': True}, - 'family': {'readonly': True}, - 'kind': {'readonly': True}, - 'capacity': {'readonly': True}, - 'locations': {'readonly': True}, - 'location_info': {'readonly': True}, - 'api_versions': {'readonly': True}, - 'costs': {'readonly': True}, - 'capabilities': {'readonly': True}, - 'restrictions': {'readonly': True}, - } - - _attribute_map = { - 'resource_type': {'key': 'resourceType', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'tier': {'key': 'tier', 'type': 'str'}, - 'size': {'key': 'size', 'type': 'str'}, - 'family': {'key': 'family', 'type': 'str'}, - 'kind': {'key': 'kind', 'type': 'str'}, - 'capacity': {'key': 'capacity', 'type': 'ResourceSkuCapacity'}, - 'locations': {'key': 'locations', 'type': '[str]'}, - 'location_info': {'key': 'locationInfo', 'type': '[ResourceSkuLocationInfo]'}, - 'api_versions': {'key': 'apiVersions', 'type': '[str]'}, - 'costs': {'key': 'costs', 'type': '[ResourceSkuCosts]'}, - 'capabilities': {'key': 'capabilities', 'type': '[ResourceSkuCapabilities]'}, - 'restrictions': {'key': 'restrictions', 'type': '[ResourceSkuRestrictions]'}, - } - - def __init__(self, **kwargs) -> None: - super(ResourceSku, self).__init__(**kwargs) - self.resource_type = None - self.name = None - self.tier = None - self.size = None - self.family = None - self.kind = None - self.capacity = None - self.locations = None - self.location_info = None - self.api_versions = None - self.costs = None - self.capabilities = None - self.restrictions = None diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_04_01/models/resource_sku_restriction_info.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_04_01/models/resource_sku_restriction_info.py deleted file mode 100644 index 677e93463d58..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_04_01/models/resource_sku_restriction_info.py +++ /dev/null @@ -1,40 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ResourceSkuRestrictionInfo(Model): - """ResourceSkuRestrictionInfo. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar locations: Locations where the SKU is restricted - :vartype locations: list[str] - :ivar zones: List of availability zones where the SKU is restricted. - :vartype zones: list[str] - """ - - _validation = { - 'locations': {'readonly': True}, - 'zones': {'readonly': True}, - } - - _attribute_map = { - 'locations': {'key': 'locations', 'type': '[str]'}, - 'zones': {'key': 'zones', 'type': '[str]'}, - } - - def __init__(self, **kwargs): - super(ResourceSkuRestrictionInfo, self).__init__(**kwargs) - self.locations = None - self.zones = None diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_04_01/models/resource_sku_restriction_info_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_04_01/models/resource_sku_restriction_info_py3.py deleted file mode 100644 index 008cf8d4c5fa..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_04_01/models/resource_sku_restriction_info_py3.py +++ /dev/null @@ -1,40 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ResourceSkuRestrictionInfo(Model): - """ResourceSkuRestrictionInfo. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar locations: Locations where the SKU is restricted - :vartype locations: list[str] - :ivar zones: List of availability zones where the SKU is restricted. - :vartype zones: list[str] - """ - - _validation = { - 'locations': {'readonly': True}, - 'zones': {'readonly': True}, - } - - _attribute_map = { - 'locations': {'key': 'locations', 'type': '[str]'}, - 'zones': {'key': 'zones', 'type': '[str]'}, - } - - def __init__(self, **kwargs) -> None: - super(ResourceSkuRestrictionInfo, self).__init__(**kwargs) - self.locations = None - self.zones = None diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_04_01/models/resource_sku_restrictions.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_04_01/models/resource_sku_restrictions.py deleted file mode 100644 index 8f11353d277d..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_04_01/models/resource_sku_restrictions.py +++ /dev/null @@ -1,57 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ResourceSkuRestrictions(Model): - """Describes scaling information of a SKU. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar type: The type of restrictions. Possible values include: 'Location', - 'Zone' - :vartype type: str or - ~azure.mgmt.compute.v2019_04_01.models.ResourceSkuRestrictionsType - :ivar values: The value of restrictions. If the restriction type is set to - location. This would be different locations where the SKU is restricted. - :vartype values: list[str] - :ivar restriction_info: The information about the restriction where the - SKU cannot be used. - :vartype restriction_info: - ~azure.mgmt.compute.v2019_04_01.models.ResourceSkuRestrictionInfo - :ivar reason_code: The reason for restriction. Possible values include: - 'QuotaId', 'NotAvailableForSubscription' - :vartype reason_code: str or - ~azure.mgmt.compute.v2019_04_01.models.ResourceSkuRestrictionsReasonCode - """ - - _validation = { - 'type': {'readonly': True}, - 'values': {'readonly': True}, - 'restriction_info': {'readonly': True}, - 'reason_code': {'readonly': True}, - } - - _attribute_map = { - 'type': {'key': 'type', 'type': 'ResourceSkuRestrictionsType'}, - 'values': {'key': 'values', 'type': '[str]'}, - 'restriction_info': {'key': 'restrictionInfo', 'type': 'ResourceSkuRestrictionInfo'}, - 'reason_code': {'key': 'reasonCode', 'type': 'ResourceSkuRestrictionsReasonCode'}, - } - - def __init__(self, **kwargs): - super(ResourceSkuRestrictions, self).__init__(**kwargs) - self.type = None - self.values = None - self.restriction_info = None - self.reason_code = None diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_04_01/models/resource_sku_restrictions_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_04_01/models/resource_sku_restrictions_py3.py deleted file mode 100644 index 22d50fe2b48c..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_04_01/models/resource_sku_restrictions_py3.py +++ /dev/null @@ -1,57 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ResourceSkuRestrictions(Model): - """Describes scaling information of a SKU. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar type: The type of restrictions. Possible values include: 'Location', - 'Zone' - :vartype type: str or - ~azure.mgmt.compute.v2019_04_01.models.ResourceSkuRestrictionsType - :ivar values: The value of restrictions. If the restriction type is set to - location. This would be different locations where the SKU is restricted. - :vartype values: list[str] - :ivar restriction_info: The information about the restriction where the - SKU cannot be used. - :vartype restriction_info: - ~azure.mgmt.compute.v2019_04_01.models.ResourceSkuRestrictionInfo - :ivar reason_code: The reason for restriction. Possible values include: - 'QuotaId', 'NotAvailableForSubscription' - :vartype reason_code: str or - ~azure.mgmt.compute.v2019_04_01.models.ResourceSkuRestrictionsReasonCode - """ - - _validation = { - 'type': {'readonly': True}, - 'values': {'readonly': True}, - 'restriction_info': {'readonly': True}, - 'reason_code': {'readonly': True}, - } - - _attribute_map = { - 'type': {'key': 'type', 'type': 'ResourceSkuRestrictionsType'}, - 'values': {'key': 'values', 'type': '[str]'}, - 'restriction_info': {'key': 'restrictionInfo', 'type': 'ResourceSkuRestrictionInfo'}, - 'reason_code': {'key': 'reasonCode', 'type': 'ResourceSkuRestrictionsReasonCode'}, - } - - def __init__(self, **kwargs) -> None: - super(ResourceSkuRestrictions, self).__init__(**kwargs) - self.type = None - self.values = None - self.restriction_info = None - self.reason_code = None diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_04_01/models/resource_sku_zone_details.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_04_01/models/resource_sku_zone_details.py deleted file mode 100644 index 5543790851ee..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_04_01/models/resource_sku_zone_details.py +++ /dev/null @@ -1,43 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ResourceSkuZoneDetails(Model): - """Describes The zonal capabilities of a SKU. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar name: The set of zones that the SKU is available in with the - specified capabilities. - :vartype name: list[str] - :ivar capabilities: A list of capabilities that are available for the SKU - in the specified list of zones. - :vartype capabilities: - list[~azure.mgmt.compute.v2019_04_01.models.ResourceSkuCapabilities] - """ - - _validation = { - 'name': {'readonly': True}, - 'capabilities': {'readonly': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': '[str]'}, - 'capabilities': {'key': 'capabilities', 'type': '[ResourceSkuCapabilities]'}, - } - - def __init__(self, **kwargs): - super(ResourceSkuZoneDetails, self).__init__(**kwargs) - self.name = None - self.capabilities = None diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_04_01/models/resource_sku_zone_details_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_04_01/models/resource_sku_zone_details_py3.py deleted file mode 100644 index 4a8ee65fa7be..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_04_01/models/resource_sku_zone_details_py3.py +++ /dev/null @@ -1,43 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ResourceSkuZoneDetails(Model): - """Describes The zonal capabilities of a SKU. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar name: The set of zones that the SKU is available in with the - specified capabilities. - :vartype name: list[str] - :ivar capabilities: A list of capabilities that are available for the SKU - in the specified list of zones. - :vartype capabilities: - list[~azure.mgmt.compute.v2019_04_01.models.ResourceSkuCapabilities] - """ - - _validation = { - 'name': {'readonly': True}, - 'capabilities': {'readonly': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': '[str]'}, - 'capabilities': {'key': 'capabilities', 'type': '[ResourceSkuCapabilities]'}, - } - - def __init__(self, **kwargs) -> None: - super(ResourceSkuZoneDetails, self).__init__(**kwargs) - self.name = None - self.capabilities = None diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_04_01/operations/__init__.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_04_01/operations/__init__.py index 2df0e5028143..00013c3b54ed 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_04_01/operations/__init__.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_04_01/operations/__init__.py @@ -9,7 +9,7 @@ # regenerated. # -------------------------------------------------------------------------- -from .resource_skus_operations import ResourceSkusOperations +from ._resource_skus_operations import ResourceSkusOperations __all__ = [ 'ResourceSkusOperations', diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_04_01/operations/_resource_skus_operations.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_04_01/operations/_resource_skus_operations.py new file mode 100644 index 000000000000..44723fd2def2 --- /dev/null +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_04_01/operations/_resource_skus_operations.py @@ -0,0 +1,107 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse +from msrestazure.azure_exceptions import CloudError + +from .. import models + + +class ResourceSkusOperations(object): + """ResourceSkusOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: Client Api Version. Constant value: "2019-04-01". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2019-04-01" + + self.config = config + + def list( + self, custom_headers=None, raw=False, **operation_config): + """Gets the list of Microsoft.Compute SKUs available for your + Subscription. + + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of ResourceSku + :rtype: + ~azure.mgmt.compute.v2019_04_01.models.ResourceSkuPaged[~azure.mgmt.compute.v2019_04_01.models.ResourceSku] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.ResourceSkuPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Compute/skus'} diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_04_01/operations/resource_skus_operations.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_04_01/operations/resource_skus_operations.py deleted file mode 100644 index 53311a56765d..000000000000 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_04_01/operations/resource_skus_operations.py +++ /dev/null @@ -1,103 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError - -from .. import models - - -class ResourceSkusOperations(object): - """ResourceSkusOperations operations. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: Client Api Version. Constant value: "2019-04-01". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2019-04-01" - - self.config = config - - def list( - self, custom_headers=None, raw=False, **operation_config): - """Gets the list of Microsoft.Compute SKUs available for your - Subscription. - - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of ResourceSku - :rtype: - ~azure.mgmt.compute.v2019_04_01.models.ResourceSkuPaged[~azure.mgmt.compute.v2019_04_01.models.ResourceSku] - :raises: :class:`CloudError` - """ - def internal_paging(next_link=None, raw=False): - - if not next_link: - # Construct URL - url = self.list.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - deserialized = models.ResourceSkuPaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.ResourceSkuPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Compute/skus'} diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/version.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/version.py index fbf12e61f12c..d15d41e4399e 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/version.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/version.py @@ -5,4 +5,4 @@ # license information. # -------------------------------------------------------------------------- -VERSION = "5.0.0" +VERSION = "6.0.0" diff --git a/sdk/compute/azure-mgmt-compute/setup.py b/sdk/compute/azure-mgmt-compute/setup.py index d2d3ea9fb728..0b35e538c888 100644 --- a/sdk/compute/azure-mgmt-compute/setup.py +++ b/sdk/compute/azure-mgmt-compute/setup.py @@ -64,7 +64,6 @@ 'Programming Language :: Python :: 2', 'Programming Language :: Python :: 2.7', 'Programming Language :: Python :: 3', - 'Programming Language :: Python :: 3.4', 'Programming Language :: Python :: 3.5', 'Programming Language :: Python :: 3.6', 'Programming Language :: Python :: 3.7',